@workday/canvas-kit-react 7.0.0-alpha.0-next.7 → 7.0.0-alpha.80-next.8
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 +41 -64
- 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/card/lib/Card.tsx +1 -1
- 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 +13 -36
- 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/card/lib/Card.js +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 +18 -1
- package/dist/commonjs/layout/lib/Box.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Box.js +42 -2
- package/dist/commonjs/layout/lib/Flex.d.ts +1 -1
- package/dist/commonjs/layout/lib/Flex.js +1 -1
- package/dist/commonjs/modal/lib/ModalCard.js +1 -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/PopupCard.js +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/toast/lib/Toast.d.ts.map +1 -1
- package/dist/commonjs/toast/lib/Toast.js +1 -1
- package/dist/commonjs/tokens/lib/depth.d.ts +48 -17
- package/dist/commonjs/tokens/lib/depth.d.ts.map +1 -1
- package/dist/commonjs/tokens/lib/depth.js +14 -9
- 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 +13 -36
- 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/card/lib/Card.js +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 +18 -1
- package/dist/es6/layout/lib/Box.d.ts.map +1 -1
- package/dist/es6/layout/lib/Box.js +40 -1
- package/dist/es6/layout/lib/Flex.d.ts +1 -1
- package/dist/es6/layout/lib/Flex.js +1 -1
- package/dist/es6/modal/lib/ModalCard.js +1 -1
- 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/PopupCard.js +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/toast/lib/Toast.d.ts.map +1 -1
- package/dist/es6/toast/lib/Toast.js +1 -1
- package/dist/es6/tokens/lib/depth.d.ts +48 -17
- package/dist/es6/tokens/lib/depth.d.ts.map +1 -1
- package/dist/es6/tokens/lib/depth.js +14 -9
- 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 +41 -1
- package/layout/lib/Flex.tsx +1 -1
- package/modal/lib/ModalCard.tsx +1 -1
- 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/PopupCard.tsx +1 -1
- 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/toast/lib/Toast.tsx +1 -0
- package/tokens/README.md +11 -8
- package/tokens/lib/depth.ts +60 -24
- 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 +18 -1
- package/ts3.5/dist/commonjs/layout/lib/Flex.d.ts +1 -1
- 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/tokens/lib/depth.d.ts +48 -17
- 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 +18 -1
- package/ts3.5/dist/es6/layout/lib/Flex.d.ts +1 -1
- 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/tokens/lib/depth.d.ts +48 -17
- 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
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export declare type CanvasDepth = {
|
|
2
2
|
/**
|
|
3
|
-
* ### Depth
|
|
4
|
-
* Used for
|
|
3
|
+
* ### Depth None
|
|
4
|
+
* Used for removing existing depth
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```ts
|
|
8
8
|
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
9
9
|
*
|
|
10
|
-
* const
|
|
11
|
-
* ...depth.
|
|
10
|
+
* const noDepthCardStyles = {
|
|
11
|
+
* ...depth.none,
|
|
12
12
|
* };
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
boxShadow: '
|
|
15
|
+
none: {
|
|
16
|
+
boxShadow: 'none';
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* ### Depth 1
|
|
20
|
-
* Used for minimal offset
|
|
20
|
+
* Used for minimal offset and Cards
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```ts
|
|
@@ -29,11 +29,11 @@ export declare type CanvasDepth = {
|
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
1: {
|
|
32
|
-
boxShadow: '0px
|
|
32
|
+
boxShadow: '0px 1px 4px rgba(0, 0, 0, 0.2), 0px 2px 8px rgba(0, 0, 0, 0.16)';
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* ### Depth 2
|
|
36
|
-
* Used for
|
|
36
|
+
* Used for Top navigation, Bottom navigation
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts
|
|
@@ -45,11 +45,11 @@ export declare type CanvasDepth = {
|
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
2: {
|
|
48
|
-
boxShadow: '0px
|
|
48
|
+
boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.2), 0px 4px 16px rgba(0, 0, 0, 0.16)';
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
51
|
* ### Depth 3
|
|
52
|
-
* Used for
|
|
52
|
+
* Used for FABs, Menus
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
55
|
* ```ts
|
|
@@ -61,11 +61,11 @@ export declare type CanvasDepth = {
|
|
|
61
61
|
* ```
|
|
62
62
|
*/
|
|
63
63
|
3: {
|
|
64
|
-
boxShadow: '0px
|
|
64
|
+
boxShadow: '0px 3px 12px rgba(0, 0, 0, 0.2), 0px 6px 24px rgba(0, 0, 0, 0.16)';
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
67
|
* ### Depth 4
|
|
68
|
-
*
|
|
68
|
+
*
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* ```ts
|
|
@@ -77,8 +77,39 @@ export declare type CanvasDepth = {
|
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
79
|
4: {
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.2), 0px 8px 32px rgba(0, 0, 0, 0.16)';
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* ### Depth 5
|
|
84
|
+
* Used for Popups, Toast Messages, Dialogs, Side Panels without opacity overlay behavior
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
89
|
+
*
|
|
90
|
+
* const cardStyles = {
|
|
91
|
+
* ...depth[5],
|
|
92
|
+
* };
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
5: {
|
|
96
|
+
boxShadow: '0px 5px 20px rgba(0, 0, 0, 0.2), 0px 10px 40px rgba(0, 0, 0, 0.16)';
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* ### Depth 6
|
|
100
|
+
* Used for components with opacity overlay behavior such as Modal or Side Panels
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* import { depth } from '@workday/canvas-kit-react/tokens';
|
|
105
|
+
*
|
|
106
|
+
* const cardStyles = {
|
|
107
|
+
* ...depth[6],
|
|
108
|
+
* };
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
6: {
|
|
112
|
+
boxShadow: '0px 6px 24px rgba(0, 0, 0, 0.2), 0px 12px 48px rgba(0, 0, 0, 0.16)';
|
|
82
113
|
};
|
|
83
114
|
};
|
|
84
115
|
declare type ValueOf<T> = T[keyof T];
|
|
@@ -88,8 +119,8 @@ export declare type CanvasDepthValues = ValueOf<CanvasDepth>;
|
|
|
88
119
|
*
|
|
89
120
|
* Depth is the relative distance between surfaces in the z-axis.
|
|
90
121
|
* It provides delineation, focus, and priority with shadows and layering.
|
|
91
|
-
* There are
|
|
92
|
-
*
|
|
122
|
+
* There are seven depth levels, `none`, `1`, `2`, `3`, `4`, `5` and `6`.
|
|
123
|
+
* `none` is a special value to remove depth styles. All other levels only apply box-shadow styles.
|
|
93
124
|
*
|
|
94
125
|
* @example
|
|
95
126
|
* ```tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../../../tokens/lib/depth.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG;IACxB;;;;;;;;;;;;OAYG;IACH,
|
|
1
|
+
{"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../../../tokens/lib/depth.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG;IACxB;;;;;;;;;;;;OAYG;IACH,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,iEAAiE,CAAC;KAC9E,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,kEAAkE,CAAC;KAC/E,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,mEAAmE,CAAC;KAChF,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,mEAAmE,CAAC;KAChF,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,oEAAoE,CAAC;KACjF,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,oEAAoE,CAAC;KACjF,CAAC;CACH,CAAC;AAEF,aAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7B,oBAAY,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,KAAK,EAAE,WAsBnB,CAAC"}
|
|
@@ -6,8 +6,8 @@ exports.depth = void 0;
|
|
|
6
6
|
*
|
|
7
7
|
* Depth is the relative distance between surfaces in the z-axis.
|
|
8
8
|
* It provides delineation, focus, and priority with shadows and layering.
|
|
9
|
-
* There are
|
|
10
|
-
*
|
|
9
|
+
* There are seven depth levels, `none`, `1`, `2`, `3`, `4`, `5` and `6`.
|
|
10
|
+
* `none` is a special value to remove depth styles. All other levels only apply box-shadow styles.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```tsx
|
|
@@ -24,20 +24,25 @@ exports.depth = void 0;
|
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
26
|
exports.depth = {
|
|
27
|
-
|
|
28
|
-
boxShadow: '
|
|
27
|
+
none: {
|
|
28
|
+
boxShadow: 'none',
|
|
29
29
|
},
|
|
30
30
|
1: {
|
|
31
|
-
boxShadow: '0px
|
|
31
|
+
boxShadow: '0px 1px 4px rgba(0, 0, 0, 0.2), 0px 2px 8px rgba(0, 0, 0, 0.16)',
|
|
32
32
|
},
|
|
33
33
|
2: {
|
|
34
|
-
boxShadow: '0px
|
|
34
|
+
boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.2), 0px 4px 16px rgba(0, 0, 0, 0.16)',
|
|
35
35
|
},
|
|
36
36
|
3: {
|
|
37
|
-
boxShadow: '0px
|
|
37
|
+
boxShadow: '0px 3px 12px rgba(0, 0, 0, 0.2), 0px 6px 24px rgba(0, 0, 0, 0.16)',
|
|
38
38
|
},
|
|
39
39
|
4: {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.2), 0px 8px 32px rgba(0, 0, 0, 0.16)',
|
|
41
|
+
},
|
|
42
|
+
5: {
|
|
43
|
+
boxShadow: '0px 5px 20px rgba(0, 0, 0, 0.2), 0px 10px 40px rgba(0, 0, 0, 0.16)',
|
|
44
|
+
},
|
|
45
|
+
6: {
|
|
46
|
+
boxShadow: '0px 6px 24px rgba(0, 0, 0, 0.2), 0px 12px 48px rgba(0, 0, 0, 0.16)',
|
|
42
47
|
},
|
|
43
48
|
};
|
|
@@ -24,7 +24,7 @@ export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
24
24
|
* Determines the tooltip type for accessibility.
|
|
25
25
|
*
|
|
26
26
|
* - `label`: Sets the accessible name for the wrapped element. Use for icons or if tooltip
|
|
27
|
-
* `title` prop is the same as the text content of the wrapped element. E.g.
|
|
27
|
+
* `title` prop is the same as the text content of the wrapped element. E.g. TertiaryButtons that render an icon or
|
|
28
28
|
* Ellipsis tooltips.
|
|
29
29
|
* - `describe`: Sets `aria-describedby` of the wrapped element. Use if the tooltip has additional
|
|
30
30
|
* information about the target.
|
|
@@ -8,7 +8,7 @@ export declare function useTooltip<T extends Element = Element>({ type, titleTex
|
|
|
8
8
|
* Determines the tooltip type for accessibility.
|
|
9
9
|
*
|
|
10
10
|
* - `label`: Sets the accessible name for the wrapped element. Use for icons or if tooltip
|
|
11
|
-
* `title` prop is the same as the text content of the wrapped element. E.g.
|
|
11
|
+
* `title` prop is the same as the text content of the wrapped element. E.g. TertiaryButton that renders an icon or
|
|
12
12
|
* Ellipsis tooltips.
|
|
13
13
|
* - `describe`: Sets `aria-describedby` of the wrapped element. Use if the tooltip has additional
|
|
14
14
|
* information about the target.
|
|
@@ -36,7 +36,7 @@ export var BannerIcon = createComponent('span')({
|
|
|
36
36
|
var _b = _a.icon, icon = _b === void 0 ? exclamationTriangleIcon : _b, model = _a.model, elemProps = __rest(_a, ["icon", "model"]);
|
|
37
37
|
var localModel = useModelContext(BannerModelContext, model);
|
|
38
38
|
// SystemIcon is still a class based component so we need to set ref manually.
|
|
39
|
-
var _c = useBannerIcon(localModel, elemProps
|
|
40
|
-
return React.createElement(StyledBannerIcon, __assign({ icon: icon !== null && icon !== void 0 ? icon : defaultIcon,
|
|
39
|
+
var _c = useBannerIcon(localModel, elemProps), defaultIcon = _c.icon, props = __rest(_c, ["icon"]);
|
|
40
|
+
return React.createElement(StyledBannerIcon, __assign({ icon: icon !== null && icon !== void 0 ? icon : defaultIcon, ref: ref }, props));
|
|
41
41
|
},
|
|
42
42
|
});
|
|
@@ -3,9 +3,9 @@ export { SecondaryButton, SecondaryButtonProps } from './lib/SecondaryButton';
|
|
|
3
3
|
export { TertiaryButton, TertiaryButtonProps } from './lib/TertiaryButton';
|
|
4
4
|
export { DeleteButton, DeleteButtonProps } from './lib/DeleteButton';
|
|
5
5
|
export { DeprecatedButton as deprecated_Button, DeprecatedButtonProps, } from './lib/deprecated_Button';
|
|
6
|
-
export { IconButton, IconButtonProps } from './lib/IconButton';
|
|
7
6
|
export { ToolbarIconButton, ToolbarIconButtonProps } from './lib/ToolbarIconButton';
|
|
8
7
|
export { ToolbarDropdownButton, ToolbarDropdownButtonProps } from './lib/ToolbarDropdownButton';
|
|
9
8
|
export { Hyperlink, HyperlinkProps } from './lib/Hyperlink';
|
|
9
|
+
export { BaseButton, ButtonContainerProps } from './lib/BaseButton';
|
|
10
10
|
export * from './lib/types';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACL,gBAAgB,IAAI,iBAAiB,EACrC,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACL,gBAAgB,IAAI,iBAAiB,EACrC,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAC,qBAAqB,EAAE,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAE,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAClE,cAAc,aAAa,CAAC"}
|
package/dist/es6/button/index.js
CHANGED
|
@@ -3,8 +3,8 @@ export { SecondaryButton } from './lib/SecondaryButton';
|
|
|
3
3
|
export { TertiaryButton } from './lib/TertiaryButton';
|
|
4
4
|
export { DeleteButton } from './lib/DeleteButton';
|
|
5
5
|
export { DeprecatedButton as deprecated_Button, } from './lib/deprecated_Button';
|
|
6
|
-
export { IconButton } from './lib/IconButton';
|
|
7
6
|
export { ToolbarIconButton } from './lib/ToolbarIconButton';
|
|
8
7
|
export { ToolbarDropdownButton } from './lib/ToolbarDropdownButton';
|
|
9
8
|
export { Hyperlink } from './lib/Hyperlink';
|
|
9
|
+
export { BaseButton } from './lib/BaseButton';
|
|
10
10
|
export * from './lib/types';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { GrowthBehavior } from '@workday/canvas-kit-react/common';
|
|
3
|
+
import { BoxProps } from '@workday/canvas-kit-react/layout';
|
|
4
|
+
import { ButtonColors, ButtonSizes, IconPositions, TertiaryButtonSizes } from './types';
|
|
5
|
+
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
6
|
+
export interface ButtonContainerProps extends BoxProps, GrowthBehavior {
|
|
7
|
+
colors?: ButtonColors;
|
|
8
|
+
/**
|
|
9
|
+
* There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
|
|
10
|
+
* If no size is provided, it will default to `medium`.
|
|
11
|
+
*
|
|
12
|
+
* @default 'medium'
|
|
13
|
+
*/
|
|
14
|
+
size?: ButtonSizes;
|
|
15
|
+
/**
|
|
16
|
+
* The ref to the button that the styled component renders.
|
|
17
|
+
*/
|
|
18
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the icon should received filled (colored background layer) or regular styles.
|
|
21
|
+
* Corresponds to `toggled` in ToolbarIconButton
|
|
22
|
+
*/
|
|
23
|
+
fillIcon?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const getMinWidthStyles: (children: React.ReactNode, size: ButtonSizes | TertiaryButtonSizes) => "auto" | "24px" | "32px" | "40px" | "80px" | "48px" | "112px" | "96px";
|
|
26
|
+
export declare const getPaddingStyles: (children: React.ReactNode, size: ButtonSizes | TertiaryButtonSizes, icon: CanvasSystemIcon | undefined, iconPosition: IconPositions | undefined) => string | 0;
|
|
27
|
+
export declare const BaseButton: import("../../common").ElementComponent<"button", ButtonContainerProps> & {
|
|
28
|
+
Icon: import("../../common").ElementComponent<"span", import("./parts/ButtonLabelIcon").ButtonLabelIconProps>;
|
|
29
|
+
Label: import("../../common").ElementComponent<"span", import("./parts/ButtonLabel").ButtonLabelProps>;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=BaseButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/BaseButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAEL,cAAc,EAMf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,QAAQ,EAAa,MAAM,kCAAkC,CAAC;AAGtE,OAAO,EAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAGtF,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,oBAAqB,SAAQ,QAAQ,EAAE,cAAc;IACpE,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAgLD,eAAO,MAAM,iBAAiB,aAClB,MAAM,SAAS,QACnB,WAAW,GAAG,mBAAmB,2EAcxC,CAAC;AAEF,eAAO,MAAM,gBAAgB,aACjB,MAAM,SAAS,QACnB,WAAW,GAAG,mBAAmB,QACjC,gBAAgB,GAAG,SAAS,gBACpB,aAAa,GAAG,SAAS,eAiDxC,CAAC;AAEF,eAAO,MAAM,UAAU;;;CAarB,CAAC"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import * as React from 'react';
|
|
24
|
+
import { ButtonLabelIcon } from './parts/ButtonLabelIcon';
|
|
25
|
+
import { ButtonLabel } from './parts/ButtonLabel';
|
|
26
|
+
import { createComponent, mouseFocusBehavior, focusRing, styled, } from '@workday/canvas-kit-react/common';
|
|
27
|
+
import { boxStyleFn } from '@workday/canvas-kit-react/layout';
|
|
28
|
+
import { borderRadius, space, spaceNumbers, type } from '@workday/canvas-kit-react/tokens';
|
|
29
|
+
function getIconColorSelectors(_a, color, fill) {
|
|
30
|
+
var themePrimary = _a.canvas.palette.primary;
|
|
31
|
+
return {
|
|
32
|
+
'&:focus span, &:hover span, & span': {
|
|
33
|
+
'.wd-icon-fill, .wd-icon-accent, .wd-icon-accent2': {
|
|
34
|
+
fill: color,
|
|
35
|
+
},
|
|
36
|
+
'.wd-icon-background': {
|
|
37
|
+
fill: fill ? color : undefined,
|
|
38
|
+
},
|
|
39
|
+
'.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2': {
|
|
40
|
+
fill: fill
|
|
41
|
+
? color === themePrimary.contrast
|
|
42
|
+
? themePrimary.main
|
|
43
|
+
: themePrimary.contrast
|
|
44
|
+
: color,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
var ButtonContainer = styled('button')(__assign(__assign({}, type.levels.subtext.large), { cursor: 'pointer', display: 'inline-flex', alignItems: 'center', justifyContent: 'center', boxSizing: 'border-box', boxShadow: 'none', outline: 'none', fontWeight: type.properties.fontWeights.bold, lineHeight: 'normal', whiteSpace: 'nowrap', WebkitFontSmoothing: 'antialiased', MozOsxFontSmoothing: 'grayscale', borderRadius: borderRadius.circle, position: 'relative', verticalAlign: 'middle', overflow: 'hidden', border: '1px solid transparent', background: 'transparent', transition: 'box-shadow 120ms linear, border 120ms linear, background-color 120ms linear, color 120ms linear', '&:disabled, &:disabled:active': {
|
|
50
|
+
cursor: 'default',
|
|
51
|
+
boxShadow: 'none',
|
|
52
|
+
opacity: 0.4,
|
|
53
|
+
}, '&:hover:active': { transitionDuration: '40ms' }, '& > *:first-of-type': {
|
|
54
|
+
marginLeft: '0',
|
|
55
|
+
}, '& > *:last-of-type': {
|
|
56
|
+
marginRight: 0,
|
|
57
|
+
} }), function (_a) {
|
|
58
|
+
var size = _a.size;
|
|
59
|
+
switch (size) {
|
|
60
|
+
case 'large':
|
|
61
|
+
return __assign(__assign({}, type.levels.body.small), { fontWeight: type.properties.fontWeights.bold, height: '48px', '& > * ': {
|
|
62
|
+
margin: "0 " + spaceNumbers.xxs / 2 + "px",
|
|
63
|
+
} });
|
|
64
|
+
case 'medium':
|
|
65
|
+
default:
|
|
66
|
+
return {
|
|
67
|
+
height: space.xl,
|
|
68
|
+
'& > * ': {
|
|
69
|
+
margin: "0 " + spaceNumbers.xxs / 2 + "px",
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
case 'small':
|
|
73
|
+
return {
|
|
74
|
+
height: space.l,
|
|
75
|
+
'& > * ': {
|
|
76
|
+
margin: "0 " + spaceNumbers.xxxs / 2 + "px",
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
case 'extraSmall':
|
|
80
|
+
return __assign(__assign({}, type.levels.subtext.medium), { fontWeight: type.properties.fontWeights.bold, height: space.m, '& > * ': {
|
|
81
|
+
margin: "0 " + spaceNumbers.xxxs / 2 + "px",
|
|
82
|
+
} });
|
|
83
|
+
}
|
|
84
|
+
}, function (_a) {
|
|
85
|
+
var grow = _a.grow;
|
|
86
|
+
return grow && { width: '100%', maxWidth: '100%' };
|
|
87
|
+
}, function (_a) {
|
|
88
|
+
var colors = _a.colors, fillIcon = _a.fillIcon, theme = _a.theme;
|
|
89
|
+
if (!colors) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
var baseStyles = __assign({ backgroundColor: colors.default.background, borderColor: colors.default.border, color: colors.default.label }, (colors.default.icon && __assign({ '.wd-icon-fill, .wd-icon-accent, .wd-icon-accent2, .wd-icon-background': {
|
|
93
|
+
transition: 'fill 120ms ease-in',
|
|
94
|
+
} }, getIconColorSelectors(theme, colors.default.icon, fillIcon))));
|
|
95
|
+
var hoverStyles = {
|
|
96
|
+
'&:hover': __assign({ backgroundColor: colors.hover.background, borderColor: colors.hover.border, color: colors.hover.label }, (colors.hover.icon && getIconColorSelectors(theme, colors.hover.icon, fillIcon))),
|
|
97
|
+
};
|
|
98
|
+
var activeStyles = {
|
|
99
|
+
'&:active, &:focus:active, &:hover:active': __assign({ backgroundColor: colors.active.background, borderColor: colors.active.border, color: colors.active.label }, (colors.active.icon && getIconColorSelectors(theme, colors.active.icon, fillIcon))),
|
|
100
|
+
};
|
|
101
|
+
return __assign(__assign(__assign(__assign(__assign(__assign({}, baseStyles), { '&:focus': __assign(__assign({ backgroundColor: colors.focus.background, borderColor: colors.focus.border, color: colors.focus.label }, (colors.focus.focusRing || focusRing({ separation: 2 }, theme))), (colors.focus.icon && getIconColorSelectors(theme, colors.focus.icon, fillIcon))) }), activeStyles), hoverStyles), { '&:disabled, &:active:disabled, &:focus:disabled, &:hover:disabled': __assign({ backgroundColor: colors.disabled.background, borderColor: colors.disabled.border, color: colors.disabled.label, opacity: colors.disabled.opacity }, (colors.disabled.icon && getIconColorSelectors(theme, colors.disabled.icon, fillIcon))) }), mouseFocusBehavior({
|
|
102
|
+
'&:focus': __assign(__assign(__assign(__assign({}, baseStyles), { outline: 'none', boxShadow: 'none', animation: 'none' }), hoverStyles), activeStyles),
|
|
103
|
+
}));
|
|
104
|
+
}, boxStyleFn);
|
|
105
|
+
export var getMinWidthStyles = function (children, size) {
|
|
106
|
+
switch (size) {
|
|
107
|
+
case 'large':
|
|
108
|
+
return children ? '112px' : '48px';
|
|
109
|
+
case 'medium':
|
|
110
|
+
return children ? '96px' : space.xl;
|
|
111
|
+
case 'small':
|
|
112
|
+
return children ? space.xxxl : space.l;
|
|
113
|
+
case 'extraSmall':
|
|
114
|
+
return children ? 'auto' : space.m;
|
|
115
|
+
default:
|
|
116
|
+
return children ? '96px' : space.xl;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
export var getPaddingStyles = function (children, size, icon, iconPosition) {
|
|
120
|
+
// In order to calculate the correct padding, we need to know its children
|
|
121
|
+
// and what side the icon is on and if there's an icon provided
|
|
122
|
+
if (!children) {
|
|
123
|
+
// icon buttons do not have any padding
|
|
124
|
+
return 0;
|
|
125
|
+
}
|
|
126
|
+
// If there are children AND an icon
|
|
127
|
+
// 1. We check what side the icon is in
|
|
128
|
+
// 2. Adjust padding to visually center the icon and text
|
|
129
|
+
// If there is children (most likely just text)
|
|
130
|
+
// 1. We keep the padding the same on both side
|
|
131
|
+
switch (size) {
|
|
132
|
+
case 'large':
|
|
133
|
+
return icon
|
|
134
|
+
? iconPosition === 'start'
|
|
135
|
+
? "0 " + space.l + " 0 " + space.m
|
|
136
|
+
: "0 " + space.m + " 0 " + space.l
|
|
137
|
+
: "0 " + space.l;
|
|
138
|
+
case 'medium':
|
|
139
|
+
return icon
|
|
140
|
+
? iconPosition === 'start'
|
|
141
|
+
? "0 " + space.m + " 0 20px"
|
|
142
|
+
: "0 20px 0 " + space.m
|
|
143
|
+
: "0 " + space.m;
|
|
144
|
+
case 'small':
|
|
145
|
+
return icon
|
|
146
|
+
? iconPosition === 'start'
|
|
147
|
+
? "0 " + space.s + " 0 " + space.xs
|
|
148
|
+
: "0 " + space.xs + " 0 " + space.s
|
|
149
|
+
: "0 " + space.s;
|
|
150
|
+
case 'extraSmall':
|
|
151
|
+
return icon
|
|
152
|
+
? iconPosition === 'start'
|
|
153
|
+
? "0 " + space.xs + " 0 " + space.xxs
|
|
154
|
+
: "0 " + space.xxs + " 0 " + space.xs
|
|
155
|
+
: "0 " + space.xs;
|
|
156
|
+
default:
|
|
157
|
+
return icon
|
|
158
|
+
? iconPosition === 'start'
|
|
159
|
+
? "0 " + space.m + " 0 20px"
|
|
160
|
+
: "0 20px 0 " + space.m
|
|
161
|
+
: "0 " + space.m;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
export var BaseButton = createComponent('button')({
|
|
165
|
+
displayName: 'Button',
|
|
166
|
+
Component: function (_a, ref, Element) {
|
|
167
|
+
var children = _a.children, elemProps = __rest(_a, ["children"]);
|
|
168
|
+
return (React.createElement(ButtonContainer, __assign({ as: Element, ref: ref }, elemProps), children));
|
|
169
|
+
},
|
|
170
|
+
subComponents: {
|
|
171
|
+
Icon: ButtonLabelIcon,
|
|
172
|
+
Label: ButtonLabel,
|
|
173
|
+
},
|
|
174
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/DeleteButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,cAAc,EAEd,SAAS,EAGV,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,iBAAkB,SAAQ,SAAS,EAAE,cAAc;IAClE;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;
|
|
1
|
+
{"version":3,"file":"DeleteButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/DeleteButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,cAAc,EAEd,SAAS,EAGV,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,iBAAkB,SAAQ,SAAS,EAAE,cAAc;IAClE;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AA0BD,eAAO,MAAM,YAAY,sEA0BvB,CAAC"}
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import * as React from 'react';
|
|
24
|
-
import {
|
|
24
|
+
import { BaseButton, getMinWidthStyles, getPaddingStyles } from './BaseButton';
|
|
25
25
|
import { useTheme, createComponent, } from '@workday/canvas-kit-react/common';
|
|
26
26
|
var getDeleteButtonColors = function (_a) {
|
|
27
27
|
var themeError = _a.canvas.palette.error;
|
|
@@ -41,6 +41,7 @@ var getDeleteButtonColors = function (_a) {
|
|
|
41
41
|
},
|
|
42
42
|
disabled: {
|
|
43
43
|
background: themeError.light,
|
|
44
|
+
opacity: '1',
|
|
44
45
|
},
|
|
45
46
|
});
|
|
46
47
|
};
|
|
@@ -54,7 +55,7 @@ export var DeleteButton = createComponent('button')({
|
|
|
54
55
|
// TODO: Fix useTheme and make it a real hook
|
|
55
56
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
56
57
|
theme = _b === void 0 ? useTheme() : _b, _c = _a.size, size = _c === void 0 ? 'medium' : _c, children = _a.children, elemProps = __rest(_a, ["theme", "size", "children"]);
|
|
57
|
-
return (React.createElement(
|
|
58
|
-
React.createElement(
|
|
58
|
+
return (React.createElement(BaseButton, __assign({ padding: getPaddingStyles(children, size, undefined, undefined), minWidth: getMinWidthStyles(children, size), ref: ref, as: Element, colors: getDeleteButtonColors(theme), size: size }, elemProps),
|
|
59
|
+
React.createElement(BaseButton.Label, null, children)));
|
|
59
60
|
},
|
|
60
61
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { GrowthBehavior, Themeable
|
|
2
|
+
import { GrowthBehavior, Themeable } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
4
4
|
import { ButtonSizes, IconPositions } from './types';
|
|
5
5
|
export interface PrimaryButtonProps extends Themeable, GrowthBehavior {
|
|
@@ -15,20 +15,15 @@ export interface PrimaryButtonProps extends Themeable, GrowthBehavior {
|
|
|
15
15
|
* @default 'medium'
|
|
16
16
|
*/
|
|
17
17
|
size?: ButtonSizes;
|
|
18
|
-
/**
|
|
19
|
-
* The data label of the Button.
|
|
20
|
-
* Note: not displayed at `small` size
|
|
21
|
-
*/
|
|
22
|
-
dataLabel?: String;
|
|
23
18
|
/**
|
|
24
19
|
* The icon of the Button.
|
|
25
20
|
* Note: not displayed at `small` size
|
|
26
21
|
*/
|
|
27
22
|
icon?: CanvasSystemIcon;
|
|
28
23
|
/**
|
|
29
|
-
* Button icon positions can either be `
|
|
30
|
-
* If no value is provided, it defaults to `
|
|
31
|
-
* @default '
|
|
24
|
+
* Button icon positions can either be `start` or `end`.
|
|
25
|
+
* If no value is provided, it defaults to `start`.
|
|
26
|
+
* @default 'start'
|
|
32
27
|
*/
|
|
33
28
|
iconPosition?: IconPositions;
|
|
34
29
|
/**
|
|
@@ -39,71 +34,4 @@ export interface PrimaryButtonProps extends Themeable, GrowthBehavior {
|
|
|
39
34
|
children?: React.ReactNode;
|
|
40
35
|
}
|
|
41
36
|
export declare const PrimaryButton: import("../../common").ElementComponent<"button", PrimaryButtonProps>;
|
|
42
|
-
export declare const getPrimaryButtonColors: (variant: 'inverse' | undefined, theme: EmotionCanvasTheme) => {
|
|
43
|
-
default: {
|
|
44
|
-
background: string;
|
|
45
|
-
icon: string;
|
|
46
|
-
label: string;
|
|
47
|
-
labelData?: undefined;
|
|
48
|
-
};
|
|
49
|
-
hover: {
|
|
50
|
-
background: string;
|
|
51
|
-
icon?: undefined;
|
|
52
|
-
label?: undefined;
|
|
53
|
-
labelData?: undefined;
|
|
54
|
-
};
|
|
55
|
-
active: {
|
|
56
|
-
background: string;
|
|
57
|
-
icon?: undefined;
|
|
58
|
-
label?: undefined;
|
|
59
|
-
labelData?: undefined;
|
|
60
|
-
};
|
|
61
|
-
focus: {
|
|
62
|
-
background: string;
|
|
63
|
-
border?: undefined;
|
|
64
|
-
icon?: undefined;
|
|
65
|
-
label?: undefined;
|
|
66
|
-
labelData?: undefined;
|
|
67
|
-
focusRing?: undefined;
|
|
68
|
-
};
|
|
69
|
-
disabled: {
|
|
70
|
-
background: string;
|
|
71
|
-
icon?: undefined;
|
|
72
|
-
label?: undefined;
|
|
73
|
-
labelData?: undefined;
|
|
74
|
-
};
|
|
75
|
-
} | {
|
|
76
|
-
default: {
|
|
77
|
-
background: string;
|
|
78
|
-
icon: string;
|
|
79
|
-
label: string;
|
|
80
|
-
labelData: string;
|
|
81
|
-
};
|
|
82
|
-
hover: {
|
|
83
|
-
background: string;
|
|
84
|
-
icon: string;
|
|
85
|
-
label: string;
|
|
86
|
-
labelData: string;
|
|
87
|
-
};
|
|
88
|
-
active: {
|
|
89
|
-
background: string;
|
|
90
|
-
icon: string;
|
|
91
|
-
label: string;
|
|
92
|
-
labelData: string;
|
|
93
|
-
};
|
|
94
|
-
focus: {
|
|
95
|
-
background: string;
|
|
96
|
-
border: string;
|
|
97
|
-
icon: string;
|
|
98
|
-
label: string;
|
|
99
|
-
labelData: string;
|
|
100
|
-
focusRing: import("@emotion/react").CSSObject;
|
|
101
|
-
};
|
|
102
|
-
disabled: {
|
|
103
|
-
background: string;
|
|
104
|
-
icon: string;
|
|
105
|
-
label: string;
|
|
106
|
-
labelData: string;
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
37
|
//# sourceMappingURL=PrimaryButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/PrimaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,cAAc,EAEd,SAAS,
|
|
1
|
+
{"version":3,"file":"PrimaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/PrimaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,cAAc,EAEd,SAAS,EAIV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AA2EnD,MAAM,WAAW,kBAAmB,SAAQ,SAAS,EAAE,cAAc;IACnE;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,aAAa,uEA+CxB,CAAC"}
|