@salutejs/plasma-new-hope 0.187.1-canary.1517.11744378817.0 → 0.188.0-canary.1546.11776758496.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) 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/Steps/Steps.css +10 -10
  19. package/cjs/components/Steps/Steps.js +14 -21
  20. package/cjs/components/Steps/Steps.js.map +1 -1
  21. package/cjs/components/Steps/Steps.styles.js +1 -1
  22. package/cjs/components/Steps/Steps.styles.js.map +1 -1
  23. package/cjs/components/Steps/{Steps.styles_wa45kj.css → Steps.styles_1xmqxqu.css} +1 -1
  24. package/cjs/components/Steps/Steps.tokens.js +0 -1
  25. package/cjs/components/Steps/Steps.tokens.js.map +1 -1
  26. package/cjs/components/Steps/ui/StepItem/StepItem.css +9 -9
  27. package/cjs/components/Steps/ui/StepItem/StepItem.js +7 -29
  28. package/cjs/components/Steps/ui/StepItem/StepItem.js.map +1 -1
  29. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +6 -6
  30. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  31. package/cjs/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +9 -0
  32. package/cjs/index.css +15 -15
  33. package/emotion/cjs/components/Badge/Badge.js +17 -7
  34. package/emotion/cjs/components/Badge/Badge.tokens.js +10 -6
  35. package/emotion/cjs/components/Badge/variations/_clear/base.js +1 -1
  36. package/emotion/cjs/components/Badge/variations/_size/base.js +2 -1
  37. package/emotion/cjs/components/Badge/variations/_transparent/base.js +1 -1
  38. package/emotion/cjs/components/Badge/variations/_view/base.js +1 -1
  39. package/emotion/cjs/components/Steps/Steps.js +14 -23
  40. package/emotion/cjs/components/Steps/Steps.styles.js +1 -1
  41. package/emotion/cjs/components/Steps/Steps.tokens.js +0 -1
  42. package/emotion/cjs/components/Steps/ui/StepItem/StepItem.js +7 -29
  43. package/emotion/cjs/components/Steps/ui/StepItem/StepItem.styles.js +11 -22
  44. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
  45. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  46. package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +5 -5
  47. package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
  48. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.config.js +14 -14
  49. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  50. package/emotion/cjs/examples/plasma_web/components/Steps/Steps.config.js +5 -5
  51. package/emotion/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
  52. package/emotion/es/components/Badge/Badge.js +18 -8
  53. package/emotion/es/components/Badge/Badge.tokens.js +9 -5
  54. package/emotion/es/components/Badge/variations/_clear/base.js +2 -2
  55. package/emotion/es/components/Badge/variations/_size/base.js +3 -2
  56. package/emotion/es/components/Badge/variations/_transparent/base.js +2 -2
  57. package/emotion/es/components/Badge/variations/_view/base.js +2 -2
  58. package/emotion/es/components/Steps/Steps.js +15 -24
  59. package/emotion/es/components/Steps/Steps.styles.js +1 -1
  60. package/emotion/es/components/Steps/Steps.tokens.js +0 -1
  61. package/emotion/es/components/Steps/ui/StepItem/StepItem.js +7 -29
  62. package/emotion/es/components/Steps/ui/StepItem/StepItem.styles.js +11 -22
  63. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
  64. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  65. package/emotion/es/examples/plasma_b2c/components/Steps/Steps.config.js +5 -5
  66. package/emotion/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
  67. package/emotion/es/examples/plasma_web/components/Badge/Badge.config.js +14 -14
  68. package/emotion/es/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  69. package/emotion/es/examples/plasma_web/components/Steps/Steps.config.js +5 -5
  70. package/emotion/es/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
  71. package/es/components/Badge/Badge.css +4 -4
  72. package/es/components/Badge/Badge.js +20 -10
  73. package/es/components/Badge/Badge.js.map +1 -1
  74. package/es/components/Badge/Badge.tokens.js +10 -6
  75. package/es/components/Badge/Badge.tokens.js.map +1 -1
  76. package/es/components/Badge/variations/_clear/base.js +1 -1
  77. package/es/components/Badge/variations/_clear/base.js.map +1 -1
  78. package/es/components/Badge/variations/_clear/base_wiboj8.css +1 -0
  79. package/es/components/Badge/variations/_size/base.js +1 -1
  80. package/es/components/Badge/variations/_size/base.js.map +1 -1
  81. package/{cjs/components/Badge/variations/_size/base_to0y5x.css → es/components/Badge/variations/_size/base_bu5opk.css} +1 -1
  82. package/es/components/Badge/variations/_transparent/base.js +1 -1
  83. package/es/components/Badge/variations/_transparent/base.js.map +1 -1
  84. package/es/components/Badge/variations/_transparent/base_aapqhz.css +1 -0
  85. package/es/components/Badge/variations/_view/base.js +1 -1
  86. package/es/components/Badge/variations/_view/base.js.map +1 -1
  87. package/es/components/Badge/variations/_view/base_j3xzf3.css +1 -0
  88. package/es/components/Steps/Steps.css +10 -10
  89. package/es/components/Steps/Steps.js +16 -23
  90. package/es/components/Steps/Steps.js.map +1 -1
  91. package/es/components/Steps/Steps.styles.js +1 -1
  92. package/es/components/Steps/Steps.styles.js.map +1 -1
  93. package/es/components/Steps/{Steps.styles_wa45kj.css → Steps.styles_1xmqxqu.css} +1 -1
  94. package/es/components/Steps/Steps.tokens.js +0 -1
  95. package/es/components/Steps/Steps.tokens.js.map +1 -1
  96. package/es/components/Steps/ui/StepItem/StepItem.css +9 -9
  97. package/es/components/Steps/ui/StepItem/StepItem.js +8 -30
  98. package/es/components/Steps/ui/StepItem/StepItem.js.map +1 -1
  99. package/es/components/Steps/ui/StepItem/StepItem.styles.js +6 -6
  100. package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  101. package/es/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +9 -0
  102. package/es/index.css +15 -15
  103. package/package.json +2 -2
  104. package/styled-components/cjs/components/Badge/Badge.js +17 -7
  105. package/styled-components/cjs/components/Badge/Badge.tokens.js +10 -6
  106. package/styled-components/cjs/components/Badge/variations/_clear/base.js +1 -1
  107. package/styled-components/cjs/components/Badge/variations/_size/base.js +2 -1
  108. package/styled-components/cjs/components/Badge/variations/_transparent/base.js +1 -1
  109. package/styled-components/cjs/components/Badge/variations/_view/base.js +1 -1
  110. package/styled-components/cjs/components/Steps/Steps.js +14 -23
  111. package/styled-components/cjs/components/Steps/Steps.styles.js +1 -1
  112. package/styled-components/cjs/components/Steps/Steps.tokens.js +0 -1
  113. package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.js +7 -29
  114. package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.styles.js +6 -17
  115. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
  116. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  117. package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +1 -1
  118. package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
  119. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.config.js +5 -5
  120. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  121. package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.config.js +1 -1
  122. package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
  123. package/styled-components/es/components/Badge/Badge.js +18 -8
  124. package/styled-components/es/components/Badge/Badge.tokens.js +9 -5
  125. package/styled-components/es/components/Badge/variations/_clear/base.js +2 -2
  126. package/styled-components/es/components/Badge/variations/_size/base.js +3 -2
  127. package/styled-components/es/components/Badge/variations/_transparent/base.js +2 -2
  128. package/styled-components/es/components/Badge/variations/_view/base.js +2 -2
  129. package/styled-components/es/components/Steps/Steps.js +15 -24
  130. package/styled-components/es/components/Steps/Steps.styles.js +1 -1
  131. package/styled-components/es/components/Steps/Steps.tokens.js +0 -1
  132. package/styled-components/es/components/Steps/ui/StepItem/StepItem.js +7 -29
  133. package/styled-components/es/components/Steps/ui/StepItem/StepItem.styles.js +6 -17
  134. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
  135. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  136. package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.config.js +1 -1
  137. package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
  138. package/styled-components/es/examples/plasma_web/components/Badge/Badge.config.js +5 -5
  139. package/styled-components/es/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  140. package/styled-components/es/examples/plasma_web/components/Steps/Steps.config.js +1 -1
  141. package/styled-components/es/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
  142. package/types/components/Badge/Badge.d.ts.map +1 -1
  143. package/types/components/Badge/Badge.tokens.d.ts +8 -4
  144. package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
  145. package/types/components/Badge/Badge.types.d.ts +18 -5
  146. package/types/components/Badge/Badge.types.d.ts.map +1 -1
  147. package/types/components/Badge/variations/_clear/base.d.ts.map +1 -1
  148. package/types/components/Badge/variations/_size/base.d.ts.map +1 -1
  149. package/types/components/Steps/Steps.d.ts.map +1 -1
  150. package/types/components/Steps/Steps.styles.d.ts.map +1 -1
  151. package/types/components/Steps/Steps.tokens.d.ts +0 -1
  152. package/types/components/Steps/Steps.tokens.d.ts.map +1 -1
  153. package/types/components/Steps/ui/StepItem/StepItem.d.ts.map +1 -1
  154. package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts +2 -2
  155. package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts.map +1 -1
  156. package/types/components/Tabs/index.d.ts +2 -2
  157. package/types/components/Tabs/index.d.ts.map +1 -1
  158. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
  159. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +61 -4
  160. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
  161. package/types/examples/plasma_b2c/components/Steps/Steps.config.d.ts.map +1 -1
  162. package/types/examples/plasma_web/components/Badge/Badge.config.d.ts.map +1 -1
  163. package/types/examples/plasma_web/components/Badge/Badge.d.ts +61 -4
  164. package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
  165. package/types/examples/plasma_web/components/Steps/Steps.config.d.ts.map +1 -1
  166. package/cjs/components/Badge/variations/_clear/base_oopyb7.css +0 -1
  167. package/cjs/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
  168. package/cjs/components/Badge/variations/_view/base_qlxank.css +0 -1
  169. package/cjs/components/Steps/ui/StepItem/StepItem.styles_q5nnk6.css +0 -9
  170. package/es/components/Badge/variations/_clear/base_oopyb7.css +0 -1
  171. package/es/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
  172. package/es/components/Badge/variations/_view/base_qlxank.css +0 -1
  173. package/es/components/Steps/ui/StepItem/StepItem.styles_q5nnk6.css +0 -9
