@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/File.js CHANGED
@@ -1,982 +1,1064 @@
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
- Item: () => (/* reexport */ File_Item),
55
- "default": () => (/* reexport */ File_File)
56
- });
57
-
58
- ;// CONCATENATED MODULE: external "react"
59
- const external_react_namespaceObject = require("react");
60
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
61
- ;// CONCATENATED MODULE: external "prop-types"
62
- const external_prop_types_namespaceObject = require("prop-types");
63
- var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
64
- ;// CONCATENATED MODULE: external "lodash/debounce"
65
- const debounce_namespaceObject = require("lodash/debounce");
66
- var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_namespaceObject);
67
- ;// CONCATENATED MODULE: external "lodash/omit"
68
- const omit_namespaceObject = require("lodash/omit");
69
- var omit_default = /*#__PURE__*/__webpack_require__.n(omit_namespaceObject);
70
- ;// CONCATENATED MODULE: external "lodash/toUpper"
71
- const toUpper_namespaceObject = require("lodash/toUpper");
72
- var toUpper_default = /*#__PURE__*/__webpack_require__.n(toUpper_namespaceObject);
73
- ;// CONCATENATED MODULE: external "lodash/isString"
74
- const isString_namespaceObject = require("lodash/isString");
75
- var isString_default = /*#__PURE__*/__webpack_require__.n(isString_namespaceObject);
76
- ;// CONCATENATED MODULE: external "@splunk/react-ui/EventListener"
77
- const EventListener_namespaceObject = require("@splunk/react-ui/EventListener");
78
- var EventListener_default = /*#__PURE__*/__webpack_require__.n(EventListener_namespaceObject);
79
- ;// CONCATENATED MODULE: external "@splunk/themes"
80
- const themes_namespaceObject = require("@splunk/themes");
81
- ;// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
82
- const i18n_namespaceObject = require("@splunk/ui-utils/i18n");
83
- ;// CONCATENATED MODULE: external "@splunk/ui-utils/id"
84
- const id_namespaceObject = require("@splunk/ui-utils/id");
85
- ;// CONCATENATED MODULE: external "lodash/isUndefined"
86
- const isUndefined_namespaceObject = require("lodash/isUndefined");
87
- var isUndefined_default = /*#__PURE__*/__webpack_require__.n(isUndefined_namespaceObject);
88
- ;// CONCATENATED MODULE: external "@splunk/react-icons/Cross"
89
- const Cross_namespaceObject = require("@splunk/react-icons/Cross");
90
- var Cross_default = /*#__PURE__*/__webpack_require__.n(Cross_namespaceObject);
91
- ;// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Close"
92
- const Close_namespaceObject = require("@splunk/react-icons/enterprise/Close");
93
- var Close_default = /*#__PURE__*/__webpack_require__.n(Close_namespaceObject);
94
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Progress"
95
- const Progress_namespaceObject = require("@splunk/react-ui/Progress");
96
- var Progress_default = /*#__PURE__*/__webpack_require__.n(Progress_namespaceObject);
97
- ;// CONCATENATED MODULE: external "@splunk/ui-utils/format"
98
- const format_namespaceObject = require("@splunk/ui-utils/format");
99
- ;// CONCATENATED MODULE: ./src/File/FileContext.tsx
100
-
101
- var FileContext = /*#__PURE__*/(0,external_react_namespaceObject.createContext)({
102
- disabled: false
103
- });
104
- FileContext.displayName = 'File';
105
- /* harmony default export */ const File_FileContext = (FileContext);
106
- ;// CONCATENATED MODULE: external "@splunk/react-icons/SVGEnterprise"
107
- const SVGEnterprise_namespaceObject = require("@splunk/react-icons/SVGEnterprise");
108
- var SVGEnterprise_default = /*#__PURE__*/__webpack_require__.n(SVGEnterprise_namespaceObject);
109
- ;// CONCATENATED MODULE: ./src/File/PaperClip.tsx
110
- 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); }
111
-
112
-
113
-
114
- function PaperClip(props) {
115
- return /*#__PURE__*/external_react_default().createElement((SVGEnterprise_default()), _extends({
116
- hideDefaultTooltip: true,
117
- viewBox: "0 0 16 16",
118
- width: "16px",
119
- height: "16px"
120
- }, props), /*#__PURE__*/external_react_default().createElement("path", {
121
- d: "M8.624 14.7021C8.23332 15.0928 7.59989 15.0928 7.2092 14.7021L2.33962 9.83209C0.546941 8.03927 0.54695 5.1325 2.33964 3.33968C4.13162 1.54758 7.03672 1.54684 8.82962 3.33802L14.1746 8.67787C15.2682 9.77043 15.2687 11.5429 14.1756 12.636C13.083 13.7288 11.3115 13.7288 10.2189 12.636L4.87676 7.29338C4.48607 6.90266 4.48607 6.26917 4.87676 5.87845C5.26744 5.48773 5.90087 5.48773 6.29155 5.87845L11.6337 11.2211C11.9449 11.5324 12.4496 11.5324 12.7608 11.2211C13.0722 10.9097 13.0721 10.4048 12.7606 10.0936L7.41557 4.75369C6.40415 3.74325 4.76532 3.74367 3.75442 4.75463C2.74312 5.766 2.74312 7.40578 3.75441 8.41715L8.62399 13.2871C9.01468 13.6779 9.01468 14.3113 8.624 14.7021Z",
122
- fill: "currentColor"
123
- }));
124
- }
125
- ;// CONCATENATED MODULE: ./src/File/Retry.tsx
126
- function Retry_extends() { Retry_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 Retry_extends.apply(this, arguments); }
127
-
128
-
129
-
130
-
131
- function Retry(props) {
132
- var _useSplunkTheme = (0,themes_namespaceObject.useSplunkTheme)(),
133
- density = _useSplunkTheme.density;
134
-
135
- var size = density === 'compact' ? '20px' : '24px';
136
- return /*#__PURE__*/external_react_default().createElement((SVGEnterprise_default()), Retry_extends({
137
- hideDefaultTooltip: true,
138
- viewBox: "0 0 24 24",
139
- width: size,
140
- height: size
141
- }, props), /*#__PURE__*/external_react_default().createElement("path", {
142
- d: "M18.2685 14.3175L18.4349 14.9384C18.6078 14.558 18.7453 14.162 18.8452 13.7556C18.9449 13.3507 19.0068 12.9373 19.0303 12.521L19.0362 12.4167C19.0663 11.883 19.0409 11.3476 18.9604 10.8191L18.9462 10.7261C18.8794 10.287 18.7695 9.85559 18.6181 9.43803C18.4827 9.06459 18.3148 8.70378 18.1162 8.35979L18.0868 8.30889C17.8331 7.86964 17.5281 7.46215 17.1781 7.09503C16.9596 6.8658 16.7243 6.65314 16.4743 6.4588L16.318 6.33739C16.0132 6.10052 15.6825 5.88712 15.34 5.70564C14.95 5.49901 14.5348 5.32943 14.1132 5.20545C13.7201 5.08986 13.317 5.01136 12.9093 4.97099L12.8406 4.96419C12.4182 4.92237 11.993 4.91829 11.5699 4.95201C11.1331 4.98682 10.7005 5.06176 10.2774 5.17589L9.70069 5.33148C9.16747 5.47533 8.61859 5.15969 8.47474 4.62647C8.33089 4.09324 8.64653 3.54437 9.17976 3.40051L9.7565 3.24492C10.298 3.09883 10.8519 3.00289 11.411 2.95833C11.9526 2.91517 12.497 2.92038 13.0377 2.97392L13.1063 2.98072C13.6384 3.03341 14.1644 3.13584 14.6774 3.28668C15.2296 3.44906 15.7694 3.66976 16.2764 3.9384C16.7197 4.17329 17.1479 4.44938 17.5453 4.75819L17.7015 4.8796C18.0299 5.13478 18.3388 5.41401 18.6257 5.715C19.0853 6.19704 19.4858 6.73209 19.8188 7.30885L19.8482 7.35975C20.1055 7.80535 20.323 8.27272 20.4984 8.75646C20.6944 9.29736 20.8368 9.85624 20.9234 10.425L20.9376 10.518C21.0389 11.1833 21.0709 11.8573 21.033 12.5293L21.0271 12.6335C20.9967 13.1731 20.9164 13.7087 20.7873 14.2334C20.6488 14.7966 20.4548 15.3442 20.2083 15.8683L20.718 15.7317C21.2515 15.5888 21.7998 15.9054 21.9428 16.4389C22.0857 16.9723 21.7691 17.5207 21.2356 17.6636L18.8208 18.3106C18.0206 18.525 17.1981 18.0501 16.9837 17.2499L16.3367 14.8352C16.1937 14.3017 16.5103 13.7534 17.0438 13.6104C17.5773 13.4675 18.1256 13.7841 18.2685 14.3175ZM3.92363 7.90992L3.33327 8.06809C2.7998 8.21103 2.25147 7.89443 2.10854 7.36097C1.9656 6.8275 2.2822 6.27917 2.81566 6.13623L5.2305 5.48922C6.03069 5.27483 6.85318 5.7497 7.06759 6.54989L7.71463 8.96466C7.85757 9.49813 7.54099 10.0465 7.00752 10.1894C6.47405 10.3324 5.92572 10.0158 5.78278 9.4823L5.64111 8.9536C5.46988 9.32312 5.33225 9.70767 5.23007 10.1026C5.1256 10.5063 5.05872 10.9189 5.03027 11.3349L5.02314 11.4391C4.98667 11.9725 5.00567 12.5081 5.07982 13.0376L5.09286 13.1307C5.15447 13.5705 5.25921 14.0032 5.40556 14.4226C5.53644 14.7976 5.70008 15.1604 5.89456 15.5068L5.92334 15.558C6.17169 16.0003 6.47181 16.4114 6.81738 16.7826C7.03315 17.0145 7.26586 17.2299 7.51359 17.4273L7.66835 17.5505C7.97029 17.791 8.29849 18.0084 8.63879 18.1939C9.02626 18.4052 9.43938 18.5797 9.8595 18.7088C10.2512 18.829 10.6533 18.9124 11.0605 18.9576L11.1291 18.9652C11.551 19.0121 11.9761 19.0213 12.3996 18.9926C12.8368 18.963 13.2703 18.8933 13.6946 18.7842L14.2732 18.6355C14.8081 18.4981 15.3532 18.8202 15.4906 19.3552C15.6281 19.8901 15.3059 20.4351 14.771 20.5726L14.1924 20.7213C13.6492 20.8609 13.0943 20.9502 12.5346 20.988C11.9925 21.0247 11.4483 21.013 10.9083 20.953L10.8397 20.9454C10.3082 20.8863 9.78352 20.7776 9.27238 20.6206C8.72212 20.4517 8.18505 20.2245 7.68131 19.9498C7.24086 19.7097 6.81595 19.4285 6.42229 19.1149L6.26753 18.9917C5.94226 18.7326 5.6367 18.4497 5.35338 18.1453C4.89963 17.6578 4.50556 17.118 4.17948 16.5373L4.1507 16.486C3.89877 16.0374 3.6868 15.5674 3.51725 15.0816C3.32768 14.5384 3.192 13.9779 3.1122 13.4081L3.09915 13.315C3.0058 12.6485 2.98189 11.9741 3.0278 11.3027L3.03493 11.1985C3.07179 10.6594 3.15847 10.1248 3.29383 9.60161C3.44505 9.01718 3.65617 8.4503 3.92363 7.90992Z",
143
- fill: "currentColor"
144
- }));
145
- }
146
- ;// CONCATENATED MODULE: ./src/File/Trash.tsx
147
- function Trash_extends() { Trash_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 Trash_extends.apply(this, arguments); }
148
-
149
-
150
-
151
-
152
- function Trash(props) {
153
- var _useSplunkTheme = (0,themes_namespaceObject.useSplunkTheme)(),
154
- density = _useSplunkTheme.density;
155
-
156
- var size = density === 'compact' ? '20px' : '24px';
157
- return /*#__PURE__*/external_react_default().createElement((SVGEnterprise_default()), Trash_extends({
158
- hideDefaultTooltip: true,
159
- viewBox: "0 0 24 24",
160
- width: size,
161
- height: size
162
- }, props), /*#__PURE__*/external_react_default().createElement("path", {
163
- d: "M10 4V6H14V4H10ZM16 6H17H19H20C20.5523 6 21 6.44772 21 7C21 7.55228 20.5523 8 20 8H19V20.5C19 21.3284 18.3284 22 17.5 22H6.5C5.67157 22 5 21.3284 5 20.5V8H4C3.44772 8 3 7.55228 3 7C3 6.44772 3.44772 6 4 6H5H7H8V3.5C8 2.67157 8.67157 2 9.5 2H14.5C15.3284 2 16 2.67157 16 3.5V6ZM7 8V20H17V8H7ZM10.5858 14L9.2929 15.2929C8.90237 15.6834 8.90237 16.3166 9.2929 16.7071C9.68342 17.0976 10.3166 17.0976 10.7071 16.7071L12 15.4142L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L13.4142 14L14.7071 12.7071C15.0976 12.3166 15.0976 11.6834 14.7071 11.2929C14.3166 10.9024 13.6834 10.9024 13.2929 11.2929L12 12.5858L10.7071 11.2929C10.3166 10.9024 9.68342 10.9024 9.29289 11.2929C8.90237 11.6834 8.90237 12.3166 9.29289 12.7071L10.5858 14Z",
164
- fill: "currentColor"
165
- }));
166
- }
167
- ;// CONCATENATED MODULE: external "styled-components"
168
- const external_styled_components_namespaceObject = require("styled-components");
169
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
170
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Box"
171
- const Box_namespaceObject = require("@splunk/react-ui/Box");
172
- var Box_default = /*#__PURE__*/__webpack_require__.n(Box_namespaceObject);
173
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
174
- const Clickable_namespaceObject = require("@splunk/react-ui/Clickable");
175
- var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_namespaceObject);
176
- ;// CONCATENATED MODULE: external "@splunk/themes/mixins"
177
- const mixins_namespaceObject = require("@splunk/themes/mixins");
178
- ;// CONCATENATED MODULE: ./src/File/ItemStyles.ts
179
-
180
-
181
-
182
-
183
-
184
- var StyledBox = external_styled_components_default()((Box_default())).withConfig({
185
- displayName: "ItemStyles__StyledBox",
186
- componentId: "sc-1fsk3kr-0"
187
- })(["position:relative;width:100%;max-width:400px;margin:", ";background-color:", ";border-radius:", ";min-height:32px;color:", ";", " ", " ", " ", ";"], (0,themes_namespaceObject.pick)({
188
- enterprise: '5px auto 0',
189
- prisma: {
190
- comfortable: '8px auto 0',
191
- compact: '4px auto 0'
192
- }
193
- }), (0,themes_namespaceObject.pick)({
194
- enterprise: {
195
- light: themes_namespaceObject.variables.gray92,
196
- dark: themes_namespaceObject.variables.gray45
197
- },
198
- prisma: themes_namespaceObject.variables.interactiveColorBackground
199
- }), (0,themes_namespaceObject.pick)({
200
- enterprise: '2px',
201
- prisma: themes_namespaceObject.variables.borderRadius
202
- }), (0,themes_namespaceObject.pick)({
203
- enterprise: themes_namespaceObject.variables.textGray,
204
- prisma: themes_namespaceObject.variables.contentColorDefault
205
- }), (0,themes_namespaceObject.pick)({
206
- prisma: (0,external_styled_components_namespaceObject.css)(["border:1px solid ", ";padding-left:12px;"], themes_namespaceObject.variables.neutral200),
207
- enterprise: (0,external_styled_components_namespaceObject.css)(["line-height:24px;"])
208
- }), (0,themes_namespaceObject.pick)({
209
- enterprise: {
210
- compact: (0,external_styled_components_namespaceObject.css)(["min-height:24px;"])
211
- }
212
- }), function (_ref) {
213
- var $error = _ref.$error;
214
- return $error && (0,themes_namespaceObject.pick)({
215
- enterprise: (0,external_styled_components_namespaceObject.css)(["box-shadow:inset 0 0 0 1px ", ";"], themes_namespaceObject.variables.errorColor),
216
- prisma: (0,external_styled_components_namespaceObject.css)(["box-shadow:inset 0 0 0 1px ", ";background-color:", ";"], themes_namespaceObject.variables.accentColorNegative, themes_namespaceObject.variables.interactiveColorBackground)
217
- });
218
- }, function (_ref2) {
219
- var $disabled = _ref2.$disabled;
220
- return $disabled && (0,external_styled_components_namespaceObject.css)(["cursor:not-allowed;background-color:", ";"], (0,themes_namespaceObject.pick)({
221
- enterprise: {
222
- dark: themes_namespaceObject.variables.gray60,
223
- light: themes_namespaceObject.variables.gray96
224
- },
225
- prisma: (0,mixins_namespaceObject.overlayColors)(themes_namespaceObject.variables.interactiveColorBackground, themes_namespaceObject.variables.interactiveColorBackgroundDisabled)
226
- }));
227
- });
228
- var StyledErrorText = external_styled_components_default().div.withConfig({
229
- displayName: "ItemStyles__StyledErrorText",
230
- componentId: "sc-1fsk3kr-1"
231
- })(["font-size:", ";color:", ";line-height:16px;margin-top:4px;text-align:left;"], themes_namespaceObject.variables.fontSizeSmall, themes_namespaceObject.variables.accentColorNegative);
232
- var StyledIconClickable = external_styled_components_default()((Clickable_default())).withConfig({
233
- displayName: "ItemStyles__StyledIconClickable",
234
- componentId: "sc-1fsk3kr-2"
235
- })(["color:", ";border-radius:", ";padding:", ";text-align:center;", " ", " &:focus{color:", ";", "}&:hover{background-color:", ";color:", ";}"], (0,themes_namespaceObject.pick)({
236
- enterprise: 'inherit',
237
- prisma: themes_namespaceObject.variables.contentColorDefault
238
- }), (0,themes_namespaceObject.pick)({
239
- enterprise: '0 2px 2px 0',
240
- prisma: '50%'
241
- }), (0,themes_namespaceObject.pick)({
242
- enterprise: '3px 0',
243
- prisma: {
244
- comfortable: '0 8px',
245
- compact: '0 6px'
246
- }
247
- }), (0,themes_namespaceObject.pick)({
248
- enterprise: (0,external_styled_components_namespaceObject.css)(["flex-basis:", ";"], themes_namespaceObject.variables.inputHeight)
249
- }), function (_ref3) {
250
- var $error = _ref3.$error;
251
- return $error && (0,external_styled_components_namespaceObject.css)(["", ""], (0,themes_namespaceObject.pick)({
252
- enterprise: (0,external_styled_components_namespaceObject.css)(["border:1px solid ", ";border-left:none;"], themes_namespaceObject.variables.errorColor)
253
- }));
254
- }, (0,themes_namespaceObject.pick)({
255
- enterprise: themes_namespaceObject.variables.linkColor,
256
- prisma: themes_namespaceObject.variables.contentColorActive
257
- }), (0,themes_namespaceObject.pick)({
258
- enterprise: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";"], themes_namespaceObject.variables.focusShadow),
259
- prisma: (0,external_styled_components_namespaceObject.css)(["background-color:", ";box-shadow:0 0 0 3px ", ";"], themes_namespaceObject.variables.interactiveColorOverlayHover, themes_namespaceObject.variables.focusColor)
260
- }), (0,themes_namespaceObject.pick)({
261
- enterprise: {
262
- light: themes_namespaceObject.variables.gray96,
263
- dark: themes_namespaceObject.variables.gray30
264
- },
265
- prisma: themes_namespaceObject.variables.interactiveColorOverlayHover
266
- }), (0,themes_namespaceObject.pick)({
267
- enterprise: themes_namespaceObject.variables.linkColor,
268
- prisma: themes_namespaceObject.variables.contentColorActive
269
- })); // for Prisma theme only
270
-
271
- var StyledTrashIcon = external_styled_components_default()((Clickable_default())).withConfig({
272
- displayName: "ItemStyles__StyledTrashIcon",
273
- componentId: "sc-1fsk3kr-3"
274
- })(["color:", ";border-radius:50%;padding:", ";margin-right:", ";text-align:center;&:focus{color:", ";background-color:", ";box-shadow:0 0 0 3px ", ";}&:hover{background-color:", ";color:", ";}"], themes_namespaceObject.variables.contentColorDefault, (0,themes_namespaceObject.pick)({
275
- comfortable: '0 8px',
276
- compact: '0 6px'
277
- }), (0,themes_namespaceObject.pick)({
278
- comfortable: '0 4px',
279
- compact: '0 6px'
280
- }), themes_namespaceObject.variables.contentColorActive, themes_namespaceObject.variables.interactiveColorOverlayHover, themes_namespaceObject.variables.focusColor, themes_namespaceObject.variables.interactiveColorOverlayHover, themes_namespaceObject.variables.contentColorActive);
281
- var StyledLabel = external_styled_components_default().div.withConfig({
282
- displayName: "ItemStyles__StyledLabel",
283
- componentId: "sc-1fsk3kr-4"
284
- })(["color:", ";overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1 0 0px;padding:", ";border-radius:", ";", ""], themes_namespaceObject.variables.contentColorActive, (0,themes_namespaceObject.pick)({
285
- enterprise: '3px 0 3px 10px',
286
- prisma: {
287
- comfortable: '10px 0 10px 0',
288
- compact: '6px 0 6px 0'
289
- }
290
- }), (0,themes_namespaceObject.pick)({
291
- enterprise: '2px',
292
- prisma: themes_namespaceObject.variables.borderRadius
293
- }), function (_ref4) {
294
- var $disabled = _ref4.$disabled;
295
- return $disabled && (0,themes_namespaceObject.pick)({
296
- enterprise: {
297
- light: (0,external_styled_components_namespaceObject.css)(["color:", ";"], themes_namespaceObject.variables.textGray),
298
- dark: (0,external_styled_components_namespaceObject.css)(["color:", ";"], themes_namespaceObject.variables.textGray)
299
- },
300
- prisma: (0,external_styled_components_namespaceObject.css)(["color:", ";"], themes_namespaceObject.variables.contentColorDisabled)
301
- });
302
- }); // for Prisma theme only
303
-
304
- var StyledPaperClipIcon = external_styled_components_default().div.withConfig({
305
- displayName: "ItemStyles__StyledPaperClipIcon",
306
- componentId: "sc-1fsk3kr-5"
307
- })(["color:", ";padding:", ";", ""], themes_namespaceObject.variables.neutral400, (0,themes_namespaceObject.pick)({
308
- comfortable: '8px 4px 8px 0',
309
- compact: '4px 4px 4px 0'
310
- }), function (_ref5) {
311
- var $disabled = _ref5.$disabled;
312
- return $disabled && (0,external_styled_components_namespaceObject.css)(["color:", ";cursor:not-allowed;"], themes_namespaceObject.variables.contentColorDisabled);
313
- }); // for Prisma theme only
314
-
315
- var StyledPercentage = external_styled_components_default().span.withConfig({
316
- displayName: "ItemStyles__StyledPercentage",
317
- componentId: "sc-1fsk3kr-6"
318
- })(["color:", ";"], themes_namespaceObject.variables.contentColorMuted); // for Prisma theme only
319
-
320
- var StyledProgress = external_styled_components_default().div.withConfig({
321
- displayName: "ItemStyles__StyledProgress",
322
- componentId: "sc-1fsk3kr-7"
323
- })(["position:absolute;left:0;top:0;width:", "%;height:100%;background:", ";transition:width 300ms;border-radius:", ";"], function (_ref6) {
324
- var $uploadPercentage = _ref6.$uploadPercentage;
325
- return $uploadPercentage;
326
- }, themes_namespaceObject.variables.interactiveColorOverlaySelected, themes_namespaceObject.variables.borderRadius);
327
-
328
- ;// CONCATENATED MODULE: ./src/File/Item.tsx
329
- function Item_extends() { Item_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 Item_extends.apply(this, arguments); }
330
-
331
- 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; }
332
-
333
- 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; }
334
-
335
-
336
-
337
-
338
-
339
-
340
-
341
-
342
-
343
-
344
-
345
-
346
-
347
-
348
-
349
- var propTypes = {
350
- disabled: (external_prop_types_default()).bool,
351
- elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
352
- error: (external_prop_types_default()).bool,
353
-
354
- /** @private */
355
- index: (external_prop_types_default()).number,
356
- itemId: (external_prop_types_default()).any,
357
- name: (external_prop_types_default()).string.isRequired,
358
-
359
- /** If the uploadPercentage is 0, the item is assumed to be queued. If the upload is complete or
360
- * not applicable, uploadPercentage must be undefined. */
361
- uploadPercentage: (external_prop_types_default()).number
362
- };
363
-
364
- function Item(_ref) {
365
- var disabled = _ref.disabled,
366
- _ref$error = _ref.error,
367
- error = _ref$error === void 0 ? false : _ref$error,
368
- itemId = _ref.itemId,
369
- name = _ref.name,
370
- _ref$index = _ref.index,
371
- index = _ref$index === void 0 ? 0 : _ref$index,
372
- uploadPercentage = _ref.uploadPercentage,
373
- otherProps = _objectWithoutProperties(_ref, ["disabled", "error", "itemId", "name", "index", "uploadPercentage"]);
374
-
375
- // @docs-props-type ItemPropsBase
376
- var _useSplunkTheme = (0,themes_namespaceObject.useSplunkTheme)(),
377
- isPrisma = _useSplunkTheme.isPrisma,
378
- isEnterprise = _useSplunkTheme.isEnterprise,
379
- isCompact = _useSplunkTheme.isCompact;
380
-
381
- var prismaSize = isCompact ? '20px' : '24px';
382
-
383
- var _useContext = (0,external_react_namespaceObject.useContext)(FileContext),
384
- handleRequestRemoveContext = _useContext.onRequestRemove;
385
-
386
- function handleRequestRemove(e) {
387
- e.preventDefault();
388
- handleRequestRemoveContext === null || handleRequestRemoveContext === void 0 ? void 0 : handleRequestRemoveContext({
389
- itemId: itemId,
390
- name: name,
391
- index: index
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 = r => {
12
+ /******/ var t = r && r.__esModule ?
13
+ /******/ () => r["default"]
14
+ /******/ : () => r
15
+ /******/;
16
+ e.d(t, {
17
+ a: t
18
+ });
19
+ /******/ return t;
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/define property getters */
24
+ /******/ (() => {
25
+ /******/ // define getter functions for harmony exports
26
+ /******/ e.d = (r, t) => {
27
+ /******/ for (var a in t) {
28
+ /******/ if (e.o(t, a) && !e.o(r, a)) {
29
+ /******/ Object.defineProperty(r, a, {
30
+ enumerable: true,
31
+ get: t[a]
32
+ });
33
+ /******/ }
34
+ /******/ }
35
+ /******/ };
36
+ /******/ })();
37
+ /******/
38
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
+ /******/ (() => {
40
+ /******/ e.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
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 r = {};
60
+ // ESM COMPAT FLAG
61
+ e.r(r);
62
+ // EXPORTS
63
+ e.d(r, {
64
+ Item: () => /* reexport */ ne,
65
+ default: () => /* reexport */ Fe
392
66
  });
393
- }
394
-
395
- var _useContext2 = (0,external_react_namespaceObject.useContext)(FileContext),
396
- handleRequestRetryContext = _useContext2.onRequestRetry;
397
-
398
- function handleRequestRetry(e) {
399
- e.preventDefault();
400
- handleRequestRetryContext === null || handleRequestRetryContext === void 0 ? void 0 : handleRequestRetryContext({
401
- itemId: itemId,
402
- name: name,
403
- index: index
67
+ // CONCATENATED MODULE: external "react"
68
+ const t = require("react");
69
+ var a = e.n(t);
70
+ // CONCATENATED MODULE: external "prop-types"
71
+ const n = require("prop-types");
72
+ var i = e.n(n);
73
+ // CONCATENATED MODULE: external "lodash/debounce"
74
+ const o = require("lodash/debounce");
75
+ var l = e.n(o);
76
+ // CONCATENATED MODULE: external "lodash/omit"
77
+ const s = require("lodash/omit");
78
+ var c = e.n(s);
79
+ // CONCATENATED MODULE: external "lodash/toUpper"
80
+ const p = require("lodash/toUpper");
81
+ var d = e.n(p);
82
+ // CONCATENATED MODULE: external "lodash/isString"
83
+ const u = require("lodash/isString");
84
+ var v = e.n(u);
85
+ // CONCATENATED MODULE: external "@splunk/react-ui/EventListener"
86
+ const f = require("@splunk/react-ui/EventListener");
87
+ var m = e.n(f);
88
+ // CONCATENATED MODULE: external "@splunk/themes"
89
+ const b = require("@splunk/themes");
90
+ // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
91
+ const h = require("@splunk/ui-utils/i18n");
92
+ // CONCATENATED MODULE: external "@splunk/ui-utils/id"
93
+ const y = require("@splunk/ui-utils/id");
94
+ // CONCATENATED MODULE: external "lodash/isUndefined"
95
+ const g = require("lodash/isUndefined");
96
+ var C = e.n(g);
97
+ // CONCATENATED MODULE: external "@splunk/react-icons/Cross"
98
+ const x = require("@splunk/react-icons/Cross");
99
+ var k = e.n(x);
100
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Close"
101
+ const w = require("@splunk/react-icons/enterprise/Close");
102
+ var L = e.n(w);
103
+ // CONCATENATED MODULE: external "@splunk/react-ui/Progress"
104
+ const S = require("@splunk/react-ui/Progress");
105
+ var O = e.n(S);
106
+ // CONCATENATED MODULE: external "@splunk/ui-utils/format"
107
+ const I = require("@splunk/ui-utils/format");
108
+ // CONCATENATED MODULE: ./src/File/FileContext.tsx
109
+ var _ = (0, t.createContext)({
110
+ disabled: false
404
111
  });
405
- }
406
-
407
- var _useContext3 = (0,external_react_namespaceObject.useContext)(FileContext),
408
- disabledContext = _useContext3.disabled;
409
-
410
- var removeLabel = (0,format_namespaceObject.sprintf)((0,i18n_namespaceObject._)('Remove "%(filename)s"'), {
411
- filename: name
412
- });
413
- var retryLabel = (0,format_namespaceObject.sprintf)((0,i18n_namespaceObject._)('Retry "%(filename)s"'), {
414
- filename: name
415
- });
416
- var uploadLabel = (0,format_namespaceObject.sprintf)((0,i18n_namespaceObject._)('Uploading "%(filename)s"'), {
417
- filename: name
418
- });
419
-
420
- var removeScreenReaderText = (0,i18n_namespaceObject._)('Remove');
421
-
422
- var progressLabel = /*#__PURE__*/external_react_default().createElement("span", null, /*#__PURE__*/external_react_default().createElement("span", {
423
- style: {
424
- paddingRight: '4px'
112
+ _.displayName = "File";
113
+ /* harmony default export */ const E = _;
114
+ // CONCATENATED MODULE: external "@splunk/react-icons/SVGEnterprise"
115
+ const R = require("@splunk/react-icons/SVGEnterprise");
116
+ var D = e.n(R);
117
+ // CONCATENATED MODULE: ./src/File/PaperClip.tsx
118
+ function q() {
119
+ q = Object.assign || function(e) {
120
+ for (var r = 1; r < arguments.length; r++) {
121
+ var t = arguments[r];
122
+ for (var a in t) {
123
+ if (Object.prototype.hasOwnProperty.call(t, a)) {
124
+ e[a] = t[a];
125
+ }
126
+ }
127
+ }
128
+ return e;
129
+ };
130
+ return q.apply(this, arguments);
425
131
  }
426
- }, (0,i18n_namespaceObject._)('Uploading ')), /*#__PURE__*/external_react_default().createElement(StyledPercentage, null, uploadPercentage, "%"));
427
- var label = isPrisma && !isUndefined_default()(uploadPercentage) && uploadPercentage > 0 ? progressLabel : name;
428
- var disabledValue = disabled !== undefined ? disabled : disabledContext;
429
- return /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement(StyledBox, Item_extends({
430
- "data-test": "item",
431
- "data-test-disabled": disabledValue,
432
- "data-test-error": error
433
- }, otherProps, {
434
- flex: true,
435
- $error: error,
436
- $disabled: disabledValue
437
- }), isPrisma && isUndefined_default()(uploadPercentage) && /*#__PURE__*/external_react_default().createElement(StyledPaperClipIcon, {
438
- "data-test": "paper-clip",
439
- $disabled: disabledValue
440
- }, /*#__PURE__*/external_react_default().createElement(PaperClip, {
441
- "aria-hidden": "true"
442
- })), /*#__PURE__*/external_react_default().createElement(StyledLabel, {
443
- "data-test": "label",
444
- $error: error,
445
- $disabled: disabledValue
446
- }, label), isPrisma && handleRequestRetryContext && error && /*#__PURE__*/external_react_default().createElement(StyledIconClickable, {
447
- "data-test": "retry",
448
- onClick: handleRequestRetry,
449
- "aria-label": retryLabel
450
- }, /*#__PURE__*/external_react_default().createElement(Retry, {
451
- screenReaderText: (0,i18n_namespaceObject._)('Retry')
452
- })), !disabledValue && (isPrisma && isUndefined_default()(uploadPercentage) && !error ? /*#__PURE__*/external_react_default().createElement(StyledTrashIcon, {
453
- "data-test": "remove",
454
- onClick: handleRequestRemove,
455
- "aria-label": removeLabel
456
- }, /*#__PURE__*/external_react_default().createElement(Trash, {
457
- screenReaderText: (0,i18n_namespaceObject._)('Remove')
458
- })) : /*#__PURE__*/external_react_default().createElement(StyledIconClickable, {
459
- "data-test": "remove",
460
- $error: error,
461
- onClick: handleRequestRemove,
462
- "aria-label": removeLabel
463
- }, isEnterprise ? /*#__PURE__*/external_react_default().createElement((Close_default()), {
464
- hideDefaultTooltip: true,
465
- screenReaderText: removeScreenReaderText
466
- }) : /*#__PURE__*/external_react_default().createElement((Cross_default()), {
467
- "aria-label": removeScreenReaderText,
468
- height: prismaSize,
469
- width: prismaSize
470
- }))), !isUndefined_default()(uploadPercentage) && uploadPercentage > 0 && (isPrisma ? /*#__PURE__*/external_react_default().createElement(StyledProgress, {
471
- $uploadPercentage: uploadPercentage,
472
- "aria-label": uploadLabel,
473
- role: "progressbar",
474
- "aria-valuenow": uploadPercentage,
475
- "aria-valuemin": 0,
476
- "aria-valuemax": 100
477
- }) : /*#__PURE__*/external_react_default().createElement((Progress_default()), {
478
- style: {
479
- position: 'absolute',
480
- left: 0,
481
- top: 0,
482
- right: 0,
483
- zIndex: 1
484
- },
485
- percentage: uploadPercentage,
486
- "aria-label": uploadLabel
487
- }))), isPrisma && error && /*#__PURE__*/external_react_default().createElement(StyledErrorText, null, (0,i18n_namespaceObject._)('Something went wrong.')));
488
- }
489
-
490
- Item.propTypes = propTypes;
491
- /* harmony default export */ const File_Item = (Item);
492
- ;// CONCATENATED MODULE: ./src/File/Icon.tsx
493
- function Icon_extends() { Icon_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 Icon_extends.apply(this, arguments); }
494
-
495
-
496
-
497
-
498
- function FileIcon(props) {
499
- return /*#__PURE__*/external_react_default().createElement((SVGEnterprise_default()), Icon_extends({
500
- hideDefaultTooltip: true,
501
- screenReaderText: (0,i18n_namespaceObject._)('File upload'),
502
- viewBox: "0 0 72 88"
503
- }, props), /*#__PURE__*/external_react_default().createElement("path", {
504
- d: "M50,27 L68.0005854,27 C70.2022516,27 72,28.7919267 72,31.0023804 L72,83.9976196 C72,86.2074215 70.2094011,88 68.0005854,88 L3.99941455,88 C1.79774843,88 0,86.2080733 0,83.9976196 L0,31.0023804 C0,28.7925785 1.79059889,27 3.99941455,27 L21,27 L21,32 L5.99898406,32 C5.4472604,32 5,32.4408979 5,32.9958767 L5,82.0041233 C5,82.5541308 5.44605521,83 5.99898406,83 L66.0010159,83 C66.5527396,83 67,82.5591021 67,82.0041233 L67,32.9958767 C67,32.4458692 66.5539448,32 66.0010159,32 L50,32 L50,27 Z"
505
- }), /*#__PURE__*/external_react_default().createElement("path", {
506
- d: "M41.9634682,10 L41.9634682,28 L46.9634682,28 L46.9634682,5 L44.4634682,5 L23.9634682,5 L23.9634682,10 L41.9634682,10 Z",
507
- transform: "translate(35.463468, 16.500000) rotate(-45.000000) translate(-35.463468, -16.500000) "
508
- }), /*#__PURE__*/external_react_default().createElement("rect", {
509
- x: "33",
510
- y: "3",
511
- width: "5",
512
- height: "51"
513
- }));
514
- }
515
- ;// CONCATENATED MODULE: ./src/File/FileStyles.ts
516
-
517
-
518
-
519
-
520
- var StyledInput = external_styled_components_default().input.withConfig({
521
- displayName: "FileStyles__StyledInput",
522
- componentId: "sc-1wyh4cf-0"
523
- })(["&[type='file']{width:0.1px;height:0.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1;}"]);
524
- var icon = (0,external_styled_components_namespaceObject.css)(["fill:", ";"], (0,themes_namespaceObject.pick)({
525
- enterprise: {
526
- light: themes_namespaceObject.variables.gray60,
527
- dark: themes_namespaceObject.variables.gray80
528
- }
529
- }));
530
- var StyledNormalIcon = external_styled_components_default()(FileIcon).withConfig({
531
- displayName: "FileStyles__StyledNormalIcon",
532
- componentId: "sc-1wyh4cf-1"
533
- })(["", ";height:1.4em;width:1.4em;display:inline-block;vertical-align:middle;padding-bottom:3px;"], icon);
534
- var StyledWindowIcon = external_styled_components_default()(FileIcon).withConfig({
535
- displayName: "FileStyles__StyledWindowIcon",
536
- componentId: "sc-1wyh4cf-2"
537
- })(["", ";height:48px;width:48px;position:absolute;top:30px;left:50%;transform:translateX(-50%);"], icon);
538
- var StyledLink = external_styled_components_default().label.withConfig({
539
- displayName: "FileStyles__StyledLink",
540
- componentId: "sc-1wyh4cf-3"
541
- })(["", ";color:", ";cursor:pointer;font-size:inherit;font-weight:inherit;&:hover,&[data-focused]{text-decoration:underline;}&[data-focused]{box-shadow:", ";}"], themes_namespaceObject.mixins.reset('inline'), themes_namespaceObject.variables.linkColor, (0,themes_namespaceObject.pick)({
542
- enterprise: themes_namespaceObject.variables.focusShadowInset,
543
- prisma: themes_namespaceObject.variables.focusShadow
544
- }));
545
- var StyledNormalText = external_styled_components_default().div.withConfig({
546
- displayName: "FileStyles__StyledNormalText",
547
- componentId: "sc-1wyh4cf-4"
548
- })(["", " ", " ", " ", ""], (0,themes_namespaceObject.pick)({
549
- enterprise: (0,external_styled_components_namespaceObject.css)(["display:inline-block;"]),
550
- prisma: (0,external_styled_components_namespaceObject.css)(["display:inline-flex;flex-direction:column;justify-content:center;text-align:center;color:", ";border:1px dashed ", ";padding:8px;border-radius:", ";min-height:128px;&:not(:last-child){margin-bottom:4px;}"], themes_namespaceObject.variables.contentColorActive, themes_namespaceObject.variables.contentColorMuted, themes_namespaceObject.variables.borderRadius)
551
- }), function (_ref) {
552
- var $dragOver = _ref.$dragOver;
553
- return $dragOver && (0,external_styled_components_namespaceObject.css)(["", ""], (0,themes_namespaceObject.pick)({
554
- prisma: (0,external_styled_components_namespaceObject.css)(["border:1px dashed ", ";background-color:", ";"], themes_namespaceObject.variables.interactiveColorPrimary, themes_namespaceObject.mixins.colorWithAlpha(themes_namespaceObject.variables.interactiveColorPrimary, 0.1))
555
- }));
556
- }, function (_ref2) {
557
- var $error = _ref2.$error,
558
- $dragOver = _ref2.$dragOver;
559
- return $error && !$dragOver && (0,themes_namespaceObject.pick)({
560
- prisma: (0,external_styled_components_namespaceObject.css)(["border:1px dashed ", ";color:", ";background-color:", ";"], themes_namespaceObject.variables.accentColorNegative, themes_namespaceObject.variables.accentColorNegative, themes_namespaceObject.mixins.colorWithAlpha(themes_namespaceObject.variables.accentColorNegative, 0.1))
561
- });
562
- }, function (_ref3) {
563
- var $disabled = _ref3.$disabled;
564
- return $disabled && (0,external_styled_components_namespaceObject.css)(["border:none;min-height:0;color:", ";cursor:not-allowed;"], (0,themes_namespaceObject.pick)({
565
- prisma: themes_namespaceObject.variables.contentColorDisabled
566
- }));
567
- });
568
- var StyledWindowText = external_styled_components_default().div.withConfig({
569
- displayName: "FileStyles__StyledWindowText",
570
- componentId: "sc-1wyh4cf-5"
571
- })(["margin-top:", ";margin-bottom:", ";font-size:", ";", ""], (0,themes_namespaceObject.pick)({
572
- enterprise: (0,external_styled_components_namespaceObject.css)(["calc(", " * 4)"], themes_namespaceObject.variables.spacing),
573
- prisma: (0,external_styled_components_namespaceObject.css)(["calc(", " * 4)"], themes_namespaceObject.variables.spacingLarge)
574
- }), (0,themes_namespaceObject.pick)({
575
- enterprise: themes_namespaceObject.variables.spacingHalf,
576
- prisma: themes_namespaceObject.variables.spacingMedium
577
- }), themes_namespaceObject.variables.fontSizeXLarge, (0,themes_namespaceObject.pick)({
578
- prisma: (0,external_styled_components_namespaceObject.css)(["color:", ";"], themes_namespaceObject.variables.contentColorActive)
579
- }));
580
- var StyledSubtitle = external_styled_components_default().div.withConfig({
581
- displayName: "FileStyles__StyledSubtitle",
582
- componentId: "sc-1wyh4cf-6"
583
- })(["color:", ";padding:4px 8px;font-size:12px;line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"], themes_namespaceObject.variables.contentColorMuted);
584
- var StyledHelp = external_styled_components_default().div.withConfig({
585
- displayName: "FileStyles__StyledHelp",
586
- componentId: "sc-1wyh4cf-7"
587
- })(["margin-bottom:", ";"], (0,themes_namespaceObject.pick)({
588
- enterprise: themes_namespaceObject.variables.spacingXLarge,
589
- prisma: (0,external_styled_components_namespaceObject.css)(["calc(", " * 1.5)"], themes_namespaceObject.variables.spacingLarge)
590
- }));
591
- var StyledWindowDrop = external_styled_components_default().div.withConfig({
592
- displayName: "FileStyles__StyledWindowDrop",
593
- componentId: "sc-1wyh4cf-8"
594
- })(["position:fixed;top:0;left:0;right:0;bottom:0;border:", ";z-index:", " + 10;"], (0,themes_namespaceObject.pick)({
595
- enterprise: "5px solid ".concat(themes_namespaceObject.variables.accentColorL10),
596
- prisma: "5px solid ".concat(themes_namespaceObject.variables.interactiveColorPrimary)
597
- }), themes_namespaceObject.variables.zindexModal);
598
- var StyledDropNormalTargetBox = external_styled_components_default()((Box_default())).withConfig({
599
- displayName: "FileStyles__StyledDropNormalTargetBox",
600
- componentId: "sc-1wyh4cf-9"
601
- })(["", ";flex-direction:column;justify-content:center;text-align:center;border-radius:", ";", " ", " ", " ", " ", " ", ""], themes_namespaceObject.mixins.reset('flex'), themes_namespaceObject.variables.borderRadius, (0,themes_namespaceObject.pick)({
602
- enterprise: (0,external_styled_components_namespaceObject.css)(["line-height:calc(", " - 2px);"], themes_namespaceObject.variables.inputHeight)
603
- }), (0,themes_namespaceObject.pick)({
604
- enterprise: {
605
- comfortable: (0,external_styled_components_namespaceObject.css)(["min-height:73px;padding:", ";"], themes_namespaceObject.variables.spacingQuarter),
606
- compact: (0,external_styled_components_namespaceObject.css)(["min-height:63px;padding:3px;"])
607
- }
608
- }), (0,themes_namespaceObject.pick)({
609
- enterprise: {
610
- light: (0,external_styled_components_namespaceObject.css)(["border:1px dashed ", ";"], themes_namespaceObject.variables.borderColor),
611
- dark: (0,external_styled_components_namespaceObject.css)(["border:1px dashed ", ";"], themes_namespaceObject.variables.textGray)
612
- }
613
- }), function (_ref4) {
614
- var $dragOver = _ref4.$dragOver;
615
- return $dragOver && (0,themes_namespaceObject.pick)({
616
- enterprise: (0,external_styled_components_namespaceObject.css)(["border:1px solid ", ";"], themes_namespaceObject.variables.accentColorL10)
617
- });
618
- }, function (_ref5) {
619
- var $error = _ref5.$error,
620
- $dragOver = _ref5.$dragOver;
621
- return $error && !$dragOver && (0,themes_namespaceObject.pick)({
622
- enterprise: (0,external_styled_components_namespaceObject.css)(["border:1px solid ", ";"], themes_namespaceObject.variables.errorColor)
623
- });
624
- }, function (_ref6) {
625
- var $disabled = _ref6.$disabled,
626
- $fileCount = _ref6.$fileCount;
627
- return $disabled && (0,external_styled_components_namespaceObject.css)(["border:", ";color:", ";cursor:not-allowed;", " ", ""], (0,themes_namespaceObject.pick)({
628
- enterprise: 'none',
629
- prisma: "1px solid ".concat(themes_namespaceObject.variables.contentColorDisabled)
630
- }), (0,themes_namespaceObject.pick)({
631
- enterprise: themes_namespaceObject.variables.textGray,
632
- prisma: themes_namespaceObject.variables.contentColorDisabled
633
- }), $fileCount === 0 && (0,themes_namespaceObject.pick)({
634
- enterprise: {
635
- light: (0,external_styled_components_namespaceObject.css)(["background-color:", ";"], themes_namespaceObject.variables.gray96),
636
- dark: (0,external_styled_components_namespaceObject.css)(["background-color:", ";"], themes_namespaceObject.variables.gray60)
637
- },
638
- prisma: (0,external_styled_components_namespaceObject.css)(["border:1px dashed ", ";min-height:128px;"], themes_namespaceObject.variables.contentColorDisabled)
639
- }), $fileCount !== 0 && (0,themes_namespaceObject.pick)({
640
- prisma: (0,external_styled_components_namespaceObject.css)(["", "{padding:0;}"],
641
- /* sc-sel */
642
- StyledNormalText)
643
- }));
644
- });
645
- var StyledWindowDropTargetBox = external_styled_components_default()((Box_default())).withConfig({
646
- displayName: "FileStyles__StyledWindowDropTargetBox",
647
- componentId: "sc-1wyh4cf-10"
648
- })(["position:relative;text-align:center;min-height:250px;padding:", ";", ""], themes_namespaceObject.variables.spacingLarge, function (_ref7) {
649
- var $disabled = _ref7.$disabled;
650
- return $disabled && (0,external_styled_components_namespaceObject.css)(["color:", ";"], (0,themes_namespaceObject.pick)({
651
- enterprise: themes_namespaceObject.variables.textGray,
652
- prisma: themes_namespaceObject.variables.contentColorMuted
653
- }));
654
- });
655
-
656
- ;// CONCATENATED MODULE: ./src/File/File.tsx
657
- 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); }
658
-
659
- function File_extends() { File_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 File_extends.apply(this, arguments); }
660
-
661
- function File_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = File_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; }
662
-
663
- function File_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; }
664
-
665
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
666
-
667
- 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); } }
668
-
669
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
670
-
671
- 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); }
672
-
673
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
674
-
675
- 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); }; }
676
-
677
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
678
-
679
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
680
-
681
- 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; } }
682
-
683
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
684
-
685
- 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; }
686
-
687
-
688
-
689
-
690
-
691
-
692
-
693
-
694
-
695
-
696
-
697
-
698
-
699
-
700
- /** @public */
701
-
702
- var File_propTypes = {
703
- accept: (external_prop_types_default()).string,
704
- allowMultiple: (external_prop_types_default()).bool,
705
- children: (external_prop_types_default()).node,
706
- disabled: (external_prop_types_default()).bool,
707
- dropAnywhere: (external_prop_types_default()).bool,
708
- elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
709
- fullscreen: (external_prop_types_default()).bool,
710
- error: (external_prop_types_default()).bool,
711
- help: (external_prop_types_default()).node,
712
- name: (external_prop_types_default()).string,
713
- onRequestAdd: (external_prop_types_default()).func,
714
- onRequestRemove: (external_prop_types_default()).func,
715
- onRequestRetry: (external_prop_types_default()).func,
716
-
717
- /** @private. */
718
- required: (external_prop_types_default()).bool,
719
- supportsMessage: (external_prop_types_default()).node,
720
-
721
- /** @private */
722
- splunkTheme: (external_prop_types_default()).object
723
- };
724
- var defaultProps = {
725
- allowMultiple: false,
726
- disabled: false,
727
- dropAnywhere: false,
728
- error: false
729
- };
730
-
731
- /**
732
- * File provides the ability to accept files and present uploaded files. It does not provide
733
- * file readers, only a reference to the file. This can be used to post binary content, or
734
- * upload using an array buffer.
735
- */
736
- var File = /*#__PURE__*/function (_Component) {
737
- _inherits(File, _Component);
738
-
739
- var _super = _createSuper(File);
740
-
741
- // @docs-props-type FilePropsBase
742
- function File(props) {
743
- var _this;
744
-
745
- _classCallCheck(this, File);
746
-
747
- _this = _super.call(this, props);
748
-
749
- _defineProperty(_assertThisInitialized(_this), "inputId", void 0);
750
-
751
- _defineProperty(_assertThisInitialized(_this), "inputCount", void 0);
752
-
753
- _defineProperty(_assertThisInitialized(_this), "handleInputChange", function (e) {
754
- var _e$currentTarget$file;
755
-
756
- _this.addFiles((_e$currentTarget$file = e.currentTarget.files) !== null && _e$currentTarget$file !== void 0 ? _e$currentTarget$file : undefined);
757
- });
758
-
759
- _defineProperty(_assertThisInitialized(_this), "handleInputFocus", function () {
760
- _this.setState({
761
- focusedInput: true
762
- });
763
- });
764
-
765
- _defineProperty(_assertThisInitialized(_this), "handleInputBlur", function () {
766
- _this.setState({
767
- focusedInput: false
768
- });
769
- });
770
-
771
- _defineProperty(_assertThisInitialized(_this), "handleDragOver", function (e) {
772
- if (!_this.state.dragOver) {
773
- _this.setState({
774
- dragOver: true
132
+ function j(e) {
133
+
134
+ return a().createElement(D(), q({
135
+ hideDefaultTooltip: true,
136
+ viewBox: "0 0 16 16",
137
+ width: "16px",
138
+ height: "16px"
139
+ }, e), a().createElement("path", {
140
+ d: "M8.624 14.7021C8.23332 15.0928 7.59989 15.0928 7.2092 14.7021L2.33962 9.83209C0.546941 8.03927 0.54695 5.1325 2.33964 3.33968C4.13162 1.54758 7.03672 1.54684 8.82962 3.33802L14.1746 8.67787C15.2682 9.77043 15.2687 11.5429 14.1756 12.636C13.083 13.7288 11.3115 13.7288 10.2189 12.636L4.87676 7.29338C4.48607 6.90266 4.48607 6.26917 4.87676 5.87845C5.26744 5.48773 5.90087 5.48773 6.29155 5.87845L11.6337 11.2211C11.9449 11.5324 12.4496 11.5324 12.7608 11.2211C13.0722 10.9097 13.0721 10.4048 12.7606 10.0936L7.41557 4.75369C6.40415 3.74325 4.76532 3.74367 3.75442 4.75463C2.74312 5.766 2.74312 7.40578 3.75441 8.41715L8.62399 13.2871C9.01468 13.6779 9.01468 14.3113 8.624 14.7021Z",
141
+ fill: "currentColor"
142
+ }));
143
+ }
144
+ // CONCATENATED MODULE: ./src/File/Retry.tsx
145
+ function P() {
146
+ P = Object.assign || function(e) {
147
+ for (var r = 1; r < arguments.length; r++) {
148
+ var t = arguments[r];
149
+ for (var a in t) {
150
+ if (Object.prototype.hasOwnProperty.call(t, a)) {
151
+ e[a] = t[a];
152
+ }
153
+ }
154
+ }
155
+ return e;
156
+ };
157
+ return P.apply(this, arguments);
158
+ }
159
+ function T(e) {
160
+ var r = (0, b.useSplunkTheme)(), t = r.density;
161
+ var n = t === "compact" ? "20px" : "24px";
162
+
163
+ return a().createElement(D(), P({
164
+ hideDefaultTooltip: true,
165
+ viewBox: "0 0 24 24",
166
+ width: n,
167
+ height: n
168
+ }, e), a().createElement("path", {
169
+ d: "M18.2685 14.3175L18.4349 14.9384C18.6078 14.558 18.7453 14.162 18.8452 13.7556C18.9449 13.3507 19.0068 12.9373 19.0303 12.521L19.0362 12.4167C19.0663 11.883 19.0409 11.3476 18.9604 10.8191L18.9462 10.7261C18.8794 10.287 18.7695 9.85559 18.6181 9.43803C18.4827 9.06459 18.3148 8.70378 18.1162 8.35979L18.0868 8.30889C17.8331 7.86964 17.5281 7.46215 17.1781 7.09503C16.9596 6.8658 16.7243 6.65314 16.4743 6.4588L16.318 6.33739C16.0132 6.10052 15.6825 5.88712 15.34 5.70564C14.95 5.49901 14.5348 5.32943 14.1132 5.20545C13.7201 5.08986 13.317 5.01136 12.9093 4.97099L12.8406 4.96419C12.4182 4.92237 11.993 4.91829 11.5699 4.95201C11.1331 4.98682 10.7005 5.06176 10.2774 5.17589L9.70069 5.33148C9.16747 5.47533 8.61859 5.15969 8.47474 4.62647C8.33089 4.09324 8.64653 3.54437 9.17976 3.40051L9.7565 3.24492C10.298 3.09883 10.8519 3.00289 11.411 2.95833C11.9526 2.91517 12.497 2.92038 13.0377 2.97392L13.1063 2.98072C13.6384 3.03341 14.1644 3.13584 14.6774 3.28668C15.2296 3.44906 15.7694 3.66976 16.2764 3.9384C16.7197 4.17329 17.1479 4.44938 17.5453 4.75819L17.7015 4.8796C18.0299 5.13478 18.3388 5.41401 18.6257 5.715C19.0853 6.19704 19.4858 6.73209 19.8188 7.30885L19.8482 7.35975C20.1055 7.80535 20.323 8.27272 20.4984 8.75646C20.6944 9.29736 20.8368 9.85624 20.9234 10.425L20.9376 10.518C21.0389 11.1833 21.0709 11.8573 21.033 12.5293L21.0271 12.6335C20.9967 13.1731 20.9164 13.7087 20.7873 14.2334C20.6488 14.7966 20.4548 15.3442 20.2083 15.8683L20.718 15.7317C21.2515 15.5888 21.7998 15.9054 21.9428 16.4389C22.0857 16.9723 21.7691 17.5207 21.2356 17.6636L18.8208 18.3106C18.0206 18.525 17.1981 18.0501 16.9837 17.2499L16.3367 14.8352C16.1937 14.3017 16.5103 13.7534 17.0438 13.6104C17.5773 13.4675 18.1256 13.7841 18.2685 14.3175ZM3.92363 7.90992L3.33327 8.06809C2.7998 8.21103 2.25147 7.89443 2.10854 7.36097C1.9656 6.8275 2.2822 6.27917 2.81566 6.13623L5.2305 5.48922C6.03069 5.27483 6.85318 5.7497 7.06759 6.54989L7.71463 8.96466C7.85757 9.49813 7.54099 10.0465 7.00752 10.1894C6.47405 10.3324 5.92572 10.0158 5.78278 9.4823L5.64111 8.9536C5.46988 9.32312 5.33225 9.70767 5.23007 10.1026C5.1256 10.5063 5.05872 10.9189 5.03027 11.3349L5.02314 11.4391C4.98667 11.9725 5.00567 12.5081 5.07982 13.0376L5.09286 13.1307C5.15447 13.5705 5.25921 14.0032 5.40556 14.4226C5.53644 14.7976 5.70008 15.1604 5.89456 15.5068L5.92334 15.558C6.17169 16.0003 6.47181 16.4114 6.81738 16.7826C7.03315 17.0145 7.26586 17.2299 7.51359 17.4273L7.66835 17.5505C7.97029 17.791 8.29849 18.0084 8.63879 18.1939C9.02626 18.4052 9.43938 18.5797 9.8595 18.7088C10.2512 18.829 10.6533 18.9124 11.0605 18.9576L11.1291 18.9652C11.551 19.0121 11.9761 19.0213 12.3996 18.9926C12.8368 18.963 13.2703 18.8933 13.6946 18.7842L14.2732 18.6355C14.8081 18.4981 15.3532 18.8202 15.4906 19.3552C15.6281 19.8901 15.3059 20.4351 14.771 20.5726L14.1924 20.7213C13.6492 20.8609 13.0943 20.9502 12.5346 20.988C11.9925 21.0247 11.4483 21.013 10.9083 20.953L10.8397 20.9454C10.3082 20.8863 9.78352 20.7776 9.27238 20.6206C8.72212 20.4517 8.18505 20.2245 7.68131 19.9498C7.24086 19.7097 6.81595 19.4285 6.42229 19.1149L6.26753 18.9917C5.94226 18.7326 5.6367 18.4497 5.35338 18.1453C4.89963 17.6578 4.50556 17.118 4.17948 16.5373L4.1507 16.486C3.89877 16.0374 3.6868 15.5674 3.51725 15.0816C3.32768 14.5384 3.192 13.9779 3.1122 13.4081L3.09915 13.315C3.0058 12.6485 2.98189 11.9741 3.0278 11.3027L3.03493 11.1985C3.07179 10.6594 3.15847 10.1248 3.29383 9.60161C3.44505 9.01718 3.65617 8.4503 3.92363 7.90992Z",
170
+ fill: "currentColor"
171
+ }));
172
+ }
173
+ // CONCATENATED MODULE: ./src/File/Trash.tsx
174
+ function $() {
175
+ $ = Object.assign || function(e) {
176
+ for (var r = 1; r < arguments.length; r++) {
177
+ var t = arguments[r];
178
+ for (var a in t) {
179
+ if (Object.prototype.hasOwnProperty.call(t, a)) {
180
+ e[a] = t[a];
181
+ }
182
+ }
183
+ }
184
+ return e;
185
+ };
186
+ return $.apply(this, arguments);
187
+ }
188
+ function N(e) {
189
+ var r = (0, b.useSplunkTheme)(), t = r.density;
190
+ var n = t === "compact" ? "20px" : "24px";
191
+
192
+ return a().createElement(D(), $({
193
+ hideDefaultTooltip: true,
194
+ viewBox: "0 0 24 24",
195
+ width: n,
196
+ height: n
197
+ }, e), a().createElement("path", {
198
+ d: "M10 4V6H14V4H10ZM16 6H17H19H20C20.5523 6 21 6.44772 21 7C21 7.55228 20.5523 8 20 8H19V20.5C19 21.3284 18.3284 22 17.5 22H6.5C5.67157 22 5 21.3284 5 20.5V8H4C3.44772 8 3 7.55228 3 7C3 6.44772 3.44772 6 4 6H5H7H8V3.5C8 2.67157 8.67157 2 9.5 2H14.5C15.3284 2 16 2.67157 16 3.5V6ZM7 8V20H17V8H7ZM10.5858 14L9.2929 15.2929C8.90237 15.6834 8.90237 16.3166 9.2929 16.7071C9.68342 17.0976 10.3166 17.0976 10.7071 16.7071L12 15.4142L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L13.4142 14L14.7071 12.7071C15.0976 12.3166 15.0976 11.6834 14.7071 11.2929C14.3166 10.9024 13.6834 10.9024 13.2929 11.2929L12 12.5858L10.7071 11.2929C10.3166 10.9024 9.68342 10.9024 9.29289 11.2929C8.90237 11.6834 8.90237 12.3166 9.29289 12.7071L10.5858 14Z",
199
+ fill: "currentColor"
200
+ }));
201
+ }
202
+ // CONCATENATED MODULE: external "styled-components"
203
+ const M = require("styled-components");
204
+ var F = e.n(M);
205
+ // CONCATENATED MODULE: external "@splunk/react-ui/Box"
206
+ const H = require("@splunk/react-ui/Box");
207
+ var A = e.n(H);
208
+ // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
209
+ const B = require("@splunk/react-ui/Clickable");
210
+ var z = e.n(B);
211
+ // CONCATENATED MODULE: external "@splunk/themes/mixins"
212
+ const V = require("@splunk/themes/mixins");
213
+ // CONCATENATED MODULE: ./src/File/ItemStyles.ts
214
+ var Z = F()(A()).withConfig({
215
+ displayName: "ItemStyles__StyledBox",
216
+ componentId: "sc-1fsk3kr-0"
217
+ })([ "position:relative;width:100%;max-width:400px;margin:", ";background-color:", ";border-radius:", ";min-height:32px;color:", ";", " ", " ", " ", ";" ], (0,
218
+ b.pick)({
219
+ enterprise: "5px auto 0",
220
+ prisma: {
221
+ comfortable: "8px auto 0",
222
+ compact: "4px auto 0"
223
+ }
224
+ }), (0, b.pick)({
225
+ enterprise: {
226
+ light: b.variables.gray92,
227
+ dark: b.variables.gray45
228
+ },
229
+ prisma: b.variables.interactiveColorBackground
230
+ }), (0, b.pick)({
231
+ enterprise: "2px",
232
+ prisma: b.variables.borderRadius
233
+ }), (0, b.pick)({
234
+ enterprise: b.variables.textGray,
235
+ prisma: b.variables.contentColorDefault
236
+ }), (0, b.pick)({
237
+ prisma: (0, M.css)([ "border:1px solid ", ";padding-left:12px;" ], b.variables.neutral200),
238
+ enterprise: (0, M.css)([ "line-height:24px;" ])
239
+ }), (0, b.pick)({
240
+ enterprise: {
241
+ compact: (0, M.css)([ "min-height:24px;" ])
242
+ }
243
+ }), (function(e) {
244
+ var r = e.$error;
245
+ return r && (0, b.pick)({
246
+ enterprise: (0, M.css)([ "box-shadow:inset 0 0 0 1px ", ";" ], b.variables.errorColor),
247
+ prisma: (0, M.css)([ "box-shadow:inset 0 0 0 1px ", ";background-color:", ";" ], b.variables.accentColorNegative, b.variables.interactiveColorBackground)
775
248
  });
776
- }
777
-
778
- e.preventDefault();
779
- });
780
-
781
- _defineProperty(_assertThisInitialized(_this), "handleDragLeave", function () {
782
- _this.setState({
783
- dragOver: false
784
- });
785
- });
786
-
787
- _defineProperty(_assertThisInitialized(_this), "handleDrop", function (e) {
788
- var _e$dataTransfer;
789
-
790
- e.preventDefault();
791
-
792
- _this.handleDragLeave();
793
-
794
- _this.addFiles((_e$dataTransfer = e.dataTransfer) === null || _e$dataTransfer === void 0 ? void 0 : _e$dataTransfer.files);
795
- });
796
-
797
- _this.state = {
798
- dragOver: false,
799
- focusedInput: false
249
+ }), (function(e) {
250
+ var r = e.$disabled;
251
+ return r && (0, M.css)([ "cursor:not-allowed;background-color:", ";" ], (0, b.pick)({
252
+ enterprise: {
253
+ dark: b.variables.gray60,
254
+ light: b.variables.gray96
255
+ },
256
+ prisma: (0, V.overlayColors)(b.variables.interactiveColorBackground, b.variables.interactiveColorBackgroundDisabled)
257
+ }));
258
+ }));
259
+ var G = F().div.withConfig({
260
+ displayName: "ItemStyles__StyledErrorText",
261
+ componentId: "sc-1fsk3kr-1"
262
+ })([ "font-size:", ";color:", ";line-height:16px;margin-top:4px;text-align:left;" ], b.variables.fontSizeSmall, b.variables.accentColorNegative);
263
+ var W = F()(z()).withConfig({
264
+ displayName: "ItemStyles__StyledIconClickable",
265
+ componentId: "sc-1fsk3kr-2"
266
+ })([ "color:", ";border-radius:", ";padding:", ";text-align:center;", " ", " &:focus{color:", ";", "}&:hover{background-color:", ";color:", ";}" ], (0,
267
+ b.pick)({
268
+ enterprise: "inherit",
269
+ prisma: b.variables.contentColorDefault
270
+ }), (0, b.pick)({
271
+ enterprise: "0 2px 2px 0",
272
+ prisma: "50%"
273
+ }), (0, b.pick)({
274
+ enterprise: "3px 0",
275
+ prisma: {
276
+ comfortable: "0 8px",
277
+ compact: "0 6px"
278
+ }
279
+ }), (0, b.pick)({
280
+ enterprise: (0, M.css)([ "flex-basis:", ";" ], b.variables.inputHeight)
281
+ }), (function(e) {
282
+ var r = e.$error;
283
+ return r && (0, M.css)([ "", "" ], (0, b.pick)({
284
+ enterprise: (0, M.css)([ "border:1px solid ", ";border-left:none;" ], b.variables.errorColor)
285
+ }));
286
+ }), (0, b.pick)({
287
+ enterprise: b.variables.linkColor,
288
+ prisma: b.variables.contentColorActive
289
+ }), (0, b.pick)({
290
+ enterprise: (0, M.css)([ "box-shadow:", ";" ], b.variables.focusShadow),
291
+ prisma: (0, M.css)([ "background-color:", ";box-shadow:0 0 0 3px ", ";" ], b.variables.interactiveColorOverlayHover, b.variables.focusColor)
292
+ }), (0, b.pick)({
293
+ enterprise: {
294
+ light: b.variables.gray96,
295
+ dark: b.variables.gray30
296
+ },
297
+ prisma: b.variables.interactiveColorOverlayHover
298
+ }), (0, b.pick)({
299
+ enterprise: b.variables.linkColor,
300
+ prisma: b.variables.contentColorActive
301
+ }));
302
+ // for Prisma theme only
303
+ var U = F()(z()).withConfig({
304
+ displayName: "ItemStyles__StyledTrashIcon",
305
+ componentId: "sc-1fsk3kr-3"
306
+ })([ "color:", ";border-radius:50%;padding:", ";margin-right:", ";text-align:center;&:focus{color:", ";background-color:", ";box-shadow:0 0 0 3px ", ";}&:hover{background-color:", ";color:", ";}" ], b.variables.contentColorDefault, (0,
307
+ b.pick)({
308
+ comfortable: "0 8px",
309
+ compact: "0 6px"
310
+ }), (0, b.pick)({
311
+ comfortable: "0 4px",
312
+ compact: "0 6px"
313
+ }), b.variables.contentColorActive, b.variables.interactiveColorOverlayHover, b.variables.focusColor, b.variables.interactiveColorOverlayHover, b.variables.contentColorActive);
314
+ var X = F().div.withConfig({
315
+ displayName: "ItemStyles__StyledLabel",
316
+ componentId: "sc-1fsk3kr-4"
317
+ })([ "color:", ";overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1 0 0px;padding:", ";border-radius:", ";", "" ], b.variables.contentColorActive, (0,
318
+ b.pick)({
319
+ enterprise: "3px 0 3px 10px",
320
+ prisma: {
321
+ comfortable: "10px 0 10px 0",
322
+ compact: "6px 0 6px 0"
323
+ }
324
+ }), (0, b.pick)({
325
+ enterprise: "2px",
326
+ prisma: b.variables.borderRadius
327
+ }), (function(e) {
328
+ var r = e.$disabled;
329
+ return r && (0, b.pick)({
330
+ enterprise: {
331
+ light: (0, M.css)([ "color:", ";" ], b.variables.textGray),
332
+ dark: (0, M.css)([ "color:", ";" ], b.variables.textGray)
333
+ },
334
+ prisma: (0, M.css)([ "color:", ";" ], b.variables.contentColorDisabled)
335
+ });
336
+ }));
337
+ // for Prisma theme only
338
+ var Q = F().div.withConfig({
339
+ displayName: "ItemStyles__StyledPaperClipIcon",
340
+ componentId: "sc-1fsk3kr-5"
341
+ })([ "color:", ";padding:", ";", "" ], b.variables.neutral400, (0, b.pick)({
342
+ comfortable: "8px 4px 8px 0",
343
+ compact: "4px 4px 4px 0"
344
+ }), (function(e) {
345
+ var r = e.$disabled;
346
+ return r && (0, M.css)([ "color:", ";cursor:not-allowed;" ], b.variables.contentColorDisabled);
347
+ }));
348
+ // for Prisma theme only
349
+ var J = F().span.withConfig({
350
+ displayName: "ItemStyles__StyledPercentage",
351
+ componentId: "sc-1fsk3kr-6"
352
+ })([ "color:", ";" ], b.variables.contentColorMuted);
353
+ // for Prisma theme only
354
+ var K = F().div.withConfig({
355
+ displayName: "ItemStyles__StyledProgress",
356
+ componentId: "sc-1fsk3kr-7"
357
+ })([ "position:absolute;left:0;top:0;width:", "%;height:100%;background:", ";transition:width 300ms;border-radius:", ";" ], (function(e) {
358
+ var r = e.$uploadPercentage;
359
+ return r;
360
+ }), b.variables.interactiveColorOverlaySelected, b.variables.borderRadius);
361
+ // CONCATENATED MODULE: ./src/File/Item.tsx
362
+ function Y() {
363
+ Y = Object.assign || function(e) {
364
+ for (var r = 1; r < arguments.length; r++) {
365
+ var t = arguments[r];
366
+ for (var a in t) {
367
+ if (Object.prototype.hasOwnProperty.call(t, a)) {
368
+ e[a] = t[a];
369
+ }
370
+ }
371
+ }
372
+ return e;
373
+ };
374
+ return Y.apply(this, arguments);
375
+ }
376
+ function ee(e, r) {
377
+ if (e == null) return {};
378
+ var t = re(e, r);
379
+ var a, n;
380
+ if (Object.getOwnPropertySymbols) {
381
+ var i = Object.getOwnPropertySymbols(e);
382
+ for (n = 0; n < i.length; n++) {
383
+ a = i[n];
384
+ if (r.indexOf(a) >= 0) continue;
385
+ if (!Object.prototype.propertyIsEnumerable.call(e, a)) continue;
386
+ t[a] = e[a];
387
+ }
388
+ }
389
+ return t;
390
+ }
391
+ function re(e, r) {
392
+ if (e == null) return {};
393
+ var t = {};
394
+ var a = Object.keys(e);
395
+ var n, i;
396
+ for (i = 0; i < a.length; i++) {
397
+ n = a[i];
398
+ if (r.indexOf(n) >= 0) continue;
399
+ t[n] = e[n];
400
+ }
401
+ return t;
402
+ }
403
+ var te = {
404
+ disabled: i().bool,
405
+ elementRef: i().oneOfType([ i().func, i().object ]),
406
+ error: i().bool,
407
+ /** @private */
408
+ index: i().number,
409
+ itemId: i().any,
410
+ name: i().string.isRequired,
411
+ /** If the uploadPercentage is 0, the item is assumed to be queued. If the upload is complete or
412
+ * not applicable, uploadPercentage must be undefined. */
413
+ uploadPercentage: i().number
800
414
  };
801
- _this.inputId = (0,id_namespaceObject.createDOMID)();
802
- /* Each time a file is uploaded this is incremented and used to generate the
803
- * file input's key. In this way we get a new input without a value. */
804
-
805
- _this.inputCount = 0;
806
- _this.handleDragLeave = debounce_default()(_this.handleDragLeave, 300);
807
- return _this;
808
- }
809
-
810
- _createClass(File, [{
811
- key: "addFiles",
812
- value: function addFiles(files) {
813
- var name = this.props.name;
814
-
815
- if (files !== undefined && files.length > 0) {
816
- var _this$props$onRequest, _this$props;
817
-
818
- var array = Array.from(files);
819
- (_this$props$onRequest = (_this$props = this.props).onRequestAdd) === null || _this$props$onRequest === void 0 ? void 0 : _this$props$onRequest.call(_this$props, this.props.allowMultiple ? array : [array[0]], {
820
- name: name
415
+ function ae(e) {
416
+ var r = e.disabled, n = e.error, i = n === void 0 ? false : n, o = e.itemId, l = e.name, s = e.index, c = s === void 0 ? 0 : s, p = e.uploadPercentage, d = ee(e, [ "disabled", "error", "itemId", "name", "index", "uploadPercentage" ]);
417
+ // @docs-props-type ItemPropsBase
418
+ var u = (0, b.useSplunkTheme)(), v = u.isPrisma, f = u.isEnterprise, m = u.isCompact;
419
+ var y = m ? "20px" : "24px";
420
+ var g = (0, t.useContext)(_), x = g.onRequestRemove;
421
+ function w(e) {
422
+ e.preventDefault();
423
+ x === null || x === void 0 ? void 0 : x({
424
+ itemId: o,
425
+ name: l,
426
+ index: c
427
+ });
428
+ }
429
+ var S = (0, t.useContext)(_), E = S.onRequestRetry;
430
+ function R(e) {
431
+ e.preventDefault();
432
+ E === null || E === void 0 ? void 0 : E({
433
+ itemId: o,
434
+ name: l,
435
+ index: c
436
+ });
437
+ }
438
+ var D = (0, t.useContext)(_), q = D.disabled;
439
+ var P = (0, I.sprintf)((0, h._)('Remove "%(filename)s"'), {
440
+ filename: l
821
441
  });
822
- } else {
823
- var _this$props$onRequest2, _this$props2;
824
-
825
- (_this$props$onRequest2 = (_this$props2 = this.props).onRequestAdd) === null || _this$props$onRequest2 === void 0 ? void 0 : _this$props$onRequest2.call(_this$props2, [], {
826
- name: name
442
+ var $ = (0, I.sprintf)((0, h._)('Retry "%(filename)s"'), {
443
+ filename: l
827
444
  });
828
- }
829
-
830
- this.inputCount += 1;
445
+ var M = (0, I.sprintf)((0, h._)('Uploading "%(filename)s"'), {
446
+ filename: l
447
+ });
448
+ var F = (0, h._)("Remove");
449
+ var H = a().createElement("span", null, a().createElement("span", {
450
+ style: {
451
+ paddingRight: "4px"
452
+ }
453
+ }, (0, h._)("Uploading ")), a().createElement(J, null, p, "%"));
454
+ var A = v && !C()(p) && p > 0 ? H : l;
455
+ var B = r !== undefined ? r : q;
456
+
457
+ return a().createElement(a().Fragment, null, a().createElement(Z, Y({
458
+ "data-test": "item",
459
+ "data-test-disabled": B,
460
+ "data-test-error": i
461
+ }, d, {
462
+ flex: true,
463
+ $error: i,
464
+ $disabled: B
465
+ }), v && C()(p) && a().createElement(Q, {
466
+ "data-test": "paper-clip",
467
+ $disabled: B
468
+ }, a().createElement(j, {
469
+ "aria-hidden": "true"
470
+ })), a().createElement(X, {
471
+ "data-test": "label",
472
+ $error: i,
473
+ $disabled: B
474
+ }, A), v && E && i && a().createElement(W, {
475
+ "data-test": "retry",
476
+ onClick: R,
477
+ "aria-label": $
478
+ }, a().createElement(T, {
479
+ screenReaderText: (0, h._)("Retry")
480
+ })), !B && (v && C()(p) && !i ? a().createElement(U, {
481
+ "data-test": "remove",
482
+ onClick: w,
483
+ "aria-label": P
484
+ }, a().createElement(N, {
485
+ screenReaderText: (0, h._)("Remove")
486
+ })) : a().createElement(W, {
487
+ "data-test": "remove",
488
+ $error: i,
489
+ onClick: w,
490
+ "aria-label": P
491
+ }, f ? a().createElement(L(), {
492
+ hideDefaultTooltip: true,
493
+ screenReaderText: F
494
+ }) : a().createElement(k(), {
495
+ "aria-label": F,
496
+ height: y,
497
+ width: y
498
+ }))), !C()(p) && p > 0 && (v ? a().createElement(K, {
499
+ $uploadPercentage: p,
500
+ "aria-label": M,
501
+ role: "progressbar",
502
+ "aria-valuenow": p,
503
+ "aria-valuemin": 0,
504
+ "aria-valuemax": 100
505
+ }) : a().createElement(O(), {
506
+ style: {
507
+ position: "absolute",
508
+ left: 0,
509
+ top: 0,
510
+ right: 0,
511
+ zIndex: 1
512
+ },
513
+ percentage: p,
514
+ "aria-label": M
515
+ }))), v && i && a().createElement(G, null, (0, h._)("Something went wrong.")));
516
+ }
517
+ ae.propTypes = te;
518
+ /* harmony default export */ const ne = ae;
519
+ // CONCATENATED MODULE: ./src/File/Icon.tsx
520
+ function ie() {
521
+ ie = Object.assign || function(e) {
522
+ for (var r = 1; r < arguments.length; r++) {
523
+ var t = arguments[r];
524
+ for (var a in t) {
525
+ if (Object.prototype.hasOwnProperty.call(t, a)) {
526
+ e[a] = t[a];
527
+ }
528
+ }
529
+ }
530
+ return e;
531
+ };
532
+ return ie.apply(this, arguments);
831
533
  }
832
- }, {
833
- key: "render",
834
- value: function render() {
835
- var _this$props3 = this.props,
836
- accept = _this$props3.accept,
837
- allowMultiple = _this$props3.allowMultiple,
838
- children = _this$props3.children,
839
- disabled = _this$props3.disabled,
840
- dropAnywhere = _this$props3.dropAnywhere,
841
- error = _this$props3.error,
842
- fullscreen = _this$props3.fullscreen,
843
- help = _this$props3.help,
844
- name = _this$props3.name,
845
- onRequestRemove = _this$props3.onRequestRemove,
846
- onRequestRetry = _this$props3.onRequestRetry,
847
- required = _this$props3.required,
848
- splunkTheme = _this$props3.splunkTheme,
849
- otherProps = File_objectWithoutProperties(_this$props3, ["accept", "allowMultiple", "children", "disabled", "dropAnywhere", "error", "fullscreen", "help", "name", "onRequestRemove", "onRequestRetry", "required", "splunkTheme"]);
850
-
851
- var isPrisma = splunkTheme.isPrisma;
852
- var fileCount = 0;
853
- var childrenCloned = external_react_namespaceObject.Children.toArray(children).filter(external_react_namespaceObject.isValidElement).map(function (item, index) {
854
- fileCount += 1;
855
- return /*#__PURE__*/(0,external_react_namespaceObject.cloneElement)(item, {
856
- index: index,
857
- key: item.key || item.props.itemId || "item-".concat(index)
534
+ function oe(e) {
535
+
536
+ return a().createElement(D(), ie({
537
+ hideDefaultTooltip: true,
538
+ screenReaderText: (0, h._)("File upload"),
539
+ viewBox: "0 0 72 88"
540
+ }, e), a().createElement("path", {
541
+ d: "M50,27 L68.0005854,27 C70.2022516,27 72,28.7919267 72,31.0023804 L72,83.9976196 C72,86.2074215 70.2094011,88 68.0005854,88 L3.99941455,88 C1.79774843,88 0,86.2080733 0,83.9976196 L0,31.0023804 C0,28.7925785 1.79059889,27 3.99941455,27 L21,27 L21,32 L5.99898406,32 C5.4472604,32 5,32.4408979 5,32.9958767 L5,82.0041233 C5,82.5541308 5.44605521,83 5.99898406,83 L66.0010159,83 C66.5527396,83 67,82.5591021 67,82.0041233 L67,32.9958767 C67,32.4458692 66.5539448,32 66.0010159,32 L50,32 L50,27 Z"
542
+ }), a().createElement("path", {
543
+ d: "M41.9634682,10 L41.9634682,28 L46.9634682,28 L46.9634682,5 L44.4634682,5 L23.9634682,5 L23.9634682,10 L41.9634682,10 Z",
544
+ transform: "translate(35.463468, 16.500000) rotate(-45.000000) translate(-35.463468, -16.500000) "
545
+ }), a().createElement("rect", {
546
+ x: "33",
547
+ y: "3",
548
+ width: "5",
549
+ height: "51"
550
+ }));
551
+ }
552
+ // CONCATENATED MODULE: ./src/File/FileStyles.ts
553
+ var le = F().input.withConfig({
554
+ displayName: "FileStyles__StyledInput",
555
+ componentId: "sc-1wyh4cf-0"
556
+ })([ "&[type='file']{width:0.1px;height:0.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1;}" ]);
557
+ var se = (0, M.css)([ "fill:", ";" ], (0, b.pick)({
558
+ enterprise: {
559
+ light: b.variables.gray60,
560
+ dark: b.variables.gray80
561
+ }
562
+ }));
563
+ var ce = F()(oe).withConfig({
564
+ displayName: "FileStyles__StyledNormalIcon",
565
+ componentId: "sc-1wyh4cf-1"
566
+ })([ "", ";height:1.4em;width:1.4em;display:inline-block;vertical-align:middle;padding-bottom:3px;" ], se);
567
+ var pe = F()(oe).withConfig({
568
+ displayName: "FileStyles__StyledWindowIcon",
569
+ componentId: "sc-1wyh4cf-2"
570
+ })([ "", ";height:48px;width:48px;position:absolute;top:30px;left:50%;transform:translateX(-50%);" ], se);
571
+ var de = F().label.withConfig({
572
+ displayName: "FileStyles__StyledLink",
573
+ componentId: "sc-1wyh4cf-3"
574
+ })([ "", ";color:", ";cursor:pointer;font-size:inherit;font-weight:inherit;&:hover,&[data-focused]{text-decoration:underline;}&[data-focused]{box-shadow:", ";}" ], b.mixins.reset("inline"), b.variables.linkColor, (0,
575
+ b.pick)({
576
+ enterprise: b.variables.focusShadowInset,
577
+ prisma: b.variables.focusShadow
578
+ }));
579
+ var ue = F().div.withConfig({
580
+ displayName: "FileStyles__StyledNormalText",
581
+ componentId: "sc-1wyh4cf-4"
582
+ })([ "", " ", " ", " ", "" ], (0, b.pick)({
583
+ enterprise: (0, M.css)([ "display:inline-block;" ]),
584
+ prisma: (0, M.css)([ "display:inline-flex;flex-direction:column;justify-content:center;text-align:center;color:", ";border:1px dashed ", ";padding:8px;border-radius:", ";min-height:128px;&:not(:last-child){margin-bottom:4px;}" ], b.variables.contentColorActive, b.variables.contentColorMuted, b.variables.borderRadius)
585
+ }), (function(e) {
586
+ var r = e.$dragOver;
587
+ return r && (0, M.css)([ "", "" ], (0, b.pick)({
588
+ prisma: (0, M.css)([ "border:1px dashed ", ";background-color:", ";" ], b.variables.interactiveColorPrimary, b.mixins.colorWithAlpha(b.variables.interactiveColorPrimary, .1))
589
+ }));
590
+ }), (function(e) {
591
+ var r = e.$error, t = e.$dragOver;
592
+ return r && !t && (0, b.pick)({
593
+ prisma: (0, M.css)([ "border:1px dashed ", ";color:", ";background-color:", ";" ], b.variables.accentColorNegative, b.variables.accentColorNegative, b.mixins.colorWithAlpha(b.variables.accentColorNegative, .1))
858
594
  });
859
- });
860
- var dragOverWindow = fullscreen || dropAnywhere;
861
- var dragOverOrDisabled = dragOverWindow || disabled;
862
- var dragOverNotDisabled = dragOverWindow && !disabled;
863
- var StyledDropTargetBox = fullscreen ? StyledWindowDropTargetBox : StyledDropNormalTargetBox;
864
- var StyledTextBox = fullscreen ? StyledWindowText : StyledNormalText;
865
- var StyledIcon = fullscreen ? StyledWindowIcon : StyledNormalIcon;
866
- var dragOver = dragOverOrDisabled ? false : this.state.dragOver || false;
867
- var fileTypes = isString_default()(accept) && toUpper_default()(accept.split(',').join(', '));
868
-
869
- var handleRetry = function handleRetry(event) {
870
- onRequestRetry === null || onRequestRetry === void 0 ? void 0 : onRequestRetry({
871
- event: event,
872
- filename: event.name,
873
- index: event.index,
874
- itemId: event.itemId,
875
- name: name
595
+ }), (function(e) {
596
+ var r = e.$disabled;
597
+ return r && (0, M.css)([ "border:none;min-height:0;color:", ";cursor:not-allowed;" ], (0,
598
+ b.pick)({
599
+ prisma: b.variables.contentColorDisabled
600
+ }));
601
+ }));
602
+ var ve = F().div.withConfig({
603
+ displayName: "FileStyles__StyledWindowText",
604
+ componentId: "sc-1wyh4cf-5"
605
+ })([ "margin-top:", ";margin-bottom:", ";font-size:", ";", "" ], (0, b.pick)({
606
+ enterprise: (0, M.css)([ "calc(", " * 4)" ], b.variables.spacing),
607
+ prisma: (0, M.css)([ "calc(", " * 4)" ], b.variables.spacingLarge)
608
+ }), (0, b.pick)({
609
+ enterprise: b.variables.spacingHalf,
610
+ prisma: b.variables.spacingMedium
611
+ }), b.variables.fontSizeXLarge, (0, b.pick)({
612
+ prisma: (0, M.css)([ "color:", ";" ], b.variables.contentColorActive)
613
+ }));
614
+ var fe = F().div.withConfig({
615
+ displayName: "FileStyles__StyledSubtitle",
616
+ componentId: "sc-1wyh4cf-6"
617
+ })([ "color:", ";padding:4px 8px;font-size:12px;line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;" ], b.variables.contentColorMuted);
618
+ var me = F().div.withConfig({
619
+ displayName: "FileStyles__StyledHelp",
620
+ componentId: "sc-1wyh4cf-7"
621
+ })([ "margin-bottom:", ";" ], (0, b.pick)({
622
+ enterprise: b.variables.spacingXLarge,
623
+ prisma: (0, M.css)([ "calc(", " * 1.5)" ], b.variables.spacingLarge)
624
+ }));
625
+ var be = F().div.withConfig({
626
+ displayName: "FileStyles__StyledWindowDrop",
627
+ componentId: "sc-1wyh4cf-8"
628
+ })([ "position:fixed;top:0;left:0;right:0;bottom:0;border:", ";z-index:", " + 10;" ], (0,
629
+ b.pick)({
630
+ enterprise: "5px solid ".concat(b.variables.accentColorL10),
631
+ prisma: "5px solid ".concat(b.variables.interactiveColorPrimary)
632
+ }), b.variables.zindexModal);
633
+ var he = F()(A()).withConfig({
634
+ displayName: "FileStyles__StyledDropNormalTargetBox",
635
+ componentId: "sc-1wyh4cf-9"
636
+ })([ "", ";flex-direction:column;justify-content:center;text-align:center;border-radius:", ";", " ", " ", " ", " ", " ", "" ], b.mixins.reset("flex"), b.variables.borderRadius, (0,
637
+ b.pick)({
638
+ enterprise: (0, M.css)([ "line-height:calc(", " - 2px);" ], b.variables.inputHeight)
639
+ }), (0, b.pick)({
640
+ enterprise: {
641
+ comfortable: (0, M.css)([ "min-height:73px;padding:", ";" ], b.variables.spacingQuarter),
642
+ compact: (0, M.css)([ "min-height:63px;padding:3px;" ])
643
+ }
644
+ }), (0, b.pick)({
645
+ enterprise: {
646
+ light: (0, M.css)([ "border:1px dashed ", ";" ], b.variables.borderColor),
647
+ dark: (0, M.css)([ "border:1px dashed ", ";" ], b.variables.textGray)
648
+ }
649
+ }), (function(e) {
650
+ var r = e.$dragOver;
651
+ return r && (0, b.pick)({
652
+ enterprise: (0, M.css)([ "border:1px solid ", ";" ], b.variables.accentColorL10)
876
653
  });
877
- };
878
-
879
- var handleRemove = function handleRemove(event) {
880
- onRequestRemove === null || onRequestRemove === void 0 ? void 0 : onRequestRemove({
881
- event: event,
882
- index: event.index,
883
- filename: event.name,
884
- itemId: event.itemId,
885
- name: name
654
+ }), (function(e) {
655
+ var r = e.$error, t = e.$dragOver;
656
+ return r && !t && (0, b.pick)({
657
+ enterprise: (0, M.css)([ "border:1px solid ", ";" ], b.variables.errorColor)
658
+ });
659
+ }), (function(e) {
660
+ var r = e.$disabled, t = e.$fileCount;
661
+ return r && (0, M.css)([ "border:", ";color:", ";cursor:not-allowed;", " ", "" ], (0,
662
+ b.pick)({
663
+ enterprise: "none",
664
+ prisma: "1px solid ".concat(b.variables.contentColorDisabled)
665
+ }), (0, b.pick)({
666
+ enterprise: b.variables.textGray,
667
+ prisma: b.variables.contentColorDisabled
668
+ }), t === 0 && (0, b.pick)({
669
+ enterprise: {
670
+ light: (0, M.css)([ "background-color:", ";" ], b.variables.gray96),
671
+ dark: (0, M.css)([ "background-color:", ";" ], b.variables.gray60)
672
+ },
673
+ prisma: (0, M.css)([ "border:1px dashed ", ";min-height:128px;" ], b.variables.contentColorDisabled)
674
+ }), t !== 0 && (0, b.pick)({
675
+ prisma: (0, M.css)([ "", "{padding:0;}" ],
676
+ /* sc-sel */
677
+ ue)
678
+ }));
679
+ }));
680
+ var ye = F()(A()).withConfig({
681
+ displayName: "FileStyles__StyledWindowDropTargetBox",
682
+ componentId: "sc-1wyh4cf-10"
683
+ })([ "position:relative;text-align:center;min-height:250px;padding:", ";", "" ], b.variables.spacingLarge, (function(e) {
684
+ var r = e.$disabled;
685
+ return r && (0, M.css)([ "color:", ";" ], (0, b.pick)({
686
+ enterprise: b.variables.textGray,
687
+ prisma: b.variables.contentColorMuted
688
+ }));
689
+ }));
690
+ // CONCATENATED MODULE: ./src/File/File.tsx
691
+ function ge(e) {
692
+ "@babel/helpers - typeof";
693
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
694
+ ge = function e(r) {
695
+ return typeof r;
696
+ };
697
+ } else {
698
+ ge = function e(r) {
699
+ return r && typeof Symbol === "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
700
+ };
701
+ }
702
+ return ge(e);
703
+ }
704
+ function Ce() {
705
+ Ce = Object.assign || function(e) {
706
+ for (var r = 1; r < arguments.length; r++) {
707
+ var t = arguments[r];
708
+ for (var a in t) {
709
+ if (Object.prototype.hasOwnProperty.call(t, a)) {
710
+ e[a] = t[a];
711
+ }
712
+ }
713
+ }
714
+ return e;
715
+ };
716
+ return Ce.apply(this, arguments);
717
+ }
718
+ function xe(e, r) {
719
+ if (e == null) return {};
720
+ var t = ke(e, r);
721
+ var a, n;
722
+ if (Object.getOwnPropertySymbols) {
723
+ var i = Object.getOwnPropertySymbols(e);
724
+ for (n = 0; n < i.length; n++) {
725
+ a = i[n];
726
+ if (r.indexOf(a) >= 0) continue;
727
+ if (!Object.prototype.propertyIsEnumerable.call(e, a)) continue;
728
+ t[a] = e[a];
729
+ }
730
+ }
731
+ return t;
732
+ }
733
+ function ke(e, r) {
734
+ if (e == null) return {};
735
+ var t = {};
736
+ var a = Object.keys(e);
737
+ var n, i;
738
+ for (i = 0; i < a.length; i++) {
739
+ n = a[i];
740
+ if (r.indexOf(n) >= 0) continue;
741
+ t[n] = e[n];
742
+ }
743
+ return t;
744
+ }
745
+ function we(e, r) {
746
+ if (!(e instanceof r)) {
747
+ throw new TypeError("Cannot call a class as a function");
748
+ }
749
+ }
750
+ function Le(e, r) {
751
+ for (var t = 0; t < r.length; t++) {
752
+ var a = r[t];
753
+ a.enumerable = a.enumerable || false;
754
+ a.configurable = true;
755
+ if ("value" in a) a.writable = true;
756
+ Object.defineProperty(e, a.key, a);
757
+ }
758
+ }
759
+ function Se(e, r, t) {
760
+ if (r) Le(e.prototype, r);
761
+ if (t) Le(e, t);
762
+ return e;
763
+ }
764
+ function Oe(e, r) {
765
+ if (typeof r !== "function" && r !== null) {
766
+ throw new TypeError("Super expression must either be null or a function");
767
+ }
768
+ e.prototype = Object.create(r && r.prototype, {
769
+ constructor: {
770
+ value: e,
771
+ writable: true,
772
+ configurable: true
773
+ }
886
774
  });
887
- };
888
-
889
- var supportsMessage = null;
890
-
891
- if (this.props.supportsMessage) {
892
- supportsMessage = /*#__PURE__*/external_react_default().createElement(StyledSubtitle, {
893
- "data-test": "file-supports"
894
- }, this.props.supportsMessage);
895
- } else if (isPrisma && !disabled) {
896
- supportsMessage = accept ? /*#__PURE__*/external_react_default().createElement(StyledSubtitle, {
897
- "data-test": "file-supports"
898
- }, (0,i18n_namespaceObject._)("Supports ".concat(fileTypes))) : /*#__PURE__*/external_react_default().createElement(StyledSubtitle, {
899
- "data-test": "file-supports"
900
- }, (0,i18n_namespaceObject._)('Supports all file types'));
901
- }
902
-
903
- return /*#__PURE__*/external_react_default().createElement(StyledDropTargetBox, File_extends({
904
- onDragOver: dragOverOrDisabled ? undefined : this.handleDragOver,
905
- onDragLeave: dragOverOrDisabled ? undefined : this.handleDragLeave,
906
- onDrop: dragOverOrDisabled ? undefined : this.handleDrop,
907
- $disabled: disabled,
908
- $dragOver: dragOver,
909
- $error: error,
910
- $fileCount: fileCount,
911
- "data-test": "file",
912
- "data-test-disabled": disabled,
913
- "data-test-error": error
914
- }, omit_default()(otherProps, 'onRequestAdd', 'onRequestRemove')), /*#__PURE__*/external_react_default().createElement(StyledTextBox, {
915
- $disabled: disabled,
916
- $dragOver: dragOver,
917
- $error: error
918
- }, !disabled && !isPrisma && /*#__PURE__*/external_react_default().createElement(StyledIcon, {
919
- $dragOver: dragOver,
920
- $error: error
921
- }), ' ', /*#__PURE__*/external_react_default().createElement("span", {
922
- "data-test": "file-label"
923
- }, !dragOverWindow && !disabled && (0,i18n_namespaceObject._)('Drop your file here or'), dragOverNotDisabled && (0,i18n_namespaceObject._)('Drop your file anywhere or'), ' ', fileCount === 0 && disabled && (0,i18n_namespaceObject._)('No Files Selected'), /*#__PURE__*/external_react_default().createElement(StyledLink, {
924
- htmlFor: this.inputId,
925
- "data-test": "file-link",
926
- "data-focused": this.state.focusedInput || null
927
- }, /*#__PURE__*/external_react_default().createElement(StyledInput, {
928
- accept: accept,
929
- "data-test": "file-input",
930
- disabled: disabled,
931
- id: this.inputId,
932
- key: "file-input-".concat(this.inputCount),
933
- multiple: allowMultiple || undefined,
934
- onBlur: this.handleInputBlur,
935
- onChange: this.handleInputChange,
936
- onFocus: this.handleInputFocus,
937
- required: required,
938
- type: "file"
939
- }), !disabled && (0,i18n_namespaceObject._)('upload file…'))), supportsMessage), !disabled && help && /*#__PURE__*/external_react_default().createElement(StyledHelp, {
940
- "data-test": "help"
941
- }, help), dragOverNotDisabled && this.state.dragOver && /*#__PURE__*/external_react_default().createElement(StyledWindowDrop, {
942
- "data-test": "file-window-drop",
943
- onDragLeave: this.handleDragLeave
944
- }), dragOverNotDisabled && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement((EventListener_default()), {
945
- target: window,
946
- eventType: "dragover",
947
- listener: this.handleDragOver
948
- }), /*#__PURE__*/external_react_default().createElement((EventListener_default()), {
949
- target: window,
950
- eventType: "drop",
951
- listener: this.handleDrop
952
- })), /*#__PURE__*/external_react_default().createElement(File_FileContext.Provider, {
953
- value: {
954
- disabled: disabled,
955
- onRequestRemove: onRequestRemove ? handleRemove : undefined,
956
- onRequestRetry: onRequestRetry ? handleRetry : undefined
775
+ if (r) Ie(e, r);
776
+ }
777
+ function Ie(e, r) {
778
+ Ie = Object.setPrototypeOf || function e(r, t) {
779
+ r.__proto__ = t;
780
+ return r;
781
+ };
782
+ return Ie(e, r);
783
+ }
784
+ function _e(e) {
785
+ var r = De();
786
+ return function t() {
787
+ var a = qe(e), n;
788
+ if (r) {
789
+ var i = qe(this).constructor;
790
+ n = Reflect.construct(a, arguments, i);
791
+ } else {
792
+ n = a.apply(this, arguments);
793
+ }
794
+ return Ee(this, n);
795
+ };
796
+ }
797
+ function Ee(e, r) {
798
+ if (r && (ge(r) === "object" || typeof r === "function")) {
799
+ return r;
800
+ }
801
+ return Re(e);
802
+ }
803
+ function Re(e) {
804
+ if (e === void 0) {
805
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
806
+ }
807
+ return e;
808
+ }
809
+ function De() {
810
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
811
+ if (Reflect.construct.sham) return false;
812
+ if (typeof Proxy === "function") return true;
813
+ try {
814
+ Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
815
+ return true;
816
+ } catch (e) {
817
+ return false;
818
+ }
819
+ }
820
+ function qe(e) {
821
+ qe = Object.setPrototypeOf ? Object.getPrototypeOf : function e(r) {
822
+ return r.__proto__ || Object.getPrototypeOf(r);
823
+ };
824
+ return qe(e);
825
+ }
826
+ function je(e, r, t) {
827
+ if (r in e) {
828
+ Object.defineProperty(e, r, {
829
+ value: t,
830
+ enumerable: true,
831
+ configurable: true,
832
+ writable: true
833
+ });
834
+ } else {
835
+ e[r] = t;
957
836
  }
958
- }, childrenCloned));
837
+ return e;
959
838
  }
960
- }]);
961
-
962
- return File;
963
- }(external_react_namespaceObject.Component);
964
-
965
- _defineProperty(File, "propTypes", File_propTypes);
966
-
967
- _defineProperty(File, "defaultProps", defaultProps);
968
-
969
- _defineProperty(File, "Item", File_Item);
970
-
971
- var FileWithTheme = (0,themes_namespaceObject.withSplunkTheme)(File);
972
- var HoistedFileWithTheme = FileWithTheme;
973
- HoistedFileWithTheme.propTypes = File.propTypes;
974
- HoistedFileWithTheme.Item = File_Item;
975
- /* harmony default export */ const File_File = (HoistedFileWithTheme);
976
-
977
- ;// CONCATENATED MODULE: ./src/File/index.ts
978
-
979
-
980
- module.exports = __webpack_exports__;
981
- /******/ })()
982
- ;
839
+ /** @public */ var Pe = {
840
+ accept: i().string,
841
+ allowMultiple: i().bool,
842
+ children: i().node,
843
+ disabled: i().bool,
844
+ dropAnywhere: i().bool,
845
+ elementRef: i().oneOfType([ i().func, i().object ]),
846
+ fullscreen: i().bool,
847
+ error: i().bool,
848
+ help: i().node,
849
+ name: i().string,
850
+ onRequestAdd: i().func,
851
+ onRequestRemove: i().func,
852
+ onRequestRetry: i().func,
853
+ /** @private. */
854
+ required: i().bool,
855
+ supportsMessage: i().node,
856
+ /** @private */
857
+ splunkTheme: i().object
858
+ };
859
+ var Te = {
860
+ allowMultiple: false,
861
+ disabled: false,
862
+ dropAnywhere: false,
863
+ error: false
864
+ };
865
+ /**
866
+ * File provides the ability to accept files and present uploaded files. It does not provide
867
+ * file readers, only a reference to the file. This can be used to post binary content, or
868
+ * upload using an array buffer.
869
+ */ var $e = function(e) {
870
+ Oe(n, e);
871
+ var r = _e(n);
872
+ // @docs-props-type FilePropsBase
873
+ function n(e) {
874
+ var t;
875
+ we(this, n);
876
+ t = r.call(this, e);
877
+ je(Re(t), "inputId", void 0);
878
+ je(Re(t), "inputCount", void 0);
879
+ je(Re(t), "handleInputChange", (function(e) {
880
+ var r;
881
+ t.addFiles((r = e.currentTarget.files) !== null && r !== void 0 ? r : undefined);
882
+ }));
883
+ je(Re(t), "handleInputFocus", (function() {
884
+ t.setState({
885
+ focusedInput: true
886
+ });
887
+ }));
888
+ je(Re(t), "handleInputBlur", (function() {
889
+ t.setState({
890
+ focusedInput: false
891
+ });
892
+ }));
893
+ je(Re(t), "handleDragOver", (function(e) {
894
+ if (!t.state.dragOver) {
895
+ t.setState({
896
+ dragOver: true
897
+ });
898
+ }
899
+ e.preventDefault();
900
+ }));
901
+ je(Re(t), "handleDragLeave", (function() {
902
+ t.setState({
903
+ dragOver: false
904
+ });
905
+ }));
906
+ je(Re(t), "handleDrop", (function(e) {
907
+ var r;
908
+ e.preventDefault();
909
+ t.handleDragLeave();
910
+ t.addFiles((r = e.dataTransfer) === null || r === void 0 ? void 0 : r.files);
911
+ }));
912
+ t.state = {
913
+ dragOver: false,
914
+ focusedInput: false
915
+ };
916
+ t.inputId = (0, y.createDOMID)();
917
+ /* Each time a file is uploaded this is incremented and used to generate the
918
+ * file input's key. In this way we get a new input without a value. */ t.inputCount = 0;
919
+ t.handleDragLeave = l()(t.handleDragLeave, 300);
920
+ return t;
921
+ }
922
+ Se(n, [ {
923
+ key: "addFiles",
924
+ value: function e(r) {
925
+ var t = this.props.name;
926
+ if (r !== undefined && r.length > 0) {
927
+ var a, n;
928
+ var i = Array.from(r);
929
+ (a = (n = this.props).onRequestAdd) === null || a === void 0 ? void 0 : a.call(n, this.props.allowMultiple ? i : [ i[0] ], {
930
+ name: t
931
+ });
932
+ } else {
933
+ var o, l;
934
+ (o = (l = this.props).onRequestAdd) === null || o === void 0 ? void 0 : o.call(l, [], {
935
+ name: t
936
+ });
937
+ }
938
+ this.inputCount += 1;
939
+ }
940
+ }, {
941
+ key: "render",
942
+ value: function e() {
943
+ var r = this.props, n = r.accept, i = r.allowMultiple, o = r.children, l = r.disabled, s = r.dropAnywhere, p = r.error, u = r.fullscreen, f = r.help, b = r.name, y = r.onRequestRemove, g = r.onRequestRetry, C = r.required, x = r.splunkTheme, k = xe(r, [ "accept", "allowMultiple", "children", "disabled", "dropAnywhere", "error", "fullscreen", "help", "name", "onRequestRemove", "onRequestRetry", "required", "splunkTheme" ]);
944
+ var w = x.isPrisma;
945
+ var L = 0;
946
+ var S = t.Children.toArray(o).filter(t.isValidElement).map((function(e, r) {
947
+ L += 1;
948
+
949
+ return (0, t.cloneElement)(e, {
950
+ index: r,
951
+ key: e.key || e.props.itemId || "item-".concat(r)
952
+ });
953
+ }));
954
+ var O = u || s;
955
+ var I = O || l;
956
+ var _ = O && !l;
957
+ var R = u ? ye : he;
958
+ var D = u ? ve : ue;
959
+ var q = u ? pe : ce;
960
+ var j = I ? false : this.state.dragOver || false;
961
+ var P = v()(n) && d()(n.split(",").join(", "));
962
+ var T = function e(r) {
963
+ g === null || g === void 0 ? void 0 : g({
964
+ event: r,
965
+ filename: r.name,
966
+ index: r.index,
967
+ itemId: r.itemId,
968
+ name: b
969
+ });
970
+ };
971
+ var $ = function e(r) {
972
+ y === null || y === void 0 ? void 0 : y({
973
+ event: r,
974
+ index: r.index,
975
+ filename: r.name,
976
+ itemId: r.itemId,
977
+ name: b
978
+ });
979
+ };
980
+ var N = null;
981
+ if (this.props.supportsMessage) {
982
+ N = a().createElement(fe, {
983
+ "data-test": "file-supports"
984
+ }, this.props.supportsMessage);
985
+ } else if (w && !l) {
986
+ N = n ? a().createElement(fe, {
987
+ "data-test": "file-supports"
988
+ }, (0, h._)("Supports ".concat(P))) : a().createElement(fe, {
989
+ "data-test": "file-supports"
990
+ }, (0, h._)("Supports all file types"));
991
+ }
992
+
993
+ return a().createElement(R, Ce({
994
+ onDragOver: I ? undefined : this.handleDragOver,
995
+ onDragLeave: I ? undefined : this.handleDragLeave,
996
+ onDrop: I ? undefined : this.handleDrop,
997
+ $disabled: l,
998
+ $dragOver: j,
999
+ $error: p,
1000
+ $fileCount: L,
1001
+ "data-test": "file",
1002
+ "data-test-disabled": l,
1003
+ "data-test-error": p
1004
+ }, c()(k, "onRequestAdd", "onRequestRemove")), a().createElement(D, {
1005
+ $disabled: l,
1006
+ $dragOver: j,
1007
+ $error: p
1008
+ }, !l && !w && a().createElement(q, {
1009
+ $dragOver: j,
1010
+ $error: p
1011
+ }), " ", a().createElement("span", {
1012
+ "data-test": "file-label"
1013
+ }, !O && !l && (0, h._)("Drop your file here or"), _ && (0, h._)("Drop your file anywhere or"), " ", L === 0 && l && (0,
1014
+ h._)("No Files Selected"), a().createElement(de, {
1015
+ htmlFor: this.inputId,
1016
+ "data-test": "file-link",
1017
+ "data-focused": this.state.focusedInput || null
1018
+ }, a().createElement(le, {
1019
+ accept: n,
1020
+ "data-test": "file-input",
1021
+ disabled: l,
1022
+ id: this.inputId,
1023
+ key: "file-input-".concat(this.inputCount),
1024
+ multiple: i || undefined,
1025
+ onBlur: this.handleInputBlur,
1026
+ onChange: this.handleInputChange,
1027
+ onFocus: this.handleInputFocus,
1028
+ required: C,
1029
+ type: "file"
1030
+ }), !l && (0, h._)("upload file…"))), N), !l && f && a().createElement(me, {
1031
+ "data-test": "help"
1032
+ }, f), _ && this.state.dragOver && a().createElement(be, {
1033
+ "data-test": "file-window-drop",
1034
+ onDragLeave: this.handleDragLeave
1035
+ }), _ && a().createElement(a().Fragment, null, a().createElement(m(), {
1036
+ target: window,
1037
+ eventType: "dragover",
1038
+ listener: this.handleDragOver
1039
+ }), a().createElement(m(), {
1040
+ target: window,
1041
+ eventType: "drop",
1042
+ listener: this.handleDrop
1043
+ })), a().createElement(E.Provider, {
1044
+ value: {
1045
+ disabled: l,
1046
+ onRequestRemove: y ? $ : undefined,
1047
+ onRequestRetry: g ? T : undefined
1048
+ }
1049
+ }, S));
1050
+ }
1051
+ } ]);
1052
+ return n;
1053
+ }(t.Component);
1054
+ je($e, "propTypes", Pe);
1055
+ je($e, "defaultProps", Te);
1056
+ je($e, "Item", ne);
1057
+ var Ne = (0, b.withSplunkTheme)($e);
1058
+ var Me = Ne;
1059
+ Me.propTypes = $e.propTypes;
1060
+ Me.Item = ne;
1061
+ /* harmony default export */ const Fe = Me;
1062
+ // CONCATENATED MODULE: ./src/File/index.ts
1063
+ module.exports = r;
1064
+ /******/})();