@redsift/pickers 11.5.0 → 11.6.0-alpha.0

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.
Files changed (71) hide show
  1. package/_internal/Combobox2.js +150 -0
  2. package/_internal/Combobox2.js.map +1 -0
  3. package/_internal/ComboboxContent.js +70 -0
  4. package/_internal/ComboboxContent.js.map +1 -0
  5. package/_internal/ComboboxContentFooter.js +36 -0
  6. package/_internal/ComboboxContentFooter.js.map +1 -0
  7. package/_internal/ComboboxContentHeader.js +36 -0
  8. package/_internal/ComboboxContentHeader.js.map +1 -0
  9. package/_internal/ComboboxContentListbox.js +123 -0
  10. package/_internal/ComboboxContentListbox.js.map +1 -0
  11. package/_internal/ComboboxTrigger.js +377 -0
  12. package/_internal/ComboboxTrigger.js.map +1 -0
  13. package/_internal/Item2.js +199 -0
  14. package/_internal/Item2.js.map +1 -0
  15. package/_internal/MenuButton.js +75 -0
  16. package/_internal/MenuButton.js.map +1 -0
  17. package/_internal/MenuButtonContent.js +68 -0
  18. package/_internal/MenuButtonContent.js.map +1 -0
  19. package/_internal/MenuButtonContentFooter.js +36 -0
  20. package/_internal/MenuButtonContentFooter.js.map +1 -0
  21. package/_internal/MenuButtonContentHeader.js +36 -0
  22. package/_internal/MenuButtonContentHeader.js.map +1 -0
  23. package/_internal/MenuButtonContentMenu.js +41 -0
  24. package/_internal/MenuButtonContentMenu.js.map +1 -0
  25. package/_internal/MenuButtonTrigger.js +168 -0
  26. package/_internal/MenuButtonTrigger.js.map +1 -0
  27. package/_internal/Select2.js +115 -0
  28. package/_internal/Select2.js.map +1 -0
  29. package/_internal/SelectContent.js +62 -0
  30. package/_internal/SelectContent.js.map +1 -0
  31. package/_internal/SelectTrigger.js +250 -0
  32. package/_internal/SelectTrigger.js.map +1 -0
  33. package/_internal/_rollupPluginBabelHelpers.js +93 -0
  34. package/_internal/_rollupPluginBabelHelpers.js.map +1 -0
  35. package/_internal/combobox-content-footer.js +2 -0
  36. package/_internal/combobox-content-footer.js.map +1 -0
  37. package/_internal/combobox-content-header.js +2 -0
  38. package/_internal/combobox-content-header.js.map +1 -0
  39. package/_internal/combobox-content-listbox.js +2 -0
  40. package/_internal/combobox-content-listbox.js.map +1 -0
  41. package/_internal/combobox-content.js +2 -0
  42. package/_internal/combobox-content.js.map +1 -0
  43. package/_internal/combobox-trigger.js +2 -0
  44. package/_internal/combobox-trigger.js.map +1 -0
  45. package/_internal/combobox.js +3 -0
  46. package/_internal/combobox.js.map +1 -0
  47. package/_internal/item.js +2 -0
  48. package/_internal/item.js.map +1 -0
  49. package/_internal/menu-button-content-footer.js +2 -0
  50. package/_internal/menu-button-content-footer.js.map +1 -0
  51. package/_internal/menu-button-content-header.js +2 -0
  52. package/_internal/menu-button-content-header.js.map +1 -0
  53. package/_internal/menu-button-content-menu.js +2 -0
  54. package/_internal/menu-button-content-menu.js.map +1 -0
  55. package/_internal/menu-button-content.js +2 -0
  56. package/_internal/menu-button-content.js.map +1 -0
  57. package/_internal/menu-button-trigger.js +2 -0
  58. package/_internal/menu-button-trigger.js.map +1 -0
  59. package/_internal/menu-button.js +2 -0
  60. package/_internal/menu-button.js.map +1 -0
  61. package/_internal/select-content.js +2 -0
  62. package/_internal/select-content.js.map +1 -0
  63. package/_internal/select-trigger.js +2 -0
  64. package/_internal/select-trigger.js.map +1 -0
  65. package/_internal/select.js +2 -0
  66. package/_internal/select.js.map +1 -0
  67. package/_internal/types.js +26 -0
  68. package/_internal/types.js.map +1 -0
  69. package/index.js +17 -1822
  70. package/index.js.map +1 -1
  71. package/package.json +8 -8
