@splunk/react-ui 4.20.0 → 4.21.1

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 (101) hide show
  1. package/Accordion.js +425 -441
  2. package/Anchor.js +147 -193
  3. package/Animation.js +142 -166
  4. package/AnimationToggle.js +197 -253
  5. package/Box.js +145 -194
  6. package/Breadcrumbs.js +288 -298
  7. package/Button.js +488 -613
  8. package/ButtonGroup.js +160 -212
  9. package/ButtonSimple.js +543 -562
  10. package/CHANGELOG.md +26 -0
  11. package/Calendar.js +1107 -1195
  12. package/Card.js +771 -746
  13. package/CardLayout.js +205 -223
  14. package/Chip.js +509 -612
  15. package/Clickable.js +416 -472
  16. package/CloseButton.js +165 -250
  17. package/Code.js +1808 -2172
  18. package/Code.js.LICENSE.txt +8 -0
  19. package/CollapsiblePanel.js +586 -675
  20. package/Color.js +1066 -1297
  21. package/ColumnLayout.js +402 -465
  22. package/ComboBox.js +892 -969
  23. package/Concertina.js +998 -963
  24. package/ControlGroup.js +687 -718
  25. package/Date.js +567 -697
  26. package/DefinitionList.js +308 -310
  27. package/Divider.js +149 -194
  28. package/Dropdown.js +459 -558
  29. package/DualListbox.js +1480 -1735
  30. package/EventListener.js +94 -165
  31. package/File.js +1051 -1173
  32. package/FormRows.js +885 -880
  33. package/Heading.js +216 -263
  34. package/Image.js +446 -558
  35. package/JSONTree.js +690 -699
  36. package/Layer.js +442 -582
  37. package/Link.js +336 -361
  38. package/List.js +213 -237
  39. package/Markdown.js +510 -612
  40. package/Menu.js +1109 -1331
  41. package/Message.js +474 -629
  42. package/MessageBar.js +387 -561
  43. package/Modal.js +810 -798
  44. package/ModalLayer.js +326 -343
  45. package/Monogram.js +308 -368
  46. package/Multiselect.js +3558 -3998
  47. package/Number.js +729 -843
  48. package/Paginator.js +510 -615
  49. package/Paragraph.js +145 -188
  50. package/Popover.js +1470 -1693
  51. package/Progress.js +301 -362
  52. package/RadioBar.js +610 -651
  53. package/RadioList.js +483 -544
  54. package/Resize.js +530 -623
  55. package/ResultsMenu.js +494 -597
  56. package/ScreenReaderContent.js +142 -187
  57. package/Scroll.js +595 -598
  58. package/ScrollContainerContext.js +197 -278
  59. package/Search.js +745 -817
  60. package/Select.js +2441 -2746
  61. package/SidePanel.js +390 -392
  62. package/Slider.js +668 -825
  63. package/SlidingPanels.js +639 -645
  64. package/SplitButton.js +464 -499
  65. package/StaticContent.js +161 -217
  66. package/StepBar.js +386 -466
  67. package/Switch.js +710 -764
  68. package/TabBar.js +724 -815
  69. package/TabLayout.js +406 -438
  70. package/Table.js +4842 -5121
  71. package/Text.js +1169 -1351
  72. package/TextArea.js +1097 -1307
  73. package/Tooltip.js +624 -721
  74. package/TransitionOpen.js +489 -546
  75. package/Typography.js +176 -229
  76. package/WaitSpinner.js +230 -298
  77. package/package.json +14 -15
  78. package/stubs-splunkui.d.ts +4 -1
  79. package/types/src/ComboBox/Option.d.ts +1 -1
  80. package/types/src/Concertina/Concertina.d.ts +4 -0
  81. package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
  82. package/types/src/JSONTree/TreeNode.d.ts +5 -0
  83. package/types/src/Link/Link.d.ts +7 -3
  84. package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
  85. package/types/src/Markdown/Markdown.d.ts +1 -1
  86. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
  87. package/types/src/Menu/Item.d.ts +1 -1
  88. package/types/src/Menu/Menu.d.ts +1 -0
  89. package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
  90. package/types/src/Multiselect/Option.d.ts +1 -1
  91. package/types/src/Search/Option.d.ts +1 -1
  92. package/types/src/Select/Option.d.ts +1 -1
  93. package/types/src/Select/OptionBase.d.ts +1 -1
  94. package/types/src/fixtures/FetchOptions.d.ts +2 -8
  95. package/useForceUpdate.js +112 -146
  96. package/useKeyPress.js +74 -128
  97. package/usePrevious.js +65 -129
  98. package/useRovingFocus.js +122 -218
  99. package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
  100. /package/types/src/Table/docs/examples/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
  101. /package/types/src/Table/docs/examples/prisma/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
