@doist/reactist 9.2.0-beta.7 → 10.0.0-beta.10
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 +12 -2
- package/dist/reactist.cjs.development.js +1405 -842
- 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/components/color-picker/color-picker.js +1 -1
- package/es/components/color-picker/color-picker.js.map +1 -1
- package/es/components/{button/button.js → deprecated-button/deprecated-button.js} +7 -3
- package/es/components/deprecated-button/deprecated-button.js.map +1 -0
- package/es/components/{button → deprecated-button}/index.js +1 -1
- package/es/components/{button → deprecated-button}/index.js.map +0 -0
- package/es/components/{loading/loading.js → deprecated-loading/deprecated-loading.js} +3 -1
- package/es/components/deprecated-loading/deprecated-loading.js.map +1 -0
- package/es/components/{modal/modal.js → deprecated-modal/deprecated-modal.js} +9 -2
- package/es/components/deprecated-modal/deprecated-modal.js.map +1 -0
- package/es/components/{modal → deprecated-modal}/index.js +1 -1
- package/es/components/deprecated-modal/index.js.map +1 -0
- package/es/components/dropdown/dropdown.js +5 -3
- package/es/components/dropdown/dropdown.js.map +1 -1
- package/es/components/error-message/error-message.js +3 -1
- package/es/components/error-message/error-message.js.map +1 -1
- package/es/components/keyboard-shortcut/keyboard-shortcut.js +4 -2
- package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/es/components/menu/menu.js +22 -20
- package/es/components/menu/menu.js.map +1 -1
- package/es/components/range-input/range-input.js +1 -1
- package/es/components/range-input/range-input.js.map +1 -1
- package/es/components/select/select.js +1 -1
- package/es/components/select/select.js.map +1 -1
- package/es/hooks/use-previous/use-previous.js +26 -0
- package/es/hooks/use-previous/use-previous.js.map +1 -0
- package/es/index.js +11 -6
- package/es/index.js.map +1 -1
- package/es/new-components/base-button/base-button.js +70 -0
- package/es/new-components/base-button/base-button.js.map +1 -0
- package/es/new-components/base-button/base-button.module.css.js +4 -0
- package/es/new-components/base-button/base-button.module.css.js.map +1 -0
- package/es/new-components/base-field/base-field.js +29 -29
- package/es/new-components/base-field/base-field.js.map +1 -1
- package/es/new-components/base-field/base-field.module.css.js +1 -1
- package/es/new-components/box/box.js +28 -10
- package/es/new-components/box/box.js.map +1 -1
- package/es/new-components/box/box.module.css.js +1 -1
- package/es/new-components/box/margin.module.css.js +4 -0
- package/es/new-components/box/margin.module.css.js.map +1 -0
- package/es/new-components/box/padding.module.css.js +4 -0
- package/es/new-components/box/padding.module.css.js.map +1 -0
- package/es/new-components/button/button.js +40 -0
- package/es/new-components/button/button.js.map +1 -0
- package/es/new-components/button-link/button-link.js +25 -14
- package/es/new-components/button-link/button-link.js.map +1 -1
- package/es/new-components/checkbox-field/checkbox-field.js +45 -23
- package/es/new-components/checkbox-field/checkbox-field.js.map +1 -1
- package/es/new-components/checkbox-field/checkbox-field.module.css.js +1 -1
- package/es/new-components/columns/columns.js +28 -17
- package/es/new-components/columns/columns.js.map +1 -1
- package/es/new-components/columns/columns.module.css.js +1 -1
- package/es/new-components/divider/divider.js +3 -3
- package/es/new-components/divider/divider.js.map +1 -1
- package/es/new-components/divider/divider.module.css.js +1 -1
- package/es/new-components/heading/heading.js +9 -3
- package/es/new-components/heading/heading.js.map +1 -1
- package/es/new-components/heading/heading.module.css.js +1 -1
- package/es/new-components/hidden/hidden.js +54 -0
- package/es/new-components/hidden/hidden.js.map +1 -0
- package/es/new-components/hidden/hidden.module.css.js +4 -0
- package/es/new-components/hidden/hidden.module.css.js.map +1 -0
- package/es/new-components/hidden-visually/hidden-visually.js +22 -0
- package/es/new-components/hidden-visually/hidden-visually.js.map +1 -0
- package/es/new-components/hidden-visually/hidden-visually.module.css.js +4 -0
- package/es/new-components/hidden-visually/hidden-visually.module.css.js.map +1 -0
- package/es/new-components/inline/inline.js +9 -8
- package/es/new-components/inline/inline.js.map +1 -1
- package/es/new-components/loading/loading.js +33 -0
- package/es/new-components/loading/loading.js.map +1 -0
- package/es/new-components/modal/modal.js +201 -0
- package/es/new-components/modal/modal.js.map +1 -0
- package/es/new-components/modal/modal.module.css.js +4 -0
- package/es/new-components/modal/modal.module.css.js.map +1 -0
- package/es/new-components/password-field/password-field.js +7 -4
- package/es/new-components/password-field/password-field.js.map +1 -1
- package/es/new-components/responsive-props.js +21 -11
- package/es/new-components/responsive-props.js.map +1 -1
- package/es/new-components/select-field/select-field.js +12 -6
- package/es/new-components/select-field/select-field.js.map +1 -1
- package/es/new-components/select-field/select-field.module.css.js +1 -1
- package/es/new-components/spinner/spinner.js +26 -0
- package/es/new-components/spinner/spinner.js.map +1 -0
- package/es/new-components/spinner/spinner.module.css.js +4 -0
- package/es/new-components/spinner/spinner.module.css.js.map +1 -0
- package/es/new-components/stack/stack.js +23 -13
- package/es/new-components/stack/stack.js.map +1 -1
- package/es/new-components/switch-field/switch-field.js +47 -28
- package/es/new-components/switch-field/switch-field.js.map +1 -1
- package/es/new-components/switch-field/switch-field.module.css.js +1 -1
- package/es/new-components/tabs/tabs.js +142 -0
- package/es/new-components/tabs/tabs.js.map +1 -0
- package/es/new-components/tabs/tabs.module.css.js +4 -0
- package/es/new-components/tabs/tabs.module.css.js.map +1 -0
- package/es/new-components/text/text.js +15 -10
- package/es/new-components/text/text.js.map +1 -1
- package/es/new-components/text/text.module.css.js +1 -1
- package/es/new-components/text-area/text-area.js.map +1 -1
- package/es/new-components/text-area/text-area.module.css.js +1 -1
- package/es/new-components/text-field/text-field.js +4 -2
- package/es/new-components/text-field/text-field.js.map +1 -1
- package/es/new-components/text-field/text-field.module.css.js +1 -1
- package/es/new-components/text-link/text-link.js +8 -7
- package/es/new-components/text-link/text-link.js.map +1 -1
- package/es/utils/polymorphism.js +17 -0
- package/es/utils/polymorphism.js.map +1 -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/{button/button.d.ts → deprecated-button/deprecated-button.d.ts} +7 -1
- package/lib/components/{button/button.js → deprecated-button/deprecated-button.js} +2 -2
- package/lib/components/deprecated-button/deprecated-button.js.map +1 -0
- package/lib/components/{button/button.test.d.ts → deprecated-button/deprecated-button.test.d.ts} +0 -0
- package/lib/components/deprecated-button/index.d.ts +4 -0
- package/lib/components/{loading → deprecated-button}/index.js +1 -1
- package/lib/components/{button → deprecated-button}/index.js.map +0 -0
- package/lib/components/{loading/loading.d.ts → deprecated-loading/deprecated-loading.d.ts} +2 -1
- package/lib/components/{loading/loading.js → deprecated-loading/deprecated-loading.js} +1 -1
- package/lib/components/deprecated-loading/deprecated-loading.js.map +1 -0
- package/lib/components/{loading/Loading.test.d.ts → deprecated-loading/deprecated-loading.test.d.ts} +0 -0
- package/lib/components/deprecated-loading/index.d.ts +1 -0
- package/lib/components/{modal/modal.d.ts → deprecated-modal/deprecated-modal.d.ts} +6 -1
- package/lib/components/{modal/modal.js → deprecated-modal/deprecated-modal.js} +2 -2
- package/lib/components/deprecated-modal/deprecated-modal.js.map +1 -0
- package/lib/components/{modal/modal.test.d.ts → deprecated-modal/deprecated-modal.test.d.ts} +0 -0
- package/lib/components/{modal → deprecated-modal}/index.d.ts +3 -3
- package/lib/components/deprecated-modal/index.js +2 -0
- package/lib/components/deprecated-modal/index.js.map +1 -0
- package/lib/components/dropdown/dropdown.js +1 -1
- package/lib/components/dropdown/dropdown.js.map +1 -1
- package/lib/components/error-message/error-message.js +1 -1
- package/lib/components/error-message/error-message.js.map +1 -1
- package/lib/components/keyboard-shortcut/keyboard-shortcut.js +1 -1
- package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/lib/components/menu/index.d.ts +1 -1
- package/lib/components/menu/menu.d.ts +8 -10
- package/lib/components/menu/menu.js +1 -1
- package/lib/components/menu/menu.js.map +1 -1
- package/lib/components/range-input/range-input.js +1 -1
- package/lib/components/range-input/range-input.js.map +1 -1
- package/lib/components/select/select.js +1 -1
- package/lib/components/select/select.js.map +1 -1
- package/lib/components/tooltip/index.d.ts +1 -1
- package/lib/hooks/use-previous/index.d.ts +1 -0
- package/lib/hooks/use-previous/use-previous.d.ts +15 -0
- package/lib/hooks/use-previous/use-previous.js +2 -0
- package/lib/hooks/use-previous/use-previous.js.map +1 -0
- package/lib/index.d.ts +10 -5
- package/lib/index.js +1 -1
- package/lib/new-components/base-button/base-button.d.ts +65 -0
- package/lib/new-components/base-button/base-button.js +2 -0
- package/lib/new-components/base-button/base-button.js.map +1 -0
- package/lib/new-components/base-button/base-button.module.css.js +2 -0
- package/lib/new-components/base-button/base-button.module.css.js.map +1 -0
- package/lib/new-components/base-button/index.d.ts +1 -0
- package/lib/new-components/base-field/base-field.d.ts +53 -13
- package/lib/new-components/base-field/base-field.js +1 -1
- package/lib/new-components/base-field/base-field.js.map +1 -1
- package/lib/new-components/base-field/base-field.module.css.js +1 -1
- package/lib/new-components/box/box.d.ts +24 -13
- package/lib/new-components/box/box.js +1 -1
- package/lib/new-components/box/box.js.map +1 -1
- package/lib/new-components/box/box.module.css.js +1 -1
- package/lib/{components/tabs/tabs.test.d.ts → new-components/box/box.test.d.ts} +0 -0
- package/lib/new-components/box/margin.module.css.js +2 -0
- package/lib/new-components/box/margin.module.css.js.map +1 -0
- package/lib/new-components/box/padding.module.css.js +2 -0
- package/lib/new-components/box/padding.module.css.js.map +1 -0
- package/lib/new-components/button/button.d.ts +48 -0
- package/lib/new-components/button/button.js +2 -0
- package/lib/new-components/button/button.js.map +1 -0
- package/lib/new-components/button/button.test.d.ts +1 -0
- package/lib/new-components/button/index.d.ts +1 -0
- package/lib/new-components/button-link/button-link-story-wrapper.d.ts +7 -0
- package/lib/new-components/button-link/button-link.d.ts +14 -8
- package/lib/new-components/button-link/button-link.js +1 -1
- package/lib/new-components/button-link/button-link.js.map +1 -1
- package/lib/new-components/button-link/button-link.test.d.ts +1 -0
- package/lib/new-components/checkbox-field/checkbox-field.d.ts +3 -3
- package/lib/new-components/checkbox-field/checkbox-field.js +1 -1
- package/lib/new-components/checkbox-field/checkbox-field.js.map +1 -1
- package/lib/new-components/checkbox-field/checkbox-field.module.css.js +1 -1
- package/lib/new-components/checkbox-field/checkbox-field.test.d.ts +1 -0
- package/lib/new-components/columns/columns.d.ts +4 -5
- package/lib/new-components/columns/columns.js +1 -1
- package/lib/new-components/columns/columns.js.map +1 -1
- package/lib/new-components/columns/columns.module.css.js +1 -1
- package/lib/new-components/columns/columns.test.d.ts +1 -0
- package/lib/new-components/common-types.d.ts +2 -0
- package/lib/new-components/divider/divider.d.ts +2 -2
- package/lib/new-components/divider/divider.js +1 -1
- package/lib/new-components/divider/divider.js.map +1 -1
- package/lib/new-components/divider/divider.module.css.js +1 -1
- package/lib/new-components/heading/heading.d.ts +101 -2
- package/lib/new-components/heading/heading.js +1 -1
- package/lib/new-components/heading/heading.js.map +1 -1
- package/lib/new-components/heading/heading.module.css.js +1 -1
- package/lib/new-components/heading/heading.test.d.ts +1 -0
- package/lib/new-components/hidden/hidden.d.ts +49 -0
- package/lib/new-components/hidden/hidden.js +2 -0
- package/lib/new-components/hidden/hidden.js.map +1 -0
- package/lib/new-components/hidden/hidden.module.css.js +2 -0
- package/lib/new-components/hidden/hidden.module.css.js.map +1 -0
- package/lib/new-components/hidden/hidden.test.d.ts +1 -0
- package/lib/new-components/hidden/index.d.ts +1 -0
- package/lib/new-components/hidden-visually/hidden-visually.d.ts +11 -0
- package/lib/new-components/hidden-visually/hidden-visually.js +2 -0
- package/lib/new-components/hidden-visually/hidden-visually.js.map +1 -0
- package/lib/new-components/hidden-visually/hidden-visually.module.css.js +2 -0
- package/lib/new-components/hidden-visually/hidden-visually.module.css.js.map +1 -0
- package/lib/new-components/hidden-visually/hidden-visually.test.d.ts +1 -0
- package/lib/new-components/hidden-visually/index.d.ts +1 -0
- package/lib/new-components/inline/inline.d.ts +1 -2
- package/lib/new-components/inline/inline.js +1 -1
- package/lib/new-components/inline/inline.js.map +1 -1
- package/lib/new-components/inline/inline.test.d.ts +1 -0
- package/lib/new-components/loading/index.d.ts +1 -0
- package/lib/new-components/loading/loading.d.ts +26 -0
- package/lib/new-components/loading/loading.js +2 -0
- package/lib/new-components/loading/loading.js.map +1 -0
- package/lib/new-components/loading/loading.test.d.ts +1 -0
- package/lib/new-components/modal/index.d.ts +1 -0
- package/lib/new-components/modal/modal-stories-components.d.ts +35 -0
- package/lib/new-components/modal/modal.d.ts +151 -0
- package/lib/new-components/modal/modal.js +2 -0
- package/lib/new-components/modal/modal.js.map +1 -0
- package/lib/new-components/modal/modal.module.css.js +2 -0
- package/lib/new-components/modal/modal.module.css.js.map +1 -0
- package/lib/new-components/modal/modal.test.d.ts +1 -0
- package/lib/new-components/password-field/password-field.d.ts +2 -2
- package/lib/new-components/password-field/password-field.js +1 -1
- package/lib/new-components/password-field/password-field.js.map +1 -1
- package/lib/new-components/password-field/password-field.test.d.ts +1 -0
- package/lib/new-components/responsive-props.d.ts +12 -14
- package/lib/new-components/responsive-props.js +1 -1
- package/lib/new-components/responsive-props.js.map +1 -1
- package/lib/new-components/select-field/select-field.d.ts +4 -4
- package/lib/new-components/select-field/select-field.js +1 -1
- package/lib/new-components/select-field/select-field.js.map +1 -1
- package/lib/new-components/select-field/select-field.module.css.js +1 -1
- package/lib/new-components/select-field/select-field.test.d.ts +1 -0
- package/lib/new-components/spinner/index.d.ts +1 -0
- package/lib/new-components/spinner/spinner.d.ts +5 -0
- package/lib/new-components/spinner/spinner.js +2 -0
- package/lib/new-components/spinner/spinner.js.map +1 -0
- package/lib/new-components/spinner/spinner.module.css.js +2 -0
- package/lib/new-components/spinner/spinner.module.css.js.map +1 -0
- package/lib/new-components/stack/stack.d.ts +8 -5
- package/lib/new-components/stack/stack.js +1 -1
- package/lib/new-components/stack/stack.js.map +1 -1
- package/lib/new-components/stack/stack.test.d.ts +1 -0
- package/lib/new-components/switch-field/switch-field.d.ts +4 -4
- package/lib/new-components/switch-field/switch-field.js +1 -1
- package/lib/new-components/switch-field/switch-field.js.map +1 -1
- package/lib/new-components/switch-field/switch-field.module.css.js +1 -1
- package/lib/new-components/switch-field/switch-field.test.d.ts +1 -0
- package/lib/new-components/tabs/index.d.ts +1 -0
- package/lib/new-components/tabs/tabs.d.ts +92 -0
- package/lib/new-components/tabs/tabs.js +2 -0
- package/lib/new-components/tabs/tabs.js.map +1 -0
- package/lib/new-components/tabs/tabs.module.css.js +2 -0
- package/lib/new-components/tabs/tabs.module.css.js.map +1 -0
- package/lib/new-components/tabs/tabs.test.d.ts +1 -0
- package/lib/new-components/test-helpers.d.ts +9 -0
- package/lib/new-components/text/text.d.ts +38 -5
- package/lib/new-components/text/text.js +1 -1
- package/lib/new-components/text/text.js.map +1 -1
- package/lib/new-components/text/text.module.css.js +1 -1
- package/lib/new-components/text/text.test.d.ts +1 -0
- package/lib/new-components/text-area/text-area.d.ts +2 -2
- package/lib/new-components/text-area/text-area.js.map +1 -1
- package/lib/new-components/text-area/text-area.module.css.js +1 -1
- package/lib/new-components/text-field/text-field.d.ts +7 -4
- package/lib/new-components/text-field/text-field.js +1 -1
- package/lib/new-components/text-field/text-field.js.map +1 -1
- package/lib/new-components/text-field/text-field.module.css.js +1 -1
- package/lib/new-components/text-field/text-field.test.d.ts +1 -0
- package/lib/new-components/text-link/text-link.d.ts +1 -2
- package/lib/new-components/text-link/text-link.js +1 -1
- package/lib/new-components/text-link/text-link.js.map +1 -1
- package/lib/utils/polymorphism.d.ts +151 -0
- package/lib/utils/polymorphism.js +2 -0
- package/lib/utils/polymorphism.js.map +1 -0
- package/package.json +27 -23
- package/styles/alert.css +4 -3
- package/styles/base-button.css +6 -0
- package/styles/base-button.module.css.css +1 -0
- package/styles/base-field.css +7 -3
- package/styles/base-field.module.css.css +1 -1
- package/styles/box.css +3 -0
- package/styles/box.module.css.css +1 -1
- package/styles/checkbox-field.css +6 -2
- package/styles/checkbox-field.module.css.css +1 -1
- package/styles/color-picker.css +1 -1
- package/styles/columns.css +4 -3
- package/styles/columns.module.css.css +1 -1
- package/styles/deprecated-button.css +2 -0
- package/styles/deprecated-loading.css +1 -0
- package/styles/deprecated-modal.css +1 -0
- package/styles/divider.css +4 -2
- package/styles/divider.module.css.css +1 -1
- package/styles/dropdown.css +1 -1
- package/styles/heading.css +4 -2
- package/styles/heading.module.css.css +1 -1
- package/styles/hidden-visually.css +4 -0
- package/styles/hidden-visually.module.css.css +1 -0
- package/styles/hidden.css +4 -0
- package/styles/hidden.module.css.css +1 -0
- package/styles/inline.css +3 -1
- package/styles/loading.css +4 -1
- package/styles/margin.module.css.css +1 -0
- package/styles/menu.css +1 -1
- package/styles/modal.css +10 -1
- package/styles/modal.module.css.css +1 -0
- package/styles/notice.css +4 -3
- package/styles/padding.module.css.css +1 -0
- package/styles/password-field.css +8 -4
- package/styles/reactist.css +24 -19
- package/styles/select-field.css +8 -4
- package/styles/select-field.module.css.css +1 -1
- package/styles/spinner.module.css.css +1 -0
- package/styles/stack.css +4 -2
- package/styles/switch-field.css +9 -4
- package/styles/switch-field.module.css.css +1 -1
- package/styles/tabs.css +5 -1
- package/styles/tabs.module.css.css +1 -0
- package/styles/text-area.css +8 -4
- package/styles/text-area.module.css.css +1 -1
- package/styles/text-field.css +8 -4
- package/styles/text-field.module.css.css +1 -1
- package/styles/text-link.css +3 -1
- package/styles/text.css +4 -2
- package/styles/text.module.css.css +1 -1
- package/styles/tip.css +1 -1
- package/CHANGELOG.md +0 -492
- package/es/components/button/button.js.map +0 -1
- package/es/components/loading/index.js +0 -6
- package/es/components/loading/index.js.map +0 -1
- package/es/components/loading/loading.js.map +0 -1
- package/es/components/menu/type-helpers.js +0 -9
- package/es/components/menu/type-helpers.js.map +0 -1
- package/es/components/modal/index.js.map +0 -1
- package/es/components/modal/modal.js.map +0 -1
- package/es/components/tabs/tabs.js +0 -123
- package/es/components/tabs/tabs.js.map +0 -1
- package/es/new-components/button-link/button-link.module.css.js +0 -4
- package/es/new-components/button-link/button-link.module.css.js.map +0 -1
- package/es/new-components/loading-spinner/loading-spinner.js +0 -37
- package/es/new-components/loading-spinner/loading-spinner.js.map +0 -1
- package/es/new-components/loading-spinner/loading-spinner.module.css.js +0 -4
- package/es/new-components/loading-spinner/loading-spinner.module.css.js.map +0 -1
- package/es/new-components/type-helpers.js +0 -10
- package/es/new-components/type-helpers.js.map +0 -1
- package/lib/components/button/button.js.map +0 -1
- package/lib/components/button/index.d.ts +0 -4
- package/lib/components/button/index.js +0 -2
- package/lib/components/loading/index.d.ts +0 -2
- package/lib/components/loading/index.js.map +0 -1
- package/lib/components/loading/loading.js.map +0 -1
- package/lib/components/menu/type-helpers.d.ts +0 -25
- package/lib/components/menu/type-helpers.js +0 -2
- package/lib/components/menu/type-helpers.js.map +0 -1
- package/lib/components/modal/index.js +0 -2
- package/lib/components/modal/index.js.map +0 -1
- package/lib/components/modal/modal.js.map +0 -1
- package/lib/components/tabs/index.d.ts +0 -1
- package/lib/components/tabs/tabs.d.ts +0 -33
- package/lib/components/tabs/tabs.js +0 -2
- package/lib/components/tabs/tabs.js.map +0 -1
- package/lib/new-components/button-link/button-link.module.css.js +0 -2
- package/lib/new-components/button-link/button-link.module.css.js.map +0 -1
- package/lib/new-components/loading-spinner/index.d.ts +0 -1
- package/lib/new-components/loading-spinner/loading-spinner.d.ts +0 -8
- package/lib/new-components/loading-spinner/loading-spinner.js +0 -2
- package/lib/new-components/loading-spinner/loading-spinner.js.map +0 -1
- package/lib/new-components/loading-spinner/loading-spinner.module.css.js +0 -2
- package/lib/new-components/loading-spinner/loading-spinner.module.css.js.map +0 -1
- package/lib/new-components/type-helpers.d.ts +0 -26
- package/lib/new-components/type-helpers.js +0 -2
- package/lib/new-components/type-helpers.js.map +0 -1
- package/styles/button-link.css +0 -2
- package/styles/button-link.module.css.css +0 -1
- package/styles/button.css +0 -2
- package/styles/loading-spinner.module.css.css +0 -1
|
@@ -8,9 +8,11 @@ var React = require('react');
|
|
|
8
8
|
var React__default = _interopDefault(React);
|
|
9
9
|
var classNames = _interopDefault(require('classnames'));
|
|
10
10
|
var flattenChildren = _interopDefault(require('react-keyed-flatten-children'));
|
|
11
|
-
var VisuallyHidden = require('reakit/VisuallyHidden');
|
|
12
|
-
var reakitUtils = require('reakit-utils');
|
|
13
11
|
var Tooltip$1 = require('reakit/Tooltip');
|
|
12
|
+
var reakitUtils = require('reakit-utils');
|
|
13
|
+
var Tab$1 = require('reakit/Tab');
|
|
14
|
+
var dialog = require('@reach/dialog');
|
|
15
|
+
var FocusLock = _interopDefault(require('react-focus-lock'));
|
|
14
16
|
var ReactDOM = _interopDefault(require('react-dom'));
|
|
15
17
|
var PropTypes = _interopDefault(require('prop-types'));
|
|
16
18
|
var dayjs = _interopDefault(require('dayjs'));
|
|
@@ -96,13 +98,19 @@ function _assertThisInitialized(self) {
|
|
|
96
98
|
return self;
|
|
97
99
|
}
|
|
98
100
|
|
|
99
|
-
/* eslint-disable @typescript-eslint/
|
|
101
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
102
|
+
/**
|
|
103
|
+
* A wrapper to use React.forwardRef with polymorphic components in a type-safe manner. This is a
|
|
104
|
+
* convenience over merely using React.forwardRef directly, and then manually forcing the resulting
|
|
105
|
+
* value to be typed using `as PolymorphicComponent<…>`.
|
|
106
|
+
*
|
|
107
|
+
* @see PolymorphicComponent for details about what this type does
|
|
108
|
+
*/
|
|
100
109
|
|
|
101
|
-
function
|
|
110
|
+
function polymorphicComponent(render) {
|
|
102
111
|
return /*#__PURE__*/React.forwardRef(render);
|
|
103
112
|
}
|
|
104
113
|
|
|
105
|
-
var prefix = ['', 'tablet-', 'desktop-'];
|
|
106
114
|
/**
|
|
107
115
|
* Builds a css module class name for a given prop + prop-value combination.
|
|
108
116
|
*
|
|
@@ -126,9 +134,15 @@ function getClassNames(styles, property, value) {
|
|
|
126
134
|
return null;
|
|
127
135
|
}
|
|
128
136
|
|
|
129
|
-
var classList =
|
|
130
|
-
|
|
131
|
-
|
|
137
|
+
var classList = [];
|
|
138
|
+
|
|
139
|
+
if (typeof value === 'string') {
|
|
140
|
+
classList.push(styles[property + "-" + value]);
|
|
141
|
+
} else {
|
|
142
|
+
if (value.mobile) classList.push(styles[property + "-" + value.mobile]);
|
|
143
|
+
if (value.tablet) classList.push(styles["tablet-" + property + "-" + value.tablet]);
|
|
144
|
+
if (value.desktop) classList.push(styles["desktop-" + property + "-" + value.desktop]);
|
|
145
|
+
}
|
|
132
146
|
|
|
133
147
|
if ( !classList.every(Boolean)) {
|
|
134
148
|
// eslint-disable-next-line no-console
|
|
@@ -144,8 +158,9 @@ function getClassNames(styles, property, value) {
|
|
|
144
158
|
/**
|
|
145
159
|
* A mapping over a responsive prop value.
|
|
146
160
|
*
|
|
147
|
-
* Since response values can be
|
|
148
|
-
* to
|
|
161
|
+
* Since response values can be an object but also a scalar value, this helper makes it easier to
|
|
162
|
+
* to map the values when it's an object but keeps it consistent for the case when it is a scalar
|
|
163
|
+
* value as well.
|
|
149
164
|
*
|
|
150
165
|
* @param fromValue the responsive prop value
|
|
151
166
|
* @param mapper the mapping function
|
|
@@ -153,28 +168,35 @@ function getClassNames(styles, property, value) {
|
|
|
153
168
|
|
|
154
169
|
|
|
155
170
|
function mapResponsiveProp(fromValue, mapper) {
|
|
156
|
-
if (
|
|
157
|
-
return
|
|
171
|
+
if (!fromValue) {
|
|
172
|
+
return undefined;
|
|
158
173
|
}
|
|
159
174
|
|
|
160
|
-
if (
|
|
161
|
-
return fromValue
|
|
175
|
+
if (typeof fromValue !== 'object') {
|
|
176
|
+
return mapper(fromValue);
|
|
162
177
|
}
|
|
163
178
|
|
|
164
|
-
return
|
|
179
|
+
return {
|
|
180
|
+
mobile: fromValue.mobile ? mapper(fromValue.mobile) : undefined,
|
|
181
|
+
tablet: fromValue.tablet ? mapper(fromValue.tablet) : undefined,
|
|
182
|
+
desktop: fromValue.desktop ? mapper(fromValue.desktop) : undefined
|
|
183
|
+
};
|
|
165
184
|
}
|
|
166
185
|
|
|
167
|
-
var modules_54d944f2 = {"box":"
|
|
186
|
+
var modules_54d944f2 = {"box":"_26c5201d","position-absolute":"_77c3d8d1","position-fixed":"_37cb98fb","position-relative":"df16028f","position-sticky":"_4205abac","tablet-position-absolute":"d6993b5e","tablet-position-fixed":"a015e0f5","tablet-position-relative":"_236dd3b1","tablet-position-sticky":"b7ac4837","desktop-position-absolute":"fd93a726","desktop-position-fixed":"_49228edc","desktop-position-relative":"d972b518","desktop-position-sticky":"b2a2baf3","display-block":"_22f1edd1","display-flex":"c23d2d6f","display-inline":"_5359896d","display-inlineBlock":"a54a41a6","display-inlineFlex":"d02f3d43","display-none":"_760c0710","tablet-display-block":"_64e2ebe6","tablet-display-flex":"_25274f78","tablet-display-inline":"_2077d063","tablet-display-inlineBlock":"aaed581f","tablet-display-inlineFlex":"_1d4a6eb5","tablet-display-none":"_66f24c78","desktop-display-block":"_145cca89","desktop-display-flex":"_1861c899","desktop-display-inline":"_96a720c8","desktop-display-inlineBlock":"_56acf5d5","desktop-display-inlineFlex":"_2a268e4b","desktop-display-none":"b4f30b9e","minWidth-0":"_0b071847","minWidth-xsmall":"_8b67f007","minWidth-small":"e3ec3474","minWidth-medium":"_5cccd4fc","minWidth-large":"_06eeac65","minWidth-xlarge":"ee1b6344","maxWidth-xsmall":"_2df097d0","maxWidth-small":"b771df2a","maxWidth-medium":"_00ad4e35","maxWidth-large":"_4a848dab","maxWidth-xlarge":"bf216b15","maxWidth-full":"a60a7855","flexDirection-column":"_4cf1b6c9","flexDirection-row":"e056fa5a","tablet-flexDirection-column":"b9aa8d99","tablet-flexDirection-row":"_2e8b3442","desktop-flexDirection-column":"_2162c612","desktop-flexDirection-row":"_279bf1e4","flexWrap-wrap":"_346d3a71","flexWrap-nowrap":"_786fd122","flexShrink-0":"_4b864fc2","flexGrow-0":"_795f552f","flexGrow-1":"a68bcd0f","alignItems-flexStart":"_34e24973","alignItems-center":"_648380f4","alignItems-flexEnd":"_18b4e1d6","alignItems-baseline":"_805c1b65","tablet-alignItems-flexStart":"fd4006c2","tablet-alignItems-center":"c3ba10a7","tablet-alignItems-flexEnd":"_984cd304","tablet-alignItems-baseline":"_696cc167","desktop-alignItems-flexStart":"_74133d54","desktop-alignItems-center":"_92ab46df","desktop-alignItems-flexEnd":"_177026d9","desktop-alignItems-baseline":"ebd2f31f","justifyContent-flexStart":"_4969235b","justifyContent-center":"_9594db58","justifyContent-flexEnd":"_6789fdd3","justifyContent-spaceAround":"b9902d94","justifyContent-spaceBetween":"_3c3ae41b","justifyContent-spaceEvenly":"_8dce8767","tablet-justifyContent-flexStart":"_6bd82354","tablet-justifyContent-center":"_3044c29a","tablet-justifyContent-flexEnd":"_13da8745","tablet-justifyContent-spaceAround":"_981fa9c8","tablet-justifyContent-spaceBetween":"d34811a6","tablet-justifyContent-spaceEvenly":"_53e07124","desktop-justifyContent-flexStart":"e709f277","desktop-justifyContent-center":"abc87cc4","desktop-justifyContent-flexEnd":"ce410292","desktop-justifyContent-spaceBetween":"_5ab1bc04","overflow-hidden":"_11a684c0","overflow-auto":"_2c024f85","overflow-visible":"_4d4892bd","overflow-scroll":"_22ffbb40","width-full":"_330d9b0b","height-full":"fb8deb05","bg-default":"_133f5c00","bg-aside":"b2be7ffe","bg-highlight":"a45e67ff","bg-selected":"b90226b5","borderRadius-standard":"_6e988219","borderRadius-full":"_14cf204e","border-primary":"a710cfdd","border-secondary":"_52263feb","border-tertiary":"_546ec3ef","textAlign-start":"_7fa90cb9","textAlign-center":"_54c80396","textAlign-end":"e4b1ea49","textAlign-justify":"_0eecd510","tablet-textAlign-start":"a309e75d","tablet-textAlign-center":"_67fb1a07","tablet-textAlign-end":"_0fa851ec","tablet-textAlign-justify":"_585a0e34","desktop-textAlign-start":"_5f909690","desktop-textAlign-center":"_13e03993","desktop-textAlign-end":"f142a1cb","desktop-textAlign-justify":"_2bba79a9"};
|
|
187
|
+
|
|
188
|
+
var modules_b537a8ee = {"paddingTop-xsmall":"c4803194","paddingTop-small":"_4e9ab24b","paddingTop-medium":"_1d226e27","paddingTop-large":"eb6097f1","paddingTop-xlarge":"d3229ba4","paddingTop-xxlarge":"_47978ba4","tablet-paddingTop-xsmall":"f987719c","tablet-paddingTop-small":"_8dbc4b4d","tablet-paddingTop-medium":"ae44fe07","tablet-paddingTop-large":"ffe9548d","tablet-paddingTop-xlarge":"f2b76a44","tablet-paddingTop-xxlarge":"c6eb8f43","desktop-paddingTop-xsmall":"_8699b560","desktop-paddingTop-small":"_02c374b7","desktop-paddingTop-medium":"_0dd0332f","desktop-paddingTop-large":"da55f1f6","desktop-paddingTop-xlarge":"_8ef2a278","desktop-paddingTop-xxlarge":"_8b493b28","paddingRight-xsmall":"_211eebc7","paddingRight-small":"ad0ccf15","paddingRight-medium":"a03e39af","paddingRight-large":"f0941ead","paddingRight-xlarge":"e47c5a43","paddingRight-xxlarge":"e849a5cf","tablet-paddingRight-xsmall":"_85374228","tablet-paddingRight-small":"_89df37b9","tablet-paddingRight-medium":"_1cc50ebe","tablet-paddingRight-large":"_1060982b","tablet-paddingRight-xlarge":"be58847d","tablet-paddingRight-xxlarge":"_45093484","desktop-paddingRight-xsmall":"f8d99d6a","desktop-paddingRight-small":"efa076d9","desktop-paddingRight-medium":"e59caa64","desktop-paddingRight-large":"da42f46a","desktop-paddingRight-xlarge":"b3ee2580","desktop-paddingRight-xxlarge":"_3ef94658","paddingBottom-xsmall":"b0e6eab4","paddingBottom-small":"_9510d053","paddingBottom-medium":"d7af60c9","paddingBottom-large":"b75f86cd","paddingBottom-xlarge":"fbd4ce29","paddingBottom-xxlarge":"_33e3ad63","tablet-paddingBottom-xsmall":"f0302da7","tablet-paddingBottom-small":"_4f9b8012","tablet-paddingBottom-medium":"_4333e20e","tablet-paddingBottom-large":"_30bbc76c","tablet-paddingBottom-xlarge":"ba5a4008","tablet-paddingBottom-xxlarge":"_423a3b1a","desktop-paddingBottom-xsmall":"b40139b7","desktop-paddingBottom-small":"f96071fa","desktop-paddingBottom-medium":"fe803c9a","desktop-paddingBottom-large":"_01686eb9","desktop-paddingBottom-xlarge":"afa763d8","desktop-paddingBottom-xxlarge":"a95785f1","paddingLeft-xsmall":"cad4e2ec","paddingLeft-small":"d70b3c17","paddingLeft-medium":"_8c851bd6","paddingLeft-large":"_078feb3c","paddingLeft-xlarge":"_76ab968c","paddingLeft-xxlarge":"aaca85d7","tablet-paddingLeft-xsmall":"_5eb0e5aa","tablet-paddingLeft-small":"_0384fb4f","tablet-paddingLeft-medium":"edffff6f","tablet-paddingLeft-large":"_873b9a46","tablet-paddingLeft-xlarge":"_89105db5","tablet-paddingLeft-xxlarge":"db1966fe","desktop-paddingLeft-xsmall":"b17f826b","desktop-paddingLeft-small":"_6dc83610","desktop-paddingLeft-medium":"_3421b8b2","desktop-paddingLeft-large":"_68cec7a6","desktop-paddingLeft-xlarge":"_94bde020","desktop-paddingLeft-xxlarge":"b94ee579"};
|
|
168
189
|
|
|
169
|
-
var
|
|
170
|
-
var _ref2, _ref3, _ref4, _ref5;
|
|
190
|
+
var modules_131405ac = {"marginTop-xsmall":"c7813d79","marginTop-small":"d3449da6","marginTop-medium":"_4ea254c1","marginTop-large":"c0844f64","marginTop-xlarge":"_213145b4","marginTop-xxlarge":"df61c84c","marginTop--xsmall":"efe72b13","marginTop--small":"_870c2768","marginTop--medium":"_0b927c57","marginTop--large":"_461db014","marginTop--xlarge":"_2a3a8cb8","marginTop--xxlarge":"_9bcda921","tablet-marginTop-xsmall":"_6add01e4","tablet-marginTop-small":"_735ef86b","tablet-marginTop-medium":"_0477d068","tablet-marginTop-large":"_2c90af97","tablet-marginTop-xlarge":"_63a82db6","tablet-marginTop-xxlarge":"_03cd7726","tablet-marginTop--xsmall":"c986a62a","tablet-marginTop--small":"be2bdcdd","tablet-marginTop--medium":"_47d2686b","tablet-marginTop--large":"_25e5af9d","tablet-marginTop--xlarge":"ee82f441","tablet-marginTop--xxlarge":"a6f9d404","desktop-marginTop-xsmall":"_4d8d9a36","desktop-marginTop-small":"e813cee7","desktop-marginTop-medium":"_56975b7d","desktop-marginTop-large":"_53b367f6","desktop-marginTop-xlarge":"d69e7311","desktop-marginTop-xxlarge":"_92f57c7e","desktop-marginTop--xsmall":"_96880d3e","desktop-marginTop--small":"dc3f3555","desktop-marginTop--medium":"_86dd06bb","desktop-marginTop--large":"c93ef12e","desktop-marginTop--xlarge":"bc8fd4a2","desktop-marginTop--xxlarge":"b12a9124","marginRight-xsmall":"_6016f4fb","marginRight-small":"b85e3dfa","marginRight-medium":"_297575f4","marginRight-large":"b401ac6c","marginRight-xlarge":"dc3ec387","marginRight-xxlarge":"_24694604","marginRight--xsmall":"_8e9bf2ee","marginRight--small":"ae9d1115","marginRight--medium":"_14e46fc3","marginRight--large":"_3370631b","marginRight--xlarge":"_3f0e9b50","marginRight--xxlarge":"bc13e010","tablet-marginRight-xsmall":"_6fa1aae3","tablet-marginRight-small":"_2976c5cb","tablet-marginRight-medium":"_38d94802","tablet-marginRight-large":"db9569b5","tablet-marginRight-xlarge":"_4a52f06d","tablet-marginRight-xxlarge":"_8a0f0410","tablet-marginRight--xsmall":"e7d40e9d","tablet-marginRight--small":"_680fde91","tablet-marginRight--medium":"_021010ca","tablet-marginRight--large":"_9e52c87c","tablet-marginRight--xlarge":"_4d602613","tablet-marginRight--xxlarge":"_21b1b65a","desktop-marginRight-xsmall":"_7321bc07","desktop-marginRight-small":"fa1721f4","desktop-marginRight-medium":"_3fd7b4b8","desktop-marginRight-large":"_4fdc2f74","desktop-marginRight-xlarge":"c0254761","desktop-marginRight-xxlarge":"_710a5f09","desktop-marginRight--xsmall":"e08bee7f","desktop-marginRight--small":"e5ab73d2","desktop-marginRight--medium":"_5e731477","desktop-marginRight--large":"_0f57a22e","desktop-marginRight--xlarge":"_25f26ed3","desktop-marginRight--xxlarge":"_11a3b4e0","marginBottom-xsmall":"_6a4f69f7","marginBottom-small":"db26b033","marginBottom-medium":"c7313022","marginBottom-large":"a5885889","marginBottom-xlarge":"_33dfbd8e","marginBottom-xxlarge":"_795ad2de","marginBottom--xsmall":"a329dbd3","marginBottom--small":"_85e739fb","marginBottom--medium":"_681f65ff","marginBottom--large":"caf50d8f","marginBottom--xlarge":"_1e084cbf","marginBottom--xxlarge":"_3dfb1c7e","tablet-marginBottom-xsmall":"ef4735be","tablet-marginBottom-small":"de55afba","tablet-marginBottom-medium":"_0e33ce88","tablet-marginBottom-large":"_8ca391fc","tablet-marginBottom-xlarge":"_3a609d23","tablet-marginBottom-xxlarge":"_3e1177e4","tablet-marginBottom--xsmall":"d384884d","tablet-marginBottom--small":"_75254cec","tablet-marginBottom--medium":"_5d9f127d","tablet-marginBottom--large":"_835f1089","tablet-marginBottom--xlarge":"dad52a72","tablet-marginBottom--xxlarge":"_8703a4bf","desktop-marginBottom-xsmall":"_90fd20e9","desktop-marginBottom-small":"f3769191","desktop-marginBottom-medium":"_156410f8","desktop-marginBottom-large":"_7fed74d0","desktop-marginBottom-xlarge":"_477dc10e","desktop-marginBottom-xxlarge":"_85c82d89","desktop-marginBottom--xsmall":"_4f09c1e0","desktop-marginBottom--small":"_9523e048","desktop-marginBottom--medium":"efe10240","desktop-marginBottom--large":"c43971e6","desktop-marginBottom--xlarge":"f9b4da15","desktop-marginBottom--xxlarge":"a10fdf70","marginLeft-xsmall":"f9be90b4","marginLeft-small":"f53218d5","marginLeft-medium":"c4a9b3ab","marginLeft-large":"_5755e2c3","marginLeft-xlarge":"_33fc9354","marginLeft-xxlarge":"_4749a3bf","marginLeft--xsmall":"c76cb3c7","marginLeft--small":"_96003c07","marginLeft--medium":"_09988d07","marginLeft--large":"b4a486f6","marginLeft--xlarge":"f396e75e","marginLeft--xxlarge":"_81d1f26d","tablet-marginLeft-xsmall":"_0a46e8f1","tablet-marginLeft-small":"_57c970af","tablet-marginLeft-medium":"_4b6099d3","tablet-marginLeft-large":"_378fcff5","tablet-marginLeft-xlarge":"f8785663","tablet-marginLeft-xxlarge":"_72f957ee","tablet-marginLeft--xsmall":"_2288c7e1","tablet-marginLeft--small":"b27c1c05","tablet-marginLeft--medium":"_702cbb13","tablet-marginLeft--large":"_1a2748b4","tablet-marginLeft--xlarge":"b8c043a5","tablet-marginLeft--xxlarge":"_8dc8ff63","desktop-marginLeft-xsmall":"c2af646d","desktop-marginLeft-small":"c03d07be","desktop-marginLeft-medium":"_915fb1d3","desktop-marginLeft-large":"_64214ee1","desktop-marginLeft-xlarge":"_7be4a22c","desktop-marginLeft-xxlarge":"_5ec0a401","desktop-marginLeft--xsmall":"ea29f1ee","desktop-marginLeft--small":"c26652c7","desktop-marginLeft--medium":"c24f6af9","desktop-marginLeft--large":"c2671f27","desktop-marginLeft--xlarge":"cc51a04e","desktop-marginLeft--xxlarge":"fd581f54"};
|
|
171
191
|
|
|
172
|
-
|
|
173
|
-
|
|
192
|
+
var Box = /*#__PURE__*/polymorphicComponent(function Box(_ref, ref) {
|
|
193
|
+
var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
|
|
194
|
+
|
|
195
|
+
var _ref$as = _ref.as,
|
|
196
|
+
component = _ref$as === void 0 ? 'div' : _ref$as,
|
|
174
197
|
_ref$position = _ref.position,
|
|
175
198
|
position = _ref$position === void 0 ? 'static' : _ref$position,
|
|
176
|
-
|
|
177
|
-
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
199
|
+
display = _ref.display,
|
|
178
200
|
_ref$flexDirection = _ref.flexDirection,
|
|
179
201
|
flexDirection = _ref$flexDirection === void 0 ? 'row' : _ref$flexDirection,
|
|
180
202
|
flexWrap = _ref.flexWrap,
|
|
@@ -190,6 +212,8 @@ var Box = /*#__PURE__*/forwardRefWithAs(function Box(_ref, ref) {
|
|
|
190
212
|
borderRadius = _ref.borderRadius,
|
|
191
213
|
minWidth = _ref.minWidth,
|
|
192
214
|
maxWidth = _ref.maxWidth,
|
|
215
|
+
_ref$textAlign = _ref.textAlign,
|
|
216
|
+
textAlign = _ref$textAlign === void 0 ? 'start' : _ref$textAlign,
|
|
193
217
|
padding = _ref.padding,
|
|
194
218
|
paddingY = _ref.paddingY,
|
|
195
219
|
paddingX = _ref.paddingX,
|
|
@@ -197,91 +221,117 @@ var Box = /*#__PURE__*/forwardRefWithAs(function Box(_ref, ref) {
|
|
|
197
221
|
paddingRight = _ref.paddingRight,
|
|
198
222
|
paddingBottom = _ref.paddingBottom,
|
|
199
223
|
paddingLeft = _ref.paddingLeft,
|
|
224
|
+
margin = _ref.margin,
|
|
225
|
+
marginY = _ref.marginY,
|
|
226
|
+
marginX = _ref.marginX,
|
|
227
|
+
marginTop = _ref.marginTop,
|
|
228
|
+
marginRight = _ref.marginRight,
|
|
229
|
+
marginBottom = _ref.marginBottom,
|
|
230
|
+
marginLeft = _ref.marginLeft,
|
|
200
231
|
className = _ref.className,
|
|
201
232
|
children = _ref.children,
|
|
202
|
-
props = _objectWithoutPropertiesLoose(_ref, ["
|
|
233
|
+
props = _objectWithoutPropertiesLoose(_ref, ["as", "position", "display", "flexDirection", "flexWrap", "flexGrow", "flexShrink", "alignItems", "justifyContent", "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"]);
|
|
203
234
|
|
|
204
235
|
var resolvedPaddingTop = (_ref2 = paddingTop !== null && paddingTop !== void 0 ? paddingTop : paddingY) !== null && _ref2 !== void 0 ? _ref2 : padding;
|
|
205
236
|
var resolvedPaddingRight = (_ref3 = paddingRight !== null && paddingRight !== void 0 ? paddingRight : paddingX) !== null && _ref3 !== void 0 ? _ref3 : padding;
|
|
206
237
|
var resolvedPaddingBottom = (_ref4 = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : paddingY) !== null && _ref4 !== void 0 ? _ref4 : padding;
|
|
207
238
|
var resolvedPaddingLeft = (_ref5 = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : paddingX) !== null && _ref5 !== void 0 ? _ref5 : padding;
|
|
208
|
-
var
|
|
239
|
+
var resolvedMarginTop = (_ref6 = marginTop !== null && marginTop !== void 0 ? marginTop : marginY) !== null && _ref6 !== void 0 ? _ref6 : margin;
|
|
240
|
+
var resolvedMarginRight = (_ref7 = marginRight !== null && marginRight !== void 0 ? marginRight : marginX) !== null && _ref7 !== void 0 ? _ref7 : margin;
|
|
241
|
+
var resolvedMarginBottom = (_ref8 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : marginY) !== null && _ref8 !== void 0 ? _ref8 : margin;
|
|
242
|
+
var resolvedMarginLeft = (_ref9 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : marginX) !== null && _ref9 !== void 0 ? _ref9 : margin;
|
|
243
|
+
var omitFlex = !display || typeof display === 'string' && display !== 'flex' && display !== 'inlineFlex';
|
|
209
244
|
return /*#__PURE__*/React.createElement(component, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
210
|
-
className: classNames(className, modules_54d944f2.box, getClassNames(modules_54d944f2, 'display', display), position !== 'static' ? getClassNames(modules_54d944f2, 'position', position) : null, minWidth != null ? getClassNames(modules_54d944f2, 'minWidth', String(minWidth)) : null, getClassNames(modules_54d944f2, 'maxWidth', maxWidth),
|
|
245
|
+
className: classNames(className, modules_54d944f2.box, display ? getClassNames(modules_54d944f2, 'display', display) : null, position !== 'static' ? getClassNames(modules_54d944f2, 'position', position) : null, minWidth != null ? getClassNames(modules_54d944f2, 'minWidth', String(minWidth)) : null, getClassNames(modules_54d944f2, 'maxWidth', maxWidth), textAlign !== 'start' ? getClassNames(modules_54d944f2, 'textAlign', textAlign) : null, // padding
|
|
246
|
+
getClassNames(modules_b537a8ee, 'paddingTop', resolvedPaddingTop), getClassNames(modules_b537a8ee, 'paddingRight', resolvedPaddingRight), getClassNames(modules_b537a8ee, 'paddingBottom', resolvedPaddingBottom), getClassNames(modules_b537a8ee, 'paddingLeft', resolvedPaddingLeft), // margin
|
|
247
|
+
getClassNames(modules_131405ac, 'marginTop', resolvedMarginTop), getClassNames(modules_131405ac, 'marginRight', resolvedMarginRight), getClassNames(modules_131405ac, 'marginBottom', resolvedMarginBottom), getClassNames(modules_131405ac, 'marginLeft', resolvedMarginLeft), // flex props
|
|
248
|
+
omitFlex ? null : getClassNames(modules_54d944f2, 'flexDirection', flexDirection), omitFlex ? null : getClassNames(modules_54d944f2, 'flexWrap', flexWrap), omitFlex ? null : getClassNames(modules_54d944f2, 'alignItems', alignItems), omitFlex ? null : getClassNames(modules_54d944f2, 'justifyContent', justifyContent), flexShrink != null ? getClassNames(modules_54d944f2, 'flexShrink', String(flexShrink)) : null, flexGrow != null ? getClassNames(modules_54d944f2, 'flexGrow', String(flexGrow)) : null, // other props
|
|
249
|
+
getClassNames(modules_54d944f2, 'overflow', overflow), getClassNames(modules_54d944f2, 'width', width), getClassNames(modules_54d944f2, 'height', height), getClassNames(modules_54d944f2, 'bg', background), borderRadius !== 'none' ? getClassNames(modules_54d944f2, 'borderRadius', borderRadius) : null, border !== 'none' ? getClassNames(modules_54d944f2, 'border', border) : null) || undefined,
|
|
211
250
|
ref: ref
|
|
212
251
|
}), children);
|
|
213
252
|
});
|
|
214
253
|
|
|
215
|
-
var modules_67f2d07a = {"space-xsmall":"
|
|
254
|
+
var modules_67f2d07a = {"space-xsmall":"_6f59c771","column":"_91e05f0f","space-small":"_5a55af26","space-medium":"fa261310","space-large":"_6ebd4e46","space-xlarge":"_55ce4aea","space-xxlarge":"_04c9c3ac","tablet-space-xsmall":"ab76d8cd","tablet-space-small":"_14629bfb","tablet-space-medium":"_5b4e39ea","tablet-space-large":"ba270182","tablet-space-xlarge":"b96e7ec7","tablet-space-xxlarge":"d276612c","desktop-space-xsmall":"d7a73106","desktop-space-small":"_8f5e0e9e","desktop-space-medium":"_3a168411","desktop-space-large":"_0abcc12e","desktop-space-xlarge":"e0bafc60","desktop-space-xxlarge":"d2df9afd","columnWidth-auto":"b18d0b47","columnWidth-1-2":"_102a6b27","columnWidth-1-3":"_829872fe","columnWidth-2-3":"cf5aef9a","columnWidth-1-4":"_931bf714","columnWidth-3-4":"b0303130","columnWidth-1-5":"f6589a6f","columnWidth-2-5":"_2823aed9","columnWidth-3-5":"d00ba3bb","columnWidth-4-5":"_338f2d7c","tablet-tablet-space-xsmall":"_06582234"};
|
|
216
255
|
|
|
217
|
-
var
|
|
218
|
-
|
|
219
|
-
var Column = /*#__PURE__*/forwardRefWithAs(function Column(_ref, ref) {
|
|
256
|
+
var Column = /*#__PURE__*/polymorphicComponent(function Column(_ref, ref) {
|
|
220
257
|
var _ref$width = _ref.width,
|
|
221
258
|
width = _ref$width === void 0 ? 'auto' : _ref$width,
|
|
222
259
|
children = _ref.children,
|
|
223
|
-
|
|
260
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
261
|
+
props = _objectWithoutPropertiesLoose(_ref, ["width", "children", "exceptionallySetClassName"]);
|
|
224
262
|
|
|
225
|
-
return /*#__PURE__*/React.createElement(Box, Object.assign({
|
|
226
|
-
className: [modules_67f2d07a.column, width !== 'content' ? getClassNames(modules_67f2d07a, 'columnWidth', width.replace('/', '-')) : null],
|
|
263
|
+
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
264
|
+
className: [exceptionallySetClassName, modules_67f2d07a.column, width !== 'content' ? getClassNames(modules_67f2d07a, 'columnWidth', width.replace('/', '-')) : null],
|
|
227
265
|
minWidth: 0,
|
|
228
266
|
width: width !== 'content' ? 'full' : undefined,
|
|
267
|
+
height: "full",
|
|
229
268
|
flexShrink: width === 'content' ? 0 : undefined,
|
|
230
269
|
ref: ref
|
|
231
|
-
}
|
|
270
|
+
}), children);
|
|
232
271
|
});
|
|
233
|
-
var Columns = /*#__PURE__*/
|
|
272
|
+
var Columns = /*#__PURE__*/polymorphicComponent(function Columns(_ref2, ref) {
|
|
234
273
|
var space = _ref2.space,
|
|
235
|
-
align = _ref2.align,
|
|
236
|
-
|
|
274
|
+
_ref2$align = _ref2.align,
|
|
275
|
+
align = _ref2$align === void 0 ? 'left' : _ref2$align,
|
|
276
|
+
_ref2$alignY = _ref2.alignY,
|
|
277
|
+
alignY = _ref2$alignY === void 0 ? 'top' : _ref2$alignY,
|
|
237
278
|
collapseBelow = _ref2.collapseBelow,
|
|
238
279
|
children = _ref2.children,
|
|
239
|
-
|
|
280
|
+
exceptionallySetClassName = _ref2.exceptionallySetClassName,
|
|
281
|
+
props = _objectWithoutPropertiesLoose(_ref2, ["space", "align", "alignY", "collapseBelow", "children", "exceptionallySetClassName"]);
|
|
240
282
|
|
|
241
|
-
return /*#__PURE__*/React.createElement(Box, Object.assign({
|
|
242
|
-
className: [
|
|
243
|
-
flexDirection: collapseBelow === 'desktop' ? ['column', 'column', 'row'] : collapseBelow === 'tablet' ? ['column', 'row'] : 'row',
|
|
283
|
+
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
284
|
+
className: [exceptionallySetClassName, getClassNames(modules_67f2d07a, 'space', space)],
|
|
244
285
|
display: "flex",
|
|
286
|
+
flexDirection: collapseBelow === 'desktop' ? {
|
|
287
|
+
mobile: 'column',
|
|
288
|
+
tablet: 'column',
|
|
289
|
+
desktop: 'row'
|
|
290
|
+
} : collapseBelow === 'tablet' ? {
|
|
291
|
+
mobile: 'column',
|
|
292
|
+
tablet: 'row'
|
|
293
|
+
} : 'row',
|
|
245
294
|
alignItems: mapResponsiveProp(alignY, function (alignY) {
|
|
246
|
-
return alignY === 'top' ? 'flexStart' : alignY === 'bottom' ? 'flexEnd' :
|
|
295
|
+
return alignY === 'top' ? 'flexStart' : alignY === 'bottom' ? 'flexEnd' : alignY;
|
|
247
296
|
}),
|
|
248
297
|
justifyContent: mapResponsiveProp(align, function (align) {
|
|
249
|
-
return align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' :
|
|
298
|
+
return align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' : align;
|
|
250
299
|
}),
|
|
251
300
|
ref: ref
|
|
252
|
-
}
|
|
301
|
+
}), children);
|
|
253
302
|
});
|
|
254
303
|
|
|
255
|
-
var modules_c742c4d7 = {"
|
|
304
|
+
var modules_c742c4d7 = {"weight-primary":"_3f3a401c","weight-secondary":"_03b05b70","weight-tertiary":"b6f67ff8"};
|
|
256
305
|
|
|
257
306
|
function Divider(_ref) {
|
|
258
307
|
var _ref$weight = _ref.weight,
|
|
259
|
-
weight = _ref$weight === void 0 ? '
|
|
308
|
+
weight = _ref$weight === void 0 ? 'tertiary' : _ref$weight,
|
|
260
309
|
props = _objectWithoutPropertiesLoose(_ref, ["weight"]);
|
|
261
310
|
|
|
262
311
|
return /*#__PURE__*/React.createElement(Box, Object.assign({
|
|
263
|
-
|
|
264
|
-
className:
|
|
312
|
+
as: "hr",
|
|
313
|
+
className: getClassNames(modules_c742c4d7, 'weight', weight)
|
|
265
314
|
}, props));
|
|
266
315
|
}
|
|
267
316
|
|
|
268
317
|
var modules_da5d5c21 = {"space-xsmall":"_6b1279e0","space-small":"_0d82c42d","space-medium":"_556714e1","space-large":"e90b43fb","space-xlarge":"a9c34345","space-xxlarge":"aa102efe","tablet-space-xsmall":"_34d16157","tablet-space-small":"c7e0e54f","tablet-space-medium":"_7f2a4e4b","tablet-space-large":"ae256487","tablet-space-xlarge":"e88be0f7","tablet-space-xxlarge":"dc7bcb18","desktop-space-xsmall":"_853f3012","desktop-space-small":"_3bfaf758","desktop-space-medium":"_36462a93","desktop-space-large":"e73081b7","desktop-space-xlarge":"e22ec9dd","desktop-space-xxlarge":"_4a20bd12"};
|
|
269
318
|
|
|
270
|
-
var Inline = /*#__PURE__*/
|
|
271
|
-
var
|
|
319
|
+
var Inline = /*#__PURE__*/polymorphicComponent(function Inline(_ref, ref) {
|
|
320
|
+
var as = _ref.as,
|
|
272
321
|
space = _ref.space,
|
|
273
322
|
_ref$align = _ref.align,
|
|
274
323
|
align = _ref$align === void 0 ? 'left' : _ref$align,
|
|
275
324
|
_ref$alignY = _ref.alignY,
|
|
276
325
|
alignY = _ref$alignY === void 0 ? 'center' : _ref$alignY,
|
|
277
326
|
children = _ref.children,
|
|
278
|
-
|
|
327
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
328
|
+
props = _objectWithoutPropertiesLoose(_ref, ["as", "space", "align", "alignY", "children", "exceptionallySetClassName"]);
|
|
279
329
|
|
|
280
|
-
return /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Box, Object.assign({
|
|
281
|
-
|
|
330
|
+
return /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
331
|
+
as: as,
|
|
282
332
|
display: "flex",
|
|
283
333
|
flexWrap: "wrap",
|
|
284
|
-
className: getClassNames(modules_da5d5c21, 'space', space),
|
|
334
|
+
className: [exceptionallySetClassName, getClassNames(modules_da5d5c21, 'space', space)],
|
|
285
335
|
ref: ref,
|
|
286
336
|
alignItems: mapResponsiveProp(alignY, function (alignY) {
|
|
287
337
|
return alignY === 'top' ? 'flexStart' : alignY === 'bottom' ? 'flexEnd' : 'center';
|
|
@@ -289,29 +339,106 @@ var Inline = /*#__PURE__*/forwardRefWithAs(function Inline(_ref, ref) {
|
|
|
289
339
|
justifyContent: mapResponsiveProp(align, function (align) {
|
|
290
340
|
return align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' : 'center';
|
|
291
341
|
})
|
|
292
|
-
}
|
|
342
|
+
}), children));
|
|
293
343
|
});
|
|
294
344
|
|
|
295
|
-
var
|
|
296
|
-
|
|
345
|
+
var modules_3af3b7ac = {"space-xsmall":"_7b475ead","space-small":"_5641699f","space-medium":"_1a1c63e4","space-large":"_560f80a0","space-xlarge":"_84ffebbc","space-xxlarge":"b60a65cb","tablet-space-xsmall":"d808f5c3","tablet-space-small":"a51c76b3","tablet-space-medium":"_7185a7aa","tablet-space-large":"af82e610","tablet-space-xlarge":"_88b4ff46","tablet-space-xxlarge":"_9de15321","desktop-space-xsmall":"_6fb32d20","desktop-space-small":"_07ee315a","desktop-space-medium":"a270d7ec","desktop-space-large":"ea6ebb29","desktop-space-xlarge":"_35b36178","desktop-space-xxlarge":"_56c7dc23"};
|
|
346
|
+
|
|
347
|
+
var Stack = /*#__PURE__*/polymorphicComponent(function Stack(_ref, ref) {
|
|
348
|
+
var as = _ref.as,
|
|
297
349
|
space = _ref.space,
|
|
350
|
+
_ref$align = _ref.align,
|
|
351
|
+
align = _ref$align === void 0 ? 'start' : _ref$align,
|
|
298
352
|
_ref$dividers = _ref.dividers,
|
|
299
|
-
dividers = _ref$dividers === void 0 ?
|
|
353
|
+
dividers = _ref$dividers === void 0 ? 'none' : _ref$dividers,
|
|
300
354
|
children = _ref.children,
|
|
301
|
-
|
|
302
|
-
props = _objectWithoutPropertiesLoose(_ref, ["
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
355
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
356
|
+
props = _objectWithoutPropertiesLoose(_ref, ["as", "space", "align", "dividers", "children", "exceptionallySetClassName"]);
|
|
357
|
+
|
|
358
|
+
var alignProps = align === 'start' ? undefined : {
|
|
359
|
+
width: 'full',
|
|
360
|
+
flexDirection: 'column',
|
|
361
|
+
display: 'flex',
|
|
362
|
+
alignItems: mapResponsiveProp(align, function (align) {
|
|
363
|
+
return align === 'start' ? 'flexStart' : align === 'end' ? 'flexEnd' : 'center';
|
|
364
|
+
})
|
|
365
|
+
};
|
|
366
|
+
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, alignProps, {
|
|
367
|
+
as: as,
|
|
368
|
+
className: [exceptionallySetClassName, getClassNames(modules_3af3b7ac, 'space', space)],
|
|
307
369
|
ref: ref
|
|
308
|
-
}
|
|
370
|
+
}), dividers !== 'none' ? React.Children.map(flattenChildren(children), function (child, index) {
|
|
309
371
|
return index > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, {
|
|
310
|
-
weight:
|
|
372
|
+
weight: dividers
|
|
311
373
|
}), child) : child;
|
|
312
374
|
}) : children);
|
|
313
375
|
});
|
|
314
376
|
|
|
377
|
+
var modules_4689e97e = {"hiddenOnPrint":"_0e595dea"};
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* A component that allows to specify how to hide itself on certain responsive screen sizes, or on
|
|
381
|
+
* print media.
|
|
382
|
+
*
|
|
383
|
+
* @see HiddenProps
|
|
384
|
+
* @see HiddenVisually for hiding content only visually, while keeping it available for assistive
|
|
385
|
+
* technologies.
|
|
386
|
+
*/
|
|
387
|
+
|
|
388
|
+
var Hidden = /*#__PURE__*/polymorphicComponent(function Hidden(_ref, ref) {
|
|
389
|
+
var _ref$display = _ref.display,
|
|
390
|
+
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
391
|
+
children = _ref.children,
|
|
392
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
393
|
+
props = _objectWithoutPropertiesLoose(_ref, ["display", "children", "exceptionallySetClassName"]);
|
|
394
|
+
|
|
395
|
+
var hiddenOnPrint = 'print' in props && props.print;
|
|
396
|
+
var hiddenOnDesktop = ('above' in props);
|
|
397
|
+
var hiddenOnMobile = ('below' in props);
|
|
398
|
+
var hiddenOnTablet = 'below' in props && props.below === 'desktop' || 'above' in props && props.above === 'mobile';
|
|
399
|
+
|
|
400
|
+
if (hiddenOnDesktop && hiddenOnMobile) {
|
|
401
|
+
// eslint-disable-next-line no-console
|
|
402
|
+
console.warn('<Hidden /> should receive either above="…" or below="…" but not both');
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
if (!hiddenOnDesktop && !hiddenOnMobile && !hiddenOnPrint) {
|
|
406
|
+
// eslint-disable-next-line no-console
|
|
407
|
+
console.warn('<Hidden /> did not receive any criteria to hide itself');
|
|
408
|
+
} // We need to delete these so they do not get forwarded to the Box
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
if ('above' in props) delete props['above'];
|
|
412
|
+
if ('below' in props) delete props['below'];
|
|
413
|
+
if ('print' in props) delete props['print'];
|
|
414
|
+
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
415
|
+
ref: ref,
|
|
416
|
+
className: [exceptionallySetClassName, hiddenOnPrint ? modules_4689e97e.hiddenOnPrint : null],
|
|
417
|
+
display: hiddenOnDesktop && hiddenOnMobile ? 'none' : {
|
|
418
|
+
mobile: hiddenOnMobile ? 'none' : display,
|
|
419
|
+
tablet: hiddenOnTablet ? 'none' : display,
|
|
420
|
+
desktop: hiddenOnDesktop ? 'none' : display
|
|
421
|
+
}
|
|
422
|
+
}), children);
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
var modules_61c16c43 = {"hiddenVisually":"_618235b7"};
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Provides content to assistive technologies while hiding it from the screen.
|
|
429
|
+
*
|
|
430
|
+
* @see Hidden for fully hiding content, and only under certain conditions.
|
|
431
|
+
*/
|
|
432
|
+
|
|
433
|
+
var HiddenVisually = /*#__PURE__*/polymorphicComponent(function HiddenVisually(props, ref) {
|
|
434
|
+
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
435
|
+
ref: ref,
|
|
436
|
+
position: "absolute",
|
|
437
|
+
overflow: "hidden",
|
|
438
|
+
className: modules_61c16c43.hiddenVisually
|
|
439
|
+
}));
|
|
440
|
+
});
|
|
441
|
+
|
|
315
442
|
var alertIconForTone = {
|
|
316
443
|
info: AlertInfoIcon,
|
|
317
444
|
positive: AlertPositiveIcon,
|
|
@@ -424,7 +551,28 @@ function Alert(_ref) {
|
|
|
424
551
|
}, /*#__PURE__*/React.createElement(CloseIcon, null))) : null));
|
|
425
552
|
}
|
|
426
553
|
|
|
427
|
-
var
|
|
554
|
+
var modules_c7f5018f = {"svg":"_51539197","spinner":"_54fbe2b3","tint":"a0c466ed","fill":"_745b73d3"};
|
|
555
|
+
|
|
556
|
+
function Spinner(_ref) {
|
|
557
|
+
var _ref$size = _ref.size,
|
|
558
|
+
size = _ref$size === void 0 ? 24 : _ref$size;
|
|
559
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
560
|
+
"aria-hidden": true,
|
|
561
|
+
width: size,
|
|
562
|
+
height: size,
|
|
563
|
+
viewBox: "0 0 24 24",
|
|
564
|
+
className: modules_c7f5018f.svg
|
|
565
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
566
|
+
fill: "none",
|
|
567
|
+
fillRule: "nonzero"
|
|
568
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
569
|
+
className: modules_c7f5018f.tint,
|
|
570
|
+
d: "M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z"
|
|
571
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
572
|
+
className: modules_c7f5018f.fill,
|
|
573
|
+
d: "M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z"
|
|
574
|
+
})));
|
|
575
|
+
}
|
|
428
576
|
|
|
429
577
|
var sizeMapping = {
|
|
430
578
|
small: 24,
|
|
@@ -432,30 +580,24 @@ var sizeMapping = {
|
|
|
432
580
|
large: 48
|
|
433
581
|
};
|
|
434
582
|
|
|
435
|
-
function
|
|
583
|
+
function Loading(_ref) {
|
|
584
|
+
var _sizeMapping$size;
|
|
585
|
+
|
|
436
586
|
var _ref$size = _ref.size,
|
|
437
587
|
size = _ref$size === void 0 ? 'small' : _ref$size,
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
fillRule: "nonzero"
|
|
452
|
-
}, /*#__PURE__*/React__default.createElement("path", {
|
|
453
|
-
className: modules_aa6c8f31.spinner,
|
|
454
|
-
d: "M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z"
|
|
455
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
456
|
-
className: modules_aa6c8f31.spinnerBackground,
|
|
457
|
-
d: "M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z"
|
|
458
|
-
})))));
|
|
588
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
589
|
+
props = _objectWithoutPropertiesLoose(_ref, ["size", "exceptionallySetClassName"]);
|
|
590
|
+
|
|
591
|
+
var numericSize = (_sizeMapping$size = sizeMapping[size]) !== null && _sizeMapping$size !== void 0 ? _sizeMapping$size : sizeMapping.small;
|
|
592
|
+
return /*#__PURE__*/React__default.createElement(Box, Object.assign({}, props, {
|
|
593
|
+
className: exceptionallySetClassName,
|
|
594
|
+
display: "flex",
|
|
595
|
+
alignItems: "center",
|
|
596
|
+
justifyContent: "center",
|
|
597
|
+
role: "progressbar"
|
|
598
|
+
}), /*#__PURE__*/React__default.createElement(Spinner, {
|
|
599
|
+
size: numericSize
|
|
600
|
+
}));
|
|
459
601
|
}
|
|
460
602
|
|
|
461
603
|
var modules_1b547e7e = {"container":"_464500ae","tone-info":"_1abfe147","tone-positive":"_36ce9859","tone-caution":"f92214b7","tone-critical":"be6cf28e"};
|
|
@@ -479,7 +621,7 @@ function Notice(_ref) {
|
|
|
479
621
|
})), /*#__PURE__*/React.createElement(Column, null, children)));
|
|
480
622
|
}
|
|
481
623
|
|
|
482
|
-
var modules_949d2ff4 = {"heading":"
|
|
624
|
+
var modules_949d2ff4 = {"heading":"_2f45487c","weight-light":"a20cbde9","tone-secondary":"_75f44518","tone-danger":"_3952cc59","size-largest":"b71d22ef","size-larger":"f15346e2","size-smaller":"_3cae1428","lineClampMultipleLines":"_347f6fcd","lineClamp-1":"_895c0b16","lineClamp-2":"_2e4808bd","lineClamp-3":"_1bdb7bdc","lineClamp-4":"_159943ea","lineClamp-5":"e44e008d"};
|
|
483
625
|
|
|
484
626
|
var Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
485
627
|
var level = _ref.level,
|
|
@@ -490,182 +632,53 @@ var Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
|
490
632
|
tone = _ref$tone === void 0 ? 'normal' : _ref$tone,
|
|
491
633
|
children = _ref.children,
|
|
492
634
|
lineClamp = _ref.lineClamp,
|
|
493
|
-
|
|
635
|
+
align = _ref.align,
|
|
636
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
637
|
+
props = _objectWithoutPropertiesLoose(_ref, ["level", "weight", "size", "tone", "children", "lineClamp", "align", "exceptionallySetClassName"]);
|
|
494
638
|
|
|
495
639
|
// In TypeScript v4.1, this would be properly recognized without needing the type assertion
|
|
496
640
|
// https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types
|
|
497
641
|
var headingElementName = "h" + level;
|
|
498
642
|
var lineClampMultipleLines = typeof lineClamp === 'string' ? parseInt(lineClamp, 10) > 1 : (lineClamp || 0) > 1;
|
|
499
643
|
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
500
|
-
className: [modules_949d2ff4.heading, weight !== 'regular' ? getClassNames(modules_949d2ff4, 'weight', weight) : null, tone !== 'normal' ? getClassNames(modules_949d2ff4, 'tone', tone) : null, getClassNames(modules_949d2ff4, 'size', size), lineClampMultipleLines ? modules_949d2ff4.
|
|
501
|
-
|
|
644
|
+
className: [exceptionallySetClassName, modules_949d2ff4.heading, weight !== 'regular' ? getClassNames(modules_949d2ff4, 'weight', weight) : null, tone !== 'normal' ? getClassNames(modules_949d2ff4, 'tone', tone) : null, getClassNames(modules_949d2ff4, 'size', size), lineClampMultipleLines ? modules_949d2ff4.lineClampMultipleLines : null, lineClamp ? getClassNames(modules_949d2ff4, 'lineClamp', lineClamp.toString()) : null],
|
|
645
|
+
textAlign: align,
|
|
646
|
+
// Prevents emojis from being cut-off
|
|
647
|
+
// See https://github.com/Doist/reactist/pull/528
|
|
648
|
+
paddingRight: lineClamp ? 'xsmall' : undefined,
|
|
649
|
+
as: headingElementName,
|
|
502
650
|
ref: ref
|
|
503
651
|
}), children);
|
|
504
652
|
});
|
|
505
653
|
|
|
506
|
-
var modules_a9637dd3 = {"text":"
|
|
654
|
+
var modules_a9637dd3 = {"text":"c12d1277","size-caption":"c88e1204","size-copy":"_426d67ec","size-subtitle":"f978d6c7","weight-semibold":"_0c31eccd","weight-bold":"aba17bdd","tone-secondary":"_2767b43d","tone-danger":"e8ae531e","lineClampMultipleLines":"dc839422","lineClamp-1":"e2d23135","lineClamp-2":"_7c778b7e","lineClamp-3":"_5ff41166","lineClamp-4":"b7a4998e","lineClamp-5":"_6a7f8803"};
|
|
507
655
|
|
|
508
|
-
var Text = /*#__PURE__*/
|
|
509
|
-
var
|
|
510
|
-
component = _ref$component === void 0 ? 'span' : _ref$component,
|
|
656
|
+
var Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
657
|
+
var as = _ref.as,
|
|
511
658
|
_ref$size = _ref.size,
|
|
512
|
-
size = _ref$size === void 0 ? '
|
|
659
|
+
size = _ref$size === void 0 ? 'body' : _ref$size,
|
|
513
660
|
_ref$weight = _ref.weight,
|
|
514
661
|
weight = _ref$weight === void 0 ? 'regular' : _ref$weight,
|
|
515
662
|
_ref$tone = _ref.tone,
|
|
516
663
|
tone = _ref$tone === void 0 ? 'normal' : _ref$tone,
|
|
664
|
+
align = _ref.align,
|
|
517
665
|
children = _ref.children,
|
|
518
666
|
lineClamp = _ref.lineClamp,
|
|
519
|
-
|
|
667
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
668
|
+
props = _objectWithoutPropertiesLoose(_ref, ["as", "size", "weight", "tone", "align", "children", "lineClamp", "exceptionallySetClassName"]);
|
|
520
669
|
|
|
521
|
-
var lineClampMultipleLines = typeof lineClamp === 'string' ?
|
|
522
|
-
return /*#__PURE__*/React.createElement(Box, Object.assign({},
|
|
523
|
-
|
|
524
|
-
className: [modules_a9637dd3.text, size !== '
|
|
670
|
+
var lineClampMultipleLines = typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp !== null && lineClamp !== void 0 ? lineClamp : 1) > 1;
|
|
671
|
+
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
672
|
+
as: as,
|
|
673
|
+
className: [exceptionallySetClassName, modules_a9637dd3.text, size !== 'body' ? getClassNames(modules_a9637dd3, 'size', size) : null, weight !== 'regular' ? getClassNames(modules_a9637dd3, 'weight', weight) : null, tone !== 'normal' ? getClassNames(modules_a9637dd3, 'tone', tone) : null, lineClampMultipleLines ? modules_a9637dd3.lineClampMultipleLines : null, lineClamp ? getClassNames(modules_a9637dd3, 'lineClamp', lineClamp.toString()) : null],
|
|
674
|
+
textAlign: align,
|
|
675
|
+
// Prevents emojis from being cut-off
|
|
676
|
+
// See https://github.com/Doist/reactist/pull/528
|
|
677
|
+
paddingRight: lineClamp ? 'xsmall' : undefined,
|
|
525
678
|
ref: ref
|
|
526
679
|
}), children);
|
|
527
680
|
});
|
|
528
681
|
|
|
529
|
-
var modules_b0eaa640 = {"container":"e8c14f99"};
|
|
530
|
-
|
|
531
|
-
var ButtonLink = /*#__PURE__*/forwardRefWithAs(function ButtonLink(_ref, ref) {
|
|
532
|
-
var _ref$component = _ref.component,
|
|
533
|
-
component = _ref$component === void 0 ? 'a' : _ref$component,
|
|
534
|
-
variant = _ref.variant,
|
|
535
|
-
_ref$size = _ref.size,
|
|
536
|
-
size = _ref$size === void 0 ? 'default' : _ref$size,
|
|
537
|
-
_ref$openInNewTab = _ref.openInNewTab,
|
|
538
|
-
openInNewTab = _ref$openInNewTab === void 0 ? false : _ref$openInNewTab,
|
|
539
|
-
props = _objectWithoutPropertiesLoose(_ref, ["component", "variant", "size", "openInNewTab"]);
|
|
540
|
-
|
|
541
|
-
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
542
|
-
component: component,
|
|
543
|
-
display: "inlineFlex",
|
|
544
|
-
alignItems: "center",
|
|
545
|
-
justifyContent: "center",
|
|
546
|
-
className: [modules_b0eaa640.container, 'reactist_button', variant ? "reactist_button--" + variant : null, size !== 'default' ? "reactist_button--" + size : null],
|
|
547
|
-
ref: ref,
|
|
548
|
-
target: openInNewTab ? '_blank' : undefined,
|
|
549
|
-
rel: openInNewTab ? 'noopener noreferrer' : undefined
|
|
550
|
-
}));
|
|
551
|
-
});
|
|
552
|
-
|
|
553
|
-
var modules_3d05deee = {"container":"_12eda218"};
|
|
554
|
-
|
|
555
|
-
var TextLink = /*#__PURE__*/forwardRefWithAs(function TextLink(_ref, ref) {
|
|
556
|
-
var _ref$component = _ref.component,
|
|
557
|
-
component = _ref$component === void 0 ? 'a' : _ref$component,
|
|
558
|
-
_ref$openInNewTab = _ref.openInNewTab,
|
|
559
|
-
openInNewTab = _ref$openInNewTab === void 0 ? false : _ref$openInNewTab,
|
|
560
|
-
props = _objectWithoutPropertiesLoose(_ref, ["component", "tone", "openInNewTab"]);
|
|
561
|
-
|
|
562
|
-
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
563
|
-
component: component,
|
|
564
|
-
display: "inline",
|
|
565
|
-
className: modules_3d05deee.container,
|
|
566
|
-
ref: ref,
|
|
567
|
-
target: openInNewTab ? '_blank' : undefined,
|
|
568
|
-
rel: openInNewTab ? 'noopener noreferrer' : undefined
|
|
569
|
-
}));
|
|
570
|
-
});
|
|
571
|
-
|
|
572
|
-
var svgPath = {
|
|
573
|
-
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',
|
|
574
|
-
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',
|
|
575
|
-
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',
|
|
576
|
-
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'
|
|
577
|
-
};
|
|
578
|
-
|
|
579
|
-
function getPathKey(_ref) {
|
|
580
|
-
var checked = _ref.checked,
|
|
581
|
-
indeterminate = _ref.indeterminate,
|
|
582
|
-
disabled = _ref.disabled;
|
|
583
|
-
|
|
584
|
-
if (indeterminate) {
|
|
585
|
-
return 'mixed'; // indeterminate, when true, overrides the checked state
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
if (checked) {
|
|
589
|
-
return 'checked';
|
|
590
|
-
} // We only used 'filled' when unchecked AND disabled, because the default unchecked icon
|
|
591
|
-
// is not enough to convey the disabled state with opacity alone. For all other cases
|
|
592
|
-
// above, when disabled, we use the same icon the corresponds to that state, and the
|
|
593
|
-
// opacity conveys the fact that the checkbox is disabled.
|
|
594
|
-
// See https://twist.com/a/1585/ch/414345/t/2257308/c/65201390
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
if (disabled) {
|
|
598
|
-
return 'filled';
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
return 'unchecked';
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
function CheckboxIcon(_ref2) {
|
|
605
|
-
var checked = _ref2.checked,
|
|
606
|
-
indeterminate = _ref2.indeterminate,
|
|
607
|
-
disabled = _ref2.disabled,
|
|
608
|
-
props = _objectWithoutPropertiesLoose(_ref2, ["checked", "indeterminate", "disabled"]);
|
|
609
|
-
|
|
610
|
-
var pathKey = getPathKey({
|
|
611
|
-
checked: checked,
|
|
612
|
-
indeterminate: indeterminate,
|
|
613
|
-
disabled: disabled
|
|
614
|
-
});
|
|
615
|
-
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
616
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
617
|
-
width: "24",
|
|
618
|
-
height: "24",
|
|
619
|
-
viewBox: "0 0 24 24"
|
|
620
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
621
|
-
fill: "currentColor",
|
|
622
|
-
fillRule: "nonzero",
|
|
623
|
-
d: svgPath[pathKey]
|
|
624
|
-
}));
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
var modules_664a6a80 = {"container":"_6ba70fbf","checked":"_13189b71"};
|
|
628
|
-
|
|
629
|
-
function CheckboxField(_ref) {
|
|
630
|
-
var _ref2;
|
|
631
|
-
|
|
632
|
-
var label = _ref.label,
|
|
633
|
-
className = _ref.className,
|
|
634
|
-
style = _ref.style,
|
|
635
|
-
checked = _ref.checked,
|
|
636
|
-
_ref$indeterminate = _ref.indeterminate,
|
|
637
|
-
indeterminate = _ref$indeterminate === void 0 ? false : _ref$indeterminate,
|
|
638
|
-
props = _objectWithoutPropertiesLoose(_ref, ["label", "className", "style", "checked", "indeterminate"]);
|
|
639
|
-
|
|
640
|
-
if (!label && !props['aria-label'] && !props['aria-labelledby']) {
|
|
641
|
-
// eslint-disable-next-line no-console
|
|
642
|
-
console.warn('A Checkbox needs a label');
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
var checkboxRef = React.useRef(null);
|
|
646
|
-
React.useEffect(function setIndeterminate() {
|
|
647
|
-
if (checkboxRef.current) {
|
|
648
|
-
checkboxRef.current.indeterminate = indeterminate;
|
|
649
|
-
}
|
|
650
|
-
}, [indeterminate]);
|
|
651
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
652
|
-
component: "label",
|
|
653
|
-
display: "flex",
|
|
654
|
-
alignItems: "center",
|
|
655
|
-
className: [className, modules_664a6a80.container, (_ref2 = {}, _ref2[modules_664a6a80.checked] = checked, _ref2), 'focus-marker-enabled-within'],
|
|
656
|
-
style: style
|
|
657
|
-
}, /*#__PURE__*/React.createElement(VisuallyHidden.VisuallyHidden, null, /*#__PURE__*/React.createElement("input", Object.assign({}, props, {
|
|
658
|
-
ref: checkboxRef,
|
|
659
|
-
type: "checkbox",
|
|
660
|
-
checked: checked
|
|
661
|
-
}))), /*#__PURE__*/React.createElement(CheckboxIcon, {
|
|
662
|
-
"aria-hidden": true,
|
|
663
|
-
checked: checked,
|
|
664
|
-
indeterminate: indeterminate,
|
|
665
|
-
disabled: props.disabled
|
|
666
|
-
}), label ? /*#__PURE__*/React.createElement("span", null, label) : null);
|
|
667
|
-
}
|
|
668
|
-
|
|
669
682
|
var SHOW_DELAY = 500;
|
|
670
683
|
var HIDE_DELAY = 100;
|
|
671
684
|
|
|
@@ -777,79 +790,347 @@ function useDelay() {
|
|
|
777
790
|
}, [clearTimeouts]);
|
|
778
791
|
}
|
|
779
792
|
|
|
780
|
-
var
|
|
781
|
-
|
|
782
|
-
function uniqueId() {
|
|
783
|
-
return uid++;
|
|
784
|
-
}
|
|
793
|
+
var modules_b9569bce = {"label":"_1f20c88a","baseButton":"_623015f3","size-small":"_062de645","size-normal":"_55e2a6a9","size-large":"cab32a7c","disabled":"e71c191a","iconButton":"_368efc16","startIcon":"d35389c1","endIcon":"_900d41d8","variant-primary":"_7c95e162","variant-secondary":"_9cb889aa","variant-tertiary":"_611b5b28","variant-quaternary":"_80c2bb84","tone-destructive":"ee13c455"};
|
|
785
794
|
|
|
786
|
-
function
|
|
787
|
-
|
|
788
|
-
return prefix + "-" + num;
|
|
795
|
+
function preventDefault(event) {
|
|
796
|
+
event.preventDefault();
|
|
789
797
|
}
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
798
|
+
/**
|
|
799
|
+
* The component that powers `Button` and `ButtonLink`, where the button styling logic and some
|
|
800
|
+
* common functionality resides. This component is internal to Reactist.
|
|
801
|
+
*
|
|
802
|
+
* 🎨 [Figma](https://www.figma.com/file/LYlWNzvhMDh907l07mPPQk/Product-Web?node-id=4693%3A175143)
|
|
803
|
+
*
|
|
804
|
+
* @see Button
|
|
805
|
+
* @see ButtonLink
|
|
806
|
+
*/
|
|
796
807
|
|
|
797
|
-
return ref.current;
|
|
798
|
-
}
|
|
799
808
|
|
|
800
|
-
var
|
|
809
|
+
var BaseButton = /*#__PURE__*/polymorphicComponent(function BaseButton(_ref, ref) {
|
|
810
|
+
var _ref$as = _ref.as,
|
|
811
|
+
as = _ref$as === void 0 ? 'div' : _ref$as,
|
|
812
|
+
variant = _ref.variant,
|
|
813
|
+
_ref$tone = _ref.tone,
|
|
814
|
+
tone = _ref$tone === void 0 ? 'normal' : _ref$tone,
|
|
815
|
+
_ref$size = _ref.size,
|
|
816
|
+
size = _ref$size === void 0 ? 'normal' : _ref$size,
|
|
817
|
+
_ref$disabled = _ref.disabled,
|
|
818
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
819
|
+
_ref$loading = _ref.loading,
|
|
820
|
+
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
821
|
+
tooltip = _ref.tooltip,
|
|
822
|
+
onClick = _ref.onClick,
|
|
823
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
824
|
+
children = _ref.children,
|
|
825
|
+
startIcon = _ref.startIcon,
|
|
826
|
+
endIcon = _ref.endIcon,
|
|
827
|
+
icon = _ref.icon,
|
|
828
|
+
props = _objectWithoutPropertiesLoose(_ref, ["as", "variant", "tone", "size", "disabled", "loading", "tooltip", "onClick", "exceptionallySetClassName", "children", "startIcon", "endIcon", "icon"]);
|
|
801
829
|
|
|
802
|
-
|
|
803
|
-
var
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
830
|
+
var isDisabled = loading || disabled;
|
|
831
|
+
var buttonElement = /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
832
|
+
as: as,
|
|
833
|
+
ref: ref,
|
|
834
|
+
"aria-disabled": isDisabled,
|
|
835
|
+
onClick: isDisabled ? preventDefault : onClick,
|
|
836
|
+
className: [exceptionallySetClassName, modules_b9569bce.baseButton, modules_b9569bce["variant-" + variant], modules_b9569bce["tone-" + tone], modules_b9569bce["size-" + size], icon ? modules_b9569bce.iconButton : null, disabled ? modules_b9569bce.disabled : null]
|
|
837
|
+
}), icon ? loading && /*#__PURE__*/React.createElement(Spinner, null) || icon : /*#__PURE__*/React.createElement(React.Fragment, null, startIcon ? /*#__PURE__*/React.createElement(Box, {
|
|
838
|
+
display: "flex",
|
|
839
|
+
className: modules_b9569bce.startIcon,
|
|
840
|
+
"aria-hidden": true
|
|
841
|
+
}, loading && !endIcon ? /*#__PURE__*/React.createElement(Spinner, null) : startIcon) : null, children ? /*#__PURE__*/React.createElement("span", {
|
|
842
|
+
className: modules_b9569bce.label
|
|
843
|
+
}, children) : null, endIcon || loading && !startIcon ? /*#__PURE__*/React.createElement(Box, {
|
|
844
|
+
display: "flex",
|
|
845
|
+
className: modules_b9569bce.endIcon,
|
|
846
|
+
"aria-hidden": true
|
|
847
|
+
}, loading ? /*#__PURE__*/React.createElement(Spinner, null) : endIcon) : null)); // If it's an icon-only button, make sure it uses the aria-label as tooltip if no tooltip was provided
|
|
848
|
+
|
|
849
|
+
var tooltipContent = icon ? tooltip !== null && tooltip !== void 0 ? tooltip : props['aria-label'] : tooltip;
|
|
850
|
+
return tooltipContent ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
851
|
+
content: tooltipContent
|
|
852
|
+
}, buttonElement) : buttonElement;
|
|
853
|
+
});
|
|
813
854
|
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
hidden = _ref2.hidden,
|
|
823
|
-
props = _objectWithoutPropertiesLoose(_ref2, ["label", "secondaryLabel", "auxiliaryLabel", "hint", "className", "children", "maxWidth", "hidden"]);
|
|
855
|
+
/**
|
|
856
|
+
* A semantic button that also looks like a button, and provides all the necessary visual variants.
|
|
857
|
+
* It follows the [WAI-ARIA Button Pattern](https://www.w3.org/TR/wai-aria-practices/#button).
|
|
858
|
+
*
|
|
859
|
+
* 🎨 [Figma](https://www.figma.com/file/LYlWNzvhMDh907l07mPPQk/Product-Web?node-id=4693%3A175143)
|
|
860
|
+
*
|
|
861
|
+
* @see ButtonLink
|
|
862
|
+
*/
|
|
824
863
|
|
|
825
|
-
|
|
826
|
-
var
|
|
827
|
-
|
|
864
|
+
var Button = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
|
|
865
|
+
var variant = _ref.variant,
|
|
866
|
+
_ref$tone = _ref.tone,
|
|
867
|
+
tone = _ref$tone === void 0 ? 'normal' : _ref$tone,
|
|
868
|
+
_ref$size = _ref.size,
|
|
869
|
+
size = _ref$size === void 0 ? 'normal' : _ref$size,
|
|
870
|
+
_ref$type = _ref.type,
|
|
871
|
+
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
872
|
+
_ref$disabled = _ref.disabled,
|
|
873
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
874
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
875
|
+
props = _objectWithoutPropertiesLoose(_ref, ["variant", "tone", "size", "type", "disabled", "exceptionallySetClassName"]);
|
|
876
|
+
|
|
877
|
+
return /*#__PURE__*/React.createElement(BaseButton, Object.assign({}, props, {
|
|
878
|
+
as: "button",
|
|
879
|
+
ref: ref,
|
|
880
|
+
variant: variant,
|
|
881
|
+
tone: tone,
|
|
882
|
+
size: size,
|
|
883
|
+
type: type,
|
|
884
|
+
disabled: disabled,
|
|
885
|
+
exceptionallySetClassName: exceptionallySetClassName
|
|
886
|
+
}));
|
|
887
|
+
});
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* A semantic link that looks like a button, exactly matching the `Button` component in all visual
|
|
891
|
+
* aspects.
|
|
892
|
+
*
|
|
893
|
+
*🎨 [Figma](https://www.figma.com/file/LYlWNzvhMDh907l07mPPQk/Product-Web?node-id=4693%3A175143)
|
|
894
|
+
*
|
|
895
|
+
* @see Button
|
|
896
|
+
*/
|
|
897
|
+
|
|
898
|
+
var ButtonLink = /*#__PURE__*/polymorphicComponent(function ButtonLink(_ref, ref) {
|
|
899
|
+
var _ref$as = _ref.as,
|
|
900
|
+
as = _ref$as === void 0 ? 'a' : _ref$as,
|
|
901
|
+
variant = _ref.variant,
|
|
902
|
+
_ref$tone = _ref.tone,
|
|
903
|
+
tone = _ref$tone === void 0 ? 'normal' : _ref$tone,
|
|
904
|
+
_ref$size = _ref.size,
|
|
905
|
+
size = _ref$size === void 0 ? 'normal' : _ref$size,
|
|
906
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
907
|
+
_ref$openInNewTab = _ref.openInNewTab,
|
|
908
|
+
openInNewTab = _ref$openInNewTab === void 0 ? false : _ref$openInNewTab,
|
|
909
|
+
props = _objectWithoutPropertiesLoose(_ref, ["as", "variant", "tone", "size", "exceptionallySetClassName", "openInNewTab"]);
|
|
910
|
+
|
|
911
|
+
return /*#__PURE__*/React.createElement(BaseButton, Object.assign({}, props, {
|
|
912
|
+
as: as,
|
|
913
|
+
ref: ref,
|
|
914
|
+
variant: variant,
|
|
915
|
+
tone: tone,
|
|
916
|
+
size: size,
|
|
917
|
+
exceptionallySetClassName: exceptionallySetClassName,
|
|
918
|
+
target: openInNewTab ? '_blank' : undefined,
|
|
919
|
+
rel: openInNewTab ? 'noopener noreferrer' : undefined
|
|
920
|
+
}));
|
|
921
|
+
});
|
|
922
|
+
|
|
923
|
+
var modules_3d05deee = {"container":"_12eda218"};
|
|
924
|
+
|
|
925
|
+
var TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref) {
|
|
926
|
+
var _ref$as = _ref.as,
|
|
927
|
+
as = _ref$as === void 0 ? 'a' : _ref$as,
|
|
928
|
+
_ref$openInNewTab = _ref.openInNewTab,
|
|
929
|
+
openInNewTab = _ref$openInNewTab === void 0 ? false : _ref$openInNewTab,
|
|
930
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
931
|
+
props = _objectWithoutPropertiesLoose(_ref, ["as", "openInNewTab", "exceptionallySetClassName"]);
|
|
932
|
+
|
|
933
|
+
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
934
|
+
as: as,
|
|
935
|
+
display: "inline",
|
|
936
|
+
className: [exceptionallySetClassName, modules_3d05deee.container],
|
|
937
|
+
ref: ref,
|
|
938
|
+
target: openInNewTab ? '_blank' : undefined,
|
|
939
|
+
rel: openInNewTab ? 'noopener noreferrer' : undefined
|
|
940
|
+
}));
|
|
941
|
+
});
|
|
942
|
+
|
|
943
|
+
var svgPath = {
|
|
944
|
+
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',
|
|
945
|
+
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',
|
|
946
|
+
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',
|
|
947
|
+
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'
|
|
948
|
+
};
|
|
949
|
+
|
|
950
|
+
function getPathKey(_ref) {
|
|
951
|
+
var checked = _ref.checked,
|
|
952
|
+
indeterminate = _ref.indeterminate,
|
|
953
|
+
disabled = _ref.disabled;
|
|
954
|
+
|
|
955
|
+
if (indeterminate) {
|
|
956
|
+
return 'mixed'; // indeterminate, when true, overrides the checked state
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
if (checked) {
|
|
960
|
+
return 'checked';
|
|
961
|
+
} // We only used 'filled' when unchecked AND disabled, because the default unchecked icon
|
|
962
|
+
// is not enough to convey the disabled state with opacity alone. For all other cases
|
|
963
|
+
// above, when disabled, we use the same icon the corresponds to that state, and the
|
|
964
|
+
// opacity conveys the fact that the checkbox is disabled.
|
|
965
|
+
// See https://twist.com/a/1585/ch/414345/t/2257308/c/65201390
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
if (disabled) {
|
|
969
|
+
return 'filled';
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
return 'unchecked';
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
function CheckboxIcon(_ref2) {
|
|
976
|
+
var checked = _ref2.checked,
|
|
977
|
+
indeterminate = _ref2.indeterminate,
|
|
978
|
+
disabled = _ref2.disabled,
|
|
979
|
+
props = _objectWithoutPropertiesLoose(_ref2, ["checked", "indeterminate", "disabled"]);
|
|
980
|
+
|
|
981
|
+
var pathKey = getPathKey({
|
|
982
|
+
checked: checked,
|
|
983
|
+
indeterminate: indeterminate,
|
|
984
|
+
disabled: disabled
|
|
985
|
+
});
|
|
986
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
987
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
988
|
+
width: "24",
|
|
989
|
+
height: "24",
|
|
990
|
+
viewBox: "0 0 24 24"
|
|
991
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
992
|
+
fill: "currentColor",
|
|
993
|
+
fillRule: "nonzero",
|
|
994
|
+
d: svgPath[pathKey]
|
|
995
|
+
}));
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
var modules_664a6a80 = {"container":"f9e0a1b8","disabled":"_01411889","checked":"ffdfd8fb"};
|
|
999
|
+
|
|
1000
|
+
var CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref, ref) {
|
|
1001
|
+
var _ref2, _props$checked, _props$checked2;
|
|
1002
|
+
|
|
1003
|
+
var label = _ref.label,
|
|
1004
|
+
disabled = _ref.disabled,
|
|
1005
|
+
indeterminate = _ref.indeterminate,
|
|
1006
|
+
defaultChecked = _ref.defaultChecked,
|
|
1007
|
+
_onChange = _ref.onChange,
|
|
1008
|
+
props = _objectWithoutPropertiesLoose(_ref, ["label", "disabled", "indeterminate", "defaultChecked", "onChange"]);
|
|
1009
|
+
|
|
1010
|
+
var isControlledComponent = typeof props.checked === 'boolean';
|
|
1011
|
+
|
|
1012
|
+
if (typeof indeterminate === 'boolean' && !isControlledComponent) {
|
|
1013
|
+
// eslint-disable-next-line no-console
|
|
1014
|
+
console.warn('Cannot use indeterminate on an uncontrolled checkbox');
|
|
1015
|
+
indeterminate = undefined;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
if (!label && !props['aria-label'] && !props['aria-labelledby']) {
|
|
1019
|
+
// eslint-disable-next-line no-console
|
|
1020
|
+
console.warn('A Checkbox needs a label');
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
var _React$useState = React.useState((_ref2 = (_props$checked = props.checked) !== null && _props$checked !== void 0 ? _props$checked : defaultChecked) !== null && _ref2 !== void 0 ? _ref2 : false),
|
|
1024
|
+
checkedState = _React$useState[0],
|
|
1025
|
+
setChecked = _React$useState[1];
|
|
1026
|
+
|
|
1027
|
+
var isChecked = (_props$checked2 = props.checked) !== null && _props$checked2 !== void 0 ? _props$checked2 : checkedState;
|
|
1028
|
+
var internalRef = React.useRef(null);
|
|
1029
|
+
var combinedRef = reakitUtils.useForkRef(internalRef, ref);
|
|
1030
|
+
React.useEffect(function setIndeterminate() {
|
|
1031
|
+
if (internalRef.current && typeof indeterminate === 'boolean') {
|
|
1032
|
+
internalRef.current.indeterminate = indeterminate;
|
|
1033
|
+
}
|
|
1034
|
+
}, [indeterminate]);
|
|
828
1035
|
return /*#__PURE__*/React.createElement(Box, {
|
|
1036
|
+
as: "label",
|
|
1037
|
+
display: "flex",
|
|
1038
|
+
alignItems: "center",
|
|
1039
|
+
className: [modules_664a6a80.container, disabled ? modules_664a6a80.disabled : null, isChecked ? modules_664a6a80.checked : null, 'focus-marker-enabled-within']
|
|
1040
|
+
}, /*#__PURE__*/React.createElement(HiddenVisually, null, /*#__PURE__*/React.createElement("input", Object.assign({}, props, {
|
|
1041
|
+
ref: combinedRef,
|
|
1042
|
+
type: "checkbox",
|
|
1043
|
+
checked: isChecked,
|
|
1044
|
+
disabled: disabled,
|
|
1045
|
+
onChange: function onChange(event) {
|
|
1046
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(event);
|
|
1047
|
+
|
|
1048
|
+
if (!event.defaultPrevented) {
|
|
1049
|
+
setChecked(event.currentTarget.checked);
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
}))), /*#__PURE__*/React.createElement(CheckboxIcon, {
|
|
1053
|
+
"aria-hidden": true,
|
|
1054
|
+
checked: isChecked,
|
|
1055
|
+
indeterminate: indeterminate,
|
|
1056
|
+
disabled: disabled
|
|
1057
|
+
}), label ? /*#__PURE__*/React.createElement(Text, null, label) : null);
|
|
1058
|
+
});
|
|
1059
|
+
|
|
1060
|
+
var uid = 0;
|
|
1061
|
+
|
|
1062
|
+
function uniqueId() {
|
|
1063
|
+
return uid++;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
function generateElementId(prefix) {
|
|
1067
|
+
var num = uniqueId();
|
|
1068
|
+
return prefix + "-" + num;
|
|
1069
|
+
}
|
|
1070
|
+
function useId(providedId) {
|
|
1071
|
+
var ref = React.useRef(providedId !== null && providedId !== void 0 ? providedId : null);
|
|
1072
|
+
|
|
1073
|
+
if (!ref.current) {
|
|
1074
|
+
ref.current = generateElementId('element');
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
return ref.current;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
var modules_540a88ff = {"container":"ed7d894c","primaryLabel":"_22213081","secondaryLabel":"be8637dd","auxiliaryLabel":"_72b46ad5"};
|
|
1081
|
+
|
|
1082
|
+
function FieldHint(props) {
|
|
1083
|
+
return /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
1084
|
+
as: "p",
|
|
1085
|
+
tone: "secondary",
|
|
1086
|
+
size: "copy"
|
|
1087
|
+
}, props));
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
function BaseField(_ref) {
|
|
1091
|
+
var label = _ref.label,
|
|
1092
|
+
secondaryLabel = _ref.secondaryLabel,
|
|
1093
|
+
auxiliaryLabel = _ref.auxiliaryLabel,
|
|
1094
|
+
hint = _ref.hint,
|
|
1095
|
+
className = _ref.className,
|
|
1096
|
+
children = _ref.children,
|
|
1097
|
+
maxWidth = _ref.maxWidth,
|
|
1098
|
+
hidden = _ref.hidden,
|
|
1099
|
+
originalAriaDescribedBy = _ref['aria-describedby'],
|
|
1100
|
+
originalId = _ref.id;
|
|
1101
|
+
var id = useId(originalId);
|
|
1102
|
+
var hintId = useId();
|
|
1103
|
+
var ariaDescribedBy = originalAriaDescribedBy !== null && originalAriaDescribedBy !== void 0 ? originalAriaDescribedBy : hint ? hintId : undefined;
|
|
1104
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
1105
|
+
space: "small"
|
|
1106
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
829
1107
|
className: [className, modules_540a88ff.container],
|
|
830
1108
|
maxWidth: maxWidth,
|
|
831
1109
|
hidden: hidden
|
|
832
1110
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
833
|
-
|
|
1111
|
+
as: "span",
|
|
834
1112
|
display: "flex",
|
|
835
1113
|
justifyContent: "spaceBetween",
|
|
836
1114
|
alignItems: "flexEnd",
|
|
837
1115
|
paddingBottom: "small"
|
|
838
1116
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
839
|
-
|
|
1117
|
+
size: "body",
|
|
1118
|
+
as: "label",
|
|
840
1119
|
htmlFor: id
|
|
841
1120
|
}, label ? /*#__PURE__*/React.createElement("span", {
|
|
842
1121
|
className: modules_540a88ff.primaryLabel
|
|
843
1122
|
}, label) : null, secondaryLabel ? /*#__PURE__*/React.createElement("span", {
|
|
844
1123
|
className: modules_540a88ff.secondaryLabel
|
|
845
1124
|
}, "\xA0(", secondaryLabel, ")") : null), auxiliaryLabel ? /*#__PURE__*/React.createElement(Box, {
|
|
846
|
-
className: modules_540a88ff.auxiliaryLabel
|
|
1125
|
+
className: modules_540a88ff.auxiliaryLabel,
|
|
1126
|
+
paddingLeft: "small"
|
|
847
1127
|
}, auxiliaryLabel) : null), children(ariaDescribedBy ? {
|
|
848
1128
|
id: id,
|
|
849
1129
|
'aria-describedby': ariaDescribedBy
|
|
850
1130
|
} : {
|
|
851
1131
|
id: id
|
|
852
|
-
}), hint ? /*#__PURE__*/React.createElement(FieldHint, {
|
|
1132
|
+
})), hint ? /*#__PURE__*/React.createElement(FieldHint, {
|
|
1133
|
+
hidden: hidden,
|
|
853
1134
|
id: hintId
|
|
854
1135
|
}, hint) : null);
|
|
855
1136
|
}
|
|
@@ -899,7 +1180,7 @@ function PasswordHiddenIcon(props) {
|
|
|
899
1180
|
|
|
900
1181
|
var modules_3f03ead6 = {"inputWrapper":"_460d581b"};
|
|
901
1182
|
|
|
902
|
-
var modules_aaf25250 = {"inputWrapper":"
|
|
1183
|
+
var modules_aaf25250 = {"inputWrapper":"dd9ffeab"};
|
|
903
1184
|
|
|
904
1185
|
var PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref, ref) {
|
|
905
1186
|
var label = _ref.label,
|
|
@@ -907,9 +1188,11 @@ var PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref, r
|
|
|
907
1188
|
auxiliaryLabel = _ref.auxiliaryLabel,
|
|
908
1189
|
hint = _ref.hint,
|
|
909
1190
|
maxWidth = _ref.maxWidth,
|
|
910
|
-
|
|
1191
|
+
_ref$togglePasswordLa = _ref.togglePasswordLabel,
|
|
1192
|
+
togglePasswordLabel = _ref$togglePasswordLa === void 0 ? 'Toggle password visibility' : _ref$togglePasswordLa,
|
|
911
1193
|
hidden = _ref.hidden,
|
|
912
|
-
|
|
1194
|
+
ariaDescribedBy = _ref['aria-describedby'],
|
|
1195
|
+
props = _objectWithoutPropertiesLoose(_ref, ["label", "secondaryLabel", "auxiliaryLabel", "hint", "maxWidth", "togglePasswordLabel", "hidden", "aria-describedby"]);
|
|
913
1196
|
|
|
914
1197
|
var id = useId(props.id);
|
|
915
1198
|
var internalRef = React.useRef(null);
|
|
@@ -935,7 +1218,8 @@ var PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref, r
|
|
|
935
1218
|
auxiliaryLabel: auxiliaryLabel,
|
|
936
1219
|
hint: hint,
|
|
937
1220
|
maxWidth: maxWidth,
|
|
938
|
-
hidden: hidden
|
|
1221
|
+
hidden: hidden,
|
|
1222
|
+
"aria-describedby": ariaDescribedBy
|
|
939
1223
|
}, function (extraProps) {
|
|
940
1224
|
return /*#__PURE__*/React.createElement(Box, {
|
|
941
1225
|
display: "flex",
|
|
@@ -959,9 +1243,9 @@ var PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref, r
|
|
|
959
1243
|
});
|
|
960
1244
|
});
|
|
961
1245
|
|
|
962
|
-
var modules_1fa9b208 = {"selectWrapper":"
|
|
1246
|
+
var modules_1fa9b208 = {"selectWrapper":"_828e09c5"};
|
|
963
1247
|
|
|
964
|
-
function SelectField(_ref) {
|
|
1248
|
+
var SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref) {
|
|
965
1249
|
var id = _ref.id,
|
|
966
1250
|
label = _ref.label,
|
|
967
1251
|
secondaryLabel = _ref.secondaryLabel,
|
|
@@ -969,7 +1253,9 @@ function SelectField(_ref) {
|
|
|
969
1253
|
hint = _ref.hint,
|
|
970
1254
|
maxWidth = _ref.maxWidth,
|
|
971
1255
|
children = _ref.children,
|
|
972
|
-
|
|
1256
|
+
hidden = _ref.hidden,
|
|
1257
|
+
ariaDescribedBy = _ref['aria-describedby'],
|
|
1258
|
+
props = _objectWithoutPropertiesLoose(_ref, ["id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "maxWidth", "children", "hidden", "aria-describedby"]);
|
|
973
1259
|
|
|
974
1260
|
return /*#__PURE__*/React.createElement(BaseField, {
|
|
975
1261
|
id: id,
|
|
@@ -977,15 +1263,19 @@ function SelectField(_ref) {
|
|
|
977
1263
|
secondaryLabel: secondaryLabel,
|
|
978
1264
|
auxiliaryLabel: auxiliaryLabel,
|
|
979
1265
|
hint: hint,
|
|
980
|
-
maxWidth: maxWidth
|
|
1266
|
+
maxWidth: maxWidth,
|
|
1267
|
+
hidden: hidden,
|
|
1268
|
+
"aria-describedby": ariaDescribedBy
|
|
981
1269
|
}, function (extraProps) {
|
|
982
1270
|
return /*#__PURE__*/React.createElement(Box, {
|
|
983
1271
|
className: modules_1fa9b208.selectWrapper
|
|
984
|
-
}, /*#__PURE__*/React.createElement("select", Object.assign({}, props, extraProps
|
|
1272
|
+
}, /*#__PURE__*/React.createElement("select", Object.assign({}, props, extraProps, {
|
|
1273
|
+
ref: ref
|
|
1274
|
+
}), children), /*#__PURE__*/React.createElement(SelectChevron, {
|
|
985
1275
|
"aria-hidden": true
|
|
986
1276
|
}));
|
|
987
1277
|
});
|
|
988
|
-
}
|
|
1278
|
+
});
|
|
989
1279
|
|
|
990
1280
|
function SelectChevron(props) {
|
|
991
1281
|
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
@@ -999,54 +1289,70 @@ function SelectChevron(props) {
|
|
|
999
1289
|
}));
|
|
1000
1290
|
}
|
|
1001
1291
|
|
|
1002
|
-
var modules_8e05f7c9 = {"container":"
|
|
1003
|
-
|
|
1004
|
-
function join() {
|
|
1005
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1006
|
-
args[_key] = arguments[_key];
|
|
1007
|
-
}
|
|
1292
|
+
var modules_8e05f7c9 = {"container":"_99a80509","disabled":"b5cf26ef","checked":"a63c43a2","toggle":"f318ae83","label":"_427926b9","handle":"_9fcd994c"};
|
|
1008
1293
|
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
}).filter(Boolean);
|
|
1012
|
-
return list.length > 0 ? list.join(' ') : undefined;
|
|
1013
|
-
}
|
|
1294
|
+
var SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref) {
|
|
1295
|
+
var _ref2, _props$checked, _props$checked2;
|
|
1014
1296
|
|
|
1015
|
-
function SwitchField(_ref) {
|
|
1016
1297
|
var label = _ref.label,
|
|
1017
1298
|
hint = _ref.hint,
|
|
1018
1299
|
_ref$disabled = _ref.disabled,
|
|
1019
1300
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1301
|
+
hidden = _ref.hidden,
|
|
1302
|
+
defaultChecked = _ref.defaultChecked,
|
|
1303
|
+
originalId = _ref.id,
|
|
1304
|
+
originalAriaDescribedBy = _ref['aria-describedby'],
|
|
1305
|
+
_onChange = _ref.onChange,
|
|
1306
|
+
props = _objectWithoutPropertiesLoose(_ref, ["label", "hint", "disabled", "hidden", "defaultChecked", "id", "aria-describedby", "onChange"]);
|
|
1024
1307
|
|
|
1025
|
-
var id = useId(
|
|
1308
|
+
var id = useId(originalId);
|
|
1026
1309
|
var hintId = useId();
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1310
|
+
var ariaDescribedBy = originalAriaDescribedBy !== null && originalAriaDescribedBy !== void 0 ? originalAriaDescribedBy : hint ? hintId : undefined;
|
|
1311
|
+
|
|
1312
|
+
var _React$useState = React.useState((_ref2 = (_props$checked = props.checked) !== null && _props$checked !== void 0 ? _props$checked : defaultChecked) !== null && _ref2 !== void 0 ? _ref2 : false),
|
|
1313
|
+
checkedState = _React$useState[0],
|
|
1314
|
+
setChecked = _React$useState[1];
|
|
1315
|
+
|
|
1316
|
+
var isChecked = (_props$checked2 = props.checked) !== null && _props$checked2 !== void 0 ? _props$checked2 : checkedState;
|
|
1317
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
1318
|
+
space: "small",
|
|
1319
|
+
hidden: hidden
|
|
1030
1320
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
1031
|
-
|
|
1321
|
+
className: [modules_8e05f7c9.container, disabled ? modules_8e05f7c9.disabled : null, isChecked ? modules_8e05f7c9.checked : null],
|
|
1322
|
+
as: "label",
|
|
1032
1323
|
display: "flex",
|
|
1033
1324
|
alignItems: "center"
|
|
1034
1325
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
1035
|
-
|
|
1036
|
-
|
|
1326
|
+
position: "relative",
|
|
1327
|
+
display: "inlineBlock",
|
|
1328
|
+
overflow: "visible",
|
|
1329
|
+
marginRight: "small",
|
|
1330
|
+
flexShrink: 0,
|
|
1331
|
+
className: modules_8e05f7c9.toggle
|
|
1332
|
+
}, /*#__PURE__*/React.createElement(HiddenVisually, null, /*#__PURE__*/React.createElement("input", Object.assign({}, props, {
|
|
1037
1333
|
id: id,
|
|
1038
1334
|
type: "checkbox",
|
|
1039
|
-
checked: checked,
|
|
1040
1335
|
disabled: disabled,
|
|
1041
|
-
"aria-describedby":
|
|
1042
|
-
|
|
1336
|
+
"aria-describedby": ariaDescribedBy,
|
|
1337
|
+
ref: ref,
|
|
1338
|
+
checked: isChecked,
|
|
1339
|
+
onChange: function onChange(event) {
|
|
1340
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(event);
|
|
1341
|
+
|
|
1342
|
+
if (!event.defaultPrevented) {
|
|
1343
|
+
setChecked(event.currentTarget.checked);
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
}))), /*#__PURE__*/React.createElement("span", {
|
|
1043
1347
|
className: modules_8e05f7c9.handle
|
|
1044
|
-
})), /*#__PURE__*/React.createElement(
|
|
1348
|
+
})), /*#__PURE__*/React.createElement(Text, {
|
|
1349
|
+
exceptionallySetClassName: modules_8e05f7c9.label
|
|
1350
|
+
}, label)), hint ? /*#__PURE__*/React.createElement(FieldHint, {
|
|
1045
1351
|
id: hintId
|
|
1046
1352
|
}, hint) : null);
|
|
1047
|
-
}
|
|
1353
|
+
});
|
|
1048
1354
|
|
|
1049
|
-
var modules_2728c236 = {"container":"
|
|
1355
|
+
var modules_2728c236 = {"container":"_5a579f96"};
|
|
1050
1356
|
|
|
1051
1357
|
function TextArea(_ref) {
|
|
1052
1358
|
var id = _ref.id,
|
|
@@ -1082,7 +1388,8 @@ var TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
|
1082
1388
|
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
1083
1389
|
maxWidth = _ref.maxWidth,
|
|
1084
1390
|
hidden = _ref.hidden,
|
|
1085
|
-
|
|
1391
|
+
ariaDescribedBy = _ref['aria-describedby'],
|
|
1392
|
+
props = _objectWithoutPropertiesLoose(_ref, ["id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "type", "maxWidth", "hidden", "aria-describedby"]);
|
|
1086
1393
|
|
|
1087
1394
|
return /*#__PURE__*/React.createElement(BaseField, {
|
|
1088
1395
|
id: id,
|
|
@@ -1091,7 +1398,8 @@ var TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
|
1091
1398
|
auxiliaryLabel: auxiliaryLabel,
|
|
1092
1399
|
hint: hint,
|
|
1093
1400
|
maxWidth: maxWidth,
|
|
1094
|
-
hidden: hidden
|
|
1401
|
+
hidden: hidden,
|
|
1402
|
+
"aria-describedby": ariaDescribedBy
|
|
1095
1403
|
}, function (extraProps) {
|
|
1096
1404
|
return /*#__PURE__*/React.createElement(Box, {
|
|
1097
1405
|
className: modules_aaf25250.inputWrapper
|
|
@@ -1102,36 +1410,379 @@ var TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
|
1102
1410
|
});
|
|
1103
1411
|
});
|
|
1104
1412
|
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1413
|
+
/**
|
|
1414
|
+
* usePrevious tracks the change of the given value -
|
|
1415
|
+
* when a given value has been changed from a previous call,
|
|
1416
|
+
* it will return the value prior to the change.
|
|
1417
|
+
*
|
|
1418
|
+
* Example:
|
|
1419
|
+
*
|
|
1420
|
+
* const [x, setX] = useState(1)
|
|
1421
|
+
* const prevX = usePrevious(x)
|
|
1422
|
+
*
|
|
1423
|
+
* Suppose `setX(2)` is called, then in the next component render
|
|
1424
|
+
* x = 2 and prevX = 1
|
|
1425
|
+
*/
|
|
1109
1426
|
|
|
1110
|
-
|
|
1111
|
-
var
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1427
|
+
function usePrevious(value) {
|
|
1428
|
+
var ref = React.useRef(null);
|
|
1429
|
+
React.useEffect(function () {
|
|
1430
|
+
ref.current = value;
|
|
1431
|
+
}, [value]);
|
|
1432
|
+
return ref.current;
|
|
1433
|
+
}
|
|
1115
1434
|
|
|
1116
|
-
|
|
1117
|
-
|
|
1435
|
+
var modules_40c67f5b = {"tab":"_7cdcd0b6","tab-normal":"af6705d0","tab-primary":"ad705020","tab-secondary":"_69a2043b","tab-tertiary":"_5b695667","tab-plain":"_88d3dc5e"};
|
|
1436
|
+
|
|
1437
|
+
var TabsContext = /*#__PURE__*/React.createContext(null);
|
|
1438
|
+
/**
|
|
1439
|
+
* Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.
|
|
1440
|
+
*/
|
|
1441
|
+
|
|
1442
|
+
function Tabs(_ref) {
|
|
1443
|
+
var children = _ref.children,
|
|
1444
|
+
selectedId = _ref.selectedId,
|
|
1445
|
+
_ref$color = _ref.color,
|
|
1446
|
+
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
1447
|
+
_ref$variant = _ref.variant,
|
|
1448
|
+
variant = _ref$variant === void 0 ? 'normal' : _ref$variant;
|
|
1449
|
+
var tabState = Tab$1.useTabState({
|
|
1450
|
+
selectedId: selectedId
|
|
1451
|
+
});
|
|
1452
|
+
var previousSelectedId = usePrevious(selectedId);
|
|
1453
|
+
var actualSelectedId = tabState.selectedId,
|
|
1454
|
+
select = tabState.select;
|
|
1455
|
+
React.useEffect(function selectTab() {
|
|
1456
|
+
if (previousSelectedId !== selectedId && selectedId !== actualSelectedId && selectedId !== undefined) {
|
|
1457
|
+
select(selectedId);
|
|
1458
|
+
}
|
|
1459
|
+
}, [selectedId, actualSelectedId, select, previousSelectedId]);
|
|
1460
|
+
var memoizedTabState = React.useMemo(function memoizeTabState() {
|
|
1461
|
+
return _objectSpread2(_objectSpread2({}, tabState), {}, {
|
|
1462
|
+
color: color,
|
|
1463
|
+
variant: variant
|
|
1464
|
+
});
|
|
1465
|
+
}, // There is no guarantee that useTabState returns a stable object when there are no changes, so
|
|
1466
|
+
// following reakit/Tab's example we only return a new objet when any of its values have changed
|
|
1467
|
+
// eslint-disable-next-line
|
|
1468
|
+
[color, variant].concat(Object.values(tabState)));
|
|
1469
|
+
return /*#__PURE__*/React.createElement(TabsContext.Provider, {
|
|
1470
|
+
value: memoizedTabState
|
|
1471
|
+
}, children);
|
|
1472
|
+
}
|
|
1473
|
+
/**
|
|
1474
|
+
* Represents the individual tab elements within the group. Each `<Tab>` must have a corresponding `<TabPanel>` component.
|
|
1475
|
+
*/
|
|
1476
|
+
|
|
1477
|
+
function Tab(_ref2) {
|
|
1478
|
+
var children = _ref2.children,
|
|
1479
|
+
id = _ref2.id;
|
|
1480
|
+
var tabContextValue = React.useContext(TabsContext);
|
|
1481
|
+
|
|
1482
|
+
if (!tabContextValue) {
|
|
1483
|
+
return null;
|
|
1118
1484
|
}
|
|
1119
1485
|
|
|
1120
|
-
|
|
1486
|
+
var color = tabContextValue.color,
|
|
1487
|
+
variant = tabContextValue.variant,
|
|
1488
|
+
tabState = _objectWithoutPropertiesLoose(tabContextValue, ["color", "variant"]);
|
|
1489
|
+
|
|
1490
|
+
return /*#__PURE__*/React.createElement(Tab$1.Tab, Object.assign({
|
|
1491
|
+
className: classNames(modules_40c67f5b.tab, modules_40c67f5b["tab-" + (variant !== null && variant !== void 0 ? variant : '')], modules_40c67f5b["tab-" + (color !== null && color !== void 0 ? color : '')]),
|
|
1492
|
+
id: id
|
|
1493
|
+
}, tabState), children);
|
|
1121
1494
|
}
|
|
1495
|
+
/**
|
|
1496
|
+
* A component used to group `<Tab>` elements together.
|
|
1497
|
+
*/
|
|
1122
1498
|
|
|
1123
|
-
function
|
|
1124
|
-
var
|
|
1125
|
-
|
|
1126
|
-
|
|
1499
|
+
function TabList(_ref3) {
|
|
1500
|
+
var children = _ref3.children,
|
|
1501
|
+
_ref3$space = _ref3.space,
|
|
1502
|
+
space = _ref3$space === void 0 ? 'medium' : _ref3$space,
|
|
1503
|
+
props = _objectWithoutPropertiesLoose(_ref3, ["children", "space"]);
|
|
1504
|
+
|
|
1505
|
+
var tabContextValue = React.useContext(TabsContext);
|
|
1506
|
+
|
|
1507
|
+
if (!tabContextValue) {
|
|
1508
|
+
return null;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
var tabState = _objectWithoutPropertiesLoose(tabContextValue, ["color", "variant"]);
|
|
1512
|
+
|
|
1513
|
+
return /*#__PURE__*/React.createElement(Tab$1.TabList, Object.assign({}, props, tabState), /*#__PURE__*/React.createElement(Inline, {
|
|
1514
|
+
space: space
|
|
1515
|
+
}, children));
|
|
1127
1516
|
}
|
|
1517
|
+
/**
|
|
1518
|
+
* Used to define the content to be rendered when a tab is active. Each `<TabPanel>` must have a corresponding `<Tab>` component.
|
|
1519
|
+
*/
|
|
1128
1520
|
|
|
1129
|
-
var
|
|
1130
|
-
var
|
|
1521
|
+
var TabPanel = /*#__PURE__*/polymorphicComponent(function TabPanel(_ref4, ref) {
|
|
1522
|
+
var children = _ref4.children,
|
|
1523
|
+
id = _ref4.id,
|
|
1524
|
+
as = _ref4.as,
|
|
1525
|
+
_ref4$render = _ref4.render,
|
|
1526
|
+
render = _ref4$render === void 0 ? 'always' : _ref4$render,
|
|
1527
|
+
props = _objectWithoutPropertiesLoose(_ref4, ["children", "id", "as", "render"]);
|
|
1131
1528
|
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1529
|
+
var tabContextValue = React.useContext(TabsContext);
|
|
1530
|
+
|
|
1531
|
+
var _React$useState = React.useState(false),
|
|
1532
|
+
tabRendered = _React$useState[0],
|
|
1533
|
+
setTabRendered = _React$useState[1];
|
|
1534
|
+
|
|
1535
|
+
var tabIsActive = (tabContextValue === null || tabContextValue === void 0 ? void 0 : tabContextValue.selectedId) === id;
|
|
1536
|
+
React.useEffect(function trackTabRenderedState() {
|
|
1537
|
+
if (!tabRendered && tabIsActive) {
|
|
1538
|
+
setTabRendered(true);
|
|
1539
|
+
}
|
|
1540
|
+
}, [tabRendered, tabIsActive]);
|
|
1541
|
+
|
|
1542
|
+
if (!tabContextValue) {
|
|
1543
|
+
return null;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
var tabState = _objectWithoutPropertiesLoose(tabContextValue, ["color", "variant"]);
|
|
1547
|
+
|
|
1548
|
+
return /*#__PURE__*/React.createElement(Tab$1.TabPanel, Object.assign({
|
|
1549
|
+
tabId: id
|
|
1550
|
+
}, tabState, props, {
|
|
1551
|
+
as: as,
|
|
1552
|
+
ref: ref
|
|
1553
|
+
}), render === 'always' ? children : null, render === 'active' && tabIsActive ? children : null, render === 'lazy' && (tabIsActive || tabRendered) ? children : null);
|
|
1554
|
+
});
|
|
1555
|
+
/**
|
|
1556
|
+
* Allows content to be rendered based on the current tab being selected while outside of the TabPanel
|
|
1557
|
+
* component. Can be placed freely within the main `<Tabs>` component.
|
|
1558
|
+
*/
|
|
1559
|
+
|
|
1560
|
+
function TabAwareSlot(_ref5) {
|
|
1561
|
+
var children = _ref5.children;
|
|
1562
|
+
var tabContextValue = React.useContext(TabsContext);
|
|
1563
|
+
return tabContextValue ? children({
|
|
1564
|
+
selectedId: tabContextValue.selectedId
|
|
1565
|
+
}) : null;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
var modules_8f59d13b = {"reach-portal":"_72b0d072","fadein":"_3ef30abf","fitContent":"_99107d2f","container":"badff007","medium":"_3b39110c","small":"fc325d7b","large":"_5751d6d0","overlay":"_0091d9c5","expand":"_52207af6","buttonContainer":"b97b958d"};
|
|
1569
|
+
|
|
1570
|
+
var ModalContext = /*#__PURE__*/React.createContext({
|
|
1571
|
+
onDismiss: undefined,
|
|
1572
|
+
height: 'fitContent'
|
|
1573
|
+
});
|
|
1574
|
+
|
|
1575
|
+
function isNotInternalFrame(element) {
|
|
1576
|
+
return !(element.ownerDocument === document && element.tagName.toLowerCase() === 'iframe');
|
|
1577
|
+
}
|
|
1578
|
+
/**
|
|
1579
|
+
* Renders a modal that sits on top of the rest of the content in the entire page.
|
|
1580
|
+
*
|
|
1581
|
+
* Follows the WAI-ARIA Dialog (Modal) Pattern.
|
|
1582
|
+
*
|
|
1583
|
+
* @see ModalHeader
|
|
1584
|
+
* @see ModalFooter
|
|
1585
|
+
* @see ModalBody
|
|
1586
|
+
*/
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
function Modal(_ref) {
|
|
1590
|
+
var isOpen = _ref.isOpen,
|
|
1591
|
+
onDismiss = _ref.onDismiss,
|
|
1592
|
+
_ref$height = _ref.height,
|
|
1593
|
+
height = _ref$height === void 0 ? 'fitContent' : _ref$height,
|
|
1594
|
+
_ref$width = _ref.width,
|
|
1595
|
+
width = _ref$width === void 0 ? 'medium' : _ref$width,
|
|
1596
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
1597
|
+
_ref$autoFocus = _ref.autoFocus,
|
|
1598
|
+
autoFocus = _ref$autoFocus === void 0 ? true : _ref$autoFocus,
|
|
1599
|
+
children = _ref.children,
|
|
1600
|
+
props = _objectWithoutPropertiesLoose(_ref, ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "autoFocus", "children"]);
|
|
1601
|
+
|
|
1602
|
+
var contextValue = React.useMemo(function () {
|
|
1603
|
+
return {
|
|
1604
|
+
onDismiss: onDismiss,
|
|
1605
|
+
height: height
|
|
1606
|
+
};
|
|
1607
|
+
}, [onDismiss, height]);
|
|
1608
|
+
return /*#__PURE__*/React.createElement(dialog.DialogOverlay, {
|
|
1609
|
+
isOpen: isOpen,
|
|
1610
|
+
onDismiss: onDismiss,
|
|
1611
|
+
dangerouslyBypassFocusLock // We're setting up our own focus lock below
|
|
1612
|
+
: true,
|
|
1613
|
+
className: classNames(modules_8f59d13b.overlay, modules_8f59d13b[height], modules_8f59d13b[width]),
|
|
1614
|
+
"data-testid": "modal-overlay"
|
|
1615
|
+
}, /*#__PURE__*/React.createElement(FocusLock, {
|
|
1616
|
+
autoFocus: autoFocus,
|
|
1617
|
+
whiteList: isNotInternalFrame
|
|
1618
|
+
}, /*#__PURE__*/React.createElement(dialog.DialogContent, Object.assign({}, props, {
|
|
1619
|
+
as: Box,
|
|
1620
|
+
borderRadius: "full",
|
|
1621
|
+
background: "default",
|
|
1622
|
+
display: "flex",
|
|
1623
|
+
flexDirection: "column",
|
|
1624
|
+
overflow: "hidden",
|
|
1625
|
+
height: height === 'expand' ? 'full' : undefined,
|
|
1626
|
+
flexGrow: height === 'expand' ? 1 : 0,
|
|
1627
|
+
className: [exceptionallySetClassName, modules_8f59d13b.container]
|
|
1628
|
+
}), /*#__PURE__*/React.createElement(ModalContext.Provider, {
|
|
1629
|
+
value: contextValue
|
|
1630
|
+
}, children))));
|
|
1631
|
+
}
|
|
1632
|
+
/**
|
|
1633
|
+
* The close button rendered by ModalHeader. Provided independently so that consumers can customize
|
|
1634
|
+
* the button's label.
|
|
1635
|
+
*
|
|
1636
|
+
* @see ModalHeader
|
|
1637
|
+
*/
|
|
1638
|
+
|
|
1639
|
+
function ModalCloseButton(props) {
|
|
1640
|
+
var _React$useContext = React.useContext(ModalContext),
|
|
1641
|
+
onDismiss = _React$useContext.onDismiss;
|
|
1642
|
+
|
|
1643
|
+
return /*#__PURE__*/React.createElement(Button, Object.assign({}, props, {
|
|
1644
|
+
variant: "quaternary",
|
|
1645
|
+
onClick: onDismiss,
|
|
1646
|
+
icon: /*#__PURE__*/React.createElement(CloseIcon, null)
|
|
1647
|
+
}));
|
|
1648
|
+
}
|
|
1649
|
+
/**
|
|
1650
|
+
* Renders a standard modal header area with an optional close button.
|
|
1651
|
+
*
|
|
1652
|
+
* @see Modal
|
|
1653
|
+
* @see ModalFooter
|
|
1654
|
+
* @see ModalBody
|
|
1655
|
+
*/
|
|
1656
|
+
|
|
1657
|
+
function ModalHeader(_ref2) {
|
|
1658
|
+
var children = _ref2.children,
|
|
1659
|
+
_ref2$button = _ref2.button,
|
|
1660
|
+
button = _ref2$button === void 0 ? true : _ref2$button,
|
|
1661
|
+
_ref2$withDivider = _ref2.withDivider,
|
|
1662
|
+
withDivider = _ref2$withDivider === void 0 ? false : _ref2$withDivider,
|
|
1663
|
+
exceptionallySetClassName = _ref2.exceptionallySetClassName,
|
|
1664
|
+
props = _objectWithoutPropertiesLoose(_ref2, ["children", "button", "withDivider", "exceptionallySetClassName"]);
|
|
1665
|
+
|
|
1666
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
1667
|
+
as: "header",
|
|
1668
|
+
paddingLeft: "large",
|
|
1669
|
+
paddingRight: "small",
|
|
1670
|
+
paddingY: "small",
|
|
1671
|
+
className: exceptionallySetClassName
|
|
1672
|
+
}), /*#__PURE__*/React.createElement(Columns, {
|
|
1673
|
+
space: "large",
|
|
1674
|
+
alignY: "center"
|
|
1675
|
+
}, /*#__PURE__*/React.createElement(Column, {
|
|
1676
|
+
width: "auto"
|
|
1677
|
+
}, children), /*#__PURE__*/React.createElement(Column, {
|
|
1678
|
+
width: "content",
|
|
1679
|
+
exceptionallySetClassName: modules_8f59d13b.buttonContainer
|
|
1680
|
+
}, typeof button !== 'boolean' ? button : button === true ? /*#__PURE__*/React.createElement(ModalCloseButton, {
|
|
1681
|
+
"aria-label": "Close modal"
|
|
1682
|
+
}) : null))), withDivider ? /*#__PURE__*/React.createElement(Divider, null) : null);
|
|
1683
|
+
}
|
|
1684
|
+
/**
|
|
1685
|
+
* Renders the body of a modal.
|
|
1686
|
+
*
|
|
1687
|
+
* Convenient to use alongside ModalHeader and/or ModalFooter as needed. It ensures, among other
|
|
1688
|
+
* things, that the contet of the modal body expands or contracts depending on the modal height
|
|
1689
|
+
* setting or the size of the content. The body content also automatically scrolls when it's too
|
|
1690
|
+
* large to fit the available space.
|
|
1691
|
+
*
|
|
1692
|
+
* @see Modal
|
|
1693
|
+
* @see ModalHeader
|
|
1694
|
+
* @see ModalFooter
|
|
1695
|
+
*/
|
|
1696
|
+
|
|
1697
|
+
function ModalBody(_ref3) {
|
|
1698
|
+
var exceptionallySetClassName = _ref3.exceptionallySetClassName,
|
|
1699
|
+
children = _ref3.children,
|
|
1700
|
+
props = _objectWithoutPropertiesLoose(_ref3, ["exceptionallySetClassName", "children"]);
|
|
1701
|
+
|
|
1702
|
+
var _React$useContext2 = React.useContext(ModalContext),
|
|
1703
|
+
height = _React$useContext2.height;
|
|
1704
|
+
|
|
1705
|
+
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
1706
|
+
className: exceptionallySetClassName,
|
|
1707
|
+
flexGrow: height === 'expand' ? 1 : 0,
|
|
1708
|
+
height: height === 'expand' ? 'full' : undefined,
|
|
1709
|
+
overflow: "auto"
|
|
1710
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
1711
|
+
padding: "large",
|
|
1712
|
+
paddingBottom: "xxlarge"
|
|
1713
|
+
}, children));
|
|
1714
|
+
}
|
|
1715
|
+
/**
|
|
1716
|
+
* Renders a standard modal footer area.
|
|
1717
|
+
*
|
|
1718
|
+
* @see Modal
|
|
1719
|
+
* @see ModalHeader
|
|
1720
|
+
* @see ModalBody
|
|
1721
|
+
*/
|
|
1722
|
+
|
|
1723
|
+
function ModalFooter(_ref4) {
|
|
1724
|
+
var exceptionallySetClassName = _ref4.exceptionallySetClassName,
|
|
1725
|
+
_ref4$withDivider = _ref4.withDivider,
|
|
1726
|
+
withDivider = _ref4$withDivider === void 0 ? false : _ref4$withDivider,
|
|
1727
|
+
props = _objectWithoutPropertiesLoose(_ref4, ["exceptionallySetClassName", "withDivider"]);
|
|
1728
|
+
|
|
1729
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, withDivider ? /*#__PURE__*/React.createElement(Divider, null) : null, /*#__PURE__*/React.createElement(Box, Object.assign({
|
|
1730
|
+
as: "footer"
|
|
1731
|
+
}, props, {
|
|
1732
|
+
className: exceptionallySetClassName,
|
|
1733
|
+
padding: "large"
|
|
1734
|
+
})));
|
|
1735
|
+
} //
|
|
1736
|
+
// ModalActions
|
|
1737
|
+
//
|
|
1738
|
+
|
|
1739
|
+
/**
|
|
1740
|
+
* A specific version of the ModalFooter, tailored to showing an inline list of actions (buttons).
|
|
1741
|
+
* @see ModalFooter
|
|
1742
|
+
*/
|
|
1743
|
+
|
|
1744
|
+
function ModalActions(_ref5) {
|
|
1745
|
+
var children = _ref5.children,
|
|
1746
|
+
props = _objectWithoutPropertiesLoose(_ref5, ["children"]);
|
|
1747
|
+
|
|
1748
|
+
return /*#__PURE__*/React.createElement(ModalFooter, Object.assign({}, props), /*#__PURE__*/React.createElement(Inline, {
|
|
1749
|
+
align: "right",
|
|
1750
|
+
space: "large"
|
|
1751
|
+
}, React.Children.map(children, function (child) {
|
|
1752
|
+
return /*#__PURE__*/React.createElement("div", null, child);
|
|
1753
|
+
})));
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
function getInitials(name) {
|
|
1757
|
+
if (!name) {
|
|
1758
|
+
return '';
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
var seed = name.trim().split(' ');
|
|
1762
|
+
var firstInitial = seed[0];
|
|
1763
|
+
var lastInitial = seed[seed.length - 1];
|
|
1764
|
+
var initials = firstInitial[0]; // Better readable this way.
|
|
1765
|
+
// eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with
|
|
1766
|
+
|
|
1767
|
+
if (firstInitial[0] !== lastInitial[0]) {
|
|
1768
|
+
initials += lastInitial[0];
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
return initials.toUpperCase();
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
function emailToIndex(email, maxIndex) {
|
|
1775
|
+
var seed = email.split('@')[0];
|
|
1776
|
+
var hash = seed.charCodeAt(0) + seed.charCodeAt(seed.length - 1) || 0;
|
|
1777
|
+
return hash % maxIndex;
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
var AVATAR_COLORS = ['#fcc652', '#e9952c', '#e16b2d', '#d84b40', '#e8435a', '#e5198a', '#ad3889', '#86389c', '#a8a8a8', '#98be2f', '#5d9d50', '#5f9f85', '#5bbcb6', '#32a3bf', '#2bafeb', '#2d88c3', '#3863cc', '#5e5e5e'];
|
|
1781
|
+
var AVATAR_SIZES = ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl'];
|
|
1782
|
+
|
|
1783
|
+
function Avatar(_ref) {
|
|
1784
|
+
var user = _ref.user,
|
|
1785
|
+
avatarUrl = _ref.avatarUrl,
|
|
1135
1786
|
_ref$size = _ref.size,
|
|
1136
1787
|
size = _ref$size === void 0 ? 'l' : _ref$size,
|
|
1137
1788
|
className = _ref.className,
|
|
@@ -1154,7 +1805,33 @@ function Avatar(_ref) {
|
|
|
1154
1805
|
|
|
1155
1806
|
Avatar.displayName = 'Avatar';
|
|
1156
1807
|
|
|
1157
|
-
|
|
1808
|
+
function Checkbox(_ref) {
|
|
1809
|
+
var label = _ref.label,
|
|
1810
|
+
disabled = _ref.disabled,
|
|
1811
|
+
_ref$checked = _ref.checked,
|
|
1812
|
+
checked = _ref$checked === void 0 ? false : _ref$checked,
|
|
1813
|
+
onChange = _ref.onChange;
|
|
1814
|
+
return /*#__PURE__*/React__default.createElement("label", {
|
|
1815
|
+
className: "reactist_checkbox"
|
|
1816
|
+
}, /*#__PURE__*/React__default.createElement("input", {
|
|
1817
|
+
className: "reactist_checkbox--input",
|
|
1818
|
+
value: label,
|
|
1819
|
+
checked: checked,
|
|
1820
|
+
disabled: disabled,
|
|
1821
|
+
onChange: disabled || !onChange ? undefined : function (event) {
|
|
1822
|
+
return onChange(event.target.checked);
|
|
1823
|
+
},
|
|
1824
|
+
type: "checkbox"
|
|
1825
|
+
}), label);
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
Checkbox.displayName = 'Checkbox';
|
|
1829
|
+
|
|
1830
|
+
/**
|
|
1831
|
+
* @deprecated
|
|
1832
|
+
*/
|
|
1833
|
+
|
|
1834
|
+
var Button$1 = /*#__PURE__*/React__default.forwardRef(function Button(_ref, ref) {
|
|
1158
1835
|
var _ref$type = _ref.type,
|
|
1159
1836
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
1160
1837
|
variant = _ref.variant,
|
|
@@ -1176,42 +1853,20 @@ var Button = /*#__PURE__*/React__default.forwardRef(function Button(_ref, ref) {
|
|
|
1176
1853
|
ref: ref,
|
|
1177
1854
|
type: type,
|
|
1178
1855
|
className: className,
|
|
1179
|
-
disabled: disabled || loading,
|
|
1180
|
-
onClick: onClick
|
|
1856
|
+
"aria-disabled": disabled || loading,
|
|
1857
|
+
onClick: disabled || loading ? undefined : onClick
|
|
1181
1858
|
}), children);
|
|
1182
1859
|
return tooltip ? /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
1183
1860
|
content: tooltip
|
|
1184
1861
|
}, button) : button;
|
|
1185
1862
|
});
|
|
1186
|
-
Button.displayName = 'Button';
|
|
1187
|
-
Button.defaultProps = {
|
|
1863
|
+
Button$1.displayName = 'Button';
|
|
1864
|
+
Button$1.defaultProps = {
|
|
1188
1865
|
size: 'default',
|
|
1189
1866
|
loading: false,
|
|
1190
1867
|
disabled: false
|
|
1191
1868
|
};
|
|
1192
1869
|
|
|
1193
|
-
function Checkbox(_ref) {
|
|
1194
|
-
var label = _ref.label,
|
|
1195
|
-
disabled = _ref.disabled,
|
|
1196
|
-
_ref$checked = _ref.checked,
|
|
1197
|
-
checked = _ref$checked === void 0 ? false : _ref$checked,
|
|
1198
|
-
onChange = _ref.onChange;
|
|
1199
|
-
return /*#__PURE__*/React__default.createElement("label", {
|
|
1200
|
-
className: "reactist_checkbox"
|
|
1201
|
-
}, /*#__PURE__*/React__default.createElement("input", {
|
|
1202
|
-
className: "reactist_checkbox--input",
|
|
1203
|
-
value: label,
|
|
1204
|
-
checked: checked,
|
|
1205
|
-
disabled: disabled,
|
|
1206
|
-
onChange: disabled || !onChange ? undefined : function (event) {
|
|
1207
|
-
return onChange(event.target.checked);
|
|
1208
|
-
},
|
|
1209
|
-
type: "checkbox"
|
|
1210
|
-
}), label);
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
Checkbox.displayName = 'Checkbox';
|
|
1214
|
-
|
|
1215
1870
|
var Box$1 = /*#__PURE__*/function (_React$Component) {
|
|
1216
1871
|
_inheritsLoose(Box, _React$Component);
|
|
1217
1872
|
|
|
@@ -1302,7 +1957,9 @@ var Box$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
1302
1957
|
};
|
|
1303
1958
|
|
|
1304
1959
|
_proto._getTriggerComponent = function _getTriggerComponent() {
|
|
1305
|
-
var
|
|
1960
|
+
var _this$props$children;
|
|
1961
|
+
|
|
1962
|
+
var _trigger = (_this$props$children = this.props.children) === null || _this$props$children === void 0 ? void 0 : _this$props$children[0];
|
|
1306
1963
|
|
|
1307
1964
|
return _trigger ? /*#__PURE__*/React__default.cloneElement(_trigger, {
|
|
1308
1965
|
onClick: this._toggleShowBody
|
|
@@ -1330,7 +1987,7 @@ var Box$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
1330
1987
|
top: top,
|
|
1331
1988
|
bottom: !top
|
|
1332
1989
|
});
|
|
1333
|
-
var body = children
|
|
1990
|
+
var body = children === null || children === void 0 ? void 0 : children[1];
|
|
1334
1991
|
var contentMarkup = typeof body === 'function' ? body(props) : body ? /*#__PURE__*/React__default.cloneElement(body, props) : undefined;
|
|
1335
1992
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1336
1993
|
className: className,
|
|
@@ -1368,7 +2025,7 @@ var Trigger = /*#__PURE__*/React__default.forwardRef(function Trigger(_ref, ref)
|
|
|
1368
2025
|
if (onClick) onClick(event);
|
|
1369
2026
|
}
|
|
1370
2027
|
|
|
1371
|
-
return /*#__PURE__*/React__default.createElement(Button, Object.assign({}, props, {
|
|
2028
|
+
return /*#__PURE__*/React__default.createElement(Button$1, Object.assign({}, props, {
|
|
1372
2029
|
className: classNames('trigger', className),
|
|
1373
2030
|
onClick: handleClick,
|
|
1374
2031
|
tooltip: tooltip,
|
|
@@ -1476,7 +2133,7 @@ function ColorItem(_ref2) {
|
|
|
1476
2133
|
backgroundColor: color
|
|
1477
2134
|
},
|
|
1478
2135
|
onClick: function onClick() {
|
|
1479
|
-
return _onClick
|
|
2136
|
+
return _onClick === null || _onClick === void 0 ? void 0 : _onClick(colorIndex);
|
|
1480
2137
|
}
|
|
1481
2138
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
1482
2139
|
className: "color_item--inner_ring"
|
|
@@ -1507,6 +2164,8 @@ var ErrorMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
1507
2164
|
};
|
|
1508
2165
|
|
|
1509
2166
|
_this._hide = function () {
|
|
2167
|
+
var _this$props$onHide, _this$props;
|
|
2168
|
+
|
|
1510
2169
|
_this._clearTimeout();
|
|
1511
2170
|
|
|
1512
2171
|
_this.setState(function () {
|
|
@@ -1515,7 +2174,7 @@ var ErrorMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
1515
2174
|
};
|
|
1516
2175
|
});
|
|
1517
2176
|
|
|
1518
|
-
_this.props.onHide
|
|
2177
|
+
(_this$props$onHide = (_this$props = _this.props).onHide) === null || _this$props$onHide === void 0 ? void 0 : _this$props$onHide.call(_this$props);
|
|
1519
2178
|
};
|
|
1520
2179
|
|
|
1521
2180
|
var isValidMessage = _this._isValidMessage(props.message);
|
|
@@ -1750,7 +2409,7 @@ function hasModifiers(str) {
|
|
|
1750
2409
|
}
|
|
1751
2410
|
|
|
1752
2411
|
function isSpecialKey(str) {
|
|
1753
|
-
return /^(mod|cmd|ctrl|control|alt|shift|space)$/i.test(str);
|
|
2412
|
+
return /^(mod|cmd|ctrl|control|alt|shift|space|super)$/i.test(str);
|
|
1754
2413
|
}
|
|
1755
2414
|
|
|
1756
2415
|
function parseKeys(shortcut, isMac, translateKey) {
|
|
@@ -1778,12 +2437,14 @@ function parseKeys(shortcut, isMac, translateKey) {
|
|
|
1778
2437
|
}
|
|
1779
2438
|
|
|
1780
2439
|
function KeyboardShortcut(_ref) {
|
|
2440
|
+
var _navigator$platform$t, _navigator$platform;
|
|
2441
|
+
|
|
1781
2442
|
var children = _ref.children,
|
|
1782
2443
|
className = _ref.className,
|
|
1783
2444
|
_ref$translateKey = _ref.translateKey,
|
|
1784
2445
|
translateKey = _ref$translateKey === void 0 ? globalTranslateKey : _ref$translateKey,
|
|
1785
2446
|
_ref$isMac = _ref.isMac,
|
|
1786
|
-
isMac = _ref$isMac === void 0 ? navigator.platform
|
|
2447
|
+
isMac = _ref$isMac === void 0 ? (_navigator$platform$t = (_navigator$platform = navigator.platform) === null || _navigator$platform === void 0 ? void 0 : _navigator$platform.toUpperCase().includes('MAC')) !== null && _navigator$platform$t !== void 0 ? _navigator$platform$t : false : _ref$isMac,
|
|
1787
2448
|
props = _objectWithoutPropertiesLoose(_ref, ["children", "className", "translateKey", "isMac"]);
|
|
1788
2449
|
|
|
1789
2450
|
var shortcuts = typeof children === 'string' ? [children] : children;
|
|
@@ -1981,332 +2642,54 @@ function KeyCapturer(props) {
|
|
|
1981
2642
|
return /*#__PURE__*/React__default.cloneElement(children, _objectSpread2((_objectSpread2$1 = {}, _objectSpread2$1[eventName] = handleKeyEvent, _objectSpread2$1), composingEventHandlers));
|
|
1982
2643
|
}
|
|
1983
2644
|
|
|
1984
|
-
function
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
_ref$bgColor = _ref.bgColor,
|
|
1989
|
-
bgColor = _ref$bgColor === void 0 ? '#D9E6FB' : _ref$bgColor,
|
|
1990
|
-
_ref$size = _ref.size,
|
|
1991
|
-
size = _ref$size === void 0 ? 24 : _ref$size,
|
|
1992
|
-
_ref$ariaLabel = _ref['aria-label'],
|
|
1993
|
-
ariaLabel = _ref$ariaLabel === void 0 ? 'Loading' : _ref$ariaLabel;
|
|
1994
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
1995
|
-
className: classNames('reactist_loading', className),
|
|
1996
|
-
"aria-label": ariaLabel,
|
|
1997
|
-
"aria-live": "assertive",
|
|
1998
|
-
role: "alert"
|
|
1999
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
2000
|
-
className: "reactist_loading--spinner"
|
|
2001
|
-
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
2002
|
-
width: size,
|
|
2003
|
-
height: size,
|
|
2004
|
-
viewBox: '0 0 24 24'
|
|
2005
|
-
}, /*#__PURE__*/React__default.createElement("g", {
|
|
2006
|
-
fill: "none",
|
|
2007
|
-
fillRule: "nonzero"
|
|
2008
|
-
}, /*#__PURE__*/React__default.createElement("path", {
|
|
2009
|
-
fill: spinnerColor,
|
|
2010
|
-
d: "M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z"
|
|
2011
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
2012
|
-
fill: bgColor,
|
|
2013
|
-
d: "M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z"
|
|
2014
|
-
})))));
|
|
2015
|
-
}
|
|
2016
|
-
|
|
2017
|
-
Loading.displayName = 'Loading';
|
|
2645
|
+
var hasEnoughSpace = function hasEnoughSpace(windowDimensions, elementDimensions, wrapperDimensions, wrapperPosition, position, gap) {
|
|
2646
|
+
if (gap === void 0) {
|
|
2647
|
+
gap = 0;
|
|
2648
|
+
}
|
|
2018
2649
|
|
|
2019
|
-
var
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
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"
|
|
2028
|
-
}));
|
|
2029
|
-
};
|
|
2650
|
+
var windowHeight = windowDimensions.height,
|
|
2651
|
+
windowWidth = windowDimensions.width;
|
|
2652
|
+
var elementHeight = elementDimensions.height,
|
|
2653
|
+
elementWidth = elementDimensions.width;
|
|
2654
|
+
var wrapperHeight = wrapperDimensions.height,
|
|
2655
|
+
wrapperWidth = wrapperDimensions.width;
|
|
2656
|
+
var wrapperX = wrapperPosition.x,
|
|
2657
|
+
wrapperY = wrapperPosition.y;
|
|
2030
2658
|
|
|
2031
|
-
var
|
|
2032
|
-
_inheritsLoose(Box, _React$Component);
|
|
2659
|
+
var verticalPosition = _calculateVerticalPosition(wrapperPosition, wrapperDimensions, elementDimensions);
|
|
2033
2660
|
|
|
2034
|
-
|
|
2035
|
-
var _this;
|
|
2661
|
+
var horizontalPosition = _calculateHorizontalPosition(wrapperPosition, wrapperDimensions, elementDimensions);
|
|
2036
2662
|
|
|
2037
|
-
|
|
2663
|
+
var canPlaceVertically = verticalPosition >= 0 && verticalPosition + elementWidth <= windowWidth;
|
|
2664
|
+
var canPlaceHorizontally = horizontalPosition >= 0 && horizontalPosition + elementHeight <= windowHeight;
|
|
2038
2665
|
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2666
|
+
if (position === 'top') {
|
|
2667
|
+
return canPlaceVertically && wrapperY - elementHeight - gap >= 0;
|
|
2668
|
+
} else if (position === 'right') {
|
|
2669
|
+
return canPlaceHorizontally && wrapperX + wrapperWidth + elementWidth + gap <= windowWidth;
|
|
2670
|
+
} else if (position === 'left') {
|
|
2671
|
+
return canPlaceHorizontally && wrapperX - elementWidth - gap >= 0;
|
|
2672
|
+
} else if (position === 'bottom') {
|
|
2673
|
+
return canPlaceVertically && wrapperY + wrapperHeight + elementHeight + gap <= windowHeight;
|
|
2674
|
+
}
|
|
2044
2675
|
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
// ESC
|
|
2048
|
-
_this._closeModal();
|
|
2676
|
+
return false;
|
|
2677
|
+
};
|
|
2049
2678
|
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2679
|
+
var _calculateVerticalPosition = function _calculateVerticalPosition(wrapperPosition, wrapperDimensions, elementDimensions) {
|
|
2680
|
+
return wrapperPosition.x + (wrapperDimensions.width - elementDimensions.width) / 2;
|
|
2681
|
+
};
|
|
2053
2682
|
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
}
|
|
2058
|
-
};
|
|
2683
|
+
var _calculateHorizontalPosition = function _calculateHorizontalPosition(wrapperPosition, wrapperDimensions, elementDimensions) {
|
|
2684
|
+
return wrapperPosition.y + (wrapperDimensions.height - elementDimensions.height) / 2;
|
|
2685
|
+
};
|
|
2059
2686
|
|
|
2060
|
-
|
|
2687
|
+
var calculateTopCenterPosition = function calculateTopCenterPosition(wrapperDimensions, wrapperPosition, elementDimensions, gap) {
|
|
2688
|
+
if (gap === void 0) {
|
|
2689
|
+
gap = 0;
|
|
2061
2690
|
}
|
|
2062
2691
|
|
|
2063
|
-
var
|
|
2064
|
-
|
|
2065
|
-
_proto.componentDidMount = function componentDidMount() {
|
|
2066
|
-
window.addEventListener('keydown', this._handleKeyDown);
|
|
2067
|
-
};
|
|
2068
|
-
|
|
2069
|
-
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
2070
|
-
window.removeEventListener('keydown', this._handleKeyDown);
|
|
2071
|
-
};
|
|
2072
|
-
|
|
2073
|
-
_proto.render = function render() {
|
|
2074
|
-
var _this$props = this.props,
|
|
2075
|
-
large = _this$props.large,
|
|
2076
|
-
medium = _this$props.medium,
|
|
2077
|
-
style = _this$props.style,
|
|
2078
|
-
children = _this$props.children,
|
|
2079
|
-
closeOnOverlayClick = _this$props.closeOnOverlayClick;
|
|
2080
|
-
var className = classNames('reactist_modal_box', {
|
|
2081
|
-
large: large,
|
|
2082
|
-
medium: medium
|
|
2083
|
-
}, this.props.className);
|
|
2084
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
2085
|
-
className: "reactist_overlay",
|
|
2086
|
-
id: "reactist-overlay",
|
|
2087
|
-
onClick: closeOnOverlayClick ? this._handleOverlayClick : undefined
|
|
2088
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2089
|
-
className: "reactist_overlay_inner",
|
|
2090
|
-
id: "reactist-overlay-inner"
|
|
2091
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2092
|
-
style: style,
|
|
2093
|
-
className: className
|
|
2094
|
-
}, children)));
|
|
2095
|
-
};
|
|
2096
|
-
|
|
2097
|
-
return Box;
|
|
2098
|
-
}(React__default.Component);
|
|
2099
|
-
|
|
2100
|
-
Box$2.displayName = 'Modal.Box';
|
|
2101
|
-
Box$2.defaultProps = {
|
|
2102
|
-
large: false,
|
|
2103
|
-
closeOnOverlayClick: false
|
|
2104
|
-
};
|
|
2105
|
-
|
|
2106
|
-
var Header = /*#__PURE__*/function (_React$Component2) {
|
|
2107
|
-
_inheritsLoose(Header, _React$Component2);
|
|
2108
|
-
|
|
2109
|
-
function Header() {
|
|
2110
|
-
return _React$Component2.apply(this, arguments) || this;
|
|
2111
|
-
}
|
|
2112
|
-
|
|
2113
|
-
var _proto2 = Header.prototype;
|
|
2114
|
-
|
|
2115
|
-
_proto2._closeModal = function _closeModal(event) {
|
|
2116
|
-
event.preventDefault();
|
|
2117
|
-
|
|
2118
|
-
if (typeof this.props.beforeClose === 'function') {
|
|
2119
|
-
this.props.beforeClose();
|
|
2120
|
-
} // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
var modalElement = document.getElementById('modal_box');
|
|
2124
|
-
ReactDOM.unmountComponentAtNode(modalElement);
|
|
2125
|
-
};
|
|
2126
|
-
|
|
2127
|
-
_proto2.render = function render() {
|
|
2128
|
-
return (
|
|
2129
|
-
/*#__PURE__*/
|
|
2130
|
-
|
|
2131
|
-
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
2132
|
-
React__default.createElement("div", {
|
|
2133
|
-
className: "reactist_modal_box__header"
|
|
2134
|
-
}, /*#__PURE__*/React__default.createElement("p", null, this.props.title && /*#__PURE__*/React__default.createElement("span", {
|
|
2135
|
-
className: "title"
|
|
2136
|
-
}, this.props.title), this.props.subtitle && /*#__PURE__*/React__default.createElement("span", {
|
|
2137
|
-
className: "subtitle"
|
|
2138
|
-
}, this.props.subtitle), this.props.children), /*#__PURE__*/React__default.createElement("a", {
|
|
2139
|
-
className: "close",
|
|
2140
|
-
onClick: this._closeModal.bind(this),
|
|
2141
|
-
href: "#"
|
|
2142
|
-
}, /*#__PURE__*/React__default.createElement(CloseIcon$1, null)))
|
|
2143
|
-
/* eslint-enable jsx-a11y/anchor-is-valid */
|
|
2144
|
-
|
|
2145
|
-
);
|
|
2146
|
-
};
|
|
2147
|
-
|
|
2148
|
-
return Header;
|
|
2149
|
-
}(React__default.Component);
|
|
2150
|
-
|
|
2151
|
-
Header.displayName = 'Modal.Header';
|
|
2152
|
-
|
|
2153
|
-
var Body$1 = /*#__PURE__*/function (_React$Component3) {
|
|
2154
|
-
_inheritsLoose(Body, _React$Component3);
|
|
2155
|
-
|
|
2156
|
-
function Body() {
|
|
2157
|
-
return _React$Component3.apply(this, arguments) || this;
|
|
2158
|
-
}
|
|
2159
|
-
|
|
2160
|
-
var _proto3 = Body.prototype;
|
|
2161
|
-
|
|
2162
|
-
_proto3._closeModal = function _closeModal(event) {
|
|
2163
|
-
event.preventDefault(); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
2164
|
-
|
|
2165
|
-
var modalElement = document.getElementById('modal_box');
|
|
2166
|
-
ReactDOM.unmountComponentAtNode(modalElement);
|
|
2167
|
-
};
|
|
2168
|
-
|
|
2169
|
-
_proto3.render = function render() {
|
|
2170
|
-
var _this$props2 = this.props,
|
|
2171
|
-
icon = _this$props2.icon,
|
|
2172
|
-
plain = _this$props2.plain,
|
|
2173
|
-
children = _this$props2.children,
|
|
2174
|
-
style = _this$props2.style,
|
|
2175
|
-
showCloseIcon = _this$props2.showCloseIcon;
|
|
2176
|
-
var className = classNames('reactist_modal_box__body', {
|
|
2177
|
-
plain: plain
|
|
2178
|
-
}, this.props.className);
|
|
2179
|
-
return (
|
|
2180
|
-
/*#__PURE__*/
|
|
2181
|
-
|
|
2182
|
-
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
2183
|
-
React__default.createElement("div", {
|
|
2184
|
-
className: className,
|
|
2185
|
-
style: style
|
|
2186
|
-
}, showCloseIcon && /*#__PURE__*/React__default.createElement("a", {
|
|
2187
|
-
className: "close",
|
|
2188
|
-
onClick: this._closeModal.bind(this),
|
|
2189
|
-
href: "#"
|
|
2190
|
-
}, /*#__PURE__*/React__default.createElement(CloseIcon$1, null)), icon ? /*#__PURE__*/React__default.createElement("div", {
|
|
2191
|
-
className: "dialog"
|
|
2192
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2193
|
-
className: "reactist_icon"
|
|
2194
|
-
}, icon), /*#__PURE__*/React__default.createElement("div", {
|
|
2195
|
-
className: "content"
|
|
2196
|
-
}, children)) : children)
|
|
2197
|
-
/* eslint-enable jsx-a11y/anchor-is-valid */
|
|
2198
|
-
|
|
2199
|
-
);
|
|
2200
|
-
};
|
|
2201
|
-
|
|
2202
|
-
return Body;
|
|
2203
|
-
}(React__default.Component);
|
|
2204
|
-
|
|
2205
|
-
Body$1.displayName = 'Modal.Body';
|
|
2206
|
-
Body$1.defaultProps = {
|
|
2207
|
-
showCloseIcon: false
|
|
2208
|
-
};
|
|
2209
|
-
|
|
2210
|
-
var Actions = /*#__PURE__*/function (_React$Component4) {
|
|
2211
|
-
_inheritsLoose(Actions, _React$Component4);
|
|
2212
|
-
|
|
2213
|
-
function Actions() {
|
|
2214
|
-
return _React$Component4.apply(this, arguments) || this;
|
|
2215
|
-
}
|
|
2216
|
-
|
|
2217
|
-
var _proto4 = Actions.prototype;
|
|
2218
|
-
|
|
2219
|
-
_proto4._onClick = function _onClick(onClick) {
|
|
2220
|
-
if (onClick) {
|
|
2221
|
-
onClick();
|
|
2222
|
-
} // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
var modalElement = document.getElementById('modal_box');
|
|
2226
|
-
ReactDOM.unmountComponentAtNode(modalElement);
|
|
2227
|
-
};
|
|
2228
|
-
|
|
2229
|
-
_proto4.render = function render() {
|
|
2230
|
-
var _this2 = this;
|
|
2231
|
-
|
|
2232
|
-
var children = React__default.Children.map( // see: https://github.com/microsoft/TypeScript/issues/21699
|
|
2233
|
-
// @ts-expect-error Children cannot be typed properly yet in React
|
|
2234
|
-
this.props.children, function (child) {
|
|
2235
|
-
if (child && child.props && child.props.close) {
|
|
2236
|
-
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
2237
|
-
onClick: function onClick() {
|
|
2238
|
-
return _this2._onClick(child.props.onClick);
|
|
2239
|
-
}
|
|
2240
|
-
});
|
|
2241
|
-
} else {
|
|
2242
|
-
return child ? /*#__PURE__*/React__default.cloneElement(child) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
2243
|
-
}
|
|
2244
|
-
});
|
|
2245
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
2246
|
-
className: "reactist_modal_box__actions"
|
|
2247
|
-
}, children);
|
|
2248
|
-
};
|
|
2249
|
-
|
|
2250
|
-
return Actions;
|
|
2251
|
-
}(React__default.Component);
|
|
2252
|
-
|
|
2253
|
-
Actions.displayName = 'Modal.Actions';
|
|
2254
|
-
|
|
2255
|
-
var index = {
|
|
2256
|
-
Box: Box$2,
|
|
2257
|
-
Header: Header,
|
|
2258
|
-
Body: Body$1,
|
|
2259
|
-
Actions: Actions
|
|
2260
|
-
};
|
|
2261
|
-
|
|
2262
|
-
var hasEnoughSpace = function hasEnoughSpace(windowDimensions, elementDimensions, wrapperDimensions, wrapperPosition, position, gap) {
|
|
2263
|
-
if (gap === void 0) {
|
|
2264
|
-
gap = 0;
|
|
2265
|
-
}
|
|
2266
|
-
|
|
2267
|
-
var windowHeight = windowDimensions.height,
|
|
2268
|
-
windowWidth = windowDimensions.width;
|
|
2269
|
-
var elementHeight = elementDimensions.height,
|
|
2270
|
-
elementWidth = elementDimensions.width;
|
|
2271
|
-
var wrapperHeight = wrapperDimensions.height,
|
|
2272
|
-
wrapperWidth = wrapperDimensions.width;
|
|
2273
|
-
var wrapperX = wrapperPosition.x,
|
|
2274
|
-
wrapperY = wrapperPosition.y;
|
|
2275
|
-
|
|
2276
|
-
var verticalPosition = _calculateVerticalPosition(wrapperPosition, wrapperDimensions, elementDimensions);
|
|
2277
|
-
|
|
2278
|
-
var horizontalPosition = _calculateHorizontalPosition(wrapperPosition, wrapperDimensions, elementDimensions);
|
|
2279
|
-
|
|
2280
|
-
var canPlaceVertically = verticalPosition >= 0 && verticalPosition + elementWidth <= windowWidth;
|
|
2281
|
-
var canPlaceHorizontally = horizontalPosition >= 0 && horizontalPosition + elementHeight <= windowHeight;
|
|
2282
|
-
|
|
2283
|
-
if (position === 'top') {
|
|
2284
|
-
return canPlaceVertically && wrapperY - elementHeight - gap >= 0;
|
|
2285
|
-
} else if (position === 'right') {
|
|
2286
|
-
return canPlaceHorizontally && wrapperX + wrapperWidth + elementWidth + gap <= windowWidth;
|
|
2287
|
-
} else if (position === 'left') {
|
|
2288
|
-
return canPlaceHorizontally && wrapperX - elementWidth - gap >= 0;
|
|
2289
|
-
} else if (position === 'bottom') {
|
|
2290
|
-
return canPlaceVertically && wrapperY + wrapperHeight + elementHeight + gap <= windowHeight;
|
|
2291
|
-
}
|
|
2292
|
-
|
|
2293
|
-
return false;
|
|
2294
|
-
};
|
|
2295
|
-
|
|
2296
|
-
var _calculateVerticalPosition = function _calculateVerticalPosition(wrapperPosition, wrapperDimensions, elementDimensions) {
|
|
2297
|
-
return wrapperPosition.x + (wrapperDimensions.width - elementDimensions.width) / 2;
|
|
2298
|
-
};
|
|
2299
|
-
|
|
2300
|
-
var _calculateHorizontalPosition = function _calculateHorizontalPosition(wrapperPosition, wrapperDimensions, elementDimensions) {
|
|
2301
|
-
return wrapperPosition.y + (wrapperDimensions.height - elementDimensions.height) / 2;
|
|
2302
|
-
};
|
|
2303
|
-
|
|
2304
|
-
var calculateTopCenterPosition = function calculateTopCenterPosition(wrapperDimensions, wrapperPosition, elementDimensions, gap) {
|
|
2305
|
-
if (gap === void 0) {
|
|
2306
|
-
gap = 0;
|
|
2307
|
-
}
|
|
2308
|
-
|
|
2309
|
-
var x = _calculateVerticalPosition(wrapperPosition, wrapperDimensions, elementDimensions);
|
|
2692
|
+
var x = _calculateVerticalPosition(wrapperPosition, wrapperDimensions, elementDimensions);
|
|
2310
2693
|
|
|
2311
2694
|
var y = wrapperPosition.y - elementDimensions.height - gap;
|
|
2312
2695
|
return {
|
|
@@ -2638,7 +3021,7 @@ function RangeInput(_ref) {
|
|
|
2638
3021
|
max: max,
|
|
2639
3022
|
step: stepSize,
|
|
2640
3023
|
onChange: function onChange(event) {
|
|
2641
|
-
return _onChange
|
|
3024
|
+
return _onChange === null || _onChange === void 0 ? void 0 : _onChange(parseInt(event.target.value));
|
|
2642
3025
|
}
|
|
2643
3026
|
}), /*#__PURE__*/React__default.createElement("span", {
|
|
2644
3027
|
className: "range_btn plus",
|
|
@@ -2673,7 +3056,7 @@ function Select(_ref) {
|
|
|
2673
3056
|
},
|
|
2674
3057
|
disabled: disabled,
|
|
2675
3058
|
defaultValue: defaultValue
|
|
2676
|
-
}, otherProps), options
|
|
3059
|
+
}, otherProps), options === null || options === void 0 ? void 0 : options.map(function (option) {
|
|
2677
3060
|
return /*#__PURE__*/React__default.createElement("option", {
|
|
2678
3061
|
key: option.key || option.value,
|
|
2679
3062
|
value: option.value,
|
|
@@ -2947,6 +3330,18 @@ Tip.defaultProps = {
|
|
|
2947
3330
|
top: false
|
|
2948
3331
|
};
|
|
2949
3332
|
|
|
3333
|
+
var CloseIcon$1 = function CloseIcon() {
|
|
3334
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
3335
|
+
width: "24",
|
|
3336
|
+
height: "24",
|
|
3337
|
+
viewBox: "0 0 24 24"
|
|
3338
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
3339
|
+
fill: "gray",
|
|
3340
|
+
fillRule: "evenodd",
|
|
3341
|
+
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"
|
|
3342
|
+
}));
|
|
3343
|
+
};
|
|
3344
|
+
|
|
2950
3345
|
function Notification(_ref) {
|
|
2951
3346
|
var id = _ref.id,
|
|
2952
3347
|
icon = _ref.icon,
|
|
@@ -3008,128 +3403,6 @@ function Notification(_ref) {
|
|
|
3008
3403
|
}, customCloseButton !== null && customCloseButton !== void 0 ? customCloseButton : /*#__PURE__*/React__default.createElement(CloseIcon$1, null)) : null);
|
|
3009
3404
|
}
|
|
3010
3405
|
|
|
3011
|
-
var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
3012
|
-
_inheritsLoose(Tabs, _React$Component);
|
|
3013
|
-
|
|
3014
|
-
function Tabs(props, context) {
|
|
3015
|
-
var _this;
|
|
3016
|
-
|
|
3017
|
-
_this = _React$Component.call(this, props, context) || this;
|
|
3018
|
-
|
|
3019
|
-
_this._switchActiveTab = function (tab, i) {
|
|
3020
|
-
_this.setState(function () {
|
|
3021
|
-
return {
|
|
3022
|
-
activeTabIndex: i
|
|
3023
|
-
};
|
|
3024
|
-
});
|
|
3025
|
-
|
|
3026
|
-
if (_this.props.onChange) _this.props.onChange(tab.props.value);
|
|
3027
|
-
};
|
|
3028
|
-
|
|
3029
|
-
_this._renderTabLinks = function (tabs) {
|
|
3030
|
-
return tabs.map(function (t, i) {
|
|
3031
|
-
var _t$props = t.props,
|
|
3032
|
-
title = _t$props.title,
|
|
3033
|
-
disabled = _t$props.disabled;
|
|
3034
|
-
var value = t.props.value || i;
|
|
3035
|
-
var className = classNames('reactist_tabs__header--item', {
|
|
3036
|
-
disabled: disabled,
|
|
3037
|
-
active: i === _this.state.activeTabIndex
|
|
3038
|
-
});
|
|
3039
|
-
return (
|
|
3040
|
-
/*#__PURE__*/
|
|
3041
|
-
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
|
3042
|
-
React__default.createElement("a", {
|
|
3043
|
-
className: className,
|
|
3044
|
-
href: "",
|
|
3045
|
-
key: value,
|
|
3046
|
-
onClick: function onClick(event) {
|
|
3047
|
-
event.preventDefault();
|
|
3048
|
-
|
|
3049
|
-
if (!disabled) {
|
|
3050
|
-
_this._switchActiveTab(t, i);
|
|
3051
|
-
}
|
|
3052
|
-
}
|
|
3053
|
-
}, title)
|
|
3054
|
-
);
|
|
3055
|
-
});
|
|
3056
|
-
};
|
|
3057
|
-
|
|
3058
|
-
var defaultTab = props.defaultTab,
|
|
3059
|
-
onChange = props.onChange;
|
|
3060
|
-
var children = React__default.Children.toArray(_this.props.children);
|
|
3061
|
-
var hasDefault = defaultTab || defaultTab === 0;
|
|
3062
|
-
|
|
3063
|
-
if (hasDefault || onChange) {
|
|
3064
|
-
if (children) {
|
|
3065
|
-
var missing = children.find(function (c) {
|
|
3066
|
-
return !c.props.value && c.props.value !== 0;
|
|
3067
|
-
});
|
|
3068
|
-
if (missing) throw new Error('(Tab) Missing property: all Tab must have "value" set if "defaultTab" or "onChange" is used');
|
|
3069
|
-
}
|
|
3070
|
-
}
|
|
3071
|
-
|
|
3072
|
-
if (hasDefault && children) {
|
|
3073
|
-
var i = children.findIndex(function (x) {
|
|
3074
|
-
return x.props.value === defaultTab;
|
|
3075
|
-
});
|
|
3076
|
-
if (i === -1) throw new Error( // `hasDefault` being `true` guarantees `defaultTab` being a `number`.
|
|
3077
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
3078
|
-
"(Tabs) Unable to find Tab with the matching defaultTab value \"" + defaultTab + "\"");
|
|
3079
|
-
_this.state = {
|
|
3080
|
-
activeTabIndex: i
|
|
3081
|
-
};
|
|
3082
|
-
} else {
|
|
3083
|
-
_this.state = {
|
|
3084
|
-
activeTabIndex: 0
|
|
3085
|
-
};
|
|
3086
|
-
}
|
|
3087
|
-
|
|
3088
|
-
return _this;
|
|
3089
|
-
}
|
|
3090
|
-
|
|
3091
|
-
var _proto = Tabs.prototype;
|
|
3092
|
-
|
|
3093
|
-
_proto.render = function render() {
|
|
3094
|
-
// ensures that single or no child components don't throw
|
|
3095
|
-
var children = React__default.Children.toArray(this.props.children);
|
|
3096
|
-
var activeTab = children[this.state.activeTabIndex] || children[0] || null;
|
|
3097
|
-
var cls = classNames("reactist_tabs" + (this.props.spreadLayout ? '--spreadlayout' : ''));
|
|
3098
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
3099
|
-
className: cls
|
|
3100
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3101
|
-
className: "reactist_tabs__header"
|
|
3102
|
-
}, this._renderTabLinks(children)), /*#__PURE__*/React__default.createElement("div", {
|
|
3103
|
-
className: "reactist_tabs__body"
|
|
3104
|
-
}, activeTab));
|
|
3105
|
-
};
|
|
3106
|
-
|
|
3107
|
-
return Tabs;
|
|
3108
|
-
}(React__default.Component);
|
|
3109
|
-
|
|
3110
|
-
Tabs.displayName = 'Tabs';
|
|
3111
|
-
Tabs.defaultProps = {
|
|
3112
|
-
spreadLayout: false
|
|
3113
|
-
};
|
|
3114
|
-
|
|
3115
|
-
var Tab = function Tab(_ref) {
|
|
3116
|
-
var children = _ref.children,
|
|
3117
|
-
className = _ref.className;
|
|
3118
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
3119
|
-
className: classNames('reactist_tabs__tab', className)
|
|
3120
|
-
}, children);
|
|
3121
|
-
};
|
|
3122
|
-
|
|
3123
|
-
Tab.displayName = 'Tab';
|
|
3124
|
-
Tab.defaultProps = {
|
|
3125
|
-
disabled: false
|
|
3126
|
-
};
|
|
3127
|
-
|
|
3128
|
-
/* eslint-disable @typescript-eslint/ban-types */
|
|
3129
|
-
function forwardRefWithAs$1(render) {
|
|
3130
|
-
return /*#__PURE__*/React.forwardRef(render);
|
|
3131
|
-
}
|
|
3132
|
-
|
|
3133
3406
|
var MenuContext = /*#__PURE__*/React.createContext( // Reakit gives us no means to obtain a valid initial/default value of type MenuStateReturn
|
|
3134
3407
|
// (it is normally obtained by calling useMenuState but we can't call hooks outside components).
|
|
3135
3408
|
// This is however of little consequence since this value is only used if some of the components
|
|
@@ -3160,25 +3433,22 @@ function Menu(_ref) {
|
|
|
3160
3433
|
return /*#__PURE__*/React.createElement(MenuContext.Provider, {
|
|
3161
3434
|
value: value
|
|
3162
3435
|
}, children);
|
|
3163
|
-
}
|
|
3164
|
-
// MenuButton
|
|
3165
|
-
//
|
|
3166
|
-
|
|
3436
|
+
}
|
|
3167
3437
|
/**
|
|
3168
3438
|
* A button to toggle a dropdown menu open or closed.
|
|
3169
3439
|
*/
|
|
3170
3440
|
|
|
3171
3441
|
|
|
3172
|
-
var MenuButton = /*#__PURE__*/
|
|
3173
|
-
var
|
|
3174
|
-
props = _objectWithoutPropertiesLoose(_ref2, ["
|
|
3442
|
+
var MenuButton = /*#__PURE__*/polymorphicComponent(function MenuButton(_ref2, ref) {
|
|
3443
|
+
var exceptionallySetClassName = _ref2.exceptionallySetClassName,
|
|
3444
|
+
props = _objectWithoutPropertiesLoose(_ref2, ["exceptionallySetClassName"]);
|
|
3175
3445
|
|
|
3176
3446
|
var _React$useContext = React.useContext(MenuContext),
|
|
3177
3447
|
state = _objectWithoutPropertiesLoose(_React$useContext, ["handleItemSelect"]);
|
|
3178
3448
|
|
|
3179
3449
|
return /*#__PURE__*/React.createElement(Reakit.MenuButton, Object.assign({}, props, state, {
|
|
3180
3450
|
ref: ref,
|
|
3181
|
-
className: classNames('reactist_menubutton',
|
|
3451
|
+
className: classNames('reactist_menubutton', exceptionallySetClassName)
|
|
3182
3452
|
}));
|
|
3183
3453
|
});
|
|
3184
3454
|
var BACKDROP_STYLE = {
|
|
@@ -3216,16 +3486,16 @@ function MenuBackdrop(_ref3) {
|
|
|
3216
3486
|
*/
|
|
3217
3487
|
|
|
3218
3488
|
|
|
3219
|
-
var MenuList = /*#__PURE__*/
|
|
3220
|
-
var
|
|
3221
|
-
props = _objectWithoutPropertiesLoose(_ref4, ["
|
|
3489
|
+
var MenuList = /*#__PURE__*/polymorphicComponent(function MenuList(_ref4, ref) {
|
|
3490
|
+
var exceptionallySetClassName = _ref4.exceptionallySetClassName,
|
|
3491
|
+
props = _objectWithoutPropertiesLoose(_ref4, ["exceptionallySetClassName"]);
|
|
3222
3492
|
|
|
3223
3493
|
var _React$useContext2 = React.useContext(MenuContext),
|
|
3224
3494
|
state = _objectWithoutPropertiesLoose(_React$useContext2, ["handleItemSelect"]);
|
|
3225
3495
|
|
|
3226
3496
|
return state.visible ? /*#__PURE__*/React.createElement(MenuBackdrop, Object.assign({}, state), /*#__PURE__*/React.createElement(Reakit.Menu, Object.assign({}, props, state, {
|
|
3227
3497
|
ref: ref,
|
|
3228
|
-
className: classNames('reactist_menulist',
|
|
3498
|
+
className: classNames('reactist_menulist', exceptionallySetClassName)
|
|
3229
3499
|
}))) : null;
|
|
3230
3500
|
});
|
|
3231
3501
|
/**
|
|
@@ -3233,14 +3503,15 @@ var MenuList = /*#__PURE__*/forwardRefWithAs$1(function MenuList(_ref4, ref) {
|
|
|
3233
3503
|
* callback.
|
|
3234
3504
|
*/
|
|
3235
3505
|
|
|
3236
|
-
var MenuItem = /*#__PURE__*/
|
|
3506
|
+
var MenuItem = /*#__PURE__*/polymorphicComponent(function MenuItem(_ref5, ref) {
|
|
3237
3507
|
var value = _ref5.value,
|
|
3238
3508
|
children = _ref5.children,
|
|
3239
3509
|
onSelect = _ref5.onSelect,
|
|
3240
3510
|
_ref5$hideOnSelect = _ref5.hideOnSelect,
|
|
3241
3511
|
hideOnSelect = _ref5$hideOnSelect === void 0 ? true : _ref5$hideOnSelect,
|
|
3242
3512
|
onClick = _ref5.onClick,
|
|
3243
|
-
|
|
3513
|
+
exceptionallySetClassName = _ref5.exceptionallySetClassName,
|
|
3514
|
+
props = _objectWithoutPropertiesLoose(_ref5, ["value", "children", "onSelect", "hideOnSelect", "onClick", "exceptionallySetClassName"]);
|
|
3244
3515
|
|
|
3245
3516
|
var _React$useContext3 = React.useContext(MenuContext),
|
|
3246
3517
|
handleItemSelect = _React$useContext3.handleItemSelect,
|
|
@@ -3256,7 +3527,8 @@ var MenuItem = /*#__PURE__*/forwardRefWithAs$1(function MenuItem(_ref5, ref) {
|
|
|
3256
3527
|
}, [onSelect, onClick, handleItemSelect, hideOnSelect, hide, value]);
|
|
3257
3528
|
return /*#__PURE__*/React.createElement(Reakit.MenuItem, Object.assign({}, props, state, {
|
|
3258
3529
|
ref: ref,
|
|
3259
|
-
onClick: handleClick
|
|
3530
|
+
onClick: handleClick,
|
|
3531
|
+
className: exceptionallySetClassName
|
|
3260
3532
|
}), children);
|
|
3261
3533
|
});
|
|
3262
3534
|
/**
|
|
@@ -3318,22 +3590,300 @@ var SubMenu = /*#__PURE__*/React.forwardRef(function SubMenu(_ref6, ref) {
|
|
|
3318
3590
|
* before and/or after the group if you so wish.
|
|
3319
3591
|
*/
|
|
3320
3592
|
|
|
3321
|
-
var MenuGroup = /*#__PURE__*/
|
|
3593
|
+
var MenuGroup = /*#__PURE__*/polymorphicComponent(function MenuGroud(_ref7, ref) {
|
|
3322
3594
|
var label = _ref7.label,
|
|
3323
3595
|
children = _ref7.children,
|
|
3324
|
-
|
|
3596
|
+
exceptionallySetClassName = _ref7.exceptionallySetClassName,
|
|
3597
|
+
props = _objectWithoutPropertiesLoose(_ref7, ["label", "children", "exceptionallySetClassName"]);
|
|
3325
3598
|
|
|
3326
3599
|
var _React$useContext5 = React.useContext(MenuContext),
|
|
3327
3600
|
state = _objectWithoutPropertiesLoose(_React$useContext5, ["handleItemSelect"]);
|
|
3328
3601
|
|
|
3329
3602
|
return /*#__PURE__*/React.createElement(Reakit.MenuGroup, Object.assign({
|
|
3330
3603
|
ref: ref
|
|
3331
|
-
}, props, state
|
|
3604
|
+
}, props, state, {
|
|
3605
|
+
className: exceptionallySetClassName
|
|
3606
|
+
}), label ? /*#__PURE__*/React.createElement("div", {
|
|
3332
3607
|
role: "presentation",
|
|
3333
3608
|
className: "reactist_menugroup__label"
|
|
3334
3609
|
}, label) : null, children);
|
|
3335
3610
|
});
|
|
3336
3611
|
|
|
3612
|
+
/** @deprecated */
|
|
3613
|
+
|
|
3614
|
+
var Box$2 = /*#__PURE__*/function (_React$Component) {
|
|
3615
|
+
_inheritsLoose(Box, _React$Component);
|
|
3616
|
+
|
|
3617
|
+
function Box() {
|
|
3618
|
+
var _this;
|
|
3619
|
+
|
|
3620
|
+
_this = _React$Component.apply(this, arguments) || this;
|
|
3621
|
+
|
|
3622
|
+
_this._closeModal = function () {
|
|
3623
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3624
|
+
var modalElement = document.getElementById('modal_box');
|
|
3625
|
+
ReactDOM.unmountComponentAtNode(modalElement);
|
|
3626
|
+
};
|
|
3627
|
+
|
|
3628
|
+
_this._handleKeyDown = function (event) {
|
|
3629
|
+
if (event.keyCode === 27) {
|
|
3630
|
+
// ESC
|
|
3631
|
+
_this._closeModal();
|
|
3632
|
+
|
|
3633
|
+
if (event.preventDefault) event.preventDefault();
|
|
3634
|
+
}
|
|
3635
|
+
};
|
|
3636
|
+
|
|
3637
|
+
_this._handleOverlayClick = function (event) {
|
|
3638
|
+
if (event.target instanceof Element && (event.target.id === 'reactist-overlay' || event.target.id === 'reactist-overlay-inner')) {
|
|
3639
|
+
_this._closeModal();
|
|
3640
|
+
}
|
|
3641
|
+
};
|
|
3642
|
+
|
|
3643
|
+
return _this;
|
|
3644
|
+
}
|
|
3645
|
+
|
|
3646
|
+
var _proto = Box.prototype;
|
|
3647
|
+
|
|
3648
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
3649
|
+
window.addEventListener('keydown', this._handleKeyDown);
|
|
3650
|
+
};
|
|
3651
|
+
|
|
3652
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
3653
|
+
window.removeEventListener('keydown', this._handleKeyDown);
|
|
3654
|
+
};
|
|
3655
|
+
|
|
3656
|
+
_proto.render = function render() {
|
|
3657
|
+
var _this$props = this.props,
|
|
3658
|
+
large = _this$props.large,
|
|
3659
|
+
medium = _this$props.medium,
|
|
3660
|
+
style = _this$props.style,
|
|
3661
|
+
children = _this$props.children,
|
|
3662
|
+
closeOnOverlayClick = _this$props.closeOnOverlayClick;
|
|
3663
|
+
var className = classNames('reactist_modal_box', {
|
|
3664
|
+
large: large,
|
|
3665
|
+
medium: medium
|
|
3666
|
+
}, this.props.className);
|
|
3667
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3668
|
+
className: "reactist_overlay",
|
|
3669
|
+
id: "reactist-overlay",
|
|
3670
|
+
onClick: closeOnOverlayClick ? this._handleOverlayClick : undefined
|
|
3671
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3672
|
+
className: "reactist_overlay_inner",
|
|
3673
|
+
id: "reactist-overlay-inner"
|
|
3674
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3675
|
+
style: style,
|
|
3676
|
+
className: className
|
|
3677
|
+
}, children)));
|
|
3678
|
+
};
|
|
3679
|
+
|
|
3680
|
+
return Box;
|
|
3681
|
+
}(React__default.Component);
|
|
3682
|
+
|
|
3683
|
+
Box$2.displayName = 'Modal.Box';
|
|
3684
|
+
Box$2.defaultProps = {
|
|
3685
|
+
large: false,
|
|
3686
|
+
closeOnOverlayClick: false
|
|
3687
|
+
};
|
|
3688
|
+
/** @deprecated */
|
|
3689
|
+
|
|
3690
|
+
var Header = /*#__PURE__*/function (_React$Component2) {
|
|
3691
|
+
_inheritsLoose(Header, _React$Component2);
|
|
3692
|
+
|
|
3693
|
+
function Header() {
|
|
3694
|
+
return _React$Component2.apply(this, arguments) || this;
|
|
3695
|
+
}
|
|
3696
|
+
|
|
3697
|
+
var _proto2 = Header.prototype;
|
|
3698
|
+
|
|
3699
|
+
_proto2._closeModal = function _closeModal(event) {
|
|
3700
|
+
event.preventDefault();
|
|
3701
|
+
|
|
3702
|
+
if (typeof this.props.beforeClose === 'function') {
|
|
3703
|
+
this.props.beforeClose();
|
|
3704
|
+
} // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3705
|
+
|
|
3706
|
+
|
|
3707
|
+
var modalElement = document.getElementById('modal_box');
|
|
3708
|
+
ReactDOM.unmountComponentAtNode(modalElement);
|
|
3709
|
+
};
|
|
3710
|
+
|
|
3711
|
+
_proto2.render = function render() {
|
|
3712
|
+
return (
|
|
3713
|
+
/*#__PURE__*/
|
|
3714
|
+
|
|
3715
|
+
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
3716
|
+
React__default.createElement("div", {
|
|
3717
|
+
className: "reactist_modal_box__header"
|
|
3718
|
+
}, /*#__PURE__*/React__default.createElement("p", null, this.props.title && /*#__PURE__*/React__default.createElement("span", {
|
|
3719
|
+
className: "title"
|
|
3720
|
+
}, this.props.title), this.props.subtitle && /*#__PURE__*/React__default.createElement("span", {
|
|
3721
|
+
className: "subtitle"
|
|
3722
|
+
}, this.props.subtitle), this.props.children), /*#__PURE__*/React__default.createElement("a", {
|
|
3723
|
+
className: "close",
|
|
3724
|
+
onClick: this._closeModal.bind(this),
|
|
3725
|
+
href: "#"
|
|
3726
|
+
}, /*#__PURE__*/React__default.createElement(CloseIcon$1, null)))
|
|
3727
|
+
/* eslint-enable jsx-a11y/anchor-is-valid */
|
|
3728
|
+
|
|
3729
|
+
);
|
|
3730
|
+
};
|
|
3731
|
+
|
|
3732
|
+
return Header;
|
|
3733
|
+
}(React__default.Component);
|
|
3734
|
+
|
|
3735
|
+
Header.displayName = 'Modal.Header';
|
|
3736
|
+
/** @deprecated */
|
|
3737
|
+
|
|
3738
|
+
var Body$1 = /*#__PURE__*/function (_React$Component3) {
|
|
3739
|
+
_inheritsLoose(Body, _React$Component3);
|
|
3740
|
+
|
|
3741
|
+
function Body() {
|
|
3742
|
+
return _React$Component3.apply(this, arguments) || this;
|
|
3743
|
+
}
|
|
3744
|
+
|
|
3745
|
+
var _proto3 = Body.prototype;
|
|
3746
|
+
|
|
3747
|
+
_proto3._closeModal = function _closeModal(event) {
|
|
3748
|
+
event.preventDefault(); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3749
|
+
|
|
3750
|
+
var modalElement = document.getElementById('modal_box');
|
|
3751
|
+
ReactDOM.unmountComponentAtNode(modalElement);
|
|
3752
|
+
};
|
|
3753
|
+
|
|
3754
|
+
_proto3.render = function render() {
|
|
3755
|
+
var _this$props2 = this.props,
|
|
3756
|
+
icon = _this$props2.icon,
|
|
3757
|
+
plain = _this$props2.plain,
|
|
3758
|
+
children = _this$props2.children,
|
|
3759
|
+
style = _this$props2.style,
|
|
3760
|
+
showCloseIcon = _this$props2.showCloseIcon;
|
|
3761
|
+
var className = classNames('reactist_modal_box__body', {
|
|
3762
|
+
plain: plain
|
|
3763
|
+
}, this.props.className);
|
|
3764
|
+
return (
|
|
3765
|
+
/*#__PURE__*/
|
|
3766
|
+
|
|
3767
|
+
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
3768
|
+
React__default.createElement("div", {
|
|
3769
|
+
className: className,
|
|
3770
|
+
style: style
|
|
3771
|
+
}, showCloseIcon && /*#__PURE__*/React__default.createElement("a", {
|
|
3772
|
+
className: "close",
|
|
3773
|
+
onClick: this._closeModal.bind(this),
|
|
3774
|
+
href: "#"
|
|
3775
|
+
}, /*#__PURE__*/React__default.createElement(CloseIcon$1, null)), icon ? /*#__PURE__*/React__default.createElement("div", {
|
|
3776
|
+
className: "dialog"
|
|
3777
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3778
|
+
className: "reactist_icon"
|
|
3779
|
+
}, icon), /*#__PURE__*/React__default.createElement("div", {
|
|
3780
|
+
className: "content"
|
|
3781
|
+
}, children)) : children)
|
|
3782
|
+
/* eslint-enable jsx-a11y/anchor-is-valid */
|
|
3783
|
+
|
|
3784
|
+
);
|
|
3785
|
+
};
|
|
3786
|
+
|
|
3787
|
+
return Body;
|
|
3788
|
+
}(React__default.Component);
|
|
3789
|
+
|
|
3790
|
+
Body$1.displayName = 'Modal.Body';
|
|
3791
|
+
Body$1.defaultProps = {
|
|
3792
|
+
showCloseIcon: false
|
|
3793
|
+
};
|
|
3794
|
+
/** @deprecated */
|
|
3795
|
+
|
|
3796
|
+
var Actions = /*#__PURE__*/function (_React$Component4) {
|
|
3797
|
+
_inheritsLoose(Actions, _React$Component4);
|
|
3798
|
+
|
|
3799
|
+
function Actions() {
|
|
3800
|
+
return _React$Component4.apply(this, arguments) || this;
|
|
3801
|
+
}
|
|
3802
|
+
|
|
3803
|
+
var _proto4 = Actions.prototype;
|
|
3804
|
+
|
|
3805
|
+
_proto4._onClick = function _onClick(onClick) {
|
|
3806
|
+
if (onClick) {
|
|
3807
|
+
onClick();
|
|
3808
|
+
} // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3809
|
+
|
|
3810
|
+
|
|
3811
|
+
var modalElement = document.getElementById('modal_box');
|
|
3812
|
+
ReactDOM.unmountComponentAtNode(modalElement);
|
|
3813
|
+
};
|
|
3814
|
+
|
|
3815
|
+
_proto4.render = function render() {
|
|
3816
|
+
var _this2 = this;
|
|
3817
|
+
|
|
3818
|
+
var children = React__default.Children.map( // see: https://github.com/microsoft/TypeScript/issues/21699
|
|
3819
|
+
// @ts-expect-error Children cannot be typed properly yet in React
|
|
3820
|
+
this.props.children, function (child) {
|
|
3821
|
+
var _child$props;
|
|
3822
|
+
|
|
3823
|
+
if (child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.close) {
|
|
3824
|
+
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
3825
|
+
onClick: function onClick() {
|
|
3826
|
+
return _this2._onClick(child.props.onClick);
|
|
3827
|
+
}
|
|
3828
|
+
});
|
|
3829
|
+
} else {
|
|
3830
|
+
return child ? /*#__PURE__*/React__default.cloneElement(child) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
3831
|
+
}
|
|
3832
|
+
});
|
|
3833
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3834
|
+
className: "reactist_modal_box__actions"
|
|
3835
|
+
}, children);
|
|
3836
|
+
};
|
|
3837
|
+
|
|
3838
|
+
return Actions;
|
|
3839
|
+
}(React__default.Component);
|
|
3840
|
+
|
|
3841
|
+
Actions.displayName = 'Modal.Actions';
|
|
3842
|
+
|
|
3843
|
+
var index = {
|
|
3844
|
+
Box: Box$2,
|
|
3845
|
+
Header: Header,
|
|
3846
|
+
Body: Body$1,
|
|
3847
|
+
Actions: Actions
|
|
3848
|
+
};
|
|
3849
|
+
|
|
3850
|
+
/** @deprecated */
|
|
3851
|
+
|
|
3852
|
+
function Loading$1(_ref) {
|
|
3853
|
+
var className = _ref.className,
|
|
3854
|
+
_ref$spinnerColor = _ref.spinnerColor,
|
|
3855
|
+
spinnerColor = _ref$spinnerColor === void 0 ? '#3F82EF' : _ref$spinnerColor,
|
|
3856
|
+
_ref$bgColor = _ref.bgColor,
|
|
3857
|
+
bgColor = _ref$bgColor === void 0 ? '#D9E6FB' : _ref$bgColor,
|
|
3858
|
+
_ref$size = _ref.size,
|
|
3859
|
+
size = _ref$size === void 0 ? 24 : _ref$size,
|
|
3860
|
+
_ref$ariaLabel = _ref['aria-label'],
|
|
3861
|
+
ariaLabel = _ref$ariaLabel === void 0 ? 'Loading' : _ref$ariaLabel;
|
|
3862
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3863
|
+
className: classNames('reactist_loading', className),
|
|
3864
|
+
"aria-label": ariaLabel,
|
|
3865
|
+
"aria-live": "assertive",
|
|
3866
|
+
role: "alert"
|
|
3867
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
3868
|
+
className: "reactist_loading--spinner"
|
|
3869
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
3870
|
+
width: size,
|
|
3871
|
+
height: size,
|
|
3872
|
+
viewBox: '0 0 24 24'
|
|
3873
|
+
}, /*#__PURE__*/React__default.createElement("g", {
|
|
3874
|
+
fill: "none",
|
|
3875
|
+
fillRule: "nonzero"
|
|
3876
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
3877
|
+
fill: spinnerColor,
|
|
3878
|
+
d: "M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z"
|
|
3879
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
3880
|
+
fill: bgColor,
|
|
3881
|
+
d: "M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z"
|
|
3882
|
+
})))));
|
|
3883
|
+
}
|
|
3884
|
+
|
|
3885
|
+
Loading$1.displayName = 'Loading';
|
|
3886
|
+
|
|
3337
3887
|
exports.Alert = Alert;
|
|
3338
3888
|
exports.Avatar = Avatar;
|
|
3339
3889
|
exports.Box = Box;
|
|
@@ -3345,23 +3895,32 @@ exports.CheckboxField = CheckboxField;
|
|
|
3345
3895
|
exports.ColorPicker = ColorPicker;
|
|
3346
3896
|
exports.Column = Column;
|
|
3347
3897
|
exports.Columns = Columns;
|
|
3898
|
+
exports.DeprecatedButton = Button$1;
|
|
3899
|
+
exports.DeprecatedLoading = Loading$1;
|
|
3900
|
+
exports.DeprecatedModal = index;
|
|
3348
3901
|
exports.Divider = Divider;
|
|
3349
3902
|
exports.Dropdown = Dropdown;
|
|
3350
3903
|
exports.ErrorMessage = ErrorMessage;
|
|
3351
3904
|
exports.Heading = Heading;
|
|
3905
|
+
exports.Hidden = Hidden;
|
|
3906
|
+
exports.HiddenVisually = HiddenVisually;
|
|
3352
3907
|
exports.Icon = Icon;
|
|
3353
3908
|
exports.Inline = Inline;
|
|
3354
3909
|
exports.Input = Input;
|
|
3355
3910
|
exports.KeyCapturer = KeyCapturer;
|
|
3356
3911
|
exports.KeyboardShortcut = KeyboardShortcut;
|
|
3357
3912
|
exports.Loading = Loading;
|
|
3358
|
-
exports.LoadingSpinner = LoadingSpinner;
|
|
3359
3913
|
exports.Menu = Menu;
|
|
3360
3914
|
exports.MenuButton = MenuButton;
|
|
3361
3915
|
exports.MenuGroup = MenuGroup;
|
|
3362
3916
|
exports.MenuItem = MenuItem;
|
|
3363
3917
|
exports.MenuList = MenuList;
|
|
3364
|
-
exports.Modal =
|
|
3918
|
+
exports.Modal = Modal;
|
|
3919
|
+
exports.ModalActions = ModalActions;
|
|
3920
|
+
exports.ModalBody = ModalBody;
|
|
3921
|
+
exports.ModalCloseButton = ModalCloseButton;
|
|
3922
|
+
exports.ModalFooter = ModalFooter;
|
|
3923
|
+
exports.ModalHeader = ModalHeader;
|
|
3365
3924
|
exports.Notice = Notice;
|
|
3366
3925
|
exports.Notification = Notification;
|
|
3367
3926
|
exports.PasswordField = PasswordField;
|
|
@@ -3375,6 +3934,9 @@ exports.Stack = Stack;
|
|
|
3375
3934
|
exports.SubMenu = SubMenu;
|
|
3376
3935
|
exports.SwitchField = SwitchField;
|
|
3377
3936
|
exports.Tab = Tab;
|
|
3937
|
+
exports.TabAwareSlot = TabAwareSlot;
|
|
3938
|
+
exports.TabList = TabList;
|
|
3939
|
+
exports.TabPanel = TabPanel;
|
|
3378
3940
|
exports.Tabs = Tabs;
|
|
3379
3941
|
exports.Text = Text;
|
|
3380
3942
|
exports.TextArea = TextArea;
|
|
@@ -3383,4 +3945,5 @@ exports.TextLink = TextLink;
|
|
|
3383
3945
|
exports.Time = Time;
|
|
3384
3946
|
exports.Tip = Tip;
|
|
3385
3947
|
exports.Tooltip = Tooltip;
|
|
3948
|
+
exports.usePrevious = usePrevious;
|
|
3386
3949
|
//# sourceMappingURL=reactist.cjs.development.js.map
|