@splunk/react-ui 4.21.0 → 4.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/Accordion.js +425 -325
  2. package/Anchor.js +147 -117
  3. package/Animation.js +142 -94
  4. package/AnimationToggle.js +197 -193
  5. package/Box.js +145 -118
  6. package/Breadcrumbs.js +288 -206
  7. package/Button.js +488 -465
  8. package/ButtonGroup.js +160 -128
  9. package/ButtonSimple.js +543 -462
  10. package/CHANGELOG.md +24 -3
  11. package/Calendar.js +1111 -1001
  12. package/Card.js +771 -598
  13. package/CardLayout.js +205 -147
  14. package/Chip.js +509 -488
  15. package/Clickable.js +414 -352
  16. package/CloseButton.js +165 -142
  17. package/Code.js +1807 -2084
  18. package/CollapsiblePanel.js +586 -519
  19. package/Color.js +1068 -1068
  20. package/ColumnLayout.js +402 -363
  21. package/ComboBox.js +903 -794
  22. package/Concertina.js +997 -802
  23. package/ControlGroup.js +687 -594
  24. package/Date.js +567 -547
  25. package/DefinitionList.js +308 -234
  26. package/Divider.js +149 -118
  27. package/Dropdown.js +459 -416
  28. package/DualListbox.js +1479 -1541
  29. package/EventListener.js +94 -97
  30. package/File.js +1051 -969
  31. package/FormRows.js +883 -696
  32. package/Heading.js +216 -193
  33. package/Image.js +446 -402
  34. package/JSONTree.js +690 -551
  35. package/Layer.js +437 -410
  36. package/Link.js +336 -255
  37. package/List.js +213 -161
  38. package/Markdown.js +509 -487
  39. package/Menu.js +1104 -1056
  40. package/Message.js +475 -441
  41. package/MessageBar.js +387 -373
  42. package/Modal.js +810 -634
  43. package/ModalLayer.js +326 -243
  44. package/Monogram.js +308 -276
  45. package/Multiselect.js +3564 -3364
  46. package/Number.js +729 -687
  47. package/Paginator.js +510 -449
  48. package/Paragraph.js +145 -112
  49. package/Popover.js +1459 -1432
  50. package/Progress.js +301 -246
  51. package/RadioBar.js +634 -527
  52. package/RadioList.js +483 -444
  53. package/Resize.js +530 -489
  54. package/ResultsMenu.js +479 -455
  55. package/ScreenReaderContent.js +142 -111
  56. package/Scroll.js +595 -456
  57. package/ScrollContainerContext.js +197 -206
  58. package/Search.js +756 -650
  59. package/Select.js +2446 -2345
  60. package/SidePanel.js +390 -284
  61. package/Slider.js +680 -676
  62. package/SlidingPanels.js +639 -503
  63. package/SplitButton.js +464 -367
  64. package/StaticContent.js +161 -133
  65. package/StepBar.js +386 -358
  66. package/Switch.js +710 -640
  67. package/TabBar.js +741 -680
  68. package/TabLayout.js +406 -322
  69. package/Table.js +4974 -4616
  70. package/Text.js +1170 -1138
  71. package/TextArea.js +1102 -1090
  72. package/Tooltip.js +624 -581
  73. package/TransitionOpen.js +489 -422
  74. package/Typography.js +176 -153
  75. package/WaitSpinner.js +230 -206
  76. package/package.json +7 -7
  77. package/types/src/Color/Color.d.ts +0 -1
  78. package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
  79. package/types/src/JSONTree/TreeNode.d.ts +5 -0
  80. package/types/src/RadioBar/RadioBar.d.ts +1 -0
  81. package/types/src/ResultsMenu/ResultsMenu.d.ts +0 -2
  82. package/types/src/Select/docs/examples/Icons.d.ts +1 -9
  83. package/types/src/Slider/Slider.d.ts +1 -0
  84. package/types/src/TabBar/Tab.d.ts +10 -1
  85. package/types/src/TabBar/TabBar.d.ts +4 -2
  86. package/types/src/Table/Head.d.ts +7 -3
  87. package/types/src/Table/Table.d.ts +3 -2
  88. package/types/src/Table/TableContext.d.ts +2 -0
  89. package/useForceUpdate.js +112 -82
  90. package/useKeyPress.js +74 -71
  91. package/usePrevious.js +65 -65
  92. package/useRovingFocus.js +122 -138
