@salutejs/plasma-new-hope 0.186.0-canary.1542.11716355955.0 → 0.186.0-canary.1546.11723696357.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Badge/Badge.css +4 -4
- package/cjs/components/Badge/Badge.js +16 -4
- package/cjs/components/Badge/Badge.js.map +1 -1
- package/cjs/components/Badge/Badge.tokens.js +10 -5
- package/cjs/components/Badge/Badge.tokens.js.map +1 -1
- package/cjs/components/Badge/variations/_clear/base.js +1 -1
- package/cjs/components/Badge/variations/_clear/base.js.map +1 -1
- package/cjs/components/Badge/variations/_clear/base_wiboj8.css +1 -0
- package/cjs/components/Badge/variations/_size/base.js +1 -1
- package/cjs/components/Badge/variations/_size/base.js.map +1 -1
- package/{es/components/Badge/variations/_size/base_to0y5x.css → cjs/components/Badge/variations/_size/base_rn38n6.css} +1 -1
- package/cjs/components/Badge/variations/_transparent/base.js +1 -1
- package/cjs/components/Badge/variations/_transparent/base.js.map +1 -1
- package/cjs/components/Badge/variations/_transparent/base_aapqhz.css +1 -0
- package/cjs/components/Badge/variations/_view/base.js +1 -1
- package/cjs/components/Badge/variations/_view/base.js.map +1 -1
- package/cjs/components/Badge/variations/_view/base_j3xzf3.css +1 -0
- package/cjs/index.css +4 -4
- package/cjs/index.js +0 -2
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/Badge/Badge.js +21 -4
- package/emotion/cjs/components/Badge/Badge.tokens.js +10 -6
- package/emotion/cjs/components/Badge/variations/_clear/base.js +1 -1
- package/emotion/cjs/components/Badge/variations/_size/base.js +2 -1
- package/emotion/cjs/components/Badge/variations/_transparent/base.js +1 -1
- package/emotion/cjs/components/Badge/variations/_view/base.js +1 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/index.js +1 -8
- package/emotion/cjs/components/Combobox/index.js +0 -6
- package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +14 -14
- package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +8 -2
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +2 -7
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +4 -62
- package/emotion/cjs/examples/plasma_web/components/Badge/Badge.config.js +14 -14
- package/emotion/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +8 -2
- package/emotion/es/components/Badge/Badge.js +23 -5
- package/emotion/es/components/Badge/Badge.tokens.js +9 -5
- package/emotion/es/components/Badge/variations/_clear/base.js +2 -2
- package/emotion/es/components/Badge/variations/_size/base.js +3 -2
- package/emotion/es/components/Badge/variations/_transparent/base.js +2 -2
- package/emotion/es/components/Badge/variations/_view/base.js +2 -2
- package/emotion/es/components/Combobox/ComboboxNew/index.js +1 -2
- package/emotion/es/components/Combobox/index.js +1 -1
- package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +14 -14
- package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +8 -2
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.js +2 -7
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +4 -62
- package/emotion/es/examples/plasma_web/components/Badge/Badge.config.js +14 -14
- package/emotion/es/examples/plasma_web/components/Badge/Badge.stories.tsx +8 -2
- package/es/components/Badge/Badge.css +4 -4
- package/es/components/Badge/Badge.js +19 -7
- package/es/components/Badge/Badge.js.map +1 -1
- package/es/components/Badge/Badge.tokens.js +10 -6
- package/es/components/Badge/Badge.tokens.js.map +1 -1
- package/es/components/Badge/variations/_clear/base.js +1 -1
- package/es/components/Badge/variations/_clear/base.js.map +1 -1
- package/es/components/Badge/variations/_clear/base_wiboj8.css +1 -0
- package/es/components/Badge/variations/_size/base.js +1 -1
- package/es/components/Badge/variations/_size/base.js.map +1 -1
- package/{cjs/components/Badge/variations/_size/base_to0y5x.css → es/components/Badge/variations/_size/base_rn38n6.css} +1 -1
- package/es/components/Badge/variations/_transparent/base.js +1 -1
- package/es/components/Badge/variations/_transparent/base.js.map +1 -1
- package/es/components/Badge/variations/_transparent/base_aapqhz.css +1 -0
- package/es/components/Badge/variations/_view/base.js +1 -1
- package/es/components/Badge/variations/_view/base.js.map +1 -1
- package/es/components/Badge/variations/_view/base_j3xzf3.css +1 -0
- package/es/index.css +4 -4
- package/es/index.js +0 -1
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Badge/Badge.js +21 -4
- package/styled-components/cjs/components/Badge/Badge.tokens.js +10 -6
- package/styled-components/cjs/components/Badge/variations/_clear/base.js +1 -1
- package/styled-components/cjs/components/Badge/variations/_size/base.js +2 -1
- package/styled-components/cjs/components/Badge/variations/_transparent/base.js +1 -1
- package/styled-components/cjs/components/Badge/variations/_view/base.js +1 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/index.js +1 -8
- package/styled-components/cjs/components/Combobox/index.js +0 -6
- package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +8 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +2 -7
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +4 -62
- package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.config.js +5 -5
- package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +8 -2
- package/styled-components/es/components/Badge/Badge.js +23 -5
- package/styled-components/es/components/Badge/Badge.tokens.js +9 -5
- package/styled-components/es/components/Badge/variations/_clear/base.js +2 -2
- package/styled-components/es/components/Badge/variations/_size/base.js +3 -2
- package/styled-components/es/components/Badge/variations/_transparent/base.js +2 -2
- package/styled-components/es/components/Badge/variations/_view/base.js +2 -2
- package/styled-components/es/components/Combobox/ComboboxNew/index.js +1 -2
- package/styled-components/es/components/Combobox/index.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
- package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +8 -2
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.js +2 -7
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +4 -62
- package/styled-components/es/examples/plasma_web/components/Badge/Badge.config.js +5 -5
- package/styled-components/es/examples/plasma_web/components/Badge/Badge.stories.tsx +8 -2
- package/types/components/Badge/Badge.d.ts.map +1 -1
- package/types/components/Badge/Badge.tokens.d.ts +8 -4
- package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
- package/types/components/Badge/Badge.types.d.ts +18 -5
- package/types/components/Badge/Badge.types.d.ts.map +1 -1
- package/types/components/Badge/variations/_clear/base.d.ts.map +1 -1
- package/types/components/Badge/variations/_size/base.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +0 -21
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/index.d.ts +0 -1
- package/types/components/Combobox/ComboboxNew/index.d.ts.map +1 -1
- package/types/components/Combobox/index.d.ts +1 -1
- package/types/components/Combobox/index.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +58 -4
- package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +2 -3
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Badge/Badge.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Badge/Badge.d.ts +58 -4
- package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
- package/cjs/components/Badge/variations/_clear/base_oopyb7.css +0 -1
- package/cjs/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
- package/cjs/components/Badge/variations/_view/base_qlxank.css +0 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +0 -22
- package/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js.map +0 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +0 -21
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/getForm.js +0 -90
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/syntheticEvent.js +0 -53
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.boundler.js +0 -14
- package/emotion/es/components/Combobox/ComboboxNew/utils/getForm.js +0 -83
- package/emotion/es/components/Combobox/ComboboxNew/utils/syntheticEvent.js +0 -47
- package/es/components/Badge/variations/_clear/base_oopyb7.css +0 -1
- package/es/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
- package/es/components/Badge/variations/_view/base_qlxank.css +0 -1
- package/es/components/Combobox/ComboboxNew/Combobox.boundler.js +0 -18
- package/es/components/Combobox/ComboboxNew/Combobox.boundler.js.map +0 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +0 -21
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/getForm.js +0 -90
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/syntheticEvent.js +0 -53
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.boundler.js +0 -14
- package/styled-components/es/components/Combobox/ComboboxNew/utils/getForm.js +0 -83
- package/styled-components/es/components/Combobox/ComboboxNew/utils/syntheticEvent.js +0 -47
- package/types/components/Combobox/ComboboxNew/Combobox.boundler.d.ts +0 -4
- package/types/components/Combobox/ComboboxNew/Combobox.boundler.d.ts.map +0 -1
- package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts +0 -4
- package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts.map +0 -1
- package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts +0 -4
- package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts.map +0 -1
@@ -31,6 +31,10 @@ const meta: Meta<typeof Badge> = {
|
|
31
31
|
control: { type: 'boolean' },
|
32
32
|
if: { arg: 'clear', truthy: false },
|
33
33
|
},
|
34
|
+
text: {
|
35
|
+
control: { type: 'text' },
|
36
|
+
if: { arg: 'enableText', truthy: true },
|
37
|
+
},
|
34
38
|
...disableProps(['contentLeft', 'contentRight']),
|
35
39
|
},
|
36
40
|
};
|
@@ -40,6 +44,7 @@ export default meta;
|
|
40
44
|
type StoryProps = ComponentProps<typeof Badge> & {
|
41
45
|
enableContentLeft: boolean;
|
42
46
|
enableContentRight: boolean;
|
47
|
+
enableText: boolean;
|
43
48
|
};
|
44
49
|
type Story = StoryObj<StoryProps>;
|
45
50
|
|
@@ -60,13 +65,14 @@ export const Default: Story = {
|
|
60
65
|
},
|
61
66
|
enableContentRight: {
|
62
67
|
control: { type: 'boolean' },
|
63
|
-
if: { arg: '
|
68
|
+
if: { arg: 'enableText', truthy: true },
|
64
69
|
},
|
65
70
|
},
|
66
71
|
args: {
|
67
|
-
text: 'Hello',
|
68
72
|
view: 'default',
|
69
73
|
size: 'm',
|
74
|
+
enableText: true,
|
75
|
+
text: 'Hello',
|
70
76
|
enableContentLeft: false,
|
71
77
|
enableContentRight: false,
|
72
78
|
clear: false,
|
@@ -1,12 +1,7 @@
|
|
1
1
|
import { component, mergeConfig } from '../../../../engines';
|
2
|
-
import { comboboxNewConfig
|
3
|
-
import { getFormComponentGenerator } from '../../../../components/Combobox/ComboboxNew/utils/getForm';
|
2
|
+
import { comboboxNewConfig } from '../../../..';
|
4
3
|
import { config } from './Combobox.config';
|
5
4
|
var mergedConfig = /*#__PURE__*/mergeConfig(comboboxNewConfig, config);
|
6
5
|
var ComboboxComponent = /*#__PURE__*/component(mergedConfig);
|
7
6
|
var Combobox = ComboboxComponent;
|
8
|
-
|
9
|
-
base: ComboboxComponent,
|
10
|
-
baseForm: /*#__PURE__*/getFormComponentGenerator(ComboboxComponent)
|
11
|
-
});
|
12
|
-
export { Combobox, ComboboxWithForm };
|
7
|
+
export { Combobox };
|
@@ -1,12 +1,11 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { useState } from 'react';
|
2
2
|
import type { ComponentProps } from 'react';
|
3
3
|
import type { Meta, StoryObj } from '@storybook/react';
|
4
4
|
|
5
5
|
import { WithTheme } from '../../../_helpers';
|
6
6
|
import { IconDone } from '../../../../components/_Icon';
|
7
|
-
import { createEvent } from '../../../../components/Combobox/ComboboxNew/utils/syntheticEvent';
|
8
7
|
|
9
|
-
import { Combobox
|
8
|
+
import { Combobox } from './Combobox';
|
10
9
|
|
11
10
|
type StorySelectProps = ComponentProps<typeof Combobox> & {
|
12
11
|
enableContentLeft?: boolean;
|
@@ -357,7 +356,7 @@ const SingleStory = (args: StorySelectProps) => {
|
|
357
356
|
|
358
357
|
return (
|
359
358
|
<div style={{ width: '400px' }}>
|
360
|
-
<
|
359
|
+
<Combobox
|
361
360
|
{...args}
|
362
361
|
items={items}
|
363
362
|
value={value}
|
@@ -368,24 +367,6 @@ const SingleStory = (args: StorySelectProps) => {
|
|
368
367
|
);
|
369
368
|
};
|
370
369
|
|
371
|
-
const SingleFormStory = (args: StorySelectProps) => {
|
372
|
-
const handleChange = (event) => {
|
373
|
-
console.log(event);
|
374
|
-
};
|
375
|
-
|
376
|
-
return (
|
377
|
-
<div style={{ width: '400px' }}>
|
378
|
-
<ComboboxWithForm
|
379
|
-
{...args}
|
380
|
-
items={items}
|
381
|
-
formType
|
382
|
-
onChange={handleChange}
|
383
|
-
contentLeft={args.enableContentLeft ? <IconDone size="s" /> : undefined}
|
384
|
-
/>
|
385
|
-
</div>
|
386
|
-
);
|
387
|
-
};
|
388
|
-
|
389
370
|
export const Single: StoryObj<StorySelectProps> = {
|
390
371
|
render: (args) => <SingleStory {...args} />,
|
391
372
|
args: {
|
@@ -398,27 +379,14 @@ export const Single: StoryObj<StorySelectProps> = {
|
|
398
379
|
},
|
399
380
|
};
|
400
381
|
|
401
|
-
export const SingleForm: StoryObj<StorySelectProps> = {
|
402
|
-
render: (args) => <SingleFormStory {...args} />,
|
403
|
-
args: {
|
404
|
-
closeAfterSelect: true,
|
405
|
-
},
|
406
|
-
parameters: {
|
407
|
-
controls: {
|
408
|
-
exclude: ['isTargetAmount'],
|
409
|
-
},
|
410
|
-
},
|
411
|
-
};
|
412
|
-
|
413
382
|
const MultipleStory = (args: StorySelectProps) => {
|
414
383
|
const [value, setValue] = useState([]);
|
415
384
|
|
416
385
|
return (
|
417
386
|
<div style={{ width: '400px' }}>
|
418
|
-
<
|
387
|
+
<Combobox
|
419
388
|
{...args}
|
420
389
|
multiple
|
421
|
-
formType={false}
|
422
390
|
items={items}
|
423
391
|
value={value}
|
424
392
|
onChange={setValue}
|
@@ -428,35 +396,9 @@ const MultipleStory = (args: StorySelectProps) => {
|
|
428
396
|
);
|
429
397
|
};
|
430
398
|
|
431
|
-
const MultipleStoryForm = (args: StorySelectProps) => {
|
432
|
-
const handleChange = (event) => {
|
433
|
-
console.log(event);
|
434
|
-
};
|
435
|
-
|
436
|
-
return (
|
437
|
-
<div style={{ width: '400px' }}>
|
438
|
-
<ComboboxWithForm
|
439
|
-
{...args}
|
440
|
-
multiple
|
441
|
-
formType
|
442
|
-
onChange={handleChange}
|
443
|
-
items={items}
|
444
|
-
contentLeft={args.enableContentLeft ? <IconDone size="s" /> : undefined}
|
445
|
-
/>
|
446
|
-
</div>
|
447
|
-
);
|
448
|
-
};
|
449
|
-
|
450
399
|
export const Multiple: StoryObj<StorySelectProps> = {
|
451
400
|
render: (args) => <MultipleStory {...args} />,
|
452
401
|
args: {
|
453
402
|
closeAfterSelect: false,
|
454
403
|
},
|
455
404
|
};
|
456
|
-
|
457
|
-
export const MultipleForm: StoryObj<StorySelectProps> = {
|
458
|
-
render: (args) => <MultipleStoryForm {...args} />,
|
459
|
-
args: {
|
460
|
-
closeAfterSelect: false,
|
461
|
-
},
|
462
|
-
};
|