@splunk/react-ui 5.7.1 → 5.9.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 (152) hide show
  1. package/Accordion.js +6 -6
  2. package/Anchor.js +2 -1
  3. package/Box.js +83 -34
  4. package/CHANGELOG.md +51 -0
  5. package/Calendar.js +134 -134
  6. package/Clickable.js +131 -94
  7. package/CollapsiblePanel.js +175 -137
  8. package/ComboBox.js +32 -27
  9. package/ControlGroup.js +92 -91
  10. package/DefinitionList.js +9 -9
  11. package/Drawer.d.ts +2 -0
  12. package/Drawer.js +679 -0
  13. package/Dropdown.js +27 -18
  14. package/DualListbox.js +1 -1
  15. package/File.js +35 -35
  16. package/JSONTree.js +73 -72
  17. package/Link.js +2 -2
  18. package/MIGRATION.md +10 -0
  19. package/Menu.js +403 -261
  20. package/Modal.js +263 -252
  21. package/Monogram.js +2 -2
  22. package/Multiselect.js +551 -385
  23. package/Number.js +2 -1
  24. package/Paginator.js +14 -12
  25. package/Popover.js +4 -1
  26. package/README.md +11 -0
  27. package/RadioBar.js +1 -1
  28. package/Search.js +111 -95
  29. package/Select.js +42 -40
  30. package/SelectBase.js +819 -715
  31. package/SidePanel.js +346 -167
  32. package/SlidingPanels.js +11 -11
  33. package/StepBar.js +7 -7
  34. package/Switch.js +5 -5
  35. package/Table.js +116 -119
  36. package/Text.js +48 -48
  37. package/TextArea.js +7 -7
  38. package/TransitionOpen.js +188 -169
  39. package/docs-llm/Accordion.md +267 -0
  40. package/docs-llm/Anchor Menu.md +115 -0
  41. package/docs-llm/Anchor.md +54 -0
  42. package/docs-llm/AnimationToggle.md +254 -0
  43. package/docs-llm/Avatar.md +292 -0
  44. package/docs-llm/Badge.md +212 -0
  45. package/docs-llm/Breadcrumbs.md +306 -0
  46. package/docs-llm/Button Group.md +53 -0
  47. package/docs-llm/Button.md +361 -0
  48. package/docs-llm/Card Layout.md +286 -0
  49. package/docs-llm/Card.md +619 -0
  50. package/docs-llm/Checkbox.md +218 -0
  51. package/docs-llm/Chip.md +291 -0
  52. package/docs-llm/Clickable.md +160 -0
  53. package/docs-llm/Code.md +292 -0
  54. package/docs-llm/Collapsible Panel.md +744 -0
  55. package/docs-llm/Color.md +253 -0
  56. package/docs-llm/Column Layout.md +391 -0
  57. package/docs-llm/Combo Box.md +540 -0
  58. package/docs-llm/Control Group.md +594 -0
  59. package/docs-llm/Date.md +270 -0
  60. package/docs-llm/Definition List.md +278 -0
  61. package/docs-llm/Divider.md +216 -0
  62. package/docs-llm/Drawer.md +414 -0
  63. package/docs-llm/Dropdown.md +472 -0
  64. package/docs-llm/Dual Listbox.md +325 -0
  65. package/docs-llm/File.md +653 -0
  66. package/docs-llm/Form Rows.md +374 -0
  67. package/docs-llm/Heading.md +179 -0
  68. package/docs-llm/Image.md +109 -0
  69. package/docs-llm/JSON Tree.md +260 -0
  70. package/docs-llm/Layer.md +74 -0
  71. package/docs-llm/Layout.md +50 -0
  72. package/docs-llm/Link.md +318 -0
  73. package/docs-llm/List.md +189 -0
  74. package/docs-llm/Markdown.md +179 -0
  75. package/docs-llm/Menu.md +735 -0
  76. package/docs-llm/Message Bar.md +236 -0
  77. package/docs-llm/Message.md +248 -0
  78. package/docs-llm/Modal.md +443 -0
  79. package/docs-llm/Monogram.md +159 -0
  80. package/docs-llm/Multiselect.md +939 -0
  81. package/docs-llm/Notifications.md +46 -0
  82. package/docs-llm/Number.md +298 -0
  83. package/docs-llm/Paginator.md +395 -0
  84. package/docs-llm/Paragraph.md +148 -0
  85. package/docs-llm/Phone Number.md +254 -0
  86. package/docs-llm/Popover.md +166 -0
  87. package/docs-llm/Progress.md +141 -0
  88. package/docs-llm/Radio Bar.md +303 -0
  89. package/docs-llm/Radio List.md +350 -0
  90. package/docs-llm/Resize.md +362 -0
  91. package/docs-llm/Screen Reader Content.md +73 -0
  92. package/docs-llm/Scroll Container Context.md +155 -0
  93. package/docs-llm/Scroll.md +152 -0
  94. package/docs-llm/Search.md +381 -0
  95. package/docs-llm/Select.md +985 -0
  96. package/docs-llm/Side Panel.md +777 -0
  97. package/docs-llm/Slider.md +339 -0
  98. package/docs-llm/Sliding Panels.md +340 -0
  99. package/docs-llm/Split Button.md +295 -0
  100. package/docs-llm/Static Content.md +90 -0
  101. package/docs-llm/Step Bar.md +292 -0
  102. package/docs-llm/Switch.md +268 -0
  103. package/docs-llm/Tab Bar.md +439 -0
  104. package/docs-llm/Tab Layout.md +398 -0
  105. package/docs-llm/Table.md +2642 -0
  106. package/docs-llm/Text Area.md +253 -0
  107. package/docs-llm/Text.md +339 -0
  108. package/docs-llm/Tooltip.md +325 -0
  109. package/docs-llm/Transition Open.md +406 -0
  110. package/docs-llm/Tree.md +591 -0
  111. package/docs-llm/Typography.md +125 -0
  112. package/docs-llm/Wait Spinner.md +121 -0
  113. package/docs-llm/llms.txt +101 -0
  114. package/package.json +6 -5
  115. package/types/src/Box/Box.d.ts +2 -10
  116. package/types/src/Drawer/Body.d.ts +17 -0
  117. package/types/src/Drawer/Drawer.d.ts +114 -0
  118. package/types/src/Drawer/DrawerContext.d.ts +11 -0
  119. package/types/src/Drawer/Footer.d.ts +25 -0
  120. package/types/src/Drawer/Header.d.ts +41 -0
  121. package/types/src/Drawer/docs/examples/Basic.d.ts +6 -0
  122. package/types/src/Drawer/docs/examples/ContainerPosition.d.ts +7 -0
  123. package/types/src/Drawer/docs/examples/InitialFocus.d.ts +9 -0
  124. package/types/src/Drawer/docs/examples/InlinePosition.d.ts +7 -0
  125. package/types/src/Drawer/docs/examples/PagePosition.d.ts +7 -0
  126. package/types/src/Drawer/index.d.ts +2 -0
  127. package/types/src/JSONTree/JSONTree.d.ts +12 -5
  128. package/types/src/JSONTree/renderTreeItems.d.ts +2 -1
  129. package/types/src/Menu/Item.d.ts +2 -1
  130. package/types/src/Menu/docs/examples/SelectableCheckbox.d.ts +7 -0
  131. package/types/src/Modal/Modal.d.ts +1 -2
  132. package/types/src/Multiselect/Compact.d.ts +8 -3
  133. package/types/src/Multiselect/Multiselect.d.ts +8 -3
  134. package/types/src/Multiselect/Normal.d.ts +8 -3
  135. package/types/src/Multiselect/Option.d.ts +6 -3
  136. package/types/src/Multiselect/docs/examples/Disabled.d.ts +1 -0
  137. package/types/src/Select/Option.d.ts +6 -3
  138. package/types/src/Select/Select.d.ts +8 -5
  139. package/types/src/Select/docs/examples/Dimmed.d.ts +7 -0
  140. package/types/src/SelectBase/OptionBase.d.ts +6 -3
  141. package/types/src/SelectBase/SelectBase.d.ts +8 -3
  142. package/types/src/SidePanel/SidePanel.d.ts +43 -2
  143. package/types/src/SidePanel/docs/examples/DockLayout.d.ts +17 -0
  144. package/types/src/SidePanel/docs/examples/InitialFocus.d.ts +9 -0
  145. package/types/src/TransitionOpen/TransitionOpen.d.ts +29 -4
  146. package/types/src/useKeyPress/index.d.ts +9 -2
  147. package/types/src/useOnClickOutside/index.d.ts +2 -0
  148. package/types/src/useOnClickOutside/useOnClickOutside.d.ts +4 -0
  149. package/useKeyPress.js +23 -18
  150. package/useOnClickOutside.d.ts +2 -0
  151. package/useOnClickOutside.js +79 -0
  152. package/types/src/RadioList/docs/examples/Row.d.ts +0 -6