package/Text.js CHANGED
@@ -1,1159 +1,1191 @@
1
- /******/ (() => { // webpackBootstrap
2
- /******/ "use strict";
3
- /******/ // The require scope
4
- /******/ var __webpack_require__ = {};
5
- /******/
6
- /************************************************************************/
7
- /******/ /* webpack/runtime/compat get default export */
8
- /******/ (() => {
9
- /******/ // getDefaultExport function for compatibility with non-harmony modules
10
- /******/ __webpack_require__.n = (module) => {
11
- /******/ var getter = module && module.__esModule ?
12
- /******/ () => (module['default']) :
13
- /******/ () => (module);
14
- /******/ __webpack_require__.d(getter, { a: getter });
15
- /******/ return getter;
16
- /******/ };
17
- /******/ })();
18
- /******/
19
- /******/ /* webpack/runtime/define property getters */
20
- /******/ (() => {
21
- /******/ // define getter functions for harmony exports
22
- /******/ __webpack_require__.d = (exports, definition) => {
23
- /******/ for(var key in definition) {
24
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
25
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
26
- /******/ }
27
- /******/ }
28
- /******/ };
29
- /******/ })();
30
- /******/
31
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
32
- /******/ (() => {
33
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
34
- /******/ })();
35
- /******/
36
- /******/ /* webpack/runtime/make namespace object */
37
- /******/ (() => {
38
- /******/ // define __esModule on exports
39
- /******/ __webpack_require__.r = (exports) => {
40
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
41
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
42
- /******/ }
43
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
44
- /******/ };
45
- /******/ })();
46
- /******/
47
- /************************************************************************/
48
- var __webpack_exports__ = {};
49
- // ESM COMPAT FLAG
50
- __webpack_require__.r(__webpack_exports__);
51
-
52
- // EXPORTS
53
- __webpack_require__.d(__webpack_exports__, {
54
- "default": () => (/* reexport */ Text_Text)
55
- });
56
-
57
- ;// CONCATENATED MODULE: external "react"
58
- const external_react_namespaceObject = require("react");
59
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
60
- ;// CONCATENATED MODULE: external "prop-types"
61
- const external_prop_types_namespaceObject = require("prop-types");
62
- var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
63
- ;// CONCATENATED MODULE: external "lodash/has"
64
- const has_namespaceObject = require("lodash/has");
65
- var has_default = /*#__PURE__*/__webpack_require__.n(has_namespaceObject);
66
- ;// CONCATENATED MODULE: external "lodash/keys"
67
- const keys_namespaceObject = require("lodash/keys");
68
- var keys_default = /*#__PURE__*/__webpack_require__.n(keys_namespaceObject);
69
- ;// CONCATENATED MODULE: external "lodash/omit"
70
- const omit_namespaceObject = require("lodash/omit");
71
- var omit_default = /*#__PURE__*/__webpack_require__.n(omit_namespaceObject);
72
- ;// CONCATENATED MODULE: external "lodash/pickBy"
73
- const pickBy_namespaceObject = require("lodash/pickBy");
74
- var pickBy_default = /*#__PURE__*/__webpack_require__.n(pickBy_namespaceObject);
75
- ;// CONCATENATED MODULE: external "@splunk/react-ui/ControlGroup"
76
- const ControlGroup_namespaceObject = require("@splunk/react-ui/ControlGroup");
77
- ;// CONCATENATED MODULE: external "@splunk/react-icons/Cross"
78
- const Cross_namespaceObject = require("@splunk/react-icons/Cross");
79
- var Cross_default = /*#__PURE__*/__webpack_require__.n(Cross_namespaceObject);
80
- ;// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Close"
81
- const Close_namespaceObject = require("@splunk/react-icons/enterprise/Close");
82
- var Close_default = /*#__PURE__*/__webpack_require__.n(Close_namespaceObject);
83
- ;// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Search"
84
- const Search_namespaceObject = require("@splunk/react-icons/enterprise/Search");
85
- var Search_default = /*#__PURE__*/__webpack_require__.n(Search_namespaceObject);
86
- ;// CONCATENATED MODULE: external "@splunk/react-icons/Magnifier"
87
- const Magnifier_namespaceObject = require("@splunk/react-icons/Magnifier");
88
- var Magnifier_default = /*#__PURE__*/__webpack_require__.n(Magnifier_namespaceObject);
89
- ;// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
90
- const ScreenReaderContent_namespaceObject = require("@splunk/react-ui/ScreenReaderContent");
91
- var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_namespaceObject);
92
- ;// CONCATENATED MODULE: external "@splunk/react-ui/TextArea"
93
- const TextArea_namespaceObject = require("@splunk/react-ui/TextArea");
94
- var TextArea_default = /*#__PURE__*/__webpack_require__.n(TextArea_namespaceObject);
95
- ;// CONCATENATED MODULE: external "@splunk/themes"
96
- const themes_namespaceObject = require("@splunk/themes");
97
- ;// CONCATENATED MODULE: external "@splunk/ui-utils/style"
98
- const style_namespaceObject = require("@splunk/ui-utils/style");
99
- ;// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
100
- const i18n_namespaceObject = require("@splunk/ui-utils/i18n");
101
- ;// CONCATENATED MODULE: external "@splunk/react-icons/SVGEnterprise"
102
- const SVGEnterprise_namespaceObject = require("@splunk/react-icons/SVGEnterprise");
103
- var SVGEnterprise_default = /*#__PURE__*/__webpack_require__.n(SVGEnterprise_namespaceObject);
104
- ;// CONCATENATED MODULE: ./src/Text/IconOutlinedHide.tsx
105
- 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); }
106
-
107
-
108
-
109
-
110
-
111
-
112
- function IconOutlinedHide(props) {
113
- var _useSplunkTheme = (0,themes_namespaceObject.useSplunkTheme)(),
114
- family = _useSplunkTheme.family,
115
- density = _useSplunkTheme.density;
116
-
117
- if (family === 'enterprise') {
118
- return /*#__PURE__*/external_react_default().createElement((SVGEnterprise_default()), _extends({
119
- viewBox: "0 0 24 24",
120
- size: 1.2,
121
- screenReaderText: (0,i18n_namespaceObject._)('Hide password')
122
- }, props), /*#__PURE__*/external_react_default().createElement("path", {
123
- fillRule: "evenodd",
124
- clipRule: "evenodd",
125
- 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",
126
- fill: "currentColor"
127
- }), /*#__PURE__*/external_react_default().createElement("path", {
128
- 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",
129
- fill: "currentColor"
130
- }), /*#__PURE__*/external_react_default().createElement("path", {
131
- 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",
132
- fill: "currentColor"
133
- }));
134
- }
135
-
136
- var size = density === 'compact' ? '20' : '24';
137
- return /*#__PURE__*/external_react_default().createElement("svg", {
138
- width: size,
139
- height: size,
140
- viewBox: "0 0 24 24",
141
- xmlns: "http://www.w3.org/2000/svg",
142
- style: {
143
- display: 'block'
144
- }
145
- }, /*#__PURE__*/external_react_default().createElement("title", null, (0,i18n_namespaceObject._)('Hide password')), /*#__PURE__*/external_react_default().createElement("path", {
146
- fillRule: "evenodd",
147
- clipRule: "evenodd",
148
- 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",
149
- fill: "currentColor"
150
- }), /*#__PURE__*/external_react_default().createElement("path", {
151
- 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",
152
- fill: "currentColor"
153
- }), /*#__PURE__*/external_react_default().createElement("path", {
154
- 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",
155
- fill: "currentColor"
156
- }));
157
- }
158
-
159
- /* harmony default export */ const Text_IconOutlinedHide = (IconOutlinedHide);
160
- ;// CONCATENATED MODULE: ./src/Text/IconOutlinedView.tsx
161
- 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); }
162
-
163
-
164
-
165
-
166
-
167
-
168
- function IconOutlinedView(props) {
169
- var _useSplunkTheme = (0,themes_namespaceObject.useSplunkTheme)(),
170
- family = _useSplunkTheme.family,
171
- density = _useSplunkTheme.density;
172
-
173
- if (family === 'enterprise') {
174
- return /*#__PURE__*/external_react_default().createElement((SVGEnterprise_default()), IconOutlinedView_extends({
175
- viewBox: "0 0 24 24",
176
- size: 1.2,
177
- screenReaderText: (0,i18n_namespaceObject._)('View password')
178
- }, props), /*#__PURE__*/external_react_default().createElement("path", {
179
- fillRule: "evenodd",
180
- clipRule: "evenodd",
181
- 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",
182
- fill: "currentColor"
183
- }), /*#__PURE__*/external_react_default().createElement("path", {
184
- fillRule: "evenodd",
185
- clipRule: "evenodd",
186
- 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",
187
- fill: "currentColor"
188
- }));
189
- }
190
-
191
- var size = density === 'compact' ? '20' : '24';
192
- return /*#__PURE__*/external_react_default().createElement("svg", {
193
- width: size,
194
- height: size,
195
- viewBox: "0 0 24 24",
196
- xmlns: "http://www.w3.org/2000/svg",
197
- style: {
198
- display: 'block'
199
- }
200
- }, /*#__PURE__*/external_react_default().createElement("title", null, (0,i18n_namespaceObject._)('View password')), /*#__PURE__*/external_react_default().createElement("path", {
201
- fillRule: "evenodd",
202
- clipRule: "evenodd",
203
- 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",
204
- fill: "currentColor"
205
- }), /*#__PURE__*/external_react_default().createElement("path", {
206
- fillRule: "evenodd",
207
- clipRule: "evenodd",
208
- 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",
209
- fill: "currentColor"
210
- }));
211
- }
212
-
213
- /* harmony default export */ const Text_IconOutlinedView = (IconOutlinedView);
214
- ;// CONCATENATED MODULE: external "styled-components"
215
- const external_styled_components_namespaceObject = require("styled-components");
216
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
217
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Box"
218
- const Box_namespaceObject = require("@splunk/react-ui/Box");
219
- var Box_default = /*#__PURE__*/__webpack_require__.n(Box_namespaceObject);
220
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Button"
221
- const Button_namespaceObject = require("@splunk/react-ui/Button");
222
- var Button_default = /*#__PURE__*/__webpack_require__.n(Button_namespaceObject);
223
- ;// CONCATENATED MODULE: ./src/Text/TextStyles.ts
224
-
225
-
226
-
227
-
228
- var disabledStyles = (0,external_styled_components_namespaceObject.css)(["&,&[type]{cursor:not-allowed;color:", ";&::placeholder{color:", ";}}"], (0,themes_namespaceObject.pick)({
229
- enterprise: themes_namespaceObject.variables.textDisabledColor,
230
- prisma: themes_namespaceObject.variables.contentColorDisabled
231
- }), (0,themes_namespaceObject.pick)({
232
- enterprise: themes_namespaceObject.variables.textDisabledColor,
233
- prisma: themes_namespaceObject.variables.contentColorDisabled
234
- }));
235
- var buttonStyles = (0,external_styled_components_namespaceObject.css)(["border-radius:", ";cursor:pointer;font-size:0.83333em;flex-grow:0;", ";&:not([disabled]){color:", ";}"], (0,themes_namespaceObject.pick)({
236
- enterprise: themes_namespaceObject.variables.borderRadius,
237
- prisma: '50%'
238
- }), (0,themes_namespaceObject.pick)({
239
- enterprise: (0,external_styled_components_namespaceObject.css)(["width:", ";height:", ";"], themes_namespaceObject.variables.inputHeight, themes_namespaceObject.variables.inputHeight),
240
- prisma: {
241
- comfortable: (0,external_styled_components_namespaceObject.css)(["width:26px;min-width:26px;min-height:26px;margin:8px;padding:0;"]),
242
- compact: (0,external_styled_components_namespaceObject.css)(["width:22px;min-width:22px;min-height:22px;margin:8px;padding:0;"])
243
- }
244
- }), (0,themes_namespaceObject.pick)({
245
- enterprise: {
246
- light: themes_namespaceObject.variables.gray60,
247
- dark: themes_namespaceObject.variables.white
248
- },
249
- prisma: themes_namespaceObject.variables.contentColorMuted
250
- }));
251
- var StyledClearButton = external_styled_components_default()((Button_default())).withConfig({
252
- displayName: "TextStyles__StyledClearButton",
253
- componentId: "eg7n6t-0"
254
- })(["display:none;visibility:hidden;", ""], buttonStyles);
255
- var StyledSearchIconWrapper = external_styled_components_default().span.withConfig({
256
- displayName: "TextStyles__StyledSearchIconWrapper",
257
- componentId: "eg7n6t-1"
258
- })(["", ";color:", ";pointer-events:none;padding:", ";", ""], themes_namespaceObject.mixins.reset('inline-block'), (0,themes_namespaceObject.pick)({
259
- enterprise: {
260
- light: themes_namespaceObject.variables.gray60,
261
- dark: themes_namespaceObject.variables.white
262
- },
263
- prisma: themes_namespaceObject.variables.contentColorMuted
264
- }), (0,themes_namespaceObject.pick)({
265
- comfortable: '0 8px',
266
- compact: '0 6px'
267
- }), function (_ref) {
268
- var $disabled = _ref.$disabled;
269
- return $disabled && (0,external_styled_components_namespaceObject.css)(["", ""], (0,themes_namespaceObject.pick)({
270
- enterprise: (0,external_styled_components_namespaceObject.css)(["color:", ";"], themes_namespaceObject.variables.textDisabledColor),
271
- prisma: (0,external_styled_components_namespaceObject.css)(["color:", ";"], themes_namespaceObject.variables.contentColorDisabled)
272
- }));
273
- });
274
- var StyledBox = external_styled_components_default()((Box_default())).withConfig({
275
- displayName: "TextStyles__StyledBox",
276
- componentId: "eg7n6t-2"
277
- })(["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,themes_namespaceObject.pick)({
278
- enterprise: themes_namespaceObject.variables.spacingHalf,
279
- prisma: themes_namespaceObject.variables.spacingSmall
280
- }),
281
- /* sc-sel */
282
- StyledSearchIconWrapper, (0,themes_namespaceObject.pick)({
283
- enterprise: (0,external_styled_components_namespaceObject.css)(["display:none;"])
284
- }),
285
- /* sc-sel */
286
- StyledClearButton, function (_ref2) {
287
- var $isTimeInput = _ref2.$isTimeInput;
288
- return $isTimeInput && (0,external_styled_components_namespaceObject.css)(["@media screen and (min--moz-device-pixel-ratio:0){", "{display:none;}}"],
289
- /* sc-sel */
290
- StyledClearButton);
291
- });
292
- var StyledInputWrapper = external_styled_components_default().span.withConfig({
293
- displayName: "TextStyles__StyledInputWrapper",
294
- componentId: "eg7n6t-3"
295
- })(["", ";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_namespaceObject.mixins.reset('inline-flex'), themes_namespaceObject.variables.inputHeight, (0,themes_namespaceObject.pick)({
296
- enterprise: {
297
- light: themes_namespaceObject.variables.gray60,
298
- dark: themes_namespaceObject.variables.gray20
299
- },
300
- prisma: themes_namespaceObject.variables.interactiveColorBorder
301
- }), themes_namespaceObject.variables.borderRadius, (0,themes_namespaceObject.pick)({
302
- enterprise: {
303
- light: themes_namespaceObject.variables.white,
304
- dark: themes_namespaceObject.variables.gray22
305
- },
306
- prisma: themes_namespaceObject.variables.transparent
307
- }), (0,themes_namespaceObject.pick)({
308
- enterprise: '0px 10px',
309
- prisma: '0px 12px'
310
- }), function (_ref3) {
311
- var $hasEndAdornment = _ref3.$hasEndAdornment;
312
- return $hasEndAdornment && (0,external_styled_components_namespaceObject.css)(["padding-right:0;"]);
313
- }, function (_ref4) {
314
- var $hasStartAdornment = _ref4.$hasStartAdornment;
315
- return $hasStartAdornment && (0,external_styled_components_namespaceObject.css)(["padding-left:0;"]);
316
- }, (0,themes_namespaceObject.pick)({
317
- enterprise: {
318
- light: themes_namespaceObject.variables.gray60,
319
- dark: themes_namespaceObject.variables.gray20
320
- },
321
- prisma: themes_namespaceObject.variables.interactiveColorBorderHover
322
- }), (0,themes_namespaceObject.pick)({
323
- enterprise: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";color:", ";"], themes_namespaceObject.variables.focusShadow, themes_namespaceObject.variables.textColor),
324
- prisma: (0,external_styled_components_namespaceObject.css)(["border-color:", ";color:", ";"], themes_namespaceObject.variables.interactiveColorPrimary, themes_namespaceObject.variables.contentColorActive)
325
- }), function (_ref5) {
326
- var $error = _ref5.$error;
327
- return $error && (0,external_styled_components_namespaceObject.css)(["&,&:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){", "}"], (0,themes_namespaceObject.pick)({
328
- enterprise: themes_namespaceObject.variables.errorColor,
329
- prisma: themes_namespaceObject.variables.accentColorNegative
330
- }), (0,themes_namespaceObject.pick)({
331
- enterprise: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";color:", ";"], themes_namespaceObject.variables.focusShadow, themes_namespaceObject.variables.textColor),
332
- prisma: (0,external_styled_components_namespaceObject.css)(["border-color:", ";color:", ";"], themes_namespaceObject.variables.interactiveColorPrimary, themes_namespaceObject.variables.contentColorActive)
333
- }));
334
- }, function (_ref6) {
335
- var $append = _ref6.$append;
336
- return $append && (0,external_styled_components_namespaceObject.css)(["margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;"]);
337
- }, function (_ref7) {
338
- var $prepend = _ref7.$prepend;
339
- return $prepend && (0,external_styled_components_namespaceObject.css)(["border-top-left-radius:0;border-bottom-left-radius:0;"]);
340
- }, function (_ref8) {
341
- var disabled = _ref8.disabled;
342
- return disabled && (0,external_styled_components_namespaceObject.css)(["", " box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);"], (0,themes_namespaceObject.pick)({
343
- enterprise: {
344
- light: (0,external_styled_components_namespaceObject.css)(["background-color:", ";border-color:", ";"], themes_namespaceObject.variables.gray96, themes_namespaceObject.variables.gray92),
345
- dark: (0,external_styled_components_namespaceObject.css)(["background-color:", ";border-color:", ";"], themes_namespaceObject.variables.gray22, themes_namespaceObject.variables.gray30)
346
- },
347
- prisma: (0,external_styled_components_namespaceObject.css)(["border-color:", ";"], themes_namespaceObject.variables.interactiveColorBorderDisabled)
348
- }));
349
- });
350
- /* Some of these need greater specificity than input[type=text] */
351
-
352
- var StyledInput = external_styled_components_default().input.withConfig({
353
- displayName: "TextStyles__StyledInput",
354
- componentId: "eg7n6t-4"
355
- })(["", ";&,&[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_namespaceObject.mixins.reset('inline-flex'), (0,themes_namespaceObject.pick)({
356
- enterprise: themes_namespaceObject.variables.textColor,
357
- prisma: themes_namespaceObject.variables.contentColorActive
358
- }), themes_namespaceObject.variables.sansFontFamily, (0,themes_namespaceObject.pick)({
359
- enterprise: '20px',
360
- prisma: {
361
- comfortable: '24px',
362
- compact: '20px'
363
- }
364
- }), (0,themes_namespaceObject.pick)({
365
- enterprise: themes_namespaceObject.variables.spacingHalf,
366
- prisma: '14px'
367
- }), themes_namespaceObject.variables.contentColorMuted, function (_ref9) {
368
- var $error = _ref9.$error;
369
- return $error && (0,external_styled_components_namespaceObject.css)(["&,&:hover{color:", ";}"], (0,themes_namespaceObject.pick)({
370
- enterprise: {
371
- light: themes_namespaceObject.variables.errorColorD10,
372
- dark: themes_namespaceObject.variables.errorColorL20
373
- },
374
- prisma: themes_namespaceObject.variables.contentColorActive
375
- }));
376
- }, function (_ref10) {
377
- var disabled = _ref10.disabled;
378
- return disabled && disabledStyles;
379
- });
380
- var StyledVisibilityToggle = external_styled_components_default()((Button_default())).withConfig({
381
- displayName: "TextStyles__StyledVisibilityToggle",
382
- componentId: "eg7n6t-5"
383
- })(["", ""], buttonStyles);
384
- var StyledPlaceholder = external_styled_components_default().span.withConfig({
385
- displayName: "TextStyles__StyledPlaceholder",
386
- componentId: "eg7n6t-6"
387
- })(["pointer-events:none;color:", ";position:absolute;overflow:hidden;font-size:inherit;line-height:inherit;height:", ";margin-right:", ";", ";", ";", ""], (0,themes_namespaceObject.pick)({
388
- enterprise: themes_namespaceObject.variables.textGray,
389
- prisma: themes_namespaceObject.variables.contentColorMuted
390
- }), themes_namespaceObject.variables.lineHeight, (0,themes_namespaceObject.pick)({
391
- enterprise: '10px',
392
- prisma: '14px'
393
- }), function (_ref11) {
394
- var $hasStartAdornment = _ref11.$hasStartAdornment,
395
- $startAdornmentWidth = _ref11.$startAdornmentWidth;
396
- return $hasStartAdornment && ($startAdornmentWidth ? (0,external_styled_components_namespaceObject.css)(["margin-left:", "px;"], $startAdornmentWidth) : (0,external_styled_components_namespaceObject.css)(["margin-left:", ";"], (0,themes_namespaceObject.pick)({
397
- enterprise: {
398
- comfortable: '30px',
399
- compact: '26px'
400
- },
401
- prisma: {
402
- comfortable: '38px',
403
- compact: '30px'
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);
404
127
  }
405
- })));
406
- }, function (_ref12) {
407
- var $hasEndAdornment = _ref12.$hasEndAdornment,
408
- $endAdornmentWidth = _ref12.$endAdornmentWidth;
409
- return $hasEndAdornment && ($endAdornmentWidth // calc(100% - padding - adorment width)
410
- ? (0,external_styled_components_namespaceObject.css)(["max-width:calc( 100% - ", " - ", "px );"], (0,themes_namespaceObject.pick)({
411
- enterprise: '10px',
412
- prisma: '14px'
413
- }), $endAdornmentWidth) : (0,external_styled_components_namespaceObject.css)(["max-width:calc( 100% - ", " - ", " );"], (0,themes_namespaceObject.pick)({
414
- enterprise: '10px',
415
- prisma: '14px'
416
- }), (0,themes_namespaceObject.pick)({
417
- enterprise: {
418
- comfortable: '30px',
419
- compact: '26px'
420
- },
421
- prisma: {
422
- comfortable: '38px',
423
- compact: '30px'
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
+ }));
424
171
  }
425
- })));
426
- }, function (_ref13) {
427
- var $hasBothAdornment = _ref13.$hasBothAdornment,
428
- $endAdornmentWidth = _ref13.$endAdornmentWidth,
429
- $startAdornmentWidth = _ref13.$startAdornmentWidth;
430
- return $hasBothAdornment && (0,external_styled_components_namespaceObject.css)(["max-width:calc(100% - ", "px - ", "px);"], $startAdornmentWidth, $endAdornmentWidth);
431
- });
432
- var adornmentHolder = (0,external_styled_components_namespaceObject.css)(["display:inline-flex;align-items:center;justify-content:center;height:", ";pointer-events:none;"], (0,themes_namespaceObject.pick)({
433
- enterprise: {
434
- comfortable: '30px',
435
- compact: '26px'
436
- },
437
- prisma: {
438
- comfortable: '38px',
439
- compact: '30px'
440
- }
441
- }));
442
- var StyledStartAdornmentHolder = external_styled_components_default().div.withConfig({
443
- displayName: "TextStyles__StyledStartAdornmentHolder",
444
- componentId: "eg7n6t-7"
445
- })(["", " ", ";"], adornmentHolder, function (_ref14) {
446
- var $width = _ref14.$width;
447
- return $width ? (0,external_styled_components_namespaceObject.css)(["min-width:", "px;"], $width) : (0,external_styled_components_namespaceObject.css)(["min-width:", ";"], (0,themes_namespaceObject.pick)({
448
- enterprise: {
449
- comfortable: '30px',
450
- compact: '26px'
451
- },
452
- prisma: {
453
- comfortable: '38px',
454
- compact: '30px'
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);
455
187
  }
456
- }));
457
- });
458
- var StyledEndAdornmentHolder = external_styled_components_default().div.withConfig({
459
- displayName: "TextStyles__StyledEndAdornmentHolder",
460
- componentId: "eg7n6t-8"
461
- })(["", " ", ";"], adornmentHolder, function (_ref15) {
462
- var $width = _ref15.$width;
463
- return $width ? (0,external_styled_components_namespaceObject.css)(["min-width:", "px;"], $width) : (0,external_styled_components_namespaceObject.css)(["min-width:", ";"], (0,themes_namespaceObject.pick)({
464
- enterprise: {
465
- comfortable: '30px',
466
- compact: '26px'
467
- },
468
- prisma: {
469
- comfortable: '38px',
470
- compact: '30px'
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
+ }));
471
229
  }
472
- }));
473
- });
474
- var StyledAdornment = external_styled_components_default().div.withConfig({
475
- displayName: "TextStyles__StyledAdornment",
476
- componentId: "eg7n6t-9"
477
- })(["display:inline-flex;align-items:center;justify-content:center;position:absolute;pointer-events:none;z-index:1;height:", ";color:", ";", ";", ";", ""], (0,themes_namespaceObject.pick)({
478
- enterprise: {
479
- comfortable: '30px',
480
- compact: '26px'
481
- },
482
- prisma: {
483
- comfortable: '38px',
484
- compact: '30px'
485
- }
486
- }), (0,themes_namespaceObject.pick)({
487
- enterprise: {
488
- light: themes_namespaceObject.variables.gray60,
489
- dark: themes_namespaceObject.variables.white
490
- },
491
- prisma: themes_namespaceObject.variables.contentColorMuted
492
- }), function (_ref16) {
493
- var $position = _ref16.$position;
494
- return $position === 'start' ? (0,external_styled_components_namespaceObject.css)(["top:1px;left:1px;"]) : (0,external_styled_components_namespaceObject.css)(["top:1px;right:1px;"]);
495
- }, function (_ref17) {
496
- var disabled = _ref17.disabled;
497
- return disabled && disabledStyles;
498
- }, (0,themes_namespaceObject.pick)({
499
- enterprise: (0,external_styled_components_namespaceObject.css)(["margin-left:-1px;margin-right:-1px;"])
500
- }));
501
-
502
- ;// CONCATENATED MODULE: ./src/utils/updateReactRef.ts
503
- /**
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
+ /**
504
523
  * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
505
524
  *
506
525
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
507
526
  * @param current - The new value of the ref.
508
527
  */
