@itcase/ui 1.2.18 → 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 (207) hide show
  1. package/dist/{Group-BDuYmoBK.js → Group-B2oTJg0t.js} +1 -1
  2. package/dist/{Group-12uup5mu.js → Group-CVUfaHaS.js} +1 -1
  3. package/dist/cjs/components/Accordion.js +3 -2
  4. package/dist/cjs/components/Choice.js +11 -3
  5. package/dist/cjs/components/CookiesWarning.js +1 -1
  6. package/dist/cjs/components/Group.js +1 -1
  7. package/dist/cjs/components/InputPassword.js +6 -6
  8. package/dist/cjs/components/Panel.js +1 -1
  9. package/dist/cjs/components/Radio.js +85 -8
  10. package/dist/cjs/components/Response.js +1 -1
  11. package/dist/cjs/components/Select.js +1 -1
  12. package/dist/cjs/components/Switch.js +12 -8
  13. package/dist/cjs/components/Tile.js +3 -3
  14. package/dist/cjs/constants/componentProps/textColor.js +1 -1
  15. package/dist/cjs/constants/componentProps/textColorHover.js +1 -1
  16. package/dist/cjs/hooks/useViewportFix.js +43 -0
  17. package/dist/components/Accordion.js +3 -2
  18. package/dist/components/Choice.js +11 -3
  19. package/dist/components/CookiesWarning.js +1 -1
  20. package/dist/components/Group.js +1 -1
  21. package/dist/components/InputPassword.js +6 -6
  22. package/dist/components/Panel.js +1 -1
  23. package/dist/components/Radio.js +86 -5
  24. package/dist/components/Response.js +1 -1
  25. package/dist/components/Select.js +1 -1
  26. package/dist/components/Switch.js +12 -4
  27. package/dist/components/Tile.js +3 -3
  28. package/dist/constants/componentProps/textColor.js +1 -1
  29. package/dist/constants/componentProps/textColorHover.js +1 -1
  30. package/dist/css/components/Accordion/Accordion.css +1 -0
  31. package/dist/css/components/Choice/Choice.css +14 -0
  32. package/dist/css/components/DatePicker/DatePicker.css +12 -12
  33. package/dist/css/components/Icon/Icon.css +14 -8
  34. package/dist/css/components/Select/Select.css +1 -1
  35. package/dist/css/components/Select/css/__input-container/select__input-container.css +1 -1
  36. package/dist/css/mixins/mixin_animation.css +1 -1
  37. package/dist/css/mixins/mixin_elevation.css +0 -2
  38. package/dist/css/mixins/mixin_typography.css +105 -84
  39. package/dist/css/mixins/mixin_utils.css +1 -1
  40. package/dist/css/styles/border-color/border-color.css +4 -2
  41. package/dist/css/styles/text-gradient/text-gradient.css +9 -4
  42. package/dist/css/styles/width/width.css +1 -1
  43. package/dist/css/tokens/colors.css +105 -0
  44. package/dist/css/tokens/elevation.css +10 -0
  45. package/dist/css/tokens/settings.css +31 -0
  46. package/dist/css/tokens/typography.css +127 -0
  47. package/dist/hooks/useViewportFix.js +41 -0
  48. package/dist/stories/Accordion.mdx +11 -0
  49. package/dist/stories/Accordion.stories.js +49 -32
  50. package/dist/stories/AccordionItem.mdx +15 -0
  51. package/dist/stories/AccordionItem.stories.js +69 -69
  52. package/dist/stories/AlignContent.mdx +85 -0
  53. package/dist/stories/AlignItems.mdx +74 -0
  54. package/dist/stories/AlignItems.stories.js +88 -0
  55. package/dist/stories/AlignSelf.mdx +85 -0
  56. package/dist/stories/AlignSelf.stories.js +101 -0
  57. package/dist/stories/Appearance.mdx +35 -0
  58. package/dist/stories/Appearance.stories.js +101 -0
  59. package/dist/stories/Avatar.mdx +23 -0
  60. package/dist/stories/Avatar.stories.js +69 -64
  61. package/dist/stories/Badge.mdx +20 -0
  62. package/dist/stories/Badge.stories.js +43 -44
  63. package/dist/stories/Button.mdx +48 -0
  64. package/dist/stories/Button.stories.js +26 -186
  65. package/dist/stories/Cell.mdx +23 -0
  66. package/dist/stories/Cell.stories.js +119 -119
  67. package/dist/stories/Checkbox.mdx +24 -0
  68. package/dist/stories/Checkbox.stories.js +42 -34
  69. package/dist/stories/Chips.mdx +31 -0
  70. package/dist/stories/Chips.stories.js +22 -67
  71. package/dist/stories/Choice.mdx +11 -0
  72. package/dist/stories/Choice.stories.js +59 -61
  73. package/dist/stories/Code.mdx +11 -0
  74. package/dist/stories/Code.stories.js +37 -40
  75. package/dist/stories/Columns.mdx +51 -0
  76. package/dist/stories/Columns.stories.js +80 -0
  77. package/dist/stories/Configure.mdx +364 -0
  78. package/dist/stories/DatePicker.mdx +31 -0
  79. package/dist/stories/DatePicker.stories.js +58 -59
  80. package/dist/stories/Dev.mdx +9 -0
  81. package/dist/stories/DevMode.mdx +8 -0
  82. package/dist/stories/Direction.mdx +84 -0
  83. package/dist/stories/Direction.stories.js +93 -0
  84. package/dist/stories/Divider.mdx +35 -0
  85. package/dist/stories/Divider.stories.js +28 -29
  86. package/dist/stories/Dot.mdx +19 -0
  87. package/dist/stories/Dot.stories.js +38 -39
  88. package/dist/stories/Drawer.mdx +11 -0
  89. package/dist/stories/Drawer.stories.js +75 -0
  90. package/dist/stories/Dropdown.mdx +12 -0
  91. package/dist/stories/Dropdown.stories.js +30 -29
  92. package/dist/stories/DropdownItem.mdx +19 -0
  93. package/dist/stories/DropdownItem.stories.js +76 -78
  94. package/dist/stories/Flex.stories.js +47 -0
  95. package/dist/stories/FlexAlignContent.stories.js +102 -0
  96. package/dist/stories/FlexAlignItems.stories.js +91 -0
  97. package/dist/stories/FlexAlignSelf.stories.js +97 -0
  98. package/dist/stories/FlexDirection.stories.js +112 -0
  99. package/dist/stories/FlexGrow.stories.js +69 -0
  100. package/dist/stories/FlexJustifyContent.stories.js +98 -0
  101. package/dist/stories/FlexOrder.stories.js +76 -0
  102. package/dist/stories/FlexWrap.stories.js +89 -0
  103. package/dist/stories/Grid.stories.js +202 -0
  104. package/dist/stories/Group.mdx +9 -0
  105. package/dist/stories/{Tab.group.stories.js → Group.stories.js} +60 -56
  106. package/dist/stories/Grow.mdx +40 -0
  107. package/dist/stories/Header.stories.js +29 -0
  108. package/dist/stories/Icon.mdx +15 -0
  109. package/dist/stories/Icon.stories.js +84 -82
  110. package/dist/stories/Image.mdx +15 -0
  111. package/dist/stories/Image.stories.js +134 -0
  112. package/dist/stories/Input.mdx +31 -0
  113. package/dist/stories/Input.stories.js +26 -26
  114. package/dist/stories/InputPassword.mdx +15 -0
  115. package/dist/stories/InputPassword.stories.js +32 -34
  116. package/dist/stories/JustifyContent.mdx +89 -0
  117. package/dist/stories/JustifyContent.stories.js +96 -0
  118. package/dist/stories/Label.mdx +31 -0
  119. package/dist/stories/Label.stories.js +63 -53
  120. package/dist/stories/Loader.mdx +31 -0
  121. package/dist/stories/Loader.stories.js +26 -28
  122. package/dist/stories/Logo.mdx +19 -0
  123. package/dist/stories/Logo.stories.js +28 -28
  124. package/dist/stories/MenuItem.mdx +15 -0
  125. package/dist/stories/MenuItem.stories.js +156 -91
  126. package/dist/stories/Message.mdx +12 -0
  127. package/dist/stories/Message.stories.js +34 -0
  128. package/dist/stories/ModalConfirm.stories.js +48 -47
  129. package/dist/stories/ModalDefault.stories.js +21 -20
  130. package/dist/stories/Notification.mdx +23 -0
  131. package/dist/stories/Notification.stories.js +24 -47
  132. package/dist/stories/Order.mdx +52 -0
  133. package/dist/stories/Overview.mdx +11 -0
  134. package/dist/stories/Page.stories.js +28 -0
  135. package/dist/stories/Pagination.mdx +11 -0
  136. package/dist/stories/Pagination.stories.js +24 -27
  137. package/dist/stories/Playground.mdx +10 -0
  138. package/dist/stories/Radio.mdx +29 -0
  139. package/dist/stories/Radio.stories.js +32 -33
  140. package/dist/stories/Response.mdx +18 -0
  141. package/dist/stories/Response.stories.js +66 -0
  142. package/dist/stories/SearchInput.mdx +19 -0
  143. package/dist/stories/{Search-input.stories.js → SearchInput.stories.js} +79 -62
  144. package/dist/stories/Segmented.mdx +11 -0
  145. package/dist/stories/Segmented.stories.js +49 -50
  146. package/dist/stories/Select.stories.js +155 -155
  147. package/dist/stories/Size.mdx +35 -0
  148. package/dist/stories/Size.stories.js +101 -0
  149. package/dist/stories/Skeleton.mdx +9 -0
  150. package/dist/stories/State.mdx +19 -0
  151. package/dist/stories/State.stories.js +70 -0
  152. package/dist/stories/Switch.mdx +23 -0
  153. package/dist/stories/Switch.stories.js +23 -23
  154. package/dist/stories/Text.mdx +35 -0
  155. package/dist/stories/Text.stories.js +172 -0
  156. package/dist/stories/Textarea.mdx +15 -0
  157. package/dist/stories/Textarea.stories.js +27 -27
  158. package/dist/stories/Tile.mdx +19 -0
  159. package/dist/stories/Tile.stories.js +112 -97
  160. package/dist/stories/Title.mdx +31 -0
  161. package/dist/stories/Title.stories.js +168 -0
  162. package/dist/stories/Tooltip.mdx +19 -0
  163. package/dist/stories/Tooltip.stories.js +164 -0
  164. package/dist/stories/WithTooltip.mdx +9 -0
  165. package/dist/stories/Wrap.mdx +52 -0
  166. package/dist/stories/Wrap.stories.js +74 -0
  167. package/dist/types/components/Accordion/Accordion.interface.d.ts +4 -0
  168. package/dist/types/components/Choice/Choice.interface.d.ts +2 -2
  169. package/dist/types/components/InputPassword/InputPassword.interface.d.ts +10 -8
  170. package/dist/types/components/Tile/Tile.d.ts +1 -1
  171. package/dist/types/components/Tile/Tile.interface.d.ts +3 -1
  172. package/dist/types/config/forms/datepicker.d.ts +18 -0
  173. package/dist/types/config/forms/index.d.ts +4 -0
  174. package/dist/types/config/forms/input.d.ts +14 -0
  175. package/dist/types/config/forms/select.d.ts +50 -0
  176. package/dist/types/hooks/useViewportFix.d.ts +2 -0
  177. package/dist/types/types/componentProps/flexWrap.d.ts +1 -1
  178. package/dist/types/types/componentProps/wrap.d.ts +1 -1
  179. package/package.json +38 -22
  180. package/dist/Radio-BQo97TZL.js +0 -89
  181. package/dist/Radio-oMf0vN7T.js +0 -86
  182. package/dist/Switch-B5yVEqxz.js +0 -14
  183. package/dist/Switch-DEXsrPCo.js +0 -12
  184. package/dist/cjs/components/FormField.js +0 -122
  185. package/dist/components/FormField.js +0 -116
  186. package/dist/css/mixins/mixin.css +0 -73
  187. package/dist/stories/FormFieldCheckbox.stories.js +0 -77
  188. package/dist/stories/FormFieldChoice.stories.js +0 -75
  189. package/dist/stories/FormFieldDatepicker.stories.js +0 -51
  190. package/dist/stories/FormFieldFileInput.stories.js +0 -58
  191. package/dist/stories/FormFieldInput.stories.js +0 -66
  192. package/dist/stories/FormFieldInputPassword.stories.js +0 -66
  193. package/dist/stories/FormFieldMultiBadgeSelect.stories.js +0 -132
  194. package/dist/stories/FormFieldMultiSelect.stories.js +0 -127
  195. package/dist/stories/FormFieldSelect.stories.js +0 -99
  196. package/dist/stories/FormFieldSelectGroup.stories.js +0 -84
  197. package/dist/stories/NotFound.stories.js +0 -93
  198. package/dist/stories/Tab.appearance.stories.js +0 -260
  199. package/dist/stories/Tab.size.stories.js +0 -259
  200. package/dist/stories/Tab.state.stories.js +0 -227
  201. package/dist/types/components/FormField/ChoiceField.d.ts +0 -8
  202. package/dist/types/components/FormField/FormField.d.ts +0 -9
  203. package/dist/types/components/FormField/FormFiled.interface.d.ts +0 -77
  204. package/dist/types/components/FormField/PasswordField.d.ts +0 -9
  205. package/dist/types/components/FormField/SelectField.d.ts +0 -9
  206. package/dist/types/components/FormField/SwitchField.d.ts +0 -8
  207. package/dist/types/components/FormField/index.d.ts +0 -6
