@splunk/react-ui 4.38.0 → 4.40.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 (172) hide show
  1. package/Accordion.js +131 -153
  2. package/Anchor.js +50 -58
  3. package/Animation.js +64 -59
  4. package/AnimationToggle.js +59 -61
  5. package/Box.js +59 -67
  6. package/Breadcrumbs.js +113 -127
  7. package/Button.js +151 -169
  8. package/ButtonGroup.js +41 -49
  9. package/ButtonSimple.js +264 -295
  10. package/CHANGELOG.md +49 -0
  11. package/Calendar.js +353 -414
  12. package/Card.js +186 -244
  13. package/CardLayout.js +86 -83
  14. package/Chip.js +136 -146
  15. package/Clickable.js +180 -198
  16. package/CloseButton.js +52 -60
  17. package/Code.js +24 -31
  18. package/CollapsiblePanel.js +172 -202
  19. package/Color.js +371 -412
  20. package/ColumnLayout.js +72 -96
  21. package/ComboBox.js +266 -303
  22. package/Concertina.js +406 -454
  23. package/ControlGroup.js +178 -210
  24. package/Date.js +116 -131
  25. package/DefinitionList.js +125 -149
  26. package/Divider.js +81 -79
  27. package/Dropdown.js +226 -237
  28. package/DualListbox.js +150 -186
  29. package/EventListener.js +4 -1
  30. package/File.js +1032 -955
  31. package/FormRows.js +281 -334
  32. package/Heading.js +27 -35
  33. package/Image.js +101 -116
  34. package/JSONTree.js +301 -344
  35. package/Layer.js +118 -126
  36. package/Link.js +141 -159
  37. package/List.js +61 -77
  38. package/MIGRATION.mdx +123 -38
  39. package/Markdown.js +288 -347
  40. package/Menu.js +506 -532
  41. package/Message.js +197 -207
  42. package/MessageBar.js +58 -66
  43. package/Modal.js +241 -290
  44. package/ModalLayer.js +130 -148
  45. package/Monogram.js +138 -138
  46. package/Multiselect.js +3137 -3433
  47. package/Number.js +164 -178
  48. package/Paginator.js +296 -335
  49. package/Paragraph.js +24 -32
  50. package/Popover.js +450 -442
  51. package/Progress.js +65 -75
  52. package/RadioBar.js +301 -303
  53. package/RadioList.js +77 -119
  54. package/Resize.js +105 -127
  55. package/ResultsMenu.js +373 -385
  56. package/ScreenReaderContent.js +50 -58
  57. package/Scroll.js +209 -244
  58. package/Search.js +379 -391
  59. package/Select.js +2085 -2345
  60. package/SidePanel.js +122 -142
  61. package/Slider.js +132 -145
  62. package/SlidingPanels.js +238 -270
  63. package/SplitButton.d.ts +2 -0
  64. package/SplitButton.js +222 -245
  65. package/StaticContent.js +68 -76
  66. package/StepBar.js +206 -205
  67. package/Switch.js +176 -205
  68. package/TabBar.js +235 -268
  69. package/TabLayout.js +122 -141
  70. package/Table.js +2103 -2261
  71. package/Text.js +379 -493
  72. package/TextArea.js +411 -441
  73. package/Tooltip.js +116 -132
  74. package/TransitionOpen.js +160 -178
  75. package/Tree.js +268 -287
  76. package/Typography.js +48 -52
  77. package/WaitSpinner.js +61 -69
  78. package/cypress/support/commands.ts +9 -0
  79. package/cypress/support/index.d.ts +6 -0
  80. package/cypress/tsconfig.cypress.json +1 -0
  81. package/docker-compose.yml +0 -1
  82. package/package.json +15 -15
  83. package/types/src/Button/Button.d.ts +5 -1
  84. package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
  85. package/types/src/Card/Card.d.ts +1 -0
  86. package/types/src/Card/Footer.d.ts +1 -0
  87. package/types/src/Chip/Chip.d.ts +3 -6
  88. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
  89. package/types/src/Color/Color.d.ts +2 -2
  90. package/types/src/Color/Palette.d.ts +4 -2
  91. package/types/src/ComboBox/ComboBox.d.ts +1 -1
  92. package/types/src/ComboBox/Option.d.ts +1 -1
  93. package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
  94. package/types/src/Date/Date.d.ts +2 -2
  95. package/types/src/File/File.d.ts +2 -3
  96. package/types/src/File/Retry.d.ts +1 -2
  97. package/types/src/Menu/Item.d.ts +18 -5
  98. package/types/src/Menu/Menu.d.ts +3 -3
  99. package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
  100. package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
  101. package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
  102. package/types/src/Multiselect/Compact.d.ts +1 -1
  103. package/types/src/Multiselect/Multiselect.d.ts +1 -1
  104. package/types/src/Multiselect/Normal.d.ts +1 -1
  105. package/types/src/Multiselect/Option.d.ts +2 -0
  106. package/types/src/Number/Number.d.ts +3 -3
  107. package/types/src/Popover/Popover.d.ts +3 -4
  108. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  109. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  110. package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
  111. package/types/src/Search/Option.d.ts +9 -3
  112. package/types/src/Select/Option.d.ts +3 -1
  113. package/types/src/Select/OptionBase.d.ts +7 -5
  114. package/types/src/Select/Select.d.ts +4 -2
  115. package/types/src/Select/SelectAllOption.d.ts +4 -4
  116. package/types/src/Select/SelectBase.d.ts +104 -66
  117. package/types/src/Select/docs/examples/Appearance.d.ts +0 -2
  118. package/types/src/SidePanel/SidePanel.d.ts +1 -1
  119. package/types/src/Slider/Slider.d.ts +2 -2
  120. package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
  121. package/types/src/StepBar/Step.d.ts +1 -2
  122. package/types/src/Switch/Switch.d.ts +0 -1
  123. package/types/src/TabBar/Tab.d.ts +1 -1
  124. package/types/src/TabBar/TabBar.d.ts +3 -1
  125. package/types/src/TabLayout/TabLayout.d.ts +2 -0
  126. package/types/src/Table/Cell.d.ts +0 -2
  127. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  128. package/types/src/Table/HeadInner.d.ts +5 -1
  129. package/types/src/Table/Table.d.ts +0 -1
  130. package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
  131. package/types/src/Text/IconOutlinedHide.d.ts +1 -2
  132. package/types/src/Text/IconOutlinedView.d.ts +1 -2
  133. package/types/src/Text/Text.d.ts +2 -2
  134. package/types/src/TextArea/TextArea.d.ts +2 -2
  135. package/types/src/Tooltip/Tooltip.d.ts +4 -4
  136. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
  137. package/types/src/WaitSpinner/WaitSpinner.d.ts +0 -1
  138. package/types/src/useControlled/index.d.ts +2 -0
  139. package/types/src/useControlled/useControlled.d.ts +21 -0
  140. package/types/src/useResizeObserver/index.d.ts +2 -0
  141. package/types/src/useResizeObserver/useResizeObserver.d.ts +12 -0
  142. package/useControlled.js +112 -0
  143. package/useForceUpdate.js +30 -32
  144. package/useKeyPress.d.ts +2 -0
  145. package/useKeyPress.js +1 -1
  146. package/useResizeObserver.d.ts +2 -0
  147. package/useResizeObserver.js +137 -0
  148. package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
  149. package/types/src/Chip/docs/examples/Basic.d.ts +0 -2
  150. package/types/src/Chip/docs/examples/prisma/Appearance.d.ts +0 -2
  151. package/types/src/Color/docs/examples/prisma/Controlled.d.ts +0 -2
  152. package/types/src/Color/docs/examples/prisma/ThemeVariables.d.ts +0 -1
  153. package/types/src/Color/docs/examples/prisma/Uncontrolled.d.ts +0 -2
  154. package/types/src/Dropdown/docs/examples/prisma/Basic.d.ts +0 -2
  155. package/types/src/Dropdown/docs/examples/prisma/BasicMenu.d.ts +0 -2
  156. package/types/src/Dropdown/docs/examples/prisma/ControlledDropdown.d.ts +0 -2
  157. package/types/src/Dropdown/docs/examples/prisma/Dialog.d.ts +0 -2
  158. package/types/src/Dropdown/docs/examples/prisma/OtherToggles.d.ts +0 -2
  159. package/types/src/Dropdown/docs/examples/prisma/ScrollingMenu.d.ts +0 -2
  160. package/types/src/File/docs/examples/prisma/Disabled.d.ts +0 -12
  161. package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
  162. package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
  163. package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
  164. package/types/src/Message/docs/examples/prisma/Title.d.ts +0 -2
  165. package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
  166. package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
  167. package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
  168. package/types/src/WaitSpinner/docs/examples/prisma/Basic.d.ts +0 -2
  169. /package/types/src/Color/docs/examples/{prisma/CustomizedPalette.d.ts → CustomizedPalette.d.ts} +0 -0
  170. /package/types/src/Color/docs/examples/{prisma/HideInput.d.ts → HideInput.d.ts} +0 -0
  171. /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
  172. /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
