@workday/canvas-kit-react 6.3.6 → 7.0.0-alpha.0-next.4
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/README.md +4 -53
- package/action-bar/index.ts +0 -4
- package/action-bar/lib/ActionBar.tsx +29 -68
- package/banner/index.ts +1 -4
- package/banner/lib/Banner.tsx +86 -111
- package/banner/lib/BannerActionText.tsx +49 -0
- package/banner/lib/BannerIcon.tsx +39 -0
- package/banner/lib/BannerLabel.tsx +29 -0
- package/banner/lib/hooks/index.ts +6 -0
- package/banner/lib/hooks/useBanner.tsx +13 -0
- package/banner/lib/hooks/useBannerActionText.tsx +12 -0
- package/banner/lib/hooks/useBannerIcon.tsx +19 -0
- package/banner/lib/hooks/useBannerLabel.tsx +12 -0
- package/banner/lib/hooks/useBannerModel.tsx +63 -0
- package/banner/lib/hooks/useThemedPalette.ts +53 -0
- package/button/lib/IconButton.tsx +5 -2
- package/button/lib/ToolbarDropdownButton.tsx +1 -2
- package/card/lib/CardHeading.tsx +5 -6
- package/common/lib/styles/hideMouseFocus.ts +3 -2
- package/common/lib/utils/index.ts +1 -0
- package/cookie-banner/lib/CookieBanner.tsx +1 -0
- package/dist/commonjs/action-bar/index.d.ts +0 -3
- package/dist/commonjs/action-bar/index.d.ts.map +1 -1
- package/dist/commonjs/action-bar/index.js +0 -6
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts +5 -10
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBar.js +8 -76
- package/dist/commonjs/banner/index.d.ts +1 -3
- package/dist/commonjs/banner/index.d.ts.map +1 -1
- package/dist/commonjs/banner/index.js +1 -6
- package/dist/commonjs/banner/lib/Banner.d.ts +17 -33
- package/dist/commonjs/banner/lib/Banner.d.ts.map +1 -1
- package/dist/commonjs/banner/lib/Banner.js +45 -69
- package/dist/commonjs/banner/lib/BannerActionText.d.ts +14 -0
- package/dist/commonjs/banner/lib/BannerActionText.d.ts.map +1 -0
- package/dist/commonjs/banner/lib/BannerActionText.js +48 -0
- package/dist/commonjs/banner/lib/BannerIcon.d.ts +14 -0
- package/dist/commonjs/banner/lib/BannerIcon.d.ts.map +1 -0
- package/dist/commonjs/banner/lib/BannerIcon.js +47 -0
- package/dist/commonjs/banner/lib/BannerLabel.d.ts +13 -0
- package/dist/commonjs/banner/lib/BannerLabel.d.ts.map +1 -0
- package/dist/commonjs/banner/lib/BannerLabel.js +45 -0
- package/dist/commonjs/banner/lib/hooks/index.d.ts +7 -0
- package/dist/commonjs/banner/lib/hooks/index.d.ts.map +1 -0
- package/dist/commonjs/banner/lib/hooks/index.js +11 -0
- package/dist/commonjs/banner/lib/hooks/useBanner.d.ts +16 -0
- package/dist/commonjs/banner/lib/hooks/useBanner.d.ts.map +1 -0
- package/dist/commonjs/banner/lib/hooks/useBanner.js +14 -0
- package/dist/commonjs/banner/lib/hooks/useBannerActionText.d.ts +15 -0
- package/dist/commonjs/banner/lib/hooks/useBannerActionText.d.ts.map +1 -0
- package/dist/commonjs/banner/lib/hooks/useBannerActionText.js +13 -0
- package/dist/commonjs/banner/lib/hooks/useBannerIcon.d.ts +18 -0
- package/dist/commonjs/banner/lib/hooks/useBannerIcon.d.ts.map +1 -0
- package/dist/commonjs/banner/lib/hooks/useBannerIcon.js +19 -0
- package/dist/commonjs/banner/lib/hooks/useBannerLabel.d.ts +15 -0
- package/dist/commonjs/banner/lib/hooks/useBannerLabel.d.ts.map +1 -0
- package/dist/commonjs/banner/lib/hooks/useBannerLabel.js +13 -0
- package/dist/commonjs/banner/lib/hooks/useBannerModel.d.ts +37 -0
- package/dist/commonjs/banner/lib/hooks/useBannerModel.d.ts.map +1 -0
- package/dist/commonjs/banner/lib/hooks/useBannerModel.js +22 -0
- package/dist/commonjs/banner/lib/hooks/useThemedPalette.d.ts +11 -0
- package/dist/commonjs/banner/lib/hooks/useThemedPalette.d.ts.map +1 -0
- package/dist/commonjs/banner/lib/hooks/useThemedPalette.js +39 -0
- package/dist/commonjs/button/lib/IconButton.d.ts +5 -2
- package/dist/commonjs/button/lib/IconButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/ToolbarDropdownButton.js +7 -5
- 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/CardHeading.d.ts +2 -1
- package/dist/commonjs/card/lib/CardHeading.d.ts.map +1 -1
- package/dist/commonjs/card/lib/CardHeading.js +3 -4
- package/dist/commonjs/common/lib/styles/hideMouseFocus.d.ts +3 -2
- package/dist/commonjs/common/lib/styles/hideMouseFocus.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/index.d.ts +1 -0
- package/dist/commonjs/common/lib/utils/index.d.ts.map +1 -1
- package/dist/commonjs/common/lib/utils/index.js +1 -0
- package/dist/commonjs/cookie-banner/lib/CookieBanner.d.ts.map +1 -1
- package/dist/commonjs/cookie-banner/lib/CookieBanner.js +1 -0
- package/dist/commonjs/dialog/lib/Dialog.d.ts +1 -1
- package/dist/commonjs/icon/lib/Svg.d.ts +0 -1
- package/dist/commonjs/icon/lib/Svg.d.ts.map +1 -1
- package/dist/commonjs/icon/lib/Svg.js +7 -14
- package/dist/commonjs/modal/lib/Modal.d.ts +2 -1
- package/dist/commonjs/modal/lib/Modal.d.ts.map +1 -1
- package/dist/commonjs/modal/lib/Modal.js +2 -0
- package/dist/commonjs/modal/lib/ModalCard.js +1 -1
- package/dist/commonjs/modal/lib/ModalOverflowOverlay.d.ts +2 -0
- package/dist/commonjs/modal/lib/ModalOverflowOverlay.d.ts.map +1 -0
- package/dist/commonjs/{pagination/lib/Pagination/common/Box.js → modal/lib/ModalOverflowOverlay.js} +10 -32
- package/dist/commonjs/modal/lib/ModalOverlay.d.ts +2 -1
- package/dist/commonjs/modal/lib/ModalOverlay.d.ts.map +1 -1
- package/dist/commonjs/modal/lib/ModalOverlay.js +9 -2
- package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.d.ts +2 -3
- package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.js +21 -7
- package/dist/commonjs/pagination/lib/Pagination/Controls.js +2 -2
- package/dist/commonjs/pagination/lib/Pagination/GoTo/Form.d.ts +2 -3
- package/dist/commonjs/pagination/lib/Pagination/GoTo/Form.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/GoTo/Form.js +2 -2
- package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.d.ts +1 -2
- package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.js +12 -4
- package/dist/commonjs/pagination/lib/Pagination/Nav.d.ts +1 -1
- package/dist/commonjs/pagination/lib/Pagination/Nav.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/Nav.js +2 -2
- package/dist/commonjs/pagination/lib/Pagination/PageList.d.ts +4 -4
- package/dist/commonjs/pagination/lib/Pagination/PageList.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/PageList.js +11 -7
- package/dist/commonjs/pagination/lib/Pagination/Pagination.d.ts +4 -4
- package/dist/commonjs/pagination/lib/Pagination/common/List.d.ts +6 -8
- package/dist/commonjs/pagination/lib/Pagination/common/List.d.ts.map +1 -1
- package/dist/commonjs/pagination/lib/Pagination/common/List.js +15 -12
- package/dist/commonjs/popup/lib/Popup.d.ts +1 -1
- package/dist/commonjs/popup/lib/Popup.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/Popup.js +2 -2
- package/dist/commonjs/popup/lib/PopupBody.d.ts +2 -0
- package/dist/commonjs/popup/lib/PopupBody.d.ts.map +1 -0
- package/dist/commonjs/popup/lib/PopupBody.js +29 -0
- package/dist/commonjs/popup/lib/PopupCard.d.ts +2 -1
- package/dist/commonjs/popup/lib/PopupCard.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/PopupCard.js +7 -1
- package/dist/commonjs/popup/lib/PopupHeading.d.ts +3 -1
- package/dist/commonjs/popup/lib/PopupHeading.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/PopupHeading.js +1 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts +5 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicator.js +5 -5
- package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -1
- package/dist/commonjs/toast/lib/Toast.d.ts.map +1 -1
- package/dist/commonjs/toast/lib/Toast.js +16 -13
- package/dist/es6/action-bar/index.d.ts +0 -3
- package/dist/es6/action-bar/index.d.ts.map +1 -1
- package/dist/es6/action-bar/index.js +0 -3
- package/dist/es6/action-bar/lib/ActionBar.d.ts +5 -10
- package/dist/es6/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBar.js +10 -78
- package/dist/es6/banner/index.d.ts +1 -3
- package/dist/es6/banner/index.d.ts.map +1 -1
- package/dist/es6/banner/index.js +1 -3
- package/dist/es6/banner/lib/Banner.d.ts +17 -33
- package/dist/es6/banner/lib/Banner.d.ts.map +1 -1
- package/dist/es6/banner/lib/Banner.js +47 -71
- package/dist/es6/banner/lib/BannerActionText.d.ts +14 -0
- package/dist/es6/banner/lib/BannerActionText.d.ts.map +1 -0
- package/dist/es6/banner/lib/BannerActionText.js +39 -0
- package/dist/es6/banner/lib/BannerIcon.d.ts +14 -0
- package/dist/es6/banner/lib/BannerIcon.d.ts.map +1 -0
- package/dist/es6/banner/lib/BannerIcon.js +42 -0
- package/dist/es6/banner/lib/BannerLabel.d.ts +13 -0
- package/dist/es6/banner/lib/BannerLabel.d.ts.map +1 -0
- package/dist/es6/banner/lib/BannerLabel.js +36 -0
- package/dist/es6/banner/lib/hooks/index.d.ts +7 -0
- package/dist/es6/banner/lib/hooks/index.d.ts.map +1 -0
- package/dist/es6/banner/lib/hooks/index.js +6 -0
- package/dist/es6/banner/lib/hooks/useBanner.d.ts +16 -0
- package/dist/es6/banner/lib/hooks/useBanner.d.ts.map +1 -0
- package/dist/es6/banner/lib/hooks/useBanner.js +12 -0
- package/dist/es6/banner/lib/hooks/useBannerActionText.d.ts +15 -0
- package/dist/es6/banner/lib/hooks/useBannerActionText.d.ts.map +1 -0
- package/dist/es6/banner/lib/hooks/useBannerActionText.js +11 -0
- package/dist/es6/banner/lib/hooks/useBannerIcon.d.ts +18 -0
- package/dist/es6/banner/lib/hooks/useBannerIcon.d.ts.map +1 -0
- package/dist/es6/banner/lib/hooks/useBannerIcon.js +17 -0
- package/dist/es6/banner/lib/hooks/useBannerLabel.d.ts +15 -0
- package/dist/es6/banner/lib/hooks/useBannerLabel.d.ts.map +1 -0
- package/dist/es6/banner/lib/hooks/useBannerLabel.js +11 -0
- package/dist/es6/banner/lib/hooks/useBannerModel.d.ts +37 -0
- package/dist/es6/banner/lib/hooks/useBannerModel.d.ts.map +1 -0
- package/dist/es6/banner/lib/hooks/useBannerModel.js +20 -0
- package/dist/es6/banner/lib/hooks/useThemedPalette.d.ts +11 -0
- package/dist/es6/banner/lib/hooks/useThemedPalette.d.ts.map +1 -0
- package/dist/es6/banner/lib/hooks/useThemedPalette.js +33 -0
- package/dist/es6/button/lib/IconButton.d.ts +5 -2
- package/dist/es6/button/lib/IconButton.d.ts.map +1 -1
- package/dist/es6/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
- package/dist/es6/button/lib/ToolbarDropdownButton.js +4 -5
- 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/CardHeading.d.ts +2 -1
- package/dist/es6/card/lib/CardHeading.d.ts.map +1 -1
- package/dist/es6/card/lib/CardHeading.js +4 -5
- package/dist/es6/common/lib/styles/hideMouseFocus.d.ts +3 -2
- package/dist/es6/common/lib/styles/hideMouseFocus.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/index.d.ts +1 -0
- package/dist/es6/common/lib/utils/index.d.ts.map +1 -1
- package/dist/es6/common/lib/utils/index.js +1 -0
- package/dist/es6/cookie-banner/lib/CookieBanner.d.ts.map +1 -1
- package/dist/es6/cookie-banner/lib/CookieBanner.js +1 -0
- package/dist/es6/dialog/lib/Dialog.d.ts +1 -1
- package/dist/es6/icon/lib/Svg.d.ts +0 -1
- package/dist/es6/icon/lib/Svg.d.ts.map +1 -1
- package/dist/es6/icon/lib/Svg.js +7 -14
- package/dist/es6/modal/lib/Modal.d.ts +2 -1
- package/dist/es6/modal/lib/Modal.d.ts.map +1 -1
- package/dist/es6/modal/lib/Modal.js +2 -0
- package/dist/es6/modal/lib/ModalCard.js +1 -1
- package/dist/es6/modal/lib/ModalOverflowOverlay.d.ts +2 -0
- package/dist/es6/modal/lib/ModalOverflowOverlay.d.ts.map +1 -0
- package/dist/es6/modal/lib/ModalOverflowOverlay.js +36 -0
- package/dist/es6/modal/lib/ModalOverlay.d.ts +2 -1
- package/dist/es6/modal/lib/ModalOverlay.d.ts.map +1 -1
- package/dist/es6/modal/lib/ModalOverlay.js +9 -2
- package/dist/es6/pagination/lib/Pagination/AdditionalDetails.d.ts +2 -3
- package/dist/es6/pagination/lib/Pagination/AdditionalDetails.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/AdditionalDetails.js +16 -9
- package/dist/es6/pagination/lib/Pagination/Controls.js +1 -1
- package/dist/es6/pagination/lib/Pagination/GoTo/Form.d.ts +2 -3
- package/dist/es6/pagination/lib/Pagination/GoTo/Form.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/GoTo/Form.js +2 -2
- package/dist/es6/pagination/lib/Pagination/GoTo/Label.d.ts +1 -2
- package/dist/es6/pagination/lib/Pagination/GoTo/Label.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/GoTo/Label.js +5 -4
- package/dist/es6/pagination/lib/Pagination/Nav.d.ts +1 -1
- package/dist/es6/pagination/lib/Pagination/Nav.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/Nav.js +2 -2
- package/dist/es6/pagination/lib/Pagination/PageList.d.ts +4 -4
- package/dist/es6/pagination/lib/Pagination/PageList.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/PageList.js +5 -8
- package/dist/es6/pagination/lib/Pagination/Pagination.d.ts +4 -4
- package/dist/es6/pagination/lib/Pagination/common/List.d.ts +6 -8
- package/dist/es6/pagination/lib/Pagination/common/List.d.ts.map +1 -1
- package/dist/es6/pagination/lib/Pagination/common/List.js +15 -12
- package/dist/es6/popup/lib/Popup.d.ts +1 -1
- package/dist/es6/popup/lib/Popup.d.ts.map +1 -1
- package/dist/es6/popup/lib/Popup.js +2 -2
- package/dist/es6/popup/lib/PopupBody.d.ts +2 -0
- package/dist/es6/popup/lib/PopupBody.d.ts.map +1 -0
- package/dist/es6/popup/lib/PopupBody.js +20 -0
- package/dist/es6/popup/lib/PopupCard.d.ts +2 -1
- package/dist/es6/popup/lib/PopupCard.d.ts.map +1 -1
- package/dist/es6/popup/lib/PopupCard.js +8 -2
- package/dist/es6/popup/lib/PopupHeading.d.ts +3 -1
- package/dist/es6/popup/lib/PopupHeading.d.ts.map +1 -1
- package/dist/es6/popup/lib/PopupHeading.js +1 -1
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts +5 -0
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
- package/dist/es6/status-indicator/lib/StatusIndicator.js +5 -5
- package/dist/es6/tabs/lib/TabsItem.d.ts +1 -1
- package/dist/es6/toast/lib/Toast.d.ts.map +1 -1
- package/dist/es6/toast/lib/Toast.js +9 -13
- package/icon/lib/Svg.tsx +13 -22
- package/modal/lib/Modal.tsx +2 -0
- package/modal/lib/ModalCard.tsx +1 -1
- package/modal/lib/ModalOverflowOverlay.tsx +25 -0
- package/modal/lib/ModalOverlay.tsx +11 -3
- package/package.json +5 -5
- package/pagination/lib/Pagination/AdditionalDetails.tsx +24 -18
- package/pagination/lib/Pagination/Controls.tsx +1 -1
- package/pagination/lib/Pagination/GoTo/Form.tsx +4 -5
- package/pagination/lib/Pagination/GoTo/Label.tsx +5 -6
- package/pagination/lib/Pagination/Nav.tsx +2 -2
- package/pagination/lib/Pagination/PageList.tsx +13 -11
- package/pagination/lib/Pagination/common/List.tsx +25 -23
- package/popup/lib/Popup.tsx +2 -2
- package/popup/lib/PopupBody.tsx +11 -0
- package/popup/lib/PopupCard.tsx +17 -3
- package/popup/lib/PopupHeading.tsx +3 -3
- package/status-indicator/lib/StatusIndicator.tsx +20 -9
- package/toast/lib/Toast.tsx +9 -15
- package/ts3.5/dist/commonjs/action-bar/index.d.ts +0 -3
- package/ts3.5/dist/commonjs/action-bar/lib/ActionBar.d.ts +5 -10
- package/ts3.5/dist/commonjs/banner/index.d.ts +1 -3
- package/ts3.5/dist/commonjs/banner/lib/Banner.d.ts +17 -33
- package/ts3.5/dist/commonjs/banner/lib/BannerActionText.d.ts +14 -0
- package/ts3.5/dist/commonjs/banner/lib/BannerIcon.d.ts +14 -0
- package/ts3.5/dist/commonjs/banner/lib/BannerLabel.d.ts +13 -0
- package/ts3.5/dist/commonjs/banner/lib/hooks/index.d.ts +7 -0
- package/ts3.5/dist/commonjs/banner/lib/hooks/useBanner.d.ts +16 -0
- package/ts3.5/dist/commonjs/banner/lib/hooks/useBannerActionText.d.ts +15 -0
- package/ts3.5/dist/commonjs/banner/lib/hooks/useBannerIcon.d.ts +18 -0
- package/ts3.5/dist/commonjs/banner/lib/hooks/useBannerLabel.d.ts +15 -0
- package/ts3.5/dist/commonjs/banner/lib/hooks/useBannerModel.d.ts +37 -0
- package/ts3.5/dist/commonjs/banner/lib/hooks/useThemedPalette.d.ts +11 -0
- package/ts3.5/dist/commonjs/button/lib/IconButton.d.ts +5 -2
- package/ts3.5/dist/commonjs/card/lib/Card.d.ts +1 -1
- package/ts3.5/dist/commonjs/card/lib/CardBody.d.ts +1 -1
- package/ts3.5/dist/commonjs/card/lib/CardHeading.d.ts +2 -1
- package/ts3.5/dist/commonjs/common/lib/styles/hideMouseFocus.d.ts +3 -2
- package/ts3.5/dist/commonjs/common/lib/utils/index.d.ts +1 -0
- package/ts3.5/dist/commonjs/dialog/lib/Dialog.d.ts +1 -1
- package/ts3.5/dist/commonjs/icon/lib/Svg.d.ts +0 -1
- package/ts3.5/dist/commonjs/modal/lib/Modal.d.ts +2 -1
- package/ts3.5/dist/commonjs/modal/lib/ModalOverflowOverlay.d.ts +2 -0
- package/ts3.5/dist/commonjs/modal/lib/ModalOverlay.d.ts +2 -1
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.d.ts +2 -3
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/GoTo/Form.d.ts +2 -3
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/GoTo/Label.d.ts +1 -2
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/Nav.d.ts +1 -1
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/PageList.d.ts +4 -4
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/Pagination.d.ts +4 -4
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/common/List.d.ts +6 -8
- package/ts3.5/dist/commonjs/popup/lib/Popup.d.ts +1 -1
- package/ts3.5/dist/commonjs/popup/lib/PopupBody.d.ts +2 -0
- package/ts3.5/dist/commonjs/popup/lib/PopupCard.d.ts +2 -1
- package/ts3.5/dist/commonjs/popup/lib/PopupHeading.d.ts +3 -1
- package/ts3.5/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts +5 -0
- package/ts3.5/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -1
- package/ts3.5/dist/es6/action-bar/index.d.ts +0 -3
- package/ts3.5/dist/es6/action-bar/lib/ActionBar.d.ts +5 -10
- package/ts3.5/dist/es6/banner/index.d.ts +1 -3
- package/ts3.5/dist/es6/banner/lib/Banner.d.ts +17 -33
- package/ts3.5/dist/es6/banner/lib/BannerActionText.d.ts +14 -0
- package/ts3.5/dist/es6/banner/lib/BannerIcon.d.ts +14 -0
- package/ts3.5/dist/es6/banner/lib/BannerLabel.d.ts +13 -0
- package/ts3.5/dist/es6/banner/lib/hooks/index.d.ts +7 -0
- package/ts3.5/dist/es6/banner/lib/hooks/useBanner.d.ts +16 -0
- package/ts3.5/dist/es6/banner/lib/hooks/useBannerActionText.d.ts +15 -0
- package/ts3.5/dist/es6/banner/lib/hooks/useBannerIcon.d.ts +18 -0
- package/ts3.5/dist/es6/banner/lib/hooks/useBannerLabel.d.ts +15 -0
- package/ts3.5/dist/es6/banner/lib/hooks/useBannerModel.d.ts +37 -0
- package/ts3.5/dist/es6/banner/lib/hooks/useThemedPalette.d.ts +11 -0
- package/ts3.5/dist/es6/button/lib/IconButton.d.ts +5 -2
- package/ts3.5/dist/es6/card/lib/Card.d.ts +1 -1
- package/ts3.5/dist/es6/card/lib/CardBody.d.ts +1 -1
- package/ts3.5/dist/es6/card/lib/CardHeading.d.ts +2 -1
- package/ts3.5/dist/es6/common/lib/styles/hideMouseFocus.d.ts +3 -2
- package/ts3.5/dist/es6/common/lib/utils/index.d.ts +1 -0
- package/ts3.5/dist/es6/dialog/lib/Dialog.d.ts +1 -1
- package/ts3.5/dist/es6/icon/lib/Svg.d.ts +0 -1
- package/ts3.5/dist/es6/modal/lib/Modal.d.ts +2 -1
- package/ts3.5/dist/es6/modal/lib/ModalOverflowOverlay.d.ts +2 -0
- package/ts3.5/dist/es6/modal/lib/ModalOverlay.d.ts +2 -1
- package/ts3.5/dist/es6/pagination/lib/Pagination/AdditionalDetails.d.ts +2 -3
- package/ts3.5/dist/es6/pagination/lib/Pagination/GoTo/Form.d.ts +2 -3
- package/ts3.5/dist/es6/pagination/lib/Pagination/GoTo/Label.d.ts +1 -2
- package/ts3.5/dist/es6/pagination/lib/Pagination/Nav.d.ts +1 -1
- package/ts3.5/dist/es6/pagination/lib/Pagination/PageList.d.ts +4 -4
- package/ts3.5/dist/es6/pagination/lib/Pagination/Pagination.d.ts +4 -4
- package/ts3.5/dist/es6/pagination/lib/Pagination/common/List.d.ts +6 -8
- package/ts3.5/dist/es6/popup/lib/Popup.d.ts +1 -1
- package/ts3.5/dist/es6/popup/lib/PopupBody.d.ts +2 -0
- package/ts3.5/dist/es6/popup/lib/PopupCard.d.ts +2 -1
- package/ts3.5/dist/es6/popup/lib/PopupHeading.d.ts +3 -1
- package/ts3.5/dist/es6/status-indicator/lib/StatusIndicator.d.ts +5 -0
- package/ts3.5/dist/es6/tabs/lib/TabsItem.d.ts +1 -1
- package/dist/commonjs/pagination/lib/Pagination/common/Box.d.ts +0 -12
- package/dist/commonjs/pagination/lib/Pagination/common/Box.d.ts.map +0 -1
- package/dist/commonjs/pagination/lib/Pagination/common/Flex.d.ts +0 -6
- package/dist/commonjs/pagination/lib/Pagination/common/Flex.d.ts.map +0 -1
- package/dist/commonjs/pagination/lib/Pagination/common/Flex.js +0 -32
- package/dist/commonjs/pagination/lib/Pagination/common/Stack.d.ts +0 -48
- package/dist/commonjs/pagination/lib/Pagination/common/Stack.d.ts.map +0 -1
- package/dist/commonjs/pagination/lib/Pagination/common/Stack.js +0 -87
- package/dist/commonjs/pagination/lib/Pagination/common/utils/flex.d.ts +0 -57
- package/dist/commonjs/pagination/lib/Pagination/common/utils/flex.d.ts.map +0 -1
- package/dist/commonjs/pagination/lib/Pagination/common/utils/flex.js +0 -23
- package/dist/commonjs/pagination/lib/Pagination/common/utils/layout.d.ts +0 -32
- package/dist/commonjs/pagination/lib/Pagination/common/utils/layout.d.ts.map +0 -1
- package/dist/commonjs/pagination/lib/Pagination/common/utils/layout.js +0 -15
- package/dist/commonjs/pagination/lib/Pagination/common/utils/safelySpreadProps.d.ts +0 -12
- package/dist/commonjs/pagination/lib/Pagination/common/utils/safelySpreadProps.d.ts.map +0 -1
- package/dist/commonjs/pagination/lib/Pagination/common/utils/safelySpreadProps.js +0 -37
- package/dist/commonjs/pagination/lib/Pagination/common/utils/space.d.ts +0 -127
- package/dist/commonjs/pagination/lib/Pagination/common/utils/space.d.ts.map +0 -1
- package/dist/commonjs/pagination/lib/Pagination/common/utils/space.js +0 -75
- package/dist/es6/pagination/lib/Pagination/common/Box.d.ts +0 -12
- package/dist/es6/pagination/lib/Pagination/common/Box.d.ts.map +0 -1
- package/dist/es6/pagination/lib/Pagination/common/Box.js +0 -58
- package/dist/es6/pagination/lib/Pagination/common/Flex.d.ts +0 -6
- package/dist/es6/pagination/lib/Pagination/common/Flex.d.ts.map +0 -1
- package/dist/es6/pagination/lib/Pagination/common/Flex.js +0 -27
- package/dist/es6/pagination/lib/Pagination/common/Stack.d.ts +0 -48
- package/dist/es6/pagination/lib/Pagination/common/Stack.d.ts.map +0 -1
- package/dist/es6/pagination/lib/Pagination/common/Stack.js +0 -78
- package/dist/es6/pagination/lib/Pagination/common/utils/flex.d.ts +0 -57
- package/dist/es6/pagination/lib/Pagination/common/utils/flex.d.ts.map +0 -1
- package/dist/es6/pagination/lib/Pagination/common/utils/flex.js +0 -21
- package/dist/es6/pagination/lib/Pagination/common/utils/layout.d.ts +0 -32
- package/dist/es6/pagination/lib/Pagination/common/utils/layout.d.ts.map +0 -1
- package/dist/es6/pagination/lib/Pagination/common/utils/layout.js +0 -13
- package/dist/es6/pagination/lib/Pagination/common/utils/safelySpreadProps.d.ts +0 -12
- package/dist/es6/pagination/lib/Pagination/common/utils/safelySpreadProps.d.ts.map +0 -1
- package/dist/es6/pagination/lib/Pagination/common/utils/safelySpreadProps.js +0 -34
- package/dist/es6/pagination/lib/Pagination/common/utils/space.d.ts +0 -127
- package/dist/es6/pagination/lib/Pagination/common/utils/space.d.ts.map +0 -1
- package/dist/es6/pagination/lib/Pagination/common/utils/space.js +0 -73
- package/pagination/lib/Pagination/common/Box.tsx +0 -44
- package/pagination/lib/Pagination/common/Flex.tsx +0 -23
- package/pagination/lib/Pagination/common/Stack.tsx +0 -98
- package/pagination/lib/Pagination/common/utils/flex.ts +0 -110
- package/pagination/lib/Pagination/common/utils/layout.ts +0 -40
- package/pagination/lib/Pagination/common/utils/safelySpreadProps.ts +0 -29
- package/pagination/lib/Pagination/common/utils/space.ts +0 -109
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/common/Box.d.ts +0 -12
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/common/Flex.d.ts +0 -6
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/common/Stack.d.ts +0 -48
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/common/utils/flex.d.ts +0 -57
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/common/utils/layout.d.ts +0 -32
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/common/utils/safelySpreadProps.d.ts +0 -12
- package/ts3.5/dist/commonjs/pagination/lib/Pagination/common/utils/space.d.ts +0 -127
- package/ts3.5/dist/es6/pagination/lib/Pagination/common/Box.d.ts +0 -12
- package/ts3.5/dist/es6/pagination/lib/Pagination/common/Flex.d.ts +0 -6
- package/ts3.5/dist/es6/pagination/lib/Pagination/common/Stack.d.ts +0 -48
- package/ts3.5/dist/es6/pagination/lib/Pagination/common/utils/flex.d.ts +0 -57
- package/ts3.5/dist/es6/pagination/lib/Pagination/common/utils/layout.d.ts +0 -32
- package/ts3.5/dist/es6/pagination/lib/Pagination/common/utils/safelySpreadProps.d.ts +0 -12
- package/ts3.5/dist/es6/pagination/lib/Pagination/common/utils/space.d.ts +0 -127
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {CanvasThemePalette, EmotionCanvasTheme, useTheme} from '@workday/canvas-kit-react/common';
|
|
2
|
+
import {colors} from '@workday/canvas-kit-react/tokens';
|
|
3
|
+
import chroma from 'chroma-js';
|
|
4
|
+
|
|
5
|
+
type paletteSelection = Exclude<keyof EmotionCanvasTheme['canvas']['palette'], 'common'>;
|
|
6
|
+
|
|
7
|
+
interface BackgroundColors {
|
|
8
|
+
normal?: string;
|
|
9
|
+
hover?: string;
|
|
10
|
+
contrast?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const isAccessible = (foreground: string, background: string) => {
|
|
14
|
+
return chroma.contrast(foreground, background) >= 3;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const getPaletteColorsFromTheme = (
|
|
18
|
+
palette: CanvasThemePalette,
|
|
19
|
+
fallbackColors?: BackgroundColors
|
|
20
|
+
): BackgroundColors => {
|
|
21
|
+
return {
|
|
22
|
+
hover: palette.dark,
|
|
23
|
+
normal: palette.main,
|
|
24
|
+
contrast: isAccessible(palette.contrast, palette.main)
|
|
25
|
+
? palette.contrast
|
|
26
|
+
: fallbackColors?.contrast,
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export function getPaletteColors(
|
|
31
|
+
type: paletteSelection,
|
|
32
|
+
theme: EmotionCanvasTheme
|
|
33
|
+
): BackgroundColors {
|
|
34
|
+
const palette = theme.canvas.palette[type];
|
|
35
|
+
|
|
36
|
+
switch (type) {
|
|
37
|
+
case 'error': {
|
|
38
|
+
return getPaletteColorsFromTheme(palette, {contrast: colors.frenchVanilla100});
|
|
39
|
+
}
|
|
40
|
+
case 'alert': {
|
|
41
|
+
return getPaletteColorsFromTheme(palette, {contrast: colors.blackPepper400});
|
|
42
|
+
}
|
|
43
|
+
default: {
|
|
44
|
+
return getPaletteColorsFromTheme(palette);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const useThemedPalette = (type: paletteSelection) => {
|
|
50
|
+
const theme = useTheme();
|
|
51
|
+
|
|
52
|
+
return getPaletteColors(type, theme);
|
|
53
|
+
};
|
|
@@ -14,9 +14,12 @@ import {ButtonContainer} from './parts';
|
|
|
14
14
|
|
|
15
15
|
export interface IconButtonProps extends Themeable {
|
|
16
16
|
/**
|
|
17
|
-
* The accessibility label to indicate the action triggered by clicking the IconButton.
|
|
17
|
+
* The accessibility label to indicate the action triggered by clicking the IconButton. This is optional because there are
|
|
18
|
+
* instances where an Icon Button might already have an `aria-labelledby`. In a case where an `aria-labelledby` is provided
|
|
19
|
+
* it will take precedence over the `aria-label` as explained here: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-labelledby_attribute
|
|
20
|
+
* We highly encourage consumers to either provide an `aria-label` OR an `aria-labelledby`
|
|
18
21
|
*/
|
|
19
|
-
'aria-label'
|
|
22
|
+
'aria-label'?: string;
|
|
20
23
|
/**
|
|
21
24
|
* The type of the IconButton.
|
|
22
25
|
* @default 'circle'
|
package/card/lib/CardHeading.tsx
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import {type
|
|
3
|
+
import {type} from '@workday/canvas-kit-react/tokens';
|
|
4
4
|
import {StyledType, createComponent} from '@workday/canvas-kit-react/common';
|
|
5
|
+
import {Box, BoxProps} from '@workday/canvas-kit-labs-react/common';
|
|
5
6
|
|
|
6
|
-
export interface CardHeadingProps {
|
|
7
|
+
export interface CardHeadingProps extends BoxProps {
|
|
7
8
|
/**
|
|
8
9
|
* The id of the Card heading. Tie this to an `aria-labelledby` for accessibility.
|
|
9
10
|
*/
|
|
@@ -12,17 +13,15 @@ export interface CardHeadingProps {
|
|
|
12
13
|
children?: React.ReactNode;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
const Heading = styled('h3')<StyledType>(type.levels.body.large, {
|
|
16
|
+
const Heading = styled(Box.as('h3'))<StyledType>(type.levels.body.large, {
|
|
16
17
|
fontWeight: type.properties.fontWeights.bold,
|
|
17
|
-
marginBottom: space.m,
|
|
18
|
-
marginTop: 0,
|
|
19
18
|
});
|
|
20
19
|
|
|
21
20
|
export const CardHeading = createComponent('h3')({
|
|
22
21
|
displayName: 'Card.Heading',
|
|
23
22
|
Component: ({children, ...elemProps}: CardHeadingProps, ref, Element) => {
|
|
24
23
|
return (
|
|
25
|
-
<Heading ref={ref} as={Element} {...elemProps}>
|
|
24
|
+
<Heading ref={ref} marginBottom="m" marginTop={0} as={Element} {...elemProps}>
|
|
26
25
|
{children}
|
|
27
26
|
</Heading>
|
|
28
27
|
);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Interpolation} from '@emotion/core';
|
|
2
|
+
import {CSSProperties} from '@workday/canvas-kit-react/tokens';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* A utility to hide the default canvas style focus ring when using mouse input.
|
|
5
6
|
* Requires wrapping your components in an InputProvider component.
|
|
6
7
|
*/
|
|
7
|
-
export const hideMouseFocus:
|
|
8
|
+
export const hideMouseFocus: CSSProperties = {
|
|
8
9
|
[`[data-whatinput="mouse"] &:focus,
|
|
9
10
|
[data-whatinput="touch"] &:focus,
|
|
10
11
|
[data-whatinput="pointer"] &:focus`]: {
|
|
@@ -10,6 +10,7 @@ export * from './useMount';
|
|
|
10
10
|
export * from './components';
|
|
11
11
|
export * from './models';
|
|
12
12
|
export * from './elements';
|
|
13
|
+
export * from './useConstant';
|
|
13
14
|
export * from './useIsFullscreen';
|
|
14
15
|
export * from './useWindowSize';
|
|
15
16
|
export * from './useResizeObserver';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../action-bar/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../action-bar/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -2,11 +2,5 @@
|
|
|
2
2
|
function __export(m) {
|
|
3
3
|
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
4
4
|
}
|
|
5
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
-
};
|
|
8
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
var ActionBar_1 = __importDefault(require("./lib/ActionBar"));
|
|
10
|
-
exports.ActionBar = ActionBar_1.default;
|
|
11
|
-
exports.default = ActionBar_1.default;
|
|
12
6
|
__export(require("./lib/ActionBar"));
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* If true, fix the ActionBar to the bottom of the screen.
|
|
5
|
-
* @default false
|
|
6
|
-
*/
|
|
7
|
-
fixed?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export default class ActionBar extends React.Component<ActionBarProps> {
|
|
10
|
-
render(): JSX.Element;
|
|
1
|
+
import { HStackProps, StackSpacing } from '@workday/canvas-kit-labs-react';
|
|
2
|
+
interface ActionBarProps extends Omit<HStackProps, 'spacing'> {
|
|
3
|
+
spacing?: StackSpacing;
|
|
11
4
|
}
|
|
5
|
+
export declare const ActionBar: import("../../common").ElementComponent<"div", ActionBarProps>;
|
|
6
|
+
export {};
|
|
12
7
|
//# sourceMappingURL=ActionBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBar.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAS,WAAW,EAAE,YAAY,EAAC,MAAM,gCAAgC,CAAC;AAEjF,UAAU,cAAe,SAAQ,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC;IAC3D,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAWD,eAAO,MAAM,SAAS,gEAkBpB,CAAC"}
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
var __assign = (this && this.__assign) || function () {
|
|
16
3
|
__assign = Object.assign || function(t) {
|
|
17
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -23,17 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
23
10
|
};
|
|
24
11
|
return __assign.apply(this, arguments);
|
|
25
12
|
};
|
|
26
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
27
|
-
var t = {};
|
|
28
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
29
|
-
t[p] = s[p];
|
|
30
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
31
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
32
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
33
|
-
t[p[i]] = s[p[i]];
|
|
34
|
-
}
|
|
35
|
-
return t;
|
|
36
|
-
};
|
|
37
13
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
38
14
|
if (mod && mod.__esModule) return mod;
|
|
39
15
|
var result = {};
|
|
@@ -45,64 +21,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
45
21
|
var React = __importStar(require("react"));
|
|
46
22
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
47
23
|
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return fixed
|
|
51
|
-
? {
|
|
52
|
-
position: 'fixed',
|
|
53
|
-
left: 0,
|
|
54
|
-
bottom: 0,
|
|
55
|
-
right: 0,
|
|
56
|
-
}
|
|
57
|
-
: {};
|
|
58
|
-
}
|
|
59
|
-
var ActionBarContainer = common_1.styled('div')({
|
|
60
|
-
borderTop: "solid 1px " + tokens_1.colors.soap400,
|
|
61
|
-
background: tokens_1.commonColors.background,
|
|
62
|
-
padding: tokens_1.space.s,
|
|
63
|
-
boxShadow: '0 -2px 4px rgba(0, 0, 0, 0.08)',
|
|
64
|
-
}, function (_a) {
|
|
65
|
-
var _b;
|
|
66
|
-
var fixed = _a.fixed, theme = _a.theme;
|
|
67
|
-
return __assign(__assign({}, getFixedStyles(fixed)), (_b = {}, _b[theme.canvas.breakpoints.down('s')] = {
|
|
68
|
-
padding: tokens_1.space.xxs,
|
|
69
|
-
}, _b));
|
|
70
|
-
});
|
|
71
|
-
var ChildrenContainer = common_1.styled('div')({
|
|
72
|
-
display: 'inline-block',
|
|
73
|
-
padding: "0 " + tokens_1.space.m,
|
|
74
|
-
'*:not(:first-of-type)': {
|
|
75
|
-
marginLeft: tokens_1.space.s,
|
|
76
|
-
},
|
|
77
|
-
}, function (_a) {
|
|
24
|
+
var canvas_kit_labs_react_1 = require("@workday/canvas-kit-labs-react");
|
|
25
|
+
var ResponsiveHStack = common_1.styled(canvas_kit_labs_react_1.HStack)(function (_a) {
|
|
78
26
|
var _b;
|
|
79
27
|
var theme = _a.theme;
|
|
80
28
|
return (_b = {},
|
|
81
29
|
_b[theme.canvas.breakpoints.down('s')] = {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
justifyContent: 'center',
|
|
85
|
-
flexDirection: 'row-reverse',
|
|
86
|
-
'> *': {
|
|
30
|
+
padding: tokens_1.space.s,
|
|
31
|
+
'> *:not(div)': {
|
|
87
32
|
flex: 1,
|
|
88
|
-
'&:not(:first-of-type)': {
|
|
89
|
-
marginRight: tokens_1.space.s,
|
|
90
|
-
marginLeft: 0,
|
|
91
|
-
},
|
|
92
33
|
},
|
|
93
34
|
},
|
|
94
35
|
_b);
|
|
95
36
|
});
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
function
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
ActionBar.prototype.render = function () {
|
|
102
|
-
var _a = this.props, fixed = _a.fixed, children = _a.children, elemProps = __rest(_a, ["fixed", "children"]);
|
|
103
|
-
return (React.createElement(ActionBarContainer, __assign({}, elemProps, { fixed: fixed }),
|
|
104
|
-
React.createElement(ChildrenContainer, null, children)));
|
|
105
|
-
};
|
|
106
|
-
return ActionBar;
|
|
107
|
-
}(React.Component));
|
|
108
|
-
exports.default = ActionBar;
|
|
37
|
+
exports.ActionBar = common_1.createComponent('div')({
|
|
38
|
+
displayName: 'ActionBar',
|
|
39
|
+
Component: function (elemProps, ref, Element) { return (React.createElement(ResponsiveHStack, __assign({ ref: ref, as: Element, spacing: "s", depth: 1, background: tokens_1.commonColors.background, borderTop: "solid 1px " + tokens_1.colors.soap400, padding: tokens_1.space.s + " " + tokens_1.space.xl + " ", position: "fixed", bottom: 0, left: 0, right: 0 }, elemProps))); },
|
|
40
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../banner/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../banner/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
function __export(m) {
|
|
3
3
|
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
4
4
|
}
|
|
5
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
-
};
|
|
8
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
var Banner_1 = __importDefault(require("./lib/Banner"));
|
|
10
|
-
exports.Banner = Banner_1.default;
|
|
11
|
-
exports.default = Banner_1.default;
|
|
12
6
|
__export(require("./lib/Banner"));
|
|
7
|
+
__export(require("./lib/hooks/"));
|
|
@@ -1,38 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* The label of the Banner.
|
|
14
|
-
*/
|
|
15
|
-
label?: React.ReactNode;
|
|
2
|
+
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
+
import { Flex } from '@workday/canvas-kit-labs-react/layout';
|
|
4
|
+
import { BannerModel, BannerModelConfig } from './hooks';
|
|
5
|
+
export declare const BannerModelContext: React.Context<import("../../common").Model<{
|
|
6
|
+
hasError?: boolean | undefined;
|
|
7
|
+
isSticky?: boolean | undefined;
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
}, {}>>;
|
|
10
|
+
export interface BannerProps extends BannerModelConfig, ExtractProps<typeof Flex, never> {
|
|
11
|
+
model?: BannerModel;
|
|
16
12
|
/**
|
|
17
|
-
*
|
|
18
|
-
* @default BannerVariant.Full
|
|
13
|
+
* Children of the Banner. Should contain a `<Banner.Label>` a <Banner.Icon> and an optional `<Banner.ActionText>`
|
|
19
14
|
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* The type of error associated with the Banner (if applicable).
|
|
23
|
-
* @default ErrorType.Alert
|
|
24
|
-
*/
|
|
25
|
-
error?: ErrorType;
|
|
26
|
-
/**
|
|
27
|
-
* The text of the Banner action. This prop is also used as the aria-label for the action in the banner
|
|
28
|
-
* @default 'View All'
|
|
29
|
-
*/
|
|
30
|
-
actionText?: string;
|
|
31
|
-
}
|
|
32
|
-
declare class Banner extends React.Component<BannerProps> {
|
|
33
|
-
static Variant: typeof BannerVariant;
|
|
34
|
-
static ErrorType: typeof ErrorType;
|
|
35
|
-
render(): JSX.Element;
|
|
15
|
+
children?: React.ReactNode;
|
|
36
16
|
}
|
|
37
|
-
export
|
|
17
|
+
export declare const Banner: import("../../common").ElementComponent<"button", BannerProps> & {
|
|
18
|
+
Icon: import("../../common").ElementComponent<"span", import("./BannerIcon").BannerIconProps>;
|
|
19
|
+
Label: import("../../common").ElementComponent<"div", import("./BannerLabel").BannerLabelProps>;
|
|
20
|
+
ActionText: import("../../common").ElementComponent<"span", import("./BannerActionText").BannerActionTextProps>;
|
|
21
|
+
};
|
|
38
22
|
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../banner/lib/Banner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../banner/lib/Banner.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAEL,YAAY,EAKb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,uCAAuC,CAAC;AAE3D,OAAO,EAAC,WAAW,EAAE,iBAAiB,EAA8C,MAAM,SAAS,CAAC;AAMpG,eAAO,MAAM,kBAAkB;;;;OAA8C,CAAC;AAE9E,MAAM,WAAW,WAAY,SAAQ,iBAAiB,EAAE,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC;IACtF,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAkBD,eAAO,MAAM,MAAM;;;;CAqDjB,CAAC"}
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
var __assign = (this && this.__assign) || function () {
|
|
16
3
|
__assign = Object.assign || function(t) {
|
|
17
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -42,63 +29,52 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
42
29
|
return result;
|
|
43
30
|
};
|
|
44
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
/** @jsxRuntime classic */
|
|
33
|
+
/** @jsx jsx */
|
|
34
|
+
var core_1 = require("@emotion/core");
|
|
45
35
|
var React = __importStar(require("react"));
|
|
46
36
|
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
47
|
-
var icon_1 = require("@workday/canvas-kit-react/icon");
|
|
48
|
-
var canvas_system_icons_web_1 = require("@workday/canvas-system-icons-web");
|
|
49
37
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
38
|
+
var layout_1 = require("@workday/canvas-kit-labs-react/layout");
|
|
39
|
+
var hooks_1 = require("./hooks");
|
|
40
|
+
var BannerIcon_1 = require("./BannerIcon");
|
|
41
|
+
var BannerLabel_1 = require("./BannerLabel");
|
|
42
|
+
var BannerActionText_1 = require("./BannerActionText");
|
|
43
|
+
exports.BannerModelContext = React.createContext({});
|
|
44
|
+
// Remove color from our type since it is set on the Flex style attribute
|
|
45
|
+
var _a = tokens_1.type.levels.subtext.large, _color = _a.color, typeLevelsSubtextLarge = __rest(_a, ["color"]);
|
|
46
|
+
var styles = __assign(__assign(__assign({}, typeLevelsSubtextLarge), { cursor: 'pointer', fontWeight: tokens_1.type.properties.fontWeights.medium, textAlign: 'left', transition: 'background-color 120ms', '&:focus': __assign({ outline: 'none' }, common_1.focusRing({ separation: 2 })) }), common_1.hideMouseFocus);
|
|
47
|
+
exports.Banner = common_1.createComponent('button')({
|
|
48
|
+
displayName: 'Banner',
|
|
49
|
+
Component: function (_a, ref, Element) {
|
|
50
|
+
var _b;
|
|
51
|
+
var children = _a.children, model = _a.model, props = __rest(_a, ["children", "model"]);
|
|
52
|
+
var hasError = props.hasError, isSticky = props.isSticky, id = props.id, elemProps = __rest(props, ["hasError", "isSticky", "id"]);
|
|
53
|
+
var value = common_1.useDefaultModel(model, { hasError: hasError, isSticky: isSticky, id: id }, hooks_1.useBannerModel);
|
|
54
|
+
var palette = hooks_1.useThemedPalette(hasError ? 'error' : 'alert');
|
|
55
|
+
var themedBackgroundStyles = {
|
|
56
|
+
'&:hover': {
|
|
57
|
+
backgroundColor: palette.hover,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
var isRTL = common_1.useIsRTL();
|
|
61
|
+
var borderBottomLeftRadius = isRTL ? 'borderBottomRightRadius' : 'borderBottomLeftRadius';
|
|
62
|
+
var borderTopLeftRadius = isRTL ? 'borderTopRightRadius' : 'borderTopLeftRadius';
|
|
63
|
+
var borderBottomRightRadius = isRTL ? 'borderBottomLeftRadius' : 'borderBottomRightRadius';
|
|
64
|
+
var borderTopRightRadius = isRTL ? 'borderTopLeftRadius' : 'borderTopRightRadius';
|
|
65
|
+
var borderStyleProps = (_b = {},
|
|
66
|
+
_b[borderBottomLeftRadius] = tokens_1.borderRadius.m,
|
|
67
|
+
_b[borderTopLeftRadius] = tokens_1.borderRadius.m,
|
|
68
|
+
_b[borderBottomRightRadius] = isSticky ? 0 : tokens_1.borderRadius.m,
|
|
69
|
+
_b[borderTopRightRadius] = isSticky ? 0 : tokens_1.borderRadius.m,
|
|
70
|
+
_b);
|
|
71
|
+
var bannerProps = hooks_1.useBanner(value, elemProps, ref);
|
|
72
|
+
return (core_1.jsx(exports.BannerModelContext.Provider, { value: value },
|
|
73
|
+
core_1.jsx(layout_1.Flex, __assign({ as: Element, width: isSticky ? '222px' : '328px', backgroundColor: palette.normal, color: palette.contrast, padding: tokens_1.space.xxs + " " + tokens_1.space.s, border: "0", display: "flex", alignItems: "center" }, borderStyleProps, { css: [styles, themedBackgroundStyles] }, bannerProps), children)));
|
|
74
|
+
},
|
|
75
|
+
subComponents: {
|
|
76
|
+
Icon: BannerIcon_1.BannerIcon,
|
|
77
|
+
Label: BannerLabel_1.BannerLabel,
|
|
78
|
+
ActionText: BannerActionText_1.BannerActionText,
|
|
79
|
+
},
|
|
71
80
|
});
|
|
72
|
-
var BannerLabel = common_1.styled('div')({
|
|
73
|
-
flex: 1,
|
|
74
|
-
});
|
|
75
|
-
var BannerViewAll = common_1.styled('span')({
|
|
76
|
-
textDecoration: 'underline',
|
|
77
|
-
}, function (_a) {
|
|
78
|
-
var variant = _a.variant;
|
|
79
|
-
return ({
|
|
80
|
-
display: variant === BannerVariant.Sticky ? 'none' : undefined,
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
var Banner = /** @class */ (function (_super) {
|
|
84
|
-
__extends(Banner, _super);
|
|
85
|
-
function Banner() {
|
|
86
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
87
|
-
}
|
|
88
|
-
Banner.prototype.render = function () {
|
|
89
|
-
var _a = this.props, _b = _a.actionText, actionText = _b === void 0 ? 'View All' : _b, _c = _a.variant, variant = _c === void 0 ? BannerVariant.Full : _c, _d = _a.error, error = _d === void 0 ? common_1.ErrorType.Alert : _d, label = _a.label, onClick = _a.onClick, props = __rest(_a, ["actionText", "variant", "error", "label", "onClick"]);
|
|
90
|
-
var bannerIcon = error === common_1.ErrorType.Error ? canvas_system_icons_web_1.exclamationCircleIcon : canvas_system_icons_web_1.exclamationTriangleIcon;
|
|
91
|
-
var iconColor = error === common_1.ErrorType.Error ? tokens_1.colors.frenchVanilla100 : tokens_1.colors.blackPepper400;
|
|
92
|
-
var iconSize = 24;
|
|
93
|
-
return (React.createElement(BannerWrapper, __assign({ "aria-label": actionText + ': ' + label, role: "button", variant: variant, tabIndex: 0, onClick: onClick, error: error }, props),
|
|
94
|
-
React.createElement(BannerIcon, { icon: bannerIcon, color: iconColor, colorHover: iconColor, size: iconSize }),
|
|
95
|
-
React.createElement(BannerLabel, null, label),
|
|
96
|
-
React.createElement(BannerViewAll, { variant: variant }, actionText)));
|
|
97
|
-
};
|
|
98
|
-
Banner.Variant = BannerVariant;
|
|
99
|
-
Banner.ErrorType = common_1.ErrorType;
|
|
100
|
-
return Banner;
|
|
101
|
-
}(React.Component));
|
|
102
|
-
Banner.Variant = BannerVariant;
|
|
103
|
-
Banner.ErrorType = common_1.ErrorType;
|
|
104
|
-
exports.default = Banner;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
+
import { Box } from '@workday/canvas-kit-labs-react/common';
|
|
4
|
+
import { BannerModel } from './hooks';
|
|
5
|
+
export interface BannerActionTextProps extends ExtractProps<typeof Box, never> {
|
|
6
|
+
model?: BannerModel;
|
|
7
|
+
/**
|
|
8
|
+
* The text of the Banner action.
|
|
9
|
+
* @default 'View All'
|
|
10
|
+
*/
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const BannerActionText: import("../../common").ElementComponent<"span", BannerActionTextProps>;
|
|
14
|
+
//# sourceMappingURL=BannerActionText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerActionText.d.ts","sourceRoot":"","sources":["../../../../banner/lib/BannerActionText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,YAAY,EAKb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,GAAG,EAAC,MAAM,uCAAuC,CAAC;AAG1D,OAAO,EAAC,WAAW,EAAsB,MAAM,SAAS,CAAC;AAEzD,MAAM,WAAW,qBAAsB,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,KAAK,CAAC;IAC5E,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAMD,eAAO,MAAM,gBAAgB,wEAqB3B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
28
|
+
result["default"] = mod;
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
var React = __importStar(require("react"));
|
|
33
|
+
var common_1 = require("@workday/canvas-kit-react/common");
|
|
34
|
+
var common_2 = require("@workday/canvas-kit-labs-react/common");
|
|
35
|
+
var Banner_1 = require("./Banner");
|
|
36
|
+
var hooks_1 = require("./hooks");
|
|
37
|
+
var StyledActionBarText = common_1.styled(common_2.Box.as('span'))({
|
|
38
|
+
textDecoration: 'underline',
|
|
39
|
+
});
|
|
40
|
+
exports.BannerActionText = common_1.createComponent('span')({
|
|
41
|
+
displayName: 'Banner.ActionTextText',
|
|
42
|
+
Component: function (_a, ref, Element) {
|
|
43
|
+
var _b = _a.children, children = _b === void 0 ? 'View All' : _b, model = _a.model, elemProps = __rest(_a, ["children", "model"]);
|
|
44
|
+
var localModel = common_1.useModelContext(Banner_1.BannerModelContext, model);
|
|
45
|
+
var props = hooks_1.useBannerActionText(localModel, elemProps, ref);
|
|
46
|
+
return (React.createElement(StyledActionBarText, __assign({ display: localModel.state.isSticky ? 'none' : 'inline', ref: ref, as: Element }, props), children));
|
|
47
|
+
},
|
|
48
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
2
|
+
import { SystemIcon } from '@workday/canvas-kit-react/icon';
|
|
3
|
+
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
4
|
+
import { BannerModel } from './hooks';
|
|
5
|
+
export interface BannerIconProps extends Omit<ExtractProps<typeof SystemIcon, never>, 'icon'> {
|
|
6
|
+
model?: BannerModel;
|
|
7
|
+
/**
|
|
8
|
+
* Icon to show next to label
|
|
9
|
+
* @default exclamationTriangleIcon or exclamationCircleIcon when hasError is true
|
|
10
|
+
*/
|
|
11
|
+
icon?: CanvasSystemIcon;
|
|
12
|
+
}
|
|
13
|
+
export declare const BannerIcon: import("../../common").ElementComponent<"span", BannerIconProps>;
|
|
14
|
+
//# sourceMappingURL=BannerIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerIcon.d.ts","sourceRoot":"","sources":["../../../../banner/lib/BannerIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EAIb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,UAAU,EAAC,MAAM,gCAAgC,CAAC;AAE1D,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D,OAAO,EAAC,WAAW,EAAgB,MAAM,SAAS,CAAC;AAEnD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAC3F,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;CACzB;AAMD,eAAO,MAAM,UAAU,kEAUrB,CAAC"}
|