@splunk/react-ui 4.20.0 → 4.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/Accordion.js +425 -441
  2. package/Anchor.js +147 -193
  3. package/Animation.js +142 -166
  4. package/AnimationToggle.js +197 -253
  5. package/Box.js +145 -194
  6. package/Breadcrumbs.js +288 -298
  7. package/Button.js +488 -613
  8. package/ButtonGroup.js +160 -212
  9. package/ButtonSimple.js +543 -562
  10. package/CHANGELOG.md +26 -0
  11. package/Calendar.js +1107 -1195
  12. package/Card.js +771 -746
  13. package/CardLayout.js +205 -223
  14. package/Chip.js +509 -612
  15. package/Clickable.js +416 -472
  16. package/CloseButton.js +165 -250
  17. package/Code.js +1808 -2172
  18. package/Code.js.LICENSE.txt +8 -0
  19. package/CollapsiblePanel.js +586 -675
  20. package/Color.js +1066 -1297
  21. package/ColumnLayout.js +402 -465
  22. package/ComboBox.js +892 -969
  23. package/Concertina.js +998 -963
  24. package/ControlGroup.js +687 -718
  25. package/Date.js +567 -697
  26. package/DefinitionList.js +308 -310
  27. package/Divider.js +149 -194
  28. package/Dropdown.js +459 -558
  29. package/DualListbox.js +1480 -1735
  30. package/EventListener.js +94 -165
  31. package/File.js +1051 -1173
  32. package/FormRows.js +885 -880
  33. package/Heading.js +216 -263
  34. package/Image.js +446 -558
  35. package/JSONTree.js +690 -699
  36. package/Layer.js +442 -582
  37. package/Link.js +336 -361
  38. package/List.js +213 -237
  39. package/Markdown.js +510 -612
  40. package/Menu.js +1109 -1331
  41. package/Message.js +474 -629
  42. package/MessageBar.js +387 -561
  43. package/Modal.js +810 -798
  44. package/ModalLayer.js +326 -343
  45. package/Monogram.js +308 -368
  46. package/Multiselect.js +3558 -3998
  47. package/Number.js +729 -843
  48. package/Paginator.js +510 -615
  49. package/Paragraph.js +145 -188
  50. package/Popover.js +1470 -1693
  51. package/Progress.js +301 -362
  52. package/RadioBar.js +610 -651
  53. package/RadioList.js +483 -544
  54. package/Resize.js +530 -623
  55. package/ResultsMenu.js +494 -597
  56. package/ScreenReaderContent.js +142 -187
  57. package/Scroll.js +595 -598
  58. package/ScrollContainerContext.js +197 -278
  59. package/Search.js +745 -817
  60. package/Select.js +2441 -2746
  61. package/SidePanel.js +390 -392
  62. package/Slider.js +668 -825
  63. package/SlidingPanels.js +639 -645
  64. package/SplitButton.js +464 -499
  65. package/StaticContent.js +161 -217
  66. package/StepBar.js +386 -466
  67. package/Switch.js +710 -764
  68. package/TabBar.js +724 -815
  69. package/TabLayout.js +406 -438
  70. package/Table.js +4842 -5121
  71. package/Text.js +1169 -1351
  72. package/TextArea.js +1097 -1307
  73. package/Tooltip.js +624 -721
  74. package/TransitionOpen.js +489 -546
  75. package/Typography.js +176 -229
  76. package/WaitSpinner.js +230 -298
  77. package/package.json +14 -15
  78. package/stubs-splunkui.d.ts +4 -1
  79. package/types/src/ComboBox/Option.d.ts +1 -1
  80. package/types/src/Concertina/Concertina.d.ts +4 -0
  81. package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
  82. package/types/src/JSONTree/TreeNode.d.ts +5 -0
  83. package/types/src/Link/Link.d.ts +7 -3
  84. package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
  85. package/types/src/Markdown/Markdown.d.ts +1 -1
  86. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
  87. package/types/src/Menu/Item.d.ts +1 -1
  88. package/types/src/Menu/Menu.d.ts +1 -0
  89. package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
  90. package/types/src/Multiselect/Option.d.ts +1 -1
  91. package/types/src/Search/Option.d.ts +1 -1
  92. package/types/src/Select/Option.d.ts +1 -1
  93. package/types/src/Select/OptionBase.d.ts +1 -1
  94. package/types/src/fixtures/FetchOptions.d.ts +2 -8
  95. package/useForceUpdate.js +112 -146
  96. package/useKeyPress.js +74 -128
  97. package/usePrevious.js +65 -129
  98. package/useRovingFocus.js +122 -218
  99. package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
  100. /package/types/src/Table/docs/examples/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
  101. /package/types/src/Table/docs/examples/prisma/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
