@salutejs/plasma-new-hope 0.239.0-canary.1696.12711678920.0 → 0.239.0-canary.1699.12742131493.0
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/cjs/components/Avatar/Avatar.js +3 -39
- package/cjs/components/Avatar/Avatar.js.map +1 -1
- package/cjs/components/Avatar/Avatar.styles.js +1 -32
- package/cjs/components/Avatar/Avatar.styles.js.map +1 -1
- package/cjs/components/Avatar/Avatar.styles_1gd252x.css +5 -0
- package/cjs/components/Avatar/Avatar.tokens.js +2 -41
- package/cjs/components/Avatar/Avatar.tokens.js.map +1 -1
- package/cjs/components/NumberInput/NumberInput.js +9 -3
- package/cjs/components/NumberInput/NumberInput.js.map +1 -1
- package/cjs/components/NumberInput/ui/Input/Input.js +12 -6
- package/cjs/components/NumberInput/ui/Input/Input.js.map +1 -1
- package/cjs/components/NumberInput/utils/index.js +8 -0
- package/cjs/components/NumberInput/utils/index.js.map +1 -1
- package/cjs/index.css +5 -8
- package/emotion/cjs/components/Avatar/Avatar.js +4 -39
- package/emotion/cjs/components/Avatar/Avatar.styles.js +10 -29
- package/emotion/cjs/components/Avatar/Avatar.template-doc.mdx +0 -54
- package/emotion/cjs/components/Avatar/Avatar.tokens.js +2 -41
- package/emotion/cjs/components/Avatar/utils/index.js +1 -15
- package/emotion/cjs/components/NumberInput/NumberInput.js +9 -3
- package/emotion/cjs/components/NumberInput/ui/Input/Input.js +12 -6
- package/emotion/cjs/components/NumberInput/utils/index.js +9 -2
- package/emotion/cjs/examples/plasma_b2c/components/Avatar/Avatar.config.js +7 -25
- package/emotion/cjs/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +1 -134
- package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +1 -0
- package/emotion/cjs/examples/plasma_web/components/Avatar/Avatar.config.js +7 -25
- package/emotion/cjs/examples/plasma_web/components/Avatar/Avatar.stories.tsx +1 -134
- package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +1 -0
- package/emotion/es/components/Avatar/Avatar.js +6 -41
- package/emotion/es/components/Avatar/Avatar.styles.js +10 -29
- package/emotion/es/components/Avatar/Avatar.template-doc.mdx +0 -54
- package/emotion/es/components/Avatar/Avatar.tokens.js +2 -41
- package/emotion/es/components/Avatar/utils/index.js +1 -14
- package/emotion/es/components/NumberInput/NumberInput.js +9 -3
- package/emotion/es/components/NumberInput/ui/Input/Input.js +13 -7
- package/emotion/es/components/NumberInput/utils/index.js +8 -1
- package/emotion/es/examples/plasma_b2c/components/Avatar/Avatar.config.js +7 -25
- package/emotion/es/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +1 -134
- package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +1 -0
- package/emotion/es/examples/plasma_web/components/Avatar/Avatar.config.js +7 -25
- package/emotion/es/examples/plasma_web/components/Avatar/Avatar.stories.tsx +1 -134
- package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +1 -0
- package/es/components/Avatar/Avatar.js +4 -40
- package/es/components/Avatar/Avatar.js.map +1 -1
- package/es/components/Avatar/Avatar.styles.js +2 -30
- package/es/components/Avatar/Avatar.styles.js.map +1 -1
- package/es/components/Avatar/Avatar.styles_1gd252x.css +5 -0
- package/es/components/Avatar/Avatar.tokens.js +2 -41
- package/es/components/Avatar/Avatar.tokens.js.map +1 -1
- package/es/components/NumberInput/NumberInput.js +9 -3
- package/es/components/NumberInput/NumberInput.js.map +1 -1
- package/es/components/NumberInput/ui/Input/Input.js +13 -7
- package/es/components/NumberInput/ui/Input/Input.js.map +1 -1
- package/es/components/NumberInput/utils/index.js +8 -1
- package/es/components/NumberInput/utils/index.js.map +1 -1
- package/es/index.css +5 -8
- package/package.json +2 -2
- package/styled-components/cjs/components/Avatar/Avatar.js +3 -38
- package/styled-components/cjs/components/Avatar/Avatar.styles.js +2 -18
- package/styled-components/cjs/components/Avatar/Avatar.template-doc.mdx +0 -54
- package/styled-components/cjs/components/Avatar/Avatar.tokens.js +2 -41
- package/styled-components/cjs/components/Avatar/utils/index.js +1 -15
- package/styled-components/cjs/components/NumberInput/NumberInput.js +9 -3
- package/styled-components/cjs/components/NumberInput/ui/Input/Input.js +12 -6
- package/styled-components/cjs/components/NumberInput/utils/index.js +9 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Avatar/Avatar.config.js +4 -22
- package/styled-components/cjs/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +1 -134
- package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +1 -0
- package/styled-components/cjs/examples/plasma_web/components/Avatar/Avatar.config.js +4 -22
- package/styled-components/cjs/examples/plasma_web/components/Avatar/Avatar.stories.tsx +1 -134
- package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +1 -0
- package/styled-components/es/components/Avatar/Avatar.js +5 -40
- package/styled-components/es/components/Avatar/Avatar.styles.js +2 -18
- package/styled-components/es/components/Avatar/Avatar.template-doc.mdx +0 -54
- package/styled-components/es/components/Avatar/Avatar.tokens.js +2 -41
- package/styled-components/es/components/Avatar/utils/index.js +1 -14
- package/styled-components/es/components/NumberInput/NumberInput.js +9 -3
- package/styled-components/es/components/NumberInput/ui/Input/Input.js +13 -7
- package/styled-components/es/components/NumberInput/utils/index.js +8 -1
- package/styled-components/es/examples/plasma_b2c/components/Avatar/Avatar.config.js +4 -22
- package/styled-components/es/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +1 -134
- package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +1 -0
- package/styled-components/es/examples/plasma_web/components/Avatar/Avatar.config.js +4 -22
- package/styled-components/es/examples/plasma_web/components/Avatar/Avatar.stories.tsx +1 -134
- package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +1 -0
- package/types/components/Avatar/Avatar.d.ts +21 -3
- package/types/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/components/Avatar/Avatar.styles.d.ts +0 -59
- package/types/components/Avatar/Avatar.styles.d.ts.map +1 -1
- package/types/components/Avatar/Avatar.tokens.d.ts +0 -37
- package/types/components/Avatar/Avatar.tokens.d.ts.map +1 -1
- package/types/components/Avatar/Avatar.types.d.ts +2 -47
- package/types/components/Avatar/Avatar.types.d.ts.map +1 -1
- package/types/components/Avatar/utils/index.d.ts +0 -1
- package/types/components/Avatar/utils/index.d.ts.map +1 -1
- package/types/components/Badge/Badge.types.d.ts +21 -8
- package/types/components/Badge/Badge.types.d.ts.map +1 -1
- package/types/components/Counter/Counter.d.ts +12 -2
- package/types/components/Counter/Counter.d.ts.map +1 -1
- package/types/components/Counter/Counter.types.d.ts +2 -1
- package/types/components/Counter/Counter.types.d.ts.map +1 -1
- package/types/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/types/components/NumberInput/NumberInput.types.d.ts +5 -0
- package/types/components/NumberInput/NumberInput.types.d.ts.map +1 -1
- package/types/components/NumberInput/ui/Input/Input.d.ts +1 -0
- package/types/components/NumberInput/ui/Input/Input.d.ts.map +1 -1
- package/types/components/NumberInput/ui/Input/Input.types.d.ts +1 -0
- package/types/components/NumberInput/ui/Input/Input.types.d.ts.map +1 -1
- package/types/components/NumberInput/utils/index.d.ts +1 -0
- package/types/components/NumberInput/utils/index.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Avatar/Avatar.config.d.ts +0 -18
- package/types/examples/plasma_b2c/components/Avatar/Avatar.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Avatar/Avatar.d.ts +6 -138
- package/types/examples/plasma_b2c/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +48 -8
- package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Counter/Counter.d.ts +6 -1
- package/types/examples/plasma_b2c/components/Counter/Counter.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts +2 -0
- package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Avatar/Avatar.config.d.ts +0 -18
- package/types/examples/plasma_web/components/Avatar/Avatar.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Avatar/Avatar.d.ts +6 -138
- package/types/examples/plasma_web/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Badge/Badge.d.ts +48 -8
- package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Counter/Counter.d.ts +6 -1
- package/types/examples/plasma_web/components/Counter/Counter.d.ts.map +1 -1
- package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts +2 -0
- package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/cjs/components/Avatar/Avatar.styles_131qvfx.css +0 -8
- package/cjs/components/Avatar/utils/index.js +0 -21
- package/cjs/components/Avatar/utils/index.js.map +0 -1
- package/es/components/Avatar/Avatar.styles_131qvfx.css +0 -8
- package/es/components/Avatar/utils/index.js +0 -17
- package/es/components/Avatar/utils/index.js.map +0 -1
@@ -10,32 +10,14 @@ export var config = {
|
|
10
10
|
"default": /*#__PURE__*/css(["", ":var(--text-accent-gradient);", ":linear-gradient(94deg,rgba(62,121,240,0.2) 6.49%,rgba(39,198,229,0.2) 93.51%);", ":var(--surface-positive);", ":var(--surface-solid-tertiary);", ":1.02;"], tokens.color, tokens.backgroundColor, tokens.statusOnlineColor, tokens.statusOfflineColor, tokens.scaleHover)
|
11
11
|
},
|
12
12
|
size: {
|
13
|
-
xxl: /*#__PURE__*/css(["", ":6.25rem;", ":2rem;", ":600;", ":2rem;", ":0.75rem;"
|
14
|
-
l: /*#__PURE__*/css(["", ":3rem;", ":1.25rem;", ":600;", ":1.25rem;", ":0.5rem;"
|
15
|
-
m: /*#__PURE__*/css(["", ":2.25rem;", ":0.875rem;", ":600;", ":0.875rem;", ":0.5rem;"
|
16
|
-
s: /*#__PURE__*/css(["", ":1.5rem;", ":0.5rem;", ":600;", ":0.5rem;", ":0.375rem;"
|
13
|
+
xxl: /*#__PURE__*/css(["", ":6.25rem;", ":2rem;", ":600;", ":2rem;", ":0.75rem;"], tokens.avatarSize, tokens.fontSize, tokens.fontWeight, tokens.lineHeight, tokens.statusIconSize),
|
14
|
+
l: /*#__PURE__*/css(["", ":3rem;", ":1.25rem;", ":600;", ":1.25rem;", ":0.5rem;"], tokens.avatarSize, tokens.fontSize, tokens.fontWeight, tokens.lineHeight, tokens.statusIconSize),
|
15
|
+
m: /*#__PURE__*/css(["", ":2.25rem;", ":0.875rem;", ":600;", ":0.875rem;", ":0.5rem;"], tokens.avatarSize, tokens.fontSize, tokens.fontWeight, tokens.lineHeight, tokens.statusIconSize),
|
16
|
+
s: /*#__PURE__*/css(["", ":1.5rem;", ":0.5rem;", ":600;", ":0.5rem;", ":0.375rem;"], tokens.avatarSize, tokens.fontSize, tokens.fontWeight, tokens.lineHeight, tokens.statusIconSize),
|
17
17
|
fit: /*#__PURE__*/css(["", ":100%;", ":0;", ":0;", ":0;", ":0;"], tokens.avatarSize, tokens.fontSize, tokens.fontWeight, tokens.lineHeight, tokens.statusIconSize)
|
18
18
|
},
|
19
19
|
focused: {
|
20
20
|
"true": /*#__PURE__*/css(["", ":0.1rem;", ":-0.2rem;", ":var(--surface-accent);"], tokens.outlineSize, tokens.outlineOffset, tokens.outlineColor)
|
21
|
-
},
|
22
|
-
badgeView: {
|
23
|
-
"default": /*#__PURE__*/css(["", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-clear);"], tokens.badgeColor, tokens.badgeBackground, tokens.badgeColorTransparent, tokens.badgeBackgroundTransparent, tokens.badgeColorClear, tokens.badgeBackgroundClear),
|
24
|
-
accent: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-accent);", ":var(--text-accent);", ":var(--surface-transparent-accent);", ":var(--text-accent);", ":var(--surface-clear)"], tokens.badgeColor, tokens.badgeBackground, tokens.badgeColorTransparent, tokens.badgeBackgroundTransparent, tokens.badgeColorClear, tokens.badgeBackgroundClear),
|
25
|
-
positive: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-positive);", ":var(--text-positive);", ":var(--surface-transparent-positive);", ":var(--text-positive);", ":var(--surface-clear)"], tokens.badgeColor, tokens.badgeBackground, tokens.badgeColorTransparent, tokens.badgeBackgroundTransparent, tokens.badgeColorClear, tokens.badgeBackgroundClear),
|
26
|
-
warning: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-warning);", ":var(--text-warning);", ":var(--surface-transparent-warning);", ":var(--text-warning);", ":var(--surface-clear)"], tokens.badgeColor, tokens.badgeBackground, tokens.badgeColorTransparent, tokens.badgeBackgroundTransparent, tokens.badgeColorClear, tokens.badgeBackgroundClear),
|
27
|
-
negative: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-negative);", ":var(--text-negative);", ":var(--surface-transparent-negative);", ":var(--text-negative);", ":var(--surface-clear)"], tokens.badgeColor, tokens.badgeBackground, tokens.badgeColorTransparent, tokens.badgeBackgroundTransparent, tokens.badgeColorClear, tokens.badgeBackgroundClear),
|
28
|
-
dark: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--on-light-surface-solid-default);", ":var(--on-dark-text-primary);", ":var(--on-light-surface-transparent-deep);", ":var(--on-light-text-pri ", ":var(--surface-clear)mary);"], tokens.badgeColor, tokens.badgeBackground, tokens.badgeColorTransparent, tokens.badgeBackgroundTransparent, tokens.badgeColorClear, tokens.badgeBackgroundClear),
|
29
|
-
light: /*#__PURE__*/css(["", ":var(--on-light-text-primary);", ":var(--on-dark-surface-solid-default);", ":var(--on-dark-text-primary);", ":var(--on-dark-surface-transparent-card);", ":var(--on-dark-text-prima ", ":var(--surface-clear)ry);"], tokens.badgeColor, tokens.badgeBackground, tokens.badgeColorTransparent, tokens.badgeBackgroundTransparent, tokens.badgeColorClear, tokens.badgeBackgroundClear)
|
30
|
-
},
|
31
|
-
counterView: {
|
32
|
-
"default": /*#__PURE__*/css(["", ":var(--inverse-text-primary);", ":var(--surface-solid-default);"], tokens.counterColor, tokens.counterBackground),
|
33
|
-
accent: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-accent);"], tokens.counterColor, tokens.counterBackground),
|
34
|
-
positive: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-positive);"], tokens.counterColor, tokens.counterBackground),
|
35
|
-
warning: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-warning);"], tokens.counterColor, tokens.counterBackground),
|
36
|
-
negative: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-negative);"], tokens.counterColor, tokens.counterBackground),
|
37
|
-
dark: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--on-light-surface-solid-default);"], tokens.counterColor, tokens.counterBackground),
|
38
|
-
light: /*#__PURE__*/css(["", ":var(--on-light-text-primary);", ":var(--on-dark-surface-solid-default);"], tokens.counterColor, tokens.counterBackground)
|
39
21
|
}
|
40
22
|
}
|
41
23
|
};
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import type { ComponentProps } from 'react';
|
3
2
|
import type { StoryObj, Meta } from '@storybook/react';
|
4
3
|
import { disableProps } from '@salutejs/plasma-sb-utils';
|
@@ -7,11 +6,6 @@ import { argTypesFromConfig, WithTheme } from '../../../_helpers';
|
|
7
6
|
|
8
7
|
import { Avatar, mergedConfig } from './Avatar';
|
9
8
|
|
10
|
-
const extraPlacements = ['top-left', 'top-right', 'bottom-left', 'bottom-right'];
|
11
|
-
const extraType = ['', 'badge', 'counter'];
|
12
|
-
const counterViews = ['default', 'accent', 'positive', 'warning', 'negative', 'dark', 'light'];
|
13
|
-
const badgeViews = ['default', 'accent', 'positive', 'warning', 'negative', 'dark', 'light'];
|
14
|
-
|
15
9
|
const meta: Meta<typeof Avatar> = {
|
16
10
|
title: 'web/Data Display/Avatar',
|
17
11
|
decorators: [WithTheme],
|
@@ -19,69 +13,12 @@ const meta: Meta<typeof Avatar> = {
|
|
19
13
|
argTypes: {
|
20
14
|
...argTypesFromConfig(mergedConfig),
|
21
15
|
status: { control: 'select', options: ['active', 'inactive'] },
|
22
|
-
type: {
|
23
|
-
control: 'select',
|
24
|
-
options: extraType,
|
25
|
-
if: { arg: 'hasExtra', truthy: true },
|
26
|
-
},
|
27
|
-
extraPlacement: {
|
28
|
-
control: 'select',
|
29
|
-
options: extraPlacements,
|
30
|
-
if: { arg: 'hasExtra', truthy: true },
|
31
|
-
},
|
32
|
-
counterView: {
|
33
|
-
control: 'select',
|
34
|
-
options: counterViews,
|
35
|
-
if: { arg: 'type', eq: 'counter' },
|
36
|
-
},
|
37
|
-
count: {
|
38
|
-
control: 'number',
|
39
|
-
if: { arg: 'type', eq: 'counter' },
|
40
|
-
},
|
41
|
-
maxCount: {
|
42
|
-
control: 'number',
|
43
|
-
if: { arg: 'type', eq: 'counter' },
|
44
|
-
},
|
45
|
-
badgeView: {
|
46
|
-
control: 'select',
|
47
|
-
options: badgeViews,
|
48
|
-
if: { arg: 'type', eq: 'badge' },
|
49
|
-
},
|
50
|
-
text: {
|
51
|
-
control: 'text',
|
52
|
-
if: { arg: 'type', eq: 'badge' },
|
53
|
-
},
|
54
|
-
customColor: {
|
55
|
-
control: 'color',
|
56
|
-
if: { arg: 'type', eq: 'badge' },
|
57
|
-
},
|
58
|
-
customBackgroundColor: {
|
59
|
-
control: 'color',
|
60
|
-
if: { arg: 'type', eq: 'badge' },
|
61
|
-
},
|
62
|
-
pilled: {
|
63
|
-
control: 'boolean',
|
64
|
-
if: { arg: 'type', eq: 'badge' },
|
65
|
-
},
|
66
16
|
},
|
67
17
|
};
|
68
18
|
|
69
19
|
export default meta;
|
70
20
|
|
71
|
-
type
|
72
|
-
enableContentLeft: boolean;
|
73
|
-
enableContentRight: boolean;
|
74
|
-
};
|
75
|
-
type Story = StoryObj<StoryProps>;
|
76
|
-
|
77
|
-
const BellIcon = (props) => (
|
78
|
-
<svg width="100%" viewBox="0 0 24 24" fill="none" {...props}>
|
79
|
-
<path
|
80
|
-
d="M11.501 21.28c1.088 0 1.978-.889 1.978-1.977H9.524c0 1.088.88 1.978 1.977 1.978zm5.933-5.932v-4.944c0-3.035-1.622-5.576-4.45-6.248v-.673c0-.82-.662-1.483-1.483-1.483-.82 0-1.483.662-1.483 1.483v.672c-2.838.673-4.45 3.204-4.45 6.25v4.943l-1.275 1.276c-.623.623-.188 1.69.692 1.69h13.022c.88 0 1.325-1.067.702-1.69l-1.275-1.276z"
|
81
|
-
fill="currentColor"
|
82
|
-
/>
|
83
|
-
</svg>
|
84
|
-
);
|
21
|
+
type Story = StoryObj<ComponentProps<typeof Avatar>>;
|
85
22
|
|
86
23
|
export const Default: Story = {
|
87
24
|
args: {
|
@@ -90,56 +27,10 @@ export const Default: Story = {
|
|
90
27
|
name: 'Иван Фадеев',
|
91
28
|
url: 'https://avatars.githubusercontent.com/u/1813468?v=4',
|
92
29
|
isScalable: false,
|
93
|
-
hasExtra: false,
|
94
|
-
extraPlacement: 'top-right',
|
95
|
-
type: undefined,
|
96
|
-
counterView: 'accent',
|
97
|
-
count: 3,
|
98
|
-
maxCount: 10,
|
99
|
-
badgeView: 'accent',
|
100
|
-
text: '31',
|
101
|
-
pilled: true,
|
102
|
-
enableContentLeft: false,
|
103
|
-
enableContentRight: false,
|
104
30
|
},
|
105
31
|
argTypes: {
|
106
|
-
enableContentLeft: {
|
107
|
-
control: { type: 'boolean' },
|
108
|
-
if: { arg: 'type', eq: 'badge' },
|
109
|
-
},
|
110
|
-
enableContentRight: {
|
111
|
-
control: { type: 'boolean' },
|
112
|
-
if: { arg: 'type', eq: 'badge' },
|
113
|
-
},
|
114
32
|
...disableProps(['focused']),
|
115
33
|
},
|
116
|
-
render: ({ enableContentLeft, enableContentRight, size, ...rest }: StoryProps) => {
|
117
|
-
const iconSize = () => {
|
118
|
-
switch (size) {
|
119
|
-
case 'xxl':
|
120
|
-
return '1rem';
|
121
|
-
case 'm':
|
122
|
-
return '0.625rem';
|
123
|
-
default:
|
124
|
-
return '0.75rem';
|
125
|
-
}
|
126
|
-
};
|
127
|
-
|
128
|
-
return (
|
129
|
-
<>
|
130
|
-
<Avatar
|
131
|
-
contentLeft={enableContentLeft ? <BellIcon width={iconSize()} height={iconSize()} /> : undefined}
|
132
|
-
contentRight={
|
133
|
-
!enableContentLeft && enableContentRight ? (
|
134
|
-
<BellIcon width={iconSize()} height={iconSize()} />
|
135
|
-
) : undefined
|
136
|
-
}
|
137
|
-
size={size}
|
138
|
-
{...rest}
|
139
|
-
/>
|
140
|
-
</>
|
141
|
-
);
|
142
|
-
},
|
143
34
|
};
|
144
35
|
|
145
36
|
export const Accessibility: Story = {
|
@@ -151,14 +42,6 @@ export const Accessibility: Story = {
|
|
151
42
|
size: 'xxl',
|
152
43
|
status: 'active',
|
153
44
|
focused: true,
|
154
|
-
hasExtra: false,
|
155
|
-
extraPlacement: 'top-right',
|
156
|
-
type: undefined,
|
157
|
-
counterView: 'accent',
|
158
|
-
count: 3,
|
159
|
-
maxCount: 10,
|
160
|
-
badgeView: 'accent',
|
161
|
-
text: '31',
|
162
45
|
},
|
163
46
|
};
|
164
47
|
|
@@ -172,14 +55,6 @@ export const AccessibilityWithURL: Story = {
|
|
172
55
|
focused: true,
|
173
56
|
name: 'Микула Селянинович',
|
174
57
|
url: 'https://avatars.githubusercontent.com/u/1813468?v=4',
|
175
|
-
hasExtra: false,
|
176
|
-
extraPlacement: 'top-right',
|
177
|
-
type: undefined,
|
178
|
-
counterView: 'accent',
|
179
|
-
count: 3,
|
180
|
-
maxCount: 10,
|
181
|
-
badgeView: 'accent',
|
182
|
-
text: '31',
|
183
58
|
},
|
184
59
|
};
|
185
60
|
|
@@ -192,13 +67,5 @@ export const AccessibilityWithCustomText: Story = {
|
|
192
67
|
status: 'inactive',
|
193
68
|
focused: true,
|
194
69
|
customText: 'ФИО',
|
195
|
-
hasExtra: false,
|
196
|
-
extraPlacement: 'top-right',
|
197
|
-
type: undefined,
|
198
|
-
counterView: 'accent',
|
199
|
-
count: 3,
|
200
|
-
maxCount: 10,
|
201
|
-
badgeView: 'accent',
|
202
|
-
text: '31',
|
203
70
|
},
|
204
71
|
};
|
@@ -1,11 +1,29 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { RootProps } from '../../engines';
|
3
|
-
import type { AvatarProps } from './Avatar.types';
|
4
|
-
export declare const avatarRoot: (Root: RootProps<HTMLDivElement, AvatarProps>) => React.ForwardRefExoticComponent<
|
3
|
+
import type { AvatarProps, StatusLabels } from './Avatar.types';
|
4
|
+
export declare const avatarRoot: (Root: RootProps<HTMLDivElement, AvatarProps>) => React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
5
|
+
size: "m" | "s" | "l" | "xxl" | "fit";
|
6
|
+
name?: string | undefined;
|
7
|
+
url?: string | undefined;
|
8
|
+
customText?: string | undefined;
|
9
|
+
status?: "active" | "inactive" | undefined;
|
10
|
+
isScalable?: boolean | undefined;
|
11
|
+
focused?: boolean | undefined;
|
12
|
+
statusLabels?: StatusLabels | undefined;
|
13
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
5
14
|
export declare const avatarConfig: {
|
6
15
|
name: string;
|
7
16
|
tag: string;
|
8
|
-
layout: (Root: RootProps<HTMLDivElement, AvatarProps>) => React.ForwardRefExoticComponent<
|
17
|
+
layout: (Root: RootProps<HTMLDivElement, AvatarProps>) => React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
18
|
+
size: "m" | "s" | "l" | "xxl" | "fit";
|
19
|
+
name?: string | undefined;
|
20
|
+
url?: string | undefined;
|
21
|
+
customText?: string | undefined;
|
22
|
+
status?: "active" | "inactive" | undefined;
|
23
|
+
isScalable?: boolean | undefined;
|
24
|
+
focused?: boolean | undefined;
|
25
|
+
statusLabels?: StatusLabels | undefined;
|
26
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
9
27
|
base: import("@linaria/core").LinariaClassName;
|
10
28
|
variations: {
|
11
29
|
size: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAGjE,OAAO,EAAE,SAAS,EAA0B,MAAM,eAAe,CAAC;AASlE,OAAO,KAAK,EAAE,WAAW,
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAGjE,OAAO,EAAE,SAAS,EAA0B,MAAM,eAAe,CAAC;AASlE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAuDhE,eAAO,MAAM,UAAU,SAAU,UAAU,cAAc,EAAE,WAAW,CAAC;;;;;;;;;wCAwCtE,CAAC;AAEF,eAAO,MAAM,YAAY;;;mBA1CQ,UAAU,cAAc,EAAE,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;CA0DtE,CAAC"}
|
@@ -7,63 +7,4 @@ export declare const Wrapper: import("@linaria/react").StyledComponent<import("r
|
|
7
7
|
export declare const StatusIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
8
8
|
export declare const Image: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
9
9
|
export declare const Text: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
10
|
-
export declare const ExtraContent: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
11
|
-
export declare const ExtraBadge: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("../../engines/types").PropsType<import("../../engines/types").Variants> & ((import("react").HTMLAttributes<HTMLDivElement> & {
|
12
|
-
text?: string | undefined;
|
13
|
-
customColor?: string | undefined;
|
14
|
-
customBackgroundColor?: string | undefined;
|
15
|
-
maxWidth?: import("csstype").Property.Width<string | number> | undefined;
|
16
|
-
size?: string | undefined;
|
17
|
-
view?: string | undefined;
|
18
|
-
} & {
|
19
|
-
contentLeft?: import("react").ReactNode;
|
20
|
-
contentRight?: undefined;
|
21
|
-
} & {
|
22
|
-
clear?: true | undefined;
|
23
|
-
pilled?: undefined;
|
24
|
-
transparent?: undefined;
|
25
|
-
} & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & {
|
26
|
-
text?: string | undefined;
|
27
|
-
customColor?: string | undefined;
|
28
|
-
customBackgroundColor?: string | undefined;
|
29
|
-
maxWidth?: import("csstype").Property.Width<string | number> | undefined;
|
30
|
-
size?: string | undefined;
|
31
|
-
view?: string | undefined;
|
32
|
-
} & {
|
33
|
-
contentLeft?: import("react").ReactNode;
|
34
|
-
contentRight?: undefined;
|
35
|
-
} & {
|
36
|
-
pilled?: boolean | undefined;
|
37
|
-
transparent?: boolean | undefined;
|
38
|
-
clear?: undefined;
|
39
|
-
} & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & {
|
40
|
-
text?: string | undefined;
|
41
|
-
customColor?: string | undefined;
|
42
|
-
customBackgroundColor?: string | undefined;
|
43
|
-
maxWidth?: import("csstype").Property.Width<string | number> | undefined;
|
44
|
-
size?: string | undefined;
|
45
|
-
view?: string | undefined;
|
46
|
-
} & {
|
47
|
-
contentLeft?: undefined;
|
48
|
-
contentRight?: import("react").ReactNode;
|
49
|
-
} & {
|
50
|
-
clear?: true | undefined;
|
51
|
-
pilled?: undefined;
|
52
|
-
transparent?: undefined;
|
53
|
-
} & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & {
|
54
|
-
text?: string | undefined;
|
55
|
-
customColor?: string | undefined;
|
56
|
-
customBackgroundColor?: string | undefined;
|
57
|
-
maxWidth?: import("csstype").Property.Width<string | number> | undefined;
|
58
|
-
size?: string | undefined;
|
59
|
-
view?: string | undefined;
|
60
|
-
} & {
|
61
|
-
contentLeft?: undefined;
|
62
|
-
contentRight?: import("react").ReactNode;
|
63
|
-
} & {
|
64
|
-
pilled?: boolean | undefined;
|
65
|
-
transparent?: boolean | undefined;
|
66
|
-
clear?: undefined;
|
67
|
-
} & import("react").RefAttributes<HTMLDivElement>))>;
|
68
|
-
export declare const ExtraCounter: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("../../engines/types").PropsType<import("../../engines/types").Variants> & import("react").HTMLAttributes<HTMLDivElement> & import("../Counter/Counter.types").CustomCounterProps & import("react").RefAttributes<HTMLDivElement>>;
|
69
10
|
//# sourceMappingURL=Avatar.styles.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Avatar.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.styles.ts"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"Avatar.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.styles.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,eAAO,MAAM,IAAI,0CAEhB,CAAC;AAEF,eAAO,MAAM,OAAO;iBAA6B,WAAW,CAAC,YAAY,CAAC;EAczE,CAAC;AAEF,eAAO,MAAM,UAAU,qKAItB,CAAC;AAEF,eAAO,MAAM,KAAK,4KAIjB,CAAC;AAEF,eAAO,MAAM,IAAI,uKAUhB,CAAC"}
|
@@ -1,9 +1,5 @@
|
|
1
1
|
export declare const classes: {
|
2
2
|
avatarItem: string;
|
3
|
-
extraPlacementTopRight: string;
|
4
|
-
extraPlacementTopLeft: string;
|
5
|
-
extraPlacementBottomLeft: string;
|
6
|
-
extraPlacementBottomRight: string;
|
7
3
|
};
|
8
4
|
export declare const tokens: {
|
9
5
|
avatarSize: string;
|
@@ -20,38 +16,5 @@ export declare const tokens: {
|
|
20
16
|
outlineSize: string;
|
21
17
|
outlineOffset: string;
|
22
18
|
scaleHover: string;
|
23
|
-
extraPlacementFactor: string;
|
24
|
-
badgeBackground: string;
|
25
|
-
badgeColor: string;
|
26
|
-
badgeBackgroundTransparent: string;
|
27
|
-
badgeColorTransparent: string;
|
28
|
-
badgeColorClear: string;
|
29
|
-
badgeBackgroundClear: string;
|
30
|
-
badgeBorderRadius: string;
|
31
|
-
badgePilledBorderRadius: string;
|
32
|
-
badgeHeight: string;
|
33
|
-
badgePadding: string;
|
34
|
-
badgePaddingIconOnly: string;
|
35
|
-
badgeFontFamily: string;
|
36
|
-
badgeFontSize: string;
|
37
|
-
badgeFontStyle: string;
|
38
|
-
badgeFontWeight: string;
|
39
|
-
badgeLetterSpacing: string;
|
40
|
-
badgeLineHeight: string;
|
41
|
-
badgeLeftContentMarginLeft: string;
|
42
|
-
badgeLeftContentMarginRight: string;
|
43
|
-
badgeRightContentMarginLeft: string;
|
44
|
-
badgeRightContentMarginRight: string;
|
45
|
-
counterBackground: string;
|
46
|
-
counterColor: string;
|
47
|
-
counterBorderRadius: string;
|
48
|
-
counterHeight: string;
|
49
|
-
counterPadding: string;
|
50
|
-
counterFontFamily: string;
|
51
|
-
counterFontSize: string;
|
52
|
-
counterFontStyle: string;
|
53
|
-
counterFontWeight: string;
|
54
|
-
counterLetterSpacing: string;
|
55
|
-
counterLineHeight: string;
|
56
19
|
};
|
57
20
|
//# sourceMappingURL=Avatar.tokens.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Avatar.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO
|
1
|
+
{"version":3,"file":"Avatar.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;CAEnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;CAelB,CAAC"}
|
@@ -1,39 +1,6 @@
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
2
|
-
import type { CustomCounterProps } from '../Counter/Counter.types';
|
3
|
-
import type { CustomBadgeProps } from '../Badge/Badge.types';
|
4
|
-
declare type Only<T, U> = {
|
5
|
-
[P in keyof T]: T[P];
|
6
|
-
} & {
|
7
|
-
[P in keyof U]?: never;
|
8
|
-
};
|
9
|
-
declare type OneOf<T, U> = Only<T, U> | Only<U, T>;
|
10
|
-
declare type ExtraBadgeProps = {
|
11
|
-
/**
|
12
|
-
* Вид Badge
|
13
|
-
* @default
|
14
|
-
* default
|
15
|
-
*/
|
16
|
-
badgeView?: string;
|
17
|
-
/**
|
18
|
-
* Компонент c округлым border-radius
|
19
|
-
*/
|
20
|
-
pilled?: boolean;
|
21
|
-
} & Omit<CustomBadgeProps, 'size' | 'view' | 'maxWidth'>;
|
22
|
-
declare type ExtraCounterProps = {
|
23
|
-
/**
|
24
|
-
* Вид Counter
|
25
|
-
* @default
|
26
|
-
* default
|
27
|
-
*/
|
28
|
-
counterView?: string;
|
29
|
-
/**
|
30
|
-
* Отображаемое число. Не может быть меньше 1.
|
31
|
-
*/
|
32
|
-
count?: number;
|
33
|
-
} & Omit<CustomCounterProps, 'size' | 'view' | 'count'>;
|
34
|
-
declare type ExtraProps = OneOf<ExtraBadgeProps, ExtraCounterProps>;
|
35
2
|
declare type CustomAvatarProps = {
|
36
|
-
size
|
3
|
+
size: 'xxl' | 'l' | 'm' | 's' | 'fit';
|
37
4
|
name?: string;
|
38
5
|
url?: string;
|
39
6
|
customText?: string;
|
@@ -46,19 +13,7 @@ declare type CustomAvatarProps = {
|
|
46
13
|
* { active: 'Активен', inactive: 'Неактивен' }
|
47
14
|
*/
|
48
15
|
statusLabels?: StatusLabels;
|
49
|
-
|
50
|
-
* Включить отображение дополнительного элемента
|
51
|
-
*/
|
52
|
-
hasExtra?: boolean;
|
53
|
-
/**
|
54
|
-
* Тип дополнительного элемента
|
55
|
-
*/
|
56
|
-
type?: 'badge' | 'counter';
|
57
|
-
/**
|
58
|
-
* Расположение дополнительного элемента
|
59
|
-
*/
|
60
|
-
extraPlacement?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
61
|
-
} & ExtraProps;
|
16
|
+
};
|
62
17
|
export declare type StatusLabels = Record<'active' | 'inactive', string>;
|
63
18
|
export declare type AvatarProps = HTMLAttributes<HTMLDivElement> & CustomAvatarProps;
|
64
19
|
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Avatar.types.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,
|
1
|
+
{"version":3,"file":"Avatar.types.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,aAAK,iBAAiB,GAAG;IAErB,IAAI,EAAE,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,KAAK,CAAC;IAEtC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAE/B,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B,CAAC;AAEF,oBAAY,YAAY,GAAG,MAAM,CAAC,QAAQ,GAAG,UAAU,EAAE,MAAM,CAAC,CAAC;AAEjE,oBAAY,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG,iBAAiB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Avatar/utils/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Avatar/utils/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';
|
2
|
-
|
1
|
+
import type { CSSProperties, HTMLAttributes, PropsWithChildren, ReactNode } from 'react';
|
2
|
+
declare type ClearViewProps = {
|
3
3
|
/**
|
4
4
|
* view применяется с clear-токенами
|
5
5
|
* @default
|
@@ -11,18 +11,18 @@ export declare type ClearViewProps = {
|
|
11
11
|
* @default
|
12
12
|
* false
|
13
13
|
*/
|
14
|
-
pilled?:
|
14
|
+
pilled?: false;
|
15
15
|
/**
|
16
16
|
* view применяется с учетом прозрачности
|
17
17
|
* @default
|
18
18
|
* false
|
19
19
|
*/
|
20
|
-
transparent?:
|
20
|
+
transparent?: false;
|
21
21
|
} | {
|
22
22
|
/**
|
23
23
|
* Компонент c округлым border-radius
|
24
24
|
*/
|
25
|
-
pilled?:
|
25
|
+
pilled?: true;
|
26
26
|
/**
|
27
27
|
* view применяется с учетом прозрачности
|
28
28
|
*/
|
@@ -30,7 +30,20 @@ export declare type ClearViewProps = {
|
|
30
30
|
/**
|
31
31
|
* view применяется с clear-токенами
|
32
32
|
*/
|
33
|
-
clear?:
|
33
|
+
clear?: false;
|
34
|
+
} | {
|
35
|
+
/**
|
36
|
+
* Компонент c округлым border-radius
|
37
|
+
*/
|
38
|
+
pilled?: boolean;
|
39
|
+
/**
|
40
|
+
* view применяется с учетом прозрачности
|
41
|
+
*/
|
42
|
+
transparent?: true;
|
43
|
+
/**
|
44
|
+
* view применяется с clear-токенами
|
45
|
+
*/
|
46
|
+
clear?: false;
|
34
47
|
};
|
35
48
|
declare type IconContentProps = {
|
36
49
|
/**
|
@@ -45,7 +58,7 @@ declare type IconContentProps = {
|
|
45
58
|
contentLeft?: never;
|
46
59
|
contentRight?: ReactNode;
|
47
60
|
};
|
48
|
-
|
61
|
+
declare type CustomBadgeProps = {
|
49
62
|
/**
|
50
63
|
* Текстовая надпись
|
51
64
|
*/
|
@@ -75,7 +88,7 @@ export declare type CustomBadgeProps = {
|
|
75
88
|
* default
|
76
89
|
*/
|
77
90
|
view?: string;
|
78
|
-
} & IconContentProps;
|
91
|
+
} & IconContentProps & PropsWithChildren;
|
79
92
|
export declare type BadgeProps = HTMLAttributes<HTMLDivElement> & CustomBadgeProps & ClearViewProps;
|
80
93
|
export declare type BadgeRootProps = HTMLAttributes<HTMLDivElement> & CustomBadgeProps & {
|
81
94
|
pilled?: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Badge.types.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"Badge.types.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzF,aAAK,cAAc,GACb;IACI;;;;OAIG;IACH,KAAK,CAAC,EAAE,IAAI,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC;CACvB,GACD;IACI;;OAEG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACjB,GACD;IACI;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACjB,CAAC;AAER,aAAK,gBAAgB,GACf;IACI;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;CACxB,GACD;IACI,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,YAAY,CAAC,EAAE,SAAS,CAAC;CAC5B,CAAC;AAER,aAAK,gBAAgB,GAAG;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAClC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,gBAAgB,GAChB,iBAAiB,CAAC;AAEtB,oBAAY,UAAU,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAC5F,oBAAY,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC,GACvD,gBAAgB,GAAG;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
|
@@ -1,11 +1,21 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import type { RootProps } from '../../engines';
|
3
3
|
import type { CounterProps } from './Counter.types';
|
4
|
-
export declare const counterRoot: (Root: RootProps<HTMLDivElement, CounterProps>) => React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> &
|
4
|
+
export declare const counterRoot: (Root: RootProps<HTMLDivElement, CounterProps>) => React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
5
|
+
count: number;
|
6
|
+
maxCount?: number | undefined;
|
7
|
+
size?: string | undefined;
|
8
|
+
view?: string | undefined;
|
9
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
5
10
|
export declare const counterConfig: {
|
6
11
|
name: string;
|
7
12
|
tag: string;
|
8
|
-
layout: (Root: RootProps<HTMLDivElement, CounterProps>) => React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> &
|
13
|
+
layout: (Root: RootProps<HTMLDivElement, CounterProps>) => React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
14
|
+
count: number;
|
15
|
+
maxCount?: number | undefined;
|
16
|
+
size?: string | undefined;
|
17
|
+
view?: string | undefined;
|
18
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
9
19
|
base: import("@linaria/core").LinariaClassName;
|
10
20
|
variations: {
|
11
21
|
view: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Counter.d.ts","sourceRoot":"","sources":["../../../src/components/Counter/Counter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAK/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAMpD,eAAO,MAAM,WAAW,SAAU,UAAU,cAAc,EAAE,YAAY,CAAC
|
1
|
+
{"version":3,"file":"Counter.d.ts","sourceRoot":"","sources":["../../../src/components/Counter/Counter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAK/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAMpD,eAAO,MAAM,WAAW,SAAU,UAAU,cAAc,EAAE,YAAY,CAAC;;;;;wCAmBnE,CAAC;AAEP,eAAO,MAAM,aAAa;;;mBArBQ,UAAU,cAAc,EAAE,YAAY,CAAC;;;;;;;;;;;;;;;;;;;CAsCxE,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
2
|
-
|
2
|
+
declare type CustomCounterProps = {
|
3
3
|
/**
|
4
4
|
* Отображаемое число. Не может быть меньше 1.
|
5
5
|
*/
|
@@ -22,4 +22,5 @@ export declare type CustomCounterProps = {
|
|
22
22
|
view?: string;
|
23
23
|
};
|
24
24
|
export declare type CounterProps = HTMLAttributes<HTMLDivElement> & CustomCounterProps;
|
25
|
+
export {};
|
25
26
|
//# sourceMappingURL=Counter.types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Counter.types.d.ts","sourceRoot":"","sources":["../../../src/components/Counter/Counter.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,
|
1
|
+
{"version":3,"file":"Counter.types.d.ts","sourceRoot":"","sources":["../../../src/components/Counter/Counter.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,aAAK,kBAAkB,GAAG;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../src/components/NumberInput/NumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAE9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;
|
1
|
+
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../src/components/NumberInput/NumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAE9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAYlF,eAAO,MAAM,eAAe,SAAU,UAAU,cAAc,EAAE,oBAAoB,CAAC,8FAsLhF,CAAC;AAEN,eAAO,MAAM,iBAAiB;;;mBAxLQ,UAAU,cAAc,EAAE,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwNpF,CAAC"}
|