@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,150 @@
1
+ import { a as _extends } from './_rollupPluginBabelHelpers.js';
2
+ import React, { useState, useEffect, useReducer, useMemo, useRef } from 'react';
3
+ import { C as ComboboxSelectionMode, a as ComboboxVariant, b as ComboboxContext } from './types.js';
4
+ import { Popover } from '@redsift/popovers';
5
+ import { useTheme, ListboxReducer, ListboxActionType, useId, ThemeProvider, FocusWithinGroup, ListboxContext, Flexbox, Text, Theme } from '@redsift/design-system';
6
+ import { C as ComboboxTrigger } from './ComboboxTrigger.js';
7
+ import { C as ComboboxContent } from './ComboboxContent.js';
8
+
9
+ const COMPONENT_NAME = 'Combobox';
10
+ const CLASSNAME = 'redsift-combobox';
11
+
12
+ /**
13
+ * The Combobox component.
14
+ */
15
+ const BaseCombobox = props => {
16
+ const {
17
+ defaultValue,
18
+ description,
19
+ descriptionProps,
20
+ filter = {
21
+ type: 'startsWith',
22
+ caseSensitive: false
23
+ },
24
+ formRef,
25
+ submitRef,
26
+ inputValue: propsInputValue,
27
+ isDisabled,
28
+ isInvalid,
29
+ maxOptionsLength,
30
+ minWidth = 'trigger-width',
31
+ onChange,
32
+ onInputChange,
33
+ selectionMode = ComboboxSelectionMode.single,
34
+ theme: propsTheme,
35
+ triggerClassName,
36
+ value,
37
+ variant = ComboboxVariant.options,
38
+ wrapperProps
39
+ } = props;
40
+ const theme = useTheme(propsTheme);
41
+ const [selectedValue, setValue] = useState(value || defaultValue || (selectionMode === 'multiple' ? [] : ''));
42
+ const [inputValue, setInputValue] = useState(propsInputValue || '');
43
+ useEffect(() => {
44
+ if (value) {
45
+ state.setValue(value);
46
+ }
47
+ }, [value]);
48
+ useEffect(() => {
49
+ if (propsInputValue) {
50
+ state.setInputValue(propsInputValue);
51
+ }
52
+ }, [propsInputValue]);
53
+
54
+ /** Listbox context */
55
+ const [listboxState, listboxDispatch] = useReducer(ListboxReducer, {
56
+ isDisabled,
57
+ selectedValues: selectionMode === ComboboxSelectionMode.multiple ? selectedValue : [selectedValue],
58
+ selectionMode
59
+ });
60
+ const listboxContext = useMemo(() => ({
61
+ state: listboxState,
62
+ dispatch: listboxDispatch
63
+ }), [listboxState]);
64
+ useEffect(() => {
65
+ listboxDispatch({
66
+ type: ListboxActionType.UPDATE_OPTIONS,
67
+ payload: {
68
+ isDisabled: isDisabled || false
69
+ }
70
+ });
71
+ }, [isDisabled]);
72
+ const freeTextItemRef = useRef();
73
+ const [freeTextItemId] = useId();
74
+
75
+ /** Combobox context. */
76
+ const state = {
77
+ filter,
78
+ formRef,
79
+ submitRef,
80
+ value: selectedValue,
81
+ inputValue,
82
+ isDisabled: isDisabled || false,
83
+ isInvalid: isInvalid || false,
84
+ selectionMode,
85
+ variant,
86
+ freeTextItemRef: freeTextItemRef,
87
+ freeTextItemId,
88
+ triggerClassName,
89
+ setValue(value) {
90
+ if (isDisabled) {
91
+ return;
92
+ }
93
+ const previousValue = selectedValue;
94
+ setValue(value);
95
+ if (value !== previousValue && onChange) {
96
+ onChange(value);
97
+ }
98
+ },
99
+ setInputValue(value) {
100
+ if (isDisabled) {
101
+ return;
102
+ }
103
+ const previousValue = inputValue;
104
+ setInputValue(value);
105
+ if (value !== previousValue && onInputChange) {
106
+ onInputChange(value);
107
+ }
108
+ }
109
+ };
110
+ return /*#__PURE__*/React.createElement(ThemeProvider, {
111
+ value: {
112
+ theme
113
+ }
114
+ }, /*#__PURE__*/React.createElement(FocusWithinGroup, {
115
+ focusType: "virtual-focus",
116
+ focusOnInit: false,
117
+ maxOptionsLength: maxOptionsLength
118
+ }, /*#__PURE__*/React.createElement(ComboboxContext.Provider, {
119
+ value: state
120
+ }, /*#__PURE__*/React.createElement(ListboxContext.Provider, {
121
+ value: listboxContext
122
+ }, /*#__PURE__*/React.createElement(Flexbox, _extends({
123
+ flexDirection: "column",
124
+ alignItems: "flex-start",
125
+ gap: "0px"
126
+ }, wrapperProps), /*#__PURE__*/React.createElement(Popover, _extends({
127
+ theme: theme,
128
+ overrideDisplayName: {
129
+ content: 'ComboboxContent',
130
+ trigger: 'ComboboxTrigger'
131
+ },
132
+ placement: "bottom-start",
133
+ role: "listbox",
134
+ minWidth: minWidth
135
+ }, props)), description && typeof description === 'string' ? /*#__PURE__*/React.createElement(Text, _extends({
136
+ theme: theme,
137
+ marginTop: "8px",
138
+ variant: "caption",
139
+ color: isInvalid ? 'error' : theme === Theme.light ? 'dark-grey' : 'white'
140
+ }, descriptionProps), description) : /*#__PURE__*/React.isValidElement(description) ? description : null)))));
141
+ };
142
+ BaseCombobox.className = CLASSNAME;
143
+ BaseCombobox.displayName = COMPONENT_NAME;
144
+ const Combobox = Object.assign(BaseCombobox, {
145
+ Trigger: ComboboxTrigger,
146
+ Content: ComboboxContent
147
+ });
148
+
149
+ export { BaseCombobox as B, Combobox as C };
150
+ //# sourceMappingURL=Combobox2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Combobox2.js","sources":["../../src/components/combobox/Combobox.tsx"],"sourcesContent":["import React, { RefObject, useEffect, useMemo, useReducer, useRef, useState } from 'react';\nimport { ComboboxContent } from '../combobox-content';\nimport { ComboboxTrigger } from '../combobox-trigger';\n\nimport { ComboboxProps, ComboboxSelectionMode, ComboboxValue, ComboboxVariant } from './types';\nimport { Popover } from '@redsift/popovers';\nimport { ComboboxContext } from './context';\nimport {\n ListboxReducer,\n ListboxState,\n ListboxContextProps,\n FocusWithinGroup,\n ListboxContext,\n Flexbox,\n Text,\n ListboxActionType,\n Theme,\n useTheme,\n ThemeProvider,\n useId,\n} from '@redsift/design-system';\n\nconst COMPONENT_NAME = 'Combobox';\nconst CLASSNAME = 'redsift-combobox';\n\n/**\n * The Combobox component.\n */\nexport const BaseCombobox: React.FC<ComboboxProps> & {\n displayName?: string;\n className?: string;\n} = (props) => {\n const {\n defaultValue,\n description,\n descriptionProps,\n filter = {\n type: 'startsWith',\n caseSensitive: false,\n },\n formRef,\n submitRef,\n inputValue: propsInputValue,\n isDisabled,\n isInvalid,\n maxOptionsLength,\n minWidth = 'trigger-width',\n onChange,\n onInputChange,\n selectionMode = ComboboxSelectionMode.single,\n theme: propsTheme,\n triggerClassName,\n value,\n variant = ComboboxVariant.options,\n wrapperProps,\n } = props;\n\n const theme = useTheme(propsTheme);\n\n const [selectedValue, setValue] = useState<ComboboxValue>(\n value || defaultValue || (selectionMode === 'multiple' ? [] : '')\n );\n const [inputValue, setInputValue] = useState<string>(propsInputValue || '');\n useEffect(() => {\n if (value) {\n state.setValue(value);\n }\n }, [value]);\n useEffect(() => {\n if (propsInputValue) {\n state.setInputValue(propsInputValue);\n }\n }, [propsInputValue]);\n\n /** Listbox context */\n const [listboxState, listboxDispatch] = useReducer(ListboxReducer, {\n isDisabled,\n selectedValues: selectionMode === ComboboxSelectionMode.multiple ? selectedValue : [selectedValue],\n selectionMode,\n } as ListboxState);\n const listboxContext = useMemo<ListboxContextProps>(\n () => ({\n state: listboxState,\n dispatch: listboxDispatch,\n }),\n [listboxState]\n );\n useEffect(() => {\n listboxDispatch({\n type: ListboxActionType.UPDATE_OPTIONS,\n payload: {\n isDisabled: isDisabled || false,\n },\n });\n }, [isDisabled]);\n\n const freeTextItemRef = useRef<HTMLDivElement>();\n const [freeTextItemId] = useId();\n\n /** Combobox context. */\n const state = {\n filter,\n formRef,\n submitRef,\n value: selectedValue,\n inputValue,\n isDisabled: isDisabled || false,\n isInvalid: isInvalid || false,\n selectionMode,\n variant,\n freeTextItemRef: freeTextItemRef as RefObject<HTMLDivElement>,\n freeTextItemId,\n triggerClassName,\n setValue(value: ComboboxValue) {\n if (isDisabled) {\n return;\n }\n\n const previousValue = selectedValue;\n setValue(value);\n if (value !== previousValue && onChange) {\n onChange(value);\n }\n },\n setInputValue(value: string) {\n if (isDisabled) {\n return;\n }\n\n const previousValue = inputValue;\n setInputValue(value);\n if (value !== previousValue && onInputChange) {\n onInputChange(value);\n }\n },\n };\n\n return (\n <ThemeProvider value={{ theme }}>\n <FocusWithinGroup focusType=\"virtual-focus\" focusOnInit={false} maxOptionsLength={maxOptionsLength}>\n <ComboboxContext.Provider value={state}>\n <ListboxContext.Provider value={listboxContext}>\n <Flexbox flexDirection=\"column\" alignItems=\"flex-start\" gap=\"0px\" {...wrapperProps}>\n <Popover\n theme={theme}\n overrideDisplayName={{ content: 'ComboboxContent', trigger: 'ComboboxTrigger' }}\n placement=\"bottom-start\"\n role=\"listbox\"\n minWidth={minWidth}\n {...props}\n />\n {description && typeof description === 'string' ? (\n <Text\n theme={theme}\n marginTop=\"8px\"\n variant=\"caption\"\n color={isInvalid ? 'error' : theme === Theme.light ? 'dark-grey' : 'white'}\n {...descriptionProps}\n >\n {description}\n </Text>\n ) : React.isValidElement(description) ? (\n description\n ) : null}\n </Flexbox>\n </ListboxContext.Provider>\n </ComboboxContext.Provider>\n </FocusWithinGroup>\n </ThemeProvider>\n );\n};\nBaseCombobox.className = CLASSNAME;\nBaseCombobox.displayName = COMPONENT_NAME;\n\nexport const Combobox = Object.assign(BaseCombobox, {\n Trigger: ComboboxTrigger,\n Content: ComboboxContent,\n});\n"],"names":["COMPONENT_NAME","CLASSNAME","BaseCombobox","props","defaultValue","description","descriptionProps","filter","type","caseSensitive","formRef","submitRef","inputValue","propsInputValue","isDisabled","isInvalid","maxOptionsLength","minWidth","onChange","onInputChange","selectionMode","ComboboxSelectionMode","single","theme","propsTheme","triggerClassName","value","variant","ComboboxVariant","options","wrapperProps","useTheme","selectedValue","setValue","useState","setInputValue","useEffect","state","listboxState","listboxDispatch","useReducer","ListboxReducer","selectedValues","multiple","listboxContext","useMemo","dispatch","ListboxActionType","UPDATE_OPTIONS","payload","freeTextItemRef","useRef","freeTextItemId","useId","previousValue","React","createElement","ThemeProvider","FocusWithinGroup","focusType","focusOnInit","ComboboxContext","Provider","ListboxContext","Flexbox","_extends","flexDirection","alignItems","gap","Popover","overrideDisplayName","content","trigger","placement","role","Text","marginTop","color","Theme","light","isValidElement","className","displayName","Combobox","Object","assign","Trigger","ComboboxTrigger","Content","ComboboxContent"],"mappings":";;;;;;;;AAsBA,MAAMA,cAAc,GAAG,UAAU,CAAA;AACjC,MAAMC,SAAS,GAAG,kBAAkB,CAAA;;AAEpC;AACA;AACA;AACaC,MAAAA,YAGZ,GAAIC,KAAK,IAAK;EACb,MAAM;IACJC,YAAY;IACZC,WAAW;IACXC,gBAAgB;AAChBC,IAAAA,MAAM,GAAG;AACPC,MAAAA,IAAI,EAAE,YAAY;AAClBC,MAAAA,aAAa,EAAE,KAAA;K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,EACfd,KAAK,CACV,CAAC,EACDE,WAAW,IAAI,OAAOA,WAAW,KAAK,QAAQ,gBAC7CkD,KAAA,CAAAC,aAAA,CAACmB,IAAI,EAAAV,QAAA,CAAA;AACH1C,IAAAA,KAAK,EAAEA,KAAM;AACbqD,IAAAA,SAAS,EAAC,KAAK;AACfjD,IAAAA,OAAO,EAAC,SAAS;AACjBkD,IAAAA,KAAK,EAAE9D,SAAS,GAAG,OAAO,GAAGQ,KAAK,KAAKuD,KAAK,CAACC,KAAK,GAAG,WAAW,GAAG,OAAA;GAC/DzE,EAAAA,gBAAgB,GAEnBD,WACG,CAAC,gBACLkD,KAAK,CAACyB,cAAc,CAAC3E,WAAW,CAAC,GACnCA,WAAW,GACT,IACG,CACc,CACD,CACV,CACL,CAAC,CAAA;AAEpB,EAAC;AACDH,YAAY,CAAC+E,SAAS,GAAGhF,SAAS,CAAA;AAClCC,YAAY,CAACgF,WAAW,GAAGlF,cAAc,CAAA;AAElC,MAAMmF,QAAQ,GAAGC,MAAM,CAACC,MAAM,CAACnF,YAAY,EAAE;AAClDoF,EAAAA,OAAO,EAAEC,eAAe;AACxBC,EAAAA,OAAO,EAAEC,eAAAA;AACX,CAAC;;;;"}
@@ -0,0 +1,70 @@
1
+ import { a as _extends, b as _objectSpread2 } from './_rollupPluginBabelHelpers.js';
2
+ import React, { forwardRef, useContext } from 'react';
3
+ import classNames from 'classnames';
4
+ import { getContainerProps, AppContainerContext, FocusWithinGroupContext, ListboxContext, useTheme, partitionComponents, isComponent, Flexbox } from '@redsift/design-system';
5
+ import { usePopoverContext, useMergeRefs, FloatingPortal, StyledPopoverContent, PopoverContent } from '@redsift/popovers';
6
+ import { C as ComboboxContentListbox } from './ComboboxContentListbox.js';
7
+ import { b as ComboboxContext } from './types.js';
8
+ import { C as ComboboxContentHeader } from './ComboboxContentHeader.js';
9
+ import { C as ComboboxContentFooter } from './ComboboxContentFooter.js';
10
+
11
+ const COMPONENT_NAME = 'ComboboxContent';
12
+ const CLASSNAME = 'redsift-combobox-content';
13
+
14
+ /**
15
+ * The ComboboxContent component.
16
+ */
17
+ const BaseComboboxContent = /*#__PURE__*/forwardRef((props, ref) => {
18
+ var _comboboxState$inputV;
19
+ const {
20
+ children,
21
+ className,
22
+ style
23
+ } = props;
24
+ const containerProps = getContainerProps(props);
25
+ const {
26
+ getFloatingProps,
27
+ isOpen,
28
+ refs,
29
+ strategy,
30
+ x,
31
+ y
32
+ } = usePopoverContext();
33
+ const popoverRef = useMergeRefs([refs.setFloating, ref]);
34
+ const appContainerState = useContext(AppContainerContext);
35
+ const comboboxState = useContext(ComboboxContext);
36
+ const focusContext = useContext(FocusWithinGroupContext);
37
+ const listboxState = useContext(ListboxContext);
38
+ const theme = useTheme();
39
+ const [[header], [listbox], [footer]] = partitionComponents(React.Children.toArray(children), [isComponent('ComboboxContentHeader'), isComponent('ComboboxContentListbox'), isComponent('ComboboxContentFooter')]);
40
+ return /*#__PURE__*/React.createElement(FloatingPortal, {
41
+ root: appContainerState === null || appContainerState === void 0 ? void 0 : appContainerState.appContainerRef.current
42
+ }, isOpen && /*#__PURE__*/React.createElement(StyledPopoverContent, _extends({
43
+ $theme: theme,
44
+ ref: popoverRef
45
+ }, getFloatingProps(props), {
46
+ style: _objectSpread2(_objectSpread2({
47
+ position: strategy,
48
+ top: y !== null && y !== void 0 ? y : 0,
49
+ left: x !== null && x !== void 0 ? x : 0
50
+ }, style), comboboxState !== null && comboboxState !== void 0 && (_comboboxState$inputV = comboboxState.inputValue) !== null && _comboboxState$inputV !== void 0 && _comboboxState$inputV.length && focusContext.state.tabStops.length === 0 ? {
51
+ display: 'none'
52
+ } : {}),
53
+ className: classNames(PopoverContent.className, BaseComboboxContent.className, className),
54
+ "aria-disabled": listboxState.state.isDisabled
55
+ }), /*#__PURE__*/React.createElement(Flexbox, _extends({
56
+ flexDirection: "column",
57
+ gap: "0px",
58
+ width: "100%"
59
+ }, containerProps), header, listbox, footer)));
60
+ });
61
+ BaseComboboxContent.className = CLASSNAME;
62
+ BaseComboboxContent.displayName = COMPONENT_NAME;
63
+ const ComboboxContent = Object.assign(BaseComboboxContent, {
64
+ Header: ComboboxContentHeader,
65
+ Listbox: ComboboxContentListbox,
66
+ Footer: ComboboxContentFooter
67
+ });
68
+
69
+ export { BaseComboboxContent as B, ComboboxContent as C };
70
+ //# sourceMappingURL=ComboboxContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComboboxContent.js","sources":["../../src/components/combobox-content/ComboboxContent.tsx"],"sourcesContent":["import React, { forwardRef, useContext } from 'react';\nimport classNames from 'classnames';\n\nimport {\n AppContainerContext,\n Comp,\n Flexbox,\n FocusWithinGroupContext,\n ListboxContext,\n getContainerProps,\n isComponent,\n partitionComponents,\n useTheme,\n} from '@redsift/design-system';\nimport { ComboboxContentProps } from './types';\nimport {\n FloatingPortal,\n PopoverContent,\n usePopoverContext,\n StyledPopoverContent,\n useMergeRefs,\n} from '@redsift/popovers';\nimport { ComboboxContentHeader } from '../combobox-content-header';\nimport { ComboboxContentFooter } from '../combobox-content-footer';\nimport { ComboboxContentListbox } from '../combobox-content-listbox/ComboboxContentListbox';\nimport { ComboboxContext } from '../combobox/context';\n\nconst COMPONENT_NAME = 'ComboboxContent';\nconst CLASSNAME = 'redsift-combobox-content';\n\n/**\n * The ComboboxContent component.\n */\nexport const BaseComboboxContent: Comp<ComboboxContentProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { children, className, style } = props;\n const containerProps = getContainerProps(props);\n\n const { getFloatingProps, isOpen, refs, strategy, x, y } = usePopoverContext();\n const popoverRef = useMergeRefs([refs.setFloating, ref]);\n\n const appContainerState = useContext(AppContainerContext);\n const comboboxState = useContext(ComboboxContext);\n const focusContext = useContext(FocusWithinGroupContext);\n const listboxState = useContext(ListboxContext);\n const theme = useTheme();\n\n const [[header], [listbox], [footer]] = partitionComponents(React.Children.toArray(children), [\n isComponent('ComboboxContentHeader'),\n isComponent('ComboboxContentListbox'),\n isComponent('ComboboxContentFooter'),\n ]);\n\n return (\n <FloatingPortal root={appContainerState?.appContainerRef.current}>\n {isOpen && (\n <StyledPopoverContent\n $theme={theme!}\n ref={popoverRef}\n {...getFloatingProps(props)}\n style={{\n position: strategy,\n top: y ?? 0,\n left: x ?? 0,\n ...style,\n ...(comboboxState?.inputValue?.length && focusContext.state.tabStops.length === 0\n ? { display: 'none' }\n : {}),\n }}\n className={classNames(PopoverContent.className, BaseComboboxContent.className, className)}\n aria-disabled={listboxState.state.isDisabled}\n >\n <Flexbox flexDirection=\"column\" gap=\"0px\" width=\"100%\" {...containerProps}>\n {header}\n {listbox}\n {footer}\n </Flexbox>\n </StyledPopoverContent>\n )}\n </FloatingPortal>\n );\n});\nBaseComboboxContent.className = CLASSNAME;\nBaseComboboxContent.displayName = COMPONENT_NAME;\n\nexport const ComboboxContent = Object.assign(BaseComboboxContent, {\n Header: ComboboxContentHeader,\n Listbox: ComboboxContentListbox,\n Footer: ComboboxContentFooter,\n});\n"],"names":["COMPONENT_NAME","CLASSNAME","BaseComboboxContent","forwardRef","props","ref","_comboboxState$inputV","children","className","style","containerProps","getContainerProps","getFloatingProps","isOpen","refs","strategy","x","y","usePopoverContext","popoverRef","useMergeRefs","setFloating","appContainerState","useContext","AppContainerContext","comboboxState","ComboboxContext","focusContext","FocusWithinGroupContext","listboxState","ListboxContext","theme","useTheme","header","listbox","footer","partitionComponents","React","Children","toArray","isComponent","createElement","FloatingPortal","root","appContainerRef","current","StyledPopoverContent","_extends","$theme","_objectSpread","position","top","left","inputValue","length","state","tabStops","display","classNames","PopoverContent","isDisabled","Flexbox","flexDirection","gap","width","displayName","ComboboxContent","Object","assign","Header","ComboboxContentHeader","Listbox","ComboboxContentListbox","Footer","ComboboxContentFooter"],"mappings":";;;;;;;;;;AA2BA,MAAMA,cAAc,GAAG,iBAAiB,CAAA;AACxC,MAAMC,SAAS,GAAG,0BAA0B,CAAA;;AAE5C;AACA;AACA;AACO,MAAMC,mBAA+D,gBAAGC,UAAU,CAAC,CAACC,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ACW,CAEV,CAAC,CAAA;AAErB,CAAC,EAAC;AACFjC,mBAAmB,CAACM,SAAS,GAAGP,SAAS,CAAA;AACzCC,mBAAmB,CAAC+D,WAAW,GAAGjE,cAAc,CAAA;AAEzC,MAAMkE,eAAe,GAAGC,MAAM,CAACC,MAAM,CAAClE,mBAAmB,EAAE;AAChEmE,EAAAA,MAAM,EAAEC,qBAAqB;AAC7BC,EAAAA,OAAO,EAAEC,sBAAsB;AAC/BC,EAAAA,MAAM,EAAEC,qBAAAA;AACV,CAAC;;;;"}
@@ -0,0 +1,36 @@
1
+ import { _ as _objectWithoutProperties, a as _extends } from './_rollupPluginBabelHelpers.js';
2
+ import React, { forwardRef } from 'react';
3
+ import classNames from 'classnames';
4
+ import styled from 'styled-components';
5
+ import { baseContainer } from '@redsift/design-system';
6
+
7
+ /**
8
+ * Component style.
9
+ */
10
+ const StyledComboboxContentFooter = styled.div`
11
+ ${baseContainer}
12
+ `;
13
+
14
+ const _excluded = ["children", "className"];
15
+ const COMPONENT_NAME = 'ComboboxContentFooter';
16
+ const CLASSNAME = 'redsift-combobox-content-footer';
17
+
18
+ /**
19
+ * The ComboboxContentFooter component.
20
+ */
21
+ const ComboboxContentFooter = /*#__PURE__*/forwardRef((props, ref) => {
22
+ const {
23
+ children,
24
+ className
25
+ } = props,
26
+ forwardedProps = _objectWithoutProperties(props, _excluded);
27
+ return /*#__PURE__*/React.createElement(StyledComboboxContentFooter, _extends({}, forwardedProps, {
28
+ className: classNames(ComboboxContentFooter.className, className),
29
+ ref: ref
30
+ }), children);
31
+ });
32
+ ComboboxContentFooter.className = CLASSNAME;
33
+ ComboboxContentFooter.displayName = COMPONENT_NAME;
34
+
35
+ export { ComboboxContentFooter as C };
36
+ //# sourceMappingURL=ComboboxContentFooter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComboboxContentFooter.js","sources":["../../src/components/combobox-content-footer/styles.ts","../../src/components/combobox-content-footer/ComboboxContentFooter.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { StyledComboboxContentFooterProps } from './types';\nimport { baseContainer } from '@redsift/design-system';\n\n/**\n * Component style.\n */\nexport const StyledComboboxContentFooter = styled.div<StyledComboboxContentFooterProps>`\n ${baseContainer}\n`;\n","import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\n\nimport { StyledComboboxContentFooter } from './styles';\nimport { ComboboxContentFooterProps } from './types';\nimport { Comp } from '@redsift/design-system';\n\nconst COMPONENT_NAME = 'ComboboxContentFooter';\nconst CLASSNAME = 'redsift-combobox-content-footer';\n\n/**\n * The ComboboxContentFooter component.\n */\nexport const ComboboxContentFooter: Comp<ComboboxContentFooterProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { children, className, ...forwardedProps } = props;\n\n return (\n <StyledComboboxContentFooter\n {...forwardedProps}\n className={classNames(ComboboxContentFooter.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n >\n {children}\n </StyledComboboxContentFooter>\n );\n});\nComboboxContentFooter.className = CLASSNAME;\nComboboxContentFooter.displayName = COMPONENT_NAME;\n"],"names":["StyledComboboxContentFooter","styled","div","baseContainer","COMPONENT_NAME","CLASSNAME","ComboboxContentFooter","forwardRef","props","ref","children","className","forwardedProps","_objectWithoutProperties","_excluded","React","createElement","_extends","classNames","displayName"],"mappings":";;;;;;AAIA;AACA;AACA;AACO,MAAMA,2BAA2B,GAAGC,MAAM,CAACC,GAAsC,CAAA;AACxF,EAAA,EAAIC,aAAc,CAAA;AAClB,CAAC;;;ACFD,MAAMC,cAAc,GAAG,uBAAuB,CAAA;AAC9C,MAAMC,SAAS,GAAG,iCAAiC,CAAA;;AAEnD;AACA;AACA;AACO,MAAMC,qBAAuE,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAChH,MAAM;MAAEC,QAAQ;AAAEC,MAAAA,SAAAA;AAA6B,KAAC,GAAGH,KAAK;AAAxBI,IAAAA,cAAc,GAAAC,wBAAA,CAAKL,KAAK,EAAAM,SAAA,CAAA,CAAA;EAExD,oBACEC,KAAA,CAAAC,aAAA,CAAChB,2BAA2B,EAAAiB,QAAA,KACtBL,cAAc,EAAA;IAClBD,SAAS,EAAEO,UAAU,CAACZ,qBAAqB,CAACK,SAAS,EAAEA,SAAS,CAAE;AAClEF,IAAAA,GAAG,EAAEA,GAAAA;AAAiC,GAAA,CAAA,EAErCC,QAC0B,CAAC,CAAA;AAElC,CAAC,EAAC;AACFJ,qBAAqB,CAACK,SAAS,GAAGN,SAAS,CAAA;AAC3CC,qBAAqB,CAACa,WAAW,GAAGf,cAAc;;;;"}
@@ -0,0 +1,36 @@
1
+ import { _ as _objectWithoutProperties, a as _extends } from './_rollupPluginBabelHelpers.js';
2
+ import React, { forwardRef } from 'react';
3
+ import classNames from 'classnames';
4
+ import styled from 'styled-components';
5
+ import { baseContainer } from '@redsift/design-system';
6
+
7
+ /**
8
+ * Component style.
9
+ */
10
+ const StyledComboboxContentHeader = styled.div`
11
+ ${baseContainer}
12
+ `;
13
+
14
+ const _excluded = ["children", "className"];
15
+ const COMPONENT_NAME = 'ComboboxContentHeader';
16
+ const CLASSNAME = 'redsift-combobox-content-header';
17
+
18
+ /**
19
+ * The ComboboxContentHeader component.
20
+ */
21
+ const ComboboxContentHeader = /*#__PURE__*/forwardRef((props, ref) => {
22
+ const {
23
+ children,
24
+ className
25
+ } = props,
26
+ forwardedProps = _objectWithoutProperties(props, _excluded);
27
+ return /*#__PURE__*/React.createElement(StyledComboboxContentHeader, _extends({}, forwardedProps, {
28
+ className: classNames(ComboboxContentHeader.className, className),
29
+ ref: ref
30
+ }), children);
31
+ });
32
+ ComboboxContentHeader.className = CLASSNAME;
33
+ ComboboxContentHeader.displayName = COMPONENT_NAME;
34
+
35
+ export { ComboboxContentHeader as C };
36
+ //# sourceMappingURL=ComboboxContentHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComboboxContentHeader.js","sources":["../../src/components/combobox-content-header/styles.ts","../../src/components/combobox-content-header/ComboboxContentHeader.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { StyledComboboxContentHeaderProps } from './types';\nimport { baseContainer } from '@redsift/design-system';\n\n/**\n * Component style.\n */\nexport const StyledComboboxContentHeader = styled.div<StyledComboboxContentHeaderProps>`\n ${baseContainer}\n`;\n","import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\n\nimport { StyledComboboxContentHeader } from './styles';\nimport { ComboboxContentHeaderProps } from './types';\nimport { Comp } from '@redsift/design-system';\n\nconst COMPONENT_NAME = 'ComboboxContentHeader';\nconst CLASSNAME = 'redsift-combobox-content-header';\n\n/**\n * The ComboboxContentHeader component.\n */\nexport const ComboboxContentHeader: Comp<ComboboxContentHeaderProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { children, className, ...forwardedProps } = props;\n\n return (\n <StyledComboboxContentHeader\n {...forwardedProps}\n className={classNames(ComboboxContentHeader.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n >\n {children}\n </StyledComboboxContentHeader>\n );\n});\nComboboxContentHeader.className = CLASSNAME;\nComboboxContentHeader.displayName = COMPONENT_NAME;\n"],"names":["StyledComboboxContentHeader","styled","div","baseContainer","COMPONENT_NAME","CLASSNAME","ComboboxContentHeader","forwardRef","props","ref","children","className","forwardedProps","_objectWithoutProperties","_excluded","React","createElement","_extends","classNames","displayName"],"mappings":";;;;;;AAIA;AACA;AACA;AACO,MAAMA,2BAA2B,GAAGC,MAAM,CAACC,GAAsC,CAAA;AACxF,EAAA,EAAIC,aAAc,CAAA;AAClB,CAAC;;;ACFD,MAAMC,cAAc,GAAG,uBAAuB,CAAA;AAC9C,MAAMC,SAAS,GAAG,iCAAiC,CAAA;;AAEnD;AACA;AACA;AACO,MAAMC,qBAAuE,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAChH,MAAM;MAAEC,QAAQ;AAAEC,MAAAA,SAAAA;AAA6B,KAAC,GAAGH,KAAK;AAAxBI,IAAAA,cAAc,GAAAC,wBAAA,CAAKL,KAAK,EAAAM,SAAA,CAAA,CAAA;EAExD,oBACEC,KAAA,CAAAC,aAAA,CAAChB,2BAA2B,EAAAiB,QAAA,KACtBL,cAAc,EAAA;IAClBD,SAAS,EAAEO,UAAU,CAACZ,qBAAqB,CAACK,SAAS,EAAEA,SAAS,CAAE;AAClEF,IAAAA,GAAG,EAAEA,GAAAA;AAAiC,GAAA,CAAA,EAErCC,QAC0B,CAAC,CAAA;AAElC,CAAC,EAAC;AACFJ,qBAAqB,CAACK,SAAS,GAAGN,SAAS,CAAA;AAC3CC,qBAAqB,CAACa,WAAW,GAAGf,cAAc;;;;"}
@@ -0,0 +1,123 @@
1
+ import { _ as _objectWithoutProperties, a as _extends } from './_rollupPluginBabelHelpers.js';
2
+ import React, { forwardRef, useContext, useEffect } from 'react';
3
+ import classNames from 'classnames';
4
+ import { FocusWithinGroupContext, ListboxContext, isComponent, Item, useListboxItem, useTheme, Flexbox, StyledItem } from '@redsift/design-system';
5
+ import { b as ComboboxContext, C as ComboboxSelectionMode, a as ComboboxVariant } from './types.js';
6
+
7
+ const _excluded = ["children", "className", "renderFreeTextItem"];
8
+ const COMPONENT_NAME = 'ComboboxContentListbox';
9
+ const CLASSNAME = 'redsift-combobox-content-listbox';
10
+
11
+ /**
12
+ * The ComboboxContentListbox component.
13
+ */
14
+ const ComboboxContentListbox = /*#__PURE__*/forwardRef((props, ref) => {
15
+ const {
16
+ children,
17
+ className,
18
+ renderFreeTextItem
19
+ } = props,
20
+ forwardedProps = _objectWithoutProperties(props, _excluded);
21
+ const focusContext = useContext(FocusWithinGroupContext);
22
+ const listboxState = useContext(ListboxContext);
23
+ const comboboxState = useContext(ComboboxContext);
24
+ useEffect(() => {
25
+ if (focusContext && focusContext.state.delayedAction && focusContext.state.tabStops.length) {
26
+ focusContext.dispatch(focusContext.state.delayedAction);
27
+ }
28
+ });
29
+ const canHaveMultipleSelections = (comboboxState === null || comboboxState === void 0 ? void 0 : comboboxState.selectionMode) === ComboboxSelectionMode.multiple;
30
+ const canHaveFreeText = (comboboxState === null || comboboxState === void 0 ? void 0 : comboboxState.variant) === ComboboxVariant.suggestions;
31
+ const cloneChildAndPush = (child, array) => {
32
+ if (!canHaveMultipleSelections || !canHaveFreeText || canHaveMultipleSelections && canHaveFreeText && !comboboxState.value.includes(child.props.value)) {
33
+ array.push( /*#__PURE__*/React.cloneElement(child, {
34
+ key: child.props.value,
35
+ hasCheckbox: canHaveMultipleSelections && !canHaveFreeText
36
+ }));
37
+ }
38
+ };
39
+ const renderedChildren = [];
40
+ if (Array.isArray(children)) {
41
+ for (const child of children) {
42
+ if (isComponent(Item)(child)) {
43
+ if (focusContext.state.maxOptionsLength) {
44
+ if (renderedChildren.length < focusContext.state.maxOptionsLength) {
45
+ if (!focusContext.state.filter) {
46
+ cloneChildAndPush(child, renderedChildren);
47
+ } else {
48
+ const {
49
+ value: filterValue,
50
+ type,
51
+ caseSensitive
52
+ } = focusContext.state.filter;
53
+ if (!filterValue) {
54
+ cloneChildAndPush(child, renderedChildren);
55
+ } else if (caseSensitive && (type === 'startsWith' && child.props.value.startsWith(filterValue) || type === 'contains' && child.props.value.includes(filterValue) || type === 'endsWith' && child.props.value.endsWith(filterValue))) {
56
+ cloneChildAndPush(child, renderedChildren);
57
+ } else if (!caseSensitive && (type === 'startsWith' && child.props.value.toLowerCase().startsWith(filterValue.toLowerCase()) || type === 'contains' && child.props.value.toLowerCase().includes(filterValue.toLowerCase()) || type === 'endsWith' && child.props.value.toLowerCase().endsWith(filterValue.toLowerCase()))) {
58
+ cloneChildAndPush(child, renderedChildren);
59
+ }
60
+ }
61
+ }
62
+ } else {
63
+ cloneChildAndPush(child, renderedChildren);
64
+ }
65
+ } else {
66
+ renderedChildren.push(child);
67
+ }
68
+ }
69
+ }
70
+ const {
71
+ tabIndex,
72
+ isFocused,
73
+ isSelected,
74
+ isDisabled,
75
+ handleKeyDown,
76
+ handleClick
77
+ } = useListboxItem({
78
+ domElementRef: comboboxState === null || comboboxState === void 0 ? void 0 : comboboxState.freeTextItemRef,
79
+ value: (comboboxState === null || comboboxState === void 0 ? void 0 : comboboxState.inputValue) || '',
80
+ id: comboboxState === null || comboboxState === void 0 ? void 0 : comboboxState.freeTextItemId
81
+ });
82
+ const theme = useTheme();
83
+ const renderedFreeTextItem = comboboxState !== null && comboboxState !== void 0 && comboboxState.inputValue ? renderFreeTextItem && typeof renderFreeTextItem === 'function' ? renderFreeTextItem(comboboxState === null || comboboxState === void 0 ? void 0 : comboboxState.inputValue, comboboxState, listboxState) : comboboxState === null || comboboxState === void 0 ? void 0 : comboboxState.inputValue : null;
84
+ return /*#__PURE__*/React.createElement(Flexbox, _extends({
85
+ className: classNames(ComboboxContentListbox.className, className)
86
+ }, forwardedProps, {
87
+ ref: ref,
88
+ flexDirection: "column",
89
+ gap: "0px",
90
+ margin: "8px 0px",
91
+ style: {
92
+ outline: 'none'
93
+ },
94
+ width: "100%"
95
+ }), canHaveMultipleSelections && canHaveFreeText ? /*#__PURE__*/React.createElement(StyledItem, {
96
+ role: "option",
97
+ id: comboboxState.freeTextItemId,
98
+ $color: "primary",
99
+ $isActive: isSelected,
100
+ $isDisabled: isDisabled,
101
+ $isGradient: false,
102
+ $isHovered: isFocused,
103
+ $hasBorder: false,
104
+ $hasCheckbox: false,
105
+ $theme: theme,
106
+ "aria-selected": isSelected,
107
+ className: classNames(Item.className, className),
108
+ onClick: handleClick,
109
+ ref: comboboxState.freeTextItemRef,
110
+ onKeyDown: handleKeyDown,
111
+ tabIndex: tabIndex,
112
+ style: !comboboxState.inputValue ? {
113
+ height: '0',
114
+ visibility: 'hidden',
115
+ padding: '0'
116
+ } : undefined
117
+ }, renderedFreeTextItem) : null, Array.isArray(children) ? renderedChildren : children);
118
+ });
119
+ ComboboxContentListbox.className = CLASSNAME;
120
+ ComboboxContentListbox.displayName = COMPONENT_NAME;
121
+
122
+ export { ComboboxContentListbox as C };
123
+ //# sourceMappingURL=ComboboxContentListbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComboboxContentListbox.js","sources":["../../src/components/combobox-content-listbox/ComboboxContentListbox.tsx"],"sourcesContent":["import React, { ReactNode, forwardRef, useContext, useEffect, RefObject, ReactElement } from 'react';\nimport classNames from 'classnames';\n\nimport {\n Comp,\n Flexbox,\n FocusWithinGroupContext,\n Item,\n ListboxContext,\n StyledItem,\n isComponent,\n useListboxItem,\n useTheme,\n} from '@redsift/design-system';\nimport { ComboboxContentListboxProps } from './types';\nimport { ComboboxContext } from '../combobox/context';\nimport { ComboboxSelectionMode, ComboboxVariant } from '../combobox/types';\n\nconst COMPONENT_NAME = 'ComboboxContentListbox';\nconst CLASSNAME = 'redsift-combobox-content-listbox';\n\n/**\n * The ComboboxContentListbox component.\n */\nexport const ComboboxContentListbox: Comp<ComboboxContentListboxProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { children, className, renderFreeTextItem, ...forwardedProps } = props;\n\n const focusContext = useContext(FocusWithinGroupContext);\n const listboxState = useContext(ListboxContext);\n const comboboxState = useContext(ComboboxContext);\n\n useEffect(() => {\n if (focusContext && focusContext.state.delayedAction && focusContext.state.tabStops.length) {\n focusContext.dispatch(focusContext.state.delayedAction);\n }\n });\n\n const canHaveMultipleSelections = comboboxState?.selectionMode === ComboboxSelectionMode.multiple;\n const canHaveFreeText = comboboxState?.variant === ComboboxVariant.suggestions;\n\n const cloneChildAndPush = (child: ReactElement, array: Array<ReactNode>) => {\n if (\n !canHaveMultipleSelections ||\n !canHaveFreeText ||\n (canHaveMultipleSelections && canHaveFreeText && !(comboboxState.value as string[]).includes(child.props.value))\n ) {\n array.push(\n React.cloneElement(child, {\n key: child.props.value,\n hasCheckbox: canHaveMultipleSelections && !canHaveFreeText,\n })\n );\n }\n };\n const renderedChildren: Array<ReactNode> = [];\n if (Array.isArray(children)) {\n for (const child of children) {\n if (isComponent(Item)(child)) {\n if (focusContext.state.maxOptionsLength) {\n if (renderedChildren.length < focusContext.state.maxOptionsLength) {\n if (!focusContext.state.filter) {\n cloneChildAndPush(child, renderedChildren);\n } else {\n const { value: filterValue, type, caseSensitive } = focusContext.state.filter;\n\n if (!filterValue) {\n cloneChildAndPush(child, renderedChildren);\n } else if (\n caseSensitive &&\n ((type === 'startsWith' && child.props.value!.startsWith(filterValue)) ||\n (type === 'contains' && child.props.value!.includes(filterValue)) ||\n (type === 'endsWith' && child.props.value!.endsWith(filterValue)))\n ) {\n cloneChildAndPush(child, renderedChildren);\n } else if (\n !caseSensitive &&\n ((type === 'startsWith' && child.props.value!.toLowerCase().startsWith(filterValue.toLowerCase())) ||\n (type === 'contains' && child.props.value!.toLowerCase().includes(filterValue.toLowerCase())) ||\n (type === 'endsWith' && child.props.value!.toLowerCase().endsWith(filterValue.toLowerCase())))\n ) {\n cloneChildAndPush(child, renderedChildren);\n }\n }\n }\n } else {\n cloneChildAndPush(child, renderedChildren);\n }\n } else {\n renderedChildren.push(child);\n }\n }\n }\n\n const { tabIndex, isFocused, isSelected, isDisabled, handleKeyDown, handleClick } = useListboxItem({\n domElementRef: comboboxState?.freeTextItemRef as RefObject<Element>,\n value: comboboxState?.inputValue || '',\n id: comboboxState?.freeTextItemId,\n });\n const theme = useTheme();\n\n const renderedFreeTextItem = comboboxState?.inputValue\n ? renderFreeTextItem && typeof renderFreeTextItem === 'function'\n ? renderFreeTextItem(comboboxState?.inputValue, comboboxState, listboxState)\n : comboboxState?.inputValue\n : null;\n\n return (\n <Flexbox\n className={classNames(ComboboxContentListbox.className, className)}\n {...forwardedProps}\n ref={ref}\n flexDirection=\"column\"\n gap=\"0px\"\n margin=\"8px 0px\"\n style={{ outline: 'none' }}\n width=\"100%\"\n >\n {canHaveMultipleSelections && canHaveFreeText ? (\n <StyledItem\n role=\"option\"\n id={comboboxState.freeTextItemId}\n $color=\"primary\"\n $isActive={isSelected}\n $isDisabled={isDisabled}\n $isGradient={false}\n $isHovered={isFocused}\n $hasBorder={false}\n $hasCheckbox={false}\n $theme={theme}\n aria-selected={isSelected}\n className={classNames(Item.className, className)}\n onClick={handleClick}\n ref={comboboxState.freeTextItemRef as RefObject<HTMLDivElement>}\n onKeyDown={handleKeyDown}\n tabIndex={tabIndex}\n style={\n !comboboxState.inputValue\n ? {\n height: '0',\n visibility: 'hidden',\n padding: '0',\n }\n : undefined\n }\n >\n {renderedFreeTextItem}\n </StyledItem>\n ) : null}\n {Array.isArray(children) ? renderedChildren : children}\n </Flexbox>\n );\n});\nComboboxContentListbox.className = CLASSNAME;\nComboboxContentListbox.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","ComboboxContentListbox","forwardRef","props","ref","children","className","renderFreeTextItem","forwardedProps","_objectWithoutProperties","_excluded","focusContext","useContext","FocusWithinGroupContext","listboxState","ListboxContext","comboboxState","ComboboxContext","useEffect","state","delayedAction","tabStops","length","dispatch","canHaveMultipleSelections","selectionMode","ComboboxSelectionMode","multiple","canHaveFreeText","variant","ComboboxVariant","suggestions","cloneChildAndPush","child","array","value","includes","push","React","cloneElement","key","hasCheckbox","renderedChildren","Array","isArray","isComponent","Item","maxOptionsLength","filter","filterValue","type","caseSensitive","startsWith","endsWith","toLowerCase","tabIndex","isFocused","isSelected","isDisabled","handleKeyDown","handleClick","useListboxItem","domElementRef","freeTextItemRef","inputValue","id","freeTextItemId","theme","useTheme","renderedFreeTextItem","createElement","Flexbox","_extends","classNames","flexDirection","gap","margin","style","outline","width","StyledItem","role","$color","$isActive","$isDisabled","$isGradient","$isHovered","$hasBorder","$hasCheckbox","$theme","onClick","onKeyDown","height","visibility","padding","undefined","displayName"],"mappings":";;;;;;;AAkBA,MAAMA,cAAc,GAAG,wBAAwB,CAAA;AAC/C,MAAMC,SAAS,GAAG,kCAAkC,CAAA;;AAEpD;AACA;AACA;AACO,MAAMC,sBAAyE,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAClH,MAAM;MAAEC,QAAQ;MAAEC,SAAS;AAAEC,MAAAA,kBAAAA;AAAsC,KAAC,GAAGJ,KAAK;AAAxBK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