package/ButtonSimple.js CHANGED
@@ -1,565 +1,546 @@
1
- module.exports =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId]) {
11
- /******/ return installedModules[moduleId].exports;
12
- /******/ }
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ i: moduleId,
16
- /******/ l: false,
17
- /******/ exports: {}
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.l = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // define getter function for harmony exports
38
- /******/ __webpack_require__.d = function(exports, name, getter) {
39
- /******/ if(!__webpack_require__.o(exports, name)) {
40
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
- /******/ }
42
- /******/ };
43
- /******/
44
- /******/ // define __esModule on exports
45
- /******/ __webpack_require__.r = function(exports) {
46
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
- /******/ }
49
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
- /******/ };
51
- /******/
52
- /******/ // create a fake namespace object
53
- /******/ // mode & 1: value is a module id, require it
54
- /******/ // mode & 2: merge all properties of value into the ns
55
- /******/ // mode & 4: return value when already ns object
56
- /******/ // mode & 8|1: behave like require
57
- /******/ __webpack_require__.t = function(value, mode) {
58
- /******/ if(mode & 1) value = __webpack_require__(value);
59
- /******/ if(mode & 8) return value;
60
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
- /******/ var ns = Object.create(null);
62
- /******/ __webpack_require__.r(ns);
63
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
- /******/ return ns;
66
- /******/ };
67
- /******/
68
- /******/ // getDefaultExport function for compatibility with non-harmony modules
69
- /******/ __webpack_require__.n = function(module) {
70
- /******/ var getter = module && module.__esModule ?
71
- /******/ function getDefault() { return module['default']; } :
72
- /******/ function getModuleExports() { return module; };
73
- /******/ __webpack_require__.d(getter, 'a', getter);
74
- /******/ return getter;
75
- /******/ };
76
- /******/
77
- /******/ // Object.prototype.hasOwnProperty.call
78
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
- /******/
80
- /******/ // __webpack_public_path__
81
- /******/ __webpack_require__.p = "";
82
- /******/
83
- /******/
84
- /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 195);
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ({
89
-
90
- /***/ 0:
91
- /***/ (function(module, exports) {
92
-
93
- module.exports = require("@splunk/themes");
94
-
95
- /***/ }),
96
-
97
- /***/ 1:
98
- /***/ (function(module, exports) {
99
-
100
- module.exports = require("prop-types");
101
-
102
- /***/ }),
103
-
104
- /***/ 12:
105
- /***/ (function(module, exports) {
106
-
107
- module.exports = require("@splunk/react-ui/Clickable");
108
-
109
- /***/ }),
110
-
111
- /***/ 14:
112
- /***/ (function(module, exports) {
113
-
114
- module.exports = require("@splunk/react-ui/ScreenReaderContent");
115
-
116
- /***/ }),
117
-
118
- /***/ 195:
119
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
120
-
121
- "use strict";
122
- // ESM COMPAT FLAG
123
- __webpack_require__.r(__webpack_exports__);
124
-
125
- // EXPORTS
126
- __webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ src_ButtonSimple_ButtonSimple; });
127
-
128
- // EXTERNAL MODULE: external "react"
129
- var external_react_ = __webpack_require__(2);
130
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
131
-
132
- // EXTERNAL MODULE: external "prop-types"
133
- var external_prop_types_ = __webpack_require__(1);
134
- var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
135
-
136
- // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
137
- var i18n_ = __webpack_require__(4);
138
-
139
- // EXTERNAL MODULE: external "@splunk/themes"
140
- var themes_ = __webpack_require__(0);
141
-
142
- // EXTERNAL MODULE: external "@splunk/react-ui/ScreenReaderContent"
143
- var ScreenReaderContent_ = __webpack_require__(14);
144
- var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_);
145
-
146
- // EXTERNAL MODULE: external "styled-components"
147
- var external_styled_components_ = __webpack_require__(3);
148
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
149
-
150
- // EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
151
- var Clickable_ = __webpack_require__(12);
152
- var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
153
-
154
- // CONCATENATED MODULE: ./src/ButtonSimple/prismaStyles.ts
155
-
156
-
157
- var common = Object(external_styled_components_["css"])(["", " cursor:pointer;position:relative;border-radius:", ";&:focus,&:hover{z-index:3;}"], themes_["mixins"].reset('block'), themes_["variables"].borderRadius);
158
- /* Setting border-radius to 0.1px creates a rounded shadow, */
159
-
160
- var appendPrepend = Object(external_styled_components_["css"])(["", " ", ""], function (_ref) {
161
- var $append = _ref.$append;
162
- return $append && Object(external_styled_components_["css"])(["border-top-right-radius:0.1px;border-bottom-right-radius:0.1px;border-right:none;"]);
163
- }, function (_ref2) {
164
- var $prepend = _ref2.$prepend;
165
- return $prepend && Object(external_styled_components_["css"])(["border-top-left-radius:0.1px;border-bottom-left-radius:0.1px;"]);
166
- });
167
- var prismaTransparent = Object(external_styled_components_["css"])(["", " ", " ", " &:not([disabled]){color:", ";transition:background-color 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;&:hover{background-color:", ";border-color:", ";", "}", " ", " &:active{background-color:", ";transition:none;}&:focus{background-color:", ";", " &:active{background-color:", ";}}}&[disabled]{border-color:", ";color:", ";cursor:not-allowed;", "}"], common, Object(themes_["pickVariant"])('$variant', {
168
- prismaSecondary: Object(external_styled_components_["css"])(["font-weight:", ";"], themes_["variables"].fontWeightSemiBold),
169
- prismaDefault: Object(external_styled_components_["css"])(["border:1px solid ", ";font-weight:", ";"], themes_["variables"].interactiveColorBorder, themes_["variables"].fontWeightSemiBold),
170
- prismaToggle: Object(external_styled_components_["css"])(["border:1px solid ", ";font-weight:normal;"], themes_["variables"].interactiveColorBorder)
171
- }), appendPrepend, themes_["variables"].contentColorActive, themes_["variables"].interactiveColorOverlayHover, themes_["variables"].interactiveColorBorderHover, Object(themes_["pickVariant"])('$variant', {
172
- prismaSecondary: Object(external_styled_components_["css"])(["box-shadow:", ";"], themes_["variables"].hoverShadow),
173
- prismaDefault: Object(external_styled_components_["css"])(["box-shadow:", ";"], themes_["variables"].hoverShadow)
174
- }), function (_ref3) {
175
- var $selected = _ref3.$selected;
176
- return $selected && Object(external_styled_components_["css"])(["background-color:", ";border-color:", ";&:hover{background-color:", ";}"], themes_["variables"].interactiveColorOverlaySelected, themes_["variables"].interactiveColorBorderDisabled, themes_["mixins"].overlayColors(themes_["variables"].interactiveColorOverlaySelected, themes_["variables"].interactiveColorOverlayHover));
177
- }, function (_ref4) {
178
- var $error = _ref4.$error;
179
- return $error && Object(external_styled_components_["css"])(["border-color:", ";&:hover{border-color:", ";}"], themes_["variables"].accentColorNegative, themes_["variables"].accentColorNegative);
180
- }, themes_["variables"].interactiveColorOverlayActive, themes_["variables"].interactiveColorOverlayHover, Object(themes_["pickVariant"])('$variant', {
181
- prismaSecondary: Object(external_styled_components_["css"])(["box-shadow:", ";"], themes_["variables"].focusShadow),
182
- prismaDefault: Object(external_styled_components_["css"])(["box-shadow:", ";"], themes_["variables"].focusShadow),
183
- prismaToggle: Object(external_styled_components_["css"])(["border-color:", ";"], themes_["variables"].interactiveColorPrimary)
184
- }), themes_["variables"].interactiveColorOverlayActive, themes_["variables"].interactiveColorBorderDisabled, themes_["variables"].contentColorDisabled, function (_ref5) {
185
- var $selected = _ref5.$selected;
186
- return $selected && Object(external_styled_components_["css"])(["background-color:", ";"], themes_["mixins"].overlayColors(themes_["variables"].interactiveColorBackgroundDisabled, themes_["variables"].interactiveColorOverlaySelected));
187
- });
188
- var disabledFillStyles = Object(external_styled_components_["css"])(["&[disabled]{border-color:", ";color:", ";background-color:", ";cursor:not-allowed;", "}"], themes_["variables"].interactiveColorBorderDisabled, themes_["variables"].contentColorDisabled, themes_["variables"].interactiveColorBackgroundDisabled, function ($selected) {
189
- return $selected && Object(external_styled_components_["css"])(["background-color:", ";"], themes_["mixins"].overlayColors(themes_["variables"].interactiveColorBackgroundDisabled, themes_["variables"].interactiveColorOverlaySelected));
190
- });
191
- var prismaFilled = Object(external_styled_components_["css"])(["", " font-weight:", ";border-radius:", ";", " &:not([disabled]){color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;background-color:", ";&:hover,&:focus{background-color:", ";}&:hover{box-shadow:", ";}&:focus{box-shadow:", ";}&:active{background-color:", ";transition:none;}}", ""], common, themes_["variables"].fontWeightSemiBold, themes_["variables"].borderRadius, appendPrepend, themes_["variables"].contentColorInverted, Object(themes_["pickVariant"])('$selected', {
192
- "false": Object(themes_["pickVariant"])('$variant', {
193
- prismaPrimary: themes_["variables"].interactiveColorPrimary,
194
- prismaDestructive: themes_["variables"].accentColorNegative
195
- }),
196
- "true": Object(themes_["pickVariant"])('$variant', {
197
- prismaPrimary: themes_["mixins"].overlayColors(themes_["variables"].interactiveColorPrimary, themes_["variables"].interactiveColorOverlaySelected),
198
- prismaDestructive: themes_["mixins"].overlayColors(themes_["variables"].accentColorNegative, themes_["variables"].interactiveColorOverlaySelected)
199
- })
200
- }), Object(themes_["pickVariant"])('$variant', {
201
- prismaPrimary: themes_["mixins"].overlayColors(themes_["variables"].interactiveColorPrimary, themes_["variables"].interactiveColorOverlayHover),
202
- prismaDestructive: themes_["mixins"].overlayColors(themes_["variables"].accentColorNegative, themes_["variables"].interactiveColorOverlayHover)
203
- }), themes_["variables"].hoverShadow, themes_["variables"].focusShadow, Object(themes_["pickVariant"])('$variant', {
204
- prismaPrimary: themes_["mixins"].overlayColors(themes_["variables"].interactiveColorPrimary, themes_["variables"].interactiveColorOverlayActive),
205
- prismaDestructive: themes_["mixins"].overlayColors(themes_["variables"].accentColorNegative, themes_["variables"].interactiveColorOverlayActive)
206
- }), disabledFillStyles);
207
- var prismaFlat = Object(external_styled_components_["css"])(["", " font-weight:", ";border-radius:", ";", " &:not([disabled]){color:", ";background-color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " &:hover{background-color:", ";box-shadow:", ";}&:active{background-color:", ";transition:none;}&:focus{box-shadow:", ";background-color:", ";}}", ""], common, themes_["variables"].fontWeightSemiBold, themes_["variables"].borderRadius, appendPrepend, themes_["variables"].contentColorActive, themes_["variables"].interactiveColorBackground, function ($selected) {
208
- return $selected && Object(external_styled_components_["css"])(["background-color:", ";"], themes_["mixins"].overlayColors(themes_["variables"].interactiveColorBackground, themes_["variables"].interactiveColorOverlaySelected));
209
- }, themes_["mixins"].overlayColors(themes_["variables"].interactiveColorBackground, themes_["variables"].interactiveColorOverlayHover), themes_["variables"].hoverShadow, themes_["mixins"].overlayColors(themes_["variables"].interactiveColorBackground, themes_["variables"].interactiveColorOverlayActive), themes_["variables"].focusShadow, themes_["mixins"].overlayColors(themes_["variables"].interactiveColorBackground, themes_["variables"].interactiveColorOverlayHover), disabledFillStyles);
210
-
211
- // CONCATENATED MODULE: ./src/ButtonSimple/enterpriseStyles.ts
212
-
213
-
214
- var primaryBackgroundColor = '#1A8929'; // SUI-2439 to meet WCAG AA compliance
215
-
216
- var primarySelectedBackgroundColor = '#235823'; // SUI-2439 to meet WCAG AA compliance
217
-
218
- var enterpriseStyles_common = Object(external_styled_components_["css"])(["", " border-radius:", ";cursor:pointer;position:relative;&:focus{z-index:3;}"], themes_["mixins"].reset('block'), themes_["variables"].borderRadius);
219
- var enterpriseStyles_appendPrepend = Object(external_styled_components_["css"])(["", " ", ""], function (_ref) {
220
- var $append = _ref.$append;
221
- return $append && Object(external_styled_components_["css"])(["border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;"]);
222
- }, function (_ref2) {
223
- var $prepend = _ref2.$prepend;
224
- return $prepend && Object(external_styled_components_["css"])(["border-top-left-radius:0;border-bottom-left-radius:0;"]);
225
- });
226
- var lightShadow = 'inset 0 -1px 0 rgba(0, 0, 0, 0.1)';
227
- var lightSelectedShadow = 'inset 0 1px 0 rgba(0, 0, 0, 0.1)';
228
- var enterpriseDefault = Object(external_styled_components_["css"])(["", ";border:", ";", ";font-weight:", ";&:not([disabled]){background-color:", ";color:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", ";", " &:hover{background-color:", ";box-shadow:", ";}&:active{transition:none;background-color:", ";border-color:", ";", ";}&:focus{box-shadow:", ",", ";", " ", "}}&[disabled]{cursor:not-allowed;color:", ";background-color:", ";border-color:", ";", "}"], enterpriseStyles_common, Object(themes_["pick"])({
229
- light: Object(external_styled_components_["css"])(["1px solid ", ""], themes_["variables"].gray60),
230
- dark: themes_["variables"].border
231
- }), enterpriseStyles_appendPrepend, Object(themes_["pickVariant"])('$variant', {
232
- enterpriseDefault: 'normal',
233
- enterpriseSecondary: themes_["variables"].fontWeightSemiBold
234
- }), Object(themes_["pick"])({
235
- light: themes_["variables"].gray98,
236
- dark: themes_["variables"].gray45
237
- }), Object(themes_["pick"])({
238
- light: themes_["variables"].gray45,
239
- dark: themes_["variables"].white
240
- }), Object(themes_["pick"])({
241
- light: Object(external_styled_components_["css"])(["box-shadow:", ";"], lightShadow),
242
- dark: Object(external_styled_components_["css"])(["box-shadow:inset 0 -1px 0 ", ";"], themes_["variables"].gray30)
243
- }), function (_ref3) {
244
- var $selected = _ref3.$selected;
245
- return $selected && Object(external_styled_components_["css"])(["box-shadow:", ";background-color:", ";border-color:", ";"], Object(themes_["pick"])({
246
- light: lightSelectedShadow,
247
- dark: Object(external_styled_components_["css"])(["inset 0 1px 0 ", ""], themes_["variables"].black)
248
- }), Object(themes_["pick"])({
249
- light: themes_["variables"].gray92,
250
- dark: themes_["variables"].gray22
251
- }), Object(themes_["pick"])({
252
- light: themes_["variables"].gray60,
253
- dark: themes_["variables"].gray20
254
- }));
255
- }, Object(themes_["pick"])({
256
- light: '#ebeeef',
257
- dark: themes_["variables"].gray30
258
- }), Object(themes_["pick"])({
259
- light: lightShadow,
260
- dark: Object(external_styled_components_["css"])(["inset 0 -1px 0 ", ""], themes_["variables"].gray25)
261
- }), Object(themes_["pick"])({
262
- light: themes_["variables"].gray92,
263
- dark: themes_["variables"].gray22
264
- }), Object(themes_["pick"])({
265
- light: themes_["variables"].gray60,
266
- dark: themes_["variables"].gray20
267
- }), Object(themes_["pick"])({
268
- dark: Object(external_styled_components_["css"])(["box-shadow:inset 0 -1px 0 ", ";"], themes_["variables"].gray22)
269
- }), Object(themes_["pick"])({
270
- light: lightShadow,
271
- dark: Object(external_styled_components_["css"])(["inset 0 -1px 0 ", ""], themes_["variables"].gray30)
272
- }), themes_["variables"].focusShadow, function (_ref4) {
273
- var $append = _ref4.$append;
274
- return $append && Object(external_styled_components_["css"])(["box-shadow:", ",", ",inset -1px 0 0 ", ";"], Object(themes_["pick"])({
275
- light: lightShadow,
276
- dark: Object(external_styled_components_["css"])(["inset 0 -1px 0 ", ""], themes_["variables"].gray30)
277
- }), themes_["variables"].focusShadow, themes_["variables"].borderColor);
278
- }, function (_ref5) {
279
- var $append = _ref5.$append,
280
- $selected = _ref5.$selected;
281
- return $append && $selected && Object(themes_["pick"])({
282
- light: Object(external_styled_components_["css"])(["box-shadow:", ",", ",", ",inset -1px 0 0 ", ";"], lightShadow, lightSelectedShadow, themes_["variables"].focusShadow, themes_["variables"].borderColor),
283
- dark: Object(external_styled_components_["css"])(["box-shadow:inset 0 1px 0 ", ",", ",inset -1px 0 0 ", ";"], themes_["variables"].black, themes_["variables"].focusShadow, themes_["variables"].borderColor)
284
- });
285
- }, themes_["variables"].textDisabledColor, Object(themes_["pick"])({
286
- light: themes_["variables"].gray96,
287
- dark: themes_["variables"].gray30
288
- }), Object(themes_["pick"])({
289
- light: themes_["variables"].borderLightColor,
290
- dark: themes_["variables"].gray30
291
- }), function (_ref6) {
292
- var $selected = _ref6.$selected;
293
- return $selected && Object(themes_["pick"])({
294
- light: Object(external_styled_components_["css"])(["box-shadow:", ";background-color:", ";border-color:", ";"], lightSelectedShadow, themes_["variables"].gray92, themes_["variables"].gray80),
295
- dark: Object(external_styled_components_["css"])(["box-shadow:inset 0 1px 0 ", ";background-color:", ";border-color:", ";"], themes_["variables"].black, themes_["variables"].gray22, themes_["variables"].gray20)
296
- });
297
- });
298
- var primaryShadow = 'inset 0 -2px 0 rgba(0, 0, 0, 0.1)';
299
- var primarySelectedShadow = 'inset 0 2px 0 rgba(0, 0, 0, 0.1)';
300
- var enterprisePrimary = Object(external_styled_components_["css"])(["", ";font-weight:", ";", " &:not([disabled]){background-color:", ";color:", ";box-shadow:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " ", " &:hover{background-color:", ";}&:active{background-color:", ";transition:none;}&:focus{box-shadow:", ",", ";&:active{background-color:", ";transition:none;}}}&[disabled]{color:", ";background-color:", ";cursor:not-allowed;", "}"], enterpriseStyles_common, themes_["variables"].fontWeightSemiBold, enterpriseStyles_appendPrepend, primaryBackgroundColor, themes_["variables"].white, primaryShadow, function (_ref7) {
301
- var $selected = _ref7.$selected;
302
- return $selected && Object(external_styled_components_["css"])(["box-shadow:", ";background-color:", ";"], primarySelectedShadow, primarySelectedBackgroundColor);
303
- }, function (_ref8) {
304
- var $prepend = _ref8.$prepend;
305
- return $prepend && Object(external_styled_components_["css"])(["border-left:1px solid ", ";"], primaryBackgroundColor);
306
- }, themes_["variables"].brandColorD50, themes_["variables"].brandColorD30, primaryShadow, themes_["variables"].focusShadow, themes_["variables"].brandColorD30, themes_["variables"].brandColorL30, themes_["variables"].brandColorL10, function (_ref9) {
307
- var $selected = _ref9.$selected;
308
- return $selected && Object(external_styled_components_["css"])(["box-shadow:", ";background-color:", ";"], primarySelectedShadow, themes_["variables"].brandColorD20);
309
- });
310
- var enterpriseError = Object(external_styled_components_["css"])(["", ";font-weight:", ";", " &:not([disabled]){background-color:", ";color:", ";box-shadow:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " ", " &:hover{background-color:", ";}&:active{background-color:", ";transition:none;}&:focus{box-shadow:", ",", ";&:active{background-color:", ";transition:none;}}}&[disabled]{color:", ";background-color:", ";cursor:not-allowed;", "}"], enterpriseStyles_common, themes_["variables"].fontWeightSemiBold, enterpriseStyles_appendPrepend, themes_["variables"].errorColorD10, themes_["variables"].white, primaryShadow, function (_ref10) {
311
- var $selected = _ref10.$selected;
312
- return $selected && Object(external_styled_components_["css"])(["box-shadow:", ";background-color:", ";"], primarySelectedShadow, themes_["variables"].errorColorD30);
313
- }, function (_ref11) {
314
- var $prepend = _ref11.$prepend;
315
- return $prepend && Object(external_styled_components_["css"])(["border-left:1px solid ", ";"], themes_["variables"].errorColorD30);
316
- }, themes_["variables"].errorColorD30, themes_["variables"].errorColorD40, primaryShadow, themes_["variables"].focusShadow, themes_["variables"].errorColorD40, themes_["variables"].errorColorL10, themes_["variables"].errorColorD10, function (_ref12) {
317
- var $selected = _ref12.$selected;
318
- return $selected && Object(external_styled_components_["css"])(["box-shadow:", ";background-color:", ";"], primarySelectedShadow, themes_["variables"].errorColorD40);
319
- });
320
- var enterprisePill = Object(external_styled_components_["css"])(["", ";color:", ";border:1px solid transparent;&:not([disabled]){transition:background-color 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " &:hover{color:", ";background-color:", ";border-color:", ";}", " &:focus{color:", ";box-shadow:", ";}&:active,&[aria-expanded='true']{background-color:", ";transition:none;}}&[disabled]{color:", ";cursor:not-allowed;", "}"], enterpriseStyles_common, Object(themes_["pick"])({
321
- light: themes_["variables"].gray45,
322
- dark: themes_["variables"].white
323
- }), function (_ref13) {
324
- var $selected = _ref13.$selected;
325
- return $selected && Object(external_styled_components_["css"])(["border-color:", ";"], themes_["variables"].accentColor);
326
- }, Object(themes_["pick"])({
327
- light: themes_["variables"].linkColor,
328
- dark: themes_["variables"].white
329
- }), themes_["variables"].backgroundColorHover, Object(themes_["pick"])({
330
- light: themes_["variables"].gray60,
331
- dark: themes_["variables"].borderColor
332
- }), function (_ref14) {
333
- var $error = _ref14.$error;
334
- return $error && Object(external_styled_components_["css"])(["&,&:hover{color:", ";}"], themes_["variables"].errorColor);
335
- }, Object(themes_["pick"])({
336
- light: themes_["variables"].linkColor,
337
- dark: themes_["variables"].white
338
- }), themes_["variables"].focusShadow, Object(themes_["pick"])({
339
- light: themes_["variables"].gray92,
340
- dark: themes_["variables"].gray22
341
- }), themes_["variables"].textDisabledColor, function (_ref15) {
342
- var $selected = _ref15.$selected;
343
- return $selected && Object(external_styled_components_["css"])(["border-color:", ";"], themes_["variables"].borderLightColor);
344
- });
345
-
346
- // CONCATENATED MODULE: ./src/ButtonSimple/ButtonSimpleStyles.ts
347
-
348
-
349
-
350
-
351
-
352
- var StyledClickable = external_styled_components_default()(Clickable_default.a).withConfig({
353
- displayName: "ButtonSimpleStyles__StyledClickable",
354
- componentId: "vlarwe-0"
355
- })(["", ""], Object(themes_["pickVariant"])('$variant', {
356
- enterpriseDefault: enterpriseDefault,
357
- enterpriseSecondary: enterpriseDefault,
358
- enterprisePrimary: enterprisePrimary,
359
- enterpriseError: enterpriseError,
360
- enterpriseDestructive: enterpriseError,
361
- enterprisePill: enterprisePill,
362
- prismaDefault: prismaTransparent,
363
- prismaDestructive: prismaFilled,
364
- prismaPrimary: prismaFilled,
365
- prismaSecondary: prismaTransparent,
366
- prismaToggle: prismaTransparent,
367
- prismaFlat: prismaFlat
368
- }));
369
-
370
- // CONCATENATED MODULE: ./src/ButtonSimple/ButtonSimple.tsx
371
- 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); }
372
-
373
- 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); }
374
-
375
- 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; }
376
-
377
- 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; }
378
-
379
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
380
-
381
- 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); } }
382
-
383
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
384
-
385
- 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); }
386
-
387
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
388
-
389
- 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); }; }
390
-
391
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
392
-
393
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
394
-
395
- 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; } }
396
-
397
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
398
-
399
- 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; }
400
-
401
-
402
-
403
-
404
-
405
-
406
-
407
- var propTypes = {
408
- action: external_prop_types_default.a.string,
409
- appearance: external_prop_types_default.a.oneOf(['default', 'secondary', 'primary', 'destructive', 'pill', 'toggle', 'flat']),
410
- append: external_prop_types_default.a.bool,
411
- children: external_prop_types_default.a.node,
412
- disabled: external_prop_types_default.a.bool,
413
- elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
414
- error: external_prop_types_default.a.bool,
415
- inline: external_prop_types_default.a.bool,
416
- openInNewContext: external_prop_types_default.a.bool,
417
- prepend: external_prop_types_default.a.bool,
418
- selected: external_prop_types_default.a.bool,
419
- splunkTheme: external_prop_types_default.a.object,
420
- to: external_prop_types_default.a.string
421
- };
422
- var defaultProps = {
423
- appearance: 'default',
424
- append: false,
425
- disabled: false,
426
- error: false,
427
- inline: true,
428
- openInNewContext: false,
429
- prepend: false,
430
- selected: false
431
- };
432
-
433
- var mapVariant = function mapVariant(appearance, family) {
434
- var enterprise = {
435
- "default": 'enterpriseDefault',
436
- destructive: 'enterpriseError',
437
- primary: 'enterprisePrimary',
438
- secondary: 'enterpriseSecondary',
439
- pill: 'enterprisePill',
440
- toggle: 'enterpriseDefault',
441
- flat: 'enterpriseDefault'
442
- };
443
- var prisma = {
444
- "default": 'prismaDefault',
445
- destructive: 'prismaDestructive',
446
- primary: 'prismaPrimary',
447
- secondary: 'prismaSecondary',
448
- pill: 'prismaSecondary',
449
- toggle: 'prismaToggle',
450
- flat: 'prismaFlat'
451
- };
452
-
453
- if (family === 'enterprise') {
454
- return enterprise[appearance];
455
- }
456
-
457
- return prisma[appearance];
458
- };
459
-
460
- var ButtonSimple_ButtonSimple = /*#__PURE__*/function (_Component) {
461
- _inherits(ButtonSimple, _Component);
462
-
463
- var _super = _createSuper(ButtonSimple);
464
-
465
- function ButtonSimple() {
466
- var _this;
467
-
468
- _classCallCheck(this, ButtonSimple);
469
-
470
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
471
- args[_key] = arguments[_key];
472
- }
473
-
474
- _this = _super.call.apply(_super, [this].concat(args));
475
-
476
- _defineProperty(_assertThisInitialized(_this), "component", null);
477
-
478
- _defineProperty(_assertThisInitialized(_this), "handleMount", function (c) {
479
- _this.component = c;
1
+ /******/ (() => {
2
+ // webpackBootstrap
3
+ /******/ "use strict";
4
+ /******/ // The require scope
5
+ /******/ var r = {};
6
+ /******/
7
+ /************************************************************************/
8
+ /******/ /* webpack/runtime/compat get default export */
9
+ /******/ (() => {
10
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
11
+ /******/ r.n = e => {
12
+ /******/ var o = e && e.__esModule ?
13
+ /******/ () => e["default"]
14
+ /******/ : () => e
15
+ /******/;
16
+ r.d(o, {
17
+ a: o
18
+ });
19
+ /******/ return o;
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/define property getters */
24
+ /******/ (() => {
25
+ /******/ // define getter functions for harmony exports
26
+ /******/ r.d = (e, o) => {
27
+ /******/ for (var a in o) {
28
+ /******/ if (r.o(o, a) && !r.o(e, a)) {
29
+ /******/ Object.defineProperty(e, a, {
30
+ enumerable: true,
31
+ get: o[a]
32
+ });
33
+ /******/ }
34
+ /******/ }
35
+ /******/ };
36
+ /******/ })();
37
+ /******/
38
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
+ /******/ (() => {
40
+ /******/ r.o = (r, e) => Object.prototype.hasOwnProperty.call(r, e)
41
+ /******/;
42
+ })();
43
+ /******/
44
+ /******/ /* webpack/runtime/make namespace object */
45
+ /******/ (() => {
46
+ /******/ // define __esModule on exports
47
+ /******/ r.r = r => {
48
+ /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
49
+ /******/ Object.defineProperty(r, Symbol.toStringTag, {
50
+ value: "Module"
51
+ });
52
+ /******/ }
53
+ /******/ Object.defineProperty(r, "__esModule", {
54
+ value: true
55
+ });
56
+ /******/ };
57
+ /******/ })();
58
+ /******/
59
+ /************************************************************************/ var e = {};
60
+ // ESM COMPAT FLAG
61
+ r.r(e);
62
+ // EXPORTS
63
+ r.d(e, {
64
+ default: () => /* reexport */ Z
480
65
  });
481
-
482
- return _this;
483
- }
484
-
485
- _createClass(ButtonSimple, [{
486
- key: "focus",
487
-
488
- /**
489
- * Places focus on the button.
490
- */
491
- value: function focus() {
492
- var _this$component;
493
-
494
- (_this$component = this.component) === null || _this$component === void 0 ? void 0 : _this$component.focus();
66
+ // CONCATENATED MODULE: external "react"
67
+ const o = require("react");
68
+ var a = r.n(o);
69
+ // CONCATENATED MODULE: external "prop-types"
70
+ const i = require("prop-types");
71
+ var t = r.n(i);
72
+ // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
73
+ const n = require("@splunk/ui-utils/i18n");
74
+ // CONCATENATED MODULE: external "@splunk/themes"
75
+ const l = require("@splunk/themes");
76
+ // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
77
+ const s = require("@splunk/react-ui/ScreenReaderContent");
78
+ var c = r.n(s);
79
+ // CONCATENATED MODULE: external "styled-components"
80
+ const d = require("styled-components");
81
+ var b = r.n(d);
82
+ // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
83
+ const v = require("@splunk/react-ui/Clickable");
84
+ var u = r.n(v);
85
+ // CONCATENATED MODULE: ./src/ButtonSimple/prismaStyles.ts
86
+ var p = (0, d.css)([ "", " cursor:pointer;position:relative;border-radius:", ";&:focus,&:hover{z-index:3;}" ], l.mixins.reset("block"), l.variables.borderRadius);
87
+ /* Setting border-radius to 0.1px creates a rounded shadow, */ var f = (0, d.css)([ "", " ", "" ], (function(r) {
88
+ var e = r.$append;
89
+ return e && (0, d.css)([ "border-top-right-radius:0.1px;border-bottom-right-radius:0.1px;border-right:none;" ]);
90
+ }), (function(r) {
91
+ var e = r.$prepend;
92
+ return e && (0, d.css)([ "border-top-left-radius:0.1px;border-bottom-left-radius:0.1px;" ]);
93
+ }));
94
+ var g = (0, d.css)([ "", " ", " ", " &:not([disabled]){color:", ";transition:background-color 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;&:hover{background-color:", ";border-color:", ";", "}", " ", " &:active{background-color:", ";transition:none;}&:focus{background-color:", ";", " &:active{background-color:", ";}}}&[disabled]{border-color:", ";color:", ";cursor:not-allowed;", "}" ], p, (0,
95
+ l.pickVariant)("$variant", {
96
+ prismaSecondary: (0, d.css)([ "font-weight:", ";" ], l.variables.fontWeightSemiBold),
97
+ prismaDefault: (0, d.css)([ "border:1px solid ", ";font-weight:", ";" ], l.variables.interactiveColorBorder, l.variables.fontWeightSemiBold),
98
+ prismaToggle: (0, d.css)([ "border:1px solid ", ";font-weight:normal;" ], l.variables.interactiveColorBorder)
99
+ }), f, l.variables.contentColorActive, l.variables.interactiveColorOverlayHover, l.variables.interactiveColorBorderHover, (0,
100
+ l.pickVariant)("$variant", {
101
+ prismaSecondary: (0, d.css)([ "box-shadow:", ";" ], l.variables.hoverShadow),
102
+ prismaDefault: (0, d.css)([ "box-shadow:", ";" ], l.variables.hoverShadow)
103
+ }), (function(r) {
104
+ var e = r.$selected;
105
+ return e && (0, d.css)([ "background-color:", ";border-color:", ";&:hover{background-color:", ";}" ], l.variables.interactiveColorOverlaySelected, l.variables.interactiveColorBorderDisabled, l.mixins.overlayColors(l.variables.interactiveColorOverlaySelected, l.variables.interactiveColorOverlayHover));
106
+ }), (function(r) {
107
+ var e = r.$error;
108
+ return e && (0, d.css)([ "border-color:", ";&:hover{border-color:", ";}" ], l.variables.accentColorNegative, l.variables.accentColorNegative);
109
+ }), l.variables.interactiveColorOverlayActive, l.variables.interactiveColorOverlayHover, (0,
110
+ l.pickVariant)("$variant", {
111
+ prismaSecondary: (0, d.css)([ "box-shadow:", ";" ], l.variables.focusShadow),
112
+ prismaDefault: (0, d.css)([ "box-shadow:", ";" ], l.variables.focusShadow),
113
+ prismaToggle: (0, d.css)([ "border-color:", ";" ], l.variables.interactiveColorPrimary)
114
+ }), l.variables.interactiveColorOverlayActive, l.variables.interactiveColorBorderDisabled, l.variables.contentColorDisabled, (function(r) {
115
+ var e = r.$selected;
116
+ return e && (0, d.css)([ "background-color:", ";" ], l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected));
117
+ }));
118
+ var y = (0, d.css)([ "&[disabled]{border-color:", ";color:", ";background-color:", ";cursor:not-allowed;", "}" ], l.variables.interactiveColorBorderDisabled, l.variables.contentColorDisabled, l.variables.interactiveColorBackgroundDisabled, (function(r) {
119
+ return r && (0, d.css)([ "background-color:", ";" ], l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected));
120
+ }));
121
+ var h = (0, d.css)([ "", " font-weight:", ";border-radius:", ";", " &:not([disabled]){color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;background-color:", ";&:hover,&:focus{background-color:", ";}&:hover{box-shadow:", ";}&:focus{box-shadow:", ";}&:active{background-color:", ";transition:none;}}", "" ], p, l.variables.fontWeightSemiBold, l.variables.borderRadius, f, l.variables.contentColorInverted, (0,
122
+ l.pickVariant)("$selected", {
123
+ false: (0, l.pickVariant)("$variant", {
124
+ prismaPrimary: l.variables.interactiveColorPrimary,
125
+ prismaDestructive: l.variables.accentColorNegative
126
+ }),
127
+ true: (0, l.pickVariant)("$variant", {
128
+ prismaPrimary: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlaySelected),
129
+ prismaDestructive: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlaySelected)
130
+ })
131
+ }), (0, l.pickVariant)("$variant", {
132
+ prismaPrimary: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlayHover),
133
+ prismaDestructive: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlayHover)
134
+ }), l.variables.hoverShadow, l.variables.focusShadow, (0, l.pickVariant)("$variant", {
135
+ prismaPrimary: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlayActive),
136
+ prismaDestructive: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlayActive)
137
+ }), y);
138
+ var k = (0, d.css)([ "", " font-weight:", ";border-radius:", ";", " &:not([disabled]){color:", ";background-color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " &:hover{background-color:", ";box-shadow:", ";}&:active{background-color:", ";transition:none;}&:focus{box-shadow:", ";background-color:", ";}}", "" ], p, l.variables.fontWeightSemiBold, l.variables.borderRadius, f, l.variables.contentColorActive, l.variables.interactiveColorBackground, (function(r) {
139
+ return r && (0, d.css)([ "background-color:", ";" ], l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlaySelected));
140
+ }), l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayHover), l.variables.hoverShadow, l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayActive), l.variables.focusShadow, l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayHover), y);
141
+ // CONCATENATED MODULE: ./src/ButtonSimple/enterpriseStyles.ts
142
+ var m = "#1A8929";
143
+ // SUI-2439 to meet WCAG AA compliance
144
+ var C = "#235823";
145
+ // SUI-2439 to meet WCAG AA compliance
146
+ var x = (0, d.css)([ "", " border-radius:", ";cursor:pointer;position:relative;&:focus{z-index:3;}" ], l.mixins.reset("block"), l.variables.borderRadius);
147
+ var w = (0, d.css)([ "", " ", "" ], (function(r) {
148
+ var e = r.$append;
149
+ return e && (0, d.css)([ "border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;" ]);
150
+ }), (function(r) {
151
+ var e = r.$prepend;
152
+ return e && (0, d.css)([ "border-top-left-radius:0;border-bottom-left-radius:0;" ]);
153
+ }));
154
+ var S = "inset 0 -1px 0 rgba(0, 0, 0, 0.1)";
155
+ var O = "inset 0 1px 0 rgba(0, 0, 0, 0.1)";
156
+ var D = (0, d.css)([ "", ";border:", ";", ";font-weight:", ";&:not([disabled]){background-color:", ";color:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", ";", " &:hover{background-color:", ";box-shadow:", ";}&:active{transition:none;background-color:", ";border-color:", ";", ";}&:focus{box-shadow:", ",", ";", " ", "}}&[disabled]{cursor:not-allowed;color:", ";background-color:", ";border-color:", ";", "}" ], x, (0,
157
+ l.pick)({
158
+ light: (0, d.css)([ "1px solid ", "" ], l.variables.gray60),
159
+ dark: l.variables.border
160
+ }), w, (0, l.pickVariant)("$variant", {
161
+ enterpriseDefault: "normal",
162
+ enterpriseSecondary: l.variables.fontWeightSemiBold
163
+ }), (0, l.pick)({
164
+ light: l.variables.gray98,
165
+ dark: l.variables.gray45
166
+ }), (0, l.pick)({
167
+ light: l.variables.gray45,
168
+ dark: l.variables.white
169
+ }), (0, l.pick)({
170
+ light: (0, d.css)([ "box-shadow:", ";" ], S),
171
+ dark: (0, d.css)([ "box-shadow:inset 0 -1px 0 ", ";" ], l.variables.gray30)
172
+ }), (function(r) {
173
+ var e = r.$selected;
174
+ return e && (0, d.css)([ "box-shadow:", ";background-color:", ";border-color:", ";" ], (0,
175
+ l.pick)({
176
+ light: O,
177
+ dark: (0, d.css)([ "inset 0 1px 0 ", "" ], l.variables.black)
178
+ }), (0, l.pick)({
179
+ light: l.variables.gray92,
180
+ dark: l.variables.gray22
181
+ }), (0, l.pick)({
182
+ light: l.variables.gray60,
183
+ dark: l.variables.gray20
184
+ }));
185
+ }), (0, l.pick)({
186
+ light: "#ebeeef",
187
+ dark: l.variables.gray30
188
+ }), (0, l.pick)({
189
+ light: S,
190
+ dark: (0, d.css)([ "inset 0 -1px 0 ", "" ], l.variables.gray25)
191
+ }), (0, l.pick)({
192
+ light: l.variables.gray92,
193
+ dark: l.variables.gray22
194
+ }), (0, l.pick)({
195
+ light: l.variables.gray60,
196
+ dark: l.variables.gray20
197
+ }), (0, l.pick)({
198
+ dark: (0, d.css)([ "box-shadow:inset 0 -1px 0 ", ";" ], l.variables.gray22)
199
+ }), (0, l.pick)({
200
+ light: S,
201
+ dark: (0, d.css)([ "inset 0 -1px 0 ", "" ], l.variables.gray30)
202
+ }), l.variables.focusShadow, (function(r) {
203
+ var e = r.$append;
204
+ return e && (0, d.css)([ "box-shadow:", ",", ",inset -1px 0 0 ", ";" ], (0, l.pick)({
205
+ light: S,
206
+ dark: (0, d.css)([ "inset 0 -1px 0 ", "" ], l.variables.gray30)
207
+ }), l.variables.focusShadow, l.variables.borderColor);
208
+ }), (function(r) {
209
+ var e = r.$append, o = r.$selected;
210
+ return e && o && (0, l.pick)({
211
+ light: (0, d.css)([ "box-shadow:", ",", ",", ",inset -1px 0 0 ", ";" ], S, O, l.variables.focusShadow, l.variables.borderColor),
212
+ dark: (0, d.css)([ "box-shadow:inset 0 1px 0 ", ",", ",inset -1px 0 0 ", ";" ], l.variables.black, l.variables.focusShadow, l.variables.borderColor)
213
+ });
214
+ }), l.variables.textDisabledColor, (0, l.pick)({
215
+ light: l.variables.gray96,
216
+ dark: l.variables.gray30
217
+ }), (0, l.pick)({
218
+ light: l.variables.borderLightColor,
219
+ dark: l.variables.gray30
220
+ }), (function(r) {
221
+ var e = r.$selected;
222
+ return e && (0, l.pick)({
223
+ light: (0, d.css)([ "box-shadow:", ";background-color:", ";border-color:", ";" ], O, l.variables.gray92, l.variables.gray80),
224
+ dark: (0, d.css)([ "box-shadow:inset 0 1px 0 ", ";background-color:", ";border-color:", ";" ], l.variables.black, l.variables.gray22, l.variables.gray20)
225
+ });
226
+ }));
227
+ var $ = "inset 0 -2px 0 rgba(0, 0, 0, 0.1)";
228
+ var P = "inset 0 2px 0 rgba(0, 0, 0, 0.1)";
229
+ var B = (0, d.css)([ "", ";font-weight:", ";", " &:not([disabled]){background-color:", ";color:", ";box-shadow:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " ", " &:hover{background-color:", ";}&:active{background-color:", ";transition:none;}&:focus{box-shadow:", ",", ";&:active{background-color:", ";transition:none;}}}&[disabled]{color:", ";background-color:", ";cursor:not-allowed;", "}" ], x, l.variables.fontWeightSemiBold, w, m, l.variables.white, $, (function(r) {
230
+ var e = r.$selected;
231
+ return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, C);
232
+ }), (function(r) {
233
+ var e = r.$prepend;
234
+ return e && (0, d.css)([ "border-left:1px solid ", ";" ], m);
235
+ }), l.variables.brandColorD50, l.variables.brandColorD30, $, l.variables.focusShadow, l.variables.brandColorD30, l.variables.brandColorL30, l.variables.brandColorL10, (function(r) {
236
+ var e = r.$selected;
237
+ return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, l.variables.brandColorD20);
238
+ }));
239
+ var j = (0, d.css)([ "", ";font-weight:", ";", " &:not([disabled]){background-color:", ";color:", ";box-shadow:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " ", " &:hover{background-color:", ";}&:active{background-color:", ";transition:none;}&:focus{box-shadow:", ",", ";&:active{background-color:", ";transition:none;}}}&[disabled]{color:", ";background-color:", ";cursor:not-allowed;", "}" ], x, l.variables.fontWeightSemiBold, w, l.variables.errorColorD10, l.variables.white, $, (function(r) {
240
+ var e = r.$selected;
241
+ return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, l.variables.errorColorD30);
242
+ }), (function(r) {
243
+ var e = r.$prepend;
244
+ return e && (0, d.css)([ "border-left:1px solid ", ";" ], l.variables.errorColorD30);
245
+ }), l.variables.errorColorD30, l.variables.errorColorD40, $, l.variables.focusShadow, l.variables.errorColorD40, l.variables.errorColorL10, l.variables.errorColorD10, (function(r) {
246
+ var e = r.$selected;
247
+ return e && (0, d.css)([ "box-shadow:", ";background-color:", ";" ], P, l.variables.errorColorD40);
248
+ }));
249
+ var T = (0, d.css)([ "", ";color:", ";border:1px solid transparent;&:not([disabled]){transition:background-color 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " &:hover{color:", ";background-color:", ";border-color:", ";}", " &:focus{color:", ";box-shadow:", ";}&:active,&[aria-expanded='true']{background-color:", ";transition:none;}}&[disabled]{color:", ";cursor:not-allowed;", "}" ], x, (0,
250
+ l.pick)({
251
+ light: l.variables.gray45,
252
+ dark: l.variables.white
253
+ }), (function(r) {
254
+ var e = r.$selected;
255
+ return e && (0, d.css)([ "border-color:", ";" ], l.variables.accentColor);
256
+ }), (0, l.pick)({
257
+ light: l.variables.linkColor,
258
+ dark: l.variables.white
259
+ }), l.variables.backgroundColorHover, (0, l.pick)({
260
+ light: l.variables.gray60,
261
+ dark: l.variables.borderColor
262
+ }), (function(r) {
263
+ var e = r.$error;
264
+ return e && (0, d.css)([ "&,&:hover{color:", ";}" ], l.variables.errorColor);
265
+ }), (0, l.pick)({
266
+ light: l.variables.linkColor,
267
+ dark: l.variables.white
268
+ }), l.variables.focusShadow, (0, l.pick)({
269
+ light: l.variables.gray92,
270
+ dark: l.variables.gray22
271
+ }), l.variables.textDisabledColor, (function(r) {
272
+ var e = r.$selected;
273
+ return e && (0, d.css)([ "border-color:", ";" ], l.variables.borderLightColor);
274
+ }));
275
+ // CONCATENATED MODULE: ./src/ButtonSimple/ButtonSimpleStyles.ts
276
+ var _ = b()(u()).withConfig({
277
+ displayName: "ButtonSimpleStyles__StyledClickable",
278
+ componentId: "vlarwe-0"
279
+ })([ "", "" ], (0, l.pickVariant)("$variant", {
280
+ enterpriseDefault: D,
281
+ enterpriseSecondary: D,
282
+ enterprisePrimary: B,
283
+ enterpriseError: j,
284
+ enterpriseDestructive: j,
285
+ enterprisePill: T,
286
+ prismaDefault: g,
287
+ prismaDestructive: h,
288
+ prismaPrimary: h,
289
+ prismaSecondary: g,
290
+ prismaToggle: g,
291
+ prismaFlat: k
292
+ }));
293
+ // CONCATENATED MODULE: ./src/ButtonSimple/ButtonSimple.tsx
294
+ function R(r) {
295
+ "@babel/helpers - typeof";
296
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
297
+ R = function r(e) {
298
+ return typeof e;
299
+ };
300
+ } else {
301
+ R = function r(e) {
302
+ return e && typeof Symbol === "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
303
+ };
304
+ }
305
+ return R(r);
306
+ }
307
+ function V() {
308
+ V = Object.assign || function(r) {
309
+ for (var e = 1; e < arguments.length; e++) {
310
+ var o = arguments[e];
311
+ for (var a in o) {
312
+ if (Object.prototype.hasOwnProperty.call(o, a)) {
313
+ r[a] = o[a];
314
+ }
315
+ }
316
+ }
317
+ return r;
318
+ };
319
+ return V.apply(this, arguments);
320
+ }
321
+ function A(r, e) {
322
+ if (r == null) return {};
323
+ var o = E(r, e);
324
+ var a, i;
325
+ if (Object.getOwnPropertySymbols) {
326
+ var t = Object.getOwnPropertySymbols(r);
327
+ for (i = 0; i < t.length; i++) {
328
+ a = t[i];
329
+ if (e.indexOf(a) >= 0) continue;
330
+ if (!Object.prototype.propertyIsEnumerable.call(r, a)) continue;
331
+ o[a] = r[a];
332
+ }
333
+ }
334
+ return o;
335
+ }
336
+ function E(r, e) {
337
+ if (r == null) return {};
338
+ var o = {};
339
+ var a = Object.keys(r);
340
+ var i, t;
341
+ for (t = 0; t < a.length; t++) {
342
+ i = a[t];
343
+ if (e.indexOf(i) >= 0) continue;
344
+ o[i] = r[i];
345
+ }
346
+ return o;
347
+ }
348
+ function H(r, e) {
349
+ if (!(r instanceof e)) {
350
+ throw new TypeError("Cannot call a class as a function");
351
+ }
352
+ }
353
+ function N(r, e) {
354
+ for (var o = 0; o < e.length; o++) {
355
+ var a = e[o];
356
+ a.enumerable = a.enumerable || false;
357
+ a.configurable = true;
358
+ if ("value" in a) a.writable = true;
359
+ Object.defineProperty(r, a.key, a);
360
+ }
361
+ }
362
+ function q(r, e, o) {
363
+ if (e) N(r.prototype, e);
364
+ if (o) N(r, o);
365
+ return r;
495
366
  }
