@scaleflex/ui-tw 0.0.1
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 +33 -0
- package/README.md +28 -0
- package/core/accordion/accordion.component.d.ts +3 -0
- package/core/accordion/accordion.component.js +50 -0
- package/core/accordion/accordion.props.d.ts +13 -0
- package/core/accordion/accordion.props.js +1 -0
- package/core/accordion/accordion.styles.d.ts +6 -0
- package/core/accordion/accordion.styles.js +12 -0
- package/core/accordion/index.d.ts +2 -0
- package/core/accordion/index.js +1 -0
- package/core/accordion-details/accordion-details.component.d.ts +3 -0
- package/core/accordion-details/accordion-details.component.js +16 -0
- package/core/accordion-details/accordion-details.props.d.ts +4 -0
- package/core/accordion-details/accordion-details.props.js +1 -0
- package/core/accordion-details/accordion-details.styles.d.ts +6 -0
- package/core/accordion-details/accordion-details.styles.js +12 -0
- package/core/accordion-details/index.d.ts +2 -0
- package/core/accordion-details/index.js +1 -0
- package/core/accordion-header/accordion-header.component.d.ts +3 -0
- package/core/accordion-header/accordion-header.component.js +48 -0
- package/core/accordion-header/accordion-header.props.d.ts +11 -0
- package/core/accordion-header/accordion-header.props.js +1 -0
- package/core/accordion-header/accordion-header.styles.d.ts +19 -0
- package/core/accordion-header/accordion-header.styles.js +44 -0
- package/core/accordion-header/index.d.ts +2 -0
- package/core/accordion-header/index.js +1 -0
- package/core/arrow/arrow.component.d.ts +3 -0
- package/core/arrow/arrow.component.js +23 -0
- package/core/arrow/arrow.mixin.d.ts +6 -0
- package/core/arrow/arrow.mixin.js +4 -0
- package/core/arrow/arrow.props.d.ts +14 -0
- package/core/arrow/arrow.props.js +6 -0
- package/core/arrow/arrow.styles.d.ts +9 -0
- package/core/arrow/arrow.styles.js +18 -0
- package/core/arrow/index.d.ts +2 -0
- package/core/arrow/index.js +1 -0
- package/core/arrow-tick/arrow-tick.component.d.ts +3 -0
- package/core/arrow-tick/arrow-tick.component.js +28 -0
- package/core/arrow-tick/arrow-tick.mixin.d.ts +6 -0
- package/core/arrow-tick/arrow-tick.mixin.js +4 -0
- package/core/arrow-tick/arrow-tick.props.d.ts +14 -0
- package/core/arrow-tick/arrow-tick.props.js +6 -0
- package/core/arrow-tick/arrow-tick.styles.d.ts +7 -0
- package/core/arrow-tick/arrow-tick.styles.js +18 -0
- package/core/arrow-tick/index.d.ts +2 -0
- package/core/arrow-tick/index.js +1 -0
- package/core/button/button.component.d.ts +9 -0
- package/core/button/button.component.js +71 -0
- package/core/button/button.types.d.ts +34 -0
- package/core/button/button.types.js +21 -0
- package/core/button/button.utils.d.ts +3 -0
- package/core/button/button.utils.js +18 -0
- package/core/button/components/end-icon.d.ts +12 -0
- package/core/button/components/end-icon.js +33 -0
- package/core/button/components/start-icon.d.ts +14 -0
- package/core/button/components/start-icon.js +40 -0
- package/core/button/index.d.ts +4 -0
- package/core/button/index.js +3 -0
- package/core/check-box/check-box.component.d.ts +3 -0
- package/core/check-box/check-box.component.js +62 -0
- package/core/check-box/check-box.mixin.d.ts +4 -0
- package/core/check-box/check-box.mixin.js +8 -0
- package/core/check-box/check-box.props.d.ts +15 -0
- package/core/check-box/check-box.props.js +1 -0
- package/core/check-box/check-box.styles.d.ts +19 -0
- package/core/check-box/check-box.styles.js +42 -0
- package/core/check-box/check-box.utils.d.ts +3 -0
- package/core/check-box/check-box.utils.js +21 -0
- package/core/check-box/index.d.ts +2 -0
- package/core/check-box/index.js +1 -0
- package/core/check-box/types/index.d.ts +2 -0
- package/core/check-box/types/index.js +2 -0
- package/core/check-box/types/size.d.ts +4 -0
- package/core/check-box/types/size.js +4 -0
- package/core/check-box/types/type.d.ts +4 -0
- package/core/check-box/types/type.js +4 -0
- package/core/check-box-group/check-box-group.component.d.ts +3 -0
- package/core/check-box-group/check-box-group.component.js +74 -0
- package/core/check-box-group/check-box-group.mixin.d.ts +5 -0
- package/core/check-box-group/check-box-group.mixin.js +10 -0
- package/core/check-box-group/check-box-group.props.d.ts +19 -0
- package/core/check-box-group/check-box-group.props.js +1 -0
- package/core/check-box-group/check-box-group.styles.d.ts +19 -0
- package/core/check-box-group/check-box-group.styles.js +33 -0
- package/core/check-box-group/index.d.ts +2 -0
- package/core/check-box-group/index.js +1 -0
- package/core/check-box-group/types/index.d.ts +1 -0
- package/core/check-box-group/types/index.js +1 -0
- package/core/check-box-group/types/label-position.d.ts +4 -0
- package/core/check-box-group/types/label-position.js +4 -0
- package/core/cross-button/cross-button.component.d.ts +3 -0
- package/core/cross-button/cross-button.component.js +35 -0
- package/core/cross-button/cross-button.props.d.ts +8 -0
- package/core/cross-button/cross-button.props.js +1 -0
- package/core/cross-button/cross-button.styles.d.ts +9 -0
- package/core/cross-button/cross-button.styles.js +21 -0
- package/core/cross-button/index.d.ts +2 -0
- package/core/cross-button/index.js +1 -0
- package/core/cross-button/types/index.d.ts +1 -0
- package/core/cross-button/types/index.js +1 -0
- package/core/cross-button/types/size.d.ts +6 -0
- package/core/cross-button/types/size.js +6 -0
- package/core/dot/dot.component.d.ts +3 -0
- package/core/dot/dot.component.js +17 -0
- package/core/dot/dot.props.d.ts +4 -0
- package/core/dot/dot.props.js +1 -0
- package/core/dot/dot.styles.d.ts +18 -0
- package/core/dot/dot.styles.js +32 -0
- package/core/dot/index.d.ts +2 -0
- package/core/dot/index.js +1 -0
- package/core/dots-navigation/dots-navigation.component.d.ts +3 -0
- package/core/dots-navigation/dots-navigation.component.js +24 -0
- package/core/dots-navigation/dots-navigation.props.d.ts +5 -0
- package/core/dots-navigation/dots-navigation.props.js +1 -0
- package/core/dots-navigation/dots-navigation.styles.d.ts +6 -0
- package/core/dots-navigation/dots-navigation.styles.js +15 -0
- package/core/dots-navigation/index.d.ts +2 -0
- package/core/dots-navigation/index.js +1 -0
- package/core/input/index.d.ts +2 -0
- package/core/input/index.js +1 -0
- package/core/input/input.component.d.ts +3 -0
- package/core/input/input.component.js +293 -0
- package/core/input/input.mixin.d.ts +18 -0
- package/core/input/input.mixin.js +25 -0
- package/core/input/input.props.d.ts +40 -0
- package/core/input/input.props.js +1 -0
- package/core/input/input.styles.d.ts +78 -0
- package/core/input/input.styles.js +148 -0
- package/core/input/input.utils.d.ts +4 -0
- package/core/input/input.utils.js +30 -0
- package/core/input/types/index.d.ts +1 -0
- package/core/input/types/index.js +1 -0
- package/core/input/types/type.d.ts +4 -0
- package/core/input/types/type.js +4 -0
- package/core/modal/index.d.ts +2 -0
- package/core/modal/index.js +1 -0
- package/core/modal/modal-menu-context.d.ts +5 -0
- package/core/modal/modal-menu-context.js +10 -0
- package/core/modal/modal.component.d.ts +3 -0
- package/core/modal/modal.component.js +97 -0
- package/core/modal/modal.mixin.d.ts +7 -0
- package/core/modal/modal.mixin.js +4 -0
- package/core/modal/modal.props.d.ts +16 -0
- package/core/modal/modal.props.js +1 -0
- package/core/modal/modal.styles.d.ts +22 -0
- package/core/modal/modal.styles.js +51 -0
- package/core/modal/modal.utils.d.ts +1 -0
- package/core/modal/modal.utils.js +4 -0
- package/core/modal/types/index.d.ts +1 -0
- package/core/modal/types/index.js +1 -0
- package/core/modal/types/size.d.ts +7 -0
- package/core/modal/types/size.js +7 -0
- package/core/modal-actions/index.d.ts +2 -0
- package/core/modal-actions/index.js +1 -0
- package/core/modal-actions/modal-actions.component.d.ts +3 -0
- package/core/modal-actions/modal-actions.component.js +18 -0
- package/core/modal-actions/modal-actions.props.d.ts +8 -0
- package/core/modal-actions/modal-actions.props.js +1 -0
- package/core/modal-actions/modal-actions.styles.d.ts +7 -0
- package/core/modal-actions/modal-actions.styles.js +17 -0
- package/core/modal-actions/types/align.d.ts +5 -0
- package/core/modal-actions/types/align.js +5 -0
- package/core/modal-actions/types/index.d.ts +1 -0
- package/core/modal-actions/types/index.js +1 -0
- package/core/modal-content/index.d.ts +2 -0
- package/core/modal-content/index.js +1 -0
- package/core/modal-content/modal-content.component.d.ts +3 -0
- package/core/modal-content/modal-content.component.js +15 -0
- package/core/modal-content/modal-content.props.d.ts +4 -0
- package/core/modal-content/modal-content.props.js +1 -0
- package/core/modal-content/modal-content.styles.d.ts +6 -0
- package/core/modal-content/modal-content.styles.js +12 -0
- package/core/modal-title/index.d.ts +2 -0
- package/core/modal-title/index.js +1 -0
- package/core/modal-title/modal-title.component.d.ts +6 -0
- package/core/modal-title/modal-title.component.js +37 -0
- package/core/modal-title/modal-title.props.d.ts +14 -0
- package/core/modal-title/modal-title.props.js +1 -0
- package/core/modal-title/modal-title.styles.d.ts +31 -0
- package/core/modal-title/modal-title.styles.js +64 -0
- package/core/modal-title/types/index.d.ts +1 -0
- package/core/modal-title/types/index.js +1 -0
- package/core/modal-title/types/variant.d.ts +4 -0
- package/core/modal-title/types/variant.js +4 -0
- package/core/pagination/index.d.ts +2 -0
- package/core/pagination/index.js +1 -0
- package/core/pagination/pagination.component.d.ts +3 -0
- package/core/pagination/pagination.component.js +81 -0
- package/core/pagination/pagination.props.d.ts +11 -0
- package/core/pagination/pagination.props.js +1 -0
- package/core/pagination/pagination.styles.d.ts +19 -0
- package/core/pagination/pagination.styles.js +36 -0
- package/core/popper/index.d.ts +2 -0
- package/core/popper/index.js +1 -0
- package/core/popper/popper.component.d.ts +3 -0
- package/core/popper/popper.component.js +150 -0
- package/core/popper/popper.mixin.d.ts +17 -0
- package/core/popper/popper.mixin.js +5 -0
- package/core/popper/popper.props.d.ts +41 -0
- package/core/popper/popper.props.js +1 -0
- package/core/popper/popper.styles.d.ts +25 -0
- package/core/popper/popper.styles.js +48 -0
- package/core/popper/popper.utils.d.ts +1 -0
- package/core/popper/popper.utils.js +10 -0
- package/core/popper/types/index.d.ts +3 -0
- package/core/popper/types/index.js +3 -0
- package/core/popper/types/phases.d.ts +11 -0
- package/core/popper/types/phases.js +11 -0
- package/core/popper/types/position.d.ts +17 -0
- package/core/popper/types/position.js +17 -0
- package/core/popper/types/strategy.d.ts +4 -0
- package/core/popper/types/strategy.js +4 -0
- package/core/radio/index.d.ts +3 -0
- package/core/radio/index.js +2 -0
- package/core/radio/radio.component.d.ts +3 -0
- package/core/radio/radio.component.js +38 -0
- package/core/radio/radio.mixin.d.ts +13 -0
- package/core/radio/radio.mixin.js +13 -0
- package/core/radio/radio.props.d.ts +13 -0
- package/core/radio/radio.props.js +1 -0
- package/core/radio/radio.styles.d.ts +19 -0
- package/core/radio/radio.styles.js +44 -0
- package/core/radio/size.d.ts +4 -0
- package/core/radio/size.js +4 -0
- package/core/radio-group/index.d.ts +2 -0
- package/core/radio-group/index.js +1 -0
- package/core/radio-group/radio-group.component.d.ts +3 -0
- package/core/radio-group/radio-group.component.js +48 -0
- package/core/radio-group/radio-group.props.d.ts +15 -0
- package/core/radio-group/radio-group.props.js +1 -0
- package/core/radio-group/radio-group.styles.d.ts +14 -0
- package/core/radio-group/radio-group.styles.js +30 -0
- package/core/switcher/index.d.ts +3 -0
- package/core/switcher/index.js +2 -0
- package/core/switcher/switcher-size.d.ts +5 -0
- package/core/switcher/switcher-size.js +5 -0
- package/core/switcher/switcher.component.d.ts +3 -0
- package/core/switcher/switcher.component.js +54 -0
- package/core/switcher/switcher.mixin.d.ts +21 -0
- package/core/switcher/switcher.mixin.js +17 -0
- package/core/switcher/switcher.props.d.ts +14 -0
- package/core/switcher/switcher.props.js +1 -0
- package/core/switcher/switcher.styles.d.ts +27 -0
- package/core/switcher/switcher.styles.js +54 -0
- package/core/switcher/switcher.utils.d.ts +4 -0
- package/core/switcher/switcher.utils.js +37 -0
- package/core/switcher-group/index.d.ts +2 -0
- package/core/switcher-group/index.js +1 -0
- package/core/switcher-group/switcher-group.component.d.ts +3 -0
- package/core/switcher-group/switcher-group.component.js +41 -0
- package/core/switcher-group/switcher-group.props.d.ts +13 -0
- package/core/switcher-group/switcher-group.props.js +1 -0
- package/core/switcher-group/switcher-group.styles.d.ts +10 -0
- package/core/switcher-group/switcher-group.styles.js +30 -0
- package/core/tab/index.d.ts +2 -0
- package/core/tab/index.js +1 -0
- package/core/tab/tab.component.d.ts +6 -0
- package/core/tab/tab.component.js +52 -0
- package/core/tab/tab.mixin.d.ts +11 -0
- package/core/tab/tab.mixin.js +15 -0
- package/core/tab/tab.props.d.ts +15 -0
- package/core/tab/tab.props.js +1 -0
- package/core/tab/tab.styles.d.ts +26 -0
- package/core/tab/tab.styles.js +61 -0
- package/core/tab/types/index.d.ts +1 -0
- package/core/tab/types/index.js +1 -0
- package/core/tab/types/size.d.ts +5 -0
- package/core/tab/types/size.js +5 -0
- package/core/tab-panel/index.d.ts +2 -0
- package/core/tab-panel/index.js +1 -0
- package/core/tab-panel/tab-panel.component.d.ts +3 -0
- package/core/tab-panel/tab-panel.component.js +18 -0
- package/core/tab-panel/tab-panel.props.d.ts +6 -0
- package/core/tab-panel/tab-panel.props.js +1 -0
- package/core/tab-panel/tab-panel.styles.d.ts +6 -0
- package/core/tab-panel/tab-panel.styles.js +12 -0
- package/core/upload-input/index.d.ts +2 -0
- package/core/upload-input/index.js +1 -0
- package/core/upload-input/upload-input.component.d.ts +3 -0
- package/core/upload-input/upload-input.component.js +68 -0
- package/core/upload-input/upload-input.props.d.ts +9 -0
- package/core/upload-input/upload-input.props.js +1 -0
- package/core/upload-input/upload-input.styles.d.ts +11 -0
- package/core/upload-input/upload-input.styles.js +53 -0
- package/hooks/README.md +26 -0
- package/hooks/use-controlled.d.ts +1 -0
- package/hooks/use-controlled.js +20 -0
- package/hooks/use-debounce.d.ts +2 -0
- package/hooks/use-debounce.js +19 -0
- package/hooks/use-drag.d.ts +5 -0
- package/hooks/use-drag.js +37 -0
- package/hooks/use-enhanced-effect.d.ts +3 -0
- package/hooks/use-enhanced-effect.js +3 -0
- package/hooks/use-event-callback.d.ts +4 -0
- package/hooks/use-event-callback.js +19 -0
- package/hooks/use-pagination.d.ts +3 -0
- package/hooks/use-pagination.js +106 -0
- package/hooks/use-portal.d.ts +14 -0
- package/hooks/use-portal.js +75 -0
- package/package.json +63 -0
- package/theme/README.md +46 -0
- package/theme/entity/index.d.ts +1 -0
- package/theme/entity/index.js +1 -0
- package/theme/entity/theme.d.ts +34 -0
- package/theme/hooks/index.d.ts +2 -0
- package/theme/hooks/index.js +2 -0
- package/theme/hooks/use-media-query.d.ts +1 -0
- package/theme/hooks/use-media-query.js +27 -0
- package/theme/hooks/use-theme.d.ts +2 -0
- package/theme/hooks/use-theme.js +4 -0
- package/theme/index.d.ts +3 -0
- package/theme/index.js +1 -0
- package/theme/roots/breakpoints/entity/breakpoints-map.d.ts +8 -0
- package/theme/roots/breakpoints/entity/breakpoints.d.ts +73 -0
- package/theme/roots/breakpoints/entity/create-breakpoints.d.ts +3 -0
- package/theme/roots/breakpoints/entity/create-breakpoints.js +65 -0
- package/theme/roots/breakpoints/entity/default-breakpoints.d.ts +26 -0
- package/theme/roots/breakpoints/entity/default-breakpoints.js +22 -0
- package/theme/roots/breakpoints/entity/index.d.ts +3 -0
- package/theme/roots/breakpoints/entity/index.js +2 -0
- package/theme/roots/breakpoints/index.d.ts +3 -0
- package/theme/roots/breakpoints/index.js +1 -0
- package/theme/roots/common-styles.d.ts +2 -0
- package/theme/roots/common-styles.js +6 -0
- package/theme/roots/index.d.ts +2 -0
- package/theme/roots/index.js +2 -0
- package/theme/roots/palette/entity/colors-map.d.ts +4 -0
- package/theme/roots/palette/entity/default-palette.d.ts +282 -0
- package/theme/roots/palette/entity/default-palette.js +22 -0
- package/theme/roots/palette/entity/index.d.ts +2 -0
- package/theme/roots/palette/entity/index.js +2 -0
- package/theme/roots/palette/index.d.ts +2 -0
- package/theme/roots/palette/index.js +1 -0
- package/theme/roots/shadows/entity/default-shadows.d.ts +16 -0
- package/theme/roots/shadows/entity/default-shadows.js +5 -0
- package/theme/roots/shadows/entity/index.d.ts +2 -0
- package/theme/roots/shadows/entity/index.js +2 -0
- package/theme/roots/shadows/entity/shadows-map.d.ts +4 -0
- package/theme/roots/shadows/index.d.ts +2 -0
- package/theme/roots/shadows/index.js +1 -0
- package/theme/roots/shape/index.d.ts +1 -0
- package/theme/roots/shape/index.js +1 -0
- package/theme/roots/shape/shape.props.d.ts +5 -0
- package/theme/roots/shape/shape.props.js +1 -0
- package/theme/roots/typography/entity/default-typography.d.ts +398 -0
- package/theme/roots/typography/entity/default-typography.js +237 -0
- package/theme/roots/typography/entity/index.d.ts +1 -0
- package/theme/roots/typography/entity/index.js +1 -0
- package/theme/roots/typography/index.d.ts +3 -0
- package/theme/roots/typography/index.js +2 -0
- package/theme/roots/typography/typography.component.d.ts +2 -0
- package/theme/roots/typography/typography.component.js +7 -0
- package/theme/roots/typography/typography.props.d.ts +15 -0
- package/theme/roots/typography/typography.props.js +1 -0
- package/theme/theme-provider/index.d.ts +2 -0
- package/theme/theme-provider/index.js +1 -0
- package/theme/theme-provider/theme-provider.context.d.ts +4 -0
- package/theme/theme-provider/theme-provider.context.js +48 -0
- package/theme/theme-provider/theme-provider.props.d.ts +6 -0
- package/theme/theme-provider/theme-provider.props.js +1 -0
- package/theme/theme.css +100 -0
- package/tsconfig.json +22 -0
- package/utils/README.md +11 -0
- package/utils/functions/apply-display-names.d.ts +6 -0
- package/utils/functions/apply-display-names.js +12 -0
- package/utils/functions/apply-polymorphic-function-prop.d.ts +6 -0
- package/utils/functions/apply-polymorphic-function-prop.js +11 -0
- package/utils/functions/color-picker/color-converters.d.ts +11 -0
- package/utils/functions/color-picker/color-converters.js +159 -0
- package/utils/functions/color-picker/map-number.d.ts +1 -0
- package/utils/functions/color-picker/map-number.js +3 -0
- package/utils/functions/color-picker/restrict-number.d.ts +1 -0
- package/utils/functions/color-picker/restrict-number.js +8 -0
- package/utils/functions/convert-to-string.d.ts +1 -0
- package/utils/functions/convert-to-string.js +3 -0
- package/utils/functions/escape-regexp.d.ts +1 -0
- package/utils/functions/escape-regexp.js +3 -0
- package/utils/functions/generate-class-names.d.ts +1 -0
- package/utils/functions/generate-class-names.js +22 -0
- package/utils/functions/get-elem-document-coords.d.ts +6 -0
- package/utils/functions/get-elem-document-coords.js +21 -0
- package/utils/functions/ignore-event.d.ts +1 -0
- package/utils/functions/ignore-event.js +9 -0
- package/utils/functions/index.d.ts +14 -0
- package/utils/functions/index.js +15 -0
- package/utils/functions/intrinsic-component.d.ts +0 -0
- package/utils/functions/intrinsic-component.js +28 -0
- package/utils/functions/object-keys.d.ts +6 -0
- package/utils/functions/object-keys.js +6 -0
- package/utils/functions/object-values.d.ts +7 -0
- package/utils/functions/object-values.js +6 -0
- package/utils/functions/on-click-by-mouse-down.d.ts +2 -0
- package/utils/functions/on-click-by-mouse-down.js +9 -0
- package/utils/functions/scrollbar.d.ts +2 -0
- package/utils/functions/scrollbar.js +6 -0
- package/utils/functions/set-ref.d.ts +8 -0
- package/utils/functions/set-ref.js +13 -0
- package/utils/functions/shadcn-utils.d.ts +2 -0
- package/utils/functions/shadcn-utils.js +8 -0
- package/utils/functions/slider/utils.d.ts +47 -0
- package/utils/functions/slider/utils.js +124 -0
- package/utils/functions/use-fork-ref.d.ts +2 -0
- package/utils/functions/use-fork-ref.js +18 -0
- package/utils/types/color/icon-button-color.d.ts +5 -0
- package/utils/types/color/icon-button-color.js +5 -0
- package/utils/types/color/index.d.ts +2 -0
- package/utils/types/color/index.js +2 -0
- package/utils/types/color/input-background-color.d.ts +4 -0
- package/utils/types/color/input-background-color.js +4 -0
- package/utils/types/css/align.d.ts +11 -0
- package/utils/types/css/align.js +11 -0
- package/utils/types/css/breakpoint.d.ts +18 -0
- package/utils/types/css/breakpoint.js +18 -0
- package/utils/types/css/direction.d.ts +8 -0
- package/utils/types/css/direction.js +4 -0
- package/utils/types/css/index.d.ts +4 -0
- package/utils/types/css/index.js +4 -0
- package/utils/types/css/position.d.ts +6 -0
- package/utils/types/css/position.js +6 -0
- package/utils/types/index.d.ts +8 -0
- package/utils/types/index.js +3 -0
- package/utils/types/intrinsic-component.d.ts +1 -0
- package/utils/types/keys.d.ts +4 -0
- package/utils/types/palette/color.d.ts +133 -0
- package/utils/types/palette/color.js +133 -0
- package/utils/types/palette/index.d.ts +1 -0
- package/utils/types/palette/index.js +1 -0
- package/utils/types/position/index.d.ts +1 -0
- package/utils/types/position/index.js +1 -0
- package/utils/types/position/position.d.ts +6 -0
- package/utils/types/position/position.js +6 -0
- package/utils/types/prop-types/index.d.ts +1 -0
- package/utils/types/prop-types/index.js +1 -0
- package/utils/types/prop-types/record.d.ts +1 -0
- package/utils/types/prop-types/record.js +6 -0
- package/utils/types/shadows/index.d.ts +1 -0
- package/utils/types/shadows/index.js +1 -0
- package/utils/types/shadows/shadows.d.ts +14 -0
- package/utils/types/shadows/shadows.js +14 -0
- package/utils/types/shape/border-radius-size.d.ts +5 -0
- package/utils/types/shape/border-radius-size.js +5 -0
- package/utils/types/shape/index.d.ts +1 -0
- package/utils/types/shape/index.js +1 -0
- package/utils/types/size/index.d.ts +1 -0
- package/utils/types/size/index.js +1 -0
- package/utils/types/size/input-size.d.ts +4 -0
- package/utils/types/size/input-size.js +4 -0
- package/utils/types/stylable-component.d.ts +7 -0
- package/utils/types/typography/font-variant.d.ts +58 -0
- package/utils/types/typography/font-variant.js +58 -0
- package/utils/types/typography/font-weight.d.ts +11 -0
- package/utils/types/typography/font-weight.js +11 -0
- package/utils/types/typography/index.d.ts +4 -0
- package/utils/types/typography/index.js +4 -0
- package/utils/types/typography/text-align.d.ts +5 -0
- package/utils/types/typography/text-align.js +5 -0
- package/utils/types/typography/text-decoration.d.ts +5 -0
- package/utils/types/typography/text-decoration.js +5 -0
- package/utils/types/values.d.ts +4 -0
- package/utils/types/with.d.ts +4 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 SCALEFLEX SAS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
|
6
|
+
to use the Software without restriction for personal purposes only. If you intend to use, copy, modify, distribute, sell, or lease any part of our Software for
|
|
7
|
+
commercial or corporate purposes,
|
|
8
|
+
you are required to contact the Scaleflex Sales team (sales@scaleflex.com) to settle the payment of a yearly licensing subscription of five thousand euros.
|
|
9
|
+
If you are proven to be in violation of this condition, you agree to pay a ten thousand euro penalty charge in addition to the yearly licensing subscription.
|
|
10
|
+
|
|
11
|
+
By utilizing the "Software", you acknowledge and unconditionally agree to be bound by these Terms, which are associated with the Scaleflex Services Terms and Conditions,
|
|
12
|
+
which can be found at www.scaleflex.com:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
|
24
|
+
|
|
25
|
+
---------------------------------------------------------------------------------
|
|
26
|
+
|
|
27
|
+
Publicity
|
|
28
|
+
|
|
29
|
+
You agree that Scaleflex may reference and use Your name, logos and trademarks in
|
|
30
|
+
Scaleflex marketing and promotional materials, including, but not limited to the
|
|
31
|
+
Scaleflex Websites, solely for purposes of identifying You as a customer of Scaleflex.
|
|
32
|
+
Otherwise, neither party may use the trade names, trademarks, service marks, or logos
|
|
33
|
+
of the other party without the express written consent of the other party.
|
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @scaleflex/ui-tw
|
|
2
|
+
|
|
3
|
+
React UI components library by Scaleflex
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
TODO: Update doc
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```shell script
|
|
12
|
+
npm i @scaleflex/ui # styled-components react react-dom
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```shell script
|
|
16
|
+
yarn add @scaleflex/ui # styled-components react react-dom
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
> Make sure to have `react`, `react-dom` and `styled-components` installed in your package as they are included in our peer dependencies.
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
Scaleflex UI includes several parts:
|
|
24
|
+
|
|
25
|
+
- [`core`](src/core/README.md)
|
|
26
|
+
- [`hooks`](src/hooks/README.md)
|
|
27
|
+
- [`theme`](src/theme/README.md)
|
|
28
|
+
- [`utils`](src/utils/README.md)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AccordionProps } from './accordion.props';
|
|
2
|
+
declare const Accordion: ({ label, expanded, children, detailStyle, headerStyle, fullWidth, iconProps: iconPropsData, onClick, onChange, onContextMenu, hideIcon, ref, ...rest }: AccordionProps) => JSX.Element;
|
|
3
|
+
export default Accordion;
|
|
@@ -0,0 +1,50 @@
|
|
|
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 = ["label", "expanded", "children", "detailStyle", "headerStyle", "fullWidth", "iconProps", "onClick", "onChange", "onContextMenu", "hideIcon", "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 AccordionDetails from '../accordion-details';
|
|
9
|
+
import AccordionHeader from '../accordion-header';
|
|
10
|
+
var Accordion = function Accordion(_ref) {
|
|
11
|
+
var label = _ref.label,
|
|
12
|
+
_ref$expanded = _ref.expanded,
|
|
13
|
+
expanded = _ref$expanded === void 0 ? false : _ref$expanded,
|
|
14
|
+
children = _ref.children,
|
|
15
|
+
detailStyle = _ref.detailStyle,
|
|
16
|
+
headerStyle = _ref.headerStyle,
|
|
17
|
+
fullWidth = _ref.fullWidth,
|
|
18
|
+
iconPropsData = _ref.iconProps,
|
|
19
|
+
onClick = _ref.onClick,
|
|
20
|
+
onChange = _ref.onChange,
|
|
21
|
+
onContextMenu = _ref.onContextMenu,
|
|
22
|
+
_ref$hideIcon = _ref.hideIcon,
|
|
23
|
+
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
24
|
+
ref = _ref.ref,
|
|
25
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
+
var handleOnClick = function handleOnClick(event) {
|
|
27
|
+
if (typeof onChange === 'function') {
|
|
28
|
+
onChange(!expanded, event);
|
|
29
|
+
}
|
|
30
|
+
if (typeof onClick === 'function') {
|
|
31
|
+
onClick(event);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
35
|
+
ref: ref
|
|
36
|
+
}, rest), /*#__PURE__*/React.createElement(AccordionHeader, {
|
|
37
|
+
label: label,
|
|
38
|
+
expanded: expanded,
|
|
39
|
+
style: _objectSpread({}, headerStyle),
|
|
40
|
+
hideIcon: hideIcon,
|
|
41
|
+
onClick: handleOnClick,
|
|
42
|
+
onContextMenu: onContextMenu,
|
|
43
|
+
iconProps: iconPropsData,
|
|
44
|
+
fullWidth: fullWidth
|
|
45
|
+
}), /*#__PURE__*/React.createElement(AccordionDetails, {
|
|
46
|
+
expanded: expanded,
|
|
47
|
+
style: _objectSpread({}, detailStyle)
|
|
48
|
+
}, children));
|
|
49
|
+
};
|
|
50
|
+
export default Accordion;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IconProps } from '@scaleflex/icons-tw/icon.props';
|
|
2
|
+
import React, { MouseEvent, Ref } from 'react';
|
|
3
|
+
export interface AccordionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
expanded?: boolean;
|
|
6
|
+
detailStyle?: object;
|
|
7
|
+
headerStyle?: object;
|
|
8
|
+
hideIcon?: boolean;
|
|
9
|
+
fullWidth?: boolean;
|
|
10
|
+
onChange?: (value: boolean, event: MouseEvent<HTMLDivElement>) => void;
|
|
11
|
+
iconProps?: IconProps;
|
|
12
|
+
ref?: Ref<HTMLDivElement>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const Styled: {
|
|
2
|
+
Accordion: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
+
}>, never>, never>> & string;
|
|
5
|
+
};
|
|
6
|
+
export default Styled;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { applyDisplayNames, generateClassNames } from '../../utils/functions';
|
|
3
|
+
var baseClassName = 'Accordion';
|
|
4
|
+
var Accordion = /*#__PURE__*/styled.div.attrs({
|
|
5
|
+
className: generateClassNames(baseClassName, 'root')
|
|
6
|
+
}).withConfig({
|
|
7
|
+
componentId: "sc-1ctmyxo-0"
|
|
8
|
+
})([""]);
|
|
9
|
+
var Styled = applyDisplayNames({
|
|
10
|
+
Accordion: Accordion
|
|
11
|
+
});
|
|
12
|
+
export default Styled;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './accordion.component';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["expanded", "children", "ref"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
var AccordionDetails = function AccordionDetails(_ref) {
|
|
6
|
+
var _ref$expanded = _ref.expanded,
|
|
7
|
+
expanded = _ref$expanded === void 0 ? false : _ref$expanded,
|
|
8
|
+
children = _ref.children,
|
|
9
|
+
ref = _ref.ref,
|
|
10
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, expanded && /*#__PURE__*/React.createElement("div", _extends({
|
|
12
|
+
className: "mx-0 my-4",
|
|
13
|
+
ref: ref
|
|
14
|
+
}, rest), children));
|
|
15
|
+
};
|
|
16
|
+
export default AccordionDetails;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const Styled: {
|
|
2
|
+
AccordionDetails: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
+
}>, never>, never>> & string;
|
|
5
|
+
};
|
|
6
|
+
export default Styled;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { applyDisplayNames, generateClassNames } from '../../utils/functions';
|
|
3
|
+
var baseClassName = 'AccordionDetails';
|
|
4
|
+
var AccordionDetails = /*#__PURE__*/styled.div.attrs({
|
|
5
|
+
className: generateClassNames(baseClassName, 'root')
|
|
6
|
+
}).withConfig({
|
|
7
|
+
componentId: "sc-17l9t42-0"
|
|
8
|
+
})(["margin:16px 0;"]);
|
|
9
|
+
var Styled = applyDisplayNames({
|
|
10
|
+
AccordionDetails: AccordionDetails
|
|
11
|
+
});
|
|
12
|
+
export default Styled;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './accordion-details.component';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AccordionHeaderProps } from './accordion-header.props';
|
|
2
|
+
declare const AccordionHeader: ({ expanded, label, onChange, onClick, onContextMenu, hideIcon, fullWidth, iconProps: iconPropsData, ref, ...rest }: AccordionHeaderProps) => JSX.Element;
|
|
3
|
+
export default AccordionHeader;
|
|
@@ -0,0 +1,48 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
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;
|
|
@@ -0,0 +1,44 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './accordion-header.component';
|
|
@@ -0,0 +1,23 @@
|
|
|
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;
|
|
@@ -0,0 +1,4 @@
|
|
|
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);"]));
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
|
@@ -0,0 +1,18 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './arrow.component';
|
|
@@ -0,0 +1,28 @@
|
|
|
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;
|
|
@@ -0,0 +1,4 @@
|
|
|
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;}"]));
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
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;
|
|
@@ -0,0 +1,18 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './arrow-tick.component';
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|