package/Menu.js CHANGED
@@ -61,18 +61,18 @@
61
61
  e.r(t);
62
62
  // EXPORTS
63
63
  e.d(t, {
64
- Divider: () => /* reexport */ H,
64
+ Divider: () => /* reexport */ $,
65
65
  Heading: () => /* reexport */ Z,
66
- Item: () => /* reexport */ Se,
66
+ Item: () => /* reexport */ _e,
67
67
  MenuContext: () => /* reexport */ T,
68
- default: () => /* reexport */ qe
68
+ default: () => /* reexport */ Ve
69
69
  });
70
70
  // CONCATENATED MODULE: external "react"
71
71
  const r = require("react");
72
72
  var n = e.n(r);
73
73
  // CONCATENATED MODULE: external "lodash/omit"
74
- const a = require("lodash/omit");
75
- var i = e.n(a);
74
+ const i = require("lodash/omit");
75
+ var a = e.n(i);
76
76
  // CONCATENATED MODULE: external "prop-types"
77
77
  const o = require("prop-types");
78
78
  var l = e.n(o);
@@ -83,68 +83,68 @@
83
83
  var u = e.n(c);
84
84
  // CONCATENATED MODULE: external "@splunk/react-ui/Divider"
85
85
  const d = require("@splunk/react-ui/Divider");
86
- var v = e.n(d);
86
+ var f = e.n(d);
87
87
  // CONCATENATED MODULE: external "@splunk/themes"
88
- const p = require("@splunk/themes");
88
+ const v = require("@splunk/themes");
89
89
  // CONCATENATED MODULE: external "@splunk/react-ui/Checkbox"
90
- const f = require("@splunk/react-ui/Checkbox");
91
- var m = e.n(f);
90
+ const p = require("@splunk/react-ui/Checkbox");
91
+ var b = e.n(p);
92
92
  // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
93
- const b = require("@splunk/react-ui/Clickable");
94
- var g = e.n(b);
93
+ const m = require("@splunk/react-ui/Clickable");
94
+ var y = e.n(m);
95
95
  // CONCATENATED MODULE: ./src/Menu/ItemStyles.ts
96
- var y = (0, c.css)([ "", " overflow:inherit;white-space:inherit;text-overflow:inherit;" ], p.mixins.typography("smallBody"));
96
+ var g = (0, c.css)([ "", " overflow:inherit;white-space:inherit;text-overflow:inherit;" ], v.mixins.typography("smallBody"));
97
97
  var h = u().div.withConfig({
98
98
  displayName: "ItemStyles__StyledItemDescriptionBottom",
99
99
  componentId: "sc-4kc053-0"
100
- })([ "", ";" ], y);
100
+ })([ "", ";" ], g);
101
101
  var S = u().span.withConfig({
102
102
  displayName: "ItemStyles__StyledItemDescriptionRight",
103
103
  componentId: "sc-4kc053-1"
104
- })([ "", ";display:flex;align-self:flex-start;align-items:center;float:right;padding-left:", ";max-width:50%;min-height:20px;text-align:right;" ], y, p.variables.spacingLarge);
105
- var w = (0, c.css)([ "", " flex:0 0 auto;& > svg{height:20px;}" ], p.mixins.reset("inline-flex"));
106
- var k = u().div.withConfig({
104
+ })([ "", ";display:flex;align-self:flex-start;align-items:center;float:right;padding-left:", ";max-width:50%;min-height:20px;text-align:right;" ], g, v.variables.spacingLarge);
105
+ var O = (0, c.css)([ "", " flex:0 0 auto;& > svg{height:20px;}" ], v.mixins.reset("inline-flex"));
106
+ var w = u().div.withConfig({
107
107
  displayName: "ItemStyles__StyledItemSelectedAdornment",
108
108
  componentId: "sc-4kc053-2"
109
- })([ "", ";padding-left:", ";align-items:flex-start;color:", ";" ], w, p.variables.spacingLarge, p.variables.contentColorActive);
110
- var O = u().span.withConfig({
109
+ })([ "", ";padding-left:", ";align-items:flex-start;color:", ";" ], O, v.variables.spacingLarge, v.variables.contentColorActive);
110
+ var k = u().span.withConfig({
111
111
  displayName: "ItemStyles__StyledItemAdornment",
112
112
  componentId: "sc-4kc053-3"
113
- })([ "", ";", " padding-right:", ";align-items:center;color:", ";" ], w, (function(e) {
113
+ })([ "", ";", " padding-right:", ";align-items:center;color:", ";" ], O, (function(e) {
114
114
  var t = e.endAdornment;
115
- return t && (0, c.css)([ "padding-left:", ";" ], p.variables.spacingSmall);
116
- }), p.variables.spacingSmall, p.variables.contentColorMuted);
117
- var x = u()(m()).withConfig({
115
+ return t && (0, c.css)([ "padding-left:", ";" ], v.variables.spacingSmall);
116
+ }), v.variables.spacingSmall, v.variables.contentColorMuted);
117
+ var x = u()(b()).withConfig({
118
118
  displayName: "ItemStyles__StyledCheckbox",
119
119
  componentId: "sc-4kc053-4"
120
- })([ "min-height:0;padding-right:", ";" ], p.variables.spacingSmall);
121
- var C = u()(g()).withConfig({
120
+ })([ "min-height:0;padding-right:", ";" ], v.variables.spacingSmall);
121
+ var C = u()(y()).withConfig({
122
122
  displayName: "ItemStyles__StyledClickable",
123
123
  componentId: "sc-4kc053-5"
124
- })([ "line-height:", ";display:block;position:relative;cursor:pointer;color:", ";word-wrap:break-word;max-width:100%;width:100%;min-height:", ";padding:", " ", ";", " ", " ", " &:not([disabled],[aria-disabled='true']){&:hover{background:", ";", "}&:active{background:", ";}", "}&:focus{outline:0;box-shadow:", ";background:", ";}&[disabled],&[aria-disabled='true']{color:", ";", ",", ",", ",", "{color:", ";}}" ], p.variables.lineHeightSpacious, p.variables.contentColorActive, p.variables.inputHeight, p.variables.spacingXSmall, p.variables.spacingLarge, (function(e) {
124
+ })([ "line-height:", ";display:block;position:relative;cursor:pointer;color:", ";word-wrap:break-word;max-width:100%;width:100%;min-height:", ";padding:", " ", ";", " ", " ", " &:not([disabled],[aria-disabled='true']){&:hover{background:", ";", "}&:active{background:", ";}", "}&:focus{outline:0;box-shadow:", ";background:", ";}&[disabled],&[aria-disabled='true']{color:", ";", ",", ",", ",", "{color:", ";}}" ], v.variables.lineHeightSpacious, v.variables.contentColorActive, v.variables.inputHeight, v.variables.spacingXSmall, v.variables.spacingLarge, (function(e) {
125
125
  var t = e.$active, r = e.$preventFocus;
126
- return t && !r && (0, c.css)([ "box-shadow:", ";" ], p.variables.focusShadowInset);
126
+ return t && !r && (0, c.css)([ "box-shadow:", ";" ], v.variables.focusShadowInset);
127
127
  }), (function(e) {
128
128
  var t = e.$active;
129
- return t && (0, c.css)([ "background:", ";font-weight:", ";" ], p.variables.interactiveColorOverlayActive, p.variables.fontWeightBold);
129
+ return t && (0, c.css)([ "background:", ";font-weight:", ";" ], v.variables.interactiveColorOverlayActive, v.variables.fontWeightBold);
130
130
  }), (function(e) {
131
131
  var t = e.$isSelectable, r = e.$selectableAppearance, n = e.$selected;
132
132
  return t && !n && r === "checkmark" && // Adds whitespace to right to reserve space for checkmark for selectable Items
133
133
  // spacingLarge x 3 = padding-left + icon size + padding-right
134
- (0, c.css)([ "padding-right:calc(", " * 3);" ], p.variables.spacingLarge);
135
- }), p.variables.interactiveColorOverlayHover, (function(e) {
134
+ (0, c.css)([ "padding-right:calc(", " * 3);" ], v.variables.spacingLarge);
135
+ }), v.variables.interactiveColorOverlayHover, (function(e) {
136
136
  var t = e.$active;
137
- return t && (0, c.css)([ "background:", ";" ], p.mixins.overlayColors(p.variables.interactiveColorOverlayActive, p.variables.interactiveColorOverlayHover));
138
- }), p.variables.interactiveColorOverlayActive, (function(e) {
137
+ return t && (0, c.css)([ "background:", ";" ], v.mixins.overlayColors(v.variables.interactiveColorOverlayActive, v.variables.interactiveColorOverlayHover));
138
+ }), v.variables.interactiveColorOverlayActive, (function(e) {
139
139
  var t = e.$selected, r = e.$active;
140
- return t && (0, c.css)([ "font-weight:", ";", "" ], p.variables.fontWeightSemiBold, r && (0,
141
- c.css)([ "font-weight:", ";" ], p.variables.fontWeightBold));
142
- }), p.variables.focusShadowInset, p.variables.interactiveColorOverlayHover, p.variables.contentColorDisabled, /* sc-sel */ h, /* sc-sel */ S, /* sc-sel */ k, /* sc-sel */ O, p.variables.contentColorDisabled);
143
- var I = u().span.withConfig({
140
+ return t && (0, c.css)([ "font-weight:", ";", "" ], v.variables.fontWeightSemiBold, r && (0,
141
+ c.css)([ "font-weight:", ";" ], v.variables.fontWeightBold));
142
+ }), v.variables.focusShadowInset, v.variables.interactiveColorOverlayHover, v.variables.contentColorDisabled, /* sc-sel */ h, /* sc-sel */ S, /* sc-sel */ w, /* sc-sel */ k, v.variables.contentColorDisabled);
143
+ var j = u().span.withConfig({
144
144
  displayName: "ItemStyles__StyledInnerWrapper",
145
145
  componentId: "sc-4kc053-6"
146
146
  })([ "display:flex;align-items:flex-start;" ]);
