@redsift/pickers 10.3.0-alpha.1 → 10.3.0-alpha.11

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/CONTRIBUTING.md CHANGED
@@ -58,6 +58,10 @@ The Design System is following a monorepo architecture, providing multiple packa
58
58
 
59
59
  This package provides dashboard-related components and decorators to make charts and datagrid filterable using [crossfilter](https://crossfilter.github.io/crossfilter/).
60
60
 
61
+ - `@redsift/products`
62
+
63
+ This package provides ready-to-use implementation of components with a customize style to fit Red Sift's use cases. It is based on all other packages.
64
+
61
65
  - _Deprecated_ `@redsift/design-system-legacy`
62
66
 
63
67
  This package contains all components prior to the 6.0.0 version. These components are deprecated and contributing to this package is discouraged since it will be removed in the future.
@@ -133,9 +137,6 @@ import { BadgeProps } from './types';
133
137
 
134
138
  const COMPONENT_NAME = 'Badge';
135
139
  const CLASSNAME = 'redsift-badge';
136
- const DEFAULT_PROPS: Partial<BadgeProps> = {
137
- // default values
138
- };
139
140
 
140
141
  /**
141
142
  * The Badge component.
@@ -158,7 +159,6 @@ export const Badge: Comp<BadgeProps, HTMLDivElement> = forwardRef((props, ref) =
158
159
  );
159
160
  });
160
161
  Badge.className = CLASSNAME;
161
- Badge.defaultProps = DEFAULT_PROPS;
162
162
  Badge.displayName = COMPONENT_NAME;
163
163
  ```
164
164
 
package/index.d.ts CHANGED
@@ -1,7 +1,32 @@
1
1
  import * as _redsift_design_system from '@redsift/design-system';
2
- import { ValueOf, TextProps, Theme, FlexboxProps, ContainerProps, Comp, ListboxContextProps, ButtonColor, ButtonVariant, TextFieldVariant } from '@redsift/design-system';
2
+ import { ContainerProps, Comp, ValueOf, TextProps, Theme, FlexboxProps, ListboxContextProps, ItemProps, ButtonColor, ButtonVariant, TextFieldVariant } from '@redsift/design-system';
3
+ export { ItemColor, ItemProps, StyledItem, StyledItemProps } from '@redsift/design-system';
4
+ import React, { ComponentProps, RefObject, ReactElement, ReactNode } from 'react';
3
5
  import { PopoverProps, PopoverContentProps, PopoverTriggerProps } from '@redsift/popovers';
4
- import React, { RefObject, ReactElement, ComponentProps, ReactNode } from 'react';
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>;
5
30
 
6
31
  /**
7
32
  * Component variant.
@@ -48,6 +73,10 @@ type ComboboxState = {
48
73
  freeTextItemId?: string;
49
74
  /** Class name to append to the trigger. */
50
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>;
51
80
  };
52
81
  /**
53
82
  * Component props.
@@ -69,6 +98,10 @@ interface ComboboxProps extends PopoverProps {
69
98
  type: 'startsWith' | 'contains' | 'endsWith';
70
99
  caseSensitive?: boolean;
71
100
  };
101
+ /** Ref to the form, if any. */
102
+ formRef?: RefObject<HTMLFormElement>;
103
+ /** Ref to the submit button, if any. */
104
+ submitRef?: RefObject<HTMLButtonElement>;
72
105
  /** Whether the component is disabled or not. */
73
106
  isDisabled?: boolean;
74
107
  /** Whether the component is invalid or not. */
@@ -97,18 +130,6 @@ interface ComboboxProps extends PopoverProps {
97
130
  }
98
131
  type StyledComboboxProps = ComboboxProps;
99
132
 
100
- /**
101
- * Component props.
102
- */
103
- interface ComboboxContentFooterProps extends ComponentProps<'div'>, ContainerProps {
104
- }
105
- type StyledComboboxContentFooterProps = ComboboxContentFooterProps & {};
106
-
107
- /**
108
- * The ComboboxContentFooter component.
109
- */
110
- declare const ComboboxContentFooter: Comp<ComboboxContentFooterProps, HTMLDivElement>;
111
-
112
133
  /**
113
134
  * Component props.
114
135
  */
