@splunk/react-ui 5.0.0 → 5.1.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 (94) hide show
  1. package/Accordion.js +59 -59
  2. package/Avatar.js +20 -20
  3. package/Breadcrumbs.js +46 -46
  4. package/Button.js +24 -24
  5. package/CHANGELOG.md +21 -2
  6. package/Calendar.js +69 -69
  7. package/Card.js +68 -68
  8. package/Chip.js +16 -16
  9. package/Clickable.js +29 -29
  10. package/Code.js +654 -519
  11. package/CollapsiblePanel.js +112 -112
  12. package/Color.js +107 -107
  13. package/ColumnLayout.js +35 -35
  14. package/ComboBox.js +190 -206
  15. package/ControlGroup.js +128 -120
  16. package/Date.js +148 -146
  17. package/DefinitionList.js +26 -26
  18. package/DualListbox.js +701 -717
  19. package/File.js +403 -403
  20. package/FormRows.js +66 -63
  21. package/Image.js +15 -15
  22. package/JSONTree.js +458 -357
  23. package/Layer.js +60 -72
  24. package/Markdown.js +66 -66
  25. package/Menu.js +44 -44
  26. package/Modal.js +49 -49
  27. package/ModalLayer.js +6 -6
  28. package/Monogram.js +16 -16
  29. package/Multiselect.js +622 -624
  30. package/Number.js +100 -100
  31. package/Paginator.js +7 -7
  32. package/Popover.js +453 -407
  33. package/Progress.js +12 -12
  34. package/Prose.js +6 -6
  35. package/RadioBar.js +180 -166
  36. package/RadioList.js +80 -79
  37. package/ResultsMenu.js +15 -15
  38. package/Scroll.js +50 -50
  39. package/Search.js +148 -164
  40. package/Select.js +668 -670
  41. package/Slider.js +30 -30
  42. package/SlidingPanels.js +24 -24
  43. package/SplitButton.js +50 -50
  44. package/StepBar.js +100 -100
  45. package/Switch.js +45 -45
  46. package/TabBar.js +196 -196
  47. package/TabLayout.js +16 -16
  48. package/Table.js +1207 -1193
  49. package/Text.js +65 -65
  50. package/TextArea.js +108 -93
  51. package/Tooltip.js +203 -197
  52. package/Tree.js +464 -366
  53. package/package.json +6 -6
  54. package/stubs-dependencies.d.ts +0 -70
  55. package/stubs-splunkui.d.ts +4 -0
  56. package/types/src/Code/Code.d.ts +17 -1
  57. package/types/src/Code/LineHighlights.d.ts +11 -0
  58. package/types/src/Code/LineNumbers.d.ts +6 -0
  59. package/types/src/Code/docs/examples/LineHighlights.d.ts +3 -0
  60. package/types/src/Code/docs/examples/LineNumbers.d.ts +3 -0
  61. package/types/src/Code/docs/examples/LineNumbersCustomStart.d.ts +3 -0
  62. package/types/src/Date/Date.d.ts +6 -1
  63. package/types/src/DefinitionList/DefinitionList.d.ts +6 -6
  64. package/types/src/FormRows/FormRows.d.ts +1 -1
  65. package/types/src/JSONTree/JSONTreeItem.d.ts +5 -2
  66. package/types/src/Markdown/Markdown.d.ts +1 -1
  67. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
  68. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
  69. package/types/src/Markdown/renderers/index.d.ts +1 -1
  70. package/types/src/Popover/Popover.d.ts +1 -1
  71. package/types/src/RadioBar/Option.d.ts +1 -1
  72. package/types/src/RadioBar/RadioBar.d.ts +13 -6
  73. package/types/src/RadioBar/RadioBarContext.d.ts +4 -2
  74. package/types/src/RadioList/RadioList.d.ts +2 -1
  75. package/types/src/ScreenReaderContent/docs/examples/SkipLink.d.ts +3 -0
  76. package/types/src/Scroll/Inner.d.ts +1 -1
  77. package/types/src/Select/Option.d.ts +1 -1
  78. package/types/src/Select/Select.d.ts +1 -1
  79. package/types/src/Slider/docs/examples/Controlled.d.ts +1 -1
  80. package/types/src/TabLayout/Panel.d.ts +0 -1
  81. package/types/src/Table/Head.d.ts +1 -0
  82. package/types/src/Table/HeadCell.d.ts +2 -3
  83. package/types/src/Table/HeadDropdownCell.d.ts +2 -2
  84. package/types/src/Table/HeadInner.d.ts +4 -4
  85. package/types/src/Table/KeyboardSensor.d.ts +1 -1
  86. package/types/src/Table/RowDragCell.d.ts +1 -1
  87. package/types/src/Tooltip/Tooltip.d.ts +10 -5
  88. package/types/src/Tree/Item.d.ts +63 -0
  89. package/types/src/Tree/Tree.d.ts +13 -6
  90. package/types/src/Tree/TreeContext.d.ts +1 -1
  91. package/types/src/Tree/index.d.ts +1 -1
  92. package/types/src/useControlled/useControlled.d.ts +3 -1
  93. package/useControlled.js +29 -13
  94. package/types/src/Tree/TreeItem.d.ts +0 -44
