@itcase/ui 1.2.19 → 1.2.21
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 +36 -42
- 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,4 +1,5 @@
|
|
|
1
|
-
import { SearchInput } from '@itcase/ui/components/Search'
|
|
1
|
+
import { SearchInput, searchInputConfig } from '@itcase/ui/components/Search'
|
|
2
|
+
|
|
2
3
|
import {
|
|
3
4
|
borderColorHoverProps,
|
|
4
5
|
borderColorProps,
|
|
@@ -6,15 +7,20 @@ import {
|
|
|
6
7
|
iconSizeProps,
|
|
7
8
|
textColorProps,
|
|
8
9
|
textSizeProps,
|
|
9
|
-
} from '
|
|
10
|
+
} from '../../../constants'
|
|
11
|
+
import searchInputAppearance from '../appearance.json'
|
|
12
|
+
|
|
13
|
+
searchInputConfig.setAppearance(searchInputAppearance)
|
|
10
14
|
|
|
11
15
|
export default {
|
|
12
|
-
title: 'Components / Search / SearchInput',
|
|
13
|
-
component: SearchInput,
|
|
14
|
-
parameters: {
|
|
15
|
-
controls: { exclude: ['fillDesktop', 'fillMobile', 'fillTablet'] },
|
|
16
|
-
},
|
|
17
16
|
argTypes: {
|
|
17
|
+
children: {
|
|
18
|
+
if: { arg: 'advancedProps' },
|
|
19
|
+
},
|
|
20
|
+
borderColor: {
|
|
21
|
+
control: 'select',
|
|
22
|
+
options: borderColorProps,
|
|
23
|
+
},
|
|
18
24
|
advancedProps: { control: 'boolean' },
|
|
19
25
|
after: {
|
|
20
26
|
if: { arg: 'advancedProps' },
|
|
@@ -22,123 +28,133 @@ export default {
|
|
|
22
28
|
before: {
|
|
23
29
|
if: { arg: 'advancedProps' },
|
|
24
30
|
},
|
|
25
|
-
|
|
26
|
-
|
|
31
|
+
borderHover: {
|
|
32
|
+
control: 'select',
|
|
33
|
+
options: borderColorHoverProps,
|
|
27
34
|
},
|
|
28
35
|
className: {
|
|
29
36
|
control: 'text',
|
|
30
37
|
if: { arg: 'advancedProps' },
|
|
31
38
|
},
|
|
32
|
-
onChange: {
|
|
33
|
-
if: { arg: 'advancedProps' },
|
|
34
|
-
},
|
|
35
|
-
onClickClean: {
|
|
36
|
-
if: { arg: 'advancedProps' },
|
|
37
|
-
},
|
|
38
|
-
onFocus: {
|
|
39
|
-
if: { arg: 'advancedProps' },
|
|
40
|
-
},
|
|
41
|
-
onKeyDown: {
|
|
42
|
-
if: { arg: 'advancedProps' },
|
|
43
|
-
},
|
|
44
|
-
borderColor: {
|
|
45
|
-
options: borderColorProps,
|
|
46
|
-
control: 'select',
|
|
47
|
-
},
|
|
48
|
-
borderHover: {
|
|
49
|
-
options: borderColorHoverProps,
|
|
50
|
-
control: 'select',
|
|
51
|
-
},
|
|
52
39
|
fill: {
|
|
53
|
-
options: fillProps,
|
|
54
40
|
control: 'select',
|
|
41
|
+
options: fillProps,
|
|
55
42
|
},
|
|
56
43
|
iconAfter: {
|
|
57
44
|
if: { arg: 'advancedProps' },
|
|
58
45
|
},
|
|
59
|
-
iconAfterSrc: {
|
|
60
|
-
options: [null, 'assets/16/Dots.svg'],
|
|
61
|
-
control: 'inline-radio',
|
|
62
|
-
},
|
|
63
46
|
iconAfterFill: {
|
|
64
|
-
options: fillProps,
|
|
65
47
|
control: 'select',
|
|
66
48
|
if: { arg: 'iconAfterSrc', neq: null },
|
|
49
|
+
options: fillProps,
|
|
67
50
|
},
|
|
68
51
|
iconAfterSize: {
|
|
52
|
+
control: 'select',
|
|
53
|
+
if: { arg: 'iconAfterSrc', neq: null },
|
|
69
54
|
options: iconSizeProps,
|
|
55
|
+
},
|
|
56
|
+
iconAfterSrc: {
|
|
57
|
+
control: 'inline-radio',
|
|
58
|
+
options: [null, 'assets/16/Mores.svg'],
|
|
59
|
+
},
|
|
60
|
+
iconAfterStroke: {
|
|
70
61
|
control: 'select',
|
|
71
62
|
if: { arg: 'iconAfterSrc', neq: null },
|
|
63
|
+
options: fillProps,
|
|
72
64
|
},
|
|
73
65
|
iconBefore: {
|
|
74
66
|
if: { arg: 'advancedProps' },
|
|
75
67
|
},
|
|
76
|
-
iconBeforeSrc: {
|
|
77
|
-
options: [null, 'assets/16/Search.svg'],
|
|
78
|
-
control: 'inline-radio',
|
|
79
|
-
},
|
|
80
68
|
iconBeforeFill: {
|
|
81
|
-
options: fillProps,
|
|
82
69
|
control: 'select',
|
|
83
70
|
if: { arg: 'iconBeforeSrc', neq: null },
|
|
71
|
+
options: fillProps,
|
|
84
72
|
},
|
|
85
73
|
iconBeforeSize: {
|
|
74
|
+
control: 'select',
|
|
75
|
+
if: { arg: 'iconBeforeSrc', neq: null },
|
|
86
76
|
options: iconSizeProps,
|
|
77
|
+
},
|
|
78
|
+
iconBeforeSrc: {
|
|
79
|
+
control: 'inline-radio',
|
|
80
|
+
options: [null, 'assets/16/Search.svg'],
|
|
81
|
+
},
|
|
82
|
+
iconBeforeStroke: {
|
|
87
83
|
control: 'select',
|
|
88
84
|
if: { arg: 'iconBeforeSrc', neq: null },
|
|
85
|
+
options: fillProps,
|
|
89
86
|
},
|
|
90
87
|
iconClear: {
|
|
91
88
|
if: { arg: 'advancedProps' },
|
|
92
89
|
},
|
|
93
|
-
iconClearSrc: {
|
|
94
|
-
options: [null, 'assets/16/Clear.svg'],
|
|
95
|
-
control: 'inline-radio',
|
|
96
|
-
},
|
|
97
90
|
iconClearFill: {
|
|
98
|
-
options: fillProps,
|
|
99
91
|
control: 'select',
|
|
100
92
|
if: { arg: 'iconClearSrc', neq: null },
|
|
93
|
+
options: fillProps,
|
|
101
94
|
},
|
|
102
95
|
iconClearSize: {
|
|
103
|
-
options: iconSizeProps,
|
|
104
96
|
control: 'select',
|
|
105
97
|
if: { arg: 'iconClearSrc', neq: null },
|
|
98
|
+
options: iconSizeProps,
|
|
99
|
+
},
|
|
100
|
+
iconClearSrc: {
|
|
101
|
+
control: 'inline-radio',
|
|
102
|
+
options: [null, 'assets/16/Clear.svg'],
|
|
106
103
|
},
|
|
107
104
|
inputTextSize: {
|
|
108
|
-
options: textSizeProps,
|
|
109
105
|
control: 'inline-radio',
|
|
106
|
+
options: textSizeProps,
|
|
110
107
|
},
|
|
111
108
|
placeholderTextColor: {
|
|
112
|
-
options: textColorProps,
|
|
113
109
|
control: 'select',
|
|
110
|
+
options: textColorProps,
|
|
114
111
|
},
|
|
115
112
|
placeholderTextSize: {
|
|
116
|
-
options: textSizeProps,
|
|
117
113
|
control: 'inline-radio',
|
|
114
|
+
options: textSizeProps,
|
|
118
115
|
},
|
|
119
116
|
shape: {
|
|
120
|
-
options: [null, 'geometric', 'rounded'],
|
|
121
117
|
control: 'inline-radio',
|
|
118
|
+
options: [null, 'geometric', 'rounded'],
|
|
122
119
|
},
|
|
123
120
|
size: {
|
|
124
|
-
options: [null, 'normal', 'compact'],
|
|
125
121
|
control: 'inline-radio',
|
|
122
|
+
options: [null, 'normal', 'compact'],
|
|
126
123
|
},
|
|
127
124
|
type: {
|
|
128
|
-
options: ['text', 'number', 'password'],
|
|
129
125
|
control: 'inline-radio',
|
|
126
|
+
options: ['text', 'number', 'password'],
|
|
127
|
+
},
|
|
128
|
+
onChange: {
|
|
129
|
+
if: { arg: 'advancedProps' },
|
|
130
|
+
},
|
|
131
|
+
onClickClean: {
|
|
132
|
+
if: { arg: 'advancedProps' },
|
|
133
|
+
},
|
|
134
|
+
onFocus: {
|
|
135
|
+
if: { arg: 'advancedProps' },
|
|
136
|
+
},
|
|
137
|
+
onKeyDown: {
|
|
138
|
+
if: { arg: 'advancedProps' },
|
|
130
139
|
},
|
|
131
140
|
},
|
|
141
|
+
component: SearchInput,
|
|
142
|
+
parameters: {
|
|
143
|
+
controls: { exclude: ['fillDesktop', 'fillMobile', 'fillTablet'] },
|
|
144
|
+
},
|
|
145
|
+
title: 'Molecules / Search',
|
|
132
146
|
}
|
|
133
147
|
|
|
134
148
|
export const Default = {
|
|
135
149
|
args: {
|
|
136
|
-
fill: 'surfacePrimary',
|
|
137
|
-
shape: 'rounded',
|
|
138
150
|
borderColor: 'surfaceBorderTertiary',
|
|
139
151
|
borderHover: 'surfaceBorderQuaternary',
|
|
152
|
+
fill: 'surfacePrimary',
|
|
153
|
+
iconClearFill: 'surfaceItemPrimary',
|
|
154
|
+
iconClearSize: '16',
|
|
140
155
|
placeholder: 'Поиск',
|
|
141
156
|
placeholderTextColor: 'surfaceTextQuaternary',
|
|
157
|
+
shape: 'rounded',
|
|
142
158
|
size: 'normal',
|
|
143
159
|
value: 'value',
|
|
144
160
|
},
|
|
@@ -147,9 +163,7 @@ export const Default = {
|
|
|
147
163
|
export const ClearIcon = {
|
|
148
164
|
args: {
|
|
149
165
|
...Default.args,
|
|
150
|
-
iconClearSrc: 'assets/16/
|
|
151
|
-
iconClearSize: '16',
|
|
152
|
-
iconClearFill: 'surfaceItemPrimary',
|
|
166
|
+
iconClearSrc: 'assets/16/Remove.svg',
|
|
153
167
|
},
|
|
154
168
|
}
|
|
155
169
|
|
|
@@ -157,16 +171,19 @@ export const BeforeIcon = {
|
|
|
157
171
|
args: {
|
|
158
172
|
...Default.args,
|
|
159
173
|
iconBeforeSrc: 'assets/16/Search.svg',
|
|
160
|
-
iconBeforeFill: 'surfaceItemPrimary',
|
|
161
|
-
iconBeforeSize: '16',
|
|
162
174
|
},
|
|
163
175
|
}
|
|
164
176
|
|
|
165
177
|
export const AfterIcon = {
|
|
166
178
|
args: {
|
|
167
179
|
...Default.args,
|
|
168
|
-
iconAfterSrc: 'assets/16/
|
|
169
|
-
|
|
170
|
-
|
|
180
|
+
iconAfterSrc: 'assets/16/More.svg',
|
|
181
|
+
},
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export const Dev = {
|
|
185
|
+
args: {
|
|
186
|
+
...Default.args,
|
|
187
|
+
appearance: 'dev',
|
|
171
188
|
},
|
|
172
189
|
}
|
|
@@ -1,110 +1,109 @@
|
|
|
1
|
-
import { Segmented } from '@itcase/ui/components/Segmented'
|
|
2
|
-
|
|
3
1
|
import {
|
|
4
2
|
borderColorProps,
|
|
5
3
|
borderTypeProps,
|
|
6
4
|
borderWidthProps,
|
|
7
|
-
fillProps,
|
|
8
5
|
fillHoverProps,
|
|
6
|
+
fillProps,
|
|
9
7
|
shapeProps,
|
|
10
8
|
textColorProps,
|
|
11
9
|
textSizeProps,
|
|
12
10
|
textWrapProps,
|
|
13
11
|
widthProps,
|
|
14
|
-
} from '
|
|
12
|
+
} from '../../../constants'
|
|
13
|
+
import { Segmented } from '../Segmented'
|
|
15
14
|
|
|
16
15
|
export default {
|
|
17
|
-
title: 'Atoms / Segmented',
|
|
18
|
-
component: Segmented,
|
|
19
16
|
argTypes: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
name: {
|
|
25
|
-
if: { arg: 'advancedProps' },
|
|
26
|
-
},
|
|
27
|
-
type: {
|
|
28
|
-
if: { arg: 'advancedProps' },
|
|
29
|
-
},
|
|
30
|
-
setActiveSegment: {
|
|
31
|
-
if: { arg: 'advancedProps' },
|
|
17
|
+
width: {
|
|
18
|
+
control: 'inline-radio',
|
|
19
|
+
options: widthProps,
|
|
32
20
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
borderWidth: {
|
|
22
|
+
control: 'inline-radio',
|
|
23
|
+
options: borderWidthProps,
|
|
36
24
|
},
|
|
37
25
|
borderColor: {
|
|
38
|
-
options: borderColorProps,
|
|
39
26
|
control: 'select',
|
|
27
|
+
options: borderColorProps,
|
|
40
28
|
},
|
|
41
|
-
|
|
42
|
-
options: borderWidthProps,
|
|
43
|
-
control: 'inline-radio',
|
|
44
|
-
},
|
|
29
|
+
advancedProps: { control: 'boolean' },
|
|
45
30
|
borderType: {
|
|
46
|
-
options: borderTypeProps,
|
|
47
31
|
control: 'inline-radio',
|
|
32
|
+
options: borderTypeProps,
|
|
48
33
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
control: 'inline-radio',
|
|
34
|
+
className: {
|
|
35
|
+
if: { arg: 'advancedProps' },
|
|
52
36
|
},
|
|
53
37
|
fill: {
|
|
54
|
-
options: fillProps,
|
|
55
38
|
control: 'select',
|
|
39
|
+
options: fillProps,
|
|
56
40
|
},
|
|
57
41
|
fillHover: {
|
|
58
|
-
options: fillHoverProps,
|
|
59
42
|
control: 'select',
|
|
43
|
+
options: fillHoverProps,
|
|
60
44
|
},
|
|
61
|
-
|
|
62
|
-
options: ['normal', 'compact'],
|
|
63
|
-
control: 'inline-radio',
|
|
64
|
-
},
|
|
65
|
-
labelTextColor: {
|
|
66
|
-
options: textColorProps,
|
|
45
|
+
indicatorFill: {
|
|
67
46
|
control: 'select',
|
|
47
|
+
options: fillProps,
|
|
68
48
|
},
|
|
69
49
|
labelTextActiveColor: {
|
|
50
|
+
control: 'select',
|
|
70
51
|
options: textColorProps,
|
|
52
|
+
},
|
|
53
|
+
labelTextColor: {
|
|
71
54
|
control: 'select',
|
|
55
|
+
options: textColorProps,
|
|
72
56
|
},
|
|
73
57
|
labelTextSize: {
|
|
74
|
-
options: textSizeProps,
|
|
75
58
|
control: 'inline-radio',
|
|
59
|
+
options: textSizeProps,
|
|
76
60
|
},
|
|
77
61
|
labelTextWrap: {
|
|
62
|
+
control: 'inline-radio',
|
|
78
63
|
options: textWrapProps,
|
|
64
|
+
},
|
|
65
|
+
name: {
|
|
66
|
+
if: { arg: 'advancedProps' },
|
|
67
|
+
},
|
|
68
|
+
setActiveSegment: {
|
|
69
|
+
if: { arg: 'advancedProps' },
|
|
70
|
+
},
|
|
71
|
+
shape: {
|
|
79
72
|
control: 'inline-radio',
|
|
73
|
+
options: shapeProps,
|
|
80
74
|
},
|
|
81
|
-
|
|
82
|
-
options: widthProps,
|
|
75
|
+
size: {
|
|
83
76
|
control: 'inline-radio',
|
|
77
|
+
options: ['normal', 'compact'],
|
|
78
|
+
},
|
|
79
|
+
type: {
|
|
80
|
+
if: { arg: 'advancedProps' },
|
|
84
81
|
},
|
|
85
82
|
},
|
|
83
|
+
component: Segmented,
|
|
84
|
+
title: 'Atoms / Segmented',
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
export const Default = {
|
|
89
88
|
args: {
|
|
90
89
|
width: 'fill',
|
|
91
|
-
|
|
90
|
+
activeSegment: {
|
|
91
|
+
value: 1,
|
|
92
|
+
},
|
|
92
93
|
fill: 'surfaceSecondary',
|
|
93
94
|
fillHover: 'surfacePrimaryHover',
|
|
94
|
-
shape: 'rounded',
|
|
95
95
|
indicatorFill: 'accentPrimary',
|
|
96
96
|
labelTextActiveColor: 'accentTextPrimary',
|
|
97
97
|
labelTextColor: 'surfaceTextPrimary',
|
|
98
98
|
labelTextSize: 'm',
|
|
99
99
|
labelTextWrap: 'wrap',
|
|
100
100
|
segments: [
|
|
101
|
-
{
|
|
102
|
-
{
|
|
103
|
-
{
|
|
104
|
-
{
|
|
101
|
+
{ label: 'Label 1 Lorem ipsum dolor sit amet', value: 1 },
|
|
102
|
+
{ label: 'Label 2', value: 2 },
|
|
103
|
+
{ label: 'Label 3', value: 3 },
|
|
104
|
+
{ label: 'Label 4', value: 4 },
|
|
105
105
|
],
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
},
|
|
106
|
+
shape: 'rounded',
|
|
107
|
+
size: 'normal',
|
|
109
108
|
},
|
|
110
109
|
}
|