@zendeskgarden/react-notifications 9.0.0-next.8 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/esm/elements/Close.js +40 -0
  2. package/dist/esm/elements/Notification.js +13 -14
  3. package/dist/esm/elements/{Well.js → Paragraph.js} +5 -15
  4. package/dist/esm/elements/Title.js +35 -0
  5. package/dist/esm/elements/alert/Alert.js +56 -0
  6. package/dist/esm/elements/{content → alert}/Close.js +8 -5
  7. package/dist/esm/elements/{content → alert}/Paragraph.js +1 -1
  8. package/dist/esm/elements/{content → alert}/Title.js +11 -4
  9. package/dist/esm/elements/global-alert/GlobalAlert.js +29 -15
  10. package/dist/esm/elements/global-alert/GlobalAlertButton.js +3 -2
  11. package/dist/esm/elements/global-alert/GlobalAlertClose.js +5 -3
  12. package/dist/esm/elements/global-alert/GlobalAlertTitle.js +8 -3
  13. package/dist/esm/elements/toaster/styled.js +0 -7
  14. package/dist/esm/elements/well/Well.js +47 -0
  15. package/dist/esm/index.js +5 -5
  16. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/alert-error-stroke.svg.js +1 -1
  17. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/alert-warning-stroke.svg.js +1 -1
  18. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/check-circle-stroke.svg.js +1 -1
  19. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/info-stroke.svg.js +1 -1
  20. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/x-stroke.svg.js +1 -1
  21. package/dist/esm/styled/StyledAlert.js +29 -6
  22. package/dist/esm/styled/StyledBase.js +62 -27
  23. package/dist/esm/styled/StyledIcon.js +44 -11
  24. package/dist/esm/styled/StyledNotification.js +19 -28
  25. package/dist/esm/styled/StyledWell.js +28 -7
  26. package/dist/esm/styled/content/StyledClose.js +53 -11
  27. package/dist/esm/styled/content/StyledParagraph.js +2 -5
  28. package/dist/esm/styled/content/StyledTitle.js +6 -6
  29. package/dist/esm/styled/global-alert/StyledGlobalAlert.js +113 -41
  30. package/dist/esm/styled/global-alert/StyledGlobalAlertButton.js +76 -36
  31. package/dist/esm/styled/global-alert/StyledGlobalAlertClose.js +60 -34
  32. package/dist/esm/styled/global-alert/StyledGlobalAlertContent.js +3 -6
  33. package/dist/esm/styled/global-alert/StyledGlobalAlertIcon.js +39 -13
  34. package/dist/esm/styled/global-alert/StyledGlobalAlertTitle.js +20 -12
  35. package/dist/esm/utils/icons.js +6 -6
  36. package/dist/index.cjs.js +800 -446
  37. package/dist/typings/elements/Notification.d.ts +4 -4
  38. package/dist/typings/elements/{content/Title.d.ts → Title.d.ts} +1 -1
  39. package/dist/typings/elements/{Alert.d.ts → alert/Alert.d.ts} +5 -5
  40. package/dist/typings/elements/alert/Close.d.ts +11 -0
  41. package/dist/typings/elements/alert/Paragraph.d.ts +11 -0
  42. package/dist/typings/elements/alert/Title.d.ts +12 -0
  43. package/dist/typings/elements/global-alert/GlobalAlert.d.ts +8 -1
  44. package/dist/typings/elements/toaster/Toast.d.ts +0 -1
  45. package/dist/typings/elements/well/Paragraph.d.ts +11 -0
  46. package/dist/typings/elements/well/Title.d.ts +12 -0
  47. package/dist/typings/elements/{Well.d.ts → well/Well.d.ts} +4 -4
  48. package/dist/typings/index.d.ts +5 -5
  49. package/dist/typings/styled/StyledAlert.d.ts +8 -3
  50. package/dist/typings/styled/StyledBase.d.ts +8 -6
  51. package/dist/typings/styled/StyledIcon.d.ts +10 -2
  52. package/dist/typings/styled/StyledNotification.d.ts +11 -3
  53. package/dist/typings/styled/StyledWell.d.ts +7 -2
  54. package/dist/typings/styled/content/StyledClose.d.ts +4 -3
  55. package/dist/typings/styled/content/StyledTitle.d.ts +1 -1
  56. package/dist/typings/styled/global-alert/StyledGlobalAlert.d.ts +1 -1
  57. package/dist/typings/styled/global-alert/StyledGlobalAlertButton.d.ts +4 -18
  58. package/dist/typings/styled/global-alert/StyledGlobalAlertClose.d.ts +2 -4
  59. package/dist/typings/styled/global-alert/StyledGlobalAlertIcon.d.ts +1 -2
  60. package/dist/typings/styled/global-alert/StyledGlobalAlertTitle.d.ts +2 -2
  61. package/dist/typings/utils/icons.d.ts +1 -1
  62. package/dist/typings/{elements/global-alert/utility.d.ts → utils/useGlobalAlertContext.d.ts} +1 -2
  63. package/dist/typings/utils/useNotificationsContext.d.ts +2 -4
  64. package/package.json +9 -10
  65. package/LICENSE.md +0 -176
  66. package/dist/esm/elements/Alert.js +0 -56
  67. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/x-stroke.svg.js +0 -26
  68. /package/dist/esm/{elements/global-alert/utility.js → utils/useGlobalAlertContext.js} +0 -0
  69. /package/dist/typings/elements/{content/Close.d.ts → Close.d.ts} +0 -0
  70. /package/dist/typings/elements/{content/Paragraph.d.ts → Paragraph.d.ts} +0 -0
package/dist/index.cjs.js CHANGED
@@ -41,72 +41,259 @@ var styled__default = /*#__PURE__*/_interopDefault(styled);
41
41
 
42
42
  const TYPE = ['success', 'warning', 'error', 'info'];
43
43
 
