@itcase/ui-react-native 1.10.91 → 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.
- package/.storybook-react-native/preview.tsx +68 -32
- package/.storybook-react-native-web/main.ts +9 -2
- package/.storybook-react-native-web/preview.tsx +63 -55
- package/package.json +16 -16
- package/src/components/Avatar/Avatar.interface.ts +5 -5
- package/src/components/Avatar/index.ts +4 -4
- package/src/components/Avatar/stories/AvatarStories.config.ts +1 -4
- package/src/components/Avatar/styles/avatarShape.ts +2 -2
- package/src/components/Avatar/styles/avatarSize.ts +2 -2
- package/src/components/AvatarStack/AvatarStack.interface.ts +4 -4
- package/src/components/AvatarStack/index.ts +2 -2
- package/src/components/AvatarStack/stories/AvatarStackDemo.stories.tsx +2 -3
- package/src/components/AvatarStack/stories/AvatarStackStories.config.ts +20 -7
- package/src/components/AvatarStack/styles/avatarStackDirection.ts +2 -2
- package/src/components/Badge/Badge.interface.ts +6 -6
- package/src/components/Badge/index.ts +6 -6
- package/src/components/Badge/stories/BadgeStories.config.ts +1 -1
- package/src/components/Badge/styles/badgeShape.ts +2 -2
- package/src/components/Badge/styles/badgeSize.ts +2 -2
- package/src/components/Badge/styles/badgeType.ts +2 -2
- package/src/components/Breadcrumbs/Breadcrumbs.interface.ts +2 -2
- package/src/components/Breadcrumbs/index.ts +2 -2
- package/src/components/Breadcrumbs/styles/breadcrumbsSize.ts +2 -2
- package/src/components/Button/Button.interface.ts +5 -5
- package/src/components/Button/index.ts +4 -4
- package/src/components/Button/stories/ButtonStories.config.ts +4 -4
- package/src/components/Button/styles/buttonShape.ts +2 -2
- package/src/components/Button/styles/buttonSize.ts +2 -2
- package/src/components/Button/styles/buttonText.ts +2 -2
- package/src/components/Cell/Cell.interface.ts +6 -6
- package/src/components/Cell/index.ts +6 -6
- package/src/components/Cell/styles/cellDirection.ts +2 -2
- package/src/components/Cell/styles/cellShape.ts +2 -2
- package/src/components/Cell/styles/cellSize.ts +2 -2
- package/src/components/Checkbox/Checkbox.interface.ts +8 -8
- package/src/components/Checkbox/index.ts +4 -4
- package/src/components/Checkbox/styles/checkboxAlign.ts +2 -2
- package/src/components/Checkbox/styles/checkboxShape.ts +2 -2
- package/src/components/Checkbox/styles/checkboxSize.ts +2 -2
- package/src/components/Checkmark/Checkmark.interface.ts +4 -4
- package/src/components/Checkmark/index.ts +2 -2
- package/src/components/Checkmark/stories/CheckmarkStories.config.ts +3 -4
- package/src/components/Checkmark/styles/checkmarkSize.ts +2 -2
- package/src/components/Chips/Chips.interface.ts +4 -4
- package/src/components/Chips/index.ts +4 -4
- package/src/components/Chips/stories/ChipsStories.config.ts +1 -1
- package/src/components/Chips/styles/chipsShape.ts +2 -2
- package/src/components/Chips/styles/chipsSize.ts +2 -2
- package/src/components/Choice/Choice.interface.ts +6 -6
- package/src/components/Choice/index.ts +2 -2
- package/src/components/Choice/stories/ChoiceStories.config.tsx +3 -4
- package/src/components/Choice/styles/choiceSize.ts +2 -2
- package/src/components/Code/index.ts +4 -4
- package/src/components/Code/stories/CodeStories.config.ts +3 -4
- package/src/components/Code/styles/codeSize.ts +2 -2
- package/src/components/Code/styles/codeVariant.ts +2 -2
- package/src/components/ColorInput/ColorInput.interface.ts +2 -2
- package/src/components/ColorInput/index.ts +2 -2
- package/src/components/ColorInput/stories/ColorInputStories.config.tsx +3 -4
- package/src/components/ColorInput/styles/colorInputSize.ts +2 -2
- package/src/components/Divider/Divider.interface.ts +4 -4
- package/src/components/Divider/index.ts +4 -4
- package/src/components/Divider/styles/dividerDirection.ts +2 -2
- package/src/components/Divider/styles/dividerSize.ts +2 -2
- package/src/components/Dot/Dot.interface.ts +4 -4
- package/src/components/Dot/index.ts +3 -3
- package/src/components/Dot/styles/dotShape.ts +2 -2
- package/src/components/Dot/styles/dotSize.ts +2 -2
- package/src/components/Drawer/Drawer.interface.ts +2 -2
- package/src/components/Dropdown/Dropdown.interface.ts +6 -6
- package/src/components/Dropdown/index.ts +3 -3
- package/src/components/Dropdown/styles/dropdownItemSize.ts +2 -2
- package/src/components/Group/Group.interface.ts +8 -8
- package/src/components/Group/index.ts +8 -8
- package/src/components/Group/styles/groupAlign.ts +2 -2
- package/src/components/Group/styles/groupDirection.ts +2 -2
- package/src/components/Group/styles/groupJustify.ts +2 -2
- package/src/components/Group/styles/groupWrap.ts +2 -2
- package/src/components/Icon/Icon.interface.ts +10 -10
- package/src/components/Icon/index.ts +4 -4
- package/src/components/Icon/stories/IconStories.config.ts +1 -1
- package/src/components/Icon/styles/iconShape.ts +2 -2
- package/src/components/Icon/styles/iconSize.ts +5 -5
- package/src/components/Input/Input.interface.ts +4 -4
- package/src/components/Input/index.ts +4 -4
- package/src/components/Input/stories/InputStories.config.tsx +3 -4
- package/src/components/Input/styles/inputShape.ts +2 -2
- package/src/components/Input/styles/inputSize.ts +2 -2
- package/src/components/InputNumber/InputNumber.interface.ts +8 -8
- package/src/components/InputNumber/index.ts +4 -4
- package/src/components/InputNumber/styles/inputNumberShape.ts +2 -2
- package/src/components/InputNumber/styles/inputNumberSize.ts +2 -2
- package/src/components/InputPassword/InputPassword.interface.ts +6 -6
- package/src/components/InputPassword/index.ts +4 -4
- package/src/components/InputPassword/styles/inputPasswordShape.ts +2 -2
- package/src/components/InputPassword/styles/inputPasswordSize.ts +2 -2
- package/src/components/Label/Label.interface.ts +2 -2
- package/src/components/Label/index.ts +2 -2
- package/src/components/Label/stories/LabelStories.config.ts +1 -1
- package/src/components/Label/styles/labelShape.ts +2 -2
- package/src/components/List/List.interface.ts +2 -2
- package/src/components/List/index.ts +4 -4
- package/src/components/List/styles/listDirection.ts +2 -2
- package/src/components/List/styles/listSize.ts +2 -2
- package/src/components/Loader/Loader.interface.ts +4 -4
- package/src/components/Loader/index.ts +4 -4
- package/src/components/Loader/stories/LoaderStories.config.ts +3 -4
- package/src/components/Loader/styles/loaderShape.ts +2 -2
- package/src/components/Loader/styles/loaderSize.ts +2 -2
- package/src/components/Logo/Logo.interface.ts +4 -4
- package/src/components/Logo/index.ts +3 -3
- package/src/components/Logo/styles/logoAlign.ts +2 -2
- package/src/components/Logo/styles/logoSize.ts +2 -2
- package/src/components/MenuItem/MenuItem.interface.ts +4 -4
- package/src/components/MenuItem/index.ts +4 -4
- package/src/components/MenuItem/styles/menuItemShape.ts +2 -2
- package/src/components/MenuItem/styles/menuItemSize.ts +2 -2
- package/src/components/Modal/Modal.interface.ts +2 -2
- package/src/components/Pagination/Pagination.interface.ts +3 -3
- package/src/components/Pagination/index.ts +2 -2
- package/src/components/Pagination/styles/paginationSize.ts +2 -2
- package/src/components/Radio/Radio.interface.ts +2 -2
- package/src/components/Radio/index.ts +2 -2
- package/src/components/Radio/styles/radioSize.ts +2 -2
- package/src/components/Search/stories/SearchStories.config.ts +3 -4
- package/src/components/Search/styles/searchShape.ts +2 -2
- package/src/components/Search/styles/searchSize.ts +2 -2
- package/src/components/Segmented/Segmented.interface.ts +6 -6
- package/src/components/Segmented/index.ts +4 -4
- package/src/components/Segmented/styles/segmentedShape.ts +2 -2
- package/src/components/Segmented/styles/segmentedSize.ts +2 -2
- package/src/components/Select/Select.interface.ts +2 -2
- package/src/components/Select/index.ts +2 -2
- package/src/components/Select/stories/SelectStories.config.ts +1 -4
- package/src/components/Select/styles/selectSize.ts +2 -2
- package/src/components/Switch/Switch.interface.ts +4 -4
- package/src/components/Switch/index.ts +4 -4
- package/src/components/Switch/stories/SwitchStories.config.tsx +3 -4
- package/src/components/Switch/styles/switchAlign.ts +2 -2
- package/src/components/Switch/styles/switchSize.ts +2 -2
- package/src/components/Tab/Tab.interface.ts +2 -2
- package/src/components/Tab/index.ts +2 -2
- package/src/components/Tab/styles/tabSize.ts +2 -2
- package/src/components/Textarea/Textarea.interface.ts +4 -4
- package/src/components/Textarea/index.ts +4 -4
- package/src/components/Textarea/styles/textareaShape.ts +2 -2
- package/src/components/Textarea/styles/textareaSize.ts +2 -2
- package/src/components/Tile/Tile.interface.ts +4 -4
- package/src/components/Tile/index.ts +4 -4
- package/src/components/Tile/styles/tileShape.ts +2 -2
- package/src/components/Tile/styles/tileSize.ts +2 -2
- package/src/components/Warning/Warning.interface.ts +4 -4
- package/src/components/Warning/index.ts +4 -4
- package/src/components/Warning/styles/warningShape.ts +2 -2
- package/src/components/Warning/styles/warningSize.ts +2 -2
- 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
|
-
[
|
|
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
|
-
[
|
|
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
|
'*',
|
|
@@ -75,10 +75,17 @@ const config = {
|
|
|
75
75
|
}),
|
|
76
76
|
)
|
|
77
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,
|
|
82
|
+
},
|
|
78
83
|
stories: ['../src/components/**/*.stories.?(ts|tsx|js|jsx)'],
|
|
79
84
|
typescript: {
|
|
80
|
-
|
|
81
|
-
|
|
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',
|
|
82
89
|
},
|
|
83
90
|
} as unknown as StorybookConfig
|
|
84
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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.
|
|
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.
|
|
27
|
-
"@itcase/ui-core": "^1.10.
|
|
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.
|
|
41
|
-
"@react-native/typescript-config": "0.87.
|
|
42
|
-
"@storybook/addon-ondevice-actions": "^10.
|
|
43
|
-
"@storybook/addon-ondevice-backgrounds": "^10.
|
|
44
|
-
"@storybook/addon-ondevice-controls": "^10.
|
|
45
|
-
"@storybook/react": "^10.
|
|
46
|
-
"@storybook/react-native": "^10.
|
|
47
|
-
"@storybook/react-native-ui-lite": "^10.
|
|
48
|
-
"@storybook/react-native-web-vite": "^10.
|
|
49
|
-
"@storybook/react-vite": "^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.
|
|
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.
|
|
59
|
+
"storybook": "^10.6.0",
|
|
60
60
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
61
61
|
"vite": "^8.2.2"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
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 {
|
|
33
|
-
import type {
|
|
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?:
|
|
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?:
|
|
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
|
-
|
|
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 {
|
|
14
|
+
import type { AvatarShapePropsType } from './styles/avatarShape'
|
|
15
15
|
import { avatarSizesList } from './styles/avatarSize'
|
|
16
|
-
import type {
|
|
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
|
-
|
|
35
|
-
|
|
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
|
|
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
|
|
31
|
+
type AvatarShapePropsType = (typeof avatarShapeList)[number]
|
|
32
32
|
|
|
33
33
|
export { avatarShapeList, avatarShapeStyles }
|
|
34
|
-
export type {
|
|
34
|
+
export type { AvatarShapePropsType }
|
|
@@ -16,7 +16,7 @@ const avatarSizeStyles = StyleSheet.create({
|
|
|
16
16
|
),
|
|
17
17
|
})
|
|
18
18
|
|
|
19
|
-
type
|
|
19
|
+
type AvatarSizesPropsType = (typeof avatarSizesList)[number]
|
|
20
20
|
|
|
21
21
|
export { avatarSizesList, avatarSizeStyles }
|
|
22
|
-
export type {
|
|
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 {
|
|
8
|
-
import type {
|
|
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?:
|
|
24
|
+
direction?: AvatarStackDirectionPropsType
|
|
25
25
|
length?: number
|
|
26
|
-
size?:
|
|
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 {
|
|
9
|
+
import type { AvatarStackDirectionPropsType } from './styles/avatarStackDirection'
|
|
10
10
|
|
|
11
11
|
export { AvatarStack, avatarStackDirectionList }
|
|
12
12
|
export type {
|
|
13
13
|
AvatarsItem,
|
|
14
|
-
|
|
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:
|
|
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
|
|
22
|
-
|
|
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
|
|
25
|
-
|
|
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:
|
|
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
|
|
19
|
+
type AvatarStackDirectionPropsType = (typeof avatarStackDirectionList)[number]
|
|
20
20
|
|
|
21
21
|
export { avatarStackDirectionList, avatarStackDirectionStyles }
|
|
22
|
-
export type {
|
|
22
|
+
export type { AvatarStackDirectionPropsType }
|
|
@@ -19,9 +19,9 @@ import type {
|
|
|
19
19
|
|
|
20
20
|
import type { ComponentGalleryArgs } from '../../storybook'
|
|
21
21
|
import type { IconProps, SvgIconComponent } from '../Icon/Icon.interface'
|
|
22
|
-
import type {
|
|
23
|
-
import type {
|
|
24
|
-
import type {
|
|
22
|
+
import type { BadgeShapePropsType } from './styles/badgeShape'
|
|
23
|
+
import type { BadgeSizePropsType } from './styles/badgeSize'
|
|
24
|
+
import type { BadgeTypePropsType } from './styles/badgeType'
|
|
25
25
|
|
|
26
26
|
type BadgeIconProp = false | SvgIconComponent
|
|
27
27
|
|
|
@@ -37,7 +37,7 @@ interface BadgeAppearanceProps {
|
|
|
37
37
|
iconShape?: IconProps['shape']
|
|
38
38
|
iconSize?: IconProps['iconSize']
|
|
39
39
|
shape?: ShapeProps
|
|
40
|
-
size?:
|
|
40
|
+
size?: BadgeSizePropsType
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
type BadgeConfig = AppearanceConfig<AppearanceKeysDefault, BadgeAppearanceProps>
|
|
@@ -59,10 +59,10 @@ interface BadgeProps extends BadgeAppearanceProps {
|
|
|
59
59
|
appearance?: CompositeAppearanceKeys
|
|
60
60
|
dot?: boolean
|
|
61
61
|
icon?: BadgeIconProp
|
|
62
|
-
shape?:
|
|
62
|
+
shape?: BadgeShapePropsType
|
|
63
63
|
style?: StyleProp<TextStyle>
|
|
64
64
|
text?: number | string
|
|
65
|
-
type?:
|
|
65
|
+
type?: BadgeTypePropsType
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
type BadgeAppearanceKey = NonNullable<BadgeProps['appearance']>
|
|
@@ -9,11 +9,11 @@ import type {
|
|
|
9
9
|
BadgeProps,
|
|
10
10
|
} from './Badge.interface'
|
|
11
11
|
import { badgeShapeList } from './styles/badgeShape'
|
|
12
|
-
import type {
|
|
12
|
+
import type { BadgeShapePropsType } from './styles/badgeShape'
|
|
13
13
|
import { badgeSizeList } from './styles/badgeSize'
|
|
14
|
-
import type {
|
|
14
|
+
import type { BadgeSizePropsType } from './styles/badgeSize'
|
|
15
15
|
import { badgeTypeList } from './styles/badgeType'
|
|
16
|
-
import type {
|
|
16
|
+
import type { BadgeTypePropsType } from './styles/badgeType'
|
|
17
17
|
|
|
18
18
|
export {
|
|
19
19
|
Badge,
|
|
@@ -30,7 +30,7 @@ export type {
|
|
|
30
30
|
BadgeAppearanceSize,
|
|
31
31
|
BadgeConfig,
|
|
32
32
|
BadgeProps,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
BadgeShapePropsType,
|
|
34
|
+
BadgeSizePropsType,
|
|
35
|
+
BadgeTypePropsType,
|
|
36
36
|
}
|
|
@@ -64,7 +64,7 @@ type BadgeSizeKey = keyof typeof badgeIconsBySizeKey
|
|
|
64
64
|
const isBadgeSizeKey = (value: string): value is BadgeSizeKey =>
|
|
65
65
|
value in badgeIconsBySizeKey
|
|
66
66
|
|
|
67
|
-
const badgeSizeKeys = Object.keys(badgeIconsBySizeKey)
|
|
67
|
+
const badgeSizeKeys = Object.keys(badgeIconsBySizeKey) as BadgeSizeKey[]
|
|
68
68
|
|
|
69
69
|
const getBadgeTypeIcon = (appearanceSize: string = 'sizeM') =>
|
|
70
70
|
isBadgeSizeKey(appearanceSize)
|
|
@@ -29,7 +29,7 @@ const badgeShapeStyles = StyleSheet.create({
|
|
|
29
29
|
|
|
30
30
|
const badgeShapeList = getVariantsPropsList(badgeShapeStyles, 'badge_shape_')
|
|
31
31
|
|
|
32
|
-
type
|
|
32
|
+
type BadgeShapePropsType = (typeof badgeShapeList)[number]
|
|
33
33
|
|
|
34
34
|
export { badgeShapeList, badgeShapeStyles }
|
|
35
|
-
export type {
|
|
35
|
+
export type { BadgeShapePropsType }
|