509
- function updateReactRef(ref, current) {
510
- if (ref) {
511
- if (typeof ref === 'function') {
512
- ref(current);
513
- } else {
514
- // the public signature of this util uses React.Ref<T> to mirror the way React types refs.
515
- // the intention here is to signal "we will take care of setting 'current', not you".
516
- 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
+ }
517
539
  }
518
- }
519
- }
520
-
521
-
522
- ;// CONCATENATED MODULE: ./src/Text/Text.tsx
523
- 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); }
524
-
525
- 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); }
526
-
527
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
528
-
529
- 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."); }
530
-
531
- 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); }
532
-
533
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
534
-
535
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
536
-
537
- 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; }
538
-
539
- 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; }
540
-
541
- 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; }
542
-
543
- 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; }
544
-
545
- 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; }
546
-
547
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
548
-
549
- 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); } }
550
-
551
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
552
-
553
- 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); }
554
-
555
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
556
-
557
- 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); }; }
558
-
559
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
560
-
561
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
562
-
563
- 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; } }
564
-
565
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
566
-
567
- 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; }
568
-
569
-
570
-
571
-
572
-
573
-
574
-
575
-
576
-
577
-
578
-
579
-
580
-
581
-
582
-
583
-
584
-
585
-
586
-
587
-
588
-
589
- /** @public */
590
-
591
- var propTypes = {
592
- appearance: external_prop_types_default().oneOf(['default', 'search']),
593
- append: (external_prop_types_default()).bool,
594
- autoCapitalize: (external_prop_types_default()).string,
595
- autoComplete: (external_prop_types_default()).string,
596
- autoCorrect: (external_prop_types_default()).string,
597
- autoFocus: (external_prop_types_default()).bool,
598
- canClear: (external_prop_types_default()).bool,
599
- children: (external_prop_types_default()).node,
600
-
601
- /** @private. */
602
- classNamePrivate: (external_prop_types_default()).string,
603
- defaultValue: (external_prop_types_default()).string,
604
- describedBy: (external_prop_types_default()).string,
605
- disabled: (external_prop_types_default()).bool,
606
- elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
607
- endAdornment: (external_prop_types_default()).node,
608
- error: (external_prop_types_default()).bool,
609
- inline: (external_prop_types_default()).bool,
610
-
611
- /** @private. */
612
- inputClassName: (external_prop_types_default()).string,
613
- inputId: (external_prop_types_default()).string,
614
- inputRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
615
- labelledBy: (external_prop_types_default()).string,
616
- maxLength: (external_prop_types_default()).number,
617
- multiline: (external_prop_types_default()).bool,
618
- name: (external_prop_types_default()).string,
619
- onBlur: (external_prop_types_default()).func,
620
- onChange: (external_prop_types_default()).func,
621
- onFocus: (external_prop_types_default()).func,
622
- onKeyDown: (external_prop_types_default()).func,
623
- onSelect: (external_prop_types_default()).func,
624
- onInputClick: (external_prop_types_default()).func,
625
- placeholder: (external_prop_types_default()).string,
626
- prepend: (external_prop_types_default()).bool,
627
-
628
- /** @private. */
629
- required: (external_prop_types_default()).bool,
630
- rowsMax: (external_prop_types_default()).number,
631
- rowsMin: (external_prop_types_default()).number,
632
- spellCheck: (external_prop_types_default()).bool,
633
- tabIndex: (external_prop_types_default()).number,
634
- startAdornment: (external_prop_types_default()).node,
635
-
636
- /** @private */
637
- splunkTheme: (external_prop_types_default()).object,
638
- type: (external_prop_types_default()).string,
639
- passwordVisibilityToggle: (external_prop_types_default()).bool,
640
- useSyntheticPlaceholder: (external_prop_types_default()).bool,
641
- value: (external_prop_types_default()).string
642
- };
643
- var defaultProps = {
644
- appearance: 'default',
645
- append: false,
646
- autoFocus: false,
647
- canClear: false,
648
- disabled: false,
649
- error: false,
650
- inline: false,
651
- multiline: false,
652
- placeholder: '',
653
- prepend: false,
654
- rowsMax: 8,
655
- rowsMin: 2,
656
- tabIndex: 0,
657
- type: 'text',
658
- passwordVisibilityToggle: false
659
- };
660
-
661
- /** Note: Text places role and aria props onto the input. All other props are placed on the wrapper. */
662
- var Text = /*#__PURE__*/function (_Component) {
663
- _inherits(Text, _Component);
664
-
665
- var _super = _createSuper(Text);
666
-
667
- _createClass(Text, null, [{
668
- key: "validateRows",
669
- // @docs-props-type TextPropsBase
670
- value: function validateRows(_ref) {
671
- var rowsMin = _ref.rowsMin,
672
- rowsMax = _ref.rowsMax;
673
-
674
- if (false) {}
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);
675
553
  }
676
- }]);
677
-
678
- function Text(props) {
679
- var _this;
680
-
681
- _classCallCheck(this, Text);
682
-
683
- _this = _super.call(this, props);
684
-
685
- _defineProperty(_assertThisInitialized(_this), "controlledExternally", void 0);
686
-
687
- _defineProperty(_assertThisInitialized(_this), "input", null);
688
-
689
- _defineProperty(_assertThisInitialized(_this), "startAdornment", null);
690
-
691
- _defineProperty(_assertThisInitialized(_this), "endAdornment", null);
692
-
693
- _defineProperty(_assertThisInitialized(_this), "getAdornmentWidth", function () {
694
- var startIconRect = _this.startAdornment ? _this.startAdornment.getBoundingClientRect() : undefined;
695
- var startIconWidth = startIconRect && Math.round(startIconRect.width);
696
-
697
- if (_this.state.startAdornmentWidth !== startIconWidth) {
698
- _this.setState({
699
- startAdornmentWidth: startIconWidth
700
- });
701
- }
702
-
703
- var endIconRect = _this.endAdornment ? _this.endAdornment.getBoundingClientRect() : undefined;
704
- var endIconWidth = endIconRect && Math.round(endIconRect.width);
705
-
706
- if (_this.state.endAdornmentWidth !== endIconWidth) {
707
- _this.setState({
708
- endAdornmentWidth: endIconWidth
709
- });
710
- }
711
- });
712
-
713
- _defineProperty(_assertThisInitialized(_this), "handleInputMount", function (el) {
714
- _this.input = el;
715
- updateReactRef(_this.props.inputRef, el);
716
- });
717
-
718
- _defineProperty(_assertThisInitialized(_this), "handleInputChange", function (e) {
719
- var _this$props$onChange, _this$props;
720
-
721
- var value = e.target.value;
722
- var name = _this.props.name;
723
-
724
- if (!_this.isControlled()) {
725
- _this.setState({
726
- value: value
727
- });
728
- }
729
-
730
- (_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, e, {
731
- value: value,
732
- name: name
733
- });
734
- });
735
-
736
- _defineProperty(_assertThisInitialized(_this), "handleInputKeyDown", function (e) {
737
- var _this$props$onKeyDown, _this$props2;
738
-
739
- (_this$props$onKeyDown = (_this$props2 = _this.props).onKeyDown) === null || _this$props$onKeyDown === void 0 ? void 0 : _this$props$onKeyDown.call(_this$props2, e);
740
- });
741
-
742
- _defineProperty(_assertThisInitialized(_this), "handleInputSelect", function (e) {
743
- var _this$props$onSelect, _this$props3;
744
-
745
- (_this$props$onSelect = (_this$props3 = _this.props).onSelect) === null || _this$props$onSelect === void 0 ? void 0 : _this$props$onSelect.call(_this$props3, e);
746
- });
747
-
748
- _defineProperty(_assertThisInitialized(_this), "handleInputClick", function (e) {
749
- var _this$props$onInputCl, _this$props4;
750
-
751
- (_this$props$onInputCl = (_this$props4 = _this.props).onInputClick) === null || _this$props$onInputCl === void 0 ? void 0 : _this$props$onInputCl.call(_this$props4, e);
752
- });
753
-
754
- _defineProperty(_assertThisInitialized(_this), "handleInputFocus", function (e) {
755
- var _this$props$onFocus, _this$props5;
756
-
757
- (_this$props$onFocus = (_this$props5 = _this.props).onFocus) === null || _this$props$onFocus === void 0 ? void 0 : _this$props$onFocus.call(_this$props5, e);
758
- });
759
-
760
- _defineProperty(_assertThisInitialized(_this), "handleInputBlur", function (e) {
761
- var _this$props$onBlur, _this$props6;
762
-
763
- (_this$props$onBlur = (_this$props6 = _this.props).onBlur) === null || _this$props$onBlur === void 0 ? void 0 : _this$props$onBlur.call(_this$props6, e);
764
- });
765
-
766
- _defineProperty(_assertThisInitialized(_this), "handleClear", function (e) {
767
- var _this$props$onChange2, _this$props7;
768
-
769
- e.preventDefault();
770
- var value = '';
771
- var name = _this.props.name;
772
-
773
- if (!_this.isControlled()) {
774
- _this.setState({
775
- value: value
776
- });
777
- }
778
-
779
- _this.focus();
780
-
781
- (_this$props$onChange2 = (_this$props7 = _this.props).onChange) === null || _this$props$onChange2 === void 0 ? void 0 : _this$props$onChange2.call(_this$props7, e, {
782
- value: value,
783
- name: name
784
- });
785
- });
786
-
787
- _defineProperty(_assertThisInitialized(_this), "handleVisibilityToggle", function () {
788
- _this.setState(function (state) {
789
- return {
790
- hideVisibility: !state.hideVisibility
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;
791
565
  };
792
- });
793
- });
794
-
795
- _defineProperty(_assertThisInitialized(_this), "renderEndAdornment", function () {
796
- var _controlGroupContext$;
797
-
798
- var _this$props8 = _this.props,
799
- appearance = _this$props8.appearance,
800
- endAdornment = _this$props8.endAdornment,
801
- passwordVisibilityToggle = _this$props8.passwordVisibilityToggle,
802
- disabled = _this$props8.disabled,
803
- canClear = _this$props8.canClear,
804
- splunkTheme = _this$props8.splunkTheme;
805
- var isPrisma = splunkTheme.isPrisma,
806
- isCompact = splunkTheme.isCompact,
807
- isEnterprise = splunkTheme.isEnterprise;
808
- var prismaSize = isCompact ? '20px' : '24px';
809
- var adornmentProps = {
810
- ref: function ref(el) {
811
- _this.endAdornment = el;
812
- },
813
- disabled: disabled,
814
- $position: 'end'
815
- };
816
-
817
- if (endAdornment) {
818
- return /*#__PURE__*/external_react_default().createElement(StyledAdornment, adornmentProps, endAdornment);
819
- }
820
-
821
- if (passwordVisibilityToggle && !disabled) {
822
- var eyeIcon = _this.state.hideVisibility ? /*#__PURE__*/external_react_default().createElement(Text_IconOutlinedView, null) : /*#__PURE__*/external_react_default().createElement(Text_IconOutlinedHide, null);
823
- return /*#__PURE__*/external_react_default().createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default().createElement(StyledVisibilityToggle, {
824
- appearance: isPrisma ? 'secondary' : 'pill',
825
- "data-test": "password-toggle",
826
- inline: false,
827
- onClick: _this.handleVisibilityToggle,
828
- type: "button",
829
- icon: eyeIcon
830
- }));
831
- }
832
-
833
- var controlGroupContext = _this.context;
834
- var controlGroupLabel = (_controlGroupContext$ = controlGroupContext.labelAttrs) === null || _controlGroupContext$ === void 0 ? void 0 : _controlGroupContext$.text;
835
- var clearButtonText = controlGroupLabel ? (0,i18n_namespaceObject._)("Clear ".concat(controlGroupLabel, " text field")) : (0,i18n_namespaceObject._)('Clear text field');
836
-
837
- var displayValue = _this.getDisplayValue();
838
-
839
- if (!isPrisma && appearance === 'search') {
840
- if (!displayValue) {
841
- return /*#__PURE__*/external_react_default().createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default().createElement(StyledSearchIconWrapper, {
842
- $disabled: disabled
843
- }, /*#__PURE__*/external_react_default().createElement((Search_default()), {
844
- screenReaderText: null,
845
- hideDefaultTooltip: true,
846
- size: "16px",
847
- inline: false
848
- })));
566
+ return ae.apply(this, arguments);
567
+ }
568
+ function oe(e) {
569
+ return pe(e) || ce(e) || se(e) || le();
570
+ }
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.");
573
+ }
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);
581
+ }
582
+ function ce(e) {
583
+ if (typeof Symbol !== "undefined" && Symbol.iterator in Object(e)) return Array.from(e);
584
+ }
585
+ function pe(e) {
586
+ if (Array.isArray(e)) return de(e);
587
+ }
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];
849
592
  }