@@ -31,6 +31,13 @@ const meta: Meta<typeof Badge> = {
31
31
  control: { type: 'boolean' },
32
32
  if: { arg: 'clear', truthy: false },
33
33
  },
34
+ maxWidth: {
35
+ control: { type: 'text' },
36
+ },
37
+ text: {
38
+ control: { type: 'text' },
39
+ if: { arg: 'enableText', truthy: true },
40
+ },
34
41
  ...disableProps(['contentLeft', 'contentRight']),
35
42
  },
36
43
  };
@@ -40,6 +47,7 @@ export default meta;
40
47
  type StoryProps = ComponentProps<typeof Badge> & {
41
48
  enableContentLeft: boolean;
42
49
  enableContentRight: boolean;
50
+ enableText: boolean;
43
51
  };
44
52
  type Story = StoryObj<StoryProps>;
45
53
 
@@ -60,26 +68,39 @@ export const Default: Story = {
60
68
  },
61
69
  enableContentRight: {
62
70
  control: { type: 'boolean' },
63
- if: { arg: 'enableContentLeft', truthy: false },
71
+ if: { arg: 'enableText', truthy: true },
64
72
  },
65
73
  },
66
74
  args: {
67
- text: 'Hello',
68
75
  view: 'default',
69
76
  size: 'm',
77
+ enableText: true,
78
+ text: 'Hello',
70
79
  enableContentLeft: false,
71
80
  enableContentRight: false,
72
81
  clear: false,
73
82
  pilled: false,
74
83
  transparent: false,
84
+ maxWidth: '',
75
85
  },
76
- render: ({ enableContentLeft, enableContentRight, size, ...rest }: StoryProps) => {
77
- 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
+ };
78
97
 
79
98
  return (
80
99
  <Badge
81
- contentLeft={enableContentLeft ? <BellIcon width={iconSize} height={iconSize} /> : undefined}
82
- 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}
83
104
  size={size}
84
105
  {...rest}
85
106
  />
@@ -13,7 +13,7 @@ var config = exports.config = {
13
13
  },