@@ -73,144 +73,144 @@
73
73
  // CONCATENATED MODULE: external "@splunk/react-ui/TransitionOpen"
74
74
  const o = require("@splunk/react-ui/TransitionOpen");
75
75
  var i = e.n(o);
76
- // CONCATENATED MODULE: external "@splunk/ui-utils/id"
77
- const s = require("@splunk/ui-utils/id");
78
76
  // CONCATENATED MODULE: external "@splunk/react-ui/useControlled"
79
- const c = require("@splunk/react-ui/useControlled");
80
- var u = e.n(c);
77
+ const s = require("@splunk/react-ui/useControlled");
78
+ var c = e.n(s);
81
79
  // CONCATENATED MODULE: external "@splunk/react-ui/usePrevious"
82
- const p = require("@splunk/react-ui/usePrevious");
83
- var d = e.n(p);
84
- // CONCATENATED MODULE: external "lodash/omit"
85
- const f = require("lodash/omit");
86
- var b = e.n(f);
80
+ const u = require("@splunk/react-ui/usePrevious");
81
+ var p = e.n(u);
82
+ // CONCATENATED MODULE: external "@splunk/ui-utils/id"
83
+ const d = require("@splunk/ui-utils/id");
87
84
  // CONCATENATED MODULE: external "styled-components"
88
- const v = require("styled-components");
89
- var y = e.n(v);
85
+ const f = require("styled-components");
86
+ var b = e.n(f);
90
87
  // CONCATENATED MODULE: external "@splunk/react-ui/Box"
91
- const m = require("@splunk/react-ui/Box");
92
- var g = e.n(m);
88
+ const v = require("@splunk/react-ui/Box");
89
+ var y = e.n(v);
93
90
  // CONCATENATED MODULE: external "@splunk/react-ui/ButtonSimple"
94
- const h = require("@splunk/react-ui/ButtonSimple");
95
- var S = e.n(h);
91
+ const m = require("@splunk/react-ui/ButtonSimple");
92
+ var g = e.n(m);
96
93
  // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
97
- const C = require("@splunk/react-ui/Clickable");
98
- var O = e.n(C);
94
+ const h = require("@splunk/react-ui/Clickable");
95
+ var S = e.n(h);
99
96
  // CONCATENATED MODULE: external "@splunk/themes"
100
- const P = require("@splunk/themes");
97
+ const C = require("@splunk/themes");
101
98
  // CONCATENATED MODULE: external "@splunk/react-icons/ChevronRight"