package/Text.js CHANGED
@@ -1,1373 +1,1191 @@
1
- module.exports =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId]) {
11
- /******/ return installedModules[moduleId].exports;
12
- /******/ }
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ i: moduleId,
16
- /******/ l: false,
17
- /******/ exports: {}
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.l = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // define getter function for harmony exports
38
- /******/ __webpack_require__.d = function(exports, name, getter) {
39
- /******/ if(!__webpack_require__.o(exports, name)) {
40
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
- /******/ }
42
- /******/ };
43
- /******/
44
- /******/ // define __esModule on exports
45
- /******/ __webpack_require__.r = function(exports) {
46
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
- /******/ }
49
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
- /******/ };
51
- /******/
52
- /******/ // create a fake namespace object
53
- /******/ // mode & 1: value is a module id, require it
54
- /******/ // mode & 2: merge all properties of value into the ns
55
- /******/ // mode & 4: return value when already ns object
56
- /******/ // mode & 8|1: behave like require
57
- /******/ __webpack_require__.t = function(value, mode) {
58
- /******/ if(mode & 1) value = __webpack_require__(value);
59
- /******/ if(mode & 8) return value;
60
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
- /******/ var ns = Object.create(null);
62
- /******/ __webpack_require__.r(ns);
63
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
- /******/ return ns;
66
- /******/ };
67
- /******/
68
- /******/ // getDefaultExport function for compatibility with non-harmony modules
69
- /******/ __webpack_require__.n = function(module) {
70
- /******/ var getter = module && module.__esModule ?
71
- /******/ function getDefault() { return module['default']; } :
72
- /******/ function getModuleExports() { return module; };
73
- /******/ __webpack_require__.d(getter, 'a', getter);
74
- /******/ return getter;
75
- /******/ };
76
- /******/
77
- /******/ // Object.prototype.hasOwnProperty.call
78
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
- /******/
80
- /******/ // __webpack_public_path__
81
- /******/ __webpack_require__.p = "";
82
- /******/
83
- /******/
84
- /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 197);
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ({
89
-
90
- /***/ 0:
91
- /***/ (function(module, exports) {
92
-
93
- module.exports = require("@splunk/themes");
94
-
95
- /***/ }),
96
-
97
- /***/ 1:
98
- /***/ (function(module, exports) {
99
-
100
- module.exports = require("prop-types");
101
-
102
- /***/ }),
103
-
104
- /***/ 10:
105
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
-
107
- "use strict";
108
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return updateReactRef; });
109
- /**
1
+ /******/ (() => {
2
+ // webpackBootstrap
3
+ /******/ "use strict";
4
+ /******/ // The require scope
5
+ /******/ var e = {};
6
+ /******/
7
+ /************************************************************************/
8
+ /******/ /* webpack/runtime/compat get default export */
9
+ /******/ (() => {
10
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
11
+ /******/ e.n = t => {
12
+ /******/ var r = t && t.__esModule ?
13
+ /******/ () => t["default"]
14
+ /******/ : () => t
15
+ /******/;
16
+ e.d(r, {
17
+ a: r
18
+ });
19
+ /******/ return r;
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/define property getters */
24
+ /******/ (() => {
25
+ /******/ // 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, {
30
+ enumerable: true,
31
+ get: r[n]
32
+ });
33
+ /******/ }
34
+ /******/ }
35
+ /******/ };
36
+ /******/ })();
37
+ /******/
38
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
+ /******/ (() => {
40
+ /******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
41
+ /******/;
42
+ })();
43
+ /******/
44
+ /******/ /* webpack/runtime/make namespace object */
45
+ /******/ (() => {
46
+ /******/ // define __esModule on exports
47
+ /******/ e.r = e => {
48
+ /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
49
+ /******/ Object.defineProperty(e, Symbol.toStringTag, {
50
+ value: "Module"
51
+ });
52
+ /******/ }
53
+ /******/ Object.defineProperty(e, "__esModule", {
54
+ value: true
55
+ });
56
+ /******/ };
57
+ /******/ })();
58
+ /******/
59
+ /************************************************************************/ var t = {};
60
+ // ESM COMPAT FLAG
61
+ e.r(t);
62
+ // EXPORTS
63
+ e.d(t, {
64
+ default: () => /* reexport */ Me
65
+ });
66
+ // CONCATENATED MODULE: external "react"
67
+ const r = require("react");
68
+ var n = e.n(r);
69
+ // CONCATENATED MODULE: external "prop-types"
70
+ const i = require("prop-types");
71
+ var a = e.n(i);
72
+ // CONCATENATED MODULE: external "lodash/has"
73
+ const o = require("lodash/has");
74
+ var l = e.n(o);
75
+ // CONCATENATED MODULE: external "lodash/keys"
76
+ const s = require("lodash/keys");
77
+ var c = e.n(s);
78
+ // CONCATENATED MODULE: external "lodash/omit"
79
+ const p = require("lodash/omit");
80
+ var d = e.n(p);
81
+ // CONCATENATED MODULE: external "lodash/pickBy"
82
+ const u = require("lodash/pickBy");
83
+ var f = e.n(u);
84
+ // CONCATENATED MODULE: external "@splunk/react-ui/ControlGroup"
85
+ const m = require("@splunk/react-ui/ControlGroup");
86
+ // CONCATENATED MODULE: external "@splunk/react-icons/Cross"
87
+ const h = require("@splunk/react-icons/Cross");
88
+ var v = e.n(h);
89
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Close"
90
+ const b = require("@splunk/react-icons/enterprise/Close");
91
+ var y = e.n(b);
92
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Search"
93
+ const C = require("@splunk/react-icons/enterprise/Search");
94
+ var g = e.n(C);
95
+ // CONCATENATED MODULE: external "@splunk/react-icons/Magnifier"
96
+ const x = require("@splunk/react-icons/Magnifier");
97
+ var w = e.n(x);
98
+ // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
99
+ const k = require("@splunk/react-ui/ScreenReaderContent");
100
+ var L = e.n(k);
101
+ // CONCATENATED MODULE: external "@splunk/react-ui/TextArea"
102
+ const S = require("@splunk/react-ui/TextArea");
103
+ var E = e.n(S);
104
+ // CONCATENATED MODULE: external "@splunk/themes"
105
+ const A = require("@splunk/themes");
106
+ // CONCATENATED MODULE: external "@splunk/ui-utils/style"
107
+ const O = require("@splunk/ui-utils/style");
108
+ // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
109
+ const T = require("@splunk/ui-utils/i18n");
110
+ // CONCATENATED MODULE: external "@splunk/react-icons/SVGEnterprise"
111
+ const I = require("@splunk/react-icons/SVGEnterprise");
112
+ var j = e.n(I);
113
+ // CONCATENATED MODULE: ./src/Text/IconOutlinedHide.tsx
114
+ function M() {
115
+ M = Object.assign || function(e) {
116
+ for (var t = 1; t < arguments.length; t++) {
117
+ var r = arguments[t];
118
+ for (var n in r) {
119
+ if (Object.prototype.hasOwnProperty.call(r, n)) {
120
+ e[n] = r[n];
121
+ }
122
+ }
123
+ }
124
+ return e;
125
+ };
126
+ return M.apply(this, arguments);
127
+ }
128
+ function R(e) {
129
+ var t = (0, A.useSplunkTheme)(), r = t.family, i = t.density;
130
+ if (r === "enterprise") {
131
+
132
+ return n().createElement(j(), M({
133
+ viewBox: "0 0 24 24",
134
+ size: 1.2,
135
+ screenReaderText: (0, T._)("Hide password")
136
+ }, e), n().createElement("path", {
137
+ fillRule: "evenodd",
138
+ clipRule: "evenodd",
139
+ d: "M4.00691 3.89287C3.61638 3.50234 2.98322 3.50235 2.5927 3.89287C2.20217 4.2834 2.20217 4.91656 2.5927 5.30708L4.35908 7.07346C3.63043 7.75302 2.99174 8.52671 2.46085 9.37612L1.18794 11.4128C0.963393 11.7721 0.963395 12.2279 1.18794 12.5872L2.46085 14.6239C3.3213 16.0006 4.46494 17.1784 5.81576 18.0789L5.94933 18.1679C7.74121 19.3625 9.8466 20 12.0002 20C13.5116 20 14.9993 19.686 16.3715 19.0858L18.5982 21.3125C18.9887 21.703 19.6218 21.703 20.0124 21.3125C20.4029 20.922 20.4029 20.2888 20.0124 19.8983L4.00691 3.89287ZM14.8257 17.54L13.0353 15.7496C12.7056 15.8405 12.3583 15.889 11.9997 15.889C9.85196 15.889 8.11084 14.1479 8.11084 12.0001C8.11084 11.6415 8.15937 11.2943 8.25022 10.9646L5.77433 8.48871C5.15179 9.06078 4.60729 9.71541 4.15685 10.4361L3.17943 12L4.15685 13.5639C4.86685 14.6999 5.81053 15.6717 6.92516 16.4148L7.05873 16.5038C8.52208 17.4794 10.2415 18 12.0002 18C12.9658 18 13.9196 17.8431 14.8257 17.54Z",
140
+ fill: "currentColor"
141
+ }), n().createElement("path", {
142
+ d: "M10.9657 8.25019L15.7496 13.0342C15.8402 12.7049 15.8886 12.3581 15.8886 12.0001C15.8886 9.85232 14.1475 8.11121 11.9997 8.11121C11.6417 8.11121 11.2949 8.15959 10.9657 8.25019Z",
143
+ fill: "currentColor"
144
+ }), n().createElement("path", {
145
+ d: "M19.8435 13.5639C19.3932 14.2844 18.8488 14.939 18.2264 15.5109L19.6417 16.9262C20.3702 16.2467 21.0087 15.4731 21.5395 14.6239L22.8124 12.5872C23.037 12.2279 23.037 11.7721 22.8124 11.4128L21.5395 9.37612C20.6791 7.99942 19.5354 6.82164 18.1846 5.9211L18.051 5.83205C16.2591 4.63746 14.1538 4 12.0002 4C10.489 4 9.00149 4.31389 7.62941 4.91392L9.17525 6.45977C10.0811 6.15687 11.0347 6 12.0002 6C13.7589 6 15.4783 6.52059 16.9416 7.49615L17.0752 7.5852C18.1898 8.32829 19.1335 9.30013 19.8435 10.4361L20.8209 12L19.8435 13.5639Z",
146
+ fill: "currentColor"
147
+ }));
148
+ }
149
+ var a = i === "compact" ? "20" : "24";
150
+
151
+ return n().createElement("svg", {
152
+ width: a,
153
+ height: a,
154
+ viewBox: "0 0 24 24",
155
+ xmlns: "http://www.w3.org/2000/svg",
156
+ style: {
157
+ display: "block"
158
+ }
159
+ }, n().createElement("title", null, (0, T._)("Hide password")), n().createElement("path", {
160
+ fillRule: "evenodd",
161
+ clipRule: "evenodd",
162
+ d: "M4.00691 3.89287C3.61638 3.50234 2.98322 3.50235 2.5927 3.89287C2.20217 4.2834 2.20217 4.91656 2.5927 5.30708L4.35908 7.07346C3.63043 7.75302 2.99174 8.52671 2.46085 9.37612L1.18794 11.4128C0.963393 11.7721 0.963395 12.2279 1.18794 12.5872L2.46085 14.6239C3.3213 16.0006 4.46494 17.1784 5.81576 18.0789L5.94933 18.1679C7.74121 19.3625 9.8466 20 12.0002 20C13.5116 20 14.9993 19.686 16.3715 19.0858L18.5982 21.3125C18.9887 21.703 19.6218 21.703 20.0124 21.3125C20.4029 20.922 20.4029 20.2888 20.0124 19.8983L4.00691 3.89287ZM14.8257 17.54L13.0353 15.7496C12.7056 15.8405 12.3583 15.889 11.9997 15.889C9.85196 15.889 8.11084 14.1479 8.11084 12.0001C8.11084 11.6415 8.15937 11.2943 8.25022 10.9646L5.77433 8.48871C5.15179 9.06078 4.60729 9.71541 4.15685 10.4361L3.17943 12L4.15685 13.5639C4.86685 14.6999 5.81053 15.6717 6.92516 16.4148L7.05873 16.5038C8.52208 17.4794 10.2415 18 12.0002 18C12.9658 18 13.9196 17.8431 14.8257 17.54Z",
163
+ fill: "currentColor"
164
+ }), n().createElement("path", {
165
+ d: "M10.9657 8.25019L15.7496 13.0342C15.8402 12.7049 15.8886 12.3581 15.8886 12.0001C15.8886 9.85232 14.1475 8.11121 11.9997 8.11121C11.6417 8.11121 11.2949 8.15959 10.9657 8.25019Z",
166
+ fill: "currentColor"
167
+ }), n().createElement("path", {
168
+ d: "M19.8435 13.5639C19.3932 14.2844 18.8488 14.939 18.2264 15.5109L19.6417 16.9262C20.3702 16.2467 21.0087 15.4731 21.5395 14.6239L22.8124 12.5872C23.037 12.2279 23.037 11.7721 22.8124 11.4128L21.5395 9.37612C20.6791 7.99942 19.5354 6.82164 18.1846 5.9211L18.051 5.83205C16.2591 4.63746 14.1538 4 12.0002 4C10.489 4 9.00149 4.31389 7.62941 4.91392L9.17525 6.45977C10.0811 6.15687 11.0347 6 12.0002 6C13.7589 6 15.4783 6.52059 16.9416 7.49615L17.0752 7.5852C18.1898 8.32829 19.1335 9.30013 19.8435 10.4361L20.8209 12L19.8435 13.5639Z",
169
+ fill: "currentColor"
170
+ }));
171
+ }
172
+ /* harmony default export */ const P = R;
173
+ // CONCATENATED MODULE: ./src/Text/IconOutlinedView.tsx
174
+ function $() {
175
+ $ = Object.assign || function(e) {
176
+ for (var t = 1; t < arguments.length; t++) {
177
+ var r = arguments[t];
178
+ for (var n in r) {
179
+ if (Object.prototype.hasOwnProperty.call(r, n)) {
180
+ e[n] = r[n];
181
+ }
182
+ }
183
+ }
184
+ return e;
185
+ };
186
+ return $.apply(this, arguments);
187
+ }
188
+ function _(e) {
189
+ var t = (0, A.useSplunkTheme)(), r = t.family, i = t.density;
190
+ if (r === "enterprise") {
191
+
192
+ return n().createElement(j(), $({
193
+ viewBox: "0 0 24 24",
194
+ size: 1.2,
195
+ screenReaderText: (0, T._)("View password")
196
+ }, e), n().createElement("path", {
197
+ fillRule: "evenodd",
198
+ clipRule: "evenodd",
199
+ d: "M15.7745 11.8654C15.7745 14.0132 14.0334 15.7543 11.8857 15.7543C9.73788 15.7543 7.99677 14.0132 7.99677 11.8654C7.99677 9.71762 9.73788 7.9765 11.8857 7.9765C14.0334 7.9765 15.7745 9.71762 15.7745 11.8654ZM13.7745 11.8654C13.7745 12.9086 12.9289 13.7543 11.8857 13.7543C10.8424 13.7543 9.99677 12.9086 9.99677 11.8654C9.99677 10.8222 10.8424 9.9765 11.8857 9.9765C12.9289 9.9765 13.7745 10.8222 13.7745 11.8654Z",
200
+ fill: "currentColor"
201
+ }), n().createElement("path", {
202
+ fillRule: "evenodd",
203
+ clipRule: "evenodd",
204
+ d: "M11.8859 3.86536C9.73235 3.86536 7.62695 4.50282 5.83507 5.69741L5.7015 5.78646C4.35068 6.687 3.20704 7.86477 2.3466 9.24148L1.07369 11.2781C0.849136 11.6374 0.849137 12.0933 1.07369 12.4526L2.3466 14.4892C3.20704 15.8659 4.35068 17.0437 5.7015 17.9443L5.83507 18.0333C7.62695 19.2279 9.73235 19.8654 11.8859 19.8654C14.0395 19.8654 16.1449 19.2279 17.9368 18.0333L18.0703 17.9443C19.4212 17.0437 20.5648 15.8659 21.4252 14.4892L22.6982 12.4526C22.9227 12.0933 22.9227 11.6374 22.6982 11.2781L21.4252 9.24148C20.5648 7.86477 19.4212 6.687 18.0703 5.78645L17.9368 5.69741C16.1449 4.50282 14.0395 3.86536 11.8859 3.86536ZM6.94447 7.36151C8.40782 6.38594 10.1272 5.86536 11.8859 5.86536C13.6446 5.86536 15.364 6.38594 16.8274 7.36151L16.9609 7.45056C18.0756 8.19364 19.0193 9.16549 19.7293 10.3015L20.7067 11.8654L19.7293 13.4292C19.0193 14.5652 18.0756 15.5371 16.9609 16.2802L16.8274 16.3692C15.364 17.3448 13.6446 17.8654 11.8859 17.8654C10.1272 17.8654 8.40782 17.3448 6.94447 16.3692L6.8109 16.2802C5.69627 15.5371 4.75259 14.5652 4.04259 13.4292L3.06517 11.8654L4.04259 10.3015C4.75259 9.16549 5.69627 8.19364 6.8109 7.45056L6.94447 7.36151Z",
205
+ fill: "currentColor"
206
+ }));
207
+ }
208
+ var a = i === "compact" ? "20" : "24";
209
+
210
+ return n().createElement("svg", {
211
+ width: a,
212
+ height: a,
213
+ viewBox: "0 0 24 24",
214
+ xmlns: "http://www.w3.org/2000/svg",
215
+ style: {
216
+ display: "block"
217
+ }
218
+ }, n().createElement("title", null, (0, T._)("View password")), n().createElement("path", {
219
+ fillRule: "evenodd",
220
+ clipRule: "evenodd",
221
+ d: "M15.7745 11.8654C15.7745 14.0132 14.0334 15.7543 11.8857 15.7543C9.73788 15.7543 7.99677 14.0132 7.99677 11.8654C7.99677 9.71762 9.73788 7.9765 11.8857 7.9765C14.0334 7.9765 15.7745 9.71762 15.7745 11.8654ZM13.7745 11.8654C13.7745 12.9086 12.9289 13.7543 11.8857 13.7543C10.8424 13.7543 9.99677 12.9086 9.99677 11.8654C9.99677 10.8222 10.8424 9.9765 11.8857 9.9765C12.9289 9.9765 13.7745 10.8222 13.7745 11.8654Z",
222
+ fill: "currentColor"
223
+ }), n().createElement("path", {
224
+ fillRule: "evenodd",
225
+ clipRule: "evenodd",
226
+ d: "M11.8859 3.86536C9.73235 3.86536 7.62695 4.50282 5.83507 5.69741L5.7015 5.78646C4.35068 6.687 3.20704 7.86477 2.3466 9.24148L1.07369 11.2781C0.849136 11.6374 0.849137 12.0933 1.07369 12.4526L2.3466 14.4892C3.20704 15.8659 4.35068 17.0437 5.7015 17.9443L5.83507 18.0333C7.62695 19.2279 9.73235 19.8654 11.8859 19.8654C14.0395 19.8654 16.1449 19.2279 17.9368 18.0333L18.0703 17.9443C19.4212 17.0437 20.5648 15.8659 21.4252 14.4892L22.6982 12.4526C22.9227 12.0933 22.9227 11.6374 22.6982 11.2781L21.4252 9.24148C20.5648 7.86477 19.4212 6.687 18.0703 5.78645L17.9368 5.69741C16.1449 4.50282 14.0395 3.86536 11.8859 3.86536ZM6.94447 7.36151C8.40782 6.38594 10.1272 5.86536 11.8859 5.86536C13.6446 5.86536 15.364 6.38594 16.8274 7.36151L16.9609 7.45056C18.0756 8.19364 19.0193 9.16549 19.7293 10.3015L20.7067 11.8654L19.7293 13.4292C19.0193 14.5652 18.0756 15.5371 16.9609 16.2802L16.8274 16.3692C15.364 17.3448 13.6446 17.8654 11.8859 17.8654C10.1272 17.8654 8.40782 17.3448 6.94447 16.3692L6.8109 16.2802C5.69627 15.5371 4.75259 14.5652 4.04259 13.4292L3.06517 11.8654L4.04259 10.3015C4.75259 9.16549 5.69627 8.19364 6.8109 7.45056L6.94447 7.36151Z",
227
+ fill: "currentColor"
228
+ }));
229
+ }
230
+ /* harmony default export */ const B = _;
231
+ // CONCATENATED MODULE: external "styled-components"
232
+ const D = require("styled-components");
233
+ var N = e.n(D);
234
+ // CONCATENATED MODULE: external "@splunk/react-ui/Box"
235
+ const q = require("@splunk/react-ui/Box");
236
+ var V = e.n(q);
237
+ // CONCATENATED MODULE: external "@splunk/react-ui/Button"
238
+ const W = require("@splunk/react-ui/Button");
239
+ var z = e.n(W);
240
+ // CONCATENATED MODULE: ./src/Text/TextStyles.ts
241
+ var Z = (0, D.css)([ "&,&[type]{cursor:not-allowed;color:", ";&::placeholder{color:", ";}}" ], (0,
242
+ A.pick)({
243
+ enterprise: A.variables.textDisabledColor,
244
+ prisma: A.variables.contentColorDisabled
245
+ }), (0, A.pick)({
246
+ enterprise: A.variables.textDisabledColor,
247
+ prisma: A.variables.contentColorDisabled
248
+ }));
249
+ var F = (0, D.css)([ "border-radius:", ";cursor:pointer;font-size:0.83333em;flex-grow:0;", ";&:not([disabled]){color:", ";}" ], (0,
250
+ A.pick)({
251
+ enterprise: A.variables.borderRadius,
252
+ prisma: "50%"
253
+ }), (0, A.pick)({
254
+ enterprise: (0, D.css)([ "width:", ";height:", ";" ], A.variables.inputHeight, A.variables.inputHeight),
255
+ prisma: {
256
+ comfortable: (0, D.css)([ "width:26px;min-width:26px;min-height:26px;margin:8px;padding:0;" ]),
257
+ compact: (0, D.css)([ "width:22px;min-width:22px;min-height:22px;margin:8px;padding:0;" ])
258
+ }
259
+ }), (0, A.pick)({
260
+ enterprise: {
261
+ light: A.variables.gray60,
262
+ dark: A.variables.white
263
+ },
264
+ prisma: A.variables.contentColorMuted
265
+ }));
266
+ var H = N()(z()).withConfig({
267
+ displayName: "TextStyles__StyledClearButton",
268
+ componentId: "eg7n6t-0"
269
+ })([ "display:none;visibility:hidden;", "" ], F);
270
+ var K = N().span.withConfig({
271
+ displayName: "TextStyles__StyledSearchIconWrapper",
272
+ componentId: "eg7n6t-1"
273
+ })([ "", ";color:", ";pointer-events:none;padding:", ";", "" ], A.mixins.reset("inline-block"), (0,
274
+ A.pick)({
275
+ enterprise: {
276
+ light: A.variables.gray60,
277
+ dark: A.variables.white
278
+ },
279
+ prisma: A.variables.contentColorMuted
280
+ }), (0, A.pick)({
281
+ comfortable: "0 8px",
282
+ compact: "0 6px"
283
+ }), (function(e) {
284
+ var t = e.$disabled;
285
+ return t && (0, D.css)([ "", "" ], (0, A.pick)({
286
+ enterprise: (0, D.css)([ "color:", ";" ], A.variables.textDisabledColor),
287
+ prisma: (0, D.css)([ "color:", ";" ], A.variables.contentColorDisabled)
288
+ }));
289
+ }));
290
+ var G = N()(V()).withConfig({
291
+ displayName: "TextStyles__StyledBox",
292
+ componentId: "eg7n6t-2"
293
+ })([ "display:flex;justify-content:space-between;flex-grow:1;flex-shrink:1;position:relative;&[data-inline]{width:230px;flex-basis:230px;[data-inline] + &{margin-left:", ";}}&:focus-within:not([disabled]){", "{", "}", "{visibility:visible;display:block;}}", "" ], (0,
294
+ A.pick)({
295
+ enterprise: A.variables.spacingHalf,
296
+ prisma: A.variables.spacingSmall
297
+ }),
298
+ /* sc-sel */
299
+ K, (0, A.pick)({
300
+ enterprise: (0, D.css)([ "display:none;" ])
301
+ }),
302
+ /* sc-sel */
303
+ H, (function(e) {
304
+ var t = e.$isTimeInput;
305
+ return t && (0, D.css)([ "@media screen and (min--moz-device-pixel-ratio:0){", "{display:none;}}" ],
306
+ /* sc-sel */
307
+ H);
308
+ }));
309
+ var U = N().span.withConfig({
310
+ displayName: "TextStyles__StyledInputWrapper",
311
+ componentId: "eg7n6t-3"
312
+ })([ "", ";flex-grow:1;min-height:", ";position:relative;overflow:hidden;border:1px solid ", ";border-radius:", ";box-sizing:border-box;background-color:", ";box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);padding:", ";align-items:center;", " ", " &:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){", "}", " ", " ", " ", "" ], A.mixins.reset("inline-flex"), A.variables.inputHeight, (0,
313
+ A.pick)({
314
+ enterprise: {
315
+ light: A.variables.gray60,
316
+ dark: A.variables.gray20
317
+ },
318
+ prisma: A.variables.interactiveColorBorder
319
+ }), A.variables.borderRadius, (0, A.pick)({
320
+ enterprise: {
321
+ light: A.variables.white,
322
+ dark: A.variables.gray22
323
+ },
324
+ prisma: A.variables.transparent
325
+ }), (0, A.pick)({
326
+ enterprise: "0px 10px",
327
+ prisma: "0px 12px"
328
+ }), (function(e) {
329
+ var t = e.$hasEndAdornment;
330
+ return t && (0, D.css)([ "padding-right:0;" ]);
331
+ }), (function(e) {
332
+ var t = e.$hasStartAdornment;
333
+ return t && (0, D.css)([ "padding-left:0;" ]);
334
+ }), (0, A.pick)({
335
+ enterprise: {
336
+ light: A.variables.gray60,
337
+ dark: A.variables.gray20
338
+ },
339
+ prisma: A.variables.interactiveColorBorderHover
340
+ }), (0, A.pick)({
341
+ enterprise: (0, D.css)([ "box-shadow:", ";color:", ";" ], A.variables.focusShadow, A.variables.textColor),
342
+ prisma: (0, D.css)([ "border-color:", ";color:", ";" ], A.variables.interactiveColorPrimary, A.variables.contentColorActive)
343
+ }), (function(e) {
344
+ var t = e.$error;
345
+ return t && (0, D.css)([ "&,&:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){", "}" ], (0,
346
+ A.pick)({
347
+ enterprise: A.variables.errorColor,
348
+ prisma: A.variables.accentColorNegative
349
+ }), (0, A.pick)({
350
+ enterprise: (0, D.css)([ "box-shadow:", ";color:", ";" ], A.variables.focusShadow, A.variables.textColor),
351
+ prisma: (0, D.css)([ "border-color:", ";color:", ";" ], A.variables.interactiveColorPrimary, A.variables.contentColorActive)
352
+ }));
353
+ }), (function(e) {
354
+ var t = e.$append;
355
+ return t && (0, D.css)([ "margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;" ]);
356
+ }), (function(e) {
357
+ var t = e.$prepend;
358
+ return t && (0, D.css)([ "border-top-left-radius:0;border-bottom-left-radius:0;" ]);
359
+ }), (function(e) {
360
+ var t = e.disabled;
361
+ return t && (0, D.css)([ "", " box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);" ], (0,
362
+ A.pick)({
363
+ enterprise: {
364
+ light: (0, D.css)([ "background-color:", ";border-color:", ";" ], A.variables.gray96, A.variables.gray92),
365
+ dark: (0, D.css)([ "background-color:", ";border-color:", ";" ], A.variables.gray22, A.variables.gray30)
366
+ },
367
+ prisma: (0, D.css)([ "border-color:", ";" ], A.variables.interactiveColorBorderDisabled)
368
+ }));
369
+ }));
370
+ /* Some of these need greater specificity than input[type=text] */ var J = N().input.withConfig({
371
+ displayName: "TextStyles__StyledInput",
372
+ componentId: "eg7n6t-4"
373
+ })([ "", ";&,&[type]{outline-style:none;border:0;background:transparent;color:", ";flex-grow:1;font-family:", ";font-size:inherit;line-height:inherit;&[type='time']{&::-webkit-calendar-picker-indicator{display:none;}height:", ";@media screen and (min--moz-device-pixel-ratio:0){padding-right:", ";}}position:relative;&::placeholder{color:", ";opacity:1;}", " ", "}" ], A.mixins.reset("inline-flex"), (0,
374
+ A.pick)({
375
+ enterprise: A.variables.textColor,
376
+ prisma: A.variables.contentColorActive
377
+ }), A.variables.sansFontFamily, (0, A.pick)({
378
+ enterprise: "20px",
379
+ prisma: {
380
+ comfortable: "24px",
381
+ compact: "20px"
382
+ }
383
+ }), (0, A.pick)({
384
+ enterprise: A.variables.spacingHalf,
385
+ prisma: "14px"
386
+ }), A.variables.contentColorMuted, (function(e) {
387
+ var t = e.$error;
388
+ return t && (0, D.css)([ "&,&:hover{color:", ";}" ], (0, A.pick)({
389
+ enterprise: {
390
+ light: A.variables.errorColorD10,
391
+ dark: A.variables.errorColorL20
392
+ },
393
+ prisma: A.variables.contentColorActive
394
+ }));
395
+ }), (function(e) {
396
+ var t = e.disabled;
397
+ return t && Z;
398
+ }));
399
+ var Q = N()(z()).withConfig({
400
+ displayName: "TextStyles__StyledVisibilityToggle",
401
+ componentId: "eg7n6t-5"
402
+ })([ "", "" ], F);
403
+ var X = N().span.withConfig({
404
+ displayName: "TextStyles__StyledPlaceholder",
405
+ componentId: "eg7n6t-6"
406
+ })([ "pointer-events:none;color:", ";position:absolute;overflow:hidden;font-size:inherit;line-height:inherit;height:", ";margin-right:", ";", ";", ";", "" ], (0,
407
+ A.pick)({
408
+ enterprise: A.variables.textGray,
409
+ prisma: A.variables.contentColorMuted
410
+ }), A.variables.lineHeight, (0, A.pick)({
411
+ enterprise: "10px",
412
+ prisma: "14px"
413
+ }), (function(e) {
414
+ var t = e.$hasStartAdornment, r = e.$startAdornmentWidth;
415
+ return t && (r ? (0, D.css)([ "margin-left:", "px;" ], r) : (0, D.css)([ "margin-left:", ";" ], (0,
416
+ A.pick)({
417
+ enterprise: {
418
+ comfortable: "30px",
419
+ compact: "26px"
420
+ },
421
+ prisma: {
422
+ comfortable: "38px",
423
+ compact: "30px"
424
+ }
425
+ })));
426
+ }), (function(e) {
427
+ var t = e.$hasEndAdornment, r = e.$endAdornmentWidth;
428
+ return t && (r ? (0, D.css)([ "max-width:calc( 100% - ", " - ", "px );" ], (0, A.pick)({
429
+ enterprise: "10px",
430
+ prisma: "14px"
431
+ }), r) : (0, D.css)([ "max-width:calc( 100% - ", " - ", " );" ], (0, A.pick)({
432
+ enterprise: "10px",
433
+ prisma: "14px"
434
+ }), (0, A.pick)({
435
+ enterprise: {
436
+ comfortable: "30px",
437
+ compact: "26px"
438
+ },
439
+ prisma: {
440
+ comfortable: "38px",
441
+ compact: "30px"
442
+ }
443
+ })));
444
+ }), (function(e) {
445
+ var t = e.$hasBothAdornment, r = e.$endAdornmentWidth, n = e.$startAdornmentWidth;
446
+ return t && (0, D.css)([ "max-width:calc(100% - ", "px - ", "px);" ], n, r);
447
+ }));
448
+ var Y = (0, D.css)([ "display:inline-flex;align-items:center;justify-content:center;height:", ";pointer-events:none;" ], (0,
449
+ A.pick)({
450
+ enterprise: {
451
+ comfortable: "30px",
452
+ compact: "26px"
453
+ },
454
+ prisma: {
455
+ comfortable: "38px",
456
+ compact: "30px"
457
+ }
458
+ }));
459
+ var ee = N().div.withConfig({
460
+ displayName: "TextStyles__StyledStartAdornmentHolder",
461
+ componentId: "eg7n6t-7"
462
+ })([ "", " ", ";" ], Y, (function(e) {
463
+ var t = e.$width;
464
+ return t ? (0, D.css)([ "min-width:", "px;" ], t) : (0, D.css)([ "min-width:", ";" ], (0,
465
+ A.pick)({
466
+ enterprise: {
467
+ comfortable: "30px",
468
+ compact: "26px"
469
+ },
470
+ prisma: {
471
+ comfortable: "38px",
472
+ compact: "30px"
473
+ }
474
+ }));
475
+ }));
476
+ var te = N().div.withConfig({
477
+ displayName: "TextStyles__StyledEndAdornmentHolder",
478
+ componentId: "eg7n6t-8"
479
+ })([ "", " ", ";" ], Y, (function(e) {
480
+ var t = e.$width;
481
+ return t ? (0, D.css)([ "min-width:", "px;" ], t) : (0, D.css)([ "min-width:", ";" ], (0,
482
+ A.pick)({
483
+ enterprise: {
484
+ comfortable: "30px",
485
+ compact: "26px"
486
+ },
487
+ prisma: {
488
+ comfortable: "38px",
489
+ compact: "30px"
490
+ }
491
+ }));
492
+ }));
493
+ var re = N().div.withConfig({
494
+ displayName: "TextStyles__StyledAdornment",
495
+ componentId: "eg7n6t-9"
496
+ })([ "display:inline-flex;align-items:center;justify-content:center;position:absolute;pointer-events:none;z-index:1;height:", ";color:", ";", ";", ";", "" ], (0,
497
+ A.pick)({
498
+ enterprise: {
499
+ comfortable: "30px",
500
+ compact: "26px"
501
+ },
502
+ prisma: {
503
+ comfortable: "38px",
504
+ compact: "30px"
505
+ }
506
+ }), (0, A.pick)({
507
+ enterprise: {
508
+ light: A.variables.gray60,
509
+ dark: A.variables.white
510
+ },
511
+ prisma: A.variables.contentColorMuted
512
+ }), (function(e) {
513
+ var t = e.$position;
514
+ return t === "start" ? (0, D.css)([ "top:1px;left:1px;" ]) : (0, D.css)([ "top:1px;right:1px;" ]);
515
+ }), (function(e) {
516
+ var t = e.disabled;
517
+ return t && Z;
518
+ }), (0, A.pick)({
519
+ enterprise: (0, D.css)([ "margin-left:-1px;margin-right:-1px;" ])
520
+ }));
521
+ // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
522
+ /**
110
523
  * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
111
524
  *
112
525
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
113
526
  * @param current - The new value of the ref.
114
527
  */
