@itcase/ui 1.2.19 → 1.2.20

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 +29 -35
  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,5 +1,3 @@
1
- import { Badge } from '@itcase/ui/components/Badge'
2
- import { Icon, iconConfig } from '@itcase/ui/components/Icon'
3
1
  import {
4
2
  borderColorHoverProps,
5
3
  borderColorProps,
@@ -9,185 +7,189 @@ import {
9
7
  fillProps,
10
8
  shapeProps,
11
9
  sizePXProps,
12
- } from '@itcase/ui/constants'
13
-
14
- import iconAppearance from 'src/components/Icon/appearance.json'
10
+ } from '../../../constants'
11
+ import { Badge, badgeConfig } from '../../Badge'
12
+ import badgeAppearance from '../../Badge/appearance.json'
13
+ import iconAppearance from '../appearance.json'
14
+ import { Icon, iconConfig } from '../Icon'
15
15
 
16
16
  iconConfig.setAppearance(iconAppearance)
17
17
 
18
+ badgeConfig.setAppearance(badgeAppearance)
19
+
18
20
  export default {
19
- title: 'Atoms / Icon',
20
- component: Icon,
21
- parameters: {
22
- controls: {
23
- exclude: [
24
- 'textColor',
25
- 'textColorHover',
26
- 'fillDesktop',
27
- 'fillMobile',
28
- 'fillTablet',
29
- 'fillSizeDesktop',
30
- 'fillSizeMobile',
31
- 'fillSizeTablet',
32
- 'shapeDesktop',
33
- 'shapeMobile',
34
- 'shapeTablet',
35
- 'size',
36
- 'sizeDesktop',
37
- 'sizeMobile',
38
- 'sizeTablet',
39
- 'height',
40
- 'href',
41
- 'link',
42
- 'linkRel',
43
- 'linkTarget',
44
- 'width',
45
- ],
46
- },
47
- },
48
21
  argTypes: {
22
+ borderWidth: {
23
+ control: 'select',
24
+ options: borderWidthProps,
25
+ },
26
+ borderColor: {
27
+ control: 'select',
28
+ options: borderColorProps,
29
+ },
49
30
  advancedProps: { control: 'boolean' },
31
+ borderColorHover: {
32
+ control: 'select',
33
+ options: borderColorHoverProps,
34
+ },
35
+ borderType: {
36
+ control: 'inline-radio',
37
+ options: borderTypeProps,
38
+ },
39
+ className: {
40
+ if: { arg: 'advancedProps' },
41
+ },
42
+ dataTour: {
43
+ if: { arg: 'advancedProps' },
44
+ },
50
45
  fill: {
51
- options: fillProps,
52
46
  control: 'select',
47
+ options: fillProps,
53
48
  },
54
49
  fillHover: {
55
- options: fillHoverProps,
56
50
  control: 'select',
51
+ options: fillHoverProps,
57
52
  },
58
53
  fillSize: {
59
- options: sizePXProps,
60
54
  control: 'select',
55
+ options: sizePXProps,
61
56
  },
62
57
  iconFill: {
63
- options: fillProps,
64
58
  control: 'select',
59
+ options: fillProps,
65
60
  },
66
61
  iconFillHover: {
67
- options: fillProps,
68
62
  control: 'select',
63
+ options: fillProps,
69
64
  },
70
65
  iconSize: {
71
- options: sizePXProps,
72
- control: 'select',
73
- },
74
- borderType: {
75
- options: borderTypeProps,
76
- control: 'inline-radio',
77
- },
78
- borderColor: {
79
- options: borderColorProps,
80
- control: 'select',
81
- },
82
- borderColorHover: {
83
- options: borderColorHoverProps,
84
66
  control: 'select',
67
+ options: sizePXProps,
85
68
  },
86
- borderWidth: {
87
- options: borderWidthProps,
88
- control: 'select',
89
- },
90
- className: {
91
- if: { arg: 'advancedProps' },
92
- },
93
- dataTour: {
69
+ LinkComponent: {
94
70
  if: { arg: 'advancedProps' },
95
71
  },
96
- onClick: {
97
- if: { arg: 'advancedProps' },
72
+ shape: {
73
+ control: 'inline-radio',
74
+ options: shapeProps,
98
75
  },
99
- LinkComponent: {
76
+ SvgImage: {
100
77
  if: { arg: 'advancedProps' },
101
78
  },
102
- SvgImage: {
79
+ onClick: {
103
80
  if: { arg: 'advancedProps' },
104
81
  },
105
- shape: {
106
- options: shapeProps,
107
- control: 'inline-radio',
82
+ },
83
+ component: Icon,
84
+ parameters: {
85
+ controls: {
86
+ exclude: [
87
+ 'textColor',
88
+ 'textColorHover',
89
+ 'fillDesktop',
90
+ 'fillMobile',
91
+ 'fillTablet',
92
+ 'fillSizeDesktop',
93
+ 'fillSizeMobile',
94
+ 'fillSizeTablet',
95
+ 'shapeDesktop',
96
+ 'shapeMobile',
97
+ 'shapeTablet',
98
+ 'size',
99
+ 'sizeDesktop',
100
+ 'sizeMobile',
101
+ 'sizeTablet',
102
+ 'height',
103
+ 'href',
104
+ 'link',
105
+ 'linkRel',
106
+ 'linkTarget',
107
+ 'width',
108
+ ],
108
109
  },
109
110
  },
111
+ title: 'Atoms / Icon',
110
112
  }
111
113
 
112
114
  export const Default = {
113
115
  args: {
114
- iconFill: 'surfaceItemPrimary',
115
- imageSrc: 'assets/24/Bell.svg',
116
116
  fill: 'surfaceSecondary',
117
117
  fillHover: 'surfaceSecondaryHover',
118
118
  fillSize: '40',
119
+ iconFill: 'surfaceItemPrimary',
119
120
  iconSize: '24',
121
+ imageSrc: 'assets/24/Bell.svg',
120
122
  shape: 'circular',
121
123
  },
122
124
  }
123
125
 
124
126
  export const WithBadge = {
125
127
  args: {
126
- imageSrc: 'assets/24/Bell.svg',
128
+ Badge: <Badge position="absolute" appearance="accent" size="xs" textSize="xxs" value={3} />,
127
129
  fill: 'surfaceSecondary',
128
130
  fillHover: 'surfaceSecondaryHover',
129
131
  fillSize: '40',
130
- iconSize: '24',
131
132
  iconFill: 'surfaceItemPrimary',
133
+ iconSize: '24',
134
+ imageSrc: 'assets/24/Bell.svg',
132
135
  shape: 'circular',
133
- Badge: <Badge appearance="accent" position="absolute" size="xs" textSize="xxs" value={3} />,
134
136
  },
135
137
  }
136
138
 
137
139
  export const WithTooltip = {
138
140
  args: {
139
141
  width: '16',
142
+ alignment: 'topRight',
140
143
  iconFill: 'surfaceItemPrimary',
141
144
  imageSrc: 'assets/16/Search.svg',
142
- tooltipText: 'Search',
143
- tooltipTextSize: 'm',
144
145
  showTooltip: true,
145
146
  tooltipAppearance: 'surfaceTertiary',
146
- alignment: 'topRight',
147
+ tooltipText: 'Search',
148
+ tooltipTextSize: 'm',
147
149
  },
148
150
  }
149
151
 
150
152
  export const Size14 = {
151
153
  args: {
152
- imageSrc: 'assets/14/Remove.svg',
153
154
  fill: 'surfaceSecondary',
154
155
  fillHover: 'surfaceSecondaryHover',
155
156
  fillSize: '24',
156
- iconSize: '14',
157
157
  iconFill: 'surfaceItemPrimary',
158
+ iconSize: '14',
159
+ imageSrc: 'assets/14/Remove.svg',
158
160
  shape: 'circular',
159
161
  },
160
162
  }
161
163
 
162
164
  export const Size16 = {
163
165
  args: {
164
- imageSrc: 'assets/16/Search.svg',
165
166
  fill: 'surfaceSecondary',
166
167
  fillHover: 'surfaceSecondaryHover',
167
168
  fillSize: '32',
168
- iconSize: '16',
169
169
  iconFill: 'surfaceItemPrimary',
170
+ iconSize: '16',
171
+ imageSrc: 'assets/16/Search.svg',
170
172
  shape: 'circular',
171
173
  },
172
174
  }
173
175
 
174
176
  export const Size24 = {
175
177
  args: {
176
- imageSrc: 'assets/24/Delete.svg',
177
178
  fill: 'surfaceSecondary',
178
179
  fillHover: 'surfaceSecondaryHover',
179
180
  fillSize: '40',
180
- iconSize: '24',
181
181
  iconFill: 'surfaceItemPrimary',
182
+ iconSize: '24',
183
+ imageSrc: 'assets/24/Delete.svg',
182
184
  shape: 'circular',
183
185
  },
184
186
  }
185
187
 
186
188
  export const Size40 = {
187
189
  args: {
188
- imageSrc: 'assets/40/close.svg',
189
190
  fillHover: 'surfaceSecondaryHover',
190
191
  iconSize: '40',
192
+ imageSrc: 'assets/40/Close.svg',
191
193
  shape: 'circular',
192
194
  },
193
195
  }
@@ -0,0 +1,15 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as ImageStories from './Image.stories.js'
4
+
5
+ <Meta of={ImageStories} />
6
+
7
+ # Image
8
+
9
+ ## Rectangular
10
+
11
+ <Canvas sourceState="shown" of={ImageStories.Rectangular} />
12
+
13
+ ## Circular
14
+
15
+ <Canvas sourceState="shown" of={ImageStories.Circular} />
@@ -0,0 +1,134 @@
1
+ import { borderColorProps, fillProps, shapeProps } from '../../../constants'
2
+ import { Image } from '../Image'
3
+
4
+ export default {
5
+ argTypes: {
6
+ children: {
7
+ if: { arg: 'advancedProps' },
8
+ },
9
+ resizeMode: {
10
+ control: 'inline-radio',
11
+ options: [null, 'cover', 'contain'],
12
+ },
13
+ advancedProps: { control: 'boolean' },
14
+ after: {
15
+ if: { arg: 'advancedProps' },
16
+ },
17
+ before: {
18
+ if: { arg: 'advancedProps' },
19
+ },
20
+ border: {
21
+ control: 'select',
22
+ options: borderColorProps,
23
+ },
24
+ borderColorImage: {
25
+ if: { arg: 'advancedProps' },
26
+ },
27
+ caption: {
28
+ if: { arg: 'advancedProps' },
29
+ },
30
+ className: {
31
+ if: { arg: 'advancedProps' },
32
+ },
33
+ fill: {
34
+ control: 'select',
35
+ options: fillProps,
36
+ },
37
+ imageClassName: {
38
+ if: { arg: 'advancedProps' },
39
+ },
40
+ imageHeight: {
41
+ if: { arg: 'advancedProps' },
42
+ },
43
+ imageWidth: {
44
+ if: { arg: 'advancedProps' },
45
+ },
46
+ imgWrapClassName: {
47
+ if: { arg: 'advancedProps' },
48
+ },
49
+ overlay: {
50
+ if: { arg: 'advancedProps' },
51
+ },
52
+ shape: {
53
+ control: 'inline-radio',
54
+ options: shapeProps,
55
+ },
56
+ style: {
57
+ if: { arg: 'advancedProps' },
58
+ },
59
+ title: {
60
+ if: { arg: 'advancedProps' },
61
+ },
62
+ type: {
63
+ control: 'inline-radio',
64
+ options: [null, 'cover'],
65
+ },
66
+ onClick: {
67
+ if: { arg: 'advancedProps' },
68
+ },
69
+ onError: {
70
+ if: { arg: 'advancedProps' },
71
+ },
72
+ },
73
+ component: Image,
74
+ parameters: {
75
+ controls: {
76
+ exclude: [
77
+ 'borderColorImageDesktop',
78
+ 'borderColorImageMobile',
79
+ 'borderColorImageTablet',
80
+ 'resizeModeDesktop',
81
+ 'resizeModeMobile',
82
+ 'resizeModeTablet',
83
+ 'shapeDesktop',
84
+ 'shapeMobile',
85
+ 'shapeTablet',
86
+ 'сontentX',
87
+ 'сontentXDesktop',
88
+ 'сontentXMobile',
89
+ 'сontentXTablet',
90
+ 'сontentY',
91
+ 'сontentYDesktop',
92
+ 'сontentYMobile',
93
+ 'сontentYTablet',
94
+ 'imageWidthDesktop',
95
+ 'imageWidthMobile',
96
+ 'imageWidthTablet',
97
+ ],
98
+ },
99
+ },
100
+ title: 'Atoms / Image',
101
+ }
102
+
103
+ const Default = {
104
+ args: {
105
+ resizeMode: 'contain',
106
+ alt: 'placeholder',
107
+ fill: 'surfaceTertiary',
108
+ shape: 'rounded',
109
+ src: 'assets/img/tomato.png',
110
+ },
111
+ }
112
+
113
+ export const Rectangular = {
114
+ args: {
115
+ ...Default.args,
116
+ },
117
+ }
118
+
119
+ export const Circular = {
120
+ args: {
121
+ ...Default.args,
122
+ width: 150,
123
+ height: 150,
124
+ resizeMode: 'cover',
125
+ shape: 'circular',
126
+ },
127
+ }
128
+
129
+ export const SkeletonMode = {
130
+ args: {
131
+ ...Default.args,
132
+ mode: 'skeleton',
133
+ },
134
+ }
@@ -0,0 +1,31 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as InputStories from './Input.stories.js'
4
+
5
+ <Meta of={InputStories} />
6
+
7
+ # Input
8
+
9
+ ## XXL
10
+
11
+ <Canvas sourceState="shown" of={InputStories.SizeXXL} />
12
+
13
+ ## XL
14
+
15
+ <Canvas sourceState="shown" of={InputStories.SizeXL} />
16
+
17
+ ## L
18
+
19
+ <Canvas sourceState="shown" of={InputStories.SizeL} />
20
+
21
+ ## M
22
+
23
+ <Canvas sourceState="shown" of={InputStories.SizeM} />
24
+
25
+ ## S
26
+
27
+ <Canvas sourceState="shown" of={InputStories.SizeS} />
28
+
29
+ ## XS
30
+
31
+ <Canvas sourceState="shown" of={InputStories.SizeXS} />
@@ -1,42 +1,39 @@
1
- import { Input, inputConfig } from '@itcase/ui/components/Input'
2
- import inputState from 'src/components/Input/state.json'
3
- import { borderColorProps, textColorProps, textSizeProps } from '@itcase/ui/constants'
1
+ import { borderColorProps, textColorProps, textSizeProps } from '../../../constants'
2
+ import { Input, inputConfig } from '../Input'
3
+ import inputState from '../state.json'
4
4
 
5
5
  inputConfig.setState(inputState)
6
6
 
7
7
  export default {
8
- title: 'Atoms / Input',
9
- component: Input,
10
8
  argTypes: {
11
- advancedProps: { control: 'boolean' },
12
- className: {
9
+ id: {
13
10
  if: { arg: 'advancedProps' },
14
11
  },
12
+ borderColor: {
13
+ control: 'select',
14
+ options: borderColorProps,
15
+ },
16
+ advancedProps: { control: 'boolean' },
15
17
  checked: {
16
- if: { arg: 'advancedProps' },
17
18
  control: 'boolean',
18
- },
19
- id: {
20
- if: { arg: 'advancedProps' },
21
- },
22
- onBlur: {
23
19
  if: { arg: 'advancedProps' },
24
20
  },
25
- onKeyDown: {
21
+ className: {
26
22
  if: { arg: 'advancedProps' },
27
23
  },
28
- borderColor: {
29
- options: borderColorProps,
30
- control: 'select',
31
- },
32
24
  disabled: {
33
25
  control: 'boolean',
34
26
  },
35
27
  shape: {
28
+ control: 'inline-radio',
36
29
  options: [null, 'rounded', 'underline'],
30
+ },
31
+ size: {
37
32
  control: 'inline-radio',
33
+ options: [null, 'xs', 's', 'm', 'l', 'xl', 'xxl', 'tiny', 'compact', 'normal', 'large'],
38
34
  },
39
35
  state: {
36
+ control: 'inline-radio',
40
37
  options: [
41
38
  null,
42
39
  'normal',
@@ -50,25 +47,28 @@ export default {
50
47
  'success',
51
48
  'require',
52
49
  ],
53
- control: 'inline-radio',
54
- },
55
- size: {
56
- options: [null, 'xs', 's', 'm', 'l', 'xl', 'xxl', 'tiny', 'compact', 'normal', 'large'],
57
- control: 'inline-radio',
58
50
  },
59
51
  textColor: {
60
- options: textColorProps,
61
52
  control: 'select',
53
+ options: textColorProps,
62
54
  },
63
55
  textSize: {
64
- options: textSizeProps,
65
56
  control: 'inline-radio',
57
+ options: textSizeProps,
66
58
  },
67
59
  type: {
68
- options: ['text', 'number', 'password'],
69
60
  control: 'inline-radio',
61
+ options: ['text', 'number', 'password'],
62
+ },
63
+ onBlur: {
64
+ if: { arg: 'advancedProps' },
65
+ },
66
+ onKeyDown: {
67
+ if: { arg: 'advancedProps' },
70
68
  },
71
69
  },
70
+ component: Input,
71
+ title: 'Atoms / Input',
72
72
  }
73
73
 
74
74
  export const Default = {
@@ -0,0 +1,15 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as InputPasswordStories from './InputPassword.stories.js'
4
+
5
+ <Meta of={InputPasswordStories} />
6
+
7
+ # InputPassword
8
+
9
+ ## Hidden
10
+
11
+ <Canvas sourceState="shown" of={InputPasswordStories.Hidden} />
12
+
13
+ ## Disabled
14
+
15
+ <Canvas sourceState="shown" of={InputPasswordStories.Disabled} />
@@ -1,64 +1,52 @@
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
1
  import {
6
2
  borderColorProps,
7
3
  fillProps,
8
4
  iconSizeProps,
9
5
  textColorProps,
10
6
  textSizeProps,
11
- } from '@itcase/ui/constants'
7
+ } from '../../../constants'
8
+ import { InputPassword, inputPasswordConfig } from '../InputPassword'
9
+ import inputPasswordState from '../state.json'
12
10
 
13
11
  inputPasswordConfig.setState(inputPasswordState)
14
12
 
15
13
  export default {
16
- title: 'Atoms / InputPassword',
17
- component: InputPassword,
18
14
  argTypes: {
19
- advancedProps: { control: 'boolean' },
20
- className: {
21
- if: { arg: 'advancedProps' },
22
- },
23
15
  id: {
24
16
  if: { arg: 'advancedProps' },
25
17
  },
26
- onBlur: {
27
- if: { arg: 'advancedProps' },
28
- },
29
- onChange: {
30
- if: { arg: 'advancedProps' },
31
- },
32
- onKeyDown: {
33
- if: { arg: 'advancedProps' },
34
- },
35
18
  borderColor: {
36
- options: borderColorProps,
37
19
  control: 'select',
20
+ options: borderColorProps,
38
21
  },
22
+ advancedProps: { control: 'boolean' },
39
23
  checked: {
40
24
  control: 'boolean',
41
25
  },
26
+ className: {
27
+ if: { arg: 'advancedProps' },
28
+ },
42
29
  disabled: {
43
30
  control: 'boolean',
44
31
  },
45
32
  iconFill: {
46
- options: fillProps,
47
33
  control: 'select',
34
+ options: fillProps,
48
35
  },
49
36
  iconSize: {
50
- options: iconSizeProps,
51
37
  control: 'inline-radio',
38
+ options: iconSizeProps,
52
39
  },
53
40
  shape: {
54
- options: [null, 'rounded', 'underline'],
55
41
  control: 'inline-radio',
42
+ options: [null, 'rounded', 'underline'],
56
43
  },
57
44
  size: {
58
- options: ['xs', 's', 'm', 'l', 'xl', 'xxl', 'normal', 'tiny', 'compact', 'large'],
59
45
  control: 'inline-radio',
46
+ options: ['xs', 's', 'm', 'l', 'xl', 'xxl', 'normal', 'tiny', 'compact', 'large'],
60
47
  },
61
48
  state: {
49
+ control: 'inline-radio',
62
50
  options: [
63
51
  null,
64
52
  'normal',
@@ -72,35 +60,45 @@ export default {
72
60
  'success',
73
61
  'require',
74
62
  ],
75
- control: 'inline-radio',
76
63
  },
77
64
  textColor: {
78
- options: textColorProps,
79
65
  control: 'select',
66
+ options: textColorProps,
80
67
  },
81
68
  textSize: {
82
- options: textSizeProps,
83
69
  control: 'inline-radio',
70
+ options: textSizeProps,
71
+ },
72
+ onBlur: {
73
+ if: { arg: 'advancedProps' },
74
+ },
75
+ onChange: {
76
+ if: { arg: 'advancedProps' },
77
+ },
78
+ onKeyDown: {
79
+ if: { arg: 'advancedProps' },
84
80
  },
85
81
  },
82
+ component: InputPassword,
83
+ title: 'Atoms / InputPassword',
86
84
  }
87
85
 
88
86
  export const Default = {
89
87
  args: {
90
88
  borderColor: 'surfaceBorderTertiary',
91
- placeholder: 'Placeholder',
92
- shape: 'rounded',
93
- textSize: 'm',
94
89
  isRevealable: true,
95
90
  iconFill: 'surfaceItemTertiary',
96
- iconRevealableHide: icon24.HidePassword,
97
- iconRevealableShow: icon24.ShowPassword,
98
91
  iconSize: 24,
92
+ imageRevealableHide: 'assets/24/HidePassword.svg',
93
+ imageRevealableShow: 'assets/24/ShowPassword.svg',
94
+ placeholder: 'Placeholder',
95
+ shape: 'rounded',
96
+ textSize: 'm',
99
97
  value: 'password',
100
98
  },
101
99
  }
102
100
 
103
- export const Hide = {
101
+ export const Hidden = {
104
102
  args: {
105
103
  ...Default.args,
106
104
  },