44
- const COMPONENT_ID$b = 'notifications.close';
45
- const StyledClose = styled__default.default.button.attrs({
46
- 'data-garden-id': COMPONENT_ID$b,
47
- 'data-garden-version': '9.0.0-next.8'
44
+ var _g$2, _circle$2;
45
+ function _extends$4() { return _extends$4 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$4.apply(null, arguments); }
46
+ var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
47
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
48
+ xmlns: "http://www.w3.org/2000/svg",
49
+ width: 16,
50
+ height: 16,
51
+ focusable: "false",
52
+ viewBox: "0 0 16 16",
53
+ "aria-hidden": "true"
54
+ }, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
55
+ fill: "none",
56
+ stroke: "currentColor"
57
+ }, /*#__PURE__*/React__namespace.createElement("circle", {
58
+ cx: 7.5,
59
+ cy: 8.5,
60
+ r: 7
61
+ }), /*#__PURE__*/React__namespace.createElement("path", {
62
+ strokeLinecap: "round",
63
+ d: "M7.5 4.5V9"
64
+ }))), _circle$2 || (_circle$2 = /*#__PURE__*/React__namespace.createElement("circle", {
65
+ cx: 7.5,
66
+ cy: 12,
67
+ r: 1,
68
+ fill: "currentColor"
69
+ })));
70
+ };
71
+
72
+ var _g$1;
73
+ function _extends$3() { return _extends$3 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$3.apply(null, arguments); }
74
+ var SvgCheckCircleStroke = function SvgCheckCircleStroke(props) {
75
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
76
+ xmlns: "http://www.w3.org/2000/svg",
77
+ width: 16,
78
+ height: 16,
79
+ focusable: "false",
80
+ viewBox: "0 0 16 16",
81
+ "aria-hidden": "true"
82
+ }, props), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
83
+ fill: "none",
84
+ stroke: "currentColor"
85
+ }, /*#__PURE__*/React__namespace.createElement("path", {
86
+ strokeLinecap: "round",
87
+ strokeLinejoin: "round",
88
+ d: "M4 9l2.5 2.5 5-5"
89
+ }), /*#__PURE__*/React__namespace.createElement("circle", {
90
+ cx: 7.5,
91
+ cy: 8.5,
92
+ r: 7
93
+ }))));
94
+ };
95
+
96
+ var _path$1, _circle$1;
97
+ function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
98
+ var SvgAlertWarningStroke = function SvgAlertWarningStroke(props) {
99
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
100
+ xmlns: "http://www.w3.org/2000/svg",
101
+ width: 16,
102
+ height: 16,
103
+ focusable: "false",
104
+ viewBox: "0 0 16 16",
105
+ "aria-hidden": "true"
106
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
107
+ fill: "none",
108
+ stroke: "currentColor",
109
+ strokeLinecap: "round",
110
+ d: "M.88 13.77L7.06 1.86c.19-.36.7-.36.89 0l6.18 11.91c.17.33-.07.73-.44.73H1.32c-.37 0-.61-.4-.44-.73zM7.5 6v3.5"
111
+ })), _circle$1 || (_circle$1 = /*#__PURE__*/React__namespace.createElement("circle", {
112
+ cx: 7.5,
113
+ cy: 12,
114
+ r: 1,
115
+ fill: "currentColor"
116
+ })));
117
+ };
118
+
119
+ var _g, _circle;
120
+ function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
121
+ var SvgInfoStroke = function SvgInfoStroke(props) {
122
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
123
+ xmlns: "http://www.w3.org/2000/svg",
124
+ width: 16,
125
+ height: 16,
126
+ focusable: "false",
127
+ viewBox: "0 0 16 16",
128
+ "aria-hidden": "true"
129
+ }, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
130
+ stroke: "currentColor"
131
+ }, /*#__PURE__*/React__namespace.createElement("circle", {
132
+ cx: 7.5,
133
+ cy: 8.5,
134
+ r: 7,
135
+ fill: "none"
136
+ }), /*#__PURE__*/React__namespace.createElement("path", {
137
+ strokeLinecap: "round",
138
+ d: "M7.5 12.5V8"
139
+ }))), _circle || (_circle = /*#__PURE__*/React__namespace.createElement("circle", {
140
+ cx: 7.5,
141
+ cy: 5,
142
+ r: 1,
143
+ fill: "currentColor"
144
+ })));
145
+ };
146
+
147
+ const validationIcons = {
148
+ success: SvgCheckCircleStroke,
149
+ error: SvgAlertErrorStroke,
150
+ warning: SvgAlertWarningStroke,
151
+ info: SvgInfoStroke
152
+ };
153
+ const validationTypes = {
154
+ success: 'success',
155
+ error: 'error',
156
+ warning: 'warning',
157
+ info: 'info'
158
+ };
159
+
160
+ const COMPONENT_ID$d = 'notifications.close';
161
+ const colorStyles$a = _ref => {
162
+ let {
163
+ theme,
164
+ $type
165
+ } = _ref;
166
+ let variable;
167
+ switch ($type) {
168
+ case validationTypes.warning:
169
+ variable = 'foreground.warning';
170
+ break;
171
+ case validationTypes.error:
172
+ variable = 'foreground.danger';
173
+ break;
174
+ case validationTypes.success:
175
+ variable = 'foreground.success';
176
+ break;
177
+ default:
178
+ variable = 'foreground.subtle';
179
+ break;
180
+ }
181
+ const color = reactTheming.getColor({
182
+ variable,
183
+ theme
184
+ });
185
+ const hoverColor = reactTheming.getColor({
186
+ variable,
187
+ light: {
188
+ offset: 100
189
+ },
190
+ dark: {
191
+ offset: -100
192
+ },
193
+ theme
194
+ });
195
+ const activeColor = reactTheming.getColor({
196
+ variable,
197
+ light: {
198
+ offset: 200
199
+ },
200
+ dark: {
201
+ offset: -200
202
+ },
203
+ theme
204
+ });
205
+ return styled.css(["color:", ";&:hover{background-color:transparent;color:", ";}&:active{background-color:transparent;color:", ";}"], color, hoverColor, activeColor);
206
+ };
207
+ const StyledClose = styled__default.default(reactButtons.IconButton).attrs({
208
+ 'data-garden-id': COMPONENT_ID$d,
209
+ 'data-garden-version': '9.0.0'
48
210
  }).withConfig({
49
211
  displayName: "StyledClose",
50
212
  componentId: "sc-1mr9nx1-0"
51
- })(["display:block;position:absolute;top:", "px;", ":", ";transition:background-color 0.1s ease-in-out,color 0.25s ease-in-out,box-shadow 0.1s ease-in-out;border:none;border-radius:50%;background-color:transparent;cursor:pointer;padding:0;width:", "px;height:", "px;overflow:hidden;color:", ";font-size:0;user-select:none;&::-moz-focus-inner{border:0;}&:hover{color:", ";}", " ", ";"], props => props.theme.space.base, props => props.theme.rtl ? 'left' : 'right', props => `${props.theme.space.base}px`, props => props.theme.space.base * 7, props => props.theme.space.base * 7, props => props.hue ? reactTheming.getColorV8(props.hue, props.hue === 'warningHue' ? 700 : 600, props.theme) : reactTheming.getColorV8('neutralHue', 600, props.theme), props => props.hue ? reactTheming.getColorV8(props.hue, 800, props.theme) : reactTheming.getColorV8('neutralHue', 800, props.theme), props => reactTheming.focusStyles({
52
- theme: props.theme,
53
- inset: true
54
- }), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
55
- StyledClose.defaultProps = {
56
- theme: reactTheming.DEFAULT_THEME
57
- };
213
+ })(["position:absolute;top:", "px;right:", ";left:", ";", " ", ";"], props => props.theme.space.base, p => !p.theme.rtl && `${p.theme.space.base}px`, p => p.theme.rtl && `${p.theme.space.base}px`, colorStyles$a, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$d, props));
58
214
 
59
- const COMPONENT_ID$a = 'notifications.paragraph';
215
+ const COMPONENT_ID$c = 'notifications.paragraph';
60
216
  const StyledParagraph = styled__default.default.p.attrs({
61
- 'data-garden-id': COMPONENT_ID$a,
62
- 'data-garden-version': '9.0.0-next.8'
217
+ 'data-garden-id': COMPONENT_ID$c,
218
+ 'data-garden-version': '9.0.0'
63
219
  }).withConfig({
64
220
  displayName: "StyledParagraph",
65
221
  componentId: "sc-12tmd6p-0"
66
- })(["margin:", "px 0 0;", ";"], props => props.theme.space.base * 2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
67
- StyledParagraph.defaultProps = {
68
- theme: reactTheming.DEFAULT_THEME
69
- };
222
+ })(["margin:", "px 0 0;", ";"], props => props.theme.space.base * 2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$c, props));
70
223
 
