@deephaven/components 1.7.2-beta.1 → 1.7.2-react-18-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AutoCompleteInput.d.ts +0 -17
- package/dist/AutoCompleteInput.d.ts.map +1 -1
- package/dist/AutoCompleteInput.js +12 -31
- package/dist/AutoCompleteInput.js.map +1 -1
- package/dist/AutoResizeTextarea.d.ts +0 -23
- package/dist/AutoResizeTextarea.d.ts.map +1 -1
- package/dist/AutoResizeTextarea.js +0 -21
- package/dist/AutoResizeTextarea.js.map +1 -1
- package/dist/BasicModal.d.ts +0 -27
- package/dist/BasicModal.d.ts.map +1 -1
- package/dist/BasicModal.js +2 -28
- package/dist/BasicModal.js.map +1 -1
- package/dist/BulkActionBar.js.map +1 -1
- package/dist/Button.d.ts +1 -1
- package/dist/Button.d.ts.map +1 -1
- package/dist/Button.js +2 -79
- package/dist/Button.js.map +1 -1
- package/dist/CardFlip.d.ts.map +1 -1
- package/dist/CardFlip.js +1 -2
- package/dist/CardFlip.js.map +1 -1
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox.js +3 -45
- package/dist/Checkbox.js.map +1 -1
- package/dist/Collapse.d.ts +0 -8
- package/dist/Collapse.d.ts.map +1 -1
- package/dist/Collapse.js +0 -8
- package/dist/Collapse.js.map +1 -1
- package/dist/ComponentUtils.js.map +1 -1
- package/dist/CopyButton.js.map +1 -1
- package/dist/CustomTimeSelect.js +14 -15
- package/dist/CustomTimeSelect.js.map +1 -1
- package/dist/DateInput.js.map +1 -1
- package/dist/DateInputUtils.js.map +1 -1
- package/dist/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput.js +0 -8
- package/dist/DateTimeInput.js.map +1 -1
- package/dist/DateTimeInputUtils.js.map +1 -1
- package/dist/DebouncedSearchInput.js +1 -1
- package/dist/DebouncedSearchInput.js.map +1 -1
- package/dist/DragUtils.js.map +1 -1
- package/dist/DraggableItemList.d.ts +2 -2
- package/dist/DraggableItemList.d.ts.map +1 -1
- package/dist/DraggableItemList.js +8 -7
- package/dist/DraggableItemList.js.map +1 -1
- package/dist/EditableItemList.js +1 -2
- package/dist/EditableItemList.js.map +1 -1
- package/dist/ErrorBoundary.js +1 -1
- package/dist/ErrorBoundary.js.map +1 -1
- package/dist/ErrorView.js +1 -2
- package/dist/ErrorView.js.map +1 -1
- package/dist/HierarchicalCheckboxMenu.d.ts +1 -1
- package/dist/HierarchicalCheckboxMenu.d.ts.map +1 -1
- package/dist/HierarchicalCheckboxMenu.js +1 -2
- package/dist/HierarchicalCheckboxMenu.js.map +1 -1
- package/dist/ItemList.d.ts +1 -1
- package/dist/ItemList.d.ts.map +1 -1
- package/dist/ItemList.js +14 -14
- package/dist/ItemList.js.map +1 -1
- package/dist/ItemListItem.js.map +1 -1
- package/dist/LoadingOverlay.js +1 -2
- package/dist/LoadingOverlay.js.map +1 -1
- package/dist/LoadingSpinner.js.map +1 -1
- package/dist/MaskedInput.d.ts.map +1 -1
- package/dist/MaskedInput.js +11 -31
- package/dist/MaskedInput.js.map +1 -1
- package/dist/MaskedInputUtils.js.map +1 -1
- package/dist/Option.js.map +1 -1
- package/dist/RadioGroup.js +1 -2
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioItem.d.ts.map +1 -1
- package/dist/RadioItem.js +1 -13
- package/dist/RadioItem.js.map +1 -1
- package/dist/RandomAreaPlotAnimation.d.ts +1 -1
- package/dist/RandomAreaPlotAnimation.d.ts.map +1 -1
- package/dist/RandomAreaPlotAnimation.js +5 -8
- package/dist/RandomAreaPlotAnimation.js.map +1 -1
- package/dist/SearchInput.js +3 -5
- package/dist/SearchInput.js.map +1 -1
- package/dist/SearchableCombobox.js.map +1 -1
- package/dist/Select.d.ts +1 -1
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js.map +1 -1
- package/dist/SelectValueList.js +9 -9
- package/dist/SelectValueList.js.map +1 -1
- package/dist/SocketedButton.d.ts +4 -4
- package/dist/SocketedButton.d.ts.map +1 -1
- package/dist/SocketedButton.js +5 -20
- package/dist/SocketedButton.js.map +1 -1
- package/dist/SplitButtonGroup.d.ts +2 -18
- package/dist/SplitButtonGroup.d.ts.map +1 -1
- package/dist/SplitButtonGroup.js +0 -13
- package/dist/SplitButtonGroup.js.map +1 -1
- package/dist/TableViewEmptyState.js +1 -2
- package/dist/TableViewEmptyState.js.map +1 -1
- package/dist/TextWithTooltip.js +1 -3
- package/dist/TextWithTooltip.js.map +1 -1
- package/dist/ThemeExport.js.map +1 -1
- package/dist/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput.js +7 -17
- package/dist/TimeInput.js.map +1 -1
- package/dist/TimeSlider.js +3 -6
- package/dist/TimeSlider.js.map +1 -1
- package/dist/ToastNotification.d.ts +1 -2
- package/dist/ToastNotification.d.ts.map +1 -1
- package/dist/ToastNotification.js +1 -2
- package/dist/ToastNotification.js.map +1 -1
- package/dist/UIConstants.js.map +1 -1
- package/dist/UISwitch.d.ts.map +1 -1
- package/dist/UISwitch.js +18 -14
- package/dist/UISwitch.js.map +1 -1
- package/dist/XComponent.d.ts +1 -1
- package/dist/XComponent.d.ts.map +1 -1
- package/dist/XComponent.js.map +1 -1
- package/dist/XComponentMap.d.ts +2 -2
- package/dist/XComponentMap.d.ts.map +1 -1
- package/dist/XComponentMap.js.map +1 -1
- package/dist/actions/ConfirmActionButton.js.map +1 -1
- package/dist/actions/IconActionButton.js +1 -2
- package/dist/actions/IconActionButton.js.map +1 -1
- package/dist/actions/index.js.map +1 -1
- package/dist/context-actions/ContextActionUtils.js.map +1 -1
- package/dist/context-actions/ContextActions.d.ts +1 -2
- package/dist/context-actions/ContextActions.d.ts.map +1 -1
- package/dist/context-actions/ContextActions.js +22 -22
- package/dist/context-actions/ContextActions.js.map +1 -1
- package/dist/context-actions/ContextMenu.js +5 -7
- package/dist/context-actions/ContextMenu.js.map +1 -1
- package/dist/context-actions/ContextMenuItem.d.ts.map +1 -1
- package/dist/context-actions/ContextMenuItem.js +21 -43
- package/dist/context-actions/ContextMenuItem.js.map +1 -1
- package/dist/context-actions/ContextMenuRoot.js +1 -1
- package/dist/context-actions/ContextMenuRoot.js.map +1 -1
- package/dist/context-actions/GlobalContextAction.js +1 -1
- package/dist/context-actions/GlobalContextAction.js.map +1 -1
- package/dist/context-actions/GlobalContextActions.js.map +1 -1
- package/dist/context-actions/index.js.map +1 -1
- package/dist/declaration.d.js.map +1 -1
- package/dist/dialogs/ActionButtonDialogTrigger.js +1 -2
- package/dist/dialogs/ActionButtonDialogTrigger.js.map +1 -1
- package/dist/dialogs/ConfirmationDialog.js +1 -2
- package/dist/dialogs/ConfirmationDialog.js.map +1 -1
- package/dist/dialogs/index.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/menu-actions/DropdownMenu.js +2 -2
- package/dist/menu-actions/DropdownMenu.js.map +1 -1
- package/dist/menu-actions/Menu.js +4 -6
- package/dist/menu-actions/Menu.js.map +1 -1
- package/dist/menu-actions/index.js.map +1 -1
- package/dist/modal/DebouncedModal.js +1 -3
- package/dist/modal/DebouncedModal.js.map +1 -1
- package/dist/modal/InfoModal.js +1 -2
- package/dist/modal/InfoModal.js.map +1 -1
- package/dist/modal/Modal.js +2 -3
- package/dist/modal/Modal.js.map +1 -1
- package/dist/modal/ModalBody.js.map +1 -1
- package/dist/modal/ModalFooter.js.map +1 -1
- package/dist/modal/ModalHeader.js +1 -2
- package/dist/modal/ModalHeader.js.map +1 -1
- package/dist/modal/index.js.map +1 -1
- package/dist/navigation/DashboardList.js +3 -4
- package/dist/navigation/DashboardList.js.map +1 -1
- package/dist/navigation/Menu.js.map +1 -1
- package/dist/navigation/MenuItem.js +1 -2
- package/dist/navigation/MenuItem.js.map +1 -1
- package/dist/navigation/NavTab.d.ts +1 -1
- package/dist/navigation/NavTab.d.ts.map +1 -1
- package/dist/navigation/NavTab.js +4 -5
- package/dist/navigation/NavTab.js.map +1 -1
- package/dist/navigation/NavTabList.js +4 -5
- package/dist/navigation/NavTabList.js.map +1 -1
- package/dist/navigation/Page.js +1 -2
- package/dist/navigation/Page.js.map +1 -1
- package/dist/navigation/Stack.js +1 -3
- package/dist/navigation/Stack.js.map +1 -1
- package/dist/navigation/index.js.map +1 -1
- package/dist/popper/Popper.d.ts +1 -14
- package/dist/popper/Popper.d.ts.map +1 -1
- package/dist/popper/Popper.js +18 -29
- package/dist/popper/Popper.js.map +1 -1
- package/dist/popper/Tooltip.d.ts.map +1 -1
- package/dist/popper/Tooltip.js +18 -12
- package/dist/popper/Tooltip.js.map +1 -1
- package/dist/popper/index.js.map +1 -1
- package/dist/shortcuts/GlobalShortcuts.js.map +1 -1
- package/dist/shortcuts/NavigationShortcuts.js.map +1 -1
- package/dist/shortcuts/Shortcut.js +11 -13
- package/dist/shortcuts/Shortcut.js.map +1 -1
- package/dist/shortcuts/ShortcutRegistry.js +1 -1
- package/dist/shortcuts/ShortcutRegistry.js.map +1 -1
- package/dist/shortcuts/index.js.map +1 -1
- package/dist/spectrum/ActionGroup.js.map +1 -1
- package/dist/spectrum/ActionMenu.js.map +1 -1
- package/dist/spectrum/CheckboxGroup.js.map +1 -1
- package/dist/spectrum/Heading.js.map +1 -1
- package/dist/spectrum/ItemContent.js +2 -4
- package/dist/spectrum/ItemContent.js.map +1 -1
- package/dist/spectrum/ItemTooltip.js.map +1 -1
- package/dist/spectrum/ListActionGroup.js.map +1 -1
- package/dist/spectrum/ListActionMenu.js.map +1 -1
- package/dist/spectrum/TabPanels.d.ts.map +1 -1
- package/dist/spectrum/TabPanels.js +8 -5
- package/dist/spectrum/TabPanels.js.map +1 -1
- package/dist/spectrum/Text.js.map +1 -1
- package/dist/spectrum/View.js.map +1 -1
- package/dist/spectrum/buttons.js.map +1 -1
- package/dist/spectrum/collections.js.map +1 -1
- package/dist/spectrum/comboBox/ComboBox.js.map +1 -1
- package/dist/spectrum/comboBox/ComboBoxNormalized.js.map +1 -1
- package/dist/spectrum/comboBox/index.js.map +1 -1
- package/dist/spectrum/content.js.map +1 -1
- package/dist/spectrum/dateAndTime.js.map +1 -1
- package/dist/spectrum/forms.js.map +1 -1
- package/dist/spectrum/icons.js.map +1 -1
- package/dist/spectrum/index.js.map +1 -1
- package/dist/spectrum/layout.js.map +1 -1
- package/dist/spectrum/listView/ListView.js.map +1 -1
- package/dist/spectrum/listView/ListViewNormalized.js +1 -2
- package/dist/spectrum/listView/ListViewNormalized.js.map +1 -1
- package/dist/spectrum/listView/ListViewWrapper.js.map +1 -1
- package/dist/spectrum/listView/index.js.map +1 -1
- package/dist/spectrum/navigation.js.map +1 -1
- package/dist/spectrum/overlays.js.map +1 -1
- package/dist/spectrum/picker/Picker.js.map +1 -1
- package/dist/spectrum/picker/PickerNormalized.js.map +1 -1
- package/dist/spectrum/picker/PickerProps.js.map +1 -1
- package/dist/spectrum/picker/index.js.map +1 -1
- package/dist/spectrum/picker/usePickerItemScale.js.map +1 -1
- package/dist/spectrum/picker/usePickerNormalizedProps.d.ts +1 -2
- package/dist/spectrum/picker/usePickerNormalizedProps.d.ts.map +1 -1
- package/dist/spectrum/picker/usePickerNormalizedProps.js.map +1 -1
- package/dist/spectrum/picker/usePickerProps.js.map +1 -1
- package/dist/spectrum/picker/usePickerScrollOnOpen.js +1 -1
- package/dist/spectrum/picker/usePickerScrollOnOpen.js.map +1 -1
- package/dist/spectrum/shared.js.map +1 -1
- package/dist/spectrum/status.js.map +1 -1
- package/dist/spectrum/utils/index.js.map +1 -1
- package/dist/spectrum/utils/itemUtils.d.ts +2 -2
- package/dist/spectrum/utils/itemUtils.d.ts.map +1 -1
- package/dist/spectrum/utils/itemUtils.js +5 -1
- package/dist/spectrum/utils/itemUtils.js.map +1 -1
- package/dist/spectrum/utils/itemWrapperUtils.js +3 -4
- package/dist/spectrum/utils/itemWrapperUtils.js.map +1 -1
- package/dist/spectrum/utils/propsUtils.js.map +1 -1
- package/dist/spectrum/utils/themeUtils.js.map +1 -1
- package/dist/spectrum/utils/useOnChangeTrackUncontrolled.js +1 -1
- package/dist/spectrum/utils/useOnChangeTrackUncontrolled.js.map +1 -1
- package/dist/spectrum/utils/useRenderNormalizedItem.js +1 -2
- package/dist/spectrum/utils/useRenderNormalizedItem.js.map +1 -1
- package/dist/spectrum/utils/useStaticItemInitialScrollPosition.js +1 -1
- package/dist/spectrum/utils/useStaticItemInitialScrollPosition.js.map +1 -1
- package/dist/spectrum/utils/useStringifiedMultiSelection.d.ts +1 -1
- package/dist/spectrum/utils/useStringifiedMultiSelection.d.ts.map +1 -1
- package/dist/spectrum/utils/useStringifiedMultiSelection.js.map +1 -1
- package/dist/spectrum/utils/useStringifiedSelection.d.ts +1 -1
- package/dist/spectrum/utils/useStringifiedSelection.d.ts.map +1 -1
- package/dist/spectrum/utils/useStringifiedSelection.js.map +1 -1
- package/dist/theme/Logo.js.map +1 -1
- package/dist/theme/SpectrumThemeProvider.js.map +1 -1
- package/dist/theme/ThemeModel.js +1 -0
- package/dist/theme/ThemeModel.js.map +1 -1
- package/dist/theme/ThemePicker.d.ts.map +1 -1
- package/dist/theme/ThemePicker.js +3 -1
- package/dist/theme/ThemePicker.js.map +1 -1
- package/dist/theme/ThemeProvider.js +1 -3
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/ThemeUtils.js.map +1 -1
- package/dist/theme/colorUtils.js.map +1 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/theme-dark/index.js.map +1 -1
- package/dist/theme/theme-light/index.js.map +1 -1
- package/dist/theme/theme-spectrum/index.js.map +1 -1
- package/dist/theme/useExternalTheme.js.map +1 -1
- package/dist/theme/useSpectrumThemeProvider.js.map +1 -1
- package/dist/theme/useTheme.js.map +1 -1
- package/dist/transitions/FadeTransition.js.map +1 -1
- package/dist/transitions/SlideTransition.js.map +1 -1
- package/dist/transitions/index.js.map +1 -1
- package/package.json +12 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabPanels.js","names":["React","useMemo","useRef","createHtmlPortalNode","InPortal","OutPortal","Item","TabPanels","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DHCTabPanels","props","children","keepMounted","keepMountedProp","rest","_objectWithoutProperties","_excluded","portalNodeMap","Map","portalNodes","nodes","nextNodeMap","current","Children","forEach","child","key","portal","get","attributes","style","set","push","node","mappedChildren","newChildren","_objectSpread"],"sources":["../../src/spectrum/TabPanels.tsx"],"sourcesContent":["import React, { type Key, useMemo, useRef } from 'react';\nimport {\n createHtmlPortalNode,\n type HtmlPortalNode,\n InPortal,\n OutPortal,\n} from 'react-reverse-portal';\nimport {\n Item,\n TabPanels,\n type SpectrumTabPanelsProps,\n} from '@adobe/react-spectrum';\nimport { type CollectionChildren } from '@react-types/shared';\n\nexport interface DHCTabPanelsProps<T> extends SpectrumTabPanelsProps<T> {\n /**\n * If static panels with keys should stay mounted when not visible.\n * This will not apply to dynamic panels created with a render function.\n * Defaults to false.\n */\n keepMounted?: boolean;\n}\n\n/**\n * Wrapper for react-spectrum TabPanels that adds support for keeping panels mounted\n * when not visible using the `keepMounted` prop.\n * Panels created with a render function will not be kept mounted.\n */\nexport function DHCTabPanels<T extends object>(\n props: DHCTabPanelsProps<T>\n): JSX.Element {\n const { children, keepMounted: keepMountedProp = false, ...rest } = props;\n const keepMounted = keepMountedProp && typeof children !== 'function';\n\n const portalNodeMap = useRef(new Map<Key, HtmlPortalNode>());\n\n const portalNodes = useMemo(() => {\n const nodes: JSX.Element[] = [];\n const nextNodeMap = new Map<Key, HtmlPortalNode>(); // Keep track of the portals we use so we can clean up stale portals\n if (!keepMounted) {\n portalNodeMap.current = nextNodeMap;\n return nodes;\n }\n React.Children.forEach(children, child => {\n // Spectrum would ignore these anyway because it uses Item key to determine if the panel mounts\n if (child == null || child.key == null) {\n return;\n }\n\n let portal = portalNodeMap.current.get(child.key);\n if (portal == null) {\n portal = createHtmlPortalNode({\n attributes: {\n // Should make the placeholder div not affect layout and act as if children are mounted directly to the parent\n style: 'display: contents',\n },\n });\n }\n nextNodeMap.set(child.key, portal);\n nodes.push(\n <InPortal node={portal} key={child.key}>\n {child.props.children}\n </InPortal>\n );\n });\n\n portalNodeMap.current = nextNodeMap;\n\n return nodes;\n }, [children, keepMounted]);\n\n const mappedChildren: CollectionChildren<T> = useMemo(() => {\n const newChildren: CollectionChildren<T> = [];\n if (!keepMounted) {\n return newChildren;\n }\n // Need to use forEach instead of map because map always changes the key of the returned elements\n React.Children.forEach(children, child => {\n if (child == null || child.key == null) {\n newChildren.push(child);\n return;\n }\n\n const portal = portalNodeMap.current.get(child.key);\n if (portal == null) {\n newChildren.push(child);\n return;\n }\n\n newChildren.push(\n <Item key={child.key}>\n <OutPortal node={portal} />\n </Item>\n );\n });\n\n return newChildren;\n }, [children, keepMounted]);\n\n return (\n <>\n {keepMounted && portalNodes}\n <TabPanels\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...rest}\n >\n {keepMounted ? mappedChildren : children}\n </TabPanels>\n </>\n );\n}\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,IAAcC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACxD,SACEC,oBAAoB,EAEpBC,QAAQ,EACRC,SAAS,QACJ,sBAAsB;AAC7B,SACEC,IAAI,EACJC,SAAS,QAEJ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA
|
|
1
|
+
{"version":3,"file":"TabPanels.js","names":["React","useMemo","useRef","createHtmlPortalNode","InPortal","OutPortal","Item","TabPanels","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DHCTabPanels","props","children","keepMounted","keepMountedProp","rest","_objectWithoutProperties","_excluded","portalNodeMap","Map","portalNodes","nodes","nextNodeMap","current","Children","forEach","child","key","Error","portal","get","attributes","style","set","push","node","mappedChildren","newChildren","_objectSpread"],"sources":["../../src/spectrum/TabPanels.tsx"],"sourcesContent":["import React, { type Key, useMemo, useRef } from 'react';\nimport {\n createHtmlPortalNode,\n type HtmlPortalNode,\n InPortal,\n OutPortal,\n} from 'react-reverse-portal';\nimport {\n Item,\n TabPanels,\n type SpectrumTabPanelsProps,\n} from '@adobe/react-spectrum';\nimport { type CollectionChildren } from '@react-types/shared';\n\nexport interface DHCTabPanelsProps<T> extends SpectrumTabPanelsProps<T> {\n /**\n * If static panels with keys should stay mounted when not visible.\n * This will not apply to dynamic panels created with a render function.\n * Defaults to false.\n */\n keepMounted?: boolean;\n}\n\n/**\n * Wrapper for react-spectrum TabPanels that adds support for keeping panels mounted\n * when not visible using the `keepMounted` prop.\n * Panels created with a render function will not be kept mounted.\n */\nexport function DHCTabPanels<T extends object>(\n props: DHCTabPanelsProps<T>\n): JSX.Element {\n const { children, keepMounted: keepMountedProp = false, ...rest } = props;\n const keepMounted = keepMountedProp && typeof children !== 'function';\n\n const portalNodeMap = useRef(new Map<Key, HtmlPortalNode>());\n\n const portalNodes = useMemo(() => {\n const nodes: JSX.Element[] = [];\n const nextNodeMap = new Map<Key, HtmlPortalNode>(); // Keep track of the portals we use so we can clean up stale portals\n if (!keepMounted) {\n portalNodeMap.current = nextNodeMap;\n return nodes;\n }\n React.Children.forEach(children, child => {\n // Spectrum would ignore these anyway because it uses Item key to determine if the panel mounts\n if (child == null || child.key == null) {\n return;\n }\n\n // Skip children with function-based content (i.e. ItemRenderer) as it can't be portaled\n if (typeof child.props.children === 'function') {\n throw new Error(\n 'DHCTabPanels cannot use keepMounted with an ItemRenderer function as its children'\n );\n }\n\n let portal = portalNodeMap.current.get(child.key);\n if (portal == null) {\n portal = createHtmlPortalNode({\n attributes: {\n // Should make the placeholder div not affect layout and act as if children are mounted directly to the parent\n style: 'display: contents',\n },\n });\n }\n nextNodeMap.set(child.key, portal);\n\n nodes.push(\n <InPortal node={portal} key={child.key}>\n {child.props.children}\n </InPortal>\n );\n });\n\n portalNodeMap.current = nextNodeMap;\n\n return nodes;\n }, [children, keepMounted]);\n\n const mappedChildren: CollectionChildren<T> = useMemo(() => {\n const newChildren: CollectionChildren<T> = [];\n if (!keepMounted) {\n return newChildren;\n }\n // Need to use forEach instead of map because map always changes the key of the returned elements\n React.Children.forEach(children, child => {\n if (child == null || child.key == null) {\n newChildren.push(child);\n return;\n }\n\n const portal = portalNodeMap.current.get(child.key);\n if (portal == null) {\n newChildren.push(child);\n return;\n }\n\n newChildren.push(\n <Item key={child.key}>\n <OutPortal node={portal} />\n </Item>\n );\n });\n\n return newChildren;\n }, [children, keepMounted]);\n\n return (\n <>\n {keepMounted && portalNodes}\n <TabPanels\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...rest}\n >\n {keepMounted ? mappedChildren : children}\n </TabPanels>\n </>\n );\n}\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,IAAcC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACxD,SACEC,oBAAoB,EAEpBC,QAAQ,EACRC,SAAS,QACJ,sBAAsB;AAC7B,SACEC,IAAI,EACJC,SAAS,QAEJ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAY/B;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAC1BC,KAA2B,EACd;EACb,IAAM;MAAEC,QAAQ;MAAEC,WAAW,EAAEC,eAAe,GAAG;IAAe,CAAC,GAAGH,KAAK;IAAdI,IAAI,GAAAC,wBAAA,CAAKL,KAAK,EAAAM,SAAA;EACzE,IAAMJ,WAAW,GAAGC,eAAe,IAAI,OAAOF,QAAQ,KAAK,UAAU;EAErE,IAAMM,aAAa,GAAGpB,MAAM,CAAC,IAAIqB,GAAG,CAAsB,CAAC,CAAC;EAE5D,IAAMC,WAAW,GAAGvB,OAAO,CAAC,MAAM;IAChC,IAAMwB,KAAoB,GAAG,EAAE;IAC/B,IAAMC,WAAW,GAAG,IAAIH,GAAG,CAAsB,CAAC,CAAC,CAAC;IACpD,IAAI,CAACN,WAAW,EAAE;MAChBK,aAAa,CAACK,OAAO,GAAGD,WAAW;MACnC,OAAOD,KAAK;IACd;IACAzB,KAAK,CAAC4B,QAAQ,CAACC,O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a,CAACK,OAAO,CAACO,GAAG,CAACJ,KAAK,CAACC,GAAG,CAAC;MACnD,IAAIE,MAAM,IAAI,IAAI,EAAE;QAClBQ,WAAW,CAACH,IAAI,CAACR,KAAK,CAAC;QACvB;MACF;MAEAW,WAAW,CAACH,IAAI,cACd7B,IAAA,CAACH,IAAI;QAAAU,QAAA,eACHP,IAAA,CAACJ,SAAS;UAACkC,IAAI,EAAEN;QAAO,CAAE;MAAC,GADlBH,KAAK,CAACC,GAEX,CACR,CAAC;IACH,CAAC,CAAC;IAEF,OAAOU,WAAW;EACpB,CAAC,EAAE,CAACzB,QAAQ,EAAEC,WAAW,CAAC,CAAC;EAE3B,oBACEJ,KAAA,CAAAF,SAAA;IAAAK,QAAA,GACGC,WAAW,IAAIO,WAAW,eAC3Bf,IAAA,CAACF;IACC;IAAA,EAAAmC,aAAA,CAAAA,aAAA,KACIvB,IAAI;MAAAH,QAAA,EAEPC,WAAW,GAAGuB,cAAc,GAAGxB;IAAQ,EAC/B,CAAC;EAAA,CACZ,CAAC;AAEP","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","names":["forwardRef","useMemo","Text","SpectrumText","colorValueStyle","jsx","_jsx","props","forwardedRef","color","UNSAFE_style","rest","_objectWithoutProperties","_excluded","style","_objectSpread","ref","displayName"],"sources":["../../src/spectrum/Text.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { forwardRef, useMemo } from 'react';\nimport {\n Text as SpectrumText,\n type TextProps as SpectrumTextProps,\n} from '@adobe/react-spectrum';\nimport type { DOMRefValue } from '@react-types/shared';\nimport { type ColorValue, colorValueStyle } from '../theme/colorUtils';\n\nexport type TextProps = SpectrumTextProps & {\n color?: ColorValue;\n};\n\n/**\n * A Text component that re-exports the Spectrum Text component.\n * It overrides ColorValues to accept CSS color strings and custom\n * variable names from our color paletee and semantic colors.\n *\n * @param props The props for the Text component\n * @returns The Text component\n *\n */\nexport const Text = forwardRef<DOMRefValue<HTMLSpanElement>, TextProps>(\n (props, forwardedRef): JSX.Element => {\n const { color, UNSAFE_style, ...rest } = props;\n const style = useMemo(\n () => ({\n ...UNSAFE_style,\n color: colorValueStyle(color),\n }),\n [color, UNSAFE_style]\n );\n\n return <SpectrumText {...rest} ref={forwardedRef} UNSAFE_style={style} />;\n }\n);\n\nText.displayName = 'Text';\n\nexport default Text;\n"],"mappings":";;;;;;;;AAAA;AACA,SAASA,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC3C,SACEC,IAAI,IAAIC,YAAY,QAEf,uBAAuB;AAAC,SAELC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMJ,IAAI,gBAAGF,UAAU,CAC5B,CAACO,KAAK,EAAEC,YAAY,KAAkB;EACpC,IAAM;MAAEC,KAAK;MAAEC;IAAsB,CAAC,GAAGH,KAAK;IAAdI,IAAI,GAAAC,wBAAA,CAAKL,KAAK,EAAAM,SAAA;EAC9C,IAAMC,KAAK,GAAGb,OAAO,CACnB,MAAAc,aAAA,CAAAA,aAAA,KACKL,YAAY;IACfD,KAAK,EAAEL,eAAe,CAACK,KAAK;EAAC,EAC7B,EACF,CAACA,KAAK,EAAEC,YAAY,CACtB,CAAC;EAED,oBAAOJ,IAAA,CAACH,YAAY,EAAAY,aAAA,CAAAA,aAAA,KAAKJ,IAAI;IAAEK,GAAG,EAAER,YAAa;IAACE,YAAY,EAAEI;EAAM,EAAE,CAAC;AAC3E,CACF,CAAC;AAEDZ,IAAI,CAACe,WAAW,GAAG,MAAM;AAEzB,eAAef,IAAI"}
|
|
1
|
+
{"version":3,"file":"Text.js","names":["forwardRef","useMemo","Text","SpectrumText","colorValueStyle","jsx","_jsx","props","forwardedRef","color","UNSAFE_style","rest","_objectWithoutProperties","_excluded","style","_objectSpread","ref","displayName"],"sources":["../../src/spectrum/Text.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { forwardRef, useMemo } from 'react';\nimport {\n Text as SpectrumText,\n type TextProps as SpectrumTextProps,\n} from '@adobe/react-spectrum';\nimport type { DOMRefValue } from '@react-types/shared';\nimport { type ColorValue, colorValueStyle } from '../theme/colorUtils';\n\nexport type TextProps = SpectrumTextProps & {\n color?: ColorValue;\n};\n\n/**\n * A Text component that re-exports the Spectrum Text component.\n * It overrides ColorValues to accept CSS color strings and custom\n * variable names from our color paletee and semantic colors.\n *\n * @param props The props for the Text component\n * @returns The Text component\n *\n */\nexport const Text = forwardRef<DOMRefValue<HTMLSpanElement>, TextProps>(\n (props, forwardedRef): JSX.Element => {\n const { color, UNSAFE_style, ...rest } = props;\n const style = useMemo(\n () => ({\n ...UNSAFE_style,\n color: colorValueStyle(color),\n }),\n [color, UNSAFE_style]\n );\n\n return <SpectrumText {...rest} ref={forwardedRef} UNSAFE_style={style} />;\n }\n);\n\nText.displayName = 'Text';\n\nexport default Text;\n"],"mappings":";;;;;;;;AAAA;AACA,SAASA,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC3C,SACEC,IAAI,IAAIC,YAAY,QAEf,uBAAuB;AAAC,SAELC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMJ,IAAI,gBAAGF,UAAU,CAC5B,CAACO,KAAK,EAAEC,YAAY,KAAkB;EACpC,IAAM;MAAEC,KAAK;MAAEC;IAAsB,CAAC,GAAGH,KAAK;IAAdI,IAAI,GAAAC,wBAAA,CAAKL,KAAK,EAAAM,SAAA;EAC9C,IAAMC,KAAK,GAAGb,OAAO,CACnB,MAAAc,aAAA,CAAAA,aAAA,KACKL,YAAY;IACfD,KAAK,EAAEL,eAAe,CAACK,KAAK;EAAC,EAC7B,EACF,CAACA,KAAK,EAAEC,YAAY,CACtB,CAAC;EAED,oBAAOJ,IAAA,CAACH,YAAY,EAAAY,aAAA,CAAAA,aAAA,KAAKJ,IAAI;IAAEK,GAAG,EAAER,YAAa;IAACE,YAAY,EAAEI;EAAM,EAAE,CAAC;AAC3E,CACF,CAAC;AAEDZ,IAAI,CAACe,WAAW,GAAG,MAAM;AAEzB,eAAef,IAAI","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"View.js","names":["forwardRef","useMemo","useLocale","View","SpectrumView","colorValueStyle","jsx","_jsx","props","forwardedRef","backgroundColor","borderColor","borderStartColor","borderEndColor","borderTopColor","borderBottomColor","borderXColor","borderYColor","UNSAFE_style","rest","_objectWithoutProperties","_excluded","direction","style","borderStyle","undefined","borderLeftColor","borderRightColor","_objectSpread","ref","displayName"],"sources":["../../src/spectrum/View.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { type CSSProperties, forwardRef, useMemo } from 'react';\nimport {\n useLocale,\n View as SpectrumView,\n type ViewProps as SpectrumViewProps,\n} from '@adobe/react-spectrum';\nimport type { DOMRefValue } from '@react-types/shared';\nimport { type ColorValue, colorValueStyle } from '../theme/colorUtils';\n\nexport type ViewProps = Omit<\n SpectrumViewProps<6>,\n | 'backgroundColor'\n | 'borderColor'\n | 'borderStartColor'\n | 'borderEndColor'\n | 'borderTopColor'\n | 'borderBottomColor'\n | 'borderXColor'\n | 'borderYColor'\n> & {\n backgroundColor?: ColorValue;\n borderColor?: ColorValue;\n borderStartColor?: ColorValue;\n borderEndColor?: ColorValue;\n borderTopColor?: ColorValue;\n borderBottomColor?: ColorValue;\n borderXColor?: ColorValue;\n borderYColor?: ColorValue;\n};\n\n/**\n * A View component that re-exports the Spectrum View component.\n * However, it overrides ColorValues to accept CSS color strings and\n * our custom variable names from our color palette and semantic colors.\n *\n * @param props The props for the View component\n * @returns The View component\n *\n */\nexport const View = forwardRef<DOMRefValue<HTMLElement>, ViewProps>(\n (props, forwardedRef): JSX.Element => {\n const {\n backgroundColor,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderXColor,\n borderYColor,\n UNSAFE_style,\n ...rest\n } = props;\n\n const { direction } = useLocale();\n const style = useMemo(() => {\n const borderStyle: CSSProperties = {};\n if (borderColor !== undefined) {\n borderStyle.borderColor = colorValueStyle(borderColor);\n }\n if (borderXColor !== undefined) {\n borderStyle.borderLeftColor = colorValueStyle(borderXColor);\n borderStyle.borderRightColor = colorValueStyle(borderXColor);\n }\n if (borderYColor !== undefined) {\n borderStyle.borderTopColor = colorValueStyle(borderYColor);\n borderStyle.borderBottomColor = colorValueStyle(borderYColor);\n }\n if (borderStartColor !== undefined) {\n borderStyle[\n direction === 'rtl' ? 'borderRightColor' : 'borderLeftColor'\n ] = colorValueStyle(borderStartColor);\n }\n if (borderEndColor !== undefined) {\n borderStyle[\n direction === 'rtl' ? 'borderLeftColor' : 'borderRightColor'\n ] = colorValueStyle(borderEndColor);\n }\n if (borderTopColor !== undefined) {\n borderStyle.borderTopColor = colorValueStyle(borderTopColor);\n }\n if (borderBottomColor !== undefined) {\n borderStyle.borderBottomColor = colorValueStyle(borderBottomColor);\n }\n\n return {\n ...UNSAFE_style,\n backgroundColor: colorValueStyle(backgroundColor),\n ...borderStyle,\n };\n }, [\n backgroundColor,\n UNSAFE_style,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderXColor,\n borderYColor,\n direction,\n ]);\n\n return <SpectrumView {...rest} ref={forwardedRef} UNSAFE_style={style} />;\n }\n);\n\nView.displayName = 'View';\n\nexport default View;\n"],"mappings":";;;;;;;;AAAA;AACA,SAA6BA,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC/D,SACEC,SAAS,EACTC,IAAI,IAAIC,YAAY,QAEf,uBAAuB;AAAC,SAELC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAuBzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMJ,IAAI,gBAAGH,UAAU,CAC5B,CAACQ,KAAK,EAAEC,YAA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ACnCD,WAAW,CAACT,iBAAiB,GAAGV,eAAe,CAACU,iBAAiB,CAAC;IACpE;IAEA,OAAAa,aAAA,CAAAA,aAAA,KACKV,YAAY;MACfR,eAAe,EAAEL,eAAe,CAACK,eAAe;IAAC,GAC9Cc,WAAW;EAElB,CAAC,EAAE,CACDd,eAAe,EACfQ,YAAY,EACZP,WAAW,EACXC,gBAAgB,EAChBC,cAAc,EACdC,cAAc,EACdC,iBAAiB,EACjBC,YAAY,EACZC,YAAY,EACZK,SAAS,CACV,CAAC;EAEF,oBAAOf,IAAA,CAACH,YAAY,EAAAwB,aAAA,CAAAA,aAAA,KAAKT,IAAI;IAAEU,GAAG,EAAEpB,YAAa;IAACS,YAAY,EAAEK;EAAM,EAAE,CAAC;AAC3E,CACF,CAAC;AAEDpB,IAAI,CAAC2B,WAAW,GAAG,MAAM;AAEzB,eAAe3B,IAAI"}
|
|
1
|
+
{"version":3,"file":"View.js","names":["forwardRef","useMemo","useLocale","View","SpectrumView","colorValueStyle","jsx","_jsx","props","forwardedRef","backgroundColor","borderColor","borderStartColor","borderEndColor","borderTopColor","borderBottomColor","borderXColor","borderYColor","UNSAFE_style","rest","_objectWithoutProperties","_excluded","direction","style","borderStyle","undefined","borderLeftColor","borderRightColor","_objectSpread","ref","displayName"],"sources":["../../src/spectrum/View.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { type CSSProperties, forwardRef, useMemo } from 'react';\nimport {\n useLocale,\n View as SpectrumView,\n type ViewProps as SpectrumViewProps,\n} from '@adobe/react-spectrum';\nimport type { DOMRefValue } from '@react-types/shared';\nimport { type ColorValue, colorValueStyle } from '../theme/colorUtils';\n\nexport type ViewProps = Omit<\n SpectrumViewProps<6>,\n | 'backgroundColor'\n | 'borderColor'\n | 'borderStartColor'\n | 'borderEndColor'\n | 'borderTopColor'\n | 'borderBottomColor'\n | 'borderXColor'\n | 'borderYColor'\n> & {\n backgroundColor?: ColorValue;\n borderColor?: ColorValue;\n borderStartColor?: ColorValue;\n borderEndColor?: ColorValue;\n borderTopColor?: ColorValue;\n borderBottomColor?: ColorValue;\n borderXColor?: ColorValue;\n borderYColor?: ColorValue;\n};\n\n/**\n * A View component that re-exports the Spectrum View component.\n * However, it overrides ColorValues to accept CSS color strings and\n * our custom variable names from our color palette and semantic colors.\n *\n * @param props The props for the View component\n * @returns The View component\n *\n */\nexport const View = forwardRef<DOMRefValue<HTMLElement>, ViewProps>(\n (props, forwardedRef): JSX.Element => {\n const {\n backgroundColor,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderXColor,\n borderYColor,\n UNSAFE_style,\n ...rest\n } = props;\n\n const { direction } = useLocale();\n const style = useMemo(() => {\n const borderStyle: CSSProperties = {};\n if (borderColor !== undefined) {\n borderStyle.borderColor = colorValueStyle(borderColor);\n }\n if (borderXColor !== undefined) {\n borderStyle.borderLeftColor = colorValueStyle(borderXColor);\n borderStyle.borderRightColor = colorValueStyle(borderXColor);\n }\n if (borderYColor !== undefined) {\n borderStyle.borderTopColor = colorValueStyle(borderYColor);\n borderStyle.borderBottomColor = colorValueStyle(borderYColor);\n }\n if (borderStartColor !== undefined) {\n borderStyle[\n direction === 'rtl' ? 'borderRightColor' : 'borderLeftColor'\n ] = colorValueStyle(borderStartColor);\n }\n if (borderEndColor !== undefined) {\n borderStyle[\n direction === 'rtl' ? 'borderLeftColor' : 'borderRightColor'\n ] = colorValueStyle(borderEndColor);\n }\n if (borderTopColor !== undefined) {\n borderStyle.borderTopColor = colorValueStyle(borderTopColor);\n }\n if (borderBottomColor !== undefined) {\n borderStyle.borderBottomColor = colorValueStyle(borderBottomColor);\n }\n\n return {\n ...UNSAFE_style,\n backgroundColor: colorValueStyle(backgroundColor),\n ...borderStyle,\n };\n }, [\n backgroundColor,\n UNSAFE_style,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderXColor,\n borderYColor,\n direction,\n ]);\n\n return <SpectrumView {...rest} ref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AkB,GAAG,iBAAiB,CAC7D,GAAGjB,eAAe,CAACO,gBAAgB,CAAC;IACvC;IACA,IAAIC,cAAc,KAAKY,SAAS,EAAE;MAChCD,WAAW,CACTF,SAAS,KAAK,KAAK,GAAG,iBAAiB,GAAG,kBAAkB,CAC7D,GAAGjB,eAAe,CAACQ,cAAc,CAAC;IACrC;IACA,IAAIC,cAAc,KAAKW,SAAS,EAAE;MAChCD,WAAW,CAACV,cAAc,GAAGT,eAAe,CAACS,cAAc,CAAC;IAC9D;IACA,IAAIC,iBAAiB,KAAKU,SAAS,EAAE;MACnCD,WAAW,CAACT,iBAAiB,GAAGV,eAAe,CAACU,iBAAiB,CAAC;IACpE;IAEA,OAAAa,aAAA,CAAAA,aAAA,KACKV,YAAY;MACfR,eAAe,EAAEL,eAAe,CAACK,eAAe;IAAC,GAC9Cc,WAAW;EAElB,CAAC,EAAE,CACDd,eAAe,EACfQ,YAAY,EACZP,WAAW,EACXC,gBAAgB,EAChBC,cAAc,EACdC,cAAc,EACdC,iBAAiB,EACjBC,YAAY,EACZC,YAAY,EACZK,SAAS,CACV,CAAC;EAEF,oBAAOf,IAAA,CAACH,YAAY,EAAAwB,aAAA,CAAAA,aAAA,KAAKT,IAAI;IAAEU,GAAG,EAAEpB,YAAa;IAACS,YAAY,EAAEK;EAAM,EAAE,CAAC;AAC3E,CACF,CAAC;AAEDpB,IAAI,CAAC2B,WAAW,GAAG,MAAM;AAEzB,eAAe3B,IAAI","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttons.js","names":["ActionButton","Button","SpectrumButton","ButtonGroup","LogicButton","ToggleButton"],"sources":["../../src/spectrum/buttons.ts"],"sourcesContent":["export {\n ActionButton,\n type SpectrumActionButtonProps as ActionButtonProps,\n Button as SpectrumButton,\n type SpectrumButtonProps,\n ButtonGroup,\n type SpectrumButtonGroupProps as ButtonGroupProps,\n // FileTrigger - we aren't planning to support this component\n LogicButton,\n type SpectrumLogicButtonProps as LogicButtonProps,\n ToggleButton,\n type SpectrumToggleButtonProps as ToggleButtonProps,\n} from '@adobe/react-spectrum';\n"],"mappings":"AAAA,SACEA,YAAY,EAEZC,MAAM,IAAIC,cAAc,EAExBC,WAAW;AAEX;AACAC,WAAW,EAEXC,YAAY,QAEP,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"buttons.js","names":["ActionButton","Button","SpectrumButton","ButtonGroup","LogicButton","ToggleButton"],"sources":["../../src/spectrum/buttons.ts"],"sourcesContent":["export {\n ActionButton,\n type SpectrumActionButtonProps as ActionButtonProps,\n Button as SpectrumButton,\n type SpectrumButtonProps,\n ButtonGroup,\n type SpectrumButtonGroupProps as ButtonGroupProps,\n // FileTrigger - we aren't planning to support this component\n LogicButton,\n type SpectrumLogicButtonProps as LogicButtonProps,\n ToggleButton,\n type SpectrumToggleButtonProps as ToggleButtonProps,\n} from '@adobe/react-spectrum';\n"],"mappings":"AAAA,SACEA,YAAY,EAEZC,MAAM,IAAIC,cAAc,EAExBC,WAAW;AAEX;AACAC,WAAW,EAEXC,YAAY,QAEP,uBAAuB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collections.js","names":["ActionBar","Menu","SpectrumMenu","MenuTrigger","SubmenuTrigger","ContextualHelpTrigger","TagGroup"],"sources":["../../src/spectrum/collections.ts"],"sourcesContent":["export {\n ActionBar,\n type SpectrumActionBarProps as ActionBarProps,\n // ComboBox is exported from ComboBox.tsx as a custom DH component. Re-exporting\n // the Spectrum props type for upstream consumers that need to compose prop types.\n type SpectrumComboBoxProps,\n // ListBox - we aren't planning to support this component\n Menu as SpectrumMenu,\n type SpectrumMenuProps,\n MenuTrigger,\n type SpectrumMenuTriggerProps as MenuTriggerProps,\n SubmenuTrigger,\n type SpectrumSubmenuTriggerProps as SubmenuTriggerProps,\n ContextualHelpTrigger,\n type SpectrumMenuDialogTriggerProps as ContextualHelpTriggerProps,\n // TableView - we aren't planning to support this component\n // Picker is exported from Picker.tsx as a custom DH component. Re-exporting\n // the Spectrum props type for upstream consumers that need to compose prop types.\n type SpectrumPickerProps,\n TagGroup,\n type SpectrumTagGroupProps as TagGroupProps,\n} from '@adobe/react-spectrum';\n"],"mappings":"AAAA,SACEA;;AAEA;AACA;AAAA;AAEA;AACAC,IAAI,IAAIC,YAAY,EAEpBC,WAAW,EAEXC,cAAc,EAEdC;;AAEA;AACA;AACA;AAAA,EAEAC,QAAQ,QAEH,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"collections.js","names":["ActionBar","Menu","SpectrumMenu","MenuTrigger","SubmenuTrigger","ContextualHelpTrigger","TagGroup"],"sources":["../../src/spectrum/collections.ts"],"sourcesContent":["export {\n ActionBar,\n type SpectrumActionBarProps as ActionBarProps,\n // ComboBox is exported from ComboBox.tsx as a custom DH component. Re-exporting\n // the Spectrum props type for upstream consumers that need to compose prop types.\n type SpectrumComboBoxProps,\n // ListBox - we aren't planning to support this component\n Menu as SpectrumMenu,\n type SpectrumMenuProps,\n MenuTrigger,\n type SpectrumMenuTriggerProps as MenuTriggerProps,\n SubmenuTrigger,\n type SpectrumSubmenuTriggerProps as SubmenuTriggerProps,\n ContextualHelpTrigger,\n type SpectrumMenuDialogTriggerProps as ContextualHelpTriggerProps,\n // TableView - we aren't planning to support this component\n // Picker is exported from Picker.tsx as a custom DH component. Re-exporting\n // the Spectrum props type for upstream consumers that need to compose prop types.\n type SpectrumPickerProps,\n TagGroup,\n type SpectrumTagGroupProps as TagGroupProps,\n} from '@adobe/react-spectrum';\n"],"mappings":"AAAA,SACEA;;AAEA;AACA;AAAA;AAEA;AACAC,IAAI,IAAIC,YAAY,EAEpBC,WAAW,EAEXC,cAAc,EAEdC;;AAEA;AACA;AACA;AAAA,EAEAC,QAAQ,QAEH,uBAAuB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.js","names":["React","ComboBox","SpectrumComboBox","cl","useMergeRef","usePickerProps","jsx","_jsx","forwardRef","_ref","ref","UNSAFE_className","props","_objectWithoutProperties","_excluded","_usePickerProps","defaultSelectedKey","disabledKeys","selectedKey","scrollRef","comboBoxProps","_excluded2","pickerRef","_objectSpread","displayName"],"sources":["../../../src/spectrum/comboBox/ComboBox.tsx"],"sourcesContent":["import React from 'react';\nimport {\n ComboBox as SpectrumComboBox,\n type SpectrumComboBoxProps,\n} from '@adobe/react-spectrum';\nimport type { DOMRef } from '@react-types/shared';\nimport cl from 'classnames';\nimport { useMergeRef } from '@deephaven/react-hooks';\nimport type { NormalizedItem } from '../utils';\nimport { type PickerPropsT, usePickerProps } from '../picker';\n\nexport type ComboBoxProps = PickerPropsT<SpectrumComboBoxProps<NormalizedItem>>;\nexport type { MenuTriggerAction } from '@react-types/combobox';\nexport { SpectrumComboBox };\n\nexport const ComboBox = React.forwardRef(function ComboBox(\n { UNSAFE_className, ...props }: ComboBoxProps,\n ref: DOMRef<HTMLDivElement>\n): JSX.Element {\n const {\n defaultSelectedKey,\n disabledKeys,\n selectedKey,\n ref: scrollRef,\n ...comboBoxProps\n } = usePickerProps(props);\n const pickerRef = useMergeRef(ref, scrollRef);\n return (\n <SpectrumComboBox\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...comboBoxProps}\n UNSAFE_className={cl('dh-combobox', UNSAFE_className)}\n ref={pickerRef}\n // Type assertions are necessary here since Spectrum types don't account\n // for number and boolean key values even though they are valid runtime\n // values.\n defaultSelectedKey={\n defaultSelectedKey as SpectrumComboBoxProps<NormalizedItem>['defaultSelectedKey']\n }\n disabledKeys={\n disabledKeys as SpectrumComboBoxProps<NormalizedItem>['disabledKeys']\n }\n selectedKey={\n selectedKey as SpectrumComboBoxProps<NormalizedItem>['selectedKey']\n }\n />\n );\n});\nComboBox.displayName = 'ComboBox';\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,QAAQ,IAAIC,gBAAgB,QAEvB,uBAAuB;AAE9B,OAAOC,EAAE,MAAM,YAAY;AAC3B,SAASC,WAAW,QAAQ,wBAAwB;AAAC,SAEzBC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAI1C,SAASL,gBAAgB;AAEzB,OAAO,IAAMD,QAAQ,gBAAGD,KAAK,CAACQ,UAAU,CAAC,SAASP,QAAQA,CAAAQ,IAAA,EAExDC,GAA2B,EACd;EAAA,IAFb;MAAEC;IAA0C,CAAC,GAAAF,IAAA;IAAtBG,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EAG5B,IAAAC,eAAA,GAMIV,cAAc,CAACO,KAAK,CAAC;IANnB;MACJI,kBAAkB;MAClBC,YAAY;MACZC,WAAW;MACXR,GAAG,EAAES;IAEP,CAAC,GAAAJ,eAAA;IADIK,aAAa,GAAAP,wBAAA,CAAAE,eAAA,EAAAM,UAAA;EAElB,IAAMC,SAAS,GAAGlB,WAAW,CAACM,GAAG,EAAES,SAAS,CAAC;EAC7C,oBACEZ,IAAA,CAACL;EACC;EAAA,EAAAqB,aAAA,CAAAA,aAAA,KACIH,aAAa;IACjBT,gBAAgB,EAAER,EAAE,CAAC,aAAa,EAAEQ,gBAAgB,CAAE;IACtDD,GAAG,EAAEY;IACL;IACA;IACA;IAAA;IACAN,kBAAkB,EAChBA,kBACD;IACDC,YAAY,EACVA,YACD;IACDC,WAAW,EACTA;EACD,EACF,CAAC;AAEN,CAAC,CAAC;AACFjB,QAAQ,CAACuB,WAAW,GAAG,UAAU"}
|
|
1
|
+
{"version":3,"file":"ComboBox.js","names":["React","ComboBox","SpectrumComboBox","cl","useMergeRef","usePickerProps","jsx","_jsx","forwardRef","_ref","ref","UNSAFE_className","props","_objectWithoutProperties","_excluded","_usePickerProps","defaultSelectedKey","disabledKeys","selectedKey","scrollRef","comboBoxProps","_excluded2","pickerRef","_objectSpread","displayName"],"sources":["../../../src/spectrum/comboBox/ComboBox.tsx"],"sourcesContent":["import React from 'react';\nimport {\n ComboBox as SpectrumComboBox,\n type SpectrumComboBoxProps,\n} from '@adobe/react-spectrum';\nimport type { DOMRef } from '@react-types/shared';\nimport cl from 'classnames';\nimport { useMergeRef } from '@deephaven/react-hooks';\nimport type { NormalizedItem } from '../utils';\nimport { type PickerPropsT, usePickerProps } from '../picker';\n\nexport type ComboBoxProps = PickerPropsT<SpectrumComboBoxProps<NormalizedItem>>;\nexport type { MenuTriggerAction } from '@react-types/combobox';\nexport { SpectrumComboBox };\n\nexport const ComboBox = React.forwardRef(function ComboBox(\n { UNSAFE_className, ...props }: ComboBoxProps,\n ref: DOMRef<HTMLDivElement>\n): JSX.Element {\n const {\n defaultSelectedKey,\n disabledKeys,\n selectedKey,\n ref: scrollRef,\n ...comboBoxProps\n } = usePickerProps(props);\n const pickerRef = useMergeRef(ref, scrollRef);\n return (\n <SpectrumComboBox\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...comboBoxProps}\n UNSAFE_className={cl('dh-combobox', UNSAFE_className)}\n ref={pickerRef}\n // Type assertions are necessary here since Spectrum types don't account\n // for number and boolean key values even though they are valid runtime\n // values.\n defaultSelectedKey={\n defaultSelectedKey as SpectrumComboBoxProps<NormalizedItem>['defaultSelectedKey']\n }\n disabledKeys={\n disabledKeys as SpectrumComboBoxProps<NormalizedItem>['disabledKeys']\n }\n selectedKey={\n selectedKey as SpectrumComboBoxProps<NormalizedItem>['selectedKey']\n }\n />\n );\n});\nComboBox.displayName = 'ComboBox';\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,QAAQ,IAAIC,gBAAgB,QAEvB,uBAAuB;AAE9B,OAAOC,EAAE,MAAM,YAAY;AAC3B,SAASC,WAAW,QAAQ,wBAAwB;AAAC,SAEzBC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAI1C,SAASL,gBAAgB;AAEzB,OAAO,IAAMD,QAAQ,gBAAGD,KAAK,CAACQ,UAAU,CAAC,SAASP,QAAQA,CAAAQ,IAAA,EAExDC,GAA2B,EACd;EAAA,IAFb;MAAEC;IAA0C,CAAC,GAAAF,IAAA;IAAtBG,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EAG5B,IAAAC,eAAA,GAMIV,cAAc,CAACO,KAAK,CAAC;IANnB;MACJI,kBAAkB;MAClBC,YAAY;MACZC,WAAW;MACXR,GAAG,EAAES;IAEP,CAAC,GAAAJ,eAAA;IADIK,aAAa,GAAAP,wBAAA,CAAAE,eAAA,EAAAM,UAAA;EAElB,IAAMC,SAAS,GAAGlB,WAAW,CAACM,GAAG,EAAES,SAAS,CAAC;EAC7C,oBACEZ,IAAA,CAACL;EACC;EAAA,EAAAqB,aAAA,CAAAA,aAAA,KACIH,aAAa;IACjBT,gBAAgB,EAAER,EAAE,CAAC,aAAa,EAAEQ,gBAAgB,CAAE;IACtDD,GAAG,EAAEY;IACL;IACA;IACA;IAAA;IACAN,kBAAkB,EAChBA,kBACD;IACDC,YAAY,EACVA,YACD;IACDC,WAAW,EACTA;EACD,EACF,CAAC;AAEN,CAAC,CAAC;AACFjB,QAAQ,CAACuB,WAAW,GAAG,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBoxNormalized.js","names":["ComboBox","SpectrumComboBox","cl","usePickerNormalizedProps","createElement","_createElement","ComboBoxNormalized","_ref","UNSAFE_className","props","_objectWithoutProperties","_excluded","_usePickerNormalizedP","forceRerenderKey","ref","pickerProps","_excluded2","_objectSpread","key"],"sources":["../../../src/spectrum/comboBox/ComboBoxNormalized.tsx"],"sourcesContent":["import { ComboBox as SpectrumComboBox } from '@adobe/react-spectrum';\nimport { type FocusableRef } from '@react-types/shared';\nimport cl from 'classnames';\nimport {\n type PickerNormalizedPropsT,\n usePickerNormalizedProps,\n} from '../picker';\nimport { type ComboBoxProps } from './ComboBox';\n\nexport type ComboBoxNormalizedProps = PickerNormalizedPropsT<ComboBoxProps>;\n\n/**\n * ComboBox that takes an array of `NormalizedItem` or `NormalizedSection` items\n * as children and uses a render item function to render the items. `NormalizedItem`\n * and `NormalizedSection` datums always provide a `key` property but have an\n * optional `item` property that can be lazy loaded. This is necessary to support\n * windowed data since we need a representative key for every item in the\n * collection.\n */\nexport function ComboBoxNormalized({\n UNSAFE_className,\n ...props\n}: ComboBoxNormalizedProps): JSX.Element {\n const { forceRerenderKey, ref, ...pickerProps } =\n usePickerNormalizedProps<ComboBoxNormalizedProps>(props);\n\n return (\n <SpectrumComboBox\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...pickerProps}\n key={forceRerenderKey}\n ref={ref as FocusableRef<HTMLElement>}\n UNSAFE_className={cl(\n 'dh-combobox',\n 'dh-combobox-normalized',\n UNSAFE_className\n )}\n />\n );\n}\n\nexport default ComboBoxNormalized;\n"],"mappings":";;;;;;;;;AAAA,SAASA,QAAQ,IAAIC,gBAAgB,QAAQ,uBAAuB;AAEpE,OAAOC,EAAE,MAAM,YAAY;AAAC,SAG1BC,wBAAwB;AAAA,SAAAC,aAAA,IAAAC,cAAA;AAM1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAAAC,IAAA,EAGO;EAAA,IAHN;MACjCC;IAEuB,CAAC,GAAAD,IAAA;IADrBE,KAAK,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA;EAER,IAAAC,qBAAA,GACET,wBAAwB,CAA0BM,KAAK,CAAC;IADpD;MAAEI,gBAAgB;MAAEC;IAAoB,CAAC,GAAAF,qBAAA;IAAbG,WAAW,GAAAL,wBAAA,CAAAE,qBAAA,EAAAI,UAAA;EAG7C,oBACEX,cAAA,CAACJ;EACC;EAAA,EAAAgB,aAAA,CAAAA,aAAA,KACIF,WAAW;IACfG,GAAG,EAAEL,gBAAiB;IACtBC,GAAG,EAAEA,GAAiC;IACtCN,gBAAgB,EAAEN,EAAE,CAClB,aAAa,EACb,wBAAwB,EACxBM,gBACF;EAAE,EACH,CAAC;AAEN;AAEA,eAAeF,kBAAkB"}
|
|
1
|
+
{"version":3,"file":"ComboBoxNormalized.js","names":["ComboBox","SpectrumComboBox","cl","usePickerNormalizedProps","createElement","_createElement","ComboBoxNormalized","_ref","UNSAFE_className","props","_objectWithoutProperties","_excluded","_usePickerNormalizedP","forceRerenderKey","ref","pickerProps","_excluded2","_objectSpread","key"],"sources":["../../../src/spectrum/comboBox/ComboBoxNormalized.tsx"],"sourcesContent":["import { ComboBox as SpectrumComboBox } from '@adobe/react-spectrum';\nimport { type FocusableRef } from '@react-types/shared';\nimport cl from 'classnames';\nimport {\n type PickerNormalizedPropsT,\n usePickerNormalizedProps,\n} from '../picker';\nimport { type ComboBoxProps } from './ComboBox';\n\nexport type ComboBoxNormalizedProps = PickerNormalizedPropsT<ComboBoxProps>;\n\n/**\n * ComboBox that takes an array of `NormalizedItem` or `NormalizedSection` items\n * as children and uses a render item function to render the items. `NormalizedItem`\n * and `NormalizedSection` datums always provide a `key` property but have an\n * optional `item` property that can be lazy loaded. This is necessary to support\n * windowed data since we need a representative key for every item in the\n * collection.\n */\nexport function ComboBoxNormalized({\n UNSAFE_className,\n ...props\n}: ComboBoxNormalizedProps): JSX.Element {\n const { forceRerenderKey, ref, ...pickerProps } =\n usePickerNormalizedProps<ComboBoxNormalizedProps>(props);\n\n return (\n <SpectrumComboBox\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...pickerProps}\n key={forceRerenderKey}\n ref={ref as FocusableRef<HTMLElement>}\n UNSAFE_className={cl(\n 'dh-combobox',\n 'dh-combobox-normalized',\n UNSAFE_className\n )}\n />\n );\n}\n\nexport default ComboBoxNormalized;\n"],"mappings":";;;;;;;;;AAAA,SAASA,QAAQ,IAAIC,gBAAgB,QAAQ,uBAAuB;AAEpE,OAAOC,EAAE,MAAM,YAAY;AAAC,SAG1BC,wBAAwB;AAAA,SAAAC,aAAA,IAAAC,cAAA;AAM1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAAAC,IAAA,EAGO;EAAA,IAHN;MACjCC;IAEuB,CAAC,GAAAD,IAAA;IADrBE,KAAK,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA;EAER,IAAAC,qBAAA,GACET,wBAAwB,CAA0BM,KAAK,CAAC;IADpD;MAAEI,gBAAgB;MAAEC;IAAoB,CAAC,GAAAF,qBAAA;IAAbG,WAAW,GAAAL,wBAAA,CAAAE,qBAAA,EAAAI,UAAA;EAG7C,oBACEX,cAAA,CAACJ;EACC;EAAA,EAAAgB,aAAA,CAAAA,aAAA,KACIF,WAAW;IACfG,GAAG,EAAEL,gBAAiB;IACtBC,GAAG,EAAEA,GAAiC;IACtCN,gBAAgB,EAAEN,EAAE,CAClB,aAAa,EACb,wBAAwB,EACxBM,gBACF;EAAE,EACH,CAAC;AAEN;AAEA,eAAeF,kBAAkB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/spectrum/comboBox/index.ts"],"sourcesContent":["export * from './ComboBox';\nexport * from './ComboBoxNormalized';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/spectrum/comboBox/index.ts"],"sourcesContent":["export * from './ComboBox';\nexport * from './ComboBoxNormalized';\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","names":["Avatar","Content","Divider","Footer","Header","IllustratedMessage","Image","Keyboard","Well"],"sources":["../../src/spectrum/content.ts"],"sourcesContent":["export {\n Avatar,\n type SpectrumAvatarProps as AvatarProps,\n Content,\n type ContentProps,\n Divider,\n type SpectrumDividerProps as DividerProps,\n Footer,\n type FooterProps,\n Header,\n type HeaderProps,\n IllustratedMessage,\n type SpectrumIllustratedMessageProps as IllustratedMessageProps,\n Image,\n type SpectrumImageProps as ImageProps,\n Keyboard,\n type KeyboardProps,\n Well,\n type SpectrumWellProps as WellProps,\n} from '@adobe/react-spectrum';\n"],"mappings":"AAAA,SACEA,MAAM,EAENC,OAAO,EAEPC,OAAO,EAEPC,MAAM,EAENC,MAAM,EAENC,kBAAkB,EAElBC,KAAK,EAELC,QAAQ,EAERC,IAAI,QAEC,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"content.js","names":["Avatar","Content","Divider","Footer","Header","IllustratedMessage","Image","Keyboard","Well"],"sources":["../../src/spectrum/content.ts"],"sourcesContent":["export {\n Avatar,\n type SpectrumAvatarProps as AvatarProps,\n Content,\n type ContentProps,\n Divider,\n type SpectrumDividerProps as DividerProps,\n Footer,\n type FooterProps,\n Header,\n type HeaderProps,\n IllustratedMessage,\n type SpectrumIllustratedMessageProps as IllustratedMessageProps,\n Image,\n type SpectrumImageProps as ImageProps,\n Keyboard,\n type KeyboardProps,\n Well,\n type SpectrumWellProps as WellProps,\n} from '@adobe/react-spectrum';\n"],"mappings":"AAAA,SACEA,MAAM,EAENC,OAAO,EAEPC,OAAO,EAEPC,MAAM,EAENC,MAAM,EAENC,kBAAkB,EAElBC,KAAK,EAELC,QAAQ,EAERC,IAAI,QAEC,uBAAuB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateAndTime.js","names":["Calendar","DateField","DatePicker","DateRangePicker","RangeCalendar","TimeField"],"sources":["../../src/spectrum/dateAndTime.ts"],"sourcesContent":["import {\n type CalendarDate,\n type CalendarDateTime,\n type ZonedDateTime,\n} from '@internationalized/date';\n\nexport {\n Calendar,\n type SpectrumCalendarProps as CalendarProps,\n DateField,\n type SpectrumDateFieldProps as DateFieldProps,\n DatePicker,\n type SpectrumDatePickerProps as DatePickerProps,\n DateRangePicker,\n type SpectrumDateRangePickerProps as DateRangePickerProps,\n RangeCalendar,\n type SpectrumRangeCalendarProps as RangeCalendarProps,\n TimeField,\n type SpectrumTimeFieldProps as TimeFieldProps,\n} from '@adobe/react-spectrum';\n\nexport type { CalendarDate, CalendarDateTime, ZonedDateTime };\n\n// This is the type for the DatePicker value\nexport type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;\n\n// This is the type for DatePicker onChange\nexport type MappedDateValue<T> = T extends ZonedDateTime\n ? ZonedDateTime\n : T extends CalendarDateTime\n ? CalendarDateTime\n : T extends CalendarDate\n ? CalendarDate\n : never;\n"],"mappings":"AAMA,SACEA,QAAQ,EAERC,SAAS,EAETC,UAAU,EAEVC,eAAe,EAEfC,aAAa,EAEbC,SAAS,QAEJ,uBAAuB;;AAI9B;;AAGA"}
|
|
1
|
+
{"version":3,"file":"dateAndTime.js","names":["Calendar","DateField","DatePicker","DateRangePicker","RangeCalendar","TimeField"],"sources":["../../src/spectrum/dateAndTime.ts"],"sourcesContent":["import {\n type CalendarDate,\n type CalendarDateTime,\n type ZonedDateTime,\n} from '@internationalized/date';\n\nexport {\n Calendar,\n type SpectrumCalendarProps as CalendarProps,\n DateField,\n type SpectrumDateFieldProps as DateFieldProps,\n DatePicker,\n type SpectrumDatePickerProps as DatePickerProps,\n DateRangePicker,\n type SpectrumDateRangePickerProps as DateRangePickerProps,\n RangeCalendar,\n type SpectrumRangeCalendarProps as RangeCalendarProps,\n TimeField,\n type SpectrumTimeFieldProps as TimeFieldProps,\n} from '@adobe/react-spectrum';\n\nexport type { CalendarDate, CalendarDateTime, ZonedDateTime };\n\n// This is the type for the DatePicker value\nexport type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;\n\n// This is the type for DatePicker onChange\nexport type MappedDateValue<T> = T extends ZonedDateTime\n ? ZonedDateTime\n : T extends CalendarDateTime\n ? CalendarDateTime\n : T extends CalendarDate\n ? CalendarDate\n : never;\n"],"mappings":"AAMA,SACEA,QAAQ,EAERC,SAAS,EAETC,UAAU,EAEVC,eAAe,EAEfC,aAAa,EAEbC,SAAS,QAEJ,uBAAuB;;AAI9B;;AAGA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forms.js","names":["Checkbox","SpectrumCheckbox","ColorEditor","ColorPicker","Form","NumberField","Radio","RadioGroup","RangeSlider","SearchField","Slider","Switch","TextArea","TextField"],"sources":["../../src/spectrum/forms.ts"],"sourcesContent":["export {\n Checkbox as SpectrumCheckbox,\n type SpectrumCheckboxProps,\n ColorEditor,\n type SpectrumColorEditorProps as ColorEditorProps,\n ColorPicker,\n type SpectrumColorPickerProps as ColorPickerProps,\n Form,\n type SpectrumFormProps as FormProps,\n NumberField,\n type SpectrumNumberFieldProps as NumberFieldProps,\n Radio,\n RadioGroup,\n RangeSlider,\n type SpectrumRangeSliderProps as RangeSliderProps,\n SearchField,\n type SpectrumSearchFieldProps as SearchFieldProps,\n Slider,\n type SpectrumSliderProps as SliderProps,\n Switch,\n type SpectrumSwitchProps as SwitchProps,\n TextArea,\n TextField,\n type SpectrumTextFieldProps as TextFieldProps,\n} from '@adobe/react-spectrum';\n\nexport type {\n SpectrumRadioGroupProps as RadioGroupProps,\n SpectrumRadioProps as RadioProps,\n} from '@react-types/radio';\n\n// @react-types/textfield is unecessary if https://github.com/adobe/react-spectrum/pull/6090 merge\nexport type { SpectrumTextAreaProps as TextAreaProps } from '@react-types/textfield';\n"],"mappings":"AAAA,SACEA,QAAQ,IAAIC,gBAAgB,EAE5BC,WAAW,EAEXC,WAAW,EAEXC,IAAI,EAEJC,WAAW,EAEXC,KAAK,EACLC,UAAU,EACVC,WAAW,EAEXC,WAAW,EAEXC,MAAM,EAENC,MAAM,EAENC,QAAQ,EACRC,SAAS,QAEJ,uBAAuB;;AAO9B"}
|
|
1
|
+
{"version":3,"file":"forms.js","names":["Checkbox","SpectrumCheckbox","ColorEditor","ColorPicker","Form","NumberField","Radio","RadioGroup","RangeSlider","SearchField","Slider","Switch","TextArea","TextField"],"sources":["../../src/spectrum/forms.ts"],"sourcesContent":["export {\n Checkbox as SpectrumCheckbox,\n type SpectrumCheckboxProps,\n ColorEditor,\n type SpectrumColorEditorProps as ColorEditorProps,\n ColorPicker,\n type SpectrumColorPickerProps as ColorPickerProps,\n Form,\n type SpectrumFormProps as FormProps,\n NumberField,\n type SpectrumNumberFieldProps as NumberFieldProps,\n Radio,\n RadioGroup,\n RangeSlider,\n type SpectrumRangeSliderProps as RangeSliderProps,\n SearchField,\n type SpectrumSearchFieldProps as SearchFieldProps,\n Slider,\n type SpectrumSliderProps as SliderProps,\n Switch,\n type SpectrumSwitchProps as SwitchProps,\n TextArea,\n TextField,\n type SpectrumTextFieldProps as TextFieldProps,\n} from '@adobe/react-spectrum';\n\nexport type {\n SpectrumRadioGroupProps as RadioGroupProps,\n SpectrumRadioProps as RadioProps,\n} from '@react-types/radio';\n\n// @react-types/textfield is unecessary if https://github.com/adobe/react-spectrum/pull/6090 merge\nexport type { SpectrumTextAreaProps as TextAreaProps } from '@react-types/textfield';\n"],"mappings":"AAAA,SACEA,QAAQ,IAAIC,gBAAgB,EAE5BC,WAAW,EAEXC,WAAW,EAEXC,IAAI,EAEJC,WAAW,EAEXC,KAAK,EACLC,UAAU,EACVC,WAAW,EAEXC,WAAW,EAEXC,MAAM,EAENC,MAAM,EAENC,QAAQ,EACRC,SAAS,QAEJ,uBAAuB;;AAO9B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","names":["Icon"],"sources":["../../src/spectrum/icons.ts"],"sourcesContent":["// eslint-disable-next-line import/prefer-default-export\nexport { Icon } from '@adobe/react-spectrum';\n"],"mappings":"AAAA;AACA,SAASA,IAAI,QAAQ,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"icons.js","names":["Icon"],"sources":["../../src/spectrum/icons.ts"],"sourcesContent":["// eslint-disable-next-line import/prefer-default-export\nexport { Icon } from '@adobe/react-spectrum';\n"],"mappings":"AAAA;AACA,SAASA,IAAI,QAAQ,uBAAuB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/spectrum/index.ts"],"sourcesContent":["/**\n * Re-exporting React Spectrum components + props.\n */\nexport * from './buttons';\nexport * from './collections';\nexport * from './content';\nexport * from './dateAndTime';\nexport * from './forms';\nexport * from './icons';\nexport * from './layout';\nexport * from './navigation';\nexport * from './overlays';\nexport * from './shared';\nexport * from './status';\n\n/**\n * Custom DH components wrapping React Spectrum components.\n */\nexport * from './ActionMenu';\nexport * from './ActionGroup';\nexport * from './comboBox';\nexport * from './ListActionGroup';\nexport * from './ListActionMenu';\nexport * from './listView';\nexport * from './picker';\nexport * from './Heading';\nexport * from './Text';\nexport * from './View';\nexport * from './CheckboxGroup';\n\n/**\n * Custom DH spectrum utils\n */\nexport * from './ItemContent';\nexport * from './ItemTooltip';\nexport * from './utils';\n"],"mappings":"AAAA;AACA;AACA;AAFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;AACA;AACA;AAFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;AACA;AACA;AAFA;AAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/spectrum/index.ts"],"sourcesContent":["/**\n * Re-exporting React Spectrum components + props.\n */\nexport * from './buttons';\nexport * from './collections';\nexport * from './content';\nexport * from './dateAndTime';\nexport * from './forms';\nexport * from './icons';\nexport * from './layout';\nexport * from './navigation';\nexport * from './overlays';\nexport * from './shared';\nexport * from './status';\n\n/**\n * Custom DH components wrapping React Spectrum components.\n */\nexport * from './ActionMenu';\nexport * from './ActionGroup';\nexport * from './comboBox';\nexport * from './ListActionGroup';\nexport * from './ListActionMenu';\nexport * from './listView';\nexport * from './picker';\nexport * from './Heading';\nexport * from './Text';\nexport * from './View';\nexport * from './CheckboxGroup';\n\n/**\n * Custom DH spectrum utils\n */\nexport * from './ItemContent';\nexport * from './ItemTooltip';\nexport * from './utils';\n"],"mappings":"AAAA;AACA;AACA;AAFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;AACA;AACA;AAFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;AACA;AACA;AAFA;AAAA;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","names":["Flex","Grid"],"sources":["../../src/spectrum/layout.ts"],"sourcesContent":["export {\n Flex,\n type FlexProps,\n Grid,\n type GridProps,\n} from '@adobe/react-spectrum';\n"],"mappings":"AAAA,SACEA,IAAI,EAEJC,IAAI,QAEC,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"layout.js","names":["Flex","Grid"],"sources":["../../src/spectrum/layout.ts"],"sourcesContent":["export {\n Flex,\n type FlexProps,\n Grid,\n type GridProps,\n} from '@adobe/react-spectrum';\n"],"mappings":"AAAA,SACEA,IAAI,EAEJC,IAAI,QAEC,uBAAuB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListView.js","names":["useMemo","cl","EMPTY_FUNCTION","normalizeTooltipOptions","wrapItemChildren","ListViewWrapper","jsx","_jsx","ListView","_ref","children","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","UNSAFE_className","onChange","onScroll","onSelectionChange","spectrumListViewProps","_objectWithoutProperties","_excluded","tooltipOptions","wrappedItems","_objectSpread"],"sources":["../../../src/spectrum/listView/ListView.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { type SpectrumListViewProps } from '@adobe/react-spectrum';\nimport cl from 'classnames';\nimport { EMPTY_FUNCTION } from '@deephaven/utils';\nimport {\n type MultipleItemSelectionProps,\n type NormalizedItem,\n normalizeTooltipOptions,\n type TooltipOptions,\n wrapItemChildren,\n} from '../utils';\nimport { ListViewWrapper, type ListViewWrapperProps } from './ListViewWrapper';\nimport { type ItemElementOrPrimitive } from '../shared';\n\nexport type ListViewProps = MultipleItemSelectionProps & {\n children: ItemElementOrPrimitive | ItemElementOrPrimitive[];\n /** Can be set to true or a TooltipOptions to enable item tooltips */\n tooltip?: boolean | TooltipOptions;\n\n /** Handler that is called when the picker is scrolled. */\n onScroll?: (event: Event) => void;\n} & Omit<\n SpectrumListViewProps<NormalizedItem>,\n | 'children'\n | 'items'\n | 'selectedKeys'\n | 'defaultSelectedKeys'\n | 'disabledKeys'\n | 'onSelectionChange'\n >;\n\nexport function ListView({\n children,\n tooltip = true,\n selectedKeys,\n defaultSelectedKeys,\n disabledKeys,\n UNSAFE_className,\n onChange,\n onScroll = EMPTY_FUNCTION,\n onSelectionChange,\n ...spectrumListViewProps\n}: ListViewProps): JSX.Element | null {\n const tooltipOptions = useMemo(\n () => normalizeTooltipOptions(tooltip, 'bottom'),\n [tooltip]\n );\n\n const wrappedItems = useMemo(\n () => wrapItemChildren(children, tooltipOptions),\n [children, tooltipOptions]\n );\n\n return (\n <ListViewWrapper\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...spectrumListViewProps}\n UNSAFE_className={cl('dh-list-view', UNSAFE_className)}\n selectedKeys={\n selectedKeys as ListViewWrapperProps<unknown>['selectedKeys']\n }\n defaultSelectedKeys={\n defaultSelectedKeys as ListViewWrapperProps<unknown>['defaultSelectedKeys']\n }\n disabledKeys={\n disabledKeys as ListViewWrapperProps<unknown>['disabledKeys']\n }\n onScroll={onScroll}\n onSelectionChange={onChange ?? onSelectionChange}\n >\n {wrappedItems}\n </ListViewWrapper>\n );\n}\n\nexport default ListView;\n"],"mappings":";;;;;;;;AAAA,SAASA,OAAO,QAAQ,OAAO;AAE/B,OAAOC,EAAE,MAAM,YAAY;AAC3B,SAASC,cAAc,QAAQ,kBAAkB;AAAC,SAIhDC,uBAAuB,EAEvBC,gBAAgB;AAAA,SAETC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAoBxB,OAAO,SAASC,QAAQA,CAAAC,IAAA,EAWc;EAAA,IAXb;MACvBC,QAAQ;MACRC,OAAO,GAAG,IAAI;MACdC,YAAY;MACZC,mBAAmB;MACnBC,YAAY;MACZC,gBAAgB;MAChBC,QAAQ;MACRC,QAAQ,GAAGf,cAAc;MACzBgB;IAEa,CAAC,GAAAT,IAAA;IADXU,qBAAqB,GAAAC,wBAAA,CAAAX,IAAA,EAAAY,SAAA;EAExB,IAAMC,cAAc,GAAGtB,OAAO,CAC5B,MAAMG,uBAAuB,CAACQ,OAAO,EAAE,QAAQ,CAAC,EAChD,CAACA,OAAO,CACV,CAAC;EAED,IAAMY,YAAY,GAAGvB,OAAO,CAC1B,MAAMI,gBAAgB,CAACM,QAAQ,EAAEY,cAAc,CAAC,EAChD,CAACZ,QAAQ,EAAEY,cAAc,CAC3B,CAAC;EAED,oBACEf,IAAA,CAACF;EACC;EAAA,EAAAmB,aAAA,CAAAA,aAAA,KACIL,qBAAqB;IACzBJ,gBAAgB,EAAEd,EAAE,CAAC,cAAc,EAAEc,gBAAgB,CAAE;IACvDH,YAAY,EACVA,YACD;IACDC,mBAAmB,EACjBA,mBACD;IACDC,YAAY,EACVA,YACD;IACDG,QAAQ,EAAEA,QAAS;IACnBC,iBAAiB,EAAEF,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAIE,iBAAkB;IAAAR,QAAA,EAEhDa;EAAY,EACE,CAAC;AAEtB;AAEA,eAAef,QAAQ"}
|
|
1
|
+
{"version":3,"file":"ListView.js","names":["useMemo","cl","EMPTY_FUNCTION","normalizeTooltipOptions","wrapItemChildren","ListViewWrapper","jsx","_jsx","ListView","_ref","children","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","UNSAFE_className","onChange","onScroll","onSelectionChange","spectrumListViewProps","_objectWithoutProperties","_excluded","tooltipOptions","wrappedItems","_objectSpread"],"sources":["../../../src/spectrum/listView/ListView.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { type SpectrumListViewProps } from '@adobe/react-spectrum';\nimport cl from 'classnames';\nimport { EMPTY_FUNCTION } from '@deephaven/utils';\nimport {\n type MultipleItemSelectionProps,\n type NormalizedItem,\n normalizeTooltipOptions,\n type TooltipOptions,\n wrapItemChildren,\n} from '../utils';\nimport { ListViewWrapper, type ListViewWrapperProps } from './ListViewWrapper';\nimport { type ItemElementOrPrimitive } from '../shared';\n\nexport type ListViewProps = MultipleItemSelectionProps & {\n children: ItemElementOrPrimitive | ItemElementOrPrimitive[];\n /** Can be set to true or a TooltipOptions to enable item tooltips */\n tooltip?: boolean | TooltipOptions;\n\n /** Handler that is called when the picker is scrolled. */\n onScroll?: (event: Event) => void;\n} & Omit<\n SpectrumListViewProps<NormalizedItem>,\n | 'children'\n | 'items'\n | 'selectedKeys'\n | 'defaultSelectedKeys'\n | 'disabledKeys'\n | 'onSelectionChange'\n >;\n\nexport function ListView({\n children,\n tooltip = true,\n selectedKeys,\n defaultSelectedKeys,\n disabledKeys,\n UNSAFE_className,\n onChange,\n onScroll = EMPTY_FUNCTION,\n onSelectionChange,\n ...spectrumListViewProps\n}: ListViewProps): JSX.Element | null {\n const tooltipOptions = useMemo(\n () => normalizeTooltipOptions(tooltip, 'bottom'),\n [tooltip]\n );\n\n const wrappedItems = useMemo(\n () => wrapItemChildren(children, tooltipOptions),\n [children, tooltipOptions]\n );\n\n return (\n <ListViewWrapper\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...spectrumListViewProps}\n UNSAFE_className={cl('dh-list-view', UNSAFE_className)}\n selectedKeys={\n selectedKeys as ListViewWrapperProps<unknown>['selectedKeys']\n }\n defaultSelectedKeys={\n defaultSelectedKeys as ListViewWrapperProps<unknown>['defaultSelectedKeys']\n }\n disabledKeys={\n disabledKeys as ListViewWrapperProps<unknown>['disabledKeys']\n }\n onScroll={onScroll}\n onSelectionChange={onChange ?? onSelectionChange}\n >\n {wrappedItems}\n </ListViewWrapper>\n );\n}\n\nexport default ListView;\n"],"mappings":";;;;;;;;AAAA,SAASA,OAAO,QAAQ,OAAO;AAE/B,OAAOC,EAAE,MAAM,YAAY;AAC3B,SAASC,cAAc,QAAQ,kBAAkB;AAAC,SAIhDC,uBAAuB,EAEvBC,gBAAgB;AAAA,SAETC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAoBxB,OAAO,SAASC,QAAQA,CAAAC,IAAA,EAWc;EAAA,IAXb;MACvBC,QAAQ;MACRC,OAAO,GAAG,IAAI;MACdC,YAAY;MACZC,mBAAmB;MACnBC,YAAY;MACZC,gBAAgB;MAChBC,QAAQ;MACRC,QAAQ,GAAGf,cAAc;MACzBgB;IAEa,CAAC,GAAAT,IAAA;IADXU,qBAAqB,GAAAC,wBAAA,CAAAX,IAAA,EAAAY,SAAA;EAExB,IAAMC,cAAc,GAAGtB,OAAO,CAC5B,MAAMG,uBAAuB,CAACQ,OAAO,EAAE,QAAQ,CAAC,EAChD,CAACA,OAAO,CACV,CAAC;EAED,IAAMY,YAAY,GAAGvB,OAAO,CAC1B,MAAMI,gBAAgB,CAACM,QAAQ,EAAEY,cAAc,CAAC,EAChD,CAACZ,QAAQ,EAAEY,cAAc,CAC3B,CAAC;EAED,oBACEf,IAAA,CAACF;EACC;EAAA,EAAAmB,aAAA,CAAAA,aAAA,KACIL,qBAAqB;IACzBJ,gBAAgB,EAAEd,EAAE,CAAC,cAAc,EAAEc,gBAAgB,CAAE;IACvDH,YAAY,EACVA,YACD;IACDC,mBAAmB,EACjBA,mBACD;IACDC,YAAY,EACVA,YACD;IACDG,QAAQ,EAAEA,QAAS;IACnBC,iBAAiB,EAAEF,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAIE,iBAAkB;IAAAR,QAAA,EAEhDa;EAAY,EACE,CAAC;AAEtB;AAEA,eAAef,QAAQ","ignoreList":[]}
|
|
@@ -6,11 +6,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
8
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
|
-
import { useMemo } from 'react';
|
|
9
|
+
import { useMemo, createElement as _createElement } from 'react';
|
|
10
10
|
import cl from 'classnames';
|
|
11
11
|
import { normalizeTooltipOptions, useRenderNormalizedItem, useStringifiedMultiSelection } from "../utils/index.js";
|
|
12
12
|
import { ListViewWrapper } from "./ListViewWrapper.js";
|
|
13
|
-
import { createElement as _createElement } from "react";
|
|
14
13
|
/**
|
|
15
14
|
* ListView supporting normalized item data. This component mostly exists to
|
|
16
15
|
* decouple some of the logic needed to support table data. Specifically it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListViewNormalized.js","names":["useMemo","
|
|
1
|
+
{"version":3,"file":"ListViewNormalized.js","names":["useMemo","createElement","_createElement","cl","normalizeTooltipOptions","useRenderNormalizedItem","useStringifiedMultiSelection","ListViewWrapper","ListViewNormalized","_ref","normalizedItems","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","showItemIcons","actions","UNSAFE_className","onChange","onSelectionChange","props","_objectWithoutProperties","_excluded","tooltipOptions","renderNormalizedItem","itemIconSlot","showItemDescriptions","forceRerenderKey","concat","placement","selectedStringKeys","defaultSelectedStringKeys","disabledStringKeys","onStringSelectionChange","_objectSpread","key","items"],"sources":["../../../src/spectrum/listView/ListViewNormalized.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport cl from 'classnames';\nimport {\n type ListActions,\n type NormalizedItem,\n normalizeTooltipOptions,\n useRenderNormalizedItem,\n useStringifiedMultiSelection,\n} from '../utils';\nimport type { ListViewProps } from './ListView';\nimport { ListViewWrapper } from './ListViewWrapper';\n\nexport interface ListViewNormalizedProps\n extends Omit<ListViewProps, 'children'> {\n normalizedItems: NormalizedItem[];\n showItemIcons: boolean;\n actions?: ListActions<unknown>;\n}\n\n/**\n * ListView supporting normalized item data. This component mostly exists to\n * decouple some of the logic needed to support table data. Specifically it\n * handles item rendering configurations as well as converting selection keys\n * to / from strings. This makes it easier to test logic in isolation without\n * a dependency on JS apis (e.g. in the Styleguide).\n *\n * Note that This component will usually not be used directly. Instead, it is\n * recommended to use\n * - `@deephaven/components`'s `ListView` for non-table data sources\n * - `@deephaven/jsapi-components`'s `ListView` for table data sources\n */\nexport function ListViewNormalized({\n normalizedItems,\n tooltip = true,\n selectedKeys,\n defaultSelectedKeys,\n disabledKeys,\n showItemIcons,\n actions,\n UNSAFE_className,\n onChange,\n onSelectionChange,\n ...props\n}: ListViewNormalizedProps): JSX.Element {\n const tooltipOptions = useMemo(\n () => normalizeTooltipOptions(tooltip, 'bottom'),\n [tooltip]\n );\n\n const renderNormalizedItem = useRenderNormalizedItem({\n itemIconSlot: 'illustration',\n // Descriptions introduce variable item heights which throws off setting\n // viewport on windowed data. For now not going to implement description\n // support in Picker.\n // https://github.com/deephaven/web-client-ui/issues/1958\n showItemDescriptions: false,\n showItemIcons,\n tooltipOptions,\n actions,\n });\n\n // Spectrum doesn't re-render if only the `renderNormalizedItems` function\n // changes, so we create a key from its dependencies that can be used to force\n // re-render.\n const forceRerenderKey = `${showItemIcons}-${tooltipOptions?.placement}`;\n\n const {\n selectedStringKeys,\n defaultSelectedStringKeys,\n disabledStringKeys,\n onStringSelectionChange,\n } = useStringifiedMultiSelection({\n normalizedItems,\n selectedKeys,\n defaultSelectedKeys,\n disabledKeys,\n onChange: onChange ?? onSelectionChange,\n });\n\n return (\n <ListViewWrapper\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n UNSAFE_className={cl('dh-list-view-normalized', UNSAFE_className)}\n key={forceRerenderKey}\n items={normalizedItems}\n selectedKeys={selectedStringKeys}\n defaultSelectedKeys={defaultSelectedStringKeys}\n disabledKeys={disabledStringKeys}\n onSelectionChange={onStringSelectionChange}\n >\n {renderNormalizedItem}\n </ListViewWrapper>\n );\n}\n\nexport default ListViewNormalized;\n"],"mappings":";;;;;;;;AAAA,SAASA,OAAO,EAAAC,aAAA,IAAAC,cAAA,QAAQ,OAAO;AAC/B,OAAOC,EAAE,MAAM,YAAY;AAAC,SAI1BC,uBAAuB,EACvBC,uBAAuB,EACvBC,4BAA4B;AAAA,SAGrBC,eAAe;AASxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAAAC,IAAA,EAYO;EAAA,IAZN;MACjCC,eAAe;MACfC,OAAO,GAAG,IAAI;MACdC,YAAY;MACZC,mBAAmB;MACnBC,YAAY;MACZC,aAAa;MACbC,OAAO;MACPC,gBAAgB;MAChBC,QAAQ;MACRC;IAEuB,CAAC,GAAAV,IAAA;IADrBW,KAAK,GAAAC,wBAAA,CAAAZ,IAAA,EAAAa,SAAA;EAER,IAAMC,cAAc,GAAGvB,OAAO,CAC5B,MAAMI,uBAAuB,CAACO,OAAO,EAAE,QAAQ,CAAC,EAChD,CAACA,OAAO,CACV,CAAC;EAED,IAAMa,oBAAoB,GAAGnB,uBAAuB,CAAC;IACnDoB,YAAY,EAAE,cAAc;IAC5B;IACA;IACA;IACA;IACAC,oBAAoB,EAAE,KAAK;IAC3BX,aAAa;IACbQ,cAAc;IACdP;EACF,CAAC,CAAC;;EAEF;EACA;EACA;EACA,IAAMW,gBAAgB,MAAAC,MAAA,CAAMb,aAAa,OAAAa,MAAA,CAAIL,cAAc,aAAdA,cAAc,uBAAdA,cAAc,CAAEM,SAAS,CAAE;EAExE,IAAM;IACJC,kBAAkB;IAClBC,yBAAyB;IACzBC,kBAAkB;IAClBC;EACF,CAAC,GAAG3B,4BAA4B,CAAC;IAC/BI,eAAe;IACfE,YAAY;IACZC,mBAAmB;IACnBC,YAAY;IACZI,QAAQ,EAAEA,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAIC;EACxB,CAAC,CAAC;EAEF,oBACEjB,cAAA,CAACK;EACC;EAAA,EAAA2B,aAAA,CAAAA,aAAA,KACId,KAAK;IACTH,gBAAgB,EAAEd,EAAE,CAAC,yBAAyB,EAAEc,gBAAgB,CAAE;IAClEkB,GAAG,EAAER,gBAAiB;IACtBS,KAAK,EAAE1B,eAAgB;IACvBE,YAAY,EAAEkB,kBAAmB;IACjCjB,mBAAmB,EAAEkB,yBAA0B;IAC/CjB,YAAY,EAAEkB,kBAAmB;IACjCb,iBAAiB,EAAEc;EAAwB,IAE1CT,oBACc,CAAC;AAEtB;AAEA,eAAehB,kBAAkB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListViewWrapper.js","names":["ListView","SpectrumListView","extractSpectrumHTMLElement","useContentRect","useOnScrollRef","EMPTY_FUNCTION","cl","useSpectrumThemeProvider","Flex","separateSpectrumProps","jsx","_jsx","ListViewWrapper","props","_styleProps$minHeight","_listViewProps$densit","ariaLabelProps","componentProps","styleProps","onScroll","listViewProps","_objectWithoutProperties","_excluded","scale","scrollRef","ref","contentRectRef","contentRect","_objectSpread","direction","minHeight","UNSAFE_className","concat","density","children","height"],"sources":["../../../src/spectrum/listView/ListViewWrapper.tsx"],"sourcesContent":["import {\n ListView as SpectrumListView,\n type SpectrumListViewProps,\n} from '@adobe/react-spectrum';\nimport {\n extractSpectrumHTMLElement,\n useContentRect,\n useOnScrollRef,\n} from '@deephaven/react-hooks';\nimport { EMPTY_FUNCTION } from '@deephaven/utils';\nimport cl from 'classnames';\nimport { useSpectrumThemeProvider } from '../../theme';\nimport { Flex } from '../layout';\nimport { separateSpectrumProps } from '../utils';\nimport './ListViewWrapper.scss';\n\nexport interface ListViewWrapperProps<T> extends SpectrumListViewProps<T> {\n /** Handler that is called when the picker is scrolled. */\n onScroll?: (event: Event) => void;\n}\n\n/**\n * Helper component to wrap a ListView with the appropriate styling + scroll\n * handling. This is used by both the `@deephaven/components` `ListView` and\n * the `@deephaven/jsapi-components` `ListView` (via `ListViewNormalized`) to\n * ensure consistency.\n *\n * Note that This component will usually not be used directly. Instead, it is\n * recommended to use\n * - `@deephaven/components`'s `ListView` for non-table data sources\n * - `@deephaven/jsapi-components`'s `ListView` for table data sources\n */\nexport function ListViewWrapper<T>(\n props: ListViewWrapperProps<T>\n): JSX.Element {\n const { ariaLabelProps, componentProps, styleProps } =\n separateSpectrumProps(props);\n\n const { onScroll = EMPTY_FUNCTION, ...listViewProps } = componentProps;\n\n const { scale } = useSpectrumThemeProvider();\n\n const scrollRef = useOnScrollRef(onScroll, extractSpectrumHTMLElement);\n\n // Spectrum ListView crashes when it has zero height. Track the contentRect\n // of the parent container and only render the ListView when it has a non-zero\n // height. See https://github.com/adobe/react-spectrum/issues/6213\n const { ref: contentRectRef, contentRect } = useContentRect(\n extractSpectrumHTMLElement<HTMLDivElement>\n );\n\n return (\n <Flex\n direction=\"column\"\n ref={contentRectRef}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...styleProps}\n // Set min-height to 1px so that `ListView` is rendered whenever container\n // is visible. This prevents the height from shrinking to zero as a result\n // of a parent grid or flex container calculating content sizes. The\n // container height can still be zero when it is not being displayed such\n // as when one of its parents have `display: none`.\n minHeight={styleProps.minHeight ?? 1}\n UNSAFE_className={cl(\n 'dh-list-view-wrapper',\n `dh-list-view-wrapper-density-${listViewProps.density ?? 'regular'}`,\n `dh-list-view-wrapper-scale-${scale}`,\n styleProps.UNSAFE_className\n )}\n >\n {/**\n * Only render ListView if parent is visible. Some time in the future we\n * should consider using `checkVisibility()` once it has better browser\n * support.\n */}\n {contentRect.height === 0 ? null : (\n <SpectrumListView\n ref={scrollRef}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...ariaLabelProps}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...listViewProps}\n />\n )}\n </Flex>\n );\n}\n\nexport default ListViewWrapper;\n"],"mappings":";;;;;;;;AAAA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BAAA,GAAI,SAAS,iCAAAiB,MAAA,CACpCT,KAAK,GACnCL,UAAU,CAACa,gBACb,CAAE;IAAAG,QAAA,EAODP,WAAW,CAACQ,MAAM,KAAK,CAAC,GAAG,IAAI,gBAC9BxB,IAAA,CAACV,gBAAgB,EAAA2B,aAAA,CAAAA,aAAA;MACfH,GAAG,EAAED;MACL;IAAA,GACIR,cAAc,GAEdI,aAAa,CAClB;EACF,EACG,CAAC;AAEX;AAEA,eAAeR,eAAe"}
|
|
1
|
+
{"version":3,"file":"ListViewWrapper.js","names":["ListView","SpectrumListView","extractSpectrumHTMLElement","useContentRect","useOnScrollRef","EMPTY_FUNCTION","cl","useSpectrumThemeProvider","Flex","separateSpectrumProps","jsx","_jsx","ListViewWrapper","props","_styleProps$minHeight","_listViewProps$densit","ariaLabelProps","componentProps","styleProps","onScroll","listViewProps","_objectWithoutProperties","_excluded","scale","scrollRef","ref","contentRectRef","contentRect","_objectSpread","direction","minHeight","UNSAFE_className","concat","density","children","height"],"sources":["../../../src/spectrum/listView/ListViewWrapper.tsx"],"sourcesContent":["import {\n ListView as SpectrumListView,\n type SpectrumListViewProps,\n} from '@adobe/react-spectrum';\nimport {\n extractSpectrumHTMLElement,\n useContentRect,\n useOnScrollRef,\n} from '@deephaven/react-hooks';\nimport { EMPTY_FUNCTION } from '@deephaven/utils';\nimport cl from 'classnames';\nimport { useSpectrumThemeProvider } from '../../theme';\nimport { Flex } from '../layout';\nimport { separateSpectrumProps } from '../utils';\nimport './ListViewWrapper.scss';\n\nexport interface ListViewWrapperProps<T> extends SpectrumListViewProps<T> {\n /** Handler that is called when the picker is scrolled. */\n onScroll?: (event: Event) => void;\n}\n\n/**\n * Helper component to wrap a ListView with the appropriate styling + scroll\n * handling. This is used by both the `@deephaven/components` `ListView` and\n * the `@deephaven/jsapi-components` `ListView` (via `ListViewNormalized`) to\n * ensure consistency.\n *\n * Note that This component will usually not be used directly. Instead, it is\n * recommended to use\n * - `@deephaven/components`'s `ListView` for non-table data sources\n * - `@deephaven/jsapi-components`'s `ListView` for table data sources\n */\nexport function ListViewWrapper<T>(\n props: ListViewWrapperProps<T>\n): JSX.Element {\n const { ariaLabelProps, componentProps, styleProps } =\n separateSpectrumProps(props);\n\n const { onScroll = EMPTY_FUNCTION, ...listViewProps } = componentProps;\n\n const { scale } = useSpectrumThemeProvider();\n\n const scrollRef = useOnScrollRef(onScroll, extractSpectrumHTMLElement);\n\n // Spectrum ListView crashes when it has zero height. Track the contentRect\n // of the parent container and only render the ListView when it has a non-zero\n // height. See https://github.com/adobe/react-spectrum/issues/6213\n const { ref: contentRectRef, contentRect } = useContentRect(\n extractSpectrumHTMLElement<HTMLDivElement>\n );\n\n return (\n <Flex\n direction=\"column\"\n ref={contentRectRef}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...styleProps}\n // Set min-height to 1px so that `ListView` is rendered whenever container\n // is visible. This prevents the height from shrinking to zero as a result\n // of a parent grid or flex container calculating content sizes. The\n // container height can still be zero when it is not being displayed such\n // as when one of its parents have `display: none`.\n minHeight={styleProps.minHeight ?? 1}\n UNSAFE_className={cl(\n 'dh-list-view-wrapper',\n `dh-list-view-wrapper-density-${listViewProps.density ?? 'regular'}`,\n `dh-list-view-wrapper-scale-${scale}`,\n styleProps.UNSAFE_className\n )}\n >\n {/**\n * Only render ListView if parent is visible. Some time in the future we\n * should consider using `checkVisibility()` once it has better browser\n * support.\n */}\n {contentRect.height === 0 ? null : (\n <SpectrumListView\n ref={scrollRef}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...ariaLabelProps}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...listViewProps}\n />\n )}\n </Flex>\n );\n}\n\nexport default ListViewWrapper;\n"],"mappings":";;;;;;;;AAAA,SACEA,QAAQ,IAAIC,gBAAgB,QAEvB,uBAAuB;AAC9B,SACEC,0BAA0B,EAC1BC,cAAc,EACdC,cAAc,QACT,wBAAwB;AAC/B,SAASC,cAAc,QAAQ,kBAAkB;AACjD,OAAOC,E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,CAACV,gBAAgB,EAAA2B,aAAA,CAAAA,aAAA;MACfH,GAAG,EAAED;MACL;IAAA,GACIR,cAAc,GAEdI,aAAa,CAClB;EACF,EACG,CAAC;AAEX;AAEA,eAAeR,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/spectrum/listView/index.ts"],"sourcesContent":["export * from './ListView';\nexport * from './ListViewNormalized';\nexport * from './ListViewWrapper';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/spectrum/listView/index.ts"],"sourcesContent":["export * from './ListView';\nexport * from './ListViewNormalized';\nexport * from './ListViewWrapper';\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.js","names":["Accordion","Breadcrumbs","Disclosure","DisclosureTitle","DisclosurePanel","Link","TabList","Tabs","DHCTabPanels","TabPanels"],"sources":["../../src/spectrum/navigation.ts"],"sourcesContent":["export {\n Accordion,\n type SpectrumAccordionProps as AccordionProps,\n Breadcrumbs,\n type SpectrumBreadcrumbsProps as BreadcrumbsProps,\n Disclosure,\n type SpectrumDisclosureProps as DisclosureProps,\n DisclosureTitle,\n type SpectrumDisclosureTitleProps as DisclosureTitleProps,\n DisclosurePanel,\n type SpectrumDisclosurePanelProps as DisclosurePanelProps,\n Link,\n type SpectrumLinkProps as LinkProps,\n TabList,\n type SpectrumTabListProps as TabListProps,\n Tabs,\n type SpectrumTabsProps as TabsProps,\n} from '@adobe/react-spectrum';\nexport {\n DHCTabPanels as TabPanels,\n type DHCTabPanelsProps as TabPanelsProps,\n} from './TabPanels';\n"],"mappings":"AAAA,SACEA,SAAS,EAETC,WAAW,EAEXC,UAAU,EAEVC,eAAe,EAEfC,eAAe,EAEfC,IAAI,EAEJC,OAAO,EAEPC,IAAI,QAEC,uBAAuB;AAAC,SAE7BC,YAAY,IAAIC,SAAS"}
|
|
1
|
+
{"version":3,"file":"navigation.js","names":["Accordion","Breadcrumbs","Disclosure","DisclosureTitle","DisclosurePanel","Link","TabList","Tabs","DHCTabPanels","TabPanels"],"sources":["../../src/spectrum/navigation.ts"],"sourcesContent":["export {\n Accordion,\n type SpectrumAccordionProps as AccordionProps,\n Breadcrumbs,\n type SpectrumBreadcrumbsProps as BreadcrumbsProps,\n Disclosure,\n type SpectrumDisclosureProps as DisclosureProps,\n DisclosureTitle,\n type SpectrumDisclosureTitleProps as DisclosureTitleProps,\n DisclosurePanel,\n type SpectrumDisclosurePanelProps as DisclosurePanelProps,\n Link,\n type SpectrumLinkProps as LinkProps,\n TabList,\n type SpectrumTabListProps as TabListProps,\n Tabs,\n type SpectrumTabsProps as TabsProps,\n} from '@adobe/react-spectrum';\nexport {\n DHCTabPanels as TabPanels,\n type DHCTabPanelsProps as TabPanelsProps,\n} from './TabPanels';\n"],"mappings":"AAAA,SACEA,SAAS,EAETC,WAAW,EAEXC,UAAU,EAEVC,eAAe,EAEfC,eAAe,EAEfC,IAAI,EAEJC,OAAO,EAEPC,IAAI,QAEC,uBAAuB;AAAC,SAE7BC,YAAY,IAAIC,SAAS","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlays.js","names":["AlertDialog","ContextualHelp","Dialog","DialogContainer","DialogTrigger"],"sources":["../../src/spectrum/overlays.ts"],"sourcesContent":["export {\n AlertDialog,\n type SpectrumAlertDialogProps as AlertDialogProps,\n ContextualHelp,\n type SpectrumContextualHelpProps as ContextualHelpProps,\n Dialog,\n type SpectrumDialogProps as DialogProps,\n DialogContainer,\n type SpectrumDialogContainerProps as DialogContainerProps,\n DialogTrigger,\n type SpectrumDialogTriggerProps as DialogTriggerProps,\n} from '@adobe/react-spectrum';\n"],"mappings":"AAAA,SACEA,WAAW,EAEXC,cAAc,EAEdC,MAAM,EAENC,eAAe,EAEfC,aAAa,QAER,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"overlays.js","names":["AlertDialog","ContextualHelp","Dialog","DialogContainer","DialogTrigger"],"sources":["../../src/spectrum/overlays.ts"],"sourcesContent":["export {\n AlertDialog,\n type SpectrumAlertDialogProps as AlertDialogProps,\n ContextualHelp,\n type SpectrumContextualHelpProps as ContextualHelpProps,\n Dialog,\n type SpectrumDialogProps as DialogProps,\n DialogContainer,\n type SpectrumDialogContainerProps as DialogContainerProps,\n DialogTrigger,\n type SpectrumDialogTriggerProps as DialogTriggerProps,\n} from '@adobe/react-spectrum';\n"],"mappings":"AAAA,SACEA,WAAW,EAEXC,cAAc,EAEdC,MAAM,EAENC,eAAe,EAEfC,aAAa,QAER,uBAAuB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Picker.js","names":["Picker","SpectrumPicker","cl","React","useMergeRef","usePickerProps","jsx","_jsx","forwardRef","_ref","ref","UNSAFE_className","props","_objectWithoutProperties","_excluded","_usePickerProps","defaultSelectedKey","disabledKeys","selectedKey","scrollRef","pickerProps","_excluded2","pickerRef","_objectSpread","displayName"],"sources":["../../../src/spectrum/picker/Picker.tsx"],"sourcesContent":["import {\n Picker as SpectrumPicker,\n type SpectrumPickerProps,\n} from '@adobe/react-spectrum';\nimport type { DOMRef } from '@react-types/shared';\nimport cl from 'classnames';\nimport React from 'react';\nimport { useMergeRef } from '@deephaven/react-hooks';\nimport type { NormalizedItem } from '../utils';\nimport type { PickerProps } from './PickerProps';\nimport { usePickerProps } from './usePickerProps';\n\n/**\n * Picker component for selecting items from a list of items. Items can be\n * provided via the `children` prop. Each item can be a string,\tnumber, boolean,\n * or a Spectrum <Item> element. The remaining props are just\tpass through props\n * for the Spectrum Picker component.\n * See https://react-spectrum.adobe.com/react-spectrum/Picker.html\n */\nexport const Picker = React.forwardRef(function Picker(\n { UNSAFE_className, ...props }: PickerProps,\n ref: DOMRef<HTMLDivElement>\n): JSX.Element {\n const {\n defaultSelectedKey,\n disabledKeys,\n selectedKey,\n ref: scrollRef,\n ...pickerProps\n } = usePickerProps(props);\n const pickerRef = useMergeRef(ref, scrollRef);\n return (\n <SpectrumPicker\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...pickerProps}\n ref={pickerRef}\n UNSAFE_className={cl('dh-picker', UNSAFE_className)}\n // Type assertions are necessary here since Spectrum types don't account\n // for number and boolean key values even though they are valid runtime\n // values.\n defaultSelectedKey={\n defaultSelectedKey as SpectrumPickerProps<NormalizedItem>['defaultSelectedKey']\n }\n disabledKeys={\n disabledKeys as SpectrumPickerProps<NormalizedItem>['disabledKeys']\n }\n selectedKey={\n selectedKey as SpectrumPickerProps<NormalizedItem>['selectedKey']\n }\n />\n );\n});\nPicker.displayName = 'Picker';\n\nexport default Picker;\n"],"mappings":";;;;;;;;;AAAA,SACEA,MAAM,IAAIC,cAAc,QAEnB,uBAAuB;AAE9B,OAAOC,EAAE,MAAM,YAAY;AAC3B,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,QAAQ,wBAAwB;AAAC,SAG5CC,cAAc;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AANA,SAAAC,GAAA,IAAAC,IAAA;AAOA,OAAO,IAAMP,MAAM,gBAAGG,KAAK,CAACK,UAAU,CAAC,SAASR,MAAMA,CAAAS,IAAA,EAEpDC,GAA2B,EACd;EAAA,IAFb;MAAEC;IAAwC,CAAC,GAAAF,IAAA;IAApBG,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EAG5B,IAAAC,eAAA,GAMIV,cAAc,CAACO,KAAK,CAAC;IANnB;MACJI,kBAAkB;MAClBC,YAAY;MACZC,WAAW;MACXR,GAAG,EAAES;IAEP,CAAC,GAAAJ,eAAA;IADIK,WAAW,GAAAP,wBAAA,CAAAE,eAAA,EAAAM,UAAA;EAEhB,IAAMC,SAAS,GAAGlB,WAAW,CAACM,GAAG,EAAES,SAAS,CAAC;EAC7C,oBACEZ,IAAA,CAACN;EACC;EAAA,EAAAsB,aAAA,CAAAA,aAAA,KACIH,WAAW;IACfV,GAAG,EAAEY,SAAU;IACfX,gBAAgB,EAAET,EAAE,CAAC,WAAW,EAAES,gBAAgB;IAClD;IACA;IACA;IAAA;IACAK,kBAAkB,EAChBA,kBACD;IACDC,YAAY,EACVA,YACD;IACDC,WAAW,EACTA;EACD,EACF,CAAC;AAEN,CAAC,CAAC;AACFlB,MAAM,CAACwB,WAAW,GAAG,QAAQ;AAE7B,eAAexB,MAAM"}
|
|
1
|
+
{"version":3,"file":"Picker.js","names":["Picker","SpectrumPicker","cl","React","useMergeRef","usePickerProps","jsx","_jsx","forwardRef","_ref","ref","UNSAFE_className","props","_objectWithoutProperties","_excluded","_usePickerProps","defaultSelectedKey","disabledKeys","selectedKey","scrollRef","pickerProps","_excluded2","pickerRef","_objectSpread","displayName"],"sources":["../../../src/spectrum/picker/Picker.tsx"],"sourcesContent":["import {\n Picker as SpectrumPicker,\n type SpectrumPickerProps,\n} from '@adobe/react-spectrum';\nimport type { DOMRef } from '@react-types/shared';\nimport cl from 'classnames';\nimport React from 'react';\nimport { useMergeRef } from '@deephaven/react-hooks';\nimport type { NormalizedItem } from '../utils';\nimport type { PickerProps } from './PickerProps';\nimport { usePickerProps } from './usePickerProps';\n\n/**\n * Picker component for selecting items from a list of items. Items can be\n * provided via the `children` prop. Each item can be a string,\tnumber, boolean,\n * or a Spectrum <Item> element. The remaining props are just\tpass through props\n * for the Spectrum Picker component.\n * See https://react-spectrum.adobe.com/react-spectrum/Picker.html\n */\nexport const Picker = React.forwardRef(function Picker(\n { UNSAFE_className, ...props }: PickerProps,\n ref: DOMRef<HTMLDivElement>\n): JSX.Element {\n const {\n defaultSelectedKey,\n disabledKeys,\n selectedKey,\n ref: scrollRef,\n ...pickerProps\n } = usePickerProps(props);\n const pickerRef = useMergeRef(ref, scrollRef);\n return (\n <SpectrumPicker\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...pickerProps}\n ref={pickerRef}\n UNSAFE_className={cl('dh-picker', UNSAFE_className)}\n // Type assertions are necessary here since Spectrum types don't account\n // for number and boolean key values even though they are valid runtime\n // values.\n defaultSelectedKey={\n defaultSelectedKey as SpectrumPickerProps<NormalizedItem>['defaultSelectedKey']\n }\n disabledKeys={\n disabledKeys as SpectrumPickerProps<NormalizedItem>['disabledKeys']\n }\n selectedKey={\n selectedKey as SpectrumPickerProps<NormalizedItem>['selectedKey']\n }\n />\n );\n});\nPicker.displayName = 'Picker';\n\nexport default Picker;\n"],"mappings":";;;;;;;;;AAAA,SACEA,MAAM,IAAIC,cAAc,QAEnB,uBAAuB;AAE9B,OAAOC,EAAE,MAAM,YAAY;AAC3B,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,QAAQ,wBAAwB;AAAC,SAG5CC,cAAc;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AANA,SAAAC,GAAA,IAAAC,IAAA;AAOA,OAAO,IAAMP,MAAM,gBAAGG,KAAK,CAACK,UAAU,CAAC,SAASR,MAAMA,CAAAS,IAAA,EAEpDC,GAA2B,EACd;EAAA,IAFb;MAAEC;IAAwC,CAAC,GAAAF,IAAA;IAApBG,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EAG5B,IAAAC,eAAA,GAMIV,cAAc,CAACO,KAAK,CAAC;IANnB;MACJI,kBAAkB;MAClBC,YAAY;MACZC,WAAW;MACXR,GAAG,EAAES;IAEP,CAAC,GAAAJ,eAAA;IADIK,WAAW,GAAAP,wBAAA,CAAAE,eAAA,EAAAM,UAAA;EAEhB,IAAMC,SAAS,GAAGlB,WAAW,CAACM,GAAG,EAAES,SAAS,CAAC;EAC7C,oBACEZ,IAAA,CAACN;EACC;EAAA,EAAAsB,aAAA,CAAAA,aAAA,KACIH,WAAW;IACfV,GAAG,EAAEY,SAAU;IACfX,gBAAgB,EAAET,EAAE,CAAC,WAAW,EAAES,gBAAgB;IAClD;IACA;IACA;IAAA;IACAK,kBAAkB,EAChBA,kBACD;IACDC,YAAY,EACVA,YACD;IACDC,WAAW,EACTA;EACD,EACF,CAAC;AAEN,CAAC,CAAC;AACFlB,MAAM,CAACwB,WAAW,GAAG,QAAQ;AAE7B,eAAexB,MAAM","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PickerNormalized.js","names":["Picker","SpectrumPicker","cl","usePickerNormalizedProps","createElement","_createElement","PickerNormalized","_ref","UNSAFE_className","props","_objectWithoutProperties","_excluded","_usePickerNormalizedP","forceRerenderKey","pickerProps","_excluded2","_objectSpread","key"],"sources":["../../../src/spectrum/picker/PickerNormalized.tsx"],"sourcesContent":["import { Picker as SpectrumPicker } from '@adobe/react-spectrum';\nimport cl from 'classnames';\nimport type { PickerNormalizedProps } from './PickerProps';\n\nimport usePickerNormalizedProps from './usePickerNormalizedProps';\n\n/**\n * Picker that takes an array of `NormalizedItem` or `NormalizedSection` items\n * as children and uses a render item function to render the items. This is\n * necessary to support windowed data.\n */\nexport function PickerNormalized({\n UNSAFE_className,\n ...props\n}: PickerNormalizedProps): JSX.Element {\n const { forceRerenderKey, ...pickerProps } = usePickerNormalizedProps<\n PickerNormalizedProps,\n HTMLDivElement\n >(props);\n\n return (\n <SpectrumPicker\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...pickerProps}\n key={forceRerenderKey}\n UNSAFE_className={cl(\n 'dh-picker',\n 'dh-picker-normalized',\n UNSAFE_className\n )}\n />\n );\n}\n\nexport default PickerNormalized;\n"],"mappings":";;;;;;;;;AAAA,SAASA,MAAM,IAAIC,cAAc,QAAQ,uBAAuB;AAChE,OAAOC,EAAE,MAAM,YAAY;AAAC,OAGrBC,wBAAwB;AAE/B;AACA;AACA;AACA;AACA;AAJA,SAAAC,aAAA,IAAAC,cAAA;AAKA,OAAO,SAASC,gBAAgBA,CAAAC,IAAA,EAGO;EAAA,IAHN;MAC/BC;IAEqB,CAAC,GAAAD,IAAA;IADnBE,KAAK,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA;EAER,IAAAC,qBAAA,GAA6CT,wBAAwB,CAGnEM,KAAK,CAAC;IAHF;MAAEI;IAAiC,CAAC,GAAAD,qBAAA;IAAbE,WAAW,GAAAJ,wBAAA,CAAAE,qBAAA,EAAAG,UAAA;EAKxC,oBACEV,cAAA,CAACJ;EACC;EAAA,EAAAe,aAAA,CAAAA,aAAA,KACIF,WAAW;IACfG,GAAG,EAAEJ,gBAAiB;IACtBL,gBAAgB,EAAEN,EAAE,CAClB,WAAW,EACX,sBAAsB,EACtBM,gBACF;EAAE,EACH,CAAC;AAEN;AAEA,eAAeF,gBAAgB"}
|
|
1
|
+
{"version":3,"file":"PickerNormalized.js","names":["Picker","SpectrumPicker","cl","usePickerNormalizedProps","createElement","_createElement","PickerNormalized","_ref","UNSAFE_className","props","_objectWithoutProperties","_excluded","_usePickerNormalizedP","forceRerenderKey","pickerProps","_excluded2","_objectSpread","key"],"sources":["../../../src/spectrum/picker/PickerNormalized.tsx"],"sourcesContent":["import { Picker as SpectrumPicker } from '@adobe/react-spectrum';\nimport cl from 'classnames';\nimport type { PickerNormalizedProps } from './PickerProps';\n\nimport usePickerNormalizedProps from './usePickerNormalizedProps';\n\n/**\n * Picker that takes an array of `NormalizedItem` or `NormalizedSection` items\n * as children and uses a render item function to render the items. This is\n * necessary to support windowed data.\n */\nexport function PickerNormalized({\n UNSAFE_className,\n ...props\n}: PickerNormalizedProps): JSX.Element {\n const { forceRerenderKey, ...pickerProps } = usePickerNormalizedProps<\n PickerNormalizedProps,\n HTMLDivElement\n >(props);\n\n return (\n <SpectrumPicker\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...pickerProps}\n key={forceRerenderKey}\n UNSAFE_className={cl(\n 'dh-picker',\n 'dh-picker-normalized',\n UNSAFE_className\n )}\n />\n );\n}\n\nexport default PickerNormalized;\n"],"mappings":";;;;;;;;;AAAA,SAASA,MAAM,IAAIC,cAAc,QAAQ,uBAAuB;AAChE,OAAOC,EAAE,MAAM,YAAY;AAAC,OAGrBC,wBAAwB;AAE/B;AACA;AACA;AACA;AACA;AAJA,SAAAC,aAAA,IAAAC,cAAA;AAKA,OAAO,SAASC,gBAAgBA,CAAAC,IAAA,EAGO;EAAA,IAHN;MAC/BC;IAEqB,CAAC,GAAAD,IAAA;IADnBE,KAAK,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA;EAER,IAAAC,qBAAA,GAA6CT,wBAAwB,CAGnEM,KAAK,CAAC;IAHF;MAAEI;IAAiC,CAAC,GAAAD,qBAAA;IAAbE,WAAW,GAAAJ,wBAAA,CAAAE,qBAAA,EAAAG,UAAA;EAKxC,oBACEV,cAAA,CAACJ;EACC;EAAA,EAAAe,aAAA,CAAAA,aAAA,KACIF,WAAW;IACfG,GAAG,EAAEJ,gBAAiB;IACtBL,gBAAgB,EAAEN,EAAE,CAClB,WAAW,EACX,sBAAsB,EACtBM,gBACF;EAAE,EACH,CAAC;AAEN;AAEA,eAAeF,gBAAgB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PickerProps.js","names":[],"sources":["../../../src/spectrum/picker/PickerProps.ts"],"sourcesContent":["import type { SpectrumPickerProps } from '@adobe/react-spectrum';\nimport type {\n ItemKey,\n ItemOrSection,\n NormalizedItem,\n NormalizedSection,\n TooltipOptions,\n} from '../utils';\n\n/**\n * Extend Spectrum Picker props (also other components that adhere to the same\n * apis such as ComboBox).\n * - `children` is extended to include primitive types and to exclude render function\n * - `items` and `defaultItems` are excluded since we are not currently supporting\n * render functions as `children`\n * - selection key types are extended to include number + boolean primitive types\n * - remaining props from the original type are passed through\n */\nexport type PickerPropsT<TProps> = Omit<\n TProps,\n // These props are all re-defined below\n | 'children'\n | 'onSelectionChange'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'disabledKeys'\n // Excluding `defaultItems` and `items` since we are not currently supporting\n // a render function as `children`. This simplifies the API for determining\n // initial scroll position and wrapping items with tooltips.\n | 'defaultItems'\n | 'items'\n> & {\n children: ItemOrSection | ItemOrSection[];\n\n /** Can be set to true or a TooltipOptions to enable item tooltips */\n tooltip?: boolean | TooltipOptions;\n\n /** The currently selected key in the collection (controlled). */\n selectedKey?: ItemKey | null;\n\n /** The initial selected key in the collection (uncontrolled). */\n defaultSelectedKey?: ItemKey;\n\n /**\n * The item keys that are disabled. These items cannot be selected, focused,\n * or otherwise interacted with.\n */\n disabledKeys?: Iterable<ItemKey>;\n\n /**\n * Handler that is called when the selection change.\n * Note that under the hood, this is just an alias for Spectrum's\n * `onSelectionChange`. We are renaming for better consistency with other\n * components.\n */\n onChange?: (key: ItemKey | null) => void;\n\n /**\n * Method that is called when the open state of the menu changes.\n */\n onOpenChange?: (isOpen: boolean) => void;\n\n /** Handler that is called when the picker is scrolled. */\n onScroll?: (event: Event) => void;\n\n /**\n * Handler that is called when the selection changes.\n * @deprecated Use `onChange` instead\n */\n onSelectionChange?: (key: ItemKey | null) => void;\n};\n\n/**\n * Extend Picker props for usage with normalized items list instead of React\n * `children` elements.\n */\nexport type PickerNormalizedPropsT<TProps> = Omit<\n PickerPropsT<TProps>,\n 'children'\n> & {\n /**\n * Normalized format for items and sections instead React elements.\n */\n normalizedItems: (NormalizedItem | NormalizedSection)[];\n\n /**\n * Whether to show icons in items.\n */\n showItemIcons: boolean;\n\n /**\n * Get the initial scroll position to use when picker is opened.\n */\n getInitialScrollPosition?: () => Promise<number | null | undefined>;\n};\n\nexport type PickerProps = PickerPropsT<SpectrumPickerProps<NormalizedItem>>;\nexport type PickerNormalizedProps = PickerNormalizedPropsT<PickerProps>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"PickerProps.js","names":[],"sources":["../../../src/spectrum/picker/PickerProps.ts"],"sourcesContent":["import type { SpectrumPickerProps } from '@adobe/react-spectrum';\nimport type {\n ItemKey,\n ItemOrSection,\n NormalizedItem,\n NormalizedSection,\n TooltipOptions,\n} from '../utils';\n\n/**\n * Extend Spectrum Picker props (also other components that adhere to the same\n * apis such as ComboBox).\n * - `children` is extended to include primitive types and to exclude render function\n * - `items` and `defaultItems` are excluded since we are not currently supporting\n * render functions as `children`\n * - selection key types are extended to include number + boolean primitive types\n * - remaining props from the original type are passed through\n */\nexport type PickerPropsT<TProps> = Omit<\n TProps,\n // These props are all re-defined below\n | 'children'\n | 'onSelectionChange'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'disabledKeys'\n // Excluding `defaultItems` and `items` since we are not currently supporting\n // a render function as `children`. This simplifies the API for determining\n // initial scroll position and wrapping items with tooltips.\n | 'defaultItems'\n | 'items'\n> & {\n children: ItemOrSection | ItemOrSection[];\n\n /** Can be set to true or a TooltipOptions to enable item tooltips */\n tooltip?: boolean | TooltipOptions;\n\n /** The currently selected key in the collection (controlled). */\n selectedKey?: ItemKey | null;\n\n /** The initial selected key in the collection (uncontrolled). */\n defaultSelectedKey?: ItemKey;\n\n /**\n * The item keys that are disabled. These items cannot be selected, focused,\n * or otherwise interacted with.\n */\n disabledKeys?: Iterable<ItemKey>;\n\n /**\n * Handler that is called when the selection change.\n * Note that under the hood, this is just an alias for Spectrum's\n * `onSelectionChange`. We are renaming for better consistency with other\n * components.\n */\n onChange?: (key: ItemKey | null) => void;\n\n /**\n * Method that is called when the open state of the menu changes.\n */\n onOpenChange?: (isOpen: boolean) => void;\n\n /** Handler that is called when the picker is scrolled. */\n onScroll?: (event: Event) => void;\n\n /**\n * Handler that is called when the selection changes.\n * @deprecated Use `onChange` instead\n */\n onSelectionChange?: (key: ItemKey | null) => void;\n};\n\n/**\n * Extend Picker props for usage with normalized items list instead of React\n * `children` elements.\n */\nexport type PickerNormalizedPropsT<TProps> = Omit<\n PickerPropsT<TProps>,\n 'children'\n> & {\n /**\n * Normalized format for items and sections instead React elements.\n */\n normalizedItems: (NormalizedItem | NormalizedSection)[];\n\n /**\n * Whether to show icons in items.\n */\n showItemIcons: boolean;\n\n /**\n * Get the initial scroll position to use when picker is opened.\n */\n getInitialScrollPosition?: () => Promise<number | null | undefined>;\n};\n\nexport type PickerProps = PickerPropsT<SpectrumPickerProps<NormalizedItem>>;\nexport type PickerNormalizedProps = PickerNormalizedPropsT<PickerProps>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/spectrum/picker/index.ts"],"sourcesContent":["export * from './Picker';\nexport * from './PickerNormalized';\nexport * from './PickerProps';\nexport * from './usePickerItemScale';\nexport * from './usePickerNormalizedProps';\nexport * from './usePickerProps';\nexport * from './usePickerScrollOnOpen';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/spectrum/picker/index.ts"],"sourcesContent":["export * from './Picker';\nexport * from './PickerNormalized';\nexport * from './PickerProps';\nexport * from './usePickerItemScale';\nexport * from './usePickerNormalizedProps';\nexport * from './usePickerProps';\nexport * from './usePickerScrollOnOpen';\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePickerItemScale.js","names":["useSpectrumThemeProvider","PICKER_ITEM_HEIGHTS","usePickerItemScale","scale","itemHeight"],"sources":["../../../src/spectrum/picker/usePickerItemScale.ts"],"sourcesContent":["import { useSpectrumThemeProvider } from '../../theme';\nimport { PICKER_ITEM_HEIGHTS } from '../../UIConstants';\n\n/**\n * Get Picker Item height for current scale.\n * @returns Picker Item height\n */\nexport function usePickerItemScale(): { itemHeight: number } {\n const { scale } = useSpectrumThemeProvider();\n const itemHeight = PICKER_ITEM_HEIGHTS[scale];\n\n return { itemHeight };\n}\n\nexport default usePickerItemScale;\n"],"mappings":"SAASA,wBAAwB;AAAA,SACxBC,mBAAmB;AAE5B;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAAA,EAA2B;EAC3D,IAAM;IAAEC;EAAM,CAAC,GAAGH,wBAAwB,CAAC,CAAC;EAC5C,IAAMI,UAAU,GAAGH,mBAAmB,CAACE,KAAK,CAAC;EAE7C,OAAO;IAAEC;EAAW,CAAC;AACvB;AAEA,eAAeF,kBAAkB"}
|
|
1
|
+
{"version":3,"file":"usePickerItemScale.js","names":["useSpectrumThemeProvider","PICKER_ITEM_HEIGHTS","usePickerItemScale","scale","itemHeight"],"sources":["../../../src/spectrum/picker/usePickerItemScale.ts"],"sourcesContent":["import { useSpectrumThemeProvider } from '../../theme';\nimport { PICKER_ITEM_HEIGHTS } from '../../UIConstants';\n\n/**\n * Get Picker Item height for current scale.\n * @returns Picker Item height\n */\nexport function usePickerItemScale(): { itemHeight: number } {\n const { scale } = useSpectrumThemeProvider();\n const itemHeight = PICKER_ITEM_HEIGHTS[scale];\n\n return { itemHeight };\n}\n\nexport default usePickerItemScale;\n"],"mappings":"SAASA,wBAAwB;AAAA,SACxBC,mBAAmB;AAE5B;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAAA,EAA2B;EAC3D,IAAM;IAAEC;EAAM,CAAC,GAAGH,wBAAwB,CAAC,CAAC;EAC5C,IAAMI,UAAU,GAAGH,mBAAmB,CAACE,KAAK,CAAC;EAE7C,OAAO;IAAEC;EAAW,CAAC;AACvB;AAEA,eAAeF,kBAAkB","ignoreList":[]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { DOMRef } from '@react-types/shared';
|
|
1
|
+
import type { DOMRef, Key } from '@react-types/shared';
|
|
3
2
|
import { type NormalizedItem, type NormalizedSection } from '../utils';
|
|
4
3
|
import { type PickerNormalizedPropsT } from './PickerProps';
|
|
5
4
|
/** Props that are derived by `usePickerNormalizedProps` */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePickerNormalizedProps.d.ts","sourceRoot":"","sources":["../../../src/spectrum/picker/usePickerNormalizedProps.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"usePickerNormalizedProps.d.ts","sourceRoot":"","sources":["../../../src/spectrum/picker/usePickerNormalizedProps.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AACvD,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AwB,EACxB,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,QAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,OAAc,EACd,GAAG,KAAK,EACT,EAAE,sBAAsB,CAAC,MAAM,CAAC,GAAG,wBAAwB,CAAC,MAAM,EAAE,KAAK,CAAC,CA4E1E;AAED,eAAe,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePickerNormalizedProps.js","names":["useCallback","useMemo","EMPTY_FUNCTION","getItemKey","isNormalizedSection","normalizeTooltipOptions","useRenderNormalizedItem","useStringifiedSelection","usePickerScrollOnOpen","Section","jsx","_jsx","usePickerNormalizedProps","_ref","defaultSelectedKey","disabledKeys","getInitialScrollPosition","normalizedItems","onChange","onOpenChange","onScroll","onSelectionChange","selectedKey","showItemIcons","tooltip","props","_objectWithoutProperties","_excluded","tooltipOptions","renderNormalizedItem","itemIconSlot","showItemDescriptions","forceRerenderKey","concat","placement","ref","onOpenChangeInternal","selectedStringKey","defaultSelectedStringKey","disabledStringKeys","onStringSelectionChange","children","itemOrSection","_itemOrSection$item","_itemOrSection$item2","title","item","items","_objectSpread"],"sources":["../../../src/spectrum/picker/usePickerNormalizedProps.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"usePickerNormalizedProps.js","names":["useCallback","useMemo","EMPTY_FUNCTION","getItemKey","isNormalizedSection","normalizeTooltipOptions","useRenderNormalizedItem","useStringifiedSelection","usePickerScrollOnOpen","Section","jsx","_jsx","usePickerNormalizedProps","_ref","defaultSelectedKey","disabledKeys","getInitialScrollPosition","normalizedItems","onChange","onOpenChange","onScroll","onSelectionChange","selectedKey","showItemIcons","tooltip","props","_objectWithoutProperties","_excluded","tooltipOptions","renderNormalizedItem","itemIconSlot","showItemDescriptions","forceRerenderKey","concat","placement","ref","onOpenChangeInternal","selectedStringKey","defaultSelectedStringKey","disabledStringKeys","onStringSelectionChange","children","itemOrSection","_itemOrSection$item","_itemOrSection$item2","title","item","items","_objectSpread"],"sources":["../../../src/spectrum/picker/usePickerNormalizedProps.tsx"],"sourcesContent":["import { useCallback, useMemo } from 'react';\nimport { EMPTY_FUNCTION } from '@deephaven/utils';\nimport type { DOMRef, Key } from '@react-types/shared';\nimport {\n getItemKey,\n isNormalizedSection,\n type NormalizedItem,\n type NormalizedSection,\n normalizeTooltipOptions,\n useRenderNormalizedItem,\n useStringifiedSelection,\n} from '../utils';\nimport { type PickerNormalizedPropsT } from './PickerProps';\nimport { usePickerScrollOnOpen } from './usePickerScrollOnOpen';\nimport { Section } from '../shared';\n\n/** Props that are derived by `usePickerNormalizedProps` */\nexport type UsePickerNormalizedDerivedProps<THtml extends HTMLElement> = {\n children: (itemOrSection: NormalizedItem | NormalizedSection) => JSX.Element;\n forceRerenderKey: Key;\n items: (NormalizedItem | NormalizedSection)[];\n defaultSelectedKey?: Key;\n disabledKeys?: Iterable<Key>;\n ref: DOMRef<THtml>;\n selectedKey?: Key | null;\n onSelectionChange: (key: Key | null) => void;\n onOpenChange: (isOpen: boolean) => void;\n};\n\n/**\n * Props that are passed through untouched. (should exclude all of the\n * destructured props passed into `usePickerNormalizedProps` that are not in the\n * spread ...props)\n */\nexport type UsePickerNormalizedPassthroughProps<TProps> = Omit<\n PickerNormalizedPropsT<TProps>,\n | 'defaultSelectedKey'\n | 'disabledKeys'\n | 'getInitialScrollPosition'\n | 'normalizedItems'\n | 'onChange'\n | 'onOpenChange'\n | 'onScroll'\n | 'onSelectionChange'\n | 'selectedKey'\n | 'showItemIcons'\n | 'tooltip'\n>;\n\n/** Props returned from `usePickerNormalizedProps` hook. */\nexport type UsePickerNormalizedProps<\n TProps,\n THtml extends HTMLElement,\n> = UsePickerNormalizedDerivedProps<THtml> &\n UsePickerNormalizedPassthroughProps<TProps>;\n\nexport function usePickerNormalizedProps<\n TProps,\n THtml extends HTMLElement = HTMLElement,\n>({\n defaultSelectedKey,\n disabledKeys,\n getInitialScrollPosition,\n normalizedItems,\n onChange,\n onOpenChange,\n onScroll = EMPTY_FUNCTION,\n onSelectionChange,\n selectedKey,\n showItemIcons,\n tooltip = true,\n ...props\n}: PickerNormalizedPropsT<TProps>): UsePickerNormalizedProps<TProps, THtml> {\n const tooltipOptions = useMemo(\n () => normalizeTooltipOptions(tooltip),\n [tooltip]\n );\n\n const renderNormalizedItem = useRenderNormalizedItem({\n itemIconSlot: 'icon',\n // Descriptions introduce variable item heights which throws off calculation\n // of initial scroll position and setting viewport on windowed data. For now\n // not going to implement description support in Picker.\n // https://github.com/deephaven/web-client-ui/issues/1958\n showItemDescriptions: false,\n showItemIcons,\n tooltipOptions,\n });\n\n // Spectrum doesn't re-render if only the `renderNormalizedItems` function\n // changes, so we create a key from its dependencies that can be used to force\n // re-render.\n const forceRerenderKey = `${showItemIcons}-${tooltipOptions?.placement}`;\n\n const { ref, onOpenChange: onOpenChangeInternal } =\n usePickerScrollOnOpen<THtml>({\n getInitialScrollPosition,\n onScroll,\n onOpenChange,\n });\n\n // Spectrum Picker treats keys as strings if the `key` prop is explicitly\n // set on `Item` elements. Since we do this in `renderItem`, we need to\n // map original key types to and from strings so that selection works.\n const {\n selectedStringKey,\n defaultSelectedStringKey,\n disabledStringKeys,\n onStringSelectionChange,\n } = useStringifiedSelection({\n normalizedItems,\n selectedKey,\n defaultSelectedKey,\n disabledKeys,\n onChange: onChange ?? onSelectionChange,\n });\n\n const children = useCallback(\n (itemOrSection: NormalizedItem | NormalizedSection) => {\n if (isNormalizedSection(itemOrSection)) {\n return (\n <Section\n key={getItemKey(itemOrSection)}\n title={itemOrSection.item?.title}\n items={itemOrSection.item?.items}\n >\n {renderNormalizedItem}\n </Section>\n );\n }\n\n return renderNormalizedItem(itemOrSection);\n },\n [renderNormalizedItem]\n );\n\n return {\n ...props,\n children,\n forceRerenderKey,\n ref,\n items: normalizedItems,\n selectedKey: selectedStringKey,\n defaultSelectedKey: defaultSelectedStringKey,\n disabledKeys: disabledStringKeys,\n onSelectionChange: onStringSelectionChange,\n on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,iBAAiB;IACjBC,wBAAwB;IACxBC,kBAAkB;IAClBC;EACF,CAAC,GAAGjC,uBAAuB,CAAC;IAC1BU,eAAe;IACfK,WAAW;IACXR,kBAAkB;IAClBC,YAAY;IACZG,QAAQ,EAAEA,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAIG;EACxB,CAAC,CAAC;EAEF,IAAMoB,QAAQ,GAAGzC,WAAW,CACzB0C,aAAiD,IAAK;IACrD,IAAItC,mBAAmB,CAACsC,aAAa,CAAC,EAAE;MAAA,IAAAC,mBAAA,EAAAC,oBAAA;MACtC,oBACEjC,IAAA,CAACF,OAAO;QAENoC,KAAK,GAAAF,mBAAA,GAAED,aAAa,CAACI,IAAI,cAAAH,mBAAA,uBAAlBA,mBAAA,CAAoBE,KAAM;QACjCE,KAAK,GAAAH,oBAAA,GAAEF,aAAa,CAACI,IAAI,cAAAF,oBAAA,uBAAlBA,oBAAA,CAAoBG,KAAM;QAAAN,QAAA,EAEhCZ;MAAoB,GAJhB1B,UAAU,CAACuC,aAAa,CAKtB,CAAC;IAEd;IAEA,OAAOb,oBAAoB,CAACa,aAAa,CAAC;EAC5C,CAAC,EACD,CAACb,oBAAoB,CACvB,CAAC;EAED,OAAAmB,aAAA,CAAAA,aAAA,KACKvB,KAAK;IACRgB,QAAQ;IACRT,gBAAgB;IAChBG,GAAG;IACHY,KAAK,EAAE9B,eAAe;IACtBK,WAAW,EAAEe,iBAAiB;IAC9BvB,kBAAkB,EAAEwB,wBAAwB;IAC5CvB,YAAY,EAAEwB,kBAAkB;IAChClB,iBAAiB,EAAEmB,uBAAuB;IAC1CrB,YAAY,EAAEiB;EAAoB;AAEtC;AAEA,eAAexB,wBAAwB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePickerProps.js","names":["EMPTY_FUNCTION","ensureArray","useMemo","PICKER_TOP_OFFSET","normalizeTooltipOptions","wrapItemChildren","useOnChangeTrackUncontrolled","useStaticItemInitialScrollPosition","usePickerItemScale","usePickerScrollOnOpen","usePickerProps","_ref","children","defaultSelectedKey","selectedKey","tooltip","onChange","onChangeHandler","onOpenChange","onOpenChangeHandler","onScroll","onSelectionChange","onSelectionChangeHandler","props","_objectWithoutProperties","_excluded","itemHeight","tooltipOptions","items","selectedKeyMaybeUncontrolled","onChangeMaybeUncontrolled","getInitialScrollPosition","topOffset","ref","_objectSpread"],"sources":["../../../src/spectrum/picker/usePickerProps.ts"],"sourcesContent":["import { EMPTY_FUNCTION, ensureArray } from '@deephaven/utils';\nimport { type DOMRef } from '@react-types/shared';\nimport { useMemo } from 'react';\nimport { PICKER_TOP_OFFSET } from '../../UIConstants';\nimport {\n normalizeTooltipOptions,\n wrapItemChildren,\n useOnChangeTrackUncontrolled,\n useStaticItemInitialScrollPosition,\n type ItemKey,\n type SectionElement,\n type ItemElement,\n} from '../utils';\nimport type { PickerPropsT } from './PickerProps';\nimport usePickerItemScale from './usePickerItemScale';\nimport usePickerScrollOnOpen from './usePickerScrollOnOpen';\n\n/** Props that are derived by `usePickerProps`. */\nexport type UsePickerDerivedProps<THtml extends HTMLElement> = {\n children: (SectionElement<unknown> | ItemElement<unknown>)[];\n defaultSelectedKey?: ItemKey | undefined;\n ref: DOMRef<THtml>;\n selectedKey?: ItemKey | null | undefined;\n onOpenChange: (isOpen: boolean) => void;\n onSelectionChange: ((key: ItemKey | null) => void) | undefined;\n};\n\n/** \n * Props that are passed through untouched. (should exclude all of the\n * destructured props passed into `usePickerProps` that are not in the spread\n * ...props)\n) */\nexport type UsePickerPassthroughProps<TProps> = Omit<\n PickerPropsT<TProps>,\n | 'children'\n | 'defaultSelectedKey'\n | 'selectedKey'\n | 'tooltip'\n | 'onChange'\n | 'onOpenChange'\n | 'onScroll'\n | 'onSelectionChange'\n>;\n\n/** Props returned from `usePickerProps` hook. */\nexport type UsePickerProps<\n TProps,\n THtml extends HTMLElement,\n> = UsePickerDerivedProps<THtml> & UsePickerPassthroughProps<TProps>;\n\n/**\n * Derive props for Picker components (e.g. Picker and ComboBox). Specifically\n * handles wrapping children items and initial scroll position when the picker\n * is opened.\n */\nexport function usePickerProps<\n TProps,\n THtml extends HTMLElement = HTMLElement,\n>({\n children,\n defaultSelectedKey,\n selectedKey,\n tooltip = true,\n onChange: onChangeHandler,\n onOpenChange: onOpenChangeHandler,\n onScroll = EMPTY_FUNCTION,\n onSelectionChange: onSelectionChangeHandler,\n ...props\n}: PickerPropsT<TProps>): UsePickerProps<TProps, THtml> {\n const { itemHeight } = usePickerItemScale();\n\n const tooltipOptions = useMemo(\n () => normalizeTooltipOptions(tooltip),\n [tooltip]\n );\n\n const items = useMemo(\n () => ensureArray(wrapItemChildren(children, tooltipOptions)),\n [children, tooltipOptions]\n );\n\n const { selectedKeyMaybeUncontrolled, onChangeMaybeUncontrolled } =\n useOnChangeTrackUncontrolled({\n defaultSelectedKey,\n selectedKey,\n onChange: onChangeHandler ?? onSelectionChangeHandler,\n });\n\n const getInitialScrollPosition = useStaticItemInitialScrollPosition({\n itemHeight,\n items,\n selectedKey: selectedKeyMaybeUncontrolled,\n topOffset: PICKER_TOP_OFFSET,\n });\n\n const { ref, onOpenChange } = usePickerScrollOnOpen<THtml>({\n getInitialScrollPosition,\n onScroll,\n onOpenChange: onOpenChangeHandler,\n });\n\n return {\n ...props,\n defaultSelectedKey,\n ref,\n selectedKey,\n children: items,\n onOpenChange,\n onSelectionChange: onChangeMaybeUncontrolled,\n };\n}\n\nexport default usePickerProps;\n"],"mappings":";;;;;;;;AAAA,SAASA,cAAc,EAAEC,WAAW,QAAQ,kBAAkB;AAE9D,SAASC,OAAO,QAAQ,OAAO;AAAC,SACvBC,iBAAiB;AAAA,SAExBC,uBAAuB,EACvBC,gBAAgB,EAChBC,4BAA4B,EAC5BC,kCAAkC;AAAA,OAM7BC,kBAAkB;AAAA,OAClBC,qBAAqB;AAE5B;AAUA;AACA;AACA;AACA;AACA;AAaA;AAMA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAAC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}
|
|
1
|
+
{"version":3,"file":"usePickerProps.js","names":["EMPTY_FUNCTION","ensureArray","useMemo","PICKER_TOP_OFFSET","normalizeTooltipOptions","wrapItemChildren","useOnChangeTrackUncontrolled","useStaticItemInitialScrollPosition","usePickerItemScale","usePickerScrollOnOpen","usePickerProps","_ref","children","defaultSelectedKey","selectedKey","tooltip","onChange","onChangeHandler","onOpenChange","onOpenChangeHandler","onScroll","onSelectionChange","onSelectionChangeHandler","props","_objectWithoutProperties","_excluded","itemHeight","tooltipOptions","items","selectedKeyMaybeUncontrolled","onChangeMaybeUncontrolled","getInitialScrollPosition","topOffset","ref","_objectSpread"],"sources":["../../../src/spectrum/picker/usePickerProps.ts"],"sourcesContent":["import { EMPTY_FUNCTION, ensureArray } from '@deephaven/utils';\nimport { type DOMRef } from '@react-types/shared';\nimport { useMemo } from 'react';\nimport { PICKER_TOP_OFFSET } from '../../UIConstants';\nimport {\n normalizeTooltipOptions,\n wrapItemChildren,\n useOnChangeTrackUncontrolled,\n useStaticItemInitialScrollPosition,\n type ItemKey,\n type SectionElement,\n type ItemElement,\n} from '../utils';\nimport type { PickerPropsT } from './PickerProps';\nimport usePickerItemScale from './usePickerItemScale';\nimport usePickerScrollOnOpen from './usePickerScrollOnOpen';\n\n/** Props that are derived by `usePickerProps`. */\nexport type UsePickerDerivedProps<THtml extends HTMLElement> = {\n children: (SectionElement<unknown> | ItemElement<unknown>)[];\n defaultSelectedKey?: ItemKey | undefined;\n ref: DOMRef<THtml>;\n selectedKey?: ItemKey | null | undefined;\n onOpenChange: (isOpen: boolean) => void;\n onSelectionChange: ((key: ItemKey | null) => void) | undefined;\n};\n\n/** \n * Props that are passed through untouched. (should exclude all of the\n * destructured props passed into `usePickerProps` that are not in the spread\n * ...props)\n) */\nexport type UsePickerPassthroughProps<TProps> = Omit<\n PickerPropsT<TProps>,\n | 'children'\n | 'defaultSelectedKey'\n | 'selectedKey'\n | 'tooltip'\n | 'onChange'\n | 'onOpenChange'\n | 'onScroll'\n | 'onSelectionChange'\n>;\n\n/** Props returned from `usePickerProps` hook. */\nexport type UsePickerProps<\n TProps,\n THtml extends HTMLElement,\n> = UsePickerDerivedProps<THtml> & UsePickerPassthroughProps<TProps>;\n\n/**\n * Derive props for Picker components (e.g. Picker and ComboBox). Specifically\n * handles wrapping children items and initial scroll position when the picker\n * is opened.\n */\nexport function usePickerProps<\n TProps,\n THtml extends HTMLElement = HTMLElement,\n>({\n children,\n defaultSelectedKey,\n selectedKey,\n tooltip = true,\n onChange: onChangeHandler,\n onOpenChange: onOpenChangeHandler,\n onScroll = EMPTY_FUNCTION,\n onSelectionChange: onSelectionChangeHandler,\n ...props\n}: PickerPropsT<TProps>): UsePickerProps<TProps, THtml> {\n const { itemHeight } = usePickerItemScale();\n\n const tooltipOptions = useMemo(\n () => normalizeTooltipOptions(tooltip),\n [tooltip]\n );\n\n const items = useMemo(\n () => ensureArray(wrapItemChildren(children, tooltipOptions)),\n [children, tooltipOptions]\n );\n\n const { selectedKeyMaybeUncontrolled, onChangeMaybeUncontrolled } =\n useOnChangeTrackUncontrolled({\n defaultSelectedKey,\n selectedKey,\n onChange: onChangeHandler ?? onSelectionChangeHandler,\n });\n\n const getInitialScrollPosition = useStaticItemInitialScrollPosition({\n itemHeight,\n items,\n selectedKey: selectedKeyMaybeUncontrolled,\n topOffset: PICKER_TOP_OFFSET,\n });\n\n const { ref, onOpenChange } = usePickerScrollOnOpen<THtml>({\n getInitialScrollPosition,\n onScroll,\n onOpenChange: onOpenChangeHandler,\n });\n\n return {\n ...props,\n defaultSelectedKey,\n ref,\n selectedKey,\n children: items,\n onOpenChange,\n onSelectionChange: onChangeMaybeUncontrolled,\n };\n}\n\nexport default usePickerProps;\n"],"mappings":";;;;;;;;AAAA,SAASA,cAAc,EAAEC,WAAW,QAAQ,kBAAkB;AAE9D,SAASC,OAAO,QAAQ,OAAO;AAAC,SACvBC,iBAAiB;AAAA,SAExBC,uBAAuB,EACvBC,gBAAgB,EAChBC,4BAA4B,EAC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AA,KACKX,KAAK;IACRV,kBAAkB;IAClBoB,GAAG;IACHnB,WAAW;IACXF,QAAQ,EAAEgB,KAAK;IACfV,YAAY;IACZG,iBAAiB,EAAES;EAAyB;AAEhD;AAEA,eAAepB,cAAc","ignoreList":[]}
|
|
@@ -22,7 +22,7 @@ export function usePickerScrollOnOpen(_ref) {
|
|
|
22
22
|
var onOpenChangeInternal = useCallback((isOpen, menuTrigger) => {
|
|
23
23
|
// Attach scroll event handling
|
|
24
24
|
popoverOnOpenChange(isOpen);
|
|
25
|
-
onOpenChange === null || onOpenChange === void 0
|
|
25
|
+
onOpenChange === null || onOpenChange === void 0 || onOpenChange(isOpen, menuTrigger);
|
|
26
26
|
}, [onOpenChange, popoverOnOpenChange]);
|
|
27
27
|
return {
|
|
28
28
|
ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePickerScrollOnOpen.js","names":["useCallback","findSpectrumPickerScrollArea","usePopoverOnScrollRef","usePickerScrollOnOpen","_ref","getInitialScrollPosition","onScroll","onOpenChange","ref","popoverOnOpenChange","onOpenChangeInternal","isOpen","menuTrigger"],"sources":["../../../src/spectrum/picker/usePickerScrollOnOpen.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport type { DOMRef } from '@react-types/shared';\nimport {\n findSpectrumPickerScrollArea,\n usePopoverOnScrollRef,\n} from '@deephaven/react-hooks';\nimport type { MenuTriggerAction } from '../comboBox';\n\nexport interface UsePickerScrollOnOpenOptions {\n getInitialScrollPosition?: () => Promise<number | null | undefined>;\n onScroll: (event: Event) => void;\n onOpenChange?: (isOpen: boolean, menuTrigger?: MenuTriggerAction) => void;\n}\n\nexport interface UsePickerScrollOnOpenResult<THtml extends HTMLElement> {\n ref: DOMRef<THtml>;\n onOpenChange: (isOpen: boolean, menuTrigger?: MenuTriggerAction) => void;\n}\n\n/**\n * Handle scroll event registration and scrolling to initial scroll position\n * whenever a Picker popover is opened.\n * @param getInitialScrollPosition Function to get the initial scroll position.\n * @param onScroll Callback for scroll events.\n * @param onOpenChange Callback for open change events.\n * @return A ref to attach to the Picker and a callback to handle open change\n * events for the Picker.\n */\nexport function usePickerScrollOnOpen<THtml extends HTMLElement = HTMLElement>({\n getInitialScrollPosition,\n onScroll,\n onOpenChange,\n}: UsePickerScrollOnOpenOptions): UsePickerScrollOnOpenResult<THtml> {\n const { ref, onOpenChange: popoverOnOpenChange } = usePopoverOnScrollRef(\n findSpectrumPickerScrollArea<THtml>,\n onScroll,\n getInitialScrollPosition\n );\n\n const onOpenChangeInternal = useCallback(\n (isOpen: boolean, menuTrigger?: MenuTriggerAction): void => {\n // Attach scroll event handling\n popoverOnOpenChange(isOpen);\n\n onOpenChange?.(isOpen, menuTrigger);\n },\n [onOpenChange, popoverOnOpenChange]\n );\n\n return {\n ref,\n onOpenChange: onOpenChangeInternal,\n };\n}\n\nexport default usePickerScrollOnOpen;\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,OAAO;AAEnC,SACEC,4BAA4B,EAC5BC,qBAAqB,QAChB,wBAAwB;AAc/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAAAC,IAAA,EAIgC;EAAA,IAJU;IAC7EC,wBAAwB;IACxBC,QAAQ;IACRC;EAC4B,CAAC,GAAAH,IAAA;EAC7B,IAAM;IAAEI,GAAG;IAAED,YAAY,EAAEE;EAAoB,CAAC,GAAGP,qBAAqB,CACtED,4BAA4B,EAC5BK,QAAQ,EACRD,wBACF,CAAC;EAED,IAAMK,oBAAoB,GAAGV,WAAW,CACtC,CAACW,MAAe,EAAEC,WAA+B,KAAW;IAC1D;IACAH,mBAAmB,CAACE,MAAM,CAAC;IAE3BJ,YAAY,aAAZA,YAAY,
|
|
1
|
+
{"version":3,"file":"usePickerScrollOnOpen.js","names":["useCallback","findSpectrumPickerScrollArea","usePopoverOnScrollRef","usePickerScrollOnOpen","_ref","getInitialScrollPosition","onScroll","onOpenChange","ref","popoverOnOpenChange","onOpenChangeInternal","isOpen","menuTrigger"],"sources":["../../../src/spectrum/picker/usePickerScrollOnOpen.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport type { DOMRef } from '@react-types/shared';\nimport {\n findSpectrumPickerScrollArea,\n usePopoverOnScrollRef,\n} from '@deephaven/react-hooks';\nimport type { MenuTriggerAction } from '../comboBox';\n\nexport interface UsePickerScrollOnOpenOptions {\n getInitialScrollPosition?: () => Promise<number | null | undefined>;\n onScroll: (event: Event) => void;\n onOpenChange?: (isOpen: boolean, menuTrigger?: MenuTriggerAction) => void;\n}\n\nexport interface UsePickerScrollOnOpenResult<THtml extends HTMLElement> {\n ref: DOMRef<THtml>;\n onOpenChange: (isOpen: boolean, menuTrigger?: MenuTriggerAction) => void;\n}\n\n/**\n * Handle scroll event registration and scrolling to initial scroll position\n * whenever a Picker popover is opened.\n * @param getInitialScrollPosition Function to get the initial scroll position.\n * @param onScroll Callback for scroll events.\n * @param onOpenChange Callback for open change events.\n * @return A ref to attach to the Picker and a callback to handle open change\n * events for the Picker.\n */\nexport function usePickerScrollOnOpen<THtml extends HTMLElement = HTMLElement>({\n getInitialScrollPosition,\n onScroll,\n onOpenChange,\n}: UsePickerScrollOnOpenOptions): UsePickerScrollOnOpenResult<THtml> {\n const { ref, onOpenChange: popoverOnOpenChange } = usePopoverOnScrollRef(\n findSpectrumPickerScrollArea<THtml>,\n onScroll,\n getInitialScrollPosition\n );\n\n const onOpenChangeInternal = useCallback(\n (isOpen: boolean, menuTrigger?: MenuTriggerAction): void => {\n // Attach scroll event handling\n popoverOnOpenChange(isOpen);\n\n onOpenChange?.(isOpen, menuTrigger);\n },\n [onOpenChange, popoverOnOpenChange]\n );\n\n return {\n ref,\n onOpenChange: onOpenChangeInternal,\n };\n}\n\nexport default usePickerScrollOnOpen;\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,OAAO;AAEnC,SACEC,4BAA4B,EAC5BC,qBAAqB,QAChB,wBAAwB;AAc/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAAAC,IAAA,EAIgC;EAAA,IAJU;IAC7EC,wBAAwB;IACxBC,QAAQ;IACRC;EAC4B,CAAC,GAAAH,IAAA;EAC7B,IAAM;IAAEI,GAAG;IAAED,YAAY,EAAEE;EAAoB,CAAC,GAAGP,qBAAqB,CACtED,4BAA4B,EAC5BK,QAAQ,EACRD,wBACF,CAAC;EAED,IAAMK,oBAAoB,GAAGV,WAAW,CACtC,CAACW,MAAe,EAAEC,WAA+B,KAAW;IAC1D;IACAH,mBAAmB,CAACE,MAAM,CAAC;IAE3BJ,YAAY,aAAZA,YAAY,eAAZA,YAAY,CAAGI,MAAM,EAAEC,WAAW,CAAC;EACrC,CAAC,EACD,CAACL,YAAY,EAAEE,mBAAmB,CACpC,CAAC;EAED,OAAO;IACLD,GAAG;IACHD,YAAY,EAAEG;EAChB,CAAC;AACH;AAEA,eAAeP,qBAAqB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","names":["Section","SpectrumSection","Item"],"sources":["../../src/spectrum/shared.ts"],"sourcesContent":["/**\n * Wrapping Spectrum `Item` and `Section` components will break functionality\n * due to the way they are consumed by collection components. They are only used\n * to pass data and don't render anything on their own, so they don't need to be\n * wrapped. If we do ever need to wrap them for whatever reason, the static\n * `getCollectionNode` method will need to be implemented.\n * See https://github.com/adobe/react-spectrum/blob/main/packages/%40react-stately/collections/src/Item.ts#L17\n * https://github.com/adobe/react-spectrum/blob/main/packages/%40react-stately/collections/src/Section.ts#L18\n */\nimport { Section as SpectrumSection } from '@adobe/react-spectrum';\nimport type {\n ItemElement,\n ItemRenderer,\n SectionProps as SpectrumSectionProps,\n} from '@react-types/shared';\n\nexport { Item } from '@adobe/react-spectrum';\nexport type {\n ItemProps,\n Orientation,\n PressEvent,\n SelectionMode,\n} from '@react-types/shared';\n\n/*\n * We support primitive values as shorthand for `Item` elements in certain\n * components. This type represents this augmentation of the Spectrum types.\n */\nexport type ItemElementOrPrimitive<T = unknown> =\n | number\n | string\n | boolean\n | ItemElement<T>;\n\nexport type ItemsChildren<T> =\n | ItemElement<T>\n | ItemElement<T>[]\n | ItemRenderer<T>;\n\nexport type ItemsOrPrimitiveChildren<T> =\n | ItemElementOrPrimitive<T>\n | ItemElementOrPrimitive<T>[]\n | ItemRenderer<T>;\n\n/**\n * Spectrum SectionProps augmented with support for primitive item children.\n */\nexport type SectionProps<T> = Omit<SpectrumSectionProps<T>, 'children'> & {\n children: ItemsOrPrimitiveChildren<T>;\n};\n\n/**\n * Re-export Spectrum Section component with augmented props type.\n */\nexport const Section = SpectrumSection as <T>(\n props: SectionProps<T>\n) => JSX.Element;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,eAAe,QAAQ,uBAAuB;AAOlE,SAASC,IAAI,QAAQ,uBAAuB;;AAQ5C;AACA;AACA;AACA;;AAiBA;AACA;AACA;;AAKA;AACA;AACA;AACA,OAAO,IAAMF,OAAO,GAAGC,eAEP"}
|
|
1
|
+
{"version":3,"file":"shared.js","names":["Section","SpectrumSection","Item"],"sources":["../../src/spectrum/shared.ts"],"sourcesContent":["/**\n * Wrapping Spectrum `Item` and `Section` components will break functionality\n * due to the way they are consumed by collection components. They are only used\n * to pass data and don't render anything on their own, so they don't need to be\n * wrapped. If we do ever need to wrap them for whatever reason, the static\n * `getCollectionNode` method will need to be implemented.\n * See https://github.com/adobe/react-spectrum/blob/main/packages/%40react-stately/collections/src/Item.ts#L17\n * https://github.com/adobe/react-spectrum/blob/main/packages/%40react-stately/collections/src/Section.ts#L18\n */\nimport { Section as SpectrumSection } from '@adobe/react-spectrum';\nimport type {\n ItemElement,\n ItemRenderer,\n SectionProps as SpectrumSectionProps,\n} from '@react-types/shared';\n\nexport { Item } from '@adobe/react-spectrum';\nexport type {\n ItemProps,\n Orientation,\n PressEvent,\n SelectionMode,\n} from '@react-types/shared';\n\n/*\n * We support primitive values as shorthand for `Item` elements in certain\n * components. This type represents this augmentation of the Spectrum types.\n */\nexport type ItemElementOrPrimitive<T = unknown> =\n | number\n | string\n | boolean\n | ItemElement<T>;\n\nexport type ItemsChildren<T> =\n | ItemElement<T>\n | ItemElement<T>[]\n | ItemRenderer<T>;\n\nexport type ItemsOrPrimitiveChildren<T> =\n | ItemElementOrPrimitive<T>\n | ItemElementOrPrimitive<T>[]\n | ItemRenderer<T>;\n\n/**\n * Spectrum SectionProps augmented with support for primitive item children.\n */\nexport type SectionProps<T> = Omit<SpectrumSectionProps<T>, 'children'> & {\n children: ItemsOrPrimitiveChildren<T>;\n};\n\n/**\n * Re-export Spectrum Section component with augmented props type.\n */\nexport const Section = SpectrumSection as <T>(\n props: SectionProps<T>\n) => JSX.Element;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,eAAe,QAAQ,uBAAuB;AAOlE,SAASC,IAAI,QAAQ,uBAAuB;;AAQ5C;AACA;AACA;AACA;;AAiBA;AACA;AACA;;AAKA;AACA;AACA;AACA,OAAO,IAAMF,OAAO,GAAGC,eAEP","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","names":["Badge","InlineAlert","LabeledValue","Meter","ProgressBar","ProgressCircle","StatusLight","ToastContainer","ToastQueue"],"sources":["../../src/spectrum/status.ts"],"sourcesContent":["export {\n Badge,\n type SpectrumBadgeProps as BadgeProps,\n InlineAlert,\n type SpectrumInlineAlertProps as InlineAlertProps,\n LabeledValue,\n type SpectrumLabeledValueProps as LabeledValueProps,\n Meter,\n type SpectrumMeterProps as MeterProps,\n ProgressBar,\n type SpectrumProgressBarProps as ProgressBarProps,\n ProgressCircle,\n type SpectrumProgressCircleProps as ProgressCircleProps,\n StatusLight,\n type SpectrumStatusLightProps as StatusLightProps,\n} from '@adobe/react-spectrum';\n\nexport {\n ToastContainer,\n type SpectrumToastContainerProps as ToastContainerProps,\n ToastQueue,\n type SpectrumToastOptions as ToastOptions,\n} from '@react-spectrum/toast';\n"],"mappings":"AAAA,SACEA,KAAK,EAELC,WAAW,EAEXC,YAAY,EAEZC,KAAK,EAELC,WAAW,EAEXC,cAAc,EAEdC,WAAW,QAEN,uBAAuB;AAE9B,SACEC,cAAc,EAEdC,UAAU,QAEL,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"status.js","names":["Badge","InlineAlert","LabeledValue","Meter","ProgressBar","ProgressCircle","StatusLight","ToastContainer","ToastQueue"],"sources":["../../src/spectrum/status.ts"],"sourcesContent":["export {\n Badge,\n type SpectrumBadgeProps as BadgeProps,\n InlineAlert,\n type SpectrumInlineAlertProps as InlineAlertProps,\n LabeledValue,\n type SpectrumLabeledValueProps as LabeledValueProps,\n Meter,\n type SpectrumMeterProps as MeterProps,\n ProgressBar,\n type SpectrumProgressBarProps as ProgressBarProps,\n ProgressCircle,\n type SpectrumProgressCircleProps as ProgressCircleProps,\n StatusLight,\n type SpectrumStatusLightProps as StatusLightProps,\n} from '@adobe/react-spectrum';\n\nexport {\n ToastContainer,\n type SpectrumToastContainerProps as ToastContainerProps,\n ToastQueue,\n type SpectrumToastOptions as ToastOptions,\n} from '@react-spectrum/toast';\n"],"mappings":"AAAA,SACEA,KAAK,EAELC,WAAW,EAEXC,YAAY,EAEZC,KAAK,EAELC,WAAW,EAEXC,cAAc,EAEdC,WAAW,QAEN,uBAAuB;AAE9B,SACEC,cAAc,EAEdC,UAAU,QAEL,uBAAuB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/spectrum/utils/index.ts"],"sourcesContent":["export * from './itemUtils';\nexport * from './itemWrapperUtils';\nexport * from './propsUtils';\nexport * from './themeUtils';\nexport * from './useOnChangeTrackUncontrolled';\nexport * from './useRenderNormalizedItem';\nexport * from './useStaticItemInitialScrollPosition';\nexport * from './useStringifiedMultiSelection';\nexport * from './useStringifiedSelection';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/spectrum/utils/index.ts"],"sourcesContent":["export * from './itemUtils';\nexport * from './itemWrapperUtils';\nexport * from './propsUtils';\nexport * from './themeUtils';\nexport * from './useOnChangeTrackUncontrolled';\nexport * from './useRenderNormalizedItem';\nexport * from './useStaticItemInitialScrollPosition';\nexport * from './useStringifiedMultiSelection';\nexport * from './useStringifiedSelection';\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { ItemRenderer } from '@react-types/shared';
|
|
1
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
import type { ItemRenderer, Key } from '@react-types/shared';
|
|
3
3
|
import { type KeyedItem, type SelectionT } from '@deephaven/utils';
|
|
4
4
|
import { type ItemElementOrPrimitive, type ItemProps, type SectionProps } from '../shared';
|
|
5
5
|
import { type PopperOptions } from '../../popper';
|