@salutejs/plasma-new-hope 0.149.0-canary.1445.10940405865.0 → 0.149.0-canary.1445.10942800137.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,15 +21,13 @@ const meta: Meta<typeof ChipGroup> = {
21
21
  argTypes: {
22
22
  size: {
23
23
  options: sizes,
24
- control: {
25
- type: 'select',
26
- },
24
+ control: { type: 'select' },
25
+ if: { arg: 'isCommonChipStyles', truthy: true },
27
26
  },
28
27
  view: {
29
28
  options: views,
30
- control: {
31
- type: 'select',
32
- },
29
+ control: { type: 'select' },
30
+ if: { arg: 'isCommonChipStyles', truthy: true },
33
31
  },
34
32
  gap: {
35
33
  options: gapValues,
@@ -44,11 +42,15 @@ export default meta;
44
42
 
45
43
  export const Default: Story = {
46
44
  args: {
47
- view: 'default',
48
- size: 'm',
49
- gap: 'dense',
50
45
  itemsCount: 5,
46
+ gap: 'dense',
51
47
  isWrapped: false,
48
+ view: 'default',
49
+ size: 'm',
50
+ isCommonChipStyles: true,
51
+ },
52
+ argTypes: {
53
+ ...disableProps(['isCommonChipStyles']),
52
54
  },
53
55
  render: ({ itemsCount, ...args }: StoryProps) => {
54
56
  return (
@@ -56,7 +58,7 @@ export const Default: Story = {
56
58
  {Array(itemsCount)
57
59
  .fill(true)
58
60
  .map((_, i) => (
59
- <Chip text={`Chip ${i}`} key={`chip_${i}`} />
61
+ <Chip text={`Chip ${i}`} key={`chip_${i}`} hasClear={false} />
60
62
  ))}
61
63
  </ChipGroup>
62
64
  );
@@ -76,16 +78,16 @@ export const CustomChips: Story = {
76
78
  <>
77
79
  <h3>Группа Chip с разными темами</h3>
78
80
  <ChipGroup {...args}>
79
- <Chip text="Primary" view="default" />
80
- <Chip text="Secondary" view="secondary" />
81
- <Chip text="Accent" view="accent" />
81
+ <Chip text="Primary" view="default" hasClear={false} />
82
+ <Chip text="Secondary" view="secondary" hasClear={false} />
83
+ <Chip text="Accent" view="accent" hasClear={false} />
82
84
  </ChipGroup>
83
85
 
84
86
  <h3>Группа Chip с разными размерами</h3>
85
87
  <ChipGroup {...args}>
86
- <Chip text="Primary" view="default" size="l" />
87
- <Chip text="Secondary" view="secondary" size="m" />
88
- <Chip text="Accent" view="accent" size="s" />
88
+ <Chip text="Primary" view="default" size="l" hasClear={false} />
89
+ <Chip text="Secondary" view="secondary" size="m" hasClear={false} />
90
+ <Chip text="Accent" view="accent" size="s" hasClear={false} />
89
91
  </ChipGroup>
90
92
  </>
91
93
  );
@@ -21,15 +21,13 @@ const meta: Meta<typeof ChipGroup> = {
21
21
  argTypes: {
22
22
  size: {
23
23
  options: sizes,
24
- control: {
25
- type: 'select',
26
- },
24
+ control: { type: 'select' },
25
+ if: { arg: 'isCommonChipStyles', truthy: true },
27
26
  },
28
27
  view: {
29
28
  options: views,
30
- control: {
31
- type: 'select',
32
- },
29
+ control: { type: 'select' },
30
+ if: { arg: 'isCommonChipStyles', truthy: true },
33
31
  },
34
32
  gap: {
35
33
  options: gapValues,
@@ -44,11 +42,15 @@ export default meta;
44
42
 
45
43
  export const Default: Story = {
46
44
  args: {
47
- view: 'default',
48
- size: 'm',
49
- gap: 'dense',
50
45
  itemsCount: 5,
46
+ gap: 'dense',
51
47
  isWrapped: false,
48
+ view: 'default',
49
+ size: 'm',
50
+ isCommonChipStyles: true,
51
+ },
52
+ argTypes: {
53
+ ...disableProps(['isCommonChipStyles']),
52
54
  },
53
55
  render: ({ itemsCount, ...args }: StoryProps) => {
54
56
  return (
@@ -56,7 +58,7 @@ export const Default: Story = {
56
58
  {Array(itemsCount)
57
59
  .fill(true)
58
60
  .map((_, i) => (
59
- <Chip text={`Chip ${i}`} key={`chip_${i}`} />
61
+ <Chip text={`Chip ${i}`} key={`chip_${i}`} hasClear={false} />
60
62
  ))}
61
63
  </ChipGroup>
62
64
  );
@@ -76,16 +78,16 @@ export const CustomChips: Story = {
76
78
  <>
77
79
  <h3>Группа Chip с разными темами</h3>
78
80
  <ChipGroup {...args}>
79
- <Chip text="Primary" view="default" />
80
- <Chip text="Secondary" view="secondary" />
81
- <Chip text="Accent" view="accent" />
81
+ <Chip text="Primary" view="default" hasClear={false} />
82
+ <Chip text="Secondary" view="secondary" hasClear={false} />
83
+ <Chip text="Accent" view="accent" hasClear={false} />
82
84
  </ChipGroup>
83
85
 
84
86
  <h3>Группа Chip с разными размерами</h3>
85
87
  <ChipGroup {...args}>
86
- <Chip text="Primary" view="default" size="l" />
87
- <Chip text="Secondary" view="secondary" size="m" />
88
- <Chip text="Accent" view="accent" size="s" />
88
+ <Chip text="Primary" view="default" size="l" hasClear={false} />
89
+ <Chip text="Secondary" view="secondary" size="m" hasClear={false} />
90
+ <Chip text="Accent" view="accent" size="s" hasClear={false} />
89
91
  </ChipGroup>
90
92
  </>
91
93
  );
@@ -21,15 +21,13 @@ const meta: Meta<typeof ChipGroup> = {
21
21
  argTypes: {
22
22
  size: {
23
23
  options: sizes,
24
- control: {
25
- type: 'select',
26
- },
24
+ control: { type: 'select' },
25
+ if: { arg: 'isCommonChipStyles', truthy: true },
27
26
  },
28
27
  view: {
29
28
  options: views,
30
- control: {
31
- type: 'select',
32
- },
29
+ control: { type: 'select' },
30
+ if: { arg: 'isCommonChipStyles', truthy: true },
33
31
  },
34
32
  gap: {
35
33
  options: gapValues,
@@ -44,11 +42,15 @@ export default meta;
44
42
 
45
43
  export const Default: Story = {
46
44
  args: {
47
- view: 'default',
48
- size: 'm',
49
- gap: 'dense',
50
45
  itemsCount: 5,
46
+ gap: 'dense',
51
47
  isWrapped: false,
48
+ view: 'default',
49
+ size: 'm',
50
+ isCommonChipStyles: true,
51
+ },
52
+ argTypes: {
53
+ ...disableProps(['isCommonChipStyles']),
52
54
  },
53
55
  render: ({ itemsCount, ...args }: StoryProps) => {
54
56
  return (
@@ -56,7 +58,7 @@ export const Default: Story = {
56
58
  {Array(itemsCount)
57
59
  .fill(true)
58
60
  .map((_, i) => (
59
- <Chip text={`Chip ${i}`} key={`chip_${i}`} />
61
+ <Chip text={`Chip ${i}`} key={`chip_${i}`} hasClear={false} />
60
62
  ))}
61
63
  </ChipGroup>
62
64
  );
@@ -76,16 +78,16 @@ export const CustomChips: Story = {
76
78
  <>
77
79
  <h3>Группа Chip с разными темами</h3>
78
80
  <ChipGroup {...args}>
79
- <Chip text="Primary" view="default" />
80
- <Chip text="Secondary" view="secondary" />
81
- <Chip text="Accent" view="accent" />
81
+ <Chip text="Primary" view="default" hasClear={false} />
82
+ <Chip text="Secondary" view="secondary" hasClear={false} />
83
+ <Chip text="Accent" view="accent" hasClear={false} />
82
84
  </ChipGroup>
83
85
 
84
86
  <h3>Группа Chip с разными размерами</h3>
85
87
  <ChipGroup {...args}>
86
- <Chip text="Primary" view="default" size="l" />
87
- <Chip text="Secondary" view="secondary" size="m" />
88
- <Chip text="Accent" view="accent" size="s" />
88
+ <Chip text="Primary" view="default" size="l" hasClear={false} />
89
+ <Chip text="Secondary" view="secondary" size="m" hasClear={false} />
90
+ <Chip text="Accent" view="accent" size="s" hasClear={false} />
89
91
  </ChipGroup>
90
92
  </>
91
93
  );
@@ -21,15 +21,13 @@ const meta: Meta<typeof ChipGroup> = {
21
21
  argTypes: {
22
22
  size: {
23
23
  options: sizes,
24
- control: {
25
- type: 'select',
26
- },
24
+ control: { type: 'select' },
25
+ if: { arg: 'isCommonChipStyles', truthy: true },
27
26
  },
28
27
  view: {
29
28
  options: views,
30
- control: {
31
- type: 'select',
32
- },
29
+ control: { type: 'select' },
30
+ if: { arg: 'isCommonChipStyles', truthy: true },
33
31
  },
34
32
  gap: {
35
33
  options: gapValues,
@@ -44,11 +42,15 @@ export default meta;
44
42
 
45
43
  export const Default: Story = {
46
44
  args: {
47
- view: 'default',
48
- size: 'm',
49
- gap: 'dense',
50
45
  itemsCount: 5,
46
+ gap: 'dense',
51
47
  isWrapped: false,
48
+ view: 'default',
49
+ size: 'm',
50
+ isCommonChipStyles: true,
51
+ },
52
+ argTypes: {
53
+ ...disableProps(['isCommonChipStyles']),
52
54
  },
53
55
  render: ({ itemsCount, ...args }: StoryProps) => {
54
56
  return (
@@ -56,7 +58,7 @@ export const Default: Story = {
56
58
  {Array(itemsCount)
57
59
  .fill(true)
58
60
  .map((_, i) => (
59
- <Chip text={`Chip ${i}`} key={`chip_${i}`} />
61
+ <Chip text={`Chip ${i}`} key={`chip_${i}`} hasClear={false} />
60
62
  ))}
61
63
  </ChipGroup>
62
64
  );
@@ -76,16 +78,16 @@ export const CustomChips: Story = {
76
78
  <>
77
79
  <h3>Группа Chip с разными темами</h3>
78
80
  <ChipGroup {...args}>
79
- <Chip text="Primary" view="default" />
80
- <Chip text="Secondary" view="secondary" />
81
- <Chip text="Accent" view="accent" />
81
+ <Chip text="Primary" view="default" hasClear={false} />
82
+ <Chip text="Secondary" view="secondary" hasClear={false} />
83
+ <Chip text="Accent" view="accent" hasClear={false} />
82
84
  </ChipGroup>
83
85
 
84
86
  <h3>Группа Chip с разными размерами</h3>
85
87
  <ChipGroup {...args}>
86
- <Chip text="Primary" view="default" size="l" />
87
- <Chip text="Secondary" view="secondary" size="m" />
88
- <Chip text="Accent" view="accent" size="s" />
88
+ <Chip text="Primary" view="default" size="l" hasClear={false} />
89
+ <Chip text="Secondary" view="secondary" size="m" hasClear={false} />
90
+ <Chip text="Accent" view="accent" size="s" hasClear={false} />
89
91
  </ChipGroup>
90
92
  </>
91
93
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-new-hope",
3
- "version": "0.149.0-canary.1445.10940405865.0",
3
+ "version": "0.149.0-canary.1445.10942800137.0",
4
4
  "description": "Salute Design System blueprint",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",
@@ -121,5 +121,5 @@
121
121
  "react-popper": "2.3.0",
122
122
  "storeon": "3.1.5"
123
123
  },
124
- "gitHead": "7c7db0da0b259066cf1503c5310f7e77e28a8160"
124
+ "gitHead": "061ebf55b080b24b24e57b4ee233b2edf24b18cd"
125
125
  }
@@ -21,15 +21,13 @@ const meta: Meta<typeof ChipGroup> = {
21
21
  argTypes: {
22
22
  size: {
23
23
  options: sizes,
24
- control: {
25
- type: 'select',
26
- },
24
+ control: { type: 'select' },
25
+ if: { arg: 'isCommonChipStyles', truthy: true },
27
26
  },
28
27
  view: {
29
28
  options: views,
30
- control: {
31
- type: 'select',
32
- },
29
+ control: { type: 'select' },
30
+ if: { arg: 'isCommonChipStyles', truthy: true },
33
31
  },
34
32
  gap: {
35
33
  options: gapValues,
@@ -44,11 +42,15 @@ export default meta;
44
42
 
45
43
  export const Default: Story = {
46
44
  args: {
47
- view: 'default',
48
- size: 'm',
49
- gap: 'dense',
50
45
  itemsCount: 5,
46
+ gap: 'dense',
51
47
  isWrapped: false,
48
+ view: 'default',
49
+ size: 'm',
50
+ isCommonChipStyles: true,
51
+ },
52
+ argTypes: {
53
+ ...disableProps(['isCommonChipStyles']),
52
54
  },
53
55
  render: ({ itemsCount, ...args }: StoryProps) => {
54
56
  return (
@@ -56,7 +58,7 @@ export const Default: Story = {
56
58
  {Array(itemsCount)
57
59
  .fill(true)
58
60
  .map((_, i) => (
59
- <Chip text={`Chip ${i}`} key={`chip_${i}`} />
61
+ <Chip text={`Chip ${i}`} key={`chip_${i}`} hasClear={false} />
60
62
  ))}
61
63
  </ChipGroup>
62
64
  );
@@ -76,16 +78,16 @@ export const CustomChips: Story = {
76
78
  <>
77
79
  <h3>Группа Chip с разными темами</h3>
78
80
  <ChipGroup {...args}>
79
- <Chip text="Primary" view="default" />
80
- <Chip text="Secondary" view="secondary" />
81
- <Chip text="Accent" view="accent" />
81
+ <Chip text="Primary" view="default" hasClear={false} />
82
+ <Chip text="Secondary" view="secondary" hasClear={false} />
83
+ <Chip text="Accent" view="accent" hasClear={false} />
82
84
  </ChipGroup>
83
85
 
84
86
  <h3>Группа Chip с разными размерами</h3>
85
87
  <ChipGroup {...args}>
86
- <Chip text="Primary" view="default" size="l" />
87
- <Chip text="Secondary" view="secondary" size="m" />
88
- <Chip text="Accent" view="accent" size="s" />
88
+ <Chip text="Primary" view="default" size="l" hasClear={false} />
89
+ <Chip text="Secondary" view="secondary" size="m" hasClear={false} />
90
+ <Chip text="Accent" view="accent" size="s" hasClear={false} />
89
91
  </ChipGroup>
90
92
  </>
91
93
  );
@@ -21,15 +21,13 @@ const meta: Meta<typeof ChipGroup> = {
21
21
  argTypes: {
22
22
  size: {
23
23
  options: sizes,
24
- control: {
25
- type: 'select',
26
- },
24
+ control: { type: 'select' },
25
+ if: { arg: 'isCommonChipStyles', truthy: true },
27
26
  },
28
27
  view: {
29
28
  options: views,
30
- control: {
31
- type: 'select',
32
- },
29
+ control: { type: 'select' },
30
+ if: { arg: 'isCommonChipStyles', truthy: true },
33
31
  },
34
32
  gap: {
35
33
  options: gapValues,
@@ -44,11 +42,15 @@ export default meta;
44
42
 
45
43
  export const Default: Story = {
46
44
  args: {
47
- view: 'default',
48
- size: 'm',
49
- gap: 'dense',
50
45
  itemsCount: 5,
46
+ gap: 'dense',
51
47
  isWrapped: false,
48
+ view: 'default',
49
+ size: 'm',
50
+ isCommonChipStyles: true,
51
+ },
52
+ argTypes: {
53
+ ...disableProps(['isCommonChipStyles']),
52
54
  },
53
55
  render: ({ itemsCount, ...args }: StoryProps) => {
54
56
  return (
@@ -56,7 +58,7 @@ export const Default: Story = {
56
58
  {Array(itemsCount)
57
59
  .fill(true)
58
60
  .map((_, i) => (
59
- <Chip text={`Chip ${i}`} key={`chip_${i}`} />
61
+ <Chip text={`Chip ${i}`} key={`chip_${i}`} hasClear={false} />
60
62
  ))}
61
63
  </ChipGroup>
62
64
  );
@@ -76,16 +78,16 @@ export const CustomChips: Story = {
76
78
  <>
77
79
  <h3>Группа Chip с разными темами</h3>
78
80
  <ChipGroup {...args}>
79
- <Chip text="Primary" view="default" />
80
- <Chip text="Secondary" view="secondary" />
81
- <Chip text="Accent" view="accent" />
81
+ <Chip text="Primary" view="default" hasClear={false} />
82
+ <Chip text="Secondary" view="secondary" hasClear={false} />
83
+ <Chip text="Accent" view="accent" hasClear={false} />
82
84
  </ChipGroup>
83
85
 
84
86
  <h3>Группа Chip с разными размерами</h3>
85
87
  <ChipGroup {...args}>
86
- <Chip text="Primary" view="default" size="l" />
87
- <Chip text="Secondary" view="secondary" size="m" />
88
- <Chip text="Accent" view="accent" size="s" />
88
+ <Chip text="Primary" view="default" size="l" hasClear={false} />
89
+ <Chip text="Secondary" view="secondary" size="m" hasClear={false} />
90
+ <Chip text="Accent" view="accent" size="s" hasClear={false} />
89
91
  </ChipGroup>
90
92
  </>
91
93
  );
@@ -21,15 +21,13 @@ const meta: Meta<typeof ChipGroup> = {
21
21
  argTypes: {
22
22
  size: {
23
23
  options: sizes,
24
- control: {
25
- type: 'select',
26
- },
24
+ control: { type: 'select' },
25
+ if: { arg: 'isCommonChipStyles', truthy: true },
27
26
  },
28
27
  view: {
29
28
  options: views,
30
- control: {
31
- type: 'select',
32
- },
29
+ control: { type: 'select' },
30
+ if: { arg: 'isCommonChipStyles', truthy: true },
33
31
  },
34
32
  gap: {
35
33
  options: gapValues,
@@ -44,11 +42,15 @@ export default meta;
44
42
 
45
43
  export const Default: Story = {
46
44
  args: {
47
- view: 'default',
48
- size: 'm',
49
- gap: 'dense',
50
45
  itemsCount: 5,
46
+ gap: 'dense',
51
47
  isWrapped: false,
48
+ view: 'default',
49
+ size: 'm',
50
+ isCommonChipStyles: true,
51
+ },
52
+ argTypes: {
53
+ ...disableProps(['isCommonChipStyles']),
52
54
  },
53
55
  render: ({ itemsCount, ...args }: StoryProps) => {
54
56
  return (
@@ -56,7 +58,7 @@ export const Default: Story = {
56
58
  {Array(itemsCount)
57
59
  .fill(true)
58
60
  .map((_, i) => (
59
- <Chip text={`Chip ${i}`} key={`chip_${i}`} />
61
+ <Chip text={`Chip ${i}`} key={`chip_${i}`} hasClear={false} />
60
62
  ))}
61
63
  </ChipGroup>
62
64
  );
@@ -76,16 +78,16 @@ export const CustomChips: Story = {
76
78
  <>
77
79
  <h3>Группа Chip с разными темами</h3>
78
80
  <ChipGroup {...args}>
79
- <Chip text="Primary" view="default" />
80
- <Chip text="Secondary" view="secondary" />
81
- <Chip text="Accent" view="accent" />
81
+ <Chip text="Primary" view="default" hasClear={false} />
82
+ <Chip text="Secondary" view="secondary" hasClear={false} />
83
+ <Chip text="Accent" view="accent" hasClear={false} />
82
84
  </ChipGroup>
83
85
 
84
86
  <h3>Группа Chip с разными размерами</h3>
85
87
  <ChipGroup {...args}>
86
- <Chip text="Primary" view="default" size="l" />
87
- <Chip text="Secondary" view="secondary" size="m" />
88
- <Chip text="Accent" view="accent" size="s" />
88
+ <Chip text="Primary" view="default" size="l" hasClear={false} />
89
+ <Chip text="Secondary" view="secondary" size="m" hasClear={false} />
90
+ <Chip text="Accent" view="accent" size="s" hasClear={false} />
89
91
  </ChipGroup>
90
92
  </>
91
93
  );
@@ -21,15 +21,13 @@ const meta: Meta<typeof ChipGroup> = {
21
21
  argTypes: {
22
22
  size: {
23
23
  options: sizes,
24
- control: {
25
- type: 'select',
26
- },
24
+ control: { type: 'select' },
25
+ if: { arg: 'isCommonChipStyles', truthy: true },
27
26
  },
28
27
  view: {
29
28
  options: views,
30
- control: {
31
- type: 'select',
32
- },
29
+ control: { type: 'select' },
30
+ if: { arg: 'isCommonChipStyles', truthy: true },
33
31
  },
34
32
  gap: {
35
33
  options: gapValues,
@@ -44,11 +42,15 @@ export default meta;
44
42
 
45
43
  export const Default: Story = {
46
44
  args: {
47
- view: 'default',
48
- size: 'm',
49
- gap: 'dense',
50
45
  itemsCount: 5,
46
+ gap: 'dense',
51
47
  isWrapped: false,
48
+ view: 'default',
49
+ size: 'm',
50
+ isCommonChipStyles: true,
51
+ },
52
+ argTypes: {
53
+ ...disableProps(['isCommonChipStyles']),
52
54
  },
53
55
  render: ({ itemsCount, ...args }: StoryProps) => {
54
56
  return (
@@ -56,7 +58,7 @@ export const Default: Story = {
56
58
  {Array(itemsCount)
57
59
  .fill(true)
58
60
  .map((_, i) => (
59
- <Chip text={`Chip ${i}`} key={`chip_${i}`} />
61
+ <Chip text={`Chip ${i}`} key={`chip_${i}`} hasClear={false} />
60
62
  ))}
61
63
  </ChipGroup>
62
64
  );
@@ -76,16 +78,16 @@ export const CustomChips: Story = {
76
78
  <>
77
79
  <h3>Группа Chip с разными темами</h3>
78
80
  <ChipGroup {...args}>
79
- <Chip text="Primary" view="default" />
80
- <Chip text="Secondary" view="secondary" />
81
- <Chip text="Accent" view="accent" />
81
+ <Chip text="Primary" view="default" hasClear={false} />
82
+ <Chip text="Secondary" view="secondary" hasClear={false} />
83
+ <Chip text="Accent" view="accent" hasClear={false} />
82
84
  </ChipGroup>
83
85
 
84
86
  <h3>Группа Chip с разными размерами</h3>
85
87
  <ChipGroup {...args}>
86
- <Chip text="Primary" view="default" size="l" />
87
- <Chip text="Secondary" view="secondary" size="m" />
88
- <Chip text="Accent" view="accent" size="s" />
88
+ <Chip text="Primary" view="default" size="l" hasClear={false} />
89
+ <Chip text="Secondary" view="secondary" size="m" hasClear={false} />
90
+ <Chip text="Accent" view="accent" size="s" hasClear={false} />
89
91
  </ChipGroup>
90
92
  </>
91
93
  );