115
- function updateReactRef(ref, current) {
116
- if (ref) {
117
- if (typeof ref === 'function') {
118
- ref(current);
119
- } else {
120
- // the public signature of this util uses React.Ref<T> to mirror the way React types refs.
121
- // the intention here is to signal "we will take care of setting 'current', not you".
122
- ref.current = current; // eslint-disable-line no-param-reassign
528
+ function ne(e, t) {
529
+ if (e) {
530
+ if (typeof e === "function") {
531
+ e(t);
532
+ } else {
533
+ // the public signature of this util uses React.Ref<T> to mirror the way React types refs.
534
+ // the intention here is to signal "we will take care of setting 'current', not you".
535
+ e.current = t;
536
+ // eslint-disable-line no-param-reassign
537
+ }
538
+ }
123
539
  }
124
- }
125
- }
126
-
127
-
128
-
129
- /***/ }),
130
-
131
- /***/ 107:
132
- /***/ (function(module, exports) {
133
-
134
- module.exports = require("@splunk/react-ui/ControlGroup");
135
-
136
- /***/ }),
137
-
138
- /***/ 11:
139
- /***/ (function(module, exports) {
140
-
141
- module.exports = require("lodash/has");
142
-
143
- /***/ }),
144
-
145
- /***/ 14:
146
- /***/ (function(module, exports) {
147
-
148
- module.exports = require("@splunk/react-ui/ScreenReaderContent");
149
-
150
- /***/ }),
151
-
152
- /***/ 166:
153
- /***/ (function(module, exports) {
154
-
155
- module.exports = require("@splunk/react-ui/TextArea");
156
-
157
- /***/ }),
158
-
159
- /***/ 17:
160
- /***/ (function(module, exports) {
161
-
162
- module.exports = require("@splunk/react-ui/Button");
163
-
164
- /***/ }),
165
-
166
- /***/ 197:
167
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
168
-
169
- "use strict";
170
- // ESM COMPAT FLAG
171
- __webpack_require__.r(__webpack_exports__);
172
-
173
- // EXPORTS
174
- __webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ src_Text_Text; });
175
-
176
- // EXTERNAL MODULE: external "react"
177
- var external_react_ = __webpack_require__(2);
178
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
179
-
180
- // EXTERNAL MODULE: external "prop-types"
181
- var external_prop_types_ = __webpack_require__(1);
182
- var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
183
-
184
- // EXTERNAL MODULE: external "lodash/has"
185
- var has_ = __webpack_require__(11);
186
- var has_default = /*#__PURE__*/__webpack_require__.n(has_);
187
-
188
- // EXTERNAL MODULE: external "lodash/keys"
189
- var keys_ = __webpack_require__(9);
190
- var keys_default = /*#__PURE__*/__webpack_require__.n(keys_);
191
-
192
- // EXTERNAL MODULE: external "lodash/omit"
193
- var omit_ = __webpack_require__(5);
194
- var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
195
-
196
- // EXTERNAL MODULE: external "lodash/pickBy"
197
- var pickBy_ = __webpack_require__(63);
198
- var pickBy_default = /*#__PURE__*/__webpack_require__.n(pickBy_);
199
-
200
- // EXTERNAL MODULE: external "@splunk/react-ui/ControlGroup"
201
- var ControlGroup_ = __webpack_require__(107);
202
-
203
- // EXTERNAL MODULE: external "@splunk/react-icons/Cross"
204
- var Cross_ = __webpack_require__(26);
205
- var Cross_default = /*#__PURE__*/__webpack_require__.n(Cross_);
206
-
207
- // EXTERNAL MODULE: external "@splunk/react-icons/enterprise/Close"
208
- var Close_ = __webpack_require__(27);
209
- var Close_default = /*#__PURE__*/__webpack_require__.n(Close_);
210
-
211
- // EXTERNAL MODULE: external "@splunk/react-icons/enterprise/Search"
212
- var Search_ = __webpack_require__(54);
213
- var Search_default = /*#__PURE__*/__webpack_require__.n(Search_);
214
-
215
- // EXTERNAL MODULE: external "@splunk/react-icons/Magnifier"
216
- var Magnifier_ = __webpack_require__(49);
217
- var Magnifier_default = /*#__PURE__*/__webpack_require__.n(Magnifier_);
218
-
219
- // EXTERNAL MODULE: external "@splunk/react-ui/ScreenReaderContent"
220
- var ScreenReaderContent_ = __webpack_require__(14);
221
- var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_);
222
-
223
- // EXTERNAL MODULE: external "@splunk/react-ui/TextArea"
224
- var TextArea_ = __webpack_require__(166);
225
- var TextArea_default = /*#__PURE__*/__webpack_require__.n(TextArea_);
226
-
227
- // EXTERNAL MODULE: external "@splunk/themes"
228
- var themes_ = __webpack_require__(0);
229
-
230
- // EXTERNAL MODULE: external "@splunk/ui-utils/style"
231
- var style_ = __webpack_require__(41);
232
-
233
- // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
234
- var i18n_ = __webpack_require__(4);
235
-
236
- // EXTERNAL MODULE: external "@splunk/react-icons/SVGEnterprise"
237
- var SVGEnterprise_ = __webpack_require__(34);
238
- var SVGEnterprise_default = /*#__PURE__*/__webpack_require__.n(SVGEnterprise_);
239
-
240
- // CONCATENATED MODULE: ./src/Text/IconOutlinedHide.tsx
241
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
242
-
243
-
244
-
245
-
246
-
247
-
248
- function IconOutlinedHide(props) {
249
- var _useSplunkTheme = Object(themes_["useSplunkTheme"])(),
250
- family = _useSplunkTheme.family,
251
- density = _useSplunkTheme.density;
252
-
253
- if (family === 'enterprise') {
254
- return /*#__PURE__*/external_react_default.a.createElement(SVGEnterprise_default.a, _extends({
255
- viewBox: "0 0 24 24",
256
- size: 1.2,
257
- screenReaderText: Object(i18n_["_"])('Hide password')
258
- }, props), /*#__PURE__*/external_react_default.a.createElement("path", {
259
- fillRule: "evenodd",
260
- clipRule: "evenodd",
261
- d: "M4.00691 3.89287C3.61638 3.50234 2.98322 3.50235 2.5927 3.89287C2.20217 4.2834 2.20217 4.91656 2.5927 5.30708L4.35908 7.07346C3.63043 7.75302 2.99174 8.52671 2.46085 9.37612L1.18794 11.4128C0.963393 11.7721 0.963395 12.2279 1.18794 12.5872L2.46085 14.6239C3.3213 16.0006 4.46494 17.1784 5.81576 18.0789L5.94933 18.1679C7.74121 19.3625 9.8466 20 12.0002 20C13.5116 20 14.9993 19.686 16.3715 19.0858L18.5982 21.3125C18.9887 21.703 19.6218 21.703 20.0124 21.3125C20.4029 20.922 20.4029 20.2888 20.0124 19.8983L4.00691 3.89287ZM14.8257 17.54L13.0353 15.7496C12.7056 15.8405 12.3583 15.889 11.9997 15.889C9.85196 15.889 8.11084 14.1479 8.11084 12.0001C8.11084 11.6415 8.15937 11.2943 8.25022 10.9646L5.77433 8.48871C5.15179 9.06078 4.60729 9.71541 4.15685 10.4361L3.17943 12L4.15685 13.5639C4.86685 14.6999 5.81053 15.6717 6.92516 16.4148L7.05873 16.5038C8.52208 17.4794 10.2415 18 12.0002 18C12.9658 18 13.9196 17.8431 14.8257 17.54Z",
262
- fill: "currentColor"
263
- }), /*#__PURE__*/external_react_default.a.createElement("path", {
264
- d: "M10.9657 8.25019L15.7496 13.0342C15.8402 12.7049 15.8886 12.3581 15.8886 12.0001C15.8886 9.85232 14.1475 8.11121 11.9997 8.11121C11.6417 8.11121 11.2949 8.15959 10.9657 8.25019Z",
265
- fill: "currentColor"
266
- }), /*#__PURE__*/external_react_default.a.createElement("path", {
267
- d: "M19.8435 13.5639C19.3932 14.2844 18.8488 14.939 18.2264 15.5109L19.6417 16.9262C20.3702 16.2467 21.0087 15.4731 21.5395 14.6239L22.8124 12.5872C23.037 12.2279 23.037 11.7721 22.8124 11.4128L21.5395 9.37612C20.6791 7.99942 19.5354 6.82164 18.1846 5.9211L18.051 5.83205C16.2591 4.63746 14.1538 4 12.0002 4C10.489 4 9.00149 4.31389 7.62941 4.91392L9.17525 6.45977C10.0811 6.15687 11.0347 6 12.0002 6C13.7589 6 15.4783 6.52059 16.9416 7.49615L17.0752 7.5852C18.1898 8.32829 19.1335 9.30013 19.8435 10.4361L20.8209 12L19.8435 13.5639Z",
268
- fill: "currentColor"
269
- }));
270
- }
271
-
272
- var size = density === 'compact' ? '20' : '24';
273
- return /*#__PURE__*/external_react_default.a.createElement("svg", {
274
- width: size,
275
- height: size,
276
- viewBox: "0 0 24 24",
277
- xmlns: "http://www.w3.org/2000/svg",
278
- style: {
279
- display: 'block'
540
+ // CONCATENATED MODULE: ./src/Text/Text.tsx
541
+ function ie(e) {
542
+ "@babel/helpers - typeof";
543
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
544
+ ie = function e(t) {
545
+ return typeof t;
546
+ };
547
+ } else {
548
+ ie = function e(t) {
549
+ return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
550
+ };
551
+ }
552
+ return ie(e);
280
553
  }
281
- }, /*#__PURE__*/external_react_default.a.createElement("title", null, Object(i18n_["_"])('Hide password')), /*#__PURE__*/external_react_default.a.createElement("path", {
282
- fillRule: "evenodd",
283
- clipRule: "evenodd",
284
- d: "M4.00691 3.89287C3.61638 3.50234 2.98322 3.50235 2.5927 3.89287C2.20217 4.2834 2.20217 4.91656 2.5927 5.30708L4.35908 7.07346C3.63043 7.75302 2.99174 8.52671 2.46085 9.37612L1.18794 11.4128C0.963393 11.7721 0.963395 12.2279 1.18794 12.5872L2.46085 14.6239C3.3213 16.0006 4.46494 17.1784 5.81576 18.0789L5.94933 18.1679C7.74121 19.3625 9.8466 20 12.0002 20C13.5116 20 14.9993 19.686 16.3715 19.0858L18.5982 21.3125C18.9887 21.703 19.6218 21.703 20.0124 21.3125C20.4029 20.922 20.4029 20.2888 20.0124 19.8983L4.00691 3.89287ZM14.8257 17.54L13.0353 15.7496C12.7056 15.8405 12.3583 15.889 11.9997 15.889C9.85196 15.889 8.11084 14.1479 8.11084 12.0001C8.11084 11.6415 8.15937 11.2943 8.25022 10.9646L5.77433 8.48871C5.15179 9.06078 4.60729 9.71541 4.15685 10.4361L3.17943 12L4.15685 13.5639C4.86685 14.6999 5.81053 15.6717 6.92516 16.4148L7.05873 16.5038C8.52208 17.4794 10.2415 18 12.0002 18C12.9658 18 13.9196 17.8431 14.8257 17.54Z",
285
- fill: "currentColor"
286
- }), /*#__PURE__*/external_react_default.a.createElement("path", {
287
- d: "M10.9657 8.25019L15.7496 13.0342C15.8402 12.7049 15.8886 12.3581 15.8886 12.0001C15.8886 9.85232 14.1475 8.11121 11.9997 8.11121C11.6417 8.11121 11.2949 8.15959 10.9657 8.25019Z",
288
- fill: "currentColor"
289
- }), /*#__PURE__*/external_react_default.a.createElement("path", {
290
- d: "M19.8435 13.5639C19.3932 14.2844 18.8488 14.939 18.2264 15.5109L19.6417 16.9262C20.3702 16.2467 21.0087 15.4731 21.5395 14.6239L22.8124 12.5872C23.037 12.2279 23.037 11.7721 22.8124 11.4128L21.5395 9.37612C20.6791 7.99942 19.5354 6.82164 18.1846 5.9211L18.051 5.83205C16.2591 4.63746 14.1538 4 12.0002 4C10.489 4 9.00149 4.31389 7.62941 4.91392L9.17525 6.45977C10.0811 6.15687 11.0347 6 12.0002 6C13.7589 6 15.4783 6.52059 16.9416 7.49615L17.0752 7.5852C18.1898 8.32829 19.1335 9.30013 19.8435 10.4361L20.8209 12L19.8435 13.5639Z",
291
- fill: "currentColor"
292
- }));
293
- }
294
-
295
- /* harmony default export */ var Text_IconOutlinedHide = (IconOutlinedHide);
296
- // CONCATENATED MODULE: ./src/Text/IconOutlinedView.tsx
297
- function IconOutlinedView_extends() { IconOutlinedView_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return IconOutlinedView_extends.apply(this, arguments); }
298
-
299
-
300
-
301
-
302
-
303
-
304
- function IconOutlinedView(props) {
305
- var _useSplunkTheme = Object(themes_["useSplunkTheme"])(),
306
- family = _useSplunkTheme.family,
307
- density = _useSplunkTheme.density;
308
-
309
- if (family === 'enterprise') {
310
- return /*#__PURE__*/external_react_default.a.createElement(SVGEnterprise_default.a, IconOutlinedView_extends({
311
- viewBox: "0 0 24 24",
312
- size: 1.2,
313
- screenReaderText: Object(i18n_["_"])('View password')
314
- }, props), /*#__PURE__*/external_react_default.a.createElement("path", {
315
- fillRule: "evenodd",
316
- clipRule: "evenodd",
317
- d: "M15.7745 11.8654C15.7745 14.0132 14.0334 15.7543 11.8857 15.7543C9.73788 15.7543 7.99677 14.0132 7.99677 11.8654C7.99677 9.71762 9.73788 7.9765 11.8857 7.9765C14.0334 7.9765 15.7745 9.71762 15.7745 11.8654ZM13.7745 11.8654C13.7745 12.9086 12.9289 13.7543 11.8857 13.7543C10.8424 13.7543 9.99677 12.9086 9.99677 11.8654C9.99677 10.8222 10.8424 9.9765 11.8857 9.9765C12.9289 9.9765 13.7745 10.8222 13.7745 11.8654Z",
318
- fill: "currentColor"
319
- }), /*#__PURE__*/external_react_default.a.createElement("path", {
320
- fillRule: "evenodd",
321
- clipRule: "evenodd",
322
- d: "M11.8859 3.86536C9.73235 3.86536 7.62695 4.50282 5.83507 5.69741L5.7015 5.78646C4.35068 6.687 3.20704 7.86477 2.3466 9.24148L1.07369 11.2781C0.849136 11.6374 0.849137 12.0933 1.07369 12.4526L2.3466 14.4892C3.20704 15.8659 4.35068 17.0437 5.7015 17.9443L5.83507 18.0333C7.62695 19.2279 9.73235 19.8654 11.8859 19.8654C14.0395 19.8654 16.1449 19.2279 17.9368 18.0333L18.0703 17.9443C19.4212 17.0437 20.5648 15.8659 21.4252 14.4892L22.6982 12.4526C22.9227 12.0933 22.9227 11.6374 22.6982 11.2781L21.4252 9.24148C20.5648 7.86477 19.4212 6.687 18.0703 5.78645L17.9368 5.69741C16.1449 4.50282 14.0395 3.86536 11.8859 3.86536ZM6.94447 7.36151C8.40782 6.38594 10.1272 5.86536 11.8859 5.86536C13.6446 5.86536 15.364 6.38594 16.8274 7.36151L16.9609 7.45056C18.0756 8.19364 19.0193 9.16549 19.7293 10.3015L20.7067 11.8654L19.7293 13.4292C19.0193 14.5652 18.0756 15.5371 16.9609 16.2802L16.8274 16.3692C15.364 17.3448 13.6446 17.8654 11.8859 17.8654C10.1272 17.8654 8.40782 17.3448 6.94447 16.3692L6.8109 16.2802C5.69627 15.5371 4.75259 14.5652 4.04259 13.4292L3.06517 11.8654L4.04259 10.3015C4.75259 9.16549 5.69627 8.19364 6.8109 7.45056L6.94447 7.36151Z",
323
- fill: "currentColor"
324
- }));
325
- }
326
-
327
- var size = density === 'compact' ? '20' : '24';
328
- return /*#__PURE__*/external_react_default.a.createElement("svg", {
329
- width: size,
330
- height: size,
331
- viewBox: "0 0 24 24",
332
- xmlns: "http://www.w3.org/2000/svg",
333
- style: {
334
- display: 'block'
554
+ function ae() {
555
+ ae = Object.assign || function(e) {
556
+ for (var t = 1; t < arguments.length; t++) {
557
+ var r = arguments[t];
558
+ for (var n in r) {
559
+ if (Object.prototype.hasOwnProperty.call(r, n)) {
560
+ e[n] = r[n];
561
+ }
562
+ }
563
+ }
564
+ return e;
565
+ };
566
+ return ae.apply(this, arguments);
335
567
  }
336
- }, /*#__PURE__*/external_react_default.a.createElement("title", null, Object(i18n_["_"])('View password')), /*#__PURE__*/external_react_default.a.createElement("path", {
337
- fillRule: "evenodd",
338
- clipRule: "evenodd",
339
- d: "M15.7745 11.8654C15.7745 14.0132 14.0334 15.7543 11.8857 15.7543C9.73788 15.7543 7.99677 14.0132 7.99677 11.8654C7.99677 9.71762 9.73788 7.9765 11.8857 7.9765C14.0334 7.9765 15.7745 9.71762 15.7745 11.8654ZM13.7745 11.8654C13.7745 12.9086 12.9289 13.7543 11.8857 13.7543C10.8424 13.7543 9.99677 12.9086 9.99677 11.8654C9.99677 10.8222 10.8424 9.9765 11.8857 9.9765C12.9289 9.9765 13.7745 10.8222 13.7745 11.8654Z",
340
- fill: "currentColor"
341
- }), /*#__PURE__*/external_react_default.a.createElement("path", {
342
- fillRule: "evenodd",
343
- clipRule: "evenodd",
344
- d: "M11.8859 3.86536C9.73235 3.86536 7.62695 4.50282 5.83507 5.69741L5.7015 5.78646C4.35068 6.687 3.20704 7.86477 2.3466 9.24148L1.07369 11.2781C0.849136 11.6374 0.849137 12.0933 1.07369 12.4526L2.3466 14.4892C3.20704 15.8659 4.35068 17.0437 5.7015 17.9443L5.83507 18.0333C7.62695 19.2279 9.73235 19.8654 11.8859 19.8654C14.0395 19.8654 16.1449 19.2279 17.9368 18.0333L18.0703 17.9443C19.4212 17.0437 20.5648 15.8659 21.4252 14.4892L22.6982 12.4526C22.9227 12.0933 22.9227 11.6374 22.6982 11.2781L21.4252 9.24148C20.5648 7.86477 19.4212 6.687 18.0703 5.78645L17.9368 5.69741C16.1449 4.50282 14.0395 3.86536 11.8859 3.86536ZM6.94447 7.36151C8.40782 6.38594 10.1272 5.86536 11.8859 5.86536C13.6446 5.86536 15.364 6.38594 16.8274 7.36151L16.9609 7.45056C18.0756 8.19364 19.0193 9.16549 19.7293 10.3015L20.7067 11.8654L19.7293 13.4292C19.0193 14.5652 18.0756 15.5371 16.9609 16.2802L16.8274 16.3692C15.364 17.3448 13.6446 17.8654 11.8859 17.8654C10.1272 17.8654 8.40782 17.3448 6.94447 16.3692L6.8109 16.2802C5.69627 15.5371 4.75259 14.5652 4.04259 13.4292L3.06517 11.8654L4.04259 10.3015C4.75259 9.16549 5.69627 8.19364 6.8109 7.45056L6.94447 7.36151Z",
345
- fill: "currentColor"
346
- }));
347
- }
348
-
349
- /* harmony default export */ var Text_IconOutlinedView = (IconOutlinedView);
350
- // EXTERNAL MODULE: external "styled-components"
351
- var external_styled_components_ = __webpack_require__(3);
352
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
353
-
354
- // EXTERNAL MODULE: external "@splunk/react-ui/Box"
355
- var Box_ = __webpack_require__(6);
356
- var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
357
-
358
- // EXTERNAL MODULE: external "@splunk/react-ui/Button"
359
- var Button_ = __webpack_require__(17);
360
- var Button_default = /*#__PURE__*/__webpack_require__.n(Button_);
361
-
362
- // CONCATENATED MODULE: ./src/Text/TextStyles.ts
363
-
364
-
365
-
366
-
367
- var disabledStyles = Object(external_styled_components_["css"])(["&,&[type]{cursor:not-allowed;color:", ";&::placeholder{color:", ";}}"], Object(themes_["pick"])({
368
- enterprise: themes_["variables"].textDisabledColor,
369
- prisma: themes_["variables"].contentColorDisabled
370
- }), Object(themes_["pick"])({
371
- enterprise: themes_["variables"].textDisabledColor,
372
- prisma: themes_["variables"].contentColorDisabled
373
- }));
374
- var buttonStyles = Object(external_styled_components_["css"])(["border-radius:", ";cursor:pointer;font-size:0.83333em;flex-grow:0;", ";&:not([disabled]){color:", ";}"], Object(themes_["pick"])({
375
- enterprise: themes_["variables"].borderRadius,
376
- prisma: '50%'
377
- }), Object(themes_["pick"])({
378
- enterprise: Object(external_styled_components_["css"])(["width:", ";height:", ";"], themes_["variables"].inputHeight, themes_["variables"].inputHeight),
379
- prisma: {
380
- comfortable: Object(external_styled_components_["css"])(["width:26px;min-width:26px;min-height:26px;margin:8px;padding:0;"]),
381
- compact: Object(external_styled_components_["css"])(["width:22px;min-width:22px;min-height:22px;margin:8px;padding:0;"])
382
- }
383
- }), Object(themes_["pick"])({
384
- enterprise: {
385
- light: themes_["variables"].gray60,
386
- dark: themes_["variables"].white
387
- },
388
- prisma: themes_["variables"].contentColorMuted
389
- }));
390
- var StyledClearButton = external_styled_components_default()(Button_default.a).withConfig({
391
- displayName: "TextStyles__StyledClearButton",
392
- componentId: "eg7n6t-0"
393
- })(["display:none;visibility:hidden;", ""], buttonStyles);
394
- var StyledSearchIconWrapper = external_styled_components_default.a.span.withConfig({
395
- displayName: "TextStyles__StyledSearchIconWrapper",
396
- componentId: "eg7n6t-1"
397
- })(["", ";color:", ";pointer-events:none;padding:", ";", ""], themes_["mixins"].reset('inline-block'), Object(themes_["pick"])({
398
- enterprise: {
399
- light: themes_["variables"].gray60,
400
- dark: themes_["variables"].white
401
- },
402
- prisma: themes_["variables"].contentColorMuted
403
- }), Object(themes_["pick"])({
404
- comfortable: '0 8px',
405
- compact: '0 6px'
406
- }), function (_ref) {
407
- var $disabled = _ref.$disabled;
408
- return $disabled && Object(external_styled_components_["css"])(["", ""], Object(themes_["pick"])({
409
- enterprise: Object(external_styled_components_["css"])(["color:", ";"], themes_["variables"].textDisabledColor),
410
- prisma: Object(external_styled_components_["css"])(["color:", ";"], themes_["variables"].contentColorDisabled)
411
- }));
412
- });
413
- var StyledBox = external_styled_components_default()(Box_default.a).withConfig({
414
- displayName: "TextStyles__StyledBox",
415
- componentId: "eg7n6t-2"
416
- })(["display:flex;justify-content:space-between;flex-grow:1;flex-shrink:1;position:relative;&[data-inline]{width:230px;flex-basis:230px;[data-inline] + &{margin-left:", ";}}&:focus-within:not([disabled]){", "{", "}", "{visibility:visible;display:block;}}", ""], Object(themes_["pick"])({
417
- enterprise: themes_["variables"].spacingHalf,
418
- prisma: themes_["variables"].spacingSmall
419
- }),
420
- /* sc-sel */
421
- StyledSearchIconWrapper, Object(themes_["pick"])({
422
- enterprise: Object(external_styled_components_["css"])(["display:none;"])
423
- }),
424
- /* sc-sel */
425
- StyledClearButton, function (_ref2) {
426
- var $isTimeInput = _ref2.$isTimeInput;
427
- return $isTimeInput && Object(external_styled_components_["css"])(["@media screen and (min--moz-device-pixel-ratio:0){", "{display:none;}}"],
428
- /* sc-sel */
429
- StyledClearButton);
430
- });
431
- var StyledInputWrapper = external_styled_components_default.a.span.withConfig({
432
- displayName: "TextStyles__StyledInputWrapper",
433
- componentId: "eg7n6t-3"
434
- })(["", ";flex-grow:1;min-height:", ";position:relative;overflow:hidden;border:1px solid ", ";border-radius:", ";box-sizing:border-box;background-color:", ";box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);padding:", ";align-items:center;", " ", " &:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){", "}", " ", " ", " ", ""], themes_["mixins"].reset('inline-flex'), themes_["variables"].inputHeight, Object(themes_["pick"])({
435
- enterprise: {
436
- light: themes_["variables"].gray60,
437
- dark: themes_["variables"].gray20
438
- },
439
- prisma: themes_["variables"].interactiveColorBorder
440
- }), themes_["variables"].borderRadius, Object(themes_["pick"])({
441
- enterprise: {
442
- light: themes_["variables"].white,
443
- dark: themes_["variables"].gray22
444
- },
445
- prisma: themes_["variables"].transparent
446
- }), Object(themes_["pick"])({
447
- enterprise: '0px 10px',
448
- prisma: '0px 12px'
449
- }), function (_ref3) {
450
- var $hasEndAdornment = _ref3.$hasEndAdornment;
451
- return $hasEndAdornment && Object(external_styled_components_["css"])(["padding-right:0;"]);
452
- }, function (_ref4) {
453
- var $hasStartAdornment = _ref4.$hasStartAdornment;
454
- return $hasStartAdornment && Object(external_styled_components_["css"])(["padding-left:0;"]);
455
- }, Object(themes_["pick"])({
456
- enterprise: {
457
- light: themes_["variables"].gray60,
458
- dark: themes_["variables"].gray20
459
- },
460
- prisma: themes_["variables"].interactiveColorBorderHover
461
- }), Object(themes_["pick"])({
462
- enterprise: Object(external_styled_components_["css"])(["box-shadow:", ";color:", ";"], themes_["variables"].focusShadow, themes_["variables"].textColor),
463
- prisma: Object(external_styled_components_["css"])(["border-color:", ";color:", ";"], themes_["variables"].interactiveColorPrimary, themes_["variables"].contentColorActive)
464
- }), function (_ref5) {
465
- var $error = _ref5.$error;
466
- return $error && Object(external_styled_components_["css"])(["&,&:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){", "}"], Object(themes_["pick"])({
467
- enterprise: themes_["variables"].errorColor,
468
- prisma: themes_["variables"].accentColorNegative
469
- }), Object(themes_["pick"])({
470
- enterprise: Object(external_styled_components_["css"])(["box-shadow:", ";color:", ";"], themes_["variables"].focusShadow, themes_["variables"].textColor),
471
- prisma: Object(external_styled_components_["css"])(["border-color:", ";color:", ";"], themes_["variables"].interactiveColorPrimary, themes_["variables"].contentColorActive)
472
- }));
473
- }, function (_ref6) {
474
- var $append = _ref6.$append;
475
- return $append && Object(external_styled_components_["css"])(["margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;"]);
476
- }, function (_ref7) {
477
- var $prepend = _ref7.$prepend;
478
- return $prepend && Object(external_styled_components_["css"])(["border-top-left-radius:0;border-bottom-left-radius:0;"]);
479
- }, function (_ref8) {
480
- var disabled = _ref8.disabled;
481
- return disabled && Object(external_styled_components_["css"])(["", " box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);"], Object(themes_["pick"])({
482
- enterprise: {
483
- light: Object(external_styled_components_["css"])(["background-color:", ";border-color:", ";"], themes_["variables"].gray96, themes_["variables"].gray92),
484
- dark: Object(external_styled_components_["css"])(["background-color:", ";border-color:", ";"], themes_["variables"].gray22, themes_["variables"].gray30)
485
- },
486
- prisma: Object(external_styled_components_["css"])(["border-color:", ";"], themes_["variables"].interactiveColorBorderDisabled)
487
- }));
488
- });
489
- /* Some of these need greater specificity than input[type=text] */
490
-
491
- var StyledInput = external_styled_components_default.a.input.withConfig({
492
- displayName: "TextStyles__StyledInput",
493
- componentId: "eg7n6t-4"
494
- })(["", ";&,&[type]{outline-style:none;border:0;background:transparent;color:", ";flex-grow:1;font-family:", ";font-size:inherit;line-height:inherit;&[type='time']{&::-webkit-calendar-picker-indicator{display:none;}height:", ";@media screen and (min--moz-device-pixel-ratio:0){padding-right:", ";}}position:relative;&::placeholder{color:", ";opacity:1;}", " ", "}"], themes_["mixins"].reset('inline-flex'), Object(themes_["pick"])({
495
- enterprise: themes_["variables"].textColor,
496
- prisma: themes_["variables"].contentColorActive
497
- }), themes_["variables"].sansFontFamily, Object(themes_["pick"])({
498
- enterprise: '20px',
499
- prisma: {
500
- comfortable: '24px',
501
- compact: '20px'
502
- }
503
- }), Object(themes_["pick"])({
504
- enterprise: themes_["variables"].spacingHalf,
505
- prisma: '14px'
506
- }), themes_["variables"].contentColorMuted, function (_ref9) {
507
- var $error = _ref9.$error;
508
- return $error && Object(external_styled_components_["css"])(["&,&:hover{color:", ";}"], Object(themes_["pick"])({
509
- enterprise: {
510
- light: themes_["variables"].errorColorD10,
511
- dark: themes_["variables"].errorColorL20
512
- },
513
- prisma: themes_["variables"].contentColorActive
514
- }));
515
- }, function (_ref10) {
516
- var disabled = _ref10.disabled;
517
- return disabled && disabledStyles;
518
- });
519
- var StyledVisibilityToggle = external_styled_components_default()(Button_default.a).withConfig({
520
- displayName: "TextStyles__StyledVisibilityToggle",
521
- componentId: "eg7n6t-5"
522
- })(["", ""], buttonStyles);
523
- var StyledPlaceholder = external_styled_components_default.a.span.withConfig({
524
- displayName: "TextStyles__StyledPlaceholder",
525
- componentId: "eg7n6t-6"
526
- })(["pointer-events:none;color:", ";position:absolute;overflow:hidden;font-size:inherit;line-height:inherit;height:", ";margin-right:", ";", ";", ";", ""], Object(themes_["pick"])({
527
- enterprise: themes_["variables"].textGray,
528
- prisma: themes_["variables"].contentColorMuted
529
- }), themes_["variables"].lineHeight, Object(themes_["pick"])({
530
- enterprise: '10px',
531
- prisma: '14px'
532
- }), function (_ref11) {
533
- var $hasStartAdornment = _ref11.$hasStartAdornment,
534
- $startAdornmentWidth = _ref11.$startAdornmentWidth;
535
- return $hasStartAdornment && ($startAdornmentWidth ? Object(external_styled_components_["css"])(["margin-left:", "px;"], $startAdornmentWidth) : Object(external_styled_components_["css"])(["margin-left:", ";"], Object(themes_["pick"])({
536
- enterprise: {
537
- comfortable: '30px',
538
- compact: '26px'
539
- },
540
- prisma: {
541
- comfortable: '38px',
542
- compact: '30px'
568
+ function oe(e) {
569
+ return pe(e) || ce(e) || se(e) || le();
543
570
  }
544
- })));
545
- }, function (_ref12) {
546
- var $hasEndAdornment = _ref12.$hasEndAdornment,
547
- $endAdornmentWidth = _ref12.$endAdornmentWidth;
548
- return $hasEndAdornment && ($endAdornmentWidth // calc(100% - padding - adorment width)
549
- ? Object(external_styled_components_["css"])(["max-width:calc( 100% - ", " - ", "px );"], Object(themes_["pick"])({
550
- enterprise: '10px',
551
- prisma: '14px'
552
- }), $endAdornmentWidth) : Object(external_styled_components_["css"])(["max-width:calc( 100% - ", " - ", " );"], Object(themes_["pick"])({
553
- enterprise: '10px',
554
- prisma: '14px'
555
- }), Object(themes_["pick"])({
556
- enterprise: {
557
- comfortable: '30px',
558
- compact: '26px'
559
- },
560
- prisma: {
561
- comfortable: '38px',
562
- compact: '30px'
571
+ function le() {
572
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
563
573
  }
564
- })));
565
- }, function (_ref13) {
566
- var $hasBothAdornment = _ref13.$hasBothAdornment,
567
- $endAdornmentWidth = _ref13.$endAdornmentWidth,
568
- $startAdornmentWidth = _ref13.$startAdornmentWidth;
569
- return $hasBothAdornment && Object(external_styled_components_["css"])(["max-width:calc(100% - ", "px - ", "px);"], $startAdornmentWidth, $endAdornmentWidth);
570
- });
571
- var adornmentHolder = Object(external_styled_components_["css"])(["display:inline-flex;align-items:center;justify-content:center;height:", ";pointer-events:none;"], Object(themes_["pick"])({
572
- enterprise: {
573
- comfortable: '30px',
574
- compact: '26px'
575
- },
576
- prisma: {
577
- comfortable: '38px',
578
- compact: '30px'
579
- }
580
- }));
581
- var StyledStartAdornmentHolder = external_styled_components_default.a.div.withConfig({
582
- displayName: "TextStyles__StyledStartAdornmentHolder",
583
- componentId: "eg7n6t-7"
584
- })(["", " ", ";"], adornmentHolder, function (_ref14) {
585
- var $width = _ref14.$width;
586
- return $width ? Object(external_styled_components_["css"])(["min-width:", "px;"], $width) : Object(external_styled_components_["css"])(["min-width:", ";"], Object(themes_["pick"])({
587
- enterprise: {
588
- comfortable: '30px',
589
- compact: '26px'
590
- },
591
- prisma: {
592
- comfortable: '38px',
593
- compact: '30px'
574
+ function se(e, t) {
575
+ if (!e) return;
576
+ if (typeof e === "string") return de(e, t);
577
+ var r = Object.prototype.toString.call(e).slice(8, -1);
578
+ if (r === "Object" && e.constructor) r = e.constructor.name;
579
+ if (r === "Map" || r === "Set") return Array.from(e);
580
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return de(e, t);
594
581
  }
595
- }));
596
- });
597
- var StyledEndAdornmentHolder = external_styled_components_default.a.div.withConfig({
598
- displayName: "TextStyles__StyledEndAdornmentHolder",
599
- componentId: "eg7n6t-8"
600
- })(["", " ", ";"], adornmentHolder, function (_ref15) {
601
- var $width = _ref15.$width;
602
- return $width ? Object(external_styled_components_["css"])(["min-width:", "px;"], $width) : Object(external_styled_components_["css"])(["min-width:", ";"], Object(themes_["pick"])({
603
- enterprise: {
604
- comfortable: '30px',
605
- compact: '26px'
606
- },
607
- prisma: {
608
- comfortable: '38px',
609
- compact: '30px'
582
+ function ce(e) {
583
+ if (typeof Symbol !== "undefined" && Symbol.iterator in Object(e)) return Array.from(e);
610
584
  }
611
- }));
612
- });
613
- var StyledAdornment = external_styled_components_default.a.div.withConfig({
614
- displayName: "TextStyles__StyledAdornment",
615
- componentId: "eg7n6t-9"
616
- })(["display:inline-flex;align-items:center;justify-content:center;position:absolute;pointer-events:none;z-index:1;height:", ";color:", ";", ";", ";", ""], Object(themes_["pick"])({
617
- enterprise: {
618
- comfortable: '30px',
619
- compact: '26px'
620
- },
621
- prisma: {
622
- comfortable: '38px',
623
- compact: '30px'
624
- }
625
- }), Object(themes_["pick"])({
626
- enterprise: {
627
- light: themes_["variables"].gray60,
628
- dark: themes_["variables"].white
629
- },
630
- prisma: themes_["variables"].contentColorMuted
631
- }), function (_ref16) {
632
- var $position = _ref16.$position;
633
- return $position === 'start' ? Object(external_styled_components_["css"])(["top:1px;left:1px;"]) : Object(external_styled_components_["css"])(["top:1px;right:1px;"]);
634
- }, function (_ref17) {
635
- var disabled = _ref17.disabled;
636
- return disabled && disabledStyles;
637
- }, Object(themes_["pick"])({
638
- enterprise: Object(external_styled_components_["css"])(["margin-left:-1px;margin-right:-1px;"])
639
- }));
640
-
641
- // EXTERNAL MODULE: ./src/utils/updateReactRef.ts
642
- var updateReactRef = __webpack_require__(10);
643
-
644
- // CONCATENATED MODULE: ./src/Text/Text.tsx
645
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
646
-
647
- function Text_extends() { Text_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return Text_extends.apply(this, arguments); }
648
-
649
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
650
-
651
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
652
-
653
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
654
-
655
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
656
-
657
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
658
-
659
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
660
-
661
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
662
-
663
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
664
-
665
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
666
-
667
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
668
-
669
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
670
-
671
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
672
-
673
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
674
-
675
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
676
-
677
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
678
-
679
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
680
-
681
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
682
-
683
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
684
-
685
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
686
-
687
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
688
-
689
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
690
-
691
-
692
-
693
-
694
-
695
-
696
-
697
-
698
-
699
-
700
-
701
-
702
-
703
-
704
-
705
-
706
-
707
-
708
-
709
-
710
-
711
- /** @public */
712
-
713
- var propTypes = {
714
- appearance: external_prop_types_default.a.oneOf(['default', 'search']),
715
- append: external_prop_types_default.a.bool,
716
- autoCapitalize: external_prop_types_default.a.string,
717
- autoComplete: external_prop_types_default.a.string,
718
- autoCorrect: external_prop_types_default.a.string,
719
- autoFocus: external_prop_types_default.a.bool,
720
- canClear: external_prop_types_default.a.bool,
721
- children: external_prop_types_default.a.node,
722
-
723
- /** @private. */
724
- classNamePrivate: external_prop_types_default.a.string,
725
- defaultValue: external_prop_types_default.a.string,
726
- describedBy: external_prop_types_default.a.string,
727
- disabled: external_prop_types_default.a.bool,
728
- elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
729
- endAdornment: external_prop_types_default.a.node,
730
- error: external_prop_types_default.a.bool,
731
- inline: external_prop_types_default.a.bool,
732
-
733
- /** @private. */
734
- inputClassName: external_prop_types_default.a.string,
735
- inputId: external_prop_types_default.a.string,
736
- inputRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
737
- labelledBy: external_prop_types_default.a.string,
738
- maxLength: external_prop_types_default.a.number,
739
- multiline: external_prop_types_default.a.bool,
740
- name: external_prop_types_default.a.string,
741
- onBlur: external_prop_types_default.a.func,
742
- onChange: external_prop_types_default.a.func,
743
- onFocus: external_prop_types_default.a.func,
744
- onKeyDown: external_prop_types_default.a.func,
745
- onSelect: external_prop_types_default.a.func,
746
- onInputClick: external_prop_types_default.a.func,
747
- placeholder: external_prop_types_default.a.string,
748
- prepend: external_prop_types_default.a.bool,
749
-
750
- /** @private. */
751
- required: external_prop_types_default.a.bool,
752
- rowsMax: external_prop_types_default.a.number,
753
- rowsMin: external_prop_types_default.a.number,
754
- spellCheck: external_prop_types_default.a.bool,
755
- tabIndex: external_prop_types_default.a.number,
756
- startAdornment: external_prop_types_default.a.node,
757
-
758
- /** @private */
759
- splunkTheme: external_prop_types_default.a.object,
760
- type: external_prop_types_default.a.string,
761
- passwordVisibilityToggle: external_prop_types_default.a.bool,
762
- useSyntheticPlaceholder: external_prop_types_default.a.bool,
763
- value: external_prop_types_default.a.string
764
- };
765
- var defaultProps = {
766
- appearance: 'default',
767
- append: false,
768
- autoFocus: false,
769
- canClear: false,
770
- disabled: false,
771
- error: false,
772
- inline: false,
773
- multiline: false,
774
- placeholder: '',
775
- prepend: false,
776
- rowsMax: 8,
777
- rowsMin: 2,
778
- tabIndex: 0,
779
- type: 'text',
780
- passwordVisibilityToggle: false
781
- };
782
-
783
- /** Note: Text places role and aria props onto the input. All other props are placed on the wrapper. */
784
- var Text_Text = /*#__PURE__*/function (_Component) {
785
- _inherits(Text, _Component);
786
-
787
- var _super = _createSuper(Text);
788
-
789
- _createClass(Text, null, [{
790
- key: "validateRows",
791
- // @docs-props-type TextPropsBase
792
- value: function validateRows(_ref) {
793
- var rowsMin = _ref.rowsMin,
794
- rowsMax = _ref.rowsMax;
795
-
796
- if (false) {}
585
+ function pe(e) {
586
+ if (Array.isArray(e)) return de(e);
797
587
  }
798
- }]);
799
-
800
- function Text(props) {
801
- var _this;
802
-
803
- _classCallCheck(this, Text);
804
-
805
- _this = _super.call(this, props);
806
-
807
- _defineProperty(_assertThisInitialized(_this), "controlledExternally", void 0);
808
-
809
- _defineProperty(_assertThisInitialized(_this), "input", null);
810
-
811
- _defineProperty(_assertThisInitialized(_this), "startAdornment", null);
812
-
813
- _defineProperty(_assertThisInitialized(_this), "endAdornment", null);
814
-
815
- _defineProperty(_assertThisInitialized(_this), "getAdornmentWidth", function () {
816
- var startIconRect = _this.startAdornment ? _this.startAdornment.getBoundingClientRect() : undefined;
817
- var startIconWidth = startIconRect && Math.round(startIconRect.width);
818
-
819
- if (_this.state.startAdornmentWidth !== startIconWidth) {
820
- _this.setState({
821
- startAdornmentWidth: startIconWidth
822
- });
823
- }
824
-
825
- var endIconRect = _this.endAdornment ? _this.endAdornment.getBoundingClientRect() : undefined;
826
- var endIconWidth = endIconRect && Math.round(endIconRect.width);
827
-
828
- if (_this.state.endAdornmentWidth !== endIconWidth) {
829
- _this.setState({
830
- endAdornmentWidth: endIconWidth
831
- });
832
- }
833
- });
834
-
835
- _defineProperty(_assertThisInitialized(_this), "handleInputMount", function (el) {
836
- _this.input = el;
837
- Object(updateReactRef["a" /* updateReactRef */])(_this.props.inputRef, el);
838
- });
839
-
840
- _defineProperty(_assertThisInitialized(_this), "handleInputChange", function (e) {
841
- var _this$props$onChange, _this$props;
842
-
843
- var value = e.target.value;
844
- var name = _this.props.name;
845
-
846
- if (!_this.isControlled()) {
847
- _this.setState({
848
- value: value
849
- });
850
- }
851
-
852
- (_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, e, {
853
- value: value,
854
- name: name
855
- });
856
- });
857
-
858
- _defineProperty(_assertThisInitialized(_this), "handleInputKeyDown", function (e) {
859
- var _this$props$onKeyDown, _this$props2;
860
-
861
- (_this$props$onKeyDown = (_this$props2 = _this.props).onKeyDown) === null || _this$props$onKeyDown === void 0 ? void 0 : _this$props$onKeyDown.call(_this$props2, e);
862
- });
863
-
864
- _defineProperty(_assertThisInitialized(_this), "handleInputSelect", function (e) {
865
- var _this$props$onSelect, _this$props3;
866
-
867
- (_this$props$onSelect = (_this$props3 = _this.props).onSelect) === null || _this$props$onSelect === void 0 ? void 0 : _this$props$onSelect.call(_this$props3, e);
868
- });
869
-
870
- _defineProperty(_assertThisInitialized(_this), "handleInputClick", function (e) {
871
- var _this$props$onInputCl, _this$props4;
872
-
873
- (_this$props$onInputCl = (_this$props4 = _this.props).onInputClick) === null || _this$props$onInputCl === void 0 ? void 0 : _this$props$onInputCl.call(_this$props4, e);
874
- });
875
-
876
- _defineProperty(_assertThisInitialized(_this), "handleInputFocus", function (e) {
877
- var _this$props$onFocus, _this$props5;
878
-
879
- (_this$props$onFocus = (_this$props5 = _this.props).onFocus) === null || _this$props$onFocus === void 0 ? void 0 : _this$props$onFocus.call(_this$props5, e);
880
- });
881
-
882
- _defineProperty(_assertThisInitialized(_this), "handleInputBlur", function (e) {
883
- var _this$props$onBlur, _this$props6;
884
-
885
- (_this$props$onBlur = (_this$props6 = _this.props).onBlur) === null || _this$props$onBlur === void 0 ? void 0 : _this$props$onBlur.call(_this$props6, e);
886
- });
887
-
888
- _defineProperty(_assertThisInitialized(_this), "handleClear", function (e) {
889
- var _this$props$onChange2, _this$props7;
890
-
891
- e.preventDefault();
892
- var value = '';
893
- var name = _this.props.name;
894
-
895
- if (!_this.isControlled()) {
896
- _this.setState({
897
- value: value
898
- });
899
- }
900
-
901
- _this.focus();
902
-
903
- (_this$props$onChange2 = (_this$props7 = _this.props).onChange) === null || _this$props$onChange2 === void 0 ? void 0 : _this$props$onChange2.call(_this$props7, e, {
904
- value: value,
905
- name: name
906
- });
907
- });
908
-
909
- _defineProperty(_assertThisInitialized(_this), "handleVisibilityToggle", function () {
910
- _this.setState(function (state) {
911
- return {
912
- hideVisibility: !state.hideVisibility
913
- };
914
- });
915
- });
916
-
917
- _defineProperty(_assertThisInitialized(_this), "renderEndAdornment", function () {
918
- var _controlGroupContext$;
919
-
920
- var _this$props8 = _this.props,
921
- appearance = _this$props8.appearance,
922
- endAdornment = _this$props8.endAdornment,
923
- passwordVisibilityToggle = _this$props8.passwordVisibilityToggle,
924
- disabled = _this$props8.disabled,
925
- canClear = _this$props8.canClear,
926
- splunkTheme = _this$props8.splunkTheme;
927
- var isPrisma = splunkTheme.isPrisma,
928
- isCompact = splunkTheme.isCompact,
929
- isEnterprise = splunkTheme.isEnterprise;
930
- var prismaSize = isCompact ? '20px' : '24px';
931
- var adornmentProps = {
932
- ref: function ref(el) {
933
- _this.endAdornment = el;
934
- },
935
- disabled: disabled,
936
- $position: 'end'
937
- };
938
-
939
- if (endAdornment) {
940
- return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, endAdornment);
941
- }
942
-
943
- if (passwordVisibilityToggle && !disabled) {
944
- var eyeIcon = _this.state.hideVisibility ? /*#__PURE__*/external_react_default.a.createElement(Text_IconOutlinedView, null) : /*#__PURE__*/external_react_default.a.createElement(Text_IconOutlinedHide, null);
945
- return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default.a.createElement(StyledVisibilityToggle, {
946
- appearance: isPrisma ? 'secondary' : 'pill',
947
- "data-test": "password-toggle",
948
- inline: false,
949
- onClick: _this.handleVisibilityToggle,
950
- type: "button",
951
- icon: eyeIcon
952
- }));
953
- }
954
-
955
- var controlGroupContext = _this.context;
956
- var controlGroupLabel = (_controlGroupContext$ = controlGroupContext.labelAttrs) === null || _controlGroupContext$ === void 0 ? void 0 : _controlGroupContext$.text;
957
- var clearButtonText = controlGroupLabel ? Object(i18n_["_"])("Clear ".concat(controlGroupLabel, " text field")) : Object(i18n_["_"])('Clear text field');
958
-
959
- var displayValue = _this.getDisplayValue();
960
-
961
- if (!isPrisma && appearance === 'search') {
962
- if (!displayValue) {
963
- return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default.a.createElement(StyledSearchIconWrapper, {
964
- $disabled: disabled
965
- }, /*#__PURE__*/external_react_default.a.createElement(Search_default.a, {
966
- screenReaderText: null,
967
- hideDefaultTooltip: true,
968
- size: "16px",
969
- inline: false
970
- })));
588
+ function de(e, t) {
589
+ if (t == null || t > e.length) t = e.length;
590
+ for (var r = 0, n = new Array(t); r < t; r++) {
591
+ n[r] = e[r];
971
592
  }
972
-
973
- return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, !disabled && /*#__PURE__*/external_react_default.a.createElement(StyledClearButton, {
974
- appearance: isPrisma ? 'secondary' : 'pill',
975
- "data-test": "clear",
976
- inline: false,
977
- icon: isEnterprise ? /*#__PURE__*/external_react_default.a.createElement(Close_default.a, {
978
- size: 1,
979
- screenReaderText: clearButtonText
980
- }) : /*#__PURE__*/external_react_default.a.createElement(Cross_default.a, {
981
- "aria-label": clearButtonText
982
- }),
983
- onClick: _this.handleClear
984
- }), /*#__PURE__*/external_react_default.a.createElement(StyledSearchIconWrapper, {
985
- $disabled: disabled
986
- }, isEnterprise ? /*#__PURE__*/external_react_default.a.createElement(Search_default.a, {
987
- screenReaderText: null,
988
- hideDefaultTooltip: true,
989
- size: "16px",
990
- inline: false
991
- }) : /*#__PURE__*/external_react_default.a.createElement(Magnifier_default.a, {
992
- width: prismaSize,
993
- height: prismaSize
994
- })));
995
- }
996
-
997
- if (!!displayValue && (isPrisma && appearance === 'search' || canClear)) {
998
- return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, !disabled && /*#__PURE__*/external_react_default.a.createElement(StyledClearButton, {
999
- "data-test": "clear",
1000
- appearance: isPrisma ? 'secondary' : 'pill',
1001
- onClick: _this.handleClear,
1002
- icon: isEnterprise ? /*#__PURE__*/external_react_default.a.createElement(Close_default.a, {
1003
- inline: false,
1004
- screenReaderText: clearButtonText
1005
- }) : /*#__PURE__*/external_react_default.a.createElement(Cross_default.a, {
1006
- "aria-label": clearButtonText,
1007
- height: prismaSize,
1008
- inline: false,
1009
- width: prismaSize
1010
- })
1011
- }));
1012
- }
1013
-
1014
- return undefined;
1015
- });
1016
-
1017
- _defineProperty(_assertThisInitialized(_this), "renderStartAdornment", function () {
1018
- var _this$props9 = _this.props,
1019
- appearance = _this$props9.appearance,
1020
- startAdornment = _this$props9.startAdornment,
1021
- splunkTheme = _this$props9.splunkTheme,
1022
- disabled = _this$props9.disabled;
1023
- var isPrisma = splunkTheme.isPrisma,
1024
- isCompact = splunkTheme.isCompact;
1025
- var prismaSize = isCompact ? '20px' : '24px';
1026
- var adornmentProps = {
1027
- ref: function ref(el) {
1028
- _this.startAdornment = el;
1029
- },
1030
- disabled: disabled,
1031
- $position: 'start'
1032
- };
1033
-
1034
- if (startAdornment) {
1035
- return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, startAdornment);
1036
- }
1037
-
1038
- if (isPrisma && appearance === 'search') {
1039
- return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default.a.createElement(StyledSearchIconWrapper, {
1040
- $disabled: disabled
1041
- }, /*#__PURE__*/external_react_default.a.createElement(Magnifier_default.a, {
1042
- "aria-label": "Search",
1043
- height: prismaSize,
1044
- width: prismaSize
1045
- })));
1046
- }
1047
-
1048
- return undefined;
1049
- });
1050
-
1051
- _defineProperty(_assertThisInitialized(_this), "getDisplayValue", function () {
1052
- var displayValue = _this.isControlled() ? _this.props.value : _this.state.value;
1053
- return displayValue;
1054
- });
1055
-
1056
- _this.controlledExternally = has_default()(props, 'value');
1057
- _this.state = {
1058
- value: props.defaultValue || '',
1059
- hideVisibility: true
1060
- };
1061
-
1062
- if (false) {}
1063
-
1064
- if (false) {}
1065
-
1066
- if (has_default()(props, 'useSyntheticPlaceholder')) {
1067
- // eslint-disable-next-line no-console
1068
- console.warn("The 'Text' prop 'useSyntheticPlaceholder' has been marked for deprecation.");
593
+ return n;
1069
594
  }
1070
-
1071
- if (false) {}
1072
-
1073
- if (false) {}
1074
-
1075
- Text.validateRows(props);
1076
- return _this;
1077
- }
1078
-
1079
- _createClass(Text, [{
1080
- key: "componentDidMount",
1081
- value: function componentDidMount() {
1082
- this.getAdornmentWidth();
595
+ function ue(e, t) {
596
+ var r = Object.keys(e);
597
+ if (Object.getOwnPropertySymbols) {
598
+ var n = Object.getOwnPropertySymbols(e);
599
+ if (t) n = n.filter((function(t) {
600
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
601
+ }));
602
+ r.push.apply(r, n);
603
+ }
604
+ return r;
1083
605
  }
1084
- }, {
1085
- key: "componentDidUpdate",
1086
- value: function componentDidUpdate(prevProps) {
1087
- if (false) {}
1088
-
1089
- if (false) {}
1090
-
1091
- Text.validateRows(this.props);
1092
- this.getAdornmentWidth();
606
+ function fe(e) {
607
+ for (var t = 1; t < arguments.length; t++) {
608
+ var r = arguments[t] != null ? arguments[t] : {};
609
+ if (t % 2) {
610
+ ue(Object(r), true).forEach((function(t) {
611
+ Ee(e, t, r[t]);
612
+ }));
613
+ } else if (Object.getOwnPropertyDescriptors) {
614
+ Object.defineProperties(e, Object.getOwnPropertyDescriptors(r));
615
+ } else {
616
+ ue(Object(r)).forEach((function(t) {
617
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
618
+ }));
619
+ }
620
+ }
621
+ return e;
1093
622
  }
1094
- }, {
1095
- key: "isControlled",
1096
- value: function isControlled() {
1097
- return this.controlledExternally;
623
+ function me(e, t) {
624
+ if (e == null) return {};
625
+ var r = he(e, t);
626
+ var n, i;
627
+ if (Object.getOwnPropertySymbols) {
628
+ var a = Object.getOwnPropertySymbols(e);
629
+ for (i = 0; i < a.length; i++) {
630
+ n = a[i];
631
+ if (t.indexOf(n) >= 0) continue;
632
+ if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
633
+ r[n] = e[n];
634
+ }
635
+ }
636
+ return r;
1098
637
  }
1099
- }, {
1100
- key: "blur",
1101
- value: function blur() {
1102
- var _this$input;
1103
-
1104
- (_this$input = this.input) === null || _this$input === void 0 ? void 0 : _this$input.blur();
638
+ function he(e, t) {
639
+ if (e == null) return {};
640
+ var r = {};
641
+ var n = Object.keys(e);
642
+ var i, a;
643
+ for (a = 0; a < n.length; a++) {
644
+ i = n[a];
645
+ if (t.indexOf(i) >= 0) continue;
646
+ r[i] = e[i];
647
+ }
648
+ return r;
1105
649
  }
1106
- /**
1107
- * Place focus on the input.
1108
- */
1109
-
1110
- }, {
1111
- key: "focus",
1112
- value: function focus(options) {
1113
- var _this$input2;
1114
-
1115
- (_this$input2 = this.input) === null || _this$input2 === void 0 ? void 0 : _this$input2.focus(options);
650
+ function ve(e, t) {
651
+ if (!(e instanceof t)) {
652
+ throw new TypeError("Cannot call a class as a function");
653
+ }
1116
654
  }
1117
- }, {
1118
- key: "select",
1119
- value: function select() {
1120
- var _this$input3;
1121
-
1122
- (_this$input3 = this.input) === null || _this$input3 === void 0 ? void 0 : _this$input3.select();
655
+ function be(e, t) {
656
+ for (var r = 0; r < t.length; r++) {
657
+ var n = t[r];
658
+ n.enumerable = n.enumerable || false;
659
+ n.configurable = true;
660
+ if ("value" in n) n.writable = true;
661
+ Object.defineProperty(e, n.key, n);
662
+ }
1123
663
  }
1124
- }, {
1125
- key: "render",
1126
- value: function render() {
1127
- var _this$props10 = this.props,
1128
- append = _this$props10.append,
1129
- autoCapitalize = _this$props10.autoCapitalize,
1130
- autoComplete = _this$props10.autoComplete,
1131
- autoCorrect = _this$props10.autoCorrect,
1132
- autoFocus = _this$props10.autoFocus,
1133
- children = _this$props10.children,
1134
- className = _this$props10.className,
1135
- classNamePrivate = _this$props10.classNamePrivate,
1136
- disabled = _this$props10.disabled,
1137
- describedBy = _this$props10.describedBy,
1138
- elementRef = _this$props10.elementRef,
1139
- error = _this$props10.error,
1140
- inline = _this$props10.inline,
1141
- inputClassName = _this$props10.inputClassName,
1142
- inputId = _this$props10.inputId,
1143
- labelledBy = _this$props10.labelledBy,
1144
- multiline = _this$props10.multiline,
1145
- maxLength = _this$props10.maxLength,
1146
- name = _this$props10.name,
1147
- passwordVisibilityToggle = _this$props10.passwordVisibilityToggle,
1148
- placeholder = _this$props10.placeholder,
1149
- prepend = _this$props10.prepend,
1150
- required = _this$props10.required,
1151
- spellCheck = _this$props10.spellCheck,
1152
- tabIndex = _this$props10.tabIndex,
1153
- title = _this$props10.title,
1154
- type = _this$props10.type,
1155
- useSyntheticPlaceholder = _this$props10.useSyntheticPlaceholder,
1156
- otherProps = _objectWithoutProperties(_this$props10, ["append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "labelledBy", "multiline", "maxLength", "name", "passwordVisibilityToggle", "placeholder", "prepend", "required", "spellCheck", "tabIndex", "title", "type", "useSyntheticPlaceholder"]);
1157
-
1158
- var ariaProps = _objectSpread(_objectSpread({
1159
- role: 'textbox'
1160
- }, pickBy_default()(otherProps, function (val, key) {
1161
- return key === 'role' || key.indexOf('aria-') === 0;
1162
- })), {}, {
1163
- 'aria-describedby': describedBy,
1164
- 'aria-labelledby': labelledBy,
1165
- 'aria-invalid': error || undefined
1166
- });
1167
-
1168
- var boxProps = omit_default()(otherProps, ['inputRef', 'onBlur', 'onChange', 'onFocus', 'onKeyDown', 'onSelect', 'onInputClick', 'rowsMax', 'rowsMin'].concat(_toConsumableArray(keys_default()(ariaProps))));
1169
- var displayValue = this.getDisplayValue();
1170
- var displayProps = {
1171
- className: Object(style_["toClassName"])(className, inputClassName),
1172
- $append: append || undefined,
1173
- $error: error,
1174
- $prepend: prepend || undefined
1175
- };
1176
- var passwordVisibility = this.state.hideVisibility ? 'password' : 'text';
1177
- var computedType = passwordVisibilityToggle ? passwordVisibility : type;
1178
-
1179
- var inputProps = _objectSpread(_objectSpread({}, ariaProps), {}, {
1180
- 'data-test': 'textbox',
1181
- autoCapitalize: autoCapitalize,
1182
- autoComplete: autoComplete,
1183
- autoCorrect: autoCorrect,
1184
- autoFocus: autoFocus,
1185
- id: inputId,
1186
- maxLength: maxLength,
1187
- placeholder: placeholder && !useSyntheticPlaceholder ? placeholder : undefined,
1188
- name: name,
1189
- onChange: this.handleInputChange,
1190
- onKeyDown: this.handleInputKeyDown,
1191
- onSelect: this.handleInputSelect,
1192
- onClick: this.handleInputClick,
1193
- onFocus: this.handleInputFocus,
1194
- onBlur: this.handleInputBlur,
1195
- ref: this.handleInputMount,
1196
- required: required,
1197
- spellCheck: spellCheck,
1198
- style: {
1199
- height: this.state.height
1200
- },
1201
- title: title,
1202
- tabIndex: tabIndex,
1203
- type: computedType,
1204
- value: displayValue,
1205
- $error: error
1206
- });
1207
-
1208
- var haveSyntheticPlaceholder = useSyntheticPlaceholder && placeholder && !displayValue; // Do not render value in DOM when type is password, or passwordVisibilityToggle is enabled
1209
-
1210
- var dataTestValue = type === 'password' || passwordVisibilityToggle ? undefined : displayValue; // Firefox hack (SUI-2716). Remove when fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1427173
1211
-
1212
- var isTimeInput = type === 'time';
1213
- var hasEndAdornment = !!this.renderEndAdornment();
1214
- var hasStartAdornment = !!this.renderStartAdornment();
1215
-
1216
- if (multiline) {
1217
- return /*#__PURE__*/external_react_default.a.createElement(TextArea_default.a, this.props);
1218
- }
1219
-
1220
- return /*#__PURE__*/external_react_default.a.createElement(StyledBox, Text_extends({
1221
- tabIndex: -1,
1222
- $isTimeInput: isTimeInput,
1223
- className: Object(style_["toClassName"])(className, classNamePrivate),
1224
- "data-test": "text",
1225
- "data-test-value": dataTestValue,
1226
- elementRef: elementRef,
1227
- flex: true,
1228
- inline: inline
1229
- }, boxProps), this.renderStartAdornment(), /*#__PURE__*/external_react_default.a.createElement(StyledInputWrapper, Text_extends({
1230
- $hasEndAdornment: hasEndAdornment,
1231
- $hasStartAdornment: hasStartAdornment,
1232
- disabled: disabled
1233
- }, displayProps), hasStartAdornment && /*#__PURE__*/external_react_default.a.createElement(StyledStartAdornmentHolder, {
1234
- $width: this.state.startAdornmentWidth
1235
- }), disabled ? /*#__PURE__*/external_react_default.a.createElement(StyledInput, Text_extends({
1236
- className: Object(style_["toClassName"])(className, classNamePrivate),
1237
- "data-test": "textbox",
1238
- disabled: true,
1239
- readOnly: true,
1240
- type: computedType,
1241
- value: displayValue,
1242
- placeholder: placeholder && !useSyntheticPlaceholder ? placeholder : undefined
1243
- }, ariaProps)) : /*#__PURE__*/external_react_default.a.createElement(StyledInput, Text_extends({}, inputProps, {
1244
- onClick: this.handleInputClick
1245
- })), haveSyntheticPlaceholder && /*#__PURE__*/external_react_default.a.createElement(ScreenReaderContent_default.a, null, placeholder), haveSyntheticPlaceholder && /*#__PURE__*/external_react_default.a.createElement(StyledPlaceholder, {
1246
- $endAdornmentWidth: this.state.endAdornmentWidth,
1247
- $hasBothAdornment: hasStartAdornment && hasEndAdornment // used to calculate the max-width
1248
- ,
1249
- $hasEndAdornment: hasEndAdornment,
1250
- $hasStartAdornment: hasStartAdornment,
1251
- $startAdornmentWidth: this.state.startAdornmentWidth,
1252
- "aria-hidden": true,
1253
- "data-role": "placeholder"
1254
- }, placeholder), children, hasEndAdornment && /*#__PURE__*/external_react_default.a.createElement(StyledEndAdornmentHolder, {
1255
- $width: this.state.endAdornmentWidth
1256
- })), this.renderEndAdornment());
664
+ function ye(e, t, r) {
665
+ if (t) be(e.prototype, t);
666
+ if (r) be(e, r);
667
+ return e;
668
+ }
669
+ function Ce(e, t) {
670
+ if (typeof t !== "function" && t !== null) {
671
+ throw new TypeError("Super expression must either be null or a function");
672
+ }
673
+ e.prototype = Object.create(t && t.prototype, {
674
+ constructor: {
675
+ value: e,
676
+ writable: true,
677
+ configurable: true
678
+ }
679
+ });
680
+ if (t) ge(e, t);
681
+ }
682
+ function ge(e, t) {
683
+ ge = Object.setPrototypeOf || function e(t, r) {
684
+ t.__proto__ = r;
685
+ return t;
686
+ };
687
+ return ge(e, t);
688
+ }
689
+ function xe(e) {
690
+ var t = Le();
691
+ return function r() {
692
+ var n = Se(e), i;
693
+ if (t) {
694
+ var a = Se(this).constructor;
695
+ i = Reflect.construct(n, arguments, a);
696
+ } else {
697
+ i = n.apply(this, arguments);
698
+ }
699
+ return we(this, i);
700
+ };
701
+ }
702
+ function we(e, t) {
703
+ if (t && (ie(t) === "object" || typeof t === "function")) {
704
+ return t;
705
+ }
706
+ return ke(e);
1257
707
  }
1258
- }]);
1259
-
1260
- return Text;
1261
- }(external_react_["Component"]);
1262
-
1263
- _defineProperty(Text_Text, "propTypes", propTypes);
1264
-
1265
- _defineProperty(Text_Text, "defaultProps", defaultProps);
1266
-
1267
- _defineProperty(Text_Text, "componentType", 'Text');
1268
-
1269
- _defineProperty(Text_Text, "contextType", ControlGroup_["ControlGroupContext"]);
1270
-
1271
- var TextWithThemeBase = Object(themes_["withSplunkTheme"])(Text_Text);
1272
- var TextWithTheme = TextWithThemeBase;
1273
- TextWithTheme.propTypes = Text_Text.propTypes;
1274
- TextWithTheme.componentType = Text_Text.componentType;
1275
- /* harmony default export */ var src_Text_Text = (TextWithTheme);
1276
- // CONCATENATED MODULE: ./src/Text/index.ts
1277
-
1278
-
1279
-
1280
- /***/ }),
1281
-
1282
- /***/ 2:
1283
- /***/ (function(module, exports) {
1284
-
1285
- module.exports = require("react");
1286
-
1287
- /***/ }),
1288
-
1289
- /***/ 26:
1290
- /***/ (function(module, exports) {
1291
-
1292
- module.exports = require("@splunk/react-icons/Cross");
1293
-
1294
- /***/ }),
1295
-
1296
- /***/ 27:
1297
- /***/ (function(module, exports) {
1298
-
1299
- module.exports = require("@splunk/react-icons/enterprise/Close");
1300
-
1301
- /***/ }),
1302
-
1303
- /***/ 3:
1304
- /***/ (function(module, exports) {
1305
-
1306
- module.exports = require("styled-components");
1307
-
1308
- /***/ }),
1309
-
1310
- /***/ 34:
1311
- /***/ (function(module, exports) {
1312
-
1313
- module.exports = require("@splunk/react-icons/SVGEnterprise");
1314
-
1315
- /***/ }),
1316
-
1317
- /***/ 4:
1318
- /***/ (function(module, exports) {
1319
-
1320
- module.exports = require("@splunk/ui-utils/i18n");
1321
-
1322
- /***/ }),
1323
-
1324
- /***/ 41:
1325
- /***/ (function(module, exports) {
1326
-
1327
- module.exports = require("@splunk/ui-utils/style");
1328
-
1329
- /***/ }),
1330
-
1331
- /***/ 49:
1332
- /***/ (function(module, exports) {
1333
-
1334
- module.exports = require("@splunk/react-icons/Magnifier");
1335
-
1336
- /***/ }),
1337
-
1338
- /***/ 5:
1339
- /***/ (function(module, exports) {
1340
-
1341
- module.exports = require("lodash/omit");
1342
-
1343
- /***/ }),
1344
-
1345
- /***/ 54:
1346
- /***/ (function(module, exports) {
1347
-
1348
- module.exports = require("@splunk/react-icons/enterprise/Search");
1349
-
1350
- /***/ }),
1351
-
1352
- /***/ 6:
1353
- /***/ (function(module, exports) {
1354
-
1355
- module.exports = require("@splunk/react-ui/Box");
1356
-
1357
- /***/ }),
1358
-
1359
- /***/ 63:
1360
- /***/ (function(module, exports) {
1361
-
1362
- module.exports = require("lodash/pickBy");
1363
-
1364
- /***/ }),
1365
-
1366
- /***/ 9:
1367
- /***/ (function(module, exports) {
1368
-
1369
- module.exports = require("lodash/keys");
1370
-
1371
- /***/ })
1372
-
1373
- /******/ });
708
+ function ke(e) {
709
+ if (e === void 0) {
710
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
711
+ }
712
+ return e;
713
+ }
714
+ function Le() {
715
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
716
+ if (Reflect.construct.sham) return false;
717
+ if (typeof Proxy === "function") return true;
718
+ try {
719
+ Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
720
+ return true;
721
+ } catch (e) {
722
+ return false;
723
+ }
724
+ }
725
+ function Se(e) {
726
+ Se = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
727
+ return t.__proto__ || Object.getPrototypeOf(t);
728
+ };
729
+ return Se(e);
730
+ }
731
+ function Ee(e, t, r) {
732
+ if (t in e) {
733
+ Object.defineProperty(e, t, {
734
+ value: r,
735
+ enumerable: true,
736
+ configurable: true,
737
+ writable: true
738
+ });
739
+ } else {
740
+ e[t] = r;
741
+ }
742
+ return e;
743
+ }
744
+ /** @public */ var Ae = {
745
+ appearance: a().oneOf([ "default", "search" ]),
746
+ append: a().bool,
747
+ autoCapitalize: a().string,
748
+ autoComplete: a().string,
749
+ autoCorrect: a().string,
750
+ autoFocus: a().bool,
751
+ canClear: a().bool,
752
+ children: a().node,
753
+ /** @private. */
754
+ classNamePrivate: a().string,
755
+ defaultValue: a().string,
756
+ describedBy: a().string,
757
+ disabled: a().bool,
758
+ elementRef: a().oneOfType([ a().func, a().object ]),
759
+ endAdornment: a().node,
760
+ error: a().bool,
761
+ inline: a().bool,
762
+ /** @private. */
763
+ inputClassName: a().string,
764
+ inputId: a().string,
765
+ inputRef: a().oneOfType([ a().func, a().object ]),
766
+ labelledBy: a().string,
767
+ maxLength: a().number,
768
+ multiline: a().bool,
769
+ name: a().string,
770
+ onBlur: a().func,
771
+ onChange: a().func,
772
+ onFocus: a().func,
773
+ onKeyDown: a().func,
774
+ onSelect: a().func,
775
+ onInputClick: a().func,
776
+ placeholder: a().string,
777
+ prepend: a().bool,
778
+ /** @private. */
779
+ required: a().bool,
780
+ rowsMax: a().number,
781
+ rowsMin: a().number,
782
+ spellCheck: a().bool,
783
+ tabIndex: a().number,
784
+ startAdornment: a().node,
785
+ /** @private */
786
+ splunkTheme: a().object,
787
+ type: a().string,
788
+ passwordVisibilityToggle: a().bool,
789
+ useSyntheticPlaceholder: a().bool,
790
+ value: a().string
791
+ };
792
+ var Oe = {
793
+ appearance: "default",
794
+ append: false,
795
+ autoFocus: false,
796
+ canClear: false,
797
+ disabled: false,
798
+ error: false,
799
+ inline: false,
800
+ multiline: false,
801
+ placeholder: "",
802
+ prepend: false,
803
+ rowsMax: 8,
804
+ rowsMin: 2,
805
+ tabIndex: 0,
806
+ type: "text",
807
+ passwordVisibilityToggle: false
808
+ };
809
+ /** Note: Text places role and aria props onto the input. All other props are placed on the wrapper. */ var Te = function(e) {
810
+ Ce(r, e);
811
+ var t = xe(r);
812
+ ye(r, null, [ {
813
+ key: "validateRows",
814
+ // @docs-props-type TextPropsBase
815
+ value: function e(t) {
816
+ var r = t.rowsMin, n = t.rowsMax;
817
+ if (false) {}
818
+ }
819
+ } ]);
820
+ function r(e) {
821
+ var i;
822
+ ve(this, r);
823
+ i = t.call(this, e);
824
+ Ee(ke(i), "controlledExternally", void 0);
825
+ Ee(ke(i), "input", null);
826
+ Ee(ke(i), "startAdornment", null);
827
+ Ee(ke(i), "endAdornment", null);
828
+ Ee(ke(i), "getAdornmentWidth", (function() {
829
+ var e = i.startAdornment ? i.startAdornment.getBoundingClientRect() : undefined;
830
+ var t = e && Math.round(e.width);
831
+ if (i.state.startAdornmentWidth !== t) {
832
+ i.setState({
833
+ startAdornmentWidth: t
834
+ });
835
+ }
836
+ var r = i.endAdornment ? i.endAdornment.getBoundingClientRect() : undefined;
837
+ var n = r && Math.round(r.width);
838
+ if (i.state.endAdornmentWidth !== n) {
839
+ i.setState({
840
+ endAdornmentWidth: n
841
+ });
842
+ }
843
+ }));
844
+ Ee(ke(i), "handleInputMount", (function(e) {
845
+ i.input = e;
846
+ ne(i.props.inputRef, e);
847
+ }));
848
+ Ee(ke(i), "handleInputChange", (function(e) {
849
+ var t, r;
850
+ var n = e.target.value;
851
+ var a = i.props.name;
852
+ if (!i.isControlled()) {
853
+ i.setState({
854
+ value: n
855
+ });
856
+ }
857
+ (t = (r = i.props).onChange) === null || t === void 0 ? void 0 : t.call(r, e, {
858
+ value: n,
859
+ name: a
860
+ });
861
+ }));
862
+ Ee(ke(i), "handleInputKeyDown", (function(e) {
863
+ var t, r;
864
+ (t = (r = i.props).onKeyDown) === null || t === void 0 ? void 0 : t.call(r, e);
865
+ }));
866
+ Ee(ke(i), "handleInputSelect", (function(e) {
867
+ var t, r;
868
+ (t = (r = i.props).onSelect) === null || t === void 0 ? void 0 : t.call(r, e);
869
+ }));
870
+ Ee(ke(i), "handleInputClick", (function(e) {
871
+ var t, r;
872
+ (t = (r = i.props).onInputClick) === null || t === void 0 ? void 0 : t.call(r, e);
873
+ }));
874
+ Ee(ke(i), "handleInputFocus", (function(e) {
875
+ var t, r;
876
+ (t = (r = i.props).onFocus) === null || t === void 0 ? void 0 : t.call(r, e);
877
+ }));
878
+ Ee(ke(i), "handleInputBlur", (function(e) {
879
+ var t, r;
880
+ (t = (r = i.props).onBlur) === null || t === void 0 ? void 0 : t.call(r, e);
881
+ }));
882
+ Ee(ke(i), "handleClear", (function(e) {
883
+ var t, r;
884
+ e.preventDefault();
885
+ var n = "";
886
+ var a = i.props.name;
887
+ if (!i.isControlled()) {
888
+ i.setState({
889
+ value: n
890
+ });
891
+ }
892
+ i.focus();
893
+ (t = (r = i.props).onChange) === null || t === void 0 ? void 0 : t.call(r, e, {
894
+ value: n,
895
+ name: a
896
+ });
897
+ }));
898
+ Ee(ke(i), "handleVisibilityToggle", (function() {
899
+ i.setState((function(e) {
900
+ return {
901
+ hideVisibility: !e.hideVisibility
902
+ };
903
+ }));
904
+ }));
905
+ Ee(ke(i), "renderEndAdornment", (function() {
906
+ var e;
907
+ var t = i.props, r = t.appearance, a = t.endAdornment, o = t.passwordVisibilityToggle, l = t.disabled, s = t.canClear, c = t.splunkTheme;
908
+ var p = c.isPrisma, d = c.isCompact, u = c.isEnterprise;
909
+ var f = d ? "20px" : "24px";
910
+ var m = {
911
+ ref: function e(t) {
912
+ i.endAdornment = t;
913
+ },
914
+ disabled: l,
915
+ $position: "end"
916
+ };
917
+ if (a) {
918
+
919
+ return n().createElement(re, m, a);
920
+ }
921
+ if (o && !l) {
922
+ var h = i.state.hideVisibility ? n().createElement(B, null) : n().createElement(P, null);
923
+
924
+ return n().createElement(re, m, n().createElement(Q, {
925
+ appearance: p ? "secondary" : "pill",
926
+ "data-test": "password-toggle",
927
+ inline: false,
928
+ onClick: i.handleVisibilityToggle,
929
+ type: "button",
930
+ icon: h
931
+ }));
932
+ }
933
+ var b = i.context;
934
+ var C = (e = b.labelAttrs) === null || e === void 0 ? void 0 : e.text;
935
+ var x = C ? (0, T._)("Clear ".concat(C, " text field")) : (0, T._)("Clear text field");
936
+ var k = i.getDisplayValue();
937
+ if (!p && r === "search") {
938
+ if (!k) {
939
+
940
+ return n().createElement(re, m, n().createElement(K, {
941
+ $disabled: l
942
+ }, n().createElement(g(), {
943
+ screenReaderText: null,
944
+ hideDefaultTooltip: true,
945
+ size: "16px",
946
+ inline: false
947
+ })));
948
+ }
949
+
950
+ return n().createElement(re, m, !l && n().createElement(H, {
951
+ appearance: p ? "secondary" : "pill",
952
+ "data-test": "clear",
953
+ inline: false,
954
+ icon: u ? n().createElement(y(), {
955
+ size: 1,
956
+ screenReaderText: x
957
+ }) : n().createElement(v(), {
958
+ "aria-label": x
959
+ }),
960
+ onClick: i.handleClear
961
+ }), n().createElement(K, {
962
+ $disabled: l
963
+ }, u ? n().createElement(g(), {
964
+ screenReaderText: null,
965
+ hideDefaultTooltip: true,
966
+ size: "16px",
967
+ inline: false
968
+ }) : n().createElement(w(), {
969
+ width: f,
970
+ height: f
971
+ })));
972
+ }
973
+ if (!!k && (p && r === "search" || s)) {
974
+
975
+ return n().createElement(re, m, !l && n().createElement(H, {
976
+ "data-test": "clear",
977
+ appearance: p ? "secondary" : "pill",
978
+ onClick: i.handleClear,
979
+ icon: u ? n().createElement(y(), {
980
+ inline: false,
981
+ screenReaderText: x
982
+ }) : n().createElement(v(), {
983
+ "aria-label": x,
984
+ height: f,
985
+ inline: false,
986
+ width: f
987
+ })
988
+ }));
989
+ }
990
+ return undefined;
991
+ }));
992
+ Ee(ke(i), "renderStartAdornment", (function() {
993
+ var e = i.props, t = e.appearance, r = e.startAdornment, a = e.splunkTheme, o = e.disabled;
994
+ var l = a.isPrisma, s = a.isCompact;
995
+ var c = s ? "20px" : "24px";
996
+ var p = {
997
+ ref: function e(t) {
998
+ i.startAdornment = t;
999
+ },
1000
+ disabled: o,
1001
+ $position: "start"
1002
+ };
1003
+ if (r) {
1004
+
1005
+ return n().createElement(re, p, r);
1006
+ }
1007
+ if (l && t === "search") {
1008
+
1009
+ return n().createElement(re, p, n().createElement(K, {
1010
+ $disabled: o
1011
+ }, n().createElement(w(), {
1012
+ "aria-label": "Search",
1013
+ height: c,
1014
+ width: c
1015
+ })));
1016
+ }
1017
+ return undefined;
1018
+ }));
1019
+ Ee(ke(i), "getDisplayValue", (function() {
1020
+ var e = i.isControlled() ? i.props.value : i.state.value;
1021
+ return e;
1022
+ }));
1023
+ i.controlledExternally = l()(e, "value");
1024
+ i.state = {
1025
+ value: e.defaultValue || "",
1026
+ hideVisibility: true
1027
+ };
1028
+ if (false) {}
1029
+ if (false) {}
1030
+ if (l()(e, "useSyntheticPlaceholder")) {
1031
+ // eslint-disable-next-line no-console
1032
+ console.warn("The 'Text' prop 'useSyntheticPlaceholder' has been marked for deprecation.");
1033
+ }
1034
+ if (false) {}
1035
+ if (false) {}
1036
+ r.validateRows(e);
1037
+ return i;
1038
+ }
1039
+ ye(r, [ {
1040
+ key: "componentDidMount",
1041
+ value: function e() {
1042
+ this.getAdornmentWidth();
1043
+ }
1044
+ }, {
1045
+ key: "componentDidUpdate",
1046
+ value: function e(t) {
1047
+ if (false) {}
1048
+ if (false) {}
1049
+ r.validateRows(this.props);
1050
+ this.getAdornmentWidth();
1051
+ }
1052
+ }, {
1053
+ key: "isControlled",
1054
+ value: function e() {
1055
+ return this.controlledExternally;
1056
+ }
1057
+ }, {
1058
+ key: "blur",
1059
+ value: function e() {
1060
+ var t;
1061
+ (t = this.input) === null || t === void 0 ? void 0 : t.blur();
1062
+ }
1063
+ /**
1064
+ * Place focus on the input.
1065
+ */ }, {
1066
+ key: "focus",
1067
+ value: function e(t) {
1068
+ var r;
1069
+ (r = this.input) === null || r === void 0 ? void 0 : r.focus(t);
1070
+ }
1071
+ }, {
1072
+ key: "select",
1073
+ value: function e() {
1074
+ var t;
1075
+ (t = this.input) === null || t === void 0 ? void 0 : t.select();
1076
+ }
1077
+ }, {
1078
+ key: "render",
1079
+ value: function e() {
1080
+ var t = this.props, r = t.append, i = t.autoCapitalize, a = t.autoComplete, o = t.autoCorrect, l = t.autoFocus, s = t.children, p = t.className, u = t.classNamePrivate, m = t.disabled, h = t.describedBy, v = t.elementRef, b = t.error, y = t.inline, C = t.inputClassName, g = t.inputId, x = t.labelledBy, w = t.multiline, k = t.maxLength, S = t.name, A = t.passwordVisibilityToggle, T = t.placeholder, I = t.prepend, j = t.required, M = t.spellCheck, R = t.tabIndex, P = t.title, $ = t.type, _ = t.useSyntheticPlaceholder, B = me(t, [ "append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "labelledBy", "multiline", "maxLength", "name", "passwordVisibilityToggle", "placeholder", "prepend", "required", "spellCheck", "tabIndex", "title", "type", "useSyntheticPlaceholder" ]);
1081
+ var D = fe(fe({
1082
+ role: "textbox"
1083
+ }, f()(B, (function(e, t) {
1084
+ return t === "role" || t.indexOf("aria-") === 0;
1085
+ }))), {}, {
1086
+ "aria-describedby": h,
1087
+ "aria-labelledby": x,
1088
+ "aria-invalid": b || undefined
1089
+ });
1090
+ var N = d()(B, [ "inputRef", "onBlur", "onChange", "onFocus", "onKeyDown", "onSelect", "onInputClick", "rowsMax", "rowsMin" ].concat(oe(c()(D))));
1091
+ var q = this.getDisplayValue();
1092
+ var V = {
1093
+ className: (0, O.toClassName)(p, C),
1094
+ $append: r || undefined,
1095
+ $error: b,
1096
+ $prepend: I || undefined
1097
+ };
1098
+ var W = this.state.hideVisibility ? "password" : "text";
1099
+ var z = A ? W : $;
1100
+ var Z = fe(fe({}, D), {}, {
1101
+ "data-test": "textbox",
1102
+ autoCapitalize: i,
1103
+ autoComplete: a,
1104
+ autoCorrect: o,
1105
+ autoFocus: l,
1106
+ id: g,
1107
+ maxLength: k,
1108
+ placeholder: T && !_ ? T : undefined,
1109
+ name: S,
1110
+ onChange: this.handleInputChange,
1111
+ onKeyDown: this.handleInputKeyDown,
1112
+ onSelect: this.handleInputSelect,
1113
+ onClick: this.handleInputClick,
1114
+ onFocus: this.handleInputFocus,
1115
+ onBlur: this.handleInputBlur,
1116
+ ref: this.handleInputMount,
1117
+ required: j,
1118
+ spellCheck: M,
1119
+ style: {
1120
+ height: this.state.height
1121
+ },
1122
+ title: P,
1123
+ tabIndex: R,
1124
+ type: z,
1125
+ value: q,
1126
+ $error: b
1127
+ });
1128
+ var F = _ && T && !q;
1129
+ // Do not render value in DOM when type is password, or passwordVisibilityToggle is enabled
1130
+ var H = $ === "password" || A ? undefined : q;
1131
+ // Firefox hack (SUI-2716). Remove when fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1427173
1132
+ var K = $ === "time";
1133
+ var Q = !!this.renderEndAdornment();
1134
+ var Y = !!this.renderStartAdornment();
1135
+ if (w) {
1136
+
1137
+ return n().createElement(E(), this.props);
1138
+ }
1139
+
1140
+ return n().createElement(G, ae({
1141
+ tabIndex: -1,
1142
+ $isTimeInput: K,
1143
+ className: (0, O.toClassName)(p, u),
1144
+ "data-test": "text",
1145
+ "data-test-value": H,
1146
+ elementRef: v,
1147
+ flex: true,
1148
+ inline: y
1149
+ }, N), this.renderStartAdornment(), n().createElement(U, ae({
1150
+ $hasEndAdornment: Q,
1151
+ $hasStartAdornment: Y,
1152
+ disabled: m
1153
+ }, V), Y && n().createElement(ee, {
1154
+ $width: this.state.startAdornmentWidth
1155
+ }), m ? n().createElement(J, ae({
1156
+ className: (0, O.toClassName)(p, u),
1157
+ "data-test": "textbox",
1158
+ disabled: true,
1159
+ readOnly: true,
1160
+ type: z,
1161
+ value: q,
1162
+ placeholder: T && !_ ? T : undefined
1163
+ }, D)) : n().createElement(J, ae({}, Z, {
1164
+ onClick: this.handleInputClick
1165
+ })), F && n().createElement(L(), null, T), F && n().createElement(X, {
1166
+ $endAdornmentWidth: this.state.endAdornmentWidth,
1167
+ $hasBothAdornment: Y && Q,
1168
+ $hasEndAdornment: Q,
1169
+ $hasStartAdornment: Y,
1170
+ $startAdornmentWidth: this.state.startAdornmentWidth,
1171
+ "aria-hidden": true,
1172
+ "data-role": "placeholder"
1173
+ }, T), s, Q && n().createElement(te, {
1174
+ $width: this.state.endAdornmentWidth
1175
+ })), this.renderEndAdornment());
1176
+ }
1177
+ } ]);
1178
+ return r;
1179
+ }(r.Component);
1180
+ Ee(Te, "propTypes", Ae);
1181
+ Ee(Te, "defaultProps", Oe);
1182
+ Ee(Te, "componentType", "Text");
1183
+ Ee(Te, "contextType", m.ControlGroupContext);
1184
+ var Ie = (0, A.withSplunkTheme)(Te);
1185
+ var je = Ie;
1186
+ je.propTypes = Te.propTypes;
1187
+ je.componentType = Te.componentType;
1188
+ /* harmony default export */ const Me = je;
1189
+ // CONCATENATED MODULE: ./src/Text/index.ts
1190
+ module.exports = t;
1191
+ /******/})();