102
- const w = require("@splunk/react-icons/ChevronRight");
103
- var k = e.n(w);
99
+ const O = require("@splunk/react-icons/ChevronRight");
100
+ var P = e.n(O);
104
101
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/ChevronRight"
105
- const I = require("@splunk/react-icons/enterprise/ChevronRight");
106
- var j = e.n(I);
102
+ const w = require("@splunk/react-icons/enterprise/ChevronRight");
103
+ var k = e.n(w);
107
104
  // CONCATENATED MODULE: ./src/CollapsiblePanel/icons/ExpandPanel.tsx
108
- var x = {
105
+ var I = {
109
106
  className: l().string
110
107
  };
111
- var E = function e(n) {
108
+ var j = function e(n) {
112
109
  var t = n.className;
113
- var a = (0, P.useSplunkTheme)(), l = a.isEnterprise;
114
- return l ? r().createElement(j(), {
110
+ var a = (0, C.useSplunkTheme)(), l = a.isEnterprise;
111
+ return l ? r().createElement(k(), {
115
112
  className: t,
116
113
  hideDefaultTooltip: true,
117
114
  screenReaderText: null
118
- }) : r().createElement(k(), {
115
+ }) : r().createElement(P(), {
119
116
  className: t
120
117
  });
121
118
  };
122
- E.propTypes = x;
123
- /* harmony default export */ const _ = E;
119
+ j.propTypes = I;
120
+ /* harmony default export */ const x = j;
124
121
  // CONCATENATED MODULE: ./src/CollapsiblePanel/CollapsiblePanelStyles.ts
125
- var N = y()(g()).withConfig({
122
+ var E = b()(y()).withConfig({
126
123
  displayName: "CollapsiblePanelStyles__StyledBox",
127
124
  componentId: "sc-1phikbp-0"
128
125
  })([ "display:flex;flex-direction:column;flex-shrink:1;min-height:28px;background-color:", ";& + &{margin-top:1px;}" ], (0,
129
- P.pickVariant)("$appearance", {
126
+ C.pickVariant)("$appearance", {
130
127
  default: {
131
- prisma: P.variables.backgroundColorSection,
128
+ prisma: C.variables.backgroundColorSection,
132
129
  enterprise: {
133
- dark: P.variables.gray22,
134
- light: P.variables.white
130
+ dark: C.variables.gray22,
131
+ light: C.variables.white
135
132
  }
136
133
  },
137
- subtle: P.variables.transparent
134
+ subtle: C.variables.transparent
138
135
  }));
139
- var A = y()(g()).withConfig({
136
+ var _ = b()(y()).withConfig({
140
137
  displayName: "CollapsiblePanelStyles__StyledSingleOpenPanelGroupBox",
141
138
  componentId: "sc-1phikbp-1"
142
- })([ "", ";flex-direction:column;margin-bottom:0;" ], P.mixins.reset("flex"));
139
+ })([ "", ";flex-direction:column;margin-bottom:0;" ], C.mixins.reset("flex"));
143
140
  /*
144
141
  these styles are consistent for both regular and actions, but applied to different elements
145
142
  * in regular mode, they're on the SVG's span wrapper
146
143
  * in actionsMode, they're on the button
147
144
  applying them directly to the icon wrapper doesn't work because Enterprise has 1px border around the button
148
- */ var T = (0, v.css)([ "min-width:16px;" ]);
149
- var $ = y().span.withConfig({
145
+ */ var N = (0, f.css)([ "min-width:16px;" ]);
146
+ var A = b().span.withConfig({
150
147
  displayName: "CollapsiblePanelStyles__StyledIconWrapper",
151
148
  componentId: "sc-1phikbp-2"
152
- })([ "display:inline-block;flex:0 auto;", "" ], T);
153
- var q = y().div.withConfig({
149
+ })([ "display:inline-block;flex:0 auto;", "" ], N);
150
+ var T = b().div.withConfig({
154
151
  displayName: "CollapsiblePanelStyles__StyledActions",
155
152
  componentId: "sc-1phikbp-3"
156
- })([ "display:flex;flex-shrink:0;border-bottom:0;gap:", ";position:relative;padding:", " ", ";transition:background-color 0.2s,border 0.2s,box-shadow 0.2s;color:", ";background-color:", ";", "" ], P.variables.spacingSmall, P.variables.spacingXSmall, P.variables.spacingLarge, P.variables.contentColorActive, (0,
157
- P.pickVariant)("$appearance", {
158
- default: P.variables.neutral100,
159
- subtle: P.variables.transparent
153
+ })([ "display:flex;flex-shrink:0;border-bottom:0;gap:", ";position:relative;padding:", " ", ";transition:background-color 0.2s,border 0.2s,box-shadow 0.2s;color:", ";background-color:", ";", "" ], C.variables.spacingSmall, C.variables.spacingXSmall, C.variables.spacingLarge, C.variables.contentColorActive, (0,
154
+ C.pickVariant)("$appearance", {
155
+ default: C.variables.neutral100,
156
+ subtle: C.variables.transparent
160
157
  }), (function(e) {
161
158
  var n = e.$disabled;
162
- return n && (0, v.css)([ "color:", ";" ], P.variables.contentColorDisabled);
159
+ return n && (0, f.css)([ "color:", ";" ], C.variables.contentColorDisabled);
163
160
  }));
164
- var D = y()(S()).withConfig({
161
+ var $ = b()(g()).withConfig({
165
162
  displayName: "CollapsiblePanelStyles__StyledToggleButton",
166
163
  componentId: "sc-1phikbp-4"
167
- })([ "flex:0 auto;padding:0;min-width:28px;line-height:", ";" ], P.variables.lineHeight);
168
- var R = y()(O()).withConfig({
164
+ })([ "flex:0 auto;padding:0;min-width:28px;line-height:", ";" ], C.variables.lineHeight);
165
+ var q = b()(S()).withConfig({
169
166
  displayName: "CollapsiblePanelStyles__StyledTitleClickable",
170
167
  componentId: "sc-1phikbp-5"
171
- })([ "width:100%;flex-shrink:0;border-bottom:0;gap:", ";cursor:pointer;position:relative;display:flex;transition:background-color 0.2s,border 0.2s,box-shadow 0.2s;padding:", " ", ";color:", ";background-color:", ";&[disabled],&[aria-disabled='true']{cursor:not-allowed;color:", ";}&:focus:not([disabled]),&:active:not([disabled],[aria-disabled='true']){box-shadow:", ";z-index:1;}&:hover:not([disabled],[aria-disabled='true']){background-color:", ";}" ], P.variables.spacingSmall, P.variables.spacingXSmall, P.variables.spacingLarge, P.variables.contentColorActive, (0,
172
- P.pickVariant)("$appearance", {
173
- default: P.variables.neutral100,
174
- subtle: P.variables.transparent
175
- }), P.variables.contentColorDisabled, P.variables.focusShadowInset, P.mixins.overlayColors(P.variables.neutral100, P.variables.interactiveColorOverlayHover));
176
- var B = y().span.withConfig({
168
+ })([ "width:100%;flex-shrink:0;border-bottom:0;gap:", ";cursor:pointer;position:relative;display:flex;transition:background-color 0.2s,border 0.2s,box-shadow 0.2s;padding:", " ", ";color:", ";background-color:", ";&[disabled],&[aria-disabled='true']{cursor:not-allowed;color:", ";}&:focus:not([disabled]),&:active:not([disabled],[aria-disabled='true']){box-shadow:", ";z-index:1;}&:hover:not([disabled],[aria-disabled='true']){background-color:", ";}" ], C.variables.spacingSmall, C.variables.spacingXSmall, C.variables.spacingLarge, C.variables.contentColorActive, (0,
169
+ C.pickVariant)("$appearance", {
170
+ default: C.variables.neutral100,
171
+ subtle: C.variables.transparent
172
+ }), C.variables.contentColorDisabled, C.variables.focusShadowInset, C.mixins.overlayColors(C.variables.neutral100, C.variables.interactiveColorOverlayHover));
173
+ var D = b().span.withConfig({
177
174
  displayName: "CollapsiblePanelStyles__StyledHeadingContent",
178
175
  componentId: "sc-1phikbp-6"
179
- })([ "display:flex;justify-content:space-between;flex:1 1 auto;font-weight:", ";line-height:", ";", "" ], P.variables.fontWeightSemiBold, P.variables.lineHeight, (function(e) {
176
+ })([ "display:flex;justify-content:space-between;flex:1 1 auto;font-weight:", ";line-height:", ";", "" ], C.variables.fontWeightSemiBold, C.variables.lineHeight, (function(e) {
180
177
  var n = e.$disabled;
181
- return n && (0, v.css)([ "color:", ";" ], P.variables.contentColorDisabled);
178
+ return n && (0, f.css)([ "color:", ";" ], C.variables.contentColorDisabled);
182
179
  }));
183
- var M = y().span.withConfig({
180
+ var R = b().span.withConfig({
184
181
  displayName: "CollapsiblePanelStyles__StyledHeadingActions",
185
182
  componentId: "sc-1phikbp-7"
186
- })([ "min-height:", ";flex:1 0 auto;" ], P.variables.inputHeight);
187
- var L = y().span.withConfig({
183
+ })([ "min-height:", ";flex:1 0 auto;" ], C.variables.inputHeight);
184
+ var B = b().span.withConfig({
188
185
  displayName: "CollapsiblePanelStyles__StyledDescription",
189
186
  componentId: "sc-1phikbp-8"
190
- })([ "color:", ";font-size:", ";margin-left:", ";line-height:1.8;", "" ], P.variables.contentColorDefault, P.variables.fontSizeSmall, P.variables.spacingSmall, (function(e) {
187
+ })([ "color:", ";font-size:", ";margin-left:", ";line-height:1.8;", "" ], C.variables.contentColorDefault, C.variables.fontSizeSmall, C.variables.spacingSmall, (function(e) {
191
188
  var n = e.$disabled;
192
- return n && (0, v.css)([ "color:", ";" ], P.variables.contentColorDisabled);
189
+ return n && (0, f.css)([ "color:", ";" ], C.variables.contentColorDisabled);
193
190
  }));
194
- var W = y().div.withConfig({
191
+ var M = b().div.withConfig({
195
192
  displayName: "CollapsiblePanelStyles__StyledInsetWrapper",
196
193
  componentId: "sc-1phikbp-9"
197
- })([ "", ";gap:", ";", "" ], P.mixins.reset("block"), P.variables.spacingSmall, (function(e) {
194
+ })([ "", ";gap:", ";", "" ], C.mixins.reset("block"), C.variables.spacingSmall, (function(e) {
198
195
  var n = e.$inset;
199
- return n && (0, v.css)([ "padding:", ";" ], P.variables.spacingLarge);
196
+ return n && (0, f.css)([ "padding:", ";" ], C.variables.spacingLarge);
200
197
  }));
201
- var H = y()(_).withConfig({
198
+ var L = b()(x).withConfig({
202
199
  displayName: "CollapsiblePanelStyles__StyledExpandPanelIcon",
203
200
  componentId: "sc-1phikbp-10"
204
- })([ "transition:transform ", ";", " width:100%;vertical-align:", ";" ], (0, P.pick)({
201
+ })([ "transition:transform ", ";", " width:100%;vertical-align:", ";" ], (0, C.pick)({
205
202
  enterprise: "300ms",
206
203
  prisma: "200ms"
207
204
  }), (function(e) {
208
205
  var n = e.open;
209
- return n && (0, v.css)([ "transform:rotate(90deg);" ]);
210
- }), (0, P.pick)({
206
+ return n && (0, f.css)([ "transform:rotate(90deg);" ]);
207
+ }), (0, C.pick)({
211
208
  enterprise: "baseline",
212
209
  prisma: "text-bottom"
213
210
  }));
211
+ // CONCATENATED MODULE: external "lodash/omit"
212
+ const W = require("lodash/omit");
213
+ var H = e.n(W);
214
214
  // CONCATENATED MODULE: ./src/CollapsiblePanel/SingleOpenPanelGroupContext.tsx
215
215
  var V = (0, t.createContext)({});
216
216
  /* harmony default export */ const G = V;
@@ -314,9 +314,9 @@
314
314
  openPanelId: l().any
315
315
  };
316
316
  function le(e) {
317
- var n = e.children, a = e.defaultOpenPanelId, l = e.elementRef, o = e.inset, i = o === void 0 ? true : o, s = e.onChange, c = e.openPanelId, p = te(e, [ "children", "defaultOpenPanelId", "elementRef", "inset", "onChange", "openPanelId" ]);
317
+ var n = e.children, a = e.defaultOpenPanelId, l = e.elementRef, o = e.inset, i = o === void 0 ? true : o, s = e.onChange, u = e.openPanelId, p = te(e, [ "children", "defaultOpenPanelId", "elementRef", "inset", "onChange", "openPanelId" ]);
318
318
  // @docs-props-type SingleOpenPanelGroupPropsBase
319
- var d = u()({
319
+ var d = c()({
320
320
  componentName: "SingleOpenPanelGroup",
321
321
  /* eslint-disable-next-line prefer-rest-params */
322
322
  componentProps: arguments[0],
@@ -325,33 +325,33 @@
325
325
  valuePropName: "openPanelId"
326
326
  });
327
327
  var f = !d ? a : undefined;
328
- var v = (0, t.useState)(f), y = K(v, 2), m = y[0], g = y[1];
329
- var h = (0, t.useCallback)((function(e, n) {
328
+ var b = (0, t.useState)(f), v = K(b, 2), y = v[0], m = v[1];
329
+ var g = (0, t.useCallback)((function(e, n) {
330
330
  var t = n.panelId;
331
- var r = d ? c : m;
331
+ var r = d ? u : y;
332
332
  var a = r === t ? null : t;
333
333
  if (!d) {
334
- g(a);
334
+ m(a);
335
335
  }
336
336
  s === null || s === void 0 ? void 0 : s(e, n);
337
- }), [ d, c, m, s ]);
338
- var S = t.Children.toArray(n).filter(t.isValidElement);
337
+ }), [ d, u, y, s ]);
338
+ var h = t.Children.toArray(n).filter(t.isValidElement);
339
339
  // remove false, null, 0, etc
340
- var C = (0, t.useMemo)((function() {
340
+ var S = (0, t.useMemo)((function() {
341
341
  return {
342
- onChange: h,
343
- openPanelId: d ? c : m,
342
+ onChange: g,
343
+ openPanelId: d ? u : y,
344
344
  inset: i
345
345
  };
346
- }), [ h, i, d, c, m ]);
346
+ }), [ g, i, d, u, y ]);
347
347
 
348
- return r().createElement(A, U({
348
+ return r().createElement(_, U({
349
349
  "data-test": "single-open-panel-group",
350
- "data-test-open-panel-id": c,
350
+ "data-test-open-panel-id": u,
351
351
  elementRef: l
352
- }, b().apply(void 0, [ p ].concat(z(Object.keys(ae))))), r().createElement(G.Provider, {
353
- value: C
354
- }, S));
352
+ }, H().apply(void 0, [ p ].concat(z(Object.keys(ae))))), r().createElement(G.Provider, {
353
+ value: S
354
+ }, h));
355
355
  }
356
356
  le.propTypes = ae;
357
357
  /* harmony default export */ const oe = le;
@@ -504,11 +504,11 @@
504
504
  title: l().node.isRequired
505
505
  };
506
506
  function Pe(e) {
507
- var n = e.innerBodyStyles, a = e.actions, l = e.appearance, o = l === void 0 ? "default" : l, c = e.children, p = e.defaultOpen, f = p === void 0 ? undefined : p, b = e.description, v = e.disabled, y = e.elementRef, m = e.headingLevel, g = e.onChange, h = e.open, S = e.overflow, C = S === void 0 ? "auto" : S, O = e.panelId, P = e.renderChildrenWhenCollapsed, w = e.title, k = e.inset, I = k === void 0 ? true : k, j = Se(e, [ "innerBodyStyles", "actions", "appearance", "children", "defaultOpen", "description", "disabled", "elementRef", "headingLevel", "onChange", "open", "overflow", "panelId", "renderChildrenWhenCollapsed", "title", "inset" ]);
507
+ var n = e.innerBodyStyles, a = e.actions, l = e.appearance, o = l === void 0 ? "default" : l, s = e.children, u = e.defaultOpen, f = u === void 0 ? undefined : u, b = e.description, v = e.disabled, y = e.elementRef, m = e.headingLevel, g = e.onChange, h = e.open, S = e.overflow, C = S === void 0 ? "auto" : S, O = e.panelId, P = e.renderChildrenWhenCollapsed, w = e.title, k = e.inset, I = k === void 0 ? true : k, j = Se(e, [ "innerBodyStyles", "actions", "appearance", "children", "defaultOpen", "description", "disabled", "elementRef", "headingLevel", "onChange", "open", "overflow", "panelId", "renderChildrenWhenCollapsed", "title", "inset" ]);
508
508
  // @docs-props-type CollapsiblePanelPropsBase
509
509
  var x = (0, t.useContext)(G);
510
- var E = Object.keys(x).length !== 0;
511
- var _ = u()({
510
+ var _ = Object.keys(x).length !== 0;
511
+ var N = c()({
512
512
  componentName: "CollapsiblePanel",
513
513
  /* eslint-disable-next-line prefer-rest-params */
514
514
  componentProps: arguments[0],
@@ -516,10 +516,10 @@
516
516
  defaultValuePropName: "defaultOpen",
517
517
  valuePropName: "open"
518
518
  });
519
- var A = (0, t.useState)("container-".concat((0, s.createGUID)())), T = be(A, 1), V = T[0];
520
- var U = (0, t.useState)("toggle-".concat((0, s.createGUID)())), z = be(U, 1), X = z[0];
521
- var F = d()(h);
522
- var J = !_ ? f || false : undefined;
519
+ var W = (0, t.useState)("container-".concat((0, d.createGUID)())), H = be(W, 1), V = H[0];
520
+ var U = (0, t.useState)("toggle-".concat((0, d.createGUID)())), z = be(U, 1), X = z[0];
521
+ var F = p()(h);
522
+ var J = !N ? f || false : undefined;
523
523
  var K = (0, t.useState)(J), Q = be(K, 2), Y = Q[0], Z = Q[1];
524
524
  var ee = (0, t.useState)(), ne = be(ee, 2), te = ne[0], re = ne[1];
525
525
  var ae = (0, t.useState)(false), le = be(ae, 2), oe = le[0], ie = le[1];
@@ -528,17 +528,17 @@
528
528
  * so context.openPanelId is used for both the controlled and uncontrolled case.
529
529
  */ (0, t.useEffect)((function() {
530
530
  var e;
531
- if (E) {
531
+ if (_) {
532
532
  e = x.openPanelId === O;
533
533
  } else {
534
- e = _ ? h : Y;
534
+ e = N ? h : Y;
535
535
  }
536
536
  re(e);
537
- }), [ x.openPanelId, E, _, h, Y, O ]);
537
+ }), [ x.openPanelId, _, N, h, Y, O ]);
538
538
  // Only testing this in the scenario of a SingleOpenPanelGroup.
539
539
  (0, t.useEffect)((function() {
540
540
  if (false) {}
541
- }), [ f, E, h ]);
541
+ }), [ f, _, h ]);
542
542
  (0, t.useEffect)((function() {
543
543
  if (F != null && h !== F) {
544
544
  ie(true);
@@ -546,7 +546,7 @@
546
546
  }), [ h, F ]);
547
547
  var ce = (0, t.useCallback)((function(e) {
548
548
  var n;
549
- if (!_) {
549
+ if (!N) {
550
550
  ie(true);
551
551
  Z(!te);
552
552
  }
@@ -561,11 +561,11 @@
561
561
  reason: "toggleClick",
562
562
  action: t
563
563
  });
564
- }), [ x, _, te, g, O ]);
564
+ }), [ x, N, te, g, O ]);
565
565
  var pe = (0, t.useCallback)((function() {
566
566
  ie(false);
567
567
  }), []);
568
- var de = (0, s.createDOMID)("panel-toggle");
568
+ var de = (0, d.createDOMID)("panel-toggle");
569
569
  var fe = {
570
570
  disabled: v,
571
571
  onClick: ce,
@@ -585,38 +585,38 @@
585
585
  }, n);
586
586
  }), [ n ]);
587
587
 
588
- return r().createElement(N, se({
588
+ return r().createElement(E, se({
589
589
  "data-test": "collapsible-panel",
590
590
  elementRef: y,
591
591
  $appearance: o
592
- }, j), a != null ? r().createElement(q, {
592
+ }, j), a != null ? r().createElement(T, {
593
593
  $appearance: o,
594
594
  $disabled: !!v
595
- }, r().createElement(D, se({
595
+ }, r().createElement($, se({
596
596
  appearance: "secondary",
597
597
  "aria-labelledby": de
598
- }, fe), r().createElement(H, {
598
+ }, fe), r().createElement(L, {
599
599
  open: !!te
600
- })), r().createElement(B, {
600
+ })), r().createElement(D, {
601
601
  $disabled: !!v,
602
602
  "data-test": "title",
603
603
  id: de
604
- }, w), r().createElement(M, null, a)) :
604
+ }, w), r().createElement(R, null, a)) :
605
605
 
606
606
  /* Clickable component is not allowed to have role="heading" so it is wrapped with a span */
607
607
  r().createElement("span", {
608
608
  "data-test": "heading",
609
609
  role: m ? "heading" : undefined,
610
610
  "aria-level": m
611
- }, r().createElement(R, se({
611
+ }, r().createElement(q, se({
612
612
  $appearance: o
613
- }, fe), r().createElement($, null, r().createElement(H, {
613
+ }, fe), r().createElement(A, null, r().createElement(L, {
614
614
  open: !!te
615
- })), r().createElement(B, {
615
+ })), r().createElement(D, {
616
616
  $disabled: !!v
617
617
  }, r().createElement("span", {
618
618
  "data-test": "title"
619
- }, w), b && r().createElement(L, {
619
+ }, w), b && r().createElement(B, {
620
620
  $disabled: !!v,
621
621
  "data-test": "description"
622
622
  }, b)))), r().createElement(i(), {
@@ -629,9 +629,9 @@
629
629
  onAnimationEnd: pe,
630
630
  role: a != null ? "region" : undefined,
631
631
  renderChildrenWhenCollapsed: P
632
- }, r().createElement(W, {
632
+ }, r().createElement(M, {
633
633
  $inset: I
634
- }, c)));
634
+ }, s)));
635
635
  }
636
636
  Pe.propTypes = Oe;
637
637
  /* harmony default export */ const we = Pe;