@splunk/react-ui 4.37.0 → 4.39.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 (142) 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 +208 -219
  8. package/ButtonGroup.js +41 -49
  9. package/ButtonSimple.js +264 -295
  10. package/CHANGELOG.md +50 -1
  11. package/Calendar.js +353 -414
  12. package/Card.js +183 -243
  13. package/CardLayout.js +86 -83
  14. package/Chip.js +104 -122
  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 +1107 -980
  20. package/ColumnLayout.js +72 -96
  21. package/ComboBox.js +267 -305
  22. package/Concertina.js +406 -454
  23. package/ControlGroup.js +165 -194
  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 +92 -38
  39. package/Markdown.js +288 -347
  40. package/Menu.js +512 -530
  41. package/Message.js +173 -196
  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 +1600 -1923
  47. package/Number.js +159 -178
  48. package/Paginator.js +296 -335
  49. package/Paragraph.js +24 -32
  50. package/Popover.js +448 -441
  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 +130 -94
  57. package/Scroll.js +209 -244
  58. package/Search.js +375 -384
  59. package/Select.js +1076 -1354
  60. package/SidePanel.js +122 -142
  61. package/Slider.js +192 -222
  62. package/SlidingPanels.js +238 -270
  63. package/SplitButton.js +222 -245
  64. package/StaticContent.js +68 -76
  65. package/StepBar.js +206 -205
  66. package/Switch.js +211 -236
  67. package/TabBar.js +222 -258
  68. package/TabLayout.js +114 -139
  69. package/Table.js +2017 -2180
  70. package/Text.js +401 -512
  71. package/TextArea.js +411 -441
  72. package/Tooltip.js +116 -132
  73. package/TransitionOpen.js +160 -178
  74. package/Tree.js +268 -287
  75. package/Typography.js +48 -52
  76. package/WaitSpinner.js +60 -68
  77. package/cypress/support/commands.ts +9 -0
  78. package/cypress/support/index.d.ts +6 -0
  79. package/cypress/tsconfig.cypress.json +1 -0
  80. package/docker-compose.yml +0 -1
  81. package/package.json +17 -17
  82. package/types/src/Button/Button.d.ts +20 -6
  83. package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
  84. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
  85. package/types/src/Color/Color.d.ts +5 -2
  86. package/types/src/Color/Palette.d.ts +6 -2
  87. package/types/src/ComboBox/Option.d.ts +1 -1
  88. package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
  89. package/types/src/Date/Date.d.ts +2 -3
  90. package/types/src/File/File.d.ts +2 -3
  91. package/types/src/File/Retry.d.ts +1 -2
  92. package/types/src/Link/Link.d.ts +3 -4
  93. package/types/src/Menu/Item.d.ts +24 -8
  94. package/types/src/Menu/Menu.d.ts +3 -3
  95. package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
  96. package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
  97. package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
  98. package/types/src/Multiselect/Option.d.ts +2 -0
  99. package/types/src/Number/Number.d.ts +3 -3
  100. package/types/src/Popover/Popover.d.ts +3 -4
  101. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  102. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  103. package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
  104. package/types/src/Search/Option.d.ts +16 -3
  105. package/types/src/Select/Option.d.ts +3 -1
  106. package/types/src/Select/OptionBase.d.ts +7 -5
  107. package/types/src/Select/Select.d.ts +2 -2
  108. package/types/src/Select/SelectAllOption.d.ts +4 -4
  109. package/types/src/Select/SelectBase.d.ts +0 -1
  110. package/types/src/SidePanel/SidePanel.d.ts +1 -1
  111. package/types/src/Slider/Slider.d.ts +2 -3
  112. package/types/src/Slider/docs/examples/Error.d.ts +2 -0
  113. package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
  114. package/types/src/StepBar/Step.d.ts +1 -2
  115. package/types/src/TabBar/Tab.d.ts +1 -1
  116. package/types/src/TabBar/TabBar.d.ts +3 -1
  117. package/types/src/TabLayout/TabLayout.d.ts +2 -0
  118. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  119. package/types/src/Table/Table.d.ts +0 -1
  120. package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
  121. package/types/src/Text/IconOutlinedHide.d.ts +1 -2
  122. package/types/src/Text/IconOutlinedView.d.ts +1 -2
  123. package/types/src/Text/Text.d.ts +6 -4
  124. package/types/src/Text/docs/examples/Dimmed.d.ts +2 -0
  125. package/types/src/TextArea/TextArea.d.ts +2 -2
  126. package/types/src/Tooltip/Tooltip.d.ts +4 -4
  127. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
  128. package/useForceUpdate.js +30 -32
  129. package/useKeyPress.js +1 -1
  130. package/types/src/Button/docs/examples/Selected.d.ts +0 -2
  131. package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
  132. package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
  133. package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
  134. package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
  135. package/types/src/Slider/docs/examples/prisma/Error.d.ts +0 -2
  136. package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
  137. package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
  138. package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
  139. /package/types/src/Date/docs/examples/{prisma/WithoutCalendar.d.ts → WithoutCalendar.d.ts} +0 -0
  140. /package/types/src/Message/docs/examples/{prisma/Title.d.ts → Title.d.ts} +0 -0
  141. /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
  142. /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
