@doist/reactist 9.2.0-beta.8 → 10.0.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -2
- package/dist/reactist.cjs.development.js +1499 -866
- 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/_virtual/_rollupPluginBabelHelpers.js +34 -20
- package/es/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/es/components/color-picker/color-picker.js +1 -1
- package/es/components/color-picker/color-picker.js.map +1 -1
- package/es/components/{button/button.js → deprecated-button/deprecated-button.js} +9 -4
- package/es/components/deprecated-button/deprecated-button.js.map +1 -0
- package/es/components/{button → deprecated-button}/index.js +1 -1
- package/es/components/{button → deprecated-button}/index.js.map +0 -0
- package/es/components/{loading/loading.js → deprecated-loading/deprecated-loading.js} +3 -1
- package/es/components/deprecated-loading/deprecated-loading.js.map +1 -0
- package/es/components/{modal/modal.js → deprecated-modal/deprecated-modal.js} +9 -2
- package/es/components/deprecated-modal/deprecated-modal.js.map +1 -0
- package/es/components/{modal → deprecated-modal}/index.js +1 -1
- package/es/components/deprecated-modal/index.js.map +1 -0
- package/es/components/dropdown/dropdown.js +8 -4
- package/es/components/dropdown/dropdown.js.map +1 -1
- package/es/components/error-message/error-message.js +4 -2
- package/es/components/error-message/error-message.js.map +1 -1
- package/es/components/icon/icon.js.map +1 -1
- package/es/components/key-capturer/key-capturer.js.map +1 -1
- package/es/components/keyboard-shortcut/keyboard-shortcut.js +6 -3
- package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/es/components/menu/menu.js +40 -27
- package/es/components/menu/menu.js.map +1 -1
- package/es/components/notification/notification.js +3 -1
- package/es/components/notification/notification.js.map +1 -1
- package/es/components/popover/popover.js.map +1 -1
- package/es/components/popover/positioning-utils.js.map +1 -1
- package/es/components/range-input/range-input.js +1 -1
- package/es/components/range-input/range-input.js.map +1 -1
- package/es/components/select/select.js +4 -2
- package/es/components/select/select.js.map +1 -1
- package/es/components/time/time-utils.js.map +1 -1
- package/es/components/time/time.js.map +1 -1
- package/es/components/tooltip/tooltip.js +3 -1
- package/es/components/tooltip/tooltip.js.map +1 -1
- package/es/hooks/use-previous/use-previous.js +26 -0
- package/es/hooks/use-previous/use-previous.js.map +1 -0
- package/es/index.js +11 -6
- package/es/index.js.map +1 -1
- package/es/new-components/base-button/base-button.js +72 -0
- package/es/new-components/base-button/base-button.js.map +1 -0
- package/es/new-components/base-button/base-button.module.css.js +4 -0
- package/es/new-components/base-button/base-button.module.css.js.map +1 -0
- package/es/new-components/base-field/base-field.js +29 -29
- package/es/new-components/base-field/base-field.js.map +1 -1
- package/es/new-components/base-field/base-field.module.css.js +1 -1
- package/es/new-components/box/box.js +29 -10
- package/es/new-components/box/box.js.map +1 -1
- package/es/new-components/box/box.module.css.js +1 -1
- package/es/new-components/box/margin.module.css.js +4 -0
- package/es/new-components/box/margin.module.css.js.map +1 -0
- package/es/new-components/box/padding.module.css.js +4 -0
- package/es/new-components/box/padding.module.css.js.map +1 -0
- package/es/new-components/button/button.js +41 -0
- package/es/new-components/button/button.js.map +1 -0
- package/es/new-components/button-link/button-link.js +26 -14
- package/es/new-components/button-link/button-link.js.map +1 -1
- package/es/new-components/checkbox-field/checkbox-field.js +46 -23
- package/es/new-components/checkbox-field/checkbox-field.js.map +1 -1
- package/es/new-components/checkbox-field/checkbox-field.module.css.js +1 -1
- package/es/new-components/checkbox-field/checkbox-icon.js +2 -1
- package/es/new-components/checkbox-field/checkbox-icon.js.map +1 -1
- package/es/new-components/columns/columns.js +28 -14
- package/es/new-components/columns/columns.js.map +1 -1
- package/es/new-components/columns/columns.module.css.js +1 -1
- package/es/new-components/divider/divider.js +6 -4
- package/es/new-components/divider/divider.js.map +1 -1
- package/es/new-components/divider/divider.module.css.js +1 -1
- package/es/new-components/heading/heading.js +10 -3
- package/es/new-components/heading/heading.js.map +1 -1
- package/es/new-components/heading/heading.module.css.js +1 -1
- package/es/new-components/hidden/hidden.js +55 -0
- package/es/new-components/hidden/hidden.js.map +1 -0
- package/es/new-components/hidden/hidden.module.css.js +4 -0
- package/es/new-components/hidden/hidden.module.css.js.map +1 -0
- package/es/new-components/hidden-visually/hidden-visually.js +22 -0
- package/es/new-components/hidden-visually/hidden-visually.js.map +1 -0
- package/es/new-components/hidden-visually/hidden-visually.module.css.js +4 -0
- package/es/new-components/hidden-visually/hidden-visually.module.css.js.map +1 -0
- package/es/new-components/icons/alert-icon.js +2 -1
- package/es/new-components/icons/alert-icon.js.map +1 -1
- package/es/new-components/inline/inline.js +10 -8
- package/es/new-components/inline/inline.js.map +1 -1
- package/es/new-components/loading/loading.js +34 -0
- package/es/new-components/loading/loading.js.map +1 -0
- package/es/new-components/modal/modal.js +206 -0
- package/es/new-components/modal/modal.js.map +1 -0
- package/es/new-components/modal/modal.module.css.js +4 -0
- package/es/new-components/modal/modal.module.css.js.map +1 -0
- package/es/new-components/password-field/password-field.js +8 -4
- package/es/new-components/password-field/password-field.js.map +1 -1
- package/es/new-components/responsive-props.js +21 -11
- package/es/new-components/responsive-props.js.map +1 -1
- package/es/new-components/select-field/select-field.js +13 -6
- package/es/new-components/select-field/select-field.js.map +1 -1
- package/es/new-components/select-field/select-field.module.css.js +1 -1
- package/es/new-components/spinner/spinner.js +26 -0
- package/es/new-components/spinner/spinner.js.map +1 -0
- package/es/new-components/spinner/spinner.module.css.js +4 -0
- package/es/new-components/spinner/spinner.module.css.js.map +1 -0
- package/es/new-components/stack/stack.js +23 -12
- package/es/new-components/stack/stack.js.map +1 -1
- package/es/new-components/switch-field/switch-field.js +48 -28
- package/es/new-components/switch-field/switch-field.js.map +1 -1
- package/es/new-components/switch-field/switch-field.module.css.js +1 -1
- package/es/new-components/tabs/tabs.js +147 -0
- package/es/new-components/tabs/tabs.js.map +1 -0
- package/es/new-components/tabs/tabs.module.css.js +4 -0
- package/es/new-components/tabs/tabs.module.css.js.map +1 -0
- package/es/new-components/text/text.js +16 -10
- package/es/new-components/text/text.js.map +1 -1
- package/es/new-components/text/text.module.css.js +1 -1
- package/es/new-components/text-area/text-area.js +3 -1
- package/es/new-components/text-area/text-area.js.map +1 -1
- package/es/new-components/text-area/text-area.module.css.js +1 -1
- package/es/new-components/text-field/text-field.js +5 -2
- package/es/new-components/text-field/text-field.js.map +1 -1
- package/es/new-components/text-field/text-field.module.css.js +1 -1
- package/es/new-components/text-link/text-link.js +9 -7
- package/es/new-components/text-link/text-link.js.map +1 -1
- package/es/utils/polymorphism.js +17 -0
- package/es/utils/polymorphism.js.map +1 -0
- package/lib/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/lib/components/color-picker/color-picker.js +1 -1
- package/lib/components/color-picker/color-picker.js.map +1 -1
- package/lib/components/{button/button.d.ts → deprecated-button/deprecated-button.d.ts} +7 -1
- package/lib/components/deprecated-button/deprecated-button.js +2 -0
- package/lib/components/deprecated-button/deprecated-button.js.map +1 -0
- package/lib/components/{button/button.test.d.ts → deprecated-button/deprecated-button.test.d.ts} +0 -0
- package/lib/components/deprecated-button/index.d.ts +4 -0
- package/lib/components/{loading → deprecated-button}/index.js +1 -1
- package/lib/components/{button → deprecated-button}/index.js.map +0 -0
- package/lib/components/{loading/loading.d.ts → deprecated-loading/deprecated-loading.d.ts} +2 -1
- package/lib/components/{loading/loading.js → deprecated-loading/deprecated-loading.js} +1 -1
- package/lib/components/deprecated-loading/deprecated-loading.js.map +1 -0
- package/lib/components/{loading/Loading.test.d.ts → deprecated-loading/deprecated-loading.test.d.ts} +0 -0
- package/lib/components/deprecated-loading/index.d.ts +1 -0
- package/lib/components/{modal/modal.d.ts → deprecated-modal/deprecated-modal.d.ts} +6 -1
- package/lib/components/{modal/modal.js → deprecated-modal/deprecated-modal.js} +2 -2
- package/lib/components/deprecated-modal/deprecated-modal.js.map +1 -0
- package/lib/components/{modal/modal.test.d.ts → deprecated-modal/deprecated-modal.test.d.ts} +0 -0
- package/lib/components/{modal → deprecated-modal}/index.d.ts +3 -3
- package/lib/components/deprecated-modal/index.js +2 -0
- package/lib/components/deprecated-modal/index.js.map +1 -0
- package/lib/components/dropdown/dropdown.js +1 -1
- package/lib/components/dropdown/dropdown.js.map +1 -1
- package/lib/components/error-message/error-message.js +1 -1
- package/lib/components/error-message/error-message.js.map +1 -1
- package/lib/components/keyboard-shortcut/keyboard-shortcut.js +1 -1
- package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/lib/components/menu/index.d.ts +1 -1
- package/lib/components/menu/menu.d.ts +8 -10
- package/lib/components/menu/menu.js +1 -1
- package/lib/components/menu/menu.js.map +1 -1
- package/lib/components/notification/notification.js +1 -1
- package/lib/components/notification/notification.js.map +1 -1
- package/lib/components/range-input/range-input.js +1 -1
- package/lib/components/range-input/range-input.js.map +1 -1
- package/lib/components/select/select.js +1 -1
- package/lib/components/select/select.js.map +1 -1
- package/lib/components/tooltip/index.d.ts +1 -1
- package/lib/components/tooltip/tooltip.js +1 -1
- package/lib/components/tooltip/tooltip.js.map +1 -1
- package/lib/hooks/use-previous/index.d.ts +1 -0
- package/lib/hooks/use-previous/use-previous.d.ts +15 -0
- package/lib/hooks/use-previous/use-previous.js +2 -0
- package/lib/hooks/use-previous/use-previous.js.map +1 -0
- package/lib/index.d.ts +10 -5
- package/lib/index.js +1 -1
- package/lib/new-components/base-button/base-button.d.ts +65 -0
- package/lib/new-components/base-button/base-button.js +2 -0
- package/lib/new-components/base-button/base-button.js.map +1 -0
- package/lib/new-components/base-button/base-button.module.css.js +2 -0
- package/lib/new-components/base-button/base-button.module.css.js.map +1 -0
- package/lib/new-components/base-button/index.d.ts +1 -0
- package/lib/new-components/base-field/base-field.d.ts +53 -13
- package/lib/new-components/base-field/base-field.js +1 -1
- package/lib/new-components/base-field/base-field.js.map +1 -1
- package/lib/new-components/base-field/base-field.module.css.js +1 -1
- package/lib/new-components/box/box.d.ts +24 -13
- package/lib/new-components/box/box.js +1 -1
- package/lib/new-components/box/box.js.map +1 -1
- package/lib/new-components/box/box.module.css.js +1 -1
- package/lib/{components/tabs/tabs.test.d.ts → new-components/box/box.test.d.ts} +0 -0
- package/lib/new-components/box/margin.module.css.js +2 -0
- package/lib/new-components/box/margin.module.css.js.map +1 -0
- package/lib/new-components/box/padding.module.css.js +2 -0
- package/lib/new-components/box/padding.module.css.js.map +1 -0
- package/lib/new-components/button/button.d.ts +48 -0
- package/lib/new-components/button/button.js +2 -0
- package/lib/new-components/button/button.js.map +1 -0
- package/lib/new-components/button/button.test.d.ts +1 -0
- package/lib/new-components/button/index.d.ts +1 -0
- package/lib/new-components/button-link/button-link-story-wrapper.d.ts +7 -0
- package/lib/new-components/button-link/button-link.d.ts +14 -8
- package/lib/new-components/button-link/button-link.js +1 -1
- package/lib/new-components/button-link/button-link.js.map +1 -1
- package/lib/new-components/button-link/button-link.test.d.ts +1 -0
- package/lib/new-components/checkbox-field/checkbox-field.d.ts +3 -3
- package/lib/new-components/checkbox-field/checkbox-field.js +1 -1
- package/lib/new-components/checkbox-field/checkbox-field.js.map +1 -1
- package/lib/new-components/checkbox-field/checkbox-field.module.css.js +1 -1
- package/lib/new-components/checkbox-field/checkbox-field.test.d.ts +1 -0
- package/lib/new-components/checkbox-field/checkbox-icon.js +1 -1
- package/lib/new-components/checkbox-field/checkbox-icon.js.map +1 -1
- package/lib/new-components/columns/columns.d.ts +4 -5
- package/lib/new-components/columns/columns.js +1 -1
- package/lib/new-components/columns/columns.js.map +1 -1
- package/lib/new-components/columns/columns.module.css.js +1 -1
- package/lib/new-components/columns/columns.test.d.ts +1 -0
- package/lib/new-components/common-types.d.ts +2 -0
- package/lib/new-components/divider/divider.d.ts +2 -2
- package/lib/new-components/divider/divider.js +1 -1
- package/lib/new-components/divider/divider.js.map +1 -1
- package/lib/new-components/divider/divider.module.css.js +1 -1
- package/lib/new-components/heading/heading.d.ts +101 -2
- package/lib/new-components/heading/heading.js +1 -1
- package/lib/new-components/heading/heading.js.map +1 -1
- package/lib/new-components/heading/heading.module.css.js +1 -1
- package/lib/new-components/heading/heading.test.d.ts +1 -0
- package/lib/new-components/hidden/hidden.d.ts +49 -0
- package/lib/new-components/hidden/hidden.js +2 -0
- package/lib/new-components/hidden/hidden.js.map +1 -0
- package/lib/new-components/hidden/hidden.module.css.js +2 -0
- package/lib/new-components/hidden/hidden.module.css.js.map +1 -0
- package/lib/new-components/hidden/hidden.test.d.ts +1 -0
- package/lib/new-components/hidden/index.d.ts +1 -0
- package/lib/new-components/hidden-visually/hidden-visually.d.ts +11 -0
- package/lib/new-components/hidden-visually/hidden-visually.js +2 -0
- package/lib/new-components/hidden-visually/hidden-visually.js.map +1 -0
- package/lib/new-components/hidden-visually/hidden-visually.module.css.js +2 -0
- package/lib/new-components/hidden-visually/hidden-visually.module.css.js.map +1 -0
- package/lib/new-components/hidden-visually/hidden-visually.test.d.ts +1 -0
- package/lib/new-components/hidden-visually/index.d.ts +1 -0
- package/lib/new-components/icons/alert-icon.js +1 -1
- package/lib/new-components/icons/alert-icon.js.map +1 -1
- package/lib/new-components/inline/inline.d.ts +1 -2
- package/lib/new-components/inline/inline.js +1 -1
- package/lib/new-components/inline/inline.js.map +1 -1
- package/lib/new-components/inline/inline.test.d.ts +1 -0
- package/lib/new-components/loading/index.d.ts +1 -0
- package/lib/new-components/loading/loading.d.ts +26 -0
- package/lib/new-components/loading/loading.js +2 -0
- package/lib/new-components/loading/loading.js.map +1 -0
- package/lib/new-components/loading/loading.test.d.ts +1 -0
- package/lib/new-components/modal/index.d.ts +1 -0
- package/lib/new-components/modal/modal-stories-components.d.ts +35 -0
- package/lib/new-components/modal/modal.d.ts +151 -0
- package/lib/new-components/modal/modal.js +2 -0
- package/lib/new-components/modal/modal.js.map +1 -0
- package/lib/new-components/modal/modal.module.css.js +2 -0
- package/lib/new-components/modal/modal.module.css.js.map +1 -0
- package/lib/new-components/modal/modal.test.d.ts +1 -0
- package/lib/new-components/password-field/password-field.d.ts +2 -2
- package/lib/new-components/password-field/password-field.js +1 -1
- package/lib/new-components/password-field/password-field.js.map +1 -1
- package/lib/new-components/password-field/password-field.test.d.ts +1 -0
- package/lib/new-components/responsive-props.d.ts +12 -14
- package/lib/new-components/responsive-props.js +1 -1
- package/lib/new-components/responsive-props.js.map +1 -1
- package/lib/new-components/select-field/select-field.d.ts +4 -4
- package/lib/new-components/select-field/select-field.js +1 -1
- package/lib/new-components/select-field/select-field.js.map +1 -1
- package/lib/new-components/select-field/select-field.module.css.js +1 -1
- package/lib/new-components/select-field/select-field.test.d.ts +1 -0
- package/lib/new-components/spinner/index.d.ts +1 -0
- package/lib/new-components/spinner/spinner.d.ts +5 -0
- package/lib/new-components/spinner/spinner.js +2 -0
- package/lib/new-components/spinner/spinner.js.map +1 -0
- package/lib/new-components/spinner/spinner.module.css.js +2 -0
- package/lib/new-components/spinner/spinner.module.css.js.map +1 -0
- package/lib/new-components/stack/stack.d.ts +8 -5
- package/lib/new-components/stack/stack.js +1 -1
- package/lib/new-components/stack/stack.js.map +1 -1
- package/lib/new-components/stack/stack.test.d.ts +1 -0
- package/lib/new-components/switch-field/switch-field.d.ts +4 -4
- package/lib/new-components/switch-field/switch-field.js +1 -1
- package/lib/new-components/switch-field/switch-field.js.map +1 -1
- package/lib/new-components/switch-field/switch-field.module.css.js +1 -1
- package/lib/new-components/switch-field/switch-field.test.d.ts +1 -0
- package/lib/new-components/tabs/index.d.ts +1 -0
- package/lib/new-components/tabs/tabs.d.ts +92 -0
- package/lib/new-components/tabs/tabs.js +2 -0
- package/lib/new-components/tabs/tabs.js.map +1 -0
- package/lib/new-components/tabs/tabs.module.css.js +2 -0
- package/lib/new-components/tabs/tabs.module.css.js.map +1 -0
- package/lib/new-components/tabs/tabs.test.d.ts +1 -0
- package/lib/new-components/test-helpers.d.ts +9 -0
- package/lib/new-components/text/text.d.ts +38 -5
- package/lib/new-components/text/text.js +1 -1
- package/lib/new-components/text/text.js.map +1 -1
- package/lib/new-components/text/text.module.css.js +1 -1
- package/lib/new-components/text/text.test.d.ts +1 -0
- package/lib/new-components/text-area/text-area.d.ts +2 -2
- package/lib/new-components/text-area/text-area.js +1 -1
- package/lib/new-components/text-area/text-area.js.map +1 -1
- package/lib/new-components/text-area/text-area.module.css.js +1 -1
- package/lib/new-components/text-field/text-field.d.ts +7 -4
- package/lib/new-components/text-field/text-field.js +1 -1
- package/lib/new-components/text-field/text-field.js.map +1 -1
- package/lib/new-components/text-field/text-field.module.css.js +1 -1
- package/lib/new-components/text-field/text-field.test.d.ts +1 -0
- package/lib/new-components/text-link/text-link.d.ts +1 -2
- package/lib/new-components/text-link/text-link.js +1 -1
- package/lib/new-components/text-link/text-link.js.map +1 -1
- package/lib/utils/polymorphism.d.ts +151 -0
- package/lib/utils/polymorphism.js +2 -0
- package/lib/utils/polymorphism.js.map +1 -0
- package/package.json +27 -23
- package/styles/alert.css +4 -2
- package/styles/base-button.css +6 -0
- package/styles/base-button.module.css.css +1 -0
- package/styles/base-field.css +7 -3
- package/styles/base-field.module.css.css +1 -1
- package/styles/box.css +3 -0
- package/styles/box.module.css.css +1 -1
- package/styles/checkbox-field.css +6 -2
- package/styles/checkbox-field.module.css.css +1 -1
- package/styles/color-picker.css +1 -1
- package/styles/columns.css +4 -2
- package/styles/columns.module.css.css +1 -1
- package/styles/deprecated-button.css +2 -0
- package/styles/deprecated-loading.css +1 -0
- package/styles/deprecated-modal.css +1 -0
- package/styles/divider.css +4 -2
- package/styles/divider.module.css.css +1 -1
- package/styles/dropdown.css +1 -1
- package/styles/heading.css +4 -2
- package/styles/heading.module.css.css +1 -1
- package/styles/hidden-visually.css +4 -0
- package/styles/hidden-visually.module.css.css +1 -0
- package/styles/hidden.css +4 -0
- package/styles/hidden.module.css.css +1 -0
- package/styles/inline.css +3 -1
- package/styles/loading.css +4 -1
- package/styles/margin.module.css.css +1 -0
- package/styles/menu.css +1 -1
- package/styles/modal.css +10 -1
- package/styles/modal.module.css.css +1 -0
- package/styles/notice.css +4 -2
- package/styles/padding.module.css.css +1 -0
- package/styles/password-field.css +8 -4
- package/styles/reactist.css +24 -19
- package/styles/select-field.css +8 -4
- package/styles/select-field.module.css.css +1 -1
- package/styles/spinner.module.css.css +1 -0
- package/styles/stack.css +4 -2
- package/styles/switch-field.css +9 -4
- package/styles/switch-field.module.css.css +1 -1
- package/styles/tabs.css +5 -1
- package/styles/tabs.module.css.css +1 -0
- package/styles/text-area.css +8 -4
- package/styles/text-area.module.css.css +1 -1
- package/styles/text-field.css +8 -4
- package/styles/text-field.module.css.css +1 -1
- package/styles/text-link.css +3 -1
- package/styles/text.css +4 -2
- package/styles/text.module.css.css +1 -1
- package/styles/tip.css +1 -1
- package/CHANGELOG.md +0 -496
- package/es/components/button/button.js.map +0 -1
- package/es/components/loading/index.js +0 -6
- package/es/components/loading/index.js.map +0 -1
- package/es/components/loading/loading.js.map +0 -1
- package/es/components/menu/type-helpers.js +0 -9
- package/es/components/menu/type-helpers.js.map +0 -1
- package/es/components/modal/index.js.map +0 -1
- package/es/components/modal/modal.js.map +0 -1
- package/es/components/tabs/tabs.js +0 -123
- package/es/components/tabs/tabs.js.map +0 -1
- package/es/new-components/button-link/button-link.module.css.js +0 -4
- package/es/new-components/button-link/button-link.module.css.js.map +0 -1
- package/es/new-components/loading-spinner/loading-spinner.js +0 -37
- package/es/new-components/loading-spinner/loading-spinner.js.map +0 -1
- package/es/new-components/loading-spinner/loading-spinner.module.css.js +0 -4
- package/es/new-components/loading-spinner/loading-spinner.module.css.js.map +0 -1
- package/es/new-components/type-helpers.js +0 -10
- package/es/new-components/type-helpers.js.map +0 -1
- package/lib/components/button/button.js +0 -2
- package/lib/components/button/button.js.map +0 -1
- package/lib/components/button/index.d.ts +0 -4
- package/lib/components/button/index.js +0 -2
- package/lib/components/loading/index.d.ts +0 -2
- package/lib/components/loading/index.js.map +0 -1
- package/lib/components/loading/loading.js.map +0 -1
- package/lib/components/menu/type-helpers.d.ts +0 -25
- package/lib/components/menu/type-helpers.js +0 -2
- package/lib/components/menu/type-helpers.js.map +0 -1
- package/lib/components/modal/index.js +0 -2
- package/lib/components/modal/index.js.map +0 -1
- package/lib/components/modal/modal.js.map +0 -1
- package/lib/components/tabs/index.d.ts +0 -1
- package/lib/components/tabs/tabs.d.ts +0 -33
- package/lib/components/tabs/tabs.js +0 -2
- package/lib/components/tabs/tabs.js.map +0 -1
- package/lib/new-components/button-link/button-link.module.css.js +0 -2
- package/lib/new-components/button-link/button-link.module.css.js.map +0 -1
- package/lib/new-components/loading-spinner/index.d.ts +0 -1
- package/lib/new-components/loading-spinner/loading-spinner.d.ts +0 -8
- package/lib/new-components/loading-spinner/loading-spinner.js +0 -2
- package/lib/new-components/loading-spinner/loading-spinner.js.map +0 -1
- package/lib/new-components/loading-spinner/loading-spinner.module.css.js +0 -2
- package/lib/new-components/loading-spinner/loading-spinner.module.css.js.map +0 -1
- package/lib/new-components/type-helpers.d.ts +0 -26
- package/lib/new-components/type-helpers.js +0 -2
- package/lib/new-components/type-helpers.js.map +0 -1
- package/styles/button-link.css +0 -2
- package/styles/button-link.module.css.css +0 -1
- package/styles/button.css +0 -2
- package/styles/loading-spinner.module.css.css +0 -1
package/CHANGELOG.md
DELETED
|
@@ -1,496 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
Reactist follows [semantic versioning](https://semver.org/) and doesn't introduce breaking changes (API-wise) in minor or patch releases. However, the appearance of a component might change in a minor or patch release so keep an eye on redesigns and make sure your app still looks and feels like you expect it.
|
|
4
|
-
|
|
5
|
-
## v9.2.0-beta.8
|
|
6
|
-
|
|
7
|
-
- Fix `Columns` styles, broken by the changes to `Stack` styling. This release now removes the interdependency of `Column's styles relying on `Stack` styles.
|
|
8
|
-
|
|
9
|
-
## v9.2.0-beta.7
|
|
10
|
-
|
|
11
|
-
Various fixes to the new experimental components
|
|
12
|
-
|
|
13
|
-
- Adds a right padding to the `SelectField` to make sure the chevron never appears on top of the `select` content.
|
|
14
|
-
- Use for the checked `CheckboxField` the same colour variable we use for the `SwitchField`.
|
|
15
|
-
- Add a wrapper `div` around what `Inline` renders, to avoid conflicts with margin applied from the outside by `Stack` (when `Inline` is nested in `Stack`).
|
|
16
|
-
- Simplify the CSS for `Stack` leveraging the `:not(:first-child)` selector.
|
|
17
|
-
- Add one more story to each of `Stack` and `Inline` to showcase that these new changes did not break their expected behaviour.
|
|
18
|
-
|
|
19
|
-
## v9.2.0-beta.6
|
|
20
|
-
|
|
21
|
-
Various fixes to the new experimental components
|
|
22
|
-
|
|
23
|
-
- Add explicit link styles to `TextLink`
|
|
24
|
-
- `SwitchField` now properly animates the handle moving left or right.
|
|
25
|
-
- Style fixes to the `PasswordField`.
|
|
26
|
-
- Added ref forwarding to `TextField`, `PasswordField` and `Heading`.
|
|
27
|
-
|
|
28
|
-
## v9.2.0-beta.5
|
|
29
|
-
|
|
30
|
-
- Change Stack and Inline elements to not generate one container element per child element.
|
|
31
|
-
- Fix ButtonLink styling
|
|
32
|
-
- Adds a new `display="inlineFlex"` value to the `display` property of `Box`. This makes the `Box` use `display: inline-flex`.
|
|
33
|
-
|
|
34
|
-
## v9.2.0-beta.4
|
|
35
|
-
|
|
36
|
-
Various fixes to the new experimental components
|
|
37
|
-
|
|
38
|
-
- The `SelectField` now has its native appearance reset (i.e. `appearance: none`).
|
|
39
|
-
- Fixed a typo in an internal css variable in the `SelectField` that made it not have the proper height.
|
|
40
|
-
- Text in `Alert` and `Notice` is now properly aligned vertically with the icon.
|
|
41
|
-
- Fixed some css module classes that were incorrect in the JS code.
|
|
42
|
-
- `Alert` colours did not have the transparency properly set.
|
|
43
|
-
- The `SwitchField` now has a new dedicated css variable for theming its background when checked.
|
|
44
|
-
|
|
45
|
-
## v9.2.0-beta.3
|
|
46
|
-
|
|
47
|
-
- [Fix] `Text` component was not receiving its ref correctly
|
|
48
|
-
|
|
49
|
-
## v9.2.0-beta.2
|
|
50
|
-
|
|
51
|
-
- [Feature] New components `Alert`, `LoadingSpinner`, `Notice`, `Heading`, `Text`, `ButtonLink`, `TextLink`, `CheckboxField`, `PasswordField`, `SelectField`, `SwitchField`, `TextArea`, `TextField`.
|
|
52
|
-
- [Feature] New prop `tone` for component `Heading` (just like that for `Text`).
|
|
53
|
-
- [Feature] New prop `position` for component `Box`.
|
|
54
|
-
- [Feature] New props `flexShrink` and `flexGrow` for component `Box`.
|
|
55
|
-
- [Feature] New props `border` and `borderRadius` for component `Box`.
|
|
56
|
-
- [Feature] New `minWidth={0}` in component `Box`.
|
|
57
|
-
- [Feature] `Text` now supports receiving a `ref`.
|
|
58
|
-
- [Fix] Changed `Box` value for prop `background`. Former value `shade` is now called `aside`.
|
|
59
|
-
- [Fix] `Column` with `width="content"` did not shrink entirely to zero if empty.
|
|
60
|
-
- [Fix] Other fixes to columns so that it did not expand more than expected, so it allows truncated text to truncate.
|
|
61
|
-
- [Fix] Correct font sizes for the various levels of `Heading`.
|
|
62
|
-
- [Fix] `Stack` and `Inline` now generate `span` instead of `div` elements if the html element they use for the container does not allow to contain `div` elements.
|
|
63
|
-
|
|
64
|
-
## 9.1.2
|
|
65
|
-
|
|
66
|
-
- [Fix] Call a MenuItem component's onClick handler if provided; ignore the select action if event.defaultPrevented.
|
|
67
|
-
|
|
68
|
-
## v9.2.0-beta.1
|
|
69
|
-
|
|
70
|
-
- [Feature] Add `xxlarge` option to various `padding` and `space` props for `Box`, `Columns`, `Inline`, and `Stack` components
|
|
71
|
-
|
|
72
|
-
## v9.2.0-beta
|
|
73
|
-
|
|
74
|
-
- [Feature] Add `largest` size increase support for `Heading` component
|
|
75
|
-
- [Feature] Add `lineClamp` for text truncation to `Heading` and `Text` components
|
|
76
|
-
- [Fix] Export the `Column` component in the main entry point
|
|
77
|
-
- [Fix] Add missing colour variables
|
|
78
|
-
- [Docs] Add Storybook demos for `Heading`, `Text`, and colour swatches
|
|
79
|
-
|
|
80
|
-
## v9.1.0-beta.2
|
|
81
|
-
|
|
82
|
-
- [Fix] Move patch-package to dependencies to allow it to run (on nothing since we're patching a dev-dependency) after being installed as a package.
|
|
83
|
-
- [Fix] Prevent emotion's `css` prop from polluting the exported type definitions
|
|
84
|
-
|
|
85
|
-
## v9.1.0-beta.1
|
|
86
|
-
|
|
87
|
-
- [Fix] The previous beta release had an issue where all components' stylesheets were being treated as CSS modules. This will now build with the correct class name selectors again.
|
|
88
|
-
|
|
89
|
-
## v9.1.0-beta
|
|
90
|
-
|
|
91
|
-
- [Feature] A set of base design system components have been added: `Box`, `Columns`, `Divider`, `Heading`, `Inline`, `Stack`, and `Text`. Since we're still experimenting with their API, they will be packaged under beta releases until they become more concrete.
|
|
92
|
-
|
|
93
|
-
## 9.1.1
|
|
94
|
-
|
|
95
|
-
- [Fix] Prevent `Loading` component from spinning off-centre
|
|
96
|
-
|
|
97
|
-
## 9.1.0
|
|
98
|
-
|
|
99
|
-
- [Feature] Adds support for `aria-label` to the `Loading` component
|
|
100
|
-
- [Docs] This also fixes our gh-pages-hosted Storybook to load the proper stylesheets again
|
|
101
|
-
|
|
102
|
-
## 9.0.0
|
|
103
|
-
|
|
104
|
-
- [Build] The project now requires node v14.5.5+ and npm v6.14.11+ to install and run.
|
|
105
|
-
- We're skipping right over v8.0.0 as its tag has already been created previously
|
|
106
|
-
|
|
107
|
-
## v7.2.1
|
|
108
|
-
|
|
109
|
-
- [Tweak] Adds `defaultValue` and ensures additional props are carried forward on the `Select` component.
|
|
110
|
-
|
|
111
|
-
## v7.2.0
|
|
112
|
-
|
|
113
|
-
- [Feature] A new `Notification` component has been added.
|
|
114
|
-
|
|
115
|
-
## v7.1.9
|
|
116
|
-
|
|
117
|
-
- [Fix] We're only rendering menu lists into the DOM when the menu is opened. This should result in measurable performance gains if you're rendering a lot menus (e.g. as part of a list).
|
|
118
|
-
|
|
119
|
-
## v7.1.8
|
|
120
|
-
|
|
121
|
-
- [Tweak] Upgraded Reakit dependency
|
|
122
|
-
|
|
123
|
-
## v7.1.7
|
|
124
|
-
|
|
125
|
-
- [Tweak] Separates `ButtonVariant` and `ButtonSize` as actual types.
|
|
126
|
-
|
|
127
|
-
## v7.1.6
|
|
128
|
-
|
|
129
|
-
- [Tweak] Upgrade some dependencies.
|
|
130
|
-
|
|
131
|
-
## v7.1.5
|
|
132
|
-
|
|
133
|
-
- [Tweak] Adds a backdrop/overlay to dropdown menus.
|
|
134
|
-
- [Fix] Removes the peer dependency on dayjs, adding it as a direct dependency instead.
|
|
135
|
-
|
|
136
|
-
## v7.1.4
|
|
137
|
-
|
|
138
|
-
- [Tweak] Prevents the `Tooltip` component from getting triggered by keyboard interactions performed in other components
|
|
139
|
-
|
|
140
|
-
## v7.1.3
|
|
141
|
-
|
|
142
|
-
- Dummy release created for publishing purposes
|
|
143
|
-
|
|
144
|
-
## v7.1.2
|
|
145
|
-
|
|
146
|
-
- [Tweak] Removes the arbitrary `max-width` value of the Tooltip component
|
|
147
|
-
- [Tweak] Adds a `z-index` value for the Tooltip component so that it appears ontop of other content
|
|
148
|
-
|
|
149
|
-
## v7.1.1
|
|
150
|
-
|
|
151
|
-
- [Bugfix] Fixes an improperly configured `sideEffects` property in package.json that prevented importing CSS files from reactist.
|
|
152
|
-
|
|
153
|
-
## v7.1.0
|
|
154
|
-
|
|
155
|
-
- [Feature] The tooltip content now can be provided as a function that will be called to generate its content. This function will only be called when the tooltip needs to be shown. This allows to have more control on tooltip content that is potentially expensive to generate, so that it only happens when needed.
|
|
156
|
-
- [Fix] The tooltip content is now rendered to the DOM only when the tooltip is shown. This is regardless of wether the content is provided directly or via a function. The React tree won't be comitted to the DOM unless the tooltip needs to become visible.
|
|
157
|
-
- [Tweak] The tooltip delay to appear is now extended from 100ms to 500ms which was our earlier standard with the previous implementation of the tooltip.
|
|
158
|
-
|
|
159
|
-
## v7.0.0
|
|
160
|
-
|
|
161
|
-
- [BREAKING CHANGE] A new Tooltip component is introduced. It is keyboard and screen reader friendly, more compliant with accessibility recommendations about tooltips. It does not provide all the features of the previous Tooltip, and its props change quite a bit. Additionally, it now has a new restriction where it expects its children to consist of a single element. This element is the one used as a trigger for the tooltip. (#276)
|
|
162
|
-
- [BREAKING CHANGE] The `Popover` component now has a new restriction where it expects its children to consist of a single element. (#276)
|
|
163
|
-
- [BREAKING CHANGE] A new set of components for building menus is introduced. The new menus are keyboard and screen reader friendly, more compliant with accessibility recommendations about menus. The old `MenuButton` and `MenuButtonItem` components are no longer available. Moreover we now have a `MenuButton` that is nothing like the one before. Check their code and examples in storybook. (#278)
|
|
164
|
-
|
|
165
|
-
## v6.0.1
|
|
166
|
-
|
|
167
|
-
- [Fix] This fixes a bug in v6.0.0 where the lib/ directory was unbundled.
|
|
168
|
-
|
|
169
|
-
## v6.0.0
|
|
170
|
-
|
|
171
|
-
- [BREAKING CHANGE] Reactist now generates a build more aligned to antd's best practices. It generates a clean ES6 build, a CommonJS build, as well as an unpkg build. It also adds built-in support for future CSS module integration. This is a breaking change because importing modules has changed slightly. See README.md.
|
|
172
|
-
- [BREAKING CHANGE] The `Button` component's `close` prop, which was deprecated back in v5, is now no longer supported.
|
|
173
|
-
|
|
174
|
-
## v5.2.0
|
|
175
|
-
|
|
176
|
-
- [Feature] `Button` can now be unstyled if you omit the `variant` prop. This resets the styles to be even less than default styles of the web browser (e.g. removes all border, padding and background).
|
|
177
|
-
|
|
178
|
-
## v5.1.0
|
|
179
|
-
|
|
180
|
-
- [New] A `KeyboardShortcut` component will take one or several keyboard shortcut specified as string, and will parse them and render them in a nice semantic markup using the `kbd` element. Each key part of a key combination gets its own container so you can style things nicely.
|
|
181
|
-
|
|
182
|
-
## v5.0.0
|
|
183
|
-
|
|
184
|
-
The `Button` component's big renovation.
|
|
185
|
-
|
|
186
|
-
- [BREAKING CHANGE] The `Button` component changed its outer interface entirely.
|
|
187
|
-
- Instead of individual boolean props for setting its visual style (`primary`, `secondary`, etc.) it has a single prop `variant` which receives the styling/variant as a string value.
|
|
188
|
-
- This prop is now required so if you were not adding any of these boolean props, you now need to add `variant="primary"`.
|
|
189
|
-
- The `white` prop now does not even exist as a `variant`. It is replaced by `variant="secondary"`.
|
|
190
|
-
- Instead of individual boolean props for setting its size (`small`, `large`), `Button` now has a single prop `size` that can receive either `'small'` or `'large'` as its value. If omitted the button has its default size.
|
|
191
|
-
- The `Button` now uses `children` as the prop in which it receives the content inside the button, as opposed to using the `name` prop. So now `<Button name="Hello" />` becomes `<Button>Hello</Button>`.
|
|
192
|
-
- The `Button` prop `data_tip` is now called `tooltip`.
|
|
193
|
-
- The css class names for the `Button` component are now all following a BEM-like naming convention. Instead of having classes such as `.loading`, `.secondary`, etc. it now has all of these prefixed by `.reactist_button--`. That is, `.secondary` is now `.reactist_button--secondary`.
|
|
194
|
-
- [BREAKING CHANGE] The `LinkButton` component has been removed entirely. The main reason being it is not accessible to use a link as a button. You can achieve a visually similar button with a new possible `variant` prop on the regular `Button`. So now `<LinkButton name="Click me" />` becomes `<Button variant="link">Click me</Button>`. This new link-like button is semantically a button, as opposed to being a link posing as a button.
|
|
195
|
-
|
|
196
|
-
## 4.1.5
|
|
197
|
-
|
|
198
|
-
- [Fix] Tightens up type definitions for the `KeyCapturer` props.
|
|
199
|
-
|
|
200
|
-
## 4.1.4
|
|
201
|
-
|
|
202
|
-
- [Fix] Reinstalled @doist/prettier-config from the npm registry and removed the authentication needed when pulling down dependencies.
|
|
203
|
-
|
|
204
|
-
## 4.1.3
|
|
205
|
-
|
|
206
|
-
- [Fix] We have a dev dependency being on the GiHub package registry and we had problems with our Github actions pulling it. This is hopefully all fixed. 🤞
|
|
207
|
-
|
|
208
|
-
## 4.1.0
|
|
209
|
-
|
|
210
|
-
- [New] The `event` object is now forwarded to the on\* handler in the `KeyCapturer` component. The `onEnter` event will also no longer fire when it's in the middle of an [IME composition session](https://developer.mozilla.org/en-US/docs/Glossary/input_method_editor).
|
|
211
|
-
|
|
212
|
-
## 4.0.2
|
|
213
|
-
|
|
214
|
-
- [New] Brings back individual JS and CSS files so that applications can do selective import in an ES6 build.
|
|
215
|
-
|
|
216
|
-
## 4.0.1
|
|
217
|
-
|
|
218
|
-
- [Fix] Modal.Actions now can have empty or null children again
|
|
219
|
-
|
|
220
|
-
## 4.0.0
|
|
221
|
-
|
|
222
|
-
- [New] The library is now fully Typescript, provides an ES6 module export, and provides native type bindings.
|
|
223
|
-
- [Tweak] To support tree-shaking, we've switched to the Rollup bundler
|
|
224
|
-
- [Breaking Change] All imports are now ES6 relative imports, change `import Loading from "@doist/reactist/lib/loading"` to `import { Loading } from "@doist/reactist"`
|
|
225
|
-
|
|
226
|
-
## 3.1.2
|
|
227
|
-
|
|
228
|
-
- [Tweak] Removes unused (legacy) context from `<Time />` constructor
|
|
229
|
-
|
|
230
|
-
## 3.1.1
|
|
231
|
-
|
|
232
|
-
- [Tweak] Better typing for the checkbox label
|
|
233
|
-
|
|
234
|
-
## 3.1.0
|
|
235
|
-
|
|
236
|
-
- [Feature] Adds typings for all components and utilities
|
|
237
|
-
|
|
238
|
-
## 3.0.1
|
|
239
|
-
|
|
240
|
-
- [Fix] Formatting in the `<Time />` component wasn't working as expected, this is now fixed.
|
|
241
|
-
|
|
242
|
-
## 3.0.0
|
|
243
|
-
|
|
244
|
-
- [Breaking] Changed namespacing from `.reactist.popover {}` to `.reactist_popover {}`. Customizing components' styling need to update accordingly.
|
|
245
|
-
|
|
246
|
-
## 2.0.2
|
|
247
|
-
|
|
248
|
-
- [Tweak] Changed time formatting from `yesterday` to `1d`
|
|
249
|
-
|
|
250
|
-
## 2.0.1
|
|
251
|
-
|
|
252
|
-
- _Empty release_
|
|
253
|
-
|
|
254
|
-
## 2.0.0
|
|
255
|
-
|
|
256
|
-
- [Breaking] Styles are no longer included automatically but need to be loaded manually. See the readme for a detailed instruction on how to achieve that.
|
|
257
|
-
|
|
258
|
-
## 1.22.06
|
|
259
|
-
|
|
260
|
-
- [New] Added a `refresh` prop to `<Time />` component in order to keep the information shown up-to-date when the component displays "time ago". By default, the component will re-render every 60 seconds.
|
|
261
|
-
|
|
262
|
-
## 1.22.05
|
|
263
|
-
|
|
264
|
-
- [Fix] Fixed the `display: intial` CSS rule for IE11 users (affects the `<Popover />` component)
|
|
265
|
-
|
|
266
|
-
## 1.22.04
|
|
267
|
-
|
|
268
|
-
- [Tweak] Fixed unsupported `display: initial` in IE11
|
|
269
|
-
|
|
270
|
-
## 1.22.04
|
|
271
|
-
|
|
272
|
-
- [Tweak] Fixed broken styles for `<Modal>` on small screens
|
|
273
|
-
|
|
274
|
-
## 1.22.03
|
|
275
|
-
|
|
276
|
-
- [Tweak] `<Popover />` content can now be a function which will only be lazily evaluated
|
|
277
|
-
|
|
278
|
-
## 1.22.02
|
|
279
|
-
|
|
280
|
-
- [Tweak] `<Popover />` content is now rendered lazily (i.e. only if `visible` is `true`)
|
|
281
|
-
|
|
282
|
-
## 1.22.01
|
|
283
|
-
|
|
284
|
-
- [Tweak] `<Modal.Body />` now starts to scroll instead of requiring the whole window to scroll.
|
|
285
|
-
|
|
286
|
-
## 1.22.00
|
|
287
|
-
|
|
288
|
-
- [Tweak] `<Dropdown.Body />` can now be a function which allows for lazy evaluation (i.e. content is only rendered when dropdown is opened).
|
|
289
|
-
|
|
290
|
-
## 1.21.00
|
|
291
|
-
|
|
292
|
-
- [Tweak] introduced `.npmignore` file to keep released package smaller and only include the essentials. This also fixes a bug in **v1.20.00** where parts of the `.git` directory ended up in the file package.
|
|
293
|
-
|
|
294
|
-
## 1.20.00
|
|
295
|
-
|
|
296
|
-
- [Tweak] Replaced Moment with [Day.js](https://github.com/iamkun/dayjs)
|
|
297
|
-
|
|
298
|
-
🚨 This introduces a new peerDependency (`dayjs`) and removes the need for `moment`. If you're not using the `<Time />` nothing should change for you.
|
|
299
|
-
|
|
300
|
-
## 1.19.00
|
|
301
|
-
|
|
302
|
-
- [Tweak] Changed the way the `<Time />` component formats it's time. You now have more control to influence the date and time format from the outside
|
|
303
|
-
|
|
304
|
-
## 1.18.15
|
|
305
|
-
|
|
306
|
-
- [Tweak] Using a 3px border-radius everywhere instead of a mixture of 3px and 4px
|
|
307
|
-
|
|
308
|
-
## 1.18.14
|
|
309
|
-
|
|
310
|
-
- [Tweak] Updated the `<CloseIcon />` (used in `<Modal.Header>`) to new icon style
|
|
311
|
-
|
|
312
|
-
## 1.18.13
|
|
313
|
-
|
|
314
|
-
- [Tweak] Decreased top and bottom margins of `<Modal />` to 40px
|
|
315
|
-
|
|
316
|
-
## 1.18.12
|
|
317
|
-
|
|
318
|
-
- [Tweak] Increase left and right padding of `<Input />` to 10px to match `<Select />`
|
|
319
|
-
|
|
320
|
-
## 1.18.11
|
|
321
|
-
|
|
322
|
-
- [Tweak] `<ColorPicker />` no longer shows the dropdown arrow and it's styling no longer includes margins
|
|
323
|
-
- [New] `<ColorPicker />` now comes in a `small` version which is only 18px squared instead of 24px
|
|
324
|
-
|
|
325
|
-
## 1.18.10
|
|
326
|
-
|
|
327
|
-
- [Tweak] Switched separators (`<hr />`) in `<Dropdown />` to border gray to unify colors more
|
|
328
|
-
|
|
329
|
-
## 1.18.09
|
|
330
|
-
|
|
331
|
-
- [Tweak] No longer force no text-decoration on `<LinkButton />`
|
|
332
|
-
|
|
333
|
-
## 1.18.08
|
|
334
|
-
|
|
335
|
-
- [New] When providing a className to `<Input />` it no longer overrides reactist' native styles
|
|
336
|
-
|
|
337
|
-
## 1.18.07
|
|
338
|
-
|
|
339
|
-
- [New] Allowing to attach a ref to `<Input />`
|
|
340
|
-
|
|
341
|
-
## 1.18.06
|
|
342
|
-
|
|
343
|
-
- [Bug] Centering the text of `<Tooltip />`
|
|
344
|
-
|
|
345
|
-
## 1.18.05
|
|
346
|
-
|
|
347
|
-
- [Bug] Set visibility of `<Popover />` to `none` to avoid click jacking
|
|
348
|
-
|
|
349
|
-
## 1.18.04
|
|
350
|
-
|
|
351
|
-
- [New] Added `withArrow` property to `<Tooltip />` to support arrow-less tooltips
|
|
352
|
-
|
|
353
|
-
## 1.18.03
|
|
354
|
-
|
|
355
|
-
- [Tweak] `allowVaguePositioning` now also takes the vertical positioning into account instead of only the horizontal one
|
|
356
|
-
|
|
357
|
-
## 1.18.02
|
|
358
|
-
|
|
359
|
-
- [Tweak] When clicking on the trigger of a `<Tooltip />` (i.e. its children) we will close the Tooltip. This is helpful so tooltips no longer overlap menu. In case you need more finegrained control over this consider using a `<Popover />` directly.
|
|
360
|
-
|
|
361
|
-
## 1.18.01
|
|
362
|
-
|
|
363
|
-
- [Tweak] Reset margins on `<Input />` so it's visually aligned in Safari (and all other browsers) by default
|
|
364
|
-
|
|
365
|
-
## 1.18.00
|
|
366
|
-
|
|
367
|
-
- [New] Added the utility component `<KeyCapturer>`. Use it to wrap arbitrary elements and act on keyboard events happening while it is focussed
|
|
368
|
-
|
|
369
|
-
## 1.17.04
|
|
370
|
-
|
|
371
|
-
- [Tweak] All additionally passed props to a `<Button />` are now applied to the underlying `<button>` element. This allows you to make better use of the platform (e.g `type='submit'`) or adhere to accessibility best practices
|
|
372
|
-
|
|
373
|
-
## 1.17.03
|
|
374
|
-
|
|
375
|
-
- [Tweak] Moved some default styles from `<Tooltip />` to `<Popover />` which should make it easier to build nice experiences with it as you no longer need to provide all the styles
|
|
376
|
-
|
|
377
|
-
## 1.17.02
|
|
378
|
-
|
|
379
|
-
- [New] Added `size`, `spinnerColor` and `bgColor` properties to `<Loading />` for a fully customizable loading experience
|
|
380
|
-
|
|
381
|
-
## 1.17.01
|
|
382
|
-
|
|
383
|
-
- [Tweak] Unified all border colors across all components
|
|
384
|
-
|
|
385
|
-
## 1.17.00
|
|
386
|
-
|
|
387
|
-
- [New] Added new general purpose `<Popover />` component which also powers the `<Tooltip />` component. This allows for more flexible popovers than overriding the styles of a tooltip.
|
|
388
|
-
|
|
389
|
-
## 1.16.08
|
|
390
|
-
|
|
391
|
-
- [New] Added support for `disabled` property to `<Checkbox />`
|
|
392
|
-
|
|
393
|
-
## 1.16.07
|
|
394
|
-
|
|
395
|
-
- [Tweak] We now update the styles of `<Input />` when supplying the `disabled` property
|
|
396
|
-
|
|
397
|
-
## 1.16.06
|
|
398
|
-
|
|
399
|
-
- [New] Added `medium` property to `<Modal.Box />` as a new size constant. It will produce modals that are 680px wide
|
|
400
|
-
- [New] Added `plain` property to `<Modal.Body />` which removes all styling from the body for custom modals
|
|
401
|
-
|
|
402
|
-
## 1.16.05
|
|
403
|
-
|
|
404
|
-
- [Tweak] Darkened border color of `<Select />` to border color constant
|
|
405
|
-
|
|
406
|
-
## 1.16.04
|
|
407
|
-
|
|
408
|
-
- [Bug] Changed class name of loading `<Button />` from `loading` to `busy` to avoid clash with the `loading` class name of `<Loading />`
|
|
409
|
-
|
|
410
|
-
## 1.16.03
|
|
411
|
-
|
|
412
|
-
- [Tweak] Darkened font and border color of secondary button to improve readability
|
|
413
|
-
|
|
414
|
-
## 1.16.02
|
|
415
|
-
|
|
416
|
-
- [Tweak] Relaxed prop types of most components which render strings to also accept component(s)
|
|
417
|
-
|
|
418
|
-
## 1.16.01
|
|
419
|
-
|
|
420
|
-
- [Tweak] Updated icon of `<Select />` to fit our iconography
|
|
421
|
-
|
|
422
|
-
## 1.16.00
|
|
423
|
-
|
|
424
|
-
- [Tooling] Updated to webpack 4, babel 7 and fixed some problems in our build process. `moment`, `classnames` and `prop-types` are now correctly treated as externals and are no longer included in our production bundle. This resulted in a reduced stat size from 703kb to 160kb ⚡️
|
|
425
|
-
|
|
426
|
-
## 1.15.24
|
|
427
|
-
|
|
428
|
-
- [Bug] When closing a modal by pressing esc we now prevent the browser's default behaviour (e.g. leaving fullscreen mode)
|
|
429
|
-
|
|
430
|
-
## 1.15.23
|
|
431
|
-
|
|
432
|
-
- [Bug] Clicking on the inner overlay of `<Modal />` (aka left or right of the modal) when `closeOnOverlayClick` was set to `true` the modal wouldn't close
|
|
433
|
-
|
|
434
|
-
## 1.15.22
|
|
435
|
-
|
|
436
|
-
- [Bug] Changing the `right` prop of `<Dropdown />` didn't have any effect as it was "cached" in internal state upon first construction
|
|
437
|
-
|
|
438
|
-
## 1.15.21
|
|
439
|
-
|
|
440
|
-
- [Tweak] Added rounded corners to the blue line indicating an active tab
|
|
441
|
-
|
|
442
|
-
## 1.15.20
|
|
443
|
-
|
|
444
|
-
- [Bug] Setting `useCapture` to `true` to catch scroll events of all elements of a page to correctly hide the tooltip
|
|
445
|
-
|
|
446
|
-
## 1.15.19
|
|
447
|
-
|
|
448
|
-
- [New] Added `gapSize` to `<Tooltip />`
|
|
449
|
-
|
|
450
|
-
## 1.15.18
|
|
451
|
-
|
|
452
|
-
- [Redesign] The `<Loading />` indicator is now a spinning circle instead of three bouncing dots
|
|
453
|
-
|
|
454
|
-
## 1.15.17
|
|
455
|
-
|
|
456
|
-
- [Tweak] Inactive tabs use the secondary font color instead of custom gray
|
|
457
|
-
|
|
458
|
-
## 1.15.16
|
|
459
|
-
|
|
460
|
-
- [Tweak] Darkened primary and secondary font colors for improved readability
|
|
461
|
-
|
|
462
|
-
## 1.15.15
|
|
463
|
-
|
|
464
|
-
- [New] Added support for the `style` property to `<Modal.Box />` and `<Modal.Body />` for when a className is not enough
|
|
465
|
-
|
|
466
|
-
## 1.15.14
|
|
467
|
-
|
|
468
|
-
- [Tweak] Sets the default value of the `delayShow` of the `<Tooltip />` component to 500ms (0.5s) instead of 1s
|
|
469
|
-
|
|
470
|
-
## 1.15.13
|
|
471
|
-
|
|
472
|
-
- [Tweak] Set the margin of `<Select />` to 0 to avoid browser inconsistencies in Safari
|
|
473
|
-
|
|
474
|
-
## 1.15.12
|
|
475
|
-
|
|
476
|
-
- [Tweak] Instead of using the default delay of 1s (1000ms) for tooltips when hovering the `<Time />` component we now use 500ms (0.5s)
|
|
477
|
-
|
|
478
|
-
## 1.15.11
|
|
479
|
-
|
|
480
|
-
- [Redesign] The `<ColorPicker />` can now show an optional active indicator on the selected color item.
|
|
481
|
-
- Additionally, we no longer hide the active color from the selection. That means you might need to check in your code that an actual change occurred.
|
|
482
|
-
- [Bug] When supplying an invalid `color` prop to the `<ColorPicker />` it would crash. Now it selects the first color in the `colorList`.
|
|
483
|
-
|
|
484
|
-
## 1.15.10
|
|
485
|
-
|
|
486
|
-
- [Tweak] Increased the size of the white inner ring that appears when hovering a color item of the `<ColorPicker />`
|
|
487
|
-
|
|
488
|
-
## 1.15.9
|
|
489
|
-
|
|
490
|
-
- [Redesign] New design for the `<ColorPicker />`
|
|
491
|
-
- It now shows the color name on hover – when supplied through the `colorList` prop
|
|
492
|
-
- [Bug] `<Tooltip />`s are now correctly displayed in absolutely positioned elements (esp. `<Dropdown />`s)
|
|
493
|
-
|
|
494
|
-
---
|
|
495
|
-
|
|
496
|
-
... we failed to write a changelog before that version you could probably scroll through the commit history to find out more. Sorry!
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../../src/components/button/button.tsx"],"sourcesContent":["import React from 'react'\nimport classNames from 'classnames'\n\nimport { Tooltip } from '../tooltip'\n\nimport './button.less'\n\ntype NativeButtonProps = React.DetailedHTMLProps<\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n>\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'link'\n\nexport type ButtonSize = 'default' | 'small' | 'large'\n\nexport type ButtonProps = Omit<NativeButtonProps, 'title' | 'ref'> & {\n /**\n * Loading style. When true it disables the button, but it also adds a visual indication of\n * some in-progress operation going on.\n */\n loading?: boolean\n /**\n * Controls visually how the button shows up from a predefined set of kinds of buttons.\n */\n variant?: ButtonVariant\n /**\n * The size of the button. If not provided it shows up in a normal size.\n */\n size?: ButtonSize\n /**\n * Tooltip that is displayed on hover.\n *\n * This replaces `title` which is not supported for these buttons to avoid confusion.\n */\n tooltip?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n type = 'button',\n variant,\n size = 'default',\n loading = false,\n disabled = false,\n tooltip,\n onClick,\n children,\n ...props\n },\n ref,\n) {\n const className = classNames(\n 'reactist_button',\n variant ? `reactist_button--${variant}` : null,\n size !== 'default' ? `reactist_button--${size}` : null,\n { 'reactist_button--loading': loading },\n props.className,\n )\n\n const button = (\n <button\n {...props}\n ref={ref}\n type={type}\n className={className}\n disabled={disabled || loading}\n onClick={onClick}\n >\n {children}\n </button>\n )\n\n return tooltip ? <Tooltip content={tooltip}>{button}</Tooltip> : button\n})\n\nButton.displayName = 'Button'\n\nButton.defaultProps = {\n size: 'default',\n loading: false,\n disabled: false,\n}\n\nexport { Button }\n"],"names":["Button","React","forwardRef","ref","type","variant","size","loading","disabled","tooltip","onClick","children","props","className","classNames","button","Tooltip","content","displayName","defaultProps"],"mappings":";;;;;IAsCMA,MAAM,gBAAGC,cAAK,CAACC,UAAN,CAAiD,SAASF,MAAT,OAY5DG,GAZ4D;uBAExDC;MAAAA,8BAAO;MACPC,eAAAA;uBACAC;MAAAA,8BAAO;0BACPC;MAAAA,oCAAU;2BACVC;MAAAA,sCAAW;MACXC,eAAAA;MACAC,eAAAA;MACAC,gBAAAA;MACGC;;AAIP,MAAMC,SAAS,GAAGC,UAAU,CACxB,iBADwB,EAExBT,OAAO,yBAAuBA,OAAvB,GAAmC,IAFlB,EAGxBC,IAAI,KAAK,SAAT,yBAAyCA,IAAzC,GAAkD,IAH1B,EAIxB;AAAE,gCAA4BC;AAA9B,GAJwB,EAKxBK,KAAK,CAACC,SALkB,CAA5B;AAQA,MAAME,MAAM,gBACRd,4BAAA,SAAA,oBACQW;AACJT,IAAAA,GAAG,EAAEA;AACLC,IAAAA,IAAI,EAAEA;AACNS,IAAAA,SAAS,EAAEA;AACXL,IAAAA,QAAQ,EAAEA,QAAQ,IAAID;AACtBG,IAAAA,OAAO,EAAEA;IANb,EAQKC,QARL,CADJ;AAaA,SAAOF,OAAO,gBAAGR,4BAAA,CAACe,OAAD;AAASC,IAAAA,OAAO,EAAER;GAAlB,EAA4BM,MAA5B,CAAH,GAAmDA,MAAjE;AACH,CApCc;AAsCff,MAAM,CAACkB,WAAP,GAAqB,QAArB;AAEAlB,MAAM,CAACmB,YAAP,GAAsB;AAClBb,EAAAA,IAAI,EAAE,SADY;AAElBC,EAAAA,OAAO,EAAE,KAFS;AAGlBC,EAAAA,QAAQ,EAAE;AAHQ,CAAtB;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loading.js","sources":["../../../src/components/loading/loading.tsx"],"sourcesContent":["import React from 'react'\nimport classNames from 'classnames'\n\nimport './loading.less'\n\ntype Props = {\n /** Additional css class that is applied to Loading. */\n className?: string\n /** Hex code of the spinner color. */\n spinnerColor?: string\n /** Hex code of the background color. */\n bgColor?: string\n /** Circle diameter in pixels. */\n size?: string | number\n\n 'aria-label'?: string\n}\n\nfunction Loading({\n className,\n spinnerColor = '#3F82EF',\n bgColor = '#D9E6FB',\n size = 24,\n 'aria-label': ariaLabel = 'Loading',\n}: Props) {\n return (\n <div\n className={classNames('reactist_loading', className)}\n aria-label={ariaLabel}\n aria-live=\"assertive\"\n role=\"alert\"\n >\n <span className=\"reactist_loading--spinner\">\n <svg width={size} height={size} viewBox={'0 0 24 24'}>\n <g fill=\"none\" fillRule=\"nonzero\">\n <path\n fill={spinnerColor}\n d=\"M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z\"\n />\n <path\n fill={bgColor}\n d=\"M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z\"\n />\n </g>\n </svg>\n </span>\n </div>\n )\n}\nLoading.displayName = 'Loading'\n\nexport { Loading }\n"],"names":["Loading","className","spinnerColor","bgColor","size","ariaLabel","React","classNames","role","width","height","viewBox","fill","fillRule","d","displayName"],"mappings":";;;AAkBA,SAASA,OAAT;MACIC,iBAAAA;+BACAC;MAAAA,8CAAe;0BACfC;MAAAA,oCAAU;uBACVC;MAAAA,8BAAO;4BACP;MAAcC,wCAAY;AAE1B,sBACIC,4BAAA,MAAA;AACIL,IAAAA,SAAS,EAAEM,UAAU,CAAC,kBAAD,EAAqBN,SAArB;kBACTI;iBACF;AACVG,IAAAA,IAAI,EAAC;GAJT,eAMIF,4BAAA,OAAA;AAAML,IAAAA,SAAS,EAAC;GAAhB,eACIK,4BAAA,MAAA;AAAKG,IAAAA,KAAK,EAAEL;AAAMM,IAAAA,MAAM,EAAEN;AAAMO,IAAAA,OAAO,EAAE;GAAzC,eACIL,4BAAA,IAAA;AAAGM,IAAAA,IAAI,EAAC;AAAOC,IAAAA,QAAQ,EAAC;GAAxB,eACIP,4BAAA,OAAA;AACIM,IAAAA,IAAI,EAAEV;AACNY,IAAAA,CAAC,EAAC;GAFN,CADJ,eAKIR,4BAAA,OAAA;AACIM,IAAAA,IAAI,EAAET;AACNW,IAAAA,CAAC,EAAC;GAFN,CALJ,CADJ,CADJ,CANJ,CADJ;AAuBH;;AACDd,OAAO,CAACe,WAAR,GAAsB,SAAtB;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type-helpers.js","sources":["../../../src/components/menu/type-helpers.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n//\n// The content of this file is heavily influenced by the similar and even more extensive type\n// definitions found in https://github.com/reach/reach-ui/tree/develop/packages/utils/src. That\n// library is said to not be kept stable and meant to be used internally by other reach-ui libs, so\n// instead of using it as a dependency we copied over the bits that we needed. The amount of copied\n// code was small but substantial enough to merit including here the copyright notice.\n//\n// The MIT License (MIT)\n//\n// Copyright (c) 2018-present, React Training LLC\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and\n// associated documentation files (the \"Software\"), to deal in the Software without restriction,\n// including without limitation the rights to use, copy, modify, merge, publish, distribute,\n// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all copies or\n// substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\n// NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n\nimport * as React from 'react'\nimport { PropsWithAs as ReakitPropsWithAs, As } from 'reakit-utils/types'\n\n/**\n * We revert here the order from how reakit declares it. This is to be more aligned with how\n * React.fowardRef generic arguments order is defined (element type first, props last).\n */\ntype PropsWithAs<ComponentType extends As, ComponentProps = {}> = ReakitPropsWithAs<\n ComponentProps,\n ComponentType\n>\n\ntype PropsFromAs<ComponentType extends As, ComponentProps> = (PropsWithAs<\n ComponentType,\n ComponentProps\n> & { as: ComponentType }) &\n PropsWithAs<ComponentType, ComponentProps>\n\ntype ElementTagNameMap = HTMLElementTagNameMap &\n Pick<SVGElementTagNameMap, Exclude<keyof SVGElementTagNameMap, keyof HTMLElementTagNameMap>>\n\ntype ElementByTag<TagName extends keyof ElementTagNameMap> = ElementTagNameMap[TagName]\n\ninterface ForwardRefFunction<ComponentType extends As, ComponentProps = {}> {\n (\n props: React.PropsWithChildren<PropsFromAs<ComponentType, ComponentProps>>,\n ref:\n | ((\n instance:\n | (ComponentType extends keyof ElementTagNameMap\n ? ElementByTag<ComponentType>\n : any)\n | null,\n ) => void)\n | React.MutableRefObject<\n | (ComponentType extends keyof ElementTagNameMap\n ? ElementByTag<ComponentType>\n : any)\n | null\n >\n | null,\n ): React.ReactElement | null\n displayName?: string\n}\n\nexport interface ForwardRefComponentWithAs<ComponentType extends As, ComponentProps> {\n <TT extends As = ComponentType>(\n props: PropsWithAs<TT, ComponentProps>,\n ): React.ReactElement | null\n readonly $$typeof: symbol\n defaultProps?: Partial<PropsWithAs<ComponentType, ComponentProps>>\n propTypes?: React.WeakValidationMap<PropsWithAs<ComponentType, ComponentProps>>\n displayName?: string\n}\n\nexport function forwardRefWithAs<ComponentType extends As = 'div', ComponentProps = {}>(\n render: ForwardRefFunction<ComponentType, ComponentProps>,\n) {\n return React.forwardRef(render) as ForwardRefComponentWithAs<ComponentType, ComponentProps>\n}\n"],"names":["forwardRefWithAs","render","React"],"mappings":";;AAAA;SAqFgBA,iBACZC;AAEA,sBAAOC,UAAA,CAAiBD,MAAjB,CAAP;AACH;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/modal/index.ts"],"sourcesContent":["import { Box, Header, Body, Actions } from './modal'\nimport type { Modal } from './modal'\n\nexport default { Box, Header, Body, Actions }\nexport { Modal }\n"],"names":["Box","Header","Body","Actions"],"mappings":";;AAGA,YAAe;AAAEA,EAAAA,GAAG,EAAHA,GAAF;AAAOC,EAAAA,MAAM,EAANA,MAAP;AAAeC,EAAAA,IAAI,EAAJA,IAAf;AAAqBC,EAAAA,OAAO,EAAPA;AAArB,CAAf;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sources":["../../../src/components/modal/modal.tsx"],"sourcesContent":["import React from 'react'\nimport ReactDOM from 'react-dom'\nimport classnames from 'classnames'\n\nimport CloseIcon from '../icons/CloseIcon.svg'\n\nimport './modal.less'\n\ntype Props = {\n /** Additional css class applied to the Modal.Box. */\n className?: string\n /** Sometimes a class name is not enough so you can use this to set the style directly. */\n style?: React.CSSProperties\n /** Large style. */\n large: boolean\n /** Medium size syle. */\n medium?: boolean\n /** Close the Modal when clicking on the overlay. */\n closeOnOverlayClick: boolean\n}\n\nclass Box extends React.Component<React.PropsWithChildren<Props>> {\n public static displayName: string\n public static defaultProps: Props\n\n componentDidMount() {\n window.addEventListener('keydown', this._handleKeyDown)\n }\n\n componentWillUnmount() {\n window.removeEventListener('keydown', this._handleKeyDown)\n }\n\n _closeModal = () => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const modalElement = document.getElementById('modal_box')!\n ReactDOM.unmountComponentAtNode(modalElement)\n }\n\n _handleKeyDown = (event: Partial<KeyboardEvent>) => {\n if (event.keyCode === 27) {\n // ESC\n this._closeModal()\n if (event.preventDefault) event.preventDefault()\n }\n }\n\n _handleOverlayClick = (event: React.MouseEvent<Element>) => {\n if (\n event.target instanceof Element &&\n (event.target.id === 'reactist-overlay' || event.target.id === 'reactist-overlay-inner')\n ) {\n this._closeModal()\n }\n }\n\n render() {\n const { large, medium, style, children, closeOnOverlayClick } = this.props\n\n const className = classnames('reactist_modal_box', { large, medium }, this.props.className)\n\n return (\n <div\n className=\"reactist_overlay\"\n id=\"reactist-overlay\"\n onClick={closeOnOverlayClick ? this._handleOverlayClick : undefined}\n >\n <div className=\"reactist_overlay_inner\" id=\"reactist-overlay-inner\">\n <div style={style} className={className}>\n {children}\n </div>\n </div>\n </div>\n )\n }\n}\nBox.displayName = 'Modal.Box'\nBox.defaultProps = {\n large: false,\n closeOnOverlayClick: false,\n}\n\ntype HeaderProps = {\n /** Title of the Modal.Header. */\n title?: string | React.ReactNode\n /** Subtitle of the Modal.Header. */\n subtitle?: string | React.ReactNode\n /** Function that is called right before the Modal unmounts itself. */\n beforeClose?: () => void\n}\n\nclass Header extends React.Component<HeaderProps> {\n public static displayName: string\n public static defaultProps: HeaderProps\n\n _closeModal(event: React.MouseEvent) {\n event.preventDefault()\n if (typeof this.props.beforeClose === 'function') {\n this.props.beforeClose()\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const modalElement = document.getElementById('modal_box')!\n ReactDOM.unmountComponentAtNode(modalElement)\n }\n\n render() {\n return (\n /* eslint-disable jsx-a11y/anchor-is-valid */\n <div className=\"reactist_modal_box__header\">\n <p>\n {this.props.title && <span className=\"title\">{this.props.title}</span>}\n {this.props.subtitle && <span className=\"subtitle\">{this.props.subtitle}</span>}\n {this.props.children}\n </p>\n <a className=\"close\" onClick={this._closeModal.bind(this)} href=\"#\">\n <CloseIcon />\n </a>\n </div>\n /* eslint-enable jsx-a11y/anchor-is-valid */\n )\n }\n}\nHeader.displayName = 'Modal.Header'\n\ntype BodyProps = {\n /** Display an icon (or basically any component) on the right hand side of the Modal.Body. */\n icon?: React.ReactNode\n /** Applies less styles on the body (e.g. no padding) */\n plain?: boolean\n /** Sometimes a class name is not enough so you can use this to set the style directly. */\n style?: React.CSSProperties\n /** Additionall css class applied to the Modal.Body. */\n className?: string\n /**\n * Render a close icon in the top right corner of the Modal.Body.\n * Recommended to use when no Modal.Header is used.\n */\n showCloseIcon?: boolean\n}\nclass Body extends React.Component<BodyProps> {\n public static displayName: string\n public static defaultProps: BodyProps\n\n _closeModal(event: React.MouseEvent) {\n event.preventDefault()\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const modalElement = document.getElementById('modal_box')!\n ReactDOM.unmountComponentAtNode(modalElement)\n }\n\n render() {\n const { icon, plain, children, style, showCloseIcon } = this.props\n const className = classnames('reactist_modal_box__body', { plain }, this.props.className)\n\n return (\n /* eslint-disable jsx-a11y/anchor-is-valid */\n <div className={className} style={style}>\n {showCloseIcon && (\n <a className=\"close\" onClick={this._closeModal.bind(this)} href=\"#\">\n <CloseIcon />\n </a>\n )}\n {icon ? (\n <div className=\"dialog\">\n <div className=\"reactist_icon\">{icon}</div>\n <div className=\"content\">{children}</div>\n </div>\n ) : (\n children\n )}\n </div>\n /* eslint-enable jsx-a11y/anchor-is-valid */\n )\n }\n}\nBody.displayName = 'Modal.Body'\nBody.defaultProps = {\n showCloseIcon: false,\n}\n\ntype ActionProps = {\n /**\n * Children to render inside the Modal.Actions. They can have an optional `close` property (boolean).\n * When that is supplied and set to true it will close the modal after the onClick function\n */\n children?: React.ReactNode\n}\n\ntype ActionChildrenProps = {\n close?: boolean\n onClick?: () => void\n}\n\nclass Actions extends React.Component<ActionProps> {\n public static displayName: string\n\n _onClick(onClick: ActionChildrenProps['onClick']) {\n if (onClick) {\n onClick()\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const modalElement = document.getElementById('modal_box')!\n ReactDOM.unmountComponentAtNode(modalElement)\n }\n\n render() {\n const children = React.Children.map(\n // see: https://github.com/microsoft/TypeScript/issues/21699\n // @ts-expect-error Children cannot be typed properly yet in React\n this.props.children,\n (child: React.ReactElement<ActionChildrenProps>) => {\n if (child && child.props && child.props.close) {\n return React.cloneElement(child, {\n onClick: () => this._onClick(child.props.onClick),\n })\n } else {\n return child ? React.cloneElement(child) : <></>\n }\n },\n )\n\n return <div className=\"reactist_modal_box__actions\">{children}</div>\n }\n}\nActions.displayName = 'Modal.Actions'\n\ntype Modal = {\n Box: Box\n Header: Header\n Body: Body\n Actions: Actions\n}\n\nexport type { Modal }\n\nexport { Box, Header, Body, Actions }\n"],"names":["Box","modalElement","document","getElementById","ReactDOM","unmountComponentAtNode","event","keyCode","_closeModal","preventDefault","target","Element","id","componentDidMount","window","addEventListener","_handleKeyDown","componentWillUnmount","removeEventListener","render","props","large","medium","style","children","closeOnOverlayClick","className","classnames","React","onClick","_handleOverlayClick","undefined","Component","displayName","defaultProps","Header","beforeClose","title","subtitle","bind","href","CloseIcon","Body","icon","plain","showCloseIcon","Actions","_onClick","Children","map","child","close","cloneElement"],"mappings":";;;;;;IAqBMA;;;AAAN;;;;;AAYI,qBAAA,GAAc;AACV;AACA,UAAMC,YAAY,GAAGC,QAAQ,CAACC,cAAT,CAAwB,WAAxB,CAArB;AACAC,MAAAA,QAAQ,CAACC,sBAAT,CAAgCJ,YAAhC;AACH,KAJD;;AAMA,wBAAA,GAAiB,UAACK,KAAD;AACb,UAAIA,KAAK,CAACC,OAA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