147
- var E = u().div.withConfig({
147
+ var I = u().div.withConfig({
148
148
  displayName: "ItemStyles__StyledTitleAndDescriptionWrapper",
149
149
  componentId: "sc-4kc053-7"
150
150
  })([ "display:flex;flex:1;width:100%;align-self:flex-start;word-break:break-word;white-space:normal;", " ", "" ], (function(e) {
@@ -154,33 +154,33 @@
154
154
  var t = e.$truncate;
155
155
  return t && (0, c.css)([ "white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" ]);
156
156
  }));
157
- var _ = u().div.withConfig({
157
+ var P = u().div.withConfig({
158
158
  displayName: "ItemStyles__StyledLabel",
159
159
  componentId: "sc-4kc053-8"
160
160
  })([ "flex:1;overflow:inherit;white-space:inherit;text-overflow:inherit;max-width:100%;min-height:20px;", "" ], (function(e) {
161
161
  var t = e.$truncate;
162
162
  return t && (0, c.css)([ "display:block;clear:both;" ]);
163
163
  }));
164
- var P = u().span.withConfig({
164
+ var E = u().span.withConfig({
165
165
  displayName: "ItemStyles__StyledMatch",
166
166
  componentId: "sc-4kc053-9"
167
- })([ "border-bottom:1px solid ", ";" ], p.variables.contentColorActive);
168
- var j = u().span.withConfig({
167
+ })([ "border-bottom:1px solid ", ";" ], v.variables.contentColorActive);
168
+ var _ = u().span.withConfig({
169
169
  displayName: "ItemStyles__StyledSubmenu",
170
170
  componentId: "sc-4kc053-10"
171
- })([ "float:right;padding-left:", ";color:", ";" ], p.variables.spacingSmall, p.variables.contentColorDefault);
171
+ })([ "float:right;padding-left:", ";color:", ";" ], v.variables.spacingSmall, v.variables.contentColorDefault);
172
172
  // CONCATENATED MODULE: ./src/Menu/DividerStyles.ts
173
173
  // Adds margin if direct sibling is a Menu.Item to provide spacing between Divider and Item
174
- var A = u()(v()).withConfig({
174
+ var D = u()(f()).withConfig({
175
175
  displayName: "DividerStyles__Styled",
176
176
  componentId: "l3zfh3-0"
177
- })([ "", " + &,& + ", "{margin-block-start:", ";}" ], C, C, p.variables.spacingSmall);
177
+ })([ "", " + &,& + ", "{margin-block-start:", ";}" ], C, C, v.variables.spacingSmall);
178
178
  // CONCATENATED MODULE: ./src/Menu/MenuContext.tsx
179
- var D = (0, r.createContext)({
179
+ var A = (0, r.createContext)({
180
180
  role: "menu",
181
181
  preventFocus: false
182
182
  });
183
- /* harmony default export */ const T = D;
183
+ /* harmony default export */ const T = A;
184
184
  // CONCATENATED MODULE: ./src/Menu/Divider.tsx
185
185
  function N() {
186
186
  return N = Object.assign ? Object.assign.bind() : function(e) {
@@ -193,48 +193,48 @@
193
193
  return e;
194
194
  }, N.apply(null, arguments);
195
195
  }
196
- var q = {};
196
+ var R = {};
197
197
  /**
198
198
  * A non-interactive menu item used to visually separate groups of items in the menu.
199
- */ function $(e) {
199
+ */ function q(e) {
200
200
  var t = N({}, e);
201
- var a = (0, r.useContext)(T), i = a.role;
201
+ var i = (0, r.useContext)(T), a = i.role;
202
202
 
203
- return n().createElement(A, N({
204
- "aria-hidden": i === "listbox",
203
+ return n().createElement(D, N({
204
+ "aria-hidden": a === "listbox",
205
205
  "data-test": "divider",
206
206
  role: "separator"
207
207
  }, t));
208
208
  }
209
- $.propTypes = q;
210
- /* Remove the item if it is the first item after filtering */ $.filterFirst = true;
211
- /* Remove consecutive items with filterConsecutive = true (Dividers and Headings) */ $.filterConsecutive = true;
212
- /* Remove the item if it is the last item after filtering. */ $.filterLast = true;
213
- /* Tag the item as Divider */ $.as = "Divider";
214
- /* harmony default export */ const H = $;
209
+ q.propTypes = R;
210
+ /* Remove the item if it is the first item after filtering */ q.filterFirst = true;
211
+ /* Remove consecutive items with filterConsecutive = true (Dividers and Headings) */ q.filterConsecutive = true;
212
+ /* Remove the item if it is the last item after filtering. */ q.filterLast = true;
213
+ /* Tag the item as Divider */ q.as = "Divider";
214
+ /* harmony default export */ const $ = q;
215
215
  // CONCATENATED MODULE: external "@splunk/react-ui/Heading"
216
- const R = require("@splunk/react-ui/Heading");
217
- var M = e.n(R);
216
+ const H = require("@splunk/react-ui/Heading");
217
+ var M = e.n(H);
218
218
  // CONCATENATED MODULE: ./src/Menu/HeadingStyles.ts
219
219
  var F = u().div.withConfig({
220
220
  displayName: "HeadingStyles__Styled",
221
221
  componentId: "mcd2ws-0"
222
- })([ "", " border-top:1px solid transparent;padding:", " ", ";&:not(:first-child){border-top:1px solid ", ";margin-top:", ";}" ], p.mixins.reset("block"), p.variables.spacingSmall, p.variables.spacingLarge, p.variables.borderColor, p.variables.spacingSmall);
222
+ })([ "", " border-top:1px solid transparent;padding:", " ", ";&:not(:first-child){border-top:1px solid ", ";margin-top:", ";}" ], v.mixins.reset("block"), v.variables.spacingSmall, v.variables.spacingLarge, v.variables.borderColor, v.variables.spacingSmall);
223
223
  var L = u()(M()).withConfig({
224
224
  displayName: "HeadingStyles__StyledHeading",
225
225
  componentId: "mcd2ws-1"
226
- })([ "color:", ";" ], p.variables.contentColorDefault);
226
+ })([ "color:", ";" ], v.variables.contentColorDefault);
227
227
  // CONCATENATED MODULE: ./src/Menu/Heading.tsx
228
- function K(e) {
228
+ function B(e) {
229
229
  "@babel/helpers - typeof";
230
- return K = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
230
+ return B = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
231
231
  return typeof e;
232
232
  } : function(e) {
233
233
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
234
- }, K(e);
234
+ }, B(e);
235
235
  }
236
- function B() {
237
- return B = Object.assign ? Object.assign.bind() : function(e) {
236
+ function K() {
237
+ return K = Object.assign ? Object.assign.bind() : function(e) {
238
238
  for (var t = 1; t < arguments.length; t++) {
239
239
  var r = arguments[t];
240
240
  for (var n in r) {
@@ -242,9 +242,9 @@
242
242
  }
243
243
  }
244
244
  return e;
245
- }, B.apply(null, arguments);
245
+ }, K.apply(null, arguments);
246
246
  }
247
- function W(e, t) {
247
+ function V(e, t) {
248
248
  var r = Object.keys(e);
249
249
  if (Object.getOwnPropertySymbols) {
250
250
  var n = Object.getOwnPropertySymbols(e);
@@ -254,18 +254,18 @@
254
254
  }
255
255
  return r;
256
256
  }
257
- function z(e) {
257
+ function W(e) {
258
258
  for (var t = 1; t < arguments.length; t++) {
259
259
  var r = null != arguments[t] ? arguments[t] : {};
260
- t % 2 ? W(Object(r), !0).forEach((function(t) {
261
- V(e, t, r[t]);
262
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : W(Object(r)).forEach((function(t) {
260
+ t % 2 ? V(Object(r), !0).forEach((function(t) {
261
+ z(e, t, r[t]);
262
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : V(Object(r)).forEach((function(t) {
263
263
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
264
264
  }));
265
265
  }
266
266
  return e;
267
267
  }
268
- function V(e, t, r) {
268
+ function z(e, t, r) {
269
269
  return (t = X(t)) in e ? Object.defineProperty(e, t, {
270
270
  value: r,
271
271
  enumerable: !0,
@@ -275,28 +275,28 @@
275
275
  }
276
276
  function X(e) {
277
277
  var t = G(e, "string");
278
- return "symbol" == K(t) ? t : t + "";
278
+ return "symbol" == B(t) ? t : t + "";
279
279
  }
280
280
  function G(e, t) {
281
- if ("object" != K(e) || !e) return e;
281
+ if ("object" != B(e) || !e) return e;
282
282
  var r = e[Symbol.toPrimitive];
283
283
  if (void 0 !== r) {
284
284
  var n = r.call(e, t || "default");
285
- if ("object" != K(n)) return n;
285
+ if ("object" != B(n)) return n;
286
286
  throw new TypeError("@@toPrimitive must return a primitive value.");
287
287
  }
288
288
  return ("string" === t ? String : Number)(e);
289
289
  }
290
290
  function J(e, t) {
291
291
  if (null == e) return {};
292
- var r, n, a = Q(e, t);
292
+ var r, n, i = Q(e, t);
293
293
  if (Object.getOwnPropertySymbols) {
294
- var i = Object.getOwnPropertySymbols(e);
295
- for (n = 0; n < i.length; n++) {
296
- r = i[n], -1 === t.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
294
+ var a = Object.getOwnPropertySymbols(e);
295
+ for (n = 0; n < a.length; n++) {
296
+ r = a[n], -1 === t.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (i[r] = e[r]);
297
297
  }
298
298
  }
299
- return a;
299
+ return i;
300
300
  }
301
301
  function Q(e, t) {
302
302
  if (null == e) return {};
@@ -317,14 +317,14 @@
317
317
  /**
318
318
  * A non-interactive `Menu` item used to separate and label groups of `Menu` items.
319
319
  */ function Y(e) {
320
- var t = e.children, a = e.outerStyle, i = e.title, o = J(e, [ "children", "outerStyle", "title" ]);
320
+ var t = e.children, i = e.outerStyle, a = e.title, o = J(e, [ "children", "outerStyle", "title" ]);
321
321
  // @docs-props-type HeadingPropsBase
322
322
  var l = (0, r.useContext)(T), s = l.role;
323
323
  var c = (0, r.useMemo)((function() {
324
- return z(z({}, a), {}, {
324
+ return W(W({}, i), {}, {
325
325
  margin: 0
326
326
  });
327
- }), [ a ]);
327
+ }), [ i ]);
328
328
  // headings are not supported in role="listbox"
329
329
  // this causes Firefox to incorrectly read the total number
330
330
  // of items in the list if it contains a heading or divider
@@ -332,10 +332,10 @@
332
332
 
333
333
  return n().createElement(F, {
334
334
  "aria-hidden": s === "listbox" ? true : undefined
335
- }, n().createElement(L, B({
335
+ }, n().createElement(L, K({
336
336
  style: c,
337
- level: i ? 4 : 5,
338
- variant: i ? "title5" : "title6",
337
+ level: a ? 4 : 5,
338
+ variant: a ? "title5" : "title6",
339
339
  "data-test": "heading"
340
340
  }, o), t));
341
341
  }
@@ -351,29 +351,144 @@
351
351
  const re = require("@splunk/react-icons/Checkmark");
352
352
  var ne = e.n(re);
353
353
  // CONCATENATED MODULE: external "@splunk/react-icons/ChevronRight"
354
- const ae = require("@splunk/react-icons/ChevronRight");
355
- var ie = e.n(ae);
354
+ const ie = require("@splunk/react-icons/ChevronRight");
355
+ var ae = e.n(ie);
356
356
  // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
357
357
  const oe = require("@splunk/react-ui/ScreenReaderContent");
358
358
  var le = e.n(oe);
359
+ // CONCATENATED MODULE: external "@splunk/react-ui/Tooltip"
360
+ const se = require("@splunk/react-ui/Tooltip");
361
+ var ce = e.n(se);
359
362
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
360
- const se = require("@splunk/ui-utils/i18n");
363
+ const ue = require("@splunk/ui-utils/i18n");
361
364
  // CONCATENATED MODULE: external "@splunk/react-icons/ArrowSquareTopRightInset"
362
- const ce = require("@splunk/react-icons/ArrowSquareTopRightInset");
363
- var ue = e.n(ce);
365
+ const de = require("@splunk/react-icons/ArrowSquareTopRightInset");
366
+ var fe = e.n(de);
364
367
  // CONCATENATED MODULE: ./src/Menu/icons/External.tsx
365
- var de = u()(ue()).withConfig({
368
+ var ve = u()(fe()).withConfig({
366
369
  displayName: "External__Styled",
367
370
  componentId: "sc-1turs2s-0"
368
371
  })([ "vertical-align:text-top;margin:0 0 0 4px;" ]);
369
- function ve() {
372
+ function pe() {
370
373
 
371
- return n().createElement(de, null);
374
+ return n().createElement(ve, null);
375
+ }
376
+ /* harmony default export */ const be = pe;
377
+ // CONCATENATED MODULE: ./src/utils/disabled.ts
378
+ /**
379
+ * Normalizes the disabled prop and returns both the boolean state and normalized string value.
380
+ * Use this function to ensure consistent handling of disabled prop across components.
381
+ *
382
+ * @param disabled - The disabled prop value
383
+ * @param defaultWhenBooleanTrue - Optional normalization override for disabled={true}
384
+ * @returns Object with isDisabled boolean|undefined and disabledValue string
385
+ *
386
+ * TODO (SUI-8600): `disabled` prop should default to 'dimmed' for data entry components
387
+ */
388
+ function me(e) {
389
+ var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "dimmed";
390
+ if (e === "dimmed") {
391
+ return {
392
+ isDisabled: true,
393
+ disabledValue: "dimmed"
394
+ };
395
+ }
396
+ if (e === true) {
397
+ return {
398
+ isDisabled: true,
399
+ disabledValue: t
400
+ };
401
+ }
402
+ if (e === "disabled") {
403
+ return {
404
+ isDisabled: true,
405
+ disabledValue: "disabled"
406
+ };
407
+ }
408
+ if (e === false) {
409
+ return {
410
+ isDisabled: false,
411
+ disabledValue: undefined
412
+ };
413
+ }
414
+ return {
415
+ isDisabled: undefined,
416
+ disabledValue: undefined
417
+ };
418
+ }
419
+ // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
420
+ /**
421
+ * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
422
+ *
423
+ * @param ref - The React callback or object ref. Can be `null` or `undefined`.
424
+ * @param current - The new value of the ref.
425
+ */
426
+ function ye(e, t) {
427
+ if (e) {
428
+ if (typeof e === "function") {
429
+ e(t);
430
+ } else {
431
+ // the public signature of this util uses React.Ref<T> to mirror the way React types refs.
432
+ // the intention here is to signal "we will take care of setting 'current', not you".
433
+ e.current = t;
434
+ // eslint-disable-line no-param-reassign
435
+ }
436
+ }
372
437
  }
373
- /* harmony default export */ const pe = ve;
374
438
  // CONCATENATED MODULE: ./src/Menu/Item.tsx
375
- function fe() {
376
- return fe = Object.assign ? Object.assign.bind() : function(e) {
439
+ function ge(e) {
440
+ "@babel/helpers - typeof";
441
+ return ge = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
442
+ return typeof e;
443
+ } : function(e) {
444
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
445
+ }, ge(e);
446
+ }
447
+ function he(e, t) {
448
+ var r = Object.keys(e);
449
+ if (Object.getOwnPropertySymbols) {
450
+ var n = Object.getOwnPropertySymbols(e);
451
+ t && (n = n.filter((function(t) {
452
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
453
+ }))), r.push.apply(r, n);
454
+ }
455
+ return r;
456
+ }
457
+ function Se(e) {
458
+ for (var t = 1; t < arguments.length; t++) {
459
+ var r = null != arguments[t] ? arguments[t] : {};
460
+ t % 2 ? he(Object(r), !0).forEach((function(t) {
461
+ Oe(e, t, r[t]);
462
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : he(Object(r)).forEach((function(t) {
463
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
464
+ }));
465
+ }
466
+ return e;
467
+ }
468
+ function Oe(e, t, r) {
469
+ return (t = we(t)) in e ? Object.defineProperty(e, t, {
470
+ value: r,
471
+ enumerable: !0,
472
+ configurable: !0,
473
+ writable: !0
474
+ }) : e[t] = r, e;
475
+ }
476
+ function we(e) {
477
+ var t = ke(e, "string");
478
+ return "symbol" == ge(t) ? t : t + "";
479
+ }
480
+ function ke(e, t) {
481
+ if ("object" != ge(e) || !e) return e;
482
+ var r = e[Symbol.toPrimitive];
483
+ if (void 0 !== r) {
484
+ var n = r.call(e, t || "default");
485
+ if ("object" != ge(n)) return n;
486
+ throw new TypeError("@@toPrimitive must return a primitive value.");
487
+ }
488
+ return ("string" === t ? String : Number)(e);
489
+ }
490
+ function xe() {
491
+ return xe = Object.assign ? Object.assign.bind() : function(e) {
377
492
  for (var t = 1; t < arguments.length; t++) {
378
493
  var r = arguments[t];
379
494
  for (var n in r) {
@@ -381,20 +496,20 @@
381
496
  }
382
497
  }
383
498
  return e;
384
- }, fe.apply(null, arguments);
499
+ }, xe.apply(null, arguments);
385
500
  }
386
- function me(e, t) {
501
+ function Ce(e, t) {
387
502
  if (null == e) return {};
388
- var r, n, a = be(e, t);
503
+ var r, n, i = je(e, t);
389
504
  if (Object.getOwnPropertySymbols) {
390
- var i = Object.getOwnPropertySymbols(e);
391
- for (n = 0; n < i.length; n++) {
392
- r = i[n], -1 === t.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
505
+ var a = Object.getOwnPropertySymbols(e);
506
+ for (n = 0; n < a.length; n++) {
507
+ r = a[n], -1 === t.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (i[r] = e[r]);
393
508
  }
394
509
  }
395
- return a;
510
+ return i;
396
511
  }
397
- function be(e, t) {
512
+ function je(e, t) {
398
513
  if (null == e) return {};
399
514
  var r = {};
400
515
  for (var n in e) {
@@ -405,7 +520,7 @@
405
520
  }
406
521
  return r;
407
522
  }
408
- var ge = {
523
+ var Ie = {
409
524
  active: l().bool,
410
525
  children: l().node,
411
526
  description: l().string,
@@ -434,157 +549,184 @@
434
549
  to: l().string,
435
550
  truncate: l().bool
436
551
  };
437
- var ye = (0, se._)("(Opens new window)");
438
- function he(e) {
552
+ var Pe = (0, ue._)("(Opens new window)");
553
+ function Ee(e) {
439
554
  var t;
440
- var a = e.active, o = e.children, l = e.description, s = e.descriptionPosition, c = s === void 0 ? "bottom" : s, u = e.disabled, d = e.endAdornment, v = e.elementRef, p = e.hasSubmenu, f = e.itemKey, m = e.matchRanges, b = e.onClick, g = e.onFocus, y = e.openInNewContext, w = e.role, A = e.selectable, D = e.selectableAppearance, N = D === void 0 ? "checkmark" : D, q = e.selected, $ = e.startAdornment, H = e.to, R = e.truncate, M = me(e, [ "active", "children", "description", "descriptionPosition", "disabled", "endAdornment", "elementRef", "hasSubmenu", "itemKey", "matchRanges", "onClick", "onFocus", "openInNewContext", "role", "selectable", "selectableAppearance", "selected", "startAdornment", "to", "truncate" ]);
555
+ var i = e.active, o = e.children, l = e.description, s = e.descriptionPosition, c = s === void 0 ? "bottom" : s, u = e.disabled, d = e.endAdornment, f = e.elementRef, v = e.hasSubmenu, p = e.itemKey, b = e.matchRanges, m = e.onClick, y = e.onFocus, g = e.openInNewContext, O = e.role, D = e.selectable, A = e.selectableAppearance, N = A === void 0 ? "checkmark" : A, R = e.selected, q = e.startAdornment, $ = e.to, H = e.truncate, M = Ce(e, [ "active", "children", "description", "descriptionPosition", "disabled", "endAdornment", "elementRef", "hasSubmenu", "itemKey", "matchRanges", "onClick", "onFocus", "openInNewContext", "role", "selectable", "selectableAppearance", "selected", "startAdornment", "to", "truncate" ]);
441
556
  // @docs-props-type ItemPropsBase
442
557
  var F = (0, r.useContext)(T), L = F.preventFocus;
443
558
  // Use arguments[0] (raw props) to check if `selectableAppearance` was explicitly passed by the caller.
444
559
  // This prevents the default value from incorrectly triggering the dev warning.
445
560
  // eslint-disable-next-line prefer-rest-params
446
- var K = (t = arguments[0]) === null || t === void 0 ? void 0 : t.selectableAppearance;
561
+ var B = (t = arguments[0]) === null || t === void 0 ? void 0 : t.selectableAppearance;
447
562
  (0, r.useEffect)((function() {
448
563
  if (false) {}
449
- }), [ R, c, m, o, q, A, N, K ]);
450
- var B = (0, r.useCallback)((function(e) {
451
- g === null || g === void 0 ? void 0 : g(e, {
452
- itemKey: f
564
+ }), [ H, c, b, o, R, D, N, B ]);
565
+ var K = (0, r.useCallback)((function(e) {
566
+ y === null || y === void 0 ? void 0 : y(e, {
567
+ itemKey: p
453
568
  });
454
- }), [ f, g ]);
455
- var W = (0, r.useCallback)((function(e) {
569
+ }), [ p, y ]);
570
+ var V = (0, r.useCallback)((function(e) {
456
571
  if (L) {
457
572
  e.preventDefault();
458
573
  }
459
574
  }), [ L ]);
460
- var z = (0, r.useMemo)((function() {
461
- if (!m || !te()(o)) {
575
+ var W = (0, r.useMemo)((function() {
576
+ if (!b || !te()(o)) {
462
577
  return o;
463
578
  }
464
579
  var e = [];
465
580
  // before first match. May be empty string.
466
- e.push(o.substring(0, m[0].start));
467
- m.forEach((function(t, r) {
581
+ e.push(o.substring(0, b[0].start));
582
+ b.forEach((function(t, r) {
468
583
  e.push(
469
584
 
470
585
  // eslint-disable-next-line react/no-array-index-key
471
- n().createElement(P, {
586
+ n().createElement(E, {
472
587
  key: r,
473
588
  "data-test": "match"
474
589
  }, o.substring(t.start, t.end)));
475
- if (r < m.length - 1) {
476
- e.push(o.substring(t.end, m[r + 1].start));
590
+ if (r < b.length - 1) {
591
+ e.push(o.substring(t.end, b[r + 1].start));
477
592
  } else {
478
593
  e.push(o.substring(t.end, o.length));
479
594
  }
480
595
  }));
481
596
  return e;
482
- }), [ o, m ]);
483
- var V = q === true || q === "some";
484
- var X = A || V;
485
- var G = w || {
597
+ }), [ o, b ]);
598
+ var z = R === true || R === "some";
599
+ var X = D || z;
600
+ var G = me(u), J = G.isDisabled, Q = G.disabledValue;
601
+ var U = O || {
486
602
  nonselectable: "menuitem",
487
603
  checkmark: "menuitemradio",
488
604
  checkbox: "menuitemcheckbox"
489
605
  }[X ? N : "nonselectable"];
490
- var J = {
491
- "aria-haspopup": p ? true : undefined
492
- };
493
- if (G === "menuitemradio" || G === "menuitemcheckbox") {
494
- J["aria-checked"] = q === "some" ? "mixed" : V;
495
- } else if (G === "option") {
496
- J["aria-selected"] = V;
606
+ var Y = (0, r.useMemo)((function() {
607
+ return {
608
+ "aria-haspopup": v ? true : undefined
609
+ };
610
+ }), [ v ]);
611
+ if (U === "menuitemradio" || U === "menuitemcheckbox") {
612
+ Y["aria-checked"] = R === "some" ? "mixed" : z;
613
+ } else if (U === "option") {
614
+ Y["aria-selected"] = z;
497
615
  }
498
- var Q = l && c === "right";
499
- var U = l && !Q;
500
- var Y = q && N === "checkmark" && n().createElement(k, null, n().createElement(ne(), {
501
- "data-test": "selected-checkmark",
502
- inline: true
503
- }));
504
- var Z = false;
505
- var ee;
506
- if (y) {
507
- Z = true;
508
- ee = typeof y === "string" ? y : ye;
616
+ var Z = l && c === "right";
617
+ var ee = l && !Z;
618
+ var re = false;
619
+ var ie;
620
+ if (g) {
621
+ re = true;
622
+ ie = typeof g === "string" ? g : Pe;
509
623
  }
510
-
511
- return n().createElement(C, fe({
512
- $active: a,
513
- $isSelectable: X,
514
- $preventFocus: L || false,
515
- $selectableAppearance: N !== null && N !== void 0 ? N : false,
516
- $selected: V,
517
- "data-has-icon": !!$ || !!d,
518
- "data-test": "item",
519
- "data-test-selected": X ? V : null,
520
- disabled: u,
521
- elementRef: v,
522
- onClick: b,
523
- onFocus: B,
524
- onMouseDown: W,
525
- openInNewContext: Z,
526
- role: G,
527
- tabIndex: L ? -1 : undefined,
528
- to: H,
529
- title: R && te()(o) ? o : undefined
530
- }, J, i()(M, "onFocus")), p && n().createElement(j, null, n().createElement(ie(), null)), n().createElement(I, null, A && N === "checkbox" && n().createElement(x, {
531
- checked: q === "some" ? "indeterminate" : q,
532
- disabled: !!u,
533
- inert: true
534
- }), $ && n().createElement(O, null, $), n().createElement(E, {
535
- $descriptionBottom: !!U,
536
- $truncate: R !== null && R !== void 0 ? R : false
537
- }, n().createElement(_, {
538
- $truncate: R !== null && R !== void 0 ? R : false,
539
- "data-test": "label"
540
- }, z, y && n().createElement(n().Fragment, null, n().createElement(pe, null), n().createElement(le(), null, ee))), U && n().createElement(h, {
541
- "data-test": "description"
542
- }, l), Q && n().createElement(S, {
543
- "data-test": "description"
544
- }, l)), d && n().createElement(O, {
545
- endAdornment: d
546
- }, d), Y));
624
+ var oe = (0, r.useMemo)((function() {
625
+
626
+ return n().createElement(C, xe({
627
+ $active: i,
628
+ $isSelectable: X,
629
+ $preventFocus: L || false,
630
+ $selectableAppearance: N !== null && N !== void 0 ? N : false,
631
+ $selected: z,
632
+ "data-has-icon": !!q || !!d,
633
+ "data-test": "item",
634
+ "data-test-disabled": Q,
635
+ "data-test-selected": X ? z : null,
636
+ disabled: u,
637
+ elementRef: f,
638
+ onClick: m,
639
+ onFocus: K,
640
+ onMouseDown: V,
641
+ openInNewContext: re,
642
+ role: U,
643
+ tabIndex: L ? -1 : undefined,
644
+ to: $
645
+ }, Y, a()(M, "onFocus")), v && n().createElement(_, null, n().createElement(ae(), null)), n().createElement(j, null, D && N === "checkbox" && n().createElement(x, {
646
+ checked: R === "some" ? "indeterminate" : R,
647
+ disabled: J,
648
+ inert: true
649
+ }), q && n().createElement(k, null, q), n().createElement(I, {
650
+ $descriptionBottom: !!ee,
651
+ $truncate: H !== null && H !== void 0 ? H : false
652
+ }, n().createElement(P, {
653
+ $truncate: H !== null && H !== void 0 ? H : false,
654
+ "data-test": "label"
655
+ }, W, g && n().createElement(n().Fragment, null, n().createElement(be, null), n().createElement(le(), null, ie))), ee && n().createElement(h, {
656
+ "data-test": "description"
657
+ }, l), Z && n().createElement(S, {
658
+ "data-test": "description"
659
+ }, l)), d && n().createElement(k, {
660
+ endAdornment: d
661
+ }, d), R && N === "checkmark" && n().createElement(w, null, n().createElement(ne(), {
662
+ "data-test": "selected-checkmark",
663
+ inline: true
664
+ }))));
665
+ }), [ i, X, L, N, z, q, d, Q, u, f, m, K, V, re, U, $, Y, M, v, D, R, J, ee, H, W, g, ie, l, Z ]);
666
+ var se = H && te()(o);
667
+ var ue = (0, r.useCallback)((function(e) {
668
+ var t = function t(r) {
669
+ ye(e.elementRef, r);
670
+ ye(oe.props.elementRef, r);
671
+ };
672
+ // Merge the anchorProps from Tooltip with the props of the clickable element to ensure consistent behavior for screen readers
673
+ var r = n().cloneElement(oe, Se(Se(Se({}, "aria-describedby" in e ? {
674
+ "aria-describedby": e["aria-describedby"]
675
+ } : {}), "aria-labelledby" in e ? {
676
+ "aria-labelledby": e["aria-labelledby"]
677
+ } : {}), {}, {
678
+ onFocus: function t(r) {
679
+ var n, i, a;
680
+ (n = e.onFocus) === null || n === void 0 ? void 0 : n.call(e, r);
681
+ (i = (a = oe.props).onFocus) === null || i === void 0 ? void 0 : i.call(a, r);
682
+ },
683
+ onBlur: function t(r) {
684
+ var n, i, a;
685
+ (n = e.onBlur) === null || n === void 0 ? void 0 : n.call(e, r);
686
+ (i = (a = oe.props).onBlur) === null || i === void 0 ? void 0 : i.call(a, r);
687
+ },
688
+ onClick: function t(r) {
689
+ var n, i, a;
690
+ (n = e.onClick) === null || n === void 0 ? void 0 : n.call(e, r);
691
+ (i = (a = oe.props).onClick) === null || i === void 0 ? void 0 : i.call(a, r);
692
+ },
693
+ elementRef: t
694
+ }));
695
+ return r;
696
+ }), [ oe ]);
697
+ if (se) {
698
+
699
+ return n().createElement(ce(), {
700
+ content: o,
701
+ defaultPlacement: "right",
702
+ inline: false,
703
+ contentRelationship: "label",
704
+ renderAnchor: ue
705
+ });
706
+ }
707
+ return oe;
547
708
  }
548
- he.propTypes = ge;
549
- he.as = "Item";
550
- /* harmony default export */ const Se = he;
709
+ Ee.propTypes = Ie;
710
+ Ee.as = "Item";
711
+ /* harmony default export */ const _e = Ee;
551
712
  // only for styled components using Item
552
713
  // CONCATENATED MODULE: external "@splunk/react-ui/Scroll"
553
- const we = require("@splunk/react-ui/Scroll");
554
- var ke = e.n(we);
714
+ const De = require("@splunk/react-ui/Scroll");
715
+ var Ae = e.n(De);
555
716
  // CONCATENATED MODULE: ./src/Menu/MenuStyles.ts
556
- var Oe = (0, c.css)([ "border-top:1px solid ", ";" ], p.variables.borderColor);
557
- var xe = (0, c.css)([ "", ";background-color:", ";border-radius:", ";min-width:60px;overflow:auto;position:relative;padding:", " 0;&:focus{outline:0;box-shadow:", ";background:", ";}& + &{", "}" ], p.mixins.reset("block"), p.variables.backgroundColorPopup, p.variables.borderRadius, p.variables.spacingSmall, p.variables.focusShadowInset, p.variables.interactiveColorOverlayHover, Oe);
558
- var Ce = u().div.withConfig({
717
+ var Te = (0, c.css)([ "border-top:1px solid ", ";" ], v.variables.borderColor);
718
+ var Ne = (0, c.css)([ "", ";background-color:", ";border-radius:", ";min-width:60px;overflow:auto;position:relative;padding:", " 0;&:focus{outline:0;box-shadow:", ";background:", ";}& + &{", "}" ], v.mixins.reset("block"), v.variables.backgroundColorPopup, v.variables.borderRadius, v.variables.spacingSmall, v.variables.focusShadowInset, v.variables.interactiveColorOverlayHover, Te);
719
+ var Re = u().div.withConfig({
559
720
  displayName: "MenuStyles__Styled",
560
721
  componentId: "sc-1olffp9-0"
561
- })([ "", "" ], xe);
562
- var Ie = u()(ke()).withConfig({
722
+ })([ "", "" ], Ne);
723
+ var qe = u()(Ae()).withConfig({
563
724
  displayName: "MenuStyles__StyledScroll",
564
725
  componentId: "sc-1olffp9-1"
565
- })([ "", " ", " + &,& + ", "{", "}" ], xe, /* sc-sel */ Ce, /* sc-sel */ Ce, Oe);
566
- // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
567
- /**
568
- * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
569
- *
570
- * @param ref - The React callback or object ref. Can be `null` or `undefined`.
571
- * @param current - The new value of the ref.
572
- */
573
- function Ee(e, t) {
574
- if (e) {
575
- if (typeof e === "function") {
576
- e(t);
577
- } else {
578
- // the public signature of this util uses React.Ref<T> to mirror the way React types refs.
579
- // the intention here is to signal "we will take care of setting 'current', not you".
580
- e.current = t;
581
- // eslint-disable-line no-param-reassign
582
- }
583
- }
584
- }
726
+ })([ "", " ", " + &,& + ", "{", "}" ], Ne, /* sc-sel */ Re, /* sc-sel */ Re, Te);
585
727
  // CONCATENATED MODULE: ./src/Menu/Menu.tsx
586
- function _e() {
587
- return _e = Object.assign ? Object.assign.bind() : function(e) {
728
+ function $e() {
729
+ return $e = Object.assign ? Object.assign.bind() : function(e) {
588
730
  for (var t = 1; t < arguments.length; t++) {
589
731
  var r = arguments[t];
590
732
  for (var n in r) {
@@ -592,20 +734,20 @@
592
734
  }
593
735
  }
594
736
  return e;
595
- }, _e.apply(null, arguments);
737
+ }, $e.apply(null, arguments);
596
738
  }
597
- function Pe(e, t) {
739
+ function He(e, t) {
598
740
  if (null == e) return {};
599
- var r, n, a = je(e, t);
741
+ var r, n, i = Me(e, t);
600
742
  if (Object.getOwnPropertySymbols) {
601
- var i = Object.getOwnPropertySymbols(e);
602
- for (n = 0; n < i.length; n++) {
603
- r = i[n], -1 === t.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
743
+ var a = Object.getOwnPropertySymbols(e);
744
+ for (n = 0; n < a.length; n++) {
745
+ r = a[n], -1 === t.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (i[r] = e[r]);
604
746
  }
605
747
  }
606
- return a;
748
+ return i;
607
749
  }
608
- function je(e, t) {
750
+ function Me(e, t) {
609
751
  if (null == e) return {};
610
752
  var r = {};
611
753
  for (var n in e) {
@@ -616,14 +758,14 @@
616
758
  }
617
759
  return r;
618
760
  }
619
- var Ae = {
761
+ var Fe = {
620
762
  children: l().node,
621
763
  elementRef: l().oneOfType([ l().func, l().object ]),
622
764
  focusMode: l().oneOf([ "roving", "normal", "never" ]),
623
765
  stopScrollPropagation: l().bool
624
766
  };
625
767
  // the default focus control for Menu: loop, verticalArrows(up/down keys), home/end keys
626
- var De = function e() {
768
+ var Le = function e() {
627
769
  return {
628
770
  enableLoop: true,
629
771
  orientation: "vertical",
@@ -631,7 +773,7 @@
631
773
  enableHomeEnd: true
632
774
  };
633
775
  };
634
- var Te = function e(t) {
776
+ var Be = function e(t) {
635
777
  var r = t.key;
636
778
  // Handle special case for tab navigation
637
779
  if (r === "Tab" && (0, s.isTabKey)(t.nativeEvent)) {
@@ -639,12 +781,12 @@
639
781
  }
640
782
  return r;
641
783
  };
642
- function Ne(e) {
643
- var t = e.children, a = e.elementRef, o = e.focusMode, l = o === void 0 ? "roving" : o, c = e.stopScrollPropagation, u = Pe(e, [ "children", "elementRef", "focusMode", "stopScrollPropagation" ]);
784
+ function Ke(e) {
785
+ var t = e.children, i = e.elementRef, o = e.focusMode, l = o === void 0 ? "roving" : o, c = e.stopScrollPropagation, u = He(e, [ "children", "elementRef", "focusMode", "stopScrollPropagation" ]);
644
786
  // @docs-props-type MenuPropsBase
645
- var d = (0, r.useContext)(T), v = d.role, p = v === void 0 ? "menu" : v;
646
- var f = (0, r.useRef)(null);
647
- var m = r.Children.toArray(t).filter(r.isValidElement).reduce((function(e, t, r, n) {
787
+ var d = (0, r.useContext)(T), f = d.role, v = f === void 0 ? "menu" : f;
788
+ var p = (0, r.useRef)(null);
789
+ var b = r.Children.toArray(t).filter(r.isValidElement).reduce((function(e, t, r, n) {
648
790
  /* Filter out initial Dividers
649
791
  * Requires reduce() over filter() because a Heading may have been
650
792
  * before the Divider.
@@ -655,8 +797,8 @@
655
797
  // Filter out consecutive Dividers and Headings
656
798
  // If Divider is next to Heading then it will remove both Heading and Divider unless Heading has title prop set to it
657
799
  if ((t.type.as === "Heading" || t.type.as === "Divider") && !t.props.title && t.type.filterConsecutive && n.length > r + 1) {
658
- var a = n[r + 1];
659
- if (a.type.as === "Heading" || a.type.as === "Divider") {
800
+ var i = n[r + 1];
801
+ if (i.type.as === "Heading" || i.type.as === "Divider") {
660
802
  return e;
661
803
  }
662
804
  }
@@ -667,62 +809,62 @@
667
809
  e.push(t);
668
810
  return e;
669
811
  }), []);
670
- var b = (0, r.useCallback)((function(e) {
671
- f.current = e;
672
- Ee(a, e);
673
- }), [ a ]);
674
- var g = De();
675
- var y = (0, r.useCallback)((function(e) {
812
+ var m = (0, r.useCallback)((function(e) {
813
+ p.current = e;
814
+ ye(i, e);
815
+ }), [ i ]);
816
+ var y = Le();
817
+ var g = (0, r.useCallback)((function(e) {
676
818
  // if command key on Mac was pressed ignore
677
819
  if (e.nativeEvent.metaKey) {
678
820
  return;
679
821
  }
680
- var t = Te(e);
822
+ var t = Be(e);
681
823
  var r = t === "Tab" || t === "tabShift";
682
824
  var n = t === "Enter";
683
825
  // Allow default behavior for the enter key.
684
826
  // If tab navigation is enabled, prevent default behavior for all other keys.
685
827
  // If tab navigation is disabled, allow default behavior for tab and tab+shift key
686
- if (!n && (g.enableTab || !r)) {
828
+ if (!n && (y.enableTab || !r)) {
687
829
  e.preventDefault();
688
830
  }
689
- var a = f.current;
690
- var i = [];
691
- if (a) {
692
- i = (0, s.getSortedTabbableElements)(a, {
831
+ var i = p.current;
832
+ var a = [];
833
+ if (i) {
834
+ a = (0, s.getSortedTabbableElements)(i, {
693
835
  ignoreTabIndex: true
694
836
  });
695
837
  }
696
- var o = e.target instanceof HTMLElement ? e.target : a === null || a === void 0 ? void 0 : a.querySelector(":focus");
697
- var l = o instanceof HTMLElement ? i.indexOf(o) : -1;
698
- (0, s.handleFocus)(t, i, l, g);
699
- }), [ g ]);
838
+ var o = e.target instanceof HTMLElement ? e.target : i === null || i === void 0 ? void 0 : i.querySelector(":focus");
839
+ var l = o instanceof HTMLElement ? a.indexOf(o) : -1;
840
+ (0, s.handleFocus)(t, a, l, y);
841
+ }), [ y ]);
700
842
  var h = function e() {
701
843
  return {
702
844
  role: "menu",
703
845
  preventFocus: l === "never"
704
846
  };
705
847
  };
706
- var S = l === "normal" || l === "never" ? undefined : y;
707
- var w = {
848
+ var S = l === "normal" || l === "never" ? undefined : g;
849
+ var O = {
708
850
  "data-test": "menu",
709
851
  onKeyDown: S,
710
- role: p
852
+ role: v
711
853
  };
712
- return c ? n().createElement(Ie, _e({}, w, {
713
- elementRef: b,
854
+ return c ? n().createElement(qe, $e({}, O, {
855
+ elementRef: m,
714
856
  stopScrollPropagation: true
715
- }, i()(u, "tagName")), m) : n().createElement(Ce, _e({}, w, {
716
- ref: b
857
+ }, a()(u, "tagName")), b) : n().createElement(Re, $e({}, O, {
858
+ ref: m
717
859
  }, u), n().createElement(T.Provider, {
718
860
  value: h()
719
- }, m));
861
+ }, b));
720
862
  }
721
- Ne.propTypes = Ae;
722
- Ne.Item = Se;
723
- Ne.Divider = H;
724
- Ne.Heading = Z;
725
- /* harmony default export */ const qe = Ne;
863
+ Ke.propTypes = Fe;
864
+ Ke.Item = _e;
865
+ Ke.Divider = $;
866
+ Ke.Heading = Z;
867
+ /* harmony default export */ const Ve = Ke;
726
868
  // CONCATENATED MODULE: ./src/Menu/index.ts
727
869
  module.exports = t;
728
870
  /******/})();