71
- const COMPONENT_ID$9 = 'notifications.title';
224
+ const COMPONENT_ID$b = 'notifications.title';
72
225
  const StyledTitle = styled__default.default.div.attrs({
73
- 'data-garden-id': COMPONENT_ID$9,
74
- 'data-garden-version': '9.0.0-next.8'
226
+ 'data-garden-id': COMPONENT_ID$b,
227
+ 'data-garden-version': '9.0.0'
75
228
  }).withConfig({
76
229
  displayName: "StyledTitle",
77
230
  componentId: "sc-xx4jsv-0"
78
- })(["margin:0;color:", ";font-weight:", ";", ";"], props => reactTheming.getColorV8('foreground', 600 , props.theme), props => props.isRegular ? props.theme.fontWeights.regular : props.theme.fontWeights.semibold, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
79
- StyledTitle.defaultProps = {
80
- theme: reactTheming.DEFAULT_THEME
81
- };
231
+ })(["margin:0;color:", ";font-weight:", ";", ";"], p => reactTheming.getColor({
232
+ variable: 'foreground.default',
233
+ theme: p.theme
234
+ }), props => props.$isRegular ? props.theme.fontWeights.regular : props.theme.fontWeights.semibold, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
82
235
 
83
- const boxShadow = props => {
84
- const {
85
- theme
86
- } = props;
236
+ const COMPONENT_ID$a = 'notifications.base_container';
237
+ const colorStyles$9 = _ref => {
238
+ let {
239
+ theme,
240
+ $type,
241
+ $isFloating
242
+ } = _ref;
87
243
  const {
88
244
  space,
89
245
  shadows
90
246
  } = theme;
91
- const offsetY = `${space.base * 5}px`;
92
- const blurRadius = `${space.base * 7}px`;
93
- const color = reactTheming.getColorV8('chromeHue', 600, theme, 0.15);
94
- return shadows.lg(offsetY, blurRadius, color);
95
- };
96
- const colorStyles$6 = props => {
97
- let backgroundColor;
98
- let borderColor;
99
- let foregroundColor;
100
- if (props.hue) {
101
- backgroundColor = reactTheming.getColorV8(props.hue, 100, props.theme);
102
- borderColor = reactTheming.getColorV8(props.hue, 300, props.theme);
103
- foregroundColor = reactTheming.getColorV8(props.hue, props.type === 'info' ? 600 : 700, props.theme);
247
+ let bgVariable;
248
+ let borderVariable;
249
+ let fgVariable;
250
+ if (!$isFloating && $type && !!validationTypes[$type]) {
251
+ switch ($type) {
252
+ case validationTypes.success:
253
+ bgVariable = 'background.success';
254
+ borderVariable = 'border.success';
255
+ fgVariable = 'foreground.success';
256
+ break;
257
+ case validationTypes.error:
258
+ bgVariable = 'background.danger';
259
+ borderVariable = 'border.danger';
260
+ fgVariable = 'foreground.danger';
261
+ break;
262
+ case validationTypes.warning:
263
+ bgVariable = 'background.warning';
264
+ borderVariable = 'border.warning';
265
+ fgVariable = 'foreground.warning';
266
+ break;
267
+ case validationTypes.info:
268
+ bgVariable = 'background.subtle';
269
+ borderVariable = 'border.default';
270
+ fgVariable = 'foreground.subtle';
271
+ break;
272
+ }
104
273
  } else {
105
- backgroundColor = reactTheming.getColorV8('background', 600 , props.theme);
106
- borderColor = reactTheming.getColorV8('neutralHue', 300, props.theme);
107
- foregroundColor = reactTheming.getColorV8('neutralHue', 800, props.theme);
274
+ bgVariable = 'background.raised';
275
+ borderVariable = 'border.default';
276
+ fgVariable = 'foreground.default';
108
277
  }
109
- return styled.css(["border-color:", ";background-color:", ";color:", ";"], borderColor, backgroundColor, foregroundColor);
278
+ const backgroundColor = reactTheming.getColor({
279
+ variable: bgVariable,
280
+ theme
281
+ });
282
+ const borderColor = reactTheming.getColor({
283
+ variable: borderVariable,
284
+ theme
285
+ });
286
+ const foregroundColor = reactTheming.getColor({
287
+ variable: fgVariable,
288
+ theme
289
+ });
290
+ const offsetY = `${space.base * 5}px`;
291
+ const blurRadius = `${space.base * 7}px`;
292
+ const boxShadow = $isFloating ? shadows.lg(offsetY, blurRadius, reactTheming.getColor({
293
+ variable: 'shadow.large',
294
+ theme
295
+ })) : undefined;
296
+ return styled.css(["border-color:", ";box-shadow:", ";background-color:", ";color:", ";"], borderColor, boxShadow, backgroundColor, foregroundColor);
110
297
  };
111
298
  const padding = props => {
112
299
  const {
@@ -116,149 +303,290 @@ const padding = props => {
116
303
  const paddingHorizontal = `${space.base * 10}px`;
117
304
  return `${paddingVertical} ${paddingHorizontal}`;
118
305
  };
119
- const StyledBase = styled__default.default.div.withConfig({
306
+ const StyledBase = styled__default.default.div.attrs({
307
+ 'data-garden-id': COMPONENT_ID$a,
308
+ 'data-garden-version': '9.0.0'
309
+ }).withConfig({
120
310
  displayName: "StyledBase",
121
311
  componentId: "sc-14syaqw-0"
122
- })(["position:relative;border:", ";border-radius:", ";box-shadow:", ";padding:", ";line-height:", ";font-size:", ";direction:", ";", ";"], props => props.theme.borders.sm, props => props.theme.borderRadii.md, props => props.isFloating && boxShadow, padding, props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => props.theme.fontSizes.md, props => props.theme.rtl && 'rtl', colorStyles$6);
123
- StyledBase.defaultProps = {
124
- theme: reactTheming.DEFAULT_THEME
125
- };
312
+ })(["position:relative;border:", ";border-radius:", ";padding:", ";line-height:", ";font-size:", ";direction:", ";", ";", ""], props => props.theme.borders.sm, props => props.theme.borderRadii.md, padding, props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => props.theme.fontSizes.md, props => props.theme.rtl && 'rtl', colorStyles$9, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
126
313
 
127
- const COMPONENT_ID$8 = 'notifications.alert';
128
- const colorStyles$5 = props => styled.css(["", "{color:", ";}"], StyledTitle, props.hue && reactTheming.getColorV8(props.hue, 800, props.theme));
314
+ const COMPONENT_ID$9 = 'notifications.alert';
315
+ const colorStyles$8 = props => {
316
+ const {
317
+ $type,
318
+ theme
319
+ } = props;
320
+ let variable;
321
+ switch ($type) {
322
+ case validationTypes.success:
323
+ variable = 'foreground.successEmphasis';
324
+ break;
325
+ case validationTypes.error:
326
+ variable = 'foreground.dangerEmphasis';
327
+ break;
328
+ case validationTypes.warning:
329
+ variable = 'foreground.warningEmphasis';
330
+ break;
331
+ case validationTypes.info:
332
+ variable = 'foreground.default';
333
+ break;
334
+ }
335
+ const color = variable ? reactTheming.getColor({
336
+ variable,
337
+ theme
338
+ }) : undefined;
339
+ return styled.css(["", "{color:", ";}"], StyledTitle, color);
340
+ };
129
341
  const StyledAlert = styled__default.default(StyledBase).attrs({
130
- 'data-garden-id': COMPONENT_ID$8,
131
- 'data-garden-version': '9.0.0-next.8'
342
+ 'data-garden-id': COMPONENT_ID$9,
343
+ 'data-garden-version': '9.0.0'
132
344
  }).withConfig({
133
345
  displayName: "StyledAlert",
134
346
  componentId: "sc-fyn8jp-0"
135
- })(["", " ", ";"], colorStyles$5, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props));
136
- StyledAlert.defaultProps = {
137
- theme: reactTheming.DEFAULT_THEME
138
- };
347
+ })(["", " ", ";"], colorStyles$8, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
139
348
 
140
- const COMPONENT_ID$7 = 'notifications.notification';
141
- const colorStyles$4 = props => {
349
+ const COMPONENT_ID$8 = 'notifications.notification';
350
+ const colorStyles$7 = props => {
142
351
  const {
143
- type,
352
+ $type,
144
353
  theme
145
354
  } = props;
146
- const {
147
- colors
148
- } = theme;
149
- const {
150
- successHue,
151
- dangerHue,
152
- warningHue
153
- } = colors;
154
- let color;
155
- switch (type) {
156
- case 'success':
157
- color = reactTheming.getColorV8(successHue, 600, theme);
158
- break;
159
- case 'error':
160
- color = reactTheming.getColorV8(dangerHue, 600, theme);
355
+ let variable;
356
+ switch ($type) {
357
+ case validationTypes.success:
358
+ variable = 'foreground.success';
161
359
  break;
162
- case 'warning':
163
- color = reactTheming.getColorV8(warningHue, 700, theme);
360
+ case validationTypes.error:
361
+ variable = 'foreground.danger';
164
362
  break;
165
- case 'info':
166
- color = reactTheming.getColorV8('foreground', 600 , theme);
363
+ case validationTypes.warning:
364
+ variable = 'foreground.warning';
167
365
  break;
168
- default:
169
- color = 'inherit';
366
+ case validationTypes.info:
367
+ variable = 'foreground.default';
170
368
  break;
171
369
  }
370
+ const color = variable ? reactTheming.getColor({
371
+ variable,
372
+ theme
373
+ }) : 'inherit';
172
374
  return styled.css(["", "{color:", ";}"], StyledTitle, color);
173
375
  };
174
376
  const StyledNotification = styled__default.default(StyledBase).attrs({
175
- 'data-garden-id': COMPONENT_ID$7,
176
- 'data-garden-version': '9.0.0-next.8'
377
+ 'data-garden-id': COMPONENT_ID$8,
378
+ 'data-garden-version': '9.0.0'
177
379
  }).withConfig({
178
380
  displayName: "StyledNotification",
179
381
  componentId: "sc-uf6jh-0"
180
- })(["", " ", ";"], colorStyles$4, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
382
+ })(["", " ", ";"], colorStyles$7, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props));
181
383
  StyledNotification.propTypes = {
182
- type: PropTypes__default.default.oneOf(TYPE)
183
- };
184
- StyledNotification.defaultProps = {
185
- theme: reactTheming.DEFAULT_THEME
384
+ $type: PropTypes__default.default.oneOf(TYPE)
186
385
  };
187
386
 
188
- const COMPONENT_ID$6 = 'notifications.well';
387
+ const COMPONENT_ID$7 = 'notifications.well';
388
+ const colorStyles$6 = _ref => {
389
+ let {
390
+ theme,
391
+ $isFloating,
392
+ $isRecessed
393
+ } = _ref;
394
+ let backgroundVariable;
395
+ if ($isRecessed) {
396
+ backgroundVariable = 'background.recessed';
397
+ } else if ($isFloating) {
398
+ backgroundVariable = 'background.raised';
399
+ } else {
400
+ backgroundVariable = 'background.default';
401
+ }
402
+ const foreground = reactTheming.getColor({
403
+ variable: 'foreground.subtle',
404
+ theme
405
+ });
406
+ const background = reactTheming.getColor({
407
+ variable: backgroundVariable,
408
+ theme
409
+ });
410
+ return styled.css(["background-color:", ";color:", ";"], background, foreground);
411
+ };
189
412
  const StyledWell = styled__default.default(StyledBase).attrs({
190
- 'data-garden-id': COMPONENT_ID$6,
191
- 'data-garden-version': '9.0.0-next.8'
413
+ 'data-garden-id': COMPONENT_ID$7,
414
+ 'data-garden-version': '9.0.0'
192
415
  }).withConfig({
193
416
  displayName: "StyledWell",
194
417
  componentId: "sc-a5831c-0"
195
- })(["background-color:", ";color:", " ", ";"], props => props.isRecessed && reactTheming.getColorV8('neutralHue', 100, props.theme), props => reactTheming.getColorV8('neutralHue', 600, props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
196
- StyledWell.defaultProps = {
197
- theme: reactTheming.DEFAULT_THEME
198
- };
418
+ })(["", " ", ";"], colorStyles$6, p => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, p));
199
419
 
200
- const StyledIcon = styled__default.default(_ref => {
420
+ const COMPONENT_ID$6 = 'notifications.icon';
421
+ const sizeStyles$4 = _ref => {
201
422
  let {
202
- children,
203
- ...props
423
+ theme: {
424
+ rtl,
425
+ space
426
+ }
204
427
  } = _ref;
205
- return React__namespace.default.cloneElement(React.Children.only(children), props);
428
+ return styled.css(["right:", ";left:", ";margin-top:", "px;"], rtl && `${space.base * 4}px`, !rtl && `${space.base * 4}px`, space.base / 2);
429
+ };
430
+ const colorStyles$5 = _ref2 => {
431
+ let {
432
+ theme,
433
+ $type
434
+ } = _ref2;
435
+ let variable;
436
+ switch ($type) {
437
+ case validationTypes.success:
438
+ variable = 'foreground.success';
439
+ break;
440
+ case validationTypes.error:
441
+ variable = 'foreground.danger';
442
+ break;
443
+ case validationTypes.warning:
444
+ variable = 'foreground.warning';
445
+ break;
446
+ case validationTypes.info:
447
+ variable = 'foreground.subtle';
448
+ break;
449
+ default:
450
+ variable = 'foreground.default';
451
+ break;
452
+ }
453
+ const color = reactTheming.getColor({
454
+ variable,
455
+ theme
456
+ });
457
+ return styled.css(["color:", ";"], color);
458
+ };
459
+ const StyledIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
460
+ 'data-garden-id': COMPONENT_ID$6,
461
+ 'data-garden-version': '9.0.0'
206
462
  }).withConfig({
207
463
  displayName: "StyledIcon",
208
464
  componentId: "sc-msklws-0"
209
- })(["position:absolute;right:", ";left:", ";margin-top:", "px;color:", ";"], props => props.theme.rtl && `${props.theme.space.base * 4}px`, props => !props.theme.rtl && `${props.theme.space.base * 4}px`, props => props.theme.space.base / 2, props => props.hue && reactTheming.getColorV8(props.hue, props.hue === 'warningHue' ? 700 : 600, props.theme));
210
- StyledIcon.defaultProps = {
211
- theme: reactTheming.DEFAULT_THEME
212
- };
465
+ })(["position:absolute;", " ", " ", ""], sizeStyles$4, colorStyles$5, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
213
466
 
214
- const COMPONENT_ID$5 = 'notifications.global-alert';
215
- const colorStyles$3 = props => {
467
+ const COMPONENT_ID$5 = 'notifications.global_alert';
468
+ const colorStyles$4 = _ref => {
469
+ let {
470
+ theme,
471
+ $alertType
472
+ } = _ref;
216
473
  let borderColor;
217
474
  let backgroundColor;
218
475
  let foregroundColor;
219
476
  let anchorHoverColor;
220
477
  let anchorActiveColor;
221
- let focusColor;
222
- switch (props.alertType) {
478
+ let focusVariable;
479
+ switch ($alertType) {
223
480
  case 'success':
224
- borderColor = reactTheming.getColorV8('successHue', 700, props.theme);
225
- backgroundColor = reactTheming.getColorV8('successHue', 600, props.theme);
226
- foregroundColor = reactTheming.getColorV8('successHue', 100, props.theme);
227
- anchorHoverColor = props.theme.palette.white;
228
- anchorActiveColor = props.theme.palette.white;
229
- focusColor = 'successHue';
230
- break;
481
+ {
482
+ borderColor = reactTheming.getColor({
483
+ variable: 'border.successEmphasis',
484
+ offset: 100,
485
+ theme
486
+ });
487
+ backgroundColor = reactTheming.getColor({
488
+ variable: 'background.successEmphasis',
489
+ theme
490
+ });
491
+ foregroundColor = reactTheming.getColor({
492
+ variable: 'foreground.success',
493
+ offset: -600,
494
+ theme
495
+ });
496
+ anchorHoverColor = theme.palette.white;
497
+ anchorActiveColor = theme.palette.white;
498
+ focusVariable = 'foreground.successEmphasis';
499
+ break;
500
+ }
231
501
  case 'error':
232
- borderColor = reactTheming.getColorV8('dangerHue', 700, props.theme);
233
- backgroundColor = reactTheming.getColorV8('dangerHue', 600, props.theme);
234
- foregroundColor = reactTheming.getColorV8('dangerHue', 100, props.theme);
235
- anchorHoverColor = props.theme.palette.white;
236
- anchorActiveColor = props.theme.palette.white;
237
- focusColor = 'dangerHue';
238
- break;
502
+ {
503
+ borderColor = reactTheming.getColor({
504
+ variable: 'border.dangerEmphasis',
505
+ offset: 100,
506
+ theme
507
+ });
508
+ backgroundColor = reactTheming.getColor({
509
+ variable: 'background.dangerEmphasis',
510
+ theme
511
+ });
512
+ foregroundColor = reactTheming.getColor({
513
+ variable: 'foreground.danger',
514
+ offset: -600,
515
+ theme
516
+ });
517
+ anchorActiveColor = theme.palette.white;
518
+ anchorHoverColor = theme.palette.white;
519
+ focusVariable = 'foreground.dangerEmphasis';
520
+ break;
521
+ }
239
522
  case 'warning':
240
- borderColor = reactTheming.getColorV8('warningHue', 400, props.theme);
241
- backgroundColor = reactTheming.getColorV8('warningHue', 300, props.theme);
242
- foregroundColor = reactTheming.getColorV8('warningHue', 800, props.theme);
243
- anchorHoverColor = reactTheming.getColorV8('warningHue', 900, props.theme);
244
- anchorActiveColor = reactTheming.getColorV8('warningHue', 1000, props.theme);
245
- focusColor = 'warningHue';
246
- break;
523
+ {
524
+ borderColor = reactTheming.getColor({
525
+ variable: 'border.warningEmphasis',
526
+ offset: -300,
527
+ theme
528
+ });
529
+ backgroundColor = reactTheming.getColor({
530
+ variable: 'background.warningEmphasis',
531
+ offset: -400,
532
+ theme
533
+ });
534
+ const fgVariable = 'foreground.warning';
535
+ foregroundColor = reactTheming.getColor({
536
+ variable: fgVariable,
537
+ offset: 100,
538
+ theme
539
+ });
540
+ anchorHoverColor = reactTheming.getColor({
541
+ variable: fgVariable,
542
+ offset: 200,
543
+ theme
544
+ });
545
+ anchorActiveColor = reactTheming.getColor({
546
+ variable: fgVariable,
547
+ offset: 300,
548
+ theme
549
+ });
550
+ focusVariable = fgVariable;
551
+ break;
552
+ }
247
553
  case 'info':
248
- borderColor = reactTheming.getColorV8('primaryHue', 300, props.theme);
249
- backgroundColor = reactTheming.getColorV8('primaryHue', 200, props.theme);
250
- foregroundColor = reactTheming.getColorV8('primaryHue', 700, props.theme);
251
- anchorHoverColor = reactTheming.getColorV8('primaryHue', 800, props.theme);
252
- anchorActiveColor = reactTheming.getColorV8('primaryHue', 900, props.theme);
253
- focusColor = 'primaryHue';
254
- break;
554
+ {
555
+ borderColor = reactTheming.getColor({
556
+ variable: 'border.primaryEmphasis',
557
+ offset: -300,
558
+ theme
559
+ });
560
+ backgroundColor = reactTheming.getColor({
561
+ variable: 'background.primaryEmphasis',
562
+ offset: -400,
563
+ theme
564
+ });
565
+ const fgVariable = 'foreground.primary';
566
+ foregroundColor = reactTheming.getColor({
567
+ variable: fgVariable,
568
+ offset: 100,
569
+ theme
570
+ });
571
+ anchorHoverColor = reactTheming.getColor({
572
+ variable: fgVariable,
573
+ offset: 200,
574
+ theme
575
+ });
576
+ anchorActiveColor = reactTheming.getColor({
577
+ variable: fgVariable,
578
+ offset: 300,
579
+ theme
580
+ });
581
+ focusVariable = fgVariable;
582
+ break;
583
+ }
255
584
  }
256
- const boxShadow = `0 ${props.theme.borderWidths.sm} ${props.theme.borderWidths.sm} ${borderColor}`;
585
+ const boxShadow = `0 ${theme.borderWidths.sm} ${theme.borderWidths.sm} ${borderColor}`;
257
586
  return styled.css(["box-shadow:", ";background-color:", ";color:", ";& a{color:inherit;", " &:hover{color:", ";}&:active{color:", ";}}"], boxShadow, backgroundColor, foregroundColor, reactTheming.focusStyles({
258
- theme: props.theme,
587
+ theme,
259
588
  color: {
260
- hue: focusColor,
261
- shade: props.alertType === 'info' ? 600 : 800
589
+ variable: focusVariable
262
590
  },
263
591
  styles: {
264
592
  color: 'inherit'
@@ -277,57 +605,84 @@ const sizeStyles$3 = props => {
277
605
  };
278
606
  const StyledGlobalAlert = styled__default.default.div.attrs({
279
607
  'data-garden-id': COMPONENT_ID$5,
280
- 'data-garden-version': '9.0.0-next.8'
608
+ 'data-garden-version': '9.0.0'
281
609
  }).withConfig({
282
610
  displayName: "StyledGlobalAlert",
283
611
  componentId: "sc-k6rimt-0"
284
- })(["display:flex;flex-wrap:nowrap;overflow:auto;overflow-x:hidden;box-sizing:border-box;direction:", ";", " ", " && a{border-radius:", ";text-decoration:underline;}", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', sizeStyles$3, colorStyles$3, props => props.theme.borderRadii.sm, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
285
- StyledGlobalAlert.defaultProps = {
286
- theme: reactTheming.DEFAULT_THEME
287
- };
612
+ })(["display:flex;flex-wrap:nowrap;overflow:auto;overflow-x:hidden;box-sizing:border-box;direction:", ";", " ", " && a{border-radius:", ";text-decoration:underline;}", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', sizeStyles$3, colorStyles$4, props => props.theme.borderRadii.sm, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
288
613
 
289
- const COMPONENT_ID$4 = 'notifications.global-alert.close';
290
- const colorStyles$2 = props => {
614
+ const COMPONENT_ID$4 = 'notifications.global_alert.close';
615
+ const colorStyles$3 = props => {
616
+ const {
617
+ $alertType,
618
+ theme
619
+ } = props;
291
620
  let hoverBackgroundColor;
292
621
  let hoverForegroundColor;
293
622
  let activeBackgroundColor;
294
623
  let activeForegroundColor;
295
- let focusColor;
296
- switch (props.alertType) {
624
+ let focusVariable;
625
+ switch ($alertType) {
297
626
  case 'success':
298
- hoverBackgroundColor = reactTheming.getColorV8('successHue', 100, props.theme, 0.08);
299
- hoverForegroundColor = props.theme.palette.white;
300
- activeBackgroundColor = reactTheming.getColorV8('successHue', 100, props.theme, 0.2);
301
- activeForegroundColor = props.theme.palette.white;
302
- focusColor = 'successHue';
627
+ hoverBackgroundColor = reactTheming.getColor({
628
+ variable: 'background.success',
629
+ theme,
630
+ transparency: theme.opacity[100]
631
+ });
632
+ hoverForegroundColor = theme.palette.white;
633
+ activeBackgroundColor = reactTheming.getColor({
634
+ variable: 'background.success',
635
+ theme,
636
+ transparency: theme.opacity[200]
637
+ });
638
+ activeForegroundColor = theme.palette.white;
639
+ focusVariable = 'foreground.successEmphasis';
303
640
  break;
304
641
  case 'error':
305
- hoverBackgroundColor = reactTheming.getColorV8('dangerHue', 100, props.theme, 0.08);
306
- hoverForegroundColor = props.theme.palette.white;
307
- activeBackgroundColor = reactTheming.getColorV8('dangerHue', 100, props.theme, 0.2);
308
- activeForegroundColor = props.theme.palette.white;
309
- focusColor = 'dangerHue';
642
+ hoverBackgroundColor = reactTheming.getColor({
643
+ variable: 'background.danger',
644
+ theme,
645
+ transparency: theme.opacity[100]
646
+ });
647
+ hoverForegroundColor = theme.palette.white;
648
+ activeBackgroundColor = reactTheming.getColor({
649
+ variable: 'background.danger',
650
+ theme,
651
+ transparency: theme.opacity[200]
652
+ });
653
+ activeForegroundColor = theme.palette.white;
654
+ focusVariable = 'foreground.dangerEmphasis';
310
655
  break;
311
656
  case 'warning':
312
- hoverBackgroundColor = reactTheming.getColorV8('warningHue', 800, props.theme, 0.08);
313
- hoverForegroundColor = reactTheming.getColorV8('warningHue', 900, props.theme);
314
- activeBackgroundColor = reactTheming.getColorV8('warningHue', 800, props.theme, 0.2);
315
- activeForegroundColor = reactTheming.getColorV8('warningHue', 1000, props.theme);
316
- focusColor = 'warningHue';
317
- break;
318
- case 'info':
319
- hoverBackgroundColor = reactTheming.getColorV8('primaryHue', 700, props.theme, 0.08);
320
- hoverForegroundColor = reactTheming.getColorV8('primaryHue', 800, props.theme);
321
- activeBackgroundColor = reactTheming.getColorV8('primaryHue', 700, props.theme, 0.2);
322
- activeForegroundColor = reactTheming.getColorV8('primaryHue', 900, props.theme);
323
- focusColor = 'primaryHue';
657
+ hoverBackgroundColor = reactTheming.getColor({
658
+ variable: 'background.warningEmphasis',
659
+ transparency: theme.opacity[100],
660
+ theme
661
+ });
662
+ hoverForegroundColor = reactTheming.getColor({
663
+ variable: 'foreground.warningEmphasis',
664
+ offset: 200,
665
+ theme
666
+ });
667
+ activeBackgroundColor = reactTheming.getColor({
668
+ variable: 'background.warningEmphasis',
669
+ transparency: theme.opacity[200],
670
+ theme
671
+ });
672
+ activeForegroundColor = reactTheming.getColor({
673
+ variable: 'foreground.warningEmphasis',
674
+ offset: 300,
675
+ theme
676
+ });
677
+ focusVariable = 'foreground.warning';
324
678
  break;
679
+ default:
680
+ focusVariable = 'foreground.primary';
325
681
  }
326
682
  return styled.css(["color:inherit;&:hover{background-color:", ";color:", ";}", " &:active{background-color:", ";color:", ";}"], hoverBackgroundColor, hoverForegroundColor, reactTheming.focusStyles({
327
- theme: props.theme,
683
+ theme,
328
684
  color: {
329
- hue: focusColor,
330
- shade: props.alertType === 'info' ? 600 : 800
685
+ variable: focusVariable
331
686
  }
332
687
  }), activeBackgroundColor, activeForegroundColor);
333
688
  };
@@ -339,53 +694,99 @@ const sizeStyles$2 = props => {
339
694
  };
340
695
  const StyledGlobalAlertClose = styled__default.default(reactButtons.IconButton).attrs({
341
696
  'data-garden-id': COMPONENT_ID$4,
342
- 'data-garden-version': '9.0.0-next.8',
343
- size: 'small'
697
+ 'data-garden-version': '9.0.0'
344
698
  }).withConfig({
345
699
  displayName: "StyledGlobalAlertClose",
346
700
  componentId: "sc-1g5s93s-0"
347
- })(["", ";", ";", ";"], sizeStyles$2, colorStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
348
- StyledGlobalAlertClose.defaultProps = {
349
- theme: reactTheming.DEFAULT_THEME
350
- };
701
+ })(["", ";", ";", ";"], sizeStyles$2, colorStyles$3, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
351
702
 
352
- const COMPONENT_ID$3 = 'notifications.global-alert.button';
353
- function colorStyles$1(props) {
354
- if (props.isBasic) {
355
- return colorStyles$2(props);
703
+ const COMPONENT_ID$3 = 'notifications.global_alert.button';
704
+ function colorStyles$2(props) {
705
+ const {
706
+ $alertType,
707
+ isBasic,
708
+ theme
709
+ } = props;
710
+ if (isBasic) {
711
+ return colorStyles$3(props);
356
712
  }
357
- let backgroundColor;
358
- let hoverBackgroundColor;
359
- let activeBackgroundColor;
360
- let focusColor;
361
- switch (props.alertType) {
713
+ let bgVariable;
714
+ let offsetOptions;
715
+ let offsetHoverOptions;
716
+ let offsetActiveOptions;
717
+ let focusVariable;
718
+ switch ($alertType) {
362
719
  case 'success':
363
- backgroundColor = reactTheming.getColorV8('successHue', 800, props.theme);
364
- hoverBackgroundColor = reactTheming.getColorV8('successHue', 900, props.theme);
365
- activeBackgroundColor = reactTheming.getColorV8('successHue', 1000, props.theme);
366
- focusColor = 'successHue';
720
+ bgVariable = 'background.successEmphasis';
721
+ offsetOptions = {
722
+ offset: 200
723
+ };
724
+ offsetHoverOptions = {
725
+ offset: 300
726
+ };
727
+ offsetActiveOptions = {
728
+ offset: 400
729
+ };
730
+ focusVariable = 'foreground.successEmphasis';
367
731
  break;
368
732
  case 'error':
369
- backgroundColor = reactTheming.getColorV8('dangerHue', 800, props.theme);
370
- hoverBackgroundColor = reactTheming.getColorV8('dangerHue', 900, props.theme);
371
- activeBackgroundColor = reactTheming.getColorV8('dangerHue', 1000, props.theme);
372
- focusColor = 'dangerHue';
733
+ bgVariable = 'background.dangerEmphasis';
734
+ offsetOptions = {
735
+ offset: 200
736
+ };
737
+ offsetHoverOptions = {
738
+ offset: 300
739
+ };
740
+ offsetActiveOptions = {
741
+ offset: 400
742
+ };
743
+ focusVariable = 'foreground.dangerEmphasis';
373
744
  break;
374
745
  case 'warning':
375
- backgroundColor = reactTheming.getColorV8('warningHue', 800, props.theme);
376
- hoverBackgroundColor = reactTheming.getColorV8('warningHue', 900, props.theme);
377
- activeBackgroundColor = reactTheming.getColorV8('warningHue', 1000, props.theme);
378
- focusColor = 'warningHue';
746
+ bgVariable = 'background.warningEmphasis';
747
+ offsetOptions = {};
748
+ offsetHoverOptions = {
749
+ offset: 100
750
+ };
751
+ offsetActiveOptions = {
752
+ offset: 200
753
+ };
754
+ focusVariable = 'foreground.warning';
379
755
  break;
380
756
  case 'info':
381
- focusColor = 'primaryHue';
757
+ bgVariable = 'background.primaryEmphasis';
758
+ offsetOptions = {};
759
+ offsetHoverOptions = {
760
+ offset: 100
761
+ };
762
+ offsetActiveOptions = {
763
+ offset: 200
764
+ };
765
+ focusVariable = 'foreground.primary';
382
766
  break;
383
767
  }
384
- return styled.css(["background-color:", ";&:hover{background-color:", ";}", " &:active{background-color:", ";}"], backgroundColor, hoverBackgroundColor, reactTheming.focusStyles({
385
- theme: props.theme,
768
+ const backgroundColor = reactTheming.getColor({
769
+ variable: bgVariable,
770
+ ...offsetOptions,
771
+ theme
772
+ });
773
+ const hoverBackgroundColor = reactTheming.getColor({
774
+ variable: bgVariable,
775
+ ...offsetHoverOptions,
776
+ theme
777
+ });
778
+ const activeBackgroundColor = reactTheming.getColor({
779
+ variable: bgVariable,
780
+ ...offsetActiveOptions,
781
+ theme
782
+ });
783
+ return styled.css(["background-color:", ";color:", ";&:hover{background-color:", ";}", " &:active{background-color:", ";}"], backgroundColor, reactTheming.getColor({
784
+ hue: 'white',
785
+ theme
786
+ }), hoverBackgroundColor, reactTheming.focusStyles({
787
+ theme,
386
788
  color: {
387
- hue: focusColor,
388
- shade: props.alertType === 'info' ? 600 : 800
789
+ variable: focusVariable
389
790
  }
390
791
  }), activeBackgroundColor);
391
792
  }
@@ -396,260 +797,176 @@ function sizeStyles$1(props) {
396
797
  }
397
798
  const StyledGlobalAlertButton = styled__default.default(reactButtons.Button).attrs({
398
799
  'data-garden-id': COMPONENT_ID$3,
399
- 'data-garden-version': '9.0.0-next.8',
400
- focusInset: false,
401
- isDanger: false,
402
- isLink: false,
403
- isNeutral: false,
404
- isPill: false,
405
- isStretched: false,
406
- size: 'small'
800
+ 'data-garden-version': '9.0.0'
407
801
  }).withConfig({
408
802
  displayName: "StyledGlobalAlertButton",
409
803
  componentId: "sc-1txe91a-0"
410
- })(["flex-shrink:0;", ";", ";", ";"], sizeStyles$1, colorStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
411
- StyledGlobalAlertButton.defaultProps = {
412
- theme: reactTheming.DEFAULT_THEME
413
- };
804
+ })(["flex-shrink:0;", ";", ";", ";"], sizeStyles$1, colorStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
414
805
 
415
- const COMPONENT_ID$2 = 'notifications.global-alert.content';
806
+ const COMPONENT_ID$2 = 'notifications.global_alert.content';
416
807
  const StyledGlobalAlertContent = styled__default.default.div.attrs({
417
808
  'data-garden-id': COMPONENT_ID$2,
418
- 'data-garden-version': '9.0.0-next.8'
809
+ 'data-garden-version': '9.0.0'
419
810
  }).withConfig({
420
811
  displayName: "StyledGlobalAlertContent",
421
812
  componentId: "sc-rept0u-0"
422
813
  })(["flex-grow:1;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
423
- StyledGlobalAlertContent.defaultProps = {
424
- theme: reactTheming.DEFAULT_THEME
425
- };
426
814
 
427
- const COMPONENT_ID$1 = 'notifications.global-alert.icon';
815
+ const COMPONENT_ID$1 = 'notifications.global_alert.icon';
428
816
  const sizeStyles = props => {
429
817
  const size = props.theme.iconSizes.md;
430
818
  const marginTop = polished.math(`(${props.theme.space.base * 5} - ${size}) / 2`);
431
819
  const marginHorizontal = `${props.theme.space.base * 2}px`;
432
820
  return styled.css(["margin-top:", ";margin-", ":", ";width:", ";height:", ";"], marginTop, props.theme.rtl ? 'left' : 'right', marginHorizontal, size, size);
433
821
  };
434
- const StyledGlobalAlertIcon = styled__default.default(_ref => {
822
+ const colorStyles$1 = _ref => {
435
823
  let {
436
- children,
437
- ...props
824
+ theme,
825
+ $alertType
438
826
  } = _ref;
439
- return React__namespace.default.cloneElement(React.Children.only(children), props);
440
- }).attrs({
827
+ let color;
828
+ switch ($alertType) {
829
+ case 'success':
830
+ color = reactTheming.getColor({
831
+ variable: 'foreground.success',
832
+ offset: -400,
833
+ theme
834
+ });
835
+ break;
836
+ case 'error':
837
+ color = reactTheming.getColor({
838
+ variable: 'foreground.danger',
839
+ offset: -400,
840
+ theme
841
+ });
842
+ break;
843
+ case 'warning':
844
+ color = reactTheming.getColor({
845
+ variable: 'foreground.warning',
846
+ theme
847
+ });
848
+ break;
849
+ case 'info':
850
+ color = reactTheming.getColor({
851
+ variable: 'foreground.primary',
852
+ theme
853
+ });
854
+ break;
855
+ }
856
+ return styled.css(["color:", ";"], color);
857
+ };
858
+ const StyledGlobalAlertIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
441
859
  'data-garden-id': COMPONENT_ID$1,
442
- 'data-garden-version': '9.0.0-next.8'
860
+ 'data-garden-version': '9.0.0'
443
861
  }).withConfig({
444
862
  displayName: "StyledGlobalAlertIcon",
445
863
  componentId: "sc-84ne9k-0"
446
- })(["flex-shrink:0;", ";", ";"], sizeStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
447
- StyledGlobalAlertIcon.defaultProps = {
448
- theme: reactTheming.DEFAULT_THEME
449
- };
864
+ })(["flex-shrink:0;", ";", ";", ";"], sizeStyles, colorStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
450
865
 
451
- const COMPONENT_ID = 'notifications.global-alert.title';
452
- const colorStyles = props => {
866
+ const COMPONENT_ID = 'notifications.global_alert.title';
867
+ const colorStyles = _ref => {
868
+ let {
869
+ theme,
870
+ $alertType
871
+ } = _ref;
453
872
  let color;
454
- switch (props.alertType) {
873
+ switch ($alertType) {
455
874
  case 'success':
456
875
  case 'error':
457
- color = props.theme.palette.white;
876
+ color = theme.palette.white;
458
877
  break;
459
878
  case 'warning':
460
- color = reactTheming.getColorV8('warningHue', 900, props.theme);
879
+ color = reactTheming.getColor({
880
+ variable: 'foreground.warningEmphasis',
881
+ theme
882
+ });
461
883
  break;
462
884
  case 'info':
463
- color = reactTheming.getColorV8('primaryHue', 800, props.theme);
885
+ color = reactTheming.getColor({
886
+ variable: 'foreground.primary',
887
+ offset: 200,
888
+ theme
889
+ });
464
890
  break;
465
891
  }
466
892
  return styled.css(["color:", ";"], color);
467
893
  };
468
894
  const StyledGlobalAlertTitle = styled__default.default.div.attrs({
469
895
  'data-garden-id': COMPONENT_ID,
470
- 'data-garden-version': '9.0.0-next.8'
896
+ 'data-garden-version': '9.0.0'
471
897
  }).withConfig({
472
898
  displayName: "StyledGlobalAlertTitle",
473
899
  componentId: "sc-10clqbo-0"
474
- })(["display:inline;margin-", ":", "px;font-weight:", ";", ";", ";"], props => props.theme.rtl ? 'left' : 'right', props => props.theme.space.base * 2, props => props.isRegular ? props.theme.fontWeights.regular : props.theme.fontWeights.semibold, colorStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
475
- StyledGlobalAlertTitle.defaultProps = {
476
- theme: reactTheming.DEFAULT_THEME
477
- };
478
-
479
- var _g$2, _circle$2;
480
- function _extends$5() { _extends$5 = 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$5.apply(this, arguments); }
481
- var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
482
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
483
- xmlns: "http://www.w3.org/2000/svg",
484
- width: 16,
485
- height: 16,
486
- focusable: "false",
487
- viewBox: "0 0 16 16",
488
- "aria-hidden": "true"
489
- }, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
490
- fill: "none",
491
- stroke: "currentColor"
492
- }, /*#__PURE__*/React__namespace.createElement("circle", {
493
- cx: 7.5,
494
- cy: 8.5,
495
- r: 7
496
- }), /*#__PURE__*/React__namespace.createElement("path", {
497
- strokeLinecap: "round",
498
- d: "M7.5 4.5V9"
499
- }))), _circle$2 || (_circle$2 = /*#__PURE__*/React__namespace.createElement("circle", {
500
- cx: 7.5,
501
- cy: 12,
502
- r: 1,
503
- fill: "currentColor"
504
- })));
505
- };
506
-
507
- var _g$1;
508
- function _extends$4() { _extends$4 = 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$4.apply(this, arguments); }
509
- var SvgCheckCircleStroke = function SvgCheckCircleStroke(props) {
510
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
511
- xmlns: "http://www.w3.org/2000/svg",
512
- width: 16,
513
- height: 16,
514
- focusable: "false",
515
- viewBox: "0 0 16 16",
516
- "aria-hidden": "true"
517
- }, props), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
518
- fill: "none",
519
- stroke: "currentColor"
520
- }, /*#__PURE__*/React__namespace.createElement("path", {
521
- strokeLinecap: "round",
522
- strokeLinejoin: "round",
523
- d: "M4 9l2.5 2.5 5-5"
524
- }), /*#__PURE__*/React__namespace.createElement("circle", {
525
- cx: 7.5,
526
- cy: 8.5,
527
- r: 7
528
- }))));
529
- };
530
-
531
- var _path$2, _circle$1;
532
- function _extends$3() { _extends$3 = 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$3.apply(this, arguments); }
533
- var SvgAlertWarningStroke = function SvgAlertWarningStroke(props) {
534
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
535
- xmlns: "http://www.w3.org/2000/svg",
536
- width: 16,
537
- height: 16,
538
- focusable: "false",
539
- viewBox: "0 0 16 16",
540
- "aria-hidden": "true"
541
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
542
- fill: "none",
543
- stroke: "currentColor",
544
- strokeLinecap: "round",
545
- d: "M.88 13.77L7.06 1.86c.19-.36.7-.36.89 0l6.18 11.91c.17.33-.07.73-.44.73H1.32c-.37 0-.61-.4-.44-.73zM7.5 6v3.5"
546
- })), _circle$1 || (_circle$1 = /*#__PURE__*/React__namespace.createElement("circle", {
547
- cx: 7.5,
548
- cy: 12,
549
- r: 1,
550
- fill: "currentColor"
551
- })));
552
- };
553
-
554
- var _g, _circle;
555
- function _extends$2() { _extends$2 = 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$2.apply(this, arguments); }
556
- var SvgInfoStroke = function SvgInfoStroke(props) {
557
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
558
- xmlns: "http://www.w3.org/2000/svg",
559
- width: 16,
560
- height: 16,
561
- focusable: "false",
562
- viewBox: "0 0 16 16",
563
- "aria-hidden": "true"
564
- }, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
565
- stroke: "currentColor"
566
- }, /*#__PURE__*/React__namespace.createElement("circle", {
567
- cx: 7.5,
568
- cy: 8.5,
569
- r: 7,
570
- fill: "none"
571
- }), /*#__PURE__*/React__namespace.createElement("path", {
572
- strokeLinecap: "round",
573
- d: "M7.5 12.5V8"
574
- }))), _circle || (_circle = /*#__PURE__*/React__namespace.createElement("circle", {
575
- cx: 7.5,
576
- cy: 5,
577
- r: 1,
578
- fill: "currentColor"
579
- })));
580
- };
581
-
582
- const validationIcons = {
583
- success: SvgCheckCircleStroke,
584
- error: SvgAlertErrorStroke,
585
- warning: SvgAlertWarningStroke,
586
- info: SvgInfoStroke
587
- };
588
- const validationHues = {
589
- success: 'successHue',
590
- error: 'dangerHue',
591
- warning: 'warningHue',
592
- info: 'neutralHue'
593
- };
900
+ })(["display:inline;margin-", ":", "px;font-weight:", ";", ";", ";"], props => props.theme.rtl ? 'left' : 'right', props => props.theme.space.base * 2, props => props.$isRegular ? props.theme.fontWeights.regular : props.theme.fontWeights.semibold, colorStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
594
901
 
595
902
  const NotificationsContext = React.createContext(undefined);
596
903
  const useNotificationsContext = () => {
597
904
  return React.useContext(NotificationsContext);
598
905
  };
599
906
 
600
- const Title = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledTitle, Object.assign({
601
- ref: ref
602
- }, props)));
603
- Title.displayName = 'Title';
907
+ const Title$1 = React__namespace.default.forwardRef((_ref, ref) => {
908
+ let {
909
+ isRegular,
910
+ ...props
911
+ } = _ref;
912
+ return React__namespace.default.createElement(StyledTitle, Object.assign({
913
+ ref: ref,
914
+ $isRegular: isRegular
915
+ }, props));
916
+ });
917
+ Title$1.displayName = 'Alert.Title';
604
918
 
