@workday/canvas-kit-react 7.0.0-alpha.129-next.3 → 7.0.0-alpha.256-next.2
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/action-bar/lib/ActionBarItem.tsx +2 -7
- package/action-bar/lib/ActionBarList.tsx +14 -4
- package/action-bar/lib/ActionBarOverflowButton.tsx +10 -6
- package/banner/lib/Banner.tsx +3 -6
- package/breadcrumbs/LICENSE +52 -0
- package/breadcrumbs/README.md +9 -0
- package/breadcrumbs/index.ts +2 -0
- package/breadcrumbs/lib/Breadcrumbs.tsx +151 -0
- package/breadcrumbs/lib/BreadcrumbsCurrentItem.tsx +76 -0
- package/breadcrumbs/lib/BreadcrumbsItem.tsx +82 -0
- package/breadcrumbs/lib/BreadcrumbsLink.tsx +52 -0
- package/breadcrumbs/lib/BreadcrumbsList.tsx +51 -0
- package/breadcrumbs/lib/BreadcrumbsMenu.tsx +28 -0
- package/breadcrumbs/lib/BreadcrumbsOverflowButton.tsx +58 -0
- package/breadcrumbs/lib/hooks/useBreadcrumbsModel.tsx +76 -0
- package/breadcrumbs/lib/hooks/utils/index.ts +22 -0
- package/breadcrumbs/package.json +6 -0
- package/button/index.ts +7 -1
- package/button/lib/BaseButton.tsx +7 -4
- package/button/lib/DeleteButton.tsx +2 -2
- package/button/lib/PrimaryButton.tsx +2 -2
- package/button/lib/SecondaryButton.tsx +2 -2
- package/button/lib/TertiaryButton.tsx +21 -10
- package/card/lib/CardBody.tsx +3 -6
- package/card/lib/CardHeading.tsx +13 -10
- package/checkbox/index.ts +0 -1
- package/checkbox/lib/Checkbox.tsx +9 -24
- package/color-picker/index.ts +0 -1
- package/color-picker/lib/ColorInput.tsx +1 -2
- package/common/index.ts +1 -0
- package/common/lib/InputProvider.tsx +0 -5
- package/common/lib/responsive/useResponsiveContainerStyles.ts +128 -0
- package/common/lib/theming/index.ts +1 -1
- package/common/lib/theming/styled.ts +6 -3
- package/common/lib/utils/components.ts +48 -22
- package/common/lib/utils/elements.ts +7 -12
- package/common/lib/utils/index.ts +0 -1
- package/common/lib/utils/isWithinBreakpoint.ts +6 -0
- package/common/lib/utils/models.ts +10 -2
- package/common/lib/utils/useModalityType.ts +13 -13
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts +8 -0
- package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarItem.js +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarList.d.ts +92 -0
- package/dist/commonjs/action-bar/lib/ActionBarList.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarList.js +5 -5
- package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.d.ts +5 -1
- package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.js +3 -3
- package/dist/commonjs/banner/lib/Banner.d.ts +0 -9
- package/dist/commonjs/banner/lib/Banner.d.ts.map +1 -1
- package/dist/commonjs/banner/lib/Banner.js +2 -4
- package/dist/commonjs/breadcrumbs/index.d.ts +3 -0
- package/dist/commonjs/breadcrumbs/index.d.ts.map +1 -0
- package/dist/commonjs/breadcrumbs/index.js +14 -0
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.d.ts +3851 -0
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.d.ts.map +1 -0
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.js +177 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts +212 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts.map +1 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.js +63 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.d.ts +226 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.d.ts.map +1 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.js +76 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsLink.d.ts +17 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsLink.d.ts.map +1 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsLink.js +46 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.d.ts +164 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.d.ts.map +1 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.js +63 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.d.ts +1717 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.d.ts.map +1 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.js +58 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts +241 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts.map +1 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.js +68 -0
- package/dist/commonjs/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts +1661 -0
- package/dist/commonjs/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts.map +1 -0
- package/dist/commonjs/breadcrumbs/lib/hooks/useBreadcrumbsModel.js +67 -0
- package/dist/commonjs/breadcrumbs/lib/hooks/utils/index.d.ts +6 -0
- package/dist/commonjs/breadcrumbs/lib/hooks/utils/index.d.ts.map +1 -0
- package/dist/commonjs/breadcrumbs/lib/hooks/utils/index.js +22 -0
- 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 -1
- package/dist/commonjs/button/lib/BaseButton.d.ts +7 -4
- package/dist/commonjs/button/lib/BaseButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/DeleteButton.d.ts +2 -1
- package/dist/commonjs/button/lib/DeleteButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/PrimaryButton.d.ts +2 -1
- package/dist/commonjs/button/lib/PrimaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/SecondaryButton.d.ts +2 -1
- package/dist/commonjs/button/lib/SecondaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/TertiaryButton.d.ts +11 -1
- package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/TertiaryButton.js +9 -8
- package/dist/commonjs/card/lib/Card.d.ts +1 -1
- package/dist/commonjs/card/lib/CardBody.d.ts +1 -1
- package/dist/commonjs/card/lib/CardBody.d.ts.map +1 -1
- package/dist/commonjs/card/lib/CardBody.js +1 -6
- package/dist/commonjs/card/lib/CardHeading.d.ts.map +1 -1
- package/dist/commonjs/card/lib/CardHeading.js +2 -10
- package/dist/commonjs/checkbox/index.d.ts.map +1 -1
- package/dist/commonjs/checkbox/lib/Checkbox.d.ts.map +1 -1
- package/dist/commonjs/checkbox/lib/Checkbox.js +2 -13
- package/dist/commonjs/collection/lib/ListBox.d.ts +0 -57
- package/dist/commonjs/collection/lib/ListBox.d.ts.map +1 -1
- package/dist/commonjs/color-picker/index.d.ts.map +1 -1
- package/dist/commonjs/color-picker/lib/ColorInput.d.ts.map +1 -1
- package/dist/commonjs/color-picker/lib/ColorInput.js +1 -2
- package/dist/commonjs/common/index.d.ts +1 -0
- package/dist/commonjs/common/index.d.ts.map +1 -1
- package/dist/commonjs/common/index.js +1 -0
- package/dist/commonjs/common/lib/InputProvider.d.ts.map +1 -1
- package/dist/commonjs/common/lib/InputProvider.js +0 -7
- package/dist/commonjs/common/lib/responsive/useResponsiveContainerStyles.d.ts +78 -0
- package/dist/commonjs/common/lib/responsive/useResponsiveContainerStyles.d.ts.map +1 -0
- package/dist/commonjs/common/lib/responsive/useResponsiveContainerStyles.js +139 -0
- package/dist/commonjs/common/lib/theming/index.d.ts +1 -1
- package/dist/commonjs/common/lib/theming/index.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/styled.d.ts +2 -0
- package/dist/commonjs/common/lib/theming/styled.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/styled.js +1 -2
- package/dist/commonjs/common/lib/utils/components.d.ts +30 -18
- package/dist/commonjs/common/lib/utils/components.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/components.js +10 -5
- package/dist/commonjs/common/lib/utils/elements.d.ts +1 -1
- package/dist/commonjs/common/lib/utils/elements.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/elements.js +5 -11
- package/dist/commonjs/common/lib/utils/index.d.ts +0 -1
- package/dist/commonjs/common/lib/utils/index.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/index.js +0 -1
- package/dist/commonjs/common/lib/utils/isWithinBreakpoint.d.ts +5 -0
- package/dist/commonjs/common/lib/utils/isWithinBreakpoint.d.ts.map +1 -0
- package/dist/commonjs/common/lib/utils/isWithinBreakpoint.js +10 -0
- package/dist/commonjs/common/lib/utils/models.d.ts +10 -2
- package/dist/commonjs/common/lib/utils/models.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/models.js +3 -0
- package/dist/commonjs/common/lib/utils/useModalityType.js +13 -13
- package/dist/commonjs/dialog/lib/Dialog.d.ts +1 -1
- package/dist/commonjs/form-field/index.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/Hint.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/Hint.js +5 -13
- package/dist/commonjs/form-field/lib/Label.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/Label.js +0 -2
- package/dist/commonjs/icon/lib/SystemIcon.d.ts +1 -1
- package/dist/commonjs/icon/lib/SystemIcon.d.ts.map +1 -1
- package/dist/commonjs/index.d.ts +4 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +4 -1
- package/dist/commonjs/layout/index.d.ts +15 -5
- package/dist/commonjs/layout/index.d.ts.map +1 -1
- package/dist/commonjs/layout/index.js +14 -3
- package/dist/commonjs/layout/lib/Box.d.ts +23 -11
- package/dist/commonjs/layout/lib/Box.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Box.js +34 -8
- package/dist/commonjs/layout/lib/Column.d.ts +13 -4
- package/dist/commonjs/layout/lib/Column.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Column.js +10 -7
- package/dist/commonjs/layout/lib/Flex.d.ts +6 -3
- package/dist/commonjs/layout/lib/Flex.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Flex.js +5 -1
- package/dist/commonjs/layout/lib/Grid.d.ts +51 -0
- package/dist/commonjs/layout/lib/Grid.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/Grid.js +115 -0
- package/dist/commonjs/layout/lib/Layout.d.ts +26 -9
- package/dist/commonjs/layout/lib/Layout.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/Layout.js +21 -10
- package/dist/commonjs/layout/lib/Stack.d.ts +4 -4
- package/dist/commonjs/layout/lib/Stack.js +4 -4
- package/dist/commonjs/layout/lib/utils/background.d.ts +44 -0
- package/dist/commonjs/layout/lib/utils/background.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/background.js +57 -0
- package/dist/commonjs/layout/lib/utils/border/color.d.ts +47 -0
- package/dist/commonjs/layout/lib/utils/border/color.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/border/color.js +42 -0
- package/dist/commonjs/layout/lib/utils/border/index.d.ts +26 -0
- package/dist/commonjs/layout/lib/utils/border/index.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/border/index.js +46 -0
- package/dist/commonjs/layout/lib/utils/border/lineStyle.d.ts +38 -0
- package/dist/commonjs/layout/lib/utils/border/lineStyle.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/border/lineStyle.js +52 -0
- package/dist/commonjs/layout/lib/utils/border/radius.d.ts +33 -0
- package/dist/commonjs/layout/lib/utils/border/radius.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/border/radius.js +32 -0
- package/dist/commonjs/layout/lib/utils/border/shorthand.d.ts +34 -0
- package/dist/commonjs/layout/lib/utils/border/shorthand.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/border/shorthand.js +42 -0
- package/dist/commonjs/layout/lib/utils/border/width.d.ts +34 -0
- package/dist/commonjs/layout/lib/utils/border/width.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/border/width.js +42 -0
- package/dist/commonjs/layout/lib/utils/buildStyleFns.d.ts +12 -0
- package/dist/commonjs/layout/lib/utils/buildStyleFns.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/buildStyleFns.js +90 -0
- package/dist/commonjs/layout/lib/utils/color.d.ts +23 -16
- package/dist/commonjs/layout/lib/utils/color.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/color.js +25 -48
- package/dist/commonjs/layout/lib/utils/depth.d.ts +17 -11
- package/dist/commonjs/layout/lib/utils/depth.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/depth.js +20 -20
- package/dist/commonjs/layout/lib/utils/flex.d.ts +33 -14
- package/dist/commonjs/layout/lib/utils/flex.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/flex.js +58 -25
- package/dist/commonjs/layout/lib/utils/flexItem.d.ts +18 -15
- package/dist/commonjs/layout/lib/utils/flexItem.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/flexItem.js +43 -26
- package/dist/commonjs/layout/lib/utils/grid.d.ts +72 -0
- package/dist/commonjs/layout/lib/utils/grid.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/grid.js +112 -0
- package/dist/commonjs/layout/lib/utils/gridItem.d.ts +42 -0
- package/dist/commonjs/layout/lib/utils/gridItem.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/gridItem.js +71 -0
- package/dist/commonjs/layout/lib/utils/layout.d.ts +47 -25
- package/dist/commonjs/layout/lib/utils/layout.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/layout.js +71 -33
- package/dist/commonjs/layout/lib/utils/other.d.ts +46 -2
- package/dist/commonjs/layout/lib/utils/other.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/other.js +101 -17
- package/dist/commonjs/layout/lib/utils/position.d.ts +37 -20
- package/dist/commonjs/layout/lib/utils/position.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/position.js +49 -66
- package/dist/commonjs/layout/lib/utils/space.d.ts +107 -51
- package/dist/commonjs/layout/lib/utils/space.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/space.js +98 -148
- package/dist/commonjs/layout/lib/utils/stack.d.ts +3 -6
- package/dist/commonjs/layout/lib/utils/stack.d.ts.map +1 -1
- package/dist/commonjs/layout/lib/utils/stack.js +13 -39
- package/dist/commonjs/layout/lib/utils/styleProps.d.ts +41 -0
- package/dist/commonjs/layout/lib/utils/styleProps.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/styleProps.js +2 -0
- package/dist/commonjs/layout/lib/utils/systemProps.d.ts +31 -0
- package/dist/commonjs/layout/lib/utils/systemProps.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/systemProps.js +2 -0
- package/dist/commonjs/layout/lib/utils/text.d.ts +53 -0
- package/dist/commonjs/layout/lib/utils/text.d.ts.map +1 -0
- package/dist/commonjs/layout/lib/utils/text.js +84 -0
- package/dist/commonjs/loading-dots/index.d.ts +2 -0
- package/dist/commonjs/loading-dots/index.d.ts.map +1 -0
- package/dist/commonjs/loading-dots/index.js +13 -0
- package/dist/commonjs/{loading-animation → loading-dots}/lib/LoadingDots.d.ts +0 -0
- package/dist/commonjs/loading-dots/lib/LoadingDots.d.ts.map +1 -0
- package/dist/commonjs/{loading-animation → loading-dots}/lib/LoadingDots.js +0 -0
- package/dist/commonjs/menu/lib/MenuCard.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuCard.js +1 -1
- package/dist/commonjs/menu/lib/MenuContextTarget.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuContextTarget.js +2 -4
- package/dist/commonjs/menu/lib/MenuItem.js +13 -12
- package/dist/commonjs/menu/lib/MenuTarget.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuTarget.js +2 -4
- package/dist/commonjs/modal/lib/Modal.d.ts +1 -1
- package/dist/commonjs/modal/lib/ModalCard.d.ts.map +1 -1
- package/dist/commonjs/modal/lib/ModalCard.js +15 -1
- package/dist/commonjs/modal/lib/ModalHeading.d.ts.map +1 -1
- package/dist/commonjs/modal/lib/ModalHeading.js +11 -1
- package/dist/commonjs/modal/lib/ModalOverlay.d.ts.map +1 -1
- package/dist/commonjs/modal/lib/ModalOverlay.js +21 -16
- package/dist/commonjs/modal/lib/hooks/useCloseOnOverlayClick.d.ts.map +1 -1
- package/dist/commonjs/modal/lib/hooks/useCloseOnOverlayClick.js +3 -1
- package/dist/commonjs/modal/lib/hooks/useModalModel.js +1 -1
- package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.js +5 -4
- package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.js +2 -4
- package/dist/commonjs/pagination/lib/Pagination/usePaginationModel.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/usePaginationModel.js +5 -1
- package/dist/commonjs/popup/lib/Popup.d.ts +1 -1
- package/dist/commonjs/popup/lib/PopupBody.d.ts +1 -1
- package/dist/commonjs/popup/lib/PopupBody.js +1 -1
- package/dist/commonjs/popup/lib/PopupCard.d.ts +3 -2
- package/dist/commonjs/popup/lib/PopupCard.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/PopupCard.js +20 -13
- package/dist/commonjs/popup/lib/PopupCloseButton.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/PopupCloseButton.js +1 -1
- package/dist/commonjs/popup/lib/PopupCloseIcon.js +1 -1
- package/dist/commonjs/popup/lib/PopupHeading.js +1 -1
- package/dist/commonjs/popup/lib/PopupPopper.d.ts +2 -3
- package/dist/commonjs/popup/lib/PopupPopper.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/hooks/index.d.ts +1 -0
- package/dist/commonjs/popup/lib/hooks/index.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/hooks/index.js +1 -0
- package/dist/commonjs/popup/lib/hooks/useCloseOnTargetHidden.d.ts +31 -0
- package/dist/commonjs/popup/lib/hooks/useCloseOnTargetHidden.d.ts.map +1 -0
- package/dist/commonjs/popup/lib/hooks/useCloseOnTargetHidden.js +56 -0
- package/dist/commonjs/popup/lib/hooks/useReturnFocus.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/hooks/useReturnFocus.js +97 -3
- package/dist/commonjs/radio/lib/Radio.d.ts.map +1 -1
- package/dist/commonjs/radio/lib/Radio.js +2 -13
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts +3 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.js +11 -2
- 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 +1149 -1
- package/dist/commonjs/tabs/lib/Tabs.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -1
- package/dist/commonjs/tabs/lib/useTabsModel.d.ts +2773 -469
- package/dist/commonjs/tabs/lib/useTabsModel.d.ts.map +1 -1
- package/dist/commonjs/testing/index.d.ts +5 -0
- package/dist/commonjs/testing/index.d.ts.map +1 -0
- package/dist/commonjs/testing/index.js +16 -0
- package/dist/commonjs/testing/lib/ComponentStatesTable.d.ts +26 -0
- package/dist/commonjs/testing/lib/ComponentStatesTable.d.ts.map +1 -0
- package/dist/commonjs/testing/lib/ComponentStatesTable.js +48 -0
- package/dist/commonjs/testing/lib/StaticStates.d.ts +7 -0
- package/dist/commonjs/testing/lib/StaticStates.d.ts.map +1 -0
- package/dist/commonjs/{common/lib/utils → testing/lib}/StaticStates.js +1 -1
- package/dist/commonjs/testing/lib/permutateProps.d.ts +5 -0
- package/dist/commonjs/testing/lib/permutateProps.d.ts.map +1 -0
- package/dist/commonjs/testing/lib/permutateProps.js +47 -0
- package/dist/commonjs/testing/lib/propTypes.d.ts +15 -0
- package/dist/commonjs/testing/lib/propTypes.d.ts.map +1 -0
- package/dist/commonjs/testing/lib/propTypes.js +2 -0
- package/dist/commonjs/text/index.d.ts +4 -0
- package/dist/commonjs/text/index.d.ts.map +1 -0
- package/dist/commonjs/text/index.js +15 -0
- package/dist/commonjs/text/lib/LabelText.d.ts +30 -0
- package/dist/commonjs/text/lib/LabelText.d.ts.map +1 -0
- package/dist/commonjs/text/lib/LabelText.js +73 -0
- package/dist/commonjs/text/lib/Text.d.ts +58 -0
- package/dist/commonjs/text/lib/Text.d.ts.map +1 -0
- package/dist/commonjs/text/lib/Text.js +123 -0
- package/dist/commonjs/text/lib/TypeLevelComponents.d.ts +132 -0
- package/dist/commonjs/text/lib/TypeLevelComponents.d.ts.map +1 -0
- package/dist/commonjs/text/lib/TypeLevelComponents.js +195 -0
- package/dist/commonjs/text-input/index.d.ts.map +1 -1
- package/dist/commonjs/toast/lib/Toast.d.ts.map +1 -1
- package/dist/commonjs/toast/lib/Toast.js +1 -2
- package/dist/commonjs/tokens/lib/colors.types.d.ts +4 -6
- package/dist/commonjs/tokens/lib/colors.types.d.ts.map +1 -1
- package/dist/commonjs/tooltip/lib/OverflowTooltip.d.ts.map +1 -1
- package/dist/commonjs/tooltip/lib/OverflowTooltip.js +1 -4
- package/dist/commonjs/tooltip/lib/TooltipContainer.d.ts.map +1 -1
- package/dist/commonjs/tooltip/lib/TooltipContainer.js +5 -0
- package/dist/commonjs/tooltip/lib/useTooltip.d.ts.map +1 -1
- package/dist/commonjs/tooltip/lib/useTooltip.js +1 -0
- package/dist/es6/action-bar/lib/ActionBar.d.ts +1 -1
- package/dist/es6/action-bar/lib/ActionBarItem.d.ts +8 -0
- package/dist/es6/action-bar/lib/ActionBarItem.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarItem.js +2 -2
- package/dist/es6/action-bar/lib/ActionBarList.d.ts +92 -0
- package/dist/es6/action-bar/lib/ActionBarList.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarList.js +4 -4
- package/dist/es6/action-bar/lib/ActionBarOverflowButton.d.ts +5 -1
- package/dist/es6/action-bar/lib/ActionBarOverflowButton.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarOverflowButton.js +3 -3
- package/dist/es6/banner/lib/Banner.d.ts +0 -9
- package/dist/es6/banner/lib/Banner.d.ts.map +1 -1
- package/dist/es6/banner/lib/Banner.js +2 -4
- package/dist/es6/breadcrumbs/index.d.ts +3 -0
- package/dist/es6/breadcrumbs/index.d.ts.map +1 -0
- package/dist/es6/breadcrumbs/index.js +2 -0
- package/dist/es6/breadcrumbs/lib/Breadcrumbs.d.ts +3851 -0
- package/dist/es6/breadcrumbs/lib/Breadcrumbs.d.ts.map +1 -0
- package/dist/es6/breadcrumbs/lib/Breadcrumbs.js +155 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts +212 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts.map +1 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.js +57 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.d.ts +226 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.d.ts.map +1 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.js +54 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsLink.d.ts +17 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsLink.d.ts.map +1 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsLink.js +40 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsList.d.ts +164 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsList.d.ts.map +1 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsList.js +41 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.d.ts +1717 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.d.ts.map +1 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.js +36 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts +241 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts.map +1 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.js +46 -0
- package/dist/es6/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts +1661 -0
- package/dist/es6/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts.map +1 -0
- package/dist/es6/breadcrumbs/lib/hooks/useBreadcrumbsModel.js +61 -0
- package/dist/es6/breadcrumbs/lib/hooks/utils/index.d.ts +6 -0
- package/dist/es6/breadcrumbs/lib/hooks/utils/index.d.ts.map +1 -0
- package/dist/es6/breadcrumbs/lib/hooks/utils/index.js +18 -0
- 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 +7 -4
- package/dist/es6/button/lib/BaseButton.d.ts.map +1 -1
- package/dist/es6/button/lib/DeleteButton.d.ts +2 -1
- package/dist/es6/button/lib/DeleteButton.d.ts.map +1 -1
- package/dist/es6/button/lib/PrimaryButton.d.ts +2 -1
- package/dist/es6/button/lib/PrimaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/SecondaryButton.d.ts +2 -1
- package/dist/es6/button/lib/SecondaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/TertiaryButton.d.ts +11 -1
- package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/TertiaryButton.js +9 -8
- package/dist/es6/card/lib/Card.d.ts +1 -1
- package/dist/es6/card/lib/CardBody.d.ts +1 -1
- package/dist/es6/card/lib/CardBody.d.ts.map +1 -1
- package/dist/es6/card/lib/CardBody.js +1 -3
- package/dist/es6/card/lib/CardHeading.d.ts.map +1 -1
- package/dist/es6/card/lib/CardHeading.js +2 -7
- package/dist/es6/checkbox/index.d.ts.map +1 -1
- package/dist/es6/checkbox/lib/Checkbox.d.ts.map +1 -1
- package/dist/es6/checkbox/lib/Checkbox.js +3 -14
- package/dist/es6/collection/lib/ListBox.d.ts +0 -57
- package/dist/es6/collection/lib/ListBox.d.ts.map +1 -1
- package/dist/es6/color-picker/index.d.ts.map +1 -1
- package/dist/es6/color-picker/lib/ColorInput.d.ts.map +1 -1
- package/dist/es6/color-picker/lib/ColorInput.js +1 -2
- package/dist/es6/common/index.d.ts +1 -0
- package/dist/es6/common/index.d.ts.map +1 -1
- package/dist/es6/common/index.js +1 -0
- package/dist/es6/common/lib/InputProvider.d.ts.map +1 -1
- package/dist/es6/common/lib/InputProvider.js +0 -4
- package/dist/es6/common/lib/responsive/useResponsiveContainerStyles.d.ts +78 -0
- package/dist/es6/common/lib/responsive/useResponsiveContainerStyles.d.ts.map +1 -0
- package/dist/es6/common/lib/responsive/useResponsiveContainerStyles.js +135 -0
- package/dist/es6/common/lib/theming/index.d.ts +1 -1
- package/dist/es6/common/lib/theming/index.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/styled.d.ts +2 -0
- package/dist/es6/common/lib/theming/styled.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/styled.js +1 -2
- package/dist/es6/common/lib/utils/components.d.ts +30 -18
- package/dist/es6/common/lib/utils/components.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/components.js +10 -5
- package/dist/es6/common/lib/utils/elements.d.ts +1 -1
- package/dist/es6/common/lib/utils/elements.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/elements.js +5 -11
- package/dist/es6/common/lib/utils/index.d.ts +0 -1
- package/dist/es6/common/lib/utils/index.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/index.js +0 -1
- package/dist/es6/common/lib/utils/isWithinBreakpoint.d.ts +5 -0
- package/dist/es6/common/lib/utils/isWithinBreakpoint.d.ts.map +1 -0
- package/dist/es6/common/lib/utils/isWithinBreakpoint.js +6 -0
- package/dist/es6/common/lib/utils/models.d.ts +10 -2
- package/dist/es6/common/lib/utils/models.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/models.js +3 -0
- package/dist/es6/common/lib/utils/useModalityType.js +13 -13
- package/dist/es6/dialog/lib/Dialog.d.ts +1 -1
- package/dist/es6/form-field/index.d.ts.map +1 -1
- package/dist/es6/form-field/lib/Hint.d.ts.map +1 -1
- package/dist/es6/form-field/lib/Hint.js +6 -14
- package/dist/es6/form-field/lib/Label.d.ts.map +1 -1
- package/dist/es6/form-field/lib/Label.js +0 -2
- package/dist/es6/icon/lib/SystemIcon.d.ts +1 -1
- package/dist/es6/icon/lib/SystemIcon.d.ts.map +1 -1
- package/dist/es6/index.d.ts +4 -1
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +4 -1
- package/dist/es6/layout/index.d.ts +15 -5
- package/dist/es6/layout/index.d.ts.map +1 -1
- package/dist/es6/layout/index.js +12 -3
- package/dist/es6/layout/lib/Box.d.ts +23 -11
- package/dist/es6/layout/lib/Box.d.ts.map +1 -1
- package/dist/es6/layout/lib/Box.js +34 -8
- package/dist/es6/layout/lib/Column.d.ts +13 -4
- package/dist/es6/layout/lib/Column.d.ts.map +1 -1
- package/dist/es6/layout/lib/Column.js +9 -6
- package/dist/es6/layout/lib/Flex.d.ts +6 -3
- package/dist/es6/layout/lib/Flex.d.ts.map +1 -1
- package/dist/es6/layout/lib/Flex.js +5 -1
- package/dist/es6/layout/lib/Grid.d.ts +51 -0
- package/dist/es6/layout/lib/Grid.d.ts.map +1 -0
- package/dist/es6/layout/lib/Grid.js +90 -0
- package/dist/es6/layout/lib/Layout.d.ts +26 -9
- package/dist/es6/layout/lib/Layout.d.ts.map +1 -1
- package/dist/es6/layout/lib/Layout.js +21 -10
- package/dist/es6/layout/lib/Stack.d.ts +4 -4
- package/dist/es6/layout/lib/Stack.js +4 -4
- package/dist/es6/layout/lib/utils/background.d.ts +44 -0
- package/dist/es6/layout/lib/utils/background.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/background.js +54 -0
- package/dist/es6/layout/lib/utils/border/color.d.ts +47 -0
- package/dist/es6/layout/lib/utils/border/color.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/border/color.js +39 -0
- package/dist/es6/layout/lib/utils/border/index.d.ts +26 -0
- package/dist/es6/layout/lib/utils/border/index.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/border/index.js +43 -0
- package/dist/es6/layout/lib/utils/border/lineStyle.d.ts +38 -0
- package/dist/es6/layout/lib/utils/border/lineStyle.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/border/lineStyle.js +49 -0
- package/dist/es6/layout/lib/utils/border/radius.d.ts +33 -0
- package/dist/es6/layout/lib/utils/border/radius.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/border/radius.js +29 -0
- package/dist/es6/layout/lib/utils/border/shorthand.d.ts +34 -0
- package/dist/es6/layout/lib/utils/border/shorthand.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/border/shorthand.js +39 -0
- package/dist/es6/layout/lib/utils/border/width.d.ts +34 -0
- package/dist/es6/layout/lib/utils/border/width.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/border/width.js +39 -0
- package/dist/es6/layout/lib/utils/buildStyleFns.d.ts +12 -0
- package/dist/es6/layout/lib/utils/buildStyleFns.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/buildStyleFns.js +85 -0
- package/dist/es6/layout/lib/utils/color.d.ts +23 -16
- package/dist/es6/layout/lib/utils/color.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/color.js +24 -46
- package/dist/es6/layout/lib/utils/depth.d.ts +17 -11
- package/dist/es6/layout/lib/utils/depth.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/depth.js +19 -18
- package/dist/es6/layout/lib/utils/flex.d.ts +33 -14
- package/dist/es6/layout/lib/utils/flex.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/flex.js +57 -23
- package/dist/es6/layout/lib/utils/flexItem.d.ts +18 -15
- package/dist/es6/layout/lib/utils/flexItem.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/flexItem.js +42 -24
- package/dist/es6/layout/lib/utils/grid.d.ts +72 -0
- package/dist/es6/layout/lib/utils/grid.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/grid.js +109 -0
- package/dist/es6/layout/lib/utils/gridItem.d.ts +42 -0
- package/dist/es6/layout/lib/utils/gridItem.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/gridItem.js +68 -0
- package/dist/es6/layout/lib/utils/layout.d.ts +47 -25
- package/dist/es6/layout/lib/utils/layout.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/layout.js +70 -31
- package/dist/es6/layout/lib/utils/other.d.ts +46 -2
- package/dist/es6/layout/lib/utils/other.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/other.js +100 -15
- package/dist/es6/layout/lib/utils/position.d.ts +37 -20
- package/dist/es6/layout/lib/utils/position.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/position.js +48 -64
- package/dist/es6/layout/lib/utils/space.d.ts +107 -51
- package/dist/es6/layout/lib/utils/space.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/space.js +97 -146
- package/dist/es6/layout/lib/utils/stack.d.ts +3 -6
- package/dist/es6/layout/lib/utils/stack.d.ts.map +1 -1
- package/dist/es6/layout/lib/utils/stack.js +13 -39
- package/dist/es6/layout/lib/utils/styleProps.d.ts +41 -0
- package/dist/es6/layout/lib/utils/styleProps.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/styleProps.js +1 -0
- package/dist/es6/layout/lib/utils/systemProps.d.ts +31 -0
- package/dist/es6/layout/lib/utils/systemProps.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/systemProps.js +1 -0
- package/dist/es6/layout/lib/utils/text.d.ts +53 -0
- package/dist/es6/layout/lib/utils/text.d.ts.map +1 -0
- package/dist/es6/layout/lib/utils/text.js +81 -0
- package/dist/es6/loading-dots/index.d.ts +2 -0
- package/dist/es6/loading-dots/index.d.ts.map +1 -0
- package/dist/es6/loading-dots/index.js +1 -0
- package/dist/es6/{loading-animation → loading-dots}/lib/LoadingDots.d.ts +0 -0
- package/dist/es6/loading-dots/lib/LoadingDots.d.ts.map +1 -0
- package/dist/es6/{loading-animation → loading-dots}/lib/LoadingDots.js +0 -0
- package/dist/es6/menu/lib/MenuCard.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuCard.js +1 -1
- package/dist/es6/menu/lib/MenuContextTarget.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuContextTarget.js +2 -4
- package/dist/es6/menu/lib/MenuItem.js +13 -12
- package/dist/es6/menu/lib/MenuTarget.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuTarget.js +2 -4
- package/dist/es6/modal/lib/Modal.d.ts +1 -1
- package/dist/es6/modal/lib/ModalCard.d.ts.map +1 -1
- package/dist/es6/modal/lib/ModalCard.js +16 -2
- package/dist/es6/modal/lib/ModalHeading.d.ts.map +1 -1
- package/dist/es6/modal/lib/ModalHeading.js +12 -2
- package/dist/es6/modal/lib/ModalOverlay.d.ts.map +1 -1
- package/dist/es6/modal/lib/ModalOverlay.js +21 -16
- package/dist/es6/modal/lib/hooks/useCloseOnOverlayClick.d.ts.map +1 -1
- package/dist/es6/modal/lib/hooks/useCloseOnOverlayClick.js +4 -2
- package/dist/es6/modal/lib/hooks/useModalModel.js +1 -1
- package/dist/es6/pagination/lib/Pagination/AdditionalDetails.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/AdditionalDetails.js +6 -5
- package/dist/es6/pagination/lib/Pagination/GoTo/Label.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/GoTo/Label.js +2 -4
- package/dist/es6/pagination/lib/Pagination/usePaginationModel.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/usePaginationModel.js +5 -1
- package/dist/es6/popup/lib/Popup.d.ts +1 -1
- package/dist/es6/popup/lib/PopupBody.d.ts +1 -1
- package/dist/es6/popup/lib/PopupBody.js +1 -1
- package/dist/es6/popup/lib/PopupCard.d.ts +3 -2
- package/dist/es6/popup/lib/PopupCard.d.ts.map +1 -1
- package/dist/es6/popup/lib/PopupCard.js +21 -14
- package/dist/es6/popup/lib/PopupCloseButton.d.ts.map +1 -1
- package/dist/es6/popup/lib/PopupCloseButton.js +1 -1
- package/dist/es6/popup/lib/PopupCloseIcon.js +1 -1
- package/dist/es6/popup/lib/PopupHeading.js +1 -1
- package/dist/es6/popup/lib/PopupPopper.d.ts +2 -3
- package/dist/es6/popup/lib/PopupPopper.d.ts.map +1 -1
- package/dist/es6/popup/lib/hooks/index.d.ts +1 -0
- package/dist/es6/popup/lib/hooks/index.d.ts.map +1 -1
- package/dist/es6/popup/lib/hooks/index.js +1 -0
- package/dist/es6/popup/lib/hooks/useCloseOnTargetHidden.d.ts +31 -0
- package/dist/es6/popup/lib/hooks/useCloseOnTargetHidden.d.ts.map +1 -0
- package/dist/es6/popup/lib/hooks/useCloseOnTargetHidden.js +50 -0
- package/dist/es6/popup/lib/hooks/useReturnFocus.d.ts.map +1 -1
- package/dist/es6/popup/lib/hooks/useReturnFocus.js +98 -4
- package/dist/es6/radio/lib/Radio.d.ts.map +1 -1
- package/dist/es6/radio/lib/Radio.js +3 -14
- package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts +3 -1
- package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControlButton.js +12 -3
- 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 +1149 -1
- package/dist/es6/tabs/lib/Tabs.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsItem.d.ts +1 -1
- package/dist/es6/tabs/lib/useTabsModel.d.ts +2773 -469
- package/dist/es6/tabs/lib/useTabsModel.d.ts.map +1 -1
- package/dist/es6/testing/index.d.ts +5 -0
- package/dist/es6/testing/index.d.ts.map +1 -0
- package/dist/es6/testing/index.js +4 -0
- package/dist/es6/testing/lib/ComponentStatesTable.d.ts +26 -0
- package/dist/es6/testing/lib/ComponentStatesTable.d.ts.map +1 -0
- package/dist/es6/testing/lib/ComponentStatesTable.js +41 -0
- package/dist/es6/testing/lib/StaticStates.d.ts +7 -0
- package/dist/es6/testing/lib/StaticStates.d.ts.map +1 -0
- package/dist/es6/{common/lib/utils → testing/lib}/StaticStates.js +1 -1
- package/dist/es6/testing/lib/permutateProps.d.ts +5 -0
- package/dist/es6/testing/lib/permutateProps.d.ts.map +1 -0
- package/dist/es6/testing/lib/permutateProps.js +43 -0
- package/dist/es6/testing/lib/propTypes.d.ts +15 -0
- package/dist/es6/testing/lib/propTypes.d.ts.map +1 -0
- package/dist/es6/testing/lib/propTypes.js +1 -0
- package/dist/es6/text/index.d.ts +4 -0
- package/dist/es6/text/index.d.ts.map +1 -0
- package/dist/es6/text/index.js +3 -0
- package/dist/es6/text/lib/LabelText.d.ts +30 -0
- package/dist/es6/text/lib/LabelText.d.ts.map +1 -0
- package/dist/es6/text/lib/LabelText.js +51 -0
- package/dist/es6/text/lib/Text.d.ts +58 -0
- package/dist/es6/text/lib/Text.d.ts.map +1 -0
- package/dist/es6/text/lib/Text.js +101 -0
- package/dist/es6/text/lib/TypeLevelComponents.d.ts +132 -0
- package/dist/es6/text/lib/TypeLevelComponents.d.ts.map +1 -0
- package/dist/es6/text/lib/TypeLevelComponents.js +173 -0
- package/dist/es6/text-input/index.d.ts.map +1 -1
- package/dist/es6/toast/lib/Toast.d.ts.map +1 -1
- package/dist/es6/toast/lib/Toast.js +1 -2
- package/dist/es6/tokens/lib/colors.types.d.ts +4 -6
- package/dist/es6/tokens/lib/colors.types.d.ts.map +1 -1
- package/dist/es6/tooltip/lib/OverflowTooltip.d.ts.map +1 -1
- package/dist/es6/tooltip/lib/OverflowTooltip.js +1 -4
- package/dist/es6/tooltip/lib/TooltipContainer.d.ts.map +1 -1
- package/dist/es6/tooltip/lib/TooltipContainer.js +5 -0
- package/dist/es6/tooltip/lib/useTooltip.d.ts.map +1 -1
- package/dist/es6/tooltip/lib/useTooltip.js +2 -1
- package/form-field/index.ts +0 -1
- package/form-field/lib/Hint.tsx +8 -19
- package/form-field/lib/Label.tsx +1 -2
- package/icon/lib/SystemIcon.tsx +1 -1
- package/index.ts +4 -1
- package/layout/README.md +28 -27
- package/layout/index.ts +15 -5
- package/layout/lib/Box.tsx +63 -45
- package/layout/lib/Column.tsx +22 -5
- package/layout/lib/Flex.tsx +6 -2
- package/layout/lib/Grid.tsx +85 -0
- package/layout/lib/Layout.tsx +37 -12
- package/layout/lib/Stack.tsx +4 -4
- package/layout/lib/utils/background.ts +83 -0
- package/layout/lib/utils/border/color.ts +85 -0
- package/layout/lib/utils/border/index.ts +49 -0
- package/layout/lib/utils/border/lineStyle.ts +87 -0
- package/layout/lib/utils/border/radius.ts +61 -0
- package/layout/lib/utils/border/shorthand.ts +73 -0
- package/layout/lib/utils/border/width.ts +73 -0
- package/layout/lib/utils/buildStyleFns.ts +117 -0
- package/layout/lib/utils/color.ts +40 -50
- package/layout/lib/utils/depth.ts +28 -24
- package/layout/lib/utils/flex.ts +85 -34
- package/layout/lib/utils/flexItem.ts +54 -36
- package/layout/lib/utils/grid.ts +166 -0
- package/layout/lib/utils/gridItem.ts +96 -0
- package/layout/lib/utils/layout.ts +109 -50
- package/layout/lib/utils/other.ts +144 -15
- package/layout/lib/utils/position.ts +79 -73
- package/layout/lib/utils/space.ts +202 -196
- package/layout/lib/utils/stack.ts +19 -45
- package/layout/lib/utils/styleProps.ts +56 -0
- package/layout/lib/utils/systemProps.ts +46 -0
- package/layout/lib/utils/text.ts +122 -0
- package/{loading-animation → loading-dots}/LICENSE +0 -0
- package/loading-dots/README.md +7 -0
- package/loading-dots/index.ts +1 -0
- package/{loading-animation → loading-dots}/lib/LoadingDots.tsx +0 -0
- package/loading-dots/package.json +6 -0
- package/menu/lib/MenuCard.tsx +1 -0
- package/menu/lib/MenuContextTarget.tsx +2 -4
- package/menu/lib/MenuItem.tsx +12 -12
- package/menu/lib/MenuTarget.tsx +2 -4
- package/modal/lib/ModalCard.tsx +17 -4
- package/modal/lib/ModalHeading.tsx +14 -2
- package/modal/lib/ModalOverlay.tsx +11 -13
- package/modal/lib/hooks/useCloseOnOverlayClick.ts +4 -2
- package/modal/lib/hooks/useModalModel.ts +1 -1
- package/package.json +3 -6
- package/pagination/lib/Pagination/AdditionalDetails.tsx +7 -8
- package/pagination/lib/Pagination/GoTo/Label.tsx +3 -11
- package/pagination/lib/Pagination/usePaginationModel.ts +5 -2
- package/popup/lib/PopupBody.tsx +1 -1
- package/popup/lib/PopupCard.tsx +16 -8
- package/popup/lib/PopupCloseButton.tsx +5 -1
- package/popup/lib/PopupCloseIcon.tsx +1 -1
- package/popup/lib/PopupHeading.tsx +1 -1
- package/popup/lib/PopupPopper.tsx +2 -3
- package/popup/lib/hooks/index.ts +1 -0
- package/popup/lib/hooks/useCloseOnTargetHidden.ts +66 -0
- package/popup/lib/hooks/useReturnFocus.tsx +112 -4
- package/radio/lib/Radio.tsx +9 -24
- package/segmented-control/lib/SegmentedControlButton.tsx +24 -5
- package/select/lib/Select.tsx +1 -1
- package/side-panel/lib/SidePanel.tsx +7 -7
- package/tabs/lib/useTabsModel.tsx +2 -2
- package/testing/LICENSE +52 -0
- package/testing/README.md +6 -0
- package/testing/index.ts +4 -0
- package/testing/lib/ComponentStatesTable.tsx +80 -0
- package/{common/lib/utils → testing/lib}/StaticStates.tsx +5 -4
- package/testing/lib/permutateProps.ts +47 -0
- package/testing/lib/propTypes.ts +15 -0
- package/testing/package.json +6 -0
- package/text/LICENSE +52 -0
- package/text/README.md +5 -0
- package/text/index.ts +3 -0
- package/text/lib/LabelText.tsx +47 -0
- package/text/lib/Text.tsx +110 -0
- package/text/lib/TypeLevelComponents.tsx +164 -0
- package/text/package.json +6 -0
- package/text-input/index.ts +0 -1
- package/toast/lib/Toast.tsx +1 -2
- package/tokens/lib/colors.types.ts +4 -7
- package/tooltip/lib/OverflowTooltip.tsx +1 -4
- package/tooltip/lib/TooltipContainer.tsx +6 -0
- package/tooltip/lib/useTooltip.tsx +2 -0
- package/dist/commonjs/common/lib/utils/StaticStates.d.ts +0 -8
- package/dist/commonjs/common/lib/utils/StaticStates.d.ts.map +0 -1
- package/dist/commonjs/layout/lib/utils/border.d.ts +0 -103
- package/dist/commonjs/layout/lib/utils/border.d.ts.map +0 -1
- package/dist/commonjs/layout/lib/utils/border.js +0 -153
- package/dist/commonjs/loading-animation/index.d.ts +0 -3
- package/dist/commonjs/loading-animation/index.d.ts.map +0 -1
- package/dist/commonjs/loading-animation/index.js +0 -5
- package/dist/commonjs/loading-animation/lib/LoadingDots.d.ts.map +0 -1
- package/dist/es6/common/lib/utils/StaticStates.d.ts +0 -8
- package/dist/es6/common/lib/utils/StaticStates.d.ts.map +0 -1
- package/dist/es6/layout/lib/utils/border.d.ts +0 -103
- package/dist/es6/layout/lib/utils/border.d.ts.map +0 -1
- package/dist/es6/layout/lib/utils/border.js +0 -149
- package/dist/es6/loading-animation/index.d.ts +0 -3
- package/dist/es6/loading-animation/index.d.ts.map +0 -1
- package/dist/es6/loading-animation/index.js +0 -2
- package/dist/es6/loading-animation/lib/LoadingDots.d.ts.map +0 -1
- package/layout/lib/utils/border.ts +0 -263
- package/loading-animation/README.md +0 -7
- package/loading-animation/index.ts +0 -3
- package/loading-animation/package.json +0 -6
package/layout/lib/Box.tsx
CHANGED
|
@@ -4,27 +4,62 @@ import isPropValid from '@emotion/is-prop-valid';
|
|
|
4
4
|
import {createComponent, StyledType, useConstant} from '@workday/canvas-kit-react/common';
|
|
5
5
|
|
|
6
6
|
// style props
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
7
|
+
import {background} from './utils/background';
|
|
8
|
+
import {border} from './utils/border';
|
|
9
|
+
import {color} from './utils/color';
|
|
10
|
+
import {depth} from './utils/depth';
|
|
11
|
+
import {flexItem} from './utils/flexItem';
|
|
12
|
+
import {gridItem} from './utils/gridItem';
|
|
13
|
+
import {layout} from './utils/layout';
|
|
14
|
+
import {other} from './utils/other';
|
|
15
|
+
import {position} from './utils/position';
|
|
16
|
+
import {space} from './utils/space';
|
|
17
|
+
import {text} from './utils/text';
|
|
18
|
+
import {CommonStyleProps} from './utils/styleProps';
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Box Props
|
|
22
|
+
* ---
|
|
23
|
+
* Common style props + children
|
|
24
|
+
*
|
|
25
|
+
* - background
|
|
26
|
+
* - border
|
|
27
|
+
* - color
|
|
28
|
+
* - depth
|
|
29
|
+
* - flexItem
|
|
30
|
+
* - gridItem
|
|
31
|
+
* - layout
|
|
32
|
+
* - other
|
|
33
|
+
* - position
|
|
34
|
+
* - space
|
|
35
|
+
* - text
|
|
36
|
+
*/
|
|
37
|
+
export type BoxProps = CommonStyleProps & {
|
|
38
|
+
children?: React.ReactNode;
|
|
39
|
+
};
|
|
26
40
|
|
|
27
|
-
const omittedProps = [
|
|
41
|
+
const omittedProps = [
|
|
42
|
+
'display',
|
|
43
|
+
'color',
|
|
44
|
+
'height',
|
|
45
|
+
'overflow',
|
|
46
|
+
'width',
|
|
47
|
+
'border',
|
|
48
|
+
'background',
|
|
49
|
+
'fontSize',
|
|
50
|
+
'fontWeight',
|
|
51
|
+
'fontFamily',
|
|
52
|
+
'letterSpacing',
|
|
53
|
+
'lineHeight',
|
|
54
|
+
'textAlign',
|
|
55
|
+
'opacity',
|
|
56
|
+
'textDecoration',
|
|
57
|
+
'textOverflow',
|
|
58
|
+
'textTransform',
|
|
59
|
+
'textShadow',
|
|
60
|
+
'whiteSpace',
|
|
61
|
+
'wordBreak',
|
|
62
|
+
];
|
|
28
63
|
|
|
29
64
|
const shouldForwardProp = (prop: string) => {
|
|
30
65
|
return isPropValid(prop) && !omittedProps.includes(prop);
|
|
@@ -34,6 +69,7 @@ const shouldForwardProp = (prop: string) => {
|
|
|
34
69
|
* A function that allows us to call Box styles on an element and reduce the amount of elements in the React Dom tree.
|
|
35
70
|
* Instead of using the `as` in a styled function, you can just call this instead to pass those props to the styled element
|
|
36
71
|
* @example
|
|
72
|
+
* ```
|
|
37
73
|
* import { boxStyleFn } from '@workday/canvas-kit-react/layout';
|
|
38
74
|
* const StyledHeader = styled('h1')(
|
|
39
75
|
* boxStyleFn,
|
|
@@ -42,22 +78,27 @@ const shouldForwardProp = (prop: string) => {
|
|
|
42
78
|
* }
|
|
43
79
|
* )
|
|
44
80
|
*
|
|
45
|
-
*
|
|
81
|
+
* ...
|
|
46
82
|
*
|
|
47
83
|
* <StyledHeader color='red'>Hello World</StyledHeader>
|
|
84
|
+
* ```
|
|
48
85
|
*/
|
|
49
86
|
export const boxStyleFn = <P extends BoxProps>(props: P) => {
|
|
50
87
|
return [
|
|
51
88
|
{
|
|
52
89
|
boxSizing: 'border-box',
|
|
53
90
|
},
|
|
91
|
+
background,
|
|
54
92
|
border,
|
|
55
93
|
color,
|
|
56
94
|
depth,
|
|
57
95
|
flexItem,
|
|
96
|
+
gridItem,
|
|
58
97
|
layout,
|
|
98
|
+
other,
|
|
59
99
|
position,
|
|
60
100
|
space,
|
|
101
|
+
text,
|
|
61
102
|
].reduce((result, style) => {
|
|
62
103
|
// @ts-ignore
|
|
63
104
|
const temp = typeof style === 'function' ? style(props) : style;
|
|
@@ -71,33 +112,10 @@ export const boxStyleFn = <P extends BoxProps>(props: P) => {
|
|
|
71
112
|
};
|
|
72
113
|
|
|
73
114
|
// Meant to be used with elements. The `shouldForwardProps` will remove all style props
|
|
74
|
-
const StyledBoxElement = styled('div', {shouldForwardProp})<StyledType & BoxProps>(
|
|
75
|
-
{
|
|
76
|
-
boxSizing: 'border-box',
|
|
77
|
-
},
|
|
78
|
-
border,
|
|
79
|
-
color,
|
|
80
|
-
depth,
|
|
81
|
-
flexItem,
|
|
82
|
-
layout,
|
|
83
|
-
position,
|
|
84
|
-
space
|
|
85
|
-
);
|
|
115
|
+
const StyledBoxElement = styled('div', {shouldForwardProp})<StyledType & BoxProps>(boxStyleFn);
|
|
86
116
|
|
|
87
117
|
// Meant to be used with components. There is no `shouldForwardProps` - all props will be forwarded to the component
|
|
88
|
-
const StyledBoxComponent = styled('div')<StyledType & BoxProps>(
|
|
89
|
-
{
|
|
90
|
-
boxSizing: 'border-box',
|
|
91
|
-
},
|
|
92
|
-
border,
|
|
93
|
-
color,
|
|
94
|
-
depth,
|
|
95
|
-
flexItem,
|
|
96
|
-
layout,
|
|
97
|
-
other,
|
|
98
|
-
position,
|
|
99
|
-
space
|
|
100
|
-
);
|
|
118
|
+
const StyledBoxComponent = styled('div')<StyledType & BoxProps>(boxStyleFn);
|
|
101
119
|
|
|
102
120
|
/**
|
|
103
121
|
* `Box` is a primitive component that provides a common, ergonomic API around Canvas design tokens.
|
package/layout/lib/Column.tsx
CHANGED
|
@@ -2,13 +2,21 @@ import * as React from 'react';
|
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import isPropValid from '@emotion/is-prop-valid';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* ### Deprecated Layout Column Props
|
|
7
|
+
*
|
|
8
|
+
* As of Canvas Kit v8, Layout is being soft-deprecated.
|
|
9
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
10
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
11
|
+
* for more information.
|
|
12
|
+
*/
|
|
13
|
+
export interface DeprecatedColumnProps {
|
|
6
14
|
/**
|
|
7
|
-
* The children of the
|
|
15
|
+
* The children of the DeprecatedColumn (cannot be empty).
|
|
8
16
|
*/
|
|
9
17
|
children?: React.ReactNode;
|
|
10
18
|
/**
|
|
11
|
-
* The left and right padding of the
|
|
19
|
+
* The left and right padding of the DeprecatedColumn (inherits from Layout prop).
|
|
12
20
|
* @default 12
|
|
13
21
|
*/
|
|
14
22
|
spacing?: number;
|
|
@@ -24,7 +32,7 @@ export interface ColumnProps {
|
|
|
24
32
|
|
|
25
33
|
const ColumnContainer = styled('div', {
|
|
26
34
|
shouldForwardProp: prop => isPropValid(prop) && prop !== 'spacing',
|
|
27
|
-
})<
|
|
35
|
+
})<DeprecatedColumnProps>(
|
|
28
36
|
{
|
|
29
37
|
'&:first-of-type': {
|
|
30
38
|
paddingLeft: 0,
|
|
@@ -58,7 +66,16 @@ const ColumnContainer = styled('div', {
|
|
|
58
66
|
}
|
|
59
67
|
);
|
|
60
68
|
|
|
61
|
-
export class
|
|
69
|
+
export class DeprecatedColumn extends React.Component<DeprecatedColumnProps> {
|
|
70
|
+
componentDidMount() {
|
|
71
|
+
console.warn(
|
|
72
|
+
`This component is being deprecated and will be removed in Canvas Kit V9.\n
|
|
73
|
+
For more information, please see the V8 upgrade guide:\n
|
|
74
|
+
https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page
|
|
75
|
+
`
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
62
79
|
public render() {
|
|
63
80
|
const {children, spacing, columns, width, ...elemProps} = this.props;
|
|
64
81
|
|
package/layout/lib/Flex.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import {Box, BoxProps} from './Box';
|
|
|
5
5
|
|
|
6
6
|
import {flex, FlexStyleProps} from './utils/flex';
|
|
7
7
|
|
|
8
|
-
export type FlexProps = BoxProps & FlexStyleProps;
|
|
8
|
+
export type FlexProps = Omit<BoxProps, 'display'> & FlexStyleProps;
|
|
9
9
|
|
|
10
10
|
const StyledFlex = styled(Box)<StyledType & FlexProps>(
|
|
11
11
|
{
|
|
@@ -20,6 +20,7 @@ const StyledFlex = styled(Box)<StyledType & FlexProps>(
|
|
|
20
20
|
* `Flex` is built on top of `Box` and has access to all `BoxProps`.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
|
+
* ```tsx
|
|
23
24
|
* import { Flex, FlexProps } from '@workday/canvas-kit-react/layout';
|
|
24
25
|
*
|
|
25
26
|
* interface CardProps extends FlexProps {
|
|
@@ -33,7 +34,7 @@ const StyledFlex = styled(Box)<StyledType & FlexProps>(
|
|
|
33
34
|
* <p>This card uses flexbox to set its layout.</p>
|
|
34
35
|
* </Flex>
|
|
35
36
|
* );
|
|
36
|
-
*
|
|
37
|
+
* ```
|
|
37
38
|
*/
|
|
38
39
|
export const Flex = createComponent('div')({
|
|
39
40
|
displayName: 'Flex',
|
|
@@ -44,4 +45,7 @@ export const Flex = createComponent('div')({
|
|
|
44
45
|
</StyledFlex>
|
|
45
46
|
);
|
|
46
47
|
},
|
|
48
|
+
subComponents: {
|
|
49
|
+
Item: Box,
|
|
50
|
+
},
|
|
47
51
|
});
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
import {createComponent, StyledType} from '@workday/canvas-kit-react/common';
|
|
4
|
+
import {Box, BoxProps} from './Box';
|
|
5
|
+
|
|
6
|
+
import {grid, GridStyleProps} from './utils/grid';
|
|
7
|
+
|
|
8
|
+
export type GridProps = Omit<BoxProps, 'display'> & GridStyleProps;
|
|
9
|
+
export type GridItemProps = BoxProps;
|
|
10
|
+
|
|
11
|
+
const StyledGrid = styled(Box)<StyledType & GridProps>(
|
|
12
|
+
{
|
|
13
|
+
display: 'grid',
|
|
14
|
+
},
|
|
15
|
+
grid
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const GridItem = createComponent('div')({
|
|
19
|
+
displayName: 'Grid.Item',
|
|
20
|
+
Component: ({children, ...elemProps}: BoxProps, ref, Element) => {
|
|
21
|
+
return (
|
|
22
|
+
<Box as={Element} ref={ref} {...elemProps}>
|
|
23
|
+
{children}
|
|
24
|
+
</Box>
|
|
25
|
+
);
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* `Grid` is a two-dimensional layout system for the web. It lets you lay content out in rows and columns.
|
|
31
|
+
* It is highly flexible, and can be used on its own or to build other components.
|
|
32
|
+
* `Grid` is built on top of `Box` and has access to all `BoxProps`.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* import { Grid } from '@workday/canvas-kit-react/layout';
|
|
37
|
+
*
|
|
38
|
+
* interface CardProps extends GridProps {
|
|
39
|
+
* // card-specific props
|
|
40
|
+
* }
|
|
41
|
+
*
|
|
42
|
+
* // `Card`'s default values are set using `GridProps`
|
|
43
|
+
* const Card = (props: CardProps) => (
|
|
44
|
+
* <Grid gridAutoFlow="row" alignItems="start" depth={1} space="m" {...props}>
|
|
45
|
+
* <h1>Hello, Card!</h1>
|
|
46
|
+
* <p>This card uses grid to set its layout.</p>
|
|
47
|
+
* </Grid>
|
|
48
|
+
* );
|
|
49
|
+
*```
|
|
50
|
+
*/
|
|
51
|
+
export const Grid = createComponent('div')({
|
|
52
|
+
displayName: 'Grid',
|
|
53
|
+
Component: ({children, ...elemProps}: GridProps, ref, Element) => {
|
|
54
|
+
return (
|
|
55
|
+
<StyledGrid as={Element} ref={ref} {...elemProps}>
|
|
56
|
+
{children}
|
|
57
|
+
</StyledGrid>
|
|
58
|
+
);
|
|
59
|
+
},
|
|
60
|
+
subComponents: {
|
|
61
|
+
/**
|
|
62
|
+
* `<Grid.Item />` is the child specific sub-component to `<Grid/>`. `<Grid.Item />` gets child specific props, whereas `<Grid./>` gets parent container props.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```
|
|
66
|
+
* import { Grid } from '@workday/canvas-kit-react/layout';
|
|
67
|
+
* `Grid` is built on top of `Box` so `<Grid.Item />` gets all `BoxProps` as well.
|
|
68
|
+
*
|
|
69
|
+
* interface CardProps extends GridItemStyleProps {
|
|
70
|
+
* // card-specific props
|
|
71
|
+
* }
|
|
72
|
+
*
|
|
73
|
+
* // `Card`'s default values are set using `GridItemStyleProps`
|
|
74
|
+
* const Card = (props: CardProps) => (
|
|
75
|
+
* <Grid.Item gridRowStart="1" gridArea="Card" {...props}>
|
|
76
|
+
* <h1>Hello, Card!</h1>
|
|
77
|
+
* <p>This card uses grid child specific props to set its layout.</p>
|
|
78
|
+
* </Grid.Item>
|
|
79
|
+
* );
|
|
80
|
+
*```
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
Item: GridItem,
|
|
84
|
+
},
|
|
85
|
+
});
|
package/layout/lib/Layout.tsx
CHANGED
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import {GenericStyle} from '@workday/canvas-kit-react/common';
|
|
4
|
-
import {
|
|
4
|
+
import {DeprecatedColumn, DeprecatedColumnProps} from './Column';
|
|
5
5
|
import {canvas, spaceNumbers} from '@workday/canvas-kit-react/tokens';
|
|
6
6
|
import isPropValid from '@emotion/is-prop-valid';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* ### Deprecated Layout Props
|
|
10
|
+
*
|
|
11
|
+
* As of Canvas Kit v8, Layout is being soft-deprecated.
|
|
12
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
13
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
14
|
+
* for more information.
|
|
15
|
+
*/
|
|
16
|
+
export interface DeprecatedLayoutProps {
|
|
9
17
|
/**
|
|
10
|
-
* The children of the
|
|
18
|
+
* The children of the DeprecatedLayout (cannot be empty).
|
|
11
19
|
*/
|
|
12
|
-
children: React.ReactElement<
|
|
20
|
+
children: React.ReactElement<DeprecatedColumnProps>[] | React.ReactNode;
|
|
13
21
|
/**
|
|
14
|
-
* The spacing of the
|
|
22
|
+
* The spacing of the DeprecatedLayout children.
|
|
15
23
|
*/
|
|
16
24
|
spacing?: number;
|
|
17
25
|
/**
|
|
18
|
-
* The padding of the
|
|
26
|
+
* The padding of the DeprecatedLayout's outside container.
|
|
19
27
|
* @default 12
|
|
20
28
|
*/
|
|
21
29
|
gutter?: number | string;
|
|
22
30
|
/**
|
|
23
|
-
* If true, set the max width of the
|
|
31
|
+
* If true, set the max width of the DeprecatedLayout container to `1280px`.
|
|
24
32
|
* @default false
|
|
25
33
|
*/
|
|
26
34
|
capWidth?: boolean;
|
|
@@ -37,7 +45,7 @@ const LayoutStyles: GenericStyle = {
|
|
|
37
45
|
|
|
38
46
|
const LayoutContainer = styled('div', {
|
|
39
47
|
shouldForwardProp: prop => isPropValid(prop) && prop !== 'spacing',
|
|
40
|
-
})<
|
|
48
|
+
})<DeprecatedLayoutProps>(
|
|
41
49
|
LayoutStyles.styles,
|
|
42
50
|
({gutter}) => {
|
|
43
51
|
if (gutter === 0) {
|
|
@@ -58,15 +66,32 @@ const LayoutContainer = styled('div', {
|
|
|
58
66
|
}
|
|
59
67
|
);
|
|
60
68
|
|
|
61
|
-
|
|
62
|
-
|
|
69
|
+
/**
|
|
70
|
+
* ### Deprecated Layout
|
|
71
|
+
*
|
|
72
|
+
* As of Canvas Kit v8, Layout is being soft-deprecated.
|
|
73
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
74
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
75
|
+
* for more information.
|
|
76
|
+
*/
|
|
77
|
+
export class DeprecatedLayout extends React.Component<DeprecatedLayoutProps> {
|
|
78
|
+
componentDidMount() {
|
|
79
|
+
console.warn(
|
|
80
|
+
`This component is being deprecated and will be removed in Canvas Kit V9.\n
|
|
81
|
+
For more information, please see the V8 upgrade guide:\n
|
|
82
|
+
https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page
|
|
83
|
+
`
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
public static Column = DeprecatedColumn;
|
|
63
88
|
|
|
64
89
|
private renderChild = (child: React.ReactNode, spacing: number): React.ReactNode => {
|
|
65
90
|
if (!React.isValidElement(child)) {
|
|
66
91
|
return;
|
|
67
92
|
}
|
|
68
93
|
|
|
69
|
-
if (child.type ===
|
|
94
|
+
if (child.type === DeprecatedColumn) {
|
|
70
95
|
const childProps = child.props;
|
|
71
96
|
|
|
72
97
|
if (childProps.spacing || childProps.spacing === 0) {
|
|
@@ -96,4 +121,4 @@ export class Layout extends React.Component<LayoutProps> {
|
|
|
96
121
|
}
|
|
97
122
|
}
|
|
98
123
|
|
|
99
|
-
|
|
124
|
+
DeprecatedLayout.Column = DeprecatedColumn;
|
package/layout/lib/Stack.tsx
CHANGED
|
@@ -62,9 +62,9 @@ export interface HStackProps extends StackProps {
|
|
|
62
62
|
|
|
63
63
|
export const HStack = createComponent('div')({
|
|
64
64
|
displayName: 'HStack',
|
|
65
|
-
Component: ({children, ...elemProps}: HStackProps, ref, Element) => {
|
|
65
|
+
Component: ({children, flexDirection = 'row', ...elemProps}: HStackProps, ref, Element) => {
|
|
66
66
|
return (
|
|
67
|
-
<Stack as={Element} ref={ref} flexDirection=
|
|
67
|
+
<Stack as={Element} ref={ref} flexDirection={flexDirection} {...elemProps}>
|
|
68
68
|
{children}
|
|
69
69
|
</Stack>
|
|
70
70
|
);
|
|
@@ -84,9 +84,9 @@ export interface VStackProps extends StackProps {
|
|
|
84
84
|
|
|
85
85
|
export const VStack = createComponent('div')({
|
|
86
86
|
displayName: 'VStack',
|
|
87
|
-
Component: ({children, ...elemProps}: VStackProps, ref, Element) => {
|
|
87
|
+
Component: ({children, flexDirection = 'column', ...elemProps}: VStackProps, ref, Element) => {
|
|
88
88
|
return (
|
|
89
|
-
<Stack as={Element} ref={ref} flexDirection=
|
|
89
|
+
<Stack as={Element} ref={ref} flexDirection={flexDirection} {...elemProps}>
|
|
90
90
|
{children}
|
|
91
91
|
</Stack>
|
|
92
92
|
);
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {Property} from 'csstype';
|
|
2
|
+
|
|
3
|
+
import {buildStyleFns, buildStylePropFn, StyleFnConfig} from './buildStyleFns';
|
|
4
|
+
import {SystemPropValues} from './systemProps';
|
|
5
|
+
|
|
6
|
+
/** style props to set CSS background properties */
|
|
7
|
+
export type BackgroundStyleProps = {
|
|
8
|
+
/**
|
|
9
|
+
* - sets [CSS background property](https://developer.mozilla.org/en-US/docs/Web/CSS/background)
|
|
10
|
+
* - system tokens: `color`
|
|
11
|
+
* */
|
|
12
|
+
background?: SystemPropValues['color'];
|
|
13
|
+
/** sets [CSS background-attachment property](https://developer.mozilla.org/en-US/docs/Web/CSS/) */
|
|
14
|
+
backgroundAttachment?: Property.BackgroundAttachment;
|
|
15
|
+
/**
|
|
16
|
+
* - sets [CSS background-color property](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color)
|
|
17
|
+
* - system tokens: `color`
|
|
18
|
+
* */
|
|
19
|
+
backgroundColor?: SystemPropValues['color'];
|
|
20
|
+
/** sets [CSS background-image property](https://developer.mozilla.org/en-US/docs/Web/CSS/background-image) */
|
|
21
|
+
backgroundImage?: Property.BackgroundImage;
|
|
22
|
+
/** sets [CSS background-position property](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) */
|
|
23
|
+
backgroundPosition?: Property.BackgroundPosition;
|
|
24
|
+
/** sets [CSS background-repeat property](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat) */
|
|
25
|
+
backgroundRepeat?: Property.BackgroundRepeat;
|
|
26
|
+
/** sets [CSS background-size property](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) */
|
|
27
|
+
backgroundSize?: Property.BackgroundSize;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const backgroundStyleFnConfigs: StyleFnConfig[] = [
|
|
31
|
+
{
|
|
32
|
+
name: 'background',
|
|
33
|
+
properties: ['background'],
|
|
34
|
+
system: 'color',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'backgroundAttachment',
|
|
38
|
+
properties: ['backgroundAttachment'],
|
|
39
|
+
system: 'none',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'backgroundColor',
|
|
43
|
+
properties: ['backgroundColor'],
|
|
44
|
+
system: 'color',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'backgroundImage',
|
|
48
|
+
properties: ['backgroundImage'],
|
|
49
|
+
system: 'none',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'backgroundPosition',
|
|
53
|
+
properties: ['backgroundPosition'],
|
|
54
|
+
system: 'none',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'backgroundRepeat',
|
|
58
|
+
properties: ['backgroundRepeat'],
|
|
59
|
+
system: 'none',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'backgroundSize',
|
|
63
|
+
properties: ['backgroundSize'],
|
|
64
|
+
system: 'none',
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
export const backgroundFns = buildStyleFns(backgroundStyleFnConfigs);
|
|
69
|
+
/**
|
|
70
|
+
* A style prop function that takes component props and returns border styles.
|
|
71
|
+
* Some props, such as background and backgroundColor, are connected to our design tokens.
|
|
72
|
+
* If no `BackgroundStyleProps` are found, it returns an empty object.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```tsx
|
|
76
|
+
* const BackgroundExample = () => (
|
|
77
|
+
* <Box backgroundColor="blueberry500">
|
|
78
|
+
* Hello, background styles!
|
|
79
|
+
* </Box>
|
|
80
|
+
* );
|
|
81
|
+
*```
|
|
82
|
+
*/
|
|
83
|
+
export const background = buildStylePropFn<BackgroundStyleProps>(backgroundFns);
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import {buildStyleFns, StyleFnConfig} from '../buildStyleFns';
|
|
2
|
+
import {SystemPropValues} from '../systemProps';
|
|
3
|
+
|
|
4
|
+
/** style props to set CSS border color properties */
|
|
5
|
+
export type BorderColorStyleProps = {
|
|
6
|
+
/**
|
|
7
|
+
* - sets [CSS border-color property]((https://developer.mozilla.org/en-US/docs/Web/CSS/border-color)
|
|
8
|
+
* - system tokens: `color`
|
|
9
|
+
*/
|
|
10
|
+
borderColor?: SystemPropValues['color'];
|
|
11
|
+
/**
|
|
12
|
+
* - sets [CSS border-top-color property]((https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-color)
|
|
13
|
+
* - system tokens: `color`
|
|
14
|
+
*/
|
|
15
|
+
borderTopColor?: SystemPropValues['color'];
|
|
16
|
+
/**
|
|
17
|
+
* - sets [CSS border-right-color property]((https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-color)
|
|
18
|
+
* - no bidirectional support
|
|
19
|
+
* - system tokens: `color`
|
|
20
|
+
*/
|
|
21
|
+
borderRightColor?: SystemPropValues['color'];
|
|
22
|
+
/**
|
|
23
|
+
* - sets [CSS border-bottom-color property]((https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-color)
|
|
24
|
+
* - system tokens: `color`
|
|
25
|
+
*/
|
|
26
|
+
borderBottomColor?: SystemPropValues['color'];
|
|
27
|
+
/**
|
|
28
|
+
* - sets [CSS border-left-color property]((https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-color)
|
|
29
|
+
* - no bidirectional support
|
|
30
|
+
* - system tokens: `color`
|
|
31
|
+
*/
|
|
32
|
+
borderLeftColor?: SystemPropValues['color'];
|
|
33
|
+
/**
|
|
34
|
+
* - sets [CSS border-inline-start-color property ]((https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-start-color)
|
|
35
|
+
* - bidirectional support
|
|
36
|
+
* - system tokens: `color`
|
|
37
|
+
*/
|
|
38
|
+
borderInlineStartColor?: SystemPropValues['color'];
|
|
39
|
+
/**
|
|
40
|
+
* - sets [CSS border-inline-end-color property ]((https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-end-color)
|
|
41
|
+
* - bidirectional support
|
|
42
|
+
* - system tokens: `color`
|
|
43
|
+
*/
|
|
44
|
+
borderInlineEndColor?: SystemPropValues['color'];
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const borderColorStyleFnConfigs: StyleFnConfig[] = [
|
|
48
|
+
{
|
|
49
|
+
name: 'borderColor',
|
|
50
|
+
properties: ['borderColor'],
|
|
51
|
+
system: 'color',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'borderTopColor',
|
|
55
|
+
properties: ['borderTopColor'],
|
|
56
|
+
system: 'color',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'borderRightColor',
|
|
60
|
+
properties: ['borderRightColor'],
|
|
61
|
+
system: 'color',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'borderBottomColor',
|
|
65
|
+
properties: ['borderBottomColor'],
|
|
66
|
+
system: 'color',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'borderLeftColor',
|
|
70
|
+
properties: ['borderLeftColor'],
|
|
71
|
+
system: 'color',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'borderInlineStartColor',
|
|
75
|
+
properties: ['borderInlineStartColor'],
|
|
76
|
+
system: 'color',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'borderInlineEndColor',
|
|
80
|
+
properties: ['borderInlineEndColor'],
|
|
81
|
+
system: 'color',
|
|
82
|
+
},
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
export const borderColorFns = buildStyleFns(borderColorStyleFnConfigs);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {buildStylePropFn} from '../buildStyleFns';
|
|
2
|
+
import {BorderColorStyleProps, borderColorFns, borderColorStyleFnConfigs} from './color';
|
|
3
|
+
import {BorderLineStyleProps, borderLineStyleFns, borderLineStyleFnConfigs} from './lineStyle';
|
|
4
|
+
import {BorderRadiusStyleProps, borderRadiusFns, borderRadiusStyleFnConfigs} from './radius';
|
|
5
|
+
import {
|
|
6
|
+
BorderShorthandStyleProps,
|
|
7
|
+
borderShorthandFns,
|
|
8
|
+
borderShorthandStyleFnConfigs,
|
|
9
|
+
} from './shorthand';
|
|
10
|
+
import {BorderWidthStyleProps, borderWidthFns, borderWidthStyleFnConfigs} from './width';
|
|
11
|
+
|
|
12
|
+
export type BorderStyleProps = BorderColorStyleProps &
|
|
13
|
+
BorderLineStyleProps &
|
|
14
|
+
BorderRadiusStyleProps &
|
|
15
|
+
BorderShorthandStyleProps &
|
|
16
|
+
BorderWidthStyleProps;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* A style prop function that takes component props and returns border styles. Some props, such as borderRadius and borderColor, are connected to our design tokens.
|
|
20
|
+
* If no `BorderStyleProps` are found, it returns an empty object.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* const BorderExample = () => (
|
|
25
|
+
* <Box
|
|
26
|
+
* border="solid 1px"
|
|
27
|
+
* borderColor="soap500"
|
|
28
|
+
* borderRadius="l"
|
|
29
|
+
* >
|
|
30
|
+
* Hello, border styles!
|
|
31
|
+
* </Box>
|
|
32
|
+
* );
|
|
33
|
+
*```
|
|
34
|
+
*/
|
|
35
|
+
export const border = buildStylePropFn<BorderStyleProps>({
|
|
36
|
+
...borderColorFns,
|
|
37
|
+
...borderLineStyleFns,
|
|
38
|
+
...borderRadiusFns,
|
|
39
|
+
...borderShorthandFns,
|
|
40
|
+
...borderWidthFns,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export const borderStyleFnConfigs = [
|
|
44
|
+
...borderColorStyleFnConfigs,
|
|
45
|
+
...borderLineStyleFnConfigs,
|
|
46
|
+
...borderRadiusStyleFnConfigs,
|
|
47
|
+
...borderShorthandStyleFnConfigs,
|
|
48
|
+
...borderWidthStyleFnConfigs,
|
|
49
|
+
];
|