@salutejs/plasma-new-hope 0.76.5-canary.1188.8748029637.0 → 0.76.6-canary.1183.8752730341.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. package/cjs/components/Avatar/Avatar.js +28 -3
  2. package/cjs/components/Avatar/Avatar.js.map +1 -1
  3. package/es/components/Avatar/Avatar.js +29 -4
  4. package/es/components/Avatar/Avatar.js.map +1 -1
  5. package/package.json +2 -2
  6. package/styled-components/cjs/components/Avatar/Avatar.js +33 -3
  7. package/styled-components/cjs/components/Avatar/Avatar.template-doc.mdx +52 -2
  8. package/styled-components/cjs/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +26 -1
  9. package/styled-components/cjs/examples/plasma_b2c/components/AvatarGroup/AvatarGroup.stories.tsx +36 -18
  10. package/styled-components/cjs/examples/plasma_b2c/components/Button/Button.stories.tsx +27 -11
  11. package/styled-components/cjs/examples/plasma_b2c/components/Radiobox/Radiobox.stories.tsx +42 -37
  12. package/styled-components/cjs/examples/plasma_web/components/Avatar/Avatar.stories.tsx +26 -1
  13. package/styled-components/cjs/examples/sds_engineer/components/Avatar/Avatar.stories.tsx +27 -1
  14. package/styled-components/es/components/Avatar/Avatar.js +34 -3
  15. package/styled-components/es/components/Avatar/Avatar.template-doc.mdx +52 -2
  16. package/styled-components/es/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +26 -1
  17. package/styled-components/es/examples/plasma_b2c/components/AvatarGroup/AvatarGroup.stories.tsx +36 -18
  18. package/styled-components/es/examples/plasma_b2c/components/Button/Button.stories.tsx +27 -11
  19. package/styled-components/es/examples/plasma_b2c/components/Radiobox/Radiobox.stories.tsx +42 -37
  20. package/styled-components/es/examples/plasma_web/components/Avatar/Avatar.stories.tsx +26 -1
  21. package/styled-components/es/examples/sds_engineer/components/Avatar/Avatar.stories.tsx +27 -1
  22. package/types/components/Avatar/Avatar.d.ts +3 -1
  23. package/types/components/Avatar/Avatar.d.ts.map +1 -1
  24. package/types/components/Avatar/Avatar.types.d.ts +7 -0
  25. package/types/components/Avatar/Avatar.types.d.ts.map +1 -1
  26. package/types/examples/plasma_b2c/components/Avatar/Avatar.d.ts +2 -0
  27. package/types/examples/plasma_b2c/components/Avatar/Avatar.d.ts.map +1 -1
  28. package/types/examples/plasma_web/components/Avatar/Avatar.d.ts +2 -0
  29. package/types/examples/plasma_web/components/Avatar/Avatar.d.ts.map +1 -1
  30. package/types/examples/sds_engineer/components/Avatar/Avatar.d.ts +1 -0
  31. package/types/examples/sds_engineer/components/Avatar/Avatar.d.ts.map +1 -1