605
- const Paragraph = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledParagraph, Object.assign({
919
+ const Paragraph$1 = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledParagraph, Object.assign({
606
920
  ref: ref
607
921
  }, props)));
608
- Paragraph.displayName = 'Paragraph';
922
+ Paragraph$1.displayName = 'Alert.Paragraph';
609
923
 
610
- var _path$1;
611
- function _extends$1() { _extends$1 = 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$1.apply(this, arguments); }
612
- var SvgXStroke$1 = function SvgXStroke(props) {
613
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
924
+ var _path;
925
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
926
+ var SvgXStroke = function SvgXStroke(props) {
927
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends({
614
928
  xmlns: "http://www.w3.org/2000/svg",
615
- width: 12,
616
- height: 12,
929
+ width: 16,
930
+ height: 16,
617
931
  focusable: "false",
618
- viewBox: "0 0 12 12",
932
+ viewBox: "0 0 16 16",
619
933
  "aria-hidden": "true"
620
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
934
+ }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
621
935
  stroke: "currentColor",
622
936
  strokeLinecap: "round",
623
- d: "M3 9l6-6m0 6L3 3"
937
+ d: "M3 13L13 3m0 10L3 3"
624
938
  })));
625
939
  };
626
940
 
627
- const Close = React__namespace.default.forwardRef((props, ref) => {
628
- const ariaLabel = reactTheming.useText(Close, props, 'aria-label', 'Close');
629
- const hue = useNotificationsContext();
941
+ const Close$1 = React__namespace.default.forwardRef((props, ref) => {
942
+ const ariaLabel = reactTheming.useText(Close$1, props, 'aria-label', 'Close');
943
+ const type = useNotificationsContext();
630
944
  return React__namespace.default.createElement(StyledClose, Object.assign({
631
945
  ref: ref,
632
- hue: hue,
946
+ $type: type,
633
947
  "aria-label": ariaLabel
634
- }, props), React__namespace.default.createElement(SvgXStroke$1, null));
948
+ }, props, {
949
+ focusInset: true,
950
+ size: "small"
951
+ }), React__namespace.default.createElement(SvgXStroke, null));
635
952
  });
