Skip to content

Commit 1e99f74

Browse files
authored
chore(compass-components): bump @leafygreen-ui package versions, remove extra packages COMPASS-5512 (#2843)
1 parent 40e970b commit 1e99f74

File tree

13 files changed

+271
-2290
lines changed

13 files changed

+271
-2290
lines changed

package-lock.json

Lines changed: 183 additions & 2239 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-components/package.json

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,34 +36,33 @@
3636
},
3737
"dependencies": {
3838
"@leafygreen-ui/badge": "^4.0.5",
39-
"@leafygreen-ui/banner": "^3.0.8",
39+
"@leafygreen-ui/banner": "^3.0.9",
4040
"@leafygreen-ui/button": "^12.0.5",
4141
"@leafygreen-ui/card": "^5.1.4",
42-
"@leafygreen-ui/checkbox": "^6.0.5",
43-
"@leafygreen-ui/confirmation-modal": "^2.2.1",
42+
"@leafygreen-ui/checkbox": "^6.0.6",
43+
"@leafygreen-ui/confirmation-modal": "^2.2.3",
4444
"@leafygreen-ui/emotion": "^4.0.0",
45-
"@leafygreen-ui/form-footer": "^0.9.0",
46-
"@leafygreen-ui/icon": "^11.4.0",
47-
"@leafygreen-ui/icon-button": "^9.1.6",
48-
"@leafygreen-ui/leafygreen-provider": "^2.1.2",
45+
"@leafygreen-ui/icon": "^11.6.1",
46+
"@leafygreen-ui/icon-button": "^9.1.7",
47+
"@leafygreen-ui/leafygreen-provider": "^2.1.3",
4948
"@leafygreen-ui/logo": "^6.1.0",
5049
"@leafygreen-ui/menu": "^11.0.1",
5150
"@leafygreen-ui/modal": "^7.0.0",
52-
"@leafygreen-ui/palette": "^3.2.2",
53-
"@leafygreen-ui/portal": "^3.1.3",
54-
"@leafygreen-ui/radio-box-group": "^6.1.4",
51+
"@leafygreen-ui/palette": "^3.3.1",
52+
"@leafygreen-ui/portal": "^4.0.2",
53+
"@leafygreen-ui/radio-box-group": "^6.1.5",
5554
"@leafygreen-ui/radio-group": "^7.0.6",
5655
"@leafygreen-ui/segmented-control": "^0.9.1",
57-
"@leafygreen-ui/select": "^3.0.8",
58-
"@leafygreen-ui/table": "^2.0.5",
59-
"@leafygreen-ui/tabs": "^5.1.3",
60-
"@leafygreen-ui/text-area": "^4.0.3",
61-
"@leafygreen-ui/text-input": "^6.0.3",
56+
"@leafygreen-ui/select": "^3.1.0",
57+
"@leafygreen-ui/table": "^2.0.6",
58+
"@leafygreen-ui/tabs": "^5.1.5",
59+
"@leafygreen-ui/text-area": "^4.1.1",
60+
"@leafygreen-ui/text-input": "^6.0.5",
6261
"@leafygreen-ui/toast": "^0.4.10",
63-
"@leafygreen-ui/toggle": "^7.0.4",
62+
"@leafygreen-ui/toggle": "^7.0.5",
6463
"@leafygreen-ui/tokens": "^0.5.3",
65-
"@leafygreen-ui/tooltip": "^6.2.2",
66-
"@leafygreen-ui/typography": "^8.0.2",
64+
"@leafygreen-ui/tooltip": "^6.3.1",
65+
"@leafygreen-ui/typography": "^8.1.0",
6766
"@mongodb-js/compass-logging": "^0.8.0",
6867
"@react-aria/interactions": "^3.6.0",
6968
"@react-aria/tooltip": "^3.1.3",

packages/compass-components/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ export { InlineInfoLink } from './components/inline-info-link';
117117
export { Placeholder } from './components/placeholder';
118118
export { useDOMRect } from './hooks/use-dom-rect';
119119
export { Table, TableHeader, Row, Cell } from '@leafygreen-ui/table';
120-
export { default as FormFooter } from '@leafygreen-ui/form-footer';
121120
export { VirtualGrid } from './components/virtual-grid';
122121
export { mergeProps } from './utils/merge-props';
123122
export { useFocusRing } from './hooks/use-focus-ring';

packages/compass-components/src/typings.d.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

packages/connection-form/src/components/advanced-options-tabs/advanced-tab/advanced-tab.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ function AdvancedTab({
115115
value={readPreference ?? defaultReadPreference}
116116
data-testid="read-preferences"
117117
id="read-preferences"
118+
size="compact"
118119
>
119120
<RadioBox
120121
id="default-preference-button"

packages/connection-form/src/components/advanced-options-tabs/authentication-tab/authentication-gssapi.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ function AuthenticationGSSAPI({
114114
});
115115
}}
116116
value={canonicalizeHostname}
117+
size="compact"
117118
>
118119
{Object.entries(GSSAPI_CANONICALIZE_HOST_NAME_OPTIONS).map(
119120
([key, { label, value }]) => (

packages/connection-form/src/components/advanced-options-tabs/authentication-tab/authentication-tab.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ function AuthenticationTab({
155155
id="authentication-method-radio-box-group"
156156
onChange={optionSelected}
157157
value={selectedAuthTab.id}
158+
size="compact"
158159
>
159160
{options.map(({ title, id }) => {
160161
return (

packages/connection-form/src/components/advanced-options-tabs/ssh-tunnel-tab/proxy-and-ssh-tunnel-tab.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ function ProxyAndSshTunnelTab({
172172
<RadioBoxGroup
173173
id="ssh-options-radio-box-group"
174174
onChange={optionSelected}
175+
size="compact"
175176
className="radio-box-group-style"
176177
>
177178
{options.map(({ title, id, type }) => {

packages/connection-form/src/components/advanced-options-tabs/ssh-tunnel-tab/socks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface Field {
1818
'proxyHost' | 'proxyPort' | 'proxyUsername' | 'proxyPassword'
1919
>;
2020
label: string;
21-
type: string;
21+
type: 'number' | 'password' | 'text';
2222
optional: boolean;
2323
value: string;
2424
errorMessage?: string;

packages/connection-form/src/components/advanced-options-tabs/ssh-tunnel-tab/ssh-tunnel-identity.tsx

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,25 @@ import type { UpdateConnectionFormField } from '../../../hooks/use-connect-form'
1212

1313
type IdentityFormKeys = keyof SSHConnectionOptions;
1414

15+
type FileInputField = {
16+
name: string;
17+
label: string;
18+
type: 'file';
19+
optional?: boolean;
20+
value: string[] | undefined;
21+
errorMessage: string | undefined;
22+
state: 'error' | 'none';
23+
};
24+
type TextInputField = {
25+
name: string;
26+
label: string;
27+
type: 'text' | 'number' | 'password';
28+
optional?: boolean;
29+
value: string | undefined;
30+
errorMessage: string | undefined;
31+
state: 'error' | 'none';
32+
};
33+
1534
function SshTunnelIdentity({
1635
sshTunnelOptions,
1736
updateConnectionFormField,
@@ -32,7 +51,7 @@ function SshTunnelIdentity({
3251
[updateConnectionFormField]
3352
);
3453

35-
const fields = [
54+
const fields: Array<TextInputField | FileInputField> = [
3655
{
3756
name: 'host',
3857
label: 'SSH Hostname',
@@ -84,9 +103,11 @@ function SshTunnelIdentity({
84103

85104
return (
86105
<>
87-
{fields.map(
88-
({ name, label, type, optional, value, errorMessage, state }) => {
89-
if (type === 'file') {
106+
{fields.map((field) => {
107+
const { name, label, optional, value, errorMessage, state } = field;
108+
109+
switch (field.type) {
110+
case 'file':
90111
return (
91112
<FormFieldContainer key={name}>
92113
<FileInput
@@ -104,29 +125,31 @@ function SshTunnelIdentity({
104125
/>
105126
</FormFieldContainer>
106127
);
107-
}
108-
return (
109-
<FormFieldContainer key={name}>
110-
<TextInput
111-
onChange={({
112-
target: { value },
113-
}: ChangeEvent<HTMLInputElement>) => {
114-
formFieldChanged(name as IdentityFormKeys, value);
115-
}}
116-
name={name}
117-
data-testid={name}
118-
label={label}
119-
type={type}
120-
optional={optional}
121-
value={value as string | undefined}
122-
errorMessage={errorMessage}
123-
state={state as 'error' | 'none'}
124-
spellCheck={false}
125-
/>
126-
</FormFieldContainer>
127-
);
128+
case 'text':
129+
case 'password':
130+
case 'number':
131+
return (
132+
<FormFieldContainer key={name}>
133+
<TextInput
134+
onChange={({
135+
target: { value },
136+
}: ChangeEvent<HTMLInputElement>) => {
137+
formFieldChanged(name as IdentityFormKeys, value);
138+
}}
139+
name={name}
140+
data-testid={name}
141+
label={label}
142+
type={field.type}
143+
optional={optional}
144+
value={value as string | undefined}
145+
errorMessage={errorMessage}
146+
state={state}
147+
spellCheck={false}
148+
/>
149+
</FormFieldContainer>
150+
);
128151
}
129-
)}
152+
})}
130153
</>
131154
);
132155
}

0 commit comments

Comments
 (0)