@splunk/react-ui 4.21.0 → 4.22.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 (92) hide show
  1. package/Accordion.js +425 -325
  2. package/Anchor.js +147 -117
  3. package/Animation.js +142 -94
  4. package/AnimationToggle.js +197 -193
  5. package/Box.js +145 -118
  6. package/Breadcrumbs.js +288 -206
  7. package/Button.js +488 -465
  8. package/ButtonGroup.js +160 -128
  9. package/ButtonSimple.js +543 -462
  10. package/CHANGELOG.md +24 -3
  11. package/Calendar.js +1111 -1001
  12. package/Card.js +771 -598
  13. package/CardLayout.js +205 -147
  14. package/Chip.js +509 -488
  15. package/Clickable.js +414 -352
  16. package/CloseButton.js +165 -142
  17. package/Code.js +1807 -2084
  18. package/CollapsiblePanel.js +586 -519
  19. package/Color.js +1068 -1068
  20. package/ColumnLayout.js +402 -363
  21. package/ComboBox.js +903 -794
  22. package/Concertina.js +997 -802
  23. package/ControlGroup.js +687 -594
  24. package/Date.js +567 -547
  25. package/DefinitionList.js +308 -234
  26. package/Divider.js +149 -118
  27. package/Dropdown.js +459 -416
  28. package/DualListbox.js +1479 -1541
  29. package/EventListener.js +94 -97
  30. package/File.js +1051 -969
  31. package/FormRows.js +883 -696
  32. package/Heading.js +216 -193
  33. package/Image.js +446 -402
  34. package/JSONTree.js +690 -551
  35. package/Layer.js +437 -410
  36. package/Link.js +336 -255
  37. package/List.js +213 -161
  38. package/Markdown.js +509 -487
  39. package/Menu.js +1104 -1056
  40. package/Message.js +475 -441
  41. package/MessageBar.js +387 -373
  42. package/Modal.js +810 -634
  43. package/ModalLayer.js +326 -243
  44. package/Monogram.js +308 -276
  45. package/Multiselect.js +3564 -3364
  46. package/Number.js +729 -687
  47. package/Paginator.js +510 -449
  48. package/Paragraph.js +145 -112
  49. package/Popover.js +1459 -1432
  50. package/Progress.js +301 -246
  51. package/RadioBar.js +634 -527
  52. package/RadioList.js +483 -444
  53. package/Resize.js +530 -489
  54. package/ResultsMenu.js +479 -455
  55. package/ScreenReaderContent.js +142 -111
  56. package/Scroll.js +595 -456
  57. package/ScrollContainerContext.js +197 -206
  58. package/Search.js +756 -650
  59. package/Select.js +2446 -2345
  60. package/SidePanel.js +390 -284
  61. package/Slider.js +680 -676
  62. package/SlidingPanels.js +639 -503
  63. package/SplitButton.js +464 -367
  64. package/StaticContent.js +161 -133
  65. package/StepBar.js +386 -358
  66. package/Switch.js +710 -640
  67. package/TabBar.js +741 -680
  68. package/TabLayout.js +406 -322
  69. package/Table.js +4974 -4616
  70. package/Text.js +1170 -1138
  71. package/TextArea.js +1102 -1090
  72. package/Tooltip.js +624 -581
  73. package/TransitionOpen.js +489 -422
  74. package/Typography.js +176 -153
  75. package/WaitSpinner.js +230 -206
  76. package/package.json +7 -7
  77. package/types/src/Color/Color.d.ts +0 -1
  78. package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
  79. package/types/src/JSONTree/TreeNode.d.ts +5 -0
  80. package/types/src/RadioBar/RadioBar.d.ts +1 -0
  81. package/types/src/ResultsMenu/ResultsMenu.d.ts +0 -2
  82. package/types/src/Select/docs/examples/Icons.d.ts +1 -9
  83. package/types/src/Slider/Slider.d.ts +1 -0
  84. package/types/src/TabBar/Tab.d.ts +10 -1
  85. package/types/src/TabBar/TabBar.d.ts +4 -2
  86. package/types/src/Table/Head.d.ts +7 -3
  87. package/types/src/Table/Table.d.ts +3 -2
  88. package/types/src/Table/TableContext.d.ts +2 -0
  89. package/useForceUpdate.js +112 -82
  90. package/useKeyPress.js +74 -71
  91. package/usePrevious.js +65 -65
  92. package/useRovingFocus.js +122 -138
