@salutejs/plasma-new-hope 0.195.0-canary.1574.11921374356.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 (111) 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/index.css +4 -4
  21. package/emotion/cjs/components/Autocomplete/Autocomplete.js +1 -7
  22. package/emotion/cjs/components/Badge/Badge.js +17 -7
  23. package/emotion/cjs/components/Badge/Badge.template-doc.mdx +40 -16
  24. package/emotion/cjs/components/Badge/Badge.tokens.js +10 -6
  25. package/emotion/cjs/components/Badge/variations/_clear/base.js +1 -1
  26. package/emotion/cjs/components/Badge/variations/_size/base.js +2 -1
  27. package/emotion/cjs/components/Badge/variations/_transparent/base.js +1 -1
  28. package/emotion/cjs/components/Badge/variations/_view/base.js +1 -1
  29. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
  30. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  31. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.config.js +14 -14
  32. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  33. package/emotion/es/components/Autocomplete/Autocomplete.js +1 -7
  34. package/emotion/es/components/Badge/Badge.js +18 -8
  35. package/emotion/es/components/Badge/Badge.template-doc.mdx +40 -16
  36. package/emotion/es/components/Badge/Badge.tokens.js +9 -5
  37. package/emotion/es/components/Badge/variations/_clear/base.js +2 -2
  38. package/emotion/es/components/Badge/variations/_size/base.js +3 -2
  39. package/emotion/es/components/Badge/variations/_transparent/base.js +2 -2
  40. package/emotion/es/components/Badge/variations/_view/base.js +2 -2
  41. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
  42. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  43. package/emotion/es/examples/plasma_web/components/Badge/Badge.config.js +14 -14
  44. package/emotion/es/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  45. package/es/components/Autocomplete/Autocomplete.js +1 -7
  46. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  47. package/es/components/Badge/Badge.css +4 -4
  48. package/es/components/Badge/Badge.js +20 -10
  49. package/es/components/Badge/Badge.js.map +1 -1
  50. package/es/components/Badge/Badge.tokens.js +10 -6
  51. package/es/components/Badge/Badge.tokens.js.map +1 -1
  52. package/es/components/Badge/variations/_clear/base.js +1 -1
  53. package/es/components/Badge/variations/_clear/base.js.map +1 -1
  54. package/es/components/Badge/variations/_clear/base_wiboj8.css +1 -0
  55. package/es/components/Badge/variations/_size/base.js +1 -1
  56. package/es/components/Badge/variations/_size/base.js.map +1 -1
  57. package/{cjs/components/Badge/variations/_size/base_to0y5x.css → es/components/Badge/variations/_size/base_bu5opk.css} +1 -1
  58. package/es/components/Badge/variations/_transparent/base.js +1 -1
  59. package/es/components/Badge/variations/_transparent/base.js.map +1 -1
  60. package/es/components/Badge/variations/_transparent/base_aapqhz.css +1 -0
  61. package/es/components/Badge/variations/_view/base.js +1 -1
  62. package/es/components/Badge/variations/_view/base.js.map +1 -1
  63. package/es/components/Badge/variations/_view/base_j3xzf3.css +1 -0
  64. package/es/index.css +4 -4
  65. package/package.json +2 -2
  66. package/styled-components/cjs/components/Autocomplete/Autocomplete.js +1 -7
  67. package/styled-components/cjs/components/Badge/Badge.js +17 -7
  68. package/styled-components/cjs/components/Badge/Badge.template-doc.mdx +40 -16
  69. package/styled-components/cjs/components/Badge/Badge.tokens.js +10 -6
  70. package/styled-components/cjs/components/Badge/variations/_clear/base.js +1 -1
  71. package/styled-components/cjs/components/Badge/variations/_size/base.js +2 -1
  72. package/styled-components/cjs/components/Badge/variations/_transparent/base.js +1 -1
  73. package/styled-components/cjs/components/Badge/variations/_view/base.js +1 -1
  74. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
  75. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  76. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.config.js +5 -5
  77. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  78. package/styled-components/es/components/Autocomplete/Autocomplete.js +1 -7
  79. package/styled-components/es/components/Badge/Badge.js +18 -8
  80. package/styled-components/es/components/Badge/Badge.template-doc.mdx +40 -16
  81. package/styled-components/es/components/Badge/Badge.tokens.js +9 -5
  82. package/styled-components/es/components/Badge/variations/_clear/base.js +2 -2
  83. package/styled-components/es/components/Badge/variations/_size/base.js +3 -2
  84. package/styled-components/es/components/Badge/variations/_transparent/base.js +2 -2
  85. package/styled-components/es/components/Badge/variations/_view/base.js +2 -2
  86. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
  87. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
  88. package/styled-components/es/examples/plasma_web/components/Badge/Badge.config.js +5 -5
  89. package/styled-components/es/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
  90. package/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  91. package/types/components/Autocomplete/Autocomplete.types.d.ts +0 -4
  92. package/types/components/Autocomplete/Autocomplete.types.d.ts.map +1 -1
  93. package/types/components/Badge/Badge.d.ts.map +1 -1
  94. package/types/components/Badge/Badge.tokens.d.ts +8 -4
  95. package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
  96. package/types/components/Badge/Badge.types.d.ts +18 -5
  97. package/types/components/Badge/Badge.types.d.ts.map +1 -1
  98. package/types/components/Badge/variations/_clear/base.d.ts.map +1 -1
  99. package/types/components/Badge/variations/_size/base.d.ts.map +1 -1
  100. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
  101. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +61 -4
  102. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
  103. package/types/examples/plasma_web/components/Badge/Badge.config.d.ts.map +1 -1
  104. package/types/examples/plasma_web/components/Badge/Badge.d.ts +61 -4
  105. package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
  106. package/cjs/components/Badge/variations/_clear/base_oopyb7.css +0 -1
  107. package/cjs/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
  108. package/cjs/components/Badge/variations/_view/base_qlxank.css +0 -1
  109. package/es/components/Badge/variations/_clear/base_oopyb7.css +0 -1
  110. package/es/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
  111. package/es/components/Badge/variations/_view/base_qlxank.css +0 -1