@@ -121,18 +142,6 @@ interface ComboboxContentListboxProps extends FlexboxProps {
121
142
  */
122
143
  declare const ComboboxContentListbox: Comp<ComboboxContentListboxProps, HTMLDivElement>;
123
144
 
124
- /**
125
- * Component props.
126
- */
127
- interface ComboboxContentHeaderProps extends ComponentProps<'div'>, ContainerProps {
128
- }
129
- type StyledComboboxContentHeaderProps = ComboboxContentHeaderProps & {};
130
-
131
- /**
132
- * The ComboboxContentHeader component.
133
- */
134
- declare const ComboboxContentHeader: Comp<ComboboxContentHeaderProps, HTMLDivElement>;
135
-
136
145
  /**
137
146
  * Component props.
138
147
  */
@@ -194,6 +203,78 @@ declare const Combobox: React.FC<ComboboxProps> & {
194
203
  };
195
204
  };
196
205
 
206
+ /**
207
+ * The Item component.
208
+ */
209
+ declare const Item: Comp<ItemProps, HTMLElement>;
210
+
211
+ /**
212
+ * Component props.
213
+ */
214
+ interface MenuButtonContentFooterProps extends ComponentProps<'div'>, ContainerProps {
215
+ }
216
+ type StyledMenuButtonContentFooterProps = MenuButtonContentFooterProps & {};
217
+
218
+ /**
219
+ * The MenuButtonContentFooter component.
220
+ */
221
+ declare const MenuButtonContentFooter: Comp<MenuButtonContentFooterProps, HTMLDivElement>;
222
+
223
+ /**
224
+ * Component props.
225
+ */
226
+ interface MenuButtonContentHeaderProps extends ComponentProps<'div'>, ContainerProps {
227
+ }
228
+ type StyledMenuButtonContentHeaderProps = MenuButtonContentHeaderProps & {};
229
+
230
+ /**
231
+ * The MenuButtonContentHeader component.
232
+ */
233
+ declare const MenuButtonContentHeader: Comp<MenuButtonContentHeaderProps, HTMLDivElement>;
234
+
235
+ /**
236
+ * Component props.
237
+ */
238
+ interface MenuButtonContentMenuProps extends FlexboxProps {
239
+ }
240
+
241
+ /**
242
+ * The MenuButtonContentMenu component.
243
+ */
244
+ declare const MenuButtonContentMenu: Comp<MenuButtonContentMenuProps, HTMLDivElement>;
245
+
246
+ /**
247
+ * Component props.
248
+ */
249
+ interface MenuButtonContentProps extends PopoverContentProps {
250
+ }
251
+
252
+ /**
253
+ * The MenuButtonContent component.
254
+ */
255
+ declare const BaseMenuButtonContent: Comp<MenuButtonContentProps, HTMLDivElement>;
256
+ declare const MenuButtonContent: Comp<MenuButtonContentProps, HTMLDivElement> & {
257
+ Header: Comp<MenuButtonContentHeaderProps, HTMLDivElement>;
258
+ Menu: Comp<MenuButtonContentMenuProps, HTMLDivElement>;
259
+ Footer: Comp<MenuButtonContentFooterProps, HTMLDivElement>;
260
+ };
261
+
262
+ /**
263
+ * Component props.
264
+ */
265
+ interface MenuButtonTriggerProps extends Omit<PopoverTriggerProps, 'children'> {
266
+ /** Children */
267
+ children: ReactElement | ((state: {
268
+ value?: string;
269
+ isOpen?: boolean;
270
+ }) => ReactElement);
271
+ }
272
+
273
+ /**
274
+ * The MenuButtonTrigger component.
275
+ */
276
+ declare const MenuButtonTrigger: Comp<MenuButtonTriggerProps, HTMLButtonElement>;
277
+
197
278
  /**
198
279
  * Context props.
199
280
  */
@@ -234,47 +315,53 @@ interface MenuButtonProps extends PopoverProps {
234
315
  }
235
316
  type StyledMenuButtonProps = MenuButtonProps;
236
317
 
318
+ /**
319
+ * The MenuButton component.
320
+ */
321
+ declare const BaseMenuButton: React.FC<MenuButtonProps> & {
322
+ displayName?: string;
323
+ className?: string;
324
+ };
325
+ declare const MenuButton: React.FC<MenuButtonProps> & {
326
+ displayName?: string | undefined;
327
+ className?: string | undefined;
328
+ } & {
329
+ Trigger: _redsift_design_system.Comp<MenuButtonTriggerProps, HTMLButtonElement>;
330
+ Content: _redsift_design_system.Comp<MenuButtonContentProps, HTMLDivElement> & {
331
+ Header: _redsift_design_system.Comp<MenuButtonContentHeaderProps, HTMLDivElement>;
332
+ Menu: _redsift_design_system.Comp<MenuButtonContentMenuProps, HTMLDivElement>;
333
+ Footer: _redsift_design_system.Comp<MenuButtonContentFooterProps, HTMLDivElement>;
334
+ };
335
+ };
336
+
237
337
  /**
238
338
  * Component props.
239
339
  */
