xmlui 0.9.11 → 0.9.12
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-BZP06llg.mjs → apiInterceptorWorker-dYrfbzdh.mjs} +1 -1
- package/dist/core-XLM8cuFP.mjs +7491 -0
- package/dist/{index-CFJ5_K_a.mjs → index-Dh2MThrK.mjs} +1672 -803
- package/dist/index.css +112 -98
- package/dist/language-server-web-worker.mjs +1 -1
- package/dist/language-server.mjs +1 -1
- package/dist/{lint-CiMcsEWf.mjs → lint-Cd70ckJ6.mjs} +84 -94
- package/dist/{parser-mzWvH7dz.mjs → parser-CBXS8ft2.mjs} +19 -17
- package/dist/scripts/bin/build-lib.js +42 -1
- package/dist/scripts/bin/vite-xmlui-plugin.js +2 -22
- package/dist/scripts/bin/viteConfig.js +3 -1
- package/dist/scripts/src/abstractions/ComponentDefs.js +2 -20
- package/dist/scripts/src/components/App/App.js +61 -21
- package/dist/scripts/src/components/Button/Button.js +5 -1
- package/dist/scripts/src/components/Button/ButtonNative.js +9 -2
- package/dist/scripts/src/components/Checkbox/Checkbox.js +2 -2
- package/dist/scripts/src/components/ComponentProvider.js +2 -0
- package/dist/scripts/src/components/Footer/Footer.js +1 -1
- package/dist/scripts/src/components/Form/FormContext.js +2 -0
- package/dist/scripts/src/components/FormItem/FormItemNative.js +9 -0
- package/dist/scripts/src/components/Items/Items.js +2 -1
- package/dist/scripts/src/components/List/List.js +2 -1
- package/dist/scripts/src/components/Markdown/Markdown.js +2 -0
- package/dist/scripts/src/components/NavPanel/NavPanel.js +2 -2
- package/dist/scripts/src/components/NumberBox/NumberBox2.js +85 -0
- package/dist/scripts/src/components/NumberBox/NumberBox2Native.js +395 -0
- package/dist/scripts/src/components/NumberBox/numberbox-abstractions.js +35 -0
- package/dist/scripts/src/components/Option/Option.js +2 -1
- package/dist/scripts/src/components/Select/Select.js +8 -0
- package/dist/scripts/src/components/Select/SelectNative.js +24 -10
- package/dist/scripts/src/components/Theme/ThemeNative.js +1 -0
- package/dist/scripts/src/components/VisuallyHidden.js +21 -0
- package/dist/scripts/src/components-core/loader/DataLoader.js +110 -3
- package/dist/scripts/src/components-core/loader/Loader.js +29 -7
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +4 -1
- package/dist/scripts/src/components-core/rendering/ComponentWrapper.js +23 -5
- package/dist/scripts/src/components-core/rendering/Container.js +23 -26
- package/dist/scripts/src/components-core/rendering/StateContainer.js +2 -4
- package/dist/scripts/src/components-core/rendering/reducer.js +6 -5
- package/dist/scripts/src/components-core/utils/extractParam.js +24 -7
- package/dist/scripts/src/components-core/xmlui-parser.js +1 -1
- package/dist/scripts/src/parsers/xmlui-parser/parser.js +1 -1
- package/dist/scripts/src/parsers/xmlui-parser/transform.js +0 -10
- package/dist/scripts/src/parsers/xmlui-parser/utils.js +6 -9
- package/dist/{server-common-DxRVCeIE.mjs → server-common-DW5h7Q34.mjs} +122 -64
- package/dist/style.css +112 -98
- package/dist/xmlui-metadata.mjs +861 -296
- package/dist/xmlui-metadata.umd.js +861 -298
- package/dist/xmlui-parser.d.ts +14 -9
- package/dist/xmlui-parser.mjs +34 -34
- package/dist/xmlui-standalone.umd.js +7204 -5266
- package/dist/xmlui.d.ts +3 -1
- package/dist/xmlui.mjs +1 -1
- package/package.json +5 -5
- package/dist/core-C-osEDc2.mjs +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
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-
|
|
3
|
-
})(this, function(exports2, jsxRuntime, React, classnames, lodashEs, react, reactDayPicker, dateFns, ReactDropdownMenu,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react"), require("classnames"), require("@radix-ui/react-visually-hidden"), 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-select"), require("@radix-ui/react-popover"), require("cmdk"), require("@radix-ui/react-radio-group"), require("react-textarea-autosize"), require("@radix-ui/react-slider"), require("@internationalized/number"), 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", "@radix-ui/react-visually-hidden", "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-select", "@radix-ui/react-popover", "cmdk", "@radix-ui/react-radio-group", "react-textarea-autosize", "@radix-ui/react-slider", "@internationalized/number", "@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.VisuallyHidden$1, global.lodashEs, global.react, global.reactDayPicker, global.dateFns, global.ReactDropdownMenu, global.ReactDOM, global.produce, global.SheetPrimitive, global.useContextSelector, global.dropzone, global.reactSelect, global.reactPopover, global.cmdk, global.InnerRadioGroup, global.TextareaAutosize, global.reactSlider, global.number, global.reactTable, global.reactVirtual, global.RAccordion, global.regexpp, global.useEmblaCarousel, global.Autoplay));
|
|
3
|
+
})(this, function(exports2, jsxRuntime, React, classnames, VisuallyHidden$1, lodashEs, react, reactDayPicker, dateFns, ReactDropdownMenu, reactDom, produce, SheetPrimitive, useContextSelector, dropzone, reactSelect, reactPopover, cmdk, InnerRadioGroup, TextareaAutosize, reactSlider, number, 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" } });
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
return Object.freeze(n);
|
|
20
20
|
}
|
|
21
21
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
22
|
+
const VisuallyHidden__namespace = /* @__PURE__ */ _interopNamespaceDefault(VisuallyHidden$1);
|
|
22
23
|
const ReactDropdownMenu__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDropdownMenu);
|
|
23
24
|
const SheetPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(SheetPrimitive);
|
|
24
25
|
const dropzone__namespace = /* @__PURE__ */ _interopNamespaceDefault(dropzone);
|
|
25
|
-
const VisuallyHidden__namespace = /* @__PURE__ */ _interopNamespaceDefault(VisuallyHidden);
|
|
26
26
|
const InnerRadioGroup__namespace = /* @__PURE__ */ _interopNamespaceDefault(InnerRadioGroup);
|
|
27
27
|
const RAccordion__namespace = /* @__PURE__ */ _interopNamespaceDefault(RAccordion);
|
|
28
28
|
const themeVars$R = `'{"padding-Button": "var(--xmlui-padding-Button)", "paddingHorizontal-Button": "var(--xmlui-paddingHorizontal-Button, var(--xmlui-padding-Button))", "paddingVertical-Button": "var(--xmlui-paddingVertical-Button, var(--xmlui-padding-Button))", "paddingLeft-Button": "var(--xmlui-paddingLeft-Button, var(--xmlui-paddingHorizontal-Button, var(--xmlui-padding-Button)))", "paddingRight-Button": "var(--xmlui-paddingRight-Button, var(--xmlui-paddingHorizontal-Button, var(--xmlui-padding-Button)))", "paddingTop-Button": "var(--xmlui-paddingTop-Button, var(--xmlui-paddingVertical-Button, var(--xmlui-padding-Button)))", "paddingBottom-Button": "var(--xmlui-paddingBottom-Button, var(--xmlui-paddingVertical-Button, var(--xmlui-padding-Button)))", "padding-Button-xs": "var(--xmlui-padding-Button-xs)", "paddingHorizontal-Button-xs": "var(--xmlui-paddingHorizontal-Button-xs, var(--xmlui-padding-Button-xs))", "paddingVertical-Button-xs": "var(--xmlui-paddingVertical-Button-xs, var(--xmlui-padding-Button-xs))", "paddingLeft-Button-xs": "var(--xmlui-paddingLeft-Button-xs, var(--xmlui-paddingHorizontal-Button-xs, var(--xmlui-padding-Button-xs)))", "paddingRight-Button-xs": "var(--xmlui-paddingRight-Button-xs, var(--xmlui-paddingHorizontal-Button-xs, var(--xmlui-padding-Button-xs)))", "paddingTop-Button-xs": "var(--xmlui-paddingTop-Button-xs, var(--xmlui-paddingVertical-Button-xs, var(--xmlui-padding-Button-xs)))", "paddingBottom-Button-xs": "var(--xmlui-paddingBottom-Button-xs, var(--xmlui-paddingVertical-Button-xs, var(--xmlui-padding-Button-xs)))", "padding-Button-sm": "var(--xmlui-padding-Button-sm)", "paddingHorizontal-Button-sm": "var(--xmlui-paddingHorizontal-Button-sm, var(--xmlui-padding-Button-sm))", "paddingVertical-Button-sm": "var(--xmlui-paddingVertical-Button-sm, var(--xmlui-padding-Button-sm))", "paddingLeft-Button-sm": "var(--xmlui-paddingLeft-Button-sm, var(--xmlui-paddingHorizontal-Button-sm, var(--xmlui-padding-Button-sm)))", "paddingRight-Button-sm": "var(--xmlui-paddingRight-Button-sm, var(--xmlui-paddingHorizontal-Button-sm, var(--xmlui-padding-Button-sm)))", "paddingTop-Button-sm": "var(--xmlui-paddingTop-Button-sm, var(--xmlui-paddingVertical-Button-sm, var(--xmlui-padding-Button-sm)))", "paddingBottom-Button-sm": "var(--xmlui-paddingBottom-Button-sm, var(--xmlui-paddingVertical-Button-sm, var(--xmlui-padding-Button-sm)))", "padding-Button-md": "var(--xmlui-padding-Button-md)", "paddingHorizontal-Button-md": "var(--xmlui-paddingHorizontal-Button-md, var(--xmlui-padding-Button-md))", "paddingVertical-Button-md": "var(--xmlui-paddingVertical-Button-md, var(--xmlui-padding-Button-md))", "paddingLeft-Button-md": "var(--xmlui-paddingLeft-Button-md, var(--xmlui-paddingHorizontal-Button-md, var(--xmlui-padding-Button-md)))", "paddingRight-Button-md": "var(--xmlui-paddingRight-Button-md, var(--xmlui-paddingHorizontal-Button-md, var(--xmlui-padding-Button-md)))", "paddingTop-Button-md": "var(--xmlui-paddingTop-Button-md, var(--xmlui-paddingVertical-Button-md, var(--xmlui-padding-Button-md)))", "paddingBottom-Button-md": "var(--xmlui-paddingBottom-Button-md, var(--xmlui-paddingVertical-Button-md, var(--xmlui-padding-Button-md)))", "padding-Button-lg": "var(--xmlui-padding-Button-lg)", "paddingHorizontal-Button-lg": "var(--xmlui-paddingHorizontal-Button-lg, var(--xmlui-padding-Button-lg))", "paddingVertical-Button-lg": "var(--xmlui-paddingVertical-Button-lg, var(--xmlui-padding-Button-lg))", "paddingLeft-Button-lg": "var(--xmlui-paddingLeft-Button-lg, var(--xmlui-paddingHorizontal-Button-lg, var(--xmlui-padding-Button-lg)))", "paddingRight-Button-lg": "var(--xmlui-paddingRight-Button-lg, var(--xmlui-paddingHorizontal-Button-lg, var(--xmlui-padding-Button-lg)))", "paddingTop-Button-lg": "var(--xmlui-paddingTop-Button-lg, var(--xmlui-paddingVertical-Button-lg, var(--xmlui-padding-Button-lg)))", "paddingBottom-Button-lg": "var(--xmlui-paddingBottom-Button-lg, var(--xmlui-paddingVertical-Button-lg, var(--xmlui-padding-Button-lg)))", "width-Button": "var(--xmlui-width-Button)", "height-Button": "var(--xmlui-height-Button)", "fontFamily-Button-primary-solid": "var(--xmlui-fontFamily-Button-primary-solid)", "fontSize-Button-primary-solid": "var(--xmlui-fontSize-Button-primary-solid)", "fontWeight-Button-primary-solid": "var(--xmlui-fontWeight-Button-primary-solid)", "borderRadius-Button-primary-solid": "var(--xmlui-borderRadius-Button-primary-solid)", "borderWidth-Button-primary-solid": "var(--xmlui-borderWidth-Button-primary-solid)", "borderColor-Button-primary-solid": "var(--xmlui-borderColor-Button-primary-solid)", "borderStyle-Button-primary-solid": "var(--xmlui-borderStyle-Button-primary-solid)", "backgroundColor-Button-primary-solid": "var(--xmlui-backgroundColor-Button-primary-solid)", "textColor-Button-primary-solid": "var(--xmlui-textColor-Button-primary-solid)", "boxShadow-Button-primary-solid": "var(--xmlui-boxShadow-Button-primary-solid)", "outlineWidth-Button-primary-solid--focus": "var(--xmlui-outlineWidth-Button-primary-solid--focus)", "outlineColor-Button-primary-solid--focus": "var(--xmlui-outlineColor-Button-primary-solid--focus)", "outlineStyle-Button-primary-solid--focus": "var(--xmlui-outlineStyle-Button-primary-solid--focus)", "outlineOffset-Button-primary-solid--focus": "var(--xmlui-outlineOffset-Button-primary-solid--focus)", "borderColor-Button-primary-solid--hover": "var(--xmlui-borderColor-Button-primary-solid--hover)", "textColor-Button-primary-solid--hover": "var(--xmlui-textColor-Button-primary-solid--hover)", "backgroundColor-Button-primary-solid--hover": "var(--xmlui-backgroundColor-Button-primary-solid--hover)", "borderColor-Button-primary-solid--active": "var(--xmlui-borderColor-Button-primary-solid--active)", "textColor-Button-primary-solid--active": "var(--xmlui-textColor-Button-primary-solid--active)", "boxShadow-Button-primary-solid--active": "var(--xmlui-boxShadow-Button-primary-solid--active)", "backgroundColor-Button-primary-solid--active": "var(--xmlui-backgroundColor-Button-primary-solid--active)", "backgroundColor-Button--disabled": "var(--xmlui-backgroundColor-Button--disabled)", "textColor-Button--disabled": "var(--xmlui-textColor-Button--disabled)", "borderColor-Button--disabled": "var(--xmlui-borderColor-Button--disabled)", "fontFamily-Button-secondary-solid": "var(--xmlui-fontFamily-Button-secondary-solid)", "fontSize-Button-secondary-solid": "var(--xmlui-fontSize-Button-secondary-solid)", "fontWeight-Button-secondary-solid": "var(--xmlui-fontWeight-Button-secondary-solid)", "borderRadius-Button-secondary-solid": "var(--xmlui-borderRadius-Button-secondary-solid)", "borderWidth-Button-secondary-solid": "var(--xmlui-borderWidth-Button-secondary-solid)", "borderColor-Button-secondary-solid": "var(--xmlui-borderColor-Button-secondary-solid)", "borderStyle-Button-secondary-solid": "var(--xmlui-borderStyle-Button-secondary-solid)", "backgroundColor-Button-secondary-solid": "var(--xmlui-backgroundColor-Button-secondary-solid)", "textColor-Button-secondary-solid": "var(--xmlui-textColor-Button-secondary-solid)", "boxShadow-Button-secondary-solid": "var(--xmlui-boxShadow-Button-secondary-solid)", "outlineWidth-Button-secondary-solid--focus": "var(--xmlui-outlineWidth-Button-secondary-solid--focus)", "outlineColor-Button-secondary-solid--focus": "var(--xmlui-outlineColor-Button-secondary-solid--focus)", "outlineStyle-Button-secondary-solid--focus": "var(--xmlui-outlineStyle-Button-secondary-solid--focus)", "outlineOffset-Button-secondary-solid--focus": "var(--xmlui-outlineOffset-Button-secondary-solid--focus)", "borderColor-Button-secondary-solid--hover": "var(--xmlui-borderColor-Button-secondary-solid--hover)", "textColor-Button-secondary-solid--hover": "var(--xmlui-textColor-Button-secondary-solid--hover)", "backgroundColor-Button-secondary-solid--hover": "var(--xmlui-backgroundColor-Button-secondary-solid--hover)", "borderColor-Button-secondary-solid--active": "var(--xmlui-borderColor-Button-secondary-solid--active)", "textColor-Button-secondary-solid--active": "var(--xmlui-textColor-Button-secondary-solid--active)", "boxShadow-Button-secondary-solid--active": "var(--xmlui-boxShadow-Button-secondary-solid--active)", "backgroundColor-Button-secondary-solid--active": "var(--xmlui-backgroundColor-Button-secondary-solid--active)", "fontFamily-Button-attention-solid": "var(--xmlui-fontFamily-Button-attention-solid)", "fontSize-Button-attention-solid": "var(--xmlui-fontSize-Button-attention-solid)", "fontWeight-Button-attention-solid": "var(--xmlui-fontWeight-Button-attention-solid)", "borderRadius-Button-attention-solid": "var(--xmlui-borderRadius-Button-attention-solid)", "borderWidth-Button-attention-solid": "var(--xmlui-borderWidth-Button-attention-solid)", "borderColor-Button-attention-solid": "var(--xmlui-borderColor-Button-attention-solid)", "borderStyle-Button-attention-solid": "var(--xmlui-borderStyle-Button-attention-solid)", "backgroundColor-Button-attention-solid": "var(--xmlui-backgroundColor-Button-attention-solid)", "textColor-Button-attention-solid": "var(--xmlui-textColor-Button-attention-solid)", "boxShadow-Button-attention-solid": "var(--xmlui-boxShadow-Button-attention-solid)", "outlineWidth-Button-attention-solid--focus": "var(--xmlui-outlineWidth-Button-attention-solid--focus)", "outlineColor-Button-attention-solid--focus": "var(--xmlui-outlineColor-Button-attention-solid--focus)", "outlineStyle-Button-attention-solid--focus": "var(--xmlui-outlineStyle-Button-attention-solid--focus)", "outlineOffset-Button-attention-solid--focus": "var(--xmlui-outlineOffset-Button-attention-solid--focus)", "borderColor-Button-attention-solid--hover": "var(--xmlui-borderColor-Button-attention-solid--hover)", "textColor-Button-attention-solid--hover": "var(--xmlui-textColor-Button-attention-solid--hover)", "backgroundColor-Button-attention-solid--hover": "var(--xmlui-backgroundColor-Button-attention-solid--hover)", "borderColor-Button-attention-solid--active": "var(--xmlui-borderColor-Button-attention-solid--active)", "textColor-Button-attention-solid--active": "var(--xmlui-textColor-Button-attention-solid--active)", "boxShadow-Button-attention-solid--active": "var(--xmlui-boxShadow-Button-attention-solid--active)", "backgroundColor-Button-attention-solid--active": "var(--xmlui-backgroundColor-Button-attention-solid--active)", "fontFamily-Button-primary-outlined": "var(--xmlui-fontFamily-Button-primary-outlined)", "fontSize-Button-primary-outlined": "var(--xmlui-fontSize-Button-primary-outlined)", "fontWeight-Button-primary-outlined": "var(--xmlui-fontWeight-Button-primary-outlined)", "borderRadius-Button-primary-outlined": "var(--xmlui-borderRadius-Button-primary-outlined)", "borderWidth-Button-primary-outlined": "var(--xmlui-borderWidth-Button-primary-outlined)", "borderColor-Button-primary-outlined": "var(--xmlui-borderColor-Button-primary-outlined)", "borderStyle-Button-primary-outlined": "var(--xmlui-borderStyle-Button-primary-outlined)", "textColor-Button-primary-outlined": "var(--xmlui-textColor-Button-primary-outlined)", "boxShadow-Button-primary-outlined": "var(--xmlui-boxShadow-Button-primary-outlined)", "outlineWidth-Button-primary-outlined--focus": "var(--xmlui-outlineWidth-Button-primary-outlined--focus)", "outlineColor-Button-primary-outlined--focus": "var(--xmlui-outlineColor-Button-primary-outlined--focus)", "outlineStyle-Button-primary-outlined--focus": "var(--xmlui-outlineStyle-Button-primary-outlined--focus)", "outlineOffset-Button-primary-outlined--focus": "var(--xmlui-outlineOffset-Button-primary-outlined--focus)", "borderColor-Button-primary-outlined--hover": "var(--xmlui-borderColor-Button-primary-outlined--hover)", "backgroundColor-Button-primary-outlined--hover": "var(--xmlui-backgroundColor-Button-primary-outlined--hover)", "textColor-Button-primary-outlined--hover": "var(--xmlui-textColor-Button-primary-outlined--hover)", "borderColor-Button-primary-outlined--active": "var(--xmlui-borderColor-Button-primary-outlined--active)", "backgroundColor-Button-primary-outlined--active": "var(--xmlui-backgroundColor-Button-primary-outlined--active)", "textColor-Button-primary-outlined--active": "var(--xmlui-textColor-Button-primary-outlined--active)", "fontFamily-Button-secondary-outlined": "var(--xmlui-fontFamily-Button-secondary-outlined)", "fontSize-Button-secondary-outlined": "var(--xmlui-fontSize-Button-secondary-outlined)", "fontWeight-Button-secondary-outlined": "var(--xmlui-fontWeight-Button-secondary-outlined)", "borderRadius-Button-secondary-outlined": "var(--xmlui-borderRadius-Button-secondary-outlined)", "borderWidth-Button-secondary-outlined": "var(--xmlui-borderWidth-Button-secondary-outlined)", "borderColor-Button-secondary-outlined": "var(--xmlui-borderColor-Button-secondary-outlined)", "borderStyle-Button-secondary-outlined": "var(--xmlui-borderStyle-Button-secondary-outlined)", "textColor-Button-secondary-outlined": "var(--xmlui-textColor-Button-secondary-outlined)", "boxShadow-Button-secondary-outlined": "var(--xmlui-boxShadow-Button-secondary-outlined)", "outlineWidth-Button-secondary-outlined--focus": "var(--xmlui-outlineWidth-Button-secondary-outlined--focus)", "outlineColor-Button-secondary-outlined--focus": "var(--xmlui-outlineColor-Button-secondary-outlined--focus)", "outlineStyle-Button-secondary-outlined--focus": "var(--xmlui-outlineStyle-Button-secondary-outlined--focus)", "outlineOffset-Button-secondary-outlined--focus": "var(--xmlui-outlineOffset-Button-secondary-outlined--focus)", "borderColor-Button-secondary-outlined--hover": "var(--xmlui-borderColor-Button-secondary-outlined--hover)", "backgroundColor-Button-secondary-outlined--hover": "var(--xmlui-backgroundColor-Button-secondary-outlined--hover)", "textColor-Button-secondary-outlined--hover": "var(--xmlui-textColor-Button-secondary-outlined--hover)", "borderColor-Button-secondary-outlined--active": "var(--xmlui-borderColor-Button-secondary-outlined--active)", "backgroundColor-Button-secondary-outlined--active": "var(--xmlui-backgroundColor-Button-secondary-outlined--active)", "textColor-Button-secondary-outlined--active": "var(--xmlui-textColor-Button-secondary-outlined--active)", "fontFamily-Button-attention-outlined": "var(--xmlui-fontFamily-Button-attention-outlined)", "fontSize-Button-attention-outlined": "var(--xmlui-fontSize-Button-attention-outlined)", "fontWeight-Button-attention-outlined": "var(--xmlui-fontWeight-Button-attention-outlined)", "borderRadius-Button-attention-outlined": "var(--xmlui-borderRadius-Button-attention-outlined)", "borderWidth-Button-attention-outlined": "var(--xmlui-borderWidth-Button-attention-outlined)", "borderColor-Button-attention-outlined": "var(--xmlui-borderColor-Button-attention-outlined)", "borderStyle-Button-attention-outlined": "var(--xmlui-borderStyle-Button-attention-outlined)", "textColor-Button-attention-outlined": "var(--xmlui-textColor-Button-attention-outlined)", "boxShadow-Button-attention-outlined": "var(--xmlui-boxShadow-Button-attention-outlined)", "outlineWidth-Button-attention-outlined--focus": "var(--xmlui-outlineWidth-Button-attention-outlined--focus)", "outlineColor-Button-attention-outlined--focus": "var(--xmlui-outlineColor-Button-attention-outlined--focus)", "outlineStyle-Button-attention-outlined--focus": "var(--xmlui-outlineStyle-Button-attention-outlined--focus)", "outlineOffset-Button-attention-outlined--focus": "var(--xmlui-outlineOffset-Button-attention-outlined--focus)", "borderColor-Button-attention-outlined--hover": "var(--xmlui-borderColor-Button-attention-outlined--hover)", "backgroundColor-Button-attention-outlined--hover": "var(--xmlui-backgroundColor-Button-attention-outlined--hover)", "textColor-Button-attention-outlined--hover": "var(--xmlui-textColor-Button-attention-outlined--hover)", "borderColor-Button-attention-outlined--active": "var(--xmlui-borderColor-Button-attention-outlined--active)", "backgroundColor-Button-attention-outlined--active": "var(--xmlui-backgroundColor-Button-attention-outlined--active)", "textColor-Button-attention-outlined--active": "var(--xmlui-textColor-Button-attention-outlined--active)", "fontFamily-Button-primary-ghost": "var(--xmlui-fontFamily-Button-primary-ghost)", "fontSize-Button-primary-ghost": "var(--xmlui-fontSize-Button-primary-ghost)", "fontWeight-Button-primary-ghost": "var(--xmlui-fontWeight-Button-primary-ghost)", "borderRadius-Button-primary-ghost": "var(--xmlui-borderRadius-Button-primary-ghost)", "borderWidth-Button-primary-ghost": "var(--xmlui-borderWidth-Button-primary-ghost)", "textColor-Button-primary-ghost": "var(--xmlui-textColor-Button-primary-ghost)", "outlineWidth-Button-primary-ghost--focus": "var(--xmlui-outlineWidth-Button-primary-ghost--focus)", "outlineColor-Button-primary-ghost--focus": "var(--xmlui-outlineColor-Button-primary-ghost--focus)", "outlineStyle-Button-primary-ghost--focus": "var(--xmlui-outlineStyle-Button-primary-ghost--focus)", "outlineOffset-Button-primary-ghost--focus": "var(--xmlui-outlineOffset-Button-primary-ghost--focus)", "backgroundColor-Button-primary-ghost--hover": "var(--xmlui-backgroundColor-Button-primary-ghost--hover)", "textColor-Button-primary-ghost--hover": "var(--xmlui-textColor-Button-primary-ghost--hover)", "backgroundColor-Button-primary-ghost--active": "var(--xmlui-backgroundColor-Button-primary-ghost--active)", "textColor-Button-primary-ghost--active": "var(--xmlui-textColor-Button-primary-ghost--active)", "fontFamily-Button-secondary-ghost": "var(--xmlui-fontFamily-Button-secondary-ghost)", "fontSize-Button-secondary-ghost": "var(--xmlui-fontSize-Button-secondary-ghost)", "fontWeight-Button-secondary-ghost": "var(--xmlui-fontWeight-Button-secondary-ghost)", "borderRadius-Button-secondary-ghost": "var(--xmlui-borderRadius-Button-secondary-ghost)", "borderWidth-Button-secondary-ghost": "var(--xmlui-borderWidth-Button-secondary-ghost)", "textColor-Button-secondary-ghost": "var(--xmlui-textColor-Button-secondary-ghost)", "outlineWidth-Button-secondary-ghost--focus": "var(--xmlui-outlineWidth-Button-secondary-ghost--focus)", "outlineColor-Button-secondary-ghost--focus": "var(--xmlui-outlineColor-Button-secondary-ghost--focus)", "outlineStyle-Button-secondary-ghost--focus": "var(--xmlui-outlineStyle-Button-secondary-ghost--focus)", "outlineOffset-Button-secondary-ghost--focus": "var(--xmlui-outlineOffset-Button-secondary-ghost--focus)", "backgroundColor-Button-secondary-ghost--hover": "var(--xmlui-backgroundColor-Button-secondary-ghost--hover)", "textColor-Button-secondary-ghost--hover": "var(--xmlui-textColor-Button-secondary-ghost--hover)", "backgroundColor-Button-secondary-ghost--active": "var(--xmlui-backgroundColor-Button-secondary-ghost--active)", "textColor-Button-secondary-ghost--active": "var(--xmlui-textColor-Button-secondary-ghost--active)", "fontFamily-Button-attention-ghost": "var(--xmlui-fontFamily-Button-attention-ghost)", "fontSize-Button-attention-ghost": "var(--xmlui-fontSize-Button-attention-ghost)", "fontWeight-Button-attention-ghost": "var(--xmlui-fontWeight-Button-attention-ghost)", "borderRadius-Button-attention-ghost": "var(--xmlui-borderRadius-Button-attention-ghost)", "borderWidth-Button-attention-ghost": "var(--xmlui-borderWidth-Button-attention-ghost)", "textColor-Button-attention-ghost": "var(--xmlui-textColor-Button-attention-ghost)", "outlineWidth-Button-attention-ghost--focus": "var(--xmlui-outlineWidth-Button-attention-ghost--focus)", "outlineColor-Button-attention-ghost--focus": "var(--xmlui-outlineColor-Button-attention-ghost--focus)", "outlineStyle-Button-attention-ghost--focus": "var(--xmlui-outlineStyle-Button-attention-ghost--focus)", "outlineOffset-Button-attention-ghost--focus": "var(--xmlui-outlineOffset-Button-attention-ghost--focus)", "backgroundColor-Button-attention-ghost--hover": "var(--xmlui-backgroundColor-Button-attention-ghost--hover)", "textColor-Button-attention-ghost--hover": "var(--xmlui-textColor-Button-attention-ghost--hover)", "backgroundColor-Button-attention-ghost--active": "var(--xmlui-backgroundColor-Button-attention-ghost--active)", "textColor-Button-attention-ghost--active": "var(--xmlui-textColor-Button-attention-ghost--active)"}'`;
|
|
@@ -65,44 +65,8 @@
|
|
|
65
65
|
ghostSecondary,
|
|
66
66
|
ghostAttention
|
|
67
67
|
};
|
|
68
|
-
function createMetadata({
|
|
69
|
-
|
|
70
|
-
shortDescription,
|
|
71
|
-
specializedFrom,
|
|
72
|
-
status,
|
|
73
|
-
props,
|
|
74
|
-
events,
|
|
75
|
-
contextVars,
|
|
76
|
-
apis,
|
|
77
|
-
nonVisual,
|
|
78
|
-
opaque,
|
|
79
|
-
themeVars: themeVars2,
|
|
80
|
-
themeVarDescriptions,
|
|
81
|
-
defaultThemeVars,
|
|
82
|
-
toneSpecificThemeVars,
|
|
83
|
-
allowArbitraryProps,
|
|
84
|
-
docFolder,
|
|
85
|
-
isHtmlTag
|
|
86
|
-
}) {
|
|
87
|
-
return {
|
|
88
|
-
description,
|
|
89
|
-
shortDescription,
|
|
90
|
-
specializedFrom,
|
|
91
|
-
status,
|
|
92
|
-
props,
|
|
93
|
-
events,
|
|
94
|
-
contextVars,
|
|
95
|
-
apis,
|
|
96
|
-
nonVisual,
|
|
97
|
-
opaque,
|
|
98
|
-
themeVars: themeVars2,
|
|
99
|
-
defaultThemeVars,
|
|
100
|
-
themeVarDescriptions,
|
|
101
|
-
toneSpecificThemeVars,
|
|
102
|
-
allowArbitraryProps,
|
|
103
|
-
docFolder,
|
|
104
|
-
isHtmlTag
|
|
105
|
-
};
|
|
68
|
+
function createMetadata(metadata) {
|
|
69
|
+
return metadata;
|
|
106
70
|
}
|
|
107
71
|
function d(description, availableValues, valueType, defaultValue, isValid, isRequired) {
|
|
108
72
|
return { description, isRequired, availableValues, valueType, defaultValue, isValid };
|
|
@@ -1048,9 +1012,7 @@
|
|
|
1048
1012
|
}
|
|
1049
1013
|
};
|
|
1050
1014
|
}
|
|
1051
|
-
|
|
1052
|
-
return React__namespace.useCallback(composeRefs(...refs), refs);
|
|
1053
|
-
}
|
|
1015
|
+
const VisuallyHidden = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden$1.VisuallyHidden, { ...props, children });
|
|
1054
1016
|
const defaultProps$g = {
|
|
1055
1017
|
type: "button",
|
|
1056
1018
|
iconPosition: "start",
|
|
@@ -1081,6 +1043,7 @@
|
|
|
1081
1043
|
gap,
|
|
1082
1044
|
className,
|
|
1083
1045
|
autoFocus = defaultProps$g.autoFocus,
|
|
1046
|
+
contextualLabel,
|
|
1084
1047
|
...rest
|
|
1085
1048
|
}, ref) {
|
|
1086
1049
|
const innerRef = React.useRef(null);
|
|
@@ -1128,13 +1091,18 @@
|
|
|
1128
1091
|
onFocus,
|
|
1129
1092
|
onBlur,
|
|
1130
1093
|
children: [
|
|
1131
|
-
iconToLeft && icon,
|
|
1094
|
+
icon && iconToLeft && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: icon }),
|
|
1132
1095
|
children,
|
|
1133
|
-
!
|
|
1096
|
+
icon && !children && /* @__PURE__ */ jsxRuntime.jsx(IconLabel, { icon, accessibleName: contextualLabel }),
|
|
1097
|
+
icon && !iconToLeft && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: icon })
|
|
1134
1098
|
]
|
|
1135
1099
|
}
|
|
1136
1100
|
);
|
|
1137
1101
|
});
|
|
1102
|
+
const IconLabel = ({ icon, accessibleName = "" }) => {
|
|
1103
|
+
const iconProps = icon.props;
|
|
1104
|
+
return /* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden, { children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: accessibleName || (iconProps == null ? void 0 : iconProps.name) || (iconProps == null ? void 0 : iconProps.alt) }) });
|
|
1105
|
+
};
|
|
1138
1106
|
const COMP$16 = "Button";
|
|
1139
1107
|
const ButtonMd = createMetadata({
|
|
1140
1108
|
description: "Button is an interactive element that triggers an action when clicked.",
|
|
@@ -1198,6 +1166,10 @@
|
|
|
1198
1166
|
availableValues: alignmentOptionMd,
|
|
1199
1167
|
type: "string",
|
|
1200
1168
|
defaultValue: defaultProps$g.contentPosition
|
|
1169
|
+
},
|
|
1170
|
+
contextualLabel: {
|
|
1171
|
+
description: `This optional value is used to provide an accessible name for the ${COMP$16} in the context of its usage.`,
|
|
1172
|
+
type: "string"
|
|
1201
1173
|
}
|
|
1202
1174
|
},
|
|
1203
1175
|
events: {
|
|
@@ -1869,7 +1841,7 @@
|
|
|
1869
1841
|
const handleOnBlur = React.useCallback(() => {
|
|
1870
1842
|
onBlur == null ? void 0 : onBlur();
|
|
1871
1843
|
}, [onBlur]);
|
|
1872
|
-
const
|
|
1844
|
+
const focus = React.useCallback(() => {
|
|
1873
1845
|
var _a;
|
|
1874
1846
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
1875
1847
|
}, []);
|
|
@@ -1878,10 +1850,10 @@
|
|
|
1878
1850
|
});
|
|
1879
1851
|
React.useEffect(() => {
|
|
1880
1852
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
1881
|
-
focus
|
|
1853
|
+
focus,
|
|
1882
1854
|
setValue
|
|
1883
1855
|
});
|
|
1884
|
-
}, [
|
|
1856
|
+
}, [focus, registerComponentApi, setValue]);
|
|
1885
1857
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1886
1858
|
ItemWithLabel,
|
|
1887
1859
|
{
|
|
@@ -1905,7 +1877,7 @@
|
|
|
1905
1877
|
[styles$Q.valid]: validationStatus === "valid"
|
|
1906
1878
|
}),
|
|
1907
1879
|
tabIndex: -1,
|
|
1908
|
-
onFocus:
|
|
1880
|
+
onFocus: focus,
|
|
1909
1881
|
children: [
|
|
1910
1882
|
/* @__PURE__ */ jsxRuntime.jsx(Adornment, { text: startText, iconName: startIcon, className: styles$Q.adornment }),
|
|
1911
1883
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4043,7 +4015,7 @@
|
|
|
4043
4015
|
innerRef.current.indeterminate = indeterminate;
|
|
4044
4016
|
}
|
|
4045
4017
|
}, [indeterminate]);
|
|
4046
|
-
const
|
|
4018
|
+
const focus = React.useCallback(() => {
|
|
4047
4019
|
var _a;
|
|
4048
4020
|
(_a = innerRef.current) == null ? void 0 : _a.focus();
|
|
4049
4021
|
}, []);
|
|
@@ -4052,10 +4024,10 @@
|
|
|
4052
4024
|
});
|
|
4053
4025
|
React.useEffect(() => {
|
|
4054
4026
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
4055
|
-
focus
|
|
4027
|
+
focus,
|
|
4056
4028
|
setValue
|
|
4057
4029
|
});
|
|
4058
|
-
}, [
|
|
4030
|
+
}, [focus, registerComponentApi, setValue]);
|
|
4059
4031
|
const input2 = React.useMemo(
|
|
4060
4032
|
() => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4061
4033
|
"input",
|
|
@@ -4143,6 +4115,7 @@
|
|
|
4143
4115
|
description: "This property is used to define a custom checkbox input template"
|
|
4144
4116
|
}
|
|
4145
4117
|
},
|
|
4118
|
+
childrenAsTemplate: "inputTemplate",
|
|
4146
4119
|
events: {
|
|
4147
4120
|
gotFocus: dGotFocus(COMP$X),
|
|
4148
4121
|
lostFocus: dLostFocus(COMP$X),
|
|
@@ -4401,7 +4374,7 @@
|
|
|
4401
4374
|
const handleOnMenuBlur = () => {
|
|
4402
4375
|
setIsMenuFocused(false);
|
|
4403
4376
|
};
|
|
4404
|
-
const
|
|
4377
|
+
const focus = React.useCallback(() => {
|
|
4405
4378
|
var _a;
|
|
4406
4379
|
(_a = referenceElement == null ? void 0 : referenceElement.current) == null ? void 0 : _a.focus();
|
|
4407
4380
|
}, [referenceElement == null ? void 0 : referenceElement.current]);
|
|
@@ -4411,10 +4384,10 @@
|
|
|
4411
4384
|
});
|
|
4412
4385
|
React.useEffect(() => {
|
|
4413
4386
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
4414
|
-
focus
|
|
4387
|
+
focus,
|
|
4415
4388
|
setValue
|
|
4416
4389
|
});
|
|
4417
|
-
}, [
|
|
4390
|
+
}, [focus, registerComponentApi, setValue]);
|
|
4418
4391
|
React.useEffect(() => {
|
|
4419
4392
|
if (!isButtonFocused && !isMenuFocused) {
|
|
4420
4393
|
onBlur == null ? void 0 : onBlur();
|
|
@@ -4961,7 +4934,7 @@
|
|
|
4961
4934
|
const handleOnBlur = React.useCallback(() => {
|
|
4962
4935
|
onBlur == null ? void 0 : onBlur();
|
|
4963
4936
|
}, [onBlur]);
|
|
4964
|
-
const
|
|
4937
|
+
const focus = React.useCallback(() => {
|
|
4965
4938
|
var _a;
|
|
4966
4939
|
(_a = buttonRef.current) == null ? void 0 : _a.focus();
|
|
4967
4940
|
}, []);
|
|
@@ -4990,10 +4963,10 @@
|
|
|
4990
4963
|
});
|
|
4991
4964
|
React.useEffect(() => {
|
|
4992
4965
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
4993
|
-
focus
|
|
4966
|
+
focus,
|
|
4994
4967
|
open: doOpen
|
|
4995
4968
|
});
|
|
4996
|
-
}, [
|
|
4969
|
+
}, [focus, doOpen, registerComponentApi]);
|
|
4997
4970
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4998
4971
|
ItemWithLabel,
|
|
4999
4972
|
{
|
|
@@ -5668,7 +5641,7 @@
|
|
|
5668
5641
|
[`fontSize-${COMP$Q}`]: "$fontSize-small",
|
|
5669
5642
|
[`textColor-${COMP$Q}`]: "$textColor-secondary",
|
|
5670
5643
|
[`maxWidth-content-${COMP$Q}`]: "$maxWidth-content",
|
|
5671
|
-
[`
|
|
5644
|
+
[`borderTop-${COMP$Q}`]: `1px solid $borderColor`,
|
|
5672
5645
|
[`padding-${COMP$Q}`]: "$space-2 $space-4",
|
|
5673
5646
|
light: {
|
|
5674
5647
|
// --- No light-specific theme vars
|
|
@@ -7153,7 +7126,7 @@
|
|
|
7153
7126
|
requestModalFormClose();
|
|
7154
7127
|
}
|
|
7155
7128
|
if (initialValue === EMPTY_OBJECT) {
|
|
7156
|
-
|
|
7129
|
+
reactDom.flushSync(() => {
|
|
7157
7130
|
doReset();
|
|
7158
7131
|
});
|
|
7159
7132
|
}
|
|
@@ -11493,7 +11466,7 @@
|
|
|
11493
11466
|
}
|
|
11494
11467
|
return false;
|
|
11495
11468
|
}
|
|
11496
|
-
const NumberBox = React.forwardRef(function
|
|
11469
|
+
const NumberBox = React.forwardRef(function NumberBox22({
|
|
11497
11470
|
id,
|
|
11498
11471
|
value,
|
|
11499
11472
|
initialValue,
|
|
@@ -11573,8 +11546,8 @@
|
|
|
11573
11546
|
if (newValue === void 0) return;
|
|
11574
11547
|
updateValue(newValue, newValue.toString());
|
|
11575
11548
|
}, [valueStrRep, _step, min, max, integersOnly, updateValue, readOnly2]);
|
|
11576
|
-
useLongPress(upButton.current, handleIncStep);
|
|
11577
|
-
useLongPress(downButton.current, handleDecStep);
|
|
11549
|
+
useLongPress$1(upButton.current, handleIncStep);
|
|
11550
|
+
useLongPress$1(downButton.current, handleDecStep);
|
|
11578
11551
|
const handleOnBeforeInput = (event) => {
|
|
11579
11552
|
var _a;
|
|
11580
11553
|
let shouldPreventDefault = false;
|
|
@@ -11704,7 +11677,7 @@
|
|
|
11704
11677
|
setValueStrRep(mapToRepresentation(value));
|
|
11705
11678
|
onBlur == null ? void 0 : onBlur();
|
|
11706
11679
|
}, [value, onBlur]);
|
|
11707
|
-
const
|
|
11680
|
+
const focus = React.useCallback(() => {
|
|
11708
11681
|
var _a;
|
|
11709
11682
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
11710
11683
|
}, []);
|
|
@@ -11713,10 +11686,10 @@
|
|
|
11713
11686
|
});
|
|
11714
11687
|
React.useEffect(() => {
|
|
11715
11688
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
11716
|
-
focus
|
|
11689
|
+
focus,
|
|
11717
11690
|
setValue
|
|
11718
11691
|
});
|
|
11719
|
-
}, [
|
|
11692
|
+
}, [focus, registerComponentApi, setValue]);
|
|
11720
11693
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11721
11694
|
ItemWithLabel,
|
|
11722
11695
|
{
|
|
@@ -11815,7 +11788,7 @@
|
|
|
11815
11788
|
}
|
|
11816
11789
|
return clamp(currentValue + step, min, max);
|
|
11817
11790
|
}
|
|
11818
|
-
function useLongPress(elementRef, action, delay = 500) {
|
|
11791
|
+
function useLongPress$1(elementRef, action, delay = 500) {
|
|
11819
11792
|
const timeoutId = React.useRef(0);
|
|
11820
11793
|
const intervalId = React.useRef(0);
|
|
11821
11794
|
const savedAction = React.useRef(action);
|
|
@@ -11851,7 +11824,92 @@
|
|
|
11851
11824
|
};
|
|
11852
11825
|
}, [elementRef, action, delay]);
|
|
11853
11826
|
}
|
|
11854
|
-
|
|
11827
|
+
function _extends() {
|
|
11828
|
+
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
11829
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
11830
|
+
var t = arguments[e];
|
|
11831
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
11832
|
+
}
|
|
11833
|
+
return n;
|
|
11834
|
+
}, _extends.apply(null, arguments);
|
|
11835
|
+
}
|
|
11836
|
+
function $6ed0406888f73fc4$var$setRef(ref, value) {
|
|
11837
|
+
if (typeof ref === "function") ref(value);
|
|
11838
|
+
else if (ref !== null && ref !== void 0) ref.current = value;
|
|
11839
|
+
}
|
|
11840
|
+
function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {
|
|
11841
|
+
return (node) => refs.forEach(
|
|
11842
|
+
(ref) => $6ed0406888f73fc4$var$setRef(ref, node)
|
|
11843
|
+
);
|
|
11844
|
+
}
|
|
11845
|
+
function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {
|
|
11846
|
+
return React.useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);
|
|
11847
|
+
}
|
|
11848
|
+
const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11849
|
+
const { children, ...slotProps } = props;
|
|
11850
|
+
const childrenArray = React.Children.toArray(children);
|
|
11851
|
+
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
|
11852
|
+
if (slottable) {
|
|
11853
|
+
const newElement = slottable.props.children;
|
|
11854
|
+
const newChildren = childrenArray.map((child) => {
|
|
11855
|
+
if (child === slottable) {
|
|
11856
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
11857
|
+
return /* @__PURE__ */ React.isValidElement(newElement) ? newElement.props.children : null;
|
|
11858
|
+
} else return child;
|
|
11859
|
+
});
|
|
11860
|
+
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
11861
|
+
ref: forwardedRef
|
|
11862
|
+
}), /* @__PURE__ */ React.isValidElement(newElement) ? /* @__PURE__ */ React.cloneElement(newElement, void 0, newChildren) : null);
|
|
11863
|
+
}
|
|
11864
|
+
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
11865
|
+
ref: forwardedRef
|
|
11866
|
+
}), children);
|
|
11867
|
+
});
|
|
11868
|
+
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = "Slot";
|
|
11869
|
+
const $5e63c961fc1ce211$var$SlotClone = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11870
|
+
const { children, ...slotProps } = props;
|
|
11871
|
+
if (/* @__PURE__ */ React.isValidElement(children)) return /* @__PURE__ */ React.cloneElement(children, {
|
|
11872
|
+
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
|
|
11873
|
+
ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref
|
|
11874
|
+
});
|
|
11875
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
11876
|
+
});
|
|
11877
|
+
$5e63c961fc1ce211$var$SlotClone.displayName = "SlotClone";
|
|
11878
|
+
const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children }) => {
|
|
11879
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
11880
|
+
};
|
|
11881
|
+
function $5e63c961fc1ce211$var$isSlottable(child) {
|
|
11882
|
+
return /* @__PURE__ */ React.isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
|
11883
|
+
}
|
|
11884
|
+
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
11885
|
+
const overrideProps = {
|
|
11886
|
+
...childProps
|
|
11887
|
+
};
|
|
11888
|
+
for (const propName in childProps) {
|
|
11889
|
+
const slotPropValue = slotProps[propName];
|
|
11890
|
+
const childPropValue = childProps[propName];
|
|
11891
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
11892
|
+
if (isHandler) {
|
|
11893
|
+
if (slotPropValue && childPropValue) overrideProps[propName] = (...args) => {
|
|
11894
|
+
childPropValue(...args);
|
|
11895
|
+
slotPropValue(...args);
|
|
11896
|
+
};
|
|
11897
|
+
else if (slotPropValue) overrideProps[propName] = slotPropValue;
|
|
11898
|
+
} else if (propName === "style") overrideProps[propName] = {
|
|
11899
|
+
...slotPropValue,
|
|
11900
|
+
...childPropValue
|
|
11901
|
+
};
|
|
11902
|
+
else if (propName === "className") overrideProps[propName] = [
|
|
11903
|
+
slotPropValue,
|
|
11904
|
+
childPropValue
|
|
11905
|
+
].filter(Boolean).join(" ");
|
|
11906
|
+
}
|
|
11907
|
+
return {
|
|
11908
|
+
...slotProps,
|
|
11909
|
+
...overrideProps
|
|
11910
|
+
};
|
|
11911
|
+
}
|
|
11912
|
+
const $8927f6f2acc4f386$var$NODES = [
|
|
11855
11913
|
"a",
|
|
11856
11914
|
"button",
|
|
11857
11915
|
"div",
|
|
@@ -11869,47 +11927,53 @@
|
|
|
11869
11927
|
"svg",
|
|
11870
11928
|
"ul"
|
|
11871
11929
|
];
|
|
11872
|
-
|
|
11873
|
-
const
|
|
11874
|
-
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
11930
|
+
const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node) => {
|
|
11931
|
+
const Node = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11875
11932
|
const { asChild, ...primitiveProps } = props;
|
|
11876
|
-
const Comp = asChild ?
|
|
11877
|
-
|
|
11933
|
+
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
|
11934
|
+
React.useEffect(() => {
|
|
11878
11935
|
window[Symbol.for("radix-ui")] = true;
|
|
11879
|
-
}
|
|
11880
|
-
return /* @__PURE__ */
|
|
11936
|
+
}, []);
|
|
11937
|
+
return /* @__PURE__ */ React.createElement(Comp, _extends({}, primitiveProps, {
|
|
11938
|
+
ref: forwardedRef
|
|
11939
|
+
}));
|
|
11881
11940
|
});
|
|
11882
11941
|
Node.displayName = `Primitive.${node}`;
|
|
11883
|
-
return {
|
|
11942
|
+
return {
|
|
11943
|
+
...primitive,
|
|
11944
|
+
[node]: Node
|
|
11945
|
+
};
|
|
11884
11946
|
}, {});
|
|
11885
|
-
function
|
|
11886
|
-
const callbackRef =
|
|
11887
|
-
|
|
11947
|
+
function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
|
|
11948
|
+
const callbackRef = React.useRef(callback);
|
|
11949
|
+
React.useEffect(() => {
|
|
11888
11950
|
callbackRef.current = callback;
|
|
11889
11951
|
});
|
|
11890
|
-
return
|
|
11891
|
-
|
|
11892
|
-
|
|
11893
|
-
|
|
11952
|
+
return React.useMemo(
|
|
11953
|
+
() => (...args) => {
|
|
11954
|
+
var _callbackRef$current;
|
|
11955
|
+
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
11956
|
+
},
|
|
11957
|
+
[]
|
|
11958
|
+
);
|
|
11894
11959
|
}
|
|
11895
|
-
var
|
|
11896
|
-
var
|
|
11897
|
-
var
|
|
11898
|
-
|
|
11899
|
-
|
|
11900
|
-
|
|
11901
|
-
|
|
11902
|
-
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
const
|
|
11908
|
-
|
|
11909
|
-
|
|
11910
|
-
|
|
11911
|
-
const
|
|
11912
|
-
const focusScope = React__namespace.useRef({
|
|
11960
|
+
const $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
11961
|
+
const $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
11962
|
+
const $d3863c46a17e8a28$var$EVENT_OPTIONS = {
|
|
11963
|
+
bubbles: false,
|
|
11964
|
+
cancelable: true
|
|
11965
|
+
};
|
|
11966
|
+
const $d3863c46a17e8a28$export$20e40289641fbbb6 = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11967
|
+
const { loop = false, trapped = false, onMountAutoFocus: onMountAutoFocusProp, onUnmountAutoFocus: onUnmountAutoFocusProp, ...scopeProps } = props;
|
|
11968
|
+
const [container1, setContainer] = React.useState(null);
|
|
11969
|
+
const onMountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onMountAutoFocusProp);
|
|
11970
|
+
const onUnmountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onUnmountAutoFocusProp);
|
|
11971
|
+
const lastFocusedElementRef = React.useRef(null);
|
|
11972
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
|
|
11973
|
+
forwardedRef,
|
|
11974
|
+
(node) => setContainer(node)
|
|
11975
|
+
);
|
|
11976
|
+
const focusScope = React.useRef({
|
|
11913
11977
|
paused: false,
|
|
11914
11978
|
pause() {
|
|
11915
11979
|
this.paused = true;
|
|
@@ -11918,114 +11982,137 @@
|
|
|
11918
11982
|
this.paused = false;
|
|
11919
11983
|
}
|
|
11920
11984
|
}).current;
|
|
11921
|
-
|
|
11985
|
+
React.useEffect(() => {
|
|
11922
11986
|
if (trapped) {
|
|
11923
|
-
let
|
|
11924
|
-
if (focusScope.paused || !
|
|
11987
|
+
let handleFocusIn = function(event) {
|
|
11988
|
+
if (focusScope.paused || !container1) return;
|
|
11925
11989
|
const target2 = event.target;
|
|
11926
|
-
if (
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
if (focusScope.paused || !container2) return;
|
|
11990
|
+
if (container1.contains(target2)) lastFocusedElementRef.current = target2;
|
|
11991
|
+
else $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
|
|
11992
|
+
select: true
|
|
11993
|
+
});
|
|
11994
|
+
}, handleFocusOut = function(event) {
|
|
11995
|
+
if (focusScope.paused || !container1) return;
|
|
11933
11996
|
const relatedTarget = event.relatedTarget;
|
|
11934
11997
|
if (relatedTarget === null) return;
|
|
11935
|
-
if (!
|
|
11936
|
-
|
|
11937
|
-
}
|
|
11998
|
+
if (!container1.contains(relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
|
|
11999
|
+
select: true
|
|
12000
|
+
});
|
|
11938
12001
|
}, handleMutations2 = function(mutations2) {
|
|
11939
12002
|
const focusedElement = document.activeElement;
|
|
11940
12003
|
if (focusedElement !== document.body) return;
|
|
11941
|
-
for (const mutation of mutations2)
|
|
11942
|
-
if (mutation.removedNodes.length > 0) focus(container2);
|
|
11943
|
-
}
|
|
12004
|
+
for (const mutation of mutations2) if (mutation.removedNodes.length > 0) $d3863c46a17e8a28$var$focus(container1);
|
|
11944
12005
|
};
|
|
11945
|
-
document.addEventListener("focusin",
|
|
11946
|
-
document.addEventListener("focusout",
|
|
12006
|
+
document.addEventListener("focusin", handleFocusIn);
|
|
12007
|
+
document.addEventListener("focusout", handleFocusOut);
|
|
11947
12008
|
const mutationObserver = new MutationObserver(handleMutations2);
|
|
11948
|
-
if (
|
|
12009
|
+
if (container1) mutationObserver.observe(container1, {
|
|
12010
|
+
childList: true,
|
|
12011
|
+
subtree: true
|
|
12012
|
+
});
|
|
11949
12013
|
return () => {
|
|
11950
|
-
document.removeEventListener("focusin",
|
|
11951
|
-
document.removeEventListener("focusout",
|
|
12014
|
+
document.removeEventListener("focusin", handleFocusIn);
|
|
12015
|
+
document.removeEventListener("focusout", handleFocusOut);
|
|
11952
12016
|
mutationObserver.disconnect();
|
|
11953
12017
|
};
|
|
11954
12018
|
}
|
|
11955
|
-
}, [
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
12019
|
+
}, [
|
|
12020
|
+
trapped,
|
|
12021
|
+
container1,
|
|
12022
|
+
focusScope.paused
|
|
12023
|
+
]);
|
|
12024
|
+
React.useEffect(() => {
|
|
12025
|
+
if (container1) {
|
|
12026
|
+
$d3863c46a17e8a28$var$focusScopesStack.add(focusScope);
|
|
11959
12027
|
const previouslyFocusedElement = document.activeElement;
|
|
11960
|
-
const hasFocusedCandidate =
|
|
12028
|
+
const hasFocusedCandidate = container1.contains(previouslyFocusedElement);
|
|
11961
12029
|
if (!hasFocusedCandidate) {
|
|
11962
|
-
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
|
11963
|
-
|
|
11964
|
-
|
|
12030
|
+
const mountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
|
|
12031
|
+
container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
12032
|
+
container1.dispatchEvent(mountEvent);
|
|
11965
12033
|
if (!mountEvent.defaultPrevented) {
|
|
11966
|
-
focusFirst(removeLinks(getTabbableCandidates(
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
|
|
12034
|
+
$d3863c46a17e8a28$var$focusFirst($d3863c46a17e8a28$var$removeLinks($d3863c46a17e8a28$var$getTabbableCandidates(container1)), {
|
|
12035
|
+
select: true
|
|
12036
|
+
});
|
|
12037
|
+
if (document.activeElement === previouslyFocusedElement) $d3863c46a17e8a28$var$focus(container1);
|
|
11970
12038
|
}
|
|
11971
12039
|
}
|
|
11972
12040
|
return () => {
|
|
11973
|
-
|
|
12041
|
+
container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
11974
12042
|
setTimeout(() => {
|
|
11975
|
-
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
if (!unmountEvent.defaultPrevented) {
|
|
11979
|
-
|
|
11980
|
-
}
|
|
11981
|
-
|
|
11982
|
-
focusScopesStack.remove(focusScope);
|
|
12043
|
+
const unmountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
|
|
12044
|
+
container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
12045
|
+
container1.dispatchEvent(unmountEvent);
|
|
12046
|
+
if (!unmountEvent.defaultPrevented) $d3863c46a17e8a28$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {
|
|
12047
|
+
select: true
|
|
12048
|
+
});
|
|
12049
|
+
container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
12050
|
+
$d3863c46a17e8a28$var$focusScopesStack.remove(focusScope);
|
|
11983
12051
|
}, 0);
|
|
11984
12052
|
};
|
|
11985
12053
|
}
|
|
11986
|
-
}, [
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
|
|
11996
|
-
|
|
11997
|
-
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12054
|
+
}, [
|
|
12055
|
+
container1,
|
|
12056
|
+
onMountAutoFocus,
|
|
12057
|
+
onUnmountAutoFocus,
|
|
12058
|
+
focusScope
|
|
12059
|
+
]);
|
|
12060
|
+
const handleKeyDown = React.useCallback((event) => {
|
|
12061
|
+
if (!loop && !trapped) return;
|
|
12062
|
+
if (focusScope.paused) return;
|
|
12063
|
+
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
12064
|
+
const focusedElement = document.activeElement;
|
|
12065
|
+
if (isTabKey && focusedElement) {
|
|
12066
|
+
const container2 = event.currentTarget;
|
|
12067
|
+
const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container2);
|
|
12068
|
+
const hasTabbableElementsInside = first && last;
|
|
12069
|
+
if (!hasTabbableElementsInside) {
|
|
12070
|
+
if (focusedElement === container2) event.preventDefault();
|
|
12071
|
+
} else {
|
|
12072
|
+
if (!event.shiftKey && focusedElement === last) {
|
|
12073
|
+
event.preventDefault();
|
|
12074
|
+
if (loop) $d3863c46a17e8a28$var$focus(first, {
|
|
12075
|
+
select: true
|
|
12076
|
+
});
|
|
12077
|
+
} else if (event.shiftKey && focusedElement === first) {
|
|
12078
|
+
event.preventDefault();
|
|
12079
|
+
if (loop) $d3863c46a17e8a28$var$focus(last, {
|
|
12080
|
+
select: true
|
|
12081
|
+
});
|
|
12007
12082
|
}
|
|
12008
12083
|
}
|
|
12009
|
-
}
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
12084
|
+
}
|
|
12085
|
+
}, [
|
|
12086
|
+
loop,
|
|
12087
|
+
trapped,
|
|
12088
|
+
focusScope.paused
|
|
12089
|
+
]);
|
|
12090
|
+
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
12091
|
+
tabIndex: -1
|
|
12092
|
+
}, scopeProps, {
|
|
12093
|
+
ref: composedRefs,
|
|
12094
|
+
onKeyDown: handleKeyDown
|
|
12095
|
+
}));
|
|
12013
12096
|
});
|
|
12014
|
-
|
|
12015
|
-
function focusFirst(candidates, { select = false } = {}) {
|
|
12097
|
+
function $d3863c46a17e8a28$var$focusFirst(candidates, { select = false } = {}) {
|
|
12016
12098
|
const previouslyFocusedElement = document.activeElement;
|
|
12017
12099
|
for (const candidate of candidates) {
|
|
12018
|
-
focus(candidate, {
|
|
12100
|
+
$d3863c46a17e8a28$var$focus(candidate, {
|
|
12101
|
+
select
|
|
12102
|
+
});
|
|
12019
12103
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
12020
12104
|
}
|
|
12021
12105
|
}
|
|
12022
|
-
function getTabbableEdges(container2) {
|
|
12023
|
-
const candidates = getTabbableCandidates(container2);
|
|
12024
|
-
const first = findVisible(candidates, container2);
|
|
12025
|
-
const last = findVisible(candidates.reverse(), container2);
|
|
12026
|
-
return [
|
|
12106
|
+
function $d3863c46a17e8a28$var$getTabbableEdges(container2) {
|
|
12107
|
+
const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container2);
|
|
12108
|
+
const first = $d3863c46a17e8a28$var$findVisible(candidates, container2);
|
|
12109
|
+
const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container2);
|
|
12110
|
+
return [
|
|
12111
|
+
first,
|
|
12112
|
+
last
|
|
12113
|
+
];
|
|
12027
12114
|
}
|
|
12028
|
-
function getTabbableCandidates(container2) {
|
|
12115
|
+
function $d3863c46a17e8a28$var$getTabbableCandidates(container2) {
|
|
12029
12116
|
const nodes = [];
|
|
12030
12117
|
const walker = document.createTreeWalker(container2, NodeFilter.SHOW_ELEMENT, {
|
|
12031
12118
|
acceptNode: (node) => {
|
|
@@ -12037,12 +12124,14 @@
|
|
|
12037
12124
|
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
12038
12125
|
return nodes;
|
|
12039
12126
|
}
|
|
12040
|
-
function findVisible(elements, container2) {
|
|
12127
|
+
function $d3863c46a17e8a28$var$findVisible(elements, container2) {
|
|
12041
12128
|
for (const element of elements) {
|
|
12042
|
-
if (
|
|
12129
|
+
if (!$d3863c46a17e8a28$var$isHidden(element, {
|
|
12130
|
+
upTo: container2
|
|
12131
|
+
})) return element;
|
|
12043
12132
|
}
|
|
12044
12133
|
}
|
|
12045
|
-
function isHidden(node, { upTo }) {
|
|
12134
|
+
function $d3863c46a17e8a28$var$isHidden(node, { upTo }) {
|
|
12046
12135
|
if (getComputedStyle(node).visibility === "hidden") return true;
|
|
12047
12136
|
while (node) {
|
|
12048
12137
|
if (upTo !== void 0 && node === upTo) return false;
|
|
@@ -12051,81 +12140,84 @@
|
|
|
12051
12140
|
}
|
|
12052
12141
|
return false;
|
|
12053
12142
|
}
|
|
12054
|
-
function isSelectableInput(element) {
|
|
12143
|
+
function $d3863c46a17e8a28$var$isSelectableInput(element) {
|
|
12055
12144
|
return element instanceof HTMLInputElement && "select" in element;
|
|
12056
12145
|
}
|
|
12057
|
-
function focus(element, { select = false } = {}) {
|
|
12146
|
+
function $d3863c46a17e8a28$var$focus(element, { select = false } = {}) {
|
|
12058
12147
|
if (element && element.focus) {
|
|
12059
12148
|
const previouslyFocusedElement = document.activeElement;
|
|
12060
|
-
element.focus({
|
|
12061
|
-
|
|
12062
|
-
|
|
12149
|
+
element.focus({
|
|
12150
|
+
preventScroll: true
|
|
12151
|
+
});
|
|
12152
|
+
if (element !== previouslyFocusedElement && $d3863c46a17e8a28$var$isSelectableInput(element) && select) element.select();
|
|
12063
12153
|
}
|
|
12064
12154
|
}
|
|
12065
|
-
var
|
|
12066
|
-
function createFocusScopesStack() {
|
|
12155
|
+
const $d3863c46a17e8a28$var$focusScopesStack = $d3863c46a17e8a28$var$createFocusScopesStack();
|
|
12156
|
+
function $d3863c46a17e8a28$var$createFocusScopesStack() {
|
|
12067
12157
|
let stack = [];
|
|
12068
12158
|
return {
|
|
12069
12159
|
add(focusScope) {
|
|
12070
12160
|
const activeFocusScope = stack[0];
|
|
12071
|
-
if (focusScope !== activeFocusScope)
|
|
12072
|
-
|
|
12073
|
-
}
|
|
12074
|
-
stack = arrayRemove(stack, focusScope);
|
|
12161
|
+
if (focusScope !== activeFocusScope) activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause();
|
|
12162
|
+
stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
|
|
12075
12163
|
stack.unshift(focusScope);
|
|
12076
12164
|
},
|
|
12077
12165
|
remove(focusScope) {
|
|
12078
|
-
var
|
|
12079
|
-
stack = arrayRemove(stack, focusScope);
|
|
12080
|
-
(
|
|
12166
|
+
var _stack$;
|
|
12167
|
+
stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
|
|
12168
|
+
(_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume();
|
|
12081
12169
|
}
|
|
12082
12170
|
};
|
|
12083
12171
|
}
|
|
12084
|
-
function arrayRemove(array, item) {
|
|
12085
|
-
const updatedArray = [
|
|
12172
|
+
function $d3863c46a17e8a28$var$arrayRemove(array, item) {
|
|
12173
|
+
const updatedArray = [
|
|
12174
|
+
...array
|
|
12175
|
+
];
|
|
12086
12176
|
const index = updatedArray.indexOf(item);
|
|
12087
|
-
if (index !== -1)
|
|
12088
|
-
updatedArray.splice(index, 1);
|
|
12089
|
-
}
|
|
12177
|
+
if (index !== -1) updatedArray.splice(index, 1);
|
|
12090
12178
|
return updatedArray;
|
|
12091
12179
|
}
|
|
12092
|
-
function removeLinks(items) {
|
|
12093
|
-
return items.filter(
|
|
12180
|
+
function $d3863c46a17e8a28$var$removeLinks(items) {
|
|
12181
|
+
return items.filter(
|
|
12182
|
+
(item) => item.tagName !== "A"
|
|
12183
|
+
);
|
|
12094
12184
|
}
|
|
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)"}'`;
|
|
12096
|
-
const selectValue = "
|
|
12097
|
-
const error$6 = "
|
|
12098
|
-
const warning$6 = "
|
|
12099
|
-
const valid$6 = "
|
|
12100
|
-
const selectTrigger = "
|
|
12101
|
-
const badgeListContainer = "
|
|
12102
|
-
const badgeList$1 = "
|
|
12103
|
-
const badge$1 = "
|
|
12104
|
-
const actions$1 = "
|
|
12105
|
-
const placeholder = "
|
|
12106
|
-
const emptyList = "
|
|
12107
|
-
const selectScrollUpButton = "
|
|
12108
|
-
const selectScrollDownButton = "
|
|
12109
|
-
const command$1 = "
|
|
12110
|
-
const commandInputContainer = "
|
|
12111
|
-
const commandInput$1 = "
|
|
12112
|
-
const commandList$1 = "
|
|
12113
|
-
const selectContent = "
|
|
12114
|
-
const fadeIn = "
|
|
12115
|
-
const zoomIn = "
|
|
12116
|
-
const fadeOut = "
|
|
12117
|
-
const zoomOut = "
|
|
12118
|
-
const slideInFromTop = "
|
|
12119
|
-
const slideInFromRight = "
|
|
12120
|
-
const slideInFromLeft = "
|
|
12121
|
-
const slideInFromBottom = "
|
|
12122
|
-
const multiComboboxOption = "
|
|
12123
|
-
const
|
|
12124
|
-
const
|
|
12125
|
-
const
|
|
12126
|
-
const
|
|
12127
|
-
const
|
|
12128
|
-
const
|
|
12185
|
+
const themeVars$m = `'{"padding-item-Select": "var(--xmlui-padding-item-Select)", "paddingHorizontal-item-Select": "var(--xmlui-paddingHorizontal-item-Select, var(--xmlui-padding-item-Select))", "paddingVertical-item-Select": "var(--xmlui-paddingVertical-item-Select, var(--xmlui-padding-item-Select))", "paddingLeft-item-Select": "var(--xmlui-paddingLeft-item-Select, var(--xmlui-paddingHorizontal-item-Select, var(--xmlui-padding-item-Select)))", "paddingRight-item-Select": "var(--xmlui-paddingRight-item-Select, var(--xmlui-paddingHorizontal-item-Select, var(--xmlui-padding-item-Select)))", "paddingTop-item-Select": "var(--xmlui-paddingTop-item-Select, var(--xmlui-paddingVertical-item-Select, var(--xmlui-padding-item-Select)))", "paddingBottom-item-Select": "var(--xmlui-paddingBottom-item-Select, var(--xmlui-paddingVertical-item-Select, var(--xmlui-padding-item-Select)))", "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)"}'`;
|
|
12186
|
+
const selectValue = "_selectValue_nwesf_13";
|
|
12187
|
+
const error$6 = "_error_nwesf_21";
|
|
12188
|
+
const warning$6 = "_warning_nwesf_29";
|
|
12189
|
+
const valid$6 = "_valid_nwesf_37";
|
|
12190
|
+
const selectTrigger = "_selectTrigger_nwesf_46";
|
|
12191
|
+
const badgeListContainer = "_badgeListContainer_nwesf_170";
|
|
12192
|
+
const badgeList$1 = "_badgeList_nwesf_170";
|
|
12193
|
+
const badge$1 = "_badge_nwesf_170";
|
|
12194
|
+
const actions$1 = "_actions_nwesf_210";
|
|
12195
|
+
const placeholder = "_placeholder_nwesf_216";
|
|
12196
|
+
const emptyList = "_emptyList_nwesf_221";
|
|
12197
|
+
const selectScrollUpButton = "_selectScrollUpButton_nwesf_231";
|
|
12198
|
+
const selectScrollDownButton = "_selectScrollDownButton_nwesf_240";
|
|
12199
|
+
const command$1 = "_command_nwesf_249";
|
|
12200
|
+
const commandInputContainer = "_commandInputContainer_nwesf_259";
|
|
12201
|
+
const commandInput$1 = "_commandInput_nwesf_259";
|
|
12202
|
+
const commandList$1 = "_commandList_nwesf_284";
|
|
12203
|
+
const selectContent = "_selectContent_nwesf_289";
|
|
12204
|
+
const fadeIn = "_fadeIn_nwesf_1";
|
|
12205
|
+
const zoomIn = "_zoomIn_nwesf_1";
|
|
12206
|
+
const fadeOut = "_fadeOut_nwesf_1";
|
|
12207
|
+
const zoomOut = "_zoomOut_nwesf_1";
|
|
12208
|
+
const slideInFromTop = "_slideInFromTop_nwesf_1";
|
|
12209
|
+
const slideInFromRight = "_slideInFromRight_nwesf_1";
|
|
12210
|
+
const slideInFromLeft = "_slideInFromLeft_nwesf_1";
|
|
12211
|
+
const slideInFromBottom = "_slideInFromBottom_nwesf_1";
|
|
12212
|
+
const multiComboboxOption = "_multiComboboxOption_nwesf_329";
|
|
12213
|
+
const multiComboboxOptionContent = "_multiComboboxOptionContent_nwesf_329";
|
|
12214
|
+
const selectItem = "_selectItem_nwesf_354";
|
|
12215
|
+
const selectItemContent = "_selectItemContent_nwesf_369";
|
|
12216
|
+
const selectItemIndicator = "_selectItemIndicator_nwesf_391";
|
|
12217
|
+
const selectViewport = "_selectViewport_nwesf_402";
|
|
12218
|
+
const selectEmpty = "_selectEmpty_nwesf_408";
|
|
12219
|
+
const loading = "_loading_nwesf_419";
|
|
12220
|
+
const srOnly = "_srOnly_nwesf_423";
|
|
12129
12221
|
const styles$o = {
|
|
12130
12222
|
themeVars: themeVars$m,
|
|
12131
12223
|
selectValue,
|
|
@@ -12155,7 +12247,9 @@
|
|
|
12155
12247
|
slideInFromLeft,
|
|
12156
12248
|
slideInFromBottom,
|
|
12157
12249
|
multiComboboxOption,
|
|
12250
|
+
multiComboboxOptionContent,
|
|
12158
12251
|
selectItem,
|
|
12252
|
+
selectItemContent,
|
|
12159
12253
|
selectItemIndicator,
|
|
12160
12254
|
selectViewport,
|
|
12161
12255
|
selectEmpty,
|
|
@@ -12204,7 +12298,7 @@
|
|
|
12204
12298
|
options: options2
|
|
12205
12299
|
} = props;
|
|
12206
12300
|
const ref = forwardedRef ? composeRefs(triggerRef, forwardedRef) : triggerRef;
|
|
12207
|
-
const stringValue = value ? value + "" :
|
|
12301
|
+
const stringValue = value != void 0 ? value + "" : null;
|
|
12208
12302
|
const onValChange = React.useCallback(
|
|
12209
12303
|
(val) => {
|
|
12210
12304
|
var _a;
|
|
@@ -12215,8 +12309,6 @@
|
|
|
12215
12309
|
},
|
|
12216
12310
|
[onValueChange, options2]
|
|
12217
12311
|
);
|
|
12218
|
-
React.useEffect(() => {
|
|
12219
|
-
}, []);
|
|
12220
12312
|
return /* @__PURE__ */ jsxRuntime.jsx(OptionTypeProvider, { Component: SelectOption, children: /* @__PURE__ */ jsxRuntime.jsxs(reactSelect.Root, { value: stringValue, onValueChange: onValChange, children: [
|
|
12221
12313
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12222
12314
|
reactSelect.Trigger,
|
|
@@ -12268,6 +12360,7 @@
|
|
|
12268
12360
|
registerComponentApi,
|
|
12269
12361
|
emptyListTemplate,
|
|
12270
12362
|
optionLabelRenderer,
|
|
12363
|
+
optionRenderer,
|
|
12271
12364
|
valueRenderer,
|
|
12272
12365
|
style,
|
|
12273
12366
|
dropdownHeight,
|
|
@@ -12322,18 +12415,27 @@
|
|
|
12322
12415
|
updateState({ value: newValue });
|
|
12323
12416
|
onDidChange(newValue);
|
|
12324
12417
|
}, [multiSelect, updateState, onDidChange]);
|
|
12325
|
-
const
|
|
12418
|
+
const focus = React.useCallback(() => {
|
|
12326
12419
|
referenceElement == null ? void 0 : referenceElement.focus();
|
|
12327
12420
|
}, [referenceElement]);
|
|
12328
12421
|
const setValue = useEvent((newValue) => {
|
|
12329
12422
|
toggleOption(newValue);
|
|
12330
12423
|
});
|
|
12424
|
+
const reset = useEvent(() => {
|
|
12425
|
+
if (initialValue !== void 0) {
|
|
12426
|
+
updateState({ value: initialValue });
|
|
12427
|
+
onDidChange(initialValue);
|
|
12428
|
+
} else {
|
|
12429
|
+
clearValue();
|
|
12430
|
+
}
|
|
12431
|
+
});
|
|
12331
12432
|
React.useEffect(() => {
|
|
12332
12433
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
12333
|
-
focus
|
|
12334
|
-
setValue
|
|
12434
|
+
focus,
|
|
12435
|
+
setValue,
|
|
12436
|
+
reset
|
|
12335
12437
|
});
|
|
12336
|
-
}, [
|
|
12438
|
+
}, [focus, registerComponentApi, setValue, reset]);
|
|
12337
12439
|
const emptyListNode = React.useMemo(
|
|
12338
12440
|
() => emptyListTemplate ?? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$o.selectEmpty, children: [
|
|
12339
12441
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "noresult" }),
|
|
@@ -12363,9 +12465,10 @@
|
|
|
12363
12465
|
multiSelect,
|
|
12364
12466
|
value,
|
|
12365
12467
|
optionLabelRenderer,
|
|
12468
|
+
optionRenderer,
|
|
12366
12469
|
onChange: toggleOption
|
|
12367
12470
|
}),
|
|
12368
|
-
[multiSelect, toggleOption, value, optionLabelRenderer]
|
|
12471
|
+
[multiSelect, toggleOption, value, optionLabelRenderer, optionRenderer]
|
|
12369
12472
|
);
|
|
12370
12473
|
return /* @__PURE__ */ jsxRuntime.jsx(SelectContext.Provider, { value: selectContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(OptionContext.Provider, { value: optionContextValue, children: searchable || multiSelect ? /* @__PURE__ */ jsxRuntime.jsxs(OptionTypeProvider, { Component: HiddenOption, children: [
|
|
12371
12474
|
children,
|
|
@@ -12440,7 +12543,7 @@
|
|
|
12440
12543
|
]
|
|
12441
12544
|
}
|
|
12442
12545
|
) }),
|
|
12443
|
-
open && /* @__PURE__ */ jsxRuntime.jsx(reactSelect.Portal, { container: root2, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12546
|
+
open && /* @__PURE__ */ jsxRuntime.jsx(reactSelect.Portal, { container: root2, children: /* @__PURE__ */ jsxRuntime.jsx($d3863c46a17e8a28$export$20e40289641fbbb6, { asChild: true, loop: true, trapped: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12444
12547
|
reactPopover.PopoverContent,
|
|
12445
12548
|
{
|
|
12446
12549
|
style: { width, height: dropdownHeight },
|
|
@@ -12516,11 +12619,17 @@
|
|
|
12516
12619
|
const ComboboxOption = React.forwardRef(function Combobox(option, forwardedRef) {
|
|
12517
12620
|
const id = React.useId();
|
|
12518
12621
|
const { label: label2, value, enabled: enabled2 = true, keywords } = option;
|
|
12519
|
-
const {
|
|
12622
|
+
const {
|
|
12623
|
+
value: selectedValue,
|
|
12624
|
+
onChange,
|
|
12625
|
+
multiSelect,
|
|
12626
|
+
optionLabelRenderer,
|
|
12627
|
+
optionRenderer
|
|
12628
|
+
} = useSelect();
|
|
12520
12629
|
const selected2 = React.useMemo(() => {
|
|
12521
12630
|
return Array.isArray(selectedValue) && multiSelect ? selectedValue.includes(value) : selectedValue === value;
|
|
12522
12631
|
}, [selectedValue, value, multiSelect]);
|
|
12523
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
12632
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12524
12633
|
cmdk.CommandItem,
|
|
12525
12634
|
{
|
|
12526
12635
|
id,
|
|
@@ -12533,10 +12642,10 @@
|
|
|
12533
12642
|
},
|
|
12534
12643
|
"data-state": selected2 ? "checked" : void 0,
|
|
12535
12644
|
keywords,
|
|
12536
|
-
children: [
|
|
12645
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$o.multiComboboxOptionContent, children: optionRenderer ? optionRenderer({ label: label2, value, enabled: enabled2, keywords }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12537
12646
|
optionLabelRenderer ? optionLabelRenderer({ label: label2, value }) : label2,
|
|
12538
12647
|
selected2 && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "checkmark" })
|
|
12539
|
-
]
|
|
12648
|
+
] }) })
|
|
12540
12649
|
},
|
|
12541
12650
|
id
|
|
12542
12651
|
);
|
|
@@ -12561,15 +12670,19 @@
|
|
|
12561
12670
|
(option, ref) => {
|
|
12562
12671
|
const { value, label: label2, enabled: enabled2 = true } = option;
|
|
12563
12672
|
const { onOptionRemove, onOptionAdd } = useOption();
|
|
12564
|
-
const { optionLabelRenderer } = useSelect();
|
|
12673
|
+
const { optionLabelRenderer, optionRenderer } = useSelect();
|
|
12565
12674
|
React.useLayoutEffect(() => {
|
|
12566
12675
|
onOptionAdd(option);
|
|
12567
12676
|
return () => onOptionRemove(option);
|
|
12568
12677
|
}, [option, onOptionAdd, onOptionRemove]);
|
|
12569
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
12570
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactSelect.ItemText, { children:
|
|
12678
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactSelect.Item, { ref, className: styles$o.selectItem, value: value + "", disabled: !enabled2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$o.selectItemContent, children: optionRenderer ? optionRenderer({
|
|
12679
|
+
label: /* @__PURE__ */ jsxRuntime.jsx(reactSelect.ItemText, { children: label2 }),
|
|
12680
|
+
value,
|
|
12681
|
+
enabled: enabled2
|
|
12682
|
+
}) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12683
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactSelect.ItemText, { className: styles$o.selectItemContent, children: optionLabelRenderer ? optionLabelRenderer({ value, label: label2 }) : label2 }),
|
|
12571
12684
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$o.selectItemIndicator, children: /* @__PURE__ */ jsxRuntime.jsx(reactSelect.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "checkmark" }) }) })
|
|
12572
|
-
] });
|
|
12685
|
+
] }) }) });
|
|
12573
12686
|
}
|
|
12574
12687
|
);
|
|
12575
12688
|
SelectOption.displayName = "SelectOption";
|
|
@@ -12876,7 +12989,7 @@
|
|
|
12876
12989
|
setFocused(false);
|
|
12877
12990
|
onBlur == null ? void 0 : onBlur();
|
|
12878
12991
|
};
|
|
12879
|
-
const
|
|
12992
|
+
const focus = React.useCallback(() => {
|
|
12880
12993
|
setTimeout(() => {
|
|
12881
12994
|
var _a;
|
|
12882
12995
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
@@ -12913,11 +13026,11 @@
|
|
|
12913
13026
|
}, [value, cursorPosition, inputRef]);
|
|
12914
13027
|
React.useEffect(() => {
|
|
12915
13028
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
12916
|
-
focus
|
|
13029
|
+
focus,
|
|
12917
13030
|
insert,
|
|
12918
13031
|
setValue
|
|
12919
13032
|
});
|
|
12920
|
-
}, [
|
|
13033
|
+
}, [focus, insert, registerComponentApi, setValue]);
|
|
12921
13034
|
const handleEnter = React.useCallback(
|
|
12922
13035
|
(e) => {
|
|
12923
13036
|
var _a, _b;
|
|
@@ -13199,7 +13312,7 @@
|
|
|
13199
13312
|
] }),
|
|
13200
13313
|
[emptyListTemplate]
|
|
13201
13314
|
);
|
|
13202
|
-
const
|
|
13315
|
+
const focus = React.useCallback(() => {
|
|
13203
13316
|
var _a;
|
|
13204
13317
|
(_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.focus();
|
|
13205
13318
|
}, [inputRef]);
|
|
@@ -13208,10 +13321,10 @@
|
|
|
13208
13321
|
});
|
|
13209
13322
|
React.useEffect(() => {
|
|
13210
13323
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
13211
|
-
focus
|
|
13324
|
+
focus,
|
|
13212
13325
|
setValue
|
|
13213
13326
|
});
|
|
13214
|
-
}, [
|
|
13327
|
+
}, [focus, registerComponentApi, setValue]);
|
|
13215
13328
|
const optionContextValue = React.useMemo(
|
|
13216
13329
|
() => ({
|
|
13217
13330
|
onOptionAdd,
|
|
@@ -13582,7 +13695,7 @@
|
|
|
13582
13695
|
const handleOnBlur = React.useCallback(() => {
|
|
13583
13696
|
onBlur == null ? void 0 : onBlur();
|
|
13584
13697
|
}, [onBlur]);
|
|
13585
|
-
const
|
|
13698
|
+
const focus = React.useCallback(() => {
|
|
13586
13699
|
var _a;
|
|
13587
13700
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
13588
13701
|
}, []);
|
|
@@ -13591,10 +13704,10 @@
|
|
|
13591
13704
|
});
|
|
13592
13705
|
React.useEffect(() => {
|
|
13593
13706
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
13594
|
-
focus
|
|
13707
|
+
focus,
|
|
13595
13708
|
setValue
|
|
13596
13709
|
});
|
|
13597
|
-
}, [
|
|
13710
|
+
}, [focus, registerComponentApi, setValue]);
|
|
13598
13711
|
const displayValue = localValue.length > 0 ? localValue : [min];
|
|
13599
13712
|
const valuesText = displayValue.map((v) => valueFormat(v)).join(", ");
|
|
13600
13713
|
const displayLabel = label2 ? showValues ? `${label2} ${valuesText}` : label2 : showValues ? valuesText : "";
|
|
@@ -13735,7 +13848,7 @@
|
|
|
13735
13848
|
const handleOnBlur = React.useCallback(() => {
|
|
13736
13849
|
onBlur == null ? void 0 : onBlur();
|
|
13737
13850
|
}, [onBlur]);
|
|
13738
|
-
const
|
|
13851
|
+
const focus = React.useCallback(() => {
|
|
13739
13852
|
var _a;
|
|
13740
13853
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
13741
13854
|
}, []);
|
|
@@ -13744,10 +13857,10 @@
|
|
|
13744
13857
|
});
|
|
13745
13858
|
React.useEffect(() => {
|
|
13746
13859
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
13747
|
-
focus
|
|
13860
|
+
focus,
|
|
13748
13861
|
setValue
|
|
13749
13862
|
});
|
|
13750
|
-
}, [
|
|
13863
|
+
}, [focus, registerComponentApi, setValue]);
|
|
13751
13864
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13752
13865
|
ItemWithLabel,
|
|
13753
13866
|
{
|
|
@@ -13898,6 +14011,429 @@
|
|
|
13898
14011
|
}
|
|
13899
14012
|
);
|
|
13900
14013
|
};
|
|
14014
|
+
const NumberBox2 = React.forwardRef(function NumberBox22({
|
|
14015
|
+
id,
|
|
14016
|
+
style,
|
|
14017
|
+
value,
|
|
14018
|
+
initialValue,
|
|
14019
|
+
zeroOrPositive = false,
|
|
14020
|
+
min = zeroOrPositive ? 0 : -999999999999999,
|
|
14021
|
+
max = NUMBERBOX_MAX_VALUE,
|
|
14022
|
+
maxFractionDigits = 3,
|
|
14023
|
+
enabled: enabled2 = true,
|
|
14024
|
+
placeholder: placeholder2,
|
|
14025
|
+
step,
|
|
14026
|
+
integersOnly = false,
|
|
14027
|
+
validationStatus = "none",
|
|
14028
|
+
hasSpinBox = true,
|
|
14029
|
+
updateState = noop$1,
|
|
14030
|
+
onDidChange = noop$1,
|
|
14031
|
+
onFocus = noop$1,
|
|
14032
|
+
onBlur = noop$1,
|
|
14033
|
+
registerComponentApi,
|
|
14034
|
+
startText,
|
|
14035
|
+
startIcon,
|
|
14036
|
+
endText,
|
|
14037
|
+
endIcon,
|
|
14038
|
+
autoFocus,
|
|
14039
|
+
readOnly: readOnly2,
|
|
14040
|
+
required: required2,
|
|
14041
|
+
label: label2,
|
|
14042
|
+
labelPosition,
|
|
14043
|
+
labelWidth,
|
|
14044
|
+
labelBreak: labelBreak2
|
|
14045
|
+
}, forwardedRef) {
|
|
14046
|
+
const inputRef = React.useRef(null);
|
|
14047
|
+
const upButton = React.useRef(null);
|
|
14048
|
+
const downButton = React.useRef(null);
|
|
14049
|
+
const locale = "en-US";
|
|
14050
|
+
const formatOptions = React.useMemo(() => {
|
|
14051
|
+
return {
|
|
14052
|
+
useGrouping: false,
|
|
14053
|
+
minimumFractionDigits: 0,
|
|
14054
|
+
maximumFractionDigits: integersOnly ? 0 : maxFractionDigits
|
|
14055
|
+
};
|
|
14056
|
+
}, [maxFractionDigits, integersOnly]);
|
|
14057
|
+
const formatter = useNumberFormatter(locale, formatOptions);
|
|
14058
|
+
const parser = useNumberParser(locale, formatOptions);
|
|
14059
|
+
min = clamp(
|
|
14060
|
+
toUsableNumber(min, true) ?? (zeroOrPositive ? 0 : -999999999999999),
|
|
14061
|
+
zeroOrPositive ? 0 : -999999999999999,
|
|
14062
|
+
NUMBERBOX_MAX_VALUE
|
|
14063
|
+
);
|
|
14064
|
+
max = clamp(
|
|
14065
|
+
toUsableNumber(max, true) ?? (zeroOrPositive ? 0 : -999999999999999),
|
|
14066
|
+
zeroOrPositive ? 0 : -999999999999999,
|
|
14067
|
+
NUMBERBOX_MAX_VALUE
|
|
14068
|
+
);
|
|
14069
|
+
const initializeValue = React.useCallback(
|
|
14070
|
+
(value2, defaultValue = "") => {
|
|
14071
|
+
return isEmptyLike(value2) || lodashEs.isNaN(parser.parse(value2.toString())) ? defaultValue : formatter.format(clamp(+value2, min, max));
|
|
14072
|
+
},
|
|
14073
|
+
[formatter, parser, min, max]
|
|
14074
|
+
);
|
|
14075
|
+
const [valueStrRep, setValueStrRep] = React.useState(initializeValue(value));
|
|
14076
|
+
React.useLayoutEffect(() => {
|
|
14077
|
+
setValueStrRep(initializeValue(value));
|
|
14078
|
+
}, [value, initializeValue]);
|
|
14079
|
+
const onFixCursorPosition = useCursorCorrection(valueStrRep, inputRef);
|
|
14080
|
+
const _step = toUsableNumber(step, true) ?? DEFAULT_STEP;
|
|
14081
|
+
const inputMode = React.useMemo(() => {
|
|
14082
|
+
const hasDecimals = formatter.resolvedOptions().maximumFractionDigits > 0;
|
|
14083
|
+
return hasDecimals ? "decimal" : "numeric";
|
|
14084
|
+
}, [formatter]);
|
|
14085
|
+
React.useEffect(() => {
|
|
14086
|
+
updateState({ value: initialValue }, { initial: true });
|
|
14087
|
+
}, [initialValue, updateState]);
|
|
14088
|
+
const clampInputValue = React.useCallback(
|
|
14089
|
+
(value2) => {
|
|
14090
|
+
return clamp(value2, min, max);
|
|
14091
|
+
},
|
|
14092
|
+
[min, max]
|
|
14093
|
+
);
|
|
14094
|
+
const clampAndSaveInput = React.useCallback(
|
|
14095
|
+
(value2) => {
|
|
14096
|
+
if (isEmptyLike(value2)) {
|
|
14097
|
+
updateState({ value: null });
|
|
14098
|
+
return;
|
|
14099
|
+
}
|
|
14100
|
+
value2 = value2.toString();
|
|
14101
|
+
if (!value2.length) {
|
|
14102
|
+
updateState({ value: null });
|
|
14103
|
+
return;
|
|
14104
|
+
}
|
|
14105
|
+
let parsedValue = parser.parse(value2);
|
|
14106
|
+
parsedValue = clampInputValue(parsedValue);
|
|
14107
|
+
if (lodashEs.isNaN(parsedValue)) {
|
|
14108
|
+
updateState({ value: value2 });
|
|
14109
|
+
return;
|
|
14110
|
+
}
|
|
14111
|
+
setValueStrRep((lastVal) => {
|
|
14112
|
+
const formatted = formatter.format(parsedValue);
|
|
14113
|
+
if (lastVal !== formatted) {
|
|
14114
|
+
return formatted;
|
|
14115
|
+
}
|
|
14116
|
+
return lastVal;
|
|
14117
|
+
});
|
|
14118
|
+
updateState({ value: parsedValue });
|
|
14119
|
+
},
|
|
14120
|
+
[clampInputValue, updateState, parser, formatter]
|
|
14121
|
+
);
|
|
14122
|
+
const increment = React.useCallback(() => {
|
|
14123
|
+
if (!enabled2) return;
|
|
14124
|
+
if (readOnly2) return;
|
|
14125
|
+
const currentValue = isEmptyLike(value) || lodashEs.isNaN(value) ? "0" : value.toString();
|
|
14126
|
+
const newValue = handleChangingValue(currentValue, parser, "increase", _step, min, max);
|
|
14127
|
+
updateState({ value: newValue });
|
|
14128
|
+
}, [value, enabled2, readOnly2, parser, _step, min, max, updateState]);
|
|
14129
|
+
const decrement = React.useCallback(() => {
|
|
14130
|
+
if (!enabled2) return;
|
|
14131
|
+
if (readOnly2) return;
|
|
14132
|
+
const currentValue = isEmptyLike(value) || lodashEs.isNaN(value) ? "0" : value.toString();
|
|
14133
|
+
const newValue = handleChangingValue(currentValue, parser, "decrease", _step, min, max);
|
|
14134
|
+
updateState({ value: newValue });
|
|
14135
|
+
}, [value, enabled2, readOnly2, parser, _step, min, max, updateState]);
|
|
14136
|
+
useLongPress(upButton.current, increment);
|
|
14137
|
+
useLongPress(downButton.current, decrement);
|
|
14138
|
+
const _onBeforeInput = React.useCallback(
|
|
14139
|
+
(event) => {
|
|
14140
|
+
const target2 = event.target;
|
|
14141
|
+
const nextValue = parser.parse(
|
|
14142
|
+
target2.value.slice(0, target2.selectionStart ?? void 0) + (event.nativeEvent.data ?? "") + target2.value.slice(target2.selectionEnd ?? void 0)
|
|
14143
|
+
).toString();
|
|
14144
|
+
if (!parser.isValidPartialNumber(nextValue, min, max)) {
|
|
14145
|
+
event.preventDefault();
|
|
14146
|
+
}
|
|
14147
|
+
},
|
|
14148
|
+
[parser, min, max]
|
|
14149
|
+
);
|
|
14150
|
+
const _onChange = React.useCallback(
|
|
14151
|
+
(event) => {
|
|
14152
|
+
const strValue = event.target.value;
|
|
14153
|
+
let parsed = clampInputValue(parser.parse(event.target.value));
|
|
14154
|
+
if (integersOnly && Number.isInteger(parsed)) {
|
|
14155
|
+
parsed = Math.trunc(parsed);
|
|
14156
|
+
}
|
|
14157
|
+
if (canSynchronizeValue(strValue, locale, formatOptions)) {
|
|
14158
|
+
updateState({ value: parsed });
|
|
14159
|
+
} else {
|
|
14160
|
+
setValueStrRep(strValue);
|
|
14161
|
+
}
|
|
14162
|
+
onFixCursorPosition(event);
|
|
14163
|
+
onDidChange(parsed);
|
|
14164
|
+
},
|
|
14165
|
+
[
|
|
14166
|
+
clampInputValue,
|
|
14167
|
+
parser,
|
|
14168
|
+
onDidChange,
|
|
14169
|
+
locale,
|
|
14170
|
+
formatOptions,
|
|
14171
|
+
onFixCursorPosition,
|
|
14172
|
+
updateState,
|
|
14173
|
+
integersOnly
|
|
14174
|
+
]
|
|
14175
|
+
);
|
|
14176
|
+
const _onFocus = React.useCallback(() => {
|
|
14177
|
+
onFocus == null ? void 0 : onFocus();
|
|
14178
|
+
}, [onFocus]);
|
|
14179
|
+
const _onBlur = React.useCallback(
|
|
14180
|
+
(event) => {
|
|
14181
|
+
const value2 = event.target.value;
|
|
14182
|
+
clampAndSaveInput(value2);
|
|
14183
|
+
onBlur();
|
|
14184
|
+
},
|
|
14185
|
+
[clampAndSaveInput, onBlur]
|
|
14186
|
+
);
|
|
14187
|
+
const _onKeyDown = React.useCallback(
|
|
14188
|
+
(event) => {
|
|
14189
|
+
if (event.key === "Enter") {
|
|
14190
|
+
clampAndSaveInput(value);
|
|
14191
|
+
}
|
|
14192
|
+
if (event.code === "ArrowUp") {
|
|
14193
|
+
event.preventDefault();
|
|
14194
|
+
increment();
|
|
14195
|
+
}
|
|
14196
|
+
if (event.code === "ArrowDown") {
|
|
14197
|
+
event.preventDefault();
|
|
14198
|
+
decrement();
|
|
14199
|
+
}
|
|
14200
|
+
},
|
|
14201
|
+
[clampAndSaveInput, increment, decrement, value]
|
|
14202
|
+
);
|
|
14203
|
+
const focus = React.useCallback(() => {
|
|
14204
|
+
var _a;
|
|
14205
|
+
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
14206
|
+
}, []);
|
|
14207
|
+
React.useEffect(() => {
|
|
14208
|
+
if (autoFocus) {
|
|
14209
|
+
setTimeout(() => {
|
|
14210
|
+
var _a;
|
|
14211
|
+
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
14212
|
+
}, 0);
|
|
14213
|
+
}
|
|
14214
|
+
}, [autoFocus]);
|
|
14215
|
+
const setValue = useEvent((newValue) => {
|
|
14216
|
+
updateState({ value: newValue });
|
|
14217
|
+
});
|
|
14218
|
+
React.useEffect(() => {
|
|
14219
|
+
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
14220
|
+
focus,
|
|
14221
|
+
setValue
|
|
14222
|
+
});
|
|
14223
|
+
}, [focus, registerComponentApi, setValue]);
|
|
14224
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14225
|
+
ItemWithLabel,
|
|
14226
|
+
{
|
|
14227
|
+
ref: forwardedRef,
|
|
14228
|
+
labelPosition,
|
|
14229
|
+
label: label2,
|
|
14230
|
+
labelWidth,
|
|
14231
|
+
labelBreak: labelBreak2,
|
|
14232
|
+
required: required2,
|
|
14233
|
+
enabled: enabled2,
|
|
14234
|
+
onFocus,
|
|
14235
|
+
onBlur,
|
|
14236
|
+
style,
|
|
14237
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14238
|
+
"div",
|
|
14239
|
+
{
|
|
14240
|
+
className: classnames(styles$p.inputRoot, {
|
|
14241
|
+
[styles$p.readOnly]: readOnly2,
|
|
14242
|
+
[styles$p.disabled]: !enabled2,
|
|
14243
|
+
[styles$p.noSpinBox]: !hasSpinBox,
|
|
14244
|
+
[styles$p.error]: validationStatus === "error",
|
|
14245
|
+
[styles$p.warning]: validationStatus === "warning",
|
|
14246
|
+
[styles$p.valid]: validationStatus === "valid"
|
|
14247
|
+
}),
|
|
14248
|
+
tabIndex: -1,
|
|
14249
|
+
onFocus: () => {
|
|
14250
|
+
var _a;
|
|
14251
|
+
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
14252
|
+
},
|
|
14253
|
+
children: [
|
|
14254
|
+
/* @__PURE__ */ jsxRuntime.jsx(Adornment, { text: startText, iconName: startIcon, className: styles$p.adornment }),
|
|
14255
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14256
|
+
"input",
|
|
14257
|
+
{
|
|
14258
|
+
id,
|
|
14259
|
+
ref: inputRef,
|
|
14260
|
+
type: "text",
|
|
14261
|
+
placeholder: placeholder2,
|
|
14262
|
+
required: required2,
|
|
14263
|
+
readOnly: readOnly2,
|
|
14264
|
+
disabled: !enabled2,
|
|
14265
|
+
inputMode,
|
|
14266
|
+
className: classnames(styles$p.input),
|
|
14267
|
+
value: valueStrRep,
|
|
14268
|
+
min,
|
|
14269
|
+
max,
|
|
14270
|
+
autoFocus,
|
|
14271
|
+
onBeforeInput: _onBeforeInput,
|
|
14272
|
+
onChange: _onChange,
|
|
14273
|
+
onFocus: _onFocus,
|
|
14274
|
+
onBlur: _onBlur,
|
|
14275
|
+
onKeyDown: _onKeyDown
|
|
14276
|
+
}
|
|
14277
|
+
),
|
|
14278
|
+
/* @__PURE__ */ jsxRuntime.jsx(Adornment, { text: endText, iconName: endIcon, className: styles$p.adornment }),
|
|
14279
|
+
hasSpinBox && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$p.spinnerBox, children: [
|
|
14280
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14281
|
+
Button,
|
|
14282
|
+
{
|
|
14283
|
+
"data-spinner": "up",
|
|
14284
|
+
type: "button",
|
|
14285
|
+
variant: "ghost",
|
|
14286
|
+
themeColor: "secondary",
|
|
14287
|
+
tabIndex: -1,
|
|
14288
|
+
className: styles$p.spinnerButton,
|
|
14289
|
+
disabled: !enabled2 || readOnly2,
|
|
14290
|
+
ref: upButton,
|
|
14291
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevronup", size: "sm" })
|
|
14292
|
+
}
|
|
14293
|
+
),
|
|
14294
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14295
|
+
Button,
|
|
14296
|
+
{
|
|
14297
|
+
"data-spinner": "down",
|
|
14298
|
+
type: "button",
|
|
14299
|
+
tabIndex: -1,
|
|
14300
|
+
variant: "ghost",
|
|
14301
|
+
themeColor: "secondary",
|
|
14302
|
+
className: styles$p.spinnerButton,
|
|
14303
|
+
disabled: !enabled2 || readOnly2,
|
|
14304
|
+
ref: downButton,
|
|
14305
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevrondown", size: "sm" })
|
|
14306
|
+
}
|
|
14307
|
+
)
|
|
14308
|
+
] })
|
|
14309
|
+
]
|
|
14310
|
+
}
|
|
14311
|
+
)
|
|
14312
|
+
}
|
|
14313
|
+
);
|
|
14314
|
+
});
|
|
14315
|
+
function useNumberFormatter(locale, options2) {
|
|
14316
|
+
return React.useMemo(() => {
|
|
14317
|
+
return new number.NumberFormatter(locale, options2);
|
|
14318
|
+
}, [locale, options2]);
|
|
14319
|
+
}
|
|
14320
|
+
function useNumberParser(locale, options2) {
|
|
14321
|
+
return React.useMemo(() => {
|
|
14322
|
+
return new number.NumberParser(locale, options2);
|
|
14323
|
+
}, [locale, options2]);
|
|
14324
|
+
}
|
|
14325
|
+
function useLongPress(elementRef, action, delay = 500) {
|
|
14326
|
+
const timeoutId = React.useRef(0);
|
|
14327
|
+
const intervalId = React.useRef(0);
|
|
14328
|
+
const savedAction = React.useRef(action);
|
|
14329
|
+
React.useEffect(() => {
|
|
14330
|
+
savedAction.current = action;
|
|
14331
|
+
}, [action]);
|
|
14332
|
+
React.useEffect(() => {
|
|
14333
|
+
const onMouseDown = () => {
|
|
14334
|
+
var _a;
|
|
14335
|
+
(_a = savedAction.current) == null ? void 0 : _a.call(savedAction);
|
|
14336
|
+
timeoutId.current = window.setTimeout(() => {
|
|
14337
|
+
intervalId.current = window.setInterval(() => {
|
|
14338
|
+
var _a2;
|
|
14339
|
+
(_a2 = savedAction.current) == null ? void 0 : _a2.call(savedAction);
|
|
14340
|
+
}, 100);
|
|
14341
|
+
}, delay);
|
|
14342
|
+
};
|
|
14343
|
+
const onMouseUp = () => {
|
|
14344
|
+
clearTimeout(timeoutId.current);
|
|
14345
|
+
clearInterval(intervalId.current);
|
|
14346
|
+
};
|
|
14347
|
+
const onMouseOut = () => {
|
|
14348
|
+
clearTimeout(timeoutId.current);
|
|
14349
|
+
clearInterval(intervalId.current);
|
|
14350
|
+
};
|
|
14351
|
+
elementRef == null ? void 0 : elementRef.addEventListener("mousedown", onMouseDown);
|
|
14352
|
+
elementRef == null ? void 0 : elementRef.addEventListener("mouseup", onMouseUp);
|
|
14353
|
+
elementRef == null ? void 0 : elementRef.addEventListener("mouseout", onMouseOut);
|
|
14354
|
+
return () => {
|
|
14355
|
+
elementRef == null ? void 0 : elementRef.removeEventListener("mousedown", onMouseDown);
|
|
14356
|
+
elementRef == null ? void 0 : elementRef.removeEventListener("mouseup", onMouseUp);
|
|
14357
|
+
elementRef == null ? void 0 : elementRef.removeEventListener("mouseout", onMouseOut);
|
|
14358
|
+
};
|
|
14359
|
+
}, [elementRef, action, delay]);
|
|
14360
|
+
}
|
|
14361
|
+
function handleChangingValue(value, parser, type, step = 1, min = -999999999999999, max = NUMBERBOX_MAX_VALUE) {
|
|
14362
|
+
const currentInputValue = parser.parse(value ?? "");
|
|
14363
|
+
if (lodashEs.isNaN(currentInputValue)) {
|
|
14364
|
+
return min ?? 0;
|
|
14365
|
+
}
|
|
14366
|
+
if (type === "increase") {
|
|
14367
|
+
return clamp(currentInputValue + (step ?? 1), min, max);
|
|
14368
|
+
} else {
|
|
14369
|
+
return clamp(currentInputValue - (step ?? 1), min, max);
|
|
14370
|
+
}
|
|
14371
|
+
}
|
|
14372
|
+
function canSynchronizeValue(value, locale, options2) {
|
|
14373
|
+
if (value.trim() === "") return true;
|
|
14374
|
+
if (lodashEs.isNaN(value)) return false;
|
|
14375
|
+
if (hasLeadingZeros(value, locale, options2)) return false;
|
|
14376
|
+
if (isFloatWithTrailingZeros(value, locale, options2)) return false;
|
|
14377
|
+
if (overMaximumFractionDigits(value, locale, options2)) return false;
|
|
14378
|
+
return true;
|
|
14379
|
+
}
|
|
14380
|
+
function hasLeadingZeros(input2, locale = "en-US", options2) {
|
|
14381
|
+
var _a, _b;
|
|
14382
|
+
const formatter = new Intl.NumberFormat(locale, options2);
|
|
14383
|
+
const parts = formatter.formatToParts(1234.5);
|
|
14384
|
+
const group = ((_a = parts.find((p) => p.type === "group")) == null ? void 0 : _a.value) || "";
|
|
14385
|
+
const decimal = ((_b = parts.find((p) => p.type === "decimal")) == null ? void 0 : _b.value) || "";
|
|
14386
|
+
const normalized = (group === "" ? input2 : input2.replace(new RegExp(`\\${group}`, "g"), "")).replace(decimal, ".");
|
|
14387
|
+
if (!/^-?\d*\.?\d*$/.test(normalized)) return false;
|
|
14388
|
+
const [integer, fraction] = normalized.split(".");
|
|
14389
|
+
if (!fraction) {
|
|
14390
|
+
return integer.length > 1 && integer.startsWith("0");
|
|
14391
|
+
}
|
|
14392
|
+
const leadingIntegerZeros = integer.startsWith("0") && integer.length >= 1;
|
|
14393
|
+
const leadingFractionZeros = (fraction.match(/^0+/) || [""])[0].length >= 2;
|
|
14394
|
+
return leadingIntegerZeros || leadingFractionZeros;
|
|
14395
|
+
}
|
|
14396
|
+
function isFloatWithTrailingZeros(input2, locale = "en-US", options2) {
|
|
14397
|
+
var _a, _b;
|
|
14398
|
+
const formatter = new Intl.NumberFormat(locale, options2);
|
|
14399
|
+
const parts = formatter.formatToParts(1234.5);
|
|
14400
|
+
const group = ((_a = parts.find((p) => p.type === "group")) == null ? void 0 : _a.value) || "";
|
|
14401
|
+
const decimal = ((_b = parts.find((p) => p.type === "decimal")) == null ? void 0 : _b.value) || ".";
|
|
14402
|
+
const normalized = (group === "" ? input2 : input2.replace(new RegExp(`\\${group}`, "g"), "")).replace(decimal, ".");
|
|
14403
|
+
if (!/^-?\d*\.?\d*$/.test(normalized)) return false;
|
|
14404
|
+
if (!normalized.includes(".")) return false;
|
|
14405
|
+
const [_, fraction] = normalized.split(".");
|
|
14406
|
+
if (!fraction || fraction.length === 0) return true;
|
|
14407
|
+
return /0+$/.test(fraction);
|
|
14408
|
+
}
|
|
14409
|
+
function overMaximumFractionDigits(input2, locale = "en-US", options2) {
|
|
14410
|
+
var _a, _b;
|
|
14411
|
+
const formatter = new Intl.NumberFormat(locale, options2);
|
|
14412
|
+
const parts = formatter.formatToParts(1234.5);
|
|
14413
|
+
const group = ((_a = parts.find((p) => p.type === "group")) == null ? void 0 : _a.value) || "";
|
|
14414
|
+
const decimal = ((_b = parts.find((p) => p.type === "decimal")) == null ? void 0 : _b.value) || "";
|
|
14415
|
+
const normalized = (group === "" ? input2 : input2.replace(new RegExp(`\\${group}`, "g"), "")).replace(decimal, ".");
|
|
14416
|
+
if (!/^-?\d*\.?\d*$/.test(normalized)) return false;
|
|
14417
|
+
const [_, fraction] = normalized.split(".");
|
|
14418
|
+
if (!fraction) {
|
|
14419
|
+
return false;
|
|
14420
|
+
}
|
|
14421
|
+
return fraction.length > options2.maximumFractionDigits;
|
|
14422
|
+
}
|
|
14423
|
+
function useCursorCorrection(value, inputRef) {
|
|
14424
|
+
const position = React.useRef({
|
|
14425
|
+
beforeStart: 0,
|
|
14426
|
+
beforeEnd: 0
|
|
14427
|
+
});
|
|
14428
|
+
React.useLayoutEffect(() => {
|
|
14429
|
+
inputRef.current.setSelectionRange(position.current.beforeStart, position.current.beforeEnd);
|
|
14430
|
+
}, [value]);
|
|
14431
|
+
const onInputChange = (event) => {
|
|
14432
|
+
position.current.beforeStart = event.target.selectionStart;
|
|
14433
|
+
position.current.beforeEnd = event.target.selectionEnd;
|
|
14434
|
+
};
|
|
14435
|
+
return onInputChange;
|
|
14436
|
+
}
|
|
13901
14437
|
const DEFAULT_LABEL_POSITIONS = {
|
|
13902
14438
|
checkbox: "end"
|
|
13903
14439
|
};
|
|
@@ -14043,6 +14579,23 @@
|
|
|
14043
14579
|
);
|
|
14044
14580
|
break;
|
|
14045
14581
|
}
|
|
14582
|
+
case "integer2":
|
|
14583
|
+
case "number2": {
|
|
14584
|
+
formControl = /* @__PURE__ */ jsxRuntime.jsx(
|
|
14585
|
+
NumberBox2,
|
|
14586
|
+
{
|
|
14587
|
+
...rest,
|
|
14588
|
+
value,
|
|
14589
|
+
updateState: onStateChange,
|
|
14590
|
+
registerComponentApi,
|
|
14591
|
+
enabled: isEnabled2,
|
|
14592
|
+
min: validations.minValue,
|
|
14593
|
+
max: validations.maxValue,
|
|
14594
|
+
integersOnly: type === "integer2"
|
|
14595
|
+
}
|
|
14596
|
+
);
|
|
14597
|
+
break;
|
|
14598
|
+
}
|
|
14046
14599
|
case "switch":
|
|
14047
14600
|
case "checkbox": {
|
|
14048
14601
|
formControl = /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -14587,6 +15140,7 @@
|
|
|
14587
15140
|
},
|
|
14588
15141
|
itemTemplate: dComponent("The component template to display a single item")
|
|
14589
15142
|
},
|
|
15143
|
+
childrenAsTemplate: "itemTemplate",
|
|
14590
15144
|
contextVars: {
|
|
14591
15145
|
$item: dComponent(
|
|
14592
15146
|
"This value represents the current iteration item while the component renders its children."
|
|
@@ -14716,6 +15270,7 @@
|
|
|
14716
15270
|
defaultValue: true
|
|
14717
15271
|
}
|
|
14718
15272
|
},
|
|
15273
|
+
childrenAsTemplate: "itemTemplate",
|
|
14719
15274
|
apis: {
|
|
14720
15275
|
scrollToTop: d("This method scrolls the list to the top."),
|
|
14721
15276
|
scrollToBottom: d("This method scrolls the list to the bottom."),
|
|
@@ -14736,7 +15291,7 @@
|
|
|
14736
15291
|
status: "experimental",
|
|
14737
15292
|
description: `The \`${COMP$H}\` component represents a logo or a brand symbol. Usually, you use this component in the [\`AppHeader\`](./AppHeader.mdx#logotemplate).`
|
|
14738
15293
|
});
|
|
14739
|
-
const themeVars$f = `'{"accentColor-Blockquote": "var(--xmlui-accentColor-Blockquote)", "accentWidth-Blockquote": "var(--xmlui-accentWidth-Blockquote)", "backgroundColor-
|
|
15294
|
+
const themeVars$f = `'{"accentColor-Blockquote": "var(--xmlui-accentColor-Blockquote)", "accentWidth-Blockquote": "var(--xmlui-accentWidth-Blockquote)", "backgroundColor-Blockquote": "var(--xmlui-backgroundColor-Blockquote)", "paddingLeft-Blockquote": "var(--xmlui-paddingLeft-Blockquote)", "borderRadius-Blockquote": "var(--xmlui-borderRadius-Blockquote)", "marginTop-Blockquote": "var(--xmlui-marginTop-Blockquote)", "marginBottom-Blockquote": "var(--xmlui-marginBottom-Blockquote)", "backgroundColor-Admonition": "var(--xmlui-backgroundColor-Admonition)", "paddingLeft-Admonition": "var(--xmlui-paddingLeft-Admonition)", "borderRadius-Admonition": "var(--xmlui-borderRadius-Admonition)", "iconSize-Admonition": "var(--xmlui-iconSize-Admonition)", "marginTop-Admonition": "var(--xmlui-marginTop-Admonition)", "marginBottom-Admonition": "var(--xmlui-marginBottom-Admonition)", "marginLeft-Admonition-content": "var(--xmlui-marginLeft-Admonition-content)", "marginTop-HtmlVideo": "var(--xmlui-marginTop-HtmlVideo)", "marginBottom-HtmlVideo": "var(--xmlui-marginBottom-HtmlVideo)"}'`;
|
|
14740
15295
|
const styles$g = {
|
|
14741
15296
|
themeVars: themeVars$f
|
|
14742
15297
|
};
|
|
@@ -14777,11 +15332,13 @@
|
|
|
14777
15332
|
}
|
|
14778
15333
|
},
|
|
14779
15334
|
defaultThemeVars: {
|
|
15335
|
+
"backgroundColor-Admonition": "$color-warn-300",
|
|
14780
15336
|
"borderRadius-Admonition": "$space-4",
|
|
14781
15337
|
"iconSize-Admonition": "1.5rem",
|
|
14782
15338
|
"padding-Admonition": "1rem",
|
|
14783
15339
|
"marginBottom-Admonition": "1rem",
|
|
14784
15340
|
"marginLeft-Admonition-content": ".5rem",
|
|
15341
|
+
"backgroundColor-Blockquote": "$color-warn-200",
|
|
14785
15342
|
"accentWidth-Blockquote": "3px",
|
|
14786
15343
|
"accentColor-Blockquote": "$color-surface-500",
|
|
14787
15344
|
"padding-Blockquote": ".5rem",
|
|
@@ -15160,9 +15717,9 @@
|
|
|
15160
15717
|
},
|
|
15161
15718
|
themeVars: parseScssVar(styles$H.themeVars),
|
|
15162
15719
|
defaultThemeVars: {
|
|
15163
|
-
[`backgroundColor-${COMP$C}`]: "
|
|
15720
|
+
[`backgroundColor-${COMP$C}`]: "$backgroundColor",
|
|
15164
15721
|
[`border-${COMP$C}`]: "0px solid $borderColor",
|
|
15165
|
-
[`paddingHorizontal-${COMP$C}`]: "
|
|
15722
|
+
[`paddingHorizontal-${COMP$C}`]: "0",
|
|
15166
15723
|
[`paddingVertical-logo-${COMP$C}`]: "$space-4",
|
|
15167
15724
|
[`paddingHorizontal-logo-${COMP$C}`]: "$space-4",
|
|
15168
15725
|
[`marginBottom-logo-${COMP$C}`]: "$space-4",
|
|
@@ -15520,6 +16077,9 @@
|
|
|
15520
16077
|
optionLabelTemplate: dComponent(
|
|
15521
16078
|
`This property allows replacing the default template to display an option in the dropdown list.`
|
|
15522
16079
|
),
|
|
16080
|
+
optionTemplate: dComponent(
|
|
16081
|
+
`This property allows replacing the default template to display an option in the dropdown list.`
|
|
16082
|
+
),
|
|
15523
16083
|
valueTemplate: dComponent(
|
|
15524
16084
|
`This property allows replacing the default template to display a selected value when multiple selections (\`multiSelect\` is \`true\`) are enabled.`
|
|
15525
16085
|
),
|
|
@@ -15544,7 +16104,8 @@
|
|
|
15544
16104
|
apis: {
|
|
15545
16105
|
focus: dFocus(COMP$t),
|
|
15546
16106
|
setValue: dSetValueApi(),
|
|
15547
|
-
value: dValue()
|
|
16107
|
+
value: dValue(),
|
|
16108
|
+
reset: d(`This method resets the component to its initial value, or clears the selection if no initial value was provided.`)
|
|
15548
16109
|
},
|
|
15549
16110
|
contextVars: {
|
|
15550
16111
|
$item: d(`This property represents the value of an item in the dropdown list.`),
|
|
@@ -15567,6 +16128,8 @@
|
|
|
15567
16128
|
[`fontSize-${COMP$t}-badge`]: "$fontSize-small",
|
|
15568
16129
|
[`paddingHorizontal-${COMP$t}-badge`]: "$space-1",
|
|
15569
16130
|
[`paddingVertical-${COMP$t}-badge`]: "$space-1",
|
|
16131
|
+
[`paddingHorizontal-item-${COMP$t}`]: "$space-2",
|
|
16132
|
+
[`paddingVertical-item-${COMP$t}`]: "$space-2",
|
|
15570
16133
|
[`opacity-text-item-${COMP$t}--disabled`]: "0.5",
|
|
15571
16134
|
[`opacity-${COMP$t}--disabled`]: "0.5",
|
|
15572
16135
|
[`backgroundColor-${COMP$t}-badge--hover`]: "$color-primary-400",
|
|
@@ -16440,7 +17003,7 @@
|
|
|
16440
17003
|
availableWidth * (numberOfUnitsById[column.id] / numberOfAllUnits)
|
|
16441
17004
|
);
|
|
16442
17005
|
});
|
|
16443
|
-
|
|
17006
|
+
reactDom.flushSync(() => {
|
|
16444
17007
|
setColumnSizing((prev) => {
|
|
16445
17008
|
return {
|
|
16446
17009
|
...prev,
|
|
@@ -17606,52 +18169,61 @@
|
|
|
17606
18169
|
const COMP$a = "DataSource";
|
|
17607
18170
|
const DataSourceMd = createMetadata({
|
|
17608
18171
|
status: "stable",
|
|
17609
|
-
description: `The \`${COMP$a}\` component manages fetching data from
|
|
18172
|
+
description: `The \`${COMP$a}\` component manages fetching data from an API endpoint. This component automatically manages the complexity of the fetch operation and caching. To manipulate data on the backend, use the [\`APICall\`](./APICall.mdx) component.`,
|
|
17610
18173
|
props: {
|
|
17611
18174
|
method: {
|
|
17612
|
-
description: `
|
|
18175
|
+
description: `Set the HTTP method.`,
|
|
17613
18176
|
defaultValue: "get",
|
|
17614
18177
|
availableValues: httpMethodNames
|
|
17615
18178
|
},
|
|
17616
|
-
|
|
17617
|
-
description: `
|
|
18179
|
+
id: {
|
|
18180
|
+
description: `Set the ID used by other components to access the retrieved data in the \`value\`property of a \`DataSource\`, or status info in the \`loaded\` and \`error\` properties.`,
|
|
17618
18181
|
isRequired: true,
|
|
17619
18182
|
valueType: "string"
|
|
17620
18183
|
},
|
|
17621
|
-
|
|
17622
|
-
description: `
|
|
18184
|
+
url: {
|
|
18185
|
+
description: `Set the URL.`,
|
|
18186
|
+
isRequired: true,
|
|
17623
18187
|
valueType: "string"
|
|
17624
18188
|
},
|
|
17625
18189
|
body: {
|
|
17626
|
-
description: `
|
|
18190
|
+
description: `Set the request body. The object you pass is serialized as a JSON string.`,
|
|
18191
|
+
valueType: "any"
|
|
18192
|
+
},
|
|
18193
|
+
rawBody: {
|
|
18194
|
+
description: `Set the request body with no serialization. Use it to send a payload that has already been serialized to a JSON string.`,
|
|
18195
|
+
valueType: "string"
|
|
17627
18196
|
},
|
|
17628
18197
|
queryParams: {
|
|
17629
|
-
description: `
|
|
18198
|
+
description: `Append key/value pairs to the URL.`,
|
|
18199
|
+
valueType: "any"
|
|
17630
18200
|
},
|
|
17631
18201
|
headers: {
|
|
17632
|
-
description: `
|
|
18202
|
+
description: `Set request headers. Pass an object whose keys are header names and values are header values.`,
|
|
18203
|
+
valueType: "any"
|
|
17633
18204
|
},
|
|
17634
18205
|
pollIntervalInSeconds: {
|
|
17635
|
-
description: `
|
|
18206
|
+
description: `Set the interval for periodic data fetching. If the data changes on refresh, XMLUI will re-render components that refer directly or indirectly to the \`DataSource\`. `,
|
|
17636
18207
|
valueType: "number"
|
|
17637
18208
|
},
|
|
17638
18209
|
inProgressNotificationMessage: {
|
|
17639
|
-
description: `
|
|
18210
|
+
description: `Set the message to display when the data fetch is in progress.`,
|
|
17640
18211
|
valueType: "string"
|
|
17641
18212
|
},
|
|
17642
18213
|
completedNotificationMessage: {
|
|
17643
|
-
description: `
|
|
18214
|
+
description: `Set the message to display when the data fetch completes.`,
|
|
17644
18215
|
valueType: "string"
|
|
17645
18216
|
},
|
|
17646
18217
|
errorNotificationMessage: {
|
|
17647
|
-
description: `
|
|
18218
|
+
description: `Set the message to display when the there is an error.`,
|
|
17648
18219
|
valueType: "string"
|
|
17649
18220
|
},
|
|
17650
18221
|
resultSelector: {
|
|
17651
|
-
description: `
|
|
18222
|
+
description: `Set an object key to extract a subset of the response data.`,
|
|
18223
|
+
valueType: "string"
|
|
17652
18224
|
},
|
|
17653
18225
|
transformResult: {
|
|
17654
|
-
description:
|
|
18226
|
+
description: `Set a function to perform a final transformation of the response data.`
|
|
17655
18227
|
},
|
|
17656
18228
|
prevPageSelector: {
|
|
17657
18229
|
description: `When using \`${COMP$a}\` with paging, the response may contain information about the previous and next page. This property defines the selector that extracts the previous page information from the response deserialized to an object.`
|
|
@@ -18472,7 +19044,7 @@
|
|
|
18472
19044
|
}
|
|
18473
19045
|
}
|
|
18474
19046
|
if (eat(SyntaxKind.Equal)) {
|
|
18475
|
-
if (!eat(SyntaxKind.StringLiteral)
|
|
19047
|
+
if (!eat(SyntaxKind.StringLiteral)) {
|
|
18476
19048
|
const attrFollowWithoutIdent = [SyntaxKind.NodeEnd, SyntaxKind.NodeClose];
|
|
18477
19049
|
errRecover(Diag_Attr_Value_Expected, attrFollowWithoutIdent);
|
|
18478
19050
|
}
|
|
@@ -19502,7 +20074,6 @@
|
|
|
19502
20074
|
const shouldCollapseWhitespace = tagName !== "event" && tagName !== "method";
|
|
19503
20075
|
const attrs = getAttributes(node2);
|
|
19504
20076
|
desugarKeyOnlyAttrs(attrs);
|
|
19505
|
-
desugarQuotelessAttrs(attrs, getText);
|
|
19506
20077
|
parseEscapeCharactersInAttrValues(attrs);
|
|
19507
20078
|
parseEscapeCharactersInContent(childNodes);
|
|
19508
20079
|
mergeConsecutiveTexts(childNodes, shouldCollapseWhitespace);
|
|
@@ -19871,15 +20442,6 @@
|
|
|
19871
20442
|
}
|
|
19872
20443
|
}
|
|
19873
20444
|
}
|
|
19874
|
-
function desugarQuotelessAttrs(attrs, getText) {
|
|
19875
|
-
var _a, _b, _c;
|
|
19876
|
-
for (let attr of attrs) {
|
|
19877
|
-
const attrValue = (_a = attr.children) == null ? void 0 : _a[2];
|
|
19878
|
-
if (((_c = (_b = attr.children) == null ? void 0 : _b[2]) == null ? void 0 : _c.kind) === SyntaxKind.Identifier) {
|
|
19879
|
-
attrValue.text = '"' + getText(attrValue) + '"';
|
|
19880
|
-
}
|
|
19881
|
-
}
|
|
19882
|
-
}
|
|
19883
20445
|
function addToNamespaces(namespaceStack, comp, nsKey, value) {
|
|
19884
20446
|
let nsCommaSeparated = value.split(":");
|
|
19885
20447
|
if (nsCommaSeparated.length > 2) {
|
|
@@ -19951,7 +20513,7 @@
|
|
|
19951
20513
|
}
|
|
19952
20514
|
return resolvedNamespace + "." + name;
|
|
19953
20515
|
}
|
|
19954
|
-
function xmlUiMarkupToComponent(source, fileId = 0
|
|
20516
|
+
function xmlUiMarkupToComponent(source, fileId = 0) {
|
|
19955
20517
|
const { parse, getText } = createXmlUiParser(source);
|
|
19956
20518
|
const { node, errors } = parse();
|
|
19957
20519
|
if (errors.length > 0) {
|
|
@@ -20479,7 +21041,8 @@
|
|
|
20479
21041
|
),
|
|
20480
21042
|
enabled: dEnabled(),
|
|
20481
21043
|
optionTemplate: d("This property is used to define a custom option template")
|
|
20482
|
-
}
|
|
21044
|
+
},
|
|
21045
|
+
childrenAsTemplate: "optionTemplate"
|
|
20483
21046
|
});
|
|
20484
21047
|
const OptionNative = React.memo((props) => {
|
|
20485
21048
|
const OptionType = useOptionType();
|