package/Message.js CHANGED
@@ -62,20 +62,20 @@
62
62
  // EXPORTS
63
63
  e.d(r, {
64
64
  Link: () => /* reexport */ z,
65
- default: () => /* reexport */ pe
65
+ default: () => /* reexport */ ue
66
66
  });
67
67
  // CONCATENATED MODULE: external "react"
68
68
  const a = require("react");
69
69
  var n = e.n(a);
70
70
  // CONCATENATED MODULE: external "prop-types"
71
71
  const i = require("prop-types");
72
- var o = e.n(i);
72
+ var s = e.n(i);
73
73
  // CONCATENATED MODULE: external "@splunk/react-icons/CheckCircle"
74
- const t = require("@splunk/react-icons/CheckCircle");
75
- var s = e.n(t);
74
+ const o = require("@splunk/react-icons/CheckCircle");
75
+ var t = e.n(o);
76
76
  // CONCATENATED MODULE: external "@splunk/react-icons/Cross"
77
- const c = require("@splunk/react-icons/Cross");
78
- var l = e.n(c);
77
+ const l = require("@splunk/react-icons/Cross");
78
+ var c = e.n(l);
79
79
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Close"
80
80
  const p = require("@splunk/react-icons/enterprise/Close");
81
81
  var u = e.n(p);
