@channel.io/bezier-react 4.0.0-next.0 → 4.0.0-next.2

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.
Files changed (48) hide show
  1. package/dist/cjs/components/AlphaButton/Button.js +3 -3
  2. package/dist/cjs/components/AlphaButton/Button.js.map +1 -1
  3. package/dist/cjs/components/AlphaButton/Button.module.scss.js +1 -1
  4. package/dist/cjs/components/AlphaFloatingButton/FloatingButton.js +3 -3
  5. package/dist/cjs/components/AlphaFloatingButton/FloatingButton.js.map +1 -1
  6. package/dist/cjs/components/AlphaFloatingButton/FloatingButton.module.scss.js +1 -1
  7. package/dist/cjs/components/AlphaFloatingIconButton/FloatingIconButton.js +2 -1
  8. package/dist/cjs/components/AlphaFloatingIconButton/FloatingIconButton.js.map +1 -1
  9. package/dist/cjs/components/AlphaFloatingIconButton/FloatingIconButton.module.scss.js +1 -1
  10. package/dist/cjs/components/AlphaIconButton/IconButton.module.scss.js +1 -1
  11. package/dist/cjs/components/Button/Button.js +5 -4
  12. package/dist/cjs/components/Button/Button.js.map +1 -1
  13. package/dist/cjs/components/Button/Button.module.scss.js +1 -1
  14. package/dist/cjs/packages/bezier-tokens/dist/beta/esm/darkTheme.js +20 -20
  15. package/dist/cjs/packages/bezier-tokens/dist/beta/esm/darkTheme.js.map +1 -1
  16. package/dist/cjs/packages/bezier-tokens/dist/beta/esm/lightTheme.js +20 -20
  17. package/dist/cjs/packages/bezier-tokens/dist/beta/esm/lightTheme.js.map +1 -1
  18. package/dist/cjs/styles.css +1 -1
  19. package/dist/esm/components/AlphaButton/Button.mjs +3 -3
  20. package/dist/esm/components/AlphaButton/Button.mjs.map +1 -1
  21. package/dist/esm/components/AlphaButton/Button.module.scss.mjs +1 -1
  22. package/dist/esm/components/AlphaFloatingButton/FloatingButton.mjs +3 -3
  23. package/dist/esm/components/AlphaFloatingButton/FloatingButton.mjs.map +1 -1
  24. package/dist/esm/components/AlphaFloatingButton/FloatingButton.module.scss.mjs +1 -1
  25. package/dist/esm/components/AlphaFloatingIconButton/FloatingIconButton.mjs +2 -1
  26. package/dist/esm/components/AlphaFloatingIconButton/FloatingIconButton.mjs.map +1 -1
  27. package/dist/esm/components/AlphaFloatingIconButton/FloatingIconButton.module.scss.mjs +1 -1
  28. package/dist/esm/components/AlphaIconButton/IconButton.module.scss.mjs +1 -1
  29. package/dist/esm/components/Button/Button.mjs +5 -4
  30. package/dist/esm/components/Button/Button.mjs.map +1 -1
  31. package/dist/esm/components/Button/Button.module.scss.mjs +1 -1
  32. package/dist/esm/packages/bezier-tokens/dist/beta/esm/darkTheme.mjs +20 -20
  33. package/dist/esm/packages/bezier-tokens/dist/beta/esm/darkTheme.mjs.map +1 -1
  34. package/dist/esm/packages/bezier-tokens/dist/beta/esm/lightTheme.mjs +20 -20
  35. package/dist/esm/packages/bezier-tokens/dist/beta/esm/lightTheme.mjs.map +1 -1
  36. package/dist/esm/styles.css +1 -1
  37. package/dist/types/components/AlphaFloatingIconButton/FloatingIconButton.d.ts.map +1 -1
  38. package/dist/types/components/Button/Button.d.ts.map +1 -1
  39. package/package.json +2 -2
  40. package/src/components/AlphaButton/Button.module.scss +19 -4
  41. package/src/components/AlphaButton/Button.tsx +3 -3
  42. package/src/components/AlphaFloatingButton/FloatingButton.module.scss +18 -3
  43. package/src/components/AlphaFloatingButton/FloatingButton.tsx +3 -3
  44. package/src/components/AlphaFloatingIconButton/FloatingIconButton.module.scss +20 -5
  45. package/src/components/AlphaFloatingIconButton/FloatingIconButton.tsx +1 -0
  46. package/src/components/AlphaIconButton/IconButton.module.scss +20 -5
  47. package/src/components/Button/Button.module.scss +22 -6
  48. package/src/components/Button/Button.tsx +7 -4
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingIconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaFloatingIconButton/FloatingIconButton.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,4BAA4B,EAAE,WAAgD;AAoB5F,eAAO,MAAM,kBAAkB,4HAiE7B,CAAA"}
1
+ {"version":3,"file":"FloatingIconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaFloatingIconButton/FloatingIconButton.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,4BAA4B,EAAE,WAAgD;AAoB5F,eAAO,MAAM,kBAAkB,4HAkE7B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAA2B,MAAM,gBAAgB,CAAA;AAI1E,eAAO,MAAM,cAAc,kBAAkB,CAAA;AAwE7C,eAAO,MAAM,MAAM,2GA8ElB,CAAA"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAA2B,MAAM,gBAAgB,CAAA;AAI1E,eAAO,MAAM,cAAc,kBAAkB,CAAA;AAwE7C,eAAO,MAAM,MAAM,2GAiFlB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@channel.io/bezier-react",
3
- "version": "4.0.0-next.0",
3
+ "version": "4.0.0-next.2",
4
4
  "description": "React components library that implements Bezier design system.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -131,7 +131,7 @@
131
131
  }
