@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
|
@@ -21,10 +21,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import * as React from 'react';
|
|
24
|
-
import { focusRing, useTheme, createComponent, } from '@workday/canvas-kit-react/common';
|
|
25
|
-
import { colors, space
|
|
26
|
-
import {
|
|
27
|
-
var getTertiaryButtonColors = function (variant, theme) {
|
|
24
|
+
import { focusRing, useTheme, createComponent, styled, } from '@workday/canvas-kit-react/common';
|
|
25
|
+
import { borderRadius, colors, space } from '@workday/canvas-kit-react/tokens';
|
|
26
|
+
import { BaseButton } from './BaseButton';
|
|
27
|
+
var getTertiaryButtonColors = function (variant, theme, children) {
|
|
28
28
|
var themePrimary = theme.canvas.palette.primary;
|
|
29
29
|
if (variant === 'inverse') {
|
|
30
30
|
return {
|
|
@@ -64,66 +64,94 @@ var getTertiaryButtonColors = function (variant, theme) {
|
|
|
64
64
|
else {
|
|
65
65
|
return {
|
|
66
66
|
default: {
|
|
67
|
-
icon: themePrimary.main,
|
|
67
|
+
icon: children ? themePrimary.main : colors.blackPepper400,
|
|
68
68
|
label: themePrimary.main,
|
|
69
69
|
},
|
|
70
70
|
hover: {
|
|
71
71
|
background: colors.soap200,
|
|
72
|
-
icon: themePrimary.dark,
|
|
72
|
+
icon: children ? themePrimary.dark : colors.blackPepper500,
|
|
73
73
|
label: themePrimary.dark,
|
|
74
74
|
},
|
|
75
75
|
active: {
|
|
76
76
|
background: colors.soap300,
|
|
77
|
-
icon: themePrimary.dark,
|
|
77
|
+
icon: children ? themePrimary.dark : colors.blackPepper500,
|
|
78
78
|
label: themePrimary.dark,
|
|
79
79
|
},
|
|
80
80
|
focus: {
|
|
81
|
-
icon: themePrimary.
|
|
82
|
-
label: themePrimary.
|
|
83
|
-
focusRing: focusRing({}, theme),
|
|
81
|
+
icon: children ? themePrimary.main : colors.blackPepper500,
|
|
82
|
+
label: themePrimary.main,
|
|
83
|
+
focusRing: focusRing({ innerColor: colors.blueberry400 }, theme),
|
|
84
84
|
},
|
|
85
85
|
disabled: {
|
|
86
|
-
icon: themePrimary.main,
|
|
86
|
+
icon: children ? themePrimary.main : colors.blackPepper400,
|
|
87
87
|
label: themePrimary.main,
|
|
88
88
|
},
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
|
-
var
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
var StyledButtonLabel = styled(BaseButton.Label)({
|
|
93
|
+
textDecoration: 'underline',
|
|
94
|
+
});
|
|
95
|
+
var StyledTertiaryButtonContainer = styled(BaseButton)({
|
|
96
|
+
border: '0',
|
|
97
|
+
}, function (_a) {
|
|
98
|
+
var allCaps = _a.allCaps;
|
|
99
|
+
return ({
|
|
100
|
+
textTransform: allCaps ? 'uppercase' : undefined,
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
var getPaddingStyles = function (icon, iconPosition, children, size) {
|
|
104
|
+
if (children) {
|
|
105
|
+
// if there is an icon on the left, add 4px extra padding to the right for visual balance
|
|
106
|
+
if (icon && iconPosition === 'start') {
|
|
107
|
+
if (size === 'extraSmall') {
|
|
108
|
+
return "0 " + space.xxs + " 0 " + space.xxxs;
|
|
109
|
+
}
|
|
110
|
+
return "0 " + space.xs + " 0 " + space.xxs;
|
|
111
|
+
}
|
|
112
|
+
// if there is an icon on the right, add 4px extra padding to the left for visual balance
|
|
113
|
+
if (icon && iconPosition === 'end') {
|
|
114
|
+
if (size === 'extraSmall') {
|
|
115
|
+
return "0 " + space.xxxs + " 0 " + space.xxs;
|
|
116
|
+
}
|
|
117
|
+
return "0 " + space.xxs + " 0 " + space.xs;
|
|
118
|
+
}
|
|
119
|
+
// if there is no icon, return the default padding
|
|
120
|
+
return "0 " + space.xxs;
|
|
96
121
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
return "0 " + space.xxs + " 0 " + space.xs;
|
|
122
|
+
else {
|
|
123
|
+
return '0';
|
|
100
124
|
}
|
|
101
|
-
// if there is no icon, return the default padding
|
|
102
|
-
return "0 " + space.xxs;
|
|
103
125
|
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
126
|
+
var getMinWidthStyles = function (children, size) {
|
|
127
|
+
var minWidthNum;
|
|
128
|
+
switch (size) {
|
|
129
|
+
case 'large':
|
|
130
|
+
minWidthNum = '48px';
|
|
131
|
+
break;
|
|
132
|
+
case 'medium':
|
|
133
|
+
minWidthNum = space.xl;
|
|
134
|
+
break;
|
|
135
|
+
case 'small':
|
|
136
|
+
minWidthNum = space.l;
|
|
137
|
+
break;
|
|
138
|
+
case 'extraSmall':
|
|
139
|
+
minWidthNum = space.m;
|
|
140
|
+
break;
|
|
141
|
+
default:
|
|
142
|
+
minWidthNum = space.xl;
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
return children ? 'auto' : minWidthNum;
|
|
110
146
|
};
|
|
111
147
|
export var TertiaryButton = createComponent('button')({
|
|
112
148
|
displayName: 'TertiaryButton',
|
|
113
149
|
Component: function (_a, ref, Element) {
|
|
114
|
-
var
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
theme = _b === void 0 ? useTheme() : _b, _c = _a.size, size = _c === void 0 ? 'medium' : _c, _d = _a.iconPosition, iconPosition = _d === void 0 ? 'left' : _d, variant = _a.variant, children = _a.children, icon = _a.icon, _e = _a.shouldMirrorIcon, shouldMirrorIcon = _e === void 0 ? false : _e, allCaps = _a.allCaps, elemProps = __rest(_a, ["theme", "size", "iconPosition", "variant", "children", "icon", "shouldMirrorIcon", "allCaps"]);
|
|
121
|
-
var allContainerStyles = __assign({ borderRadius: borderRadius.m, border: '0', padding: getPaddingStyles(icon, iconPosition), minWidth: 'auto', textTransform: allCaps ? 'uppercase' : undefined, '.wdc-text-button-label': {
|
|
122
|
-
textDecoration: 'underline',
|
|
123
|
-
} }, disabledButtonOpacity);
|
|
124
|
-
return (React.createElement(ButtonContainer, __assign({ ref: ref, as: Element, colors: getTertiaryButtonColors(variant, theme), size: size, extraStyles: allContainerStyles }, elemProps),
|
|
125
|
-
icon && iconPosition === 'left' && (React.createElement(ButtonLabelIcon, { size: size, iconPosition: iconPosition, icon: icon, shouldMirrorIcon: shouldMirrorIcon })),
|
|
126
|
-
React.createElement(ButtonLabel, { className: "wdc-text-button-label" }, children),
|
|
127
|
-
icon && iconPosition === 'right' && (React.createElement(ButtonLabelIcon, { size: size, iconPosition: iconPosition, icon: icon, shouldMirrorIcon: shouldMirrorIcon }))));
|
|
150
|
+
var _b = _a.size, size = _b === void 0 ? 'medium' : _b, _c = _a.iconPosition, iconPosition = _c === void 0 ? 'start' : _c, variant = _a.variant, children = _a.children, icon = _a.icon, _d = _a.shouldMirrorIcon, shouldMirrorIcon = _d === void 0 ? false : _d, allCaps = _a.allCaps, elemProps = __rest(_a, ["size", "iconPosition", "variant", "children", "icon", "shouldMirrorIcon", "allCaps"]);
|
|
151
|
+
var theme = useTheme();
|
|
152
|
+
return (React.createElement(StyledTertiaryButtonContainer, __assign({ ref: ref, as: Element, allCaps: allCaps, colors: getTertiaryButtonColors(variant, theme, children), size: size, padding: getPaddingStyles(icon, iconPosition, children, size), minWidth: getMinWidthStyles(children, size), style: { borderRadius: children ? borderRadius.m : borderRadius.circle } }, elemProps),
|
|
153
|
+
icon && iconPosition === 'start' && (React.createElement(BaseButton.Icon, { size: size, iconPosition: iconPosition, icon: icon, shouldMirrorIcon: shouldMirrorIcon })),
|
|
154
|
+
children && React.createElement(StyledButtonLabel, null, children),
|
|
155
|
+
icon && iconPosition === 'end' && (React.createElement(BaseButton.Icon, { size: size, iconPosition: iconPosition, icon: icon, shouldMirrorIcon: shouldMirrorIcon }))));
|
|
128
156
|
},
|
|
129
157
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarDropdownButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/ToolbarDropdownButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,SAAS,
|
|
1
|
+
{"version":3,"file":"ToolbarDropdownButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/ToolbarDropdownButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EAAC,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AAE3D,MAAM,WAAW,0BACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,gBAAgB,CAAC,EAChE,SAAS;CAAG;AAwBhB,eAAO,MAAM,qBAAqB,+EAuChC,CAAC"}
|
|
@@ -22,11 +22,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import React from 'react';
|
|
24
24
|
import { colors, space, borderRadius } from '@workday/canvas-kit-react/tokens';
|
|
25
|
-
import { focusRing, useTheme, createComponent, } from '@workday/canvas-kit-react/common';
|
|
26
|
-
import {
|
|
27
|
-
import { ButtonContainer } from './parts';
|
|
25
|
+
import { focusRing, useTheme, createComponent, styled, } from '@workday/canvas-kit-react/common';
|
|
26
|
+
import { BaseButton } from './BaseButton';
|
|
28
27
|
import { chevronDownSmallIcon } from '@workday/canvas-system-icons-web';
|
|
29
|
-
var
|
|
28
|
+
var StyledToolbarDropdownButton = styled(BaseButton)({
|
|
30
29
|
padding: space.zero,
|
|
31
30
|
minWidth: space.l,
|
|
32
31
|
width: 'auto',
|
|
@@ -46,7 +45,7 @@ var containerStyles = {
|
|
|
46
45
|
marginRight: 0,
|
|
47
46
|
width: 18,
|
|
48
47
|
},
|
|
49
|
-
};
|
|
48
|
+
});
|
|
50
49
|
export var ToolbarDropdownButton = createComponent('button')({
|
|
51
50
|
displayName: 'ToolbarDropdownButton',
|
|
52
51
|
Component: function (_a, ref, Element) {
|
|
@@ -57,9 +56,9 @@ export var ToolbarDropdownButton = createComponent('button')({
|
|
|
57
56
|
// TODO: Fix useTheme and make it a real hook
|
|
58
57
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
59
58
|
theme = _b === void 0 ? useTheme() : _b, icon = _a.icon, _c = _a.shouldMirrorIcon, shouldMirrorIcon = _c === void 0 ? false : _c, children = _a.children, elemProps = __rest(_a, ["theme", "icon", "shouldMirrorIcon", "children"]);
|
|
60
|
-
return (React.createElement(
|
|
61
|
-
icon ? (React.createElement(
|
|
62
|
-
React.createElement(
|
|
59
|
+
return (React.createElement(StyledToolbarDropdownButton, __assign({ ref: ref, as: Element, colors: getToolbarDropdownButtonColors(theme) }, elemProps),
|
|
60
|
+
icon ? (React.createElement(BaseButton.Icon, { className: 'wdc-toolbar-dropdown-btn-custom-icon', icon: icon, shouldMirrorIcon: shouldMirrorIcon })) : (children),
|
|
61
|
+
React.createElement(BaseButton.Icon, { className: 'wdc-toolbar-dropdown-btn-arrow', icon: chevronDownSmallIcon, shouldMirrorIcon: shouldMirrorIcon })));
|
|
63
62
|
},
|
|
64
63
|
});
|
|
65
64
|
var getToolbarDropdownButtonColors = function (theme) {
|
|
@@ -83,6 +82,7 @@ var getToolbarDropdownButtonColors = function (theme) {
|
|
|
83
82
|
disabled: {
|
|
84
83
|
icon: colors.soap600,
|
|
85
84
|
background: 'transparent',
|
|
85
|
+
opacity: '1',
|
|
86
86
|
},
|
|
87
87
|
};
|
|
88
88
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Themeable } from '@workday/canvas-kit-react/common';
|
|
2
|
-
import {
|
|
3
|
-
export interface ToolbarIconButtonProps extends Omit<
|
|
2
|
+
import { TertiaryButtonProps } from './TertiaryButton';
|
|
3
|
+
export interface ToolbarIconButtonProps extends Omit<TertiaryButtonProps, 'size' | 'variant'>, Themeable {
|
|
4
|
+
onToggleChange?: (toggled: boolean | undefined) => void;
|
|
5
|
+
toggled?: boolean;
|
|
6
|
+
shouldMirrorIcon?: boolean;
|
|
4
7
|
}
|
|
5
8
|
export declare const ToolbarIconButton: import("../../common").ElementComponent<"button", ToolbarIconButtonProps>;
|
|
6
9
|
//# sourceMappingURL=ToolbarIconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarIconButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/ToolbarIconButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,SAAS,
|
|
1
|
+
{"version":3,"file":"ToolbarIconButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/ToolbarIconButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAErD,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC,EACnD,SAAS;IACX,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,KAAK,IAAI,CAAC;IACxD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAWD,eAAO,MAAM,iBAAiB,2EAiD5B,CAAC"}
|
|
@@ -22,24 +22,17 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
var _a;
|
|
24
24
|
import * as React from 'react';
|
|
25
|
-
import { colors, space
|
|
26
|
-
import { focusRing, useTheme, createComponent, } from '@workday/canvas-kit-react/common';
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
var containerStyles = (_a = {
|
|
30
|
-
padding: 0,
|
|
31
|
-
minWidth: space.l,
|
|
32
|
-
width: space.l,
|
|
33
|
-
height: space.l,
|
|
34
|
-
borderRadius: borderRadius.m
|
|
35
|
-
},
|
|
25
|
+
import { borderRadius, colors, space } from '@workday/canvas-kit-react/tokens';
|
|
26
|
+
import { focusRing, useTheme, createComponent, styled, } from '@workday/canvas-kit-react/common';
|
|
27
|
+
import { BaseButton } from './BaseButton';
|
|
28
|
+
var StyledToolbarIconButton = styled(BaseButton)((_a = {},
|
|
36
29
|
_a['& .wd-icon'] = {
|
|
37
30
|
display: 'inline-block',
|
|
38
31
|
verticalAlign: 'middle',
|
|
39
32
|
width: 20,
|
|
40
33
|
height: 20,
|
|
41
34
|
},
|
|
42
|
-
_a);
|
|
35
|
+
_a));
|
|
43
36
|
export var ToolbarIconButton = createComponent('button')({
|
|
44
37
|
displayName: 'ToolbarIconButton',
|
|
45
38
|
Component: function (_a, ref, Element) {
|
|
@@ -62,7 +55,7 @@ export var ToolbarIconButton = createComponent('button')({
|
|
|
62
55
|
}
|
|
63
56
|
}
|
|
64
57
|
}, [toggled, onToggleChange]);
|
|
65
|
-
return (React.createElement(
|
|
58
|
+
return (React.createElement(StyledToolbarIconButton, __assign({ ref: ref, as: Element, colors: getToolbarIconButtonColors(theme, toggled), size: 'small', fillIcon: toggled, "aria-pressed": toggled, padding: "zero", minWidth: space.l, width: space.l, height: space.l, borderRadius: borderRadius.m }, elemProps), icon ? React.createElement(BaseButton.Icon, { icon: icon, shouldMirrorIcon: shouldMirrorIcon }) : children));
|
|
66
59
|
},
|
|
67
60
|
});
|
|
68
61
|
var getToolbarIconButtonColors = function (theme, toggled) {
|
|
@@ -88,6 +81,7 @@ var getToolbarIconButtonColors = function (theme, toggled) {
|
|
|
88
81
|
disabled: {
|
|
89
82
|
icon: toggled ? themePrimary.light : colors.soap600,
|
|
90
83
|
background: toggled ? themePrimary.lightest : 'transparent',
|
|
84
|
+
opacity: '1',
|
|
91
85
|
},
|
|
92
86
|
};
|
|
93
87
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { BoxProps } from '@workday/canvas-kit-react/layout';
|
|
2
|
+
export interface ButtonLabelProps extends BoxProps {
|
|
3
|
+
}
|
|
4
|
+
export declare const ButtonLabel: import("../../../common").ElementComponent<"span", ButtonLabelProps>;
|
|
5
5
|
//# sourceMappingURL=ButtonLabel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonLabel.d.ts","sourceRoot":"","sources":["../../../../../button/lib/parts/ButtonLabel.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"ButtonLabel.d.ts","sourceRoot":"","sources":["../../../../../button/lib/parts/ButtonLabel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAM,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAE/D,MAAM,WAAW,gBAAiB,SAAQ,QAAQ;CAAG;AASrD,eAAO,MAAM,WAAW,sEAStB,CAAC"}
|
|
@@ -1,7 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 React from 'react';
|
|
24
|
+
import { styled, createComponent } from '@workday/canvas-kit-react/common';
|
|
25
|
+
import { Box } from '@workday/canvas-kit-react/layout';
|
|
26
|
+
var StyledButtonLabel = styled(Box.as('span'))({
|
|
3
27
|
position: 'relative',
|
|
4
28
|
textOverflow: 'ellipsis',
|
|
5
29
|
overflow: 'hidden',
|
|
6
30
|
whiteSpace: 'nowrap',
|
|
7
31
|
});
|
|
32
|
+
export var ButtonLabel = createComponent('span')({
|
|
33
|
+
displayName: 'ButtonLabel',
|
|
34
|
+
Component: function (_a, ref, Element) {
|
|
35
|
+
var children = _a.children, elemProps = __rest(_a, ["children"]);
|
|
36
|
+
return (React.createElement(StyledButtonLabel, __assign({ as: Element, ref: ref }, elemProps), children));
|
|
37
|
+
},
|
|
38
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
2
2
|
import { ButtonSizes, IconPositions } from '../types';
|
|
3
|
-
|
|
3
|
+
import { BoxProps } from '@workday/canvas-kit-react/layout';
|
|
4
|
+
export interface ButtonLabelIconProps extends BoxProps {
|
|
4
5
|
/**
|
|
5
6
|
* There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
|
|
6
7
|
*
|
|
@@ -15,7 +16,7 @@ export interface ButtonLabelIconProps {
|
|
|
15
16
|
/**
|
|
16
17
|
* Button icon positions can either be `left` or `right`.
|
|
17
18
|
* If no value is provided, it defaults to `left`.
|
|
18
|
-
* @default '
|
|
19
|
+
* @default 'start'
|
|
19
20
|
*/
|
|
20
21
|
iconPosition?: IconPositions;
|
|
21
22
|
/**
|
|
@@ -24,5 +25,5 @@ export interface ButtonLabelIconProps {
|
|
|
24
25
|
*/
|
|
25
26
|
shouldMirrorIcon?: boolean;
|
|
26
27
|
}
|
|
27
|
-
export declare const ButtonLabelIcon: (
|
|
28
|
+
export declare const ButtonLabelIcon: import("../../../common").ElementComponent<"span", ButtonLabelIconProps>;
|
|
28
29
|
//# sourceMappingURL=ButtonLabelIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonLabelIcon.d.ts","sourceRoot":"","sources":["../../../../../button/lib/parts/ButtonLabelIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"ButtonLabelIcon.d.ts","sourceRoot":"","sources":["../../../../../button/lib/parts/ButtonLabelIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,UAAU,CAAC;AAGpD,OAAO,EAAC,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAE1D,MAAM,WAAW,oBAAqB,SAAQ,QAAQ;IACpD;;;;OAIG;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;CAC5B;AASD,eAAO,MAAM,eAAe,0EAyB1B,CAAC"}
|
|
@@ -20,52 +20,23 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
import isPropValid from '@emotion/is-prop-valid';
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
26
25
|
import { SystemIcon } from '@workday/canvas-kit-react/icon';
|
|
27
|
-
import { styled } from '@workday/canvas-kit-react/common';
|
|
28
26
|
var iconSizes = {
|
|
29
27
|
extraSmall: 18,
|
|
30
28
|
small: 20,
|
|
31
29
|
medium: 20,
|
|
32
30
|
large: 24,
|
|
33
31
|
};
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
else {
|
|
46
|
-
return {
|
|
47
|
-
marginLeft: "-" + balancingMargin + " !important",
|
|
48
|
-
marginRight: undefined,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
var ButtonLabelIconStyled = styled('span', {
|
|
53
|
-
shouldForwardProp: function (prop) { return isPropValid(prop) && prop !== 'size'; },
|
|
54
|
-
})({
|
|
55
|
-
display: 'inline-block',
|
|
56
|
-
}, function (_a) {
|
|
57
|
-
var size = _a.size;
|
|
58
|
-
return ({
|
|
59
|
-
width: size ? iconSizes[size] : iconSizes.medium,
|
|
60
|
-
height: size ? iconSizes[size] : iconSizes.medium,
|
|
61
|
-
});
|
|
62
|
-
}, getIconPositionStyles);
|
|
63
|
-
export var ButtonLabelIcon = function (_a) {
|
|
64
|
-
var icon = _a.icon, size = _a.size, iconPosition = _a.iconPosition, _b = _a.shouldMirrorIcon, shouldMirrorIcon = _b === void 0 ? false : _b, elemProps = __rest(_a, ["icon", "size", "iconPosition", "shouldMirrorIcon"]);
|
|
65
|
-
if (icon === undefined) {
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
var iconSize = size ? iconSizes[size] : undefined;
|
|
69
|
-
return (React.createElement(ButtonLabelIconStyled, __assign({ iconPosition: iconPosition, size: size }, elemProps),
|
|
70
|
-
React.createElement(SystemIcon, { size: iconSize, icon: icon, shouldMirror: shouldMirrorIcon })));
|
|
71
|
-
};
|
|
32
|
+
export var ButtonLabelIcon = createComponent('span')({
|
|
33
|
+
displayName: 'ButtonLabelIconNew',
|
|
34
|
+
Component: function (_a, ref, Element) {
|
|
35
|
+
var icon = _a.icon, _b = _a.size, size = _b === void 0 ? 'medium' : _b, _c = _a.shouldMirrorIcon, shouldMirrorIcon = _c === void 0 ? false : _c, elemProps = __rest(_a, ["icon", "size", "shouldMirrorIcon"]);
|
|
36
|
+
if (icon === undefined) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
var iconSize = iconSizes[size];
|
|
40
|
+
return (React.createElement(SystemIcon, __assign({ size: iconSize, icon: icon, shouldMirror: shouldMirrorIcon, width: size ? iconSizes[size] : iconSizes.large, height: size ? iconSizes[size] : iconSizes.large, display: "inline-block" }, elemProps)));
|
|
41
|
+
},
|
|
42
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../button/lib/parts/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../button/lib/parts/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC"}
|
|
@@ -8,7 +8,7 @@ export interface ButtonStateColors {
|
|
|
8
8
|
icon?: string;
|
|
9
9
|
iconFill?: boolean;
|
|
10
10
|
label?: string;
|
|
11
|
-
|
|
11
|
+
opacity?: string;
|
|
12
12
|
}
|
|
13
13
|
export interface ButtonColors {
|
|
14
14
|
default: ButtonStateColors;
|
|
@@ -27,5 +27,5 @@ export interface ButtonColors {
|
|
|
27
27
|
*/
|
|
28
28
|
export declare type ButtonSizes = 'extraSmall' | 'small' | 'medium' | 'large';
|
|
29
29
|
export declare type TertiaryButtonSizes = 'extraSmall' | 'small' | 'medium';
|
|
30
|
-
export declare type IconPositions = '
|
|
30
|
+
export declare type IconPositions = 'start' | 'end';
|
|
31
31
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../button/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../button/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,KAAK,EAAE,iBAAiB,CAAC;IACzB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,iBAAiB,GAAG;QACzB,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CAAC;IACF,QAAQ,EAAE,iBAAiB,CAAC;CAC7B;AAED;;;;;GAKG;AACH,oBAAY,WAAW,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtE,oBAAY,mBAAmB,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;AACpE,oBAAY,aAAa,GAAG,OAAO,GAAG,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_brand-assets.d.ts","sourceRoot":"","sources":["../../../../../common/lib/parts/_brand-assets.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"_brand-assets.d.ts","sourceRoot":"","sources":["../../../../../common/lib/parts/_brand-assets.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,QAAsD,CAAC;AAE/E,eAAO,MAAM,YAAY,QAAuD,CAAC;AAEjF,eAAO,MAAM,YAAY,QAAuD,CAAC;AAEjF,eAAO,MAAM,aAAa,QAAwD,CAAC;AAEnF,eAAO,MAAM,gBAAgB,QAA4D,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var CDN_URI = '//design.workday.com/images/';
|
|
2
|
-
export var dubLogoBlue = "<img src=\"" + CDN_URI + "ck-dub-logo-blue.svg\">";
|
|
3
|
-
export var dubLogoWhite = "<img src=\"" + CDN_URI + "ck-dub-logo-white.svg\">";
|
|
4
|
-
export var wdayLogoBlue = "<img src=\"" + CDN_URI + "ck-wday-logo-blue.svg\">";
|
|
5
|
-
export var wdayLogoWhite = "<img src=\"" + CDN_URI + "ck-wday-logo-white.svg\">";
|
|
6
|
-
export var miniWdayLogoBlue = "<img src=\"" + CDN_URI + "ck-mini-wday-logo-blue.svg\">";
|
|
2
|
+
export var dubLogoBlue = "<img src=\"" + CDN_URI + "ck-dub-logo-blue.svg\" alt=\"\">";
|
|
3
|
+
export var dubLogoWhite = "<img src=\"" + CDN_URI + "ck-dub-logo-white.svg\" alt=\"\">";
|
|
4
|
+
export var wdayLogoBlue = "<img src=\"" + CDN_URI + "ck-wday-logo-blue.svg\" alt=\"\">";
|
|
5
|
+
export var wdayLogoWhite = "<img src=\"" + CDN_URI + "ck-wday-logo-white.svg\" alt=\"\">";
|
|
6
|
+
export var miniWdayLogoBlue = "<img src=\"" + CDN_URI + "ck-mini-wday-logo-blue.svg\" alt=\"\">";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StaticStates.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/StaticStates.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,yBAAyB,EAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAE/D,eAAO,MAAM,qBAAqB,uCAA0B,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"StaticStates.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/StaticStates.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,yBAAyB,EAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAE/D,eAAO,MAAM,qBAAqB,uCAA0B,aAAa,GAAG,SAoB3E,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,yBAAyB,CAAA;CAAC,GAAG,KAAK,CAAC,cAAc,CAC5F,WAAW,CACZ,CASA,CAAC"}
|
|
@@ -31,8 +31,11 @@ export var convertToStaticStates = function (obj) {
|
|
|
31
31
|
var newKey = key
|
|
32
32
|
.replace(/^:/, '&:') // handle shorthand like ":focus"
|
|
33
33
|
.replace(/,(\s+):/g, ',$1&:') // handle selectors like ":focus, :hover"
|
|
34
|
-
.replace(/:(focus|hover|active)/g, '.$1')
|
|
35
|
-
|
|
34
|
+
.replace(/:(focus|hover|active)/g, '.$1');
|
|
35
|
+
// Remove any selectors that use data-whatinput. Leaving them in would cause focus rings to disappear when the user clicks with a mouse.
|
|
36
|
+
if (/data-whatinput/.test(key)) {
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
36
39
|
var value = typeof obj[key] === 'object' ? convertToStaticStates(obj[key]) : obj[key];
|
|
37
40
|
var newObj = __assign(__assign({}, result), (_a = {}, _a[newKey] = value, _a));
|
|
38
41
|
return newObj;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { CanvasAccentIcon } from '@workday/design-assets-types';
|
|
3
2
|
import { CSSObject } from '@emotion/styled';
|
|
4
3
|
import { IconProps } from './Icon';
|
|
@@ -14,7 +13,7 @@ export interface AccentIconStyles {
|
|
|
14
13
|
*/
|
|
15
14
|
transparent?: boolean;
|
|
16
15
|
}
|
|
17
|
-
export interface AccentIconProps extends AccentIconStyles, Omit<IconProps, 'src' | 'type'> {
|
|
16
|
+
export interface AccentIconProps extends AccentIconStyles, Omit<IconProps, 'src' | 'type' | 'color'> {
|
|
18
17
|
/**
|
|
19
18
|
* The icon to display from `@workday/canvas-accent-icons-web`.
|
|
20
19
|
*/
|
|
@@ -26,7 +25,6 @@ export interface AccentIconProps extends AccentIconStyles, Omit<IconProps, 'src'
|
|
|
26
25
|
size?: number;
|
|
27
26
|
}
|
|
28
27
|
export declare const accentIconStyles: ({ color, transparent, }: AccentIconStyles) => CSSObject;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
28
|
+
declare const AccentIcon: import("../../common").ElementComponent<"span", AccentIconProps>;
|
|
29
|
+
export default AccentIcon;
|
|
32
30
|
//# sourceMappingURL=AccentIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccentIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AccentIcon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AccentIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AccentIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAa,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AAGvC,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;IAC3C;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,gBAAgB,4BAG1B,gBAAgB,KAAG,SAOpB,CAAC;AAEH,QAAA,MAAM,UAAU,kEAoBd,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
1
|
var __assign = (this && this.__assign) || function () {
|
|
15
2
|
__assign = Object.assign || function(t) {
|
|
16
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -37,6 +24,7 @@ import * as React from 'react';
|
|
|
37
24
|
import { colors } from '@workday/canvas-kit-react/tokens';
|
|
38
25
|
import { CanvasIconTypes } from '@workday/design-assets-types';
|
|
39
26
|
import Icon from './Icon';
|
|
27
|
+
import { createComponent } from '../../common';
|
|
40
28
|
export var accentIconStyles = function (_a) {
|
|
41
29
|
var _b = _a.color, color = _b === void 0 ? colors.blueberry500 : _b, _c = _a.transparent, transparent = _c === void 0 ? false : _c;
|
|
42
30
|
return ({
|
|
@@ -48,15 +36,11 @@ export var accentIconStyles = function (_a) {
|
|
|
48
36
|
},
|
|
49
37
|
});
|
|
50
38
|
};
|
|
51
|
-
var AccentIcon =
|
|
52
|
-
|
|
53
|
-
function
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return (React.createElement(Icon, __assign({ src: icon, type: CanvasIconTypes.Accent, styles: accentIconStyles({ color: color, transparent: transparent }), size: size, iconRef: iconRef, shouldMirror: shouldMirror }, elemProps)));
|
|
59
|
-
};
|
|
60
|
-
return AccentIcon;
|
|
61
|
-
}(React.Component));
|
|
39
|
+
var AccentIcon = createComponent('span')({
|
|
40
|
+
displayName: 'AccentIcon',
|
|
41
|
+
Component: function (_a, ref, Element) {
|
|
42
|
+
var _b = _a.transparent, transparent = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 56 : _c, icon = _a.icon, color = _a.color, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["transparent", "size", "icon", "color", "shouldMirror"]);
|
|
43
|
+
return (React.createElement(Icon, __assign({ src: icon, type: CanvasIconTypes.Accent, styles: accentIconStyles({ color: color, transparent: transparent }), size: size, as: Element, ref: ref, shouldMirror: shouldMirror }, elemProps)));
|
|
44
|
+
},
|
|
45
|
+
});
|
|
62
46
|
export default AccentIcon;
|