@spaced-out/ui-design-system 0.2.6-beta.0 → 0.2.7

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/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.2.7](https://github.com/spaced-out/ui-design-system/compare/v0.2.6...v0.2.7) (2024-10-22)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * updated color ([#278](https://github.com/spaced-out/ui-design-system/issues/278)) ([2a83623](https://github.com/spaced-out/ui-design-system/commit/2a83623a45bada08a78cdb9dda88645518b56cef))
11
+
12
+ ### [0.2.6](https://github.com/spaced-out/ui-design-system/compare/v0.2.6-beta.0...v0.2.6) (2024-10-22)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * disabled button tab styling ([#281](https://github.com/spaced-out/ui-design-system/issues/281)) ([f99fdf9](https://github.com/spaced-out/ui-design-system/commit/f99fdf9115836ed99df6d72c2ed6068af16ec720))
18
+
5
19
  ### [0.2.6-beta.0](https://github.com/spaced-out/ui-design-system/compare/v0.2.5...v0.2.6-beta.0) (2024-10-21)
6
20
 
7
21
 
@@ -30,7 +30,7 @@ const ButtonTab = /*#__PURE__*/React.forwardRef((_ref, ref) => {
30
30
  return /*#__PURE__*/React.createElement(_Button.Button, _extends({}, props, {
31
31
  disabled: disabled,
32
32
  size: size,
33
- type: id === selectedButtonTabId ? 'tertiary' : 'ghost',
33
+ type: "tertiary",
34
34
  ref: ref,
35
35
  classNames: {
36
36
  wrapper: (0, _classify.default)(_ButtonTabModule.default.buttonTabWrapper, {
@@ -38,7 +38,6 @@ const ButtonTab = /*#__PURE__*/React.forwardRef((_ref, ref) => {
38
38
  [_ButtonTabModule.default.smallButtonTab]: size === 'small',
39
39
  [_ButtonTabModule.default.onlyIcon]: iconName && !children,
40
40
  [_ButtonTabModule.default.isSelected]: id === selectedButtonTabId,
41
- [_ButtonTabModule.default.isUnSelected]: id !== selectedButtonTabId,
42
41
  [_ButtonTabModule.default.disabled]: disabled,
43
42
  [_ButtonTabModule.default.leftCurved]: isLeftCurved,
44
43
  [_ButtonTabModule.default.rightCurved]: isRightCurved
@@ -54,7 +54,7 @@ export const ButtonTab: React$AbstractComponent<
54
54
  {...props}
55
55
  disabled={disabled}
56
56
  size={size}
57
- type={id === selectedButtonTabId ? 'tertiary' : 'ghost'}
57
+ type="tertiary"
58
58
  ref={ref}
59
59
  classNames={{
60
60
  wrapper: classify(
@@ -64,7 +64,6 @@ export const ButtonTab: React$AbstractComponent<
64
64
  [css.smallButtonTab]: size === 'small',
65
65
  [css.onlyIcon]: iconName && !children,
66
66
  [css.isSelected]: id === selectedButtonTabId,
67
- [css.isUnSelected]: id !== selectedButtonTabId,
68
67
  [css.disabled]: disabled,
69
68
  [css.leftCurved]: isLeftCurved,
70
69
  [css.rightCurved]: isRightCurved,
@@ -10,7 +10,9 @@
10
10
  size34
11
11
  ) from '../../../styles/variables/_size.css';
12
12
  @value (
13
- spaceSmall
13
+ spaceNone,
14
+ spaceSmall,
15
+ spaceMedium
14
16
  ) from '../../../styles/variables/_space.css';
15
17
  @value (
16
18
  borderWidthPrimary,
@@ -18,72 +20,68 @@
18
20
  borderRadiusNone,
19
21
  borderRadiusMedium
20
22
  ) from '../../../styles/variables/_border.css';
23
+ @value (elevationCard) from '../../../styles/variables/_elevation.css';
21
24
 
22
25
  .buttonTabWrapper {
23
- padding-left: spaceSmall;
24
- padding-right: spaceSmall;
26
+ border: borderWidthPrimary solid colorBorderPrimary;
27
+ border-radius: borderRadiusNone;
28
+ border-right-width: borderWidthNone;
29
+ text-align: left;
30
+ min-width: initial;
31
+ padding: spaceNone spaceMedium;
25
32
  height: size42;
26
33
  color: colorTextSecondary;
27
- min-width: initial;
28
- text-align: left;
29
- }
30
34
 
31
- .buttonTabWrapper .icon {
32
- color: colorTextSecondary;
33
- }
35
+ &.mediumButtonTab {
36
+ height: size42;
37
+ }
34
38
 
35
- .buttonTabWrapper:hover {
36
- color: colorTextPrimary;
37
- background-color: initial;
38
- }
39
+ &.smallButtonTab {
40
+ height: size34;
41
+ }
39
42
 
40
- .buttonTabWrapper:hover .icon {
41
- color: colorTextPrimary;
42
- }
43
+ &.rightCurved {
44
+ border-right-width: borderWidthPrimary;
45
+ border-top-right-radius: borderRadiusMedium;
46
+ border-bottom-right-radius: borderRadiusMedium;
47
+ }
43
48
 
44
- .buttonTabWrapper.mediumButtonTab {
45
- height: size42;
46
- }
49
+ &.leftCurved {
50
+ border-top-left-radius: borderRadiusMedium;
51
+ border-bottom-left-radius: borderRadiusMedium;
52
+ }
47
53
 
48
- .buttonTabWrapper.smallButtonTab {
49
- height: size34;
50
- }
54
+ &.disabled {
55
+ color: colorTextDisabled;
56
+ border: borderWidthPrimary solid colorBorderPrimary;
57
+ border-right-width: borderWidthNone;
58
+ }
51
59
 
52
- .onlyIcon {
53
- color: colorTextSecondary;
54
- padding-left: initial;
55
- padding-right: initial;
56
- }
60
+ &:hover {
61
+ color: colorTextPrimary;
62
+ background-color: initial;
63
+ }
57
64
 
58
- .mediumButtonTab.onlyIcon {
59
- max-width: size42;
60
- }
65
+ &:focus {
66
+ z-index: elevationCard;
67
+ }
61
68
 
62
- .smallButtonTab.onlyIcon {
63
- max-width: size34;
69
+ &.icon {
70
+ color: colorTextSecondary;
71
+ }
64
72
  }
65
73
 
66
- .buttonTabWrapper.isSelected {
67
- background-color: colorFillSecondary;
74
+ .buttonTabWrapper:hover .icon {
68
75
  color: colorTextPrimary;
69
- border-top-width: borderWidthPrimary;
70
- border-right-width: borderWidthPrimary;
71
- border-bottom-width: borderWidthPrimary;
72
- border-style: solid;
73
- border-color: colorBorderPrimary;
74
- }
75
-
76
- .buttonTabWrapper.leftCurved {
77
- border-radius: borderRadiusMedium borderRadiusNone borderRadiusNone
78
- borderRadiusMedium;
79
76
  }
80
77
 
81
- .buttonTabWrapper.rightCurved {
82
- border-radius: borderRadiusNone borderRadiusMedium borderRadiusMedium
83
- borderRadiusNone;
78
+ .onlyIcon {
79
+ color: colorTextSecondary;
80
+ padding: spaceNone spaceSmall;
84
81
  }
85
82
 
86
- .buttonTabWrapper.isSelected:hover {
83
+ .buttonTabWrapper.isSelected {
84
+ color: colorTextPrimary;
87
85
  background-color: colorFillSecondary;
88
86
  }
89
87
 
@@ -91,15 +89,6 @@
91
89
  color: colorTextPrimary;
92
90
  }
93
91
 
94
- .buttonTabWrapper.disabled {
95
- color: colorTextDisabled;
96
- }
97
-
98
92
  .buttonTabWrapper.disabled .icon {
99
93
  color: colorTextDisabled;
100
94
  }
101
-
102
- .buttonTabWrapper.isUnSelected {
103
- padding-left: spaceSmall;
104
- padding-right: spaceSmall;
105
- }
@@ -49,23 +49,17 @@ const ButtonTabs = /*#__PURE__*/React.forwardRef((_ref, ref) => {
49
49
  } = child.props;
50
50
  const isFirst = index === 0;
51
51
  const isLast = index === unwrappedNodes.length - 1;
52
- const isSingleChild = unwrappedNodes.length === 1;
53
52
  return /*#__PURE__*/React.cloneElement(child, {
54
53
  ...child.props,
55
54
  isFluid,
56
55
  size,
57
- isLeftCurved: isFirst && !isSingleChild,
58
- isRightCurved: isLast && !isSingleChild,
56
+ isLeftCurved: isFirst,
57
+ isRightCurved: isLast,
59
58
  disabled: disabledChild || disabled,
60
59
  selectedButtonTabId,
61
60
  onButtonTabSelect,
62
61
  classNames: {
63
- wrapper: (0, _classify.default)(_ButtonTabsModule.default.buttonTab, {
64
- [_ButtonTabsModule.default.firstChild]: isFirst && !isSingleChild,
65
- [_ButtonTabsModule.default.lastChild]: isLast && !isSingleChild,
66
- [_ButtonTabsModule.default.children]: !isFirst && !isLast,
67
- [_ButtonTabsModule.default.singleChild]: isSingleChild
68
- }, classNamesChild?.wrapper)
62
+ wrapper: classNamesChild?.wrapper
69
63
  }
70
64
  });
71
65
  }
@@ -77,28 +77,18 @@ export const ButtonTabs: React$AbstractComponent<
77
77
  child.props;
78
78
  const isFirst = index === 0;
79
79
  const isLast = index === unwrappedNodes.length - 1;
80
- const isSingleChild = unwrappedNodes.length === 1;
81
80
 
82
81
  return React.cloneElement(child, {
83
82
  ...child.props,
84
83
  isFluid,
85
84
  size,
86
- isLeftCurved: isFirst && !isSingleChild,
87
- isRightCurved: isLast && !isSingleChild,
85
+ isLeftCurved: isFirst,
86
+ isRightCurved: isLast,
88
87
  disabled: disabledChild || disabled,
89
88
  selectedButtonTabId,
90
89
  onButtonTabSelect,
91
90
  classNames: {
92
- wrapper: classify(
93
- css.buttonTab,
94
- {
95
- [css.firstChild]: isFirst && !isSingleChild,
96
- [css.lastChild]: isLast && !isSingleChild,
97
- [css.children]: !isFirst && !isLast,
98
- [css.singleChild]: isSingleChild,
99
- },
100
- classNamesChild?.wrapper,
101
- ),
91
+ wrapper: classNamesChild?.wrapper,
102
92
  },
103
93
  });
104
94
  }
@@ -1,6 +1,5 @@
1
1
  @value (
2
- colorBackgroundTertiary,
3
- colorBorderPrimary
2
+ colorBackgroundTertiary
4
3
  ) from '../../styles/variables/_color.css';
5
4
  @value (
6
5
  size42,
@@ -8,10 +7,7 @@
8
7
  sizeFluid
9
8
  ) from '../../styles/variables/_size.css';
10
9
  @value (
11
- borderWidthNone,
12
- borderWidthPrimary,
13
- borderRadiusMedium,
14
- borderRadiusNone
10
+ borderRadiusMedium
15
11
  ) from '../../styles/variables/_border.css';
16
12
 
17
13
  .buttonTabsWrapper {
@@ -19,8 +15,6 @@
19
15
  background-color: colorBackgroundTertiary;
20
16
  align-items: center;
21
17
  width: fit-content;
22
- composes: borderTopPrimary from '../../styles/border.module.css';
23
- composes: borderBottomPrimary from '../../styles/border.module.css';
24
18
  border-radius: borderRadiusMedium;
25
19
  }
26
20
 
@@ -35,19 +29,3 @@
35
29
  .buttonTabsWrapper.isFluid {
36
30
  width: sizeFluid;
37
31
  }
38
-
39
- .buttonTab {
40
- border-color: colorBorderPrimary;
41
- border-width: borderWidthNone borderWidthPrimary;
42
- border-style: none solid;
43
- border-radius: borderRadiusNone;
44
- }
45
-
46
- .children,
47
- .lastChild {
48
- border-left-width: borderWidthNone;
49
- }
50
-
51
- .singleChild {
52
- border-radius: borderRadiusMedium;
53
- }
@@ -8,8 +8,10 @@
8
8
  colorButtonFillPrimaryHovered,
9
9
  colorTextDisabled,
10
10
  colorFillDisabled,
11
- colorFocusPrimary
12
- ) from ' ../../styles/variables/_color.css';
11
+ colorFocusPrimary,
12
+ colorBackgroundSecondary,
13
+ colorGrayLightest
14
+ ) from '../../styles/variables/_color.css';
13
15
 
14
16
  @value (spaceXXSmall,spaceXSmall,spaceSmall) from '../../styles/variables/_space.css';
15
17
  @value (size42,size34) from '../../styles/variables/_size.css';
@@ -33,14 +35,14 @@
33
35
  display: flex;
34
36
  align-items: center;
35
37
  justify-content: center;
36
- background-color: colorFillSecondary;
38
+ background-color: colorBackgroundSecondary;
37
39
  color: colorTextSecondary;
38
40
  padding: spaceXSmall spaceSmall;
39
41
  border-radius: borderRadiusSmall;
40
42
 
41
43
  &:hover,
42
44
  &:focus-visible {
43
- background-color: colorButtonFillTertiaryHovered;
45
+ background-color: colorGrayLightest;
44
46
  color: colorTextPrimary;
45
47
  cursor: pointer;
46
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.2.6-beta.0",
3
+ "version": "0.2.7",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {