@scaleflex/ui-tw 0.0.2 → 0.0.5
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/{core/button → button}/button.component.d.ts +2 -3
- package/{core/button → button}/button.component.js +8 -9
- package/{core/button → button}/button.const.d.ts +0 -2
- package/{core/button → button}/button.const.js +2 -2
- package/{core/button → button}/button.types.d.ts +3 -5
- package/{core/button → button}/button.types.js +2 -4
- package/{core/button → button}/button.utils.d.ts +1 -1
- package/{core/button → button}/button.utils.js +1 -1
- package/{core/button → button}/components/end-icon.d.ts +1 -1
- package/{core/button → button}/components/end-icon.js +3 -3
- package/{core/button → button}/components/start-icon.d.ts +2 -2
- package/{core/button → button}/components/start-icon.js +3 -3
- package/button/index.d.ts +3 -0
- package/button/index.js +2 -0
- package/card/card.component.d.ts +9 -0
- package/card/card.component.js +59 -0
- package/card/index.d.ts +1 -0
- package/card/index.js +1 -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} +4 -4
- 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/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/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/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 -22
- package/core/arrow/arrow.props.d.ts +0 -14
- package/core/arrow/arrow.props.js +0 -6
- 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 -21
- 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/index.d.ts +0 -2
- package/core/arrow-tick/index.js +0 -1
- 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 -0
- package/core/check-box/check-box.component.js +0 -77
- 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.utils.d.ts +0 -3
- package/core/check-box/check-box.utils.js +0 -21
- package/core/check-box/index.d.ts +0 -0
- package/core/check-box/index.js +0 -2
- 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 -0
- package/core/check-box-group/check-box-group.component.js +0 -75
- package/core/check-box-group/check-box-group.props.d.ts +0 -0
- package/core/check-box-group/check-box-group.props.js +0 -23
- package/core/check-box-group/index.d.ts +0 -0
- package/core/check-box-group/index.js +0 -2
- 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 -37
- 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/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 -15
- package/core/dot/dot.props.d.ts +0 -4
- package/core/dot/dot.props.js +0 -1
- 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/index.d.ts +0 -2
- package/core/dots-navigation/index.js +0 -1
- package/core/input/components/clear-icon.d.ts +0 -6
- package/core/input/components/clear-icon.js +0 -12
- package/core/input/components/copy-icon.d.ts +0 -6
- package/core/input/components/copy-icon.js +0 -13
- package/core/input/components/password-icon.d.ts +0 -7
- package/core/input/components/password-icon.js +0 -24
- package/core/input/components/render-icon.d.ts +0 -7
- package/core/input/components/render-icon.js +0 -26
- 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 -233
- package/core/input/input.const.d.ts +0 -6
- package/core/input/input.const.js +0 -6
- package/core/input/input.types.d.ts +0 -56
- package/core/input/input.types.js +0 -16
- package/core/input/input.utils.d.ts +0 -2
- package/core/input/input.utils.js +0 -13
- 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.props.d.ts +0 -16
- package/core/modal/modal.props.js +0 -1
- 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/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-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/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/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 -113
- package/core/popper/popper.props.d.ts +0 -41
- package/core/popper/popper.props.js +0 -1
- 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.props.d.ts +0 -13
- package/core/radio/radio.props.js +0 -1
- 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/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.props.d.ts +0 -14
- package/core/switcher/switcher.props.js +0 -1
- 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/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.props.d.ts +0 -15
- package/core/tab/tab.props.js +0 -1
- 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/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/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 -9
- 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/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 -11
- package/utils/functions/index.js +0 -12
- 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/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 -0
- 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 -6
- 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/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,21 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
var _excluded = ["type", "IconProps", "ref"];
|
|
5
|
-
import ArrowBottom from '@scaleflex/icons-tw/arrow-bottom';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import { Position } from '../../utils/types';
|
|
8
|
-
var arrowTickDirection = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Position.Bottom, ''), Position.Left, 'rotate-90'), Position.Right, '-rotate-90'), Position.Top, 'rotate-180');
|
|
9
|
-
var ArrowTick = function ArrowTick(_ref) {
|
|
10
|
-
var _ref$type = _ref.type,
|
|
11
|
-
type = _ref$type === void 0 ? Position.Bottom : _ref$type,
|
|
12
|
-
IconPropsData = _ref.IconProps,
|
|
13
|
-
ref = _ref.ref,
|
|
14
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
-
return /*#__PURE__*/React.createElement("span", _extends({}, rest, {
|
|
16
|
-
ref: ref
|
|
17
|
-
}), /*#__PURE__*/React.createElement(ArrowBottom, _extends({
|
|
18
|
-
className: arrowTickDirection[type]
|
|
19
|
-
}, IconPropsData)));
|
|
20
|
-
};
|
|
21
|
-
export default ArrowTick;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { IconProps } from '@scaleflex/icons-tw/icon.props';
|
|
2
|
-
import type { Values } from '../../utils/types';
|
|
3
|
-
export declare const Type: {
|
|
4
|
-
readonly Left: "left";
|
|
5
|
-
readonly Right: "right";
|
|
6
|
-
readonly Top: "top";
|
|
7
|
-
readonly Bottom: "bottom";
|
|
8
|
-
};
|
|
9
|
-
export type ArrowTickTypesType = Values<typeof Type>;
|
|
10
|
-
export interface ArrowTickProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
11
|
-
type?: ArrowTickTypesType;
|
|
12
|
-
IconProps?: IconProps;
|
|
13
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
14
|
-
}
|
package/core/arrow-tick/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './arrow-tick.component';
|
package/core/button/index.d.ts
DELETED
package/core/button/index.js
DELETED
|
File without changes
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
// import Intermediate from '@scaleflex/icons-tw/intermediate'
|
|
2
|
-
// import Tick from '@scaleflex/icons-tw/tick'
|
|
3
|
-
// import React from 'react'
|
|
4
|
-
//
|
|
5
|
-
// import { lightPalette } from '../../theme/roots/palette'
|
|
6
|
-
// import { ignoreEvent } from '../../utils/functions'
|
|
7
|
-
// import { cn } from '../../utils/functions/shadcn-utils'
|
|
8
|
-
// import { Color } from '../../utils/types/palette'
|
|
9
|
-
//
|
|
10
|
-
// import type { CheckBoxProps } from './check-box.props'
|
|
11
|
-
// import { getCheckboxIconSize } from './check-box.utils'
|
|
12
|
-
// import { Size, Type } from './types'
|
|
13
|
-
//
|
|
14
|
-
// const CheckBox = ({
|
|
15
|
-
// size = Size.Md,
|
|
16
|
-
// type = Type.Checkbox,
|
|
17
|
-
// checked = false,
|
|
18
|
-
// onChange,
|
|
19
|
-
// checkBoxProps,
|
|
20
|
-
// readOnly = false,
|
|
21
|
-
// disabled = false,
|
|
22
|
-
// ref,
|
|
23
|
-
// ...rest
|
|
24
|
-
// }: CheckBoxProps): JSX.Element => {
|
|
25
|
-
// const getIcon = (props: any) => {
|
|
26
|
-
// switch (type) {
|
|
27
|
-
// case Type.Checkbox:
|
|
28
|
-
// return <Tick {...props} />
|
|
29
|
-
// case Type.Intermediate:
|
|
30
|
-
// return <Intermediate {...props} />
|
|
31
|
-
// default:
|
|
32
|
-
// return <Tick {...props} />
|
|
33
|
-
// }
|
|
34
|
-
// }
|
|
35
|
-
//
|
|
36
|
-
// const cursorStyleClasses = disabled ? 'cursor-default' : 'cursor-pointer'
|
|
37
|
-
//
|
|
38
|
-
// const ownTransitionClasses = 'transition-all duration-100 ease-out'
|
|
39
|
-
//
|
|
40
|
-
// const checkBoxWrapperClasses = cn(
|
|
41
|
-
// 'relative flex items-center justify-center border-1 border-solid border-borders-secondary',
|
|
42
|
-
// `${checked ? 'bg-accent-primary border-accent-primary' : 'bg-background-stateless border-borders-primary-stateless'}`,
|
|
43
|
-
// `${size === Size.Sm ? 'min-h-4 max-h-4 min-w-4 max-w-4' : ''}`,
|
|
44
|
-
// `${size === Size.Md ? 'min-h-5 max-h-5 min-w-5 max-w-5' : ''}`,
|
|
45
|
-
// `${disabled ? 'border-1 border-solid' : ''}`,
|
|
46
|
-
// `${disabled ? (checked ? 'bg-accent-2-8-Opacity border-transparent' : 'bg-background-active border-borders-secondary') : ''}`,
|
|
47
|
-
// cursorStyleClasses,
|
|
48
|
-
// ownTransitionClasses,
|
|
49
|
-
// )
|
|
50
|
-
//
|
|
51
|
-
// const inputClasses = cn('peer absolute top-0 left-0 z-1 m-0 h-full w-full p-0 opacity-0', cursorStyleClasses)
|
|
52
|
-
//
|
|
53
|
-
// const unCheckedIconClasses = cn('flex opacity-0', `${disabled ? '' : 'peer-hover:opacity-100'}`, ownTransitionClasses)
|
|
54
|
-
//
|
|
55
|
-
// return (
|
|
56
|
-
// <span className={checkBoxWrapperClasses} ref={ref} {...rest}>
|
|
57
|
-
// <input
|
|
58
|
-
// type='checkbox'
|
|
59
|
-
// className={inputClasses}
|
|
60
|
-
// checked={checked}
|
|
61
|
-
// disabled={disabled}
|
|
62
|
-
// onChange={readOnly || disabled ? ignoreEvent : onChange}
|
|
63
|
-
// {...checkBoxProps}
|
|
64
|
-
// />
|
|
65
|
-
//
|
|
66
|
-
// {checked ? (
|
|
67
|
-
// getIcon({ size: getCheckboxIconSize(size), color: lightPalette[Color.ButtonPrimaryText] })
|
|
68
|
-
// ) : (
|
|
69
|
-
// <span className={unCheckedIconClasses}>
|
|
70
|
-
// {getIcon({ size: getCheckboxIconSize(size), color: lightPalette[Color.Accent_4_0_Opacity] })}
|
|
71
|
-
// </span>
|
|
72
|
-
// )}
|
|
73
|
-
// </span>
|
|
74
|
-
// )
|
|
75
|
-
// }
|
|
76
|
-
//
|
|
77
|
-
// export default CheckBox
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ChangeEvent, Ref } from 'react';
|
|
2
|
-
import type { Values } from '../../utils/types';
|
|
3
|
-
import { Size, Type } from './types';
|
|
4
|
-
export type CheckBoxSizeType = Values<typeof Size>;
|
|
5
|
-
export type CheckBoxType = Values<typeof Type>;
|
|
6
|
-
export interface CheckBoxProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
7
|
-
checked?: boolean;
|
|
8
|
-
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
-
checkBoxProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
10
|
-
readOnly?: boolean;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
size?: CheckBoxSizeType;
|
|
13
|
-
type?: CheckBoxType;
|
|
14
|
-
ref?: Ref<HTMLSpanElement>;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Size } from './types';
|
|
2
|
-
export var getCheckboxIconSize = function getCheckboxIconSize(size) {
|
|
3
|
-
switch (size) {
|
|
4
|
-
case Size.Md:
|
|
5
|
-
return 14;
|
|
6
|
-
case Size.Sm:
|
|
7
|
-
return 10;
|
|
8
|
-
default:
|
|
9
|
-
return 10;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
export var getCheckboxInfoIconSize = function getCheckboxInfoIconSize(size) {
|
|
13
|
-
switch (size) {
|
|
14
|
-
case Size.Md:
|
|
15
|
-
return 14;
|
|
16
|
-
case Size.Sm:
|
|
17
|
-
return 12;
|
|
18
|
-
default:
|
|
19
|
-
return 12;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
File without changes
|
package/core/check-box/index.js
DELETED
|
File without changes
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// import React, { useRef, useState } from 'react'
|
|
2
|
-
//
|
|
3
|
-
// import { lightPalette } from '../../theme/roots/palette'
|
|
4
|
-
// import { cn } from '../../utils/functions/shadcn-utils'
|
|
5
|
-
// import { Color } from '../../utils/types/palette'
|
|
6
|
-
// import CheckBox from '../check-box'
|
|
7
|
-
// import { getCheckboxInfoIconSize } from '../check-box/check-box.utils'
|
|
8
|
-
// import { Size } from '../check-box/types'
|
|
9
|
-
//
|
|
10
|
-
// import type { CheckBoxGroupProps } from './check-box-group.props'
|
|
11
|
-
// import { LabelPosition } from './types'
|
|
12
|
-
//
|
|
13
|
-
// const CheckBoxGroup = ({
|
|
14
|
-
// size = Size.Sm,
|
|
15
|
-
// label,
|
|
16
|
-
// checkBoxProps,
|
|
17
|
-
// checkBoxGroupProps,
|
|
18
|
-
// readOnly = false,
|
|
19
|
-
// disabled = false,
|
|
20
|
-
// labelPosition = LabelPosition.After,
|
|
21
|
-
// icon,
|
|
22
|
-
// checked = false,
|
|
23
|
-
// ref,
|
|
24
|
-
// ...rest
|
|
25
|
-
// }: CheckBoxGroupProps): JSX.Element => {
|
|
26
|
-
// const textRef = useRef<HTMLLabelElement | null>(null)
|
|
27
|
-
// const [isEllipsisActive, setIsEllipsisActive] = useState(false)
|
|
28
|
-
//
|
|
29
|
-
// const getTextTooltip = (): string | undefined => {
|
|
30
|
-
// if (typeof label === 'string' && isEllipsisActive) {
|
|
31
|
-
// return label
|
|
32
|
-
// }
|
|
33
|
-
// }
|
|
34
|
-
//
|
|
35
|
-
// const handleTextTooltip = (): void => {
|
|
36
|
-
// if (textRef.current !== null && textRef.current) {
|
|
37
|
-
// setIsEllipsisActive(textRef?.current?.offsetWidth < textRef?.current?.scrollWidth)
|
|
38
|
-
// }
|
|
39
|
-
// }
|
|
40
|
-
//
|
|
41
|
-
// const cursorStyleClasses = disabled ? 'cursor-default' : 'cursor-pointer'
|
|
42
|
-
//
|
|
43
|
-
// const checkBoxGroupClasses = cn('relative inline-flex max-w-full items-center gap-1', cursorStyleClasses)
|
|
44
|
-
//
|
|
45
|
-
// const labelWrapClasses = cn(
|
|
46
|
-
// 'inline-block flex gap-2 items-center overflow-hidden text-ellipsis whitespace-nowrap text-textprimary',
|
|
47
|
-
//
|
|
48
|
-
// //TODO: add data about fonts from ${sizeCheckboxGroupMixin[size]}
|
|
49
|
-
// cursorStyleClasses,
|
|
50
|
-
// )
|
|
51
|
-
//
|
|
52
|
-
// const labelTextClasses = `label-text ${labelPosition === 'before' ? '-order-1' : ''}`
|
|
53
|
-
//
|
|
54
|
-
// return (
|
|
55
|
-
// <span className={checkBoxGroupClasses} ref={ref} {...checkBoxGroupProps} {...rest}>
|
|
56
|
-
// <label
|
|
57
|
-
// key='label'
|
|
58
|
-
// title={getTextTooltip()}
|
|
59
|
-
// onMouseOver={handleTextTooltip}
|
|
60
|
-
// ref={textRef}
|
|
61
|
-
// className={labelWrapClasses}
|
|
62
|
-
// >
|
|
63
|
-
// <CheckBox checkBoxProps={checkBoxProps} readOnly={readOnly} disabled={disabled} checked={checked} size={size} />
|
|
64
|
-
//
|
|
65
|
-
// <span className={labelTextClasses}>{label}</span>
|
|
66
|
-
// </label>
|
|
67
|
-
//
|
|
68
|
-
// {typeof icon === 'function'
|
|
69
|
-
// ? icon({ size: getCheckboxInfoIconSize(size), color: lightPalette[Color.IconsSecondary] })
|
|
70
|
-
// : icon}
|
|
71
|
-
// </span>
|
|
72
|
-
// )
|
|
73
|
-
// }
|
|
74
|
-
//
|
|
75
|
-
// export default CheckBoxGroup
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// import { IconProps } from '@scaleflex/icons-tw/icon.props'
|
|
2
|
-
// import { Ref } from 'react'
|
|
3
|
-
//
|
|
4
|
-
// import type { Values } from '../../utils/types'
|
|
5
|
-
// import type { CheckBoxProps } from '../check-box'
|
|
6
|
-
// import { CheckBoxSizeType, CheckBoxType } from '../check-box/check-box.props'
|
|
7
|
-
//
|
|
8
|
-
// import { LabelPosition } from './types'
|
|
9
|
-
//
|
|
10
|
-
// export type LabelPositionType = Values<typeof LabelPosition>
|
|
11
|
-
//
|
|
12
|
-
// export interface CheckBoxGroupProps extends CheckBoxProps {
|
|
13
|
-
// label?: string
|
|
14
|
-
// checkBoxProps?: React.InputHTMLAttributes<HTMLInputElement>
|
|
15
|
-
// checkBoxGroupProps?: React.LabelHTMLAttributes<HTMLLabelElement>
|
|
16
|
-
// readOnly?: boolean
|
|
17
|
-
// disabled?: boolean
|
|
18
|
-
// labelPosition?: LabelPositionType
|
|
19
|
-
// size?: CheckBoxSizeType
|
|
20
|
-
// type?: CheckBoxType
|
|
21
|
-
// icon?: React.ReactNode | ((props: IconProps) => React.ReactNode)
|
|
22
|
-
// ref?: Ref<HTMLLabelElement>
|
|
23
|
-
// }
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './label-position';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './label-position';
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["size", "ref", "className"];
|
|
4
|
-
// import CrossOutline from '@scaleflex/icons-tw/cross-outline'
|
|
5
|
-
import { cn } from '@scaleflex/ui-tw/utils/functions/shadcn-utils';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import { Size } from './types';
|
|
8
|
-
|
|
9
|
-
// const getIconSize = (sizeName: CrossButtonSizeType | undefined): number => {
|
|
10
|
-
// switch (sizeName) {
|
|
11
|
-
// case Size.Lg:
|
|
12
|
-
// return 16
|
|
13
|
-
//
|
|
14
|
-
// case Size.Xs:
|
|
15
|
-
// return 10
|
|
16
|
-
//
|
|
17
|
-
// case Size.Sm:
|
|
18
|
-
// default:
|
|
19
|
-
// return 12
|
|
20
|
-
// }
|
|
21
|
-
// }
|
|
22
|
-
|
|
23
|
-
var CrossButton = function CrossButton(_ref) {
|
|
24
|
-
var _ref$size = _ref.size,
|
|
25
|
-
size = _ref$size === void 0 ? Size.Lg : _ref$size,
|
|
26
|
-
ref = _ref.ref,
|
|
27
|
-
className = _ref.className,
|
|
28
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
-
var crossButtonClasses = cn('flex box-content justify-center items-center cursor-pointer rounded-sm text-icons-secondary', 'hover:text-icons-primary hover:bg-background-hover', 'active:text-icons-primary-hover active:bg-background-active', size === Size.Lg ? 'p-3' : '', size === Size.Md ? 'p-2' : '', size === Size.Sm ? 'p-1.5' : '', size === Size.Xs ? 'p-1' : '', className);
|
|
30
|
-
return /*#__PURE__*/React.createElement("button", _extends({
|
|
31
|
-
className: crossButtonClasses,
|
|
32
|
-
type: "button"
|
|
33
|
-
}, rest, {
|
|
34
|
-
ref: ref
|
|
35
|
-
}));
|
|
36
|
-
};
|
|
37
|
-
export default CrossButton;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Values } from '../../utils/types';
|
|
2
|
-
import { Size } from './types';
|
|
3
|
-
export type CrossButtonSizeType = Values<typeof Size>;
|
|
4
|
-
export interface CrossButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
5
|
-
className?: string;
|
|
6
|
-
size?: CrossButtonSizeType;
|
|
7
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './cross-button.component';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './size';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './size';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["active", "ref"];
|
|
4
|
-
import React from 'react';
|
|
5
|
-
var Dot = function Dot(_ref) {
|
|
6
|
-
var _ref$active = _ref.active,
|
|
7
|
-
active = _ref$active === void 0 ? false : _ref$active,
|
|
8
|
-
ref = _ref.ref,
|
|
9
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
10
|
-
return /*#__PURE__*/React.createElement("span", _extends({
|
|
11
|
-
className: "relative inline-flex h-1.5 w-1.5 items-center justify-center rounded-full border-1 border-solid border-transparent transition-colors duration-100 ease-out ".concat(active ? 'bg-accent-primary' : 'bg-borders-primary-stateless'),
|
|
12
|
-
ref: ref
|
|
13
|
-
}, rest));
|
|
14
|
-
};
|
|
15
|
-
export default Dot;
|
package/core/dot/dot.props.d.ts
DELETED
package/core/dot/dot.props.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/core/dot/index.d.ts
DELETED
package/core/dot/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './dot.component';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["activeItem", "size", "ref"];
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import Dot from '../dot';
|
|
6
|
-
var DotsNavigation = function DotsNavigation(_ref) {
|
|
7
|
-
var _ref$activeItem = _ref.activeItem,
|
|
8
|
-
activeItem = _ref$activeItem === void 0 ? 0 : _ref$activeItem,
|
|
9
|
-
size = _ref.size,
|
|
10
|
-
ref = _ref.ref,
|
|
11
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
-
var finalDots = [];
|
|
13
|
-
for (var i = 0; i < size; i++) {
|
|
14
|
-
finalDots.push(/*#__PURE__*/React.createElement(Dot, {
|
|
15
|
-
key: i,
|
|
16
|
-
active: activeItem > -1 && i <= activeItem
|
|
17
|
-
}));
|
|
18
|
-
}
|
|
19
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
20
|
-
className: "flex gap-3",
|
|
21
|
-
ref: ref
|
|
22
|
-
}, rest), finalDots);
|
|
23
|
-
};
|
|
24
|
-
export default DotsNavigation;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './dots-navigation.component';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children"];
|
|
4
|
-
import React from 'react';
|
|
5
|
-
var ClearIcon = function ClearIcon(props) {
|
|
6
|
-
var children = props.children,
|
|
7
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
8
|
-
return /*#__PURE__*/React.createElement("span", _extends({
|
|
9
|
-
className: "renderClearIcon text-icons-primary flex cursor-pointer"
|
|
10
|
-
}, rest), children);
|
|
11
|
-
};
|
|
12
|
-
export default ClearIcon;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["icon"];
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { copyIconClasses } from '../input.const';
|
|
6
|
-
var CopyIcon = function CopyIcon(props) {
|
|
7
|
-
var icon = props.icon,
|
|
8
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
9
|
-
return /*#__PURE__*/React.createElement("span", _extends({
|
|
10
|
-
className: copyIconClasses
|
|
11
|
-
}, rest), icon);
|
|
12
|
-
};
|
|
13
|
-
export default CopyIcon;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React, { ComponentProps } from 'react';
|
|
2
|
-
import { InputProps } from '../input.types';
|
|
3
|
-
interface PasswordIconProps extends ComponentProps<'span'>, Pick<InputProps, 'size'> {
|
|
4
|
-
isVisible: boolean;
|
|
5
|
-
}
|
|
6
|
-
declare const PasswordIcon: (props: PasswordIconProps) => React.JSX.Element | null;
|
|
7
|
-
export default PasswordIcon;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
var _excluded = ["isVisible", "size"];
|
|
5
|
-
import EyeClosed from '@scaleflex/icons-tw/eye-closed';
|
|
6
|
-
import EyeOpen from '@scaleflex/icons-tw/eye-open';
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { copyIconClasses as passwordIconClasses } from '../input.const';
|
|
9
|
-
import { InputSize } from '../input.types';
|
|
10
|
-
var passwordIconSize = _defineProperty(_defineProperty({}, InputSize.Sm, '0.875rem'), InputSize.Md, '1rem');
|
|
11
|
-
var PasswordIcon = function PasswordIcon(props) {
|
|
12
|
-
var isVisible = props.isVisible,
|
|
13
|
-
size = props.size,
|
|
14
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
15
|
-
if (!size) return null;
|
|
16
|
-
return /*#__PURE__*/React.createElement("span", _extends({
|
|
17
|
-
className: passwordIconClasses
|
|
18
|
-
}, rest), isVisible ? /*#__PURE__*/React.createElement(EyeClosed, {
|
|
19
|
-
size: passwordIconSize[size]
|
|
20
|
-
}) : /*#__PURE__*/React.createElement(EyeOpen, {
|
|
21
|
-
size: passwordIconSize[size]
|
|
22
|
-
}));
|
|
23
|
-
};
|
|
24
|
-
export default PasswordIcon;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React, { ComponentProps } from 'react';
|
|
2
|
-
import { IconFuncType, InputProps } from '../input.types';
|
|
3
|
-
interface RenderIconProps extends ComponentProps<'span'>, Pick<InputProps, 'size' | 'iconClickStart' | 'iconClickEnd' | 'disabled' | 'readOnly' | 'type'> {
|
|
4
|
-
_icon: React.ReactNode | IconFuncType;
|
|
5
|
-
}
|
|
6
|
-
declare const RenderIcon: (props: RenderIconProps) => React.JSX.Element | null;
|
|
7
|
-
export default RenderIcon;
|