@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
@@ -0,0 +1,89 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as JustifyStories from './JustifyContent.stories.js'
4
+
5
+ <Meta title="Layout / Group / JustifyContent" />
6
+
7
+ # JustifyContent
8
+
9
+ Свойство `justifyContent` определяет расположение элементов в контейнере
10
+
11
+ ```js
12
+ <Group justifyContent="...">...</Group>
13
+ ```
14
+
15
+ ## Значения
16
+
17
+ #### Позиционное выравнивание
18
+
19
+ - `flexStart` — Выравнивание с начала
20
+ - `flexEnd` — Выравнивание с конца
21
+ - `center` — Выравнивание элементов по центру
22
+
23
+ ### Распределённое выравнивание
24
+
25
+ - `spaceBetween` — Первый элемент вначале, последний в конце
26
+ - `spaceAround` — Все элементы имеют полноразмерное пространство с обоих концов
27
+ - `spaceEvenly` — Все элементы имеют равное пространство вокруг
28
+
29
+ # Примеры использования
30
+
31
+ ### flexStart
32
+
33
+ Выравнивание с начала
34
+
35
+ ```js
36
+ <Group justifyContent="flexStart">...</Group>
37
+ ```
38
+
39
+ <Canvas of={JustifyStories.FlexStart} />
40
+
41
+ ### flexEnd
42
+
43
+ Выравнивание с конца
44
+
45
+ ```js
46
+ <Group justifyContent="flexEnd">...</Group>
47
+ ```
48
+
49
+ <Canvas of={JustifyStories.FlexEnd} />
50
+
51
+ ### center
52
+
53
+ Выравнивание элементов по центру
54
+
55
+ ```js
56
+ <Group justifyContent="center">...</Group>
57
+ ```
58
+
59
+ <Canvas of={JustifyStories.Center} />
60
+
61
+ ### spaceBetween
62
+
63
+ Первый элемент в начале, последний в конце
64
+
65
+ ```js
66
+ <Group justifyContent="spaceBetween">...</Group>
67
+ ```
68
+
69
+ <Canvas of={JustifyStories.SpaceBetween} />
70
+
71
+ ### spaceAround
72
+
73
+ Все элементы имеют полноразмерное пространство с обоих концов
74
+
75
+ ```js
76
+ <Group justifyContent="spaceAround">...</Group>
77
+ ```
78
+
79
+ <Canvas of={JustifyStories.SpaceAround} />
80
+
81
+ ### spaceEvenly
82
+
83
+ Все элементы имеют равное пространство вокруг
84
+
85
+ ```js
86
+ <Group justifyContent="spaceEvenly">...</Group>
87
+ ```
88
+
89
+ <Canvas of={JustifyStories.SpaceEvenly} />
@@ -0,0 +1,96 @@
1
+ import { Group } from '../../Group'
2
+ import { Text } from '../../Text'
3
+ import { argTypes } from './args'
4
+
5
+ export default {
6
+ argTypes: {
7
+ ...argTypes,
8
+ },
9
+ component: Group,
10
+ render: ({ ...args }) => (
11
+ <Group
12
+ width={args.width}
13
+ height={args.height}
14
+ fill={args.fill}
15
+ fill={args.fill}
16
+ padding={args.padding}
17
+ borderColor={args.borderColor}
18
+ direction={args.direction}
19
+ justifyContent={args.justifyContent}
20
+ >
21
+ <Group height="60" fill="accentPrimary" padding="20" textAlign="center">
22
+ <Text size="xl" textColor="accentTextPrimary">
23
+ 1
24
+ </Text>
25
+ </Group>
26
+ <Group height="60" fill="primaryPrimary" padding="20" textAlign="center">
27
+ <Text size="xl" textColor="primaryTextPrimary">
28
+ 2
29
+ </Text>
30
+ </Group>
31
+ <Group height="60" fill="secondaryPrimary" padding="20" textAlign="center">
32
+ <Text size="xl" textColor="secondaryTextPrimary">
33
+ 3
34
+ </Text>
35
+ </Group>
36
+ <Group height="60" fill="infoPrimary" padding="20" textAlign="center">
37
+ <Text size="xl" textColor="infoTextPrimary">
38
+ 4
39
+ </Text>
40
+ </Group>
41
+ </Group>
42
+ ),
43
+ title: 'Layout / Group / Variants / JustifyContent',
44
+ }
45
+
46
+ const Default = {
47
+ args: {
48
+ width: '500',
49
+ padding: '20',
50
+ borderColor: 'surfaceBorderPrimary',
51
+ direction: 'horizontal',
52
+ fill: 'surfacePrimary',
53
+ },
54
+ }
55
+
56
+ export const FlexStart = {
57
+ args: {
58
+ ...Default.args,
59
+ justifyContent: 'flex-start',
60
+ },
61
+ }
62
+
63
+ export const FlexEnd = {
64
+ args: {
65
+ ...Default.args,
66
+ justifyContent: 'flex-end',
67
+ },
68
+ }
69
+
70
+ export const Center = {
71
+ args: {
72
+ ...Default.args,
73
+ justifyContent: 'center',
74
+ },
75
+ }
76
+
77
+ export const SpaceBetween = {
78
+ args: {
79
+ ...Default.args,
80
+ justifyContent: 'space-between',
81
+ },
82
+ }
83
+
84
+ export const SpaceAround = {
85
+ args: {
86
+ ...Default.args,
87
+ justifyContent: 'space-around',
88
+ },
89
+ }
90
+
91
+ export const SpaceEvenly = {
92
+ args: {
93
+ ...Default.args,
94
+ justifyContent: 'space-evenly',
95
+ },
96
+ }
@@ -0,0 +1,31 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as LabelStories from './Label.stories.js'
4
+
5
+ <Meta of={LabelStories} />
6
+
7
+ # Label
8
+
9
+ ## Accent
10
+
11
+ <Canvas sourceState="shown" of={LabelStories.Accent} />
12
+
13
+ ## Primary
14
+
15
+ <Canvas sourceState="shown" of={LabelStories.Primary} />
16
+
17
+ ## Secondary
18
+
19
+ <Canvas sourceState="shown" of={LabelStories.Secondary} />
20
+
21
+ ## SurfacePrimary
22
+
23
+ <Canvas sourceState="shown" of={LabelStories.SurfacePrimary} />
24
+
25
+ ## SurfaceSecondary
26
+
27
+ <Canvas sourceState="shown" of={LabelStories.SurfaceSecondary} />
28
+
29
+ ## SurfaceTertiary
30
+
31
+ <Canvas sourceState="shown" of={LabelStories.SurfaceTertiary} />
@@ -1,4 +1,3 @@
1
- import { Label, labelConfig } from '@itcase/ui/components/Label'
2
1
  import {
3
2
  borderColorProps,
4
3
  borderTypeProps,
@@ -8,48 +7,28 @@ import {
8
7
  textColorProps,
9
8
  textSizeProps,
10
9
  widthProps,
11
- } from '@itcase/ui/constants'
12
-
13
- import labelAppearance from 'src/components/Label/appearance.json'
10
+ } from '../../../constants'
11
+ import labelAppearance from '../appearance.json'
12
+ import { Label, labelConfig } from '../Label'
14
13
 
