@salutejs/plasma-new-hope 0.195.0-canary.1572.11914481185.0 → 0.195.0-dev.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) hide show
  1. package/cjs/components/Badge/Badge.css +4 -4
  2. package/cjs/components/Badge/Badge.js +17 -7
  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_bu5opk.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/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  19. package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  20. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  21. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  22. package/cjs/components/Calendar/store/reducer.js +2 -2
  23. package/cjs/components/Calendar/store/reducer.js.map +1 -1
  24. package/cjs/components/Combobox/ComboboxNew/Combobox.js +18 -4
  25. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  26. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  27. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  28. package/cjs/components/Combobox/ComboboxOld/Combobox.css +5 -4
  29. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +5 -4
  30. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +5 -4
  31. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +5 -4
  32. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +5 -4
  33. package/cjs/components/Dropdown/Dropdown.css +5 -4
  34. package/cjs/components/Dropdown/Dropdown.js +4 -2
  35. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  36. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +5 -4
  37. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -2
  38. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  39. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +7 -1
  40. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  41. package/cjs/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_1b439rx.css → DropdownItem.styles_14yih1y.css} +1 -0
  42. package/cjs/components/Select/Select.js +0 -1
  43. package/cjs/components/Select/Select.js.map +1 -1
  44. package/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -2
  45. package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  46. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +18 -3
  47. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  48. package/cjs/index.css +9 -8
  49. package/emotion/cjs/components/Badge/Badge.js +17 -7
  50. package/emotion/cjs/components/Badge/Badge.template-doc.mdx +40 -16
  51. package/emotion/cjs/components/Badge/Badge.tokens.js +10 -6
  52. package/emotion/cjs/components/Badge/variations/_clear/base.js +1 -1
  53. package/emotion/cjs/components/Badge/variations/_size/base.js +2 -1
  54. package/emotion/cjs/components/Badge/variations/_transparent/base.js +1 -1
  55. package/emotion/cjs/components/Badge/variations/_view/base.js +1 -1
  56. package/emotion/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  57. package/emotion/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  58. package/emotion/cjs/components/Calendar/store/reducer.js +2 -2
  59. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +22 -4
  60. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  61. package/emotion/cjs/components/Dropdown/Dropdown.js +4 -2
  62. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -2
  63. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +15 -11
  64. package/emotion/cjs/components/Select/Select.js +0 -1
  65. package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -2
  66. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +24 -3
  67. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
  68. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  69. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.config.js +14 -14
  70. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  71. package/emotion/es/components/Badge/Badge.js +18 -8
  72. package/emotion/es/components/Badge/Badge.template-doc.mdx +40 -16
  73. package/emotion/es/components/Badge/Badge.tokens.js +9 -5
  74. package/emotion/es/components/Badge/variations/_clear/base.js +2 -2
  75. package/emotion/es/components/Badge/variations/_size/base.js +3 -2
  76. package/emotion/es/components/Badge/variations/_transparent/base.js +2 -2
  77. package/emotion/es/components/Badge/variations/_view/base.js +2 -2
  78. package/emotion/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  79. package/emotion/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  80. package/emotion/es/components/Calendar/store/reducer.js +2 -2
  81. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +22 -4
  82. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  83. package/emotion/es/components/Dropdown/Dropdown.js +4 -2
  84. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -3
  85. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +15 -11
  86. package/emotion/es/components/Select/Select.js +0 -1
  87. package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +1 -2
  88. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +24 -3
  89. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
  90. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  91. package/emotion/es/examples/plasma_web/components/Badge/Badge.config.js +14 -14
  92. package/emotion/es/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  93. package/es/components/Badge/Badge.css +4 -4
  94. package/es/components/Badge/Badge.js +20 -10
  95. package/es/components/Badge/Badge.js.map +1 -1
  96. package/es/components/Badge/Badge.tokens.js +10 -6
  97. package/es/components/Badge/Badge.tokens.js.map +1 -1
  98. package/es/components/Badge/variations/_clear/base.js +1 -1
  99. package/es/components/Badge/variations/_clear/base.js.map +1 -1
  100. package/es/components/Badge/variations/_clear/base_wiboj8.css +1 -0
  101. package/es/components/Badge/variations/_size/base.js +1 -1
  102. package/es/components/Badge/variations/_size/base.js.map +1 -1
  103. package/{cjs/components/Badge/variations/_size/base_to0y5x.css → es/components/Badge/variations/_size/base_bu5opk.css} +1 -1
  104. package/es/components/Badge/variations/_transparent/base.js +1 -1
  105. package/es/components/Badge/variations/_transparent/base.js.map +1 -1
  106. package/es/components/Badge/variations/_transparent/base_aapqhz.css +1 -0
  107. package/es/components/Badge/variations/_view/base.js +1 -1
  108. package/es/components/Badge/variations/_view/base.js.map +1 -1
  109. package/es/components/Badge/variations/_view/base_j3xzf3.css +1 -0
  110. package/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  111. package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  112. package/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  113. package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  114. package/es/components/Calendar/store/reducer.js +2 -2
  115. package/es/components/Calendar/store/reducer.js.map +1 -1
  116. package/es/components/Combobox/ComboboxNew/Combobox.js +19 -5
  117. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  118. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  119. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  120. package/es/components/Combobox/ComboboxOld/Combobox.css +5 -4
  121. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +5 -4
  122. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +5 -4
  123. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +5 -4
  124. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +5 -4
  125. package/es/components/Dropdown/Dropdown.css +5 -4
  126. package/es/components/Dropdown/Dropdown.js +4 -2
  127. package/es/components/Dropdown/Dropdown.js.map +1 -1
  128. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +5 -4
  129. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -3
  130. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  131. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +7 -2
  132. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  133. package/es/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_1b439rx.css → DropdownItem.styles_14yih1y.css} +1 -0
  134. package/es/components/Select/Select.js +0 -1
  135. package/es/components/Select/Select.js.map +1 -1
  136. package/es/components/Select/ui/Inner/ui/Item/Item.js +1 -2
  137. package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  138. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +19 -4
  139. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  140. package/es/index.css +9 -8
  141. package/package.json +3 -2
  142. package/styled-components/cjs/components/Badge/Badge.js +17 -7
  143. package/styled-components/cjs/components/Badge/Badge.template-doc.mdx +40 -16
  144. package/styled-components/cjs/components/Badge/Badge.tokens.js +10 -6
  145. package/styled-components/cjs/components/Badge/variations/_clear/base.js +1 -1
  146. package/styled-components/cjs/components/Badge/variations/_size/base.js +2 -1
  147. package/styled-components/cjs/components/Badge/variations/_transparent/base.js +1 -1
  148. package/styled-components/cjs/components/Badge/variations/_view/base.js +1 -1
  149. package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  150. package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  151. package/styled-components/cjs/components/Calendar/store/reducer.js +2 -2
  152. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +22 -4
  153. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  154. package/styled-components/cjs/components/Dropdown/Dropdown.js +4 -2
  155. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -2
  156. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +5 -2
  157. package/styled-components/cjs/components/Select/Select.js +0 -1
  158. package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -2
  159. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +24 -3
  160. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
  161. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  162. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.config.js +5 -5
  163. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  164. package/styled-components/es/components/Badge/Badge.js +18 -8
  165. package/styled-components/es/components/Badge/Badge.template-doc.mdx +40 -16
  166. package/styled-components/es/components/Badge/Badge.tokens.js +9 -5
  167. package/styled-components/es/components/Badge/variations/_clear/base.js +2 -2
  168. package/styled-components/es/components/Badge/variations/_size/base.js +3 -2
  169. package/styled-components/es/components/Badge/variations/_transparent/base.js +2 -2
  170. package/styled-components/es/components/Badge/variations/_view/base.js +2 -2
  171. package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  172. package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  173. package/styled-components/es/components/Calendar/store/reducer.js +2 -2
  174. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +22 -4
  175. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  176. package/styled-components/es/components/Dropdown/Dropdown.js +4 -2
  177. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -3
  178. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +5 -2
  179. package/styled-components/es/components/Select/Select.js +0 -1
  180. package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +1 -2
  181. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +24 -3
  182. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
  183. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  184. package/styled-components/es/examples/plasma_web/components/Badge/Badge.config.js +5 -5
  185. package/styled-components/es/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  186. package/types/components/Badge/Badge.d.ts.map +1 -1
  187. package/types/components/Badge/Badge.tokens.d.ts +8 -4
  188. package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
  189. package/types/components/Badge/Badge.types.d.ts +18 -5
  190. package/types/components/Badge/Badge.types.d.ts.map +1 -1
  191. package/types/components/Badge/variations/_clear/base.d.ts.map +1 -1
  192. package/types/components/Badge/variations/_size/base.d.ts.map +1 -1
  193. package/types/components/Calendar/store/reducer.d.ts +1 -1
  194. package/types/components/Calendar/store/reducer.d.ts.map +1 -1
  195. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  196. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +1 -2
  197. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  198. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.d.ts.map +1 -1
  199. package/types/components/Dropdown/Dropdown.d.ts +50 -2
  200. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  201. package/types/components/Dropdown/Dropdown.types.d.ts +11 -6
  202. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  203. package/types/components/Dropdown/index.d.ts +1 -0
  204. package/types/components/Dropdown/index.d.ts.map +1 -1
  205. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  206. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +1 -0
  207. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
  208. package/types/components/Select/Select.d.ts.map +1 -1
  209. package/types/components/Select/Select.types.d.ts +1 -2
  210. package/types/components/Select/Select.types.d.ts.map +1 -1
  211. package/types/components/Select/ui/Inner/ui/Item/Item.d.ts.map +1 -1
  212. package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
  213. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
  214. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +61 -4
  215. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
  216. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +25 -1
  217. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -1
  218. package/types/examples/plasma_web/components/Badge/Badge.config.d.ts.map +1 -1
  219. package/types/examples/plasma_web/components/Badge/Badge.d.ts +61 -4
  220. package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
  221. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +25 -1
  222. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -1
  223. package/cjs/components/Badge/variations/_clear/base_oopyb7.css +0 -1
  224. package/cjs/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
  225. package/cjs/components/Badge/variations/_view/base_qlxank.css +0 -1
  226. package/es/components/Badge/variations/_clear/base_oopyb7.css +0 -1
  227. package/es/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
  228. package/es/components/Badge/variations/_view/base_qlxank.css +0 -1
