@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
@@ -0,0 +1,9 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as LabelStories from './Label.stories.js'
4
+
5
+ <Meta title="Atoms / Label / WithTooltip" />
6
+
7
+ # With Tooltip
8
+
9
+ <Canvas sourceState="shown" of={LabelStories.WithTooltip} />
@@ -0,0 +1,52 @@
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+
3
+ import * as WrapStories from './Wrap.stories.js'
4
+
5
+ <Meta title="Layout / Group / Wrap" />
6
+
7
+ # Wrap
8
+
9
+ Свойство `wrap` определяет, помещаются ли гибкие элементы в одну строку или могут переноситься на несколько строк.
10
+ Если перенос разрешен, он задает направление наложения строк.
11
+
12
+ ```js
13
+ <Group wrap="...">...</Group>
14
+ ```
15
+
16
+ ## Значения
17
+
18
+ - `nowrap` — Элементы располагаются в одну строку, что может привести к переполнению гибкого контейнера.
19
+ - `wrap` — Элементы разбиваются на несколько строк.
20
+ - `wrapReverse` — Элементы разбиваются на несколько строк, но обратном порядке.
21
+
22
+ # Примеры использования
23
+
24
+ ### nowrap
25
+
26
+ Элементы располагаются в одну строку, что может привести к переполнению гибкого контейнера.
27
+
28
+ ```js
29
+ <Group wrap="nowrap">...</Group>
30
+ ```
31
+
32
+ <Canvas of={WrapStories.Nowrap} />
33
+
34
+ ### wrap
35
+
36
+ Элементы разбиваются на несколько строк.
37
+
38
+ ```js
39
+ <Group wrap="wrap">...</Group>
40
+ ```
41
+
42
+ <Canvas of={WrapStories.Wrap} />
43
+
44
+ ### wrapReverse
45
+
46
+ Элементы разбиваются на несколько строк, но обратном порядке.
47
+
48
+ ```js
49
+ <Group wrap="wrapReverse">...</Group>
50
+ ```
51
+
52
+ <Canvas of={WrapStories.WrapReverse} />
@@ -0,0 +1,74 @@
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
+ padding={args.padding}
16
+ borderColor={args.borderColor}
17
+ direction={args.direction}
18
+ wrap={args.wrap}
19
+ >
20
+ <Group width="30%" height="60" fill="accentPrimary" padding="20">
21
+ <Text size="xl" textColor="accentTextPrimary">
22
+ 1
23
+ </Text>
24
+ </Group>
25
+ <Group width="30%" height="60" fill="primaryPrimary" padding="20">
26
+ <Text size="xl" textColor="accentTextPrimary">
27
+ 2
28
+ </Text>
29
+ </Group>
30
+ <Group width="30%" height="60" fill="secondaryPrimary" padding="20">
31
+ <Text size="xl" textColor="accentTextPrimary">
32
+ 3
33
+ </Text>
34
+ </Group>
35
+ <Group width="30%" height="60" fill="infoPrimary" padding="20">
36
+ <Text size="xl" textColor="accentTextPrimary">
37
+ 4
38
+ </Text>
39
+ </Group>
40
+ </Group>
41
+ ),
42
+ title: 'Layout / Group / Variants / Wrap',
43
+ }
44
+
45
+ const Default = {
46
+ args: {
47
+ width: '500',
48
+ padding: '20',
49
+ borderColor: 'surfaceBorderPrimary',
50
+ direction: 'horizontal',
51
+ fill: 'surfacePrimary',
52
+ },
53
+ }
54
+
55
+ export const Nowrap = {
56
+ args: {
57
+ ...Default.args,
58
+ wrap: 'nowrap',
59
+ },
60
+ }
61
+
62
+ export const Wrap = {
63
+ args: {
64
+ ...Default.args,
65
+ wrap: 'wrap',
66
+ },
67
+ }
68
+
69
+ export const WrapReverse = {
70
+ args: {
71
+ ...Default.args,
72
+ wrap: 'wrap-reverse',
73
+ },
74
+ }
@@ -39,6 +39,9 @@ interface iAccordionItemProps extends iStyleAttributes {
39
39
  contentTextColor?: tTextColorProps;
40
40
  contentTextSize?: tSizeProps;
41
41
  contentTextWeight?: tTextWeightProps;
42
+ dividerDirection?: tDirectionProps;
43
+ dividerFill?: tFillProps;
44
+ dividerSize?: tSizeProps;
42
45
  fill?: tFillProps;
43
46
  fillDesktop?: tFillProps;
44
47
  fillHover?: tFillHoverProps;
@@ -54,6 +57,7 @@ interface iAccordionItemProps extends iStyleAttributes {
54
57
  shapeDesktop?: tShapeProps;
55
58
  shapeMobile?: tShapeProps;
56
59
  shapeTablet?: tShapeProps;
60
+ showDivider?: boolean;
57
61
  size?: tSizeProps;
58
62
  style?: CSSProperties;
59
63
  title?: string;
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { iStyleAttributes } from '../../hooks/styleAttributes.interface';
3
- import type { borderTypePropsType, iconSizePropsType, sizeOptionPropsType, tBorderColorProps, tBorderWidthProps, tFillHoverProps, tFillProps, tItemColorProps, tShapeProps, tTextColorProps, tTextSizeProps, tTextWeightProps } from '../../types';
3
+ import type { borderTypePropsType, iconSizePropsType, sizeOptionPropsType, tBorderColorProps, tBorderWidthProps, tFillHoverProps, tFillProps, tItemColorProps, tShapeProps, tTextColorProps, tTextSizeProps, tTextWeightProps, wrapPropsType } from '../../types';
4
4
  import type { tAppearanceKeysDefault } from '../../types/componentProps/appearanceKeys';
5
5
  interface iChoiceThemeColor {
6
6
  activeIconItemFill?: tItemColorProps;
@@ -22,6 +22,7 @@ interface iChoiceThemeColor {
22
22
  labelTextSize?: tTextSizeProps;
23
23
  labelTextWeight?: tTextWeightProps;
24
24
  shape?: tShapeProps;
25
+ wrap?: wrapPropsType;
25
26
  }
26
27
  type tChoiceAppearance = {
27
28
  [key in tAppearanceKeysDefault]?: iChoiceThemeColor;
@@ -40,7 +41,6 @@ interface iChoiceProps extends iChoiceThemeColor, iStyleAttributes {
40
41
  appearance?: tAppearanceKeysDefault;
41
42
  before?: ReactNode;
42
43
  className?: string;
43
- gap?: string;
44
44
  icon?: ReactNode;
45
45
  name?: string;
46
46
  options: {
@@ -1,5 +1,5 @@
1
1
  import { iStyleAttributes } from '../../hooks/styleAttributes.interface';
2
- import { tBorderColorProps, tBorderWidthProps, tFillProps, iconSizePropsType, tItemColorProps, tShapeProps, tSizeProps, tTextColorProps, tTextSizeProps, tTextWeightProps, tWidthProps } from '../../types';
2
+ import { iconSizePropsType, tBorderColorProps, tBorderWidthProps, tFillProps, tItemColorProps, tShapeProps, tSizeProps, tTextColorProps, tTextSizeProps, tTextWeightProps, tWidthProps } from '../../types';
3
3
  import { tAppearanceKeysDefault } from '../../types/componentProps/appearanceKeys';
4
4
  import { tStateKeysDefault } from '../../types/componentProps/stateKeys';
5
5
  export interface iInputThemeColor {
@@ -15,8 +15,8 @@ export interface iInputThemeColor {
15
15
  textWeight?: tTextWeightProps;
16
16
  width?: tWidthProps;
17
17
  }
18
- type appearanceKeysType = tAppearanceKeysDefault & {};
19
- type stateKeysType = tStateKeysDefault & {};
18
+ type appearanceKeysType = {} & tAppearanceKeysDefault;
19
+ type stateKeysType = {} & tStateKeysDefault;
20
20
  export type tInputState = {
21
21
  [key in stateKeysType]?: iInputThemeColor;
22
22
  };
@@ -24,25 +24,27 @@ export type tInputAppearance = {
24
24
  [key in appearanceKeysType]?: iInputThemeColor;
25
25
  };
26
26
  export interface IInputPasswordConfig {
27
- state: tInputState | undefined;
28
- setState: (newComponent: tInputState) => void;
29
27
  appearance: tInputAppearance | undefined;
28
+ state: tInputState | undefined;
30
29
  setAppearance: (newComponent: tInputAppearance) => void;
30
+ setState: (newComponent: tInputState) => void;
31
31
  }
32
32
  export interface IInputPasswordProps extends iInputThemeColor, iStyleAttributes {
33
+ id?: number | string;
33
34
  appearance?: appearanceKeysType;
34
35
  className?: string;
35
36
  disabled?: boolean;
36
37
  iconFill?: tItemColorProps;
37
38
  iconFillHover?: tItemColorProps;
39
+ iconRevealableHide?: string;
40
+ iconRevealableShow?: string;
38
41
  iconShape?: tShapeProps;
39
42
  iconSize?: iconSizePropsType;
40
- id?: number | string;
43
+ imageRevealableHide?: string;
44
+ imageRevealableShow?: string;
41
45
  placeholder?: string;
42
46
  state?: stateKeysType;
43
47
  value?: string;
44
- iconRevealableHide?: string;
45
- iconRevealableShow?: string;
46
48
  isRevealable?: boolean;
47
49
  onBlur?: () => void;
48
50
  onChange?: () => void;
@@ -2,8 +2,8 @@ import { ITileProps } from './Tile.interface';
2
2
  declare function Tile(props: ITileProps): import("react/jsx-runtime").JSX.Element;
3
3
  declare namespace Tile {
4
4
  var defaultProps: {
5
- textTag: string;
6
5
  alignDirection: string;
6
+ textTag: string;
7
7
  };
8
8
  }
9
9
  export { Tile };
@@ -1,11 +1,13 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
+ import { tAppearanceKeysDefault } from 'types/componentProps/appearanceKeys';
2
3
  import { iStyleAttributes } from '../../hooks/styleAttributes.interface';
3
- import { tAlignDirectionProps, tAlignProps, borderColorHoverPropsType, tBorderColorProps, borderTypePropsType, tBorderWidthProps, tDirectionProps, tFillProps, tShapeProps, tSizeProps, tTextAlignProps, tTextColorProps, tTextSizeProps, tTextWeightProps, tTextWrapProps, titleSizePropsType } from '../../types';
4
+ import { borderColorHoverPropsType, borderTypePropsType, tAlignDirectionProps, tAlignProps, tBorderColorProps, tBorderWidthProps, tDirectionProps, tFillProps, titleSizePropsType, tShapeProps, tSizeProps, tTextAlignProps, tTextColorProps, tTextSizeProps, tTextWeightProps, tTextWrapProps } from '../../types';
4
5
  export interface ITileProps extends iStyleAttributes {
5
6
  after?: ReactNode;
6
7
  align?: tAlignProps;
7
8
  alignDirection?: tAlignDirectionProps;
8
9
  badge?: string;
10
+ badgeAppearance?: tAppearanceKeysDefault;
9
11
  badgeSize?: tSizeProps;
10
12
  badgeTextColor?: tTextColorProps;
11
13
  badgeTextSize?: tTextSizeProps;
@@ -0,0 +1,18 @@
1
+ declare const defaultDatepickerProps: {
2
+ size: string;
3
+ iconSize: number;
4
+ iconFillSize: number;
5
+ iconItemFill: string;
6
+ daySize: string;
7
+ dayTextColor: string;
8
+ dayTextSize: string;
9
+ dayTextShape: string;
10
+ monthTextColor: string;
11
+ monthTextSize: string;
12
+ monthTextWeight: number;
13
+ yearTextColor: string;
14
+ yearTextSize: string;
15
+ yearTextWeight: number;
16
+ placeholderTextColor: string;
17
+ };
18
+ export { defaultDatepickerProps };
@@ -0,0 +1,4 @@
1
+ import { defaultDatepickerProps } from './datepicker';
2
+ import { defaultInputProps } from './input';
3
+ import { defaultSelectProps } from './select';
4
+ export { defaultDatepickerProps, defaultInputProps, defaultSelectProps };
@@ -0,0 +1,14 @@
1
+ declare const defaultInputProps: {
2
+ width: string;
3
+ borderColor: string;
4
+ caret: string;
5
+ errorBorderColor: string;
6
+ placeholderTextColor: string;
7
+ requiredBorderColor: string;
8
+ shape: string;
9
+ size: string;
10
+ textColor: string;
11
+ textColorDisabled: string;
12
+ textSize: string;
13
+ };
14
+ export { defaultInputProps };
@@ -0,0 +1,50 @@
1
+ declare const defaultSelectProps: {
2
+ elevation: number;
3
+ isClearable: boolean;
4
+ isSearchable: boolean;
5
+ badgeAppearance: string;
6
+ badgeSize: string;
7
+ badgeTextSize: string;
8
+ clearIconFill: string;
9
+ closeMenuOnSelect: boolean;
10
+ dividerDirection: string;
11
+ dividerFill: string;
12
+ dividerSize: string;
13
+ dropdownIconFill: string;
14
+ errorInputBorderColor: string;
15
+ headingFill: string;
16
+ headingTextColor: string;
17
+ headingTextSize: string;
18
+ headingTextWeight: string;
19
+ inputBorderColor: string;
20
+ inputBorderColorHover: string;
21
+ inputCaretColor: string;
22
+ inputFill: string;
23
+ inputShape: string;
24
+ inputTextColor: string;
25
+ inputTextSize: string;
26
+ loadingMessage: import("react/jsx-runtime").JSX.Element;
27
+ multipleItemFill: string;
28
+ multipleItemFillHover: string;
29
+ multipleItemIconFill: string;
30
+ multipleItemTextColor: string;
31
+ multipleItemTextSize: string;
32
+ noOptionsSearchText: string;
33
+ noOptionsText: string;
34
+ noOptionsTextColor: string;
35
+ noOptionsTextSize: string;
36
+ optionBorder: string;
37
+ optionFill: string;
38
+ optionFillHover: string;
39
+ optionShape: string;
40
+ optionTextColor: string;
41
+ optionTextSize: string;
42
+ placeholder: string;
43
+ placeholderTextColor: string;
44
+ placeholderTextSize: string;
45
+ requiredInputBorderColor: string;
46
+ showBadge: boolean;
47
+ showDivider: boolean;
48
+ size: string;
49
+ };
50
+ export { defaultSelectProps };
@@ -0,0 +1,2 @@
1
+ declare function useViewportFix(): void;
2
+ export { useViewportFix };
@@ -1 +1 @@
1
- export type flexWrapPropsType = 'wrap' | 'nowrap' | 'wrap-reverse';
1
+ export type flexWrapPropsType = 'nowrap' | 'wrap' | 'wrap-reverse';
@@ -1 +1 @@
1
- export type wrapPropsType = 'wrap' | 'no-wrap' | 'nowrap' | 'wrap-reverse';
1
+ export type wrapPropsType = 'no-wrap' | 'nowrap' | 'wrap' | 'wrap-reverse';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui",
3
- "version": "1.2.18",
3
+ "version": "1.2.20",
4
4
  "description": "UI components (Modal, Loader, Popup, etc)",
5
5
  "keywords": [
6
6
  "Modal",
@@ -42,9 +42,9 @@
42
42
  "types": "./dist/types/components/*/*.interface.d.ts"
43
43
  },
44
44
  "./components/*": {
45
+ "types": "./dist/types/components/*/index.d.ts",
45
46
  "import": "./dist/components/*.js",
46
- "require": "./dist/cjs/components/*.js",
47
- "types": "./dist/types/components/*/index.d.ts"
47
+ "require": "./dist/cjs/components/*.js"
48
48
  },
49
49
  "./constants": {
50
50
  "import": "./dist/constants.js",
@@ -55,27 +55,30 @@
55
55
  "require": "./dist/cjs/constants/*.js"
56
56
  },
57
57
  "./context/*": {
58
+ "types": "./dist/types/context/*.d.ts",
58
59
  "import": "./dist/context/*.js",
59
- "require": "./dist/cjs/context/*.js",
60
- "types": "./dist/types/context/*.d.ts"
60
+ "require": "./dist/cjs/context/*.js"
61
61
  },
62
62
  "./hooks/*": {
63
+ "types": "./dist/types/hooks/*.d.ts",
63
64
  "import": "./dist/hooks/*.js",
64
- "require": "./dist/cjs/hooks/*.js",
65
- "types": "./dist/types/hooks/*.d.ts"
65
+ "require": "./dist/cjs/hooks/*.js"
66
66
  },
67
67
  "./stories/*": "./dist/stories/*.js"
68
68
  },
69
69
  "scripts": {
70
70
  "build": "npm run build-js && npm run build-css",
71
71
  "build-js": "rm -rf dist && NODE_ENV=production rollup -c",
72
- "build-css": "rm -rf dist/css && postcss 'src/components/**/!(css)/*.css' 'src/styles/!(.css)/**/*.css' 'src/styles/mediaqueries.css' 'src/mixins/**/*.css' --base src --dir dist/css/ --env production",
72
+ "build-css": "rm -rf dist/css && postcss 'src/components/**/!(css)/*.css' 'src/styles/!(.css)/**/*.css' 'src/styles/mediaqueries.css' 'src/mixins/*.css' 'src/tokens/*.css' --base src --dir dist/css/ --env production",
73
73
  "dev-js": "rollup -c -w",
74
- "dev-css": "postcss 'src/components/**/!(css)/*.css' 'src/styles/!(.css)/**/*.css' 'src/styles/mediaqueries.css' 'src/mixins/**/*.css' --base src --dir dist/css/ --env production -w --verbose",
74
+ "dev-css": "postcss 'src/components/**/!(css)/*.css' 'src/styles/!(.css)/**/*.css' 'src/styles/mediaqueries.css' 'src/mixins/*.css' 'src/tokens/*.css' --base src --dir dist/css/ --env production -w --verbose",
75
75
  "prepare": "husky",
76
76
  "prepack": "npm run build",
77
77
  "semantic-release": "semantic-release",
78
- "typecheck": "tsc --noEmit"
78
+ "typecheck": "tsc --noEmit",
79
+ "storybook": "storybook dev -p 6006",
80
+ "build-storybook": "storybook build",
81
+ "test-storybook": "test-storybook -c .storybook --watch"
79
82
  },
80
83
  "files": [
81
84
  "dist",
@@ -92,7 +95,6 @@
92
95
  "dependencies": {
93
96
  "@itcase/common": "^1.2.13",
94
97
  "clsx": "^2.1.1",
95
- "html5-boilerplate": "^9.0.1",
96
98
  "js-cookie": "^3.0.5",
97
99
  "lodash": "^4.17.21",
98
100
  "luxon": "^3.5.0",
@@ -101,10 +103,10 @@
101
103
  "react": "^18.3.1",
102
104
  "react-dadata": "^2.23.3",
103
105
  "react-date-range": "^2.0.1",
104
- "react-datepicker": "^7.4.0",
106
+ "react-datepicker": "^7.5.0",
105
107
  "react-dom": "^18.3.1",
106
108
  "react-indiana-drag-scroll": "^3.0.3-alpha",
107
- "react-inlinesvg": "^4.1.3",
109
+ "react-inlinesvg": "^4.1.4",
108
110
  "react-modern-drawer": "^1.4.0",
109
111
  "react-otp-input": "^3.1.1",
110
112
  "react-paginate": "^8.2.0",
@@ -121,23 +123,35 @@
121
123
  "@babel/eslint-plugin": "^7.25.7",
122
124
  "@babel/preset-env": "^7.25.8",
123
125
  "@babel/preset-react": "^7.25.7",
126
+ "@chromatic-com/storybook": "^2.0.2",
124
127
  "@commitlint/cli": "^19.5.0",
125
128
  "@commitlint/config-conventional": "^19.5.0",
126
- "@itcase/lint": "^1.0.13",
129
+ "@itcase/lint": "^1.0.14",
127
130
  "@rollup/plugin-babel": "^6.0.4",
128
- "@rollup/plugin-commonjs": "^28.0.0",
131
+ "@rollup/plugin-commonjs": "^28.0.1",
129
132
  "@rollup/plugin-json": "^6.1.0",
130
133
  "@rollup/plugin-node-resolve": "^15.3.0",
131
134
  "@rollup/plugin-terser": "^0.4.4",
132
- "@rollup/plugin-typescript": "^12.1.0",
135
+ "@rollup/plugin-typescript": "^12.1.1",
133
136
  "@semantic-release/changelog": "^6.0.3",
134
137
  "@semantic-release/git": "^10.0.1",
135
138
  "@semantic-release/release-notes-generator": "14.0.1",
139
+ "@storybook/addon-essentials": "^8.3.6",
140
+ "@storybook/addon-interactions": "^8.3.6",
141
+ "@storybook/addon-links": "^8.3.6",
142
+ "@storybook/addon-onboarding": "^8.3.6",
143
+ "@storybook/addon-styling-webpack": "^1.0.0",
144
+ "@storybook/addon-themes": "^8.3.6",
145
+ "@storybook/addon-webpack5-compiler-swc": "^1.0.5",
146
+ "@storybook/blocks": "^8.3.6",
147
+ "@storybook/react": "^8.3.6",
148
+ "@storybook/react-webpack5": "^8.3.6",
149
+ "@storybook/test": "^8.3.6",
136
150
  "@types/js-cookie": "^3.0.6",
137
- "@types/lodash": "^4.17.10",
151
+ "@types/lodash": "^4.17.12",
138
152
  "@types/react": "^18",
139
153
  "@types/react-datepicker": "^7.0.0",
140
- "@types/react-dom": "^18.3.0",
154
+ "@types/react-dom": "^18.3.1",
141
155
  "@types/react-scroll": "^1.8.10",
142
156
  "@types/uuid": "^10.0.0",
143
157
  "babel-loader": "^9.2.1",
@@ -145,7 +159,8 @@
145
159
  "babel-plugin-react-docgen": "^4.2.1",
146
160
  "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
147
161
  "conventional-changelog-conventionalcommits": "^8.0.0",
148
- "eslint": "9.12.0",
162
+ "eslint": "9.13.0",
163
+ "eslint-plugin-storybook": "^0.10.1",
149
164
  "husky": "^9.1.6",
150
165
  "lint-staged": "^15.2.10",
151
166
  "npm": "^10.9.0",
@@ -153,7 +168,6 @@
153
168
  "postcss-aspect-ratio-polyfill": "^2.0.0",
154
169
  "postcss-cli": "^11.0.0",
155
170
  "postcss-combine-duplicated-selectors": "^10.0.3",
156
- "postcss-csso": "^6.0.1",
157
171
  "postcss-dark-theme-class": "^1.3.0",
158
172
  "postcss-discard-duplicates": "^7.0.1",
159
173
  "postcss-each": "^1.1.0",
@@ -162,6 +176,7 @@
162
176
  "postcss-hexrgba": "^2.1.0",
163
177
  "postcss-import": "^16.1.0",
164
178
  "postcss-import-ext-glob": "^2.1.1",
179
+ "postcss-loader": "^8.1.1",
165
180
  "postcss-mixins": "^11.0.3",
166
181
  "postcss-nested": "^6.2.0",
167
182
  "postcss-nested-ancestors": "^3.0.0",
@@ -177,8 +192,9 @@
177
192
  "rollup-plugin-dts": "^6.1.1",
178
193
  "rollup-plugin-peer-deps-external": "^2.2.4",
179
194
  "rollup-preserve-directives": "^1.1.2",
180
- "semantic-release": "^24.1.2",
181
- "stylelint": "^16.9.0",
195
+ "semantic-release": "^24.1.3",
196
+ "storybook": "^8.3.6",
197
+ "stylelint": "^16.10.0",
182
198
  "typescript": "^5.6.3"
183
199
  }
184
200
  }
@@ -1,89 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var clsx = require('clsx');
5
- var useDeviceTargetClass = require('./cjs/hooks/useDeviceTargetClass.js');
6
- var Text = require('./Text-_YhyTsQ1.js');
7
-
8
- var radioConfig = {
9
- state: undefined,
10
- setState: function (newComponent) {
11
- radioConfig.state = newComponent;
12
- },
13
- appearance: undefined,
14
- setAppearance: function (newComponent) {
15
- radioConfig.appearance = newComponent;
16
- },
17
- };
18
- function Radio(props) {
19
- var appearance = props.appearance, checked = props.checked, className = props.className, desc = props.desc, descTextColor = props.descTextColor, descTextSize = props.descTextSize, descTextWeight = props.descTextWeight, disabled = props.disabled, id = props.id, label = props.label, labelTextColor = props.labelTextColor, labelTextSize = props.labelTextSize, labelTextWeight = props.labelTextWeight, _a = props.tag, Tag = _a === void 0 ? 'label' : _a, onChange = props.onChange;
20
- var fillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
21
- prefix: 'fill_',
22
- propsKey: 'fill',
23
- });
24
- var shapeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
25
- prefix: 'radio_shape_',
26
- propsKey: 'shape',
27
- });
28
- var stateShapeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
29
- prefix: 'radio__state_shape_',
30
- propsKey: 'stateShape',
31
- });
32
- var stateFillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
33
- prefix: 'fill_',
34
- propsKey: checked ? 'stateFillChecked' : 'stateFill',
35
- });
36
- var stateFillDisabledClass = useDeviceTargetClass.useDeviceTargetClass(props, {
37
- prefix: 'fill_',
38
- propsKey: checked ? 'stateFillDisabledChecked' : 'stateFillDisabled',
39
- });
40
- var stateCheckmarkFillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
41
- prefix: 'radio_checkmark_fill_',
42
- propsKey: disabled ? 'stateCheckmarkFillDisabled' : 'stateCheckmarkFill',
43
- });
44
- var stateBorderWidthClass = useDeviceTargetClass.useDeviceTargetClass(props, {
45
- prefix: 'border-width_',
46
- propsKey: 'stateBorderWidth',
47
- });
48
- var stateBorderColorClass = useDeviceTargetClass.useDeviceTargetClass(props, {
49
- prefix: 'border-color_',
50
- propsKey: checked ? 'stateBorderColorChecked' : 'stateBorderColor',
51
- });
52
- var stateBorderColorHoverClass = useDeviceTargetClass.useDeviceTargetClass(props, {
53
- prefix: 'border-color_hover_',
54
- propsKey: checked ? 'stateBorderColorHoverChecked' : 'stateBorderColorHover',
55
- });
56
- var stateBorderColorDisabledClass = useDeviceTargetClass.useDeviceTargetClass(props, {
57
- prefix: 'border-color_',
58
- propsKey: checked ? 'stateBorderColorDisabledChecked' : 'stateBorderColorDisabled',
59
- });
60
- var appearanceConfig = appearance && radioConfig.appearance && radioConfig.appearance[appearance];
61
- return (jsxRuntime.jsxs(Tag, { className: clsx(className, 'radio', fillClass, shapeClass), htmlFor: id, children: [jsxRuntime.jsxs("div", { className: clsx('radio__item', stateCheckmarkFillClass ||
62
- ((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.stateCheckmarkFill) &&
63
- "radio_checkmark_fill_".concat(appearanceConfig.stateCheckmarkFill)
64
- .replace(/([A-Z])/g, '-$1')
65
- .toLowerCase())), children: [jsxRuntime.jsx("input", { checked: checked, className: "radio__input", disabled: disabled,
66
- // @ts-expect-error
67
- id: id, type: "radio", onChange: onChange }), jsxRuntime.jsx("div", { className: clsx('radio__state', disabled ? stateFillDisabledClass : stateFillClass, disabled
68
- ? stateBorderColorDisabledClass
69
- : stateBorderColorClass ||
70
- ((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.stateBorderColor) &&
71
- "border-color_".concat(appearanceConfig.stateBorderColor)
72
- .replace(/([A-Z])/g, '-$1')
73
- .toLowerCase()), stateBorderColorHoverClass, stateShapeClass ||
74
- ((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.stateShape) &&
75
- "radio__state_shape_".concat(appearanceConfig.stateShape)
76
- .replace(/([A-Z])/g, '-$1')
77
- .toLowerCase()), stateBorderWidthClass ||
78
- ((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.stateBorderWidth) &&
79
- "border-width_".concat(appearanceConfig.stateBorderWidth)
80
- .replace(/([A-Z])/g, '-$1')
81
- .toLowerCase())), children: "\u00A0" }), jsxRuntime.jsx("div", { className: "radio__state-checkmark", children: "\u00A0" })] }), label && (jsxRuntime.jsx(Text.Text, { className: "radio__label", size: labelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextSize), textColor: labelTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextColor), textWeight: labelTextWeight, children: label })), desc && (jsxRuntime.jsx(Text.Text, { className: "radio__desc", size: descTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.descTextSize), textColor: descTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.descTextColor), textWeight: descTextWeight, children: desc }))] }));
82
- }
83
- Radio.defaultProps = {
84
- shape: 'circular',
85
- tag: 'label',
86
- };
87
-
88
- exports.Radio = Radio;
89
- exports.radioConfig = radioConfig;