14
14
  variations: {
15
15
  view: {
16
- "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-primary-hover);", ":solid var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-clear);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":var(--surface-accent);", ":0.4;"], _Steps.stepsTokens.activeTitleColor, _Steps.stepsTokens.activeTitleColorHover, _Steps.stepsTokens.activeIndicatorBorder, _Steps.stepsTokens.activeIndicatorColor, _Steps.stepsTokens.activeIndicatorBackground, _Steps.stepsTokens.completedIndicatorColor, _Steps.stepsTokens.completedIndicatorColorHover, _Steps.stepsTokens.completedIndicatorBackground, _Steps.stepsTokens.completedIndicatorBackgroundHover, _Steps.stepsTokens.inactiveTitleColor, _Steps.stepsTokens.inactiveTitleColorHover, _Steps.stepsTokens.inactiveIndicatorColor, _Steps.stepsTokens.inactiveIndicatorColorHover, _Steps.stepsTokens.inactiveIndicatorBackground, _Steps.stepsTokens.inactiveIndicatorBackgroundHover, _Steps.stepsTokens.contentColor, _Steps.stepsTokens.focusColor, _Steps.stepsTokens.disabledOpacity)
16
+ "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-primary-hover);", ":solid var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-clear);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":0.4;"], _Steps.stepsTokens.activeTitleColor, _Steps.stepsTokens.activeTitleColorHover, _Steps.stepsTokens.activeIndicatorBorder, _Steps.stepsTokens.activeIndicatorColor, _Steps.stepsTokens.activeIndicatorBackground, _Steps.stepsTokens.completedIndicatorColor, _Steps.stepsTokens.completedIndicatorColorHover, _Steps.stepsTokens.completedIndicatorBackground, _Steps.stepsTokens.completedIndicatorBackgroundHover, _Steps.stepsTokens.inactiveTitleColor, _Steps.stepsTokens.inactiveTitleColorHover, _Steps.stepsTokens.inactiveIndicatorColor, _Steps.stepsTokens.inactiveIndicatorColorHover, _Steps.stepsTokens.inactiveIndicatorBackground, _Steps.stepsTokens.inactiveIndicatorBackgroundHover, _Steps.stepsTokens.contentColor, _Steps.stepsTokens.disabledOpacity)
17
17
  },
18
18
  size: {
19
19
  l: /*#__PURE__*/(0, _styledComponents.css)(["", ":1.5rem;", ":2.25rem;", ":0.5rem;", ":1rem;", ":0.75rem;", ":0.375rem;", ":2rem;", ":1.0625rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":1.5rem;", ":1.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.125rem;"], _Steps.stepsTokens.indicatorSize, _Steps.stepsTokens.activeIndicatorSize, _Steps.stepsTokens.bulletSize, _Steps.stepsTokens.activeBulletSize, _Steps.stepsTokens.titlePaddingTop, _Steps.stepsTokens.contentPaddingTop, _Steps.stepsTokens.contentSidePadding, _Steps.stepsTokens.contentVerticalPadding, _Steps.stepsTokens.verticalContentPaddingLeft, _Steps.stepsTokens.smallIndicatorIndentHeight, _Steps.stepsTokens.largeIndicatorIndentHeight, _Steps.stepsTokens.smallBulletIndentHeight, _Steps.stepsTokens.largeBulletIndentHeight, _Steps.stepsTokens.indicatorFontFamily, _Steps.stepsTokens.indicatorFontSize, _Steps.stepsTokens.indicatorFontStyle, _Steps.stepsTokens.indicatorFontWeight, _Steps.stepsTokens.indicatorLetterSpacing, _Steps.stepsTokens.indicatorLineHeight, _Steps.stepsTokens.activeIndicatorFontFamily, _Steps.stepsTokens.activeIndicatorFontSize, _Steps.stepsTokens.activeIndicatorFontStyle, _Steps.stepsTokens.activeIndicatorFontWeight, _Steps.stepsTokens.activeIndicatorLetterSpacing, _Steps.stepsTokens.activeIndicatorLineHeight, _Steps.stepsTokens.titleFontFamily, _Steps.stepsTokens.titleFontSize, _Steps.stepsTokens.titleFontStyle, _Steps.stepsTokens.titleFontWeight, _Steps.stepsTokens.titleLetterSpacing, _Steps.stepsTokens.titleLineHeight, _Steps.stepsTokens.contentFontFamily, _Steps.stepsTokens.contentFontSize, _Steps.stepsTokens.contentFontStyle, _Steps.stepsTokens.contentFontWeight, _Steps.stepsTokens.contentLetterSpacing, _Steps.stepsTokens.contentLineHeight, _Steps.stepsTokens.dividerThickness),
@@ -118,7 +118,7 @@ const DefaultStory = (args) => {
118
118
  };
119
119
 
120
120
  return (
121
- <div style={{ maxWidth, height: '600px' }}>
121
+ <div style={{ maxWidth, height: '400px' }}>
122
122
  <Steps
123
123
  size={size}
124
124
  items={items}
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["children", "className", "text", "contentLeft", "contentRight", "size", "view", "pilled", "transparent", "clear", "maxWidth"];
2
+ var _excluded = ["children", "className", "style", "text", "contentLeft", "contentRight", "size", "view", "customColor", "customBackgroundColor", "pilled", "transparent", "clear", "maxWidth"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -16,16 +16,20 @@ import { base as pilledCSS } from './variations/_pilled/base';
16
16
  import { base as transparentCSS } from './variations/_transparent/base';
17
17
  import { base as clearCSS } from './variations/_clear/base';
18
18
  import { StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Badge.styles';
19
- import { classes } from './Badge.tokens';
19
+ import { classes, privateTokens } from './Badge.tokens';
20
20
  export var badgeRoot = function badgeRoot(Root) {
21
21
  return /*#__PURE__*/forwardRef(function (props, ref) {
22
+ var _StyledContentLeft, _StyledContentMain, _StyledContentMain2, _StyledContentRight;
22
23
  var children = props.children,
23
24
  className = props.className,
25
+ style = props.style,
24
26
  text = props.text,
25
27
  contentLeft = props.contentLeft,
26
28
  contentRight = props.contentRight,
27
29
  size = props.size,
28
30
  view = props.view,
31
+ customColor = props.customColor,
32
+ customBackgroundColor = props.customBackgroundColor,
29
33
  _props$pilled = props.pilled,
30
34
  pilled = _props$pilled === void 0 ? false : _props$pilled,
31
35
  _props$transparent = props.transparent,
@@ -40,19 +44,25 @@ export var badgeRoot = function badgeRoot(Root) {
40
44
  var clearClass = clear ? classes.badgeClear : undefined;
41
45
  var truncateClass = maxWidth !== 'auto' ? classes.badgeTruncate : undefined;
42
46
  var txt = !text && typeof children === 'string' ? children : text;
47
+ var iconOnlyClass = !txt && contentLeft ? classes.iconOnly : undefined;
48
+ var BadgeContent = function BadgeContent() {
49
+ if (contentLeft) {
50
+ return /*#__PURE__*/React.createElement(React.Fragment, null, _StyledContentLeft || (_StyledContentLeft = /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft)), txt ? _StyledContentMain || (_StyledContentMain = /*#__PURE__*/React.createElement(StyledContentMain, null, txt)) : children);
51
+ }
52
+ return /*#__PURE__*/React.createElement(React.Fragment, null, txt ? _StyledContentMain2 || (_StyledContentMain2 = /*#__PURE__*/React.createElement(StyledContentMain, null, txt)) : children, contentRight && (_StyledContentRight || (_StyledContentRight = /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight))));
53
+ };
43
54
  return /*#__PURE__*/React.createElement(Root, _extends({
44
55
  ref: ref,
45
- className: cx(pilledClass, transparentClass, clearClass, truncateClass, className),
56
+ className: cx(pilledClass, transparentClass, clearClass, truncateClass, iconOnlyClass, className),
46
57
  view: view,
47
58
  size: size,
48
59
  pilled: pilled,
49
60
  transparent: transparent,
50
- clear: clear
51
- }, rest, {
52
- style: _objectSpread(_objectSpread({}, rest.style), {}, {
61
+ clear: clear,
62
+ style: _objectSpread(_objectSpread({}, style), {}, _defineProperty(_defineProperty({
53
63
  maxWidth: maxWidth
54
- })
55
- }), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight));
64
+ }, privateTokens.customBackground, customBackgroundColor), privateTokens.customColor, customColor))
65
+ }, rest), /*#__PURE__*/React.createElement(BadgeContent, null));
56
66
  });
57
67
  };
58
68
  export var badgeConfig = {
@@ -2,7 +2,12 @@ export var classes = {
2
2
  badgePilled: 'badge-pilled',
3
3
  badgeTransparent: 'badge-transparent',
4
4
  badgeClear: 'badge-clear',
5
- badgeTruncate: 'badge-truncate'
5
+ badgeTruncate: 'badge-truncate',
6
+ iconOnly: 'badge-icon-only'
7
+ };
8
+ export var privateTokens = {
9
+ customBackground: '--plasma-badge-custom-background',
10
+ customColor: '--plasma-badge-custom-color'
6
11
  };
7
12
  export var tokens = {
8
13
  background: '--plasma-badge-background',
@@ -10,13 +15,12 @@ export var tokens = {
10
15
  backgroundTransparent: '--plasma-badge-background-transparent',
11
16
  colorTransparent: '--plasma-badge-color-transparent',
12
17
  colorClear: '--plasma-badge-color-clear',
18
+ backgroundClear: '--plasma-badge-background-clear',
13
19
  borderRadius: '--plasma-badge-border-radius',
14
20
  pilledBorderRadius: '--plasma-badge-pilled-border-radius',
15
21
  height: '--plasma-badge-height',
16
- paddingTop: '--plasma-badge-padding-top',
17
- paddingRight: '--plasma-badge-padding-right',
18
- paddingBottom: '--plasma-badge-padding-bottom',
19
- paddingLeft: '--plasma-badge-padding-left',
22
+ padding: '--plasma-badge-padding',
23
+ paddingIconOnly: '--plasma-badge-padding-icon-only',
20
24
  fontFamily: '--plasma-badge-font-family',
21
25
  fontSize: '--plasma-badge-font-size',
22
26
  fontStyle: '--plasma-badge-font-style',
@@ -1,3 +1,3 @@
1
1
  import { css } from 'styled-components';
2
- import { classes, tokens } from '../../Badge.tokens';
3
- export var base = /*#__PURE__*/css(["&.", "{color:var(", ");background-color:transparent;padding:0;}"], classes.badgeClear, tokens.colorClear);
2
+ import { classes, privateTokens, tokens } from '../../Badge.tokens';
3
+ export var base = /*#__PURE__*/css(["&.", "{color:var(", ",var(", "));background-color:var(", ",var(", "));}"], classes.badgeClear, privateTokens.customColor, tokens.colorClear, privateTokens.customBackground, tokens.backgroundClear);
@@ -1,3 +1,4 @@
1
1
  import { css } from 'styled-components';
2
- import { tokens } from '../../Badge.tokens';
3
- export var base = /*#__PURE__*/css(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");border-radius:var(", ");height:var(", ");padding-top:var(", ");padding-right:var(", ");padding-bottom:var(", ");padding-left:var(", ");"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.borderRadius, tokens.height, tokens.paddingTop, tokens.paddingRight, tokens.paddingBottom, tokens.paddingLeft);
2
+ import { classes, tokens } from '../../Badge.tokens';
3
+ import { StyledContentLeft } from '../../Badge.styles';
4
+ export var base = /*#__PURE__*/css(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");border-radius:var(", ");height:var(", ");padding:var(", ");&.", "{padding:var(", ");", "{margin:0;}}"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.borderRadius, tokens.height, tokens.padding, classes.iconOnly, tokens.paddingIconOnly, StyledContentLeft);
@@ -1,3 +1,3 @@
1
1
  import { css } from 'styled-components';
2
- import { classes, tokens } from '../../Badge.tokens';
3
- export var base = /*#__PURE__*/css(["&.", "{color:var(", ");background-color:var(", ");}"], classes.badgeTransparent, tokens.colorTransparent, tokens.backgroundTransparent);
2
+ import { classes, privateTokens, tokens } from '../../Badge.tokens';
3
+ export var base = /*#__PURE__*/css(["&.", "{color:var(", ",var(", "));background-color:var(", ",var(", "));}"], classes.badgeTransparent, privateTokens.customColor, tokens.colorTransparent, privateTokens.customBackground, tokens.backgroundTransparent);
@@ -1,3 +1,3 @@
1
1
  import { css } from 'styled-components';
2
- import { tokens } from '../../Badge.tokens';
3
- export var base = /*#__PURE__*/css(["color:var(", ");background-color:var(", ");"], tokens.color, tokens.background);
2
+ import { privateTokens, tokens } from '../../Badge.tokens';
3
+ export var base = /*#__PURE__*/css(["color:var(", ",var(", "));background-color:var(", ",var(", "));"], privateTokens.customColor, tokens.color, privateTokens.customBackground, tokens.background);
@@ -1,8 +1,6 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
2
  var _excluded = ["view", "size", "orientation", "contentAlign", "hasLine", "hasContent", "hasLoader", "items", "onChange", "current", "status"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -14,7 +12,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
14
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
13
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
16
14
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
17
- import React, { forwardRef, useState, useEffect, useMemo } from 'react';
15
+ import React, { forwardRef, useState, useEffect } from 'react';
18
16
  import cls from 'classnames';
19
17
  import { classes } from './Steps.tokens';
20
18
  import { StepItem } from './ui';
@@ -46,33 +44,19 @@ export var stepsRoot = function stepsRoot(Root) {
46
44
  _useState2 = _slicedToArray(_useState, 2),
47
45
  prevIndex = _useState2[0],
48
46
  setPrevIndex = _useState2[1];
47
+ var isUncontrolled = current !== undefined;
49
48
  var hasIndicator = items.some(function (item) {
50
49
  return item.indicator != null;
51
50
  });
52
51
  var isSimple = items.every(function (item) {
53
52
  return !item.title && !item.content;
54
53
  });
55
- var innerItems = useMemo(function () {
56
- var isUncontrolled = current !== undefined;
57
- return items.map(function (item, index) {
58
- var itemStatus = getItemStatus({
59
- isUncontrolled: isUncontrolled,
60
- current: current,
61
- status: status,
62
- index: index,
63
- item: item
64
- });
65
- return _objectSpread(_objectSpread({}, item), {}, {
66
- status: itemStatus
67
- });
68
- });
69
- }, [status, current, items]);
70
54
  useEffect(function () {
71
55
  var calcPrevIndex = function calcPrevIndex() {
72
56
  if (current !== undefined) {
73
57
  setPrevIndex(current);
74
58
  } else {
75
- var index = innerItems.findIndex(function (item) {
59
+ var index = items.findIndex(function (item) {
76
60
  return item.status === 'active';
77
61
  });
78
62
  setPrevIndex(index !== -1 ? index : undefined);
@@ -82,14 +66,21 @@ export var stepsRoot = function stepsRoot(Root) {
82
66
  return function () {
83
67
  calcPrevIndex();
84
68
  };
85
- }, [current, innerItems]);
69
+ }, [current, items]);
86
70
  return /*#__PURE__*/React.createElement(Root, _extends({
87
71
  size: size,
88
72
  view: view,
89
73
  ref: outerRef,
90
74
  className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, orientation === 'vertical'), classes.simple, isSimple), classes.hasIndicator, hasIndicator))
91
- }, rest), innerItems.map(function (item, index) {
92
- var isActive = item.status === 'active';
75
+ }, rest), items.map(function (item, index) {
76
+ var itemStatus = getItemStatus({
77
+ isUncontrolled: isUncontrolled,
78
+ current: current,
79
+ status: status,
80
+ index: index,
81
+ item: item
82
+ });
83
+ var isActive = itemStatus === 'active';
93
84
  var itemContent = hasContent === 'active' && !isActive || hasContent === 'none' ? '' : item.content;
94
85
  var itemContentAlign = orientation === 'horizontal' ? contentAlign : 'left';
95
86
  var onClick = onChange ? function () {
@@ -101,14 +92,14 @@ export var stepsRoot = function stepsRoot(Root) {
101
92
  title: item.title,
102
93
  content: itemContent,
103
94
  indicator: item.indicator,
104
- status: item.status,
95
+ status: itemStatus,
105
96
  size: size,
106
97
  orientation: orientation,
107
98
  contentAlign: itemContentAlign,
108
99
  hasLine: hasLine,
109
100
  hasLoader: hasLoader && isActive,
110
101
  onClick: onClick,
111
- items: innerItems
102
+ items: items
112
103
  });
113
104
  }));
114
105
  });
@@ -1,3 +1,3 @@
1
1
  import { css } from 'styled-components';
2
2
  import { classes, tokens } from './Steps.tokens';
3
- export var base = /*#__PURE__*/css(["display:flex;flex-direction:row;&.", "{align-items:center;&:not(&.", "){&.", "{height:var(", ");}&:not(.", "){height:var(", ");}}&.", "{&.", "{width:var(", ");}&:not(.", "){width:var(", ");}}}&.", "{display:flex;flex-direction:column;justify-content:center;height:100%;}"], classes.simple, classes.verticalOrientation, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.verticalOrientation, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.verticalOrientation);
3
+ export var base = /*#__PURE__*/css(["display:flex;flex-direction:row;&.", "{align-items:center;&:not(&.", "){&.", "{height:var(", ");}&:not(.", "){height:var(", ");}}&.", "{&.", "{width:var(", ");}&:not(.", "){width:var(", ");}}}&.", "{display:flex;flex-direction:column;justify-content:center;height:100%;&.", "{display:inline-flex;}}"], classes.simple, classes.verticalOrientation, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.verticalOrientation, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.verticalOrientation, classes.simple);
@@ -56,7 +56,6 @@ export var tokens = {
56
56
  inactiveTitleColor: '--plasma-step-item-inactive-title-color',
57
57
  inactiveTitleColorHover: '--plasma-step-item-inactive-title-color-hover',
58
58
  contentColor: '--plasma-step-item-content-color',
59
- focusColor: '--plasma-step-item-focus-color',
60
59
  activeIndicatorBorder: '--plasma-step-item-active-indicator-border',
61
60
  activeIndicatorBorderHover: '--plasma-step-item-active-indicator-border-hover',
62
61
  activeIndicatorColor: '--plasma-step-item-active-indicator-color',
@@ -43,7 +43,6 @@ export var StepItem = function StepItem(_ref) {
43
43
  var prevItem = items[index - 1];
44
44
  var nextItem = items[index + 1];
45
45
  var isActive = status === 'active';
46
- var isNextActive = (nextItem === null || nextItem === void 0 ? void 0 : nextItem.status) === 'active';
47
46
  var isInactive = status === 'inactive';
48
47
  var isPrevInactive = prevItem && !(prevItem !== null && prevItem !== void 0 && prevItem.status) || (prevItem === null || prevItem === void 0 ? void 0 : prevItem.status) === 'inactive';
49
48
  var isNextInactive = !(nextItem !== null && nextItem !== void 0 && nextItem.status) || (nextItem === null || nextItem === void 0 ? void 0 : nextItem.status) === 'inactive';
@@ -81,31 +80,8 @@ export var StepItem = function StepItem(_ref) {
81
80
  setIsHovered(false);
82
81
  }
83
82
  }, [isDisabled]);
84
- if (isSimple) {
85
- var _cls;
86
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StepItemStyled, {
87
- className: cls((_cls = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_cls, classes.simple, isSimple), classes.active, isActive), classes.hovered, isHovered && !isActive), classes.inactive, isInactive), classes.centered, isCentered), classes.disabled, isDisabled), classes.clickable, clickable && !isActive), classes.hasIndicator, hasIndicator), classes.verticalOrientation, isVertical), "isFirst", isFirst), _defineProperty(_defineProperty(_defineProperty(_cls, "isLast", isLast), "isPrevInactive", isPrevInactive), "isNextInactive", isNextInactive)))
88
- }, /*#__PURE__*/React.createElement(BulletIndicatorWrapper, {
89
- className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.centered, isCentered), classes.simple, isSimple), classes.hasIndicator, hasIndicator)),
90
- onClick: onClickHandler,
91
- onFocus: onMouseOver,
92
- onBlur: onMouseOut,
93
- onMouseOver: onMouseOver,
94
- onMouseOut: onMouseOut
95
- }, hasLoader && /*#__PURE__*/React.createElement(SpinnerStyled, {
96
- hasIndicator: hasIndicator
97
- }), !hasLoader && /*#__PURE__*/React.createElement(BulletNode, {
98
- className: cls(_defineProperty(_defineProperty({}, classes.active, isActive), classes.inactive, isInactive))
99
- }, typeof indicator === 'function' && indicator({
100
- status: status,
101
- item: item,
102
- size: size
103
- }), typeof indicator !== 'function' && indicator))), !isLast && /*#__PURE__*/React.createElement(StepItemDivider, {
104
- className: cls(classes.simple, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.transparentDivider, !hasLine), classes.active, isActive), classes.inactive, isInactive || isNextInactive))
105
- }));
106
- }
107
83
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StepItemStyled, {
108
- className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.active, isActive), classes.hovered, isHovered && !isActive), classes.inactive, isInactive), classes.centered, isCentered), classes.disabled, isDisabled), classes.clickable, clickable && !isActive), classes.hasIndicator, hasIndicator), classes.verticalOrientation, isVertical), "isNextActive", isNextActive))
84
+ className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.active, isActive), classes.hovered, isHovered && !isActive), classes.inactive, isInactive), classes.centered, isCentered), classes.disabled, isDisabled), classes.clickable, clickable && !isActive), classes.hasIndicator, hasIndicator), classes.verticalOrientation, isVertical))
109
85
  }, /*#__PURE__*/React.createElement(BulletIndicatorWrapper, {
110
86
  className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.centered, isCentered), classes.simple, isSimple), classes.hasIndicator, hasIndicator)),
