@splunk/react-ui 5.0.0-beta.2 → 5.0.0-beta.4
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 +185 -243
- package/Animation.js +2 -2
- package/Button.js +4 -4
- package/ButtonGroup.js +10 -11
- package/ButtonSimple.js +48 -42
- package/CHANGELOG.md +26 -0
- package/CHANGELOG.v5.mdx +81 -0
- package/Calendar.js +352 -469
- package/Card.js +178 -321
- package/Chip.js +154 -296
- package/Clickable.js +30 -30
- package/Code.js +64 -49
- package/Color.js +546 -462
- package/ComboBox.js +575 -767
- package/Date.js +144 -136
- package/Divider.js +29 -26
- package/DualListbox.js +441 -444
- package/File.js +707 -981
- package/FormRows.js +260 -286
- package/Image.js +124 -251
- package/JSONTree.js +129 -129
- package/Layout.d.ts +2 -0
- package/Link.js +12 -12
- package/MIGRATION.mdx +22 -1
- package/MIGRATION.v5.mdx +12 -1
- package/Menu.js +76 -76
- package/Message.js +77 -100
- package/MessageBar.js +141 -251
- package/Modal.js +42 -40
- package/ModalLayer.js +12 -12
- package/Multiselect.js +1989 -2362
- package/NonInteractiveCheckbox.js +30 -118
- package/Number.js +75 -73
- package/Popover.js +348 -350
- package/Progress.js +1 -1
- package/RadioBar.js +136 -136
- package/Resize.js +62 -65
- package/Scroll.js +2 -2
- package/Select.js +281 -283
- package/SidePanel.js +53 -55
- package/Slider.js +370 -364
- package/SlidingPanels.js +100 -102
- package/SplitButton.js +170 -343
- package/StaticContent.js +15 -13
- package/StepBar.js +61 -60
- package/Switch.js +150 -164
- package/TabBar.js +544 -417
- package/Table.js +1711 -1540
- package/Text.js +28 -26
- package/TextArea.js +26 -26
- package/Tooltip.js +416 -562
- package/TransitionOpen.js +179 -158
- package/Tree.d.ts +2 -0
- package/WaitSpinner.js +1 -1
- package/package.json +7 -9
- package/types/src/Accordion/Accordion.d.ts +14 -21
- package/types/src/Accordion/AccordionContext.d.ts +0 -1
- package/types/src/Animation/Animation.d.ts +2 -3
- package/types/src/AnimationToggle/docs/examples/Provider.d.ts +2 -2
- package/types/src/AnimationToggle/docs/examples/ToggleComponent.d.ts +2 -2
- package/types/src/AnimationToggle/useAnimationToggle.d.ts +1 -1
- package/types/src/Button/Button.d.ts +2 -2
- package/types/src/ButtonGroup/ButtonGroupContext.d.ts +0 -1
- package/types/src/ButtonSimple/ButtonSimple.d.ts +1 -3
- package/types/src/ButtonSimple/mixin.d.ts +1 -1
- package/types/src/Calendar/Calendar.d.ts +2 -2
- package/types/src/Calendar/{DateTable.d.ts → DateGrid.d.ts} +9 -9
- package/types/src/Calendar/Day.d.ts +8 -4
- package/types/src/Card/Card.d.ts +27 -14
- package/types/src/CardLayout/CardLayoutContext.d.ts +0 -1
- package/types/src/CardLayout/docs/examples/Interactive.d.ts +2 -2
- package/types/src/Clickable/Clickable.d.ts +1 -1
- package/types/src/CollapsiblePanel/SingleOpenPanelGroupContext.d.ts +0 -1
- package/types/src/Color/Color.d.ts +3 -3
- package/types/src/Color/ColorInput.d.ts +27 -0
- package/types/src/Color/Palette.d.ts +11 -18
- package/types/src/Color/Swatch.d.ts +3 -1
- package/types/src/ComboBox/ComboBox.d.ts +46 -50
- package/types/src/ComboBox/Option.d.ts +34 -18
- package/types/src/ControlGroup/docs/examples/CustomizedLabelTarget.d.ts +2 -2
- package/types/src/Date/Date.d.ts +3 -2
- package/types/src/Date/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Date/docs/examples/HighlightToday.d.ts +2 -2
- package/types/src/DefinitionList/DefinitionListContext.d.ts +0 -1
- package/types/src/Divider/Divider.d.ts +14 -6
- package/types/src/Divider/docs/examples/Appearance.d.ts +3 -0
- package/types/src/DualListbox/DualListbox.d.ts +5 -1
- package/types/src/File/File.d.ts +6 -6
- package/types/src/File/FileContext.d.ts +0 -1
- package/types/src/File/Item.d.ts +11 -3
- package/types/src/File/ItemIcon.d.ts +7 -0
- package/types/src/File/docs/examples/Disabled.d.ts +2 -2
- package/types/src/File/docs/examples/DropAnywhere.d.ts +2 -2
- package/types/src/File/docs/examples/Multi.d.ts +2 -2
- package/types/src/File/docs/examples/Single.d.ts +2 -2
- package/types/src/FormRows/FormRows.d.ts +8 -8
- package/types/src/FormRows/FormRowsContext.d.ts +1 -2
- package/types/src/FormRows/Row.d.ts +2 -2
- package/types/src/FormRows/RowInternal.d.ts +1 -1
- package/types/src/FormRows/SortableRow.d.ts +3 -3
- package/types/src/FormRows/docs/examples/Basic.d.ts +2 -2
- package/types/src/FormRows/docs/examples/Header.d.ts +2 -2
- package/types/src/FormRows/docs/examples/Menu.d.ts +2 -2
- package/types/src/FormRows/docs/examples/ReorderOnly.d.ts +2 -2
- package/types/src/Image/Image.d.ts +1 -4
- package/types/src/JSONTree/docs/examples/Events.d.ts +2 -2
- package/types/src/Layout/Layout.d.ts +1 -0
- package/types/src/Link/icons/External.d.ts +1 -2
- package/types/src/Menu/Divider.d.ts +1 -1
- package/types/src/Menu/MenuContext.d.ts +0 -1
- package/types/src/MessageBar/MessageBar.d.ts +5 -1
- package/types/src/Modal/ModalContext.d.ts +0 -1
- package/types/src/Multiselect/Compact.d.ts +49 -21
- package/types/src/Multiselect/Multiselect.d.ts +73 -30
- package/types/src/Multiselect/Normal.d.ts +46 -57
- package/types/src/Multiselect/Option.d.ts +42 -18
- package/types/src/Multiselect/docs/examples/Children.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/CustomizeSelected.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Disabled.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Error.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Fetching.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/NewValues.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/TabInput.d.ts +2 -2
- package/types/src/NonInteractiveCheckbox/NonInteractiveCheckbox.d.ts +9 -8
- package/types/src/Number/Number.d.ts +1 -0
- package/types/src/Number/docs/examples/Basic.d.ts +2 -2
- package/types/src/Number/docs/examples/Limits.d.ts +2 -2
- package/types/src/Number/docs/examples/Locale.d.ts +2 -2
- package/types/src/Popover/Popover.d.ts +1 -1
- package/types/src/Popover/PopoverMenuContext.d.ts +0 -1
- package/types/src/RadioBar/RadioBar.d.ts +1 -1
- package/types/src/RadioBar/RadioBarContext.d.ts +0 -1
- package/types/src/RadioList/RadioListContext.d.ts +0 -1
- package/types/src/Scroll/Inner.d.ts +1 -1
- package/types/src/Scroll/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Search/Search.d.ts +2 -2
- package/types/src/Select/SelectBase.d.ts +2 -2
- package/types/src/SidePanel/SidePanel.d.ts +8 -3
- package/types/src/Slider/Slider.d.ts +1 -1
- package/types/src/Slider/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Slider/docs/examples/CustomLabels.d.ts +2 -2
- package/types/src/Slider/getStepMarksBackground.d.ts +8 -0
- package/types/src/SlidingPanels/Panel.d.ts +2 -2
- package/types/src/SlidingPanels/SlidingPanels.d.ts +2 -2
- package/types/src/SlidingPanels/docs/examples/Basic.d.ts +2 -2
- package/types/src/SlidingPanels/docs/examples/Dropdown.d.ts +2 -2
- package/types/src/SplitButton/Item.d.ts +34 -20
- package/types/src/SplitButton/SplitButton.d.ts +4 -1
- package/types/src/StaticContent/StaticContent.d.ts +3 -1
- package/types/src/StepBar/Step.d.ts +1 -1
- package/types/src/StepBar/StepBar.d.ts +1 -1
- package/types/src/StepBar/StepBarContext.d.ts +0 -1
- package/types/src/Switch/Switch.d.ts +1 -9
- package/types/src/Switch/docs/examples/Basic.d.ts +2 -2
- package/types/src/Switch/docs/examples/Disabled.d.ts +2 -2
- package/types/src/TabBar/Tab.d.ts +12 -5
- package/types/src/TabBar/TabBar.d.ts +4 -3
- package/types/src/TabBar/TabBarContext.d.ts +7 -2
- package/types/src/Table/Head.d.ts +4 -15
- package/types/src/Table/HeadCell.d.ts +23 -25
- package/types/src/Table/HeadDropdownCell.d.ts +23 -26
- package/types/src/Table/HeadInner.d.ts +4 -10
- package/types/src/Table/Row.d.ts +6 -6
- package/types/src/Table/Table.d.ts +3 -8
- package/types/src/Table/TableContext.d.ts +0 -1
- package/types/src/Table/Toggle.d.ts +1 -1
- package/types/src/Text/Text.d.ts +5 -1
- package/types/src/Tooltip/Tooltip.d.ts +26 -58
- package/types/src/Tooltip/docs/examples/Controlled.d.ts +2 -2
- package/types/src/TransitionOpen/TransitionOpen.d.ts +6 -1
- package/types/src/Tree/TreeContext.d.ts +0 -1
- package/types/src/useForceUpdate/useForceUpdate.d.ts +0 -1
- package/types/src/useResizeObserver/useResizeObserver.d.ts +2 -1
- package/types/src/utils/types.d.ts +2 -3
- package/useResizeObserver.js +26 -19
- package/types/src/File/Icon.d.ts +0 -3
- package/types/src/File/IconCloud.d.ts +0 -3
- package/types/src/File/PaperClip.d.ts +0 -3
- package/types/src/File/Retry.d.ts +0 -2
- package/types/src/File/Trash.d.ts +0 -3
- package/types/src/FormRows/icons/FormRowsPlusIcon.d.ts +0 -3
- package/types/src/Image/icons/Cross.d.ts +0 -3
- package/types/src/Multiselect/docs/examples/CompactSelectAll.d.ts +0 -3
- package/types/src/Table/docs/examples/prisma/DockedHeaderScrollbar.d.ts +0 -3
- package/types/src/Tooltip/InfoIcon.d.ts +0 -4
package/Resize.js
CHANGED
|
@@ -83,42 +83,42 @@
|
|
|
83
83
|
const f = require("styled-components");
|
|
84
84
|
var v = e.n(f);
|
|
85
85
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
86
|
-
const
|
|
86
|
+
const h = require("@splunk/themes");
|
|
87
87
|
// CONCATENATED MODULE: ./src/Resize/ResizeStyles.ts
|
|
88
|
-
var
|
|
88
|
+
var p = "9px";
|
|
89
89
|
var w = "14px";
|
|
90
|
-
var
|
|
91
|
-
var
|
|
90
|
+
var y = "3px";
|
|
91
|
+
var m = "11px";
|
|
92
92
|
var b = v().div.withConfig({
|
|
93
93
|
displayName: "ResizeStyles__Styled",
|
|
94
94
|
componentId: "sc-181mwes-0"
|
|
95
|
-
})([ "", ";position:relative;overflow-x:hidden;overflow-y:hidden;" ],
|
|
95
|
+
})([ "", ";position:relative;overflow-x:hidden;overflow-y:hidden;" ], h.mixins.reset("block"));
|
|
96
96
|
var g = v().div.withConfig({
|
|
97
97
|
displayName: "ResizeStyles__StyledBorder",
|
|
98
98
|
componentId: "sc-181mwes-1"
|
|
99
|
-
})([ "", ";height:100%;width:100%;border:0 solid ", ";", " ", " ", " ", "" ],
|
|
100
|
-
|
|
99
|
+
})([ "", ";height:100%;width:100%;border:0 solid ", ";", " ", " ", " ", "" ], h.mixins.reset("block"), (0,
|
|
100
|
+
h.pick)({
|
|
101
101
|
// TODO(SUI-6298): Should use a semantically correct token
|
|
102
102
|
prisma: {
|
|
103
103
|
light: "#eeeeee",
|
|
104
104
|
dark: "#272a2f"
|
|
105
105
|
},
|
|
106
106
|
enterprise: {
|
|
107
|
-
dark:
|
|
108
|
-
light:
|
|
107
|
+
dark: h.variables.gray22,
|
|
108
|
+
light: h.variables.white
|
|
109
109
|
}
|
|
110
110
|
}), (function(e) {
|
|
111
111
|
var r = e.$borderSides;
|
|
112
|
-
return r.n && (0, f.css)([ "border-top-width:", ";" ],
|
|
112
|
+
return r.n && (0, f.css)([ "border-top-width:", ";" ], p);
|
|
113
113
|
}), (function(e) {
|
|
114
114
|
var r = e.$borderSides;
|
|
115
|
-
return r.e && (0, f.css)([ "border-right-width:", ";" ],
|
|
115
|
+
return r.e && (0, f.css)([ "border-right-width:", ";" ], p);
|
|
116
116
|
}), (function(e) {
|
|
117
117
|
var r = e.$borderSides;
|
|
118
|
-
return r.s && (0, f.css)([ "border-bottom-width:", ";" ],
|
|
118
|
+
return r.s && (0, f.css)([ "border-bottom-width:", ";" ], p);
|
|
119
119
|
}), (function(e) {
|
|
120
120
|
var r = e.$borderSides;
|
|
121
|
-
return r.w && (0, f.css)([ "border-left-width:", ";" ],
|
|
121
|
+
return r.w && (0, f.css)([ "border-left-width:", ";" ], p);
|
|
122
122
|
}));
|
|
123
123
|
var S = v().svg.withConfig({
|
|
124
124
|
displayName: "ResizeStyles__StyledCornerSvg",
|
|
@@ -132,34 +132,31 @@
|
|
|
132
132
|
displayName: "ResizeStyles__StyledSideSvg",
|
|
133
133
|
componentId: "sc-181mwes-4"
|
|
134
134
|
})([ "display:block;fill:currentColor;" ]);
|
|
135
|
-
var x = (0, f.css)([ "", ";color:", ";&:hover,&:focus{color:", ";", "}", "" ],
|
|
136
|
-
|
|
137
|
-
prisma:
|
|
135
|
+
var x = (0, f.css)([ "", ";color:", ";&:hover,&:focus{color:", ";", "}", "" ], h.mixins.reset("block"), (0,
|
|
136
|
+
h.pick)({
|
|
137
|
+
prisma: h.variables.contentColorDefault,
|
|
138
138
|
enterprise: {
|
|
139
|
-
dark:
|
|
140
|
-
light:
|
|
139
|
+
dark: h.variables.gray92,
|
|
140
|
+
light: h.variables.borderColor
|
|
141
141
|
}
|
|
142
|
-
}),
|
|
143
|
-
prisma: p.variables.interactiveColorPrimary,
|
|
144
|
-
enterprise: p.variables.contentColorLink
|
|
145
|
-
}), (function(e) {
|
|
142
|
+
}), h.variables.contentColorAccent, (function(e) {
|
|
146
143
|
var r = e.$isSeparator, t = e.$cardinalDirection;
|
|
147
144
|
var n = [ "n", "e", "w", "s" ].includes(t);
|
|
148
|
-
return r && n && (0, f.css)([ "background-color:", ";&:active{background-color:", ";}" ],
|
|
145
|
+
return r && n && (0, f.css)([ "background-color:", ";&:active{background-color:", ";}" ], h.variables.borderColorWeak, h.variables.borderColorStrong);
|
|
149
146
|
}), (function(e) {
|
|
150
147
|
var r = e.$showHandles;
|
|
151
148
|
return r === "on-hover" && (0, f.css)([ "opacity:0;transition:opacity 200ms;", ":hover > div > &,&:focus{opacity:1;}" ], /* sc-sel */ b);
|
|
152
149
|
}));
|
|
153
|
-
var R = (0, f.css)([ "", ";width:", ";height:", ";position:absolute;background-clip:content-box;z-index:2;" ], x,
|
|
154
|
-
var
|
|
155
|
-
var
|
|
156
|
-
var
|
|
150
|
+
var R = (0, f.css)([ "", ";width:", ";height:", ";position:absolute;background-clip:content-box;z-index:2;" ], x, m, m);
|
|
151
|
+
var O = (0, f.css)([ "height:100%;" ]);
|
|
152
|
+
var _ = (0, f.css)([ "width:100%;display:flex;justify-content:center;" ]);
|
|
153
|
+
var C = (0, f.css)([ "", ";position:absolute;z-index:1;", "" ], x, (function(e) {
|
|
157
154
|
var r = e.$isSeparator;
|
|
158
|
-
return r && (0,
|
|
159
|
-
n:
|
|
160
|
-
s:
|
|
161
|
-
e:
|
|
162
|
-
w:
|
|
155
|
+
return r && (0, h.pickVariant)("$cardinalDirection", {
|
|
156
|
+
n: _,
|
|
157
|
+
s: _,
|
|
158
|
+
e: O,
|
|
159
|
+
w: O
|
|
163
160
|
});
|
|
164
161
|
}));
|
|
165
162
|
var E = function e(r) {
|
|
@@ -169,14 +166,14 @@
|
|
|
169
166
|
var $ = v().button.withConfig({
|
|
170
167
|
displayName: "ResizeStyles__StyledResize",
|
|
171
168
|
componentId: "sc-181mwes-5"
|
|
172
|
-
})([ "", "" ], (0,
|
|
169
|
+
})([ "", "" ], (0, h.pickVariant)("$cardinalDirection", {
|
|
173
170
|
nw: (0, f.css)([ "", ";top:0;left:0;cursor:nwse-resize;> ", "{transform:rotate(180deg);}" ], R, /* sc-sel */ S),
|
|
174
|
-
n: (0, f.css)([ "", ";cursor:ns-resize;top:0;left:", ";padding:", " 0;" ],
|
|
171
|
+
n: (0, f.css)([ "", ";cursor:ns-resize;top:0;left:", ";padding:", " 0;" ], C, E, y),
|
|
175
172
|
ne: (0, f.css)([ "", ";right:0;top:0;cursor:nesw-resize;> ", "{transform:rotate(-90deg);}" ], R, /* sc-sel */ S),
|
|
176
|
-
w: (0, f.css)([ "", ";cursor:ew-resize;padding:0 ", ";left:0;top:", ";" ],
|
|
177
|
-
e: (0, f.css)([ "", ";cursor:ew-resize;padding:0 ", ";right:0;top:", ";" ],
|
|
173
|
+
w: (0, f.css)([ "", ";cursor:ew-resize;padding:0 ", ";left:0;top:", ";" ], C, y, E),
|
|
174
|
+
e: (0, f.css)([ "", ";cursor:ew-resize;padding:0 ", ";right:0;top:", ";" ], C, y, E),
|
|
178
175
|
sw: (0, f.css)([ "", ";left:0;bottom:0;cursor:nesw-resize;> ", "{transform:rotate(90deg);}" ], R, /* sc-sel */ S),
|
|
179
|
-
s: (0, f.css)([ "", ";cursor:ns-resize;padding:", " 0;bottom:0;left:", ";" ],
|
|
176
|
+
s: (0, f.css)([ "", ";cursor:ns-resize;padding:", " 0;bottom:0;left:", ";" ], C, y, E),
|
|
180
177
|
se: (0, f.css)([ "", ";right:0;bottom:0;cursor:nwse-resize;" ], R)
|
|
181
178
|
}));
|
|
182
179
|
// CONCATENATED MODULE: ./src/utils/updateReactRef.ts
|
|
@@ -211,26 +208,26 @@
|
|
|
211
208
|
}, q.apply(null, arguments);
|
|
212
209
|
}
|
|
213
210
|
function D(e, r) {
|
|
214
|
-
return A(e) ||
|
|
211
|
+
return A(e) || P(e, r) || H(e, r) || I();
|
|
215
212
|
}
|
|
216
213
|
function I() {
|
|
217
214
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
218
215
|
}
|
|
219
216
|
function H(e, r) {
|
|
220
217
|
if (e) {
|
|
221
|
-
if ("string" == typeof e) return
|
|
218
|
+
if ("string" == typeof e) return M(e, r);
|
|
222
219
|
var t = {}.toString.call(e).slice(8, -1);
|
|
223
|
-
return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ?
|
|
220
|
+
return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? M(e, r) : void 0;
|
|
224
221
|
}
|
|
225
222
|
}
|
|
226
|
-
function
|
|
223
|
+
function M(e, r) {
|
|
227
224
|
(null == r || r > e.length) && (r = e.length);
|
|
228
225
|
for (var t = 0, n = Array(r); t < r; t++) {
|
|
229
226
|
n[t] = e[t];
|
|
230
227
|
}
|
|
231
228
|
return n;
|
|
232
229
|
}
|
|
233
|
-
function
|
|
230
|
+
function P(e, r) {
|
|
234
231
|
var t = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
|
|
235
232
|
if (null != t) {
|
|
236
233
|
var n, i, o, a, s = [], l = !0, c = !1;
|
|
@@ -287,8 +284,8 @@
|
|
|
287
284
|
resizeHandles: o().arrayOf(o().oneOf([ "nw", "n", "ne", "w", "e", "sw", "s", "se" ])).isRequired,
|
|
288
285
|
showHandles: o().oneOf([ "always", "on-hover" ])
|
|
289
286
|
};
|
|
290
|
-
var
|
|
291
|
-
var
|
|
287
|
+
var K = [ "nw", "n", "ne", "w", "e", "sw", "s", "se" ];
|
|
288
|
+
var L = {
|
|
292
289
|
nw: (0, u._)("Resize northwest"),
|
|
293
290
|
n: (0, u._)("Resize north"),
|
|
294
291
|
ne: (0, u._)("Resize northeast"),
|
|
@@ -301,14 +298,14 @@
|
|
|
301
298
|
/**
|
|
302
299
|
* Resize is a utility container with drag handles for resizing.
|
|
303
300
|
*/ function W(e) {
|
|
304
|
-
var r = e.appearance, i = r === void 0 ? "overlay" : r, o = e.children, a = e.elementRef, l = e.keyIncrement, u = l === void 0 ? 10 : l, f = e.onRequestResize, v = e.resizeHandles,
|
|
301
|
+
var r = e.appearance, i = r === void 0 ? "overlay" : r, o = e.children, a = e.elementRef, l = e.keyIncrement, u = l === void 0 ? 10 : l, f = e.onRequestResize, v = e.resizeHandles, h = e.showHandles, p = h === void 0 ? "always" : h, w = T(e, [ "appearance", "children", "elementRef", "keyIncrement", "onRequestResize", "resizeHandles", "showHandles" ]);
|
|
305
302
|
// @docs-props-type ResizePropsBase
|
|
306
303
|
(0, t.useEffect)((function() {
|
|
307
304
|
if (false) {}
|
|
308
305
|
}), [ i, v ]);
|
|
309
|
-
var
|
|
310
|
-
var
|
|
311
|
-
var I = (0, t.useState)(), H = D(I, 2),
|
|
306
|
+
var y = (0, t.useState)(), m = D(y, 2), x = m[0], R = m[1];
|
|
307
|
+
var O = (0, t.useState)(null), _ = D(O, 2), C = _[0], E = _[1];
|
|
308
|
+
var I = (0, t.useState)(), H = D(I, 2), M = H[0], P = H[1];
|
|
312
309
|
var A = (0, t.useState)(), N = D(A, 2), B = N[0], W = N[1];
|
|
313
310
|
var V = (0, t.useState)(), X = D(V, 2), Y = X[0], F = X[1];
|
|
314
311
|
var U = (0, t.useState)(), G = D(U, 2), J = G[0], Q = G[1];
|
|
@@ -326,14 +323,14 @@
|
|
|
326
323
|
e.preventDefault();
|
|
327
324
|
e.persist();
|
|
328
325
|
R(r);
|
|
329
|
-
W(
|
|
330
|
-
|
|
326
|
+
W(C === null || C === void 0 ? void 0 : C.offsetWidth);
|
|
327
|
+
P(C === null || C === void 0 ? void 0 : C.offsetHeight);
|
|
331
328
|
F(e.clientX);
|
|
332
329
|
Q(e.clientY);
|
|
333
|
-
}), [
|
|
330
|
+
}), [ C ]);
|
|
334
331
|
var te = (0, t.useMemo)((function() {
|
|
335
332
|
var e = {};
|
|
336
|
-
|
|
333
|
+
K.forEach((function(r) {
|
|
337
334
|
e["handleDragStart".concat(r)] = function(e) {
|
|
338
335
|
re(e, r);
|
|
339
336
|
};
|
|
@@ -345,10 +342,10 @@
|
|
|
345
342
|
var t = (x === null || x === void 0 ? void 0 : x.match(/^(s|n)/)) ? e.clientY - (J || 0) : 0;
|
|
346
343
|
var n = {
|
|
347
344
|
width: (x === null || x === void 0 ? void 0 : x.match(/w$/)) ? (B || 0) - r : (B || 0) + r,
|
|
348
|
-
height: (x === null || x === void 0 ? void 0 : x.match(/^n/)) ? (
|
|
345
|
+
height: (x === null || x === void 0 ? void 0 : x.match(/^n/)) ? (M || 0) - t : (M || 0) + t
|
|
349
346
|
};
|
|
350
347
|
f(e, n);
|
|
351
|
-
}), [ x, f,
|
|
348
|
+
}), [ x, f, M, B, Y, J ]);
|
|
352
349
|
var ie = (0, t.useCallback)((function(e, r) {
|
|
353
350
|
var t = (0, d.keycode)(e.nativeEvent);
|
|
354
351
|
var n = r.slice(-1);
|
|
@@ -375,18 +372,18 @@
|
|
|
375
372
|
}
|
|
376
373
|
};
|
|
377
374
|
var l = (a === "n" || a === "s") && (t === "up" || t === "down") ? s[a][t] : 0;
|
|
378
|
-
if ((o || l) &&
|
|
375
|
+
if ((o || l) && C) {
|
|
379
376
|
e.preventDefault();
|
|
380
377
|
var c = {
|
|
381
|
-
width:
|
|
382
|
-
height:
|
|
378
|
+
width: C.offsetWidth + o * u,
|
|
379
|
+
height: C.offsetHeight + l * u
|
|
383
380
|
};
|
|
384
381
|
f(e, c);
|
|
385
382
|
}
|
|
386
|
-
}), [
|
|
383
|
+
}), [ C, u, f ]);
|
|
387
384
|
var oe = (0, t.useMemo)((function() {
|
|
388
385
|
var e = {};
|
|
389
|
-
|
|
386
|
+
K.forEach((function(r) {
|
|
390
387
|
e["handleKeyDown".concat(r)] = function(e) {
|
|
391
388
|
ie(e, r);
|
|
392
389
|
};
|
|
@@ -445,9 +442,9 @@
|
|
|
445
442
|
onMouseDown: te["handleDragStart".concat(e)],
|
|
446
443
|
$cardinalDirection: e,
|
|
447
444
|
$isSeparator: i === "separator",
|
|
448
|
-
$showHandles:
|
|
449
|
-
}, t, n().createElement(c(), null,
|
|
450
|
-
}), [ i, te, oe,
|
|
445
|
+
$showHandles: p
|
|
446
|
+
}, t, n().createElement(c(), null, L[e]));
|
|
447
|
+
}), [ i, te, oe, p ]);
|
|
451
448
|
/* When appearance is border, determine which sides need margin.
|
|
452
449
|
* Converts ['se', 'n'] to { e: true, s: true, n: true}
|
|
453
450
|
*/ var se = {};
|
|
@@ -459,10 +456,10 @@
|
|
|
459
456
|
}));
|
|
460
457
|
}
|
|
461
458
|
// Handles are inserted before and after children to optimize tab order
|
|
462
|
-
var le =
|
|
459
|
+
var le = K.slice(0, 4).filter((function(e) {
|
|
463
460
|
return v.indexOf(e) > -1;
|
|
464
461
|
})).map(ae);
|
|
465
|
-
var ce =
|
|
462
|
+
var ce = K.slice(4).filter((function(e) {
|
|
466
463
|
return v.indexOf(e) > -1;
|
|
467
464
|
})).map(ae);
|
|
468
465
|
|
|
@@ -471,7 +468,7 @@
|
|
|
471
468
|
ref: Z
|
|
472
469
|
}, w), n().createElement(g, {
|
|
473
470
|
$borderSides: se
|
|
474
|
-
},
|
|
471
|
+
}, C && le, o, C && ce, x && n().createElement(n().Fragment, null, n().createElement(s(), {
|
|
475
472
|
target: window,
|
|
476
473
|
eventType: "mousemove",
|
|
477
474
|
listener: ne
|
package/Scroll.js
CHANGED
|
@@ -144,8 +144,8 @@
|
|
|
144
144
|
// CONCATENATED MODULE: external "lodash/omit"
|
|
145
145
|
const v = require("lodash/omit");
|
|
146
146
|
var y = r.n(v);
|
|
147
|
-
// CONCATENATED MODULE: external "react-spring"
|
|
148
|
-
const m = require("react-spring");
|
|
147
|
+
// CONCATENATED MODULE: external "@react-spring/web"
|
|
148
|
+
const m = require("@react-spring/web");
|
|
149
149
|
// CONCATENATED MODULE: external "@splunk/react-ui/EventListener"
|
|
150
150
|
const b = require("@splunk/react-ui/EventListener");
|
|
151
151
|
var g = r.n(b);
|