package/MessageBar.js CHANGED
@@ -1,378 +1,392 @@
1
- /******/ (() => { // webpackBootstrap
2
- /******/ "use strict";
3
- /******/ // The require scope
4
- /******/ var __webpack_require__ = {};
5
- /******/
6
- /************************************************************************/
7
- /******/ /* webpack/runtime/compat get default export */
8
- /******/ (() => {
9
- /******/ // getDefaultExport function for compatibility with non-harmony modules
10
- /******/ __webpack_require__.n = (module) => {
11
- /******/ var getter = module && module.__esModule ?
12
- /******/ () => (module['default']) :
13
- /******/ () => (module);
14
- /******/ __webpack_require__.d(getter, { a: getter });
15
- /******/ return getter;
16
- /******/ };
17
- /******/ })();
18
- /******/
19
- /******/ /* webpack/runtime/define property getters */
20
- /******/ (() => {
21
- /******/ // define getter functions for harmony exports
22
- /******/ __webpack_require__.d = (exports, definition) => {
23
- /******/ for(var key in definition) {
24
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
25
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
26
- /******/ }
27
- /******/ }
28
- /******/ };
29
- /******/ })();
30
- /******/
31
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
32
- /******/ (() => {
33
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
34
- /******/ })();
35
- /******/
36
- /******/ /* webpack/runtime/make namespace object */
37
- /******/ (() => {
38
- /******/ // define __esModule on exports
39
- /******/ __webpack_require__.r = (exports) => {
40
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
41
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
42
- /******/ }
43
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
44
- /******/ };
45
- /******/ })();
46
- /******/
47
- /************************************************************************/
48
- var __webpack_exports__ = {};
49
- // ESM COMPAT FLAG
50
- __webpack_require__.r(__webpack_exports__);
51
-
52
- // EXPORTS
53
- __webpack_require__.d(__webpack_exports__, {
54
- "default": () => (/* reexport */ MessageBar_MessageBar)
55
- });
56
-
57
- ;// CONCATENATED MODULE: external "react"
58
- const external_react_namespaceObject = require("react");
59
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
60
- ;// CONCATENATED MODULE: external "prop-types"
61
- const external_prop_types_namespaceObject = require("prop-types");
62
- var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
63
- ;// CONCATENATED MODULE: external "@splunk/react-icons/Cross"
64
- const Cross_namespaceObject = require("@splunk/react-icons/Cross");
65
- var Cross_default = /*#__PURE__*/__webpack_require__.n(Cross_namespaceObject);
66
- ;// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Close"
67
- const Close_namespaceObject = require("@splunk/react-icons/enterprise/Close");
68
- var Close_default = /*#__PURE__*/__webpack_require__.n(Close_namespaceObject);
69
- ;// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
70
- const ScreenReaderContent_namespaceObject = require("@splunk/react-ui/ScreenReaderContent");
71
- var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_namespaceObject);
72
- ;// CONCATENATED MODULE: external "@splunk/themes"
73
- const themes_namespaceObject = require("@splunk/themes");
74
- ;// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
75
- const i18n_namespaceObject = require("@splunk/ui-utils/i18n");
76
- ;// CONCATENATED MODULE: external "styled-components"
77
- const external_styled_components_namespaceObject = require("styled-components");
78
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
79
- ;// CONCATENATED MODULE: external "@splunk/react-icons/CheckCircle"
80
- const CheckCircle_namespaceObject = require("@splunk/react-icons/CheckCircle");
81
- var CheckCircle_default = /*#__PURE__*/__webpack_require__.n(CheckCircle_namespaceObject);
82
- ;// CONCATENATED MODULE: external "@splunk/react-icons/ExclamationCircle"
83
- const ExclamationCircle_namespaceObject = require("@splunk/react-icons/ExclamationCircle");
84
- var ExclamationCircle_default = /*#__PURE__*/__webpack_require__.n(ExclamationCircle_namespaceObject);
85
- ;// CONCATENATED MODULE: external "@splunk/react-icons/InformationCircle"
86
- const InformationCircle_namespaceObject = require("@splunk/react-icons/InformationCircle");
87
- var InformationCircle_default = /*#__PURE__*/__webpack_require__.n(InformationCircle_namespaceObject);
88
- ;// CONCATENATED MODULE: external "@splunk/react-icons/ExclamationTriangle"
89
- const ExclamationTriangle_namespaceObject = require("@splunk/react-icons/ExclamationTriangle");
90
- var ExclamationTriangle_default = /*#__PURE__*/__webpack_require__.n(ExclamationTriangle_namespaceObject);
91
- ;// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Error"
92
- const Error_namespaceObject = require("@splunk/react-icons/enterprise/Error");
93
- var Error_default = /*#__PURE__*/__webpack_require__.n(Error_namespaceObject);
94
- ;// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/InfoCircle"
95
- const InfoCircle_namespaceObject = require("@splunk/react-icons/enterprise/InfoCircle");
96
- var InfoCircle_default = /*#__PURE__*/__webpack_require__.n(InfoCircle_namespaceObject);
97
- ;// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Success"
98
- const Success_namespaceObject = require("@splunk/react-icons/enterprise/Success");
99
- var Success_default = /*#__PURE__*/__webpack_require__.n(Success_namespaceObject);
100
- ;// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Warning"
101
- const Warning_namespaceObject = require("@splunk/react-icons/enterprise/Warning");
102
- var Warning_default = /*#__PURE__*/__webpack_require__.n(Warning_namespaceObject);
103
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Box"
104
- const Box_namespaceObject = require("@splunk/react-ui/Box");
105
- var Box_default = /*#__PURE__*/__webpack_require__.n(Box_namespaceObject);
106
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
107
- const Clickable_namespaceObject = require("@splunk/react-ui/Clickable");
108
- var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_namespaceObject);
109
- ;// CONCATENATED MODULE: ./src/MessageBar/MessageBarStyles.ts
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
- var MessageBarContent = external_styled_components_default().div.withConfig({
123
- displayName: "MessageBarStyles__MessageBarContent",
124
- componentId: "sc-1uyhzza-0"
125
- })(["", ";color:inherit;padding:0 8px;text-align:center;margin-right:auto;& a{display:inline-block;color:inherit;text-decoration:underline;text-underline-position:under;padding:0 3px 2px 3px;&:not([disabled]):focus{border-radius:", ";outline:0;box-shadow:", ";}}"], themes_namespaceObject.mixins.reset('inline'), themes_namespaceObject.variables.borderRadius, (0,themes_namespaceObject.pick)({
126
- enterprise: {
127
- dark: (0,external_styled_components_namespaceObject.css)(["0 0 0 2px ", ""], themes_namespaceObject.variables.gray80),
128
- light: (0,external_styled_components_namespaceObject.css)(["0 0 0 2px ", ""], themes_namespaceObject.variables.gray25)
129
- },
130
- prisma: {
131
- light: (0,themes_namespaceObject.pickVariant)('$type', {
132
- info: (0,external_styled_components_namespaceObject.css)(["0 0 0 3px ", ""], themes_namespaceObject.variables.black),
133
- warning: (0,external_styled_components_namespaceObject.css)(["0 0 0 3px ", ""], themes_namespaceObject.variables.black),
134
- error: (0,external_styled_components_namespaceObject.css)(["0 0 0 3px ", ""], themes_namespaceObject.variables.white),
135
- success: (0,external_styled_components_namespaceObject.css)(["0 0 0 3px ", ""], themes_namespaceObject.variables.white)
136
- }),
137
- dark: (0,external_styled_components_namespaceObject.css)(["0 0 0 3px ", ""], themes_namespaceObject.variables.black)
138
- }
139
- }));
140
- var MessageBarCloseWrapper = external_styled_components_default()((Clickable_default())).withConfig({
141
- displayName: "MessageBarStyles__MessageBarCloseWrapper",
142
- componentId: "sc-1uyhzza-1"
143
- })(["", ";border:1px solid transparent;border-radius:", ";color:inherit;cursor:pointer;padding:", ";", " &:hover,&:focus{background:", ";border:", ";color:", ";}&:active{", ";}", ""], themes_namespaceObject.mixins.reset('flex'), themes_namespaceObject.variables.borderRadius, (0,themes_namespaceObject.pick)({
144
- enterprise: themes_namespaceObject.variables.spacingXSmall,
145
- prisma: '3px'
146
- }), (0,themes_namespaceObject.pick)({
147
- enterprise: (0,external_styled_components_namespaceObject.css)(["margin-top:1px;"])
148
- }), (0,themes_namespaceObject.pick)({
149
- prisma: themes_namespaceObject.variables.interactiveColorOverlayHover,
150
- enterprise: {
151
- dark: themes_namespaceObject.variables.gray30,
152
- light: themes_namespaceObject.variables.gray92
153
- }
154
- }), (0,themes_namespaceObject.pick)({
155
- prisma: (0,external_styled_components_namespaceObject.css)(["1px solid inherit"]),
156
- enterprise: (0,external_styled_components_namespaceObject.css)(["1px solid ", ""], themes_namespaceObject.variables.gray80)
157
- }), (0,themes_namespaceObject.pick)({
158
- enterprise: {
159
- dark: themes_namespaceObject.variables.gray96,
160
- light: themes_namespaceObject.variables.linkColor
161
- }
162
- }), (0,themes_namespaceObject.pick)({
163
- prisma: (0,external_styled_components_namespaceObject.css)(["background:", ";"], themes_namespaceObject.variables.interactiveColorOverlayActive),
164
- enterprise: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";"], themes_namespaceObject.variables.focusShadow)
165
- }), (0,themes_namespaceObject.pick)({
166
- prisma: (0,external_styled_components_namespaceObject.css)(["&:focus{border-radius:", ";box-shadow:", ";}"], themes_namespaceObject.variables.borderRadius, (0,themes_namespaceObject.pick)({
167
- light: (0,themes_namespaceObject.pickVariant)('$type', {
168
- info: (0,external_styled_components_namespaceObject.css)(["0 0 0 3px ", ""], themes_namespaceObject.variables.black),
169
- warning: (0,external_styled_components_namespaceObject.css)(["0 0 0 3px ", ""], themes_namespaceObject.variables.black),
170
- error: (0,external_styled_components_namespaceObject.css)(["0 0 0 3px ", ""], themes_namespaceObject.variables.white),
171
- success: (0,external_styled_components_namespaceObject.css)(["0 0 0 3px ", ""], themes_namespaceObject.variables.white)
172
- }),
173
- dark: (0,external_styled_components_namespaceObject.css)(["0 0 0 3px ", ""], themes_namespaceObject.variables.black)
174
- }))
175
- }));
176
- var iconCommonStyles = (0,external_styled_components_namespaceObject.css)(["margin-left:auto;"]);
177
- var StyledCheckCircleIcon = external_styled_components_default()((CheckCircle_default())).withConfig({
178
- displayName: "MessageBarStyles__StyledCheckCircleIcon",
179
- componentId: "sc-1uyhzza-2"
180
- })(["", ""], iconCommonStyles);
181
- var StyledExclamationCircleIcon = external_styled_components_default()((ExclamationCircle_default())).withConfig({
182
- displayName: "MessageBarStyles__StyledExclamationCircleIcon",
183
- componentId: "sc-1uyhzza-3"
184
- })(["", ""], iconCommonStyles);
185
- var StyledInformationCircleIcon = external_styled_components_default()((InformationCircle_default())).withConfig({
186
- displayName: "MessageBarStyles__StyledInformationCircleIcon",
187
- componentId: "sc-1uyhzza-4"
188
- })(["", ""], iconCommonStyles);
189
- var StyledExclamationTriangleIcon = external_styled_components_default()((ExclamationTriangle_default())).withConfig({
190
- displayName: "MessageBarStyles__StyledExclamationTriangleIcon",
191
- componentId: "sc-1uyhzza-5"
192
- })(["", ""], iconCommonStyles);
193
- var StyledEnterpriseErrorIcon = external_styled_components_default()((Error_default())).withConfig({
194
- displayName: "MessageBarStyles__StyledEnterpriseErrorIcon",
195
- componentId: "sc-1uyhzza-6"
196
- })(["", " color:", ";"], iconCommonStyles, themes_namespaceObject.variables.errorColor);
197
- var StyledEnterpriseInfoCircleIcon = external_styled_components_default()((InfoCircle_default())).withConfig({
198
- displayName: "MessageBarStyles__StyledEnterpriseInfoCircleIcon",
199
- componentId: "sc-1uyhzza-7"
200
- })(["", " color:", ";"], iconCommonStyles, themes_namespaceObject.variables.infoColor);
201
- var StyledEnterpriseSuccessIcon = external_styled_components_default()((Success_default())).withConfig({
202
- displayName: "MessageBarStyles__StyledEnterpriseSuccessIcon",
203
- componentId: "sc-1uyhzza-8"
204
- })(["", " color:", ";"], iconCommonStyles, themes_namespaceObject.variables.successColor);
205
- var StyledEnterpriseWarningIcon = external_styled_components_default()((Warning_default())).withConfig({
206
- displayName: "MessageBarStyles__StyledEnterpriseWarningIcon",
207
- componentId: "sc-1uyhzza-9"
208
- })(["", " color:", ";"], iconCommonStyles, themes_namespaceObject.variables.warningColor);
209
- var MessageBarWrapper = external_styled_components_default()((Box_default())).withConfig({
210
- displayName: "MessageBarStyles__MessageBarWrapper",
211
- componentId: "sc-1uyhzza-10"
212
- })(["", ";display:flex;align-items:center;justify-content:center;min-height:40px;margin-bottom:", ";", ";word-wrap:break-word;color:", ";", ";"], themes_namespaceObject.mixins.reset('block'), themes_namespaceObject.variables.spacingSmall, function (_ref) {
213
- var $hasCloseButton = _ref.$hasCloseButton;
214
- return $hasCloseButton ? (0,external_styled_components_namespaceObject.css)(["", ""], (0,themes_namespaceObject.pick)({
215
- prisma: (0,external_styled_components_namespaceObject.css)(["padding:0 8px 0 32px;"]),
216
- enterprise: (0,external_styled_components_namespaceObject.css)(["padding:0 8px 0 38px;"])
217
- })) : (0,external_styled_components_namespaceObject.css)(["", ""], (0,themes_namespaceObject.pick)({
218
- prisma: (0,external_styled_components_namespaceObject.css)(["padding:0 33px 0 32px;"]),
219
- enterprise: (0,external_styled_components_namespaceObject.css)(["padding:0 26px 0 32px;"])
220
- }));
221
- }, (0,themes_namespaceObject.pick)({
222
- prisma: (0,themes_namespaceObject.pickVariant)('$type', {
223
- info: {
224
- light: themes_namespaceObject.variables.contentColorActive,
225
- dark: themes_namespaceObject.variables.contentColorInverted
226
- },
227
- success: themes_namespaceObject.variables.contentColorInverted,
228
- warning: themes_namespaceObject.variables.black,
229
- error: themes_namespaceObject.variables.contentColorInverted
230
- }),
231
- enterprise: {
232
- dark: themes_namespaceObject.variables.gray96,
233
- light: themes_namespaceObject.variables.gray25
234
- }
235
- }), (0,themes_namespaceObject.pickVariant)('$type', {
236
- info: (0,external_styled_components_namespaceObject.css)(["background-color:", ";"], (0,themes_namespaceObject.pick)({
237
- prisma: {
238
- dark: themes_namespaceObject.variables.white,
239
- light: themes_namespaceObject.variables.neutral200
240
- },
241
- enterprise: {
242
- dark: themes_namespaceObject.mixins.colorWithAlpha(themes_namespaceObject.variables.infoColor, 0.5),
243
- light: themes_namespaceObject.variables.infoColorL50
244
- }
245
- })),
246
- success: (0,external_styled_components_namespaceObject.css)(["background-color:", ";"], (0,themes_namespaceObject.pick)({
247
- prisma: themes_namespaceObject.variables.accentColorPositive,
248
- enterprise: {
249
- dark: themes_namespaceObject.mixins.colorWithAlpha(themes_namespaceObject.variables.successColor, 0.5),
250
- light: themes_namespaceObject.variables.successColorL50
1
+ /******/ (() => {
2
+ // webpackBootstrap
3
+ /******/ "use strict";
4
+ /******/ // The require scope
5
+ /******/ var e = {};
6
+ /******/
7
+ /************************************************************************/
8
+ /******/ /* webpack/runtime/compat get default export */
9
+ /******/ (() => {
10
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
11
+ /******/ e.n = r => {
12
+ /******/ var a = r && r.__esModule ?
13
+ /******/ () => r["default"]
14
+ /******/ : () => r
15
+ /******/;
16
+ e.d(a, {
17
+ a
18
+ });
19
+ /******/ return a;
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/define property getters */
24
+ /******/ (() => {
25
+ /******/ // define getter functions for harmony exports
26
+ /******/ e.d = (r, a) => {
27
+ /******/ for (var i in a) {
28
+ /******/ if (e.o(a, i) && !e.o(r, i)) {
29
+ /******/ Object.defineProperty(r, i, {
30
+ enumerable: true,
31
+ get: a[i]
32
+ });
33
+ /******/ }
34
+ /******/ }
35
+ /******/ };
36
+ /******/ })();
37
+ /******/
38
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
+ /******/ (() => {
40
+ /******/ e.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
41
+ /******/;
42
+ })();
43
+ /******/
44
+ /******/ /* webpack/runtime/make namespace object */
45
+ /******/ (() => {
46
+ /******/ // define __esModule on exports
47
+ /******/ e.r = e => {
48
+ /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
49
+ /******/ Object.defineProperty(e, Symbol.toStringTag, {
50
+ value: "Module"
51
+ });
52
+ /******/ }
53
+ /******/ Object.defineProperty(e, "__esModule", {
54
+ value: true
55
+ });
56
+ /******/ };
57
+ /******/ })();
58
+ /******/
59
+ /************************************************************************/ var r = {};
60
+ // ESM COMPAT FLAG
61
+ e.r(r);
62
+ // EXPORTS
63
+ e.d(r, {
64
+ default: () => /* reexport */ ie
65
+ });
66
+ // CONCATENATED MODULE: external "react"
67
+ const a = require("react");
68
+ var i = e.n(a);
69
+ // CONCATENATED MODULE: external "prop-types"
70
+ const s = require("prop-types");
71
+ var n = e.n(s);
72
+ // CONCATENATED MODULE: external "@splunk/react-icons/Cross"
73
+ const t = require("@splunk/react-icons/Cross");
74
+ var o = e.n(t);
75
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Close"
76
+ const c = require("@splunk/react-icons/enterprise/Close");
77
+ var l = e.n(c);
78
+ // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
79
+ const p = require("@splunk/react-ui/ScreenReaderContent");
80
+ var u = e.n(p);
81
+ // CONCATENATED MODULE: external "@splunk/themes"
82
+ const d = require("@splunk/themes");
83
+ // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
84
+ const v = require("@splunk/ui-utils/i18n");
85
+ // CONCATENATED MODULE: external "styled-components"
86
+ const g = require("styled-components");
87
+ var b = e.n(g);
88
+ // CONCATENATED MODULE: external "@splunk/react-icons/CheckCircle"
89
+ const h = require("@splunk/react-icons/CheckCircle");
90
+ var y = e.n(h);
91
+ // CONCATENATED MODULE: external "@splunk/react-icons/ExclamationCircle"
92
+ const m = require("@splunk/react-icons/ExclamationCircle");
93
+ var f = e.n(m);
94
+ // CONCATENATED MODULE: external "@splunk/react-icons/InformationCircle"
95
+ const k = require("@splunk/react-icons/InformationCircle");
96
+ var x = e.n(k);
97
+ // CONCATENATED MODULE: external "@splunk/react-icons/ExclamationTriangle"
98
+ const C = require("@splunk/react-icons/ExclamationTriangle");
99
+ var w = e.n(C);
100
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Error"
101
+ const S = require("@splunk/react-icons/enterprise/Error");
102
+ var _ = e.n(S);
103
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/InfoCircle"
104
+ const I = require("@splunk/react-icons/enterprise/InfoCircle");
105
+ var z = e.n(I);
106
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Success"
107
+ const q = require("@splunk/react-icons/enterprise/Success");
108
+ var O = e.n(q);
109
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Warning"
110
+ const E = require("@splunk/react-icons/enterprise/Warning");
111
+ var B = e.n(E);
112
+ // CONCATENATED MODULE: external "@splunk/react-ui/Box"
113
+ const M = require("@splunk/react-ui/Box");
114
+ var j = e.n(M);
115
+ // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
116
+ const N = require("@splunk/react-ui/Clickable");
117
+ var R = e.n(N);
118
+ // CONCATENATED MODULE: ./src/MessageBar/MessageBarStyles.ts
119
+ var T = b().div.withConfig({
120
+ displayName: "MessageBarStyles__MessageBarContent",
121
+ componentId: "sc-1uyhzza-0"
122
+ })([ "", ";color:inherit;padding:0 8px;text-align:center;margin-right:auto;& a{display:inline-block;color:inherit;text-decoration:underline;text-underline-position:under;padding:0 3px 2px 3px;&:not([disabled]):focus{border-radius:", ";outline:0;box-shadow:", ";}}" ], d.mixins.reset("inline"), d.variables.borderRadius, (0,
123
+ d.pick)({
124
+ enterprise: {
125
+ dark: (0, g.css)([ "0 0 0 2px ", "" ], d.variables.gray80),
126
+ light: (0, g.css)([ "0 0 0 2px ", "" ], d.variables.gray25)
127
+ },
128
+ prisma: {
129
+ light: (0, d.pickVariant)("$type", {
130
+ info: (0, g.css)([ "0 0 0 3px ", "" ], d.variables.black),
131
+ warning: (0, g.css)([ "0 0 0 3px ", "" ], d.variables.black),
132
+ error: (0, g.css)([ "0 0 0 3px ", "" ], d.variables.white),
133
+ success: (0, g.css)([ "0 0 0 3px ", "" ], d.variables.white)
134
+ }),
135
+ dark: (0, g.css)([ "0 0 0 3px ", "" ], d.variables.black)
136
+ }
137
+ }));
138
+ var W = b()(R()).withConfig({
139
+ displayName: "MessageBarStyles__MessageBarCloseWrapper",
140
+ componentId: "sc-1uyhzza-1"
141
+ })([ "", ";border:1px solid transparent;border-radius:", ";color:inherit;cursor:pointer;padding:", ";", " &:hover,&:focus{background:", ";border:", ";color:", ";}&:active{", ";}", "" ], d.mixins.reset("flex"), d.variables.borderRadius, (0,
142
+ d.pick)({
143
+ enterprise: d.variables.spacingXSmall,
144
+ prisma: "3px"
145
+ }), (0, d.pick)({
146
+ enterprise: (0, g.css)([ "margin-top:1px;" ])
147
+ }), (0, d.pick)({
148
+ prisma: d.variables.interactiveColorOverlayHover,
149
+ enterprise: {
150
+ dark: d.variables.gray30,
151
+ light: d.variables.gray92
152
+ }
153
+ }), (0, d.pick)({
154
+ prisma: (0, g.css)([ "1px solid inherit" ]),
155
+ enterprise: (0, g.css)([ "1px solid ", "" ], d.variables.gray80)
156
+ }), (0, d.pick)({
157
+ enterprise: {
158
+ dark: d.variables.gray96,
159
+ light: d.variables.linkColor
160
+ }
161
+ }), (0, d.pick)({
162
+ prisma: (0, g.css)([ "background:", ";" ], d.variables.interactiveColorOverlayActive),
163
+ enterprise: (0, g.css)([ "box-shadow:", ";" ], d.variables.focusShadow)
164
+ }), (0, d.pick)({
165
+ prisma: (0, g.css)([ "&:focus{border-radius:", ";box-shadow:", ";}" ], d.variables.borderRadius, (0,
166
+ d.pick)({
167
+ light: (0, d.pickVariant)("$type", {
168
+ info: (0, g.css)([ "0 0 0 3px ", "" ], d.variables.black),
169
+ warning: (0, g.css)([ "0 0 0 3px ", "" ], d.variables.black),
170
+ error: (0, g.css)([ "0 0 0 3px ", "" ], d.variables.white),
171
+ success: (0, g.css)([ "0 0 0 3px ", "" ], d.variables.white)
172
+ }),
173
+ dark: (0, g.css)([ "0 0 0 3px ", "" ], d.variables.black)
174
+ }))
175
+ }));
176
+ var $ = (0, g.css)([ "margin-left:auto;" ]);
177
+ var P = b()(y()).withConfig({
178
+ displayName: "MessageBarStyles__StyledCheckCircleIcon",
179
+ componentId: "sc-1uyhzza-2"
180
+ })([ "", "" ], $);
181
+ var A = b()(f()).withConfig({
182
+ displayName: "MessageBarStyles__StyledExclamationCircleIcon",
183
+ componentId: "sc-1uyhzza-3"
184
+ })([ "", "" ], $);
185
+ var L = b()(x()).withConfig({
186
+ displayName: "MessageBarStyles__StyledInformationCircleIcon",
187
+ componentId: "sc-1uyhzza-4"
188
+ })([ "", "" ], $);
189
+ var V = b()(w()).withConfig({
190
+ displayName: "MessageBarStyles__StyledExclamationTriangleIcon",
191
+ componentId: "sc-1uyhzza-5"
192
+ })([ "", "" ], $);
193
+ var D = b()(_()).withConfig({
194
+ displayName: "MessageBarStyles__StyledEnterpriseErrorIcon",
195
+ componentId: "sc-1uyhzza-6"
196
+ })([ "", " color:", ";" ], $, d.variables.errorColor);
197
+ var H = b()(z()).withConfig({
198
+ displayName: "MessageBarStyles__StyledEnterpriseInfoCircleIcon",
199
+ componentId: "sc-1uyhzza-7"
200
+ })([ "", " color:", ";" ], $, d.variables.infoColor);
201
+ var X = b()(O()).withConfig({
202
+ displayName: "MessageBarStyles__StyledEnterpriseSuccessIcon",
203
+ componentId: "sc-1uyhzza-8"
204
+ })([ "", " color:", ";" ], $, d.variables.successColor);
205
+ var F = b()(B()).withConfig({
206
+ displayName: "MessageBarStyles__StyledEnterpriseWarningIcon",
207
+ componentId: "sc-1uyhzza-9"
208
+ })([ "", " color:", ";" ], $, d.variables.warningColor);
209
+ var G = b()(j()).withConfig({
210
+ displayName: "MessageBarStyles__MessageBarWrapper",
211
+ componentId: "sc-1uyhzza-10"
212
+ })([ "", ";display:flex;align-items:center;justify-content:center;min-height:40px;margin-bottom:", ";", ";word-wrap:break-word;color:", ";", ";" ], d.mixins.reset("block"), d.variables.spacingSmall, (function(e) {
213
+ var r = e.$hasCloseButton;
214
+ return r ? (0, g.css)([ "", "" ], (0, d.pick)({
215
+ prisma: (0, g.css)([ "padding:0 8px 0 32px;" ]),
216
+ enterprise: (0, g.css)([ "padding:0 8px 0 38px;" ])
217
+ })) : (0, g.css)([ "", "" ], (0, d.pick)({
218
+ prisma: (0, g.css)([ "padding:0 33px 0 32px;" ]),
219
+ enterprise: (0, g.css)([ "padding:0 26px 0 32px;" ])
220
+ }));
221
+ }), (0, d.pick)({
222
+ prisma: (0, d.pickVariant)("$type", {
223
+ info: {
224
+ light: d.variables.contentColorActive,
225
+ dark: d.variables.contentColorInverted
226
+ },
227
+ success: d.variables.contentColorInverted,
228
+ warning: d.variables.black,
229
+ error: d.variables.contentColorInverted
230
+ }),
231
+ enterprise: {
232
+ dark: d.variables.gray96,
233
+ light: d.variables.gray25
234
+ }
235
+ }), (0, d.pickVariant)("$type", {
236
+ info: (0, g.css)([ "background-color:", ";" ], (0, d.pick)({
237
+ prisma: {
238
+ dark: d.variables.white,
239
+ light: d.variables.neutral200
240
+ },
241
+ enterprise: {
242
+ dark: d.mixins.colorWithAlpha(d.variables.infoColor, .5),
243
+ light: d.variables.infoColorL50
244
+ }
245
+ })),
246
+ success: (0, g.css)([ "background-color:", ";" ], (0, d.pick)({
247
+ prisma: d.variables.accentColorPositive,
248
+ enterprise: {
249
+ dark: d.mixins.colorWithAlpha(d.variables.successColor, .5),
250
+ light: d.variables.successColorL50
251
+ }
252
+ })),
253
+ warning: (0, g.css)([ "background-color:", ";" ], (0, d.pick)({
254
+ prisma: d.variables.accentColorWarning,
255
+ enterprise: {
256
+ dark: d.mixins.colorWithAlpha(d.variables.warningColor, .5),
257
+ light: d.variables.warningColorL50
258
+ }
259
+ })),
260
+ error: (0, g.css)([ "background-color:", ";" ], (0, d.pick)({
261
+ prisma: d.variables.accentColorNegative,
262
+ enterprise: {
263
+ dark: d.mixins.colorWithAlpha(d.variables.errorColor, .5),
264
+ light: d.variables.errorColorL50
265
+ }
266
+ }))
267
+ }));
268
+ // CONCATENATED MODULE: ./src/MessageBar/MessageBar.tsx
269
+ function J() {
270
+ J = Object.assign || function(e) {
271
+ for (var r = 1; r < arguments.length; r++) {
272
+ var a = arguments[r];
273
+ for (var i in a) {
274
+ if (Object.prototype.hasOwnProperty.call(a, i)) {
275
+ e[i] = a[i];
276
+ }
277
+ }
278
+ }
279
+ return e;
280
+ };
281
+ return J.apply(this, arguments);
251
282
  }
252
- })),
253
- warning: (0,external_styled_components_namespaceObject.css)(["background-color:", ";"], (0,themes_namespaceObject.pick)({
254
- prisma: themes_namespaceObject.variables.accentColorWarning,
255
- enterprise: {
256
- dark: themes_namespaceObject.mixins.colorWithAlpha(themes_namespaceObject.variables.warningColor, 0.5),
257
- light: themes_namespaceObject.variables.warningColorL50
283
+ function K(e, r) {
284
+ if (e == null) return {};
285
+ var a = Q(e, r);
286
+ var i, s;
287
+ if (Object.getOwnPropertySymbols) {
288
+ var n = Object.getOwnPropertySymbols(e);
289
+ for (s = 0; s < n.length; s++) {
290
+ i = n[s];
291
+ if (r.indexOf(i) >= 0) continue;
292
+ if (!Object.prototype.propertyIsEnumerable.call(e, i)) continue;
293
+ a[i] = e[i];
294
+ }
295
+ }
296
+ return a;
258
297
  }
259
- })),
260
- error: (0,external_styled_components_namespaceObject.css)(["background-color:", ";"], (0,themes_namespaceObject.pick)({
261
- prisma: themes_namespaceObject.variables.accentColorNegative,
262
- enterprise: {
263
- dark: themes_namespaceObject.mixins.colorWithAlpha(themes_namespaceObject.variables.errorColor, 0.5),
264
- light: themes_namespaceObject.variables.errorColorL50
298
+ function Q(e, r) {
299
+ if (e == null) return {};
300
+ var a = {};
301
+ var i = Object.keys(e);
302
+ var s, n;
303
+ for (n = 0; n < i.length; n++) {
304
+ s = i[n];
305
+ if (r.indexOf(s) >= 0) continue;
306
+ a[s] = e[s];
307
+ }
308
+ return a;
265
309
  }
266
- }))
267
- }));
268
-
269
- ;// CONCATENATED MODULE: ./src/MessageBar/MessageBar.tsx
270
- function _extends() { _extends = Object.assign || 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); }
271
-
272
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
273
-
274
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
275
-
276
-
277
-
278
-
279
-
280
-
281
-
282
-
283
-
284
- var propTypes = {
285
- children: (external_prop_types_default()).node.isRequired,
286
- onRequestClose: (external_prop_types_default()).func,
287
- type: external_prop_types_default().oneOf(['info', 'success', 'warning', 'error']).isRequired
288
- };
289
- var TypeToAnnouncementMap = Object.freeze({
290
- info: (0,i18n_namespaceObject._)('Info'),
291
- warning: (0,i18n_namespaceObject._)('Warning'),
292
- error: (0,i18n_namespaceObject._)('Alert'),
293
- success: (0,i18n_namespaceObject._)('Success')
294
- });
295
- var enterpriseTypeToIconMap = Object.freeze({
296
- info: StyledEnterpriseInfoCircleIcon,
297
- warning: StyledEnterpriseWarningIcon,
298
- error: StyledEnterpriseErrorIcon,
299
- success: StyledEnterpriseSuccessIcon
300
- });
301
- var prismaTypeToIconMap = Object.freeze({
302
- info: StyledInformationCircleIcon,
303
- warning: StyledExclamationTriangleIcon,
304
- error: StyledExclamationCircleIcon,
305
- success: StyledCheckCircleIcon
306
- });
307
- var standardIconSize = '24px';
308
-
309
- function MessageBar(_ref) {
310
- var children = _ref.children,
311
- type = _ref.type,
312
- onRequestClose = _ref.onRequestClose,
313
- otherProps = _objectWithoutProperties(_ref, ["children", "type", "onRequestClose"]);
314
-
315
- // @docs-props-type MessageBarPropsBase
316
- var _useSplunkTheme = (0,themes_namespaceObject.useSplunkTheme)(),
317
- isEnterprise = _useSplunkTheme.isEnterprise;
318
-
319
- var width = isEnterprise && type === 'error' ? '22px' : standardIconSize;
320
- var height = isEnterprise && type === 'warning' ? '21px' : standardIconSize;
321
- var icon;
322
-
323
- if (isEnterprise) {
324
- var IconType = enterpriseTypeToIconMap[type];
325
- icon = /*#__PURE__*/external_react_default().createElement(IconType, {
326
- height: height,
327
- width: width,
328
- hideDefaultTooltip: true,
329
- screenReaderText: null,
330
- "aria-hidden": true,
331
- "data-test": "icon"
310
+ var U = {
311
+ children: n().node.isRequired,
312
+ onRequestClose: n().func,
313
+ type: n().oneOf([ "info", "success", "warning", "error" ]).isRequired
314
+ };
315
+ var Y = Object.freeze({
316
+ info: (0, v._)("Info"),
317
+ warning: (0, v._)("Warning"),
318
+ error: (0, v._)("Alert"),
319
+ success: (0, v._)("Success")
332
320
  });
333
- } else {
334
- var _IconType = prismaTypeToIconMap[type];
335
- icon = /*#__PURE__*/external_react_default().createElement(_IconType, {
336
- height: standardIconSize,
337
- width: standardIconSize,
338
- variant: "filled",
339
- "aria-hidden": true,
340
- "data-test": "icon"
321
+ var Z = Object.freeze({
322
+ info: H,
323
+ warning: F,
324
+ error: D,
325
+ success: X
341
326
  });
342
- }
343
-
344
- return /*#__PURE__*/external_react_default().createElement(MessageBarWrapper, _extends({
345
- $type: type,
346
- "data-test": "message-bar",
347
- "data-test-type": type
348
- }, otherProps, {
349
- role: "region",
350
- $hasCloseButton: Boolean(onRequestClose)
351
- }), icon, /*#__PURE__*/external_react_default().createElement((ScreenReaderContent_default()), null, TypeToAnnouncementMap[type]), /*#__PURE__*/external_react_default().createElement(MessageBarContent, {
352
- $type: type,
353
- "data-test": "content"
354
- }, children), onRequestClose && /*#__PURE__*/external_react_default().createElement(MessageBarCloseWrapper, {
355
- $type: type,
356
- onClick: onRequestClose
357
- }, isEnterprise ? /*#__PURE__*/external_react_default().createElement((Close_default()), {
358
- height: "12px",
359
- hideDefaultTooltip: true,
360
- screenReaderText: null,
361
- width: "12px"
362
- }) : /*#__PURE__*/external_react_default().createElement((Cross_default()), {
363
- height: "19px",
364
- style: {
365
- margin: -0.5
366
- },
367
- width: "19px"
368
- }), /*#__PURE__*/external_react_default().createElement((ScreenReaderContent_default()), null, (0,i18n_namespaceObject._)('Close'))));
369
- }
370
-
371
- MessageBar.propTypes = propTypes;
372
- /* harmony default export */ const MessageBar_MessageBar = (MessageBar);
373
- ;// CONCATENATED MODULE: ./src/MessageBar/index.ts
374
-
375
-
376
- module.exports = __webpack_exports__;
377
- /******/ })()
378
- ;
327
+ var ee = Object.freeze({
328
+ info: L,
329
+ warning: V,
330
+ error: A,
331
+ success: P
332
+ });
333
+ var re = "24px";
334
+ function ae(e) {
335
+ var r = e.children, a = e.type, s = e.onRequestClose, n = K(e, [ "children", "type", "onRequestClose" ]);
336
+ // @docs-props-type MessageBarPropsBase
337
+ var t = (0, d.useSplunkTheme)(), c = t.isEnterprise;
338
+ var p = c && a === "error" ? "22px" : re;
339
+ var g = c && a === "warning" ? "21px" : re;
340
+ var b;
341
+ if (c) {
342
+ var h = Z[a];
343
+ b = i().createElement(h, {
344
+ height: g,
345
+ width: p,
346
+ hideDefaultTooltip: true,
347
+ screenReaderText: null,
348
+ "aria-hidden": true,
349
+ "data-test": "icon"
350
+ });
351
+ } else {
352
+ var y = ee[a];
353
+ b = i().createElement(y, {
354
+ height: re,
355
+ width: re,
356
+ variant: "filled",
357
+ "aria-hidden": true,
358
+ "data-test": "icon"
359
+ });
360
+ }
361
+
362
+ return i().createElement(G, J({
363
+ $type: a,
364
+ "data-test": "message-bar",
365
+ "data-test-type": a
366
+ }, n, {
367
+ role: "region",
368
+ $hasCloseButton: Boolean(s)
369
+ }), b, i().createElement(u(), null, Y[a]), i().createElement(T, {
370
+ $type: a,
371
+ "data-test": "content"
372
+ }, r), s && i().createElement(W, {
373
+ $type: a,
374
+ onClick: s
375
+ }, c ? i().createElement(l(), {
376
+ height: "12px",
377
+ hideDefaultTooltip: true,
378
+ screenReaderText: null,
379
+ width: "12px"
380
+ }) : i().createElement(o(), {
381
+ height: "19px",
382
+ style: {
383
+ margin: -.5
384
+ },
385
+ width: "19px"
386
+ }), i().createElement(u(), null, (0, v._)("Close"))));
387
+ }
388
+ ae.propTypes = U;
389
+ /* harmony default export */ const ie = ae;
390
+ // CONCATENATED MODULE: ./src/MessageBar/index.ts
391
+ module.exports = r;
392
+ /******/})();