15
14
  labelConfig.setAppearance(labelAppearance)
16
15
 
17
16
  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
17
  argTypes: {
45
- advancedProps: { control: 'boolean' },
46
18
  children: {
47
19
  if: { arg: 'advancedProps' },
48
20
  },
49
- className: {
50
- if: { arg: 'advancedProps' },
21
+ width: {
22
+ control: 'inline-radio',
23
+ options: widthProps,
51
24
  },
25
+ textAlign: {
26
+ control: 'inline-radio',
27
+ options: ['left', 'center', 'right'],
28
+ },
29
+ advancedProps: { control: 'boolean' },
52
30
  appearance: {
31
+ control: 'inline-radio',
53
32
  options: [
54
33
  null,
55
34
  'accent',
@@ -59,58 +38,78 @@ export default {
59
38
  'surfaceSecondary',
60
39
  'surfaceTertiary',
61
40
  ],
62
- control: 'inline-radio',
63
41
  },
64
42
  border: {
65
- options: borderColorProps,
66
43
  control: 'select',
44
+ options: borderColorProps,
67
45
  },
68
46
  borderType: {
69
- options: borderTypeProps,
70
47
  control: 'inline-radio',
48
+ options: borderTypeProps,
49
+ },
50
+ className: {
51
+ if: { arg: 'advancedProps' },
71
52
  },
72
53
  fill: {
73
- options: fillProps,
74
54
  control: 'select',
55
+ options: fillProps,
75
56
  },
76
57
  labelTextColor: {
77
- options: textColorProps,
78
58
  control: 'select',
59
+ options: textColorProps,
79
60
  },
80
61
  labelTextSize: {
62
+ control: 'inline-radio',
81
63
  options: textSizeProps,
64
+ },
65
+ mode: {
82
66
  control: 'inline-radio',
67
+ options: [null, 'skeleton'],
83
68
  },
84
69
  shape: {
85
- options: shapeProps,
86
70
  control: 'inline-radio',
71
+ options: shapeProps,
87
72
  },
88
73
  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
74
  control: 'inline-radio',
75
+ options: sizeProps,
99
76
  },
100
- mode: {
101
- options: [null, 'skeleton'],
102
- control: 'inline-radio',
77
+ },
78
+ component: Label,
79
+ parameters: {
80
+ controls: {
81
+ exclude: [
82
+ 'borderDesktop',
83
+ 'borderMobile',
84
+ 'borderTablet',
85
+ 'borderTypeDesktop',
86
+ 'borderTypeMobile',
87
+ 'borderTypeTablet',
88
+ 'fillDesktop',
89
+ 'fillMobile',
90
+ 'fillTablet',
91
+ 'labelTextSizeDesktop',
92
+ 'labelTextSizeMobile',
93
+ 'labelTextSizeTablet',
94
+ 'shapeDesktop',
95
+ 'shapeMobile',
96
+ 'shapeTablet',
97
+ 'sizeDesktop',
98
+ 'sizeMobile',
99
+ 'sizeTablet',
100
+ ],
103
101
  },
104
102
  },
103
+ title: 'Atoms / Label',
105
104
  }
106
105
 
107
106
  export const Default = {
108
107
  args: {
109
108
  appearance: 'accent',
110
- shape: 'rounded',
111
109
  label: 'Label',
112
- size: 'xxl',
113
110
  labelTextSize: 'l',
111
+ shape: 'rounded',
112
+ size: 'xxl',
114
113
  },
115
114
  }
116
115
  export const Accent = {
@@ -161,3 +160,14 @@ export const SkeletonMode = {
161
160
  mode: 'skeleton',
162
161
  },
163
162
  }
163
+
164
+ export const WithTooltip = {
165
+ args: {
166
+ ...Default.args,
167
+ appearance: 'accent',
168
+ showTooltip: true,
169
+ tooltip: '123',
170
+ tooltipText: '123',
171
+ tooltipTextSize: 'm',
172
+ },
173
+ }
@@ -0,0 +1,31 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as LoaderStories from './Loader.stories.js'
4
+
5
+ <Meta of={LoaderStories} />
6
+
7
+ # Loader
8
+
9
+ ## Accent
10
+
11
+ <Canvas sourceState="shown" of={LoaderStories.Accent} />
12
+
13
+ ## Primary
14
+
15
+ <Canvas sourceState="shown" of={LoaderStories.Primary} />
16
+
17
+ ## Secondary
18
+
19
+ <Canvas sourceState="shown" of={LoaderStories.Secondary} />
20
+
21
+ ## SurfacePrimary
22
+
23
+ <Canvas sourceState="shown" of={LoaderStories.SurfacePrimary} />
24
+
25
+ ## SurfaceSecondary
26
+
27
+ <Canvas sourceState="shown" of={LoaderStories.SurfaceSecondary} />
28
+
29
+ ## SurfaceTertiary
30
+
31
+ <Canvas sourceState="shown" of={LoaderStories.SurfaceTertiary} />
@@ -1,40 +1,42 @@
1
- import { Loader, loaderConfig } from '@itcase/ui/components/Loader'
2
- import loaderAppearance from 'src/components/Loader/appearance.json'
3
-
4
1
  import {
5
- fillProps,
6
2
  heightProps,
7
3
  positionProps,
8
4
  textColorProps,
9
5
  textSizeProps,
10
6
  widthProps,
11
- } from '@itcase/ui/constants'
7
+ } from '../../../constants'
8
+ import loaderAppearance from '../appearance.json'
9
+ import { Loader, loaderConfig } from '../Loader'
12
10
 
