@itcase/ui 1.0.100 → 1.0.102
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/css/components/Badge/Badge.css +1 -1
- package/dist/css/components/Checkbox/Checkbox.css +2 -1
- package/dist/css/components/DatePicker/DatePicker.css +1 -1
- package/dist/css/components/Group/Group.css +1 -1
- package/dist/css/components/Menu/Menu.css +3 -2
- package/dist/css/components/MenuItem/MenuItem.css +26 -0
- package/dist/css/components/Pagination/Pagination.css +5 -3
- package/dist/css/components/Pagination/css/__item/pagination__item.css +4 -3
- package/dist/css/components/Pagination/css/__item/pagination__item_state_disabled.css +1 -0
- package/dist/css/components/Select/Select.css +5 -0
- package/dist/css/components/Select/css/__indicators/select__indicators.css +1 -0
- package/dist/css/components/Select/css/__value-container/select__value-container.css +4 -0
- package/dist/css/components/Tile/Tile.css +7 -0
- package/dist/css/components/Tooltip/Tooltip.css +9 -9
- package/dist/stories/Accordion.stories.js +88 -0
- package/dist/stories/AccordionItem.stories.js +150 -0
- package/dist/stories/Badge.stories.js +116 -0
- package/dist/stories/Button.stories.js +287 -0
- package/dist/stories/Checkbox.stories.js +116 -0
- package/dist/stories/Chips.stories.js +151 -0
- package/dist/stories/Choice.stories.js +117 -0
- package/dist/stories/Code.stories.js +99 -0
- package/dist/stories/DatePicker.stories.js +178 -0
- package/dist/stories/Divider.stories.js +132 -0
- package/dist/stories/Dot.stories.js +86 -0
- package/dist/stories/Dropdown.stories.js +74 -0
- package/dist/stories/DropdownItem.stories.js +152 -0
- package/dist/stories/Empty.stories.js +115 -0
- package/dist/stories/FormFieldCheckbox.stories.js +77 -0
- package/dist/stories/FormFieldChoice.stories.js +75 -0
- package/dist/stories/FormFieldDatepicker.stories.js +51 -0
- package/dist/stories/FormFieldFileInput.stories.js +58 -0
- package/dist/stories/FormFieldInput.stories.js +66 -0
- package/dist/stories/FormFieldInputPassword.stories.js +66 -0
- package/dist/stories/FormFieldMultiBadgeSelect.stories.js +132 -0
- package/dist/stories/FormFieldMultiSelect.stories.js +127 -0
- package/dist/stories/FormFieldSelect.stories.js +99 -0
- package/dist/stories/FormFieldSelectGroup.stories.js +84 -0
- package/dist/stories/Icon.stories.js +208 -0
- package/dist/stories/Input.stories.js +124 -0
- package/dist/stories/InputPassword.stories.js +114 -0
- package/dist/stories/Label.stories.js +163 -0
- package/dist/stories/Loader.stories.js +121 -0
- package/dist/stories/Logo.stories.js +99 -0
- package/dist/stories/MenuItem.stories.js +193 -0
- package/dist/stories/ModalConfirm.stories.js +61 -0
- package/dist/stories/ModalDefault.stories.js +34 -0
- package/dist/stories/NotFound.stories.js +94 -0
- package/dist/stories/Notification.stories.js +128 -0
- package/dist/stories/Pagination.stories.js +66 -0
- package/dist/stories/RadioButton.stories.js +101 -0
- package/dist/stories/Search-input.stories.js +182 -0
- package/dist/stories/Segmented.stories.js +110 -0
- package/dist/stories/Select.stories.js +280 -0
- package/dist/stories/Switch.stories.js +84 -0
- package/dist/stories/Tab.appearance.stories.js +260 -0
- package/dist/stories/Tab.group.stories.js +149 -0
- package/dist/stories/Tab.size.stories.js +259 -0
- package/dist/stories/Tab.state.stories.js +227 -0
- package/dist/stories/Textarea.stories.js +90 -0
- package/dist/stories/Tile.stories.js +235 -0
- package/package.json +1 -1
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { Tab, tabConfig } from '@itcase/ui/components/Tab'
|
|
2
|
+
import {
|
|
3
|
+
fillHoverProps,
|
|
4
|
+
fillProps,
|
|
5
|
+
shapeProps,
|
|
6
|
+
sizeProps,
|
|
7
|
+
textColorActiveProps,
|
|
8
|
+
textColorHoverProps,
|
|
9
|
+
textColorProps,
|
|
10
|
+
textGradientProps,
|
|
11
|
+
textSizeProps,
|
|
12
|
+
textStyleProps,
|
|
13
|
+
textWeightProps,
|
|
14
|
+
textWrapProps,
|
|
15
|
+
underlineProps,
|
|
16
|
+
} from '@itcase/ui/constants'
|
|
17
|
+
|
|
18
|
+
import tabAppearance from 'src/components/Tab/appearance.json'
|
|
19
|
+
|
|
20
|
+
tabConfig.setAppearance(tabAppearance)
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
title: 'Atoms / Tab / Appearance',
|
|
24
|
+
component: Tab,
|
|
25
|
+
parameters: {
|
|
26
|
+
controls: {
|
|
27
|
+
exclude: [
|
|
28
|
+
'fillDesktop',
|
|
29
|
+
'fillMobile',
|
|
30
|
+
'fillTablet',
|
|
31
|
+
'linkFillDesktop',
|
|
32
|
+
'linkFillMobile',
|
|
33
|
+
'linkFillTablet',
|
|
34
|
+
'shapeDesktop',
|
|
35
|
+
'shapeMobile',
|
|
36
|
+
'shapeTablet',
|
|
37
|
+
'sizeDesktop',
|
|
38
|
+
'sizeMobile',
|
|
39
|
+
'sizeTablet',
|
|
40
|
+
'typeDesktop',
|
|
41
|
+
'typeMobile',
|
|
42
|
+
'typeTablet',
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
argTypes: {
|
|
47
|
+
advancedProps: { control: 'boolean' },
|
|
48
|
+
onClick: {
|
|
49
|
+
if: { arg: 'advancedProps' },
|
|
50
|
+
},
|
|
51
|
+
onMouseEnter: {
|
|
52
|
+
if: { arg: 'advancedProps' },
|
|
53
|
+
},
|
|
54
|
+
after: {
|
|
55
|
+
if: { arg: 'advancedProps' },
|
|
56
|
+
},
|
|
57
|
+
before: {
|
|
58
|
+
if: { arg: 'advancedProps' },
|
|
59
|
+
},
|
|
60
|
+
children: {
|
|
61
|
+
if: { arg: 'advancedProps' },
|
|
62
|
+
},
|
|
63
|
+
className: {
|
|
64
|
+
if: { arg: 'advancedProps' },
|
|
65
|
+
},
|
|
66
|
+
href: {
|
|
67
|
+
if: { arg: 'advancedProps' },
|
|
68
|
+
},
|
|
69
|
+
link: {
|
|
70
|
+
if: { arg: 'advancedProps' },
|
|
71
|
+
},
|
|
72
|
+
LinkComponent: {
|
|
73
|
+
if: { arg: 'advancedProps' },
|
|
74
|
+
},
|
|
75
|
+
rel: {
|
|
76
|
+
if: { arg: 'advancedProps' },
|
|
77
|
+
},
|
|
78
|
+
target: {
|
|
79
|
+
if: { arg: 'advancedProps' },
|
|
80
|
+
},
|
|
81
|
+
isActive: {
|
|
82
|
+
control: 'boolean',
|
|
83
|
+
},
|
|
84
|
+
appearance: {
|
|
85
|
+
options: [
|
|
86
|
+
null,
|
|
87
|
+
'any',
|
|
88
|
+
'surfacePrimary',
|
|
89
|
+
'surfaceSecondary',
|
|
90
|
+
'surfaceTertiary',
|
|
91
|
+
'surfaceQuaternary',
|
|
92
|
+
'accent',
|
|
93
|
+
'primary',
|
|
94
|
+
'secondary',
|
|
95
|
+
],
|
|
96
|
+
control: 'inline-radio',
|
|
97
|
+
},
|
|
98
|
+
badge: {
|
|
99
|
+
control: 'boolean',
|
|
100
|
+
},
|
|
101
|
+
badgeSize: {
|
|
102
|
+
options: sizeProps,
|
|
103
|
+
control: 'inline-radio',
|
|
104
|
+
},
|
|
105
|
+
badgeFill: {
|
|
106
|
+
options: fillProps,
|
|
107
|
+
control: 'select',
|
|
108
|
+
},
|
|
109
|
+
badgeTextColor: {
|
|
110
|
+
options: textColorProps,
|
|
111
|
+
control: 'select',
|
|
112
|
+
},
|
|
113
|
+
badgeTextSize: {
|
|
114
|
+
options: textSizeProps,
|
|
115
|
+
control: 'inline-radio',
|
|
116
|
+
},
|
|
117
|
+
fill: {
|
|
118
|
+
options: fillProps,
|
|
119
|
+
control: 'select',
|
|
120
|
+
},
|
|
121
|
+
fillHover: {
|
|
122
|
+
options: fillHoverProps,
|
|
123
|
+
control: 'select',
|
|
124
|
+
},
|
|
125
|
+
labelColor: {
|
|
126
|
+
options: textColorProps,
|
|
127
|
+
control: 'select',
|
|
128
|
+
},
|
|
129
|
+
labelColorActive: {
|
|
130
|
+
if: { arg: 'advancedProps' },
|
|
131
|
+
options: textColorActiveProps,
|
|
132
|
+
control: 'select',
|
|
133
|
+
},
|
|
134
|
+
labelTextSize: {
|
|
135
|
+
options: textSizeProps,
|
|
136
|
+
control: 'inline-radio',
|
|
137
|
+
},
|
|
138
|
+
labelTextColorHover: {
|
|
139
|
+
if: { arg: 'advancedProps' },
|
|
140
|
+
options: textColorHoverProps,
|
|
141
|
+
control: 'inline-radio',
|
|
142
|
+
},
|
|
143
|
+
labelTextGradient: {
|
|
144
|
+
if: { arg: 'advancedProps' },
|
|
145
|
+
options: textGradientProps,
|
|
146
|
+
control: 'inline-radio',
|
|
147
|
+
},
|
|
148
|
+
labelTextStyle: {
|
|
149
|
+
options: textStyleProps,
|
|
150
|
+
control: 'inline-radio',
|
|
151
|
+
if: { arg: 'advancedProps' },
|
|
152
|
+
},
|
|
153
|
+
labelTextWeight: {
|
|
154
|
+
options: textWeightProps,
|
|
155
|
+
control: 'inline-radio',
|
|
156
|
+
},
|
|
157
|
+
labelTextWrap: {
|
|
158
|
+
options: textWrapProps,
|
|
159
|
+
control: 'inline-radio',
|
|
160
|
+
},
|
|
161
|
+
linkFill: {
|
|
162
|
+
if: { arg: 'advancedProps' },
|
|
163
|
+
options: fillProps,
|
|
164
|
+
control: 'select',
|
|
165
|
+
},
|
|
166
|
+
shape: {
|
|
167
|
+
options: shapeProps,
|
|
168
|
+
control: 'inline-radio',
|
|
169
|
+
},
|
|
170
|
+
size: {
|
|
171
|
+
options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],
|
|
172
|
+
control: 'inline-radio',
|
|
173
|
+
},
|
|
174
|
+
type: {
|
|
175
|
+
if: { arg: 'advancedProps' },
|
|
176
|
+
},
|
|
177
|
+
underline: {
|
|
178
|
+
if: { arg: 'advancedProps' },
|
|
179
|
+
options: underlineProps,
|
|
180
|
+
control: 'inline-radio',
|
|
181
|
+
},
|
|
182
|
+
badgeAppearance: {
|
|
183
|
+
options: [
|
|
184
|
+
'surfacePrimary',
|
|
185
|
+
'surfaceSecondary',
|
|
186
|
+
'surfaceTertiary',
|
|
187
|
+
'surfaceQuaternary',
|
|
188
|
+
'accent',
|
|
189
|
+
'primary',
|
|
190
|
+
'secondary',
|
|
191
|
+
'disabled',
|
|
192
|
+
],
|
|
193
|
+
control: 'inline-radio',
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export const Default = {
|
|
199
|
+
args: {
|
|
200
|
+
appearance: 'any',
|
|
201
|
+
label: 'Label',
|
|
202
|
+
size: 'normal',
|
|
203
|
+
labelTextSize: 'm',
|
|
204
|
+
badge: true,
|
|
205
|
+
badgeSize: 'xs',
|
|
206
|
+
badgeAppearance: 'accent',
|
|
207
|
+
badgeTextSize: 'xs',
|
|
208
|
+
badgeValue: '3',
|
|
209
|
+
},
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export const SurfacePrimary = {
|
|
213
|
+
args: {
|
|
214
|
+
...Default.args,
|
|
215
|
+
appearance: 'surfacePrimary',
|
|
216
|
+
},
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export const SurfaceSecondary = {
|
|
220
|
+
args: {
|
|
221
|
+
...Default.args,
|
|
222
|
+
appearance: 'surfaceSecondary',
|
|
223
|
+
},
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export const SurfaceTertiary = {
|
|
227
|
+
args: {
|
|
228
|
+
...Default.args,
|
|
229
|
+
appearance: 'surfaceTertiary',
|
|
230
|
+
},
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export const SurfaceQuaternary = {
|
|
234
|
+
args: {
|
|
235
|
+
...Default.args,
|
|
236
|
+
appearance: 'surfaceQuaternary',
|
|
237
|
+
},
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export const Accent = {
|
|
241
|
+
args: {
|
|
242
|
+
...Default.args,
|
|
243
|
+
appearance: 'accent',
|
|
244
|
+
badgeAppearance: 'surfacePrimary',
|
|
245
|
+
},
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export const Primary = {
|
|
249
|
+
args: {
|
|
250
|
+
...Default.args,
|
|
251
|
+
appearance: 'primary',
|
|
252
|
+
},
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export const Secondary = {
|
|
256
|
+
args: {
|
|
257
|
+
...Default.args,
|
|
258
|
+
appearance: 'secondary',
|
|
259
|
+
},
|
|
260
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { Tab, tabConfig, TabGroup } from '@itcase/ui/components/Tab'
|
|
2
|
+
import {
|
|
3
|
+
directionProps,
|
|
4
|
+
fillProps,
|
|
5
|
+
shapeProps,
|
|
6
|
+
stackingProps,
|
|
7
|
+
widthProps,
|
|
8
|
+
wrapProps,
|
|
9
|
+
} from '@itcase/ui/constants'
|
|
10
|
+
|
|
11
|
+
import tabAppearance from 'src/components/Tab/appearance.json'
|
|
12
|
+
|
|
13
|
+
tabConfig.setAppearance(tabAppearance)
|
|
14
|
+
|
|
15
|
+
const tabs = {
|
|
16
|
+
1: {
|
|
17
|
+
badgeValue: 3,
|
|
18
|
+
label: 'Все',
|
|
19
|
+
isActive: true,
|
|
20
|
+
},
|
|
21
|
+
2: {
|
|
22
|
+
badgeValue: null,
|
|
23
|
+
label: 'Непрочитанные',
|
|
24
|
+
isActive: false,
|
|
25
|
+
},
|
|
26
|
+
3: {
|
|
27
|
+
badgeValue: null,
|
|
28
|
+
label: 'Прочитанные',
|
|
29
|
+
isActive: false,
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
let currentTabIndex = ''
|
|
34
|
+
|
|
35
|
+
function setTabIndex(index) {
|
|
36
|
+
currentTabIndex = index
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default {
|
|
40
|
+
title: 'Atoms / Tab / TabGroup',
|
|
41
|
+
component: TabGroup,
|
|
42
|
+
parameters: {
|
|
43
|
+
controls: {
|
|
44
|
+
exclude: [
|
|
45
|
+
'direction',
|
|
46
|
+
'directionDesktop',
|
|
47
|
+
'directionMobile',
|
|
48
|
+
'directionTablet',
|
|
49
|
+
'fillDesktop',
|
|
50
|
+
'fillMobile',
|
|
51
|
+
'fillTablet',
|
|
52
|
+
'contentAlign',
|
|
53
|
+
'contentAlignDesktop',
|
|
54
|
+
'contentAlignMobile',
|
|
55
|
+
'contentAlignTablet',
|
|
56
|
+
'stackingDesktop',
|
|
57
|
+
'stackingMobile',
|
|
58
|
+
'stackingTablet',
|
|
59
|
+
'wrapDesktop',
|
|
60
|
+
'wrapMobile',
|
|
61
|
+
'wrapTablet',
|
|
62
|
+
'shapeDesktop',
|
|
63
|
+
'shapeMobile',
|
|
64
|
+
'shapeTablet',
|
|
65
|
+
'spaceBetweenItems',
|
|
66
|
+
'spaceBetweenItemsDesktop',
|
|
67
|
+
'spaceBetweenItemsMobile',
|
|
68
|
+
'spaceBetweenItemsTablet',
|
|
69
|
+
'widthDesktop',
|
|
70
|
+
'widthMobile',
|
|
71
|
+
'widthTablet',
|
|
72
|
+
'columnsDesktop',
|
|
73
|
+
'columnsMobile',
|
|
74
|
+
'columnsTablet',
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
argTypes: {
|
|
79
|
+
advancedProps: { control: 'boolean' },
|
|
80
|
+
className: {
|
|
81
|
+
if: { arg: 'advancedProps' },
|
|
82
|
+
},
|
|
83
|
+
id: {
|
|
84
|
+
if: { arg: 'advancedProps' },
|
|
85
|
+
},
|
|
86
|
+
set: {
|
|
87
|
+
if: { arg: 'advancedProps' },
|
|
88
|
+
},
|
|
89
|
+
columns: {
|
|
90
|
+
if: { arg: 'advancedProps' },
|
|
91
|
+
},
|
|
92
|
+
direction: {
|
|
93
|
+
options: directionProps,
|
|
94
|
+
control: 'inline-radio',
|
|
95
|
+
},
|
|
96
|
+
fill: {
|
|
97
|
+
options: fillProps,
|
|
98
|
+
control: 'select',
|
|
99
|
+
},
|
|
100
|
+
horizontalScroll: {
|
|
101
|
+
control: 'boolean',
|
|
102
|
+
},
|
|
103
|
+
shape: {
|
|
104
|
+
if: { arg: 'advancedProps' },
|
|
105
|
+
options: shapeProps,
|
|
106
|
+
control: 'select',
|
|
107
|
+
},
|
|
108
|
+
stacking: {
|
|
109
|
+
if: { arg: 'advancedProps' },
|
|
110
|
+
options: stackingProps,
|
|
111
|
+
control: 'inline-radio',
|
|
112
|
+
},
|
|
113
|
+
width: {
|
|
114
|
+
options: widthProps,
|
|
115
|
+
control: 'inline-radio',
|
|
116
|
+
},
|
|
117
|
+
wrap: {
|
|
118
|
+
options: wrapProps,
|
|
119
|
+
control: 'inline-radio',
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export const Default = {
|
|
125
|
+
args: {
|
|
126
|
+
direction: 'horizontal',
|
|
127
|
+
children: (
|
|
128
|
+
<>
|
|
129
|
+
{Object.entries(tabs).map(([index, tabItem]) => (
|
|
130
|
+
<Tab
|
|
131
|
+
appearance="any"
|
|
132
|
+
badgeAppearance="accent"
|
|
133
|
+
badgeSize="xs"
|
|
134
|
+
badgeTextSize="xxs"
|
|
135
|
+
badgeValue={Boolean(tabItem.badgeValue) && tabItem.badgeValue}
|
|
136
|
+
dividerFill={tabItem.isActive ? 'surfaceItemAccent' : 'surfaceTertiary'}
|
|
137
|
+
isActive={index === currentTabIndex}
|
|
138
|
+
key={index}
|
|
139
|
+
label={tabItem.label}
|
|
140
|
+
labelColor={tabItem.isActive ? 'surfaceTextAccent' : 'surfaceTextPrimary'}
|
|
141
|
+
labelTextSize="s"
|
|
142
|
+
size="l"
|
|
143
|
+
onClick={() => setTabIndex(index)}
|
|
144
|
+
/>
|
|
145
|
+
))}
|
|
146
|
+
</>
|
|
147
|
+
),
|
|
148
|
+
},
|
|
149
|
+
}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { Tab, tabConfig } from '@itcase/ui/components/Tab'
|
|
2
|
+
import {
|
|
3
|
+
fillHoverProps,
|
|
4
|
+
fillProps,
|
|
5
|
+
shapeProps,
|
|
6
|
+
sizeProps,
|
|
7
|
+
textColorActiveProps,
|
|
8
|
+
textColorHoverProps,
|
|
9
|
+
textColorProps,
|
|
10
|
+
textGradientProps,
|
|
11
|
+
textSizeProps,
|
|
12
|
+
textStyleProps,
|
|
13
|
+
textWeightProps,
|
|
14
|
+
textWrapProps,
|
|
15
|
+
underlineProps,
|
|
16
|
+
} from '@itcase/ui/constants'
|
|
17
|
+
|
|
18
|
+
import tabAppearance from 'src/components/Tab/appearance.json'
|
|
19
|
+
|
|
20
|
+
tabConfig.setAppearance(tabAppearance)
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
title: 'Atoms / Tab / Size',
|
|
24
|
+
component: Tab,
|
|
25
|
+
parameters: {
|
|
26
|
+
controls: {
|
|
27
|
+
exclude: [
|
|
28
|
+
'fillDesktop',
|
|
29
|
+
'fillMobile',
|
|
30
|
+
'fillTablet',
|
|
31
|
+
'linkFillDesktop',
|
|
32
|
+
'linkFillMobile',
|
|
33
|
+
'linkFillTablet',
|
|
34
|
+
'shapeDesktop',
|
|
35
|
+
'shapeMobile',
|
|
36
|
+
'shapeTablet',
|
|
37
|
+
'sizeDesktop',
|
|
38
|
+
'sizeMobile',
|
|
39
|
+
'sizeTablet',
|
|
40
|
+
'typeDesktop',
|
|
41
|
+
'typeMobile',
|
|
42
|
+
'typeTablet',
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
argTypes: {
|
|
47
|
+
advancedProps: { control: 'boolean' },
|
|
48
|
+
onClick: {
|
|
49
|
+
if: { arg: 'advancedProps' },
|
|
50
|
+
},
|
|
51
|
+
onMouseEnter: {
|
|
52
|
+
if: { arg: 'advancedProps' },
|
|
53
|
+
},
|
|
54
|
+
after: {
|
|
55
|
+
if: { arg: 'advancedProps' },
|
|
56
|
+
},
|
|
57
|
+
before: {
|
|
58
|
+
if: { arg: 'advancedProps' },
|
|
59
|
+
},
|
|
60
|
+
children: {
|
|
61
|
+
if: { arg: 'advancedProps' },
|
|
62
|
+
},
|
|
63
|
+
className: {
|
|
64
|
+
if: { arg: 'advancedProps' },
|
|
65
|
+
},
|
|
66
|
+
href: {
|
|
67
|
+
if: { arg: 'advancedProps' },
|
|
68
|
+
},
|
|
69
|
+
link: {
|
|
70
|
+
if: { arg: 'advancedProps' },
|
|
71
|
+
},
|
|
72
|
+
LinkComponent: {
|
|
73
|
+
if: { arg: 'advancedProps' },
|
|
74
|
+
},
|
|
75
|
+
rel: {
|
|
76
|
+
if: { arg: 'advancedProps' },
|
|
77
|
+
},
|
|
78
|
+
target: {
|
|
79
|
+
if: { arg: 'advancedProps' },
|
|
80
|
+
},
|
|
81
|
+
isActive: {
|
|
82
|
+
control: 'boolean',
|
|
83
|
+
},
|
|
84
|
+
appearance: {
|
|
85
|
+
options: [
|
|
86
|
+
null,
|
|
87
|
+
'any',
|
|
88
|
+
'surfacePrimary',
|
|
89
|
+
'surfaceSecondary',
|
|
90
|
+
'surfaceTertiary',
|
|
91
|
+
'surfaceQuaternary',
|
|
92
|
+
'accent',
|
|
93
|
+
'primary',
|
|
94
|
+
'secondary',
|
|
95
|
+
],
|
|
96
|
+
control: 'inline-radio',
|
|
97
|
+
},
|
|
98
|
+
badge: {
|
|
99
|
+
control: 'boolean',
|
|
100
|
+
},
|
|
101
|
+
badgeSize: {
|
|
102
|
+
options: sizeProps,
|
|
103
|
+
control: 'inline-radio',
|
|
104
|
+
},
|
|
105
|
+
badgeFill: {
|
|
106
|
+
options: fillProps,
|
|
107
|
+
control: 'select',
|
|
108
|
+
},
|
|
109
|
+
badgeTextColor: {
|
|
110
|
+
options: textColorProps,
|
|
111
|
+
control: 'select',
|
|
112
|
+
},
|
|
113
|
+
badgeTextSize: {
|
|
114
|
+
options: textSizeProps,
|
|
115
|
+
control: 'inline-radio',
|
|
116
|
+
},
|
|
117
|
+
fill: {
|
|
118
|
+
options: fillProps,
|
|
119
|
+
control: 'select',
|
|
120
|
+
},
|
|
121
|
+
fillHover: {
|
|
122
|
+
options: fillHoverProps,
|
|
123
|
+
control: 'select',
|
|
124
|
+
},
|
|
125
|
+
labelColor: {
|
|
126
|
+
options: textColorProps,
|
|
127
|
+
control: 'select',
|
|
128
|
+
},
|
|
129
|
+
labelColorActive: {
|
|
130
|
+
if: { arg: 'advancedProps' },
|
|
131
|
+
options: textColorActiveProps,
|
|
132
|
+
control: 'select',
|
|
133
|
+
},
|
|
134
|
+
labelTextSize: {
|
|
135
|
+
options: textSizeProps,
|
|
136
|
+
control: 'inline-radio',
|
|
137
|
+
},
|
|
138
|
+
labelTextColorHover: {
|
|
139
|
+
if: { arg: 'advancedProps' },
|
|
140
|
+
options: textColorHoverProps,
|
|
141
|
+
control: 'inline-radio',
|
|
142
|
+
},
|
|
143
|
+
labelTextGradient: {
|
|
144
|
+
if: { arg: 'advancedProps' },
|
|
145
|
+
options: textGradientProps,
|
|
146
|
+
control: 'inline-radio',
|
|
147
|
+
},
|
|
148
|
+
labelTextStyle: {
|
|
149
|
+
options: textStyleProps,
|
|
150
|
+
control: 'inline-radio',
|
|
151
|
+
if: { arg: 'advancedProps' },
|
|
152
|
+
},
|
|
153
|
+
labelTextWeight: {
|
|
154
|
+
options: textWeightProps,
|
|
155
|
+
control: 'inline-radio',
|
|
156
|
+
},
|
|
157
|
+
labelTextWrap: {
|
|
158
|
+
options: textWrapProps,
|
|
159
|
+
control: 'inline-radio',
|
|
160
|
+
},
|
|
161
|
+
linkFill: {
|
|
162
|
+
if: { arg: 'advancedProps' },
|
|
163
|
+
options: fillProps,
|
|
164
|
+
control: 'select',
|
|
165
|
+
},
|
|
166
|
+
shape: {
|
|
167
|
+
options: shapeProps,
|
|
168
|
+
control: 'inline-radio',
|
|
169
|
+
},
|
|
170
|
+
size: {
|
|
171
|
+
options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],
|
|
172
|
+
control: 'inline-radio',
|
|
173
|
+
},
|
|
174
|
+
type: {
|
|
175
|
+
if: { arg: 'advancedProps' },
|
|
176
|
+
},
|
|
177
|
+
underline: {
|
|
178
|
+
if: { arg: 'advancedProps' },
|
|
179
|
+
options: underlineProps,
|
|
180
|
+
control: 'inline-radio',
|
|
181
|
+
},
|
|
182
|
+
badgeAppearance: {
|
|
183
|
+
options: [
|
|
184
|
+
'surfacePrimary',
|
|
185
|
+
'surfaceSecondary',
|
|
186
|
+
'surfaceTertiary',
|
|
187
|
+
'surfaceQuaternary',
|
|
188
|
+
'accent',
|
|
189
|
+
'primary',
|
|
190
|
+
'secondary',
|
|
191
|
+
'disabled',
|
|
192
|
+
],
|
|
193
|
+
control: 'inline-radio',
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export const Default = {
|
|
199
|
+
args: {
|
|
200
|
+
appearance: 'primary',
|
|
201
|
+
label: 'Label',
|
|
202
|
+
size: 'm',
|
|
203
|
+
labelTextSize: 'm',
|
|
204
|
+
badge: true,
|
|
205
|
+
badgeSize: 'xs',
|
|
206
|
+
badgeAppearance: 'accent',
|
|
207
|
+
badgeTextSize: 'xs',
|
|
208
|
+
badgeValue: '3',
|
|
209
|
+
},
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export const SizeXXS = {
|
|
213
|
+
args: {
|
|
214
|
+
...Default.args,
|
|
215
|
+
size: 'xxs',
|
|
216
|
+
},
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export const SizeXS = {
|
|
220
|
+
args: {
|
|
221
|
+
...Default.args,
|
|
222
|
+
size: 'xs',
|
|
223
|
+
},
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export const SizeS = {
|
|
227
|
+
args: {
|
|
228
|
+
...Default.args,
|
|
229
|
+
size: 's',
|
|
230
|
+
},
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export const SizeM = {
|
|
234
|
+
args: {
|
|
235
|
+
...Default.args,
|
|
236
|
+
size: 'm',
|
|
237
|
+
},
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export const SizeL = {
|
|
241
|
+
args: {
|
|
242
|
+
...Default.args,
|
|
243
|
+
size: 'l',
|
|
244
|
+
},
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export const SizeXL = {
|
|
248
|
+
args: {
|
|
249
|
+
...Default.args,
|
|
250
|
+
size: 'xl',
|
|
251
|
+
},
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export const SizeXXL = {
|
|
255
|
+
args: {
|
|
256
|
+
...Default.args,
|
|
257
|
+
size: 'xxl',
|
|
258
|
+
},
|
|
259
|
+
}
|