@salutejs/plasma-new-hope 0.141.0-canary.1422.10721189833.0 → 0.141.0-canary.1422.10773738088.0
Sign up to get free protection for your applications and to get access to all the features.
- package/emotion/cjs/components/Combobox/Combobox.template-doc.mdx +345 -0
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +39 -0
- package/{styled-components/cjs/examples/plasma_b2c/components/Combobox/ComboboxNew → emotion/cjs/examples/plasma_b2c/components/Combobox}/Combobox.js +2 -2
- package/emotion/{es/examples/plasma_b2c/components/Combobox/ComboboxNew → cjs/examples/plasma_b2c/components/Combobox}/Combobox.stories.tsx +3 -3
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Legacy/Combobox.config.js +25 -0
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.stories.tsx +21 -34
- package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +39 -0
- package/emotion/cjs/examples/{plasma_b2c/components/Combobox/ComboboxNew → plasma_web/components/Combobox}/Combobox.js +2 -2
- package/emotion/cjs/examples/plasma_web/components/Combobox/{ComboboxNew/Combobox.stories.tsx → Combobox.stories.tsx} +3 -3
- package/emotion/cjs/examples/plasma_web/components/Combobox/Legacy/Combobox.config.js +25 -0
- package/emotion/{es/examples/plasma_b2c/components/Combobox/ComboboxOld → cjs/examples/plasma_web/components/Combobox/Legacy}/Combobox.stories.tsx +21 -34
- package/emotion/es/components/Combobox/Combobox.template-doc.mdx +345 -0
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +33 -0
- package/emotion/es/examples/plasma_b2c/components/Combobox/{ComboboxNew/Combobox.js → Combobox.js} +2 -2
- package/emotion/{cjs/examples/plasma_b2c/components/Combobox/ComboboxNew → es/examples/plasma_b2c/components/Combobox}/Combobox.stories.tsx +3 -3
- package/emotion/es/examples/plasma_b2c/components/Combobox/Legacy/Combobox.config.js +19 -0
- package/emotion/es/examples/{plasma_web/components/Combobox/ComboboxOld → plasma_b2c/components/Combobox/Legacy}/Combobox.stories.tsx +21 -34
- package/emotion/es/examples/plasma_web/components/Combobox/Combobox.config.js +33 -0
- package/emotion/es/examples/plasma_web/components/Combobox/{ComboboxNew/Combobox.js → Combobox.js} +2 -2
- package/emotion/es/examples/plasma_web/components/Combobox/{ComboboxNew/Combobox.stories.tsx → Combobox.stories.tsx} +3 -3
- package/emotion/es/examples/plasma_web/components/Combobox/Legacy/Combobox.config.js +19 -0
- package/emotion/{cjs/examples/plasma_web/components/Combobox/ComboboxOld → es/examples/plasma_web/components/Combobox/Legacy}/Combobox.stories.tsx +21 -34
- package/package.json +2 -2
- package/styled-components/cjs/components/Combobox/Combobox.template-doc.mdx +345 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/{ComboboxNew/Combobox.config.js → Combobox.config.js} +2 -2
- package/{emotion/cjs/examples/plasma_web/components/Combobox/ComboboxNew → styled-components/cjs/examples/plasma_b2c/components/Combobox}/Combobox.js +2 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +368 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Legacy/Combobox.stories.tsx +256 -0
- package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +39 -0
- package/styled-components/cjs/examples/plasma_web/components/Combobox/{ComboboxNew/Combobox.js → Combobox.js} +2 -2
- package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.stories.tsx +368 -0
- package/styled-components/cjs/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Combobox/Legacy/Combobox.stories.tsx +256 -0
- package/styled-components/es/components/Combobox/Combobox.template-doc.mdx +345 -0
- package/styled-components/es/examples/{plasma_web/components/Combobox/ComboboxNew → plasma_b2c/components/Combobox}/Combobox.config.js +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Combobox/{ComboboxNew/Combobox.js → Combobox.js} +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +368 -0
- package/styled-components/es/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Legacy/Combobox.stories.tsx +256 -0
- package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.config.js +33 -0
- package/styled-components/es/examples/plasma_web/components/Combobox/{ComboboxNew/Combobox.js → Combobox.js} +2 -2
- package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.stories.tsx +368 -0
- package/styled-components/es/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Combobox/Legacy/Combobox.stories.tsx +256 -0
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +0 -2
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Combobox/{ComboboxNew/Combobox.d.ts → Combobox.d.ts} +3 -3
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Combobox/Legacy/Combobox.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Combobox/Combobox.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Combobox/{ComboboxNew/Combobox.d.ts → Combobox.d.ts} +3 -3
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Combobox/Legacy/Combobox.d.ts.map +1 -0
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.config.js +0 -39
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.config.js +0 -25
- package/emotion/cjs/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.config.js +0 -39
- package/emotion/cjs/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.config.js +0 -25
- package/emotion/es/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.config.js +0 -33
- package/emotion/es/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.config.js +0 -19
- package/emotion/es/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.config.js +0 -33
- package/emotion/es/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.config.js +0 -19
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -368
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.stories.tsx +0 -269
- package/styled-components/cjs/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.config.js +0 -39
- package/styled-components/cjs/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -368
- package/styled-components/cjs/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.stories.tsx +0 -269
- package/styled-components/es/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.config.js +0 -33
- package/styled-components/es/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -368
- package/styled-components/es/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.stories.tsx +0 -269
- package/styled-components/es/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -368
- package/styled-components/es/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.stories.tsx +0 -269
- package/types/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.config.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.config.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.d.ts.map +0 -1
- /package/emotion/cjs/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
- /package/emotion/cjs/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
- /package/emotion/es/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
- /package/emotion/es/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
- /package/styled-components/cjs/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
- /package/styled-components/cjs/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
- /package/styled-components/es/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
- /package/styled-components/es/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
- /package/types/examples/plasma_b2c/components/Combobox/{ComboboxNew/Combobox.config.d.ts → Combobox.config.d.ts} +0 -0
- /package/types/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.d.ts +0 -0
- /package/types/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.d.ts +0 -0
- /package/types/examples/plasma_web/components/Combobox/{ComboboxNew/Combobox.config.d.ts → Combobox.config.d.ts} +0 -0
- /package/types/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.d.ts +0 -0
- /package/types/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.d.ts +0 -0
package/styled-components/cjs/examples/plasma_web/components/Combobox/Legacy/Combobox.stories.tsx
ADDED
@@ -0,0 +1,256 @@
|
|
1
|
+
import React, { useState } from 'react';
|
2
|
+
import type { ComponentProps } from 'react';
|
3
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
4
|
+
import { action } from '@storybook/addon-actions';
|
5
|
+
|
6
|
+
import { mergeConfig } from '../../../../../engines';
|
7
|
+
import { Checkbox } from '../../Checkbox/Checkbox';
|
8
|
+
import { comboboxOldConfig } from '../../../../../components/Combobox';
|
9
|
+
import { WithTheme, argTypesFromConfig } from '../../../../_helpers';
|
10
|
+
import { IconDone } from '../../../../../components/_Icon';
|
11
|
+
|
12
|
+
import { Combobox, ComboboxDivider, ComboboxItem } from './Combobox';
|
13
|
+
import { config } from './Combobox.config';
|
14
|
+
|
15
|
+
const placements: Array<string> = ['top', 'bottom', 'right', 'left', 'auto'];
|
16
|
+
const enumerations: Array<string> = ['comma', 'chip'];
|
17
|
+
|
18
|
+
type ComboboxPrimitiveValue = string | number | boolean;
|
19
|
+
|
20
|
+
type StorySelectPropsCustom = {
|
21
|
+
skidding?: number;
|
22
|
+
distance?: number;
|
23
|
+
};
|
24
|
+
|
25
|
+
type StorySelectProps = ComponentProps<typeof Combobox> & StorySelectPropsCustom;
|
26
|
+
|
27
|
+
const meta: Meta<StorySelectProps> = {
|
28
|
+
title: 'plasma_web/Combobox',
|
29
|
+
decorators: [WithTheme],
|
30
|
+
component: Combobox,
|
31
|
+
argTypes: {
|
32
|
+
placement: {
|
33
|
+
options: placements,
|
34
|
+
control: {
|
35
|
+
type: 'select',
|
36
|
+
},
|
37
|
+
},
|
38
|
+
enumerationType: {
|
39
|
+
options: enumerations,
|
40
|
+
control: {
|
41
|
+
type: 'select',
|
42
|
+
},
|
43
|
+
},
|
44
|
+
...argTypesFromConfig(mergeConfig(comboboxOldConfig, config)),
|
45
|
+
},
|
46
|
+
args: {
|
47
|
+
usePortal: false,
|
48
|
+
disabled: false,
|
49
|
+
readOnly: false,
|
50
|
+
label: 'Label',
|
51
|
+
placeholder: 'Placeholder',
|
52
|
+
enumerationType: 'comma',
|
53
|
+
size: 'm',
|
54
|
+
view: 'default',
|
55
|
+
placement: 'bottom',
|
56
|
+
},
|
57
|
+
};
|
58
|
+
|
59
|
+
export default meta;
|
60
|
+
|
61
|
+
const onChangeAction = action('onChange');
|
62
|
+
|
63
|
+
const iconDoneToSelectSizeMap: Record<string, 'xs' | 's'> = {
|
64
|
+
xs: 'xs',
|
65
|
+
s: 's',
|
66
|
+
m: 's',
|
67
|
+
l: 's',
|
68
|
+
};
|
69
|
+
|
70
|
+
const checkboxToSelectSizeMap: Record<string, 's' | 'm'> = {
|
71
|
+
xs: 's',
|
72
|
+
s: 'm',
|
73
|
+
m: 'm',
|
74
|
+
l: 'm',
|
75
|
+
};
|
76
|
+
|
77
|
+
const getSelectItems = (slug: string, elemCount: number) =>
|
78
|
+
[...Array(elemCount).keys()].map((num) => ({
|
79
|
+
value: `${slug}_${num}`,
|
80
|
+
child: `${slug} ${num}`,
|
81
|
+
}));
|
82
|
+
|
83
|
+
const SingleDemo = (args: StorySelectProps) => {
|
84
|
+
const { usePortal, placement, label, placeholder, readOnly, disabled, size = 'm', view } = args;
|
85
|
+
|
86
|
+
const [value, setValue] = useState<ComboboxPrimitiveValue | undefined>('item_0');
|
87
|
+
|
88
|
+
const onChangeValue = (newValue?: ComboboxPrimitiveValue) => {
|
89
|
+
setValue(newValue);
|
90
|
+
onChangeAction(newValue);
|
91
|
+
};
|
92
|
+
|
93
|
+
return (
|
94
|
+
<div style={{ width: '50%', margin: '3rem 0' }}>
|
95
|
+
<h4>Combobox с единичным выбором</h4>
|
96
|
+
<Combobox
|
97
|
+
frame="theme-root"
|
98
|
+
usePortal={usePortal}
|
99
|
+
valueType="single"
|
100
|
+
value={value}
|
101
|
+
placement={placement}
|
102
|
+
label={label}
|
103
|
+
placeholder={placeholder}
|
104
|
+
size={size}
|
105
|
+
view={view}
|
106
|
+
disabled={disabled}
|
107
|
+
readOnly={readOnly}
|
108
|
+
onChangeValue={onChangeValue}
|
109
|
+
>
|
110
|
+
<ComboboxItem value={undefined} text="Clear" />
|
111
|
+
{getSelectItems('item', 6).map((item) => (
|
112
|
+
<ComboboxItem
|
113
|
+
key={item.value}
|
114
|
+
contentLeft={
|
115
|
+
item.value === value ? (
|
116
|
+
<IconDone size={iconDoneToSelectSizeMap[size]} color="inherit" />
|
117
|
+
) : undefined
|
118
|
+
}
|
119
|
+
value={item.value}
|
120
|
+
text={item.child}
|
121
|
+
/>
|
122
|
+
))}
|
123
|
+
</Combobox>
|
124
|
+
</div>
|
125
|
+
);
|
126
|
+
};
|
127
|
+
|
128
|
+
const MultipleDemo = (args: StorySelectProps) => {
|
129
|
+
const { usePortal, placement, label, placeholder, readOnly, disabled, enumerationType, size = 'm', view } = args;
|
130
|
+
|
131
|
+
const [value, setValue] = useState<Array<ComboboxPrimitiveValue> | undefined>(['item_2', 'item_3']);
|
132
|
+
|
133
|
+
const onChangeValue = (newValue?: Array<ComboboxPrimitiveValue>) => {
|
134
|
+
setValue(newValue);
|
135
|
+
onChangeAction(newValue);
|
136
|
+
};
|
137
|
+
|
138
|
+
return (
|
139
|
+
<div style={{ width: '50%', marginBottom: '3rem' }}>
|
140
|
+
<h4>Combobox с множественным выбором</h4>
|
141
|
+
<Combobox
|
142
|
+
frame="theme-root"
|
143
|
+
usePortal={usePortal}
|
144
|
+
valueType="multiple"
|
145
|
+
enumerationType={enumerationType}
|
146
|
+
value={value}
|
147
|
+
placement={placement}
|
148
|
+
label={label}
|
149
|
+
placeholder={placeholder}
|
150
|
+
size={size}
|
151
|
+
view={view}
|
152
|
+
disabled={disabled}
|
153
|
+
readOnly={readOnly}
|
154
|
+
onChangeValue={onChangeValue}
|
155
|
+
>
|
156
|
+
<ComboboxItem value={undefined} text="Clear" />
|
157
|
+
{getSelectItems('item', 6).map((item) => (
|
158
|
+
<ComboboxItem
|
159
|
+
key={item.value}
|
160
|
+
contentLeft={<Checkbox size={checkboxToSelectSizeMap[size]} />}
|
161
|
+
value={item.value}
|
162
|
+
text={item.child}
|
163
|
+
/>
|
164
|
+
))}
|
165
|
+
</Combobox>
|
166
|
+
</div>
|
167
|
+
);
|
168
|
+
};
|
169
|
+
|
170
|
+
const AddCustomItemDemo = (args: StorySelectProps) => {
|
171
|
+
const { usePortal, placement, label, placeholder, readOnly, disabled, size = 'm', view } = args;
|
172
|
+
|
173
|
+
const [opened, setOpened] = useState(false);
|
174
|
+
const [items, setItems] = useState(getSelectItems('item', 1));
|
175
|
+
const [value, setValue] = useState<ComboboxPrimitiveValue | undefined>('item_0');
|
176
|
+
|
177
|
+
const onChangeValue = (newValue?: ComboboxPrimitiveValue) => {
|
178
|
+
setValue(newValue);
|
179
|
+
onChangeAction(newValue);
|
180
|
+
};
|
181
|
+
|
182
|
+
const onToggle = (openValue: boolean) => setOpened(openValue);
|
183
|
+
|
184
|
+
const onKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {
|
185
|
+
const { code } = event;
|
186
|
+
|
187
|
+
if (code === 'Enter') {
|
188
|
+
const newValue = (event.target as HTMLInputElement).value;
|
189
|
+
const newItems = [...items];
|
190
|
+
|
191
|
+
if (newItems.find((item) => item.child === newValue)) {
|
192
|
+
return;
|
193
|
+
}
|
194
|
+
|
195
|
+
newItems.push({
|
196
|
+
value: `${newValue}_`,
|
197
|
+
child: (newValue || '').toString(),
|
198
|
+
});
|
199
|
+
|
200
|
+
setOpened(false);
|
201
|
+
setItems(newItems);
|
202
|
+
}
|
203
|
+
};
|
204
|
+
|
205
|
+
const filterFunction = () => true;
|
206
|
+
|
207
|
+
return (
|
208
|
+
<div style={{ width: '50%' }}>
|
209
|
+
<h4>Combobox с добавлением пользовательского элемента</h4>
|
210
|
+
<Combobox
|
211
|
+
frame="theme-root"
|
212
|
+
usePortal={usePortal}
|
213
|
+
valueType="single"
|
214
|
+
value={value}
|
215
|
+
placement={placement}
|
216
|
+
label={label}
|
217
|
+
placeholder={placeholder}
|
218
|
+
size={size}
|
219
|
+
view={view}
|
220
|
+
disabled={disabled}
|
221
|
+
readOnly={readOnly}
|
222
|
+
opened={opened}
|
223
|
+
onToggle={onToggle}
|
224
|
+
onChangeValue={onChangeValue}
|
225
|
+
onKeyDown={onKeyDown}
|
226
|
+
filterFunction={filterFunction}
|
227
|
+
>
|
228
|
+
<ComboboxItem value={undefined} text="Clear" />
|
229
|
+
<ComboboxDivider />
|
230
|
+
{items.map((item) => (
|
231
|
+
<ComboboxItem
|
232
|
+
key={item.value}
|
233
|
+
contentLeft={
|
234
|
+
item.value === value ? (
|
235
|
+
<IconDone size={iconDoneToSelectSizeMap[size]} color="inherit" />
|
236
|
+
) : undefined
|
237
|
+
}
|
238
|
+
value={item.value}
|
239
|
+
text={item.child}
|
240
|
+
/>
|
241
|
+
))}
|
242
|
+
</Combobox>
|
243
|
+
</div>
|
244
|
+
);
|
245
|
+
};
|
246
|
+
|
247
|
+
export const Legacy: StoryObj<StorySelectProps> = {
|
248
|
+
render: (args) => (
|
249
|
+
<>
|
250
|
+
<h3>Combobox на композиционной архитектуре (deprecated)</h3>
|
251
|
+
<SingleDemo {...args} />
|
252
|
+
<MultipleDemo {...args} />
|
253
|
+
<AddCustomItemDemo {...args} />
|
254
|
+
</>
|
255
|
+
),
|
256
|
+
};
|
@@ -0,0 +1,345 @@
|
|
1
|
+
---
|
2
|
+
id: combobox
|
3
|
+
title: Combobox
|
4
|
+
---
|
5
|
+
|
6
|
+
import { PropsTable, Description, StorybookLink } from '@site/src/components';
|
7
|
+
import Tabs from '@theme/Tabs';
|
8
|
+
import TabItem from '@theme/TabItem';
|
9
|
+
|
10
|
+
# Combobox
|
11
|
+
|
12
|
+
<Description name="Combobox" />
|
13
|
+
<PropsTable name="Combobox" />
|
14
|
+
|
15
|
+
## Использование
|
16
|
+
Обязательным параметром является только `items`. Внутри items может быть такой же вложенный массив items. Формат следующий:
|
17
|
+
|
18
|
+
```tsx
|
19
|
+
type Items = Array<{
|
20
|
+
/**
|
21
|
+
* Значение у item
|
22
|
+
*/
|
23
|
+
value: string;
|
24
|
+
/**
|
25
|
+
* Метка-подпись к item
|
26
|
+
*/
|
27
|
+
label: string;
|
28
|
+
/**
|
29
|
+
* Список дочерних items.
|
30
|
+
*/
|
31
|
+
items?: Array<ItemOption>;
|
32
|
+
/**
|
33
|
+
* Item не активен
|
34
|
+
*/
|
35
|
+
disabled?: boolean;
|
36
|
+
/**
|
37
|
+
* Слот для контента слева
|
38
|
+
*/
|
39
|
+
contentLeft?: ReactNode;
|
40
|
+
/**
|
41
|
+
* Слот для контента справа
|
42
|
+
*/
|
43
|
+
contentRight?: ReactNode;
|
44
|
+
}>;
|
45
|
+
```
|
46
|
+
|
47
|
+
Тип выбора комбобокса - одиночный или множественный зависит от типа `value` и `onChange`. В одиночном value - `string`, в множественном - `Array<string>`.\
|
48
|
+
|
49
|
+
|
50
|
+
## Примеры
|
51
|
+
|
52
|
+
<Tabs>
|
53
|
+
<TabItem value="single" label="Single" default>
|
54
|
+
```tsx live
|
55
|
+
import React from 'react';
|
56
|
+
import { Combobox } from '@salutejs/{{ package }}';
|
57
|
+
|
58
|
+
export function App() {
|
59
|
+
const [value, setValue] = useState('');
|
60
|
+
|
61
|
+
const items = [
|
62
|
+
{
|
63
|
+
value: 'north_america',
|
64
|
+
label: 'Северная Америка',
|
65
|
+
},
|
66
|
+
{
|
67
|
+
value: 'south_america',
|
68
|
+
label: 'Южная Америка',
|
69
|
+
items: [
|
70
|
+
{
|
71
|
+
value: 'brazil',
|
72
|
+
label: 'Бразилия',
|
73
|
+
},
|
74
|
+
{
|
75
|
+
value: 'argentina',
|
76
|
+
label: 'Аргентина',
|
77
|
+
},
|
78
|
+
],
|
79
|
+
},
|
80
|
+
];
|
81
|
+
|
82
|
+
return (
|
83
|
+
<div style=\{{ display: 'flex', gap: '30px', height: '300px' }}>
|
84
|
+
<div style=\{{width: '300px'}}>
|
85
|
+
<Combobox
|
86
|
+
items={items}
|
87
|
+
value={value}
|
88
|
+
onChange={setValue}
|
89
|
+
placeholder="Placeholder"
|
90
|
+
label="Label"
|
91
|
+
helperText="Helper text"
|
92
|
+
/>
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
);
|
96
|
+
}
|
97
|
+
```
|
98
|
+
</TabItem>
|
99
|
+
<TabItem value="multiple" label="Multiple">
|
100
|
+
```tsx live
|
101
|
+
import React from 'react';
|
102
|
+
import { Combobox } from '@salutejs/{{ package }}';
|
103
|
+
|
104
|
+
export function App() {
|
105
|
+
const [value, setValue] = useState([]);
|
106
|
+
|
107
|
+
const items = [
|
108
|
+
{
|
109
|
+
value: 'north_america',
|
110
|
+
label: 'Северная Америка',
|
111
|
+
},
|
112
|
+
{
|
113
|
+
value: 'south_america',
|
114
|
+
label: 'Южная Америка',
|
115
|
+
items: [
|
116
|
+
{
|
117
|
+
value: 'brazil',
|
118
|
+
label: 'Бразилия',
|
119
|
+
},
|
120
|
+
{
|
121
|
+
value: 'argentina',
|
122
|
+
label: 'Аргентина',
|
123
|
+
},
|
124
|
+
],
|
125
|
+
},
|
126
|
+
];
|
127
|
+
|
128
|
+
return (
|
129
|
+
<div style=\{{ display: 'flex', gap: '30px', height: '300px' }}>
|
130
|
+
<div style=\{{width: '300px'}}>
|
131
|
+
<Combobox
|
132
|
+
multiple
|
133
|
+
items={items}
|
134
|
+
value={value}
|
135
|
+
onChange={setValue}
|
136
|
+
placeholder="Placeholder"
|
137
|
+
label="Label"
|
138
|
+
helperText="Helper text"
|
139
|
+
/>
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
);
|
143
|
+
}
|
144
|
+
```
|
145
|
+
</TabItem>
|
146
|
+
<TabItem value="predefined" label="Predefined">
|
147
|
+
Есть возможность задать значения по дефолту (главное, чтобы они находились в `items`). Также можно управлять состоянием снаружи селекта.
|
148
|
+
|
149
|
+
```tsx live
|
150
|
+
import React from 'react';
|
151
|
+
import { Combobox, Button } from '@salutejs/{{ package }}';
|
152
|
+
|
153
|
+
export function App() {
|
154
|
+
const [multipleValue, setMultipleValue] = useState(['brazil', 'north_america']);
|
155
|
+
|
156
|
+
const items = [
|
157
|
+
{
|
158
|
+
value: 'north_america',
|
159
|
+
label: 'Северная Америка',
|
160
|
+
},
|
161
|
+
{
|
162
|
+
value: 'south_america',
|
163
|
+
label: 'Южная Америка',
|
164
|
+
items: [
|
165
|
+
{
|
166
|
+
value: 'brazil',
|
167
|
+
label: 'Бразилия',
|
168
|
+
},
|
169
|
+
{
|
170
|
+
value: 'argentina',
|
171
|
+
label: 'Аргентина',
|
172
|
+
},
|
173
|
+
],
|
174
|
+
},
|
175
|
+
];
|
176
|
+
|
177
|
+
return (
|
178
|
+
<div style=\{{ display: 'flex', gap: '30px', height: '300px' }}>
|
179
|
+
<div style=\{{width: '300px'}}>
|
180
|
+
<Combobox
|
181
|
+
multiple
|
182
|
+
items={items}
|
183
|
+
value={multipleValue}
|
184
|
+
onChange={setMultipleValue}
|
185
|
+
placeholder="Placeholder"
|
186
|
+
label="Label"
|
187
|
+
helperText="Helper text"
|
188
|
+
/>
|
189
|
+
</div>
|
190
|
+
|
191
|
+
<Button onClick={() => setMultipleValue([])}>Очистить</Button>
|
192
|
+
</div>
|
193
|
+
);
|
194
|
+
}
|
195
|
+
```
|
196
|
+
</TabItem>
|
197
|
+
<TabItem value="portal" label="Portal">
|
198
|
+
Иногда возникает необходимость вынесения выпадающего списка на уровни выше в DOM. К примеру, когда у родительского блока имеется скролл, и список будет обрезаться, чего хотелось бы избежать.\
|
199
|
+
Для такой реализации имеется пропс `portal`, который принимает либо `ref` либо `id` html-тега.\
|
200
|
+
Также нужно прокинуть проп `listWidth`, чтобы явно задать ширину списку. Если этого не сделать, то будет взята ширина 100% от блока, на который ведет ссылка портала.
|
201
|
+
|
202
|
+
```tsx live
|
203
|
+
import React, { useRef } from 'react';
|
204
|
+
import { Combobox } from '@salutejs/{{ package }}';
|
205
|
+
|
206
|
+
export function App() {
|
207
|
+
const [value, setValue] = useState('');
|
208
|
+
|
209
|
+
const items = [
|
210
|
+
{
|
211
|
+
value: 'north_america',
|
212
|
+
label: 'Северная Америка',
|
213
|
+
},
|
214
|
+
{
|
215
|
+
value: 'south_america',
|
216
|
+
label: 'Южная Америка',
|
217
|
+
items: [
|
218
|
+
{
|
219
|
+
value: 'brazil',
|
220
|
+
label: 'Бразилия',
|
221
|
+
},
|
222
|
+
{
|
223
|
+
value: 'argentina',
|
224
|
+
label: 'Аргентина',
|
225
|
+
},
|
226
|
+
],
|
227
|
+
},
|
228
|
+
];
|
229
|
+
|
230
|
+
const ref = useRef(null)
|
231
|
+
|
232
|
+
return (
|
233
|
+
<div style=\{{ height: '300px' }} ref={ref}>
|
234
|
+
<div style=\{{width: '300px'}}>
|
235
|
+
<Combobox
|
236
|
+
items={items}
|
237
|
+
value={value}
|
238
|
+
onChange={setValue}
|
239
|
+
placeholder="Placeholder"
|
240
|
+
label="Label"
|
241
|
+
helperText="Helper text"
|
242
|
+
portal={ref}
|
243
|
+
listWidth="300px"
|
244
|
+
/>
|
245
|
+
</div>
|
246
|
+
</div>
|
247
|
+
);
|
248
|
+
}
|
249
|
+
```
|
250
|
+
</TabItem>
|
251
|
+
<TabItem value="uncontrolled" label="Uncontrolled">
|
252
|
+
`value` и `onChange` - опциональные параметры. Если вы хотите `uncontrolled` вариант компонента - их пробрасывать необязательно.
|
253
|
+
|
254
|
+
```tsx live
|
255
|
+
import React from 'react';
|
256
|
+
import { Combobox } from '@salutejs/{{ package }}';
|
257
|
+
|
258
|
+
export function App() {
|
259
|
+
const items = [
|
260
|
+
{
|
261
|
+
value: 'north_america',
|
262
|
+
label: 'Северная Америка',
|
263
|
+
},
|
264
|
+
{
|
265
|
+
value: 'south_america',
|
266
|
+
label: 'Южная Америка',
|
267
|
+
items: [
|
268
|
+
{
|
269
|
+
value: 'brazil',
|
270
|
+
label: 'Бразилия',
|
271
|
+
},
|
272
|
+
{
|
273
|
+
value: 'argentina',
|
274
|
+
label: 'Аргентина',
|
275
|
+
},
|
276
|
+
],
|
277
|
+
},
|
278
|
+
];
|
279
|
+
|
280
|
+
return (
|
281
|
+
<div style=\{{ height: '300px' }}>
|
282
|
+
<div style=\{{width: '300px'}}>
|
283
|
+
<Combobox
|
284
|
+
items={items}
|
285
|
+
placeholder="Placeholder"
|
286
|
+
label="Label"
|
287
|
+
helperText="Helper text"
|
288
|
+
/>
|
289
|
+
</div>
|
290
|
+
</div>
|
291
|
+
);
|
292
|
+
}
|
293
|
+
```
|
294
|
+
</TabItem>
|
295
|
+
<TabItem value="alwaysOpened" label="Always opened">
|
296
|
+
Свойство alwaysOpened позволяет отображать Combobox всегда открытым. При этом closeAfterSelect игнорируется.
|
297
|
+
|
298
|
+
```tsx live
|
299
|
+
import React, { useState } from 'react';
|
300
|
+
import { Combobox, Button } from '@salutejs/{{ package }}';
|
301
|
+
|
302
|
+
export function App() {
|
303
|
+
const items = [
|
304
|
+
{
|
305
|
+
value: 'north_america',
|
306
|
+
label: 'Северная Америка',
|
307
|
+
},
|
308
|
+
{
|
309
|
+
value: 'south_america',
|
310
|
+
label: 'Южная Америка',
|
311
|
+
items: [
|
312
|
+
{
|
313
|
+
value: 'brazil',
|
314
|
+
label: 'Бразилия',
|
315
|
+
},
|
316
|
+
{
|
317
|
+
value: 'argentina',
|
318
|
+
label: 'Аргентина',
|
319
|
+
},
|
320
|
+
],
|
321
|
+
},
|
322
|
+
];
|
323
|
+
|
324
|
+
return (
|
325
|
+
<div style=\{{ height: '300px' }}>
|
326
|
+
<div style=\{{width: '300px'}}>
|
327
|
+
<Button text={ alwaysOpened ? 'По умолчанию' : 'Всегда открыт' } onClick={() => setAlwaysOpened(!alwaysOpened)} style={{ marginBottom: '1rem' }} />
|
328
|
+
<Combobox
|
329
|
+
items={items}
|
330
|
+
placeholder="Placeholder"
|
331
|
+
label="Label"
|
332
|
+
helperText="Helper text"
|
333
|
+
alwaysOpened={alwaysOpened}
|
334
|
+
/>
|
335
|
+
</div>
|
336
|
+
</div>
|
337
|
+
);
|
338
|
+
}
|
339
|
+
```
|
340
|
+
</TabItem>
|
341
|
+
</Tabs>
|
342
|
+
|
343
|
+
## Клавиатурная навигация
|
344
|
+
|
345
|
+
Данный компонент соответствует требования W3C: [Combobox](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/) и частично [TreeView](https://www.w3.org/WAI/ARIA/apg/patterns/treeview/).
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
|
-
import { comboboxNewTokens as tokens } from '
|
2
|
+
import { comboboxNewTokens as tokens } from '../../../../components/Combobox';
|
3
3
|
export var config = {
|
4
4
|
defaults: {
|
5
5
|
view: 'default',
|
@@ -11,7 +11,7 @@ export var config = {
|
|
11
11
|
"default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-transparent-primary);", ":var(--surface-transparent-secondary);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-tertiary);", ":var(--text-tertiary);", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;"], tokens.textFieldColor, tokens.textFieldBackgroundColor, tokens.textFieldBackgroundColorFocus, tokens.textFieldCaretColor, tokens.textFieldPlaceholderColor, tokens.textFieldTextBeforeColor, tokens.textFieldTextAfterColor, tokens.textFieldLabelColor, tokens.textFieldLeftHelperColor, tokens.textFieldFocusColor, tokens.textFieldChipCloseIconColor, tokens.textFieldChipColor, tokens.textFieldChipBackground, tokens.textFieldChipColorHover, tokens.textFieldChipBackgroundHover, tokens.textFieldChipColorActive, tokens.textFieldChipBackgroundActive, tokens.textFieldChipBackgroundReadOnly, tokens.textFieldChipColorReadOnly, tokens.textFieldChipBackgroundReadOnlyHover, tokens.textFieldChipColorReadOnlyHover, tokens.textFieldChipOpacityReadonly),
|
12
12
|
positive: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);", ":var(--surface-transparent-positive);", ":var(--surface-transparent-positive-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-tertiary);", ":var(--text-tertiary);", ":var(--text-primary);", ":var(--text-positive);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;"], tokens.textFieldColor, tokens.textFieldBackgroundColor, tokens.textFieldBackgroundColorFocus, tokens.textFieldCaretColor, tokens.textFieldPlaceholderColor, tokens.textFieldTextBeforeColor, tokens.textFieldTextAfterColor, tokens.textFieldLabelColor, tokens.textFieldLeftHelperColor, tokens.textFieldFocusColor, tokens.textFieldChipCloseIconColor, tokens.textFieldChipColor, tokens.textFieldChipBackground, tokens.textFieldChipColorHover, tokens.textFieldChipBackgroundHover, tokens.textFieldChipColorActive, tokens.textFieldChipBackgroundActive, tokens.textFieldChipBackgroundReadOnly, tokens.textFieldChipColorReadOnly, tokens.textFieldChipBackgroundReadOnlyHover, tokens.textFieldChipColorReadOnlyHover, tokens.textFieldChipOpacityReadonly),
|
13
13
|
warning: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);", ":var(--surface-transparent-warning);", ":var(--surface-transparent-warning-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-tertiary);", ":var(--text-tertiary);", ":var(--text-primary);", ":var(--text-warning);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;"], tokens.textFieldColor, tokens.textFieldBackgroundColor, tokens.textFieldBackgroundColorFocus, tokens.textFieldCaretColor, tokens.textFieldPlaceholderColor, tokens.textFieldTextBeforeColor, tokens.textFieldTextAfterColor, tokens.textFieldLabelColor, tokens.textFieldLeftHelperColor, tokens.textFieldFocusColor, tokens.textFieldChipCloseIconColor, tokens.textFieldChipColor, tokens.textFieldChipBackground, tokens.textFieldChipColorHover, tokens.textFieldChipBackgroundHover, tokens.textFieldChipColorActive, tokens.textFieldChipBackgroundActive, tokens.textFieldChipBackgroundReadOnly, tokens.textFieldChipColorReadOnly, tokens.textFieldChipBackgroundReadOnlyHover, tokens.textFieldChipColorReadOnlyHover, tokens.textFieldChipOpacityReadonly),
|
14
|
-
negative: /*#__PURE__*/css(["", ":var(--plasma-colors-primary)
|
14
|
+
negative: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);$", ":var(--surface-transparent-negative);", ":var(--surface-transparent-negative-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-tertiary);", ":var(--text-tertiary);", ":var(--text-primary);", ":var(--text-negative);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;"], tokens.textFieldColor, tokens.textFieldBackgroundColor, tokens.textFieldBackgroundColorFocus, tokens.textFieldCaretColor, tokens.textFieldPlaceholderColor, tokens.textFieldTextBeforeColor, tokens.textFieldTextAfterColor, tokens.textFieldLabelColor, tokens.textFieldLeftHelperColor, tokens.textFieldFocusColor, tokens.textFieldChipCloseIconColor, tokens.textFieldChipColor, tokens.textFieldChipBackground, tokens.textFieldChipColorHover, tokens.textFieldChipBackgroundHover, tokens.textFieldChipColorActive, tokens.textFieldChipBackgroundActive, tokens.textFieldChipBackgroundReadOnly, tokens.textFieldChipColorReadOnly, tokens.textFieldChipBackgroundReadOnlyHover, tokens.textFieldChipColorReadOnlyHover, tokens.textFieldChipOpacityReadonly)
|
15
15
|
},
|
16
16
|
size: {
|
17
17
|
l: /*#__PURE__*/css(["", ":3.5rem;", ":1.0625rem 1.125rem 1.0625rem 1.125rem;", ":0.375rem;", ":0.875rem;", ":-0.0625rem 0.5rem -0.0625rem -0.125rem;", ":-0.0625rem -0.125rem -0.0625rem 0.75rem;", ":0 0.25rem 0 0;", ":0 0 0 0.25rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.75rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.5625rem 0 0.125rem 0;", ":1.5625rem 0 0.5625rem 0;", ":0.25rem;", ":0.5rem;", ":auto;", ":2.75rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":0rem;", ":1.5rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":1rem;", ":0.125rem;", ":0.875rem;", ":1.5rem;", ":1rem 1rem 1rem 0.875rem;", ":0.75rem 1rem 0.75rem 0.875rem;", ":0.75rem;", ":0 0.5rem 0 0;", ":1.5rem;", ":1.5rem;", ":0rem;", ":0rem;", ":0rem;", ":0rem;", ":0.125rem;", ":0.375rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":1.25rem;", ":1.25rem;", ":0.375rem;", ":0.375rem;", ":var(--text-accent);", ":var(--on-dark-text-primary);", ":var(--text-secondary);", ":0.375rem;"], tokens.textFieldHeight, tokens.textFieldPadding, tokens.textFieldPaddingWithChips, tokens.textFieldBorderRadius, tokens.textFieldLeftContentMargin, tokens.textFieldRightContentMargin, tokens.textFieldTextBeforeMargin, tokens.textFieldTextAfterMargin, tokens.textFieldFontFamily, tokens.textFieldFontSize, tokens.textFieldFontStyle, tokens.textFieldFontWeight, tokens.textFieldLetterSpacing, tokens.textFieldLineHeight, tokens.textFieldLabelOffset, tokens.textFieldLabelFontFamily, tokens.textFieldLabelFontSize, tokens.textFieldLabelFontStyle, tokens.textFieldLabelFontWeight, tokens.textFieldLabelLetterSpacing, tokens.textFieldLabelLineHeight, tokens.textFieldLeftHelperOffset, tokens.textFieldLeftHelperFontFamily, tokens.textFieldLeftHelperFontSize, tokens.textFieldLeftHelperFontStyle, tokens.textFieldLeftHelperFontWeight, tokens.textFieldLeftHelperLetterSpacing, tokens.textFieldLeftHelperLineHeight, tokens.textFieldLabelInnerPadding, tokens.textFieldContentLabelInnerPadding, tokens.textFieldChipGap, tokens.textFieldChipBorderRadius, tokens.textFieldChipWidth, tokens.textFieldChipHeight, tokens.textFieldChipPaddingRight, tokens.textFieldChipPaddingLeft, tokens.textFieldChipClearContentMarginLeft, tokens.textFieldChipClearContentMarginRight, tokens.textFieldChipCloseIconSize, tokens.textFieldChipFontFamily, tokens.textFieldChipFontSize, tokens.textFieldChipFontStyle, tokens.textFieldChipFontWeight, tokens.textFieldChipLetterSpacing, tokens.textFieldChipLineHeight, tokens.emptyStatePadding, tokens.padding, tokens.borderRadius, tokens.itemHeight, tokens.itemPadding, tokens.itemPaddingTight, tokens.itemBorderRadius, tokens.itemIconMargin, tokens.itemIconSize, tokens.itemIconSizeTight, tokens.cellPadding, tokens.cellPaddingLeftContent, tokens.cellPaddingContent, tokens.cellPaddingRightContent, tokens.cellTextboxGap, tokens.cellGap, tokens.cellTitleFontFamily, tokens.cellTitleFontSize, tokens.cellTitleFontStyle, tokens.cellTitleFontWeight, tokens.cellTitleLetterSpacing, tokens.cellTitleLineHeight, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.fontLetterSpacing, tokens.fontLineHeight, tokens.checkboxTriggerSize, tokens.checkboxTriggerSizeTight, tokens.checkboxTriggerBorderRadius, tokens.checkboxTriggerBorderRadiusTight, tokens.checkboxFillColor, tokens.checkboxIconColor, tokens.checkboxTriggerBorderColor, tokens.indicatorSize),
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { component, mergeConfig } from '
|
2
|
-
import { comboboxNewConfig } from '
|
1
|
+
import { component, mergeConfig } from '../../../../engines';
|
2
|
+
import { comboboxNewConfig } from '../../../..';
|
3
3
|
import { config } from './Combobox.config';
|
4
4
|
var mergedConfig = /*#__PURE__*/mergeConfig(comboboxNewConfig, config);
|
5
5
|
var Combobox = /*#__PURE__*/component(mergedConfig);
|