@channel.io/bezier-react 2.4.0 → 2.5.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/dist/cjs/components/LegacyIcon/utils.js +3 -1
- package/dist/cjs/components/LegacyIcon/utils.js.map +1 -1
- package/dist/cjs/components/ListItem/ListItem.js +2 -1
- package/dist/cjs/components/ListItem/ListItem.js.map +1 -1
- package/dist/cjs/components/ListItem/ListItem.module.scss.js +1 -1
- package/dist/cjs/styles.css +1 -1
- package/dist/cjs/types/props-helpers.js +4 -0
- package/dist/cjs/types/props-helpers.js.map +1 -1
- package/dist/esm/components/LegacyIcon/utils.mjs +3 -1
- package/dist/esm/components/LegacyIcon/utils.mjs.map +1 -1
- package/dist/esm/components/ListItem/ListItem.mjs +2 -1
- package/dist/esm/components/ListItem/ListItem.mjs.map +1 -1
- package/dist/esm/components/ListItem/ListItem.module.scss.mjs +1 -1
- package/dist/esm/styles.css +1 -1
- package/dist/esm/types/props-helpers.mjs +4 -0
- package/dist/esm/types/props-helpers.mjs.map +1 -1
- package/dist/types/components/LegacyIcon/utils.d.ts.map +1 -1
- package/dist/types/components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/types/types/props-helpers.d.ts +3 -2
- package/dist/types/types/props-helpers.d.ts.map +1 -1
- package/dist/types/types/props.d.ts +7 -2
- package/dist/types/types/props.d.ts.map +1 -1
- package/package.json +5 -2
- package/src/components/AlphaAvatar/Avatar.figma.tsx +65 -0
- package/src/components/AlphaAvatarGroup/AvatarGroup.figma.tsx +37 -0
- package/src/components/AlphaButton/Button.figma.tsx +55 -0
- package/src/components/AlphaFloatingButton/FloatingButton.figma.tsx +53 -0
- package/src/components/AlphaFloatingIconButton/FloatingIconButton.figma.tsx +49 -0
- package/src/components/AlphaIconButton/IconButton.figma.tsx +56 -0
- package/src/components/AlphaStatusBadge/StatusBadge.figma.tsx +27 -0
- package/src/components/LegacyIcon/utils.ts +3 -2
- package/src/components/ListItem/ListItem.module.scss +6 -4
- package/src/components/ListItem/ListItem.tsx +2 -0
- package/src/components/Slider/Slider.stories.tsx +26 -12
- package/src/styles/components/layout.module.scss +4 -0
- package/src/types/props-helpers.ts +4 -0
- package/src/types/props.ts +7 -2
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import { type Meta } from '@storybook/react'
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/react'
|
|
2
2
|
|
|
3
3
|
import { Slider } from './Slider'
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof Slider> = {
|
|
6
6
|
component: Slider,
|
|
7
7
|
argTypes: {
|
|
8
|
-
value: {
|
|
9
|
-
control: {
|
|
10
|
-
type: 'object',
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
8
|
minStepsBetweenThumbs: {
|
|
14
9
|
control: {
|
|
15
10
|
type: 'number',
|
|
@@ -21,15 +16,21 @@ const meta: Meta<typeof Slider> = {
|
|
|
21
16
|
onValueCommit: {
|
|
22
17
|
action: 'onValueCommit',
|
|
23
18
|
},
|
|
19
|
+
value: {
|
|
20
|
+
if: {
|
|
21
|
+
exists: true,
|
|
22
|
+
arg: 'value',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
defaultValue: {
|
|
26
|
+
if: {
|
|
27
|
+
exists: true,
|
|
28
|
+
arg: 'defaultValue',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
24
31
|
},
|
|
25
|
-
}
|
|
26
|
-
export default meta
|
|
27
|
-
|
|
28
|
-
export const Primary = {
|
|
29
32
|
args: {
|
|
30
33
|
width: 285,
|
|
31
|
-
defaultValue: [5],
|
|
32
|
-
value: undefined,
|
|
33
34
|
disabled: false,
|
|
34
35
|
guide: [5],
|
|
35
36
|
min: 0,
|
|
@@ -38,3 +39,16 @@ export const Primary = {
|
|
|
38
39
|
disableTooltip: false,
|
|
39
40
|
},
|
|
40
41
|
}
|
|
42
|
+
export default meta
|
|
43
|
+
|
|
44
|
+
export const Primary = {
|
|
45
|
+
args: {
|
|
46
|
+
value: [5],
|
|
47
|
+
},
|
|
48
|
+
} satisfies StoryObj<typeof meta>
|
|
49
|
+
|
|
50
|
+
export const Uncontrolled = {
|
|
51
|
+
args: {
|
|
52
|
+
defaultValue: [5],
|
|
53
|
+
},
|
|
54
|
+
} satisfies StoryObj<typeof meta>
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
--b-right: var(--b-inset);
|
|
18
18
|
--b-bottom: var(--b-inset);
|
|
19
19
|
--b-left: var(--b-inset);
|
|
20
|
+
--b-basis: initial;
|
|
20
21
|
--b-shrink: initial;
|
|
21
22
|
--b-grow: initial;
|
|
22
23
|
--b-background-color: initial;
|
|
@@ -29,8 +30,11 @@
|
|
|
29
30
|
|
|
30
31
|
inset: var(--b-top) var(--b-right) var(--b-bottom) var(--b-left);
|
|
31
32
|
|
|
33
|
+
/* stylelint-disable declaration-block-no-redundant-longhand-properties */
|
|
34
|
+
flex-basis: var(--b-basis);
|
|
32
35
|
flex-grow: var(--b-grow);
|
|
33
36
|
flex-shrink: var(--b-shrink);
|
|
37
|
+
/* stylelint-enable declaration-block-no-redundant-longhand-properties */
|
|
34
38
|
|
|
35
39
|
box-sizing: border-box;
|
|
36
40
|
width: var(--b-width);
|
|
@@ -60,6 +60,7 @@ export const splitByLayoutProps = <Props extends LayoutProps>({
|
|
|
60
60
|
right,
|
|
61
61
|
bottom,
|
|
62
62
|
left,
|
|
63
|
+
basis,
|
|
63
64
|
shrink,
|
|
64
65
|
grow,
|
|
65
66
|
backgroundColor,
|
|
@@ -97,6 +98,7 @@ export const splitByLayoutProps = <Props extends LayoutProps>({
|
|
|
97
98
|
right,
|
|
98
99
|
bottom,
|
|
99
100
|
left,
|
|
101
|
+
basis,
|
|
100
102
|
shrink,
|
|
101
103
|
grow,
|
|
102
104
|
backgroundColor,
|
|
@@ -169,6 +171,7 @@ export const getLayoutStyles = ({
|
|
|
169
171
|
right,
|
|
170
172
|
bottom,
|
|
171
173
|
left,
|
|
174
|
+
basis,
|
|
172
175
|
shrink,
|
|
173
176
|
grow,
|
|
174
177
|
backgroundColor,
|
|
@@ -204,6 +207,7 @@ export const getLayoutStyles = ({
|
|
|
204
207
|
'--b-right': cssDimension(right),
|
|
205
208
|
'--b-bottom': cssDimension(bottom),
|
|
206
209
|
'--b-left': cssDimension(left),
|
|
210
|
+
'--b-basis': cssDimension(basis),
|
|
207
211
|
'--b-shrink': shrink,
|
|
208
212
|
'--b-grow': grow,
|
|
209
213
|
'--b-background-color': tokenCssVar(backgroundColor),
|
package/src/types/props.ts
CHANGED
|
@@ -342,12 +342,17 @@ export interface LayoutProps {
|
|
|
342
342
|
*/
|
|
343
343
|
left?: React.CSSProperties['left']
|
|
344
344
|
/**
|
|
345
|
-
* the flex-
|
|
345
|
+
* the flex-basis value of a flex item.
|
|
346
|
+
* @default initial
|
|
347
|
+
*/
|
|
348
|
+
basis?: React.CSSProperties['flexBasis']
|
|
349
|
+
/**
|
|
350
|
+
* the flex-shrink value of a flex item.
|
|
346
351
|
* @default initial
|
|
347
352
|
*/
|
|
348
353
|
shrink?: React.CSSProperties['flexShrink']
|
|
349
354
|
/**
|
|
350
|
-
* the flex-grow
|
|
355
|
+
* the flex-grow value of a flex item.
|
|
351
356
|
* @default initial
|
|
352
357
|
*/
|
|
353
358
|
grow?: React.CSSProperties['flexGrow']
|