@@ -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
  />
@@ -1,4 +1,4 @@
1
- var _excluded = ["value", "defaultValue", "onChange", "suggestions", "view", "size", "labelPlacement", "disabled", "readOnly", "label", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "onScroll", "listMaxHeight", "listWidth", "portal", "filter", "onSuggestionSelect", "threshold", "renderList", "renderListEnd", "onSearch", "hintText"];
1
+ var _excluded = ["value", "onChange", "suggestions", "view", "size", "labelPlacement", "disabled", "readOnly", "label", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "onScroll", "listMaxHeight", "listWidth", "portal", "filter", "onSuggestionSelect", "threshold", "renderList", "renderListEnd", "onSearch", "hintText"];
2
2
  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); }
3
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -23,7 +23,6 @@ import { useKeyNavigation } from './hooks/useKeyboardNavigation';
23
23
  export var autocompleteRoot = function autocompleteRoot(Root) {
24
24
  return /*#__PURE__*/forwardRef(function (_ref, ref) {
25
25
  var outerValue = _ref.value,
26
- defaultValue = _ref.defaultValue,
27
26
  onChange = _ref.onChange,
28
27
  suggestions = _ref.suggestions,
29
28
  view = _ref.view,
@@ -111,11 +110,6 @@ export var autocompleteRoot = function autocompleteRoot(Root) {
111
110
  type: 'reset'
112
111
  });
113
112
  }, [value]);
