@workday/canvas-kit-preview-react 16.2.0-0630-next.0 → 16.2.0-0634-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/preview-react/color-picker/index.d.ts.map +1 -0
- package/dist/commonjs/preview-react/color-picker/lib/ColorPicker.d.ts.map +1 -0
- package/dist/commonjs/{color-picker → preview-react/color-picker}/lib/ColorPicker.js +1 -1
- package/dist/commonjs/preview-react/color-picker/lib/defaultColorSet.d.ts.map +1 -0
- package/dist/commonjs/preview-react/color-picker/lib/parts/ColorReset.d.ts.map +1 -0
- package/dist/commonjs/{color-picker → preview-react/color-picker}/lib/parts/ColorReset.js +1 -1
- package/dist/commonjs/preview-react/color-picker/lib/parts/SwatchBook.d.ts.map +1 -0
- package/dist/commonjs/{color-picker → preview-react/color-picker}/lib/parts/SwatchBook.js +1 -1
- package/dist/commonjs/preview-react/divider/index.d.ts.map +1 -0
- package/dist/commonjs/preview-react/divider/lib/Divider.d.ts.map +1 -0
- package/dist/commonjs/{divider → preview-react/divider}/lib/Divider.js +3 -3
- package/dist/commonjs/preview-react/index.d.ts.map +1 -0
- package/dist/commonjs/preview-react/loading-sparkles/index.d.ts.map +1 -0
- package/dist/commonjs/preview-react/loading-sparkles/lib/LoadingSparkles.d.ts.map +1 -0
- package/dist/commonjs/{loading-sparkles → preview-react/loading-sparkles}/lib/LoadingSparkles.js +2 -2
- package/dist/commonjs/preview-react/loading-sparkles/lib/sparkleIcon.d.ts.map +1 -0
- package/dist/commonjs/preview-react/multi-select/index.d.ts.map +1 -0
- package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/MultiSelect.d.ts.map +1 -1
- package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/MultiSelectCard.d.ts.map +1 -1
- package/dist/commonjs/preview-react/multi-select/lib/MultiSelectInput.d.ts.map +1 -0
- package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/MultiSelectInput.js +3 -3
- package/dist/{es6 → commonjs/preview-react}/multi-select/lib/MultiSelectItem.d.ts.map +1 -1
- package/dist/{es6 → commonjs/preview-react}/multi-select/lib/MultiSelectedItem.d.ts.map +1 -1
- package/dist/commonjs/preview-react/multi-select/lib/MultiSelectedList.d.ts.map +1 -0
- package/dist/{es6 → commonjs/preview-react}/multi-select/lib/useMultiSelectItemRemove.d.ts.map +1 -1
- package/dist/{es6 → commonjs/preview-react}/multi-select/lib/useMultiSelectModel.d.ts.map +1 -1
- package/dist/commonjs/preview-react/radio/index.d.ts.map +1 -0
- package/dist/commonjs/preview-react/radio/lib/RadioButton.d.ts.map +1 -0
- package/dist/commonjs/preview-react/radio/lib/RadioGroup.d.ts.map +1 -0
- package/dist/commonjs/{radio → preview-react/radio}/lib/RadioGroup.js +3 -3
- package/dist/commonjs/preview-react/radio/lib/RadioInput.d.ts.map +1 -0
- package/dist/commonjs/preview-react/radio/lib/RadioLabel.d.ts.map +1 -0
- package/dist/commonjs/{radio → preview-react/radio}/lib/RadioLabel.js +1 -1
- package/dist/commonjs/preview-react/radio/lib/RadioText.d.ts.map +1 -0
- package/dist/commonjs/{radio → preview-react/radio}/lib/RadioText.js +3 -3
- package/dist/commonjs/preview-react/radio/lib/StyledRadioButton.d.ts.map +1 -0
- package/dist/commonjs/{radio → preview-react/radio}/lib/StyledRadioButton.js +5 -5
- package/dist/commonjs/preview-react/radio/lib/hooks/useRadioModel.d.ts.map +1 -0
- package/dist/commonjs/preview-react/side-panel/index.d.ts.map +1 -0
- package/dist/commonjs/preview-react/side-panel/lib/SidePanel.d.ts.map +1 -0
- package/dist/commonjs/{side-panel → preview-react/side-panel}/lib/SidePanel.js +7 -7
- package/dist/commonjs/preview-react/side-panel/lib/SidePanelToggleButton.d.ts.map +1 -0
- package/dist/commonjs/{side-panel → preview-react/side-panel}/lib/SidePanelToggleButton.js +11 -11
- package/dist/commonjs/preview-react/side-panel/lib/hooks.d.ts.map +1 -0
- package/dist/commonjs/preview-react/status-indicator/index.d.ts.map +1 -0
- package/dist/commonjs/preview-react/status-indicator/lib/StatusIndicator.d.ts.map +1 -0
- package/dist/commonjs/{status-indicator → preview-react/status-indicator}/lib/StatusIndicator.js +14 -14
- package/dist/commonjs/preview-react/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -0
- package/dist/commonjs/preview-react/status-indicator/lib/StatusIndicatorLabel.d.ts.map +1 -0
- package/dist/commonjs/{status-indicator → preview-react/status-indicator}/lib/StatusIndicatorLabel.js +1 -1
- package/dist/commonjs/preview-react/switch/index.d.ts.map +1 -0
- package/dist/commonjs/preview-react/switch/lib/Switch.d.ts.map +1 -0
- package/dist/commonjs/preview-react/switch/lib/SwitchBackground.d.ts.map +1 -0
- package/dist/commonjs/{switch → preview-react/switch}/lib/SwitchBackground.js +1 -1
- package/dist/commonjs/preview-react/switch/lib/SwitchCircle.d.ts.map +1 -0
- package/dist/commonjs/{switch → preview-react/switch}/lib/SwitchCircle.js +2 -2
- package/dist/commonjs/preview-react/switch/lib/SwitchContainer.d.ts.map +1 -0
- package/dist/commonjs/{switch → preview-react/switch}/lib/SwitchContainer.js +1 -1
- package/dist/commonjs/preview-react/switch/lib/SwitchIcon.d.ts.map +1 -0
- package/dist/commonjs/{switch → preview-react/switch}/lib/SwitchIcon.js +2 -2
- package/dist/commonjs/preview-react/switch/lib/SwitchInput.d.ts.map +1 -0
- package/dist/commonjs/preview-react/switch/lib/SwitchInput.js +22 -0
- package/dist/commonjs/preview-react/tabs/index.d.ts.map +1 -0
- package/dist/commonjs/{tabs → preview-react/tabs}/lib/Tabs.d.ts.map +1 -1
- package/dist/commonjs/{tabs → preview-react/tabs}/lib/TabsItem.d.ts +3 -1
- package/dist/commonjs/preview-react/tabs/lib/TabsItem.d.ts.map +1 -0
- package/dist/commonjs/preview-react/tabs/lib/TabsItem.js +105 -0
- package/dist/{es6 → commonjs/preview-react}/tabs/lib/TabsList.d.ts +330 -2
- package/dist/commonjs/preview-react/tabs/lib/TabsList.d.ts.map +1 -0
- package/dist/commonjs/{tabs → preview-react/tabs}/lib/TabsList.js +66 -12
- package/dist/{es6 → commonjs/preview-react}/tabs/lib/TabsOverflowButton.d.ts +24 -215
- package/dist/commonjs/preview-react/tabs/lib/TabsOverflowButton.d.ts.map +1 -0
- package/dist/commonjs/preview-react/tabs/lib/TabsOverflowButton.js +93 -0
- package/dist/commonjs/{tabs → preview-react/tabs}/lib/TabsPanel.d.ts.map +1 -1
- package/dist/commonjs/preview-react/tabs/lib/TabsPanels.d.ts.map +1 -0
- package/dist/commonjs/{tabs → preview-react/tabs}/lib/TabsPanels.js +2 -2
- package/dist/commonjs/{tabs → preview-react/tabs}/lib/useTabsModel.d.ts +17 -12
- package/dist/commonjs/preview-react/tabs/lib/useTabsModel.d.ts.map +1 -0
- package/dist/commonjs/preview-react/tabs/lib/useTabsModel.js +267 -0
- package/dist/commonjs/preview-react/version/index.d.ts.map +1 -0
- package/dist/commonjs/preview-react/version/lib/version.d.ts.map +1 -0
- package/dist/commonjs/{version → preview-react/version}/lib/version.js +1 -1
- package/dist/commonjs/react/collection/lib/keyUtils.d.ts +26 -0
- package/dist/commonjs/react/collection/lib/keyUtils.d.ts.map +1 -0
- package/dist/commonjs/react/collection/lib/keyUtils.js +84 -0
- package/dist/commonjs/react/collection/lib/useBaseListModel.d.ts +308 -0
- package/dist/commonjs/react/collection/lib/useBaseListModel.d.ts.map +1 -0
- package/dist/commonjs/react/collection/lib/useBaseListModel.js +195 -0
- package/dist/commonjs/react/collection/lib/useCursorListModel.d.ts +1424 -0
- package/dist/commonjs/react/collection/lib/useCursorListModel.d.ts.map +1 -0
- package/dist/commonjs/react/collection/lib/useCursorListModel.js +396 -0
- package/dist/es6/preview-react/color-picker/index.d.ts.map +1 -0
- package/dist/es6/preview-react/color-picker/lib/ColorPicker.d.ts.map +1 -0
- package/dist/es6/{color-picker → preview-react/color-picker}/lib/ColorPicker.js +1 -1
- package/dist/es6/preview-react/color-picker/lib/defaultColorSet.d.ts.map +1 -0
- package/dist/es6/preview-react/color-picker/lib/parts/ColorReset.d.ts.map +1 -0
- package/dist/es6/preview-react/color-picker/lib/parts/ColorReset.js +16 -0
- package/dist/es6/preview-react/color-picker/lib/parts/SwatchBook.d.ts.map +1 -0
- package/dist/es6/{color-picker → preview-react/color-picker}/lib/parts/SwatchBook.js +1 -1
- package/dist/es6/preview-react/divider/index.d.ts.map +1 -0
- package/dist/es6/preview-react/divider/lib/Divider.d.ts.map +1 -0
- package/dist/es6/{divider → preview-react/divider}/lib/Divider.js +3 -3
- package/dist/es6/preview-react/index.d.ts.map +1 -0
- package/dist/es6/preview-react/loading-sparkles/index.d.ts.map +1 -0
- package/dist/es6/preview-react/loading-sparkles/lib/LoadingSparkles.d.ts.map +1 -0
- package/dist/es6/{loading-sparkles → preview-react/loading-sparkles}/lib/LoadingSparkles.js +2 -2
- package/dist/es6/preview-react/loading-sparkles/lib/sparkleIcon.d.ts.map +1 -0
- package/dist/es6/preview-react/multi-select/index.d.ts.map +1 -0
- package/dist/es6/{multi-select → preview-react/multi-select}/lib/MultiSelect.d.ts.map +1 -1
- package/dist/es6/{multi-select → preview-react/multi-select}/lib/MultiSelectCard.d.ts.map +1 -1
- package/dist/es6/preview-react/multi-select/lib/MultiSelectInput.d.ts.map +1 -0
- package/dist/es6/{multi-select → preview-react/multi-select}/lib/MultiSelectInput.js +3 -3
- package/dist/{commonjs → es6/preview-react}/multi-select/lib/MultiSelectItem.d.ts.map +1 -1
- package/dist/{commonjs → es6/preview-react}/multi-select/lib/MultiSelectedItem.d.ts.map +1 -1
- package/dist/es6/preview-react/multi-select/lib/MultiSelectedList.d.ts.map +1 -0
- package/dist/{commonjs → es6/preview-react}/multi-select/lib/useMultiSelectItemRemove.d.ts.map +1 -1
- package/dist/{commonjs → es6/preview-react}/multi-select/lib/useMultiSelectModel.d.ts.map +1 -1
- package/dist/es6/preview-react/radio/index.d.ts.map +1 -0
- package/dist/es6/preview-react/radio/lib/RadioButton.d.ts.map +1 -0
- package/dist/es6/preview-react/radio/lib/RadioGroup.d.ts.map +1 -0
- package/dist/es6/{radio → preview-react/radio}/lib/RadioGroup.js +3 -3
- package/dist/es6/preview-react/radio/lib/RadioInput.d.ts.map +1 -0
- package/dist/es6/preview-react/radio/lib/RadioLabel.d.ts.map +1 -0
- package/dist/es6/{radio → preview-react/radio}/lib/RadioLabel.js +1 -1
- package/dist/es6/preview-react/radio/lib/RadioText.d.ts.map +1 -0
- package/dist/es6/{radio → preview-react/radio}/lib/RadioText.js +3 -3
- package/dist/es6/preview-react/radio/lib/StyledRadioButton.d.ts.map +1 -0
- package/dist/es6/{radio → preview-react/radio}/lib/StyledRadioButton.js +5 -5
- package/dist/es6/preview-react/radio/lib/hooks/useRadioModel.d.ts.map +1 -0
- package/dist/es6/preview-react/side-panel/index.d.ts.map +1 -0
- package/dist/es6/preview-react/side-panel/lib/SidePanel.d.ts.map +1 -0
- package/dist/es6/{side-panel → preview-react/side-panel}/lib/SidePanel.js +7 -7
- package/dist/es6/preview-react/side-panel/lib/SidePanelToggleButton.d.ts.map +1 -0
- package/dist/es6/{side-panel → preview-react/side-panel}/lib/SidePanelToggleButton.js +11 -11
- package/dist/es6/preview-react/side-panel/lib/hooks.d.ts.map +1 -0
- package/dist/es6/preview-react/status-indicator/index.d.ts.map +1 -0
- package/dist/es6/preview-react/status-indicator/lib/StatusIndicator.d.ts.map +1 -0
- package/dist/es6/{status-indicator → preview-react/status-indicator}/lib/StatusIndicator.js +14 -14
- package/dist/es6/preview-react/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -0
- package/dist/es6/preview-react/status-indicator/lib/StatusIndicatorLabel.d.ts.map +1 -0
- package/dist/es6/{status-indicator → preview-react/status-indicator}/lib/StatusIndicatorLabel.js +1 -1
- package/dist/es6/preview-react/switch/index.d.ts.map +1 -0
- package/dist/es6/preview-react/switch/lib/Switch.d.ts.map +1 -0
- package/dist/es6/preview-react/switch/lib/SwitchBackground.d.ts.map +1 -0
- package/dist/es6/{switch → preview-react/switch}/lib/SwitchBackground.js +1 -1
- package/dist/es6/preview-react/switch/lib/SwitchCircle.d.ts.map +1 -0
- package/dist/es6/{switch → preview-react/switch}/lib/SwitchCircle.js +2 -2
- package/dist/es6/preview-react/switch/lib/SwitchContainer.d.ts.map +1 -0
- package/dist/es6/{switch → preview-react/switch}/lib/SwitchContainer.js +1 -1
- package/dist/es6/preview-react/switch/lib/SwitchIcon.d.ts.map +1 -0
- package/dist/es6/{switch → preview-react/switch}/lib/SwitchIcon.js +2 -2
- package/dist/es6/preview-react/switch/lib/SwitchInput.d.ts.map +1 -0
- package/dist/es6/preview-react/switch/lib/SwitchInput.js +19 -0
- package/dist/es6/preview-react/tabs/index.d.ts.map +1 -0
- package/dist/es6/{tabs → preview-react/tabs}/lib/Tabs.d.ts.map +1 -1
- package/dist/es6/{tabs → preview-react/tabs}/lib/TabsItem.d.ts +3 -1
- package/dist/es6/preview-react/tabs/lib/TabsItem.d.ts.map +1 -0
- package/dist/es6/preview-react/tabs/lib/TabsItem.js +79 -0
- package/dist/{commonjs → es6/preview-react}/tabs/lib/TabsList.d.ts +330 -2
- package/dist/es6/preview-react/tabs/lib/TabsList.d.ts.map +1 -0
- package/dist/es6/preview-react/tabs/lib/TabsList.js +148 -0
- package/dist/{commonjs → es6/preview-react}/tabs/lib/TabsOverflowButton.d.ts +24 -215
- package/dist/es6/preview-react/tabs/lib/TabsOverflowButton.d.ts.map +1 -0
- package/dist/es6/preview-react/tabs/lib/TabsOverflowButton.js +89 -0
- package/dist/es6/{tabs → preview-react/tabs}/lib/TabsPanel.d.ts.map +1 -1
- package/dist/es6/preview-react/tabs/lib/TabsPanels.d.ts.map +1 -0
- package/dist/es6/{tabs → preview-react/tabs}/lib/TabsPanels.js +2 -2
- package/dist/es6/{tabs → preview-react/tabs}/lib/useTabsModel.d.ts +17 -12
- package/dist/es6/preview-react/tabs/lib/useTabsModel.d.ts.map +1 -0
- package/dist/es6/preview-react/tabs/lib/useTabsModel.js +261 -0
- package/dist/es6/preview-react/version/index.d.ts.map +1 -0
- package/dist/es6/preview-react/version/lib/version.d.ts.map +1 -0
- package/dist/es6/preview-react/version/lib/version.js +1 -0
- package/dist/es6/react/collection/lib/keyUtils.d.ts +26 -0
- package/dist/es6/react/collection/lib/keyUtils.d.ts.map +1 -0
- package/dist/es6/react/collection/lib/keyUtils.js +80 -0
- package/dist/es6/react/collection/lib/useBaseListModel.d.ts +308 -0
- package/dist/es6/react/collection/lib/useBaseListModel.d.ts.map +1 -0
- package/dist/es6/react/collection/lib/useBaseListModel.js +187 -0
- package/dist/es6/react/collection/lib/useCursorListModel.d.ts +1424 -0
- package/dist/es6/react/collection/lib/useCursorListModel.d.ts.map +1 -0
- package/dist/es6/react/collection/lib/useCursorListModel.js +379 -0
- package/package.json +4 -4
- package/tabs/lib/TabsItem.tsx +39 -0
- package/tabs/lib/TabsList.tsx +83 -5
- package/tabs/lib/TabsOverflowButton.tsx +77 -5
- package/tabs/lib/TabsPanels.tsx +2 -2
- package/tabs/lib/useTabsModel.tsx +161 -3
- package/dist/commonjs/color-picker/index.d.ts.map +0 -1
- package/dist/commonjs/color-picker/lib/ColorPicker.d.ts.map +0 -1
- package/dist/commonjs/color-picker/lib/defaultColorSet.d.ts.map +0 -1
- package/dist/commonjs/color-picker/lib/parts/ColorReset.d.ts.map +0 -1
- package/dist/commonjs/color-picker/lib/parts/SwatchBook.d.ts.map +0 -1
- package/dist/commonjs/divider/index.d.ts.map +0 -1
- package/dist/commonjs/divider/lib/Divider.d.ts.map +0 -1
- package/dist/commonjs/index.d.ts.map +0 -1
- package/dist/commonjs/loading-sparkles/index.d.ts.map +0 -1
- package/dist/commonjs/loading-sparkles/lib/LoadingSparkles.d.ts.map +0 -1
- package/dist/commonjs/loading-sparkles/lib/sparkleIcon.d.ts.map +0 -1
- package/dist/commonjs/multi-select/index.d.ts.map +0 -1
- package/dist/commonjs/multi-select/lib/MultiSelectInput.d.ts.map +0 -1
- package/dist/commonjs/multi-select/lib/MultiSelectedList.d.ts.map +0 -1
- package/dist/commonjs/radio/index.d.ts.map +0 -1
- package/dist/commonjs/radio/lib/RadioButton.d.ts.map +0 -1
- package/dist/commonjs/radio/lib/RadioGroup.d.ts.map +0 -1
- package/dist/commonjs/radio/lib/RadioInput.d.ts.map +0 -1
- package/dist/commonjs/radio/lib/RadioLabel.d.ts.map +0 -1
- package/dist/commonjs/radio/lib/RadioText.d.ts.map +0 -1
- package/dist/commonjs/radio/lib/StyledRadioButton.d.ts.map +0 -1
- package/dist/commonjs/radio/lib/hooks/useRadioModel.d.ts.map +0 -1
- package/dist/commonjs/side-panel/index.d.ts.map +0 -1
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +0 -1
- package/dist/commonjs/side-panel/lib/SidePanelToggleButton.d.ts.map +0 -1
- package/dist/commonjs/side-panel/lib/hooks.d.ts.map +0 -1
- package/dist/commonjs/status-indicator/index.d.ts.map +0 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts.map +0 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts.map +0 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.d.ts.map +0 -1
- package/dist/commonjs/switch/index.d.ts.map +0 -1
- package/dist/commonjs/switch/lib/Switch.d.ts.map +0 -1
- package/dist/commonjs/switch/lib/SwitchBackground.d.ts.map +0 -1
- package/dist/commonjs/switch/lib/SwitchCircle.d.ts.map +0 -1
- package/dist/commonjs/switch/lib/SwitchContainer.d.ts.map +0 -1
- package/dist/commonjs/switch/lib/SwitchIcon.d.ts.map +0 -1
- package/dist/commonjs/switch/lib/SwitchInput.d.ts.map +0 -1
- package/dist/commonjs/switch/lib/SwitchInput.js +0 -22
- package/dist/commonjs/tabs/index.d.ts.map +0 -1
- package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +0 -1
- package/dist/commonjs/tabs/lib/TabsItem.js +0 -50
- package/dist/commonjs/tabs/lib/TabsList.d.ts.map +0 -1
- package/dist/commonjs/tabs/lib/TabsOverflowButton.d.ts.map +0 -1
- package/dist/commonjs/tabs/lib/TabsOverflowButton.js +0 -28
- package/dist/commonjs/tabs/lib/TabsPanels.d.ts.map +0 -1
- package/dist/commonjs/tabs/lib/useTabsModel.d.ts.map +0 -1
- package/dist/commonjs/tabs/lib/useTabsModel.js +0 -128
- package/dist/commonjs/version/index.d.ts.map +0 -1
- package/dist/commonjs/version/lib/version.d.ts.map +0 -1
- package/dist/es6/color-picker/index.d.ts.map +0 -1
- package/dist/es6/color-picker/lib/ColorPicker.d.ts.map +0 -1
- package/dist/es6/color-picker/lib/defaultColorSet.d.ts.map +0 -1
- package/dist/es6/color-picker/lib/parts/ColorReset.d.ts.map +0 -1
- package/dist/es6/color-picker/lib/parts/ColorReset.js +0 -16
- package/dist/es6/color-picker/lib/parts/SwatchBook.d.ts.map +0 -1
- package/dist/es6/divider/index.d.ts.map +0 -1
- package/dist/es6/divider/lib/Divider.d.ts.map +0 -1
- package/dist/es6/index.d.ts.map +0 -1
- package/dist/es6/loading-sparkles/index.d.ts.map +0 -1
- package/dist/es6/loading-sparkles/lib/LoadingSparkles.d.ts.map +0 -1
- package/dist/es6/loading-sparkles/lib/sparkleIcon.d.ts.map +0 -1
- package/dist/es6/multi-select/index.d.ts.map +0 -1
- package/dist/es6/multi-select/lib/MultiSelectInput.d.ts.map +0 -1
- package/dist/es6/multi-select/lib/MultiSelectedList.d.ts.map +0 -1
- package/dist/es6/radio/index.d.ts.map +0 -1
- package/dist/es6/radio/lib/RadioButton.d.ts.map +0 -1
- package/dist/es6/radio/lib/RadioGroup.d.ts.map +0 -1
- package/dist/es6/radio/lib/RadioInput.d.ts.map +0 -1
- package/dist/es6/radio/lib/RadioLabel.d.ts.map +0 -1
- package/dist/es6/radio/lib/RadioText.d.ts.map +0 -1
- package/dist/es6/radio/lib/StyledRadioButton.d.ts.map +0 -1
- package/dist/es6/radio/lib/hooks/useRadioModel.d.ts.map +0 -1
- package/dist/es6/side-panel/index.d.ts.map +0 -1
- package/dist/es6/side-panel/lib/SidePanel.d.ts.map +0 -1
- package/dist/es6/side-panel/lib/SidePanelToggleButton.d.ts.map +0 -1
- package/dist/es6/side-panel/lib/hooks.d.ts.map +0 -1
- package/dist/es6/status-indicator/index.d.ts.map +0 -1
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts.map +0 -1
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts.map +0 -1
- package/dist/es6/status-indicator/lib/StatusIndicatorLabel.d.ts.map +0 -1
- package/dist/es6/switch/index.d.ts.map +0 -1
- package/dist/es6/switch/lib/Switch.d.ts.map +0 -1
- package/dist/es6/switch/lib/SwitchBackground.d.ts.map +0 -1
- package/dist/es6/switch/lib/SwitchCircle.d.ts.map +0 -1
- package/dist/es6/switch/lib/SwitchContainer.d.ts.map +0 -1
- package/dist/es6/switch/lib/SwitchIcon.d.ts.map +0 -1
- package/dist/es6/switch/lib/SwitchInput.d.ts.map +0 -1
- package/dist/es6/switch/lib/SwitchInput.js +0 -19
- package/dist/es6/tabs/index.d.ts.map +0 -1
- package/dist/es6/tabs/lib/TabsItem.d.ts.map +0 -1
- package/dist/es6/tabs/lib/TabsItem.js +0 -47
- package/dist/es6/tabs/lib/TabsList.d.ts.map +0 -1
- package/dist/es6/tabs/lib/TabsList.js +0 -95
- package/dist/es6/tabs/lib/TabsOverflowButton.d.ts.map +0 -1
- package/dist/es6/tabs/lib/TabsOverflowButton.js +0 -25
- package/dist/es6/tabs/lib/TabsPanels.d.ts.map +0 -1
- package/dist/es6/tabs/lib/useTabsModel.d.ts.map +0 -1
- package/dist/es6/tabs/lib/useTabsModel.js +0 -122
- package/dist/es6/version/index.d.ts.map +0 -1
- package/dist/es6/version/lib/version.d.ts.map +0 -1
- package/dist/es6/version/lib/version.js +0 -1
- /package/dist/commonjs/{color-picker → preview-react/color-picker}/index.d.ts +0 -0
- /package/dist/commonjs/{color-picker → preview-react/color-picker}/index.js +0 -0
- /package/dist/commonjs/{color-picker → preview-react/color-picker}/lib/ColorPicker.d.ts +0 -0
- /package/dist/commonjs/{color-picker → preview-react/color-picker}/lib/defaultColorSet.d.ts +0 -0
- /package/dist/commonjs/{color-picker → preview-react/color-picker}/lib/defaultColorSet.js +0 -0
- /package/dist/commonjs/{color-picker → preview-react/color-picker}/lib/parts/ColorReset.d.ts +0 -0
- /package/dist/commonjs/{color-picker → preview-react/color-picker}/lib/parts/SwatchBook.d.ts +0 -0
- /package/dist/commonjs/{divider → preview-react/divider}/index.d.ts +0 -0
- /package/dist/commonjs/{divider → preview-react/divider}/index.js +0 -0
- /package/dist/commonjs/{divider → preview-react/divider}/lib/Divider.d.ts +0 -0
- /package/dist/commonjs/{index.d.ts → preview-react/index.d.ts} +0 -0
- /package/dist/commonjs/{index.js → preview-react/index.js} +0 -0
- /package/dist/commonjs/{loading-sparkles → preview-react/loading-sparkles}/index.d.ts +0 -0
- /package/dist/commonjs/{loading-sparkles → preview-react/loading-sparkles}/index.js +0 -0
- /package/dist/commonjs/{loading-sparkles → preview-react/loading-sparkles}/lib/LoadingSparkles.d.ts +0 -0
- /package/dist/commonjs/{loading-sparkles → preview-react/loading-sparkles}/lib/sparkleIcon.d.ts +0 -0
- /package/dist/commonjs/{loading-sparkles → preview-react/loading-sparkles}/lib/sparkleIcon.js +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/index.d.ts +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/index.js +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/MultiSelect.d.ts +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/MultiSelect.js +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/MultiSelectCard.d.ts +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/MultiSelectCard.js +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/MultiSelectInput.d.ts +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/MultiSelectItem.d.ts +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/MultiSelectItem.js +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/MultiSelectedItem.d.ts +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/MultiSelectedItem.js +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/MultiSelectedList.d.ts +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/MultiSelectedList.js +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/useMultiSelectItemRemove.d.ts +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/useMultiSelectItemRemove.js +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/useMultiSelectModel.d.ts +0 -0
- /package/dist/commonjs/{multi-select → preview-react/multi-select}/lib/useMultiSelectModel.js +0 -0
- /package/dist/commonjs/{radio → preview-react/radio}/index.d.ts +0 -0
- /package/dist/commonjs/{radio → preview-react/radio}/index.js +0 -0
- /package/dist/commonjs/{radio → preview-react/radio}/lib/RadioButton.d.ts +0 -0
- /package/dist/commonjs/{radio → preview-react/radio}/lib/RadioButton.js +0 -0
- /package/dist/commonjs/{radio → preview-react/radio}/lib/RadioGroup.d.ts +0 -0
- /package/dist/commonjs/{radio → preview-react/radio}/lib/RadioInput.d.ts +0 -0
- /package/dist/commonjs/{radio → preview-react/radio}/lib/RadioInput.js +0 -0
- /package/dist/commonjs/{radio → preview-react/radio}/lib/RadioLabel.d.ts +0 -0
- /package/dist/commonjs/{radio → preview-react/radio}/lib/RadioText.d.ts +0 -0
- /package/dist/commonjs/{radio → preview-react/radio}/lib/StyledRadioButton.d.ts +0 -0
- /package/dist/commonjs/{radio → preview-react/radio}/lib/hooks/useRadioModel.d.ts +0 -0
- /package/dist/commonjs/{radio → preview-react/radio}/lib/hooks/useRadioModel.js +0 -0
- /package/dist/commonjs/{side-panel → preview-react/side-panel}/index.d.ts +0 -0
- /package/dist/commonjs/{side-panel → preview-react/side-panel}/index.js +0 -0
- /package/dist/commonjs/{side-panel → preview-react/side-panel}/lib/SidePanel.d.ts +0 -0
- /package/dist/commonjs/{side-panel → preview-react/side-panel}/lib/SidePanelToggleButton.d.ts +0 -0
- /package/dist/commonjs/{side-panel → preview-react/side-panel}/lib/hooks.d.ts +0 -0
- /package/dist/commonjs/{side-panel → preview-react/side-panel}/lib/hooks.js +0 -0
- /package/dist/commonjs/{status-indicator → preview-react/status-indicator}/index.d.ts +0 -0
- /package/dist/commonjs/{status-indicator → preview-react/status-indicator}/index.js +0 -0
- /package/dist/commonjs/{status-indicator → preview-react/status-indicator}/lib/StatusIndicator.d.ts +0 -0
- /package/dist/commonjs/{status-indicator → preview-react/status-indicator}/lib/StatusIndicatorIcon.d.ts +0 -0
- /package/dist/commonjs/{status-indicator → preview-react/status-indicator}/lib/StatusIndicatorIcon.js +0 -0
- /package/dist/commonjs/{status-indicator → preview-react/status-indicator}/lib/StatusIndicatorLabel.d.ts +0 -0
- /package/dist/commonjs/{switch → preview-react/switch}/index.d.ts +0 -0
- /package/dist/commonjs/{switch → preview-react/switch}/index.js +0 -0
- /package/dist/commonjs/{switch → preview-react/switch}/lib/Switch.d.ts +0 -0
- /package/dist/commonjs/{switch → preview-react/switch}/lib/Switch.js +0 -0
- /package/dist/commonjs/{switch → preview-react/switch}/lib/SwitchBackground.d.ts +0 -0
- /package/dist/commonjs/{switch → preview-react/switch}/lib/SwitchCircle.d.ts +0 -0
- /package/dist/commonjs/{switch → preview-react/switch}/lib/SwitchContainer.d.ts +0 -0
- /package/dist/commonjs/{switch → preview-react/switch}/lib/SwitchIcon.d.ts +0 -0
- /package/dist/commonjs/{switch → preview-react/switch}/lib/SwitchInput.d.ts +0 -0
- /package/dist/commonjs/{tabs → preview-react/tabs}/index.d.ts +0 -0
- /package/dist/commonjs/{tabs → preview-react/tabs}/index.js +0 -0
- /package/dist/commonjs/{tabs → preview-react/tabs}/lib/Tabs.d.ts +0 -0
- /package/dist/commonjs/{tabs → preview-react/tabs}/lib/Tabs.js +0 -0
- /package/dist/commonjs/{tabs → preview-react/tabs}/lib/TabsPanel.d.ts +0 -0
- /package/dist/commonjs/{tabs → preview-react/tabs}/lib/TabsPanel.js +0 -0
- /package/dist/commonjs/{tabs → preview-react/tabs}/lib/TabsPanels.d.ts +0 -0
- /package/dist/commonjs/{version → preview-react/version}/index.d.ts +0 -0
- /package/dist/commonjs/{version → preview-react/version}/index.js +0 -0
- /package/dist/commonjs/{version → preview-react/version}/lib/version.d.ts +0 -0
- /package/dist/es6/{color-picker → preview-react/color-picker}/index.d.ts +0 -0
- /package/dist/es6/{color-picker → preview-react/color-picker}/index.js +0 -0
- /package/dist/es6/{color-picker → preview-react/color-picker}/lib/ColorPicker.d.ts +0 -0
- /package/dist/es6/{color-picker → preview-react/color-picker}/lib/defaultColorSet.d.ts +0 -0
- /package/dist/es6/{color-picker → preview-react/color-picker}/lib/defaultColorSet.js +0 -0
- /package/dist/es6/{color-picker → preview-react/color-picker}/lib/parts/ColorReset.d.ts +0 -0
- /package/dist/es6/{color-picker → preview-react/color-picker}/lib/parts/SwatchBook.d.ts +0 -0
- /package/dist/es6/{divider → preview-react/divider}/index.d.ts +0 -0
- /package/dist/es6/{divider → preview-react/divider}/index.js +0 -0
- /package/dist/es6/{divider → preview-react/divider}/lib/Divider.d.ts +0 -0
- /package/dist/es6/{index.d.ts → preview-react/index.d.ts} +0 -0
- /package/dist/es6/{index.js → preview-react/index.js} +0 -0
- /package/dist/es6/{loading-sparkles → preview-react/loading-sparkles}/index.d.ts +0 -0
- /package/dist/es6/{loading-sparkles → preview-react/loading-sparkles}/index.js +0 -0
- /package/dist/es6/{loading-sparkles → preview-react/loading-sparkles}/lib/LoadingSparkles.d.ts +0 -0
- /package/dist/es6/{loading-sparkles → preview-react/loading-sparkles}/lib/sparkleIcon.d.ts +0 -0
- /package/dist/es6/{loading-sparkles → preview-react/loading-sparkles}/lib/sparkleIcon.js +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/index.d.ts +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/index.js +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/MultiSelect.d.ts +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/MultiSelect.js +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/MultiSelectCard.d.ts +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/MultiSelectCard.js +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/MultiSelectInput.d.ts +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/MultiSelectItem.d.ts +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/MultiSelectItem.js +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/MultiSelectedItem.d.ts +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/MultiSelectedItem.js +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/MultiSelectedList.d.ts +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/MultiSelectedList.js +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/useMultiSelectItemRemove.d.ts +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/useMultiSelectItemRemove.js +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/useMultiSelectModel.d.ts +0 -0
- /package/dist/es6/{multi-select → preview-react/multi-select}/lib/useMultiSelectModel.js +0 -0
- /package/dist/es6/{radio → preview-react/radio}/index.d.ts +0 -0
- /package/dist/es6/{radio → preview-react/radio}/index.js +0 -0
- /package/dist/es6/{radio → preview-react/radio}/lib/RadioButton.d.ts +0 -0
- /package/dist/es6/{radio → preview-react/radio}/lib/RadioButton.js +0 -0
- /package/dist/es6/{radio → preview-react/radio}/lib/RadioGroup.d.ts +0 -0
- /package/dist/es6/{radio → preview-react/radio}/lib/RadioInput.d.ts +0 -0
- /package/dist/es6/{radio → preview-react/radio}/lib/RadioInput.js +0 -0
- /package/dist/es6/{radio → preview-react/radio}/lib/RadioLabel.d.ts +0 -0
- /package/dist/es6/{radio → preview-react/radio}/lib/RadioText.d.ts +0 -0
- /package/dist/es6/{radio → preview-react/radio}/lib/StyledRadioButton.d.ts +0 -0
- /package/dist/es6/{radio → preview-react/radio}/lib/hooks/useRadioModel.d.ts +0 -0
- /package/dist/es6/{radio → preview-react/radio}/lib/hooks/useRadioModel.js +0 -0
- /package/dist/es6/{side-panel → preview-react/side-panel}/index.d.ts +0 -0
- /package/dist/es6/{side-panel → preview-react/side-panel}/index.js +0 -0
- /package/dist/es6/{side-panel → preview-react/side-panel}/lib/SidePanel.d.ts +0 -0
- /package/dist/es6/{side-panel → preview-react/side-panel}/lib/SidePanelToggleButton.d.ts +0 -0
- /package/dist/es6/{side-panel → preview-react/side-panel}/lib/hooks.d.ts +0 -0
- /package/dist/es6/{side-panel → preview-react/side-panel}/lib/hooks.js +0 -0
- /package/dist/es6/{status-indicator → preview-react/status-indicator}/index.d.ts +0 -0
- /package/dist/es6/{status-indicator → preview-react/status-indicator}/index.js +0 -0
- /package/dist/es6/{status-indicator → preview-react/status-indicator}/lib/StatusIndicator.d.ts +0 -0
- /package/dist/es6/{status-indicator → preview-react/status-indicator}/lib/StatusIndicatorIcon.d.ts +0 -0
- /package/dist/es6/{status-indicator → preview-react/status-indicator}/lib/StatusIndicatorIcon.js +0 -0
- /package/dist/es6/{status-indicator → preview-react/status-indicator}/lib/StatusIndicatorLabel.d.ts +0 -0
- /package/dist/es6/{switch → preview-react/switch}/index.d.ts +0 -0
- /package/dist/es6/{switch → preview-react/switch}/index.js +0 -0
- /package/dist/es6/{switch → preview-react/switch}/lib/Switch.d.ts +0 -0
- /package/dist/es6/{switch → preview-react/switch}/lib/Switch.js +0 -0
- /package/dist/es6/{switch → preview-react/switch}/lib/SwitchBackground.d.ts +0 -0
- /package/dist/es6/{switch → preview-react/switch}/lib/SwitchCircle.d.ts +0 -0
- /package/dist/es6/{switch → preview-react/switch}/lib/SwitchContainer.d.ts +0 -0
- /package/dist/es6/{switch → preview-react/switch}/lib/SwitchIcon.d.ts +0 -0
- /package/dist/es6/{switch → preview-react/switch}/lib/SwitchInput.d.ts +0 -0
- /package/dist/es6/{tabs → preview-react/tabs}/index.d.ts +0 -0
- /package/dist/es6/{tabs → preview-react/tabs}/index.js +0 -0
- /package/dist/es6/{tabs → preview-react/tabs}/lib/Tabs.d.ts +0 -0
- /package/dist/es6/{tabs → preview-react/tabs}/lib/Tabs.js +0 -0
- /package/dist/es6/{tabs → preview-react/tabs}/lib/TabsPanel.d.ts +0 -0
- /package/dist/es6/{tabs → preview-react/tabs}/lib/TabsPanel.js +0 -0
- /package/dist/es6/{tabs → preview-react/tabs}/lib/TabsPanels.d.ts +0 -0
- /package/dist/es6/{version → preview-react/version}/index.d.ts +0 -0
- /package/dist/es6/{version → preview-react/version}/index.js +0 -0
- /package/dist/es6/{version → preview-react/version}/lib/version.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCursorListModel.d.ts","sourceRoot":"","sources":["../../../../../../react/collection/lib/useCursorListModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,OAAO,EAAkB,MAAM,kCAAkC,CAAC;AAE1E,OAAO,EAAC,IAAI,EAAmB,MAAM,oBAAoB,CAAC;AAE1D,KAAK,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,EAAE,OAAO,CAAC,CAAC;AAE5E;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;0CACsC;IACtC,QAAQ,EAAE,mBAAmB,CAAC;IAC9B;mCAC+B;IAC/B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,0CAA0C;IAC1C,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC,OAAO,CAAC,G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IAKH,mDAAmD;;IAKnD,kDAAkD;;;;;;;;;;;;;;;;;;QA3ElD,wDAAwD;;QAExD;;;;WAIG;;QAEH;;;WAGG;;QAEH;;;;;;WAMG;;8BArCyD,MAAM;;;;;;;;;;;;;QA2ClE,mEAAmE;mBACxD;YAAC,EAAE,EAAE,MAAM,CAAA;SAAC;QAIvB;;;;;WAKG;;QAKH;;;WAGG;;QAKH;;;;;WAKG;;QAOH;;;;;WAKG;;QAKH,mDAAmD;;QAKnD,kDAAkD;;;;;;;;;;;;;;;;;;;;EA0BpD,CAAC"}
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createModelHook } from '@workday/canvas-kit-react/common';
|
|
3
|
+
import { useBaseListModel } from './useBaseListModel';
|
|
4
|
+
/**
|
|
5
|
+
* Factory function that does type checking to create navigation managers. Navigation managers
|
|
6
|
+
* are expected to handle all methods of a grid. If your use-case isn't meant to handle a grid,
|
|
7
|
+
* pick one of the existing navigation managers and override the methods you wish to implement.
|
|
8
|
+
*
|
|
9
|
+
* For example,
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import {createNavigationManager, wrappingNavigationManager} from '@workday/canvas-kit-react/collection'
|
|
12
|
+
*
|
|
13
|
+
* const navigationManager = createNavigationManager({
|
|
14
|
+
* ...wrappingNavigationManager,
|
|
15
|
+
* getNext(id, {state}) {
|
|
16
|
+
* //
|
|
17
|
+
* }
|
|
18
|
+
* })
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export const createNavigationManager = (manager) => manager;
|
|
22
|
+
/**
|
|
23
|
+
* Get the first item in a list regardless of column count
|
|
24
|
+
*/
|
|
25
|
+
export const getFirst = () => 0;
|
|
26
|
+
/**
|
|
27
|
+
* Get the last item in a list regardless of column count
|
|
28
|
+
*/
|
|
29
|
+
export const getLast = (_, { state }) => state.items.length - 1;
|
|
30
|
+
/**
|
|
31
|
+
* Get the first item in a row. If column count is 0, it will return the results of `getFirst`
|
|
32
|
+
*/
|
|
33
|
+
export const getFirstOfRow = (index, { state }) => {
|
|
34
|
+
if (state.columnCount) {
|
|
35
|
+
const offset = index % state.columnCount;
|
|
36
|
+
return index - offset;
|
|
37
|
+
}
|
|
38
|
+
return getFirst(index, { state });
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* get the last item in a row - if column count is 0, it will return the results of `getLast`
|
|
42
|
+
*/
|
|
43
|
+
export const getLastOfRow = (index, { state }) => {
|
|
44
|
+
if (state.columnCount) {
|
|
45
|
+
const offset = (index % state.columnCount) - state.columnCount + 1;
|
|
46
|
+
let nextIndex = index - offset;
|
|
47
|
+
if (nextIndex >= state.items.length) {
|
|
48
|
+
nextIndex = state.items.length - 1;
|
|
49
|
+
}
|
|
50
|
+
return nextIndex;
|
|
51
|
+
}
|
|
52
|
+
return getLast(index, { state });
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* get the item in the previous page. This can be author defined. By default it will return the
|
|
56
|
+
* first item for a list, and the first item in the same column for a grid.
|
|
57
|
+
*/
|
|
58
|
+
export const getPreviousPage = (index, { state }) => {
|
|
59
|
+
if (state.columnCount) {
|
|
60
|
+
return index % state.columnCount;
|
|
61
|
+
}
|
|
62
|
+
return getFirst(index, { state });
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* get the item in the next page. This can be author defined. By default, it will return the last
|
|
66
|
+
* item for a list, and the last item in the same column for a grid.
|
|
67
|
+
*/
|
|
68
|
+
export const getNextPage = (index, { state }) => {
|
|
69
|
+
if (state.columnCount) {
|
|
70
|
+
const lastRowIndex = state.items.length - state.columnCount;
|
|
71
|
+
return lastRowIndex + (index % state.columnCount);
|
|
72
|
+
}
|
|
73
|
+
return getLast(index, { state });
|
|
74
|
+
};
|
|
75
|
+
const getItem = (id, { state }) => {
|
|
76
|
+
return state.items.find(item => item.id === id);
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Get the current cursor id of a Collection model's state.
|
|
80
|
+
*/
|
|
81
|
+
export const getCursor = (state) => typeof state.cursorId === 'string' ? state.cursorId : state.cursorId.slice(-1)[0] || '';
|
|
82
|
+
/**
|
|
83
|
+
* Check if the provided id is the current cursor id of a Collection model's state.
|
|
84
|
+
*/
|
|
85
|
+
export const isCursor = (state, id) => {
|
|
86
|
+
const { cursorId } = state;
|
|
87
|
+
// Empty cursor must not use String.prototype.includes (e.g. ''.includes('') is true).
|
|
88
|
+
if (cursorId == null || cursorId === '') {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
return typeof cursorId === 'string' ? cursorId === id : cursorId.includes(id);
|
|
92
|
+
};
|
|
93
|
+
export const getWrappingOffsetItem = (offset) => (index, { state }, tries = state.items.length) => {
|
|
94
|
+
if (Number.isNaN(index)) {
|
|
95
|
+
// we have no valid index. If the offset is positive, we'll return the first item
|
|
96
|
+
if (offset === 1) {
|
|
97
|
+
return getFirst(index, { state });
|
|
98
|
+
}
|
|
99
|
+
if (offset === -1) {
|
|
100
|
+
return getLast(index, { state });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const items = state.items;
|
|
104
|
+
let nextIndex = index + offset;
|
|
105
|
+
// calculate idealLength as in if the grid was a perfect rectangle
|
|
106
|
+
const rows = Math.ceil(items.length / state.columnCount);
|
|
107
|
+
const idealLength = rows * state.columnCount;
|
|
108
|
+
if (nextIndex < 0) {
|
|
109
|
+
if (offset === -1) {
|
|
110
|
+
// if the offset is -1, we want to wrap to the end
|
|
111
|
+
nextIndex = items.length - 1;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
// if the offset is smaller than -1, we want to wrap by column
|
|
115
|
+
if (idealLength + nextIndex >= items.length) {
|
|
116
|
+
// we'll overflow the grid because there isn't enough items. Move `nextIndex` up so we wrap in
|
|
117
|
+
// the right spot
|
|
118
|
+
nextIndex -= state.columnCount;
|
|
119
|
+
}
|
|
120
|
+
nextIndex = idealLength + nextIndex;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
else if (nextIndex >= items.length) {
|
|
124
|
+
if (offset === 1) {
|
|
125
|
+
// if the offset is 1, we want to wrap to the beginning
|
|
126
|
+
nextIndex = 0;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
// if the offset is larger than 1, we want to wrap by column
|
|
130
|
+
if (nextIndex - idealLength < 0) {
|
|
131
|
+
// we're going to overflow the grid because there isn't enough items. Move `nextIndex` down to
|
|
132
|
+
// the missing item in the next row. This way we'll end up wrapping in the right spot
|
|
133
|
+
nextIndex += state.columnCount;
|
|
134
|
+
}
|
|
135
|
+
nextIndex = nextIndex - idealLength;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if (items.length > 1 && state.nonInteractiveIds.includes(items[nextIndex].id) && tries > 0) {
|
|
139
|
+
// The next item is disabled, try again, but only if we haven't already tried everything.
|
|
140
|
+
// Avoid an infinite loop with `tries`
|
|
141
|
+
return getWrappingOffsetItem(offset)(nextIndex, { state }, tries - 1);
|
|
142
|
+
}
|
|
143
|
+
return nextIndex;
|
|
144
|
+
};
|
|
145
|
+
export const getOffsetItem = (offset) => (index, { state }, tries = state.items.length) => {
|
|
146
|
+
const { items, columnCount } = state;
|
|
147
|
+
let nextIndex = index + offset;
|
|
148
|
+
if (Math.abs(offset) < columnCount) {
|
|
149
|
+
// if we're here, the columnCount is non-zero and the absolute value of offset is less than the
|
|
150
|
+
// column count. We don't want to wrap, so we'll bound within the row
|
|
151
|
+
const currentIndexInRow = index % columnCount;
|
|
152
|
+
const nextIndexInRow = nextIndex - index + currentIndexInRow;
|
|
153
|
+
if (nextIndexInRow >= columnCount || nextIndexInRow < 0) {
|
|
154
|
+
nextIndex = index;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
else if (columnCount) {
|
|
158
|
+
// if we're here, there's a column count, but the offset will move into another row. We need to
|
|
159
|
+
// bound to row values
|
|
160
|
+
const nextRow = Math.floor(nextIndex / columnCount);
|
|
161
|
+
if (nextRow < 0 || nextRow >= columnCount) {
|
|
162
|
+
nextIndex = index;
|
|
163
|
+
}
|
|
164
|
+
// make sure we don't go out of bounds if the grid isn't a perfect rectangle
|
|
165
|
+
if (nextIndex > items.length - 1) {
|
|
166
|
+
nextIndex = index;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
// make sure we're always in bounds
|
|
170
|
+
if (nextIndex < 0) {
|
|
171
|
+
nextIndex = 0;
|
|
172
|
+
}
|
|
173
|
+
else if (nextIndex >= items.length) {
|
|
174
|
+
nextIndex = items.length - 1;
|
|
175
|
+
}
|
|
176
|
+
if (state.nonInteractiveIds.includes(items[nextIndex].id) && tries > 0) {
|
|
177
|
+
// The next item is disabled, try again, but only if we haven't already tried everything.
|
|
178
|
+
// Avoid an infinite loop with `tries`
|
|
179
|
+
return getOffsetItem(offset)(nextIndex, { state }, tries - 1);
|
|
180
|
+
}
|
|
181
|
+
return nextIndex;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* The default navigation manager of lists. This navigation manager will wrap around when the edge
|
|
185
|
+
* is hit. For example, if the user is the the right-most item in a list or right-most item in a
|
|
186
|
+
* row, the cursor will wrap around to the beginning or the next row.
|
|
187
|
+
*/
|
|
188
|
+
export const wrappingNavigationManager = createNavigationManager({
|
|
189
|
+
getFirst,
|
|
190
|
+
getLast,
|
|
191
|
+
getItem,
|
|
192
|
+
getNext: getWrappingOffsetItem(1),
|
|
193
|
+
getNextRow: (index, { state }) => getWrappingOffsetItem(state.columnCount)(index, { state }),
|
|
194
|
+
getPrevious: getWrappingOffsetItem(-1),
|
|
195
|
+
getPreviousRow: (index, { state }) => getWrappingOffsetItem(-state.columnCount)(index, { state }),
|
|
196
|
+
getPreviousPage,
|
|
197
|
+
getNextPage,
|
|
198
|
+
getFirstOfRow,
|
|
199
|
+
getLastOfRow,
|
|
200
|
+
});
|
|
201
|
+
/**
|
|
202
|
+
* The default navigation of grids. This navigation manager will not wrap, but will stop when an
|
|
203
|
+
* edge is detected. This could be the last item in a list or the last item of a row in a grid.
|
|
204
|
+
*/
|
|
205
|
+
export const navigationManager = createNavigationManager({
|
|
206
|
+
getFirst,
|
|
207
|
+
getLast,
|
|
208
|
+
getItem,
|
|
209
|
+
getNext: getOffsetItem(1),
|
|
210
|
+
getNextRow: (index, { state }) => getOffsetItem(state.columnCount)(index, { state }),
|
|
211
|
+
getPrevious: getOffsetItem(-1),
|
|
212
|
+
getPreviousRow: (index, { state }) => getOffsetItem(-state.columnCount)(index, { state }),
|
|
213
|
+
getPreviousPage,
|
|
214
|
+
getNextPage,
|
|
215
|
+
getFirstOfRow,
|
|
216
|
+
getLastOfRow,
|
|
217
|
+
});
|
|
218
|
+
/**
|
|
219
|
+
* A `CursorModel` extends a `ListModel` and adds a "cursor" to the list. A cursor is a pointer to a
|
|
220
|
+
* current position in the list. The most common use-case is keeping track of which item currently
|
|
221
|
+
* has focus within the list. Many w3c list role types specify a single tab stop within the list.
|
|
222
|
+
*/
|
|
223
|
+
export const useCursorListModel = createModelHook({
|
|
224
|
+
defaultConfig: {
|
|
225
|
+
...useBaseListModel.defaultConfig,
|
|
226
|
+
/**
|
|
227
|
+
* Initial cursor position. If not provided, the cursor will point to the first item in the list
|
|
228
|
+
*/
|
|
229
|
+
initialCursorId: '',
|
|
230
|
+
/**
|
|
231
|
+
* If this is set it will cause a wrapping of a list that will turn it into a grid
|
|
232
|
+
* @default 0
|
|
233
|
+
*/
|
|
234
|
+
columnCount: 0,
|
|
235
|
+
/**
|
|
236
|
+
* Controls the state changes when the user sends navigation events to the model. For example,
|
|
237
|
+
* when the user hits the "right" arrow, a behavior hook will determine directionality
|
|
238
|
+
* (left-to-right or right-to-left) and call the correct navigation method. In our example, a
|
|
239
|
+
* left-to-right language would send a `getNext`. The navigation manager may return the next item
|
|
240
|
+
* in the list. Different managers can be created for slightly different use cases. The default
|
|
241
|
+
* navigation manager will accept `orientation` and directionality to determine mapping.
|
|
242
|
+
*
|
|
243
|
+
* An example override might be a tab list with an overflow menu that is meant to be transparent
|
|
244
|
+
* to screen reader users. This would require the overflow menu to accept both up/down keys as
|
|
245
|
+
* well as left/right keys to give a more consistent experience to all users.
|
|
246
|
+
*/
|
|
247
|
+
navigation: wrappingNavigationManager,
|
|
248
|
+
/**
|
|
249
|
+
* Controls how much a pageUp/pageDown navigation request will jump. If not provided, the size
|
|
250
|
+
* of the list and number of items rendered will determine this value.
|
|
251
|
+
*/
|
|
252
|
+
pageSize: 0,
|
|
253
|
+
},
|
|
254
|
+
requiredConfig: useBaseListModel.requiredConfig,
|
|
255
|
+
contextOverride: useBaseListModel.Context,
|
|
256
|
+
})(config => {
|
|
257
|
+
var _a;
|
|
258
|
+
const [cursorId, setCursorId] = React.useState(config.initialCursorId);
|
|
259
|
+
const pageSizeRef = React.useRef(config.pageSize);
|
|
260
|
+
const columnCount = config.columnCount || 0;
|
|
261
|
+
const list = useBaseListModel(config);
|
|
262
|
+
const navigation = config.navigation;
|
|
263
|
+
// Cast as a readonly to signify this value should never be set
|
|
264
|
+
const cursorIndexRef = React.useRef(-1);
|
|
265
|
+
const setCursor = (index) => {
|
|
266
|
+
var _a;
|
|
267
|
+
const id = ((_a = state.items[index]) === null || _a === void 0 ? void 0 : _a.id) || '';
|
|
268
|
+
setCursorId(id);
|
|
269
|
+
};
|
|
270
|
+
// Keep the cursorIndex up to date with the cursor ID
|
|
271
|
+
if (cursorId && ((_a = list.state.items[cursorIndexRef.current]) === null || _a === void 0 ? void 0 : _a.id) !== cursorId) {
|
|
272
|
+
// We cast back as a writeable because this is the only place the value should be changed.
|
|
273
|
+
cursorIndexRef.current = list.state.items.findIndex(item => item.id === cursorId);
|
|
274
|
+
}
|
|
275
|
+
else if (!cursorId) {
|
|
276
|
+
cursorIndexRef.current = -1;
|
|
277
|
+
}
|
|
278
|
+
const state = {
|
|
279
|
+
...list.state,
|
|
280
|
+
/** The id of the list item the cursor is pointing to */
|
|
281
|
+
cursorId,
|
|
282
|
+
/**
|
|
283
|
+
* Any positive non-zero value treats the list like a grid with rows and columns
|
|
284
|
+
* @default 0
|
|
285
|
+
* @private Use useGridModel instead to make a grid instead of a list
|
|
286
|
+
*/
|
|
287
|
+
columnCount,
|
|
288
|
+
/**
|
|
289
|
+
* A React.Ref of the current page size. Either provided as config, or determined at runtime
|
|
290
|
+
* based on the size of the list container and the number of items fitting within the container.
|
|
291
|
+
*/
|
|
292
|
+
pageSizeRef,
|
|
293
|
+
/**
|
|
294
|
+
* A readonly [React.Ref](https://react.dev/learn/referencing-values-with-refs) that tracks the
|
|
295
|
+
* index of the `state.cursorId`. This value is automatically updated when the `state.cursorId`
|
|
296
|
+
* or the `items` change.
|
|
297
|
+
*
|
|
298
|
+
* @readonly
|
|
299
|
+
*/
|
|
300
|
+
cursorIndexRef,
|
|
301
|
+
};
|
|
302
|
+
const events = {
|
|
303
|
+
...list.events,
|
|
304
|
+
/** Directly sets the cursor to the list item by its identifier. */
|
|
305
|
+
goTo(data) {
|
|
306
|
+
const index = state.items.findIndex(item => item.id === data.id);
|
|
307
|
+
setCursor(index);
|
|
308
|
+
},
|
|
309
|
+
/**
|
|
310
|
+
* Set the cursor to the "next" item in the list. This event delegates to the `getNext` method of
|
|
311
|
+
* the navigation manager. For a list, the default navigation manager will wrap if cursor is
|
|
312
|
+
* currently on the last item. For a grid, the default navigation manager will stay on the last
|
|
313
|
+
* item in a row.
|
|
314
|
+
*/
|
|
315
|
+
goToNext() {
|
|
316
|
+
const index = navigation.getNext(cursorIndexRef.current, { state });
|
|
317
|
+
setCursor(index);
|
|
318
|
+
},
|
|
319
|
+
/**
|
|
320
|
+
* Set the cursor to the "previous" item in the list. If the beginning of the list is detected,
|
|
321
|
+
* it will wrap to the last item
|
|
322
|
+
*/
|
|
323
|
+
goToPrevious() {
|
|
324
|
+
const index = navigation.getPrevious(cursorIndexRef.current, { state });
|
|
325
|
+
setCursor(index);
|
|
326
|
+
},
|
|
327
|
+
/**
|
|
328
|
+
* Previous item perpendicular to the orientation of a list, or the previous row in a grid. For
|
|
329
|
+
* example, if a list is horizontal, the previous row would describe an up direction. This could
|
|
330
|
+
* be ignored by the navigation manager, or return the same result as `previous()`. In a grid,
|
|
331
|
+
* this would be the previous row (current position - column count).
|
|
332
|
+
*/
|
|
333
|
+
goToPreviousRow() {
|
|
334
|
+
const index = navigation.getPreviousRow(cursorIndexRef.current, {
|
|
335
|
+
state,
|
|
336
|
+
});
|
|
337
|
+
setCursor(index);
|
|
338
|
+
},
|
|
339
|
+
/**
|
|
340
|
+
* Next item perpendicular to the orientation of a list, or the next row in a grid. For example,
|
|
341
|
+
* if a list is horizontal, the next row would describe a down direction. This could be ignored by
|
|
342
|
+
* the navigation manager, or return the same result as `next()`. In a grid, this would be the
|
|
343
|
+
* next row (current position + column count).
|
|
344
|
+
*/
|
|
345
|
+
goToNextRow() {
|
|
346
|
+
const index = navigation.getNextRow(cursorIndexRef.current, { state });
|
|
347
|
+
setCursor(index);
|
|
348
|
+
},
|
|
349
|
+
/** Set the cursor to the first item in the list */
|
|
350
|
+
goToFirst() {
|
|
351
|
+
const index = navigation.getFirst(cursorIndexRef.current, { state });
|
|
352
|
+
setCursor(index);
|
|
353
|
+
},
|
|
354
|
+
/** Set the cursor to the last item in the list */
|
|
355
|
+
goToLast() {
|
|
356
|
+
const index = navigation.getLast(cursorIndexRef.current, { state });
|
|
357
|
+
setCursor(index);
|
|
358
|
+
},
|
|
359
|
+
goToFirstOfRow() {
|
|
360
|
+
const index = navigation.getFirstOfRow(cursorIndexRef.current, { state });
|
|
361
|
+
setCursor(index);
|
|
362
|
+
},
|
|
363
|
+
goToLastOfRow() {
|
|
364
|
+
const index = navigation.getLastOfRow(cursorIndexRef.current, { state });
|
|
365
|
+
setCursor(index);
|
|
366
|
+
},
|
|
367
|
+
goToNextPage() {
|
|
368
|
+
const index = navigation.getNextPage(cursorIndexRef.current, { state });
|
|
369
|
+
setCursor(index);
|
|
370
|
+
},
|
|
371
|
+
goToPreviousPage() {
|
|
372
|
+
const index = navigation.getPreviousPage(cursorIndexRef.current, {
|
|
373
|
+
state,
|
|
374
|
+
});
|
|
375
|
+
setCursor(index);
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
return { ...list, state, events, navigation };
|
|
379
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-preview-react",
|
|
3
|
-
"version": "16.2.0-
|
|
3
|
+
"version": "16.2.0-0634-next.0",
|
|
4
4
|
"description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@emotion/react": "^11.7.1",
|
|
50
50
|
"@emotion/styled": "^11.6.0",
|
|
51
|
-
"@workday/canvas-kit-react": "^16.2.0-
|
|
52
|
-
"@workday/canvas-kit-styling": "^16.2.0-
|
|
51
|
+
"@workday/canvas-kit-react": "^16.2.0-0634-next.0",
|
|
52
|
+
"@workday/canvas-kit-styling": "^16.2.0-0634-next.0",
|
|
53
53
|
"@workday/canvas-system-icons-web": "^5.0.3",
|
|
54
54
|
"@workday/canvas-tokens-web": "^4.4.0",
|
|
55
55
|
"@workday/design-assets-types": "^0.3.0"
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"react-hook-form": "7.36.1",
|
|
61
61
|
"yup": "^0.32.11"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "52625db5c787e0187d80ef31e519daeaf8328501"
|
|
64
64
|
}
|
package/tabs/lib/TabsItem.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
+
ListRenderItemContext,
|
|
4
5
|
isSelected,
|
|
5
6
|
useListItemRegister,
|
|
6
7
|
useListItemRovingFocus,
|
|
@@ -229,6 +230,43 @@ export const StyledTabItem = createComponent('button')<TabsItemProps>({
|
|
|
229
230
|
},
|
|
230
231
|
});
|
|
231
232
|
|
|
233
|
+
/**
|
|
234
|
+
* When the selected tab receives ArrowDown, move focus to its tab panel.
|
|
235
|
+
* Returning `null` is the mergeCallback sentinel that stops later-merged
|
|
236
|
+
* `onKeyDown` handlers (including roving focus) from also handling this key.
|
|
237
|
+
* This hook must be composed before `useListItemRovingFocus` so it runs after
|
|
238
|
+
* that hook and its return value can skip the roving handler.
|
|
239
|
+
* Tabs.OverflowButton does not use this hook.
|
|
240
|
+
*
|
|
241
|
+
* ArrowDown is only intercepted in horizontal orientation. In a vertical tablist,
|
|
242
|
+
* ArrowDown is the roving-navigation key and must reach `useListItemRovingFocus`.
|
|
243
|
+
*/
|
|
244
|
+
const useTabsItemFocusPanelOnArrowDown = createElemPropsHook(useTabsModel)((
|
|
245
|
+
{state},
|
|
246
|
+
_,
|
|
247
|
+
elemProps: {'data-id'?: string} = {}
|
|
248
|
+
) => {
|
|
249
|
+
const {item} = React.useContext(ListRenderItemContext);
|
|
250
|
+
const name = elemProps['data-id'] || item?.id || '';
|
|
251
|
+
const selected = !!name && isSelected(name, state);
|
|
252
|
+
|
|
253
|
+
return {
|
|
254
|
+
onKeyDown(event: React.KeyboardEvent<HTMLElement>) {
|
|
255
|
+
if (!selected || state.orientation !== 'horizontal' || event.key !== 'ArrowDown') {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
event.preventDefault();
|
|
259
|
+
const panelId = slugify(`tabpanel-${state.id}-${name}`);
|
|
260
|
+
const panel = document.getElementById(panelId);
|
|
261
|
+
if (panel) {
|
|
262
|
+
(panel as HTMLElement).focus();
|
|
263
|
+
}
|
|
264
|
+
// mergeCallback: `null` prevents the roving-focus onKeyDown from running.
|
|
265
|
+
return null;
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
});
|
|
269
|
+
|
|
232
270
|
export const useTabsItem = composeHooks(
|
|
233
271
|
createElemPropsHook(useTabsModel)(({state}, _, elemProps: {'data-id'?: string} = {}) => {
|
|
234
272
|
const name = elemProps['data-id'] || '';
|
|
@@ -244,6 +282,7 @@ export const useTabsItem = composeHooks(
|
|
|
244
282
|
}),
|
|
245
283
|
useListItemSelect,
|
|
246
284
|
useOverflowListItemMeasure,
|
|
285
|
+
useTabsItemFocusPanelOnArrowDown,
|
|
247
286
|
useListItemRovingFocus,
|
|
248
287
|
useListItemRegister
|
|
249
288
|
);
|
package/tabs/lib/TabsList.tsx
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
ListRenderItemContext,
|
|
5
|
+
isCursor,
|
|
6
6
|
useOverflowListMeasure,
|
|
7
7
|
} from '@workday/canvas-kit-react/collection';
|
|
8
8
|
import {
|
|
9
9
|
ExtractProps,
|
|
10
|
+
Generic,
|
|
10
11
|
composeHooks,
|
|
11
12
|
createElemPropsHook,
|
|
12
13
|
createSubcomponent,
|
|
13
14
|
useLocalRef,
|
|
14
15
|
useModalityType,
|
|
16
|
+
useMountLayout,
|
|
15
17
|
} from '@workday/canvas-kit-react/common';
|
|
16
18
|
import {Flex, mergeStyles} from '@workday/canvas-kit-react/layout';
|
|
17
19
|
import {createStencil} from '@workday/canvas-kit-styling';
|
|
18
20
|
import {system} from '@workday/canvas-tokens-web';
|
|
19
21
|
|
|
20
|
-
import {
|
|
22
|
+
import {orientationKeyMap} from '../../../react/collection/lib/keyUtils';
|
|
23
|
+
import {TABS_OVERFLOW_BUTTON_ID, useTabsModel} from './useTabsModel';
|
|
21
24
|
|
|
22
25
|
export interface TabListProps<T = any> extends Omit<ExtractProps<typeof Flex, never>, 'children'> {
|
|
23
26
|
/**
|
|
@@ -100,6 +103,49 @@ export const useTabOverflowScroll = createElemPropsHook(useTabsModel)((
|
|
|
100
103
|
};
|
|
101
104
|
});
|
|
102
105
|
|
|
106
|
+
/**
|
|
107
|
+
* Resets the tablist cursor on blur to the selected tab when visible, or to the first visible
|
|
108
|
+
* item (e.g. the overflow button) when the selected tab is hidden. This ensures the roving
|
|
109
|
+
* tabindex always lands on a focusable element when only the "More" button is visible.
|
|
110
|
+
*/
|
|
111
|
+
export const useTabsListResetCursorOnBlur = createElemPropsHook(useTabsModel)(({state, events}) => {
|
|
112
|
+
const programmaticFocusRef = React.useRef(false);
|
|
113
|
+
const requestAnimationFrameRef = React.useRef(0);
|
|
114
|
+
|
|
115
|
+
useMountLayout(() => {
|
|
116
|
+
return () => {
|
|
117
|
+
cancelAnimationFrame(requestAnimationFrameRef.current);
|
|
118
|
+
};
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
return {
|
|
122
|
+
onKeyDown(event: React.KeyboardEvent) {
|
|
123
|
+
if (Object.keys(orientationKeyMap[state.orientation]).indexOf(event.key) !== -1) {
|
|
124
|
+
programmaticFocusRef.current = true;
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
onFocus() {
|
|
128
|
+
programmaticFocusRef.current = false;
|
|
129
|
+
},
|
|
130
|
+
onBlur() {
|
|
131
|
+
if (!programmaticFocusRef.current) {
|
|
132
|
+
requestAnimationFrameRef.current = requestAnimationFrame(() => {
|
|
133
|
+
const selectedId =
|
|
134
|
+
state.selectedIds !== 'all' && state.selectedIds.length
|
|
135
|
+
? state.selectedIds[0]
|
|
136
|
+
: undefined;
|
|
137
|
+
const visibleItems = state.items.filter(item => !state.hiddenIds.includes(item.id));
|
|
138
|
+
const targetId =
|
|
139
|
+
selectedId && !state.hiddenIds.includes(selectedId) ? selectedId : visibleItems[0]?.id;
|
|
140
|
+
if (targetId && !isCursor(state, targetId)) {
|
|
141
|
+
events.goTo({id: targetId});
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
});
|
|
148
|
+
|
|
103
149
|
export const useTabsList = composeHooks(
|
|
104
150
|
useTabOverflowScroll,
|
|
105
151
|
createElemPropsHook(useTabsModel)(model => {
|
|
@@ -109,13 +155,14 @@ export const useTabsList = composeHooks(
|
|
|
109
155
|
} as const;
|
|
110
156
|
}),
|
|
111
157
|
useOverflowListMeasure,
|
|
112
|
-
|
|
158
|
+
useTabsListResetCursorOnBlur
|
|
113
159
|
);
|
|
114
160
|
|
|
115
161
|
export const tabsListStencil = createStencil({
|
|
116
162
|
base: {
|
|
117
163
|
display: 'flex',
|
|
118
164
|
position: 'relative',
|
|
165
|
+
minWidth: 0,
|
|
119
166
|
gap: system.legacy.gap.sm,
|
|
120
167
|
|
|
121
168
|
'@media screen and (max-width: 768px)': {
|
|
@@ -156,6 +203,37 @@ export const tabsListStencil = createStencil({
|
|
|
156
203
|
},
|
|
157
204
|
});
|
|
158
205
|
|
|
206
|
+
/**
|
|
207
|
+
* Custom render function for tabs that filters out the synthetic overflow button item.
|
|
208
|
+
* This is needed because the overflow button is included in the model's items array
|
|
209
|
+
* for navigation purposes, but should not be rendered by the list or panel render function.
|
|
210
|
+
*/
|
|
211
|
+
export function useTabsCollectionRenderItems(
|
|
212
|
+
model: ReturnType<typeof useTabsModel>,
|
|
213
|
+
children: ((item: Generic, index: number) => React.ReactNode) | React.ReactNode
|
|
214
|
+
): React.ReactNode {
|
|
215
|
+
const itemsToRender = model.state.items.filter(item => item.id !== TABS_OVERFLOW_BUTTON_ID);
|
|
216
|
+
|
|
217
|
+
const items =
|
|
218
|
+
typeof children === 'function' ? (
|
|
219
|
+
itemsToRender.map(item => {
|
|
220
|
+
const child = (children as (item: Generic, index: number) => React.ReactNode)(
|
|
221
|
+
item.value,
|
|
222
|
+
item.index
|
|
223
|
+
);
|
|
224
|
+
return (
|
|
225
|
+
<ListRenderItemContext.Provider key={item.id || item.index} value={{item}}>
|
|
226
|
+
{child}
|
|
227
|
+
</ListRenderItemContext.Provider>
|
|
228
|
+
);
|
|
229
|
+
})
|
|
230
|
+
) : (
|
|
231
|
+
<ListRenderItemContext.Provider value={{}}>{children}</ListRenderItemContext.Provider>
|
|
232
|
+
);
|
|
233
|
+
|
|
234
|
+
return items;
|
|
235
|
+
}
|
|
236
|
+
|
|
159
237
|
export const TabsList = createSubcomponent('div')({
|
|
160
238
|
displayName: 'Tabs.List',
|
|
161
239
|
modelHook: useTabsModel,
|
|
@@ -173,7 +251,7 @@ export const TabsList = createSubcomponent('div')({
|
|
|
173
251
|
})
|
|
174
252
|
)}
|
|
175
253
|
>
|
|
176
|
-
{
|
|
254
|
+
{useTabsCollectionRenderItems(model, children)}
|
|
177
255
|
{overflowButton}
|
|
178
256
|
</Element>
|
|
179
257
|
);
|