@@ -34,6 +34,10 @@ const meta: Meta<typeof Badge> = {
34
34
  maxWidth: {
35
35
  control: { type: 'text' },
36
36
  },
37
+ text: {
38
+ control: { type: 'text' },
39
+ if: { arg: 'enableText', truthy: true },
40
+ },
37
41
  ...disableProps(['contentLeft', 'contentRight']),
38
42
  },
39
43
  };
@@ -43,6 +47,7 @@ export default meta;
43
47
  type StoryProps = ComponentProps<typeof Badge> & {
44
48
  enableContentLeft: boolean;
45
49
  enableContentRight: boolean;
50
+ enableText: boolean;
46
51
  };
47
52
  type Story = StoryObj<StoryProps>;
48
53
 
@@ -63,13 +68,14 @@ export const Default: Story = {
63
68
  },
64
69
  enableContentRight: {
65
70
  control: { type: 'boolean' },
66
- if: { arg: 'enableContentLeft', truthy: false },
71
+ if: { arg: 'enableText', truthy: true },
67
72
  },
68
73
  },
69
74
  args: {
70
- text: 'Hello Kitty',
71
75
  view: 'default',
72
76
  size: 'm',
77
+ enableText: true,
78
+ text: 'Hello',
73
79
  enableContentLeft: false,
74
80
  enableContentRight: false,
75
81
  clear: false,
@@ -77,13 +83,24 @@ export const Default: Story = {
77
83
  transparent: false,
78
84
  maxWidth: '',
79
85
  },
80
- render: ({ enableContentLeft, enableContentRight, size, ...rest }: StoryProps) => {
81
- const iconSize = size === 'l' ? '1rem' : '0.75rem';
86
+ render: ({ enableContentLeft, enableContentRight, enableText, size, ...rest }: StoryProps) => {
87
+ const iconSize = () => {
88
+ switch (size) {
89
+ case 'l':
90
+ return '1rem';
91
+ case 'xs':
92
+ return '0.625rem';
93
+ default:
94
+ return '0.75rem';
95
+ }
96
+ };
82
97
 
83
98
  return (
84
99
  <Badge
85
- contentLeft={enableContentLeft ? <BellIcon width={iconSize} height={iconSize} /> : undefined}
86
- contentRight={enableContentRight ? <BellIcon width={iconSize} height={iconSize} /> : undefined}
100
+ contentLeft={
101
+ enableContentLeft || !enableText ? <BellIcon width={iconSize()} height={iconSize()} /> : undefined
102
+ }
103
+ contentRight={enableContentRight ? <BellIcon width={iconSize()} height={iconSize()} /> : undefined}
87
104
  size={size}
88
105
  {...rest}
89
106
  />