@itcase/ui 1.0.100 → 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.
Files changed (58) hide show
  1. package/dist/css/components/Badge/Badge.css +1 -1
  2. package/dist/css/components/Checkbox/Checkbox.css +2 -1
  3. package/dist/css/components/DatePicker/DatePicker.css +1 -1
  4. package/dist/css/components/Menu/Menu.css +3 -2
  5. package/dist/css/components/MenuItem/MenuItem.css +26 -0
  6. package/dist/css/components/Pagination/Pagination.css +5 -3
  7. package/dist/css/components/Pagination/css/__item/pagination__item.css +4 -3
  8. package/dist/css/components/Pagination/css/__item/pagination__item_state_disabled.css +1 -0
  9. package/dist/css/components/Tile/Tile.css +7 -0
  10. package/dist/css/components/Tooltip/Tooltip.css +9 -9
  11. package/dist/stories/Accordion.stories.js +88 -0
  12. package/dist/stories/AccordionItem.stories.js +150 -0
  13. package/dist/stories/Badge.stories.js +116 -0
  14. package/dist/stories/Button.stories.js +287 -0
  15. package/dist/stories/Checkbox.stories.js +116 -0
  16. package/dist/stories/Chips.stories.js +151 -0
  17. package/dist/stories/Choice.stories.js +117 -0
  18. package/dist/stories/Code.stories.js +99 -0
  19. package/dist/stories/DatePicker.stories.js +178 -0
  20. package/dist/stories/Divider.stories.js +132 -0
  21. package/dist/stories/Dot.stories.js +86 -0
  22. package/dist/stories/Dropdown.stories.js +74 -0
  23. package/dist/stories/DropdownItem.stories.js +152 -0
  24. package/dist/stories/Empty.stories.js +115 -0
  25. package/dist/stories/FormFieldCheckbox.stories.js +77 -0
  26. package/dist/stories/FormFieldChoice.stories.js +75 -0
  27. package/dist/stories/FormFieldDatepicker.stories.js +51 -0
  28. package/dist/stories/FormFieldFileInput.stories.js +58 -0
  29. package/dist/stories/FormFieldInput.stories.js +66 -0
  30. package/dist/stories/FormFieldInputPassword.stories.js +66 -0
  31. package/dist/stories/FormFieldMultiBadgeSelect.stories.js +132 -0
  32. package/dist/stories/FormFieldMultiSelect.stories.js +127 -0
  33. package/dist/stories/FormFieldSelect.stories.js +99 -0
  34. package/dist/stories/FormFieldSelectGroup.stories.js +84 -0
  35. package/dist/stories/Icon.stories.js +208 -0
  36. package/dist/stories/Input.stories.js +124 -0
  37. package/dist/stories/InputPassword.stories.js +114 -0
  38. package/dist/stories/Label.stories.js +163 -0
  39. package/dist/stories/Loader.stories.js +121 -0
  40. package/dist/stories/Logo.stories.js +99 -0
  41. package/dist/stories/MenuItem.stories.js +193 -0
  42. package/dist/stories/ModalConfirm.stories.js +61 -0
  43. package/dist/stories/ModalDefault.stories.js +34 -0
  44. package/dist/stories/NotFound.stories.js +94 -0
  45. package/dist/stories/Notification.stories.js +128 -0
  46. package/dist/stories/Pagination.stories.js +66 -0
  47. package/dist/stories/RadioButton.stories.js +101 -0
  48. package/dist/stories/Search-input.stories.js +182 -0
  49. package/dist/stories/Segmented.stories.js +110 -0
  50. package/dist/stories/Select.stories.js +280 -0
  51. package/dist/stories/Switch.stories.js +84 -0
  52. package/dist/stories/Tab.appearance.stories.js +260 -0
  53. package/dist/stories/Tab.group.stories.js +149 -0
  54. package/dist/stories/Tab.size.stories.js +259 -0
  55. package/dist/stories/Tab.state.stories.js +227 -0
  56. package/dist/stories/Textarea.stories.js +90 -0
  57. package/dist/stories/Tile.stories.js +235 -0
  58. package/package.json +1 -1