111
87
  onClick: onClickHandler,
@@ -115,7 +91,7 @@ export var StepItem = function StepItem(_ref) {
115
91
  onMouseOut: onMouseOut
116
92
  }, contentAlign === 'center' && !isSimple && /*#__PURE__*/React.createElement(StepItemDivider, {
117
93
  className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isFirst), classes.inactive, isInactive || isPrevInactive))
118
- }), isVertical && /*#__PURE__*/React.createElement(StepItemDivider, {
94
+ }), isVertical && (isSimple ? !isFirst : true) && /*#__PURE__*/React.createElement(StepItemDivider, {
119
95
  className: cls(classes.indentDivider, _defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isFirst), classes.inactive, isInactive || isPrevInactive)),
120
96
  indentToken: indentToken
121
97
  }), hasLoader && /*#__PURE__*/React.createElement(SpinnerStyled, {
@@ -126,9 +102,9 @@ export var StepItem = function StepItem(_ref) {
126
102
  status: status,
127
103
  item: item,
128
104
  size: size
129
- }), typeof indicator !== 'function' && indicator), /*#__PURE__*/React.createElement(StepItemDivider, {
105
+ }), typeof indicator !== 'function' && indicator), !isSimple && /*#__PURE__*/React.createElement(StepItemDivider, {
130
106
  className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isLast), classes.inactive, isInactive || isNextInactive))
