@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,48 +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 = ["expanded", "label", "onChange", "onClick", "onContextMenu", "hideIcon", "fullWidth", "iconProps", "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 React from 'react';
|
|
8
|
-
import { Position as ArrowTickType } from '../../utils/types';
|
|
9
|
-
import ArrowTick from '../arrow-tick';
|
|
10
|
-
var AccordionHeader = function AccordionHeader(_ref) {
|
|
11
|
-
var _ref$expanded = _ref.expanded,
|
|
12
|
-
expanded = _ref$expanded === void 0 ? false : _ref$expanded,
|
|
13
|
-
label = _ref.label,
|
|
14
|
-
onChange = _ref.onChange,
|
|
15
|
-
_onClick = _ref.onClick,
|
|
16
|
-
onContextMenu = _ref.onContextMenu,
|
|
17
|
-
_ref$hideIcon = _ref.hideIcon,
|
|
18
|
-
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
19
|
-
_ref$fullWidth = _ref.fullWidth,
|
|
20
|
-
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
21
|
-
iconPropsData = _ref.iconProps,
|
|
22
|
-
ref = _ref.ref,
|
|
23
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
-
var accordionHeaderClasses = "inline-flex items-center justify-between box-border cursor-pointer select-none text-secondary ".concat(fullWidth ? 'w-full' : 'w-auto');
|
|
25
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
26
|
-
className: accordionHeaderClasses,
|
|
27
|
-
ref: ref,
|
|
28
|
-
onClick: function onClick(event) {
|
|
29
|
-
if (typeof onChange === 'function') {
|
|
30
|
-
onChange(!expanded);
|
|
31
|
-
}
|
|
32
|
-
if (typeof _onClick === 'function') {
|
|
33
|
-
_onClick(event);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}, rest), /*#__PURE__*/React.createElement("span", {
|
|
37
|
-
onContextMenu: onContextMenu
|
|
38
|
-
}, label), !hideIcon && /*#__PURE__*/React.createElement("span", {
|
|
39
|
-
className: "inline-flex pl-2",
|
|
40
|
-
onContextMenu: onContextMenu
|
|
41
|
-
}, /*#__PURE__*/React.createElement(ArrowTick, {
|
|
42
|
-
type: expanded ? ArrowTickType.Top : ArrowTickType.Bottom,
|
|
43
|
-
IconProps: _objectSpread({
|
|
44
|
-
size: 11
|
|
45
|
-
}, iconPropsData)
|
|
46
|
-
})));
|
|
47
|
-
};
|
|
48
|
-
export default AccordionHeader;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from '@scaleflex/icons-tw/icon.props';
|
|
2
|
-
import { Ref } from 'react';
|
|
3
|
-
export interface AccordionHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
4
|
-
label: React.ReactNode;
|
|
5
|
-
expanded?: boolean;
|
|
6
|
-
hideIcon?: boolean;
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
onChange?: (value: boolean) => void;
|
|
9
|
-
iconProps?: IconProps;
|
|
10
|
-
ref?: Ref<HTMLDivElement>;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
declare const Styled: {
|
|
2
|
-
Header: 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"> & {
|
|
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>, {
|
|
5
|
-
$fullWidth?: boolean;
|
|
6
|
-
} & {
|
|
7
|
-
theme: import("styled-components").DefaultTheme;
|
|
8
|
-
}>> & string;
|
|
9
|
-
Wrapper: 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"> & {
|
|
10
|
-
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;
|
|
11
|
-
}>, never>, never>> & string;
|
|
12
|
-
Icon: 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<HTMLSpanElement>, HTMLSpanElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
13
|
-
ref?: ((instance: HTMLSpanElement | 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<HTMLSpanElement> | null | undefined;
|
|
14
|
-
}>, never>, never>> & string;
|
|
15
|
-
Label: 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<HTMLSpanElement>, HTMLSpanElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
16
|
-
ref?: ((instance: HTMLSpanElement | 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<HTMLSpanElement> | null | undefined;
|
|
17
|
-
}>, never>, never>> & string;
|
|
18
|
-
};
|
|
19
|
-
export default Styled;
|
|
@@ -1,44 +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 { FontVariant } from '../../utils/types/typography';
|
|
5
|
-
var baseClassName = 'AccordionHeader';
|
|
6
|
-
var Icon = /*#__PURE__*/styled.span.attrs({
|
|
7
|
-
className: generateClassNames(baseClassName, 'icon')
|
|
8
|
-
}).withConfig({
|
|
9
|
-
componentId: "sc-lw0kj8-0"
|
|
10
|
-
})(function () {
|
|
11
|
-
return css(["display:inline-flex;padding-left:8px;"]);
|
|
12
|
-
});
|
|
13
|
-
var Label = /*#__PURE__*/styled.span.attrs({
|
|
14
|
-
className: generateClassNames(baseClassName, 'label')
|
|
15
|
-
}).withConfig({
|
|
16
|
-
componentId: "sc-lw0kj8-1"
|
|
17
|
-
})(function (_ref) {
|
|
18
|
-
var theme = _ref.theme;
|
|
19
|
-
return css(["", ""], theme.typography.font[FontVariant.ButtonSm]);
|
|
20
|
-
});
|
|
21
|
-
var Header = /*#__PURE__*/styled.div.attrs({
|
|
22
|
-
className: generateClassNames(baseClassName, 'root')
|
|
23
|
-
}).withConfig({
|
|
24
|
-
componentId: "sc-lw0kj8-2"
|
|
25
|
-
})(function (_ref2) {
|
|
26
|
-
var theme = _ref2.theme,
|
|
27
|
-
$fullWidth = _ref2.$fullWidth;
|
|
28
|
-
return css(["display:inline-flex;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:pointer;width:", ";color:", ";user-select:none;"], $fullWidth ? '100%' : 'auto', theme.palette[PColor.LinkPrimary]);
|
|
29
|
-
});
|
|
30
|
-
var Wrapper = /*#__PURE__*/styled.div.attrs({
|
|
31
|
-
className: generateClassNames(baseClassName, 'wrapper')
|
|
32
|
-
}).withConfig({
|
|
33
|
-
componentId: "sc-lw0kj8-3"
|
|
34
|
-
})(function (_ref3) {
|
|
35
|
-
var theme = _ref3.theme;
|
|
36
|
-
return css(["color:", ";"], theme.palette[PColor.LinkPrimary]);
|
|
37
|
-
});
|
|
38
|
-
var Styled = applyDisplayNames({
|
|
39
|
-
Header: Header,
|
|
40
|
-
Wrapper: Wrapper,
|
|
41
|
-
Icon: Icon,
|
|
42
|
-
Label: Label
|
|
43
|
-
});
|
|
44
|
-
export default Styled;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './accordion-header.component';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["type", "IconProps", "ref"];
|
|
4
|
-
import ArrowIcon from '@scaleflex/icons-tw/arrow';
|
|
5
|
-
import { cn } from '@scaleflex/ui-tw/utils/functions/shadcn-utils';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import { Position } from '../../utils/types';
|
|
8
|
-
var Arrow = function Arrow(_ref) {
|
|
9
|
-
var _ref$type = _ref.type,
|
|
10
|
-
type = _ref$type === void 0 ? Position.Right : _ref$type,
|
|
11
|
-
IconPropsData = _ref.IconProps,
|
|
12
|
-
ref = _ref.ref,
|
|
13
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
-
var arrowDirectionClasses = cn("".concat(type === Position.Bottom ? 'rotate-90' : ''), "".concat(type === Position.Left ? 'rotate-180' : ''), "".concat(type === Position.Right ? '' : ''), // don't need to rotate
|
|
15
|
-
"".concat(type === Position.Top ? '-rotate-90' : ''));
|
|
16
|
-
var ArrowClasses = cn('inline-flex transition-transform duration-150', arrowDirectionClasses);
|
|
17
|
-
return /*#__PURE__*/React.createElement("span", _extends({
|
|
18
|
-
className: ArrowClasses
|
|
19
|
-
}, rest, {
|
|
20
|
-
ref: ref
|
|
21
|
-
}), /*#__PURE__*/React.createElement(ArrowIcon, IconPropsData));
|
|
22
|
-
};
|
|
23
|
-
export default Arrow;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { css } from 'styled-components';
|
|
3
|
-
import { Position } from '../../utils/types';
|
|
4
|
-
export var typeArrowMixin = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Position.Right, css([""])), Position.Left, css(["transform:rotate(180deg);"])), Position.Top, css(["transform:rotate(-90deg);"])), Position.Bottom, css(["transform:rotate(90deg);"]));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from '@scaleflex/icons-tw/icon.props';
|
|
2
|
-
import type { Values } from '../../utils/types';
|
|
3
|
-
export declare const Type: {
|
|
4
|
-
readonly Left: "left";
|
|
5
|
-
readonly Right: "right";
|
|
6
|
-
readonly Top: "top";
|
|
7
|
-
readonly Bottom: "bottom";
|
|
8
|
-
};
|
|
9
|
-
export type ArrowTypesType = Values<typeof Type>;
|
|
10
|
-
export interface ArrowProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
11
|
-
type?: ArrowTypesType;
|
|
12
|
-
IconProps?: IconProps;
|
|
13
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
14
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ArrowProps } from './arrow.props';
|
|
2
|
-
declare const Styled: {
|
|
3
|
-
Arrow: 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<HTMLSpanElement>, HTMLSpanElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
4
|
-
ref?: ((instance: HTMLSpanElement | 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<HTMLSpanElement> | null | undefined;
|
|
5
|
-
}>, never>, ArrowProps & {
|
|
6
|
-
theme: import("styled-components").DefaultTheme;
|
|
7
|
-
}>> & string;
|
|
8
|
-
};
|
|
9
|
-
export default Styled;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
import { applyDisplayNames, generateClassNames } from '../../utils/functions';
|
|
3
|
-
import { Position } from '../../utils/types';
|
|
4
|
-
import { typeArrowMixin } from './arrow.mixin';
|
|
5
|
-
var baseClassName = 'Arrow';
|
|
6
|
-
var Arrow = /*#__PURE__*/styled.span.attrs({
|
|
7
|
-
className: generateClassNames(baseClassName, 'root')
|
|
8
|
-
}).withConfig({
|
|
9
|
-
componentId: "sc-1nief1k-0"
|
|
10
|
-
})(function (_ref) {
|
|
11
|
-
var _ref$type = _ref.type,
|
|
12
|
-
type = _ref$type === void 0 ? Position.Right : _ref$type;
|
|
13
|
-
return css(["display:inline-flex;transition:transform 0.15s;", ""], typeArrowMixin[type]);
|
|
14
|
-
});
|
|
15
|
-
var Styled = applyDisplayNames({
|
|
16
|
-
Arrow: Arrow
|
|
17
|
-
});
|
|
18
|
-
export default Styled;
|
package/core/arrow/index.d.ts
DELETED
package/core/arrow/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './arrow.component';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["type", "IconProps", "ref"];
|
|
4
|
-
import ArrowBottom from '@scaleflex/icons-tw/arrow-bottom';
|
|
5
|
-
import { cn } from '@scaleflex/ui-tw/utils/functions/shadcn-utils';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import { Position } from '../../utils/types';
|
|
8
|
-
var ArrowTick = function ArrowTick(_ref) {
|
|
9
|
-
var _ref$type = _ref.type,
|
|
10
|
-
type = _ref$type === void 0 ? Position.Bottom : _ref$type,
|
|
11
|
-
IconPropsData = _ref.IconProps,
|
|
12
|
-
ref = _ref.ref,
|
|
13
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
-
var arrowDirectionClasses = cn("".concat(type === Position.Bottom ? '' : ''), // don't need to rotate
|
|
15
|
-
"".concat(type === Position.Left ? 'rotate-90' : ''), "".concat(type === Position.Right ? '-rotate-90' : ''), "".concat(type === Position.Top ? 'rotate-180' : ''));
|
|
16
|
-
var arrowClasses = cn(arrowDirectionClasses);
|
|
17
|
-
|
|
18
|
-
// TODO: structure this arrow using only CSS. create rules for IconPropsData?.size as TailwindCSS classes
|
|
19
|
-
// const arrowClasses = cn('inline-block w-2 h-2 border-solid border-secondary border-r-1 border-b-1 transition-transform duration-150 ease-out ', arrowDirectionClasses,)
|
|
20
|
-
// return <span className={arrowClasses} {...rest} ref={ref}></span>
|
|
21
|
-
|
|
22
|
-
return /*#__PURE__*/React.createElement("span", _extends({}, rest, {
|
|
23
|
-
ref: ref
|
|
24
|
-
}), /*#__PURE__*/React.createElement(ArrowBottom, _extends({
|
|
25
|
-
className: arrowClasses
|
|
26
|
-
}, IconPropsData)));
|
|
27
|
-
};
|
|
28
|
-
export default ArrowTick;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { css } from 'styled-components';
|
|
3
|
-
import { Type } from './arrow-tick.props';
|
|
4
|
-
export var typeArrowTickMixin = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Type.Right, css(["svg{transform:rotate(-90deg);transition:transform 150ms ease-out;}"])), Type.Left, css(["svg{transform:rotate(90deg);transition:transform 150ms ease-out;}"])), Type.Top, css(["svg{transform:rotate(180deg);transition:transform 150ms ease-out;}"])), Type.Bottom, css(["svg{transform:rotate(0);transition:transform 150ms ease-out;}"]));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from '@scaleflex/icons-tw/icon.props';
|
|
2
|
-
import type { Values } from '../../utils/types';
|
|
3
|
-
export declare const Type: {
|
|
4
|
-
readonly Left: "left";
|
|
5
|
-
readonly Right: "right";
|
|
6
|
-
readonly Top: "top";
|
|
7
|
-
readonly Bottom: "bottom";
|
|
8
|
-
};
|
|
9
|
-
export type ArrowTickTypesType = Values<typeof Type>;
|
|
10
|
-
export interface ArrowTickProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
11
|
-
type?: ArrowTickTypesType;
|
|
12
|
-
IconProps?: IconProps;
|
|
13
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
14
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ArrowTickProps } from './arrow-tick.props';
|
|
2
|
-
declare const Styled: {
|
|
3
|
-
ArrowTick: 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<HTMLSpanElement>, HTMLSpanElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
4
|
-
ref?: ((instance: HTMLSpanElement | 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<HTMLSpanElement> | null | undefined;
|
|
5
|
-
}>, never>, ArrowTickProps>> & string;
|
|
6
|
-
};
|
|
7
|
-
export default Styled;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
import { applyDisplayNames, generateClassNames } from '../../utils/functions';
|
|
3
|
-
import { Position } from '../../utils/types';
|
|
4
|
-
import { typeArrowTickMixin } from './arrow-tick.mixin';
|
|
5
|
-
var baseClassName = 'ArrowTick';
|
|
6
|
-
var ArrowTick = /*#__PURE__*/styled.span.attrs({
|
|
7
|
-
className: generateClassNames(baseClassName, 'root')
|
|
8
|
-
}).withConfig({
|
|
9
|
-
componentId: "sc-28eylo-0"
|
|
10
|
-
})(function (_ref) {
|
|
11
|
-
var _ref$type = _ref.type,
|
|
12
|
-
type = _ref$type === void 0 ? Position.Right : _ref$type;
|
|
13
|
-
return css(["display:inline-flex;", ""], typeArrowTickMixin[type]);
|
|
14
|
-
});
|
|
15
|
-
var Styled = applyDisplayNames({
|
|
16
|
-
ArrowTick: ArrowTick
|
|
17
|
-
});
|
|
18
|
-
export default Styled;
|
package/core/arrow-tick/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './arrow-tick.component';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type ButtonProps } from './button.types';
|
|
3
|
-
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "primary" | "secondary" | "link-primary" | "outline" | "link-secondary" | "link-basic-primary" | "link-basic-secondary" | "link-error" | "link-warning" | "error-primary" | "error-outline" | "warning-primary" | "warning-outline" | null | undefined;
|
|
5
|
-
size?: "sm" | "md" | "xs" | "lg" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
-
declare function Button({ className, children, size, startIcon, endIcon, variant, loading, asChild, disabled, ...rest }: ButtonProps): React.JSX.Element;
|
|
8
|
-
export { buttonVariants };
|
|
9
|
-
export default Button;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ButtonSize, ButtonVariant } from '@scaleflex/ui-tw/core/button/button.types';
|
|
2
|
-
export var getIconSize = function getIconSize(sizeName) {
|
|
3
|
-
switch (sizeName) {
|
|
4
|
-
case ButtonSize.Lg:
|
|
5
|
-
return 18;
|
|
6
|
-
case ButtonSize.Md:
|
|
7
|
-
return 16;
|
|
8
|
-
case ButtonSize.Sm:
|
|
9
|
-
return 14;
|
|
10
|
-
case ButtonSize.Xs:
|
|
11
|
-
return 12;
|
|
12
|
-
default:
|
|
13
|
-
return 16;
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
export var isLinkBasicVariant = function isLinkBasicVariant(variant) {
|
|
17
|
-
return variant === ButtonVariant.LinkBasicPrimary || variant === ButtonVariant.LinkBasicSecondary;
|
|
18
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import React, { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
declare const endIconVariants: (props?: ({
|
|
4
|
-
size?: "sm" | "md" | "xs" | "lg" | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
-
interface EndIconProps extends ComponentProps<'span'>, VariantProps<typeof endIconVariants> {
|
|
7
|
-
icon?: ReactNode | ((props: {
|
|
8
|
-
size: number;
|
|
9
|
-
}) => ReactNode);
|
|
10
|
-
}
|
|
11
|
-
declare const EndIcon: (props: EndIconProps) => React.JSX.Element;
|
|
12
|
-
export default EndIcon;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
var _excluded = ["size", "icon"];
|
|
5
|
-
import { ButtonSize } from '@scaleflex/ui-tw/core/button';
|
|
6
|
-
import { getIconSize } from '@scaleflex/ui-tw/core/button/button.utils';
|
|
7
|
-
import { cva } from 'class-variance-authority';
|
|
8
|
-
import React, { useMemo } from 'react';
|
|
9
|
-
var endIconSizes = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ButtonSize.Xs, 'ml-0.5'), ButtonSize.Sm, 'ml-1'), ButtonSize.Md, 'ml-1.5'), ButtonSize.Lg, 'ml-2');
|
|
10
|
-
var endIconVariants = cva('flex', {
|
|
11
|
-
variants: {
|
|
12
|
-
size: endIconSizes
|
|
13
|
-
},
|
|
14
|
-
defaultVariants: {
|
|
15
|
-
size: ButtonSize.Md
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var EndIcon = function EndIcon(props) {
|
|
19
|
-
var size = props.size,
|
|
20
|
-
icon = props.icon,
|
|
21
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
22
|
-
var iconSize = useMemo(function () {
|
|
23
|
-
return getIconSize(size);
|
|
24
|
-
}, [size]);
|
|
25
|
-
return /*#__PURE__*/React.createElement("span", _extends({
|
|
26
|
-
className: endIconVariants({
|
|
27
|
-
size: size
|
|
28
|
-
})
|
|
29
|
-
}, rest), typeof icon === 'function' ? icon({
|
|
30
|
-
size: iconSize
|
|
31
|
-
}) : icon);
|
|
32
|
-
};
|
|
33
|
-
export default EndIcon;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import React, { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
declare const startIconVariants: (props?: ({
|
|
4
|
-
size?: "sm" | "md" | "xs" | "lg" | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
-
interface StartIconProps extends ComponentProps<'span'>, VariantProps<typeof startIconVariants> {
|
|
7
|
-
icon?: ReactNode | ((props: {
|
|
8
|
-
size: number;
|
|
9
|
-
}) => ReactNode);
|
|
10
|
-
loading?: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare const StartIcon: (props: StartIconProps) => React.JSX.Element;
|
|
13
|
-
export { startIconVariants };
|
|
14
|
-
export default StartIcon;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
var _excluded = ["size", "icon", "loading"];
|
|
5
|
-
import SpinnerIcon from '@scaleflex/icons-tw/spinner';
|
|
6
|
-
import { ButtonSize } from '@scaleflex/ui-tw/core/button';
|
|
7
|
-
import { getIconSize } from '@scaleflex/ui-tw/core/button/button.utils';
|
|
8
|
-
import { cva } from 'class-variance-authority';
|
|
9
|
-
import React, { useMemo } from 'react';
|
|
10
|
-
var startIconSizes = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ButtonSize.Xs, 'mr-0.5'), ButtonSize.Sm, 'mr-1'), ButtonSize.Md, 'mr-1.5'), ButtonSize.Lg, 'mr-2');
|
|
11
|
-
var startIconVariants = cva('flex', {
|
|
12
|
-
variants: {
|
|
13
|
-
size: startIconSizes
|
|
14
|
-
},
|
|
15
|
-
defaultVariants: {
|
|
16
|
-
size: ButtonSize.Md
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
var StartIcon = function StartIcon(props) {
|
|
20
|
-
var size = props.size,
|
|
21
|
-
icon = props.icon,
|
|
22
|
-
_props$loading = props.loading,
|
|
23
|
-
loading = _props$loading === void 0 ? false : _props$loading,
|
|
24
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
25
|
-
var iconSize = useMemo(function () {
|
|
26
|
-
return getIconSize(size);
|
|
27
|
-
}, [size]);
|
|
28
|
-
return /*#__PURE__*/React.createElement("span", _extends({
|
|
29
|
-
className: startIconVariants({
|
|
30
|
-
size: size
|
|
31
|
-
})
|
|
32
|
-
}, rest), loading ? /*#__PURE__*/React.createElement(SpinnerIcon, {
|
|
33
|
-
size: iconSize,
|
|
34
|
-
className: "animate-spin"
|
|
35
|
-
}) : typeof icon === 'function' ? icon({
|
|
36
|
-
size: iconSize
|
|
37
|
-
}) : icon);
|
|
38
|
-
};
|
|
39
|
-
export { startIconVariants };
|
|
40
|
-
export default StartIcon;
|
package/core/button/index.d.ts
DELETED
package/core/button/index.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["size", "type", "checked", "onChange", "checkBoxProps", "readOnly", "disabled", "ref"];
|
|
4
|
-
import Intermediate from '@scaleflex/icons-tw/intermediate';
|
|
5
|
-
import Tick from '@scaleflex/icons-tw/tick';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import { lightPalette } from '../../theme/roots/palette';
|
|
8
|
-
import { ignoreEvent } from '../../utils/functions';
|
|
9
|
-
import { cn } from '../../utils/functions/shadcn-utils';
|
|
10
|
-
import { Color } from '../../utils/types/palette';
|
|
11
|
-
import { getCheckboxIconSize } from './check-box.utils';
|
|
12
|
-
import { Size, Type } from './types';
|
|
13
|
-
var CheckBox = function CheckBox(_ref) {
|
|
14
|
-
var _ref$size = _ref.size,
|
|
15
|
-
size = _ref$size === void 0 ? Size.Md : _ref$size,
|
|
16
|
-
_ref$type = _ref.type,
|
|
17
|
-
type = _ref$type === void 0 ? Type.Checkbox : _ref$type,
|
|
18
|
-
_ref$checked = _ref.checked,
|
|
19
|
-
checked = _ref$checked === void 0 ? false : _ref$checked,
|
|
20
|
-
onChange = _ref.onChange,
|
|
21
|
-
checkBoxProps = _ref.checkBoxProps,
|
|
22
|
-
_ref$readOnly = _ref.readOnly,
|
|
23
|
-
readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
|
|
24
|
-
_ref$disabled = _ref.disabled,
|
|
25
|
-
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
26
|
-
ref = _ref.ref,
|
|
27
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
-
var getIcon = function getIcon(props) {
|
|
29
|
-
switch (type) {
|
|
30
|
-
case Type.Checkbox:
|
|
31
|
-
return /*#__PURE__*/React.createElement(Tick, props);
|
|
32
|
-
case Type.Intermediate:
|
|
33
|
-
return /*#__PURE__*/React.createElement(Intermediate, props);
|
|
34
|
-
default:
|
|
35
|
-
return /*#__PURE__*/React.createElement(Tick, props);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var cursorStyleClasses = disabled ? 'cursor-default' : 'cursor-pointer';
|
|
39
|
-
var ownTransitionClasses = 'transition-all duration-100 ease-out';
|
|
40
|
-
var checkBoxWrapperClasses = cn('relative flex items-center justify-center border-1 border-solid border-borders-secondary', "".concat(checked ? 'bg-accent-primary border-accent-primary' : 'bg-background-stateless border-borders-primary-stateless'), "".concat(size === Size.Sm ? 'min-h-4 max-h-4 min-w-4 max-w-4' : ''), "".concat(size === Size.Md ? 'min-h-5 max-h-5 min-w-5 max-w-5' : ''), "".concat(disabled ? 'border-1 border-solid' : ''), "".concat(disabled ? checked ? 'bg-accent-2-8-Opacity border-transparent' : 'bg-background-active border-borders-secondary' : ''), cursorStyleClasses, ownTransitionClasses);
|
|
41
|
-
var inputClasses = cn('peer absolute top-0 left-0 z-1 m-0 h-full w-full p-0 opacity-0', cursorStyleClasses);
|
|
42
|
-
var unCheckedIconClasses = cn('flex opacity-0', "".concat(disabled ? '' : 'peer-hover:opacity-100'), ownTransitionClasses);
|
|
43
|
-
return /*#__PURE__*/React.createElement("span", _extends({
|
|
44
|
-
className: checkBoxWrapperClasses,
|
|
45
|
-
ref: ref
|
|
46
|
-
}, rest), /*#__PURE__*/React.createElement("input", _extends({
|
|
47
|
-
type: "checkbox",
|
|
48
|
-
className: inputClasses,
|
|
49
|
-
checked: checked,
|
|
50
|
-
disabled: disabled,
|
|
51
|
-
onChange: readOnly || disabled ? ignoreEvent : onChange
|
|
52
|
-
}, checkBoxProps)), checked ? getIcon({
|
|
53
|
-
size: getCheckboxIconSize(size),
|
|
54
|
-
color: lightPalette[Color.ButtonPrimaryText]
|
|
55
|
-
}) : /*#__PURE__*/React.createElement("span", {
|
|
56
|
-
className: unCheckedIconClasses
|
|
57
|
-
}, getIcon({
|
|
58
|
-
size: getCheckboxIconSize(size),
|
|
59
|
-
color: lightPalette[Color.Accent_4_0_Opacity]
|
|
60
|
-
})));
|
|
61
|
-
};
|
|
62
|
-
export default CheckBox;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { css } from 'styled-components';
|
|
3
|
-
import { Size } from './types';
|
|
4
|
-
export var sizeCheckboxMixin = _defineProperty(_defineProperty({}, Size.Sm, function () {
|
|
5
|
-
return css(["min-height:16px;max-height:16px;min-width:16px;max-width:16px;"]);
|
|
6
|
-
}), Size.Md, function () {
|
|
7
|
-
return css(["min-height:20px;max-height:20px;min-width:20px;max-width:20px;"]);
|
|
8
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ChangeEvent, Ref } from 'react';
|
|
2
|
-
import type { Values } from '../../utils/types';
|
|
3
|
-
import { Size, Type } from './types';
|
|
4
|
-
export type CheckBoxSizeType = Values<typeof Size>;
|
|
5
|
-
export type CheckBoxType = Values<typeof Type>;
|
|
6
|
-
export interface CheckBoxProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
7
|
-
checked?: boolean;
|
|
8
|
-
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
-
checkBoxProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
10
|
-
readOnly?: boolean;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
size?: CheckBoxSizeType;
|
|
13
|
-
type?: CheckBoxType;
|
|
14
|
-
ref?: Ref<HTMLSpanElement>;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|