@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.
Files changed (62) 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/Group/Group.css +1 -1
  5. package/dist/css/components/Menu/Menu.css +3 -2
  6. package/dist/css/components/MenuItem/MenuItem.css +26 -0
  7. package/dist/css/components/Pagination/Pagination.css +5 -3
  8. package/dist/css/components/Pagination/css/__item/pagination__item.css +4 -3
  9. package/dist/css/components/Pagination/css/__item/pagination__item_state_disabled.css +1 -0
  10. package/dist/css/components/Select/Select.css +5 -0
  11. package/dist/css/components/Select/css/__indicators/select__indicators.css +1 -0
  12. package/dist/css/components/Select/css/__value-container/select__value-container.css +4 -0
  13. package/dist/css/components/Tile/Tile.css +7 -0
  14. package/dist/css/components/Tooltip/Tooltip.css +9 -9
  15. package/dist/stories/Accordion.stories.js +88 -0
  16. package/dist/stories/AccordionItem.stories.js +150 -0
  17. package/dist/stories/Badge.stories.js +116 -0
  18. package/dist/stories/Button.stories.js +287 -0
  19. package/dist/stories/Checkbox.stories.js +116 -0
  20. package/dist/stories/Chips.stories.js +151 -0
  21. package/dist/stories/Choice.stories.js +117 -0
  22. package/dist/stories/Code.stories.js +99 -0
  23. package/dist/stories/DatePicker.stories.js +178 -0
  24. package/dist/stories/Divider.stories.js +132 -0
  25. package/dist/stories/Dot.stories.js +86 -0
  26. package/dist/stories/Dropdown.stories.js +74 -0
  27. package/dist/stories/DropdownItem.stories.js +152 -0
  28. package/dist/stories/Empty.stories.js +115 -0
  29. package/dist/stories/FormFieldCheckbox.stories.js +77 -0
  30. package/dist/stories/FormFieldChoice.stories.js +75 -0
  31. package/dist/stories/FormFieldDatepicker.stories.js +51 -0
  32. package/dist/stories/FormFieldFileInput.stories.js +58 -0
  33. package/dist/stories/FormFieldInput.stories.js +66 -0
  34. package/dist/stories/FormFieldInputPassword.stories.js +66 -0
  35. package/dist/stories/FormFieldMultiBadgeSelect.stories.js +132 -0
  36. package/dist/stories/FormFieldMultiSelect.stories.js +127 -0
  37. package/dist/stories/FormFieldSelect.stories.js +99 -0
  38. package/dist/stories/FormFieldSelectGroup.stories.js +84 -0
  39. package/dist/stories/Icon.stories.js +208 -0
  40. package/dist/stories/Input.stories.js +124 -0
  41. package/dist/stories/InputPassword.stories.js +114 -0
  42. package/dist/stories/Label.stories.js +163 -0
  43. package/dist/stories/Loader.stories.js +121 -0
  44. package/dist/stories/Logo.stories.js +99 -0
  45. package/dist/stories/MenuItem.stories.js +193 -0
  46. package/dist/stories/ModalConfirm.stories.js +61 -0
  47. package/dist/stories/ModalDefault.stories.js +34 -0
  48. package/dist/stories/NotFound.stories.js +94 -0
  49. package/dist/stories/Notification.stories.js +128 -0
  50. package/dist/stories/Pagination.stories.js +66 -0
  51. package/dist/stories/RadioButton.stories.js +101 -0
  52. package/dist/stories/Search-input.stories.js +182 -0
  53. package/dist/stories/Segmented.stories.js +110 -0
  54. package/dist/stories/Select.stories.js +280 -0
  55. package/dist/stories/Switch.stories.js +84 -0
  56. package/dist/stories/Tab.appearance.stories.js +260 -0
  57. package/dist/stories/Tab.group.stories.js +149 -0
  58. package/dist/stories/Tab.size.stories.js +259 -0
  59. package/dist/stories/Tab.state.stories.js +227 -0
  60. package/dist/stories/Textarea.stories.js +90 -0
  61. package/dist/stories/Tile.stories.js +235 -0
  62. package/package.json +1 -1