131
- })), /*#__PURE__*/React.createElement(StepItemContentWrapper, {
107
+ })), !isSimple && /*#__PURE__*/React.createElement(StepItemContentWrapper, {
132
108
  className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.centered, isCentered), classes.active, isActive), classes.hasIndicator, hasIndicator))
133
109
  }, /*#__PURE__*/React.createElement(StepItemTitle, {
134
110
  onClick: onClickHandler,
@@ -136,5 +112,7 @@ export var StepItem = function StepItem(_ref) {
136
112
  onBlur: onMouseOut,
137
113
  onMouseOver: onMouseOver,
138
114
  onMouseOut: onMouseOut
139
- }, title), content && /*#__PURE__*/React.createElement(StepItemContent, null, typeof content === 'function' ? content(status, index, items) : content))));
115
+ }, title), content && /*#__PURE__*/React.createElement(StepItemContent, null, typeof content === 'function' ? content(status, index, items) : content))), isSimple && !isLast && /*#__PURE__*/React.createElement(StepItemDivider, {
116
+ className: cls(classes.simple, _defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.transparentDivider, !hasLine), classes.inactive, isInactive || isNextInactive))
117
+ }));
140
118
  };
@@ -2,7 +2,6 @@ import styled from 'styled-components';
2
2
  import { classes, tokens } from '../../Steps.tokens';