132
132
  },
133
133
  "dependencies": {
134
- "@channel.io/bezier-tokens": "1.0.0-next.0",
134
+ "@channel.io/bezier-tokens": "1.0.0-next.2",
135
135
  "@radix-ui/react-checkbox": "^1.1.3",
136
136
  "@radix-ui/react-dialog": "^1.1.3",
137
137
  "@radix-ui/react-radio-group": "^1.2.2",
@@ -42,6 +42,11 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
42
42
  & .ButtonText {
43
43
  padding: 0 3px;
44
44
  }
45
+
46
+ & :is(.ButtonIcon, .Loader) {
47
+ width: 14px;
48
+ height: 14px;
49
+ }
45
50
  }
46
51
 
47
52
  &:where(.size-s) {
@@ -54,21 +59,31 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
54
59
  }
55
60
 
56
61
  &:where(.size-m) {
57
- height: 36px;
62
+ height: 32px;
58
63
  padding: 0 10px;
59
64
 
60
65
  & .ButtonText {
61
66
  padding: 0 4px;
62
67
  }
68
+
69
+ & :is(.ButtonIcon, .Loader) {
70
+ width: 18px;
71
+ height: 18px;
72
+ }
63
73
  }
64
74
 
65
75
  &:where(.size-l) {
66
- height: 44px;
67
- padding: 0 14px;
76
+ height: 40px;
77
+ padding: 0 12px;
68
78
 
69
79
  & .ButtonText {
70
80
  padding: 0 6px;
71
81
  }
82
+
83
+ & :is(.ButtonIcon, .Loader) {
84
+ width: 20px;
85
+ height: 20px;
86
+ }
72
87
  }
73
88
 
74
89
  &:where(.size-xl) {
@@ -257,7 +272,7 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
257
272
  }
258
273
 
259
274
  &:where(.color-blue) {
260
- background-color: var(--color-fill-neutral-heaviest-hovered);
275
+ background-color: var(--color-fill-neutral-transparent-hovered);
261
276
  }
262
277
  }
263
278
 
