@salutejs/plasma-new-hope 0.195.0-canary.1574.11921374356.0 → 0.195.1-canary.1561.11932328624.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (206) hide show
  1. package/cjs/components/Autocomplete/Autocomplete.js +1 -7
  2. package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
  3. package/cjs/components/Badge/Badge.css +4 -4
  4. package/cjs/components/Badge/Badge.js +17 -7
  5. package/cjs/components/Badge/Badge.js.map +1 -1
  6. package/cjs/components/Badge/Badge.tokens.js +10 -5
  7. package/cjs/components/Badge/Badge.tokens.js.map +1 -1
  8. package/cjs/components/Badge/variations/_clear/base.js +1 -1
  9. package/cjs/components/Badge/variations/_clear/base.js.map +1 -1
  10. package/cjs/components/Badge/variations/_clear/base_wiboj8.css +1 -0
  11. package/cjs/components/Badge/variations/_size/base.js +1 -1
  12. package/cjs/components/Badge/variations/_size/base.js.map +1 -1
  13. package/{es/components/Badge/variations/_size/base_to0y5x.css → cjs/components/Badge/variations/_size/base_bu5opk.css} +1 -1
  14. package/cjs/components/Badge/variations/_transparent/base.js +1 -1
  15. package/cjs/components/Badge/variations/_transparent/base.js.map +1 -1
  16. package/cjs/components/Badge/variations/_transparent/base_aapqhz.css +1 -0
  17. package/cjs/components/Badge/variations/_view/base.js +1 -1
  18. package/cjs/components/Badge/variations/_view/base.js.map +1 -1
  19. package/cjs/components/Badge/variations/_view/base_j3xzf3.css +1 -0
  20. package/cjs/components/Pagination/Pagination.css +2 -2
  21. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -2
  22. package/cjs/components/Select/Select.css +2 -2
  23. package/cjs/components/Select/Select.js +11 -4
  24. package/cjs/components/Select/Select.js.map +1 -1
  25. package/cjs/components/Select/Select.tokens.js +11 -1
  26. package/cjs/components/Select/Select.tokens.js.map +1 -1
  27. package/cjs/components/Select/ui/Inner/Inner.css +2 -2
  28. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +2 -2
  29. package/cjs/components/Select/ui/Target/Target.css +2 -2
  30. package/cjs/components/Select/ui/Target/Target.js +5 -4
  31. package/cjs/components/Select/ui/Target/Target.js.map +1 -1
  32. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +2 -2
  33. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -2
  34. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  35. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +7 -7
  36. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  37. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_1b7iij0.css +3 -0
  38. package/cjs/index.css +6 -6
  39. package/emotion/cjs/components/Autocomplete/Autocomplete.js +1 -7
  40. package/emotion/cjs/components/Badge/Badge.js +17 -7
  41. package/emotion/cjs/components/Badge/Badge.template-doc.mdx +40 -16
  42. package/emotion/cjs/components/Badge/Badge.tokens.js +10 -6
  43. package/emotion/cjs/components/Badge/variations/_clear/base.js +1 -1
  44. package/emotion/cjs/components/Badge/variations/_size/base.js +2 -1
  45. package/emotion/cjs/components/Badge/variations/_transparent/base.js +1 -1
  46. package/emotion/cjs/components/Badge/variations/_view/base.js +1 -1
  47. package/emotion/cjs/components/Select/Select.js +11 -4
  48. package/emotion/cjs/components/Select/Select.tokens.js +11 -1
  49. package/emotion/cjs/components/Select/ui/Target/Target.js +5 -4
  50. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -2
  51. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +3 -3
  52. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
  53. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  54. package/emotion/cjs/examples/plasma_b2c/components/Select/Select.config.js +20 -20
  55. package/emotion/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +31 -0
  56. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.config.js +14 -14
  57. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  58. package/emotion/cjs/examples/plasma_web/components/Select/Select.config.js +20 -20
  59. package/emotion/cjs/examples/plasma_web/components/Select/Select.stories.tsx +30 -0
  60. package/emotion/es/components/Autocomplete/Autocomplete.js +1 -7
  61. package/emotion/es/components/Badge/Badge.js +18 -8
  62. package/emotion/es/components/Badge/Badge.template-doc.mdx +40 -16
  63. package/emotion/es/components/Badge/Badge.tokens.js +9 -5
  64. package/emotion/es/components/Badge/variations/_clear/base.js +2 -2
  65. package/emotion/es/components/Badge/variations/_size/base.js +3 -2
  66. package/emotion/es/components/Badge/variations/_transparent/base.js +2 -2
  67. package/emotion/es/components/Badge/variations/_view/base.js +2 -2
  68. package/emotion/es/components/Select/Select.js +11 -4
  69. package/emotion/es/components/Select/Select.tokens.js +11 -1
  70. package/emotion/es/components/Select/ui/Target/Target.js +5 -4
  71. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -2
  72. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +3 -3
  73. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
  74. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  75. package/emotion/es/examples/plasma_b2c/components/Select/Select.config.js +20 -20
  76. package/emotion/es/examples/plasma_b2c/components/Select/Select.stories.tsx +31 -0
  77. package/emotion/es/examples/plasma_web/components/Badge/Badge.config.js +14 -14
  78. package/emotion/es/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  79. package/emotion/es/examples/plasma_web/components/Select/Select.config.js +20 -20
  80. package/emotion/es/examples/plasma_web/components/Select/Select.stories.tsx +30 -0
  81. package/es/components/Autocomplete/Autocomplete.js +1 -7
  82. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  83. package/es/components/Badge/Badge.css +4 -4
  84. package/es/components/Badge/Badge.js +20 -10
  85. package/es/components/Badge/Badge.js.map +1 -1
  86. package/es/components/Badge/Badge.tokens.js +10 -6
  87. package/es/components/Badge/Badge.tokens.js.map +1 -1
  88. package/es/components/Badge/variations/_clear/base.js +1 -1
  89. package/es/components/Badge/variations/_clear/base.js.map +1 -1
  90. package/es/components/Badge/variations/_clear/base_wiboj8.css +1 -0
  91. package/es/components/Badge/variations/_size/base.js +1 -1
  92. package/es/components/Badge/variations/_size/base.js.map +1 -1
  93. package/{cjs/components/Badge/variations/_size/base_to0y5x.css → es/components/Badge/variations/_size/base_bu5opk.css} +1 -1
  94. package/es/components/Badge/variations/_transparent/base.js +1 -1
  95. package/es/components/Badge/variations/_transparent/base.js.map +1 -1
  96. package/es/components/Badge/variations/_transparent/base_aapqhz.css +1 -0
  97. package/es/components/Badge/variations/_view/base.js +1 -1
  98. package/es/components/Badge/variations/_view/base.js.map +1 -1
  99. package/es/components/Badge/variations/_view/base_j3xzf3.css +1 -0
  100. package/es/components/Pagination/Pagination.css +2 -2
  101. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -2
  102. package/es/components/Select/Select.css +2 -2
  103. package/es/components/Select/Select.js +11 -4
  104. package/es/components/Select/Select.js.map +1 -1
  105. package/es/components/Select/Select.tokens.js +11 -1
  106. package/es/components/Select/Select.tokens.js.map +1 -1
  107. package/es/components/Select/ui/Inner/Inner.css +2 -2
  108. package/es/components/Select/ui/Inner/ui/Item/Item.css +2 -2
  109. package/es/components/Select/ui/Target/Target.css +2 -2
  110. package/es/components/Select/ui/Target/Target.js +5 -4
  111. package/es/components/Select/ui/Target/Target.js.map +1 -1
  112. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +2 -2
  113. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -2
  114. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  115. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +7 -7
  116. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  117. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles_1b7iij0.css +3 -0
  118. package/es/index.css +6 -6
  119. package/package.json +2 -2
  120. package/styled-components/cjs/components/Autocomplete/Autocomplete.js +1 -7
  121. package/styled-components/cjs/components/Badge/Badge.js +17 -7
  122. package/styled-components/cjs/components/Badge/Badge.template-doc.mdx +40 -16
  123. package/styled-components/cjs/components/Badge/Badge.tokens.js +10 -6
  124. package/styled-components/cjs/components/Badge/variations/_clear/base.js +1 -1
  125. package/styled-components/cjs/components/Badge/variations/_size/base.js +2 -1
  126. package/styled-components/cjs/components/Badge/variations/_transparent/base.js +1 -1
  127. package/styled-components/cjs/components/Badge/variations/_view/base.js +1 -1
  128. package/styled-components/cjs/components/Select/Select.js +11 -4
  129. package/styled-components/cjs/components/Select/Select.tokens.js +11 -1
  130. package/styled-components/cjs/components/Select/ui/Target/Target.js +5 -4
  131. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -2
  132. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +2 -2
  133. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
  134. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  135. package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.config.js +8 -8
  136. package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +31 -0
  137. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.config.js +5 -5
  138. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  139. package/styled-components/cjs/examples/plasma_web/components/Select/Select.config.js +8 -8
  140. package/styled-components/cjs/examples/plasma_web/components/Select/Select.stories.tsx +30 -0
  141. package/styled-components/es/components/Autocomplete/Autocomplete.js +1 -7
  142. package/styled-components/es/components/Badge/Badge.js +18 -8
  143. package/styled-components/es/components/Badge/Badge.template-doc.mdx +40 -16
  144. package/styled-components/es/components/Badge/Badge.tokens.js +9 -5
  145. package/styled-components/es/components/Badge/variations/_clear/base.js +2 -2
  146. package/styled-components/es/components/Badge/variations/_size/base.js +3 -2
  147. package/styled-components/es/components/Badge/variations/_transparent/base.js +2 -2
  148. package/styled-components/es/components/Badge/variations/_view/base.js +2 -2
  149. package/styled-components/es/components/Select/Select.js +11 -4
  150. package/styled-components/es/components/Select/Select.tokens.js +11 -1
  151. package/styled-components/es/components/Select/ui/Target/Target.js +5 -4
  152. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -2
  153. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +2 -2
  154. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
  155. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  156. package/styled-components/es/examples/plasma_b2c/components/Select/Select.config.js +8 -8
  157. package/styled-components/es/examples/plasma_b2c/components/Select/Select.stories.tsx +31 -0
  158. package/styled-components/es/examples/plasma_web/components/Badge/Badge.config.js +5 -5
  159. package/styled-components/es/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  160. package/styled-components/es/examples/plasma_web/components/Select/Select.config.js +8 -8
  161. package/styled-components/es/examples/plasma_web/components/Select/Select.stories.tsx +30 -0
  162. package/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  163. package/types/components/Autocomplete/Autocomplete.types.d.ts +0 -4
  164. package/types/components/Autocomplete/Autocomplete.types.d.ts.map +1 -1
  165. package/types/components/Badge/Badge.d.ts.map +1 -1
  166. package/types/components/Badge/Badge.tokens.d.ts +8 -4
  167. package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
  168. package/types/components/Badge/Badge.types.d.ts +18 -5
  169. package/types/components/Badge/Badge.types.d.ts.map +1 -1
  170. package/types/components/Badge/variations/_clear/base.d.ts.map +1 -1
  171. package/types/components/Badge/variations/_size/base.d.ts.map +1 -1
  172. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +96 -0
  173. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
  174. package/types/components/Select/Select.d.ts.map +1 -1
  175. package/types/components/Select/Select.tokens.d.ts +11 -1
  176. package/types/components/Select/Select.tokens.d.ts.map +1 -1
  177. package/types/components/Select/Select.types.d.ts +4 -2
  178. package/types/components/Select/Select.types.d.ts.map +1 -1
  179. package/types/components/Select/ui/Target/Target.d.ts +2 -1
  180. package/types/components/Select/ui/Target/Target.d.ts.map +1 -1
  181. package/types/components/Select/ui/Target/Target.types.d.ts +3 -2
  182. package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
  183. package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
  184. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
  185. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -1
  186. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
  187. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
  188. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +61 -4
  189. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
  190. package/types/examples/plasma_b2c/components/Select/Select.config.d.ts.map +1 -1
  191. package/types/examples/plasma_b2c/components/Select/Select.d.ts +96 -0
  192. package/types/examples/plasma_b2c/components/Select/Select.d.ts.map +1 -1
  193. package/types/examples/plasma_web/components/Badge/Badge.config.d.ts.map +1 -1
  194. package/types/examples/plasma_web/components/Badge/Badge.d.ts +61 -4
  195. package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
  196. package/types/examples/plasma_web/components/Select/Select.config.d.ts.map +1 -1
  197. package/types/examples/plasma_web/components/Select/Select.d.ts +96 -0
  198. package/types/examples/plasma_web/components/Select/Select.d.ts.map +1 -1
  199. package/cjs/components/Badge/variations/_clear/base_oopyb7.css +0 -1
  200. package/cjs/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
  201. package/cjs/components/Badge/variations/_view/base_qlxank.css +0 -1
  202. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_q4kc1p.css +0 -3
  203. package/es/components/Badge/variations/_clear/base_oopyb7.css +0 -1
  204. package/es/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
  205. package/es/components/Badge/variations/_view/base_qlxank.css +0 -1
  206. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles_q4kc1p.css +0 -3
@@ -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
  />