3
3
  import { component, mergeConfig } from '../../../../engines';
4
4
  import { spinnerConfig, spinnerTokens } from '../../../Spinner';
5
- import { addFocus } from '../../../../mixins';
6
5
  var mergedConfig = /*#__PURE__*/mergeConfig(spinnerConfig);
7
6
  var Spinner = /*#__PURE__*/component(mergedConfig);
8
7
  export var SpinnerStyled = /*#__PURE__*/styled(Spinner).withConfig({
@@ -19,26 +18,16 @@ export var StepItemContent = /*#__PURE__*/styled.div.withConfig({
19
18
  })(["padding-top:var(", ");padding-right:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");word-break:break-word;color:var(", ");"], tokens.contentPaddingTop, tokens.contentSidePadding, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight, tokens.contentColor);
20
19
  export var BulletIndicatorWrapper = /*#__PURE__*/styled.div.withConfig({
21
20
  componentId: "plasma-new-hope__sc-bjma6z-3"
22
- })(["display:flex;align-items:center;&:not(.", "){flex:0;&.", "{width:100%;min-height:var(", ");}&:not(.", "){width:100%;min-height:var(", ");}&.", "{padding-right:var(", ");}}&.", "{flex:0;justify-content:center;&.", "{width:var(", ");}&:not(.", "){width:var(", ");}}&.", "{flex-direction:column;align-items:center;justify-content:center;&.", "{min-width:var(", ");}&:not(.", "){min-width:var(", ");}}&.", "{justify-content:center;}"], classes.simple, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.verticalOrientation, tokens.verticalContentPaddingLeft, classes.simple, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.verticalOrientation, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.centered);
23
- export var BulletIndicator = /*#__PURE__*/styled.button.withConfig({
21
+ })(["display:flex;align-items:center;&:not(.", "){flex:0;&.", "{width:100%;min-height:var(", ");}&:not(.", "){width:100%;min-height:var(", ");}&.", "{padding-right:var(", ");}}&.", "{flex-direction:column;align-items:center;justify-content:center;min-height:100%;&.", "{min-width:var(", ");}&:not(.", "){min-width:var(", ");}}&.", "{justify-content:center;}"], classes.simple, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.verticalOrientation, tokens.verticalContentPaddingLeft, classes.verticalOrientation, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.centered);
22
+ export var BulletIndicator = /*#__PURE__*/styled.div.withConfig({
24
23
  componentId: "plasma-new-hope__sc-bjma6z-4"
25
- })(["display:flex;align-items:center;justify-content:center;width:var(", ");height:var(", ");border-radius:50%;box-sizing:border-box;position:relative;outline:none;padding:0;margin:0;border:none;color:var(", ");background-color:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");", " &.", "{width:var(", ");height:var(", ");border:var(", ") var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");color:var(", ");background:var(", ");", "}&.", "{color:var(", ");background:var(", ");&.", "{&:before,&:after{background:var(", ");}}}"], tokens.indicatorSize, tokens.indicatorSize, tokens.completedIndicatorColor, tokens.completedIndicatorBackground, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, /*#__PURE__*/addFocus({
26
- outlineOffset: '-0.0625rem',
27
- outlineSize: '0.0625rem',
28
- outlineRadius: '50%',
29
- outlineColor: /*#__PURE__*/"var(".concat(tokens.focusColor, ")")
30
- }), classes.active, tokens.activeIndicatorSize, tokens.activeIndicatorSize, tokens.dividerThickness, tokens.activeIndicatorBorder, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.activeIndicatorColor, tokens.activeIndicatorBackground, /*#__PURE__*/addFocus({
31
- outlineOffset: '-0.1875rem',
32
- outlineSize: '0.0625rem',
33
- outlineRadius: '50%',
34
- outlineColor: /*#__PURE__*/"var(".concat(tokens.focusColor, ")")
35
- }), classes.inactive, tokens.inactiveIndicatorColor, tokens.inactiveIndicatorBackground, classes.simple, tokens.inactiveIndicatorBackground);
24
+ })(["display:flex;align-items:center;justify-content:center;width:var(", ");height:var(", ");border-radius:50%;box-sizing:border-box;position:relative;color:var(", ");background-color:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");&.", "{width:var(", ");height:var(", ");border:var(", ") var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");color:var(", ");background:var(", ");}&.", "{color:var(", ");background:var(", ");&:before,&:after{background:var(", ");}}"], tokens.indicatorSize, tokens.indicatorSize, tokens.completedIndicatorColor, tokens.completedIndicatorBackground, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, classes.active, tokens.activeIndicatorSize, tokens.activeIndicatorSize, tokens.dividerThickness, tokens.activeIndicatorBorder, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.activeIndicatorColor, tokens.activeIndicatorBackground, classes.inactive, tokens.inactiveIndicatorColor, tokens.inactiveIndicatorBackground, tokens.inactiveIndicatorBackground);
36
25
  export var Bullet = /*#__PURE__*/styled(BulletIndicator).withConfig({
37
26
  componentId: "plasma-new-hope__sc-bjma6z-5"
38
- })(["width:var(", ");height:var(", ");&.", "{width:var(", ");height:var(", ");border:var(", ") var(", ");background:var(", ");}"], tokens.bulletSize, tokens.bulletSize, classes.active, tokens.activeBulletSize, tokens.activeBulletSize, tokens.dividerThickness, tokens.activeIndicatorBorder, tokens.activeIndicatorBackground);
27
+ })(["width:var(", ");height:var(", ");&.", "{width:var(", ");height:var(", ");border:var(", ") var(", ");background-color:var(", ");}"], tokens.bulletSize, tokens.bulletSize, classes.active, tokens.activeBulletSize, tokens.activeBulletSize, tokens.dividerThickness, tokens.activeIndicatorBorder, tokens.activeIndicatorBackground);
39
28
  export var StepItemDivider = /*#__PURE__*/styled.div.withConfig({
40
29
  componentId: "plasma-new-hope__sc-bjma6z-6"
41
- })(["width:100%;height:var(", ");flex:1;background:var(", ");&.", "{background:var(", ");}&.", "{background:transparent;}&.", "{width:var(", ");height:100%;}&.", "{height:", ";min-height:", ";max-height:", ";&.", "{height:auto;max-height:none;}}"], tokens.dividerThickness, tokens.activeIndicatorColor, classes.inactive, tokens.inactiveIndicatorBackground, classes.transparentDivider, classes.verticalOrientation, tokens.dividerThickness, classes.indentDivider, function (_ref2) {
30
+ })(["width:100%;height:var(", ");flex:1;background-color:var(", ");&.", "{background-color:var(", ");}&.", "{background-color:transparent;}&.", "{width:var(", ");height:100%;}&.", "{height:", ";min-height:", ";max-height:", ";&.", "{height:auto;max-height:none;}}"], tokens.dividerThickness, tokens.activeIndicatorColor, classes.inactive, tokens.inactiveIndicatorBackground, classes.transparentDivider, classes.verticalOrientation, tokens.dividerThickness, classes.indentDivider, function (_ref2) {
42
31
  var indentToken = _ref2.indentToken;
43
32
  return indentToken || '';
44
33
  }, function (_ref3) {
@@ -53,4 +42,4 @@ export var StepItemContentWrapper = /*#__PURE__*/styled.div.withConfig({
53
42
  })(["&.", "{", "{padding-top:var(", ");padding-right:0;}", "{padding-top:var(", ");padding-bottom:var(", ");padding-right:0;}}"], classes.verticalOrientation, StepItemTitle, tokens.contentVerticalPadding, StepItemContent, tokens.contentVerticalPadding, tokens.contentVerticalPadding);
54
43
  export var StepItemStyled = /*#__PURE__*/styled.div.withConfig({
55
44
  componentId: "plasma-new-hope__sc-bjma6z-8"
56
- })(["position:relative;display:flex;flex-direction:column;align-items:flex-start;flex:1;color:var(", ");&.", "{flex-direction:row;align-items:stretch;", "{width:var(", ");height:100%;}}&.", "{", "{color:var(", ");}}&.", "{color:var(", ");", "{color:var(", ");}}&.", "{flex:0;align-items:center;justify-content:center;flex-direction:row;height:100%;&.", "{min-width:var(", ");min-height:var(", ");}&:not(.", "){width:var(", ");min-height:var(", ");}&.", ",&:not(.", "){&:before,&:after{content:'';display:block;width:calc((var(", ") - var(", ")) / 2);height:var(", ");background:var(", ");}&:not(.", "){&:before,&:after{width:calc((var(", ") - var(", ")) / 2);}}&.", "{flex-direction:column;&:before,&:after{width:var(", ");height:calc((var(", ") - var(", ")) / 2);margin:0 auto;align-self:auto;}&:not(.", "){&:before,&:after{height:calc((var(", ") - var(", ")) / 2);}}&:after{margin:0 auto;}}&.isFirst{&:before{background:transparent;}}&.isLast{&:after{background:transparent;}}}&.", "{&:after,&:before{background:var(", ");}}&.isPrevInactive{&:before{background:var(", ");}}&.isNextInactive{&:after{background:var(", ");}}}&:not(.", "):not(.", "){&.isNextActive{", "{width:calc(100% - (var(", ") - var(", ")) / 2);}}&.", "{", "{margin-left:calc((var(", ") - var(", ")) / -2);width:calc(100% + (var(", ") - var(", ")) / 2);}}}&.", "{&:not(.", "){", "{cursor:pointer;color:var(", ");}", ",", "{color:var(", ");background:var(", ");}}&.", "{", "{color:var(", ");}", ",", "{color:var(", ");background:var(", ");}}", "{cursor:pointer;}}&.", "{align-items:center;", "{display:flex;flex-direction:column;align-items:center;padding-left:calc(var(", ") / 2);padding-right:calc(var(", ") / 2);", "{width:100%;}", ",", "{padding-right:0;text-align:center;}}}&.", "{opacity:var(", ");}"], tokens.activeIndicatorColor, classes.verticalOrientation, StepItemDivider, tokens.dividerThickness, classes.active, StepItemTitle, tokens.activeTitleColor, classes.inactive, tokens.inactiveIndicatorColor, StepItemTitle, tokens.inactiveTitleColor, classes.simple, classes.hasIndicator, tokens.activeIndicatorSize, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, tokens.activeBulletSize, classes.inactive, classes.active, tokens.activeIndicatorSize, tokens.indicatorSize, tokens.dividerThickness, tokens.activeIndicatorColor, classes.hasIndicator, tokens.activeBulletSize, tokens.bulletSize, classes.verticalOrientation, tokens.dividerThickness, tokens.activeIndicatorSize, tokens.indicatorSize, classes.hasIndicator, tokens.activeBulletSize, tokens.bulletSize, classes.inactive, tokens.inactiveIndicatorBackground, tokens.inactiveIndicatorBackground, tokens.inactiveIndicatorBackground, classes.simple, classes.verticalOrientation, BulletIndicatorWrapper, tokens.activeIndicatorSize, tokens.indicatorSize, classes.active, BulletIndicatorWrapper, tokens.activeIndicatorSize, tokens.indicatorSize, tokens.activeIndicatorSize, tokens.indicatorSize, classes.hovered, classes.active, StepItemTitle, tokens.activeTitleColorHover, BulletIndicator, Bullet, tokens.completedIndicatorColorHover, tokens.completedIndicatorBackgroundHover, classes.inactive, StepItemTitle, tokens.inactiveTitleColorHover, BulletIndicator, Bullet, tokens.inactiveIndicatorColorHover, tokens.inactiveIndicatorBackgroundHover, BulletIndicatorWrapper, classes.centered, StepItemContentWrapper, tokens.contentSidePadding, tokens.contentSidePadding, StepItemTitle, StepItemTitle, StepItemContent, classes.disabled, tokens.disabledOpacity);
45
+ })(["display:flex;flex-direction:column;align-items:flex-start;flex:1;&.", "{flex-direction:row;align-items:stretch;", "{width:var(", ");height:100%;}}&.", "{", "{color:var(", ");}}&.", "{", "{color:var(", ");}}&.", "{&:not(.", "){", "{cursor:pointer;color:var(", ");}", ",", "{color:var(", ");background:var(", ");}}&.", "{", "{color:var(", ");}", ",", "{color:var(", ");background:var(", ");}}", "{cursor:pointer;}}&.", "{align-items:center;", "{display:flex;flex-direction:column;align-items:center;padding-left:calc(var(", ") / 2);padding-right:calc(var(", ") / 2);", "{width:100%;}", ",", "{padding-right:0;text-align:center;}}}&.", "{flex:0;}&.", "{opacity:var(", ");}"], classes.verticalOrientation, StepItemDivider, tokens.dividerThickness, classes.active, StepItemTitle, tokens.activeTitleColor, classes.inactive, StepItemTitle, tokens.inactiveTitleColor, classes.hovered, classes.active, StepItemTitle, tokens.activeTitleColorHover, BulletIndicator, Bullet, tokens.completedIndicatorColorHover, tokens.completedIndicatorBackgroundHover, classes.inactive, StepItemTitle, tokens.inactiveTitleColorHover, BulletIndicator, Bullet, tokens.inactiveIndicatorColorHover, tokens.inactiveIndicatorBackgroundHover, BulletIndicatorWrapper, classes.centered, StepItemContentWrapper, tokens.contentSidePadding, tokens.contentSidePadding, StepItemTitle, StepItemTitle, StepItemContent, classes.simple, classes.disabled, tokens.disabledOpacity);
@@ -16,10 +16,10 @@ export var config = {
16
16
  light: /*#__PURE__*/css(["", ":var(--on-light-text-primary);", ":var(--on-dark-surface-solid-default);", ":var(--on-dark-text-primary);", ":var(--on-dark-surface-transparent-card);", ":var(--on-dark-text-primary);"], badgeTokens.color, badgeTokens.background, badgeTokens.colorTransparent, badgeTokens.backgroundTransparent, badgeTokens.colorClear)
17
17
  },