13
11
  loaderConfig.setAppearance(loaderAppearance)
14
12
 
15
13
  export default {
16
- title: 'Atoms / Loader',
17
- component: Loader,
18
14
  argTypes: {
19
- advancedProps: { control: 'boolean' },
20
- left: {
15
+ children: {
21
16
  if: { arg: 'advancedProps' },
22
17
  },
23
- right: {
24
- if: { arg: 'advancedProps' },
18
+ width: {
19
+ control: 'inline-radio',
20
+ options: widthProps,
25
21
  },
26
- children: {
22
+ height: {
23
+ control: 'inline-radio',
24
+ options: heightProps,
25
+ },
26
+ position: {
27
+ control: 'inline-radio',
27
28
  if: { arg: 'advancedProps' },
29
+ options: positionProps,
28
30
  },
29
- className: {
31
+ right: {
30
32
  if: { arg: 'advancedProps' },
31
33
  },
32
- position: {
33
- options: positionProps,
34
- control: 'inline-radio',
34
+ left: {
35
35
  if: { arg: 'advancedProps' },
36
36
  },
37
+ advancedProps: { control: 'boolean' },
37
38
  appearance: {
39
+ control: 'inline-radio',
38
40
  options: [
39
41
  null,
40
42
  'accent',
@@ -44,29 +46,25 @@ export default {
44
46
  'surfaceSecondary',
45
47
  'surfaceTertiary',
46
48
  ],
47
- control: 'inline-radio',
48
49
  },
49
- width: {
50
- options: widthProps,
51
- control: 'inline-radio',
50
+ className: {
51
+ if: { arg: 'advancedProps' },
52
52
  },
53
- height: {
54
- options: heightProps,
53
+ set: {
55
54
  control: 'inline-radio',
55
+ options: [null, 'simple'],
56
56
  },
57
57
  textColor: {
58
- options: textColorProps,
59
58
  control: 'select',
59
+ options: textColorProps,
60
60
  },
61
61
  textSize: {
62
- options: textSizeProps,
63
- control: 'inline-radio',
64
- },
65
- set: {
66
- options: [null, 'simple'],
67
62
  control: 'inline-radio',
63
+ options: textSizeProps,
68
64
  },
69
65
  },
66
+ component: Loader,
67
+ title: 'Atoms / Loader',
70
68
  }
71
69
 
72
70
  export const Default = {
@@ -0,0 +1,19 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as LogoStories from './Logo.stories.js'
4
+
5
+ <Meta of={LogoStories} />
6
+
7
+ # Logo
8
+
9
+ ## SizeS
10
+
11
+ <Canvas sourceState="shown" of={LogoStories.SizeS} />
12
+
13
+ ## SizeM
14
+
15
+ <Canvas sourceState="shown" of={LogoStories.SizeM} />
16
+
17
+ ## SizeL
18
+
19
+ <Canvas sourceState="shown" of={LogoStories.SizeL} />
@@ -1,65 +1,65 @@
1
- import { Logo } from '@itcase/ui/components/Logo'
2
- import { alignDirectionProps, alignProps, widthProps } from '@itcase/ui/constants'
1
+ import { alignDirectionProps, alignProps, widthProps } from '../../../constants'
2
+ import { Logo } from '../Logo'
3
3
 
4
4
  export default {
5
- title: 'Atoms / Logo',
6
- component: Logo,
7
5
  argTypes: {
8
- advancedProps: { control: 'boolean' },
9
6
  children: {
10
7
  if: { arg: 'advancedProps' },
11
8
  },
12
- className: {
13
- if: { arg: 'advancedProps' },
14
- },
15
- isLink: {
16
- if: { arg: 'advancedProps' },
9
+ width: {
10
+ control: 'inline-radio',
11
+ options: widthProps,
17
12
  },
18
- logoSrc: {
19
- if: { arg: 'advancedProps' },
13
+ alignItems: {
14
+ control: 'inline-radio',
15
+ options: alignProps,
20
16
  },
21
- target: {
17
+ isLink: {
22
18
  if: { arg: 'advancedProps' },
23
19
  },
20
+ advancedProps: { control: 'boolean' },
24
21
  align: {
25
- options: alignProps,
26
22
  control: 'inline-radio',
27
- },
28
- alignItems: {
29
23
  options: alignProps,
30
- control: 'inline-radio',
31
24
  },
32
25
  alignDirection: {
33
- options: alignDirectionProps,
34
26
  control: 'inline-radio',
27
+ options: alignDirectionProps,
35
28
  },
36
- width: {
37
- options: widthProps,
38
- control: 'inline-radio',
29
+ className: {
30
+ if: { arg: 'advancedProps' },
31
+ },
32
+ href: {
33
+ if: { arg: 'advancedProps' },
39
34
  },
40
35
  link: {
41
36
  if: { arg: 'advancedProps' },
42
37
  },
43
- href: {
38
+ logoSrc: {
44
39
  if: { arg: 'advancedProps' },
45
40
  },
41
+ mode: {
42
+ control: 'inline-radio',
43
+ options: [null, 'skeleton'],
44
+ },
46
45
  size: {
47
- options: ['s', 'm', 'l'],
48
46
  control: 'inline-radio',
47
+ options: ['s', 'm', 'l'],
49
48
  },
50
49
  sizeMobile: {
50
+ control: 'inline-radio',
51
51
  if: { arg: 'advancedProps' },
52
52
  options: ['s', 'm', 'l'],
53
- control: 'inline-radio',
54
53
  },
55
54
  source: {
56
55
  if: { arg: 'advancedProps' },
57
56
  },
58
- mode: {
59
- options: [null, 'skeleton'],
60
- control: 'inline-radio',
57
+ target: {
58
+ if: { arg: 'advancedProps' },
61
59
  },
62
60
  },
61
+ component: Logo,
62
+ title: 'Atoms / Logo',
63
63
  }
64
64
 
65
65
  export const Default = {
@@ -93,7 +93,7 @@ export const SizeL = {
93
93
  export const SkeletonMode = {
94
94
  args: {
95
95
  ...Default.args,
96
- size: 'l',
97
96
  mode: 'skeleton',
97
+ size: 'l',
98
98
  },
99
99
  }
@@ -0,0 +1,15 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as MenuItemStories from './MenuItem.stories.js'
4
+
5
+ <Meta of={MenuItemStories} />
6
+
7
+ # MenuItem
8
+
9
+ ## Active
10
+
11
+ <Canvas sourceState="shown" of={MenuItemStories.Active} />
12
+
13
+ ## Subitem
14
+
15
+ <Canvas sourceState="shown" of={MenuItemStories.SetSubitem} />