@workday/canvas-kit-react 7.0.0-alpha.0-next.7 → 7.0.0-alpha.78-next.6
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/badge/README.md +2 -3
- package/banner/lib/BannerIcon.tsx +2 -2
- package/button/README.md +68 -1
- package/button/index.ts +1 -1
- package/button/lib/{parts/ButtonContainer.tsx → BaseButton.tsx} +123 -66
- package/button/lib/DeleteButton.tsx +7 -4
- package/button/lib/PrimaryButton.tsx +86 -109
- package/button/lib/SecondaryButton.tsx +44 -66
- package/button/lib/TertiaryButton.tsx +86 -53
- package/button/lib/ToolbarDropdownButton.tsx +12 -11
- package/button/lib/ToolbarIconButton.tsx +22 -17
- package/button/lib/parts/ButtonLabel.tsx +17 -2
- package/button/lib/parts/ButtonLabelIcon.tsx +30 -54
- package/button/lib/parts/index.tsx +0 -2
- package/button/lib/types.ts +2 -2
- package/common/lib/parts/_brand-assets.ts +5 -5
- package/common/lib/utils/StaticStates.tsx +6 -5
- package/dist/commonjs/banner/lib/BannerIcon.js +2 -2
- package/dist/commonjs/button/index.d.ts +1 -1
- package/dist/commonjs/button/index.d.ts.map +1 -1
- package/dist/commonjs/button/index.js +3 -3
- package/dist/commonjs/button/lib/BaseButton.d.ts +31 -0
- package/dist/commonjs/button/lib/BaseButton.d.ts.map +1 -0
- package/dist/commonjs/button/lib/BaseButton.js +198 -0
- package/dist/commonjs/button/lib/DeleteButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/DeleteButton.js +4 -3
- package/dist/commonjs/button/lib/PrimaryButton.d.ts +4 -76
- package/dist/commonjs/button/lib/PrimaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/PrimaryButton.js +15 -36
- package/dist/commonjs/button/lib/SecondaryButton.d.ts +0 -5
- package/dist/commonjs/button/lib/SecondaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/SecondaryButton.js +16 -38
- package/dist/commonjs/button/lib/TertiaryButton.d.ts +2 -2
- package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/TertiaryButton.js +66 -38
- package/dist/commonjs/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/ToolbarDropdownButton.js +7 -7
- package/dist/commonjs/button/lib/ToolbarIconButton.d.ts +5 -2
- package/dist/commonjs/button/lib/ToolbarIconButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/ToolbarIconButton.js +5 -11
- package/dist/commonjs/button/lib/parts/ButtonLabel.d.ts +4 -4
- package/dist/commonjs/button/lib/parts/ButtonLabel.d.ts.map +1 -1
- package/dist/commonjs/button/lib/parts/ButtonLabel.js +35 -1
- package/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
- package/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts.map +1 -1
- package/dist/commonjs/button/lib/parts/ButtonLabelIcon.js +13 -62
- package/dist/commonjs/button/lib/parts/index.d.ts +0 -2
- package/dist/commonjs/button/lib/parts/index.d.ts.map +1 -1
- package/dist/commonjs/button/lib/parts/index.js +1 -5
- package/dist/commonjs/button/lib/types.d.ts +2 -2
- package/dist/commonjs/button/lib/types.d.ts.map +1 -1
- package/dist/commonjs/common/lib/parts/_brand-assets.d.ts.map +1 -1
- package/dist/commonjs/common/lib/parts/_brand-assets.js +5 -5
- package/dist/commonjs/common/lib/utils/StaticStates.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/StaticStates.js +5 -2
- package/dist/commonjs/icon/lib/AccentIcon.d.ts +3 -5
- package/dist/commonjs/icon/lib/AccentIcon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/AccentIcon.js +8 -24
- package/dist/commonjs/icon/lib/AppletIcon.d.ts +5 -6
- package/dist/commonjs/icon/lib/AppletIcon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/AppletIcon.js +13 -27
- package/dist/commonjs/icon/lib/Graphic.d.ts +3 -5
- package/dist/commonjs/icon/lib/Graphic.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/Graphic.js +8 -24
- package/dist/commonjs/icon/lib/Icon.d.ts +2 -5
- package/dist/commonjs/icon/lib/Icon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/Icon.js +10 -25
- package/dist/commonjs/icon/lib/Svg.d.ts +4 -6
- package/dist/commonjs/icon/lib/Svg.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/Svg.js +11 -27
- package/dist/commonjs/icon/lib/SystemIcon.d.ts +5 -6
- package/dist/commonjs/icon/lib/SystemIcon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/SystemIcon.js +8 -24
- package/dist/commonjs/icon/lib/SystemIconCircle.d.ts +3 -6
- package/dist/commonjs/icon/lib/SystemIconCircle.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/SystemIconCircle.js +7 -25
- package/dist/commonjs/layout/lib/Box.d.ts +17 -0
- package/dist/commonjs/layout/lib/Box.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Box.js +41 -1
- package/dist/commonjs/modal/lib/ModalOverflowOverlay.js +1 -1
- package/dist/commonjs/pagination/lib/Pagination/Controls.d.ts +2 -2
- package/dist/commonjs/pagination/lib/Pagination/Controls.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/Controls.js +4 -4
- package/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts +1 -2
- package/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/PageButton.js +34 -9
- package/dist/commonjs/pagination/lib/Pagination/Pagination.d.ts +5 -5
- package/dist/commonjs/pagination/lib/Pagination/Pagination.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/PopupCloseIcon.d.ts +2 -2
- package/dist/commonjs/popup/lib/PopupCloseIcon.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/PopupCloseIcon.js +5 -6
- package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.js +4 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +9 -7
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControl.js +21 -57
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.js +106 -0
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/SidePanel.js +2 -2
- package/dist/commonjs/tabs/lib/Tabs.d.ts +2 -2
- package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -2
- package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsList.js +1 -1
- package/dist/commonjs/tabs/lib/menu/Menu.d.ts +1 -1
- package/dist/commonjs/tabs/lib/menu/MenuItem.d.ts +1 -2
- package/dist/commonjs/tabs/lib/menu/MenuItem.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/InputIconContainer.d.ts +1 -1
- package/dist/commonjs/text-input/lib/InputIconContainer.d.ts.map +1 -1
- package/dist/commonjs/tooltip/lib/Tooltip.d.ts +1 -1
- package/dist/commonjs/tooltip/lib/useTooltip.d.ts +1 -1
- package/dist/es6/banner/lib/BannerIcon.js +2 -2
- package/dist/es6/button/index.d.ts +1 -1
- package/dist/es6/button/index.d.ts.map +1 -1
- package/dist/es6/button/index.js +1 -1
- package/dist/es6/button/lib/BaseButton.d.ts +31 -0
- package/dist/es6/button/lib/BaseButton.d.ts.map +1 -0
- package/dist/es6/button/lib/BaseButton.js +174 -0
- package/dist/es6/button/lib/DeleteButton.d.ts.map +1 -1
- package/dist/es6/button/lib/DeleteButton.js +4 -3
- package/dist/es6/button/lib/PrimaryButton.d.ts +4 -76
- package/dist/es6/button/lib/PrimaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/PrimaryButton.js +15 -35
- package/dist/es6/button/lib/SecondaryButton.d.ts +0 -5
- package/dist/es6/button/lib/SecondaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/SecondaryButton.js +16 -38
- package/dist/es6/button/lib/TertiaryButton.d.ts +2 -2
- package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/TertiaryButton.js +68 -40
- package/dist/es6/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
- package/dist/es6/button/lib/ToolbarDropdownButton.js +8 -8
- package/dist/es6/button/lib/ToolbarIconButton.d.ts +5 -2
- package/dist/es6/button/lib/ToolbarIconButton.d.ts.map +1 -1
- package/dist/es6/button/lib/ToolbarIconButton.js +7 -13
- package/dist/es6/button/lib/parts/ButtonLabel.d.ts +4 -4
- package/dist/es6/button/lib/parts/ButtonLabel.d.ts.map +1 -1
- package/dist/es6/button/lib/parts/ButtonLabel.js +33 -2
- package/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
- package/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts.map +1 -1
- package/dist/es6/button/lib/parts/ButtonLabelIcon.js +13 -42
- package/dist/es6/button/lib/parts/index.d.ts +0 -2
- package/dist/es6/button/lib/parts/index.d.ts.map +1 -1
- package/dist/es6/button/lib/parts/index.js +0 -2
- package/dist/es6/button/lib/types.d.ts +2 -2
- package/dist/es6/button/lib/types.d.ts.map +1 -1
- package/dist/es6/common/lib/parts/_brand-assets.d.ts.map +1 -1
- package/dist/es6/common/lib/parts/_brand-assets.js +5 -5
- package/dist/es6/common/lib/utils/StaticStates.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/StaticStates.js +5 -2
- package/dist/es6/icon/lib/AccentIcon.d.ts +3 -5
- package/dist/es6/icon/lib/AccentIcon.d.ts.map +1 -1
- package/dist/es6/icon/lib/AccentIcon.js +8 -24
- package/dist/es6/icon/lib/AppletIcon.d.ts +5 -6
- package/dist/es6/icon/lib/AppletIcon.d.ts.map +1 -1
- package/dist/es6/icon/lib/AppletIcon.js +11 -25
- package/dist/es6/icon/lib/Graphic.d.ts +3 -5
- package/dist/es6/icon/lib/Graphic.d.ts.map +1 -1
- package/dist/es6/icon/lib/Graphic.js +8 -24
- package/dist/es6/icon/lib/Icon.d.ts +2 -5
- package/dist/es6/icon/lib/Icon.d.ts.map +1 -1
- package/dist/es6/icon/lib/Icon.js +8 -24
- package/dist/es6/icon/lib/Svg.d.ts +4 -6
- package/dist/es6/icon/lib/Svg.d.ts.map +1 -1
- package/dist/es6/icon/lib/Svg.js +10 -27
- package/dist/es6/icon/lib/SystemIcon.d.ts +5 -6
- package/dist/es6/icon/lib/SystemIcon.d.ts.map +1 -1
- package/dist/es6/icon/lib/SystemIcon.js +8 -24
- package/dist/es6/icon/lib/SystemIconCircle.d.ts +3 -6
- package/dist/es6/icon/lib/SystemIconCircle.d.ts.map +1 -1
- package/dist/es6/icon/lib/SystemIconCircle.js +8 -26
- package/dist/es6/layout/lib/Box.d.ts +17 -0
- package/dist/es6/layout/lib/Box.d.ts.map +1 -1
- package/dist/es6/layout/lib/Box.js +39 -0
- package/dist/es6/modal/lib/ModalOverflowOverlay.js +1 -1
- package/dist/es6/pagination/lib/Pagination/Controls.d.ts +2 -2
- package/dist/es6/pagination/lib/Pagination/Controls.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/Controls.js +5 -5
- package/dist/es6/pagination/lib/Pagination/PageButton.d.ts +1 -2
- package/dist/es6/pagination/lib/Pagination/PageButton.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/PageButton.js +35 -10
- package/dist/es6/pagination/lib/Pagination/Pagination.d.ts +5 -5
- package/dist/es6/pagination/lib/Pagination/Pagination.d.ts.map +1 -1
- package/dist/es6/popup/lib/PopupCloseIcon.d.ts +2 -2
- package/dist/es6/popup/lib/PopupCloseIcon.d.ts.map +1 -1
- package/dist/es6/popup/lib/PopupCloseIcon.js +6 -7
- package/dist/es6/popup/lib/hooks/useDisableBodyScroll.d.ts.map +1 -1
- package/dist/es6/popup/lib/hooks/useDisableBodyScroll.js +4 -0
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +9 -7
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControl.js +20 -57
- package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
- package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -0
- package/dist/es6/segmented-control/lib/SegmentedControlButton.js +100 -0
- package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/SidePanel.js +3 -3
- package/dist/es6/tabs/lib/Tabs.d.ts +2 -2
- package/dist/es6/tabs/lib/TabsItem.d.ts +1 -2
- package/dist/es6/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsList.js +1 -1
- package/dist/es6/tabs/lib/menu/Menu.d.ts +1 -1
- package/dist/es6/tabs/lib/menu/MenuItem.d.ts +1 -2
- package/dist/es6/tabs/lib/menu/MenuItem.d.ts.map +1 -1
- package/dist/es6/text-input/lib/InputIconContainer.d.ts +1 -1
- package/dist/es6/text-input/lib/InputIconContainer.d.ts.map +1 -1
- package/dist/es6/tooltip/lib/Tooltip.d.ts +1 -1
- package/dist/es6/tooltip/lib/useTooltip.d.ts +1 -1
- package/icon/README.md +0 -30
- package/icon/lib/AccentIcon.tsx +17 -16
- package/icon/lib/AppletIcon.tsx +18 -12
- package/icon/lib/Graphic.tsx +15 -8
- package/icon/lib/Icon.tsx +10 -8
- package/icon/lib/Svg.tsx +12 -14
- package/icon/lib/SystemIcon.tsx +21 -12
- package/icon/lib/SystemIconCircle.tsx +17 -14
- package/layout/lib/Box.tsx +40 -0
- package/modal/lib/ModalOverflowOverlay.tsx +1 -1
- package/package.json +5 -5
- package/pagination/lib/Pagination/Controls.tsx +6 -10
- package/pagination/lib/Pagination/PageButton.tsx +38 -17
- package/pagination/lib/Pagination/Pagination.tsx +5 -5
- package/popup/lib/PopupCloseIcon.tsx +7 -8
- package/popup/lib/hooks/useDisableBodyScroll.ts +6 -0
- package/segmented-control/README.md +8 -9
- package/segmented-control/lib/SegmentedControl.tsx +39 -78
- package/segmented-control/lib/SegmentedControlButton.tsx +109 -0
- package/side-panel/README.md +3 -3
- package/side-panel/lib/SidePanel.tsx +4 -5
- package/tabs/lib/TabsList.tsx +1 -1
- package/text-input/lib/InputIconContainer.tsx +1 -1
- package/tooltip/README.md +6 -5
- package/tooltip/lib/Tooltip.tsx +1 -1
- package/tooltip/lib/useTooltip.tsx +1 -1
- package/ts3.5/dist/commonjs/button/index.d.ts +1 -1
- package/ts3.5/dist/commonjs/button/lib/BaseButton.d.ts +31 -0
- package/ts3.5/dist/commonjs/button/lib/PrimaryButton.d.ts +4 -76
- package/ts3.5/dist/commonjs/button/lib/SecondaryButton.d.ts +0 -5
- package/ts3.5/dist/commonjs/button/lib/TertiaryButton.d.ts +2 -2
- package/ts3.5/dist/commonjs/button/lib/ToolbarIconButton.d.ts +5 -2
- package/ts3.5/dist/commonjs/button/lib/parts/ButtonLabel.d.ts +4 -4
- package/ts3.5/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
- package/ts3.5/dist/commonjs/button/lib/parts/index.d.ts +0 -2
- package/ts3.5/dist/commonjs/button/lib/types.d.ts +2 -2
- package/ts3.5/dist/commonjs/icon/lib/AccentIcon.d.ts +3 -5
- package/ts3.5/dist/commonjs/icon/lib/AppletIcon.d.ts +5 -6
- package/ts3.5/dist/commonjs/icon/lib/Graphic.d.ts +3 -5
- package/ts3.5/dist/commonjs/icon/lib/Icon.d.ts +2 -5
- package/ts3.5/dist/commonjs/icon/lib/Svg.d.ts +4 -6
- package/ts3.5/dist/commonjs/icon/lib/SystemIcon.d.ts +5 -6
- package/ts3.5/dist/commonjs/icon/lib/SystemIconCircle.d.ts +3 -6
- package/ts3.5/dist/commonjs/layout/lib/Box.d.ts +17 -0
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/Controls.d.ts +2 -2
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts +1 -2
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/Pagination.d.ts +5 -5
- package/ts3.5/dist/commonjs/popup/lib/PopupCloseIcon.d.ts +2 -2
- package/ts3.5/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +9 -7
- package/ts3.5/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
- package/ts3.5/dist/commonjs/tabs/lib/Tabs.d.ts +2 -2
- package/ts3.5/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -2
- package/ts3.5/dist/commonjs/tabs/lib/menu/Menu.d.ts +1 -1
- package/ts3.5/dist/commonjs/tabs/lib/menu/MenuItem.d.ts +1 -2
- package/ts3.5/dist/commonjs/text-input/lib/InputIconContainer.d.ts +1 -1
- package/ts3.5/dist/commonjs/tooltip/lib/Tooltip.d.ts +1 -1
- package/ts3.5/dist/commonjs/tooltip/lib/useTooltip.d.ts +1 -1
- package/ts3.5/dist/es6/button/index.d.ts +1 -1
- package/ts3.5/dist/es6/button/lib/BaseButton.d.ts +31 -0
- package/ts3.5/dist/es6/button/lib/PrimaryButton.d.ts +4 -76
- package/ts3.5/dist/es6/button/lib/SecondaryButton.d.ts +0 -5
- package/ts3.5/dist/es6/button/lib/TertiaryButton.d.ts +2 -2
- package/ts3.5/dist/es6/button/lib/ToolbarIconButton.d.ts +5 -2
- package/ts3.5/dist/es6/button/lib/parts/ButtonLabel.d.ts +4 -4
- package/ts3.5/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
- package/ts3.5/dist/es6/button/lib/parts/index.d.ts +0 -2
- package/ts3.5/dist/es6/button/lib/types.d.ts +2 -2
- package/ts3.5/dist/es6/icon/lib/AccentIcon.d.ts +3 -5
- package/ts3.5/dist/es6/icon/lib/AppletIcon.d.ts +5 -6
- package/ts3.5/dist/es6/icon/lib/Graphic.d.ts +3 -5
- package/ts3.5/dist/es6/icon/lib/Icon.d.ts +2 -5
- package/ts3.5/dist/es6/icon/lib/Svg.d.ts +4 -6
- package/ts3.5/dist/es6/icon/lib/SystemIcon.d.ts +5 -6
- package/ts3.5/dist/es6/icon/lib/SystemIconCircle.d.ts +3 -6
- package/ts3.5/dist/es6/layout/lib/Box.d.ts +17 -0
- package/ts3.5/dist/es6/pagination/lib/Pagination/Controls.d.ts +2 -2
- package/ts3.5/dist/es6/pagination/lib/Pagination/PageButton.d.ts +1 -2
- package/ts3.5/dist/es6/pagination/lib/Pagination/Pagination.d.ts +5 -5
- package/ts3.5/dist/es6/popup/lib/PopupCloseIcon.d.ts +2 -2
- package/ts3.5/dist/es6/segmented-control/lib/SegmentedControl.d.ts +9 -7
- package/ts3.5/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
- package/ts3.5/dist/es6/tabs/lib/Tabs.d.ts +2 -2
- package/ts3.5/dist/es6/tabs/lib/TabsItem.d.ts +1 -2
- package/ts3.5/dist/es6/tabs/lib/menu/Menu.d.ts +1 -1
- package/ts3.5/dist/es6/tabs/lib/menu/MenuItem.d.ts +1 -2
- package/ts3.5/dist/es6/text-input/lib/InputIconContainer.d.ts +1 -1
- package/ts3.5/dist/es6/tooltip/lib/Tooltip.d.ts +1 -1
- package/ts3.5/dist/es6/tooltip/lib/useTooltip.d.ts +1 -1
- package/button/lib/IconButton.tsx +0 -279
- package/button/lib/parts/ButtonLabelData.tsx +0 -16
- package/dist/commonjs/button/lib/IconButton.d.ts +0 -44
- package/dist/commonjs/button/lib/IconButton.d.ts.map +0 -1
- package/dist/commonjs/button/lib/IconButton.js +0 -219
- package/dist/commonjs/button/lib/parts/ButtonContainer.d.ts +0 -33
- package/dist/commonjs/button/lib/parts/ButtonContainer.d.ts.map +0 -1
- package/dist/commonjs/button/lib/parts/ButtonContainer.js +0 -126
- package/dist/commonjs/button/lib/parts/ButtonLabelData.d.ts +0 -3
- package/dist/commonjs/button/lib/parts/ButtonLabelData.d.ts.map +0 -1
- package/dist/commonjs/button/lib/parts/ButtonLabelData.js +0 -45
- package/dist/es6/button/lib/IconButton.d.ts +0 -44
- package/dist/es6/button/lib/IconButton.d.ts.map +0 -1
- package/dist/es6/button/lib/IconButton.js +0 -197
- package/dist/es6/button/lib/parts/ButtonContainer.d.ts +0 -33
- package/dist/es6/button/lib/parts/ButtonContainer.d.ts.map +0 -1
- package/dist/es6/button/lib/parts/ButtonContainer.js +0 -120
- package/dist/es6/button/lib/parts/ButtonLabelData.d.ts +0 -3
- package/dist/es6/button/lib/parts/ButtonLabelData.d.ts.map +0 -1
- package/dist/es6/button/lib/parts/ButtonLabelData.js +0 -22
- package/ts3.5/dist/commonjs/button/lib/IconButton.d.ts +0 -44
- package/ts3.5/dist/commonjs/button/lib/parts/ButtonContainer.d.ts +0 -33
- package/ts3.5/dist/commonjs/button/lib/parts/ButtonLabelData.d.ts +0 -3
- package/ts3.5/dist/es6/button/lib/IconButton.d.ts +0 -44
- package/ts3.5/dist/es6/button/lib/parts/ButtonContainer.d.ts +0 -33
- package/ts3.5/dist/es6/button/lib/parts/ButtonLabelData.d.ts +0 -3
package/badge/README.md
CHANGED
|
@@ -32,15 +32,14 @@ const AccessibleHide = styled('div')({
|
|
|
32
32
|
|
|
33
33
|
...
|
|
34
34
|
|
|
35
|
-
<
|
|
35
|
+
<TertiaryButton
|
|
36
36
|
style={{ position: "relative" }}
|
|
37
37
|
aria-label={`Alerts ${count} new notifications`}
|
|
38
38
|
size="medium"
|
|
39
|
-
variant="circle"
|
|
40
39
|
>
|
|
41
40
|
<SystemIcon icon={notificationsIcon} aria-hidden="true" />
|
|
42
41
|
<Badge count={count} aria-hidden="true" />
|
|
43
|
-
</
|
|
42
|
+
</TertiaryButton>
|
|
44
43
|
<AccessibleHide role="status" aria-live="polite" aria-atomic="true">
|
|
45
44
|
New notifications
|
|
46
45
|
</AccessibleHide>
|
|
@@ -32,8 +32,8 @@ export const BannerIcon = createComponent('span')({
|
|
|
32
32
|
const localModel = useModelContext(BannerModelContext, model);
|
|
33
33
|
|
|
34
34
|
// SystemIcon is still a class based component so we need to set ref manually.
|
|
35
|
-
const {
|
|
35
|
+
const {icon: defaultIcon, ...props} = useBannerIcon(localModel, elemProps);
|
|
36
36
|
|
|
37
|
-
return <StyledBannerIcon icon={icon ?? defaultIcon}
|
|
37
|
+
return <StyledBannerIcon icon={icon ?? defaultIcon} ref={ref} {...props} />;
|
|
38
38
|
},
|
|
39
39
|
});
|
package/button/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Clickable button elements that extend the native `<button>` element with Canvas styling.
|
|
4
4
|
|
|
5
|
-
For `PrimaryButton`, `SecondaryButton`, `TertiaryButton
|
|
5
|
+
For `PrimaryButton`, `SecondaryButton`, `TertiaryButton` or `DeleteButton`, view the
|
|
6
6
|
[documentation on Storybook](https://workday.github.io/canvas-kit/?path=/docs/components-buttons-button-react--primary).
|
|
7
7
|
|
|
8
8
|
[> Workday Design Reference](https://design.workday.com/components/buttons/buttons)
|
|
@@ -182,6 +182,73 @@ Default: `false`
|
|
|
182
182
|
|
|
183
183
|
---
|
|
184
184
|
|
|
185
|
+
# BaseButton
|
|
186
|
+
|
|
187
|
+
As part of the restructure of our Buttons, we've created a low level `BaseButton` component. This
|
|
188
|
+
component isn't intended to be used outside of Canvas Kit, but we do export it for very specific use
|
|
189
|
+
cases which we'll outline below. The `BaseButton` is a styled `button` element which extends our
|
|
190
|
+
style properties which allow us to customize a buttons `colors`, `padding`, `width` and other style
|
|
191
|
+
properties.
|
|
192
|
+
|
|
193
|
+
Basic example:
|
|
194
|
+
|
|
195
|
+
```tsx
|
|
196
|
+
import * as React from 'react';
|
|
197
|
+
import {colors} from '@workday/canvas-kit-react/tokens';
|
|
198
|
+
import {BaseButton} from '@workday/canvas-kit-react/button';
|
|
199
|
+
import {plusIcon} from '@workday/canvas-system-icons-web';
|
|
200
|
+
|
|
201
|
+
const getBasicButtonColors = () => {
|
|
202
|
+
return {
|
|
203
|
+
default: {
|
|
204
|
+
background: colors.blueberry400,
|
|
205
|
+
label: colors.frenchVanilla100,
|
|
206
|
+
icon: colors.frenchVanilla100,
|
|
207
|
+
},
|
|
208
|
+
hover: {
|
|
209
|
+
background: colors.blueberry500,
|
|
210
|
+
label: colors.frenchVanilla100,
|
|
211
|
+
icon: colors.frenchVanilla100,
|
|
212
|
+
},
|
|
213
|
+
active: {
|
|
214
|
+
background: colors.blueberry500,
|
|
215
|
+
label: colors.frenchVanilla100,
|
|
216
|
+
icon: colors.frenchVanilla100,
|
|
217
|
+
},
|
|
218
|
+
focus: {
|
|
219
|
+
background: colors.blueberry400,
|
|
220
|
+
label: colors.frenchVanilla100,
|
|
221
|
+
icon: colors.frenchVanilla100,
|
|
222
|
+
},
|
|
223
|
+
disabled: {
|
|
224
|
+
background: colors.blueberry400,
|
|
225
|
+
},
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
export type BasicButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {};
|
|
230
|
+
|
|
231
|
+
export const BasicButton = ({children, ...elemProps}: BasicButtonProps) => {
|
|
232
|
+
return (
|
|
233
|
+
<BaseButton
|
|
234
|
+
colors={getPaginationButtonColors(toggled)}
|
|
235
|
+
{...elemProps}
|
|
236
|
+
>
|
|
237
|
+
<BaseButton.Label>{children}</BaseButton.Label>
|
|
238
|
+
<BaseButton.Icon icon={plusIcon}>
|
|
239
|
+
</StyledToggleButton>
|
|
240
|
+
);
|
|
241
|
+
};
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**Note:** Under the hood, `BaseButton` uses our `Box` component which allows `BaseButton` to accept
|
|
245
|
+
style properties. Because of the flexibility of this component, consumers can use this to create
|
|
246
|
+
toggled buttons or a specific button that doesn't fall under the main use case you see in our design
|
|
247
|
+
system.
|
|
248
|
+
|
|
249
|
+
**Disclaimer** We strongly advise consumers not to use this component if possible and to rely on our
|
|
250
|
+
`PrimaryButton`, `SecondaryButton` and `TertiaryButton` when possible.
|
|
251
|
+
|
|
185
252
|
### Deprecated Buttons
|
|
186
253
|
|
|
187
254
|
> We have rolled out our next iteration of our buttons and will be deprecating the old style (orange
|
package/button/index.ts
CHANGED
|
@@ -6,8 +6,8 @@ export {
|
|
|
6
6
|
DeprecatedButton as deprecated_Button,
|
|
7
7
|
DeprecatedButtonProps,
|
|
8
8
|
} from './lib/deprecated_Button';
|
|
9
|
-
export {IconButton, IconButtonProps} from './lib/IconButton';
|
|
10
9
|
export {ToolbarIconButton, ToolbarIconButtonProps} from './lib/ToolbarIconButton';
|
|
11
10
|
export {ToolbarDropdownButton, ToolbarDropdownButtonProps} from './lib/ToolbarDropdownButton';
|
|
12
11
|
export {Hyperlink, HyperlinkProps} from './lib/Hyperlink';
|
|
12
|
+
export {BaseButton, ButtonContainerProps} from './lib/BaseButton';
|
|
13
13
|
export * from './lib/types';
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
|
|
3
|
+
import {ButtonLabelIcon} from './parts/ButtonLabelIcon';
|
|
4
|
+
import {ButtonLabel} from './parts/ButtonLabel';
|
|
5
|
+
|
|
5
6
|
import {
|
|
7
|
+
createComponent,
|
|
6
8
|
GrowthBehavior,
|
|
7
9
|
mouseFocusBehavior,
|
|
8
10
|
focusRing,
|
|
9
11
|
styled,
|
|
10
12
|
EmotionCanvasTheme,
|
|
13
|
+
StyledType,
|
|
11
14
|
} from '@workday/canvas-kit-react/common';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
15
|
+
import {BoxProps, boxStyleFn} from '@workday/canvas-kit-react/layout';
|
|
16
|
+
import {borderRadius, space, spaceNumbers, type} from '@workday/canvas-kit-react/tokens';
|
|
17
|
+
|
|
18
|
+
import {ButtonColors, ButtonSizes, IconPositions, TertiaryButtonSizes} from './types';
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
import {CSSObject} from '@emotion/styled';
|
|
21
|
+
import {CanvasSystemIcon} from '@workday/design-assets-types';
|
|
22
|
+
|
|
23
|
+
export interface ButtonContainerProps extends BoxProps, GrowthBehavior {
|
|
18
24
|
colors?: ButtonColors;
|
|
19
25
|
/**
|
|
20
26
|
* There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
|
|
@@ -29,14 +35,9 @@ export interface ButtonContainerProps
|
|
|
29
35
|
ref?: React.Ref<HTMLButtonElement>;
|
|
30
36
|
/**
|
|
31
37
|
* Whether the icon should received filled (colored background layer) or regular styles.
|
|
32
|
-
* Corresponds to `toggled` in
|
|
38
|
+
* Corresponds to `toggled` in ToolbarIconButton
|
|
33
39
|
*/
|
|
34
40
|
fillIcon?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Any extra styles necessary for a given parent component.
|
|
37
|
-
* This avoids using the inline `style` attribute when the shape needs to be customized (e.g. for IconButton)
|
|
38
|
-
*/
|
|
39
|
-
extraStyles?: CSSObject;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
function getIconColorSelectors(
|
|
@@ -67,40 +68,39 @@ function getIconColorSelectors(
|
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
shouldForwardProp: prop => isPropValid(prop) && prop !== 'size',
|
|
72
|
-
})<ButtonContainerProps>(
|
|
71
|
+
const ButtonContainer = styled('button')<StyledType & ButtonContainerProps>(
|
|
73
72
|
{
|
|
74
73
|
...type.levels.subtext.large,
|
|
75
|
-
|
|
76
|
-
lineHeight: 'normal',
|
|
77
|
-
boxSizing: 'border-box',
|
|
74
|
+
cursor: 'pointer',
|
|
78
75
|
display: 'inline-flex',
|
|
79
76
|
alignItems: 'center',
|
|
80
77
|
justifyContent: 'center',
|
|
81
|
-
|
|
82
|
-
borderRadius: borderRadius.circle,
|
|
78
|
+
boxSizing: 'border-box',
|
|
83
79
|
boxShadow: 'none',
|
|
84
|
-
position: 'relative',
|
|
85
|
-
cursor: 'pointer',
|
|
86
80
|
outline: 'none',
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
overflow: 'hidden',
|
|
81
|
+
fontWeight: type.properties.fontWeights.bold,
|
|
82
|
+
lineHeight: 'normal',
|
|
90
83
|
whiteSpace: 'nowrap',
|
|
91
84
|
WebkitFontSmoothing: 'antialiased',
|
|
92
85
|
MozOsxFontSmoothing: 'grayscale',
|
|
93
|
-
|
|
86
|
+
borderRadius: borderRadius.circle,
|
|
87
|
+
position: 'relative',
|
|
88
|
+
verticalAlign: 'middle',
|
|
89
|
+
overflow: 'hidden',
|
|
90
|
+
border: '1px solid transparent',
|
|
91
|
+
background: 'transparent',
|
|
94
92
|
transition:
|
|
95
93
|
'box-shadow 120ms linear, border 120ms linear, background-color 120ms linear, color 120ms linear',
|
|
94
|
+
'&:disabled, &:disabled:active': {
|
|
95
|
+
cursor: 'default',
|
|
96
|
+
boxShadow: 'none',
|
|
97
|
+
opacity: 0.4,
|
|
98
|
+
},
|
|
96
99
|
|
|
97
|
-
// Makes the "down" state of the button happens faster than the hover state, so it animates in correctly.
|
|
98
100
|
'&:hover:active': {transitionDuration: '40ms'},
|
|
99
101
|
|
|
100
|
-
'&:disabled, &:disabled:active': {cursor: 'default', boxShadow: 'none'},
|
|
101
|
-
|
|
102
102
|
'& > *:first-of-type': {
|
|
103
|
-
marginLeft: 0,
|
|
103
|
+
marginLeft: '0',
|
|
104
104
|
},
|
|
105
105
|
|
|
106
106
|
'& > *:last-of-type': {
|
|
@@ -113,9 +113,7 @@ export const ButtonContainer = styled('button', {
|
|
|
113
113
|
return {
|
|
114
114
|
...type.levels.body.small,
|
|
115
115
|
fontWeight: type.properties.fontWeights.bold,
|
|
116
|
-
minWidth: '112px',
|
|
117
116
|
height: '48px',
|
|
118
|
-
padding: `0 ${space.l}`,
|
|
119
117
|
'& > * ': {
|
|
120
118
|
margin: `0 ${spaceNumbers.xxs / 2}px`,
|
|
121
119
|
},
|
|
@@ -123,18 +121,14 @@ export const ButtonContainer = styled('button', {
|
|
|
123
121
|
case 'medium':
|
|
124
122
|
default:
|
|
125
123
|
return {
|
|
126
|
-
minWidth: '96px',
|
|
127
124
|
height: space.xl,
|
|
128
|
-
padding: `0 ${space.m}`,
|
|
129
125
|
'& > * ': {
|
|
130
126
|
margin: `0 ${spaceNumbers.xxs / 2}px`,
|
|
131
127
|
},
|
|
132
128
|
};
|
|
133
129
|
case 'small':
|
|
134
130
|
return {
|
|
135
|
-
minWidth: '80px',
|
|
136
131
|
height: space.l,
|
|
137
|
-
padding: `0 ${space.s}`,
|
|
138
132
|
'& > * ': {
|
|
139
133
|
margin: `0 ${spaceNumbers.xxxs / 2}px`,
|
|
140
134
|
},
|
|
@@ -144,7 +138,6 @@ export const ButtonContainer = styled('button', {
|
|
|
144
138
|
...type.levels.subtext.medium,
|
|
145
139
|
fontWeight: type.properties.fontWeights.bold,
|
|
146
140
|
height: space.m,
|
|
147
|
-
padding: `0 ${space.xs}`,
|
|
148
141
|
'& > * ': {
|
|
149
142
|
margin: `0 ${spaceNumbers.xxxs / 2}px`,
|
|
150
143
|
},
|
|
@@ -156,6 +149,7 @@ export const ButtonContainer = styled('button', {
|
|
|
156
149
|
if (!colors) {
|
|
157
150
|
return;
|
|
158
151
|
}
|
|
152
|
+
|
|
159
153
|
const baseStyles = {
|
|
160
154
|
backgroundColor: colors.default.background,
|
|
161
155
|
borderColor: colors.default.border,
|
|
@@ -166,11 +160,6 @@ export const ButtonContainer = styled('button', {
|
|
|
166
160
|
},
|
|
167
161
|
...getIconColorSelectors(theme, colors.default.icon, fillIcon),
|
|
168
162
|
}),
|
|
169
|
-
...(colors.default.labelData && {
|
|
170
|
-
['.' + buttonLabelDataClassName]: {
|
|
171
|
-
color: colors.default.labelData,
|
|
172
|
-
},
|
|
173
|
-
}),
|
|
174
163
|
};
|
|
175
164
|
|
|
176
165
|
const hoverStyles = {
|
|
@@ -178,12 +167,6 @@ export const ButtonContainer = styled('button', {
|
|
|
178
167
|
backgroundColor: colors.hover.background,
|
|
179
168
|
borderColor: colors.hover.border,
|
|
180
169
|
color: colors.hover.label,
|
|
181
|
-
...(colors.hover.labelData && {
|
|
182
|
-
['.' + buttonLabelDataClassName]: {
|
|
183
|
-
transition: 'color 120ms ease-in',
|
|
184
|
-
color: colors.hover.labelData,
|
|
185
|
-
},
|
|
186
|
-
}),
|
|
187
170
|
...(colors.hover.icon && getIconColorSelectors(theme, colors.hover.icon, fillIcon)),
|
|
188
171
|
},
|
|
189
172
|
};
|
|
@@ -193,11 +176,6 @@ export const ButtonContainer = styled('button', {
|
|
|
193
176
|
backgroundColor: colors.active.background,
|
|
194
177
|
borderColor: colors.active.border,
|
|
195
178
|
color: colors.active.label,
|
|
196
|
-
...(colors.active.labelData && {
|
|
197
|
-
['.' + buttonLabelDataClassName]: {
|
|
198
|
-
color: colors.active.labelData,
|
|
199
|
-
},
|
|
200
|
-
}),
|
|
201
179
|
...(colors.active.icon && getIconColorSelectors(theme, colors.active.icon, fillIcon)),
|
|
202
180
|
},
|
|
203
181
|
};
|
|
@@ -209,11 +187,6 @@ export const ButtonContainer = styled('button', {
|
|
|
209
187
|
borderColor: colors.focus.border,
|
|
210
188
|
color: colors.focus.label,
|
|
211
189
|
...(colors.focus.focusRing || focusRing({separation: 2}, theme)),
|
|
212
|
-
...(colors.focus.labelData && {
|
|
213
|
-
['.' + buttonLabelDataClassName]: {
|
|
214
|
-
color: colors.focus.labelData,
|
|
215
|
-
},
|
|
216
|
-
}),
|
|
217
190
|
...(colors.focus.icon && getIconColorSelectors(theme, colors.focus.icon, fillIcon)),
|
|
218
191
|
},
|
|
219
192
|
|
|
@@ -223,12 +196,8 @@ export const ButtonContainer = styled('button', {
|
|
|
223
196
|
backgroundColor: colors.disabled.background,
|
|
224
197
|
borderColor: colors.disabled.border,
|
|
225
198
|
color: colors.disabled.label,
|
|
199
|
+
opacity: colors.disabled.opacity,
|
|
226
200
|
...(colors.disabled.icon && getIconColorSelectors(theme, colors.disabled.icon, fillIcon)),
|
|
227
|
-
...(colors.disabled.labelData && {
|
|
228
|
-
['.' + buttonLabelDataClassName]: {
|
|
229
|
-
color: colors.disabled.labelData,
|
|
230
|
-
},
|
|
231
|
-
}),
|
|
232
201
|
},
|
|
233
202
|
...mouseFocusBehavior({
|
|
234
203
|
'&:focus': {
|
|
@@ -242,5 +211,93 @@ export const ButtonContainer = styled('button', {
|
|
|
242
211
|
}),
|
|
243
212
|
};
|
|
244
213
|
},
|
|
245
|
-
|
|
214
|
+
boxStyleFn
|
|
246
215
|
);
|
|
216
|
+
|
|
217
|
+
export const getMinWidthStyles = (
|
|
218
|
+
children: React.ReactNode,
|
|
219
|
+
size: ButtonSizes | TertiaryButtonSizes
|
|
220
|
+
) => {
|
|
221
|
+
switch (size) {
|
|
222
|
+
case 'large':
|
|
223
|
+
return children ? '112px' : '48px';
|
|
224
|
+
case 'medium':
|
|
225
|
+
return children ? '96px' : space.xl;
|
|
226
|
+
case 'small':
|
|
227
|
+
return children ? space.xxxl : space.l;
|
|
228
|
+
case 'extraSmall':
|
|
229
|
+
return children ? 'auto' : space.m;
|
|
230
|
+
default:
|
|
231
|
+
return children ? '96px' : space.xl;
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
export const getPaddingStyles = (
|
|
236
|
+
children: React.ReactNode,
|
|
237
|
+
size: ButtonSizes | TertiaryButtonSizes,
|
|
238
|
+
icon: CanvasSystemIcon | undefined,
|
|
239
|
+
iconPosition: IconPositions | undefined
|
|
240
|
+
) => {
|
|
241
|
+
// In order to calculate the correct padding, we need to know its children
|
|
242
|
+
// and what side the icon is on and if there's an icon provided
|
|
243
|
+
if (!children) {
|
|
244
|
+
// icon buttons do not have any padding
|
|
245
|
+
return 0;
|
|
246
|
+
}
|
|
247
|
+
// If there are children AND an icon
|
|
248
|
+
// 1. We check what side the icon is in
|
|
249
|
+
// 2. Adjust padding to visually center the icon and text
|
|
250
|
+
// If there is children (most likely just text)
|
|
251
|
+
// 1. We keep the padding the same on both side
|
|
252
|
+
switch (size) {
|
|
253
|
+
case 'large':
|
|
254
|
+
return icon
|
|
255
|
+
? iconPosition === 'start'
|
|
256
|
+
? `0 ${space.l} 0 ${space.m}`
|
|
257
|
+
: `0 ${space.m} 0 ${space.l}`
|
|
258
|
+
: `0 ${space.l}`;
|
|
259
|
+
|
|
260
|
+
case 'medium':
|
|
261
|
+
return icon
|
|
262
|
+
? iconPosition === 'start'
|
|
263
|
+
? `0 ${space.m} 0 20px`
|
|
264
|
+
: `0 20px 0 ${space.m}`
|
|
265
|
+
: `0 ${space.m}`;
|
|
266
|
+
|
|
267
|
+
case 'small':
|
|
268
|
+
return icon
|
|
269
|
+
? iconPosition === 'start'
|
|
270
|
+
? `0 20px 0 ${space.s}`
|
|
271
|
+
: `0 ${space.s} 0 20px`
|
|
272
|
+
: `0 ${space.s}`;
|
|
273
|
+
|
|
274
|
+
case 'extraSmall':
|
|
275
|
+
return icon
|
|
276
|
+
? iconPosition === 'start'
|
|
277
|
+
? `0 ${space.xs} 0 ${space.xxs}`
|
|
278
|
+
: `0 ${space.xxs} 0 ${space.xs}`
|
|
279
|
+
: `0 ${space.xs}`;
|
|
280
|
+
|
|
281
|
+
default:
|
|
282
|
+
return icon
|
|
283
|
+
? iconPosition === 'start'
|
|
284
|
+
? `0 ${space.m} 0 20px`
|
|
285
|
+
: `0 20px 0 ${space.m}`
|
|
286
|
+
: `0 ${space.m}`;
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
export const BaseButton = createComponent('button')({
|
|
291
|
+
displayName: 'Button',
|
|
292
|
+
Component: ({children, ...elemProps}: ButtonContainerProps, ref, Element) => {
|
|
293
|
+
return (
|
|
294
|
+
<ButtonContainer as={Element} ref={ref} {...elemProps}>
|
|
295
|
+
{children}
|
|
296
|
+
</ButtonContainer>
|
|
297
|
+
);
|
|
298
|
+
},
|
|
299
|
+
subComponents: {
|
|
300
|
+
Icon: ButtonLabelIcon,
|
|
301
|
+
Label: ButtonLabel,
|
|
302
|
+
},
|
|
303
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import {ButtonColors} from './types';
|
|
3
|
-
import {
|
|
3
|
+
import {BaseButton, getMinWidthStyles, getPaddingStyles} from './BaseButton';
|
|
4
4
|
import {
|
|
5
5
|
GrowthBehavior,
|
|
6
6
|
useTheme,
|
|
@@ -38,6 +38,7 @@ const getDeleteButtonColors = ({
|
|
|
38
38
|
},
|
|
39
39
|
disabled: {
|
|
40
40
|
background: themeError.light,
|
|
41
|
+
opacity: '1', // allows for overriding the default opacity of 0.4
|
|
41
42
|
},
|
|
42
43
|
});
|
|
43
44
|
|
|
@@ -55,14 +56,16 @@ export const DeleteButton = createComponent('button')({
|
|
|
55
56
|
ref,
|
|
56
57
|
Element
|
|
57
58
|
) => (
|
|
58
|
-
<
|
|
59
|
+
<BaseButton
|
|
60
|
+
padding={getPaddingStyles(children, size, undefined, undefined)}
|
|
61
|
+
minWidth={getMinWidthStyles(children, size)}
|
|
59
62
|
ref={ref}
|
|
60
63
|
as={Element}
|
|
61
64
|
colors={getDeleteButtonColors(theme)}
|
|
62
65
|
size={size}
|
|
63
66
|
{...elemProps}
|
|
64
67
|
>
|
|
65
|
-
<
|
|
66
|
-
</
|
|
68
|
+
<BaseButton.Label>{children}</BaseButton.Label>
|
|
69
|
+
</BaseButton>
|
|
67
70
|
),
|
|
68
71
|
});
|