@doist/reactist 9.2.0-beta.7 → 10.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -2
- package/dist/reactist.cjs.development.js +1405 -842
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/components/color-picker/color-picker.js +1 -1
- package/es/components/color-picker/color-picker.js.map +1 -1
- package/es/components/{button/button.js → deprecated-button/deprecated-button.js} +7 -3
- package/es/components/deprecated-button/deprecated-button.js.map +1 -0
- package/es/components/{button → deprecated-button}/index.js +1 -1
- package/es/components/{button → deprecated-button}/index.js.map +0 -0
- package/es/components/{loading/loading.js → deprecated-loading/deprecated-loading.js} +3 -1
- package/es/components/deprecated-loading/deprecated-loading.js.map +1 -0
- package/es/components/{modal/modal.js → deprecated-modal/deprecated-modal.js} +9 -2
- package/es/components/deprecated-modal/deprecated-modal.js.map +1 -0
- package/es/components/{modal → deprecated-modal}/index.js +1 -1
- package/es/components/deprecated-modal/index.js.map +1 -0
- package/es/components/dropdown/dropdown.js +5 -3
- package/es/components/dropdown/dropdown.js.map +1 -1
- package/es/components/error-message/error-message.js +3 -1
- package/es/components/error-message/error-message.js.map +1 -1
- package/es/components/keyboard-shortcut/keyboard-shortcut.js +4 -2
- package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/es/components/menu/menu.js +22 -20
- package/es/components/menu/menu.js.map +1 -1
- package/es/components/range-input/range-input.js +1 -1
- package/es/components/range-input/range-input.js.map +1 -1
- package/es/components/select/select.js +1 -1
- package/es/components/select/select.js.map +1 -1
- package/es/hooks/use-previous/use-previous.js +26 -0
- package/es/hooks/use-previous/use-previous.js.map +1 -0
- package/es/index.js +11 -6
- package/es/index.js.map +1 -1
- package/es/new-components/base-button/base-button.js +70 -0
- package/es/new-components/base-button/base-button.js.map +1 -0
- package/es/new-components/base-button/base-button.module.css.js +4 -0
- package/es/new-components/base-button/base-button.module.css.js.map +1 -0
- package/es/new-components/base-field/base-field.js +29 -29
- package/es/new-components/base-field/base-field.js.map +1 -1
- package/es/new-components/base-field/base-field.module.css.js +1 -1
- package/es/new-components/box/box.js +28 -10
- package/es/new-components/box/box.js.map +1 -1
- package/es/new-components/box/box.module.css.js +1 -1
- package/es/new-components/box/margin.module.css.js +4 -0
- package/es/new-components/box/margin.module.css.js.map +1 -0
- package/es/new-components/box/padding.module.css.js +4 -0
- package/es/new-components/box/padding.module.css.js.map +1 -0
- package/es/new-components/button/button.js +40 -0
- package/es/new-components/button/button.js.map +1 -0
- package/es/new-components/button-link/button-link.js +25 -14
- package/es/new-components/button-link/button-link.js.map +1 -1
- package/es/new-components/checkbox-field/checkbox-field.js +45 -23
- package/es/new-components/checkbox-field/checkbox-field.js.map +1 -1
- package/es/new-components/checkbox-field/checkbox-field.module.css.js +1 -1
- package/es/new-components/columns/columns.js +28 -17
- package/es/new-components/columns/columns.js.map +1 -1
- package/es/new-components/columns/columns.module.css.js +1 -1
- package/es/new-components/divider/divider.js +3 -3
- package/es/new-components/divider/divider.js.map +1 -1
- package/es/new-components/divider/divider.module.css.js +1 -1
- package/es/new-components/heading/heading.js +9 -3
- package/es/new-components/heading/heading.js.map +1 -1
- package/es/new-components/heading/heading.module.css.js +1 -1
- package/es/new-components/hidden/hidden.js +54 -0
- package/es/new-components/hidden/hidden.js.map +1 -0
- package/es/new-components/hidden/hidden.module.css.js +4 -0
- package/es/new-components/hidden/hidden.module.css.js.map +1 -0
- package/es/new-components/hidden-visually/hidden-visually.js +22 -0
- package/es/new-components/hidden-visually/hidden-visually.js.map +1 -0
- package/es/new-components/hidden-visually/hidden-visually.module.css.js +4 -0
- package/es/new-components/hidden-visually/hidden-visually.module.css.js.map +1 -0
- package/es/new-components/inline/inline.js +9 -8
- package/es/new-components/inline/inline.js.map +1 -1
- package/es/new-components/loading/loading.js +33 -0
- package/es/new-components/loading/loading.js.map +1 -0
- package/es/new-components/modal/modal.js +201 -0
- package/es/new-components/modal/modal.js.map +1 -0
- package/es/new-components/modal/modal.module.css.js +4 -0
- package/es/new-components/modal/modal.module.css.js.map +1 -0
- package/es/new-components/password-field/password-field.js +7 -4
- package/es/new-components/password-field/password-field.js.map +1 -1
- package/es/new-components/responsive-props.js +21 -11
- package/es/new-components/responsive-props.js.map +1 -1
- package/es/new-components/select-field/select-field.js +12 -6
- package/es/new-components/select-field/select-field.js.map +1 -1
- package/es/new-components/select-field/select-field.module.css.js +1 -1
- package/es/new-components/spinner/spinner.js +26 -0
- package/es/new-components/spinner/spinner.js.map +1 -0
- package/es/new-components/spinner/spinner.module.css.js +4 -0
- package/es/new-components/spinner/spinner.module.css.js.map +1 -0
- package/es/new-components/stack/stack.js +23 -13
- package/es/new-components/stack/stack.js.map +1 -1
- package/es/new-components/switch-field/switch-field.js +47 -28
- package/es/new-components/switch-field/switch-field.js.map +1 -1
- package/es/new-components/switch-field/switch-field.module.css.js +1 -1
- package/es/new-components/tabs/tabs.js +142 -0
- package/es/new-components/tabs/tabs.js.map +1 -0
- package/es/new-components/tabs/tabs.module.css.js +4 -0
- package/es/new-components/tabs/tabs.module.css.js.map +1 -0
- package/es/new-components/text/text.js +15 -10
- package/es/new-components/text/text.js.map +1 -1
- package/es/new-components/text/text.module.css.js +1 -1
- package/es/new-components/text-area/text-area.js.map +1 -1
- package/es/new-components/text-area/text-area.module.css.js +1 -1
- package/es/new-components/text-field/text-field.js +4 -2
- package/es/new-components/text-field/text-field.js.map +1 -1
- package/es/new-components/text-field/text-field.module.css.js +1 -1
- package/es/new-components/text-link/text-link.js +8 -7
- package/es/new-components/text-link/text-link.js.map +1 -1
- package/es/utils/polymorphism.js +17 -0
- package/es/utils/polymorphism.js.map +1 -0
- package/lib/components/color-picker/color-picker.js +1 -1
- package/lib/components/color-picker/color-picker.js.map +1 -1
- package/lib/components/{button/button.d.ts → deprecated-button/deprecated-button.d.ts} +7 -1
- package/lib/components/{button/button.js → deprecated-button/deprecated-button.js} +2 -2
- package/lib/components/deprecated-button/deprecated-button.js.map +1 -0
- package/lib/components/{button/button.test.d.ts → deprecated-button/deprecated-button.test.d.ts} +0 -0
- package/lib/components/deprecated-button/index.d.ts +4 -0
- package/lib/components/{loading → deprecated-button}/index.js +1 -1
- package/lib/components/{button → deprecated-button}/index.js.map +0 -0
- package/lib/components/{loading/loading.d.ts → deprecated-loading/deprecated-loading.d.ts} +2 -1
- package/lib/components/{loading/loading.js → deprecated-loading/deprecated-loading.js} +1 -1
- package/lib/components/deprecated-loading/deprecated-loading.js.map +1 -0
- package/lib/components/{loading/Loading.test.d.ts → deprecated-loading/deprecated-loading.test.d.ts} +0 -0
- package/lib/components/deprecated-loading/index.d.ts +1 -0
- package/lib/components/{modal/modal.d.ts → deprecated-modal/deprecated-modal.d.ts} +6 -1
- package/lib/components/{modal/modal.js → deprecated-modal/deprecated-modal.js} +2 -2
- package/lib/components/deprecated-modal/deprecated-modal.js.map +1 -0
- package/lib/components/{modal/modal.test.d.ts → deprecated-modal/deprecated-modal.test.d.ts} +0 -0
- package/lib/components/{modal → deprecated-modal}/index.d.ts +3 -3
- package/lib/components/deprecated-modal/index.js +2 -0
- package/lib/components/deprecated-modal/index.js.map +1 -0
- package/lib/components/dropdown/dropdown.js +1 -1
- package/lib/components/dropdown/dropdown.js.map +1 -1
- package/lib/components/error-message/error-message.js +1 -1
- package/lib/components/error-message/error-message.js.map +1 -1
- package/lib/components/keyboard-shortcut/keyboard-shortcut.js +1 -1
- package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/lib/components/menu/index.d.ts +1 -1
- package/lib/components/menu/menu.d.ts +8 -10
- package/lib/components/menu/menu.js +1 -1
- package/lib/components/menu/menu.js.map +1 -1
- package/lib/components/range-input/range-input.js +1 -1
- package/lib/components/range-input/range-input.js.map +1 -1
- package/lib/components/select/select.js +1 -1
- package/lib/components/select/select.js.map +1 -1
- package/lib/components/tooltip/index.d.ts +1 -1
- package/lib/hooks/use-previous/index.d.ts +1 -0
- package/lib/hooks/use-previous/use-previous.d.ts +15 -0
- package/lib/hooks/use-previous/use-previous.js +2 -0
- package/lib/hooks/use-previous/use-previous.js.map +1 -0
- package/lib/index.d.ts +10 -5
- package/lib/index.js +1 -1
- package/lib/new-components/base-button/base-button.d.ts +65 -0
- package/lib/new-components/base-button/base-button.js +2 -0
- package/lib/new-components/base-button/base-button.js.map +1 -0
- package/lib/new-components/base-button/base-button.module.css.js +2 -0
- package/lib/new-components/base-button/base-button.module.css.js.map +1 -0
- package/lib/new-components/base-button/index.d.ts +1 -0
- package/lib/new-components/base-field/base-field.d.ts +53 -13
- package/lib/new-components/base-field/base-field.js +1 -1
- package/lib/new-components/base-field/base-field.js.map +1 -1
- package/lib/new-components/base-field/base-field.module.css.js +1 -1
- package/lib/new-components/box/box.d.ts +24 -13
- package/lib/new-components/box/box.js +1 -1
- package/lib/new-components/box/box.js.map +1 -1
- package/lib/new-components/box/box.module.css.js +1 -1
- package/lib/{components/tabs/tabs.test.d.ts → new-components/box/box.test.d.ts} +0 -0
- package/lib/new-components/box/margin.module.css.js +2 -0
- package/lib/new-components/box/margin.module.css.js.map +1 -0
- package/lib/new-components/box/padding.module.css.js +2 -0
- package/lib/new-components/box/padding.module.css.js.map +1 -0
- package/lib/new-components/button/button.d.ts +48 -0
- package/lib/new-components/button/button.js +2 -0
- package/lib/new-components/button/button.js.map +1 -0
- package/lib/new-components/button/button.test.d.ts +1 -0
- package/lib/new-components/button/index.d.ts +1 -0
- package/lib/new-components/button-link/button-link-story-wrapper.d.ts +7 -0
- package/lib/new-components/button-link/button-link.d.ts +14 -8
- package/lib/new-components/button-link/button-link.js +1 -1
- package/lib/new-components/button-link/button-link.js.map +1 -1
- package/lib/new-components/button-link/button-link.test.d.ts +1 -0
- package/lib/new-components/checkbox-field/checkbox-field.d.ts +3 -3
- package/lib/new-components/checkbox-field/checkbox-field.js +1 -1
- package/lib/new-components/checkbox-field/checkbox-field.js.map +1 -1
- package/lib/new-components/checkbox-field/checkbox-field.module.css.js +1 -1
- package/lib/new-components/checkbox-field/checkbox-field.test.d.ts +1 -0
- package/lib/new-components/columns/columns.d.ts +4 -5
- package/lib/new-components/columns/columns.js +1 -1
- package/lib/new-components/columns/columns.js.map +1 -1
- package/lib/new-components/columns/columns.module.css.js +1 -1
- package/lib/new-components/columns/columns.test.d.ts +1 -0
- package/lib/new-components/common-types.d.ts +2 -0
- package/lib/new-components/divider/divider.d.ts +2 -2
- package/lib/new-components/divider/divider.js +1 -1
- package/lib/new-components/divider/divider.js.map +1 -1
- package/lib/new-components/divider/divider.module.css.js +1 -1
- package/lib/new-components/heading/heading.d.ts +101 -2
- package/lib/new-components/heading/heading.js +1 -1
- package/lib/new-components/heading/heading.js.map +1 -1
- package/lib/new-components/heading/heading.module.css.js +1 -1
- package/lib/new-components/heading/heading.test.d.ts +1 -0
- package/lib/new-components/hidden/hidden.d.ts +49 -0
- package/lib/new-components/hidden/hidden.js +2 -0
- package/lib/new-components/hidden/hidden.js.map +1 -0
- package/lib/new-components/hidden/hidden.module.css.js +2 -0
- package/lib/new-components/hidden/hidden.module.css.js.map +1 -0
- package/lib/new-components/hidden/hidden.test.d.ts +1 -0
- package/lib/new-components/hidden/index.d.ts +1 -0
- package/lib/new-components/hidden-visually/hidden-visually.d.ts +11 -0
- package/lib/new-components/hidden-visually/hidden-visually.js +2 -0
- package/lib/new-components/hidden-visually/hidden-visually.js.map +1 -0
- package/lib/new-components/hidden-visually/hidden-visually.module.css.js +2 -0
- package/lib/new-components/hidden-visually/hidden-visually.module.css.js.map +1 -0
- package/lib/new-components/hidden-visually/hidden-visually.test.d.ts +1 -0
- package/lib/new-components/hidden-visually/index.d.ts +1 -0
- package/lib/new-components/inline/inline.d.ts +1 -2
- package/lib/new-components/inline/inline.js +1 -1
- package/lib/new-components/inline/inline.js.map +1 -1
- package/lib/new-components/inline/inline.test.d.ts +1 -0
- package/lib/new-components/loading/index.d.ts +1 -0
- package/lib/new-components/loading/loading.d.ts +26 -0
- package/lib/new-components/loading/loading.js +2 -0
- package/lib/new-components/loading/loading.js.map +1 -0
- package/lib/new-components/loading/loading.test.d.ts +1 -0
- package/lib/new-components/modal/index.d.ts +1 -0
- package/lib/new-components/modal/modal-stories-components.d.ts +35 -0
- package/lib/new-components/modal/modal.d.ts +151 -0
- package/lib/new-components/modal/modal.js +2 -0
- package/lib/new-components/modal/modal.js.map +1 -0
- package/lib/new-components/modal/modal.module.css.js +2 -0
- package/lib/new-components/modal/modal.module.css.js.map +1 -0
- package/lib/new-components/modal/modal.test.d.ts +1 -0
- package/lib/new-components/password-field/password-field.d.ts +2 -2
- package/lib/new-components/password-field/password-field.js +1 -1
- package/lib/new-components/password-field/password-field.js.map +1 -1
- package/lib/new-components/password-field/password-field.test.d.ts +1 -0
- package/lib/new-components/responsive-props.d.ts +12 -14
- package/lib/new-components/responsive-props.js +1 -1
- package/lib/new-components/responsive-props.js.map +1 -1
- package/lib/new-components/select-field/select-field.d.ts +4 -4
- package/lib/new-components/select-field/select-field.js +1 -1
- package/lib/new-components/select-field/select-field.js.map +1 -1
- package/lib/new-components/select-field/select-field.module.css.js +1 -1
- package/lib/new-components/select-field/select-field.test.d.ts +1 -0
- package/lib/new-components/spinner/index.d.ts +1 -0
- package/lib/new-components/spinner/spinner.d.ts +5 -0
- package/lib/new-components/spinner/spinner.js +2 -0
- package/lib/new-components/spinner/spinner.js.map +1 -0
- package/lib/new-components/spinner/spinner.module.css.js +2 -0
- package/lib/new-components/spinner/spinner.module.css.js.map +1 -0
- package/lib/new-components/stack/stack.d.ts +8 -5
- package/lib/new-components/stack/stack.js +1 -1
- package/lib/new-components/stack/stack.js.map +1 -1
- package/lib/new-components/stack/stack.test.d.ts +1 -0
- package/lib/new-components/switch-field/switch-field.d.ts +4 -4
- package/lib/new-components/switch-field/switch-field.js +1 -1
- package/lib/new-components/switch-field/switch-field.js.map +1 -1
- package/lib/new-components/switch-field/switch-field.module.css.js +1 -1
- package/lib/new-components/switch-field/switch-field.test.d.ts +1 -0
- package/lib/new-components/tabs/index.d.ts +1 -0
- package/lib/new-components/tabs/tabs.d.ts +92 -0
- package/lib/new-components/tabs/tabs.js +2 -0
- package/lib/new-components/tabs/tabs.js.map +1 -0
- package/lib/new-components/tabs/tabs.module.css.js +2 -0
- package/lib/new-components/tabs/tabs.module.css.js.map +1 -0
- package/lib/new-components/tabs/tabs.test.d.ts +1 -0
- package/lib/new-components/test-helpers.d.ts +9 -0
- package/lib/new-components/text/text.d.ts +38 -5
- package/lib/new-components/text/text.js +1 -1
- package/lib/new-components/text/text.js.map +1 -1
- package/lib/new-components/text/text.module.css.js +1 -1
- package/lib/new-components/text/text.test.d.ts +1 -0
- package/lib/new-components/text-area/text-area.d.ts +2 -2
- package/lib/new-components/text-area/text-area.js.map +1 -1
- package/lib/new-components/text-area/text-area.module.css.js +1 -1
- package/lib/new-components/text-field/text-field.d.ts +7 -4
- package/lib/new-components/text-field/text-field.js +1 -1
- package/lib/new-components/text-field/text-field.js.map +1 -1
- package/lib/new-components/text-field/text-field.module.css.js +1 -1
- package/lib/new-components/text-field/text-field.test.d.ts +1 -0
- package/lib/new-components/text-link/text-link.d.ts +1 -2
- package/lib/new-components/text-link/text-link.js +1 -1
- package/lib/new-components/text-link/text-link.js.map +1 -1
- package/lib/utils/polymorphism.d.ts +151 -0
- package/lib/utils/polymorphism.js +2 -0
- package/lib/utils/polymorphism.js.map +1 -0
- package/package.json +27 -23
- package/styles/alert.css +4 -3
- package/styles/base-button.css +6 -0
- package/styles/base-button.module.css.css +1 -0
- package/styles/base-field.css +7 -3
- package/styles/base-field.module.css.css +1 -1
- package/styles/box.css +3 -0
- package/styles/box.module.css.css +1 -1
- package/styles/checkbox-field.css +6 -2
- package/styles/checkbox-field.module.css.css +1 -1
- package/styles/color-picker.css +1 -1
- package/styles/columns.css +4 -3
- package/styles/columns.module.css.css +1 -1
- package/styles/deprecated-button.css +2 -0
- package/styles/deprecated-loading.css +1 -0
- package/styles/deprecated-modal.css +1 -0
- package/styles/divider.css +4 -2
- package/styles/divider.module.css.css +1 -1
- package/styles/dropdown.css +1 -1
- package/styles/heading.css +4 -2
- package/styles/heading.module.css.css +1 -1
- package/styles/hidden-visually.css +4 -0
- package/styles/hidden-visually.module.css.css +1 -0
- package/styles/hidden.css +4 -0
- package/styles/hidden.module.css.css +1 -0
- package/styles/inline.css +3 -1
- package/styles/loading.css +4 -1
- package/styles/margin.module.css.css +1 -0
- package/styles/menu.css +1 -1
- package/styles/modal.css +10 -1
- package/styles/modal.module.css.css +1 -0
- package/styles/notice.css +4 -3
- package/styles/padding.module.css.css +1 -0
- package/styles/password-field.css +8 -4
- package/styles/reactist.css +24 -19
- package/styles/select-field.css +8 -4
- package/styles/select-field.module.css.css +1 -1
- package/styles/spinner.module.css.css +1 -0
- package/styles/stack.css +4 -2
- package/styles/switch-field.css +9 -4
- package/styles/switch-field.module.css.css +1 -1
- package/styles/tabs.css +5 -1
- package/styles/tabs.module.css.css +1 -0
- package/styles/text-area.css +8 -4
- package/styles/text-area.module.css.css +1 -1
- package/styles/text-field.css +8 -4
- package/styles/text-field.module.css.css +1 -1
- package/styles/text-link.css +3 -1
- package/styles/text.css +4 -2
- package/styles/text.module.css.css +1 -1
- package/styles/tip.css +1 -1
- package/CHANGELOG.md +0 -492
- package/es/components/button/button.js.map +0 -1
- package/es/components/loading/index.js +0 -6
- package/es/components/loading/index.js.map +0 -1
- package/es/components/loading/loading.js.map +0 -1
- package/es/components/menu/type-helpers.js +0 -9
- package/es/components/menu/type-helpers.js.map +0 -1
- package/es/components/modal/index.js.map +0 -1
- package/es/components/modal/modal.js.map +0 -1
- package/es/components/tabs/tabs.js +0 -123
- package/es/components/tabs/tabs.js.map +0 -1
- package/es/new-components/button-link/button-link.module.css.js +0 -4
- package/es/new-components/button-link/button-link.module.css.js.map +0 -1
- package/es/new-components/loading-spinner/loading-spinner.js +0 -37
- package/es/new-components/loading-spinner/loading-spinner.js.map +0 -1
- package/es/new-components/loading-spinner/loading-spinner.module.css.js +0 -4
- package/es/new-components/loading-spinner/loading-spinner.module.css.js.map +0 -1
- package/es/new-components/type-helpers.js +0 -10
- package/es/new-components/type-helpers.js.map +0 -1
- package/lib/components/button/button.js.map +0 -1
- package/lib/components/button/index.d.ts +0 -4
- package/lib/components/button/index.js +0 -2
- package/lib/components/loading/index.d.ts +0 -2
- package/lib/components/loading/index.js.map +0 -1
- package/lib/components/loading/loading.js.map +0 -1
- package/lib/components/menu/type-helpers.d.ts +0 -25
- package/lib/components/menu/type-helpers.js +0 -2
- package/lib/components/menu/type-helpers.js.map +0 -1
- package/lib/components/modal/index.js +0 -2
- package/lib/components/modal/index.js.map +0 -1
- package/lib/components/modal/modal.js.map +0 -1
- package/lib/components/tabs/index.d.ts +0 -1
- package/lib/components/tabs/tabs.d.ts +0 -33
- package/lib/components/tabs/tabs.js +0 -2
- package/lib/components/tabs/tabs.js.map +0 -1
- package/lib/new-components/button-link/button-link.module.css.js +0 -2
- package/lib/new-components/button-link/button-link.module.css.js.map +0 -1
- package/lib/new-components/loading-spinner/index.d.ts +0 -1
- package/lib/new-components/loading-spinner/loading-spinner.d.ts +0 -8
- package/lib/new-components/loading-spinner/loading-spinner.js +0 -2
- package/lib/new-components/loading-spinner/loading-spinner.js.map +0 -1
- package/lib/new-components/loading-spinner/loading-spinner.module.css.js +0 -2
- package/lib/new-components/loading-spinner/loading-spinner.module.css.js.map +0 -1
- package/lib/new-components/type-helpers.d.ts +0 -26
- package/lib/new-components/type-helpers.js +0 -2
- package/lib/new-components/type-helpers.js.map +0 -1
- package/styles/button-link.css +0 -2
- package/styles/button-link.module.css.css +0 -1
- package/styles/button.css +0 -2
- package/styles/loading-spinner.module.css.css +0 -1
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { inheritsLoose as _inheritsLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React__default from 'react';
|
|
3
|
-
import classNames from 'classnames';
|
|
4
|
-
|
|
5
|
-
var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
6
|
-
_inheritsLoose(Tabs, _React$Component);
|
|
7
|
-
|
|
8
|
-
function Tabs(props, context) {
|
|
9
|
-
var _this;
|
|
10
|
-
|
|
11
|
-
_this = _React$Component.call(this, props, context) || this;
|
|
12
|
-
|
|
13
|
-
_this._switchActiveTab = function (tab, i) {
|
|
14
|
-
_this.setState(function () {
|
|
15
|
-
return {
|
|
16
|
-
activeTabIndex: i
|
|
17
|
-
};
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
if (_this.props.onChange) _this.props.onChange(tab.props.value);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
_this._renderTabLinks = function (tabs) {
|
|
24
|
-
return tabs.map(function (t, i) {
|
|
25
|
-
var _t$props = t.props,
|
|
26
|
-
title = _t$props.title,
|
|
27
|
-
disabled = _t$props.disabled;
|
|
28
|
-
var value = t.props.value || i;
|
|
29
|
-
var className = classNames('reactist_tabs__header--item', {
|
|
30
|
-
disabled: disabled,
|
|
31
|
-
active: i === _this.state.activeTabIndex
|
|
32
|
-
});
|
|
33
|
-
return (
|
|
34
|
-
/*#__PURE__*/
|
|
35
|
-
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
|
36
|
-
React__default.createElement("a", {
|
|
37
|
-
className: className,
|
|
38
|
-
href: "",
|
|
39
|
-
key: value,
|
|
40
|
-
onClick: function onClick(event) {
|
|
41
|
-
event.preventDefault();
|
|
42
|
-
|
|
43
|
-
if (!disabled) {
|
|
44
|
-
_this._switchActiveTab(t, i);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}, title)
|
|
48
|
-
);
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
var defaultTab = props.defaultTab,
|
|
53
|
-
onChange = props.onChange;
|
|
54
|
-
var children = React__default.Children.toArray(_this.props.children);
|
|
55
|
-
var hasDefault = defaultTab || defaultTab === 0;
|
|
56
|
-
|
|
57
|
-
if (hasDefault || onChange) {
|
|
58
|
-
if (children) {
|
|
59
|
-
var missing = children.find(function (c) {
|
|
60
|
-
return !c.props.value && c.props.value !== 0;
|
|
61
|
-
});
|
|
62
|
-
if (missing) throw new Error('(Tab) Missing property: all Tab must have "value" set if "defaultTab" or "onChange" is used');
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (hasDefault && children) {
|
|
67
|
-
var i = children.findIndex(function (x) {
|
|
68
|
-
return x.props.value === defaultTab;
|
|
69
|
-
});
|
|
70
|
-
if (i === -1) throw new Error( // `hasDefault` being `true` guarantees `defaultTab` being a `number`.
|
|
71
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
72
|
-
"(Tabs) Unable to find Tab with the matching defaultTab value \"" + defaultTab + "\"");
|
|
73
|
-
_this.state = {
|
|
74
|
-
activeTabIndex: i
|
|
75
|
-
};
|
|
76
|
-
} else {
|
|
77
|
-
_this.state = {
|
|
78
|
-
activeTabIndex: 0
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return _this;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
var _proto = Tabs.prototype;
|
|
86
|
-
|
|
87
|
-
_proto.render = function render() {
|
|
88
|
-
// ensures that single or no child components don't throw
|
|
89
|
-
var children = React__default.Children.toArray(this.props.children);
|
|
90
|
-
var activeTab = children[this.state.activeTabIndex] || children[0] || null;
|
|
91
|
-
var cls = classNames("reactist_tabs" + (this.props.spreadLayout ? '--spreadlayout' : ''));
|
|
92
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
93
|
-
className: cls
|
|
94
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
95
|
-
className: "reactist_tabs__header"
|
|
96
|
-
}, this._renderTabLinks(children)), /*#__PURE__*/React__default.createElement("div", {
|
|
97
|
-
className: "reactist_tabs__body"
|
|
98
|
-
}, activeTab));
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
return Tabs;
|
|
102
|
-
}(React__default.Component);
|
|
103
|
-
|
|
104
|
-
Tabs.displayName = 'Tabs';
|
|
105
|
-
Tabs.defaultProps = {
|
|
106
|
-
spreadLayout: false
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
var Tab = function Tab(_ref) {
|
|
110
|
-
var children = _ref.children,
|
|
111
|
-
className = _ref.className;
|
|
112
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
113
|
-
className: classNames('reactist_tabs__tab', className)
|
|
114
|
-
}, children);
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
Tab.displayName = 'Tab';
|
|
118
|
-
Tab.defaultProps = {
|
|
119
|
-
disabled: false
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
export { Tab, Tabs };
|
|
123
|
-
//# sourceMappingURL=tabs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sources":["../../../src/components/tabs/tabs.tsx"],"sourcesContent":["import React from 'react'\nimport classNames from 'classnames'\n\nimport './tabs.less'\n\ntype Props = {\n disabled?: boolean\n /** Whether the tabs should take all available space and distribute it evenly or use the minimum required **/\n spreadLayout?: boolean\n /** selects the tab whose value prop matches this prop */\n defaultTab?: number\n /** Callback for tab change event. Tab value will be passed */\n onChange?: (value: string | number | undefined) => void\n}\n\ntype State = {\n activeTabIndex: number\n}\n\nclass Tabs extends React.Component<React.PropsWithChildren<Props>, State> {\n public static displayName: string\n public static defaultProps: Props\n\n constructor(props: Props, context: unknown) {\n super(props, context)\n const { defaultTab, onChange } = props\n const children = React.Children.toArray(this.props.children) as React.Component<TabProps>[]\n\n const hasDefault = defaultTab || defaultTab === 0\n if (hasDefault || onChange) {\n if (children) {\n const missing = children.find(\n (c: React.Component<TabProps>) => !c.props.value && c.props.value !== 0,\n )\n if (missing)\n throw new Error(\n '(Tab) Missing property: all Tab must have \"value\" set if \"defaultTab\" or \"onChange\" is used',\n )\n }\n }\n\n if (hasDefault && children) {\n const i = children.findIndex(\n (x: React.Component<TabProps>) => x.props.value === defaultTab,\n )\n if (i === -1)\n throw new Error(\n // `hasDefault` being `true` guarantees `defaultTab` being a `number`.\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n `(Tabs) Unable to find Tab with the matching defaultTab value \"${defaultTab}\"`,\n )\n\n this.state = { activeTabIndex: i }\n } else {\n this.state = { activeTabIndex: 0 }\n }\n }\n\n _switchActiveTab = (tab: React.Component<TabProps>, i: number) => {\n this.setState(() => ({ activeTabIndex: i }))\n if (this.props.onChange) this.props.onChange(tab.props.value)\n }\n\n _renderTabLinks = (tabs: React.Component<TabProps>[]) => {\n return tabs.map((t, i) => {\n const { title, disabled } = t.props\n const value = t.props.value || i\n const className = classNames('reactist_tabs__header--item', {\n disabled,\n active: i === this.state.activeTabIndex,\n })\n\n return (\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\n <a\n className={className}\n href=\"\"\n key={value}\n onClick={(event) => {\n event.preventDefault()\n if (!disabled) {\n this._switchActiveTab(t, i)\n }\n }}\n >\n {title}\n </a>\n )\n })\n }\n\n render() {\n // ensures that single or no child components don't throw\n const children = React.Children.toArray(this.props.children) as React.Component<TabProps>[]\n const activeTab = children[this.state.activeTabIndex] || children[0] || null\n\n const cls = classNames(`reactist_tabs${this.props.spreadLayout ? '--spreadlayout' : ''}`)\n\n return (\n <div className={cls}>\n <div className=\"reactist_tabs__header\">{this._renderTabLinks(children)}</div>\n <div className=\"reactist_tabs__body\">{activeTab}</div>\n </div>\n )\n }\n}\nTabs.displayName = 'Tabs'\n\nTabs.defaultProps = {\n spreadLayout: false,\n}\n\ntype TabProps = {\n /** Additional css class applied to Tab. */\n className?: string\n /** Disabled tabs can't be selected. */\n disabled?: boolean\n /* It assigns a value to the tab so that it can be selected by the Tabs.*/\n value?: string | number\n /** Title of the tab. */\n title?: React.ReactNode\n}\n\nconst Tab: React.FC<React.PropsWithChildren<TabProps>> = ({ children, className }) => (\n <div className={classNames('reactist_tabs__tab', className)}>{children}</div>\n)\nTab.displayName = 'Tab'\nTab.defaultProps = {\n disabled: false,\n}\n\nexport { Tabs, Tab }\n"],"names":["Tabs","props","context","tab","i","setState","activeTabIndex","onChange","value","tabs","map","t","title","disabled","className","classNames","active","state","React","href","key","onClick","event","preventDefault","_switchActiveTab","defaultTab","children","Children","toArray","hasDefault","missing","find","c","Error","findIndex","x","render","activeTab","cls","spreadLayout","_renderTabLinks","Component","displayName","defaultProps","Tab"],"mappings":";;;;IAmBMA;;;AAIF,gBAAYC,KAAZ,EAA0BC,OAA1B;;;AACI,wCAAMD,KAAN,EAAaC,OAAb;;AAkCJ,0BAAA,GAAmB,UAACC,GAAD,EAAiCC,CAAjC;AACf,YAAKC,QAAL,CAAc;AAAA,eAAO;AAAEC,UAAAA,cAAc,EAAEF;AAAlB,SAAP;AAAA,OAAd;;AACA,UAAI,MAAKH,KAAL,CAAWM,QAAf,EAAyB,MAAKN,KAAL,CAAWM,QAAX,CAAoBJ,GAAG,CAACF,KAAJ,CAAUO,KAA9B;AAC5B,KAHD;;AAKA,yBAAA,GAAkB,UAACC,IAAD;AACd,aAAOA,IAAI,CAACC,GAAL,CAAS,UAACC,CAAD,EAAIP,CAAJ;uBACgBO,CAAC,CAACV;YAAtBW,iBAAAA;YAAOC,oBAAAA;AACf,YAAML,KAAK,GAAGG,CAAC,CAACV,KAAF,CAAQO,KAAR,IAAiBJ,CAA/B;AACA,YAAMU,SAAS,GAAGC,UAAU,CAAC,6BAAD,EAAgC;AACxDF,UAAAA,QAAQ,EAARA,QADwD;AAExDG,UAAAA,MAAM,EAAEZ,CAAC,KAAK,MAAKa,KAAL,CAAWX;AAF+B,SAAhC,CAA5B;AAKA;AAAA;AACI;AACAY,UAAAA,4BAAA,IAAA;AACIJ,YAAAA,SAAS,EAAEA;AACXK,YAAAA,IAAI,EAAC;AACLC,YAAAA,GAAG,EAAEZ;AACLa,YAAAA,OAAO,EAAE,iBAACC,KAAD;AACLA,cAAAA,KAAK,CAACC,cAAN;;AACA,kBAAI,CAACV,QAAL,EAAe;AACX,sBAAKW,gBAAL,CAAsBb,CAAtB,EAAyBP,CAAzB;AACH;AACJ;WATL,EAWKQ,KAXL;AAFJ;AAgBH,OAxBM,CAAP;AAyBH,KA1BD;;QAtCYa,aAAyBxB,MAAzBwB;QAAYlB,WAAaN,MAAbM;AACpB,QAAMmB,QAAQ,GAAGR,cAAK,CAACS,QAAN,CAAeC,OAAf,CAAuB,MAAK3B,KAAL,CAAWyB,QAAlC,CAAjB;AAEA,QAAMG,UAAU,GAAGJ,UAAU,IAAIA,UAAU,KAAK,CAAhD;;AACA,QAAII,UAAU,IAAItB,QAAlB,EAA4B;AACxB,UAAImB,QAAJ,EAAc;AACV,YAAMI,OAAO,GAAGJ,QAAQ,CAACK,IAAT,CACZ,UAACC,CAAD;AAAA,iBAAkC,CAACA,CAAC,CAAC/B,KAAF,CAAQO,KAAT,IAAkBwB,CAAC,CAAC/B,KAAF,CAAQO,KAAR,KAAkB,CAAtE;AAAA,SADY,CAAhB;AAGA,YAAIsB,OAAJ,EACI,MAAM,IAAIG,KAAJ,CACF,6FADE,CAAN;AAGP;AACJ;;AAED,QAAIJ,UAAU,IAAIH,QAAlB,EAA4B;AACxB,UAAMtB,CAAC,GAAGsB,QAAQ,CAACQ,SAAT,CACN,UAACC,CAAD;AAAA,eAAkCA,CAAC,CAAClC,KAAF,CAAQO,KAAR,KAAkBiB,UAApD;AAAA,OADM,CAAV;AAGA,UAAIrB,CAAC,KAAK,CAAC,CAAX,EACI,MAAM,IAAI6B,KAAJ;AAEF;AAFE,0EAG+DR,UAH/D,QAAN;AAMJ,YAAKR,KAAL,GAAa;AAAEX,QAAAA,cAAc,EAAEF;AAAlB,OAAb;AACH,KAZD,MAYO;AACH,YAAKa,KAAL,GAAa;AAAEX,QAAAA,cAAc,EAAE;AAAlB,OAAb;AACH;;;AACJ;;;;SAmCD8B,SAAA;AACI;AACA,QAAMV,QAAQ,GAAGR,cAAK,CAACS,QAAN,CAAeC,OAAf,CAAuB,KAAK3B,KAAL,CAAWyB,QAAlC,CAAjB;AACA,QAAMW,SAAS,GAAGX,QAAQ,CAAC,KAAKT,KAAL,CAAWX,cAAZ,CAAR,IAAuCoB,QAAQ,CAAC,CAAD,CAA/C,IAAsD,IAAxE;AAEA,QAAMY,GAAG,GAAGvB,UAAU,oBAAiB,KAAKd,KAAL,CAAWsC,YAAX,GAA0B,gBAA1B,GAA6C,EAA9D,EAAtB;AAEA,wBACIrB,4BAAA,MAAA;AAAKJ,MAAAA,SAAS,EAAEwB;KAAhB,eACIpB,4BAAA,MAAA;AAAKJ,MAAAA,SAAS,EAAC;KAAf,EAAwC,KAAK0B,eAAL,CAAqBd,QAArB,CAAxC,CADJ,eAEIR,4BAAA,MAAA;AAAKJ,MAAAA,SAAS,EAAC;KAAf,EAAsCuB,SAAtC,CAFJ,CADJ;AAMH;;;EArFcnB,cAAK,CAACuB;;AAuFzBzC,IAAI,CAAC0C,WAAL,GAAmB,MAAnB;AAEA1C,IAAI,CAAC2C,YAAL,GAAoB;AAChBJ,EAAAA,YAAY,EAAE;AADE,CAApB;;IAeMK,GAAG,GAAgD,SAAnDA,GAAmD;AAAA,MAAGlB,QAAH,QAAGA,QAAH;AAAA,MAAaZ,SAAb,QAAaA,SAAb;AAAA,sBACrDI,4BAAA,MAAA;AAAKJ,IAAAA,SAAS,EAAEC,UAAU,CAAC,oBAAD,EAAuBD,SAAvB;GAA1B,EAA8DY,QAA9D,CADqD;AAAA;;AAGzDkB,GAAG,CAACF,WAAJ,GAAkB,KAAlB;AACAE,GAAG,CAACD,YAAJ,GAAmB;AACf9B,EAAAA,QAAQ,EAAE;AADK,CAAnB;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button-link.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
import styles from './loading-spinner.module.css.js';
|
|
3
|
-
|
|
4
|
-
var sizeMapping = {
|
|
5
|
-
small: 24,
|
|
6
|
-
medium: 36,
|
|
7
|
-
large: 48
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
function LoadingSpinner(_ref) {
|
|
11
|
-
var _ref$size = _ref.size,
|
|
12
|
-
size = _ref$size === void 0 ? 'small' : _ref$size,
|
|
13
|
-
label = _ref.label;
|
|
14
|
-
var numericSize = sizeMapping[size];
|
|
15
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
16
|
-
className: styles.container,
|
|
17
|
-
"aria-label": label,
|
|
18
|
-
"aria-live": "polite",
|
|
19
|
-
role: "alert"
|
|
20
|
-
}, /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement("svg", {
|
|
21
|
-
width: numericSize,
|
|
22
|
-
height: numericSize,
|
|
23
|
-
viewBox: "0 0 24 24"
|
|
24
|
-
}, /*#__PURE__*/React__default.createElement("g", {
|
|
25
|
-
fill: "none",
|
|
26
|
-
fillRule: "nonzero"
|
|
27
|
-
}, /*#__PURE__*/React__default.createElement("path", {
|
|
28
|
-
className: styles.spinner,
|
|
29
|
-
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"
|
|
30
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
31
|
-
className: styles.spinnerBackground,
|
|
32
|
-
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"
|
|
33
|
-
})))));
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export { LoadingSpinner };
|
|
37
|
-
//# sourceMappingURL=loading-spinner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loading-spinner.js","sources":["../../../src/new-components/loading-spinner/loading-spinner.tsx"],"sourcesContent":["import React from 'react'\nimport styles from './loading-spinner.module.css'\n\ntype Size = 'small' | 'medium' | 'large'\n\ntype Props = {\n label: string\n size?: Size\n}\n\nconst sizeMapping: Record<Size, number> = {\n small: 24,\n medium: 36,\n large: 48,\n}\n\nfunction LoadingSpinner({ size = 'small', label }: Props) {\n const numericSize = sizeMapping[size]\n return (\n <div className={styles.container} aria-label={label} aria-live=\"polite\" role=\"alert\">\n <span>\n <svg width={numericSize} height={numericSize} viewBox=\"0 0 24 24\">\n <g fill=\"none\" fillRule=\"nonzero\">\n <path\n className={styles.spinner}\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 className={styles.spinnerBackground}\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}\n\nexport { LoadingSpinner }\n"],"names":["sizeMapping","small","medium","large","LoadingSpinner","size","label","numericSize","React","className","styles","container","role","width","height","viewBox","fill","fillRule","spinner","d","spinnerBackground"],"mappings":";;;AAUA,IAAMA,WAAW,GAAyB;AACtCC,EAAAA,KAAK,EAAE,EAD+B;AAEtCC,EAAAA,MAAM,EAAE,EAF8B;AAGtCC,EAAAA,KAAK,EAAE;AAH+B,CAA1C;;AAMA,SAASC,cAAT;uBAA0BC;MAAAA,8BAAO;MAASC,aAAAA;AACtC,MAAMC,WAAW,GAAGP,WAAW,CAACK,IAAD,CAA/B;AACA,sBACIG,4BAAA,MAAA;AAAKC,IAAAA,SAAS,EAAEC,MAAM,CAACC;kBAAuBL;iBAAiB;AAASM,IAAAA,IAAI,EAAC;GAA7E,eACIJ,4BAAA,OAAA,MAAA,eACIA,4BAAA,MAAA;AAAKK,IAAAA,KAAK,EAAEN;AAAaO,IAAAA,MAAM,EAAEP;AAAaQ,IAAAA,OAAO,EAAC;GAAtD,eACIP,4BAAA,IAAA;AAAGQ,IAAAA,IAAI,EAAC;AAAOC,IAAAA,QAAQ,EAAC;GAAxB,eACIT,4BAAA,OAAA;AACIC,IAAAA,SAAS,EAAEC,MAAM,CAACQ;AAClBC,IAAAA,CAAC,EAAC;GAFN,CADJ,eAKIX,4BAAA,OAAA;AACIC,IAAAA,SAAS,EAAEC,MAAM,CAACU;AAClBD,IAAAA,CAAC,EAAC;GAFN,CALJ,CADJ,CADJ,CADJ,CADJ;AAkBH;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loading-spinner.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type-helpers.js","sources":["../../src/new-components/type-helpers.tsx"],"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 { ExtractHTMLAttributes, RenderProp, As as ComponentTypes } from 'reakit-utils/types'\n\ntype PropsWithAs<P, T extends ComponentTypes> = P &\n Omit<React.ComponentProps<T>, 'component' | keyof P> & {\n component?: ComponentTypes\n children?: React.ReactNode | RenderProp<ExtractHTMLAttributes<any>>\n }\n\ntype PropsFromAs<ComponentProps, ComponentType extends ComponentTypes> = PropsWithAs<\n ComponentProps,\n ComponentType\n> & { component: ComponentTypes }\n\ntype ElementTagNameMap = HTMLElementTagNameMap &\n Pick<SVGElementTagNameMap, Exclude<keyof SVGElementTagNameMap, keyof HTMLElementTagNameMap>>\n\ntype ElementByTag<TagName extends keyof ElementTagNameMap> = ElementTagNameMap[TagName]\n\ninterface ForwardRefFunction<ComponentProps, ComponentType extends ComponentTypes> {\n (\n props: React.PropsWithChildren<PropsFromAs<ComponentProps, ComponentType>>,\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\ninterface ForwardRefComponentWithAs<ComponentProps, ComponentType extends ComponentTypes> {\n <TT extends ComponentTypes = ComponentType>(\n props: PropsWithAs<ComponentProps, TT>,\n ): React.ReactElement | null\n (props: PropsWithAs<ComponentProps, ComponentType>): React.ReactElement | null\n readonly $$typeof: symbol\n defaultProps?: Partial<PropsWithAs<ComponentProps, ComponentType>>\n propTypes?: React.WeakValidationMap<PropsWithAs<ComponentProps, ComponentType>>\n displayName?: string\n}\n\nfunction forwardRefWithAs<ComponentProps, ComponentType extends ComponentTypes = ComponentTypes>(\n render: ForwardRefFunction<ComponentProps, ComponentType>,\n) {\n return React.forwardRef(render) as ForwardRefComponentWithAs<ComponentProps, ComponentType>\n}\n\nexport type { ComponentTypes, ForwardRefComponentWithAs }\nexport { forwardRefWithAs }\n"],"names":["forwardRefWithAs","render","React"],"mappings":";;AAAA;;AAkFA,SAASA,gBAAT,CACIC,MADJ;AAGI,sBAAOC,UAAA,CAAiBD,MAAjB,CAAP;AACH;;;;"}
|
|
@@ -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":"2RAsCMA,EAASC,EAAMC,YAA2C,WAY5DC,WAVIC,KAAAA,aAAO,WACPC,IAAAA,YACAC,KAAAA,aAAO,gBACPC,QAAAA,oBACAC,SAAAA,gBACAC,IAAAA,QACAC,IAAAA,QACAC,IAAAA,SACGC,kHAIDC,EAAYC,EACd,kBACAT,sBAA8BA,EAAY,KACjC,YAATC,sBAAyCA,EAAS,KAClD,4BAA8BC,GAC9BK,EAAMC,WAGJE,EACFd,0CACQW,GACJT,IAAKA,EACLC,KAAMA,EACNS,UAAWA,EACXL,SAAUA,GAAYD,EACtBG,QAASA,IAERC,UAIFF,EAAUR,gBAACe,WAAQC,QAASR,GAAUM,GAAoBA,KAGrEf,EAAOkB,YAAc,SAErBlB,EAAOmB,aAAe,CAClBb,KAAM,UACNC,SAAS,EACTC,UAAU"}
|
|
@@ -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","spinnerColor","bgColor","size","ariaLabel","React","className","classNames","role","width","height","viewBox","fill","fillRule","d","displayName"],"mappings":"+LAkBA,SAASA,aAELC,aAAAA,aAAe,gBACfC,QAAAA,aAAU,gBACVC,KAAAA,aAAO,SACP,cAAcC,aAAY,mBAGtBC,uBACIC,UAAWC,EAAW,qBAR9BD,wBASoBF,cACF,YACVI,KAAK,SAELH,wBAAMC,UAAU,6BACZD,uBAAKI,MAAON,EAAMO,OAAQP,EAAMQ,QAAS,aACrCN,qBAAGO,KAAK,OAAOC,SAAS,WACpBR,wBACIO,KAAMX,EACNa,EAAE,iJAENT,wBACIO,KAAMV,EACNY,EAAE,kOAQ9Bd,EAAQe,YAAc"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { PropsWithAs as ReakitPropsWithAs, As } from 'reakit-utils/types';
|
|
3
|
-
/**
|
|
4
|
-
* We revert here the order from how reakit declares it. This is to be more aligned with how
|
|
5
|
-
* React.fowardRef generic arguments order is defined (element type first, props last).
|
|
6
|
-
*/
|
|
7
|
-
declare type PropsWithAs<ComponentType extends As, ComponentProps = {}> = ReakitPropsWithAs<ComponentProps, ComponentType>;
|
|
8
|
-
declare type PropsFromAs<ComponentType extends As, ComponentProps> = (PropsWithAs<ComponentType, ComponentProps> & {
|
|
9
|
-
as: ComponentType;
|
|
10
|
-
}) & PropsWithAs<ComponentType, ComponentProps>;
|
|
11
|
-
declare type ElementTagNameMap = HTMLElementTagNameMap & Pick<SVGElementTagNameMap, Exclude<keyof SVGElementTagNameMap, keyof HTMLElementTagNameMap>>;
|
|
12
|
-
declare type ElementByTag<TagName extends keyof ElementTagNameMap> = ElementTagNameMap[TagName];
|
|
13
|
-
interface ForwardRefFunction<ComponentType extends As, ComponentProps = {}> {
|
|
14
|
-
(props: React.PropsWithChildren<PropsFromAs<ComponentType, ComponentProps>>, ref: ((instance: (ComponentType extends keyof ElementTagNameMap ? ElementByTag<ComponentType> : any) | null) => void) | React.MutableRefObject<(ComponentType extends keyof ElementTagNameMap ? ElementByTag<ComponentType> : any) | null> | null): React.ReactElement | null;
|
|
15
|
-
displayName?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface ForwardRefComponentWithAs<ComponentType extends As, ComponentProps> {
|
|
18
|
-
<TT extends As = ComponentType>(props: PropsWithAs<TT, ComponentProps>): React.ReactElement | null;
|
|
19
|
-
readonly $$typeof: symbol;
|
|
20
|
-
defaultProps?: Partial<PropsWithAs<ComponentType, ComponentProps>>;
|
|
21
|
-
propTypes?: React.WeakValidationMap<PropsWithAs<ComponentType, ComponentProps>>;
|
|
22
|
-
displayName?: string;
|
|
23
|
-
}
|
|
24
|
-
export declare function forwardRefWithAs<ComponentType extends As = 'div', ComponentProps = {}>(render: ForwardRefFunction<ComponentType, ComponentProps>): ForwardRefComponentWithAs<ComponentType, ComponentProps>;
|
|
25
|
-
export {};
|
|
@@ -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":["render","React"],"mappings":"6HAsFIA,UAEOC,aAAiBD"}
|
|
@@ -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":"gHAGe,CAAEA,IAAAA,MAAKC,OAAAA,SAAQC,KAAAA,OAAMC,QAAAA"}
|
|
@@ -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","this","_handleKeyDown","componentWillUnmount","removeEventListener","render","props","style","children","closeOnOverlayClick","className","classnames","large","medium","React","onClick","_handleOverlayClick","undefined","Component","displayName","defaultProps","Header","beforeClose","title","subtitle","bind","href","CloseIcon","Body","icon","showCloseIcon","plain","Actions","_onClick","Children","map","child","close","cloneElement","_this2"],"mappings":"yTAqBMA,qFAYY,eAEJC,EAAeC,SAASC,eAAe,aAC7CC,EAASC,uBAAuBJ,qBAGnB,SAACK,GACQ,KAAlBA,EAAMC,YAEDC,cACDF,EAAMG,gBAAgBH,EAAMG,yCAIlB,SAACH,GAEfA,EAAMI,kBAAkBC,UACH,qBAApBL,EAAMI,OAAOE,IAAiD,2BAApBN,EAAMI,OAAOE,OAEnDJ,iEA3BbK,kBAAA,WACIC,OAAOC,iBAAiB,UAAWC,KAAKC,mBAG5CC,qBAAA,WACIJ,OAAOK,oBAAoB,UAAWH,KAAKC,mBA0B/CG,OAAA,iBACoEJ,KAAKK,MAA9CC,IAAAA,MAAOC,IAAAA,SAAUC,IAAAA,oBAElCC,EAAYC,EAAW,qBAAsB,CAAEC,QAF7CA,MAEoDC,SAF7CA,QAEuDZ,KAAKK,MAAMI,kBAG7EI,uBACIJ,UAAU,mBACVb,GAAG,mBACHkB,QAASN,EAAsBR,KAAKe,yBAAsBC,GAE1DH,uBAAKJ,UAAU,yBAAyBb,GAAG,0BACvCiB,uBAAKP,MAAOA,EAAOG,UAAWA,GACzBF,SAhDPM,EAAMI,WAuDxBjC,EAAIkC,YAAc,YAClBlC,EAAImC,aAAe,CACfR,OAAO,EACPH,qBAAqB,OAYnBY,gHAIF5B,YAAA,SAAYF,GACRA,EAAMG,iBACgC,mBAA3BO,KAAKK,MAAMgB,kBACbhB,MAAMgB,kBAGTpC,EAAeC,SAASC,eAAe,aAC7CC,EAASC,uBAAuBJ,MAGpCmB,OAAA,kBAGQS,uBAAKJ,UAAU,8BACXI,yBACKb,KAAKK,MAAMiB,OAAST,wBAAMJ,UAAU,SAAST,KAAKK,MAAMiB,OACxDtB,KAAKK,MAAMkB,UAAYV,wBAAMJ,UAAU,YAAYT,KAAKK,MAAMkB,UAC9DvB,KAAKK,MAAME,UAEhBM,qBAAGJ,UAAU,QAAQK,QAASd,KAAKR,YAAYgC,KAAKxB,MAAOyB,KAAK,KAC5DZ,gBAACa,sBAxBAb,EAAMI,WA+B3BG,EAAOF,YAAc,mBAiBfS,gHAIFnC,YAAA,SAAYF,GACRA,EAAMG,qBAEAR,EAAeC,SAASC,eAAe,aAC7CC,EAASC,uBAAuBJ,MAGpCmB,OAAA,iBAC4DJ,KAAKK,MAArDuB,IAAAA,KAAarB,IAAAA,SAAUD,IAAAA,MAAOuB,IAAAA,cAChCpB,EAAYC,EAAW,2BAA4B,CAAEoB,QAD7CA,OACsD9B,KAAKK,MAAMI,kBAI3EI,uBAAKJ,UAAWA,EAAWH,MAAOA,GAC7BuB,GACGhB,qBAAGJ,UAAU,QAAQK,QAASd,KAAKR,YAAYgC,KAAKxB,MAAOyB,KAAK,KAC5DZ,gBAACa,iBAGRE,EACGf,uBAAKJ,UAAU,UACXI,uBAAKJ,UAAU,iBAAiBmB,GAChCf,uBAAKJ,UAAU,WAAWF,IAG9BA,OA7BDM,EAAMI,WAoCzBU,EAAKT,YAAc,aACnBS,EAAKR,aAAe,CAChBU,eAAe,OAgBbE,gHAGFC,SAAA,SAASlB,GACDA,GACAA,QAGE7B,EAAeC,SAASC,eAAe,aAC7CC,EAASC,uBAAuBJ,MAGpCmB,OAAA,sBACUG,EAAWM,EAAMoB,SAASC,SAGvB7B,MAAME,UACX,SAAC4B,UACOA,GAASA,EAAM9B,OAAS8B,EAAM9B,MAAM+B,MAC7BvB,EAAMwB,aAAaF,EAAO,CAC7BrB,QAAS,kBAAMwB,EAAKN,SAASG,EAAM9B,MAAMS,YAGtCqB,EAAQtB,EAAMwB,aAAaF,GAAStB,2CAKhDA,uBAAKJ,UAAU,+BAA+BF,OA5BvCM,EAAMI,WA+B5Bc,EAAQb,YAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Tabs, Tab } from './tabs';
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './tabs.less';
|
|
3
|
-
declare type Props = {
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
/** Whether the tabs should take all available space and distribute it evenly or use the minimum required **/
|
|
6
|
-
spreadLayout?: boolean;
|
|
7
|
-
/** selects the tab whose value prop matches this prop */
|
|
8
|
-
defaultTab?: number;
|
|
9
|
-
/** Callback for tab change event. Tab value will be passed */
|
|
10
|
-
onChange?: (value: string | number | undefined) => void;
|
|
11
|
-
};
|
|
12
|
-
declare type State = {
|
|
13
|
-
activeTabIndex: number;
|
|
14
|
-
};
|
|
15
|
-
declare class Tabs extends React.Component<React.PropsWithChildren<Props>, State> {
|
|
16
|
-
static displayName: string;
|
|
17
|
-
static defaultProps: Props;
|
|
18
|
-
constructor(props: Props, context: unknown);
|
|
19
|
-
_switchActiveTab: (tab: React.Component<TabProps>, i: number) => void;
|
|
20
|
-
_renderTabLinks: (tabs: React.Component<TabProps>[]) => JSX.Element[];
|
|
21
|
-
render(): JSX.Element;
|
|
22
|
-
}
|
|
23
|
-
declare type TabProps = {
|
|
24
|
-
/** Additional css class applied to Tab. */
|
|
25
|
-
className?: string;
|
|
26
|
-
/** Disabled tabs can't be selected. */
|
|
27
|
-
disabled?: boolean;
|
|
28
|
-
value?: string | number;
|
|
29
|
-
/** Title of the tab. */
|
|
30
|
-
title?: React.ReactNode;
|
|
31
|
-
};
|
|
32
|
-
declare const Tab: React.FC<React.PropsWithChildren<TabProps>>;
|
|
33
|
-
export { Tabs, Tab };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var a=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=e(require("react")),r=e(require("classnames")),n=function(e){function n(a,n){var s;(s=e.call(this,a,n)||this)._switchActiveTab=function(e,a){s.setState((function(){return{activeTabIndex:a}})),s.props.onChange&&s.props.onChange(e.props.value)},s._renderTabLinks=function(e){return e.map((function(e,a){var n=e.props,i=n.title,o=n.disabled,l=e.props.value||a,u=r("reactist_tabs__header--item",{disabled:o,active:a===s.state.activeTabIndex});return t.createElement("a",{className:u,href:"",key:l,onClick:function(t){t.preventDefault(),o||s._switchActiveTab(e,a)}},i)}))};var i=a.defaultTab,o=a.onChange,l=t.Children.toArray(s.props.children),u=i||0===i;if((u||o)&&l&&l.find((function(e){return!e.props.value&&0!==e.props.value})))throw new Error('(Tab) Missing property: all Tab must have "value" set if "defaultTab" or "onChange" is used');if(u&&l){var c=l.findIndex((function(e){return e.props.value===i}));if(-1===c)throw new Error('(Tabs) Unable to find Tab with the matching defaultTab value "'+i+'"');s.state={activeTabIndex:c}}else s.state={activeTabIndex:0};return s}return a.inheritsLoose(n,e),n.prototype.render=function(){var e=t.Children.toArray(this.props.children),a=e[this.state.activeTabIndex]||e[0]||null,n=r("reactist_tabs"+(this.props.spreadLayout?"--spreadlayout":""));return t.createElement("div",{className:n},t.createElement("div",{className:"reactist_tabs__header"},this._renderTabLinks(e)),t.createElement("div",{className:"reactist_tabs__body"},a))},n}(t.Component);n.displayName="Tabs",n.defaultProps={spreadLayout:!1};var s=function(e){var a=e.children;return t.createElement("div",{className:r("reactist_tabs__tab",e.className)},a)};s.displayName="Tab",s.defaultProps={disabled:!1},exports.Tab=s,exports.Tabs=n;
|
|
2
|
-
//# sourceMappingURL=tabs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sources":["../../../src/components/tabs/tabs.tsx"],"sourcesContent":["import React from 'react'\nimport classNames from 'classnames'\n\nimport './tabs.less'\n\ntype Props = {\n disabled?: boolean\n /** Whether the tabs should take all available space and distribute it evenly or use the minimum required **/\n spreadLayout?: boolean\n /** selects the tab whose value prop matches this prop */\n defaultTab?: number\n /** Callback for tab change event. Tab value will be passed */\n onChange?: (value: string | number | undefined) => void\n}\n\ntype State = {\n activeTabIndex: number\n}\n\nclass Tabs extends React.Component<React.PropsWithChildren<Props>, State> {\n public static displayName: string\n public static defaultProps: Props\n\n constructor(props: Props, context: unknown) {\n super(props, context)\n const { defaultTab, onChange } = props\n const children = React.Children.toArray(this.props.children) as React.Component<TabProps>[]\n\n const hasDefault = defaultTab || defaultTab === 0\n if (hasDefault || onChange) {\n if (children) {\n const missing = children.find(\n (c: React.Component<TabProps>) => !c.props.value && c.props.value !== 0,\n )\n if (missing)\n throw new Error(\n '(Tab) Missing property: all Tab must have \"value\" set if \"defaultTab\" or \"onChange\" is used',\n )\n }\n }\n\n if (hasDefault && children) {\n const i = children.findIndex(\n (x: React.Component<TabProps>) => x.props.value === defaultTab,\n )\n if (i === -1)\n throw new Error(\n // `hasDefault` being `true` guarantees `defaultTab` being a `number`.\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n `(Tabs) Unable to find Tab with the matching defaultTab value \"${defaultTab}\"`,\n )\n\n this.state = { activeTabIndex: i }\n } else {\n this.state = { activeTabIndex: 0 }\n }\n }\n\n _switchActiveTab = (tab: React.Component<TabProps>, i: number) => {\n this.setState(() => ({ activeTabIndex: i }))\n if (this.props.onChange) this.props.onChange(tab.props.value)\n }\n\n _renderTabLinks = (tabs: React.Component<TabProps>[]) => {\n return tabs.map((t, i) => {\n const { title, disabled } = t.props\n const value = t.props.value || i\n const className = classNames('reactist_tabs__header--item', {\n disabled,\n active: i === this.state.activeTabIndex,\n })\n\n return (\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\n <a\n className={className}\n href=\"\"\n key={value}\n onClick={(event) => {\n event.preventDefault()\n if (!disabled) {\n this._switchActiveTab(t, i)\n }\n }}\n >\n {title}\n </a>\n )\n })\n }\n\n render() {\n // ensures that single or no child components don't throw\n const children = React.Children.toArray(this.props.children) as React.Component<TabProps>[]\n const activeTab = children[this.state.activeTabIndex] || children[0] || null\n\n const cls = classNames(`reactist_tabs${this.props.spreadLayout ? '--spreadlayout' : ''}`)\n\n return (\n <div className={cls}>\n <div className=\"reactist_tabs__header\">{this._renderTabLinks(children)}</div>\n <div className=\"reactist_tabs__body\">{activeTab}</div>\n </div>\n )\n }\n}\nTabs.displayName = 'Tabs'\n\nTabs.defaultProps = {\n spreadLayout: false,\n}\n\ntype TabProps = {\n /** Additional css class applied to Tab. */\n className?: string\n /** Disabled tabs can't be selected. */\n disabled?: boolean\n /* It assigns a value to the tab so that it can be selected by the Tabs.*/\n value?: string | number\n /** Title of the tab. */\n title?: React.ReactNode\n}\n\nconst Tab: React.FC<React.PropsWithChildren<TabProps>> = ({ children, className }) => (\n <div className={classNames('reactist_tabs__tab', className)}>{children}</div>\n)\nTab.displayName = 'Tab'\nTab.defaultProps = {\n disabled: false,\n}\n\nexport { Tabs, Tab }\n"],"names":["Tabs","props","context","tab","i","setState","activeTabIndex","_this","onChange","value","tabs","map","t","title","disabled","className","classNames","active","state","React","href","key","onClick","event","preventDefault","_switchActiveTab","defaultTab","children","Children","toArray","hasDefault","find","c","Error","findIndex","x","render","this","activeTab","cls","spreadLayout","_renderTabLinks","Component","displayName","defaultProps","Tab"],"mappings":"wPAmBMA,yBAIUC,EAAcC,wBAChBD,EAAOC,2BAkCE,SAACC,EAAgCC,KAC3CC,UAAS,iBAAO,CAAEC,eAAgBF,MACnCG,EAAKN,MAAMO,UAAUD,EAAKN,MAAMO,SAASL,EAAIF,MAAMQ,0BAGzC,SAACC,UACRA,EAAKC,KAAI,SAACC,EAAGR,SACYQ,EAAEX,MAAtBY,IAAAA,MAAOC,IAAAA,SACTL,EAAQG,EAAEX,MAAMQ,OAASL,EACzBW,EAAYC,EAAW,8BAA+B,CACxDF,SAAAA,EACAG,OAAQb,IAAMG,EAAKW,MAAMZ,wBAKzBa,qBACIJ,UAAWA,EACXK,KAAK,GACLC,IAAKZ,EACLa,QAAS,SAACC,GACNA,EAAMC,iBACDV,KACIW,iBAAiBb,EAAGR,KAIhCS,WA5DLa,EAAyBzB,EAAzByB,WAAYlB,EAAaP,EAAbO,SACdmB,EAAWR,EAAMS,SAASC,QAAQtB,EAAKN,MAAM0B,UAE7CG,EAAaJ,GAA6B,IAAfA,MAC7BI,GAActB,IACVmB,GACgBA,EAASI,MACrB,SAACC,UAAkCA,EAAE/B,MAAMQ,OAA2B,IAAlBuB,EAAE/B,MAAMQ,SAG5D,MAAM,IAAIwB,MACN,kGAKZH,GAAcH,EAAU,KAClBvB,EAAIuB,EAASO,WACf,SAACC,UAAiCA,EAAElC,MAAMQ,QAAUiB,SAE7C,IAAPtB,EACA,MAAM,IAAI6B,uEAG2DP,SAGpER,MAAQ,CAAEZ,eAAgBF,UAE1Bc,MAAQ,CAAEZ,eAAgB,oDAqCvC8B,OAAA,eAEUT,EAAWR,EAAMS,SAASC,QAAQQ,KAAKpC,MAAM0B,UAC7CW,EAAYX,EAASU,KAAKnB,MAAMZ,iBAAmBqB,EAAS,IAAM,KAElEY,EAAMvB,mBAA2BqB,KAAKpC,MAAMuC,aAAe,iBAAmB,YAGhFrB,uBAAKJ,UAAWwB,GACZpB,uBAAKJ,UAAU,yBAAyBsB,KAAKI,gBAAgBd,IAC7DR,uBAAKJ,UAAU,uBAAuBuB,QAlFnCnB,EAAMuB,WAuFzB1C,EAAK2C,YAAc,OAEnB3C,EAAK4C,aAAe,CAChBJ,cAAc,OAcZK,EAAmD,gBAAGlB,IAAAA,gBACxDR,uBAAKJ,UAAWC,EAAW,uBADuCD,YACJY,IAElEkB,EAAIF,YAAc,MAClBE,EAAID,aAAe,CACf9B,UAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button-link.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './loading-spinner';
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,l=(e=require("react"))&&"object"==typeof e&&"default"in e?e.default:e,a=require("./loading-spinner.module.css.js"),t={small:24,medium:36,large:48};exports.LoadingSpinner=function(e){var r=e.size,n=t[void 0===r?"small":r];return l.createElement("div",{className:a.default.container,"aria-label":e.label,"aria-live":"polite",role:"alert"},l.createElement("span",null,l.createElement("svg",{width:n,height:n,viewBox:"0 0 24 24"},l.createElement("g",{fill:"none",fillRule:"nonzero"},l.createElement("path",{className:a.default.spinner,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"}),l.createElement("path",{className:a.default.spinnerBackground,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"})))))};
|
|
2
|
-
//# sourceMappingURL=loading-spinner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loading-spinner.js","sources":["../../../src/new-components/loading-spinner/loading-spinner.tsx"],"sourcesContent":["import React from 'react'\nimport styles from './loading-spinner.module.css'\n\ntype Size = 'small' | 'medium' | 'large'\n\ntype Props = {\n label: string\n size?: Size\n}\n\nconst sizeMapping: Record<Size, number> = {\n small: 24,\n medium: 36,\n large: 48,\n}\n\nfunction LoadingSpinner({ size = 'small', label }: Props) {\n const numericSize = sizeMapping[size]\n return (\n <div className={styles.container} aria-label={label} aria-live=\"polite\" role=\"alert\">\n <span>\n <svg width={numericSize} height={numericSize} viewBox=\"0 0 24 24\">\n <g fill=\"none\" fillRule=\"nonzero\">\n <path\n className={styles.spinner}\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 className={styles.spinnerBackground}\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}\n\nexport { LoadingSpinner }\n"],"names":["sizeMapping","small","medium","large","size","numericSize","React","className","styles","container","label","role","width","height","viewBox","fill","fillRule","spinner","d","spinnerBackground"],"mappings":"6LAUMA,EAAoC,CACtCC,MAAO,GACPC,OAAQ,GACRC,MAAO,2BAGX,oBAA0BC,KAChBC,EAAcL,aADS,kBAGzBM,uBAAKC,UAAWC,UAAOC,yBAHWC,kBAG6B,SAASC,KAAK,SACzEL,4BACIA,uBAAKM,MAAOP,EAAaQ,OAAQR,EAAaS,QAAQ,aAClDR,qBAAGS,KAAK,OAAOC,SAAS,WACpBV,wBACIC,UAAWC,UAAOS,QAClBC,EAAE,iJAENZ,wBACIC,UAAWC,UAAOW,kBAClBD,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loading-spinner.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ExtractHTMLAttributes, RenderProp, As as ComponentTypes } from 'reakit-utils/types';
|
|
3
|
-
declare type PropsWithAs<P, T extends ComponentTypes> = P & Omit<React.ComponentProps<T>, 'component' | keyof P> & {
|
|
4
|
-
component?: ComponentTypes;
|
|
5
|
-
children?: React.ReactNode | RenderProp<ExtractHTMLAttributes<any>>;
|
|
6
|
-
};
|
|
7
|
-
declare type PropsFromAs<ComponentProps, ComponentType extends ComponentTypes> = PropsWithAs<ComponentProps, ComponentType> & {
|
|
8
|
-
component: ComponentTypes;
|
|
9
|
-
};
|
|
10
|
-
declare type ElementTagNameMap = HTMLElementTagNameMap & Pick<SVGElementTagNameMap, Exclude<keyof SVGElementTagNameMap, keyof HTMLElementTagNameMap>>;
|
|
11
|
-
declare type ElementByTag<TagName extends keyof ElementTagNameMap> = ElementTagNameMap[TagName];
|
|
12
|
-
interface ForwardRefFunction<ComponentProps, ComponentType extends ComponentTypes> {
|
|
13
|
-
(props: React.PropsWithChildren<PropsFromAs<ComponentProps, ComponentType>>, ref: ((instance: (ComponentType extends keyof ElementTagNameMap ? ElementByTag<ComponentType> : any) | null) => void) | React.MutableRefObject<(ComponentType extends keyof ElementTagNameMap ? ElementByTag<ComponentType> : any) | null> | null): React.ReactElement | null;
|
|
14
|
-
displayName?: string;
|
|
15
|
-
}
|
|
16
|
-
interface ForwardRefComponentWithAs<ComponentProps, ComponentType extends ComponentTypes> {
|
|
17
|
-
<TT extends ComponentTypes = ComponentType>(props: PropsWithAs<ComponentProps, TT>): React.ReactElement | null;
|
|
18
|
-
(props: PropsWithAs<ComponentProps, ComponentType>): React.ReactElement | null;
|
|
19
|
-
readonly $$typeof: symbol;
|
|
20
|
-
defaultProps?: Partial<PropsWithAs<ComponentProps, ComponentType>>;
|
|
21
|
-
propTypes?: React.WeakValidationMap<PropsWithAs<ComponentProps, ComponentType>>;
|
|
22
|
-
displayName?: string;
|
|
23
|
-
}
|
|
24
|
-
declare function forwardRefWithAs<ComponentProps, ComponentType extends ComponentTypes = ComponentTypes>(render: ForwardRefFunction<ComponentProps, ComponentType>): ForwardRefComponentWithAs<ComponentProps, ComponentType>;
|
|
25
|
-
export type { ComponentTypes, ForwardRefComponentWithAs };
|
|
26
|
-
export { forwardRefWithAs };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type-helpers.js","sources":["../../src/new-components/type-helpers.tsx"],"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 { ExtractHTMLAttributes, RenderProp, As as ComponentTypes } from 'reakit-utils/types'\n\ntype PropsWithAs<P, T extends ComponentTypes> = P &\n Omit<React.ComponentProps<T>, 'component' | keyof P> & {\n component?: ComponentTypes\n children?: React.ReactNode | RenderProp<ExtractHTMLAttributes<any>>\n }\n\ntype PropsFromAs<ComponentProps, ComponentType extends ComponentTypes> = PropsWithAs<\n ComponentProps,\n ComponentType\n> & { component: ComponentTypes }\n\ntype ElementTagNameMap = HTMLElementTagNameMap &\n Pick<SVGElementTagNameMap, Exclude<keyof SVGElementTagNameMap, keyof HTMLElementTagNameMap>>\n\ntype ElementByTag<TagName extends keyof ElementTagNameMap> = ElementTagNameMap[TagName]\n\ninterface ForwardRefFunction<ComponentProps, ComponentType extends ComponentTypes> {\n (\n props: React.PropsWithChildren<PropsFromAs<ComponentProps, ComponentType>>,\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\ninterface ForwardRefComponentWithAs<ComponentProps, ComponentType extends ComponentTypes> {\n <TT extends ComponentTypes = ComponentType>(\n props: PropsWithAs<ComponentProps, TT>,\n ): React.ReactElement | null\n (props: PropsWithAs<ComponentProps, ComponentType>): React.ReactElement | null\n readonly $$typeof: symbol\n defaultProps?: Partial<PropsWithAs<ComponentProps, ComponentType>>\n propTypes?: React.WeakValidationMap<PropsWithAs<ComponentProps, ComponentType>>\n displayName?: string\n}\n\nfunction forwardRefWithAs<ComponentProps, ComponentType extends ComponentTypes = ComponentTypes>(\n render: ForwardRefFunction<ComponentProps, ComponentType>,\n) {\n return React.forwardRef(render) as ForwardRefComponentWithAs<ComponentProps, ComponentType>\n}\n\nexport type { ComponentTypes, ForwardRefComponentWithAs }\nexport { forwardRefWithAs }\n"],"names":["render","React"],"mappings":"oHAkFA,SACIA,UAEOC,aAAiBD"}
|
package/styles/button-link.css
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
._7c657f27{box-sizing:border-box;border:0;margin:0;padding:0;font-size:var(--reactist-font-size-normal);font-family:inherit;vertical-align:baseline;background-color:transparent}._24f0305b{position:absolute}.f22516c3{position:fixed}.dd3031f0{position:relative}.c55e1376{position:-webkit-sticky;position:sticky}@media (min-width:768px){.c01b4973{position:absolute}.fe61c08e{position:fixed}._42cf42ae{position:relative}._1cd29585{position:-webkit-sticky;position:sticky}}@media (min-width:992px){._3bf17b40{position:absolute}._3c190375{position:fixed}._21549264{position:relative}.b3301c9a{position:-webkit-sticky;position:sticky}}.d0eafb3e{display:block}._29841fc9{display:flex}.be8e98ca{display:inline}._009244ff{display:inline-block}._366b4e11{display:inline-flex}._685beb97{display:none}@media (min-width:768px){.ae57c505{display:block}.e79407a2{display:flex}._4b3944fb{display:inline}._04228de9{display:inline-block}._29bbb522{display:inline-flex}._2d2052e6{display:none}}@media (min-width:992px){.b1ba4d16{display:block}.cb21a300{display:flex}._9b2d213a{display:inline}.c6b19ae4{display:inline-block}.e2d9e9ae{display:inline-flex}._69d56326{display:none}}.f87e83dc{min-width:0}._2ca630ec{min-width:220px}._7a1a60f1{min-width:400px}.c0a2d8db{min-width:660px}._95c19faa{max-width:940px}._4ab999ca{min-width:1280px}._1ca5dbf5{max-width:220px}.c3ff7c04{max-width:400px}._74540095{max-width:660px}._811b6141{max-width:940px}._52023176{max-width:1280px}._7ce9375b{flex-direction:column}._953fabba{flex-direction:row}@media (min-width:768px){.bfc2801e{flex-direction:column}._65c778a0{flex-direction:row}}@media (min-width:992px){._23be346b{flex-direction:column}._986465f5{flex-direction:row}}._2c4c621c{flex-wrap:wrap}.c3633c19{flex-wrap:nowrap}.b477fff2{flex-shrink:0}.b1b675a2{flex-grow:0}._8e345e7d{flex-grow:1}._9e819789{align-items:flex-start}._3ae82bc9{align-items:center}._00f518cd{align-items:flex-end}@media (min-width:768px){.ef284703{align-items:flex-start}.c0033f6b{align-items:center}._23222959{align-items:flex-end}}@media (min-width:992px){.f5ff68ae{align-items:flex-start}.eaa36a65{align-items:center}._2f176e1d{align-items:flex-end}}._4749a6dc{justify-content:flex-start}.c07ae3c5{justify-content:center}._92f94735{justify-content:flex-end}._654ccdee{justify-content:space-between}@media (min-width:768px){._1598cc97{justify-content:flex-start}.a70ab2a6{justify-content:center}._6a961a37{justify-content:flex-end}._0d9709e0{justify-content:space-between}}@media (min-width:992px){._9f212924{justify-content:flex-start}.c6fbe3ef{justify-content:center}.cdb44e6c{justify-content:flex-end}._70f074d7{justify-content:space-between}}._01b1b3d3{overflow:hidden}.f99741e1{overflow:auto}._3f62d2f4{overflow:visible}._58821030{overflow:scroll}._5ff2e0fb{width:100%}.b43d8faa{height:100%}._43d03f23{padding-top:var(--reactist-spacing-xsmall)}.c82a83d3{padding-top:var(--reactist-spacing-small)}._05b7d9e9{padding-top:var(--reactist-spacing-medium)}._221cd893{padding-top:var(--reactist-spacing-large)}.a303d58a{padding-top:var(--reactist-spacing-xlarge)}._543c0127{padding-top:var(--reactist-spacing-xxlarge)}@media (min-width:768px){.a2e0fd3e{padding-top:var(--reactist-spacing-xsmall)}._0bde39f9{padding-top:var(--reactist-spacing-small)}._5f4af3c6{padding-top:var(--reactist-spacing-medium)}.fa89daaa{padding-top:var(--reactist-spacing-large)}._5f9a63f3{padding-top:var(--reactist-spacing-xlarge)}.c45f5234{padding-top:var(--reactist-spacing-xxlarge)}}@media (min-width:992px){._9cf8b441{padding-top:var(--reactist-spacing-xsmall)}._2813d05c{padding-top:var(--reactist-spacing-small)}._8703333a{padding-top:var(--reactist-spacing-medium)}._13793865{padding-top:var(--reactist-spacing-large)}._240da042{padding-top:var(--reactist-spacing-xlarge)}.c9c7fbc2{padding-top:var(--reactist-spacing-xxlarge)}}.d495bb28{padding-right:var(--reactist-spacing-xsmall)}._042ac90b{padding-right:var(--reactist-spacing-small)}._1b11d4ca{padding-right:var(--reactist-spacing-medium)}.bf68852a{padding-right:var(--reactist-spacing-large)}._4e4767c7{padding-right:var(--reactist-spacing-xlarge)}.bfa73acf{padding-right:var(--reactist-spacing-xxlarge)}@media (min-width:768px){.d6462717{padding-right:var(--reactist-spacing-xsmall)}.f797ebe8{padding-right:var(--reactist-spacing-small)}._44ba8f12{padding-right:var(--reactist-spacing-medium)}._40c5576f{padding-right:var(--reactist-spacing-large)}.e7ee4168{padding-right:var(--reactist-spacing-xlarge)}._860d8fbf{padding-right:var(--reactist-spacing-xxlarge)}}@media (min-width:992px){.c97156fd{padding-right:var(--reactist-spacing-xsmall)}.c9953041{padding-right:var(--reactist-spacing-small)}._37914764{padding-right:var(--reactist-spacing-medium)}._1ca8c885{padding-right:var(--reactist-spacing-large)}._75d49cdb{padding-right:var(--reactist-spacing-xlarge)}.d32fa11d{padding-right:var(--reactist-spacing-xxlarge)}}.bc3ad5d0{padding-bottom:var(--reactist-spacing-xsmall)}._46557bc6{padding-bottom:var(--reactist-spacing-small)}.b923b5a7{padding-bottom:var(--reactist-spacing-medium)}._21795b21{padding-bottom:var(--reactist-spacing-large)}._1843b8d5{padding-bottom:var(--reactist-spacing-xlarge)}.aa17bf37{padding-bottom:var(--reactist-spacing-xxlarge)}@media (min-width:768px){.a28f6624{padding-bottom:var(--reactist-spacing-xsmall)}._7da0f299{padding-bottom:var(--reactist-spacing-small)}._50149ce3{padding-bottom:var(--reactist-spacing-medium)}.a6ab60e2{padding-bottom:var(--reactist-spacing-large)}.ce605666{padding-bottom:var(--reactist-spacing-xlarge)}.b956675e{padding-bottom:var(--reactist-spacing-xxlarge)}}@media (min-width:992px){.d5326ae6{padding-bottom:var(--reactist-spacing-xsmall)}._6803052d{padding-bottom:var(--reactist-spacing-small)}._69a10a83{padding-bottom:var(--reactist-spacing-medium)}._5a8a9ae8{padding-bottom:var(--reactist-spacing-large)}._8b25ea98{padding-bottom:var(--reactist-spacing-xlarge)}.dfd70349{padding-bottom:var(--reactist-spacing-xxlarge)}}._805ae294{padding-left:var(--reactist-spacing-xsmall)}.df5b5dfd{padding-left:var(--reactist-spacing-small)}.eadadb70{padding-left:var(--reactist-spacing-medium)}._96f7a1d7{padding-left:var(--reactist-spacing-large)}.bcc8a161{padding-left:var(--reactist-spacing-xlarge)}._3f7a75c6{padding-left:var(--reactist-spacing-xxlarge)}@media (min-width:768px){._98624fbc{padding-left:var(--reactist-spacing-xsmall)}.b27f1381{padding-left:var(--reactist-spacing-small)}._21610d64{padding-left:var(--reactist-spacing-medium)}.fa50a773{padding-left:var(--reactist-spacing-large)}.b89f0a01{padding-left:var(--reactist-spacing-xlarge)}.e9b75114{padding-left:var(--reactist-spacing-xxlarge)}}@media (min-width:992px){._1d2763bd{padding-left:var(--reactist-spacing-xsmall)}._2b159c75{padding-left:var(--reactist-spacing-small)}._91d5fe19{padding-left:var(--reactist-spacing-medium)}._1818546c{padding-left:var(--reactist-spacing-large)}.fe23556f{padding-left:var(--reactist-spacing-xlarge)}.b69c0660{padding-left:var(--reactist-spacing-xxlarge)}}._191675e3{background-color:var(--reactist-bg-default)}.c9237bd2{background-color:var(--reactist-bg-aside)}.c6d1677f{background-color:var(--reactist-bg-highlight)}.e4c307c8{background-color:var(--reactist-bg-selected)}.d96494dc{border-radius:var(--reactist-border-radius-small)}.e4c4cad8{border-radius:var(--reactist-border-radius-large)}.ba98367a{border:1px solid var(--reactist-framework-border)}
|
|
2
|
-
.e8c14f99{gap:var(--reactist-spacing-medium);white-space:nowrap}.e8c14f99,.e8c14f99:hover{text-decoration:none}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.e8c14f99{gap:var(--reactist-spacing-medium);white-space:nowrap}.e8c14f99,.e8c14f99:hover{text-decoration:none}
|
package/styles/button.css
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.reactist_tooltip{font-size:.81rem;color:#202020;font-weight:400;line-height:1.6;text-align:center;text-overflow:ellipsis;overflow:hidden;max-width:100%;padding:5px 10px;background-color:#333;color:#fff;border:none;border-radius:3px;z-index:1000}
|
|
2
|
-
.reactist_button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:inherit;border:none;background-color:transparent;padding:0}.reactist_button:disabled{opacity:.4;cursor:not-allowed}.reactist_button--small{font-size:.81rem;color:#202020;font-weight:400;line-height:1.6}.reactist_button--danger,.reactist_button--primary,.reactist_button--secondary{font-size:.875rem;color:#202020;font-weight:400;line-height:1.7;box-sizing:border-box;padding:5px 15px;border:1px solid rgba(0,0,0,.1);border-radius:3px}.reactist_button--danger.reactist_button--small,.reactist_button--primary.reactist_button--small,.reactist_button--secondary.reactist_button--small{padding:5px 10px}.reactist_button--danger.reactist_button--large,.reactist_button--primary.reactist_button--large,.reactist_button--secondary.reactist_button--large{padding:10px 15px}.reactist_button--primary{background-color:#3f82ef;color:#fff!important}.reactist_button--primary:not([disabled]):hover{background-color:#3b7be2}.reactist_button--danger{background-color:#de4c4a;color:#fff!important}.reactist_button--danger:not([disabled]):hover{background-color:#cf2826}.reactist_button--secondary{background-color:#fff;color:#202020!important;border-color:#dcdcdc}.reactist_button--secondary:not([disabled]):hover{background-color:#f9f9f9}.reactist_button--link{color:#3f82ef;text-decoration:none}.reactist_button--link:disabled{color:grey}.reactist_button--link:not(:disabled):hover{text-decoration:underline}.reactist_button--link:not(.reactist_button--link--small):not(.reactist_button--link--large){font-size:inherit}.reactist_button--danger.reactist_button--loading,.reactist_button--primary.reactist_button--loading,.reactist_button--secondary.reactist_button--loading{cursor:progress!important}.reactist_button--danger.reactist_button--loading:after,.reactist_button--primary.reactist_button--loading:after,.reactist_button--secondary.reactist_button--loading:after{background-repeat:no-repeat;background-size:15px;content:"";display:inline-block;height:15px;margin-left:12px;vertical-align:middle;width:15px;animation-duration:1s;animation-iteration-count:infinite;animation-name:reactistRotateRight;animation-timing-function:linear;color:#fff;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNi4yNTciIGhlaWdodD0iMTYuMjU3IiB2aWV3Qm94PSItMTQ3LjgxMyAyMDYuNzUgMTYuMjU3IDE2LjI1NyIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAtMTQ3LjgxMyAyMDYuNzUgMTYuMjU3IDE2LjI1NyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtMikiPjxkZWZzPjxmaWx0ZXIgaWQ9ImEiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iLTE0Ny42ODQiIHk9IjIxMC45MjkiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxMy45NSI+PGZlQ29sb3JNYXRyaXggdmFsdWVzPSIxIDAgMCAwIDAgMCAxIDAgMCAwIDAgMCAxIDAgMCAwIDAgMCAxIDAiLz48L2ZpbHRlcj48L2RlZnM+PG1hc2sgbWFza1VuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iLTE0Ny42ODQiIHk9IjIxMC45MjkiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxMy45NSIgaWQ9ImIiPjxnIGZpbHRlcj0idXJsKCNhKSI+PHBhdGggZmlsbD0iI0ZGRiIgZD0iTS0xNDguNTg0IDIwNy45NzloMTh2MThoLTE4eiIvPjwvZz48L21hc2s+PHBhdGggbWFzaz0idXJsKCNiKSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjRkZGIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTS0xNDQuNjM0IDIxMS45MjlhNi45OTkgNi45OTkgMCAwMDAgOS44OTloMGE2Ljk5OSA2Ljk5OSAwIDAwOS44OTkgMCA2Ljk5OSA2Ljk5OSAwIDAwMC05Ljg5OSIvPjwvZz48L3N2Zz4=")}.reactist_button--secondary.reactist_button--loading{border-color:#dcdcdc;background-color:#dcdcdc;color:grey}@keyframes reactistRotateRight{0%{transform:rotate(0deg);transform-origin:center center}to{transform:rotate(1turn);transform-origin:center center}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@keyframes _01b03448{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ddb8bfab{display:flex;align-items:center;justify-items:center;align-content:center;justify-content:center;flex:1 1 auto}.ddb8bfab svg{animation-name:_01b03448;animation-duration:1.2s;animation-iteration-count:infinite;animation-timing-function:linear}._01b03448{fill:var(--reactist-chromatic-content-red)}._0d5f86cd{fill:var(--reactist-framework-fill-crest)}
|