@workday/canvas-kit-preview-react 15.0.0-alpha.1303-next.0 → 15.0.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/color-picker/index.ts +1 -1
- package/color-picker/lib/ColorPicker.tsx +9 -72
- package/color-picker/lib/defaultColorSet.ts +64 -0
- package/color-picker/lib/parts/ColorReset.tsx +8 -8
- package/color-picker/lib/parts/SwatchBook.tsx +8 -7
- package/dist/commonjs/color-picker/index.d.ts +1 -1
- package/dist/commonjs/color-picker/index.d.ts.map +1 -1
- package/dist/commonjs/color-picker/lib/ColorPicker.d.ts.map +1 -1
- package/dist/commonjs/color-picker/lib/ColorPicker.js +10 -67
- package/dist/commonjs/color-picker/lib/defaultColorSet.d.ts +59 -0
- package/dist/commonjs/color-picker/lib/defaultColorSet.d.ts.map +1 -0
- package/dist/commonjs/color-picker/lib/defaultColorSet.js +61 -0
- package/dist/commonjs/color-picker/lib/parts/ColorReset.js +4 -4
- package/dist/commonjs/color-picker/lib/parts/SwatchBook.d.ts.map +1 -1
- package/dist/commonjs/color-picker/lib/parts/SwatchBook.js +4 -4
- package/dist/commonjs/divider/lib/Divider.d.ts +6 -6
- package/dist/commonjs/divider/lib/Divider.d.ts.map +1 -1
- package/dist/commonjs/divider/lib/Divider.js +5 -5
- package/dist/commonjs/index.d.ts +2 -5
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +2 -5
- package/dist/commonjs/loading-sparkles/lib/LoadingSparkles.d.ts.map +1 -1
- package/dist/commonjs/loading-sparkles/lib/LoadingSparkles.js +5 -5
- package/dist/commonjs/loading-sparkles/lib/sparkleIcon.d.ts.map +1 -1
- package/dist/commonjs/multi-select/lib/MultiSelect.js +3 -3
- package/dist/commonjs/multi-select/lib/MultiSelectCard.d.ts.map +1 -1
- package/dist/commonjs/multi-select/lib/MultiSelectCard.js +1 -1
- package/dist/commonjs/multi-select/lib/MultiSelectInput.d.ts +20 -14
- package/dist/commonjs/multi-select/lib/MultiSelectInput.d.ts.map +1 -1
- package/dist/commonjs/multi-select/lib/MultiSelectInput.js +13 -13
- package/dist/commonjs/multi-select/lib/MultiSelectItem.d.ts.map +1 -1
- package/dist/commonjs/multi-select/lib/MultiSelectItem.js +2 -2
- package/dist/commonjs/multi-select/lib/MultiSelectedItem.js +2 -2
- package/dist/commonjs/multi-select/lib/MultiSelectedList.d.ts.map +1 -1
- package/dist/commonjs/multi-select/lib/MultiSelectedList.js +2 -2
- package/dist/commonjs/multi-select/lib/useMultiSelectItemRemove.d.ts.map +1 -1
- package/dist/commonjs/multi-select/lib/useMultiSelectItemRemove.js +1 -1
- package/dist/commonjs/multi-select/lib/useMultiSelectModel.d.ts.map +1 -1
- package/dist/commonjs/multi-select/lib/useMultiSelectModel.js +2 -2
- package/dist/commonjs/radio/lib/RadioButton.d.ts.map +1 -1
- package/dist/commonjs/radio/lib/RadioButton.js +1 -1
- package/dist/commonjs/radio/lib/RadioGroup.d.ts +1 -1
- package/dist/commonjs/radio/lib/RadioGroup.d.ts.map +1 -1
- package/dist/commonjs/radio/lib/RadioGroup.js +6 -6
- package/dist/commonjs/radio/lib/RadioInput.d.ts.map +1 -1
- package/dist/commonjs/radio/lib/RadioInput.js +1 -1
- package/dist/commonjs/radio/lib/RadioLabel.d.ts +1 -1
- package/dist/commonjs/radio/lib/RadioLabel.d.ts.map +1 -1
- package/dist/commonjs/radio/lib/RadioLabel.js +5 -5
- package/dist/commonjs/radio/lib/RadioText.d.ts.map +1 -1
- package/dist/commonjs/radio/lib/RadioText.js +7 -13
- package/dist/commonjs/radio/lib/StyledRadioButton.d.ts +71 -0
- package/dist/commonjs/radio/lib/StyledRadioButton.d.ts.map +1 -1
- package/dist/commonjs/radio/lib/StyledRadioButton.js +16 -15
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts +16 -1
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/SidePanel.js +15 -9
- package/dist/commonjs/side-panel/lib/SidePanelToggleButton.d.ts +1 -1
- package/dist/commonjs/side-panel/lib/SidePanelToggleButton.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/SidePanelToggleButton.js +16 -16
- package/dist/commonjs/side-panel/lib/hooks.d.ts +9 -0
- package/dist/commonjs/side-panel/lib/hooks.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/hooks.js +2 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts +12 -16
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicator.js +17 -18
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.js +4 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.d.ts.map +1 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.js +2 -2
- package/dist/commonjs/switch/index.d.ts +7 -0
- package/dist/commonjs/switch/index.d.ts.map +1 -0
- package/dist/commonjs/{avatar → switch}/index.js +6 -5
- package/dist/commonjs/switch/lib/Switch.d.ts +36 -0
- package/dist/commonjs/switch/lib/Switch.d.ts.map +1 -0
- package/dist/commonjs/switch/lib/Switch.js +20 -0
- package/dist/commonjs/switch/lib/SwitchBackground.d.ts +3 -0
- package/dist/commonjs/switch/lib/SwitchBackground.d.ts.map +1 -0
- package/dist/commonjs/switch/lib/SwitchBackground.js +16 -0
- package/dist/commonjs/switch/lib/SwitchCircle.d.ts +13 -0
- package/dist/commonjs/switch/lib/SwitchCircle.d.ts.map +1 -0
- package/dist/commonjs/switch/lib/SwitchCircle.js +21 -0
- package/dist/commonjs/switch/lib/SwitchContainer.d.ts +3 -0
- package/dist/commonjs/switch/lib/SwitchContainer.d.ts.map +1 -0
- package/dist/commonjs/switch/lib/SwitchContainer.js +16 -0
- package/dist/commonjs/switch/lib/SwitchIcon.d.ts +13 -0
- package/dist/commonjs/switch/lib/SwitchIcon.d.ts.map +1 -0
- package/dist/commonjs/switch/lib/SwitchIcon.js +23 -0
- package/dist/commonjs/switch/lib/SwitchInput.d.ts +17 -0
- package/dist/commonjs/switch/lib/SwitchInput.d.ts.map +1 -0
- package/dist/commonjs/switch/lib/SwitchInput.js +22 -0
- package/dist/commonjs/version/lib/version.js +1 -1
- package/dist/es6/color-picker/index.d.ts +1 -1
- package/dist/es6/color-picker/index.d.ts.map +1 -1
- package/dist/es6/color-picker/lib/ColorPicker.d.ts.map +1 -1
- package/dist/es6/color-picker/lib/ColorPicker.js +8 -65
- package/dist/es6/color-picker/lib/defaultColorSet.d.ts +59 -0
- package/dist/es6/color-picker/lib/defaultColorSet.d.ts.map +1 -0
- package/dist/es6/color-picker/lib/defaultColorSet.js +58 -0
- package/dist/es6/color-picker/lib/parts/ColorReset.js +4 -4
- package/dist/es6/color-picker/lib/parts/SwatchBook.d.ts.map +1 -1
- package/dist/es6/color-picker/lib/parts/SwatchBook.js +4 -4
- package/dist/es6/divider/lib/Divider.d.ts +6 -6
- package/dist/es6/divider/lib/Divider.d.ts.map +1 -1
- package/dist/es6/divider/lib/Divider.js +6 -6
- package/dist/es6/index.d.ts +2 -5
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +2 -5
- package/dist/es6/loading-sparkles/lib/LoadingSparkles.d.ts.map +1 -1
- package/dist/es6/loading-sparkles/lib/LoadingSparkles.js +5 -5
- package/dist/es6/loading-sparkles/lib/sparkleIcon.d.ts.map +1 -1
- package/dist/es6/multi-select/lib/MultiSelect.js +3 -3
- package/dist/es6/multi-select/lib/MultiSelectCard.d.ts.map +1 -1
- package/dist/es6/multi-select/lib/MultiSelectCard.js +1 -1
- package/dist/es6/multi-select/lib/MultiSelectInput.d.ts +20 -14
- package/dist/es6/multi-select/lib/MultiSelectInput.d.ts.map +1 -1
- package/dist/es6/multi-select/lib/MultiSelectInput.js +13 -13
- package/dist/es6/multi-select/lib/MultiSelectItem.d.ts.map +1 -1
- package/dist/es6/multi-select/lib/MultiSelectItem.js +2 -2
- package/dist/es6/multi-select/lib/MultiSelectedItem.js +2 -2
- package/dist/es6/multi-select/lib/MultiSelectedList.d.ts.map +1 -1
- package/dist/es6/multi-select/lib/MultiSelectedList.js +2 -2
- package/dist/es6/multi-select/lib/useMultiSelectItemRemove.d.ts.map +1 -1
- package/dist/es6/multi-select/lib/useMultiSelectItemRemove.js +1 -1
- package/dist/es6/multi-select/lib/useMultiSelectModel.d.ts.map +1 -1
- package/dist/es6/multi-select/lib/useMultiSelectModel.js +2 -2
- package/dist/es6/radio/lib/RadioButton.d.ts.map +1 -1
- package/dist/es6/radio/lib/RadioButton.js +1 -1
- package/dist/es6/radio/lib/RadioGroup.d.ts +1 -1
- package/dist/es6/radio/lib/RadioGroup.d.ts.map +1 -1
- package/dist/es6/radio/lib/RadioGroup.js +7 -7
- package/dist/es6/radio/lib/RadioInput.d.ts.map +1 -1
- package/dist/es6/radio/lib/RadioInput.js +2 -2
- package/dist/es6/radio/lib/RadioLabel.d.ts +1 -1
- package/dist/es6/radio/lib/RadioLabel.d.ts.map +1 -1
- package/dist/es6/radio/lib/RadioLabel.js +5 -5
- package/dist/es6/radio/lib/RadioText.d.ts.map +1 -1
- package/dist/es6/radio/lib/RadioText.js +7 -13
- package/dist/es6/radio/lib/StyledRadioButton.d.ts +71 -0
- package/dist/es6/radio/lib/StyledRadioButton.d.ts.map +1 -1
- package/dist/es6/radio/lib/StyledRadioButton.js +17 -16
- package/dist/es6/side-panel/lib/SidePanel.d.ts +16 -1
- package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/SidePanel.js +15 -9
- package/dist/es6/side-panel/lib/SidePanelToggleButton.d.ts +1 -1
- package/dist/es6/side-panel/lib/SidePanelToggleButton.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/SidePanelToggleButton.js +16 -16
- package/dist/es6/side-panel/lib/hooks.d.ts +9 -0
- package/dist/es6/side-panel/lib/hooks.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/hooks.js +2 -1
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts +12 -16
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
- package/dist/es6/status-indicator/lib/StatusIndicator.js +17 -18
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -1
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.js +4 -0
- package/dist/es6/status-indicator/lib/StatusIndicatorLabel.d.ts.map +1 -1
- package/dist/es6/status-indicator/lib/StatusIndicatorLabel.js +2 -2
- package/dist/es6/switch/index.d.ts +7 -0
- package/dist/es6/switch/index.d.ts.map +1 -0
- package/dist/es6/switch/index.js +6 -0
- package/dist/es6/switch/lib/Switch.d.ts +36 -0
- package/dist/es6/switch/lib/Switch.d.ts.map +1 -0
- package/dist/es6/switch/lib/Switch.js +17 -0
- package/dist/es6/switch/lib/SwitchBackground.d.ts +3 -0
- package/dist/es6/switch/lib/SwitchBackground.d.ts.map +1 -0
- package/dist/es6/switch/lib/SwitchBackground.js +13 -0
- package/dist/es6/switch/lib/SwitchCircle.d.ts +13 -0
- package/dist/es6/switch/lib/SwitchCircle.d.ts.map +1 -0
- package/dist/es6/switch/lib/SwitchCircle.js +18 -0
- package/dist/es6/switch/lib/SwitchContainer.d.ts +3 -0
- package/dist/es6/switch/lib/SwitchContainer.d.ts.map +1 -0
- package/dist/es6/switch/lib/SwitchContainer.js +13 -0
- package/dist/es6/switch/lib/SwitchIcon.d.ts +13 -0
- package/dist/es6/switch/lib/SwitchIcon.d.ts.map +1 -0
- package/dist/es6/switch/lib/SwitchIcon.js +20 -0
- package/dist/es6/switch/lib/SwitchInput.d.ts +17 -0
- package/dist/es6/switch/lib/SwitchInput.d.ts.map +1 -0
- package/dist/es6/switch/lib/SwitchInput.js +19 -0
- package/dist/es6/version/lib/version.js +1 -1
- package/divider/lib/Divider.tsx +9 -9
- package/index.ts +2 -5
- package/loading-sparkles/lib/LoadingSparkles.tsx +2 -2
- package/loading-sparkles/lib/sparkleIcon.ts +1 -1
- package/multi-select/lib/MultiSelect.tsx +3 -3
- package/multi-select/lib/MultiSelectCard.tsx +2 -2
- package/multi-select/lib/MultiSelectInput.tsx +64 -50
- package/multi-select/lib/MultiSelectItem.tsx +3 -4
- package/multi-select/lib/MultiSelectedItem.tsx +2 -2
- package/multi-select/lib/MultiSelectedList.tsx +2 -2
- package/multi-select/lib/useMultiSelectItemRemove.ts +2 -1
- package/multi-select/lib/useMultiSelectModel.ts +2 -2
- package/package.json +8 -8
- package/radio/lib/RadioButton.tsx +2 -1
- package/radio/lib/RadioGroup.tsx +14 -15
- package/radio/lib/RadioInput.tsx +23 -19
- package/radio/lib/RadioLabel.tsx +7 -6
- package/radio/lib/RadioText.tsx +8 -15
- package/radio/lib/StyledRadioButton.tsx +61 -94
- package/side-panel/lib/SidePanel.tsx +19 -2
- package/side-panel/lib/SidePanelToggleButton.tsx +12 -10
- package/side-panel/lib/hooks.ts +11 -1
- package/status-indicator/lib/StatusIndicator.tsx +23 -27
- package/status-indicator/lib/StatusIndicatorIcon.tsx +4 -0
- package/status-indicator/lib/StatusIndicatorLabel.tsx +1 -1
- package/switch/index.ts +6 -0
- package/switch/lib/Switch.tsx +74 -0
- package/switch/lib/SwitchBackground.tsx +33 -0
- package/switch/lib/SwitchCircle.tsx +37 -0
- package/switch/lib/SwitchContainer.tsx +25 -0
- package/switch/lib/SwitchIcon.tsx +44 -0
- package/switch/lib/SwitchInput.tsx +76 -0
- package/switch/package.json +6 -0
- package/avatar/index.ts +0 -5
- package/avatar/lib/Avatar.tsx +0 -156
- package/avatar/lib/AvatarImage.tsx +0 -20
- package/avatar/lib/AvatarName.tsx +0 -32
- package/avatar/lib/BaseAvatar.tsx +0 -127
- package/avatar/lib/getInitialsFromName.ts +0 -11
- package/avatar/package.json +0 -6
- package/dist/commonjs/avatar/index.d.ts +0 -6
- package/dist/commonjs/avatar/index.d.ts.map +0 -1
- package/dist/commonjs/avatar/lib/Avatar.d.ts +0 -281
- package/dist/commonjs/avatar/lib/Avatar.d.ts.map +0 -1
- package/dist/commonjs/avatar/lib/Avatar.js +0 -53
- package/dist/commonjs/avatar/lib/AvatarImage.d.ts +0 -6
- package/dist/commonjs/avatar/lib/AvatarImage.d.ts.map +0 -1
- package/dist/commonjs/avatar/lib/AvatarImage.js +0 -15
- package/dist/commonjs/avatar/lib/AvatarName.d.ts +0 -14
- package/dist/commonjs/avatar/lib/AvatarName.d.ts.map +0 -1
- package/dist/commonjs/avatar/lib/AvatarName.js +0 -16
- package/dist/commonjs/avatar/lib/BaseAvatar.d.ts +0 -148
- package/dist/commonjs/avatar/lib/BaseAvatar.d.ts.map +0 -1
- package/dist/commonjs/avatar/lib/BaseAvatar.js +0 -47
- package/dist/commonjs/avatar/lib/getInitialsFromName.d.ts +0 -2
- package/dist/commonjs/avatar/lib/getInitialsFromName.d.ts.map +0 -1
- package/dist/commonjs/avatar/lib/getInitialsFromName.js +0 -13
- package/dist/commonjs/information-highlight/index.d.ts +0 -6
- package/dist/commonjs/information-highlight/index.d.ts.map +0 -1
- package/dist/commonjs/information-highlight/index.js +0 -21
- package/dist/commonjs/information-highlight/lib/InformationHighlight.d.ts +0 -76
- package/dist/commonjs/information-highlight/lib/InformationHighlight.d.ts.map +0 -1
- package/dist/commonjs/information-highlight/lib/InformationHighlight.js +0 -42
- package/dist/commonjs/information-highlight/lib/hooks/useInformationHighlightModel.d.ts +0 -23
- package/dist/commonjs/information-highlight/lib/hooks/useInformationHighlightModel.d.ts.map +0 -1
- package/dist/commonjs/information-highlight/lib/hooks/useInformationHighlightModel.js +0 -18
- package/dist/commonjs/information-highlight/lib/parts/Body.d.ts +0 -2
- package/dist/commonjs/information-highlight/lib/parts/Body.d.ts.map +0 -1
- package/dist/commonjs/information-highlight/lib/parts/Body.js +0 -17
- package/dist/commonjs/information-highlight/lib/parts/Heading.d.ts +0 -6
- package/dist/commonjs/information-highlight/lib/parts/Heading.d.ts.map +0 -1
- package/dist/commonjs/information-highlight/lib/parts/Heading.js +0 -17
- package/dist/commonjs/information-highlight/lib/parts/Icon.d.ts +0 -12
- package/dist/commonjs/information-highlight/lib/parts/Icon.d.ts.map +0 -1
- package/dist/commonjs/information-highlight/lib/parts/Icon.js +0 -19
- package/dist/commonjs/information-highlight/lib/parts/Link.d.ts +0 -2
- package/dist/commonjs/information-highlight/lib/parts/Link.d.ts.map +0 -1
- package/dist/commonjs/information-highlight/lib/parts/Link.js +0 -17
- package/dist/commonjs/pill/index.d.ts +0 -8
- package/dist/commonjs/pill/index.d.ts.map +0 -1
- package/dist/commonjs/pill/index.js +0 -23
- package/dist/commonjs/pill/lib/Pill.d.ts +0 -265
- package/dist/commonjs/pill/lib/Pill.d.ts.map +0 -1
- package/dist/commonjs/pill/lib/Pill.js +0 -147
- package/dist/commonjs/pill/lib/PillAvatar.d.ts +0 -526
- package/dist/commonjs/pill/lib/PillAvatar.d.ts.map +0 -1
- package/dist/commonjs/pill/lib/PillAvatar.js +0 -22
- package/dist/commonjs/pill/lib/PillCount.d.ts +0 -12
- package/dist/commonjs/pill/lib/PillCount.d.ts.map +0 -1
- package/dist/commonjs/pill/lib/PillCount.js +0 -21
- package/dist/commonjs/pill/lib/PillIcon.d.ts +0 -54
- package/dist/commonjs/pill/lib/PillIcon.d.ts.map +0 -1
- package/dist/commonjs/pill/lib/PillIcon.js +0 -20
- package/dist/commonjs/pill/lib/PillIconButton.d.ts +0 -148
- package/dist/commonjs/pill/lib/PillIconButton.d.ts.map +0 -1
- package/dist/commonjs/pill/lib/PillIconButton.js +0 -21
- package/dist/commonjs/pill/lib/PillLabel.d.ts +0 -14
- package/dist/commonjs/pill/lib/PillLabel.d.ts.map +0 -1
- package/dist/commonjs/pill/lib/PillLabel.js +0 -17
- package/dist/commonjs/pill/lib/usePillModel.d.ts +0 -46
- package/dist/commonjs/pill/lib/usePillModel.d.ts.map +0 -1
- package/dist/commonjs/pill/lib/usePillModel.js +0 -24
- package/dist/commonjs/segmented-control/index.d.ts +0 -5
- package/dist/commonjs/segmented-control/index.d.ts.map +0 -1
- package/dist/commonjs/segmented-control/index.js +0 -20
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +0 -1324
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +0 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControl.js +0 -54
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts +0 -256
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts.map +0 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +0 -114
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts +0 -153
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts.map +0 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +0 -34
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +0 -140
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +0 -1
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.js +0 -21
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +0 -1336
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +0 -1
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.js +0 -75
- package/dist/commonjs/select/index.d.ts +0 -3
- package/dist/commonjs/select/index.d.ts.map +0 -1
- package/dist/commonjs/select/index.js +0 -17
- package/dist/commonjs/select/lib/Select.d.ts +0 -31
- package/dist/commonjs/select/lib/Select.d.ts.map +0 -1
- package/dist/commonjs/select/lib/Select.js +0 -486
- package/dist/commonjs/select/lib/SelectBase.d.ts +0 -165
- package/dist/commonjs/select/lib/SelectBase.d.ts.map +0 -1
- package/dist/commonjs/select/lib/SelectBase.js +0 -235
- package/dist/commonjs/select/lib/SelectMenu.d.ts +0 -45
- package/dist/commonjs/select/lib/SelectMenu.d.ts.map +0 -1
- package/dist/commonjs/select/lib/SelectMenu.js +0 -195
- package/dist/commonjs/select/lib/SelectOption.d.ts +0 -38
- package/dist/commonjs/select/lib/SelectOption.d.ts.map +0 -1
- package/dist/commonjs/select/lib/SelectOption.js +0 -73
- package/dist/commonjs/select/lib/scrolling.d.ts +0 -5
- package/dist/commonjs/select/lib/scrolling.d.ts.map +0 -1
- package/dist/commonjs/select/lib/scrolling.js +0 -36
- package/dist/commonjs/select/lib/types.d.ts +0 -37
- package/dist/commonjs/select/lib/types.d.ts.map +0 -1
- package/dist/commonjs/select/lib/types.js +0 -2
- package/dist/commonjs/select/lib/utils.d.ts +0 -10
- package/dist/commonjs/select/lib/utils.d.ts.map +0 -1
- package/dist/commonjs/select/lib/utils.js +0 -27
- package/dist/es6/avatar/index.d.ts +0 -6
- package/dist/es6/avatar/index.d.ts.map +0 -1
- package/dist/es6/avatar/index.js +0 -5
- package/dist/es6/avatar/lib/Avatar.d.ts +0 -281
- package/dist/es6/avatar/lib/Avatar.d.ts.map +0 -1
- package/dist/es6/avatar/lib/Avatar.js +0 -47
- package/dist/es6/avatar/lib/AvatarImage.d.ts +0 -6
- package/dist/es6/avatar/lib/AvatarImage.d.ts.map +0 -1
- package/dist/es6/avatar/lib/AvatarImage.js +0 -12
- package/dist/es6/avatar/lib/AvatarName.d.ts +0 -14
- package/dist/es6/avatar/lib/AvatarName.d.ts.map +0 -1
- package/dist/es6/avatar/lib/AvatarName.js +0 -13
- package/dist/es6/avatar/lib/BaseAvatar.d.ts +0 -148
- package/dist/es6/avatar/lib/BaseAvatar.d.ts.map +0 -1
- package/dist/es6/avatar/lib/BaseAvatar.js +0 -44
- package/dist/es6/avatar/lib/getInitialsFromName.d.ts +0 -2
- package/dist/es6/avatar/lib/getInitialsFromName.d.ts.map +0 -1
- package/dist/es6/avatar/lib/getInitialsFromName.js +0 -9
- package/dist/es6/information-highlight/index.d.ts +0 -6
- package/dist/es6/information-highlight/index.d.ts.map +0 -1
- package/dist/es6/information-highlight/index.js +0 -5
- package/dist/es6/information-highlight/lib/InformationHighlight.d.ts +0 -76
- package/dist/es6/information-highlight/lib/InformationHighlight.d.ts.map +0 -1
- package/dist/es6/information-highlight/lib/InformationHighlight.js +0 -39
- package/dist/es6/information-highlight/lib/hooks/useInformationHighlightModel.d.ts +0 -23
- package/dist/es6/information-highlight/lib/hooks/useInformationHighlightModel.d.ts.map +0 -1
- package/dist/es6/information-highlight/lib/hooks/useInformationHighlightModel.js +0 -15
- package/dist/es6/information-highlight/lib/parts/Body.d.ts +0 -2
- package/dist/es6/information-highlight/lib/parts/Body.d.ts.map +0 -1
- package/dist/es6/information-highlight/lib/parts/Body.js +0 -14
- package/dist/es6/information-highlight/lib/parts/Heading.d.ts +0 -6
- package/dist/es6/information-highlight/lib/parts/Heading.d.ts.map +0 -1
- package/dist/es6/information-highlight/lib/parts/Heading.js +0 -14
- package/dist/es6/information-highlight/lib/parts/Icon.d.ts +0 -12
- package/dist/es6/information-highlight/lib/parts/Icon.d.ts.map +0 -1
- package/dist/es6/information-highlight/lib/parts/Icon.js +0 -16
- package/dist/es6/information-highlight/lib/parts/Link.d.ts +0 -2
- package/dist/es6/information-highlight/lib/parts/Link.d.ts.map +0 -1
- package/dist/es6/information-highlight/lib/parts/Link.js +0 -14
- package/dist/es6/pill/index.d.ts +0 -8
- package/dist/es6/pill/index.d.ts.map +0 -1
- package/dist/es6/pill/index.js +0 -7
- package/dist/es6/pill/lib/Pill.d.ts +0 -265
- package/dist/es6/pill/lib/Pill.d.ts.map +0 -1
- package/dist/es6/pill/lib/Pill.js +0 -144
- package/dist/es6/pill/lib/PillAvatar.d.ts +0 -526
- package/dist/es6/pill/lib/PillAvatar.d.ts.map +0 -1
- package/dist/es6/pill/lib/PillAvatar.js +0 -19
- package/dist/es6/pill/lib/PillCount.d.ts +0 -12
- package/dist/es6/pill/lib/PillCount.d.ts.map +0 -1
- package/dist/es6/pill/lib/PillCount.js +0 -18
- package/dist/es6/pill/lib/PillIcon.d.ts +0 -54
- package/dist/es6/pill/lib/PillIcon.d.ts.map +0 -1
- package/dist/es6/pill/lib/PillIcon.js +0 -17
- package/dist/es6/pill/lib/PillIconButton.d.ts +0 -148
- package/dist/es6/pill/lib/PillIconButton.d.ts.map +0 -1
- package/dist/es6/pill/lib/PillIconButton.js +0 -18
- package/dist/es6/pill/lib/PillLabel.d.ts +0 -14
- package/dist/es6/pill/lib/PillLabel.d.ts.map +0 -1
- package/dist/es6/pill/lib/PillLabel.js +0 -14
- package/dist/es6/pill/lib/usePillModel.d.ts +0 -46
- package/dist/es6/pill/lib/usePillModel.d.ts.map +0 -1
- package/dist/es6/pill/lib/usePillModel.js +0 -21
- package/dist/es6/segmented-control/index.d.ts +0 -5
- package/dist/es6/segmented-control/index.d.ts.map +0 -1
- package/dist/es6/segmented-control/index.js +0 -4
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +0 -1324
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +0 -1
- package/dist/es6/segmented-control/lib/SegmentedControl.js +0 -51
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts +0 -256
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts.map +0 -1
- package/dist/es6/segmented-control/lib/SegmentedControlItem.js +0 -88
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts +0 -153
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts.map +0 -1
- package/dist/es6/segmented-control/lib/SegmentedControlList.js +0 -31
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +0 -140
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +0 -1
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.js +0 -18
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +0 -1336
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +0 -1
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.js +0 -69
- package/dist/es6/select/index.d.ts +0 -3
- package/dist/es6/select/index.d.ts.map +0 -1
- package/dist/es6/select/index.js +0 -1
- package/dist/es6/select/lib/Select.d.ts +0 -31
- package/dist/es6/select/lib/Select.d.ts.map +0 -1
- package/dist/es6/select/lib/Select.js +0 -460
- package/dist/es6/select/lib/SelectBase.d.ts +0 -165
- package/dist/es6/select/lib/SelectBase.d.ts.map +0 -1
- package/dist/es6/select/lib/SelectBase.js +0 -208
- package/dist/es6/select/lib/SelectMenu.d.ts +0 -45
- package/dist/es6/select/lib/SelectMenu.d.ts.map +0 -1
- package/dist/es6/select/lib/SelectMenu.js +0 -191
- package/dist/es6/select/lib/SelectOption.d.ts +0 -38
- package/dist/es6/select/lib/SelectOption.d.ts.map +0 -1
- package/dist/es6/select/lib/SelectOption.js +0 -69
- package/dist/es6/select/lib/scrolling.d.ts +0 -5
- package/dist/es6/select/lib/scrolling.d.ts.map +0 -1
- package/dist/es6/select/lib/scrolling.js +0 -32
- package/dist/es6/select/lib/types.d.ts +0 -37
- package/dist/es6/select/lib/types.d.ts.map +0 -1
- package/dist/es6/select/lib/types.js +0 -1
- package/dist/es6/select/lib/utils.d.ts +0 -10
- package/dist/es6/select/lib/utils.d.ts.map +0 -1
- package/dist/es6/select/lib/utils.js +0 -22
- package/information-highlight/index.ts +0 -5
- package/information-highlight/lib/InformationHighlight.tsx +0 -107
- package/information-highlight/lib/hooks/useInformationHighlightModel.ts +0 -16
- package/information-highlight/lib/parts/Body.tsx +0 -28
- package/information-highlight/lib/parts/Heading.tsx +0 -34
- package/information-highlight/lib/parts/Icon.tsx +0 -29
- package/information-highlight/lib/parts/Link.tsx +0 -29
- package/information-highlight/package.json +0 -6
- package/pill/index.ts +0 -7
- package/pill/lib/Pill.tsx +0 -285
- package/pill/lib/PillAvatar.tsx +0 -35
- package/pill/lib/PillCount.tsx +0 -44
- package/pill/lib/PillIcon.tsx +0 -32
- package/pill/lib/PillIconButton.tsx +0 -86
- package/pill/lib/PillLabel.tsx +0 -32
- package/pill/lib/usePillModel.tsx +0 -23
- package/pill/package.json +0 -6
- package/segmented-control/index.ts +0 -4
- package/segmented-control/lib/SegmentedControl.tsx +0 -57
- package/segmented-control/lib/SegmentedControlItem.tsx +0 -230
- package/segmented-control/lib/SegmentedControlList.tsx +0 -64
- package/segmented-control/lib/hooks/useSegmentedControlItem.tsx +0 -33
- package/segmented-control/lib/hooks/useSegmentedControlModel.tsx +0 -75
- package/segmented-control/package.json +0 -6
- package/select/index.ts +0 -8
- package/select/lib/Select.tsx +0 -595
- package/select/lib/SelectBase.tsx +0 -493
- package/select/lib/SelectMenu.tsx +0 -304
- package/select/lib/SelectOption.tsx +0 -133
- package/select/lib/scrolling.ts +0 -42
- package/select/lib/types.ts +0 -37
- package/select/lib/utils.ts +0 -30
- package/select/package.json +0 -6
|
@@ -1,51 +1,39 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
StyledType,
|
|
5
|
-
focusRing,
|
|
6
|
-
createComponent,
|
|
7
|
-
ExtractProps,
|
|
8
|
-
} from '@workday/canvas-kit-react/common';
|
|
9
|
-
|
|
3
|
+
import {ExtractProps, StyledType, createComponent} from '@workday/canvas-kit-react/common';
|
|
10
4
|
import {Box, Flex, mergeStyles} from '@workday/canvas-kit-react/layout';
|
|
11
|
-
import {CSProps,
|
|
12
|
-
import {
|
|
5
|
+
import {CSProps, createStencil, handleCsProp, px2rem} from '@workday/canvas-kit-styling';
|
|
6
|
+
import {base, system} from '@workday/canvas-tokens-web';
|
|
13
7
|
|
|
14
8
|
import {RadioLabelContext} from './RadioLabel';
|
|
15
9
|
|
|
16
|
-
const radioWidth = 18;
|
|
17
|
-
const radioHeight = 18;
|
|
18
|
-
|
|
19
10
|
export interface StyledRadioButtonProps extends CSProps {
|
|
20
11
|
variant?: 'inverse' | undefined;
|
|
21
12
|
}
|
|
22
13
|
|
|
23
|
-
const radioInputStencil = createStencil({
|
|
14
|
+
export const radioInputStencil = createStencil({
|
|
15
|
+
parts: {
|
|
16
|
+
check: 'cnvs-radio-check',
|
|
17
|
+
},
|
|
24
18
|
base: {
|
|
25
19
|
cursor: 'pointer',
|
|
26
|
-
height:
|
|
27
|
-
width:
|
|
28
|
-
borderRadius: system.shape.
|
|
20
|
+
height: base.legacy.size225,
|
|
21
|
+
width: base.legacy.size225,
|
|
22
|
+
borderRadius: system.legacy.shape.full,
|
|
29
23
|
position: 'absolute',
|
|
30
|
-
margin:
|
|
24
|
+
margin: 0,
|
|
31
25
|
'&:focus-visible, &.focus, &:active': {
|
|
32
26
|
outline: 'transparent',
|
|
33
27
|
},
|
|
34
28
|
'&:disabled, &.disabled': {
|
|
35
29
|
cursor: 'auto',
|
|
36
|
-
|
|
37
|
-
borderColor: system.color.border.input.disabled,
|
|
38
|
-
backgroundColor: system.color.bg.alt.softer,
|
|
39
|
-
},
|
|
40
|
-
'&:hover + .cnvs-radio-check, &.hover + .cnvs-radio-check': {
|
|
41
|
-
borderColor: system.color.border.input.disabled,
|
|
42
|
-
},
|
|
30
|
+
opacity: system.opacity.disabled,
|
|
43
31
|
// This creates the inner circle when the Radio is checked.
|
|
44
32
|
// The backgroundColor represents the dot in the middle of the radio.
|
|
45
33
|
// The borderColor represents the border around the middle dot of the radio.
|
|
46
34
|
'&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check': {
|
|
47
|
-
backgroundColor:
|
|
48
|
-
border: `${px2rem(5)} solid ${brand.primary
|
|
35
|
+
backgroundColor: system.legacy.color.surface.default, // inner circle background color
|
|
36
|
+
border: `${px2rem(5)} solid ${system.legacy.color.brand.accent.primary}`, // inner circle border color
|
|
49
37
|
},
|
|
50
38
|
},
|
|
51
39
|
|
|
@@ -55,11 +43,11 @@ const radioInputStencil = createStencil({
|
|
|
55
43
|
flexDirection: 'column',
|
|
56
44
|
alignItems: 'center',
|
|
57
45
|
backgroundColor: system.color.bg.default,
|
|
58
|
-
borderRadius: system.shape.round,
|
|
59
46
|
boxSizing: 'border-box',
|
|
60
47
|
border: `${px2rem(1)} solid ${system.color.border.input.default}`,
|
|
61
|
-
height:
|
|
62
|
-
width:
|
|
48
|
+
height: base.legacy.size225,
|
|
49
|
+
width: base.legacy.size225,
|
|
50
|
+
borderRadius: system.legacy.shape.full,
|
|
63
51
|
justifyContent: 'center',
|
|
64
52
|
pointerEvents: 'none',
|
|
65
53
|
position: 'absolute',
|
|
@@ -68,97 +56,72 @@ const radioInputStencil = createStencil({
|
|
|
68
56
|
},
|
|
69
57
|
|
|
70
58
|
'&:hover + .cnvs-radio-check, &.hover + .cnvs-radio-check': {
|
|
71
|
-
borderColor: system.color.border.input.
|
|
59
|
+
borderColor: system.color.border.input.default,
|
|
72
60
|
},
|
|
73
61
|
|
|
74
62
|
'&:focus-visible + .cnvs-radio-check, &.focus + .cnvs-radio-check': {
|
|
75
|
-
borderColor: system.color.border.primary.default,
|
|
76
|
-
...focusRing({
|
|
77
|
-
width: 1,
|
|
78
|
-
separation: 0,
|
|
79
|
-
animate: false,
|
|
80
|
-
innerColor: system.color.border.inverse,
|
|
81
|
-
outerColor: brand.common.focusOutline,
|
|
82
|
-
}),
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
'&:focus-visible:hover + .cnvs-radio-check, &.focus:hover + .cnvs-radio-check': {
|
|
86
63
|
outline: 'transparent',
|
|
64
|
+
borderColor: system.legacy.color.brand.border.primary,
|
|
65
|
+
boxShadow: `0 0 0 0px ${system.legacy.color.focus.inverse} ,0 0 0 1px ${system.legacy.color.brand.focus.primary} `,
|
|
87
66
|
},
|
|
88
67
|
// This creates the inner circle when the Radio is checked.
|
|
89
68
|
// The backgroundColor represents the dot in the middle of the radio.
|
|
90
69
|
// The borderColor represents the border around the middle dot of the radio.
|
|
91
70
|
'&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check': {
|
|
92
|
-
backgroundColor:
|
|
93
|
-
border: `${px2rem(5)} solid ${brand.primary
|
|
71
|
+
backgroundColor: system.legacy.color.surface.default, // inner circle background color
|
|
72
|
+
border: `${px2rem(5)} solid ${system.legacy.color.brand.accent.primary}`, // inner circle border color
|
|
94
73
|
},
|
|
95
74
|
|
|
96
75
|
'&:focus-visible:checked + .cnvs-radio-check, &:focus-visible:hover:checked + .cnvs-radio-check, &.focus:checked + .cnvs-radio-check, &.focus:hover:checked + .cnvs-radio-check':
|
|
97
76
|
{
|
|
98
77
|
outline: 'transparent',
|
|
99
|
-
|
|
100
|
-
width: 2,
|
|
101
|
-
separation: 2,
|
|
102
|
-
animate: false,
|
|
103
|
-
innerColor: system.color.border.inverse,
|
|
104
|
-
outerColor: brand.common.focusOutline,
|
|
105
|
-
}),
|
|
78
|
+
boxShadow: `0 0 0 ${px2rem(2)} ${system.legacy.color.focus.inverse} ,0 0 0 ${px2rem(4)} ${system.legacy.color.brand.focus.primary} `,
|
|
106
79
|
},
|
|
107
80
|
},
|
|
108
81
|
modifiers: {
|
|
109
82
|
variant: {
|
|
110
|
-
inverse: {
|
|
111
|
-
|
|
112
|
-
backgroundColor: system.color.
|
|
113
|
-
borderColor: system.color.border.
|
|
83
|
+
inverse: ({checkPart}) => ({
|
|
84
|
+
[`+ ${checkPart}`]: {
|
|
85
|
+
backgroundColor: system.legacy.color.surface.inverse,
|
|
86
|
+
borderColor: system.legacy.color.border.inverse.default,
|
|
114
87
|
},
|
|
115
88
|
'&:disabled, &.disabled': {
|
|
116
89
|
opacity: system.opacity.disabled,
|
|
117
|
-
|
|
118
|
-
backgroundColor: system.color.
|
|
119
|
-
borderColor: system.color.
|
|
120
|
-
opacity: system.opacity.disabled,
|
|
90
|
+
[`+ ${checkPart}`]: {
|
|
91
|
+
backgroundColor: system.legacy.color.surface.inverse,
|
|
92
|
+
borderColor: system.legacy.color.focus.inverse,
|
|
93
|
+
// opacity: system.opacity.disabled,
|
|
121
94
|
},
|
|
122
95
|
// This creates the inner circle when the Radio is checked.
|
|
123
96
|
// The backgroundColor represents the dot in the middle of the radio.
|
|
124
97
|
// The borderColor represents the border around the middle dot of the radio.
|
|
125
|
-
|
|
126
|
-
backgroundColor: brand.primary
|
|
127
|
-
borderColor: system.color.border.inverse, // inner circle border color
|
|
98
|
+
[`&:checked + ${checkPart}, &.checked + ${checkPart}`]: {
|
|
99
|
+
backgroundColor: system.legacy.color.brand.accent.primary, // inner circle background color
|
|
100
|
+
borderColor: system.legacy.color.border.inverse.default, // inner circle border color
|
|
128
101
|
},
|
|
129
102
|
},
|
|
130
|
-
|
|
131
|
-
borderColor: system.color.border.
|
|
103
|
+
[`&:hover + ${checkPart}, &.hover + ${checkPart}`]: {
|
|
104
|
+
borderColor: system.legacy.color.border.inverse.default,
|
|
132
105
|
},
|
|
133
|
-
|
|
134
|
-
borderColor: system.color.border.
|
|
106
|
+
[`&:focus-visible + ${checkPart}, &.focus + ${checkPart}`]: {
|
|
107
|
+
borderColor: system.legacy.color.border.inverse.default,
|
|
135
108
|
},
|
|
136
109
|
// This creates the inner circle when the Radio is checked.
|
|
137
110
|
// The backgroundColor represents the dot in the middle of the radio.
|
|
138
111
|
// The borderColor represents the border around the middle dot of the radio.
|
|
139
|
-
|
|
140
|
-
backgroundColor: brand.primary
|
|
141
|
-
borderColor: system.color.border.inverse, // inner circle border color
|
|
112
|
+
[`&:checked + ${checkPart}, &.checked + ${checkPart}`]: {
|
|
113
|
+
backgroundColor: system.legacy.color.brand.accent.primary, // inner circle background color
|
|
114
|
+
borderColor: system.legacy.color.border.inverse.default, // inner circle border color
|
|
142
115
|
},
|
|
143
|
-
|
|
116
|
+
[`&:focus-visible + ${checkPart}, &:focus-visible:hover + ${checkPart}, &.focus + ${checkPart}, &.focus:hover + ${checkPart}`]:
|
|
144
117
|
{
|
|
145
|
-
|
|
146
|
-
width: 2,
|
|
147
|
-
separation: 0,
|
|
148
|
-
innerColor: system.color.border.contrast.default,
|
|
149
|
-
outerColor: system.color.border.inverse,
|
|
150
|
-
}),
|
|
118
|
+
boxShadow: `0 0 0 ${px2rem(2)} ${system.legacy.color.brand.border.primary}`,
|
|
151
119
|
},
|
|
152
|
-
|
|
120
|
+
[`&:focus-visible:checked + ${checkPart}, &:focus-visible:hover:checked + ${checkPart}, &.focus:checked + ${checkPart}, &.focus:hover:checked + ${checkPart}`]:
|
|
153
121
|
{
|
|
154
|
-
|
|
155
|
-
width: 2,
|
|
156
|
-
separation: 2,
|
|
157
|
-
innerColor: system.color.border.contrast.default,
|
|
158
|
-
outerColor: system.color.border.inverse,
|
|
159
|
-
}),
|
|
122
|
+
boxShadow: `0 0 0 ${px2rem(2)} ${system.color.border.contrast.default} ,0 0 0 ${px2rem(4)} ${system.legacy.color.focus.inverse} `,
|
|
160
123
|
},
|
|
161
|
-
},
|
|
124
|
+
}),
|
|
162
125
|
},
|
|
163
126
|
},
|
|
164
127
|
});
|
|
@@ -170,36 +133,37 @@ const StyledRadioInput = createComponent('input')<StyledRadioButtonProps & Style
|
|
|
170
133
|
},
|
|
171
134
|
});
|
|
172
135
|
|
|
173
|
-
const
|
|
136
|
+
export const radioInputWrapperStencil = createStencil({
|
|
174
137
|
base: {
|
|
175
|
-
height:
|
|
176
|
-
width:
|
|
138
|
+
height: base.legacy.size225,
|
|
139
|
+
width: base.legacy.size225,
|
|
177
140
|
flex: '0 0 auto',
|
|
178
141
|
// Hover Ripple element
|
|
179
142
|
'::before': {
|
|
180
143
|
content: "''",
|
|
181
144
|
position: 'absolute',
|
|
182
|
-
borderRadius: system.shape.
|
|
183
|
-
height:
|
|
145
|
+
borderRadius: system.legacy.shape.full,
|
|
146
|
+
height: base.legacy.size225,
|
|
184
147
|
transition: 'box-shadow 150ms ease-out',
|
|
185
|
-
width:
|
|
148
|
+
width: base.legacy.size225,
|
|
186
149
|
pointerEvents: 'none',
|
|
187
150
|
opacity: system.opacity.full,
|
|
188
151
|
},
|
|
189
152
|
'&:hover:before, &.hover:before': {
|
|
190
|
-
boxShadow: `0 0 0 ${
|
|
153
|
+
boxShadow: `0 0 0 ${px2rem(7)} ${system.legacy.color.surface.overlay.hover.default}`,
|
|
191
154
|
},
|
|
192
155
|
},
|
|
193
156
|
modifiers: {
|
|
194
157
|
variant: {
|
|
195
158
|
inverse: {
|
|
196
|
-
'
|
|
197
|
-
|
|
159
|
+
'&:hover:before, &.hover:before': {
|
|
160
|
+
boxShadow: `0 0 0 ${px2rem(7)} ${system.legacy.color.surface.overlay.hover.inverse}`,
|
|
198
161
|
},
|
|
199
162
|
},
|
|
200
163
|
},
|
|
201
164
|
disabled: {
|
|
202
165
|
true: {
|
|
166
|
+
opacity: system.opacity.disabled,
|
|
203
167
|
'&:hover:before, &.hover:before': {
|
|
204
168
|
boxShadow: 'none',
|
|
205
169
|
cursor: 'auto',
|
|
@@ -216,7 +180,10 @@ const RadioInputWrapper = createComponent(Flex)<
|
|
|
216
180
|
Component: ({children, variant, ...elemProps}: StyledRadioButtonProps, ref, Element) => {
|
|
217
181
|
const {disabled} = React.useContext(RadioLabelContext);
|
|
218
182
|
return (
|
|
219
|
-
<Element
|
|
183
|
+
<Element
|
|
184
|
+
ref={ref}
|
|
185
|
+
{...handleCsProp(elemProps, radioInputWrapperStencil({variant, disabled}))}
|
|
186
|
+
>
|
|
220
187
|
{children}
|
|
221
188
|
</Element>
|
|
222
189
|
);
|
|
@@ -249,7 +216,7 @@ export const StyledRadioButton = createComponent('input')({
|
|
|
249
216
|
disabled={disabled}
|
|
250
217
|
{...elemProps}
|
|
251
218
|
/>
|
|
252
|
-
<span className="cnvs-radio-check" />
|
|
219
|
+
<span {...radioInputStencil.parts.check} className="cnvs-radio-check" />
|
|
253
220
|
</RadioInputWrapper>
|
|
254
221
|
);
|
|
255
222
|
},
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
|
|
2
3
|
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
3
4
|
import {createStencil, handleCsProp, px2rem} from '@workday/canvas-kit-styling';
|
|
4
5
|
import {system} from '@workday/canvas-tokens-web';
|
|
5
|
-
|
|
6
|
+
|
|
6
7
|
import {SidePanelToggleButton} from './SidePanelToggleButton';
|
|
8
|
+
import {SidePanelContext} from './hooks';
|
|
7
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated ⚠️ `SidePanelVariant` in Preview has been deprecated and will be removed in a future major version. Please use [`SidePanel` in Labs](https://workday.github.io/canvas-kit/?path=/docs/labs-side-panel--docs) instead.
|
|
12
|
+
*/
|
|
8
13
|
export type SidePanelVariant = 'standard' | 'alternate';
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated ⚠️ `SidePanelTransitionStates` in Preview has been deprecated and will be removed in a future major version. Please use [`SidePanel` in Labs](https://workday.github.io/canvas-kit/?path=/docs/labs-side-panel--docs) instead.
|
|
16
|
+
*/
|
|
9
17
|
export type SidePanelTransitionStates = 'collapsed' | 'collapsing' | 'expanded' | 'expanding';
|
|
10
18
|
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated ⚠️ `SidePanelProps` in Preview has been deprecated and will be removed in a future major version. Please use [`SidePanel` in Labs](https://workday.github.io/canvas-kit/?path=/docs/labs-side-panel--docs) instead.
|
|
21
|
+
*/
|
|
11
22
|
export interface SidePanelProps {
|
|
12
23
|
/**
|
|
13
24
|
* The width of the component (in `px` if it's a `number`) when it is collapsed.
|
|
@@ -62,6 +73,9 @@ export interface SidePanelProps {
|
|
|
62
73
|
onAnimationEnd?: React.TransitionEvent<HTMLElement>;
|
|
63
74
|
}
|
|
64
75
|
|
|
76
|
+
/**
|
|
77
|
+
* @deprecated ⚠️ `panelStencil` in Preview has been deprecated and will be removed in a future major version. Please use [`SidePanel` in Labs](https://workday.github.io/canvas-kit/?path=/docs/labs-side-panel--docs) instead.
|
|
78
|
+
*/
|
|
65
79
|
export const panelStencil = createStencil({
|
|
66
80
|
vars: {
|
|
67
81
|
expandedWidth: '',
|
|
@@ -81,7 +95,7 @@ export const panelStencil = createStencil({
|
|
|
81
95
|
boxShadow: system.depth[5],
|
|
82
96
|
},
|
|
83
97
|
standard: {
|
|
84
|
-
backgroundColor: system.color.
|
|
98
|
+
backgroundColor: system.legacy.color.surface.default,
|
|
85
99
|
},
|
|
86
100
|
},
|
|
87
101
|
expanded: {
|
|
@@ -103,6 +117,9 @@ export const panelStencil = createStencil({
|
|
|
103
117
|
},
|
|
104
118
|
});
|
|
105
119
|
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated ⚠️ `SidePanel` in Preview has been deprecated and will be removed in a future major version. Please use [`SidePanel` in Labs](https://workday.github.io/canvas-kit/?path=/docs/labs-side-panel--docs) instead.
|
|
122
|
+
*/
|
|
106
123
|
export const SidePanel = createComponent('section')({
|
|
107
124
|
displayName: 'SidePanel',
|
|
108
125
|
Component(
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import {TertiaryButton} from '@workday/canvas-kit-react/button';
|
|
4
|
-
import {
|
|
4
|
+
import {ExtractProps, createComponent} from '@workday/canvas-kit-react/common';
|
|
5
5
|
import {Tooltip} from '@workday/canvas-kit-react/tooltip';
|
|
6
|
-
import {SidePanelContext} from './hooks';
|
|
7
6
|
import {createStencil, handleCsProp} from '@workday/canvas-kit-styling';
|
|
7
|
+
import {extendIcon} from '@workday/canvas-system-icons-web';
|
|
8
8
|
import {system} from '@workday/canvas-tokens-web';
|
|
9
|
+
|
|
9
10
|
import {SidePanelTransitionStates} from './SidePanel';
|
|
11
|
+
import {SidePanelContext} from './hooks';
|
|
10
12
|
|
|
11
13
|
export interface SidePanelToggleButtonProps extends ExtractProps<typeof TertiaryButton, never> {
|
|
12
14
|
/**
|
|
@@ -22,9 +24,9 @@ export interface SidePanelToggleButtonProps extends ExtractProps<typeof Tertiary
|
|
|
22
24
|
export const sidePanelToggleButtonStencil = createStencil({
|
|
23
25
|
base: {
|
|
24
26
|
position: 'absolute',
|
|
25
|
-
top: system.
|
|
26
|
-
width: system.
|
|
27
|
-
insetInlineEnd: system.
|
|
27
|
+
top: system.legacy.gap.lg,
|
|
28
|
+
width: system.legacy.size.sm,
|
|
29
|
+
insetInlineEnd: system.legacy.gap.md,
|
|
28
30
|
},
|
|
29
31
|
modifiers: {
|
|
30
32
|
state: {
|
|
@@ -76,21 +78,21 @@ export const sidePanelToggleButtonStencil = createStencil({
|
|
|
76
78
|
modifiers: {state: 'collapsing', origin: 'right'},
|
|
77
79
|
styles: {
|
|
78
80
|
transform: `scaleX(-1)`,
|
|
79
|
-
insetInlineStart: system.
|
|
81
|
+
insetInlineStart: system.legacy.gap.md,
|
|
80
82
|
},
|
|
81
83
|
},
|
|
82
84
|
{
|
|
83
85
|
modifiers: {state: 'expanded', origin: 'right'},
|
|
84
86
|
styles: {
|
|
85
87
|
transform: `scaleX(1)`,
|
|
86
|
-
insetInlineStart: system.
|
|
88
|
+
insetInlineStart: system.legacy.gap.md,
|
|
87
89
|
},
|
|
88
90
|
},
|
|
89
91
|
{
|
|
90
92
|
modifiers: {state: 'expanding', origin: 'right'},
|
|
91
93
|
styles: {
|
|
92
94
|
transform: `scaleX(1)`,
|
|
93
|
-
insetInlineStart: system.
|
|
95
|
+
insetInlineStart: system.legacy.gap.md,
|
|
94
96
|
},
|
|
95
97
|
},
|
|
96
98
|
],
|
|
@@ -103,7 +105,7 @@ export const SidePanelToggleButton = createComponent('button')({
|
|
|
103
105
|
displayName: 'SidePanel.ToggleButton',
|
|
104
106
|
Component({
|
|
105
107
|
variant = undefined,
|
|
106
|
-
icon =
|
|
108
|
+
icon = extendIcon,
|
|
107
109
|
tooltipTextExpand = 'Expand',
|
|
108
110
|
tooltipTextCollapse = 'Collapse',
|
|
109
111
|
...elemProps
|
package/side-panel/lib/hooks.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
+
import {useUniqueId} from '@workday/canvas-kit-react/common';
|
|
4
|
+
|
|
3
5
|
export const SidePanelContext = React.createContext({
|
|
4
6
|
state: 'expanded',
|
|
5
7
|
origin: 'left' as 'left' | 'right',
|
|
6
8
|
handleAnimationStart: () => undefined,
|
|
7
9
|
});
|
|
8
10
|
|
|
9
|
-
import {useUniqueId} from '@workday/canvas-kit-react/common';
|
|
10
11
|
/**
|
|
11
12
|
* The optional config options for the `useSidePanel` hook
|
|
13
|
+
* @deprecated ⚠️ `UseSidePanelProps` in Preview has been deprecated and will be removed in a future major version. Please use [`SidePanel` in Labs](https://workday.github.io/canvas-kit/?path=/docs/labs-side-panel--docs) instead.
|
|
12
14
|
*/
|
|
13
15
|
export interface UseSidePanelProps {
|
|
14
16
|
/**
|
|
@@ -30,6 +32,7 @@ export interface UseSidePanelProps {
|
|
|
30
32
|
|
|
31
33
|
/**
|
|
32
34
|
* The `panelProps` provided by the `useSidePanel` hook
|
|
35
|
+
* @deprecated ⚠️ `PanelProps` in Preview has been deprecated and will be removed in a future major version. Please use [`SidePanel` in Labs](https://workday.github.io/canvas-kit/?path=/docs/labs-side-panel--docs) instead.
|
|
33
36
|
*/
|
|
34
37
|
export interface PanelProps {
|
|
35
38
|
/**
|
|
@@ -53,6 +56,9 @@ export interface PanelProps {
|
|
|
53
56
|
touched: boolean;
|
|
54
57
|
}
|
|
55
58
|
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated ⚠️ `LabelProps` in Preview has been deprecated and will be removed in a future major version. Please use [`SidePanel` in Labs](https://workday.github.io/canvas-kit/?path=/docs/labs-side-panel--docs) instead.
|
|
61
|
+
*/
|
|
56
62
|
export interface LabelProps {
|
|
57
63
|
/**
|
|
58
64
|
* the accessible `id`
|
|
@@ -61,6 +67,9 @@ export interface LabelProps {
|
|
|
61
67
|
id: string;
|
|
62
68
|
}
|
|
63
69
|
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated ⚠️ `ControlProps` in Preview has been deprecated and will be removed in a future major version. Please use [`SidePanel` in Labs](https://workday.github.io/canvas-kit/?path=/docs/labs-side-panel--docs) instead.
|
|
72
|
+
*/
|
|
64
73
|
export interface ControlProps {
|
|
65
74
|
/**
|
|
66
75
|
* the accessible `id` that connects the panel to this control
|
|
@@ -97,6 +106,7 @@ export interface ControlProps {
|
|
|
97
106
|
* labelId: 'custom-label-id',
|
|
98
107
|
* });
|
|
99
108
|
* ```
|
|
109
|
+
* @deprecated ⚠️ `useSidePanel` in Preview has been deprecated and will be removed in a future major version. Please use [`SidePanel` in Labs](https://workday.github.io/canvas-kit/?path=/docs/labs-side-panel--docs) instead.
|
|
100
110
|
*/
|
|
101
111
|
export const useSidePanel = (config?: UseSidePanelProps) => {
|
|
102
112
|
const [touched, setTouched] = React.useState(false);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import {ExtractProps, createComponent} from '@workday/canvas-kit-react/common';
|
|
4
|
+
import {systemIconStencil} from '@workday/canvas-kit-react/icon';
|
|
5
|
+
import {Flex, mergeStyles} from '@workday/canvas-kit-react/layout';
|
|
4
6
|
import {ExtractStencilProps, createStencil, px2rem} from '@workday/canvas-kit-styling';
|
|
5
7
|
import {system} from '@workday/canvas-tokens-web';
|
|
6
|
-
|
|
7
|
-
import {systemIconStencil} from '@workday/canvas-kit-react/icon';
|
|
8
|
+
|
|
8
9
|
import {StatusIndicatorIcon} from './StatusIndicatorIcon';
|
|
9
10
|
import {StatusIndicatorLabel} from './StatusIndicatorLabel';
|
|
10
11
|
|
|
@@ -18,7 +19,6 @@ export type StatusIndicatorVariant =
|
|
|
18
19
|
| 'caution'
|
|
19
20
|
| 'positive'
|
|
20
21
|
| 'critical'
|
|
21
|
-
| 'ai'
|
|
22
22
|
| 'transparent'
|
|
23
23
|
| 'blue'
|
|
24
24
|
| 'green'
|
|
@@ -60,12 +60,12 @@ const deprecatedVariantsMap = {
|
|
|
60
60
|
const statusIndicatorStencil = createStencil({
|
|
61
61
|
base: {
|
|
62
62
|
display: 'inline-flex',
|
|
63
|
-
gap: system.
|
|
63
|
+
gap: system.legacy.gap.xs,
|
|
64
64
|
maxWidth: px2rem(200),
|
|
65
65
|
alignItems: 'center',
|
|
66
|
-
borderRadius: system.shape.
|
|
67
|
-
height:
|
|
68
|
-
padding:
|
|
66
|
+
borderRadius: system.legacy.shape.sm,
|
|
67
|
+
height: system.legacy.size.xxs,
|
|
68
|
+
padding: `0 ${system.legacy.padding.xs}`,
|
|
69
69
|
outline: `${px2rem(1)} solid transparent`,
|
|
70
70
|
[systemIconStencil.vars.color]: 'currentColor',
|
|
71
71
|
},
|
|
@@ -84,32 +84,28 @@ const statusIndicatorStencil = createStencil({
|
|
|
84
84
|
*/
|
|
85
85
|
variant: {
|
|
86
86
|
info: {
|
|
87
|
-
color: system.color.fg.info.strong,
|
|
88
|
-
backgroundColor: system.color.
|
|
87
|
+
color: system.legacy.color.fg.info.strong,
|
|
88
|
+
backgroundColor: system.legacy.color.surface.info.strong,
|
|
89
89
|
},
|
|
90
90
|
positive: {
|
|
91
|
-
color: system.color.fg.
|
|
92
|
-
backgroundColor: system.color.
|
|
91
|
+
color: system.legacy.color.fg.success.strong,
|
|
92
|
+
backgroundColor: system.legacy.color.surface.success.strong,
|
|
93
93
|
},
|
|
94
94
|
caution: {
|
|
95
|
-
color: system.color.fg.
|
|
96
|
-
backgroundColor: system.color.
|
|
95
|
+
color: system.legacy.color.fg.warning.strong,
|
|
96
|
+
backgroundColor: system.legacy.color.surface.warning.strong,
|
|
97
97
|
},
|
|
98
98
|
critical: {
|
|
99
|
-
color: system.color.fg.
|
|
100
|
-
backgroundColor: system.color.
|
|
99
|
+
color: system.legacy.color.fg.danger.strong,
|
|
100
|
+
backgroundColor: system.legacy.color.surface.danger.strong,
|
|
101
101
|
},
|
|
102
102
|
neutral: {
|
|
103
103
|
color: system.color.fg.muted.strong,
|
|
104
|
-
backgroundColor: system.color.
|
|
105
|
-
},
|
|
106
|
-
ai: {
|
|
107
|
-
color: system.color.fg.ai,
|
|
108
|
-
backgroundColor: system.color.bg.ai.default,
|
|
104
|
+
backgroundColor: system.legacy.color.surface.alt.strong,
|
|
109
105
|
},
|
|
110
106
|
transparent: {
|
|
111
107
|
color: system.color.fg.inverse,
|
|
112
|
-
backgroundColor: system.color.
|
|
108
|
+
backgroundColor: system.legacy.color.surface.contrast.default,
|
|
113
109
|
},
|
|
114
110
|
},
|
|
115
111
|
/**
|
|
@@ -134,7 +130,7 @@ const statusIndicatorStencil = createStencil({
|
|
|
134
130
|
emphasis: 'high',
|
|
135
131
|
},
|
|
136
132
|
styles: {
|
|
137
|
-
backgroundColor: system.color.
|
|
133
|
+
backgroundColor: system.legacy.color.accent.info,
|
|
138
134
|
color: system.color.fg.inverse,
|
|
139
135
|
},
|
|
140
136
|
},
|
|
@@ -144,7 +140,7 @@ const statusIndicatorStencil = createStencil({
|
|
|
144
140
|
emphasis: 'high',
|
|
145
141
|
},
|
|
146
142
|
styles: {
|
|
147
|
-
backgroundColor: system.color.
|
|
143
|
+
backgroundColor: system.legacy.color.accent.success,
|
|
148
144
|
color: system.color.fg.inverse,
|
|
149
145
|
},
|
|
150
146
|
},
|
|
@@ -154,8 +150,8 @@ const statusIndicatorStencil = createStencil({
|
|
|
154
150
|
emphasis: 'high',
|
|
155
151
|
},
|
|
156
152
|
styles: {
|
|
157
|
-
backgroundColor: system.color.
|
|
158
|
-
color: system.color.fg.
|
|
153
|
+
backgroundColor: system.legacy.color.accent.warning,
|
|
154
|
+
color: system.color.fg.contrast.default,
|
|
159
155
|
},
|
|
160
156
|
},
|
|
161
157
|
{
|
|
@@ -164,7 +160,7 @@ const statusIndicatorStencil = createStencil({
|
|
|
164
160
|
emphasis: 'high',
|
|
165
161
|
},
|
|
166
162
|
styles: {
|
|
167
|
-
backgroundColor: system.color.
|
|
163
|
+
backgroundColor: system.legacy.color.accent.danger,
|
|
168
164
|
color: system.color.fg.inverse,
|
|
169
165
|
},
|
|
170
166
|
},
|
|
@@ -174,7 +170,7 @@ const statusIndicatorStencil = createStencil({
|
|
|
174
170
|
emphasis: 'high',
|
|
175
171
|
},
|
|
176
172
|
styles: {
|
|
177
|
-
backgroundColor: system.color.
|
|
173
|
+
backgroundColor: system.legacy.color.accent.muted.default,
|
|
178
174
|
color: system.color.fg.inverse,
|
|
179
175
|
},
|
|
180
176
|
},
|
|
@@ -6,6 +6,10 @@ export interface StatusIndicatorIconProps extends SystemIconProps {}
|
|
|
6
6
|
export const StatusIndicatorIcon = createComponent('span')({
|
|
7
7
|
displayName: 'StatusIndicatorIcon',
|
|
8
8
|
Component: (elemProps: SystemIconProps, ref, Element) => {
|
|
9
|
+
if (!elemProps.icon?.type) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
|
|
9
13
|
return <SystemIcon as={Element} ref={ref} size={20} role="img" {...elemProps} />;
|
|
10
14
|
},
|
|
11
15
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
2
|
+
import {mergeStyles} from '@workday/canvas-kit-react/layout';
|
|
2
3
|
import {TextProps, textStencil} from '@workday/canvas-kit-react/text';
|
|
3
4
|
import {createStencil} from '@workday/canvas-kit-styling';
|
|
4
|
-
import {mergeStyles} from '@workday/canvas-kit-react/layout';
|
|
5
5
|
import {system} from '@workday/canvas-tokens-web';
|
|
6
6
|
|
|
7
7
|
export interface StatusIndicatorLabelProps extends TextProps {}
|