@@ -0,0 +1,114 @@
1
+ import { icon24 } from 'src/icons'
2
+
3
+ import { InputPassword, inputPasswordConfig } from '@itcase/ui/components/InputPassword'
4
+ import inputPasswordState from 'src/components/InputPassword/state.json'
5
+ import {
6
+ borderColorProps,
7
+ fillProps,
8
+ iconSizeProps,
9
+ textColorProps,
10
+ textSizeProps,
11
+ } from '@itcase/ui/constants'
12
+
13
+ inputPasswordConfig.setState(inputPasswordState)
14
+
15
+ export default {
16
+ title: 'Atoms / InputPassword',
17
+ component: InputPassword,
18
+ argTypes: {
19
+ advancedProps: { control: 'boolean' },
20
+ className: {
21
+ if: { arg: 'advancedProps' },
22
+ },
23
+ id: {
24
+ if: { arg: 'advancedProps' },
25
+ },
26
+ onBlur: {
27
+ if: { arg: 'advancedProps' },
28
+ },
29
+ onChange: {
30
+ if: { arg: 'advancedProps' },
31
+ },
32
+ onKeyDown: {
33
+ if: { arg: 'advancedProps' },
34
+ },
35
+ borderColor: {
36
+ options: borderColorProps,
37
+ control: 'select',
38
+ },
39
+ checked: {
40
+ control: 'boolean',
41
+ },
42
+ disabled: {
43
+ control: 'boolean',
44
+ },
45
+ iconFill: {
46
+ options: fillProps,
47
+ control: 'select',
48
+ },
49
+ iconSize: {
50
+ options: iconSizeProps,
51
+ control: 'inline-radio',
52
+ },
53
+ shape: {
54
+ options: [null, 'rounded', 'underline'],
55
+ control: 'inline-radio',
56
+ },
57
+ size: {
58
+ options: ['xs', 's', 'm', 'l', 'xl', 'xxl', 'normal', 'tiny', 'compact', 'large'],
59
+ control: 'inline-radio',
60
+ },
61
+ state: {
62
+ options: [
63
+ null,
64
+ 'normal',
65
+ 'filled',
66
+ 'active',
67
+ 'activeFilled',
68
+ 'error',
69
+ 'errorFilled',
70
+ 'readonly',
71
+ 'disabled',
72
+ 'success',
73
+ 'require',
74
+ ],
75
+ control: 'inline-radio',
76
+ },
77
+ textColor: {
78
+ options: textColorProps,
79
+ control: 'select',
80
+ },
81
+ textSize: {
82
+ options: textSizeProps,
83
+ control: 'inline-radio',
84
+ },
85
+ },
86
+ }
87
+
88
+ export const Default = {
89
+ args: {
90
+ borderColor: 'surfaceBorderTertiary',
91
+ placeholder: 'Placeholder',
92
+ shape: 'rounded',
93
+ textSize: 'm',
94
+ isRevealable: true,
95
+ iconFill: 'surfaceItemTertiary',
96
+ iconRevealableHide: icon24.HidePassword,
97
+ iconRevealableShow: icon24.ShowPassword,
98
+ iconSize: 24,
99
+ value: 'password',
100
+ },
101
+ }
102
+
103
+ export const Hide = {
104
+ args: {
105
+ ...Default.args,
106
+ },
107
+ }
108
+
109
+ export const Disabled = {
110
+ args: {
111
+ ...Default.args,
112
+ disabled: true,
113
+ },
114
+ }
@@ -0,0 +1,163 @@
1
+ import { Label, labelConfig } from '@itcase/ui/components/Label'
2
+ import {
3
+ borderColorProps,
4
+ borderTypeProps,
5
+ fillProps,
6
+ shapeProps,
7
+ sizeProps,
8
+ textColorProps,
9
+ textSizeProps,
10
+ widthProps,
11
+ } from '@itcase/ui/constants'
12
+
13
+ import labelAppearance from 'src/components/Label/appearance.json'
14
+
15
+ labelConfig.setAppearance(labelAppearance)
16
+
17
+ export default {
18
+ title: 'Atoms / Label ',
19
+ component: Label,
20
+ parameters: {
21
+ controls: {
22
+ exclude: [
23
+ 'borderDesktop',
24
+ 'borderMobile',
25
+ 'borderTablet',
26
+ 'borderTypeDesktop',
27
+ 'borderTypeMobile',
28
+ 'borderTypeTablet',
29
+ 'fillDesktop',
30
+ 'fillMobile',
31
+ 'fillTablet',
32
+ 'labelTextSizeDesktop',
33
+ 'labelTextSizeMobile',
34
+ 'labelTextSizeTablet',
35
+ 'shapeDesktop',
36
+ 'shapeMobile',
37
+ 'shapeTablet',
38
+ 'sizeDesktop',
39
+ 'sizeMobile',
40
+ 'sizeTablet',
41
+ ],
42
+ },
43
+ },
44
+ argTypes: {
45
+ advancedProps: { control: 'boolean' },
46
+ children: {
47
+ if: { arg: 'advancedProps' },
48
+ },
49
+ className: {
50
+ if: { arg: 'advancedProps' },
51
+ },
52
+ appearance: {
53
+ options: [
54
+ null,
55
+ 'accent',
56
+ 'primary',
57
+ 'secondary',
58
+ 'surfacePrimary',
59
+ 'surfaceSecondary',
60
+ 'surfaceTertiary',
61
+ ],
62
+ control: 'inline-radio',
63
+ },
64
+ border: {
65
+ options: borderColorProps,
66
+ control: 'select',
67
+ },
68
+ borderType: {
69
+ options: borderTypeProps,
70
+ control: 'inline-radio',
71
+ },
72
+ fill: {
73
+ options: fillProps,
74
+ control: 'select',
75
+ },
76
+ labelTextColor: {
77
+ options: textColorProps,
78
+ control: 'select',
79
+ },
80
+ labelTextSize: {
81
+ options: textSizeProps,
82
+ control: 'inline-radio',
83
+ },
84
+ shape: {
85
+ options: shapeProps,
86
+ control: 'inline-radio',
87
+ },
88
+ size: {
89
+ options: sizeProps,
90
+ control: 'inline-radio',
91
+ },
92
+ textAlign: {
93
+ options: ['left', 'center', 'right'],
94
+ control: 'inline-radio',
95
+ },
96
+ width: {
97
+ options: widthProps,
98
+ control: 'inline-radio',
99
+ },
100
+ mode: {
101
+ options: [null, 'skeleton'],
102
+ control: 'inline-radio',
103
+ },
104
+ },
105
+ }
106
+
107
+ export const Default = {
108
+ args: {
109
+ appearance: 'accent',
110
+ shape: 'rounded',
111
+ label: 'Label',
112
+ size: 'xxl',
113
+ labelTextSize: 'l',
114
+ },
115
+ }
116
+ export const Accent = {
117
+ args: {
118
+ ...Default.args,
119
+ appearance: 'accent',
120
+ },
121
+ }
122
+
123
+ export const Primary = {
124
+ args: {
125
+ ...Default.args,
126
+ appearance: 'primary',
127
+ },
128
+ }
129
+
130
+ export const Secondary = {
131
+ args: {
132
+ ...Default.args,
133
+ appearance: 'secondary',
134
+ },
135
+ }
136
+
137
+ export const SurfacePrimary = {
138
+ args: {
139
+ ...Default.args,
140
+ appearance: 'surfacePrimary',
141
+ },
142
+ }
143
+
144
+ export const SurfaceSecondary = {
145
+ args: {
146
+ ...Default.args,
147
+ appearance: 'surfaceSecondary',
148
+ },
149
+ }
150
+
151
+ export const SurfaceTertiary = {
152
+ args: {
153
+ ...Default.args,
154
+ appearance: 'surfaceTertiary',
155
+ },
156
+ }
157
+
158
+ export const SkeletonMode = {
159
+ args: {
160
+ ...Default.args,
161
+ mode: 'skeleton',
162
+ },
163
+ }
@@ -0,0 +1,121 @@
1
+ import { Loader, loaderConfig } from '@itcase/ui/components/Loader'
2
+ import loaderAppearance from 'src/components/Loader/appearance.json'
3
+
4
+ import {
5
+ fillProps,
6
+ heightProps,
7
+ positionProps,
8
+ textColorProps,
9
+ textSizeProps,
10
+ widthProps,
11
+ } from '@itcase/ui/constants'
12
+
13
+ loaderConfig.setAppearance(loaderAppearance)
14
+
15
+ export default {
16
+ title: 'Atoms / Loader',
17
+ component: Loader,
18
+ argTypes: {
19
+ advancedProps: { control: 'boolean' },
20
+ left: {
21
+ if: { arg: 'advancedProps' },
22
+ },
23
+ right: {
24
+ if: { arg: 'advancedProps' },
25
+ },
26
+ children: {
27
+ if: { arg: 'advancedProps' },
28
+ },
29
+ className: {
30
+ if: { arg: 'advancedProps' },
31
+ },
32
+ position: {
33
+ options: positionProps,
34
+ control: 'inline-radio',
35
+ if: { arg: 'advancedProps' },
36
+ },
37
+ appearance: {
38
+ options: [
39
+ null,
40
+ 'accent',
41
+ 'primary',
42
+ 'secondary',
43
+ 'surfacePrimary',
44
+ 'surfaceSecondary',
45
+ 'surfaceTertiary',
46
+ ],
47
+ control: 'inline-radio',
48
+ },
49
+ width: {
50
+ options: widthProps,
51
+ control: 'inline-radio',
52
+ },
53
+ height: {
54
+ options: heightProps,
55
+ control: 'inline-radio',
56
+ },
57
+ textColor: {
58
+ options: textColorProps,
59
+ control: 'select',
60
+ },
61
+ textSize: {
62
+ options: textSizeProps,
63
+ control: 'inline-radio',
64
+ },
65
+ set: {
66
+ options: [null, 'simple'],
67
+ control: 'inline-radio',
68
+ },
69
+ },
70
+ }
71
+
72
+ export const Default = {
73
+ args: {
74
+ appearance: 'surfacePrimary',
75
+ set: 'simple',
76
+ text: 'Text',
77
+ textSize: 'm',
78
+ },
79
+ }
80
+
81
+ export const Accent = {
82
+ args: {
83
+ ...Default.args,
84
+ appearance: 'accent',
85
+ },
86
+ }
87
+
88
+ export const Primary = {
89
+ args: {
90
+ ...Default.args,
91
+ appearance: 'primary',
92
+ },
93
+ }
94
+
95
+ export const Secondary = {
96
+ args: {
97
+ ...Default.args,
98
+ appearance: 'secondary',
99
+ },
100
+ }
101
+
102
+ export const SurfacePrimary = {
103
+ args: {
104
+ ...Default.args,
105
+ appearance: 'surfacePrimary',
106
+ },
107
+ }
108
+
109
+ export const SurfaceSecondary = {
110
+ args: {
111
+ ...Default.args,
112
+ appearance: 'surfaceSecondary',
113
+ },
114
+ }
115
+
116
+ export const SurfaceTertiary = {
117
+ args: {
118
+ ...Default.args,
119
+ appearance: 'surfaceTertiary',
120
+ },
121
+ }
@@ -0,0 +1,99 @@
1
+ import { Logo } from '@itcase/ui/components/Logo'
2
+ import { alignDirectionProps, alignProps, widthProps } from '@itcase/ui/constants'
3
+
4
+ export default {
5
+ title: 'Atoms / Logo',
6
+ component: Logo,
7
+ argTypes: {
8
+ advancedProps: { control: 'boolean' },
9
+ children: {
10
+ if: { arg: 'advancedProps' },
11
+ },
12
+ className: {
13
+ if: { arg: 'advancedProps' },
14
+ },
15
+ isLink: {
16
+ if: { arg: 'advancedProps' },
17
+ },
18
+ logoSrc: {
19
+ if: { arg: 'advancedProps' },
20
+ },
21
+ target: {
22
+ if: { arg: 'advancedProps' },
23
+ },
24
+ align: {
25
+ options: alignProps,
26
+ control: 'inline-radio',
27
+ },
28
+ alignItems: {
29
+ options: alignProps,
30
+ control: 'inline-radio',
31
+ },
32
+ alignDirection: {
33
+ options: alignDirectionProps,
34
+ control: 'inline-radio',
35
+ },
36
+ width: {
37
+ options: widthProps,
38
+ control: 'inline-radio',
39
+ },
40
+ link: {
41
+ if: { arg: 'advancedProps' },
42
+ },
43
+ href: {
44
+ if: { arg: 'advancedProps' },
45
+ },
46
+ size: {
47
+ options: ['s', 'm', 'l'],
48
+ control: 'inline-radio',
49
+ },
50
+ sizeMobile: {
51
+ if: { arg: 'advancedProps' },
52
+ options: ['s', 'm', 'l'],
53
+ control: 'inline-radio',
54
+ },
55
+ source: {
56
+ if: { arg: 'advancedProps' },
57
+ },
58
+ mode: {
59
+ options: [null, 'skeleton'],
60
+ control: 'inline-radio',
61
+ },
62
+ },
63
+ }
64
+
65
+ export const Default = {
66
+ args: {
67
+ size: 'm',
68
+ src: 'assets/img/logo.svg',
69
+ },
70
+ }
71
+
72
+ export const SizeS = {
73
+ args: {
74
+ ...Default.args,
75
+ size: 's',
76
+ },
77
+ }
78
+
79
+ export const SizeM = {
80
+ args: {
81
+ ...Default.args,
82
+ size: 'm',
83
+ },
84
+ }
85
+
86
+ export const SizeL = {
87
+ args: {
88
+ ...Default.args,
89
+ size: 'l',
90
+ },
91
+ }
92
+
93
+ export const SkeletonMode = {
94
+ args: {
95
+ ...Default.args,
96
+ size: 'l',
97
+ mode: 'skeleton',
98
+ },
99
+ }
@@ -0,0 +1,193 @@
1
+ import { MenuItem, menuItemConfig } from '@itcase/ui/components/MenuItem'
2
+ import menuItemAppearance from 'src/components/MenuItem/appearance.json'
3
+
4
+ import {
5
+ fillProps,
6
+ sizeProps,
7
+ shapeProps,
8
+ textWrapProps,
9
+ textWeightProps,
10
+ textColorProps,
11
+ textColorActiveProps,
12
+ textSizeProps,
13
+ textColorHoverProps,
14
+ textGradientProps,
15
+ textStyleProps,
16
+ underlineProps,
17
+ } from '@itcase/ui/constants'
18
+
19
+ menuItemConfig.setAppearance(menuItemAppearance)
20
+
21
+ export default {
22
+ title: 'Atoms / Menu Item',
23
+ component: MenuItem,
24
+ parameters: {
25
+ controls: {
26
+ exclude: [
27
+ 'fillDesktop',
28
+ 'fillMobile',
29
+ 'fillTablet',
30
+ 'linkFillDesktop',
31
+ 'linkFillMobile',
32
+ 'linkFillTablet',
33
+ 'shapeDesktop',
34
+ 'shapeMobile',
35
+ 'shapeTablet',
36
+ 'sizeDesktop',
37
+ 'sizeMobile',
38
+ 'sizeTablet',
39
+ 'typeDesktop',
40
+ 'typeMobile',
41
+ 'typeTablet',
42
+ ],
43
+ },
44
+ },
45
+ argTypes: {
46
+ advancedProps: { control: 'boolean' },
47
+ after: {
48
+ if: { arg: 'advancedProps' },
49
+ },
50
+ before: {
51
+ if: { arg: 'advancedProps' },
52
+ },
53
+ children: {
54
+ if: { arg: 'advancedProps' },
55
+ },
56
+ className: {
57
+ if: { arg: 'advancedProps' },
58
+ },
59
+ href: {
60
+ if: { arg: 'advancedProps' },
61
+ },
62
+ link: {
63
+ if: { arg: 'advancedProps' },
64
+ },
65
+ LinkComponent: {
66
+ if: { arg: 'advancedProps' },
67
+ },
68
+ rel: {
69
+ if: { arg: 'advancedProps' },
70
+ },
71
+ target: {
72
+ if: { arg: 'advancedProps' },
73
+ },
74
+ onClick: {
75
+ if: { arg: 'advancedProps' },
76
+ },
77
+ onMouseEnter: {
78
+ if: { arg: 'advancedProps' },
79
+ },
80
+ appearance: {
81
+ options: [null, 'any'],
82
+ control: 'inline-radio',
83
+ },
84
+ descTextColor: {
85
+ options: textColorProps,
86
+ control: 'select',
87
+ },
88
+ descTextColorHover: {
89
+ options: textColorHoverProps,
90
+ control: 'select',
91
+ },
92
+ descTextGradient: {
93
+ if: { arg: 'advancedProps' },
94
+ options: textGradientProps,
95
+ control: 'inline-radio',
96
+ },
97
+ descTextSize: {
98
+ options: textSizeProps,
99
+ control: 'inline-radio',
100
+ },
101
+ descTextStyle: {
102
+ if: { arg: 'advancedProps' },
103
+ options: textStyleProps,
104
+ control: 'inline-radio',
105
+ },
106
+ descTextWeight: {
107
+ options: textWeightProps,
108
+ control: 'inline-radio',
109
+ },
110
+ descTextWrap: {
111
+ if: { arg: 'advancedProps' },
112
+ options: textWrapProps,
113
+ control: 'inline-radio',
114
+ },
115
+ fill: {
116
+ options: fillProps,
117
+ control: 'select',
118
+ },
119
+ linkFill: {
120
+ if: { arg: 'advancedProps' },
121
+ options: fillProps,
122
+ control: 'select',
123
+ },
124
+ shape: {
125
+ options: shapeProps,
126
+ control: 'inline-radio',
127
+ },
128
+ size: {
129
+ options: sizeProps,
130
+ control: 'inline-radio',
131
+ },
132
+ textColor: {
133
+ options: textColorProps,
134
+ control: 'select',
135
+ },
136
+ textColorHover: {
137
+ options: textColorHoverProps,
138
+ control: 'select',
139
+ },
140
+ textColorActive: {
141
+ options: textColorActiveProps,
142
+ control: 'select',
143
+ },
144
+ textSize: {
145
+ options: textSizeProps,
146
+ control: 'inline-radio',
147
+ },
148
+ textGradient: {
149
+ if: { arg: 'advancedProps' },
150
+ options: textGradientProps,
151
+ control: 'inline-radio',
152
+ },
153
+ textStyle: {
154
+ if: { arg: 'advancedProps' },
155
+ options: textStyleProps,
156
+ control: 'inline-radio',
157
+ },
158
+ textWeight: {
159
+ options: textWeightProps,
160
+ control: 'inline-radio',
161
+ },
162
+ textWrap: {
163
+ if: { arg: 'advancedProps' },
164
+ options: textWrapProps,
165
+ control: 'inline-radio',
166
+ },
167
+ type: {
168
+ if: { arg: 'advancedProps' },
169
+ },
170
+ underline: {
171
+ if: { arg: 'advancedProps' },
172
+ options: underlineProps,
173
+ control: 'inline-radio',
174
+ },
175
+ },
176
+ }
177
+
178
+ export const Default = {
179
+ args: {
180
+ appearance: 'any',
181
+ size: 'm',
182
+ label: 'Menu Item',
183
+ textSize: 'l',
184
+ textColor: 'surfaceTextPrimary',
185
+ textWeight: 400,
186
+ desc: 'desc',
187
+ descTextSize: 's',
188
+ descTextColor: 'surfaceTextPrimary',
189
+ descTextWeight: 400,
190
+ isHover: true,
191
+ isActive: true,
192
+ },
193
+ }