@@ -98,18 +98,18 @@
98
98
  const x = require("@splunk/react-icons/enterprise/Success");
99
99
  var w = e.n(x);
100
100
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Warning"
101
- const O = require("@splunk/react-icons/enterprise/Warning");
102
- var S = e.n(O);
101
+ const S = require("@splunk/react-icons/enterprise/Warning");
102
+ var O = e.n(S);
103
103
  // CONCATENATED MODULE: external "@splunk/react-ui/MessageBar"
104
- const j = require("@splunk/react-ui/MessageBar");
105
- var q = e.n(j);
104
+ const q = require("@splunk/react-ui/MessageBar");
105
+ var _ = e.n(q);
106
106
  // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
107
- const _ = require("@splunk/react-ui/ScreenReaderContent");
108
- var E = e.n(_);
107
+ const E = require("@splunk/react-ui/ScreenReaderContent");
108
+ var P = e.n(E);
109
109
  // CONCATENATED MODULE: external "@splunk/themes"
110
- const I = require("@splunk/themes");
110
+ const j = require("@splunk/themes");
111
111
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
112
- const P = require("@splunk/ui-utils/i18n");
112
+ const I = require("@splunk/ui-utils/i18n");
113
113
  // CONCATENATED MODULE: external "styled-components"
114
114
  const R = require("styled-components");
115
115
  var T = e.n(R);
@@ -123,37 +123,32 @@
123
123
  })([ "" ]);
124
124
  // CONCATENATED MODULE: ./src/Message/Link.tsx
