@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 _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
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; }
|
|
3
|
-
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; }
|
|
4
|
-
import merge from 'lodash.merge';
|
|
5
|
-
import React, { useMemo } from 'react';
|
|
6
|
-
import { ThemeProvider as SCThemeProvider } from 'styled-components';
|
|
7
|
-
import { applyPolymorphicFunctionProp } from '../../utils/functions';
|
|
8
|
-
import { BorderRadiusSize } from '../../utils/types/shape';
|
|
9
|
-
import { CommonStyles, Typography } from '../roots';
|
|
10
|
-
import createBreakpoints from '../roots/breakpoints/entity/create-breakpoints';
|
|
11
|
-
import { defaultPalette } from '../roots/palette';
|
|
12
|
-
import { defaultShadows } from '../roots/shadows';
|
|
13
|
-
import { getDefaultTypography } from '../roots/typography';
|
|
14
|
-
var defaultShape = {
|
|
15
|
-
borderRadius: _defineProperty(_defineProperty(_defineProperty({}, BorderRadiusSize.Sm, '2px'), BorderRadiusSize.Md, '4px'), BorderRadiusSize.Lg, '8px')
|
|
16
|
-
};
|
|
17
|
-
var ThemeProvider = function ThemeProvider(_ref) {
|
|
18
|
-
var children = _ref.children,
|
|
19
|
-
_ref$theme = _ref.theme,
|
|
20
|
-
theme = _ref$theme === void 0 ? {} : _ref$theme;
|
|
21
|
-
var _theme$palette = theme.palette,
|
|
22
|
-
paletteOverride = _theme$palette === void 0 ? {} : _theme$palette,
|
|
23
|
-
_theme$breakpoints = theme.breakpoints,
|
|
24
|
-
breakpointsOverride = _theme$breakpoints === void 0 ? {} : _theme$breakpoints,
|
|
25
|
-
_theme$typography = theme.typography,
|
|
26
|
-
typographyOverride = _theme$typography === void 0 ? {} : _theme$typography,
|
|
27
|
-
_theme$shape = theme.shape,
|
|
28
|
-
shapeOverride = _theme$shape === void 0 ? {} : _theme$shape,
|
|
29
|
-
_theme$shadows = theme.shadows,
|
|
30
|
-
shadowsOverride = _theme$shadows === void 0 ? {} : _theme$shadows;
|
|
31
|
-
var finalTheme = useMemo(function () {
|
|
32
|
-
var palette = _objectSpread(_objectSpread({}, defaultPalette), paletteOverride);
|
|
33
|
-
var breakpoints = createBreakpoints(breakpointsOverride);
|
|
34
|
-
var shadows = _objectSpread(_objectSpread({}, defaultShadows), shadowsOverride);
|
|
35
|
-
return {
|
|
36
|
-
palette: palette,
|
|
37
|
-
breakpoints: breakpoints,
|
|
38
|
-
typography: getDefaultTypography(typographyOverride),
|
|
39
|
-
shape: _objectSpread({}, merge(_objectSpread({}, defaultShape), _objectSpread({}, shapeOverride))),
|
|
40
|
-
shadows: shadows
|
|
41
|
-
};
|
|
42
|
-
}, [JSON.stringify(theme)]);
|
|
43
|
-
var renderedChildren = applyPolymorphicFunctionProp(children, finalTheme);
|
|
44
|
-
return /*#__PURE__*/React.createElement(SCThemeProvider, {
|
|
45
|
-
theme: finalTheme
|
|
46
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, renderedChildren, /*#__PURE__*/React.createElement(CommonStyles, null), /*#__PURE__*/React.createElement(Typography, null)));
|
|
47
|
-
};
|
|
48
|
-
export default ThemeProvider;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/utils/README.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# @scaleflex/ui-tw/utils
|
|
2
|
-
|
|
3
|
-
Utility functions and types for Scaleflex UI.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Usage
|
|
8
|
-
|
|
9
|
-
This package provides two parts: `functions` and `types`. The latter is intended to be used with TypeScript only, the former contains different utilities that are used under the hood of most of our packages.
|
|
10
|
-
|
|
11
|
-
Using those consider their predisposition for internal usage in the Scaleflex UI ecosystem.
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IStyledComponent } from 'styled-components';
|
|
2
|
-
/**
|
|
3
|
-
* If you are using a namespace for your styled components, this can come in handy giving each
|
|
4
|
-
* styled component in this namespace a displayName which gives better debugging experience
|
|
5
|
-
*/
|
|
6
|
-
export declare function applyDisplayNames<S extends Record<string, IStyledComponent<any, any>>>(styledObject: S): S;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/**
|
|
3
|
-
* If you are using a namespace for your styled components, this can come in handy giving each
|
|
4
|
-
* styled component in this namespace a displayName which gives better debugging experience
|
|
5
|
-
*/
|
|
6
|
-
export function applyDisplayNames(styledObject) {
|
|
7
|
-
return Object.keys(styledObject).reduce(function (newStyledObject, styledComponentName) {
|
|
8
|
-
var styledComponent = styledObject[styledComponentName];
|
|
9
|
-
styledComponent.displayName = "".concat(styledComponentName);
|
|
10
|
-
return Object.assign(newStyledObject, _defineProperty({}, styledComponentName, styledComponent));
|
|
11
|
-
}, {});
|
|
12
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* If your prop can be either a function or a plain value, this function handles
|
|
3
|
-
* its usage for you – just provide the reference for a 'maybe function' and the arguments
|
|
4
|
-
* to call it with
|
|
5
|
-
*/
|
|
6
|
-
export declare function applyPolymorphicFunctionProp<T, F extends (...args: any[]) => T>(prop: F | T | undefined, ...args: Parameters<F>): Exclude<typeof prop, F>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* If your prop can be either a function or a plain value, this function handles
|
|
3
|
-
* its usage for you – just provide the reference for a 'maybe function' and the arguments
|
|
4
|
-
* to call it with
|
|
5
|
-
*/
|
|
6
|
-
export function applyPolymorphicFunctionProp(prop) {
|
|
7
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
8
|
-
args[_key - 1] = arguments[_key];
|
|
9
|
-
}
|
|
10
|
-
return typeof prop === 'function' ? prop.apply(void 0, args) : prop;
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const rgbStringToArray: (rgbColorString: string) => number[];
|
|
2
|
-
export declare const hexToRgb: (hexColor: string) => number[];
|
|
3
|
-
export declare const rgbToHex: (...rgbColor: any) => string;
|
|
4
|
-
export declare const hslToHex: (h: number, s: number, l: number) => string;
|
|
5
|
-
export declare const rgbToHsl: (...rgbColor: any) => number[];
|
|
6
|
-
export declare const colorToHsl: (color: string) => number[];
|
|
7
|
-
export declare const colorToRgb: (color: string) => number[];
|
|
8
|
-
export declare const colorToHex: (color: string) => string;
|
|
9
|
-
export declare const hsvToHsl: (h: number, s: number, v: number) => number[];
|
|
10
|
-
export declare const hslToHsv: (h: number, s: number, l: number) => Array<number>;
|
|
11
|
-
export declare const validateHex: (color: string) => boolean;
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
export var rgbStringToArray = function rgbStringToArray(rgbColorString) {
|
|
3
|
-
return rgbColorString.replaceAll(/[^\d,]/gi, '').split(',').map(function (n) {
|
|
4
|
-
return +n;
|
|
5
|
-
});
|
|
6
|
-
};
|
|
7
|
-
export var hexToRgb = function hexToRgb(hexColor) {
|
|
8
|
-
// if (!hexColor) return { r: 0, g: 0, b: 0 };
|
|
9
|
-
if (!hexColor) return [0, 0, 0];
|
|
10
|
-
return [Number.parseInt(hexColor.slice(1, 3), 16), Number.parseInt(hexColor.slice(3, 5), 16), Number.parseInt(hexColor.slice(5, 7), 16)];
|
|
11
|
-
};
|
|
12
|
-
var rgbChannelToHex = function rgbChannelToHex(channel) {
|
|
13
|
-
return channel.toString(16).padStart(2, '0');
|
|
14
|
-
};
|
|
15
|
-
export var rgbToHex = function rgbToHex() {
|
|
16
|
-
for (var _len = arguments.length, rgbColor = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17
|
-
rgbColor[_key] = arguments[_key];
|
|
18
|
-
}
|
|
19
|
-
return "#".concat(rgbColor.map(rgbChannelToHex).join(''));
|
|
20
|
-
};
|
|
21
|
-
export var hslToHex = function hslToHex(h, s, l) {
|
|
22
|
-
var dividedL = l / 100;
|
|
23
|
-
var a = s * Math.min(dividedL, 1 - dividedL) / 100;
|
|
24
|
-
var f = function f(n) {
|
|
25
|
-
var k = (n + h / 30) % 12;
|
|
26
|
-
var color = dividedL - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
|
|
27
|
-
return rgbChannelToHex(Math.round(255 * color));
|
|
28
|
-
};
|
|
29
|
-
return "#".concat(f(0)).concat(f(8)).concat(f(4));
|
|
30
|
-
};
|
|
31
|
-
export var rgbToHsl = function rgbToHsl() {
|
|
32
|
-
for (var _len2 = arguments.length, rgbColor = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
33
|
-
rgbColor[_key2] = arguments[_key2];
|
|
34
|
-
}
|
|
35
|
-
var r = rgbColor[0],
|
|
36
|
-
g = rgbColor[1],
|
|
37
|
-
b = rgbColor[2];
|
|
38
|
-
r /= 255;
|
|
39
|
-
g /= 255;
|
|
40
|
-
b /= 255;
|
|
41
|
-
var min = Math.min(r, g, b);
|
|
42
|
-
var max = Math.max(r, g, b);
|
|
43
|
-
var h;
|
|
44
|
-
var s;
|
|
45
|
-
var l = (max + min) / 2;
|
|
46
|
-
if (max === min) {
|
|
47
|
-
h = 0;
|
|
48
|
-
s = 0;
|
|
49
|
-
} else {
|
|
50
|
-
var diff = max - min;
|
|
51
|
-
s = l > 0.5 ? diff / (2 - max - min) : diff / (max + min);
|
|
52
|
-
switch (max) {
|
|
53
|
-
case r:
|
|
54
|
-
h = (g - b) / diff + (g < b ? 6 : 0);
|
|
55
|
-
break;
|
|
56
|
-
case g:
|
|
57
|
-
h = (b - r) / diff + 2;
|
|
58
|
-
break;
|
|
59
|
-
case b:
|
|
60
|
-
h = (r - g) / diff + 4;
|
|
61
|
-
break;
|
|
62
|
-
default:
|
|
63
|
-
h = 0;
|
|
64
|
-
}
|
|
65
|
-
h /= 6;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// * 360 for having the hue in degrees
|
|
69
|
-
return [Math.round(h * 360), Math.round(s * 100), Math.round(l * 100)];
|
|
70
|
-
};
|
|
71
|
-
export var colorToHsl = function colorToHsl(color) {
|
|
72
|
-
if (color.startsWith('#')) {
|
|
73
|
-
var hex = color;
|
|
74
|
-
if (color.length === 4) {
|
|
75
|
-
hex = "#".concat(color[1]).concat(color[1]).concat(color[2]).concat(color[2]).concat(color[3]).concat(color[3]);
|
|
76
|
-
}
|
|
77
|
-
return rgbToHsl.apply(void 0, _toConsumableArray(hexToRgb(hex)));
|
|
78
|
-
}
|
|
79
|
-
if (color.startsWith('rgb')) {
|
|
80
|
-
var colorInRgb = rgbStringToArray(color);
|
|
81
|
-
return rgbToHsl.apply(void 0, _toConsumableArray(colorInRgb));
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// if the color is in text and no one from previous then return the default color which is black
|
|
85
|
-
if (typeof color === 'string') {
|
|
86
|
-
return [0, 0, 0];
|
|
87
|
-
}
|
|
88
|
-
return color;
|
|
89
|
-
};
|
|
90
|
-
export var colorToRgb = function colorToRgb(color) {
|
|
91
|
-
// we are not handling (hsl/color name) here cause we are accepting only HEX and RGB colors as default colors from user.
|
|
92
|
-
if (color.startsWith('#')) {
|
|
93
|
-
return hexToRgb(color);
|
|
94
|
-
}
|
|
95
|
-
if (color.startsWith('rgb')) {
|
|
96
|
-
return rgbStringToArray(color);
|
|
97
|
-
}
|
|
98
|
-
if (typeof color === 'string') {
|
|
99
|
-
return [0, 0, 0];
|
|
100
|
-
}
|
|
101
|
-
return color;
|
|
102
|
-
};
|
|
103
|
-
export var colorToHex = function colorToHex(color) {
|
|
104
|
-
if (color.startsWith('#')) {
|
|
105
|
-
if (color.length === 7) {
|
|
106
|
-
return color;
|
|
107
|
-
}
|
|
108
|
-
return "#".concat(color[0]).concat(color[0]).concat(color[1]).concat(color[1]).concat(color[2]).concat(color[2]);
|
|
109
|
-
}
|
|
110
|
-
if (color.startsWith('rgb')) {
|
|
111
|
-
return rgbToHex.apply(void 0, _toConsumableArray(rgbStringToArray(color)));
|
|
112
|
-
}
|
|
113
|
-
if (typeof color === 'string') {
|
|
114
|
-
return '#000000';
|
|
115
|
-
}
|
|
116
|
-
return color;
|
|
117
|
-
};
|
|
118
|
-
var checkIsBlack = function checkIsBlack(s, l) {
|
|
119
|
-
return l === 0 && (s === 0 || s === 1);
|
|
120
|
-
};
|
|
121
|
-
var checkIsWhite = function checkIsWhite(s, l) {
|
|
122
|
-
return s === 0 && l === 1;
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
// both hsv and hsl values are in [0, 1] except h is in [0, 360]
|
|
126
|
-
export var hsvToHsl = function hsvToHsl(h, s, v) {
|
|
127
|
-
var newS = s;
|
|
128
|
-
var l = (2 - s) * v / 2;
|
|
129
|
-
if (l !== 0) {
|
|
130
|
-
if (l === 1) {
|
|
131
|
-
newS = 0;
|
|
132
|
-
} else if (l < 0.5) {
|
|
133
|
-
newS = newS * v / (l * 2);
|
|
134
|
-
} else {
|
|
135
|
-
newS = newS * v / (2 - l * 2);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
var isBlack = checkIsBlack(newS, l);
|
|
139
|
-
return [isBlack || checkIsWhite(newS, l) ? 0 : h, isBlack ? 0 : Math.round(newS * 100), Math.round(l * 100)];
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
// both hsv and hsl values are in [0, 1] except h is in [0, 360]
|
|
143
|
-
export var hslToHsv = function hslToHsv(h, s, l) {
|
|
144
|
-
var newS = s;
|
|
145
|
-
var newL = l * 2;
|
|
146
|
-
newS *= newL <= 1 ? newL : 2 - newL;
|
|
147
|
-
var v = (newL + newS) / 2;
|
|
148
|
-
newS = 2 * newS / (newL + newS);
|
|
149
|
-
|
|
150
|
-
// return [h, newS, v];
|
|
151
|
-
var isBlack = checkIsBlack(newS, l);
|
|
152
|
-
return [isBlack || checkIsWhite(newS, l) ? 0 : h, isBlack ? 0 : Math.round(newS * 100), Math.round(v * 100)];
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
// TODO: validating 3 color code for Hex
|
|
156
|
-
// /^#([\da-f]{3}){1,2}$/i.test(color)colorToHex
|
|
157
|
-
export var validateHex = function validateHex(color) {
|
|
158
|
-
return /^#[\da-f]{6}$/i.test(color);
|
|
159
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mapNumber(number: number, oldMin: number, oldMax: number, newMin: number, newMax: number): number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function restrictNumber(number: number, min: number | undefined, max: number): number;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export function restrictNumber(number) {
|
|
2
|
-
var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
3
|
-
var max = arguments.length > 2 ? arguments[2] : undefined;
|
|
4
|
-
// we are not assigning default value for it as if max was null it will override the default value.
|
|
5
|
-
var currentMax = max || 1000000;
|
|
6
|
-
var convertedNumber = +number;
|
|
7
|
-
return Math.min(Math.max(min, convertedNumber), currentMax);
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function convertToString(text: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function escapeRegExp(text: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function generateClassNames(componentName: string, subClassNames?: string | string[]): string;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
export function generateClassNames(componentName, subClassNames) {
|
|
3
|
-
var generateClassName = function generateClassName(subClassName) {
|
|
4
|
-
return "Sfx".concat(componentName).concat(subClassName ? "-".concat(subClassName) : '');
|
|
5
|
-
};
|
|
6
|
-
var classNameArray = [];
|
|
7
|
-
if (subClassNames) {
|
|
8
|
-
if (Array.isArray(subClassNames)) {
|
|
9
|
-
classNameArray.push.apply(classNameArray, _toConsumableArray(subClassNames.filter(function (subClassName) {
|
|
10
|
-
return typeof subClassName === 'string';
|
|
11
|
-
}).map(function (subClassName) {
|
|
12
|
-
return generateClassName(subClassName);
|
|
13
|
-
})));
|
|
14
|
-
} else if (typeof subClassNames === 'string') {
|
|
15
|
-
classNameArray.push(generateClassName(subClassNames));
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
if (classNameArray.length === 0) {
|
|
19
|
-
classNameArray.push(generateClassName());
|
|
20
|
-
}
|
|
21
|
-
return classNameArray.join(' ');
|
|
22
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export function getElemDocumentCoords(elem) {
|
|
2
|
-
if (!elem) {
|
|
3
|
-
return null;
|
|
4
|
-
}
|
|
5
|
-
var box = elem.getBoundingClientRect();
|
|
6
|
-
var _document = document,
|
|
7
|
-
body = _document.body;
|
|
8
|
-
var docEl = document.documentElement;
|
|
9
|
-
var scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;
|
|
10
|
-
var scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;
|
|
11
|
-
var clientTop = docEl.clientTop || body.clientTop || 0;
|
|
12
|
-
var clientLeft = docEl.clientLeft || body.clientLeft || 0;
|
|
13
|
-
var top = box.top + scrollTop - clientTop;
|
|
14
|
-
var left = box.left + scrollLeft - clientLeft;
|
|
15
|
-
return {
|
|
16
|
-
top: Math.round(top),
|
|
17
|
-
left: Math.round(left),
|
|
18
|
-
width: box.width,
|
|
19
|
-
height: box.height
|
|
20
|
-
};
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ignoreEvent: (event: any) => void;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './generate-class-names';
|
|
2
|
-
export * from './object-keys';
|
|
3
|
-
export * from './object-values';
|
|
4
|
-
export * from './apply-polymorphic-function-prop';
|
|
5
|
-
export * from './apply-display-names';
|
|
6
|
-
export * from './use-fork-ref';
|
|
7
|
-
export * from './color-picker/restrict-number';
|
|
8
|
-
export * from './color-picker/map-number';
|
|
9
|
-
export * from './color-picker/color-converters';
|
|
10
|
-
export * from './get-elem-document-coords';
|
|
11
|
-
export * from './slider/utils';
|
|
12
|
-
export * from './scrollbar';
|
|
13
|
-
export * from './escape-regexp';
|
|
14
|
-
export * from './ignore-event';
|
package/utils/functions/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * from './generate-class-names';
|
|
2
|
-
// export * from './intrinsic-component';
|
|
3
|
-
export * from './object-keys';
|
|
4
|
-
export * from './object-values';
|
|
5
|
-
export * from './apply-polymorphic-function-prop';
|
|
6
|
-
export * from './apply-display-names';
|
|
7
|
-
export * from './use-fork-ref';
|
|
8
|
-
export * from './color-picker/restrict-number';
|
|
9
|
-
export * from './color-picker/map-number';
|
|
10
|
-
export * from './color-picker/color-converters';
|
|
11
|
-
export * from './get-elem-document-coords';
|
|
12
|
-
export * from './slider/utils';
|
|
13
|
-
export * from './scrollbar';
|
|
14
|
-
export * from './escape-regexp';
|
|
15
|
-
export * from './ignore-event';
|
|
File without changes
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// DEPRECATED after React upgrade to v19
|
|
2
|
-
// import {
|
|
3
|
-
// forwardRef,
|
|
4
|
-
// ForwardRefExoticComponent,
|
|
5
|
-
// ForwardRefRenderFunction,
|
|
6
|
-
// MutableRefObject,
|
|
7
|
-
// PropsWithoutRef,
|
|
8
|
-
// ReactElement,
|
|
9
|
-
// RefAttributes,
|
|
10
|
-
// } from 'react';
|
|
11
|
-
|
|
12
|
-
// interface RenderFunction<P, E>
|
|
13
|
-
// extends Pick<ForwardRefRenderFunction<E, P>, 'defaultProps' | 'displayName' | 'propTypes'> {
|
|
14
|
-
// (props: P, ref: ((instance: E | null) => void) | MutableRefObject<E | null> | null): ReactElement | null;
|
|
15
|
-
// }
|
|
16
|
-
|
|
17
|
-
// /**
|
|
18
|
-
// * Wrapper around React's `forwardRef` function, which adds a `displayName` to each component
|
|
19
|
-
// * created using it
|
|
20
|
-
// */
|
|
21
|
-
// export function intrinsicComponent<P = Record<string, unknown>, E = HTMLElement>(
|
|
22
|
-
// render: RenderFunction<P, E>,
|
|
23
|
-
// displayName?: string
|
|
24
|
-
// ): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<E>> {
|
|
25
|
-
// const component = forwardRef<E, P>(render);
|
|
26
|
-
// component.displayName = displayName || render.name;
|
|
27
|
-
// return component;
|
|
28
|
-
// }
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { css } from 'styled-components';
|
|
2
|
-
import { Color as PaletteColor } from '../types/palette';
|
|
3
|
-
export var scrollBar = function scrollBar(_ref) {
|
|
4
|
-
var palette = _ref.theme.palette;
|
|
5
|
-
return css(["&::-webkit-scrollbar{width:12px;}&::-webkit-scrollbar-thumb{background:", ";border:4px solid ", ";border-radius:99px;height:92px;padding:4px 6px;}"], palette[PaletteColor.BorderPrimaryStateless], palette[PaletteColor.ActiveSecondary]);
|
|
6
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* passes {value} to {ref}
|
|
4
|
-
* Useful if you want to expose the ref of an inner component to the public API
|
|
5
|
-
* while still using it inside the component.
|
|
6
|
-
* @param ref A ref callback or ref object. If anything falsy, this is a no-op.
|
|
7
|
-
*/
|
|
8
|
-
export default function setRef<T>(ref: React.MutableRefObject<T | null> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* passes {value} to {ref}
|
|
3
|
-
* Useful if you want to expose the ref of an inner component to the public API
|
|
4
|
-
* while still using it inside the component.
|
|
5
|
-
* @param ref A ref callback or ref object. If anything falsy, this is a no-op.
|
|
6
|
-
*/
|
|
7
|
-
export default function setRef(ref, value) {
|
|
8
|
-
if (typeof ref === 'function') {
|
|
9
|
-
ref(value);
|
|
10
|
-
} else if (ref) {
|
|
11
|
-
ref.current = value;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export declare function asc(a: number, b: number): number;
|
|
2
|
-
export declare function valueToPercent(value: number, min: number, max: number): number;
|
|
3
|
-
export declare function percentToValue(percent: number, min: number, max: number): number;
|
|
4
|
-
export declare function roundValueToStep(value: number, step: number, min: number): number;
|
|
5
|
-
export declare function setValueIndex({ values, newValue, index, }: {
|
|
6
|
-
values: number[];
|
|
7
|
-
newValue: number;
|
|
8
|
-
index: number;
|
|
9
|
-
}): number | number[];
|
|
10
|
-
export declare function findClosest(values: number[], currentValue: number): number;
|
|
11
|
-
export declare function ownerDocument(node: Node | null | undefined): Document;
|
|
12
|
-
export declare function clamp(value: number | null, min: number, max: number): number;
|
|
13
|
-
export declare function trackFinger(event: any, touchId: any): {
|
|
14
|
-
x: number | null;
|
|
15
|
-
y: number | null;
|
|
16
|
-
} | boolean;
|
|
17
|
-
export declare const axisProps: {
|
|
18
|
-
horizontal: {
|
|
19
|
-
offset: (percent: number) => {
|
|
20
|
-
left: string;
|
|
21
|
-
};
|
|
22
|
-
leap: (percent: number) => {
|
|
23
|
-
width: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
'horizontal-reverse': {
|
|
27
|
-
offset: (percent: number) => {
|
|
28
|
-
right: string;
|
|
29
|
-
};
|
|
30
|
-
leap: (percent: number) => {
|
|
31
|
-
width: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
vertical: {
|
|
35
|
-
offset: (percent: number) => {
|
|
36
|
-
bottom: string;
|
|
37
|
-
};
|
|
38
|
-
leap: (percent: number) => {
|
|
39
|
-
height: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
export declare function focusThumb({ sliderRef, activeIndex, setActive, }: {
|
|
44
|
-
sliderRef: any;
|
|
45
|
-
activeIndex: number;
|
|
46
|
-
setActive?: any;
|
|
47
|
-
}): void;
|