636
- Close.displayName = 'Close';
953
+ Close$1.displayName = 'Alert.Close';
637
954
 
638
955
  const AlertComponent = React__namespace.default.forwardRef((_ref, ref) => {
639
956
  let {
640
957
  role,
958
+ type,
641
959
  ...props
642
960
  } = _ref;
643
- const hue = validationHues[props.type];
644
- const Icon = validationIcons[props.type];
961
+ const Icon = validationIcons[type];
645
962
  return React__namespace.default.createElement(NotificationsContext.Provider, {
646
- value: hue
963
+ value: type
647
964
  }, React__namespace.default.createElement(StyledAlert, Object.assign({
648
965
  ref: ref,
649
- hue: hue,
966
+ $type: type,
650
967
  role: role === undefined ? 'alert' : role
651
968
  }, props), React__namespace.default.createElement(StyledIcon, {
652
- hue: hue
969
+ $type: type
653
970
  }, React__namespace.default.createElement(Icon, null)), props.children));
654
971
  });
655
972
  AlertComponent.displayName = 'Alert';
@@ -657,26 +974,56 @@ AlertComponent.propTypes = {
657
974
  type: PropTypes__default.default.oneOf(TYPE).isRequired
658
975
  };
659
976
  const Alert = AlertComponent;
660
- Alert.Close = Close;
661
- Alert.Paragraph = Paragraph;
662
- Alert.Title = Title;
977
+ Alert.Close = Close$1;
978
+ Alert.Paragraph = Paragraph$1;
979
+ Alert.Title = Title$1;
980
+
981
+ const Title = React__namespace.default.forwardRef((_ref, ref) => {
982
+ let {
983
+ isRegular,
984
+ ...props
985
+ } = _ref;
986
+ return React__namespace.default.createElement(StyledTitle, Object.assign({
987
+ ref: ref,
988
+ $isRegular: isRegular
989
+ }, props));
990
+ });
991
+ Title.displayName = 'Notification.Title';
992
+
993
+ const Paragraph = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledParagraph, Object.assign({
994
+ ref: ref
995
+ }, props)));
996
+ Paragraph.displayName = 'Notification.Paragraph';
997
+
998
+ const Close = React__namespace.default.forwardRef((props, ref) => {
999
+ const ariaLabel = reactTheming.useText(Close, props, 'aria-label', 'Close');
1000
+ const type = useNotificationsContext();
1001
+ return React__namespace.default.createElement(StyledClose, Object.assign({
1002
+ ref: ref,
1003
+ $type: type,
1004
+ "aria-label": ariaLabel
1005
+ }, props, {
1006
+ focusInset: true,
1007
+ size: "small"
1008
+ }), React__namespace.default.createElement(SvgXStroke, null));
1009
+ });
1010
+ Close.displayName = 'Notification.Close';
663
1011
 
