@itcase/ui 1.0.70 → 1.0.71

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.
@@ -42,12 +42,20 @@ function Badge(props) {
42
42
  textSize,
43
43
  value
44
44
  } = props;
45
- const borderClass = useDeviceTargetClass.useDeviceTargetClass(props, {
45
+ const borderColorClass = useDeviceTargetClass.useDeviceTargetClass(props, {
46
46
  prefix: 'border-color_',
47
- propsKey: 'border'
47
+ propsKey: 'borderColor'
48
+ });
49
+ const borderColorHoverClass = useDeviceTargetClass.useDeviceTargetClass(props, {
50
+ prefix: 'border-color_hover_',
51
+ propsKey: 'borderColorHover'
52
+ });
53
+ const borderWidthClass = useDeviceTargetClass.useDeviceTargetClass(props, {
54
+ prefix: 'border-width_',
55
+ propsKey: 'borderWidth'
48
56
  });
49
57
  const borderTypeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
50
- prefix: 'border_',
58
+ prefix: 'border_type',
51
59
  propsKey: 'borderType'
52
60
  });
53
61
  const fillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
@@ -67,7 +75,7 @@ function Badge(props) {
67
75
  propsKey: 'type'
68
76
  });
69
77
  return /*#__PURE__*/React__default.default.createElement("div", {
70
- className: clsx__default.default(className, 'badge', borderClass, borderTypeClass, fillClass || badgeConfig.appearance[appearance] && `fill_${badgeConfig.appearance[appearance].fillClass}`?.replace(/([A-Z])/g, '-$1').toLowerCase(), positionClass, sizeClass, typeClass)
78
+ className: clsx__default.default(className, 'badge', borderColorClass, borderColorHoverClass, borderWidthClass, borderTypeClass, fillClass || badgeConfig.appearance[appearance] && `fill_${badgeConfig.appearance[appearance].fillClass}`?.replace(/([A-Z])/g, '-$1').toLowerCase(), positionClass, sizeClass, typeClass)
71
79
  }, children || /*#__PURE__*/React__default.default.createElement(index.Text, {
72
80
  textColor: textColor || badgeConfig.appearance[appearance] && badgeConfig.appearance[appearance].textColor?.replace(/([A-Z])/g, '-$1').toLowerCase(),
73
81
  size: textSize
@@ -765,7 +765,8 @@ function GridItem(props) {
765
765
  id,
766
766
  children,
767
767
  className,
768
- dataTour
768
+ dataTour,
769
+ onClick
769
770
  } = props;
770
771
  const orderClass = useDeviceTargetClass.useDeviceTargetClass(props, {
771
772
  prefix: 'order_',
@@ -830,7 +831,8 @@ function GridItem(props) {
830
831
  className: clsx__default.default(className, 'grid__item', orderClass, fillClass, alignSelfClass, justifySelfClass, columnStartClass, columnEndClass, columnSpanClass, rowStartClass, rowEndClass, rowSpanClass, directionClass, gapClass, rowGapClass, columnGapClass),
831
832
  id: id,
832
833
  "data-tour": dataTour,
833
- style: gridItemStyles
834
+ style: gridItemStyles,
835
+ onClick: onClick
834
836
  }, children);
835
837
  }
836
838
  GridItem.propTypes = {
@@ -42,6 +42,7 @@ Switch.propTypes = {
42
42
  disabled: PropTypes__default.default.bool,
43
43
  id: PropTypes__default.default.string,
44
44
  set: PropTypes__default.default.string,
45
+ size: PropTypes__default.default.string,
45
46
  onChange: PropTypes__default.default.func
46
47
  };
47
48
  Switch.__docgenInfo = {
@@ -84,6 +85,13 @@ Switch.__docgenInfo = {
84
85
  },
85
86
  "required": false
86
87
  },
88
+ "size": {
89
+ "description": "",
90
+ "type": {
91
+ "name": "string"
92
+ },
93
+ "required": false
94
+ },
87
95
  "onChange": {
88
96
  "description": "",
89
97
  "type": {
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const borderColorProps = [null, 'accent', 'primary', 'secondary', 'tertiary', 'surface', 'error', 'success'];
3
+ const borderColorProps = [null, 'accentBorderPrimary', 'accentBorderSecondary', 'accentBorderTertiary', 'accentBorderQuaternary', 'accentBorderDisabled', 'primaryBorderPrimary', 'primaryBorderSecondary', 'primaryBorderTertiary', 'primaryBorderQuaternary', 'primaryBorderDisabled', 'secondaryBorderPrimary', 'secondaryBorderSecondary', 'secondaryBorderTertiary', 'secondaryBorderQuaternary', 'secondaryBorderDisabled', 'tertiaryBorderPrimary', 'tertiaryBorderSecondary', 'tertiaryBorderTertiary', 'tertiaryBorderQuaternary', 'tertiaryBorderDisabled', 'surfaceBorderPrimary', 'surfaceBorderSecondary', 'surfaceBorderTertiary', 'surfaceBorderQuaternary', 'surfaceBorderDisabled', 'errorBorderPrimary', 'errorBorderSecondary', 'errorBorderDisabled', 'successBorderPrimary', 'successBorderSecondary', 'successBorderDisabled'];
4
4
 
5
5
  exports.default = borderColorProps;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const borderColorHoverProps = [null, 'accentBorderPrimary', 'accentBorderPrimaryHover', 'primaryBorderPrimary', 'secondaryBorderPrimary', 'tertiaryBorderPrimary', 'surfaceBorderPrimary', 'surfaceBorderSecondary', 'surfaceBorderTertiary', 'errorBorderPrimary', 'errorBorderPrimaryHover', 'successBorderPrimary'];
4
+
5
+ exports.default = borderColorHoverProps;
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const borderTypeProps = [null, 'outine', 'solid'];
3
+ const borderTypeProps = [null, 'outline', 'solid', 'none'];
4
4
 
5
5
  exports.default = borderTypeProps;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const borderWidthProps = [null, '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
4
+
5
+ exports.default = borderWidthProps;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const heightProps = [null, 'fixed', 'hug', 'fill'];
4
+
5
+ exports.default = heightProps;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const sizeInterfaceProps = [null, 'compact', 'regular', 'any'];
4
+
5
+ exports.default = sizeInterfaceProps;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const sizePXProps = [null, '16', '24', '32', '40', '48', '56', '64', '72', '80', '96', '112', '144'];
4
+
5
+ exports.default = sizePXProps;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const stateProps = [null, 'normal', 'focus', 'hover', 'active', 'disabled'];
4
+
5
+ exports.default = stateProps;
package/dist/constants.js CHANGED
@@ -1,17 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var align = require('./constants/componentProps/align.js');
4
3
  var alignDirection = require('./constants/componentProps/alignDirection.js');
4
+ var align = require('./constants/componentProps/align.js');
5
+ var borderColorHover = require('./constants/componentProps/borderColorHover.js');
5
6
  var borderColor = require('./constants/componentProps/borderColor.js');
6
7
  var borderType = require('./constants/componentProps/borderType.js');
7
- var textSize = require('./constants/componentProps/textSize.js');
8
- var textWrap = require('./constants/componentProps/textWrap.js');
9
- var itemColor = require('./constants/componentProps/itemColor.js');
8
+ var borderWidth = require('./constants/componentProps/borderWidth.js');
10
9
  var captionPosition = require('./constants/componentProps/captionPosition.js');
11
10
  var direction = require('./constants/componentProps/direction.js');
12
11
  var emojiSize = require('./constants/componentProps/emojiSize.js');
13
- var fill = require('./constants/componentProps/fill.js');
14
12
  var fillGradient = require('./constants/componentProps/fillGradient.js');
13
+ var fill = require('./constants/componentProps/fill.js');
15
14
  var fillType = require('./constants/componentProps/fillType.js');
16
15
  var flexAlign = require('./constants/componentProps/flexAlign.js');
17
16
  var flexJustifyContent = require('./constants/componentProps/flexJustifyContent.js');
@@ -20,23 +19,30 @@ var gridAlign = require('./constants/componentProps/gridAlign.js');
20
19
  var gridAlignSelf = require('./constants/componentProps/gridAlignSelf.js');
21
20
  var gridJustifyItems = require('./constants/componentProps/gridJustifyItems.js');
22
21
  var gridJustifySelf = require('./constants/componentProps/gridJustifySelf.js');
22
+ var height = require('./constants/componentProps/height.js');
23
23
  var horizontalContentAlign = require('./constants/componentProps/horizontalContentAlign.js');
24
24
  var horizontalResizeMode = require('./constants/componentProps/horizontalResizeMode.js');
25
25
  var iconSize = require('./constants/componentProps/iconSize.js');
26
+ var itemColor = require('./constants/componentProps/itemColor.js');
26
27
  var position = require('./constants/componentProps/position.js');
27
28
  var resizeMode = require('./constants/componentProps/resizeMode.js');
28
29
  var shape = require('./constants/componentProps/shape.js');
30
+ var sizeInterface = require('./constants/componentProps/sizeInterface.js');
31
+ var sizePX = require('./constants/componentProps/sizePX.js');
29
32
  var size = require('./constants/componentProps/size.js');
30
33
  var stacking = require('./constants/componentProps/stacking.js');
34
+ var state = require('./constants/componentProps/state.js');
31
35
  var strokeColor = require('./constants/componentProps/strokeColor.js');
32
36
  var textAlign = require('./constants/componentProps/textAlign.js');
33
- var textColor = require('./constants/componentProps/textColor.js');
34
37
  var textColorActive = require('./constants/componentProps/textColorActive.js');
35
38
  var textColorHover = require('./constants/componentProps/textColorHover.js');
39
+ var textColor = require('./constants/componentProps/textColor.js');
36
40
  var textGradient = require('./constants/componentProps/textGradient.js');
41
+ var textSize = require('./constants/componentProps/textSize.js');
37
42
  var textStyle = require('./constants/componentProps/textStyle.js');
38
43
  var textTag = require('./constants/componentProps/textTag.js');
39
44
  var textWeight = require('./constants/componentProps/textWeight.js');
45
+ var textWrap = require('./constants/componentProps/textWrap.js');
40
46
  var titleSize = require('./constants/componentProps/titleSize.js');
41
47
  var type = require('./constants/componentProps/type.js');
42
48
  var underline = require('./constants/componentProps/underline.js');
@@ -47,18 +53,17 @@ var wrap = require('./constants/componentProps/wrap.js');
47
53
 
48
54
 
49
55
 
50
- exports.alignProps = align.default;
51
56
  exports.alignDirectionProps = alignDirection.default;
57
+ exports.alignProps = align.default;
58
+ exports.borderColorHoverProps = borderColorHover.default;
52
59
  exports.borderColorProps = borderColor.default;
53
60
  exports.borderTypeProps = borderType.default;
54
- exports.textSizeProps = textSize.default;
55
- exports.textWrapProps = textWrap.default;
56
- exports.itemColorProps = itemColor.default;
61
+ exports.borderWidthProps = borderWidth.default;
57
62
  exports.captionPositionProps = captionPosition.default;
58
63
  exports.directionProps = direction.default;
59
64
  exports.emojiSizeProps = emojiSize.default;
60
- exports.fillProps = fill.default;
61
65
  exports.fillGradientProps = fillGradient.default;
66
+ exports.fillProps = fill.default;
62
67
  exports.fillTypeProps = fillType.default;
63
68
  exports.flexAlignProps = flexAlign.default;
64
69
  exports.flexJustifyContentProps = flexJustifyContent.default;
@@ -67,23 +72,30 @@ exports.gridAlignProps = gridAlign.default;
67
72
  exports.gridAlignSelfProps = gridAlignSelf.default;
68
73
  exports.gridJustifyItemsProps = gridJustifyItems.default;
69
74
  exports.gridJustifySelfProps = gridJustifySelf.default;
75
+ exports.heightProps = height.default;
70
76
  exports.horizontalContentAlignProps = horizontalContentAlign.default;
71
77
  exports.horizontalResizeModeProps = horizontalResizeMode.default;
72
78
  exports.iconSizeProps = iconSize.default;
79
+ exports.itemColorProps = itemColor.default;
73
80
  exports.positionProps = position.default;
74
81
  exports.resizeModeProps = resizeMode.default;
75
82
  exports.shapeProps = shape.default;
83
+ exports.sizeInterfaceProps = sizeInterface.default;
84
+ exports.sizePXProps = sizePX.default;
76
85
  exports.sizeProps = size.default;
77
86
  exports.stackingProps = stacking.default;
87
+ exports.stateProps = state.default;
78
88
  exports.strokeColorProps = strokeColor.default;
79
89
  exports.textAlignProps = textAlign.default;
80
- exports.textColorProps = textColor.default;
81
90
  exports.textColorActiveProps = textColorActive.default;
82
91
  exports.textColorHoverProps = textColorHover.default;
92
+ exports.textColorProps = textColor.default;
83
93
  exports.textGradientProps = textGradient.default;
94
+ exports.textSizeProps = textSize.default;
84
95
  exports.textStyleProps = textStyle.default;
85
96
  exports.textTagProps = textTag.default;
86
97
  exports.textWeightProps = textWeight.default;
98
+ exports.textWrapProps = textWrap.default;
87
99
  exports.titleSizeProps = titleSize.default;
88
100
  exports.typeProps = type.default;
89
101
  exports.underlineProps = underline.default;
@@ -11,32 +11,5 @@
11
11
  }
12
12
  }
13
13
  }
14
- &_hover {
15
- &_$(type) {
16
- &-border {
17
- @each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, active, disabled, hover {
18
- &-$(color) {
19
- &:hover {
20
- border-color: var(--color-$(type)-border-$(color));
21
- }
22
- }
23
- }
24
- }
25
- }
26
- }
27
- &_focus {
28
- &_$(type) {
29
- &-border {
30
- @each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, active, disabled, hover {
31
- &-$(color) {
32
- &:focus {
33
- outline: 0;
34
- border-color: var(--color-$(type)-border-$(color)) !important;
35
- }
36
- }
37
- }
38
- }
39
- }
40
- }
41
14
  }
42
15
  }
@@ -0,0 +1,18 @@
1
+ .border-color {
2
+ @each $type in accent, primary, secondary, tertiary, surface, success, error {
3
+ &_focus {
4
+ &_$(type) {
5
+ &-border {
6
+ @each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, active, disabled, hover {
7
+ &-$(color) {
8
+ &:focus {
9
+ outline: 0;
10
+ border-color: var(--color-$(type)-border-$(color)) !important;
11
+ }
12
+ }
13
+ }
14
+ }
15
+ }
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,21 @@
1
+ .border-color_hover {
2
+ @each $type in accent, primary, secondary, tertiary, surface, success, error, info, warning{
3
+ &_$(type) {
4
+ &-border {
5
+ @each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover {
6
+ &-$(color) {
7
+ &:hover {
8
+ border: solid 2px red;
9
+ border-color: var(--color-$(type)-border-$(color));
10
+ }
11
+ &-hover {
12
+ &:hover {
13
+ border-color: var(--color-$(type)-border-$(color));
14
+ }
15
+ }
16
+ }
17
+ }
18
+ }
19
+ }
20
+ }
21
+ }
@@ -1,8 +1,8 @@
1
1
  .border-width {
2
2
  @each $width in 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 {
3
3
  &_$(width) {
4
+ border-width: $(width)px;
4
5
  border-style: solid;
5
- border-width: $(width)px ;
6
6
  }
7
7
  }
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui",
3
- "version": "1.0.70",
3
+ "version": "1.0.71",
4
4
  "description": "UI components (Modal, Loader, Popup, etc)",
5
5
  "keywords": [
6
6
  "Modal",
@@ -1,13 +0,0 @@
1
- .border {
2
- &_type {
3
- &_outline {
4
- border-style: solid;
5
- }
6
- &_solid {
7
- border-style: solid;
8
- }
9
- &_none {
10
- border: none;
11
- }
12
- }
13
- }