@redsift/pickers 11.6.0-muiv5-alpha.6 → 11.6.0-muiv5-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +438 -31
- package/package.json +5 -5
- package/_internal/Combobox.d2.ts +0 -29
- package/_internal/ComboboxContent.d.ts +0 -17
- package/_internal/ComboboxContentFooter.d.ts +0 -9
- package/_internal/ComboboxContentHeader.d.ts +0 -9
- package/_internal/ComboboxContentListbox.d.ts +0 -9
- package/_internal/ComboboxTrigger.d.ts +0 -9
- package/_internal/Item.d2.ts +0 -8
- package/_internal/MenuButton.d.ts +0 -70
- package/_internal/MenuButtonContent.d.ts +0 -17
- package/_internal/MenuButtonContentFooter.d.ts +0 -9
- package/_internal/MenuButtonContentHeader.d.ts +0 -9
- package/_internal/MenuButtonContentMenu.d.ts +0 -9
- package/_internal/MenuButtonTrigger.d.ts +0 -9
- package/_internal/Select.d2.ts +0 -79
- package/_internal/SelectContent.d.ts +0 -9
- package/_internal/SelectTrigger.d.ts +0 -9
- package/_internal/combobox-content-footer.d.ts +0 -4
- package/_internal/combobox-content-header.d.ts +0 -4
- package/_internal/combobox-content-listbox.d.ts +0 -6
- package/_internal/combobox-content.d.ts +0 -9
- package/_internal/combobox-trigger.d.ts +0 -6
- package/_internal/combobox.d.ts +0 -10
- package/_internal/item.d.ts +0 -2
- package/_internal/menu-button-content-footer.d.ts +0 -4
- package/_internal/menu-button-content-header.d.ts +0 -4
- package/_internal/menu-button-content-menu.d.ts +0 -3
- package/_internal/menu-button-content.d.ts +0 -8
- package/_internal/menu-button-trigger.d.ts +0 -5
- package/_internal/menu-button.d.ts +0 -9
- package/_internal/select-content.d.ts +0 -4
- package/_internal/select-trigger.d.ts +0 -5
- package/_internal/select.d.ts +0 -6
- package/_internal/types.d.ts +0 -11
- package/_internal/types.d10.ts +0 -9
- package/_internal/types.d11.ts +0 -15
- package/_internal/types.d12.ts +0 -9
- package/_internal/types.d13.ts +0 -17
- package/_internal/types.d2.ts +0 -11
- package/_internal/types.d3.ts +0 -12
- package/_internal/types.d4.ts +0 -11
- package/_internal/types.d5.ts +0 -27
- package/_internal/types.d6.ts +0 -107
- package/_internal/types.d7.ts +0 -11
- package/_internal/types.d8.ts +0 -11
- package/_internal/types.d9.ts +0 -9
package/index.d.ts
CHANGED
|
@@ -1,32 +1,439 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export { C as ComboboxContentHeaderProps, S as StyledComboboxContentHeaderProps } from './_internal/types.d2.ts';
|
|
4
|
-
export { C as ComboboxContentHeader } from './_internal/ComboboxContentHeader.js';
|
|
5
|
-
export { C as ComboboxContentListboxProps } from './_internal/types.d3.ts';
|
|
6
|
-
export { C as ComboboxContentListbox } from './_internal/ComboboxContentListbox.js';
|
|
7
|
-
export { C as ComboboxContentProps } from './_internal/types.d4.ts';
|
|
8
|
-
export { B as BaseComboboxContent, C as ComboboxContent } from './_internal/ComboboxContent.js';
|
|
9
|
-
export { C as ComboboxTriggerProps } from './_internal/types.d5.ts';
|
|
10
|
-
export { C as ComboboxTrigger } from './_internal/ComboboxTrigger.js';
|
|
11
|
-
export { d as ComboboxProps, C as ComboboxSelectionMode, c as ComboboxState, b as ComboboxValue, a as ComboboxVariant, S as StyledComboboxProps } from './_internal/types.d6.ts';
|
|
12
|
-
export { B as BaseCombobox, C as Combobox } from './_internal/Combobox.d2.ts';
|
|
13
|
-
export { I as Item } from './_internal/Item.d2.ts';
|
|
1
|
+
import * as _redsift_design_system from '@redsift/design-system';
|
|
2
|
+
import { ContainerProps, Comp, ValueOf, TextProps, Theme, FlexboxProps, ListboxContextProps, PillProps, ItemProps, ButtonColor, ButtonVariant, TextFieldVariant } from '@redsift/design-system';
|
|
14
3
|
export { ItemProps } from '@redsift/design-system';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
4
|
+
import React, { ComponentProps, RefObject, ReactElement, ReactNode } from 'react';
|
|
5
|
+
import { PopoverProps, PopoverContentProps, PopoverTriggerProps } from '@redsift/popovers';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Component props.
|
|
9
|
+
*/
|
|
10
|
+
interface ComboboxContentFooterProps extends ComponentProps<'div'>, ContainerProps {
|
|
11
|
+
}
|
|
12
|
+
type StyledComboboxContentFooterProps = ComboboxContentFooterProps & {};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The ComboboxContentFooter component.
|
|
16
|
+
*/
|
|
17
|
+
declare const ComboboxContentFooter: Comp<ComboboxContentFooterProps, HTMLDivElement>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Component props.
|
|
21
|
+
*/
|
|
22
|
+
interface ComboboxContentHeaderProps extends ComponentProps<'div'>, ContainerProps {
|
|
23
|
+
}
|
|
24
|
+
type StyledComboboxContentHeaderProps = ComboboxContentHeaderProps & {};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The ComboboxContentHeader component.
|
|
28
|
+
*/
|
|
29
|
+
declare const ComboboxContentHeader: Comp<ComboboxContentHeaderProps, HTMLDivElement>;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Component variant.
|
|
33
|
+
*/
|
|
34
|
+
declare const ComboboxSelectionMode: {
|
|
35
|
+
readonly single: "single";
|
|
36
|
+
readonly multiple: "multiple";
|
|
37
|
+
};
|
|
38
|
+
type ComboboxSelectionMode = ValueOf<typeof ComboboxSelectionMode>;
|
|
39
|
+
declare const ComboboxVariant: {
|
|
40
|
+
readonly options: "options";
|
|
41
|
+
readonly suggestions: "suggestions";
|
|
42
|
+
};
|
|
43
|
+
type ComboboxVariant = ValueOf<typeof ComboboxVariant>;
|
|
44
|
+
type ComboboxValue = string | string[];
|
|
45
|
+
/**
|
|
46
|
+
* Context props.
|
|
47
|
+
*/
|
|
48
|
+
type ComboboxState = {
|
|
49
|
+
/** Filtering parameters. */
|
|
50
|
+
readonly filter?: {
|
|
51
|
+
type: 'startsWith' | 'contains' | 'endsWith';
|
|
52
|
+
caseSensitive?: boolean;
|
|
53
|
+
};
|
|
54
|
+
/** Whether the combobox is disabled or not. */
|
|
55
|
+
readonly isDisabled: boolean;
|
|
56
|
+
/** Whether the combobox is invalid or not. */
|
|
57
|
+
readonly isInvalid: boolean;
|
|
58
|
+
/** Sets the selected value. */
|
|
59
|
+
setValue(value: ComboboxValue): void;
|
|
60
|
+
/** Current selected value. */
|
|
61
|
+
readonly value: ComboboxValue;
|
|
62
|
+
/** Sets the input value. */
|
|
63
|
+
setInputValue(inputValue: string): void;
|
|
64
|
+
/** Current input value. */
|
|
65
|
+
readonly inputValue: string;
|
|
66
|
+
/** Whether the Combobox allow multiple selection or not. */
|
|
67
|
+
selectionMode?: ComboboxSelectionMode;
|
|
68
|
+
/** If 'options', the input field cannot have free text, the selection has to be made within the options. If 'suggestions', then choosing from the list isn't mandatory and the user can write free text within the input. */
|
|
69
|
+
variant?: ComboboxVariant;
|
|
70
|
+
/** Ref to the first item used to create values. */
|
|
71
|
+
freeTextItemRef?: RefObject<HTMLDivElement>;
|
|
72
|
+
/** Id of the first item used to create values. */
|
|
73
|
+
freeTextItemId?: string;
|
|
74
|
+
/** Class name to append to the trigger. */
|
|
75
|
+
readonly triggerClassName?: string;
|
|
76
|
+
/** Ref to the form, if any. */
|
|
77
|
+
formRef?: RefObject<HTMLFormElement>;
|
|
78
|
+
/** Ref to the submit button, if any. */
|
|
79
|
+
submitRef?: RefObject<HTMLButtonElement>;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Component props.
|
|
83
|
+
*/
|
|
84
|
+
interface ComboboxProps extends PopoverProps {
|
|
85
|
+
/** If 'options', the input field cannot have free text, the selection has to be made within the options. If 'suggestions', then choosing from the list isn't mandatory and the user can write free text within the input. */
|
|
86
|
+
variant?: ComboboxVariant;
|
|
87
|
+
/**
|
|
88
|
+
* Default selected value.
|
|
89
|
+
* Used for uncontrolled version.
|
|
90
|
+
*/
|
|
91
|
+
defaultValue?: ComboboxValue;
|
|
92
|
+
/** Description of the combobox. */
|
|
93
|
+
description?: string | ReactElement;
|
|
94
|
+
/** Additional description properties. */
|
|
95
|
+
descriptionProps?: Omit<TextProps, 'ref'>;
|
|
96
|
+
/** Filtering parameters. */
|
|
97
|
+
filter?: {
|
|
98
|
+
type: 'startsWith' | 'contains' | 'endsWith';
|
|
99
|
+
caseSensitive?: boolean;
|
|
100
|
+
};
|
|
101
|
+
/** Ref to the form, if any. */
|
|
102
|
+
formRef?: RefObject<HTMLFormElement>;
|
|
103
|
+
/** Ref to the submit button, if any. */
|
|
104
|
+
submitRef?: RefObject<HTMLButtonElement>;
|
|
105
|
+
/** Whether the component is disabled or not. */
|
|
106
|
+
isDisabled?: boolean;
|
|
107
|
+
/** Whether the component is invalid or not. */
|
|
108
|
+
isInvalid?: boolean;
|
|
109
|
+
/** Maximum number of options displayed. Useful when too many options are displayed. */
|
|
110
|
+
maxOptionsLength?: number;
|
|
111
|
+
/** Method to handle selection change. */
|
|
112
|
+
onChange?(value: ComboboxValue): void;
|
|
113
|
+
/** Method to handle input change. */
|
|
114
|
+
onInputChange?(value: string): void;
|
|
115
|
+
/**
|
|
116
|
+
* Currently selected value.
|
|
117
|
+
* Used for controlled version.
|
|
118
|
+
*/
|
|
119
|
+
value?: ComboboxValue;
|
|
120
|
+
/** Input value. */
|
|
121
|
+
inputValue?: string;
|
|
122
|
+
/** Whether the Combobox allow multiple selection or not. */
|
|
123
|
+
selectionMode?: ComboboxSelectionMode;
|
|
124
|
+
/** Theme. */
|
|
125
|
+
theme?: Theme;
|
|
126
|
+
/** Class name to append to the trigger. */
|
|
127
|
+
triggerClassName?: string;
|
|
128
|
+
/** Props to forward to the wrapper. */
|
|
129
|
+
wrapperProps?: Omit<FlexboxProps, 'ref'>;
|
|
130
|
+
}
|
|
131
|
+
type StyledComboboxProps = ComboboxProps;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Component props.
|
|
135
|
+
*/
|
|
136
|
+
interface ComboboxContentListboxProps extends FlexboxProps {
|
|
137
|
+
renderFreeTextItem?: ReactNode | ((value?: string, comboboxState?: ComboboxState | null, listboxState?: ListboxContextProps) => ReactNode);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The ComboboxContentListbox component.
|
|
142
|
+
*/
|
|
143
|
+
declare const ComboboxContentListbox: Comp<ComboboxContentListboxProps, HTMLDivElement>;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Component props.
|
|
147
|
+
*/
|
|
148
|
+
interface ComboboxContentProps extends PopoverContentProps {
|
|
149
|
+
/** Whether the popover should stay open even if there is no result after filter. */
|
|
150
|
+
shouldStayOpenEvenIfEmpty?: boolean;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The ComboboxContent component.
|
|
155
|
+
*/
|
|
156
|
+
declare const BaseComboboxContent: Comp<ComboboxContentProps, HTMLDivElement>;
|
|
157
|
+
declare const ComboboxContent: Comp<ComboboxContentProps, HTMLDivElement> & {
|
|
158
|
+
Header: Comp<ComboboxContentHeaderProps, HTMLDivElement>;
|
|
159
|
+
Listbox: Comp<ComboboxContentListboxProps, HTMLDivElement>;
|
|
160
|
+
Footer: Comp<ComboboxContentFooterProps, HTMLDivElement>;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Component props.
|
|
165
|
+
*/
|
|
166
|
+
interface ComboboxTriggerProps extends Omit<PopoverTriggerProps, 'children'> {
|
|
167
|
+
/** Children */
|
|
168
|
+
children: ReactElement | ((state: {
|
|
169
|
+
value?: ComboboxValue;
|
|
170
|
+
isOpen?: boolean;
|
|
171
|
+
}) => ReactElement);
|
|
172
|
+
/** Whether the clear button should be hiding (not recommended) */
|
|
173
|
+
hideClearButton?: boolean;
|
|
174
|
+
/** Whether or not the expand/collapse icon button should be displayed or not. */
|
|
175
|
+
hideExpandButton?: boolean;
|
|
176
|
+
/** Whether the popover should open on focus. */
|
|
177
|
+
openOnFocus?: boolean;
|
|
178
|
+
/** Props to forward to the Pills. */
|
|
179
|
+
pillProps?: Omit<PillProps, 'ref' | 'children'>;
|
|
180
|
+
/** Method used to customize the content of the Button. */
|
|
181
|
+
render?: (value: string) => ReactNode;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The ComboboxTrigger component.
|
|
186
|
+
*/
|
|
187
|
+
declare const ComboboxTrigger: Comp<ComboboxTriggerProps, HTMLButtonElement>;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The Combobox component.
|
|
191
|
+
*/
|
|
192
|
+
declare const BaseCombobox: React.FC<ComboboxProps> & {
|
|
193
|
+
displayName?: string;
|
|
194
|
+
className?: string;
|
|
195
|
+
};
|
|
196
|
+
declare const Combobox: React.FC<ComboboxProps> & {
|
|
197
|
+
displayName?: string | undefined;
|
|
198
|
+
className?: string | undefined;
|
|
199
|
+
} & {
|
|
200
|
+
Trigger: _redsift_design_system.Comp<ComboboxTriggerProps, HTMLButtonElement>;
|
|
201
|
+
Content: _redsift_design_system.Comp<ComboboxContentProps, HTMLDivElement> & {
|
|
202
|
+
Header: _redsift_design_system.Comp<ComboboxContentHeaderProps, HTMLDivElement>;
|
|
203
|
+
Listbox: _redsift_design_system.Comp<ComboboxContentListboxProps, HTMLDivElement>;
|
|
204
|
+
Footer: _redsift_design_system.Comp<ComboboxContentFooterProps, HTMLDivElement>;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The Item component.
|
|
210
|
+
*/
|
|
211
|
+
declare const Item: Comp<ItemProps, HTMLElement>;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Component props.
|
|
215
|
+
*/
|
|
216
|
+
interface MenuButtonContentFooterProps extends ComponentProps<'div'>, ContainerProps {
|
|
217
|
+
}
|
|
218
|
+
type StyledMenuButtonContentFooterProps = MenuButtonContentFooterProps & {};
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The MenuButtonContentFooter component.
|
|
222
|
+
*/
|
|
223
|
+
declare const MenuButtonContentFooter: Comp<MenuButtonContentFooterProps, HTMLDivElement>;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Component props.
|
|
227
|
+
*/
|
|
228
|
+
interface MenuButtonContentHeaderProps extends ComponentProps<'div'>, ContainerProps {
|
|
229
|
+
}
|
|
230
|
+
type StyledMenuButtonContentHeaderProps = MenuButtonContentHeaderProps & {};
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* The MenuButtonContentHeader component.
|
|
234
|
+
*/
|
|
235
|
+
declare const MenuButtonContentHeader: Comp<MenuButtonContentHeaderProps, HTMLDivElement>;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Component props.
|
|
239
|
+
*/
|
|
240
|
+
interface MenuButtonContentMenuProps extends FlexboxProps {
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* The MenuButtonContentMenu component.
|
|
245
|
+
*/
|
|
246
|
+
declare const MenuButtonContentMenu: Comp<MenuButtonContentMenuProps, HTMLDivElement>;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Component props.
|
|
250
|
+
*/
|
|
251
|
+
interface MenuButtonContentProps extends PopoverContentProps {
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* The MenuButtonContent component.
|
|
256
|
+
*/
|
|
257
|
+
declare const BaseMenuButtonContent: Comp<MenuButtonContentProps, HTMLDivElement>;
|
|
258
|
+
declare const MenuButtonContent: Comp<MenuButtonContentProps, HTMLDivElement> & {
|
|
259
|
+
Header: Comp<MenuButtonContentHeaderProps, HTMLDivElement>;
|
|
260
|
+
Menu: Comp<MenuButtonContentMenuProps, HTMLDivElement>;
|
|
261
|
+
Footer: Comp<MenuButtonContentFooterProps, HTMLDivElement>;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Component props.
|
|
266
|
+
*/
|
|
267
|
+
interface MenuButtonTriggerProps extends Omit<PopoverTriggerProps, 'children'> {
|
|
268
|
+
/** Children */
|
|
269
|
+
children: ReactElement | ((state: {
|
|
270
|
+
value?: string;
|
|
271
|
+
isOpen?: boolean;
|
|
272
|
+
}) => ReactElement);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* The MenuButtonTrigger component.
|
|
277
|
+
*/
|
|
278
|
+
declare const MenuButtonTrigger: Comp<MenuButtonTriggerProps, HTMLButtonElement>;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Context props.
|
|
282
|
+
*/
|
|
283
|
+
type MenuButtonState = {
|
|
284
|
+
/** Button color that will be forward to the trigger. */
|
|
285
|
+
readonly color?: ButtonColor;
|
|
286
|
+
/** Whether the trigger is disabled or not. */
|
|
287
|
+
readonly isDisabled: boolean;
|
|
288
|
+
/** Class name to append to the trigger. */
|
|
289
|
+
readonly triggerClassName?: string;
|
|
290
|
+
/** Button variant that will be forward to the trigger. */
|
|
291
|
+
readonly variant?: ButtonVariant;
|
|
292
|
+
};
|
|
293
|
+
/**
|
|
294
|
+
* Component props.
|
|
295
|
+
*/
|
|
296
|
+
interface MenuButtonProps extends PopoverProps {
|
|
297
|
+
/** Button color that will be forward to the trigger. */
|
|
298
|
+
color?: ButtonColor;
|
|
299
|
+
/** Description of the menu button. */
|
|
300
|
+
description?: string | ReactElement;
|
|
301
|
+
/** Additional description properties. */
|
|
302
|
+
descriptionProps?: Omit<TextProps, 'ref'>;
|
|
303
|
+
/** Whether the component is disabled or not. */
|
|
304
|
+
isDisabled?: boolean;
|
|
305
|
+
/** Label of the menu button. */
|
|
306
|
+
label?: string | ReactElement;
|
|
307
|
+
/** Additional label properties. */
|
|
308
|
+
labelProps?: Omit<TextProps, 'ref'>;
|
|
309
|
+
/** Class name to append to the trigger. */
|
|
310
|
+
triggerClassName?: string;
|
|
311
|
+
/** Button variant that will be forward to the trigger. */
|
|
312
|
+
variant?: ButtonVariant;
|
|
313
|
+
/** Theme. */
|
|
314
|
+
theme?: Theme;
|
|
315
|
+
/** Props to forward to the wrapper. */
|
|
316
|
+
wrapperProps?: Omit<FlexboxProps, 'ref'>;
|
|
317
|
+
}
|
|
318
|
+
type StyledMenuButtonProps = MenuButtonProps;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* The MenuButton component.
|
|
322
|
+
*/
|
|
323
|
+
declare const BaseMenuButton: React.FC<MenuButtonProps> & {
|
|
324
|
+
displayName?: string;
|
|
325
|
+
className?: string;
|
|
326
|
+
};
|
|
327
|
+
declare const MenuButton: React.FC<MenuButtonProps> & {
|
|
328
|
+
displayName?: string | undefined;
|
|
329
|
+
className?: string | undefined;
|
|
330
|
+
} & {
|
|
331
|
+
Trigger: _redsift_design_system.Comp<MenuButtonTriggerProps, HTMLButtonElement>;
|
|
332
|
+
Content: _redsift_design_system.Comp<MenuButtonContentProps, HTMLDivElement> & {
|
|
333
|
+
Header: _redsift_design_system.Comp<MenuButtonContentHeaderProps, HTMLDivElement>;
|
|
334
|
+
Menu: _redsift_design_system.Comp<MenuButtonContentMenuProps, HTMLDivElement>;
|
|
335
|
+
Footer: _redsift_design_system.Comp<MenuButtonContentFooterProps, HTMLDivElement>;
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Component props.
|
|
341
|
+
*/
|
|
342
|
+
interface SelectContentProps extends PopoverContentProps {
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* The SelectContent component.
|
|
347
|
+
*/
|
|
348
|
+
declare const SelectContent: Comp<SelectContentProps, HTMLDivElement>;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Component props.
|
|
352
|
+
*/
|
|
353
|
+
interface SelectTriggerProps extends Omit<PopoverTriggerProps, 'children'> {
|
|
354
|
+
/** Children */
|
|
355
|
+
children: ReactElement | ((state: {
|
|
356
|
+
value?: string;
|
|
357
|
+
isOpen?: boolean;
|
|
358
|
+
}) => ReactElement);
|
|
359
|
+
/** Whether or not the expand/collapse icon button should be displayed or not. */
|
|
360
|
+
hideExpandButton?: boolean;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* The SelectTrigger component.
|
|
365
|
+
*/
|
|
366
|
+
declare const SelectTrigger: Comp<SelectTriggerProps, HTMLButtonElement>;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Context props.
|
|
370
|
+
*/
|
|
371
|
+
type SelectState = {
|
|
372
|
+
/** Button color that will be forward to the trigger. */
|
|
373
|
+
readonly color?: ButtonColor;
|
|
374
|
+
/** Whether the select is disabled or not. */
|
|
375
|
+
readonly isDisabled: boolean;
|
|
376
|
+
/** Whether the select is invalid or not. */
|
|
377
|
+
readonly isInvalid: boolean;
|
|
378
|
+
/** Sets the selected value. */
|
|
379
|
+
setValue(value: string): void;
|
|
380
|
+
/** Current selected value. */
|
|
381
|
+
readonly value: string;
|
|
382
|
+
/** Class name to append to the trigger. */
|
|
383
|
+
readonly triggerClassName?: string;
|
|
384
|
+
/** Button variant that will be forward to the trigger. */
|
|
385
|
+
readonly variant?: ButtonVariant | TextFieldVariant;
|
|
386
|
+
};
|
|
387
|
+
/**
|
|
388
|
+
* Component props.
|
|
389
|
+
*/
|
|
390
|
+
interface SelectProps extends PopoverProps {
|
|
391
|
+
/** Button color that will be forward to the trigger. */
|
|
392
|
+
color?: ButtonColor;
|
|
393
|
+
/**
|
|
394
|
+
* Default selected value.
|
|
395
|
+
* Used for uncontrolled version.
|
|
396
|
+
*/
|
|
397
|
+
defaultValue?: string;
|
|
398
|
+
/** Description of the select. */
|
|
399
|
+
description?: string | ReactElement;
|
|
400
|
+
/** Additional description properties. */
|
|
401
|
+
descriptionProps?: Omit<TextProps, 'ref'>;
|
|
402
|
+
/** Whether the component is disabled or not. */
|
|
403
|
+
isDisabled?: boolean;
|
|
404
|
+
/** Whether the component is invalid or not. */
|
|
405
|
+
isInvalid?: boolean;
|
|
406
|
+
/** Method to handle component change. */
|
|
407
|
+
onChange?(value: string): void;
|
|
408
|
+
/**
|
|
409
|
+
* Currently selected value.
|
|
410
|
+
* Used for controlled version.
|
|
411
|
+
*/
|
|
412
|
+
value?: string;
|
|
413
|
+
/** Button variant that will be forward to the trigger. */
|
|
414
|
+
variant?: ButtonVariant | TextFieldVariant;
|
|
415
|
+
/** Theme. */
|
|
416
|
+
theme?: Theme;
|
|
417
|
+
/** Class name to append to the trigger. */
|
|
418
|
+
triggerClassName?: string;
|
|
419
|
+
/** Props to forward to the wrapper. */
|
|
420
|
+
wrapperProps?: Omit<FlexboxProps, 'ref'>;
|
|
421
|
+
}
|
|
422
|
+
type StyledSelectProps = SelectProps;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* The Select component.
|
|
426
|
+
*/
|
|
427
|
+
declare const BaseSelect: React.FC<SelectProps> & {
|
|
428
|
+
displayName?: string;
|
|
429
|
+
className?: string;
|
|
430
|
+
};
|
|
431
|
+
declare const Select: React.FC<SelectProps> & {
|
|
432
|
+
displayName?: string | undefined;
|
|
433
|
+
className?: string | undefined;
|
|
434
|
+
} & {
|
|
435
|
+
Trigger: _redsift_design_system.Comp<SelectTriggerProps, HTMLButtonElement>;
|
|
436
|
+
Content: _redsift_design_system.Comp<SelectContentProps, HTMLDivElement>;
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
export { BaseCombobox, BaseComboboxContent, BaseMenuButton, BaseMenuButtonContent, BaseSelect, Combobox, ComboboxContent, ComboboxContentFooter, ComboboxContentFooterProps, ComboboxContentHeader, ComboboxContentHeaderProps, ComboboxContentListbox, ComboboxContentListboxProps, ComboboxContentProps, ComboboxProps, ComboboxSelectionMode, ComboboxState, ComboboxTrigger, ComboboxTriggerProps, ComboboxValue, ComboboxVariant, Item, MenuButton, MenuButtonContent, MenuButtonContentFooter, MenuButtonContentFooterProps, MenuButtonContentHeader, MenuButtonContentHeaderProps, MenuButtonContentMenu, MenuButtonContentMenuProps, MenuButtonContentProps, MenuButtonProps, MenuButtonState, MenuButtonTrigger, MenuButtonTriggerProps, Select, SelectContent, SelectContentProps, SelectProps, SelectState, SelectTrigger, SelectTriggerProps, StyledComboboxContentFooterProps, StyledComboboxContentHeaderProps, StyledComboboxProps, StyledMenuButtonContentFooterProps, StyledMenuButtonContentHeaderProps, StyledMenuButtonProps, StyledSelectProps };
|
package/package.json
CHANGED
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"test": "yarn test:unit && yarn test:storybook"
|
|
31
31
|
},
|
|
32
32
|
"types": "index.d.ts",
|
|
33
|
-
"version": "11.6.0-muiv5-alpha.
|
|
33
|
+
"version": "11.6.0-muiv5-alpha.8",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@redsift/design-system": "^11.6.0-muiv5-alpha.
|
|
36
|
-
"@redsift/icons": "^11.6.0-muiv5-alpha.
|
|
37
|
-
"@redsift/popovers": "^11.6.0-muiv5-alpha.
|
|
35
|
+
"@redsift/design-system": "^11.6.0-muiv5-alpha.8",
|
|
36
|
+
"@redsift/icons": "^11.6.0-muiv5-alpha.8",
|
|
37
|
+
"@redsift/popovers": "^11.6.0-muiv5-alpha.8",
|
|
38
38
|
"classnames": "^2.3.1",
|
|
39
39
|
"styled-components": "^5.3.5"
|
|
40
40
|
},
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"react-dom": ">=17",
|
|
96
96
|
"styled-components": "^5.3.5"
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "ae1291b7b1536be10c6a15375bec7f0e75b03cbe"
|
|
99
99
|
}
|
package/_internal/Combobox.d2.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { C as ComboboxContentFooterProps } from './types.js';
|
|
2
|
-
import { C as ComboboxContentListboxProps } from './types.d3.ts';
|
|
3
|
-
import { C as ComboboxContentHeaderProps } from './types.d2.ts';
|
|
4
|
-
import { C as ComboboxContentProps } from './types.d4.ts';
|
|
5
|
-
import * as _redsift_design_system from '@redsift/design-system';
|
|
6
|
-
import { C as ComboboxTriggerProps } from './types.d5.ts';
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { d as ComboboxProps } from './types.d6.ts';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* The Combobox component.
|
|
12
|
-
*/
|
|
13
|
-
declare const BaseCombobox: React.FC<ComboboxProps> & {
|
|
14
|
-
displayName?: string;
|
|
15
|
-
className?: string;
|
|
16
|
-
};
|
|
17
|
-
declare const Combobox: React.FC<ComboboxProps> & {
|
|
18
|
-
displayName?: string | undefined;
|
|
19
|
-
className?: string | undefined;
|
|
20
|
-
} & {
|
|
21
|
-
Trigger: _redsift_design_system.Comp<ComboboxTriggerProps, HTMLButtonElement>;
|
|
22
|
-
Content: _redsift_design_system.Comp<ComboboxContentProps, HTMLDivElement> & {
|
|
23
|
-
Header: _redsift_design_system.Comp<ComboboxContentHeaderProps, HTMLDivElement>;
|
|
24
|
-
Listbox: _redsift_design_system.Comp<ComboboxContentListboxProps, HTMLDivElement>;
|
|
25
|
-
Footer: _redsift_design_system.Comp<ComboboxContentFooterProps, HTMLDivElement>;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export { BaseCombobox as B, Combobox as C };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { C as ComboboxContentFooterProps } from './types.js';
|
|
2
|
-
import { C as ComboboxContentListboxProps } from './types.d3.ts';
|
|
3
|
-
import { C as ComboboxContentHeaderProps } from './types.d2.ts';
|
|
4
|
-
import { Comp } from '@redsift/design-system';
|
|
5
|
-
import { C as ComboboxContentProps } from './types.d4.ts';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* The ComboboxContent component.
|
|
9
|
-
*/
|
|
10
|
-
declare const BaseComboboxContent: Comp<ComboboxContentProps, HTMLDivElement>;
|
|
11
|
-
declare const ComboboxContent: Comp<ComboboxContentProps, HTMLDivElement> & {
|
|
12
|
-
Header: Comp<ComboboxContentHeaderProps, HTMLDivElement>;
|
|
13
|
-
Listbox: Comp<ComboboxContentListboxProps, HTMLDivElement>;
|
|
14
|
-
Footer: Comp<ComboboxContentFooterProps, HTMLDivElement>;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { BaseComboboxContent as B, ComboboxContent as C };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { C as ComboboxContentFooterProps } from './types.js';
|
|
2
|
-
import { Comp } from '@redsift/design-system';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The ComboboxContentFooter component.
|
|
6
|
-
*/
|
|
7
|
-
declare const ComboboxContentFooter: Comp<ComboboxContentFooterProps, HTMLDivElement>;
|
|
8
|
-
|
|
9
|
-
export { ComboboxContentFooter as C };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { C as ComboboxContentHeaderProps } from './types.d2.ts';
|
|
2
|
-
import { Comp } from '@redsift/design-system';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The ComboboxContentHeader component.
|
|
6
|
-
*/
|
|
7
|
-
declare const ComboboxContentHeader: Comp<ComboboxContentHeaderProps, HTMLDivElement>;
|
|
8
|
-
|
|
9
|
-
export { ComboboxContentHeader as C };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Comp } from '@redsift/design-system';
|
|
2
|
-
import { C as ComboboxContentListboxProps } from './types.d3.ts';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The ComboboxContentListbox component.
|
|
6
|
-
*/
|
|
7
|
-
declare const ComboboxContentListbox: Comp<ComboboxContentListboxProps, HTMLDivElement>;
|
|
8
|
-
|
|
9
|
-
export { ComboboxContentListbox as C };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Comp } from '@redsift/design-system';
|
|
2
|
-
import { C as ComboboxTriggerProps } from './types.d5.ts';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The ComboboxTrigger component.
|
|
6
|
-
*/
|
|
7
|
-
declare const ComboboxTrigger: Comp<ComboboxTriggerProps, HTMLButtonElement>;
|
|
8
|
-
|
|
9
|
-
export { ComboboxTrigger as C };
|
package/_internal/Item.d2.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { M as MenuButtonContentFooterProps } from './types.d7.ts';
|
|
2
|
-
import { M as MenuButtonContentMenuProps } from './types.d9.ts';
|
|
3
|
-
import { M as MenuButtonContentHeaderProps } from './types.d8.ts';
|
|
4
|
-
import { M as MenuButtonContentProps } from './types.d10.ts';
|
|
5
|
-
import * as _redsift_design_system from '@redsift/design-system';
|
|
6
|
-
import { ButtonColor, ButtonVariant, TextProps, Theme, FlexboxProps } from '@redsift/design-system';
|
|
7
|
-
import { M as MenuButtonTriggerProps } from './types.d11.ts';
|
|
8
|
-
import React, { ReactElement } from 'react';
|
|
9
|
-
import { PopoverProps } from '@redsift/popovers';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Context props.
|
|
13
|
-
*/
|
|
14
|
-
type MenuButtonState = {
|
|
15
|
-
/** Button color that will be forward to the trigger. */
|
|
16
|
-
readonly color?: ButtonColor;
|
|
17
|
-
/** Whether the trigger is disabled or not. */
|
|
18
|
-
readonly isDisabled: boolean;
|
|
19
|
-
/** Class name to append to the trigger. */
|
|
20
|
-
readonly triggerClassName?: string;
|
|
21
|
-
/** Button variant that will be forward to the trigger. */
|
|
22
|
-
readonly variant?: ButtonVariant;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Component props.
|
|
26
|
-
*/
|
|
27
|
-
interface MenuButtonProps extends PopoverProps {
|
|
28
|
-
/** Button color that will be forward to the trigger. */
|
|
29
|
-
color?: ButtonColor;
|
|
30
|
-
/** Description of the menu button. */
|
|
31
|
-
description?: string | ReactElement;
|
|
32
|
-
/** Additional description properties. */
|
|
33
|
-
descriptionProps?: Omit<TextProps, 'ref'>;
|
|
34
|
-
/** Whether the component is disabled or not. */
|
|
35
|
-
isDisabled?: boolean;
|
|
36
|
-
/** Label of the menu button. */
|
|
37
|
-
label?: string | ReactElement;
|
|
38
|
-
/** Additional label properties. */
|
|
39
|
-
labelProps?: Omit<TextProps, 'ref'>;
|
|
40
|
-
/** Class name to append to the trigger. */
|
|
41
|
-
triggerClassName?: string;
|
|
42
|
-
/** Button variant that will be forward to the trigger. */
|
|
43
|
-
variant?: ButtonVariant;
|
|
44
|
-
/** Theme. */
|
|
45
|
-
theme?: Theme;
|
|
46
|
-
/** Props to forward to the wrapper. */
|
|
47
|
-
wrapperProps?: Omit<FlexboxProps, 'ref'>;
|
|
48
|
-
}
|
|
49
|
-
type StyledMenuButtonProps = MenuButtonProps;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* The MenuButton component.
|
|
53
|
-
*/
|
|
54
|
-
declare const BaseMenuButton: React.FC<MenuButtonProps> & {
|
|
55
|
-
displayName?: string;
|
|
56
|
-
className?: string;
|
|
57
|
-
};
|
|
58
|
-
declare const MenuButton: React.FC<MenuButtonProps> & {
|
|
59
|
-
displayName?: string | undefined;
|
|
60
|
-
className?: string | undefined;
|
|
61
|
-
} & {
|
|
62
|
-
Trigger: _redsift_design_system.Comp<MenuButtonTriggerProps, HTMLButtonElement>;
|
|
63
|
-
Content: _redsift_design_system.Comp<MenuButtonContentProps, HTMLDivElement> & {
|
|
64
|
-
Header: _redsift_design_system.Comp<MenuButtonContentHeaderProps, HTMLDivElement>;
|
|
65
|
-
Menu: _redsift_design_system.Comp<MenuButtonContentMenuProps, HTMLDivElement>;
|
|
66
|
-
Footer: _redsift_design_system.Comp<MenuButtonContentFooterProps, HTMLDivElement>;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export { BaseMenuButton as B, MenuButtonState as M, StyledMenuButtonProps as S, MenuButtonProps as a, MenuButton as b };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { M as MenuButtonContentFooterProps } from './types.d7.ts';
|
|
2
|
-
import { M as MenuButtonContentMenuProps } from './types.d9.ts';
|
|
3
|
-
import { M as MenuButtonContentHeaderProps } from './types.d8.ts';
|
|
4
|
-
import { Comp } from '@redsift/design-system';
|
|
5
|
-
import { M as MenuButtonContentProps } from './types.d10.ts';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* The MenuButtonContent component.
|
|
9
|
-
*/
|
|
10
|
-
declare const BaseMenuButtonContent: Comp<MenuButtonContentProps, HTMLDivElement>;
|
|
11
|
-
declare const MenuButtonContent: Comp<MenuButtonContentProps, HTMLDivElement> & {
|
|
12
|
-
Header: Comp<MenuButtonContentHeaderProps, HTMLDivElement>;
|
|
13
|
-
Menu: Comp<MenuButtonContentMenuProps, HTMLDivElement>;
|
|
14
|
-
Footer: Comp<MenuButtonContentFooterProps, HTMLDivElement>;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { BaseMenuButtonContent as B, MenuButtonContent as M };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { M as MenuButtonContentFooterProps } from './types.d7.ts';
|
|
2
|
-
import { Comp } from '@redsift/design-system';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The MenuButtonContentFooter component.
|
|
6
|
-
*/
|
|
7
|
-
declare const MenuButtonContentFooter: Comp<MenuButtonContentFooterProps, HTMLDivElement>;
|
|
8
|
-
|
|
9
|
-
export { MenuButtonContentFooter as M };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { M as MenuButtonContentHeaderProps } from './types.d8.ts';
|
|
2
|
-
import { Comp } from '@redsift/design-system';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The MenuButtonContentHeader component.
|
|
6
|
-
*/
|
|
7
|
-
declare const MenuButtonContentHeader: Comp<MenuButtonContentHeaderProps, HTMLDivElement>;
|
|
8
|
-
|
|
9
|
-
export { MenuButtonContentHeader as M };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Comp } from '@redsift/design-system';
|
|
2
|
-
import { M as MenuButtonContentMenuProps } from './types.d9.ts';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The MenuButtonContentMenu component.
|
|
6
|
-
*/
|
|
7
|
-
declare const MenuButtonContentMenu: Comp<MenuButtonContentMenuProps, HTMLDivElement>;
|
|
8
|
-
|
|
9
|
-
export { MenuButtonContentMenu as M };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Comp } from '@redsift/design-system';
|
|
2
|
-
import { M as MenuButtonTriggerProps } from './types.d11.ts';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The MenuButtonTrigger component.
|
|
6
|
-
*/
|
|
7
|
-
declare const MenuButtonTrigger: Comp<MenuButtonTriggerProps, HTMLButtonElement>;
|
|
8
|
-
|
|
9
|
-
export { MenuButtonTrigger as M };
|
package/_internal/Select.d2.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { S as SelectContentProps } from './types.d12.ts';
|
|
2
|
-
import * as _redsift_design_system from '@redsift/design-system';
|
|
3
|
-
import { ButtonColor, ButtonVariant, TextFieldVariant, TextProps, Theme, FlexboxProps } from '@redsift/design-system';
|
|
4
|
-
import { S as SelectTriggerProps } from './types.d13.ts';
|
|
5
|
-
import React, { ReactElement } from 'react';
|
|
6
|
-
import { PopoverProps } from '@redsift/popovers';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Context props.
|
|
10
|
-
*/
|
|
11
|
-
type SelectState = {
|
|
12
|
-
/** Button color that will be forward to the trigger. */
|
|
13
|
-
readonly color?: ButtonColor;
|
|
14
|
-
/** Whether the select is disabled or not. */
|
|
15
|
-
readonly isDisabled: boolean;
|
|
16
|
-
/** Whether the select is invalid or not. */
|
|
17
|
-
readonly isInvalid: boolean;
|
|
18
|
-
/** Sets the selected value. */
|
|
19
|
-
setValue(value: string): void;
|
|
20
|
-
/** Current selected value. */
|
|
21
|
-
readonly value: string;
|
|
22
|
-
/** Class name to append to the trigger. */
|
|
23
|
-
readonly triggerClassName?: string;
|
|
24
|
-
/** Button variant that will be forward to the trigger. */
|
|
25
|
-
readonly variant?: ButtonVariant | TextFieldVariant;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Component props.
|
|
29
|
-
*/
|
|
30
|
-
interface SelectProps extends PopoverProps {
|
|
31
|
-
/** Button color that will be forward to the trigger. */
|
|
32
|
-
color?: ButtonColor;
|
|
33
|
-
/**
|
|
34
|
-
* Default selected value.
|
|
35
|
-
* Used for uncontrolled version.
|
|
36
|
-
*/
|
|
37
|
-
defaultValue?: string;
|
|
38
|
-
/** Description of the select. */
|
|
39
|
-
description?: string | ReactElement;
|
|
40
|
-
/** Additional description properties. */
|
|
41
|
-
descriptionProps?: Omit<TextProps, 'ref'>;
|
|
42
|
-
/** Whether the component is disabled or not. */
|
|
43
|
-
isDisabled?: boolean;
|
|
44
|
-
/** Whether the component is invalid or not. */
|
|
45
|
-
isInvalid?: boolean;
|
|
46
|
-
/** Method to handle component change. */
|
|
47
|
-
onChange?(value: string): void;
|
|
48
|
-
/**
|
|
49
|
-
* Currently selected value.
|
|
50
|
-
* Used for controlled version.
|
|
51
|
-
*/
|
|
52
|
-
value?: string;
|
|
53
|
-
/** Button variant that will be forward to the trigger. */
|
|
54
|
-
variant?: ButtonVariant | TextFieldVariant;
|
|
55
|
-
/** Theme. */
|
|
56
|
-
theme?: Theme;
|
|
57
|
-
/** Class name to append to the trigger. */
|
|
58
|
-
triggerClassName?: string;
|
|
59
|
-
/** Props to forward to the wrapper. */
|
|
60
|
-
wrapperProps?: Omit<FlexboxProps, 'ref'>;
|
|
61
|
-
}
|
|
62
|
-
type StyledSelectProps = SelectProps;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* The Select component.
|
|
66
|
-
*/
|
|
67
|
-
declare const BaseSelect: React.FC<SelectProps> & {
|
|
68
|
-
displayName?: string;
|
|
69
|
-
className?: string;
|
|
70
|
-
};
|
|
71
|
-
declare const Select: React.FC<SelectProps> & {
|
|
72
|
-
displayName?: string | undefined;
|
|
73
|
-
className?: string | undefined;
|
|
74
|
-
} & {
|
|
75
|
-
Trigger: _redsift_design_system.Comp<SelectTriggerProps, HTMLButtonElement>;
|
|
76
|
-
Content: _redsift_design_system.Comp<SelectContentProps, HTMLDivElement>;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export { BaseSelect as B, SelectState as S, SelectProps as a, StyledSelectProps as b, Select as c };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { C as ComboboxContentProps } from './types.d4.ts';
|
|
2
|
-
export { B as BaseComboboxContent, C as ComboboxContent } from './ComboboxContent.js';
|
|
3
|
-
import '@redsift/popovers';
|
|
4
|
-
import './types.js';
|
|
5
|
-
import '@redsift/design-system';
|
|
6
|
-
import 'react';
|
|
7
|
-
import './types.d3.ts';
|
|
8
|
-
import './types.d6.ts';
|
|
9
|
-
import './types.d2.ts';
|
package/_internal/combobox.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { d as ComboboxProps, C as ComboboxSelectionMode, c as ComboboxState, b as ComboboxValue, a as ComboboxVariant, S as StyledComboboxProps } from './types.d6.ts';
|
|
2
|
-
export { B as BaseCombobox, C as Combobox } from './Combobox.d2.ts';
|
|
3
|
-
import '@redsift/design-system';
|
|
4
|
-
import '@redsift/popovers';
|
|
5
|
-
import 'react';
|
|
6
|
-
import './types.js';
|
|
7
|
-
import './types.d3.ts';
|
|
8
|
-
import './types.d2.ts';
|
|
9
|
-
import './types.d4.ts';
|
|
10
|
-
import './types.d5.ts';
|
package/_internal/item.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { M as MenuButtonContentProps } from './types.d10.ts';
|
|
2
|
-
export { B as BaseMenuButtonContent, M as MenuButtonContent } from './MenuButtonContent.js';
|
|
3
|
-
import '@redsift/popovers';
|
|
4
|
-
import './types.d7.ts';
|
|
5
|
-
import '@redsift/design-system';
|
|
6
|
-
import 'react';
|
|
7
|
-
import './types.d9.ts';
|
|
8
|
-
import './types.d8.ts';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { B as BaseMenuButton, b as MenuButton, a as MenuButtonProps, M as MenuButtonState, S as StyledMenuButtonProps } from './MenuButton.js';
|
|
2
|
-
import './types.d7.ts';
|
|
3
|
-
import '@redsift/design-system';
|
|
4
|
-
import 'react';
|
|
5
|
-
import './types.d9.ts';
|
|
6
|
-
import './types.d8.ts';
|
|
7
|
-
import './types.d10.ts';
|
|
8
|
-
import '@redsift/popovers';
|
|
9
|
-
import './types.d11.ts';
|
package/_internal/select.d.ts
DELETED
package/_internal/types.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ContainerProps } from '@redsift/design-system';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Component props.
|
|
6
|
-
*/
|
|
7
|
-
interface ComboboxContentFooterProps extends ComponentProps<'div'>, ContainerProps {
|
|
8
|
-
}
|
|
9
|
-
type StyledComboboxContentFooterProps = ComboboxContentFooterProps & {};
|
|
10
|
-
|
|
11
|
-
export { ComboboxContentFooterProps as C, StyledComboboxContentFooterProps as S };
|
package/_internal/types.d10.ts
DELETED
package/_internal/types.d11.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PopoverTriggerProps } from '@redsift/popovers';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Component props.
|
|
6
|
-
*/
|
|
7
|
-
interface MenuButtonTriggerProps extends Omit<PopoverTriggerProps, 'children'> {
|
|
8
|
-
/** Children */
|
|
9
|
-
children: ReactElement | ((state: {
|
|
10
|
-
value?: string;
|
|
11
|
-
isOpen?: boolean;
|
|
12
|
-
}) => ReactElement);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { MenuButtonTriggerProps as M };
|
package/_internal/types.d12.ts
DELETED
package/_internal/types.d13.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PopoverTriggerProps } from '@redsift/popovers';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Component props.
|
|
6
|
-
*/
|
|
7
|
-
interface SelectTriggerProps extends Omit<PopoverTriggerProps, 'children'> {
|
|
8
|
-
/** Children */
|
|
9
|
-
children: ReactElement | ((state: {
|
|
10
|
-
value?: string;
|
|
11
|
-
isOpen?: boolean;
|
|
12
|
-
}) => ReactElement);
|
|
13
|
-
/** Whether or not the expand/collapse icon button should be displayed or not. */
|
|
14
|
-
hideExpandButton?: boolean;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { SelectTriggerProps as S };
|
package/_internal/types.d2.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ContainerProps } from '@redsift/design-system';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Component props.
|
|
6
|
-
*/
|
|
7
|
-
interface ComboboxContentHeaderProps extends ComponentProps<'div'>, ContainerProps {
|
|
8
|
-
}
|
|
9
|
-
type StyledComboboxContentHeaderProps = ComboboxContentHeaderProps & {};
|
|
10
|
-
|
|
11
|
-
export { ComboboxContentHeaderProps as C, StyledComboboxContentHeaderProps as S };
|
package/_internal/types.d3.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { FlexboxProps, ListboxContextProps } from '@redsift/design-system';
|
|
3
|
-
import { c as ComboboxState } from './types.d6.ts';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Component props.
|
|
7
|
-
*/
|
|
8
|
-
interface ComboboxContentListboxProps extends FlexboxProps {
|
|
9
|
-
renderFreeTextItem?: ReactNode | ((value?: string, comboboxState?: ComboboxState | null, listboxState?: ListboxContextProps) => ReactNode);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { ComboboxContentListboxProps as C };
|
package/_internal/types.d4.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PopoverContentProps } from '@redsift/popovers';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Component props.
|
|
5
|
-
*/
|
|
6
|
-
interface ComboboxContentProps extends PopoverContentProps {
|
|
7
|
-
/** Whether the popover should stay open even if there is no result after filter. */
|
|
8
|
-
shouldStayOpenEvenIfEmpty?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { ComboboxContentProps as C };
|
package/_internal/types.d5.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { PopoverTriggerProps } from '@redsift/popovers';
|
|
2
|
-
import { ReactElement, ReactNode } from 'react';
|
|
3
|
-
import { b as ComboboxValue } from './types.d6.ts';
|
|
4
|
-
import { PillProps } from '@redsift/design-system';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Component props.
|
|
8
|
-
*/
|
|
9
|
-
interface ComboboxTriggerProps extends Omit<PopoverTriggerProps, 'children'> {
|
|
10
|
-
/** Children */
|
|
11
|
-
children: ReactElement | ((state: {
|
|
12
|
-
value?: ComboboxValue;
|
|
13
|
-
isOpen?: boolean;
|
|
14
|
-
}) => ReactElement);
|
|
15
|
-
/** Whether the clear button should be hiding (not recommended) */
|
|
16
|
-
hideClearButton?: boolean;
|
|
17
|
-
/** Whether or not the expand/collapse icon button should be displayed or not. */
|
|
18
|
-
hideExpandButton?: boolean;
|
|
19
|
-
/** Whether the popover should open on focus. */
|
|
20
|
-
openOnFocus?: boolean;
|
|
21
|
-
/** Props to forward to the Pills. */
|
|
22
|
-
pillProps?: Omit<PillProps, 'ref' | 'children'>;
|
|
23
|
-
/** Method used to customize the content of the Button. */
|
|
24
|
-
render?: (value: string) => ReactNode;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { ComboboxTriggerProps as C };
|
package/_internal/types.d6.ts
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { ValueOf, TextProps, Theme, FlexboxProps } from '@redsift/design-system';
|
|
2
|
-
import { PopoverProps } from '@redsift/popovers';
|
|
3
|
-
import { RefObject, ReactElement } from 'react';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Component variant.
|
|
7
|
-
*/
|
|
8
|
-
declare const ComboboxSelectionMode: {
|
|
9
|
-
readonly single: "single";
|
|
10
|
-
readonly multiple: "multiple";
|
|
11
|
-
};
|
|
12
|
-
type ComboboxSelectionMode = ValueOf<typeof ComboboxSelectionMode>;
|
|
13
|
-
declare const ComboboxVariant: {
|
|
14
|
-
readonly options: "options";
|
|
15
|
-
readonly suggestions: "suggestions";
|
|
16
|
-
};
|
|
17
|
-
type ComboboxVariant = ValueOf<typeof ComboboxVariant>;
|
|
18
|
-
type ComboboxValue = string | string[];
|
|
19
|
-
/**
|
|
20
|
-
* Context props.
|
|
21
|
-
*/
|
|
22
|
-
type ComboboxState = {
|
|
23
|
-
/** Filtering parameters. */
|
|
24
|
-
readonly filter?: {
|
|
25
|
-
type: 'startsWith' | 'contains' | 'endsWith';
|
|
26
|
-
caseSensitive?: boolean;
|
|
27
|
-
};
|
|
28
|
-
/** Whether the combobox is disabled or not. */
|
|
29
|
-
readonly isDisabled: boolean;
|
|
30
|
-
/** Whether the combobox is invalid or not. */
|
|
31
|
-
readonly isInvalid: boolean;
|
|
32
|
-
/** Sets the selected value. */
|
|
33
|
-
setValue(value: ComboboxValue): void;
|
|
34
|
-
/** Current selected value. */
|
|
35
|
-
readonly value: ComboboxValue;
|
|
36
|
-
/** Sets the input value. */
|
|
37
|
-
setInputValue(inputValue: string): void;
|
|
38
|
-
/** Current input value. */
|
|
39
|
-
readonly inputValue: string;
|
|
40
|
-
/** Whether the Combobox allow multiple selection or not. */
|
|
41
|
-
selectionMode?: ComboboxSelectionMode;
|
|
42
|
-
/** If 'options', the input field cannot have free text, the selection has to be made within the options. If 'suggestions', then choosing from the list isn't mandatory and the user can write free text within the input. */
|
|
43
|
-
variant?: ComboboxVariant;
|
|
44
|
-
/** Ref to the first item used to create values. */
|
|
45
|
-
freeTextItemRef?: RefObject<HTMLDivElement>;
|
|
46
|
-
/** Id of the first item used to create values. */
|
|
47
|
-
freeTextItemId?: string;
|
|
48
|
-
/** Class name to append to the trigger. */
|
|
49
|
-
readonly triggerClassName?: string;
|
|
50
|
-
/** Ref to the form, if any. */
|
|
51
|
-
formRef?: RefObject<HTMLFormElement>;
|
|
52
|
-
/** Ref to the submit button, if any. */
|
|
53
|
-
submitRef?: RefObject<HTMLButtonElement>;
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Component props.
|
|
57
|
-
*/
|
|
58
|
-
interface ComboboxProps extends PopoverProps {
|
|
59
|
-
/** If 'options', the input field cannot have free text, the selection has to be made within the options. If 'suggestions', then choosing from the list isn't mandatory and the user can write free text within the input. */
|
|
60
|
-
variant?: ComboboxVariant;
|
|
61
|
-
/**
|
|
62
|
-
* Default selected value.
|
|
63
|
-
* Used for uncontrolled version.
|
|
64
|
-
*/
|
|
65
|
-
defaultValue?: ComboboxValue;
|
|
66
|
-
/** Description of the combobox. */
|
|
67
|
-
description?: string | ReactElement;
|
|
68
|
-
/** Additional description properties. */
|
|
69
|
-
descriptionProps?: Omit<TextProps, 'ref'>;
|
|
70
|
-
/** Filtering parameters. */
|
|
71
|
-
filter?: {
|
|
72
|
-
type: 'startsWith' | 'contains' | 'endsWith';
|
|
73
|
-
caseSensitive?: boolean;
|
|
74
|
-
};
|
|
75
|
-
/** Ref to the form, if any. */
|
|
76
|
-
formRef?: RefObject<HTMLFormElement>;
|
|
77
|
-
/** Ref to the submit button, if any. */
|
|
78
|
-
submitRef?: RefObject<HTMLButtonElement>;
|
|
79
|
-
/** Whether the component is disabled or not. */
|
|
80
|
-
isDisabled?: boolean;
|
|
81
|
-
/** Whether the component is invalid or not. */
|
|
82
|
-
isInvalid?: boolean;
|
|
83
|
-
/** Maximum number of options displayed. Useful when too many options are displayed. */
|
|
84
|
-
maxOptionsLength?: number;
|
|
85
|
-
/** Method to handle selection change. */
|
|
86
|
-
onChange?(value: ComboboxValue): void;
|
|
87
|
-
/** Method to handle input change. */
|
|
88
|
-
onInputChange?(value: string): void;
|
|
89
|
-
/**
|
|
90
|
-
* Currently selected value.
|
|
91
|
-
* Used for controlled version.
|
|
92
|
-
*/
|
|
93
|
-
value?: ComboboxValue;
|
|
94
|
-
/** Input value. */
|
|
95
|
-
inputValue?: string;
|
|
96
|
-
/** Whether the Combobox allow multiple selection or not. */
|
|
97
|
-
selectionMode?: ComboboxSelectionMode;
|
|
98
|
-
/** Theme. */
|
|
99
|
-
theme?: Theme;
|
|
100
|
-
/** Class name to append to the trigger. */
|
|
101
|
-
triggerClassName?: string;
|
|
102
|
-
/** Props to forward to the wrapper. */
|
|
103
|
-
wrapperProps?: Omit<FlexboxProps, 'ref'>;
|
|
104
|
-
}
|
|
105
|
-
type StyledComboboxProps = ComboboxProps;
|
|
106
|
-
|
|
107
|
-
export { ComboboxSelectionMode as C, StyledComboboxProps as S, ComboboxVariant as a, ComboboxValue as b, ComboboxState as c, ComboboxProps as d };
|
package/_internal/types.d7.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ContainerProps } from '@redsift/design-system';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Component props.
|
|
6
|
-
*/
|
|
7
|
-
interface MenuButtonContentFooterProps extends ComponentProps<'div'>, ContainerProps {
|
|
8
|
-
}
|
|
9
|
-
type StyledMenuButtonContentFooterProps = MenuButtonContentFooterProps & {};
|
|
10
|
-
|
|
11
|
-
export { MenuButtonContentFooterProps as M, StyledMenuButtonContentFooterProps as S };
|
package/_internal/types.d8.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ContainerProps } from '@redsift/design-system';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Component props.
|
|
6
|
-
*/
|
|
7
|
-
interface MenuButtonContentHeaderProps extends ComponentProps<'div'>, ContainerProps {
|
|
8
|
-
}
|
|
9
|
-
type StyledMenuButtonContentHeaderProps = MenuButtonContentHeaderProps & {};
|
|
10
|
-
|
|
11
|
-
export { MenuButtonContentHeaderProps as M, StyledMenuButtonContentHeaderProps as S };
|