@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,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;
@@ -12,7 +12,6 @@ interface iChoiceThemeColor {
12
12
  fillActiveDisabled?: tFillProps;
13
13
  fillDisabled?: tFillProps;
14
14
  fillHover?: tFillHoverProps;
15
- gap?: string;
16
15
  iconFillDisabled?: tItemColorProps;
17
16
  iconItemFill?: tItemColorProps;
18
17
  iconSize?: iconSizePropsType;
@@ -42,7 +41,6 @@ interface iChoiceProps extends iChoiceThemeColor, iStyleAttributes {
42
41
  appearance?: tAppearanceKeysDefault;
43
42
  before?: ReactNode;
44
43
  className?: string;
45
- gap?: string;
46
44
  icon?: ReactNode;
47
45
  name?: string;
48
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui",
3
- "version": "1.2.19",
3
+ "version": "1.2.21",
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,23 +55,23 @@
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",
@@ -93,7 +93,7 @@
93
93
  "registry": "https://registry.npmjs.org/"
94
94
  },
95
95
  "dependencies": {
96
- "@itcase/common": "^1.2.13",
96
+ "@itcase/common": "^1.2.15",
97
97
  "clsx": "^2.1.1",
98
98
  "js-cookie": "^3.0.5",
99
99
  "lodash": "^4.17.21",
@@ -103,10 +103,10 @@
103
103
  "react": "^18.3.1",
104
104
  "react-dadata": "^2.23.3",
105
105
  "react-date-range": "^2.0.1",
106
- "react-datepicker": "^7.4.0",
106
+ "react-datepicker": "^7.5.0",
107
107
  "react-dom": "^18.3.1",
108
108
  "react-indiana-drag-scroll": "^3.0.3-alpha",
109
- "react-inlinesvg": "^4.1.3",
109
+ "react-inlinesvg": "^4.1.4",
110
110
  "react-modern-drawer": "^1.4.0",
111
111
  "react-otp-input": "^3.1.1",
112
112
  "react-paginate": "^8.2.0",
@@ -118,37 +118,37 @@
118
118
  "uuid": "^10.0.0"
119
119
  },
120
120
  "devDependencies": {
121
- "@babel/core": "^7.25.8",
122
- "@babel/eslint-parser": "^7.25.8",
123
- "@babel/eslint-plugin": "^7.25.7",
124
- "@babel/preset-env": "^7.25.8",
125
- "@babel/preset-react": "^7.25.7",
126
- "@chromatic-com/storybook": "^1.9.0",
121
+ "@babel/core": "^7.25.9",
122
+ "@babel/eslint-parser": "^7.25.9",
123
+ "@babel/eslint-plugin": "^7.25.9",
124
+ "@babel/preset-env": "^7.25.9",
125
+ "@babel/preset-react": "^7.25.9",
126
+ "@chromatic-com/storybook": "^3.1.0",
127
127
  "@commitlint/cli": "^19.5.0",
128
128
  "@commitlint/config-conventional": "^19.5.0",
129
- "@itcase/lint": "^1.0.13",
129
+ "@itcase/lint": "^1.0.14",
130
130
  "@rollup/plugin-babel": "^6.0.4",
131
- "@rollup/plugin-commonjs": "^28.0.0",
131
+ "@rollup/plugin-commonjs": "^28.0.1",
132
132
  "@rollup/plugin-json": "^6.1.0",
133
133
  "@rollup/plugin-node-resolve": "^15.3.0",
134
134
  "@rollup/plugin-terser": "^0.4.4",
135
- "@rollup/plugin-typescript": "^12.1.0",
135
+ "@rollup/plugin-typescript": "^12.1.1",
136
136
  "@semantic-release/changelog": "^6.0.3",
137
137
  "@semantic-release/git": "^10.0.1",
138
138
  "@semantic-release/release-notes-generator": "14.0.1",
139
- "@storybook/addon-essentials": "^8.3.5",
140
- "@storybook/addon-interactions": "^8.3.5",
141
- "@storybook/addon-links": "^8.3.5",
142
- "@storybook/addon-onboarding": "^8.3.5",
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
143
  "@storybook/addon-styling-webpack": "^1.0.0",
144
- "@storybook/addon-themes": "^8.3.5",
144
+ "@storybook/addon-themes": "^8.3.6",
145
145
  "@storybook/addon-webpack5-compiler-swc": "^1.0.5",
146
- "@storybook/blocks": "^8.3.5",
147
- "@storybook/react": "^8.3.5",
148
- "@storybook/react-webpack5": "^8.3.5",
149
- "@storybook/test": "^8.3.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",
150
150
  "@types/js-cookie": "^3.0.6",
151
- "@types/lodash": "^4.17.10",
151
+ "@types/lodash": "^4.17.12",
152
152
  "@types/react": "^18",
153
153
  "@types/react-datepicker": "^7.0.0",
154
154
  "@types/react-dom": "^18.3.1",
@@ -159,8 +159,8 @@
159
159
  "babel-plugin-react-docgen": "^4.2.1",
160
160
  "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
161
161
  "conventional-changelog-conventionalcommits": "^8.0.0",
162
- "eslint": "9.12.0",
163
- "eslint-plugin-storybook": "^0.9.0",
162
+ "eslint": "9.13.0",
163
+ "eslint-plugin-storybook": "^0.10.1",
164
164
  "husky": "^9.1.6",
165
165
  "lint-staged": "^15.2.10",
166
166
  "npm": "^10.9.0",
@@ -168,7 +168,6 @@
168
168
  "postcss-aspect-ratio-polyfill": "^2.0.0",
169
169
  "postcss-cli": "^11.0.0",
170
170
  "postcss-combine-duplicated-selectors": "^10.0.3",
171
- "postcss-csso": "^6.0.1",
172
171
  "postcss-dark-theme-class": "^1.3.0",
173
172
  "postcss-discard-duplicates": "^7.0.1",
174
173
  "postcss-each": "^1.1.0",
@@ -183,7 +182,7 @@
183
182
  "postcss-nested-ancestors": "^3.0.0",
184
183
  "postcss-normalize": "^13.0.1",
185
184
  "postcss-prepend-imports": "^1.0.1",
186
- "postcss-preset-env": "^10.0.7",
185
+ "postcss-preset-env": "^10.0.8",
187
186
  "postcss-pxtorem": "^6.1.0",
188
187
  "postcss-responsive-type": "github:ITCase/postcss-responsive-type",
189
188
  "postcss-sort-media-queries": "^5.2.0",
@@ -193,14 +192,9 @@
193
192
  "rollup-plugin-dts": "^6.1.1",
194
193
  "rollup-plugin-peer-deps-external": "^2.2.4",
195
194
  "rollup-preserve-directives": "^1.1.2",
196
- "semantic-release": "^24.1.2",
197
- "storybook": "^8.3.5",
195
+ "semantic-release": "^24.1.3",
196
+ "storybook": "^8.3.6",
198
197
  "stylelint": "^16.10.0",
199
198
  "typescript": "^5.6.3"
200
- },
201
- "eslintConfig": {
202
- "extends": [
203
- "plugin:storybook/recommended"
204
- ]
205
199
  }
206
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;