@salutejs/plasma-new-hope 0.77.3-canary.1204.8986491983.0 → 0.77.3-canary.1204.8987017168.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-new-hope",
3
- "version": "0.77.3-canary.1204.8986491983.0",
3
+ "version": "0.77.3-canary.1204.8987017168.0",
4
4
  "description": "Salute Design System blueprint",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",
@@ -102,5 +102,5 @@
102
102
  "react-popper": "2.3.0",
103
103
  "storeon": "3.1.5"
104
104
  },
105
- "gitHead": "70a02947265c91d9b6073a02145f4e8a1618883b"
105
+ "gitHead": "2adc27c3c18c0a45358b43941c102ddc4b79f26f"
106
106
  }
@@ -1,71 +0,0 @@
1
- import React, { ComponentProps } from 'react';
2
- import type { StoryObj, Meta } from '@storybook/react';
3
- import { disableProps } from '@salutejs/plasma-sb-utils';
4
-
5
- import { iconButtonConfig } from '../../../../components/IconButton';
6
- import { mergeConfig } from '../../../../engines';
7
- import { WithTheme, argTypesFromConfig } from '../../../_helpers';
8
- import { IconChevronLeft } from '../../../../components/_Icon';
9
-
10
- import { config } from './IconButton.config';
11
- import { IconButton } from './IconButton';
12
-
13
- const meta: Meta<typeof IconButton> = {
14
- title: 'plasma_b2c/IconButton',
15
- decorators: [WithTheme],
16
- component: IconButton,
17
- argTypes: {
18
- ...argTypesFromConfig(mergeConfig(iconButtonConfig, config)),
19
- pin: {
20
- options: [
21
- 'square-square',
22
- 'square-clear',
23
- 'clear-square',
24
- 'clear-clear',
25
- 'clear-circle',
26
- 'circle-clear',
27
- 'circle-circle',
28
- '',
29
- ],
30
- control: {
31
- type: 'select',
32
- },
33
- table: { defaultValue: { summary: 'bottom' } },
34
- },
35
- },
36
- };
37
-
38
- export default meta;
39
-
40
- const getSizeForIcon = (size) => {
41
- const map = {
42
- mr: 's',
43
- lr: 's',
44
- m: 's',
45
- l: 's',
46
- sr: 's',
47
- xsr: 'xs',
48
- };
49
- if (map[size]) {
50
- return map[size];
51
- }
52
-
53
- return size;
54
- };
55
-
56
- export const Default: StoryObj<ComponentProps<typeof IconButton>> = {
57
- args: {
58
- children: <IconChevronLeft />,
59
- view: 'default',
60
- size: 'm',
61
- disabled: false,
62
- focused: true,
63
- isLoading: false,
64
- },
65
- argTypes: { ...disableProps(['children']) },
66
- render: (args) => (
67
- <IconButton {...args}>
68
- <IconChevronLeft size={getSizeForIcon(args.size)} />
69
- </IconButton>
70
- ),
71
- };
@@ -1,71 +0,0 @@
1
- import React, { ComponentProps } from 'react';
2
- import type { StoryObj, Meta } from '@storybook/react';
3
- import { disableProps } from '@salutejs/plasma-sb-utils';
4
-
5
- import { iconButtonConfig } from '../../../../components/IconButton';
6
- import { mergeConfig } from '../../../../engines';
7
- import { WithTheme, argTypesFromConfig } from '../../../_helpers';
8
- import { IconChevronLeft } from '../../../../components/_Icon';
9
-
10
- import { config } from './IconButton.config';
11
- import { IconButton } from './IconButton';
12
-
13
- const meta: Meta<typeof IconButton> = {
14
- title: 'plasma_b2c/IconButton',
15
- decorators: [WithTheme],
16
- component: IconButton,
17
- argTypes: {
18
- ...argTypesFromConfig(mergeConfig(iconButtonConfig, config)),
19
- pin: {
20
- options: [
21
- 'square-square',
22
- 'square-clear',
23
- 'clear-square',
24
- 'clear-clear',
25
- 'clear-circle',
26
- 'circle-clear',
27
- 'circle-circle',
28
- '',
29
- ],
30
- control: {
31
- type: 'select',
32
- },
33
- table: { defaultValue: { summary: 'bottom' } },
34
- },
35
- },
36
- };
37
-
38
- export default meta;
39
-
40
- const getSizeForIcon = (size) => {
41
- const map = {
42
- mr: 's',
43
- lr: 's',
44
- m: 's',
45
- l: 's',
46
- sr: 's',
47
- xsr: 'xs',
48
- };
49
- if (map[size]) {
50
- return map[size];
51
- }
52
-
53
- return size;
54
- };
55
-
56
- export const Default: StoryObj<ComponentProps<typeof IconButton>> = {
57
- args: {
58
- children: <IconChevronLeft />,
59
- view: 'default',
60
- size: 'm',
61
- disabled: false,
62
- focused: true,
63
- isLoading: false,
64
- },
65
- argTypes: { ...disableProps(['children']) },
66
- render: (args) => (
67
- <IconButton {...args}>
68
- <IconChevronLeft size={getSizeForIcon(args.size)} />
69
- </IconButton>
70
- ),
71
- };