125
125
  function A(e, r) {
126
- if (e == null) return {};
127
- var a = N(e, r);
128
- var n, i;
126
+ if (null == e) return {};
127
+ var a, n, i = N(e, r);
129
128
  if (Object.getOwnPropertySymbols) {
130
- var o = Object.getOwnPropertySymbols(e);
131
- for (i = 0; i < o.length; i++) {
132
- n = o[i];
133
- if (r.indexOf(n) >= 0) continue;
134
- if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
135
- a[n] = e[n];
129
+ var s = Object.getOwnPropertySymbols(e);
130
+ for (n = 0; n < s.length; n++) {
131
+ a = s[n], r.includes(a) || {}.propertyIsEnumerable.call(e, a) && (i[a] = e[a]);
136
132
  }
137
133
  }
138
- return a;
134
+ return i;
139
135
  }
140
136
  function N(e, r) {
141
- if (e == null) return {};
137
+ if (null == e) return {};
142
138
  var a = {};
143
- var n = Object.keys(e);
144
- var i, o;
145
- for (o = 0; o < n.length; o++) {
146
- i = n[o];
147
- if (r.indexOf(i) >= 0) continue;
148
- a[i] = e[i];
139
+ for (var n in e) {
140
+ if ({}.hasOwnProperty.call(e, n)) {
141
+ if (r.includes(n)) continue;
142
+ a[n] = e[n];
143
+ }
149
144
  }
150
145
  return a;
151
146
  }
152
147
  var W = {
153
- children: o().node,
154
- elementRef: o().oneOfType([ o().func, o().object ]),
155
- openInNewContext: o().bool,
156
- to: o().string
148
+ children: s().node,
149
+ elementRef: s().oneOfType([ s().func, s().object ]),
150
+ openInNewContext: s().bool,
151
+ to: s().string
157
152
  };
158
153
  /**
159
154
  * @deprecated `Message.Link` is deprecated and will be removed in a future major version. Use `Link` instead.
@@ -178,242 +173,228 @@
178
173
  var F = T().p.withConfig({
179
174
  displayName: "TitleStyles__StyledTitle",
180
175
  componentId: "sc-6gbjha-0"
181
- })([ "", " ", "" ], I.mixins.reset("block"), (0, I.pick)({
176
+ })([ "", " ", "" ], j.mixins.reset("block"), (0, j.pick)({
182
177
  prisma: (0, R.css)([ "font-size:14px;line-height:20px;" ])
183
178
  }));
184
179
  // CONCATENATED MODULE: ./src/Message/MessageStyles.ts
185
180
  var G = T().div.withConfig({
186
181
  displayName: "MessageStyles__StyledContent",
187
182
  componentId: "eg66af-0"
188
- })([ "display:flex;align-items:baseline;flex:1;", ";", " ", ";" ], (0, I.pick)({
189
- prisma: (0, R.css)([ "padding:", " 0;color:", ";" ], I.variables.spacingMedium, I.variables.contentColorActive),
183
+ })([ "width:100%;", ";", " ", ";" ], (0, j.pick)({
184
+ prisma: (0, R.css)([ "padding:", " 0;color:", ";" ], j.variables.spacingMedium, j.variables.contentColorActive),
190
185
  enterprise: (0, R.css)([ "padding:12px 0;" ])
191
- }), (0, I.pick)({
192
- prisma: (0, R.css)([ "padding-left:", ";" ], I.variables.spacingXSmall),
186
+ }), (0, j.pick)({
187
+ prisma: (0, R.css)([ "padding-left:", ";" ], j.variables.spacingXSmall),
193
188
  enterprise: (0, R.css)([ "padding-left:15px;" ])
194
189
  }), (function(e) {
195
190
  var r = e.$fillStyle;
196
- return r && (0, I.pick)({
197
- prisma: (0, R.css)([ "padding-left:", ";" ], I.variables.spacingMedium)
191
+ return r && (0, j.pick)({
192
+ prisma: (0, R.css)([ "padding-left:", ";" ], j.variables.spacingMedium)
198
193
  });
199
194
  }));
200
- var J = T()(H()).withConfig({
201
- displayName: "MessageStyles__StyledRemove",
195
+ var J = T().div.withConfig({
196
+ displayName: "MessageStyles__StyledWrapper",
202
197
  componentId: "eg66af-1"
203
- })([ "", ";border:1px solid transparent;border-radius:", ";color:", ";", ";cursor:pointer;position:absolute;", " padding:8px;&:hover,&:focus{background:", ";color:", ";}&:active{", ";}", "" ], I.mixins.reset("flex"), (0,
204
- I.pick)({
198
+ })([ "display:flex;align-items:baseline;flex:1;" ]);
199
+ var K = T()(H()).withConfig({
200
+ displayName: "MessageStyles__StyledRemove",
201
+ componentId: "eg66af-2"
202
+ })([ "", ";border:1px solid transparent;border-radius:", ";color:", ";", ";cursor:pointer;position:absolute;", " padding:8px;&:hover,&:focus{background:", ";color:", ";}&:active{", ";}", "" ], j.mixins.reset("flex"), (0,
203
+ j.pick)({
205
204
  prisma: "50%",
206
- enterprise: I.variables.borderRadius
207
- }), (0, I.pick)({
208
- prisma: I.variables.contentColorMuted,
205
+ enterprise: j.variables.borderRadius
206
+ }), (0, j.pick)({
207
+ prisma: j.variables.contentColorMuted,
209
208
  enterprise: {
210
- dark: I.variables.gray96,
211
- light: I.variables.gray45
209
+ dark: j.variables.gray96,
210
+ light: j.variables.gray45
212
211
  }
213
212
  }), (function(e) {
214
213
  var r = e.$appearance;
215
- return r === "banner" && (0, I.pick)({
216
- prisma: (0, R.css)([ "color:", ";" ], I.variables.contentColorInverted)
214
+ return r === "banner" && (0, j.pick)({
215
+ prisma: (0, R.css)([ "color:", ";" ], j.variables.contentColorInverted)
217
216
  });
218
- }), (0, I.pick)({
217
+ }), (0, j.pick)({
219
218
  prisma: (0, R.css)([ "top:3px;right:2px;" ]),
220
219
  enterprise: (0, R.css)([ "top:8px;right:8px;" ])
221
- }), (0, I.pick)({
222
- prisma: I.variables.interactiveColorOverlayHover,
220
+ }), (0, j.pick)({
221
+ prisma: j.variables.interactiveColorOverlayHover,
223
222
  enterprise: {
224
- dark: I.variables.gray30,
225
- light: I.variables.gray92
223
+ dark: j.variables.gray30,
224
+ light: j.variables.gray92
226
225
  }
227
- }), (0, I.pick)({
226
+ }), (0, j.pick)({
228
227
  enterprise: {
229
- dark: I.variables.gray96,
230
- light: I.variables.linkColor
228
+ dark: j.variables.gray96,
229
+ light: j.variables.linkColor
231
230
  },
232
- prisma: I.variables.contentColorActive
233
- }), (0, I.pick)({
234
- prisma: (0, R.css)([ "background:", ";" ], I.variables.interactiveColorOverlayActive),
235
- enterprise: (0, R.css)([ "box-shadow:", ";" ], I.variables.focusShadow)
236
- }), (0, I.pick)({
237
- prisma: (0, R.css)([ "&:focus{box-shadow:0 0 0 3px ", ";}" ], I.variables.focusColor)
231
+ prisma: j.variables.contentColorActive
232
+ }), (0, j.pick)({
233
+ prisma: (0, R.css)([ "background:", ";" ], j.variables.interactiveColorOverlayActive),
234
+ enterprise: (0, R.css)([ "box-shadow:", ";" ], j.variables.focusShadow)
235
+ }), (0, j.pick)({
236
+ prisma: (0, R.css)([ "&:focus{box-shadow:0 0 0 3px ", ";}" ], j.variables.focusColor)
238
237
  }));
239
- var K = T().span.withConfig({
238
+ var Q = T().span.withConfig({
240
239
  displayName: "MessageStyles__StyledIconWrapper",
241
- componentId: "eg66af-2"
240
+ componentId: "eg66af-3"
242
241
  })([ "position:relative;min-width:", ";text-align:center;color:", ";", " ", "" ], (0,
243
- I.pick)({
244
- prisma: I.variables.spacingXLarge,
242
+ j.pick)({
243
+ prisma: j.variables.spacingXLarge,
245
244
  enterprise: "25px"
246
- }), I.variables.white, (0, I.pick)({
245
+ }), j.variables.white, (0, j.pick)({
247
246
  enterprise: (0, R.css)([ "top:-2px;" ]),
248
247
  prisma: (0, R.css)([ "top:-1.8px;" ])
249
- }), (0, I.pickVariant)("$type", {
250
- info: (0, R.css)([ "color:", ";" ], (0, I.pick)({
251
- prisma: I.variables.contentColorMuted,
252
- enterprise: I.variables.infoColor
248
+ }), (0, j.pickVariant)("$type", {
249
+ info: (0, R.css)([ "color:", ";" ], (0, j.pick)({
250
+ prisma: j.variables.contentColorMuted,
251
+ enterprise: j.variables.infoColor
253
252
  })),
254
- success: (0, R.css)([ "color:", ";" ], I.variables.accentColorPositive),
255
- warning: (0, R.css)([ "color:", ";" ], I.variables.accentColorWarning),
256
- error: (0, R.css)([ "color:", ";" ], I.variables.accentColorNegative)
253
+ success: (0, R.css)([ "color:", ";" ], j.variables.accentColorPositive),
254
+ warning: (0, R.css)([ "color:", ";" ], j.variables.accentColorWarning),
255
+ error: (0, R.css)([ "color:", ";" ], j.variables.accentColorNegative)
257
256
  }));
258
- var Q = T()(B()).withConfig({
257
+ var U = T()(B()).withConfig({
259
258
  displayName: "MessageStyles__StyledBox",
260
- componentId: "eg66af-3"
261
- })([ "", ";align-items:baseline;position:relative;border-radius:", ";margin-bottom:", ";", " word-wrap:break-word;", " ", "" ], I.mixins.reset("flex"), (0,
262
- I.pick)({
263
- prisma: I.variables.borderRadius,
259
+ componentId: "eg66af-4"
260
+ })([ "", ";align-items:baseline;position:relative;border-radius:", ";margin-bottom:", ";", " word-wrap:break-word;", " ", "" ], j.mixins.reset("flex"), (0,
261
+ j.pick)({
262
+ prisma: j.variables.borderRadius,
264
263
  enterprise: "5px"
265
- }), I.variables.spacingSmall, (0, I.pickVariant)("$hasRemoveIcon", {
264
+ }), j.variables.spacingSmall, (0, j.pickVariant)("$hasRemoveIcon", {
266
265
  true: {
267
- prisma: (0, R.css)([ "padding-right:", ";" ], I.variables.spacingXXXLarge),
268
- enterprise: (0, R.css)([ "padding-right:", ";" ], I.variables.spacingXXLarge)
266
+ prisma: (0, R.css)([ "padding-right:", ";" ], j.variables.spacingXXXLarge),
267
+ enterprise: (0, R.css)([ "padding-right:", ";" ], j.variables.spacingXXLarge)
269
268
  },
270
- false: (0, R.css)([ "padding-right:", ";" ], I.variables.spacingSmall)
269
+ false: (0, R.css)([ "padding-right:", ";" ], j.variables.spacingSmall)
271
270
  }), (function(e) {
272
271
  var r = e.$fillStyle;
273
- return r && (0, I.pick)({
274
- enterprise: (0, R.css)([ "& > ", "{left:", ";}", "" ],
275
- /* sc-sel */
276
- K, I.variables.spacingXSmall, (0, I.pickVariant)("$type", {
277
- info: (0, R.css)([ "", "" ], (0, I.pick)({
278
- light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], I.variables.infoColorL50, I.variables.infoColor),
279
- dark: (0, R.css)([ "background-color:", ";" ], I.mixins.colorWithAlpha(I.variables.infoColor, .5))
272
+ return r && (0, j.pick)({
273
+ enterprise: (0, R.css)([ "& > ", "{left:", ";}", "" ], /* sc-sel */ Q, j.variables.spacingXSmall, (0,
274
+ j.pickVariant)("$type", {
275
+ info: (0, R.css)([ "", "" ], (0, j.pick)({
276
+ light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], j.variables.infoColorL50, j.variables.infoColor),
277
+ dark: (0, R.css)([ "background-color:", ";" ], j.mixins.colorWithAlpha(j.variables.infoColor, .5))
280
278
  })),
281
- success: (0, R.css)([ "", "" ], (0, I.pick)({
282
- light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], I.variables.successColorL50, I.variables.successColor),
283
- dark: (0, R.css)([ "background-color:", ";" ], I.mixins.colorWithAlpha(I.variables.successColor, .5))
279
+ success: (0, R.css)([ "", "" ], (0, j.pick)({
280
+ light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], j.variables.successColorL50, j.variables.successColor),
281
+ dark: (0, R.css)([ "background-color:", ";" ], j.mixins.colorWithAlpha(j.variables.successColor, .5))
284
282
  })),
285
- warning: (0, R.css)([ "", "" ], (0, I.pick)({
286
- light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], I.variables.warningColorL50, I.variables.warningColor),
287
- dark: (0, R.css)([ "background-color:", ";" ], I.mixins.colorWithAlpha(I.variables.warningColor, .5))
283
+ warning: (0, R.css)([ "", "" ], (0, j.pick)({
284
+ light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], j.variables.warningColorL50, j.variables.warningColor),
285
+ dark: (0, R.css)([ "background-color:", ";" ], j.mixins.colorWithAlpha(j.variables.warningColor, .5))
288
286
  })),
289
- error: (0, R.css)([ "", "" ], (0, I.pick)({
290
- light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], I.variables.errorColorL50, I.variables.errorColor),
291
- dark: (0, R.css)([ "background-color:", ";" ], I.mixins.colorWithAlpha(I.variables.errorColor, .5))
287
+ error: (0, R.css)([ "", "" ], (0, j.pick)({
288
+ light: (0, R.css)([ "background-color:", ";border:1px solid ", ";" ], j.variables.errorColorL50, j.variables.errorColor),
289
+ dark: (0, R.css)([ "background-color:", ";" ], j.mixins.colorWithAlpha(j.variables.errorColor, .5))
292
290
  }))
293
291
  })),
294
292
  prisma: (0, R.css)([ "", ";box-shadow:", ";& > ", "{color:", ";}" ], (function(e) {
295
293
  var r = e.$type;
296
294
  var a = {
297
- info: I.variables.contentColorActive,
298
- success: I.variables.accentColorPositive,
299
- warning: I.variables.accentColorWarning,
300
- error: I.variables.accentColorNegative
295
+ info: j.variables.contentColorActive,
296
+ success: j.variables.accentColorPositive,
297
+ warning: j.variables.accentColorWarning,
298
+ error: j.variables.accentColorNegative
301
299
  };
302
300
  var n = a[r];
303
- return (0, R.css)([ "background:linear-gradient( to right,", " 0,", " ", ",", " ", ",", " 100% );" ], n, n, I.variables.spacingXLarge, I.variables.backgroundColorPopup, I.variables.spacingXLarge, I.variables.backgroundColorPopup);
304
- }), I.variables.embossShadow,
305
- /* sc-sel */
306
- K, I.variables.backgroundColorPopup)
301
+ return (0, R.css)([ "background:linear-gradient( to right,", " 0,", " ", ",", " ", ",", " 100% );" ], n, n, j.variables.spacingXLarge, j.variables.backgroundColorPopup, j.variables.spacingXLarge, j.variables.backgroundColorPopup);
302
+ }), j.variables.embossShadow, /* sc-sel */ Q, j.variables.backgroundColorPopup)
307
303
  });