664
1012
  const NotificationComponent = React.forwardRef((_ref, ref) => {
665
1013
  let {
666
- role,
1014
+ children,
1015
+ type,
667
1016
  ...props
668
1017
  } = _ref;
669
- const Icon = props.type ? validationIcons[props.type] : SvgInfoStroke;
670
- const hue = props.type && validationHues[props.type];
1018
+ const Icon = type ? validationIcons[type] : SvgInfoStroke;
671
1019
  return React__namespace.default.createElement(StyledNotification, Object.assign({
672
1020
  ref: ref,
673
- type: props.type,
674
- isFloating: true
675
- }, props, {
676
- role: role === undefined ? 'status' : role
677
- }), props.type && React__namespace.default.createElement(StyledIcon, {
678
- hue: hue
679
- }, React__namespace.default.createElement(Icon, null)), props.children);
1021
+ $type: type,
1022
+ $isFloating: true,
1023
+ role: "alert"
1024
+ }, props), !!type && React__namespace.default.createElement(StyledIcon, {
1025
+ $type: type
1026
+ }, React__namespace.default.createElement(Icon, null)), children);
680
1027
  });
681
1028
  NotificationComponent.displayName = 'Notification';
682
1029
  NotificationComponent.propTypes = {
@@ -687,9 +1034,18 @@ Notification.Close = Close;
687
1034
  Notification.Paragraph = Paragraph;
688
1035
  Notification.Title = Title;
689
1036
 
690
- const WellComponent = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledWell, Object.assign({
691
- ref: ref
692
- }, props)));
1037
+ const WellComponent = React__namespace.default.forwardRef((_ref, ref) => {
1038
+ let {
1039
+ isFloating,
1040
+ isRecessed,
1041
+ ...props
1042
+ } = _ref;
1043
+ return React__namespace.default.createElement(StyledWell, Object.assign({
1044
+ ref: ref,
1045
+ $isFloating: isFloating,
1046
+ $isRecessed: isRecessed
1047
+ }, props));
1048
+ });
693
1049
  WellComponent.displayName = 'Well';