@@ -0,0 +1,227 @@
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 / State',
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
+ args: {
197
+ label: 'Label',
198
+ size: 'normal',
199
+ labelTextSize: 'm',
200
+ badge: true,
201
+ badgeSize: 'xs',
202
+ badgeAppearance: 'accent',
203
+ badgeTextSize: 'xs',
204
+ badgeValue: '3',
205
+ },
206
+ }
207
+
208
+ export const Normal = {
209
+ args: {
210
+ appearance: 'any',
211
+ },
212
+ }
213
+
214
+ export const Active = {
215
+ args: {
216
+ appearance: 'surfacePrimary',
217
+ isActive: true,
218
+ },
219
+ }
220
+
221
+ export const Disabled = {
222
+ args: {
223
+ appearance: 'surfacePrimary',
224
+ isDisabled: true,
225
+ badgeAppearance: 'disabled',
226
+ },
227
+ }
@@ -0,0 +1,90 @@
1
+ import { Textarea, textareaConfig } from '@itcase/ui/components/Textarea'
2
+ import textareaState from 'src/components/Textarea/state.json'
3
+ import { borderColorProps, textColorProps, sizeProps, textSizeProps } from '@itcase/ui/constants'
4
+
5
+ textareaConfig.setState(textareaState)
6
+
7
+ export default {
8
+ title: 'Atoms / Textarea',
9
+ component: Textarea,
10
+ argTypes: {
11
+ advancedProps: { control: 'boolean' },
12
+ className: {
13
+ if: { arg: 'advancedProps' },
14
+ },
15
+ id: {
16
+ if: { arg: 'advancedProps' },
17
+ },
18
+ onBlur: {
19
+ if: { arg: 'advancedProps' },
20
+ },
21
+ onKeyDown: {
22
+ if: { arg: 'advancedProps' },
23
+ },
24
+ borderColor: {
25
+ options: borderColorProps,
26
+ control: 'select',
27
+ },
28
+ disabled: {
29
+ control: 'boolean',
30
+ },
31
+ shape: {
32
+ options: [null, 'rounded', 'underline'],
33
+ control: 'inline-radio',
34
+ },
35
+ state: {
36
+ options: [
37
+ null,
38
+ 'normal',
39
+ 'filled',
40
+ 'active',
41
+ 'activeFilled',
42
+ 'error',
43
+ 'errorFilled',
44
+ 'readonly',
45
+ 'disabled',
46
+ 'success',
47
+ 'require',
48
+ ],
49
+ control: 'inline-radio',
50
+ },
51
+ size: {
52
+ options: sizeProps,
53
+ control: 'inline-radio',
54
+ },
55
+ textColor: {
56
+ options: textColorProps,
57
+ control: 'select',
58
+ },
59
+ textSize: {
60
+ options: textSizeProps,
61
+ control: 'inline-radio',
62
+ },
63
+ },
64
+ }
65
+
66
+ export const Default = {
67
+ args: {
68
+ size: 'm',
69
+ textColor: 'surfaceTextPrimary',
70
+ textSize: 'm',
71
+ borderColor: 'surfaceBorderTertiary',
72
+ shape: 'rounded',
73
+ state: null,
74
+ placeholder: 'Placeholder',
75
+ value: 'Filled',
76
+ },
77
+ }
78
+
79
+ export const Active = {
80
+ args: {
81
+ ...Default.args,
82
+ },
83
+ }
84
+
85
+ export const Disabled = {
86
+ args: {
87
+ ...Default.args,
88
+ disabled: true,
89
+ },
90
+ }
@@ -0,0 +1,235 @@
1
+ import { Tile } from '@itcase/ui/components/Tile'
2
+ import { Button, buttonConfig } from '@itcase/ui/components/Button'
3
+ import buttonAppearance from 'src/components/Button/appearance.json'
4
+
5
+ import {
6
+ alignProps,
7
+ alignDirectionProps,
8
+ borderColorProps,
9
+ borderColorHoverProps,
10
+ borderTypeProps,
11
+ borderWidthProps,
12
+ directionProps,
13
+ fillProps,
14
+ sizeProps,
15
+ shapeProps,
16
+ textWrapProps,
17
+ textWeightProps,
18
+ textAlignProps,
19
+ textColorProps,
20
+ textSizeProps,
21
+ titleSizeProps,
22
+ } from '@itcase/ui/constants'
23
+
24
+ buttonConfig.setAppearance(buttonAppearance)
25
+
26
+ import { icon24 } from 'src/icons'
27
+
28
+ export default {
29
+ title: 'Atoms / Tile',
30
+ component: Tile,
31
+ parameters: {
32
+ controls: {
33
+ exclude: [
34
+ 'alignDesktop',
35
+ 'alignMobile',
36
+ 'alignTablet',
37
+ 'alignDirectionDesktop',
38
+ 'alignDirectionMobile',
39
+ 'alignDirectionTablet',
40
+ 'fillDesktop',
41
+ 'fillMobile',
42
+ 'fillTablet',
43
+ 'shapeDesktop',
44
+ 'shapeMobile',
45
+ 'shapeTablet',
46
+ ],
47
+ },
48
+ },
49
+ argTypes: {
50
+ advancedProps: { control: 'boolean' },
51
+ onClick: {
52
+ if: { arg: 'advancedProps' },
53
+ },
54
+ textTag: {
55
+ if: { arg: 'advancedProps' },
56
+ },
57
+ align: {
58
+ options: alignProps,
59
+ control: 'inline-radio',
60
+ },
61
+ alignDirection: {
62
+ options: alignDirectionProps,
63
+ control: 'inline-radio',
64
+ },
65
+ badge: {
66
+ control: { type: 'number', min: 1, max: 10, step: 1 },
67
+ },
68
+ badgeSize: {
69
+ options: sizeProps,
70
+ control: 'inline-radio',
71
+ },
72
+ badgeTextSize: {
73
+ options: textSizeProps,
74
+ control: 'inline-radio',
75
+ },
76
+ badgeType: {
77
+ options: ['accent', 'primary'],
78
+ control: 'inline-radio',
79
+ },
80
+ borderColor: {
81
+ options: borderColorProps,
82
+ control: 'select',
83
+ },
84
+ borderColorHover: {
85
+ options: borderColorHoverProps,
86
+ control: 'select',
87
+ },
88
+ borderType: {
89
+ options: borderTypeProps,
90
+ control: 'inline-radio',
91
+ },
92
+ borderWidth: {
93
+ options: borderWidthProps,
94
+ control: 'inline-radio',
95
+ },
96
+ children: {
97
+ if: { arg: 'advancedProps' },
98
+ },
99
+ className: {
100
+ if: { arg: 'advancedProps' },
101
+ },
102
+ direction: {
103
+ options: directionProps,
104
+ control: 'inline-radio',
105
+ },
106
+ fill: {
107
+ options: fillProps,
108
+ control: 'select',
109
+ },
110
+ reverse: {
111
+ control: 'boolean',
112
+ },
113
+ shape: {
114
+ options: shapeProps,
115
+ control: 'inline-radio',
116
+ },
117
+ size: {
118
+ options: ['normal', 'compact'],
119
+ control: 'inline-radio',
120
+ },
121
+ textColor: {
122
+ options: textColorProps,
123
+ control: 'select',
124
+ },
125
+ textSize: {
126
+ options: textSizeProps,
127
+ control: 'inline-radio',
128
+ },
129
+ textWrap: {
130
+ options: textWrapProps,
131
+ control: 'inline-radio',
132
+ },
133
+ titleTextAlign: {
134
+ options: textAlignProps,
135
+ control: 'inline-radio',
136
+ },
137
+ titleTextColor: {
138
+ options: textColorProps,
139
+ control: 'select',
140
+ },
141
+ titleTextSize: {
142
+ options: titleSizeProps,
143
+ control: 'inline-radio',
144
+ },
145
+ titleTextWeight: {
146
+ options: textWeightProps,
147
+ control: 'inline-radio',
148
+ },
149
+ titleTextWrap: {
150
+ options: textWrapProps,
151
+ control: 'inline-radio',
152
+ },
153
+ type: {
154
+ options: [null, 'icon'],
155
+ control: 'inline-radio',
156
+ },
157
+ },
158
+ }
159
+
160
+ export const Default = {
161
+ args: {
162
+ before: (
163
+ <Button
164
+ position="absolute"
165
+ right="0"
166
+ top="0"
167
+ size="m"
168
+ iconBefore={icon24.Add}
169
+ shape="circular"
170
+ fill="accentPrimary"
171
+ iconBeforeSize="24"
172
+ iconBeforeFill="accentItemPrimary"
173
+ />
174
+ ),
175
+ badge: 3,
176
+ badgeTextSize: 'm',
177
+ badgeType: 'accent',
178
+ size: 'normal',
179
+ text: 'text',
180
+ textColor: 'surfaceTextPrimary',
181
+ textSize: 'm',
182
+ title: 'Title',
183
+ titleTextColor: 'surfaceTextPrimary',
184
+ titleTextSize: 'h4',
185
+ titleTextWeight: 600,
186
+ borderColor: 'surfaceBorderTertiary',
187
+ fill: 'surfacePrimary',
188
+ shape: 'rounded',
189
+ children: 'Replacment Data',
190
+ after: (
191
+ <Button
192
+ appearance="accent"
193
+ label="Label"
194
+ labelTextSize="l"
195
+ shape="rounded"
196
+ size="xl"
197
+ width="fill"
198
+ />
199
+ ),
200
+ },
201
+ }
202
+
203
+ export const Normal = {
204
+ args: {
205
+ ...Default.args,
206
+ badge: null,
207
+ },
208
+ }
209
+
210
+ export const Compact = {
211
+ args: {
212
+ ...Default.args,
213
+ badge: null,
214
+ size: 'compact',
215
+ after: (
216
+ <Button
217
+ appearance="accent"
218
+ label="Label"
219
+ labelTextSize="m"
220
+ shape="rounded"
221
+ size="m"
222
+ width="fill"
223
+ />
224
+ ),
225
+ },
226
+ }
227
+
228
+ export const WithBadge = {
229
+ args: {
230
+ ...Default.args,
231
+ badge: 3,
232
+ badgeTextSize: 'm',
233
+ badgeType: 'primary',
234
+ },
235
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui",
3
- "version": "1.0.100",
3
+ "version": "1.0.102",
4
4
  "description": "UI components (Modal, Loader, Popup, etc)",
5
5
  "keywords": [
6
6
  "Modal",