308
- }), (0, I.pick)({
309
- prisma: (0, R.css)([ "& ", "{color:", ";}" ],
310
- /* sc-sel */
311
- F, (0, I.pickVariant)("$type", {
312
- info: I.variables.contentColorActive,
313
- warning: I.variables.accentColorWarning,
314
- error: I.variables.accentColorNegative,
315
- success: I.variables.accentColorPositive
304
+ }), (0, j.pick)({
305
+ prisma: (0, R.css)([ "& ", "{color:", ";}" ], /* sc-sel */ F, (0, j.pickVariant)("$type", {
306
+ info: j.variables.contentColorActive,
307
+ warning: j.variables.accentColorWarning,
308
+ error: j.variables.accentColorNegative,
309
+ success: j.variables.accentColorPositive
316
310
  }))
317
311
  }));
318
312
  // CONCATENATED MODULE: ./src/Message/Title.tsx
319
- function U(e, r) {
320
- if (e == null) return {};
321
- var a = Y(e, r);
322
- var n, i;
313
+ function Y(e, r) {
314
+ if (null == e) return {};
315
+ var a, n, i = Z(e, r);
323
316
  if (Object.getOwnPropertySymbols) {
324
- var o = Object.getOwnPropertySymbols(e);
325
- for (i = 0; i < o.length; i++) {
326
- n = o[i];
327
- if (r.indexOf(n) >= 0) continue;
328
- if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
329
- a[n] = e[n];
317
+ var s = Object.getOwnPropertySymbols(e);
318
+ for (n = 0; n < s.length; n++) {
319
+ a = s[n], r.includes(a) || {}.propertyIsEnumerable.call(e, a) && (i[a] = e[a]);
330
320
  }
331
321
  }
332
- return a;
322
+ return i;
333
323
  }
334
- function Y(e, r) {
335
- if (e == null) return {};
324
+ function Z(e, r) {
325
+ if (null == e) return {};
336
326
  var a = {};
337
- var n = Object.keys(e);
338
- var i, o;
339
- for (o = 0; o < n.length; o++) {
340
- i = n[o];
341
- if (r.indexOf(i) >= 0) continue;
342
- a[i] = e[i];
327
+ for (var n in e) {
328
+ if ({}.hasOwnProperty.call(e, n)) {
329
+ if (r.includes(n)) continue;
330
+ a[n] = e[n];
331
+ }
343
332
  }
344
333
  return a;
345
334
  }
346
- var Z = {
347
- children: o().node
335
+ var ee = {
336
+ children: s().node
348
337
  };
349
338
  /**
350
339
  * A title component for use in `Message`.
351
- */ function ee(e) {
352
- var r = e.children, a = U(e, [ "children" ]);
340
+ */ function re(e) {
341
+ var r = e.children, a = Y(e, [ "children" ]);
353
342
  // @docs-props-type TitleProps
354
343
 
355
344
  return n().createElement(F, a, r);
356
345
  }
357
- ee.propTypes = Z;
358
- /* harmony default export */ const re = ee;
346
+ re.propTypes = ee;
347
+ /* harmony default export */ const ae = re;
359
348
  // CONCATENATED MODULE: ./src/Message/Message.tsx
360
- function ae() {
361
- ae = Object.assign || function(e) {
349
+ function ne() {
350
+ return ne = Object.assign ? Object.assign.bind() : function(e) {
362
351
  for (var r = 1; r < arguments.length; r++) {
363
352
  var a = arguments[r];
364
353
  for (var n in a) {
365
- if (Object.prototype.hasOwnProperty.call(a, n)) {
366
- e[n] = a[n];
367
- }
354
+ ({}).hasOwnProperty.call(a, n) && (e[n] = a[n]);
368
355
  }
369
356
  }
370
357
  return e;
371
- };
372
- return ae.apply(this, arguments);
358
+ }, ne.apply(null, arguments);
373
359
  }
374
- function ne(e, r) {
375
- if (e == null) return {};
376
- var a = ie(e, r);
377
- var n, i;
360
+ function ie(e, r) {
361
+ if (null == e) return {};
362
+ var a, n, i = se(e, r);
378
363
  if (Object.getOwnPropertySymbols) {
379
- var o = Object.getOwnPropertySymbols(e);
380
- for (i = 0; i < o.length; i++) {
381
- n = o[i];
382
- if (r.indexOf(n) >= 0) continue;
383
- if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
384
- a[n] = e[n];
364
+ var s = Object.getOwnPropertySymbols(e);
365
+ for (n = 0; n < s.length; n++) {
366
+ a = s[n], r.includes(a) || {}.propertyIsEnumerable.call(e, a) && (i[a] = e[a]);
385
367
  }
386
368
  }
387
- return a;
369
+ return i;
388
370
  }
389
- function ie(e, r) {
390
- if (e == null) return {};
371
+ function se(e, r) {
372
+ if (null == e) return {};
391
373
  var a = {};
392
- var n = Object.keys(e);
393
- var i, o;
394
- for (o = 0; o < n.length; o++) {
395
- i = n[o];
396
- if (r.indexOf(i) >= 0) continue;
397
- a[i] = e[i];
374
+ for (var n in e) {
375
+ if ({}.hasOwnProperty.call(e, n)) {
376
+ if (r.includes(n)) continue;
377
+ a[n] = e[n];
378
+ }
398
379
  }
399
380
  return a;
400
381
  }
401
382
  var oe = {
402
- appearance: o().oneOf([ "default", "fill", "banner" ]),
403
- children: o().node,
404
- elementRef: o().oneOfType([ o().func, o().object ]),
405
- onRequestRemove: o().func,
406
- type: o().oneOf([ "info", "success", "warning", "error" ])
383
+ appearance: s().oneOf([ "default", "fill", "banner" ]),
384
+ children: s().node,
385
+ elementRef: s().oneOfType([ s().func, s().object ]),
386
+ onRequestRemove: s().func,
387
+ type: s().oneOf([ "info", "success", "warning", "error" ])
407
388
  };
408
389
  var te = Object.freeze({
409
- info: (0, P._)("Info"),
410
- warning: (0, P._)("Warning"),
411
- error: (0, P._)("Alert"),
412
- success: (0, P._)("Success")
390
+ info: (0, I._)("Info"),
391
+ warning: (0, I._)("Warning"),
392
+ error: (0, I._)("Alert"),
393
+ success: (0, I._)("Success")
413
394
  });
414
- var se = Object.freeze({
395
+ var le = Object.freeze({
415
396
  info: C(),
416
- warning: S(),
397
+ warning: O(),
417
398
  error: k(),
418
399
  success: w()
419
400
  });
@@ -421,40 +402,49 @@
421
402
  info: f(),
422
403
  warning: m(),
423
404
  error: d(),
424
- success: s()
405
+ success: t()
425
406
  });
426
- function le(e) {
427
- var r = e.appearance, i = r === void 0 ? "default" : r, o = e.children, t = e.type, s = t === void 0 ? "warning" : t, c = e.onRequestRemove, p = ne(e, [ "appearance", "children", "type", "onRequestRemove" ]);
407
+ function pe(e) {
408
+ var r = e.appearance, i = r === void 0 ? "default" : r, s = e.children, o = e.type, t = o === void 0 ? "warning" : o, l = e.onRequestRemove, p = ie(e, [ "appearance", "children", "type", "onRequestRemove" ]);
428
409
  // @docs-props-type MessagePropsBase
429
- var v = (0, I.useSplunkTheme)(), d = v.isEnterprise;
410
+ var v = (0, j.useSplunkTheme)(), d = v.isEnterprise;
430
411
  if (false) {}
431
- // double check this can only be button
412
+ // double check this can only be button
432
413
  var b = (0, a.useCallback)((function(e) {
433
- c === null || c === void 0 ? void 0 : c(e);
434
- }), [ c ]);
414
+ l === null || l === void 0 ? void 0 : l(e);
415
+ }), [ l ]);
435
416
  if (i === "banner") {
436
417
 
437
- return n().createElement(q(), ae({
438
- type: s,
418
+ return n().createElement(_(), ne({
419
+ type: t,
439
420
  "data-test": "banner",
440
421
  onRequestClose: b
441
- }, p), o);
422
+ }, p), s);
442
423
  }
443
- var f = d ? se : ce;
444
- var g = f[s];
424
+ var f = d ? le : ce;
425
+ var g = f[t];
445
426
  var m = i === "fill";
446
427
  var y = i === "default" || i === "fill";
428
+ // filters out Message.Title from other content
429
+ var k;
430
+ var h = n().Children.toArray(s).filter((function(e) {
431
+ if ( n().isValidElement(e) && e.type === ae) {
432
+ k = e;
433
+ return false;
434
+ }
435
+ return true;
436
+ }));
447
437
 
448
- return n().createElement(Q, ae({
438
+ return n().createElement(U, ne({
449
439
  $appearance: i,
450
440
  $fillStyle: m,
451
- $hasRemoveIcon: !!c,
452
- $type: s,
453
- "data-test-type": s,
441
+ $hasRemoveIcon: !!l,
442
+ $type: t,
443
+ "data-test-type": t,
454
444
  "data-test": "message"
455
- }, p), y && n().createElement(K, {
445
+ }, p), y && n().createElement(Q, {
456
446
  $fillStyle: m,
457
- $type: s
447
+ $type: t
458
448
  }, d ? n().createElement(g, {
459
449
  height: "24px",
460
450
  width: "24px",
@@ -462,10 +452,10 @@
462
452
  screenReaderText: null
463
453
  }) : n().createElement(g, {
464
454
  variant: "filled"
465
- }), n().createElement(E(), null, te[s])), n().createElement(G, {
455
+ }), n().createElement(P(), null, te[t])), n().createElement(G, {
466
456
  "data-test": "content",
467
457
  $fillStyle: m
468
- }, o), c && n().createElement(J, {
458
+ }, k, n().createElement(J, null, h)), l && n().createElement(K, {
469
459
  "data-test": "remove",
470
460
  onClick: b,
471
461
  $appearance: i
@@ -474,15 +464,15 @@
474
464
  hideDefaultTooltip: true,
475
465
  screenReaderText: null,
476
466
  width: "12px"
477
- }) : n().createElement(l(), {
467
+ }) : n().createElement(c(), {
478
468
  height: "20px",
479
469
  width: "20px"
480
470
  })));
481
471
  }
482
- le.propTypes = oe;
483
- le.Title = re;
484
- le.Link = z;
485
- /* harmony default export */ const pe = le;
472
+ pe.propTypes = oe;
473
+ pe.Title = ae;
474
+ pe.Link = z;
475
+ /* harmony default export */ const ue = pe;
486
476
  // CONCATENATED MODULE: ./src/Message/index.ts
487
477
  module.exports = r;
488
478
  /******/})();