694
1050
  WellComponent.propTypes = {
695
1051
  isRecessed: PropTypes__default.default.bool,
@@ -882,9 +1238,6 @@ const StyledFadeInTransition = styled__default.default.div.withConfig({
882
1238
  }
883
1239
  return '-100px';
884
1240
  }, TRANSITION_CLASS, DEFAULT_DURATION, DEFAULT_DURATION, DEFAULT_DURATION, TRANSITION_CLASS, TRANSITION_CLASS, DEFAULT_DURATION);
885
- StyledFadeInTransition.defaultProps = {
886
- theme: reactTheming.DEFAULT_THEME
887
- };
888
1241
  const placementStyles = props => {
889
1242
  const verticalDistance = `${props.theme.space.base * 16}px`;
890
1243
  const horizontalDistance = `${props.theme.space.base * 3}px`;
@@ -927,9 +1280,6 @@ const StyledTransitionContainer = styled__default.default.div.withConfig({
927
1280
  displayName: "styled__StyledTransitionContainer",
928
1281
  componentId: "sc-nq0usb-1"
929
1282
  })(["position:fixed;z-index:", ";", ";"], props => props.toastZIndex, placementStyles);
930
- StyledTransitionContainer.defaultProps = {
931
- theme: reactTheming.DEFAULT_THEME
932
- };
933
1283
 
934
1284
  const ToastSlot = _ref => {
935
1285
  let {
@@ -1052,8 +1402,9 @@ const GlobalAlertButton = React.forwardRef((_ref, ref) => {
1052
1402
  } = useGlobalAlertContext();
1053
1403
  return React__namespace.default.createElement(StyledGlobalAlertButton, Object.assign({
1054
1404
  ref: ref,
1055
- alertType: type
1405
+ $alertType: type
1056
1406
  }, props, {
1407
+ size: "small",
1057
1408
  isPrimary: !isBasic,
1058
1409
  isBasic: isBasic
1059
1410
  }));
@@ -1063,23 +1414,6 @@ GlobalAlertButton.propTypes = {
1063
1414
  isBasic: PropTypes__default.default.bool
1064
1415
  };
1065
1416
 
1066
- var _path;
1067
- 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); }
1068
- var SvgXStroke = function SvgXStroke(props) {
1069
- return /*#__PURE__*/React__namespace.createElement("svg", _extends({
1070
- xmlns: "http://www.w3.org/2000/svg",
1071
- width: 16,
1072
- height: 16,
1073
- focusable: "false",
1074
- viewBox: "0 0 16 16",
1075
- "aria-hidden": "true"
1076
- }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
1077
- stroke: "currentColor",
1078
- strokeLinecap: "round",
1079
- d: "M3 13L13 3m0 10L3 3"
1080
- })));
1081
- };
1082
-
1083
1417
  const GlobalAlertClose = React.forwardRef((props, ref) => {
1084
1418
  const {
1085
1419
  type
@@ -1087,8 +1421,10 @@ const GlobalAlertClose = React.forwardRef((props, ref) => {
1087
1421
  const label = reactTheming.useText(GlobalAlertClose, props, 'aria-label', 'Close');
1088
1422
  return React__namespace.default.createElement(StyledGlobalAlertClose, Object.assign({
1089
1423
  ref: ref,
1090
- alertType: type
1091
- }, props), React__namespace.default.createElement(SvgXStroke, {
1424
+ $alertType: type
1425
+ }, props, {
1426
+ size: "small"
1427
+ }), React__namespace.default.createElement(SvgXStroke, {
1092
1428
  role: "img",
1093
1429
  "aria-label": label
1094
1430
  }));
@@ -1102,12 +1438,17 @@ const GlobalAlertContent = React.forwardRef((props, ref) => {
1102
1438
  });
1103
1439
  GlobalAlertContent.displayName = 'GlobalAlert.Content';
1104
1440
 
1105
- const GlobalAlertTitle = React.forwardRef((props, ref) => {
1441
+ const GlobalAlertTitle = React.forwardRef((_ref, ref) => {
1442
+ let {
1443
+ isRegular,
1444
+ ...props
1445
+ } = _ref;
1106
1446
  const {
1107
1447
  type
1108
1448
  } = useGlobalAlertContext();
1109
1449
  return React__namespace.default.createElement(StyledGlobalAlertTitle, Object.assign({
1110
- alertType: type,
1450
+ $alertType: type,
1451
+ $isRegular: isRegular,
1111
1452
  ref: ref
1112
1453
  }, props));
1113
1454
  });
@@ -1121,20 +1462,33 @@ const GlobalAlertComponent = React.forwardRef((_ref, ref) => {
1121
1462
  type,
1122
1463
  ...props
1123
1464
  } = _ref;
1124
- return React__namespace.default.createElement(GlobalAlertContext.Provider, {
1125
- value: React.useMemo(() => ({
1126
- type
1127
- }), [type])
1128
- }, React__namespace.default.createElement(StyledGlobalAlert, Object.assign({
1129
- ref: ref,
1130
- role: "status",
1131
- alertType: type
1132
- }, props), {
1133
- success: React__namespace.default.createElement(StyledGlobalAlertIcon, null, React__namespace.default.createElement(SvgCheckCircleStroke, null)),
1134
- error: React__namespace.default.createElement(StyledGlobalAlertIcon, null, React__namespace.default.createElement(SvgAlertErrorStroke, null)),
1135
- warning: React__namespace.default.createElement(StyledGlobalAlertIcon, null, React__namespace.default.createElement(SvgAlertWarningStroke, null)),
1136
- info: React__namespace.default.createElement(StyledGlobalAlertIcon, null, React__namespace.default.createElement(SvgInfoStroke, null))
1137
- }[type], props.children));
1465
+ const icon = {
1466
+ success: React__namespace.default.createElement(SvgCheckCircleStroke, null),
1467
+ error: React__namespace.default.createElement(SvgAlertErrorStroke, null),
1468
+ warning: React__namespace.default.createElement(SvgAlertWarningStroke, null),
1469
+ info: React__namespace.default.createElement(SvgInfoStroke, null)
1470
+ }[type];
1471
+ return (
1472
+ React__namespace.default.createElement(styled.ThemeProvider, {
1473
+ theme: theme => ({
1474
+ ...theme,
1475
+ colors: {
1476
+ ...theme.colors,
1477
+ base: 'light'
1478
+ }
1479
+ })
1480
+ }, React__namespace.default.createElement(GlobalAlertContext.Provider, {
1481
+ value: React.useMemo(() => ({
1482
+ type
1483
+ }), [type])
1484
+ }, React__namespace.default.createElement(StyledGlobalAlert, Object.assign({
1485
+ ref: ref,
1486
+ role: "status",
1487
+ $alertType: type
1488
+ }, props), React__namespace.default.createElement(StyledGlobalAlertIcon, {
1489
+ $alertType: type
1490
+ }, icon), props.children)))
1491
+ );
1138
1492
  });
1139
1493
  GlobalAlertComponent.displayName = 'GlobalAlert';
1140
1494
  const GlobalAlert = GlobalAlertComponent;