@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.
Files changed (146) hide show
  1. package/cjs/components/Badge/Badge.css +4 -4
  2. package/cjs/components/Badge/Badge.js +16 -4
  3. package/cjs/components/Badge/Badge.js.map +1 -1
  4. package/cjs/components/Badge/Badge.tokens.js +10 -5
  5. package/cjs/components/Badge/Badge.tokens.js.map +1 -1
  6. package/cjs/components/Badge/variations/_clear/base.js +1 -1
  7. package/cjs/components/Badge/variations/_clear/base.js.map +1 -1
  8. package/cjs/components/Badge/variations/_clear/base_wiboj8.css +1 -0
  9. package/cjs/components/Badge/variations/_size/base.js +1 -1
  10. package/cjs/components/Badge/variations/_size/base.js.map +1 -1
  11. package/{es/components/Badge/variations/_size/base_to0y5x.css → cjs/components/Badge/variations/_size/base_rn38n6.css} +1 -1
  12. package/cjs/components/Badge/variations/_transparent/base.js +1 -1
  13. package/cjs/components/Badge/variations/_transparent/base.js.map +1 -1
  14. package/cjs/components/Badge/variations/_transparent/base_aapqhz.css +1 -0
  15. package/cjs/components/Badge/variations/_view/base.js +1 -1
  16. package/cjs/components/Badge/variations/_view/base.js.map +1 -1
  17. package/cjs/components/Badge/variations/_view/base_j3xzf3.css +1 -0
  18. package/cjs/index.css +4 -4
  19. package/cjs/index.js +0 -2
  20. package/cjs/index.js.map +1 -1
  21. package/emotion/cjs/components/Badge/Badge.js +21 -4
  22. package/emotion/cjs/components/Badge/Badge.tokens.js +10 -6
  23. package/emotion/cjs/components/Badge/variations/_clear/base.js +1 -1
  24. package/emotion/cjs/components/Badge/variations/_size/base.js +2 -1
  25. package/emotion/cjs/components/Badge/variations/_transparent/base.js +1 -1
  26. package/emotion/cjs/components/Badge/variations/_view/base.js +1 -1
  27. package/emotion/cjs/components/Combobox/ComboboxNew/index.js +1 -8
  28. package/emotion/cjs/components/Combobox/index.js +0 -6
  29. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +14 -14
  30. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +8 -2
  31. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +2 -7
  32. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +4 -62
  33. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.config.js +14 -14
  34. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +8 -2
  35. package/emotion/es/components/Badge/Badge.js +23 -5
  36. package/emotion/es/components/Badge/Badge.tokens.js +9 -5
  37. package/emotion/es/components/Badge/variations/_clear/base.js +2 -2
  38. package/emotion/es/components/Badge/variations/_size/base.js +3 -2
  39. package/emotion/es/components/Badge/variations/_transparent/base.js +2 -2
  40. package/emotion/es/components/Badge/variations/_view/base.js +2 -2
  41. package/emotion/es/components/Combobox/ComboboxNew/index.js +1 -2
  42. package/emotion/es/components/Combobox/index.js +1 -1
  43. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +14 -14
  44. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +8 -2
  45. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.js +2 -7
  46. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +4 -62
  47. package/emotion/es/examples/plasma_web/components/Badge/Badge.config.js +14 -14
  48. package/emotion/es/examples/plasma_web/components/Badge/Badge.stories.tsx +8 -2
  49. package/es/components/Badge/Badge.css +4 -4
  50. package/es/components/Badge/Badge.js +19 -7
  51. package/es/components/Badge/Badge.js.map +1 -1
  52. package/es/components/Badge/Badge.tokens.js +10 -6
  53. package/es/components/Badge/Badge.tokens.js.map +1 -1
  54. package/es/components/Badge/variations/_clear/base.js +1 -1
  55. package/es/components/Badge/variations/_clear/base.js.map +1 -1
  56. package/es/components/Badge/variations/_clear/base_wiboj8.css +1 -0
  57. package/es/components/Badge/variations/_size/base.js +1 -1
  58. package/es/components/Badge/variations/_size/base.js.map +1 -1
  59. package/{cjs/components/Badge/variations/_size/base_to0y5x.css → es/components/Badge/variations/_size/base_rn38n6.css} +1 -1
  60. package/es/components/Badge/variations/_transparent/base.js +1 -1
  61. package/es/components/Badge/variations/_transparent/base.js.map +1 -1
  62. package/es/components/Badge/variations/_transparent/base_aapqhz.css +1 -0
  63. package/es/components/Badge/variations/_view/base.js +1 -1
  64. package/es/components/Badge/variations/_view/base.js.map +1 -1
  65. package/es/components/Badge/variations/_view/base_j3xzf3.css +1 -0
  66. package/es/index.css +4 -4
  67. package/es/index.js +0 -1
  68. package/es/index.js.map +1 -1
  69. package/package.json +2 -2
  70. package/styled-components/cjs/components/Badge/Badge.js +21 -4
  71. package/styled-components/cjs/components/Badge/Badge.tokens.js +10 -6
  72. package/styled-components/cjs/components/Badge/variations/_clear/base.js +1 -1
  73. package/styled-components/cjs/components/Badge/variations/_size/base.js +2 -1
  74. package/styled-components/cjs/components/Badge/variations/_transparent/base.js +1 -1
  75. package/styled-components/cjs/components/Badge/variations/_view/base.js +1 -1
  76. package/styled-components/cjs/components/Combobox/ComboboxNew/index.js +1 -8
  77. package/styled-components/cjs/components/Combobox/index.js +0 -6
  78. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
  79. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +8 -2
  80. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.js +2 -7
  81. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +4 -62
  82. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.config.js +5 -5
  83. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +8 -2
  84. package/styled-components/es/components/Badge/Badge.js +23 -5
  85. package/styled-components/es/components/Badge/Badge.tokens.js +9 -5
  86. package/styled-components/es/components/Badge/variations/_clear/base.js +2 -2
  87. package/styled-components/es/components/Badge/variations/_size/base.js +3 -2
  88. package/styled-components/es/components/Badge/variations/_transparent/base.js +2 -2
  89. package/styled-components/es/components/Badge/variations/_view/base.js +2 -2
  90. package/styled-components/es/components/Combobox/ComboboxNew/index.js +1 -2
  91. package/styled-components/es/components/Combobox/index.js +1 -1
  92. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
  93. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +8 -2
  94. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.js +2 -7
  95. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +4 -62
  96. package/styled-components/es/examples/plasma_web/components/Badge/Badge.config.js +5 -5
  97. package/styled-components/es/examples/plasma_web/components/Badge/Badge.stories.tsx +8 -2
  98. package/types/components/Badge/Badge.d.ts.map +1 -1
  99. package/types/components/Badge/Badge.tokens.d.ts +8 -4
  100. package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
  101. package/types/components/Badge/Badge.types.d.ts +18 -5
  102. package/types/components/Badge/Badge.types.d.ts.map +1 -1
  103. package/types/components/Badge/variations/_clear/base.d.ts.map +1 -1
  104. package/types/components/Badge/variations/_size/base.d.ts.map +1 -1
  105. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +0 -21
  106. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  107. package/types/components/Combobox/ComboboxNew/index.d.ts +0 -1
  108. package/types/components/Combobox/ComboboxNew/index.d.ts.map +1 -1
  109. package/types/components/Combobox/index.d.ts +1 -1
  110. package/types/components/Combobox/index.d.ts.map +1 -1
  111. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
  112. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +58 -4
  113. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
  114. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +2 -3
  115. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
  116. package/types/examples/plasma_web/components/Badge/Badge.config.d.ts.map +1 -1
  117. package/types/examples/plasma_web/components/Badge/Badge.d.ts +58 -4
  118. package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
  119. package/cjs/components/Badge/variations/_clear/base_oopyb7.css +0 -1
  120. package/cjs/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
  121. package/cjs/components/Badge/variations/_view/base_qlxank.css +0 -1
  122. package/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +0 -22
  123. package/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js.map +0 -1
  124. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +0 -21
  125. package/emotion/cjs/components/Combobox/ComboboxNew/utils/getForm.js +0 -90
  126. package/emotion/cjs/components/Combobox/ComboboxNew/utils/syntheticEvent.js +0 -53
  127. package/emotion/es/components/Combobox/ComboboxNew/Combobox.boundler.js +0 -14
  128. package/emotion/es/components/Combobox/ComboboxNew/utils/getForm.js +0 -83
  129. package/emotion/es/components/Combobox/ComboboxNew/utils/syntheticEvent.js +0 -47
  130. package/es/components/Badge/variations/_clear/base_oopyb7.css +0 -1
  131. package/es/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
  132. package/es/components/Badge/variations/_view/base_qlxank.css +0 -1
  133. package/es/components/Combobox/ComboboxNew/Combobox.boundler.js +0 -18
  134. package/es/components/Combobox/ComboboxNew/Combobox.boundler.js.map +0 -1
  135. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.boundler.js +0 -21
  136. package/styled-components/cjs/components/Combobox/ComboboxNew/utils/getForm.js +0 -90
  137. package/styled-components/cjs/components/Combobox/ComboboxNew/utils/syntheticEvent.js +0 -53
  138. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.boundler.js +0 -14
  139. package/styled-components/es/components/Combobox/ComboboxNew/utils/getForm.js +0 -83
  140. package/styled-components/es/components/Combobox/ComboboxNew/utils/syntheticEvent.js +0 -47
  141. package/types/components/Combobox/ComboboxNew/Combobox.boundler.d.ts +0 -4
  142. package/types/components/Combobox/ComboboxNew/Combobox.boundler.d.ts.map +0 -1
  143. package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts +0 -4
  144. package/types/components/Combobox/ComboboxNew/utils/getForm.d.ts.map +0 -1
  145. package/types/components/Combobox/ComboboxNew/utils/syntheticEvent.d.ts +0 -4
  146. 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: 'enableContentLeft', truthy: false },
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,
@@ -3,15 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ComboboxWithForm = exports.Combobox = void 0;
6
+ exports.Combobox = void 0;
7
7
  var _engines = /*#__PURE__*/require("../../../../engines");
8
8
  var _ = /*#__PURE__*/require("../../../..");
9
- var _getForm = /*#__PURE__*/require("../../../../components/Combobox/ComboboxNew/utils/getForm");
10
9
  var _Combobox = /*#__PURE__*/require("./Combobox.config");
11
10
  var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_.comboboxNewConfig, _Combobox.config);
12
11
  var ComboboxComponent = /*#__PURE__*/(0, _engines.component)(mergedConfig);
13
- var Combobox = exports.Combobox = ComboboxComponent;
14
- var ComboboxWithForm = exports.ComboboxWithForm = /*#__PURE__*/(0, _.boundCombobox)({
15
- base: ComboboxComponent,
16
- baseForm: /*#__PURE__*/(0, _getForm.getFormComponentGenerator)(ComboboxComponent)
17
- });
12
+ var Combobox = exports.Combobox = ComboboxComponent;
@@ -1,12 +1,11 @@
1
- import React, { useEffect, useRef, useState } from '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, ComboboxWithForm } from './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
- <ComboboxWithForm
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
- <ComboboxWithForm
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
- };