@doist/reactist 28.7.2 → 28.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1457 -0
- package/CODE_OF_CONDUCT.md +83 -0
- package/CONTRIBUTING.md +46 -0
- package/dist/reactist.cjs.development.js +2091 -3811
- 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/avatar/avatar.js +35 -30
- package/es/avatar/avatar.js.map +1 -1
- package/es/avatar/utils.js +19 -22
- package/es/avatar/utils.js.map +1 -1
- package/es/badge/badge.js +5 -16
- package/es/badge/badge.js.map +1 -1
- package/es/banner/banner.js +39 -115
- package/es/banner/banner.js.map +1 -1
- package/es/banner/banner.module.css.js +1 -1
- package/es/base-field/base-field.js +80 -162
- package/es/base-field/base-field.js.map +1 -1
- package/es/base-field/base-field.module.css.js +1 -1
- package/es/box/box.js +61 -137
- package/es/box/box.js.map +1 -1
- package/es/button/button.js +42 -95
- package/es/button/button.js.map +1 -1
- package/es/checkbox-field/checkbox-field.js +46 -73
- package/es/checkbox-field/checkbox-field.js.map +1 -1
- package/es/checkbox-field/checkbox-field.module.css.js +1 -1
- package/es/checkbox-field/checkbox-icon.js +28 -55
- package/es/checkbox-field/checkbox-icon.js.map +1 -1
- package/es/checkbox-field/use-fork-ref.js +29 -25
- package/es/checkbox-field/use-fork-ref.js.map +1 -1
- package/es/columns/columns.js +22 -46
- package/es/columns/columns.js.map +1 -1
- package/es/columns/columns.module.css.js +1 -1
- package/es/components/color-picker/color-picker.js +45 -66
- package/es/components/color-picker/color-picker.js.map +1 -1
- package/es/components/deprecated-button/deprecated-button.js +11 -34
- package/es/components/deprecated-button/deprecated-button.js.map +1 -1
- package/es/components/deprecated-dropdown/dropdown.js +136 -197
- package/es/components/deprecated-dropdown/dropdown.js.map +1 -1
- package/es/components/deprecated-input/input.js +6 -10
- package/es/components/deprecated-input/input.js.map +1 -1
- package/es/components/deprecated-select/select.js +7 -31
- package/es/components/deprecated-select/select.js.map +1 -1
- package/es/components/key-capturer/key-capturer.js +130 -171
- package/es/components/key-capturer/key-capturer.js.map +1 -1
- package/es/components/keyboard-shortcut/keyboard-shortcut.js +48 -79
- package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/es/components/progress-bar/progress-bar.js +8 -20
- package/es/components/progress-bar/progress-bar.js.map +1 -1
- package/es/components/time/time-utils.js +52 -64
- package/es/components/time/time-utils.js.map +1 -1
- package/es/components/time/time.js +90 -114
- package/es/components/time/time.js.map +1 -1
- package/es/divider/divider.js +4 -13
- package/es/divider/divider.js.map +1 -1
- package/es/heading/heading.js +19 -28
- package/es/heading/heading.js.map +1 -1
- package/es/hidden/hidden.js +36 -45
- package/es/hidden/hidden.js.map +1 -1
- package/es/hidden-visually/hidden-visually.js +7 -13
- package/es/hidden-visually/hidden-visually.js.map +1 -1
- package/es/icons/alert-icon.js +18 -64
- package/es/icons/alert-icon.js.map +1 -1
- package/es/icons/banner-icon.js +25 -97
- package/es/icons/banner-icon.js.map +1 -1
- package/es/icons/close-icon.js +3 -9
- package/es/icons/close-icon.js.map +1 -1
- package/es/icons/password-hidden-icon.js +6 -23
- package/es/icons/password-hidden-icon.js.map +1 -1
- package/es/icons/password-visible-icon.js +5 -16
- package/es/icons/password-visible-icon.js.map +1 -1
- package/es/inline/inline.js +8 -23
- package/es/inline/inline.js.map +1 -1
- package/es/loading/loading.js +17 -28
- package/es/loading/loading.js.map +1 -1
- package/es/menu/menu.js +127 -260
- package/es/menu/menu.js.map +1 -1
- package/es/modal/modal.js +143 -272
- package/es/modal/modal.js.map +1 -1
- package/es/modal/modal.module.css.js +1 -1
- package/es/notice/notice.js +8 -21
- package/es/notice/notice.js.map +1 -1
- package/es/notice/notice.module.css.js +1 -1
- package/es/password-field/password-field.js +10 -24
- package/es/password-field/password-field.js.map +1 -1
- package/es/prose/prose.js +10 -15
- package/es/prose/prose.js.map +1 -1
- package/es/select-field/select-field.js +14 -51
- package/es/select-field/select-field.js.map +1 -1
- package/es/spinner/spinner.js +6 -20
- package/es/spinner/spinner.js.map +1 -1
- package/es/stack/stack.js +15 -27
- package/es/stack/stack.js.map +1 -1
- package/es/switch-field/switch-field.js +38 -73
- package/es/switch-field/switch-field.js.map +1 -1
- package/es/switch-field/switch-field.module.css.js +1 -1
- package/es/tabs/tabs.js +120 -207
- package/es/tabs/tabs.js.map +1 -1
- package/es/text/text.js +16 -25
- package/es/text/text.js.map +1 -1
- package/es/text-area/text-area.js +54 -111
- package/es/text-area/text-area.js.map +1 -1
- package/es/text-field/text-field.js +30 -84
- package/es/text-field/text-field.js.map +1 -1
- package/es/text-link/text-link.js +9 -20
- package/es/text-link/text-link.js.map +1 -1
- package/es/text-link/text-link.module.css.js +1 -1
- package/es/toast/static-toast.js +35 -70
- package/es/toast/static-toast.js.map +1 -1
- package/es/toast/toast-animation.js +121 -159
- package/es/toast/toast-animation.js.map +1 -1
- package/es/toast/use-toasts.js +134 -197
- package/es/toast/use-toasts.js.map +1 -1
- package/es/tooltip/tooltip.js +31 -69
- package/es/tooltip/tooltip.js.map +1 -1
- package/es/utils/common-helpers.js +9 -13
- package/es/utils/common-helpers.js.map +1 -1
- package/es/utils/polymorphism.js +7 -8
- package/es/utils/polymorphism.js.map +1 -1
- package/es/utils/responsive-props.js +57 -66
- package/es/utils/responsive-props.js.map +1 -1
- package/lib/avatar/avatar.d.ts +21 -21
- package/lib/avatar/avatar.js +69 -1
- package/lib/avatar/avatar.js.map +1 -1
- package/lib/avatar/avatar.module.css.js +7 -1
- package/lib/avatar/avatar.module.css.js.map +1 -1
- package/lib/avatar/index.d.ts +1 -1
- package/lib/avatar/utils.d.ts +3 -3
- package/lib/avatar/utils.js +30 -1
- package/lib/avatar/utils.js.map +1 -1
- package/lib/badge/badge.d.ts +15 -15
- package/lib/badge/badge.js +36 -1
- package/lib/badge/badge.js.map +1 -1
- package/lib/badge/badge.module.css.js +7 -1
- package/lib/badge/badge.module.css.js.map +1 -1
- package/lib/badge/index.d.ts +1 -1
- package/lib/banner/banner.d.ts +87 -87
- package/lib/banner/banner.js +79 -1
- package/lib/banner/banner.js.map +1 -1
- package/lib/banner/banner.module.css.js +7 -1
- package/lib/banner/banner.module.css.js.map +1 -1
- package/lib/banner/index.d.ts +2 -2
- package/lib/banner/story-promo-image.d.ts +4 -4
- package/lib/base-field/base-field.d.ts +139 -139
- package/lib/base-field/base-field.js +127 -1
- package/lib/base-field/base-field.js.map +1 -1
- package/lib/base-field/base-field.module.css.js +7 -1
- package/lib/base-field/base-field.module.css.js.map +1 -1
- package/lib/base-field/index.d.ts +1 -1
- package/lib/box/box.d.ts +73 -73
- package/lib/box/box.js +103 -1
- package/lib/box/box.js.map +1 -1
- package/lib/box/box.module.css.js +7 -1
- package/lib/box/box.module.css.js.map +1 -1
- package/lib/box/gap.module.css.js +7 -1
- package/lib/box/gap.module.css.js.map +1 -1
- package/lib/box/index.d.ts +1 -1
- package/lib/box/margin.module.css.js +7 -1
- package/lib/box/margin.module.css.js.map +1 -1
- package/lib/box/padding.module.css.js +7 -1
- package/lib/box/padding.module.css.js.map +1 -1
- package/lib/box/width.module.css.js +7 -1
- package/lib/box/width.module.css.js.map +1 -1
- package/lib/button/button.d.ts +127 -127
- package/lib/button/button.js +86 -1
- package/lib/button/button.js.map +1 -1
- package/lib/button/button.module.css.js +7 -1
- package/lib/button/button.module.css.js.map +1 -1
- package/lib/button/index.d.ts +1 -1
- package/lib/checkbox-field/checkbox-field.d.ts +40 -40
- package/lib/checkbox-field/checkbox-field.js +82 -1
- package/lib/checkbox-field/checkbox-field.js.map +1 -1
- package/lib/checkbox-field/checkbox-field.module.css.js +7 -1
- package/lib/checkbox-field/checkbox-field.module.css.js.map +1 -1
- package/lib/checkbox-field/checkbox-icon.d.ts +8 -8
- package/lib/checkbox-field/checkbox-icon.js +59 -1
- package/lib/checkbox-field/checkbox-icon.js.map +1 -1
- package/lib/checkbox-field/index.d.ts +1 -1
- package/lib/checkbox-field/use-fork-ref.d.ts +11 -11
- package/lib/checkbox-field/use-fork-ref.js +42 -1
- package/lib/checkbox-field/use-fork-ref.js.map +1 -1
- package/lib/columns/columns.d.ts +20 -20
- package/lib/columns/columns.js +57 -1
- package/lib/columns/columns.js.map +1 -1
- package/lib/columns/columns.module.css.js +7 -1
- package/lib/columns/columns.module.css.js.map +1 -1
- package/lib/columns/index.d.ts +1 -1
- package/lib/components/color-picker/color-picker.d.ts +29 -29
- package/lib/components/color-picker/color-picker.js +86 -1
- package/lib/components/color-picker/color-picker.js.map +1 -1
- package/lib/components/color-picker/index.d.ts +3 -3
- package/lib/components/color-picker/index.js +11 -1
- package/lib/components/color-picker/index.js.map +1 -1
- package/lib/components/deprecated-button/deprecated-button.d.ts +54 -54
- package/lib/components/deprecated-button/deprecated-button.js +49 -1
- package/lib/components/deprecated-button/deprecated-button.js.map +1 -1
- package/lib/components/deprecated-button/index.d.ts +4 -4
- package/lib/components/deprecated-button/index.js +9 -1
- package/lib/components/deprecated-button/index.js.map +1 -1
- package/lib/components/deprecated-dropdown/dropdown.d.ts +55 -55
- package/lib/components/deprecated-dropdown/dropdown.js +182 -1
- package/lib/components/deprecated-dropdown/dropdown.js.map +1 -1
- package/lib/components/deprecated-dropdown/index.d.ts +2 -2
- package/lib/components/deprecated-dropdown/index.js +9 -1
- package/lib/components/deprecated-dropdown/index.js.map +1 -1
- package/lib/components/deprecated-input/index.d.ts +2 -2
- package/lib/components/deprecated-input/index.js +9 -1
- package/lib/components/deprecated-input/index.js.map +1 -1
- package/lib/components/deprecated-input/input.d.ts +10 -10
- package/lib/components/deprecated-input/input.js +41 -1
- package/lib/components/deprecated-input/input.js.map +1 -1
- package/lib/components/deprecated-select/index.d.ts +2 -2
- package/lib/components/deprecated-select/index.js +9 -1
- package/lib/components/deprecated-select/index.js.map +1 -1
- package/lib/components/deprecated-select/select.d.ts +33 -33
- package/lib/components/deprecated-select/select.js +43 -1
- package/lib/components/deprecated-select/select.js.map +1 -1
- package/lib/components/icons/CloseIcon.svg.d.ts +3 -3
- package/lib/components/icons/ThinQuestionMarkIcon.svg.d.ts +3 -3
- package/lib/components/icons/ThreeDotsIcon.svg.d.ts +12 -12
- package/lib/components/key-capturer/index.d.ts +3 -3
- package/lib/components/key-capturer/index.js +11 -1
- package/lib/components/key-capturer/index.js.map +1 -1
- package/lib/components/key-capturer/key-capturer.d.ts +40 -40
- package/lib/components/key-capturer/key-capturer.js +171 -1
- package/lib/components/key-capturer/key-capturer.js.map +1 -1
- package/lib/components/keyboard-shortcut/index.d.ts +2 -2
- package/lib/components/keyboard-shortcut/index.js +9 -1
- package/lib/components/keyboard-shortcut/index.js.map +1 -1
- package/lib/components/keyboard-shortcut/keyboard-shortcut.d.ts +44 -44
- package/lib/components/keyboard-shortcut/keyboard-shortcut.js +97 -1
- package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/lib/components/progress-bar/index.d.ts +2 -2
- package/lib/components/progress-bar/index.js +9 -1
- package/lib/components/progress-bar/index.js.map +1 -1
- package/lib/components/progress-bar/progress-bar.d.ts +14 -14
- package/lib/components/progress-bar/progress-bar.js +44 -1
- package/lib/components/progress-bar/progress-bar.js.map +1 -1
- package/lib/components/progress-bar/progress-bar.module.css.js +7 -1
- package/lib/components/progress-bar/progress-bar.module.css.js.map +1 -1
- package/lib/components/time/index.d.ts +2 -2
- package/lib/components/time/index.js +9 -1
- package/lib/components/time/index.js.map +1 -1
- package/lib/components/time/time-utils.d.ts +19 -19
- package/lib/components/time/time-utils.js +69 -1
- package/lib/components/time/time-utils.js.map +1 -1
- package/lib/components/time/time.d.ts +39 -39
- package/lib/components/time/time.js +124 -1
- package/lib/components/time/time.js.map +1 -1
- package/lib/divider/divider.d.ts +8 -8
- package/lib/divider/divider.js +36 -1
- package/lib/divider/divider.js.map +1 -1
- package/lib/divider/divider.module.css.js +7 -1
- package/lib/divider/divider.module.css.js.map +1 -1
- package/lib/divider/index.d.ts +1 -1
- package/lib/heading/heading.d.ts +112 -112
- package/lib/heading/heading.js +51 -1
- package/lib/heading/heading.js.map +1 -1
- package/lib/heading/heading.module.css.js +7 -1
- package/lib/heading/heading.module.css.js.map +1 -1
- package/lib/heading/index.d.ts +1 -1
- package/lib/hidden/hidden.d.ts +49 -49
- package/lib/hidden/hidden.js +70 -1
- package/lib/hidden/hidden.js.map +1 -1
- package/lib/hidden/hidden.module.css.js +7 -1
- package/lib/hidden/hidden.module.css.js.map +1 -1
- package/lib/hidden/index.d.ts +1 -1
- package/lib/hidden-visually/hidden-visually.d.ts +11 -11
- package/lib/hidden-visually/hidden-visually.js +40 -1
- package/lib/hidden-visually/hidden-visually.js.map +1 -1
- package/lib/hidden-visually/hidden-visually.module.css.js +7 -1
- package/lib/hidden-visually/hidden-visually.module.css.js.map +1 -1
- package/lib/hidden-visually/index.d.ts +1 -1
- package/lib/hooks/use-previous/index.d.ts +1 -1
- package/lib/hooks/use-previous/use-previous.d.ts +15 -15
- package/lib/icons/alert-icon.d.ts +6 -6
- package/lib/icons/alert-icon.js +56 -1
- package/lib/icons/alert-icon.js.map +1 -1
- package/lib/icons/banner-icon.d.ts +6 -6
- package/lib/icons/banner-icon.js +68 -1
- package/lib/icons/banner-icon.js.map +1 -1
- package/lib/icons/banner-icon.module.css.js +7 -1
- package/lib/icons/banner-icon.module.css.js.map +1 -1
- package/lib/icons/close-icon.d.ts +3 -3
- package/lib/icons/close-icon.js +33 -1
- package/lib/icons/close-icon.js.map +1 -1
- package/lib/icons/password-hidden-icon.d.ts +3 -3
- package/lib/icons/password-hidden-icon.js +36 -1
- package/lib/icons/password-hidden-icon.js.map +1 -1
- package/lib/icons/password-visible-icon.d.ts +3 -3
- package/lib/icons/password-visible-icon.js +35 -1
- package/lib/icons/password-visible-icon.js.map +1 -1
- package/lib/index.d.ts +38 -38
- package/lib/index.js +106 -1
- package/lib/index.js.map +1 -1
- package/lib/inline/index.d.ts +1 -1
- package/lib/inline/inline.d.ts +12 -12
- package/lib/inline/inline.js +40 -1
- package/lib/inline/inline.js.map +1 -1
- package/lib/loading/index.d.ts +1 -1
- package/lib/loading/loading.d.ts +26 -26
- package/lib/loading/loading.js +49 -1
- package/lib/loading/loading.js.map +1 -1
- package/lib/menu/index.d.ts +2 -2
- package/lib/menu/menu.d.ts +128 -128
- package/lib/menu/menu.js +179 -1
- package/lib/menu/menu.js.map +1 -1
- package/lib/modal/index.d.ts +1 -1
- package/lib/modal/modal-stories-components.d.ts +47 -47
- package/lib/modal/modal.d.ts +185 -185
- package/lib/modal/modal.js +209 -1
- package/lib/modal/modal.js.map +1 -1
- package/lib/modal/modal.module.css.js +7 -1
- package/lib/modal/modal.module.css.js.map +1 -1
- package/lib/notice/index.d.ts +1 -1
- package/lib/notice/notice.d.ts +10 -10
- package/lib/notice/notice.js +42 -1
- package/lib/notice/notice.js.map +1 -1
- package/lib/notice/notice.module.css.js +7 -1
- package/lib/notice/notice.module.css.js.map +1 -1
- package/lib/password-field/index.d.ts +1 -1
- package/lib/password-field/password-field.d.ts +10 -10
- package/lib/password-field/password-field.js +43 -1
- package/lib/password-field/password-field.js.map +1 -1
- package/lib/prose/index.d.ts +2 -2
- package/lib/prose/prose-example.d.ts +1 -1
- package/lib/prose/prose.d.ts +44 -44
- package/lib/prose/prose.js +42 -1
- package/lib/prose/prose.js.map +1 -1
- package/lib/prose/prose.module.css.js +7 -1
- package/lib/prose/prose.module.css.js.map +1 -1
- package/lib/select-field/index.d.ts +1 -1
- package/lib/select-field/select-field.d.ts +7 -7
- package/lib/select-field/select-field.js +48 -1
- package/lib/select-field/select-field.js.map +1 -1
- package/lib/select-field/select-field.module.css.js +7 -1
- package/lib/select-field/select-field.module.css.js.map +1 -1
- package/lib/spinner/index.d.ts +1 -1
- package/lib/spinner/spinner.d.ts +5 -5
- package/lib/spinner/spinner.js +36 -1
- package/lib/spinner/spinner.js.map +1 -1
- package/lib/spinner/spinner.module.css.js +7 -1
- package/lib/spinner/spinner.module.css.js.map +1 -1
- package/lib/stack/index.d.ts +1 -1
- package/lib/stack/stack.d.ts +15 -15
- package/lib/stack/stack.js +52 -1
- package/lib/stack/stack.js.map +1 -1
- package/lib/switch-field/index.d.ts +1 -1
- package/lib/switch-field/switch-field.d.ts +19 -19
- package/lib/switch-field/switch-field.js +74 -1
- package/lib/switch-field/switch-field.js.map +1 -1
- package/lib/switch-field/switch-field.module.css.js +7 -1
- package/lib/switch-field/switch-field.module.css.js.map +1 -1
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/tabs.d.ts +125 -125
- package/lib/tabs/tabs.js +177 -1
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/tabs/tabs.module.css.js +7 -1
- package/lib/tabs/tabs.module.css.js.map +1 -1
- package/lib/text/index.d.ts +1 -1
- package/lib/text/text.d.ts +47 -47
- package/lib/text/text.js +49 -1
- package/lib/text/text.js.map +1 -1
- package/lib/text/text.module.css.js +7 -1
- package/lib/text/text.module.css.js.map +1 -1
- package/lib/text-area/index.d.ts +1 -1
- package/lib/text-area/text-area.d.ts +39 -39
- package/lib/text-area/text-area.js +92 -1
- package/lib/text-area/text-area.js.map +1 -1
- package/lib/text-area/text-area.module.css.js +7 -1
- package/lib/text-area/text-area.module.css.js.map +1 -1
- package/lib/text-field/index.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +18 -18
- package/lib/text-field/text-field.js +63 -1
- package/lib/text-field/text-field.js.map +1 -1
- package/lib/text-field/text-field.module.css.js +7 -1
- package/lib/text-field/text-field.module.css.js.map +1 -1
- package/lib/text-link/index.d.ts +1 -1
- package/lib/text-link/text-link.d.ts +9 -9
- package/lib/text-link/text-link.js +41 -1
- package/lib/text-link/text-link.js.map +1 -1
- package/lib/text-link/text-link.module.css.js +7 -1
- package/lib/text-link/text-link.module.css.js.map +1 -1
- package/lib/toast/index.d.ts +4 -4
- package/lib/toast/static-toast.d.ts +63 -63
- package/lib/toast/static-toast.js +59 -1
- package/lib/toast/static-toast.js.map +1 -1
- package/lib/toast/toast-animation.d.ts +50 -50
- package/lib/toast/toast-animation.js +141 -1
- package/lib/toast/toast-animation.js.map +1 -1
- package/lib/toast/toast.module.css.js +7 -1
- package/lib/toast/toast.module.css.js.map +1 -1
- package/lib/toast/use-toasts.d.ts +132 -132
- package/lib/toast/use-toasts.js +166 -1
- package/lib/toast/use-toasts.js.map +1 -1
- package/lib/tooltip/index.d.ts +2 -2
- package/lib/tooltip/tooltip.d.ts +72 -72
- package/lib/tooltip/tooltip.js +67 -1
- package/lib/tooltip/tooltip.js.map +1 -1
- package/lib/tooltip/tooltip.module.css.js +7 -1
- package/lib/tooltip/tooltip.module.css.js.map +1 -1
- package/lib/utils/common-helpers.d.ts +2 -2
- package/lib/utils/common-helpers.js +44 -1
- package/lib/utils/common-helpers.js.map +1 -1
- package/lib/utils/common-types.d.ts +42 -42
- package/lib/utils/polymorphism.d.ts +135 -135
- package/lib/utils/polymorphism.js +39 -1
- package/lib/utils/polymorphism.js.map +1 -1
- package/lib/utils/responsive-props.d.ts +44 -44
- package/lib/utils/responsive-props.js +70 -1
- package/lib/utils/responsive-props.js.map +1 -1
- package/lib/utils/storybook-helper.d.ts +55 -0
- package/lib/utils/test-helpers.d.ts +22 -22
- package/package.json +32 -26
- package/styles/avatar.css +2 -2
- package/styles/avatar.module.css.css +1 -1
- package/styles/badge.css +2 -2
- package/styles/badge.module.css.css +1 -1
- package/styles/banner.css +6 -6
- package/styles/banner.module.css.css +1 -1
- package/styles/base-field.css +4 -4
- package/styles/base-field.module.css.css +1 -1
- package/styles/box.css +1 -1
- package/styles/box.module.css.css +1 -1
- package/styles/button.css +4 -4
- package/styles/button.module.css.css +1 -1
- package/styles/checkbox-field.css +3 -3
- package/styles/checkbox-field.module.css.css +1 -1
- package/styles/columns.css +1 -1
- package/styles/divider.css +1 -1
- package/styles/heading.css +2 -2
- package/styles/heading.module.css.css +1 -1
- package/styles/hidden-visually.css +2 -2
- package/styles/hidden-visually.module.css.css +1 -1
- package/styles/hidden.css +1 -1
- package/styles/index.css +4 -4
- package/styles/loading.css +2 -2
- package/styles/menu.css +1 -1
- package/styles/modal.css +5 -5
- package/styles/modal.module.css.css +1 -1
- package/styles/notice.css +1 -1
- package/styles/password-field.css +7 -7
- package/styles/progress-bar.module.css.css +1 -1
- package/styles/prose.css +2 -2
- package/styles/prose.module.css.css +1 -1
- package/styles/reactist.css +30 -30
- package/styles/select-field.css +5 -5
- package/styles/select-field.module.css.css +1 -1
- package/styles/spinner.css +1 -1
- package/styles/static-toast.css +6 -6
- package/styles/switch-field.css +6 -6
- package/styles/switch-field.module.css.css +1 -1
- package/styles/tabs.css +2 -2
- package/styles/tabs.module.css.css +1 -1
- package/styles/text-area.css +5 -5
- package/styles/text-area.module.css.css +1 -1
- package/styles/text-field.css +5 -5
- package/styles/text-field.module.css.css +1 -1
- package/styles/text-link.css +2 -2
- package/styles/text-link.module.css.css +1 -1
- package/styles/text.css +2 -2
- package/styles/text.module.css.css +1 -1
- package/styles/toast.module.css.css +1 -1
- package/styles/tooltip.css +2 -2
- package/styles/tooltip.module.css.css +1 -1
- package/styles/use-toasts.css +6 -6
- package/es/_virtual/_rollupPluginBabelHelpers.js +0 -91
- package/es/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
- package/lib/_virtual/_rollupPluginBabelHelpers.js +0 -2
- package/lib/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
package/es/menu/menu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.js","sources":["../../src/menu/menu.tsx"],"sourcesContent":["import * as React from 'react'\nimport classNames from 'classnames'\n\nimport {\n Portal,\n MenuStore,\n MenuStoreProps,\n useMenuStore,\n MenuProps as AriakitMenuProps,\n Menu as AriakitMenu,\n MenuGroup as AriakitMenuGroup,\n MenuItem as AriakitMenuItem,\n MenuItemProps as AriakitMenuItemProps,\n MenuButton as AriakitMenuButton,\n MenuButtonProps as AriakitMenuButtonProps,\n Role,\n RoleProps,\n} from '@ariakit/react'\n\nimport './menu.less'\nimport type { ObfuscatedClassName } from '../utils/common-types'\n\ntype MenuContextState = {\n menuStore: MenuStore | null\n handleItemSelect?: (value: string | null | undefined) => void\n getAnchorRect: (() => { x: number; y: number }) | null\n setAnchorRect: (rect: { x: number; y: number } | null) => void\n}\n\nconst MenuContext = React.createContext<MenuContextState>({\n menuStore: null,\n handleItemSelect: () => undefined,\n getAnchorRect: null,\n setAnchorRect: () => undefined,\n})\n\nconst SubMenuContext = React.createContext<{ isSubMenu: boolean }>({ isSubMenu: false })\n\n//\n// Menu\n//\n\ninterface MenuProps extends Omit<MenuStoreProps, 'visible'> {\n /**\n * The `Menu` must contain a `MenuList` that defines the menu options. It must also contain a\n * `MenuButton` that triggers the menu to be opened or closed.\n */\n children: React.ReactNode\n\n /**\n * An optional callback that will be called back whenever a menu item is selected. It receives\n * the `value` of the selected `MenuItem`.\n *\n * If you pass down this callback, it is recommended that you properly memoize it so it does not\n * change on every render.\n */\n onItemSelect?: (value: string | null | undefined) => void\n}\n\n/**\n * Wrapper component to control a menu. It does not render anything, only providing the state\n * management for the menu components inside it.\n */\nfunction Menu({ children, onItemSelect, ...props }: MenuProps) {\n const [anchorRect, setAnchorRect] = React.useState<{ x: number; y: number } | null>(null)\n const getAnchorRect = React.useMemo(() => (anchorRect ? () => anchorRect : null), [anchorRect])\n const menuStore = useMenuStore({ focusLoop: true, ...props })\n\n const value: MenuContextState = React.useMemo(\n () => ({ menuStore, handleItemSelect: onItemSelect, getAnchorRect, setAnchorRect }),\n [menuStore, onItemSelect, getAnchorRect, setAnchorRect],\n )\n\n return <MenuContext.Provider value={value}>{children}</MenuContext.Provider>\n}\n\n//\n// MenuButton\n//\n\ninterface MenuButtonProps\n extends Omit<AriakitMenuButtonProps, 'store' | 'className' | 'as'>,\n ObfuscatedClassName {}\n\n/**\n * A button to toggle a dropdown menu open or closed.\n */\nconst MenuButton = React.forwardRef<HTMLButtonElement, MenuButtonProps>(function MenuButton(\n { exceptionallySetClassName, ...props },\n ref,\n) {\n const { menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('MenuButton must be wrapped in <Menu/>')\n }\n return (\n <AriakitMenuButton\n {...props}\n store={menuStore}\n ref={ref}\n className={classNames('reactist_menubutton', exceptionallySetClassName)}\n />\n )\n})\n\n//\n// ContextMenuTrigger\n//\n\ninterface ContextMenuTriggerProps\n extends ObfuscatedClassName,\n React.HTMLAttributes<HTMLDivElement>,\n Pick<RoleProps, 'render'> {}\n\nconst ContextMenuTrigger = React.forwardRef<HTMLDivElement, ContextMenuTriggerProps>(\n function ContextMenuTrigger({ render, ...props }, ref) {\n const { setAnchorRect, menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('ContextMenuTrigger must be wrapped in <Menu/>')\n }\n\n const handleContextMenu = React.useCallback(\n function handleContextMenu(event: React.MouseEvent) {\n event.preventDefault()\n setAnchorRect({ x: event.clientX, y: event.clientY })\n menuStore.show()\n },\n [setAnchorRect, menuStore],\n )\n\n const isOpen = menuStore.useState('open')\n React.useEffect(() => {\n if (!isOpen) setAnchorRect(null)\n }, [isOpen, setAnchorRect])\n\n return <Role.div {...props} onContextMenu={handleContextMenu} ref={ref} render={render} />\n },\n)\n\n//\n// MenuList\n//\n\ninterface MenuListProps\n extends Omit<AriakitMenuProps, 'store' | 'className'>,\n ObfuscatedClassName {}\n\n/**\n * The dropdown menu itself, containing a list of menu items.\n */\nconst MenuList = React.forwardRef<HTMLDivElement, MenuListProps>(function MenuList(\n { exceptionallySetClassName, modal = true, flip, ...props },\n ref,\n) {\n const { menuStore, getAnchorRect } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('MenuList must be wrapped in <Menu/>')\n }\n\n const { isSubMenu } = React.useContext(SubMenuContext)\n\n const isOpen = menuStore.useState('open')\n\n return isOpen ? (\n <Portal preserveTabOrder>\n <AriakitMenu\n {...props}\n store={menuStore}\n gutter={8}\n shift={4}\n ref={ref}\n className={classNames('reactist_menulist', exceptionallySetClassName)}\n getAnchorRect={getAnchorRect ?? undefined}\n modal={modal}\n flip={flip ?? (isSubMenu ? 'left bottom' : undefined)}\n />\n </Portal>\n ) : null\n})\n\n//\n// MenuItem\n//\n\ninterface MenuItemProps extends AriakitMenuItemProps, ObfuscatedClassName {\n /**\n * An optional value given to this menu item. It is passed on to the parent `Menu`'s\n * `onItemSelect` when you provide that instead of (or alongside) providing individual\n * `onSelect` callbacks to each menu item.\n */\n value?: string\n\n /**\n * When `true` the menu item is disabled and won't be selectable or be part of the keyboard\n * navigation across the menu options.\n *\n * @default true\n */\n disabled?: boolean\n\n /**\n * When `true` the menu will close when the menu item is selected, in addition to performing the\n * action that the menu item is set out to do.\n *\n * Set this to `false` to make sure that a given menu item does not auto-closes the menu when\n * selected. This should be the exception and not the norm, as the default is to auto-close.\n *\n * @default true\n */\n hideOnSelect?: boolean\n\n /**\n * The action to perform when the menu item is selected.\n *\n * If you return `false` from this function, the menu will not auto-close when this menu item\n * is selected. Though you should use `hideOnSelect` for this purpose, this allows you to\n * achieve the same effect conditionally and dynamically deciding at run time.\n */\n onSelect?: () => unknown\n\n /**\n * The event handler called when the menu item is clicked.\n *\n * This is similar to `onSelect`, but a bit different. You can certainly use it to trigger the\n * action that the menu item represents. But in general you should prefer `onSelect` for that.\n *\n * The main use for this handler is to get access to the click event. This can be used, for\n * example, to call `event.preventDefault()`, which will effectively prevent the rest of the\n * consequences of the click, including preventing `onSelect` from being called. In particular,\n * this is useful in menu items that are links, and you want the click to not trigger navigation\n * under some circumstances.\n */\n onClick?: (event: React.MouseEvent) => void\n}\n\n/**\n * A menu item inside a menu list. It can be selected by the user, triggering the `onSelect`\n * callback.\n */\nconst MenuItem = React.forwardRef<HTMLDivElement, MenuItemProps>(function MenuItem(\n {\n value,\n children,\n onSelect,\n hideOnSelect = true,\n onClick,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n const { handleItemSelect, menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('MenuItem must be wrapped in <Menu/>')\n }\n\n const { hide } = menuStore\n const handleClick = React.useCallback(\n function handleClick(event: React.MouseEvent) {\n onClick?.(event)\n const onSelectResult: unknown =\n onSelect && !event.defaultPrevented ? onSelect() : undefined\n const shouldClose = onSelectResult !== false && hideOnSelect\n handleItemSelect?.(value)\n if (shouldClose) hide()\n },\n [onSelect, onClick, handleItemSelect, hideOnSelect, hide, value],\n )\n\n return (\n <AriakitMenuItem\n {...props}\n store={menuStore}\n ref={ref}\n onClick={handleClick}\n className={exceptionallySetClassName}\n hideOnClick={false}\n >\n {children}\n </AriakitMenuItem>\n )\n})\n\n//\n// SubMenu\n//\n\ntype SubMenuProps = Pick<MenuProps, 'children' | 'onItemSelect'>\n\n/**\n * This component can be rendered alongside other `MenuItem` inside a `MenuList` in order to have\n * a sub-menu.\n *\n * Its children are expected to have the structure of a first level menu (a `MenuButton` and a\n * `MenuList`).\n *\n * ```jsx\n * <MenuItem label=\"Edit profile\" />\n * <SubMenu>\n * <MenuButton>More options</MenuButton>\n * <MenuList>\n * <MenuItem label=\"Preferences\" />\n * <MenuItem label=\"Sign out\" />\n * </MenuList>\n * </SubMenu>\n * ```\n *\n * The `MenuButton` will become a menu item in the current menu items list, and it will lead to\n * opening a sub-menu with the menu items list below it.\n */\nconst SubMenu = React.forwardRef<HTMLDivElement, SubMenuProps>(function SubMenu(\n { children, onItemSelect },\n ref,\n) {\n const { handleItemSelect: parentMenuItemSelect, menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('SubMenu must be wrapped in <Menu/>')\n }\n\n const { hide: parentMenuHide } = menuStore\n const handleSubItemSelect = React.useCallback(\n function handleSubItemSelect(value: string | null | undefined) {\n onItemSelect?.(value)\n parentMenuItemSelect?.(value)\n parentMenuHide()\n },\n [parentMenuHide, parentMenuItemSelect, onItemSelect],\n )\n\n const [button, list] = React.Children.toArray(children)\n const buttonElement = button as React.ReactElement<MenuButtonProps>\n const subMenuContextValue = React.useMemo(() => ({ isSubMenu: true }), [])\n\n return (\n <Menu onItemSelect={handleSubItemSelect}>\n <AriakitMenuItem store={menuStore} ref={ref} hideOnClick={false} render={buttonElement}>\n {buttonElement.props.children}\n </AriakitMenuItem>\n <SubMenuContext.Provider value={subMenuContextValue}>{list}</SubMenuContext.Provider>\n </Menu>\n )\n})\n\n//\n// MenuGroup\n//\n\ninterface MenuGroupProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'className'>,\n ObfuscatedClassName {\n /**\n * A label to be shown visually and also used to semantically label the group.\n */\n label: string\n}\n\n/**\n * A way to semantically group some menu items.\n *\n * This group does not add any visual separator. You can do that yourself adding `<hr />` elements\n * before and/or after the group if you so wish.\n */\nconst MenuGroup = React.forwardRef<HTMLDivElement, MenuGroupProps>(function MenuGroup(\n { label, children, exceptionallySetClassName, ...props },\n ref,\n) {\n const { menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('MenuGroup must be wrapped in <Menu/>')\n }\n\n return (\n <AriakitMenuGroup\n {...props}\n ref={ref}\n store={menuStore}\n className={exceptionallySetClassName}\n >\n {label ? (\n <div role=\"presentation\" className=\"reactist_menugroup__label\">\n {label}\n </div>\n ) : null}\n {children}\n </AriakitMenuGroup>\n )\n})\n\nexport { ContextMenuTrigger, Menu, MenuButton, MenuList, MenuItem, SubMenu, MenuGroup }\nexport type { MenuButtonProps, MenuListProps, MenuItemProps, MenuGroupProps }\n"],"names":["MenuContext","React","createContext","menuStore","handleItemSelect","undefined","getAnchorRect","setAnchorRect","SubMenuContext","isSubMenu","Menu","children","onItemSelect","props","anchorRect","useState","useMemo","useMenuStore","_objectSpread","focusLoop","value","createElement","Provider","MenuButton","forwardRef","ref","exceptionallySetClassName","useContext","Error","AriakitMenuButton","store","className","classNames","ContextMenuTrigger","render","handleContextMenu","useCallback","event","preventDefault","x","clientX","y","clientY","show","isOpen","useEffect","Role","div","onContextMenu","MenuList","modal","flip","Portal","preserveTabOrder","AriakitMenu","gutter","shift","MenuItem","onSelect","hideOnSelect","onClick","hide","handleClick","onSelectResult","defaultPrevented","shouldClose","AriakitMenuItem","hideOnClick","SubMenu","parentMenuItemSelect","parentMenuHide","handleSubItemSelect","button","list","Children","toArray","buttonElement","subMenuContextValue","MenuGroup","label","AriakitMenuGroup","role"],"mappings":";;;;;;;;;;;AA6BA,MAAMA,WAAW,gBAAGC,KAAK,CAACC,aAAN,CAAsC;AACtDC,EAAAA,SAAS,EAAE,IAD2C;EAEtDC,gBAAgB,EAAE,MAAMC,SAF8B;AAGtDC,EAAAA,aAAa,EAAE,IAHuC;AAItDC,EAAAA,aAAa,EAAE,MAAMF,SAAAA;AAJiC,CAAtC,CAApB,CAAA;AAOA,MAAMG,cAAc,gBAAGP,KAAK,CAACC,aAAN,CAA4C;AAAEO,EAAAA,SAAS,EAAE,KAAA;AAAb,CAA5C,CAAvB,CAAA;AAuBA;;;AAGG;;AACH,SAASC,IAAT,CAA6D,IAAA,EAAA;EAAA,IAA/C;IAAEC,QAAF;AAAYC,IAAAA,YAAAA;GAAmC,GAAA,IAAA;AAAA,MAAlBC,KAAkB,GAAA,wBAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;;EACzD,MAAM,CAACC,UAAD,EAAaP,aAAb,CAAA,GAA8BN,KAAK,CAACc,QAAN,CAAgD,IAAhD,CAApC,CAAA;AACA,EAAA,MAAMT,aAAa,GAAGL,KAAK,CAACe,OAAN,CAAc,MAAOF,UAAU,GAAG,MAAMA,UAAT,GAAsB,IAArD,EAA4D,CAACA,UAAD,CAA5D,CAAtB,CAAA;EACA,MAAMX,SAAS,GAAGc,YAAY,CAAAC,cAAA,CAAA;AAAGC,IAAAA,SAAS,EAAE,IAAA;AAAd,GAAA,EAAuBN,KAAvB,CAA9B,CAAA,CAAA;AAEA,EAAA,MAAMO,KAAK,GAAqBnB,KAAK,CAACe,OAAN,CAC5B,OAAO;IAAEb,SAAF;AAAaC,IAAAA,gBAAgB,EAAEQ,YAA/B;IAA6CN,aAA7C;AAA4DC,IAAAA,aAAAA;GAAnE,CAD4B,EA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;AAED,EAAA,oBACI3B,KAAC,CAAAoB,aAAD,CAAC2D,WAAD,oCACQnE,KADR,CAAA,EAAA,EAAA,EAAA;AAEIY,IAAAA,GAAG,EAAEA,GAFT;AAGIK,IAAAA,KAAK,EAAE3B,SAHX;AAII4B,IAAAA,SAAS,EAAEL,yBAAAA;AAJf,GAAA,CAAA,EAMKqD,KAAK,gBACF9E,KAAK,CAAAoB,aAAL,CAAK,KAAL,EAAK;AAAA4D,IAAAA,IAAI,EAAC,cAAL;AAAoBlD,IAAAA,SAAS,EAAC,2BAAA;AAA9B,GAAL,EACKgD,KADL,CADE,GAIF,IAVR,EAWKpE,QAXL,CADJ,CAAA;AAeH,CAxBiB;;;;"}
|
|
1
|
+
{"version":3,"file":"menu.js","sources":["../../src/menu/menu.tsx"],"sourcesContent":[null],"names":["AriakitMenuButton","AriakitMenu","AriakitMenuItem","AriakitMenuGroup"],"mappings":";;;;;AA6BA,IAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAmB;AACtD,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,gBAAgB,EAAE,YAAA,EAAM,OAAA,SAAS,GAAA;AACjC,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,aAAa,EAAE,YAAA,EAAM,OAAA,SAAS,GAAA;AACjC,CAAA,CAAC,CAAA;AAEF,IAAM,cAAc,GAAG,KAAK,CAAC,aAAa,CAAyB,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAA;AAuBxF;;;AAGG;AACH,SAAS,IAAI,CAAC,EAA+C,EAAA;IAA7C,IAAA,QAAQ,cAAA,EAAE,YAAY,kBAAA,EAAK,KAAK,GAAlC,MAAA,CAAA,EAAA,EAAA,CAAA,UAAA,EAAA,cAAA,CAAoC,CAAF,CAAA;AACtC,IAAA,IAAA,EAA8B,GAAA,KAAK,CAAC,QAAQ,CAAkC,IAAI,CAAC,EAAlF,UAAU,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,aAAa,QAAyD,CAAA;AACzF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,KAAK,GAAtD,MAAA,CAAA,EAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,2BAAA,CAAwD,CAAF,CAAA;IAG9C,IAAA,SAAS,GAAK,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAA,SAAlC,CAAkC;IACnD,IAAI,CAAC,SAAS,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAA;AAC1D,KAAA;AAED,IAAA,QACI,KAAC,CAAA,aAAA,CAAAC,WAAgB,EACT,QAAA,CAAA,EAAA,EAAA,KAAK,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,yBAAyB,EAAA,CAAA;AAEnC,QAAA,KAAK,IACF,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,IAAI,EAAC,cAAc,EAAC,SAAS,EAAC,2BAA2B,IACzD,KAAK,CACJ,IACN,IAAI;QACP,QAAQ,CACM,EACtB;AACL,CAAC;;;;"}
|
package/es/modal/modal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import classNames from 'classnames';
|
|
@@ -13,294 +13,165 @@ import { Box } from '../box/box.js';
|
|
|
13
13
|
import { IconButton } from '../button/button.js';
|
|
14
14
|
import modules_8f59d13b from './modal.module.css.js';
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_excluded5 = ["children"];
|
|
21
|
-
const ModalContext = /*#__PURE__*/React.createContext({
|
|
22
|
-
onDismiss: undefined,
|
|
23
|
-
height: 'fitContent',
|
|
24
|
-
dividers: undefined
|
|
16
|
+
var ModalContext = React.createContext({
|
|
17
|
+
onDismiss: undefined,
|
|
18
|
+
height: 'fitContent',
|
|
19
|
+
dividers: undefined
|
|
25
20
|
});
|
|
26
|
-
|
|
27
21
|
function isNotInternalFrame(element) {
|
|
28
|
-
|
|
22
|
+
return !(element.ownerDocument === document && element.tagName.toLowerCase() === 'iframe');
|
|
29
23
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Renders a modal that sits on top of the rest of the content in the entire page.
|
|
32
|
-
*
|
|
33
|
-
* Follows the WAI-ARIA Dialog (Modal) Pattern.
|
|
34
|
-
*
|
|
35
|
-
* @see ModalHeader
|
|
36
|
-
* @see ModalFooter
|
|
37
|
-
* @see ModalBody
|
|
24
|
+
/**
|
|
25
|
+
* Renders a modal that sits on top of the rest of the content in the entire page.
|
|
26
|
+
*
|
|
27
|
+
* Follows the WAI-ARIA Dialog (Modal) Pattern.
|
|
28
|
+
*
|
|
29
|
+
* @see ModalHeader
|
|
30
|
+
* @see ModalFooter
|
|
31
|
+
* @see ModalBody
|
|
38
32
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
function Modal(_ref) {
|
|
42
|
-
let {
|
|
43
|
-
isOpen,
|
|
44
|
-
onDismiss,
|
|
45
|
-
height = 'fitContent',
|
|
46
|
-
dividers,
|
|
47
|
-
width = 'medium',
|
|
48
|
-
exceptionallySetClassName,
|
|
49
|
-
exceptionallySetOverlayClassName,
|
|
50
|
-
autoFocus = true,
|
|
51
|
-
hideOnEscape = true,
|
|
52
|
-
hideOnInteractOutside = true,
|
|
53
|
-
children,
|
|
54
|
-
portalElement,
|
|
55
|
-
onKeyDown,
|
|
33
|
+
function Modal(_a) {
|
|
34
|
+
var isOpen = _a.isOpen, onDismiss = _a.onDismiss, _b = _a.height, height = _b === void 0 ? 'fitContent' : _b, dividers = _a.dividers, _c = _a.width, width = _c === void 0 ? 'medium' : _c, exceptionallySetClassName = _a.exceptionallySetClassName, exceptionallySetOverlayClassName = _a.exceptionallySetOverlayClassName, _d = _a.autoFocus, autoFocus = _d === void 0 ? true : _d, _e = _a.hideOnEscape, hideOnEscape = _e === void 0 ? true : _e, _f = _a.hideOnInteractOutside, hideOnInteractOutside = _f === void 0 ? true : _f, children = _a.children, portalElement = _a.portalElement, onKeyDown = _a.onKeyDown;
|
|
56
35
|
// @ts-expect-error we want to make sure to not pass it to the Dialog component
|
|
57
|
-
className
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
36
|
+
_a.className; var props = __rest(_a, ["isOpen", "onDismiss", "height", "dividers", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children", "portalElement", "onKeyDown", "className"]);
|
|
37
|
+
var setOpen = React.useCallback(function (visible) {
|
|
38
|
+
if (!visible) {
|
|
39
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
40
|
+
}
|
|
41
|
+
}, [onDismiss]);
|
|
42
|
+
var store = useDialogStore({ open: isOpen, setOpen: setOpen });
|
|
43
|
+
var contextValue = React.useMemo(function () { return ({ onDismiss: onDismiss, height: height, dividers: dividers }); }, [
|
|
44
|
+
onDismiss,
|
|
45
|
+
height,
|
|
46
|
+
dividers,
|
|
47
|
+
]);
|
|
48
|
+
var portalRef = React.useRef(null);
|
|
49
|
+
var dialogRef = React.useRef(null);
|
|
50
|
+
var backdropRef = React.useRef(null);
|
|
51
|
+
var handleBackdropClick = React.useCallback(function (event) {
|
|
52
|
+
var _a, _b;
|
|
53
|
+
if (
|
|
54
|
+
// The focus lock element takes up the same space as the backdrop and is where the event bubbles up from,
|
|
55
|
+
// so instead of checking the backdrop as the event target, we need to make sure it's just above the dialog
|
|
56
|
+
!((_a = dialogRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)) &&
|
|
57
|
+
(
|
|
58
|
+
// Events fired from other portals will bubble up to the backdrop, even if it isn't a child in the DOM
|
|
59
|
+
(_b = backdropRef.current) === null || _b === void 0 ? void 0 : _b.contains(event.target))) {
|
|
60
|
+
event.stopPropagation();
|
|
61
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
62
|
+
}
|
|
63
|
+
}, [onDismiss]);
|
|
64
|
+
React.useLayoutEffect(function disableAccessibilityTreeOutside() {
|
|
65
|
+
if (!isOpen || !portalRef.current) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
return hideOthers(portalRef.current);
|
|
69
|
+
}, [isOpen]);
|
|
70
|
+
var handleKeyDown = React.useCallback(function handleKeyDown(event) {
|
|
71
|
+
if (hideOnEscape &&
|
|
72
|
+
onDismiss != null &&
|
|
73
|
+
event.key === 'Escape' &&
|
|
74
|
+
!event.defaultPrevented) {
|
|
75
|
+
event.stopPropagation();
|
|
76
|
+
onDismiss();
|
|
77
|
+
}
|
|
78
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
|
|
79
|
+
}, [onDismiss, hideOnEscape, onKeyDown]);
|
|
80
|
+
if (!isOpen) {
|
|
81
|
+
return null;
|
|
87
82
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
onKeyDown == null ? void 0 : onKeyDown(event);
|
|
103
|
-
}, [onDismiss, hideOnEscape, onKeyDown]);
|
|
104
|
-
|
|
105
|
-
if (!isOpen) {
|
|
106
|
-
return null;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return /*#__PURE__*/React.createElement(Portal, {
|
|
110
|
-
portalRef: portalRef,
|
|
111
|
-
portalElement: portalElement
|
|
112
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
113
|
-
"data-testid": "modal-overlay",
|
|
114
|
-
"data-overlay": true,
|
|
115
|
-
className: classNames(modules_8f59d13b.overlay, modules_8f59d13b[height], modules_8f59d13b[width], exceptionallySetOverlayClassName),
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* We're using `onPointerDown` instead of `onClick` to prevent the modal from
|
|
119
|
-
* closing when the click starts inside the modal and ends on the backdrop.
|
|
120
|
-
*/
|
|
121
|
-
onPointerDown: hideOnInteractOutside ? handleBackdropClick : undefined,
|
|
122
|
-
ref: backdropRef
|
|
123
|
-
}, /*#__PURE__*/React.createElement(FocusLock, {
|
|
124
|
-
autoFocus: autoFocus,
|
|
125
|
-
whiteList: isNotInternalFrame,
|
|
126
|
-
returnFocus: true,
|
|
127
|
-
crossFrame: false
|
|
128
|
-
}, /*#__PURE__*/React.createElement(Dialog, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
129
|
-
ref: dialogRef,
|
|
130
|
-
render: /*#__PURE__*/React.createElement(Box, {
|
|
131
|
-
borderRadius: "full",
|
|
132
|
-
background: "default",
|
|
133
|
-
display: "flex",
|
|
134
|
-
flexDirection: "column",
|
|
135
|
-
overflow: "hidden",
|
|
136
|
-
height: height === 'expand' ? 'full' : undefined,
|
|
137
|
-
flexGrow: height === 'expand' ? 1 : 0
|
|
138
|
-
}),
|
|
139
|
-
className: classNames(exceptionallySetClassName, modules_8f59d13b.container),
|
|
140
|
-
store: store,
|
|
141
|
-
preventBodyScroll: true,
|
|
142
|
-
// Disable focus lock as we set up our own using ReactFocusLock
|
|
143
|
-
modal: false,
|
|
144
|
-
autoFocus: false,
|
|
145
|
-
autoFocusOnShow: false,
|
|
146
|
-
autoFocusOnHide: false,
|
|
147
|
-
// Disable portal and backdrop as we control their markup
|
|
148
|
-
portal: false,
|
|
149
|
-
backdrop: false,
|
|
150
|
-
hideOnInteractOutside: false,
|
|
151
|
-
hideOnEscape: false,
|
|
152
|
-
onKeyDown: handleKeyDown
|
|
153
|
-
}), /*#__PURE__*/React.createElement(ModalContext.Provider, {
|
|
154
|
-
value: contextValue
|
|
155
|
-
}, children)))));
|
|
83
|
+
return (React.createElement(Portal, { portalRef: portalRef, portalElement: portalElement },
|
|
84
|
+
React.createElement(Box, { "data-testid": "modal-overlay", "data-overlay": true, className: classNames(modules_8f59d13b.overlay, modules_8f59d13b[height], modules_8f59d13b[width], exceptionallySetOverlayClassName),
|
|
85
|
+
/**
|
|
86
|
+
* We're using `onPointerDown` instead of `onClick` to prevent the modal from
|
|
87
|
+
* closing when the click starts inside the modal and ends on the backdrop.
|
|
88
|
+
*/
|
|
89
|
+
onPointerDown: hideOnInteractOutside ? handleBackdropClick : undefined, ref: backdropRef },
|
|
90
|
+
React.createElement(FocusLock, { autoFocus: autoFocus, whiteList: isNotInternalFrame, returnFocus: true, crossFrame: false },
|
|
91
|
+
React.createElement(Dialog, __assign({}, props, { ref: dialogRef, render: React.createElement(Box, { borderRadius: "full", background: "default", display: "flex", flexDirection: "column", overflow: "hidden", height: height === 'expand' ? 'full' : undefined, flexGrow: height === 'expand' ? 1 : 0 }), className: classNames(exceptionallySetClassName, modules_8f59d13b.container), store: store, preventBodyScroll: true,
|
|
92
|
+
// Disable focus lock as we set up our own using ReactFocusLock
|
|
93
|
+
modal: false, autoFocus: false, autoFocusOnShow: false, autoFocusOnHide: false,
|
|
94
|
+
// Disable portal and backdrop as we control their markup
|
|
95
|
+
portal: false, backdrop: false, hideOnInteractOutside: false, hideOnEscape: false, onKeyDown: handleKeyDown }),
|
|
96
|
+
React.createElement(ModalContext.Provider, { value: contextValue }, children))))));
|
|
156
97
|
}
|
|
157
|
-
/**
|
|
158
|
-
* The close button rendered by ModalHeader. Provided independently so that consumers can customize
|
|
159
|
-
* the button's label.
|
|
160
|
-
*
|
|
161
|
-
* @see ModalHeader
|
|
98
|
+
/**
|
|
99
|
+
* The close button rendered by ModalHeader. Provided independently so that consumers can customize
|
|
100
|
+
* the button's label.
|
|
101
|
+
*
|
|
102
|
+
* @see ModalHeader
|
|
162
103
|
*/
|
|
163
|
-
|
|
164
104
|
function ModalCloseButton(props) {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
return /*#__PURE__*/React.createElement(IconButton, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
178
|
-
variant: "quaternary",
|
|
179
|
-
onClick: onDismiss,
|
|
180
|
-
icon: /*#__PURE__*/React.createElement(CloseIcon, null),
|
|
181
|
-
tabIndex: includeInTabOrder ? 0 : -1
|
|
182
|
-
}));
|
|
105
|
+
var onDismiss = React.useContext(ModalContext).onDismiss;
|
|
106
|
+
var _a = React.useState(false), includeInTabOrder = _a[0], setIncludeInTabOrder = _a[1];
|
|
107
|
+
var _b = React.useState(false), isMounted = _b[0], setIsMounted = _b[1];
|
|
108
|
+
React.useEffect(function skipAutoFocus() {
|
|
109
|
+
if (isMounted) {
|
|
110
|
+
setIncludeInTabOrder(true);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
setIsMounted(true);
|
|
114
|
+
}
|
|
115
|
+
}, [isMounted]);
|
|
116
|
+
return (React.createElement(IconButton, __assign({}, props, { variant: "quaternary", onClick: onDismiss, icon: React.createElement(CloseIcon, null), tabIndex: includeInTabOrder ? 0 : -1 })));
|
|
183
117
|
}
|
|
184
|
-
/**
|
|
185
|
-
* Renders a standard modal header area with an optional close button.
|
|
186
|
-
*
|
|
187
|
-
* @see Modal
|
|
188
|
-
* @see ModalFooter
|
|
189
|
-
* @see ModalBody
|
|
118
|
+
/**
|
|
119
|
+
* Renders a standard modal header area with an optional close button.
|
|
120
|
+
*
|
|
121
|
+
* @see Modal
|
|
122
|
+
* @see ModalFooter
|
|
123
|
+
* @see ModalBody
|
|
190
124
|
*/
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
const {
|
|
202
|
-
dividers
|
|
203
|
-
} = React.useContext(ModalContext);
|
|
204
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
205
|
-
as: "header",
|
|
206
|
-
paddingLeft: "large",
|
|
207
|
-
paddingRight: button === false || button === null ? 'large' : 'small',
|
|
208
|
-
paddingY: "small",
|
|
209
|
-
className: exceptionallySetClassName
|
|
210
|
-
}), /*#__PURE__*/React.createElement(Columns, {
|
|
211
|
-
space: "large",
|
|
212
|
-
alignY: "center"
|
|
213
|
-
}, /*#__PURE__*/React.createElement(Column, {
|
|
214
|
-
width: "auto"
|
|
215
|
-
}, children), button === false || button === null ? /*#__PURE__*/React.createElement("div", {
|
|
216
|
-
className: modules_8f59d13b.headerContent
|
|
217
|
-
}) : /*#__PURE__*/React.createElement(Column, {
|
|
218
|
-
width: "content",
|
|
219
|
-
exceptionallySetClassName: modules_8f59d13b.buttonContainer,
|
|
220
|
-
"data-testid": "button-container"
|
|
221
|
-
}, typeof button === 'boolean' ? /*#__PURE__*/React.createElement(ModalCloseButton, {
|
|
222
|
-
"aria-label": "Close modal",
|
|
223
|
-
autoFocus: false
|
|
224
|
-
}) : button))), withDivider ? /*#__PURE__*/React.createElement(Divider, {
|
|
225
|
-
weight: dividers
|
|
226
|
-
}) : null);
|
|
125
|
+
function ModalHeader(_a) {
|
|
126
|
+
var children = _a.children, _b = _a.button, button = _b === void 0 ? true : _b, _c = _a.withDivider, withDivider = _c === void 0 ? false : _c, exceptionallySetClassName = _a.exceptionallySetClassName, props = __rest(_a, ["children", "button", "withDivider", "exceptionallySetClassName"]);
|
|
127
|
+
var dividers = React.useContext(ModalContext).dividers;
|
|
128
|
+
return (React.createElement(React.Fragment, null,
|
|
129
|
+
React.createElement(Box, __assign({}, props, { as: "header", paddingLeft: "large", paddingRight: button === false || button === null ? 'large' : 'small', paddingY: "small", className: exceptionallySetClassName }),
|
|
130
|
+
React.createElement(Columns, { space: "large", alignY: "center" },
|
|
131
|
+
React.createElement(Column, { width: "auto" }, children),
|
|
132
|
+
button === false || button === null ? (React.createElement("div", { className: modules_8f59d13b.headerContent })) : (React.createElement(Column, { width: "content", exceptionallySetClassName: modules_8f59d13b.buttonContainer, "data-testid": "button-container" }, typeof button === 'boolean' ? (React.createElement(ModalCloseButton, { "aria-label": "Close modal", autoFocus: false })) : (button))))),
|
|
133
|
+
withDivider ? React.createElement(Divider, { weight: dividers }) : null));
|
|
227
134
|
}
|
|
228
|
-
/**
|
|
229
|
-
* Renders the body of a modal.
|
|
230
|
-
*
|
|
231
|
-
* Convenient to use alongside ModalHeader and/or ModalFooter as needed. It ensures, among other
|
|
232
|
-
* things, that the content of the modal body expands or contracts depending on the modal height
|
|
233
|
-
* setting or the size of the content. The body content also automatically scrolls when it's too
|
|
234
|
-
* large to fit the available space.
|
|
235
|
-
*
|
|
236
|
-
* @see Modal
|
|
237
|
-
* @see ModalHeader
|
|
238
|
-
* @see ModalFooter
|
|
135
|
+
/**
|
|
136
|
+
* Renders the body of a modal.
|
|
137
|
+
*
|
|
138
|
+
* Convenient to use alongside ModalHeader and/or ModalFooter as needed. It ensures, among other
|
|
139
|
+
* things, that the content of the modal body expands or contracts depending on the modal height
|
|
140
|
+
* setting or the size of the content. The body content also automatically scrolls when it's too
|
|
141
|
+
* large to fit the available space.
|
|
142
|
+
*
|
|
143
|
+
* @see Modal
|
|
144
|
+
* @see ModalHeader
|
|
145
|
+
* @see ModalFooter
|
|
239
146
|
*/
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
exceptionallySetClassName,
|
|
244
|
-
|
|
245
|
-
} = _ref3,
|
|
246
|
-
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
247
|
-
|
|
248
|
-
const {
|
|
249
|
-
height
|
|
250
|
-
} = React.useContext(ModalContext);
|
|
251
|
-
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
252
|
-
ref: ref,
|
|
253
|
-
className: exceptionallySetClassName,
|
|
254
|
-
flexGrow: height === 'expand' ? 1 : 0,
|
|
255
|
-
height: height === 'expand' ? 'full' : undefined,
|
|
256
|
-
overflow: "auto"
|
|
257
|
-
}), /*#__PURE__*/React.createElement(Box, {
|
|
258
|
-
padding: "large",
|
|
259
|
-
paddingBottom: "xxlarge"
|
|
260
|
-
}, children));
|
|
147
|
+
var ModalBody = forwardRef(function ModalBody(_a, ref) {
|
|
148
|
+
var exceptionallySetClassName = _a.exceptionallySetClassName, children = _a.children, props = __rest(_a, ["exceptionallySetClassName", "children"]);
|
|
149
|
+
var height = React.useContext(ModalContext).height;
|
|
150
|
+
return (React.createElement(Box, __assign({}, props, { ref: ref, className: exceptionallySetClassName, flexGrow: height === 'expand' ? 1 : 0, height: height === 'expand' ? 'full' : undefined, overflow: "auto" }),
|
|
151
|
+
React.createElement(Box, { padding: "large", paddingBottom: "xxlarge" }, children)));
|
|
261
152
|
});
|
|
262
|
-
/**
|
|
263
|
-
* Renders a standard modal footer area.
|
|
264
|
-
*
|
|
265
|
-
* @see Modal
|
|
266
|
-
* @see ModalHeader
|
|
267
|
-
* @see ModalBody
|
|
153
|
+
/**
|
|
154
|
+
* Renders a standard modal footer area.
|
|
155
|
+
*
|
|
156
|
+
* @see Modal
|
|
157
|
+
* @see ModalHeader
|
|
158
|
+
* @see ModalBody
|
|
268
159
|
*/
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
props = _objectWithoutProperties(_ref4, _excluded4);
|
|
276
|
-
|
|
277
|
-
const {
|
|
278
|
-
dividers
|
|
279
|
-
} = React.useContext(ModalContext);
|
|
280
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, withDivider ? /*#__PURE__*/React.createElement(Divider, {
|
|
281
|
-
weight: dividers
|
|
282
|
-
}) : null, /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({
|
|
283
|
-
as: "footer"
|
|
284
|
-
}, props), {}, {
|
|
285
|
-
className: exceptionallySetClassName,
|
|
286
|
-
padding: "large"
|
|
287
|
-
})));
|
|
160
|
+
function ModalFooter(_a) {
|
|
161
|
+
var exceptionallySetClassName = _a.exceptionallySetClassName, _b = _a.withDivider, withDivider = _b === void 0 ? false : _b, props = __rest(_a, ["exceptionallySetClassName", "withDivider"]);
|
|
162
|
+
var dividers = React.useContext(ModalContext).dividers;
|
|
163
|
+
return (React.createElement(React.Fragment, null,
|
|
164
|
+
withDivider ? React.createElement(Divider, { weight: dividers }) : null,
|
|
165
|
+
React.createElement(Box, __assign({ as: "footer" }, props, { className: exceptionallySetClassName, padding: "large" }))));
|
|
288
166
|
}
|
|
289
|
-
/**
|
|
290
|
-
* A specific version of the ModalFooter, tailored to showing an inline list of actions (buttons).
|
|
291
|
-
* @see ModalFooter
|
|
167
|
+
/**
|
|
168
|
+
* A specific version of the ModalFooter, tailored to showing an inline list of actions (buttons).
|
|
169
|
+
* @see ModalFooter
|
|
292
170
|
*/
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
} = _ref5,
|
|
298
|
-
props = _objectWithoutProperties(_ref5, _excluded5);
|
|
299
|
-
|
|
300
|
-
return /*#__PURE__*/React.createElement(ModalFooter, _objectSpread2({}, props), /*#__PURE__*/React.createElement(Inline, {
|
|
301
|
-
align: "right",
|
|
302
|
-
space: "large"
|
|
303
|
-
}, children));
|
|
171
|
+
function ModalActions(_a) {
|
|
172
|
+
var children = _a.children, props = __rest(_a, ["children"]);
|
|
173
|
+
return (React.createElement(ModalFooter, __assign({}, props),
|
|
174
|
+
React.createElement(Inline, { align: "right", space: "large" }, children)));
|
|
304
175
|
}
|
|
305
176
|
|
|
306
177
|
export { Modal, ModalActions, ModalBody, ModalCloseButton, ModalFooter, ModalHeader };
|
package/es/modal/modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sources":["../../src/modal/modal.tsx"],"sourcesContent":["import * as React from 'react'\nimport classNames from 'classnames'\nimport FocusLock from 'react-focus-lock'\nimport { hideOthers } from 'aria-hidden'\n\nimport { Dialog, DialogOptions, useDialogStore, Portal, PortalOptions } from '@ariakit/react'\n\nimport { CloseIcon } from '../icons/close-icon'\nimport { Column, Columns } from '../columns'\nimport { Inline } from '../inline'\nimport { Divider } from '../divider'\nimport { Box } from '../box'\nimport { IconButtonProps, IconButton } from '../button'\n\nimport styles from './modal.module.css'\nimport type { ObfuscatedClassName } from '../utils/common-types'\nimport { forwardRef } from 'react'\nimport type { DividerProps } from '../divider'\n\ntype ModalWidth = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'full'\ntype ModalHeightMode = 'expand' | 'fitContent'\n\n//\n// ModalContext\n//\n\ntype ModalContextValue = {\n onDismiss?(this: void): void\n height: ModalHeightMode\n dividers?: DividerProps['weight']\n}\n\nconst ModalContext = React.createContext<ModalContextValue>({\n onDismiss: undefined,\n height: 'fitContent',\n dividers: undefined,\n})\n\n//\n// Modal container\n//\n\ntype DivProps = Omit<\n React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLDivElement>, HTMLDivElement>,\n 'className' | 'children' | `aria-label` | `aria-labelledby`\n>\n\nexport interface ModalProps extends DivProps, ObfuscatedClassName {\n /**\n * The content of the modal.\n */\n children: React.ReactNode\n\n /**\n * Whether the modal is open and visible or not.\n */\n isOpen: boolean\n\n /**\n * Called when the user triggers closing the modal.\n */\n onDismiss?(): void\n\n /**\n * A descriptive setting for how wide the modal should aim to be, depending on how much space\n * it has on screen.\n * @default 'medium'\n */\n width?: ModalWidth\n\n /**\n * A descriptive setting for how tall the modal should aim to be.\n *\n * - 'expand': the modal aims to fill most of the available screen height, leaving only a small\n * padding above and below.\n * - 'fitContent': the modal shrinks to the smallest size that allow it to fit its content.\n *\n * In either case, if content does not fit, the content of the main body is set to scroll\n * (provided you use `ModalBody`) so that the modal never has to strech vertically beyond the\n * viewport boundaries.\n *\n * If you do not use `ModalBody`, the modal still prevents overflow, and you are in charge of\n * the inner layout to ensure scroll, or whatever other strategy you may want.\n */\n height?: ModalHeightMode\n\n /**\n * The weight to apply to all dividers rendered inside the modal.\n */\n dividers?: DividerProps['weight']\n\n /**\n * Whether to set or not the focus initially to the first focusable element inside the modal.\n */\n autoFocus?: boolean\n\n /**\n * Controls if the modal is dismissed when pressing \"Escape\".\n */\n hideOnEscape?: DialogOptions['hideOnEscape']\n\n /**\n * Controls if the modal is dismissed when clicking outside the modal body, on the overlay.\n */\n hideOnInteractOutside?: DialogOptions['hideOnInteractOutside']\n\n /**\n * An escape hatch in case you need to provide a custom class name to the overlay element.\n */\n exceptionallySetOverlayClassName?: string\n\n /**\n * Defines a string value that labels the current modal for assistive technologies.\n */\n 'aria-label'?: string\n\n /**\n * Identifies the element (or elements) that labels the current modal for assistive technologies.\n */\n 'aria-labelledby'?: string\n\n /**\n * An HTML element or a memoized callback function that returns an HTML element to be used as\n * the portal element. By default, the portal element will be a `div` element appended to the\n * `document.body`.\n *\n * @default HTMLDivElement\n *\n * @example\n * const [portal, setPortal] = useState(null);\n * <Portal portalElement={portal} />;\n * <div ref={setPortal} />;\n *\n * @example\n * const getPortalElement = useCallback(() => {\n * const div = document.createElement(\"div\");\n * const portalRoot = document.getElementById(\"portal-root\");\n * portalRoot.appendChild(div);\n * return div;\n * }, []);\n * <Portal portalElement={getPortalElement} />;\n */\n portalElement?: PortalOptions['portalElement']\n}\n\nfunction isNotInternalFrame(element: HTMLElement) {\n return !(element.ownerDocument === document && element.tagName.toLowerCase() === 'iframe')\n}\n\n/**\n * Renders a modal that sits on top of the rest of the content in the entire page.\n *\n * Follows the WAI-ARIA Dialog (Modal) Pattern.\n *\n * @see ModalHeader\n * @see ModalFooter\n * @see ModalBody\n */\nexport function Modal({\n isOpen,\n onDismiss,\n height = 'fitContent',\n dividers,\n width = 'medium',\n exceptionallySetClassName,\n exceptionallySetOverlayClassName,\n autoFocus = true,\n hideOnEscape = true,\n hideOnInteractOutside = true,\n children,\n portalElement,\n onKeyDown,\n // @ts-expect-error we want to make sure to not pass it to the Dialog component\n className,\n ...props\n}: ModalProps) {\n const setOpen = React.useCallback(\n (visible: boolean) => {\n if (!visible) {\n onDismiss?.()\n }\n },\n [onDismiss],\n )\n const store = useDialogStore({ open: isOpen, setOpen })\n\n const contextValue: ModalContextValue = React.useMemo(() => ({ onDismiss, height, dividers }), [\n onDismiss,\n height,\n dividers,\n ])\n\n const portalRef = React.useRef<HTMLElement | null>(null)\n const dialogRef = React.useRef<HTMLDivElement | null>(null)\n const backdropRef = React.useRef<HTMLDivElement | null>(null)\n const handleBackdropClick = React.useCallback(\n (event: React.MouseEvent) => {\n if (\n // The focus lock element takes up the same space as the backdrop and is where the event bubbles up from,\n // so instead of checking the backdrop as the event target, we need to make sure it's just above the dialog\n !dialogRef.current?.contains(event.target as Node) &&\n // Events fired from other portals will bubble up to the backdrop, even if it isn't a child in the DOM\n backdropRef.current?.contains(event.target as Node)\n ) {\n event.stopPropagation()\n onDismiss?.()\n }\n },\n [onDismiss],\n )\n\n React.useLayoutEffect(\n function disableAccessibilityTreeOutside() {\n if (!isOpen || !portalRef.current) {\n return\n }\n\n return hideOthers(portalRef.current)\n },\n [isOpen],\n )\n\n const handleKeyDown = React.useCallback(\n function handleKeyDown(event: React.KeyboardEvent<HTMLDivElement>) {\n if (\n hideOnEscape &&\n onDismiss != null &&\n event.key === 'Escape' &&\n !event.defaultPrevented\n ) {\n event.stopPropagation()\n onDismiss()\n }\n onKeyDown?.(event)\n },\n [onDismiss, hideOnEscape, onKeyDown],\n )\n\n if (!isOpen) {\n return null\n }\n\n return (\n <Portal portalRef={portalRef} portalElement={portalElement}>\n <Box\n data-testid=\"modal-overlay\"\n data-overlay\n className={classNames(\n styles.overlay,\n styles[height],\n styles[width],\n exceptionallySetOverlayClassName,\n )}\n /**\n * We're using `onPointerDown` instead of `onClick` to prevent the modal from\n * closing when the click starts inside the modal and ends on the backdrop.\n */\n onPointerDown={hideOnInteractOutside ? handleBackdropClick : undefined}\n ref={backdropRef}\n >\n <FocusLock\n autoFocus={autoFocus}\n whiteList={isNotInternalFrame}\n returnFocus={true}\n crossFrame={false}\n >\n <Dialog\n {...props}\n ref={dialogRef}\n render={\n <Box\n borderRadius=\"full\"\n background=\"default\"\n display=\"flex\"\n flexDirection=\"column\"\n overflow=\"hidden\"\n height={height === 'expand' ? 'full' : undefined}\n flexGrow={height === 'expand' ? 1 : 0}\n />\n }\n className={classNames(exceptionallySetClassName, styles.container)}\n store={store}\n preventBodyScroll\n // Disable focus lock as we set up our own using ReactFocusLock\n modal={false}\n autoFocus={false}\n autoFocusOnShow={false}\n autoFocusOnHide={false}\n // Disable portal and backdrop as we control their markup\n portal={false}\n backdrop={false}\n hideOnInteractOutside={false}\n hideOnEscape={false}\n onKeyDown={handleKeyDown}\n >\n <ModalContext.Provider value={contextValue}>\n {children}\n </ModalContext.Provider>\n </Dialog>\n </FocusLock>\n </Box>\n </Portal>\n )\n}\n\n//\n// ModalCloseButton\n//\n\nexport interface ModalCloseButtonProps\n extends Omit<\n IconButtonProps,\n 'type' | 'variant' | 'icon' | 'disabled' | 'loading' | 'tabIndex' | 'ref'\n > {\n /**\n * The descriptive label of the button.\n */\n 'aria-label': string\n}\n\n/**\n * The close button rendered by ModalHeader. Provided independently so that consumers can customize\n * the button's label.\n *\n * @see ModalHeader\n */\nexport function ModalCloseButton(props: ModalCloseButtonProps) {\n const { onDismiss } = React.useContext(ModalContext)\n const [includeInTabOrder, setIncludeInTabOrder] = React.useState(false)\n const [isMounted, setIsMounted] = React.useState(false)\n\n React.useEffect(\n function skipAutoFocus() {\n if (isMounted) {\n setIncludeInTabOrder(true)\n } else {\n setIsMounted(true)\n }\n },\n [isMounted],\n )\n\n return (\n <IconButton\n {...props}\n variant=\"quaternary\"\n onClick={onDismiss}\n icon={<CloseIcon />}\n tabIndex={includeInTabOrder ? 0 : -1}\n />\n )\n}\n\n//\n// ModalHeader\n//\n\nexport interface ModalHeaderProps extends DivProps, ObfuscatedClassName {\n /**\n * The content of the header.\n */\n children: React.ReactNode\n\n /**\n * Allows to provide a custom button element, or to omit the close button if set to false.\n * @see ModalCloseButton\n */\n button?: React.ReactNode | boolean\n\n /**\n * Whether to render a divider line below the header.\n * @default false\n */\n withDivider?: boolean\n}\n\n/**\n * Renders a standard modal header area with an optional close button.\n *\n * @see Modal\n * @see ModalFooter\n * @see ModalBody\n */\nexport function ModalHeader({\n children,\n button = true,\n withDivider = false,\n exceptionallySetClassName,\n ...props\n}: ModalHeaderProps) {\n const { dividers } = React.useContext(ModalContext)\n\n return (\n <>\n <Box\n {...props}\n as=\"header\"\n paddingLeft=\"large\"\n paddingRight={button === false || button === null ? 'large' : 'small'}\n paddingY=\"small\"\n className={exceptionallySetClassName}\n >\n <Columns space=\"large\" alignY=\"center\">\n <Column width=\"auto\">{children}</Column>\n {button === false || button === null ? (\n <div className={styles.headerContent} />\n ) : (\n <Column\n width=\"content\"\n exceptionallySetClassName={styles.buttonContainer}\n data-testid=\"button-container\"\n >\n {typeof button === 'boolean' ? (\n <ModalCloseButton aria-label=\"Close modal\" autoFocus={false} />\n ) : (\n button\n )}\n </Column>\n )}\n </Columns>\n </Box>\n {withDivider ? <Divider weight={dividers} /> : null}\n </>\n )\n}\n\n//\n// ModalBody\n//\n\nexport interface ModalBodyProps extends DivProps, ObfuscatedClassName {\n /**\n * The content of the modal body.\n */\n children: React.ReactNode\n}\n\n/**\n * Renders the body of a modal.\n *\n * Convenient to use alongside ModalHeader and/or ModalFooter as needed. It ensures, among other\n * things, that the content of the modal body expands or contracts depending on the modal height\n * setting or the size of the content. The body content also automatically scrolls when it's too\n * large to fit the available space.\n *\n * @see Modal\n * @see ModalHeader\n * @see ModalFooter\n */\nexport const ModalBody = forwardRef<HTMLDivElement, ModalBodyProps>(function ModalBody(\n { exceptionallySetClassName, children, ...props },\n ref,\n) {\n const { height } = React.useContext(ModalContext)\n return (\n <Box\n {...props}\n ref={ref}\n className={exceptionallySetClassName}\n flexGrow={height === 'expand' ? 1 : 0}\n height={height === 'expand' ? 'full' : undefined}\n overflow=\"auto\"\n >\n <Box padding=\"large\" paddingBottom=\"xxlarge\">\n {children}\n </Box>\n </Box>\n )\n})\n\n//\n// ModalFooter\n//\n\nexport interface ModalFooterProps extends DivProps, ObfuscatedClassName {\n /**\n * The contant of the modal footer.\n */\n children: React.ReactNode\n /**\n * Whether to render a divider line below the footer.\n * @default false\n */\n withDivider?: boolean\n}\n\n/**\n * Renders a standard modal footer area.\n *\n * @see Modal\n * @see ModalHeader\n * @see ModalBody\n */\nexport function ModalFooter({\n exceptionallySetClassName,\n withDivider = false,\n ...props\n}: ModalFooterProps) {\n const { dividers } = React.useContext(ModalContext)\n\n return (\n <>\n {withDivider ? <Divider weight={dividers} /> : null}\n <Box as=\"footer\" {...props} className={exceptionallySetClassName} padding=\"large\" />\n </>\n )\n}\n\n//\n// ModalActions\n//\n\nexport type ModalActionsProps = ModalFooterProps\n\n/**\n * A specific version of the ModalFooter, tailored to showing an inline list of actions (buttons).\n * @see ModalFooter\n */\nexport function ModalActions({ children, ...props }: ModalActionsProps) {\n return (\n <ModalFooter {...props}>\n <Inline align=\"right\" space=\"large\">\n {children}\n </Inline>\n </ModalFooter>\n )\n}\n"],"names":["ModalContext","React","createContext","onDismiss","undefined","height","dividers","isNotInternalFrame","element","ownerDocument","document","tagName","toLowerCase","Modal","isOpen","width","exceptionallySetClassName","exceptionallySetOverlayClassName","autoFocus","hideOnEscape","hideOnInteractOutside","children","portalElement","onKeyDown","className","props","setOpen","useCallback","visible","store","useDialogStore","open","contextValue","useMemo","portalRef","useRef","dialogRef","backdropRef","handleBackdropClick","event","current","contains","target","stopPropagation","useLayoutEffect","disableAccessibilityTreeOutside","hideOthers","handleKeyDown","key","defaultPrevented","createElement","Portal","Box","classNames","styles","overlay","onPointerDown","ref","FocusLock","whiteList","returnFocus","crossFrame","Dialog","render","borderRadius","background","display","flexDirection","overflow","flexGrow","container","preventBodyScroll","modal","autoFocusOnShow","autoFocusOnHide","portal","backdrop","Provider","value","ModalCloseButton","useContext","includeInTabOrder","setIncludeInTabOrder","useState","isMounted","setIsMounted","useEffect","skipAutoFocus","IconButton","variant","onClick","icon","CloseIcon","tabIndex","ModalHeader","button","withDivider","Fragment","as","paddingLeft","paddingRight","paddingY","Columns","space","alignY","Column","headerContent","buttonContainer","Divider","weight","ModalBody","forwardRef","padding","paddingBottom","ModalFooter","_objectSpread","ModalActions","Inline","align"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgCA,MAAMA,YAAY,gBAAGC,KAAK,CAACC,aAAN,CAAuC;AACxDC,EAAAA,SAAS,EAAEC,SAD6C;AAExDC,EAAAA,MAAM,EAAE,YAFgD;AAGxDC,EAAAA,QAAQ,EAAEF,SAAAA;AAH8C,CAAvC,CAArB,CAAA;;AAiHA,SAASG,kBAAT,CAA4BC,OAA5B,EAAgD;AAC5C,EAAA,OAAO,EAAEA,OAAO,CAACC,aAAR,KAA0BC,QAA1B,IAAsCF,OAAO,CAACG,OAAR,CAAgBC,WAAhB,EAAA,KAAkC,QAA1E,CAAP,CAAA;AACH,CAAA;AAED;;;;;;;;AAQG;;;SACaC,MAiBH,IAAA,EAAA;EAAA,IAjBS;IAClBC,MADkB;IAElBX,SAFkB;AAGlBE,IAAAA,MAAM,GAAG,YAHS;IAIlBC,QAJkB;AAKlBS,IAAAA,KAAK,GAAG,QALU;IAMlBC,yBANkB;IAOlBC,gCAPkB;AAQlBC,IAAAA,SAAS,GAAG,IARM;AASlBC,IAAAA,YAAY,GAAG,IATG;AAUlBC,IAAAA,qBAAqB,GAAG,IAVN;IAWlBC,QAXkB;IAYlBC,aAZkB;IAalBC,SAbkB;A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
|
|
|
1
|
-
var modules_8f59d13b = {"overlay":"_756b318e","fadein":"_21966801","fitContent":"_52bde55e","
|
|
1
|
+
var modules_8f59d13b = {"overlay":"_756b318e","fadein":"_21966801","fitContent":"_52bde55e","full":"bf469f5d","large":"_3208ba07","medium":"_29f86ad4","small":"_64c0762d","xsmall":"_3196b4d0","xlarge":"_3517025e","expand":"_8d20cc11","buttonContainer":"_37ed43a6","headerContent":"_7df92d5c","container":"_46152754"};
|
|
2
2
|
|
|
3
3
|
export { modules_8f59d13b as default };
|
|
4
4
|
//# sourceMappingURL=modal.module.css.js.map
|