@@ -1,31 +1,18 @@
1
- import { Icon } from '@itcase/ui/components/Icon'
2
- import { Button, buttonConfig } from '@itcase/ui/components/Button'
3
- import buttonAppearance from 'src/components/Button/appearance.json'
4
- import { NotificationItem, notificationItemConfig } from '@itcase/ui/components/Notification'
5
- import notificationAppearance from 'src/components/Notification/appearance.json'
6
-
7
- import {
8
- alignDirectionProps,
9
- alignProps,
10
- textSizeProps,
11
- titleSizeProps,
12
- widthProps,
13
- } from '@itcase/ui/constants'
1
+ import { textSizeProps, titleSizeProps } from '../../../constants'
2
+ import { Button, buttonConfig } from '../../Button'
3
+ import buttonAppearance from '../../Button/appearance.json'
4
+ import { Icon } from '../../Icon'
5
+ import notificationAppearance from '../appearance.json'
6
+ import { NotificationItem, notificationItemConfig } from '../NotificationItem'
14
7
 
15
8
  buttonConfig.setAppearance(buttonAppearance)
16
9
  notificationItemConfig.setAppearance(notificationAppearance)
17
10
 
18
- import { icon16 } from 'src/icons'
19
-
20
11
  export default {
21
- title: 'Atoms / NotificationItem',
22
- component: NotificationItem,
23
12
  argTypes: {
24
13
  advancedProps: { control: 'boolean' },
25
- className: {
26
- if: { arg: 'advancedProps' },
27
- },
28
14
  appearance: {
15
+ control: 'inline-radio',
29
16
  options: [
30
17
  null,
31
18
  'accent',
@@ -35,36 +22,40 @@ export default {
35
22
  'surfaceSecondary',
36
23
  'surfaceTertiary',
37
24
  ],
38
- control: 'inline-radio',
25
+ },
26
+ className: {
27
+ if: { arg: 'advancedProps' },
39
28
  },
40
29
  set: {
41
- options: [null, 'top', 'float', 'form', 'toast'],
42
30
  control: 'inline-radio',
31
+ options: [null, 'top', 'float', 'form', 'toast'],
43
32
  },
44
33
  status: {
45
- options: [null, 'success', 'error', 'warning'],
46
34
  control: 'inline-radio',
35
+ options: [null, 'success', 'error', 'warning'],
47
36
  },
48
37
  textSize: {
49
- options: textSizeProps,
50
38
  control: 'inline-radio',
39
+ options: textSizeProps,
51
40
  },
52
41
  titleTextSize: {
53
- options: titleSizeProps,
54
42
  control: 'inline-radio',
43
+ options: titleSizeProps,
55
44
  },
56
45
  type: {
57
46
  if: { arg: 'advancedProps' },
58
47
  },
59
48
  },
49
+ component: NotificationItem,
50
+ title: 'Molecules / Notification',
60
51
  }
61
52
 
62
53
  export const Default = {
63
54
  args: {
64
55
  set: 'top',
65
- title: 'Heading',
66
- text: 'Text',
67
56
  status: 'success',
57
+ text: 'Text',
58
+ title: 'Heading',
68
59
  },
69
60
  }
70
61
 
@@ -79,16 +70,9 @@ export const Top = {
79
70
  export const Float = {
80
71
  args: {
81
72
  ...Default.args,
73
+ closeButton: <Icon iconFill="surfaceItemSecondary" imageSrc="assets/16/Remove.svg" size="16" />,
82
74
  set: 'float',
83
75
  status: 'warning',
84
- closeButton: (
85
- <Icon
86
- iconFill="surfaceItemSecondary"
87
- size="16"
88
- SvgImage={icon16.Remove}
89
- // TODO: onClick={}
90
- />
91
- ),
92
76
  },
93
77
  }
94
78
 
@@ -104,25 +88,18 @@ export const Form = {
104
88
  export const Toast = {
105
89
  args: {
106
90
  ...Default.args,
107
- set: 'toast',
108
- status: null,
109
91
  after: (
110
92
  <Button
93
+ width="fill"
94
+ labelTextSize="m"
111
95
  appearance="accent"
112
96
  label="Обновить приложение"
113
- labelTextSize="m"
114
97
  shape="rounded"
115
98
  size="l"
116
- width="fill"
117
- />
118
- ),
119
- closeButton: (
120
- <Icon
121
- iconFill="surfaceItemSecondary"
122
- size="16"
123
- SvgImage={icon16.Remove}
124
- // TODO: onClick={}
125
99
  />
126
100
  ),
101
+ closeButton: <Icon iconFill="surfaceItemPrimary" imageSrc="assets/16/Remove.svg" size="16" />,
102
+ set: 'toast',
103
+ status: null,
127
104
  },
128
105
  }
@@ -0,0 +1,52 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as OrderStories from './FlexOrder.stories.js'
4
+
5
+ <Meta title="Layout / Flex / Order" />
6
+
7
+ # Order
8
+
9
+ Свойство `order` определяет порядок вывода флексов внутри флекс-контейнера. Элементы располагаются согласно значениям свойства order от меньшего к большему.
10
+ При равных значениях order элементы выводятся в том порядке, в каком они появляются в исходном коде.
11
+
12
+ ```js
13
+ <FlexItem order="...">...</FlexItem>
14
+ ```
15
+
16
+ ## Значения
17
+
18
+ - `-1` — Элемент выведется первым
19
+ - `0` — Значение по умолчанию. Элемент будет располагаться в том порядке, в каком появляется в исходном коде
20
+ - `1` — Элемент выведется последним
21
+
22
+ # Примеры использования
23
+
24
+ ### Значение -1
25
+
26
+ Элемент выведется первым
27
+
28
+ ```js
29
+ <FlexItem order="-1">...</FlexItem>
30
+ ```
31
+
32
+ <Canvas of={OrderStories.First} />
33
+
34
+ ### Значение 0
35
+
36
+ Значение по умолчанию. Элемент будет располагаться в том порядке, в каком появляется в исходном коде
37
+
38
+ ```js
39
+ <FlexItem order="0">...</FlexItem>
40
+ ```
41
+
42
+ <Canvas of={OrderStories.Regular} />
43
+
44
+ ### Значение 1
45
+
46
+ Элемент выведется последним
47
+
48
+ ```js
49
+ <FlexItem order="1">...</FlexItem>
50
+ ```
51
+
52
+ <Canvas of={OrderStories.Last} />
@@ -0,0 +1,11 @@
1
+ import { Meta, Story } from '@storybook/blocks'
2
+
3
+ import * as TooltipStories from './Tooltip.stories.js'
4
+
5
+ <Meta title="Atoms / Tooltip / Overview" />
6
+
7
+ # Tooltip
8
+
9
+ `Tooltip` - это небольшой фрагмент контекстной информации, который появляется, когда пользователи наводят курсор мыши на элемент пользовательского интерфейса.
10
+
11
+ <Story of={TooltipStories.surfacePrimary} />
@@ -0,0 +1,28 @@
1
+ import { expect, userEvent, within } from '@storybook/test';
2
+
3
+ import { Page } from './Page';
4
+
5
+ export default {
6
+ title: 'Example/Page',
7
+ component: Page,
8
+ parameters: {
9
+ // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
10
+ layout: 'fullscreen',
11
+ },
12
+ };
13
+
14
+ export const LoggedOut = {};
15
+
16
+ // More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing
17
+ export const LoggedIn = {
18
+ play: async ({ canvasElement }) => {
19
+ const canvas = within(canvasElement);
20
+ const loginButton = canvas.getByRole('button', { name: /Log in/i });
21
+ await expect(loginButton).toBeInTheDocument();
22
+ await userEvent.click(loginButton);
23
+ await expect(loginButton).not.toBeInTheDocument();
24
+
25
+ const logoutButton = canvas.getByRole('button', { name: /Log out/i });
26
+ await expect(logoutButton).toBeInTheDocument();
27
+ },
28
+ };
@@ -0,0 +1,11 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as PaginationStories from './Pagination.stories.js'
4
+
5
+ <Meta of={PaginationStories} />
6
+
7
+ # Pagination
8
+
9
+ ## Default
10
+
11
+ <Canvas sourceState="shown" of={PaginationStories.Default} />
@@ -1,65 +1,62 @@
1
- import { Pagination } from '@itcase/ui/components/Pagination'
2
- import { Icon } from '@itcase/ui/components/Icon'
3
-
4
- import { flexJustifyContentProps } from '@itcase/ui/constants'
5
-
6
- import { icon14 } from 'src/icons'
1
+ import { flexJustifyContentProps } from '../../../constants'
2
+ import { Icon } from '../../Icon'
3
+ import { Pagination } from '../../Pagination'
7
4
 
8
5
  export default {
9
- title: 'Atoms / Pagination ',
10
- component: Pagination,
11
6
  argTypes: {
12
- advancedProps: { control: 'boolean' },
13
- className: {
7
+ justifyContent: {
8
+ control: 'inline-radio',
14
9
  if: { arg: 'advancedProps' },
10
+ options: flexJustifyContentProps,
15
11
  },
16
- pageNumber: {
12
+ advancedProps: { control: 'boolean' },
13
+ allItemsCount: {
14
+ control: { max: 50, min: 1, step: 1, type: 'number' },
15
+ },
16
+ className: {
17
17
  if: { arg: 'advancedProps' },
18
18
  },
19
19
  marginPagesDisplayed: {
20
- control: { type: 'number', min: 1, max: 10, step: 1 },
21
- },
22
- pageRangeDisplayed: {
23
- control: { type: 'number', min: 1, max: 10, step: 1 },
20
+ control: { max: 10, min: 1, step: 1, type: 'number' },
24
21
  },
25
- justifyContent: {
22
+ pageNumber: {
26
23
  if: { arg: 'advancedProps' },
27
- options: flexJustifyContentProps,
28
- control: 'inline-radio',
29
24
  },
30
- allItemsCount: {
31
- control: { type: 'number', min: 1, max: 50, step: 1 },
25
+ pageRangeDisplayed: {
26
+ control: { max: 10, min: 1, step: 1, type: 'number' },
32
27
  },
33
28
  perPageCount: {
34
- control: { type: 'number', min: 1, max: 50, step: 1 },
29
+ control: { max: 50, min: 1, step: 1, type: 'number' },
35
30
  },
36
31
  },
32
+ component: Pagination,
33
+ title: 'Atoms / Pagination ',
37
34
  }
38
35
 
39
36
  export const Default = {
40
37
  args: {
41
38
  allItemsCount: 50,
42
- perPageCount: 5,
43
39
  marginPagesDisplayed: 3,
44
- pageRangeDisplayed: 7,
45
- previousLabel: (
40
+ nextLabel: (
46
41
  <Icon
47
42
  fillHover="surfaceSecondaryHover"
48
43
  fillSize="32"
49
44
  iconFill="surfaceItemPrimary"
45
+ imageSrc="assets/14/ChevronRight.svg"
50
46
  shape="circular"
51
47
  size="14"
52
- SvgImage={icon14.ChevronLeft}
53
48
  />
54
49
  ),
55
- nextLabel: (
50
+ pageRangeDisplayed: 7,
51
+ perPageCount: 5,
52
+ previousLabel: (
56
53
  <Icon
57
54
  fillHover="surfaceSecondaryHover"
58
55
  fillSize="32"
59
56
  iconFill="surfaceItemPrimary"
57
+ imageSrc="assets/14/ChevronLeft.svg"
60
58
  shape="circular"
61
59
  size="14"
62
- SvgImage={icon14.ChevronRight}
63
60
  />
64
61
  ),
65
62
  },
@@ -0,0 +1,10 @@
1
+ import { Canvas, Controls, Meta } from '@storybook/blocks'
2
+
3
+ import * as TooltipStories from './Tooltip.stories.js'
4
+
5
+ <Meta title="Atoms / Tooltip / Playground" />
6
+
7
+ # Playground
8
+
9
+ <Canvas sourceState="shown" of={TooltipStories.surfacePrimary} />
10
+ <Controls of={TooltipStories.surfacePrimary} />
@@ -0,0 +1,29 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as RadioStories from './Radio.stories.js'
4
+
5
+ <Meta of={RadioStories} />
6
+
7
+ # Radio
8
+
9
+ ## Active
10
+
11
+ <Canvas sourceState="shown" of={RadioStories.Active} />
12
+
13
+ ## Disabled
14
+
15
+ <Canvas sourceState="shown" of={RadioStories.Disabled} />
16
+
17
+ ## Checked
18
+
19
+ <Canvas sourceState="shown" of={RadioStories.Checked} />
20
+
21
+ ## CheckedDisabled
22
+
23
+ <Canvas sourceState="shown" of={RadioStories.CheckedDisabled} />
24
+
25
+
26
+ Active
27
+ Disabled
28
+ Checked
29
+ CheckedDisabled
@@ -1,74 +1,73 @@
1
- import { Radio, radioConfig } from '@itcase/ui/components/Radio'
2
- import radioState from 'src/components/Radio/state.json'
3
-
4
- import { shapeProps, textColorProps, textSizeProps } from '@itcase/ui/constants'
1
+ import { shapeProps, textColorProps, textSizeProps } from '../../../constants'
2
+ import { Radio, radioConfig } from '../Radio'
3
+ import radioState from '../state.json'
5
4
 
6
5
  radioConfig.setState(radioState)
7
6
 
8
7
  export default {
9
- title: 'Atoms / Radio',
10
- component: Radio,
11
8
  argTypes: {
12
9
  advancedProps: { control: 'boolean' },
10
+ checked: {
11
+ control: 'boolean',
12
+ },
13
13
  className: {
14
14
  if: { arg: 'advancedProps' },
15
15
  },
16
- tag: {
17
- if: { arg: 'advancedProps' },
16
+ descTextColor: {
17
+ control: 'select',
18
+ options: textColorProps,
18
19
  },
19
- shape: {
20
- options: shapeProps,
20
+ descTextSize: {
21
21
  control: 'inline-radio',
22
- },
23
- labelTextSize: {
24
22
  options: textSizeProps,
25
- control: 'inline-radio',
23
+ },
24
+ disabled: {
25
+ control: 'boolean',
26
26
  },
27
27
  labelTextColor: {
28
- options: textColorProps,
29
28
  control: 'select',
29
+ options: textColorProps,
30
30
  },
31
- descTextSize: {
32
- options: textSizeProps,
31
+ labelTextSize: {
33
32
  control: 'inline-radio',
33
+ options: textSizeProps,
34
34
  },
35
- descTextColor: {
36
- options: textColorProps,
37
- control: 'select',
38
- },
39
- checked: {
40
- control: 'boolean',
35
+ shape: {
36
+ control: 'inline-radio',
37
+ options: shapeProps,
41
38
  },
42
- disabled: {
43
- control: 'boolean',
39
+ tag: {
40
+ if: { arg: 'advancedProps' },
44
41
  },
45
42
  },
43
+ component: Radio,
44
+ title: 'Atoms / Radio',
46
45
  }
47
46
 
48
47
  export const Default = {
49
48
  args: {
50
- label: 'Radio',
51
- labelTextSize: 'm',
52
- labelTextColor: 'surfaceTextPrimary',
53
49
  desc: 'Description',
54
- descTextSize: 'xxs',
55
50
  descTextColor: 'surfaceTextTertiary',
56
-
57
- stateShape: 'circular',
51
+ descTextSize: 'xxs',
52
+ label: 'Radio',
53
+ labelTextColor: 'surfaceTextPrimary',
54
+ labelTextSize: 'm',
58
55
 
59
56
  stateBorderColor: 'surfaceBorderQuaternary',
57
+
60
58
  stateBorderColorChecked: 'surfaceBorderQuaternary',
61
59
  stateBorderColorDisabled: 'surfaceBorderQuaternary',
62
60
  stateBorderColorDisabledChecked: 'surfaceBorderQuaternary',
63
-
64
61
  stateBorderWidth: 1,
65
62
 
63
+ stateCheckmarkFill: 'surfaceItemAccent',
64
+
65
+ stateCheckmarkFillDisabled: 'surfaceItemDisabled',
66
66
  stateFill: 'surfacePrimary',
67
67
  stateFillChecked: 'surfacePrimary',
68
68
  stateFillDisabled: 'surfaceDisabled',
69
69
  stateFillDisabledChecked: 'surfaceDisabled',
70
- stateCheckmarkFill: 'surfaceItemAccent',
71
- stateCheckmarkFillDisabled: 'surfaceItemDisabled',
70
+ stateShape: 'circular',
72
71
  },
73
72
  }
74
73
 
@@ -0,0 +1,18 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as ResponseStories from './Response.stories.js'
4
+
5
+ <Meta of={ResponseStories} />
6
+
7
+ # Response Set: Default
8
+ ## Success
9
+ <Canvas sourceState="shown" of={ResponseStories.Success} />
10
+
11
+ ## Warning
12
+ <Canvas sourceState="shown" of={ResponseStories.Warning} />
13
+
14
+ ## Error
15
+ <Canvas sourceState="shown" of={ResponseStories.Error} />
16
+
17
+ ## Fail
18
+ <Canvas sourceState="shown" of={ResponseStories.Fail} />
@@ -0,0 +1,66 @@
1
+ import { Response } from '../Response'
2
+ import { argTypes } from './args'
3
+
4
+ export default {
5
+ argTypes: {
6
+ ...argTypes,
7
+ },
8
+ component: Response,
9
+ title: 'Molecules / Response / Set: Default',
10
+ }
11
+
12
+ const Default = {
13
+ args: {
14
+ message: 'Text',
15
+ primaryButtonLabel: 'Primary Button',
16
+ secondaryButtonLabel: 'Secondary Button',
17
+ title: 'Heading',
18
+ },
19
+ }
20
+
21
+ export const WithoutProps = {
22
+ args: {
23
+ ...Default.args,
24
+ },
25
+ }
26
+
27
+ export const Dev = {
28
+ args: {
29
+ ...Default.args,
30
+ padding: 24,
31
+ appearance: 'dev',
32
+ imageSrc: 'assets/search.svg',
33
+ },
34
+ }
35
+
36
+ export const Success = {
37
+ args: {
38
+ ...Default.args,
39
+ imageSrc: 'assets/response/success.svg',
40
+ state: 'success',
41
+ },
42
+ }
43
+
44
+ export const Warning = {
45
+ args: {
46
+ ...Default.args,
47
+ imageSrc: 'assets/response/warning.svg',
48
+ state: 'warning',
49
+ },
50
+ }
51
+
52
+ export const Error = {
53
+ args: {
54
+ ...Default.args,
55
+ imageSrc: 'assets/response/error.svg',
56
+ state: 'error',
57
+ },
58
+ }
59
+
60
+ export const Fail = {
61
+ args: {
62
+ ...Default.args,
63
+ imageSrc: 'assets/response/fail.svg',
64
+ state: 'fail',
65
+ },
66
+ }
@@ -0,0 +1,19 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as SearchInputStories from './SearchInput.stories.js'
4
+
5
+ <Meta of={SearchInputStories} />
6
+
7
+ # SearchInput
8
+
9
+ ## С иконкой для очистки поля ClearIcon
10
+
11
+ <Canvas of={SearchInputStories.ClearIcon} />
12
+
13
+ ## С иконкой до текста BeforeIcon
14
+
15
+ <Canvas of={SearchInputStories.BeforeIcon} />
16
+
17
+ ## С иконкой после текста AfterIcon
18
+
19
+ <Canvas of={SearchInputStories.AfterIcon} />