114
- useDidMountEffect(function () {
115
- if (defaultValue) {
116
- setInnerValue(defaultValue);
117
- }
118
- }, [defaultValue]);
119
113
  return /*#__PURE__*/React.createElement(Root, {
120
114
  view: view,
121
115
  size: size,
@@ -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 = {
@@ -52,16 +52,7 @@ export function App() {
52
52
  ```
53
53
 
54
54
  ### Вид badge
55
- Вид `badge` задается с помощью свойства `view`. Возможные значения свойства `view`:
56
-
57
- + `"primary"` – основной badge;
58
- + `"accent"` – бейдж акцентного цвета;
59
- + `"positive"` – успешное завершение;
60
- + `"warning"` – предупреждение;
61
- + `"negative"` – ошибка;
62
- + `"dark"` – темный badge;
63
- + `"light"` – светлый badge.
64
-
55
+ Вид `badge` задается с помощью свойства `view`.
65
56
  Так же на вид badge влияет свойства `transparent` и `clear`.
66
57
 
67
58
  ```tsx live
@@ -72,7 +63,7 @@ export function App() {
72
63
  const Badges = ({transparent, clear}) => {
73
64
  return (
74
65
  <div style=\{{ display: 'flex', gap: '0.5rem' }}>
75
- <Badge text="Бейдж" size="l" view="primary" transparent={transparent} clear={clear} />
66
+ <Badge text="Бейдж" size="l" view="default" transparent={transparent} clear={clear} />
76
67
  <Badge text="Бейдж" size="l" view="accent" transparent={transparent} clear={clear} />
77
68
  <Badge text="Бейдж" size="l" view="positive" transparent={transparent} clear={clear} />
78
69
  <Badge text="Бейдж" size="l" view="warning" transparent={transparent} clear={clear} />
@@ -94,7 +85,8 @@ export function App() {
94
85
  ```
95
86
 
96
87
  ### Иконка слева / справа
97
- В левой и/или правой части badge можно отобразить иконку:
88
+ В левой или правой части badge можно отобразить иконку.
89
+ Если же нужен Badge с иконкой без текста, нужно использовать `contentLeft`.
98
90
 
99
91
  ```tsx live
100
92
  import React from 'react';
@@ -107,17 +99,49 @@ export function App() {
107
99
  <Badge
108
100
  text="Бейдж"
109
101
  size="l"
110
- view="primary"
102
+ view="default"
111
103
  contentLeft={
112
104
  <IconEye color="inherit" size="xs" />
113
- } />
105
+ }
106
+ />
114
107
  <Badge
115
108
  text="Бейдж"
116
109
  size="l"
117
- view="primary"
110
+ view="default"
118
111
  contentRight={
119
112
  <IconEye color="inherit" size="xs" />
120
- } />
113
+ }
114
+ />
115
+ <Badge
116
+ size="l"
117
+ view="default"
118
+ contentLeft={
119
+ <IconEye color="inherit" size="xs" />
120
+ }
121
+ />
122
+ </div>
123
+ );
124
+ }
125
+ ```
126
+
127
+ ### Задание цвета текста и фона
128
+ Цвет текста и фона можно задать с помощью свойств
129
+ `customColor` и `customBackgroundColor` соответственно.
130
+
131
+ ```tsx live
132
+ import React from 'react';
133
+ import { Badge } from '@salutejs/{{ package }}';
134
+
135
+ export function App() {
136
+ return (
137
+ <div>
138
+ <Badge
139
+ text="Бейдж"
140
+ size="l"
141
+ view="default"
142
+ customColor="antiquewhite"
143
+ customBackgroundColor="darkolivegreen"
144
+ />
121
145
  </div>
122
146
  );
123
147
  }
@@ -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 '@emotion/react';
2
- import { classes, tokens } from '../../Badge.tokens';
3
- export var base = /*#__PURE__*/css("&.", classes.badgeClear, "{color:var(", tokens.colorClear, ");background-color:transparent;padding:0;};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fY2xlYXIvYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJdUIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9CYWRnZS92YXJpYXRpb25zL19jbGVhci9iYXNlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5pbXBvcnQgeyBjbGFzc2VzLCB0b2tlbnMgfSBmcm9tICcuLi8uLi9CYWRnZS50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BcbiAgICAmLiR7Y2xhc3Nlcy5iYWRnZUNsZWFyfSB7XG4gICAgICAgIGNvbG9yOiB2YXIoJHt0b2tlbnMuY29sb3JDbGVhcn0pO1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcbiAgICAgICAgcGFkZGluZzogMDtcbiAgICB9XG5gO1xuIl19 */"));
2
+ import { classes, privateTokens, tokens } from '../../Badge.tokens';
3
+ export var base = /*#__PURE__*/css("&.", classes.badgeClear, "{color:var(", privateTokens.customColor, ", var(", tokens.colorClear, "));background-color:var(", privateTokens.customBackground, ", var(", tokens.backgroundClear, "));};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fY2xlYXIvYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJdUIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9CYWRnZS92YXJpYXRpb25zL19jbGVhci9iYXNlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5pbXBvcnQgeyBjbGFzc2VzLCBwcml2YXRlVG9rZW5zLCB0b2tlbnMgfSBmcm9tICcuLi8uLi9CYWRnZS50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BcbiAgICAmLiR7Y2xhc3Nlcy5iYWRnZUNsZWFyfSB7XG4gICAgICAgIGNvbG9yOiB2YXIoJHtwcml2YXRlVG9rZW5zLmN1c3RvbUNvbG9yfSwgdmFyKCR7dG9rZW5zLmNvbG9yQ2xlYXJ9KSk7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigke3ByaXZhdGVUb2tlbnMuY3VzdG9tQmFja2dyb3VuZH0sIHZhcigke3Rva2Vucy5iYWNrZ3JvdW5kQ2xlYXJ9KSk7XG4gICAgfVxuYDtcbiJdfQ== */"));
@@ -1,3 +1,4 @@
1
1
  import { css } from '@emotion/react';
2
- import { tokens } from '../../Badge.tokens';
3
- export var base = /*#__PURE__*/css("font-family:var(", tokens.fontFamily, ");font-size:var(", tokens.fontSize, ");font-style:var(", tokens.fontStyle, ");font-weight:var(", tokens.fontWeight, ");letter-spacing:var(", tokens.letterSpacing, ");line-height:var(", tokens.lineHeight, ");border-radius:var(", tokens.borderRadius, ");height:var(", tokens.height, ");padding-top:var(", tokens.paddingTop, ");padding-right:var(", tokens.paddingRight, ");padding-bottom:var(", tokens.paddingBottom, ");padding-left:var(", tokens.paddingLeft, ");;label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fc2l6ZS9iYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUl1QiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0JhZGdlL3ZhcmlhdGlvbnMvX3NpemUvYmFzZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHsgdG9rZW5zIH0gZnJvbSAnLi4vLi4vQmFkZ2UudG9rZW5zJztcblxuZXhwb3J0IGNvbnN0IGJhc2UgPSBjc3NgXG4gICAgZm9udC1mYW1pbHk6IHZhcigke3Rva2Vucy5mb250RmFtaWx5fSk7XG4gICAgZm9udC1zaXplOiB2YXIoJHt0b2tlbnMuZm9udFNpemV9KTtcbiAgICBmb250LXN0eWxlOiB2YXIoJHt0b2tlbnMuZm9udFN0eWxlfSk7XG4gICAgZm9udC13ZWlnaHQ6IHZhcigke3Rva2Vucy5mb250V2VpZ2h0fSk7XG4gICAgbGV0dGVyLXNwYWNpbmc6IHZhcigke3Rva2Vucy5sZXR0ZXJTcGFjaW5nfSk7XG4gICAgbGluZS1oZWlnaHQ6IHZhcigke3Rva2Vucy5saW5lSGVpZ2h0fSk7XG5cbiAgICBib3JkZXItcmFkaXVzOiB2YXIoJHt0b2tlbnMuYm9yZGVyUmFkaXVzfSk7XG5cbiAgICBoZWlnaHQ6IHZhcigke3Rva2Vucy5oZWlnaHR9KTtcblxuICAgIHBhZGRpbmctdG9wOiB2YXIoJHt0b2tlbnMucGFkZGluZ1RvcH0pO1xuICAgIHBhZGRpbmctcmlnaHQ6IHZhcigke3Rva2Vucy5wYWRkaW5nUmlnaHR9KTtcbiAgICBwYWRkaW5nLWJvdHRvbTogdmFyKCR7dG9rZW5zLnBhZGRpbmdCb3R0b219KTtcbiAgICBwYWRkaW5nLWxlZnQ6IHZhcigke3Rva2Vucy5wYWRkaW5nTGVmdH0pO1xuYDtcbiJdfQ== */"));
2
+ import { classes, tokens } from '../../Badge.tokens';
3
+ import { StyledContentLeft } from '../../Badge.styles';
4
+ export var base = /*#__PURE__*/css("font-family:var(", tokens.fontFamily, ");font-size:var(", tokens.fontSize, ");font-style:var(", tokens.fontStyle, ");font-weight:var(", tokens.fontWeight, ");letter-spacing:var(", tokens.letterSpacing, ");line-height:var(", tokens.lineHeight, ");border-radius:var(", tokens.borderRadius, ");height:var(", tokens.height, ");padding:var(", tokens.padding, ");&.", classes.iconOnly, "{padding:var(", tokens.paddingIconOnly, ");", StyledContentLeft, "{margin:0;}};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fc2l6ZS9iYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUt1QiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0JhZGdlL3ZhcmlhdGlvbnMvX3NpemUvYmFzZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHsgY2xhc3NlcywgdG9rZW5zIH0gZnJvbSAnLi4vLi4vQmFkZ2UudG9rZW5zJztcbmltcG9ydCB7IFN0eWxlZENvbnRlbnRMZWZ0IH0gZnJvbSAnLi4vLi4vQmFkZ2Uuc3R5bGVzJztcblxuZXhwb3J0IGNvbnN0IGJhc2UgPSBjc3NgXG4gICAgZm9udC1mYW1pbHk6IHZhcigke3Rva2Vucy5mb250RmFtaWx5fSk7XG4gICAgZm9udC1zaXplOiB2YXIoJHt0b2tlbnMuZm9udFNpemV9KTtcbiAgICBmb250LXN0eWxlOiB2YXIoJHt0b2tlbnMuZm9udFN0eWxlfSk7XG4gICAgZm9udC13ZWlnaHQ6IHZhcigke3Rva2Vucy5mb250V2VpZ2h0fSk7XG4gICAgbGV0dGVyLXNwYWNpbmc6IHZhcigke3Rva2Vucy5sZXR0ZXJTcGFjaW5nfSk7XG4gICAgbGluZS1oZWlnaHQ6IHZhcigke3Rva2Vucy5saW5lSGVpZ2h0fSk7XG5cbiAgICBib3JkZXItcmFkaXVzOiB2YXIoJHt0b2tlbnMuYm9yZGVyUmFkaXVzfSk7XG5cbiAgICBoZWlnaHQ6IHZhcigke3Rva2Vucy5oZWlnaHR9KTtcblxuICAgIHBhZGRpbmc6IHZhcigke3Rva2Vucy5wYWRkaW5nfSk7XG5cbiAgICAmLiR7Y2xhc3Nlcy5pY29uT25seX0ge1xuICAgICAgICBwYWRkaW5nOiB2YXIoJHt0b2tlbnMucGFkZGluZ0ljb25Pbmx5fSk7XG5cbiAgICAgICAgJHtTdHlsZWRDb250ZW50TGVmdH0ge1xuICAgICAgICAgICAgbWFyZ2luOiAwO1xuICAgICAgICB9XG4gICAgfVxuYDtcbiJdfQ== */"));
@@ -1,3 +1,3 @@
1
1
  import { css } from '@emotion/react';
2
- import { classes, tokens } from '../../Badge.tokens';
3
- export var base = /*#__PURE__*/css("&.", classes.badgeTransparent, "{color:var(", tokens.colorTransparent, ");background-color:var(", tokens.backgroundTransparent, ");};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fdHJhbnNwYXJlbnQvYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJdUIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9CYWRnZS92YXJpYXRpb25zL190cmFuc3BhcmVudC9iYXNlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5pbXBvcnQgeyBjbGFzc2VzLCB0b2tlbnMgfSBmcm9tICcuLi8uLi9CYWRnZS50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BcbiAgICAmLiR7Y2xhc3Nlcy5iYWRnZVRyYW5zcGFyZW50fSB7XG4gICAgICAgIGNvbG9yOiB2YXIoJHt0b2tlbnMuY29sb3JUcmFuc3BhcmVudH0pO1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoJHt0b2tlbnMuYmFja2dyb3VuZFRyYW5zcGFyZW50fSk7XG4gICAgfVxuYDtcbiJdfQ== */"));
2
+ import { classes, privateTokens, tokens } from '../../Badge.tokens';
3
+ export var base = /*#__PURE__*/css("&.", classes.badgeTransparent, "{color:var(", privateTokens.customColor, ", var(", tokens.colorTransparent, "));background-color:var(", privateTokens.customBackground, ", var(", tokens.backgroundTransparent, "));};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fdHJhbnNwYXJlbnQvYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJdUIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9CYWRnZS92YXJpYXRpb25zL190cmFuc3BhcmVudC9iYXNlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5pbXBvcnQgeyBjbGFzc2VzLCBwcml2YXRlVG9rZW5zLCB0b2tlbnMgfSBmcm9tICcuLi8uLi9CYWRnZS50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BcbiAgICAmLiR7Y2xhc3Nlcy5iYWRnZVRyYW5zcGFyZW50fSB7XG4gICAgICAgIGNvbG9yOiB2YXIoJHtwcml2YXRlVG9rZW5zLmN1c3RvbUNvbG9yfSwgdmFyKCR7dG9rZW5zLmNvbG9yVHJhbnNwYXJlbnR9KSk7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigke3ByaXZhdGVUb2tlbnMuY3VzdG9tQmFja2dyb3VuZH0sIHZhcigke3Rva2Vucy5iYWNrZ3JvdW5kVHJhbnNwYXJlbnR9KSk7XG4gICAgfVxuYDtcbiJdfQ== */"));
@@ -1,3 +1,3 @@
1
1
  import { css } from '@emotion/react';
