@itcase/ui-react-native 1.10.89 → 1.10.94

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 (156) hide show
  1. package/.storybook-react-native/preview.tsx +68 -32
  2. package/.storybook-react-native-web/main.ts +62 -40
  3. package/.storybook-react-native-web/preview.tsx +63 -55
  4. package/package.json +16 -16
  5. package/src/components/Avatar/Avatar.interface.ts +5 -5
  6. package/src/components/Avatar/index.ts +4 -4
  7. package/src/components/Avatar/stories/AvatarStories.config.ts +1 -4
  8. package/src/components/Avatar/styles/avatarShape.ts +2 -2
  9. package/src/components/Avatar/styles/avatarSize.ts +2 -2
  10. package/src/components/AvatarStack/AvatarStack.interface.ts +4 -4
  11. package/src/components/AvatarStack/index.ts +2 -2
  12. package/src/components/AvatarStack/stories/AvatarStackDemo.stories.tsx +2 -3
  13. package/src/components/AvatarStack/stories/AvatarStackStories.config.ts +20 -7
  14. package/src/components/AvatarStack/styles/avatarStackDirection.ts +2 -2
  15. package/src/components/Badge/Badge.interface.ts +6 -6
  16. package/src/components/Badge/index.ts +6 -6
  17. package/src/components/Badge/stories/BadgeStories.config.ts +1 -1
  18. package/src/components/Badge/styles/badgeShape.ts +2 -2
  19. package/src/components/Badge/styles/badgeSize.ts +2 -2
  20. package/src/components/Badge/styles/badgeType.ts +2 -2
  21. package/src/components/Breadcrumbs/Breadcrumbs.interface.ts +2 -2
  22. package/src/components/Breadcrumbs/index.ts +2 -2
  23. package/src/components/Breadcrumbs/styles/breadcrumbsSize.ts +2 -2
  24. package/src/components/Button/Button.interface.ts +5 -5
  25. package/src/components/Button/index.ts +4 -4
  26. package/src/components/Button/stories/ButtonStories.config.ts +4 -4
  27. package/src/components/Button/styles/buttonShape.ts +2 -2
  28. package/src/components/Button/styles/buttonSize.ts +2 -2
  29. package/src/components/Button/styles/buttonText.ts +2 -2
  30. package/src/components/Cell/Cell.interface.ts +6 -6
  31. package/src/components/Cell/index.ts +6 -6
  32. package/src/components/Cell/styles/cellDirection.ts +2 -2
  33. package/src/components/Cell/styles/cellShape.ts +2 -2
  34. package/src/components/Cell/styles/cellSize.ts +2 -2
  35. package/src/components/Checkbox/Checkbox.interface.ts +8 -8
  36. package/src/components/Checkbox/index.ts +4 -4
  37. package/src/components/Checkbox/styles/checkboxAlign.ts +2 -2
  38. package/src/components/Checkbox/styles/checkboxShape.ts +2 -2
  39. package/src/components/Checkbox/styles/checkboxSize.ts +2 -2
  40. package/src/components/Checkmark/Checkmark.interface.ts +4 -4
  41. package/src/components/Checkmark/index.ts +2 -2
  42. package/src/components/Checkmark/stories/CheckmarkStories.config.ts +3 -4
  43. package/src/components/Checkmark/styles/checkmarkSize.ts +2 -2
  44. package/src/components/Chips/Chips.interface.ts +4 -4
  45. package/src/components/Chips/index.ts +4 -4
  46. package/src/components/Chips/stories/ChipsStories.config.ts +1 -1
  47. package/src/components/Chips/styles/chipsShape.ts +2 -2
  48. package/src/components/Chips/styles/chipsSize.ts +2 -2
  49. package/src/components/Choice/Choice.interface.ts +6 -6
  50. package/src/components/Choice/index.ts +2 -2
  51. package/src/components/Choice/stories/ChoiceStories.config.tsx +3 -4
  52. package/src/components/Choice/styles/choiceSize.ts +2 -2
  53. package/src/components/Code/index.ts +4 -4
  54. package/src/components/Code/stories/CodeStories.config.ts +3 -4
  55. package/src/components/Code/styles/codeSize.ts +2 -2
  56. package/src/components/Code/styles/codeVariant.ts +2 -2
  57. package/src/components/ColorInput/ColorInput.interface.ts +2 -2
  58. package/src/components/ColorInput/index.ts +2 -2
  59. package/src/components/ColorInput/stories/ColorInputStories.config.tsx +3 -4
  60. package/src/components/ColorInput/styles/colorInputSize.ts +2 -2
  61. package/src/components/Divider/Divider.interface.ts +4 -4
  62. package/src/components/Divider/index.ts +4 -4
  63. package/src/components/Divider/styles/dividerDirection.ts +2 -2
  64. package/src/components/Divider/styles/dividerSize.ts +2 -2
  65. package/src/components/Dot/Dot.interface.ts +4 -4
  66. package/src/components/Dot/index.ts +3 -3
  67. package/src/components/Dot/styles/dotShape.ts +2 -2
  68. package/src/components/Dot/styles/dotSize.ts +2 -2
  69. package/src/components/Drawer/Drawer.interface.ts +2 -2
  70. package/src/components/Dropdown/Dropdown.interface.ts +6 -6
  71. package/src/components/Dropdown/index.ts +3 -3
  72. package/src/components/Dropdown/styles/dropdownItemSize.ts +2 -2
  73. package/src/components/Group/Group.interface.ts +8 -8
  74. package/src/components/Group/index.ts +8 -8
  75. package/src/components/Group/styles/groupAlign.ts +2 -2
  76. package/src/components/Group/styles/groupDirection.ts +2 -2
  77. package/src/components/Group/styles/groupJustify.ts +2 -2
  78. package/src/components/Group/styles/groupWrap.ts +2 -2
  79. package/src/components/Icon/Icon.interface.ts +10 -10
  80. package/src/components/Icon/index.ts +4 -4
  81. package/src/components/Icon/stories/IconStories.config.ts +1 -1
  82. package/src/components/Icon/styles/iconShape.ts +2 -2
  83. package/src/components/Icon/styles/iconSize.ts +5 -5
  84. package/src/components/Input/Input.interface.ts +4 -4
  85. package/src/components/Input/index.ts +4 -4
  86. package/src/components/Input/stories/InputStories.config.tsx +3 -4
  87. package/src/components/Input/styles/inputShape.ts +2 -2
  88. package/src/components/Input/styles/inputSize.ts +2 -2
  89. package/src/components/InputNumber/InputNumber.interface.ts +8 -8
  90. package/src/components/InputNumber/index.ts +4 -4
  91. package/src/components/InputNumber/styles/inputNumberShape.ts +2 -2
  92. package/src/components/InputNumber/styles/inputNumberSize.ts +2 -2
  93. package/src/components/InputPassword/InputPassword.interface.ts +6 -6
  94. package/src/components/InputPassword/index.ts +4 -4
  95. package/src/components/InputPassword/styles/inputPasswordShape.ts +2 -2
  96. package/src/components/InputPassword/styles/inputPasswordSize.ts +2 -2
  97. package/src/components/Label/Label.interface.ts +2 -2
  98. package/src/components/Label/index.ts +2 -2
  99. package/src/components/Label/stories/LabelStories.config.ts +1 -1
  100. package/src/components/Label/styles/labelShape.ts +2 -2
  101. package/src/components/List/List.interface.ts +2 -2
  102. package/src/components/List/index.ts +4 -4
  103. package/src/components/List/styles/listDirection.ts +2 -2
  104. package/src/components/List/styles/listSize.ts +2 -2
  105. package/src/components/Loader/Loader.interface.ts +4 -4
  106. package/src/components/Loader/index.ts +4 -4
  107. package/src/components/Loader/stories/LoaderStories.config.ts +3 -4
  108. package/src/components/Loader/styles/loaderShape.ts +2 -2
  109. package/src/components/Loader/styles/loaderSize.ts +2 -2
  110. package/src/components/Logo/Logo.interface.ts +4 -4
  111. package/src/components/Logo/index.ts +3 -3
  112. package/src/components/Logo/styles/logoAlign.ts +2 -2
  113. package/src/components/Logo/styles/logoSize.ts +2 -2
  114. package/src/components/MenuItem/MenuItem.interface.ts +4 -4
  115. package/src/components/MenuItem/index.ts +4 -4
  116. package/src/components/MenuItem/styles/menuItemShape.ts +2 -2
  117. package/src/components/MenuItem/styles/menuItemSize.ts +2 -2
  118. package/src/components/Modal/Modal.interface.ts +2 -2
  119. package/src/components/Pagination/Pagination.interface.ts +3 -3
  120. package/src/components/Pagination/index.ts +2 -2
  121. package/src/components/Pagination/styles/paginationSize.ts +2 -2
  122. package/src/components/Radio/Radio.interface.ts +2 -2
  123. package/src/components/Radio/index.ts +2 -2
  124. package/src/components/Radio/styles/radioSize.ts +2 -2
  125. package/src/components/Search/stories/SearchStories.config.ts +3 -4
  126. package/src/components/Search/styles/searchShape.ts +2 -2
  127. package/src/components/Search/styles/searchSize.ts +2 -2
  128. package/src/components/Segmented/Segmented.interface.ts +6 -6
  129. package/src/components/Segmented/index.ts +4 -4
  130. package/src/components/Segmented/styles/segmentedShape.ts +2 -2
  131. package/src/components/Segmented/styles/segmentedSize.ts +2 -2
  132. package/src/components/Select/Select.interface.ts +2 -2
  133. package/src/components/Select/index.ts +2 -2
  134. package/src/components/Select/stories/SelectStories.config.ts +1 -4
  135. package/src/components/Select/styles/selectSize.ts +2 -2
  136. package/src/components/Switch/Switch.interface.ts +4 -4
  137. package/src/components/Switch/index.ts +4 -4
  138. package/src/components/Switch/stories/SwitchStories.config.tsx +3 -4
  139. package/src/components/Switch/styles/switchAlign.ts +2 -2
  140. package/src/components/Switch/styles/switchSize.ts +2 -2
  141. package/src/components/Tab/Tab.interface.ts +2 -2
  142. package/src/components/Tab/index.ts +2 -2
  143. package/src/components/Tab/styles/tabSize.ts +2 -2
  144. package/src/components/Textarea/Textarea.interface.ts +4 -4
  145. package/src/components/Textarea/index.ts +4 -4
  146. package/src/components/Textarea/styles/textareaShape.ts +2 -2
  147. package/src/components/Textarea/styles/textareaSize.ts +2 -2
  148. package/src/components/Tile/Tile.interface.ts +4 -4
  149. package/src/components/Tile/index.ts +4 -4
  150. package/src/components/Tile/styles/tileShape.ts +2 -2
  151. package/src/components/Tile/styles/tileSize.ts +2 -2
  152. package/src/components/Warning/Warning.interface.ts +4 -4
  153. package/src/components/Warning/index.ts +4 -4
  154. package/src/components/Warning/styles/warningShape.ts +2 -2
  155. package/src/components/Warning/styles/warningSize.ts +2 -2
  156. package/src/index.tsx +118 -118
