@doist/reactist 28.7.0 → 28.7.3
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/dist/reactist.cjs.development.js +2093 -3829
- 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 -139
- 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 -75
- 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 -30
- 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 -75
- 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 -211
- 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 -201
- 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 +16 -23
- package/styles/avatar.css +3 -3
- package/styles/avatar.module.css.css +1 -1
- package/styles/badge.css +3 -3
- package/styles/badge.module.css.css +1 -1
- package/styles/banner.css +7 -7
- package/styles/banner.module.css.css +1 -1
- package/styles/base-field.css +5 -5
- package/styles/base-field.module.css.css +1 -1
- package/styles/box.css +2 -2
- package/styles/box.module.css.css +1 -1
- package/styles/button.css +5 -5
- package/styles/button.module.css.css +1 -1
- package/styles/checkbox-field.css +4 -4
- package/styles/checkbox-field.module.css.css +1 -1
- package/styles/columns.css +2 -2
- package/styles/divider.css +2 -2
- package/styles/heading.css +3 -3
- package/styles/heading.module.css.css +1 -1
- package/styles/hidden-visually.css +3 -3
- package/styles/hidden-visually.module.css.css +1 -1
- package/styles/hidden.css +2 -2
- package/styles/index.css +5 -5
- package/styles/loading.css +3 -3
- package/styles/menu.css +1 -1
- package/styles/modal.css +6 -6
- package/styles/modal.module.css.css +1 -1
- package/styles/notice.css +2 -2
- package/styles/password-field.css +8 -8
- package/styles/progress-bar.module.css.css +1 -1
- package/styles/prose.css +3 -3
- package/styles/prose.module.css.css +1 -1
- package/styles/reactist.css +31 -31
- package/styles/select-field.css +6 -6
- package/styles/select-field.module.css.css +1 -1
- package/styles/spinner.css +1 -1
- package/styles/static-toast.css +7 -7
- package/styles/switch-field.css +7 -7
- package/styles/switch-field.module.css.css +1 -1
- package/styles/tabs.css +3 -3
- package/styles/tabs.module.css.css +1 -1
- package/styles/text-area.css +6 -6
- package/styles/text-area.module.css.css +1 -1
- package/styles/text-field.css +6 -6
- package/styles/text-field.module.css.css +1 -1
- package/styles/text-link.css +3 -3
- package/styles/text-link.module.css.css +1 -1
- package/styles/text.css +3 -3
- package/styles/text.module.css.css +1 -1
- package/styles/toast.module.css.css +1 -1
- package/styles/tooltip.css +3 -3
- package/styles/tooltip.module.css.css +1 -1
- package/styles/use-toasts.css +7 -7
- package/styles/width.module.css.css +1 -1
- 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/lib/heading/heading.d.ts
CHANGED
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { ObfuscatedClassName, Tone } from '../utils/common-types';
|
|
3
|
-
import type { BoxProps } from '../box';
|
|
4
|
-
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6 | '1' | '2' | '3' | '4' | '5' | '6';
|
|
5
|
-
type HeadingProps = Omit<React.HTMLAttributes<HTMLHeadingElement>, 'className' | 'children'> & {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* The semantic level of the heading.
|
|
9
|
-
*/
|
|
10
|
-
level: HeadingLevel;
|
|
11
|
-
/**
|
|
12
|
-
* The weight of the heading. Used to de-emphasize the heading visually when using 'medium' or 'light'.
|
|
13
|
-
*
|
|
14
|
-
* @default 'regular'
|
|
15
|
-
*/
|
|
16
|
-
weight?: 'regular' | 'medium' | 'light';
|
|
17
|
-
/**
|
|
18
|
-
* Shifts the default heading visual text size up or down, depending on the original size
|
|
19
|
-
* imposed by the `level`. The heading continues to be semantically at the given level.
|
|
20
|
-
*
|
|
21
|
-
* By default, no value is applied, and the default size from the level is applied. The values
|
|
22
|
-
* have the following effect:
|
|
23
|
-
*
|
|
24
|
-
* - 'smaller' shifts the default level size down in the font-size scale (it tends to make the
|
|
25
|
-
* level look visually as if it were of the immediately lower level).
|
|
26
|
-
* - 'larger' has the opposite effect than 'smaller' shifting the visual font size up in the
|
|
27
|
-
* scale.
|
|
28
|
-
* - 'largest' can be thought of as applying 'larger' twice.
|
|
29
|
-
*
|
|
30
|
-
* @see level
|
|
31
|
-
* @default undefined
|
|
32
|
-
*/
|
|
33
|
-
size?: 'smaller' | 'larger' | 'largest';
|
|
34
|
-
/**
|
|
35
|
-
* The tone (semantic color) of the heading.
|
|
36
|
-
*
|
|
37
|
-
* @default 'normal'
|
|
38
|
-
*/
|
|
39
|
-
tone?: Tone;
|
|
40
|
-
/**
|
|
41
|
-
* Used to truncate the heading to a given number of lines.
|
|
42
|
-
*
|
|
43
|
-
* It will add an ellipsis (`…`) to the text at the end of the last line, only if the text was
|
|
44
|
-
* truncated. If the text fits without it being truncated, no ellipsis is added.
|
|
45
|
-
*
|
|
46
|
-
* By default, the text is not truncated at all, no matter how many lines it takes to render it.
|
|
47
|
-
*
|
|
48
|
-
* @default undefined
|
|
49
|
-
*/
|
|
50
|
-
lineClamp?: 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5';
|
|
51
|
-
/**
|
|
52
|
-
* How to align the heading text horizontally.
|
|
53
|
-
*
|
|
54
|
-
* @default 'start'
|
|
55
|
-
*/
|
|
56
|
-
align?: BoxProps['textAlign'];
|
|
57
|
-
};
|
|
58
|
-
declare const Heading: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "className" | "children"> & {
|
|
59
|
-
children: React.ReactNode;
|
|
60
|
-
/**
|
|
61
|
-
* The semantic level of the heading.
|
|
62
|
-
*/
|
|
63
|
-
level: HeadingLevel;
|
|
64
|
-
/**
|
|
65
|
-
* The weight of the heading. Used to de-emphasize the heading visually when using 'medium' or 'light'.
|
|
66
|
-
*
|
|
67
|
-
* @default 'regular'
|
|
68
|
-
*/
|
|
69
|
-
weight?: "
|
|
70
|
-
/**
|
|
71
|
-
* Shifts the default heading visual text size up or down, depending on the original size
|
|
72
|
-
* imposed by the `level`. The heading continues to be semantically at the given level.
|
|
73
|
-
*
|
|
74
|
-
* By default, no value is applied, and the default size from the level is applied. The values
|
|
75
|
-
* have the following effect:
|
|
76
|
-
*
|
|
77
|
-
* - 'smaller' shifts the default level size down in the font-size scale (it tends to make the
|
|
78
|
-
* level look visually as if it were of the immediately lower level).
|
|
79
|
-
* - 'larger' has the opposite effect than 'smaller' shifting the visual font size up in the
|
|
80
|
-
* scale.
|
|
81
|
-
* - 'largest' can be thought of as applying 'larger' twice.
|
|
82
|
-
*
|
|
83
|
-
* @see level
|
|
84
|
-
* @default undefined
|
|
85
|
-
*/
|
|
86
|
-
size?: "smaller" | "larger" | "largest" | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* The tone (semantic color) of the heading.
|
|
89
|
-
*
|
|
90
|
-
* @default 'normal'
|
|
91
|
-
*/
|
|
92
|
-
tone?: Tone | undefined;
|
|
93
|
-
/**
|
|
94
|
-
* Used to truncate the heading to a given number of lines.
|
|
95
|
-
*
|
|
96
|
-
* It will add an ellipsis (`…`) to the text at the end of the last line, only if the text was
|
|
97
|
-
* truncated. If the text fits without it being truncated, no ellipsis is added.
|
|
98
|
-
*
|
|
99
|
-
* By default, the text is not truncated at all, no matter how many lines it takes to render it.
|
|
100
|
-
*
|
|
101
|
-
* @default undefined
|
|
102
|
-
*/
|
|
103
|
-
lineClamp?: 1 | 2 | 3 | 4 | 5 | "1" | "2" | "3" | "4" | "5" | undefined;
|
|
104
|
-
/**
|
|
105
|
-
* How to align the heading text horizontally.
|
|
106
|
-
*
|
|
107
|
-
* @default 'start'
|
|
108
|
-
*/
|
|
109
|
-
align?: BoxProps['textAlign'];
|
|
110
|
-
} & ObfuscatedClassName & React.RefAttributes<HTMLHeadingElement>>;
|
|
111
|
-
export type { HeadingProps, HeadingLevel };
|
|
112
|
-
export { Heading };
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ObfuscatedClassName, Tone } from '../utils/common-types';
|
|
3
|
+
import type { BoxProps } from '../box';
|
|
4
|
+
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6 | '1' | '2' | '3' | '4' | '5' | '6';
|
|
5
|
+
type HeadingProps = Omit<React.HTMLAttributes<HTMLHeadingElement>, 'className' | 'children'> & {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* The semantic level of the heading.
|
|
9
|
+
*/
|
|
10
|
+
level: HeadingLevel;
|
|
11
|
+
/**
|
|
12
|
+
* The weight of the heading. Used to de-emphasize the heading visually when using 'medium' or 'light'.
|
|
13
|
+
*
|
|
14
|
+
* @default 'regular'
|
|
15
|
+
*/
|
|
16
|
+
weight?: 'regular' | 'medium' | 'light';
|
|
17
|
+
/**
|
|
18
|
+
* Shifts the default heading visual text size up or down, depending on the original size
|
|
19
|
+
* imposed by the `level`. The heading continues to be semantically at the given level.
|
|
20
|
+
*
|
|
21
|
+
* By default, no value is applied, and the default size from the level is applied. The values
|
|
22
|
+
* have the following effect:
|
|
23
|
+
*
|
|
24
|
+
* - 'smaller' shifts the default level size down in the font-size scale (it tends to make the
|
|
25
|
+
* level look visually as if it were of the immediately lower level).
|
|
26
|
+
* - 'larger' has the opposite effect than 'smaller' shifting the visual font size up in the
|
|
27
|
+
* scale.
|
|
28
|
+
* - 'largest' can be thought of as applying 'larger' twice.
|
|
29
|
+
*
|
|
30
|
+
* @see level
|
|
31
|
+
* @default undefined
|
|
32
|
+
*/
|
|
33
|
+
size?: 'smaller' | 'larger' | 'largest';
|
|
34
|
+
/**
|
|
35
|
+
* The tone (semantic color) of the heading.
|
|
36
|
+
*
|
|
37
|
+
* @default 'normal'
|
|
38
|
+
*/
|
|
39
|
+
tone?: Tone;
|
|
40
|
+
/**
|
|
41
|
+
* Used to truncate the heading to a given number of lines.
|
|
42
|
+
*
|
|
43
|
+
* It will add an ellipsis (`…`) to the text at the end of the last line, only if the text was
|
|
44
|
+
* truncated. If the text fits without it being truncated, no ellipsis is added.
|
|
45
|
+
*
|
|
46
|
+
* By default, the text is not truncated at all, no matter how many lines it takes to render it.
|
|
47
|
+
*
|
|
48
|
+
* @default undefined
|
|
49
|
+
*/
|
|
50
|
+
lineClamp?: 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5';
|
|
51
|
+
/**
|
|
52
|
+
* How to align the heading text horizontally.
|
|
53
|
+
*
|
|
54
|
+
* @default 'start'
|
|
55
|
+
*/
|
|
56
|
+
align?: BoxProps['textAlign'];
|
|
57
|
+
};
|
|
58
|
+
declare const Heading: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "className" | "children"> & {
|
|
59
|
+
children: React.ReactNode;
|
|
60
|
+
/**
|
|
61
|
+
* The semantic level of the heading.
|
|
62
|
+
*/
|
|
63
|
+
level: HeadingLevel;
|
|
64
|
+
/**
|
|
65
|
+
* The weight of the heading. Used to de-emphasize the heading visually when using 'medium' or 'light'.
|
|
66
|
+
*
|
|
67
|
+
* @default 'regular'
|
|
68
|
+
*/
|
|
69
|
+
weight?: "medium" | "regular" | "light" | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Shifts the default heading visual text size up or down, depending on the original size
|
|
72
|
+
* imposed by the `level`. The heading continues to be semantically at the given level.
|
|
73
|
+
*
|
|
74
|
+
* By default, no value is applied, and the default size from the level is applied. The values
|
|
75
|
+
* have the following effect:
|
|
76
|
+
*
|
|
77
|
+
* - 'smaller' shifts the default level size down in the font-size scale (it tends to make the
|
|
78
|
+
* level look visually as if it were of the immediately lower level).
|
|
79
|
+
* - 'larger' has the opposite effect than 'smaller' shifting the visual font size up in the
|
|
80
|
+
* scale.
|
|
81
|
+
* - 'largest' can be thought of as applying 'larger' twice.
|
|
82
|
+
*
|
|
83
|
+
* @see level
|
|
84
|
+
* @default undefined
|
|
85
|
+
*/
|
|
86
|
+
size?: "smaller" | "larger" | "largest" | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* The tone (semantic color) of the heading.
|
|
89
|
+
*
|
|
90
|
+
* @default 'normal'
|
|
91
|
+
*/
|
|
92
|
+
tone?: Tone | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Used to truncate the heading to a given number of lines.
|
|
95
|
+
*
|
|
96
|
+
* It will add an ellipsis (`…`) to the text at the end of the last line, only if the text was
|
|
97
|
+
* truncated. If the text fits without it being truncated, no ellipsis is added.
|
|
98
|
+
*
|
|
99
|
+
* By default, the text is not truncated at all, no matter how many lines it takes to render it.
|
|
100
|
+
*
|
|
101
|
+
* @default undefined
|
|
102
|
+
*/
|
|
103
|
+
lineClamp?: 1 | 2 | 3 | 4 | 5 | "1" | "2" | "3" | "4" | "5" | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* How to align the heading text horizontally.
|
|
106
|
+
*
|
|
107
|
+
* @default 'start'
|
|
108
|
+
*/
|
|
109
|
+
align?: BoxProps['textAlign'];
|
|
110
|
+
} & ObfuscatedClassName & React.RefAttributes<HTMLHeadingElement>>;
|
|
111
|
+
export type { HeadingProps, HeadingLevel };
|
|
112
|
+
export { Heading };
|
package/lib/heading/heading.js
CHANGED
|
@@ -1,2 +1,52 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var responsiveProps = require('../utils/responsive-props.js');
|
|
8
|
+
var box = require('../box/box.js');
|
|
9
|
+
var heading_module = require('./heading.module.css.js');
|
|
10
|
+
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n["default"] = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
|
+
|
|
31
|
+
var Heading = React__namespace.forwardRef(function Heading(_a, ref) {
|
|
32
|
+
var level = _a.level, _b = _a.weight, weight = _b === void 0 ? 'regular' : _b, size = _a.size, _c = _a.tone, tone = _c === void 0 ? 'normal' : _c, children = _a.children, lineClamp = _a.lineClamp, align = _a.align, exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["level", "weight", "size", "tone", "children", "lineClamp", "align", "exceptionallySetClassName"]);
|
|
33
|
+
// In TypeScript v4.1, this would be properly recognized without needing the type assertion
|
|
34
|
+
// https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types
|
|
35
|
+
var headingElementName = "h".concat(level);
|
|
36
|
+
var lineClampMultipleLines = typeof lineClamp === 'string' ? parseInt(lineClamp, 10) > 1 : (lineClamp || 0) > 1;
|
|
37
|
+
return (React__namespace.createElement(box.Box, tslib.__assign({}, props, { className: [
|
|
38
|
+
exceptionallySetClassName,
|
|
39
|
+
heading_module["default"].heading,
|
|
40
|
+
weight !== 'regular' ? responsiveProps.getClassNames(heading_module["default"], 'weight', weight) : null,
|
|
41
|
+
tone !== 'normal' ? responsiveProps.getClassNames(heading_module["default"], 'tone', tone) : null,
|
|
42
|
+
responsiveProps.getClassNames(heading_module["default"], 'size', size),
|
|
43
|
+
lineClampMultipleLines ? heading_module["default"].lineClampMultipleLines : null,
|
|
44
|
+
lineClamp ? responsiveProps.getClassNames(heading_module["default"], 'lineClamp', lineClamp.toString()) : null,
|
|
45
|
+
], textAlign: align,
|
|
46
|
+
// Prevents emojis from being cut-off
|
|
47
|
+
// See https://github.com/Doist/reactist/pull/528
|
|
48
|
+
paddingRight: lineClamp ? 'xsmall' : undefined, as: headingElementName, ref: ref }), children));
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
exports.Heading = Heading;
|
|
2
52
|
//# sourceMappingURL=heading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.js","sources":["../../src/heading/heading.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"heading.js","sources":["../../src/heading/heading.tsx"],"sourcesContent":[null],"names":["React","__rest","Box","styles","getClassNames"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEM,IAAA,OAAO,GAAGA,gBAAK,CAAC,UAAU,CAC5B,SAAS,OAAO,CACZ,EAUC,EACD,GAAG,EAAA;AAVC,IAAA,IAAA,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,EAAA,GAAA,EAAA,CAAA,MAAkB,EAAlB,MAAM,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,SAAS,GAAA,EAAA,EAClB,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,EAAA,GAAA,EAAA,CAAA,IAAe,EAAf,IAAI,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,QAAQ,GAAA,EAAA,EACf,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,SAAS,eAAA,EACT,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,yBAAyB,GAAA,EAAA,CAAA,yBAAA,EACtB,KAAK,GAAAC,YAAA,CAAA,EAAA,EATZ,kGAUC,CADW,CAAA;;;AAMZ,IAAA,IAAM,kBAAkB,GAAG,GAAI,CAAA,MAAA,CAAA,KAAK,CAAoB,CAAA;IACxD,IAAM,sBAAsB,GACxB,OAAO,SAAS,KAAK,QAAQ,GAAG,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,CAAA;AAEtF,IAAA,QACID,gBAAC,CAAA,aAAA,CAAAE,OAAG,qBACI,KAAK,EAAA,EACT,SAAS,EAAE;YACP,yBAAyB;AACzB,YAAAC,yBAAM,CAAC,OAAO;AACd,YAAA,MAAM,KAAK,SAAS,GAAGC,6BAAa,CAACD,yBAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,IAAI;AACrE,YAAA,IAAI,KAAK,QAAQ,GAAGC,6BAAa,CAACD,yBAAM,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,IAAI;AAC9D,YAAAC,6BAAa,CAACD,yBAAM,EAAE,MAAM,EAAE,IAAI,CAAC;YACnC,sBAAsB,GAAGA,yBAAM,CAAC,sBAAsB,GAAG,IAAI;AAC7D,YAAA,SAAS,GAAGC,6BAAa,CAACD,yBAAM,EAAE,WAAW,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI;SAC9E,EACD,SAAS,EAAE,KAAK;;;QAGhB,YAAY,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,EAC9C,EAAE,EAAE,kBAAkB,EACtB,GAAG,EAAE,GAAG,EAEP,CAAA,EAAA,QAAQ,CACP,EACT;AACL,CAAC;;;;"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var modules_949d2ff4 = {"heading":"bff24867","weight-medium":"_9b540c61","weight-light":"c6729907","tone-secondary":"d6507f70","tone-danger":"d1846d93","size-largest":"_7cbdd1ba","size-larger":"b3e14969","size-smaller":"be14a265","lineClampMultipleLines":"_71391f13","lineClamp-1":"_97298b1b","lineClamp-2":"_6d357d76","lineClamp-3":"d820b451","lineClamp-4":"_8d37487d","lineClamp-5":"_5215b4d7"};
|
|
6
|
+
|
|
7
|
+
exports["default"] = modules_949d2ff4;
|
|
2
8
|
//# sourceMappingURL=heading.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"heading.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/lib/heading/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './heading';
|
|
1
|
+
export * from './heading';
|
package/lib/hidden/hidden.d.ts
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { ResponsiveBreakpoints } from '../utils/responsive-props';
|
|
3
|
-
type AboveProp = {
|
|
4
|
-
/**
|
|
5
|
-
* Hides the element on viewport sizes equal or larger to the one given.
|
|
6
|
-
*
|
|
7
|
-
* It is not supported to pass it alongside `below`, and the resulting behavior is undefined
|
|
8
|
-
* (most likely itʼll hide the element all the time to make it apparent that there's a problem).
|
|
9
|
-
*
|
|
10
|
-
* @see below
|
|
11
|
-
*/
|
|
12
|
-
above: Exclude<ResponsiveBreakpoints, 'desktop'>;
|
|
13
|
-
below?: never;
|
|
14
|
-
};
|
|
15
|
-
type BelowProp = {
|
|
16
|
-
/**
|
|
17
|
-
* Hides the element on viewport sizes equal or smaller to the one given.
|
|
18
|
-
*
|
|
19
|
-
* It is not supported to pass it alongside `above`, and the resulting behavior is undefined
|
|
20
|
-
* (most likely itʼll hide the element all the time to make it apparent that there's a problem).
|
|
21
|
-
*
|
|
22
|
-
* @see above
|
|
23
|
-
*/
|
|
24
|
-
below: Exclude<ResponsiveBreakpoints, 'mobile'>;
|
|
25
|
-
above?: never;
|
|
26
|
-
};
|
|
27
|
-
type CommonProps = {
|
|
28
|
-
children: React.ReactNode;
|
|
29
|
-
/**
|
|
30
|
-
* hides the element when on print media.
|
|
31
|
-
*/
|
|
32
|
-
print?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Useful if you want the element to be an inline element when it is visible.
|
|
35
|
-
*/
|
|
36
|
-
display?: 'inline' | 'block';
|
|
37
|
-
};
|
|
38
|
-
type HiddenProps = CommonProps & (AboveProp | BelowProp | Required<Pick<CommonProps, 'print'>>);
|
|
39
|
-
/**
|
|
40
|
-
* A component that allows to specify how to hide itself on certain responsive screen sizes, or on
|
|
41
|
-
* print media.
|
|
42
|
-
*
|
|
43
|
-
* @see HiddenProps
|
|
44
|
-
* @see HiddenVisually for hiding content only visually, while keeping it available for assistive
|
|
45
|
-
* technologies.
|
|
46
|
-
*/
|
|
47
|
-
declare const Hidden: import("../utils/polymorphism").PolymorphicComponent<"div", HiddenProps, "obfuscateClassName">;
|
|
48
|
-
export { Hidden };
|
|
49
|
-
export type { HiddenProps };
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ResponsiveBreakpoints } from '../utils/responsive-props';
|
|
3
|
+
type AboveProp = {
|
|
4
|
+
/**
|
|
5
|
+
* Hides the element on viewport sizes equal or larger to the one given.
|
|
6
|
+
*
|
|
7
|
+
* It is not supported to pass it alongside `below`, and the resulting behavior is undefined
|
|
8
|
+
* (most likely itʼll hide the element all the time to make it apparent that there's a problem).
|
|
9
|
+
*
|
|
10
|
+
* @see below
|
|
11
|
+
*/
|
|
12
|
+
above: Exclude<ResponsiveBreakpoints, 'desktop'>;
|
|
13
|
+
below?: never;
|
|
14
|
+
};
|
|
15
|
+
type BelowProp = {
|
|
16
|
+
/**
|
|
17
|
+
* Hides the element on viewport sizes equal or smaller to the one given.
|
|
18
|
+
*
|
|
19
|
+
* It is not supported to pass it alongside `above`, and the resulting behavior is undefined
|
|
20
|
+
* (most likely itʼll hide the element all the time to make it apparent that there's a problem).
|
|
21
|
+
*
|
|
22
|
+
* @see above
|
|
23
|
+
*/
|
|
24
|
+
below: Exclude<ResponsiveBreakpoints, 'mobile'>;
|
|
25
|
+
above?: never;
|
|
26
|
+
};
|
|
27
|
+
type CommonProps = {
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* hides the element when on print media.
|
|
31
|
+
*/
|
|
32
|
+
print?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Useful if you want the element to be an inline element when it is visible.
|
|
35
|
+
*/
|
|
36
|
+
display?: 'inline' | 'block';
|
|
37
|
+
};
|
|
38
|
+
type HiddenProps = CommonProps & (AboveProp | BelowProp | Required<Pick<CommonProps, 'print'>>);
|
|
39
|
+
/**
|
|
40
|
+
* A component that allows to specify how to hide itself on certain responsive screen sizes, or on
|
|
41
|
+
* print media.
|
|
42
|
+
*
|
|
43
|
+
* @see HiddenProps
|
|
44
|
+
* @see HiddenVisually for hiding content only visually, while keeping it available for assistive
|
|
45
|
+
* technologies.
|
|
46
|
+
*/
|
|
47
|
+
declare const Hidden: import("../utils/polymorphism").PolymorphicComponent<"div", HiddenProps, "obfuscateClassName">;
|
|
48
|
+
export { Hidden };
|
|
49
|
+
export type { HiddenProps };
|
package/lib/hidden/hidden.js
CHANGED
|
@@ -1,2 +1,71 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var box = require('../box/box.js');
|
|
8
|
+
var hidden_module = require('./hidden.module.css.js');
|
|
9
|
+
var polymorphism = require('../utils/polymorphism.js');
|
|
10
|
+
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n["default"] = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* A component that allows to specify how to hide itself on certain responsive screen sizes, or on
|
|
33
|
+
* print media.
|
|
34
|
+
*
|
|
35
|
+
* @see HiddenProps
|
|
36
|
+
* @see HiddenVisually for hiding content only visually, while keeping it available for assistive
|
|
37
|
+
* technologies.
|
|
38
|
+
*/
|
|
39
|
+
var Hidden = polymorphism.polymorphicComponent(function Hidden(_a, ref) {
|
|
40
|
+
var _b = _a.display, display = _b === void 0 ? 'block' : _b, children = _a.children, exceptionallySetClassName = _a.exceptionallySetClassName, props = tslib.__rest(_a, ["display", "children", "exceptionallySetClassName"]);
|
|
41
|
+
var hiddenOnPrint = 'print' in props && props.print;
|
|
42
|
+
var hiddenOnDesktop = 'above' in props;
|
|
43
|
+
var hiddenOnMobile = 'below' in props;
|
|
44
|
+
var hiddenOnTablet = ('below' in props && props.below === 'desktop') ||
|
|
45
|
+
('above' in props && props.above === 'mobile');
|
|
46
|
+
if (hiddenOnDesktop && hiddenOnMobile) {
|
|
47
|
+
// eslint-disable-next-line no-console
|
|
48
|
+
console.warn('<Hidden /> should receive either above="…" or below="…" but not both');
|
|
49
|
+
}
|
|
50
|
+
if (!hiddenOnDesktop && !hiddenOnMobile && !hiddenOnPrint) {
|
|
51
|
+
// eslint-disable-next-line no-console
|
|
52
|
+
console.warn('<Hidden /> did not receive any criteria to hide itself');
|
|
53
|
+
}
|
|
54
|
+
// We need to delete these so they do not get forwarded to the Box
|
|
55
|
+
if ('above' in props)
|
|
56
|
+
delete props['above'];
|
|
57
|
+
if ('below' in props)
|
|
58
|
+
delete props['below'];
|
|
59
|
+
if ('print' in props)
|
|
60
|
+
delete props['print'];
|
|
61
|
+
return (React__namespace.createElement(box.Box, tslib.__assign({}, props, { ref: ref, className: [exceptionallySetClassName, hiddenOnPrint ? hidden_module["default"].hiddenOnPrint : null], display: hiddenOnDesktop && hiddenOnMobile
|
|
62
|
+
? 'none'
|
|
63
|
+
: {
|
|
64
|
+
mobile: hiddenOnMobile ? 'none' : display,
|
|
65
|
+
tablet: hiddenOnTablet ? 'none' : display,
|
|
66
|
+
desktop: hiddenOnDesktop ? 'none' : display
|
|
67
|
+
} }), children));
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
exports.Hidden = Hidden;
|
|
2
71
|
//# sourceMappingURL=hidden.js.map
|
package/lib/hidden/hidden.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hidden.js","sources":["../../src/hidden/hidden.tsx"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"hidden.js","sources":["../../src/hidden/hidden.tsx"],"sourcesContent":[null],"names":["polymorphicComponent","__rest","React","Box","__assign","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA;;;;;;;AAOG;AACG,IAAA,MAAM,GAAGA,iCAAoB,CAAqB,SAAS,MAAM,CACnE,EAAoE,EACpE,GAAG,EAAA;AADD,IAAA,IAAA,eAAiB,EAAjB,OAAO,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,OAAO,KAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,yBAAyB,GAAA,EAAA,CAAA,yBAAA,EAAK,KAAK,GAAAC,YAAA,CAAA,EAAA,EAAlE,oDAAoE,CAAF,CAAA;IAGlE,IAAM,aAAa,GAAG,OAAO,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,CAAA;AAErD,IAAA,IAAM,eAAe,GAAG,OAAO,IAAI,KAAK,CAAA;AACxC,IAAA,IAAM,cAAc,GAAG,OAAO,IAAI,KAAK,CAAA;AACvC,IAAA,IAAM,cAAc,GAChB,CAAC,OAAO,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS;SAC7C,OAAO,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAA;IAElD,IAAI,eAAe,IAAI,cAAc,EAAE;;AAEnC,QAAA,OAAO,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAA;AACvF,KAAA;IAED,IAAI,CAAC,eAAe,IAAI,CAAC,cAAc,IAAI,CAAC,aAAa,EAAE;;AAEvD,QAAA,OAAO,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAA;AACzE,KAAA;;IAGD,IAAI,OAAO,IAAI,KAAK;AAAE,QAAA,OAAO,KAAK,CAAC,OAAO,CAAC,CAAA;IAC3C,IAAI,OAAO,IAAI,KAAK;AAAE,QAAA,OAAO,KAAK,CAAC,OAAO,CAAC,CAAA;IAC3C,IAAI,OAAO,IAAI,KAAK;AAAE,QAAA,OAAO,KAAK,CAAC,OAAO,CAAC,CAAA;AAE3C,IAAA,QACIC,gBAAA,CAAA,aAAA,CAACC,OAAG,EAAAC,cAAA,CAAA,EAAA,EACI,KAAK,EACT,EAAA,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,CAAC,yBAAyB,EAAE,aAAa,GAAGC,wBAAM,CAAC,aAAa,GAAG,IAAI,CAAC,EACnF,OAAO,EACH,eAAe,IAAI,cAAc;AAC7B,cAAE,MAAM;AACR,cAAE;gBACI,MAAM,EAAE,cAAc,GAAG,MAAM,GAAG,OAAO;gBACzC,MAAM,EAAE,cAAc,GAAG,MAAM,GAAG,OAAO;gBACzC,OAAO,EAAE,eAAe,GAAG,MAAM,GAAG,OAAO;aAC9C,EAGV,CAAA,EAAA,QAAQ,CACP,EACT;AACL,CAAC;;;;"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var modules_4689e97e = {"hiddenOnPrint":"_0e595dea"};
|
|
6
|
+
|
|
7
|
+
exports["default"] = modules_4689e97e;
|
|
2
8
|
//# sourceMappingURL=hidden.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hidden.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"hidden.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/lib/hidden/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './hidden';
|
|
1
|
+
export * from './hidden';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
type Props = {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Provides content to assistive technologies while hiding it from the screen.
|
|
7
|
-
*
|
|
8
|
-
* @see Hidden for fully hiding content, and only under certain conditions.
|
|
9
|
-
*/
|
|
10
|
-
declare const HiddenVisually: import("../utils/polymorphism").PolymorphicComponent<"div", Props, "omitClassName">;
|
|
11
|
-
export { HiddenVisually };
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Provides content to assistive technologies while hiding it from the screen.
|
|
7
|
+
*
|
|
8
|
+
* @see Hidden for fully hiding content, and only under certain conditions.
|
|
9
|
+
*/
|
|
10
|
+
declare const HiddenVisually: import("../utils/polymorphism").PolymorphicComponent<"div", Props, "omitClassName">;
|
|
11
|
+
export { HiddenVisually };
|
|
@@ -1,2 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var polymorphism = require('../utils/polymorphism.js');
|
|
8
|
+
var box = require('../box/box.js');
|
|
9
|
+
var hiddenVisually_module = require('./hidden-visually.module.css.js');
|
|
10
|
+
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n["default"] = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Provides content to assistive technologies while hiding it from the screen.
|
|
33
|
+
*
|
|
34
|
+
* @see Hidden for fully hiding content, and only under certain conditions.
|
|
35
|
+
*/
|
|
36
|
+
var HiddenVisually = polymorphism.polymorphicComponent(function HiddenVisually(props, ref) {
|
|
37
|
+
return (React__namespace.createElement(box.Box, tslib.__assign({}, props, { ref: ref, position: "absolute", overflow: "hidden", className: hiddenVisually_module["default"].hiddenVisually })));
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
exports.HiddenVisually = HiddenVisually;
|
|
2
41
|
//# sourceMappingURL=hidden-visually.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hidden-visually.js","sources":["../../src/hidden-visually/hidden-visually.tsx"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"hidden-visually.js","sources":["../../src/hidden-visually/hidden-visually.tsx"],"sourcesContent":[null],"names":["polymorphicComponent","React","Box","__assign","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA;;;;AAIG;AACG,IAAA,cAAc,GAAGA,iCAAoB,CAAgC,SAAS,cAAc,CAC9F,KAAK,EACL,GAAG,EAAA;IAEH,QACIC,gBAAC,CAAA,aAAA,CAAAC,OAAG,EACIC,cAAA,CAAA,EAAA,EAAA,KAAK,IACT,GAAG,EAAE,GAAG,EACR,QAAQ,EAAC,UAAU,EACnB,QAAQ,EAAC,QAAQ,EACjB,SAAS,EAAEC,gCAAM,CAAC,cAAc,EAClC,CAAA,CAAA,EACL;AACL,CAAC;;;;"}
|