xmlui 0.9.10 → 0.9.11
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/dist/{apiInterceptorWorker-BJYj3y8V.mjs → apiInterceptorWorker-BZP06llg.mjs} +1 -1
- package/dist/core-C-osEDc2.mjs +2 -0
- package/dist/{index-6PAZN2xn.mjs → index-CFJ5_K_a.mjs} +921 -1963
- package/dist/index.css +0 -100
- package/dist/language-server-web-worker.mjs +1 -1
- package/dist/language-server.mjs +1 -1
- package/dist/{lint-DmJOJSJa.mjs → lint-CiMcsEWf.mjs} +84 -84
- package/dist/{parser-B3m9ZEAK.mjs → parser-mzWvH7dz.mjs} +12 -12
- package/dist/scripts/src/components-core/InspectorContext.js +15 -4
- package/dist/{server-common-oCD2CuF9.mjs → server-common-DxRVCeIE.mjs} +1 -1
- package/dist/xmlui-metadata.mjs +281 -387
- package/dist/xmlui-metadata.umd.js +283 -389
- package/dist/xmlui-parser.mjs +34 -34
- package/dist/xmlui-standalone.umd.js +9463 -14245
- package/dist/xmlui.d.ts +11 -0
- package/dist/xmlui.mjs +2 -1
- package/package.json +3 -1
- package/dist/core-XLM8cuFP.mjs +0 -7491
- package/dist/scripts/src/components-core/devtools/DevTools.js +0 -225
- package/dist/scripts/src/syntax/monaco/grammar.monacoLanguage.js +0 -286
- package/dist/scripts/src/syntax/monaco/xmlui-dark.js +0 -27
- package/dist/scripts/src/syntax/monaco/xmlui-light.js +0 -26
- package/dist/scripts/src/syntax/monaco/xmluiscript.monacoLanguage.js +0 -310
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react"), require("classnames"), require("lodash-es"), require("@remix-run/react"), require("react-day-picker"), require("date-fns"), require("@radix-ui/react-dropdown-menu"), require("react-dom"), require("immer"), require("@radix-ui/react-dialog"), require("use-context-selector"), require("react-dropzone"), require("@radix-ui/react-visually-hidden"), require("@radix-ui/react-select"), require("@radix-ui/react-popover"), require("cmdk"), require("@radix-ui/react-radio-group"), require("react-textarea-autosize"), require("@radix-ui/react-slider"), require("@tanstack/react-table"), require("@tanstack/react-virtual"), require("@radix-ui/react-accordion"), require("@eslint-community/regexpp"), require("embla-carousel-react"), require("embla-carousel-autoplay")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react", "classnames", "lodash-es", "@remix-run/react", "react-day-picker", "date-fns", "@radix-ui/react-dropdown-menu", "react-dom", "immer", "@radix-ui/react-dialog", "use-context-selector", "react-dropzone", "@radix-ui/react-visually-hidden", "@radix-ui/react-select", "@radix-ui/react-popover", "cmdk", "@radix-ui/react-radio-group", "react-textarea-autosize", "@radix-ui/react-slider", "@tanstack/react-table", "@tanstack/react-virtual", "@radix-ui/react-accordion", "@eslint-community/regexpp", "embla-carousel-react", "embla-carousel-autoplay"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["xmlui-metadata"] = {}, global["react/jsx-runtime"], global.React, global.classnames, global.lodashEs, global.react, global.reactDayPicker, global.dateFns, global.ReactDropdownMenu, global.ReactDOM, global.produce, global.SheetPrimitive, global.useContextSelector, global.dropzone, global.VisuallyHidden, global.reactSelect, global.reactPopover, global.cmdk, global.InnerRadioGroup, global.TextareaAutosize, global.reactSlider, global.reactTable, global.reactVirtual, global.RAccordion, global.regexpp, global.useEmblaCarousel, global.Autoplay));
|
|
3
|
-
})(this, function(exports2, jsxRuntime, React, classnames, lodashEs, react, reactDayPicker, dateFns, ReactDropdownMenu,
|
|
3
|
+
})(this, function(exports2, jsxRuntime, React, classnames, lodashEs, react, reactDayPicker, dateFns, ReactDropdownMenu, ReactDOM, produce, SheetPrimitive, useContextSelector, dropzone, VisuallyHidden, reactSelect, reactPopover, cmdk, InnerRadioGroup, TextareaAutosize, reactSlider, reactTable, reactVirtual, RAccordion, regexpp, useEmblaCarousel, Autoplay) {
|
|
4
4
|
"use strict";
|
|
5
5
|
function _interopNamespaceDefault(e) {
|
|
6
6
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -1048,6 +1048,9 @@
|
|
|
1048
1048
|
}
|
|
1049
1049
|
};
|
|
1050
1050
|
}
|
|
1051
|
+
function useComposedRefs(...refs) {
|
|
1052
|
+
return React__namespace.useCallback(composeRefs(...refs), refs);
|
|
1053
|
+
}
|
|
1051
1054
|
const defaultProps$g = {
|
|
1052
1055
|
type: "button",
|
|
1053
1056
|
iconPosition: "start",
|
|
@@ -1589,43 +1592,51 @@
|
|
|
1589
1592
|
text2 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", userSelect: "none" }, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { style: { fontSize: "inherit" }, children: text2 }) })
|
|
1590
1593
|
] }) : null });
|
|
1591
1594
|
}
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
const
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1597
|
-
const
|
|
1598
|
-
const
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1595
|
+
// @__NO_SIDE_EFFECTS__
|
|
1596
|
+
function createSlot(ownerName) {
|
|
1597
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
1598
|
+
const Slot2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
1599
|
+
const { children, ...slotProps } = props;
|
|
1600
|
+
const childrenArray = React__namespace.Children.toArray(children);
|
|
1601
|
+
const slottable = childrenArray.find(isSlottable);
|
|
1602
|
+
if (slottable) {
|
|
1603
|
+
const newElement = slottable.props.children;
|
|
1604
|
+
const newChildren = childrenArray.map((child) => {
|
|
1605
|
+
if (child === slottable) {
|
|
1606
|
+
if (React__namespace.Children.count(newElement) > 1) return React__namespace.Children.only(null);
|
|
1607
|
+
return React__namespace.isValidElement(newElement) ? newElement.props.children : null;
|
|
1608
|
+
} else {
|
|
1609
|
+
return child;
|
|
1610
|
+
}
|
|
1611
|
+
});
|
|
1612
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React__namespace.isValidElement(newElement) ? React__namespace.cloneElement(newElement, void 0, newChildren) : null });
|
|
1613
|
+
}
|
|
1614
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
1615
|
+
});
|
|
1616
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
1617
|
+
return Slot2;
|
|
1618
|
+
}
|
|
1619
|
+
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
1620
|
+
// @__NO_SIDE_EFFECTS__
|
|
1621
|
+
function createSlotClone(ownerName) {
|
|
1622
|
+
const SlotClone = React__namespace.forwardRef((props, forwardedRef) => {
|
|
1623
|
+
const { children, ...slotProps } = props;
|
|
1624
|
+
if (React__namespace.isValidElement(children)) {
|
|
1625
|
+
const childrenRef = getElementRef(children);
|
|
1626
|
+
const props2 = mergeProps$1(slotProps, children.props);
|
|
1627
|
+
if (children.type !== React__namespace.Fragment) {
|
|
1628
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
1604
1629
|
}
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
if (React__namespace.isValidElement(children)) {
|
|
1614
|
-
const childrenRef = getElementRef(children);
|
|
1615
|
-
const props2 = mergeProps$1(slotProps, children.props);
|
|
1616
|
-
if (children.type !== React__namespace.Fragment) {
|
|
1617
|
-
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
1618
|
-
}
|
|
1619
|
-
return React__namespace.cloneElement(children, props2);
|
|
1620
|
-
}
|
|
1621
|
-
return React__namespace.Children.count(children) > 1 ? React__namespace.Children.only(null) : null;
|
|
1622
|
-
});
|
|
1623
|
-
SlotClone.displayName = "SlotClone";
|
|
1624
|
-
var Slottable = ({ children }) => {
|
|
1625
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
1626
|
-
};
|
|
1630
|
+
return React__namespace.cloneElement(children, props2);
|
|
1631
|
+
}
|
|
1632
|
+
return React__namespace.Children.count(children) > 1 ? React__namespace.Children.only(null) : null;
|
|
1633
|
+
});
|
|
1634
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
1635
|
+
return SlotClone;
|
|
1636
|
+
}
|
|
1637
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
1627
1638
|
function isSlottable(child) {
|
|
1628
|
-
return React__namespace.isValidElement(child) && child.type ===
|
|
1639
|
+
return React__namespace.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
1629
1640
|
}
|
|
1630
1641
|
function mergeProps$1(slotProps, childProps) {
|
|
1631
1642
|
const overrideProps = { ...childProps };
|
|
@@ -1858,7 +1869,7 @@
|
|
|
1858
1869
|
const handleOnBlur = React.useCallback(() => {
|
|
1859
1870
|
onBlur == null ? void 0 : onBlur();
|
|
1860
1871
|
}, [onBlur]);
|
|
1861
|
-
const
|
|
1872
|
+
const focus2 = React.useCallback(() => {
|
|
1862
1873
|
var _a;
|
|
1863
1874
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
1864
1875
|
}, []);
|
|
@@ -1867,10 +1878,10 @@
|
|
|
1867
1878
|
});
|
|
1868
1879
|
React.useEffect(() => {
|
|
1869
1880
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
1870
|
-
focus,
|
|
1881
|
+
focus: focus2,
|
|
1871
1882
|
setValue
|
|
1872
1883
|
});
|
|
1873
|
-
}, [
|
|
1884
|
+
}, [focus2, registerComponentApi, setValue]);
|
|
1874
1885
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1875
1886
|
ItemWithLabel,
|
|
1876
1887
|
{
|
|
@@ -1894,7 +1905,7 @@
|
|
|
1894
1905
|
[styles$Q.valid]: validationStatus === "valid"
|
|
1895
1906
|
}),
|
|
1896
1907
|
tabIndex: -1,
|
|
1897
|
-
onFocus:
|
|
1908
|
+
onFocus: focus2,
|
|
1898
1909
|
children: [
|
|
1899
1910
|
/* @__PURE__ */ jsxRuntime.jsx(Adornment, { text: startText, iconName: startIcon, className: styles$Q.adornment }),
|
|
1900
1911
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3085,74 +3096,6 @@
|
|
|
3085
3096
|
extends: "xmlui",
|
|
3086
3097
|
themeVars: { ...redThemeColors }
|
|
3087
3098
|
};
|
|
3088
|
-
var DefaultContext = {
|
|
3089
|
-
color: void 0,
|
|
3090
|
-
size: void 0,
|
|
3091
|
-
className: void 0,
|
|
3092
|
-
style: void 0,
|
|
3093
|
-
attr: void 0
|
|
3094
|
-
};
|
|
3095
|
-
var IconContext = React.createContext && React.createContext(DefaultContext);
|
|
3096
|
-
var __assign = function() {
|
|
3097
|
-
__assign = Object.assign || function(t) {
|
|
3098
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3099
|
-
s = arguments[i];
|
|
3100
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3101
|
-
}
|
|
3102
|
-
return t;
|
|
3103
|
-
};
|
|
3104
|
-
return __assign.apply(this, arguments);
|
|
3105
|
-
};
|
|
3106
|
-
var __rest = function(s, e) {
|
|
3107
|
-
var t = {};
|
|
3108
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
3109
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
3110
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
3111
|
-
}
|
|
3112
|
-
return t;
|
|
3113
|
-
};
|
|
3114
|
-
function Tree2Element(tree) {
|
|
3115
|
-
return tree && tree.map(function(node, i) {
|
|
3116
|
-
return React.createElement(node.tag, __assign({
|
|
3117
|
-
key: i
|
|
3118
|
-
}, node.attr), Tree2Element(node.child));
|
|
3119
|
-
});
|
|
3120
|
-
}
|
|
3121
|
-
function GenIcon(data) {
|
|
3122
|
-
return function(props) {
|
|
3123
|
-
return React.createElement(IconBase, __assign({
|
|
3124
|
-
attr: __assign({}, data.attr)
|
|
3125
|
-
}, props), Tree2Element(data.child));
|
|
3126
|
-
};
|
|
3127
|
-
}
|
|
3128
|
-
function IconBase(props) {
|
|
3129
|
-
var elem = function(conf) {
|
|
3130
|
-
var attr = props.attr, size = props.size, title2 = props.title, svgProps = __rest(props, ["attr", "size", "title"]);
|
|
3131
|
-
var computedSize = size || conf.size || "1em";
|
|
3132
|
-
var className;
|
|
3133
|
-
if (conf.className) className = conf.className;
|
|
3134
|
-
if (props.className) className = (className ? className + " " : "") + props.className;
|
|
3135
|
-
return React.createElement("svg", __assign({
|
|
3136
|
-
stroke: "currentColor",
|
|
3137
|
-
fill: "currentColor",
|
|
3138
|
-
strokeWidth: "0"
|
|
3139
|
-
}, conf.attr, attr, svgProps, {
|
|
3140
|
-
className,
|
|
3141
|
-
style: __assign(__assign({
|
|
3142
|
-
color: props.color || conf.color
|
|
3143
|
-
}, conf.style), props.style),
|
|
3144
|
-
height: computedSize,
|
|
3145
|
-
width: computedSize,
|
|
3146
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
3147
|
-
}), title2 && React.createElement("title", null, title2), props.children);
|
|
3148
|
-
};
|
|
3149
|
-
return IconContext !== void 0 ? React.createElement(IconContext.Consumer, null, function(conf) {
|
|
3150
|
-
return elem(conf);
|
|
3151
|
-
}) : elem(DefaultContext);
|
|
3152
|
-
}
|
|
3153
|
-
function BiErrorCircle(props) {
|
|
3154
|
-
return GenIcon({ "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M11.953 2C6.465 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.493 2 11.953 2zM12 20c-4.411 0-8-3.589-8-8s3.567-8 7.953-8C16.391 4 20 7.589 20 12s-3.589 8-8 8z" } }, { "tag": "path", "attr": { "d": "M11 7h2v7h-2zm0 8h2v2h-2z" } }] })(props);
|
|
3155
|
-
}
|
|
3156
3099
|
const COMP$13 = "Theme";
|
|
3157
3100
|
const ThemeMd = createMetadata({
|
|
3158
3101
|
description: `The \`${COMP$13}\` component provides a way to define a particular theming context for its nested components. The XMLUI framework uses \`${COMP$13}\` to define the default theming context for all of its child components. Theme variables and theme settings only work in this context.`,
|
|
@@ -4100,7 +4043,7 @@
|
|
|
4100
4043
|
innerRef.current.indeterminate = indeterminate;
|
|
4101
4044
|
}
|
|
4102
4045
|
}, [indeterminate]);
|
|
4103
|
-
const
|
|
4046
|
+
const focus2 = React.useCallback(() => {
|
|
4104
4047
|
var _a;
|
|
4105
4048
|
(_a = innerRef.current) == null ? void 0 : _a.focus();
|
|
4106
4049
|
}, []);
|
|
@@ -4109,10 +4052,10 @@
|
|
|
4109
4052
|
});
|
|
4110
4053
|
React.useEffect(() => {
|
|
4111
4054
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
4112
|
-
focus,
|
|
4055
|
+
focus: focus2,
|
|
4113
4056
|
setValue
|
|
4114
4057
|
});
|
|
4115
|
-
}, [
|
|
4058
|
+
}, [focus2, registerComponentApi, setValue]);
|
|
4116
4059
|
const input2 = React.useMemo(
|
|
4117
4060
|
() => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4118
4061
|
"input",
|
|
@@ -4458,7 +4401,7 @@
|
|
|
4458
4401
|
const handleOnMenuBlur = () => {
|
|
4459
4402
|
setIsMenuFocused(false);
|
|
4460
4403
|
};
|
|
4461
|
-
const
|
|
4404
|
+
const focus2 = React.useCallback(() => {
|
|
4462
4405
|
var _a;
|
|
4463
4406
|
(_a = referenceElement == null ? void 0 : referenceElement.current) == null ? void 0 : _a.focus();
|
|
4464
4407
|
}, [referenceElement == null ? void 0 : referenceElement.current]);
|
|
@@ -4468,10 +4411,10 @@
|
|
|
4468
4411
|
});
|
|
4469
4412
|
React.useEffect(() => {
|
|
4470
4413
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
4471
|
-
focus,
|
|
4414
|
+
focus: focus2,
|
|
4472
4415
|
setValue
|
|
4473
4416
|
});
|
|
4474
|
-
}, [
|
|
4417
|
+
}, [focus2, registerComponentApi, setValue]);
|
|
4475
4418
|
React.useEffect(() => {
|
|
4476
4419
|
if (!isButtonFocused && !isMenuFocused) {
|
|
4477
4420
|
onBlur == null ? void 0 : onBlur();
|
|
@@ -5018,7 +4961,7 @@
|
|
|
5018
4961
|
const handleOnBlur = React.useCallback(() => {
|
|
5019
4962
|
onBlur == null ? void 0 : onBlur();
|
|
5020
4963
|
}, [onBlur]);
|
|
5021
|
-
const
|
|
4964
|
+
const focus2 = React.useCallback(() => {
|
|
5022
4965
|
var _a;
|
|
5023
4966
|
(_a = buttonRef.current) == null ? void 0 : _a.focus();
|
|
5024
4967
|
}, []);
|
|
@@ -5047,10 +4990,10 @@
|
|
|
5047
4990
|
});
|
|
5048
4991
|
React.useEffect(() => {
|
|
5049
4992
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
5050
|
-
focus,
|
|
4993
|
+
focus: focus2,
|
|
5051
4994
|
open: doOpen
|
|
5052
4995
|
});
|
|
5053
|
-
}, [
|
|
4996
|
+
}, [focus2, doOpen, registerComponentApi]);
|
|
5054
4997
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5055
4998
|
ItemWithLabel,
|
|
5056
4999
|
{
|
|
@@ -7210,7 +7153,7 @@
|
|
|
7210
7153
|
requestModalFormClose();
|
|
7211
7154
|
}
|
|
7212
7155
|
if (initialValue === EMPTY_OBJECT) {
|
|
7213
|
-
|
|
7156
|
+
ReactDOM.flushSync(() => {
|
|
7214
7157
|
doReset();
|
|
7215
7158
|
});
|
|
7216
7159
|
}
|
|
@@ -11761,7 +11704,7 @@
|
|
|
11761
11704
|
setValueStrRep(mapToRepresentation(value));
|
|
11762
11705
|
onBlur == null ? void 0 : onBlur();
|
|
11763
11706
|
}, [value, onBlur]);
|
|
11764
|
-
const
|
|
11707
|
+
const focus2 = React.useCallback(() => {
|
|
11765
11708
|
var _a;
|
|
11766
11709
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
11767
11710
|
}, []);
|
|
@@ -11770,10 +11713,10 @@
|
|
|
11770
11713
|
});
|
|
11771
11714
|
React.useEffect(() => {
|
|
11772
11715
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
11773
|
-
focus,
|
|
11716
|
+
focus: focus2,
|
|
11774
11717
|
setValue
|
|
11775
11718
|
});
|
|
11776
|
-
}, [
|
|
11719
|
+
}, [focus2, registerComponentApi, setValue]);
|
|
11777
11720
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11778
11721
|
ItemWithLabel,
|
|
11779
11722
|
{
|
|
@@ -11908,92 +11851,7 @@
|
|
|
11908
11851
|
};
|
|
11909
11852
|
}, [elementRef, action, delay]);
|
|
11910
11853
|
}
|
|
11911
|
-
|
|
11912
|
-
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
11913
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
11914
|
-
var t = arguments[e];
|
|
11915
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
11916
|
-
}
|
|
11917
|
-
return n;
|
|
11918
|
-
}, _extends.apply(null, arguments);
|
|
11919
|
-
}
|
|
11920
|
-
function $6ed0406888f73fc4$var$setRef(ref, value) {
|
|
11921
|
-
if (typeof ref === "function") ref(value);
|
|
11922
|
-
else if (ref !== null && ref !== void 0) ref.current = value;
|
|
11923
|
-
}
|
|
11924
|
-
function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {
|
|
11925
|
-
return (node) => refs.forEach(
|
|
11926
|
-
(ref) => $6ed0406888f73fc4$var$setRef(ref, node)
|
|
11927
|
-
);
|
|
11928
|
-
}
|
|
11929
|
-
function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {
|
|
11930
|
-
return React.useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);
|
|
11931
|
-
}
|
|
11932
|
-
const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11933
|
-
const { children, ...slotProps } = props;
|
|
11934
|
-
const childrenArray = React.Children.toArray(children);
|
|
11935
|
-
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
|
11936
|
-
if (slottable) {
|
|
11937
|
-
const newElement = slottable.props.children;
|
|
11938
|
-
const newChildren = childrenArray.map((child) => {
|
|
11939
|
-
if (child === slottable) {
|
|
11940
|
-
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
11941
|
-
return /* @__PURE__ */ React.isValidElement(newElement) ? newElement.props.children : null;
|
|
11942
|
-
} else return child;
|
|
11943
|
-
});
|
|
11944
|
-
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
11945
|
-
ref: forwardedRef
|
|
11946
|
-
}), /* @__PURE__ */ React.isValidElement(newElement) ? /* @__PURE__ */ React.cloneElement(newElement, void 0, newChildren) : null);
|
|
11947
|
-
}
|
|
11948
|
-
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
11949
|
-
ref: forwardedRef
|
|
11950
|
-
}), children);
|
|
11951
|
-
});
|
|
11952
|
-
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = "Slot";
|
|
11953
|
-
const $5e63c961fc1ce211$var$SlotClone = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11954
|
-
const { children, ...slotProps } = props;
|
|
11955
|
-
if (/* @__PURE__ */ React.isValidElement(children)) return /* @__PURE__ */ React.cloneElement(children, {
|
|
11956
|
-
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
|
|
11957
|
-
ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref
|
|
11958
|
-
});
|
|
11959
|
-
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
11960
|
-
});
|
|
11961
|
-
$5e63c961fc1ce211$var$SlotClone.displayName = "SlotClone";
|
|
11962
|
-
const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children }) => {
|
|
11963
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
11964
|
-
};
|
|
11965
|
-
function $5e63c961fc1ce211$var$isSlottable(child) {
|
|
11966
|
-
return /* @__PURE__ */ React.isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
|
11967
|
-
}
|
|
11968
|
-
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
11969
|
-
const overrideProps = {
|
|
11970
|
-
...childProps
|
|
11971
|
-
};
|
|
11972
|
-
for (const propName in childProps) {
|
|
11973
|
-
const slotPropValue = slotProps[propName];
|
|
11974
|
-
const childPropValue = childProps[propName];
|
|
11975
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
11976
|
-
if (isHandler) {
|
|
11977
|
-
if (slotPropValue && childPropValue) overrideProps[propName] = (...args) => {
|
|
11978
|
-
childPropValue(...args);
|
|
11979
|
-
slotPropValue(...args);
|
|
11980
|
-
};
|
|
11981
|
-
else if (slotPropValue) overrideProps[propName] = slotPropValue;
|
|
11982
|
-
} else if (propName === "style") overrideProps[propName] = {
|
|
11983
|
-
...slotPropValue,
|
|
11984
|
-
...childPropValue
|
|
11985
|
-
};
|
|
11986
|
-
else if (propName === "className") overrideProps[propName] = [
|
|
11987
|
-
slotPropValue,
|
|
11988
|
-
childPropValue
|
|
11989
|
-
].filter(Boolean).join(" ");
|
|
11990
|
-
}
|
|
11991
|
-
return {
|
|
11992
|
-
...slotProps,
|
|
11993
|
-
...overrideProps
|
|
11994
|
-
};
|
|
11995
|
-
}
|
|
11996
|
-
const $8927f6f2acc4f386$var$NODES = [
|
|
11854
|
+
var NODES = [
|
|
11997
11855
|
"a",
|
|
11998
11856
|
"button",
|
|
11999
11857
|
"div",
|
|
@@ -12011,53 +11869,47 @@
|
|
|
12011
11869
|
"svg",
|
|
12012
11870
|
"ul"
|
|
12013
11871
|
];
|
|
12014
|
-
|
|
12015
|
-
const
|
|
11872
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
11873
|
+
const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
|
|
11874
|
+
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
12016
11875
|
const { asChild, ...primitiveProps } = props;
|
|
12017
|
-
const Comp = asChild ?
|
|
12018
|
-
|
|
11876
|
+
const Comp = asChild ? Slot2 : node;
|
|
11877
|
+
if (typeof window !== "undefined") {
|
|
12019
11878
|
window[Symbol.for("radix-ui")] = true;
|
|
12020
|
-
}
|
|
12021
|
-
return /* @__PURE__ */
|
|
12022
|
-
ref: forwardedRef
|
|
12023
|
-
}));
|
|
11879
|
+
}
|
|
11880
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
12024
11881
|
});
|
|
12025
11882
|
Node.displayName = `Primitive.${node}`;
|
|
12026
|
-
return {
|
|
12027
|
-
...primitive,
|
|
12028
|
-
[node]: Node
|
|
12029
|
-
};
|
|
11883
|
+
return { ...primitive, [node]: Node };
|
|
12030
11884
|
}, {});
|
|
12031
|
-
function
|
|
12032
|
-
const callbackRef =
|
|
12033
|
-
|
|
11885
|
+
function useCallbackRef(callback) {
|
|
11886
|
+
const callbackRef = React__namespace.useRef(callback);
|
|
11887
|
+
React__namespace.useEffect(() => {
|
|
12034
11888
|
callbackRef.current = callback;
|
|
12035
11889
|
});
|
|
12036
|
-
return
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
},
|
|
12041
|
-
[]
|
|
12042
|
-
);
|
|
11890
|
+
return React__namespace.useMemo(() => (...args) => {
|
|
11891
|
+
var _a;
|
|
11892
|
+
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
|
11893
|
+
}, []);
|
|
12043
11894
|
}
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
const
|
|
12057
|
-
|
|
12058
|
-
|
|
12059
|
-
);
|
|
12060
|
-
const
|
|
11895
|
+
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
11896
|
+
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
11897
|
+
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
11898
|
+
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
11899
|
+
var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
|
|
11900
|
+
const {
|
|
11901
|
+
loop = false,
|
|
11902
|
+
trapped = false,
|
|
11903
|
+
onMountAutoFocus: onMountAutoFocusProp,
|
|
11904
|
+
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
11905
|
+
...scopeProps
|
|
11906
|
+
} = props;
|
|
11907
|
+
const [container2, setContainer] = React__namespace.useState(null);
|
|
11908
|
+
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
11909
|
+
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
11910
|
+
const lastFocusedElementRef = React__namespace.useRef(null);
|
|
11911
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
11912
|
+
const focusScope = React__namespace.useRef({
|
|
12061
11913
|
paused: false,
|
|
12062
11914
|
pause() {
|
|
12063
11915
|
this.paused = true;
|
|
@@ -12066,137 +11918,114 @@
|
|
|
12066
11918
|
this.paused = false;
|
|
12067
11919
|
}
|
|
12068
11920
|
}).current;
|
|
12069
|
-
|
|
11921
|
+
React__namespace.useEffect(() => {
|
|
12070
11922
|
if (trapped) {
|
|
12071
|
-
let
|
|
12072
|
-
if (focusScope.paused || !
|
|
11923
|
+
let handleFocusIn2 = function(event) {
|
|
11924
|
+
if (focusScope.paused || !container2) return;
|
|
12073
11925
|
const target2 = event.target;
|
|
12074
|
-
if (
|
|
12075
|
-
|
|
12076
|
-
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
|
|
11926
|
+
if (container2.contains(target2)) {
|
|
11927
|
+
lastFocusedElementRef.current = target2;
|
|
11928
|
+
} else {
|
|
11929
|
+
focus(lastFocusedElementRef.current, { select: true });
|
|
11930
|
+
}
|
|
11931
|
+
}, handleFocusOut2 = function(event) {
|
|
11932
|
+
if (focusScope.paused || !container2) return;
|
|
12080
11933
|
const relatedTarget = event.relatedTarget;
|
|
12081
11934
|
if (relatedTarget === null) return;
|
|
12082
|
-
if (!
|
|
12083
|
-
select: true
|
|
12084
|
-
}
|
|
11935
|
+
if (!container2.contains(relatedTarget)) {
|
|
11936
|
+
focus(lastFocusedElementRef.current, { select: true });
|
|
11937
|
+
}
|
|
12085
11938
|
}, handleMutations2 = function(mutations2) {
|
|
12086
11939
|
const focusedElement = document.activeElement;
|
|
12087
11940
|
if (focusedElement !== document.body) return;
|
|
12088
|
-
for (const mutation of mutations2)
|
|
11941
|
+
for (const mutation of mutations2) {
|
|
11942
|
+
if (mutation.removedNodes.length > 0) focus(container2);
|
|
11943
|
+
}
|
|
12089
11944
|
};
|
|
12090
|
-
document.addEventListener("focusin",
|
|
12091
|
-
document.addEventListener("focusout",
|
|
11945
|
+
document.addEventListener("focusin", handleFocusIn2);
|
|
11946
|
+
document.addEventListener("focusout", handleFocusOut2);
|
|
12092
11947
|
const mutationObserver = new MutationObserver(handleMutations2);
|
|
12093
|
-
if (
|
|
12094
|
-
childList: true,
|
|
12095
|
-
subtree: true
|
|
12096
|
-
});
|
|
11948
|
+
if (container2) mutationObserver.observe(container2, { childList: true, subtree: true });
|
|
12097
11949
|
return () => {
|
|
12098
|
-
document.removeEventListener("focusin",
|
|
12099
|
-
document.removeEventListener("focusout",
|
|
11950
|
+
document.removeEventListener("focusin", handleFocusIn2);
|
|
11951
|
+
document.removeEventListener("focusout", handleFocusOut2);
|
|
12100
11952
|
mutationObserver.disconnect();
|
|
12101
11953
|
};
|
|
12102
11954
|
}
|
|
12103
|
-
}, [
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
|
|
12107
|
-
]);
|
|
12108
|
-
React.useEffect(() => {
|
|
12109
|
-
if (container1) {
|
|
12110
|
-
$d3863c46a17e8a28$var$focusScopesStack.add(focusScope);
|
|
11955
|
+
}, [trapped, container2, focusScope.paused]);
|
|
11956
|
+
React__namespace.useEffect(() => {
|
|
11957
|
+
if (container2) {
|
|
11958
|
+
focusScopesStack.add(focusScope);
|
|
12111
11959
|
const previouslyFocusedElement = document.activeElement;
|
|
12112
|
-
const hasFocusedCandidate =
|
|
11960
|
+
const hasFocusedCandidate = container2.contains(previouslyFocusedElement);
|
|
12113
11961
|
if (!hasFocusedCandidate) {
|
|
12114
|
-
const mountEvent = new CustomEvent(
|
|
12115
|
-
|
|
12116
|
-
|
|
11962
|
+
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
|
11963
|
+
container2.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
11964
|
+
container2.dispatchEvent(mountEvent);
|
|
12117
11965
|
if (!mountEvent.defaultPrevented) {
|
|
12118
|
-
|
|
12119
|
-
|
|
12120
|
-
|
|
12121
|
-
|
|
11966
|
+
focusFirst(removeLinks(getTabbableCandidates(container2)), { select: true });
|
|
11967
|
+
if (document.activeElement === previouslyFocusedElement) {
|
|
11968
|
+
focus(container2);
|
|
11969
|
+
}
|
|
12122
11970
|
}
|
|
12123
11971
|
}
|
|
12124
11972
|
return () => {
|
|
12125
|
-
|
|
11973
|
+
container2.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
12126
11974
|
setTimeout(() => {
|
|
12127
|
-
const unmountEvent = new CustomEvent(
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
if (!unmountEvent.defaultPrevented)
|
|
12131
|
-
select: true
|
|
12132
|
-
}
|
|
12133
|
-
|
|
12134
|
-
|
|
11975
|
+
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
|
11976
|
+
container2.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
11977
|
+
container2.dispatchEvent(unmountEvent);
|
|
11978
|
+
if (!unmountEvent.defaultPrevented) {
|
|
11979
|
+
focus(previouslyFocusedElement ?? document.body, { select: true });
|
|
11980
|
+
}
|
|
11981
|
+
container2.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
11982
|
+
focusScopesStack.remove(focusScope);
|
|
12135
11983
|
}, 0);
|
|
12136
11984
|
};
|
|
12137
11985
|
}
|
|
12138
|
-
}, [
|
|
12139
|
-
|
|
12140
|
-
|
|
12141
|
-
|
|
12142
|
-
|
|
12143
|
-
|
|
12144
|
-
|
|
12145
|
-
|
|
12146
|
-
|
|
12147
|
-
|
|
12148
|
-
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
select: true
|
|
12160
|
-
});
|
|
12161
|
-
} else if (event.shiftKey && focusedElement === first) {
|
|
12162
|
-
event.preventDefault();
|
|
12163
|
-
if (loop) $d3863c46a17e8a28$var$focus(last, {
|
|
12164
|
-
select: true
|
|
12165
|
-
});
|
|
11986
|
+
}, [container2, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
11987
|
+
const handleKeyDown = React__namespace.useCallback(
|
|
11988
|
+
(event) => {
|
|
11989
|
+
if (!loop && !trapped) return;
|
|
11990
|
+
if (focusScope.paused) return;
|
|
11991
|
+
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
11992
|
+
const focusedElement = document.activeElement;
|
|
11993
|
+
if (isTabKey && focusedElement) {
|
|
11994
|
+
const container22 = event.currentTarget;
|
|
11995
|
+
const [first, last] = getTabbableEdges(container22);
|
|
11996
|
+
const hasTabbableElementsInside = first && last;
|
|
11997
|
+
if (!hasTabbableElementsInside) {
|
|
11998
|
+
if (focusedElement === container22) event.preventDefault();
|
|
11999
|
+
} else {
|
|
12000
|
+
if (!event.shiftKey && focusedElement === last) {
|
|
12001
|
+
event.preventDefault();
|
|
12002
|
+
if (loop) focus(first, { select: true });
|
|
12003
|
+
} else if (event.shiftKey && focusedElement === first) {
|
|
12004
|
+
event.preventDefault();
|
|
12005
|
+
if (loop) focus(last, { select: true });
|
|
12006
|
+
}
|
|
12166
12007
|
}
|
|
12167
12008
|
}
|
|
12168
|
-
}
|
|
12169
|
-
|
|
12170
|
-
|
|
12171
|
-
|
|
12172
|
-
focusScope.paused
|
|
12173
|
-
]);
|
|
12174
|
-
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
12175
|
-
tabIndex: -1
|
|
12176
|
-
}, scopeProps, {
|
|
12177
|
-
ref: composedRefs,
|
|
12178
|
-
onKeyDown: handleKeyDown
|
|
12179
|
-
}));
|
|
12009
|
+
},
|
|
12010
|
+
[loop, trapped, focusScope.paused]
|
|
12011
|
+
);
|
|
12012
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
12180
12013
|
});
|
|
12181
|
-
|
|
12014
|
+
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
12015
|
+
function focusFirst(candidates, { select = false } = {}) {
|
|
12182
12016
|
const previouslyFocusedElement = document.activeElement;
|
|
12183
12017
|
for (const candidate of candidates) {
|
|
12184
|
-
|
|
12185
|
-
select
|
|
12186
|
-
});
|
|
12018
|
+
focus(candidate, { select });
|
|
12187
12019
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
12188
12020
|
}
|
|
12189
12021
|
}
|
|
12190
|
-
function
|
|
12191
|
-
const candidates =
|
|
12192
|
-
const first =
|
|
12193
|
-
const last =
|
|
12194
|
-
return [
|
|
12195
|
-
first,
|
|
12196
|
-
last
|
|
12197
|
-
];
|
|
12022
|
+
function getTabbableEdges(container2) {
|
|
12023
|
+
const candidates = getTabbableCandidates(container2);
|
|
12024
|
+
const first = findVisible(candidates, container2);
|
|
12025
|
+
const last = findVisible(candidates.reverse(), container2);
|
|
12026
|
+
return [first, last];
|
|
12198
12027
|
}
|
|
12199
|
-
function
|
|
12028
|
+
function getTabbableCandidates(container2) {
|
|
12200
12029
|
const nodes = [];
|
|
12201
12030
|
const walker = document.createTreeWalker(container2, NodeFilter.SHOW_ELEMENT, {
|
|
12202
12031
|
acceptNode: (node) => {
|
|
@@ -12208,14 +12037,12 @@
|
|
|
12208
12037
|
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
12209
12038
|
return nodes;
|
|
12210
12039
|
}
|
|
12211
|
-
function
|
|
12040
|
+
function findVisible(elements, container2) {
|
|
12212
12041
|
for (const element of elements) {
|
|
12213
|
-
if (
|
|
12214
|
-
upTo: container2
|
|
12215
|
-
})) return element;
|
|
12042
|
+
if (!isHidden(element, { upTo: container2 })) return element;
|
|
12216
12043
|
}
|
|
12217
12044
|
}
|
|
12218
|
-
function
|
|
12045
|
+
function isHidden(node, { upTo }) {
|
|
12219
12046
|
if (getComputedStyle(node).visibility === "hidden") return true;
|
|
12220
12047
|
while (node) {
|
|
12221
12048
|
if (upTo !== void 0 && node === upTo) return false;
|
|
@@ -12224,47 +12051,46 @@
|
|
|
12224
12051
|
}
|
|
12225
12052
|
return false;
|
|
12226
12053
|
}
|
|
12227
|
-
function
|
|
12054
|
+
function isSelectableInput(element) {
|
|
12228
12055
|
return element instanceof HTMLInputElement && "select" in element;
|
|
12229
12056
|
}
|
|
12230
|
-
function
|
|
12057
|
+
function focus(element, { select = false } = {}) {
|
|
12231
12058
|
if (element && element.focus) {
|
|
12232
12059
|
const previouslyFocusedElement = document.activeElement;
|
|
12233
|
-
element.focus({
|
|
12234
|
-
|
|
12235
|
-
|
|
12236
|
-
if (element !== previouslyFocusedElement && $d3863c46a17e8a28$var$isSelectableInput(element) && select) element.select();
|
|
12060
|
+
element.focus({ preventScroll: true });
|
|
12061
|
+
if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
|
|
12062
|
+
element.select();
|
|
12237
12063
|
}
|
|
12238
12064
|
}
|
|
12239
|
-
|
|
12240
|
-
function
|
|
12065
|
+
var focusScopesStack = createFocusScopesStack();
|
|
12066
|
+
function createFocusScopesStack() {
|
|
12241
12067
|
let stack = [];
|
|
12242
12068
|
return {
|
|
12243
12069
|
add(focusScope) {
|
|
12244
12070
|
const activeFocusScope = stack[0];
|
|
12245
|
-
if (focusScope !== activeFocusScope)
|
|
12246
|
-
|
|
12071
|
+
if (focusScope !== activeFocusScope) {
|
|
12072
|
+
activeFocusScope == null ? void 0 : activeFocusScope.pause();
|
|
12073
|
+
}
|
|
12074
|
+
stack = arrayRemove(stack, focusScope);
|
|
12247
12075
|
stack.unshift(focusScope);
|
|
12248
12076
|
},
|
|
12249
12077
|
remove(focusScope) {
|
|
12250
|
-
var
|
|
12251
|
-
stack =
|
|
12252
|
-
(
|
|
12078
|
+
var _a;
|
|
12079
|
+
stack = arrayRemove(stack, focusScope);
|
|
12080
|
+
(_a = stack[0]) == null ? void 0 : _a.resume();
|
|
12253
12081
|
}
|
|
12254
12082
|
};
|
|
12255
12083
|
}
|
|
12256
|
-
function
|
|
12257
|
-
const updatedArray = [
|
|
12258
|
-
...array
|
|
12259
|
-
];
|
|
12084
|
+
function arrayRemove(array, item) {
|
|
12085
|
+
const updatedArray = [...array];
|
|
12260
12086
|
const index = updatedArray.indexOf(item);
|
|
12261
|
-
if (index !== -1)
|
|
12087
|
+
if (index !== -1) {
|
|
12088
|
+
updatedArray.splice(index, 1);
|
|
12089
|
+
}
|
|
12262
12090
|
return updatedArray;
|
|
12263
12091
|
}
|
|
12264
|
-
function
|
|
12265
|
-
return items.filter(
|
|
12266
|
-
(item) => item.tagName !== "A"
|
|
12267
|
-
);
|
|
12092
|
+
function removeLinks(items) {
|
|
12093
|
+
return items.filter((item) => item.tagName !== "A");
|
|
12268
12094
|
}
|
|
12269
12095
|
const themeVars$m = `'{"Input:fontSize-Select-default": "var(--xmlui-fontSize-Select-default)", "Input:textColor-placeholder-Select-default": "var(--xmlui-textColor-placeholder-Select-default)", "Input:textColor-Select-default": "var(--xmlui-textColor-Select-default)", "Input:fontSize-Select-error": "var(--xmlui-fontSize-Select-error)", "Input:textColor-placeholder-Select-error": "var(--xmlui-textColor-placeholder-Select-error)", "Input:textColor-Select-error": "var(--xmlui-textColor-Select-error)", "Input:fontSize-Select-warning": "var(--xmlui-fontSize-Select-warning)", "Input:textColor-placeholder-Select-warning": "var(--xmlui-textColor-placeholder-Select-warning)", "Input:textColor-Select-warning": "var(--xmlui-textColor-Select-warning)", "Input:fontSize-Select-success": "var(--xmlui-fontSize-Select-success)", "Input:textColor-placeholder-Select-success": "var(--xmlui-textColor-placeholder-Select-success)", "Input:textColor-Select-success": "var(--xmlui-textColor-Select-success)", "Input:borderRadius-Select-default": "var(--xmlui-borderRadius-Select-default)", "Input:borderColor-Select-default": "var(--xmlui-borderColor-Select-default)", "Input:borderWidth-Select-default": "var(--xmlui-borderWidth-Select-default)", "Input:borderStyle-Select-default": "var(--xmlui-borderStyle-Select-default)", "Input:backgroundColor-Select-default": "var(--xmlui-backgroundColor-Select-default)", "Input:boxShadow-Select-default": "var(--xmlui-boxShadow-Select-default)", "Input:borderColor-Select-default--hover": "var(--xmlui-borderColor-Select-default--hover)", "Input:backgroundColor-Select-default--hover": "var(--xmlui-backgroundColor-Select-default--hover)", "Input:boxShadow-Select-default--hover": "var(--xmlui-boxShadow-Select-default--hover)", "Input:textColor-Select-default--hover": "var(--xmlui-textColor-Select-default--hover)", "Input:outlineWidth-Select-default--focus": "var(--xmlui-outlineWidth-Select-default--focus)", "Input:outlineColor-Select-default--focus": "var(--xmlui-outlineColor-Select-default--focus)", "Input:outlineStyle-Select-default--focus": "var(--xmlui-outlineStyle-Select-default--focus)", "Input:outlineOffset-Select-default--focus": "var(--xmlui-outlineOffset-Select-default--focus)", "Input:borderRadius-Select-error": "var(--xmlui-borderRadius-Select-error)", "Input:borderColor-Select-error": "var(--xmlui-borderColor-Select-error)", "Input:borderWidth-Select-error": "var(--xmlui-borderWidth-Select-error)", "Input:borderStyle-Select-error": "var(--xmlui-borderStyle-Select-error)", "Input:backgroundColor-Select-error": "var(--xmlui-backgroundColor-Select-error)", "Input:boxShadow-Select-error": "var(--xmlui-boxShadow-Select-error)", "Input:borderColor-Select-error--hover": "var(--xmlui-borderColor-Select-error--hover)", "Input:backgroundColor-Select-error--hover": "var(--xmlui-backgroundColor-Select-error--hover)", "Input:boxShadow-Select-error--hover": "var(--xmlui-boxShadow-Select-error--hover)", "Input:textColor-Select-error--hover": "var(--xmlui-textColor-Select-error--hover)", "Input:outlineWidth-Select-error--focus": "var(--xmlui-outlineWidth-Select-error--focus)", "Input:outlineColor-Select-error--focus": "var(--xmlui-outlineColor-Select-error--focus)", "Input:outlineStyle-Select-error--focus": "var(--xmlui-outlineStyle-Select-error--focus)", "Input:outlineOffset-Select-error--focus": "var(--xmlui-outlineOffset-Select-error--focus)", "Input:borderRadius-Select-warning": "var(--xmlui-borderRadius-Select-warning)", "Input:borderColor-Select-warning": "var(--xmlui-borderColor-Select-warning)", "Input:borderWidth-Select-warning": "var(--xmlui-borderWidth-Select-warning)", "Input:borderStyle-Select-warning": "var(--xmlui-borderStyle-Select-warning)", "Input:backgroundColor-Select-warning": "var(--xmlui-backgroundColor-Select-warning)", "Input:boxShadow-Select-warning": "var(--xmlui-boxShadow-Select-warning)", "Input:borderColor-Select-warning--hover": "var(--xmlui-borderColor-Select-warning--hover)", "Input:backgroundColor-Select-warning--hover": "var(--xmlui-backgroundColor-Select-warning--hover)", "Input:boxShadow-Select-warning--hover": "var(--xmlui-boxShadow-Select-warning--hover)", "Input:textColor-Select-warning--hover": "var(--xmlui-textColor-Select-warning--hover)", "Input:outlineWidth-Select-warning--focus": "var(--xmlui-outlineWidth-Select-warning--focus)", "Input:outlineColor-Select-warning--focus": "var(--xmlui-outlineColor-Select-warning--focus)", "Input:outlineStyle-Select-warning--focus": "var(--xmlui-outlineStyle-Select-warning--focus)", "Input:outlineOffset-Select-warning--focus": "var(--xmlui-outlineOffset-Select-warning--focus)", "Input:borderRadius-Select-success": "var(--xmlui-borderRadius-Select-success)", "Input:borderColor-Select-success": "var(--xmlui-borderColor-Select-success)", "Input:borderWidth-Select-success": "var(--xmlui-borderWidth-Select-success)", "Input:borderStyle-Select-success": "var(--xmlui-borderStyle-Select-success)", "Input:backgroundColor-Select-success": "var(--xmlui-backgroundColor-Select-success)", "Input:boxShadow-Select-success": "var(--xmlui-boxShadow-Select-success)", "Input:borderColor-Select-success--hover": "var(--xmlui-borderColor-Select-success--hover)", "Input:backgroundColor-Select-success--hover": "var(--xmlui-backgroundColor-Select-success--hover)", "Input:boxShadow-Select-success--hover": "var(--xmlui-boxShadow-Select-success--hover)", "Input:textColor-Select-success--hover": "var(--xmlui-textColor-Select-success--hover)", "Input:outlineWidth-Select-success--focus": "var(--xmlui-outlineWidth-Select-success--focus)", "Input:outlineColor-Select-success--focus": "var(--xmlui-outlineColor-Select-success--focus)", "Input:outlineStyle-Select-success--focus": "var(--xmlui-outlineStyle-Select-success--focus)", "Input:outlineOffset-Select-success--focus": "var(--xmlui-outlineOffset-Select-success--focus)", "opacity-Select--disabled": "var(--xmlui-opacity-Select--disabled)", "Input:backgroundColor-Select--disabled": "var(--xmlui-backgroundColor-Select--disabled)", "Input:textColor-Select--disabled": "var(--xmlui-textColor-Select--disabled)", "Input:borderColor-Select--disabled": "var(--xmlui-borderColor-Select--disabled)", "paddingVertical-Select-badge": "var(--xmlui-paddingVertical-Select-badge)", "paddingHorizontal-Select-badge": "var(--xmlui-paddingHorizontal-Select-badge)", "Input:fontSize-Select-badge": "var(--xmlui-fontSize-Select-badge)", "Input:backgroundColor-Select-badge": "var(--xmlui-backgroundColor-Select-badge)", "Input:textColor-Select-badge": "var(--xmlui-textColor-Select-badge)", "Input:backgroundColor-Select-badge--hover": "var(--xmlui-backgroundColor-Select-badge--hover)", "Input:textColor-Select-badge--hover": "var(--xmlui-textColor-Select-badge--hover)", "Input:backgroundColor-Select-badge--active": "var(--xmlui-backgroundColor-Select-badge--active)", "Input:textColor-Select-badge--active": "var(--xmlui-textColor-Select-badge--active)", "Input:textColor-placeholder-Select": "var(--xmlui-textColor-placeholder-Select)", "Input:backgroundColor-menu-Select": "var(--xmlui-backgroundColor-menu-Select)", "Input:borderRadius-menu-Select": "var(--xmlui-borderRadius-menu-Select)", "Input:boxShadow-menu-Select": "var(--xmlui-boxShadow-menu-Select)", "Input:borderWidth-menu-Select": "var(--xmlui-borderWidth-menu-Select)", "Input:borderColor-menu-Select": "var(--xmlui-borderColor-menu-Select)", "backgroundColor-item-Select": "var(--xmlui-backgroundColor-item-Select)", "backgroundColor-item-Select--hover": "var(--xmlui-backgroundColor-item-Select--hover)", "opacity-text-item-Select--disabled": "var(--xmlui-opacity-text-item-Select--disabled)", "fontSize-Select": "var(--xmlui-fontSize-Select)", "backgroundColor-item-Select--active": "var(--xmlui-backgroundColor-item-Select--active)", "textColor-indicator-Select": "var(--xmlui-textColor-indicator-Select)"}'`;
|
|
12270
12096
|
const selectValue = "_selectValue_w44f3_13";
|
|
@@ -12496,7 +12322,7 @@
|
|
|
12496
12322
|
updateState({ value: newValue });
|
|
12497
12323
|
onDidChange(newValue);
|
|
12498
12324
|
}, [multiSelect, updateState, onDidChange]);
|
|
12499
|
-
const
|
|
12325
|
+
const focus2 = React.useCallback(() => {
|
|
12500
12326
|
referenceElement == null ? void 0 : referenceElement.focus();
|
|
12501
12327
|
}, [referenceElement]);
|
|
12502
12328
|
const setValue = useEvent((newValue) => {
|
|
@@ -12504,10 +12330,10 @@
|
|
|
12504
12330
|
});
|
|
12505
12331
|
React.useEffect(() => {
|
|
12506
12332
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
12507
|
-
focus,
|
|
12333
|
+
focus: focus2,
|
|
12508
12334
|
setValue
|
|
12509
12335
|
});
|
|
12510
|
-
}, [
|
|
12336
|
+
}, [focus2, registerComponentApi, setValue]);
|
|
12511
12337
|
const emptyListNode = React.useMemo(
|
|
12512
12338
|
() => emptyListTemplate ?? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$o.selectEmpty, children: [
|
|
12513
12339
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "noresult" }),
|
|
@@ -12614,7 +12440,7 @@
|
|
|
12614
12440
|
]
|
|
12615
12441
|
}
|
|
12616
12442
|
) }),
|
|
12617
|
-
open && /* @__PURE__ */ jsxRuntime.jsx(reactSelect.Portal, { container: root2, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12443
|
+
open && /* @__PURE__ */ jsxRuntime.jsx(reactSelect.Portal, { container: root2, children: /* @__PURE__ */ jsxRuntime.jsx(FocusScope, { asChild: true, loop: true, trapped: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12618
12444
|
reactPopover.PopoverContent,
|
|
12619
12445
|
{
|
|
12620
12446
|
style: { width, height: dropdownHeight },
|
|
@@ -13050,7 +12876,7 @@
|
|
|
13050
12876
|
setFocused(false);
|
|
13051
12877
|
onBlur == null ? void 0 : onBlur();
|
|
13052
12878
|
};
|
|
13053
|
-
const
|
|
12879
|
+
const focus2 = React.useCallback(() => {
|
|
13054
12880
|
setTimeout(() => {
|
|
13055
12881
|
var _a;
|
|
13056
12882
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
@@ -13087,11 +12913,11 @@
|
|
|
13087
12913
|
}, [value, cursorPosition, inputRef]);
|
|
13088
12914
|
React.useEffect(() => {
|
|
13089
12915
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
13090
|
-
focus,
|
|
12916
|
+
focus: focus2,
|
|
13091
12917
|
insert,
|
|
13092
12918
|
setValue
|
|
13093
12919
|
});
|
|
13094
|
-
}, [
|
|
12920
|
+
}, [focus2, insert, registerComponentApi, setValue]);
|
|
13095
12921
|
const handleEnter = React.useCallback(
|
|
13096
12922
|
(e) => {
|
|
13097
12923
|
var _a, _b;
|
|
@@ -13373,7 +13199,7 @@
|
|
|
13373
13199
|
] }),
|
|
13374
13200
|
[emptyListTemplate]
|
|
13375
13201
|
);
|
|
13376
|
-
const
|
|
13202
|
+
const focus2 = React.useCallback(() => {
|
|
13377
13203
|
var _a;
|
|
13378
13204
|
(_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.focus();
|
|
13379
13205
|
}, [inputRef]);
|
|
@@ -13382,10 +13208,10 @@
|
|
|
13382
13208
|
});
|
|
13383
13209
|
React.useEffect(() => {
|
|
13384
13210
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
13385
|
-
focus,
|
|
13211
|
+
focus: focus2,
|
|
13386
13212
|
setValue
|
|
13387
13213
|
});
|
|
13388
|
-
}, [
|
|
13214
|
+
}, [focus2, registerComponentApi, setValue]);
|
|
13389
13215
|
const optionContextValue = React.useMemo(
|
|
13390
13216
|
() => ({
|
|
13391
13217
|
onOptionAdd,
|
|
@@ -13756,7 +13582,7 @@
|
|
|
13756
13582
|
const handleOnBlur = React.useCallback(() => {
|
|
13757
13583
|
onBlur == null ? void 0 : onBlur();
|
|
13758
13584
|
}, [onBlur]);
|
|
13759
|
-
const
|
|
13585
|
+
const focus2 = React.useCallback(() => {
|
|
13760
13586
|
var _a;
|
|
13761
13587
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
13762
13588
|
}, []);
|
|
@@ -13765,10 +13591,10 @@
|
|
|
13765
13591
|
});
|
|
13766
13592
|
React.useEffect(() => {
|
|
13767
13593
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
13768
|
-
focus,
|
|
13594
|
+
focus: focus2,
|
|
13769
13595
|
setValue
|
|
13770
13596
|
});
|
|
13771
|
-
}, [
|
|
13597
|
+
}, [focus2, registerComponentApi, setValue]);
|
|
13772
13598
|
const displayValue = localValue.length > 0 ? localValue : [min];
|
|
13773
13599
|
const valuesText = displayValue.map((v) => valueFormat(v)).join(", ");
|
|
13774
13600
|
const displayLabel = label2 ? showValues ? `${label2} ${valuesText}` : label2 : showValues ? valuesText : "";
|
|
@@ -13909,7 +13735,7 @@
|
|
|
13909
13735
|
const handleOnBlur = React.useCallback(() => {
|
|
13910
13736
|
onBlur == null ? void 0 : onBlur();
|
|
13911
13737
|
}, [onBlur]);
|
|
13912
|
-
const
|
|
13738
|
+
const focus2 = React.useCallback(() => {
|
|
13913
13739
|
var _a;
|
|
13914
13740
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
13915
13741
|
}, []);
|
|
@@ -13918,10 +13744,10 @@
|
|
|
13918
13744
|
});
|
|
13919
13745
|
React.useEffect(() => {
|
|
13920
13746
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
13921
|
-
focus,
|
|
13747
|
+
focus: focus2,
|
|
13922
13748
|
setValue
|
|
13923
13749
|
});
|
|
13924
|
-
}, [
|
|
13750
|
+
}, [focus2, registerComponentApi, setValue]);
|
|
13925
13751
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13926
13752
|
ItemWithLabel,
|
|
13927
13753
|
{
|
|
@@ -13974,10 +13800,78 @@
|
|
|
13974
13800
|
error,
|
|
13975
13801
|
warning
|
|
13976
13802
|
};
|
|
13803
|
+
var DefaultContext = {
|
|
13804
|
+
color: void 0,
|
|
13805
|
+
size: void 0,
|
|
13806
|
+
className: void 0,
|
|
13807
|
+
style: void 0,
|
|
13808
|
+
attr: void 0
|
|
13809
|
+
};
|
|
13810
|
+
var IconContext = React.createContext && React.createContext(DefaultContext);
|
|
13811
|
+
var __assign = function() {
|
|
13812
|
+
__assign = Object.assign || function(t) {
|
|
13813
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
13814
|
+
s = arguments[i];
|
|
13815
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
13816
|
+
}
|
|
13817
|
+
return t;
|
|
13818
|
+
};
|
|
13819
|
+
return __assign.apply(this, arguments);
|
|
13820
|
+
};
|
|
13821
|
+
var __rest = function(s, e) {
|
|
13822
|
+
var t = {};
|
|
13823
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
13824
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
13825
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
13826
|
+
}
|
|
13827
|
+
return t;
|
|
13828
|
+
};
|
|
13829
|
+
function Tree2Element(tree) {
|
|
13830
|
+
return tree && tree.map(function(node, i) {
|
|
13831
|
+
return React.createElement(node.tag, __assign({
|
|
13832
|
+
key: i
|
|
13833
|
+
}, node.attr), Tree2Element(node.child));
|
|
13834
|
+
});
|
|
13835
|
+
}
|
|
13836
|
+
function GenIcon(data) {
|
|
13837
|
+
return function(props) {
|
|
13838
|
+
return React.createElement(IconBase, __assign({
|
|
13839
|
+
attr: __assign({}, data.attr)
|
|
13840
|
+
}, props), Tree2Element(data.child));
|
|
13841
|
+
};
|
|
13842
|
+
}
|
|
13843
|
+
function IconBase(props) {
|
|
13844
|
+
var elem = function(conf) {
|
|
13845
|
+
var attr = props.attr, size = props.size, title2 = props.title, svgProps = __rest(props, ["attr", "size", "title"]);
|
|
13846
|
+
var computedSize = size || conf.size || "1em";
|
|
13847
|
+
var className;
|
|
13848
|
+
if (conf.className) className = conf.className;
|
|
13849
|
+
if (props.className) className = (className ? className + " " : "") + props.className;
|
|
13850
|
+
return React.createElement("svg", __assign({
|
|
13851
|
+
stroke: "currentColor",
|
|
13852
|
+
fill: "currentColor",
|
|
13853
|
+
strokeWidth: "0"
|
|
13854
|
+
}, conf.attr, attr, svgProps, {
|
|
13855
|
+
className,
|
|
13856
|
+
style: __assign(__assign({
|
|
13857
|
+
color: props.color || conf.color
|
|
13858
|
+
}, conf.style), props.style),
|
|
13859
|
+
height: computedSize,
|
|
13860
|
+
width: computedSize,
|
|
13861
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
13862
|
+
}), title2 && React.createElement("title", null, title2), props.children);
|
|
13863
|
+
};
|
|
13864
|
+
return IconContext !== void 0 ? React.createElement(IconContext.Consumer, null, function(conf) {
|
|
13865
|
+
return elem(conf);
|
|
13866
|
+
}) : elem(DefaultContext);
|
|
13867
|
+
}
|
|
13977
13868
|
function AiOutlineWarning(props) {
|
|
13978
13869
|
return GenIcon({ "attr": { "viewBox": "0 0 1024 1024" }, "child": [{ "tag": "path", "attr": { "d": "M464 720a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z" } }] })(props);
|
|
13979
13870
|
}
|
|
13980
13871
|
const WarningIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(AiOutlineWarning, { ...props });
|
|
13872
|
+
function BiErrorCircle(props) {
|
|
13873
|
+
return GenIcon({ "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M11.953 2C6.465 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.493 2 11.953 2zM12 20c-4.411 0-8-3.589-8-8s3.567-8 7.953-8C16.391 4 20 7.589 20 12s-3.589 8-8 8z" } }, { "tag": "path", "attr": { "d": "M11 7h2v7h-2zm0 8h2v2h-2z" } }] })(props);
|
|
13874
|
+
}
|
|
13981
13875
|
const ErrorIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(BiErrorCircle, { ...props });
|
|
13982
13876
|
const HelperText = ({ text: text2 = "", status, style }) => {
|
|
13983
13877
|
const renderStatusIcon = () => {
|
|
@@ -16546,7 +16440,7 @@
|
|
|
16546
16440
|
availableWidth * (numberOfUnitsById[column.id] / numberOfAllUnits)
|
|
16547
16441
|
);
|
|
16548
16442
|
});
|
|
16549
|
-
|
|
16443
|
+
ReactDOM.flushSync(() => {
|
|
16550
16444
|
setColumnSizing((prev) => {
|
|
16551
16445
|
return {
|
|
16552
16446
|
...prev,
|