@doist/reactist 19.1.1 → 20.0.1
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/README.md +32 -0
- package/dist/reactist.cjs.development.js +3 -81
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/{new-components/alert → alert}/alert.js +1 -1
- package/es/alert/alert.js.map +1 -0
- package/es/{new-components/alert → alert}/alert.module.css.js +0 -0
- package/es/{new-components/alert → alert}/alert.module.css.js.map +0 -0
- package/es/{new-components/avatar → avatar}/avatar.js +2 -2
- package/es/avatar/avatar.js.map +1 -0
- package/es/{new-components/avatar → avatar}/avatar.module.css.js +0 -0
- package/es/{new-components/avatar → avatar}/avatar.module.css.js.map +0 -0
- package/es/{new-components/avatar → avatar}/utils.js +0 -0
- package/es/avatar/utils.js.map +1 -0
- package/es/{new-components/badge → badge}/badge.js +1 -1
- package/es/badge/badge.js.map +1 -0
- package/es/badge/badge.module.css.js +4 -0
- package/es/{new-components/badge → badge}/badge.module.css.js.map +0 -0
- package/es/{new-components/banner → banner}/banner.js +2 -2
- package/es/banner/banner.js.map +1 -0
- package/es/{new-components/banner → banner}/banner.module.css.js +0 -0
- package/es/{new-components/banner → banner}/banner.module.css.js.map +0 -0
- package/es/{new-components/base-button → base-button}/base-button.js +2 -2
- package/es/base-button/base-button.js.map +1 -0
- package/es/{new-components/base-button → base-button}/base-button.module.css.js +0 -0
- package/es/{new-components/base-button → base-button}/base-button.module.css.js.map +0 -0
- package/es/{new-components/base-field → base-field}/base-field.js +2 -2
- package/es/base-field/base-field.js.map +1 -0
- package/es/{new-components/base-field → base-field}/base-field.module.css.js +0 -0
- package/es/{new-components/base-field → base-field}/base-field.module.css.js.map +0 -0
- package/es/{new-components/box → box}/box.js +3 -3
- package/es/box/box.js.map +1 -0
- package/es/{new-components/box → box}/box.module.css.js +0 -0
- package/es/{new-components/box → box}/box.module.css.js.map +0 -0
- package/es/{new-components/box → box}/gap.module.css.js +0 -0
- package/es/{new-components/box → box}/gap.module.css.js.map +0 -0
- package/es/{new-components/box → box}/margin.module.css.js +0 -0
- package/es/{new-components/box → box}/margin.module.css.js.map +0 -0
- package/es/{new-components/box → box}/padding.module.css.js +0 -0
- package/es/{new-components/box → box}/padding.module.css.js.map +0 -0
- package/es/{new-components/box → box}/width.module.css.js +0 -0
- package/es/{new-components/box → box}/width.module.css.js.map +0 -0
- package/es/{new-components/button → button}/button.js +1 -1
- package/es/button/button.js.map +1 -0
- package/es/{new-components/button-link → button-link}/button-link.js +2 -2
- package/es/button-link/button-link.js.map +1 -0
- package/es/{new-components/checkbox-field → checkbox-field}/checkbox-field.js +1 -1
- package/es/checkbox-field/checkbox-field.js.map +1 -0
- package/es/{new-components/checkbox-field → checkbox-field}/checkbox-field.module.css.js +0 -0
- package/es/{new-components/checkbox-field → checkbox-field}/checkbox-field.module.css.js.map +0 -0
- package/es/{new-components/checkbox-field → checkbox-field}/checkbox-icon.js +1 -1
- package/es/checkbox-field/checkbox-icon.js.map +1 -0
- package/es/{new-components/columns → columns}/columns.js +3 -3
- package/es/columns/columns.js.map +1 -0
- package/es/{new-components/columns → columns}/columns.module.css.js +0 -0
- package/es/{new-components/columns → columns}/columns.module.css.js.map +0 -0
- package/es/components/color-picker/color-picker.js +1 -1
- package/es/components/color-picker/color-picker.js.map +1 -1
- package/es/components/deprecated-button/deprecated-button.js +1 -1
- package/es/components/deprecated-button/deprecated-button.js.map +1 -1
- package/es/components/progress-bar/progress-bar.js +1 -1
- package/es/components/progress-bar/progress-bar.js.map +1 -1
- package/es/components/time/time.js +1 -1
- package/es/components/time/time.js.map +1 -1
- package/es/{new-components/deprecated-modal → deprecated-modal}/modal.js +1 -1
- package/es/deprecated-modal/modal.js.map +1 -0
- package/es/{new-components/deprecated-modal → deprecated-modal}/modal.module.css.js +0 -0
- package/es/{new-components/deprecated-modal → deprecated-modal}/modal.module.css.js.map +0 -0
- package/es/{new-components/divider → divider}/divider.js +2 -2
- package/es/divider/divider.js.map +1 -0
- package/es/{new-components/divider → divider}/divider.module.css.js +0 -0
- package/es/{new-components/divider → divider}/divider.module.css.js.map +0 -0
- package/es/{new-components/heading → heading}/heading.js +2 -2
- package/es/heading/heading.js.map +1 -0
- package/es/{new-components/heading → heading}/heading.module.css.js +0 -0
- package/es/{new-components/heading → heading}/heading.module.css.js.map +0 -0
- package/es/{new-components/hidden → hidden}/hidden.js +2 -2
- package/es/hidden/hidden.js.map +1 -0
- package/es/{new-components/hidden → hidden}/hidden.module.css.js +0 -0
- package/es/{new-components/hidden → hidden}/hidden.module.css.js.map +0 -0
- package/es/{new-components/hidden-visually → hidden-visually}/hidden-visually.js +2 -2
- package/es/hidden-visually/hidden-visually.js.map +1 -0
- package/es/{new-components/hidden-visually → hidden-visually}/hidden-visually.module.css.js +0 -0
- package/es/{new-components/hidden-visually → hidden-visually}/hidden-visually.module.css.js.map +0 -0
- package/es/{new-components/icons → icons}/alert-icon.js +1 -1
- package/es/icons/alert-icon.js.map +1 -0
- package/es/{new-components/icons → icons}/close-icon.js +1 -1
- package/es/icons/close-icon.js.map +1 -0
- package/es/{new-components/icons → icons}/password-hidden-icon.js +1 -1
- package/es/icons/password-hidden-icon.js.map +1 -0
- package/es/{new-components/icons → icons}/password-visible-icon.js +1 -1
- package/es/icons/password-visible-icon.js.map +1 -0
- package/es/index.js +31 -33
- package/es/index.js.map +1 -1
- package/es/{new-components/inline → inline}/inline.js +3 -3
- package/es/inline/inline.js.map +1 -0
- package/es/{new-components/loading → loading}/loading.js +1 -1
- package/es/loading/loading.js.map +1 -0
- package/es/{new-components/menu → menu}/menu.js +2 -2
- package/es/menu/menu.js.map +1 -0
- package/es/{new-components/modal → modal}/modal.js +1 -1
- package/es/modal/modal.js.map +1 -0
- package/es/{new-components/modal → modal}/modal.module.css.js +0 -0
- package/es/{new-components/modal → modal}/modal.module.css.js.map +0 -0
- package/es/{new-components/notice → notice}/notice.js +1 -1
- package/es/notice/notice.js.map +1 -0
- package/es/{new-components/notice → notice}/notice.module.css.js +0 -0
- package/es/{new-components/notice → notice}/notice.module.css.js.map +0 -0
- package/es/{new-components/password-field → password-field}/password-field.js +2 -2
- package/es/password-field/password-field.js.map +1 -0
- package/es/{new-components/password-field → password-field}/password-field.module.css.js +0 -0
- package/es/{new-components/password-field → password-field}/password-field.module.css.js.map +0 -0
- package/es/{new-components/select-field → select-field}/select-field.js +1 -1
- package/es/select-field/select-field.js.map +1 -0
- package/es/{new-components/select-field → select-field}/select-field.module.css.js +0 -0
- package/es/{new-components/select-field → select-field}/select-field.module.css.js.map +0 -0
- package/es/{new-components/spinner → spinner}/spinner.js +0 -0
- package/es/spinner/spinner.js.map +1 -0
- package/es/{new-components/spinner → spinner}/spinner.module.css.js +0 -0
- package/es/{new-components/spinner → spinner}/spinner.module.css.js.map +0 -0
- package/es/{new-components/stack → stack}/stack.js +3 -3
- package/es/stack/stack.js.map +1 -0
- package/es/{new-components/switch-field → switch-field}/switch-field.js +2 -2
- package/es/switch-field/switch-field.js.map +1 -0
- package/es/{new-components/switch-field → switch-field}/switch-field.module.css.js +0 -0
- package/es/{new-components/switch-field → switch-field}/switch-field.module.css.js.map +0 -0
- package/es/{new-components/tabs → tabs}/tabs.js +3 -3
- package/es/tabs/tabs.js.map +1 -0
- package/es/{new-components/tabs → tabs}/tabs.module.css.js +0 -0
- package/es/{new-components/tabs → tabs}/tabs.module.css.js.map +0 -0
- package/es/{new-components/text → text}/text.js +3 -3
- package/es/text/text.js.map +1 -0
- package/es/{new-components/text → text}/text.module.css.js +0 -0
- package/es/{new-components/text → text}/text.module.css.js.map +0 -0
- package/es/{new-components/text-area → text-area}/text-area.js +1 -1
- package/es/text-area/text-area.js.map +1 -0
- package/es/{new-components/text-area → text-area}/text-area.module.css.js +0 -0
- package/es/{new-components/text-area → text-area}/text-area.module.css.js.map +0 -0
- package/es/{new-components/text-field → text-field}/text-field.js +1 -1
- package/es/text-field/text-field.js.map +1 -0
- package/es/{new-components/text-field → text-field}/text-field.module.css.js +0 -0
- package/es/{new-components/text-field → text-field}/text-field.module.css.js.map +0 -0
- package/es/{new-components/text-link → text-link}/text-link.js +2 -2
- package/es/text-link/text-link.js.map +1 -0
- package/es/{new-components/text-link → text-link}/text-link.module.css.js +0 -0
- package/es/{new-components/text-link → text-link}/text-link.module.css.js.map +0 -0
- package/es/{new-components/toast → toast}/static-toast.js +1 -1
- package/es/toast/static-toast.js.map +1 -0
- package/es/{new-components/toast → toast}/toast-animation.js +0 -0
- package/es/toast/toast-animation.js.map +1 -0
- package/es/{new-components/toast → toast}/toast.module.css.js +0 -0
- package/es/{new-components/toast → toast}/toast.module.css.js.map +0 -0
- package/es/{new-components/toast → toast}/use-toasts.js +2 -2
- package/es/toast/use-toasts.js.map +1 -0
- package/es/{new-components/tooltip → tooltip}/tooltip.js +1 -1
- package/es/tooltip/tooltip.js.map +1 -0
- package/es/{new-components/tooltip → tooltip}/tooltip.module.css.js +0 -0
- package/es/{new-components/tooltip → tooltip}/tooltip.module.css.js.map +0 -0
- package/es/{new-components → utils}/common-helpers.js +0 -0
- package/es/utils/common-helpers.js.map +1 -0
- package/es/{new-components → utils}/responsive-props.js +0 -0
- package/es/utils/responsive-props.js.map +1 -0
- package/lib/{new-components/alert → alert}/alert.d.ts +1 -1
- package/lib/alert/alert.js +2 -0
- package/lib/alert/alert.js.map +1 -0
- package/lib/{new-components/alert → alert}/alert.module.css.js +0 -0
- package/lib/{new-components/alert → alert}/alert.module.css.js.map +0 -0
- package/lib/{new-components/alert → alert}/alert.test.d.ts +0 -0
- package/lib/{new-components/alert → alert}/index.d.ts +0 -0
- package/lib/{new-components/avatar → avatar}/avatar.d.ts +1 -1
- package/lib/avatar/avatar.js +2 -0
- package/lib/avatar/avatar.js.map +1 -0
- package/lib/{new-components/avatar → avatar}/avatar.module.css.js +0 -0
- package/lib/{new-components/avatar → avatar}/avatar.module.css.js.map +0 -0
- package/lib/{new-components/avatar → avatar}/avatar.test.d.ts +0 -0
- package/lib/{new-components/avatar → avatar}/index.d.ts +0 -0
- package/lib/{new-components/avatar → avatar}/utils.d.ts +0 -0
- package/lib/{new-components/avatar → avatar}/utils.js +0 -0
- package/lib/avatar/utils.js.map +1 -0
- package/lib/{new-components/avatar → avatar}/utils.test.d.ts +0 -0
- package/lib/{new-components/badge → badge}/badge.d.ts +0 -0
- package/lib/badge/badge.js +2 -0
- package/lib/badge/badge.js.map +1 -0
- package/lib/badge/badge.module.css.js +2 -0
- package/lib/{new-components/badge → badge}/badge.module.css.js.map +0 -0
- package/lib/{new-components/badge → badge}/badge.test.d.ts +0 -0
- package/lib/{new-components/badge → badge}/index.d.ts +0 -0
- package/lib/{new-components/banner → banner}/banner.d.ts +0 -0
- package/lib/banner/banner.js +2 -0
- package/lib/banner/banner.js.map +1 -0
- package/lib/{new-components/banner → banner}/banner.module.css.js +0 -0
- package/lib/{new-components/banner → banner}/banner.module.css.js.map +0 -0
- package/lib/{new-components/banner → banner}/banner.test.d.ts +0 -0
- package/lib/{new-components/banner → banner}/index.d.ts +0 -0
- package/lib/{new-components/base-button → base-button}/base-button.d.ts +1 -1
- package/lib/base-button/base-button.js +2 -0
- package/lib/base-button/base-button.js.map +1 -0
- package/lib/{new-components/base-button → base-button}/base-button.module.css.js +0 -0
- package/lib/{new-components/base-button → base-button}/base-button.module.css.js.map +0 -0
- package/lib/{new-components/base-button → base-button}/index.d.ts +0 -0
- package/lib/{new-components/base-field → base-field}/base-field.d.ts +1 -1
- package/lib/base-field/base-field.js +2 -0
- package/lib/base-field/base-field.js.map +1 -0
- package/lib/{new-components/base-field → base-field}/base-field.module.css.js +0 -0
- package/lib/{new-components/base-field → base-field}/base-field.module.css.js.map +0 -0
- package/lib/{new-components/base-field → base-field}/index.d.ts +0 -0
- package/lib/{new-components/box → box}/box.d.ts +3 -3
- package/lib/{new-components/box → box}/box.js +1 -1
- package/lib/box/box.js.map +1 -0
- package/lib/{new-components/box → box}/box.module.css.js +0 -0
- package/lib/{new-components/box → box}/box.module.css.js.map +0 -0
- package/lib/{new-components/box → box}/box.test.d.ts +0 -0
- package/lib/{new-components/box → box}/gap.module.css.js +0 -0
- package/lib/{new-components/box → box}/gap.module.css.js.map +0 -0
- package/lib/{new-components/box → box}/index.d.ts +0 -0
- package/lib/{new-components/box → box}/margin.module.css.js +0 -0
- package/lib/{new-components/box → box}/margin.module.css.js.map +0 -0
- package/lib/{new-components/box → box}/padding.module.css.js +0 -0
- package/lib/{new-components/box → box}/padding.module.css.js.map +0 -0
- package/lib/{new-components/box → box}/width.module.css.js +0 -0
- package/lib/{new-components/box → box}/width.module.css.js.map +0 -0
- package/lib/{new-components/button → button}/button.d.ts +0 -0
- package/lib/button/button.js +2 -0
- package/lib/button/button.js.map +1 -0
- package/lib/{new-components/button → button}/button.test.d.ts +0 -0
- package/lib/{new-components/button → button}/index.d.ts +0 -0
- package/lib/{new-components/button-link → button-link}/button-link-story-wrapper.d.ts +0 -0
- package/lib/{new-components/button-link → button-link}/button-link.d.ts +2 -2
- package/lib/button-link/button-link.js +2 -0
- package/lib/button-link/button-link.js.map +1 -0
- package/lib/{new-components/button-link → button-link}/button-link.test.d.ts +0 -0
- package/lib/{new-components/button-link → button-link}/index.d.ts +0 -0
- package/lib/{new-components/checkbox-field → checkbox-field}/checkbox-field.d.ts +0 -0
- package/lib/checkbox-field/checkbox-field.js +2 -0
- package/lib/checkbox-field/checkbox-field.js.map +1 -0
- package/lib/{new-components/checkbox-field → checkbox-field}/checkbox-field.module.css.js +0 -0
- package/lib/{new-components/checkbox-field → checkbox-field}/checkbox-field.module.css.js.map +0 -0
- package/lib/{new-components/checkbox-field → checkbox-field}/checkbox-field.test.d.ts +0 -0
- package/lib/{new-components/checkbox-field → checkbox-field}/checkbox-icon.d.ts +0 -0
- package/lib/checkbox-field/checkbox-icon.js +2 -0
- package/lib/checkbox-field/checkbox-icon.js.map +1 -0
- package/lib/{new-components/checkbox-field → checkbox-field}/index.d.ts +0 -0
- package/lib/{new-components/columns → columns}/columns.d.ts +4 -4
- package/lib/{new-components/columns → columns}/columns.js +1 -1
- package/lib/columns/columns.js.map +1 -0
- package/lib/{new-components/columns → columns}/columns.module.css.js +0 -0
- package/lib/{new-components/columns → columns}/columns.module.css.js.map +0 -0
- package/lib/{new-components/columns → columns}/columns.test.d.ts +0 -0
- package/lib/{new-components/columns → columns}/index.d.ts +0 -0
- package/lib/components/color-picker/color-picker.js +1 -1
- package/lib/components/color-picker/color-picker.js.map +1 -1
- package/lib/components/deprecated-button/deprecated-button.js +1 -1
- package/lib/components/deprecated-button/deprecated-button.js.map +1 -1
- package/lib/components/progress-bar/progress-bar.js +1 -1
- package/lib/components/progress-bar/progress-bar.js.map +1 -1
- package/lib/components/time/time.js +1 -1
- package/lib/components/time/time.js.map +1 -1
- package/lib/{new-components/deprecated-modal → deprecated-modal}/index.d.ts +0 -0
- package/lib/{new-components/deprecated-modal → deprecated-modal}/modal.d.ts +0 -0
- package/lib/deprecated-modal/modal.js +2 -0
- package/lib/deprecated-modal/modal.js.map +1 -0
- package/lib/{new-components/deprecated-modal → deprecated-modal}/modal.module.css.js +0 -0
- package/lib/{new-components/deprecated-modal → deprecated-modal}/modal.module.css.js.map +0 -0
- package/lib/{new-components/deprecated-modal → deprecated-modal}/modal.test.d.ts +0 -0
- package/lib/{new-components/divider → divider}/divider.d.ts +1 -1
- package/lib/divider/divider.js +2 -0
- package/lib/divider/divider.js.map +1 -0
- package/lib/{new-components/divider → divider}/divider.module.css.js +0 -0
- package/lib/{new-components/divider → divider}/divider.module.css.js.map +0 -0
- package/lib/{new-components/divider → divider}/index.d.ts +0 -0
- package/lib/{new-components/heading → heading}/heading.d.ts +2 -2
- package/lib/heading/heading.js +2 -0
- package/lib/heading/heading.js.map +1 -0
- package/lib/{new-components/heading → heading}/heading.module.css.js +0 -0
- package/lib/{new-components/heading → heading}/heading.module.css.js.map +0 -0
- package/lib/{new-components/heading → heading}/heading.test.d.ts +0 -0
- package/lib/{new-components/heading → heading}/index.d.ts +0 -0
- package/lib/{new-components/hidden → hidden}/hidden.d.ts +2 -2
- package/lib/hidden/hidden.js +2 -0
- package/lib/hidden/hidden.js.map +1 -0
- package/lib/{new-components/hidden → hidden}/hidden.module.css.js +0 -0
- package/lib/{new-components/hidden → hidden}/hidden.module.css.js.map +0 -0
- package/lib/{new-components/hidden → hidden}/hidden.test.d.ts +0 -0
- package/lib/{new-components/hidden → hidden}/index.d.ts +0 -0
- package/lib/{new-components/hidden-visually → hidden-visually}/hidden-visually.d.ts +1 -1
- package/lib/hidden-visually/hidden-visually.js +2 -0
- package/lib/hidden-visually/hidden-visually.js.map +1 -0
- package/lib/{new-components/hidden-visually → hidden-visually}/hidden-visually.module.css.js +0 -0
- package/lib/{new-components/hidden-visually → hidden-visually}/hidden-visually.module.css.js.map +0 -0
- package/lib/{new-components/hidden-visually → hidden-visually}/hidden-visually.test.d.ts +0 -0
- package/lib/{new-components/hidden-visually → hidden-visually}/index.d.ts +0 -0
- package/lib/{new-components/icons → icons}/alert-icon.d.ts +1 -1
- package/lib/icons/alert-icon.js +2 -0
- package/lib/icons/alert-icon.js.map +1 -0
- package/lib/{new-components/icons → icons}/close-icon.d.ts +0 -0
- package/lib/icons/close-icon.js +2 -0
- package/lib/icons/close-icon.js.map +1 -0
- package/lib/{new-components/icons → icons}/password-hidden-icon.d.ts +0 -0
- package/lib/icons/password-hidden-icon.js +2 -0
- package/lib/icons/password-hidden-icon.js.map +1 -0
- package/lib/{new-components/icons → icons}/password-visible-icon.d.ts +0 -0
- package/lib/icons/password-visible-icon.js +2 -0
- package/lib/icons/password-visible-icon.js.map +1 -0
- package/lib/index.d.ts +31 -33
- package/lib/index.js +1 -1
- package/lib/{new-components/inline → inline}/index.d.ts +0 -0
- package/lib/{new-components/inline → inline}/inline.d.ts +3 -3
- package/lib/{new-components/inline → inline}/inline.js +1 -1
- package/lib/inline/inline.js.map +1 -0
- package/lib/{new-components/inline → inline}/inline.test.d.ts +0 -0
- package/lib/{new-components/loading → loading}/index.d.ts +0 -0
- package/lib/{new-components/loading → loading}/loading.d.ts +0 -0
- package/lib/loading/loading.js +2 -0
- package/lib/loading/loading.js.map +1 -0
- package/lib/{new-components/loading → loading}/loading.test.d.ts +0 -0
- package/lib/{new-components/menu → menu}/index.d.ts +0 -0
- package/lib/{new-components/menu → menu}/menu.d.ts +5 -5
- package/lib/menu/menu.js +2 -0
- package/lib/menu/menu.js.map +1 -0
- package/lib/{new-components/menu → menu}/menu.test.d.ts +0 -0
- package/lib/{new-components/modal → modal}/index.d.ts +0 -0
- package/lib/{new-components/modal → modal}/modal-stories-components.d.ts +0 -0
- package/lib/{new-components/modal → modal}/modal.d.ts +0 -0
- package/lib/modal/modal.js +2 -0
- package/lib/modal/modal.js.map +1 -0
- package/lib/{new-components/modal → modal}/modal.module.css.js +0 -0
- package/lib/{new-components/modal → modal}/modal.module.css.js.map +0 -0
- package/lib/{new-components/modal → modal}/modal.test.d.ts +0 -0
- package/lib/{new-components/notice → notice}/index.d.ts +0 -0
- package/lib/{new-components/notice → notice}/notice.d.ts +1 -1
- package/lib/notice/notice.js +2 -0
- package/lib/notice/notice.js.map +1 -0
- package/lib/{new-components/notice → notice}/notice.module.css.js +0 -0
- package/lib/{new-components/notice → notice}/notice.module.css.js.map +0 -0
- package/lib/{new-components/notice → notice}/notice.test.d.ts +0 -0
- package/lib/{new-components/password-field → password-field}/index.d.ts +0 -0
- package/lib/{new-components/password-field → password-field}/password-field.d.ts +0 -0
- package/lib/password-field/password-field.js +2 -0
- package/lib/password-field/password-field.js.map +1 -0
- package/lib/{new-components/password-field → password-field}/password-field.module.css.js +0 -0
- package/lib/{new-components/password-field → password-field}/password-field.module.css.js.map +0 -0
- package/lib/{new-components/password-field → password-field}/password-field.test.d.ts +0 -0
- package/lib/{new-components/select-field → select-field}/index.d.ts +0 -0
- package/lib/{new-components/select-field → select-field}/select-field.d.ts +0 -0
- package/lib/select-field/select-field.js +2 -0
- package/lib/select-field/select-field.js.map +1 -0
- package/lib/{new-components/select-field → select-field}/select-field.module.css.js +0 -0
- package/lib/{new-components/select-field → select-field}/select-field.module.css.js.map +0 -0
- package/lib/{new-components/select-field → select-field}/select-field.test.d.ts +0 -0
- package/lib/{new-components/spinner → spinner}/index.d.ts +0 -0
- package/lib/{new-components/spinner → spinner}/spinner.d.ts +0 -0
- package/lib/{new-components/spinner → spinner}/spinner.js +0 -0
- package/lib/spinner/spinner.js.map +1 -0
- package/lib/{new-components/spinner → spinner}/spinner.module.css.js +0 -0
- package/lib/{new-components/spinner → spinner}/spinner.module.css.js.map +0 -0
- package/lib/{new-components/stack → stack}/index.d.ts +0 -0
- package/lib/{new-components/stack → stack}/stack.d.ts +3 -3
- package/lib/{new-components/stack → stack}/stack.js +1 -1
- package/lib/stack/stack.js.map +1 -0
- package/lib/{new-components/stack → stack}/stack.test.d.ts +0 -0
- package/lib/{new-components/switch-field → switch-field}/index.d.ts +0 -0
- package/lib/{new-components/switch-field → switch-field}/switch-field.d.ts +0 -0
- package/lib/switch-field/switch-field.js +2 -0
- package/lib/switch-field/switch-field.js.map +1 -0
- package/lib/{new-components/switch-field → switch-field}/switch-field.module.css.js +0 -0
- package/lib/{new-components/switch-field → switch-field}/switch-field.module.css.js.map +0 -0
- package/lib/{new-components/switch-field → switch-field}/switch-field.test.d.ts +0 -0
- package/lib/{new-components/tabs → tabs}/index.d.ts +0 -0
- package/lib/{new-components/tabs → tabs}/tabs.d.ts +3 -3
- package/lib/tabs/tabs.js +2 -0
- package/lib/tabs/tabs.js.map +1 -0
- package/lib/{new-components/tabs → tabs}/tabs.module.css.js +0 -0
- package/lib/{new-components/tabs → tabs}/tabs.module.css.js.map +0 -0
- package/lib/{new-components/tabs → tabs}/tabs.test.d.ts +0 -0
- package/lib/{new-components/text → text}/index.d.ts +0 -0
- package/lib/{new-components/text → text}/text.d.ts +2 -2
- package/lib/{new-components/text → text}/text.js +1 -1
- package/lib/text/text.js.map +1 -0
- package/lib/{new-components/text → text}/text.module.css.js +0 -0
- package/lib/{new-components/text → text}/text.module.css.js.map +0 -0
- package/lib/{new-components/text → text}/text.test.d.ts +0 -0
- package/lib/{new-components/text-area → text-area}/index.d.ts +0 -0
- package/lib/{new-components/text-area → text-area}/text-area.d.ts +0 -0
- package/lib/text-area/text-area.js +2 -0
- package/lib/text-area/text-area.js.map +1 -0
- package/lib/{new-components/text-area → text-area}/text-area.module.css.js +0 -0
- package/lib/{new-components/text-area → text-area}/text-area.module.css.js.map +0 -0
- package/lib/{new-components/text-area → text-area}/text-area.test.d.ts +0 -0
- package/lib/{new-components/text-field → text-field}/index.d.ts +0 -0
- package/lib/{new-components/text-field → text-field}/text-field.d.ts +0 -0
- package/lib/text-field/text-field.js +2 -0
- package/lib/text-field/text-field.js.map +1 -0
- package/lib/{new-components/text-field → text-field}/text-field.module.css.js +0 -0
- package/lib/{new-components/text-field → text-field}/text-field.module.css.js.map +0 -0
- package/lib/{new-components/text-field → text-field}/text-field.test.d.ts +0 -0
- package/lib/{new-components/text-link → text-link}/index.d.ts +0 -0
- package/lib/text-link/text-link.d.ts +5 -0
- package/lib/text-link/text-link.js +2 -0
- package/lib/text-link/text-link.js.map +1 -0
- package/lib/{new-components/text-link → text-link}/text-link.module.css.js +0 -0
- package/lib/{new-components/text-link → text-link}/text-link.module.css.js.map +0 -0
- package/lib/{new-components/toast → toast}/index.d.ts +0 -0
- package/lib/{new-components/toast → toast}/static-toast.d.ts +0 -0
- package/lib/toast/static-toast.js +2 -0
- package/lib/toast/static-toast.js.map +1 -0
- package/lib/{new-components/toast → toast}/toast-animation.d.ts +0 -0
- package/lib/{new-components/toast → toast}/toast-animation.js +0 -0
- package/lib/toast/toast-animation.js.map +1 -0
- package/lib/{new-components/toast → toast}/toast.module.css.js +0 -0
- package/lib/{new-components/toast → toast}/toast.module.css.js.map +0 -0
- package/lib/{new-components/toast → toast}/toast.test.d.ts +0 -0
- package/lib/{new-components/toast → toast}/use-toasts.d.ts +1 -1
- package/lib/toast/use-toasts.js +2 -0
- package/lib/toast/use-toasts.js.map +1 -0
- package/lib/{new-components/tooltip → tooltip}/index.d.ts +0 -0
- package/lib/{new-components/tooltip → tooltip}/tooltip.d.ts +0 -0
- package/lib/tooltip/tooltip.js +2 -0
- package/lib/tooltip/tooltip.js.map +1 -0
- package/lib/{new-components/tooltip → tooltip}/tooltip.module.css.js +0 -0
- package/lib/{new-components/tooltip → tooltip}/tooltip.module.css.js.map +0 -0
- package/lib/{new-components/tooltip → tooltip}/tooltip.test.d.ts +0 -0
- package/lib/{new-components → utils}/common-helpers.d.ts +0 -0
- package/lib/{new-components → utils}/common-helpers.js +0 -0
- package/lib/utils/common-helpers.js.map +1 -0
- package/lib/{new-components → utils}/common-types.d.ts +0 -0
- package/lib/{new-components → utils}/responsive-props.d.ts +0 -0
- package/lib/{new-components → utils}/responsive-props.js +0 -0
- package/lib/utils/responsive-props.js.map +1 -0
- package/lib/{new-components → utils}/test-helpers.d.ts +0 -0
- package/package.json +1 -1
- package/styles/badge.css +1 -1
- package/styles/badge.module.css.css +1 -1
- package/styles/menu.css +1 -1
- package/styles/reactist.css +2 -3
- package/es/components/deprecated-notification/deprecated-notification.js +0 -73
- package/es/components/deprecated-notification/deprecated-notification.js.map +0 -1
- package/es/components/icons/CloseIcon.svg.js +0 -14
- package/es/components/icons/CloseIcon.svg.js.map +0 -1
- package/es/new-components/alert/alert.js.map +0 -1
- package/es/new-components/avatar/avatar.js.map +0 -1
- package/es/new-components/avatar/utils.js.map +0 -1
- package/es/new-components/badge/badge.js.map +0 -1
- package/es/new-components/badge/badge.module.css.js +0 -4
- package/es/new-components/banner/banner.js.map +0 -1
- package/es/new-components/base-button/base-button.js.map +0 -1
- package/es/new-components/base-field/base-field.js.map +0 -1
- package/es/new-components/box/box.js.map +0 -1
- package/es/new-components/button/button.js.map +0 -1
- package/es/new-components/button-link/button-link.js.map +0 -1
- package/es/new-components/checkbox-field/checkbox-field.js.map +0 -1
- package/es/new-components/checkbox-field/checkbox-icon.js.map +0 -1
- package/es/new-components/columns/columns.js.map +0 -1
- package/es/new-components/common-helpers.js.map +0 -1
- package/es/new-components/deprecated-modal/modal.js.map +0 -1
- package/es/new-components/divider/divider.js.map +0 -1
- package/es/new-components/heading/heading.js.map +0 -1
- package/es/new-components/hidden/hidden.js.map +0 -1
- package/es/new-components/hidden-visually/hidden-visually.js.map +0 -1
- package/es/new-components/icons/alert-icon.js.map +0 -1
- package/es/new-components/icons/close-icon.js.map +0 -1
- package/es/new-components/icons/password-hidden-icon.js.map +0 -1
- package/es/new-components/icons/password-visible-icon.js.map +0 -1
- package/es/new-components/inline/inline.js.map +0 -1
- package/es/new-components/loading/loading.js.map +0 -1
- package/es/new-components/menu/menu.js.map +0 -1
- package/es/new-components/modal/modal.js.map +0 -1
- package/es/new-components/notice/notice.js.map +0 -1
- package/es/new-components/password-field/password-field.js.map +0 -1
- package/es/new-components/responsive-props.js.map +0 -1
- package/es/new-components/select-field/select-field.js.map +0 -1
- package/es/new-components/spinner/spinner.js.map +0 -1
- package/es/new-components/stack/stack.js.map +0 -1
- package/es/new-components/switch-field/switch-field.js.map +0 -1
- package/es/new-components/tabs/tabs.js.map +0 -1
- package/es/new-components/text/text.js.map +0 -1
- package/es/new-components/text-area/text-area.js.map +0 -1
- package/es/new-components/text-field/text-field.js.map +0 -1
- package/es/new-components/text-link/text-link.js.map +0 -1
- package/es/new-components/toast/static-toast.js.map +0 -1
- package/es/new-components/toast/toast-animation.js.map +0 -1
- package/es/new-components/toast/use-toasts.js.map +0 -1
- package/es/new-components/tooltip/tooltip.js.map +0 -1
- package/lib/components/deprecated-notification/deprecated-notification.d.ts +0 -18
- package/lib/components/deprecated-notification/deprecated-notification.js +0 -2
- package/lib/components/deprecated-notification/deprecated-notification.js.map +0 -1
- package/lib/components/deprecated-notification/deprecated-notification.test.d.ts +0 -1
- package/lib/components/deprecated-notification/index.d.ts +0 -1
- package/lib/components/icons/CloseIcon.svg.js +0 -2
- package/lib/components/icons/CloseIcon.svg.js.map +0 -1
- package/lib/new-components/alert/alert.js +0 -2
- package/lib/new-components/alert/alert.js.map +0 -1
- package/lib/new-components/avatar/avatar.js +0 -2
- package/lib/new-components/avatar/avatar.js.map +0 -1
- package/lib/new-components/avatar/utils.js.map +0 -1
- package/lib/new-components/badge/badge.js +0 -2
- package/lib/new-components/badge/badge.js.map +0 -1
- package/lib/new-components/badge/badge.module.css.js +0 -2
- package/lib/new-components/banner/banner.js +0 -2
- package/lib/new-components/banner/banner.js.map +0 -1
- package/lib/new-components/base-button/base-button.js +0 -2
- package/lib/new-components/base-button/base-button.js.map +0 -1
- package/lib/new-components/base-field/base-field.js +0 -2
- package/lib/new-components/base-field/base-field.js.map +0 -1
- package/lib/new-components/box/box.js.map +0 -1
- package/lib/new-components/button/button.js +0 -2
- package/lib/new-components/button/button.js.map +0 -1
- package/lib/new-components/button-link/button-link.js +0 -2
- package/lib/new-components/button-link/button-link.js.map +0 -1
- package/lib/new-components/checkbox-field/checkbox-field.js +0 -2
- package/lib/new-components/checkbox-field/checkbox-field.js.map +0 -1
- package/lib/new-components/checkbox-field/checkbox-icon.js +0 -2
- package/lib/new-components/checkbox-field/checkbox-icon.js.map +0 -1
- package/lib/new-components/columns/columns.js.map +0 -1
- package/lib/new-components/common-helpers.js.map +0 -1
- package/lib/new-components/deprecated-modal/modal.js +0 -2
- package/lib/new-components/deprecated-modal/modal.js.map +0 -1
- package/lib/new-components/divider/divider.js +0 -2
- package/lib/new-components/divider/divider.js.map +0 -1
- package/lib/new-components/heading/heading.js +0 -2
- package/lib/new-components/heading/heading.js.map +0 -1
- package/lib/new-components/hidden/hidden.js +0 -2
- package/lib/new-components/hidden/hidden.js.map +0 -1
- package/lib/new-components/hidden-visually/hidden-visually.js +0 -2
- package/lib/new-components/hidden-visually/hidden-visually.js.map +0 -1
- package/lib/new-components/icons/alert-icon.js +0 -2
- package/lib/new-components/icons/alert-icon.js.map +0 -1
- package/lib/new-components/icons/close-icon.js +0 -2
- package/lib/new-components/icons/close-icon.js.map +0 -1
- package/lib/new-components/icons/password-hidden-icon.js +0 -2
- package/lib/new-components/icons/password-hidden-icon.js.map +0 -1
- package/lib/new-components/icons/password-visible-icon.js +0 -2
- package/lib/new-components/icons/password-visible-icon.js.map +0 -1
- package/lib/new-components/inline/inline.js.map +0 -1
- package/lib/new-components/loading/loading.js +0 -2
- package/lib/new-components/loading/loading.js.map +0 -1
- package/lib/new-components/menu/menu.js +0 -2
- package/lib/new-components/menu/menu.js.map +0 -1
- package/lib/new-components/modal/modal.js +0 -2
- package/lib/new-components/modal/modal.js.map +0 -1
- package/lib/new-components/notice/notice.js +0 -2
- package/lib/new-components/notice/notice.js.map +0 -1
- package/lib/new-components/password-field/password-field.js +0 -2
- package/lib/new-components/password-field/password-field.js.map +0 -1
- package/lib/new-components/responsive-props.js.map +0 -1
- package/lib/new-components/select-field/select-field.js +0 -2
- package/lib/new-components/select-field/select-field.js.map +0 -1
- package/lib/new-components/spinner/spinner.js.map +0 -1
- package/lib/new-components/stack/stack.js.map +0 -1
- package/lib/new-components/switch-field/switch-field.js +0 -2
- package/lib/new-components/switch-field/switch-field.js.map +0 -1
- package/lib/new-components/tabs/tabs.js +0 -2
- package/lib/new-components/tabs/tabs.js.map +0 -1
- package/lib/new-components/text/text.js.map +0 -1
- package/lib/new-components/text-area/text-area.js +0 -2
- package/lib/new-components/text-area/text-area.js.map +0 -1
- package/lib/new-components/text-field/text-field.js +0 -2
- package/lib/new-components/text-field/text-field.js.map +0 -1
- package/lib/new-components/text-link/text-link.d.ts +0 -5
- package/lib/new-components/text-link/text-link.js +0 -2
- package/lib/new-components/text-link/text-link.js.map +0 -1
- package/lib/new-components/toast/static-toast.js +0 -2
- package/lib/new-components/toast/static-toast.js.map +0 -1
- package/lib/new-components/toast/toast-animation.js.map +0 -1
- package/lib/new-components/toast/use-toasts.js +0 -2
- package/lib/new-components/toast/use-toasts.js.map +0 -1
- package/lib/new-components/tooltip/tooltip.js +0 -2
- package/lib/new-components/tooltip/tooltip.js.map +0 -1
- package/styles/deprecated-notification.css +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sources":["../../../src/new-components/tooltip/tooltip.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {\n useTooltipState as useAriakitTooltipState,\n Tooltip as AriakitTooltip,\n TooltipAnchor,\n TooltipArrow,\n} from 'ariakit/tooltip'\nimport { Box } from '../box'\n\nimport type {\n TooltipStateProps as AriakitTooltipStateProps,\n TooltipAnchorProps,\n} from 'ariakit/tooltip'\nimport type { PopoverState } from 'ariakit/popover'\n\nimport styles from './tooltip.module.css'\n\ntype TooltipProps = {\n /**\n * The element that triggers the tooltip. Generally a button or link.\n *\n * It should be an interactive element accessible both via mouse and keyboard interactions.\n */\n children: React.ReactNode\n\n /**\n * The content to show in the tooltip.\n *\n * It can be rich content provided via React elements, or string content. It should not include\n * interactive elements inside it. This includes links or buttons.\n *\n * You can provide a function instead of the content itself. In this case, the function should\n * return the desired content. This is useful if the content is expensive to generate. It can\n * also be useful if the content dynamically changes often, so every time you trigger the\n * tooltip the content may have changed (e.g. if you show a ticking time clock in the tooltip).\n *\n * The trigger element will be associated to this content via `aria-describedby`. This means\n * that the tooltip content will be read by assistive technologies such as screen readers. It\n * will likely read this content right after reading the trigger element label.\n */\n content: React.ReactNode | (() => React.ReactNode)\n\n /**\n * How to place the tooltip relative to its trigger element.\n *\n * The possible values are \"top\", \"bottom\", \"left\", \"right\". Additionally, any of these values\n * can be combined with `-start` or `-end` for even more control. For instance `top-start` will\n * place the tooltip at the top, but with the start (e.g. left) side of the toolip and the\n * trigger aligned. If neither `-start` or `-end` are provided, the tooltip is centered along\n * the vertical or horizontal axis with the trigger.\n *\n * The position is enforced whenever possible, but tooltips can appear in different positions\n * if the specified one would make the tooltip intersect with the viewport edges.\n *\n * @default 'top'\n */\n position?: PopoverState['placement']\n\n /**\n * The separation (in pixels) between the trigger element and the tooltip.\n * @default 3\n */\n gapSize?: number\n\n /**\n * Whether to show an arrow-like element attached to the tooltip, and pointing towards the\n * trigger element.\n * @default false\n */\n withArrow?: boolean\n\n /**\n * An escape hatch, in case you need to provide a custom class name to the tooltip.\n */\n exceptionallySetClassName?: string\n}\n\n// These are exported to be used in the tests, they are not meant to be exported publicly\nexport const SHOW_DELAY = 500\nexport const HIDE_DELAY = 100\n\nfunction useDelayedTooltipState(initialState: AriakitTooltipStateProps) {\n const tooltipState = useAriakitTooltipState(initialState)\n const delay = useDelay()\n return React.useMemo(\n () => ({\n ...tooltipState,\n show: delay(() => tooltipState.show(), SHOW_DELAY),\n hide: delay(() => tooltipState.hide(), HIDE_DELAY),\n }),\n [delay, tooltipState],\n )\n}\n\nfunction Tooltip({\n children,\n content,\n position = 'top',\n gapSize = 3,\n withArrow = false,\n exceptionallySetClassName,\n}: TooltipProps) {\n const state = useDelayedTooltipState({ placement: position, gutter: gapSize })\n\n const child = React.Children.only(\n children as React.FunctionComponentElement<JSX.IntrinsicElements['div']> | null,\n )\n\n if (!content || !child) {\n return child\n }\n\n if (typeof child.ref === 'string') {\n throw new Error('Tooltip: String refs cannot be used as they cannot be forwarded')\n }\n\n /**\n * Prevents the tooltip from automatically firing on focus all the time. This is to prevent\n * tooltips from showing when the trigger element is focused back after a popover or dialog that\n * it opened was closed. See link below for more details.\n * @see https://github.com/ariakit/ariakit/discussions/749\n */\n function handleFocus(event: React.FocusEvent<HTMLDivElement>) {\n // If focus is not followed by a key up event, does it mean that it's not an intentional\n // keyboard focus? Not sure but it seems to work.\n // This may be resolved soon in an upcoming version of ariakit:\n // https://github.com/ariakit/ariakit/issues/750\n function handleKeyUp(event: Event) {\n const eventKey = (event as KeyboardEvent).key\n if (eventKey !== 'Escape' && eventKey !== 'Enter' && eventKey !== 'Space') {\n state.show()\n }\n }\n event.currentTarget.addEventListener('keyup', handleKeyUp, { once: true })\n event.preventDefault() // Prevent tooltip.show from being called by TooltipReference\n child?.props?.onFocus?.(event)\n }\n\n function handleBlur(event: React.FocusEvent<HTMLDivElement>) {\n state.hide()\n child?.props?.onBlur?.(event)\n }\n\n return (\n <>\n <TooltipAnchor state={state} ref={child.ref} described>\n {(anchorProps: TooltipAnchorProps) => {\n // Let child props override anchor props so user can specify attributes like tabIndex\n // Also, do not apply the child's props to TooltipAnchor as props like `as` can create problems\n // by applying the replacement component/element twice\n return React.cloneElement(child, {\n ...anchorProps,\n ...child.props,\n onFocus: handleFocus,\n onBlur: handleBlur,\n })\n }}\n </TooltipAnchor>\n {state.open ? (\n <Box\n as={AriakitTooltip}\n state={state}\n className={[styles.tooltip, exceptionallySetClassName]}\n background=\"toast\"\n borderRadius=\"standard\"\n paddingX=\"small\"\n paddingY=\"xsmall\"\n maxWidth=\"medium\"\n width=\"fitContent\"\n overflow=\"hidden\"\n textAlign=\"center\"\n >\n {withArrow ? <TooltipArrow /> : null}\n {typeof content === 'function' ? content() : content}\n </Box>\n ) : null}\n </>\n )\n}\n\nexport type { TooltipProps }\nexport { Tooltip }\n\n//\n// Internal helpers\n//\n\n/**\n * Returns a function offering the same interface as setTimeout, but cleans up on unmount.\n *\n * The timeout state is shared, and only one delayed function can be active at any given time. If\n * a new delayed function is called while another one was waiting for its time to run, that older\n * invocation is cleared and it never runs.\n *\n * This is suitable for our use case here, but probably not the most intuitive thing in general.\n * That's why this is not made a shared util or something like it.\n */\nfunction useDelay() {\n const timeoutRef = React.useRef<ReturnType<typeof setTimeout>>()\n\n const clearTimeouts = React.useCallback(function clearTimeouts() {\n if (timeoutRef.current != null) {\n clearTimeout(timeoutRef.current)\n }\n }, [])\n\n // Runs clearTimeouts when the component is unmounted\n React.useEffect(() => clearTimeouts, [clearTimeouts])\n\n return React.useCallback(\n function delay(fn: () => void, delay: number) {\n return () => {\n clearTimeouts()\n timeoutRef.current = setTimeout(fn, delay)\n }\n },\n [clearTimeouts],\n )\n}\n"],"names":["SHOW_DELAY","HIDE_DELAY","useDelayedTooltipState","initialState","tooltipState","useAriakitTooltipState","delay","useDelay","React","show","hide","Tooltip","children","content","position","gapSize","withArrow","exceptionallySetClassName","state","placement","gutter","child","only","ref","Error","handleFocus","event","handleKeyUp","eventKey","key","currentTarget","addEventListener","once","preventDefault","props","onFocus","handleBlur","onBlur","TooltipAnchor","described","anchorProps","open","Box","as","AriakitTooltip","className","styles","tooltip","background","borderRadius","paddingX","paddingY","maxWidth","width","overflow","textAlign","TooltipArrow","timeoutRef","clearTimeouts","current","clearTimeout","fn","setTimeout"],"mappings":";;;;;;MA+EaA,UAAU,GAAG;MACbC,UAAU,GAAG;;AAE1B,SAASC,sBAAT,CAAgCC,YAAhC;EACI,MAAMC,YAAY,GAAGC,eAAsB,CAACF,YAAD,CAA3C;EACA,MAAMG,KAAK,GAAGC,QAAQ,EAAtB;EACA,OAAOC,OAAA,CACH,wCACOJ,YADP;IAEIK,IAAI,EAAEH,KAAK,CAAC,MAAMF,YAAY,CAACK,IAAb,EAAP,EAA4BT,UAA5B,CAFf;IAGIU,IAAI,EAAEJ,KAAK,CAAC,MAAMF,YAAY,CAACM,IAAb,EAAP,EAA4BT,UAA5B;IAJZ,EAMH,CAACK,KAAD,EAAQF,YAAR,CANG,CAAP;AAQH;;AAED,SAASO,OAAT,CAAiB;EACbC,QADa;EAEbC,OAFa;EAGbC,QAAQ,GAAG,KAHE;EAIbC,OAAO,GAAG,CAJG;EAKbC,SAAS,GAAG,KALC;EAMbC;AANa,CAAjB;EAQI,MAAMC,KAAK,GAAGhB,sBAAsB,CAAC;IAAEiB,SAAS,EAAEL,QAAb;IAAuBM,MAAM,EAAEL;GAAhC,CAApC;EAEA,MAAMM,KAAK,GAAGb,QAAA,CAAec,IAAf,CACVV,QADU,CAAd;;EAIA,IAAI,CAACC,OAAD,IAAY,CAACQ,KAAjB,EAAwB;IACpB,OAAOA,KAAP;;;EAGJ,IAAI,OAAOA,KAAK,CAACE,GAAb,KAAqB,QAAzB,EAAmC;IAC/B,MAAM,IAAIC,KAAJ,CAAU,iEAAV,CAAN;;;;;;;;;;EASJ,SAASC,WAAT,CAAqBC,KAArB;;;;;;;IAKI,SAASC,WAAT,CAAqBD,KAArB;MACI,MAAME,QAAQ,GAAIF,KAAuB,CAACG,GAA1C;;MACA,IAAID,QAAQ,KAAK,QAAb,IAAyBA,QAAQ,KAAK,OAAtC,IAAiDA,QAAQ,KAAK,OAAlE,EAA2E;QACvEV,KAAK,CAACT,IAAN;;;;IAGRiB,KAAK,CAACI,aAAN,CAAoBC,gBAApB,CAAqC,OAArC,EAA8CJ,WAA9C,EAA2D;MAAEK,IAAI,EAAE;KAAnE;IACAN,KAAK,CAACO,cAAN;;IACAZ,KAAK,QAAL,4BAAAA,KAAK,CAAEa,KAAP,kCAAcC,OAAd,iCAAcA,OAAd,CAAwBT,KAAxB;;;EAGJ,SAASU,UAAT,CAAoBV,KAApB;;;IACIR,KAAK,CAACR,IAAN;IACAW,KAAK,QAAL,6BAAAA,KAAK,CAAEa,KAAP,mCAAcG,MAAd,kCAAcA,MAAd,CAAuBX,KAAvB;;;EAGJ,oBACIlB,aAAA,SAAA,MAAA,eACIA,aAAA,CAAC8B,aAAD;IAAepB,KAAK,EAAEA;IAAOK,GAAG,EAAEF,KAAK,CAACE;IAAKgB,SAAS;GAAtD,EACMC,WAAD;;;;IAIG,oBAAOhC,YAAA,CAAmBa,KAAnB,mDACAmB,WADA,GAEAnB,KAAK,CAACa,KAFN;MAGHC,OAAO,EAAEV,WAHN;MAIHY,MAAM,EAAED;OAJZ;GALR,CADJ,EAcKlB,KAAK,CAACuB,IAAN,gBACGjC,aAAA,CAACkC,GAAD;IACIC,EAAE,EAAEC;IACJ1B,KAAK,EAAEA;IACP2B,SAAS,EAAE,CAACC,MAAM,CAACC,OAAR,EAAiB9B,yBAAjB;IACX+B,UAAU,EAAC;IACXC,YAAY,EAAC;IACbC,QAAQ,EAAC;IACTC,QAAQ,EAAC;IACTC,QAAQ,EAAC;IACTC,KAAK,EAAC;IACNC,QAAQ,EAAC;IACTC,SAAS,EAAC;GAXd,EAaKvC,SAAS,gBAAGR,aAAA,CAACgD,YAAD,MAAA,CAAH,GAAsB,IAbpC,EAcK,OAAO3C,OAAP,KAAmB,UAAnB,GAAgCA,OAAO,EAAvC,GAA4CA,OAdjD,CADH,GAiBG,IA/BR,CADJ;AAmCH;AAMD;AACA;;AAEA;;;;;;;;;;;AAUA,SAASN,QAAT;EACI,MAAMkD,UAAU,GAAGjD,MAAA,EAAnB;EAEA,MAAMkD,aAAa,GAAGlD,WAAA,CAAkB,SAASkD,aAAT;IACpC,IAAID,UAAU,CAACE,OAAX,IAAsB,IAA1B,EAAgC;MAC5BC,YAAY,CAACH,UAAU,CAACE,OAAZ,CAAZ;;GAFc,EAInB,EAJmB,CAAtB;;EAOAnD,SAAA,CAAgB,MAAMkD,aAAtB,EAAqC,CAACA,aAAD,CAArC;EAEA,OAAOlD,WAAA,CACH,SAASF,KAAT,CAAeuD,EAAf,EAA+BvD,KAA/B;IACI,OAAO;MACHoD,aAAa;MACbD,UAAU,CAACE,OAAX,GAAqBG,UAAU,CAACD,EAAD,EAAKvD,KAAL,CAA/B;KAFJ;GAFD,EAOH,CAACoD,aAAD,CAPG,CAAP;AASH;;;;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import './deprecated-notification.less';
|
|
3
|
-
declare type DeprecatedNotificationProps = {
|
|
4
|
-
id: string;
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
title?: React.ReactNode;
|
|
7
|
-
subtitle?: React.ReactNode;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
customCloseButton?: React.ReactNode;
|
|
10
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
11
|
-
onClose?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
12
|
-
closeAltText?: string;
|
|
13
|
-
className?: string;
|
|
14
|
-
/** Indicates that the notification will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */
|
|
15
|
-
'aria-live'?: 'off' | 'polite' | 'assertive';
|
|
16
|
-
} & Omit<JSX.IntrinsicElements['div'], 'aria-live'>;
|
|
17
|
-
declare function DeprecatedNotification({ id, icon, title, subtitle, children, customCloseButton, onClick, onClose, closeAltText, className, 'aria-live': ariaLive, ...rest }: DeprecatedNotificationProps): JSX.Element;
|
|
18
|
-
export { DeprecatedNotification };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),i=(e(l),e(require("classnames"))),n=require("../icons/CloseIcon.svg.js");const a=["id","icon","title","subtitle","children","customCloseButton","onClick","onClose","closeAltText","className","aria-live"];exports.DeprecatedNotification=function(e){let{id:o,icon:c,title:r,subtitle:s,children:u,customCloseButton:b,onClick:d,onClose:m,closeAltText:f="Close",className:p,"aria-live":_="polite"}=e,j=t.objectWithoutProperties(e,a);const v=r?o+"-title":null,C=v?{id:v}:null,N=s?o+"-subtitle":null,E=N?{id:N}:null,h=u?o+"-content":null,S=h?{"aria-labelledby":h}:v?{"aria-labelledby":v}:null,y=N&&!u?{"aria-describedby":N}:null,B=l.createElement("div",t.objectSpread2({className:"reactist-notification__content"},u?{id:o+"-content"}:null),null!=u?u:l.createElement(l.Fragment,null,r?l.createElement("h3",t.objectSpread2({className:"reactist-notification__title"},C),r):null,s?l.createElement("p",t.objectSpread2({className:"reactist-notification__subtitle"},E),s):null)),g=l.createElement("div",{className:"reactist-notification__icon-content-group"},null!=c?c:null,B);return l.createElement("div",t.objectSpread2(t.objectSpread2(t.objectSpread2({id:o,role:"alert",className:i("reactist-notification",p,{"reactist-notification--with-button":Boolean(d),"reactist-notification--with-close-button":Boolean(m)}),"aria-live":_},S),y),j),d?l.createElement("button",{className:"reactist-notification__button",onClick:d},g):g,m?l.createElement("button",{className:"reactist-notification__close-button",onClick:m,"aria-label":f},null!=b?b:l.createElement(n.default,null)):null)};
|
|
2
|
-
//# sourceMappingURL=deprecated-notification.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated-notification.js","sources":["../../../src/components/deprecated-notification/deprecated-notification.tsx"],"sourcesContent":["import * as React from 'react'\nimport classNames from 'classnames'\nimport CloseIcon from '../icons/CloseIcon.svg'\nimport './deprecated-notification.less'\n\ntype DeprecatedNotificationProps = {\n id: string\n icon?: React.ReactNode\n title?: React.ReactNode\n subtitle?: React.ReactNode\n children?: React.ReactNode\n customCloseButton?: React.ReactNode\n onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n onClose?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n closeAltText?: string\n className?: string\n /** Indicates that the notification will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */\n 'aria-live'?: 'off' | 'polite' | 'assertive'\n} & Omit<JSX.IntrinsicElements['div'], 'aria-live'>\n\nfunction DeprecatedNotification({\n id,\n icon,\n title,\n subtitle,\n children,\n customCloseButton,\n onClick,\n onClose,\n closeAltText = 'Close',\n className,\n 'aria-live': ariaLive = 'polite',\n ...rest\n}: DeprecatedNotificationProps) {\n const titleId = title ? `${id}-title` : null\n const titleIdAttribute = titleId ? { id: titleId } : null\n const subtitleId = subtitle ? `${id}-subtitle` : null\n const subtitleIdAttribute = subtitleId ? { id: subtitleId } : null\n const contentId = children ? `${id}-content` : null\n const contentIdAttribute = children ? { id: `${id}-content` } : null\n const ariaLabelledBy = contentId\n ? { 'aria-labelledby': contentId }\n : titleId\n ? { 'aria-labelledby': titleId }\n : null\n const ariaDescribedBy = subtitleId && !children ? { 'aria-describedby': subtitleId } : null\n\n const notificationContent = (\n <div className=\"reactist-notification__content\" {...contentIdAttribute}>\n {children ?? (\n <>\n {title ? (\n <h3 className=\"reactist-notification__title\" {...titleIdAttribute}>\n {title}\n </h3>\n ) : null}\n {subtitle ? (\n <p className=\"reactist-notification__subtitle\" {...subtitleIdAttribute}>\n {subtitle}\n </p>\n ) : null}\n </>\n )}\n </div>\n )\n const notificationBody = (\n <div className=\"reactist-notification__icon-content-group\">\n {icon ?? null}\n {notificationContent}\n </div>\n )\n\n return (\n <div\n id={id}\n role=\"alert\"\n className={classNames('reactist-notification', className, {\n 'reactist-notification--with-button': Boolean(onClick),\n 'reactist-notification--with-close-button': Boolean(onClose),\n })}\n aria-live={ariaLive}\n {...ariaLabelledBy}\n {...ariaDescribedBy}\n {...rest}\n >\n {onClick ? (\n <button className=\"reactist-notification__button\" onClick={onClick}>\n {notificationBody}\n </button>\n ) : (\n notificationBody\n )}\n\n {onClose ? (\n <button\n className=\"reactist-notification__close-button\"\n onClick={onClose}\n aria-label={closeAltText}\n >\n {customCloseButton ?? <CloseIcon />}\n </button>\n ) : null}\n </div>\n )\n}\n\nexport { DeprecatedNotification }\n"],"names":["id","icon","title","subtitle","children","customCloseButton","onClick","onClose","closeAltText","className","aria-live","ariaLive","rest","titleId","titleIdAttribute","subtitleId","subtitleIdAttribute","contentId","ariaLabelledBy","aria-labelledby","ariaDescribedBy","aria-describedby","notificationContent","React","notificationBody","role","classNames","reactist-notification--with-button","Boolean","reactist-notification--with-close-button","CloseIcon"],"mappings":"qcAoBA,gBAAgCA,GAC5BA,EAD4BC,KAE5BA,EAF4BC,MAG5BA,EAH4BC,SAI5BA,EAJ4BC,SAK5BA,EAL4BC,kBAM5BA,EAN4BC,QAO5BA,EAP4BC,QAQ5BA,EAR4BC,aAS5BA,EAAe,QATaC,UAU5BA,EACAC,YAAaC,EAAW,YACrBC,iCAEH,MAAMC,EAAUX,EAAWF,WAAa,KAClCc,EAAmBD,EAAU,CAAEb,GAAIa,GAAY,KAC/CE,EAAaZ,EAAcH,cAAgB,KAC3CgB,EAAsBD,EAAa,CAAEf,GAAIe,GAAe,KACxDE,EAAYb,EAAcJ,aAAe,KAEzCkB,EAAiBD,EACjB,CAAEE,kBAAmBF,GACrBJ,EACA,CAAEM,kBAAmBN,GACrB,KACAO,EAAkBL,IAAeX,EAAW,CAAEiB,mBAAoBN,GAAe,KAEjFO,EACFC,uCAAKd,UAAU,kCATQL,EAAW,CAAEJ,GAAOA,cAAiB,YAUvDI,EAAAA,EACGmB,gCACKrB,EACGqB,sCAAId,UAAU,gCAAmCK,GAC5CZ,GAEL,KACHC,EACGoB,qCAAGd,UAAU,mCAAsCO,GAC9Cb,GAEL,OAKdqB,EACFD,uBAAKd,UAAU,mDACVR,EAAAA,EAAQ,KACRqB,GAIT,OACIC,uEACIvB,GAAIA,EACJyB,KAAK,QACLhB,UAAWiB,EAAW,wBAAyBjB,EAAW,CACtDkB,qCAAsCC,QAAQtB,GAC9CuB,2CAA4CD,QAAQrB,iBAE7CI,GACPO,GACAE,GACAR,GAEHN,EACGiB,0BAAQd,UAAU,gCAAgCH,QAASA,GACtDkB,GAGLA,EAGHjB,EACGgB,0BACId,UAAU,sCACVH,QAASC,eACGC,SAEXH,EAAAA,EAAqBkB,gBAACO,iBAE3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DeprecatedNotification } from './deprecated-notification';
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.default=()=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},e.createElement("path",{fill:"gray",fillRule:"evenodd",d:"M11.293 12L5.146 5.854a.5.5 0 1 1 .708-.708L12 11.293l6.146-6.147a.5.5 0 0 1 .708.708L12.707 12l6.147 6.146a.5.5 0 0 1-.708.708L12 12.707l-6.146 6.147a.5.5 0 0 1-.708-.708L11.293 12z"}));
|
|
2
|
-
//# sourceMappingURL=CloseIcon.svg.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CloseIcon.svg.js","sources":["../../../src/components/icons/CloseIcon.svg.tsx"],"sourcesContent":["import * as React from 'react'\n\nconst CloseIcon = () => (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n <path\n fill=\"gray\"\n fillRule=\"evenodd\"\n d=\"M11.293 12L5.146 5.854a.5.5 0 1 1 .708-.708L12 11.293l6.146-6.147a.5.5 0 0 1 .708.708L12.707 12l6.147 6.146a.5.5 0 0 1-.708.708L12 12.707l-6.146 6.147a.5.5 0 0 1-.708-.708L11.293 12z\"\n />\n </svg>\n)\n\nexport default CloseIcon\n"],"names":["React","width","height","viewBox","fill","fillRule","d"],"mappings":"2GAEkB,IACdA,uBAAKC,MAAM,KAAKC,OAAO,KAAKC,QAAQ,aAChCH,wBACII,KAAK,OACLC,SAAS,UACTC,EAAE"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),l=require("../responsive-props.js"),t=require("../box/box.js"),n=require("../columns/columns.js"),r=require("../button/button.js"),a=require("../icons/alert-icon.js"),o=require("../icons/close-icon.js"),s=require("./alert.module.css.js");exports.Alert=function({id:i,children:u,tone:c,closeLabel:m,onClose:d}){return e.createElement(t.Box,{id:i,role:"alert","aria-live":"polite",borderRadius:"standard",className:[s.default.container,l.getClassNames(s.default,"tone",c)]},e.createElement(n.Columns,{space:"small",alignY:"top"},e.createElement(n.Column,{width:"content"},e.createElement(a.AlertIcon,{tone:c})),e.createElement(n.Column,null,e.createElement(t.Box,{paddingY:"xsmall",paddingRight:null!=d&&null!=m?void 0:"small"},u)),null!=d&&null!=m?e.createElement(n.Column,{width:"content"},e.createElement(r.Button,{variant:"quaternary",size:"small",onClick:d,"aria-label":m,icon:e.createElement(o.CloseIcon,null),style:{"--reactist-btn-hover-fill":"transparent"}})):null))};
|
|
2
|
-
//# sourceMappingURL=alert.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","sources":["../../../src/new-components/alert/alert.tsx"],"sourcesContent":["import * as React from 'react'\nimport { getClassNames } from '../responsive-props'\nimport { Box } from '../box'\nimport { Button } from '../button'\nimport { Columns, Column } from '../columns'\n\nimport { AlertIcon } from '../icons/alert-icon'\nimport { CloseIcon } from '../icons/close-icon'\n\nimport styles from './alert.module.css'\n\nimport type { AlertTone } from '../common-types'\n\ntype AllOrNone<T> = T | { [K in keyof T]?: never }\n\ntype AlertCloseProps = AllOrNone<{\n closeLabel: string\n onClose: () => void\n}>\n\ntype AlertProps = {\n id?: string\n children: React.ReactNode\n tone: AlertTone\n} & AlertCloseProps\n\nfunction Alert({ id, children, tone, closeLabel, onClose }: AlertProps) {\n return (\n <Box\n id={id}\n role=\"alert\"\n aria-live=\"polite\"\n borderRadius=\"standard\"\n className={[styles.container, getClassNames(styles, 'tone', tone)]}\n >\n <Columns space=\"small\" alignY=\"top\">\n <Column width=\"content\">\n <AlertIcon tone={tone} />\n </Column>\n <Column>\n <Box\n paddingY=\"xsmall\"\n paddingRight={onClose != null && closeLabel != null ? undefined : 'small'}\n >\n {children}\n </Box>\n </Column>\n {onClose != null && closeLabel != null ? (\n <Column width=\"content\">\n <Button\n variant=\"quaternary\"\n size=\"small\"\n onClick={onClose}\n aria-label={closeLabel}\n icon={<CloseIcon />}\n style={{\n // @ts-expect-error not sure how to make TypeScript understand custom CSS properties\n '--reactist-btn-hover-fill': 'transparent',\n }}\n />\n </Column>\n ) : null}\n </Columns>\n </Box>\n )\n}\n\nexport { Alert }\nexport type { AlertProps }\n"],"names":["id","children","tone","closeLabel","onClose","React","Box","role","borderRadius","className","styles","container","getClassNames","Columns","space","alignY","Column","width","AlertIcon","paddingY","paddingRight","undefined","Button","variant","size","onClick","icon","CloseIcon","style","--reactist-btn-hover-fill"],"mappings":"uVA0BA,UAAeA,GAAEA,EAAFC,SAAMA,EAANC,KAAgBA,EAAhBC,WAAsBA,EAAtBC,QAAkCA,IAC7C,OACIC,gBAACC,OACGN,GAAIA,EACJO,KAAK,oBACK,SACVC,aAAa,WACbC,UAAW,CAACC,UAAOC,UAAWC,gBAAcF,UAAQ,OAAQR,KAE5DG,gBAACQ,WAAQC,MAAM,QAAQC,OAAO,OAC1BV,gBAACW,UAAOC,MAAM,WACVZ,gBAACa,aAAUhB,KAAMA,KAErBG,gBAACW,cACGX,gBAACC,OACGa,SAAS,SACTC,aAAyB,MAAXhB,GAAiC,MAAdD,OAAqBkB,EAAY,SAEjEpB,IAGG,MAAXG,GAAiC,MAAdD,EAChBE,gBAACW,UAAOC,MAAM,WACVZ,gBAACiB,UACGC,QAAQ,aACRC,KAAK,QACLC,QAASrB,eACGD,EACZuB,KAAMrB,gBAACsB,kBACPC,MAAO,CAEHC,4BAA6B,kBAIzC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),a=require("react"),r=require("../responsive-props.js"),t=require("../box/box.js"),s=require("./utils.js"),l=require("./avatar.module.css.js");const i=["user","avatarUrl","size","className","colorList","exceptionallySetClassName"],o=["#fcc652","#e9952c","#e16b2d","#d84b40","#e8435a","#e5198a","#ad3889","#86389c","#a8a8a8","#98be2f","#5d9d50","#5f9f85","#5bbcb6","#32a3bf","#2bafeb","#2d88c3","#3863cc","#5e5e5e"];function c(c){let{user:u,avatarUrl:n,size:b="l",className:d,colorList:m=o,exceptionallySetClassName:p}=c,f=e.objectWithoutProperties(c,i);const v=s.getInitials(u.name)||s.getInitials(u.email),x=b||"l",g=n?{backgroundImage:"url("+n+")",textIndent:"-9999px"}:{backgroundColor:m[s.emailToIndex(u.email,m.length)]},j=r.getClassNames(l.default,"size",x);return a.createElement(t.Box,e.objectSpread2({className:[d,l.default.avatar,j,p],style:g},f),v)}c.displayName="Avatar",exports.Avatar=c;
|
|
2
|
-
//# sourceMappingURL=avatar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","sources":["../../../src/new-components/avatar/avatar.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { getInitials, emailToIndex } from './utils'\n\nimport { getClassNames, ResponsiveProp } from '../responsive-props'\nimport styles from './avatar.module.css'\nimport { Box } from '../box'\n\nconst AVATAR_COLORS = [\n '#fcc652',\n '#e9952c',\n '#e16b2d',\n '#d84b40',\n '#e8435a',\n '#e5198a',\n '#ad3889',\n '#86389c',\n '#a8a8a8',\n '#98be2f',\n '#5d9d50',\n '#5f9f85',\n '#5bbcb6',\n '#32a3bf',\n '#2bafeb',\n '#2d88c3',\n '#3863cc',\n '#5e5e5e',\n]\n\ntype AvatarSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl'\n\ntype Props = {\n /** @deprecated Please use `exceptionallySetClassName` */\n className?: string\n exceptionallySetClassName?: string\n /** @deprecated */\n colorList?: string[]\n size?: ResponsiveProp<AvatarSize>\n avatarUrl?: string\n user: { name?: string; email: string }\n}\n\nfunction Avatar({\n user,\n avatarUrl,\n size = 'l',\n className,\n colorList = AVATAR_COLORS,\n exceptionallySetClassName,\n ...props\n}: Props) {\n const userInitials = getInitials(user.name) || getInitials(user.email)\n const avatarSize = size ? size : 'l'\n\n const style = avatarUrl\n ? {\n backgroundImage: `url(${avatarUrl})`,\n textIndent: '-9999px', // hide the initials\n }\n : {\n backgroundColor: colorList[emailToIndex(user.email, colorList.length)],\n }\n\n const sizeClassName = getClassNames(styles, 'size', avatarSize)\n\n return (\n <Box\n className={[className, styles.avatar, sizeClassName, exceptionallySetClassName]}\n style={style}\n {...props}\n >\n {userInitials}\n </Box>\n )\n}\nAvatar.displayName = 'Avatar'\n\nexport { Avatar }\n"],"names":["AVATAR_COLORS","Avatar","user","avatarUrl","size","className","colorList","exceptionallySetClassName","props","userInitials","getInitials","name","email","avatarSize","style","backgroundImage","textIndent","backgroundColor","emailToIndex","length","sizeClassName","getClassNames","styles","React","Box","avatar","displayName"],"mappings":"uWAQMA,EAAgB,CAClB,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,WAgBJ,SAASC,SAAOC,KACZA,EADYC,UAEZA,EAFYC,KAGZA,EAAO,IAHKC,UAIZA,EAJYC,UAKZA,EAAYN,EALAO,0BAMZA,KACGC,iCAEH,MAAMC,EAAeC,cAAYR,EAAKS,OAASD,cAAYR,EAAKU,OAC1DC,EAAaT,GAAc,IAE3BU,EAAQX,EACR,CACIY,uBAAwBZ,MACxBa,WAAY,WAEhB,CACIC,gBAAiBX,EAAUY,eAAahB,EAAKU,MAAON,EAAUa,UAGlEC,EAAgBC,gBAAcC,UAAQ,OAAQT,GAEpD,OACIU,gBAACC,uBACGnB,UAAW,CAACA,EAAWiB,UAAOG,OAAQL,EAAeb,GACrDO,MAAOA,GACHN,GAEHC,GAIbR,EAAOyB,YAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/new-components/avatar/utils.ts"],"sourcesContent":["function getInitials(name?: string) {\n if (!name) {\n return ''\n }\n\n const seed = name.trim().split(' ')\n const firstInitial = seed[0]\n const lastInitial = seed[seed.length - 1]\n\n let initials = firstInitial?.[0]\n if (\n firstInitial != null &&\n lastInitial != null &&\n initials != null &&\n // Better readable this way.\n // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with\n firstInitial[0] !== lastInitial[0]\n ) {\n initials += lastInitial[0]\n }\n return initials?.toUpperCase()\n}\n\nfunction emailToIndex(email: string, maxIndex: number) {\n const seed = email.split('@')[0]\n const hash = seed ? seed.charCodeAt(0) + seed.charCodeAt(seed.length - 1) || 0 : 0\n return hash % maxIndex\n}\n\nexport { getInitials, emailToIndex }\n"],"names":["email","maxIndex","seed","split","charCodeAt","length","name","trim","firstInitial","lastInitial","initials","_initials","toUpperCase"],"mappings":"yFAuBA,SAAsBA,EAAeC,GACjC,MAAMC,EAAOF,EAAMG,MAAM,KAAK,GAE9B,OADaD,GAAOA,EAAKE,WAAW,GAAKF,EAAKE,WAAWF,EAAKG,OAAS,IAAU,GACnEJ,uBA1BlB,SAAqBK,SACjB,IAAKA,EACD,MAAO,GAGX,MAAMJ,EAAOI,EAAKC,OAAOJ,MAAM,KACzBK,EAAeN,EAAK,GACpBO,EAAcP,EAAKA,EAAKG,OAAS,GAEvC,IAAIK,QAAWF,SAAAA,EAAe,GAW9B,OAToB,MAAhBA,GACe,MAAfC,GACY,MAAZC,GAGAF,EAAa,KAAOC,EAAY,KAEhCC,GAAYD,EAAY,aAErBC,UAAAC,EAAUC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),t=require("../box/box.js"),a=require("./badge.module.css.js");const l=["tone","label"];exports.Badge=function(o){let{tone:s,label:u}=o,i=e.objectWithoutProperties(o,l);return r.createElement(t.Box,e.objectSpread2(e.objectSpread2({},i),{},{as:"span",display:"inline",className:[a.default.badge,a.default["badge-"+s]]}),u)};
|
|
2
|
-
//# sourceMappingURL=badge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"badge.js","sources":["../../../src/new-components/badge/badge.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Box } from '../box'\n\nimport styles from './badge.module.css'\n\ntype BadgeTone = 'info' | 'positive' | 'promote' | 'attention'\n\ntype BadgeProps = {\n /**\n * The label to show inside the badge element.\n */\n label: string\n /**\n * The tone of the badge.\n */\n tone: BadgeTone\n}\n\nfunction Badge({ tone, label, ...props }: BadgeProps) {\n return (\n <Box\n {...props}\n as=\"span\" // It enables putting the badge inside a button (https://stackoverflow.com/a/12982334)\n display=\"inline\"\n className={[styles.badge, styles[`badge-${tone}`]]}\n >\n {label}\n </Box>\n )\n}\n\nexport { Badge }\nexport type { BadgeProps }\n"],"names":["tone","label","props","React","Box","as","display","className","styles","badge"],"mappings":"yPAmBA,gBAAeA,KAAEA,EAAFC,MAAQA,KAAUC,iCAC7B,OACIC,gBAACC,yCACOF,OACJG,GAAG,OACHC,QAAQ,SACRC,UAAW,CAACC,UAAOC,MAAOD,mBAAgBR,MAEzCC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),l=require("../box/box.js"),r=require("../columns/columns.js"),a=require("../common-helpers.js"),i=require("./banner.module.css.js");const n=["id","tone","icon","title","description","action"];exports.Banner=t.forwardRef((function(o,d){let{id:s,tone:u,icon:c,title:m,description:p,action:b}=o,f=e.objectWithoutProperties(o,n);const x=a.useId(),j=a.useId();return t.createElement(l.Box,e.objectSpread2(e.objectSpread2({},f),{},{ref:d,id:s,role:"status","aria-labelledby":x,"aria-describedby":j,"aria-live":"polite",tabIndex:0,borderRadius:"standard",className:[i.default.banner,i.default["banner-"+u]]}),t.createElement(r.Columns,{space:"medium",alignY:"center"},t.createElement(r.Column,{width:"content","aria-hidden":!0,style:{lineHeight:0}},c),t.createElement(r.Column,null,t.createElement(l.Box,{paddingY:"xsmall"},t.createElement(l.Box,p?{id:x,className:[i.default.title,i.default["title-"+u]]}:{id:x,className:[i.default.title,i.default["title-without-description"],i.default["title-"+u]]},m),p?t.createElement(l.Box,{id:j,className:[i.default.description,i.default["description-"+u]]},p):null)),b?t.createElement(r.Column,{width:"content"},b):null))}));
|
|
2
|
-
//# sourceMappingURL=banner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"banner.js","sources":["../../../src/new-components/banner/banner.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { Columns, Column } from '../columns'\nimport { useId } from '../common-helpers'\n\nimport styles from './banner.module.css'\n\nexport type BannerTone = 'info' | 'promotion'\n\ntype BannerProps = {\n id?: string\n /**\n * The tone of the Banner. Affects the background color and the outline.\n */\n tone: BannerTone\n /**\n * The icon that should be added inside the Banner.\n */\n icon: React.ReactChild\n /**\n * The title to be displayed at the top of the Banner.\n */\n title: React.ReactNode\n /**\n * An optional description to be displayed inside the Banner.\n */\n description?: React.ReactNode\n /**\n * An optional action to displayed inside the Banner.\n */\n action?: React.ReactChild\n}\n\nconst Banner = React.forwardRef<HTMLDivElement, BannerProps>(function Banner(\n { id, tone, icon, title, description, action, ...props }: BannerProps,\n ref,\n) {\n const titleId = useId()\n const descriptionId = useId()\n return (\n <Box\n {...props}\n ref={ref}\n id={id}\n role=\"status\"\n aria-labelledby={titleId}\n aria-describedby={descriptionId}\n aria-live=\"polite\"\n tabIndex={0}\n borderRadius=\"standard\"\n className={[styles.banner, styles[`banner-${tone}`]]}\n >\n <Columns space=\"medium\" alignY=\"center\">\n <Column\n width=\"content\"\n aria-hidden\n style={{\n /* Make sure the icon is centered vertically */\n lineHeight: 0,\n }}\n >\n {icon}\n </Column>\n <Column>\n <Box paddingY=\"xsmall\">\n {description ? (\n <Box id={titleId} className={[styles.title, styles[`title-${tone}`]]}>\n {title}\n </Box>\n ) : (\n <Box\n id={titleId}\n className={[\n styles.title,\n // If the banner does not have a description, we need to slightly tweak\n // the styling of the title applying an extra css class\n styles[`title-without-description`],\n styles[`title-${tone}`],\n ]}\n >\n {title}\n </Box>\n )}\n {description ? (\n <Box\n id={descriptionId}\n className={[styles.description, styles[`description-${tone}`]]}\n >\n {description}\n </Box>\n ) : null}\n </Box>\n </Column>\n {action ? <Column width=\"content\">{action}</Column> : null}\n </Columns>\n </Box>\n )\n})\n\nexport { Banner }\nexport type { BannerProps }\n"],"names":["React","ref","id","tone","icon","title","description","action","props","titleId","useId","descriptionId","Box","role","tabIndex","borderRadius","className","styles","banner","Columns","space","alignY","Column","width","style","lineHeight","paddingY"],"mappings":"mWAiCeA,cAA8C,WAEzDC,OADAC,GAAEA,EAAFC,KAAMA,EAANC,KAAYA,EAAZC,MAAkBA,EAAlBC,YAAyBA,EAAzBC,OAAsCA,KAAWC,iCAGjD,MAAMC,EAAUC,UACVC,EAAgBD,UACtB,OACIV,gBAACY,yCACOJ,OACJP,IAAKA,EACLC,GAAIA,EACJW,KAAK,2BACYJ,qBACCE,cACR,SACVG,SAAU,EACVC,aAAa,WACbC,UAAW,CAACC,UAAOC,OAAQD,oBAAiBd,MAE5CH,gBAACmB,WAAQC,MAAM,SAASC,OAAO,UAC3BrB,gBAACsB,UACGC,MAAM,2BAENC,MAAO,CAEHC,WAAY,IAGfrB,GAELJ,gBAACsB,cACGtB,gBAACY,OAAIc,SAAS,UAEN1B,gBAACY,MADJN,GACQJ,GAAIO,EAASO,UAAW,CAACC,UAAOZ,MAAOY,mBAAgBd,MAKxDD,GAAIO,EACJO,UAAW,CACPC,UAAOZ,MAGPY,uCACAA,mBAAgBd,KAVnBE,GAgBRC,EACGN,gBAACY,OACGV,GAAIS,EACJK,UAAW,CAACC,UAAOX,YAAaW,yBAAsBd,KAErDG,GAEL,OAGXC,EAASP,gBAACsB,UAAOC,MAAM,WAAWhB,GAAmB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),t=require("../../utils/polymorphism.js"),n=require("../box/box.js"),a=require("../tooltip/tooltip.js"),o=require("../spinner/spinner.js"),i=require("./base-button.module.css.js");const r=["as","variant","tone","size","shape","disabled","loading","tooltip","onClick","exceptionallySetClassName","children","startIcon","endIcon","icon","width","align"];function s(e){e.preventDefault()}exports.BaseButton=t.polymorphicComponent((function(t,d){let{as:u="div",variant:c,tone:p="normal",size:m="normal",shape:f="normal",disabled:b=!1,loading:h=!1,tooltip:x,onClick:v,exceptionallySetClassName:j,children:B,startIcon:E,endIcon:g,icon:q,width:y="auto",align:S="center"}=t,C=e.objectWithoutProperties(t,r);const I=h||b,N=l.createElement(n.Box,e.objectSpread2(e.objectSpread2({},C),{},{as:u,ref:d,"aria-disabled":I,onClick:I?s:v,width:q?void 0:y,className:[j,i.default.baseButton,i.default["variant-"+c],i.default["tone-"+p],i.default["size-"+m],"rounded"===f?i.default["shape-rounded"]:null,q?i.default.iconButton:null,b?i.default.disabled:null]}),q?h&&l.createElement(o.Spinner,null)||q:l.createElement(l.Fragment,null,E?l.createElement(n.Box,{display:"flex",className:i.default.startIcon,"aria-hidden":!0},h&&!g?l.createElement(o.Spinner,null):E):null,B?l.createElement(n.Box,{as:"span",className:i.default.label,overflow:"hidden",width:"full"===y?"full":void 0,textAlign:"auto"===y?"center":S},B):null,g||h&&!E?l.createElement(n.Box,{display:"flex",className:i.default.endIcon,"aria-hidden":!0},h?l.createElement(o.Spinner,null):g):null)),w=q&&void 0===x?C["aria-label"]:x;return w?l.createElement(a.Tooltip,{content:w},N):N}));
|
|
2
|
-
//# sourceMappingURL=base-button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-button.js","sources":["../../../src/new-components/base-button/base-button.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Tooltip, TooltipProps } from '../tooltip'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { Box } from '../box'\nimport { Spinner } from '../spinner'\nimport styles from './base-button.module.css'\n\nfunction preventDefault(event: React.SyntheticEvent) {\n event.preventDefault()\n}\n\ntype ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'quaternary'\ntype ButtonTone = 'normal' | 'destructive'\ntype ButtonSize = 'small' | 'normal' | 'large'\ntype IconElement = React.ReactChild\n\ntype CommonProps = {\n /**\n * The button's variant.\n */\n variant: ButtonVariant\n\n /**\n * The button's tone.\n * @default 'normal'\n */\n tone?: ButtonTone\n\n /**\n * The button's size.\n * @default 'normal'\n */\n size?: ButtonSize\n\n /**\n * Controls the shape of the button. Specifically, it allows to make it have slightly curved\n * corners (the default) vs. having them fully curved to the point that they are as round as\n * possible. In icon-only buttons this allows to have the button be circular.\n * @default 'normal'\n */\n shape?: 'normal' | 'rounded'\n\n /**\n * Whether the button is disabled or not.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Whether the button is busy/loading.\n *\n * A button in this state is functionally and semantically disabled. Visually is does not look\n * dimmed (as disabled buttons normally do), but it shows a loading spinner instead.\n *\n * @default false\n */\n loading?: boolean\n\n /**\n * A tooltip linked to the button element.\n */\n tooltip?: TooltipProps['content']\n}\n\ntype AlignmentProps = {\n width: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'full'\n align?: 'start' | 'center' | 'end'\n}\n\ntype AutoWidthProps = {\n width?: 'auto'\n align?: never\n}\n\ntype IconButtonProps = {\n icon: IconElement\n 'aria-label': string\n children?: never\n startIcon?: never\n endIcon?: never\n width?: never\n align?: never\n}\n\ntype LabelledButtonProps = {\n children: NonNullable<React.ReactNode>\n startIcon?: IconElement\n endIcon?: IconElement\n icon?: never\n} & (AutoWidthProps | AlignmentProps)\n\nexport type BaseButtonProps = CommonProps & (IconButtonProps | LabelledButtonProps)\n\n/**\n * The component that powers `Button` and `ButtonLink`, where the button styling logic and some\n * common functionality resides. This component is internal to Reactist.\n *\n * @see Button\n * @see ButtonLink\n */\nexport const BaseButton = polymorphicComponent<'div', BaseButtonProps>(function BaseButton(\n {\n as = 'div',\n variant,\n tone = 'normal',\n size = 'normal',\n shape = 'normal',\n disabled = false,\n loading = false,\n tooltip,\n onClick,\n exceptionallySetClassName,\n children,\n startIcon,\n endIcon,\n icon,\n width = 'auto',\n align = 'center',\n ...props\n },\n ref,\n) {\n const isDisabled = loading || disabled\n const buttonElement = (\n <Box\n {...props}\n as={as}\n ref={ref}\n aria-disabled={isDisabled}\n onClick={isDisabled ? preventDefault : onClick}\n width={icon ? undefined : width}\n className={[\n exceptionallySetClassName,\n styles.baseButton,\n styles[`variant-${variant}`],\n styles[`tone-${tone}`],\n styles[`size-${size}`],\n shape === 'rounded' ? styles['shape-rounded'] : null,\n icon ? styles.iconButton : null,\n disabled ? styles.disabled : null,\n ]}\n >\n {icon ? (\n (loading && <Spinner />) || icon\n ) : (\n <>\n {startIcon ? (\n <Box display=\"flex\" className={styles.startIcon} aria-hidden>\n {loading && !endIcon ? <Spinner /> : startIcon}\n </Box>\n ) : null}\n {children ? (\n <Box\n as=\"span\"\n className={styles.label}\n overflow=\"hidden\"\n width={width === 'full' ? 'full' : undefined}\n textAlign={width === 'auto' ? 'center' : align}\n >\n {children}\n </Box>\n ) : null}\n {endIcon || (loading && !startIcon) ? (\n <Box display=\"flex\" className={styles.endIcon} aria-hidden>\n {loading ? <Spinner /> : endIcon}\n </Box>\n ) : null}\n </>\n )}\n </Box>\n )\n\n // If it's an icon-only button, make sure it uses the aria-label as tooltip if no tooltip was provided\n const tooltipContent = icon && tooltip === undefined ? props['aria-label'] : tooltip\n return tooltipContent ? (\n <Tooltip content={tooltipContent}>{buttonElement}</Tooltip>\n ) : (\n buttonElement\n )\n})\n"],"names":["preventDefault","event","polymorphicComponent","ref","as","variant","tone","size","shape","disabled","loading","tooltip","onClick","exceptionallySetClassName","children","startIcon","endIcon","icon","width","align","props","isDisabled","buttonElement","React","Box","undefined","className","styles","baseButton","iconButton","Spinner","display","label","overflow","textAlign","tooltipContent","Tooltip","content"],"mappings":"mfAOA,SAASA,EAAeC,GACpBA,EAAMD,oCA4FgBE,wBAA6C,WAoBnEC,OAnBAC,GACIA,EAAK,MADTC,QAEIA,EAFJC,KAGIA,EAAO,SAHXC,KAIIA,EAAO,SAJXC,MAKIA,EAAQ,SALZC,SAMIA,GAAW,EANfC,QAOIA,GAAU,UACVC,EARJC,QASIA,EATJC,0BAUIA,EAVJC,SAWIA,EAXJC,UAYIA,EAZJC,QAaIA,EAbJC,KAcIA,EAdJC,MAeIA,EAAQ,OAfZC,MAgBIA,EAAQ,YACLC,iCAIP,MAAMC,EAAaX,GAAWD,EACxBa,EACFC,gBAACC,yCACOJ,OACJhB,GAAIA,EACJD,IAAKA,kBACUkB,EACfT,QAASS,EAAarB,EAAiBY,EACvCM,MAAOD,OAAOQ,EAAYP,EAC1BQ,UAAW,CACPb,EACAc,UAAOC,WACPD,qBAAkBtB,GAClBsB,kBAAerB,GACfqB,kBAAepB,GACL,YAAVC,EAAsBmB,UAAO,iBAAmB,KAChDV,EAAOU,UAAOE,WAAa,KAC3BpB,EAAWkB,UAAOlB,SAAW,QAGhCQ,EACIP,GAAWa,gBAACO,iBAAeb,EAE5BM,gCACKR,EACGQ,gBAACC,OAAIO,QAAQ,OAAOL,UAAWC,UAAOZ,4BACjCL,IAAYM,EAAUO,gBAACO,gBAAaf,GAEzC,KACHD,EACGS,gBAACC,OACGpB,GAAG,OACHsB,UAAWC,UAAOK,MAClBC,SAAS,SACTf,MAAiB,SAAVA,EAAmB,YAASO,EACnCS,UAAqB,SAAVhB,EAAmB,SAAWC,GAExCL,GAEL,KACHE,GAAYN,IAAYK,EACrBQ,gBAACC,OAAIO,QAAQ,OAAOL,UAAWC,UAAOX,0BACjCN,EAAUa,gBAACO,gBAAad,GAE7B,OAOdmB,EAAiBlB,QAAoBQ,IAAZd,EAAwBS,EAAM,cAAgBT,EAC7E,OAAOwB,EACHZ,gBAACa,WAAQC,QAASF,GAAiBb,GAEnCA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),a=require("../box/box.js"),r=require("../stack/stack.js"),t=require("../spinner/spinner.js"),n=require("../common-helpers.js"),i=require("../text/text.js"),s=require("./base-field.module.css.js");function d(a){return l.createElement(i.Text,e.objectSpread2({as:"p",tone:"secondary",size:"copy"},a))}function o(a){return l.createElement("svg",e.objectSpread2({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 2.5C4.96243 2.5 2.5 4.96243 2.5 8C2.5 11.0376 4.96243 13.5 8 13.5C11.0376 13.5 13.5 11.0376 13.5 8C13.5 4.96243 11.0376 2.5 8 2.5ZM1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8ZM8.66667 10.3333C8.66667 10.7015 8.36819 11 8 11C7.63181 11 7.33333 10.7015 7.33333 10.3333C7.33333 9.96514 7.63181 9.66667 8 9.66667C8.36819 9.66667 8.66667 9.96514 8.66667 10.3333ZM8.65766 5.65766C8.65766 5.29445 8.36322 5 8 5C7.99087 5.00008 7.98631 5.00013 7.98175 5.00025C7.97719 5.00038 7.97263 5.00059 7.96352 5.00101C7.60086 5.02116 7.3232 5.33149 7.34335 5.69415L7.50077 8.52774C7.53575 9.15742 8.46425 9.15742 8.49923 8.52774L8.65665 5.69415C8.65707 5.68503 8.65728 5.68047 8.65741 5.67591C8.65754 5.67135 8.65758 5.66679 8.65766 5.65766Z",fill:"currentColor"}))}function c({id:e,children:r,tone:n}){return l.createElement(i.Text,{as:"p",tone:"error"===n?"danger":"success"===n?"positive":"normal",size:"copy",id:e},l.createElement(a.Box,{as:"span",marginRight:"xsmall",display:"inlineFlex",className:s.default.messageIcon},"loading"===n?l.createElement(t.Spinner,{size:16}):l.createElement(o,{"aria-hidden":!0})),r)}exports.BaseField=function({variant:e="default",label:t,secondaryLabel:o,auxiliaryLabel:u,hint:m,message:p,tone:x="neutral",className:b,children:f,maxWidth:C,hidden:E,"aria-describedby":h,id:y}){const g=n.useId(y),j=n.useId(),v=n.useId(),B={id:g,"aria-describedby":null!=h?h:[p?v:null,j].filter(Boolean).join(" "),"aria-invalid":"error"===x||void 0};return l.createElement(r.Stack,{space:"small",hidden:E},l.createElement(a.Box,{className:[b,s.default.container,"error"===x?s.default.error:null,"bordered"===e?s.default.bordered:null],maxWidth:C},t||o||u?l.createElement(a.Box,{as:"span",display:"flex",justifyContent:"spaceBetween",alignItems:"flexEnd"},l.createElement(i.Text,{size:"bordered"===e?"caption":"body",as:"label",htmlFor:g},t?l.createElement("span",{className:s.default.primaryLabel},t):null,o?l.createElement("span",{className:s.default.secondaryLabel}," (",o,")"):null),u?l.createElement(a.Box,{className:s.default.auxiliaryLabel,paddingLeft:"small"},u):null):null,f(B)),p?l.createElement(c,{id:v,tone:x},p):null,m?l.createElement(d,{id:j},m):null)},exports.FieldHint=d,exports.FieldMessage=c;
|
|
2
|
-
//# sourceMappingURL=base-field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-field.js","sources":["../../../src/new-components/base-field/base-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box, BoxProps } from '../box'\nimport { useId } from '../common-helpers'\nimport { Text } from '../text'\nimport styles from './base-field.module.css'\nimport { Stack } from '../stack'\n\nimport type { WithEnhancedClassName } from '../common-types'\nimport { Spinner } from '../spinner'\n\ntype FieldHintProps = {\n id: string\n children: React.ReactNode\n}\n\nfunction FieldHint(props: FieldHintProps) {\n return <Text as=\"p\" tone=\"secondary\" size=\"copy\" {...props} />\n}\n\nfunction MessageIcon(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M8 2.5C4.96243 2.5 2.5 4.96243 2.5 8C2.5 11.0376 4.96243 13.5 8 13.5C11.0376 13.5 13.5 11.0376 13.5 8C13.5 4.96243 11.0376 2.5 8 2.5ZM1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8ZM8.66667 10.3333C8.66667 10.7015 8.36819 11 8 11C7.63181 11 7.33333 10.7015 7.33333 10.3333C7.33333 9.96514 7.63181 9.66667 8 9.66667C8.36819 9.66667 8.66667 9.96514 8.66667 10.3333ZM8.65766 5.65766C8.65766 5.29445 8.36322 5 8 5C7.99087 5.00008 7.98631 5.00013 7.98175 5.00025C7.97719 5.00038 7.97263 5.00059 7.96352 5.00101C7.60086 5.02116 7.3232 5.33149 7.34335 5.69415L7.50077 8.52774C7.53575 9.15742 8.46425 9.15742 8.49923 8.52774L8.65665 5.69415C8.65707 5.68503 8.65728 5.68047 8.65741 5.67591C8.65754 5.67135 8.65758 5.66679 8.65766 5.65766Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\ntype FieldTone = 'neutral' | 'success' | 'error' | 'loading'\n\ntype FieldMessageProps = FieldHintProps & {\n tone: FieldTone\n}\n\nfunction FieldMessage({ id, children, tone }: FieldMessageProps) {\n const textTone = tone === 'error' ? 'danger' : tone === 'success' ? 'positive' : 'normal'\n return (\n <Text as=\"p\" tone={textTone} size=\"copy\" id={id}>\n <Box as=\"span\" marginRight=\"xsmall\" display=\"inlineFlex\" className={styles.messageIcon}>\n {tone === 'loading' ? <Spinner size={16} /> : <MessageIcon aria-hidden />}\n </Box>\n {children}\n </Text>\n )\n}\n\n//\n// BaseField\n//\n\ntype ChildrenRenderProps = {\n id: string\n 'aria-describedby'?: string\n 'aria-invalid'?: true\n}\n\ntype HtmlInputProps<T extends HTMLElement> = React.DetailedHTMLProps<\n React.InputHTMLAttributes<T>,\n T\n>\n\ntype BaseFieldVariant = 'default' | 'bordered'\ntype BaseFieldVariantProps = {\n /**\n * Provides alternative visual layouts or modes that the field can be rendered in.\n *\n * Namely, there are two variants supported:\n *\n * - the default one\n * - a \"bordered\" variant, where the border of the field surrounds also the labels, instead\n * of just surrounding the actual field element\n *\n * In both cases, the message and description texts for the field lie outside the bordered\n * area.\n */\n variant?: BaseFieldVariant\n}\n\ntype BaseFieldProps = WithEnhancedClassName &\n Pick<HtmlInputProps<HTMLInputElement>, 'id' | 'hidden' | 'aria-describedby'> & {\n /**\n * The main label for this field element.\n *\n * This prop is not optional. Consumers of field components must be explicit about not\n * wanting a label by passing `label=\"\"` or `label={null}`. In those situations, consumers\n * should make sure that fields are properly labelled semantically by other means (e.g using\n * `aria-labelledby`, or rendering a `<label />` element referencing the field by id).\n *\n * Avoid providing interactive elements in the label. Prefer `auxiliaryLabel` for that.\n *\n * @see BaseFieldProps['secondaryLabel']\n * @see BaseFieldProps['auxiliaryLabel']\n */\n label: React.ReactNode\n\n /**\n * An optional secondary label for this field element. It is combined with the `label` to\n * form the field's entire accessible name (unless the field label is overriden by using\n * `aria-label` or `aria-labelledby`).\n *\n * Avoid providing interactive elements in the label. Prefer `auxiliaryLabel` for that.\n *\n * @see BaseFieldProps['label']\n * @see BaseFieldProps['auxiliaryLabel']\n */\n secondaryLabel?: React.ReactNode\n\n /**\n * An optional extra element to be placed to the right of the main and secondary labels.\n *\n * This extra element is not included in the accessible name of the field element. Its only\n * purpose is either visual, or functional (if you include interactive elements in it).\n *\n * @see BaseFieldProps['label']\n * @see BaseFieldProps['secondaryLabel']\n */\n auxiliaryLabel?: React.ReactNode\n\n /**\n * A message associated with the field. It is rendered below the field, and with an\n * appearance that conveys the tone of the field (e.g. coloured red for errors, green for\n * success, etc).\n *\n * The message element is associated to the field via the `aria-describedby` attribute. If a\n * `hint` is provided, both the hint and the message are associated as the field accessible\n * description.\n *\n * In the future, when `aria-errormessage` gets better user agent support, we should use it\n * to associate the filed with a message when tone is `\"error\"`.\n *\n * @see BaseFieldProps['tone']\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-errormessage\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-invalid\n */\n message?: React.ReactNode\n\n /**\n * The tone with which the message, if any, is presented.\n *\n * If the tone is `\"error\"`, the field border turns red, and the message, if any, is also\n * red.\n *\n * When the tone is `\"loading\"`, it is recommended that you also disable the field. However,\n * this is not enforced by the component. It is only a recommendation.\n *\n * @see BaseFieldProps['message']\n * @see BaseFieldProps['hint']\n */\n tone?: FieldTone\n\n /**\n * A hint or help-like content associated as the accessible description of the field. It is\n * generally rendered below it, and with a visual style that reduces its prominence (i.e.\n * as secondary text).\n *\n * It sets the `aria-describedby` attribute pointing to the element that holds the hint\n * content.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby\n */\n hint?: React.ReactNode\n\n /**\n * The maximum width that the input field can expand to.\n */\n maxWidth?: BoxProps['maxWidth']\n\n /**\n * Used internally by components composed using `BaseField`. It is not exposed as part of\n * the public props of such components.\n */\n children: (props: ChildrenRenderProps) => React.ReactNode\n }\n\ntype FieldComponentProps<T extends HTMLElement> = Omit<\n BaseFieldProps,\n 'children' | 'className' | 'variant'\n> &\n Omit<HtmlInputProps<T>, 'className' | 'style'>\n\nfunction BaseField({\n variant = 'default',\n label,\n secondaryLabel,\n auxiliaryLabel,\n hint,\n message,\n tone = 'neutral',\n className,\n children,\n maxWidth,\n hidden,\n 'aria-describedby': originalAriaDescribedBy,\n id: originalId,\n}: BaseFieldProps & BaseFieldVariantProps & WithEnhancedClassName) {\n const id = useId(originalId)\n const hintId = useId()\n const messageId = useId()\n\n const ariaDescribedBy =\n originalAriaDescribedBy ?? [message ? messageId : null, hintId].filter(Boolean).join(' ')\n\n const childrenProps: ChildrenRenderProps = {\n id,\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': tone === 'error' ? true : undefined,\n }\n\n return (\n <Stack space=\"small\" hidden={hidden}>\n <Box\n className={[\n className,\n styles.container,\n tone === 'error' ? styles.error : null,\n variant === 'bordered' ? styles.bordered : null,\n ]}\n maxWidth={maxWidth}\n >\n {label || secondaryLabel || auxiliaryLabel ? (\n <Box\n as=\"span\"\n display=\"flex\"\n justifyContent=\"spaceBetween\"\n alignItems=\"flexEnd\"\n >\n <Text\n size={variant === 'bordered' ? 'caption' : 'body'}\n as=\"label\"\n htmlFor={id}\n >\n {label ? <span className={styles.primaryLabel}>{label}</span> : null}\n {secondaryLabel ? (\n <span className={styles.secondaryLabel}>\n ({secondaryLabel})\n </span>\n ) : null}\n </Text>\n {auxiliaryLabel ? (\n <Box className={styles.auxiliaryLabel} paddingLeft=\"small\">\n {auxiliaryLabel}\n </Box>\n ) : null}\n </Box>\n ) : null}\n {children(childrenProps)}\n </Box>\n {message ? (\n <FieldMessage id={messageId} tone={tone}>\n {message}\n </FieldMessage>\n ) : null}\n {hint ? <FieldHint id={hintId}>{hint}</FieldHint> : null}\n </Stack>\n )\n}\n\nexport { BaseField, FieldHint, FieldMessage }\nexport type { BaseFieldVariant, BaseFieldVariantProps, FieldComponentProps }\n"],"names":["FieldHint","props","React","Text","as","tone","size","MessageIcon","width","height","viewBox","fill","xmlns","fillRule","clipRule","d","FieldMessage","id","children","Box","marginRight","display","className","styles","messageIcon","Spinner","variant","label","secondaryLabel","auxiliaryLabel","hint","message","maxWidth","hidden","aria-describedby","originalAriaDescribedBy","originalId","useId","hintId","messageId","childrenProps","filter","Boolean","join","aria-invalid","undefined","Stack","space","container","error","bordered","justifyContent","alignItems","htmlFor","primaryLabel","paddingLeft"],"mappings":"wVAeA,SAASA,EAAUC,GACf,OAAOC,gBAACC,wBAAKC,GAAG,IAAIC,KAAK,YAAYC,KAAK,QAAWL,IAGzD,SAASM,EAAYN,GACjB,OACIC,uCACIM,MAAM,KACNC,OAAO,KACPC,QAAQ,YACRC,KAAK,OACLC,MAAM,8BACFX,GAEJC,wBACIW,SAAS,UACTC,SAAS,UACTC,EAAE,izBACFJ,KAAK,kBAYrB,SAASK,GAAaC,GAAEA,EAAFC,SAAMA,EAANb,KAAgBA,IAElC,OACIH,gBAACC,QAAKC,GAAG,IAAIC,KAFS,UAATA,EAAmB,SAAoB,YAATA,EAAqB,WAAa,SAEhDC,KAAK,OAAOW,GAAIA,GACzCf,gBAACiB,OAAIf,GAAG,OAAOgB,YAAY,SAASC,QAAQ,aAAaC,UAAWC,UAAOC,aAC7D,YAATnB,EAAqBH,gBAACuB,WAAQnB,KAAM,KAASJ,gBAACK,uBAElDW,qBA2Ib,UAAmBQ,QACfA,EAAU,UADKC,MAEfA,EAFeC,eAGfA,EAHeC,eAIfA,EAJeC,KAKfA,EALeC,QAMfA,EANe1B,KAOfA,EAAO,UAPQiB,UAQfA,EAReJ,SASfA,EATec,SAUfA,EAVeC,OAWfA,EACAC,mBAAoBC,EACpBlB,GAAImB,IAEJ,MAAMnB,EAAKoB,QAAMD,GACXE,EAASD,UACTE,EAAYF,UAKZG,EAAqC,CACvCvB,GAAAA,EACAiB,yBAJAC,EAAAA,EAA2B,CAACJ,EAAUQ,EAAY,KAAMD,GAAQG,OAAOC,SAASC,KAAK,KAKrFC,eAAyB,UAATvC,QAA0BwC,GAG9C,OACI3C,gBAAC4C,SAAMC,MAAM,QAAQd,OAAQA,GACzB/B,gBAACiB,OACGG,UAAW,CACPA,EACAC,UAAOyB,UACE,UAAT3C,EAAmBkB,UAAO0B,MAAQ,KACtB,aAAZvB,EAAyBH,UAAO2B,SAAW,MAE/ClB,SAAUA,GAETL,GAASC,GAAkBC,EACxB3B,gBAACiB,OACGf,GAAG,OACHiB,QAAQ,OACR8B,eAAe,eACfC,WAAW,WAEXlD,gBAACC,QACGG,KAAkB,aAAZoB,EAAyB,UAAY,OAC3CtB,GAAG,QACHiD,QAASpC,GAERU,EAAQzB,wBAAMoB,UAAWC,UAAO+B,cAAe3B,GAAgB,KAC/DC,EACG1B,wBAAMoB,UAAWC,UAAOK,qBACZA,OAEZ,MAEPC,EACG3B,gBAACiB,OAAIG,UAAWC,UAAOM,eAAgB0B,YAAY,SAC9C1B,GAEL,MAER,KACHX,EAASsB,IAEbT,EACG7B,gBAACc,GAAaC,GAAIsB,EAAWlC,KAAMA,GAC9B0B,GAEL,KACHD,EAAO5B,gBAACF,GAAUiB,GAAIqB,GAASR,GAAoB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"box.js","sources":["../../../src/new-components/box/box.tsx"],"sourcesContent":["import * as React from 'react'\nimport classNames from 'classnames'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { getClassNames } from '../responsive-props'\n\nimport type { ResponsiveProp } from '../responsive-props'\nimport type {\n DividerWeight,\n Space,\n SpaceWithNegatives,\n WithEnhancedClassName,\n} from '../common-types'\n\nimport styles from './box.module.css'\nimport paddingStyles from './padding.module.css'\nimport marginStyles from './margin.module.css'\nimport widthStyles from './width.module.css'\nimport gapStyles from './gap.module.css'\n\ninterface BoxPaddingProps {\n padding?: ResponsiveProp<Space>\n paddingX?: ResponsiveProp<Space>\n paddingY?: ResponsiveProp<Space>\n paddingTop?: ResponsiveProp<Space>\n paddingRight?: ResponsiveProp<Space>\n paddingBottom?: ResponsiveProp<Space>\n paddingLeft?: ResponsiveProp<Space>\n}\n\ninterface BoxMarginProps {\n margin?: ResponsiveProp<SpaceWithNegatives>\n marginX?: ResponsiveProp<SpaceWithNegatives>\n marginY?: ResponsiveProp<SpaceWithNegatives>\n marginTop?: ResponsiveProp<SpaceWithNegatives>\n marginRight?: ResponsiveProp<SpaceWithNegatives>\n marginBottom?: ResponsiveProp<SpaceWithNegatives>\n marginLeft?: ResponsiveProp<SpaceWithNegatives>\n}\n\ntype BoxDisplay = 'block' | 'flex' | 'inline' | 'inlineBlock' | 'inlineFlex' | 'none'\ntype BoxFlexDirection = 'column' | 'row'\ntype BoxFlexWrap = 'nowrap' | 'wrap'\ntype BoxAlignItems = 'center' | 'flexEnd' | 'flexStart' | 'baseline'\ntype BoxJustifyContent =\n | 'center'\n | 'flexEnd'\n | 'flexStart'\n | 'spaceAround'\n | 'spaceBetween'\n | 'spaceEvenly'\ntype BoxAlignSelf = 'flexStart' | 'flexEnd' | 'center' | 'baseline' | 'stretch'\ntype BoxOverflow = 'hidden' | 'auto' | 'visible' | 'scroll'\n\ntype BoxMaxMinWidth = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'\ntype BoxMinWidth = 0 | BoxMaxMinWidth\ntype BoxMaxWidth = BoxMaxMinWidth | 'full'\ntype BoxWidth = 0 | BoxMaxMinWidth | 'full' | 'auto' | 'maxContent' | 'minContent' | 'fitContent'\ntype BoxBackground = 'default' | 'aside' | 'highlight' | 'selected' | 'toast'\ntype BoxBorderRadius = 'standard' | 'none' | 'full'\n\ninterface BorderProps {\n borderRadius?: BoxBorderRadius\n border?: DividerWeight\n}\n\ninterface ReusableBoxProps extends BorderProps, BoxPaddingProps {\n minWidth?: BoxMinWidth\n maxWidth?: BoxMaxWidth\n width?: BoxWidth\n background?: BoxBackground\n flexGrow?: 0 | 1\n flexShrink?: 0\n}\n\ntype BoxPosition = 'absolute' | 'fixed' | 'relative' | 'static' | 'sticky'\ntype BoxTextAlign = 'start' | 'center' | 'end' | 'justify'\n\ninterface BoxProps extends WithEnhancedClassName, ReusableBoxProps, BoxMarginProps {\n position?: ResponsiveProp<BoxPosition>\n display?: ResponsiveProp<BoxDisplay>\n flexDirection?: ResponsiveProp<BoxFlexDirection>\n flexWrap?: BoxFlexWrap\n gap?: ResponsiveProp<Space | 'none'>\n alignItems?: ResponsiveProp<BoxAlignItems>\n alignSelf?: ResponsiveProp<BoxAlignSelf>\n justifyContent?: ResponsiveProp<BoxJustifyContent>\n overflow?: BoxOverflow\n height?: 'full'\n textAlign?: ResponsiveProp<BoxTextAlign>\n}\n\nconst Box = polymorphicComponent<'div', BoxProps, 'keepClassName'>(function Box(\n {\n as: component = 'div',\n position = 'static',\n display,\n flexDirection = 'row',\n flexWrap,\n flexGrow,\n flexShrink,\n gap,\n alignItems,\n justifyContent,\n alignSelf,\n overflow,\n width,\n height,\n background,\n border,\n borderRadius,\n minWidth,\n maxWidth,\n textAlign,\n padding,\n paddingY,\n paddingX,\n paddingTop,\n paddingRight,\n paddingBottom,\n paddingLeft,\n margin,\n marginY,\n marginX,\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n className,\n children,\n ...props\n },\n ref,\n) {\n const resolvedPaddingTop = paddingTop ?? paddingY ?? padding\n const resolvedPaddingRight = paddingRight ?? paddingX ?? padding\n const resolvedPaddingBottom = paddingBottom ?? paddingY ?? padding\n const resolvedPaddingLeft = paddingLeft ?? paddingX ?? padding\n\n const resolvedMarginTop = marginTop ?? marginY ?? margin\n const resolvedMarginRight = marginRight ?? marginX ?? margin\n const resolvedMarginBottom = marginBottom ?? marginY ?? margin\n const resolvedMarginLeft = marginLeft ?? marginX ?? margin\n\n const omitFlex =\n !display || (typeof display === 'string' && display !== 'flex' && display !== 'inlineFlex')\n\n return React.createElement(\n component,\n {\n ...props,\n className:\n classNames(\n className,\n styles.box,\n display ? getClassNames(styles, 'display', display) : null,\n position !== 'static' ? getClassNames(styles, 'position', position) : null,\n minWidth != null\n ? getClassNames(widthStyles, 'minWidth', String(minWidth))\n : null,\n getClassNames(widthStyles, 'maxWidth', maxWidth),\n getClassNames(styles, 'textAlign', textAlign),\n // padding\n getClassNames(paddingStyles, 'paddingTop', resolvedPaddingTop),\n getClassNames(paddingStyles, 'paddingRight', resolvedPaddingRight),\n getClassNames(paddingStyles, 'paddingBottom', resolvedPaddingBottom),\n getClassNames(paddingStyles, 'paddingLeft', resolvedPaddingLeft),\n // margin\n getClassNames(marginStyles, 'marginTop', resolvedMarginTop),\n getClassNames(marginStyles, 'marginRight', resolvedMarginRight),\n getClassNames(marginStyles, 'marginBottom', resolvedMarginBottom),\n getClassNames(marginStyles, 'marginLeft', resolvedMarginLeft),\n // flex props\n omitFlex ? null : getClassNames(styles, 'flexDirection', flexDirection),\n omitFlex ? null : getClassNames(styles, 'flexWrap', flexWrap),\n omitFlex ? null : getClassNames(styles, 'alignItems', alignItems),\n omitFlex ? null : getClassNames(styles, 'justifyContent', justifyContent),\n alignSelf != null ? getClassNames(styles, 'alignSelf', alignSelf) : null,\n flexShrink != null\n ? getClassNames(styles, 'flexShrink', String(flexShrink))\n : null,\n flexGrow != null ? getClassNames(styles, 'flexGrow', String(flexGrow)) : null,\n gap ? getClassNames(gapStyles, 'gap', gap) : null,\n // other props\n getClassNames(styles, 'overflow', overflow),\n width != null ? getClassNames(widthStyles, 'width', String(width)) : null,\n getClassNames(styles, 'height', height),\n getClassNames(styles, 'bg', background),\n borderRadius !== 'none'\n ? getClassNames(styles, 'borderRadius', borderRadius)\n : null,\n border !== 'none' ? getClassNames(styles, 'border', border) : null,\n ) || undefined,\n ref,\n },\n children,\n )\n})\n\nexport type {\n BoxProps,\n BoxPaddingProps,\n BoxMarginProps,\n ReusableBoxProps,\n BoxMinWidth,\n BoxMaxWidth,\n BoxDisplay,\n BoxPosition,\n BoxFlexDirection,\n BoxFlexWrap,\n BoxAlignItems,\n BoxJustifyContent,\n BoxOverflow,\n BoxTextAlign,\n BoxBackground,\n BoxBorderRadius,\n}\n\nexport { Box }\n"],"names":["polymorphicComponent","ref","as","component","position","display","flexDirection","flexWrap","flexGrow","flexShrink","gap","alignItems","justifyContent","alignSelf","overflow","width","height","background","border","borderRadius","minWidth","maxWidth","textAlign","padding","paddingY","paddingX","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginY","marginX","marginTop","marginRight","marginBottom","marginLeft","className","children","props","resolvedPaddingTop","resolvedPaddingRight","resolvedPaddingBottom","resolvedPaddingLeft","resolvedMarginTop","resolvedMarginRight","resolvedMarginBottom","resolvedMarginLeft","omitFlex","React","classNames","styles","box","getClassNames","widthStyles","String","paddingStyles","marginStyles","gapStyles","undefined"],"mappings":"i7BA2FYA,wBAAuD,WAwC/DC,2BAtCIC,GAAIC,EAAY,MADpBC,SAEIA,EAAW,SAFfC,QAGIA,EAHJC,cAIIA,EAAgB,MAJpBC,SAKIA,EALJC,SAMIA,EANJC,WAOIA,EAPJC,IAQIA,EARJC,WASIA,EATJC,eAUIA,EAVJC,UAWIA,EAXJC,SAYIA,EAZJC,MAaIA,EAbJC,OAcIA,EAdJC,WAeIA,EAfJC,OAgBIA,EAhBJC,aAiBIA,EAjBJC,SAkBIA,EAlBJC,SAmBIA,EAnBJC,UAoBIA,EApBJC,QAqBIA,EArBJC,SAsBIA,EAtBJC,SAuBIA,EAvBJC,WAwBIA,EAxBJC,aAyBIA,EAzBJC,cA0BIA,EA1BJC,YA2BIA,EA3BJC,OA4BIA,EA5BJC,QA6BIA,EA7BJC,QA8BIA,EA9BJC,UA+BIA,EA/BJC,YAgCIA,EAhCJC,aAiCIA,EAjCJC,WAkCIA,EAlCJC,UAmCIA,GAnCJC,SAoCIA,MACGC,kCAIP,MAAMC,kBAAqBd,EAAAA,EAAcF,KAAYD,EAC/CkB,kBAAuBd,EAAAA,EAAgBF,KAAYF,EACnDmB,kBAAwBd,EAAAA,EAAiBJ,KAAYD,EACrDoB,kBAAsBd,EAAAA,EAAeJ,KAAYF,EAEjDqB,kBAAoBX,EAAAA,EAAaF,KAAWD,EAC5Ce,kBAAsBX,EAAAA,EAAeF,KAAWF,EAChDgB,kBAAuBX,EAAAA,EAAgBJ,KAAWD,EAClDiB,kBAAqBX,EAAAA,EAAcJ,KAAWF,EAE9CkB,IACD3C,GAA+B,iBAAZA,GAAoC,SAAZA,GAAkC,eAAZA,EAEtE,OAAO4C,gBACH9C,qCAEOoC,QACHF,UACIa,EACIb,GACAc,UAAOC,IACP/C,EAAUgD,gBAAcF,UAAQ,UAAW9C,GAAW,KACzC,WAAbD,EAAwBiD,gBAAcF,UAAQ,WAAY/C,GAAY,KAC1D,MAAZgB,EACMiC,gBAAcC,UAAa,WAAYC,OAAOnC,IAC9C,KACNiC,gBAAcC,UAAa,WAAYjC,GACvCgC,gBAAcF,UAAQ,YAAa7B,GAEnC+B,gBAAcG,UAAe,aAAchB,IAC3Ca,gBAAcG,UAAe,eAAgBf,IAC7CY,gBAAcG,UAAe,gBAAiBd,IAC9CW,gBAAcG,UAAe,cAAeb,IAE5CU,gBAAcI,UAAc,YAAab,IACzCS,gBAAcI,UAAc,cAAeZ,IAC3CQ,gBAAcI,UAAc,eAAgBX,IAC5CO,gBAAcI,UAAc,aAAcV,IAE1CC,GAAW,KAAOK,gBAAcF,UAAQ,gBAAiB7C,GACzD0C,GAAW,KAAOK,gBAAcF,UAAQ,WAAY5C,GACpDyC,GAAW,KAAOK,gBAAcF,UAAQ,aAAcxC,GACtDqC,GAAW,KAAOK,gBAAcF,UAAQ,iBAAkBvC,GAC7C,MAAbC,EAAoBwC,gBAAcF,UAAQ,YAAatC,GAAa,KACtD,MAAdJ,EACM4C,gBAAcF,UAAQ,aAAcI,OAAO9C,IAC3C,KACM,MAAZD,EAAmB6C,gBAAcF,UAAQ,WAAYI,OAAO/C,IAAa,KACzEE,EAAM2C,gBAAcK,UAAW,MAAOhD,GAAO,KAE7C2C,gBAAcF,UAAQ,WAAYrC,GACzB,MAATC,EAAgBsC,gBAAcC,UAAa,QAASC,OAAOxC,IAAU,KACrEsC,gBAAcF,UAAQ,SAAUnC,GAChCqC,gBAAcF,UAAQ,KAAMlC,GACX,SAAjBE,EACMkC,gBAAcF,UAAQ,eAAgBhC,GACtC,KACK,SAAXD,EAAoBmC,gBAAcF,UAAQ,SAAUjC,GAAU,YAC7DyC,EACT1D,IAAAA,IAEJqC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),a=require("../base-button/base-button.js");const r=["variant","tone","size","type","disabled","exceptionallySetClassName"];exports.Button=t.forwardRef((function(o,s){let{variant:l,tone:n="normal",size:i="normal",type:u="button",disabled:b=!1,exceptionallySetClassName:p}=o,c=e.objectWithoutProperties(o,r);return t.createElement(a.BaseButton,e.objectSpread2(e.objectSpread2({},c),{},{as:"button",ref:s,variant:l,tone:n,size:i,type:u,disabled:b,exceptionallySetClassName:p}))}));
|
|
2
|
-
//# sourceMappingURL=button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../../src/new-components/button/button.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseButton } from '../base-button'\nimport type { BaseButtonProps } from '../base-button'\n\ntype NativeButtonProps = Omit<\n React.AllHTMLAttributes<HTMLButtonElement>,\n 'aria-disabled' | 'className' | keyof BaseButtonProps\n>\n\nexport type ButtonProps = NativeButtonProps &\n BaseButtonProps & {\n type?: 'button' | 'submit' | 'reset'\n exceptionallySetClassName?: string\n }\n\n/**\n * A semantic button that also looks like a button, and provides all the necessary visual variants.\n * It follows the [WAI-ARIA Button Pattern](https://www.w3.org/TR/wai-aria-practices/#button).\n *\n * @see ButtonLink\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant,\n tone = 'normal',\n size = 'normal',\n type = 'button',\n disabled = false,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n return (\n <BaseButton\n {...props}\n as=\"button\"\n ref={ref}\n variant={variant}\n tone={tone}\n size={size}\n type={type}\n disabled={disabled}\n exceptionallySetClassName={exceptionallySetClassName}\n />\n )\n})\n"],"names":["React","ref","variant","tone","size","type","disabled","exceptionallySetClassName","props","BaseButton","as"],"mappings":"8RAqBsBA,cAAiD,WAUnEC,OATAC,QACIA,EADJC,KAEIA,EAAO,SAFXC,KAGIA,EAAO,SAHXC,KAIIA,EAAO,SAJXC,SAKIA,GAAW,EALfC,0BAMIA,KACGC,iCAIP,OACIR,gBAACS,gDACOD,OACJE,GAAG,SACHT,IAAKA,EACLC,QAASA,EACTC,KAAMA,EACNC,KAAMA,EACNC,KAAMA,EACNC,SAAUA,EACVC,0BAA2BA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),r=require("../../utils/polymorphism.js"),o=require("../base-button/base-button.js");const a=["as","variant","tone","size","exceptionallySetClassName","openInNewTab"];exports.ButtonLink=r.polymorphicComponent((function(r,n){let{as:s="a",variant:i,tone:l="normal",size:p="normal",exceptionallySetClassName:u,openInNewTab:c=!1}=r,b=e.objectWithoutProperties(r,a);return t.createElement(o.BaseButton,e.objectSpread2(e.objectSpread2({},b),{},{as:s,ref:n,variant:i,tone:l,size:p,exceptionallySetClassName:u,target:c?"_blank":void 0,rel:c?"noopener noreferrer":void 0}))}));
|
|
2
|
-
//# sourceMappingURL=button-link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button-link.js","sources":["../../../src/new-components/button-link/button-link.tsx"],"sourcesContent":["import * as React from 'react'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { BaseButton } from '../base-button'\nimport type { BaseButtonProps } from '../base-button'\nimport type { OpenInNewTab } from '../common-types'\n\ntype NativeLinkProps = Omit<\n JSX.IntrinsicElements['a'],\n 'aria-disabled' | 'target' | 'rel' | 'className'\n>\n\nexport type ButtonLinkProps = NativeLinkProps & BaseButtonProps & OpenInNewTab\n\n/**\n * A semantic link that looks like a button, exactly matching the `Button` component in all visual\n * aspects.\n *\n * @see Button\n */\nexport const ButtonLink = polymorphicComponent<'a', ButtonLinkProps>(function ButtonLink(\n {\n as = 'a',\n variant,\n tone = 'normal',\n size = 'normal',\n exceptionallySetClassName,\n openInNewTab = false,\n ...props\n },\n ref,\n) {\n return (\n <BaseButton\n {...props}\n as={as}\n ref={ref}\n variant={variant}\n tone={tone}\n size={size}\n exceptionallySetClassName={exceptionallySetClassName}\n target={openInNewTab ? '_blank' : undefined}\n rel={openInNewTab ? 'noopener noreferrer' : undefined}\n />\n )\n})\n"],"names":["polymorphicComponent","ref","as","variant","tone","size","exceptionallySetClassName","openInNewTab","props","React","BaseButton","target","undefined","rel"],"mappings":"6UAmB0BA,wBAA2C,WAUjEC,OATAC,GACIA,EAAK,IADTC,QAEIA,EAFJC,KAGIA,EAAO,SAHXC,KAIIA,EAAO,SAJXC,0BAKIA,EALJC,aAMIA,GAAe,KACZC,iCAIP,OACIC,gBAACC,gDACOF,OACJN,GAAIA,EACJD,IAAKA,EACLE,QAASA,EACTC,KAAMA,EACNC,KAAMA,EACNC,0BAA2BA,EAC3BK,OAAQJ,EAAe,cAAWK,EAClCC,IAAKN,EAAe,2BAAwBK"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),n=require("../box/box.js"),a=require("../text/text.js"),t=require("ariakit-react-utils"),r=require("./checkbox-icon.js"),c=require("./checkbox-field.module.css.js");const o=["label","icon","disabled","indeterminate","defaultChecked","onChange"];exports.CheckboxField=l.forwardRef((function(u,d){var i,s,b;let{label:f,icon:h,disabled:x,indeterminate:k,defaultChecked:p,onChange:m}=u,y=e.objectWithoutProperties(u,o);"boolean"!=typeof k||"boolean"==typeof y.checked||(console.warn("Cannot use indeterminate on an uncontrolled checkbox"),k=void 0),f||y["aria-label"]||y["aria-labelledby"]||console.warn("A Checkbox needs a label");const[j,C]=l.useState(!1),[q,B]=l.useState(null!=(i=null!=(s=y.checked)?s:p)&&i),E=null!=(b=y.checked)?b:q,g=l.useRef(null),v=t.useForkRef(g,d);return l.useEffect((function(){g.current&&"boolean"==typeof k&&(g.current.indeterminate=k)}),[k]),l.createElement(n.Box,{as:"label",display:"flex",alignItems:"center",className:[c.default.container,x?c.default.disabled:null,E?c.default.checked:null,j?c.default.keyFocused:null]},l.createElement("input",e.objectSpread2(e.objectSpread2({},y),{},{ref:v,type:"checkbox","aria-checked":k?"mixed":E,checked:E,disabled:x,onChange:e=>{null==m||m(e),e.defaultPrevented||B(e.currentTarget.checked)},onBlur:e=>{C(!1),null==y||null==y.onBlur||y.onBlur(e)},onKeyUp:e=>{C(!0),null==y||null==y.onKeyUp||y.onKeyUp(e)}})),l.createElement(r.CheckboxIcon,{checked:E,disabled:x,indeterminate:k,"aria-hidden":!0}),h?l.createElement(n.Box,{display:"flex",className:c.default.icon,"aria-hidden":!0},h):null,f?l.createElement(n.Box,{display:"flex",className:c.default.label},l.createElement(a.Text,null,f)):null)}));
|
|
2
|
-
//# sourceMappingURL=checkbox-field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-field.js","sources":["../../../src/new-components/checkbox-field/checkbox-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useForkRef } from 'ariakit-react-utils'\nimport { Box } from '../box'\nimport { Text } from '../text'\nimport { CheckboxIcon } from './checkbox-icon'\n\nimport styles from './checkbox-field.module.css'\n\ntype CheckboxFieldProps = Omit<\n JSX.IntrinsicElements['input'],\n | 'type'\n | 'className'\n | 'disabled'\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-label'\n | 'aria-labelledby'\n> & {\n 'aria-checked'?: never\n /** Identifies the set of checkboxes controlled by the mixed checkbox for assistive technologies. */\n 'aria-controls'?: string\n /** Identifies the element (or elements) that describes the checkbox for assistive technologies. */\n 'aria-describedby'?: string\n /** Defines a string value that labels the current checkbox for assistive technologies. */\n 'aria-label'?: string\n /** Identifies the element (or elements) that labels the current checkbox for assistive technologies. */\n 'aria-labelledby'?: string\n /** Defines whether or not the checkbox is disabled. */\n disabled?: boolean\n /** The label for the checkbox element. */\n label?: React.ReactNode\n /** The icon that should be added to the checkbox label. */\n icon?: React.ReactChild\n /** Defines whether or not the checkbox can be of a `mixed` state. */\n indeterminate?: boolean\n}\n\nconst CheckboxField = React.forwardRef<HTMLInputElement, CheckboxFieldProps>(function CheckboxField(\n { label, icon, disabled, indeterminate, defaultChecked, onChange, ...props },\n ref,\n) {\n const isControlledComponent = typeof props.checked === 'boolean'\n if (typeof indeterminate === 'boolean' && !isControlledComponent) {\n // eslint-disable-next-line no-console\n console.warn('Cannot use indeterminate on an uncontrolled checkbox')\n indeterminate = undefined\n }\n\n if (!label && !props['aria-label'] && !props['aria-labelledby']) {\n // eslint-disable-next-line no-console\n console.warn('A Checkbox needs a label')\n }\n\n const [keyFocused, setKeyFocused] = React.useState(false)\n const [checkedState, setChecked] = React.useState(props.checked ?? defaultChecked ?? false)\n const isChecked = props.checked ?? checkedState\n\n const internalRef = React.useRef<HTMLInputElement>(null)\n const combinedRef = useForkRef(internalRef, ref)\n React.useEffect(\n function setIndeterminate() {\n if (internalRef.current && typeof indeterminate === 'boolean') {\n internalRef.current.indeterminate = indeterminate\n }\n },\n [indeterminate],\n )\n\n return (\n <Box\n as=\"label\"\n display=\"flex\"\n alignItems=\"center\"\n className={[\n styles.container,\n disabled ? styles.disabled : null,\n isChecked ? styles.checked : null,\n keyFocused ? styles.keyFocused : null,\n ]}\n >\n <input\n {...props}\n ref={combinedRef}\n type=\"checkbox\"\n aria-checked={indeterminate ? 'mixed' : isChecked}\n checked={isChecked}\n disabled={disabled}\n onChange={(event) => {\n onChange?.(event)\n if (!event.defaultPrevented) {\n setChecked(event.currentTarget.checked)\n }\n }}\n onBlur={(event) => {\n setKeyFocused(false)\n props?.onBlur?.(event)\n }}\n onKeyUp={(event) => {\n setKeyFocused(true)\n props?.onKeyUp?.(event)\n }}\n />\n <CheckboxIcon\n checked={isChecked}\n disabled={disabled}\n indeterminate={indeterminate}\n aria-hidden\n />\n {icon ? (\n <Box display=\"flex\" className={styles.icon} aria-hidden>\n {icon}\n </Box>\n ) : null}\n {label ? (\n <Box display=\"flex\" className={styles.label}>\n <Text>{label}</Text>\n </Box>\n ) : null}\n </Box>\n )\n})\n\nexport { CheckboxField }\nexport type { CheckboxFieldProps }\n"],"names":["React","ref","label","icon","disabled","indeterminate","defaultChecked","onChange","props","checked","console","warn","undefined","keyFocused","setKeyFocused","checkedState","setChecked","isChecked","internalRef","combinedRef","useForkRef","current","Box","as","display","alignItems","className","styles","container","type","event","defaultPrevented","currentTarget","onBlur","onKeyUp","CheckboxIcon","Text"],"mappings":"+ZAqCsBA,cAAuD,WAEzEC,iBADAC,MAAEA,EAAFC,KAASA,EAATC,SAAeA,EAAfC,cAAyBA,EAAzBC,eAAwCA,EAAxCC,SAAwDA,KAAaC,iCAIxC,kBAAlBH,GAD4C,kBAAlBG,EAAMC,UAGvCC,QAAQC,KAAK,wDACbN,OAAgBO,GAGfV,GAAUM,EAAM,eAAkBA,EAAM,oBAEzCE,QAAQC,KAAK,4BAGjB,MAAOE,EAAYC,GAAiBd,YAAe,IAC5Ce,EAAcC,GAAchB,6BAAeQ,EAAMC,WAAWH,OAC7DW,WAAYT,EAAMC,WAAWM,EAE7BG,EAAclB,SAA+B,MAC7CmB,EAAcC,aAAWF,EAAajB,GAU5C,OATAD,aACI,WACQkB,EAAYG,SAAoC,kBAAlBhB,IAC9Ba,EAAYG,QAAQhB,cAAgBA,KAG5C,CAACA,IAIDL,gBAACsB,OACGC,GAAG,QACHC,QAAQ,OACRC,WAAW,SACXC,UAAW,CACPC,UAAOC,UACPxB,EAAWuB,UAAOvB,SAAW,KAC7Ba,EAAYU,UAAOlB,QAAU,KAC7BI,EAAac,UAAOd,WAAa,OAGrCb,2DACQQ,OACJP,IAAKkB,EACLU,KAAK,0BACSxB,EAAgB,QAAUY,EACxCR,QAASQ,EACTb,SAAUA,EACVG,SAAWuB,UACPvB,GAAAA,EAAWuB,GACNA,EAAMC,kBACPf,EAAWc,EAAME,cAAcvB,UAGvCwB,OAASH,IACLhB,GAAc,SACdN,SAAAA,EAAOyB,QAAPzB,EAAOyB,OAASH,IAEpBI,QAAUJ,IACNhB,GAAc,SACdN,SAAAA,EAAO0B,SAAP1B,EAAO0B,QAAUJ,OAGzB9B,gBAACmC,gBACG1B,QAASQ,EACTb,SAAUA,EACVC,cAAeA,qBAGlBF,EACGH,gBAACsB,OAAIE,QAAQ,OAAOE,UAAWC,UAAOxB,uBACjCA,GAEL,KACHD,EACGF,gBAACsB,OAAIE,QAAQ,OAAOE,UAAWC,UAAOzB,OAClCF,gBAACoC,YAAMlC,IAEX"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),a=require("react");const t=["checked","indeterminate","disabled"],r={checked:"M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2.457 4.293l-5.293 5.293-1.793-1.793a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l6-6a1 1 0 1 0-1.414-1.414z",unchecked:"M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm0 1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z",mixed:"M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2 7H8a1 1 0 0 0 0 2h8a1 1 0 0 0 0-2z",filled:"M6 4H18C19.1046 4 20 4.89543 20 6V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4Z"};exports.CheckboxIcon=function(i){let{checked:c,indeterminate:d,disabled:l}=i,n=e.objectWithoutProperties(i,t);const o=function({checked:e,indeterminate:a,disabled:t}){return a?"mixed":e?"checked":t?"filled":"unchecked"}({checked:c,indeterminate:d,disabled:l});return a.createElement("svg",e.objectSpread2({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},n),a.createElement("path",{fill:"currentColor",fillRule:"nonzero",d:r[o]}))};
|
|
2
|
-
//# sourceMappingURL=checkbox-icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-icon.js","sources":["../../../src/new-components/checkbox-field/checkbox-icon.tsx"],"sourcesContent":["import * as React from 'react'\n\nconst svgPath = {\n checked:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2.457 4.293l-5.293 5.293-1.793-1.793a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l6-6a1 1 0 1 0-1.414-1.414z',\n unchecked:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm0 1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z',\n mixed:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2 7H8a1 1 0 0 0 0 2h8a1 1 0 0 0 0-2z',\n filled:\n 'M6 4H18C19.1046 4 20 4.89543 20 6V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4Z',\n} as const\n\ntype Props = React.SVGProps<SVGSVGElement> & {\n checked?: boolean\n indeterminate?: boolean\n disabled?: boolean\n}\n\nfunction getPathKey({ checked, indeterminate, disabled }: Props): keyof typeof svgPath {\n if (indeterminate) {\n return 'mixed' // indeterminate, when true, overrides the checked state\n }\n\n if (checked) {\n return 'checked'\n }\n\n // We only used 'filled' when unchecked AND disabled, because the default unchecked icon\n // is not enough to convey the disabled state with opacity alone. For all other cases\n // above, when disabled, we use the same icon the corresponds to that state, and the\n // opacity conveys the fact that the checkbox is disabled.\n // See https://twist.com/a/1585/ch/414345/t/2257308/c/65201390\n if (disabled) {\n return 'filled'\n }\n\n return 'unchecked'\n}\n\nfunction CheckboxIcon({ checked, indeterminate, disabled, ...props }: Props) {\n const pathKey = getPathKey({ checked, indeterminate, disabled })\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path fill=\"currentColor\" fillRule=\"nonzero\" d={svgPath[pathKey]} />\n </svg>\n )\n}\n\nexport { CheckboxIcon }\n"],"names":["svgPath","checked","unchecked","mixed","filled","indeterminate","disabled","props","pathKey","getPathKey","React","xmlns","width","height","viewBox","fill","fillRule","d"],"mappings":"mMAEMA,EAAU,CACZC,QACI,4LACJC,UACI,kJACJC,MACI,iHACJC,OACI,gJA8BR,gBAAsBH,QAAEA,EAAFI,cAAWA,EAAXC,SAA0BA,KAAaC,iCACzD,MAAMC,EAtBV,UAAoBP,QAAEA,EAAFI,cAAWA,EAAXC,SAA0BA,IAC1C,OAAID,EACO,QAGPJ,EACO,UAQPK,EACO,SAGJ,YAISG,CAAW,CAAER,QAAAA,EAASI,cAAAA,EAAeC,SAAAA,IACrD,OACII,uCACIC,MAAM,6BACNC,MAAM,KACNC,OAAO,KACPC,QAAQ,aACJP,GAEJG,wBAAMK,KAAK,eAAeC,SAAS,UAAUC,EAAGjB,EAAQQ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"columns.js","sources":["../../../src/new-components/columns/columns.tsx"],"sourcesContent":["import * as React from 'react'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { getClassNames, mapResponsiveProp } from '../responsive-props'\nimport { Box } from '../box'\n\nimport type { ResponsiveProp, ResponsiveBreakpoints } from '../responsive-props'\nimport type { Space } from '../common-types'\nimport type { ReusableBoxProps } from '../box'\n\nimport styles from './columns.module.css'\n\ntype ColumnWidth =\n | 'auto'\n | 'content'\n | '1/2'\n | '1/3'\n | '2/3'\n | '1/4'\n | '3/4'\n | '1/5'\n | '2/5'\n | '3/5'\n | '4/5'\n\ninterface ColumnProps {\n width?: ColumnWidth\n}\n\nconst Column = polymorphicComponent<'div', ColumnProps>(function Column(\n { width = 'auto', children, exceptionallySetClassName, ...props },\n ref,\n) {\n return (\n <Box\n {...props}\n className={[\n exceptionallySetClassName,\n getClassNames(styles, 'columnWidth', width.replace('/', '-')),\n ]}\n minWidth={0}\n height=\"full\"\n flexShrink={width === 'content' ? 0 : undefined}\n flexGrow={width === 'auto' ? 1 : 0}\n ref={ref}\n >\n {children}\n </Box>\n )\n})\n\ntype ColumnsHorizontalAlignment = 'left' | 'center' | 'right'\ntype ColumnsVerticalAlignment = 'top' | 'center' | 'bottom' | 'baseline'\ntype ColumnsCollapseBelow = Exclude<ResponsiveBreakpoints, 'mobile'>\n\ninterface ColumnsProps extends ReusableBoxProps {\n space?: ResponsiveProp<Space>\n align?: ResponsiveProp<ColumnsHorizontalAlignment>\n alignY?: ResponsiveProp<ColumnsVerticalAlignment>\n collapseBelow?: ResponsiveBreakpoints\n}\n\nconst Columns = polymorphicComponent<'div', ColumnsProps>(function Columns(\n {\n space,\n align = 'left',\n alignY = 'top',\n collapseBelow,\n children,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n return (\n <Box\n {...props}\n className={[\n exceptionallySetClassName,\n styles.container,\n getClassNames(styles, 'container', space),\n ]}\n display=\"flex\"\n gap={space}\n flexDirection={\n collapseBelow === 'desktop'\n ? { mobile: 'column', tablet: 'column', desktop: 'row' }\n : collapseBelow === 'tablet'\n ? { mobile: 'column', tablet: 'row' }\n : 'row'\n }\n alignItems={mapResponsiveProp(alignY, (alignY) =>\n alignY === 'top' ? 'flexStart' : alignY === 'bottom' ? 'flexEnd' : alignY,\n )}\n justifyContent={mapResponsiveProp(align, (align) =>\n align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' : align,\n )}\n ref={ref}\n >\n {children}\n </Box>\n )\n})\n\nexport type {\n ColumnProps,\n ColumnsProps,\n ColumnWidth,\n ColumnsCollapseBelow,\n ColumnsHorizontalAlignment,\n ColumnsVerticalAlignment,\n}\n\nexport { Column, Columns }\n"],"names":["Column","polymorphicComponent","ref","width","children","exceptionallySetClassName","props","React","Box","className","getClassNames","styles","replace","minWidth","height","flexShrink","undefined","flexGrow","Columns","space","align","alignY","collapseBelow","container","display","gap","flexDirection","mobile","tablet","desktop","alignItems","mapResponsiveProp","justifyContent"],"mappings":"8aA4BMA,EAASC,wBAAyC,WAEpDC,OADAC,MAAEA,EAAQ,OAAVC,SAAkBA,EAAlBC,0BAA4BA,KAA8BC,iCAG1D,OACIC,gBAACC,yCACOF,OACJG,UAAW,CACPJ,EACAK,gBAAcC,UAAQ,cAAeR,EAAMS,QAAQ,IAAK,OAE5DC,SAAU,EACVC,OAAO,OACPC,WAAsB,YAAVZ,EAAsB,OAAIa,EACtCC,SAAoB,SAAVd,EAAmB,EAAI,EACjCD,IAAKA,IAEJE,MAgBPc,EAAUjB,wBAA0C,WAUtDC,OATAiB,MACIA,EADJC,MAEIA,EAAQ,OAFZC,OAGIA,EAAS,MAHbC,cAIIA,EAJJlB,SAKIA,EALJC,0BAMIA,KACGC,iCAIP,OACIC,gBAACC,yCACOF,OACJG,UAAW,CACPJ,EACAM,UAAOY,UACPb,gBAAcC,UAAQ,YAAaQ,IAEvCK,QAAQ,OACRC,IAAKN,EACLO,cACsB,YAAlBJ,EACM,CAAEK,OAAQ,SAAUC,OAAQ,SAAUC,QAAS,OAC7B,WAAlBP,EACA,CAAEK,OAAQ,SAAUC,OAAQ,OAC5B,MAEVE,WAAYC,oBAAkBV,EAASA,GACxB,QAAXA,EAAmB,YAAyB,WAAXA,EAAsB,UAAYA,GAEvEW,eAAgBD,oBAAkBX,EAAQA,GAC5B,SAAVA,EAAmB,YAAwB,UAAVA,EAAoB,UAAYA,GAErElB,IAAKA,IAEJE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common-helpers.js","sources":["../../src/new-components/common-helpers.ts"],"sourcesContent":["import * as React from 'react'\n\nlet uid = 0\nfunction uniqueId() {\n return uid++\n}\n\nexport function generateElementId(prefix: string): string {\n const num = uniqueId()\n return `${prefix}-${num}`\n}\n\nexport function useId(providedId?: string): string {\n const ref = React.useRef<string | null>(providedId ?? null)\n if (!ref.current) {\n ref.current = generateElementId('element')\n }\n return ref.current\n}\n"],"names":["uid","generateElementId","prefix","providedId","ref","React","current"],"mappings":"2FAEA,IAAIA,EAAM,WAKMC,EAAkBC,GAE9B,OAAUA,MALHF,uDAQWG,GAClB,MAAMC,EAAMC,eAA4BF,EAAAA,EAAc,MAItD,OAHKC,EAAIE,UACLF,EAAIE,QAAUL,EAAkB,YAE7BG,EAAIE"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../_virtual/_rollupPluginBabelHelpers.js"),a=require("react"),o=(e(a),e(require("classnames"))),l=require("../box/box.js"),r=require("../columns/columns.js"),n=require("../divider/divider.js"),i=require("../inline/inline.js"),s=require("../button/button.js"),c=require("../icons/close-icon.js"),u=e(require("react-focus-lock")),d=require("@reach/dialog"),m=require("./modal.module.css.js");const p=["isOpen","onDismiss","height","width","exceptionallySetClassName","autoFocus","children"],h=["children","button","withDivider","exceptionallySetClassName"],f=["exceptionallySetClassName","children"],x=["exceptionallySetClassName","withDivider"],g=["children"],b=a.createContext({onDismiss:void 0,height:"fitContent"});function j(e){return!(e.ownerDocument===document&&"iframe"===e.tagName.toLowerCase())}function C(e){const{onDismiss:o}=a.useContext(b),[l,r]=a.useState(!1),[n,i]=a.useState(!1);return a.useEffect((function(){n?r(!0):i(!0)}),[n]),a.createElement(s.Button,t.objectSpread2(t.objectSpread2({},e),{},{variant:"quaternary",onClick:o,icon:a.createElement(c.CloseIcon,null),tabIndex:l?0:-1}))}function v(e){let{exceptionallySetClassName:o,withDivider:r=!1}=e,i=t.objectWithoutProperties(e,x);return a.createElement(a.Fragment,null,r?a.createElement(n.Divider,null):null,a.createElement(l.Box,t.objectSpread2(t.objectSpread2({as:"footer"},i),{},{className:o,padding:"large"})))}exports.DeprecatedModal=function(e){let{isOpen:r,onDismiss:n,height:i="fitContent",width:s="medium",exceptionallySetClassName:c,autoFocus:h=!0,children:f}=e,x=t.objectWithoutProperties(e,p);const g=a.useMemo(()=>({onDismiss:n,height:i}),[n,i]);return a.createElement(d.DialogOverlay,{isOpen:r,onDismiss:n,dangerouslyBypassFocusLock:!0,className:o(m.default.overlay,m.default[i],m.default[s]),"data-testid":"modal-overlay"},a.createElement(u,{autoFocus:h,whiteList:j,returnFocus:!0},a.createElement(d.DialogContent,t.objectSpread2(t.objectSpread2({},x),{},{as:l.Box,borderRadius:"full",background:"default",display:"flex",flexDirection:"column",overflow:"hidden",height:"expand"===i?"full":void 0,flexGrow:"expand"===i?1:0,className:[c,m.default.container]}),a.createElement(b.Provider,{value:g},f))))},exports.DeprecatedModalActions=function(e){let{children:o}=e,l=t.objectWithoutProperties(e,g);return a.createElement(v,t.objectSpread2({},l),a.createElement(i.Inline,{align:"right",space:"large"},o))},exports.DeprecatedModalBody=function(e){let{exceptionallySetClassName:o,children:r}=e,n=t.objectWithoutProperties(e,f);const{height:i}=a.useContext(b);return a.createElement(l.Box,t.objectSpread2(t.objectSpread2({},n),{},{className:o,flexGrow:"expand"===i?1:0,height:"expand"===i?"full":void 0,overflow:"auto"}),a.createElement(l.Box,{padding:"large",paddingBottom:"xxlarge"},r))},exports.DeprecatedModalCloseButton=C,exports.DeprecatedModalFooter=v,exports.DeprecatedModalHeader=function(e){let{children:o,button:i=!0,withDivider:s=!1,exceptionallySetClassName:c}=e,u=t.objectWithoutProperties(e,h);return a.createElement(a.Fragment,null,a.createElement(l.Box,t.objectSpread2(t.objectSpread2({},u),{},{as:"header",paddingLeft:"large",paddingRight:!1===i||null===i?"large":"small",paddingY:"small",className:c}),a.createElement(r.Columns,{space:"large",alignY:"center"},a.createElement(r.Column,{width:"auto"},o),!1===i||null===i?a.createElement("div",{className:m.default.headerContent}):a.createElement(r.Column,{width:"content",exceptionallySetClassName:m.default.buttonContainer,"data-testid":"button-container"},"boolean"==typeof i?a.createElement(C,{"aria-label":"Close modal",autoFocus:!1}):i))),s?a.createElement(n.Divider,null):null)};
|
|
2
|
-
//# sourceMappingURL=modal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sources":["../../../src/new-components/deprecated-modal/modal.tsx"],"sourcesContent":["import * as React from 'react'\nimport classNames from 'classnames'\nimport { DialogOverlay, DialogContent } from '@reach/dialog'\nimport FocusLock from 'react-focus-lock'\n\nimport { CloseIcon } from '../icons/close-icon'\nimport { Column, Columns } from '../columns'\nimport { Inline } from '../inline'\nimport { Divider } from '../divider'\nimport { Box } from '../box'\nimport { Button, ButtonProps } from '../button'\n\nimport styles from './modal.module.css'\n\ntype ModalWidth = 'small' | 'medium' | 'large' | 'xlarge' | 'full'\ntype ModalHeightMode = 'expand' | 'fitContent'\n\n//\n// ModalContext\n//\n\ntype ModalContextValue = {\n onDismiss?(this: void): void\n height: ModalHeightMode\n}\n\nconst ModalContext = React.createContext<ModalContextValue>({\n onDismiss: undefined,\n height: 'fitContent',\n})\n\n//\n// Modal container\n//\n\ntype DivProps = Omit<\n React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLDivElement>, HTMLDivElement>,\n 'className' | 'children' | `aria-label` | `aria-labelledby`\n>\n\nexport type DeprecatedModalProps = DivProps & {\n /**\n * The content of the modal.\n */\n children: React.ReactNode\n /**\n * Whether the modal is open and visible or not.\n */\n isOpen: boolean\n /**\n * Called when the user triggers closing the modal.\n */\n onDismiss?(): void\n /**\n * A descriptive setting for how wide the modal should aim to be, depending on how much space\n * it has on screen.\n * @default 'medium'\n */\n width?: ModalWidth\n /**\n * A descriptive setting for how tall the modal should aim to be.\n *\n * - 'expand': the modal aims to fill most of the available screen height, leaving only a small\n * padding above and below.\n * - 'fitContent': the modal shrinks to the smallest size that allow it to fit its content.\n *\n * In either case, if content does not fit, the content of the main body is set to scroll\n * (provided you use `ModalBody`) so that the modal never has to strech vertically beyond the\n * viewport boundaries.\n *\n * If you do not use `ModalBody`, the modal still prevents overflow, and you are in charge of\n * the inner layout to ensure scroll, or whatever other strategy you may want.\n */\n height?: ModalHeightMode\n /**\n * Whether to set or not the focus initially to the first focusable element inside the modal.\n */\n autoFocus?: boolean\n /**\n * A escape hatch in case you need to provide a custom class name to the container element.\n */\n exceptionallySetClassName?: string\n /** Defines a string value that labels the current modal for assistive technologies. */\n 'aria-label'?: string\n /** Identifies the element (or elements) that labels the current modal for assistive technologies. */\n 'aria-labelledby'?: string\n}\n\nfunction isNotInternalFrame(element: HTMLElement) {\n return !(element.ownerDocument === document && element.tagName.toLowerCase() === 'iframe')\n}\n\n/**\n * Renders a modal that sits on top of the rest of the content in the entire page.\n *\n * Follows the WAI-ARIA Dialog (Modal) Pattern.\n *\n * @see DeprecatedModalHeader\n * @see DeprecatedModalFooter\n * @see DeprecatedModalBody\n * @deprecated\n */\nexport function DeprecatedModal({\n isOpen,\n onDismiss,\n height = 'fitContent',\n width = 'medium',\n exceptionallySetClassName,\n autoFocus = true,\n children,\n ...props\n}: DeprecatedModalProps) {\n const contextValue: ModalContextValue = React.useMemo(() => ({ onDismiss, height }), [\n onDismiss,\n height,\n ])\n\n return (\n <DialogOverlay\n isOpen={isOpen}\n onDismiss={onDismiss}\n dangerouslyBypassFocusLock // We're setting up our own focus lock below\n className={classNames(styles.overlay, styles[height], styles[width])}\n data-testid=\"modal-overlay\"\n >\n <FocusLock autoFocus={autoFocus} whiteList={isNotInternalFrame} returnFocus={true}>\n <DialogContent\n {...props}\n as={Box}\n borderRadius=\"full\"\n background=\"default\"\n display=\"flex\"\n flexDirection=\"column\"\n overflow=\"hidden\"\n height={height === 'expand' ? 'full' : undefined}\n flexGrow={height === 'expand' ? 1 : 0}\n className={[exceptionallySetClassName, styles.container]}\n >\n <ModalContext.Provider value={contextValue}>{children}</ModalContext.Provider>\n </DialogContent>\n </FocusLock>\n </DialogOverlay>\n )\n}\n\n//\n// ModalCloseButton\n//\n\nexport type DeprecatedModalCloseButtonProps = Omit<\n ButtonProps,\n | 'type'\n | 'children'\n | 'variant'\n | 'icon'\n | 'startIcon'\n | 'endIcon'\n | 'disabled'\n | 'loading'\n | 'tabIndex'\n | 'width'\n | 'align'\n> & {\n /**\n * The descriptive label of the button.\n */\n 'aria-label': string\n}\n\n/**\n * The close button rendered by ModalHeader. Provided independently so that consumers can customize\n * the button's label.\n *\n * @see DeprecatedModalHeader\n */\nexport function DeprecatedModalCloseButton(props: DeprecatedModalCloseButtonProps) {\n const { onDismiss } = React.useContext(ModalContext)\n const [includeInTabOrder, setIncludeInTabOrder] = React.useState(false)\n const [isMounted, setIsMounted] = React.useState(false)\n\n React.useEffect(\n function skipAutoFocus() {\n if (isMounted) {\n setIncludeInTabOrder(true)\n } else {\n setIsMounted(true)\n }\n },\n [isMounted],\n )\n\n return (\n <Button\n {...props}\n variant=\"quaternary\"\n onClick={onDismiss}\n icon={<CloseIcon />}\n tabIndex={includeInTabOrder ? 0 : -1}\n />\n )\n}\n\n//\n// ModalHeader\n//\n\nexport type DeprecatedModalHeaderProps = DivProps & {\n /**\n * The content of the header.\n */\n children: React.ReactNode\n /**\n * Allows to provide a custom button element, or to omit the close button if set to false.\n * @see DeprecatedModalCloseButton\n */\n button?: React.ReactNode | boolean\n /**\n * Whether to render a divider line below the header.\n * @default false\n */\n withDivider?: boolean\n /**\n * A escape hatch in case you need to provide a custom class name to the container element.\n */\n exceptionallySetClassName?: string\n}\n\n/**\n * Renders a standard modal header area with an optional close button.\n *\n * @see DeprecatedModal\n * @see DeprecatedModalFooter\n * @see DeprecatedModalBody\n */\nexport function DeprecatedModalHeader({\n children,\n button = true,\n withDivider = false,\n exceptionallySetClassName,\n ...props\n}: DeprecatedModalHeaderProps) {\n return (\n <>\n <Box\n {...props}\n as=\"header\"\n paddingLeft=\"large\"\n paddingRight={button === false || button === null ? 'large' : 'small'}\n paddingY=\"small\"\n className={exceptionallySetClassName}\n >\n <Columns space=\"large\" alignY=\"center\">\n <Column width=\"auto\">{children}</Column>\n {button === false || button === null ? (\n <div className={styles.headerContent} />\n ) : (\n <Column\n width=\"content\"\n exceptionallySetClassName={styles.buttonContainer}\n data-testid=\"button-container\"\n >\n {typeof button === 'boolean' ? (\n <DeprecatedModalCloseButton\n aria-label=\"Close modal\"\n autoFocus={false}\n />\n ) : (\n button\n )}\n </Column>\n )}\n </Columns>\n </Box>\n {withDivider ? <Divider /> : null}\n </>\n )\n}\n\n//\n// ModalBody\n//\n\nexport type DeprecatedModalBodyProps = DivProps & {\n /**\n * The content of the modal body.\n */\n children: React.ReactNode\n /**\n * A escape hatch in case you need to provide a custom class name to the container element.\n */\n exceptionallySetClassName?: string\n}\n\n/**\n * Renders the body of a modal.\n *\n * Convenient to use alongside ModalHeader and/or ModalFooter as needed. It ensures, among other\n * things, that the contet of the modal body expands or contracts depending on the modal height\n * setting or the size of the content. The body content also automatically scrolls when it's too\n * large to fit the available space.\n *\n * @see DeprecatedModal\n * @see DeprecatedModalHeader\n * @see DeprecatedModalFooter\n */\nexport function DeprecatedModalBody({\n exceptionallySetClassName,\n children,\n ...props\n}: DeprecatedModalBodyProps) {\n const { height } = React.useContext(ModalContext)\n return (\n <Box\n {...props}\n className={exceptionallySetClassName}\n flexGrow={height === 'expand' ? 1 : 0}\n height={height === 'expand' ? 'full' : undefined}\n overflow=\"auto\"\n >\n <Box padding=\"large\" paddingBottom=\"xxlarge\">\n {children}\n </Box>\n </Box>\n )\n}\n\n//\n// ModalFooter\n//\n\nexport type DeprecatedModalFooterProps = DivProps & {\n /**\n * The contant of the modal footer.\n */\n children: React.ReactNode\n /**\n * Whether to render a divider line below the footer.\n * @default false\n */\n withDivider?: boolean\n /**\n * A escape hatch in case you need to provide a custom class name to the container element.\n */\n exceptionallySetClassName?: string\n}\n\n/**\n * Renders a standard modal footer area.\n *\n * @see DeprecatedModal\n * @see DeprecatedModalHeader\n * @see DeprecatedModalBody\n */\nexport function DeprecatedModalFooter({\n exceptionallySetClassName,\n withDivider = false,\n ...props\n}: DeprecatedModalFooterProps) {\n return (\n <>\n {withDivider ? <Divider /> : null}\n <Box as=\"footer\" {...props} className={exceptionallySetClassName} padding=\"large\" />\n </>\n )\n}\n\n//\n// ModalActions\n//\n\nexport type DeprecatedModalActionsProps = DeprecatedModalFooterProps\n\n/**\n * A specific version of the ModalFooter, tailored to showing an inline list of actions (buttons).\n * @see DeprecatedModalFooter\n */\nexport function DeprecatedModalActions({ children, ...props }: DeprecatedModalActionsProps) {\n return (\n <DeprecatedModalFooter {...props}>\n <Inline align=\"right\" space=\"large\">\n {children}\n </Inline>\n </DeprecatedModalFooter>\n )\n}\n"],"names":["ModalContext","React","onDismiss","undefined","height","isNotInternalFrame","element","ownerDocument","document","tagName","toLowerCase","DeprecatedModalCloseButton","props","includeInTabOrder","setIncludeInTabOrder","isMounted","setIsMounted","Button","variant","onClick","icon","CloseIcon","tabIndex","DeprecatedModalFooter","exceptionallySetClassName","withDivider","Divider","Box","as","className","padding","isOpen","width","autoFocus","children","contextValue","DialogOverlay","dangerouslyBypassFocusLock","classNames","styles","overlay","FocusLock","whiteList","returnFocus","DialogContent","borderRadius","background","display","flexDirection","overflow","flexGrow","container","Provider","value","Inline","align","space","paddingBottom","button","paddingLeft","paddingRight","paddingY","Columns","alignY","Column","headerContent","buttonContainer"],"mappings":"+yBA0BMA,EAAeC,gBAAuC,CACxDC,eAAWC,EACXC,OAAQ,eA4DZ,SAASC,EAAmBC,GACxB,QAASA,EAAQC,gBAAkBC,UAA8C,WAAlCF,EAAQG,QAAQC,wBAsFnDC,EAA2BC,GACvC,MAAMV,UAAEA,GAAcD,aAAiBD,IAChCa,EAAmBC,GAAwBb,YAAe,IAC1Dc,EAAWC,GAAgBf,YAAe,GAajD,OAXAA,aACI,WACQc,EACAD,GAAqB,GAErBE,GAAa,KAGrB,CAACD,IAIDd,gBAACgB,4CACOL,OACJM,QAAQ,aACRC,QAASjB,EACTkB,KAAMnB,gBAACoB,kBACPC,SAAUT,EAAoB,GAAK,cA4J/BU,SAAsBC,0BAClCA,EADkCC,YAElCA,GAAc,KACXb,iCAEH,OACIX,gCACKwB,EAAcxB,gBAACyB,gBAAa,KAC7BzB,gBAAC0B,uCAAIC,GAAG,UAAahB,OAAOiB,UAAWL,EAA2BM,QAAQ,oDAnQtDC,OAC5BA,EAD4B7B,UAE5BA,EAF4BE,OAG5BA,EAAS,aAHmB4B,MAI5BA,EAAQ,SAJoBR,0BAK5BA,EAL4BS,UAM5BA,GAAY,EANgBC,SAO5BA,KACGtB,iCAEH,MAAMuB,EAAkClC,UAAc,MAASC,UAAAA,EAAWE,OAAAA,IAAW,CACjFF,EACAE,IAGJ,OACIH,gBAACmC,iBACGL,OAAQA,EACR7B,UAAWA,EACXmC,8BACAR,UAAWS,EAAWC,UAAOC,QAASD,UAAOnC,GAASmC,UAAOP,kBACjD,iBAEZ/B,gBAACwC,GAAUR,UAAWA,EAAWS,UAAWrC,EAAoBsC,aAAa,GACzE1C,gBAAC2C,mDACOhC,OACJgB,GAAID,MACJkB,aAAa,OACbC,WAAW,UACXC,QAAQ,OACRC,cAAc,SACdC,SAAS,SACT7C,OAAmB,WAAXA,EAAsB,YAASD,EACvC+C,SAAqB,WAAX9C,EAAsB,EAAI,EACpCyB,UAAW,CAACL,EAA2Be,UAAOY,aAE9ClD,gBAACD,EAAaoD,UAASC,MAAOlB,GAAeD,sDA8O1BA,SAAEA,KAAatB,iCAClD,OACIX,gBAACsB,qBAA0BX,GACvBX,gBAACqD,UAAOC,MAAM,QAAQC,MAAM,SACvBtB,iDA3EmBV,0BAChCA,EADgCU,SAEhCA,KACGtB,iCAEH,MAAMR,OAAEA,GAAWH,aAAiBD,GACpC,OACIC,gBAAC0B,yCACOf,OACJiB,UAAWL,EACX0B,SAAqB,WAAX9C,EAAsB,EAAI,EACpCA,OAAmB,WAAXA,EAAsB,YAASD,EACvC8C,SAAS,SAEThD,gBAAC0B,OAAIG,QAAQ,QAAQ2B,cAAc,WAC9BvB,wHAtFqBA,SAClCA,EADkCwB,OAElCA,GAAS,EAFyBjC,YAGlCA,GAAc,EAHoBD,0BAIlCA,KACGZ,iCAEH,OACIX,gCACIA,gBAAC0B,yCACOf,OACJgB,GAAG,SACH+B,YAAY,QACZC,cAAyB,IAAXF,GAA+B,OAAXA,EAAkB,QAAU,QAC9DG,SAAS,QACThC,UAAWL,IAEXvB,gBAAC6D,WAAQN,MAAM,QAAQO,OAAO,UAC1B9D,gBAAC+D,UAAOhC,MAAM,QAAQE,IACV,IAAXwB,GAA+B,OAAXA,EACjBzD,uBAAK4B,UAAWU,UAAO0B,gBAEvBhE,gBAAC+D,UACGhC,MAAM,UACNR,0BAA2Be,UAAO2B,8BACtB,oBAEO,kBAAXR,EACJzD,gBAACU,gBACc,cACXsB,WAAW,IAGfyB,KAMnBjC,EAAcxB,gBAACyB,gBAAa"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),t=require("../responsive-props.js"),s=require("../box/box.js"),i=require("./divider.module.css.js");const o=["weight"];exports.Divider=function(u){let{weight:a="tertiary"}=u,l=e.objectWithoutProperties(u,o);return r.createElement(s.Box,e.objectSpread2({as:"hr",className:t.getClassNames(i.default,"weight",a)},l))};
|
|
2
|
-
//# sourceMappingURL=divider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"divider.js","sources":["../../../src/new-components/divider/divider.tsx"],"sourcesContent":["import * as React from 'react'\nimport { getClassNames } from '../responsive-props'\nimport { Box } from '../box'\nimport type { DividerWeight } from '../common-types'\n\nimport styles from './divider.module.css'\n\ninterface DividerProps {\n weight?: Exclude<DividerWeight, 'none'>\n}\n\nfunction Divider({ weight = 'tertiary', ...props }: DividerProps) {\n return <Box as=\"hr\" className={getClassNames(styles, 'weight', weight)} {...props} />\n}\n\nexport type { DividerProps, DividerWeight }\nexport { Divider }\n"],"names":["weight","props","React","Box","as","className","getClassNames","styles"],"mappings":"2RAWA,gBAAiBA,OAAEA,EAAS,cAAeC,iCACvC,OAAOC,gBAACC,uBAAIC,GAAG,KAAKC,UAAWC,gBAAcC,UAAQ,SAAUP,IAAaC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),t=require("../responsive-props.js"),a=require("../box/box.js"),s=require("./heading.module.css.js");const r=["level","weight","size","tone","children","lineClamp","align","exceptionallySetClassName"];exports.Heading=l.forwardRef((function(i,n){let{level:o,weight:u="regular",size:p,tone:d="normal",children:g,lineClamp:c,align:m,exceptionallySetClassName:f}=i,h=e.objectWithoutProperties(i,r);const C="h"+o,x="string"==typeof c?parseInt(c,10)>1:(c||0)>1;return l.createElement(a.Box,e.objectSpread2(e.objectSpread2({},h),{},{className:[f,s.default.heading,"regular"!==u?t.getClassNames(s.default,"weight",u):null,"normal"!==d?t.getClassNames(s.default,"tone",d):null,t.getClassNames(s.default,"size",p),x?s.default.lineClampMultipleLines:null,c?t.getClassNames(s.default,"lineClamp",c.toString()):null],textAlign:m,paddingRight:c?"xsmall":void 0,as:C,ref:n}),g)}));
|
|
2
|
-
//# sourceMappingURL=heading.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"heading.js","sources":["../../../src/new-components/heading/heading.tsx"],"sourcesContent":["import * as React from 'react'\nimport { getClassNames } from '../responsive-props'\nimport { Box } from '../box'\nimport styles from './heading.module.css'\nimport type { ObfuscatedClassName } from '../../utils/polymorphism'\nimport type { Tone } from '../common-types'\nimport type { BoxProps } from '../box'\n\ntype HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6 | '1' | '2' | '3' | '4' | '5' | '6'\ntype HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n\ntype SupportedHeadingElementProps = Omit<\n JSX.IntrinsicElements[HeadingElement],\n 'className' | 'children'\n>\n\ntype HeadingProps = SupportedHeadingElementProps & {\n children: React.ReactNode\n /**\n * The semantic level of the heading.\n */\n level: HeadingLevel\n /**\n * The weight of the heading. Used to de-emphasize the heading visually when using 'light'.\n *\n * @default 'regular'\n */\n weight?: 'regular' | 'light'\n /**\n * Shifts the default heading visual text size up or down, depending on the original size\n * imposed by the `level`. The heading continues to be semantically at the given level.\n *\n * By default, no value is applied, and the default size from the level is applied. The values\n * have the following effect:\n *\n * - 'smaller' shifts the default level size down in the font-size scale (it tends to make the\n * level look visually as if it were of the immediately lower level).\n * - 'larger' has the opposite effect than 'smaller' shifting the visual font size up in the\n * scale.\n * - 'largest' can be thought of as applying 'larger' twice.\n *\n * @see level\n * @default undefined\n */\n size?: 'smaller' | 'larger' | 'largest'\n /**\n * The tone (semantic color) of the heading.\n *\n * @default 'normal'\n */\n tone?: Tone\n /**\n * Used to truncate the heading to a given number of lines.\n *\n * It will add an ellipsis (`…`) to the text at the end of the last line, only if the text was\n * truncated. If the text fits without it being truncated, no ellipsis is added.\n *\n * By default, the text is not truncated at all, no matter how many lines it takes to render it.\n *\n * @default undefined\n */\n lineClamp?: 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5'\n /**\n * How to align the heading text horizontally.\n *\n * @default 'start'\n */\n align?: BoxProps['textAlign']\n}\n\nconst Heading = React.forwardRef<HTMLHeadingElement, HeadingProps & ObfuscatedClassName>(\n function Heading(\n {\n level,\n weight = 'regular',\n size,\n tone = 'normal',\n children,\n lineClamp,\n align,\n exceptionallySetClassName,\n ...props\n },\n ref,\n ) {\n // In TypeScript v4.1, this would be properly recognized without needing the type assertion\n // https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types\n const headingElementName = `h${level}` as HeadingElement\n const lineClampMultipleLines =\n typeof lineClamp === 'string' ? parseInt(lineClamp, 10) > 1 : (lineClamp || 0) > 1\n\n return (\n <Box\n {...props}\n className={[\n exceptionallySetClassName,\n styles.heading,\n weight !== 'regular' ? getClassNames(styles, 'weight', weight) : null,\n tone !== 'normal' ? getClassNames(styles, 'tone', tone) : null,\n getClassNames(styles, 'size', size),\n lineClampMultipleLines ? styles.lineClampMultipleLines : null,\n lineClamp ? getClassNames(styles, 'lineClamp', lineClamp.toString()) : null,\n ]}\n textAlign={align}\n // Prevents emojis from being cut-off\n // See https://github.com/Doist/reactist/pull/528\n paddingRight={lineClamp ? 'xsmall' : undefined}\n as={headingElementName}\n ref={ref}\n >\n {children}\n </Box>\n )\n },\n)\n\nexport type { HeadingProps, HeadingLevel }\nexport { Heading }\n"],"names":["React","ref","level","weight","size","tone","children","lineClamp","align","exceptionallySetClassName","props","headingElementName","lineClampMultipleLines","parseInt","Box","className","styles","heading","getClassNames","toString","textAlign","paddingRight","undefined","as"],"mappings":"4WAsEgBA,cACZ,WAYIC,OAXAC,MACIA,EADJC,OAEIA,EAAS,UAFbC,KAGIA,EAHJC,KAIIA,EAAO,SAJXC,SAKIA,EALJC,UAMIA,EANJC,MAOIA,EAPJC,0BAQIA,KACGC,iCAMP,MAAMC,MAAyBT,EACzBU,EACmB,iBAAdL,EAAyBM,SAASN,EAAW,IAAM,GAAKA,GAAa,GAAK,EAErF,OACIP,gBAACc,yCACOJ,OACJK,UAAW,CACPN,EACAO,UAAOC,QACI,YAAXd,EAAuBe,gBAAcF,UAAQ,SAAUb,GAAU,KACxD,WAATE,EAAoBa,gBAAcF,UAAQ,OAAQX,GAAQ,KAC1Da,gBAAcF,UAAQ,OAAQZ,GAC9BQ,EAAyBI,UAAOJ,uBAAyB,KACzDL,EAAYW,gBAAcF,UAAQ,YAAaT,EAAUY,YAAc,MAE3EC,UAAWZ,EAGXa,aAAcd,EAAY,cAAWe,EACrCC,GAAIZ,EACJV,IAAKA,IAEJK"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),o=require("react"),i=require("../../utils/polymorphism.js"),n=require("../box/box.js"),t=require("./hidden.module.css.js");const l=["display","children","exceptionallySetClassName"];exports.Hidden=i.polymorphicComponent((function(i,r){let{display:s="block",children:a,exceptionallySetClassName:d}=i,b=e.objectWithoutProperties(i,l);const p="print"in b&&b.print,c="above"in b,u="below"in b,h="below"in b&&"desktop"===b.below||"above"in b&&"mobile"===b.above;return c&&u&&console.warn('<Hidden /> should receive either above="…" or below="…" but not both'),c||u||p||console.warn("<Hidden /> did not receive any criteria to hide itself"),"above"in b&&delete b.above,"below"in b&&delete b.below,"print"in b&&delete b.print,o.createElement(n.Box,e.objectSpread2(e.objectSpread2({},b),{},{ref:r,className:[d,p?t.default.hiddenOnPrint:null],display:c&&u?"none":{mobile:u?"none":s,tablet:h?"none":s,desktop:c?"none":s}}),a)}));
|
|
2
|
-
//# sourceMappingURL=hidden.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hidden.js","sources":["../../../src/new-components/hidden/hidden.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport styles from './hidden.module.css'\nimport type { ResponsiveBreakpoints } from '../responsive-props'\nimport { polymorphicComponent } from '../../utils/polymorphism'\n\ntype AboveProp = {\n /**\n * Hides the element on viewport sizes equal or larger to the one given.\n *\n * It is not supported to pass it alongside `below`, and the resulting behavior is undefined\n * (most likely itʼll hide the element all the time to make it apparent that there's a problem).\n *\n * @see below\n */\n above: Exclude<ResponsiveBreakpoints, 'desktop'>\n below?: never\n}\n\ntype BelowProp = {\n /**\n * Hides the element on viewport sizes equal or smaller to the one given.\n *\n * It is not supported to pass it alongside `above`, and the resulting behavior is undefined\n * (most likely itʼll hide the element all the time to make it apparent that there's a problem).\n *\n * @see above\n */\n below: Exclude<ResponsiveBreakpoints, 'mobile'>\n above?: never\n}\n\ntype CommonProps = {\n children: React.ReactNode\n /**\n * hides the element when on print media.\n */\n print?: boolean\n /**\n * Useful if you want the element to be an inline element when it is visible.\n */\n display?: 'inline' | 'block'\n}\n\ntype HiddenProps = CommonProps & (AboveProp | BelowProp | Required<Pick<CommonProps, 'print'>>)\n\n/**\n * A component that allows to specify how to hide itself on certain responsive screen sizes, or on\n * print media.\n *\n * @see HiddenProps\n * @see HiddenVisually for hiding content only visually, while keeping it available for assistive\n * technologies.\n */\nconst Hidden = polymorphicComponent<'div', HiddenProps>(function Hidden(\n { display = 'block', children, exceptionallySetClassName, ...props },\n ref,\n) {\n const hiddenOnPrint = 'print' in props && props.print\n\n const hiddenOnDesktop = 'above' in props\n const hiddenOnMobile = 'below' in props\n const hiddenOnTablet =\n ('below' in props && props.below === 'desktop') ||\n ('above' in props && props.above === 'mobile')\n\n if (hiddenOnDesktop && hiddenOnMobile) {\n // eslint-disable-next-line no-console\n console.warn('<Hidden /> should receive either above=\"…\" or below=\"…\" but not both')\n }\n\n if (!hiddenOnDesktop && !hiddenOnMobile && !hiddenOnPrint) {\n // eslint-disable-next-line no-console\n console.warn('<Hidden /> did not receive any criteria to hide itself')\n }\n\n // We need to delete these so they do not get forwarded to the Box\n if ('above' in props) delete props['above']\n if ('below' in props) delete props['below']\n if ('print' in props) delete props['print']\n\n return (\n <Box\n {...props}\n ref={ref}\n className={[exceptionallySetClassName, hiddenOnPrint ? styles.hiddenOnPrint : null]}\n display={\n hiddenOnDesktop && hiddenOnMobile\n ? 'none'\n : {\n mobile: hiddenOnMobile ? 'none' : display,\n tablet: hiddenOnTablet ? 'none' : display,\n desktop: hiddenOnDesktop ? 'none' : display,\n }\n }\n >\n {children}\n </Box>\n )\n})\n\nexport { Hidden }\nexport type { HiddenProps }\n"],"names":["polymorphicComponent","ref","display","children","exceptionallySetClassName","props","hiddenOnPrint","print","hiddenOnDesktop","hiddenOnMobile","hiddenOnTablet","below","above","console","warn","React","Box","className","styles","mobile","tablet","desktop"],"mappings":"sUAsDeA,wBAAyC,WAEpDC,OADAC,QAAEA,EAAU,QAAZC,SAAqBA,EAArBC,0BAA+BA,KAA8BC,iCAG7D,MAAMC,EAAgB,UAAWD,GAASA,EAAME,MAE1CC,EAAkB,UAAWH,EAC7BI,EAAiB,UAAWJ,EAC5BK,EACD,UAAWL,GAAyB,YAAhBA,EAAMM,OAC1B,UAAWN,GAAyB,WAAhBA,EAAMO,MAiB/B,OAfIJ,GAAmBC,GAEnBI,QAAQC,KAAK,wEAGZN,GAAoBC,GAAmBH,GAExCO,QAAQC,KAAK,0DAIb,UAAWT,UAAcA,EAAK,MAC9B,UAAWA,UAAcA,EAAK,MAC9B,UAAWA,UAAcA,EAAK,MAG9BU,gBAACC,yCACOX,OACJJ,IAAKA,EACLgB,UAAW,CAACb,EAA2BE,EAAgBY,UAAOZ,cAAgB,MAC9EJ,QACIM,GAAmBC,EACb,OACA,CACIU,OAAQV,EAAiB,OAASP,EAClCkB,OAAQV,EAAiB,OAASR,EAClCmB,QAASb,EAAkB,OAASN,KAIjDC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),l=require("../../utils/polymorphism.js"),o=require("../box/box.js"),i=require("./hidden-visually.module.css.js");exports.HiddenVisually=l.polymorphicComponent((function(l,s){return r.createElement(o.Box,e.objectSpread2(e.objectSpread2({},l),{},{ref:s,position:"absolute",overflow:"hidden",className:i.default.hiddenVisually}))}));
|
|
2
|
-
//# sourceMappingURL=hidden-visually.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hidden-visually.js","sources":["../../../src/new-components/hidden-visually/hidden-visually.tsx"],"sourcesContent":["import * as React from 'react'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { Box } from '../box'\nimport styles from './hidden-visually.module.css'\n\ntype Props = {\n children: React.ReactNode\n}\n\n/**\n * Provides content to assistive technologies while hiding it from the screen.\n *\n * @see Hidden for fully hiding content, and only under certain conditions.\n */\nconst HiddenVisually = polymorphicComponent<'div', Props, 'omitClassName'>(function HiddenVisually(\n props,\n ref,\n) {\n return (\n <Box\n {...props}\n ref={ref}\n position=\"absolute\"\n overflow=\"hidden\"\n className={styles.hiddenVisually}\n />\n )\n})\n\nexport { HiddenVisually }\n"],"names":["polymorphicComponent","props","ref","React","Box","position","overflow","className","styles","hiddenVisually"],"mappings":"4RAcuBA,wBAAoD,SACvEC,EACAC,GAEA,OACIC,gBAACC,yCACOH,OACJC,IAAKA,EACLG,SAAS,WACTC,SAAS,SACTC,UAAWC,UAAOC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react");const l=["tone"],n={info:function(l){return t.createElement("svg",e.objectSpread2({width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm0-1a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm1.18-11.84a.84.84 0 1 1-1.68 0 .84.84 0 0 1 1.68 0zM12.5 10a.5.5 0 0 1 .5.5V15h1a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1h1v-4h-1a.5.5 0 0 1 0-1h1.5z",fill:"currentColor"}))},positive:function(l){return t.createElement("svg",e.objectSpread2({width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm0-1a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm-4.354-8.104a.5.5 0 0 1 .708 0l2.146 2.147 5.146-5.147a.5.5 0 0 1 .708.708l-5.5 5.5a.5.5 0 0 1-.708 0l-2.5-2.5a.5.5 0 0 1 0-.708z",fill:"currentColor"}))},caution:function(l){return t.createElement("svg",e.objectSpread2({width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m3.254 16.992 7.018-12.03a2 2 0 0 1 3.455 0l7.018 12.03A2 2 0 0 1 19.018 20H4.982a2 2 0 0 1-1.728-3.008zm8.242-11.887a1 1 0 0 0-.36.36l-7.018 12.03A1 1 0 0 0 4.982 19h14.036a1 1 0 0 0 .864-1.504l-7.018-12.03a1 1 0 0 0-1.368-.36zM13 16.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-.014-7.014a.987.987 0 1 0-1.971.055l.236 4.25c.053.945 1.445.945 1.498 0l.236-4.25.001-.027v-.028z",fill:"currentColor"}))},critical:function(l){return t.createElement("svg",e.objectSpread2({width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17zM2.5 12a9.5 9.5 0 1 1 19 0 9.5 9.5 0 0 1-19 0zM13 15.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-.014-7.014A.987.987 0 0 0 12 7.5h-.027l-.028.002a.987.987 0 0 0-.93 1.04l.236 4.25c.053.944 1.445.944 1.498 0l.236-4.25.001-.028v-.027z",fill:"currentColor"}))}};exports.AlertIcon=function(r){let{tone:o}=r,a=e.objectWithoutProperties(r,l);const i=n[o];return i?t.createElement(i,e.objectSpread2({},a)):null};
|
|
2
|
-
//# sourceMappingURL=alert-icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alert-icon.js","sources":["../../../src/new-components/icons/alert-icon.tsx"],"sourcesContent":["import * as React from 'react'\nimport type { AlertTone } from '../common-types'\n\nconst alertIconForTone: Record<AlertTone, typeof AlertInfoIcon> = {\n info: AlertInfoIcon,\n positive: AlertPositiveIcon,\n caution: AlertCautionIcon,\n critical: AlertCriticalIcon,\n}\n\nfunction AlertIcon({ tone, ...props }: JSX.IntrinsicElements['svg'] & { tone: AlertTone }) {\n const Icon = alertIconForTone[tone]\n return Icon ? <Icon {...props} /> : null\n}\n\nfunction AlertInfoIcon(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg width=\"24\" height=\"24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm0-1a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm1.18-11.84a.84.84 0 1 1-1.68 0 .84.84 0 0 1 1.68 0zM12.5 10a.5.5 0 0 1 .5.5V15h1a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1h1v-4h-1a.5.5 0 0 1 0-1h1.5z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nfunction AlertPositiveIcon(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg width=\"24\" height=\"24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm0-1a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm-4.354-8.104a.5.5 0 0 1 .708 0l2.146 2.147 5.146-5.147a.5.5 0 0 1 .708.708l-5.5 5.5a.5.5 0 0 1-.708 0l-2.5-2.5a.5.5 0 0 1 0-.708z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nfunction AlertCautionIcon(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg width=\"24\" height=\"24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"m3.254 16.992 7.018-12.03a2 2 0 0 1 3.455 0l7.018 12.03A2 2 0 0 1 19.018 20H4.982a2 2 0 0 1-1.728-3.008zm8.242-11.887a1 1 0 0 0-.36.36l-7.018 12.03A1 1 0 0 0 4.982 19h14.036a1 1 0 0 0 .864-1.504l-7.018-12.03a1 1 0 0 0-1.368-.36zM13 16.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-.014-7.014a.987.987 0 1 0-1.971.055l.236 4.25c.053.945 1.445.945 1.498 0l.236-4.25.001-.027v-.028z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nfunction AlertCriticalIcon(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg width=\"24\" height=\"24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12 3.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17zM2.5 12a9.5 9.5 0 1 1 19 0 9.5 9.5 0 0 1-19 0zM13 15.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-.014-7.014A.987.987 0 0 0 12 7.5h-.027l-.028.002a.987.987 0 0 0-.93 1.04l.236 4.25c.053.944 1.445.944 1.498 0l.236-4.25.001-.028v-.027z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nexport { AlertIcon }\n"],"names":["alertIconForTone","info","props","React","width","height","fill","xmlns","fillRule","clipRule","d","positive","caution","critical","tone","Icon"],"mappings":"qKAGMA,EAA4D,CAC9DC,KAWJ,SAAuBC,GACnB,OACIC,uCAAKC,MAAM,KAAKC,OAAO,KAAKC,KAAK,OAAOC,MAAM,8BAAiCL,GAC3EC,wBACIK,SAAS,UACTC,SAAS,UACTC,EAAE,yNACFJ,KAAK,mBAjBjBK,SAuBJ,SAA2BT,GACvB,OACIC,uCAAKC,MAAM,KAAKC,OAAO,KAAKC,KAAK,OAAOC,MAAM,8BAAiCL,GAC3EC,wBACIK,SAAS,UACTC,SAAS,UACTC,EAAE,6MACFJ,KAAK,mBA7BjBM,QAmCJ,SAA0BV,GACtB,OACIC,uCAAKC,MAAM,KAAKC,OAAO,KAAKC,KAAK,OAAOC,MAAM,8BAAiCL,GAC3EC,wBACIK,SAAS,UACTC,SAAS,UACTC,EAAE,gXACFJ,KAAK,mBAzCjBO,SA+CJ,SAA2BX,GACvB,OACIC,uCAAKC,MAAM,KAAKC,OAAO,KAAKC,KAAK,OAAOC,MAAM,8BAAiCL,GAC3EC,wBACIK,SAAS,UACTC,SAAS,UACTC,EAAE,6QACFJ,KAAK,sCAnDrB,gBAAmBQ,KAAEA,KAASZ,iCAC1B,MAAMa,EAAOf,EAAiBc,GAC9B,OAAOC,EAAOZ,gBAACY,qBAASb,IAAY"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react");exports.CloseIcon=function(l){return r.createElement("svg",e.objectSpread2({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},l),r.createElement("path",{fill:"currentColor",d:"M5.146 5.146a.5.5 0 0 1 .708 0L12 11.293l6.146-6.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 0 .708L12.707 12l6.147 6.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.708 0L12 12.707l-6.146 6.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1 0-.708L11.293 12 5.146 5.854a.5.5 0 0 1-.057-.638z"}))};
|
|
2
|
-
//# sourceMappingURL=close-icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"close-icon.js","sources":["../../../src/new-components/icons/close-icon.tsx"],"sourcesContent":["import * as React from 'react'\n\nfunction CloseIcon(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M5.146 5.146a.5.5 0 0 1 .708 0L12 11.293l6.146-6.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 0 .708L12.707 12l6.147 6.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.708 0L12 12.707l-6.146 6.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1 0-.708L11.293 12 5.146 5.854a.5.5 0 0 1-.057-.638z\"\n />\n </svg>\n )\n}\n\nexport { CloseIcon }\n"],"names":["props","React","xmlns","width","height","fill","d"],"mappings":"sKAEA,SAAmBA,GACf,OACIC,uCAAKC,MAAM,6BAA6BC,MAAM,KAAKC,OAAO,MAASJ,GAC/DC,wBACII,KAAK,eACLC,EAAE"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react");exports.PasswordHiddenIcon=function(r){return t.createElement("svg",e.objectSpread2({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},r),t.createElement("g",{fill:"gray",fillRule:"evenodd",transform:"translate(2 4)"},t.createElement("path",{fillRule:"nonzero",d:"M13.047 2.888C11.962 2.294 10.944 2 10 2 7.56 2 4.63 3.966 1.288 8c1.133 1.368 2.218 2.497 3.253 3.394l-.708.708c-1.068-.93-2.173-2.085-3.315-3.464a1 1 0 0 1 0-1.276C4.031 3.121 7.192 1 10 1c1.196 0 2.456.385 3.78 1.154l-.733.734zm-6.02 10.263C8.084 13.72 9.076 14 10 14c2.443 0 5.373-1.969 8.712-6-1.11-1.34-2.176-2.453-3.193-3.341l.708-.709C17.437 5.013 18.695 6.363 20 8c-3.721 4.667-7.054 7-10 7-1.175 0-2.411-.371-3.709-1.113l.735-.736z"}),t.createElement("path",{fillRule:"nonzero",d:"M8.478 11.7l.79-.79a3 3 0 0 0 3.642-3.642l.79-.79A4 4 0 0 1 8.477 11.7zM6.334 9.602a4 4 0 0 1 5.268-5.268l-.78.78A3.002 3.002 0 0 0 7.113 8.82l-.78.78z"}),t.createElement("rect",{width:"21",height:"1",x:"-.722",y:"7.778",rx:".5",transform:"rotate(-45 9.778 8.278)"})))};
|
|
2
|
-
//# sourceMappingURL=password-hidden-icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"password-hidden-icon.js","sources":["../../../src/new-components/icons/password-hidden-icon.tsx"],"sourcesContent":["import * as React from 'react'\n\nfunction PasswordHiddenIcon(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" {...props}>\n <g fill=\"gray\" fillRule=\"evenodd\" transform=\"translate(2 4)\">\n <path\n fillRule=\"nonzero\"\n d=\"M13.047 2.888C11.962 2.294 10.944 2 10 2 7.56 2 4.63 3.966 1.288 8c1.133 1.368 2.218 2.497 3.253 3.394l-.708.708c-1.068-.93-2.173-2.085-3.315-3.464a1 1 0 0 1 0-1.276C4.031 3.121 7.192 1 10 1c1.196 0 2.456.385 3.78 1.154l-.733.734zm-6.02 10.263C8.084 13.72 9.076 14 10 14c2.443 0 5.373-1.969 8.712-6-1.11-1.34-2.176-2.453-3.193-3.341l.708-.709C17.437 5.013 18.695 6.363 20 8c-3.721 4.667-7.054 7-10 7-1.175 0-2.411-.371-3.709-1.113l.735-.736z\"\n />\n <path\n fillRule=\"nonzero\"\n d=\"M8.478 11.7l.79-.79a3 3 0 0 0 3.642-3.642l.79-.79A4 4 0 0 1 8.477 11.7zM6.334 9.602a4 4 0 0 1 5.268-5.268l-.78.78A3.002 3.002 0 0 0 7.113 8.82l-.78.78z\"\n />\n <rect\n width=\"21\"\n height=\"1\"\n x=\"-.722\"\n y=\"7.778\"\n rx=\".5\"\n transform=\"rotate(-45 9.778 8.278)\"\n />\n </g>\n </svg>\n )\n}\n\nexport { PasswordHiddenIcon }\n"],"names":["props","React","xmlns","width","height","fill","fillRule","transform","d","x","y","rx"],"mappings":"+KAEA,SAA4BA,GACxB,OACIC,uCAAKC,MAAM,6BAA6BC,MAAM,KAAKC,OAAO,MAASJ,GAC/DC,qBAAGI,KAAK,OAAOC,SAAS,UAAUC,UAAU,kBACxCN,wBACIK,SAAS,UACTE,EAAE,8bAENP,wBACIK,SAAS,UACTE,EAAE,4JAENP,wBACIE,MAAM,KACNC,OAAO,IACPK,EAAE,QACFC,EAAE,QACFC,GAAG,KACHJ,UAAU"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react");exports.PasswordVisibleIcon=function(t){return r.createElement("svg",e.objectSpread2({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},t),r.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"gray"},r.createElement("path",{d:"M21.358 12C17.825 7.65 14.692 5.5 12 5.5c-2.624 0-5.67 2.043-9.097 6.181a.5.5 0 0 0 0 .638C6.331 16.457 9.376 18.5 12 18.5c2.692 0 5.825-2.15 9.358-6.5z"}),r.createElement("circle",{cx:"12",cy:"12",r:"3.5"})))};
|
|
2
|
-
//# sourceMappingURL=password-visible-icon.js.map
|