@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.
Files changed (182) hide show
  1. package/dist/cjs/components/Accordion.js +3 -2
  2. package/dist/cjs/components/Choice.js +1 -1
  3. package/dist/cjs/components/InputPassword.js +6 -6
  4. package/dist/cjs/components/Radio.js +85 -8
  5. package/dist/cjs/components/Switch.js +12 -8
  6. package/dist/cjs/components/Tile.js +3 -3
  7. package/dist/cjs/constants/componentProps/textColor.js +1 -1
  8. package/dist/cjs/constants/componentProps/textColorHover.js +1 -1
  9. package/dist/components/Accordion.js +3 -2
  10. package/dist/components/Choice.js +1 -1
  11. package/dist/components/InputPassword.js +6 -6
  12. package/dist/components/Radio.js +86 -5
  13. package/dist/components/Switch.js +12 -4
  14. package/dist/components/Tile.js +3 -3
  15. package/dist/constants/componentProps/textColor.js +1 -1
  16. package/dist/constants/componentProps/textColorHover.js +1 -1
  17. package/dist/css/components/Accordion/Accordion.css +1 -0
  18. package/dist/css/components/DatePicker/DatePicker.css +12 -12
  19. package/dist/css/components/Icon/Icon.css +4 -2
  20. package/dist/css/mixins/mixin_elevation.css +0 -2
  21. package/dist/css/mixins/mixin_typography.css +104 -84
  22. package/dist/css/mixins/mixin_utils.css +1 -1
  23. package/dist/css/styles/border-color/border-color.css +4 -2
  24. package/dist/css/styles/text-gradient/text-gradient.css +9 -4
  25. package/dist/css/tokens/colors.css +105 -0
  26. package/dist/css/tokens/elevation.css +10 -0
  27. package/dist/css/tokens/settings.css +31 -0
  28. package/dist/css/tokens/typography.css +127 -0
  29. package/dist/stories/Accordion.mdx +11 -0
  30. package/dist/stories/Accordion.stories.js +49 -32
  31. package/dist/stories/AccordionItem.mdx +15 -0
  32. package/dist/stories/AccordionItem.stories.js +69 -69
  33. package/dist/stories/AlignContent.mdx +85 -0
  34. package/dist/stories/AlignItems.mdx +74 -0
  35. package/dist/stories/AlignItems.stories.js +88 -0
  36. package/dist/stories/AlignSelf.mdx +85 -0
  37. package/dist/stories/AlignSelf.stories.js +101 -0
  38. package/dist/stories/Appearance.mdx +24 -9
  39. package/dist/stories/Appearance.stories.js +77 -23
  40. package/dist/stories/Avatar.mdx +23 -0
  41. package/dist/stories/Avatar.stories.js +69 -64
  42. package/dist/stories/Badge.mdx +20 -0
  43. package/dist/stories/Badge.stories.js +43 -44
  44. package/dist/stories/Button.mdx +48 -0
  45. package/dist/stories/Button.stories.js +26 -186
  46. package/dist/stories/Cell.mdx +23 -0
  47. package/dist/stories/Cell.stories.js +119 -119
  48. package/dist/stories/Checkbox.mdx +24 -0
  49. package/dist/stories/Checkbox.stories.js +42 -34
  50. package/dist/stories/Chips.mdx +31 -0
  51. package/dist/stories/Chips.stories.js +22 -67
  52. package/dist/stories/Choice.mdx +11 -0
  53. package/dist/stories/Choice.stories.js +59 -61
  54. package/dist/stories/Code.mdx +11 -0
  55. package/dist/stories/Code.stories.js +37 -40
  56. package/dist/stories/Columns.mdx +51 -0
  57. package/dist/stories/Columns.stories.js +80 -0
  58. package/dist/stories/DatePicker.mdx +31 -0
  59. package/dist/stories/DatePicker.stories.js +58 -59
  60. package/dist/stories/Dev.mdx +9 -0
  61. package/dist/stories/DevMode.mdx +8 -0
  62. package/dist/stories/Direction.mdx +84 -0
  63. package/dist/stories/Direction.stories.js +93 -0
  64. package/dist/stories/Divider.mdx +35 -0
  65. package/dist/stories/Divider.stories.js +28 -29
  66. package/dist/stories/Dot.mdx +19 -0
  67. package/dist/stories/Dot.stories.js +38 -39
  68. package/dist/stories/Drawer.mdx +11 -0
  69. package/dist/stories/Drawer.stories.js +75 -0
  70. package/dist/stories/Dropdown.mdx +12 -0
  71. package/dist/stories/Dropdown.stories.js +30 -29
  72. package/dist/stories/DropdownItem.mdx +19 -0
  73. package/dist/stories/DropdownItem.stories.js +76 -78
  74. package/dist/stories/Flex.stories.js +47 -0
  75. package/dist/stories/FlexAlignContent.stories.js +102 -0
  76. package/dist/stories/FlexAlignItems.stories.js +91 -0
  77. package/dist/stories/FlexAlignSelf.stories.js +97 -0
  78. package/dist/stories/FlexDirection.stories.js +112 -0
  79. package/dist/stories/FlexGrow.stories.js +69 -0
  80. package/dist/stories/FlexJustifyContent.stories.js +98 -0
  81. package/dist/stories/FlexOrder.stories.js +76 -0
  82. package/dist/stories/FlexWrap.stories.js +89 -0
  83. package/dist/stories/Grid.stories.js +202 -0
  84. package/dist/stories/Group.mdx +9 -0
  85. package/dist/stories/{Tab.group.stories.js → Group.stories.js} +60 -56
  86. package/dist/stories/Grow.mdx +40 -0
  87. package/dist/stories/Icon.mdx +15 -0
  88. package/dist/stories/Icon.stories.js +84 -82
  89. package/dist/stories/Image.mdx +15 -0
  90. package/dist/stories/Image.stories.js +134 -0
  91. package/dist/stories/Input.mdx +31 -0
  92. package/dist/stories/Input.stories.js +26 -26
  93. package/dist/stories/InputPassword.mdx +15 -0
  94. package/dist/stories/InputPassword.stories.js +32 -34
  95. package/dist/stories/JustifyContent.mdx +89 -0
  96. package/dist/stories/JustifyContent.stories.js +96 -0
  97. package/dist/stories/Label.mdx +31 -0
  98. package/dist/stories/Label.stories.js +63 -53
  99. package/dist/stories/Loader.mdx +31 -0
  100. package/dist/stories/Loader.stories.js +26 -28
  101. package/dist/stories/Logo.mdx +19 -0
  102. package/dist/stories/Logo.stories.js +28 -28
  103. package/dist/stories/MenuItem.mdx +15 -0
  104. package/dist/stories/MenuItem.stories.js +156 -91
  105. package/dist/stories/Message.mdx +12 -0
  106. package/dist/stories/Message.stories.js +34 -0
  107. package/dist/stories/ModalConfirm.stories.js +48 -47
  108. package/dist/stories/ModalDefault.stories.js +21 -20
  109. package/dist/stories/Notification.mdx +23 -0
  110. package/dist/stories/Notification.stories.js +24 -47
  111. package/dist/stories/Order.mdx +52 -0
  112. package/dist/stories/Overview.mdx +1 -2
  113. package/dist/stories/Pagination.mdx +11 -0
  114. package/dist/stories/Pagination.stories.js +24 -27
  115. package/dist/stories/Playground.mdx +1 -2
  116. package/dist/stories/Radio.mdx +29 -0
  117. package/dist/stories/Radio.stories.js +32 -33
  118. package/dist/stories/Response.mdx +18 -0
  119. package/dist/stories/Response.stories.js +66 -0
  120. package/dist/stories/SearchInput.mdx +19 -0
  121. package/dist/stories/{Search-input.stories.js → SearchInput.stories.js} +79 -62
  122. package/dist/stories/Segmented.mdx +11 -0
  123. package/dist/stories/Segmented.stories.js +49 -50
  124. package/dist/stories/Select.stories.js +155 -155
  125. package/dist/stories/Size.mdx +35 -0
  126. package/dist/stories/Size.stories.js +101 -0
  127. package/dist/stories/Skeleton.mdx +9 -0
  128. package/dist/stories/State.mdx +19 -0
  129. package/dist/stories/State.stories.js +70 -0
  130. package/dist/stories/Switch.mdx +23 -0
  131. package/dist/stories/Switch.stories.js +23 -23
  132. package/dist/stories/Text.mdx +35 -0
  133. package/dist/stories/Text.stories.js +172 -0
  134. package/dist/stories/Textarea.mdx +15 -0
  135. package/dist/stories/Textarea.stories.js +27 -27
  136. package/dist/stories/Tile.mdx +19 -0
  137. package/dist/stories/Tile.stories.js +111 -96
  138. package/dist/stories/Title.mdx +31 -0
  139. package/dist/stories/Title.stories.js +168 -0
  140. package/dist/stories/Tooltip.mdx +19 -0
  141. package/dist/stories/Tooltip.stories.js +164 -0
  142. package/dist/stories/WithTooltip.mdx +9 -0
  143. package/dist/stories/Wrap.mdx +52 -0
  144. package/dist/stories/Wrap.stories.js +74 -0
  145. package/dist/types/components/Accordion/Accordion.interface.d.ts +4 -0
  146. package/dist/types/components/Choice/Choice.interface.d.ts +0 -2
  147. package/dist/types/components/InputPassword/InputPassword.interface.d.ts +10 -8
  148. package/dist/types/components/Tile/Tile.d.ts +1 -1
  149. package/dist/types/components/Tile/Tile.interface.d.ts +3 -1
  150. package/dist/types/config/forms/datepicker.d.ts +18 -0
  151. package/dist/types/config/forms/index.d.ts +4 -0
  152. package/dist/types/config/forms/input.d.ts +14 -0
  153. package/dist/types/config/forms/select.d.ts +50 -0
  154. package/package.json +36 -42
  155. package/dist/Radio-BQo97TZL.js +0 -89
  156. package/dist/Radio-oMf0vN7T.js +0 -86
  157. package/dist/Switch-B5yVEqxz.js +0 -14
  158. package/dist/Switch-DEXsrPCo.js +0 -12
  159. package/dist/cjs/components/FormField.js +0 -122
  160. package/dist/components/FormField.js +0 -116
  161. package/dist/css/mixins/mixin.css +0 -78
  162. package/dist/stories/FormFieldCheckbox.stories.js +0 -77
  163. package/dist/stories/FormFieldChoice.stories.js +0 -75
  164. package/dist/stories/FormFieldDatepicker.stories.js +0 -51
  165. package/dist/stories/FormFieldFileInput.stories.js +0 -58
  166. package/dist/stories/FormFieldInput.stories.js +0 -66
  167. package/dist/stories/FormFieldInputPassword.stories.js +0 -66
  168. package/dist/stories/FormFieldMultiBadgeSelect.stories.js +0 -132
  169. package/dist/stories/FormFieldMultiSelect.stories.js +0 -127
  170. package/dist/stories/FormFieldSelect.stories.js +0 -99
  171. package/dist/stories/FormFieldSelectGroup.stories.js +0 -84
  172. package/dist/stories/NotFound.stories.js +0 -93
  173. package/dist/stories/Tab.appearance.stories.js +0 -260
  174. package/dist/stories/Tab.size.stories.js +0 -259
  175. package/dist/stories/Tab.state.stories.js +0 -227
  176. package/dist/types/components/FormField/ChoiceField.d.ts +0 -8
  177. package/dist/types/components/FormField/FormField.d.ts +0 -9
  178. package/dist/types/components/FormField/FormFiled.interface.d.ts +0 -77
  179. package/dist/types/components/FormField/PasswordField.d.ts +0 -9
  180. package/dist/types/components/FormField/SelectField.d.ts +0 -9
  181. package/dist/types/components/FormField/SwitchField.d.ts +0 -8
  182. package/dist/types/components/FormField/index.d.ts +0 -6
