@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
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { GrowthBehavior } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { SystemIcon } from '@workday/canvas-kit-react/icon';
|
|
4
4
|
export interface InputIconContainerProps extends GrowthBehavior {
|
|
5
|
-
icon?: React.ReactElement<SystemIcon>;
|
|
5
|
+
icon?: React.ReactElement<typeof SystemIcon>;
|
|
6
6
|
}
|
|
7
7
|
declare const InputIconContainer: React.FunctionComponent<InputIconContainerProps>;
|
|
8
8
|
export default InputIconContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputIconContainer.d.ts","sourceRoot":"","sources":["../../../../text-input/lib/InputIconContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,cAAc,EAAC,MAAM,kCAAkC,CAAC;AAEhE,OAAO,EAAC,UAAU,EAAC,MAAM,gCAAgC,CAAC;AAE1D,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC7D,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"InputIconContainer.d.ts","sourceRoot":"","sources":["../../../../text-input/lib/InputIconContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,cAAc,EAAC,MAAM,kCAAkC,CAAC;AAEhE,OAAO,EAAC,UAAU,EAAC,MAAM,gCAAgC,CAAC;AAE1D,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC7D,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;CAC9C;AAaD,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,iBAAiB,CAAC,uBAAuB,CASxE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -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.
|
package/icon/README.md
CHANGED
|
@@ -82,12 +82,6 @@ Default: `false`
|
|
|
82
82
|
|
|
83
83
|
---
|
|
84
84
|
|
|
85
|
-
#### `iconRef: React.Ref<HTMLSpanElement>`
|
|
86
|
-
|
|
87
|
-
> Returns the ref to the rendered icon.
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
85
|
#### `shouldMirror: boolean`
|
|
92
86
|
|
|
93
87
|
> If set to `true`, transform the SVG's x-axis to mirror the graphic
|
|
@@ -177,12 +171,6 @@ Default: `92`
|
|
|
177
171
|
|
|
178
172
|
---
|
|
179
173
|
|
|
180
|
-
#### `iconRef: React.Ref<HTMLSpanElement>`
|
|
181
|
-
|
|
182
|
-
> Returns the ref to the rendered icon.
|
|
183
|
-
|
|
184
|
-
---
|
|
185
|
-
|
|
186
174
|
#### `shouldMirror: boolean`
|
|
187
175
|
|
|
188
176
|
> If set to `true`, transform the SVG's x-axis to mirror the graphic
|
|
@@ -292,12 +280,6 @@ Default: `'transparent'`
|
|
|
292
280
|
|
|
293
281
|
---
|
|
294
282
|
|
|
295
|
-
#### `iconRef: React.Ref<HTMLSpanElement>`
|
|
296
|
-
|
|
297
|
-
> Returns the ref to the rendered icon.
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
301
283
|
#### `shouldMirror: boolean`
|
|
302
284
|
|
|
303
285
|
> If set to `true`, transform the SVG's x-axis to mirror the graphic
|
|
@@ -358,12 +340,6 @@ Default: `SystemIconCircleSize.l` (`40`)
|
|
|
358
340
|
|
|
359
341
|
---
|
|
360
342
|
|
|
361
|
-
#### `iconRef: React.Ref<HTMLSpanElement>`
|
|
362
|
-
|
|
363
|
-
> Returns the ref to the rendered icon.
|
|
364
|
-
|
|
365
|
-
---
|
|
366
|
-
|
|
367
343
|
#### `shouldMirror: boolean`
|
|
368
344
|
|
|
369
345
|
> If set to `true`, transform the SVG's x-axis to mirror the graphic
|
|
@@ -443,12 +419,6 @@ Default: `height of graphic`
|
|
|
443
419
|
|
|
444
420
|
Default: `false`
|
|
445
421
|
|
|
446
|
-
#### `iconRef: React.Ref<HTMLSpanElement>`
|
|
447
|
-
|
|
448
|
-
> Returns the ref to the rendered icon.
|
|
449
|
-
|
|
450
|
-
---
|
|
451
|
-
|
|
452
422
|
#### `shouldMirror: boolean`
|
|
453
423
|
|
|
454
424
|
> If set to `true`, transform the SVG's x-axis to mirror the graphic
|
package/icon/lib/AccentIcon.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import {colors} from '@workday/canvas-kit-react/tokens';
|
|
|
3
3
|
import {CanvasAccentIcon, CanvasIconTypes} from '@workday/design-assets-types';
|
|
4
4
|
import {CSSObject} from '@emotion/styled';
|
|
5
5
|
import Icon, {IconProps} from './Icon';
|
|
6
|
+
import {createComponent} from '../../common';
|
|
6
7
|
|
|
7
8
|
export interface AccentIconStyles {
|
|
8
9
|
/**
|
|
@@ -17,7 +18,9 @@ export interface AccentIconStyles {
|
|
|
17
18
|
transparent?: boolean;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
export interface AccentIconProps
|
|
21
|
+
export interface AccentIconProps
|
|
22
|
+
extends AccentIconStyles,
|
|
23
|
+
Omit<IconProps, 'src' | 'type' | 'color'> {
|
|
21
24
|
/**
|
|
22
25
|
* The icon to display from `@workday/canvas-accent-icons-web`.
|
|
23
26
|
*/
|
|
@@ -41,28 +44,26 @@ export const accentIconStyles = ({
|
|
|
41
44
|
},
|
|
42
45
|
});
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
iconRef,
|
|
52
|
-
shouldMirror,
|
|
53
|
-
...elemProps
|
|
54
|
-
} = this.props;
|
|
55
|
-
|
|
47
|
+
const AccentIcon = createComponent('span')({
|
|
48
|
+
displayName: 'AccentIcon',
|
|
49
|
+
Component: (
|
|
50
|
+
{transparent = false, size = 56, icon, color, shouldMirror, ...elemProps}: AccentIconProps,
|
|
51
|
+
ref,
|
|
52
|
+
Element
|
|
53
|
+
) => {
|
|
56
54
|
return (
|
|
57
55
|
<Icon
|
|
58
56
|
src={icon}
|
|
59
57
|
type={CanvasIconTypes.Accent}
|
|
60
58
|
styles={accentIconStyles({color, transparent})}
|
|
61
59
|
size={size}
|
|
62
|
-
|
|
60
|
+
as={Element}
|
|
61
|
+
ref={ref}
|
|
63
62
|
shouldMirror={shouldMirror}
|
|
64
63
|
{...elemProps}
|
|
65
64
|
/>
|
|
66
65
|
);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export default AccentIcon;
|
package/icon/lib/AppletIcon.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import {colors, BrandingColor, CanvasColor} from '@workday/canvas-kit-react/toke
|
|
|
3
3
|
import {CanvasAppletIcon, CanvasIconTypes} from '@workday/design-assets-types';
|
|
4
4
|
import {CSSObject} from '@emotion/styled';
|
|
5
5
|
import Icon, {IconProps} from './Icon';
|
|
6
|
+
import {createComponent} from '../../common';
|
|
6
7
|
|
|
7
8
|
export interface AppletIconStyles {
|
|
8
9
|
/**
|
|
@@ -54,9 +55,7 @@ export const appletIconStyles = ({
|
|
|
54
55
|
};
|
|
55
56
|
};
|
|
56
57
|
|
|
57
|
-
export interface AppletIconProps
|
|
58
|
-
extends AppletIconStyles,
|
|
59
|
-
Pick<IconProps, 'iconRef' | 'shouldMirror'> {
|
|
58
|
+
export interface AppletIconProps extends AppletIconStyles, Pick<IconProps, 'shouldMirror'> {
|
|
60
59
|
/**
|
|
61
60
|
* The icon to display from `@workday/canvas-applet-icons-web`.
|
|
62
61
|
*/
|
|
@@ -68,22 +67,29 @@ export interface AppletIconProps
|
|
|
68
67
|
size?: number;
|
|
69
68
|
}
|
|
70
69
|
|
|
71
|
-
export
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
export const AppletIcon = createComponent('span')({
|
|
71
|
+
displayName: 'AppletIcon',
|
|
72
|
+
Component: (
|
|
73
|
+
{size = 92, icon, color, shouldMirror, ...elemProps}: AppletIconProps,
|
|
74
|
+
ref,
|
|
75
|
+
Element
|
|
76
|
+
) => {
|
|
77
77
|
return (
|
|
78
78
|
<Icon
|
|
79
79
|
src={icon}
|
|
80
80
|
type={CanvasIconTypes.Applet}
|
|
81
81
|
styles={appletIconStyles({color})}
|
|
82
|
+
as={Element}
|
|
82
83
|
size={size}
|
|
83
|
-
|
|
84
|
+
ref={ref}
|
|
84
85
|
shouldMirror={shouldMirror}
|
|
85
86
|
{...elemProps}
|
|
86
87
|
/>
|
|
87
88
|
);
|
|
88
|
-
}
|
|
89
|
-
|
|
89
|
+
},
|
|
90
|
+
subComponents: {
|
|
91
|
+
Colors: BrandingColor,
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
export default AppletIcon;
|
package/icon/lib/Graphic.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import {CanvasGraphic, CanvasIconTypes} from '@workday/design-assets-types';
|
|
3
3
|
import {CSSObject} from '@emotion/styled';
|
|
4
4
|
import Svg, {SvgProps} from './Svg';
|
|
5
|
+
import {createComponent} from '../../common';
|
|
5
6
|
|
|
6
7
|
export interface GraphicStyles {
|
|
7
8
|
/**
|
|
@@ -21,7 +22,7 @@ export interface GraphicStyles {
|
|
|
21
22
|
grow?: boolean;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
export interface GraphicProps extends GraphicStyles, Pick<SvgProps, '
|
|
25
|
+
export interface GraphicProps extends GraphicStyles, Pick<SvgProps, 'shouldMirror'> {
|
|
25
26
|
/**
|
|
26
27
|
* The graphic to display from `@workday/canvas-graphics-web`.
|
|
27
28
|
*/
|
|
@@ -58,19 +59,25 @@ export const graphicStyles = ({width, height, grow}: GraphicStyles): CSSObject =
|
|
|
58
59
|
return {};
|
|
59
60
|
};
|
|
60
61
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
const Graphic = createComponent('span')({
|
|
63
|
+
displayName: 'Graphic',
|
|
64
|
+
Component: (
|
|
65
|
+
{grow = false, src, width, height, shouldMirror, ...elemProps}: GraphicProps,
|
|
66
|
+
ref,
|
|
67
|
+
Element
|
|
68
|
+
) => {
|
|
65
69
|
return (
|
|
66
70
|
<Svg
|
|
67
71
|
src={src}
|
|
68
72
|
styles={graphicStyles({width, height, grow})}
|
|
69
73
|
type={CanvasIconTypes.Graphic}
|
|
70
|
-
|
|
74
|
+
as={Element}
|
|
75
|
+
ref={ref}
|
|
71
76
|
shouldMirror={shouldMirror}
|
|
72
77
|
{...elemProps}
|
|
73
78
|
/>
|
|
74
79
|
);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export default Graphic;
|
package/icon/lib/Icon.tsx
CHANGED
|
@@ -2,18 +2,17 @@ import * as React from 'react';
|
|
|
2
2
|
import {CSSObject} from '@emotion/styled';
|
|
3
3
|
import {CanvasIcon, CanvasIconTypes} from '@workday/design-assets-types';
|
|
4
4
|
import Svg, {SvgProps} from './Svg';
|
|
5
|
+
import {createComponent} from '../../common';
|
|
5
6
|
|
|
6
7
|
export interface IconProps extends SvgProps {
|
|
7
8
|
src: CanvasIcon;
|
|
8
9
|
size?: number;
|
|
9
10
|
type: CanvasIconTypes.Accent | CanvasIconTypes.Applet | CanvasIconTypes.System;
|
|
10
|
-
iconRef?: React.Ref<HTMLSpanElement>;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
export const Icon = createComponent('span')({
|
|
14
|
+
displayName: 'Icon',
|
|
15
|
+
Component: ({src, size, styles, type, shouldMirror, ...elemProps}: IconProps, ref, Element) => {
|
|
17
16
|
const iconStyles: CSSObject = {...styles};
|
|
18
17
|
|
|
19
18
|
if (size) {
|
|
@@ -28,10 +27,13 @@ export default class Icon extends React.Component<IconProps> {
|
|
|
28
27
|
src={src}
|
|
29
28
|
type={type}
|
|
30
29
|
shouldMirror={shouldMirror}
|
|
30
|
+
as={Element}
|
|
31
31
|
{...elemProps}
|
|
32
|
+
ref={ref}
|
|
32
33
|
styles={iconStyles}
|
|
33
|
-
iconRef={iconRef}
|
|
34
34
|
/>
|
|
35
35
|
);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export default Icon;
|
package/icon/lib/Svg.tsx
CHANGED
|
@@ -2,13 +2,13 @@ import {CSSObject} from '@emotion/styled';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import {CanvasIcon, CanvasIconTypes} from '@workday/design-assets-types';
|
|
4
4
|
import {validateIconType} from './utils';
|
|
5
|
-
import {styled} from '@workday/canvas-kit-react/common';
|
|
5
|
+
import {createComponent, styled} from '@workday/canvas-kit-react/common';
|
|
6
|
+
import {Box, BoxProps} from '@workday/canvas-kit-react/layout';
|
|
6
7
|
|
|
7
|
-
export interface SvgProps extends
|
|
8
|
+
export interface SvgProps extends BoxProps {
|
|
8
9
|
src: CanvasIcon;
|
|
9
10
|
styles?: CSSObject;
|
|
10
11
|
type: CanvasIconTypes;
|
|
11
|
-
iconRef?: React.Ref<HTMLSpanElement>;
|
|
12
12
|
/**
|
|
13
13
|
* If set to `true`, transform the SVG's x-axis to mirror the graphic
|
|
14
14
|
* @default false
|
|
@@ -16,7 +16,7 @@ export interface SvgProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
16
16
|
shouldMirror?: boolean;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const StyledIconSpan = styled('span')<Pick<SvgProps, 'shouldMirror' | 'styles'>>(
|
|
19
|
+
const StyledIconSpan = styled(Box.as('span'))<Pick<SvgProps, 'shouldMirror' | 'styles'>>(
|
|
20
20
|
{
|
|
21
21
|
display: 'inline-block',
|
|
22
22
|
'> svg': {display: 'block'},
|
|
@@ -27,11 +27,9 @@ const StyledIconSpan = styled('span')<Pick<SvgProps, 'shouldMirror' | 'styles'>>
|
|
|
27
27
|
})
|
|
28
28
|
);
|
|
29
29
|
|
|
30
|
-
export
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
// Validation for JS
|
|
30
|
+
export const Svg = createComponent('span')({
|
|
31
|
+
displayName: 'Svg',
|
|
32
|
+
Component: ({src, type, ...elemProps}: SvgProps, ref, Element) => {
|
|
35
33
|
try {
|
|
36
34
|
validateIconType(src, type);
|
|
37
35
|
} catch (e) {
|
|
@@ -39,8 +37,8 @@ export default class Svg extends React.Component<SvgProps> {
|
|
|
39
37
|
return null;
|
|
40
38
|
}
|
|
41
39
|
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
return <StyledIconSpan dangerouslySetInnerHTML={{__html: src.svg}} {...elemProps} ref={ref} />;
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export default Svg;
|
package/icon/lib/SystemIcon.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import {iconColors} from '@workday/canvas-kit-react/tokens';
|
|
|
3
3
|
import {CanvasSystemIcon, CanvasIconTypes} from '@workday/design-assets-types';
|
|
4
4
|
import {CSSObject} from '@emotion/styled';
|
|
5
5
|
import Icon, {IconProps} from './Icon';
|
|
6
|
+
import {createComponent} from '../../common';
|
|
6
7
|
|
|
7
8
|
export interface SystemIconStyles {
|
|
8
9
|
/**
|
|
@@ -43,7 +44,9 @@ export interface SystemIconStyles {
|
|
|
43
44
|
fillHover?: string;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
export interface SystemIconProps
|
|
47
|
+
export interface SystemIconProps
|
|
48
|
+
extends SystemIconStyles,
|
|
49
|
+
Omit<IconProps, 'src' | 'color' | 'type' | 'background'> {
|
|
47
50
|
/**
|
|
48
51
|
* The icon to display from `@workday/canvas-system-icons-web`.
|
|
49
52
|
*/
|
|
@@ -51,7 +54,8 @@ export interface SystemIconProps extends SystemIconStyles, Omit<IconProps, 'src'
|
|
|
51
54
|
/**
|
|
52
55
|
* The size of the SystemIcon in `px`.
|
|
53
56
|
*/
|
|
54
|
-
size?: number;
|
|
57
|
+
size?: number | undefined;
|
|
58
|
+
className?: string; //investigate more
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
export const systemIconStyles = ({
|
|
@@ -84,15 +88,15 @@ export const systemIconStyles = ({
|
|
|
84
88
|
},
|
|
85
89
|
});
|
|
86
90
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
const SystemIcon = createComponent('span')({
|
|
92
|
+
displayName: 'SystemIcon',
|
|
93
|
+
Component: (
|
|
94
|
+
{
|
|
90
95
|
background = 'transparent',
|
|
91
96
|
backgroundHover = 'transparent',
|
|
92
97
|
color = iconColors.standard,
|
|
93
98
|
colorHover = iconColors.hover,
|
|
94
99
|
icon,
|
|
95
|
-
iconRef,
|
|
96
100
|
accent,
|
|
97
101
|
accentHover,
|
|
98
102
|
fill,
|
|
@@ -100,8 +104,10 @@ export default class SystemIcon extends React.Component<SystemIconProps> {
|
|
|
100
104
|
size,
|
|
101
105
|
shouldMirror,
|
|
102
106
|
...elemProps
|
|
103
|
-
}
|
|
104
|
-
|
|
107
|
+
}: SystemIconProps,
|
|
108
|
+
ref,
|
|
109
|
+
Element
|
|
110
|
+
) => {
|
|
105
111
|
const style = systemIconStyles({
|
|
106
112
|
accent,
|
|
107
113
|
accentHover,
|
|
@@ -118,11 +124,14 @@ export default class SystemIcon extends React.Component<SystemIconProps> {
|
|
|
118
124
|
src={icon}
|
|
119
125
|
type={CanvasIconTypes.System}
|
|
120
126
|
size={size}
|
|
121
|
-
|
|
122
|
-
iconRef={iconRef}
|
|
127
|
+
as={Element}
|
|
123
128
|
shouldMirror={shouldMirror}
|
|
129
|
+
ref={ref}
|
|
130
|
+
styles={style}
|
|
124
131
|
{...elemProps}
|
|
125
132
|
/>
|
|
126
133
|
);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
export default SystemIcon;
|
|
@@ -4,7 +4,7 @@ import isPropValid from '@emotion/is-prop-valid';
|
|
|
4
4
|
import {colors, borderRadius} from '@workday/canvas-kit-react/tokens';
|
|
5
5
|
import SystemIcon, {SystemIconProps} from './SystemIcon';
|
|
6
6
|
import {CanvasSystemIcon} from '@workday/design-assets-types';
|
|
7
|
-
import {pickForegroundColor} from '@workday/canvas-kit-react/common';
|
|
7
|
+
import {createComponent, pickForegroundColor} from '@workday/canvas-kit-react/common';
|
|
8
8
|
|
|
9
9
|
export enum SystemIconCircleSize {
|
|
10
10
|
xs = 16,
|
|
@@ -15,7 +15,7 @@ export enum SystemIconCircleSize {
|
|
|
15
15
|
xxl = 120,
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export interface SystemIconCircleProps extends Pick<SystemIconProps, '
|
|
18
|
+
export interface SystemIconCircleProps extends Pick<SystemIconProps, 'shouldMirror'> {
|
|
19
19
|
/**
|
|
20
20
|
* The background color of the SystemIconCircle from `@workday/canvas-colors-web`.
|
|
21
21
|
* @default colors.soap300
|
|
@@ -58,33 +58,36 @@ const Container = styled('div', {
|
|
|
58
58
|
})
|
|
59
59
|
);
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const {
|
|
61
|
+
const SystemIconCircle = createComponent('span')({
|
|
62
|
+
displayName: 'SystemIconCircle',
|
|
63
|
+
Component: (
|
|
64
|
+
{
|
|
66
65
|
background = colors.soap200,
|
|
67
66
|
size = SystemIconCircleSize.l,
|
|
68
67
|
icon,
|
|
69
|
-
|
|
68
|
+
|
|
70
69
|
shouldMirror,
|
|
71
70
|
...elemProps
|
|
72
|
-
}
|
|
73
|
-
|
|
71
|
+
}: SystemIconCircleProps,
|
|
72
|
+
ref,
|
|
73
|
+
Element
|
|
74
|
+
) => {
|
|
74
75
|
const iconColor = pickForegroundColor(background, 'rgba(0,0,0,0.65)', colors.frenchVanilla100);
|
|
75
76
|
const iconSize = size * 0.625;
|
|
76
|
-
|
|
77
77
|
return (
|
|
78
78
|
<Container background={background} size={size} {...elemProps}>
|
|
79
79
|
<SystemIcon
|
|
80
80
|
icon={icon}
|
|
81
81
|
color={iconColor}
|
|
82
82
|
colorHover={iconColor}
|
|
83
|
+
as={Element}
|
|
83
84
|
size={iconSize}
|
|
84
|
-
|
|
85
|
+
ref={ref}
|
|
85
86
|
shouldMirror={shouldMirror}
|
|
86
87
|
/>
|
|
87
88
|
</Container>
|
|
88
89
|
);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export default SystemIconCircle;
|
package/layout/lib/Box.tsx
CHANGED
|
@@ -30,6 +30,46 @@ const shouldForwardProp = (prop: string) => {
|
|
|
30
30
|
return isPropValid(prop) && !omittedProps.includes(prop);
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* A function that allows us to call Box styles on an element and reduce the amount of elements in the React Dom tree.
|
|
35
|
+
* Instead of using the `as` in a styled function, you can just call this instead to pass those props to the styled element
|
|
36
|
+
* @example
|
|
37
|
+
* import { boxStyleFn } from '@workday/canvas-kit-react/layout';
|
|
38
|
+
* const StyledHeader = styled('h1')(
|
|
39
|
+
* boxStyleFn,
|
|
40
|
+
* {
|
|
41
|
+
* fontWeight: 400,
|
|
42
|
+
* }
|
|
43
|
+
* )
|
|
44
|
+
*
|
|
45
|
+
* ....
|
|
46
|
+
*
|
|
47
|
+
* <StyledHeader color='red'>Hello World</StyledHeader>
|
|
48
|
+
*/
|
|
49
|
+
export const boxStyleFn = <P extends BoxProps>(props: P) => {
|
|
50
|
+
return [
|
|
51
|
+
{
|
|
52
|
+
boxSizing: 'border-box',
|
|
53
|
+
},
|
|
54
|
+
border,
|
|
55
|
+
color,
|
|
56
|
+
depth,
|
|
57
|
+
flexItem,
|
|
58
|
+
layout,
|
|
59
|
+
position,
|
|
60
|
+
space,
|
|
61
|
+
].reduce((result, style) => {
|
|
62
|
+
// @ts-ignore
|
|
63
|
+
const temp = typeof style === 'function' ? style(props) : style;
|
|
64
|
+
// eslint-disable-next-line guard-for-in
|
|
65
|
+
for (const key in temp) {
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
result[key] = temp[key];
|
|
68
|
+
}
|
|
69
|
+
return result;
|
|
70
|
+
}, {});
|
|
71
|
+
};
|
|
72
|
+
|
|
33
73
|
// Meant to be used with elements. The `shouldForwardProps` will remove all style props
|
|
34
74
|
const StyledBoxElement = styled('div', {shouldForwardProp})<StyledType & BoxProps>(
|
|
35
75
|
{
|
|
@@ -17,7 +17,7 @@ export const ModalOverflowOverlay = createComponent('div')({
|
|
|
17
17
|
Element
|
|
18
18
|
) => {
|
|
19
19
|
return (
|
|
20
|
-
<StyledOverlay as={Element} ref={ref}
|
|
20
|
+
<StyledOverlay as={Element} ref={ref} overflowX="hidden" overflowY="auto" {...elemProps}>
|
|
21
21
|
{children}
|
|
22
22
|
</StyledOverlay>
|
|
23
23
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.78-next.6+400ffc0b",
|
|
4
4
|
"description": "The parent module that contains all Workday Canvas Kit React components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"@emotion/styled": "^11.6.0",
|
|
58
58
|
"@popperjs/core": "^2.5.4",
|
|
59
59
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
60
|
-
"@workday/canvas-kit-labs-react": "^7.0.0-alpha.
|
|
61
|
-
"@workday/canvas-kit-popup-stack": "^7.0.0-alpha.
|
|
62
|
-
"@workday/canvas-kit-preview-react": "^7.0.0-alpha.
|
|
60
|
+
"@workday/canvas-kit-labs-react": "^7.0.0-alpha.78-next.6+400ffc0b",
|
|
61
|
+
"@workday/canvas-kit-popup-stack": "^7.0.0-alpha.78-next.6+400ffc0b",
|
|
62
|
+
"@workday/canvas-kit-preview-react": "^7.0.0-alpha.78-next.6+400ffc0b",
|
|
63
63
|
"@workday/canvas-system-icons-web": "1.0.41",
|
|
64
64
|
"@workday/design-assets-types": "^0.2.4",
|
|
65
65
|
"chroma-js": "^2.1.0",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"@workday/canvas-accent-icons-web": "^1.0.0",
|
|
78
78
|
"@workday/canvas-applet-icons-web": "^0.17.50"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "400ffc0b29c2762180758d9b7c1bdc0562cb01e4"
|
|
81
81
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {TertiaryButton, TertiaryButtonProps} from '@workday/canvas-kit-react/button';
|
|
3
3
|
import {
|
|
4
4
|
chevronLeftSmallIcon,
|
|
5
5
|
chevron2xLeftSmallIcon,
|
|
@@ -11,7 +11,7 @@ import {PaginationModel} from './types';
|
|
|
11
11
|
import {HStack} from '@workday/canvas-kit-react/layout';
|
|
12
12
|
import {useRTL} from './common/utils/useRTL';
|
|
13
13
|
|
|
14
|
-
export type ControlButtonProps =
|
|
14
|
+
export type ControlButtonProps = TertiaryButtonProps &
|
|
15
15
|
React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
16
16
|
model: PaginationModel;
|
|
17
17
|
};
|
|
@@ -38,9 +38,8 @@ export const JumpToFirstButton = ({model, onClick, ...restProps}: ControlButtonP
|
|
|
38
38
|
const {shouldUseRTL} = useRTL();
|
|
39
39
|
const icon = shouldUseRTL ? chevron2xRightSmallIcon : chevron2xLeftSmallIcon;
|
|
40
40
|
return (
|
|
41
|
-
<
|
|
41
|
+
<TertiaryButton
|
|
42
42
|
aria-disabled={isDisabled || undefined}
|
|
43
|
-
variant="square"
|
|
44
43
|
size="small"
|
|
45
44
|
icon={icon}
|
|
46
45
|
onClick={handleClick}
|
|
@@ -61,9 +60,8 @@ export const StepToPreviousButton = ({onClick, model, ...restProps}: ControlButt
|
|
|
61
60
|
const {shouldUseRTL} = useRTL();
|
|
62
61
|
const icon = shouldUseRTL ? chevronRightSmallIcon : chevronLeftSmallIcon;
|
|
63
62
|
return (
|
|
64
|
-
<
|
|
63
|
+
<TertiaryButton
|
|
65
64
|
aria-disabled={isDisabled || undefined}
|
|
66
|
-
variant="square"
|
|
67
65
|
size="small"
|
|
68
66
|
icon={icon}
|
|
69
67
|
onClick={handleClick}
|
|
@@ -84,9 +82,8 @@ export const StepToNextButton = ({model, onClick, ...restProps}: ControlButtonPr
|
|
|
84
82
|
const {shouldUseRTL} = useRTL();
|
|
85
83
|
const icon = shouldUseRTL ? chevronLeftSmallIcon : chevronRightSmallIcon;
|
|
86
84
|
return (
|
|
87
|
-
<
|
|
85
|
+
<TertiaryButton
|
|
88
86
|
aria-disabled={isDisabled || undefined}
|
|
89
|
-
variant="square"
|
|
90
87
|
size="small"
|
|
91
88
|
icon={icon}
|
|
92
89
|
onClick={handleClick}
|
|
@@ -107,9 +104,8 @@ export const JumpToLastButton = ({model, onClick, ...restProps}: ControlButtonPr
|
|
|
107
104
|
const {shouldUseRTL} = useRTL();
|
|
108
105
|
const icon = shouldUseRTL ? chevron2xLeftSmallIcon : chevron2xRightSmallIcon;
|
|
109
106
|
return (
|
|
110
|
-
<
|
|
107
|
+
<TertiaryButton
|
|
111
108
|
aria-disabled={isDisabled || undefined}
|
|
112
|
-
variant="square"
|
|
113
109
|
size="small"
|
|
114
110
|
icon={icon}
|
|
115
111
|
onClick={handleClick}
|