@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
|
@@ -1,2 +1,93 @@
|
|
|
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 classNames = require('classnames');
|
|
8
|
+
var useCallbackRef = require('use-callback-ref');
|
|
9
|
+
var baseField = require('../base-field/base-field.js');
|
|
10
|
+
var box = require('../box/box.js');
|
|
11
|
+
var textArea_module = require('./text-area.module.css.js');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
function _interopNamespace(e) {
|
|
16
|
+
if (e && e.__esModule) return e;
|
|
17
|
+
var n = Object.create(null);
|
|
18
|
+
if (e) {
|
|
19
|
+
Object.keys(e).forEach(function (k) {
|
|
20
|
+
if (k !== 'default') {
|
|
21
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
22
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return e[k]; }
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
n["default"] = e;
|
|
30
|
+
return Object.freeze(n);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
34
|
+
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
35
|
+
|
|
36
|
+
var TextArea = React__namespace.forwardRef(function TextArea(_a, ref) {
|
|
37
|
+
var _b = _a.variant, variant = _b === void 0 ? 'default' : _b, id = _a.id, label = _a.label, value = _a.value, auxiliaryLabel = _a.auxiliaryLabel, message = _a.message, tone = _a.tone, maxWidth = _a.maxWidth, maxLength = _a.maxLength, hidden = _a.hidden, ariaDescribedBy = _a["aria-describedby"], rows = _a.rows, _c = _a.autoExpand, autoExpand = _c === void 0 ? false : _c, _d = _a.disableResize, disableResize = _d === void 0 ? false : _d, originalOnChange = _a.onChange, props = tslib.__rest(_a, ["variant", "id", "label", "value", "auxiliaryLabel", "message", "tone", "maxWidth", "maxLength", "hidden", 'aria-describedby', "rows", "autoExpand", "disableResize", "onChange"]);
|
|
38
|
+
var containerRef = React__namespace.useRef(null);
|
|
39
|
+
var internalRef = React__namespace.useRef(null);
|
|
40
|
+
var combinedRef = useCallbackRef.useMergeRefs([ref, internalRef]);
|
|
41
|
+
useAutoExpand({ value: value, autoExpand: autoExpand, containerRef: containerRef, internalRef: internalRef });
|
|
42
|
+
var textAreaClassName = classNames__default["default"]([
|
|
43
|
+
autoExpand ? textArea_module["default"].disableResize : null,
|
|
44
|
+
disableResize ? textArea_module["default"].disableResize : null,
|
|
45
|
+
]);
|
|
46
|
+
return (React__namespace.createElement(baseField.BaseField, { variant: variant, id: id, label: label, value: value, auxiliaryLabel: auxiliaryLabel, message: message, tone: tone, hidden: hidden, "aria-describedby": ariaDescribedBy, className: [
|
|
47
|
+
textArea_module["default"].textAreaContainer,
|
|
48
|
+
tone === 'error' ? textArea_module["default"].error : null,
|
|
49
|
+
variant === 'bordered' ? textArea_module["default"].bordered : null,
|
|
50
|
+
], maxWidth: maxWidth, maxLength: maxLength }, function (_a) {
|
|
51
|
+
var onChange = _a.onChange, extraProps = tslib.__rest(_a, ["onChange"]);
|
|
52
|
+
return (React__namespace.createElement(box.Box, { width: "full", display: "flex", className: textArea_module["default"].innerContainer, ref: containerRef },
|
|
53
|
+
React__namespace.createElement("textarea", tslib.__assign({}, props, extraProps, { ref: combinedRef, rows: rows, className: textAreaClassName, maxLength: maxLength, onChange: function (event) {
|
|
54
|
+
originalOnChange === null || originalOnChange === void 0 ? void 0 : originalOnChange(event);
|
|
55
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
56
|
+
} }))));
|
|
57
|
+
}));
|
|
58
|
+
});
|
|
59
|
+
function useAutoExpand(_a) {
|
|
60
|
+
var value = _a.value, autoExpand = _a.autoExpand, containerRef = _a.containerRef, internalRef = _a.internalRef;
|
|
61
|
+
var isControlled = value !== undefined;
|
|
62
|
+
React__namespace.useEffect(function setupAutoExpandWhenUncontrolled() {
|
|
63
|
+
var textAreaElement = internalRef.current;
|
|
64
|
+
if (!textAreaElement || !autoExpand || isControlled) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
var containerElement = containerRef.current;
|
|
68
|
+
function handleAutoExpand(value) {
|
|
69
|
+
if (containerElement) {
|
|
70
|
+
containerElement.dataset.replicatedValue = value;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function handleInput(event) {
|
|
74
|
+
handleAutoExpand(event.currentTarget.value);
|
|
75
|
+
}
|
|
76
|
+
// Apply change initially, in case the text area has a non-empty initial value
|
|
77
|
+
handleAutoExpand(textAreaElement.value);
|
|
78
|
+
textAreaElement.addEventListener('input', handleInput);
|
|
79
|
+
return function () { return textAreaElement.removeEventListener('input', handleInput); };
|
|
80
|
+
}, [autoExpand, containerRef, internalRef, isControlled]);
|
|
81
|
+
React__namespace.useEffect(function setupAutoExpandWhenControlled() {
|
|
82
|
+
if (!isControlled || !autoExpand) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
var containerElement = containerRef.current;
|
|
86
|
+
if (containerElement) {
|
|
87
|
+
containerElement.dataset.replicatedValue = value;
|
|
88
|
+
}
|
|
89
|
+
}, [value, containerRef, isControlled, autoExpand]);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
exports.TextArea = TextArea;
|
|
2
93
|
//# sourceMappingURL=text-area.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-area.js","sources":["../../src/text-area/text-area.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"text-area.js","sources":["../../src/text-area/text-area.tsx"],"sourcesContent":[null],"names":["React","__rest","useMergeRefs","classNames","styles","BaseField","Box","__assign"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDM,IAAA,QAAQ,GAAGA,gBAAK,CAAC,UAAU,CAAqC,SAAS,QAAQ,CACnF,EAiBC,EACD,GAAG,EAAA;AAjBC,IAAA,IAAA,EAAmB,GAAA,EAAA,CAAA,OAAA,EAAnB,OAAO,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,SAAS,GAAA,EAAA,EACnB,EAAE,GAAA,EAAA,CAAA,EAAA,EACF,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,IAA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A,IAAI,CAAC,YAAY,IAAI,CAAC,UAAU,EAAE;YAC9B,OAAM;AACT,SAAA;AAED,QAAA,IAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,CAAA;AAC7C,QAAA,IAAI,gBAAgB,EAAE;AAClB,YAAA,gBAAgB,CAAC,OAAO,CAAC,eAAe,GAAG,KAAK,CAAA;AACnD,SAAA;KACJ,EACD,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,CAAC,CAClD,CAAA;AACL;;;;"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var modules_2728c236 = {"textAreaContainer":"_1ae68da6","innerContainer":"_8eadb1df","bordered":"_35e7d1ba","error":"_8b028659","disableResize":"_30f6cf3c"};
|
|
6
|
+
|
|
7
|
+
exports["default"] = modules_2728c236;
|
|
2
8
|
//# sourceMappingURL=text-area.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-area.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"text-area.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './text-field';
|
|
1
|
+
export * from './text-field';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { BaseFieldVariantProps } from '../base-field';
|
|
3
|
-
import type { BaseFieldProps, FieldComponentProps } from '../base-field';
|
|
4
|
-
type TextFieldType = 'email' | 'search' | 'tel' | 'text' | 'url';
|
|
5
|
-
interface TextFieldProps extends Omit<FieldComponentProps<HTMLInputElement>, 'type' | 'supportsStartAndEndSlots'>, BaseFieldVariantProps, Pick<BaseFieldProps, 'characterCountPosition'> {
|
|
6
|
-
type?: TextFieldType;
|
|
7
|
-
startSlot?: React.ReactElement | string | number;
|
|
8
|
-
endSlot?: React.ReactElement | string | number;
|
|
9
|
-
/**
|
|
10
|
-
* The maximum number of characters that the input field can accept.
|
|
11
|
-
* When this limit is reached, the input field will not accept any more characters.
|
|
12
|
-
* The counter element will turn red when the number of characters is within 10 of the maximum limit.
|
|
13
|
-
*/
|
|
14
|
-
maxLength?: number;
|
|
15
|
-
}
|
|
16
|
-
declare const TextField: React.ForwardRefExoticComponent<Omit<TextFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
17
|
-
export { TextField };
|
|
18
|
-
export type { TextFieldProps, TextFieldType };
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BaseFieldVariantProps } from '../base-field';
|
|
3
|
+
import type { BaseFieldProps, FieldComponentProps } from '../base-field';
|
|
4
|
+
type TextFieldType = 'email' | 'search' | 'tel' | 'text' | 'url';
|
|
5
|
+
interface TextFieldProps extends Omit<FieldComponentProps<HTMLInputElement>, 'type' | 'supportsStartAndEndSlots'>, BaseFieldVariantProps, Pick<BaseFieldProps, 'characterCountPosition'> {
|
|
6
|
+
type?: TextFieldType;
|
|
7
|
+
startSlot?: React.ReactElement | string | number;
|
|
8
|
+
endSlot?: React.ReactElement | string | number;
|
|
9
|
+
/**
|
|
10
|
+
* The maximum number of characters that the input field can accept.
|
|
11
|
+
* When this limit is reached, the input field will not accept any more characters.
|
|
12
|
+
* The counter element will turn red when the number of characters is within 10 of the maximum limit.
|
|
13
|
+
*/
|
|
14
|
+
maxLength?: number;
|
|
15
|
+
}
|
|
16
|
+
declare const TextField: React.ForwardRefExoticComponent<Omit<TextFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
17
|
+
export { TextField };
|
|
18
|
+
export type { TextFieldProps, TextFieldType };
|
|
@@ -1,2 +1,64 @@
|
|
|
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 baseField = require('../base-field/base-field.js');
|
|
8
|
+
var box = require('../box/box.js');
|
|
9
|
+
var textField_module = require('./text-field.module.css.js');
|
|
10
|
+
var useCallbackRef = require('use-callback-ref');
|
|
11
|
+
|
|
12
|
+
function _interopNamespace(e) {
|
|
13
|
+
if (e && e.__esModule) return e;
|
|
14
|
+
var n = Object.create(null);
|
|
15
|
+
if (e) {
|
|
16
|
+
Object.keys(e).forEach(function (k) {
|
|
17
|
+
if (k !== 'default') {
|
|
18
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return e[k]; }
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
n["default"] = e;
|
|
27
|
+
return Object.freeze(n);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
31
|
+
|
|
32
|
+
var TextField = React__namespace.forwardRef(function TextField(_a, ref) {
|
|
33
|
+
var _b = _a.variant, variant = _b === void 0 ? 'default' : _b, id = _a.id, label = _a.label, value = _a.value, auxiliaryLabel = _a.auxiliaryLabel, message = _a.message, tone = _a.tone, _c = _a.type, type = _c === void 0 ? 'text' : _c, maxWidth = _a.maxWidth, maxLength = _a.maxLength, hidden = _a.hidden, ariaDescribedBy = _a["aria-describedby"], startSlot = _a.startSlot, endSlot = _a.endSlot, originalOnChange = _a.onChange, _d = _a.characterCountPosition, characterCountPosition = _d === void 0 ? 'below' : _d, _e = _a.endSlotPosition, endSlotPosition = _e === void 0 ? 'bottom' : _e, props = tslib.__rest(_a, ["variant", "id", "label", "value", "auxiliaryLabel", "message", "tone", "type", "maxWidth", "maxLength", "hidden", 'aria-describedby', "startSlot", "endSlot", "onChange", "characterCountPosition", "endSlotPosition"]);
|
|
34
|
+
var internalRef = React__namespace.useRef(null);
|
|
35
|
+
var combinedRef = useCallbackRef.useMergeRefs([ref, internalRef]);
|
|
36
|
+
function handleClick(event) {
|
|
37
|
+
var _a;
|
|
38
|
+
if (event.currentTarget === combinedRef.current)
|
|
39
|
+
return;
|
|
40
|
+
(_a = internalRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
41
|
+
}
|
|
42
|
+
var displayEndSlot = endSlot &&
|
|
43
|
+
(variant === 'default' || (variant === 'bordered' && endSlotPosition === 'bottom'));
|
|
44
|
+
return (React__namespace.createElement(baseField.BaseField, { variant: variant, id: id, label: label, value: value, auxiliaryLabel: auxiliaryLabel, message: message, tone: tone, maxWidth: maxWidth, maxLength: maxLength, hidden: hidden, "aria-describedby": ariaDescribedBy, characterCountPosition: characterCountPosition, supportsStartAndEndSlots: true, endSlot: endSlot, endSlotPosition: variant === 'bordered' ? endSlotPosition : undefined }, function (_a) {
|
|
45
|
+
var onChange = _a.onChange, characterCountElement = _a.characterCountElement, extraProps = tslib.__rest(_a, ["onChange", "characterCountElement"]);
|
|
46
|
+
return (React__namespace.createElement(box.Box, { display: "flex", alignItems: "center", className: [
|
|
47
|
+
textField_module["default"].inputWrapper,
|
|
48
|
+
tone === 'error' ? textField_module["default"].error : null,
|
|
49
|
+
variant === 'bordered' ? textField_module["default"].bordered : null,
|
|
50
|
+
props.readOnly ? textField_module["default"].readOnly : null,
|
|
51
|
+
], onClick: handleClick },
|
|
52
|
+
startSlot ? (React__namespace.createElement(box.Box, { className: textField_module["default"].slot, display: "flex", marginRight: variant === 'bordered' ? 'xsmall' : '-xsmall', marginLeft: variant === 'bordered' ? '-xsmall' : 'xsmall' }, startSlot)) : null,
|
|
53
|
+
React__namespace.createElement("input", tslib.__assign({}, props, extraProps, { type: type, ref: combinedRef, maxLength: maxLength, onChange: function (event) {
|
|
54
|
+
originalOnChange === null || originalOnChange === void 0 ? void 0 : originalOnChange(event);
|
|
55
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
56
|
+
} })),
|
|
57
|
+
displayEndSlot || characterCountElement ? (React__namespace.createElement(box.Box, { className: textField_module["default"].slot, display: "flex", marginRight: variant === 'bordered' ? '-xsmall' : 'xsmall', marginLeft: variant === 'bordered' ? 'xsmall' : '-xsmall' },
|
|
58
|
+
characterCountElement,
|
|
59
|
+
displayEndSlot ? endSlot : null)) : null));
|
|
60
|
+
}));
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
exports.TextField = TextField;
|
|
2
64
|
//# sourceMappingURL=text-field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.js","sources":["../../src/text-field/text-field.tsx"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"text-field.js","sources":["../../src/text-field/text-field.tsx"],"sourcesContent":[null],"names":["React","__rest","useMergeRefs","BaseField","Box","styles","__assign"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBM,IAAA,SAAS,GAAGA,gBAAK,CAAC,UAAU,CAAmC,SAAS,SAAS,CACnF,EAmBC,EACD,GAAG,EAAA;AAnBC,IAAA,IAAA,EAAmB,GAAA,EAAA,CAAA,OAAA,EAAnB,OAAO,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,SAAS,GAAA,EAAA,EACnB,EAAE,GAAA,EAAA,CAAA,EAAA,EACF,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,EAAa,GAAA,EAAA,CAAA,IAAA,EAAb,IAAI,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,MAAM,GAAA,EAAA,EACb,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,MAAM,GAAA,EAAA,CAAA,MAAA,EACc,eAAe,GAAA,EAAA,C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GAAA,KAAA,CAAA,GAAhB,gBAAgB,CAAG,KAAK,CAAC,CAAA;AACzB,oBAAA,QAAQ,aAAR,QAAQ,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAR,QAAQ,CAAG,KAAK,CAAC,CAAA;AACrB,iBAAC,EACH,CAAA,CAAA;YACD,cAAc,IAAI,qBAAqB,IACpCN,gBAAA,CAAA,aAAA,CAACI,OAAG,EACA,EAAA,SAAS,EAAEC,2BAAM,CAAC,IAAI,EACtB,OAAO,EAAC,MAAM,EACd,WAAW,EAAE,OAAO,KAAK,UAAU,GAAG,SAAS,GAAG,QAAQ,EAC1D,UAAU,EAAE,OAAO,KAAK,UAAU,GAAG,QAAQ,GAAG,SAAS,EAAA;gBAExD,qBAAqB;AACrB,gBAAA,cAAc,GAAG,OAAO,GAAG,IAAI,CAC9B,IACN,IAAI,CACN,EACT;AAAA,KAAA,CACO,EACf;AACL,CAAC;;;;"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var modules_aaf25250 = {"inputWrapper":"_3aa2a591","readOnly":"_88dd4657","bordered":"f9ddac83","error":"_7b4ae67d","slot":"_92010b01"};
|
|
6
|
+
|
|
7
|
+
exports["default"] = modules_aaf25250;
|
|
2
8
|
//# sourceMappingURL=text-field.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"text-field.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/lib/text-link/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './text-link';
|
|
1
|
+
export * from './text-link';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { OpenInNewTab } from '../utils/common-types';
|
|
2
|
-
type TextLinkColors = 'default' | 'inherit';
|
|
3
|
-
type TextLinkProps = OpenInNewTab & {
|
|
4
|
-
color?: TextLinkColors;
|
|
5
|
-
underline?: boolean;
|
|
6
|
-
};
|
|
7
|
-
declare const TextLink: import("../utils/polymorphism").PolymorphicComponent<"a", TextLinkProps, "obfuscateClassName">;
|
|
8
|
-
export { TextLink };
|
|
9
|
-
export type { TextLinkProps };
|
|
1
|
+
import type { OpenInNewTab } from '../utils/common-types';
|
|
2
|
+
type TextLinkColors = 'default' | 'inherit';
|
|
3
|
+
type TextLinkProps = OpenInNewTab & {
|
|
4
|
+
color?: TextLinkColors;
|
|
5
|
+
underline?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const TextLink: import("../utils/polymorphism").PolymorphicComponent<"a", TextLinkProps, "obfuscateClassName">;
|
|
8
|
+
export { TextLink };
|
|
9
|
+
export type { TextLinkProps };
|
|
@@ -1,2 +1,42 @@
|
|
|
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 polymorphism = require('../utils/polymorphism.js');
|
|
9
|
+
var textLink_module = require('./text-link.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 TextLink = polymorphism.polymorphicComponent(function TextLink(_a, ref) {
|
|
32
|
+
var _b = _a.as, as = _b === void 0 ? 'a' : _b, _c = _a.openInNewTab, openInNewTab = _c === void 0 ? false : _c, exceptionallySetClassName = _a.exceptionallySetClassName, _d = _a.color, color = _d === void 0 ? 'default' : _d, _e = _a.underline, underline = _e === void 0 ? true : _e, props = tslib.__rest(_a, ["as", "openInNewTab", "exceptionallySetClassName", "color", "underline"]);
|
|
33
|
+
return (React__namespace.createElement(box.Box, tslib.__assign({}, props, { as: as, display: "inline", className: [
|
|
34
|
+
exceptionallySetClassName,
|
|
35
|
+
textLink_module["default"].container,
|
|
36
|
+
textLink_module["default"][color],
|
|
37
|
+
underline ? textLink_module["default"].underline : textLink_module["default"]['no-underline'],
|
|
38
|
+
], ref: ref, target: openInNewTab ? '_blank' : undefined, rel: openInNewTab ? 'noopener noreferrer' : undefined })));
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
exports.TextLink = TextLink;
|
|
2
42
|
//# sourceMappingURL=text-link.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-link.js","sources":["../../src/text-link/text-link.tsx"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"text-link.js","sources":["../../src/text-link/text-link.tsx"],"sourcesContent":[null],"names":["polymorphicComponent","__rest","React","Box","__assign","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaM,IAAA,QAAQ,GAAGA,iCAAoB,CAAqB,SAAS,QAAQ,CACvE,EAOC,EACD,GAAG,EAAA;AAPC,IAAA,IAAA,EAAQ,GAAA,EAAA,CAAA,EAAA,EAAR,EAAE,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,GAAG,GAAA,EAAA,EACR,EAAoB,GAAA,EAAA,CAAA,YAAA,EAApB,YAAY,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,KAAK,GAAA,EAAA,EACpB,yBAAyB,GAAA,EAAA,CAAA,yBAAA,EACzB,EAAiB,GAAA,EAAA,CAAA,KAAA,EAAjB,KAAK,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,SAAS,GAAA,EAAA,EACjB,EAAgB,GAAA,EAAA,CAAA,SAAA,EAAhB,SAAS,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,IAAI,GAAA,EAAA,EACb,KAAK,GAAAC,YAAA,CAAA,EAAA,EANZ,yEAOC,CADW,CAAA;AAIZ,IAAA,QACIC,gBAAA,CAAA,aAAA,CAACC,OAAG,EAAAC,cAAA,CAAA,EAAA,EACI,KAAK,EACT,EAAA,EAAE,EAAE,EAAE,EACN,OAAO,EAAC,QAAQ,EAChB,SAAS,EAAE;YACP,yBAAyB;AACzB,YAAAC,0BAAM,CAAC,SAAS;YAChBA,0BAAM,CAAC,KAAK,CAAC;AACb,YAAA,SAAS,GAAGA,0BAAM,CAAC,SAAS,GAAGA,0BAAM,CAAC,cAAc,CAAC;AACxD,SAAA,EACD,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,YAAY,GAAG,QAAQ,GAAG,SAAS,EAC3C,GAAG,EAAE,YAAY,GAAG,qBAAqB,GAAG,SAAS,EAAA,CAAA,CACvD,EACL;AACL,CAAC;;;;"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var modules_3d05deee = {"default":"_468ce45c","inherit":"_54f92a1e","underline":"cdc8b08c","no-underline":"_06995bac","container":"d77fcdc6"};
|
|
6
|
+
|
|
7
|
+
exports["default"] = modules_3d05deee;
|
|
2
8
|
//# sourceMappingURL=text-link.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-link.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"text-link.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/lib/toast/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { StaticToast } from './static-toast';
|
|
2
|
-
export { Toast, ToastsProvider, useToasts } from './use-toasts';
|
|
3
|
-
export type { StaticToastProps } from './static-toast';
|
|
4
|
-
export type { ToastProps, ToastsProviderProps } from './use-toasts';
|
|
1
|
+
export { StaticToast } from './static-toast';
|
|
2
|
+
export { Toast, ToastsProvider, useToasts } from './use-toasts';
|
|
3
|
+
export type { StaticToastProps } from './static-toast';
|
|
4
|
+
export type { ToastProps, ToastsProviderProps } from './use-toasts';
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type ToastActionObject = {
|
|
3
|
-
label: string;
|
|
4
|
-
onClick: () => void;
|
|
5
|
-
closeToast?: boolean;
|
|
6
|
-
};
|
|
7
|
-
type StaticToastProps = {
|
|
8
|
-
/**
|
|
9
|
-
* The message shown in the toast.
|
|
10
|
-
*/
|
|
11
|
-
message: NonNullable<React.ReactNode>;
|
|
12
|
-
/**
|
|
13
|
-
* An optional extra description that complements the main message shown in the toast.
|
|
14
|
-
*/
|
|
15
|
-
description?: React.ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* An icon to be shown in front of the message.
|
|
18
|
-
*/
|
|
19
|
-
icon?: React.ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* The action to call when the user clicks on the dismiss button. If omitted, the dismiss button
|
|
22
|
-
* does not appear.
|
|
23
|
-
*/
|
|
24
|
-
onDismiss?: () => void;
|
|
25
|
-
/**
|
|
26
|
-
* The label for the button that dismisses the toast.
|
|
27
|
-
*/
|
|
28
|
-
dismissLabel?: string;
|
|
29
|
-
/**
|
|
30
|
-
* What to render in the action slot. Usually a button or link.
|
|
31
|
-
*
|
|
32
|
-
* You can also pass an object that containst the action label, and a function that performs the
|
|
33
|
-
* action. This is used by the toast component to render a button for you.
|
|
34
|
-
*
|
|
35
|
-
* In general, you should prefer the action object most of the time. But it is possible to pass
|
|
36
|
-
* a React element instead, if you need more control over what to render. For instance, you may
|
|
37
|
-
* want to render a link instead of a button.
|
|
38
|
-
*
|
|
39
|
-
* Keep in mind, though, that the default button rendered uses `variant="tertiary"` and
|
|
40
|
-
* `size="small"`. In most cases you should stick to the variants `tertiary` or `primary`, which
|
|
41
|
-
* are the ones that look better in the toast's dark background. And in all cases you should use
|
|
42
|
-
* size `small`.
|
|
43
|
-
*/
|
|
44
|
-
action?: React.ReactElement | ToastActionObject;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* A toast that shows a message, and an optional action associated with it.
|
|
48
|
-
*
|
|
49
|
-
* This component is generally not meant to be used directly. Most of the time you'll want to use
|
|
50
|
-
* toasts generated via `useToasts` instead. However, this component is available in case you need
|
|
51
|
-
* to take control of rendering a toast under different circumstances than that of notification-like
|
|
52
|
-
* floating toasts.
|
|
53
|
-
*
|
|
54
|
-
* This component makes no assumptions outwardly about how it is positioned on the screen. That is,
|
|
55
|
-
* it will not be shown floating or fixed to the viewport edges, as toasts normally show up. It only
|
|
56
|
-
* provides the toast look and feel, but you are responsible for positioning it as you want.
|
|
57
|
-
*
|
|
58
|
-
* @see useToasts
|
|
59
|
-
*/
|
|
60
|
-
declare const StaticToast: React.ForwardRefExoticComponent<StaticToastProps & React.RefAttributes<HTMLDivElement>>;
|
|
61
|
-
declare function isActionObject(action: StaticToastProps['action']): action is ToastActionObject;
|
|
62
|
-
export { StaticToast, isActionObject };
|
|
63
|
-
export type { StaticToastProps };
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ToastActionObject = {
|
|
3
|
+
label: string;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
closeToast?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type StaticToastProps = {
|
|
8
|
+
/**
|
|
9
|
+
* The message shown in the toast.
|
|
10
|
+
*/
|
|
11
|
+
message: NonNullable<React.ReactNode>;
|
|
12
|
+
/**
|
|
13
|
+
* An optional extra description that complements the main message shown in the toast.
|
|
14
|
+
*/
|
|
15
|
+
description?: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* An icon to be shown in front of the message.
|
|
18
|
+
*/
|
|
19
|
+
icon?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* The action to call when the user clicks on the dismiss button. If omitted, the dismiss button
|
|
22
|
+
* does not appear.
|
|
23
|
+
*/
|
|
24
|
+
onDismiss?: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* The label for the button that dismisses the toast.
|
|
27
|
+
*/
|
|
28
|
+
dismissLabel?: string;
|
|
29
|
+
/**
|
|
30
|
+
* What to render in the action slot. Usually a button or link.
|
|
31
|
+
*
|
|
32
|
+
* You can also pass an object that containst the action label, and a function that performs the
|
|
33
|
+
* action. This is used by the toast component to render a button for you.
|
|
34
|
+
*
|
|
35
|
+
* In general, you should prefer the action object most of the time. But it is possible to pass
|
|
36
|
+
* a React element instead, if you need more control over what to render. For instance, you may
|
|
37
|
+
* want to render a link instead of a button.
|
|
38
|
+
*
|
|
39
|
+
* Keep in mind, though, that the default button rendered uses `variant="tertiary"` and
|
|
40
|
+
* `size="small"`. In most cases you should stick to the variants `tertiary` or `primary`, which
|
|
41
|
+
* are the ones that look better in the toast's dark background. And in all cases you should use
|
|
42
|
+
* size `small`.
|
|
43
|
+
*/
|
|
44
|
+
action?: React.ReactElement | ToastActionObject;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* A toast that shows a message, and an optional action associated with it.
|
|
48
|
+
*
|
|
49
|
+
* This component is generally not meant to be used directly. Most of the time you'll want to use
|
|
50
|
+
* toasts generated via `useToasts` instead. However, this component is available in case you need
|
|
51
|
+
* to take control of rendering a toast under different circumstances than that of notification-like
|
|
52
|
+
* floating toasts.
|
|
53
|
+
*
|
|
54
|
+
* This component makes no assumptions outwardly about how it is positioned on the screen. That is,
|
|
55
|
+
* it will not be shown floating or fixed to the viewport edges, as toasts normally show up. It only
|
|
56
|
+
* provides the toast look and feel, but you are responsible for positioning it as you want.
|
|
57
|
+
*
|
|
58
|
+
* @see useToasts
|
|
59
|
+
*/
|
|
60
|
+
declare const StaticToast: React.ForwardRefExoticComponent<StaticToastProps & React.RefAttributes<HTMLDivElement>>;
|
|
61
|
+
declare function isActionObject(action: StaticToastProps['action']): action is ToastActionObject;
|
|
62
|
+
export { StaticToast, isActionObject };
|
|
63
|
+
export type { StaticToastProps };
|