@workday/canvas-kit-react 7.0.0-alpha.0-next.7 → 7.0.0-alpha.80-next.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/badge/README.md +2 -3
- package/banner/lib/BannerIcon.tsx +2 -2
- package/button/README.md +68 -1
- package/button/index.ts +1 -1
- package/button/lib/{parts/ButtonContainer.tsx → BaseButton.tsx} +123 -66
- package/button/lib/DeleteButton.tsx +7 -4
- package/button/lib/PrimaryButton.tsx +86 -109
- package/button/lib/SecondaryButton.tsx +41 -64
- package/button/lib/TertiaryButton.tsx +86 -53
- package/button/lib/ToolbarDropdownButton.tsx +12 -11
- package/button/lib/ToolbarIconButton.tsx +22 -17
- package/button/lib/parts/ButtonLabel.tsx +17 -2
- package/button/lib/parts/ButtonLabelIcon.tsx +30 -54
- package/button/lib/parts/index.tsx +0 -2
- package/button/lib/types.ts +2 -2
- package/card/lib/Card.tsx +1 -1
- package/common/lib/parts/_brand-assets.ts +5 -5
- package/common/lib/utils/StaticStates.tsx +6 -5
- package/dist/commonjs/banner/lib/BannerIcon.js +2 -2
- package/dist/commonjs/button/index.d.ts +1 -1
- package/dist/commonjs/button/index.d.ts.map +1 -1
- package/dist/commonjs/button/index.js +3 -3
- package/dist/commonjs/button/lib/BaseButton.d.ts +31 -0
- package/dist/commonjs/button/lib/BaseButton.d.ts.map +1 -0
- package/dist/commonjs/button/lib/BaseButton.js +198 -0
- package/dist/commonjs/button/lib/DeleteButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/DeleteButton.js +4 -3
- package/dist/commonjs/button/lib/PrimaryButton.d.ts +4 -76
- package/dist/commonjs/button/lib/PrimaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/PrimaryButton.js +15 -36
- package/dist/commonjs/button/lib/SecondaryButton.d.ts +0 -5
- package/dist/commonjs/button/lib/SecondaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/SecondaryButton.js +13 -36
- package/dist/commonjs/button/lib/TertiaryButton.d.ts +2 -2
- package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/TertiaryButton.js +66 -38
- package/dist/commonjs/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/ToolbarDropdownButton.js +7 -7
- package/dist/commonjs/button/lib/ToolbarIconButton.d.ts +5 -2
- package/dist/commonjs/button/lib/ToolbarIconButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/ToolbarIconButton.js +5 -11
- package/dist/commonjs/button/lib/parts/ButtonLabel.d.ts +4 -4
- package/dist/commonjs/button/lib/parts/ButtonLabel.d.ts.map +1 -1
- package/dist/commonjs/button/lib/parts/ButtonLabel.js +35 -1
- package/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
- package/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts.map +1 -1
- package/dist/commonjs/button/lib/parts/ButtonLabelIcon.js +13 -62
- package/dist/commonjs/button/lib/parts/index.d.ts +0 -2
- package/dist/commonjs/button/lib/parts/index.d.ts.map +1 -1
- package/dist/commonjs/button/lib/parts/index.js +1 -5
- package/dist/commonjs/button/lib/types.d.ts +2 -2
- package/dist/commonjs/button/lib/types.d.ts.map +1 -1
- package/dist/commonjs/card/lib/Card.js +1 -1
- package/dist/commonjs/common/lib/parts/_brand-assets.d.ts.map +1 -1
- package/dist/commonjs/common/lib/parts/_brand-assets.js +5 -5
- package/dist/commonjs/common/lib/utils/StaticStates.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/StaticStates.js +5 -2
- package/dist/commonjs/icon/lib/AccentIcon.d.ts +3 -5
- package/dist/commonjs/icon/lib/AccentIcon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/AccentIcon.js +8 -24
- package/dist/commonjs/icon/lib/AppletIcon.d.ts +5 -6
- package/dist/commonjs/icon/lib/AppletIcon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/AppletIcon.js +13 -27
- package/dist/commonjs/icon/lib/Graphic.d.ts +3 -5
- package/dist/commonjs/icon/lib/Graphic.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/Graphic.js +8 -24
- package/dist/commonjs/icon/lib/Icon.d.ts +2 -5
- package/dist/commonjs/icon/lib/Icon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/Icon.js +10 -25
- package/dist/commonjs/icon/lib/Svg.d.ts +4 -6
- package/dist/commonjs/icon/lib/Svg.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/Svg.js +11 -27
- package/dist/commonjs/icon/lib/SystemIcon.d.ts +5 -6
- package/dist/commonjs/icon/lib/SystemIcon.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/SystemIcon.js +8 -24
- package/dist/commonjs/icon/lib/SystemIconCircle.d.ts +3 -6
- package/dist/commonjs/icon/lib/SystemIconCircle.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/SystemIconCircle.js +7 -25
- package/dist/commonjs/layout/lib/Box.d.ts +18 -1
- package/dist/commonjs/layout/lib/Box.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Box.js +42 -2
- package/dist/commonjs/layout/lib/Flex.d.ts +1 -1
- package/dist/commonjs/layout/lib/Flex.js +1 -1
- package/dist/commonjs/modal/lib/ModalCard.js +1 -1
- package/dist/commonjs/modal/lib/ModalOverflowOverlay.js +1 -1
- package/dist/commonjs/pagination/lib/Pagination/Controls.d.ts +2 -2
- package/dist/commonjs/pagination/lib/Pagination/Controls.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/Controls.js +4 -4
- package/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts +1 -2
- package/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/PageButton.js +34 -9
- package/dist/commonjs/pagination/lib/Pagination/Pagination.d.ts +5 -5
- package/dist/commonjs/pagination/lib/Pagination/Pagination.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/PopupCard.js +1 -1
- package/dist/commonjs/popup/lib/PopupCloseIcon.d.ts +2 -2
- package/dist/commonjs/popup/lib/PopupCloseIcon.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/PopupCloseIcon.js +5 -6
- package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.js +4 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +9 -7
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControl.js +21 -57
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.js +106 -0
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/SidePanel.js +2 -2
- package/dist/commonjs/tabs/lib/Tabs.d.ts +2 -2
- package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -2
- package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsList.js +1 -1
- package/dist/commonjs/tabs/lib/menu/Menu.d.ts +1 -1
- package/dist/commonjs/tabs/lib/menu/MenuItem.d.ts +1 -2
- package/dist/commonjs/tabs/lib/menu/MenuItem.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/InputIconContainer.d.ts +1 -1
- package/dist/commonjs/text-input/lib/InputIconContainer.d.ts.map +1 -1
- package/dist/commonjs/toast/lib/Toast.d.ts.map +1 -1
- package/dist/commonjs/toast/lib/Toast.js +1 -1
- package/dist/commonjs/tokens/lib/depth.d.ts +48 -17
- package/dist/commonjs/tokens/lib/depth.d.ts.map +1 -1
- package/dist/commonjs/tokens/lib/depth.js +14 -9
- package/dist/commonjs/tooltip/lib/Tooltip.d.ts +1 -1
- package/dist/commonjs/tooltip/lib/useTooltip.d.ts +1 -1
- package/dist/es6/banner/lib/BannerIcon.js +2 -2
- package/dist/es6/button/index.d.ts +1 -1
- package/dist/es6/button/index.d.ts.map +1 -1
- package/dist/es6/button/index.js +1 -1
- package/dist/es6/button/lib/BaseButton.d.ts +31 -0
- package/dist/es6/button/lib/BaseButton.d.ts.map +1 -0
- package/dist/es6/button/lib/BaseButton.js +174 -0
- package/dist/es6/button/lib/DeleteButton.d.ts.map +1 -1
- package/dist/es6/button/lib/DeleteButton.js +4 -3
- package/dist/es6/button/lib/PrimaryButton.d.ts +4 -76
- package/dist/es6/button/lib/PrimaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/PrimaryButton.js +15 -35
- package/dist/es6/button/lib/SecondaryButton.d.ts +0 -5
- package/dist/es6/button/lib/SecondaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/SecondaryButton.js +13 -36
- package/dist/es6/button/lib/TertiaryButton.d.ts +2 -2
- package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/TertiaryButton.js +68 -40
- package/dist/es6/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
- package/dist/es6/button/lib/ToolbarDropdownButton.js +8 -8
- package/dist/es6/button/lib/ToolbarIconButton.d.ts +5 -2
- package/dist/es6/button/lib/ToolbarIconButton.d.ts.map +1 -1
- package/dist/es6/button/lib/ToolbarIconButton.js +7 -13
- package/dist/es6/button/lib/parts/ButtonLabel.d.ts +4 -4
- package/dist/es6/button/lib/parts/ButtonLabel.d.ts.map +1 -1
- package/dist/es6/button/lib/parts/ButtonLabel.js +33 -2
- package/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
- package/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts.map +1 -1
- package/dist/es6/button/lib/parts/ButtonLabelIcon.js +13 -42
- package/dist/es6/button/lib/parts/index.d.ts +0 -2
- package/dist/es6/button/lib/parts/index.d.ts.map +1 -1
- package/dist/es6/button/lib/parts/index.js +0 -2
- package/dist/es6/button/lib/types.d.ts +2 -2
- package/dist/es6/button/lib/types.d.ts.map +1 -1
- package/dist/es6/card/lib/Card.js +1 -1
- package/dist/es6/common/lib/parts/_brand-assets.d.ts.map +1 -1
- package/dist/es6/common/lib/parts/_brand-assets.js +5 -5
- package/dist/es6/common/lib/utils/StaticStates.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/StaticStates.js +5 -2
- package/dist/es6/icon/lib/AccentIcon.d.ts +3 -5
- package/dist/es6/icon/lib/AccentIcon.d.ts.map +1 -1
- package/dist/es6/icon/lib/AccentIcon.js +8 -24
- package/dist/es6/icon/lib/AppletIcon.d.ts +5 -6
- package/dist/es6/icon/lib/AppletIcon.d.ts.map +1 -1
- package/dist/es6/icon/lib/AppletIcon.js +11 -25
- package/dist/es6/icon/lib/Graphic.d.ts +3 -5
- package/dist/es6/icon/lib/Graphic.d.ts.map +1 -1
- package/dist/es6/icon/lib/Graphic.js +8 -24
- package/dist/es6/icon/lib/Icon.d.ts +2 -5
- package/dist/es6/icon/lib/Icon.d.ts.map +1 -1
- package/dist/es6/icon/lib/Icon.js +8 -24
- package/dist/es6/icon/lib/Svg.d.ts +4 -6
- package/dist/es6/icon/lib/Svg.d.ts.map +1 -1
- package/dist/es6/icon/lib/Svg.js +10 -27
- package/dist/es6/icon/lib/SystemIcon.d.ts +5 -6
- package/dist/es6/icon/lib/SystemIcon.d.ts.map +1 -1
- package/dist/es6/icon/lib/SystemIcon.js +8 -24
- package/dist/es6/icon/lib/SystemIconCircle.d.ts +3 -6
- package/dist/es6/icon/lib/SystemIconCircle.d.ts.map +1 -1
- package/dist/es6/icon/lib/SystemIconCircle.js +8 -26
- package/dist/es6/layout/lib/Box.d.ts +18 -1
- package/dist/es6/layout/lib/Box.d.ts.map +1 -1
- package/dist/es6/layout/lib/Box.js +40 -1
- package/dist/es6/layout/lib/Flex.d.ts +1 -1
- package/dist/es6/layout/lib/Flex.js +1 -1
- package/dist/es6/modal/lib/ModalCard.js +1 -1
- package/dist/es6/modal/lib/ModalOverflowOverlay.js +1 -1
- package/dist/es6/pagination/lib/Pagination/Controls.d.ts +2 -2
- package/dist/es6/pagination/lib/Pagination/Controls.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/Controls.js +5 -5
- package/dist/es6/pagination/lib/Pagination/PageButton.d.ts +1 -2
- package/dist/es6/pagination/lib/Pagination/PageButton.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/PageButton.js +35 -10
- package/dist/es6/pagination/lib/Pagination/Pagination.d.ts +5 -5
- package/dist/es6/pagination/lib/Pagination/Pagination.d.ts.map +1 -1
- package/dist/es6/popup/lib/PopupCard.js +1 -1
- package/dist/es6/popup/lib/PopupCloseIcon.d.ts +2 -2
- package/dist/es6/popup/lib/PopupCloseIcon.d.ts.map +1 -1
- package/dist/es6/popup/lib/PopupCloseIcon.js +6 -7
- package/dist/es6/popup/lib/hooks/useDisableBodyScroll.d.ts.map +1 -1
- package/dist/es6/popup/lib/hooks/useDisableBodyScroll.js +4 -0
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +9 -7
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControl.js +20 -57
- package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
- package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -0
- package/dist/es6/segmented-control/lib/SegmentedControlButton.js +100 -0
- package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/SidePanel.js +3 -3
- package/dist/es6/tabs/lib/Tabs.d.ts +2 -2
- package/dist/es6/tabs/lib/TabsItem.d.ts +1 -2
- package/dist/es6/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsList.js +1 -1
- package/dist/es6/tabs/lib/menu/Menu.d.ts +1 -1
- package/dist/es6/tabs/lib/menu/MenuItem.d.ts +1 -2
- package/dist/es6/tabs/lib/menu/MenuItem.d.ts.map +1 -1
- package/dist/es6/text-input/lib/InputIconContainer.d.ts +1 -1
- package/dist/es6/text-input/lib/InputIconContainer.d.ts.map +1 -1
- package/dist/es6/toast/lib/Toast.d.ts.map +1 -1
- package/dist/es6/toast/lib/Toast.js +1 -1
- package/dist/es6/tokens/lib/depth.d.ts +48 -17
- package/dist/es6/tokens/lib/depth.d.ts.map +1 -1
- package/dist/es6/tokens/lib/depth.js +14 -9
- package/dist/es6/tooltip/lib/Tooltip.d.ts +1 -1
- package/dist/es6/tooltip/lib/useTooltip.d.ts +1 -1
- package/icon/README.md +0 -30
- package/icon/lib/AccentIcon.tsx +17 -16
- package/icon/lib/AppletIcon.tsx +18 -12
- package/icon/lib/Graphic.tsx +15 -8
- package/icon/lib/Icon.tsx +10 -8
- package/icon/lib/Svg.tsx +12 -14
- package/icon/lib/SystemIcon.tsx +21 -12
- package/icon/lib/SystemIconCircle.tsx +17 -14
- package/layout/lib/Box.tsx +41 -1
- package/layout/lib/Flex.tsx +1 -1
- package/modal/lib/ModalCard.tsx +1 -1
- package/modal/lib/ModalOverflowOverlay.tsx +1 -1
- package/package.json +5 -5
- package/pagination/lib/Pagination/Controls.tsx +6 -10
- package/pagination/lib/Pagination/PageButton.tsx +38 -17
- package/pagination/lib/Pagination/Pagination.tsx +5 -5
- package/popup/lib/PopupCard.tsx +1 -1
- package/popup/lib/PopupCloseIcon.tsx +7 -8
- package/popup/lib/hooks/useDisableBodyScroll.ts +6 -0
- package/segmented-control/README.md +8 -9
- package/segmented-control/lib/SegmentedControl.tsx +39 -78
- package/segmented-control/lib/SegmentedControlButton.tsx +109 -0
- package/side-panel/README.md +3 -3
- package/side-panel/lib/SidePanel.tsx +4 -5
- package/tabs/lib/TabsList.tsx +1 -1
- package/text-input/lib/InputIconContainer.tsx +1 -1
- package/toast/lib/Toast.tsx +1 -0
- package/tokens/README.md +11 -8
- package/tokens/lib/depth.ts +60 -24
- package/tooltip/README.md +6 -5
- package/tooltip/lib/Tooltip.tsx +1 -1
- package/tooltip/lib/useTooltip.tsx +1 -1
- package/ts3.5/dist/commonjs/button/index.d.ts +1 -1
- package/ts3.5/dist/commonjs/button/lib/BaseButton.d.ts +31 -0
- package/ts3.5/dist/commonjs/button/lib/PrimaryButton.d.ts +4 -76
- package/ts3.5/dist/commonjs/button/lib/SecondaryButton.d.ts +0 -5
- package/ts3.5/dist/commonjs/button/lib/TertiaryButton.d.ts +2 -2
- package/ts3.5/dist/commonjs/button/lib/ToolbarIconButton.d.ts +5 -2
- package/ts3.5/dist/commonjs/button/lib/parts/ButtonLabel.d.ts +4 -4
- package/ts3.5/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
- package/ts3.5/dist/commonjs/button/lib/parts/index.d.ts +0 -2
- package/ts3.5/dist/commonjs/button/lib/types.d.ts +2 -2
- package/ts3.5/dist/commonjs/icon/lib/AccentIcon.d.ts +3 -5
- package/ts3.5/dist/commonjs/icon/lib/AppletIcon.d.ts +5 -6
- package/ts3.5/dist/commonjs/icon/lib/Graphic.d.ts +3 -5
- package/ts3.5/dist/commonjs/icon/lib/Icon.d.ts +2 -5
- package/ts3.5/dist/commonjs/icon/lib/Svg.d.ts +4 -6
- package/ts3.5/dist/commonjs/icon/lib/SystemIcon.d.ts +5 -6
- package/ts3.5/dist/commonjs/icon/lib/SystemIconCircle.d.ts +3 -6
- package/ts3.5/dist/commonjs/layout/lib/Box.d.ts +18 -1
- package/ts3.5/dist/commonjs/layout/lib/Flex.d.ts +1 -1
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/Controls.d.ts +2 -2
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts +1 -2
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/Pagination.d.ts +5 -5
- package/ts3.5/dist/commonjs/popup/lib/PopupCloseIcon.d.ts +2 -2
- package/ts3.5/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +9 -7
- package/ts3.5/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
- package/ts3.5/dist/commonjs/tabs/lib/Tabs.d.ts +2 -2
- package/ts3.5/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -2
- package/ts3.5/dist/commonjs/tabs/lib/menu/Menu.d.ts +1 -1
- package/ts3.5/dist/commonjs/tabs/lib/menu/MenuItem.d.ts +1 -2
- package/ts3.5/dist/commonjs/text-input/lib/InputIconContainer.d.ts +1 -1
- package/ts3.5/dist/commonjs/tokens/lib/depth.d.ts +48 -17
- package/ts3.5/dist/commonjs/tooltip/lib/Tooltip.d.ts +1 -1
- package/ts3.5/dist/commonjs/tooltip/lib/useTooltip.d.ts +1 -1
- package/ts3.5/dist/es6/button/index.d.ts +1 -1
- package/ts3.5/dist/es6/button/lib/BaseButton.d.ts +31 -0
- package/ts3.5/dist/es6/button/lib/PrimaryButton.d.ts +4 -76
- package/ts3.5/dist/es6/button/lib/SecondaryButton.d.ts +0 -5
- package/ts3.5/dist/es6/button/lib/TertiaryButton.d.ts +2 -2
- package/ts3.5/dist/es6/button/lib/ToolbarIconButton.d.ts +5 -2
- package/ts3.5/dist/es6/button/lib/parts/ButtonLabel.d.ts +4 -4
- package/ts3.5/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
- package/ts3.5/dist/es6/button/lib/parts/index.d.ts +0 -2
- package/ts3.5/dist/es6/button/lib/types.d.ts +2 -2
- package/ts3.5/dist/es6/icon/lib/AccentIcon.d.ts +3 -5
- package/ts3.5/dist/es6/icon/lib/AppletIcon.d.ts +5 -6
- package/ts3.5/dist/es6/icon/lib/Graphic.d.ts +3 -5
- package/ts3.5/dist/es6/icon/lib/Icon.d.ts +2 -5
- package/ts3.5/dist/es6/icon/lib/Svg.d.ts +4 -6
- package/ts3.5/dist/es6/icon/lib/SystemIcon.d.ts +5 -6
- package/ts3.5/dist/es6/icon/lib/SystemIconCircle.d.ts +3 -6
- package/ts3.5/dist/es6/layout/lib/Box.d.ts +18 -1
- package/ts3.5/dist/es6/layout/lib/Flex.d.ts +1 -1
- package/ts3.5/dist/es6/pagination/lib/Pagination/Controls.d.ts +2 -2
- package/ts3.5/dist/es6/pagination/lib/Pagination/PageButton.d.ts +1 -2
- package/ts3.5/dist/es6/pagination/lib/Pagination/Pagination.d.ts +5 -5
- package/ts3.5/dist/es6/popup/lib/PopupCloseIcon.d.ts +2 -2
- package/ts3.5/dist/es6/segmented-control/lib/SegmentedControl.d.ts +9 -7
- package/ts3.5/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
- package/ts3.5/dist/es6/tabs/lib/Tabs.d.ts +2 -2
- package/ts3.5/dist/es6/tabs/lib/TabsItem.d.ts +1 -2
- package/ts3.5/dist/es6/tabs/lib/menu/Menu.d.ts +1 -1
- package/ts3.5/dist/es6/tabs/lib/menu/MenuItem.d.ts +1 -2
- package/ts3.5/dist/es6/text-input/lib/InputIconContainer.d.ts +1 -1
- package/ts3.5/dist/es6/tokens/lib/depth.d.ts +48 -17
- package/ts3.5/dist/es6/tooltip/lib/Tooltip.d.ts +1 -1
- package/ts3.5/dist/es6/tooltip/lib/useTooltip.d.ts +1 -1
- package/button/lib/IconButton.tsx +0 -279
- package/button/lib/parts/ButtonLabelData.tsx +0 -16
- package/dist/commonjs/button/lib/IconButton.d.ts +0 -44
- package/dist/commonjs/button/lib/IconButton.d.ts.map +0 -1
- package/dist/commonjs/button/lib/IconButton.js +0 -219
- package/dist/commonjs/button/lib/parts/ButtonContainer.d.ts +0 -33
- package/dist/commonjs/button/lib/parts/ButtonContainer.d.ts.map +0 -1
- package/dist/commonjs/button/lib/parts/ButtonContainer.js +0 -126
- package/dist/commonjs/button/lib/parts/ButtonLabelData.d.ts +0 -3
- package/dist/commonjs/button/lib/parts/ButtonLabelData.d.ts.map +0 -1
- package/dist/commonjs/button/lib/parts/ButtonLabelData.js +0 -45
- package/dist/es6/button/lib/IconButton.d.ts +0 -44
- package/dist/es6/button/lib/IconButton.d.ts.map +0 -1
- package/dist/es6/button/lib/IconButton.js +0 -197
- package/dist/es6/button/lib/parts/ButtonContainer.d.ts +0 -33
- package/dist/es6/button/lib/parts/ButtonContainer.d.ts.map +0 -1
- package/dist/es6/button/lib/parts/ButtonContainer.js +0 -120
- package/dist/es6/button/lib/parts/ButtonLabelData.d.ts +0 -3
- package/dist/es6/button/lib/parts/ButtonLabelData.d.ts.map +0 -1
- package/dist/es6/button/lib/parts/ButtonLabelData.js +0 -22
- package/ts3.5/dist/commonjs/button/lib/IconButton.d.ts +0 -44
- package/ts3.5/dist/commonjs/button/lib/parts/ButtonContainer.d.ts +0 -33
- package/ts3.5/dist/commonjs/button/lib/parts/ButtonLabelData.d.ts +0 -3
- package/ts3.5/dist/es6/button/lib/IconButton.d.ts +0 -44
- package/ts3.5/dist/es6/button/lib/parts/ButtonContainer.d.ts +0 -33
- package/ts3.5/dist/es6/button/lib/parts/ButtonLabelData.d.ts +0 -3
|
@@ -1,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 { iconColors } 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 systemIconStyles = function (_a) {
|
|
41
29
|
var accent = _a.accent, accentHover = _a.accentHover, _b = _a.background, background = _b === void 0 ? 'transparent' : _b, _c = _a.backgroundHover, backgroundHover = _c === void 0 ? 'transparent' : _c, _d = _a.color, color = _d === void 0 ? iconColors.standard : _d, _e = _a.colorHover, colorHover = _e === void 0 ? iconColors.hover : _e, fill = _a.fill, fillHover = _a.fillHover;
|
|
42
30
|
return ({
|
|
@@ -60,13 +48,10 @@ export var systemIconStyles = function (_a) {
|
|
|
60
48
|
},
|
|
61
49
|
});
|
|
62
50
|
};
|
|
63
|
-
var SystemIcon =
|
|
64
|
-
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
SystemIcon.prototype.render = function () {
|
|
69
|
-
var _a = this.props, _b = _a.background, background = _b === void 0 ? 'transparent' : _b, _c = _a.backgroundHover, backgroundHover = _c === void 0 ? 'transparent' : _c, _d = _a.color, color = _d === void 0 ? iconColors.standard : _d, _e = _a.colorHover, colorHover = _e === void 0 ? iconColors.hover : _e, icon = _a.icon, iconRef = _a.iconRef, accent = _a.accent, accentHover = _a.accentHover, fill = _a.fill, fillHover = _a.fillHover, size = _a.size, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["background", "backgroundHover", "color", "colorHover", "icon", "iconRef", "accent", "accentHover", "fill", "fillHover", "size", "shouldMirror"]);
|
|
51
|
+
var SystemIcon = createComponent('span')({
|
|
52
|
+
displayName: 'SystemIcon',
|
|
53
|
+
Component: function (_a, ref, Element) {
|
|
54
|
+
var _b = _a.background, background = _b === void 0 ? 'transparent' : _b, _c = _a.backgroundHover, backgroundHover = _c === void 0 ? 'transparent' : _c, _d = _a.color, color = _d === void 0 ? iconColors.standard : _d, _e = _a.colorHover, colorHover = _e === void 0 ? iconColors.hover : _e, icon = _a.icon, accent = _a.accent, accentHover = _a.accentHover, fill = _a.fill, fillHover = _a.fillHover, size = _a.size, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["background", "backgroundHover", "color", "colorHover", "icon", "accent", "accentHover", "fill", "fillHover", "size", "shouldMirror"]);
|
|
70
55
|
var style = systemIconStyles({
|
|
71
56
|
accent: accent,
|
|
72
57
|
accentHover: accentHover,
|
|
@@ -77,8 +62,7 @@ var SystemIcon = /** @class */ (function (_super) {
|
|
|
77
62
|
fill: fill,
|
|
78
63
|
fillHover: fillHover,
|
|
79
64
|
});
|
|
80
|
-
return (React.createElement(Icon, __assign({ src: icon, type: CanvasIconTypes.System, size: size,
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
}(React.Component));
|
|
65
|
+
return (React.createElement(Icon, __assign({ src: icon, type: CanvasIconTypes.System, size: size, as: Element, shouldMirror: shouldMirror, ref: ref, styles: style }, elemProps)));
|
|
66
|
+
},
|
|
67
|
+
});
|
|
84
68
|
export default SystemIcon;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { SystemIconProps } from './SystemIcon';
|
|
3
2
|
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
4
3
|
export declare enum SystemIconCircleSize {
|
|
@@ -9,7 +8,7 @@ export declare enum SystemIconCircleSize {
|
|
|
9
8
|
xl = 64,
|
|
10
9
|
xxl = 120
|
|
11
10
|
}
|
|
12
|
-
export interface SystemIconCircleProps extends Pick<SystemIconProps, '
|
|
11
|
+
export interface SystemIconCircleProps extends Pick<SystemIconProps, 'shouldMirror'> {
|
|
13
12
|
/**
|
|
14
13
|
* The background color of the SystemIconCircle from `@workday/canvas-colors-web`.
|
|
15
14
|
* @default colors.soap300
|
|
@@ -25,8 +24,6 @@ export interface SystemIconCircleProps extends Pick<SystemIconProps, 'iconRef' |
|
|
|
25
24
|
*/
|
|
26
25
|
size?: SystemIconCircleSize | number;
|
|
27
26
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
render(): JSX.Element;
|
|
31
|
-
}
|
|
27
|
+
declare const SystemIconCircle: import("../../common").ElementComponent<"span", SystemIconCircleProps>;
|
|
28
|
+
export default SystemIconCircle;
|
|
32
29
|
//# sourceMappingURL=SystemIconCircle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SystemIconCircle.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIconCircle.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SystemIconCircle.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIconCircle.tsx"],"names":[],"mappings":"AAIA,OAAmB,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AACzD,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D,oBAAY,oBAAoB;IAC9B,EAAE,KAAK;IACP,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,EAAE,KAAK;IACP,GAAG,MAAM;CACV;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC;IAClF;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAAC;CACtC;AA4BD,QAAA,MAAM,gBAAgB,wEA8BpB,CAAC;AAEH,eAAe,gBAAgB,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++) {
|
|
@@ -38,7 +25,7 @@ import styled from '@emotion/styled';
|
|
|
38
25
|
import isPropValid from '@emotion/is-prop-valid';
|
|
39
26
|
import { colors, borderRadius } from '@workday/canvas-kit-react/tokens';
|
|
40
27
|
import SystemIcon from './SystemIcon';
|
|
41
|
-
import { pickForegroundColor } from '@workday/canvas-kit-react/common';
|
|
28
|
+
import { createComponent, pickForegroundColor } from '@workday/canvas-kit-react/common';
|
|
42
29
|
export var SystemIconCircleSize;
|
|
43
30
|
(function (SystemIconCircleSize) {
|
|
44
31
|
SystemIconCircleSize[SystemIconCircleSize["xs"] = 16] = "xs";
|
|
@@ -75,19 +62,14 @@ var Container = styled('div', {
|
|
|
75
62
|
height: size,
|
|
76
63
|
});
|
|
77
64
|
});
|
|
78
|
-
var SystemIconCircle =
|
|
79
|
-
|
|
80
|
-
function
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
SystemIconCircle.prototype.render = function () {
|
|
84
|
-
var _a = this.props, _b = _a.background, background = _b === void 0 ? colors.soap200 : _b, _c = _a.size, size = _c === void 0 ? SystemIconCircleSize.l : _c, icon = _a.icon, iconRef = _a.iconRef, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["background", "size", "icon", "iconRef", "shouldMirror"]);
|
|
65
|
+
var SystemIconCircle = createComponent('span')({
|
|
66
|
+
displayName: 'SystemIconCircle',
|
|
67
|
+
Component: function (_a, ref, Element) {
|
|
68
|
+
var _b = _a.background, background = _b === void 0 ? colors.soap200 : _b, _c = _a.size, size = _c === void 0 ? SystemIconCircleSize.l : _c, icon = _a.icon, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["background", "size", "icon", "shouldMirror"]);
|
|
85
69
|
var iconColor = pickForegroundColor(background, 'rgba(0,0,0,0.65)', colors.frenchVanilla100);
|
|
86
70
|
var iconSize = size * 0.625;
|
|
87
71
|
return (React.createElement(Container, __assign({ background: background, size: size }, elemProps),
|
|
88
|
-
React.createElement(SystemIcon, { icon: icon, color: iconColor, colorHover: iconColor, size: iconSize,
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return SystemIconCircle;
|
|
92
|
-
}(React.Component));
|
|
72
|
+
React.createElement(SystemIcon, { icon: icon, color: iconColor, colorHover: iconColor, as: Element, size: iconSize, ref: ref, shouldMirror: shouldMirror })));
|
|
73
|
+
},
|
|
74
|
+
});
|
|
93
75
|
export default SystemIconCircle;
|
|
@@ -10,6 +10,23 @@ import { SpaceStyleProps } from './utils/space';
|
|
|
10
10
|
export declare type BoxProps = BorderStyleProps & ColorStyleProps & DepthStyleProps & FlexItemStyleProps & LayoutStyleProps & OtherStyleProps & PositionStyleProps & SpaceStyleProps & {
|
|
11
11
|
children?: React.ReactNode;
|
|
12
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* A function that allows us to call Box styles on an element and reduce the amount of elements in the React Dom tree.
|
|
15
|
+
* Instead of using the `as` in a styled function, you can just call this instead to pass those props to the styled element
|
|
16
|
+
* @example
|
|
17
|
+
* import { boxStyleFn } from '@workday/canvas-kit-react/layout';
|
|
18
|
+
* const StyledHeader = styled('h1')(
|
|
19
|
+
* boxStyleFn,
|
|
20
|
+
* {
|
|
21
|
+
* fontWeight: 400,
|
|
22
|
+
* }
|
|
23
|
+
* )
|
|
24
|
+
*
|
|
25
|
+
* ....
|
|
26
|
+
*
|
|
27
|
+
* <StyledHeader color='red'>Hello World</StyledHeader>
|
|
28
|
+
*/
|
|
29
|
+
export declare const boxStyleFn: <P extends BoxProps>(props: P) => {};
|
|
13
30
|
/**
|
|
14
31
|
* `Box` is a primitive component that provides a common, ergonomic API around Canvas design tokens.
|
|
15
32
|
* It is highly flexible, and its primary purpose is to build other components.
|
|
@@ -23,7 +40,7 @@ export declare type BoxProps = BorderStyleProps & ColorStyleProps & DepthStylePr
|
|
|
23
40
|
*
|
|
24
41
|
* // `Card`'s default values are set using `BoxProps`
|
|
25
42
|
* const Card = (props: CardProps) => (
|
|
26
|
-
* <Box depth={
|
|
43
|
+
* <Box depth={1} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
|
|
27
44
|
* );
|
|
28
45
|
*
|
|
29
46
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAS,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAW,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAS,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAW,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AAErD,oBAAY,QAAQ,GAAG,gBAAgB,GACrC,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,eAAe,GAAG;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../layout/lib/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAS,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAW,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAS,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAW,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AAErD,oBAAY,QAAQ,GAAG,gBAAgB,GACrC,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,eAAe,GAAG;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAQJ;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,UAAU,sCAsBtB,CAAC;AA+BF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,GAAG,unBAad,CAAC"}
|
|
@@ -37,6 +37,45 @@ var omittedProps = ['display', 'color', 'height', 'overflow', 'width', 'border',
|
|
|
37
37
|
var shouldForwardProp = function (prop) {
|
|
38
38
|
return isPropValid(prop) && !omittedProps.includes(prop);
|
|
39
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* A function that allows us to call Box styles on an element and reduce the amount of elements in the React Dom tree.
|
|
42
|
+
* Instead of using the `as` in a styled function, you can just call this instead to pass those props to the styled element
|
|
43
|
+
* @example
|
|
44
|
+
* import { boxStyleFn } from '@workday/canvas-kit-react/layout';
|
|
45
|
+
* const StyledHeader = styled('h1')(
|
|
46
|
+
* boxStyleFn,
|
|
47
|
+
* {
|
|
48
|
+
* fontWeight: 400,
|
|
49
|
+
* }
|
|
50
|
+
* )
|
|
51
|
+
*
|
|
52
|
+
* ....
|
|
53
|
+
*
|
|
54
|
+
* <StyledHeader color='red'>Hello World</StyledHeader>
|
|
55
|
+
*/
|
|
56
|
+
export var boxStyleFn = function (props) {
|
|
57
|
+
return [
|
|
58
|
+
{
|
|
59
|
+
boxSizing: 'border-box',
|
|
60
|
+
},
|
|
61
|
+
border,
|
|
62
|
+
color,
|
|
63
|
+
depth,
|
|
64
|
+
flexItem,
|
|
65
|
+
layout,
|
|
66
|
+
position,
|
|
67
|
+
space,
|
|
68
|
+
].reduce(function (result, style) {
|
|
69
|
+
// @ts-ignore
|
|
70
|
+
var temp = typeof style === 'function' ? style(props) : style;
|
|
71
|
+
// eslint-disable-next-line guard-for-in
|
|
72
|
+
for (var key in temp) {
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
result[key] = temp[key];
|
|
75
|
+
}
|
|
76
|
+
return result;
|
|
77
|
+
}, {});
|
|
78
|
+
};
|
|
40
79
|
// Meant to be used with elements. The `shouldForwardProps` will remove all style props
|
|
41
80
|
var StyledBoxElement = styled('div', { shouldForwardProp: shouldForwardProp })({
|
|
42
81
|
boxSizing: 'border-box',
|
|
@@ -58,7 +97,7 @@ var StyledBoxComponent = styled('div')({
|
|
|
58
97
|
*
|
|
59
98
|
* // `Card`'s default values are set using `BoxProps`
|
|
60
99
|
* const Card = (props: CardProps) => (
|
|
61
|
-
* <Box depth={
|
|
100
|
+
* <Box depth={1} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
|
|
62
101
|
* );
|
|
63
102
|
*
|
|
64
103
|
*/
|
|
@@ -15,7 +15,7 @@ export declare type FlexProps = BoxProps & FlexStyleProps;
|
|
|
15
15
|
*
|
|
16
16
|
* // `Card`'s default values are set using `FlexProps`
|
|
17
17
|
* const Card = (props: CardProps) => (
|
|
18
|
-
* <Flex flexDirection="column" alignItems="flex-start" depth={
|
|
18
|
+
* <Flex flexDirection="column" alignItems="flex-start" depth={1} space="m" {...props}>
|
|
19
19
|
* <h1>Hello, Card!</h1>
|
|
20
20
|
* <p>This card uses flexbox to set its layout.</p>
|
|
21
21
|
* </Flex>
|
|
@@ -42,7 +42,7 @@ var StyledFlex = styled(Box)({
|
|
|
42
42
|
*
|
|
43
43
|
* // `Card`'s default values are set using `FlexProps`
|
|
44
44
|
* const Card = (props: CardProps) => (
|
|
45
|
-
* <Flex flexDirection="column" alignItems="flex-start" depth={
|
|
45
|
+
* <Flex flexDirection="column" alignItems="flex-start" depth={1} space="m" {...props}>
|
|
46
46
|
* <h1>Hello, Card!</h1>
|
|
47
47
|
* <p>This card uses flexbox to set its layout.</p>
|
|
48
48
|
* </Flex>
|
|
@@ -30,6 +30,6 @@ export var ModalCard = createComponent('div')({
|
|
|
30
30
|
var children = _a.children, model = _a.model, elemProps = __rest(_a, ["children", "model"]);
|
|
31
31
|
var localModel = useModelContext(PopupModelContext, model);
|
|
32
32
|
var props = useModalCard(localModel, elemProps, ref);
|
|
33
|
-
return (React.createElement(Popup.Card, __assign({ as: Element, width: 440, borderWidth: 0, margin: "xl" }, props), children));
|
|
33
|
+
return (React.createElement(Popup.Card, __assign({ as: Element, width: 440, borderWidth: 0, margin: "xl", depth: 6 }, props), children));
|
|
34
34
|
},
|
|
35
35
|
});
|
|
@@ -31,6 +31,6 @@ export var ModalOverflowOverlay = createComponent('div')({
|
|
|
31
31
|
displayName: 'Modal.OverflowOverlay',
|
|
32
32
|
Component: function (_a, ref, Element) {
|
|
33
33
|
var children = _a.children, model = _a.model, elemProps = __rest(_a, ["children", "model"]);
|
|
34
|
-
return (React.createElement(StyledOverlay, __assign({ as: Element, ref: ref,
|
|
34
|
+
return (React.createElement(StyledOverlay, __assign({ as: Element, ref: ref, overflowX: "hidden", overflowY: "auto" }, elemProps), children));
|
|
35
35
|
},
|
|
36
36
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TertiaryButtonProps } from '@workday/canvas-kit-react/button';
|
|
3
3
|
import { PaginationModel } from './types';
|
|
4
|
-
export declare type ControlButtonProps =
|
|
4
|
+
export declare type ControlButtonProps = TertiaryButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
5
5
|
model: PaginationModel;
|
|
6
6
|
};
|
|
7
7
|
export declare type ControlsProps = React.HTMLAttributes<HTMLDivElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Controls.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/Controls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"Controls.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/Controls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAiB,mBAAmB,EAAC,MAAM,kCAAkC,CAAC;AAQrF,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAIxC,oBAAY,kBAAkB,GAAG,mBAAmB,GAClD,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAC9C,KAAK,EAAE,eAAe,CAAC;CACxB,CAAC;AAEJ,oBAAY,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEjE,eAAO,MAAM,QAAQ,4DAMpB,CAAC;AAEF,eAAO,MAAM,iBAAiB,qCAAoC,kBAAkB,gBAoBnF,CAAC;AAEF,eAAO,MAAM,oBAAoB,qCAAoC,kBAAkB,gBAoBtF,CAAC;AAEF,eAAO,MAAM,gBAAgB,qCAAoC,kBAAkB,gBAoBlF,CAAC;AAEF,eAAO,MAAM,gBAAgB,qCAAoC,kBAAkB,gBAoBlF,CAAC"}
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import * as React from 'react';
|
|
24
|
-
import {
|
|
24
|
+
import { TertiaryButton } from '@workday/canvas-kit-react/button';
|
|
25
25
|
import { chevronLeftSmallIcon, chevron2xLeftSmallIcon, chevronRightSmallIcon, chevron2xRightSmallIcon, } from '@workday/canvas-system-icons-web';
|
|
26
26
|
import { HStack } from '@workday/canvas-kit-react/layout';
|
|
27
27
|
import { useRTL } from './common/utils/useRTL';
|
|
@@ -41,7 +41,7 @@ export var JumpToFirstButton = function (_a) {
|
|
|
41
41
|
};
|
|
42
42
|
var shouldUseRTL = useRTL().shouldUseRTL;
|
|
43
43
|
var icon = shouldUseRTL ? chevron2xRightSmallIcon : chevron2xLeftSmallIcon;
|
|
44
|
-
return (React.createElement(
|
|
44
|
+
return (React.createElement(TertiaryButton, __assign({ "aria-disabled": isDisabled || undefined, size: "small", icon: icon, onClick: handleClick }, restProps)));
|
|
45
45
|
};
|
|
46
46
|
export var StepToPreviousButton = function (_a) {
|
|
47
47
|
var onClick = _a.onClick, model = _a.model, restProps = __rest(_a, ["onClick", "model"]);
|
|
@@ -55,7 +55,7 @@ export var StepToPreviousButton = function (_a) {
|
|
|
55
55
|
};
|
|
56
56
|
var shouldUseRTL = useRTL().shouldUseRTL;
|
|
57
57
|
var icon = shouldUseRTL ? chevronRightSmallIcon : chevronLeftSmallIcon;
|
|
58
|
-
return (React.createElement(
|
|
58
|
+
return (React.createElement(TertiaryButton, __assign({ "aria-disabled": isDisabled || undefined, size: "small", icon: icon, onClick: handleClick }, restProps)));
|
|
59
59
|
};
|
|
60
60
|
export var StepToNextButton = function (_a) {
|
|
61
61
|
var model = _a.model, onClick = _a.onClick, restProps = __rest(_a, ["model", "onClick"]);
|
|
@@ -69,7 +69,7 @@ export var StepToNextButton = function (_a) {
|
|
|
69
69
|
};
|
|
70
70
|
var shouldUseRTL = useRTL().shouldUseRTL;
|
|
71
71
|
var icon = shouldUseRTL ? chevronLeftSmallIcon : chevronRightSmallIcon;
|
|
72
|
-
return (React.createElement(
|
|
72
|
+
return (React.createElement(TertiaryButton, __assign({ "aria-disabled": isDisabled || undefined, size: "small", icon: icon, onClick: handleClick }, restProps)));
|
|
73
73
|
};
|
|
74
74
|
export var JumpToLastButton = function (_a) {
|
|
75
75
|
var model = _a.model, onClick = _a.onClick, restProps = __rest(_a, ["model", "onClick"]);
|
|
@@ -83,5 +83,5 @@ export var JumpToLastButton = function (_a) {
|
|
|
83
83
|
};
|
|
84
84
|
var shouldUseRTL = useRTL().shouldUseRTL;
|
|
85
85
|
var icon = shouldUseRTL ? chevron2xLeftSmallIcon : chevron2xRightSmallIcon;
|
|
86
|
-
return (React.createElement(
|
|
86
|
+
return (React.createElement(TertiaryButton, __assign({ "aria-disabled": isDisabled || undefined, size: "small", icon: icon, onClick: handleClick }, restProps)));
|
|
87
87
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { IconButtonProps } from '@workday/canvas-kit-react/button';
|
|
3
2
|
import { PaginationModel } from './types';
|
|
4
|
-
export declare type PageButtonProps =
|
|
3
|
+
export declare type PageButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
5
4
|
model: PaginationModel;
|
|
6
5
|
pageNumber: number;
|
|
7
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageButton.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/PageButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PageButton.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/PageButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAwCxC,oBAAY,eAAe,GAAG,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAC5E,KAAK,EAAE,eAAe,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,UAAU,2DAMpB,eAAe,gBAoBjB,CAAC"}
|
|
@@ -22,17 +22,42 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import * as React from 'react';
|
|
24
24
|
import { styled } from '@workday/canvas-kit-react/common';
|
|
25
|
-
import
|
|
26
|
-
import {
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
import { borderRadius, colors, space } from '@workday/canvas-kit-react/tokens';
|
|
26
|
+
import { BaseButton } from '@workday/canvas-kit-react/button';
|
|
27
|
+
var StyledPageButton = styled(BaseButton)({
|
|
28
|
+
minWidth: space.l,
|
|
29
|
+
width: space.l,
|
|
30
|
+
borderRadius: borderRadius.circle,
|
|
31
|
+
height: space.l,
|
|
32
|
+
}, function (_a) {
|
|
33
33
|
var toggled = _a.toggled;
|
|
34
|
-
return
|
|
34
|
+
return {
|
|
35
|
+
fontWeight: toggled ? 700 : 'normal',
|
|
36
|
+
};
|
|
35
37
|
});
|
|
38
|
+
var getPaginationButtonColors = function (toggled) {
|
|
39
|
+
return {
|
|
40
|
+
default: {
|
|
41
|
+
background: toggled ? colors.blueberry400 : 'transparent',
|
|
42
|
+
label: toggled ? colors.frenchVanilla100 : colors.blackPepper400,
|
|
43
|
+
},
|
|
44
|
+
hover: {
|
|
45
|
+
background: toggled ? colors.blueberry400 : colors.soap300,
|
|
46
|
+
label: toggled ? colors.frenchVanilla100 : colors.blackPepper400,
|
|
47
|
+
},
|
|
48
|
+
active: {
|
|
49
|
+
background: toggled ? colors.blueberry400 : 'transparent',
|
|
50
|
+
label: toggled ? colors.frenchVanilla100 : colors.blackPepper400,
|
|
51
|
+
},
|
|
52
|
+
focus: {
|
|
53
|
+
background: toggled ? colors.blueberry400 : 'transparent',
|
|
54
|
+
label: toggled ? colors.frenchVanilla100 : colors.blackPepper400,
|
|
55
|
+
},
|
|
56
|
+
disabled: {
|
|
57
|
+
background: colors.licorice100,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
};
|
|
36
61
|
export var PageButton = function (_a) {
|
|
37
62
|
var model = _a.model, onClick = _a.onClick, pageNumber = _a.pageNumber, children = _a.children, elemProps = __rest(_a, ["model", "onClick", "pageNumber", "children"]);
|
|
38
63
|
var isCurrentPage = pageNumber === model.state.currentPage;
|
|
@@ -40,5 +65,5 @@ export var PageButton = function (_a) {
|
|
|
40
65
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
41
66
|
model.events.goTo(pageNumber);
|
|
42
67
|
};
|
|
43
|
-
return (React.createElement(StyledPageButton, __assign({ "aria-current": isCurrentPage ? 'page' : undefined, "aria-pressed": undefined, onClick: handleClick,
|
|
68
|
+
return (React.createElement(StyledPageButton, __assign({ "aria-current": isCurrentPage ? 'page' : undefined, colors: getPaginationButtonColors(isCurrentPage), "aria-pressed": undefined, onClick: handleClick, toggled: isCurrentPage }, elemProps), children || pageNumber));
|
|
44
69
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TertiaryButtonProps } from '@workday/canvas-kit-react/button';
|
|
3
3
|
import { PaginationModel } from './types';
|
|
4
4
|
import { PaginationNavProps } from './Nav';
|
|
5
5
|
import { ControlsProps } from './Controls';
|
|
@@ -30,10 +30,10 @@ export declare type PaginationProps = PaginationConfigurationProps | PaginationM
|
|
|
30
30
|
export declare const Pagination: {
|
|
31
31
|
(props: PaginationProps): JSX.Element;
|
|
32
32
|
Controls(props: ControlsProps): JSX.Element;
|
|
33
|
-
JumpToFirstButton(props:
|
|
34
|
-
StepToPreviousButton(props:
|
|
35
|
-
StepToNextButton(props:
|
|
36
|
-
JumpToLastButton(props:
|
|
33
|
+
JumpToFirstButton(props: TertiaryButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
|
|
34
|
+
StepToPreviousButton(props: TertiaryButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
|
|
35
|
+
StepToNextButton(props: TertiaryButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
|
|
36
|
+
JumpToLastButton(props: TertiaryButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
|
|
37
37
|
PageList(props: Omit<PageListProps, 'model'>): JSX.Element;
|
|
38
38
|
PageListItem(props: PageListItemProps): JSX.Element;
|
|
39
39
|
PageButton({ "aria-label": ariaLabel, ...elemProps }: Omit<PageButtonProps, 'model'>): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/Pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/Pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,mBAAmB,EAAC,MAAM,kCAAkC,CAAC;AAErE,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAGxC,OAAO,EAAgB,kBAAkB,EAAC,MAAM,OAAO,CAAC;AACxD,OAAO,EAML,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAW,aAAa,EAAgB,iBAAiB,EAAC,MAAM,YAAY,CAAC;AACpF,OAAO,EAAa,eAAe,EAAC,MAAM,cAAc,CAAC;AAGzD,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAoB,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AAE9E,eAAO,MAAM,iBAAiB,gCAA6C,CAAC;AAE5E,aAAK,4BAA4B,GAAG,kBAAkB,GAAG;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,aAAK,oBAAoB,GAAG,kBAAkB,GAAG;IAC/C,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,kBAAkB,CAAC,EAAE,KAAK,CAAC;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,KAAK,EAAE,eAAe,CAAC;IACvB,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB,CAAC;AAMF,oBAAY,eAAe,GAAG,4BAA4B,GAAG,oBAAoB,CAAC;AAElF,eAAO,MAAM,UAAU;YAAW,eAAe;;6BA4BxC,mBAAmB,GAAG,MAAM,oBAAoB,CAAC,iBAAiB,CAAC;gCASnE,mBAAmB,GAAG,MAAM,oBAAoB,CAAC,iBAAiB,CAAC;4BASnE,mBAAmB,GAAG,MAAM,oBAAoB,CAAC,iBAAiB,CAAC;4BASnE,mBAAmB,GAAG,MAAM,oBAAoB,CAAC,iBAAiB,CAAC;oBAQ9C,KAAK,aAAa,EAAE,OAAO,CAAC;wBAOxB,iBAAiB;0DAOhD,KAAK,eAAe,EAAE,OAAO,CAAC;6BAOM,KAAK,sBAAsB,EAAE,OAAO,CAAC;2BAOzC,aAAa;yBAWb,kBAAkB;qBAItB,KAAK,cAAc,EAAE,OAAO,CAAC;CArF3D,CAAC"}
|
|
@@ -63,7 +63,7 @@ export var PopupCard = createComponent('div')({
|
|
|
63
63
|
}, [localModel.state.placement]);
|
|
64
64
|
// As is a Stack that will render an element of `Element`
|
|
65
65
|
var As = useConstant(function () { return Stack.as(Element); });
|
|
66
|
-
return (React.createElement(StyledPopupCard, __assign({ as: As, transformOrigin: transformOrigin, position: "relative", padding: "l", depth:
|
|
66
|
+
return (React.createElement(StyledPopupCard, __assign({ as: As, transformOrigin: transformOrigin, position: "relative", padding: "l", depth: 5, maxWidth: "calc(100vw - " + space.l + ")", spacing: 0, flexDirection: "column", minHeight: 0, maxHeight: "calc(100vh - " + (elemProps.margin
|
|
67
67
|
? space[elemProps.margin] || elemProps.margin
|
|
68
68
|
: space.xl) + " * 2)", overflowY: "auto" // force IE11 to limit the flex size of the card. Without this, the body isn't allowed to overflow properly: https://github.com/philipwalton/flexbugs/issues/216#issuecomment-453053557
|
|
69
69
|
}, props), children));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
2
|
-
import {
|
|
2
|
+
import { TertiaryButton } from '@workday/canvas-kit-react/button';
|
|
3
3
|
import { PopupModel } from './hooks';
|
|
4
|
-
export interface PopupCloseIconProps extends ExtractProps<typeof
|
|
4
|
+
export interface PopupCloseIconProps extends ExtractProps<typeof TertiaryButton, never> {
|
|
5
5
|
/**
|
|
6
6
|
* Optionally pass a model directly to this component. Default is to implicitly use the same
|
|
7
7
|
* model as the container component which uses React context. Only use this for advanced use-cases
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupCloseIcon.d.ts","sourceRoot":"","sources":["../../../../popup/lib/PopupCloseIcon.tsx"],"names":[],"mappings":"AAGA,OAAO,EAKL,YAAY,EACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"PopupCloseIcon.d.ts","sourceRoot":"","sources":["../../../../popup/lib/PopupCloseIcon.tsx"],"names":[],"mappings":"AAGA,OAAO,EAKL,YAAY,EACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,cAAc,EAAC,MAAM,kCAAkC,CAAC;AAEhE,OAAO,EAAsB,UAAU,EAAoB,MAAM,SAAS,CAAC;AAI3E,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,OAAO,cAAc,EAAE,KAAK,CAAC;IACrF;;;OAGG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAYD,eAAO,MAAM,cAAc,wEAWzB,CAAC"}
|
|
@@ -23,17 +23,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import React from 'react';
|
|
24
24
|
import { xIcon } from '@workday/canvas-system-icons-web';
|
|
25
25
|
import { styled, createComponent, useModelContext, } from '@workday/canvas-kit-react/common';
|
|
26
|
-
import {
|
|
26
|
+
import { TertiaryButton } from '@workday/canvas-kit-react/button';
|
|
27
27
|
import { usePopupCloseButton, PopupModelContext } from './hooks';
|
|
28
|
-
var closeIconSpacing =
|
|
29
|
-
var
|
|
30
|
-
var StyledCloseIcon = styled(IconButton)({
|
|
28
|
+
var closeIconSpacing = 4;
|
|
29
|
+
var StyledCloseIcon = styled(TertiaryButton)({
|
|
31
30
|
position: 'absolute',
|
|
32
31
|
}, function (_a) {
|
|
33
32
|
var size = _a.size;
|
|
34
33
|
return ({
|
|
35
|
-
right:
|
|
36
|
-
top:
|
|
34
|
+
right: closeIconSpacing,
|
|
35
|
+
top: closeIconSpacing,
|
|
37
36
|
});
|
|
38
37
|
});
|
|
39
38
|
export var PopupCloseIcon = createComponent('button')({
|
|
@@ -42,6 +41,6 @@ export var PopupCloseIcon = createComponent('button')({
|
|
|
42
41
|
var _b = _a.size, size = _b === void 0 ? 'medium' : _b, children = _a.children, model = _a.model, elemProps = __rest(_a, ["size", "children", "model"]);
|
|
43
42
|
var localModel = useModelContext(PopupModelContext, model);
|
|
44
43
|
var props = usePopupCloseButton(localModel, elemProps, ref);
|
|
45
|
-
return React.createElement(StyledCloseIcon, __assign({ as: Element,
|
|
44
|
+
return React.createElement(StyledCloseIcon, __assign({ as: Element, size: size, icon: xIcon }, props));
|
|
46
45
|
},
|
|
47
46
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useDisableBodyScroll.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAE3C;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,UAAW,UAAU,
|
|
1
|
+
{"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/useDisableBodyScroll.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAE3C;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,UAAW,UAAU,uBAsBrD,CAAC"}
|
|
@@ -13,10 +13,14 @@ export var useDisableBodyScroll = function (model, elemProps) {
|
|
|
13
13
|
if (!visible) {
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
|
+
var overflowY = document.body.style.overflowY;
|
|
17
|
+
var overflowX = document.body.style.overflowX;
|
|
16
18
|
var overflow = document.body.style.overflow;
|
|
17
19
|
document.body.style.overflow = 'hidden';
|
|
18
20
|
return function () {
|
|
19
21
|
document.body.style.overflow = overflow;
|
|
22
|
+
document.body.style.overflowY = overflowY;
|
|
23
|
+
document.body.style.overflowX = overflowX;
|
|
20
24
|
};
|
|
21
25
|
}, [visible]);
|
|
22
26
|
return elemProps;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SegmentedControlButtonProps } from './SegmentedControlButton';
|
|
3
3
|
export interface SegmentedControlProps {
|
|
4
4
|
/**
|
|
5
|
-
* The
|
|
5
|
+
* The Button children of the SegmentedControl (must be at least two).
|
|
6
6
|
* TODO: Add support for text children
|
|
7
7
|
*/
|
|
8
|
-
children: React.ReactElement<
|
|
8
|
+
children: React.ReactElement<SegmentedControlButtonProps>[];
|
|
9
9
|
/**
|
|
10
|
-
* The value or index of the
|
|
11
|
-
* If a string is provided, the
|
|
12
|
-
* If a number is provided, the
|
|
10
|
+
* The value or index of the Button that the SegmentedControl should be toggled on to.
|
|
11
|
+
* If a string is provided, the Button with the corresponding value will be selected.
|
|
12
|
+
* If a number is provided, the Button with the corresponding index will be selected.
|
|
13
13
|
* @default 0
|
|
14
14
|
*/
|
|
15
15
|
value?: string | number;
|
|
@@ -20,6 +20,8 @@ export interface SegmentedControlProps {
|
|
|
20
20
|
*/
|
|
21
21
|
onChange?: (value: string | number) => void;
|
|
22
22
|
}
|
|
23
|
-
declare const SegmentedControl: (
|
|
23
|
+
export declare const SegmentedControl: import("../../common").ElementComponent<"div", SegmentedControlProps> & {
|
|
24
|
+
Button: import("../../common").ElementComponent<"button", SegmentedControlButtonProps>;
|
|
25
|
+
};
|
|
24
26
|
export default SegmentedControl;
|
|
25
27
|
//# sourceMappingURL=SegmentedControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAyB,2BAA2B,EAAC,MAAM,0BAA0B,CAAC;AAE7F,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,2BAA2B,CAAC,EAAE,CAAC;IAE5D;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;CAC7C;AAsBD,eAAO,MAAM,gBAAgB;;CA+B3B,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|