package/Color.js CHANGED
@@ -1,34 +1,151 @@
1
1
  /******/ (() => {
2
2
  // webpackBootstrap
3
3
  /******/ "use strict";
4
- /******/ // The require scope
5
- /******/ var e = {};
4
+ /******/ var e = {
5
+ /***/ 6165:
6
+ /***/ (e, t, r) => {
7
+ // EXPORTS
8
+ r.d(t, {
9
+ default: () => /* reexport */ b
10
+ });
11
+ // EXTERNAL MODULE: external "react"
12
+ var n = r(9497);
13
+ var a = r.n(n);
14
+ // EXTERNAL MODULE: external "prop-types"
15
+ var o = r(23);
16
+ var l = r.n(o);
17
+ // EXTERNAL MODULE: external "styled-components"
18
+ var i = r(232);
19
+ var s = r.n(i);
20
+ // EXTERNAL MODULE: external "@splunk/themes"
21
+ var u = r(3563);
22
+ // CONCATENATED MODULE: ./src/ScreenReaderContent/ScreenReaderContentStyles.ts
23
+ var c = s().span.withConfig({
24
+ displayName: "ScreenReaderContentStyles__Styled",
25
+ componentId: "sc-1lnohwp-0"
26
+ })([ "", ";" ], u.mixins.screenReaderContent());
27
+ // CONCATENATED MODULE: ./src/ScreenReaderContent/ScreenReaderContent.tsx
28
+ function p() {
29
+ return p = Object.assign ? Object.assign.bind() : function(e) {
30
+ for (var t = 1; t < arguments.length; t++) {
31
+ var r = arguments[t];
32
+ for (var n in r) {
33
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
34
+ }
35
+ }
36
+ return e;
37
+ }, p.apply(null, arguments);
38
+ }
39
+ function d(e, t) {
40
+ if (null == e) return {};
41
+ var r, n, a = f(e, t);
42
+ if (Object.getOwnPropertySymbols) {
43
+ var o = Object.getOwnPropertySymbols(e);
44
+ for (n = 0; n < o.length; n++) {
45
+ r = o[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
46
+ }
47
+ }
48
+ return a;
49
+ }
50
+ function f(e, t) {
51
+ if (null == e) return {};
52
+ var r = {};
53
+ for (var n in e) {
54
+ if ({}.hasOwnProperty.call(e, n)) {
55
+ if (t.includes(n)) continue;
56
+ r[n] = e[n];
57
+ }
58
+ }
59
+ return r;
60
+ }
61
+ var v = {
62
+ children: l().node.isRequired,
63
+ elementRef: l().oneOfType([ l().func, l().object ])
64
+ };
65
+ /**
66
+ * The screen reader text is used to wrap content that
67
+ * is only accessible through screen readers.
68
+ */ function h(e) {
69
+ var t = e.children, r = e.elementRef, n = d(e, [ "children", "elementRef" ]);
70
+ // @docs-props-type ScreenReaderContentPropsBase
71
+
72
+ return a().createElement(c, p({
73
+ "data-test": "screen-reader-content",
74
+ ref: r
75
+ }, n), t);
76
+ }
77
+ h.propTypes = v;
78
+ /* harmony default export */ const b = h;
79
+ } // CONCATENATED MODULE: ./src/ScreenReaderContent/index.ts
80
+ /***/ ,
81
+ /***/ 3563:
82
+ /***/ e => {
83
+ e.exports = require("@splunk/themes");
84
+ /***/ },
85
+ /***/ 23:
86
+ /***/ e => {
87
+ e.exports = require("prop-types");
88
+ /***/ },
89
+ /***/ 9497:
90
+ /***/ e => {
91
+ e.exports = require("react");
92
+ /***/ },
93
+ /***/ 232:
94
+ /***/ e => {
95
+ e.exports = require("styled-components");
96
+ /***/
97
+ /******/ }
98
+ };
99
+ /************************************************************************/
100
+ /******/ // The module cache
101
+ /******/ var t = {};
102
+ /******/
103
+ /******/ // The require function
104
+ /******/ function r(n) {
105
+ /******/ // Check if module is in cache
106
+ /******/ var a = t[n];
107
+ /******/ if (a !== undefined) {
108
+ /******/ return a.exports;
109
+ /******/ }
110
+ /******/ // Create a new module (and put it into the cache)
111
+ /******/ var o = t[n] = {
112
+ /******/ // no module.id needed
113
+ /******/ // no module.loaded needed
114
+ /******/ exports: {}
115
+ /******/ };
116
+ /******/
117
+ /******/ // Execute the module function
118
+ /******/ e[n](o, o.exports, r);
119
+ /******/
120
+ /******/ // Return the exports of the module
121
+ /******/ return o.exports;
122
+ /******/ }
6
123
  /******/
7
124
  /************************************************************************/
8
125
  /******/ /* webpack/runtime/compat get default export */
9
126
  /******/ (() => {
10
127
  /******/ // getDefaultExport function for compatibility with non-harmony modules
11
- /******/ e.n = t => {
12
- /******/ var r = t && t.__esModule ?
13
- /******/ () => t["default"]
14
- /******/ : () => t
128
+ /******/ r.n = e => {
129
+ /******/ var t = e && e.__esModule ?
130
+ /******/ () => e["default"]
131
+ /******/ : () => e
15
132
  /******/;
16
- e.d(r, {
17
- a: r
133
+ r.d(t, {
134
+ a: t
18
135
  });
19
- /******/ return r;
136
+ /******/ return t;
20
137
  /******/ };
21
138
  /******/ })();
22
139
  /******/
23
140
  /******/ /* webpack/runtime/define property getters */
24
141
  /******/ (() => {
25
142
  /******/ // define getter functions for harmony exports
26
- /******/ e.d = (t, r) => {
27
- /******/ for (var n in r) {
28
- /******/ if (e.o(r, n) && !e.o(t, n)) {
29
- /******/ Object.defineProperty(t, n, {
143
+ /******/ r.d = (e, t) => {
144
+ /******/ for (var n in t) {
145
+ /******/ if (r.o(t, n) && !r.o(e, n)) {
146
+ /******/ Object.defineProperty(e, n, {
30
147
  enumerable: true,
31
- get: r[n]
148
+ get: t[n]
32
149
  });
33
150
  /******/ }
34
151
  /******/ }
@@ -37,14 +154,14 @@
37
154
  /******/
38
155
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
156
  /******/ (() => {
40
- /******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
157
+ /******/ r.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
41
158
  /******/;
42
159
  })();
43
160
  /******/
44
161
  /******/ /* webpack/runtime/make namespace object */
45
162
  /******/ (() => {
46
163
  /******/ // define __esModule on exports
47
- /******/ e.r = e => {
164
+ /******/ r.r = e => {
48
165
  /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
49
166
  /******/ Object.defineProperty(e, Symbol.toStringTag, {
50
167
  value: "Module"
@@ -56,1044 +173,1054 @@
56
173
  /******/ };
57
174
  /******/ })();
58
175
  /******/
59
- /************************************************************************/ var t = {};
60
- // ESM COMPAT FLAG
61
- e.r(t);
62
- // EXPORTS
63
- e.d(t, {
64
- default: () => /* reexport */ Ue,
65
- defaultPalette: () => /* reexport */ Ae,
66
- isValidHEX: () => /* reexport */ ze
67
- });
68
- // CONCATENATED MODULE: external "react"
69
- const r = require("react");
70
- var n = e.n(r);
71
- // CONCATENATED MODULE: external "prop-types"
72
- const a = require("prop-types");
73
- var o = e.n(a);
74
- // CONCATENATED MODULE: external "lodash/has"
75
- const l = require("lodash/has");
76
- var i = e.n(l);
77
- // CONCATENATED MODULE: external "lodash/includes"
78
- const s = require("lodash/includes");
79
- var u = e.n(s);
80
- // CONCATENATED MODULE: external "lodash/keys"
81
- const c = require("lodash/keys");
82
- var p = e.n(c);
83
- // CONCATENATED MODULE: external "lodash/omit"
84
- const d = require("lodash/omit");
85
- var f = e.n(d);
86
- // CONCATENATED MODULE: external "lodash/slice"
87
- const v = require("lodash/slice");
88
- var h = e.n(v);
89
- // CONCATENATED MODULE: external "lodash/startsWith"
90
- const m = require("lodash/startsWith");
91
- var y = e.n(m);
92
- // CONCATENATED MODULE: external "lodash/toLower"
93
- const b = require("lodash/toLower");
94
- var g = e.n(b);
95
- // CONCATENATED MODULE: external "lodash/memoize"
96
- const x = require("lodash/memoize");
97
- var S = e.n(x);
98
- // CONCATENATED MODULE: external "tinycolor2"
99
- const w = require("tinycolor2");
100
- var k = e.n(w);
101
- // CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
102
- const C = require("@splunk/react-ui/Dropdown");
103
- var E = e.n(C);
104
- // CONCATENATED MODULE: external "@splunk/themes"
105
- const P = require("@splunk/themes");
106
- // CONCATENATED MODULE: external "@splunk/ui-utils/color"
107
- const O = require("@splunk/ui-utils/color");
108
- // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
109
- const _ = require("@splunk/ui-utils/i18n");
110
- // CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
111
- const q = require("@splunk/ui-utils/keyboard");
112
- // CONCATENATED MODULE: external "styled-components"
113
- const j = require("styled-components");
114
- var I = e.n(j);
115
- // CONCATENATED MODULE: external "@splunk/react-ui/Text"
116
- const T = require("@splunk/react-ui/Text");
117
- var R = e.n(T);
118
- // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
119
- const B = require("@splunk/react-ui/ScreenReaderContent");
120
- var V = e.n(B);
121
- // CONCATENATED MODULE: external "@splunk/react-icons/Checkmark"
122
- const A = require("@splunk/react-icons/Checkmark");
123
- var D = e.n(A);
124
- // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
125
- const N = require("@splunk/react-ui/Clickable");
126
- var $ = e.n(N);
127
- // CONCATENATED MODULE: ./src/Color/SwatchStyles.ts
128
- var H = (0, P.pick)({
129
- enterprise: P.variables.gray80,
130
- prisma: "rgba(0, 0, 0, 0.2)"
131
- });
132
- var z = (0, j.css)([ "background-image:linear-gradient( 45deg,", " 25%,transparent 25%,transparent 75%,", " 75%,", " ),linear-gradient( 45deg,", " 25%,transparent 25%,transparent 75%,", " 75%,", " );background-size:10px 10px;background-position:0 0,5px 5px;background-color:", ";" ], H, H, H, H, H, H, (0,
133
- P.pick)({
134
- enterprise: "transparent",
135
- prisma: P.variables.white
136
- }));
137
- var K = I()(D()).withConfig({
138
- displayName: "SwatchStyles__StyledCheck",
139
- componentId: "sc-1wxunhq-0"
140
- })([ "box-sizing:border-box;color:#d3d3d3;height:100%;width:100%;" ]);
141
- var F = I()($()).withConfig({
142
- displayName: "SwatchStyles__StyledClickable",
143
- componentId: "sc-1wxunhq-1"
144
- })([ "display:block;flex:0 0 auto;border:1px solid;border-color:", ";", ";", ";", ";", " &:focus{border-color:", ";box-shadow:", ";", "}", " ", " ", " &[disabled]{background-image:linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8));}", " ", "" ], (0,
145
- P.pick)({
146
- enterprise: {
147
- light: P.variables.gray60,
148
- dark: P.variables.borderColor
149
- },
150
- prisma: P.variables.interactiveColorBorder
151
- }), (0, P.pick)({
152
- prisma: (0, j.css)([ "border-radius:2px;" ])
153
- }), (function(e) {
154
- var t = e.$value;
155
- return t === null && (0, j.css)([ "background-image:linear-gradient( to bottom right,transparent 48%,", ",transparent 52% );", ";" ], (0,
156
- P.pick)({
157
- enterprise: "#ed1e24",
158
- prisma: P.variables.accentColorNegative
159
- }), (0, P.pick)({
160
- prisma: (0, j.css)([ "background-color:", ";" ], P.variables.white)
176
+ /************************************************************************/ var n = {};
177
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
178
+ (() => {
179
+ // ESM COMPAT FLAG
180
+ r.r(n);
181
+ // EXPORTS
182
+ r.d(n, {
183
+ default: () => /* reexport */ Ze,
184
+ defaultPalette: () => /* reexport */ Ke,
185
+ isValidHEX: () => /* reexport */ We
186
+ });
187
+ // EXTERNAL MODULE: external "react"
188
+ var e = r(9497);
189
+ var t = r.n(e);
190
+ // EXTERNAL MODULE: external "prop-types"
191
+ var a = r(23);
192
+ var o = r.n(a);
193
+ // CONCATENATED MODULE: external "lodash/has"
194
+ const l = require("lodash/has");
195
+ var i = r.n(l);
196
+ // CONCATENATED MODULE: external "lodash/includes"
197
+ const s = require("lodash/includes");
198
+ var u = r.n(s);
199
+ // CONCATENATED MODULE: external "lodash/keys"
200
+ const c = require("lodash/keys");
201
+ var p = r.n(c);
202
+ // CONCATENATED MODULE: external "lodash/omit"
203
+ const d = require("lodash/omit");
204
+ var f = r.n(d);
205
+ // CONCATENATED MODULE: external "lodash/slice"
206
+ const v = require("lodash/slice");
207
+ var h = r.n(v);
208
+ // CONCATENATED MODULE: external "lodash/startsWith"
209
+ const b = require("lodash/startsWith");
210
+ var m = r.n(b);
211
+ // CONCATENATED MODULE: external "lodash/toLower"
212
+ const y = require("lodash/toLower");
213
+ var g = r.n(y);
214
+ // CONCATENATED MODULE: external "lodash/memoize"
215
+ const x = require("lodash/memoize");
216
+ var w = r.n(x);
217
+ // CONCATENATED MODULE: external "tinycolor2"
218
+ const S = require("tinycolor2");
219
+ var C = r.n(S);
220
+ // CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
221
+ const k = require("@splunk/react-ui/Dropdown");
222
+ var P = r.n(k);
223
+ // EXTERNAL MODULE: external "@splunk/themes"
224
+ var E = r(3563);
225
+ // CONCATENATED MODULE: external "@splunk/ui-utils/color"
226
+ const O = require("@splunk/ui-utils/color");
227
+ // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
228
+ const I = require("@splunk/ui-utils/i18n");
229
+ // CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
230
+ const _ = require("@splunk/ui-utils/keyboard");
231
+ // CONCATENATED MODULE: external "@splunk/ui-utils/id"
232
+ const q = require("@splunk/ui-utils/id");
233
+ // EXTERNAL MODULE: external "styled-components"
234
+ var j = r(232);
235
+ var T = r.n(j);
236
+ // CONCATENATED MODULE: external "@splunk/react-ui/Text"
237
+ const R = require("@splunk/react-ui/Text");
238
+ var B = r.n(R);
239
+ // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
240
+ const D = require("@splunk/react-ui/ScreenReaderContent");
241
+ var V = r.n(D);
242
+ // CONCATENATED MODULE: external "@splunk/react-icons/Checkmark"
243
+ const A = require("@splunk/react-icons/Checkmark");
244
+ var N = r.n(A);
245
+ // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
246
+ const $ = require("@splunk/react-ui/Clickable");
247
+ var H = r.n($);
248
+ // CONCATENATED MODULE: ./src/Color/SwatchStyles.ts
249
+ var z = (0, E.pick)({
250
+ enterprise: E.variables.gray80,
251
+ prisma: "rgba(0, 0, 0, 0.2)"
252
+ });
253
+ var K = (0, j.css)([ "background-image:linear-gradient( 45deg,", " 25%,transparent 25%,transparent 75%,", " 75%,", " ),linear-gradient( 45deg,", " 25%,transparent 25%,transparent 75%,", " 75%,", " );background-size:10px 10px;background-position:0 0,5px 5px;background-color:", ";" ], z, z, z, z, z, z, (0,
254
+ E.pick)({
255
+ enterprise: "transparent",
256
+ prisma: E.variables.white
161
257
  }));
162
- }), (function(e) {
163
- var t = e.$value;
164
- return t && (t === "transparent" ? z : "background-color: ".concat(t));
165
- }), (function(e) {
166
- var t = e.$noBorder;
167
- return t && (0, j.css)([ "border:none;" ]);
168
- }), P.variables.focusColor, P.variables.focusShadow, (0, P.pick)({
169
- // Fixes focus shadow being cut off by input (SUI-6401)
170
- enterprise: (0, j.css)([ "z-index:1;" ])
171
- }), (0, P.pick)({
172
- enterprise: {
173
- comfortable: (0, j.css)([ "width:32px;height:32px;" ]),
174
- compact: (0, j.css)([ "width:24px;height:24px;" ])
175
- },
176
- prisma: (0, j.css)([ "width:24px;height:24px;" ])
177
- }), (function(e) {
178
- var t = e.$prepend;
179
- return t && (0, j.css)([ "border-top-left-radius:0;border-bottom-left-radius:0;" ]);
180
- }), (function(e) {
181
- var t = e.$append;
182
- return t && (0, j.css)([ "margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;" ]);
183
- }), (function(e) {
184
- var t = e.$hasError;
185
- return t && (0, j.css)([ "box-shadow:inset 0 0 0 2px white;border-color:", ";" ], (0,
186
- P.pick)({
187
- enterprise: P.variables.errorColor,
188
- prisma: P.variables.accentColorNegative
258
+ var F = T()(N()).withConfig({
259
+ displayName: "SwatchStyles__StyledCheck",
260
+ componentId: "sc-1wxunhq-0"
261
+ })([ "box-sizing:border-box;color:#d3d3d3;height:100%;width:100%;" ]);
262
+ var M = T()(H()).withConfig({
263
+ displayName: "SwatchStyles__StyledClickable",
264
+ componentId: "sc-1wxunhq-1"
265
+ })([ "display:block;flex:0 0 auto;border:1px solid;border-color:", ";", ";", ";", ";", " &:focus{border-color:", ";box-shadow:", ";", "}", " ", " ", " &[disabled]{background-image:linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8));}", " ", "" ], (0,
266
+ E.pick)({
267
+ enterprise: {
268
+ light: E.variables.gray60,
269
+ dark: E.variables.borderColor
270
+ },
271
+ prisma: E.variables.interactiveColorBorder
272
+ }), (0, E.pick)({
273
+ prisma: (0, j.css)([ "border-radius:2px;" ])
274
+ }), (function(e) {
275
+ var t = e.$value;
276
+ return t === null && (0, j.css)([ "background-image:linear-gradient( to bottom right,transparent 48%,", ",transparent 52% );", ";" ], (0,
277
+ E.pick)({
278
+ enterprise: "#ed1e24",
279
+ prisma: E.variables.accentColorNegative
280
+ }), (0, E.pick)({
281
+ prisma: (0, j.css)([ "background-color:", ";" ], E.variables.white)
282
+ }));
283
+ }), (function(e) {
284
+ var t = e.$value;
285
+ return t && (t === "transparent" ? K : "background-color: ".concat(t));
286
+ }), (function(e) {
287
+ var t = e.$noBorder;
288
+ return t && (0, j.css)([ "border:none;" ]);
289
+ }), E.variables.focusColor, E.variables.focusShadow, (0, E.pick)({
290
+ // Fixes focus shadow being cut off by input (SUI-6401)
291
+ enterprise: (0, j.css)([ "z-index:1;" ])
292
+ }), (0, E.pick)({
293
+ enterprise: {
294
+ comfortable: (0, j.css)([ "width:32px;height:32px;" ]),
295
+ compact: (0, j.css)([ "width:24px;height:24px;" ])
296
+ },
297
+ prisma: (0, j.css)([ "width:24px;height:24px;" ])
298
+ }), (function(e) {
299
+ var t = e.$prepend;
300
+ return t && (0, j.css)([ "border-top-left-radius:0;border-bottom-left-radius:0;" ]);
301
+ }), (function(e) {
302
+ var t = e.$append;
303
+ return t && (0, j.css)([ "margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;" ]);
304
+ }), (function(e) {
305
+ var t = e.$hasError;
306
+ return t && (0, j.css)([ "box-shadow:inset 0 0 0 2px white;border-color:", ";" ], (0,
307
+ E.pick)({
308
+ enterprise: E.variables.errorColor,
309
+ prisma: E.variables.accentColorNegative
310
+ }));
311
+ }), (function(e) {
312
+ var t = e.$showSelected;
313
+ return t && (0, j.css)([ "display:flex;align-items:center;justify-content:center;" ]);
189
314
  }));
190
- }), (function(e) {
191
- var t = e.$showSelected;
192
- return t && (0, j.css)([ "display:flex;align-items:center;justify-content:center;" ]);
193
- }));
194
- // CONCATENATED MODULE: ./src/Color/Swatch.tsx
195
- function M() {
196
- M = Object.assign || function(e) {
197
- for (var t = 1; t < arguments.length; t++) {
198
- var r = arguments[t];
199
- for (var n in r) {
200
- if (Object.prototype.hasOwnProperty.call(r, n)) {
201
- e[n] = r[n];
315
+ // CONCATENATED MODULE: ./src/Color/Swatch.tsx
316
+ function L() {
317
+ return L = Object.assign ? Object.assign.bind() : function(e) {
318
+ for (var t = 1; t < arguments.length; t++) {
319
+ var r = arguments[t];
320
+ for (var n in r) {
321
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
202
322
  }
203
323
  }
204
- }
205
- return e;
206
- };
207
- return M.apply(this, arguments);
208
- }
209
- function L(e, t) {
210
- if (e == null) return {};
211
- var r = U(e, t);
212
- var n, a;
213
- if (Object.getOwnPropertySymbols) {
214
- var o = Object.getOwnPropertySymbols(e);
215
- for (a = 0; a < o.length; a++) {
216
- n = o[a];
217
- if (t.indexOf(n) >= 0) continue;
218
- if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
219
- r[n] = e[n];
220
- }
324
+ return e;
325
+ }, L.apply(null, arguments);
221
326
  }
222
- return r;
223
- }
224
- function U(e, t) {
225
- if (e == null) return {};
226
- var r = {};
227
- var n = Object.keys(e);
228
- var a, o;
229
- for (o = 0; o < n.length; o++) {
230
- a = n[o];
231
- if (t.indexOf(a) >= 0) continue;
232
- r[a] = e[a];
327
+ function U(e, t) {
328
+ if (null == e) return {};
329
+ var r, n, a = W(e, t);
330
+ if (Object.getOwnPropertySymbols) {
331
+ var o = Object.getOwnPropertySymbols(e);
332
+ for (n = 0; n < o.length; n++) {
333
+ r = o[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
334
+ }
335
+ }
336
+ return a;
233
337
  }
234
- return r;
235
- }
236
- var W = {
237
- append: o().bool,
238
- elementRef: o().oneOfType([ o().func, o().object ]),
239
- /** @private */
240
- error: o().bool,
241
- /** @private */
242
- noBorder: o().bool,
243
- /** @private. Call back function when activated. */
244
- onClick: o().func,
245
- prepend: o().bool,
246
- value: o().string,
247
- /** @private */
248
- showSelected: o().bool
249
- };
250
- var X = n().forwardRef((function(e, t) {
251
- var r = e.append, a = e.error, o = a === void 0 ? false : a, l = e.onClick, i = e.prepend, s = e.value, u = e.noBorder, c = e.showSelected, p = L(e, [ "append", "error", "onClick", "prepend", "value", "noBorder", "showSelected" ]);
252
- var d = s === null || s === undefined ? (0, _._)("No color") : s;
253
- // Only valid hexadecimal strings, 'transparent' and `null` are allowed for background colors
254
- // Invalid values are converted to `undefined`
255
- var f = s;
256
- if (!(typeof f === "string" && ((0, O.isValidHexColor)(f) || f === "transparent")) && f !== null && f !== undefined) {
257
- f = undefined;
338
+ function W(e, t) {
339
+ if (null == e) return {};
340
+ var r = {};
341
+ for (var n in e) {
342
+ if ({}.hasOwnProperty.call(e, n)) {
343
+ if (t.includes(n)) continue;
344
+ r[n] = e[n];
345
+ }
346
+ }
347
+ return r;
258
348
  }
259
-
260
- return n().createElement(F, M({
261
- onClick: function e(t) {
262
- return l === null || l === void 0 ? void 0 : l(t, {
263
- value: s
264
- });
265
- },
266
- ref: t,
267
- $value: f,
268
- $append: r,
269
- $prepend: i,
270
- $hasError: o,
271
- $noBorder: u,
272
- $showSelected: c,
273
- "data-test": "swatch",
274
- "data-test-value": s
275
- }, p), c && n().createElement(K, {
276
- "aria-label": (0, _._)("Selected"),
277
- role: "presentation"
278
- }), n().createElement(V(), null, d));
279
- }));
280
- X.propTypes = W;
281
- /* harmony default export */ const G = X;
282
- // CONCATENATED MODULE: ./src/Color/ColorStyles.ts
283
- var J = I().div.withConfig({
284
- displayName: "ColorStyles__StyledColor",
285
- componentId: "jxrost-0"
286
- })([ "", ";flex-direction:row;" ], P.mixins.reset("flex"));
287
- var Q = I()(G).withConfig({
288
- displayName: "ColorStyles__StyledInputSwatch",
289
- componentId: "jxrost-1"
290
- })([ "", ";" ], (0, P.pick)({
291
- compact: (0, j.css)([ "width:28px;height:28px;" ])
292
- }));
293
- var Y = I().div.withConfig({
294
- displayName: "ColorStyles__StyledInput",
295
- componentId: "jxrost-2"
296
- })([ "", ";", "" ], (0, P.pick)({
297
- enterprise: (0, j.css)([ "display:flex;" ]),
298
- prisma: (0, j.css)([ "position:relative;" ])
299
- }), (function(e) {
300
- var t = e.$inDropdown;
301
- return t ? (0, j.css)([ "width:", ";" ], (0, P.pick)({
302
- enterprise: "100%",
303
- prisma: "80px"
304
- })) : (0, j.css)([ "flex:0 1 auto;min-width:0;" ]);
305
- }));
306
- var Z = I()(R()).withConfig({
307
- displayName: "ColorStyles__StyledInputText",
308
- componentId: "jxrost-3"
309
- })([ "", "" ], (function(e) {
310
- var t = e.$inDropdown;
311
- return t && (0, j.css)([ "font-size:12px;" ]);
312
- }));
313
- var ee = I()(G).withConfig({
314
- displayName: "ColorStyles__StyledToggleSwatch",
315
- componentId: "jxrost-4"
316
- })([ "", "" ], (0, P.pick)({
317
- prisma: {
318
- comfortable: (0, j.css)([ "width:40px;height:40px;" ]),
319
- compact: (0, j.css)([ "width:32px;height:32px;" ])
320
- },
321
- enterprise: {
322
- comfortable: (0, j.css)([ "width:32px;height:32px;" ]),
349
+ var X = {
350
+ append: o().bool,
351
+ elementRef: o().oneOfType([ o().func, o().object ]),
352
+ /** @private */
353
+ error: o().bool,
354
+ /** @private */
355
+ noBorder: o().bool,
356
+ /** @private. Call back function when activated. */
357
+ onClick: o().func,
358
+ prepend: o().bool,
359
+ value: o().string,
360
+ /** @private */
361
+ showSelected: o().bool
362
+ };
363
+ var G = t().forwardRef((function(e, r) {
364
+ var n = e.append, a = e.error, o = a === void 0 ? false : a, l = e.onClick, i = e.prepend, s = e.value, u = e.noBorder, c = e.showSelected, p = U(e, [ "append", "error", "onClick", "prepend", "value", "noBorder", "showSelected" ]);
365
+ var d = s === null || s === undefined ? (0, I._)("No color") : s;
366
+ // Only valid hexadecimal strings, 'transparent' and `null` are allowed for background colors
367
+ // Invalid values are converted to `undefined`
368
+ var f = s;
369
+ if (!(typeof f === "string" && ((0, O.isValidHexColor)(f) || f === "transparent")) && f !== null && f !== undefined) {
370
+ f = undefined;
371
+ }
372
+
373
+ return t().createElement(M, L({
374
+ onClick: function e(t) {
375
+ return l === null || l === void 0 ? void 0 : l(t, {
376
+ value: s
377
+ });
378
+ },
379
+ ref: r,
380
+ $value: f,
381
+ $append: n,
382
+ $prepend: i,
383
+ $hasError: o,
384
+ $noBorder: u,
385
+ $showSelected: c,
386
+ "data-test": "swatch",
387
+ "data-test-value": s
388
+ }, p), c && t().createElement(F, {
389
+ "aria-label": (0, I._)("Selected"),
390
+ role: "presentation"
391
+ }), t().createElement(V(), null, d));
392
+ }));
393
+ G.propTypes = X;
394
+ /* harmony default export */ const J = G;
395
+ // CONCATENATED MODULE: ./src/Color/ColorStyles.ts
396
+ var Q = T().div.withConfig({
397
+ displayName: "ColorStyles__StyledColor",
398
+ componentId: "jxrost-0"
399
+ })([ "", ";flex-direction:row;" ], E.mixins.reset("flex"));
400
+ var Y = T()(J).withConfig({
401
+ displayName: "ColorStyles__StyledInputSwatch",
402
+ componentId: "jxrost-1"
403
+ })([ "", ";" ], (0, E.pick)({
323
404
  compact: (0, j.css)([ "width:28px;height:28px;" ])
405
+ }));
406
+ var Z = T().div.withConfig({
407
+ displayName: "ColorStyles__StyledInput",
408
+ componentId: "jxrost-2"
409
+ })([ "", ";", "" ], (0, E.pick)({
410
+ enterprise: (0, j.css)([ "display:flex;" ]),
411
+ prisma: (0, j.css)([ "position:relative;" ])
412
+ }), (function(e) {
413
+ var t = e.$inDropdown;
414
+ return t ? (0, j.css)([ "width:", ";" ], (0, E.pick)({
415
+ enterprise: "100%",
416
+ prisma: "80px"
417
+ })) : (0, j.css)([ "flex:0 1 auto;min-width:0;" ]);
418
+ }));
419
+ var ee = T()(B()).withConfig({
420
+ displayName: "ColorStyles__StyledInputText",
421
+ componentId: "jxrost-3"
422
+ })([ "", "" ], (function(e) {
423
+ var t = e.$inDropdown;
424
+ return t && (0, j.css)([ "font-size:12px;" ]);
425
+ }));
426
+ var te = T()(J).withConfig({
427
+ displayName: "ColorStyles__StyledToggleSwatch",
428
+ componentId: "jxrost-4"
429
+ })([ "", "" ], (0, E.pick)({
430
+ prisma: {
431
+ comfortable: (0, j.css)([ "width:40px;height:40px;" ]),
432
+ compact: (0, j.css)([ "width:32px;height:32px;" ])
433
+ },
434
+ enterprise: {
435
+ comfortable: (0, j.css)([ "width:32px;height:32px;" ]),
436
+ compact: (0, j.css)([ "width:28px;height:28px;" ])
437
+ }
438
+ }));
439
+ // CONCATENATED MODULE: external "@splunk/react-icons/ChevronDown"
440
+ const re = require("@splunk/react-icons/ChevronDown");
441
+ var ne = r.n(re);
442
+ // CONCATENATED MODULE: external "@splunk/react-ui/Divider"
443
+ const ae = require("@splunk/react-ui/Divider");
444
+ var oe = r.n(ae);
445
+ // CONCATENATED MODULE: ./src/Color/PaletteStyles.ts
446
+ var le = T().div.withConfig({
447
+ displayName: "PaletteStyles__StyledPalette",
448
+ componentId: "qgv9v9-0"
449
+ })([ "width:220px;padding:", ";" ], E.variables.spacingSmall);
450
+ var ie = T().ul.withConfig({
451
+ displayName: "PaletteStyles__StyledSwatches",
452
+ componentId: "qgv9v9-1"
453
+ })([ "", ";", "" ], E.mixins.reset("block"), (0, E.pick)({
454
+ enterprise: (0, j.css)([ "margin-bottom:", ";" ], E.variables.spacingXSmall)
455
+ }));
456
+ var se = T().li.withConfig({
457
+ displayName: "PaletteStyles__StyledSwatch",
458
+ componentId: "qgv9v9-2"
459
+ })([ "", ";margin-right:4px;margin-bottom:4px;vertical-align:top;", "" ], E.mixins.reset("inline-block"), (0,
460
+ E.pick)({
461
+ enterprise: {
462
+ compact: (0, j.css)([ "&:nth-child(8n){margin-right:0;}" ])
463
+ },
464
+ prisma: (0, j.css)([ "&:nth-child(8n){margin-right:0;}" ])
465
+ }));
466
+ var ue = T().div.withConfig({
467
+ displayName: "PaletteStyles__StyledToolBar",
468
+ componentId: "qgv9v9-3"
469
+ })([ "position:relative;display:flex;align-items:center;padding:0;margin-top:", ";", " gap:4px;" ], E.variables.spacingSmall, (0,
470
+ E.pick)({
471
+ enterprise: (0, j.css)([ "margin-bottom:", ";" ], E.variables.spacingSmall)
472
+ }));
473
+ var ce = T()(H()).withConfig({
474
+ displayName: "PaletteStyles__StyledExpandButton",
475
+ componentId: "qgv9v9-4"
476
+ })([ "position:absolute;bottom:4px;right:4px;padding:2px 4px;border-radius:2px;&:focus{box-shadow:", ";}", "" ], E.variables.focusShadow, (function(e) {
477
+ var t = e.$expanded;
478
+ return t && (0, j.css)([ "transform:rotate(180deg);" ]);
479
+ }));
480
+ var pe = T().div.withConfig({
481
+ displayName: "PaletteStyles__StyledSystemColorPickerWrapper",
482
+ componentId: "qgv9v9-5"
483
+ })([ "position:relative;" ]);
484
+ var de = T().input.withConfig({
485
+ displayName: "PaletteStyles__StyledSystemColorPicker",
486
+ componentId: "qgv9v9-6"
487
+ })([ "box-sizing:border-box;", " ", ";", ";outline:none;appearance:none;padding:1px 10px;", " margin:0;background:conic-gradient( #ef3434,#ef9a34,#deef34,#78ef34,#34ef56,#34efbc,#34bcef,#3456ef,#7834ef,#de34ef,#ef349a,#ef3434 );background-repeat:no-repeat;cursor:pointer;&::-webkit-color-swatch{border:none;border-radius:2px;}&::-moz-color-swatch{opacity:0;}&:focus{box-shadow:", ";}" ], (0,
488
+ E.pick)({
489
+ enterprise: {
490
+ comfortable: (0, j.css)([ "width:32px;height:32px;" ]),
491
+ compact: (0, j.css)([ "width:24px;height:24px;" ])
492
+ },
493
+ prisma: (0, j.css)([ "width:24px;height:24px;" ])
494
+ }), (0, E.pick)({
495
+ enterprise: {
496
+ light: (0, j.css)([ "border:1px solid ", ";" ], E.variables.gray60),
497
+ dark: (0, j.css)([ "border:1px solid ", ";" ], E.variables.borderColor)
498
+ },
499
+ prisma: (0, j.css)([ "border:none;" ])
500
+ }), (0, E.pick)({
501
+ prisma: (0, j.css)([ "border-radius:2px;" ])
502
+ }), (0, E.pick)({
503
+ enterprise: {
504
+ comfortable: (0, j.css)([ "padding:1px 14px;" ])
505
+ }
506
+ }), E.variables.focusShadow);
507
+ var fe = T()(N()).withConfig({
508
+ displayName: "PaletteStyles__StyledCheck",
509
+ componentId: "qgv9v9-7"
510
+ })([ "box-sizing:border-box;color:#d3d3d3;height:100%;width:100%;position:absolute;top:0;left:0;pointer-events:none;" ]);
511
+ // CONCATENATED MODULE: ./src/Color/Palette.tsx
512
+ function ve(e, t) {
513
+ if (null == e) return {};
514
+ var r, n, a = he(e, t);
515
+ if (Object.getOwnPropertySymbols) {
516
+ var o = Object.getOwnPropertySymbols(e);
517
+ for (n = 0; n < o.length; n++) {
518
+ r = o[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
519
+ }
520
+ }
521
+ return a;
324
522
  }
325
- }));
326
- // CONCATENATED MODULE: external "@splunk/react-icons/ChevronDown"
327
- const te = require("@splunk/react-icons/ChevronDown");
328
- var re = e.n(te);
329
- // CONCATENATED MODULE: external "@splunk/react-ui/Divider"
330
- const ne = require("@splunk/react-ui/Divider");
331
- var ae = e.n(ne);
332
- // CONCATENATED MODULE: ./src/Color/PaletteStyles.ts
333
- var oe = I().div.withConfig({
334
- displayName: "PaletteStyles__StyledPalette",
335
- componentId: "qgv9v9-0"
336
- })([ "width:220px;padding:", ";" ], P.variables.spacingSmall);
337
- var le = I().ul.withConfig({
338
- displayName: "PaletteStyles__StyledSwatches",
339
- componentId: "qgv9v9-1"
340
- })([ "", ";", "" ], P.mixins.reset("block"), (0, P.pick)({
341
- enterprise: (0, j.css)([ "margin-bottom:", ";" ], P.variables.spacingXSmall)
342
- }));
343
- var ie = I().li.withConfig({
344
- displayName: "PaletteStyles__StyledSwatch",
345
- componentId: "qgv9v9-2"
346
- })([ "", ";margin-right:4px;margin-bottom:4px;vertical-align:top;", "" ], P.mixins.reset("inline-block"), (0,
347
- P.pick)({
348
- enterprise: {
349
- compact: (0, j.css)([ "&:nth-child(8n){margin-right:0;}" ])
350
- },
351
- prisma: (0, j.css)([ "&:nth-child(8n){margin-right:0;}" ])
352
- }));
353
- var se = I().div.withConfig({
354
- displayName: "PaletteStyles__StyledToolBar",
355
- componentId: "qgv9v9-3"
356
- })([ "position:relative;display:flex;align-items:center;padding:0;margin-top:", ";", " gap:4px;" ], P.variables.spacingSmall, (0,
357
- P.pick)({
358
- enterprise: (0, j.css)([ "margin-bottom:", ";" ], P.variables.spacingSmall)
359
- }));
360
- var ue = I()($()).withConfig({
361
- displayName: "PaletteStyles__StyledExpandButton",
362
- componentId: "qgv9v9-4"
363
- })([ "position:absolute;bottom:4px;right:4px;padding:2px 4px;border-radius:2px;&:focus{box-shadow:", ";}", "" ], P.variables.focusShadow, (function(e) {
364
- var t = e.$expanded;
365
- return t && (0, j.css)([ "transform:rotate(180deg);" ]);
366
- }));
367
- var ce = I().div.withConfig({
368
- displayName: "PaletteStyles__StyledSystemColorPickerWrapper",
369
- componentId: "qgv9v9-5"
370
- })([ "position:relative;" ]);
371
- var pe = I().input.withConfig({
372
- displayName: "PaletteStyles__StyledSystemColorPicker",
373
- componentId: "qgv9v9-6"
374
- })([ "box-sizing:border-box;", " ", ";", ";outline:none;appearance:none;padding:1px 10px;", " margin:0;background:conic-gradient( #ef3434,#ef9a34,#deef34,#78ef34,#34ef56,#34efbc,#34bcef,#3456ef,#7834ef,#de34ef,#ef349a,#ef3434 );background-repeat:no-repeat;cursor:pointer;&::-webkit-color-swatch{border:none;border-radius:2px;}&::-moz-color-swatch{opacity:0;}&:focus{box-shadow:", ";}" ], (0,
375
- P.pick)({
376
- enterprise: {
377
- comfortable: (0, j.css)([ "width:32px;height:32px;" ]),
378
- compact: (0, j.css)([ "width:24px;height:24px;" ])
379
- },
380
- prisma: (0, j.css)([ "width:24px;height:24px;" ])
381
- }), (0, P.pick)({
382
- enterprise: {
383
- light: (0, j.css)([ "border:1px solid ", ";" ], P.variables.gray60),
384
- dark: (0, j.css)([ "border:1px solid ", ";" ], P.variables.borderColor)
385
- },
386
- prisma: (0, j.css)([ "border:none;" ])
387
- }), (0, P.pick)({
388
- prisma: (0, j.css)([ "border-radius:2px;" ])
389
- }), (0, P.pick)({
390
- enterprise: {
391
- comfortable: (0, j.css)([ "padding:1px 14px;" ])
523
+ function he(e, t) {
524
+ if (null == e) return {};
525
+ var r = {};
526
+ for (var n in e) {
527
+ if ({}.hasOwnProperty.call(e, n)) {
528
+ if (t.includes(n)) continue;
529
+ r[n] = e[n];
530
+ }
531
+ }
532
+ return r;
392
533
  }
393
- }), P.variables.focusShadow);
394
- var de = I()(D()).withConfig({
395
- displayName: "PaletteStyles__StyledCheck",
396
- componentId: "qgv9v9-7"
397
- })([ "box-sizing:border-box;color:#d3d3d3;height:100%;width:100%;position:absolute;top:0;left:0;pointer-events:none;" ]);
398
- // CONCATENATED MODULE: ./src/Color/Palette.tsx
399
- function fe(e) {
400
- var t = e.expanded, r = e.palette, a = e.value, o = e.swatchToFocusRef, l = e.onSwatchClick, i = e.expandButtonRef, s = e.onPaletteExpand, c = e.onSystemColorPickerChange, p = e.renderInput;
401
- var d = (0, P.useSplunkTheme)(), f = d.isPrisma, v = d.isLight;
402
- var m = u()(r.map((function(e) {
403
- return e && g()(e);
404
- })), a);
405
- var y = r.map((function(e, t) {
406
- var r = e === null ? null : g()(e);
407
- var i = r === a;
408
- var s = !m && t === 0 || m && i;
409
-
410
- return n().createElement(ie, {
411
- key: r || "null"
412
- }, n().createElement(G, {
413
- value: r,
414
- ref: s ? o : null,
415
- onClick: l,
416
- noBorder: f,
417
- showSelected: i
534
+ function be(e) {
535
+ var r = e.expanded, n = e.palette, a = e.value, o = e.swatchToFocusRef, l = e.onSwatchClick, i = e.expandButtonRef, s = e.onPaletteExpand, c = e.onSystemColorPickerChange, p = e.renderInput, d = e.disabled, f = ve(e, [ "expanded", "palette", "value", "swatchToFocusRef", "onSwatchClick", "expandButtonRef", "onPaletteExpand", "onSystemColorPickerChange", "renderInput", "disabled" ]);
536
+ var v = (0, E.useSplunkTheme)(), b = v.isPrisma, m = v.isLight;
537
+ var y = u()(n.map((function(e) {
538
+ return e && g()(e);
539
+ })), a);
540
+ var x = n.map((function(e, r) {
541
+ var n = e === null ? null : g()(e);
542
+ var i = n === a;
543
+ var s = !y && r === 0 || y && i;
544
+
545
+ return t().createElement(se, {
546
+ key: n || "null"
547
+ }, t().createElement(J, {
548
+ value: n,
549
+ ref: s ? o : null,
550
+ onClick: l,
551
+ noBorder: b,
552
+ showSelected: i,
553
+ disabled: d
554
+ }));
418
555
  }));
419
- }));
420
- var b = function e() {
421
- var t = !m && a !== "#ffffff" && a !== "#000000" && a !== null && a !== "";
422
-
423
- return n().createElement(se, {
424
- "data-test": "tool-bar"
425
- }, f && n().createElement(P.SplunkThemeProvider, {
426
- density: "compact"
427
- }, p && p()), n().createElement(G, {
428
- value: null,
429
- ref: a === null ? o : null,
430
- onClick: l,
431
- noBorder: f && !v,
432
- showSelected: a === null
433
- }), n().createElement(G, {
434
- value: "#ffffff",
435
- ref: a === "#ffffff" ? o : null,
436
- onClick: l,
437
- noBorder: f && !v,
438
- showSelected: a === "#ffffff"
439
- }), n().createElement(G, {
440
- value: "#000000",
441
- ref: a === "#000000" ? o : null,
442
- onClick: l,
443
- noBorder: f,
444
- showSelected: a === "#000000"
445
- }), n().createElement(ce, null, n().createElement(pe, {
446
- type: "color",
447
- value: a === null ? "" : a,
448
- onChange: c,
449
- ref: t ? o : null
450
- }), t && n().createElement(de, {
451
- "aria-label": (0, _._)("Selected"),
452
- role: "presentation"
453
- })));
454
- };
455
- var x = y.length === 8 ? 7 : 15;
456
- var S = h()(y, 0, x);
457
- var w = h()(y, x);
458
- if (f) {
556
+ var w = function e() {
557
+ var r = !y && a !== "#ffffff" && a !== "#000000" && a !== null && a !== "";
558
+
559
+ return t().createElement(ue, {
560
+ "data-test": "tool-bar"
561
+ }, b && t().createElement(E.SplunkThemeProvider, {
562
+ density: "compact"
563
+ }, p && p()), t().createElement(J, {
564
+ value: null,
565
+ ref: a === null ? o : null,
566
+ onClick: l,
567
+ noBorder: b && !m,
568
+ showSelected: a === null,
569
+ disabled: d
570
+ }), t().createElement(J, {
571
+ value: "#ffffff",
572
+ ref: a === "#ffffff" ? o : null,
573
+ onClick: l,
574
+ noBorder: b && !m,
575
+ showSelected: a === "#ffffff",
576
+ disabled: d
577
+ }), t().createElement(J, {
578
+ value: "#000000",
579
+ ref: a === "#000000" ? o : null,
580
+ onClick: l,
581
+ noBorder: b,
582
+ showSelected: a === "#000000",
583
+ disabled: d
584
+ }), t().createElement(pe, null, t().createElement(de, {
585
+ type: "color",
586
+ value: a === null ? "" : a,
587
+ onChange: c,
588
+ ref: r ? o : null,
589
+ disabled: d
590
+ }), r && t().createElement(fe, {
591
+ "aria-label": (0, I._)("Selected"),
592
+ role: "presentation"
593
+ })));
594
+ };
595
+ var S = x.length === 8 ? 7 : 15;
596
+ var C = h()(x, 0, S);
597
+ var k = h()(x, S);
598
+ if (b) {
599
+
600
+ return t().createElement(le, f, t().createElement("div", {
601
+ style: {
602
+ position: "relative"
603
+ }
604
+ }, t().createElement(ie, null, C, r && k), r && w(), t().createElement(ce, {
605
+ ref: i,
606
+ $expanded: r,
607
+ onClick: s,
608
+ "data-test": "expand-button"
609
+ }, t().createElement(ne(), null))));
610
+ }
459
611
 
460
- return n().createElement(oe, null, n().createElement("div", {
461
- style: {
462
- position: "relative"
463
- }
464
- }, n().createElement(le, null, S, t && w), t && b(), n().createElement(ue, {
465
- ref: i,
466
- $expanded: t,
467
- onClick: s,
468
- "data-test": "expand-button"
469
- }, n().createElement(re(), null))));
612
+ return t().createElement(le, f, t().createElement(ie, null, x), t().createElement(oe(), null), w(), p && p());
470
613
  }
471
-
472
- return n().createElement(oe, null, n().createElement(le, null, y), n().createElement(ae(), null), b(), p && p());
473
- }
474
- /* harmony default export */ const ve = fe;
475
- // CONCATENATED MODULE: ./src/Color/Color.tsx
476
- function he(e) {
477
- "@babel/helpers - typeof";
478
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
479
- he = function e(t) {
480
- return typeof t;
481
- };
482
- } else {
483
- he = function e(t) {
484
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
485
- };
614
+ /* harmony default export */ const me = be;
615
+ // EXTERNAL MODULE: ./src/ScreenReaderContent/index.ts + 2 modules
616
+ var ye = r(6165);
617
+ // CONCATENATED MODULE: ./src/Color/Color.tsx
618
+ function ge(e) {
619
+ "@babel/helpers - typeof";
620
+ return ge = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
621
+ return typeof e;
622
+ } : function(e) {
623
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
624
+ }, ge(e);
486
625
  }
487
- return he(e);
488
- }
489
- function me() {
490
- me = Object.assign || function(e) {
491
- for (var t = 1; t < arguments.length; t++) {
492
- var r = arguments[t];
493
- for (var n in r) {
494
- if (Object.prototype.hasOwnProperty.call(r, n)) {
495
- e[n] = r[n];
626
+ function xe() {
627
+ return xe = Object.assign ? Object.assign.bind() : function(e) {
628
+ for (var t = 1; t < arguments.length; t++) {
629
+ var r = arguments[t];
630
+ for (var n in r) {
631
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
496
632
  }
497
633
  }
498
- }
499
- return e;
500
- };
501
- return me.apply(this, arguments);
502
- }
503
- function ye(e) {
504
- return Se(e) || xe(e) || ge(e) || be();
505
- }
506
- function be() {
507
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
508
- }
509
- function ge(e, t) {
510
- if (!e) return;
511
- if (typeof e === "string") return we(e, t);
512
- var r = Object.prototype.toString.call(e).slice(8, -1);
513
- if (r === "Object" && e.constructor) r = e.constructor.name;
514
- if (r === "Map" || r === "Set") return Array.from(e);
515
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return we(e, t);
516
- }
517
- function xe(e) {
518
- if (typeof Symbol !== "undefined" && Symbol.iterator in Object(e)) return Array.from(e);
519
- }
520
- function Se(e) {
521
- if (Array.isArray(e)) return we(e);
522
- }
523
- function we(e, t) {
524
- if (t == null || t > e.length) t = e.length;
525
- for (var r = 0, n = new Array(t); r < t; r++) {
526
- n[r] = e[r];
634
+ return e;
635
+ }, xe.apply(null, arguments);
527
636
  }
528
- return n;
529
- }
530
- function ke(e, t) {
531
- if (e == null) return {};
532
- var r = Ce(e, t);
533
- var n, a;
534
- if (Object.getOwnPropertySymbols) {
535
- var o = Object.getOwnPropertySymbols(e);
536
- for (a = 0; a < o.length; a++) {
537
- n = o[a];
538
- if (t.indexOf(n) >= 0) continue;
539
- if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
540
- r[n] = e[n];
637
+ function we(e) {
638
+ return Pe(e) || ke(e) || Ce(e) || Se();
639
+ }
640
+ function Se() {
641
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
642
+ }
643
+ function Ce(e, t) {
644
+ if (e) {
645
+ if ("string" == typeof e) return Ee(e, t);
646
+ var r = {}.toString.call(e).slice(8, -1);
647
+ return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ee(e, t) : void 0;
541
648
  }
542
649
  }
543
- return r;
544
- }
545
- function Ce(e, t) {
546
- if (e == null) return {};
547
- var r = {};
548
- var n = Object.keys(e);
549
- var a, o;
550
- for (o = 0; o < n.length; o++) {
551
- a = n[o];
552
- if (t.indexOf(a) >= 0) continue;
553
- r[a] = e[a];
650
+ function ke(e) {
651
+ if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e);
554
652
  }
555
- return r;
556
- }
557
- function Ee(e, t) {
558
- if (!(e instanceof t)) {
559
- throw new TypeError("Cannot call a class as a function");
653
+ function Pe(e) {
654
+ if (Array.isArray(e)) return Ee(e);
560
655
  }
561
- }
562
- function Pe(e, t) {
563
- for (var r = 0; r < t.length; r++) {
564
- var n = t[r];
565
- n.enumerable = n.enumerable || false;
566
- n.configurable = true;
567
- if ("value" in n) n.writable = true;
568
- Object.defineProperty(e, n.key, n);
656
+ function Ee(e, t) {
657
+ (null == t || t > e.length) && (t = e.length);
658
+ for (var r = 0, n = Array(t); r < t; r++) {
659
+ n[r] = e[r];
660
+ }
661
+ return n;
569
662
  }
570
- }
571
- function Oe(e, t, r) {
572
- if (t) Pe(e.prototype, t);
573
- if (r) Pe(e, r);
574
- return e;
575
- }
576
- function _e(e, t) {
577
- if (typeof t !== "function" && t !== null) {
578
- throw new TypeError("Super expression must either be null or a function");
663
+ function Oe(e, t) {
664
+ if (null == e) return {};
665
+ var r, n, a = Ie(e, t);
666
+ if (Object.getOwnPropertySymbols) {
667
+ var o = Object.getOwnPropertySymbols(e);
668
+ for (n = 0; n < o.length; n++) {
669
+ r = o[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
670
+ }
671
+ }
672
+ return a;
579
673
  }
580
- e.prototype = Object.create(t && t.prototype, {
581
- constructor: {
582
- value: e,
583
- writable: true,
584
- configurable: true
674
+ function Ie(e, t) {
675
+ if (null == e) return {};
676
+ var r = {};
677
+ for (var n in e) {
678
+ if ({}.hasOwnProperty.call(e, n)) {
679
+ if (t.includes(n)) continue;
680
+ r[n] = e[n];
681
+ }
585
682
  }
586
- });
587
- if (t) qe(e, t);
588
- }
589
- function qe(e, t) {
590
- qe = Object.setPrototypeOf || function e(t, r) {
591
- t.__proto__ = r;
592
- return t;
593
- };
594
- return qe(e, t);
595
- }
596
- function je(e) {
597
- var t = Re();
598
- return function r() {
599
- var n = Be(e), a;
600
- if (t) {
601
- var o = Be(this).constructor;
602
- a = Reflect.construct(n, arguments, o);
603
- } else {
604
- a = n.apply(this, arguments);
683
+ return r;
684
+ }
685
+ function _e(e, t) {
686
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
687
+ }
688
+ function qe(e, t) {
689
+ for (var r = 0; r < t.length; r++) {
690
+ var n = t[r];
691
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
692
+ Object.defineProperty(e, He(n.key), n);
605
693
  }
606
- return Ie(this, a);
607
- };
608
- }
609
- function Ie(e, t) {
610
- if (t && (he(t) === "object" || typeof t === "function")) {
611
- return t;
612
694
  }
613
- return Te(e);
614
- }
615
- function Te(e) {
616
- if (e === void 0) {
617
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
695
+ function je(e, t, r) {
696
+ return t && qe(e.prototype, t), r && qe(e, r), Object.defineProperty(e, "prototype", {
697
+ writable: !1
698
+ }), e;
618
699
  }
619
- return e;
620
- }
621
- function Re() {
622
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
623
- if (Reflect.construct.sham) return false;
624
- if (typeof Proxy === "function") return true;
625
- try {
626
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
627
- return true;
628
- } catch (e) {
629
- return false;
700
+ function Te(e, t) {
701
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
702
+ e.prototype = Object.create(t && t.prototype, {
703
+ constructor: {
704
+ value: e,
705
+ writable: !0,
706
+ configurable: !0
707
+ }
708
+ }), Object.defineProperty(e, "prototype", {
709
+ writable: !1
710
+ }), t && Re(e, t);
630
711
  }
631
- }
632
- function Be(e) {
633
- Be = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
634
- return t.__proto__ || Object.getPrototypeOf(t);
635
- };
636
- return Be(e);
637
- }
638
- function Ve(e, t, r) {
639
- if (t in e) {
640
- Object.defineProperty(e, t, {
712
+ function Re(e, t) {
713
+ return Re = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
714
+ return e.__proto__ = t, e;
715
+ }, Re(e, t);
716
+ }
717
+ function Be(e) {
718
+ var t = Ae();
719
+ return function() {
720
+ var r, n = Ne(e);
721
+ if (t) {
722
+ var a = Ne(this).constructor;
723
+ r = Reflect.construct(n, arguments, a);
724
+ } else r = n.apply(this, arguments);
725
+ return De(this, r);
726
+ };
727
+ }
728
+ function De(e, t) {
729
+ if (t && ("object" == ge(t) || "function" == typeof t)) return t;
730
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
731
+ return Ve(e);
732
+ }
733
+ function Ve(e) {
734
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
735
+ return e;
736
+ }
737
+ function Ae() {
738
+ try {
739
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
740
+ } catch (e) {}
741
+ return (Ae = function t() {
742
+ return !!e;
743
+ })();
744
+ }
745
+ function Ne(e) {
746
+ return Ne = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
747
+ return e.__proto__ || Object.getPrototypeOf(e);
748
+ }, Ne(e);
749
+ }
750
+ function $e(e, t, r) {
751
+ return (t = He(t)) in e ? Object.defineProperty(e, t, {
641
752
  value: r,
642
- enumerable: true,
643
- configurable: true,
644
- writable: true
645
- });
646
- } else {
647
- e[t] = r;
753
+ enumerable: !0,
754
+ configurable: !0,
755
+ writable: !0
756
+ }) : e[t] = r, e;
648
757
  }
649
- return e;
650
- }
651
- // The default palette in Prisma theme.
652
- var Ae = [ "#912344", "#D44C20", "#C0891E", "#26AA92", "#2F8AA7", "#2E49AA", "#602CA1", "#BA4ABD" ];
653
- var De = S()((function(e) {
654
- var t = [];
655
- for (var r = 1; r <= e.length * 4; r += 1) {
656
- var n = e[(r - 1) % e.length];
657
- if (r > e.length * 3) {
658
- t.push(n);
659
- } else {
660
- var a = 40 - 10 * (r / e.length);
661
- t.push(k()(n).lighten(a).toString());
758
+ function He(e) {
759
+ var t = ze(e, "string");
760
+ return "symbol" == ge(t) ? t : t + "";
761
+ }
762
+ function ze(e, t) {
763
+ if ("object" != ge(e) || !e) return e;
764
+ var r = e[Symbol.toPrimitive];
765
+ if (void 0 !== r) {
766
+ var n = r.call(e, t || "default");
767
+ if ("object" != ge(n)) return n;
768
+ throw new TypeError("@@toPrimitive must return a primitive value.");
662
769
  }
770
+ return ("string" === t ? String : Number)(e);
663
771
  }
664
- return t;
665
- }));
666
- // The tool palette in Prisma theme.
667
- var Ne = [ "#ffffff", "#000000", null ];
668
- var $e = {
669
- append: o().bool,
670
- defaultValue: o().string,
671
- describedBy: o().string,
672
- disabled: o().bool,
673
- elementRef: o().oneOfType([ o().func, o().object ]),
674
- error: o().bool,
675
- hideInput: o().bool,
676
- labelledBy: o().string,
677
- name: o().string,
678
- onChange: o().func,
679
- palette: o().array,
680
- prepend: o().bool,
681
- /** @private */
682
- required: o().bool,
683
- /** @private */
684
- splunkTheme: o().object,
685
- value: o().string
686
- };
687
- var He = {
688
- append: false,
689
- disabled: false,
690
- error: false,
691
- palette: De(Ae),
692
- prepend: false
693
- };
694
- // TODO: SUI-2551 Deprecate this in favor of ui-utils implementation
695
- var ze = function e(t) {
696
- return (0, O.isValidHexColor)(t);
697
- };
698
- var Ke = "N/A";
699
- var Fe = "n/a";
700
- /*
772
+ /** @public */
773
+ // The default palette in Prisma theme.
774
+ var Ke = [ "#912344", "#D44C20", "#C0891E", "#26AA92", "#2F8AA7", "#2E49AA", "#602CA1", "#BA4ABD" ];
775
+ var Fe = w()((function(e) {
776
+ var t = [];
777
+ for (var r = 1; r <= e.length * 4; r += 1) {
778
+ var n = e[(r - 1) % e.length];
779
+ if (r > e.length * 3) {
780
+ t.push(n);
781
+ } else {
782
+ var a = 40 - 10 * (r / e.length);
783
+ t.push(C()(n).lighten(a).toString());
784
+ }
785
+ }
786
+ return t;
787
+ }));
788
+ // The tool palette in Prisma theme.
789
+ var Me = [ "#ffffff", "#000000", null ];
790
+ var Le = {
791
+ append: o().bool,
792
+ defaultValue: o().string,
793
+ describedBy: o().string,
794
+ disabled: o().bool,
795
+ elementRef: o().oneOfType([ o().func, o().object ]),
796
+ error: o().bool,
797
+ hideInput: o().bool,
798
+ labelledBy: o().string,
799
+ name: o().string,
800
+ onChange: o().func,
801
+ palette: o().array,
802
+ prepend: o().bool,
803
+ /** @private */
804
+ required: o().bool,
805
+ /** @private */
806
+ splunkTheme: o().object,
807
+ value: o().string
808
+ };
809
+ var Ue = {
810
+ append: false,
811
+ disabled: false,
812
+ error: false,
813
+ palette: Fe(Ke),
814
+ prepend: false
815
+ };
816
+ // TODO: SUI-2551 Deprecate this in favor of ui-utils implementation
817
+ var We = function e(t) {
818
+ return (0, O.isValidHexColor)(t);
819
+ };
820
+ var Xe = "N/A";
821
+ var Ge = "n/a";
822
+ var Je = function e(t) {
823
+ if (g()(t) === Ge) {
824
+ return Xe;
825
+ }
826
+ if (g()(t) === "transparent") {
827
+ return "transparent";
828
+ }
829
+ // If the user types in the hexadecimal number without # in front,
830
+ // we add # automatically.
831
+ if (!m()(t, "#")) {
832
+ return (0, O.expandShortHandHex)("#".concat(t));
833
+ }
834
+ return (0, O.expandShortHandHex)(t);
835
+ };
836
+ /*
701
837
  * When the dropdown opens:
702
838
  * 1. If palette contains the color and the color is selected, the dropdown focus the color.
703
839
  * 2. If palette doesn't contain the color:
704
840
  * 1. If the current theme `family` is `prisma` the input receives focus.
705
841
  * 2. Otherwise the first color swatch receives focus.
706
- */ var Me = function(e) {
707
- _e(r, e);
708
- var t = je(r);
709
- Oe(r, null, [ {
710
- key: "hasNull",
711
- // @docs-props-type ColorPropsBase
712
- value: function e(t) {
713
- return t.some((function(e) {
714
- return e === null;
715
- }));
716
- }
717
- }, {
718
- key: "hasTransparent",
719
- value: function e(t) {
720
- return t.some((function(e) {
721
- return e !== null && g()(e) === "transparent";
722
- }));
723
- }
724
- } ]);
725
- function r(e) {
726
- var a;
727
- Ee(this, r);
728
- a = t.call(this, e);
729
- Ve(Te(a), "focusSwatch", void 0);
730
- Ve(Te(a), "focusExpandButton", void 0);
731
- Ve(Te(a), "controlledExternally", void 0);
732
- Ve(Te(a), "dropdown", null);
733
- Ve(Te(a), "handleSwatchClick", (function(e, t) {
734
- var r = t.value;
735
- e.preventDefault();
736
- var n = a.props, o = n.name, l = n.onChange;
737
- var i = a.getValue();
738
- var s = r !== i;
739
- var u = r === null ? Ke : r;
740
- if (!a.isControlled()) {
741
- a.setState({
742
- value: r
743
- });
842
+ */ var Qe = function(e) {
843
+ Te(n, e);
844
+ var r = Be(n);
845
+ je(n, null, [ {
846
+ key: "hasNull",
847
+ // @docs-props-type ColorPropsBase
848
+ value: function e(t) {
849
+ return t.some((function(e) {
850
+ return e === null;
851
+ }));
744
852
  }
745
- a.setState({
746
- displayValue: u,
747
- open: false
748
- });
749
- if (s) {
750
- l === null || l === void 0 ? void 0 : l({
751
- value: r,
752
- name: o
753
- });
853
+ }, {
854
+ key: "hasTransparent",
855
+ value: function e(t) {
856
+ return t.some((function(e) {
857
+ return e !== null && g()(e) === "transparent";
858
+ }));
754
859
  }
755
- a.focus();
756
- }));
757
- Ve(Te(a), "handlePaletteExpand", (function() {
758
- a.setState((function(e) {
759
- return {
760
- expanded: !e.expanded
761
- };
762
- }));
763
- }));
764
- Ve(Te(a), "handleTextChange", (function(e, t) {
765
- var r = t.value;
766
- a.setState({
767
- displayValue: r
768
- });
769
- }));
770
- Ve(Te(a), "handleTextKeyDown", (function(e) {
771
- if ((0, q.keycode)(e.nativeEvent) === "enter") {
860
+ } ]);
861
+ function n(e) {
862
+ var a;
863
+ _e(this, n);
864
+ a = r.call(this, e);
865
+ $e(Ve(a), "focusSwatch", void 0);
866
+ $e(Ve(a), "focusExpandButton", void 0);
867
+ $e(Ve(a), "controlledExternally", void 0);
868
+ $e(Ve(a), "dropdown", null);
869
+ $e(Ve(a), "swatchToggleReaderContentId", (0, q.createDOMID)("swatch-reader-content"));
870
+ $e(Ve(a), "hexInputReaderContentId", (0, q.createDOMID)("hex-input-reader-content"));
871
+ $e(Ve(a), "handleSwatchClick", (function(e, t) {
872
+ var r = t.value;
772
873
  e.preventDefault();
773
- a.handleRequestClose({
774
- reason: "enterKey"
874
+ var n = a.props, o = n.name, l = n.onChange;
875
+ var i = a.getValue();
876
+ var s = r !== i;
877
+ var u = r === null ? Xe : r;
878
+ if (!a.isControlled()) {
879
+ a.setState({
880
+ value: r
881
+ });
882
+ }
883
+ a.setState({
884
+ displayValue: u,
885
+ open: false
775
886
  });
887
+ if (s) {
888
+ l === null || l === void 0 ? void 0 : l({
889
+ value: r,
890
+ name: o
891
+ });
892
+ }
776
893
  a.focus();
777
- }
778
- }));
779
- Ve(Te(a), "handleButtonClick", (function(e) {
780
- e.preventDefault();
781
- a.handleRequestClose({
782
- reason: "buttonClick"
783
- });
784
- a.focus();
785
- }));
786
- Ve(Te(a), "handleRequestClose", (function(e) {
787
- var t = e.reason;
788
- var r = a.state.displayValue;
789
- var n = a.state.value;
790
- if (g()(r) === Fe) {
791
- r = Ke;
894
+ }));
895
+ $e(Ve(a), "handlePaletteExpand", (function() {
896
+ a.setState((function(e) {
897
+ return {
898
+ expanded: !e.expanded
899
+ };
900
+ }));
901
+ }));
902
+ $e(Ve(a), "handleTextChange", (function(e, t) {
903
+ var r = t.value;
792
904
  a.setState({
793
905
  displayValue: r
794
906
  });
795
- } else if (g()(r) === "transparent") {
796
- r = "transparent";
797
- a.setState({
798
- displayValue: r
907
+ }));
908
+ $e(Ve(a), "handleTextKeyDown", (function(e) {
909
+ if ((0, _.keycode)(e.nativeEvent) === "enter") {
910
+ e.preventDefault();
911
+ a.handleRequestClose({
912
+ reason: "enterKey"
913
+ });
914
+ a.focus();
915
+ }
916
+ }));
917
+ $e(Ve(a), "handleButtonClick", (function(e) {
918
+ e.preventDefault();
919
+ a.handleRequestClose({
920
+ reason: "buttonClick"
799
921
  });
800
- }
801
- // If the user types in the hexadecimal number without # in front,
802
- // we add # automatically.
803
- if (r !== Ke && g()(r) !== "transparent" && !y()(r, "#")) {
804
- r = "#".concat(r);
922
+ a.focus();
923
+ }));
924
+ $e(Ve(a), "handleRequestClose", (function(e) {
925
+ var t = e.reason;
926
+ var r = a.state, n = r.displayValue, o = r.value;
927
+ var l = Je(n);
805
928
  if (t === "escapeKey") {
806
- if (n == null) {
929
+ if (o == null) {
807
930
  a.setState({
808
- displayValue: Ke
931
+ displayValue: Xe
809
932
  });
810
933
  } else {
811
934
  a.setState({
812
- displayValue: n
935
+ displayValue: o
813
936
  });
814
937
  }
815
- } else {
938
+ }
939
+ if (t !== "contentClick") {
816
940
  a.setState({
817
- displayValue: r
941
+ open: false
818
942
  });
819
943
  }
820
- }
821
- if (t !== "contentClick") {
822
- a.setState({
823
- open: false
824
- });
825
- }
826
- if (t !== "escapeKey") {
827
- a.submitValue(r);
828
- }
829
- }));
830
- Ve(Te(a), "handleRequestOpen", (function() {
831
- var e = a.props, t = e.splunkTheme, r = e.palette;
832
- var n = t.isPrisma;
833
- var o = a.getValue();
834
- var l = o === null ? Ke : o;
835
- a.setState({
836
- displayValue: l,
837
- open: true
838
- }, (function() {
839
- if (a.focusSwatch.current && a.focusSwatch.current.focus) {
840
- a.focusSwatch.current.focus();
944
+ if (t !== "escapeKey") {
945
+ a.setState({
946
+ displayValue: l
947
+ });
948
+ a.submitValue(l);
841
949
  }
842
950
  }));
843
- var i = n ? h()(r, 15) : r;
844
- var s = !u()(r.map((function(e) {
845
- return e && g()(e);
846
- })), o);
847
- var c = s || u()(i.map((function(e) {
848
- return e && g()(e);
849
- })), o) || u()(Ne, o);
850
- if (c && !a.state.expanded) {
951
+ $e(Ve(a), "handleRequestOpen", (function() {
952
+ var e = a.props, t = e.splunkTheme, r = e.palette;
953
+ var n = t.isPrisma;
954
+ var o = a.getValue();
955
+ var l = o === null ? Xe : o;
851
956
  a.setState({
852
- expanded: true
853
- });
854
- }
855
- }));
856
- Ve(Te(a), "handleSystemColorPickerChange", (function(e) {
857
- var t = a.getValue();
858
- var r = e !== t;
859
- var n = a.props.name;
860
- var o = e === null ? Ke : e;
861
- if (!a.isControlled()) {
957
+ displayValue: l,
958
+ open: true
959
+ }, (function() {
960
+ if (a.focusSwatch.current && a.focusSwatch.current.focus) {
961
+ a.focusSwatch.current.focus();
962
+ }
963
+ }));
964
+ var i = n ? h()(r, 15) : r;
965
+ var s = !u()(r.map((function(e) {
966
+ return e && g()(e);
967
+ })), o);
968
+ var c = s || u()(i.map((function(e) {
969
+ return e && g()(e);
970
+ })), o) || u()(Me, o);
971
+ if (c && !a.state.expanded) {
972
+ a.setState({
973
+ expanded: true
974
+ });
975
+ }
976
+ }));
977
+ $e(Ve(a), "handleSystemColorPickerChange", (function(e) {
978
+ var t = a.getValue();
979
+ var r = e !== t;
980
+ var n = a.props.name;
981
+ var o = e === null ? Xe : e;
982
+ if (!a.isControlled()) {
983
+ a.setState({
984
+ value: e
985
+ });
986
+ }
862
987
  a.setState({
863
- value: e
864
- });
865
- }
866
- a.setState({
867
- displayValue: o
868
- });
869
- if (r) {
870
- var l, i;
871
- (l = (i = a.props).onChange) === null || l === void 0 ? void 0 : l.call(i, {
872
- value: e,
873
- name: n
988
+ displayValue: o
874
989
  });
990
+ if (r) {
991
+ var l, i;
992
+ (l = (i = a.props).onChange) === null || l === void 0 ? void 0 : l.call(i, {
993
+ value: e,
994
+ name: n
995
+ });
996
+ }
997
+ }));
998
+ a.focusSwatch = t().createRef();
999
+ a.focusExpandButton = t().createRef();
1000
+ a.controlledExternally = i()(e, "value");
1001
+ // value can be hexadecimal color, 'transparent' or null
1002
+ var o = a.controlledExternally ? (0, O.expandShortHandHex)(e.value) : (0,
1003
+ O.expandShortHandHex)(e.defaultValue);
1004
+ if (o !== null) {
1005
+ o = g()(o);
875
1006
  }
876
- }));
877
- a.focusSwatch = n().createRef();
878
- a.focusExpandButton = n().createRef();
879
- a.controlledExternally = i()(e, "value");
880
- // value can be hexadecimal color, 'transparent' or null
881
- var o = a.controlledExternally ? (0, O.expandShortHandHex)(e.value) : (0,
882
- O.expandShortHandHex)(e.defaultValue);
883
- if (o !== null) {
884
- o = g()(o);
885
- }
886
- // displayValue can be hexadecimal color or 'transparent' to represent 'transparent' or 'N/A' to represent null
887
- var l = o === null ? Ke : o;
888
- a.state = {
889
- displayValue: l,
890
- open: false,
891
- value: o,
892
- expanded: false
893
- };
894
- if (false) {}
895
- if (false) {
896
- var s;
897
- }
898
- return a;
899
- }
900
- Oe(r, [ {
901
- key: "componentDidUpdate",
902
- value: function e(t) {
903
- if (false) {}
1007
+ // displayValue can be hexadecimal color or 'transparent' to represent 'transparent' or 'N/A' to represent null
1008
+ var l = o === null ? Xe : o;
1009
+ a.state = {
1010
+ displayValue: l,
1011
+ open: false,
1012
+ value: o,
1013
+ expanded: false
1014
+ };
904
1015
  if (false) {}
1016
+ if (false) {
1017
+ var s;
1018
+ }
1019
+ return a;
905
1020
  }
906
- /**
1021
+ je(n, [ {
1022
+ key: "componentDidUpdate",
1023
+ value: function e(t) {
1024
+ if (false) {}
1025
+ if (false) {}
1026
+ }
1027
+ /**
907
1028
  * Standardizes the current value of the Color:
908
1029
  * returns based on the input being controlled or uncontrolled
909
1030
  * returns controlled component's value as formatted.
910
- */ }, {
911
- key: "getValue",
912
- value: function e() {
913
- var t = function e(t) {
914
- return t === null ? null : g()(t);
915
- };
916
- var r = (0, O.expandShortHandHex)(this.props.value);
917
- if (this.isControlled()) {
918
- return t(r);
919
- }
920
- return this.state.value;
921
- }
922
- }, {
923
- key: "submitValue",
924
- value: function e(t) {
925
- if (t) {
926
- var n = ze(t);
927
- if (!n && t !== "transparent" && t !== Ke) {
928
- // eslint-disable-next-line no-console
929
- console.warn('"'.concat(t, '" is not a valid hex color.'));
1031
+ */ }, {
1032
+ key: "getValue",
1033
+ value: function e() {
1034
+ var t = function e(t) {
1035
+ return t === null ? null : g()(t);
1036
+ };
1037
+ var r = (0, O.expandShortHandHex)(this.props.value);
1038
+ if (this.isControlled()) {
1039
+ return t(r);
930
1040
  }
931
- if (n || r.hasTransparent(this.props.palette) && t === "transparent" || t === Ke) {
932
- var a = (0, O.expandShortHandHex)(t);
933
- this.setState({
934
- displayValue: a
935
- });
936
- var o = t !== (this.props.value && g()(this.props.value));
937
- var l = this.props.name;
938
- var i = t === Ke ? null : t;
939
- var s = (0, O.expandShortHandHex)(i);
940
- if (t && !this.isControlled()) {
941
- this.setState({
942
- value: s
943
- });
1041
+ return this.state.value;
1042
+ }
1043
+ }, {
1044
+ key: "submitValue",
1045
+ value: function e(t) {
1046
+ if (t) {
1047
+ var r = We(t);
1048
+ if (!r && t !== "transparent" && t !== Xe) {
1049
+ // eslint-disable-next-line no-console
1050
+ console.warn('"'.concat(t, '" is not a valid hex color.'));
944
1051
  }
945
- if (o) {
946
- var u, c;
947
- (u = (c = this.props).onChange) === null || u === void 0 ? void 0 : u.call(c, {
948
- value: s,
949
- name: l
950
- });
1052
+ if (r || n.hasTransparent(this.props.palette) && t === "transparent" || t === Xe) {
1053
+ var a = t !== (this.props.value && g()(this.props.value));
1054
+ var o = this.props.name;
1055
+ var l = t === Xe ? null : t;
1056
+ var i = (0, O.expandShortHandHex)(l);
1057
+ if (t && !this.isControlled()) {
1058
+ this.setState({
1059
+ value: i
1060
+ });
1061
+ }
1062
+ if (a) {
1063
+ var s, u;
1064
+ (s = (u = this.props).onChange) === null || s === void 0 ? void 0 : s.call(u, {
1065
+ value: i,
1066
+ name: o
1067
+ });
1068
+ }
951
1069
  }
952
1070
  }
953
1071
  }
954
- }
955
- /**
1072
+ /**
956
1073
  * Place focus on the input.
957
- */ }, {
958
- key: "focus",
959
- value: function e() {
960
- var t;
961
- (t = this.dropdown) === null || t === void 0 ? void 0 : t.focus();
962
- }
963
- }, {
964
- key: "isControlled",
965
- value: function e() {
966
- return this.controlledExternally;
967
- }
968
- }, {
969
- key: "renderInput",
970
- value: function e(t) {
971
- var a = t.textAppend, o = t.textPrepend, l = t.textInline, i = t.inDropdown;
972
- var s = this.props, u = s.splunkTheme, c = s.required;
973
- var p = this.state.displayValue;
974
- var d = u.isPrisma;
975
- var f = r.hasTransparent(this.props.palette) && g()(p) === "transparent";
976
- var v = g()(p) === Fe;
977
- var h = p;
978
- if (!y()(p, "#")) {
979
- h = "#".concat(p);
1074
+ */ }, {
1075
+ key: "focus",
1076
+ value: function e() {
1077
+ var t;
1078
+ (t = this.dropdown) === null || t === void 0 ? void 0 : t.focus();
980
1079
  }
981
- h = f ? "transparent" : h;
982
- h = v ? null : h;
983
-
984
- return n().createElement(Y, {
985
- $inDropdown: i
986
- }, n().createElement(Z, {
987
- $inDropdown: i,
988
- append: a,
989
- autoCapitalize: "off",
990
- autoComplete: "off",
991
- autoCorrect: "off",
992
- "aria-label": (0, _._)("Hexadecimal color value"),
993
- inline: l,
994
- prepend: o,
995
- onKeyDown: this.handleTextKeyDown,
996
- onChange: this.handleTextChange,
997
- required: c,
998
- spellCheck: false,
999
- value: p
1000
- }), !d && i && n().createElement(Q, {
1001
- "data-test": "textbox-swatch",
1002
- onClick: this.handleButtonClick,
1003
- value: h,
1004
- style: {
1005
- marginLeft: "1px"
1006
- }
1007
- }));
1008
- }
1009
- }, {
1010
- key: "renderPalette",
1011
- value: function e() {
1012
- var t = this;
1013
- var r = this.props, a = r.splunkTheme, o = r.palette;
1014
- var l = this.state.expanded;
1015
- var i = a.isPrisma;
1016
-
1017
- return n().createElement(ve, {
1018
- palette: o,
1019
- value: this.getValue(),
1020
- swatchToFocusRef: this.focusSwatch,
1021
- renderInput: function e() {
1022
- return i ? t.renderInput({
1023
- textAppend: false,
1024
- textPrepend: false,
1025
- textInline: true,
1026
- inDropdown: true
1027
- }) : t.renderInput({
1028
- textAppend: true,
1029
- textPrepend: true,
1030
- textInline: true,
1031
- inDropdown: true
1032
- });
1033
- },
1034
- expandButtonRef: this.focusExpandButton,
1035
- onSwatchClick: this.handleSwatchClick,
1036
- expanded: l,
1037
- onPaletteExpand: this.handlePaletteExpand,
1038
- onSystemColorPickerChange: function e(r) {
1039
- return t.handleSystemColorPickerChange(r.target.value);
1080
+ }, {
1081
+ key: "isControlled",
1082
+ value: function e() {
1083
+ return this.controlledExternally;
1084
+ }
1085
+ }, {
1086
+ key: "renderInput",
1087
+ value: function e(r) {
1088
+ var a = r.textAppend, o = r.textPrepend, l = r.textInline, i = r.inDropdown;
1089
+ var s = this.props, u = s.splunkTheme, c = s.required, p = s.labelledBy, d = s.disabled;
1090
+ var f = this.state.displayValue;
1091
+ var v = u.isPrisma;
1092
+ var h = n.hasTransparent(this.props.palette) && g()(f) === "transparent";
1093
+ var b = g()(f) === Ge;
1094
+ var y = f;
1095
+ if (!m()(f, "#")) {
1096
+ y = "#".concat(f);
1040
1097
  }
1041
- });
1042
- }
1043
- }, {
1044
- key: "render",
1045
- value: function e() {
1046
- var t = this;
1047
- var a = this.props, o = a.append, l = a.disabled, i = a.describedBy, s = a.elementRef, u = a.error, c = a.hideInput, d = a.labelledBy, v = a.name, h = a.prepend, m = a.splunkTheme, y = ke(a, [ "append", "disabled", "describedBy", "elementRef", "error", "hideInput", "labelledBy", "name", "prepend", "splunkTheme" ]);
1048
- var b = m.isPrisma;
1049
- var g = this.getValue();
1050
- var x = this.state.displayValue;
1098
+ y = h ? "transparent" : y;
1099
+ y = b ? null : y;
1100
+
1101
+ return t().createElement(Z, {
1102
+ $inDropdown: i
1103
+ }, t().createElement(ye["default"], {
1104
+ id: this.hexInputReaderContentId
1105
+ }, (0, I._)("Hexadecimal color value")), t().createElement(ee, {
1106
+ $inDropdown: i,
1107
+ append: a,
1108
+ autoCapitalize: "off",
1109
+ autoComplete: "off",
1110
+ autoCorrect: "off",
1111
+ inline: l,
1112
+ prepend: o,
1113
+ onKeyDown: this.handleTextKeyDown,
1114
+ onChange: this.handleTextChange,
1115
+ required: c,
1116
+ spellCheck: false,
1117
+ value: f,
1118
+ labelledBy: p ? "".concat(p, " ").concat(this.hexInputReaderContentId) : this.hexInputReaderContentId,
1119
+ disabled: d
1120
+ }), !v && i && t().createElement(Y, {
1121
+ "data-test": "textbox-swatch",
1122
+ onClick: this.handleButtonClick,
1123
+ value: y,
1124
+ style: {
1125
+ marginLeft: "1px"
1126
+ }
1127
+ }));
1128
+ }
1129
+ }, {
1130
+ key: "renderPalette",
1131
+ value: function e() {
1132
+ var r = this;
1133
+ var n = this.props, a = n.splunkTheme, o = n.palette, l = n.disabled;
1134
+ var i = this.state.expanded;
1135
+ var s = a.isPrisma;
1136
+
1137
+ return t().createElement(me, {
1138
+ role: "dialog",
1139
+ "aria-label": (0, I._)("Choose color"),
1140
+ palette: o,
1141
+ value: this.getValue(),
1142
+ swatchToFocusRef: this.focusSwatch,
1143
+ renderInput: function e() {
1144
+ return s ? r.renderInput({
1145
+ textAppend: false,
1146
+ textPrepend: false,
1147
+ textInline: true,
1148
+ inDropdown: true
1149
+ }) : r.renderInput({
1150
+ textAppend: true,
1151
+ textPrepend: true,
1152
+ textInline: true,
1153
+ inDropdown: true
1154
+ });
1155
+ },
1156
+ expandButtonRef: this.focusExpandButton,
1157
+ onSwatchClick: this.handleSwatchClick,
1158
+ expanded: i,
1159
+ onPaletteExpand: this.handlePaletteExpand,
1160
+ onSystemColorPickerChange: function e(t) {
1161
+ return r.handleSystemColorPickerChange(t.target.value);
1162
+ },
1163
+ disabled: l
1164
+ });
1165
+ }
1166
+ }, {
1167
+ key: "render",
1168
+ value: function e() {
1169
+ var r = this;
1170
+ var a = this.props, o = a.append, l = a.disabled, i = a.describedBy, s = a.elementRef, u = a.error, c = a.hideInput, d = a.labelledBy, v = a.name, h = a.prepend, b = a.splunkTheme, m = Oe(a, [ "append", "disabled", "describedBy", "elementRef", "error", "hideInput", "labelledBy", "name", "prepend", "splunkTheme" ]);
1171
+ var y = b.isPrisma;
1172
+ var g = this.getValue();
1173
+ var x = this.state.displayValue;
1051
1174
  // hideInput defaults to true in Enterprise if prop is not provided
1052
- var S = c !== null && c !== void 0 ? c : true;
1053
- var w = b ? c : S;
1054
- var k = n().createElement(ee, me({
1055
- append: !w ? true : o,
1056
- "data-test": "color",
1057
- "data-test-value": x,
1058
- "aria-describedby": i,
1059
- "aria-labelledby": d,
1060
- "aria-invalid": u || undefined,
1061
- disabled: l,
1062
- error: u,
1063
- elementRef: s,
1064
- name: v,
1065
- prepend: h,
1066
- value: g
1067
- }, f()(y, [].concat(ye(p()(r.propTypes)), [ // TS: trick omit
1068
- "onChange" ]))));
1069
-
1070
- return n().createElement(J, null, n().createElement(E(), {
1071
- closeReasons: [ "clickAway", "escapeKey", "offScreen", "toggleClick" ],
1072
- onRequestClose: this.handleRequestClose,
1073
- onRequestOpen: this.handleRequestOpen,
1074
- open: this.state.open,
1075
- ref: function e(r) {
1076
- t.dropdown = r;
1077
- },
1078
- retainFocus: true,
1079
- takeFocus: false,
1080
- toggle: k
1081
- }, this.renderPalette()), !w && this.renderInput({
1082
- textAppend: false,
1083
- textPrepend: true,
1084
- textInline: true,
1085
- inDropdown: false
1086
- }));
1087
- }
1088
- } ]);
1089
- return r;
1090
- }(r.Component);
1091
- Ve(Me, "propTypes", $e);
1092
- Ve(Me, "defaultProps", He);
1093
- var Le = (0, P.withSplunkTheme)(Me);
1094
- Le.propTypes = Me.propTypes;
1095
- // TODO: SUI-2551 Deprecate this in favor of ui-utils implementation
1096
- /* harmony default export */ const Ue = Le;
1097
- // CONCATENATED MODULE: ./src/Color/index.ts
1098
- module.exports = t;
1175
+ var w = c !== null && c !== void 0 ? c : true;
1176
+ var S = y ? c : w;
1177
+ var C = t().createElement(te, xe({
1178
+ append: !S ? true : o,
1179
+ "data-test": "color",
1180
+ "data-test-value": x,
1181
+ "aria-describedby": i,
1182
+ "aria-labelledby": d ? "".concat(d, " ").concat(this.swatchToggleReaderContentId) : this.swatchToggleReaderContentId,
1183
+ "aria-invalid": u || undefined,
1184
+ disabled: l,
1185
+ error: u,
1186
+ elementRef: s,
1187
+ name: v,
1188
+ prepend: h,
1189
+ value: g
1190
+ }, f()(m, [].concat(we(p()(n.propTypes)), [
1191
+ // TS: trick omit
1192
+ "onChange" ]))));
1193
+
1194
+ return t().createElement(Q, null, t().createElement(ye["default"], {
1195
+ id: this.swatchToggleReaderContentId
1196
+ }, (0, I._)("Color picker")), t().createElement(P(), {
1197
+ closeReasons: [ "clickAway", "escapeKey", "offScreen", "toggleClick" ],
1198
+ onRequestClose: this.handleRequestClose,
1199
+ onRequestOpen: this.handleRequestOpen,
1200
+ open: this.state.open,
1201
+ ref: function e(t) {
1202
+ r.dropdown = t;
1203
+ },
1204
+ retainFocus: true,
1205
+ takeFocus: false,
1206
+ toggle: C
1207
+ }, this.renderPalette()), !S && this.renderInput({
1208
+ textAppend: false,
1209
+ textPrepend: true,
1210
+ textInline: true,
1211
+ inDropdown: false
1212
+ }));
1213
+ }
1214
+ } ]);
1215
+ return n;
1216
+ }(e.Component);
1217
+ $e(Qe, "propTypes", Le);
1218
+ $e(Qe, "defaultProps", Ue);
1219
+ var Ye = (0, E.withSplunkTheme)(Qe);
1220
+ Ye.propTypes = Qe.propTypes;
1221
+ // TODO: SUI-2551 Deprecate this in favor of ui-utils implementation
1222
+ /* harmony default export */ const Ze = Ye;
1223
+ }) // CONCATENATED MODULE: ./src/Color/index.ts
1224
+ ();
1225
+ module.exports = n;
1099
1226
  /******/})();