@procore/core-react 12.36.0 → 12.37.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 (257) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
  3. package/dist/Avatar/Avatar.styles.js +5 -5
  4. package/dist/AvatarStack/AvatarStack.styles.js +7 -7
  5. package/dist/Badge/Badge.styles.js +2 -2
  6. package/dist/BadgePill/BadgePill.styles.js +4 -4
  7. package/dist/Banner/Banner.styles.js +10 -10
  8. package/dist/Box/Box.styles.js +1 -1
  9. package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
  10. package/dist/Button/Button.js +0 -1
  11. package/dist/Button/Button.js.map +1 -1
  12. package/dist/Button/Button.styles.js +5 -5
  13. package/dist/Calendar/Calendar.styles.js +9 -9
  14. package/dist/Card/Card.styles.js +1 -1
  15. package/dist/Checkbox/Checkbox.styles.js +6 -6
  16. package/dist/Checkbox/CheckboxTooltip.js +1 -1
  17. package/dist/ContactItem/ContactItem.styles.js +5 -5
  18. package/dist/Content/Content.styles.js +2 -2
  19. package/dist/DateInput/DateInput.js +2 -3
  20. package/dist/DateInput/DateInput.js.map +1 -1
  21. package/dist/DateInput/DateInput.styles.js +6 -6
  22. package/dist/DateSelect/DateSelect.js +1 -1
  23. package/dist/DateSelect/DateSelect.js.map +1 -1
  24. package/dist/DetailPage/DetailPage.styles.js +7 -7
  25. package/dist/Dropdown/Dropdown.js +0 -4
  26. package/dist/Dropdown/Dropdown.js.map +1 -1
  27. package/dist/Dropdown/Dropdown.styles.js +3 -3
  28. package/dist/DropdownFlyout/DropdownFlyout.js +8 -3
  29. package/dist/DropdownFlyout/DropdownFlyout.js.map +1 -1
  30. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  31. package/dist/DropdownFlyout/DropdownFlyout.types.d.ts +1 -0
  32. package/dist/DropdownFlyout/DropdownFlyout.types.js.map +1 -1
  33. package/dist/Dropzone/Dropzone.js +1 -1
  34. package/dist/Dropzone/Dropzone.styles.js +9 -9
  35. package/dist/EmptyState/EmptyState.styles.js +6 -6
  36. package/dist/Field/Field.styles.js +3 -3
  37. package/dist/FileList/FileList.styles.js +4 -4
  38. package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
  39. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
  40. package/dist/FileSelect/FileSelect.styles.js +2 -2
  41. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  42. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  43. package/dist/FileSelect/GridSource/GridSource.js +2 -1
  44. package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
  45. package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
  46. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  47. package/dist/FileSelect/SourceItem/SourceItem.js +19 -16
  48. package/dist/FileSelect/SourceItem/SourceItem.js.map +1 -1
  49. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  50. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  51. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  52. package/dist/FileToken/FileToken.styles.js +4 -4
  53. package/dist/FilterToken/FilterToken.styles.js +5 -5
  54. package/dist/FlexList/FlexList.styles.js +1 -1
  55. package/dist/Form/Form.styles.js +14 -14
  56. package/dist/Form/StyledFormikForm.styles.js +2 -2
  57. package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
  58. package/dist/Grid/Grid.styles.js +2 -2
  59. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  60. package/dist/Input/Input.styles.js +1 -1
  61. package/dist/Link/Link.styles.js +1 -1
  62. package/dist/ListPage/ListPage.styles.js +8 -8
  63. package/dist/Loader/Loader.styles.js +2 -2
  64. package/dist/MenuImperative/MenuImperative.styles.js +10 -10
  65. package/dist/Modal/Modal.styles.js +13 -13
  66. package/dist/MultiSelect/MultiSelect.js +3 -3
  67. package/dist/MultiSelect/MultiSelect.js.map +1 -1
  68. package/dist/MultiSelect/MultiSelect.styles.d.ts +7 -4
  69. package/dist/MultiSelect/MultiSelect.styles.js +18 -10
  70. package/dist/MultiSelect/MultiSelect.styles.js.map +1 -1
  71. package/dist/NextMenu/NextMenu.styles.js +3 -3
  72. package/dist/Notation/Notation.js +1 -1
  73. package/dist/NumberInput/NumberInput.styles.js +7 -7
  74. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  75. package/dist/PageLayout/PageLayout.styles.js +16 -16
  76. package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
  77. package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
  78. package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
  79. package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
  80. package/dist/Pagination/Pagination.styles.js +5 -5
  81. package/dist/Panel/Panel.styles.js +11 -11
  82. package/dist/Pill/Pill.styles.js +3 -3
  83. package/dist/PillSelect/PillSelect.styles.js +4 -4
  84. package/dist/Popover/Popover.styles.js +2 -2
  85. package/dist/Portal/Portal.styles.js +1 -1
  86. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  87. package/dist/RadioButton/RadioButton.styles.js +3 -3
  88. package/dist/Required/Required.styles.js +3 -3
  89. package/dist/Search/Search.styles.js +5 -5
  90. package/dist/Section/Section.styles.js +7 -7
  91. package/dist/SegmentedController/SegmentedController.js +1 -1
  92. package/dist/SegmentedController/SegmentedController.js.map +1 -1
  93. package/dist/SegmentedController/SegmentedController.styles.js +4 -4
  94. package/dist/Select/Select.js +15 -11
  95. package/dist/Select/Select.js.map +1 -1
  96. package/dist/Select/Select.styles.d.ts +5 -1
  97. package/dist/Select/Select.styles.js +45 -35
  98. package/dist/Select/Select.styles.js.map +1 -1
  99. package/dist/Semantic/Semantic.styles.d.ts +4 -4
  100. package/dist/Semantic/Semantic.styles.js +9 -9
  101. package/dist/Slider/Slider.styles.js +5 -5
  102. package/dist/Spinner/Spinner.styles.js +7 -7
  103. package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
  104. package/dist/SuperSelect/SuperSelect.components.js +16 -9
  105. package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
  106. package/dist/SuperSelect/SuperSelect.js +1 -1
  107. package/dist/SuperSelect/SuperSelect.js.map +1 -1
  108. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  109. package/dist/SuperSelect/SuperSelect.styles.js +39 -39
  110. package/dist/SuperSelect/SuperSelect.styles.js.map +1 -1
  111. package/dist/SuperSelect/SuperSelect.types.d.ts +4 -0
  112. package/dist/SuperSelect/SuperSelect.types.js.map +1 -1
  113. package/dist/SuperSelect/SuperSelect.utils.d.ts +2 -1
  114. package/dist/SuperSelect/SuperSelect.utils.js +17 -0
  115. package/dist/SuperSelect/SuperSelect.utils.js.map +1 -1
  116. package/dist/SuperSelect/useSuperSelect.d.ts +1 -1
  117. package/dist/SuperSelect/useSuperSelect.js +70 -41
  118. package/dist/SuperSelect/useSuperSelect.js.map +1 -1
  119. package/dist/Switch/Switch.styles.js +4 -4
  120. package/dist/Table/Table.styles.js +62 -59
  121. package/dist/Table/Table.styles.js.map +1 -1
  122. package/dist/TableShelf/TableShelf.styles.js +5 -5
  123. package/dist/Tabs/Tabs.styles.js +15 -15
  124. package/dist/Tearsheet/Tearsheet.styles.js +5 -5
  125. package/dist/TextArea/TextArea.styles.js +1 -1
  126. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  127. package/dist/Thumbnail/Thumbnail.styles.js +17 -17
  128. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  129. package/dist/TieredSelect/TierSelectionTieredSelect.js +12 -2
  130. package/dist/TieredSelect/TierSelectionTieredSelect.js.map +1 -1
  131. package/dist/TieredSelect/TieredSelect.js +18 -5
  132. package/dist/TieredSelect/TieredSelect.js.map +1 -1
  133. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  134. package/dist/TieredSelect/TieredSelectMenu.js +9 -2
  135. package/dist/TieredSelect/TieredSelectMenu.js.map +1 -1
  136. package/dist/Tile/Tile.styles.js +8 -8
  137. package/dist/Title/Title.styles.js +7 -7
  138. package/dist/Toast/Toast.styles.js +3 -3
  139. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  140. package/dist/Token/Token.styles.js +3 -3
  141. package/dist/ToolHeader/ToolHeader.styles.js +6 -6
  142. package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
  143. package/dist/Tooltip/Tooltip.styles.js +2 -2
  144. package/dist/Tooltip/Tooltip.types.d.ts +4 -0
  145. package/dist/Tooltip/Tooltip.types.js.map +1 -1
  146. package/dist/Tree/Tree.js +1 -1
  147. package/dist/Tree/Tree.styles.js +10 -10
  148. package/dist/Typeahead/Typeahead.styles.js +3 -3
  149. package/dist/Typography/Typography.styles.js +1 -1
  150. package/dist/Typography/Typography.table.story.js +2 -2
  151. package/dist/_hooks/I18n.d.ts +0 -22
  152. package/dist/_locales/de-DE.json +2 -2
  153. package/dist/_locales/en-AU.json +1 -1
  154. package/dist/_locales/en-CA.json +1 -1
  155. package/dist/_locales/en-GB.json +1 -1
  156. package/dist/_locales/es-ES.json +1 -1
  157. package/dist/_locales/es.json +3 -3
  158. package/dist/_locales/fr-CA.json +2 -2
  159. package/dist/_locales/fr-FR.json +4 -4
  160. package/dist/_locales/is-IS.json +2 -2
  161. package/dist/_locales/it-IT.json +47 -47
  162. package/dist/_locales/ja-JP.json +4 -4
  163. package/dist/_locales/pl-PL.json +1 -1
  164. package/dist/_locales/pt-BR.json +4 -4
  165. package/dist/_locales/pt-PT.json +11 -11
  166. package/dist/_locales/th-TH.json +4 -4
  167. package/dist/_locales/zh-SG.json +1 -1
  168. package/dist/_locales/zh-TW.json +5 -5
  169. package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
  170. package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
  171. package/dist/_styles/colors.js +7 -3
  172. package/dist/_styles/colors.js.map +1 -1
  173. package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +3 -3
  174. package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
  175. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
  176. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  177. package/dist/_typedoc/Banner/Banner.types.json +13 -13
  178. package/dist/_typedoc/Box/Box.types.json +68 -68
  179. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  180. package/dist/_typedoc/Button/Button.types.json +13 -13
  181. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  182. package/dist/_typedoc/Card/Card.types.json +6 -6
  183. package/dist/_typedoc/Checkbox/Checkbox.types.json +8 -8
  184. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  185. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  186. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  187. package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
  188. package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
  189. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +40 -30
  190. package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
  191. package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
  192. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  193. package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
  194. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  195. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  196. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
  197. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  198. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  199. package/dist/_typedoc/Form/Form.types.json +750 -750
  200. package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
  201. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  202. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
  203. package/dist/_typedoc/Input/Input.types.json +2 -2
  204. package/dist/_typedoc/Link/Link.types.json +1 -1
  205. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  206. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  207. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +77 -77
  208. package/dist/_typedoc/Modal/Modal.types.json +46 -46
  209. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
  210. package/dist/_typedoc/NextTile/NextTile.types.json +32 -32
  211. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  212. package/dist/_typedoc/NumberInput/NumberInput.types.json +48 -48
  213. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +32 -32
  214. package/dist/_typedoc/PageLayout/PageLayout.types.json +26 -26
  215. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  216. package/dist/_typedoc/Panel/Panel.types.json +30 -30
  217. package/dist/_typedoc/Pill/Pill.types.json +2 -2
  218. package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
  219. package/dist/_typedoc/Popover/Popover.types.json +15 -15
  220. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +7 -7
  221. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  222. package/dist/_typedoc/Required/Required.types.json +5 -5
  223. package/dist/_typedoc/Search/Search.types.json +18 -18
  224. package/dist/_typedoc/Section/Section.types.json +15 -15
  225. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
  226. package/dist/_typedoc/Select/Select.types.json +60 -60
  227. package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
  228. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  229. package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
  230. package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +14 -14
  231. package/dist/_typedoc/Table/Table.types.json +102 -102
  232. package/dist/_typedoc/Tabs/Tabs.types.json +20 -20
  233. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
  234. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  235. package/dist/_typedoc/TextEditor/TextEditor.types.json +11 -11
  236. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
  237. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
  238. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +43 -43
  239. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +29 -29
  240. package/dist/_typedoc/Tile/Tile.types.json +8 -8
  241. package/dist/_typedoc/Title/Title.types.json +1 -1
  242. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  243. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
  244. package/dist/_typedoc/Token/Token.types.json +7 -7
  245. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  246. package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +8 -8
  247. package/dist/_typedoc/Tooltip/Tooltip.types.json +23 -13
  248. package/dist/_typedoc/Tree/Tree.types.json +88 -88
  249. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  250. package/dist/_typedoc/Typography/Typography.types.json +9 -9
  251. package/dist/_typedoc/_utils/types.json +3 -3
  252. package/dist/_utils/storybookTooltip.d.ts +2 -0
  253. package/dist/_utils/storybookTooltip.js +12 -0
  254. package/dist/_utils/storybookTooltip.js.map +1 -0
  255. package/dist/_utils/triggerListeners.js +2 -2
  256. package/dist/_utils/triggerListeners.js.map +1 -1
  257. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SuperSelect.js","names":["DragDropContext","Droppable","FloatingFocusManager","FloatingPortal","FocusScope","React","Virtuoso","presets","DraggableOptionContent","OptionContent","SuperSelectContext","useSuperSelect","InternalDragDropContext","createContext","isDraggingOver","InternalDragDropProvider","_ref","children","value","useMemo","createElement","Provider","SelectComponent","props","ref","search","undefined","preset","config","_objectSpread","ctx","useImperativeHandle","useEffect","onChange","console","warn","components","Trigger","_extends","refs","floating","setReference","trigger","state","open","context","order","initialFocus","multiple","Overlay","setFloating","overlay","SearchContainer","searchContainer","Search","header","Header","selectAllEnabled","SelectAll","option","selectAllOption","options","length","Options","draggable","onDragEnd","droppableId","mode","renderClone","provided","snapshot","dragged","source","index","Item","isDragging","draggableProps","DragHandle","OptionLabel","virtuoso","scrollerRef","el","innerRef","itemContent","i","data","EmptyMessage","emptyMessage","footer","Footer","SuperSelect","forwardRef"],"sources":["../../src/SuperSelect/SuperSelect.tsx"],"sourcesContent":["import type {\n DraggableProvided,\n DraggableRubric,\n DraggableStateSnapshot,\n} from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration'\nimport {\n DragDropContext,\n Droppable,\n} from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration'\nimport { FloatingFocusManager, FloatingPortal } from '@floating-ui/react'\nimport { FocusScope } from '@react-aria/focus'\nimport React from 'react'\nimport { Virtuoso } from 'react-virtuoso'\nimport { presets } from './presets'\nimport { DraggableOptionContent, OptionContent } from './SuperSelect.components'\nimport type {\n SuperSelectApi,\n SuperSelectConfig,\n SuperSelectProps,\n} from './SuperSelect.types'\nimport { SuperSelectContext, useSuperSelect } from './useSuperSelect'\n\nexport const InternalDragDropContext = React.createContext({\n isDraggingOver: false,\n})\n\nconst InternalDragDropProvider = ({\n isDraggingOver,\n children,\n}: {\n isDraggingOver: boolean\n children: React.ReactNode\n}) => {\n const value = React.useMemo(() => {\n return {\n isDraggingOver,\n }\n }, [isDraggingOver])\n\n return (\n <InternalDragDropContext.Provider value={value}>\n {children}\n </InternalDragDropContext.Provider>\n )\n}\n\nfunction SelectComponent(\n props: SuperSelectProps,\n ref: React.ForwardedRef<SuperSelectApi>\n) {\n const search = props.search === undefined || props.search === true\n\n const preset = props.preset || ''\n\n const config: SuperSelectConfig = {\n ...presets[preset],\n ...props,\n search,\n }\n\n const ctx = useSuperSelect(config)\n\n React.useImperativeHandle(ref, () => ctx)\n\n React.useEffect(() => {\n if (props.value && props.onChange === undefined) {\n console.warn(\n 'Must provide both a `value` and `onChange` prop for a controlled Select'\n )\n }\n }, [])\n\n return (\n <SuperSelectContext.Provider value={ctx}>\n <ctx.components.Trigger\n ref={ctx.refs.floating.refs.setReference}\n {...ctx.props.trigger()}\n />\n <FloatingPortal>\n {ctx.state.open && (\n // FocusScope is needed to allow move focus from Modal and Tearsheet\n <FocusScope>\n <FloatingFocusManager\n context={ctx.refs.floating.context}\n order={\n config.search\n ? ['content', 'reference']\n : ['reference', 'content']\n }\n initialFocus={config.multiple ? undefined : 0}\n >\n <ctx.components.Overlay\n ref={ctx.refs.floating.refs.setFloating}\n {...ctx.props.overlay()}\n >\n {(config.search === true ||\n (config.search === undefined && !config.multiple)) && (\n <ctx.components.SearchContainer\n {...ctx.props.searchContainer()}\n >\n <ctx.components.Search {...ctx.props.search()} />\n </ctx.components.SearchContainer>\n )}\n {config.header && (\n <ctx.components.Header {...ctx.props.header()}>\n {config.header}\n </ctx.components.Header>\n )}\n {config.selectAllEnabled && config.multiple && (\n <ctx.components.SelectAll data-index={0}>\n <OptionContent option={ctx.state.selectAllOption} />\n </ctx.components.SelectAll>\n )}\n {ctx.state.options.length > 0 ? (\n <ctx.components.Options>\n {config.draggable ? (\n <DragDropContext onDragEnd={ctx.state.onDragEnd}>\n <Droppable\n droppableId=\"droppable\"\n mode=\"virtual\"\n renderClone={(\n provided: DraggableProvided,\n snapshot: DraggableStateSnapshot,\n dragged: DraggableRubric\n ) => {\n const option =\n ctx.state.options[dragged.source.index]\n\n return (\n <ctx.components.Item\n isDragging\n data-index={dragged.source.index}\n {...provided.draggableProps}\n >\n <ctx.components.DragHandle />\n <ctx.components.OptionLabel option={option} />\n </ctx.components.Item>\n )\n }}\n >\n {(\n provided: DraggableProvided,\n snapshot: DraggableStateSnapshot\n ) => {\n return (\n <InternalDragDropProvider\n isDraggingOver={snapshot.isDraggingOver}\n >\n <Virtuoso\n {...ctx.props.virtuoso()}\n scrollerRef={(el) =>\n provided.innerRef(el as HTMLElement)\n }\n itemContent={(i, data) => (\n <DraggableOptionContent\n index={i}\n option={data}\n />\n )}\n />\n </InternalDragDropProvider>\n )\n }}\n </Droppable>\n </DragDropContext>\n ) : (\n <Virtuoso\n {...ctx.props.virtuoso()}\n ref={ctx.refs.virtuoso}\n itemContent={(i, option) => (\n <OptionContent option={option} />\n )}\n />\n )}\n </ctx.components.Options>\n ) : (\n <ctx.components.EmptyMessage {...ctx.props.emptyMessage()} />\n )}\n {config.footer && (\n <ctx.components.Footer {...ctx.props.footer()}>\n {config.footer}\n </ctx.components.Footer>\n )}\n </ctx.components.Overlay>\n </FloatingFocusManager>\n </FocusScope>\n )}\n </FloatingPortal>\n </SuperSelectContext.Provider>\n )\n}\n\nexport const SuperSelect = React.forwardRef<SuperSelectApi, SuperSelectProps>(\n SelectComponent\n)\n"],"mappings":";;;;;;;AAKA,SACEA,eAAe,EACfC,SAAS,QACJ,iEAAiE;AACxE,SAASC,oBAAoB,EAAEC,cAAc,QAAQ,oBAAoB;AACzE,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,sBAAsB,EAAEC,aAAa,QAAQ,0BAA0B;AAMhF,SAASC,kBAAkB,EAAEC,cAAc,QAAQ,kBAAkB;AAErE,OAAO,IAAMC,uBAAuB,gBAAGP,KAAK,CAACQ,aAAa,CAAC;EACzDC,cAAc,EAAE;AAClB,CAAC,CAAC;AAEF,IAAMC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAAC,IAAA,EAMxB;EAAA,IALJF,cAAc,GAAAE,IAAA,CAAdF,cAAc;IACdG,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EAKR,IAAMC,KAAK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","FloatingPortal","FocusScope","React","Virtuoso","presets","DraggableOptionContent","OptionContent","SuperSelectContext","useSuperSelect","InternalDragDropContext","createContext","isDraggingOver","InternalDragDropProvider","_ref","children","value","useMemo","createElement","Provider","SelectComponent","props","ref","search","undefined","preset","config","_objectSpread","ctx","useImperativeHandle","useEffect","onChange","console","warn","components","Trigger","_extends","refs","floating","setReference","trigger","state","open","context","order","initialFocus","multiple","Overlay","setFloating","overlay","SearchContainer","searchContainer","Search","header","Header","selectAllEnabled","SelectAll","option","selectAllOption","options","length","Options","draggable","onDragEnd","droppableId","mode","renderClone","provided","snapshot","dragged","source","index","Item","isDragging","draggableProps","DragHandle","OptionLabel","virtuoso","scrollerRef","el","innerRef","itemContent","i","data","EmptyMessage","emptyMessage","footer","Footer","SuperSelect","forwardRef"],"sources":["../../src/SuperSelect/SuperSelect.tsx"],"sourcesContent":["import type {\n DraggableProvided,\n DraggableRubric,\n DraggableStateSnapshot,\n} from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration'\nimport {\n DragDropContext,\n Droppable,\n} from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration'\nimport { FloatingFocusManager, FloatingPortal } from '@floating-ui/react'\nimport { FocusScope } from '@react-aria/focus'\nimport React from 'react'\nimport { Virtuoso } from 'react-virtuoso'\nimport { presets } from './presets'\nimport { DraggableOptionContent, OptionContent } from './SuperSelect.components'\nimport type {\n SuperSelectApi,\n SuperSelectConfig,\n SuperSelectProps,\n} from './SuperSelect.types'\nimport { SuperSelectContext, useSuperSelect } from './useSuperSelect'\n\nexport const InternalDragDropContext = React.createContext({\n isDraggingOver: false,\n})\n\nconst InternalDragDropProvider = ({\n isDraggingOver,\n children,\n}: {\n isDraggingOver: boolean\n children: React.ReactNode\n}) => {\n const value = React.useMemo(() => {\n return {\n isDraggingOver,\n }\n }, [isDraggingOver])\n\n return (\n <InternalDragDropContext.Provider value={value}>\n {children}\n </InternalDragDropContext.Provider>\n )\n}\n\nfunction SelectComponent(\n props: SuperSelectProps,\n ref: React.ForwardedRef<SuperSelectApi>\n) {\n const search = props.search === undefined || props.search === true\n\n const preset = props.preset || ''\n\n const config: SuperSelectConfig = {\n ...presets[preset],\n ...props,\n search,\n }\n\n const ctx = useSuperSelect(config)\n\n React.useImperativeHandle(ref, () => ctx)\n\n React.useEffect(() => {\n if (props.value && props.onChange === undefined) {\n console.warn(\n 'Must provide both a `value` and `onChange` prop for a controlled Select'\n )\n }\n }, [])\n\n return (\n <SuperSelectContext.Provider value={ctx}>\n <ctx.components.Trigger\n ref={ctx.refs.floating.refs.setReference}\n {...ctx.props.trigger()}\n />\n <FloatingPortal>\n {ctx.state.open && (\n // FocusScope is needed to allow move focus from Modal and Tearsheet\n <FocusScope>\n <FloatingFocusManager\n context={ctx.refs.floating.context}\n order={\n config.search\n ? ['content', 'reference']\n : ['reference', 'content']\n }\n initialFocus={config.multiple ? undefined : 0}\n >\n <ctx.components.Overlay\n ref={ctx.refs.floating.refs.setFloating}\n {...ctx.props.overlay()}\n >\n {!config.multiple &&\n (config.search === true || config.search === undefined) && (\n <ctx.components.SearchContainer\n {...ctx.props.searchContainer()}\n >\n <ctx.components.Search {...ctx.props.search()} />\n </ctx.components.SearchContainer>\n )}\n {config.header && (\n <ctx.components.Header {...ctx.props.header()}>\n {config.header}\n </ctx.components.Header>\n )}\n {config.selectAllEnabled && config.multiple && (\n <ctx.components.SelectAll data-index={0}>\n <OptionContent option={ctx.state.selectAllOption} />\n </ctx.components.SelectAll>\n )}\n {ctx.state.options.length > 0 ? (\n <ctx.components.Options>\n {config.draggable ? (\n <DragDropContext onDragEnd={ctx.state.onDragEnd}>\n <Droppable\n droppableId=\"droppable\"\n mode=\"virtual\"\n renderClone={(\n provided: DraggableProvided,\n snapshot: DraggableStateSnapshot,\n dragged: DraggableRubric\n ) => {\n const option =\n ctx.state.options[dragged.source.index]\n\n return (\n <ctx.components.Item\n isDragging\n data-index={dragged.source.index}\n {...provided.draggableProps}\n >\n <ctx.components.DragHandle />\n <ctx.components.OptionLabel option={option} />\n </ctx.components.Item>\n )\n }}\n >\n {(\n provided: DraggableProvided,\n snapshot: DraggableStateSnapshot\n ) => {\n return (\n <InternalDragDropProvider\n isDraggingOver={snapshot.isDraggingOver}\n >\n <Virtuoso\n {...ctx.props.virtuoso()}\n scrollerRef={(el) =>\n provided.innerRef(el as HTMLElement)\n }\n itemContent={(i, data) => (\n <DraggableOptionContent\n index={i}\n option={data}\n />\n )}\n />\n </InternalDragDropProvider>\n )\n }}\n </Droppable>\n </DragDropContext>\n ) : (\n <Virtuoso\n {...ctx.props.virtuoso()}\n ref={ctx.refs.virtuoso}\n itemContent={(i, option) => (\n <OptionContent option={option} />\n )}\n />\n )}\n </ctx.components.Options>\n ) : (\n <ctx.components.EmptyMessage {...ctx.props.emptyMessage()} />\n )}\n {config.footer && (\n <ctx.components.Footer {...ctx.props.footer()}>\n {config.footer}\n </ctx.components.Footer>\n )}\n </ctx.components.Overlay>\n </FloatingFocusManager>\n </FocusScope>\n )}\n </FloatingPortal>\n </SuperSelectContext.Provider>\n )\n}\n\nexport const SuperSelect = React.forwardRef<SuperSelectApi, SuperSelectProps>(\n SelectComponent\n)\n"],"mappings":";;;;;;;AAKA,SACEA,eAAe,EACfC,SAAS,QACJ,iEAAiE;AACxE,SAASC,oBAAoB,EAAEC,cAAc,QAAQ,oBAAoB;AACzE,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,sBAAsB,EAAEC,aAAa,QAAQ,0BAA0B;AAMhF,SAASC,kBAAkB,EAAEC,cAAc,QAAQ,kBAAkB;AAErE,OAAO,IAAMC,uBAAuB,gBAAGP,KAAK,CAACQ,aAAa,CAAC;EACzDC,cAAc,EAAE;AAClB,CAAC,CAAC;AAEF,IAAMC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAAC,IAAA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WAAW,gBAAGrF,KAAK,CAACsF,UAAU,CACzCrE,eACF,CAAC"}
@@ -3,6 +3,6 @@ import { Popover } from '../Popover';
3
3
  import { spacing } from '../_styles/spacing';
4
4
  export var StyledFilterPresetPopoverContent = /*#__PURE__*/styled(Popover.Content).withConfig({
5
5
  displayName: "StyledFilterPresetPopoverContent",
6
- componentId: "core-12_36_0__sc-y5qv7b-0"
6
+ componentId: "core-12_37_0__sc-y5qv7b-0"
7
7
  })(["padding:", "px ", "px;"], spacing.sm, spacing.lg);
8
8
  //# sourceMappingURL=SuperSelect.presets.styles.js.map
@@ -22,40 +22,40 @@ var styledSelectButtonDefaultWidth = 248;
22
22
  export var extendedSelectMenuWidth = 360;
23
23
  export var PillSelectOptionWrapper = /*#__PURE__*/styled.div.withConfig({
24
24
  displayName: "PillSelectOptionWrapper",
25
- componentId: "core-12_36_0__sc-1uf5708-0"
25
+ componentId: "core-12_37_0__sc-1uf5708-0"
26
26
  })(["display:flex;align-items:center;justify-content:space-between;padding:", "px ", "px;"], spacing.xs, spacing.lg);
27
27
  export var PillSelectLabel = /*#__PURE__*/styled(Pill).withConfig({
28
28
  displayName: "PillSelectLabel",
29
- componentId: "core-12_36_0__sc-1uf5708-1"
29
+ componentId: "core-12_37_0__sc-1uf5708-1"
30
30
  })(["", ""], getEllipsis);
31
31
  export var PillSelectLabelWrapper = /*#__PURE__*/styled.div.withConfig({
32
32
  displayName: "PillSelectLabelWrapper",
33
- componentId: "core-12_36_0__sc-1uf5708-2"
33
+ componentId: "core-12_37_0__sc-1uf5708-2"
34
34
  })(["display:flex;max-width:100%;pointer-events:auto;", ""], function (_ref) {
35
35
  var disabled = _ref.disabled;
36
36
  return disabled && css(["pointer-events:none;"]);
37
37
  });
38
38
  export var StyledCheckboxContainer = /*#__PURE__*/styled.div.withConfig({
39
39
  displayName: "StyledCheckboxContainer",
40
- componentId: "core-12_36_0__sc-1uf5708-3"
40
+ componentId: "core-12_37_0__sc-1uf5708-3"
41
41
  })(["padding-left:", "px;"], spacing.lg);
42
42
  export var StyledCheckmarkContainer = /*#__PURE__*/styled.div.withConfig({
43
43
  displayName: "StyledCheckmarkContainer",
44
- componentId: "core-12_36_0__sc-1uf5708-4"
44
+ componentId: "core-12_37_0__sc-1uf5708-4"
45
45
  })(["align-items:center;color:", ";display:inline-flex;flex-shrink:0;padding:0 ", "px 0 ", "px;"], colors.blue50, spacing.lg, spacing.sm);
46
46
 
47
47
  // Do not merge with StyledMenu, needed for max-height working in IE
48
48
  export var StyledWrapper = /*#__PURE__*/styled.div.withConfig({
49
49
  displayName: "StyledWrapper",
50
- componentId: "core-12_36_0__sc-1uf5708-5"
50
+ componentId: "core-12_37_0__sc-1uf5708-5"
51
51
  })(["display:flex;max-height:inherit;min-width:inherit;outline:none;width:inherit;"]);
52
52
  export var StyledMenu = /*#__PURE__*/styled.div.withConfig({
53
53
  displayName: "StyledMenu",
54
- componentId: "core-12_36_0__sc-1uf5708-6"
54
+ componentId: "core-12_37_0__sc-1uf5708-6"
55
55
  })(["display:flex;flex-direction:column;outline:0;width:100%;"]);
56
56
  export var StyledOptions = /*#__PURE__*/styled.div.withConfig({
57
57
  displayName: "StyledOptions",
58
- componentId: "core-12_36_0__sc-1uf5708-7"
58
+ componentId: "core-12_37_0__sc-1uf5708-7"
59
59
  })(["flex-basis:auto;flex-grow:1;flex-shrink:1;min-height:", "px;", ";padding:", "px 0;position:relative;overflow:hidden;&:focus{", " margin:-1px;}"], optionMinHeight, function (_ref2) {
60
60
  var _ref2$$scrollable = _ref2.$scrollable,
61
61
  $scrollable = _ref2$$scrollable === void 0 ? true : _ref2$$scrollable;
@@ -63,53 +63,53 @@ export var StyledOptions = /*#__PURE__*/styled.div.withConfig({
63
63
  }, spacing.sm, getFocus());
64
64
  export var StyledItemContent = /*#__PURE__*/styled.div.withConfig({
65
65
  displayName: "StyledItemContent",
66
- componentId: "core-12_36_0__sc-1uf5708-8"
66
+ componentId: "core-12_37_0__sc-1uf5708-8"
67
67
  })(["display:flex;flex-direction:row;align-items:center;"]);
68
68
  export var StyledOptionGroupLabel = /*#__PURE__*/styled.div.withConfig({
69
69
  displayName: "StyledOptionGroupLabel",
70
- componentId: "core-12_36_0__sc-1uf5708-9"
70
+ componentId: "core-12_37_0__sc-1uf5708-9"
71
71
  })(["padding:", "px 0 ", "px ", "px;"], spacing.md, spacing.xs, spacing.lg);
72
72
  export var StyledItemLabel = /*#__PURE__*/styled.div.withConfig({
73
73
  displayName: "StyledItemLabel",
74
- componentId: "core-12_36_0__sc-1uf5708-10"
74
+ componentId: "core-12_37_0__sc-1uf5708-10"
75
75
  })(["", ""], function (_ref3) {
76
76
  var $draggable = _ref3.$draggable;
77
77
  return css(["padding:", "px ", "px;overflow-wrap:anywhere;"], spacing.xs, $draggable ? 0 : spacing.lg);
78
78
  });
79
79
  export var StyledDraggableWrapper = /*#__PURE__*/styled.div.withConfig({
80
80
  displayName: "StyledDraggableWrapper",
81
- componentId: "core-12_36_0__sc-1uf5708-11"
81
+ componentId: "core-12_37_0__sc-1uf5708-11"
82
82
  })(["display:flex;width:100%;align-items:center;"]);
83
83
  export var StyledGrip = /*#__PURE__*/styled.div.withConfig({
84
84
  displayName: "StyledGrip",
85
- componentId: "core-12_36_0__sc-1uf5708-12"
85
+ componentId: "core-12_37_0__sc-1uf5708-12"
86
86
  })(["padding:0 2px;height:24px;visibility:hidden;"]);
87
87
  export var StyledFooter = /*#__PURE__*/styled(Box).withConfig({
88
88
  displayName: "StyledFooter",
89
- componentId: "core-12_36_0__sc-1uf5708-13"
89
+ componentId: "core-12_37_0__sc-1uf5708-13"
90
90
  })(["border-top:1px solid ", ";"], colors.gray85);
91
91
  export var StyledHeader = /*#__PURE__*/styled.div.withConfig({
92
92
  displayName: "StyledHeader",
93
- componentId: "core-12_36_0__sc-1uf5708-14"
93
+ componentId: "core-12_37_0__sc-1uf5708-14"
94
94
  })([""]);
95
95
  export var StyledEmptyMessage = /*#__PURE__*/styled.div.withConfig({
96
96
  displayName: "StyledEmptyMessage",
97
- componentId: "core-12_36_0__sc-1uf5708-15"
97
+ componentId: "core-12_37_0__sc-1uf5708-15"
98
98
  })(["", ";padding:", "px ", "px;color:", ";"], getTypographyIntent('body'), spacing.md, spacing.lg, colors.gray45);
99
99
  export var StyledSearchContainer = /*#__PURE__*/styled.div.withConfig({
100
100
  displayName: "StyledSearchContainer",
101
- componentId: "core-12_36_0__sc-1uf5708-16"
101
+ componentId: "core-12_37_0__sc-1uf5708-16"
102
102
  })(["padding:", "px ", "px ", "px;", " > *{pointer-events:none;}"], spacing.lg, spacing.lg, spacing.sm, StyledButton);
103
103
  export var StyledGroup = /*#__PURE__*/styled.div.withConfig({
104
104
  displayName: "StyledGroup",
105
- componentId: "core-12_36_0__sc-1uf5708-17"
105
+ componentId: "core-12_37_0__sc-1uf5708-17"
106
106
  })(["", " color:", ";cursor:", ";font-weight:", ";padding:", "px ", "px;&:not(:first-child){padding-top:", "px;}&&{padding:0;}", "{padding:", "px ", " px;}&:not(:first-child){", "{padding-top:", " px;}}"], getTypographyIntent('body'), colors.gray15, function (_ref4) {
107
107
  var $clickable = _ref4.$clickable;
108
108
  return $clickable ? 'pointer' : 'default';
109
109
  }, typographyWeights.semibold, spacing.xs, spacing.lg, spacing.md + spacing.xs, StyledOptionGroupLabel, spacing.xs, spacing.lg, StyledOptionGroupLabel, spacing.md + spacing.xs);
110
110
  export var StyledItem = /*#__PURE__*/styled.div.withConfig({
111
111
  displayName: "StyledItem",
112
- componentId: "core-12_36_0__sc-1uf5708-18"
112
+ componentId: "core-12_37_0__sc-1uf5708-18"
113
113
  })(["", ";align-items:center;cursor:pointer;list-style-type:none;display:flex;padding:0;", " ", " ", " a{color:", ";display:block;margin:-", "px -", "px;padding:", "px ", "px;text-decoration:none;&:hover{color:", ";text-decoration:none;}}&[data-highlighted='true']{background-color:", ";}", " &:hover,&:active{", "{visibility:visible;}}", "{color:inherit;cursor:pointer;}", " ", " ", ""], getTypographyIntent('body'), function (_ref5) {
114
114
  var $emptyMinHeight = _ref5.$emptyMinHeight;
115
115
  return css(["&:empty{min-height:", "px;}"], $emptyMinHeight);
@@ -147,55 +147,55 @@ export var StyledItem = /*#__PURE__*/styled.div.withConfig({
147
147
  });
148
148
  export var StyledSelectAll = /*#__PURE__*/styled(Box).withConfig({
149
149
  displayName: "StyledSelectAll",
150
- componentId: "core-12_36_0__sc-1uf5708-19"
150
+ componentId: "core-12_37_0__sc-1uf5708-19"
151
151
  })(["padding-top:", "px;padding-bottom:", "px;border-bottom:1px solid ", ";"], spacing.md, spacing.md, colors.gray85);
152
152
  export var StyledDroppable = /*#__PURE__*/styled.div.withConfig({
153
153
  displayName: "StyledDroppable",
154
- componentId: "core-12_36_0__sc-1uf5708-20"
154
+ componentId: "core-12_37_0__sc-1uf5708-20"
155
155
  })(["", ",", "{padding-left:28px;}"], StyledGroup, StyledItem);
156
156
  export var StyledSelectMenu = /*#__PURE__*/styled(Card).withConfig({
157
157
  displayName: "StyledSelectMenu",
158
- componentId: "core-12_36_0__sc-1uf5708-21"
158
+ componentId: "core-12_37_0__sc-1uf5708-21"
159
159
  })(["display:flex;max-height:40vh;max-width:", "px;min-width:inherit;"], styledSelectButtonDefaultWidth);
160
160
  export var StyledLabel = /*#__PURE__*/styled.div.withConfig({
161
161
  displayName: "StyledLabel",
162
- componentId: "core-12_36_0__sc-1uf5708-22"
162
+ componentId: "core-12_37_0__sc-1uf5708-22"
163
163
  })(["", " flex-grow:1;margin-right:", "px;outline:none;pointer-events:", ";user-select:none;"], getEllipsis(), spacing.sm, function (_ref10) {
164
164
  var $hoverable = _ref10.$hoverable;
165
165
  return $hoverable ? 'initial' : 'none';
166
166
  });
167
167
  export var StyledIndicators = /*#__PURE__*/styled.div.withConfig({
168
168
  displayName: "StyledIndicators",
169
- componentId: "core-12_36_0__sc-1uf5708-23"
169
+ componentId: "core-12_37_0__sc-1uf5708-23"
170
170
  })(["align-items:center;align-self:flex-start;display:flex;height:34px;justify-content:flex-end;margin-left:", "px;min-width:40px;width:40px;"], spacing.xs);
171
171
  export var StyledClearIcon = /*#__PURE__*/styled(Button).withConfig({
172
172
  displayName: "StyledClearIcon",
173
- componentId: "core-12_36_0__sc-1uf5708-24"
173
+ componentId: "core-12_37_0__sc-1uf5708-24"
174
174
  })([""]);
175
175
  export var StyledSpinner = /*#__PURE__*/styled.div.withConfig({
176
176
  displayName: "StyledSpinner",
177
- componentId: "core-12_36_0__sc-1uf5708-25"
177
+ componentId: "core-12_37_0__sc-1uf5708-25"
178
178
  })(["align-items:center;display:flex;flex:0 0 auto;justify-content:center;line-height:0;"]);
179
179
  export var StyledArrowContainer = /*#__PURE__*/styled.div.withConfig({
180
180
  displayName: "StyledArrowContainer",
181
- componentId: "core-12_36_0__sc-1uf5708-26"
181
+ componentId: "core-12_37_0__sc-1uf5708-26"
182
182
  })(["align-items:center;display:inline-flex;height:16px;justify-content:flex-end;margin-left:", "px;width:8px;"], spacing.sm);
183
183
  export var StyledArrow = /*#__PURE__*/styled.span.withConfig({
184
184
  displayName: "StyledArrow",
185
- componentId: "core-12_36_0__sc-1uf5708-27"
185
+ componentId: "core-12_37_0__sc-1uf5708-27"
186
186
  })(["display:inline-flex;svg{fill:", ";}"], colors.gray45);
187
187
  export var StyledArrowOutline = /*#__PURE__*/styled.polygon.withConfig({
188
188
  displayName: "StyledArrowOutline",
189
- componentId: "core-12_36_0__sc-1uf5708-28"
189
+ componentId: "core-12_37_0__sc-1uf5708-28"
190
190
  })([""]);
191
191
  export var StyledArrowFill = /*#__PURE__*/styled.polygon.withConfig({
192
192
  displayName: "StyledArrowFill",
193
- componentId: "core-12_36_0__sc-1uf5708-29"
193
+ componentId: "core-12_37_0__sc-1uf5708-29"
194
194
  })([""]);
195
195
  export var StyledTrigger = /*#__PURE__*/styled.div.withConfig({
196
196
  displayName: "StyledTrigger",
197
- componentId: "core-12_36_0__sc-1uf5708-30"
198
- })(["", " align-items:center;background-color:", ";border-color:", ";border-radius:", "px;border-style:solid;border-width:1px;color:", ";cursor:pointer;display:inline-flex;height:36px;min-height:36px;outline:none;padding:0 ", "px;position:relative;white-space:nowrap;width:", ";&::placeholder{border-color:", ";}&:hover,&:active,&[data-qa=", "]{background-color:", ";border-color:", ";color:", ";}&:focus,&[data-qa=", "]{", " ", "{stroke:", ";}}", " ", " ", " ", " ", " ", " ", "}"], getTypographyIntent('body'), colors.white, colors.gray50, borderRadius.md, colors.gray15, spacing.md, function (_ref11) {
197
+ componentId: "core-12_37_0__sc-1uf5708-30"
198
+ })(["", " align-items:center;background-color:", ";border-color:", ";border-radius:", "px;border-style:solid;border-width:1px;color:", ";cursor:pointer;display:inline-flex;height:36px;min-height:36px;outline:none;padding:0 ", "px;position:relative;white-space:nowrap;width:", ";&::placeholder{border-color:", ";}&:hover,&:active,&[data-qa=", "]{background-color:", ";border-color:", ";color:", ";}&:focus,&:focus-within,&[data-qa=", "]{", " ", "{stroke:", ";}}", " ", " ", " ", " ", " ", " ", "}"], getTypographyIntent('body'), colors.white, colors.gray50, borderRadius.md, colors.gray15, spacing.md, function (_ref11) {
199
199
  var $block = _ref11.$block;
200
200
  return $block ? '100%' : "".concat(styledSelectButtonDefaultWidth, "px");
201
201
  }, colors.gray45, dataQa.hovered, colors.white, colors.gray20, colors.gray15, dataQa.focused, getFocus(), StyledCircle, colors.blue50, function (_ref12) {
@@ -229,31 +229,31 @@ export var StyledTrigger = /*#__PURE__*/styled.div.withConfig({
229
229
  });
230
230
  export var StyledOverlay = /*#__PURE__*/styled(Card).withConfig({
231
231
  displayName: "StyledOverlay",
232
- componentId: "core-12_36_0__sc-1uf5708-31"
232
+ componentId: "core-12_37_0__sc-1uf5708-31"
233
233
  })(["display:flex;flex-direction:column;"]);
234
234
  export var StyledVirtuoso = /*#__PURE__*/styled(Virtuoso).withConfig({
235
235
  displayName: "StyledVirtuoso",
236
- componentId: "core-12_36_0__sc-1uf5708-32"
236
+ componentId: "core-12_37_0__sc-1uf5708-32"
237
237
  })(["flex:1 1 auto;"]);
238
238
  export var StyledEllipses = /*#__PURE__*/styled.div.withConfig({
239
239
  displayName: "StyledEllipses",
240
- componentId: "core-12_36_0__sc-1uf5708-33"
240
+ componentId: "core-12_37_0__sc-1uf5708-33"
241
241
  })(["", " display:inline-flex;> div{display:inline-flex;width:100%;}"], getEllipsis());
242
242
  export var StyledMultiValueContainer = /*#__PURE__*/styled.div.withConfig({
243
243
  displayName: "StyledMultiValueContainer",
244
- componentId: "core-12_36_0__sc-1uf5708-34"
244
+ componentId: "core-12_37_0__sc-1uf5708-34"
245
245
  })(["display:flex;flex-wrap:wrap;margin-bottom:2px;margin-right:", "px;margin-top:2px;min-width:0;width:100%;"], spacing.xs);
246
246
  export var StyledMultiValue = /*#__PURE__*/styled.div.withConfig({
247
247
  displayName: "StyledMultiValue",
248
- componentId: "core-12_36_0__sc-1uf5708-35"
248
+ componentId: "core-12_37_0__sc-1uf5708-35"
249
249
  })(["margin-bottom:2px;margin-right:", "px;margin-top:2px;flex:0 1 auto;> div{max-width:178px;width:100%;}"], spacing.xs);
250
250
  export var StyledMultiInputContainer = /*#__PURE__*/styled.div.withConfig({
251
251
  displayName: "StyledMultiInputContainer",
252
- componentId: "core-12_36_0__sc-1uf5708-36"
252
+ componentId: "core-12_37_0__sc-1uf5708-36"
253
253
  })(["margin-bottom:2px;margin-right:", "px;margin-top:2px;flex:1;max-width:100%;min-width:24px;"], spacing.xs);
254
254
  export var StyledMultiInput = /*#__PURE__*/styled.input.withConfig({
255
255
  displayName: "StyledMultiInput",
256
- componentId: "core-12_36_0__sc-1uf5708-37"
256
+ componentId: "core-12_37_0__sc-1uf5708-37"
257
257
  })(["background-color:transparent;border-width:0;font-family:inherit;padding:0;height:24px;width:100%;", " ", " &::-ms-clear{display:none;}&:focus{box-shadow:none;outline:none;}&::placeholder{color:", ";}"], getTypographyIntent('body'), function (_ref19) {
258
258
  var $isNavigatingTokens = _ref19.$isNavigatingTokens;
259
259
  return $isNavigatingTokens && css(["color:transparent;"]);
@@ -1 +1 @@
1
- {"version":3,"file":"SuperSelect.styles.js","names":["Virtuoso","styled","css","Box","Button","StyledButton","Card","StyledCheckboxLabel","Pill","StyledCircle","getTypographyIntent","typographyWeights","borderRadius","colors","getEllipsis","getFocus","spacing","dataQa","focused","hovered","optionMinHeight","checkedIconPlaceholderWidth","styledSelectButtonDefaultWidth","extendedSelectMenuWidth","PillSelectOptionWrapper","div","withConfig","displayName","componentId","xs","lg","PillSelectLabel","PillSelectLabelWrapper","_ref","disabled","StyledCheckboxContainer","StyledCheckmarkContainer","blue50","sm","StyledWrapper","StyledMenu","StyledOptions","_ref2","_ref2$$scrollable","$scrollable","StyledItemContent","StyledOptionGroupLabel","md","StyledItemLabel","_ref3","$draggable","StyledDraggableWrapper","StyledGrip","StyledFooter","gray85","StyledHeader","StyledEmptyMessage","gray45","StyledSearchContainer","StyledGroup","gray15","_ref4","$clickable","semibold","StyledItem","_ref5","$emptyMinHeight","_ref6","$isDraggingOver","$highlighted","_ref7","$disabled","$isDraggingDisabled","gray96","_ref8","concat","_ref9","$selected","_ref0","$isDraggable","_ref1","$isDragging","StyledSelectAll","StyledDroppable","StyledSelectMenu","StyledLabel","_ref10","$hoverable","StyledIndicators","StyledClearIcon","StyledSpinner","StyledArrowContainer","StyledArrow","span","StyledArrowOutline","polygon","StyledArrowFill","StyledTrigger","white","gray50","_ref11","$block","gray20","_ref12","_ref12$$placeholder","$placeholder","_ref13","gray94","gray70","_ref14","$error","red50","_ref15","$hasClearIcon","_ref16","$multiple","_ref17","$open","_ref18","_ref18$$placeholder","StyledOverlay","StyledVirtuoso","StyledEllipses","StyledMultiValueContainer","StyledMultiValue","StyledMultiInputContainer","StyledMultiInput","input","_ref19","$isNavigatingTokens"],"sources":["../../src/SuperSelect/SuperSelect.styles.ts"],"sourcesContent":["import { Virtuoso } from 'react-virtuoso'\nimport styled, { css } from 'styled-components'\nimport { Box } from '../Box/Box'\nimport { Button } from '../Button'\nimport { StyledButton } from '../Button/Button.styles'\nimport { Card } from '../Card/Card'\nimport { StyledCheckboxLabel } from '../Checkbox/Checkbox.styles'\nimport { Pill } from '../Pill/Pill'\nimport { StyledCircle } from '../Spinner/Spinner.styles'\nimport {\n getTypographyIntent,\n typographyWeights,\n} from '../Typography/Typography.styles'\nimport { borderRadius } from '../_styles/borderRadius'\nimport { colors } from '../_styles/colors'\nimport { getEllipsis, getFocus } from '../_styles/mixins'\nimport { spacing } from '../_styles/spacing'\n\nexport type SuperSelectStyledTriggerProps = {\n $block?: boolean\n $disabled?: boolean\n $error?: boolean\n $hasClearIcon?: boolean\n $loading?: boolean\n $multiple?: boolean\n $open?: boolean\n $placeholder?: boolean\n}\n\nexport const dataQa = {\n focused: 'core-select-focused',\n hovered: 'core-select-hovered',\n}\n\nconst optionMinHeight = 32\n\nconst checkedIconPlaceholderWidth = 32\n\nconst styledSelectButtonDefaultWidth = 248\n\nexport const extendedSelectMenuWidth = 360\n\nexport const PillSelectOptionWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ${spacing.xs}px ${spacing.lg}px;\n`\n\nexport const PillSelectLabel = styled(Pill)`\n ${getEllipsis}\n`\n\nexport const PillSelectLabelWrapper = styled.div<{ disabled?: boolean }>`\n display: flex;\n max-width: 100%;\n pointer-events: auto;\n\n ${({ disabled }) =>\n disabled &&\n css`\n pointer-events: none;\n `}\n`\n\nexport const StyledCheckboxContainer = styled.div`\n padding-left: ${spacing.lg}px;\n`\n\nexport const StyledCheckmarkContainer = styled.div`\n align-items: center;\n color: ${colors.blue50};\n display: inline-flex;\n flex-shrink: 0;\n padding: 0 ${spacing.lg}px 0 ${spacing.sm}px;\n`\n\n// Do not merge with StyledMenu, needed for max-height working in IE\nexport const StyledWrapper = styled.div`\n display: flex;\n max-height: inherit;\n min-width: inherit;\n outline: none;\n width: inherit;\n`\n\nexport const StyledMenu = styled.div`\n display: flex;\n flex-direction: column;\n outline: 0;\n width: 100%;\n`\n\nexport const StyledOptions = styled.div<{ $scrollable?: boolean }>`\n flex-basis: auto;\n flex-grow: 1;\n flex-shrink: 1;\n min-height: ${optionMinHeight}px;\n ${({ $scrollable = true }) => $scrollable && `overflow-y: auto`};\n padding: ${spacing.sm}px 0;\n position: relative;\n overflow: hidden;\n\n &:focus {\n ${getFocus()}\n margin: -1px;\n }\n`\n\nexport const StyledItemContent = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n`\n\nexport const StyledOptionGroupLabel = styled.div`\n padding: ${spacing.md}px 0 ${spacing.xs}px ${spacing.lg}px;\n`\n\nexport const StyledItemLabel = styled.div<{\n $draggable?: boolean\n $selectionStyle?: 'highlight' | 'checkbox' | 'checkmark'\n}>`\n ${({ $draggable }) => {\n return css`\n padding: ${spacing.xs}px ${$draggable ? 0 : spacing.lg}px;\n overflow-wrap: anywhere;\n `\n }}\n`\n\nexport const StyledDraggableWrapper = styled.div`\n display: flex;\n width: 100%;\n align-items: center;\n`\n\nexport const StyledGrip = styled.div`\n padding: 0 2px;\n height: 24px;\n visibility: hidden;\n`\n\nexport const StyledFooter = styled(Box)`\n border-top: 1px solid ${colors.gray85};\n`\n\nexport const StyledHeader = styled.div``\n\nexport const StyledEmptyMessage = styled.div`\n ${getTypographyIntent('body')};\n\n padding: ${spacing.md}px ${spacing.lg}px;\n color: ${colors.gray45};\n`\n\nexport const StyledSearchContainer = styled.div`\n padding: ${spacing.lg}px ${spacing.lg}px ${spacing.sm}px;\n\n ${StyledButton} > * {\n pointer-events: none;\n }\n`\n\nexport const StyledGroup = styled.div<{ $clickable?: boolean }>`\n ${getTypographyIntent('body')}\n\n color: ${colors.gray15};\n cursor: ${({ $clickable }) => ($clickable ? 'pointer' : 'default')};\n font-weight: ${typographyWeights.semibold};\n padding: ${spacing.xs}px ${spacing.lg}px;\n\n &:not(:first-child) {\n padding-top: ${spacing.md + spacing.xs}px;\n }\n\n && {\n padding: 0;\n }\n\n ${StyledOptionGroupLabel} {\n padding: ${spacing.xs}px ${spacing.lg} px;\n }\n\n &:not(:first-child) {\n ${StyledOptionGroupLabel} {\n padding-top: ${spacing.md + spacing.xs} px;\n }\n }\n`\n\nexport const StyledItem = styled.div<{\n $disabled?: boolean\n $selected?: boolean\n $highlighted?: boolean\n $isDraggable?: boolean\n $isDragging?: boolean\n $emptyMinHeight?: number\n $isDraggingOver?: boolean\n $isDraggingDisabled?: boolean\n}>`\n ${getTypographyIntent('body')};\n\n align-items: center;\n cursor: pointer;\n list-style-type: none;\n display: flex;\n padding: 0;\n\n ${({ $emptyMinHeight }) => {\n return css`\n &:empty {\n min-height: ${$emptyMinHeight}px;\n }\n `\n }}\n\n ${({ $isDraggingOver, $highlighted }) => {\n return (\n $isDraggingOver &&\n $highlighted &&\n css`\n background-color: initial;\n `\n )\n }}\n\n ${({ $isDraggingOver, $disabled, $isDraggingDisabled }) => {\n return (\n ($isDraggingOver || $disabled || $isDraggingDisabled) &&\n css`\n &:hover {\n ${StyledGrip} {\n visibility: hidden;\n }\n }\n `\n )\n }}\n\n a {\n // We decided to use a negative margin trick here to allow us to continue\n // to use listNavigation without having to rewrite a bunch of code in js\n color: ${colors.gray15};\n display: block;\n margin: -${spacing.xs}px -${spacing.lg}px;\n padding: ${spacing.xs}px ${spacing.lg}px;\n text-decoration: none;\n\n &:hover {\n color: ${colors.gray15};\n text-decoration: none;\n }\n }\n\n &[data-highlighted='true'] {\n background-color: ${colors.gray96};\n }\n\n ${({ $highlighted }) => $highlighted && `background-color: ${colors.gray96};`}\n\n &:hover,\n &:active {\n ${StyledGrip} {\n visibility: visible;\n }\n }\n\n ${StyledCheckboxLabel} {\n color: inherit;\n cursor: pointer;\n }\n\n ${({ $disabled, $selected }) => {\n if ($disabled) {\n return css`\n &,\n ${StyledCheckboxLabel} {\n color: ${colors.gray85};\n cursor: default;\n }\n `\n } else if ($selected) {\n return css`\n color: ${colors.blue50};\n font-weight: 700;\n\n a,\n a:hover {\n color: ${colors.blue50};\n text-decoration: none;\n }\n\n &[data-highlighted='true'] {\n background-color: ${colors.gray96};\n }\n `\n }\n\n return css`\n color: ${colors.gray15};\n\n &[data-highlighted='true'] {\n background-color: ${colors.gray96};\n }\n `\n }}\n\n ${({ $isDraggable }) => {\n if ($isDraggable) {\n return css`\n ${StyledCheckboxLabel} {\n cursor: grab;\n\n // The unchecked and checked icons\n &:before,\n &:after {\n cursor: pointer;\n }\n }\n\n &&& {\n padding-left: 0;\n }\n `\n }\n }}\n\n ${({ $isDragging }) => {\n if ($isDragging) {\n return css`\n background-color: ${colors.gray96};\n\n ${StyledGrip} {\n visibility: visible;\n }\n `\n }\n }}\n`\n\nexport const StyledSelectAll = styled(Box)`\n padding-top: ${spacing.md}px;\n padding-bottom: ${spacing.md}px;\n border-bottom: 1px solid ${colors.gray85};\n`\n\nexport const StyledDroppable = styled.div`\n ${StyledGroup}, ${StyledItem} {\n padding-left: 28px;\n }\n`\n\nexport const StyledSelectMenu = styled(Card)`\n display: flex;\n max-height: 40vh;\n max-width: ${styledSelectButtonDefaultWidth}px;\n min-width: inherit;\n`\n\nexport const StyledLabel = styled.div<{ $hoverable: boolean }>`\n ${getEllipsis()}\n flex-grow: 1;\n margin-right: ${spacing.sm}px;\n outline: none;\n pointer-events: ${({ $hoverable }) => ($hoverable ? 'initial' : 'none')};\n user-select: none;\n`\n\nexport const StyledIndicators = styled.div`\n align-items: center;\n align-self: flex-start;\n display: flex;\n height: 34px;\n justify-content: flex-end;\n margin-left: ${spacing.xs}px;\n min-width: 40px;\n width: 40px;\n`\n\nexport const StyledClearIcon = styled(Button)``\n\nexport const StyledSpinner = styled.div`\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n line-height: 0;\n`\n\nexport const StyledArrowContainer = styled.div`\n align-items: center;\n display: inline-flex;\n height: 16px;\n justify-content: flex-end;\n margin-left: ${spacing.sm}px;\n width: 8px;\n`\n\nexport const StyledArrow = styled.span`\n display: inline-flex;\n\n svg {\n fill: ${colors.gray45};\n }\n`\n\nexport const StyledArrowOutline = styled.polygon``\n\nexport const StyledArrowFill = styled.polygon``\n\nexport const StyledTrigger = styled.div<SuperSelectStyledTriggerProps>`\n ${getTypographyIntent('body')}\n\n align-items: center;\n background-color: ${colors.white};\n border-color: ${colors.gray50};\n border-radius: ${borderRadius.md}px;\n border-style: solid;\n border-width: 1px;\n color: ${colors.gray15};\n cursor: pointer;\n display: inline-flex;\n height: 36px;\n min-height: 36px;\n outline: none;\n padding: 0 ${spacing.md}px;\n position: relative;\n white-space: nowrap;\n width: ${({ $block }) =>\n $block ? '100%' : `${styledSelectButtonDefaultWidth}px`};\n\n &::placeholder {\n border-color: ${colors.gray45};\n }\n\n &:hover,\n &:active,\n &[data-qa=${dataQa.hovered}] {\n background-color: ${colors.white};\n border-color: ${colors.gray20};\n color: ${colors.gray15};\n }\n\n &:focus,\n &[data-qa=${dataQa.focused}] {\n ${getFocus()}\n\n ${StyledCircle} {\n stroke: ${colors.blue50};\n }\n }\n\n ${({ $placeholder = false }) =>\n $placeholder &&\n css`\n ${StyledLabel} {\n color: ${colors.gray45};\n }\n `}\n\n ${({ $disabled }) =>\n $disabled &&\n css`\n background-color: ${colors.gray94};\n border-color: ${colors.gray50};\n color: ${colors.gray45};\n cursor: default;\n pointer-events: none;\n\n ${StyledLabel} {\n color: ${colors.gray70};\n }\n\n ${StyledArrow} {\n svg {\n fill: ${colors.gray70};\n }\n }\n `}\n\n ${({ $error, $disabled }) => {\n if ($error && !$disabled) {\n return css`\n &,\n &:hover {\n border-color: ${colors.red50};\n border-color: var(--core-input-error-border-color, ${colors.red50});\n }\n &:hover:focus {\n ${getFocus()}\n }\n `\n }\n }}\n\n ${({ $hasClearIcon }) => css`\n ${StyledClearIcon} {\n opacity: ${$hasClearIcon ? 1 : 0};\n }\n `}\n\n ${({ $multiple }) =>\n $multiple &&\n css`\n height: auto;\n\n &:focus-within {\n ${getFocus()}\n }\n `}\n\n ${({ $open, $hasClearIcon }) =>\n $open &&\n $hasClearIcon &&\n css`\n ${StyledClearIcon} {\n opacity: 1;\n pointer-events: all;\n }\n `}\n\n ${({ $open, $placeholder = false }) =>\n $open &&\n $placeholder &&\n css`\n ${StyledLabel} {\n opacity: 1;\n pointer-events: all;\n }\n `}\n }\n`\n\nexport const StyledOverlay = styled(Card)`\n display: flex;\n flex-direction: column;\n`\n\nexport const StyledVirtuoso = styled(Virtuoso)`\n flex: 1 1 auto;\n`\n\nexport const StyledEllipses = styled.div`\n ${getEllipsis()}\n display: inline-flex;\n\n > div {\n display: inline-flex;\n width: 100%;\n }\n`\n\nexport const StyledMultiValueContainer = styled.div`\n display: flex;\n flex-wrap: wrap;\n margin-bottom: 2px;\n margin-right: ${spacing.xs}px;\n margin-top: 2px;\n min-width: 0;\n width: 100%;\n`\n\nexport const StyledMultiValue = styled.div`\n margin-bottom: 2px;\n margin-right: ${spacing.xs}px;\n margin-top: 2px;\n flex: 0 1 auto;\n\n > div {\n max-width: 178px;\n width: 100%;\n }\n`\n\nexport const StyledMultiInputContainer = styled.div`\n margin-bottom: 2px;\n margin-right: ${spacing.xs}px;\n margin-top: 2px;\n flex: 1;\n max-width: 100%;\n min-width: 24px;\n`\n\nexport const StyledMultiInput = styled.input<{\n $isNavigatingTokens?: boolean\n}>`\n background-color: transparent;\n border-width: 0;\n font-family: inherit;\n padding: 0;\n height: 24px;\n width: 100%;\n\n ${getTypographyIntent('body')}\n\n ${({ $isNavigatingTokens }) =>\n $isNavigatingTokens &&\n css`\n color: transparent;\n `}\n\n &::-ms-clear {\n display: none;\n }\n\n &:focus {\n box-shadow: none;\n outline: none;\n }\n\n &::placeholder {\n color: ${colors.gray45};\n }\n`\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAgB;AACzC,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,GAAG,QAAQ,YAAY;AAChC,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,mBAAmB,QAAQ,6BAA6B;AACjE,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,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gBAAG1H,MAAM,CAACwB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,iHAIjCZ,OAAO,CAACa,EAAE,CAI3B;AAED,OAAO,IAAM+F,gBAAgB,gBAAG3H,MAAM,CAACwB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,8GAExBZ,OAAO,CAACa,EAAE,CAQ3B;AAED,OAAO,IAAMgG,yBAAyB,gBAAG5H,MAAM,CAACwB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,mGAEjCZ,OAAO,CAACa,EAAE,CAK3B;AAED,OAAO,IAAMiG,gBAAgB,gBAAG7H,MAAM,CAAC8H,KAAK,CAAArG,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gNAUxClB,mBAAmB,CAAC,MAAM,CAAC,EAE3B,UAAAsH,MAAA;EAAA,IAAGC,mBAAmB,GAAAD,MAAA,CAAnBC,mBAAmB;EAAA,OACtBA,mBAAmB,IACnB/H,GAAG,wBAEF;AAAA,GAYQW,MAAM,CAAC4C,MAAM,CAEzB"}
1
+ {"version":3,"file":"SuperSelect.styles.js","names":["Virtuoso","styled","css","Box","Button","StyledButton","Card","StyledCheckboxLabel","Pill","StyledCircle","getTypographyIntent","typographyWeights","borderRadius","colors","getEllipsis","getFocus","spacing","dataQa","focused","hovered","optionMinHeight","checkedIconPlaceholderWidth","styledSelectButtonDefaultWidth","extendedSelectMenuWidth","PillSelectOptionWrapper","div","withConfig","displayName","componentId","xs","lg","PillSelectLabel","PillSelectLabelWrapper","_ref","disabled","StyledCheckboxContainer","StyledCheckmarkContainer","blue50","sm","StyledWrapper","StyledMenu","StyledOptions","_ref2","_ref2$$scrollable","$scrollable","StyledItemContent","StyledOptionGroupLabel","md","StyledItemLabel","_ref3","$draggable","StyledDraggableWrapper","StyledGrip","StyledFooter","gray85","StyledHeader","StyledEmptyMessage","gray45","StyledSearchContainer","StyledGroup","gray15","_ref4","$clickable","semibold","StyledItem","_ref5","$emptyMinHeight","_ref6","$isDraggingOver","$highlighted","_ref7","$disabled","$isDraggingDisabled","gray96","_ref8","concat","_ref9","$selected","_ref0","$isDraggable","_ref1","$isDragging","StyledSelectAll","StyledDroppable","StyledSelectMenu","StyledLabel","_ref10","$hoverable","StyledIndicators","StyledClearIcon","StyledSpinner","StyledArrowContainer","StyledArrow","span","StyledArrowOutline","polygon","StyledArrowFill","StyledTrigger","white","gray50","_ref11","$block","gray20","_ref12","_ref12$$placeholder","$placeholder","_ref13","gray94","gray70","_ref14","$error","red50","_ref15","$hasClearIcon","_ref16","$multiple","_ref17","$open","_ref18","_ref18$$placeholder","StyledOverlay","StyledVirtuoso","StyledEllipses","StyledMultiValueContainer","StyledMultiValue","StyledMultiInputContainer","StyledMultiInput","input","_ref19","$isNavigatingTokens"],"sources":["../../src/SuperSelect/SuperSelect.styles.ts"],"sourcesContent":["import { Virtuoso } from 'react-virtuoso'\nimport styled, { css } from 'styled-components'\nimport { Box } from '../Box/Box'\nimport { Button } from '../Button'\nimport { StyledButton } from '../Button/Button.styles'\nimport { Card } from '../Card/Card'\nimport { StyledCheckboxLabel } from '../Checkbox/Checkbox.styles'\nimport { Pill } from '../Pill/Pill'\nimport { StyledCircle } from '../Spinner/Spinner.styles'\nimport {\n getTypographyIntent,\n typographyWeights,\n} from '../Typography/Typography.styles'\nimport { borderRadius } from '../_styles/borderRadius'\nimport { colors } from '../_styles/colors'\nimport { getEllipsis, getFocus } from '../_styles/mixins'\nimport { spacing } from '../_styles/spacing'\n\nexport type SuperSelectStyledTriggerProps = {\n $block?: boolean\n $disabled?: boolean\n $error?: boolean\n $hasClearIcon?: boolean\n $loading?: boolean\n $multiple?: boolean\n $open?: boolean\n $placeholder?: boolean\n}\n\nexport const dataQa = {\n focused: 'core-select-focused',\n hovered: 'core-select-hovered',\n}\n\nconst optionMinHeight = 32\n\nconst checkedIconPlaceholderWidth = 32\n\nconst styledSelectButtonDefaultWidth = 248\n\nexport const extendedSelectMenuWidth = 360\n\nexport const PillSelectOptionWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ${spacing.xs}px ${spacing.lg}px;\n`\n\nexport const PillSelectLabel = styled(Pill)`\n ${getEllipsis}\n`\n\nexport const PillSelectLabelWrapper = styled.div<{ disabled?: boolean }>`\n display: flex;\n max-width: 100%;\n pointer-events: auto;\n\n ${({ disabled }) =>\n disabled &&\n css`\n pointer-events: none;\n `}\n`\n\nexport const StyledCheckboxContainer = styled.div`\n padding-left: ${spacing.lg}px;\n`\n\nexport const StyledCheckmarkContainer = styled.div`\n align-items: center;\n color: ${colors.blue50};\n display: inline-flex;\n flex-shrink: 0;\n padding: 0 ${spacing.lg}px 0 ${spacing.sm}px;\n`\n\n// Do not merge with StyledMenu, needed for max-height working in IE\nexport const StyledWrapper = styled.div`\n display: flex;\n max-height: inherit;\n min-width: inherit;\n outline: none;\n width: inherit;\n`\n\nexport const StyledMenu = styled.div`\n display: flex;\n flex-direction: column;\n outline: 0;\n width: 100%;\n`\n\nexport const StyledOptions = styled.div<{ $scrollable?: boolean }>`\n flex-basis: auto;\n flex-grow: 1;\n flex-shrink: 1;\n min-height: ${optionMinHeight}px;\n ${({ $scrollable = true }) => $scrollable && `overflow-y: auto`};\n padding: ${spacing.sm}px 0;\n position: relative;\n overflow: hidden;\n\n &:focus {\n ${getFocus()}\n margin: -1px;\n }\n`\n\nexport const StyledItemContent = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n`\n\nexport const StyledOptionGroupLabel = styled.div`\n padding: ${spacing.md}px 0 ${spacing.xs}px ${spacing.lg}px;\n`\n\nexport const StyledItemLabel = styled.div<{\n $draggable?: boolean\n $selectionStyle?: 'highlight' | 'checkbox' | 'checkmark'\n}>`\n ${({ $draggable }) => {\n return css`\n padding: ${spacing.xs}px ${$draggable ? 0 : spacing.lg}px;\n overflow-wrap: anywhere;\n `\n }}\n`\n\nexport const StyledDraggableWrapper = styled.div`\n display: flex;\n width: 100%;\n align-items: center;\n`\n\nexport const StyledGrip = styled.div`\n padding: 0 2px;\n height: 24px;\n visibility: hidden;\n`\n\nexport const StyledFooter = styled(Box)`\n border-top: 1px solid ${colors.gray85};\n`\n\nexport const StyledHeader = styled.div``\n\nexport const StyledEmptyMessage = styled.div`\n ${getTypographyIntent('body')};\n\n padding: ${spacing.md}px ${spacing.lg}px;\n color: ${colors.gray45};\n`\n\nexport const StyledSearchContainer = styled.div`\n padding: ${spacing.lg}px ${spacing.lg}px ${spacing.sm}px;\n\n ${StyledButton} > * {\n pointer-events: none;\n }\n`\n\nexport const StyledGroup = styled.div<{ $clickable?: boolean }>`\n ${getTypographyIntent('body')}\n\n color: ${colors.gray15};\n cursor: ${({ $clickable }) => ($clickable ? 'pointer' : 'default')};\n font-weight: ${typographyWeights.semibold};\n padding: ${spacing.xs}px ${spacing.lg}px;\n\n &:not(:first-child) {\n padding-top: ${spacing.md + spacing.xs}px;\n }\n\n && {\n padding: 0;\n }\n\n ${StyledOptionGroupLabel} {\n padding: ${spacing.xs}px ${spacing.lg} px;\n }\n\n &:not(:first-child) {\n ${StyledOptionGroupLabel} {\n padding-top: ${spacing.md + spacing.xs} px;\n }\n }\n`\n\nexport const StyledItem = styled.div<{\n $disabled?: boolean\n $selected?: boolean\n $highlighted?: boolean\n $isDraggable?: boolean\n $isDragging?: boolean\n $emptyMinHeight?: number\n $isDraggingOver?: boolean\n $isDraggingDisabled?: boolean\n}>`\n ${getTypographyIntent('body')};\n\n align-items: center;\n cursor: pointer;\n list-style-type: none;\n display: flex;\n padding: 0;\n\n ${({ $emptyMinHeight }) => {\n return css`\n &:empty {\n min-height: ${$emptyMinHeight}px;\n }\n `\n }}\n\n ${({ $isDraggingOver, $highlighted }) => {\n return (\n $isDraggingOver &&\n $highlighted &&\n css`\n background-color: initial;\n `\n )\n }}\n\n ${({ $isDraggingOver, $disabled, $isDraggingDisabled }) => {\n return (\n ($isDraggingOver || $disabled || $isDraggingDisabled) &&\n css`\n &:hover {\n ${StyledGrip} {\n visibility: hidden;\n }\n }\n `\n )\n }}\n\n a {\n // We decided to use a negative margin trick here to allow us to continue\n // to use listNavigation without having to rewrite a bunch of code in js\n color: ${colors.gray15};\n display: block;\n margin: -${spacing.xs}px -${spacing.lg}px;\n padding: ${spacing.xs}px ${spacing.lg}px;\n text-decoration: none;\n\n &:hover {\n color: ${colors.gray15};\n text-decoration: none;\n }\n }\n\n &[data-highlighted='true'] {\n background-color: ${colors.gray96};\n }\n\n ${({ $highlighted }) => $highlighted && `background-color: ${colors.gray96};`}\n\n &:hover,\n &:active {\n ${StyledGrip} {\n visibility: visible;\n }\n }\n\n ${StyledCheckboxLabel} {\n color: inherit;\n cursor: pointer;\n }\n\n ${({ $disabled, $selected }) => {\n if ($disabled) {\n return css`\n &,\n ${StyledCheckboxLabel} {\n color: ${colors.gray85};\n cursor: default;\n }\n `\n } else if ($selected) {\n return css`\n color: ${colors.blue50};\n font-weight: 700;\n\n a,\n a:hover {\n color: ${colors.blue50};\n text-decoration: none;\n }\n\n &[data-highlighted='true'] {\n background-color: ${colors.gray96};\n }\n `\n }\n\n return css`\n color: ${colors.gray15};\n\n &[data-highlighted='true'] {\n background-color: ${colors.gray96};\n }\n `\n }}\n\n ${({ $isDraggable }) => {\n if ($isDraggable) {\n return css`\n ${StyledCheckboxLabel} {\n cursor: grab;\n\n // The unchecked and checked icons\n &:before,\n &:after {\n cursor: pointer;\n }\n }\n\n &&& {\n padding-left: 0;\n }\n `\n }\n }}\n\n ${({ $isDragging }) => {\n if ($isDragging) {\n return css`\n background-color: ${colors.gray96};\n\n ${StyledGrip} {\n visibility: visible;\n }\n `\n }\n }}\n`\n\nexport const StyledSelectAll = styled(Box)`\n padding-top: ${spacing.md}px;\n padding-bottom: ${spacing.md}px;\n border-bottom: 1px solid ${colors.gray85};\n`\n\nexport const StyledDroppable = styled.div`\n ${StyledGroup}, ${StyledItem} {\n padding-left: 28px;\n }\n`\n\nexport const StyledSelectMenu = styled(Card)`\n display: flex;\n max-height: 40vh;\n max-width: ${styledSelectButtonDefaultWidth}px;\n min-width: inherit;\n`\n\nexport const StyledLabel = styled.div<{ $hoverable: boolean }>`\n ${getEllipsis()}\n flex-grow: 1;\n margin-right: ${spacing.sm}px;\n outline: none;\n pointer-events: ${({ $hoverable }) => ($hoverable ? 'initial' : 'none')};\n user-select: none;\n`\n\nexport const StyledIndicators = styled.div`\n align-items: center;\n align-self: flex-start;\n display: flex;\n height: 34px;\n justify-content: flex-end;\n margin-left: ${spacing.xs}px;\n min-width: 40px;\n width: 40px;\n`\n\nexport const StyledClearIcon = styled(Button)``\n\nexport const StyledSpinner = styled.div`\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n line-height: 0;\n`\n\nexport const StyledArrowContainer = styled.div`\n align-items: center;\n display: inline-flex;\n height: 16px;\n justify-content: flex-end;\n margin-left: ${spacing.sm}px;\n width: 8px;\n`\n\nexport const StyledArrow = styled.span`\n display: inline-flex;\n\n svg {\n fill: ${colors.gray45};\n }\n`\n\nexport const StyledArrowOutline = styled.polygon``\n\nexport const StyledArrowFill = styled.polygon``\n\nexport const StyledTrigger = styled.div<SuperSelectStyledTriggerProps>`\n ${getTypographyIntent('body')}\n\n align-items: center;\n background-color: ${colors.white};\n border-color: ${colors.gray50};\n border-radius: ${borderRadius.md}px;\n border-style: solid;\n border-width: 1px;\n color: ${colors.gray15};\n cursor: pointer;\n display: inline-flex;\n height: 36px;\n min-height: 36px;\n outline: none;\n padding: 0 ${spacing.md}px;\n position: relative;\n white-space: nowrap;\n width: ${({ $block }) =>\n $block ? '100%' : `${styledSelectButtonDefaultWidth}px`};\n\n &::placeholder {\n border-color: ${colors.gray45};\n }\n\n &:hover,\n &:active,\n &[data-qa=${dataQa.hovered}] {\n background-color: ${colors.white};\n border-color: ${colors.gray20};\n color: ${colors.gray15};\n }\n\n &:focus,\n &:focus-within,\n &[data-qa=${dataQa.focused}] {\n ${getFocus()}\n\n ${StyledCircle} {\n stroke: ${colors.blue50};\n }\n }\n\n ${({ $placeholder = false }) =>\n $placeholder &&\n css`\n ${StyledLabel} {\n color: ${colors.gray45};\n }\n `}\n\n ${({ $disabled }) =>\n $disabled &&\n css`\n background-color: ${colors.gray94};\n border-color: ${colors.gray50};\n color: ${colors.gray45};\n cursor: default;\n pointer-events: none;\n\n ${StyledLabel} {\n color: ${colors.gray70};\n }\n\n ${StyledArrow} {\n svg {\n fill: ${colors.gray70};\n }\n }\n `}\n\n ${({ $error, $disabled }) => {\n if ($error && !$disabled) {\n return css`\n &,\n &:hover {\n border-color: ${colors.red50};\n border-color: var(--core-input-error-border-color, ${colors.red50});\n }\n &:hover:focus {\n ${getFocus()}\n }\n `\n }\n }}\n\n ${({ $hasClearIcon }) => css`\n ${StyledClearIcon} {\n opacity: ${$hasClearIcon ? 1 : 0};\n }\n `}\n\n ${({ $multiple }) =>\n $multiple &&\n css`\n height: auto;\n\n &:focus-within {\n ${getFocus()}\n }\n `}\n\n ${({ $open, $hasClearIcon }) =>\n $open &&\n $hasClearIcon &&\n css`\n ${StyledClearIcon} {\n opacity: 1;\n pointer-events: all;\n }\n `}\n\n ${({ $open, $placeholder = false }) =>\n $open &&\n $placeholder &&\n css`\n ${StyledLabel} {\n opacity: 1;\n pointer-events: all;\n }\n `}\n }\n`\n\nexport const StyledOverlay = styled(Card)`\n display: flex;\n flex-direction: column;\n`\n\nexport const StyledVirtuoso = styled(Virtuoso)`\n flex: 1 1 auto;\n`\n\nexport const StyledEllipses = styled.div`\n ${getEllipsis()}\n display: inline-flex;\n\n > div {\n display: inline-flex;\n width: 100%;\n }\n`\n\nexport const StyledMultiValueContainer = styled.div`\n display: flex;\n flex-wrap: wrap;\n margin-bottom: 2px;\n margin-right: ${spacing.xs}px;\n margin-top: 2px;\n min-width: 0;\n width: 100%;\n`\n\nexport const StyledMultiValue = styled.div`\n margin-bottom: 2px;\n margin-right: ${spacing.xs}px;\n margin-top: 2px;\n flex: 0 1 auto;\n\n > div {\n max-width: 178px;\n width: 100%;\n }\n`\n\nexport const StyledMultiInputContainer = styled.div`\n margin-bottom: 2px;\n margin-right: ${spacing.xs}px;\n margin-top: 2px;\n flex: 1;\n max-width: 100%;\n min-width: 24px;\n`\n\nexport const StyledMultiInput = styled.input<{\n $isNavigatingTokens?: boolean\n}>`\n background-color: transparent;\n border-width: 0;\n font-family: inherit;\n padding: 0;\n height: 24px;\n width: 100%;\n\n ${getTypographyIntent('body')}\n\n ${({ $isNavigatingTokens }) =>\n $isNavigatingTokens &&\n css`\n color: transparent;\n `}\n\n &::-ms-clear {\n display: none;\n }\n\n &:focus {\n box-shadow: none;\n outline: none;\n }\n\n &::placeholder {\n color: ${colors.gray45};\n }\n`\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAgB;AACzC,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,GAAG,QAAQ,YAAY;AAChC,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,mBAAmB,QAAQ,6BAA6B;AACjE,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,YAAY,QAAQ,2BAA2B;AACxD,SACEC,mBAAmB,EACnBC,iBAAiB,QACZ,iCAAiC;AACxC,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,WAAW,EAAEC,QAAQ,QAAQ,mBAAmB;AACzD,SAASC,OAAO,QAAQ,oBAAoB;AAa5C,OAAO,IAAMC,MAAM,GAAG;EACpBC,OAAO,EAAE,qBAAqB;EAC9BC,OAAO,EAAE;AACX,CAAC;AAED,IAAMC,eAAe,GAAG,EAAE;AAE1B,IAAMC,2BAA2B,GAAG,EAAE;AAEtC,IAAMC,8BAA8B,GAAG,GAAG;AAE1C,OAAO,IAAMC,uBAAuB,GAAG,GAAG;AAE1C,OAAO,IAAMC,uBAAuB,gBAAGvB,MAAM,CAACwB,GAAG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AC,MAAM,CAAC,EAE3B,UAAAsH,MAAA;EAAA,IAAGC,mBAAmB,GAAAD,MAAA,CAAnBC,mBAAmB;EAAA,OACtBA,mBAAmB,IACnB/H,GAAG,wBAEF;AAAA,GAYQW,MAAM,CAAC4C,MAAM,CAEzB"}
@@ -55,6 +55,7 @@ export interface SuperSelectConfig {
55
55
  multiple?: boolean;
56
56
  onChange?: (value: SuperSelectValue) => void;
57
57
  onManualSort?: (options: SuperSelectOption[]) => void;
58
+ onUnselectAll?: (value: SuperSelectValue, options: SuperSelectOption[], searchValue: string, getValue: (opt: SuperSelectOption) => Array<SuperSelectValuePrimitive>) => SuperSelectValue;
58
59
  /**
59
60
  * Callback function triggered when the "Select All" functionality is used in a multi-select SuperSelect.
60
61
  *
@@ -91,6 +92,7 @@ export interface SuperSelectConfig {
91
92
  value?: SuperSelectValue;
92
93
  overlayMatchesTriggerWidth?: boolean;
93
94
  'aria-label'?: string;
95
+ 'aria-labelledby'?: string;
94
96
  }
95
97
  export declare type SuperSelectProps = SuperSelectConfig;
96
98
  export interface SuperSelectApi {
@@ -140,6 +142,8 @@ export interface SuperSelectApi {
140
142
  sourceOptions: SuperSelectOption[];
141
143
  value: SuperSelectValue;
142
144
  width: number;
145
+ labelId: string;
146
+ valueId: string;
143
147
  };
144
148
  props: {
145
149
  clear: () => Record<string, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"SuperSelect.types.js","names":[],"sources":["../../src/SuperSelect/SuperSelect.types.ts"],"sourcesContent":["import type React from 'react'\nimport type { VirtuosoHandle } from 'react-virtuoso'\nimport type * as defaultComponents from './SuperSelect.components'\nimport type { isOptgroupSymbol } from './SuperSelect.constants'\n\nexport interface TokenNavigationProps {\n activeIndex?: number | null\n enabled?: boolean\n onChange?: (value: SuperSelectValue) => void\n onNavigate?: (index: number | null) => void\n value?: SuperSelectValue\n}\n\nexport interface KeyboardSelectionProps {\n enabled?: boolean\n onSelect?: () => void\n}\n\nexport type SuperSelectValuePrimitive = boolean | string | number\n\nexport type SuperSelectValue =\n | SuperSelectValuePrimitive\n | Array<SuperSelectValuePrimitive>\n | null\n\nexport type SuperSelectOption = any\n\nexport type SuperSelectPreset = '' | 'pill' | 'filter' | 'contacts'\n\nexport type SuperSelectResult = {\n destination?: { index: number } | null\n source: { index: number }\n}\n\nexport interface SuperSelectPresetProps {\n filter?: {\n filterName?: string\n }\n pill?: {}\n contacts?: {}\n ''?: {}\n}\n\nexport interface SuperSelectConfig {\n block?: boolean\n components?: Partial<typeof defaultComponents>\n defaultValue?: SuperSelectValue\n disabled?: boolean\n draggable?: boolean\n emptyMessage?: string\n selectAllEnabled?: boolean\n error?: boolean\n footer?: React.ReactElement\n getOptionGroup?: (option: SuperSelectOption) => string\n getOptionIsBatch?: (option: SuperSelectOption) => boolean\n getOptionIsDisabled?: (option: SuperSelectOption) => boolean\n getOptionIsPartiallySelected?: (option: SuperSelectOption) => boolean\n getOptionIsSelected?: (option: SuperSelectOption) => boolean\n getOptionLabel?: (option: SuperSelectOption) => string\n getOptionValue?: (option: SuperSelectOption) => SuperSelectValuePrimitive\n header?: React.ReactElement\n loading?: boolean\n multiple?: boolean\n onChange?: (value: SuperSelectValue) => void\n onManualSort?: (options: SuperSelectOption[]) => void\n /**\n * Callback function triggered when the \"Select All\" functionality is used in a multi-select SuperSelect.\n *\n * This prop is only relevant when `multiple={true}` and `selectAllEnabled={true}`. The callback is invoked\n * when users interact with a select all option in the select list that allows them to\n * select or deselect all available options at once.\n *\n * @param selectedOptions - An array of all options that would be selected when \"Select All\" is triggered.\n * This includes all selectable options (excluding disabled options) that are\n * currently visible and available for selection.\n *\n * @remarks\n * - Only called when the component is in multi-select mode (`multiple={true}`)\n * - Requires `selectAllEnabled={true}` to show the select-all UI\n * - Disabled options are automatically excluded from the selectedOptions array\n * - Allows additional customization of select-all behavior if needed by implementing custom logic within the callback\n *\n * @see {@link selectAllEnabled} - Enable the select-all functionality\n * @see {@link multiple} - Enable multi-select mode\n * @see {@link getOptionIsDisabled} - Function to determine if options are disabled\n */\n onSelectAll?: (selectedOptions: SuperSelectOption[]) => void\n onScrollBottom?: () => void\n onOpenChange?: (open: boolean) => void\n options?: SuperSelectOption[]\n placeholder?: string\n preset?: SuperSelectPreset\n presetProps?: SuperSelectPresetProps\n search?: boolean\n selectionStyle?: 'highlight' | 'checkbox' | 'checkmark'\n setOptionGroup?: (\n option: SuperSelectOption,\n group: string\n ) => SuperSelectOption\n sort?: boolean\n tabIndex?: number\n value?: SuperSelectValue\n overlayMatchesTriggerWidth?: boolean\n 'aria-label'?: string\n}\n\nexport type SuperSelectProps = SuperSelectConfig\n\nexport interface SuperSelectApi {\n config: {\n block: boolean\n disabled: boolean\n draggable: boolean\n emptyMessage: string\n error?: boolean\n footer?: React.ReactElement\n header?: React.ReactElement\n placeholder?: string\n preset: SuperSelectPreset\n presetProps?: any\n selectionStyle: 'highlight' | 'token' | 'checkbox' | 'checkmark'\n tabIndex: number\n loading: boolean\n multiple: boolean\n selectAllEnabled: boolean\n }\n components: typeof defaultComponents\n state: {\n activeMenuIndex: number | null\n activeTokenIndex: number | null\n isEmpty: () => boolean\n isSelectAllActive: boolean\n listContainerHeight: number\n listId: string\n maxHeight: number\n onDragEnd: (result: SuperSelectResult) => void\n onSelect: (option: SuperSelectOption) => void\n onSelectAll?: (selectedOptions: SuperSelectOption[]) => void\n open: boolean\n options: SuperSelectOption[]\n overlayId: string\n searchValue: string\n selectAllOption: SuperSelectOption\n selectedIndex: number | null\n selectedLabel: string\n selectedOption: SuperSelectOption | null\n setOpen: (open: boolean) => void\n setPointer: any\n setActiveMenuIndex: (index: number | null) => void\n setSearchValue: ((value: string) => void) & { cancel: () => void }\n sourceOptions: SuperSelectOption[]\n value: SuperSelectValue\n width: number\n }\n props: {\n clear: () => Record<string, any>\n emptyMessage: () => Record<string, any>\n footer: () => Record<string, any>\n header: () => Record<string, any>\n item: (...args: any[]) => Record<string, any>\n label: () => Record<string, any>\n menu: () => Record<string, any>\n multiInput: () => Record<string, any>\n overlay: () => Record<string, any>\n search: () => Record<string, any>\n searchContainer: () => Record<string, any>\n tokenClear: (index: number) => Record<string, any>\n trigger: () => Record<string, any>\n virtuoso: () => Record<string, any>\n }\n option: {\n group: (option: SuperSelectOption) => string\n isBatch: (option: SuperSelectOption) => boolean\n isPartiallySelected: (option: SuperSelectOption) => boolean\n isSelected: (option: SuperSelectOption) => boolean\n isDisabled: (option: SuperSelectOption) => boolean\n isOptgroup: (option: SuperSelectOption) => boolean\n isOptSelectAll: (option: SuperSelectOption) => boolean\n label: (option: SuperSelectOption) => string\n selectAll: {\n isSelectAllPartiallySelected: (options: SuperSelectOption[]) => boolean\n isSelectAllSelected: (options: SuperSelectOption[]) => boolean\n }\n value: (option: SuperSelectOption) => SuperSelectValuePrimitive\n }\n refs: {\n floating: any\n navigationList: any\n virtuoso: React.RefObject<VirtuosoHandle>\n }\n}\n\nexport interface SuperSelectTriggerProps {\n block?: boolean\n disabled?: boolean\n error?: boolean\n loading?: boolean\n placeholder?: string\n search?: boolean\n tabIndex?: number\n}\n\nexport interface SuperSelectOptgroup {\n label: string\n id: string\n [isOptgroupSymbol]: true\n}\n\nexport interface SuperSelectMenuItemProps\n extends React.HTMLAttributes<HTMLDivElement> {\n isDragging?: boolean\n // data attributes are passed by Virtuoso\n 'data-known-size'?: number\n 'data-index': number\n}\n"],"mappings":""}
1
+ {"version":3,"file":"SuperSelect.types.js","names":[],"sources":["../../src/SuperSelect/SuperSelect.types.ts"],"sourcesContent":["import type React from 'react'\nimport type { VirtuosoHandle } from 'react-virtuoso'\nimport type * as defaultComponents from './SuperSelect.components'\nimport type { isOptgroupSymbol } from './SuperSelect.constants'\n\nexport interface TokenNavigationProps {\n activeIndex?: number | null\n enabled?: boolean\n onChange?: (value: SuperSelectValue) => void\n onNavigate?: (index: number | null) => void\n value?: SuperSelectValue\n}\n\nexport interface KeyboardSelectionProps {\n enabled?: boolean\n onSelect?: () => void\n}\n\nexport type SuperSelectValuePrimitive = boolean | string | number\n\nexport type SuperSelectValue =\n | SuperSelectValuePrimitive\n | Array<SuperSelectValuePrimitive>\n | null\n\nexport type SuperSelectOption = any\n\nexport type SuperSelectPreset = '' | 'pill' | 'filter' | 'contacts'\n\nexport type SuperSelectResult = {\n destination?: { index: number } | null\n source: { index: number }\n}\n\nexport interface SuperSelectPresetProps {\n filter?: {\n filterName?: string\n }\n pill?: {}\n contacts?: {}\n ''?: {}\n}\n\nexport interface SuperSelectConfig {\n block?: boolean\n components?: Partial<typeof defaultComponents>\n defaultValue?: SuperSelectValue\n disabled?: boolean\n draggable?: boolean\n emptyMessage?: string\n selectAllEnabled?: boolean\n error?: boolean\n footer?: React.ReactElement\n getOptionGroup?: (option: SuperSelectOption) => string\n getOptionIsBatch?: (option: SuperSelectOption) => boolean\n getOptionIsDisabled?: (option: SuperSelectOption) => boolean\n getOptionIsPartiallySelected?: (option: SuperSelectOption) => boolean\n getOptionIsSelected?: (option: SuperSelectOption) => boolean\n getOptionLabel?: (option: SuperSelectOption) => string\n getOptionValue?: (option: SuperSelectOption) => SuperSelectValuePrimitive\n header?: React.ReactElement\n loading?: boolean\n multiple?: boolean\n onChange?: (value: SuperSelectValue) => void\n onManualSort?: (options: SuperSelectOption[]) => void\n onUnselectAll?: (\n value: SuperSelectValue,\n options: SuperSelectOption[],\n searchValue: string,\n getValue: (opt: SuperSelectOption) => Array<SuperSelectValuePrimitive>\n ) => SuperSelectValue\n /**\n * Callback function triggered when the \"Select All\" functionality is used in a multi-select SuperSelect.\n *\n * This prop is only relevant when `multiple={true}` and `selectAllEnabled={true}`. The callback is invoked\n * when users interact with a select all option in the select list that allows them to\n * select or deselect all available options at once.\n *\n * @param selectedOptions - An array of all options that would be selected when \"Select All\" is triggered.\n * This includes all selectable options (excluding disabled options) that are\n * currently visible and available for selection.\n *\n * @remarks\n * - Only called when the component is in multi-select mode (`multiple={true}`)\n * - Requires `selectAllEnabled={true}` to show the select-all UI\n * - Disabled options are automatically excluded from the selectedOptions array\n * - Allows additional customization of select-all behavior if needed by implementing custom logic within the callback\n *\n * @see {@link selectAllEnabled} - Enable the select-all functionality\n * @see {@link multiple} - Enable multi-select mode\n * @see {@link getOptionIsDisabled} - Function to determine if options are disabled\n */\n onSelectAll?: (selectedOptions: SuperSelectOption[]) => void\n onScrollBottom?: () => void\n onOpenChange?: (open: boolean) => void\n options?: SuperSelectOption[]\n placeholder?: string\n preset?: SuperSelectPreset\n presetProps?: SuperSelectPresetProps\n search?: boolean\n selectionStyle?: 'highlight' | 'checkbox' | 'checkmark'\n setOptionGroup?: (\n option: SuperSelectOption,\n group: string\n ) => SuperSelectOption\n sort?: boolean\n tabIndex?: number\n value?: SuperSelectValue\n overlayMatchesTriggerWidth?: boolean\n 'aria-label'?: string\n 'aria-labelledby'?: string\n}\n\nexport type SuperSelectProps = SuperSelectConfig\n\nexport interface SuperSelectApi {\n config: {\n block: boolean\n disabled: boolean\n draggable: boolean\n emptyMessage: string\n error?: boolean\n footer?: React.ReactElement\n header?: React.ReactElement\n placeholder?: string\n preset: SuperSelectPreset\n presetProps?: any\n selectionStyle: 'highlight' | 'token' | 'checkbox' | 'checkmark'\n tabIndex: number\n loading: boolean\n multiple: boolean\n selectAllEnabled: boolean\n }\n components: typeof defaultComponents\n state: {\n activeMenuIndex: number | null\n activeTokenIndex: number | null\n isEmpty: () => boolean\n isSelectAllActive: boolean\n listContainerHeight: number\n listId: string\n maxHeight: number\n onDragEnd: (result: SuperSelectResult) => void\n onSelect: (option: SuperSelectOption) => void\n onSelectAll?: (selectedOptions: SuperSelectOption[]) => void\n open: boolean\n options: SuperSelectOption[]\n overlayId: string\n searchValue: string\n selectAllOption: SuperSelectOption\n selectedIndex: number | null\n selectedLabel: string\n selectedOption: SuperSelectOption | null\n setOpen: (open: boolean) => void\n setPointer: any\n setActiveMenuIndex: (index: number | null) => void\n setSearchValue: ((value: string) => void) & { cancel: () => void }\n sourceOptions: SuperSelectOption[]\n value: SuperSelectValue\n width: number\n labelId: string\n valueId: string\n }\n props: {\n clear: () => Record<string, any>\n emptyMessage: () => Record<string, any>\n footer: () => Record<string, any>\n header: () => Record<string, any>\n item: (...args: any[]) => Record<string, any>\n label: () => Record<string, any>\n menu: () => Record<string, any>\n multiInput: () => Record<string, any>\n overlay: () => Record<string, any>\n search: () => Record<string, any>\n searchContainer: () => Record<string, any>\n tokenClear: (index: number) => Record<string, any>\n trigger: () => Record<string, any>\n virtuoso: () => Record<string, any>\n }\n option: {\n group: (option: SuperSelectOption) => string\n isBatch: (option: SuperSelectOption) => boolean\n isPartiallySelected: (option: SuperSelectOption) => boolean\n isSelected: (option: SuperSelectOption) => boolean\n isDisabled: (option: SuperSelectOption) => boolean\n isOptgroup: (option: SuperSelectOption) => boolean\n isOptSelectAll: (option: SuperSelectOption) => boolean\n label: (option: SuperSelectOption) => string\n selectAll: {\n isSelectAllPartiallySelected: (options: SuperSelectOption[]) => boolean\n isSelectAllSelected: (options: SuperSelectOption[]) => boolean\n }\n value: (option: SuperSelectOption) => SuperSelectValuePrimitive\n }\n refs: {\n floating: any\n navigationList: any\n virtuoso: React.RefObject<VirtuosoHandle>\n }\n}\n\nexport interface SuperSelectTriggerProps {\n block?: boolean\n disabled?: boolean\n error?: boolean\n loading?: boolean\n placeholder?: string\n search?: boolean\n tabIndex?: number\n}\n\nexport interface SuperSelectOptgroup {\n label: string\n id: string\n [isOptgroupSymbol]: true\n}\n\nexport interface SuperSelectMenuItemProps\n extends React.HTMLAttributes<HTMLDivElement> {\n isDragging?: boolean\n // data attributes are passed by Virtuoso\n 'data-known-size'?: number\n 'data-index': number\n}\n"],"mappings":""}
@@ -1,4 +1,4 @@
1
- import type { SuperSelectConfig, SuperSelectOptgroup, SuperSelectOption } from './SuperSelect.types';
1
+ import type { SuperSelectConfig, SuperSelectOptgroup, SuperSelectOption, SuperSelectValue, SuperSelectValuePrimitive } from './SuperSelect.types';
2
2
  export declare const getGroupNameIsValid: (groupName: unknown) => boolean;
3
3
  export declare const getOptionsSortingAlgorithm: ({ getOptionIsBatch, getOptionLabel, }: {
4
4
  getOptionIsBatch: NonNullable<SuperSelectConfig['getOptionIsBatch']>;
@@ -27,3 +27,4 @@ export declare const sortOptgroups: (groupA: string, groupB: string) => number;
27
27
  export declare function getIsAllOptionsUngrouped(groups: string[]): boolean;
28
28
  export declare function createOptgroup(groupName: string, groupOptions: SuperSelectOption[]): any[];
29
29
  export declare function removeEmptyOptGroups(options: SuperSelectOption[]): any[];
30
+ export declare function defaultOnUnselectAll(value: SuperSelectValue, options: SuperSelectOption[], searchValue: string, getValue: (opt: SuperSelectOption) => Array<SuperSelectValuePrimitive>): SuperSelectValue;
@@ -160,4 +160,21 @@ export function removeEmptyOptGroups(options) {
160
160
  return !(currentElementIsOptgroup && (nextElementIsOptgroup || currentElementIsLast));
161
161
  });
162
162
  }
163
+ export function defaultOnUnselectAll(value, options, searchValue, getValue) {
164
+ var currentValue = Array.isArray(value) ? value : [];
165
+ var valueSet = new Set(currentValue);
166
+ if (searchValue) {
167
+ var filteredOptions = options.filter(function (opt) {
168
+ return !getOptionIsOptgroup(opt);
169
+ });
170
+ filteredOptions.forEach(function (opt) {
171
+ getValue(opt).forEach(function (val) {
172
+ return valueSet["delete"](val);
173
+ });
174
+ });
175
+ return Array.from(valueSet);
176
+ } else {
177
+ return [];
178
+ }
179
+ }
163
180
  //# sourceMappingURL=SuperSelect.utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SuperSelect.utils.js","names":["isOptgroupSymbol","isOptSelectAllSymbol","getGroupNameIsValid","groupName","isGroupDefined","undefined","includes","length","getOptionsSortingAlgorithm","_ref","getOptionIsBatch","getOptionLabel","a","b","isOptionBatch1","isOptionBatch2","compareStrings","getBatchOptionFormatter","_ref2","value","multiple","getOptionValue","option","isMultiple","val","disabled","Array","isArray","every","v","_objectSpread","RESERVED_UNGROUPED_OPTGROUP_NAME","collectGroupsInOrderOfOccurrence","opts","getOptionGroup","output","reduce","_ref3","_groupedOptions$adjus","groups","groupedOptions","isGroupNameValid","adjustedGroupName","groupOptions","push","concat","_toConsumableArray","filter","group","findParentOptgroup","list","index","i","isOptgroup","getOptionIsOptgroup","id","reorder","options","startIndex","endIndex","nextOptions","_nextOptions$splice","splice","_nextOptions$splice2","_slicedToArray","removed","prevGroup","nextGroup","localeCompare","numeric","sensitivity","item","Boolean","getOptionIsOptSelectAll","sortOptgroups","groupA","groupB","getIsAllOptionsUngrouped","createOptgroup","optgroupHeader","_defineProperty","removeEmptyOptGroups","opt","arr","currentElementIsLast","currentElementIsOptgroup","nextElementIsOptgroup"],"sources":["../../src/SuperSelect/SuperSelect.utils.ts"],"sourcesContent":["import { isOptgroupSymbol, isOptSelectAllSymbol } from './SuperSelect.constants'\nimport type {\n SuperSelectConfig,\n SuperSelectOptgroup,\n SuperSelectOption,\n} from './SuperSelect.types'\n\nexport const getGroupNameIsValid = (groupName: unknown) => {\n const isGroupDefined = ![undefined, null, ''].includes(groupName as string)\n\n return isGroupDefined && typeof groupName === 'string' && groupName.length > 0\n}\n\nexport const getOptionsSortingAlgorithm =\n ({\n getOptionIsBatch,\n getOptionLabel,\n }: {\n getOptionIsBatch: NonNullable<SuperSelectConfig['getOptionIsBatch']>\n getOptionLabel: NonNullable<SuperSelectConfig['getOptionLabel']>\n }) =>\n (a: SuperSelectOption, b: SuperSelectOption) => {\n const isOptionBatch1 = getOptionIsBatch(a)\n const isOptionBatch2 = getOptionIsBatch(b)\n\n // move batched options up\n if (isOptionBatch1 && isOptionBatch2) {\n return compareStrings(getOptionLabel(a), getOptionLabel(b))\n } else if (isOptionBatch1) {\n return -1\n } else if (isOptionBatch2) {\n return 1\n }\n\n return compareStrings(getOptionLabel(a), getOptionLabel(b))\n }\n\nexport const getBatchOptionFormatter =\n ({\n value,\n multiple,\n getOptionIsBatch,\n getOptionValue,\n }: {\n value: SuperSelectConfig['value']\n multiple: NonNullable<SuperSelectConfig['multiple']>\n getOptionIsBatch: NonNullable<SuperSelectConfig['getOptionIsBatch']>\n getOptionValue: NonNullable<SuperSelectConfig['getOptionValue']>\n }) =>\n (option: SuperSelectOption) => {\n if (isMultiple(multiple, value) && getOptionIsBatch(option)) {\n const val = getOptionValue(option)\n\n const disabled = Array.isArray(val) && val.every((v) => value.includes(v))\n\n return {\n ...option,\n disabled,\n }\n }\n return option\n }\n\nexport const RESERVED_UNGROUPED_OPTGROUP_NAME =\n 'RESERVED_UNGROUPED_OPTGROUP_NAME'\n\nexport const collectGroupsInOrderOfOccurrence = (\n opts: SuperSelectOption[],\n getOptionGroup: NonNullable<SuperSelectConfig['getOptionGroup']>\n): {\n groups: string[]\n groupedOptions: Record<string, SuperSelectOption[]>\n} => {\n const output: {\n groups: string[]\n groupedOptions: Record<string, SuperSelectOption[]>\n } = opts.reduce(\n ({ groups, groupedOptions }, option) => {\n const groupName = getOptionGroup(option)\n\n // if group name is invalid, consider the option ungrouped\n const isGroupNameValid = getGroupNameIsValid(groupName)\n const adjustedGroupName = isGroupNameValid\n ? groupName\n : RESERVED_UNGROUPED_OPTGROUP_NAME\n\n const groupOptions = groupedOptions[adjustedGroupName] ?? []\n\n // push/assign for performance considerations\n groupOptions.push(option)\n groupedOptions[adjustedGroupName] = groupOptions\n\n return {\n groups: groups.includes(adjustedGroupName)\n ? groups\n : [...groups, adjustedGroupName],\n groupedOptions,\n }\n },\n {\n groups: [],\n groupedOptions: {},\n }\n )\n\n // if ungrouped options were found, lift them to the top\n if (output.groups.includes(RESERVED_UNGROUPED_OPTGROUP_NAME)) {\n return {\n groupedOptions: output.groupedOptions,\n groups: [\n RESERVED_UNGROUPED_OPTGROUP_NAME,\n ...output.groups.filter(\n (group) => group !== RESERVED_UNGROUPED_OPTGROUP_NAME\n ),\n ],\n }\n }\n\n return output\n}\n\nfunction findParentOptgroup(list: SuperSelectOption[], index: number) {\n for (let i = index; i >= 0; i--) {\n const option = list[i]\n const isOptgroup = getOptionIsOptgroup(option)\n\n if (isOptgroup) {\n return option.id\n }\n }\n // no parent optgroup was found, so the option is considered ungrouped\n return RESERVED_UNGROUPED_OPTGROUP_NAME\n}\n\nexport function reorder(\n options: SuperSelectOption[],\n startIndex: number,\n endIndex: number\n) {\n const nextOptions = [...options]\n const [removed] = nextOptions.splice(startIndex, 1)\n nextOptions.splice(endIndex, 0, removed)\n\n const prevGroup = findParentOptgroup(options, startIndex)\n const nextGroup = findParentOptgroup(nextOptions, endIndex)\n\n return { nextOptions, prevGroup, nextGroup }\n}\n\nfunction compareStrings(a: string, b: string) {\n return a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' })\n}\n\nexport function isMultiple<T>(multiple: boolean, value: T | T[]): value is T[] {\n return multiple && Array.isArray(value)\n}\n\nexport const getOptionIsOptgroup = (\n item: SuperSelectOption\n): item is SuperSelectOptgroup => {\n return Boolean(item[isOptgroupSymbol])\n}\n\nexport const getOptionIsOptSelectAll = (\n item: SuperSelectOption\n): item is SuperSelectOptgroup => {\n return Boolean(item[isOptSelectAllSymbol])\n}\n\nexport const sortOptgroups = (groupA: string, groupB: string) => {\n // always put ungrouped options on top\n if (groupA === RESERVED_UNGROUPED_OPTGROUP_NAME) {\n return -1\n }\n if (groupB === RESERVED_UNGROUPED_OPTGROUP_NAME) {\n return 1\n }\n return compareStrings(groupA, groupB)\n}\n\nexport function getIsAllOptionsUngrouped(groups: string[]) {\n return groups.length === 1 && groups[0] === RESERVED_UNGROUPED_OPTGROUP_NAME\n}\n\nexport function createOptgroup(\n groupName: string,\n groupOptions: SuperSelectOption[]\n) {\n // ungrouped options should not have a group header\n if (groupName === RESERVED_UNGROUPED_OPTGROUP_NAME) {\n return groupOptions\n }\n\n const optgroupHeader: SuperSelectOptgroup = {\n [isOptgroupSymbol]: true,\n id: groupName,\n label: groupName,\n }\n\n return [optgroupHeader, ...groupOptions]\n}\n\nexport function removeEmptyOptGroups(options: SuperSelectOption[]) {\n return options.filter((opt, index, arr) => {\n const currentElementIsLast = index === arr.length - 1\n const currentElementIsOptgroup = getOptionIsOptgroup(opt)\n const nextElementIsOptgroup =\n !currentElementIsLast && getOptionIsOptgroup(arr[index +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,MAAM,CAAC;AACvC,CAAC;AAED,OAAO,SAASC,wBAAwBA,CAACtC,MAAgB,EAAE;EACzD,OAAOA,MAAM,CAAChC,MAAM,KAAK,CAAC,IAAIgC,MAAM,CAAC,CAAC,CAAC,KAAKR,gCAAgC;AAC9E;AAEA,OAAO,SAAS+C,cAAcA,CAC5B3E,SAAiB,EACjBwC,YAAiC,EACjC;EACA;EACA,IAAIxC,SAAS,KAAK4B,gCAAgC,EAAE;IAClD,OAAOY,YAAY;EACrB;EAEA,IAAMoC,cAAmC,GAAAC,eAAA,CAAAA,eAAA,CAAAA,eAAA,KACtChF,gBAAgB,EAAG,IAAI,SACpBG,SAAS,YACNA,SAAS,CACjB;EAED,QAAQ4E,cAAc,EAAAlC,MAAA,CAAAC,kBAAA,CAAKH,YAAY;AACzC;AAEA,OAAO,SAASsC,oBAAoBA,CAACxB,OAA4B,EAAE;EACjE,OAAOA,OAAO,CAACV,MAAM,CAAC,UAACmC,GAAG,EAAE/B,KAAK,EAAEgC,GAAG,EAAK;IACzC,IAAMC,oBAAoB,GAAGjC,KAAK,KAAKgC,GAAG,CAAC5E,MAAM,GAAG,CAAC;IACrD,IAAM8E,wBAAwB,GAAG/B,mBAAmB,CAAC4B,GAAG,CAAC;IACzD,IAAMI,qBAAqB,GACzB,CAACF,oBAAoB,IAAI9B,mBAAmB,CAAC6B,GAAG,CAAChC,KAAK,GAAG,CAAC,CAAC,CAAC;IAE9D,OAAO,EACLkC,wBAAwB,KACvBC,qBAAqB,IAAIF,oBAAoB,CAAC,CAChD;EACH,CAAC,CAAC;AACJ"}
1
+ {"version":3,"file":"SuperSelect.utils.js","names":["isOptgroupSymbol","isOptSelectAllSymbol","getGroupNameIsValid","groupName","isGroupDefined","undefined","includes","length","getOptionsSortingAlgorithm","_ref","getOptionIsBatch","getOptionLabel","a","b","isOptionBatch1","isOptionBatch2","compareStrings","getBatchOptionFormatter","_ref2","value","multiple","getOptionValue","option","isMultiple","val","disabled","Array","isArray","every","v","_objectSpread","RESERVED_UNGROUPED_OPTGROUP_NAME","collectGroupsInOrderOfOccurrence","opts","getOptionGroup","output","reduce","_ref3","_groupedOptions$adjus","groups","groupedOptions","isGroupNameValid","adjustedGroupName","groupOptions","push","concat","_toConsumableArray","filter","group","findParentOptgroup","list","index","i","isOptgroup","getOptionIsOptgroup","id","reorder","options","startIndex","endIndex","nextOptions","_nextOptions$splice","splice","_nextOptions$splice2","_slicedToArray","removed","prevGroup","nextGroup","localeCompare","numeric","sensitivity","item","Boolean","getOptionIsOptSelectAll","sortOptgroups","groupA","groupB","getIsAllOptionsUngrouped","createOptgroup","optgroupHeader","_defineProperty","removeEmptyOptGroups","opt","arr","currentElementIsLast","currentElementIsOptgroup","nextElementIsOptgroup","defaultOnUnselectAll","searchValue","getValue","currentValue","valueSet","Set","filteredOptions","forEach","from"],"sources":["../../src/SuperSelect/SuperSelect.utils.ts"],"sourcesContent":["import { isOptgroupSymbol, isOptSelectAllSymbol } from './SuperSelect.constants'\nimport type {\n SuperSelectConfig,\n SuperSelectOptgroup,\n SuperSelectOption,\n SuperSelectValue,\n SuperSelectValuePrimitive,\n} from './SuperSelect.types'\n\nexport const getGroupNameIsValid = (groupName: unknown) => {\n const isGroupDefined = ![undefined, null, ''].includes(groupName as string)\n\n return isGroupDefined && typeof groupName === 'string' && groupName.length > 0\n}\n\nexport const getOptionsSortingAlgorithm =\n ({\n getOptionIsBatch,\n getOptionLabel,\n }: {\n getOptionIsBatch: NonNullable<SuperSelectConfig['getOptionIsBatch']>\n getOptionLabel: NonNullable<SuperSelectConfig['getOptionLabel']>\n }) =>\n (a: SuperSelectOption, b: SuperSelectOption) => {\n const isOptionBatch1 = getOptionIsBatch(a)\n const isOptionBatch2 = getOptionIsBatch(b)\n\n // move batched options up\n if (isOptionBatch1 && isOptionBatch2) {\n return compareStrings(getOptionLabel(a), getOptionLabel(b))\n } else if (isOptionBatch1) {\n return -1\n } else if (isOptionBatch2) {\n return 1\n }\n\n return compareStrings(getOptionLabel(a), getOptionLabel(b))\n }\n\nexport const getBatchOptionFormatter =\n ({\n value,\n multiple,\n getOptionIsBatch,\n getOptionValue,\n }: {\n value: SuperSelectConfig['value']\n multiple: NonNullable<SuperSelectConfig['multiple']>\n getOptionIsBatch: NonNullable<SuperSelectConfig['getOptionIsBatch']>\n getOptionValue: NonNullable<SuperSelectConfig['getOptionValue']>\n }) =>\n (option: SuperSelectOption) => {\n if (isMultiple(multiple, value) && getOptionIsBatch(option)) {\n const val = getOptionValue(option)\n\n const disabled = Array.isArray(val) && val.every((v) => value.includes(v))\n\n return {\n ...option,\n disabled,\n }\n }\n return option\n }\n\nexport const RESERVED_UNGROUPED_OPTGROUP_NAME =\n 'RESERVED_UNGROUPED_OPTGROUP_NAME'\n\nexport const collectGroupsInOrderOfOccurrence = (\n opts: SuperSelectOption[],\n getOptionGroup: NonNullable<SuperSelectConfig['getOptionGroup']>\n): {\n groups: string[]\n groupedOptions: Record<string, SuperSelectOption[]>\n} => {\n const output: {\n groups: string[]\n groupedOptions: Record<string, SuperSelectOption[]>\n } = opts.reduce(\n ({ groups, groupedOptions }, option) => {\n const groupName = getOptionGroup(option)\n\n // if group name is invalid, consider the option ungrouped\n const isGroupNameValid = getGroupNameIsValid(groupName)\n const adjustedGroupName = isGroupNameValid\n ? groupName\n : RESERVED_UNGROUPED_OPTGROUP_NAME\n\n const groupOptions = groupedOptions[adjustedGroupName] ?? []\n\n // push/assign for performance considerations\n groupOptions.push(option)\n groupedOptions[adjustedGroupName] = groupOptions\n\n return {\n groups: groups.includes(adjustedGroupName)\n ? groups\n : [...groups, adjustedGroupName],\n groupedOptions,\n }\n },\n {\n groups: [],\n groupedOptions: {},\n }\n )\n\n // if ungrouped options were found, lift them to the top\n if (output.groups.includes(RESERVED_UNGROUPED_OPTGROUP_NAME)) {\n return {\n groupedOptions: output.groupedOptions,\n groups: [\n RESERVED_UNGROUPED_OPTGROUP_NAME,\n ...output.groups.filter(\n (group) => group !== RESERVED_UNGROUPED_OPTGROUP_NAME\n ),\n ],\n }\n }\n\n return output\n}\n\nfunction findParentOptgroup(list: SuperSelectOption[], index: number) {\n for (let i = index; i >= 0; i--) {\n const option = list[i]\n const isOptgroup = getOptionIsOptgroup(option)\n\n if (isOptgroup) {\n return option.id\n }\n }\n // no parent optgroup was found, so the option is considered ungrouped\n return RESERVED_UNGROUPED_OPTGROUP_NAME\n}\n\nexport function reorder(\n options: SuperSelectOption[],\n startIndex: number,\n endIndex: number\n) {\n const nextOptions = [...options]\n const [removed] = nextOptions.splice(startIndex, 1)\n nextOptions.splice(endIndex, 0, removed)\n\n const prevGroup = findParentOptgroup(options, startIndex)\n const nextGroup = findParentOptgroup(nextOptions, endIndex)\n\n return { nextOptions, prevGroup, nextGroup }\n}\n\nfunction compareStrings(a: string, b: string) {\n return a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' })\n}\n\nexport function isMultiple<T>(multiple: boolean, value: T | T[]): value is T[] {\n return multiple && Array.isArray(value)\n}\n\nexport const getOptionIsOptgroup = (\n item: SuperSelectOption\n): item is SuperSelectOptgroup => {\n return Boolean(item[isOptgroupSymbol])\n}\n\nexport const getOptionIsOptSelectAll = (\n item: SuperSelectOption\n): item is SuperSelectOptgroup => {\n return Boolean(item[isOptSelectAllSymbol])\n}\n\nexport const sortOptgroups = (groupA: string, groupB: string) => {\n // always put ungrouped options on top\n if (groupA === RESERVED_UNGROUPED_OPTGROUP_NAME) {\n return -1\n }\n if (groupB === RESERVED_UNGROUPED_OPTGROUP_NAME) {\n return 1\n }\n return compareStrings(groupA, groupB)\n}\n\nexport function getIsAllOptionsUngrouped(groups: string[]) {\n return groups.length === 1 && groups[0] === RESERVED_UNGROUPED_OPTGROUP_NAME\n}\n\nexport function createOptgroup(\n groupName: string,\n groupOptions: SuperSelectOption[]\n) {\n // ungrouped options should not have a group header\n if (groupName === RESERVED_UNGROUPED_OPTGROUP_NAME) {\n return groupOptions\n }\n\n const optgroupHeader: SuperSelectOptgroup = {\n [isOptgroupSymbol]: true,\n id: groupName,\n label: groupName,\n }\n\n return [optgroupHeader, ...groupOptions]\n}\n\nexport function removeEmptyOptGroups(options: SuperSelectOption[]) {\n return options.filter((opt, index, arr) => {\n const currentElementIsLast = index === arr.length - 1\n const currentElementIsOptgroup = getOptionIsOptgroup(opt)\n const nextElementIsOptgroup =\n !currentElementIsLast && getOptionIsOptgroup(arr[index + 1])\n\n return !(\n currentElementIsOptgroup &&\n (nextElementIsOptgroup || currentElementIsLast)\n )\n })\n}\n\nexport function defaultOnUnselectAll(\n value: SuperSelectValue,\n options: SuperSelectOption[],\n searchValue: string,\n getValue: (opt: SuperSelectOption) => Array<SuperSelectValuePrimitive>\n): SuperSelectValue {\n const currentValue = Array.isArray(value) ? value : []\n const valueSet = new Set(currentValue)\n\n if (searchValue) {\n const filteredOptions = options.filter((opt) => !getOptionIsOptgroup(opt))\n filteredOptions.forEach((opt) => {\n getValue(opt).forEach((val) => valueSet.delete(val))\n })\n return Array.from(valueSet)\n } else {\n return []\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAASA,gBAAgB,EAAEC,oBAAoB,QAAQ,yBAAyB;AAShF,OAAO,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIC,SAAkB,EAAK;EACzD,IAAMC,cAAc,GAAG,CAAC,CAACC,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC,CAACC,QAAQ,CAACH,SAAmB,CAAC;EAE3E,OAAOC,cAAc,IAAI,OAAOD,SAAS,KAAK,QAAQ,IAAIA,SAAS,CAACI,MAAM,GAAG,CAAC;AAChF,CAAC;AAED,OAAO,IAAMC,0BAA0B,GACrC,SADWA,0BAA0BA,CAAAC,IAAA;EAAA,IAEnCC,gBAAgB,GAAAD,IAAA,CAAhBC,gBAAgB;IAChBC,cAAc,GAAAF,IAAA,CAAdE,cAAc;EAAA,OAKhB,UAACC,CAAoB,EAAEC,CAAoB,EAAK;IAC9C,IAAMC,cAAc,GAAGJ,gBAAgB,CAACE,CAAC,CAAC;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