240
- interface MenuButtonContentProps extends PopoverContentProps {
340
+ interface SelectContentProps extends PopoverContentProps {
241
341
  }
242
342
 
243
343
  /**
244
- * The MenuButtonContent component.
344
+ * The SelectContent component.
245
345
  */
246
- declare const MenuButtonContent: Comp<MenuButtonContentProps, HTMLDivElement>;
346
+ declare const SelectContent: Comp<SelectContentProps, HTMLDivElement>;
247
347
 
248
348
  /**
249
349
  * Component props.
250
350
  */
251
- interface MenuButtonTriggerProps extends Omit<PopoverTriggerProps, 'children'> {
351
+ interface SelectTriggerProps extends Omit<PopoverTriggerProps, 'children'> {
252
352
  /** Children */
253
353
  children: ReactElement | ((state: {
254
354
  value?: string;
255
355
  isOpen?: boolean;
256
356
  }) => ReactElement);
357
+ /** Whether or not the expand/collapse icon button should be displayed or not. */
358
+ hideExpandButton?: boolean;
257
359
  }
258
360
 
259
361
  /**
260
- * The MenuButtonTrigger component.
261
- */
262
- declare const MenuButtonTrigger: Comp<MenuButtonTriggerProps, HTMLButtonElement>;
263
-
264
- /**
265
- * The MenuButton component.
362
+ * The SelectTrigger component.
266
363
  */
267
- declare const BaseMenuButton: React.FC<MenuButtonProps> & {
268
- displayName?: string;
269
- className?: string;
270
- };
271
- declare const MenuButton: React.FC<MenuButtonProps> & {
272
- displayName?: string | undefined;
273
- className?: string | undefined;
274
- } & {
275
- Trigger: _redsift_design_system.Comp<MenuButtonTriggerProps, HTMLButtonElement>;
276
- Content: _redsift_design_system.Comp<MenuButtonContentProps, HTMLDivElement>;
277
- };
364
+ declare const SelectTrigger: Comp<SelectTriggerProps, HTMLButtonElement>;
278
365
 
279
366
  /**
280
367
  * Context props.
@@ -332,35 +419,6 @@ interface SelectProps extends PopoverProps {
332
419
  }
333
420
  type StyledSelectProps = SelectProps;
334
421
 
335
- /**
336
- * Component props.
337
- */
338
- interface SelectContentProps extends PopoverContentProps {
339
- }
340
-
341
- /**
342
- * The SelectContent component.
343
- */
344
- declare const SelectContent: Comp<SelectContentProps, HTMLDivElement>;
345
-
346
- /**
347
- * Component props.
348
- */
349
- interface SelectTriggerProps extends Omit<PopoverTriggerProps, 'children'> {
350
- /** Children */
351
- children: ReactElement | ((state: {
352
- value?: string;
353
- isOpen?: boolean;
354
- }) => ReactElement);
355
- /** Whether or not the expand/collapse icon button should be displayed or not. */
356
- hideExpandButton?: boolean;
357
- }
358
-
359
- /**
360
- * The SelectTrigger component.
361
- */
362
- declare const SelectTrigger: Comp<SelectTriggerProps, HTMLButtonElement>;
363
-
364
422
  /**
365
423
  * The Select component.
366
424
  */
@@ -376,4 +434,4 @@ declare const Select: React.FC<SelectProps> & {
376
434
  Content: _redsift_design_system.Comp<SelectContentProps, HTMLDivElement>;
377
435
  };
378
436
 
379
- export { BaseCombobox, BaseComboboxContent, BaseMenuButton, BaseSelect, Combobox, ComboboxContent, ComboboxContentFooter, ComboboxContentFooterProps, ComboboxContentHeader, ComboboxContentHeaderProps, ComboboxContentListbox, ComboboxContentListboxProps, ComboboxContentProps, ComboboxProps, ComboboxSelectionMode, ComboboxState, ComboboxTrigger, ComboboxTriggerProps, ComboboxValue, ComboboxVariant, MenuButton, MenuButtonContent, MenuButtonContentProps, MenuButtonProps, MenuButtonState, MenuButtonTrigger, MenuButtonTriggerProps, Select, SelectContent, SelectContentProps, SelectProps, SelectState, SelectTrigger, SelectTriggerProps, StyledComboboxContentFooterProps, StyledComboboxContentHeaderProps, StyledComboboxProps, StyledMenuButtonProps, StyledSelectProps };
437
+ 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 };