@@ -1,39 +1,39 @@
1
- import { Switch } from '@itcase/ui/components/Switch'
1
+ import { Switch } from '../Switch'
2
2
 
3
3
  export default {
4
- title: 'Atoms / Switch ',
5
- component: Switch,
6
4
  argTypes: {
5
+ id: {
6
+ if: { arg: 'advancedProps' },
7
+ },
7
8
  advancedProps: { control: 'boolean' },
9
+ checked: {
10
+ control: 'boolean',
11
+ },
8
12
  className: {
9
13
  if: { arg: 'advancedProps' },
10
14
  },
11
- id: {
12
- if: { arg: 'advancedProps' },
15
+ disabled: {
16
+ control: 'boolean',
13
17
  },
14
18
  set: {
15
19
  if: { arg: 'advancedProps' },
16
20
  },
17
- onChange: {
18
- if: { arg: 'advancedProps' },
19
- },
20
21
  size: {
21
- options: ['normal', 'compact'],
22
22
  control: 'inline-radio',
23
+ options: ['normal', 'compact'],
23
24
  },
24
- checked: {
25
- control: 'boolean',
26
- },
27
- disabled: {
28
- control: 'boolean',
25
+ onChange: {
26
+ if: { arg: 'advancedProps' },
29
27
  },
30
28
  },
29
+ component: Switch,
30
+ title: 'Atoms / Switch ',
31
31
  }
32
32
 
33
33
  export const Default = {
34
34
  args: {
35
- disabled: false,
36
35
  checked: false,
36
+ disabled: false,
37
37
  size: 'normal',
38
38
  },
39
39
  }
@@ -41,44 +41,44 @@ export const Default = {
41
41
  export const Active = {
42
42
  args: {
43
43
  ...Default.args,
44
- disabled: false,
45
44
  checked: false,
45
+ disabled: false,
46
46
  },
47
47
  }
48
48
  export const ActiveChecked = {
49
49
  args: {
50
50
  ...Default.args,
51
- disabled: false,
52
51
  checked: true,
52
+ disabled: false,
53
53
  },
54
54
  }
55
55
  export const Disabled = {
56
56
  args: {
57
57
  ...Default.args,
58
- disabled: true,
59
58
  checked: false,
59
+ disabled: true,
60
60
  },
61
61
  }
62
62
  export const DisabledChecked = {
63
63
  args: {
64
64
  ...Default.args,
65
- disabled: true,
66
65
  checked: true,
66
+ disabled: true,
67
67
  },
68
68
  }
69
69
 
70
70
  export const Normal = {
71
71
  args: {
72
- size: 'normal',
73
- disabled: false,
74
72
  checked: true,
73
+ disabled: false,
74
+ size: 'normal',
75
75
  },
76
76
  }
77
77
 
78
78
  export const Compact = {
79
79
  args: {
80
- size: 'compact',
81
- disabled: false,
82
80
  checked: true,
81
+ disabled: false,
82
+ size: 'compact',
83
83
  },
84
84
  }
@@ -0,0 +1,35 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as SizeStories from './Text.stories.js'
4
+
5
+ <Meta of={SizeStories} />
6
+
7
+ # Size
8
+
9
+ ## XXL
10
+
11
+ <Canvas sourceState="shown" of={SizeStories.SizeXXL} />
12
+
13
+ ## XL
14
+
15
+ <Canvas sourceState="shown" of={SizeStories.SizeXL} />
16
+
17
+ ## L
18
+
19
+ <Canvas sourceState="shown" of={SizeStories.SizeL} />
20
+
21
+ ## M
22
+
23
+ <Canvas sourceState="shown" of={SizeStories.SizeM} />
24
+
25
+ ## S
26
+
27
+ <Canvas sourceState="shown" of={SizeStories.SizeS} />
28
+
29
+ ## XS
30
+
31
+ <Canvas sourceState="shown" of={SizeStories.SizeXS} />
32
+
33
+ ## XXS
34
+
35
+ <Canvas sourceState="shown" of={SizeStories.SizeXXS} />
@@ -0,0 +1,172 @@
1
+ import {
2
+ textAlignProps,
3
+ textColorActiveProps,
4
+ textColorHoverProps,
5
+ textColorProps,
6
+ textGradientProps,
7
+ textSizeProps,
8
+ textStyleProps,
9
+ textWeightProps,
10
+ textWrapProps,
11
+ } from '../../../constants'
12
+ import { Text } from '../Text'
13
+
14
+ export default {
15
+ argTypes: {
16
+ textAlign: {
17
+ control: 'inline-radio',
18
+ options: textAlignProps,
19
+ },
20
+ cursor: {
21
+ if: { arg: 'advancedProps' },
22
+ },
23
+ advancedProps: { control: 'boolean' },
24
+ after: {
25
+ if: { arg: 'advancedProps' },
26
+ },
27
+ appearance: {
28
+ control: 'inline-radio',
29
+ options: [null, 'dev'],
30
+ },
31
+ before: {
32
+ if: { arg: 'advancedProps' },
33
+ },
34
+ className: {
35
+ if: { arg: 'advancedProps' },
36
+ },
37
+ htmlFor: {
38
+ if: { arg: 'advancedProps' },
39
+ },
40
+ size: {
41
+ control: 'inline-radio',
42
+ options: textSizeProps,
43
+ },
44
+ tag: {
45
+ if: { arg: 'advancedProps' },
46
+ },
47
+ textColor: {
48
+ control: 'select',
49
+ options: textColorProps,
50
+ },
51
+ textColorActive: {
52
+ control: 'select',
53
+ options: textColorActiveProps,
54
+ },
55
+ textColorHover: {
56
+ control: 'select',
57
+ options: textColorHoverProps,
58
+ },
59
+ textGradient: {
60
+ control: 'inline-radio',
61
+ options: textGradientProps,
62
+ },
63
+ textStyle: {
64
+ control: 'inline-radio',
65
+ options: textStyleProps,
66
+ },
67
+ textWeight: {
68
+ control: 'inline-radio',
69
+ options: textWeightProps,
70
+ },
71
+ textWrap: {
72
+ control: 'inline-radio',
73
+ options: textWrapProps,
74
+ },
75
+ type: {
76
+ control: 'inline-radio',
77
+ options: ['accent', 'primary', 'secondary', 'tertiary', 'surface', 'success', 'error'],
78
+ },
79
+ onClick: {
80
+ if: { arg: 'advancedProps' },
81
+ },
82
+ },
83
+ component: Text,
84
+ parameters: {
85
+ controls: {
86
+ exclude: [
87
+ 'sizeDesktop',
88
+ 'sizeMobile',
89
+ 'sizeTablet',
90
+ 'textColorDesktop',
91
+ 'textColorMobile',
92
+ 'textColorTablet',
93
+ 'textWeightDesktop',
94
+ 'textWeightMobile',
95
+ 'textWeightTablet',
96
+ ],
97
+ },
98
+ },
99
+ title: 'Atoms / Text',
100
+ }
101
+
102
+ const Default = {
103
+ args: {
104
+ appearance: null,
105
+ textColor: 'surfaceTextPrimary',
106
+ },
107
+ }
108
+
109
+ export const SizeXXS = {
110
+ args: {
111
+ ...Default.args,
112
+ children: 'text 10px',
113
+ size: 'xxs',
114
+ },
115
+ }
116
+
117
+ export const SizeXS = {
118
+ args: {
119
+ ...Default.args,
120
+ children: 'text 12px',
121
+ size: 'xs',
122
+ },
123
+ }
124
+
125
+ export const SizeS = {
126
+ args: {
127
+ ...Default.args,
128
+ children: 'text 14px',
129
+ size: 's',
130
+ },
131
+ }
132
+
133
+ export const SizeM = {
134
+ args: {
135
+ ...Default.args,
136
+ children: 'text 16px',
137
+ size: 'm',
138
+ },
139
+ }
140
+
141
+ export const SizeL = {
142
+ args: {
143
+ ...Default.args,
144
+ children: 'text 18px',
145
+ size: 'l',
146
+ },
147
+ }
148
+
149
+ export const SizeXL = {
150
+ args: {
151
+ ...Default.args,
152
+ children: 'text 20px',
153
+ size: 'xl',
154
+ },
155
+ }
156
+
157
+ export const SizeXXL = {
158
+ args: {
159
+ ...Default.args,
160
+ children: 'text 24px',
161
+ size: 'xxl',
162
+ },
163
+ }
164
+
165
+ export const SkeletonMode = {
166
+ args: {
167
+ ...Default.args,
168
+ children: 'hidden text',
169
+ mode: 'skeleton',
170
+ size: 'm',
171
+ },
172
+ }
@@ -0,0 +1,15 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as TextareaStories from './Textarea.stories.js'
4
+
5
+ <Meta of={TextareaStories} />
6
+
7
+ # Textarea
8
+
9
+ ## Active
10
+
11
+ <Canvas sourceState="shown" of={TextareaStories.Active} />
12
+
13
+ ## Disabled
14
+
15
+ <Canvas sourceState="shown" of={TextareaStories.Disabled} />
@@ -1,38 +1,35 @@
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'
1
+ import { borderColorProps, sizeProps, textColorProps, textSizeProps } from '../../../constants'
2
+ import textareaState from '../state.json'
3
+ import { Textarea, textareaConfig } from '../Textarea'
4
4
 
5
5
  textareaConfig.setState(textareaState)
6
6
 
7
7
  export default {
8
- title: 'Atoms / Textarea',
9
- component: Textarea,
10
8
  argTypes: {
11
- advancedProps: { control: 'boolean' },
12
- className: {
13
- if: { arg: 'advancedProps' },
14
- },
15
9
  id: {
16
10
  if: { arg: 'advancedProps' },
17
11
  },
18
- onBlur: {
19
- if: { arg: 'advancedProps' },
20
- },
21
- onKeyDown: {
22
- if: { arg: 'advancedProps' },
23
- },
24
12
  borderColor: {
25
- options: borderColorProps,
26
13
  control: 'select',
14
+ options: borderColorProps,
15
+ },
16
+ advancedProps: { control: 'boolean' },
17
+ className: {
18
+ if: { arg: 'advancedProps' },
27
19
  },
28
20
  disabled: {
29
21
  control: 'boolean',
30
22
  },
31
23
  shape: {
24
+ control: 'inline-radio',
32
25
  options: [null, 'rounded', 'underline'],
26
+ },
27
+ size: {
33
28
  control: 'inline-radio',
29
+ options: sizeProps,
34
30
  },
35
31
  state: {
32
+ control: 'inline-radio',
36
33
  options: [
37
34
  null,
38
35
  'normal',
@@ -46,32 +43,35 @@ export default {
46
43
  'success',
47
44
  'require',
48
45
  ],
49
- control: 'inline-radio',
50
- },
51
- size: {
52
- options: sizeProps,
53
- control: 'inline-radio',
54
46
  },
55
47
  textColor: {
56
- options: textColorProps,
57
48
  control: 'select',
49
+ options: textColorProps,
58
50
  },
59
51
  textSize: {
60
- options: textSizeProps,
61
52
  control: 'inline-radio',
53
+ options: textSizeProps,
54
+ },
55
+ onBlur: {
56
+ if: { arg: 'advancedProps' },
57
+ },
58
+ onKeyDown: {
59
+ if: { arg: 'advancedProps' },
62
60
  },
63
61
  },
62
+ component: Textarea,
63
+ title: 'Atoms / Textarea',
64
64
  }
65
65
 
66
66
  export const Default = {
67
67
  args: {
68
- size: 'm',
69
- textColor: 'surfaceTextPrimary',
70
- textSize: 'm',
71
68
  borderColor: 'surfaceBorderTertiary',
69
+ placeholder: 'Placeholder',
72
70
  shape: 'rounded',
71
+ size: 'm',
73
72
  state: null,
74
- placeholder: 'Placeholder',
73
+ textColor: 'surfaceTextPrimary',
74
+ textSize: 'm',
75
75
  value: 'Filled',
76
76
  },
77
77
  }
@@ -0,0 +1,19 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as TileStories from './Tile.stories.js'
4
+
5
+ <Meta of={TileStories} />
6
+
7
+ # Tile
8
+
9
+ ## Normal
10
+
11
+ <Canvas of={TileStories.Normal} />
12
+
13
+ ## Compact
14
+
15
+ <Canvas of={TileStories.Compact} />
16
+
17
+ ## WithBadge
18
+
19
+ <Canvas of={TileStories.WithBadge} />