850
-
851
- return /*#__PURE__*/external_react_default().createElement(StyledAdornment, adornmentProps, !disabled && /*#__PURE__*/external_react_default().createElement(StyledClearButton, {
852
- appearance: isPrisma ? 'secondary' : 'pill',
853
- "data-test": "clear",
854
- inline: false,
855
- icon: isEnterprise ? /*#__PURE__*/external_react_default().createElement((Close_default()), {
856
- size: 1,
857
- screenReaderText: clearButtonText
858
- }) : /*#__PURE__*/external_react_default().createElement((Cross_default()), {
859
- "aria-label": clearButtonText
860
- }),
861
- onClick: _this.handleClear
862
- }), /*#__PURE__*/external_react_default().createElement(StyledSearchIconWrapper, {
863
- $disabled: disabled
864
- }, isEnterprise ? /*#__PURE__*/external_react_default().createElement((Search_default()), {
865
- screenReaderText: null,
866
- hideDefaultTooltip: true,
867
- size: "16px",
868
- inline: false
869
- }) : /*#__PURE__*/external_react_default().createElement((Magnifier_default()), {
870
- width: prismaSize,
871
- height: prismaSize
872
- })));
873
- }
874
-
875
- if (!!displayValue && (isPrisma && appearance === 'search' || canClear)) {
876
- return /*#__PURE__*/external_react_default().createElement(StyledAdornment, adornmentProps, !disabled && /*#__PURE__*/external_react_default().createElement(StyledClearButton, {
877
- "data-test": "clear",
878
- appearance: isPrisma ? 'secondary' : 'pill',
879
- onClick: _this.handleClear,
880
- icon: isEnterprise ? /*#__PURE__*/external_react_default().createElement((Close_default()), {
881
- inline: false,
882
- screenReaderText: clearButtonText
883
- }) : /*#__PURE__*/external_react_default().createElement((Cross_default()), {
884
- "aria-label": clearButtonText,
885
- height: prismaSize,
886
- inline: false,
887
- width: prismaSize
888
- })
889
- }));
890
- }
891
-
892
- return undefined;
893
- });
894
-
895
- _defineProperty(_assertThisInitialized(_this), "renderStartAdornment", function () {
896
- var _this$props9 = _this.props,
897
- appearance = _this$props9.appearance,
898
- startAdornment = _this$props9.startAdornment,
899
- splunkTheme = _this$props9.splunkTheme,
900
- disabled = _this$props9.disabled;
901
- var isPrisma = splunkTheme.isPrisma,
902
- isCompact = splunkTheme.isCompact;
903
- var prismaSize = isCompact ? '20px' : '24px';
904
- var adornmentProps = {
905
- ref: function ref(el) {
906
- _this.startAdornment = el;
907
- },
908
- disabled: disabled,
909
- $position: 'start'
910
- };
911
-
912
- if (startAdornment) {
913
- return /*#__PURE__*/external_react_default().createElement(StyledAdornment, adornmentProps, startAdornment);
914
- }
915
-
916
- if (isPrisma && appearance === 'search') {
917
- return /*#__PURE__*/external_react_default().createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default().createElement(StyledSearchIconWrapper, {
918
- $disabled: disabled
919
- }, /*#__PURE__*/external_react_default().createElement((Magnifier_default()), {
920
- "aria-label": "Search",
921
- height: prismaSize,
922
- width: prismaSize
923
- })));
924
- }
925
-
926
- return undefined;
927
- });
928
-
929
- _defineProperty(_assertThisInitialized(_this), "getDisplayValue", function () {
930
- var displayValue = _this.isControlled() ? _this.props.value : _this.state.value;
931
- return displayValue;
932
- });
933
-
934
- _this.controlledExternally = has_default()(props, 'value');
935
- _this.state = {
936
- value: props.defaultValue || '',
937
- hideVisibility: true
938
- };
939
-
940
- if (false) {}
941
-
942
- if (false) {}
943
-
944
- if (has_default()(props, 'useSyntheticPlaceholder')) {
945
- // eslint-disable-next-line no-console
946
- console.warn("The 'Text' prop 'useSyntheticPlaceholder' has been marked for deprecation.");
593
+ return n;
594
+ }
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;
605
+ }
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;
947
622
  }
