@doist/reactist 10.0.0-beta.8 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/reactist.cjs.development.js +546 -692
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/_virtual/_rollupPluginBabelHelpers.js +34 -20
- package/es/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/es/components/deprecated-button/deprecated-button.js +2 -1
- package/es/components/deprecated-button/deprecated-button.js.map +1 -1
- package/es/components/deprecated-modal/deprecated-modal.js +1 -1
- package/es/components/deprecated-modal/deprecated-modal.js.map +1 -1
- package/es/components/dropdown/dropdown.js +3 -1
- package/es/components/dropdown/dropdown.js.map +1 -1
- package/es/components/key-capturer/key-capturer.js.map +1 -1
- package/es/components/keyboard-shortcut/keyboard-shortcut.js +2 -1
- package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/es/components/menu/menu.js +34 -13
- package/es/components/menu/menu.js.map +1 -1
- package/es/components/notification/notification.js +8 -3
- package/es/components/notification/notification.js.map +1 -1
- package/es/components/popover/popover.js.map +1 -1
- package/es/components/popover/positioning-utils.js.map +1 -1
- package/es/components/progress-bar/progress-bar.js +8 -2
- package/es/components/progress-bar/progress-bar.js.map +1 -1
- package/es/components/select/select.js +3 -1
- package/es/components/select/select.js.map +1 -1
- package/es/components/time/time-utils.js.map +1 -1
- package/es/components/time/time.js.map +1 -1
- package/es/components/tooltip/tooltip.js +3 -1
- package/es/components/tooltip/tooltip.js.map +1 -1
- package/es/index.js +3 -7
- package/es/index.js.map +1 -1
- package/es/new-components/alert/alert.js +16 -6
- package/es/new-components/alert/alert.js.map +1 -1
- package/es/new-components/alert/alert.module.css.js +1 -1
- package/es/{components → new-components}/avatar/avatar.js +14 -8
- package/es/new-components/avatar/avatar.js.map +1 -0
- package/es/new-components/avatar/avatar.module.css.js +4 -0
- package/es/new-components/avatar/avatar.module.css.js.map +1 -0
- package/es/{components → new-components}/avatar/utils.js +0 -0
- package/es/new-components/avatar/utils.js.map +1 -0
- package/es/new-components/base-button/base-button.js +4 -2
- package/es/new-components/base-button/base-button.js.map +1 -1
- package/es/new-components/box/box.js +5 -3
- 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/width.module.css.js +4 -0
- package/es/new-components/box/width.module.css.js.map +1 -0
- package/es/new-components/button/button.js +2 -1
- package/es/new-components/button/button.js.map +1 -1
- package/es/new-components/button-link/button-link.js +2 -1
- package/es/new-components/button-link/button-link.js.map +1 -1
- package/es/new-components/checkbox-field/checkbox-field.js +27 -10
- package/es/new-components/checkbox-field/checkbox-field.js.map +1 -1
- package/es/new-components/checkbox-field/checkbox-field.module.css.js +1 -1
- package/es/new-components/checkbox-field/checkbox-icon.js +2 -1
- package/es/new-components/checkbox-field/checkbox-icon.js.map +1 -1
- package/es/new-components/columns/columns.js +4 -2
- package/es/new-components/columns/columns.js.map +1 -1
- package/es/new-components/divider/divider.js +4 -2
- package/es/new-components/divider/divider.js.map +1 -1
- package/es/new-components/heading/heading.js +2 -1
- 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 +2 -1
- package/es/new-components/hidden/hidden.js.map +1 -1
- package/es/new-components/icons/alert-icon.js +2 -1
- package/es/new-components/icons/alert-icon.js.map +1 -1
- package/es/new-components/inline/inline.js +4 -3
- package/es/new-components/inline/inline.js.map +1 -1
- package/es/new-components/loading/loading.js +6 -2
- package/es/new-components/loading/loading.js.map +1 -1
- package/es/new-components/modal/modal.js +35 -17
- package/es/new-components/modal/modal.js.map +1 -1
- package/es/new-components/modal/modal.module.css.js +1 -1
- package/es/new-components/notice/notice.js +3 -1
- package/es/new-components/notice/notice.js.map +1 -1
- package/es/new-components/password-field/password-field.js +2 -1
- package/es/new-components/password-field/password-field.js.map +1 -1
- package/es/new-components/select-field/select-field.js +2 -1
- package/es/new-components/select-field/select-field.js.map +1 -1
- package/es/new-components/stack/stack.js +2 -1
- package/es/new-components/stack/stack.js.map +1 -1
- package/es/new-components/switch-field/switch-field.js +28 -5
- 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 +10 -5
- package/es/new-components/tabs/tabs.js.map +1 -1
- package/es/new-components/tabs/tabs.module.css.js +1 -1
- package/es/new-components/text/text.js +2 -1
- package/es/new-components/text/text.js.map +1 -1
- package/es/new-components/text/text.module.css.js +1 -1
- package/es/new-components/text-area/text-area.js +3 -1
- package/es/new-components/text-area/text-area.js.map +1 -1
- package/es/new-components/text-field/text-field.js +2 -1
- package/es/new-components/text-field/text-field.js.map +1 -1
- package/es/new-components/text-link/text-link.js +2 -1
- package/es/new-components/text-link/text-link.js.map +1 -1
- package/es/new-components/text-link/text-link.module.css.js +1 -1
- package/lib/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/lib/components/deprecated-button/deprecated-button.js +1 -1
- package/lib/components/deprecated-button/deprecated-button.js.map +1 -1
- package/lib/components/deprecated-modal/deprecated-modal.js +1 -1
- package/lib/components/deprecated-modal/deprecated-modal.js.map +1 -1
- package/lib/components/dropdown/dropdown.js +1 -1
- package/lib/components/dropdown/dropdown.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/menu.js +1 -1
- package/lib/components/menu/menu.js.map +1 -1
- package/lib/components/notification/notification.d.ts +4 -2
- package/lib/components/notification/notification.js +1 -1
- package/lib/components/notification/notification.js.map +1 -1
- package/lib/components/progress-bar/progress-bar.d.ts +3 -1
- package/lib/components/progress-bar/progress-bar.js +1 -1
- package/lib/components/progress-bar/progress-bar.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/tooltip.js +1 -1
- package/lib/components/tooltip/tooltip.js.map +1 -1
- package/lib/index.d.ts +1 -5
- package/lib/index.js +1 -1
- package/lib/new-components/alert/alert.js +1 -1
- package/lib/new-components/alert/alert.js.map +1 -1
- package/lib/new-components/alert/alert.module.css.js +1 -1
- package/lib/{components/avatar/avatar.test.d.ts → new-components/alert/alert.test.d.ts} +0 -0
- package/lib/{components → new-components}/avatar/avatar.d.ts +6 -3
- package/lib/new-components/avatar/avatar.js +2 -0
- package/lib/new-components/avatar/avatar.js.map +1 -0
- package/lib/new-components/avatar/avatar.module.css.js +2 -0
- package/lib/new-components/avatar/avatar.module.css.js.map +1 -0
- package/lib/{components/avatar/utils.test.d.ts → new-components/avatar/avatar.test.d.ts} +0 -0
- package/lib/new-components/avatar/index.d.ts +1 -0
- package/lib/{components → new-components}/avatar/utils.d.ts +0 -0
- package/lib/{components → new-components}/avatar/utils.js +0 -0
- package/lib/new-components/avatar/utils.js.map +1 -0
- package/lib/{components/error-message/error-message.test.d.ts → new-components/avatar/utils.test.d.ts} +0 -0
- package/lib/new-components/base-button/base-button.js +1 -1
- package/lib/new-components/base-button/base-button.js.map +1 -1
- package/lib/new-components/box/box.d.ts +8 -7
- 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/new-components/box/width.module.css.js +2 -0
- package/lib/new-components/box/width.module.css.js.map +1 -0
- package/lib/new-components/button/button.js +1 -1
- package/lib/new-components/button/button.js.map +1 -1
- 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/checkbox-field/checkbox-field.d.ts +15 -2
- 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-icon.js +1 -1
- package/lib/new-components/checkbox-field/checkbox-icon.js.map +1 -1
- package/lib/new-components/columns/columns.js +1 -1
- package/lib/new-components/columns/columns.js.map +1 -1
- package/lib/new-components/divider/divider.js +1 -1
- package/lib/new-components/divider/divider.js.map +1 -1
- 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/hidden/hidden.js +1 -1
- package/lib/new-components/hidden/hidden.js.map +1 -1
- package/lib/new-components/icons/alert-icon.js +1 -1
- package/lib/new-components/icons/alert-icon.js.map +1 -1
- package/lib/new-components/inline/inline.js +1 -1
- package/lib/new-components/inline/inline.js.map +1 -1
- package/lib/new-components/loading/loading.d.ts +8 -7
- package/lib/new-components/loading/loading.js +1 -1
- package/lib/new-components/loading/loading.js.map +1 -1
- package/lib/new-components/modal/modal.d.ts +9 -4
- package/lib/new-components/modal/modal.js +1 -1
- package/lib/new-components/modal/modal.js.map +1 -1
- package/lib/new-components/modal/modal.module.css.js +1 -1
- package/lib/new-components/notice/notice.js +1 -1
- package/lib/new-components/notice/notice.js.map +1 -1
- package/lib/{components/icon/icon.test.d.ts → new-components/notice/notice.test.d.ts} +0 -0
- 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/select-field/select-field.js +1 -1
- package/lib/new-components/select-field/select-field.js.map +1 -1
- package/lib/new-components/stack/stack.js +1 -1
- package/lib/new-components/stack/stack.js.map +1 -1
- package/lib/new-components/switch-field/switch-field.d.ts +9 -2
- 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/tabs/tabs.js +1 -1
- package/lib/new-components/tabs/tabs.js.map +1 -1
- package/lib/new-components/tabs/tabs.module.css.js +1 -1
- 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-area/text-area.js +1 -1
- package/lib/new-components/text-area/text-area.js.map +1 -1
- 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-link/text-link.js +1 -1
- package/lib/new-components/text-link/text-link.js.map +1 -1
- package/lib/new-components/text-link/text-link.module.css.js +1 -1
- package/package.json +15 -12
- package/styles/alert.css +6 -2
- package/styles/alert.module.css.css +1 -1
- package/styles/avatar.css +5 -1
- package/styles/avatar.module.css.css +1 -0
- package/styles/base-button.css +3 -2
- package/styles/base-field.css +3 -2
- package/styles/box.css +3 -2
- package/styles/box.module.css.css +1 -1
- package/styles/checkbox-field.css +4 -4
- package/styles/checkbox-field.module.css.css +1 -1
- package/styles/color-picker.css +1 -1
- package/styles/columns.css +2 -1
- package/styles/deprecated-button.css +1 -1
- package/styles/deprecated-loading.css +1 -1
- package/styles/deprecated-modal.css +1 -1
- package/styles/divider.css +2 -1
- package/styles/dropdown.css +1 -1
- package/styles/heading.css +3 -2
- package/styles/heading.module.css.css +1 -1
- package/styles/hidden-visually.css +2 -1
- package/styles/hidden.css +2 -1
- package/styles/inline.css +2 -1
- package/styles/loading.css +3 -2
- package/styles/menu.css +1 -1
- package/styles/modal.css +4 -3
- package/styles/modal.module.css.css +1 -1
- package/styles/notice.css +2 -1
- package/styles/password-field.css +3 -2
- package/styles/progress-bar.css +5 -0
- package/styles/reactist.css +17 -20
- package/styles/select-field.css +3 -2
- package/styles/spinner.module.css.css +1 -1
- package/styles/stack.css +2 -1
- package/styles/switch-field.css +4 -3
- package/styles/switch-field.module.css.css +1 -1
- package/styles/tabs.css +3 -2
- package/styles/tabs.module.css.css +1 -1
- package/styles/text-area.css +3 -2
- package/styles/text-field.css +3 -2
- package/styles/text-link.css +3 -2
- package/styles/text-link.module.css.css +1 -1
- package/styles/text.css +3 -2
- package/styles/text.module.css.css +1 -1
- package/styles/width.module.css.css +1 -0
- package/es/components/avatar/avatar.js.map +0 -1
- package/es/components/avatar/index.js +0 -6
- package/es/components/avatar/index.js.map +0 -1
- package/es/components/avatar/utils.js.map +0 -1
- package/es/components/error-message/error-message.js +0 -90
- package/es/components/error-message/error-message.js.map +0 -1
- package/es/components/error-message/index.js +0 -6
- package/es/components/error-message/index.js.map +0 -1
- package/es/components/icon/icon.js +0 -96
- package/es/components/icon/icon.js.map +0 -1
- package/es/components/icon/index.js +0 -6
- package/es/components/icon/index.js.map +0 -1
- package/es/components/icons/ThinQuestionMarkIcon.svg.js +0 -24
- package/es/components/icons/ThinQuestionMarkIcon.svg.js.map +0 -1
- package/es/components/icons/ThreeDotsIcon.svg.js +0 -40
- package/es/components/icons/ThreeDotsIcon.svg.js.map +0 -1
- package/es/components/range-input/index.js +0 -6
- package/es/components/range-input/index.js.map +0 -1
- package/es/components/range-input/range-input.js +0 -55
- package/es/components/range-input/range-input.js.map +0 -1
- package/es/components/tip/index.js +0 -6
- package/es/components/tip/index.js.map +0 -1
- package/es/components/tip/tip.js +0 -30
- package/es/components/tip/tip.js.map +0 -1
- package/lib/components/avatar/avatar.js +0 -2
- package/lib/components/avatar/avatar.js.map +0 -1
- package/lib/components/avatar/index.d.ts +0 -2
- package/lib/components/avatar/index.js +0 -2
- package/lib/components/avatar/index.js.map +0 -1
- package/lib/components/avatar/utils.js.map +0 -1
- package/lib/components/error-message/error-message.d.ts +0 -23
- package/lib/components/error-message/error-message.js +0 -2
- package/lib/components/error-message/error-message.js.map +0 -1
- package/lib/components/error-message/index.d.ts +0 -2
- package/lib/components/error-message/index.js +0 -2
- package/lib/components/error-message/index.js.map +0 -1
- package/lib/components/icon/icon.d.ts +0 -31
- package/lib/components/icon/icon.js +0 -2
- package/lib/components/icon/icon.js.map +0 -1
- package/lib/components/icon/index.d.ts +0 -2
- package/lib/components/icon/index.js +0 -2
- package/lib/components/icon/index.js.map +0 -1
- package/lib/components/icons/ThinQuestionMarkIcon.svg.js +0 -2
- package/lib/components/icons/ThinQuestionMarkIcon.svg.js.map +0 -1
- package/lib/components/icons/ThreeDotsIcon.svg.js +0 -2
- package/lib/components/icons/ThreeDotsIcon.svg.js.map +0 -1
- package/lib/components/range-input/index.d.ts +0 -2
- package/lib/components/range-input/index.js +0 -2
- package/lib/components/range-input/index.js.map +0 -1
- package/lib/components/range-input/range-input.d.ts +0 -25
- package/lib/components/range-input/range-input.js +0 -2
- package/lib/components/range-input/range-input.js.map +0 -1
- package/lib/components/range-input/range-input.test.d.ts +0 -1
- package/lib/components/tip/index.d.ts +0 -2
- package/lib/components/tip/index.js +0 -2
- package/lib/components/tip/index.js.map +0 -1
- package/lib/components/tip/tip.d.ts +0 -20
- package/lib/components/tip/tip.js +0 -2
- package/lib/components/tip/tip.js.map +0 -1
- package/lib/components/tip/tip.test.d.ts +0 -1
- package/styles/error-message.css +0 -1
- package/styles/icon.css +0 -2
- package/styles/range-input.css +0 -1
- package/styles/tip.css +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-field.js","sources":["../../../src/new-components/select-field/select-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseField, FieldComponentProps } from '../base-field'\nimport { Box } from '../box'\nimport styles from './select-field.module.css'\n\ntype SelectFieldProps = FieldComponentProps<HTMLSelectElement>\n\nconst SelectField = React.forwardRef<HTMLSelectElement, SelectFieldProps>(function SelectField(\n {\n id,\n label,\n secondaryLabel,\n auxiliaryLabel,\n hint,\n maxWidth,\n children,\n hidden,\n 'aria-describedby': ariaDescribedBy,\n ...props\n },\n ref,\n) {\n return (\n <BaseField\n id={id}\n label={label}\n secondaryLabel={secondaryLabel}\n auxiliaryLabel={auxiliaryLabel}\n hint={hint}\n maxWidth={maxWidth}\n hidden={hidden}\n aria-describedby={ariaDescribedBy}\n >\n {(extraProps) => (\n <Box className={styles.selectWrapper}>\n <select {...props} {...extraProps} ref={ref}>\n {children}\n </select>\n <SelectChevron aria-hidden />\n </Box>\n )}\n </BaseField>\n )\n})\n\nfunction SelectChevron(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg width=\"16\" height=\"16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n d=\"M11.646 5.646a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 1 1 .708-.708L8 9.293l3.646-3.647z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nexport { SelectField }\nexport type { SelectFieldProps }\n"],"names":["SelectField","React","ref","id","label","secondaryLabel","auxiliaryLabel","hint","maxWidth","children","hidden","ariaDescribedBy","props","BaseField","extraProps","Box","className","styles","selectWrapper","SelectChevron","width","height","fill","xmlns","d"],"mappings":"
|
|
1
|
+
{"version":3,"file":"select-field.js","sources":["../../../src/new-components/select-field/select-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseField, FieldComponentProps } from '../base-field'\nimport { Box } from '../box'\nimport styles from './select-field.module.css'\n\ntype SelectFieldProps = FieldComponentProps<HTMLSelectElement>\n\nconst SelectField = React.forwardRef<HTMLSelectElement, SelectFieldProps>(function SelectField(\n {\n id,\n label,\n secondaryLabel,\n auxiliaryLabel,\n hint,\n maxWidth,\n children,\n hidden,\n 'aria-describedby': ariaDescribedBy,\n ...props\n },\n ref,\n) {\n return (\n <BaseField\n id={id}\n label={label}\n secondaryLabel={secondaryLabel}\n auxiliaryLabel={auxiliaryLabel}\n hint={hint}\n maxWidth={maxWidth}\n hidden={hidden}\n aria-describedby={ariaDescribedBy}\n >\n {(extraProps) => (\n <Box className={styles.selectWrapper}>\n <select {...props} {...extraProps} ref={ref}>\n {children}\n </select>\n <SelectChevron aria-hidden />\n </Box>\n )}\n </BaseField>\n )\n})\n\nfunction SelectChevron(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg width=\"16\" height=\"16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n d=\"M11.646 5.646a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 1 1 .708-.708L8 9.293l3.646-3.647z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nexport { SelectField }\nexport type { SelectFieldProps }\n"],"names":["SelectField","React","ref","id","label","secondaryLabel","auxiliaryLabel","hint","maxWidth","children","hidden","ariaDescribedBy","props","BaseField","extraProps","Box","className","styles","selectWrapper","SelectChevron","width","height","fill","xmlns","d"],"mappings":";;;;;;;IAOMA,WAAW,gBAAGC,UAAA,CAAsD,SAASD,WAAT,OAatEE,GAbsE;MAElEC,UAAAA;MACAC,aAAAA;MACAC,sBAAAA;MACAC,sBAAAA;MACAC,YAAAA;MACAC,gBAAAA;MACAC,gBAAAA;MACAC,cAAAA;MACoBC,uBAApB;MACGC;;AAIP,sBACIX,aAAA,CAACY,SAAD;AACIV,IAAAA,EAAE,EAAEA;AACJC,IAAAA,KAAK,EAAEA;AACPC,IAAAA,cAAc,EAAEA;AAChBC,IAAAA,cAAc,EAAEA;AAChBC,IAAAA,IAAI,EAAEA;AACNC,IAAAA,QAAQ,EAAEA;AACVE,IAAAA,MAAM,EAAEA;wBACUC;GARtB,EAUK,UAACG,UAAD;AAAA,wBACGb,aAAA,CAACc,GAAD;AAAKC,MAAAA,SAAS,EAAEC,MAAM,CAACC;KAAvB,eACIjB,aAAA,SAAA,oBAAYW,OAAWE;AAAYZ,MAAAA,GAAG,EAAEA;MAAxC,EACKO,QADL,CADJ,eAIIR,aAAA,CAACkB,aAAD;;KAAA,CAJJ,CADH;AAAA,GAVL,CADJ;AAqBH,CApCmB;;AAsCpB,SAASA,aAAT,CAAuBP,KAAvB;AACI,sBACIX,aAAA,MAAA;AAAKmB,IAAAA,KAAK,EAAC;AAAKC,IAAAA,MAAM,EAAC;AAAKC,IAAAA,IAAI,EAAC;AAAOC,IAAAA,KAAK,EAAC;KAAiCX,MAA/E,eACIX,aAAA,OAAA;AACIuB,IAAAA,CAAC,EAAC;AACFF,IAAAA,IAAI,EAAC;GAFT,CADJ,CADJ;AAQH;;;;"}
|
|
@@ -7,6 +7,7 @@ import { Divider } from '../divider/divider.js';
|
|
|
7
7
|
import flattenChildren from 'react-keyed-flatten-children';
|
|
8
8
|
import styles from './stack.module.css.js';
|
|
9
9
|
|
|
10
|
+
var _excluded = ["as", "space", "align", "dividers", "children", "exceptionallySetClassName"];
|
|
10
11
|
var Stack = /*#__PURE__*/polymorphicComponent(function Stack(_ref, ref) {
|
|
11
12
|
var as = _ref.as,
|
|
12
13
|
space = _ref.space,
|
|
@@ -16,7 +17,7 @@ var Stack = /*#__PURE__*/polymorphicComponent(function Stack(_ref, ref) {
|
|
|
16
17
|
dividers = _ref$dividers === void 0 ? 'none' : _ref$dividers,
|
|
17
18
|
children = _ref.children,
|
|
18
19
|
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
19
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
20
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
20
21
|
|
|
21
22
|
var alignProps = align === 'start' ? undefined : {
|
|
22
23
|
width: 'full',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack.js","sources":["../../../src/new-components/stack/stack.tsx"],"sourcesContent":["import * as React from 'react'\nimport flattenChildren from 'react-keyed-flatten-children'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { getClassNames, mapResponsiveProp } from '../responsive-props'\nimport { Box } from '../box'\nimport { Divider } from '../divider'\n\nimport type { ResponsiveProp } from '../responsive-props'\nimport type { DividerWeight, Space } from '../common-types'\nimport type { BoxProps, ReusableBoxProps } from '../box'\n\nimport styles from './stack.module.css'\n\ntype Align = 'start' | 'center' | 'end'\n\ninterface StackProps extends ReusableBoxProps {\n /** Space between items */\n space?: ResponsiveProp<Space>\n /** Align items horizontally */\n align?: ResponsiveProp<Align>\n /** The weight of the dividers to add. Defaults to 'none', which means no dividers are added */\n dividers?: DividerWeight\n}\n\nconst Stack = polymorphicComponent<'div', StackProps>(function Stack(\n {\n as,\n space,\n align = 'start',\n dividers = 'none',\n children,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n const alignProps: BoxProps | undefined =\n align === 'start'\n ? undefined\n : {\n width: 'full',\n flexDirection: 'column',\n display: 'flex',\n alignItems: mapResponsiveProp(align, (align) =>\n align === 'start' ? 'flexStart' : align === 'end' ? 'flexEnd' : 'center',\n ),\n }\n\n return (\n <Box\n {...props}\n {...alignProps}\n as={as}\n className={[exceptionallySetClassName, getClassNames(styles, 'space', space)]}\n ref={ref}\n >\n {dividers !== 'none'\n ? React.Children.map(flattenChildren(children), (child, index) =>\n index > 0 ? (\n <>\n <Divider weight={dividers} />\n {child}\n </>\n ) : (\n child\n ),\n )\n : children}\n </Box>\n )\n})\n\nexport type { StackProps }\nexport { Stack }\n"],"names":["Stack","polymorphicComponent","ref","as","space","align","dividers","children","exceptionallySetClassName","props","alignProps","undefined","width","flexDirection","display","alignItems","mapResponsiveProp","React","Box","className","getClassNames","styles","map","flattenChildren","child","index","Divider","weight"],"mappings":"
|
|
1
|
+
{"version":3,"file":"stack.js","sources":["../../../src/new-components/stack/stack.tsx"],"sourcesContent":["import * as React from 'react'\nimport flattenChildren from 'react-keyed-flatten-children'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { getClassNames, mapResponsiveProp } from '../responsive-props'\nimport { Box } from '../box'\nimport { Divider } from '../divider'\n\nimport type { ResponsiveProp } from '../responsive-props'\nimport type { DividerWeight, Space } from '../common-types'\nimport type { BoxProps, ReusableBoxProps } from '../box'\n\nimport styles from './stack.module.css'\n\ntype Align = 'start' | 'center' | 'end'\n\ninterface StackProps extends ReusableBoxProps {\n /** Space between items */\n space?: ResponsiveProp<Space>\n /** Align items horizontally */\n align?: ResponsiveProp<Align>\n /** The weight of the dividers to add. Defaults to 'none', which means no dividers are added */\n dividers?: DividerWeight\n}\n\nconst Stack = polymorphicComponent<'div', StackProps>(function Stack(\n {\n as,\n space,\n align = 'start',\n dividers = 'none',\n children,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n const alignProps: BoxProps | undefined =\n align === 'start'\n ? undefined\n : {\n width: 'full',\n flexDirection: 'column',\n display: 'flex',\n alignItems: mapResponsiveProp(align, (align) =>\n align === 'start' ? 'flexStart' : align === 'end' ? 'flexEnd' : 'center',\n ),\n }\n\n return (\n <Box\n {...props}\n {...alignProps}\n as={as}\n className={[exceptionallySetClassName, getClassNames(styles, 'space', space)]}\n ref={ref}\n >\n {dividers !== 'none'\n ? React.Children.map(flattenChildren(children), (child, index) =>\n index > 0 ? (\n <>\n <Divider weight={dividers} />\n {child}\n </>\n ) : (\n child\n ),\n )\n : children}\n </Box>\n )\n})\n\nexport type { StackProps }\nexport { Stack }\n"],"names":["Stack","polymorphicComponent","ref","as","space","align","dividers","children","exceptionallySetClassName","props","alignProps","undefined","width","flexDirection","display","alignItems","mapResponsiveProp","React","Box","className","getClassNames","styles","map","flattenChildren","child","index","Divider","weight"],"mappings":";;;;;;;;;;IAwBMA,KAAK,gBAAGC,oBAAoB,CAAoB,SAASD,KAAT,OAUlDE,GAVkD;MAE9CC,UAAAA;MACAC,aAAAA;wBACAC;MAAAA,gCAAQ;2BACRC;MAAAA,sCAAW;MACXC,gBAAAA;MACAC,iCAAAA;MACGC;;AAIP,MAAMC,UAAU,GACZL,KAAK,KAAK,OAAV,GACMM,SADN,GAEM;AACIC,IAAAA,KAAK,EAAE,MADX;AAEIC,IAAAA,aAAa,EAAE,QAFnB;AAGIC,IAAAA,OAAO,EAAE,MAHb;AAIIC,IAAAA,UAAU,EAAEC,iBAAiB,CAACX,KAAD,EAAQ,UAACA,KAAD;AAAA,aACjCA,KAAK,KAAK,OAAV,GAAoB,WAApB,GAAkCA,KAAK,KAAK,KAAV,GAAkB,SAAlB,GAA8B,QAD/B;AAAA,KAAR;AAJjC,GAHV;AAYA,sBACIY,aAAA,CAACC,GAAD,oBACQT,OACAC;AACJP,IAAAA,EAAE,EAAEA;AACJgB,IAAAA,SAAS,EAAE,CAACX,yBAAD,EAA4BY,aAAa,CAACC,MAAD,EAAS,OAAT,EAAkBjB,KAAlB,CAAzC;AACXF,IAAAA,GAAG,EAAEA;IALT,EAOKI,QAAQ,KAAK,MAAb,GACKW,QAAA,CAAeK,GAAf,CAAmBC,eAAe,CAAChB,QAAD,CAAlC,EAA8C,UAACiB,KAAD,EAAQC,KAAR;AAAA,WAC1CA,KAAK,GAAG,CAAR,gBACIR,aAAA,SAAA,MAAA,eACIA,aAAA,CAACS,OAAD;AAASC,MAAAA,MAAM,EAAErB;KAAjB,CADJ,EAEKkB,KAFL,CADJ,GAMIA,KAPsC;AAAA,GAA9C,CADL,GAWKjB,QAlBV,CADJ;AAsBH,CA9CiC;;;;"}
|
|
@@ -8,6 +8,7 @@ import { useId } from '../common-helpers.js';
|
|
|
8
8
|
import { FieldHint } from '../base-field/base-field.js';
|
|
9
9
|
import styles from './switch-field.module.css.js';
|
|
10
10
|
|
|
11
|
+
var _excluded = ["label", "hint", "disabled", "hidden", "defaultChecked", "id", "aria-describedby", "aria-label", "aria-labelledby", "onChange"];
|
|
11
12
|
var SwitchField = /*#__PURE__*/forwardRef(function SwitchField(_ref, ref) {
|
|
12
13
|
var _ref2, _props$checked, _props$checked2;
|
|
13
14
|
|
|
@@ -19,23 +20,31 @@ var SwitchField = /*#__PURE__*/forwardRef(function SwitchField(_ref, ref) {
|
|
|
19
20
|
defaultChecked = _ref.defaultChecked,
|
|
20
21
|
originalId = _ref.id,
|
|
21
22
|
originalAriaDescribedBy = _ref['aria-describedby'],
|
|
23
|
+
originalAriaLabel = _ref['aria-label'],
|
|
24
|
+
originalAriaLabelledby = _ref['aria-labelledby'],
|
|
22
25
|
_onChange = _ref.onChange,
|
|
23
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
26
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
24
27
|
|
|
25
28
|
var id = useId(originalId);
|
|
26
29
|
var hintId = useId();
|
|
27
30
|
var ariaDescribedBy = originalAriaDescribedBy !== null && originalAriaDescribedBy !== void 0 ? originalAriaDescribedBy : hint ? hintId : undefined;
|
|
31
|
+
var ariaLabel = originalAriaLabel !== null && originalAriaLabel !== void 0 ? originalAriaLabel : undefined;
|
|
32
|
+
var ariaLabelledBy = originalAriaLabelledby !== null && originalAriaLabelledby !== void 0 ? originalAriaLabelledby : undefined;
|
|
28
33
|
|
|
29
|
-
var _React$useState = useState(
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
var _React$useState = useState(false),
|
|
35
|
+
keyFocused = _React$useState[0],
|
|
36
|
+
setKeyFocused = _React$useState[1];
|
|
37
|
+
|
|
38
|
+
var _React$useState2 = useState((_ref2 = (_props$checked = props.checked) !== null && _props$checked !== void 0 ? _props$checked : defaultChecked) !== null && _ref2 !== void 0 ? _ref2 : false),
|
|
39
|
+
checkedState = _React$useState2[0],
|
|
40
|
+
setChecked = _React$useState2[1];
|
|
32
41
|
|
|
33
42
|
var isChecked = (_props$checked2 = props.checked) !== null && _props$checked2 !== void 0 ? _props$checked2 : checkedState;
|
|
34
43
|
return /*#__PURE__*/createElement(Stack, {
|
|
35
44
|
space: "small",
|
|
36
45
|
hidden: hidden
|
|
37
46
|
}, /*#__PURE__*/createElement(Box, {
|
|
38
|
-
className: [styles.container, disabled ? styles.disabled : null, isChecked ? styles.checked : null],
|
|
47
|
+
className: [styles.container, disabled ? styles.disabled : null, isChecked ? styles.checked : null, keyFocused ? styles.keyFocused : null],
|
|
39
48
|
as: "label",
|
|
40
49
|
display: "flex",
|
|
41
50
|
alignItems: "center"
|
|
@@ -51,6 +60,8 @@ var SwitchField = /*#__PURE__*/forwardRef(function SwitchField(_ref, ref) {
|
|
|
51
60
|
type: "checkbox",
|
|
52
61
|
disabled: disabled,
|
|
53
62
|
"aria-describedby": ariaDescribedBy,
|
|
63
|
+
"aria-label": ariaLabel,
|
|
64
|
+
"aria-labelledby": ariaLabelledBy,
|
|
54
65
|
ref: ref,
|
|
55
66
|
checked: isChecked,
|
|
56
67
|
onChange: function onChange(event) {
|
|
@@ -59,6 +70,18 @@ var SwitchField = /*#__PURE__*/forwardRef(function SwitchField(_ref, ref) {
|
|
|
59
70
|
if (!event.defaultPrevented) {
|
|
60
71
|
setChecked(event.currentTarget.checked);
|
|
61
72
|
}
|
|
73
|
+
},
|
|
74
|
+
onBlur: function onBlur(event) {
|
|
75
|
+
var _props$onBlur;
|
|
76
|
+
|
|
77
|
+
setKeyFocused(false);
|
|
78
|
+
props === null || props === void 0 ? void 0 : (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 ? void 0 : _props$onBlur.call(props, event);
|
|
79
|
+
},
|
|
80
|
+
onKeyUp: function onKeyUp(event) {
|
|
81
|
+
var _props$onKeyUp;
|
|
82
|
+
|
|
83
|
+
setKeyFocused(true);
|
|
84
|
+
props === null || props === void 0 ? void 0 : (_props$onKeyUp = props.onKeyUp) === null || _props$onKeyUp === void 0 ? void 0 : _props$onKeyUp.call(props, event);
|
|
62
85
|
}
|
|
63
86
|
}))), /*#__PURE__*/createElement("span", {
|
|
64
87
|
className: styles.handle
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-field.js","sources":["../../../src/new-components/switch-field/switch-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { Stack } from '../stack'\nimport { Text } from '../text'\nimport { HiddenVisually } from '../hidden-visually'\nimport { FieldComponentProps, FieldHint } from '../base-field'\nimport { useId } from '../common-helpers'\nimport styles from './switch-field.module.css'\n\ntype SwitchFieldProps = Omit<\n FieldComponentProps<HTMLInputElement>,\n 'type'
|
|
1
|
+
{"version":3,"file":"switch-field.js","sources":["../../../src/new-components/switch-field/switch-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { Stack } from '../stack'\nimport { Text } from '../text'\nimport { HiddenVisually } from '../hidden-visually'\nimport { FieldComponentProps, FieldHint } from '../base-field'\nimport { useId } from '../common-helpers'\nimport styles from './switch-field.module.css'\n\ntype SwitchFieldProps = Omit<\n FieldComponentProps<HTMLInputElement>,\n | 'type'\n | 'secondaryLabel'\n | 'auxiliaryLabel'\n | 'maxWidth'\n | 'aria-describedby'\n | 'aria-label'\n | 'aria-labelledby'\n> & {\n /** Identifies the element (or elements) that describes the switch for assistive technologies. */\n 'aria-describedby'?: string\n /** Defines a string value that labels the current switch for assistive technologies. */\n 'aria-label'?: string\n /** Identifies the element (or elements) that labels the current switch for assistive technologies. */\n 'aria-labelledby'?: string\n}\n\nconst SwitchField = React.forwardRef<HTMLInputElement, SwitchFieldProps>(function SwitchField(\n {\n label,\n hint,\n disabled = false,\n hidden,\n defaultChecked,\n id: originalId,\n 'aria-describedby': originalAriaDescribedBy,\n 'aria-label': originalAriaLabel,\n 'aria-labelledby': originalAriaLabelledby,\n onChange,\n ...props\n },\n ref,\n) {\n const id = useId(originalId)\n const hintId = useId()\n\n const ariaDescribedBy = originalAriaDescribedBy ?? (hint ? hintId : undefined)\n const ariaLabel = originalAriaLabel ?? undefined\n const ariaLabelledBy = originalAriaLabelledby ?? undefined\n\n const [keyFocused, setKeyFocused] = React.useState(false)\n const [checkedState, setChecked] = React.useState(props.checked ?? defaultChecked ?? false)\n const isChecked = props.checked ?? checkedState\n\n return (\n <Stack space=\"small\" hidden={hidden}>\n <Box\n className={[\n styles.container,\n disabled ? styles.disabled : null,\n isChecked ? styles.checked : null,\n keyFocused ? styles.keyFocused : null,\n ]}\n as=\"label\"\n display=\"flex\"\n alignItems=\"center\"\n >\n <Box\n position=\"relative\"\n display=\"inlineBlock\"\n overflow=\"visible\"\n marginRight=\"small\"\n flexShrink={0}\n className={styles.toggle}\n >\n <HiddenVisually>\n <input\n {...props}\n id={id}\n type=\"checkbox\"\n disabled={disabled}\n aria-describedby={ariaDescribedBy}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n ref={ref}\n checked={isChecked}\n onChange={(event) => {\n onChange?.(event)\n if (!event.defaultPrevented) {\n setChecked(event.currentTarget.checked)\n }\n }}\n onBlur={(event) => {\n setKeyFocused(false)\n props?.onBlur?.(event)\n }}\n onKeyUp={(event) => {\n setKeyFocused(true)\n props?.onKeyUp?.(event)\n }}\n />\n </HiddenVisually>\n <span className={styles.handle} />\n </Box>\n <Text exceptionallySetClassName={styles.label}>{label}</Text>\n </Box>\n {hint ? <FieldHint id={hintId}>{hint}</FieldHint> : null}\n </Stack>\n )\n})\n\nexport { SwitchField }\nexport type { SwitchFieldProps }\n"],"names":["SwitchField","React","ref","label","hint","disabled","hidden","defaultChecked","originalId","id","originalAriaDescribedBy","originalAriaLabel","originalAriaLabelledby","onChange","props","useId","hintId","ariaDescribedBy","undefined","ariaLabel","ariaLabelledBy","keyFocused","setKeyFocused","checked","checkedState","setChecked","isChecked","Stack","space","Box","className","styles","container","as","display","alignItems","position","overflow","marginRight","flexShrink","toggle","HiddenVisually","type","event","defaultPrevented","currentTarget","onBlur","onKeyUp","handle","Text","exceptionallySetClassName","FieldHint"],"mappings":";;;;;;;;;;;IA2BMA,WAAW,gBAAGC,UAAA,CAAqD,SAASD,WAAT,OAcrEE,GAdqE;;;MAEjEC,aAAAA;MACAC,YAAAA;2BACAC;MAAAA,sCAAW;MACXC,cAAAA;MACAC,sBAAAA;MACIC,kBAAJC;MACoBC,+BAApB;MACcC,yBAAd;MACmBC,8BAAnB;MACAC,iBAAAA;MACGC;;AAIP,MAAML,EAAE,GAAGM,KAAK,CAACP,UAAD,CAAhB;AACA,MAAMQ,MAAM,GAAGD,KAAK,EAApB;AAEA,MAAME,eAAe,GAAGP,uBAAH,aAAGA,uBAAH,cAAGA,uBAAH,GAA+BN,IAAI,GAAGY,MAAH,GAAYE,SAApE;AACA,MAAMC,SAAS,GAAGR,iBAAH,aAAGA,iBAAH,cAAGA,iBAAH,GAAwBO,SAAvC;AACA,MAAME,cAAc,GAAGR,sBAAH,aAAGA,sBAAH,cAAGA,sBAAH,GAA6BM,SAAjD;;AAEA,wBAAoCjB,QAAA,CAAe,KAAf,CAApC;AAAA,MAAOoB,UAAP;AAAA,MAAmBC,aAAnB;;AACA,y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,CAACE,aAAN,CAAoBtB,OAArB,CAAV;AACH;AACJ;AACDuB,IAAAA,MAAM,EAAE,gBAACH,KAAD;;;AACJrB,MAAAA,aAAa,CAAC,KAAD,CAAb;AACAR,MAAAA,KAAK,SAAL,IAAAA,KAAK,WAAL,6BAAAA,KAAK,CAAEgC,MAAP,qEAAAhC,KAAK,EAAW6B,KAAX,CAAL;AACH;AACDI,IAAAA,OAAO,EAAE,iBAACJ,KAAD;;;AACLrB,MAAAA,aAAa,CAAC,IAAD,CAAb;AACAR,MAAAA,KAAK,SAAL,IAAAA,KAAK,WAAL,8BAAAA,KAAK,CAAEiC,OAAP,uEAAAjC,KAAK,EAAY6B,KAAZ,CAAL;AACH;IAvBL,CADJ,CARJ,eAmCI1C,aAAA,OAAA;AAAM6B,IAAAA,SAAS,EAAEC,MAAM,CAACiB;GAAxB,CAnCJ,CAXJ,eAgDI/C,aAAA,CAACgD,IAAD;AAAMC,IAAAA,yBAAyB,EAAEnB,MAAM,CAAC5B;GAAxC,EAAgDA,KAAhD,CAhDJ,CADJ,EAmDKC,IAAI,gBAAGH,aAAA,CAACkD,SAAD;AAAW1C,IAAAA,EAAE,EAAEO;GAAf,EAAwBZ,IAAxB,CAAH,GAA+C,IAnDxD,CADJ;AAuDH,CAlFmB;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var modules_8e05f7c9 = {"container":"
|
|
1
|
+
var modules_8e05f7c9 = {"container":"ec63c3f1","disabled":"_7de9c06d","checked":"a37981fc","toggle":"_2a17ac45","label":"_68cc9707","handle":"_91409c7f","keyFocused":"a6490371"};
|
|
2
2
|
|
|
3
3
|
export default modules_8e05f7c9;
|
|
4
4
|
//# sourceMappingURL=switch-field.module.css.js.map
|
|
@@ -7,6 +7,11 @@ import { useTabState, Tab as Tab$1, TabList as TabList$1, TabPanel as TabPanel$1
|
|
|
7
7
|
import { usePrevious } from '../../hooks/use-previous/use-previous.js';
|
|
8
8
|
import styles from './tabs.module.css.js';
|
|
9
9
|
|
|
10
|
+
var _excluded = ["color", "variant"],
|
|
11
|
+
_excluded2 = ["children", "space"],
|
|
12
|
+
_excluded3 = ["color", "variant"],
|
|
13
|
+
_excluded4 = ["children", "id", "as", "render"],
|
|
14
|
+
_excluded5 = ["color", "variant"];
|
|
10
15
|
var TabsContext = /*#__PURE__*/createContext(null);
|
|
11
16
|
/**
|
|
12
17
|
* Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.
|
|
@@ -58,7 +63,7 @@ function Tab(_ref2) {
|
|
|
58
63
|
|
|
59
64
|
var color = tabContextValue.color,
|
|
60
65
|
variant = tabContextValue.variant,
|
|
61
|
-
tabState = _objectWithoutPropertiesLoose(tabContextValue,
|
|
66
|
+
tabState = _objectWithoutPropertiesLoose(tabContextValue, _excluded);
|
|
62
67
|
|
|
63
68
|
return /*#__PURE__*/createElement(Tab$1, Object.assign({
|
|
64
69
|
className: classNames(styles.tab, styles["tab-" + (variant !== null && variant !== void 0 ? variant : '')], styles["tab-" + (color !== null && color !== void 0 ? color : '')]),
|
|
@@ -73,7 +78,7 @@ function TabList(_ref3) {
|
|
|
73
78
|
var children = _ref3.children,
|
|
74
79
|
_ref3$space = _ref3.space,
|
|
75
80
|
space = _ref3$space === void 0 ? 'medium' : _ref3$space,
|
|
76
|
-
props = _objectWithoutPropertiesLoose(_ref3,
|
|
81
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded2);
|
|
77
82
|
|
|
78
83
|
var tabContextValue = useContext(TabsContext);
|
|
79
84
|
|
|
@@ -81,7 +86,7 @@ function TabList(_ref3) {
|
|
|
81
86
|
return null;
|
|
82
87
|
}
|
|
83
88
|
|
|
84
|
-
var tabState = _objectWithoutPropertiesLoose(tabContextValue,
|
|
89
|
+
var tabState = _objectWithoutPropertiesLoose(tabContextValue, _excluded3);
|
|
85
90
|
|
|
86
91
|
return /*#__PURE__*/createElement(TabList$1, Object.assign({}, props, tabState), /*#__PURE__*/createElement(Inline, {
|
|
87
92
|
space: space
|
|
@@ -97,7 +102,7 @@ var TabPanel = /*#__PURE__*/polymorphicComponent(function TabPanel(_ref4, ref) {
|
|
|
97
102
|
as = _ref4.as,
|
|
98
103
|
_ref4$render = _ref4.render,
|
|
99
104
|
render = _ref4$render === void 0 ? 'always' : _ref4$render,
|
|
100
|
-
props = _objectWithoutPropertiesLoose(_ref4,
|
|
105
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
101
106
|
|
|
102
107
|
var tabContextValue = useContext(TabsContext);
|
|
103
108
|
|
|
@@ -116,7 +121,7 @@ var TabPanel = /*#__PURE__*/polymorphicComponent(function TabPanel(_ref4, ref) {
|
|
|
116
121
|
return null;
|
|
117
122
|
}
|
|
118
123
|
|
|
119
|
-
var tabState = _objectWithoutPropertiesLoose(tabContextValue,
|
|
124
|
+
var tabState = _objectWithoutPropertiesLoose(tabContextValue, _excluded5);
|
|
120
125
|
|
|
121
126
|
return /*#__PURE__*/createElement(TabPanel$1, Object.assign({
|
|
122
127
|
tabId: id
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sources":["../../../src/new-components/tabs/tabs.tsx"],"sourcesContent":["import * as React from 'react'\nimport classNames from 'classnames'\nimport {\n useTabState,\n Tab as BaseTab,\n TabList as BaseTabList,\n TabPanel as BaseTabPanel,\n TabStateReturn,\n} from 'reakit/Tab'\nimport { Inline } from '../inline'\nimport { usePrevious } from '../../hooks/use-previous'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport type { ResponsiveProp } from '../responsive-props'\nimport type { Space } from '../common-types'\n\nimport styles from './tabs.module.css'\n\nconst TabsContext = React.createContext<\n (TabStateReturn & Omit<TabsProps, 'children' | 'selectedId'>) | null\n>(null)\n\ntype TabsProps = {\n /** The `<Tabs>` component must be composed from a `<TabList>` and corresponding `<TabPanel>` components */\n children: React.ReactNode\n /**\n * Determines the primary colour of the tabs\n */\n color?: 'primary' | 'secondary' | 'tertiary'\n /**\n * Determines the style of the tabs\n */\n variant?: 'normal' | 'plain'\n /**\n * The id of the selected tab\n */\n selectedId?: string | null\n}\n\n/**\n * Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.\n */\nexport function Tabs({\n children,\n selectedId,\n color = 'primary',\n variant = 'normal',\n}: TabsProps): React.ReactElement {\n const tabState = useTabState({ selectedId })\n const previousSelectedId = usePrevious(selectedId)\n const { selectedId: actualSelectedId, select } = tabState\n\n React.useEffect(\n function selectTab() {\n if (\n previousSelectedId !== selectedId &&\n selectedId !== actualSelectedId &&\n selectedId !== undefined\n ) {\n select(selectedId)\n }\n },\n [selectedId, actualSelectedId, select, previousSelectedId],\n )\n\n const memoizedTabState = React.useMemo(\n function memoizeTabState() {\n return {\n ...tabState,\n color,\n variant,\n }\n },\n // There is no guarantee that useTabState returns a stable object when there are no changes, so\n // following reakit/Tab's example we only return a new objet when any of its values have changed\n // eslint-disable-next-line\n [color, variant, ...Object.values(tabState)],\n )\n\n return <TabsContext.Provider value={memoizedTabState}>{children}</TabsContext.Provider>\n}\n\ntype TabProps = {\n /** The content to render inside of the tab button */\n children: React.ReactNode\n\n /** The tab's identifier. This must match its corresponding `<TabPanel>`'s id */\n id: string\n}\n\n/**\n * Represents the individual tab elements within the group. Each `<Tab>` must have a corresponding `<TabPanel>` component.\n */\nexport function Tab({ children, id }: TabProps): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n if (!tabContextValue) {\n return null\n }\n\n const { color, variant, ...tabState } = tabContextValue\n\n return (\n <BaseTab\n className={classNames(\n styles.tab,\n styles[`tab-${variant ?? ''}`],\n styles[`tab-${color ?? ''}`],\n )}\n id={id}\n {...tabState}\n >\n {children}\n </BaseTab>\n )\n}\n\ntype TabListProps = (\n | {\n /** Labels the tab list for assistive technologies. This must be provided if `aria-labelledby` is omitted. */\n 'aria-label': string\n }\n | {\n /**\n * One or more element IDs used to label the tab list for assistive technologies. Required if\n * `aria-label` is omitted.\n */\n 'aria-labelledby': string\n }\n | {\n /**\n * For cases where multiple instances of the tab list exists, the duplicates may be marked as aria-hidden\n */\n 'aria-hidden': boolean\n }\n) & {\n /**\n * A list of `<Tab>` elements\n */\n children: React.ReactNode\n\n /**\n * Controls the spacing between tabs\n */\n space?: ResponsiveProp<Space>\n}\n\n/**\n * A component used to group `<Tab>` elements together.\n */\nexport function TabList({\n children,\n space = 'medium',\n ...props\n}: TabListProps): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n if (!tabContextValue) {\n return null\n }\n\n const { color, variant, ...tabState } = tabContextValue\n\n return (\n <BaseTabList {...props} {...tabState}>\n <Inline space={space}>{children}</Inline>\n </BaseTabList>\n )\n}\n\ntype TabPanelProps = {\n /** The content to be rendered inside the tab */\n children: React.ReactNode\n\n /** The tabPanel's identifier. This must match its corresponding `<Tab>`'s id */\n id: string\n\n /**\n * By default, the tab panel's content is always rendered even when they are not active. This behaviour can be changed to\n * 'active', which renders only when the tab is active, and 'lazy', meaning while inactive tab panels will not be rendered\n * initially, they will remain mounted once they are active until the entire Tabs tree is unmounted.\n */\n render?: 'always' | 'active' | 'lazy'\n}\n\n/**\n * Used to define the content to be rendered when a tab is active. Each `<TabPanel>` must have a corresponding `<Tab>` component.\n */\nexport const TabPanel = polymorphicComponent<'div', TabPanelProps, 'omitClassName'>(\n function TabPanel(\n { children, id, as, render = 'always', ...props },\n ref,\n ): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n const [tabRendered, setTabRendered] = React.useState(false)\n const tabIsActive = tabContextValue?.selectedId === id\n\n React.useEffect(\n function trackTabRenderedState() {\n if (!tabRendered && tabIsActive) {\n setTabRendered(true)\n }\n },\n [tabRendered, tabIsActive],\n )\n\n if (!tabContextValue) {\n return null\n }\n\n const { color, variant, ...tabState } = tabContextValue\n\n return (\n <BaseTabPanel tabId={id} {...tabState} {...props} as={as} ref={ref}>\n {render === 'always' ? children : null}\n {render === 'active' && tabIsActive ? children : null}\n {render === 'lazy' && (tabIsActive || tabRendered) ? children : null}\n </BaseTabPanel>\n )\n },\n)\n\ntype TabAwareSlotProps = {\n /**\n * Render prop used to provide the content to be rendered inside the slot. The render prop will be\n * called with the current `selectedId`\n */\n children: (provided: { selectedId?: string | null }) => React.ReactElement | null\n}\n\n/**\n * Allows content to be rendered based on the current tab being selected while outside of the TabPanel\n * component. Can be placed freely within the main `<Tabs>` component.\n */\nexport function TabAwareSlot({ children }: TabAwareSlotProps): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n return tabContextValue ? children({ selectedId: tabContextValue.selectedId }) : null\n}\n"],"names":["TabsContext","React","Tabs","children","selectedId","color","variant","tabState","useTabState","previousSelectedId","usePrevious","actualSelectedId","select","selectTab","undefined","memoizedTabState","memoizeTabState","Object","values","Provider","value","Tab","id","tabContextValue","BaseTab","className","classNames","styles","tab","TabList","space","props","BaseTabList","Inline","TabPanel","polymorphicComponent","ref","as","render","tabRendered","setTabRendered","tabIsActive","trackTabRenderedState","BaseTabPanel","tabId","TabAwareSlot"],"mappings":";;;;;;;;;AAiBA,IAAMA,WAAW,gBAAGC,aAAA,CAElB,IAFkB,CAApB;AAqBA;;;;SAGgBC;MACZC,gBAAAA;MACAC,kBAAAA;wBACAC;MAAAA,gCAAQ;0BACRC;MAAAA,oCAAU;AAEV,MAAMC,QAAQ,GAAGC,WAAW,CAAC;AAAEJ,IAAAA,UAAU,EAAVA;AAAF,GAAD,CAA5B;AACA,MAAMK,kBAAkB,GAAGC,WAAW,CAACN,UAAD,CAAtC;MACoBO,mBAA6BJ,SAAzCH;MAA8BQ,SAAWL,SAAXK;AAEtCX,EAAAA,SAAA,CACI,SAASY,SAAT;AACI,QACIJ,kBAAkB,KAAKL,UAAvB,IACAA,UAAU,KAAKO,gBADf,IAEAP,UAAU,KAAKU,SAHnB,EAIE;AACEF,MAAAA,MAAM,CAACR,UAAD,CAAN;AACH;AACJ,GATL,EAUI,CAACA,UAAD,EAAaO,gBAAb,EAA+BC,MAA/B,EAAuCH,kBAAvC,CAVJ;AAaA,M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;;;"}
|
|
1
|
+
{"version":3,"file":"tabs.js","sources":["../../../src/new-components/tabs/tabs.tsx"],"sourcesContent":["import * as React from 'react'\nimport classNames from 'classnames'\nimport {\n useTabState,\n Tab as BaseTab,\n TabList as BaseTabList,\n TabPanel as BaseTabPanel,\n TabStateReturn,\n} from 'reakit/Tab'\nimport { Inline } from '../inline'\nimport { usePrevious } from '../../hooks/use-previous'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport type { ResponsiveProp } from '../responsive-props'\nimport type { Space } from '../common-types'\n\nimport styles from './tabs.module.css'\n\nconst TabsContext = React.createContext<\n (TabStateReturn & Omit<TabsProps, 'children' | 'selectedId'>) | null\n>(null)\n\ntype TabsProps = {\n /** The `<Tabs>` component must be composed from a `<TabList>` and corresponding `<TabPanel>` components */\n children: React.ReactNode\n /**\n * Determines the primary colour of the tabs\n */\n color?: 'primary' | 'secondary' | 'tertiary'\n /**\n * Determines the style of the tabs\n */\n variant?: 'normal' | 'plain'\n /**\n * The id of the selected tab\n */\n selectedId?: string | null\n}\n\n/**\n * Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.\n */\nexport function Tabs({\n children,\n selectedId,\n color = 'primary',\n variant = 'normal',\n}: TabsProps): React.ReactElement {\n const tabState = useTabState({ selectedId })\n const previousSelectedId = usePrevious(selectedId)\n const { selectedId: actualSelectedId, select } = tabState\n\n React.useEffect(\n function selectTab() {\n if (\n previousSelectedId !== selectedId &&\n selectedId !== actualSelectedId &&\n selectedId !== undefined\n ) {\n select(selectedId)\n }\n },\n [selectedId, actualSelectedId, select, previousSelectedId],\n )\n\n const memoizedTabState = React.useMemo(\n function memoizeTabState() {\n return {\n ...tabState,\n color,\n variant,\n }\n },\n // There is no guarantee that useTabState returns a stable object when there are no changes, so\n // following reakit/Tab's example we only return a new objet when any of its values have changed\n // eslint-disable-next-line\n [color, variant, ...Object.values(tabState)],\n )\n\n return <TabsContext.Provider value={memoizedTabState}>{children}</TabsContext.Provider>\n}\n\ntype TabProps = {\n /** The content to render inside of the tab button */\n children: React.ReactNode\n\n /** The tab's identifier. This must match its corresponding `<TabPanel>`'s id */\n id: string\n}\n\n/**\n * Represents the individual tab elements within the group. Each `<Tab>` must have a corresponding `<TabPanel>` component.\n */\nexport function Tab({ children, id }: TabProps): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n if (!tabContextValue) {\n return null\n }\n\n const { color, variant, ...tabState } = tabContextValue\n\n return (\n <BaseTab\n className={classNames(\n styles.tab,\n styles[`tab-${variant ?? ''}`],\n styles[`tab-${color ?? ''}`],\n )}\n id={id}\n {...tabState}\n >\n {children}\n </BaseTab>\n )\n}\n\ntype TabListProps = (\n | {\n /** Labels the tab list for assistive technologies. This must be provided if `aria-labelledby` is omitted. */\n 'aria-label': string\n }\n | {\n /**\n * One or more element IDs used to label the tab list for assistive technologies. Required if\n * `aria-label` is omitted.\n */\n 'aria-labelledby': string\n }\n | {\n /**\n * For cases where multiple instances of the tab list exists, the duplicates may be marked as aria-hidden\n */\n 'aria-hidden': boolean\n }\n) & {\n /**\n * A list of `<Tab>` elements\n */\n children: React.ReactNode\n\n /**\n * Controls the spacing between tabs\n */\n space?: ResponsiveProp<Space>\n}\n\n/**\n * A component used to group `<Tab>` elements together.\n */\nexport function TabList({\n children,\n space = 'medium',\n ...props\n}: TabListProps): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n if (!tabContextValue) {\n return null\n }\n\n const { color, variant, ...tabState } = tabContextValue\n\n return (\n <BaseTabList {...props} {...tabState}>\n <Inline space={space}>{children}</Inline>\n </BaseTabList>\n )\n}\n\ntype TabPanelProps = {\n /** The content to be rendered inside the tab */\n children: React.ReactNode\n\n /** The tabPanel's identifier. This must match its corresponding `<Tab>`'s id */\n id: string\n\n /**\n * By default, the tab panel's content is always rendered even when they are not active. This behaviour can be changed to\n * 'active', which renders only when the tab is active, and 'lazy', meaning while inactive tab panels will not be rendered\n * initially, they will remain mounted once they are active until the entire Tabs tree is unmounted.\n */\n render?: 'always' | 'active' | 'lazy'\n}\n\n/**\n * Used to define the content to be rendered when a tab is active. Each `<TabPanel>` must have a corresponding `<Tab>` component.\n */\nexport const TabPanel = polymorphicComponent<'div', TabPanelProps, 'omitClassName'>(\n function TabPanel(\n { children, id, as, render = 'always', ...props },\n ref,\n ): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n const [tabRendered, setTabRendered] = React.useState(false)\n const tabIsActive = tabContextValue?.selectedId === id\n\n React.useEffect(\n function trackTabRenderedState() {\n if (!tabRendered && tabIsActive) {\n setTabRendered(true)\n }\n },\n [tabRendered, tabIsActive],\n )\n\n if (!tabContextValue) {\n return null\n }\n\n const { color, variant, ...tabState } = tabContextValue\n\n return (\n <BaseTabPanel tabId={id} {...tabState} {...props} as={as} ref={ref}>\n {render === 'always' ? children : null}\n {render === 'active' && tabIsActive ? children : null}\n {render === 'lazy' && (tabIsActive || tabRendered) ? children : null}\n </BaseTabPanel>\n )\n },\n)\n\ntype TabAwareSlotProps = {\n /**\n * Render prop used to provide the content to be rendered inside the slot. The render prop will be\n * called with the current `selectedId`\n */\n children: (provided: { selectedId?: string | null }) => React.ReactElement | null\n}\n\n/**\n * Allows content to be rendered based on the current tab being selected while outside of the TabPanel\n * component. Can be placed freely within the main `<Tabs>` component.\n */\nexport function TabAwareSlot({ children }: TabAwareSlotProps): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n return tabContextValue ? children({ selectedId: tabContextValue.selectedId }) : null\n}\n"],"names":["TabsContext","React","Tabs","children","selectedId","color","variant","tabState","useTabState","previousSelectedId","usePrevious","actualSelectedId","select","selectTab","undefined","memoizedTabState","memoizeTabState","Object","values","Provider","value","Tab","id","tabContextValue","BaseTab","className","classNames","styles","tab","TabList","space","props","BaseTabList","Inline","TabPanel","polymorphicComponent","ref","as","render","tabRendered","setTabRendered","tabIsActive","trackTabRenderedState","BaseTabPanel","tabId","TabAwareSlot"],"mappings":";;;;;;;;;;;;;;AAiBA,I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WAApB,EAAiC;AAC7BD,MAAAA,cAAc,CAAC,IAAD,CAAd;AACH;AACJ,GALL,EAMI,CAACD,WAAD,EAAcE,WAAd,CANJ;;AASA,MAAI,CAAClB,eAAL,EAAsB;AAClB,WAAO,IAAP;AACH;;AAED,MAA2BhB,QAA3B,iCAAwCgB,eAAxC;;AAEA,sBACItB,aAAA,CAAC0C,UAAD;AAAcC,IAAAA,KAAK,EAAEtB;KAAQf,UAAcwB;AAAOM,IAAAA,EAAE,EAAEA;AAAID,IAAAA,GAAG,EAAEA;IAA/D,EACKE,MAAM,KAAK,QAAX,GAAsBnC,QAAtB,GAAiC,IADtC,EAEKmC,MAAM,KAAK,QAAX,IAAuBG,WAAvB,GAAqCtC,QAArC,GAAgD,IAFrD,EAGKmC,MAAM,KAAK,MAAX,KAAsBG,WAAW,IAAIF,WAArC,IAAoDpC,QAApD,GAA+D,IAHpE,CADJ;AAOH,CA/BuC;AA0C5C;;;;;SAIgB0C;MAAe1C,iBAAAA;AAC3B,MAAMoB,eAAe,GAAGtB,UAAA,CAAiBD,WAAjB,CAAxB;AAEA,SAAOuB,eAAe,GAAGpB,QAAQ,CAAC;AAAEC,IAAAA,UAAU,EAAEmB,eAAe,CAACnB;AAA9B,GAAD,CAAX,GAA0D,IAAhF;AACH;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var modules_40c67f5b = {"tab":"
|
|
1
|
+
var modules_40c67f5b = {"tab":"d7928f1c","tab-normal":"_5d8e72b3","tab-primary":"_8a23756d","tab-secondary":"_88fd4c95","tab-tertiary":"_40c4cce9","tab-plain":"_13722523"};
|
|
2
2
|
|
|
3
3
|
export default modules_40c67f5b;
|
|
4
4
|
//# sourceMappingURL=tabs.module.css.js.map
|
|
@@ -5,6 +5,7 @@ import { getClassNames } from '../responsive-props.js';
|
|
|
5
5
|
import { Box } from '../box/box.js';
|
|
6
6
|
import styles from './text.module.css.js';
|
|
7
7
|
|
|
8
|
+
var _excluded = ["as", "size", "weight", "tone", "align", "children", "lineClamp", "exceptionallySetClassName"];
|
|
8
9
|
var Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
9
10
|
var as = _ref.as,
|
|
10
11
|
_ref$size = _ref.size,
|
|
@@ -17,7 +18,7 @@ var Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
|
17
18
|
children = _ref.children,
|
|
18
19
|
lineClamp = _ref.lineClamp,
|
|
19
20
|
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
20
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
21
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
21
22
|
|
|
22
23
|
var lineClampMultipleLines = typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp !== null && lineClamp !== void 0 ? lineClamp : 1) > 1;
|
|
23
24
|
return /*#__PURE__*/createElement(Box, Object.assign({}, props, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","sources":["../../../src/new-components/text/text.tsx"],"sourcesContent":["import * as React from 'react'\nimport { getClassNames } from '../responsive-props'\nimport { Box } from '../box'\nimport { polymorphicComponent } from '../../utils/polymorphism'\n\nimport type { Tone } from '../common-types'\nimport type { BoxProps } from '../box'\n\nimport styles from './text.module.css'\n\ntype TextProps = {\n children: React.ReactNode\n /**\n * The size of the text.\n *\n * The supported values, from smaller size to larger size, are:\n * 'caption', 'copy', 'body', and 'subtitle'\n *\n * @default 'body'\n */\n size?: 'caption' | 'copy' | 'body' | 'subtitle'\n /**\n * The weight of the text font.\n *\n * @default 'regular'\n */\n weight?: 'regular' | 'semibold' | 'bold'\n /**\n * The tone (semantic color) of the text.\n *\n * @default 'normal'\n */\n tone?: Tone\n /**\n * Used to truncate the text to a given number of lines.\n *\n * It will add an ellipsis (`…`) to the text at the end of the last line, only if the text was\n * truncated. If the text fits without it being truncated, no ellipsis is added.\n *\n * By default, the text is not truncated at all, no matter how many lines it takes to render it.\n *\n * @default undefined\n */\n lineClamp?: 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5'\n /**\n * How to align the text horizontally.\n *\n * @default 'start'\n */\n align?: BoxProps['textAlign']\n}\n\nconst Text = polymorphicComponent<'div', TextProps>(function Text(\n {\n as,\n size = 'body',\n weight = 'regular',\n tone = 'normal',\n align,\n children,\n lineClamp,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n const lineClampMultipleLines =\n typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp ?? 1) > 1\n\n return (\n <Box\n {...props}\n as={as}\n className={[\n exceptionallySetClassName,\n styles.text,\n size !== 'body' ? getClassNames(styles, 'size', size) : null,\n weight !== 'regular' ? getClassNames(styles, 'weight', weight) : null,\n tone !== 'normal' ? getClassNames(styles, 'tone', tone) : null,\n lineClampMultipleLines ? styles.lineClampMultipleLines : null,\n lineClamp ? getClassNames(styles, 'lineClamp', lineClamp.toString()) : null,\n ]}\n textAlign={align}\n // Prevents emojis from being cut-off\n // See https://github.com/Doist/reactist/pull/528\n paddingRight={lineClamp ? 'xsmall' : undefined}\n ref={ref}\n >\n {children}\n </Box>\n )\n})\n\nexport type { TextProps }\nexport { Text }\n"],"names":["Text","polymorphicComponent","ref","as","size","weight","tone","align","children","lineClamp","exceptionallySetClassName","props","lineClampMultipleLines","Number","React","Box","className","styles","text","getClassNames","toString","textAlign","paddingRight","undefined"],"mappings":"
|
|
1
|
+
{"version":3,"file":"text.js","sources":["../../../src/new-components/text/text.tsx"],"sourcesContent":["import * as React from 'react'\nimport { getClassNames } from '../responsive-props'\nimport { Box } from '../box'\nimport { polymorphicComponent } from '../../utils/polymorphism'\n\nimport type { Tone } from '../common-types'\nimport type { BoxProps } from '../box'\n\nimport styles from './text.module.css'\n\ntype TextProps = {\n children: React.ReactNode\n /**\n * The size of the text.\n *\n * The supported values, from smaller size to larger size, are:\n * 'caption', 'copy', 'body', and 'subtitle'\n *\n * @default 'body'\n */\n size?: 'caption' | 'copy' | 'body' | 'subtitle'\n /**\n * The weight of the text font.\n *\n * @default 'regular'\n */\n weight?: 'regular' | 'semibold' | 'bold'\n /**\n * The tone (semantic color) of the text.\n *\n * @default 'normal'\n */\n tone?: Tone\n /**\n * Used to truncate the text to a given number of lines.\n *\n * It will add an ellipsis (`…`) to the text at the end of the last line, only if the text was\n * truncated. If the text fits without it being truncated, no ellipsis is added.\n *\n * By default, the text is not truncated at all, no matter how many lines it takes to render it.\n *\n * @default undefined\n */\n lineClamp?: 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5'\n /**\n * How to align the text horizontally.\n *\n * @default 'start'\n */\n align?: BoxProps['textAlign']\n}\n\nconst Text = polymorphicComponent<'div', TextProps>(function Text(\n {\n as,\n size = 'body',\n weight = 'regular',\n tone = 'normal',\n align,\n children,\n lineClamp,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n const lineClampMultipleLines =\n typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp ?? 1) > 1\n\n return (\n <Box\n {...props}\n as={as}\n className={[\n exceptionallySetClassName,\n styles.text,\n size !== 'body' ? getClassNames(styles, 'size', size) : null,\n weight !== 'regular' ? getClassNames(styles, 'weight', weight) : null,\n tone !== 'normal' ? getClassNames(styles, 'tone', tone) : null,\n lineClampMultipleLines ? styles.lineClampMultipleLines : null,\n lineClamp ? getClassNames(styles, 'lineClamp', lineClamp.toString()) : null,\n ]}\n textAlign={align}\n // Prevents emojis from being cut-off\n // See https://github.com/Doist/reactist/pull/528\n paddingRight={lineClamp ? 'xsmall' : undefined}\n ref={ref}\n >\n {children}\n </Box>\n )\n})\n\nexport type { TextProps }\nexport { Text }\n"],"names":["Text","polymorphicComponent","ref","as","size","weight","tone","align","children","lineClamp","exceptionallySetClassName","props","lineClampMultipleLines","Number","React","Box","className","styles","text","getClassNames","toString","textAlign","paddingRight","undefined"],"mappings":";;;;;;;;IAoDMA,IAAI,gBAAGC,oBAAoB,CAAmB,SAASD,IAAT,OAYhDE,GAZgD;MAE5CC,UAAAA;uBACAC;MAAAA,8BAAO;yBACPC;MAAAA,kCAAS;uBACTC;MAAAA,8BAAO;MACPC,aAAAA;MACAC,gBAAAA;MACAC,iBAAAA;MACAC,iCAAAA;MACGC;;AAIP,MAAMC,sBAAsB,GACxB,OAAOH,SAAP,KAAqB,QAArB,GAAgCI,MAAM,CAACJ,SAAD,CAAN,GAAoB,CAApD,GAAwD,CAACA,SAAD,aAACA,SAAD,cAACA,SAAD,GAAc,CAAd,IAAmB,CAD/E;AAGA,sBACIK,aAAA,CAACC,GAAD,oBACQJ;AACJR,IAAAA,EAAE,EAAEA;AACJa,IAAAA,SAAS,EAAE,CACPN,yBADO,EAEPO,MAAM,CAACC,IAFA,EAGPd,IAAI,KAAK,MAAT,GAAkBe,aAAa,CAACF,MAAD,EAAS,MAAT,EAAiBb,IAAjB,CAA/B,GAAwD,IAHjD,EAIPC,MAAM,KAAK,SAAX,GAAuBc,aAAa,CAACF,MAAD,EAAS,QAAT,EAAmBZ,MAAnB,CAApC,GAAiE,IAJ1D,EAKPC,IAAI,KAAK,QAAT,GAAoBa,aAAa,CAACF,MAAD,EAAS,MAAT,EAAiBX,IAAjB,CAAjC,GAA0D,IALnD,EAMPM,sBAAsB,GAAGK,MAAM,CAACL,sBAAV,GAAmC,IANlD,EAOPH,SAAS,GAAGU,aAAa,CAACF,MAAD,EAAS,WAAT,EAAsBR,SAAS,CAACW,QAAV,EAAtB,CAAhB,GAA8D,IAPhE;AASXC,IAAAA,SAAS,EAAEd;AACX;AACA;AACAe,IAAAA,YAAY,EAAEb,SAAS,GAAG,QAAH,GAAcc;AACrCrB,IAAAA,GAAG,EAAEA;IAhBT,EAkBKM,QAlBL,CADJ;AAsBH,CAvCgC;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var modules_a9637dd3 = {"text":"
|
|
1
|
+
var modules_a9637dd3 = {"text":"c5028ea8","size-caption":"_05d3a546","size-copy":"_100565e3","size-subtitle":"b8f72625","weight-semibold":"_398ecda1","weight-bold":"_8054cd6b","tone-secondary":"_6abd56b1","tone-danger":"_274b4a47","lineClampMultipleLines":"_724b0054","lineClamp-1":"_51ac6ee4","lineClamp-2":"b0742803","lineClamp-3":"dd664c95","lineClamp-4":"b02775b5","lineClamp-5":"da91b300"};
|
|
2
2
|
|
|
3
3
|
export default modules_a9637dd3;
|
|
4
4
|
//# sourceMappingURL=text.module.css.js.map
|
|
@@ -4,6 +4,8 @@ import { Box } from '../box/box.js';
|
|
|
4
4
|
import { BaseField } from '../base-field/base-field.js';
|
|
5
5
|
import styles from './text-area.module.css.js';
|
|
6
6
|
|
|
7
|
+
var _excluded = ["id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "maxWidth"];
|
|
8
|
+
|
|
7
9
|
function TextArea(_ref) {
|
|
8
10
|
var id = _ref.id,
|
|
9
11
|
label = _ref.label,
|
|
@@ -11,7 +13,7 @@ function TextArea(_ref) {
|
|
|
11
13
|
auxiliaryLabel = _ref.auxiliaryLabel,
|
|
12
14
|
hint = _ref.hint,
|
|
13
15
|
maxWidth = _ref.maxWidth,
|
|
14
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
16
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
15
17
|
|
|
16
18
|
return /*#__PURE__*/createElement(BaseField, {
|
|
17
19
|
id: id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-area.js","sources":["../../../src/new-components/text-area/text-area.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseField, FieldComponentProps } from '../base-field'\nimport { Box } from '../box'\nimport styles from './text-area.module.css'\n\ntype TextAreaProps = FieldComponentProps<HTMLTextAreaElement>\n\nfunction TextArea({\n id,\n label,\n secondaryLabel,\n auxiliaryLabel,\n hint,\n maxWidth,\n ...props\n}: TextAreaProps) {\n return (\n <BaseField\n id={id}\n label={label}\n secondaryLabel={secondaryLabel}\n auxiliaryLabel={auxiliaryLabel}\n hint={hint}\n className={styles.container}\n maxWidth={maxWidth}\n >\n {(extraProps) => (\n <Box width=\"full\">\n <textarea {...props} {...extraProps} />\n </Box>\n )}\n </BaseField>\n )\n}\n\nexport { TextArea }\nexport type { TextAreaProps }\n"],"names":["TextArea","id","label","secondaryLabel","auxiliaryLabel","hint","maxWidth","props","React","BaseField","className","styles","container","extraProps","Box","width"],"mappings":"
|
|
1
|
+
{"version":3,"file":"text-area.js","sources":["../../../src/new-components/text-area/text-area.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseField, FieldComponentProps } from '../base-field'\nimport { Box } from '../box'\nimport styles from './text-area.module.css'\n\ntype TextAreaProps = FieldComponentProps<HTMLTextAreaElement>\n\nfunction TextArea({\n id,\n label,\n secondaryLabel,\n auxiliaryLabel,\n hint,\n maxWidth,\n ...props\n}: TextAreaProps) {\n return (\n <BaseField\n id={id}\n label={label}\n secondaryLabel={secondaryLabel}\n auxiliaryLabel={auxiliaryLabel}\n hint={hint}\n className={styles.container}\n maxWidth={maxWidth}\n >\n {(extraProps) => (\n <Box width=\"full\">\n <textarea {...props} {...extraProps} />\n </Box>\n )}\n </BaseField>\n )\n}\n\nexport { TextArea }\nexport type { TextAreaProps }\n"],"names":["TextArea","id","label","secondaryLabel","auxiliaryLabel","hint","maxWidth","props","React","BaseField","className","styles","container","extraProps","Box","width"],"mappings":";;;;;;;;AAOA,SAASA,QAAT;MACIC,UAAAA;MACAC,aAAAA;MACAC,sBAAAA;MACAC,sBAAAA;MACAC,YAAAA;MACAC,gBAAAA;MACGC;;AAEH,sBACIC,aAAA,CAACC,SAAD;AACIR,IAAAA,EAAE,EAAEA;AACJC,IAAAA,KAAK,EAAEA;AACPC,IAAAA,cAAc,EAAEA;AAChBC,IAAAA,cAAc,EAAEA;AAChBC,IAAAA,IAAI,EAAEA;AACNK,IAAAA,SAAS,EAAEC,MAAM,CAACC;AAClBN,IAAAA,QAAQ,EAAEA;GAPd,EASK,UAACO,UAAD;AAAA,wBACGL,aAAA,CAACM,GAAD;AAAKC,MAAAA,KAAK,EAAC;KAAX,eACIP,aAAA,WAAA,oBAAcD,OAAWM,WAAzB,CADJ,CADH;AAAA,GATL,CADJ;AAiBH;;;;"}
|
|
@@ -4,6 +4,7 @@ import { Box } from '../box/box.js';
|
|
|
4
4
|
import { BaseField } from '../base-field/base-field.js';
|
|
5
5
|
import styles from './text-field.module.css.js';
|
|
6
6
|
|
|
7
|
+
var _excluded = ["id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "type", "maxWidth", "hidden", "aria-describedby"];
|
|
7
8
|
var TextField = /*#__PURE__*/forwardRef(function TextField(_ref, ref) {
|
|
8
9
|
var id = _ref.id,
|
|
9
10
|
label = _ref.label,
|
|
@@ -15,7 +16,7 @@ var TextField = /*#__PURE__*/forwardRef(function TextField(_ref, ref) {
|
|
|
15
16
|
maxWidth = _ref.maxWidth,
|
|
16
17
|
hidden = _ref.hidden,
|
|
17
18
|
ariaDescribedBy = _ref['aria-describedby'],
|
|
18
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
19
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
20
|
|
|
20
21
|
return /*#__PURE__*/createElement(BaseField, {
|
|
21
22
|
id: id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.js","sources":["../../../src/new-components/text-field/text-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseField } from '../base-field'\nimport { Box } from '../box'\nimport styles from './text-field.module.css'\nimport type { FieldComponentProps } from '../base-field'\n\ntype TextFieldType = 'email' | 'search' | 'tel' | 'text' | 'url'\n\ntype TextFieldProps = Omit<FieldComponentProps<HTMLInputElement>, 'type'> & {\n type?: TextFieldType\n}\n\nconst TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(function TextField(\n {\n id,\n label,\n secondaryLabel,\n auxiliaryLabel,\n hint,\n type = 'text',\n maxWidth,\n hidden,\n 'aria-describedby': ariaDescribedBy,\n ...props\n },\n ref,\n) {\n return (\n <BaseField\n id={id}\n label={label}\n secondaryLabel={secondaryLabel}\n auxiliaryLabel={auxiliaryLabel}\n hint={hint}\n maxWidth={maxWidth}\n hidden={hidden}\n aria-describedby={ariaDescribedBy}\n >\n {(extraProps) => (\n <Box className={styles.inputWrapper}>\n <input {...props} {...extraProps} type={type} ref={ref} />\n </Box>\n )}\n </BaseField>\n )\n})\n\nexport { TextField }\nexport type { TextFieldProps, TextFieldType }\n"],"names":["TextField","React","ref","id","label","secondaryLabel","auxiliaryLabel","hint","type","maxWidth","hidden","ariaDescribedBy","props","BaseField","extraProps","Box","className","styles","inputWrapper"],"mappings":"
|
|
1
|
+
{"version":3,"file":"text-field.js","sources":["../../../src/new-components/text-field/text-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseField } from '../base-field'\nimport { Box } from '../box'\nimport styles from './text-field.module.css'\nimport type { FieldComponentProps } from '../base-field'\n\ntype TextFieldType = 'email' | 'search' | 'tel' | 'text' | 'url'\n\ntype TextFieldProps = Omit<FieldComponentProps<HTMLInputElement>, 'type'> & {\n type?: TextFieldType\n}\n\nconst TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(function TextField(\n {\n id,\n label,\n secondaryLabel,\n auxiliaryLabel,\n hint,\n type = 'text',\n maxWidth,\n hidden,\n 'aria-describedby': ariaDescribedBy,\n ...props\n },\n ref,\n) {\n return (\n <BaseField\n id={id}\n label={label}\n secondaryLabel={secondaryLabel}\n auxiliaryLabel={auxiliaryLabel}\n hint={hint}\n maxWidth={maxWidth}\n hidden={hidden}\n aria-describedby={ariaDescribedBy}\n >\n {(extraProps) => (\n <Box className={styles.inputWrapper}>\n <input {...props} {...extraProps} type={type} ref={ref} />\n </Box>\n )}\n </BaseField>\n )\n})\n\nexport { TextField }\nexport type { TextFieldProps, TextFieldType }\n"],"names":["TextField","React","ref","id","label","secondaryLabel","auxiliaryLabel","hint","type","maxWidth","hidden","ariaDescribedBy","props","BaseField","extraProps","Box","className","styles","inputWrapper"],"mappings":";;;;;;;IAYMA,SAAS,gBAAGC,UAAA,CAAmD,SAASD,SAAT,OAajEE,GAbiE;MAE7DC,UAAAA;MACAC,aAAAA;MACAC,sBAAAA;MACAC,sBAAAA;MACAC,YAAAA;uBACAC;MAAAA,8BAAO;MACPC,gBAAAA;MACAC,cAAAA;MACoBC,uBAApB;MACGC;;AAIP,sBACIX,aAAA,CAACY,SAAD;AACIV,IAAAA,EAAE,EAAEA;AACJC,IAAAA,KAAK,EAAEA;AACPC,IAAAA,cAAc,EAAEA;AAChBC,IAAAA,cAAc,EAAEA;AAChBC,IAAAA,IAAI,EAAEA;AACNE,IAAAA,QAAQ,EAAEA;AACVC,IAAAA,MAAM,EAAEA;wBACUC;GARtB,EAUK,UAACG,UAAD;AAAA,wBACGb,aAAA,CAACc,GAAD;AAAKC,MAAAA,SAAS,EAAEC,MAAM,CAACC;KAAvB,eACIjB,aAAA,QAAA,oBAAWW,OAAWE;AAAYN,MAAAA,IAAI,EAAEA;AAAMN,MAAAA,GAAG,EAAEA;MAAnD,CADJ,CADH;AAAA,GAVL,CADJ;AAkBH,CAjCiB;;;;"}
|
|
@@ -4,13 +4,14 @@ import { polymorphicComponent } from '../../utils/polymorphism.js';
|
|
|
4
4
|
import { Box } from '../box/box.js';
|
|
5
5
|
import styles from './text-link.module.css.js';
|
|
6
6
|
|
|
7
|
+
var _excluded = ["as", "openInNewTab", "exceptionallySetClassName"];
|
|
7
8
|
var TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref) {
|
|
8
9
|
var _ref$as = _ref.as,
|
|
9
10
|
as = _ref$as === void 0 ? 'a' : _ref$as,
|
|
10
11
|
_ref$openInNewTab = _ref.openInNewTab,
|
|
11
12
|
openInNewTab = _ref$openInNewTab === void 0 ? false : _ref$openInNewTab,
|
|
12
13
|
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
13
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
14
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
14
15
|
|
|
15
16
|
return /*#__PURE__*/createElement(Box, Object.assign({}, props, {
|
|
16
17
|
as: as,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-link.js","sources":["../../../src/new-components/text-link/text-link.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport styles from './text-link.module.css'\nimport type { OpenInNewTab } from '../common-types'\n\ntype TextLinkProps = OpenInNewTab\n\nconst TextLink = polymorphicComponent<'a', TextLinkProps>(function TextLink(\n { as = 'a', openInNewTab = false, exceptionallySetClassName, ...props },\n ref,\n) {\n return (\n <Box\n {...props}\n as={as}\n display=\"inline\"\n className={[exceptionallySetClassName, styles.container]}\n ref={ref}\n target={openInNewTab ? '_blank' : undefined}\n rel={openInNewTab ? 'noopener noreferrer' : undefined}\n />\n )\n})\n\nexport { TextLink }\nexport type { TextLinkProps }\n"],"names":["TextLink","polymorphicComponent","ref","as","openInNewTab","exceptionallySetClassName","props","React","Box","display","className","styles","container","target","undefined","rel"],"mappings":"
|
|
1
|
+
{"version":3,"file":"text-link.js","sources":["../../../src/new-components/text-link/text-link.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport styles from './text-link.module.css'\nimport type { OpenInNewTab } from '../common-types'\n\ntype TextLinkProps = OpenInNewTab\n\nconst TextLink = polymorphicComponent<'a', TextLinkProps>(function TextLink(\n { as = 'a', openInNewTab = false, exceptionallySetClassName, ...props },\n ref,\n) {\n return (\n <Box\n {...props}\n as={as}\n display=\"inline\"\n className={[exceptionallySetClassName, styles.container]}\n ref={ref}\n target={openInNewTab ? '_blank' : undefined}\n rel={openInNewTab ? 'noopener noreferrer' : undefined}\n />\n )\n})\n\nexport { TextLink }\nexport type { TextLinkProps }\n"],"names":["TextLink","polymorphicComponent","ref","as","openInNewTab","exceptionallySetClassName","props","React","Box","display","className","styles","container","target","undefined","rel"],"mappings":";;;;;;;IAQMA,QAAQ,gBAAGC,oBAAoB,CAAqB,SAASD,QAAT,OAEtDE,GAFsD;qBACpDC;MAAAA,0BAAK;+BAAKC;MAAAA,8CAAe;MAAOC,iCAAAA;MAA8BC;;AAGhE,sBACIC,aAAA,CAACC,GAAD,oBACQF;AACJH,IAAAA,EAAE,EAAEA;AACJM,IAAAA,OAAO,EAAC;AACRC,IAAAA,SAAS,EAAE,CAACL,yBAAD,EAA4BM,MAAM,CAACC,SAAnC;AACXV,IAAAA,GAAG,EAAEA;AACLW,IAAAA,MAAM,EAAET,YAAY,GAAG,QAAH,GAAcU;AAClCC,IAAAA,GAAG,EAAEX,YAAY,GAAG,qBAAH,GAA2BU;IAPhD,CADJ;AAWH,CAfoC;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e,t
|
|
1
|
+
"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.assertThisInitialized=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},exports.defineProperty=t,exports.inheritsLoose=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},exports.objectSpread2=function(r){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?e(Object(n),!0).forEach((function(e){t(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r},exports.objectWithoutPropertiesLoose=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)t.indexOf(r=i[o])>=0||(n[r]=e[r]);return n},exports.setPrototypeOf=r;
|
|
2
2
|
//# sourceMappingURL=_rollupPluginBabelHelpers.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),i=t(require("react")),o=t(require("classnames")),a=require("../tooltip/tooltip.js"),l=i.forwardRef((function(t,
|
|
1
|
+
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),i=t(require("react")),o=t(require("classnames")),a=require("../tooltip/tooltip.js"),l=["type","variant","size","loading","disabled","tooltip","onClick","children"],r=i.forwardRef((function(t,r){var n=t.type,s=void 0===n?"button":n,u=t.variant,d=t.size,c=void 0===d?"default":d,p=t.loading,b=void 0!==p&&p,f=t.disabled,v=void 0!==f&&f,_=t.tooltip,g=t.onClick,j=t.children,m=e.objectWithoutPropertiesLoose(t,l),y=o("reactist_button",u?"reactist_button--"+u:null,"default"!==c?"reactist_button--"+c:null,{"reactist_button--loading":b},m.className),q=i.createElement("button",Object.assign({},m,{ref:r,type:s,className:y,"aria-disabled":v||b,onClick:v||b?void 0:g}),j);return _?i.createElement(a.Tooltip,{content:_},q):q}));r.displayName="Button",r.defaultProps={size:"default",loading:!1,disabled:!1},exports.Button=r;
|
|
2
2
|
//# sourceMappingURL=deprecated-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated-button.js","sources":["../../../src/components/deprecated-button/deprecated-button.tsx"],"sourcesContent":["import React from 'react'\nimport classNames from 'classnames'\n\nimport { Tooltip } from '../tooltip'\n\nimport './deprecated-button.less'\n\ntype NativeButtonProps = React.DetailedHTMLProps<\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n>\n\n/** @deprecated */\nexport type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'link'\n\n/** @deprecated */\nexport type ButtonSize = 'default' | 'small' | 'large'\n\n/** @deprecated */\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\n/**\n * @deprecated\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 aria-disabled={disabled || loading}\n onClick={disabled || loading ? undefined : 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","undefined","Tooltip","content","displayName","defaultProps"],"mappings":"
|
|
1
|
+
{"version":3,"file":"deprecated-button.js","sources":["../../../src/components/deprecated-button/deprecated-button.tsx"],"sourcesContent":["import React from 'react'\nimport classNames from 'classnames'\n\nimport { Tooltip } from '../tooltip'\n\nimport './deprecated-button.less'\n\ntype NativeButtonProps = React.DetailedHTMLProps<\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n>\n\n/** @deprecated */\nexport type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'link'\n\n/** @deprecated */\nexport type ButtonSize = 'default' | 'small' | 'large'\n\n/** @deprecated */\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\n/**\n * @deprecated\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 aria-disabled={disabled || loading}\n onClick={disabled || loading ? undefined : 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","undefined","Tooltip","content","displayName","defaultProps"],"mappings":"2WA4CMA,EAASC,EAAMC,YAA2C,WAY5DC,WAVIC,KAAAA,aAAO,WACPC,IAAAA,YACAC,KAAAA,aAAO,gBACPC,QAAAA,oBACAC,SAAAA,gBACAC,IAAAA,QACAC,IAAAA,QACAC,IAAAA,SACGC,sCAIDC,EAAYC,EACd,kBACAT,sBAA8BA,EAAY,KACjC,YAATC,sBAAyCA,EAAS,KAClD,4BAA8BC,GAC9BK,EAAMC,WAGJE,EACFd,0CACQW,GACJT,IAAKA,EACLC,KAAMA,EACNS,UAAWA,kBACIL,GAAYD,EAC3BG,QAASF,GAAYD,OAAUS,EAAYN,IAE1CC,UAIFF,EAAUR,gBAACgB,WAAQC,QAAST,GAAUM,GAAoBA,KAGrEf,EAAOmB,YAAc,SAErBnB,EAAOoB,aAAe,CAClBd,KAAM,UACNC,SAAS,EACTC,UAAU"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../_virtual/_rollupPluginBabelHelpers.js"),n=e(require("react")),o=e(require("classnames")),r=e(require("react-dom")),l=require("../icons/CloseIcon.svg.js"),a=function(e){function l(){var t;return(t=e.apply(this,arguments)||this)._closeModal=function(){var e=document.getElementById("modal_box");r.unmountComponentAtNode(e)},t._handleKeyDown=function(e){27===e.keyCode&&(t._closeModal(),e.preventDefault&&e.preventDefault())},t._handleOverlayClick=function(e){e.target instanceof Element&&("reactist-overlay"===e.target.id||"reactist-overlay-inner"===e.target.id)&&t._closeModal()},t}t.inheritsLoose(l,e);var a=l.prototype;return a.componentDidMount=function(){window.addEventListener("keydown",this._handleKeyDown)},a.componentWillUnmount=function(){window.removeEventListener("keydown",this._handleKeyDown)},a.render=function(){var e=this.props,t=e.style,r=e.children,l=e.closeOnOverlayClick,a=o("reactist_modal_box",{large:e.large,medium:e.medium},this.props.className);return n.createElement("div",{className:"reactist_overlay",id:"reactist-overlay",onClick:l?this._handleOverlayClick:void 0},n.createElement("div",{className:"reactist_overlay_inner",id:"reactist-overlay-inner"},n.createElement("div",{style:t,className:a},r)))},l}(n.Component);a.displayName="Modal.Box",a.defaultProps={large:!1,closeOnOverlayClick:!1};var s=function(e){function o(){return e.apply(this,arguments)||this}t.inheritsLoose(o,e);var a=o.prototype;return a._closeModal=function(e){e.preventDefault(),"function"==typeof this.props.beforeClose&&this.props.beforeClose();var t=document.getElementById("modal_box");r.unmountComponentAtNode(t)},a.render=function(){return n.createElement("div",{className:"reactist_modal_box__header"},n.createElement("p",null,this.props.title&&n.createElement("span",{className:"title"},this.props.title),this.props.subtitle&&n.createElement("span",{className:"subtitle"},this.props.subtitle),this.props.children),n.createElement("a",{className:"close",onClick:this._closeModal.bind(this),href:"#"},n.createElement(l.default,null)))},o}(n.Component);s.displayName="Modal.Header";var i=function(e){function a(){return e.apply(this,arguments)||this}t.inheritsLoose(a,e);var s=a.prototype;return s._closeModal=function(e){e.preventDefault();var t=document.getElementById("modal_box");r.unmountComponentAtNode(t)},s.render=function(){var e=this.props,t=e.icon,r=e.children,a=e.style,s=e.showCloseIcon,i=o("reactist_modal_box__body",{plain:e.plain},this.props.className);return n.createElement("div",{className:i,style:a},s&&n.createElement("a",{className:"close",onClick:this._closeModal.bind(this),href:"#"},n.createElement(l.default,null)),t?n.createElement("div",{className:"dialog"},n.createElement("div",{className:"reactist_icon"},t),n.createElement("div",{className:"content"},r)):r)},a}(n.Component);i.displayName="Modal.Body",i.defaultProps={showCloseIcon:!1};var c=function(e){function o(){return e.apply(this,arguments)||this}t.inheritsLoose(o,e);var l=o.prototype;return l._onClick=function(e){e&&e();var t=document.getElementById("modal_box");r.unmountComponentAtNode(t)},l.render=function(){var e=this,t=n.Children.map(this.props.children,(function(t){var o;return
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../_virtual/_rollupPluginBabelHelpers.js"),n=e(require("react")),o=e(require("classnames")),r=e(require("react-dom")),l=require("../icons/CloseIcon.svg.js"),a=function(e){function l(){var t;return(t=e.apply(this,arguments)||this)._closeModal=function(){var e=document.getElementById("modal_box");r.unmountComponentAtNode(e)},t._handleKeyDown=function(e){27===e.keyCode&&(t._closeModal(),e.preventDefault&&e.preventDefault())},t._handleOverlayClick=function(e){e.target instanceof Element&&("reactist-overlay"===e.target.id||"reactist-overlay-inner"===e.target.id)&&t._closeModal()},t}t.inheritsLoose(l,e);var a=l.prototype;return a.componentDidMount=function(){window.addEventListener("keydown",this._handleKeyDown)},a.componentWillUnmount=function(){window.removeEventListener("keydown",this._handleKeyDown)},a.render=function(){var e=this.props,t=e.style,r=e.children,l=e.closeOnOverlayClick,a=o("reactist_modal_box",{large:e.large,medium:e.medium},this.props.className);return n.createElement("div",{className:"reactist_overlay",id:"reactist-overlay",onClick:l?this._handleOverlayClick:void 0},n.createElement("div",{className:"reactist_overlay_inner",id:"reactist-overlay-inner"},n.createElement("div",{style:t,className:a},r)))},l}(n.Component);a.displayName="Modal.Box",a.defaultProps={large:!1,closeOnOverlayClick:!1};var s=function(e){function o(){return e.apply(this,arguments)||this}t.inheritsLoose(o,e);var a=o.prototype;return a._closeModal=function(e){e.preventDefault(),"function"==typeof this.props.beforeClose&&this.props.beforeClose();var t=document.getElementById("modal_box");r.unmountComponentAtNode(t)},a.render=function(){return n.createElement("div",{className:"reactist_modal_box__header"},n.createElement("p",null,this.props.title&&n.createElement("span",{className:"title"},this.props.title),this.props.subtitle&&n.createElement("span",{className:"subtitle"},this.props.subtitle),this.props.children),n.createElement("a",{className:"close",onClick:this._closeModal.bind(this),href:"#"},n.createElement(l.default,null)))},o}(n.Component);s.displayName="Modal.Header";var i=function(e){function a(){return e.apply(this,arguments)||this}t.inheritsLoose(a,e);var s=a.prototype;return s._closeModal=function(e){e.preventDefault();var t=document.getElementById("modal_box");r.unmountComponentAtNode(t)},s.render=function(){var e=this.props,t=e.icon,r=e.children,a=e.style,s=e.showCloseIcon,i=o("reactist_modal_box__body",{plain:e.plain},this.props.className);return n.createElement("div",{className:i,style:a},s&&n.createElement("a",{className:"close",onClick:this._closeModal.bind(this),href:"#"},n.createElement(l.default,null)),t?n.createElement("div",{className:"dialog"},n.createElement("div",{className:"reactist_icon"},t),n.createElement("div",{className:"content"},r)):r)},a}(n.Component);i.displayName="Modal.Body",i.defaultProps={showCloseIcon:!1};var c=function(e){function o(){return e.apply(this,arguments)||this}t.inheritsLoose(o,e);var l=o.prototype;return l._onClick=function(e){e&&e();var t=document.getElementById("modal_box");r.unmountComponentAtNode(t)},l.render=function(){var e=this,t=n.Children.map(this.props.children,(function(t){var o;return null!=t&&null!==(o=t.props)&&void 0!==o&&o.close?n.cloneElement(t,{onClick:function(){return e._onClick(t.props.onClick)}}):t?n.cloneElement(t):n.createElement(n.Fragment,null)}));return n.createElement("div",{className:"reactist_modal_box__actions"},t)},o}(n.Component);c.displayName="Modal.Actions",exports.Actions=c,exports.Body=i,exports.Box=a,exports.Header=s;
|
|
2
2
|
//# sourceMappingURL=deprecated-modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated-modal.js","sources":["../../../src/components/deprecated-modal/deprecated-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 './deprecated-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\n/** @deprecated */\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\n/** @deprecated */\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}\n\n/** @deprecated */\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\n/** @deprecated */\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?.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}\n\nActions.displayName = 'Modal.Actions'\n\n/** @deprecated */\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","_child$props","close","cloneElement","_this2"],"mappings":"yTAsBMA,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,S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mB,GAChCf,uBAAKJ,UAAU,WAAWF,IAG9BA,OA7BDM,EAAMI,WAoCzBU,EAAKT,YAAc,aACnBS,EAAKR,aAAe,CAChBU,eAAe,OAiBbE,gHAGFC,SAAA,SAASlB,GACDA,GACAA,QAGE7B,EAAeC,SAASC,eAAe,aAC7CC,EAASC,uBAAuBJ,MAGpCmB,OAAA,sBACUG,EAAWM,EAAMoB,SAASC,SAGvB7B,MAAME,UACX,SAAC4B,gBACOA,MAAAA,aAAAA,EAAO9B,0BAAP+B,EAAcC,OACPxB,EAAMyB,aAAaH,EAAO,CAC7BrB,QAAS,kBAAMyB,EAAKP,SAASG,EAAM9B,MAAMS,YAGtCqB,EAAQtB,EAAMyB,aAAaH,GAAStB,2CAKhDA,uBAAKJ,UAAU,+BAA+BF,OA5BvCM,EAAMI,WAgC5Bc,EAAQb,YAAc"}
|
|
1
|
+
{"version":3,"file":"deprecated-modal.js","sources":["../../../src/components/deprecated-modal/deprecated-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 './deprecated-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\n/** @deprecated */\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\n/** @deprecated */\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}\n\n/** @deprecated */\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\n/** @deprecated */\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?.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}\n\nActions.displayName = 'Modal.Actions'\n\n/** @deprecated */\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","_child$props","close","cloneElement","_this2"],"mappings":"yTAsBMA,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,MA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