@@ -5,36 +5,6 @@ import { ONDEVICE_BACKGROUNDS } from '@itcase/storybook-config/config/preview'
5
5
 
6
6
  import { UIProviderApp } from '../../core/src/context/UIProviderApp/UIProviderApp'
7
7
 
8
- const atomsMoleculesStoriesOrder = [
9
- 'Overview',
10
- 'Playground',
11
- 'Demo',
12
- 'Gallery',
13
- 'Skeleton',
14
- 'Appearance',
15
- 'Float',
16
- 'Toast',
17
- 'Default',
18
- 'Muted',
19
- 'Label',
20
- 'Icon',
21
- 'Loading',
22
- '*',
23
- 'Accent',
24
- 'Special',
25
- 'Extra',
26
- 'Surface',
27
- 'Error',
28
- 'Success',
29
- 'Require',
30
- 'Warning',
31
- 'Danger',
32
- 'Info',
33
- 'Disabled',
34
- 'Size',
35
- 'Style',
36
- ]
37
-
38
8
  const preview: Preview = {
39
9
  parameters: {
40
10
  backgrounds: {
@@ -42,16 +12,82 @@ const preview: Preview = {
42
12
  },
43
13
  options: {
44
14
  storySort: {
15
+ includeNames: true,
45
16
  order: [
46
17
  'Overview',
47
18
  'Mixins',
48
19
  'Hooks',
20
+ ['*', ['Overview', 'Playground', '*']],
49
21
  'Layout',
22
+ ['*', ['Overview', 'Playground', '*']],
50
23
  'Typography',
24
+ ['*', ['Overview', 'Playground', '*']],
51
25
  'Atoms',
52
- ['*', atomsMoleculesStoriesOrder],
26
+ [
27
+ '*',
28
+ [
29
+ 'Overview',
30
+ 'Playground',
31
+ 'Demo',
32
+ 'Gallery',
33
+ 'Skeleton',
34
+ 'Appearance',
35
+ 'Float',
36
+ 'Toast',
37
+ 'Default',
38
+ 'Muted',
39
+ 'Label',
40
+ 'Icon',
41
+ 'Loading',
42
+ '*',
43
+ 'Accent',
44
+ 'Special',
45
+ 'Extra',
46
+ 'Surface',
47
+ 'Error',
48
+ 'Success',
49
+ 'Require',
50
+ 'Warning',
51
+ 'Danger',
52
+ 'Info',
53
+ 'Disabled',
54
+ 'Size',
55
+ 'Style',
56
+ ],
57
+ ],
53
58
  'Molecules',
54
- ['*', atomsMoleculesStoriesOrder],
59
+ [
60
+ '*',
61
+ [
62
+ 'Overview',
63
+ 'Playground',
64
+ 'Demo',
65
+ 'Gallery',
66
+ 'Skeleton',
67
+ 'Appearance',
68
+ 'Float',
69
+ 'Toast',
70
+ 'Default',
71
+ 'Muted',
72
+ 'Label',
73
+ 'Icon',
74
+ 'Loading',
75
+ '*',
76
+ 'Accent',
77
+ 'Special',
78
+ 'Extra',
79
+ 'Surface',
80
+ 'Error',
81
+ 'Success',
82
+ 'Require',
83
+ 'Warning',
84
+ 'Danger',
85
+ 'Info',
86
+ 'Disabled',
87
+ 'Size',
88
+ 'Style',
89
+ ],
90
+ ],
55
91
  'Components',
56
92
  [
57
93
  '*',
@@ -21,49 +21,71 @@ const config = {
21
21
  viteFinal: async (
22
22
  viteConfig: Parameters<NonNullable<StorybookConfig['viteFinal']>>[0],
23
23
  ) => {
24
- return mergeConfig(await storybookConfigViteFinal(viteConfig), {
25
- resolve: {
26
- alias: [
27
- {
28
- find: '@itcase/ui-core/context',
29
- replacement: resolve(coreSrcDir, 'context'),
30
- },
31
- {
32
- find: '@itcase/ui-core/hoc',
33
- replacement: resolve(coreSrcDir, 'hoc'),
34
- },
35
- {
36
- find: '@itcase/ui-core/hooks',
37
- replacement: resolve(coreSrcDir, 'hooks'),
38
- },
39
- {
40
- find: '@itcase/ui-core/types',
41
- replacement: resolve(coreSrcDir, 'types'),
42
- },
43
- {
44
- find: '@itcase/ui-core/storybook',
45
- replacement: resolve(coreSrcDir, 'storybook'),
46
- },
47
- {
48
- find: '@itcase/ui-core/utils',
49
- replacement: resolve(coreSrcDir, 'utils'),
50
- },
51
- {
52
- find: '@itcase/icons-default',
53
- replacement: iconsDefaultNativeEntry,
54
- },
55
- {
56
- find: 'react-native-linear-gradient',
57
- replacement: 'react-native-web-linear-gradient',
58
- },
59
- ],
60
- },
61
- })
24
+ const vitePolling =
25
+ process.env.CHOKIDAR_USEPOLLING === 'true'
26
+ ? {
27
+ server: {
28
+ watch: {
29
+ interval: 1000,
30
+ usePolling: true,
31
+ },
32
+ },
33
+ }
34
+ : {}
35
+
36
+ return mergeConfig(
37
+ await storybookConfigViteFinal(viteConfig),
38
+ mergeConfig(vitePolling, {
39
+ resolve: {
40
+ alias: [
41
+ {
42
+ find: '@itcase/ui-core/context',
43
+ replacement: resolve(coreSrcDir, 'context'),
44
+ },
45
+ {
46
+ find: '@itcase/ui-core/hoc',
47
+ replacement: resolve(coreSrcDir, 'hoc'),
48
+ },
49
+ {
50
+ find: '@itcase/ui-core/hooks',
51
+ replacement: resolve(coreSrcDir, 'hooks'),
52
+ },
53
+ {
54
+ find: '@itcase/ui-core/types',
55
+ replacement: resolve(coreSrcDir, 'types'),
56
+ },
57
+ {
58
+ find: '@itcase/ui-core/storybook',
59
+ replacement: resolve(coreSrcDir, 'storybook'),
60
+ },
61
+ {
62
+ find: '@itcase/ui-core/utils',
63
+ replacement: resolve(coreSrcDir, 'utils'),
64
+ },
65
+ {
66
+ find: '@itcase/icons-default',
67
+ replacement: iconsDefaultNativeEntry,
68
+ },
69
+ {
70
+ find: 'react-native-linear-gradient',
71
+ replacement: 'react-native-web-linear-gradient',
72
+ },
73
+ ],
74
+ },
75
+ }),
76
+ )
77
+ },
78
+ // Production MCP host reads storybook-static/manifests/components.json.
79
+ // Core defaults this flag to false, so `storybook build` otherwise skips manifests.
80
+ features: {
81
+ componentsManifest: true,
62
82
  },
63
83
  stories: ['../src/components/**/*.stories.?(ts|tsx|js|jsx)'],
64
84
  typescript: {
65
- ...mainConfigRest.typescript,
66
- reactDocgen: 'react-docgen-typescript' as const,
85
+ // `react-docgen-typescript` explodes token/device unions into multi‑MB
86
+ // props. `JSON.stringify` then throws `Invalid string length` and
87
+ // `storybook-static/manifests/components.json` is never written.
88
+ reactDocgen: 'react-docgen',
67
89
  },
68
90
  } as unknown as StorybookConfig
69
91
 
@@ -8,79 +8,87 @@ const preview: Preview = {
8
8
  backgrounds: { value: 'figma' },
9
9
  },
10
10
  parameters: {
11
+ layout: 'centered',
11
12
  backgrounds: {
12
13
  options: { ...BACKGROUNDS },
13
14
  },
14
- layout: 'centered',
15
15
  options: {
16
16
  storySort: {
17
+ includeNames: true,
17
18
  order: [
18
19
  'Overview',
19
20
  'Mixins',
20
21
  'Hooks',
22
+ ['*', ['Overview', 'Playground', '*']],
21
23
  'Layout',
24
+ ['*', ['Overview', 'Playground', '*']],
22
25
  'Typography',
26
+ ['*', ['Overview', 'Playground', '*']],
23
27
  'Atoms',
24
28
  [
25
29
  '*',
26
- 'Overview',
27
- 'Playground',
28
- 'Demo',
29
- 'Gallery',
30
- 'Skeleton',
31
- 'Appearance',
32
- 'Float',
33
- 'Toast',
34
- 'Default',
35
- 'Muted',
36
- 'Label',
37
- 'Icon',
38
- 'Loading',
39
- '*',
40
- 'Accent',
41
- 'Special',
42
- 'Extra',
43
- 'Surface',
44
- 'Error',
45
- 'Success',
46
- 'Require',
47
- 'Warning',
48
- 'Danger',
49
- 'Info',
50
- 'Disabled',
51
- 'Size',
52
- 'Style',
30
+ [
31
+ 'Overview',
32
+ 'Playground',
33
+ 'Demo',
34
+ 'Gallery',
35
+ 'Skeleton',
36
+ 'Appearance',
37
+ 'Float',
38
+ 'Toast',
39
+ 'Default',
40
+ 'Muted',
41
+ 'Label',
42
+ 'Icon',
43
+ 'Loading',
44
+ '*',
45
+ 'Accent',
46
+ 'Special',
47
+ 'Extra',
48
+ 'Surface',
49
+ 'Error',
50
+ 'Success',
51
+ 'Require',
52
+ 'Warning',
53
+ 'Danger',
54
+ 'Info',
55
+ 'Disabled',
56
+ 'Size',
57
+ 'Style',
58
+ ],
53
59
  ],
54
60
  'Molecules',
55
61
  [
56
62
  '*',
57
- 'Overview',
58
- 'Playground',
59
- 'Demo',
60
- 'Gallery',
61
- 'Skeleton',
62
- 'Appearance',
63
- 'Float',
64
- 'Toast',
65
- 'Default',
66
- 'Muted',
67
- 'Label',
68
- 'Icon',
69
- 'Loading',
70
- '*',
71
- 'Accent',
72
- 'Special',
73
- 'Extra',
74
- 'Surface',
75
- 'Error',
76
- 'Success',
77
- 'Require',
78
- 'Warning',
79
- 'Danger',
80
- 'Info',
81
- 'Disabled',
82
- 'Size',
83
- 'Style',
63
+ [
64
+ 'Overview',
65
+ 'Playground',
66
+ 'Demo',
67
+ 'Gallery',
68
+ 'Skeleton',
69
+ 'Appearance',
70
+ 'Float',
71
+ 'Toast',
72
+ 'Default',
73
+ 'Muted',
74
+ 'Label',
75
+ 'Icon',
76
+ 'Loading',
77
+ '*',
78
+ 'Accent',
79
+ 'Special',
80
+ 'Extra',
81
+ 'Surface',
82
+ 'Error',
83
+ 'Success',
84
+ 'Require',
85
+ 'Warning',
86
+ 'Danger',
87
+ 'Info',
88
+ 'Disabled',
89
+ 'Size',
90
+ 'Style',
91
+ ],
84
92
  ],
85
93
  'Components',
86
94
  [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui-react-native",
3
- "version": "1.10.89",
3
+ "version": "1.10.94",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "src/index.tsx",
@@ -23,8 +23,8 @@
23
23
  "dependencies": {
24
24
  "@itcase/icons-default": "^1.2.39",
25
25
  "@itcase/tokens-am": "^1.1.60",
26
- "@itcase/types-ui": "^1.1.98",
27
- "@itcase/ui-core": "^1.10.86",
26
+ "@itcase/types-ui": "^1.1.100",
27
+ "@itcase/ui-core": "^1.10.94",
28
28
  "@react-native-community/slider": "^5.2.1",
29
29
  "react-native-linear-gradient": "2.8.3",
30
30
  "react-native-otp-entry": "^1.8.6",
@@ -37,28 +37,28 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@itcase/storybook-config": "^1.3.13",
40
- "@react-native/assets-registry": "0.87.0",
41
- "@react-native/typescript-config": "0.87.0",
42
- "@storybook/addon-ondevice-actions": "^10.5.4",
43
- "@storybook/addon-ondevice-backgrounds": "^10.5.4",
44
- "@storybook/addon-ondevice-controls": "^10.5.4",
45
- "@storybook/react": "^10.5.10",
46
- "@storybook/react-native": "^10.5.4",
47
- "@storybook/react-native-ui-lite": "^10.5.4",
48
- "@storybook/react-native-web-vite": "^10.5.10",
49
- "@storybook/react-vite": "^10.5.10",
40
+ "@react-native/assets-registry": "0.87.1",
41
+ "@react-native/typescript-config": "0.87.1",
42
+ "@storybook/addon-ondevice-actions": "^10.6.0",
43
+ "@storybook/addon-ondevice-backgrounds": "^10.6.0",
44
+ "@storybook/addon-ondevice-controls": "^10.6.0",
45
+ "@storybook/react": "^10.6.0",
46
+ "@storybook/react-native": "^10.6.0",
47
+ "@storybook/react-native-ui-lite": "^10.6.0",
48
+ "@storybook/react-native-web-vite": "^10.6.0",
49
+ "@storybook/react-vite": "^10.6.0",
50
50
  "@types/react": "^18.3.12",
51
51
  "@typescript/native": "npm:typescript@^7.0.2",
52
52
  "react": "19.2.3",
53
53
  "react-dom": "19.2.3",
54
- "react-native": "0.87.0",
54
+ "react-native": "0.87.1",
55
55
  "react-native-reanimated": "^4.6.0",
56
56
  "react-native-svg-transformer": "^1.5.3",
57
57
  "react-native-web": "^0.21.2",
58
58
  "react-native-web-linear-gradient": "^1.1.2",
59
- "storybook": "^10.5.10",
59
+ "storybook": "^10.6.0",
60
60
  "typescript": "npm:@typescript/typescript6@^6.0.2",
61
61
  "vite": "^8.2.2"
62
62
  },
63
- "gitHead": "cff2c2ec07bc3c212d6bdddabc1d547e3aef2244"
63
+ "gitHead": "b5b9443df364936d7538670dd9d13b3de05bde91"
64
64
  }
@@ -29,8 +29,8 @@ import type {
29
29
  import type { ComponentGalleryArgs } from '../../storybook'
30
30
  import type { BadgeProps } from '../Badge/Badge.interface'
31
31
  import type { IconProps, SvgIconComponent } from '../Icon/Icon.interface'
32
- import type { avatarShapePropsType } from './styles/avatarShape'
33
- import type { avatarSizesPropsType } from './styles/avatarSize'
32
+ import type { AvatarShapePropsType } from './styles/avatarShape'
33
+ import type { AvatarSizesPropsType } from './styles/avatarSize'
34
34
 
35
35
  interface AvatarAppearanceProps {
36
36
  badge?: boolean
@@ -52,7 +52,7 @@ interface AvatarAppearanceProps {
52
52
  iconSize?: IconProps['iconSize']
53
53
  iconSrc?: string
54
54
  shape?: ShapeProps
55
- size?: avatarSizesPropsType | SizePXProps
55
+ size?: AvatarSizesPropsType | SizePXProps
56
56
  textColor?: TextColorProps
57
57
  textSize?: TextSizeProps
58
58
  textWeight?: TextWeightProps
@@ -90,7 +90,7 @@ interface AvatarProps extends AvatarAppearanceProps {
90
90
  firstName?: string
91
91
  imageSrc?: ImageSourcePropType
92
92
  secondName?: string
93
- shape?: avatarShapePropsType
93
+ shape?: AvatarShapePropsType
94
94
  style?: StyleProp<ViewStyle>
95
95
  }
96
96
 
@@ -125,6 +125,6 @@ export type {
125
125
  AvatarConfig,
126
126
  AvatarGalleryStory,
127
127
  AvatarProps,
128
- avatarShapePropsType,
128
+ AvatarShapePropsType,
129
129
  AvatarStoryArgs,
130
130
  }
@@ -11,9 +11,9 @@ import type {
11
11
  AvatarProps,
12
12
  } from './Avatar.interface'
13
13
  import { avatarShapeList } from './styles/avatarShape'
14
- import type { avatarShapePropsType } from './styles/avatarShape'
14
+ import type { AvatarShapePropsType } from './styles/avatarShape'
15
15
  import { avatarSizesList } from './styles/avatarSize'
16
- import type { avatarSizesPropsType } from './styles/avatarSize'
16
+ import type { AvatarSizesPropsType } from './styles/avatarSize'
17
17
 
18
18
  export {
19
19
  Avatar,
@@ -31,6 +31,6 @@ export type {
31
31
  AvatarAppearanceStyle,
32
32
  AvatarConfig,
33
33
  AvatarProps,
34
- avatarShapePropsType,
35
- avatarSizesPropsType,
34
+ AvatarShapePropsType,
35
+ AvatarSizesPropsType,
36
36
  }
@@ -8,10 +8,7 @@ import type { AvatarAppearanceKey, AvatarProps } from '../Avatar.interface'
8
8
 
9
9
  type AvatarSizeKey = keyof typeof avatarAppearanceSize
10
10
 
11
- const isAvatarSizeKey = (value: string): value is AvatarSizeKey =>
12
- value in avatarAppearanceSize
13
-
14
- const avatarSizeKeys = Object.keys(avatarAppearanceSize).filter(isAvatarSizeKey)
11
+ const avatarSizeKeys = Object.keys(avatarAppearanceSize) as AvatarSizeKey[]
15
12
 
16
13
  const avatarTypeOptions = [
17
14
  'letters',
@@ -28,7 +28,7 @@ const avatarShapeStyles = StyleSheet.create({
28
28
 
29
29
  const avatarShapeList = getVariantsPropsList(avatarShapeStyles, 'avatar_shape_')
30
30
 
31
- type avatarShapePropsType = (typeof avatarShapeList)[number]
31
+ type AvatarShapePropsType = (typeof avatarShapeList)[number]
32
32
 
33
33
  export { avatarShapeList, avatarShapeStyles }
34
- export type { avatarShapePropsType }
34
+ export type { AvatarShapePropsType }
@@ -16,7 +16,7 @@ const avatarSizeStyles = StyleSheet.create({
16
16
  ),
17
17
  })
18
18
 
19
- type avatarSizesPropsType = (typeof avatarSizesList)[number]
19
+ type AvatarSizesPropsType = (typeof avatarSizesList)[number]
20
20
 
21
21
  export { avatarSizesList, avatarSizeStyles }
22
- export type { avatarSizesPropsType }
22
+ export type { AvatarSizesPropsType }
@@ -4,8 +4,8 @@ import type { CompositeAppearanceWithoutSizeKeys } from '@itcase/types-ui'
4
4
 
5
5
  import type { ComponentGalleryArgs } from '../../storybook'
6
6
  import type { AvatarProps } from '../Avatar/Avatar.interface'
7
- import type { avatarSizesPropsType } from '../Avatar/styles/avatarSize'
8
- import type { avatarStackDirectionPropsType } from './styles/avatarStackDirection'
7
+ import type { AvatarSizesPropsType } from '../Avatar/styles/avatarSize'
8
+ import type { AvatarStackDirectionPropsType } from './styles/avatarStackDirection'
9
9
 
10
10
  interface AvatarsItem {
11
11
  id: string
@@ -21,9 +21,9 @@ interface AvatarStackProps {
21
21
  avatarAppearance?: CompositeAppearanceWithoutSizeKeys
22
22
  avatarsList: AvatarsItem[]
23
23
  dataTestId?: string
24
- direction?: avatarStackDirectionPropsType
24
+ direction?: AvatarStackDirectionPropsType
25
25
  length?: number
26
- size?: avatarSizesPropsType
26
+ size?: AvatarSizesPropsType
27
27
  style?: StyleProp<ViewStyle>
28
28
  }
29
29
 
@@ -6,12 +6,12 @@ import type {
6
6
  AvatarStackStoryArgs,
7
7
  } from './AvatarStack.interface'
8
8
  import { avatarStackDirectionList } from './styles/avatarStackDirection'
9
- import type { avatarStackDirectionPropsType } from './styles/avatarStackDirection'
9
+ import type { AvatarStackDirectionPropsType } from './styles/avatarStackDirection'
10
10
 
11
11
  export { AvatarStack, avatarStackDirectionList }
12
12
  export type {
13
13
  AvatarsItem,
14
- avatarStackDirectionPropsType,
14
+ AvatarStackDirectionPropsType,
15
15
  AvatarStackGalleryStory,
16
16
  AvatarStackProps,
17
17
  AvatarStackStoryArgs,
@@ -1,7 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react'
2
2
 
3
3
  import { createAppearanceOptions } from '../../../storybook'
4
- import { avatarAppearanceShape } from '../../Avatar/appearance/avatarShape'
5
4
  import { avatarAppearanceStyle } from '../../Avatar/appearance/avatarStyle'
6
5
  import { avatarAppearance } from '../../Avatar/Avatar.appearance'
7
6
  import { AvatarStack } from '../AvatarStack'
@@ -12,11 +11,11 @@ import type {
12
11
  import { avatarsListMock } from './__mock__'
13
12
  import {
14
13
  avatarStackAppearanceSize,
14
+ avatarStackShapeOptions,
15
15
  avatarStackStoryParameters,
16
16
  } from './AvatarStackStories.config'
17
17
 
18
18
  const { getAppearanceOptions } = createAppearanceOptions(avatarAppearance, {
19
- appearanceShape: avatarAppearanceShape,
20
19
  appearanceSize: avatarStackAppearanceSize,
21
20
  appearanceStyle: avatarAppearanceStyle,
22
21
  })
@@ -49,7 +48,7 @@ const meta = {
49
48
  argTypes: {
50
49
  appearanceShape: {
51
50
  control: 'radio',
52
- options: getAppearanceOptions('appearanceShape'),
51
+ options: [...avatarStackShapeOptions],
53
52
  },
54
53
  appearanceSize: {
55
54
  control: 'radio',
@@ -1,5 +1,6 @@
1
+ import type { ShapeProps } from '@itcase/types-ui'
2
+
1
3
  import { createComponentGallery } from '../../../storybook'
2
- import { avatarAppearanceShape } from '../../Avatar/appearance/avatarShape'
3
4
  import { avatarAppearanceSize } from '../../Avatar/appearance/avatarSize'
4
5
  import { avatarAppearanceStyle } from '../../Avatar/appearance/avatarStyle'
5
6
  import { avatarAppearanceSurface } from '../../Avatar/appearance/avatarSurface'
@@ -18,12 +19,23 @@ const avatarStackAppearanceSize = {
18
19
 
19
20
  type AvatarStackSizeKey = keyof typeof avatarStackAppearanceSize
20
21
 
21
- const isAvatarStackSizeKey = (value: string): value is AvatarStackSizeKey =>
22
- value in avatarStackAppearanceSize
22
+ const avatarStackSizeKeys = Object.keys(
23
+ avatarStackAppearanceSize,
24
+ ) as AvatarStackSizeKey[]
25
+
26
+ const avatarStackShapeOptions = [
27
+ 'geometric',
28
+ 'circular',
29
+ 'rounded',
30
+ 'roundedXL',
31
+ 'roundedL',
32
+ 'roundedM',
33
+ 'roundedS',
34
+ ] as const satisfies readonly ShapeProps[]
23
35
 
24
- const avatarStackSizeKeys = Object.keys(avatarStackAppearanceSize).filter(
25
- isAvatarStackSizeKey,
26
- )
36
+ const avatarStackAppearanceShape = Object.fromEntries(
37
+ avatarStackShapeOptions.map((shape) => [shape, { shape }]),
38
+ ) as Record<ShapeProps, { shape: ShapeProps }>
27
39
 
28
40
  const avatarStackTypeOptions = ['overflow', 'all'] as const
29
41
 
@@ -46,7 +58,7 @@ const avatarStackGallery = createComponentGallery<AvatarAppearanceKey>({
46
58
  appearanceGroups: {
47
59
  surface: avatarAppearanceSurface,
48
60
  },
49
- shape: avatarAppearanceShape,
61
+ shape: avatarStackAppearanceShape,
50
62
  style: avatarAppearanceStyle,
51
63
  })
52
64
 
@@ -65,6 +77,7 @@ export {
65
77
  AVATAR_STACK_FIGMA_URL,
66
78
  avatarStackAppearanceSize,
67
79
  avatarStackGallery,
80
+ avatarStackShapeOptions,
68
81
  avatarStackSizeKeys,
69
82
  avatarStackStoryParameters,
70
83
  avatarStackTypeOptions,
@@ -16,7 +16,7 @@ const avatarStackDirectionList = getVariantsPropsList(
16
16
  'avatarStack_direction_',
17
17
  )
18
18
 
19
- type avatarStackDirectionPropsType = (typeof avatarStackDirectionList)[number]
19
+ type AvatarStackDirectionPropsType = (typeof avatarStackDirectionList)[number]
20
20
 
21
21
  export { avatarStackDirectionList, avatarStackDirectionStyles }
22
- export type { avatarStackDirectionPropsType }
22
+ export type { AvatarStackDirectionPropsType }