@splunk/react-ui 4.37.0 → 4.39.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 +131 -153
- package/Anchor.js +50 -58
- package/Animation.js +64 -59
- package/AnimationToggle.js +59 -61
- package/Box.js +59 -67
- package/Breadcrumbs.js +113 -127
- package/Button.js +208 -219
- package/ButtonGroup.js +41 -49
- package/ButtonSimple.js +264 -295
- package/CHANGELOG.md +50 -1
- package/Calendar.js +353 -414
- package/Card.js +183 -243
- package/CardLayout.js +86 -83
- package/Chip.js +104 -122
- package/Clickable.js +180 -198
- package/CloseButton.js +52 -60
- package/Code.js +24 -31
- package/CollapsiblePanel.js +172 -202
- package/Color.js +1107 -980
- package/ColumnLayout.js +72 -96
- package/ComboBox.js +267 -305
- package/Concertina.js +406 -454
- package/ControlGroup.js +165 -194
- package/Date.js +116 -131
- package/DefinitionList.js +125 -149
- package/Divider.js +81 -79
- package/Dropdown.js +226 -237
- package/DualListbox.js +150 -186
- package/EventListener.js +4 -1
- package/File.js +1032 -955
- package/FormRows.js +281 -334
- package/Heading.js +27 -35
- package/Image.js +101 -116
- package/JSONTree.js +301 -344
- package/Layer.js +118 -126
- package/Link.js +141 -159
- package/List.js +61 -77
- package/MIGRATION.mdx +92 -38
- package/Markdown.js +288 -347
- package/Menu.js +512 -530
- package/Message.js +173 -196
- package/MessageBar.js +58 -66
- package/Modal.js +241 -290
- package/ModalLayer.js +130 -148
- package/Monogram.js +138 -138
- package/Multiselect.js +1600 -1923
- package/Number.js +159 -178
- package/Paginator.js +296 -335
- package/Paragraph.js +24 -32
- package/Popover.js +448 -441
- package/Progress.js +65 -75
- package/RadioBar.js +301 -303
- package/RadioList.js +77 -119
- package/Resize.js +105 -127
- package/ResultsMenu.js +373 -385
- package/ScreenReaderContent.js +130 -94
- package/Scroll.js +209 -244
- package/Search.js +375 -384
- package/Select.js +1076 -1354
- package/SidePanel.js +122 -142
- package/Slider.js +192 -222
- package/SlidingPanels.js +238 -270
- package/SplitButton.js +222 -245
- package/StaticContent.js +68 -76
- package/StepBar.js +206 -205
- package/Switch.js +211 -236
- package/TabBar.js +222 -258
- package/TabLayout.js +114 -139
- package/Table.js +2017 -2180
- package/Text.js +401 -512
- package/TextArea.js +411 -441
- package/Tooltip.js +116 -132
- package/TransitionOpen.js +160 -178
- package/Tree.js +268 -287
- package/Typography.js +48 -52
- package/WaitSpinner.js +60 -68
- package/cypress/support/commands.ts +9 -0
- package/cypress/support/index.d.ts +6 -0
- package/cypress/tsconfig.cypress.json +1 -0
- package/docker-compose.yml +0 -1
- package/package.json +17 -17
- package/types/src/Button/Button.d.ts +20 -6
- package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
- package/types/src/Color/Color.d.ts +5 -2
- package/types/src/Color/Palette.d.ts +6 -2
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
- package/types/src/Date/Date.d.ts +2 -3
- package/types/src/File/File.d.ts +2 -3
- package/types/src/File/Retry.d.ts +1 -2
- package/types/src/Link/Link.d.ts +3 -4
- package/types/src/Menu/Item.d.ts +24 -8
- package/types/src/Menu/Menu.d.ts +3 -3
- package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
- package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
- package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
- package/types/src/Multiselect/Option.d.ts +2 -0
- package/types/src/Number/Number.d.ts +3 -3
- package/types/src/Popover/Popover.d.ts +3 -4
- package/types/src/RadioBar/RadioBar.d.ts +2 -2
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
- package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
- package/types/src/Search/Option.d.ts +16 -3
- package/types/src/Select/Option.d.ts +3 -1
- package/types/src/Select/OptionBase.d.ts +7 -5
- package/types/src/Select/Select.d.ts +2 -2
- package/types/src/Select/SelectAllOption.d.ts +4 -4
- package/types/src/Select/SelectBase.d.ts +0 -1
- package/types/src/SidePanel/SidePanel.d.ts +1 -1
- package/types/src/Slider/Slider.d.ts +2 -3
- package/types/src/Slider/docs/examples/Error.d.ts +2 -0
- package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
- package/types/src/StepBar/Step.d.ts +1 -2
- package/types/src/TabBar/Tab.d.ts +1 -1
- package/types/src/TabBar/TabBar.d.ts +3 -1
- package/types/src/TabLayout/TabLayout.d.ts +2 -0
- package/types/src/Table/HeadDropdownCell.d.ts +2 -0
- package/types/src/Table/Table.d.ts +0 -1
- package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
- package/types/src/Text/IconOutlinedHide.d.ts +1 -2
- package/types/src/Text/IconOutlinedView.d.ts +1 -2
- package/types/src/Text/Text.d.ts +6 -4
- package/types/src/Text/docs/examples/Dimmed.d.ts +2 -0
- package/types/src/TextArea/TextArea.d.ts +2 -2
- package/types/src/Tooltip/Tooltip.d.ts +4 -4
- package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
- package/useForceUpdate.js +30 -32
- package/useKeyPress.js +1 -1
- package/types/src/Button/docs/examples/Selected.d.ts +0 -2
- package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
- package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
- package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
- package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
- package/types/src/Slider/docs/examples/prisma/Error.d.ts +0 -2
- package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
- package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
- package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
- /package/types/src/Date/docs/examples/{prisma/WithoutCalendar.d.ts → WithoutCalendar.d.ts} +0 -0
- /package/types/src/Message/docs/examples/{prisma/Title.d.ts → Title.d.ts} +0 -0
- /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
- /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
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 */ ee
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
67
|
const r = require("react");
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
var m = "9px";
|
|
95
95
|
var g = "14px";
|
|
96
96
|
var S = "3px";
|
|
97
|
-
var
|
|
98
|
-
var
|
|
97
|
+
var O = "11px";
|
|
98
|
+
var k = w().div.withConfig({
|
|
99
99
|
displayName: "ResizeStyles__Styled",
|
|
100
100
|
componentId: "sc-181mwes-0"
|
|
101
101
|
})([ "", ";position:relative;overflow-x:hidden;overflow-y:hidden;" ], b.mixins.reset("block"));
|
|
@@ -122,15 +122,15 @@
|
|
|
122
122
|
var t = e.$borderSides;
|
|
123
123
|
return t.w && (0, y.css)([ "border-left-width:", ";" ], m);
|
|
124
124
|
}));
|
|
125
|
-
var
|
|
125
|
+
var _ = w().svg.withConfig({
|
|
126
126
|
displayName: "ResizeStyles__StyledCornerSvg",
|
|
127
127
|
componentId: "sc-181mwes-2"
|
|
128
128
|
})([ "display:block;stroke:currentColor;" ]);
|
|
129
|
-
var
|
|
129
|
+
var x = w().path.withConfig({
|
|
130
130
|
displayName: "ResizeStyles__StyledCornerPath",
|
|
131
131
|
componentId: "sc-181mwes-3"
|
|
132
132
|
})([ "stroke-width:1.1px;" ]);
|
|
133
|
-
var
|
|
133
|
+
var R = w().svg.withConfig({
|
|
134
134
|
displayName: "ResizeStyles__StyledSideSvg",
|
|
135
135
|
componentId: "sc-181mwes-4"
|
|
136
136
|
})([ "display:block;fill:currentColor;" ]);
|
|
@@ -150,43 +150,35 @@
|
|
|
150
150
|
return t && n && (0, y.css)([ "background-color:", ";&:active{background-color:", ";}" ], b.variables.borderColorWeak, b.variables.borderColorStrong);
|
|
151
151
|
}), (function(e) {
|
|
152
152
|
var t = e.$showHandles;
|
|
153
|
-
return t === "on-hover" && (0, y.css)([ "opacity:0;transition:opacity 200ms;", ":hover > div > &,&:focus{opacity:1;}" ],
|
|
154
|
-
/* sc-sel */
|
|
155
|
-
x);
|
|
153
|
+
return t === "on-hover" && (0, y.css)([ "opacity:0;transition:opacity 200ms;", ":hover > div > &,&:focus{opacity:1;}" ], /* sc-sel */ k);
|
|
156
154
|
}));
|
|
157
|
-
var E = (0, y.css)([ "", ";width:", ";height:", ";position:absolute;background-clip:content-box;z-index:2;" ], D,
|
|
158
|
-
var
|
|
159
|
-
var
|
|
160
|
-
var
|
|
155
|
+
var E = (0, y.css)([ "", ";width:", ";height:", ";position:absolute;background-clip:content-box;z-index:2;" ], D, O, O);
|
|
156
|
+
var j = (0, y.css)([ "height:100%;" ]);
|
|
157
|
+
var C = (0, y.css)([ "width:100%;display:flex;justify-content:center;" ]);
|
|
158
|
+
var P = (0, y.css)([ "", ";position:absolute;z-index:1;", "" ], D, (function(e) {
|
|
161
159
|
var t = e.$isSeparator;
|
|
162
160
|
return t && (0, b.pickVariant)("$cardinalDirection", {
|
|
163
|
-
n:
|
|
164
|
-
s:
|
|
165
|
-
e:
|
|
166
|
-
w:
|
|
161
|
+
n: C,
|
|
162
|
+
s: C,
|
|
163
|
+
e: j,
|
|
164
|
+
w: j
|
|
167
165
|
});
|
|
168
166
|
}));
|
|
169
|
-
var
|
|
167
|
+
var $ = function e(t) {
|
|
170
168
|
var r = t.$isSeparator;
|
|
171
169
|
return r ? "0" : "calc(50% - ".concat(g, " / 2)");
|
|
172
170
|
};
|
|
173
|
-
var
|
|
171
|
+
var q = w().button.withConfig({
|
|
174
172
|
displayName: "ResizeStyles__StyledResize",
|
|
175
173
|
componentId: "sc-181mwes-5"
|
|
176
174
|
})([ "", "" ], (0, b.pickVariant)("$cardinalDirection", {
|
|
177
|
-
nw: (0, y.css)([ "", ";top:0;left:0;cursor:nwse-resize;> ", "{transform:rotate(180deg);}" ], E,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
/* sc-sel */
|
|
183
|
-
|
|
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),
|
|
186
|
-
sw: (0, y.css)([ "", ";left:0;bottom:0;cursor:nesw-resize;> ", "{transform:rotate(90deg);}" ], E,
|
|
187
|
-
/* sc-sel */
|
|
188
|
-
R),
|
|
189
|
-
s: (0, y.css)([ "", ";cursor:ns-resize;padding:", " 0;bottom:0;left:", ";" ], $, S, q),
|
|
175
|
+
nw: (0, y.css)([ "", ";top:0;left:0;cursor:nwse-resize;> ", "{transform:rotate(180deg);}" ], E, /* sc-sel */ _),
|
|
176
|
+
n: (0, y.css)([ "", ";cursor:ns-resize;top:0;left:", ";padding:", " 0;" ], P, $, S),
|
|
177
|
+
ne: (0, y.css)([ "", ";right:0;top:0;cursor:nesw-resize;> ", "{transform:rotate(-90deg);}" ], E, /* sc-sel */ _),
|
|
178
|
+
w: (0, y.css)([ "", ";cursor:ew-resize;padding:0 ", ";left:0;top:", ";" ], P, S, $),
|
|
179
|
+
e: (0, y.css)([ "", ";cursor:ew-resize;padding:0 ", ";right:0;top:", ";" ], P, S, $),
|
|
180
|
+
sw: (0, y.css)([ "", ";left:0;bottom:0;cursor:nesw-resize;> ", "{transform:rotate(90deg);}" ], E, /* sc-sel */ _),
|
|
181
|
+
s: (0, y.css)([ "", ";cursor:ns-resize;padding:", " 0;bottom:0;left:", ";" ], P, S, $),
|
|
190
182
|
se: (0, y.css)([ "", ";right:0;bottom:0;cursor:nwse-resize;" ], E)
|
|
191
183
|
}));
|
|
192
184
|
// CONCATENATED MODULE: ./src/utils/updateReactRef.ts
|
|
@@ -209,128 +201,114 @@
|
|
|
209
201
|
}
|
|
210
202
|
}
|
|
211
203
|
// CONCATENATED MODULE: ./src/Resize/Resize.tsx
|
|
212
|
-
function
|
|
204
|
+
function T(e) {
|
|
213
205
|
"@babel/helpers - typeof";
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
219
|
-
I = function e(t) {
|
|
220
|
-
return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
return I(e);
|
|
206
|
+
return T = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
|
|
207
|
+
return typeof e;
|
|
208
|
+
} : function(e) {
|
|
209
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
210
|
+
}, T(e);
|
|
224
211
|
}
|
|
225
|
-
function
|
|
226
|
-
|
|
212
|
+
function I() {
|
|
213
|
+
return I = Object.assign ? Object.assign.bind() : function(e) {
|
|
227
214
|
for (var t = 1; t < arguments.length; t++) {
|
|
228
215
|
var r = arguments[t];
|
|
229
216
|
for (var n in r) {
|
|
230
|
-
|
|
231
|
-
e[n] = r[n];
|
|
232
|
-
}
|
|
217
|
+
({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
233
218
|
}
|
|
234
219
|
}
|
|
235
220
|
return e;
|
|
236
|
-
};
|
|
237
|
-
return T.apply(this, arguments);
|
|
221
|
+
}, I.apply(null, arguments);
|
|
238
222
|
}
|
|
239
223
|
function M(e, t) {
|
|
240
|
-
if (!(e instanceof t))
|
|
241
|
-
throw new TypeError("Cannot call a class as a function");
|
|
242
|
-
}
|
|
224
|
+
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
243
225
|
}
|
|
244
|
-
function
|
|
226
|
+
function B(e, t) {
|
|
245
227
|
for (var r = 0; r < t.length; r++) {
|
|
246
228
|
var n = t[r];
|
|
247
|
-
n.enumerable = n.enumerable ||
|
|
248
|
-
n.
|
|
249
|
-
if ("value" in n) n.writable = true;
|
|
250
|
-
Object.defineProperty(e, n.key, n);
|
|
229
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
|
|
230
|
+
Object.defineProperty(e, G(n.key), n);
|
|
251
231
|
}
|
|
252
232
|
}
|
|
253
|
-
function
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
233
|
+
function N(e, t, r) {
|
|
234
|
+
return t && B(e.prototype, t), r && B(e, r), Object.defineProperty(e, "prototype", {
|
|
235
|
+
writable: !1
|
|
236
|
+
}), e;
|
|
257
237
|
}
|
|
258
238
|
function K(e, t) {
|
|
259
|
-
if (typeof t !== "
|
|
260
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
261
|
-
}
|
|
239
|
+
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
|
|
262
240
|
e.prototype = Object.create(t && t.prototype, {
|
|
263
241
|
constructor: {
|
|
264
242
|
value: e,
|
|
265
|
-
writable:
|
|
266
|
-
configurable:
|
|
243
|
+
writable: !0,
|
|
244
|
+
configurable: !0
|
|
267
245
|
}
|
|
268
|
-
})
|
|
269
|
-
|
|
246
|
+
}), Object.defineProperty(e, "prototype", {
|
|
247
|
+
writable: !1
|
|
248
|
+
}), t && L(e, t);
|
|
270
249
|
}
|
|
271
250
|
function L(e, t) {
|
|
272
|
-
L = Object.setPrototypeOf
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
};
|
|
276
|
-
return L(e, t);
|
|
251
|
+
return L = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
252
|
+
return e.__proto__ = t, e;
|
|
253
|
+
}, L(e, t);
|
|
277
254
|
}
|
|
278
255
|
function W(e) {
|
|
279
256
|
var t = V();
|
|
280
|
-
return function
|
|
281
|
-
var n = A(e)
|
|
257
|
+
return function() {
|
|
258
|
+
var r, n = A(e);
|
|
282
259
|
if (t) {
|
|
283
|
-
var
|
|
284
|
-
|
|
285
|
-
} else
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
return X(this, o);
|
|
260
|
+
var o = A(this).constructor;
|
|
261
|
+
r = Reflect.construct(n, arguments, o);
|
|
262
|
+
} else r = n.apply(this, arguments);
|
|
263
|
+
return X(this, r);
|
|
289
264
|
};
|
|
290
265
|
}
|
|
291
266
|
function X(e, t) {
|
|
292
|
-
if (t && (
|
|
293
|
-
|
|
294
|
-
}
|
|
267
|
+
if (t && ("object" == T(t) || "function" == typeof t)) return t;
|
|
268
|
+
if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
|
|
295
269
|
return Y(e);
|
|
296
270
|
}
|
|
297
271
|
function Y(e) {
|
|
298
|
-
if (
|
|
299
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
300
|
-
}
|
|
272
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
301
273
|
return e;
|
|
302
274
|
}
|
|
303
275
|
function V() {
|
|
304
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
305
|
-
if (Reflect.construct.sham) return false;
|
|
306
|
-
if (typeof Proxy === "function") return true;
|
|
307
276
|
try {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
return
|
|
312
|
-
}
|
|
277
|
+
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
|
|
278
|
+
} catch (e) {}
|
|
279
|
+
return (V = function t() {
|
|
280
|
+
return !!e;
|
|
281
|
+
})();
|
|
313
282
|
}
|
|
314
283
|
function A(e) {
|
|
315
|
-
A = Object.setPrototypeOf ? Object.getPrototypeOf : function
|
|
316
|
-
return
|
|
317
|
-
};
|
|
318
|
-
return A(e);
|
|
284
|
+
return A = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
285
|
+
return e.__proto__ || Object.getPrototypeOf(e);
|
|
286
|
+
}, A(e);
|
|
319
287
|
}
|
|
320
288
|
function F(e, t, r) {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
289
|
+
return (t = G(t)) in e ? Object.defineProperty(e, t, {
|
|
290
|
+
value: r,
|
|
291
|
+
enumerable: !0,
|
|
292
|
+
configurable: !0,
|
|
293
|
+
writable: !0
|
|
294
|
+
}) : e[t] = r, e;
|
|
295
|
+
}
|
|
296
|
+
function G(e) {
|
|
297
|
+
var t = J(e, "string");
|
|
298
|
+
return "symbol" == T(t) ? t : t + "";
|
|
299
|
+
}
|
|
300
|
+
function J(e, t) {
|
|
301
|
+
if ("object" != T(e) || !e) return e;
|
|
302
|
+
var r = e[Symbol.toPrimitive];
|
|
303
|
+
if (void 0 !== r) {
|
|
304
|
+
var n = r.call(e, t || "default");
|
|
305
|
+
if ("object" != T(n)) return n;
|
|
306
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
330
307
|
}
|
|
331
|
-
return e;
|
|
308
|
+
return ("string" === t ? String : Number)(e);
|
|
332
309
|
}
|
|
333
|
-
|
|
310
|
+
/** @public */
|
|
311
|
+
/** @public */ var Q = {
|
|
334
312
|
appearance: i().oneOf([ "border", "overlay", "separator" ]),
|
|
335
313
|
children: i().node,
|
|
336
314
|
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
@@ -339,14 +317,14 @@
|
|
|
339
317
|
resizeHandles: i().arrayOf(i().oneOf([ "nw", "n", "ne", "w", "e", "sw", "s", "se" ])).isRequired,
|
|
340
318
|
showHandles: i().oneOf([ "always", "on-hover" ])
|
|
341
319
|
};
|
|
342
|
-
var
|
|
320
|
+
var U = {
|
|
343
321
|
appearance: "overlay",
|
|
344
322
|
keyIncrement: 10,
|
|
345
323
|
showHandles: "always"
|
|
346
324
|
};
|
|
347
325
|
/**
|
|
348
326
|
* Resize is a utility container with drag handles for resizing.
|
|
349
|
-
*/ var
|
|
327
|
+
*/ var Z = function(e) {
|
|
350
328
|
K(r, e);
|
|
351
329
|
var t = W(r);
|
|
352
330
|
// @docs-props-type ResizePropsBase
|
|
@@ -433,15 +411,15 @@
|
|
|
433
411
|
var s = e.length > 1;
|
|
434
412
|
var c;
|
|
435
413
|
if (s) {
|
|
436
|
-
c = n().createElement(
|
|
414
|
+
c = n().createElement(_, {
|
|
437
415
|
viewBox: "0 0 11 11",
|
|
438
416
|
width: "11px",
|
|
439
417
|
height: "11px"
|
|
440
|
-
}, n().createElement(
|
|
418
|
+
}, n().createElement(x, {
|
|
441
419
|
d: "M0 8 L 8 0 M4 8 L 8 4"
|
|
442
420
|
}));
|
|
443
421
|
} else if (e === "n" || e === "s") {
|
|
444
|
-
c = n().createElement(
|
|
422
|
+
c = n().createElement(R, {
|
|
445
423
|
viewBox: "0 0 14 3",
|
|
446
424
|
width: "14px",
|
|
447
425
|
height: "3px"
|
|
@@ -457,7 +435,7 @@
|
|
|
457
435
|
y: "2"
|
|
458
436
|
}));
|
|
459
437
|
} else if (e === "e" || e === "w") {
|
|
460
|
-
c = n().createElement(
|
|
438
|
+
c = n().createElement(R, {
|
|
461
439
|
viewBox: "0 0 3 14",
|
|
462
440
|
width: "3px",
|
|
463
441
|
height: "14px"
|
|
@@ -474,7 +452,7 @@
|
|
|
474
452
|
}));
|
|
475
453
|
}
|
|
476
454
|
|
|
477
|
-
return n().createElement(
|
|
455
|
+
return n().createElement(q, {
|
|
478
456
|
key: e,
|
|
479
457
|
"data-test": "resize-handle-".concat(e),
|
|
480
458
|
onMouseDown: o["handleDragStart".concat(e)],
|
|
@@ -488,20 +466,20 @@
|
|
|
488
466
|
el: null
|
|
489
467
|
};
|
|
490
468
|
if (false) {}
|
|
491
|
-
|
|
469
|
+
// Generate handlers for each direction.
|
|
492
470
|
r.handleOrder.forEach((function(e) {
|
|
493
471
|
// @ts-expect-error - dynamic function creation
|
|
494
472
|
o["handleDragStart".concat(e)] = function(t) {
|
|
495
473
|
o.handleDragStart(t, e);
|
|
496
474
|
};
|
|
497
|
-
|
|
475
|
+
// @ts-expect-error - dynamic function creation
|
|
498
476
|
o["handleKeyDown".concat(e)] = function(t) {
|
|
499
477
|
o.handleKeyDown(t, e);
|
|
500
478
|
};
|
|
501
479
|
}));
|
|
502
480
|
return o;
|
|
503
481
|
}
|
|
504
|
-
|
|
482
|
+
N(r, [ {
|
|
505
483
|
key: "render",
|
|
506
484
|
value: function e() {
|
|
507
485
|
var t = this.props, o = t.appearance, i = t.children, a = t.resizeHandles;
|
|
@@ -524,7 +502,7 @@
|
|
|
524
502
|
}));
|
|
525
503
|
}
|
|
526
504
|
|
|
527
|
-
return n().createElement(
|
|
505
|
+
return n().createElement(k, I({
|
|
528
506
|
"data-test": "resize",
|
|
529
507
|
ref: this.handleMount
|
|
530
508
|
}, l()(this.props, s()(r.propTypes))), n().createElement(z, {
|
|
@@ -542,10 +520,10 @@
|
|
|
542
520
|
} ]);
|
|
543
521
|
return r;
|
|
544
522
|
}(r.Component);
|
|
545
|
-
F(
|
|
546
|
-
F(
|
|
547
|
-
F(
|
|
548
|
-
F(
|
|
523
|
+
F(Z, "propTypes", Q);
|
|
524
|
+
F(Z, "defaultProps", U);
|
|
525
|
+
F(Z, "handleOrder", [ "nw", "n", "ne", "w", "e", "sw", "s", "se" ]);
|
|
526
|
+
F(Z, "handleLabels", {
|
|
549
527
|
nw: (0, h._)("Resize northwest"),
|
|
550
528
|
n: (0, h._)("Resize north"),
|
|
551
529
|
ne: (0, h._)("Resize northeast"),
|
|
@@ -555,7 +533,7 @@
|
|
|
555
533
|
s: (0, h._)("Resize south"),
|
|
556
534
|
se: (0, h._)("Resize southeast")
|
|
557
535
|
});
|
|
558
|
-
/* harmony default export */ const
|
|
536
|
+
/* harmony default export */ const ee = Z;
|
|
559
537
|
// CONCATENATED MODULE: ./src/Resize/index.ts
|
|
560
538
|
module.exports = t;
|
|
561
539
|
/******/})();
|