@splunk/react-ui 4.21.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.
- 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 +7 -2
- 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 +1808 -2084
- package/Code.js.LICENSE.txt +8 -0
- package/CollapsiblePanel.js +586 -519
- package/Color.js +1066 -1069
- package/ColumnLayout.js +402 -363
- package/ComboBox.js +891 -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 +1105 -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 +3550 -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 +610 -527
- package/RadioList.js +483 -444
- package/Resize.js +530 -489
- package/ResultsMenu.js +494 -455
- package/ScreenReaderContent.js +142 -111
- package/Scroll.js +595 -456
- package/ScrollContainerContext.js +197 -206
- package/Search.js +744 -650
- package/Select.js +2442 -2345
- package/SidePanel.js +390 -284
- package/Slider.js +669 -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 +726 -680
- package/TabLayout.js +406 -322
- package/Table.js +4842 -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 +5 -5
- package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
- package/types/src/JSONTree/TreeNode.d.ts +5 -0
- package/useForceUpdate.js +112 -82
- package/useKeyPress.js +74 -71
- package/usePrevious.js +65 -65
- package/useRovingFocus.js +122 -138
package/Chip.js
CHANGED
|
@@ -1,495 +1,516 @@
|
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
1
|
+
/******/ (() => {
|
|
2
|
+
// webpackBootstrap
|
|
3
|
+
/******/ "use strict";
|
|
4
|
+
/******/ // The require scope
|
|
5
|
+
/******/ var e = {};
|
|
6
|
+
/******/
|
|
7
|
+
/************************************************************************/
|
|
8
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
9
|
+
/******/ (() => {
|
|
10
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
11
|
+
/******/ e.n = r => {
|
|
12
|
+
/******/ var a = r && r.__esModule ?
|
|
13
|
+
/******/ () => r["default"]
|
|
14
|
+
/******/ : () => r
|
|
15
|
+
/******/;
|
|
16
|
+
e.d(a, {
|
|
17
|
+
a
|
|
18
|
+
});
|
|
19
|
+
/******/ return a;
|
|
20
|
+
/******/ };
|
|
21
|
+
/******/ })();
|
|
22
|
+
/******/
|
|
23
|
+
/******/ /* webpack/runtime/define property getters */
|
|
24
|
+
/******/ (() => {
|
|
25
|
+
/******/ // define getter functions for harmony exports
|
|
26
|
+
/******/ e.d = (r, a) => {
|
|
27
|
+
/******/ for (var o in a) {
|
|
28
|
+
/******/ if (e.o(a, o) && !e.o(r, o)) {
|
|
29
|
+
/******/ Object.defineProperty(r, o, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: a[o]
|
|
32
|
+
});
|
|
33
|
+
/******/ }
|
|
34
|
+
/******/ }
|
|
35
|
+
/******/ };
|
|
36
|
+
/******/ })();
|
|
37
|
+
/******/
|
|
38
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
39
|
+
/******/ (() => {
|
|
40
|
+
/******/ e.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
|
|
41
|
+
/******/;
|
|
42
|
+
})();
|
|
43
|
+
/******/
|
|
44
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
45
|
+
/******/ (() => {
|
|
46
|
+
/******/ // define __esModule on exports
|
|
47
|
+
/******/ e.r = e => {
|
|
48
|
+
/******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
|
|
49
|
+
/******/ Object.defineProperty(e, Symbol.toStringTag, {
|
|
50
|
+
value: "Module"
|
|
51
|
+
});
|
|
52
|
+
/******/ }
|
|
53
|
+
/******/ Object.defineProperty(e, "__esModule", {
|
|
54
|
+
value: true
|
|
55
|
+
});
|
|
56
|
+
/******/ };
|
|
57
|
+
/******/ })();
|
|
58
|
+
/******/
|
|
59
|
+
/************************************************************************/ var r = {};
|
|
60
|
+
// ESM COMPAT FLAG
|
|
61
|
+
e.r(r);
|
|
62
|
+
// EXPORTS
|
|
63
|
+
e.d(r, {
|
|
64
|
+
default: () => /* reexport */ V
|
|
65
|
+
});
|
|
66
|
+
// CONCATENATED MODULE: external "react"
|
|
67
|
+
const a = require("react");
|
|
68
|
+
var o = e.n(a);
|
|
69
|
+
// CONCATENATED MODULE: external "lodash/omit"
|
|
70
|
+
const n = require("lodash/omit");
|
|
71
|
+
var t = e.n(n);
|
|
72
|
+
// CONCATENATED MODULE: external "prop-types"
|
|
73
|
+
const i = require("prop-types");
|
|
74
|
+
var l = e.n(i);
|
|
75
|
+
// CONCATENATED MODULE: external "@splunk/react-icons/Cross"
|
|
76
|
+
const s = require("@splunk/react-icons/Cross");
|
|
77
|
+
var c = e.n(s);
|
|
78
|
+
// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Close"
|
|
79
|
+
const p = require("@splunk/react-icons/enterprise/Close");
|
|
80
|
+
var u = e.n(p);
|
|
81
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
82
|
+
const d = require("@splunk/ui-utils/i18n");
|
|
83
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/color"
|
|
84
|
+
const f = require("@splunk/ui-utils/color");
|
|
85
|
+
// CONCATENATED MODULE: external "@splunk/themes"
|
|
86
|
+
const v = require("@splunk/themes");
|
|
87
|
+
// CONCATENATED MODULE: external "styled-components"
|
|
88
|
+
const b = require("styled-components");
|
|
89
|
+
var g = e.n(b);
|
|
90
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
|
|
91
|
+
const m = require("@splunk/react-ui/Clickable");
|
|
92
|
+
var h = e.n(m);
|
|
93
|
+
// CONCATENATED MODULE: ./src/Chip/ChipStyles.ts
|
|
94
|
+
var C = g().div.withConfig({
|
|
95
|
+
displayName: "ChipStyles__StyledBasic",
|
|
96
|
+
componentId: "sc-1sd3tsh-0"
|
|
97
|
+
})([ "", ";background-color:", ";border:1px solid transparent;flex:0 1 auto;max-width:calc(100% - 3px);border-radius:2px;", ";", " ", " ", "" ], v.mixins.reset("inline-flex"), (0,
|
|
98
|
+
v.pickVariant)("$appearance", {
|
|
99
|
+
default: {
|
|
100
|
+
enterprise: {
|
|
101
|
+
dark: v.variables.gray45,
|
|
102
|
+
light: v.variables.gray92
|
|
103
|
+
},
|
|
104
|
+
prisma: v.variables.neutral100
|
|
105
|
+
},
|
|
106
|
+
info: {
|
|
107
|
+
enterprise: v.variables.infoColorL30
|
|
108
|
+
},
|
|
109
|
+
success: {
|
|
110
|
+
enterprise: v.variables.successColorL30
|
|
111
|
+
},
|
|
112
|
+
warning: {
|
|
113
|
+
enterprise: v.variables.warningColorL30
|
|
114
|
+
},
|
|
115
|
+
error: {
|
|
116
|
+
enterprise: v.variables.errorColorL30,
|
|
117
|
+
prisma: v.variables.accentColorNegative
|
|
118
|
+
},
|
|
119
|
+
outline: {
|
|
120
|
+
prisma: "transparent"
|
|
121
|
+
},
|
|
122
|
+
custom: function e(r) {
|
|
123
|
+
var a = r.$backgroundColor;
|
|
124
|
+
return a;
|
|
125
|
+
}
|
|
126
|
+
}), (function(e) {
|
|
127
|
+
var r = e.$appearance;
|
|
128
|
+
return r === "outline" && (0, b.css)([ "border-color:", ";" ], v.variables.interactiveColorBorder);
|
|
129
|
+
}), (0, v.pick)({
|
|
130
|
+
enterprise: (0, b.css)([ "color:", ";line-height:", ";margin:0 2px 2px 0;" ], v.variables.textGray, v.variables.lineHeight),
|
|
131
|
+
prisma: (0, b.css)([ "color:", ";line-height:16px;margin:1px;" ], (function(e) {
|
|
132
|
+
var r = e.$appearance;
|
|
133
|
+
return r === "error" ? v.variables.contentColorInverted : v.variables.contentColorDefault;
|
|
134
|
+
}))
|
|
135
|
+
}), (0, v.pick)({
|
|
136
|
+
enterprise: {
|
|
137
|
+
comfortable: (0, b.css)([ "height:calc(", " - 6px);padding:4px 7px;" ], v.variables.inputHeight),
|
|
138
|
+
compact: (0, b.css)([ "height:calc(", " - 6px);padding:2px 4px;" ], v.variables.inputHeight)
|
|
139
|
+
},
|
|
140
|
+
prisma: {
|
|
141
|
+
comfortable: (0, b.css)([ "height:calc(", " - 8px);padding:7px 7px;font-size:", ";" ], v.variables.inputHeight, v.variables.fontSizeSmall),
|
|
142
|
+
compact: (0, b.css)([ "height:calc(", " - 8px);padding:3px 7px;font-size:", ";" ], v.variables.inputHeight, v.variables.fontSizeSmall)
|
|
143
|
+
}
|
|
144
|
+
}), (function(e) {
|
|
145
|
+
var r = e.$disabled;
|
|
146
|
+
return r && (0, b.css)([ "background-color:", ";" ], (0, v.pickVariant)("$appearance", {
|
|
147
|
+
default: {
|
|
148
|
+
enterprise: {
|
|
149
|
+
dark: "rgba(0, 0, 0, 0.15)",
|
|
150
|
+
light: "rgba(0, 0, 0, 0.05)"
|
|
151
|
+
},
|
|
152
|
+
prisma: v.variables.interactiveColorBackgroundDisabled
|
|
153
|
+
},
|
|
154
|
+
info: {
|
|
155
|
+
enterprise: v.mixins.colorWithAlpha(v.variables.infoColorL10, .3)
|
|
156
|
+
},
|
|
157
|
+
success: {
|
|
158
|
+
enterprise: v.mixins.colorWithAlpha(v.variables.successColorL10, .3)
|
|
159
|
+
},
|
|
160
|
+
warning: {
|
|
161
|
+
enterprise: v.mixins.colorWithAlpha(v.variables.warningColorL10, .3)
|
|
162
|
+
},
|
|
163
|
+
error: {
|
|
164
|
+
enterprise: v.mixins.colorWithAlpha(v.variables.errorColorL10, .3),
|
|
165
|
+
prisma: v.variables.interactiveColorBackgroundDisabled
|
|
166
|
+
},
|
|
167
|
+
outline: {
|
|
168
|
+
prisma: v.variables.interactiveColorBackgroundDisabled
|
|
169
|
+
},
|
|
170
|
+
custom: {
|
|
171
|
+
enterprise: {
|
|
172
|
+
dark: "rgba(0, 0, 0, 0.15)",
|
|
173
|
+
light: "rgba(0, 0, 0, 0.05)"
|
|
174
|
+
},
|
|
175
|
+
prisma: v.variables.interactiveColorBackgroundDisabled
|
|
176
|
+
}
|
|
177
|
+
}));
|
|
178
|
+
}));
|
|
179
|
+
var y = g()(C).withConfig({
|
|
180
|
+
displayName: "ChipStyles__Styled",
|
|
181
|
+
componentId: "sc-1sd3tsh-1"
|
|
182
|
+
})([ "align-items:center;" ]);
|
|
183
|
+
var x = g().div.withConfig({
|
|
184
|
+
displayName: "ChipStyles__StyledInner",
|
|
185
|
+
componentId: "sc-1sd3tsh-2"
|
|
186
|
+
})([ "", ";" ], (0, v.pick)({
|
|
187
|
+
enterprise: (0, b.css)([ "display:flex;max-width:100%;" ]),
|
|
188
|
+
prisma: (0, b.css)([ "display:grid;max-width:100%;height:16px;column-gap:", ";", ";" ], (0,
|
|
189
|
+
v.pick)({
|
|
190
|
+
prisma: {
|
|
191
|
+
compact: v.variables.spacingXSmall,
|
|
192
|
+
comfortable: v.variables.spacingSmall
|
|
193
|
+
}
|
|
194
|
+
}), (function(e) {
|
|
195
|
+
var r = e.$icon, a = e.$removable;
|
|
196
|
+
var o = (0, b.css)([ "grid-template-columns:1fr;" ]);
|
|
197
|
+
if (r && a) {
|
|
198
|
+
o = (0, b.css)([ "grid-template-columns:0fr 1fr 0fr;" ]);
|
|
199
|
+
} else if (r) {
|
|
200
|
+
o = (0, b.css)([ "grid-template-columns:0fr 1fr;" ]);
|
|
201
|
+
} else if (a) {
|
|
202
|
+
o = (0, b.css)([ "grid-template-columns:1fr 0fr;" ]);
|
|
203
|
+
}
|
|
204
|
+
return o;
|
|
205
|
+
}))
|
|
206
|
+
}));
|
|
207
|
+
var $ = g().div.withConfig({
|
|
208
|
+
displayName: "ChipStyles__StyledIcon",
|
|
209
|
+
componentId: "sc-1sd3tsh-3"
|
|
210
|
+
})([ "", ";margin-right:", ";color:", ";" ], (0, v.pick)({
|
|
211
|
+
prisma: {
|
|
212
|
+
compact: (0, b.css)([ "font-size:14px;display:inline-flex;svg{height:16px;vertical-align:baseline;}" ]),
|
|
213
|
+
comfortable: (0, b.css)([ "font-size:18px;display:inline-flex;align-self:center;svg{height:16px;vertical-align:baseline;}" ])
|
|
214
|
+
},
|
|
215
|
+
enterprise: (0, b.css)([ "flex:0 0 auto;" ])
|
|
216
|
+
}), (0, v.pick)({
|
|
217
|
+
enterprise: "3px"
|
|
218
|
+
}), (0, v.pickVariant)("$disabled", {
|
|
219
|
+
true: v.variables.contentColorDisabled,
|
|
220
|
+
false: {
|
|
221
|
+
enterprise: function e(r) {
|
|
222
|
+
var a = r.$foregroundColor;
|
|
223
|
+
return a || v.variables.contentColorDefault;
|
|
224
|
+
},
|
|
225
|
+
prisma: function e(r) {
|
|
226
|
+
var a = r.$foregroundColor, o = r.$appearance;
|
|
227
|
+
return a || (o === "error" ? v.variables.contentColorInverted : v.variables.contentColorDefault);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}));
|
|
231
|
+
var k = g().div.withConfig({
|
|
232
|
+
displayName: "ChipStyles__StyledLabel",
|
|
233
|
+
componentId: "sc-1sd3tsh-4"
|
|
234
|
+
})([ "", " ", ";color:", ";" ], v.mixins.ellipsis(), (0, v.pick)({
|
|
235
|
+
enterprise: (0, b.css)([ "flex:0 1 auto;" ])
|
|
236
|
+
}), (0, v.pickVariant)("$disabled", {
|
|
237
|
+
true: v.variables.contentColorDisabled,
|
|
238
|
+
false: {
|
|
239
|
+
enterprise: function e(r) {
|
|
240
|
+
var a = r.$appearance, o = r.$foregroundColor;
|
|
241
|
+
return o || (a === "default" || a === "outline" ? v.variables.contentColorDefault : v.variables.gray30);
|
|
242
|
+
},
|
|
243
|
+
prisma: function e(r) {
|
|
244
|
+
var a = r.$appearance, o = r.$foregroundColor;
|
|
245
|
+
return o || (a === "error" ? v.variables.contentColorInverted : v.variables.contentColorActive);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}));
|
|
249
|
+
var S = g().span.withConfig({
|
|
250
|
+
displayName: "ChipStyles__StyledRemove",
|
|
251
|
+
componentId: "sc-1sd3tsh-5"
|
|
252
|
+
})([ "", ";" ], (0, v.pick)({
|
|
253
|
+
enterprise: (0, b.css)([ "flex:0 0 auto;padding-left:", ";font-size:", ";color:", ";" ], v.variables.spacingQuarter, (0,
|
|
254
|
+
v.pick)({
|
|
255
|
+
compact: "9px",
|
|
256
|
+
comfortable: "10.5px"
|
|
257
|
+
}), (0, v.pickVariant)("$disabled", {
|
|
258
|
+
true: v.variables.contentColorDisabled,
|
|
259
|
+
false: {
|
|
260
|
+
enterprise: function e(r) {
|
|
261
|
+
var a = r.$foregroundColor, o = r.$appearance;
|
|
262
|
+
return a || (o === "default" || o === "outline" ? v.variables.textGray : v.variables.gray30);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
})),
|
|
266
|
+
prisma: (0, b.css)([ "font-size:", ";display:flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:12px;font-size:9px;color:", ";" ], (0,
|
|
267
|
+
v.pick)({
|
|
268
|
+
compact: "9px",
|
|
269
|
+
comfortable: "10.5px"
|
|
270
|
+
}), (function(e) {
|
|
271
|
+
var r = e.$disabled, a = e.$foregroundColor;
|
|
272
|
+
return r ? v.variables.contentColorDisabled : a || "inherit";
|
|
273
|
+
}))
|
|
274
|
+
}));
|
|
275
|
+
var w = g()(C.withComponent(h())).withConfig({
|
|
276
|
+
displayName: "ChipStyles__StyledClickable",
|
|
277
|
+
componentId: "sc-1sd3tsh-6"
|
|
278
|
+
})([ "flex:0 1 auto;line-height:16px;cursor:pointer;&:focus{", ";}&:not([disabled]):hover{", ";}", ";" ], (0,
|
|
279
|
+
v.pick)({
|
|
280
|
+
enterprise: (0, b.css)([ "box-shadow:", ";color:", ";" ], v.variables.focusShadow, v.variables.linkColor),
|
|
281
|
+
prisma: (0, b.css)([ "color:", ";", "{background-color:", ";box-shadow:0 0 0 3px ", ";}" ], v.variables.contentColorActive,
|
|
282
|
+
/* sc-sel */
|
|
283
|
+
S, v.variables.interactiveColorOverlayHover, v.variables.focusColor)
|
|
284
|
+
}), (0, v.pick)({
|
|
285
|
+
enterprise: (0, b.css)([ "background-color:", ";", "{color:", ";}" ], (0, v.pickVariant)("$appearance", {
|
|
286
|
+
default: {
|
|
287
|
+
dark: v.variables.gray30,
|
|
288
|
+
light: v.variables.gray96
|
|
289
|
+
},
|
|
290
|
+
info: v.variables.infoColorL20,
|
|
291
|
+
success: v.variables.successColorL20,
|
|
292
|
+
warning: v.variables.warningColorL20,
|
|
293
|
+
error: v.variables.errorColorL20,
|
|
294
|
+
custom: {
|
|
295
|
+
dark: v.variables.gray30,
|
|
296
|
+
light: v.variables.gray96
|
|
297
|
+
}
|
|
298
|
+
}),
|
|
299
|
+
/* sc-sel */
|
|
300
|
+
S, (function(e) {
|
|
301
|
+
var r = e.$foregroundColor;
|
|
302
|
+
return r || v.variables.linkColor;
|
|
303
|
+
})),
|
|
304
|
+
prisma: (0, b.css)([ "color:", ";", "{background-color:", ";", ";}" ], v.variables.contentColorActive,
|
|
305
|
+
/* sc-sel */
|
|
306
|
+
S, v.variables.interactiveColorOverlayHover, (function(e) {
|
|
307
|
+
var r = e.$appearance;
|
|
308
|
+
return r === "error" && (0, b.css)([ "color:", ";" ], v.variables.contentColorInverted);
|
|
309
|
+
}))
|
|
310
|
+
}), (0, v.pick)({
|
|
311
|
+
prisma: (0, b.css)([ "&:not([disabled]):active ", "{background-color:", ";}" ],
|
|
312
|
+
/* sc-sel */
|
|
313
|
+
S, v.variables.interactiveColorOverlayActive)
|
|
314
|
+
}));
|
|
315
|
+
// CONCATENATED MODULE: ./src/Chip/Chip.tsx
|
|
316
|
+
function O() {
|
|
317
|
+
O = Object.assign || function(e) {
|
|
318
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
319
|
+
var a = arguments[r];
|
|
320
|
+
for (var o in a) {
|
|
321
|
+
if (Object.prototype.hasOwnProperty.call(a, o)) {
|
|
322
|
+
e[o] = a[o];
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
return e;
|
|
327
|
+
};
|
|
328
|
+
return O.apply(this, arguments);
|
|
169
329
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
var Styled = external_styled_components_default()(StyledBasic).withConfig({
|
|
173
|
-
displayName: "ChipStyles__Styled",
|
|
174
|
-
componentId: "sc-1sd3tsh-1"
|
|
175
|
-
})(["align-items:center;"]);
|
|
176
|
-
var StyledInner = external_styled_components_default().div.withConfig({
|
|
177
|
-
displayName: "ChipStyles__StyledInner",
|
|
178
|
-
componentId: "sc-1sd3tsh-2"
|
|
179
|
-
})(["", ";"], (0,themes_namespaceObject.pick)({
|
|
180
|
-
enterprise: (0,external_styled_components_namespaceObject.css)(["display:flex;max-width:100%;"]),
|
|
181
|
-
prisma: (0,external_styled_components_namespaceObject.css)(["display:grid;max-width:100%;height:16px;column-gap:", ";", ";"], (0,themes_namespaceObject.pick)({
|
|
182
|
-
prisma: {
|
|
183
|
-
compact: themes_namespaceObject.variables.spacingXSmall,
|
|
184
|
-
comfortable: themes_namespaceObject.variables.spacingSmall
|
|
330
|
+
function _(e, r) {
|
|
331
|
+
return q(e) || E(e, r) || j(e, r) || R();
|
|
185
332
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
$removable = _ref5.$removable;
|
|
189
|
-
var gridColumns = (0,external_styled_components_namespaceObject.css)(["grid-template-columns:1fr;"]);
|
|
190
|
-
|
|
191
|
-
if ($icon && $removable) {
|
|
192
|
-
gridColumns = (0,external_styled_components_namespaceObject.css)(["grid-template-columns:0fr 1fr 0fr;"]);
|
|
193
|
-
} else if ($icon) {
|
|
194
|
-
gridColumns = (0,external_styled_components_namespaceObject.css)(["grid-template-columns:0fr 1fr;"]);
|
|
195
|
-
} else if ($removable) {
|
|
196
|
-
gridColumns = (0,external_styled_components_namespaceObject.css)(["grid-template-columns:1fr 0fr;"]);
|
|
333
|
+
function R() {
|
|
334
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
197
335
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
})(["", ";margin-right:", ";color:", ";"], (0,themes_namespaceObject.pick)({
|
|
206
|
-
prisma: {
|
|
207
|
-
compact: (0,external_styled_components_namespaceObject.css)(["font-size:14px;display:inline-flex;svg{height:16px;vertical-align:baseline;}"]),
|
|
208
|
-
comfortable: (0,external_styled_components_namespaceObject.css)(["font-size:18px;display:inline-flex;align-self:center;svg{height:16px;vertical-align:baseline;}"])
|
|
209
|
-
},
|
|
210
|
-
enterprise: (0,external_styled_components_namespaceObject.css)(["flex:0 0 auto;"])
|
|
211
|
-
}), (0,themes_namespaceObject.pick)({
|
|
212
|
-
enterprise: '3px'
|
|
213
|
-
}), (0,themes_namespaceObject.pickVariant)('$disabled', {
|
|
214
|
-
"true": themes_namespaceObject.variables.contentColorDisabled,
|
|
215
|
-
"false": {
|
|
216
|
-
enterprise: function enterprise(_ref6) {
|
|
217
|
-
var $foregroundColor = _ref6.$foregroundColor;
|
|
218
|
-
return $foregroundColor || themes_namespaceObject.variables.contentColorDefault;
|
|
219
|
-
},
|
|
220
|
-
prisma: function prisma(_ref7) {
|
|
221
|
-
var $foregroundColor = _ref7.$foregroundColor,
|
|
222
|
-
$appearance = _ref7.$appearance;
|
|
223
|
-
return $foregroundColor || ($appearance === 'error' ? themes_namespaceObject.variables.contentColorInverted : themes_namespaceObject.variables.contentColorDefault);
|
|
336
|
+
function j(e, r) {
|
|
337
|
+
if (!e) return;
|
|
338
|
+
if (typeof e === "string") return I(e, r);
|
|
339
|
+
var a = Object.prototype.toString.call(e).slice(8, -1);
|
|
340
|
+
if (a === "Object" && e.constructor) a = e.constructor.name;
|
|
341
|
+
if (a === "Map" || a === "Set") return Array.from(e);
|
|
342
|
+
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return I(e, r);
|
|
224
343
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
var
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
enterprise: (0,external_styled_components_namespaceObject.css)(["flex:0 1 auto;"])
|
|
232
|
-
}), (0,themes_namespaceObject.pickVariant)('$disabled', {
|
|
233
|
-
"true": themes_namespaceObject.variables.contentColorDisabled,
|
|
234
|
-
"false": {
|
|
235
|
-
enterprise: function enterprise(_ref8) {
|
|
236
|
-
var $appearance = _ref8.$appearance,
|
|
237
|
-
$foregroundColor = _ref8.$foregroundColor;
|
|
238
|
-
return $foregroundColor || ($appearance === 'default' || $appearance === 'outline' ? themes_namespaceObject.variables.contentColorDefault : themes_namespaceObject.variables.gray30);
|
|
239
|
-
},
|
|
240
|
-
prisma: function prisma(_ref9) {
|
|
241
|
-
var $appearance = _ref9.$appearance,
|
|
242
|
-
$foregroundColor = _ref9.$foregroundColor;
|
|
243
|
-
return $foregroundColor || ($appearance === 'error' ? themes_namespaceObject.variables.contentColorInverted : themes_namespaceObject.variables.contentColorActive);
|
|
344
|
+
function I(e, r) {
|
|
345
|
+
if (r == null || r > e.length) r = e.length;
|
|
346
|
+
for (var a = 0, o = new Array(r); a < r; a++) {
|
|
347
|
+
o[a] = e[a];
|
|
348
|
+
}
|
|
349
|
+
return o;
|
|
244
350
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
var
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
351
|
+
function E(e, r) {
|
|
352
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
|
|
353
|
+
var a = [];
|
|
354
|
+
var o = true;
|
|
355
|
+
var n = false;
|
|
356
|
+
var t = undefined;
|
|
357
|
+
try {
|
|
358
|
+
for (var i = e[Symbol.iterator](), l; !(o = (l = i.next()).done); o = true) {
|
|
359
|
+
a.push(l.value);
|
|
360
|
+
if (r && a.length === r) break;
|
|
361
|
+
}
|
|
362
|
+
} catch (e) {
|
|
363
|
+
n = true;
|
|
364
|
+
t = e;
|
|
365
|
+
} finally {
|
|
366
|
+
try {
|
|
367
|
+
if (!o && i["return"] != null) i["return"]();
|
|
368
|
+
} finally {
|
|
369
|
+
if (n) throw t;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
return a;
|
|
262
373
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
compact: '9px',
|
|
266
|
-
comfortable: '10.5px'
|
|
267
|
-
}), function (_ref11) {
|
|
268
|
-
var $disabled = _ref11.$disabled,
|
|
269
|
-
$foregroundColor = _ref11.$foregroundColor;
|
|
270
|
-
return $disabled ? themes_namespaceObject.variables.contentColorDisabled : $foregroundColor || 'inherit';
|
|
271
|
-
})
|
|
272
|
-
}));
|
|
273
|
-
var StyledClickable = external_styled_components_default()(StyledBasic.withComponent((Clickable_default()))).withConfig({
|
|
274
|
-
displayName: "ChipStyles__StyledClickable",
|
|
275
|
-
componentId: "sc-1sd3tsh-6"
|
|
276
|
-
})(["flex:0 1 auto;line-height:16px;cursor:pointer;&:focus{", ";}&:not([disabled]):hover{", ";}", ";"], (0,themes_namespaceObject.pick)({
|
|
277
|
-
enterprise: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";color:", ";"], themes_namespaceObject.variables.focusShadow, themes_namespaceObject.variables.linkColor),
|
|
278
|
-
prisma: (0,external_styled_components_namespaceObject.css)(["color:", ";", "{background-color:", ";box-shadow:0 0 0 3px ", ";}"], themes_namespaceObject.variables.contentColorActive,
|
|
279
|
-
/* sc-sel */
|
|
280
|
-
StyledRemove, themes_namespaceObject.variables.interactiveColorOverlayHover, themes_namespaceObject.variables.focusColor)
|
|
281
|
-
}), (0,themes_namespaceObject.pick)({
|
|
282
|
-
enterprise: (0,external_styled_components_namespaceObject.css)(["background-color:", ";", "{color:", ";}"], (0,themes_namespaceObject.pickVariant)('$appearance', {
|
|
283
|
-
"default": {
|
|
284
|
-
dark: themes_namespaceObject.variables.gray30,
|
|
285
|
-
light: themes_namespaceObject.variables.gray96
|
|
286
|
-
},
|
|
287
|
-
info: themes_namespaceObject.variables.infoColorL20,
|
|
288
|
-
success: themes_namespaceObject.variables.successColorL20,
|
|
289
|
-
warning: themes_namespaceObject.variables.warningColorL20,
|
|
290
|
-
error: themes_namespaceObject.variables.errorColorL20,
|
|
291
|
-
custom: {
|
|
292
|
-
dark: themes_namespaceObject.variables.gray30,
|
|
293
|
-
light: themes_namespaceObject.variables.gray96
|
|
374
|
+
function q(e) {
|
|
375
|
+
if (Array.isArray(e)) return e;
|
|
294
376
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
var
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
"data-test": "cross",
|
|
436
|
-
hideDefaultTooltip: true,
|
|
437
|
-
screenReaderText: (0,i18n_namespaceObject._)('Remove'),
|
|
438
|
-
size: 0.85
|
|
439
|
-
}) : /*#__PURE__*/external_react_default().createElement((Cross_default()), {
|
|
440
|
-
"aria-label": (0,i18n_namespaceObject._)('Remove'),
|
|
441
|
-
"data-test": "cross",
|
|
442
|
-
height: "20px",
|
|
443
|
-
width: "20px"
|
|
444
|
-
}))));
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
function ChipNonInteractive(props) {
|
|
448
|
-
var _getSharedProps3 = getSharedProps(props),
|
|
449
|
-
_getSharedProps4 = _slicedToArray(_getSharedProps3, 2),
|
|
450
|
-
sharedProps = _getSharedProps4[0],
|
|
451
|
-
ownProps = _getSharedProps4[1];
|
|
452
|
-
|
|
453
|
-
var $appearance = sharedProps.$appearance,
|
|
454
|
-
$foregroundColor = sharedProps.$foregroundColor,
|
|
455
|
-
disabled = sharedProps.disabled,
|
|
456
|
-
icon = sharedProps.icon,
|
|
457
|
-
otherSharedProps = _objectWithoutProperties(sharedProps, ["$appearance", "$foregroundColor", "disabled", "icon"]);
|
|
458
|
-
|
|
459
|
-
var children = ownProps.children,
|
|
460
|
-
elementRef = ownProps.elementRef,
|
|
461
|
-
otherProps = _objectWithoutProperties(ownProps, ["children", "elementRef"]);
|
|
462
|
-
|
|
463
|
-
return /*#__PURE__*/external_react_default().createElement(Styled, _extends({
|
|
464
|
-
$appearance: $appearance,
|
|
465
|
-
$disabled: disabled,
|
|
466
|
-
ref: elementRef
|
|
467
|
-
}, otherSharedProps, omit_default()(otherProps, Object.keys(propTypes))), /*#__PURE__*/external_react_default().createElement(StyledInner, {
|
|
468
|
-
$icon: !!icon,
|
|
469
|
-
$removable: false
|
|
470
|
-
}, icon && /*#__PURE__*/external_react_default().createElement(StyledIcon, {
|
|
471
|
-
$appearance: $appearance,
|
|
472
|
-
$disabled: disabled,
|
|
473
|
-
$foregroundColor: $foregroundColor
|
|
474
|
-
}, icon), /*#__PURE__*/external_react_default().createElement(StyledLabel, {
|
|
475
|
-
"data-test": "label",
|
|
476
|
-
$appearance: $appearance,
|
|
477
|
-
$disabled: disabled,
|
|
478
|
-
$foregroundColor: $foregroundColor
|
|
479
|
-
}, children)));
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
function Chip(props) {
|
|
483
|
-
// @docs-props-type ChipPropsBase
|
|
484
|
-
return isInteractive(props) ? /*#__PURE__*/external_react_default().createElement(ChipInteractive, props) : /*#__PURE__*/external_react_default().createElement(ChipNonInteractive, props);
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
Chip.propTypes = propTypes;
|
|
488
|
-
Chip.defaultProps = defaultProps;
|
|
489
|
-
/* harmony default export */ const Chip_Chip = (Chip);
|
|
490
|
-
;// CONCATENATED MODULE: ./src/Chip/index.ts
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
module.exports = __webpack_exports__;
|
|
494
|
-
/******/ })()
|
|
495
|
-
;
|
|
377
|
+
function A(e, r) {
|
|
378
|
+
if (e == null) return {};
|
|
379
|
+
var a = D(e, r);
|
|
380
|
+
var o, n;
|
|
381
|
+
if (Object.getOwnPropertySymbols) {
|
|
382
|
+
var t = Object.getOwnPropertySymbols(e);
|
|
383
|
+
for (n = 0; n < t.length; n++) {
|
|
384
|
+
o = t[n];
|
|
385
|
+
if (r.indexOf(o) >= 0) continue;
|
|
386
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, o)) continue;
|
|
387
|
+
a[o] = e[o];
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
return a;
|
|
391
|
+
}
|
|
392
|
+
function D(e, r) {
|
|
393
|
+
if (e == null) return {};
|
|
394
|
+
var a = {};
|
|
395
|
+
var o = Object.keys(e);
|
|
396
|
+
var n, t;
|
|
397
|
+
for (t = 0; t < o.length; t++) {
|
|
398
|
+
n = o[t];
|
|
399
|
+
if (r.indexOf(n) >= 0) continue;
|
|
400
|
+
a[n] = e[n];
|
|
401
|
+
}
|
|
402
|
+
return a;
|
|
403
|
+
}
|
|
404
|
+
var L = {
|
|
405
|
+
appearance: l().oneOf([ "info", "success", "warning", "error", "outline" ]),
|
|
406
|
+
backgroundColor: l().string,
|
|
407
|
+
children: l().node.isRequired,
|
|
408
|
+
disabled: l().bool,
|
|
409
|
+
elementRef: l().oneOfType([ l().func, l().object ]),
|
|
410
|
+
foregroundColor: l().string,
|
|
411
|
+
icon: l().node,
|
|
412
|
+
onRequestRemove: l().func,
|
|
413
|
+
/** Includes this value in `onRequestRemove` callbacks. */
|
|
414
|
+
value: l().any
|
|
415
|
+
};
|
|
416
|
+
var z = {
|
|
417
|
+
disabled: false
|
|
418
|
+
};
|
|
419
|
+
function N(e) {
|
|
420
|
+
return !!e.onRequestRemove;
|
|
421
|
+
}
|
|
422
|
+
function P(e) {
|
|
423
|
+
var r = e.appearance, a = e.backgroundColor, o = e.disabled, n = e.foregroundColor, t = e.icon, i = A(e, [ "appearance", "backgroundColor", "disabled", "foregroundColor", "icon" ]);
|
|
424
|
+
// Validate that the color being rendered into the CSS is restricted to only values that are of CSS type <color>.
|
|
425
|
+
var l = n && (0, f.isCSSColor)(n) ? n : undefined;
|
|
426
|
+
var s = a && (0, f.isCSSColor)(a) ? a : undefined;
|
|
427
|
+
var c = {
|
|
428
|
+
"data-test": "chip",
|
|
429
|
+
$appearance: r || (s ? "custom" : "default"),
|
|
430
|
+
$backgroundColor: s,
|
|
431
|
+
$foregroundColor: l,
|
|
432
|
+
disabled: o,
|
|
433
|
+
icon: t
|
|
434
|
+
};
|
|
435
|
+
return [ c, i ];
|
|
436
|
+
}
|
|
437
|
+
function T(e) {
|
|
438
|
+
var r = P(e), n = _(r, 2), i = n[0], l = n[1];
|
|
439
|
+
var s = i.$appearance, p = i.$foregroundColor, f = i.disabled, b = i.icon, g = A(i, [ "$appearance", "$foregroundColor", "disabled", "icon" ]);
|
|
440
|
+
var m = l.children, h = l.elementRef, C = l.onRequestRemove, y = l.value, R = A(l, [ "children", "elementRef", "onRequestRemove", "value" ]);
|
|
441
|
+
var j = (0, v.useSplunkTheme)(), I = j.isEnterprise;
|
|
442
|
+
var E = (0, a.useCallback)((function(e) {
|
|
443
|
+
C(e, {
|
|
444
|
+
value: y
|
|
445
|
+
});
|
|
446
|
+
}), [ C, y ]);
|
|
447
|
+
|
|
448
|
+
return o().createElement(w, O({
|
|
449
|
+
$appearance: s,
|
|
450
|
+
$disabled: f,
|
|
451
|
+
$foregroundColor: p,
|
|
452
|
+
"data-test-value": y,
|
|
453
|
+
disabled: f,
|
|
454
|
+
elementRef: h,
|
|
455
|
+
onClick: E
|
|
456
|
+
}, g, t()(R, Object.keys(L))), o().createElement(x, {
|
|
457
|
+
$icon: !!b,
|
|
458
|
+
$removable: true
|
|
459
|
+
}, b && o().createElement($, {
|
|
460
|
+
$appearance: s,
|
|
461
|
+
$disabled: f,
|
|
462
|
+
$foregroundColor: p
|
|
463
|
+
}, b), o().createElement(k, {
|
|
464
|
+
"data-test": "label",
|
|
465
|
+
$appearance: s,
|
|
466
|
+
$disabled: f,
|
|
467
|
+
$foregroundColor: p
|
|
468
|
+
}, m), o().createElement(S, {
|
|
469
|
+
$appearance: s,
|
|
470
|
+
$disabled: f,
|
|
471
|
+
$foregroundColor: p
|
|
472
|
+
}, I ? o().createElement(u(), {
|
|
473
|
+
"data-test": "cross",
|
|
474
|
+
hideDefaultTooltip: true,
|
|
475
|
+
screenReaderText: (0, d._)("Remove"),
|
|
476
|
+
size: .85
|
|
477
|
+
}) : o().createElement(c(), {
|
|
478
|
+
"aria-label": (0, d._)("Remove"),
|
|
479
|
+
"data-test": "cross",
|
|
480
|
+
height: "20px",
|
|
481
|
+
width: "20px"
|
|
482
|
+
}))));
|
|
483
|
+
}
|
|
484
|
+
function H(e) {
|
|
485
|
+
var r = P(e), a = _(r, 2), n = a[0], i = a[1];
|
|
486
|
+
var l = n.$appearance, s = n.$foregroundColor, c = n.disabled, p = n.icon, u = A(n, [ "$appearance", "$foregroundColor", "disabled", "icon" ]);
|
|
487
|
+
var d = i.children, f = i.elementRef, v = A(i, [ "children", "elementRef" ]);
|
|
488
|
+
|
|
489
|
+
return o().createElement(y, O({
|
|
490
|
+
$appearance: l,
|
|
491
|
+
$disabled: c,
|
|
492
|
+
ref: f
|
|
493
|
+
}, u, t()(v, Object.keys(L))), o().createElement(x, {
|
|
494
|
+
$icon: !!p,
|
|
495
|
+
$removable: false
|
|
496
|
+
}, p && o().createElement($, {
|
|
497
|
+
$appearance: l,
|
|
498
|
+
$disabled: c,
|
|
499
|
+
$foregroundColor: s
|
|
500
|
+
}, p), o().createElement(k, {
|
|
501
|
+
"data-test": "label",
|
|
502
|
+
$appearance: l,
|
|
503
|
+
$disabled: c,
|
|
504
|
+
$foregroundColor: s
|
|
505
|
+
}, d)));
|
|
506
|
+
}
|
|
507
|
+
function B(e) {
|
|
508
|
+
// @docs-props-type ChipPropsBase
|
|
509
|
+
return N(e) ? o().createElement(T, e) : o().createElement(H, e);
|
|
510
|
+
}
|
|
511
|
+
B.propTypes = L;
|
|
512
|
+
B.defaultProps = z;
|
|
513
|
+
/* harmony default export */ const V = B;
|
|
514
|
+
// CONCATENATED MODULE: ./src/Chip/index.ts
|
|
515
|
+
module.exports = r;
|
|
516
|
+
/******/})();
|