948
-
949
- if (false) {}
950
-
951
- if (false) {}
952
-
953
- Text.validateRows(props);
954
- return _this;
955
- }
956
-
957
- _createClass(Text, [{
958
- key: "componentDidMount",
959
- value: function componentDidMount() {
960
- this.getAdornmentWidth();
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;
961
637
  }
962
- }, {
963
- key: "componentDidUpdate",
964
- value: function componentDidUpdate(prevProps) {
965
- if (false) {}
966
-
967
- if (false) {}
968
-
969
- Text.validateRows(this.props);
970
- this.getAdornmentWidth();
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;
971
649
  }
972
- }, {
973
- key: "isControlled",
974
- value: function isControlled() {
975
- return this.controlledExternally;
650
+ function ve(e, t) {
651
+ if (!(e instanceof t)) {
652
+ throw new TypeError("Cannot call a class as a function");
653
+ }
976
654
  }
977
- }, {
978
- key: "blur",
979
- value: function blur() {
980
- var _this$input;
981
-
982
- (_this$input = this.input) === null || _this$input === void 0 ? void 0 : _this$input.blur();
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
+ }
983
663
  }
984
- /**
985
- * Place focus on the input.
986
- */
987
-
988
- }, {
989
- key: "focus",
990
- value: function focus(options) {
991
- var _this$input2;
992
-
993
- (_this$input2 = this.input) === null || _this$input2 === void 0 ? void 0 : _this$input2.focus(options);
664
+ function ye(e, t, r) {
665
+ if (t) be(e.prototype, t);
666
+ if (r) be(e, r);
667
+ return e;
994
668
  }
995
- }, {
996
- key: "select",
997
- value: function select() {
998
- var _this$input3;
999
-
1000
- (_this$input3 = this.input) === null || _this$input3 === void 0 ? void 0 : _this$input3.select();
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);
1001
681
  }
1002
- }, {
1003
- key: "render",
1004
- value: function render() {
1005
- var _this$props10 = this.props,
1006
- append = _this$props10.append,
1007
- autoCapitalize = _this$props10.autoCapitalize,
1008
- autoComplete = _this$props10.autoComplete,
1009
- autoCorrect = _this$props10.autoCorrect,
1010
- autoFocus = _this$props10.autoFocus,
1011
- children = _this$props10.children,
1012
- className = _this$props10.className,
1013
- classNamePrivate = _this$props10.classNamePrivate,
1014
- disabled = _this$props10.disabled,
1015
- describedBy = _this$props10.describedBy,
1016
- elementRef = _this$props10.elementRef,
1017
- error = _this$props10.error,
1018
- inline = _this$props10.inline,
1019
- inputClassName = _this$props10.inputClassName,
1020
- inputId = _this$props10.inputId,
1021
- labelledBy = _this$props10.labelledBy,
1022
- multiline = _this$props10.multiline,
1023
- maxLength = _this$props10.maxLength,
1024
- name = _this$props10.name,
1025
- passwordVisibilityToggle = _this$props10.passwordVisibilityToggle,
1026
- placeholder = _this$props10.placeholder,
1027
- prepend = _this$props10.prepend,
1028
- required = _this$props10.required,
1029
- spellCheck = _this$props10.spellCheck,
1030
- tabIndex = _this$props10.tabIndex,
1031
- title = _this$props10.title,
1032
- type = _this$props10.type,
1033
- useSyntheticPlaceholder = _this$props10.useSyntheticPlaceholder,
1034
- 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"]);
1035
-
1036
- var ariaProps = _objectSpread(_objectSpread({
1037
- role: 'textbox'
1038
- }, pickBy_default()(otherProps, function (val, key) {
1039
- return key === 'role' || key.indexOf('aria-') === 0;
1040
- })), {}, {
1041
- 'aria-describedby': describedBy,
1042
- 'aria-labelledby': labelledBy,
1043
- 'aria-invalid': error || undefined
1044
- });
1045
-
1046
- var boxProps = omit_default()(otherProps, ['inputRef', 'onBlur', 'onChange', 'onFocus', 'onKeyDown', 'onSelect', 'onInputClick', 'rowsMax', 'rowsMin'].concat(_toConsumableArray(keys_default()(ariaProps))));
1047
- var displayValue = this.getDisplayValue();
1048
- var displayProps = {
1049
- className: (0,style_namespaceObject.toClassName)(className, inputClassName),
1050
- $append: append || undefined,
1051
- $error: error,
1052
- $prepend: prepend || undefined
1053
- };
1054
- var passwordVisibility = this.state.hideVisibility ? 'password' : 'text';
1055
- var computedType = passwordVisibilityToggle ? passwordVisibility : type;
1056
-
1057
- var inputProps = _objectSpread(_objectSpread({}, ariaProps), {}, {
1058
- 'data-test': 'textbox',
1059
- autoCapitalize: autoCapitalize,
1060
- autoComplete: autoComplete,
1061
- autoCorrect: autoCorrect,
1062
- autoFocus: autoFocus,
1063
- id: inputId,
1064
- maxLength: maxLength,
1065
- placeholder: placeholder && !useSyntheticPlaceholder ? placeholder : undefined,
1066
- name: name,
1067
- onChange: this.handleInputChange,
1068
- onKeyDown: this.handleInputKeyDown,
1069
- onSelect: this.handleInputSelect,
1070
- onClick: this.handleInputClick,
1071
- onFocus: this.handleInputFocus,
1072
- onBlur: this.handleInputBlur,
1073
- ref: this.handleInputMount,
1074
- required: required,
1075
- spellCheck: spellCheck,
1076
- style: {
1077
- height: this.state.height
1078
- },
1079
- title: title,
1080
- tabIndex: tabIndex,
1081
- type: computedType,
1082
- value: displayValue,
1083
- $error: error
1084
- });
1085
-
1086
- var haveSyntheticPlaceholder = useSyntheticPlaceholder && placeholder && !displayValue; // Do not render value in DOM when type is password, or passwordVisibilityToggle is enabled
1087
-
1088
- var dataTestValue = type === 'password' || passwordVisibilityToggle ? undefined : displayValue; // Firefox hack (SUI-2716). Remove when fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1427173
1089
-
1090
- var isTimeInput = type === 'time';
1091
- var hasEndAdornment = !!this.renderEndAdornment();
1092
- var hasStartAdornment = !!this.renderStartAdornment();
1093
-
1094
- if (multiline) {
1095
- return /*#__PURE__*/external_react_default().createElement((TextArea_default()), this.props);
1096
- }
1097
-
1098
- return /*#__PURE__*/external_react_default().createElement(StyledBox, Text_extends({
1099
- tabIndex: -1,
1100
- $isTimeInput: isTimeInput,
1101
- className: (0,style_namespaceObject.toClassName)(className, classNamePrivate),
1102
- "data-test": "text",
1103
- "data-test-value": dataTestValue,
1104
- elementRef: elementRef,
1105
- flex: true,
1106
- inline: inline
1107
- }, boxProps), this.renderStartAdornment(), /*#__PURE__*/external_react_default().createElement(StyledInputWrapper, Text_extends({
1108
- $hasEndAdornment: hasEndAdornment,
1109
- $hasStartAdornment: hasStartAdornment,
1110
- disabled: disabled
1111
- }, displayProps), hasStartAdornment && /*#__PURE__*/external_react_default().createElement(StyledStartAdornmentHolder, {
1112
- $width: this.state.startAdornmentWidth
1113
- }), disabled ? /*#__PURE__*/external_react_default().createElement(StyledInput, Text_extends({
1114
- className: (0,style_namespaceObject.toClassName)(className, classNamePrivate),
1115
- "data-test": "textbox",
1116
- disabled: true,
1117
- readOnly: true,
1118
- type: computedType,
1119
- value: displayValue,
1120
- placeholder: placeholder && !useSyntheticPlaceholder ? placeholder : undefined
1121
- }, ariaProps)) : /*#__PURE__*/external_react_default().createElement(StyledInput, Text_extends({}, inputProps, {
1122
- onClick: this.handleInputClick
1123
- })), haveSyntheticPlaceholder && /*#__PURE__*/external_react_default().createElement((ScreenReaderContent_default()), null, placeholder), haveSyntheticPlaceholder && /*#__PURE__*/external_react_default().createElement(StyledPlaceholder, {
1124
- $endAdornmentWidth: this.state.endAdornmentWidth,
1125
- $hasBothAdornment: hasStartAdornment && hasEndAdornment // used to calculate the max-width
1126
- ,
1127
- $hasEndAdornment: hasEndAdornment,
1128
- $hasStartAdornment: hasStartAdornment,
1129
- $startAdornmentWidth: this.state.startAdornmentWidth,
1130
- "aria-hidden": true,
1131
- "data-role": "placeholder"
1132
- }, placeholder), children, hasEndAdornment && /*#__PURE__*/external_react_default().createElement(StyledEndAdornmentHolder, {
1133
- $width: this.state.endAdornmentWidth
1134
- })), this.renderEndAdornment());
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);
707
+ }
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);
1135
730
  }
1136
- }]);
1137
-
1138
- return Text;
1139
- }(external_react_namespaceObject.Component);
1140
-
1141
- _defineProperty(Text, "propTypes", propTypes);
1142
-
1143
- _defineProperty(Text, "defaultProps", defaultProps);
1144
-
1145
- _defineProperty(Text, "componentType", 'Text');
1146
-
1147
- _defineProperty(Text, "contextType", ControlGroup_namespaceObject.ControlGroupContext);
1148
-
1149
- var TextWithThemeBase = (0,themes_namespaceObject.withSplunkTheme)(Text);
1150
- var TextWithTheme = TextWithThemeBase;
1151
- TextWithTheme.propTypes = Text.propTypes;
1152
- TextWithTheme.componentType = Text.componentType;
1153
- /* harmony default export */ const Text_Text = (TextWithTheme);
1154
- ;// CONCATENATED MODULE: ./src/Text/index.ts
1155
-
1156
-
1157
- module.exports = __webpack_exports__;
1158
- /******/ })()
1159
- ;
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
+ /******/})();