@@ -30,10 +30,36 @@ export const Default: Story = {
30
30
  export const Accessibility: Story = {
31
31
  args: {
32
32
  role: 'button',
33
+ name: 'Геннадий Силуянович',
33
34
  tabIndex: 0,
34
35
  view: 'default',
35
36
  size: 'xxl',
36
- name: 'Иван Фадеев',
37
+ status: 'active',
38
+ focused: true,
39
+ },
40
+ };
41
+
42
+ export const AccessibilityWithURL: Story = {
43
+ args: {
44
+ role: 'button',
45
+ tabIndex: 0,
46
+ view: 'default',
47
+ size: 'xxl',
48
+ status: 'active',
49
+ focused: true,
50
+ name: 'Микула Селянинович',
51
+ url: 'https://avatars.githubusercontent.com/u/1813468?v=4',
52
+ },
53
+ };
54
+
55
+ export const AccessibilityWithCustomText: Story = {
56
+ args: {
57
+ role: 'button',
58
+ tabIndex: 0,
59
+ view: 'default',
60
+ size: 'xxl',
61
+ status: 'inactive',
37
62
  focused: true,
63
+ customText: 'ФИО',
38
64
  },
39
65
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { RootProps } from '../../engines';
3
- import { AvatarProps } from './Avatar.types';
3
+ import type { AvatarProps, StatusLabels } from './Avatar.types';
4
4
  export declare const avatarRoot: (Root: RootProps<HTMLDivElement, AvatarProps>) => React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
5
5
  size: "m" | "s" | "l" | "xxl" | "fit";
6
6
  name?: string | undefined;
@@ -9,6 +9,7 @@ export declare const avatarRoot: (Root: RootProps<HTMLDivElement, AvatarProps>)
9
9
  status?: "active" | "inactive" | undefined;
10
10
  isScalable?: boolean | undefined;
11
11
  focused?: boolean | undefined;
12
+ statusLabels?: StatusLabels | undefined;
12
13
  } & React.RefAttributes<HTMLDivElement>>;
13
14
  export declare const avatarConfig: {
14
15
  name: string;
@@ -21,6 +22,7 @@ export declare const avatarConfig: {
21
22
  status?: "active" | "inactive" | undefined;
22
23
  isScalable?: boolean | undefined;
23
24
  focused?: boolean | undefined;
25
+ statusLabels?: StatusLabels | undefined;
24
26
  } & React.RefAttributes<HTMLDivElement>>;
25
27
  base: import("@linaria/core").LinariaClassName;
26
28
  variations: {
@@ -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;AAMlE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAiC7C,eAAO,MAAM,UAAU,SAAU,UAAU,cAAc,EAAE,WAAW,CAAC;;;;;;;;wCA4BtE,CAAC;AAEF,eAAO,MAAM,YAAY;;;mBA9BQ,UAAU,cAAc,EAAE,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;CA8CtE,CAAC"}
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,7 +7,14 @@ declare type CustomAvatarProps = {
7
7
  status?: 'active' | 'inactive';
8
8
  isScalable?: boolean;
9
9
  focused?: boolean;
10
+ /**
11
+ * Словарь для озвучивания значений свойства status [a11y]
12
+ * @default
13
+ * { active: 'Активен', inactive: 'Неактивен' }
14
+ */
15
+ statusLabels?: StatusLabels;
10
16
  };
17
+ export declare type StatusLabels = Record<'active' | 'inactive', string>;
11
18
  export declare type AvatarProps = HTMLAttributes<HTMLDivElement> & CustomAvatarProps;
12
19
  export {};
13
20
  //# sourceMappingURL=Avatar.types.d.ts.map
@@ -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,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;CACrB,CAAC;AAEF,oBAAY,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG,iBAAiB,CAAC"}
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"}
@@ -35,6 +35,7 @@ export declare const mergedConfig: import("../../../../engines").ComponentConfig
35
35
  status?: "active" | "inactive" | undefined;
36
36
  isScalable?: boolean | undefined;
37
37
  focused?: boolean | undefined;
38
+ statusLabels?: import("../../../../components/Avatar/Avatar.types").StatusLabels | undefined;
38
39
  } & import("react").RefAttributes<HTMLDivElement>>;
39
40
  export declare const Avatar: import("react").FunctionComponent<import("../../../../engines/types").PropsType<{
40
41
  view: {
@@ -58,5 +59,6 @@ export declare const Avatar: import("react").FunctionComponent<import("../../../
58
59
  status?: "active" | "inactive" | undefined;
59
60
  isScalable?: boolean | undefined;
60
61
  focused?: boolean | undefined;
62
+ statusLabels?: import("../../../../components/Avatar/Avatar.types").StatusLabels | undefined;
61
63
  } & import("react").RefAttributes<HTMLDivElement>>;
62
64
  //# sourceMappingURL=Avatar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Avatar/Avatar.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAAoC,CAAC;AAE9D,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;kDAA0B,CAAC"}
1
+ {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Avatar/Avatar.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAAoC,CAAC;AAE9D,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;kDAA0B,CAAC"}
@@ -35,6 +35,7 @@ export declare const mergedConfig: import("../../../../engines").ComponentConfig
35
35
  status?: "active" | "inactive" | undefined;
36
36
  isScalable?: boolean | undefined;
37
37
  focused?: boolean | undefined;
38
+ statusLabels?: import("../../../../components/Avatar/Avatar.types").StatusLabels | undefined;
38
39
  } & import("react").RefAttributes<HTMLDivElement>>;
39
40
  export declare const Avatar: import("react").FunctionComponent<import("../../../../engines/types").PropsType<{
40
41
  view: {
@@ -58,5 +59,6 @@ export declare const Avatar: import("react").FunctionComponent<import("../../../
58
59
  status?: "active" | "inactive" | undefined;
59
60
  isScalable?: boolean | undefined;
60
61
  focused?: boolean | undefined;
62
+ statusLabels?: import("../../../../components/Avatar/Avatar.types").StatusLabels | undefined;
61
63
  } & import("react").RefAttributes<HTMLDivElement>>;
62
64
  //# sourceMappingURL=Avatar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Avatar/Avatar.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAAoC,CAAC;AAE9D,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;kDAA0B,CAAC"}
1
+ {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Avatar/Avatar.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAAoC,CAAC;AAE9D,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;kDAA0B,CAAC"}
@@ -21,5 +21,6 @@ export declare const Avatar: import("react").FunctionComponent<import("../../../
21
21
  status?: "active" | "inactive" | undefined;
22
22
  isScalable?: boolean | undefined;
23
23
  focused?: boolean | undefined;
24
+ statusLabels?: import("../../../../components/Avatar/Avatar.types").StatusLabels | undefined;
24
25
  } & import("react").RefAttributes<HTMLDivElement>>;
25
26
  //# sourceMappingURL=Avatar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../src/examples/sds_engineer/components/Avatar/Avatar.tsx"],"names":[],"mappings":";AAOA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;kDAA0B,CAAC"}
1
+ {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../src/examples/sds_engineer/components/Avatar/Avatar.tsx"],"names":[],"mappings":";AAOA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;kDAA0B,CAAC"}