@@ -0,0 +1,3 @@
1
+ export { C as ComboboxSelectionMode, a as ComboboxVariant } from './types.js';
2
+ export { B as BaseCombobox, C as Combobox } from './Combobox2.js';
3
+ //# sourceMappingURL=combobox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combobox.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ export { I as Item } from './Item2.js';
2
+ //# sourceMappingURL=item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { M as MenuButtonContentFooter } from './MenuButtonContentFooter.js';
2
+ //# sourceMappingURL=menu-button-content-footer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-button-content-footer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { M as MenuButtonContentHeader } from './MenuButtonContentHeader.js';
2
+ //# sourceMappingURL=menu-button-content-header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-button-content-header.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { M as MenuButtonContentMenu } from './MenuButtonContentMenu.js';
2
+ //# sourceMappingURL=menu-button-content-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-button-content-menu.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { B as BaseMenuButtonContent, M as MenuButtonContent } from './MenuButtonContent.js';
2
+ //# sourceMappingURL=menu-button-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-button-content.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { M as MenuButtonTrigger } from './MenuButtonTrigger.js';
2
+ //# sourceMappingURL=menu-button-trigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-button-trigger.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { B as BaseMenuButton, M as MenuButton } from './MenuButton.js';
2
+ //# sourceMappingURL=menu-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-button.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { S as SelectContent } from './SelectContent.js';
2
+ //# sourceMappingURL=select-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-content.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { S as SelectTrigger } from './SelectTrigger.js';
2
+ //# sourceMappingURL=select-trigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-trigger.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { B as BaseSelect, S as Select } from './Select2.js';
2
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+
3
+ const ComboboxContext = /*#__PURE__*/React.createContext(null);
4
+
5
+ /**
6
+ * Component variant.
7
+ */
8
+ const ComboboxSelectionMode = {
9
+ single: 'single',
10
+ multiple: 'multiple'
11
+ };
12
+ const ComboboxVariant = {
13
+ options: 'options',
14
+ suggestions: 'suggestions'
15
+ };
16
+
17
+ /**
18
+ * Context props.
19
+ */
20
+
21
+ /**
22
+ * Component props.
23
+ */
24
+
25
+ export { ComboboxSelectionMode as C, ComboboxVariant as a, ComboboxContext as b };
26
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":["../../src/components/combobox/context.ts","../../src/components/combobox/types.ts"],"sourcesContent":["import React from 'react';\nimport { ComboboxState } from './types';\n\nexport const ComboboxContext = React.createContext<ComboboxState | null>(null);\n","import { FlexboxProps, TextProps, Theme, ValueOf } from '@redsift/design-system';\nimport { PopoverProps } from '@redsift/popovers';\nimport { ReactElement, RefObject } from 'react';\n\n/**\n * Component variant.\n */\nexport const ComboboxSelectionMode = {\n single: 'single',\n multiple: 'multiple',\n} as const;\nexport type ComboboxSelectionMode = ValueOf<typeof ComboboxSelectionMode>;\n\nexport const ComboboxVariant = {\n options: 'options',\n suggestions: 'suggestions',\n} as const;\nexport type ComboboxVariant = ValueOf<typeof ComboboxVariant>;\n\nexport type ComboboxValue = string | string[];\n\n/**\n * Context props.\n */\nexport type ComboboxState = {\n /** Filtering parameters. */\n readonly filter?: {\n type: 'startsWith' | 'contains' | 'endsWith';\n caseSensitive?: boolean;\n };\n /** Whether the combobox is disabled or not. */\n readonly isDisabled: boolean;\n /** Whether the combobox is invalid or not. */\n readonly isInvalid: boolean;\n /** Sets the selected value. */\n setValue(value: ComboboxValue): void;\n /** Current selected value. */\n readonly value: ComboboxValue;\n /** Sets the input value. */\n setInputValue(inputValue: string): void;\n /** Current input value. */\n readonly inputValue: string;\n /** Whether the Combobox allow multiple selection or not. */\n selectionMode?: ComboboxSelectionMode;\n /** 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. */\n variant?: ComboboxVariant;\n /** Ref to the first item used to create values. */\n freeTextItemRef?: RefObject<HTMLDivElement>;\n /** Id of the first item used to create values. */\n freeTextItemId?: string;\n /** Class name to append to the trigger. */\n readonly triggerClassName?: string;\n /** Ref to the form, if any. */\n formRef?: RefObject<HTMLFormElement>;\n /** Ref to the submit button, if any. */\n submitRef?: RefObject<HTMLButtonElement>;\n};\n\n/**\n * Component props.\n */\nexport interface ComboboxProps extends PopoverProps {\n /** 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. */\n variant?: ComboboxVariant;\n /**\n * Default selected value.\n * Used for uncontrolled version.\n */\n defaultValue?: ComboboxValue;\n /** Description of the combobox. */\n description?: string | ReactElement;\n /** Additional description properties. */\n descriptionProps?: Omit<TextProps, 'ref'>;\n /** Filtering parameters. */\n filter?: {\n type: 'startsWith' | 'contains' | 'endsWith';\n caseSensitive?: boolean;\n };\n /** Ref to the form, if any. */\n formRef?: RefObject<HTMLFormElement>;\n /** Ref to the submit button, if any. */\n submitRef?: RefObject<HTMLButtonElement>;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Whether the component is invalid or not. */\n isInvalid?: boolean;\n /** Maximum number of options displayed. Useful when too many options are displayed. */\n maxOptionsLength?: number;\n /** Method to handle selection change. */\n onChange?(value: ComboboxValue): void;\n /** Method to handle input change. */\n onInputChange?(value: string): void;\n /**\n * Currently selected value.\n * Used for controlled version.\n */\n value?: ComboboxValue;\n /** Input value. */\n inputValue?: string;\n /** Whether the Combobox allow multiple selection or not. */\n selectionMode?: ComboboxSelectionMode;\n /** Theme. */\n theme?: Theme;\n /** Class name to append to the trigger. */\n triggerClassName?: string;\n /** Props to forward to the wrapper. */\n wrapperProps?: Omit<FlexboxProps, 'ref'>;\n}\n\nexport type StyledComboboxProps = ComboboxProps;\n"],"names":["ComboboxContext","React","createContext","ComboboxSelectionMode","single","multiple","ComboboxVariant","options","suggestions"],"mappings":";;AAGO,MAAMA,eAAe,gBAAGC,KAAK,CAACC,aAAa,CAAuB,IAAI;;ACC7E;AACA;AACA;AACO,MAAMC,qBAAqB,GAAG;AACnCC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,QAAQ,EAAE,UAAA;AACZ,EAAU;AAGH,MAAMC,eAAe,GAAG;AAC7BC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,WAAW,EAAE,aAAA;AACf,EAAU;;AAKV;AACA;AACA;;AAmCA;AACA;AACA;;;;"}