@@ -49,10 +49,10 @@ function getIconSize(size: ButtonSize) {
49
49
  function getTypography(size: ButtonSize) {
50
50
  return (
51
51
  {
52
- xs: '13',
52
+ xs: '12',
53
53
  s: '13',
54
- m: '14',
55
- l: '15',
54
+ m: '13',
55
+ l: '14',
56
56
  xl: '18',
57
57
  } as const
58
58
  )[size]
@@ -60,6 +60,11 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
60
60
  & .ButtonText {
61
61
  padding: 0 3px;
62
62
  }
63
+
64
+ & :is(.ButtonIcon, .Loader) {
65
+ width: 14px;
66
+ height: 14px;
67
+ }
63
68
  }
64
69
 
65
70
  &:where(.size-s) {
@@ -72,21 +77,31 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
72
77
  }
73
78
 
74
79
  &:where(.size-m) {
75
- height: 36px;
80
+ height: 32px;
76
81
  padding: 0 12px;
77
82
 
78
83
  & .ButtonText {
79
84
  padding: 0 4px;
80
85
  }
86
+
87
+ & :is(.ButtonIcon, .Loader) {
88
+ width: 18px;
89
+ height: 18px;
90
+ }
81
91
  }
82
92
 
83
93
  &:where(.size-l) {
84
- height: 44px;
85
- padding: 0 14px;
94
+ height: 40px;
95
+ padding: 0 12px;
86
96
 
87
97
  & .ButtonText {
88
98
  padding: 0 6px;
89
99
  }
100
+
101
+ & :is(.ButtonIcon, .Loader) {
102
+ width: 20px;
103
+ height: 20px;
104
+ }
90
105
  }
91
106
 
92
107
  &:where(.size-xl) {
@@ -49,10 +49,10 @@ function getIconSize(size: FloatingButtonSize) {
49
49
  function getTypography(size: FloatingButtonSize) {
50
50
  return (
51
51
  {
52
- xs: '13',
52
+ xs: '12',
53
53
  s: '13',
54
- m: '14',
55
- l: '15',
54
+ m: '13',
55
+ l: '14',
56
56
  xl: '18',
57
57
  } as const
58
58
  )[size]
@@ -52,7 +52,12 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
52
52
  &:where(.size-xs) {
53
53
  @include dimension.square(20px);
54
54
 
55
- padding: 2px;
55
+ padding: 3px;
56
+
57
+ & :is(.ButtonIcon, .Loader) {
58
+ width: 14px;
59
+ height: 14px;
60
+ }
56
61
  }
57
62
 
58
63
  &:where(.size-s) {
@@ -62,15 +67,25 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
62
67
  }
63
68
 
64
69
  &:where(.size-m) {
65
- @include dimension.square(36px);
70
+ @include dimension.square(32px);
71
+
72
+ padding: 7px;
66
73
 
67
- padding: 8px;
74
+ & :is(.ButtonIcon, .Loader) {
75
+ width: 18px;
76
+ height: 18px;
77
+ }
68
78
  }
69
79
 
70
80
  &:where(.size-l) {
71
- @include dimension.square(44px);
81
+ @include dimension.square(40px);
82
+
83
+ padding: 10px;
72
84
 
73
- padding: 12px;
85
+ & :is(.ButtonIcon, .Loader) {
86
+ width: 20px;
87
+ height: 20px;
88
+ }
74
89
  }
75
90
 
76
91
  &:where(.size-xl) {
@@ -67,6 +67,7 @@ export const FloatingIconButton = forwardRef<
67
67
  <Icon
68
68
  size={getIconSize(size)}
69
69
  source={content}
70
+ className={styles.ButtonIcon}
70
71
  />
71
72
  ) : (
72
73
  content
@@ -13,7 +13,12 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
13
13
  &:where(.size-xs) {
14
14
  @include dimension.square(20px);
15
15
 
16
- padding: 2px;
16
+ padding: 3px;
17
+
18
+ & :is(.ButtonIcon, .Loader) {
19
+ width: 14px;
20
+ height: 14px;
21
+ }
17
22
  }
18
23
 
19
24
  &:where(.size-s) {
@@ -23,15 +28,25 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
23
28
  }
24
29
 
25
30
  &:where(.size-m) {
26
- @include dimension.square(36px);
31
+ @include dimension.square(32px);
32
+
33
+ padding: 7px;
27
34
 
28
- padding: 8px;
35
+ & :is(.ButtonIcon, .Loader) {
36
+ width: 18px;
37
+ height: 18px;
38
+ }
29
39
  }
30
40
 
31
41
  &:where(.size-l) {
32
- @include dimension.square(44px);
42
+ @include dimension.square(40px);
43
+
44
+ padding: 10px;
33
45
 
34
- padding: 12px;
46
+ & :is(.ButtonIcon, .Loader) {
47
+ width: 20px;
48
+ height: 20px;
49
+ }
35
50
  }
36
51
 
37
52
  &:where(.size-xl) {
@@ -18,6 +18,11 @@ $active-selector: ':where(.active, :hover):where(:not(:disabled))';
18
18
  &:where(.style-floating, .style-floating-alt) {
19
19
  padding: 0 7px;
20
20
  }
21
+
22
+ & :is(.ButtonIcon, .ButtonSpinner) {
23
+ width: 14px;
24
+ height: 14px;
25
+ }
21
26
  }
22
27
 
23
28
  &:where(.size-s) {
@@ -31,22 +36,32 @@ $active-selector: ':where(.active, :hover):where(:not(:disabled))';
31
36
  }
32
37
 
33
38
  &:where(.size-m) {
34
- min-width: 36px;
35
- height: 36px;
39
+ min-width: 32px;
40
+ height: 32px;
36
41
  padding: 0 10px;
37
42
 
38
43
  &:where(.style-floating, .style-floating-alt) {
39
44
  padding: 0 14px;
40
45
  }
46
+
47
+ & :is(.ButtonIcon, .ButtonSpinner) {
48
+ width: 18px;
49
+ height: 18px;
50
+ }
41
51
  }
42
52
 
43
53
  &:where(.size-l) {
44
- min-width: 44px;
45
- height: 44px;
54
+ min-width: 40px;
55
+ height: 40px;
46
56
  padding: 0 12px;
47
57
 
48
58
  &:where(.style-floating, .style-floating-alt) {
49
- padding: 0 18px;
59
+ padding: 0 12px;
60
+ }
61
+
62
+ & :is(.ButtonIcon, .ButtonSpinner) {
63
+ width: 20px;
64
+ height: 20px;
50
65
  }
51
66
  }
52
67
 
@@ -76,6 +91,7 @@ $active-selector: ':where(.active, :hover):where(:not(:disabled))';
76
91
  }
77
92
  }
78
93
 
94
+
79
95
  /* Color variants */
80
96
  &:where(.style-primary) {
81
97
  @each $color-variant in $chromatic-color-variants {
@@ -228,7 +244,7 @@ $active-selector: ':where(.active, :hover):where(:not(:disabled))';
228
244
  }
229
245
 
230
246
  &#{$active-selector} {
231
- background-color: var(--color-fill-neutral-heaviest-hovered);
247
+ background-color: var(--color-fill-neutral-transparent-hovered);
232
248
  }
233
249
  }
234
250
  }
@@ -22,10 +22,10 @@ export const BUTTON_TEST_ID = 'bezier-button'
22
22
  function getTypography(size: ButtonSize) {
23
23
  return (
24
24
  {
25
- xs: '13',
25
+ xs: '12',
26
26
  s: '13',
27
- m: '14',
28
- l: '15',
27
+ m: '13',
28
+ l: '14',
29
29
  xl: '18',
30
30
  } as const
31
31
  )[size]
@@ -161,7 +161,10 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
161
161
 
162
162
  {loading && (
163
163
  <div className={styles.ButtonLoader}>
164
- <Spinner size={getSpinnerSize(size)} />
164
+ <Spinner
165
+ size={getSpinnerSize(size)}
166
+ className={styles.ButtonSpinner}
167
+ />
165
168
  </div>
166
169
  )}
167
170
  </Comp>