18
18
  size: {
19
- l: /*#__PURE__*/css(["", ":0.5rem;", ":1.75rem;", ":0.6875rem;", ":0.6875rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":-0.0625rem;", ":0.25rem;", ":0.25rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
20
- m: /*#__PURE__*/css(["", ":0.375rem;", ":1.5rem;", ":0.5625rem;", ":0.5625rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":-0.0625rem;", ":0.1875rem;", ":0.1875rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
21
- s: /*#__PURE__*/css(["", ":0.375rem;", ":1.25rem;", ":0.4375rem;", ":0.4375rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
22
- xs: /*#__PURE__*/css(["", ":0.25rem;", ":1rem;", ":0.25rem;", ":0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight)
19
+ l: /*#__PURE__*/css(["", ":0.5rem;", ":1.75rem;", ":0 0.6875rem;", ":0 0.375rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":-0.0625rem;", ":0.25rem;", ":0.25rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
20
+ m: /*#__PURE__*/css(["", ":0.375rem;", ":1.5rem;", ":0 0.5625rem;", ":0 0.375rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":-0.0625rem;", ":0.1875rem;", ":0.1875rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
21
+ s: /*#__PURE__*/css(["", ":0.375rem;", ":1.25rem;", ":0 0.4375rem;", ":0 0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
22
+ xs: /*#__PURE__*/css(["", ":0.25rem;", ":1rem;", ":0 0.25rem;", ":0 0.188rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight)
23
23
  },
24
24
  pilled: {
25
25
  "true": /*#__PURE__*/css(["", ":1.25rem;"], badgeTokens.pilledBorderRadius)
@@ -28,7 +28,7 @@ export var config = {
28
28
  "true": /*#__PURE__*/css([""])
29
29
  },
30
30
  clear: {
31
- "true": /*#__PURE__*/css([""])
31
+ "true": /*#__PURE__*/css(["", ":var(--surface-clear);"], badgeTokens.backgroundClear)
32
32
  },
33
33
  truncate: {
34
34
  "true": /*#__PURE__*/css([""])
@@ -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
  />
@@ -7,7 +7,7 @@ export var config = {
7
7
  },
8
8
  variations: {
9
9
  view: {
10
- "default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-primary-hover);", ":solid var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-clear);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":var(--surface-accent);", ":0.4;"], tokens.activeTitleColor, tokens.activeTitleColorHover, tokens.activeIndicatorBorder, tokens.activeIndicatorColor, tokens.activeIndicatorBackground, tokens.completedIndicatorColor, tokens.completedIndicatorColorHover, tokens.completedIndicatorBackground, tokens.completedIndicatorBackgroundHover, tokens.inactiveTitleColor, tokens.inactiveTitleColorHover, tokens.inactiveIndicatorColor, tokens.inactiveIndicatorColorHover, tokens.inactiveIndicatorBackground, tokens.inactiveIndicatorBackgroundHover, tokens.contentColor, tokens.focusColor, tokens.disabledOpacity)
10
+ "default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-primary-hover);", ":solid var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-clear);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":0.4;"], tokens.activeTitleColor, tokens.activeTitleColorHover, tokens.activeIndicatorBorder, tokens.activeIndicatorColor, tokens.activeIndicatorBackground, tokens.completedIndicatorColor, tokens.completedIndicatorColorHover, tokens.completedIndicatorBackground, tokens.completedIndicatorBackgroundHover, tokens.inactiveTitleColor, tokens.inactiveTitleColorHover, tokens.inactiveIndicatorColor, tokens.inactiveIndicatorColorHover, tokens.inactiveIndicatorBackground, tokens.inactiveIndicatorBackgroundHover, tokens.contentColor, tokens.disabledOpacity)
11
11
  },
12
12
  size: {
13
13
  l: /*#__PURE__*/css(["", ":1.5rem;", ":2.25rem;", ":0.5rem;", ":1rem;", ":0.75rem;", ":0.375rem;", ":2rem;", ":1.0625rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":1.5rem;", ":1.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.125rem;"], tokens.indicatorSize, tokens.activeIndicatorSize, tokens.bulletSize, tokens.activeBulletSize, tokens.titlePaddingTop, tokens.contentPaddingTop, tokens.contentSidePadding, tokens.contentVerticalPadding, tokens.verticalContentPaddingLeft, tokens.smallIndicatorIndentHeight, tokens.largeIndicatorIndentHeight, tokens.smallBulletIndentHeight, tokens.largeBulletIndentHeight, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.titleFontFamily, tokens.titleFontSize, tokens.titleFontStyle, tokens.titleFontWeight, tokens.titleLetterSpacing, tokens.titleLineHeight, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight, tokens.dividerThickness),