@scaleflex/ui-tw 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -33
- package/README.md +2 -16
- package/button/button.component.d.ts +8 -0
- package/{core/button → button}/button.component.js +13 -12
- package/button/button.const.d.ts +13 -0
- package/button/button.const.js +4 -0
- package/{core/button → button}/button.types.d.ts +6 -9
- package/{core/button → button}/button.types.js +2 -4
- package/button/button.utils.d.ts +2 -0
- package/button/button.utils.js +19 -0
- package/button/components/end-icon.d.ts +7 -0
- package/button/components/end-icon.js +39 -0
- package/button/components/start-icon.d.ts +13 -0
- package/button/components/start-icon.js +53 -0
- package/button/index.d.ts +3 -0
- package/button/index.js +2 -0
- package/form/components/form-field-group.component.d.ts +19 -0
- package/form/components/form-field-group.component.js +41 -0
- package/form/form.component.d.ts +30 -0
- package/form/form.component.js +123 -0
- package/form/form.types.d.ts +7 -0
- package/{core/switcher/switcher-size.js → form/form.types.js} +1 -1
- package/form/index.d.ts +2 -0
- package/form/index.js +2 -0
- package/input/index.d.ts +3 -0
- package/input/index.js +2 -0
- package/input/input.component.d.ts +7 -0
- package/input/input.component.js +42 -0
- package/input/input.types.d.ts +17 -0
- package/input/input.types.js +10 -0
- package/label/components/info-outline-icon.d.ts +3 -0
- package/label/components/info-outline-icon.js +30 -0
- package/label/components/label-icon.d.ts +7 -0
- package/label/components/label-icon.js +43 -0
- package/label/index.d.ts +1 -0
- package/label/index.js +1 -0
- package/label/label.component.d.ts +4 -0
- package/label/label.component.js +44 -0
- package/label/label.types.d.ts +14 -0
- package/{core/tab/types/size.js → label/label.types.js} +1 -1
- package/label/label.utils.d.ts +2 -0
- package/label/label.utils.js +16 -0
- package/package.json +8 -4
- package/{theme/theme.css → theme.css} +8 -8
- package/tooltip/index.d.ts +1 -0
- package/tooltip/index.js +1 -0
- package/tooltip/tooltip.component.d.ts +10 -0
- package/tooltip/tooltip.component.js +51 -0
- package/tooltip/tooltip.types.d.ts +5 -0
- package/core/accordion/accordion.component.d.ts +0 -3
- package/core/accordion/accordion.component.js +0 -50
- package/core/accordion/accordion.props.d.ts +0 -13
- package/core/accordion/accordion.props.js +0 -1
- package/core/accordion/accordion.styles.d.ts +0 -6
- package/core/accordion/accordion.styles.js +0 -12
- package/core/accordion/index.d.ts +0 -2
- package/core/accordion/index.js +0 -1
- package/core/accordion-details/accordion-details.component.d.ts +0 -3
- package/core/accordion-details/accordion-details.component.js +0 -16
- package/core/accordion-details/accordion-details.props.d.ts +0 -4
- package/core/accordion-details/accordion-details.styles.d.ts +0 -6
- package/core/accordion-details/accordion-details.styles.js +0 -12
- package/core/accordion-details/index.d.ts +0 -2
- package/core/accordion-details/index.js +0 -1
- package/core/accordion-header/accordion-header.component.d.ts +0 -3
- package/core/accordion-header/accordion-header.component.js +0 -48
- package/core/accordion-header/accordion-header.props.d.ts +0 -11
- package/core/accordion-header/accordion-header.props.js +0 -1
- package/core/accordion-header/accordion-header.styles.d.ts +0 -19
- package/core/accordion-header/accordion-header.styles.js +0 -44
- package/core/accordion-header/index.d.ts +0 -2
- package/core/accordion-header/index.js +0 -1
- package/core/arrow/arrow.component.d.ts +0 -3
- package/core/arrow/arrow.component.js +0 -23
- package/core/arrow/arrow.mixin.d.ts +0 -6
- package/core/arrow/arrow.mixin.js +0 -4
- package/core/arrow/arrow.props.d.ts +0 -14
- package/core/arrow/arrow.props.js +0 -6
- package/core/arrow/arrow.styles.d.ts +0 -9
- package/core/arrow/arrow.styles.js +0 -18
- package/core/arrow/index.d.ts +0 -2
- package/core/arrow/index.js +0 -1
- package/core/arrow-tick/arrow-tick.component.d.ts +0 -3
- package/core/arrow-tick/arrow-tick.component.js +0 -28
- package/core/arrow-tick/arrow-tick.mixin.d.ts +0 -6
- package/core/arrow-tick/arrow-tick.mixin.js +0 -4
- package/core/arrow-tick/arrow-tick.props.d.ts +0 -14
- package/core/arrow-tick/arrow-tick.props.js +0 -6
- package/core/arrow-tick/arrow-tick.styles.d.ts +0 -7
- package/core/arrow-tick/arrow-tick.styles.js +0 -18
- package/core/arrow-tick/index.d.ts +0 -2
- package/core/arrow-tick/index.js +0 -1
- package/core/button/button.component.d.ts +0 -9
- package/core/button/button.utils.d.ts +0 -3
- package/core/button/button.utils.js +0 -18
- package/core/button/components/end-icon.d.ts +0 -12
- package/core/button/components/end-icon.js +0 -33
- package/core/button/components/start-icon.d.ts +0 -14
- package/core/button/components/start-icon.js +0 -40
- package/core/button/index.d.ts +0 -4
- package/core/button/index.js +0 -3
- package/core/check-box/check-box.component.d.ts +0 -3
- package/core/check-box/check-box.component.js +0 -62
- package/core/check-box/check-box.mixin.d.ts +0 -4
- package/core/check-box/check-box.mixin.js +0 -8
- package/core/check-box/check-box.props.d.ts +0 -15
- package/core/check-box/check-box.props.js +0 -1
- package/core/check-box/check-box.styles.d.ts +0 -19
- package/core/check-box/check-box.styles.js +0 -42
- package/core/check-box/check-box.utils.d.ts +0 -3
- package/core/check-box/check-box.utils.js +0 -21
- package/core/check-box/index.d.ts +0 -2
- package/core/check-box/index.js +0 -1
- package/core/check-box/types/index.d.ts +0 -2
- package/core/check-box/types/index.js +0 -2
- package/core/check-box/types/size.d.ts +0 -4
- package/core/check-box/types/size.js +0 -4
- package/core/check-box/types/type.d.ts +0 -4
- package/core/check-box/types/type.js +0 -4
- package/core/check-box-group/check-box-group.component.d.ts +0 -3
- package/core/check-box-group/check-box-group.component.js +0 -74
- package/core/check-box-group/check-box-group.mixin.d.ts +0 -5
- package/core/check-box-group/check-box-group.mixin.js +0 -10
- package/core/check-box-group/check-box-group.props.d.ts +0 -19
- package/core/check-box-group/check-box-group.props.js +0 -1
- package/core/check-box-group/check-box-group.styles.d.ts +0 -19
- package/core/check-box-group/check-box-group.styles.js +0 -33
- package/core/check-box-group/index.d.ts +0 -2
- package/core/check-box-group/index.js +0 -1
- package/core/check-box-group/types/index.d.ts +0 -1
- package/core/check-box-group/types/index.js +0 -1
- package/core/check-box-group/types/label-position.d.ts +0 -4
- package/core/check-box-group/types/label-position.js +0 -4
- package/core/cross-button/cross-button.component.d.ts +0 -3
- package/core/cross-button/cross-button.component.js +0 -35
- package/core/cross-button/cross-button.props.d.ts +0 -8
- package/core/cross-button/cross-button.props.js +0 -1
- package/core/cross-button/cross-button.styles.d.ts +0 -9
- package/core/cross-button/cross-button.styles.js +0 -21
- package/core/cross-button/index.d.ts +0 -2
- package/core/cross-button/index.js +0 -1
- package/core/cross-button/types/index.d.ts +0 -1
- package/core/cross-button/types/index.js +0 -1
- package/core/cross-button/types/size.d.ts +0 -6
- package/core/cross-button/types/size.js +0 -6
- package/core/dot/dot.component.d.ts +0 -3
- package/core/dot/dot.component.js +0 -17
- package/core/dot/dot.props.d.ts +0 -4
- package/core/dot/dot.props.js +0 -1
- package/core/dot/dot.styles.d.ts +0 -18
- package/core/dot/dot.styles.js +0 -32
- package/core/dot/index.d.ts +0 -2
- package/core/dot/index.js +0 -1
- package/core/dots-navigation/dots-navigation.component.d.ts +0 -3
- package/core/dots-navigation/dots-navigation.component.js +0 -24
- package/core/dots-navigation/dots-navigation.props.d.ts +0 -5
- package/core/dots-navigation/dots-navigation.props.js +0 -1
- package/core/dots-navigation/dots-navigation.styles.d.ts +0 -6
- package/core/dots-navigation/dots-navigation.styles.js +0 -15
- package/core/dots-navigation/index.d.ts +0 -2
- package/core/dots-navigation/index.js +0 -1
- package/core/input/index.d.ts +0 -2
- package/core/input/index.js +0 -1
- package/core/input/input.component.d.ts +0 -3
- package/core/input/input.component.js +0 -293
- package/core/input/input.mixin.d.ts +0 -18
- package/core/input/input.mixin.js +0 -25
- package/core/input/input.props.d.ts +0 -40
- package/core/input/input.props.js +0 -1
- package/core/input/input.styles.d.ts +0 -78
- package/core/input/input.styles.js +0 -148
- package/core/input/input.utils.d.ts +0 -4
- package/core/input/input.utils.js +0 -30
- package/core/input/types/index.d.ts +0 -1
- package/core/input/types/index.js +0 -1
- package/core/input/types/type.d.ts +0 -4
- package/core/input/types/type.js +0 -4
- package/core/modal/index.d.ts +0 -2
- package/core/modal/index.js +0 -1
- package/core/modal/modal-menu-context.d.ts +0 -5
- package/core/modal/modal-menu-context.js +0 -10
- package/core/modal/modal.component.d.ts +0 -3
- package/core/modal/modal.component.js +0 -97
- package/core/modal/modal.mixin.d.ts +0 -7
- package/core/modal/modal.mixin.js +0 -4
- package/core/modal/modal.props.d.ts +0 -16
- package/core/modal/modal.props.js +0 -1
- package/core/modal/modal.styles.d.ts +0 -22
- package/core/modal/modal.styles.js +0 -51
- package/core/modal/modal.utils.d.ts +0 -1
- package/core/modal/modal.utils.js +0 -4
- package/core/modal/types/index.d.ts +0 -1
- package/core/modal/types/index.js +0 -1
- package/core/modal/types/size.d.ts +0 -7
- package/core/modal/types/size.js +0 -7
- package/core/modal-actions/index.d.ts +0 -2
- package/core/modal-actions/index.js +0 -1
- package/core/modal-actions/modal-actions.component.d.ts +0 -3
- package/core/modal-actions/modal-actions.component.js +0 -18
- package/core/modal-actions/modal-actions.props.d.ts +0 -8
- package/core/modal-actions/modal-actions.props.js +0 -1
- package/core/modal-actions/modal-actions.styles.d.ts +0 -7
- package/core/modal-actions/modal-actions.styles.js +0 -17
- package/core/modal-actions/types/align.d.ts +0 -5
- package/core/modal-actions/types/align.js +0 -5
- package/core/modal-actions/types/index.d.ts +0 -1
- package/core/modal-actions/types/index.js +0 -1
- package/core/modal-content/index.d.ts +0 -2
- package/core/modal-content/index.js +0 -1
- package/core/modal-content/modal-content.component.d.ts +0 -3
- package/core/modal-content/modal-content.component.js +0 -15
- package/core/modal-content/modal-content.props.d.ts +0 -4
- package/core/modal-content/modal-content.props.js +0 -1
- package/core/modal-content/modal-content.styles.d.ts +0 -6
- package/core/modal-content/modal-content.styles.js +0 -12
- package/core/modal-title/index.d.ts +0 -2
- package/core/modal-title/index.js +0 -1
- package/core/modal-title/modal-title.component.d.ts +0 -6
- package/core/modal-title/modal-title.component.js +0 -37
- package/core/modal-title/modal-title.props.d.ts +0 -14
- package/core/modal-title/modal-title.props.js +0 -1
- package/core/modal-title/modal-title.styles.d.ts +0 -31
- package/core/modal-title/modal-title.styles.js +0 -64
- package/core/modal-title/types/index.d.ts +0 -1
- package/core/modal-title/types/index.js +0 -1
- package/core/modal-title/types/variant.d.ts +0 -4
- package/core/modal-title/types/variant.js +0 -4
- package/core/pagination/index.d.ts +0 -2
- package/core/pagination/index.js +0 -1
- package/core/pagination/pagination.component.d.ts +0 -3
- package/core/pagination/pagination.component.js +0 -81
- package/core/pagination/pagination.props.d.ts +0 -11
- package/core/pagination/pagination.props.js +0 -1
- package/core/pagination/pagination.styles.d.ts +0 -19
- package/core/pagination/pagination.styles.js +0 -36
- package/core/popper/index.d.ts +0 -2
- package/core/popper/index.js +0 -1
- package/core/popper/popper.component.d.ts +0 -3
- package/core/popper/popper.component.js +0 -150
- package/core/popper/popper.mixin.d.ts +0 -17
- package/core/popper/popper.mixin.js +0 -5
- package/core/popper/popper.props.d.ts +0 -41
- package/core/popper/popper.props.js +0 -1
- package/core/popper/popper.styles.d.ts +0 -25
- package/core/popper/popper.styles.js +0 -48
- package/core/popper/popper.utils.d.ts +0 -1
- package/core/popper/popper.utils.js +0 -10
- package/core/popper/types/index.d.ts +0 -3
- package/core/popper/types/index.js +0 -3
- package/core/popper/types/phases.d.ts +0 -11
- package/core/popper/types/phases.js +0 -11
- package/core/popper/types/position.d.ts +0 -17
- package/core/popper/types/position.js +0 -17
- package/core/popper/types/strategy.d.ts +0 -4
- package/core/popper/types/strategy.js +0 -4
- package/core/radio/index.d.ts +0 -3
- package/core/radio/index.js +0 -2
- package/core/radio/radio.component.d.ts +0 -3
- package/core/radio/radio.component.js +0 -38
- package/core/radio/radio.mixin.d.ts +0 -13
- package/core/radio/radio.mixin.js +0 -13
- package/core/radio/radio.props.d.ts +0 -13
- package/core/radio/radio.props.js +0 -1
- package/core/radio/radio.styles.d.ts +0 -19
- package/core/radio/radio.styles.js +0 -44
- package/core/radio/size.d.ts +0 -4
- package/core/radio/size.js +0 -4
- package/core/radio-group/index.d.ts +0 -2
- package/core/radio-group/index.js +0 -1
- package/core/radio-group/radio-group.component.d.ts +0 -3
- package/core/radio-group/radio-group.component.js +0 -48
- package/core/radio-group/radio-group.props.d.ts +0 -15
- package/core/radio-group/radio-group.props.js +0 -1
- package/core/radio-group/radio-group.styles.d.ts +0 -14
- package/core/radio-group/radio-group.styles.js +0 -30
- package/core/switcher/index.d.ts +0 -3
- package/core/switcher/index.js +0 -2
- package/core/switcher/switcher-size.d.ts +0 -5
- package/core/switcher/switcher.component.d.ts +0 -3
- package/core/switcher/switcher.component.js +0 -54
- package/core/switcher/switcher.mixin.d.ts +0 -21
- package/core/switcher/switcher.mixin.js +0 -17
- package/core/switcher/switcher.props.d.ts +0 -14
- package/core/switcher/switcher.props.js +0 -1
- package/core/switcher/switcher.styles.d.ts +0 -27
- package/core/switcher/switcher.styles.js +0 -54
- package/core/switcher/switcher.utils.d.ts +0 -4
- package/core/switcher/switcher.utils.js +0 -37
- package/core/switcher-group/index.d.ts +0 -2
- package/core/switcher-group/index.js +0 -1
- package/core/switcher-group/switcher-group.component.d.ts +0 -3
- package/core/switcher-group/switcher-group.component.js +0 -41
- package/core/switcher-group/switcher-group.props.d.ts +0 -13
- package/core/switcher-group/switcher-group.props.js +0 -1
- package/core/switcher-group/switcher-group.styles.d.ts +0 -10
- package/core/switcher-group/switcher-group.styles.js +0 -30
- package/core/tab/index.d.ts +0 -2
- package/core/tab/index.js +0 -1
- package/core/tab/tab.component.d.ts +0 -6
- package/core/tab/tab.component.js +0 -52
- package/core/tab/tab.mixin.d.ts +0 -11
- package/core/tab/tab.mixin.js +0 -15
- package/core/tab/tab.props.d.ts +0 -15
- package/core/tab/tab.props.js +0 -1
- package/core/tab/tab.styles.d.ts +0 -26
- package/core/tab/tab.styles.js +0 -61
- package/core/tab/types/index.d.ts +0 -1
- package/core/tab/types/index.js +0 -1
- package/core/tab/types/size.d.ts +0 -5
- package/core/tab-panel/index.d.ts +0 -2
- package/core/tab-panel/index.js +0 -1
- package/core/tab-panel/tab-panel.component.d.ts +0 -3
- package/core/tab-panel/tab-panel.component.js +0 -18
- package/core/tab-panel/tab-panel.props.d.ts +0 -6
- package/core/tab-panel/tab-panel.props.js +0 -1
- package/core/tab-panel/tab-panel.styles.d.ts +0 -6
- package/core/tab-panel/tab-panel.styles.js +0 -12
- package/core/upload-input/index.d.ts +0 -2
- package/core/upload-input/index.js +0 -1
- package/core/upload-input/upload-input.component.d.ts +0 -3
- package/core/upload-input/upload-input.component.js +0 -68
- package/core/upload-input/upload-input.props.d.ts +0 -9
- package/core/upload-input/upload-input.props.js +0 -1
- package/core/upload-input/upload-input.styles.d.ts +0 -11
- package/core/upload-input/upload-input.styles.js +0 -53
- package/hooks/README.md +0 -26
- package/hooks/use-controlled.d.ts +0 -1
- package/hooks/use-controlled.js +0 -20
- package/hooks/use-debounce.d.ts +0 -2
- package/hooks/use-debounce.js +0 -19
- package/hooks/use-drag.d.ts +0 -5
- package/hooks/use-drag.js +0 -37
- package/hooks/use-enhanced-effect.d.ts +0 -3
- package/hooks/use-enhanced-effect.js +0 -3
- package/hooks/use-event-callback.d.ts +0 -4
- package/hooks/use-event-callback.js +0 -19
- package/hooks/use-pagination.d.ts +0 -3
- package/hooks/use-pagination.js +0 -106
- package/hooks/use-portal.d.ts +0 -14
- package/hooks/use-portal.js +0 -75
- package/theme/README.md +0 -46
- package/theme/entity/index.d.ts +0 -1
- package/theme/entity/index.js +0 -1
- package/theme/entity/theme.d.ts +0 -34
- package/theme/hooks/index.d.ts +0 -2
- package/theme/hooks/index.js +0 -2
- package/theme/hooks/use-media-query.d.ts +0 -1
- package/theme/hooks/use-media-query.js +0 -27
- package/theme/hooks/use-theme.d.ts +0 -2
- package/theme/hooks/use-theme.js +0 -4
- package/theme/index.d.ts +0 -3
- package/theme/index.js +0 -1
- package/theme/roots/breakpoints/entity/breakpoints-map.d.ts +0 -8
- package/theme/roots/breakpoints/entity/breakpoints.d.ts +0 -73
- package/theme/roots/breakpoints/entity/create-breakpoints.d.ts +0 -3
- package/theme/roots/breakpoints/entity/create-breakpoints.js +0 -65
- package/theme/roots/breakpoints/entity/default-breakpoints.d.ts +0 -26
- package/theme/roots/breakpoints/entity/default-breakpoints.js +0 -22
- package/theme/roots/breakpoints/entity/index.d.ts +0 -3
- package/theme/roots/breakpoints/entity/index.js +0 -2
- package/theme/roots/breakpoints/index.d.ts +0 -3
- package/theme/roots/breakpoints/index.js +0 -1
- package/theme/roots/common-styles.d.ts +0 -2
- package/theme/roots/common-styles.js +0 -6
- package/theme/roots/index.d.ts +0 -2
- package/theme/roots/index.js +0 -2
- package/theme/roots/palette/entity/colors-map.d.ts +0 -4
- package/theme/roots/palette/entity/default-palette.d.ts +0 -282
- package/theme/roots/palette/entity/default-palette.js +0 -22
- package/theme/roots/palette/entity/index.d.ts +0 -2
- package/theme/roots/palette/entity/index.js +0 -2
- package/theme/roots/palette/index.d.ts +0 -2
- package/theme/roots/palette/index.js +0 -1
- package/theme/roots/shadows/entity/default-shadows.d.ts +0 -16
- package/theme/roots/shadows/entity/default-shadows.js +0 -5
- package/theme/roots/shadows/entity/index.d.ts +0 -2
- package/theme/roots/shadows/entity/index.js +0 -2
- package/theme/roots/shadows/entity/shadows-map.d.ts +0 -4
- package/theme/roots/shadows/index.d.ts +0 -2
- package/theme/roots/shadows/index.js +0 -1
- package/theme/roots/shape/index.d.ts +0 -1
- package/theme/roots/shape/index.js +0 -1
- package/theme/roots/shape/shape.props.d.ts +0 -5
- package/theme/roots/shape/shape.props.js +0 -1
- package/theme/roots/typography/entity/default-typography.d.ts +0 -398
- package/theme/roots/typography/entity/default-typography.js +0 -237
- package/theme/roots/typography/entity/index.d.ts +0 -1
- package/theme/roots/typography/entity/index.js +0 -1
- package/theme/roots/typography/index.d.ts +0 -3
- package/theme/roots/typography/index.js +0 -2
- package/theme/roots/typography/typography.component.d.ts +0 -2
- package/theme/roots/typography/typography.component.js +0 -7
- package/theme/roots/typography/typography.props.d.ts +0 -15
- package/theme/roots/typography/typography.props.js +0 -1
- package/theme/theme-provider/index.d.ts +0 -2
- package/theme/theme-provider/index.js +0 -1
- package/theme/theme-provider/theme-provider.context.d.ts +0 -4
- package/theme/theme-provider/theme-provider.context.js +0 -48
- package/theme/theme-provider/theme-provider.props.d.ts +0 -6
- package/theme/theme-provider/theme-provider.props.js +0 -1
- package/utils/README.md +0 -11
- package/utils/functions/apply-display-names.d.ts +0 -6
- package/utils/functions/apply-display-names.js +0 -12
- package/utils/functions/apply-polymorphic-function-prop.d.ts +0 -6
- package/utils/functions/apply-polymorphic-function-prop.js +0 -11
- package/utils/functions/color-picker/color-converters.d.ts +0 -11
- package/utils/functions/color-picker/color-converters.js +0 -159
- package/utils/functions/color-picker/map-number.d.ts +0 -1
- package/utils/functions/color-picker/map-number.js +0 -3
- package/utils/functions/color-picker/restrict-number.d.ts +0 -1
- package/utils/functions/color-picker/restrict-number.js +0 -8
- package/utils/functions/convert-to-string.d.ts +0 -1
- package/utils/functions/convert-to-string.js +0 -3
- package/utils/functions/escape-regexp.d.ts +0 -1
- package/utils/functions/escape-regexp.js +0 -3
- package/utils/functions/generate-class-names.d.ts +0 -1
- package/utils/functions/generate-class-names.js +0 -22
- package/utils/functions/get-elem-document-coords.d.ts +0 -6
- package/utils/functions/get-elem-document-coords.js +0 -21
- package/utils/functions/ignore-event.d.ts +0 -1
- package/utils/functions/ignore-event.js +0 -9
- package/utils/functions/index.d.ts +0 -14
- package/utils/functions/index.js +0 -15
- package/utils/functions/intrinsic-component.d.ts +0 -0
- package/utils/functions/intrinsic-component.js +0 -28
- package/utils/functions/object-keys.d.ts +0 -6
- package/utils/functions/object-keys.js +0 -6
- package/utils/functions/object-values.d.ts +0 -7
- package/utils/functions/object-values.js +0 -6
- package/utils/functions/on-click-by-mouse-down.d.ts +0 -2
- package/utils/functions/on-click-by-mouse-down.js +0 -9
- package/utils/functions/scrollbar.d.ts +0 -2
- package/utils/functions/scrollbar.js +0 -6
- package/utils/functions/set-ref.d.ts +0 -8
- package/utils/functions/set-ref.js +0 -13
- package/utils/functions/slider/utils.d.ts +0 -47
- package/utils/functions/slider/utils.js +0 -124
- package/utils/functions/use-fork-ref.d.ts +0 -2
- package/utils/functions/use-fork-ref.js +0 -18
- package/utils/types/color/icon-button-color.d.ts +0 -5
- package/utils/types/color/icon-button-color.js +0 -5
- package/utils/types/color/index.d.ts +0 -2
- package/utils/types/color/index.js +0 -2
- package/utils/types/color/input-background-color.d.ts +0 -4
- package/utils/types/color/input-background-color.js +0 -4
- package/utils/types/css/align.d.ts +0 -11
- package/utils/types/css/align.js +0 -11
- package/utils/types/css/breakpoint.d.ts +0 -18
- package/utils/types/css/breakpoint.js +0 -18
- package/utils/types/css/direction.d.ts +0 -8
- package/utils/types/css/direction.js +0 -4
- package/utils/types/css/index.d.ts +0 -4
- package/utils/types/css/index.js +0 -4
- package/utils/types/css/position.d.ts +0 -6
- package/utils/types/css/position.js +0 -6
- package/utils/types/index.d.ts +0 -8
- package/utils/types/index.js +0 -3
- package/utils/types/intrinsic-component.d.ts +0 -1
- package/utils/types/keys.d.ts +0 -4
- package/utils/types/palette/color.d.ts +0 -133
- package/utils/types/palette/color.js +0 -133
- package/utils/types/palette/index.d.ts +0 -1
- package/utils/types/palette/index.js +0 -1
- package/utils/types/position/index.d.ts +0 -1
- package/utils/types/position/index.js +0 -1
- package/utils/types/position/position.d.ts +0 -6
- package/utils/types/position/position.js +0 -6
- package/utils/types/prop-types/index.d.ts +0 -1
- package/utils/types/prop-types/index.js +0 -1
- package/utils/types/prop-types/record.d.ts +0 -1
- package/utils/types/prop-types/record.js +0 -6
- package/utils/types/shadows/index.d.ts +0 -1
- package/utils/types/shadows/index.js +0 -1
- package/utils/types/shadows/shadows.d.ts +0 -14
- package/utils/types/shadows/shadows.js +0 -14
- package/utils/types/shape/border-radius-size.d.ts +0 -5
- package/utils/types/shape/border-radius-size.js +0 -5
- package/utils/types/shape/index.d.ts +0 -1
- package/utils/types/shape/index.js +0 -1
- package/utils/types/size/index.d.ts +0 -1
- package/utils/types/size/index.js +0 -1
- package/utils/types/size/input-size.d.ts +0 -4
- package/utils/types/size/input-size.js +0 -4
- package/utils/types/stylable-component.d.ts +0 -7
- package/utils/types/typography/font-variant.d.ts +0 -58
- package/utils/types/typography/font-variant.js +0 -58
- package/utils/types/typography/font-weight.d.ts +0 -11
- package/utils/types/typography/font-weight.js +0 -11
- package/utils/types/typography/index.d.ts +0 -4
- package/utils/types/typography/index.js +0 -4
- package/utils/types/typography/text-align.d.ts +0 -5
- package/utils/types/typography/text-align.js +0 -5
- package/utils/types/typography/text-decoration.d.ts +0 -5
- package/utils/types/typography/text-decoration.js +0 -5
- package/utils/types/with.d.ts +0 -4
- /package/{core/accordion-details/accordion-details.props.js → tooltip/tooltip.types.js} +0 -0
- /package/{utils/types → types}/values.d.ts +0 -0
- /package/utils/{functions/shadcn-utils.d.ts → cn.d.ts} +0 -0
- /package/utils/{functions/shadcn-utils.js → cn.js} +0 -0
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const getInputBackgroundColor: (readOnly?: boolean, disabled?: boolean) => string | undefined;
|
|
2
|
-
export declare const getInputTextColor: (readOnly?: boolean, disabled?: boolean) => string | undefined;
|
|
3
|
-
export declare const getInputBorderColor: (readOnly?: boolean, disabled?: boolean) => string | undefined;
|
|
4
|
-
export declare const handleCopyIcon: (value: string, setShowCopyMessage: any) => void;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { lightPalette } from '../../theme/roots/palette';
|
|
2
|
-
import { Color } from '../../utils/types/palette';
|
|
3
|
-
export var getInputBackgroundColor = function getInputBackgroundColor(readOnly, disabled) {
|
|
4
|
-
if (readOnly || disabled) {
|
|
5
|
-
return lightPalette[Color.BackgroundHover];
|
|
6
|
-
}
|
|
7
|
-
return lightPalette[Color.BackgroundStateless];
|
|
8
|
-
};
|
|
9
|
-
export var getInputTextColor = function getInputTextColor(readOnly, disabled) {
|
|
10
|
-
if (readOnly) {
|
|
11
|
-
return lightPalette[Color.AccentPrimaryHover];
|
|
12
|
-
}
|
|
13
|
-
if (disabled) {
|
|
14
|
-
return lightPalette[Color.TextPlaceholder];
|
|
15
|
-
}
|
|
16
|
-
return lightPalette[Color.TextPrimary];
|
|
17
|
-
};
|
|
18
|
-
export var getInputBorderColor = function getInputBorderColor(readOnly, disabled) {
|
|
19
|
-
if (readOnly) {
|
|
20
|
-
return lightPalette[Color.BordersItem];
|
|
21
|
-
}
|
|
22
|
-
if (disabled) {
|
|
23
|
-
return lightPalette[Color.BordersSecondary];
|
|
24
|
-
}
|
|
25
|
-
return lightPalette[Color.BorderPrimaryStateless];
|
|
26
|
-
};
|
|
27
|
-
export var handleCopyIcon = function handleCopyIcon(value, setShowCopyMessage) {
|
|
28
|
-
navigator.clipboard.writeText(value);
|
|
29
|
-
setShowCopyMessage(true);
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './type';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './type';
|
package/core/input/types/type.js
DELETED
package/core/modal/index.d.ts
DELETED
package/core/modal/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './modal.component';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
var ModalMenuContext = /*#__PURE__*/React.createContext({
|
|
3
|
-
modalOpened: false
|
|
4
|
-
});
|
|
5
|
-
|
|
6
|
-
// if (process.env.NODE_ENV !== 'production') {
|
|
7
|
-
// ModalMenuContext.displayName = 'ModalMenuContext';
|
|
8
|
-
// }
|
|
9
|
-
|
|
10
|
-
export default ModalMenuContext;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "open", "onClose", "onDragOver", "onDrop", "maxWidth", "fullWidth", "modalStyles", "hideOverlay", "disableOverlayClick", "ref"];
|
|
5
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
-
import { cn } from '@scaleflex/ui-tw/utils/functions/shadcn-utils';
|
|
8
|
-
import React, { isValidElement, useEffect } from 'react';
|
|
9
|
-
import { createPortal } from 'react-dom';
|
|
10
|
-
import { ignoreEvent } from '../../utils/functions';
|
|
11
|
-
import ModalMenuContext from './modal-menu-context';
|
|
12
|
-
import { isValidSingleFragmentChildren } from './modal.utils';
|
|
13
|
-
import { Size } from './types';
|
|
14
|
-
var Modal = function Modal(_ref) {
|
|
15
|
-
var _children = _ref.children,
|
|
16
|
-
_ref$open = _ref.open,
|
|
17
|
-
open = _ref$open === void 0 ? false : _ref$open,
|
|
18
|
-
onClose = _ref.onClose,
|
|
19
|
-
onDragOver = _ref.onDragOver,
|
|
20
|
-
onDrop = _ref.onDrop,
|
|
21
|
-
_ref$maxWidth = _ref.maxWidth,
|
|
22
|
-
maxWidth = _ref$maxWidth === void 0 ? Size.Xs : _ref$maxWidth,
|
|
23
|
-
_ref$fullWidth = _ref.fullWidth,
|
|
24
|
-
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
25
|
-
modalStyles = _ref.modalStyles,
|
|
26
|
-
_ref$hideOverlay = _ref.hideOverlay,
|
|
27
|
-
hideOverlay = _ref$hideOverlay === void 0 ? false : _ref$hideOverlay,
|
|
28
|
-
_ref$disableOverlayCl = _ref.disableOverlayClick,
|
|
29
|
-
disableOverlayClick = _ref$disableOverlayCl === void 0 ? false : _ref$disableOverlayCl,
|
|
30
|
-
ref = _ref.ref,
|
|
31
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
-
var children = isValidSingleFragmentChildren(_children) ? _children.props.children : _children;
|
|
33
|
-
var target = document.querySelector('body');
|
|
34
|
-
useEffect(function () {
|
|
35
|
-
if (open) {
|
|
36
|
-
document.body.classList.add('Modal-open');
|
|
37
|
-
} else {
|
|
38
|
-
document.body.classList.remove('Modal-open');
|
|
39
|
-
}
|
|
40
|
-
return function () {
|
|
41
|
-
document.body.classList.remove('Modal-open');
|
|
42
|
-
};
|
|
43
|
-
}, [open]);
|
|
44
|
-
var handleClose = function handleClose() {
|
|
45
|
-
if (typeof onClose === 'function') {
|
|
46
|
-
onClose();
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
useEffect(function () {
|
|
50
|
-
var keyListener = function keyListener(ev) {
|
|
51
|
-
if (ev.key === 'Escape') {
|
|
52
|
-
handleClose();
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
document.addEventListener('keydown', keyListener);
|
|
56
|
-
return function () {
|
|
57
|
-
return document.removeEventListener('keydown', keyListener);
|
|
58
|
-
};
|
|
59
|
-
});
|
|
60
|
-
var isVisible = open ? 'visible' : 'invisible';
|
|
61
|
-
var currentOpacity = open ? 'opacity-100' : 'opacity-0';
|
|
62
|
-
var modalCommonClasses = 'fixed top-0 right-0 bottom-0 left-0';
|
|
63
|
-
var modalConteinerClasses = cn('modal-container', 'bg-background-secondary absolute top-1/2 left-1/2 flex max-h-full -translate-x-1/2 -translate-y-1/2 flex-col overflow-x-hidden overflow-y-auto rounded-lg shadow-sm outline-0 transition-[opacity,transform] delay-[0s,0s] duration-[250ms,150ms] ease-[ease-in-out,ease-in-out]', fullWidth ? 'w-full mx-16' : '', maxWidth === Size.Xs ? 'max-w-75' : '', maxWidth === Size.Sm ? 'max-w-150' : '', maxWidth === Size.Md ? 'max-w-240' : '', maxWidth === Size.Lg ? 'max-w-320' : '', maxWidth === Size.Xl ? 'max-w-480' : '', isVisible, currentOpacity);
|
|
64
|
-
var render = function render() {
|
|
65
|
-
return /*#__PURE__*/React.createElement(ModalMenuContext.Provider, {
|
|
66
|
-
value: {
|
|
67
|
-
modalOpened: Boolean(open)
|
|
68
|
-
}
|
|
69
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
70
|
-
className: "".concat(modalCommonClasses, " z-50 ").concat(isVisible),
|
|
71
|
-
style: _objectSpread({}, modalStyles),
|
|
72
|
-
ref: ref,
|
|
73
|
-
onDragOver: onDragOver ? onDragOver : ignoreEvent,
|
|
74
|
-
onDrop: onDrop ? onDrop : ignoreEvent
|
|
75
|
-
}, !hideOverlay && /*#__PURE__*/React.createElement("div", {
|
|
76
|
-
className: "overlay ".concat(modalCommonClasses, " bg-background-black-0-5-pacity -z-1 transition-opacity duration-250 ease-in-out ").concat(currentOpacity),
|
|
77
|
-
onClick: function onClick() {
|
|
78
|
-
return disableOverlayClick ? null : handleClose();
|
|
79
|
-
}
|
|
80
|
-
}), /*#__PURE__*/React.createElement("div", _extends({
|
|
81
|
-
className: modalConteinerClasses
|
|
82
|
-
}, rest), /*#__PURE__*/React.createElement("div", {
|
|
83
|
-
className: "relative m-0 flex flex-col p-0 outline-0"
|
|
84
|
-
}, React.Children.map(children, function (child) {
|
|
85
|
-
if (/*#__PURE__*/isValidElement(child) && child.type.displayName === 'ModalTitle') {
|
|
86
|
-
return /*#__PURE__*/React.cloneElement(child, _objectSpread({
|
|
87
|
-
onClose: handleClose
|
|
88
|
-
}, child.props || {}));
|
|
89
|
-
}
|
|
90
|
-
return child;
|
|
91
|
-
})))));
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
// we use fragments only to for storybook to detect auto props generated in stories
|
|
95
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/createPortal(render(), target));
|
|
96
|
-
};
|
|
97
|
-
export default Modal;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const modalSizeMixin: {
|
|
2
|
-
xs: import("styled-components").RuleSet<object>;
|
|
3
|
-
sm: import("styled-components").RuleSet<object>;
|
|
4
|
-
md: import("styled-components").RuleSet<object>;
|
|
5
|
-
lg: import("styled-components").RuleSet<object>;
|
|
6
|
-
xl: import("styled-components").RuleSet<object>;
|
|
7
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { css } from 'styled-components';
|
|
3
|
-
import { Size } from './types';
|
|
4
|
-
export var modalSizeMixin = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Size.Xs, css(["max-width:300px;"])), Size.Sm, css(["max-width:600px;"])), Size.Md, css(["max-width:960px;"])), Size.Lg, css(["max-width:1280px;"])), Size.Xl, css(["max-width:1920px;"]));
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { PropsWithChildren, Ref } from 'react';
|
|
2
|
-
import type { Values } from '../../utils/types';
|
|
3
|
-
import { Size } from './types';
|
|
4
|
-
export type ModalSizeType = Values<typeof Size>;
|
|
5
|
-
export interface ModalProps extends PropsWithChildren, React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
open?: boolean;
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
modalStyles?: object;
|
|
9
|
-
disableOverlayClick?: boolean;
|
|
10
|
-
hideOverlay?: boolean;
|
|
11
|
-
maxWidth?: ModalSizeType;
|
|
12
|
-
onClose?: () => void;
|
|
13
|
-
onDragOver?: () => void;
|
|
14
|
-
onDrop?: () => void;
|
|
15
|
-
ref?: Ref<HTMLDivElement>;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { ModalProps } from './modal.props';
|
|
2
|
-
declare const Styled: {
|
|
3
|
-
Modal: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
-
}>, never>, never>> & string;
|
|
6
|
-
Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
8
|
-
}>, never>, {
|
|
9
|
-
open: boolean;
|
|
10
|
-
}>> & string;
|
|
11
|
-
Overlay: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
12
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
13
|
-
}>, never>, {
|
|
14
|
-
open: boolean;
|
|
15
|
-
}>> & string;
|
|
16
|
-
Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
17
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
18
|
-
}>, never>, ModalProps & {
|
|
19
|
-
theme: import("styled-components").DefaultTheme;
|
|
20
|
-
}>> & string;
|
|
21
|
-
};
|
|
22
|
-
export default Styled;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
import { applyDisplayNames, generateClassNames } from '../../utils/functions';
|
|
3
|
-
import { Color as PColor } from '../../utils/types/palette';
|
|
4
|
-
import { BorderRadiusSize as BRSize } from '../../utils/types/shape';
|
|
5
|
-
import { modalSizeMixin } from './modal.mixin';
|
|
6
|
-
import { Size } from './types';
|
|
7
|
-
var baseClassName = 'Modal';
|
|
8
|
-
var Wrapper = /*#__PURE__*/styled.div.attrs({
|
|
9
|
-
className: generateClassNames(baseClassName, 'Wrapper')
|
|
10
|
-
}).withConfig({
|
|
11
|
-
componentId: "sc-18hab5c-0"
|
|
12
|
-
})(function (_ref) {
|
|
13
|
-
var open = _ref.open;
|
|
14
|
-
return css(["position:fixed;right:0px;bottom:0px;top:0px;left:0px;z-index:1200;visibility:", ";"], open ? 'visible' : 'hidden');
|
|
15
|
-
});
|
|
16
|
-
var Overlay = /*#__PURE__*/styled.div.attrs({
|
|
17
|
-
className: generateClassNames(baseClassName, 'Overlay')
|
|
18
|
-
}).withConfig({
|
|
19
|
-
componentId: "sc-18hab5c-1"
|
|
20
|
-
})(function (_ref2) {
|
|
21
|
-
var open = _ref2.open;
|
|
22
|
-
return css(["position:fixed;right:0px;bottom:0px;top:0px;left:0px;background-color:rgba(0,0,0,0.5);z-index:-1;transition:opacity 251ms cubic-bezier(0.4,0,0.2,1) 0ms;opacity:", ";"], open ? '1' : '0');
|
|
23
|
-
});
|
|
24
|
-
var Container = /*#__PURE__*/styled.div.attrs({
|
|
25
|
-
className: generateClassNames(baseClassName, 'Container')
|
|
26
|
-
}).withConfig({
|
|
27
|
-
componentId: "sc-18hab5c-2"
|
|
28
|
-
})(function (_ref3) {
|
|
29
|
-
var theme = _ref3.theme,
|
|
30
|
-
_ref3$open = _ref3.open,
|
|
31
|
-
open = _ref3$open === void 0 ? false : _ref3$open,
|
|
32
|
-
_ref3$fullWidth = _ref3.fullWidth,
|
|
33
|
-
fullWidth = _ref3$fullWidth === void 0 ? false : _ref3$fullWidth,
|
|
34
|
-
_ref3$maxWidth = _ref3.maxWidth,
|
|
35
|
-
maxWidth = _ref3$maxWidth === void 0 ? Size.Sm : _ref3$maxWidth;
|
|
36
|
-
return css(["position:absolute;overflow-x:hidden;overflow-y:auto;transition:opacity 251ms cubic-bezier(0.4,0,0.2,1) 0ms,transform 167ms cubic-bezier(0.4,0,0.2,1) 0ms;outline:0;border-radius:", ";background-color:", ";box-shadow:0px 2px 4px ", ";visibility:", ";opacity:", ";display:flex;max-height:calc(100% - 64px);flex-direction:column;", " ", " top:50%;left:50%;transform:translate(-50%,-50%);"], theme.shape.borderRadius[BRSize.Lg], theme.palette[PColor.BackgroundSecondary], theme.palette[PColor.LightShadow], open ? 'visible' : 'hidden', open ? '1' : '0', fullWidth && css(["width:calc(100% - 64px);"]), modalSizeMixin[maxWidth]);
|
|
37
|
-
});
|
|
38
|
-
var Modal = /*#__PURE__*/styled.div.attrs({
|
|
39
|
-
className: generateClassNames(baseClassName, 'root')
|
|
40
|
-
}).withConfig({
|
|
41
|
-
componentId: "sc-18hab5c-3"
|
|
42
|
-
})(function () {
|
|
43
|
-
return css(["position:relative;padding-top:8px;padding-bottom:8px;margin:0;padding:0;outline:0;display:flex;flex-direction:column;"]);
|
|
44
|
-
});
|
|
45
|
-
var Styled = applyDisplayNames({
|
|
46
|
-
Modal: Modal,
|
|
47
|
-
Wrapper: Wrapper,
|
|
48
|
-
Overlay: Overlay,
|
|
49
|
-
Container: Container
|
|
50
|
-
});
|
|
51
|
-
export default Styled;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isValidSingleFragmentChildren: (children?: any) => boolean;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React, { isValidElement } from 'react';
|
|
2
|
-
export var isValidSingleFragmentChildren = function isValidSingleFragmentChildren(children) {
|
|
3
|
-
return children && /*#__PURE__*/isValidElement(children) && React.Children.count(children) === 1 && children.type === React.Fragment;
|
|
4
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './size';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './size';
|
package/core/modal/types/size.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './modal-actions.component';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "align", "ref"];
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { Align } from './types';
|
|
6
|
-
var ModalActions = function ModalActions(_ref) {
|
|
7
|
-
var children = _ref.children,
|
|
8
|
-
_ref$align = _ref.align,
|
|
9
|
-
align = _ref$align === void 0 ? Align.Center : _ref$align,
|
|
10
|
-
ref = _ref.ref,
|
|
11
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
13
|
-
className: "relative flex items-center gap-3 p-6 ".concat(align === Align.Right ? 'justify-end' : 'justify-center')
|
|
14
|
-
}, rest, {
|
|
15
|
-
ref: ref
|
|
16
|
-
}), children);
|
|
17
|
-
};
|
|
18
|
-
export default ModalActions;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { PropsWithChildren } from 'react';
|
|
2
|
-
import type { Values } from '../../utils/types';
|
|
3
|
-
import { Align } from './types';
|
|
4
|
-
export type ModalActionsAlignType = Values<typeof Align>;
|
|
5
|
-
export interface ModalActionsProps extends PropsWithChildren, React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
align?: ModalActionsAlignType;
|
|
7
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ModalActionsProps } from './modal-actions.props';
|
|
2
|
-
declare const Styled: {
|
|
3
|
-
ModalActions: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
-
}>, never>, ModalActionsProps>> & string;
|
|
6
|
-
};
|
|
7
|
-
export default Styled;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
import { applyDisplayNames, generateClassNames } from '../../utils/functions';
|
|
3
|
-
import { Align } from './types';
|
|
4
|
-
var baseClassName = 'ModalActions';
|
|
5
|
-
var ModalActions = /*#__PURE__*/styled.div.attrs({
|
|
6
|
-
className: generateClassNames(baseClassName, 'root')
|
|
7
|
-
}).withConfig({
|
|
8
|
-
componentId: "sc-15otdxw-0"
|
|
9
|
-
})(function (_ref) {
|
|
10
|
-
var _ref$align = _ref.align,
|
|
11
|
-
align = _ref$align === void 0 ? Align.Center : _ref$align;
|
|
12
|
-
return css(["position:relative;display:flex;align-items:center;padding:24px;justify-content:", ";gap:12px;"], align === Align.Right ? 'flex-end' : align);
|
|
13
|
-
});
|
|
14
|
-
var Styled = applyDisplayNames({
|
|
15
|
-
ModalActions: ModalActions
|
|
16
|
-
});
|
|
17
|
-
export default Styled;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './align';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './align';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './modal-content.component';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "ref"];
|
|
4
|
-
import React from 'react';
|
|
5
|
-
var ModalContent = function ModalContent(_ref) {
|
|
6
|
-
var children = _ref.children,
|
|
7
|
-
ref = _ref.ref,
|
|
8
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
9
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
10
|
-
className: "relative px-6 pt-3 pb-0"
|
|
11
|
-
}, rest, {
|
|
12
|
-
ref: ref
|
|
13
|
-
}), children);
|
|
14
|
-
};
|
|
15
|
-
export default ModalContent;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
declare const Styled: {
|
|
2
|
-
ModalContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
-
}>, never>, never>> & string;
|
|
5
|
-
};
|
|
6
|
-
export default Styled;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { applyDisplayNames, generateClassNames } from '../../utils/functions';
|
|
3
|
-
var baseClassName = 'ModalContent';
|
|
4
|
-
var ModalContent = /*#__PURE__*/styled.div.attrs({
|
|
5
|
-
className: generateClassNames(baseClassName, 'root')
|
|
6
|
-
}).withConfig({
|
|
7
|
-
componentId: "sc-15ec4uu-0"
|
|
8
|
-
})(["position:relative;padding:12px 24px 0px;"]);
|
|
9
|
-
var Styled = applyDisplayNames({
|
|
10
|
-
ModalContent: ModalContent
|
|
11
|
-
});
|
|
12
|
-
export default Styled;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './modal-title.component';
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["secondary", "onClose", "primaryLabelStyles", "variant", "ref"];
|
|
4
|
-
import { cn } from '@scaleflex/ui-tw/utils/functions/shadcn-utils';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import CrossButton from '../cross-button';
|
|
7
|
-
import { Variant } from './types';
|
|
8
|
-
var ModalTitle = function ModalTitle(_ref) {
|
|
9
|
-
var secondary = _ref.secondary,
|
|
10
|
-
onClose = _ref.onClose,
|
|
11
|
-
primaryLabelStyles = _ref.primaryLabelStyles,
|
|
12
|
-
_ref$variant = _ref.variant,
|
|
13
|
-
variant = _ref$variant === void 0 ? Variant.Default : _ref$variant,
|
|
14
|
-
ref = _ref.ref,
|
|
15
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
-
var modalTitleClasses = cn('relative text-textprimary rounded-tl-sm rounded-tr-sm', variant === Variant.WithIcon ? 'flex flex-col items-center pt-6 pb-3 pl-4.5 pr-4.5' : 'pt-3.5 pb-3.5 pl-4.5 pr-10', variant === Variant.Default ? 'bg-background-primary border-b-1 border-solid border-borders-secondary' : '');
|
|
17
|
-
var closeClasses = cn('absolute flex cursor-pointer text-icons-secondary hover:text-accent-primary', variant === Variant.WithIcon ? 'top-0.5 right-0.5' : 'top-2 right-2');
|
|
18
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
19
|
-
className: modalTitleClasses
|
|
20
|
-
}, rest, {
|
|
21
|
-
ref: ref
|
|
22
|
-
}), rest.icon && /*#__PURE__*/React.createElement("div", {
|
|
23
|
-
className: "bg-accent-1-2-opacity text-accent-primary mb-2 flex rounded-full p-3.5"
|
|
24
|
-
}, rest.icon), /*#__PURE__*/React.createElement("div", {
|
|
25
|
-
className: "text-lg ".concat(variant === Variant.Default ? 'font-normal' : 'font-medium'),
|
|
26
|
-
style: primaryLabelStyles
|
|
27
|
-
}, rest.primary), variant === Variant.WithIcon && secondary && /*#__PURE__*/React.createElement("div", {
|
|
28
|
-
className: "font-xs mt-1"
|
|
29
|
-
}, secondary), /*#__PURE__*/React.createElement("div", {
|
|
30
|
-
className: closeClasses
|
|
31
|
-
}, /*#__PURE__*/React.createElement(CrossButton, {
|
|
32
|
-
size: "lg",
|
|
33
|
-
onClick: onClose
|
|
34
|
-
})));
|
|
35
|
-
};
|
|
36
|
-
ModalTitle.displayName = 'ModalTitle';
|
|
37
|
-
export default ModalTitle;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'react';
|
|
2
|
-
import type { Values } from '../../utils/types';
|
|
3
|
-
import { Variant } from './types';
|
|
4
|
-
export type ModalTitleVariantType = Values<typeof Variant>;
|
|
5
|
-
export interface ModalTitleProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
primary: React.ReactNode;
|
|
7
|
-
secondary?: React.ReactNode;
|
|
8
|
-
primaryLabelStyles?: object;
|
|
9
|
-
icon?: React.ReactNode;
|
|
10
|
-
iconShadow?: boolean;
|
|
11
|
-
onClose?: () => void;
|
|
12
|
-
variant?: ModalTitleVariantType;
|
|
13
|
-
ref?: Ref<HTMLDivElement>;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { ModalTitleProps, ModalTitleVariantType } from './modal-title.props';
|
|
2
|
-
declare const Styled: {
|
|
3
|
-
ModalTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
-
}>, never>, ModalTitleProps & {
|
|
6
|
-
theme: import("styled-components").DefaultTheme;
|
|
7
|
-
}>> & string;
|
|
8
|
-
LabelPrimary: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
|
-
}>, never>, {
|
|
11
|
-
variant?: ModalTitleVariantType;
|
|
12
|
-
}>> & string;
|
|
13
|
-
LabelSecondary: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
15
|
-
}>, never>, never>> & string;
|
|
16
|
-
Close: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
17
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
18
|
-
}>, never>, {
|
|
19
|
-
variant?: ModalTitleVariantType;
|
|
20
|
-
} & {
|
|
21
|
-
theme: import("styled-components").DefaultTheme;
|
|
22
|
-
}>> & string;
|
|
23
|
-
Icon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
24
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
25
|
-
}>, never>, {
|
|
26
|
-
iconShadow: boolean;
|
|
27
|
-
} & {
|
|
28
|
-
theme: import("styled-components").DefaultTheme;
|
|
29
|
-
}>> & string;
|
|
30
|
-
};
|
|
31
|
-
export default Styled;
|