@splunk/react-ui 4.35.0 → 4.36.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/CHANGELOG.md +19 -3
- package/Calendar.js +2 -2
- package/CollapsiblePanel.js +1 -1
- package/ComboBox.js +2 -2
- package/ControlGroup.js +48 -49
- package/FormRows.js +2 -2
- package/JSONTree.js +260 -227
- package/MIGRATION.mdx +17 -0
- package/Modal.js +1 -1
- package/Multiselect.js +28 -10
- package/Paginator.js +1 -1
- package/RadioBar.js +157 -191
- package/Resize.js +133 -113
- package/Slider.js +9 -3
- package/StaticContent.js +48 -46
- package/TabBar.js +125 -110
- package/package.json +2 -1
- package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -0
- package/types/src/ComboBox/ComboBox.d.ts +8 -4
- package/types/src/ControlGroup/ControlGroup.d.ts +9 -5
- package/types/src/JSONTree/JSONTreeItem.d.ts +2 -2
- package/types/src/JSONTree/renderTreeItems.d.ts +2 -2
- package/types/src/Multiselect/Normal.d.ts +1 -0
- package/types/src/RadioBar/RadioBarContext.d.ts +1 -1
- package/types/src/Resize/Resize.d.ts +4 -2
- package/types/src/StaticContent/StaticContent.d.ts +4 -1
package/Resize.js
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
e.r(t);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(t, {
|
|
64
|
-
default: () => /* reexport */
|
|
64
|
+
default: () => /* reexport */ U
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
67
|
const r = require("react");
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
const a = require("lodash/keys");
|
|
74
74
|
var s = e.n(a);
|
|
75
75
|
// CONCATENATED MODULE: external "lodash/omit"
|
|
76
|
-
const
|
|
77
|
-
var
|
|
76
|
+
const c = require("lodash/omit");
|
|
77
|
+
var l = e.n(c);
|
|
78
78
|
// CONCATENATED MODULE: external "@splunk/react-ui/EventListener"
|
|
79
79
|
const u = require("@splunk/react-ui/EventListener");
|
|
80
80
|
var d = e.n(u);
|
|
@@ -89,86 +89,104 @@
|
|
|
89
89
|
const y = require("styled-components");
|
|
90
90
|
var w = e.n(y);
|
|
91
91
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
92
|
-
const
|
|
92
|
+
const b = require("@splunk/themes");
|
|
93
93
|
// CONCATENATED MODULE: ./src/Resize/ResizeStyles.ts
|
|
94
|
-
var
|
|
94
|
+
var m = "9px";
|
|
95
95
|
var g = "14px";
|
|
96
96
|
var S = "3px";
|
|
97
|
-
var
|
|
98
|
-
var
|
|
97
|
+
var k = "11px";
|
|
98
|
+
var x = w().div.withConfig({
|
|
99
99
|
displayName: "ResizeStyles__Styled",
|
|
100
100
|
componentId: "sc-181mwes-0"
|
|
101
|
-
})([ "", ";position:relative;overflow-x:hidden;overflow-y:hidden;" ],
|
|
102
|
-
var
|
|
101
|
+
})([ "", ";position:relative;overflow-x:hidden;overflow-y:hidden;" ], b.mixins.reset("block"));
|
|
102
|
+
var z = w().div.withConfig({
|
|
103
103
|
displayName: "ResizeStyles__StyledBorder",
|
|
104
104
|
componentId: "sc-181mwes-1"
|
|
105
|
-
})([ "", ";height:100%;width:100%;border:0 solid ", ";", " ", " ", " ", "" ],
|
|
106
|
-
|
|
107
|
-
prisma:
|
|
105
|
+
})([ "", ";height:100%;width:100%;border:0 solid ", ";", " ", " ", " ", "" ], b.mixins.reset("block"), (0,
|
|
106
|
+
b.pick)({
|
|
107
|
+
prisma: b.variables.interactiveColorBackground,
|
|
108
108
|
enterprise: {
|
|
109
|
-
dark:
|
|
110
|
-
light:
|
|
109
|
+
dark: b.variables.gray22,
|
|
110
|
+
light: b.variables.white
|
|
111
111
|
}
|
|
112
112
|
}), (function(e) {
|
|
113
113
|
var t = e.$borderSides;
|
|
114
|
-
return t.n && (0, y.css)([ "border-top-width:", ";" ],
|
|
114
|
+
return t.n && (0, y.css)([ "border-top-width:", ";" ], m);
|
|
115
115
|
}), (function(e) {
|
|
116
116
|
var t = e.$borderSides;
|
|
117
|
-
return t.e && (0, y.css)([ "border-right-width:", ";" ],
|
|
117
|
+
return t.e && (0, y.css)([ "border-right-width:", ";" ], m);
|
|
118
118
|
}), (function(e) {
|
|
119
119
|
var t = e.$borderSides;
|
|
120
|
-
return t.s && (0, y.css)([ "border-bottom-width:", ";" ],
|
|
120
|
+
return t.s && (0, y.css)([ "border-bottom-width:", ";" ], m);
|
|
121
121
|
}), (function(e) {
|
|
122
122
|
var t = e.$borderSides;
|
|
123
|
-
return t.w && (0, y.css)([ "border-left-width:", ";" ],
|
|
123
|
+
return t.w && (0, y.css)([ "border-left-width:", ";" ], m);
|
|
124
124
|
}));
|
|
125
|
-
var
|
|
125
|
+
var R = w().svg.withConfig({
|
|
126
126
|
displayName: "ResizeStyles__StyledCornerSvg",
|
|
127
127
|
componentId: "sc-181mwes-2"
|
|
128
128
|
})([ "display:block;stroke:currentColor;" ]);
|
|
129
|
-
var
|
|
129
|
+
var _ = w().path.withConfig({
|
|
130
130
|
displayName: "ResizeStyles__StyledCornerPath",
|
|
131
131
|
componentId: "sc-181mwes-3"
|
|
132
132
|
})([ "stroke-width:1.1px;" ]);
|
|
133
|
-
var
|
|
133
|
+
var O = w().svg.withConfig({
|
|
134
134
|
displayName: "ResizeStyles__StyledSideSvg",
|
|
135
135
|
componentId: "sc-181mwes-4"
|
|
136
136
|
})([ "display:block;fill:currentColor;" ]);
|
|
137
|
-
var D = (0, y.css)([ "", ";color:", ";&:hover,&:focus{color:", ";}", "" ],
|
|
138
|
-
|
|
139
|
-
prisma:
|
|
137
|
+
var D = (0, y.css)([ "", ";color:", ";&:hover,&:focus{color:", ";", "}", "" ], b.mixins.reset("block"), (0,
|
|
138
|
+
b.pick)({
|
|
139
|
+
prisma: b.variables.contentColorDefault,
|
|
140
140
|
enterprise: {
|
|
141
|
-
dark:
|
|
142
|
-
light:
|
|
141
|
+
dark: b.variables.gray92,
|
|
142
|
+
light: b.variables.borderColor
|
|
143
143
|
}
|
|
144
|
-
}), (0,
|
|
145
|
-
prisma:
|
|
146
|
-
enterprise:
|
|
144
|
+
}), (0, b.pick)({
|
|
145
|
+
prisma: b.variables.interactiveColorPrimary,
|
|
146
|
+
enterprise: b.variables.linkColor
|
|
147
|
+
}), (function(e) {
|
|
148
|
+
var t = e.$isSeparator, r = e.$cardinalDirection;
|
|
149
|
+
var n = [ "n", "e", "w", "s" ].includes(r);
|
|
150
|
+
return t && n && (0, y.css)([ "background-color:", ";&:active{background-color:", ";}" ], b.variables.borderColorWeak, b.variables.borderColorStrong);
|
|
147
151
|
}), (function(e) {
|
|
148
152
|
var t = e.$showHandles;
|
|
149
153
|
return t === "on-hover" && (0, y.css)([ "opacity:0;transition:opacity 200ms;", ":hover > div > &,&:focus{opacity:1;}" ],
|
|
150
154
|
/* sc-sel */
|
|
151
|
-
|
|
155
|
+
x);
|
|
156
|
+
}));
|
|
157
|
+
var E = (0, y.css)([ "", ";width:", ";height:", ";position:absolute;background-clip:content-box;z-index:2;" ], D, k, k);
|
|
158
|
+
var C = (0, y.css)([ "height:100%;" ]);
|
|
159
|
+
var j = (0, y.css)([ "width:100%;display:flex;justify-content:center;" ]);
|
|
160
|
+
var $ = (0, y.css)([ "", ";position:absolute;z-index:1;", "" ], D, (function(e) {
|
|
161
|
+
var t = e.$isSeparator;
|
|
162
|
+
return t && (0, b.pickVariant)("$cardinalDirection", {
|
|
163
|
+
n: j,
|
|
164
|
+
s: j,
|
|
165
|
+
e: C,
|
|
166
|
+
w: C
|
|
167
|
+
});
|
|
152
168
|
}));
|
|
153
|
-
var
|
|
154
|
-
|
|
155
|
-
|
|
169
|
+
var q = function e(t) {
|
|
170
|
+
var r = t.$isSeparator;
|
|
171
|
+
return r ? "0" : "calc(50% - ".concat(g, " / 2)");
|
|
172
|
+
};
|
|
173
|
+
var P = w().button.withConfig({
|
|
156
174
|
displayName: "ResizeStyles__StyledResize",
|
|
157
175
|
componentId: "sc-181mwes-5"
|
|
158
|
-
})([ "", "" ], (0,
|
|
176
|
+
})([ "", "" ], (0, b.pickVariant)("$cardinalDirection", {
|
|
159
177
|
nw: (0, y.css)([ "", ";top:0;left:0;cursor:nwse-resize;> ", "{transform:rotate(180deg);}" ], E,
|
|
160
178
|
/* sc-sel */
|
|
161
|
-
|
|
162
|
-
n: (0, y.css)([ "", ";cursor:ns-resize;top:0;left:
|
|
179
|
+
R),
|
|
180
|
+
n: (0, y.css)([ "", ";cursor:ns-resize;top:0;left:", ";padding:", " 0;" ], $, q, S),
|
|
163
181
|
ne: (0, y.css)([ "", ";right:0;top:0;cursor:nesw-resize;> ", "{transform:rotate(-90deg);}" ], E,
|
|
164
182
|
/* sc-sel */
|
|
165
|
-
|
|
166
|
-
w: (0, y.css)([ "", ";cursor:ew-resize;padding:0 ", ";left:0;top:
|
|
167
|
-
e: (0, y.css)([ "", ";cursor:ew-resize;padding:0 ", ";right:0;top:
|
|
183
|
+
R),
|
|
184
|
+
w: (0, y.css)([ "", ";cursor:ew-resize;padding:0 ", ";left:0;top:", ";" ], $, S, q),
|
|
185
|
+
e: (0, y.css)([ "", ";cursor:ew-resize;padding:0 ", ";right:0;top:", ";" ], $, S, q),
|
|
168
186
|
sw: (0, y.css)([ "", ";left:0;bottom:0;cursor:nesw-resize;> ", "{transform:rotate(90deg);}" ], E,
|
|
169
187
|
/* sc-sel */
|
|
170
|
-
|
|
171
|
-
s: (0, y.css)([ "", ";cursor:ns-resize;padding:", " 0;bottom:0;left:
|
|
188
|
+
R),
|
|
189
|
+
s: (0, y.css)([ "", ";cursor:ns-resize;padding:", " 0;bottom:0;left:", ";" ], $, S, q),
|
|
172
190
|
se: (0, y.css)([ "", ";right:0;bottom:0;cursor:nwse-resize;" ], E)
|
|
173
191
|
}));
|
|
174
192
|
// CONCATENATED MODULE: ./src/utils/updateReactRef.ts
|
|
@@ -178,7 +196,7 @@
|
|
|
178
196
|
* @param ref - The React callback or object ref. Can be `null` or `undefined`.
|
|
179
197
|
* @param current - The new value of the ref.
|
|
180
198
|
*/
|
|
181
|
-
function
|
|
199
|
+
function H(e, t) {
|
|
182
200
|
if (e) {
|
|
183
201
|
if (typeof e === "function") {
|
|
184
202
|
e(t);
|
|
@@ -191,21 +209,21 @@
|
|
|
191
209
|
}
|
|
192
210
|
}
|
|
193
211
|
// CONCATENATED MODULE: ./src/Resize/Resize.tsx
|
|
194
|
-
function
|
|
212
|
+
function I(e) {
|
|
195
213
|
"@babel/helpers - typeof";
|
|
196
214
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
197
|
-
|
|
215
|
+
I = function e(t) {
|
|
198
216
|
return typeof t;
|
|
199
217
|
};
|
|
200
218
|
} else {
|
|
201
|
-
|
|
219
|
+
I = function e(t) {
|
|
202
220
|
return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
203
221
|
};
|
|
204
222
|
}
|
|
205
|
-
return
|
|
223
|
+
return I(e);
|
|
206
224
|
}
|
|
207
|
-
function
|
|
208
|
-
|
|
225
|
+
function T() {
|
|
226
|
+
T = Object.assign || function(e) {
|
|
209
227
|
for (var t = 1; t < arguments.length; t++) {
|
|
210
228
|
var r = arguments[t];
|
|
211
229
|
for (var n in r) {
|
|
@@ -216,14 +234,14 @@
|
|
|
216
234
|
}
|
|
217
235
|
return e;
|
|
218
236
|
};
|
|
219
|
-
return
|
|
237
|
+
return T.apply(this, arguments);
|
|
220
238
|
}
|
|
221
|
-
function
|
|
239
|
+
function M(e, t) {
|
|
222
240
|
if (!(e instanceof t)) {
|
|
223
241
|
throw new TypeError("Cannot call a class as a function");
|
|
224
242
|
}
|
|
225
243
|
}
|
|
226
|
-
function
|
|
244
|
+
function N(e, t) {
|
|
227
245
|
for (var r = 0; r < t.length; r++) {
|
|
228
246
|
var n = t[r];
|
|
229
247
|
n.enumerable = n.enumerable || false;
|
|
@@ -232,12 +250,12 @@
|
|
|
232
250
|
Object.defineProperty(e, n.key, n);
|
|
233
251
|
}
|
|
234
252
|
}
|
|
235
|
-
function
|
|
236
|
-
if (t)
|
|
237
|
-
if (r)
|
|
253
|
+
function B(e, t, r) {
|
|
254
|
+
if (t) N(e.prototype, t);
|
|
255
|
+
if (r) N(e, r);
|
|
238
256
|
return e;
|
|
239
257
|
}
|
|
240
|
-
function
|
|
258
|
+
function K(e, t) {
|
|
241
259
|
if (typeof t !== "function" && t !== null) {
|
|
242
260
|
throw new TypeError("Super expression must either be null or a function");
|
|
243
261
|
}
|
|
@@ -248,41 +266,41 @@
|
|
|
248
266
|
configurable: true
|
|
249
267
|
}
|
|
250
268
|
});
|
|
251
|
-
if (t)
|
|
269
|
+
if (t) L(e, t);
|
|
252
270
|
}
|
|
253
|
-
function
|
|
254
|
-
|
|
271
|
+
function L(e, t) {
|
|
272
|
+
L = Object.setPrototypeOf || function e(t, r) {
|
|
255
273
|
t.__proto__ = r;
|
|
256
274
|
return t;
|
|
257
275
|
};
|
|
258
|
-
return
|
|
276
|
+
return L(e, t);
|
|
259
277
|
}
|
|
260
|
-
function
|
|
261
|
-
var t =
|
|
278
|
+
function W(e) {
|
|
279
|
+
var t = V();
|
|
262
280
|
return function r() {
|
|
263
|
-
var n =
|
|
281
|
+
var n = A(e), o;
|
|
264
282
|
if (t) {
|
|
265
|
-
var i =
|
|
283
|
+
var i = A(this).constructor;
|
|
266
284
|
o = Reflect.construct(n, arguments, i);
|
|
267
285
|
} else {
|
|
268
286
|
o = n.apply(this, arguments);
|
|
269
287
|
}
|
|
270
|
-
return
|
|
288
|
+
return X(this, o);
|
|
271
289
|
};
|
|
272
290
|
}
|
|
273
|
-
function
|
|
274
|
-
if (t && (
|
|
291
|
+
function X(e, t) {
|
|
292
|
+
if (t && (I(t) === "object" || typeof t === "function")) {
|
|
275
293
|
return t;
|
|
276
294
|
}
|
|
277
|
-
return
|
|
295
|
+
return Y(e);
|
|
278
296
|
}
|
|
279
|
-
function
|
|
297
|
+
function Y(e) {
|
|
280
298
|
if (e === void 0) {
|
|
281
299
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
282
300
|
}
|
|
283
301
|
return e;
|
|
284
302
|
}
|
|
285
|
-
function
|
|
303
|
+
function V() {
|
|
286
304
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
287
305
|
if (Reflect.construct.sham) return false;
|
|
288
306
|
if (typeof Proxy === "function") return true;
|
|
@@ -293,13 +311,13 @@
|
|
|
293
311
|
return false;
|
|
294
312
|
}
|
|
295
313
|
}
|
|
296
|
-
function
|
|
297
|
-
|
|
314
|
+
function A(e) {
|
|
315
|
+
A = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
|
|
298
316
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
299
317
|
};
|
|
300
|
-
return
|
|
318
|
+
return A(e);
|
|
301
319
|
}
|
|
302
|
-
function
|
|
320
|
+
function F(e, t, r) {
|
|
303
321
|
if (t in e) {
|
|
304
322
|
Object.defineProperty(e, t, {
|
|
305
323
|
value: r,
|
|
@@ -312,8 +330,8 @@
|
|
|
312
330
|
}
|
|
313
331
|
return e;
|
|
314
332
|
}
|
|
315
|
-
var
|
|
316
|
-
appearance: i().oneOf([ "border", "overlay" ]),
|
|
333
|
+
var G = {
|
|
334
|
+
appearance: i().oneOf([ "border", "overlay", "separator" ]),
|
|
317
335
|
children: i().node,
|
|
318
336
|
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
319
337
|
keyIncrement: i().number,
|
|
@@ -321,28 +339,28 @@
|
|
|
321
339
|
resizeHandles: i().arrayOf(i().oneOf([ "nw", "n", "ne", "w", "e", "sw", "s", "se" ])).isRequired,
|
|
322
340
|
showHandles: i().oneOf([ "always", "on-hover" ])
|
|
323
341
|
};
|
|
324
|
-
var
|
|
342
|
+
var J = {
|
|
325
343
|
appearance: "overlay",
|
|
326
344
|
keyIncrement: 10,
|
|
327
345
|
showHandles: "always"
|
|
328
346
|
};
|
|
329
347
|
/**
|
|
330
348
|
* Resize is a utility container with drag handles for resizing.
|
|
331
|
-
*/ var
|
|
332
|
-
|
|
333
|
-
var t =
|
|
349
|
+
*/ var Q = function(e) {
|
|
350
|
+
K(r, e);
|
|
351
|
+
var t = W(r);
|
|
334
352
|
// @docs-props-type ResizePropsBase
|
|
335
353
|
function r(e) {
|
|
336
354
|
var o;
|
|
337
|
-
|
|
355
|
+
M(this, r);
|
|
338
356
|
o = t.call(this, e);
|
|
339
|
-
Y(
|
|
357
|
+
F(Y(o), "handleMount", (function(e) {
|
|
340
358
|
o.setState({
|
|
341
359
|
el: e
|
|
342
360
|
});
|
|
343
|
-
|
|
361
|
+
H(o.props.elementRef, e);
|
|
344
362
|
}));
|
|
345
|
-
Y(
|
|
363
|
+
F(Y(o), "handleDragStart", (function(e, t) {
|
|
346
364
|
if (e.button > 0) {
|
|
347
365
|
return;
|
|
348
366
|
}
|
|
@@ -359,14 +377,14 @@
|
|
|
359
377
|
};
|
|
360
378
|
}));
|
|
361
379
|
}));
|
|
362
|
-
Y(
|
|
380
|
+
F(Y(o), "handleDragEnd", (function() {
|
|
363
381
|
o.setState({
|
|
364
382
|
dragDirection: undefined
|
|
365
383
|
});
|
|
366
384
|
}));
|
|
367
|
-
Y(
|
|
368
|
-
var t = o.state, r = t.dragDirection, n = t.startWidth, i = n === void 0 ? 0 : n, a = t.startHeight, s = a === void 0 ? 0 : a,
|
|
369
|
-
var f = (r === null || r === void 0 ? void 0 : r.match(/(w|e)$/)) ? e.clientX -
|
|
385
|
+
F(Y(o), "handleDrag", (function(e) {
|
|
386
|
+
var t = o.state, r = t.dragDirection, n = t.startWidth, i = n === void 0 ? 0 : n, a = t.startHeight, s = a === void 0 ? 0 : a, c = t.startX, l = c === void 0 ? 0 : c, u = t.startY, d = u === void 0 ? 0 : u;
|
|
387
|
+
var f = (r === null || r === void 0 ? void 0 : r.match(/(w|e)$/)) ? e.clientX - l : 0;
|
|
370
388
|
var p = (r === null || r === void 0 ? void 0 : r.match(/^(s|n)/)) ? e.clientY - d : 0;
|
|
371
389
|
var h = {
|
|
372
390
|
width: (r === null || r === void 0 ? void 0 : r.match(/w$/)) ? i - f : i + f,
|
|
@@ -374,7 +392,7 @@
|
|
|
374
392
|
};
|
|
375
393
|
o.props.onRequestResize(e, h);
|
|
376
394
|
}));
|
|
377
|
-
Y(
|
|
395
|
+
F(Y(o), "handleKeyDown", (function(e, t) {
|
|
378
396
|
var r = o.props.keyIncrement;
|
|
379
397
|
var n = (0, v.keycode)(e.nativeEvent);
|
|
380
398
|
var i = t.slice(-1);
|
|
@@ -389,8 +407,8 @@
|
|
|
389
407
|
}
|
|
390
408
|
};
|
|
391
409
|
var s = (i === "e" || i === "w") && (n === "right" || n === "left") ? a[i][n] : 0;
|
|
392
|
-
var
|
|
393
|
-
var
|
|
410
|
+
var c = t.charAt(0);
|
|
411
|
+
var l = {
|
|
394
412
|
n: {
|
|
395
413
|
down: -1,
|
|
396
414
|
up: 1
|
|
@@ -400,7 +418,7 @@
|
|
|
400
418
|
up: -1
|
|
401
419
|
}
|
|
402
420
|
};
|
|
403
|
-
var u = (
|
|
421
|
+
var u = (c === "n" || c === "s") && (n === "up" || n === "down") ? l[c][n] : 0;
|
|
404
422
|
if ((s || u) && o.state.el) {
|
|
405
423
|
e.preventDefault();
|
|
406
424
|
var d = {
|
|
@@ -410,20 +428,20 @@
|
|
|
410
428
|
o.props.onRequestResize(e, d);
|
|
411
429
|
}
|
|
412
430
|
}));
|
|
413
|
-
Y(
|
|
414
|
-
var t = o.props.showHandles;
|
|
415
|
-
var
|
|
416
|
-
var
|
|
417
|
-
if (
|
|
418
|
-
|
|
431
|
+
F(Y(o), "renderHandle", (function(e) {
|
|
432
|
+
var t = o.props, i = t.showHandles, a = t.appearance;
|
|
433
|
+
var s = e.length > 1;
|
|
434
|
+
var c;
|
|
435
|
+
if (s) {
|
|
436
|
+
c = n().createElement(R, {
|
|
419
437
|
viewBox: "0 0 11 11",
|
|
420
438
|
width: "11px",
|
|
421
439
|
height: "11px"
|
|
422
|
-
}, n().createElement(
|
|
440
|
+
}, n().createElement(_, {
|
|
423
441
|
d: "M0 8 L 8 0 M4 8 L 8 4"
|
|
424
442
|
}));
|
|
425
443
|
} else if (e === "n" || e === "s") {
|
|
426
|
-
|
|
444
|
+
c = n().createElement(O, {
|
|
427
445
|
viewBox: "0 0 14 3",
|
|
428
446
|
width: "14px",
|
|
429
447
|
height: "3px"
|
|
@@ -439,7 +457,7 @@
|
|
|
439
457
|
y: "2"
|
|
440
458
|
}));
|
|
441
459
|
} else if (e === "e" || e === "w") {
|
|
442
|
-
|
|
460
|
+
c = n().createElement(O, {
|
|
443
461
|
viewBox: "0 0 3 14",
|
|
444
462
|
width: "3px",
|
|
445
463
|
height: "14px"
|
|
@@ -456,18 +474,20 @@
|
|
|
456
474
|
}));
|
|
457
475
|
}
|
|
458
476
|
|
|
459
|
-
return n().createElement(
|
|
477
|
+
return n().createElement(P, {
|
|
460
478
|
key: e,
|
|
461
479
|
"data-test": "resize-handle-".concat(e),
|
|
462
480
|
onMouseDown: o["handleDragStart".concat(e)],
|
|
463
481
|
onKeyDown: o["handleKeyDown".concat(e)],
|
|
464
|
-
$showHandles:
|
|
465
|
-
$cardinalDirection: e
|
|
466
|
-
|
|
482
|
+
$showHandles: i,
|
|
483
|
+
$cardinalDirection: e,
|
|
484
|
+
$isSeparator: a === "separator"
|
|
485
|
+
}, c, n().createElement(p(), null, r.handleLabels[e]));
|
|
467
486
|
}));
|
|
468
487
|
o.state = {
|
|
469
488
|
el: null
|
|
470
489
|
};
|
|
490
|
+
if (false) {}
|
|
471
491
|
// Generate handlers for each direction.
|
|
472
492
|
r.handleOrder.forEach((function(e) {
|
|
473
493
|
// @ts-expect-error - dynamic function creation
|
|
@@ -481,11 +501,11 @@
|
|
|
481
501
|
}));
|
|
482
502
|
return o;
|
|
483
503
|
}
|
|
484
|
-
|
|
504
|
+
B(r, [ {
|
|
485
505
|
key: "render",
|
|
486
506
|
value: function e() {
|
|
487
507
|
var t = this.props, o = t.appearance, i = t.children, a = t.resizeHandles;
|
|
488
|
-
var
|
|
508
|
+
var c = this.state, u = c.dragDirection, f = c.el;
|
|
489
509
|
// Handles are inserted before and after children to optimize tab order
|
|
490
510
|
var p = r.handleOrder.slice(0, 4).filter((function(e) {
|
|
491
511
|
return a.indexOf(e) > -1;
|
|
@@ -504,10 +524,10 @@
|
|
|
504
524
|
}));
|
|
505
525
|
}
|
|
506
526
|
|
|
507
|
-
return n().createElement(
|
|
527
|
+
return n().createElement(x, T({
|
|
508
528
|
"data-test": "resize",
|
|
509
529
|
ref: this.handleMount
|
|
510
|
-
},
|
|
530
|
+
}, l()(this.props, s()(r.propTypes))), n().createElement(z, {
|
|
511
531
|
$borderSides: v
|
|
512
532
|
}, f && p, i, f && h, u && n().createElement(n().Fragment, null, n().createElement(d(), {
|
|
513
533
|
target: window,
|
|
@@ -522,10 +542,10 @@
|
|
|
522
542
|
} ]);
|
|
523
543
|
return r;
|
|
524
544
|
}(r.Component);
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
545
|
+
F(Q, "propTypes", G);
|
|
546
|
+
F(Q, "defaultProps", J);
|
|
547
|
+
F(Q, "handleOrder", [ "nw", "n", "ne", "w", "e", "sw", "s", "se" ]);
|
|
548
|
+
F(Q, "handleLabels", {
|
|
529
549
|
nw: (0, h._)("Resize northwest"),
|
|
530
550
|
n: (0, h._)("Resize north"),
|
|
531
551
|
ne: (0, h._)("Resize northeast"),
|
|
@@ -535,7 +555,7 @@
|
|
|
535
555
|
s: (0, h._)("Resize south"),
|
|
536
556
|
se: (0, h._)("Resize southeast")
|
|
537
557
|
});
|
|
538
|
-
/* harmony default export */ const
|
|
558
|
+
/* harmony default export */ const U = Q;
|
|
539
559
|
// CONCATENATED MODULE: ./src/Resize/index.ts
|
|
540
560
|
module.exports = t;
|
|
541
561
|
/******/})();
|
package/Slider.js
CHANGED
|
@@ -113,7 +113,10 @@
|
|
|
113
113
|
var O = function e(t) {
|
|
114
114
|
var r = t.$error;
|
|
115
115
|
return (0, h.pick)({
|
|
116
|
-
enterprise:
|
|
116
|
+
enterprise: {
|
|
117
|
+
light: h.variables.gray22,
|
|
118
|
+
dark: h.variables.white
|
|
119
|
+
},
|
|
117
120
|
prisma: r ? h.variables.accentColorNegative : h.variables.contentColorActive
|
|
118
121
|
});
|
|
119
122
|
};
|
|
@@ -125,7 +128,7 @@
|
|
|
125
128
|
prisma: h.variables.neutral100
|
|
126
129
|
});
|
|
127
130
|
var $ = (0, h.pick)({
|
|
128
|
-
enterprise: h.variables.
|
|
131
|
+
enterprise: h.variables.gray60,
|
|
129
132
|
prisma: h.variables.interactiveColorBorder
|
|
130
133
|
});
|
|
131
134
|
var _ = function e(t) {
|
|
@@ -177,7 +180,10 @@
|
|
|
177
180
|
enterprise: "9px",
|
|
178
181
|
prisma: "10px"
|
|
179
182
|
}), (0, h.pick)({
|
|
180
|
-
enterprise:
|
|
183
|
+
enterprise: {
|
|
184
|
+
light: h.variables.gray22,
|
|
185
|
+
dark: h.variables.white
|
|
186
|
+
},
|
|
181
187
|
prisma: h.variables.contentColorActive
|
|
182
188
|
}), (0, h.pick)({
|
|
183
189
|
enterprise: "6px",
|