496
- }, {
497
- key: "render",
498
- value: function render() {
499
- var _this$props = this.props,
500
- appearance = _this$props.appearance,
501
- append = _this$props.append,
502
- children = _this$props.children,
503
- error = _this$props.error,
504
- prepend = _this$props.prepend,
505
- selected = _this$props.selected,
506
- splunkTheme = _this$props.splunkTheme,
507
- otherProps = _objectWithoutProperties(_this$props, ["appearance", "append", "children", "error", "prepend", "selected", "splunkTheme"]);
508
-
509
- var variant = appearance;
510
-
511
- if (splunkTheme.isEnterprise) {
512
- variant = error ? 'destructive' : appearance;
513
- }
514
-
515
- return /*#__PURE__*/external_react_default.a.createElement(StyledClickable, _extends({
516
- "aria-invalid": error,
517
- "data-test": "button-simple",
518
- ref: this.handleMount,
519
- $variant: mapVariant(variant, splunkTheme.family),
520
- $append: append,
521
- $prepend: prepend,
522
- $selected: selected,
523
- $error: error
524
- }, otherProps), children, selected && /*#__PURE__*/external_react_default.a.createElement(ScreenReaderContent_default.a, null, Object(i18n_["_"])('Selected')));
367
+ function W(r, e) {
368
+ if (typeof e !== "function" && e !== null) {
369
+ throw new TypeError("Super expression must either be null or a function");
370
+ }
371
+ r.prototype = Object.create(e && e.prototype, {
372
+ constructor: {
373
+ value: r,
374
+ writable: true,
375
+ configurable: true
376
+ }
377
+ });
378
+ if (e) I(r, e);
525
379
  }
526
- }]);
527
-
528
- return ButtonSimple;
529
- }(external_react_["Component"]);
530
-
531
- _defineProperty(ButtonSimple_ButtonSimple, "defaultProps", defaultProps);
532
-
533
- _defineProperty(ButtonSimple_ButtonSimple, "propTypes", propTypes);
534
-
535
- var ButtonSimpleWithTheme = Object(themes_["withSplunkTheme"])(ButtonSimple_ButtonSimple);
536
- ButtonSimpleWithTheme.propTypes = ButtonSimple_ButtonSimple.propTypes;
537
- /* harmony default export */ var src_ButtonSimple_ButtonSimple = (ButtonSimpleWithTheme);
538
- // CONCATENATED MODULE: ./src/ButtonSimple/index.ts
539
-
540
-
541
-
542
- /***/ }),
543
-
544
- /***/ 2:
545
- /***/ (function(module, exports) {
546
-
547
- module.exports = require("react");
548
-
549
- /***/ }),
550
-
551
- /***/ 3:
552
- /***/ (function(module, exports) {
553
-
554
- module.exports = require("styled-components");
555
-
556
- /***/ }),
557
-
558
- /***/ 4:
559
- /***/ (function(module, exports) {
560
-
561
- module.exports = require("@splunk/ui-utils/i18n");
562
-
563
- /***/ })
564
-
565
- /******/ });
380
+ function I(r, e) {
381
+ I = Object.setPrototypeOf || function r(e, o) {
382
+ e.__proto__ = o;
383
+ return e;
384
+ };
385
+ return I(r, e);
386
+ }
387
+ function L(r) {
388
+ var e = F();
389
+ return function o() {
390
+ var a = G(r), i;
391
+ if (e) {
392
+ var t = G(this).constructor;
393
+ i = Reflect.construct(a, arguments, t);
394
+ } else {
395
+ i = a.apply(this, arguments);
396
+ }
397
+ return M(this, i);
398
+ };
399
+ }
400
+ function M(r, e) {
401
+ if (e && (R(e) === "object" || typeof e === "function")) {
402
+ return e;
403
+ }
404
+ return z(r);
405
+ }
406
+ function z(r) {
407
+ if (r === void 0) {
408
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
409
+ }
410
+ return r;
411
+ }
412
+ function F() {
413
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
414
+ if (Reflect.construct.sham) return false;
415
+ if (typeof Proxy === "function") return true;
416
+ try {
417
+ Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
418
+ return true;
419
+ } catch (r) {
420
+ return false;
421
+ }
422
+ }
423
+ function G(r) {
424
+ G = Object.setPrototypeOf ? Object.getPrototypeOf : function r(e) {
425
+ return e.__proto__ || Object.getPrototypeOf(e);
426
+ };
427
+ return G(r);
428
+ }
429
+ function J(r, e, o) {
430
+ if (e in r) {
431
+ Object.defineProperty(r, e, {
432
+ value: o,
433
+ enumerable: true,
434
+ configurable: true,
435
+ writable: true
436
+ });
437
+ } else {
438
+ r[e] = o;
439
+ }
440
+ return r;
441
+ }
442
+ var K = {
443
+ action: t().string,
444
+ appearance: t().oneOf([ "default", "secondary", "primary", "destructive", "pill", "toggle", "flat" ]),
445
+ append: t().bool,
446
+ children: t().node,
447
+ disabled: t().bool,
448
+ elementRef: t().oneOfType([ t().func, t().object ]),
449
+ error: t().bool,
450
+ inline: t().bool,
451
+ openInNewContext: t().bool,
452
+ prepend: t().bool,
453
+ selected: t().bool,
454
+ splunkTheme: t().object,
455
+ to: t().string
456
+ };
457
+ var Q = {
458
+ appearance: "default",
459
+ append: false,
460
+ disabled: false,
461
+ error: false,
462
+ inline: true,
463
+ openInNewContext: false,
464
+ prepend: false,
465
+ selected: false
466
+ };
467
+ var U = function r(e, o) {
468
+ var a = {
469
+ default: "enterpriseDefault",
470
+ destructive: "enterpriseError",
471
+ primary: "enterprisePrimary",
472
+ secondary: "enterpriseSecondary",
473
+ pill: "enterprisePill",
474
+ toggle: "enterpriseDefault",
475
+ flat: "enterpriseDefault"
476
+ };
477
+ var i = {
478
+ default: "prismaDefault",
479
+ destructive: "prismaDestructive",
480
+ primary: "prismaPrimary",
481
+ secondary: "prismaSecondary",
482
+ pill: "prismaSecondary",
483
+ toggle: "prismaToggle",
484
+ flat: "prismaFlat"
485
+ };
486
+ if (o === "enterprise") {
487
+ return a[e];
488
+ }
489
+ return i[e];
490
+ };
491
+ var X = function(r) {
492
+ W(o, r);
493
+ var e = L(o);
494
+ function o() {
495
+ var r;
496
+ H(this, o);
497
+ for (var a = arguments.length, i = new Array(a), t = 0; t < a; t++) {
498
+ i[t] = arguments[t];
499
+ }
500
+ r = e.call.apply(e, [ this ].concat(i));
501
+ J(z(r), "component", null);
502
+ J(z(r), "handleMount", (function(e) {
503
+ r.component = e;
504
+ }));
505
+ return r;
506
+ }
507
+ q(o, [ {
508
+ key: "focus",
509
+ /**
510
+ * Places focus on the button.
511
+ */
512
+ value: function r() {
513
+ var e;
514
+ (e = this.component) === null || e === void 0 ? void 0 : e.focus();
515
+ }
516
+ }, {
517
+ key: "render",
518
+ value: function r() {
519
+ var e = this.props, o = e.appearance, i = e.append, t = e.children, l = e.error, s = e.prepend, d = e.selected, b = e.splunkTheme, v = A(e, [ "appearance", "append", "children", "error", "prepend", "selected", "splunkTheme" ]);
520
+ var u = o;
521
+ if (b.isEnterprise) {
522
+ u = l ? "destructive" : o;
523
+ }
524
+
525
+ return a().createElement(_, V({
526
+ "aria-invalid": l,
527
+ "data-test": "button-simple",
528
+ ref: this.handleMount,
529
+ $variant: U(u, b.family),
530
+ $append: i,
531
+ $prepend: s,
532
+ $selected: d,
533
+ $error: l
534
+ }, v), t, d && a().createElement(c(), null, (0, n._)("Selected")));
535
+ }
536
+ } ]);
537
+ return o;
538
+ }(o.Component);
539
+ J(X, "defaultProps", Q);
540
+ J(X, "propTypes", K);
541
+ var Y = (0, l.withSplunkTheme)(X);
542
+ Y.propTypes = X.propTypes;
543
+ /* harmony default export */ const Z = Y;
544
+ // CONCATENATED MODULE: ./src/ButtonSimple/index.ts
545
+ module.exports = e;
546
+ /******/})();