2
- import { tokens } from '../../Badge.tokens';
3
- export var base = /*#__PURE__*/css("color:var(", tokens.color, ");background-color:var(", tokens.background, ");;label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fdmlldy9iYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUl1QiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0JhZGdlL3ZhcmlhdGlvbnMvX3ZpZXcvYmFzZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHsgdG9rZW5zIH0gZnJvbSAnLi4vLi4vQmFkZ2UudG9rZW5zJztcblxuZXhwb3J0IGNvbnN0IGJhc2UgPSBjc3NgXG4gICAgY29sb3I6IHZhcigke3Rva2Vucy5jb2xvcn0pO1xuICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigke3Rva2Vucy5iYWNrZ3JvdW5kfSk7XG5gO1xuIl19 */"));
2
+ import { privateTokens, tokens } from '../../Badge.tokens';
3
+ export var base = /*#__PURE__*/css("color:var(", privateTokens.customColor, ", var(", tokens.color, "));background-color:var(", privateTokens.customBackground, ", var(", tokens.background, "));;label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fdmlldy9iYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUl1QiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0JhZGdlL3ZhcmlhdGlvbnMvX3ZpZXcvYmFzZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHsgcHJpdmF0ZVRva2VucywgdG9rZW5zIH0gZnJvbSAnLi4vLi4vQmFkZ2UudG9rZW5zJztcblxuZXhwb3J0IGNvbnN0IGJhc2UgPSBjc3NgXG4gICAgY29sb3I6IHZhcigke3ByaXZhdGVUb2tlbnMuY3VzdG9tQ29sb3J9LCB2YXIoJHt0b2tlbnMuY29sb3J9KSk7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogdmFyKCR7cHJpdmF0ZVRva2Vucy5jdXN0b21CYWNrZ3JvdW5kfSwgdmFyKCR7dG9rZW5zLmJhY2tncm91bmR9KSk7XG5gO1xuIl19 */"));