@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,180 +1,209 @@
1
- import { Tile } from '../Tile'
2
- import { Button, buttonConfig } from '../../Button'
3
- import buttonAppearance from '../../Button/appearance.json'
4
-
5
1
  import {
6
- alignProps,
7
2
  alignDirectionProps,
8
- borderColorProps,
3
+ alignProps,
9
4
  borderColorHoverProps,
5
+ borderColorProps,
10
6
  borderTypeProps,
11
7
  borderWidthProps,
12
8
  directionProps,
13
9
  fillProps,
14
- sizeProps,
15
10
  shapeProps,
16
- textWrapProps,
17
- textWeightProps,
11
+ sizeProps,
18
12
  textAlignProps,
19
13
  textColorProps,
20
14
  textSizeProps,
15
+ textWeightProps,
16
+ textWrapProps,
21
17
  titleSizeProps,
22
18
  } from '../../../constants'
19
+ import { icon24 } from '../../../icons'
20
+ import { badgeConfig } from '../../Badge'
21
+ import badgeAppearance from '../../Badge/appearance.json'
22
+ import { Button, buttonConfig } from '../../Button'
23
+ import buttonAppearance from '../../Button/appearance.json'
24
+ import { Tile } from '../Tile'
23
25
 
24
- buttonConfig.setAppearance(buttonAppearance)
26
+ badgeConfig.setAppearance(badgeAppearance)
25
27
 
26
- import { icon24 } from '../../../icons'
28
+ buttonConfig.setAppearance(buttonAppearance)
27
29
 
28
30
  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
