@itcase/ui 1.2.19 → 1.2.20
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/Accordion.js +3 -2
- package/dist/cjs/components/Choice.js +1 -1
- package/dist/cjs/components/InputPassword.js +6 -6
- package/dist/cjs/components/Radio.js +85 -8
- package/dist/cjs/components/Switch.js +12 -8
- package/dist/cjs/components/Tile.js +3 -3
- package/dist/cjs/constants/componentProps/textColor.js +1 -1
- package/dist/cjs/constants/componentProps/textColorHover.js +1 -1
- package/dist/components/Accordion.js +3 -2
- package/dist/components/Choice.js +1 -1
- package/dist/components/InputPassword.js +6 -6
- package/dist/components/Radio.js +86 -5
- package/dist/components/Switch.js +12 -4
- package/dist/components/Tile.js +3 -3
- package/dist/constants/componentProps/textColor.js +1 -1
- package/dist/constants/componentProps/textColorHover.js +1 -1
- package/dist/css/components/Accordion/Accordion.css +1 -0
- package/dist/css/components/DatePicker/DatePicker.css +12 -12
- package/dist/css/components/Icon/Icon.css +4 -2
- package/dist/css/mixins/mixin_elevation.css +0 -2
- package/dist/css/mixins/mixin_typography.css +104 -84
- package/dist/css/mixins/mixin_utils.css +1 -1
- package/dist/css/styles/border-color/border-color.css +4 -2
- package/dist/css/styles/text-gradient/text-gradient.css +9 -4
- package/dist/css/tokens/colors.css +105 -0
- package/dist/css/tokens/elevation.css +10 -0
- package/dist/css/tokens/settings.css +31 -0
- package/dist/css/tokens/typography.css +127 -0
- package/dist/stories/Accordion.mdx +11 -0
- package/dist/stories/Accordion.stories.js +49 -32
- package/dist/stories/AccordionItem.mdx +15 -0
- package/dist/stories/AccordionItem.stories.js +69 -69
- package/dist/stories/AlignContent.mdx +85 -0
- package/dist/stories/AlignItems.mdx +74 -0
- package/dist/stories/AlignItems.stories.js +88 -0
- package/dist/stories/AlignSelf.mdx +85 -0
- package/dist/stories/AlignSelf.stories.js +101 -0
- package/dist/stories/Appearance.mdx +24 -9
- package/dist/stories/Appearance.stories.js +77 -23
- package/dist/stories/Avatar.mdx +23 -0
- package/dist/stories/Avatar.stories.js +69 -64
- package/dist/stories/Badge.mdx +20 -0
- package/dist/stories/Badge.stories.js +43 -44
- package/dist/stories/Button.mdx +48 -0
- package/dist/stories/Button.stories.js +26 -186
- package/dist/stories/Cell.mdx +23 -0
- package/dist/stories/Cell.stories.js +119 -119
- package/dist/stories/Checkbox.mdx +24 -0
- package/dist/stories/Checkbox.stories.js +42 -34
- package/dist/stories/Chips.mdx +31 -0
- package/dist/stories/Chips.stories.js +22 -67
- package/dist/stories/Choice.mdx +11 -0
- package/dist/stories/Choice.stories.js +59 -61
- package/dist/stories/Code.mdx +11 -0
- package/dist/stories/Code.stories.js +37 -40
- package/dist/stories/Columns.mdx +51 -0
- package/dist/stories/Columns.stories.js +80 -0
- package/dist/stories/DatePicker.mdx +31 -0
- package/dist/stories/DatePicker.stories.js +58 -59
- package/dist/stories/Dev.mdx +9 -0
- package/dist/stories/DevMode.mdx +8 -0
- package/dist/stories/Direction.mdx +84 -0
- package/dist/stories/Direction.stories.js +93 -0
- package/dist/stories/Divider.mdx +35 -0
- package/dist/stories/Divider.stories.js +28 -29
- package/dist/stories/Dot.mdx +19 -0
- package/dist/stories/Dot.stories.js +38 -39
- package/dist/stories/Drawer.mdx +11 -0
- package/dist/stories/Drawer.stories.js +75 -0
- package/dist/stories/Dropdown.mdx +12 -0
- package/dist/stories/Dropdown.stories.js +30 -29
- package/dist/stories/DropdownItem.mdx +19 -0
- package/dist/stories/DropdownItem.stories.js +76 -78
- package/dist/stories/Flex.stories.js +47 -0
- package/dist/stories/FlexAlignContent.stories.js +102 -0
- package/dist/stories/FlexAlignItems.stories.js +91 -0
- package/dist/stories/FlexAlignSelf.stories.js +97 -0
- package/dist/stories/FlexDirection.stories.js +112 -0
- package/dist/stories/FlexGrow.stories.js +69 -0
- package/dist/stories/FlexJustifyContent.stories.js +98 -0
- package/dist/stories/FlexOrder.stories.js +76 -0
- package/dist/stories/FlexWrap.stories.js +89 -0
- package/dist/stories/Grid.stories.js +202 -0
- package/dist/stories/Group.mdx +9 -0
- package/dist/stories/{Tab.group.stories.js → Group.stories.js} +60 -56
- package/dist/stories/Grow.mdx +40 -0
- package/dist/stories/Icon.mdx +15 -0
- package/dist/stories/Icon.stories.js +84 -82
- package/dist/stories/Image.mdx +15 -0
- package/dist/stories/Image.stories.js +134 -0
- package/dist/stories/Input.mdx +31 -0
- package/dist/stories/Input.stories.js +26 -26
- package/dist/stories/InputPassword.mdx +15 -0
- package/dist/stories/InputPassword.stories.js +32 -34
- package/dist/stories/JustifyContent.mdx +89 -0
- package/dist/stories/JustifyContent.stories.js +96 -0
- package/dist/stories/Label.mdx +31 -0
- package/dist/stories/Label.stories.js +63 -53
- package/dist/stories/Loader.mdx +31 -0
- package/dist/stories/Loader.stories.js +26 -28
- package/dist/stories/Logo.mdx +19 -0
- package/dist/stories/Logo.stories.js +28 -28
- package/dist/stories/MenuItem.mdx +15 -0
- package/dist/stories/MenuItem.stories.js +156 -91
- package/dist/stories/Message.mdx +12 -0
- package/dist/stories/Message.stories.js +34 -0
- package/dist/stories/ModalConfirm.stories.js +48 -47
- package/dist/stories/ModalDefault.stories.js +21 -20
- package/dist/stories/Notification.mdx +23 -0
- package/dist/stories/Notification.stories.js +24 -47
- package/dist/stories/Order.mdx +52 -0
- package/dist/stories/Overview.mdx +1 -2
- package/dist/stories/Pagination.mdx +11 -0
- package/dist/stories/Pagination.stories.js +24 -27
- package/dist/stories/Playground.mdx +1 -2
- package/dist/stories/Radio.mdx +29 -0
- package/dist/stories/Radio.stories.js +32 -33
- package/dist/stories/Response.mdx +18 -0
- package/dist/stories/Response.stories.js +66 -0
- package/dist/stories/SearchInput.mdx +19 -0
- package/dist/stories/{Search-input.stories.js → SearchInput.stories.js} +79 -62
- package/dist/stories/Segmented.mdx +11 -0
- package/dist/stories/Segmented.stories.js +49 -50
- package/dist/stories/Select.stories.js +155 -155
- package/dist/stories/Size.mdx +35 -0
- package/dist/stories/Size.stories.js +101 -0
- package/dist/stories/Skeleton.mdx +9 -0
- package/dist/stories/State.mdx +19 -0
- package/dist/stories/State.stories.js +70 -0
- package/dist/stories/Switch.mdx +23 -0
- package/dist/stories/Switch.stories.js +23 -23
- package/dist/stories/Text.mdx +35 -0
- package/dist/stories/Text.stories.js +172 -0
- package/dist/stories/Textarea.mdx +15 -0
- package/dist/stories/Textarea.stories.js +27 -27
- package/dist/stories/Tile.mdx +19 -0
- package/dist/stories/Tile.stories.js +111 -96
- package/dist/stories/Title.mdx +31 -0
- package/dist/stories/Title.stories.js +168 -0
- package/dist/stories/Tooltip.mdx +19 -0
- package/dist/stories/Tooltip.stories.js +164 -0
- package/dist/stories/WithTooltip.mdx +9 -0
- package/dist/stories/Wrap.mdx +52 -0
- package/dist/stories/Wrap.stories.js +74 -0
- package/dist/types/components/Accordion/Accordion.interface.d.ts +4 -0
- package/dist/types/components/Choice/Choice.interface.d.ts +0 -2
- package/dist/types/components/InputPassword/InputPassword.interface.d.ts +10 -8
- package/dist/types/components/Tile/Tile.d.ts +1 -1
- package/dist/types/components/Tile/Tile.interface.d.ts +3 -1
- package/dist/types/config/forms/datepicker.d.ts +18 -0
- package/dist/types/config/forms/index.d.ts +4 -0
- package/dist/types/config/forms/input.d.ts +14 -0
- package/dist/types/config/forms/select.d.ts +50 -0
- package/package.json +29 -35
- package/dist/Radio-BQo97TZL.js +0 -89
- package/dist/Radio-oMf0vN7T.js +0 -86
- package/dist/Switch-B5yVEqxz.js +0 -14
- package/dist/Switch-DEXsrPCo.js +0 -12
- package/dist/cjs/components/FormField.js +0 -122
- package/dist/components/FormField.js +0 -116
- package/dist/css/mixins/mixin.css +0 -78
- package/dist/stories/FormFieldCheckbox.stories.js +0 -77
- package/dist/stories/FormFieldChoice.stories.js +0 -75
- package/dist/stories/FormFieldDatepicker.stories.js +0 -51
- package/dist/stories/FormFieldFileInput.stories.js +0 -58
- package/dist/stories/FormFieldInput.stories.js +0 -66
- package/dist/stories/FormFieldInputPassword.stories.js +0 -66
- package/dist/stories/FormFieldMultiBadgeSelect.stories.js +0 -132
- package/dist/stories/FormFieldMultiSelect.stories.js +0 -127
- package/dist/stories/FormFieldSelect.stories.js +0 -99
- package/dist/stories/FormFieldSelectGroup.stories.js +0 -84
- package/dist/stories/NotFound.stories.js +0 -93
- package/dist/stories/Tab.appearance.stories.js +0 -260
- package/dist/stories/Tab.size.stories.js +0 -259
- package/dist/stories/Tab.state.stories.js +0 -227
- package/dist/types/components/FormField/ChoiceField.d.ts +0 -8
- package/dist/types/components/FormField/FormField.d.ts +0 -9
- package/dist/types/components/FormField/FormFiled.interface.d.ts +0 -77
- package/dist/types/components/FormField/PasswordField.d.ts +0 -9
- package/dist/types/components/FormField/SelectField.d.ts +0 -9
- package/dist/types/components/FormField/SwitchField.d.ts +0 -8
- package/dist/types/components/FormField/index.d.ts +0 -6
|
@@ -1,201 +1,34 @@
|
|
|
1
|
-
import { Badge, badgeConfig } from '@itcase/ui/components/Badge'
|
|
2
|
-
import { Button, buttonConfig } from '@itcase/ui/components/Button'
|
|
3
|
-
import {
|
|
4
|
-
borderColorProps,
|
|
5
|
-
borderTypeProps,
|
|
6
|
-
fillProps,
|
|
7
|
-
itemColorProps,
|
|
8
|
-
shapeProps,
|
|
9
|
-
sizeProps,
|
|
10
|
-
sizePXProps,
|
|
11
|
-
textColorHoverProps,
|
|
12
|
-
textColorProps,
|
|
13
|
-
textSizeProps,
|
|
14
|
-
textWrapProps,
|
|
15
|
-
widthProps,
|
|
16
|
-
} from '@itcase/ui/constants'
|
|
17
|
-
|
|
18
|
-
import badgeAppearance from 'src/components/Badge/appearance.json'
|
|
19
|
-
import buttonAppearance from 'src/components/Button/appearance.json'
|
|
20
1
|
import { icon24 } from '../../../icons'
|
|
2
|
+
import { Badge, badgeConfig } from '../../Badge'
|
|
3
|
+
import badgeAppearance from '../../Badge/appearance.json'
|
|
4
|
+
import buttonAppearance from '../../Button/appearance.json'
|
|
5
|
+
import { Button, buttonConfig } from '../Button'
|
|
6
|
+
import { argTypes } from './args'
|
|
21
7
|
|
|
22
8
|
badgeConfig.setAppearance(badgeAppearance)
|
|
23
9
|
buttonConfig.setAppearance(buttonAppearance)
|
|
24
10
|
|
|
25
11
|
export default {
|
|
26
|
-
title: 'Atoms / Button',
|
|
27
|
-
component: Button,
|
|
28
|
-
parameters: {
|
|
29
|
-
// controls: { exclude: ['textColor', 'textColorHover'] },
|
|
30
|
-
},
|
|
31
|
-
argTypes: {
|
|
32
|
-
advancedProps: { control: 'boolean' },
|
|
33
|
-
after: {
|
|
34
|
-
if: { arg: 'advancedProps' },
|
|
35
|
-
},
|
|
36
|
-
className: {
|
|
37
|
-
if: { arg: 'advancedProps' },
|
|
38
|
-
},
|
|
39
|
-
href: {
|
|
40
|
-
if: { arg: 'advancedProps' },
|
|
41
|
-
},
|
|
42
|
-
link: {
|
|
43
|
-
if: { arg: 'advancedProps' },
|
|
44
|
-
},
|
|
45
|
-
before: {
|
|
46
|
-
if: { arg: 'advancedProps' },
|
|
47
|
-
},
|
|
48
|
-
rel: {
|
|
49
|
-
if: { arg: 'advancedProps' },
|
|
50
|
-
},
|
|
51
|
-
htmlType: {
|
|
52
|
-
if: { arg: 'advancedProps' },
|
|
53
|
-
},
|
|
54
|
-
children: {
|
|
55
|
-
if: { arg: 'advancedProps' },
|
|
56
|
-
},
|
|
57
|
-
target: {
|
|
58
|
-
if: { arg: 'advancedProps' },
|
|
59
|
-
},
|
|
60
|
-
dataTour: {
|
|
61
|
-
if: { arg: 'advancedProps' },
|
|
62
|
-
},
|
|
63
|
-
onClick: {
|
|
64
|
-
if: { arg: 'advancedProps' },
|
|
65
|
-
},
|
|
66
|
-
onMouseDown: {
|
|
67
|
-
if: { arg: 'advancedProps' },
|
|
68
|
-
},
|
|
69
|
-
appearance: {
|
|
70
|
-
options: [
|
|
71
|
-
null,
|
|
72
|
-
'dev',
|
|
73
|
-
'accent',
|
|
74
|
-
'primary',
|
|
75
|
-
'secondary',
|
|
76
|
-
'surfacePrimary',
|
|
77
|
-
'surfaceSecondary',
|
|
78
|
-
'surfaceTertiary',
|
|
79
|
-
'surfaceDisabled',
|
|
80
|
-
],
|
|
81
|
-
control: 'inline-radio',
|
|
82
|
-
},
|
|
83
|
-
width: {
|
|
84
|
-
options: widthProps,
|
|
85
|
-
control: 'inline-radio',
|
|
86
|
-
},
|
|
87
|
-
size: {
|
|
88
|
-
options: sizeProps,
|
|
89
|
-
control: 'inline-radio',
|
|
90
|
-
},
|
|
91
|
-
fill: {
|
|
92
|
-
options: fillProps,
|
|
93
|
-
control: 'select',
|
|
94
|
-
},
|
|
95
|
-
labelTextWrap: {
|
|
96
|
-
options: textWrapProps,
|
|
97
|
-
control: 'inline-radio',
|
|
98
|
-
if: { arg: 'advancedProps' },
|
|
99
|
-
},
|
|
100
|
-
borderColor: {
|
|
101
|
-
options: borderColorProps,
|
|
102
|
-
control: 'select',
|
|
103
|
-
},
|
|
104
|
-
borderType: {
|
|
105
|
-
options: borderTypeProps,
|
|
106
|
-
control: 'inline-radio',
|
|
107
|
-
},
|
|
108
|
-
loading: {
|
|
109
|
-
control: 'boolean',
|
|
110
|
-
if: { arg: 'advancedProps' },
|
|
111
|
-
},
|
|
112
|
-
labelTextSize: {
|
|
113
|
-
options: textSizeProps,
|
|
114
|
-
control: 'inline-radio',
|
|
115
|
-
},
|
|
116
|
-
labelTextColor: {
|
|
117
|
-
options: textColorProps,
|
|
118
|
-
control: 'select',
|
|
119
|
-
},
|
|
120
|
-
labelTextColorHover: {
|
|
121
|
-
options: textColorHoverProps,
|
|
122
|
-
control: 'select',
|
|
123
|
-
},
|
|
124
|
-
shape: {
|
|
125
|
-
options: shapeProps,
|
|
126
|
-
control: 'inline-radio',
|
|
127
|
-
},
|
|
128
|
-
isDisabled: {
|
|
129
|
-
control: 'boolean',
|
|
130
|
-
if: { arg: 'advancedProps' },
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
loaderFill: {
|
|
134
|
-
options: fillProps,
|
|
135
|
-
control: 'select',
|
|
136
|
-
if: { arg: 'loader', eq: null },
|
|
137
|
-
},
|
|
138
|
-
loaderItemFill: {
|
|
139
|
-
options: itemColorProps,
|
|
140
|
-
control: 'select',
|
|
141
|
-
if: { arg: 'loader', eq: null },
|
|
142
|
-
},
|
|
143
|
-
loaderSet: {
|
|
144
|
-
control: 'text',
|
|
145
|
-
if: { arg: 'loader', eq: null },
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
iconSrc: {
|
|
149
|
-
control: 'radio',
|
|
150
|
-
options: [null, 'assets/24/SignOut.svg'],
|
|
151
|
-
},
|
|
152
|
-
iconFill: {
|
|
153
|
-
options: fillProps,
|
|
154
|
-
control: 'select',
|
|
155
|
-
if: { arg: 'iconSrc', neq: null },
|
|
156
|
-
},
|
|
157
|
-
iconSize: {
|
|
158
|
-
options: sizePXProps,
|
|
159
|
-
control: 'select',
|
|
160
|
-
if: { arg: 'iconSrc', neq: null },
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
iconAfterSrc: {
|
|
164
|
-
control: 'radio',
|
|
165
|
-
options: [null, 'assets/24/ChevronRight.svg'],
|
|
166
|
-
},
|
|
167
|
-
iconAfterFill: {
|
|
168
|
-
options: fillProps,
|
|
169
|
-
control: 'select',
|
|
170
|
-
if: { arg: 'iconAfterSrc', neq: null },
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
iconBeforeSrc: {
|
|
174
|
-
control: 'radio',
|
|
175
|
-
options: [null, 'assets/24/ChevronLeft.svg'],
|
|
176
|
-
},
|
|
177
|
-
iconBeforeFill: {
|
|
178
|
-
options: fillProps,
|
|
179
|
-
control: 'select',
|
|
180
|
-
if: { arg: 'iconBeforeSrc', neq: null },
|
|
181
|
-
},
|
|
182
|
-
Badge: {
|
|
183
|
-
control: 'select',
|
|
184
|
-
options: [null, <Badge appearance="secondary" size="xs" textSize="xxs" value={3} />],
|
|
185
|
-
},
|
|
186
|
-
type: {
|
|
187
|
-
if: { arg: 'advancedProps' },
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
12
|
args: {
|
|
191
13
|
appearance: 'accent',
|
|
14
|
+
iconSrc: null,
|
|
192
15
|
label: 'Button',
|
|
193
16
|
shape: 'rounded',
|
|
194
|
-
iconSrc: null,
|
|
195
17
|
},
|
|
18
|
+
argTypes: {
|
|
19
|
+
...argTypes,
|
|
20
|
+
},
|
|
21
|
+
component: Button,
|
|
22
|
+
title: 'Atoms / Button',
|
|
196
23
|
}
|
|
197
24
|
|
|
198
|
-
export const Default = {
|
|
25
|
+
export const Default = {
|
|
26
|
+
args: {
|
|
27
|
+
labelTextSize: 'm',
|
|
28
|
+
shape: 'rounded',
|
|
29
|
+
size: 'm',
|
|
30
|
+
},
|
|
31
|
+
}
|
|
199
32
|
|
|
200
33
|
export const Accent = {
|
|
201
34
|
args: {
|
|
@@ -265,7 +98,14 @@ export const IconAfter = {
|
|
|
265
98
|
export const WithBadge = {
|
|
266
99
|
args: {
|
|
267
100
|
...Default.args,
|
|
268
|
-
shape: 'rounded',
|
|
269
101
|
Badge: <Badge appearance="primary" size="m" textSize="m" value={3} />,
|
|
102
|
+
shape: 'rounded',
|
|
103
|
+
},
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export const Dev = {
|
|
107
|
+
args: {
|
|
108
|
+
...Default.args,
|
|
109
|
+
appearance: 'dev',
|
|
270
110
|
},
|
|
271
111
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
import * as CellStories from './Cell.stories.js'
|
|
4
|
+
|
|
5
|
+
<Meta of={CellStories} />
|
|
6
|
+
|
|
7
|
+
# Cell
|
|
8
|
+
|
|
9
|
+
## Horizontal
|
|
10
|
+
|
|
11
|
+
<Canvas sourceState="shown" of={CellStories.Horizontal} />
|
|
12
|
+
|
|
13
|
+
## Vertical
|
|
14
|
+
|
|
15
|
+
<Canvas sourceState="shown" of={CellStories.Vertical} />
|
|
16
|
+
|
|
17
|
+
## WithLabels
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={CellStories.WithLabels} />
|
|
20
|
+
|
|
21
|
+
## WithIcons
|
|
22
|
+
|
|
23
|
+
<Canvas sourceState="shown" of={CellStories.WithIcons} />
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Cell } from '@itcase/ui/components/Cell'
|
|
2
1
|
import {
|
|
3
2
|
fillHoverProps,
|
|
4
3
|
fillProps,
|
|
@@ -10,24 +9,22 @@ import {
|
|
|
10
9
|
textWeightProps,
|
|
11
10
|
textWrapProps,
|
|
12
11
|
widthProps,
|
|
13
|
-
} from '
|
|
12
|
+
} from '../../../constants'
|
|
13
|
+
import { Cell } from '../Cell'
|
|
14
14
|
|
|
15
15
|
export default {
|
|
16
|
-
title: 'Atoms / Cell',
|
|
17
|
-
component: Cell,
|
|
18
16
|
argTypes: {
|
|
19
|
-
advancedProps: { control: 'boolean' },
|
|
20
|
-
after: {
|
|
21
|
-
if: { arg: 'advancedProps' },
|
|
22
|
-
},
|
|
23
|
-
before: {
|
|
24
|
-
if: { arg: 'advancedProps' },
|
|
25
|
-
},
|
|
26
17
|
children: {
|
|
27
18
|
if: { arg: 'advancedProps' },
|
|
28
19
|
},
|
|
29
|
-
|
|
20
|
+
width: {
|
|
21
|
+
control: 'inline-radio',
|
|
30
22
|
if: { arg: 'advancedProps' },
|
|
23
|
+
options: widthProps,
|
|
24
|
+
},
|
|
25
|
+
direction: {
|
|
26
|
+
control: 'inline-radio',
|
|
27
|
+
options: ['vertical', 'horizontal'],
|
|
31
28
|
},
|
|
32
29
|
isActive: {
|
|
33
30
|
if: { arg: 'advancedProps' },
|
|
@@ -35,62 +32,68 @@ export default {
|
|
|
35
32
|
isDisabled: {
|
|
36
33
|
if: { arg: 'advancedProps' },
|
|
37
34
|
},
|
|
38
|
-
|
|
35
|
+
advancedProps: { control: 'boolean' },
|
|
36
|
+
after: {
|
|
39
37
|
if: { arg: 'advancedProps' },
|
|
40
38
|
},
|
|
41
|
-
|
|
39
|
+
before: {
|
|
42
40
|
if: { arg: 'advancedProps' },
|
|
43
41
|
},
|
|
44
|
-
|
|
45
|
-
zeroGap: { control: 'boolean' },
|
|
46
|
-
reverse: { control: 'boolean' },
|
|
47
|
-
size: {
|
|
48
|
-
options: [null, 's', 'm', 'l', 'xl'],
|
|
49
|
-
control: 'inline-radio',
|
|
50
|
-
},
|
|
51
|
-
width: {
|
|
52
|
-
options: widthProps,
|
|
53
|
-
control: 'inline-radio',
|
|
42
|
+
className: {
|
|
54
43
|
if: { arg: 'advancedProps' },
|
|
55
44
|
},
|
|
56
|
-
direction: {
|
|
57
|
-
options: ['vertical', 'horizontal'],
|
|
58
|
-
control: 'inline-radio',
|
|
59
|
-
},
|
|
60
45
|
fill: {
|
|
61
|
-
options: fillProps,
|
|
62
46
|
control: 'select',
|
|
47
|
+
options: fillProps,
|
|
63
48
|
},
|
|
64
49
|
fillHover: {
|
|
50
|
+
control: 'select',
|
|
65
51
|
options: fillHoverProps,
|
|
52
|
+
},
|
|
53
|
+
mode: {
|
|
54
|
+
control: 'inline-radio',
|
|
55
|
+
options: [null, 'skeleton'],
|
|
56
|
+
},
|
|
57
|
+
reverse: { control: 'boolean' },
|
|
58
|
+
showTitleLabel: { control: 'boolean' },
|
|
59
|
+
showValueLabel: { control: 'boolean' },
|
|
60
|
+
size: {
|
|
61
|
+
control: 'inline-radio',
|
|
62
|
+
options: [null, 's', 'm', 'l', 'xl'],
|
|
63
|
+
},
|
|
64
|
+
titleIconFill: {
|
|
66
65
|
control: 'select',
|
|
66
|
+
if: { arg: 'titleIconSrc' },
|
|
67
|
+
options: fillProps,
|
|
67
68
|
},
|
|
68
69
|
|
|
69
70
|
// titleText
|
|
70
71
|
|
|
71
|
-
|
|
72
|
-
options: textSizeProps,
|
|
72
|
+
titleIconFillSize: {
|
|
73
73
|
control: 'inline-radio',
|
|
74
|
+
if: { arg: 'titleIconSrc' },
|
|
75
|
+
options: iconFillSizeProps,
|
|
74
76
|
},
|
|
75
|
-
|
|
76
|
-
options: textColorProps,
|
|
77
|
+
titleIconItemFill: {
|
|
77
78
|
control: 'select',
|
|
79
|
+
if: { arg: 'titleIconSrc' },
|
|
80
|
+
options: fillProps,
|
|
78
81
|
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
titleIconShape: {
|
|
83
|
+
control: 'inline-radio',
|
|
84
|
+
if: { arg: 'titleIconSrc' },
|
|
85
|
+
options: shapeProps,
|
|
83
86
|
},
|
|
84
|
-
|
|
85
|
-
options: textWrapProps,
|
|
87
|
+
titleIconSrc: {
|
|
86
88
|
control: 'inline-radio',
|
|
87
|
-
|
|
89
|
+
options: [null, 'assets/24/ChevronTop.svg'],
|
|
88
90
|
},
|
|
89
91
|
|
|
90
92
|
// titleLabel
|
|
91
93
|
|
|
92
|
-
showTitleLabel: { control: 'boolean' },
|
|
93
94
|
titleLabelAppearance: {
|
|
95
|
+
control: 'inline-radio',
|
|
96
|
+
if: { arg: 'showTitleLabel' },
|
|
94
97
|
options: [
|
|
95
98
|
null,
|
|
96
99
|
'accent',
|
|
@@ -100,77 +103,73 @@ export default {
|
|
|
100
103
|
'surfaceSecondary',
|
|
101
104
|
'surfaceTertiary',
|
|
102
105
|
],
|
|
103
|
-
control: 'inline-radio',
|
|
104
|
-
if: { arg: 'showTitleLabel' },
|
|
105
|
-
},
|
|
106
|
-
titleLabelTextSize: {
|
|
107
|
-
options: textSizeProps,
|
|
108
|
-
control: 'inline-radio',
|
|
109
|
-
if: { arg: 'showTitleLabel' },
|
|
110
106
|
},
|
|
111
107
|
titleLabelShape: {
|
|
112
|
-
options: shapeProps,
|
|
113
108
|
control: 'inline-radio',
|
|
114
109
|
if: { arg: 'showTitleLabel' },
|
|
110
|
+
options: shapeProps,
|
|
115
111
|
},
|
|
116
112
|
titleLabelSize: {
|
|
113
|
+
control: 'inline-radio',
|
|
114
|
+
if: { arg: 'showTitleLabel' },
|
|
117
115
|
options: sizeProps,
|
|
116
|
+
},
|
|
117
|
+
titleLabelTextSize: {
|
|
118
118
|
control: 'inline-radio',
|
|
119
119
|
if: { arg: 'showTitleLabel' },
|
|
120
|
+
options: textSizeProps,
|
|
121
|
+
},
|
|
122
|
+
titleTextColor: {
|
|
123
|
+
control: 'select',
|
|
124
|
+
options: textColorProps,
|
|
120
125
|
},
|
|
121
126
|
|
|
122
127
|
// titleIcon
|
|
123
128
|
|
|
124
|
-
|
|
125
|
-
options: [null, 'assets/24/ChevronTop.svg'],
|
|
129
|
+
titleTextSize: {
|
|
126
130
|
control: 'inline-radio',
|
|
131
|
+
options: textSizeProps,
|
|
127
132
|
},
|
|
128
|
-
|
|
129
|
-
options: fillProps,
|
|
133
|
+
titleTextWeight: {
|
|
130
134
|
control: 'select',
|
|
131
|
-
if: { arg: '
|
|
135
|
+
if: { arg: 'advancedProps' },
|
|
136
|
+
options: textWeightProps,
|
|
132
137
|
},
|
|
133
|
-
|
|
134
|
-
options: iconFillSizeProps,
|
|
138
|
+
titleTextWrap: {
|
|
135
139
|
control: 'inline-radio',
|
|
136
|
-
if: { arg: '
|
|
140
|
+
if: { arg: 'advancedProps' },
|
|
141
|
+
options: textWrapProps,
|
|
137
142
|
},
|
|
138
|
-
|
|
139
|
-
options: fillProps,
|
|
143
|
+
valueIconFill: {
|
|
140
144
|
control: 'select',
|
|
141
|
-
if: { arg: '
|
|
145
|
+
if: { arg: 'valueIconSrc' },
|
|
146
|
+
options: fillProps,
|
|
142
147
|
},
|
|
143
|
-
|
|
144
|
-
options: shapeProps,
|
|
148
|
+
valueIconFillSize: {
|
|
145
149
|
control: 'inline-radio',
|
|
146
|
-
if: { arg: '
|
|
150
|
+
if: { arg: 'valueIconSrc' },
|
|
151
|
+
options: iconFillSizeProps,
|
|
147
152
|
},
|
|
148
153
|
|
|
149
154
|
// valueText
|
|
150
155
|
|
|
151
|
-
|
|
152
|
-
options: textSizeProps,
|
|
153
|
-
control: 'inline-radio',
|
|
154
|
-
},
|
|
155
|
-
valueTextColor: {
|
|
156
|
-
options: textColorProps,
|
|
156
|
+
valueIconItemFill: {
|
|
157
157
|
control: 'select',
|
|
158
|
+
if: { arg: 'valueIconSrc' },
|
|
159
|
+
options: fillProps,
|
|
158
160
|
},
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
valueIconShape: {
|
|
162
|
+
control: 'inline-radio',
|
|
163
|
+
if: { arg: 'valueIconSrc' },
|
|
164
|
+
options: shapeProps,
|
|
163
165
|
},
|
|
164
|
-
|
|
165
|
-
options: textWrapProps,
|
|
166
|
+
valueIconSrc: {
|
|
166
167
|
control: 'inline-radio',
|
|
167
|
-
|
|
168
|
+
options: [null, 'assets/24/ChevronDown.svg'],
|
|
168
169
|
},
|
|
169
|
-
|
|
170
|
-
// valueLabel
|
|
171
|
-
|
|
172
|
-
showValueLabel: { control: 'boolean' },
|
|
173
170
|
valueLabelAppearance: {
|
|
171
|
+
control: 'inline-radio',
|
|
172
|
+
if: { arg: 'showValueLabel' },
|
|
174
173
|
options: [
|
|
175
174
|
null,
|
|
176
175
|
'accent',
|
|
@@ -180,60 +179,65 @@ export default {
|
|
|
180
179
|
'surfaceSecondary',
|
|
181
180
|
'surfaceTertiary',
|
|
182
181
|
],
|
|
183
|
-
control: 'inline-radio',
|
|
184
|
-
if: { arg: 'showValueLabel' },
|
|
185
|
-
},
|
|
186
|
-
valueLabelTextSize: {
|
|
187
|
-
options: textSizeProps,
|
|
188
|
-
control: 'inline-radio',
|
|
189
|
-
if: { arg: 'showValueLabel' },
|
|
190
182
|
},
|
|
183
|
+
|
|
184
|
+
// valueLabel
|
|
185
|
+
|
|
191
186
|
valueLabelShape: {
|
|
192
|
-
options: shapeProps,
|
|
193
187
|
control: 'inline-radio',
|
|
194
188
|
if: { arg: 'showValueLabel' },
|
|
189
|
+
options: shapeProps,
|
|
195
190
|
},
|
|
196
191
|
valueLabelSize: {
|
|
197
|
-
options: sizeProps,
|
|
198
192
|
control: 'inline-radio',
|
|
199
193
|
if: { arg: 'showValueLabel' },
|
|
194
|
+
options: sizeProps,
|
|
200
195
|
},
|
|
201
|
-
|
|
202
|
-
// valueIcon
|
|
203
|
-
|
|
204
|
-
valueIconSrc: {
|
|
205
|
-
options: [null, 'assets/24/ChevronDown.svg'],
|
|
196
|
+
valueLabelTextSize: {
|
|
206
197
|
control: 'inline-radio',
|
|
198
|
+
if: { arg: 'showValueLabel' },
|
|
199
|
+
options: textSizeProps,
|
|
207
200
|
},
|
|
208
|
-
|
|
209
|
-
options: fillProps,
|
|
201
|
+
valueTextColor: {
|
|
210
202
|
control: 'select',
|
|
211
|
-
|
|
203
|
+
options: textColorProps,
|
|
212
204
|
},
|
|
213
|
-
|
|
214
|
-
options: iconFillSizeProps,
|
|
205
|
+
valueTextSize: {
|
|
215
206
|
control: 'inline-radio',
|
|
216
|
-
|
|
207
|
+
options: textSizeProps,
|
|
217
208
|
},
|
|
218
|
-
|
|
219
|
-
|
|
209
|
+
|
|
210
|
+
// valueIcon
|
|
211
|
+
|
|
212
|
+
valueTextWeight: {
|
|
220
213
|
control: 'select',
|
|
221
|
-
if: { arg: '
|
|
214
|
+
if: { arg: 'advancedProps' },
|
|
215
|
+
options: textWeightProps,
|
|
222
216
|
},
|
|
223
|
-
|
|
224
|
-
options: shapeProps,
|
|
217
|
+
valueTextWrap: {
|
|
225
218
|
control: 'inline-radio',
|
|
226
|
-
if: { arg: '
|
|
219
|
+
if: { arg: 'advancedProps' },
|
|
220
|
+
options: textWrapProps,
|
|
227
221
|
},
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
222
|
+
zeroGap: { control: 'boolean' },
|
|
223
|
+
zeroPadding: { control: 'boolean' },
|
|
224
|
+
onClick: {
|
|
225
|
+
if: { arg: 'advancedProps' },
|
|
226
|
+
},
|
|
227
|
+
onMouseEnter: {
|
|
228
|
+
if: { arg: 'advancedProps' },
|
|
231
229
|
},
|
|
232
230
|
},
|
|
231
|
+
component: Cell,
|
|
232
|
+
title: 'Molecules / Cell',
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
export const Default = {
|
|
236
236
|
args: {
|
|
237
|
+
direction: 'horizontal',
|
|
238
|
+
reverse: false,
|
|
239
|
+
showTitleLabel: false,
|
|
240
|
+
showValueLabel: false,
|
|
237
241
|
title: 'Title',
|
|
238
242
|
titleTextColor: 'surfaceTextPrimary',
|
|
239
243
|
titleTextSize: 'm',
|
|
@@ -241,12 +245,8 @@ export const Default = {
|
|
|
241
245
|
valueTextColor: 'surfaceTextPrimary',
|
|
242
246
|
valueTextSize: 'm',
|
|
243
247
|
valueTextWeight: 600,
|
|
244
|
-
direction: 'horizontal',
|
|
245
|
-
zeroPadding: false,
|
|
246
248
|
zeroGap: false,
|
|
247
|
-
|
|
248
|
-
showTitleLabel: false,
|
|
249
|
-
showValueLabel: false,
|
|
249
|
+
zeroPadding: false,
|
|
250
250
|
},
|
|
251
251
|
}
|
|
252
252
|
|
|
@@ -270,31 +270,31 @@ export const WithLabels = {
|
|
|
270
270
|
showTitleLabel: true,
|
|
271
271
|
showValueLabel: true,
|
|
272
272
|
titleLabel: 'titleLabel',
|
|
273
|
-
valueLabel: 'valueLabel',
|
|
274
273
|
titleLabelAppearance: 'accent',
|
|
275
|
-
titleLabelTextSize: 's',
|
|
276
274
|
titleLabelShape: 'rounded',
|
|
277
275
|
titleLabelSize: 's',
|
|
276
|
+
titleLabelTextSize: 's',
|
|
277
|
+
valueLabel: 'valueLabel',
|
|
278
278
|
valueLabelAppearance: 'accent',
|
|
279
|
-
valueLabelTextSize: 's',
|
|
280
279
|
valueLabelShape: 'rounded',
|
|
281
280
|
valueLabelSize: 's',
|
|
281
|
+
valueLabelTextSize: 's',
|
|
282
282
|
},
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
export const WithIcons = {
|
|
286
286
|
args: {
|
|
287
287
|
...Default.args,
|
|
288
|
-
titleIconSrc: 'assets/24/ChevronDown.svg',
|
|
289
288
|
titleIconFill: 'accentPrimary',
|
|
290
289
|
titleIconFillSize: 32,
|
|
291
290
|
titleIconItemFill: 'surfacePrimary',
|
|
292
291
|
titleIconShape: 'circular',
|
|
293
|
-
|
|
292
|
+
titleIconSrc: 'assets/24/ChevronDown.svg',
|
|
294
293
|
valueIconFill: 'accentPrimary',
|
|
295
294
|
valueIconFillSize: 32,
|
|
296
295
|
valueIconItemFill: 'surfacePrimary',
|
|
297
296
|
valueIconShape: 'circular',
|
|
297
|
+
valueIconSrc: 'assets/24/ChevronDown.svg',
|
|
298
298
|
},
|
|
299
299
|
}
|
|
300
300
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Canvas, Meta, Story } from '@storybook/blocks'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import * as CheckboxStories from './Checkbox.stories.js'
|
|
5
|
+
|
|
6
|
+
<Meta of={CheckboxStories} />
|
|
7
|
+
|
|
8
|
+
# Checkbox
|
|
9
|
+
|
|
10
|
+
## CheckedActive
|
|
11
|
+
|
|
12
|
+
<Canvas sourceState="shown" of={CheckboxStories.CheckedActive} />
|
|
13
|
+
|
|
14
|
+
## CheckedDisabled
|
|
15
|
+
|
|
16
|
+
<Canvas sourceState="shown" of={CheckboxStories.CheckedDisabled} />
|
|
17
|
+
|
|
18
|
+
## NotCheckedActive
|
|
19
|
+
|
|
20
|
+
<Canvas sourceState="shown" of={CheckboxStories.NotCheckedActive} />
|
|
21
|
+
|
|
22
|
+
## NotCheckedDisabled
|
|
23
|
+
|
|
24
|
+
<Canvas sourceState="shown" of={CheckboxStories.NotCheckedDisabled} />
|