@itcase/ui 1.0.99 → 1.0.101
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/components/Button.js +3 -3
- package/dist/components/DatePicker.js +46 -28
- package/dist/components/FormField.js +1 -1
- package/dist/components/Response.js +246 -0
- package/dist/components/Select.js +62 -65
- package/dist/css/components/Avatar/Avatar.css +1 -1
- 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/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/Response/Response.css +21 -0
- package/dist/css/components/Tile/Tile.css +7 -0
- package/dist/css/components/Tooltip/Tooltip.css +9 -9
- package/dist/{floating-ui.dom-D_Zct5p2.js → floating-ui.dom-C34fOuI9.js} +20 -39
- 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,99 @@
|
|
|
1
|
+
import { Code } from '@itcase/ui/components/Code'
|
|
2
|
+
import {
|
|
3
|
+
textColorHoverProps,
|
|
4
|
+
textWrapProps,
|
|
5
|
+
itemColorProps,
|
|
6
|
+
borderColorProps,
|
|
7
|
+
borderColorHoverProps,
|
|
8
|
+
borderWidthProps,
|
|
9
|
+
textColorProps,
|
|
10
|
+
fillProps,
|
|
11
|
+
textSizeProps,
|
|
12
|
+
} from '@itcase/ui/constants'
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
title: 'Atoms / Code',
|
|
16
|
+
component: Code,
|
|
17
|
+
parameters: {
|
|
18
|
+
controls: {
|
|
19
|
+
exclude: [
|
|
20
|
+
'inputBorderColorHover',
|
|
21
|
+
'inputBorderFocusColor',
|
|
22
|
+
'inputCaretColor',
|
|
23
|
+
'inputPlaceholder',
|
|
24
|
+
'inputType',
|
|
25
|
+
'value',
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
argTypes: {
|
|
30
|
+
advancedProps: { control: 'boolean' },
|
|
31
|
+
after: {
|
|
32
|
+
if: { arg: 'advancedProps' },
|
|
33
|
+
},
|
|
34
|
+
before: {
|
|
35
|
+
if: { arg: 'advancedProps' },
|
|
36
|
+
},
|
|
37
|
+
className: {
|
|
38
|
+
if: { arg: 'advancedProps' },
|
|
39
|
+
},
|
|
40
|
+
gap: {
|
|
41
|
+
control: { type: 'number', min: 1, max: 100, step: 1 },
|
|
42
|
+
},
|
|
43
|
+
inputSize: {
|
|
44
|
+
options: ['normal', 'compact'],
|
|
45
|
+
control: 'inline-radio',
|
|
46
|
+
},
|
|
47
|
+
inputBorderColor: {
|
|
48
|
+
options: borderColorProps,
|
|
49
|
+
control: 'select',
|
|
50
|
+
},
|
|
51
|
+
inputBorderColorHover: {
|
|
52
|
+
options: borderColorHoverProps,
|
|
53
|
+
control: 'inline-radio',
|
|
54
|
+
},
|
|
55
|
+
inputBorderFocusColor: {
|
|
56
|
+
options: borderColorProps,
|
|
57
|
+
control: 'select',
|
|
58
|
+
},
|
|
59
|
+
inputBorderWidth: {
|
|
60
|
+
options: borderWidthProps,
|
|
61
|
+
control: 'inline-radio',
|
|
62
|
+
},
|
|
63
|
+
inputCaretColor: {
|
|
64
|
+
options: textColorProps,
|
|
65
|
+
control: 'select',
|
|
66
|
+
},
|
|
67
|
+
inputCount: {
|
|
68
|
+
control: { type: 'number', min: 4, max: 12, step: 1 },
|
|
69
|
+
},
|
|
70
|
+
inputFill: {
|
|
71
|
+
options: fillProps,
|
|
72
|
+
control: 'select',
|
|
73
|
+
},
|
|
74
|
+
inputFillHover: {
|
|
75
|
+
options: fillProps,
|
|
76
|
+
control: 'select',
|
|
77
|
+
},
|
|
78
|
+
inputPlaceholder: {
|
|
79
|
+
control: { type: 'number', min: 0, max: 9, step: 1 },
|
|
80
|
+
},
|
|
81
|
+
inputShape: {
|
|
82
|
+
options: ['rounded', 'underline'],
|
|
83
|
+
control: 'inline-radio',
|
|
84
|
+
},
|
|
85
|
+
inputTextColor: {
|
|
86
|
+
options: textColorProps,
|
|
87
|
+
control: 'select',
|
|
88
|
+
},
|
|
89
|
+
inputTextSize: {
|
|
90
|
+
options: textSizeProps,
|
|
91
|
+
control: 'inline-radio',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
args: {
|
|
95
|
+
inputCount: 3,
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export const Default = {}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
|
|
3
|
+
import { Button } from '@itcase/ui/components/Button'
|
|
4
|
+
import { DatePickerInput } from '@itcase/ui/components/DatePicker'
|
|
5
|
+
import {
|
|
6
|
+
fillProps,
|
|
7
|
+
iconSizeProps,
|
|
8
|
+
strokeColorProps,
|
|
9
|
+
textColorHoverProps,
|
|
10
|
+
textColorProps,
|
|
11
|
+
textSizeProps,
|
|
12
|
+
} from '@itcase/ui/constants'
|
|
13
|
+
|
|
14
|
+
import { defaultDatepickerProps, defaultInputProps } from 'src/config/forms'
|
|
15
|
+
import { icon16 } from '../../../icons'
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
title: 'Atoms / DatePicker',
|
|
19
|
+
component: (props) => {
|
|
20
|
+
const [value, setValue] = useState(undefined)
|
|
21
|
+
return <DatePickerInput {...props} value={value} onChange={setValue} />
|
|
22
|
+
},
|
|
23
|
+
parameters: {
|
|
24
|
+
docs: {
|
|
25
|
+
story: {
|
|
26
|
+
inline: false,
|
|
27
|
+
iframeHeight: 900,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
argTypes: {
|
|
32
|
+
clearIconSrc: {
|
|
33
|
+
options: [null, 'assets/16/Clear.svg'],
|
|
34
|
+
control: 'inline-radio',
|
|
35
|
+
},
|
|
36
|
+
clearIconSize: {
|
|
37
|
+
options: iconSizeProps,
|
|
38
|
+
control: 'inline-radio',
|
|
39
|
+
if: { arg: 'clearIconSrc', neq: null },
|
|
40
|
+
},
|
|
41
|
+
clearIconItemFill: {
|
|
42
|
+
options: fillProps,
|
|
43
|
+
control: 'select',
|
|
44
|
+
if: { arg: 'clearIconSrc', neq: null },
|
|
45
|
+
},
|
|
46
|
+
clearIconItemFillHover: {
|
|
47
|
+
options: strokeColorProps,
|
|
48
|
+
control: 'select',
|
|
49
|
+
if: { arg: 'clearIconSrc', neq: null },
|
|
50
|
+
},
|
|
51
|
+
clearLabelTextSize: {
|
|
52
|
+
options: textSizeProps,
|
|
53
|
+
control: 'select',
|
|
54
|
+
if: { arg: 'clearLabel', neq: '' },
|
|
55
|
+
},
|
|
56
|
+
clearLabelTextColor: {
|
|
57
|
+
options: textColorProps,
|
|
58
|
+
control: 'select',
|
|
59
|
+
if: { arg: 'clearLabel', neq: '' },
|
|
60
|
+
},
|
|
61
|
+
clearLabelTextColorHover: {
|
|
62
|
+
options: textColorHoverProps,
|
|
63
|
+
control: 'select',
|
|
64
|
+
if: { arg: 'clearLabel', neq: '' },
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
args: {
|
|
68
|
+
clearLabel: '',
|
|
69
|
+
clearLabelTextSize: 'm',
|
|
70
|
+
clearLabelTextColor: 'surfaceTextPrimary',
|
|
71
|
+
clearLabelTextColorHover: 'surfaceTextPrimaryHover',
|
|
72
|
+
inputProps: defaultInputProps,
|
|
73
|
+
datePickerProps: {
|
|
74
|
+
...defaultDatepickerProps,
|
|
75
|
+
isStartDefaultNull: true,
|
|
76
|
+
isClearable: true,
|
|
77
|
+
readOnly: false,
|
|
78
|
+
onKeyDown: (e) => {
|
|
79
|
+
e.preventDefault()
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export const Default = {
|
|
86
|
+
args: {},
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const Date = {
|
|
90
|
+
args: {
|
|
91
|
+
datePickerProps: defaultDatepickerProps,
|
|
92
|
+
},
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const ClearIcon = {
|
|
96
|
+
args: {
|
|
97
|
+
clearIcon: icon16.Clear,
|
|
98
|
+
clearIconSize: 16,
|
|
99
|
+
clearIconItemFill: 'surfaceItemTertiary',
|
|
100
|
+
clearIconItemFillHover: 'surfaceItemPrimary',
|
|
101
|
+
datePickerProps: {
|
|
102
|
+
...defaultDatepickerProps,
|
|
103
|
+
isStartDefaultNull: true,
|
|
104
|
+
isClearable: true,
|
|
105
|
+
readOnly: false,
|
|
106
|
+
onKeyDown: (e) => {
|
|
107
|
+
e.preventDefault()
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export const ClearLabel = {
|
|
114
|
+
args: {
|
|
115
|
+
clearLabel: 'Clear',
|
|
116
|
+
clearLabelTextSize: 'm',
|
|
117
|
+
clearLabelTextColor: 'surfaceTextPrimary',
|
|
118
|
+
clearLabelTextColorHover: 'surfaceTextAccent',
|
|
119
|
+
datePickerProps: {
|
|
120
|
+
...defaultDatepickerProps,
|
|
121
|
+
isStartDefaultNull: true,
|
|
122
|
+
isClearable: true,
|
|
123
|
+
readOnly: false,
|
|
124
|
+
onKeyDown: (e) => {
|
|
125
|
+
e.preventDefault()
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export const DateTime = {
|
|
132
|
+
args: {
|
|
133
|
+
datePickerProps: {
|
|
134
|
+
...defaultDatepickerProps,
|
|
135
|
+
dateFormat: 'dd-MM-yyyy hh:mm',
|
|
136
|
+
timeFormat: 'p',
|
|
137
|
+
timeIntervals: 15,
|
|
138
|
+
timeCaption: 'Время',
|
|
139
|
+
showTimeSelect: true,
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export const DateMultiple = {
|
|
145
|
+
args: {
|
|
146
|
+
datePickerProps: {
|
|
147
|
+
...defaultDatepickerProps,
|
|
148
|
+
placeholderText: 'Start – End (m/d/yyyy)',
|
|
149
|
+
monthsShown: 2,
|
|
150
|
+
selectsRange: true,
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export const DateButton = {
|
|
156
|
+
args: {
|
|
157
|
+
datePickerProps: {
|
|
158
|
+
...defaultDatepickerProps,
|
|
159
|
+
dateFormat: 'dd-MM-yyyy hh:mm',
|
|
160
|
+
timeFormat: 'p',
|
|
161
|
+
timeIntervals: 15,
|
|
162
|
+
timeCaption: 'Время',
|
|
163
|
+
showTimeSelect: true,
|
|
164
|
+
showTimeInput: true,
|
|
165
|
+
timeInputLabel: null,
|
|
166
|
+
customTimeInput: (
|
|
167
|
+
<Button
|
|
168
|
+
appearance="accent"
|
|
169
|
+
label="OK"
|
|
170
|
+
labelTextSize="l"
|
|
171
|
+
shape="rounded"
|
|
172
|
+
size="xl"
|
|
173
|
+
width="fill"
|
|
174
|
+
/>
|
|
175
|
+
),
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { Divider } from '@itcase/ui/components/Divider'
|
|
2
|
+
|
|
3
|
+
import { fillHoverProps } from '@itcase/ui/constants'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Atoms / Divider',
|
|
7
|
+
component: Divider,
|
|
8
|
+
parameters: {
|
|
9
|
+
controls: {
|
|
10
|
+
exclude: [
|
|
11
|
+
'direction',
|
|
12
|
+
'directionDesktop',
|
|
13
|
+
'directionTablet',
|
|
14
|
+
'directionMobile',
|
|
15
|
+
'fillDesktop',
|
|
16
|
+
'fillTablet',
|
|
17
|
+
'fillMobile',
|
|
18
|
+
'size',
|
|
19
|
+
'sizeDesktop',
|
|
20
|
+
'sizeTablet',
|
|
21
|
+
'sizeMobile',
|
|
22
|
+
'widthDesktop',
|
|
23
|
+
'widthTablet',
|
|
24
|
+
'widthMobile',
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
argTypes: {
|
|
29
|
+
advancedProps: { control: 'boolean' },
|
|
30
|
+
className: {
|
|
31
|
+
if: { arg: 'advancedProps' },
|
|
32
|
+
},
|
|
33
|
+
children: {
|
|
34
|
+
if: { arg: 'advancedProps' },
|
|
35
|
+
},
|
|
36
|
+
fill: {
|
|
37
|
+
options: [
|
|
38
|
+
'surfacePrimary',
|
|
39
|
+
'surfaceSecondary',
|
|
40
|
+
'surfaceTertiary',
|
|
41
|
+
'surfaceQuaternary',
|
|
42
|
+
'accentPrimary',
|
|
43
|
+
'primaryPrimary',
|
|
44
|
+
'secondaryPrimary',
|
|
45
|
+
],
|
|
46
|
+
control: 'inline-radio',
|
|
47
|
+
},
|
|
48
|
+
fillHover: {
|
|
49
|
+
options: fillHoverProps,
|
|
50
|
+
control: 'select',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const Horizontal = {
|
|
56
|
+
args: {
|
|
57
|
+
width: 300,
|
|
58
|
+
height: 3,
|
|
59
|
+
fill: 'surfaceTertiary',
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const SurfacePrimary = {
|
|
64
|
+
args: {
|
|
65
|
+
...Horizontal.args,
|
|
66
|
+
width: 300,
|
|
67
|
+
height: 3,
|
|
68
|
+
fill: 'surfacePrimary',
|
|
69
|
+
},
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export const SurfaceSecondary = {
|
|
73
|
+
args: {
|
|
74
|
+
...Horizontal.args,
|
|
75
|
+
width: 300,
|
|
76
|
+
height: 3,
|
|
77
|
+
fill: 'surfaceSecondary',
|
|
78
|
+
},
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export const SurfaceTertiary = {
|
|
82
|
+
args: {
|
|
83
|
+
...Horizontal.args,
|
|
84
|
+
width: 300,
|
|
85
|
+
height: 3,
|
|
86
|
+
fill: 'surfaceTertiary',
|
|
87
|
+
},
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export const SurfaceQuaternary = {
|
|
91
|
+
args: {
|
|
92
|
+
...Horizontal.args,
|
|
93
|
+
width: 300,
|
|
94
|
+
height: 3,
|
|
95
|
+
fill: 'surfaceQuaternary',
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export const AccentPrimary = {
|
|
100
|
+
args: {
|
|
101
|
+
...Horizontal.args,
|
|
102
|
+
width: 300,
|
|
103
|
+
height: 3,
|
|
104
|
+
fill: 'accentPrimary',
|
|
105
|
+
},
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export const PrimaryPrimary = {
|
|
109
|
+
args: {
|
|
110
|
+
...Horizontal.args,
|
|
111
|
+
width: 300,
|
|
112
|
+
height: 3,
|
|
113
|
+
fill: 'primaryPrimary',
|
|
114
|
+
},
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export const SecondaryPrimary = {
|
|
118
|
+
args: {
|
|
119
|
+
...Horizontal.args,
|
|
120
|
+
width: 300,
|
|
121
|
+
height: 3,
|
|
122
|
+
fill: 'secondaryPrimary',
|
|
123
|
+
},
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export const Vertical = {
|
|
127
|
+
args: {
|
|
128
|
+
width: 3,
|
|
129
|
+
height: 300,
|
|
130
|
+
fill: 'surfaceTertiary',
|
|
131
|
+
},
|
|
132
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Dot } from '@itcase/ui/components/Dot'
|
|
2
|
+
import {
|
|
3
|
+
borderColorProps,
|
|
4
|
+
borderTypeProps,
|
|
5
|
+
borderWidthProps,
|
|
6
|
+
borderColorHoverProps,
|
|
7
|
+
textColorProps,
|
|
8
|
+
fillProps,
|
|
9
|
+
sizeProps,
|
|
10
|
+
shapeProps,
|
|
11
|
+
} from '@itcase/ui/constants'
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
title: 'Atoms / Dot',
|
|
15
|
+
component: Dot,
|
|
16
|
+
parameters: {
|
|
17
|
+
controls: {
|
|
18
|
+
exclude: [
|
|
19
|
+
'borderDesktop',
|
|
20
|
+
'borderMobile',
|
|
21
|
+
'borderTablet',
|
|
22
|
+
'borderTypeDesktop',
|
|
23
|
+
'borderTypeMobile',
|
|
24
|
+
'borderTypeTablet',
|
|
25
|
+
'fillDesktop',
|
|
26
|
+
'fillMobile',
|
|
27
|
+
'fillTablet',
|
|
28
|
+
'shapeDesktop',
|
|
29
|
+
'shapeMobile',
|
|
30
|
+
'shapeTablet',
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
argTypes: {
|
|
35
|
+
advancedProps: { control: 'boolean' },
|
|
36
|
+
className: {
|
|
37
|
+
if: { arg: 'advancedProps' },
|
|
38
|
+
},
|
|
39
|
+
children: {
|
|
40
|
+
if: { arg: 'advancedProps' },
|
|
41
|
+
},
|
|
42
|
+
border: {
|
|
43
|
+
options: borderColorProps,
|
|
44
|
+
control: 'select',
|
|
45
|
+
},
|
|
46
|
+
borderType: {
|
|
47
|
+
options: borderTypeProps,
|
|
48
|
+
control: 'inline-radio',
|
|
49
|
+
},
|
|
50
|
+
fill: {
|
|
51
|
+
options: fillProps,
|
|
52
|
+
control: 'select',
|
|
53
|
+
},
|
|
54
|
+
shape: {
|
|
55
|
+
options: shapeProps,
|
|
56
|
+
control: 'inline-radio',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
args: {
|
|
60
|
+
shape: 'circular',
|
|
61
|
+
},
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const Default = {
|
|
65
|
+
args: {
|
|
66
|
+
fill: 'accentPrimary',
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const Accent = {
|
|
71
|
+
args: {
|
|
72
|
+
fill: 'accentPrimary',
|
|
73
|
+
},
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const Primary = {
|
|
77
|
+
args: {
|
|
78
|
+
fill: 'primaryPrimary',
|
|
79
|
+
},
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const Secondary = {
|
|
83
|
+
args: {
|
|
84
|
+
fill: 'secondaryPrimary',
|
|
85
|
+
},
|
|
86
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import { Dropdown, DropdownItem } from '@itcase/ui/components/Dropdown'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Atoms / Dropdown / Default',
|
|
7
|
+
component: Dropdown,
|
|
8
|
+
argTypes: {
|
|
9
|
+
advancedProps: { control: 'boolean' },
|
|
10
|
+
className: {
|
|
11
|
+
if: { arg: 'advancedProps' },
|
|
12
|
+
control: 'text',
|
|
13
|
+
},
|
|
14
|
+
animationOpen: {
|
|
15
|
+
if: { arg: 'advancedProps' },
|
|
16
|
+
},
|
|
17
|
+
animationClose: {
|
|
18
|
+
if: { arg: 'advancedProps' },
|
|
19
|
+
},
|
|
20
|
+
isCloseByClickOutside: {
|
|
21
|
+
if: { arg: 'advancedProps' },
|
|
22
|
+
},
|
|
23
|
+
elevation: {
|
|
24
|
+
options: [null, 1, 2, 4, 6, 8, 12, 16, 24],
|
|
25
|
+
control: 'inline-radio',
|
|
26
|
+
},
|
|
27
|
+
isOpen: {
|
|
28
|
+
control: 'boolean',
|
|
29
|
+
},
|
|
30
|
+
shape: {
|
|
31
|
+
options: [null, 'geometric', 'rounded'],
|
|
32
|
+
control: 'inline-radio',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const Default = {
|
|
38
|
+
args: {
|
|
39
|
+
shape: 'rounded',
|
|
40
|
+
elevation: 8,
|
|
41
|
+
isOpen: true,
|
|
42
|
+
children: (
|
|
43
|
+
<React.Fragment>
|
|
44
|
+
<DropdownItem
|
|
45
|
+
size="normal"
|
|
46
|
+
fill="surfacePrimary"
|
|
47
|
+
fillHover="surfacePrimaryHover"
|
|
48
|
+
label="Label Primary"
|
|
49
|
+
labelTextSize="m"
|
|
50
|
+
labelTextWrap="nowrap"
|
|
51
|
+
labelTextColor="surfaceTextPrimary"
|
|
52
|
+
/>
|
|
53
|
+
<DropdownItem
|
|
54
|
+
size="normal"
|
|
55
|
+
fill="surfacePrimary"
|
|
56
|
+
fillHover="surfacePrimaryHover"
|
|
57
|
+
label="Label Secondary"
|
|
58
|
+
labelTextWrap="nowrap"
|
|
59
|
+
labelTextSize="m"
|
|
60
|
+
labelTextColor="surfaceTextPrimary"
|
|
61
|
+
/>
|
|
62
|
+
<DropdownItem
|
|
63
|
+
size="normal"
|
|
64
|
+
fill="surfacePrimary"
|
|
65
|
+
fillHover="surfacePrimaryHover"
|
|
66
|
+
labelTextWrap="nowrap"
|
|
67
|
+
label="Label Tertiary"
|
|
68
|
+
labelTextSize="m"
|
|
69
|
+
labelTextColor="surfaceTextPrimary"
|
|
70
|
+
/>
|
|
71
|
+
</React.Fragment>
|
|
72
|
+
),
|
|
73
|
+
},
|
|
74
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import { DropdownItem } from '@itcase/ui/components/Dropdown'
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
textColorProps,
|
|
7
|
+
textSizeProps,
|
|
8
|
+
fillProps,
|
|
9
|
+
fillHoverProps,
|
|
10
|
+
textWrapProps,
|
|
11
|
+
} from '@itcase/ui/constants'
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
title: 'Atoms / Dropdown / Item',
|
|
15
|
+
component: DropdownItem,
|
|
16
|
+
parameters: {
|
|
17
|
+
controls: {
|
|
18
|
+
exclude: [
|
|
19
|
+
'fillDesktop',
|
|
20
|
+
'fillTablet',
|
|
21
|
+
'fillMobile',
|
|
22
|
+
'linkFillDesktop',
|
|
23
|
+
'linkFillTablet',
|
|
24
|
+
'linkFillMobile',
|
|
25
|
+
'sizeDesktop',
|
|
26
|
+
'sizeTablet',
|
|
27
|
+
'sizeMobile',
|
|
28
|
+
'shapeDesktop',
|
|
29
|
+
'shapeTablet',
|
|
30
|
+
'shapeMobile',
|
|
31
|
+
'typeDesktop',
|
|
32
|
+
'typeTablet',
|
|
33
|
+
'typeMobile',
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
argTypes: {
|
|
38
|
+
advancedProps: { control: 'boolean' },
|
|
39
|
+
after: {
|
|
40
|
+
if: { arg: 'advancedProps' },
|
|
41
|
+
},
|
|
42
|
+
before: {
|
|
43
|
+
if: { arg: 'advancedProps' },
|
|
44
|
+
},
|
|
45
|
+
children: {
|
|
46
|
+
if: { arg: 'advancedProps' },
|
|
47
|
+
control: 'text',
|
|
48
|
+
},
|
|
49
|
+
className: {
|
|
50
|
+
if: { arg: 'advancedProps' },
|
|
51
|
+
control: 'text',
|
|
52
|
+
},
|
|
53
|
+
desc: {
|
|
54
|
+
if: { arg: 'advancedProps' },
|
|
55
|
+
control: 'text',
|
|
56
|
+
},
|
|
57
|
+
href: {
|
|
58
|
+
if: { arg: 'advancedProps' },
|
|
59
|
+
},
|
|
60
|
+
link: {
|
|
61
|
+
if: { arg: 'advancedProps' },
|
|
62
|
+
},
|
|
63
|
+
linkFill: {
|
|
64
|
+
if: { arg: 'advancedProps' },
|
|
65
|
+
},
|
|
66
|
+
LinkComponent: {
|
|
67
|
+
if: { arg: 'advancedProps' },
|
|
68
|
+
},
|
|
69
|
+
onClick: {
|
|
70
|
+
if: { arg: 'advancedProps' },
|
|
71
|
+
control: 'text',
|
|
72
|
+
},
|
|
73
|
+
onMouseEnter: {
|
|
74
|
+
if: { arg: 'advancedProps' },
|
|
75
|
+
control: 'text',
|
|
76
|
+
},
|
|
77
|
+
rel: {
|
|
78
|
+
if: { arg: 'advancedProps' },
|
|
79
|
+
},
|
|
80
|
+
target: {
|
|
81
|
+
if: { arg: 'advancedProps' },
|
|
82
|
+
},
|
|
83
|
+
type: {
|
|
84
|
+
if: { arg: 'advancedProps' },
|
|
85
|
+
},
|
|
86
|
+
underline: {
|
|
87
|
+
if: { arg: 'advancedProps' },
|
|
88
|
+
},
|
|
89
|
+
fill: {
|
|
90
|
+
options: fillProps,
|
|
91
|
+
control: 'select',
|
|
92
|
+
},
|
|
93
|
+
fillHover: {
|
|
94
|
+
options: fillHoverProps,
|
|
95
|
+
control: 'select',
|
|
96
|
+
},
|
|
97
|
+
labelTextColor: {
|
|
98
|
+
options: textColorProps,
|
|
99
|
+
control: 'select',
|
|
100
|
+
},
|
|
101
|
+
labelTextSize: {
|
|
102
|
+
options: textSizeProps,
|
|
103
|
+
control: 'inline-radio',
|
|
104
|
+
},
|
|
105
|
+
labelTextWrap: {
|
|
106
|
+
options: textWrapProps,
|
|
107
|
+
control: 'select',
|
|
108
|
+
},
|
|
109
|
+
set: {
|
|
110
|
+
options: [null, 'normal', 'compact'],
|
|
111
|
+
control: 'inline-radio',
|
|
112
|
+
},
|
|
113
|
+
size: {
|
|
114
|
+
options: [null, 'normal', 'compact'],
|
|
115
|
+
control: 'inline-radio',
|
|
116
|
+
},
|
|
117
|
+
shape: {
|
|
118
|
+
options: [null, 'geometric', 'rounded'],
|
|
119
|
+
control: 'inline-radio',
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export const Default = {
|
|
125
|
+
args: {
|
|
126
|
+
set: 'normal',
|
|
127
|
+
shape: 'rounded',
|
|
128
|
+
isOpen: true,
|
|
129
|
+
size: 'normal',
|
|
130
|
+
fill: 'surfacePrimary',
|
|
131
|
+
fillHover: 'surfacePrimaryHover',
|
|
132
|
+
label: 'Label',
|
|
133
|
+
labelTextSize: 'm',
|
|
134
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
135
|
+
},
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export const Active = {
|
|
139
|
+
args: {
|
|
140
|
+
...Default.args,
|
|
141
|
+
},
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export const Disabled = {
|
|
145
|
+
args: {
|
|
146
|
+
...Default.args,
|
|
147
|
+
fill: 'surfaceSecondary',
|
|
148
|
+
fillHover: null,
|
|
149
|
+
labelTextColor: 'surfaceTextSecondary',
|
|
150
|
+
labelTextWrap: 'nowrap',
|
|
151
|
+
},
|
|
152
|
+
}
|