31
  argTypes: {
50
- advancedProps: { control: 'boolean' },
51
- onClick: {
32
+ children: {
52
33
  if: { arg: 'advancedProps' },
53
34
  },
54
- textTag: {
55
- if: { arg: 'advancedProps' },
35
+ borderWidth: {
36
+ control: 'inline-radio',
37
+ options: borderWidthProps,
38
+ },
39
+ borderColor: {
40
+ control: 'select',
41
+ options: borderColorProps,
42
+ },
43
+ direction: {
44
+ control: 'inline-radio',
45
+ options: directionProps,
56
46
  },
47
+ advancedProps: { control: 'boolean' },
57
48
  align: {
58
- options: alignProps,
59
49
  control: 'inline-radio',
50
+ options: alignProps,
60
51
  },
61
52
  alignDirection: {
62
- options: alignDirectionProps,
63
53
  control: 'inline-radio',
54
+ options: alignDirectionProps,
64
55
  },
65
56
  badge: {
66
- control: { type: 'number', min: 1, max: 10, step: 1 },
57
+ control: { max: 10, min: 1, step: 1, type: 'number' },
58
+ },
59
+ badgeAppearance: {
60
+ control: 'inline-radio',
61
+ options: [
62
+ 'surfacePrimary',
63
+ 'surfaceSecondary',
64
+ 'surfaceTertiary',
65
+ 'surfaceQuaternary',
66
+ 'accent',
67
+ 'primary',
68
+ 'secondary',
69
+ 'disabled',
70
+ ],
67
71
  },
68
72
  badgeSize: {
69
- options: sizeProps,
70
73
  control: 'inline-radio',
74
+ options: sizeProps,
71
75
  },
72
76
  badgeTextSize: {
73
- options: textSizeProps,
74
77
  control: 'inline-radio',
78
+ options: textSizeProps,
75
79
  },
76
80
  badgeType: {
77
- options: ['accent', 'primary'],
78
81
  control: 'inline-radio',
79
- },
80
- borderColor: {
81
- options: borderColorProps,
82
- control: 'select',
82
+ options: ['accent', 'primary'],
83
83
  },
84
84
  borderColorHover: {
85
- options: borderColorHoverProps,
86
85
  control: 'select',
86
+ options: borderColorHoverProps,
87
87
  },
88
88
  borderType: {
89
- options: borderTypeProps,
90
- control: 'inline-radio',
91
- },
92
- borderWidth: {
93
- options: borderWidthProps,
94
89
  control: 'inline-radio',
95
- },
96
- children: {
97
- if: { arg: 'advancedProps' },
90
+ options: borderTypeProps,
98
91
  },
99
92
  className: {
100
93
  if: { arg: 'advancedProps' },
101
94
  },
102
- direction: {
103
- options: directionProps,
104
- control: 'inline-radio',
105
- },
106
95
  fill: {
107
- options: fillProps,
108
96
  control: 'select',
97
+ options: fillProps,
109
98
  },
110
99
  reverse: {
111
100
  control: 'boolean',
112
101
  },
113
102
  shape: {
114
- options: shapeProps,
115
103
  control: 'inline-radio',
104
+ options: shapeProps,
116
105
  },
117
106
  size: {
118
- options: ['normal', 'compact'],
119
107
  control: 'inline-radio',
108
+ options: ['normal', 'compact'],
120
109
  },
121
110
  textColor: {
122
- options: textColorProps,
123
111
  control: 'select',
112
+ options: textColorProps,
124
113
  },
125
114
  textSize: {
126
- options: textSizeProps,
127
115
  control: 'inline-radio',
116
+ options: textSizeProps,
117
+ },
118
+ textTag: {
119
+ if: { arg: 'advancedProps' },
128
120
  },
129
121
  textWrap: {
130
- options: textWrapProps,
131
122
  control: 'inline-radio',
123
+ options: textWrapProps,
132
124
  },
133
125
  titleTextAlign: {
134
- options: textAlignProps,
135
126
  control: 'inline-radio',
127
+ options: textAlignProps,
136
128
  },
137
129
  titleTextColor: {
138
- options: textColorProps,
139
130
  control: 'select',
131
+ options: textColorProps,
140
132
  },
141
133
  titleTextSize: {
142
- options: titleSizeProps,
143
134
  control: 'inline-radio',
135
+ options: titleSizeProps,
144
136
  },
145
137
  titleTextWeight: {
146
- options: textWeightProps,
147
138
  control: 'inline-radio',
139
+ options: textWeightProps,
148
140
  },
149
141
  titleTextWrap: {
150
- options: textWrapProps,
151
142
  control: 'inline-radio',
143
+ options: textWrapProps,
152
144
  },
153
145
  type: {
154
- options: [null, 'icon'],
155
146
  control: 'inline-radio',
147
+ options: [null, 'icon'],
148
+ },
149
+ onClick: {
150
+ if: { arg: 'advancedProps' },
156
151
  },
157
152
  },
153
+ component: Tile,
154
+ parameters: {
155
+ controls: {
156
+ exclude: [
157
+ 'alignDesktop',
158
+ 'alignMobile',
159
+ 'alignTablet',
160
+ 'alignDirectionDesktop',
161
+ 'alignDirectionMobile',
162
+ 'alignDirectionTablet',
163
+ 'fillDesktop',
164
+ 'fillMobile',
165
+ 'fillTablet',
166
+ 'shapeDesktop',
167
+ 'shapeMobile',
168
+ 'shapeTablet',
169
+ ],
170
+ },
171
+ },
172
+ title: 'Molecules / Tile',
158
173
  }
159
174
 
160
175
  export const Default = {
161
176
  args: {
177
+ children: 'Replacment Data',
178
+ borderColor: 'surfaceBorderTertiary',
179
+ after: (
180
+ <Button
181
+ width="fill"
182
+ labelTextSize="l"
183
+ appearance="accent"
184
+ label="Label"
185
+ shape="rounded"
186
+ size="xl"
187
+ />
188
+ ),
189
+ badge: 3,
190
+ badgeAppearance: 'accent',
191
+ badgeTextSize: 'm',
162
192
  before: (
163
193
  <Button
194
+ fill="accentPrimary"
164
195
  position="absolute"
165
- right="0"
166
196
  top="0"
167
- size="m"
197
+ right="0"
168
198
  iconBefore={icon24.Add}
169
- shape="circular"
170
- fill="accentPrimary"
171
- iconBeforeSize="24"
172
199
  iconBeforeFill="accentItemPrimary"
200
+ iconBeforeSize="24"
201
+ shape="circular"
202
+ size="m"
173
203
  />
174
204
  ),
175
- badge: 3,
176
- badgeTextSize: 'm',
177
- badgeType: 'accent',
205
+ fill: 'surfacePrimary',
206
+ shape: 'rounded',
178
207
  size: 'normal',
179
208
  text: 'text',
180
209
  textColor: 'surfaceTextPrimary',
@@ -183,20 +212,6 @@ export const Default = {
183
212
  titleTextColor: 'surfaceTextPrimary',
184
213
  titleTextSize: 'h4',
185
214
  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
215
  },
201
216
  }
202
217
 
@@ -210,18 +225,18 @@ export const Normal = {
210
225
  export const Compact = {
211
226
  args: {
212
227
  ...Default.args,
213
- badge: null,
214
- size: 'compact',
215
228
  after: (
216
229
  <Button
230
+ width="fill"
231
+ labelTextSize="m"
217
232
  appearance="accent"
218
233
  label="Label"
219
- labelTextSize="m"
220
234
  shape="rounded"
221
235
  size="m"
222
- width="fill"
223
236
  />
224
237
  ),
238
+ badge: null,
239
+ size: 'compact',
225
240
  },
226
241
  }
227
242
 
@@ -0,0 +1,31 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as TitleStories from './Title.stories.js'
4
+
5
+ <Meta of={TitleStories} />
6
+
7
+ # Size
8
+
9
+ ## SizeH1
10
+
11
+ <Canvas sourceState="shown" of={TitleStories.SizeH1} />
12
+
13
+ ## SizeH2
14
+
15
+ <Canvas sourceState="shown" of={TitleStories.SizeH2} />
16
+
17
+ ## SizeH3
18
+
19
+ <Canvas sourceState="shown" of={TitleStories.SizeH3} />
20
+
21
+ ## SizeH4
22
+
23
+ <Canvas sourceState="shown" of={TitleStories.SizeH4} />
24
+
25
+ ## SizeH5
26
+
27
+ <Canvas sourceState="shown" of={TitleStories.SizeH5} />
28
+
29
+ ## SizeH6
30
+
31
+ <Canvas sourceState="shown" of={TitleStories.SizeH6} />
@@ -0,0 +1,168 @@
1
+ import {
2
+ fillProps,
3
+ textAlignProps,
4
+ textColorActiveProps,
5
+ textColorHoverProps,
6
+ textColorProps,
7
+ textGradientProps,
8
+ textStyleProps,
9
+ textWeightProps,
10
+ textWrapProps,
11
+ titleSizeProps,
12
+ } from '../../../constants'
13
+ import { Title } from '../Title'
14
+
15
+ export default {
16
+ argTypes: {
17
+ textAlign: {
18
+ control: 'inline-radio',
19
+ options: textAlignProps,
20
+ },
21
+ advancedProps: { control: 'boolean' },
22
+ appearance: {
23
+ control: 'inline-radio',
24
+ options: [null, 'dev'],
25
+ },
26
+ className: {
27
+ if: { arg: 'advancedProps' },
28
+ },
29
+ fill: {
30
+ control: 'select',
31
+ options: fillProps,
32
+ },
33
+ mode: {
34
+ control: 'inline-radio',
35
+ options: [null, 'skeleton'],
36
+ },
37
+ size: {
38
+ control: 'inline-radio',
39
+ options: titleSizeProps,
40
+ },
41
+ tag: {
42
+ if: { arg: 'advancedProps' },
43
+ },
44
+ text: {
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'],
78
+ },
79
+ onClick: {
80
+ if: { arg: 'advancedProps' },
81
+ },
82
+ },
83
+ component: Title,
84
+ parameters: {
85
+ controls: {
86
+ exclude: [
87
+ 'fillDesktop',
88
+ 'fillMobile',
89
+ 'fillTablet',
90
+ 'sizeDesktop',
91
+ 'sizeMobile',
92
+ 'sizeTablet',
93
+ 'textAlignDesktop',
94
+ 'textAlignMobile',
95
+ 'textAlignTablet',
96
+ 'textColorDesktop',
97
+ 'textColorMobile',
98
+ 'textColorTablet',
99
+ ],
100
+ },
101
+ },
102
+ title: 'Atoms / Title',
103
+ }
104
+
105
+ const Default = {
106
+ args: {
107
+ children: 'title',
108
+ appearance: null,
109
+ textColor: 'surfaceTextPrimary',
110
+ },
111
+ }
112
+
113
+ export const Dev = {
114
+ args: {
115
+ ...Default.args,
116
+ appearance: 'dev',
117
+ },
118
+ }
119
+
120
+ export const SizeH1 = {
121
+ args: {
122
+ ...Default.args,
123
+ size: 'h1',
124
+ },
125
+ }
126
+
127
+ export const SizeH2 = {
128
+ args: {
129
+ ...Default.args,
130
+ size: 'h2',
131
+ },
132
+ }
133
+
134
+ export const SizeH3 = {
135
+ args: {
136
+ ...Default.args,
137
+ size: 'h3',
138
+ },
139
+ }
140
+
141
+ export const SizeH4 = {
142
+ args: {
143
+ ...Default.args,
144
+ size: 'h4',
145
+ },
146
+ }
147
+
148
+ export const SizeH5 = {
149
+ args: {
150
+ ...Default.args,
151
+ size: 'h5',
152
+ },
153
+ }
154
+
155
+ export const SizeH6 = {
156
+ args: {
157
+ ...Default.args,
158
+ size: 'h6',
159
+ },
160
+ }
161
+
162
+ export const SkeletonMode = {
163
+ args: {
164
+ ...Default.args,
165
+ children: 'skeleton',
166
+ mode: 'skeleton',
167
+ },
168
+ }
@@ -0,0 +1,19 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as TooltipStories from './Tooltip.stories.js'
4
+
5
+ <Meta of={TooltipStories} />
6
+
7
+ # Tooltip
8
+
9
+ ## surfacePrimary
10
+
11
+ <Canvas sourceState="shown" of={TooltipStories.surfacePrimary} />
12
+
13
+ ## surfaceSecondary
14
+
15
+ <Canvas sourceState="shown" of={TooltipStories.surfaceSecondary} />
16
+
17
+ ## surfaceTertiary
18
+
19
+ <Canvas sourceState="shown" of={TooltipStories.surfaceTertiary} />
@@ -0,0 +1,164 @@
1
+ import {
2
+ alignDirectionProps,
3
+ alignmentProps,
4
+ alignProps,
5
+ borderColorProps,
6
+ borderTypeProps,
7
+ borderWidthProps,
8
+ fillProps,
9
+ shapeProps,
10
+ textColorProps,
11
+ textSizeProps,
12
+ titleSizeProps,
13
+ widthProps,
14
+ } from '../../../constants'
15
+ import tooltipAppearance from '../appearance.json'
16
+ import { Tooltip, tooltipConfig } from '../Tooltip'
17
+
18
+ tooltipConfig.setAppearance(tooltipAppearance)
19
+
20
+ export default {
21
+ argTypes: {
22
+ children: {
23
+ if: { arg: 'advancedProps' },
24
+ },
25
+ width: {
26
+ control: 'inline-radio',
27
+ options: widthProps,
28
+ },
29
+ borderWidth: {
30
+ control: 'inline-radio',
31
+ options: borderWidthProps,
32
+ },
33
+ borderColor: {
34
+ control: 'select',
35
+ options: borderColorProps,
36
+ },
37
+ elevation: {
38
+ control: 'inline-radio',
39
+ options: [null, 1, 2, 4, 6, 8, 12, 16, 24],
40
+ },
41
+ isTooltipVisible: { control: 'boolean' },
42
+ advancedProps: { control: 'boolean' },
43
+ after: {
44
+ if: { arg: 'advancedProps' },
45
+ },
46
+ align: {
47
+ control: 'inline-radio',
48
+ options: alignProps,
49
+ },
50
+ alignDirection: {
51
+ control: 'inline-radio',
52
+ options: alignDirectionProps,
53
+ },
54
+ alignment: {
55
+ control: 'inline-radio',
56
+ options: alignmentProps,
57
+ },
58
+ appearance: {
59
+ control: 'inline-radio',
60
+ options: ['surfacePrimary', 'surfaceSecondary', 'surfaceTertiary'],
61
+ },
62
+ arrowPosition: {
63
+ control: 'inline-radio',
64
+ options: ['top', 'right', 'bottom', 'left'],
65
+ },
66
+ before: {
67
+ if: { arg: 'advancedProps' },
68
+ },
69
+ borderType: {
70
+ control: 'inline-radio',
71
+ options: borderTypeProps,
72
+ },
73
+ className: {
74
+ if: { arg: 'advancedProps' },
75
+ },
76
+ fill: {
77
+ control: 'select',
78
+ options: fillProps,
79
+ },
80
+ shape: {
81
+ control: 'inline-radio',
82
+ options: shapeProps,
83
+ },
84
+ size: {
85
+ control: 'inline-radio',
86
+ options: ['s', 'm', 'l'],
87
+ },
88
+ textColor: {
89
+ control: 'select',
90
+ options: textColorProps,
91
+ },
92
+ textSize: {
93
+ control: 'inline-radio',
94
+ options: textSizeProps,
95
+ },
96
+ titleSize: {
97
+ control: 'inline-radio',
98
+ options: titleSizeProps,
99
+ },
100
+ titleTextColor: {
101
+ control: 'select',
102
+ options: textColorProps,
103
+ },
104
+ type: {
105
+ control: 'inline-radio',
106
+ options: [null, 'arrow'],
107
+ },
108
+ },
109
+ component: Tooltip,
110
+ parameters: {
111
+ controls: {
112
+ exclude: [
113
+ 'fillDesktop',
114
+ 'fillMobile',
115
+ 'fillTablet',
116
+ 'shapeDesktop',
117
+ 'shapeMobile',
118
+ 'shapeTablet',
119
+ 'sizeDesktop',
120
+ 'sizeMobile',
121
+ 'sizeTablet',
122
+ 'textSizeDesktop',
123
+ 'textSizeMobile',
124
+ 'textSizeTablet',
125
+ ],
126
+ },
127
+ },
128
+ title: 'Atoms / Tooltip',
129
+ }
130
+
131
+ const Default = {
132
+ args: {
133
+ padding: 10,
134
+ elevation: 8,
135
+ initialIsVisible: true,
136
+ shape: 'rounded',
137
+ size: 'm',
138
+ text: 'text',
139
+ textSize: 'm',
140
+ title: 'Title',
141
+ titleSize: 'h4',
142
+ },
143
+ }
144
+
145
+ export const surfacePrimary = {
146
+ args: {
147
+ ...Default.args,
148
+ appearance: 'surfacePrimary',
149
+ },
150
+ }
151
+
152
+ export const surfaceSecondary = {
153
+ args: {
154
+ ...Default.args,
155
+ appearance: 'surfaceSecondary',
156
+ },
157
+ }
158
+
159
+ export const surfaceTertiary = {
160
+ args: {
161
+ ...Default.args,
162
+ appearance: 'surfaceTertiary',
163
+ },
164
+ }