@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.
- package/Accordion.js +425 -325
- package/Anchor.js +147 -117
- package/Animation.js +142 -94
- package/AnimationToggle.js +197 -193
- package/Box.js +145 -118
- package/Breadcrumbs.js +288 -206
- package/Button.js +488 -465
- package/ButtonGroup.js +160 -128
- package/ButtonSimple.js +543 -462
- package/CHANGELOG.md +24 -3
- package/Calendar.js +1111 -1001
- package/Card.js +771 -598
- package/CardLayout.js +205 -147
- package/Chip.js +509 -488
- package/Clickable.js +414 -352
- package/CloseButton.js +165 -142
- package/Code.js +1807 -2084
- package/CollapsiblePanel.js +586 -519
- package/Color.js +1068 -1068
- package/ColumnLayout.js +402 -363
- package/ComboBox.js +903 -794
- package/Concertina.js +997 -802
- package/ControlGroup.js +687 -594
- package/Date.js +567 -547
- package/DefinitionList.js +308 -234
- package/Divider.js +149 -118
- package/Dropdown.js +459 -416
- package/DualListbox.js +1479 -1541
- package/EventListener.js +94 -97
- package/File.js +1051 -969
- package/FormRows.js +883 -696
- package/Heading.js +216 -193
- package/Image.js +446 -402
- package/JSONTree.js +690 -551
- package/Layer.js +437 -410
- package/Link.js +336 -255
- package/List.js +213 -161
- package/Markdown.js +509 -487
- package/Menu.js +1104 -1056
- package/Message.js +475 -441
- package/MessageBar.js +387 -373
- package/Modal.js +810 -634
- package/ModalLayer.js +326 -243
- package/Monogram.js +308 -276
- package/Multiselect.js +3564 -3364
- package/Number.js +729 -687
- package/Paginator.js +510 -449
- package/Paragraph.js +145 -112
- package/Popover.js +1459 -1432
- package/Progress.js +301 -246
- package/RadioBar.js +634 -527
- package/RadioList.js +483 -444
- package/Resize.js +530 -489
- package/ResultsMenu.js +479 -455
- package/ScreenReaderContent.js +142 -111
- package/Scroll.js +595 -456
- package/ScrollContainerContext.js +197 -206
- package/Search.js +756 -650
- package/Select.js +2446 -2345
- package/SidePanel.js +390 -284
- package/Slider.js +680 -676
- package/SlidingPanels.js +639 -503
- package/SplitButton.js +464 -367
- package/StaticContent.js +161 -133
- package/StepBar.js +386 -358
- package/Switch.js +710 -640
- package/TabBar.js +741 -680
- package/TabLayout.js +406 -322
- package/Table.js +4974 -4616
- package/Text.js +1170 -1138
- package/TextArea.js +1102 -1090
- package/Tooltip.js +624 -581
- package/TransitionOpen.js +489 -422
- package/Typography.js +176 -153
- package/WaitSpinner.js +230 -206
- package/package.json +7 -7
- package/types/src/Color/Color.d.ts +0 -1
- package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
- package/types/src/JSONTree/TreeNode.d.ts +5 -0
- package/types/src/RadioBar/RadioBar.d.ts +1 -0
- package/types/src/ResultsMenu/ResultsMenu.d.ts +0 -2
- package/types/src/Select/docs/examples/Icons.d.ts +1 -9
- package/types/src/Slider/Slider.d.ts +1 -0
- package/types/src/TabBar/Tab.d.ts +10 -1
- package/types/src/TabBar/TabBar.d.ts +4 -2
- package/types/src/Table/Head.d.ts +7 -3
- package/types/src/Table/Table.d.ts +3 -2
- package/types/src/Table/TableContext.d.ts +2 -0
- package/useForceUpdate.js +112 -82
- package/useKeyPress.js +74 -71
- package/usePrevious.js +65 -65
- package/useRovingFocus.js +122 -138
package/ButtonSimple.js
CHANGED
|
@@ -1,465 +1,546 @@
|
|
|
1
|
-
/******/ (() => {
|
|
2
|
-
|
|
3
|
-
/******/
|
|
4
|
-
/******/
|
|
5
|
-
/******/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/******/
|
|
9
|
-
/******/
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/
|
|
22
|
-
/******/
|
|
23
|
-
/******/
|
|
24
|
-
/******/
|
|
25
|
-
/******/
|
|
26
|
-
/******/
|
|
27
|
-
/******/
|
|
28
|
-
/******/
|
|
29
|
-
/******/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/******/
|
|
34
|
-
/******/
|
|
35
|
-
/******/
|
|
36
|
-
/******/
|
|
37
|
-
/******/
|
|
38
|
-
/******/
|
|
39
|
-
/******/
|
|
40
|
-
/******/
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/******/
|
|
44
|
-
/******/
|
|
45
|
-
/******/
|
|
46
|
-
/******/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
;// CONCATENATED MODULE: external "@splunk/themes"
|
|
66
|
-
const themes_namespaceObject = require("@splunk/themes");
|
|
67
|
-
;// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
68
|
-
const ScreenReaderContent_namespaceObject = require("@splunk/react-ui/ScreenReaderContent");
|
|
69
|
-
var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_namespaceObject);
|
|
70
|
-
;// CONCATENATED MODULE: external "styled-components"
|
|
71
|
-
const external_styled_components_namespaceObject = require("styled-components");
|
|
72
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
|
|
73
|
-
;// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
|
|
74
|
-
const Clickable_namespaceObject = require("@splunk/react-ui/Clickable");
|
|
75
|
-
var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_namespaceObject);
|
|
76
|
-
;// CONCATENATED MODULE: ./src/ButtonSimple/prismaStyles.ts
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
var common = (0,external_styled_components_namespaceObject.css)(["", " cursor:pointer;position:relative;border-radius:", ";&:focus,&:hover{z-index:3;}"], themes_namespaceObject.mixins.reset('block'), themes_namespaceObject.variables.borderRadius);
|
|
80
|
-
/* Setting border-radius to 0.1px creates a rounded shadow, */
|
|
81
|
-
|
|
82
|
-
var appendPrepend = (0,external_styled_components_namespaceObject.css)(["", " ", ""], function (_ref) {
|
|
83
|
-
var $append = _ref.$append;
|
|
84
|
-
return $append && (0,external_styled_components_namespaceObject.css)(["border-top-right-radius:0.1px;border-bottom-right-radius:0.1px;border-right:none;"]);
|
|
85
|
-
}, function (_ref2) {
|
|
86
|
-
var $prepend = _ref2.$prepend;
|
|
87
|
-
return $prepend && (0,external_styled_components_namespaceObject.css)(["border-top-left-radius:0.1px;border-bottom-left-radius:0.1px;"]);
|
|
88
|
-
});
|
|
89
|
-
var prismaTransparent = (0,external_styled_components_namespaceObject.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, (0,themes_namespaceObject.pickVariant)('$variant', {
|
|
90
|
-
prismaSecondary: (0,external_styled_components_namespaceObject.css)(["font-weight:", ";"], themes_namespaceObject.variables.fontWeightSemiBold),
|
|
91
|
-
prismaDefault: (0,external_styled_components_namespaceObject.css)(["border:1px solid ", ";font-weight:", ";"], themes_namespaceObject.variables.interactiveColorBorder, themes_namespaceObject.variables.fontWeightSemiBold),
|
|
92
|
-
prismaToggle: (0,external_styled_components_namespaceObject.css)(["border:1px solid ", ";font-weight:normal;"], themes_namespaceObject.variables.interactiveColorBorder)
|
|
93
|
-
}), appendPrepend, themes_namespaceObject.variables.contentColorActive, themes_namespaceObject.variables.interactiveColorOverlayHover, themes_namespaceObject.variables.interactiveColorBorderHover, (0,themes_namespaceObject.pickVariant)('$variant', {
|
|
94
|
-
prismaSecondary: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";"], themes_namespaceObject.variables.hoverShadow),
|
|
95
|
-
prismaDefault: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";"], themes_namespaceObject.variables.hoverShadow)
|
|
96
|
-
}), function (_ref3) {
|
|
97
|
-
var $selected = _ref3.$selected;
|
|
98
|
-
return $selected && (0,external_styled_components_namespaceObject.css)(["background-color:", ";border-color:", ";&:hover{background-color:", ";}"], themes_namespaceObject.variables.interactiveColorOverlaySelected, themes_namespaceObject.variables.interactiveColorBorderDisabled, themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.interactiveColorOverlaySelected, themes_namespaceObject.variables.interactiveColorOverlayHover));
|
|
99
|
-
}, function (_ref4) {
|
|
100
|
-
var $error = _ref4.$error;
|
|
101
|
-
return $error && (0,external_styled_components_namespaceObject.css)(["border-color:", ";&:hover{border-color:", ";}"], themes_namespaceObject.variables.accentColorNegative, themes_namespaceObject.variables.accentColorNegative);
|
|
102
|
-
}, themes_namespaceObject.variables.interactiveColorOverlayActive, themes_namespaceObject.variables.interactiveColorOverlayHover, (0,themes_namespaceObject.pickVariant)('$variant', {
|
|
103
|
-
prismaSecondary: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";"], themes_namespaceObject.variables.focusShadow),
|
|
104
|
-
prismaDefault: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";"], themes_namespaceObject.variables.focusShadow),
|
|
105
|
-
prismaToggle: (0,external_styled_components_namespaceObject.css)(["border-color:", ";"], themes_namespaceObject.variables.interactiveColorPrimary)
|
|
106
|
-
}), themes_namespaceObject.variables.interactiveColorOverlayActive, themes_namespaceObject.variables.interactiveColorBorderDisabled, themes_namespaceObject.variables.contentColorDisabled, function (_ref5) {
|
|
107
|
-
var $selected = _ref5.$selected;
|
|
108
|
-
return $selected && (0,external_styled_components_namespaceObject.css)(["background-color:", ";"], themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.interactiveColorBackgroundDisabled, themes_namespaceObject.variables.interactiveColorOverlaySelected));
|
|
109
|
-
});
|
|
110
|
-
var disabledFillStyles = (0,external_styled_components_namespaceObject.css)(["&[disabled]{border-color:", ";color:", ";background-color:", ";cursor:not-allowed;", "}"], themes_namespaceObject.variables.interactiveColorBorderDisabled, themes_namespaceObject.variables.contentColorDisabled, themes_namespaceObject.variables.interactiveColorBackgroundDisabled, function ($selected) {
|
|
111
|
-
return $selected && (0,external_styled_components_namespaceObject.css)(["background-color:", ";"], themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.interactiveColorBackgroundDisabled, themes_namespaceObject.variables.interactiveColorOverlaySelected));
|
|
112
|
-
});
|
|
113
|
-
var prismaFilled = (0,external_styled_components_namespaceObject.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_namespaceObject.variables.fontWeightSemiBold, themes_namespaceObject.variables.borderRadius, appendPrepend, themes_namespaceObject.variables.contentColorInverted, (0,themes_namespaceObject.pickVariant)('$selected', {
|
|
114
|
-
"false": (0,themes_namespaceObject.pickVariant)('$variant', {
|
|
115
|
-
prismaPrimary: themes_namespaceObject.variables.interactiveColorPrimary,
|
|
116
|
-
prismaDestructive: themes_namespaceObject.variables.accentColorNegative
|
|
117
|
-
}),
|
|
118
|
-
"true": (0,themes_namespaceObject.pickVariant)('$variant', {
|
|
119
|
-
prismaPrimary: themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.interactiveColorPrimary, themes_namespaceObject.variables.interactiveColorOverlaySelected),
|
|
120
|
-
prismaDestructive: themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.accentColorNegative, themes_namespaceObject.variables.interactiveColorOverlaySelected)
|
|
121
|
-
})
|
|
122
|
-
}), (0,themes_namespaceObject.pickVariant)('$variant', {
|
|
123
|
-
prismaPrimary: themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.interactiveColorPrimary, themes_namespaceObject.variables.interactiveColorOverlayHover),
|
|
124
|
-
prismaDestructive: themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.accentColorNegative, themes_namespaceObject.variables.interactiveColorOverlayHover)
|
|
125
|
-
}), themes_namespaceObject.variables.hoverShadow, themes_namespaceObject.variables.focusShadow, (0,themes_namespaceObject.pickVariant)('$variant', {
|
|
126
|
-
prismaPrimary: themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.interactiveColorPrimary, themes_namespaceObject.variables.interactiveColorOverlayActive),
|
|
127
|
-
prismaDestructive: themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.accentColorNegative, themes_namespaceObject.variables.interactiveColorOverlayActive)
|
|
128
|
-
}), disabledFillStyles);
|
|
129
|
-
var prismaFlat = (0,external_styled_components_namespaceObject.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_namespaceObject.variables.fontWeightSemiBold, themes_namespaceObject.variables.borderRadius, appendPrepend, themes_namespaceObject.variables.contentColorActive, themes_namespaceObject.variables.interactiveColorBackground, function ($selected) {
|
|
130
|
-
return $selected && (0,external_styled_components_namespaceObject.css)(["background-color:", ";"], themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.interactiveColorBackground, themes_namespaceObject.variables.interactiveColorOverlaySelected));
|
|
131
|
-
}, themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.interactiveColorBackground, themes_namespaceObject.variables.interactiveColorOverlayHover), themes_namespaceObject.variables.hoverShadow, themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.interactiveColorBackground, themes_namespaceObject.variables.interactiveColorOverlayActive), themes_namespaceObject.variables.focusShadow, themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.interactiveColorBackground, themes_namespaceObject.variables.interactiveColorOverlayHover), disabledFillStyles);
|
|
132
|
-
|
|
133
|
-
;// CONCATENATED MODULE: ./src/ButtonSimple/enterpriseStyles.ts
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
var primaryBackgroundColor = '#1A8929'; // SUI-2439 to meet WCAG AA compliance
|
|
137
|
-
|
|
138
|
-
var primarySelectedBackgroundColor = '#235823'; // SUI-2439 to meet WCAG AA compliance
|
|
139
|
-
|
|
140
|
-
var enterpriseStyles_common = (0,external_styled_components_namespaceObject.css)(["", " border-radius:", ";cursor:pointer;position:relative;&:focus{z-index:3;}"], themes_namespaceObject.mixins.reset('block'), themes_namespaceObject.variables.borderRadius);
|
|
141
|
-
var enterpriseStyles_appendPrepend = (0,external_styled_components_namespaceObject.css)(["", " ", ""], function (_ref) {
|
|
142
|
-
var $append = _ref.$append;
|
|
143
|
-
return $append && (0,external_styled_components_namespaceObject.css)(["border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;"]);
|
|
144
|
-
}, function (_ref2) {
|
|
145
|
-
var $prepend = _ref2.$prepend;
|
|
146
|
-
return $prepend && (0,external_styled_components_namespaceObject.css)(["border-top-left-radius:0;border-bottom-left-radius:0;"]);
|
|
147
|
-
});
|
|
148
|
-
var lightShadow = 'inset 0 -1px 0 rgba(0, 0, 0, 0.1)';
|
|
149
|
-
var lightSelectedShadow = 'inset 0 1px 0 rgba(0, 0, 0, 0.1)';
|
|
150
|
-
var enterpriseDefault = (0,external_styled_components_namespaceObject.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, (0,themes_namespaceObject.pick)({
|
|
151
|
-
light: (0,external_styled_components_namespaceObject.css)(["1px solid ", ""], themes_namespaceObject.variables.gray60),
|
|
152
|
-
dark: themes_namespaceObject.variables.border
|
|
153
|
-
}), enterpriseStyles_appendPrepend, (0,themes_namespaceObject.pickVariant)('$variant', {
|
|
154
|
-
enterpriseDefault: 'normal',
|
|
155
|
-
enterpriseSecondary: themes_namespaceObject.variables.fontWeightSemiBold
|
|
156
|
-
}), (0,themes_namespaceObject.pick)({
|
|
157
|
-
light: themes_namespaceObject.variables.gray98,
|
|
158
|
-
dark: themes_namespaceObject.variables.gray45
|
|
159
|
-
}), (0,themes_namespaceObject.pick)({
|
|
160
|
-
light: themes_namespaceObject.variables.gray45,
|
|
161
|
-
dark: themes_namespaceObject.variables.white
|
|
162
|
-
}), (0,themes_namespaceObject.pick)({
|
|
163
|
-
light: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";"], lightShadow),
|
|
164
|
-
dark: (0,external_styled_components_namespaceObject.css)(["box-shadow:inset 0 -1px 0 ", ";"], themes_namespaceObject.variables.gray30)
|
|
165
|
-
}), function (_ref3) {
|
|
166
|
-
var $selected = _ref3.$selected;
|
|
167
|
-
return $selected && (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";background-color:", ";border-color:", ";"], (0,themes_namespaceObject.pick)({
|
|
168
|
-
light: lightSelectedShadow,
|
|
169
|
-
dark: (0,external_styled_components_namespaceObject.css)(["inset 0 1px 0 ", ""], themes_namespaceObject.variables.black)
|
|
170
|
-
}), (0,themes_namespaceObject.pick)({
|
|
171
|
-
light: themes_namespaceObject.variables.gray92,
|
|
172
|
-
dark: themes_namespaceObject.variables.gray22
|
|
173
|
-
}), (0,themes_namespaceObject.pick)({
|
|
174
|
-
light: themes_namespaceObject.variables.gray60,
|
|
175
|
-
dark: themes_namespaceObject.variables.gray20
|
|
176
|
-
}));
|
|
177
|
-
}, (0,themes_namespaceObject.pick)({
|
|
178
|
-
light: '#ebeeef',
|
|
179
|
-
dark: themes_namespaceObject.variables.gray30
|
|
180
|
-
}), (0,themes_namespaceObject.pick)({
|
|
181
|
-
light: lightShadow,
|
|
182
|
-
dark: (0,external_styled_components_namespaceObject.css)(["inset 0 -1px 0 ", ""], themes_namespaceObject.variables.gray25)
|
|
183
|
-
}), (0,themes_namespaceObject.pick)({
|
|
184
|
-
light: themes_namespaceObject.variables.gray92,
|
|
185
|
-
dark: themes_namespaceObject.variables.gray22
|
|
186
|
-
}), (0,themes_namespaceObject.pick)({
|
|
187
|
-
light: themes_namespaceObject.variables.gray60,
|
|
188
|
-
dark: themes_namespaceObject.variables.gray20
|
|
189
|
-
}), (0,themes_namespaceObject.pick)({
|
|
190
|
-
dark: (0,external_styled_components_namespaceObject.css)(["box-shadow:inset 0 -1px 0 ", ";"], themes_namespaceObject.variables.gray22)
|
|
191
|
-
}), (0,themes_namespaceObject.pick)({
|
|
192
|
-
light: lightShadow,
|
|
193
|
-
dark: (0,external_styled_components_namespaceObject.css)(["inset 0 -1px 0 ", ""], themes_namespaceObject.variables.gray30)
|
|
194
|
-
}), themes_namespaceObject.variables.focusShadow, function (_ref4) {
|
|
195
|
-
var $append = _ref4.$append;
|
|
196
|
-
return $append && (0,external_styled_components_namespaceObject.css)(["box-shadow:", ",", ",inset -1px 0 0 ", ";"], (0,themes_namespaceObject.pick)({
|
|
197
|
-
light: lightShadow,
|
|
198
|
-
dark: (0,external_styled_components_namespaceObject.css)(["inset 0 -1px 0 ", ""], themes_namespaceObject.variables.gray30)
|
|
199
|
-
}), themes_namespaceObject.variables.focusShadow, themes_namespaceObject.variables.borderColor);
|
|
200
|
-
}, function (_ref5) {
|
|
201
|
-
var $append = _ref5.$append,
|
|
202
|
-
$selected = _ref5.$selected;
|
|
203
|
-
return $append && $selected && (0,themes_namespaceObject.pick)({
|
|
204
|
-
light: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ",", ",", ",inset -1px 0 0 ", ";"], lightShadow, lightSelectedShadow, themes_namespaceObject.variables.focusShadow, themes_namespaceObject.variables.borderColor),
|
|
205
|
-
dark: (0,external_styled_components_namespaceObject.css)(["box-shadow:inset 0 1px 0 ", ",", ",inset -1px 0 0 ", ";"], themes_namespaceObject.variables.black, themes_namespaceObject.variables.focusShadow, themes_namespaceObject.variables.borderColor)
|
|
206
|
-
});
|
|
207
|
-
}, themes_namespaceObject.variables.textDisabledColor, (0,themes_namespaceObject.pick)({
|
|
208
|
-
light: themes_namespaceObject.variables.gray96,
|
|
209
|
-
dark: themes_namespaceObject.variables.gray30
|
|
210
|
-
}), (0,themes_namespaceObject.pick)({
|
|
211
|
-
light: themes_namespaceObject.variables.borderLightColor,
|
|
212
|
-
dark: themes_namespaceObject.variables.gray30
|
|
213
|
-
}), function (_ref6) {
|
|
214
|
-
var $selected = _ref6.$selected;
|
|
215
|
-
return $selected && (0,themes_namespaceObject.pick)({
|
|
216
|
-
light: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";background-color:", ";border-color:", ";"], lightSelectedShadow, themes_namespaceObject.variables.gray92, themes_namespaceObject.variables.gray80),
|
|
217
|
-
dark: (0,external_styled_components_namespaceObject.css)(["box-shadow:inset 0 1px 0 ", ";background-color:", ";border-color:", ";"], themes_namespaceObject.variables.black, themes_namespaceObject.variables.gray22, themes_namespaceObject.variables.gray20)
|
|
218
|
-
});
|
|
219
|
-
});
|
|
220
|
-
var primaryShadow = 'inset 0 -2px 0 rgba(0, 0, 0, 0.1)';
|
|
221
|
-
var primarySelectedShadow = 'inset 0 2px 0 rgba(0, 0, 0, 0.1)';
|
|
222
|
-
var enterprisePrimary = (0,external_styled_components_namespaceObject.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_namespaceObject.variables.fontWeightSemiBold, enterpriseStyles_appendPrepend, primaryBackgroundColor, themes_namespaceObject.variables.white, primaryShadow, function (_ref7) {
|
|
223
|
-
var $selected = _ref7.$selected;
|
|
224
|
-
return $selected && (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";background-color:", ";"], primarySelectedShadow, primarySelectedBackgroundColor);
|
|
225
|
-
}, function (_ref8) {
|
|
226
|
-
var $prepend = _ref8.$prepend;
|
|
227
|
-
return $prepend && (0,external_styled_components_namespaceObject.css)(["border-left:1px solid ", ";"], primaryBackgroundColor);
|
|
228
|
-
}, themes_namespaceObject.variables.brandColorD50, themes_namespaceObject.variables.brandColorD30, primaryShadow, themes_namespaceObject.variables.focusShadow, themes_namespaceObject.variables.brandColorD30, themes_namespaceObject.variables.brandColorL30, themes_namespaceObject.variables.brandColorL10, function (_ref9) {
|
|
229
|
-
var $selected = _ref9.$selected;
|
|
230
|
-
return $selected && (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";background-color:", ";"], primarySelectedShadow, themes_namespaceObject.variables.brandColorD20);
|
|
231
|
-
});
|
|
232
|
-
var enterpriseError = (0,external_styled_components_namespaceObject.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_namespaceObject.variables.fontWeightSemiBold, enterpriseStyles_appendPrepend, themes_namespaceObject.variables.errorColorD10, themes_namespaceObject.variables.white, primaryShadow, function (_ref10) {
|
|
233
|
-
var $selected = _ref10.$selected;
|
|
234
|
-
return $selected && (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";background-color:", ";"], primarySelectedShadow, themes_namespaceObject.variables.errorColorD30);
|
|
235
|
-
}, function (_ref11) {
|
|
236
|
-
var $prepend = _ref11.$prepend;
|
|
237
|
-
return $prepend && (0,external_styled_components_namespaceObject.css)(["border-left:1px solid ", ";"], themes_namespaceObject.variables.errorColorD30);
|
|
238
|
-
}, themes_namespaceObject.variables.errorColorD30, themes_namespaceObject.variables.errorColorD40, primaryShadow, themes_namespaceObject.variables.focusShadow, themes_namespaceObject.variables.errorColorD40, themes_namespaceObject.variables.errorColorL10, themes_namespaceObject.variables.errorColorD10, function (_ref12) {
|
|
239
|
-
var $selected = _ref12.$selected;
|
|
240
|
-
return $selected && (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";background-color:", ";"], primarySelectedShadow, themes_namespaceObject.variables.errorColorD40);
|
|
241
|
-
});
|
|
242
|
-
var enterprisePill = (0,external_styled_components_namespaceObject.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, (0,themes_namespaceObject.pick)({
|
|
243
|
-
light: themes_namespaceObject.variables.gray45,
|
|
244
|
-
dark: themes_namespaceObject.variables.white
|
|
245
|
-
}), function (_ref13) {
|
|
246
|
-
var $selected = _ref13.$selected;
|
|
247
|
-
return $selected && (0,external_styled_components_namespaceObject.css)(["border-color:", ";"], themes_namespaceObject.variables.accentColor);
|
|
248
|
-
}, (0,themes_namespaceObject.pick)({
|
|
249
|
-
light: themes_namespaceObject.variables.linkColor,
|
|
250
|
-
dark: themes_namespaceObject.variables.white
|
|
251
|
-
}), themes_namespaceObject.variables.backgroundColorHover, (0,themes_namespaceObject.pick)({
|
|
252
|
-
light: themes_namespaceObject.variables.gray60,
|
|
253
|
-
dark: themes_namespaceObject.variables.borderColor
|
|
254
|
-
}), function (_ref14) {
|
|
255
|
-
var $error = _ref14.$error;
|
|
256
|
-
return $error && (0,external_styled_components_namespaceObject.css)(["&,&:hover{color:", ";}"], themes_namespaceObject.variables.errorColor);
|
|
257
|
-
}, (0,themes_namespaceObject.pick)({
|
|
258
|
-
light: themes_namespaceObject.variables.linkColor,
|
|
259
|
-
dark: themes_namespaceObject.variables.white
|
|
260
|
-
}), themes_namespaceObject.variables.focusShadow, (0,themes_namespaceObject.pick)({
|
|
261
|
-
light: themes_namespaceObject.variables.gray92,
|
|
262
|
-
dark: themes_namespaceObject.variables.gray22
|
|
263
|
-
}), themes_namespaceObject.variables.textDisabledColor, function (_ref15) {
|
|
264
|
-
var $selected = _ref15.$selected;
|
|
265
|
-
return $selected && (0,external_styled_components_namespaceObject.css)(["border-color:", ";"], themes_namespaceObject.variables.borderLightColor);
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
;// CONCATENATED MODULE: ./src/ButtonSimple/ButtonSimpleStyles.ts
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
var StyledClickable = external_styled_components_default()((Clickable_default())).withConfig({
|
|
275
|
-
displayName: "ButtonSimpleStyles__StyledClickable",
|
|
276
|
-
componentId: "vlarwe-0"
|
|
277
|
-
})(["", ""], (0,themes_namespaceObject.pickVariant)('$variant', {
|
|
278
|
-
enterpriseDefault: enterpriseDefault,
|
|
279
|
-
enterpriseSecondary: enterpriseDefault,
|
|
280
|
-
enterprisePrimary: enterprisePrimary,
|
|
281
|
-
enterpriseError: enterpriseError,
|
|
282
|
-
enterpriseDestructive: enterpriseError,
|
|
283
|
-
enterprisePill: enterprisePill,
|
|
284
|
-
prismaDefault: prismaTransparent,
|
|
285
|
-
prismaDestructive: prismaFilled,
|
|
286
|
-
prismaPrimary: prismaFilled,
|
|
287
|
-
prismaSecondary: prismaTransparent,
|
|
288
|
-
prismaToggle: prismaTransparent,
|
|
289
|
-
prismaFlat: prismaFlat
|
|
290
|
-
}));
|
|
291
|
-
|
|
292
|
-
;// CONCATENATED MODULE: ./src/ButtonSimple/ButtonSimple.tsx
|
|
293
|
-
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); }
|
|
294
|
-
|
|
295
|
-
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); }
|
|
296
|
-
|
|
297
|
-
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; }
|
|
298
|
-
|
|
299
|
-
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; }
|
|
300
|
-
|
|
301
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
302
|
-
|
|
303
|
-
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); } }
|
|
304
|
-
|
|
305
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
306
|
-
|
|
307
|
-
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); }
|
|
308
|
-
|
|
309
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
310
|
-
|
|
311
|
-
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); }; }
|
|
312
|
-
|
|
313
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
314
|
-
|
|
315
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
316
|
-
|
|
317
|
-
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; } }
|
|
318
|
-
|
|
319
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
320
|
-
|
|
321
|
-
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; }
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
var propTypes = {
|
|
330
|
-
action: (external_prop_types_default()).string,
|
|
331
|
-
appearance: external_prop_types_default().oneOf(['default', 'secondary', 'primary', 'destructive', 'pill', 'toggle', 'flat']),
|
|
332
|
-
append: (external_prop_types_default()).bool,
|
|
333
|
-
children: (external_prop_types_default()).node,
|
|
334
|
-
disabled: (external_prop_types_default()).bool,
|
|
335
|
-
elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
|
|
336
|
-
error: (external_prop_types_default()).bool,
|
|
337
|
-
inline: (external_prop_types_default()).bool,
|
|
338
|
-
openInNewContext: (external_prop_types_default()).bool,
|
|
339
|
-
prepend: (external_prop_types_default()).bool,
|
|
340
|
-
selected: (external_prop_types_default()).bool,
|
|
341
|
-
splunkTheme: (external_prop_types_default()).object,
|
|
342
|
-
to: (external_prop_types_default()).string
|
|
343
|
-
};
|
|
344
|
-
var defaultProps = {
|
|
345
|
-
appearance: 'default',
|
|
346
|
-
append: false,
|
|
347
|
-
disabled: false,
|
|
348
|
-
error: false,
|
|
349
|
-
inline: true,
|
|
350
|
-
openInNewContext: false,
|
|
351
|
-
prepend: false,
|
|
352
|
-
selected: false
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
var mapVariant = function mapVariant(appearance, family) {
|
|
356
|
-
var enterprise = {
|
|
357
|
-
"default": 'enterpriseDefault',
|
|
358
|
-
destructive: 'enterpriseError',
|
|
359
|
-
primary: 'enterprisePrimary',
|
|
360
|
-
secondary: 'enterpriseSecondary',
|
|
361
|
-
pill: 'enterprisePill',
|
|
362
|
-
toggle: 'enterpriseDefault',
|
|
363
|
-
flat: 'enterpriseDefault'
|
|
364
|
-
};
|
|
365
|
-
var prisma = {
|
|
366
|
-
"default": 'prismaDefault',
|
|
367
|
-
destructive: 'prismaDestructive',
|
|
368
|
-
primary: 'prismaPrimary',
|
|
369
|
-
secondary: 'prismaSecondary',
|
|
370
|
-
pill: 'prismaSecondary',
|
|
371
|
-
toggle: 'prismaToggle',
|
|
372
|
-
flat: 'prismaFlat'
|
|
373
|
-
};
|
|
374
|
-
|
|
375
|
-
if (family === 'enterprise') {
|
|
376
|
-
return enterprise[appearance];
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
return prisma[appearance];
|
|
380
|
-
};
|
|
381
|
-
|
|
382
|
-
var ButtonSimple = /*#__PURE__*/function (_Component) {
|
|
383
|
-
_inherits(ButtonSimple, _Component);
|
|
384
|
-
|
|
385
|
-
var _super = _createSuper(ButtonSimple);
|
|
386
|
-
|
|
387
|
-
function ButtonSimple() {
|
|
388
|
-
var _this;
|
|
389
|
-
|
|
390
|
-
_classCallCheck(this, ButtonSimple);
|
|
391
|
-
|
|
392
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
393
|
-
args[_key] = arguments[_key];
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
397
|
-
|
|
398
|
-
_defineProperty(_assertThisInitialized(_this), "component", null);
|
|
399
|
-
|
|
400
|
-
_defineProperty(_assertThisInitialized(_this), "handleMount", function (c) {
|
|
401
|
-
_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
|
|
402
65
|
});
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
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;
|
|
417
366
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
var variant = appearance;
|
|
432
|
-
|
|
433
|
-
if (splunkTheme.isEnterprise) {
|
|
434
|
-
variant = error ? 'destructive' : appearance;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
return /*#__PURE__*/external_react_default().createElement(StyledClickable, _extends({
|
|
438
|
-
"aria-invalid": error,
|
|
439
|
-
"data-test": "button-simple",
|
|
440
|
-
ref: this.handleMount,
|
|
441
|
-
$variant: mapVariant(variant, splunkTheme.family),
|
|
442
|
-
$append: append,
|
|
443
|
-
$prepend: prepend,
|
|
444
|
-
$selected: selected,
|
|
445
|
-
$error: error
|
|
446
|
-
}, otherProps), children, selected && /*#__PURE__*/external_react_default().createElement((ScreenReaderContent_default()), null, (0,i18n_namespaceObject._)('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);
|
|
447
379
|
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
;
|
|
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
|
+
/******/})();
|