xmlui 0.10.19 → 0.10.21
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/lib/{apiInterceptorWorker-DPgtUtdA.mjs → apiInterceptorWorker-QiltRtq1.mjs} +1 -1
- package/dist/lib/{index-cuh97e2e.mjs → index-BiS4wEuu.mjs} +1486 -1211
- package/dist/lib/index.css +1 -1
- package/dist/{metadata/initMock-C-cnv--V.mjs → lib/initMock-CB_cMi6U.mjs} +25 -15
- package/dist/lib/language-server-web-worker.mjs +1 -1
- package/dist/lib/language-server.mjs +1 -1
- package/dist/lib/{metadata-utils-CtY0QcvH.mjs → metadata-utils-BTIt1_wE.mjs} +1 -1
- package/dist/lib/{server-common-Cine5nRR.mjs → server-common-DYZtsdM7.mjs} +51 -14
- package/dist/lib/{transform-bHBjkKSL.mjs → transform-Tooy42EB.mjs} +16 -18
- package/dist/lib/xmlui-parser.mjs +2 -2
- package/dist/lib/{xmlui-serializer-DB6BLiXK.mjs → xmlui-serializer-uCYa8_tZ.mjs} +1 -1
- package/dist/lib/xmlui.d.ts +11 -3
- package/dist/lib/xmlui.mjs +2 -2
- package/dist/metadata/{apiInterceptorWorker-BmKP8bnq.mjs → apiInterceptorWorker-Dql7QGw2.mjs} +1 -1
- package/dist/metadata/{collectedComponentMetadata-Cp-9lpnG.mjs → collectedComponentMetadata-MFUg6aSX.mjs} +1655 -1390
- package/dist/{lib/initMock-BMxsanHc.mjs → metadata/initMock-Dw9wrVkQ.mjs} +25 -15
- package/dist/metadata/style.css +1 -1
- package/dist/metadata/xmlui-metadata.mjs +1 -1
- package/dist/metadata/xmlui-metadata.umd.js +3 -3
- package/dist/scripts/package.json +3 -6
- package/dist/scripts/src/components/Animation/AnimationNative.js +28 -28
- package/dist/scripts/src/components/App/App.js +4 -4
- package/dist/scripts/src/components/App/App.spec.js +17 -17
- package/dist/scripts/src/components/App/AppNative.js +1 -1
- package/dist/scripts/src/components/AppState/AppState.js +3 -2
- package/dist/scripts/src/components/AppState/AppState.spec.js +26 -2
- package/dist/scripts/src/components/AppState/AppStateNative.js +3 -4
- package/dist/scripts/src/components/AutoComplete/AutoComplete.js +15 -10
- package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +4 -4
- package/dist/scripts/src/components/Carousel/Carousel.spec.js +214 -0
- package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +1 -1
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +2 -0
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.spec.js +193 -0
- package/dist/scripts/src/components/DateInput/DateInput.spec.js +6 -6
- package/dist/scripts/src/components/DateInput/DateInputNative.js +0 -1
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.spec.js +3 -3
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +4 -13
- package/dist/scripts/src/components/Form/Form.spec.js +25 -9
- package/dist/scripts/src/components/Form/FormNative.js +7 -5
- package/dist/scripts/src/components/FormItem/FormItem.js +3 -1
- package/dist/scripts/src/components/FormItem/FormItem.spec.js +5 -14
- package/dist/scripts/src/components/FormItem/FormItemNative.js +12 -8
- package/dist/scripts/src/components/FormItem/Validations.js +2 -2
- package/dist/scripts/src/components/IFrame/IFrameNative.js +0 -2
- package/dist/scripts/src/components/IconRegistryContext.js +1 -1
- package/dist/scripts/src/components/List/ListNative.js +2 -2
- package/dist/scripts/src/components/ModalDialog/ConfirmationModalContextProvider.js +3 -12
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +2 -2
- package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +6 -3
- package/dist/scripts/src/components/NestedApp/AppWithCodeViewNative.js +1 -1
- package/dist/scripts/src/components/NestedApp/NestedAppNative.js +3 -3
- package/dist/scripts/src/components/NumberBox/NumberBox.spec.js +2 -2
- package/dist/scripts/src/components/Pagination/Pagination.spec.js +5 -0
- package/dist/scripts/src/components/Pagination/PaginationNative.js +1 -3
- package/dist/scripts/src/components/Queue/Queue.spec.js +45 -47
- package/dist/scripts/src/components/Queue/QueueNative.js +1 -1
- package/dist/scripts/src/components/RadioGroup/RadioGroup.spec.js +5 -5
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapterNative.js +1 -1
- package/dist/scripts/src/components/Select/MultiSelectOption.js +42 -0
- package/dist/scripts/src/components/Select/Select.js +3 -3
- package/dist/scripts/src/components/Select/SelectContext.js +8 -1
- package/dist/scripts/src/components/Select/SelectNative.js +134 -142
- package/dist/scripts/src/components/Select/SelectOption.js +34 -0
- package/dist/scripts/src/components/Select/SimpleSelect.js +57 -0
- package/dist/scripts/src/components/Spinner/Spinner.spec.js +1 -1
- package/dist/scripts/src/components/Table/useRowSelection.js +14 -23
- package/dist/scripts/src/components/Text/Text.js +5 -1
- package/dist/scripts/src/components/Text/Text.spec.js +317 -0
- package/dist/scripts/src/components/Text/TextNative.js +112 -1
- package/dist/scripts/src/components/TextArea/TextArea.spec.js +8 -8
- package/dist/scripts/src/components/Theme/Theme.js +2 -1
- package/dist/scripts/src/components/Theme/Theme.spec.js +266 -0
- package/dist/scripts/src/components/Theme/ThemeNative.js +8 -1
- package/dist/scripts/src/components/TimeInput/TimeInput.spec.js +3 -3
- package/dist/scripts/src/components/TimeInput/TimeInputNative.js +0 -1
- package/dist/scripts/src/components/Timer/TimerNative.js +0 -1
- package/dist/scripts/src/components/Tree/TreeNative.js +16 -23
- package/dist/scripts/src/components-core/InspectorContext.js +1 -1
- package/dist/scripts/src/components-core/StandaloneApp.js +6 -8
- package/dist/scripts/src/components-core/action/FileUploadAction.js +1 -1
- package/dist/scripts/src/components-core/behaviors/BehaviorContext.js +50 -0
- package/dist/scripts/src/components-core/behaviors/CoreBehaviors.js +6 -1
- package/dist/scripts/src/components-core/interception/ApiInterceptor.js +9 -11
- package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +3 -3
- package/dist/scripts/src/components-core/interception/Backend.js +1 -1
- package/dist/scripts/src/components-core/interception/IndexedDb.js +64 -66
- package/dist/scripts/src/components-core/interception/apiInterceptorWorker.js +2 -2
- package/dist/scripts/src/components-core/loader/DataLoader.js +6 -14
- package/dist/scripts/src/components-core/loader/Loader.js +11 -11
- package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +4 -2
- package/dist/scripts/src/components-core/loader/PageableLoader.js +10 -9
- package/dist/scripts/src/components-core/rendering/AppContent.js +1 -7
- package/dist/scripts/src/components-core/rendering/ErrorBoundary.js +1 -1
- package/dist/scripts/src/components-core/script-runner/bannedFunctions.js +1 -1
- package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +180 -186
- package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +6 -6
- package/dist/scripts/src/components-core/script-runner/process-statement-sync.js +2 -2
- package/dist/scripts/src/components-core/utils/actionUtils.js +1 -1
- package/dist/scripts/src/components-core/utils/hooks.js +1 -1
- package/dist/scripts/src/components-core/utils/misc.js +4 -4
- package/dist/scripts/src/components-core/xmlui-parser.js +47 -31
- package/dist/scripts/src/language-server/server-common.js +25 -24
- package/dist/scripts/src/language-server/services/common/lsp-utils.js +2 -2
- package/dist/scripts/src/language-server/services/completion.js +20 -2
- package/dist/scripts/src/language-server/services/diagnostic.js +1 -1
- package/dist/scripts/src/language-server/services/hover.js +2 -2
- package/dist/scripts/src/parsers/common/utils.js +2 -2
- package/dist/scripts/src/parsers/scripting/Lexer.js +21 -15
- package/dist/scripts/src/parsers/scripting/Parser.js +8 -9
- package/dist/scripts/src/parsers/style-parser/StyleLexer.js +22 -22
- package/dist/scripts/src/parsers/style-parser/StyleParser.js +70 -68
- package/dist/scripts/src/testing/ComponentDrivers.js +20 -39
- package/dist/scripts/src/testing/component-test-helpers.js +34 -50
- package/dist/scripts/src/testing/fixtures.js +114 -113
- package/dist/scripts/src/testing/themed-app-test-helpers.js +7 -13
- package/dist/standalone/xmlui-standalone.es.d.ts +11 -3
- package/dist/standalone/xmlui-standalone.umd.js +35 -35
- package/package.json +3 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _a;
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import React__default, { forwardRef, useState, useEffect, useId, cloneElement, useRef, useInsertionEffect, useCallback, useContext, useLayoutEffect, useMemo, createContext, useTransition, memo, useDeferredValue,
|
|
4
|
+
import React__default, { forwardRef, useState, useEffect, useId, cloneElement, useRef, useInsertionEffect, useCallback, useContext, useLayoutEffect, useMemo, createContext, useTransition, memo, useDeferredValue, createElement, useReducer, isValidElement, Fragment as Fragment$1, Children, startTransition } from "react";
|
|
5
5
|
import { throttle, get, isEmpty, cloneDeep, omit, omitBy, isUndefined, noop as noop$2, isEqual, isArray, isNumber, set, isPlainObject, isString as isString$1, isNil, union, uniq, orderBy as orderBy$1, isObject, groupBy, sortBy, merge, defaultTo, capitalize, unset, setWith, keyBy, pick, isNaN as isNaN$1 } from "lodash-es";
|
|
6
6
|
import { formatDistanceToNow, parse, format, parseISO, isValid, isToday, isYesterday, isTomorrow, isThisWeek, formatRelative, isThisYear, isSameDay, differenceInMinutes } from "date-fns";
|
|
7
7
|
import classnames from "classnames";
|
|
@@ -23,9 +23,8 @@ import * as dropzone from "react-dropzone";
|
|
|
23
23
|
import produce, { createDraft, finishDraft, enableMapSet } from "immer";
|
|
24
24
|
import memoizeOne from "memoize-one";
|
|
25
25
|
import { parseRegExpLiteral } from "@eslint-community/regexpp";
|
|
26
|
-
import { Root, Trigger, Icon as Icon$m, Portal, Content, ScrollUpButton, SelectViewport, ScrollDownButton, Item as Item$1, ItemText, ItemIndicator, SelectItemText } from "@radix-ui/react-select";
|
|
27
|
-
import { Command, CommandInput, CommandList, CommandEmpty, CommandItem } from "cmdk";
|
|
28
26
|
import { FocusScope } from "@radix-ui/react-focus-scope";
|
|
27
|
+
import { Item as Item$1, ItemText, ItemIndicator, Root, Trigger, Portal, Content, ScrollUpButton, Viewport, ScrollDownButton, SelectItemText } from "@radix-ui/react-select";
|
|
29
28
|
import * as InnerRadioGroup from "@radix-ui/react-radio-group";
|
|
30
29
|
import TextareaAutosize from "react-textarea-autosize";
|
|
31
30
|
import { Root as Root$2, Track, Range, Thumb } from "@radix-ui/react-slider";
|
|
@@ -35,12 +34,10 @@ import remarkGfm from "remark-gfm";
|
|
|
35
34
|
import rehypeRaw from "rehype-raw";
|
|
36
35
|
import { visit } from "unist-util-visit";
|
|
37
36
|
import { useQuery, useInfiniteQuery, QueryClientProvider, QueryClient } from "@tanstack/react-query";
|
|
38
|
-
import {
|
|
39
|
-
import AutoSizer from "react-virtualized-auto-sizer";
|
|
37
|
+
import { Virtualizer } from "virtua";
|
|
40
38
|
import { useReactTable, getPaginationRowModel, getCoreRowModel, flexRender } from "@tanstack/react-table";
|
|
41
39
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
42
40
|
import { RenderPropSticky } from "react-sticky-el";
|
|
43
|
-
import { Virtualizer } from "virtua";
|
|
44
41
|
import * as HoverCard from "@radix-ui/react-hover-card";
|
|
45
42
|
import Papa from "papaparse";
|
|
46
43
|
import { Root as Root$1, List, Trigger as Trigger$1, Content as Content$1 } from "@radix-ui/react-tabs";
|
|
@@ -470,18 +467,18 @@ function getElementRef(element) {
|
|
|
470
467
|
return element.props.ref || element.ref;
|
|
471
468
|
}
|
|
472
469
|
const themeVars$10 = `'{"textColor-FormItemLabel": "var(--xmlui-textColor-FormItemLabel)", "fontFamily-FormItemLabel": "var(--xmlui-fontFamily-FormItemLabel)", "fontSize-FormItemLabel": "var(--xmlui-fontSize-FormItemLabel)", "fontWeight-FormItemLabel": "var(--xmlui-fontWeight-FormItemLabel)", "fontStyle-FormItemLabel": "var(--xmlui-fontStyle-FormItemLabel)", "textTransform-FormItemLabel": "var(--xmlui-textTransform-FormItemLabel)", "textColor-FormItemLabel-required": "var(--xmlui-textColor-FormItemLabel-required)", "fontSize-FormItemLabel-required": "var(--xmlui-fontSize-FormItemLabel-required)", "fontWeight-FormItemLabel-required": "var(--xmlui-fontWeight-FormItemLabel-required)", "fontStyle-FormItemLabel-required": "var(--xmlui-fontStyle-FormItemLabel-required)", "textTransform-FormItemLabel-required": "var(--xmlui-textTransform-FormItemLabel-required)", "textColor-FormItemLabel-requiredMark": "var(--xmlui-textColor-FormItemLabel-requiredMark)"}'`;
|
|
473
|
-
const container$3 = "
|
|
474
|
-
const top$1 = "
|
|
475
|
-
const end = "
|
|
476
|
-
const bottom$1 = "
|
|
477
|
-
const start = "
|
|
478
|
-
const shrinkToLabel = "
|
|
479
|
-
const inputLabel = "
|
|
480
|
-
const disabled$
|
|
481
|
-
const labelBreak = "
|
|
482
|
-
const required = "
|
|
483
|
-
const requiredMark = "
|
|
484
|
-
const itemWithLabel = "
|
|
470
|
+
const container$3 = "_container_1pi4w_14";
|
|
471
|
+
const top$1 = "_top_1pi4w_21";
|
|
472
|
+
const end = "_end_1pi4w_26";
|
|
473
|
+
const bottom$1 = "_bottom_1pi4w_32";
|
|
474
|
+
const start = "_start_1pi4w_37";
|
|
475
|
+
const shrinkToLabel = "_shrinkToLabel_1pi4w_43";
|
|
476
|
+
const inputLabel = "_inputLabel_1pi4w_46";
|
|
477
|
+
const disabled$c = "_disabled_1pi4w_59";
|
|
478
|
+
const labelBreak = "_labelBreak_1pi4w_63";
|
|
479
|
+
const required = "_required_1pi4w_68";
|
|
480
|
+
const requiredMark = "_requiredMark_1pi4w_75";
|
|
481
|
+
const itemWithLabel = "_itemWithLabel_1pi4w_79";
|
|
485
482
|
const styles$1j = {
|
|
486
483
|
themeVars: themeVars$10,
|
|
487
484
|
container: container$3,
|
|
@@ -491,7 +488,7 @@ const styles$1j = {
|
|
|
491
488
|
start,
|
|
492
489
|
shrinkToLabel,
|
|
493
490
|
inputLabel,
|
|
494
|
-
disabled: disabled$
|
|
491
|
+
disabled: disabled$c,
|
|
495
492
|
labelBreak,
|
|
496
493
|
required,
|
|
497
494
|
requiredMark,
|
|
@@ -896,10 +893,13 @@ const useEvent = (callback) => {
|
|
|
896
893
|
useInsertionEffect(() => {
|
|
897
894
|
callbackRef.current = callback;
|
|
898
895
|
}, [callback]);
|
|
899
|
-
return useCallback(
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
896
|
+
return useCallback(
|
|
897
|
+
(...args) => {
|
|
898
|
+
const latestFn = callbackRef.current;
|
|
899
|
+
return latestFn == null ? void 0 : latestFn(...args);
|
|
900
|
+
},
|
|
901
|
+
[callbackRef]
|
|
902
|
+
);
|
|
903
903
|
};
|
|
904
904
|
function humanFileSize(bytes, si = false, dp = 1) {
|
|
905
905
|
const thresh = si ? 1e3 : 1024;
|
|
@@ -1188,7 +1188,7 @@ function distinct(arr) {
|
|
|
1188
1188
|
function asyncThrottle(func, wait, options2) {
|
|
1189
1189
|
const throttled = throttle(
|
|
1190
1190
|
(resolve, reject, args) => {
|
|
1191
|
-
func(...args).then(resolve).catch(reject);
|
|
1191
|
+
void func(...args).then(resolve).catch(reject);
|
|
1192
1192
|
},
|
|
1193
1193
|
wait,
|
|
1194
1194
|
options2
|
|
@@ -1392,10 +1392,7 @@ const useRealBackground = (element) => {
|
|
|
1392
1392
|
useEffect(() => {
|
|
1393
1393
|
return setCounter((prev) => prev + 1);
|
|
1394
1394
|
}, [activeThemeTone, activeThemeId]);
|
|
1395
|
-
return useMemo(
|
|
1396
|
-
() => element ? realBackgroundColor(element) : "transparent",
|
|
1397
|
-
[element, counter]
|
|
1398
|
-
);
|
|
1395
|
+
return useMemo(() => element ? realBackgroundColor(element) : "transparent", [element]);
|
|
1399
1396
|
};
|
|
1400
1397
|
const useStartMargin = (hasOutsideScroll2, parentRef, scrollRef) => {
|
|
1401
1398
|
const [startMargin, setStartMargin] = useState(0);
|
|
@@ -1690,7 +1687,7 @@ function useCustomSvgIconRenderer(resourceUrl) {
|
|
|
1690
1687
|
if (!resourceUrl) {
|
|
1691
1688
|
return;
|
|
1692
1689
|
}
|
|
1693
|
-
ensureCustomSvgIcon(resourceUrl);
|
|
1690
|
+
void ensureCustomSvgIcon(resourceUrl);
|
|
1694
1691
|
}, [ensureCustomSvgIcon, resourceUrl]);
|
|
1695
1692
|
const customSvg = resourceUrl ? customSvgs[resourceUrl] : null;
|
|
1696
1693
|
const iconRenderer = useCallback(
|
|
@@ -1882,7 +1879,6 @@ class StyleLexer {
|
|
|
1882
1879
|
* Fetches the next token from the input stream
|
|
1883
1880
|
*/
|
|
1884
1881
|
fetch() {
|
|
1885
|
-
const lexer = this;
|
|
1886
1882
|
const input2 = this.input;
|
|
1887
1883
|
const startPos = this._prefetchedPos || input2.position;
|
|
1888
1884
|
this._lastFetchPosition = this.input.position;
|
|
@@ -1892,6 +1888,19 @@ class StyleLexer {
|
|
|
1892
1888
|
let ch = null;
|
|
1893
1889
|
let useResolver = false;
|
|
1894
1890
|
let stringWrapper = "";
|
|
1891
|
+
const appendTokenChar = () => {
|
|
1892
|
+
text2 += ch;
|
|
1893
|
+
this._prefetched = null;
|
|
1894
|
+
this._prefetchedPos = null;
|
|
1895
|
+
lastEndPos = input2.position;
|
|
1896
|
+
};
|
|
1897
|
+
const fetchNextChar = () => {
|
|
1898
|
+
if (!this._prefetched) {
|
|
1899
|
+
this._prefetchedPos = input2.position;
|
|
1900
|
+
this._prefetched = input2.get();
|
|
1901
|
+
}
|
|
1902
|
+
return this._prefetched;
|
|
1903
|
+
};
|
|
1895
1904
|
let phase = 0;
|
|
1896
1905
|
while (true) {
|
|
1897
1906
|
ch = fetchNextChar();
|
|
@@ -2008,19 +2017,6 @@ class StyleLexer {
|
|
|
2008
2017
|
}
|
|
2009
2018
|
appendTokenChar();
|
|
2010
2019
|
}
|
|
2011
|
-
function appendTokenChar() {
|
|
2012
|
-
text2 += ch;
|
|
2013
|
-
lexer._prefetched = null;
|
|
2014
|
-
lexer._prefetchedPos = null;
|
|
2015
|
-
lastEndPos = input2.position;
|
|
2016
|
-
}
|
|
2017
|
-
function fetchNextChar() {
|
|
2018
|
-
if (!lexer._prefetched) {
|
|
2019
|
-
lexer._prefetchedPos = input2.position;
|
|
2020
|
-
lexer._prefetched = input2.get();
|
|
2021
|
-
}
|
|
2022
|
-
return lexer._prefetched;
|
|
2023
|
-
}
|
|
2024
2020
|
function makeToken() {
|
|
2025
2021
|
if (useResolver) {
|
|
2026
2022
|
tokenType = styleKeywords[text2] ?? (isIdStart$1(text2[0]) ? StyleTokenType.Identifier : StyleTokenType.Unknown);
|
|
@@ -2471,7 +2467,78 @@ class StyleParser {
|
|
|
2471
2467
|
const startToken = this._lexer.peek();
|
|
2472
2468
|
const themeIdNode = this.tryThemeId();
|
|
2473
2469
|
if (themeIdNode) return themeIdNode;
|
|
2474
|
-
const
|
|
2470
|
+
const parseColorParameters = (pars) => {
|
|
2471
|
+
this._lexer.get();
|
|
2472
|
+
this.expectToken(StyleTokenType.LParent, "S007");
|
|
2473
|
+
for (let i = 0; i < pars.length; i++) {
|
|
2474
|
+
const value = this.getNumber();
|
|
2475
|
+
if (value === null) return false;
|
|
2476
|
+
const unit = this._lexer.peek(true);
|
|
2477
|
+
switch (pars[i]) {
|
|
2478
|
+
case "V%":
|
|
2479
|
+
if (unit.type === StyleTokenType.Percentage) {
|
|
2480
|
+
if (value < 0 || value > 100) {
|
|
2481
|
+
this.reportError("S008");
|
|
2482
|
+
return false;
|
|
2483
|
+
}
|
|
2484
|
+
this._lexer.get();
|
|
2485
|
+
} else {
|
|
2486
|
+
if (value < 0 || value > 255) {
|
|
2487
|
+
this.reportError("S009");
|
|
2488
|
+
return false;
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
break;
|
|
2492
|
+
case "%":
|
|
2493
|
+
if (unit.type !== StyleTokenType.Percentage || value < 0 || value > 100) {
|
|
2494
|
+
this.reportError("S008");
|
|
2495
|
+
return false;
|
|
2496
|
+
}
|
|
2497
|
+
this._lexer.get();
|
|
2498
|
+
break;
|
|
2499
|
+
case "angle":
|
|
2500
|
+
if (unit.type === StyleTokenType.Angle) {
|
|
2501
|
+
this._lexer.get();
|
|
2502
|
+
}
|
|
2503
|
+
break;
|
|
2504
|
+
case "alpha":
|
|
2505
|
+
if (unit.type === StyleTokenType.Percentage) {
|
|
2506
|
+
if (value < 0 || value > 100) {
|
|
2507
|
+
this.reportError("S008");
|
|
2508
|
+
return false;
|
|
2509
|
+
}
|
|
2510
|
+
this._lexer.get();
|
|
2511
|
+
} else {
|
|
2512
|
+
if (value < 0 || value > 1) {
|
|
2513
|
+
this.reportError("S011");
|
|
2514
|
+
return false;
|
|
2515
|
+
}
|
|
2516
|
+
}
|
|
2517
|
+
break;
|
|
2518
|
+
}
|
|
2519
|
+
if (i === pars.length - 1) continue;
|
|
2520
|
+
let sepToken = this._lexer.peek(true);
|
|
2521
|
+
if (sepToken.type === StyleTokenType.Ws) {
|
|
2522
|
+
this._lexer.get();
|
|
2523
|
+
sepToken = this._lexer.peek(true);
|
|
2524
|
+
if (sepToken.type === StyleTokenType.Comma) {
|
|
2525
|
+
this._lexer.get();
|
|
2526
|
+
}
|
|
2527
|
+
} else {
|
|
2528
|
+
this.expectToken(StyleTokenType.Comma);
|
|
2529
|
+
}
|
|
2530
|
+
sepToken = this._lexer.peek();
|
|
2531
|
+
if (sepToken.type === StyleTokenType.Ws) {
|
|
2532
|
+
this._lexer.get();
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
let aSepToken = this._lexer.peek();
|
|
2536
|
+
if (aSepToken.type === StyleTokenType.Ws) {
|
|
2537
|
+
this._lexer.get();
|
|
2538
|
+
}
|
|
2539
|
+
this.expectToken(StyleTokenType.RParent, "S010");
|
|
2540
|
+
return true;
|
|
2541
|
+
};
|
|
2475
2542
|
switch (startToken.type) {
|
|
2476
2543
|
case StyleTokenType.ColorName:
|
|
2477
2544
|
this._lexer.get();
|
|
@@ -2523,78 +2590,6 @@ class StyleParser {
|
|
|
2523
2590
|
this.reportError("S005", startToken);
|
|
2524
2591
|
return null;
|
|
2525
2592
|
}
|
|
2526
|
-
function parseColorParameters(pars) {
|
|
2527
|
-
parser._lexer.get();
|
|
2528
|
-
parser.expectToken(StyleTokenType.LParent, "S007");
|
|
2529
|
-
for (let i = 0; i < pars.length; i++) {
|
|
2530
|
-
const value = parser.getNumber();
|
|
2531
|
-
if (value === null) return false;
|
|
2532
|
-
const unit = parser._lexer.peek(true);
|
|
2533
|
-
switch (pars[i]) {
|
|
2534
|
-
case "V%":
|
|
2535
|
-
if (unit.type === StyleTokenType.Percentage) {
|
|
2536
|
-
if (value < 0 || value > 100) {
|
|
2537
|
-
parser.reportError("S008");
|
|
2538
|
-
return false;
|
|
2539
|
-
}
|
|
2540
|
-
parser._lexer.get();
|
|
2541
|
-
} else {
|
|
2542
|
-
if (value < 0 || value > 255) {
|
|
2543
|
-
parser.reportError("S009");
|
|
2544
|
-
return false;
|
|
2545
|
-
}
|
|
2546
|
-
}
|
|
2547
|
-
break;
|
|
2548
|
-
case "%":
|
|
2549
|
-
if (unit.type !== StyleTokenType.Percentage || value < 0 || value > 100) {
|
|
2550
|
-
parser.reportError("S008");
|
|
2551
|
-
return false;
|
|
2552
|
-
}
|
|
2553
|
-
parser._lexer.get();
|
|
2554
|
-
break;
|
|
2555
|
-
case "angle":
|
|
2556
|
-
if (unit.type === StyleTokenType.Angle) {
|
|
2557
|
-
parser._lexer.get();
|
|
2558
|
-
}
|
|
2559
|
-
break;
|
|
2560
|
-
case "alpha":
|
|
2561
|
-
if (unit.type === StyleTokenType.Percentage) {
|
|
2562
|
-
if (value < 0 || value > 100) {
|
|
2563
|
-
parser.reportError("S008");
|
|
2564
|
-
return false;
|
|
2565
|
-
}
|
|
2566
|
-
parser._lexer.get();
|
|
2567
|
-
} else {
|
|
2568
|
-
if (value < 0 || value > 1) {
|
|
2569
|
-
parser.reportError("S011");
|
|
2570
|
-
return false;
|
|
2571
|
-
}
|
|
2572
|
-
}
|
|
2573
|
-
break;
|
|
2574
|
-
}
|
|
2575
|
-
if (i === pars.length - 1) continue;
|
|
2576
|
-
let sepToken = parser._lexer.peek(true);
|
|
2577
|
-
if (sepToken.type === StyleTokenType.Ws) {
|
|
2578
|
-
parser._lexer.get();
|
|
2579
|
-
sepToken = parser._lexer.peek(true);
|
|
2580
|
-
if (sepToken.type === StyleTokenType.Comma) {
|
|
2581
|
-
parser._lexer.get();
|
|
2582
|
-
}
|
|
2583
|
-
} else {
|
|
2584
|
-
parser.expectToken(StyleTokenType.Comma);
|
|
2585
|
-
}
|
|
2586
|
-
sepToken = parser._lexer.peek();
|
|
2587
|
-
if (sepToken.type === StyleTokenType.Ws) {
|
|
2588
|
-
parser._lexer.get();
|
|
2589
|
-
}
|
|
2590
|
-
}
|
|
2591
|
-
let aSepToken = parser._lexer.peek();
|
|
2592
|
-
if (aSepToken.type === StyleTokenType.Ws) {
|
|
2593
|
-
parser._lexer.get();
|
|
2594
|
-
}
|
|
2595
|
-
parser.expectToken(StyleTokenType.RParent, "S010");
|
|
2596
|
-
return true;
|
|
2597
|
-
}
|
|
2598
2593
|
}
|
|
2599
2594
|
getNumber() {
|
|
2600
2595
|
const token = this._lexer.get();
|
|
@@ -3720,213 +3715,834 @@ function extractPaddings(extractValue, props) {
|
|
|
3720
3715
|
paddingBottom: paddingBottom || paddingVertical || padding
|
|
3721
3716
|
};
|
|
3722
3717
|
}
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
const
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
registerComponentApi({ hasOverflow });
|
|
3718
|
+
function hashString(str) {
|
|
3719
|
+
let hash = 5381;
|
|
3720
|
+
let i = str.length;
|
|
3721
|
+
while (i) {
|
|
3722
|
+
hash = hash * 33 ^ str.charCodeAt(--i);
|
|
3723
|
+
}
|
|
3724
|
+
let s = (hash >>> 0).toString(36);
|
|
3725
|
+
return s;
|
|
3726
|
+
}
|
|
3727
|
+
function toKebabCase(str) {
|
|
3728
|
+
if (str.startsWith("--")) {
|
|
3729
|
+
return str;
|
|
3730
|
+
}
|
|
3731
|
+
return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
3732
|
+
}
|
|
3733
|
+
function stableJSONStringify(obj) {
|
|
3734
|
+
return JSON.stringify(obj);
|
|
3735
|
+
}
|
|
3736
|
+
class StyleRegistry {
|
|
3737
|
+
constructor() {
|
|
3738
|
+
this.cache = /* @__PURE__ */ new Map();
|
|
3739
|
+
this.rootClasses = /* @__PURE__ */ new Set();
|
|
3740
|
+
this.injected = /* @__PURE__ */ new Set();
|
|
3741
|
+
this.refCounts = /* @__PURE__ */ new Map();
|
|
3742
|
+
this.ssrHashes = /* @__PURE__ */ new Set();
|
|
3743
|
+
}
|
|
3744
|
+
register(styles2) {
|
|
3745
|
+
const key = stableJSONStringify(styles2);
|
|
3746
|
+
const styleHash = hashString(key);
|
|
3747
|
+
const cachedEntry = this.cache.get(styleHash);
|
|
3748
|
+
if (cachedEntry) {
|
|
3749
|
+
return cachedEntry;
|
|
3756
3750
|
}
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
return
|
|
3762
|
-
}
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3751
|
+
const className = `css-${styleHash}`;
|
|
3752
|
+
const css = this._generateCss(`.${className}`, styles2);
|
|
3753
|
+
const entry = { className, styleHash, css };
|
|
3754
|
+
this.cache.set(styleHash, entry);
|
|
3755
|
+
return entry;
|
|
3756
|
+
}
|
|
3757
|
+
/**
|
|
3758
|
+
* [PRIVATE] Recursively generates CSS rules from a style object.
|
|
3759
|
+
* This is the new, more powerful engine.
|
|
3760
|
+
* @param selector - The CSS selector for the current context (e.g., '.css-123' or '&:hover').
|
|
3761
|
+
* @param styles - The style object to process.
|
|
3762
|
+
* @returns A string of CSS rules.
|
|
3763
|
+
*/
|
|
3764
|
+
_generateCss(selector, styles2) {
|
|
3765
|
+
const directProps = [];
|
|
3766
|
+
const nestedRules = [];
|
|
3767
|
+
for (const key in styles2) {
|
|
3768
|
+
const value = styles2[key];
|
|
3769
|
+
if (typeof value === "object" && value !== null) {
|
|
3770
|
+
nestedRules.push(this._processNestedRule(selector, key, value));
|
|
3771
|
+
} else {
|
|
3772
|
+
directProps.push(`${toKebabCase(key)}:${value};`);
|
|
3773
|
+
}
|
|
3769
3774
|
}
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
break;
|
|
3774
|
-
case "scroll":
|
|
3775
|
-
classes[styles$1d.overflowScroll] = true;
|
|
3776
|
-
break;
|
|
3777
|
-
case "ellipsis":
|
|
3778
|
-
classes[styles$1d.truncateOverflow] = true;
|
|
3779
|
-
classes[styles$1d.noEllipsis] = !ellipses;
|
|
3780
|
-
break;
|
|
3781
|
-
case "flow":
|
|
3782
|
-
classes[styles$1d.overflowFlow] = true;
|
|
3783
|
-
break;
|
|
3775
|
+
let finalCss = "";
|
|
3776
|
+
if (directProps.length > 0) {
|
|
3777
|
+
finalCss += `${selector} {${directProps.join("")}}`;
|
|
3784
3778
|
}
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
if (
|
|
3790
|
-
|
|
3791
|
-
case "normal":
|
|
3792
|
-
classes[styles$1d.breakNormal] = true;
|
|
3793
|
-
break;
|
|
3794
|
-
case "word":
|
|
3795
|
-
classes[styles$1d.breakWord] = true;
|
|
3796
|
-
break;
|
|
3797
|
-
case "anywhere":
|
|
3798
|
-
classes[styles$1d.breakAnywhere] = true;
|
|
3799
|
-
break;
|
|
3800
|
-
case "keep":
|
|
3801
|
-
classes[styles$1d.breakKeep] = true;
|
|
3802
|
-
break;
|
|
3803
|
-
case "hyphenate":
|
|
3804
|
-
classes[styles$1d.breakHyphenate] = true;
|
|
3805
|
-
break;
|
|
3806
|
-
}
|
|
3779
|
+
finalCss += nestedRules.join("");
|
|
3780
|
+
return finalCss;
|
|
3781
|
+
}
|
|
3782
|
+
_processNestedRule(parentSelector, nestedKey, nestedStyles) {
|
|
3783
|
+
if (nestedKey.startsWith("@")) {
|
|
3784
|
+
return `${nestedKey}{${this._generateCss(parentSelector, nestedStyles)}}`;
|
|
3807
3785
|
}
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3786
|
+
const newSelector = nestedKey.replace(/&/g, parentSelector);
|
|
3787
|
+
return this._generateCss(newSelector, nestedStyles);
|
|
3788
|
+
}
|
|
3789
|
+
getSsrStyles() {
|
|
3790
|
+
const allCss = Array.from(this.cache.values()).map((entry) => entry.css).join("");
|
|
3791
|
+
return `@layer dynamic {${allCss}}`;
|
|
3792
|
+
}
|
|
3793
|
+
/**
|
|
3794
|
+
* Adds a class name to be applied to the <html> tag.
|
|
3795
|
+
*/
|
|
3796
|
+
addRootClasses(classNames) {
|
|
3797
|
+
classNames.forEach((className) => {
|
|
3798
|
+
this.rootClasses.add(className);
|
|
3799
|
+
});
|
|
3800
|
+
}
|
|
3801
|
+
/**
|
|
3802
|
+
* Returns a space-separated string of all collected html classes.
|
|
3803
|
+
*/
|
|
3804
|
+
getRootClasses() {
|
|
3805
|
+
return Array.from(this.rootClasses).join(" ");
|
|
3806
|
+
}
|
|
3807
|
+
// NEW: A helper to safely get the current reference count.
|
|
3808
|
+
getRefCount(styleHash) {
|
|
3809
|
+
return this.refCounts.get(styleHash) || 0;
|
|
3810
|
+
}
|
|
3811
|
+
/**
|
|
3812
|
+
* Increments the reference count for a given style hash.
|
|
3813
|
+
*/
|
|
3814
|
+
incrementRef(styleHash) {
|
|
3815
|
+
const newCount = (this.refCounts.get(styleHash) || 0) + 1;
|
|
3816
|
+
this.refCounts.set(styleHash, newCount);
|
|
3817
|
+
}
|
|
3818
|
+
/**
|
|
3819
|
+
* Decrements the reference count for a given style hash.
|
|
3820
|
+
* @returns {number} The new reference count.
|
|
3821
|
+
*/
|
|
3822
|
+
decrementRef(styleHash) {
|
|
3823
|
+
const currentCount = this.refCounts.get(styleHash) || 0;
|
|
3824
|
+
const newCount = Math.max(0, currentCount - 1);
|
|
3825
|
+
if (newCount > 0) {
|
|
3826
|
+
this.refCounts.set(styleHash, newCount);
|
|
3827
|
+
} else {
|
|
3828
|
+
this.refCounts.delete(styleHash);
|
|
3833
3829
|
}
|
|
3834
|
-
|
|
3830
|
+
return newCount;
|
|
3831
|
+
}
|
|
3832
|
+
}
|
|
3833
|
+
const IndexerContext = React__default.createContext({
|
|
3834
|
+
indexing: false
|
|
3835
3835
|
});
|
|
3836
|
-
function
|
|
3837
|
-
return
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
]
|
|
3836
|
+
function useIndexerContext() {
|
|
3837
|
+
return useContext(IndexerContext);
|
|
3838
|
+
}
|
|
3839
|
+
const StyleContext = createContext(null);
|
|
3840
|
+
function StyleProvider({
|
|
3841
|
+
children,
|
|
3842
|
+
styleRegistry = new StyleRegistry(),
|
|
3843
|
+
forceNew = false
|
|
3844
|
+
// Optional prop to force a new registry
|
|
3845
|
+
}) {
|
|
3846
|
+
const parentRegistry = useContext(StyleContext);
|
|
3847
|
+
const [registry] = useState(() => {
|
|
3848
|
+
const newRegistry = styleRegistry;
|
|
3849
|
+
if (typeof window !== "undefined") {
|
|
3850
|
+
const ssrTag = document.querySelector('style[data-style-registry="true"]');
|
|
3851
|
+
const ssrHashes = ssrTag == null ? void 0 : ssrTag.getAttribute("data-ssr-hashes");
|
|
3852
|
+
if (ssrHashes) {
|
|
3853
|
+
let hashes = ssrHashes.split(",");
|
|
3854
|
+
newRegistry.ssrHashes = new Set(hashes);
|
|
3855
|
+
newRegistry.injected = new Set(hashes);
|
|
3856
|
+
}
|
|
3851
3857
|
}
|
|
3852
|
-
|
|
3858
|
+
return newRegistry;
|
|
3859
|
+
});
|
|
3860
|
+
if (parentRegistry && !forceNew) {
|
|
3861
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
3862
|
+
}
|
|
3863
|
+
return /* @__PURE__ */ jsx(StyleContext.Provider, { value: registry, children });
|
|
3853
3864
|
}
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
};
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
}, []);
|
|
3865
|
+
function useStyleRegistry() {
|
|
3866
|
+
const registry = useContext(StyleContext);
|
|
3867
|
+
if (registry === null) {
|
|
3868
|
+
throw new Error("Component must be used within a StyleProvider");
|
|
3869
|
+
}
|
|
3870
|
+
return registry;
|
|
3871
|
+
}
|
|
3872
|
+
function useComponentStyle(styles2) {
|
|
3873
|
+
const rootStyle = useMemo(() => {
|
|
3874
|
+
return !styles2 || Object.keys(styles2).length === 0 ? EMPTY_OBJECT : {
|
|
3875
|
+
"&": styles2
|
|
3876
|
+
// "@container style(--screenSize: 1) or @container style(--screenSize: 2) ... etc": responsiveSizes,
|
|
3877
|
+
};
|
|
3878
|
+
}, [styles2]);
|
|
3879
|
+
return useStyles(rootStyle);
|
|
3880
|
+
}
|
|
3881
|
+
const StyleInjectionTargetContext = createContext(null);
|
|
3882
|
+
function useDomRoot() {
|
|
3883
|
+
const domRoot = useContext(StyleInjectionTargetContext);
|
|
3884
|
+
return domRoot;
|
|
3885
|
+
}
|
|
3886
|
+
function useStyles(styles2, { prepend } = EMPTY_OBJECT) {
|
|
3887
|
+
const { indexing } = useIndexerContext();
|
|
3888
|
+
const domRoot = useDomRoot();
|
|
3889
|
+
const injectionTarget = typeof document === "undefined" ? null : domRoot instanceof ShadowRoot ? domRoot : document.head;
|
|
3890
|
+
const registry = useStyleRegistry();
|
|
3891
|
+
const { className, styleHash } = useMemo(() => {
|
|
3892
|
+
if (indexing || !styles2 || styles2 === EMPTY_OBJECT || Object.keys(styles2).length === 0) {
|
|
3893
|
+
return { className: void 0, styleHash: void 0 };
|
|
3894
|
+
}
|
|
3895
|
+
return registry.register(styles2);
|
|
3896
|
+
}, [indexing, registry, styles2]);
|
|
3897
|
+
useInsertionEffect(() => {
|
|
3898
|
+
if (!styleHash || registry.injected.has(styleHash)) {
|
|
3899
|
+
return;
|
|
3900
|
+
}
|
|
3901
|
+
const { css } = registry.cache.get(styleHash) || {};
|
|
3902
|
+
if (css) {
|
|
3903
|
+
const styleElement = document.createElement("style");
|
|
3904
|
+
styleElement.setAttribute("data-style-hash", styleHash);
|
|
3905
|
+
styleElement.innerHTML = `@layer dynamic {
|
|
3906
|
+
${css}
|
|
3907
|
+
}`;
|
|
3908
|
+
if (prepend) {
|
|
3909
|
+
injectionTarget.insertBefore(styleElement, injectionTarget.firstChild.nextSibling);
|
|
3910
|
+
} else {
|
|
3911
|
+
injectionTarget.appendChild(styleElement);
|
|
3912
|
+
}
|
|
3913
|
+
registry.injected.add(styleHash);
|
|
3914
|
+
}
|
|
3915
|
+
}, [registry, styleHash, injectionTarget]);
|
|
3905
3916
|
useEffect(() => {
|
|
3906
|
-
if (
|
|
3917
|
+
if (!styleHash) {
|
|
3918
|
+
return;
|
|
3919
|
+
}
|
|
3920
|
+
registry.incrementRef(styleHash);
|
|
3921
|
+
return () => {
|
|
3922
|
+
registry.decrementRef(styleHash);
|
|
3907
3923
|
setTimeout(() => {
|
|
3908
3924
|
var _a2;
|
|
3909
|
-
(
|
|
3925
|
+
if (registry.getRefCount(styleHash) === 0 && !registry.ssrHashes.has(styleHash)) {
|
|
3926
|
+
registry.injected.delete(styleHash);
|
|
3927
|
+
(_a2 = injectionTarget.querySelector(`style[data-style-hash="${styleHash}"]`)) == null ? void 0 : _a2.remove();
|
|
3928
|
+
}
|
|
3910
3929
|
}, 0);
|
|
3911
|
-
}
|
|
3912
|
-
}, [
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
},
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
+
};
|
|
3931
|
+
}, [injectionTarget, registry, styleHash]);
|
|
3932
|
+
return className;
|
|
3933
|
+
}
|
|
3934
|
+
const THEME_VAR_PREFIX = "xmlui";
|
|
3935
|
+
const themeVarCapturesRegex = /(\$[a-zA-Z][a-zA-Z0-9-_]*)/g;
|
|
3936
|
+
const booleanRegex = /^(true|false)$/;
|
|
3937
|
+
const starSizeRegex = /^\d*\*$/;
|
|
3938
|
+
const defaultCompResult = {
|
|
3939
|
+
cssProps: {},
|
|
3940
|
+
issues: /* @__PURE__ */ new Set()
|
|
3941
|
+
};
|
|
3942
|
+
function resolveLayoutProps(layoutProps = EMPTY_OBJECT, layoutContext) {
|
|
3943
|
+
const result = {
|
|
3944
|
+
cssProps: {},
|
|
3945
|
+
issues: /* @__PURE__ */ new Set()
|
|
3946
|
+
};
|
|
3947
|
+
if (!!getOrientation(layoutContext)) {
|
|
3948
|
+
result.cssProps.flexShrink = 0;
|
|
3949
|
+
}
|
|
3950
|
+
collectCss("width");
|
|
3951
|
+
const horizontalStarSize = getHorizontalStarSize(result.cssProps.width, layoutContext);
|
|
3952
|
+
if (horizontalStarSize !== null) {
|
|
3953
|
+
result.cssProps.flex = horizontalStarSize;
|
|
3954
|
+
result.cssProps.flexShrink = 1;
|
|
3955
|
+
}
|
|
3956
|
+
collectCss("minWidth");
|
|
3957
|
+
collectCss("maxWidth");
|
|
3958
|
+
collectCss("height");
|
|
3959
|
+
const verticalStarSize = getVerticalStarSize(result.cssProps.height, layoutContext);
|
|
3960
|
+
if (verticalStarSize !== null) {
|
|
3961
|
+
result.cssProps.flex = verticalStarSize;
|
|
3962
|
+
result.cssProps.flexShrink = 1;
|
|
3963
|
+
}
|
|
3964
|
+
collectCss("minHeight");
|
|
3965
|
+
collectCss("maxHeight");
|
|
3966
|
+
collectCss("top");
|
|
3967
|
+
collectCss("right");
|
|
3968
|
+
collectCss("bottom");
|
|
3969
|
+
collectCss("left");
|
|
3970
|
+
collectCss("gap");
|
|
3971
|
+
collectCss("padding");
|
|
3972
|
+
const paddingHorizontal = transformLayoutValue("paddingHorizontal");
|
|
3973
|
+
if (paddingHorizontal) {
|
|
3974
|
+
result.cssProps.paddingLeft = paddingHorizontal;
|
|
3975
|
+
result.cssProps.paddingRight = paddingHorizontal;
|
|
3976
|
+
}
|
|
3977
|
+
collectCss("paddingRight");
|
|
3978
|
+
collectCss("paddingLeft");
|
|
3979
|
+
const paddingVertical = transformLayoutValue("paddingVertical");
|
|
3980
|
+
if (paddingVertical) {
|
|
3981
|
+
result.cssProps.paddingTop = paddingVertical;
|
|
3982
|
+
result.cssProps.paddingBottom = paddingVertical;
|
|
3983
|
+
}
|
|
3984
|
+
collectCss("paddingTop");
|
|
3985
|
+
collectCss("paddingBottom");
|
|
3986
|
+
collectCss("margin");
|
|
3987
|
+
const marginHorizontal = transformLayoutValue("marginHorizontal");
|
|
3988
|
+
if (marginHorizontal) {
|
|
3989
|
+
result.cssProps.marginLeft = marginHorizontal;
|
|
3990
|
+
result.cssProps.marginRight = marginHorizontal;
|
|
3991
|
+
}
|
|
3992
|
+
collectCss("marginRight");
|
|
3993
|
+
collectCss("marginLeft");
|
|
3994
|
+
const marginVertical = transformLayoutValue("marginVertical");
|
|
3995
|
+
if (marginVertical) {
|
|
3996
|
+
result.cssProps.marginTop = marginVertical;
|
|
3997
|
+
result.cssProps.marginBottom = marginVertical;
|
|
3998
|
+
}
|
|
3999
|
+
collectCss("marginTop");
|
|
4000
|
+
collectCss("marginBottom");
|
|
4001
|
+
collectCss("border");
|
|
4002
|
+
const horizontalBorder = transformLayoutValue("borderHorizontal");
|
|
4003
|
+
if (horizontalBorder) {
|
|
4004
|
+
result.cssProps.borderLeft = horizontalBorder;
|
|
4005
|
+
result.cssProps.borderRight = horizontalBorder;
|
|
4006
|
+
}
|
|
4007
|
+
collectCss("borderRight");
|
|
4008
|
+
collectCss("borderLeft");
|
|
4009
|
+
const verticalBorder = transformLayoutValue("borderVertical");
|
|
4010
|
+
if (verticalBorder) {
|
|
4011
|
+
result.cssProps.borderTop = verticalBorder;
|
|
4012
|
+
result.cssProps.borderBottom = verticalBorder;
|
|
4013
|
+
}
|
|
4014
|
+
collectCss("borderTop");
|
|
4015
|
+
collectCss("borderBottom");
|
|
4016
|
+
collectCss("borderColor");
|
|
4017
|
+
collectCss("borderStyle");
|
|
4018
|
+
collectCss("borderWidth");
|
|
4019
|
+
collectCss("borderRadius");
|
|
4020
|
+
collectCss("radiusTopLeft", "borderTopLeftRadius");
|
|
4021
|
+
collectCss("radiusTopRight", "borderTopRightRadius");
|
|
4022
|
+
collectCss("radiusBottomLeft", "borderBottomLeftRadius");
|
|
4023
|
+
collectCss("radiusBottomRight", "borderBottomRightRadius");
|
|
4024
|
+
collectCss("color");
|
|
4025
|
+
collectCss("fontFamily");
|
|
4026
|
+
collectCss("fontSize");
|
|
4027
|
+
collectCss("fontWeight");
|
|
4028
|
+
collectCss("fontStyle");
|
|
4029
|
+
collectCss("fontVariant");
|
|
4030
|
+
collectCss("lineBreak");
|
|
4031
|
+
collectCss("textDecoration");
|
|
4032
|
+
collectCss("textDecorationLine");
|
|
4033
|
+
collectCss("textDecorationColor");
|
|
4034
|
+
collectCss("textDecorationStyle");
|
|
4035
|
+
collectCss("textDecorationThickness");
|
|
4036
|
+
collectCss("textIndent");
|
|
4037
|
+
collectCss("textShadow");
|
|
4038
|
+
collectCss("textUnderlineOffset");
|
|
4039
|
+
collectCss("userSelect");
|
|
4040
|
+
collectCss("letterSpacing");
|
|
4041
|
+
collectCss("textTransform");
|
|
4042
|
+
collectCss("lineHeight");
|
|
4043
|
+
collectCss("textAlign");
|
|
4044
|
+
collectCss("textAlignLast");
|
|
4045
|
+
collectCss("textWrap");
|
|
4046
|
+
collectCss("wordBreak");
|
|
4047
|
+
collectCss("wordSpacing");
|
|
4048
|
+
collectCss("wordWrap");
|
|
4049
|
+
collectCss("writingMode");
|
|
4050
|
+
collectCss("backgroundColor");
|
|
4051
|
+
collectCss("background");
|
|
4052
|
+
collectCss("boxShadow");
|
|
4053
|
+
collectCss("direction");
|
|
4054
|
+
collectCss("overflowX");
|
|
4055
|
+
collectCss("overflowY");
|
|
4056
|
+
collectCss("zIndex");
|
|
4057
|
+
collectCss("opacity");
|
|
4058
|
+
collectCss("zoom");
|
|
4059
|
+
collectCss("cursor");
|
|
4060
|
+
collectCss("whiteSpace");
|
|
4061
|
+
collectCss("transform");
|
|
4062
|
+
collectCss("outline");
|
|
4063
|
+
collectCss("outlineWidth");
|
|
4064
|
+
collectCss("outlineColor");
|
|
4065
|
+
collectCss("outlineStyle");
|
|
4066
|
+
collectCss("outlineOffset");
|
|
4067
|
+
const wrapContent = transformLayoutValue("wrapContent");
|
|
4068
|
+
if (wrapContent) {
|
|
4069
|
+
result.cssProps.flexWrap = wrapContent === "true" ? "wrap" : "nowrap";
|
|
4070
|
+
}
|
|
4071
|
+
collectCss("canShrink", "flexShrink");
|
|
4072
|
+
const canShrink = transformLayoutValue("canShrink");
|
|
4073
|
+
if (canShrink) {
|
|
4074
|
+
result.cssProps.flexShrink = canShrink === "true" ? 1 : 0;
|
|
4075
|
+
}
|
|
4076
|
+
if (isEmpty(result.cssProps) && isEmpty(result.issues)) {
|
|
4077
|
+
return defaultCompResult;
|
|
4078
|
+
}
|
|
4079
|
+
return result;
|
|
4080
|
+
function transformLayoutValue(prop) {
|
|
4081
|
+
var _a2, _b;
|
|
4082
|
+
const defValue = resolveSingleValue();
|
|
4083
|
+
if (((_a2 = layoutContext == null ? void 0 : layoutContext.mediaSize) == null ? void 0 : _a2.sizeIndex) !== void 0) {
|
|
4084
|
+
const sizeIndex = (_b = layoutContext.mediaSize) == null ? void 0 : _b.sizeIndex;
|
|
4085
|
+
const xsValue = resolveSingleValue("xs");
|
|
4086
|
+
const smValue = resolveSingleValue("sm");
|
|
4087
|
+
const mdValue = resolveSingleValue("md");
|
|
4088
|
+
const lgValue = resolveSingleValue("lg");
|
|
4089
|
+
const xlValue = resolveSingleValue("xl");
|
|
4090
|
+
const xxlValue = resolveSingleValue("xxl");
|
|
4091
|
+
let mergedValue;
|
|
4092
|
+
switch (sizeIndex) {
|
|
4093
|
+
case 0:
|
|
4094
|
+
mergedValue = xsValue ?? smValue ?? mdValue;
|
|
4095
|
+
break;
|
|
4096
|
+
case 1:
|
|
4097
|
+
mergedValue = smValue ?? mdValue;
|
|
4098
|
+
break;
|
|
4099
|
+
case 2:
|
|
4100
|
+
mergedValue = mdValue;
|
|
4101
|
+
break;
|
|
4102
|
+
case 3:
|
|
4103
|
+
mergedValue = lgValue;
|
|
4104
|
+
break;
|
|
4105
|
+
case 4:
|
|
4106
|
+
mergedValue = xlValue ?? lgValue;
|
|
4107
|
+
break;
|
|
4108
|
+
case 5:
|
|
4109
|
+
mergedValue = xxlValue ?? xlValue ?? lgValue;
|
|
4110
|
+
break;
|
|
4111
|
+
}
|
|
4112
|
+
return mergedValue ?? defValue;
|
|
4113
|
+
}
|
|
4114
|
+
return defValue;
|
|
4115
|
+
function resolveSingleValue(sizeTag = "") {
|
|
4116
|
+
const fullProp = sizeTag ? `${prop}-${sizeTag}` : prop;
|
|
4117
|
+
let singleInput = layoutProps[fullProp];
|
|
4118
|
+
if (singleInput == void 0) {
|
|
4119
|
+
return;
|
|
4120
|
+
}
|
|
4121
|
+
if (typeof singleInput === "string") {
|
|
4122
|
+
singleInput = singleInput.trim();
|
|
4123
|
+
} else {
|
|
4124
|
+
singleInput = singleInput.toString();
|
|
4125
|
+
}
|
|
4126
|
+
const value = singleInput ? singleInput.replace(
|
|
4127
|
+
themeVarCapturesRegex,
|
|
4128
|
+
(match) => toCssVar(match.trim())
|
|
4129
|
+
) : void 0;
|
|
4130
|
+
if (singleInput !== value) {
|
|
4131
|
+
return value;
|
|
4132
|
+
}
|
|
4133
|
+
const propPatterns = layoutPatterns[prop];
|
|
4134
|
+
if (!propPatterns || propPatterns.length === 0) {
|
|
4135
|
+
return value;
|
|
4136
|
+
}
|
|
4137
|
+
for (const pattern of propPatterns) {
|
|
4138
|
+
if (pattern.test(value)) {
|
|
4139
|
+
return value;
|
|
4140
|
+
}
|
|
4141
|
+
}
|
|
4142
|
+
result.issues.add(fullProp);
|
|
4143
|
+
return value;
|
|
4144
|
+
}
|
|
4145
|
+
}
|
|
4146
|
+
function collectCss(prop, propCssName = "") {
|
|
4147
|
+
const value = transformLayoutValue(prop);
|
|
4148
|
+
if (value) {
|
|
4149
|
+
result.cssProps[propCssName || prop] = value;
|
|
4150
|
+
}
|
|
4151
|
+
}
|
|
4152
|
+
function getHorizontalStarSize(size, layoutContext2) {
|
|
4153
|
+
if (!size) return null;
|
|
4154
|
+
const orientation = getOrientation(layoutContext2);
|
|
4155
|
+
return orientation === "horizontal" && starSizeRegex.test(size.toString()) ? getStarSizeNumber(size.toString()) : null;
|
|
4156
|
+
}
|
|
4157
|
+
function getVerticalStarSize(size, layoutContext2) {
|
|
4158
|
+
if (!size) return null;
|
|
4159
|
+
const orientation = getOrientation(layoutContext2);
|
|
4160
|
+
return orientation === "vertical" && starSizeRegex.test(size.toString()) ? getStarSizeNumber(size.toString()) : null;
|
|
4161
|
+
}
|
|
4162
|
+
function getStarSizeNumber(input2) {
|
|
4163
|
+
if (starSizeRegex.test(input2)) {
|
|
4164
|
+
const numberPart = input2.slice(0, -1);
|
|
4165
|
+
return numberPart === "" ? 1 : parseInt(numberPart, 10);
|
|
4166
|
+
}
|
|
4167
|
+
return null;
|
|
4168
|
+
}
|
|
4169
|
+
function getOrientation(layoutContext2) {
|
|
4170
|
+
if (!layoutContext2) return;
|
|
4171
|
+
let orientation = (layoutContext2 == null ? void 0 : layoutContext2.type) === "Stack" && (layoutContext2 == null ? void 0 : layoutContext2.orientation);
|
|
4172
|
+
return orientation == null ? void 0 : orientation.toString();
|
|
4173
|
+
}
|
|
4174
|
+
}
|
|
4175
|
+
function toCssVar(c) {
|
|
4176
|
+
return `var(--${THEME_VAR_PREFIX}-${c.substring(1)})`;
|
|
4177
|
+
}
|
|
4178
|
+
const layoutPatterns = {
|
|
4179
|
+
// --- Dimensions
|
|
4180
|
+
width: [],
|
|
4181
|
+
minWidth: [],
|
|
4182
|
+
maxWidth: [],
|
|
4183
|
+
height: [],
|
|
4184
|
+
minHeight: [],
|
|
4185
|
+
maxHeight: [],
|
|
4186
|
+
gap: [],
|
|
4187
|
+
// --- Positions
|
|
4188
|
+
top: [],
|
|
4189
|
+
right: [],
|
|
4190
|
+
bottom: [],
|
|
4191
|
+
left: [],
|
|
4192
|
+
// --- Border
|
|
4193
|
+
border: [],
|
|
4194
|
+
borderTop: [],
|
|
4195
|
+
borderRight: [],
|
|
4196
|
+
borderBottom: [],
|
|
4197
|
+
borderLeft: [],
|
|
4198
|
+
borderColor: [],
|
|
4199
|
+
borderStyle: [],
|
|
4200
|
+
borderWidth: [],
|
|
4201
|
+
borderHorizontal: [],
|
|
4202
|
+
borderVertical: [],
|
|
4203
|
+
// --- Border radius
|
|
4204
|
+
borderRadius: [],
|
|
4205
|
+
radiusTopLeft: [],
|
|
4206
|
+
radiusTopRight: [],
|
|
4207
|
+
radiusBottomLeft: [],
|
|
4208
|
+
radiusBottomRight: [],
|
|
4209
|
+
// --- Padding
|
|
4210
|
+
padding: [],
|
|
4211
|
+
paddingHorizontal: [],
|
|
4212
|
+
paddingVertical: [],
|
|
4213
|
+
paddingTop: [],
|
|
4214
|
+
paddingRight: [],
|
|
4215
|
+
paddingBottom: [],
|
|
4216
|
+
paddingLeft: [],
|
|
4217
|
+
// --- Margin
|
|
4218
|
+
margin: [],
|
|
4219
|
+
marginHorizontal: [],
|
|
4220
|
+
marginVertical: [],
|
|
4221
|
+
marginTop: [],
|
|
4222
|
+
marginRight: [],
|
|
4223
|
+
marginBottom: [],
|
|
4224
|
+
marginLeft: [],
|
|
4225
|
+
// --- Other
|
|
4226
|
+
backgroundColor: [],
|
|
4227
|
+
background: [],
|
|
4228
|
+
boxShadow: [],
|
|
4229
|
+
direction: [],
|
|
4230
|
+
overflowX: [],
|
|
4231
|
+
overflowY: [],
|
|
4232
|
+
zIndex: [],
|
|
4233
|
+
opacity: [],
|
|
4234
|
+
// --- Typography
|
|
4235
|
+
color: [],
|
|
4236
|
+
fontFamily: [],
|
|
4237
|
+
fontSize: [],
|
|
4238
|
+
fontWeight: [],
|
|
4239
|
+
fontStyle: [booleanRegex],
|
|
4240
|
+
fontVariant: [],
|
|
4241
|
+
lineBreak: [],
|
|
4242
|
+
textDecoration: [],
|
|
4243
|
+
userSelect: [],
|
|
4244
|
+
letterSpacing: [],
|
|
4245
|
+
textTransform: [],
|
|
4246
|
+
lineHeight: [],
|
|
4247
|
+
textAlign: [],
|
|
4248
|
+
textWrap: [],
|
|
4249
|
+
textAlignLast: [],
|
|
4250
|
+
textIndent: [],
|
|
4251
|
+
textShadow: [],
|
|
4252
|
+
wordBreak: [],
|
|
4253
|
+
wordSpacing: [],
|
|
4254
|
+
wordWrap: [],
|
|
4255
|
+
writingMode: [],
|
|
4256
|
+
// --- Content rendering
|
|
4257
|
+
wrapContent: [],
|
|
4258
|
+
canShrink: [],
|
|
4259
|
+
// --- Other
|
|
4260
|
+
cursor: [],
|
|
4261
|
+
zoom: [],
|
|
4262
|
+
whiteSpace: [],
|
|
4263
|
+
textDecorationLine: [],
|
|
4264
|
+
textDecorationColor: [],
|
|
4265
|
+
textDecorationStyle: [],
|
|
4266
|
+
textDecorationThickness: [],
|
|
4267
|
+
textUnderlineOffset: [],
|
|
4268
|
+
transform: [],
|
|
4269
|
+
// --- Outline
|
|
4270
|
+
outline: [],
|
|
4271
|
+
outlineWidth: [],
|
|
4272
|
+
outlineColor: [],
|
|
4273
|
+
outlineStyle: [],
|
|
4274
|
+
outlineOffset: [],
|
|
4275
|
+
// --- Animation
|
|
4276
|
+
transition: []
|
|
4277
|
+
};
|
|
4278
|
+
const customVariantCache = /* @__PURE__ */ new Map();
|
|
4279
|
+
function setCustomVariantCache(variant, entry) {
|
|
4280
|
+
customVariantCache.set(variant, {
|
|
4281
|
+
...entry,
|
|
4282
|
+
createdAt: Date.now()
|
|
4283
|
+
});
|
|
4284
|
+
}
|
|
4285
|
+
function hasCustomVariantCache(variant) {
|
|
4286
|
+
return customVariantCache.has(variant);
|
|
4287
|
+
}
|
|
4288
|
+
const defaultProps$1d = {
|
|
4289
|
+
maxLines: 0,
|
|
4290
|
+
preserveLinebreaks: false,
|
|
4291
|
+
ellipses: true,
|
|
4292
|
+
overflowMode: void 0,
|
|
4293
|
+
breakMode: "normal"
|
|
4294
|
+
};
|
|
4295
|
+
const Text = forwardRef(function Text2({
|
|
4296
|
+
uid,
|
|
4297
|
+
variant,
|
|
4298
|
+
maxLines = defaultProps$1d.maxLines,
|
|
4299
|
+
style: style2,
|
|
4300
|
+
className,
|
|
4301
|
+
children,
|
|
4302
|
+
preserveLinebreaks: preserveLinebreaks2 = defaultProps$1d.preserveLinebreaks,
|
|
4303
|
+
ellipses = defaultProps$1d.ellipses,
|
|
4304
|
+
overflowMode = defaultProps$1d.overflowMode,
|
|
4305
|
+
breakMode = defaultProps$1d.breakMode,
|
|
4306
|
+
registerComponentApi,
|
|
4307
|
+
...variantSpecificProps
|
|
4308
|
+
}, forwardedRef) {
|
|
4309
|
+
const innerRef = useRef(null);
|
|
4310
|
+
const ref = forwardedRef ? composeRefs(innerRef, forwardedRef) : innerRef;
|
|
4311
|
+
const hasOverflow = useCallback(() => {
|
|
4312
|
+
const element = innerRef.current;
|
|
4313
|
+
if (!element) return false;
|
|
4314
|
+
const hasHorizontalOverflow = element.scrollWidth > element.clientWidth;
|
|
4315
|
+
const hasVerticalOverflow = element.scrollHeight > element.clientHeight;
|
|
4316
|
+
return hasHorizontalOverflow || hasVerticalOverflow;
|
|
4317
|
+
}, []);
|
|
4318
|
+
useEffect(() => {
|
|
4319
|
+
if (registerComponentApi) {
|
|
4320
|
+
registerComponentApi({ hasOverflow });
|
|
4321
|
+
}
|
|
4322
|
+
}, [registerComponentApi, hasOverflow]);
|
|
4323
|
+
const { syntaxHighlightClasses, ...restVariantSpecificProps } = variantSpecificProps;
|
|
4324
|
+
const Element2 = useMemo(() => {
|
|
4325
|
+
if (!variant || !TextVariantElement[variant]) return "div";
|
|
4326
|
+
return TextVariantElement[variant];
|
|
4327
|
+
}, [variant]);
|
|
4328
|
+
const isCustomVariant = useMemo(() => {
|
|
4329
|
+
return variant && !TextVariantElement[variant];
|
|
4330
|
+
}, [variant]);
|
|
4331
|
+
const variantSpec = useMemo(
|
|
4332
|
+
() => {
|
|
4333
|
+
if (!isCustomVariant) return EMPTY_OBJECT;
|
|
4334
|
+
const subject = `-Text-${variant}`;
|
|
4335
|
+
const cssInput = {
|
|
4336
|
+
color: toCssVar(`$textColor${subject}`),
|
|
4337
|
+
"font-family": toCssVar(`$fontFamily${subject}`),
|
|
4338
|
+
"font-size": toCssVar(`$fontSize${subject}`),
|
|
4339
|
+
"font-style": toCssVar(`$fontStyle${subject}`),
|
|
4340
|
+
"font-weight": toCssVar(`$fontWeight${subject}`),
|
|
4341
|
+
"font-stretch": toCssVar(`$fontStretch${subject}`),
|
|
4342
|
+
"text-decoration-line": toCssVar(`$textDecorationLine${subject}`),
|
|
4343
|
+
"text-decoration-color": toCssVar(`$textDecorationColor${subject}`),
|
|
4344
|
+
"text-decoration-style": toCssVar(`$textDecorationStyle${subject}`),
|
|
4345
|
+
"text-decoration-thickness": toCssVar(`$textDecorationThickness${subject}`),
|
|
4346
|
+
"text-underline-offset": toCssVar(`$textUnderlineOffset${subject}`),
|
|
4347
|
+
"line-height": toCssVar(`$lineHeight${subject}`),
|
|
4348
|
+
"background-color": toCssVar(`$backgroundColor${subject}`),
|
|
4349
|
+
"text-transform": toCssVar(`$textTransform${subject}`),
|
|
4350
|
+
"letter-spacing": toCssVar(`$letterSpacing${subject}`),
|
|
4351
|
+
"word-spacing": toCssVar(`$wordSpacing${subject}`),
|
|
4352
|
+
"text-shadow": toCssVar(`$textShadow${subject}`),
|
|
4353
|
+
"text-indent": toCssVar(`$textIndent${subject}`),
|
|
4354
|
+
"text-align": toCssVar(`$textAlign${subject}`),
|
|
4355
|
+
"text-align-last": toCssVar(`$textAlignLast${subject}`),
|
|
4356
|
+
"word-break": toCssVar(`$wordBreak${subject}`),
|
|
4357
|
+
"word-wrap": toCssVar(`$wordWrap${subject}`),
|
|
4358
|
+
direction: toCssVar(`$direction${subject}`),
|
|
4359
|
+
"writing-mode": toCssVar(`$writingMode${subject}`),
|
|
4360
|
+
"line-break": toCssVar(`$lineBreak${subject}`)
|
|
4361
|
+
};
|
|
4362
|
+
return cssInput;
|
|
4363
|
+
},
|
|
4364
|
+
[isCustomVariant, variant]
|
|
4365
|
+
);
|
|
4366
|
+
const customVariantClassName = useComponentStyle(variantSpec);
|
|
4367
|
+
useEffect(() => {
|
|
4368
|
+
if (isCustomVariant && variant && customVariantClassName) {
|
|
4369
|
+
if (!hasCustomVariantCache(variant)) {
|
|
4370
|
+
setCustomVariantCache(variant, {
|
|
4371
|
+
className: customVariantClassName,
|
|
4372
|
+
cssText: ""
|
|
4373
|
+
// Will be populated when CSS generation is implemented
|
|
4374
|
+
});
|
|
4375
|
+
}
|
|
4376
|
+
}
|
|
4377
|
+
}, [isCustomVariant, variant, customVariantClassName]);
|
|
4378
|
+
const overflowClasses = useMemo(() => {
|
|
4379
|
+
const classes = {};
|
|
4380
|
+
if (!overflowMode) {
|
|
4381
|
+
classes[styles$1d.truncateOverflow] = maxLines > 0;
|
|
4382
|
+
classes[styles$1d.noEllipsis] = !ellipses;
|
|
4383
|
+
return classes;
|
|
4384
|
+
}
|
|
4385
|
+
switch (overflowMode) {
|
|
4386
|
+
case "none":
|
|
4387
|
+
classes[styles$1d.overflowNone] = true;
|
|
4388
|
+
break;
|
|
4389
|
+
case "scroll":
|
|
4390
|
+
classes[styles$1d.overflowScroll] = true;
|
|
4391
|
+
break;
|
|
4392
|
+
case "ellipsis":
|
|
4393
|
+
classes[styles$1d.truncateOverflow] = true;
|
|
4394
|
+
classes[styles$1d.noEllipsis] = !ellipses;
|
|
4395
|
+
break;
|
|
4396
|
+
case "flow":
|
|
4397
|
+
classes[styles$1d.overflowFlow] = true;
|
|
4398
|
+
break;
|
|
4399
|
+
}
|
|
4400
|
+
return classes;
|
|
4401
|
+
}, [overflowMode, maxLines, ellipses]);
|
|
4402
|
+
const breakClasses = useMemo(() => {
|
|
4403
|
+
const classes = {};
|
|
4404
|
+
if (breakMode) {
|
|
4405
|
+
switch (breakMode) {
|
|
4406
|
+
case "normal":
|
|
4407
|
+
classes[styles$1d.breakNormal] = true;
|
|
4408
|
+
break;
|
|
4409
|
+
case "word":
|
|
4410
|
+
classes[styles$1d.breakWord] = true;
|
|
4411
|
+
break;
|
|
4412
|
+
case "anywhere":
|
|
4413
|
+
classes[styles$1d.breakAnywhere] = true;
|
|
4414
|
+
break;
|
|
4415
|
+
case "keep":
|
|
4416
|
+
classes[styles$1d.breakKeep] = true;
|
|
4417
|
+
break;
|
|
4418
|
+
case "hyphenate":
|
|
4419
|
+
classes[styles$1d.breakHyphenate] = true;
|
|
4420
|
+
break;
|
|
4421
|
+
}
|
|
4422
|
+
}
|
|
4423
|
+
return classes;
|
|
4424
|
+
}, [breakMode]);
|
|
4425
|
+
return /* @__PURE__ */ jsx(
|
|
4426
|
+
Element2,
|
|
4427
|
+
{
|
|
4428
|
+
...restVariantSpecificProps,
|
|
4429
|
+
ref,
|
|
4430
|
+
className: classnames(
|
|
4431
|
+
syntaxHighlightClasses,
|
|
4432
|
+
styles$1d.text,
|
|
4433
|
+
// Use custom variant className if it's a custom variant, otherwise use predefined variant style
|
|
4434
|
+
isCustomVariant ? customVariantClassName : styles$1d[variant || "default"],
|
|
4435
|
+
{
|
|
4436
|
+
[styles$1d.preserveLinebreaks]: preserveLinebreaks2,
|
|
4437
|
+
...overflowClasses,
|
|
4438
|
+
...breakClasses
|
|
4439
|
+
},
|
|
4440
|
+
className
|
|
4441
|
+
),
|
|
4442
|
+
style: {
|
|
4443
|
+
...style2,
|
|
4444
|
+
// Apply maxLines style for "ellipsis" mode and default behavior
|
|
4445
|
+
// "none", "scroll", and "flow" modes ignore maxLines for predictable, reliable behavior
|
|
4446
|
+
...overflowMode === "ellipsis" || !overflowMode && maxLines ? getMaxLinesStyle(maxLines) : {}
|
|
4447
|
+
},
|
|
4448
|
+
children
|
|
4449
|
+
}
|
|
4450
|
+
);
|
|
4451
|
+
});
|
|
4452
|
+
function Adornment({ iconName, text: text2, className, onClick, ...rest }) {
|
|
4453
|
+
return /* @__PURE__ */ jsx(Fragment, { children: iconName || text2 ? /* @__PURE__ */ jsxs(
|
|
4454
|
+
"div",
|
|
4455
|
+
{
|
|
4456
|
+
...rest,
|
|
4457
|
+
className: classnames(styles$1e.wrapper, className, {
|
|
4458
|
+
[styles$1e.clickable]: !!onClick
|
|
4459
|
+
}),
|
|
4460
|
+
role: onClick ? "button" : "presentation",
|
|
4461
|
+
onClick,
|
|
4462
|
+
tabIndex: onClick ? 0 : void 0,
|
|
4463
|
+
children: [
|
|
4464
|
+
/* @__PURE__ */ jsx(Icon$l, { name: iconName, style: { color: "inherit" } }),
|
|
4465
|
+
text2 && /* @__PURE__ */ jsx("div", { style: { display: "flex", userSelect: "none" }, children: /* @__PURE__ */ jsx(Text, { style: { fontSize: "inherit" }, children: text2 }) })
|
|
4466
|
+
]
|
|
4467
|
+
}
|
|
4468
|
+
) : null });
|
|
4469
|
+
}
|
|
4470
|
+
const defaultProps$1c = {
|
|
4471
|
+
type: "text",
|
|
4472
|
+
value: "",
|
|
4473
|
+
initialValue: "",
|
|
4474
|
+
enabled: true,
|
|
4475
|
+
validationStatus: "none",
|
|
4476
|
+
onDidChange: noop$1,
|
|
4477
|
+
onFocus: noop$1,
|
|
4478
|
+
onBlur: noop$1,
|
|
4479
|
+
onKeyDown: noop$1,
|
|
4480
|
+
updateState: noop$1,
|
|
4481
|
+
passwordVisibleIcon: "eye",
|
|
4482
|
+
passwordHiddenIcon: "eye-off"
|
|
4483
|
+
};
|
|
4484
|
+
const TextBox = forwardRef(function TextBox2({
|
|
4485
|
+
id,
|
|
4486
|
+
type = defaultProps$1c.type,
|
|
4487
|
+
value = defaultProps$1c.value,
|
|
4488
|
+
updateState = defaultProps$1c.updateState,
|
|
4489
|
+
initialValue = defaultProps$1c.initialValue,
|
|
4490
|
+
style: style2,
|
|
4491
|
+
className,
|
|
4492
|
+
maxLength,
|
|
4493
|
+
enabled: enabled2 = defaultProps$1c.enabled,
|
|
4494
|
+
placeholder: placeholder2,
|
|
4495
|
+
validationStatus = defaultProps$1c.validationStatus,
|
|
4496
|
+
onDidChange = defaultProps$1c.onDidChange,
|
|
4497
|
+
onFocus = defaultProps$1c.onFocus,
|
|
4498
|
+
onBlur = defaultProps$1c.onBlur,
|
|
4499
|
+
onKeyDown = defaultProps$1c.onKeyDown,
|
|
4500
|
+
registerComponentApi,
|
|
4501
|
+
startText,
|
|
4502
|
+
startIcon,
|
|
4503
|
+
endText,
|
|
4504
|
+
endIcon,
|
|
4505
|
+
gap,
|
|
4506
|
+
autoFocus,
|
|
4507
|
+
readOnly: readOnly2,
|
|
4508
|
+
tabIndex,
|
|
4509
|
+
required: required2,
|
|
4510
|
+
showPasswordToggle,
|
|
4511
|
+
passwordVisibleIcon = defaultProps$1c.passwordVisibleIcon,
|
|
4512
|
+
passwordHiddenIcon = defaultProps$1c.passwordHiddenIcon,
|
|
4513
|
+
...rest
|
|
4514
|
+
}, ref) {
|
|
4515
|
+
const inputRef = useRef(null);
|
|
4516
|
+
const [showPassword, setShowPassword] = useState(false);
|
|
4517
|
+
const actualType = type === "password" && showPassword ? "text" : type;
|
|
4518
|
+
const togglePasswordVisibility = useCallback(() => {
|
|
4519
|
+
setShowPassword((prev) => !prev);
|
|
4520
|
+
}, []);
|
|
4521
|
+
useEffect(() => {
|
|
4522
|
+
if (autoFocus) {
|
|
4523
|
+
setTimeout(() => {
|
|
4524
|
+
var _a2;
|
|
4525
|
+
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
4526
|
+
}, 0);
|
|
4527
|
+
}
|
|
4528
|
+
}, [autoFocus, inputRef]);
|
|
4529
|
+
const [localValue, setLocalValue] = React__default.useState(value);
|
|
4530
|
+
useEffect(() => {
|
|
4531
|
+
setLocalValue(value);
|
|
4532
|
+
}, [value]);
|
|
4533
|
+
useEffect(() => {
|
|
4534
|
+
updateState({ value: initialValue }, { initial: true });
|
|
4535
|
+
}, [initialValue, updateState]);
|
|
4536
|
+
const updateValue = useCallback(
|
|
4537
|
+
(value2) => {
|
|
4538
|
+
setLocalValue(value2);
|
|
4539
|
+
updateState({ value: value2 });
|
|
4540
|
+
onDidChange(value2);
|
|
4541
|
+
},
|
|
4542
|
+
[onDidChange, updateState]
|
|
4543
|
+
);
|
|
4544
|
+
const onInputChange = useCallback(
|
|
4545
|
+
(event) => {
|
|
3930
4546
|
updateValue(event.target.value);
|
|
3931
4547
|
},
|
|
3932
4548
|
[updateValue]
|
|
@@ -4319,350 +4935,6 @@ function matchThemeVar(themeVar, availableThemeVars = []) {
|
|
|
4319
4935
|
from
|
|
4320
4936
|
};
|
|
4321
4937
|
}
|
|
4322
|
-
const THEME_VAR_PREFIX = "xmlui";
|
|
4323
|
-
const themeVarCapturesRegex = /(\$[a-zA-Z][a-zA-Z0-9-_]*)/g;
|
|
4324
|
-
const booleanRegex = /^(true|false)$/;
|
|
4325
|
-
const starSizeRegex = /^\d*\*$/;
|
|
4326
|
-
const defaultCompResult = {
|
|
4327
|
-
cssProps: {},
|
|
4328
|
-
issues: /* @__PURE__ */ new Set()
|
|
4329
|
-
};
|
|
4330
|
-
function resolveLayoutProps(layoutProps = EMPTY_OBJECT, layoutContext) {
|
|
4331
|
-
const result = {
|
|
4332
|
-
cssProps: {},
|
|
4333
|
-
issues: /* @__PURE__ */ new Set()
|
|
4334
|
-
};
|
|
4335
|
-
if (!!getOrientation(layoutContext)) {
|
|
4336
|
-
result.cssProps.flexShrink = 0;
|
|
4337
|
-
}
|
|
4338
|
-
collectCss("width");
|
|
4339
|
-
const horizontalStarSize = getHorizontalStarSize(result.cssProps.width, layoutContext);
|
|
4340
|
-
if (horizontalStarSize !== null) {
|
|
4341
|
-
result.cssProps.flex = horizontalStarSize;
|
|
4342
|
-
result.cssProps.flexShrink = 1;
|
|
4343
|
-
}
|
|
4344
|
-
collectCss("minWidth");
|
|
4345
|
-
collectCss("maxWidth");
|
|
4346
|
-
collectCss("height");
|
|
4347
|
-
const verticalStarSize = getVerticalStarSize(result.cssProps.height, layoutContext);
|
|
4348
|
-
if (verticalStarSize !== null) {
|
|
4349
|
-
result.cssProps.flex = verticalStarSize;
|
|
4350
|
-
result.cssProps.flexShrink = 1;
|
|
4351
|
-
}
|
|
4352
|
-
collectCss("minHeight");
|
|
4353
|
-
collectCss("maxHeight");
|
|
4354
|
-
collectCss("top");
|
|
4355
|
-
collectCss("right");
|
|
4356
|
-
collectCss("bottom");
|
|
4357
|
-
collectCss("left");
|
|
4358
|
-
collectCss("gap");
|
|
4359
|
-
collectCss("padding");
|
|
4360
|
-
const paddingHorizontal = transformLayoutValue("paddingHorizontal");
|
|
4361
|
-
if (paddingHorizontal) {
|
|
4362
|
-
result.cssProps.paddingLeft = paddingHorizontal;
|
|
4363
|
-
result.cssProps.paddingRight = paddingHorizontal;
|
|
4364
|
-
}
|
|
4365
|
-
collectCss("paddingRight");
|
|
4366
|
-
collectCss("paddingLeft");
|
|
4367
|
-
const paddingVertical = transformLayoutValue("paddingVertical");
|
|
4368
|
-
if (paddingVertical) {
|
|
4369
|
-
result.cssProps.paddingTop = paddingVertical;
|
|
4370
|
-
result.cssProps.paddingBottom = paddingVertical;
|
|
4371
|
-
}
|
|
4372
|
-
collectCss("paddingTop");
|
|
4373
|
-
collectCss("paddingBottom");
|
|
4374
|
-
collectCss("margin");
|
|
4375
|
-
const marginHorizontal = transformLayoutValue("marginHorizontal");
|
|
4376
|
-
if (marginHorizontal) {
|
|
4377
|
-
result.cssProps.marginLeft = marginHorizontal;
|
|
4378
|
-
result.cssProps.marginRight = marginHorizontal;
|
|
4379
|
-
}
|
|
4380
|
-
collectCss("marginRight");
|
|
4381
|
-
collectCss("marginLeft");
|
|
4382
|
-
const marginVertical = transformLayoutValue("marginVertical");
|
|
4383
|
-
if (marginVertical) {
|
|
4384
|
-
result.cssProps.marginTop = marginVertical;
|
|
4385
|
-
result.cssProps.marginBottom = marginVertical;
|
|
4386
|
-
}
|
|
4387
|
-
collectCss("marginTop");
|
|
4388
|
-
collectCss("marginBottom");
|
|
4389
|
-
collectCss("border");
|
|
4390
|
-
const horizontalBorder = transformLayoutValue("borderHorizontal");
|
|
4391
|
-
if (horizontalBorder) {
|
|
4392
|
-
result.cssProps.borderLeft = horizontalBorder;
|
|
4393
|
-
result.cssProps.borderRight = horizontalBorder;
|
|
4394
|
-
}
|
|
4395
|
-
collectCss("borderRight");
|
|
4396
|
-
collectCss("borderLeft");
|
|
4397
|
-
const verticalBorder = transformLayoutValue("borderVertical");
|
|
4398
|
-
if (verticalBorder) {
|
|
4399
|
-
result.cssProps.borderTop = verticalBorder;
|
|
4400
|
-
result.cssProps.borderBottom = verticalBorder;
|
|
4401
|
-
}
|
|
4402
|
-
collectCss("borderTop");
|
|
4403
|
-
collectCss("borderBottom");
|
|
4404
|
-
collectCss("borderColor");
|
|
4405
|
-
collectCss("borderStyle");
|
|
4406
|
-
collectCss("borderWidth");
|
|
4407
|
-
collectCss("borderRadius");
|
|
4408
|
-
collectCss("radiusTopLeft", "borderTopLeftRadius");
|
|
4409
|
-
collectCss("radiusTopRight", "borderTopRightRadius");
|
|
4410
|
-
collectCss("radiusBottomLeft", "borderBottomLeftRadius");
|
|
4411
|
-
collectCss("radiusBottomRight", "borderBottomRightRadius");
|
|
4412
|
-
collectCss("color");
|
|
4413
|
-
collectCss("fontFamily");
|
|
4414
|
-
collectCss("fontSize");
|
|
4415
|
-
collectCss("fontWeight");
|
|
4416
|
-
collectCss("fontStyle");
|
|
4417
|
-
collectCss("fontVariant");
|
|
4418
|
-
collectCss("lineBreak");
|
|
4419
|
-
collectCss("textDecoration");
|
|
4420
|
-
collectCss("textDecorationLine");
|
|
4421
|
-
collectCss("textDecorationColor");
|
|
4422
|
-
collectCss("textDecorationStyle");
|
|
4423
|
-
collectCss("textDecorationThickness");
|
|
4424
|
-
collectCss("textIndent");
|
|
4425
|
-
collectCss("textShadow");
|
|
4426
|
-
collectCss("textUnderlineOffset");
|
|
4427
|
-
collectCss("userSelect");
|
|
4428
|
-
collectCss("letterSpacing");
|
|
4429
|
-
collectCss("textTransform");
|
|
4430
|
-
collectCss("lineHeight");
|
|
4431
|
-
collectCss("textAlign");
|
|
4432
|
-
collectCss("textAlignLast");
|
|
4433
|
-
collectCss("textWrap");
|
|
4434
|
-
collectCss("wordBreak");
|
|
4435
|
-
collectCss("wordSpacing");
|
|
4436
|
-
collectCss("wordWrap");
|
|
4437
|
-
collectCss("writingMode");
|
|
4438
|
-
collectCss("backgroundColor");
|
|
4439
|
-
collectCss("background");
|
|
4440
|
-
collectCss("boxShadow");
|
|
4441
|
-
collectCss("direction");
|
|
4442
|
-
collectCss("overflowX");
|
|
4443
|
-
collectCss("overflowY");
|
|
4444
|
-
collectCss("zIndex");
|
|
4445
|
-
collectCss("opacity");
|
|
4446
|
-
collectCss("zoom");
|
|
4447
|
-
collectCss("cursor");
|
|
4448
|
-
collectCss("whiteSpace");
|
|
4449
|
-
collectCss("transform");
|
|
4450
|
-
collectCss("outline");
|
|
4451
|
-
collectCss("outlineWidth");
|
|
4452
|
-
collectCss("outlineColor");
|
|
4453
|
-
collectCss("outlineStyle");
|
|
4454
|
-
collectCss("outlineOffset");
|
|
4455
|
-
const wrapContent = transformLayoutValue("wrapContent");
|
|
4456
|
-
if (wrapContent) {
|
|
4457
|
-
result.cssProps.flexWrap = wrapContent === "true" ? "wrap" : "nowrap";
|
|
4458
|
-
}
|
|
4459
|
-
collectCss("canShrink", "flexShrink");
|
|
4460
|
-
const canShrink = transformLayoutValue("canShrink");
|
|
4461
|
-
if (canShrink) {
|
|
4462
|
-
result.cssProps.flexShrink = canShrink === "true" ? 1 : 0;
|
|
4463
|
-
}
|
|
4464
|
-
if (isEmpty(result.cssProps) && isEmpty(result.issues)) {
|
|
4465
|
-
return defaultCompResult;
|
|
4466
|
-
}
|
|
4467
|
-
return result;
|
|
4468
|
-
function transformLayoutValue(prop) {
|
|
4469
|
-
var _a2, _b;
|
|
4470
|
-
const defValue = resolveSingleValue();
|
|
4471
|
-
if (((_a2 = layoutContext == null ? void 0 : layoutContext.mediaSize) == null ? void 0 : _a2.sizeIndex) !== void 0) {
|
|
4472
|
-
const sizeIndex = (_b = layoutContext.mediaSize) == null ? void 0 : _b.sizeIndex;
|
|
4473
|
-
const xsValue = resolveSingleValue("xs");
|
|
4474
|
-
const smValue = resolveSingleValue("sm");
|
|
4475
|
-
const mdValue = resolveSingleValue("md");
|
|
4476
|
-
const lgValue = resolveSingleValue("lg");
|
|
4477
|
-
const xlValue = resolveSingleValue("xl");
|
|
4478
|
-
const xxlValue = resolveSingleValue("xxl");
|
|
4479
|
-
let mergedValue;
|
|
4480
|
-
switch (sizeIndex) {
|
|
4481
|
-
case 0:
|
|
4482
|
-
mergedValue = xsValue ?? smValue ?? mdValue;
|
|
4483
|
-
break;
|
|
4484
|
-
case 1:
|
|
4485
|
-
mergedValue = smValue ?? mdValue;
|
|
4486
|
-
break;
|
|
4487
|
-
case 2:
|
|
4488
|
-
mergedValue = mdValue;
|
|
4489
|
-
break;
|
|
4490
|
-
case 3:
|
|
4491
|
-
mergedValue = lgValue;
|
|
4492
|
-
break;
|
|
4493
|
-
case 4:
|
|
4494
|
-
mergedValue = xlValue ?? lgValue;
|
|
4495
|
-
break;
|
|
4496
|
-
case 5:
|
|
4497
|
-
mergedValue = xxlValue ?? xlValue ?? lgValue;
|
|
4498
|
-
break;
|
|
4499
|
-
}
|
|
4500
|
-
return mergedValue ?? defValue;
|
|
4501
|
-
}
|
|
4502
|
-
return defValue;
|
|
4503
|
-
function resolveSingleValue(sizeTag = "") {
|
|
4504
|
-
const fullProp = sizeTag ? `${prop}-${sizeTag}` : prop;
|
|
4505
|
-
let singleInput = layoutProps[fullProp];
|
|
4506
|
-
if (singleInput == void 0) {
|
|
4507
|
-
return;
|
|
4508
|
-
}
|
|
4509
|
-
if (typeof singleInput === "string") {
|
|
4510
|
-
singleInput = singleInput.trim();
|
|
4511
|
-
} else {
|
|
4512
|
-
singleInput = singleInput.toString();
|
|
4513
|
-
}
|
|
4514
|
-
const value = singleInput ? singleInput.replace(
|
|
4515
|
-
themeVarCapturesRegex,
|
|
4516
|
-
(match) => toCssVar(match.trim())
|
|
4517
|
-
) : void 0;
|
|
4518
|
-
if (singleInput !== value) {
|
|
4519
|
-
return value;
|
|
4520
|
-
}
|
|
4521
|
-
const propPatterns = layoutPatterns[prop];
|
|
4522
|
-
if (!propPatterns || propPatterns.length === 0) {
|
|
4523
|
-
return value;
|
|
4524
|
-
}
|
|
4525
|
-
for (const pattern of propPatterns) {
|
|
4526
|
-
if (pattern.test(value)) {
|
|
4527
|
-
return value;
|
|
4528
|
-
}
|
|
4529
|
-
}
|
|
4530
|
-
result.issues.add(fullProp);
|
|
4531
|
-
return value;
|
|
4532
|
-
}
|
|
4533
|
-
}
|
|
4534
|
-
function collectCss(prop, propCssName = "") {
|
|
4535
|
-
const value = transformLayoutValue(prop);
|
|
4536
|
-
if (value) {
|
|
4537
|
-
result.cssProps[propCssName || prop] = value;
|
|
4538
|
-
}
|
|
4539
|
-
}
|
|
4540
|
-
function getHorizontalStarSize(size, layoutContext2) {
|
|
4541
|
-
if (!size) return null;
|
|
4542
|
-
const orientation = getOrientation(layoutContext2);
|
|
4543
|
-
return orientation === "horizontal" && starSizeRegex.test(size.toString()) ? getStarSizeNumber(size.toString()) : null;
|
|
4544
|
-
}
|
|
4545
|
-
function getVerticalStarSize(size, layoutContext2) {
|
|
4546
|
-
if (!size) return null;
|
|
4547
|
-
const orientation = getOrientation(layoutContext2);
|
|
4548
|
-
return orientation === "vertical" && starSizeRegex.test(size.toString()) ? getStarSizeNumber(size.toString()) : null;
|
|
4549
|
-
}
|
|
4550
|
-
function getStarSizeNumber(input2) {
|
|
4551
|
-
if (starSizeRegex.test(input2)) {
|
|
4552
|
-
const numberPart = input2.slice(0, -1);
|
|
4553
|
-
return numberPart === "" ? 1 : parseInt(numberPart, 10);
|
|
4554
|
-
}
|
|
4555
|
-
return null;
|
|
4556
|
-
}
|
|
4557
|
-
function getOrientation(layoutContext2) {
|
|
4558
|
-
if (!layoutContext2) return;
|
|
4559
|
-
let orientation = (layoutContext2 == null ? void 0 : layoutContext2.type) === "Stack" && (layoutContext2 == null ? void 0 : layoutContext2.orientation);
|
|
4560
|
-
return orientation == null ? void 0 : orientation.toString();
|
|
4561
|
-
}
|
|
4562
|
-
}
|
|
4563
|
-
function toCssVar(c) {
|
|
4564
|
-
return `var(--${THEME_VAR_PREFIX}-${c.substring(1)})`;
|
|
4565
|
-
}
|
|
4566
|
-
const layoutPatterns = {
|
|
4567
|
-
// --- Dimensions
|
|
4568
|
-
width: [],
|
|
4569
|
-
minWidth: [],
|
|
4570
|
-
maxWidth: [],
|
|
4571
|
-
height: [],
|
|
4572
|
-
minHeight: [],
|
|
4573
|
-
maxHeight: [],
|
|
4574
|
-
gap: [],
|
|
4575
|
-
// --- Positions
|
|
4576
|
-
top: [],
|
|
4577
|
-
right: [],
|
|
4578
|
-
bottom: [],
|
|
4579
|
-
left: [],
|
|
4580
|
-
// --- Border
|
|
4581
|
-
border: [],
|
|
4582
|
-
borderTop: [],
|
|
4583
|
-
borderRight: [],
|
|
4584
|
-
borderBottom: [],
|
|
4585
|
-
borderLeft: [],
|
|
4586
|
-
borderColor: [],
|
|
4587
|
-
borderStyle: [],
|
|
4588
|
-
borderWidth: [],
|
|
4589
|
-
borderHorizontal: [],
|
|
4590
|
-
borderVertical: [],
|
|
4591
|
-
// --- Border radius
|
|
4592
|
-
borderRadius: [],
|
|
4593
|
-
radiusTopLeft: [],
|
|
4594
|
-
radiusTopRight: [],
|
|
4595
|
-
radiusBottomLeft: [],
|
|
4596
|
-
radiusBottomRight: [],
|
|
4597
|
-
// --- Padding
|
|
4598
|
-
padding: [],
|
|
4599
|
-
paddingHorizontal: [],
|
|
4600
|
-
paddingVertical: [],
|
|
4601
|
-
paddingTop: [],
|
|
4602
|
-
paddingRight: [],
|
|
4603
|
-
paddingBottom: [],
|
|
4604
|
-
paddingLeft: [],
|
|
4605
|
-
// --- Margin
|
|
4606
|
-
margin: [],
|
|
4607
|
-
marginHorizontal: [],
|
|
4608
|
-
marginVertical: [],
|
|
4609
|
-
marginTop: [],
|
|
4610
|
-
marginRight: [],
|
|
4611
|
-
marginBottom: [],
|
|
4612
|
-
marginLeft: [],
|
|
4613
|
-
// --- Other
|
|
4614
|
-
backgroundColor: [],
|
|
4615
|
-
background: [],
|
|
4616
|
-
boxShadow: [],
|
|
4617
|
-
direction: [],
|
|
4618
|
-
overflowX: [],
|
|
4619
|
-
overflowY: [],
|
|
4620
|
-
zIndex: [],
|
|
4621
|
-
opacity: [],
|
|
4622
|
-
// --- Typography
|
|
4623
|
-
color: [],
|
|
4624
|
-
fontFamily: [],
|
|
4625
|
-
fontSize: [],
|
|
4626
|
-
fontWeight: [],
|
|
4627
|
-
fontStyle: [booleanRegex],
|
|
4628
|
-
fontVariant: [],
|
|
4629
|
-
lineBreak: [],
|
|
4630
|
-
textDecoration: [],
|
|
4631
|
-
userSelect: [],
|
|
4632
|
-
letterSpacing: [],
|
|
4633
|
-
textTransform: [],
|
|
4634
|
-
lineHeight: [],
|
|
4635
|
-
textAlign: [],
|
|
4636
|
-
textWrap: [],
|
|
4637
|
-
textAlignLast: [],
|
|
4638
|
-
textIndent: [],
|
|
4639
|
-
textShadow: [],
|
|
4640
|
-
wordBreak: [],
|
|
4641
|
-
wordSpacing: [],
|
|
4642
|
-
wordWrap: [],
|
|
4643
|
-
writingMode: [],
|
|
4644
|
-
// --- Content rendering
|
|
4645
|
-
wrapContent: [],
|
|
4646
|
-
canShrink: [],
|
|
4647
|
-
// --- Other
|
|
4648
|
-
cursor: [],
|
|
4649
|
-
zoom: [],
|
|
4650
|
-
whiteSpace: [],
|
|
4651
|
-
textDecorationLine: [],
|
|
4652
|
-
textDecorationColor: [],
|
|
4653
|
-
textDecorationStyle: [],
|
|
4654
|
-
textDecorationThickness: [],
|
|
4655
|
-
textUnderlineOffset: [],
|
|
4656
|
-
transform: [],
|
|
4657
|
-
// --- Outline
|
|
4658
|
-
outline: [],
|
|
4659
|
-
outlineWidth: [],
|
|
4660
|
-
outlineColor: [],
|
|
4661
|
-
outlineStyle: [],
|
|
4662
|
-
outlineOffset: [],
|
|
4663
|
-
// --- Animation
|
|
4664
|
-
transition: []
|
|
4665
|
-
};
|
|
4666
4938
|
function isThemeVarName(varName) {
|
|
4667
4939
|
return typeof varName === "string" && (varName == null ? void 0 : varName.startsWith("$"));
|
|
4668
4940
|
}
|
|
@@ -6501,222 +6773,6 @@ const XmlUiRedThemeDefinition = {
|
|
|
6501
6773
|
themeVars: { ...redThemeColors }
|
|
6502
6774
|
};
|
|
6503
6775
|
const ThemeToneKeys = ["light", "dark"];
|
|
6504
|
-
function hashString(str) {
|
|
6505
|
-
let hash = 5381;
|
|
6506
|
-
let i = str.length;
|
|
6507
|
-
while (i) {
|
|
6508
|
-
hash = hash * 33 ^ str.charCodeAt(--i);
|
|
6509
|
-
}
|
|
6510
|
-
let s = (hash >>> 0).toString(36);
|
|
6511
|
-
return s;
|
|
6512
|
-
}
|
|
6513
|
-
function toKebabCase(str) {
|
|
6514
|
-
if (str.startsWith("--")) {
|
|
6515
|
-
return str;
|
|
6516
|
-
}
|
|
6517
|
-
return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
6518
|
-
}
|
|
6519
|
-
function stableJSONStringify(obj) {
|
|
6520
|
-
return JSON.stringify(obj);
|
|
6521
|
-
}
|
|
6522
|
-
class StyleRegistry {
|
|
6523
|
-
constructor() {
|
|
6524
|
-
this.cache = /* @__PURE__ */ new Map();
|
|
6525
|
-
this.rootClasses = /* @__PURE__ */ new Set();
|
|
6526
|
-
this.injected = /* @__PURE__ */ new Set();
|
|
6527
|
-
this.refCounts = /* @__PURE__ */ new Map();
|
|
6528
|
-
this.ssrHashes = /* @__PURE__ */ new Set();
|
|
6529
|
-
}
|
|
6530
|
-
register(styles2) {
|
|
6531
|
-
const key = stableJSONStringify(styles2);
|
|
6532
|
-
const styleHash = hashString(key);
|
|
6533
|
-
const cachedEntry = this.cache.get(styleHash);
|
|
6534
|
-
if (cachedEntry) {
|
|
6535
|
-
return cachedEntry;
|
|
6536
|
-
}
|
|
6537
|
-
const className = `css-${styleHash}`;
|
|
6538
|
-
const css = this._generateCss(`.${className}`, styles2);
|
|
6539
|
-
const entry = { className, styleHash, css };
|
|
6540
|
-
this.cache.set(styleHash, entry);
|
|
6541
|
-
return entry;
|
|
6542
|
-
}
|
|
6543
|
-
/**
|
|
6544
|
-
* [PRIVATE] Recursively generates CSS rules from a style object.
|
|
6545
|
-
* This is the new, more powerful engine.
|
|
6546
|
-
* @param selector - The CSS selector for the current context (e.g., '.css-123' or '&:hover').
|
|
6547
|
-
* @param styles - The style object to process.
|
|
6548
|
-
* @returns A string of CSS rules.
|
|
6549
|
-
*/
|
|
6550
|
-
_generateCss(selector, styles2) {
|
|
6551
|
-
const directProps = [];
|
|
6552
|
-
const nestedRules = [];
|
|
6553
|
-
for (const key in styles2) {
|
|
6554
|
-
const value = styles2[key];
|
|
6555
|
-
if (typeof value === "object" && value !== null) {
|
|
6556
|
-
nestedRules.push(this._processNestedRule(selector, key, value));
|
|
6557
|
-
} else {
|
|
6558
|
-
directProps.push(`${toKebabCase(key)}:${value};`);
|
|
6559
|
-
}
|
|
6560
|
-
}
|
|
6561
|
-
let finalCss = "";
|
|
6562
|
-
if (directProps.length > 0) {
|
|
6563
|
-
finalCss += `${selector} {${directProps.join("")}}`;
|
|
6564
|
-
}
|
|
6565
|
-
finalCss += nestedRules.join("");
|
|
6566
|
-
return finalCss;
|
|
6567
|
-
}
|
|
6568
|
-
_processNestedRule(parentSelector, nestedKey, nestedStyles) {
|
|
6569
|
-
if (nestedKey.startsWith("@")) {
|
|
6570
|
-
return `${nestedKey}{${this._generateCss(parentSelector, nestedStyles)}}`;
|
|
6571
|
-
}
|
|
6572
|
-
const newSelector = nestedKey.replace(/&/g, parentSelector);
|
|
6573
|
-
return this._generateCss(newSelector, nestedStyles);
|
|
6574
|
-
}
|
|
6575
|
-
getSsrStyles() {
|
|
6576
|
-
const allCss = Array.from(this.cache.values()).map((entry) => entry.css).join("");
|
|
6577
|
-
return `@layer dynamic {${allCss}}`;
|
|
6578
|
-
}
|
|
6579
|
-
/**
|
|
6580
|
-
* Adds a class name to be applied to the <html> tag.
|
|
6581
|
-
*/
|
|
6582
|
-
addRootClasses(classNames) {
|
|
6583
|
-
classNames.forEach((className) => {
|
|
6584
|
-
this.rootClasses.add(className);
|
|
6585
|
-
});
|
|
6586
|
-
}
|
|
6587
|
-
/**
|
|
6588
|
-
* Returns a space-separated string of all collected html classes.
|
|
6589
|
-
*/
|
|
6590
|
-
getRootClasses() {
|
|
6591
|
-
return Array.from(this.rootClasses).join(" ");
|
|
6592
|
-
}
|
|
6593
|
-
// NEW: A helper to safely get the current reference count.
|
|
6594
|
-
getRefCount(styleHash) {
|
|
6595
|
-
return this.refCounts.get(styleHash) || 0;
|
|
6596
|
-
}
|
|
6597
|
-
/**
|
|
6598
|
-
* Increments the reference count for a given style hash.
|
|
6599
|
-
*/
|
|
6600
|
-
incrementRef(styleHash) {
|
|
6601
|
-
const newCount = (this.refCounts.get(styleHash) || 0) + 1;
|
|
6602
|
-
this.refCounts.set(styleHash, newCount);
|
|
6603
|
-
}
|
|
6604
|
-
/**
|
|
6605
|
-
* Decrements the reference count for a given style hash.
|
|
6606
|
-
* @returns {number} The new reference count.
|
|
6607
|
-
*/
|
|
6608
|
-
decrementRef(styleHash) {
|
|
6609
|
-
const currentCount = this.refCounts.get(styleHash) || 0;
|
|
6610
|
-
const newCount = Math.max(0, currentCount - 1);
|
|
6611
|
-
if (newCount > 0) {
|
|
6612
|
-
this.refCounts.set(styleHash, newCount);
|
|
6613
|
-
} else {
|
|
6614
|
-
this.refCounts.delete(styleHash);
|
|
6615
|
-
}
|
|
6616
|
-
return newCount;
|
|
6617
|
-
}
|
|
6618
|
-
}
|
|
6619
|
-
const IndexerContext = React__default.createContext({
|
|
6620
|
-
indexing: false
|
|
6621
|
-
});
|
|
6622
|
-
function useIndexerContext() {
|
|
6623
|
-
return useContext(IndexerContext);
|
|
6624
|
-
}
|
|
6625
|
-
const StyleContext = createContext(null);
|
|
6626
|
-
function StyleProvider({
|
|
6627
|
-
children,
|
|
6628
|
-
styleRegistry = new StyleRegistry(),
|
|
6629
|
-
forceNew = false
|
|
6630
|
-
// Optional prop to force a new registry
|
|
6631
|
-
}) {
|
|
6632
|
-
const parentRegistry = useContext(StyleContext);
|
|
6633
|
-
const [registry] = useState(() => {
|
|
6634
|
-
const newRegistry = styleRegistry;
|
|
6635
|
-
if (typeof window !== "undefined") {
|
|
6636
|
-
const ssrTag = document.querySelector('style[data-style-registry="true"]');
|
|
6637
|
-
const ssrHashes = ssrTag == null ? void 0 : ssrTag.getAttribute("data-ssr-hashes");
|
|
6638
|
-
if (ssrHashes) {
|
|
6639
|
-
let hashes = ssrHashes.split(",");
|
|
6640
|
-
newRegistry.ssrHashes = new Set(hashes);
|
|
6641
|
-
newRegistry.injected = new Set(hashes);
|
|
6642
|
-
}
|
|
6643
|
-
}
|
|
6644
|
-
return newRegistry;
|
|
6645
|
-
});
|
|
6646
|
-
if (parentRegistry && !forceNew) {
|
|
6647
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
6648
|
-
}
|
|
6649
|
-
return /* @__PURE__ */ jsx(StyleContext.Provider, { value: registry, children });
|
|
6650
|
-
}
|
|
6651
|
-
function useStyleRegistry() {
|
|
6652
|
-
const registry = useContext(StyleContext);
|
|
6653
|
-
if (registry === null) {
|
|
6654
|
-
throw new Error("Component must be used within a StyleProvider");
|
|
6655
|
-
}
|
|
6656
|
-
return registry;
|
|
6657
|
-
}
|
|
6658
|
-
function useComponentStyle(styles2) {
|
|
6659
|
-
const rootStyle = useMemo(() => {
|
|
6660
|
-
return !styles2 || Object.keys(styles2).length === 0 ? EMPTY_OBJECT : {
|
|
6661
|
-
"&": styles2
|
|
6662
|
-
// "@container style(--screenSize: 1) or @container style(--screenSize: 2) ... etc": responsiveSizes,
|
|
6663
|
-
};
|
|
6664
|
-
}, [styles2]);
|
|
6665
|
-
return useStyles(rootStyle);
|
|
6666
|
-
}
|
|
6667
|
-
const StyleInjectionTargetContext = createContext(null);
|
|
6668
|
-
function useDomRoot() {
|
|
6669
|
-
const domRoot = useContext(StyleInjectionTargetContext);
|
|
6670
|
-
return domRoot;
|
|
6671
|
-
}
|
|
6672
|
-
function useStyles(styles2, { prepend } = EMPTY_OBJECT) {
|
|
6673
|
-
const { indexing } = useIndexerContext();
|
|
6674
|
-
const domRoot = useDomRoot();
|
|
6675
|
-
const injectionTarget = typeof document === "undefined" ? null : domRoot instanceof ShadowRoot ? domRoot : document.head;
|
|
6676
|
-
const registry = useStyleRegistry();
|
|
6677
|
-
const { className, styleHash } = useMemo(() => {
|
|
6678
|
-
if (indexing || !styles2 || styles2 === EMPTY_OBJECT || Object.keys(styles2).length === 0) {
|
|
6679
|
-
return { className: void 0, styleHash: void 0 };
|
|
6680
|
-
}
|
|
6681
|
-
return registry.register(styles2);
|
|
6682
|
-
}, [indexing, registry, styles2]);
|
|
6683
|
-
useInsertionEffect(() => {
|
|
6684
|
-
if (!styleHash || registry.injected.has(styleHash)) {
|
|
6685
|
-
return;
|
|
6686
|
-
}
|
|
6687
|
-
const { css } = registry.cache.get(styleHash) || {};
|
|
6688
|
-
if (css) {
|
|
6689
|
-
const styleElement = document.createElement("style");
|
|
6690
|
-
styleElement.setAttribute("data-style-hash", styleHash);
|
|
6691
|
-
styleElement.innerHTML = `@layer dynamic {
|
|
6692
|
-
${css}
|
|
6693
|
-
}`;
|
|
6694
|
-
if (prepend) {
|
|
6695
|
-
injectionTarget.insertBefore(styleElement, injectionTarget.firstChild.nextSibling);
|
|
6696
|
-
} else {
|
|
6697
|
-
injectionTarget.appendChild(styleElement);
|
|
6698
|
-
}
|
|
6699
|
-
registry.injected.add(styleHash);
|
|
6700
|
-
}
|
|
6701
|
-
}, [registry, styleHash, injectionTarget]);
|
|
6702
|
-
useEffect(() => {
|
|
6703
|
-
if (!styleHash) {
|
|
6704
|
-
return;
|
|
6705
|
-
}
|
|
6706
|
-
registry.incrementRef(styleHash);
|
|
6707
|
-
return () => {
|
|
6708
|
-
registry.decrementRef(styleHash);
|
|
6709
|
-
setTimeout(() => {
|
|
6710
|
-
var _a2;
|
|
6711
|
-
if (registry.getRefCount(styleHash) === 0 && !registry.ssrHashes.has(styleHash)) {
|
|
6712
|
-
registry.injected.delete(styleHash);
|
|
6713
|
-
(_a2 = injectionTarget.querySelector(`style[data-style-hash="${styleHash}"]`)) == null ? void 0 : _a2.remove();
|
|
6714
|
-
}
|
|
6715
|
-
}, 0);
|
|
6716
|
-
};
|
|
6717
|
-
}, [injectionTarget, registry, styleHash]);
|
|
6718
|
-
return className;
|
|
6719
|
-
}
|
|
6720
6776
|
function useCompiledTheme(activeTheme, activeTone, themes = EMPTY_ARRAY, resources = EMPTY_OBJECT, resourceMap = EMPTY_OBJECT) {
|
|
6721
6777
|
const componentRegistry = useComponentRegistry();
|
|
6722
6778
|
const { componentThemeVars, componentDefaultThemeVars } = componentRegistry;
|
|
@@ -7050,8 +7106,8 @@ class ErrorBoundary extends React__default.Component {
|
|
|
7050
7106
|
* This method implements the Error Boundaries for the React application.
|
|
7051
7107
|
* It is invoked if errors occur during the rendering phase of any lifecycle
|
|
7052
7108
|
* methods or children components.
|
|
7053
|
-
*
|
|
7054
|
-
* DO NOT DELETE this method! Though it is not referenced directly from the code,
|
|
7109
|
+
*
|
|
7110
|
+
* DO NOT DELETE this method! Though it is not referenced directly from the code,
|
|
7055
7111
|
* it is a required part of the React component lifecycle.
|
|
7056
7112
|
*/
|
|
7057
7113
|
static getDerivedStateFromError(error2) {
|
|
@@ -7084,7 +7140,7 @@ class ErrorBoundary extends React__default.Component {
|
|
|
7084
7140
|
*/
|
|
7085
7141
|
render() {
|
|
7086
7142
|
var _a2;
|
|
7087
|
-
return this.state.hasError ? /* @__PURE__ */ jsxs("div", { className: styles$1b.errorOverlay, children: [
|
|
7143
|
+
return this.state.hasError ? /* @__PURE__ */ jsxs("div", { "data-error-boundary": true, className: styles$1b.errorOverlay, children: [
|
|
7088
7144
|
/* @__PURE__ */ jsx("div", { className: styles$1b.title, children: "There was an error!" }),
|
|
7089
7145
|
/* @__PURE__ */ jsx("div", { className: styles$1b.errorItem, children: (_a2 = this.state.error) == null ? void 0 : _a2.message })
|
|
7090
7146
|
] }) : this.props.children;
|
|
@@ -7127,6 +7183,7 @@ const NotificationToast = ({ toastDuration }) => {
|
|
|
7127
7183
|
};
|
|
7128
7184
|
const defaultProps$1b = {
|
|
7129
7185
|
isRoot: false,
|
|
7186
|
+
applyIf: true,
|
|
7130
7187
|
toastDuration: 5e3,
|
|
7131
7188
|
themeVars: EMPTY_OBJECT,
|
|
7132
7189
|
root: false
|
|
@@ -7134,6 +7191,7 @@ const defaultProps$1b = {
|
|
|
7134
7191
|
function Theme({
|
|
7135
7192
|
id,
|
|
7136
7193
|
isRoot = defaultProps$1b.isRoot,
|
|
7194
|
+
applyIf,
|
|
7137
7195
|
renderChild: renderChild2,
|
|
7138
7196
|
node,
|
|
7139
7197
|
tone,
|
|
@@ -7254,6 +7312,13 @@ function Theme({
|
|
|
7254
7312
|
if (indexing) {
|
|
7255
7313
|
return children;
|
|
7256
7314
|
}
|
|
7315
|
+
const shouldApplyTheme = applyIf ?? defaultProps$1b.applyIf;
|
|
7316
|
+
if (!shouldApplyTheme) {
|
|
7317
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7318
|
+
renderChild2 && renderChild2(node.children),
|
|
7319
|
+
children
|
|
7320
|
+
] });
|
|
7321
|
+
}
|
|
7257
7322
|
if (isRoot) {
|
|
7258
7323
|
const faviconUrl = getResourceUrl("resource:favicon") || "/resources/favicon.ico";
|
|
7259
7324
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -7324,6 +7389,12 @@ const ThemeMd = createMetadata({
|
|
|
7324
7389
|
void 0,
|
|
7325
7390
|
"boolean",
|
|
7326
7391
|
defaultProps$1b.root
|
|
7392
|
+
),
|
|
7393
|
+
applyIf: d(
|
|
7394
|
+
`This property controls whether the theme wrapper is applied. When true (default), the theme wraps the children. When false, children are rendered unwrapped.`,
|
|
7395
|
+
void 0,
|
|
7396
|
+
"boolean",
|
|
7397
|
+
true
|
|
7327
7398
|
)
|
|
7328
7399
|
},
|
|
7329
7400
|
opaque: true
|
|
@@ -7344,6 +7415,7 @@ const themeComponentRenderer = createComponentRenderer(
|
|
|
7344
7415
|
{
|
|
7345
7416
|
id: extractValue.asOptionalString(node.props.themeId),
|
|
7346
7417
|
isRoot: extractValue.asOptionalBoolean(node.props.root),
|
|
7418
|
+
applyIf: extractValue.asOptionalBoolean(node.props.applyIf),
|
|
7347
7419
|
layoutContext,
|
|
7348
7420
|
renderChild: renderChild2,
|
|
7349
7421
|
tone: themeTone,
|
|
@@ -7633,7 +7705,7 @@ const icon$4 = "_icon_8uiju_65";
|
|
|
7633
7705
|
const includeHoverIndicator = "_includeHoverIndicator_8uiju_71";
|
|
7634
7706
|
const displayActive = "_displayActive_8uiju_106";
|
|
7635
7707
|
const navItemActive = "_navItemActive_8uiju_118";
|
|
7636
|
-
const disabled$
|
|
7708
|
+
const disabled$b = "_disabled_8uiju_153";
|
|
7637
7709
|
const vertical$6 = "_vertical_8uiju_157";
|
|
7638
7710
|
const innerContent$1 = "_innerContent_8uiju_170";
|
|
7639
7711
|
const navLinkStyles = {
|
|
@@ -7644,7 +7716,7 @@ const navLinkStyles = {
|
|
|
7644
7716
|
includeHoverIndicator,
|
|
7645
7717
|
displayActive,
|
|
7646
7718
|
navItemActive,
|
|
7647
|
-
disabled: disabled$
|
|
7719
|
+
disabled: disabled$b,
|
|
7648
7720
|
vertical: vertical$6,
|
|
7649
7721
|
innerContent: innerContent$1
|
|
7650
7722
|
};
|
|
@@ -8378,6 +8450,7 @@ function App({
|
|
|
8378
8450
|
name,
|
|
8379
8451
|
className,
|
|
8380
8452
|
applyDefaultContentPadding,
|
|
8453
|
+
registerComponentApi,
|
|
8381
8454
|
...rest
|
|
8382
8455
|
}) {
|
|
8383
8456
|
const { getThemeVar } = useTheme();
|
|
@@ -8845,7 +8918,7 @@ const AppMd = createMetadata({
|
|
|
8845
8918
|
}
|
|
8846
8919
|
}
|
|
8847
8920
|
});
|
|
8848
|
-
function AppNode({ node, extractValue, renderChild: renderChild2, className, lookupEventHandler }) {
|
|
8921
|
+
function AppNode({ node, extractValue, renderChild: renderChild2, className, lookupEventHandler, registerComponentApi }) {
|
|
8849
8922
|
const processedNavRef = useRef(false);
|
|
8850
8923
|
const layoutType = useMemo(
|
|
8851
8924
|
() => extractValue(node.props.layout),
|
|
@@ -9061,6 +9134,7 @@ function AppNode({ node, extractValue, renderChild: renderChild2, className, loo
|
|
|
9061
9134
|
navPanelDef: NavPanel3,
|
|
9062
9135
|
logoContentDef: node.props.logoTemplate,
|
|
9063
9136
|
renderChild: renderChild2,
|
|
9137
|
+
registerComponentApi,
|
|
9064
9138
|
children: [
|
|
9065
9139
|
renderedContent,
|
|
9066
9140
|
/* @__PURE__ */ jsx(SearchIndexCollector, { Pages: Pages2, renderChild: renderChild2 })
|
|
@@ -9192,7 +9266,7 @@ function PageIndexer({
|
|
|
9192
9266
|
const appRenderer = createComponentRenderer(
|
|
9193
9267
|
COMP$1t,
|
|
9194
9268
|
AppMd,
|
|
9195
|
-
({ node, extractValue, renderChild: renderChild2, className, lookupEventHandler }) => {
|
|
9269
|
+
({ node, extractValue, renderChild: renderChild2, className, lookupEventHandler, registerComponentApi }) => {
|
|
9196
9270
|
return /* @__PURE__ */ jsx(
|
|
9197
9271
|
AppNode,
|
|
9198
9272
|
{
|
|
@@ -9200,7 +9274,8 @@ const appRenderer = createComponentRenderer(
|
|
|
9200
9274
|
renderChild: renderChild2,
|
|
9201
9275
|
extractValue,
|
|
9202
9276
|
className,
|
|
9203
|
-
lookupEventHandler
|
|
9277
|
+
lookupEventHandler,
|
|
9278
|
+
registerComponentApi
|
|
9204
9279
|
}
|
|
9205
9280
|
);
|
|
9206
9281
|
}
|
|
@@ -9420,14 +9495,16 @@ function AppState({
|
|
|
9420
9495
|
registerComponentApi,
|
|
9421
9496
|
onDidUpdate
|
|
9422
9497
|
}) {
|
|
9423
|
-
const registerAppState = useAppStateContextPart((value2) => value2.registerAppState);
|
|
9424
9498
|
const update = useAppStateContextPart((value2) => value2.update);
|
|
9499
|
+
const value = useAppStateContextPart((value2) => {
|
|
9500
|
+
var _a2;
|
|
9501
|
+
return (_a2 = value2 == null ? void 0 : value2.appState) == null ? void 0 : _a2[bucket];
|
|
9502
|
+
});
|
|
9425
9503
|
useIsomorphicLayoutEffect(() => {
|
|
9426
9504
|
if (initialValue !== void 0) {
|
|
9427
|
-
|
|
9505
|
+
update(bucket, initialValue);
|
|
9428
9506
|
}
|
|
9429
|
-
}, [bucket, initialValue
|
|
9430
|
-
const value = useAppStateContextPart((value2) => value2.appState[bucket]);
|
|
9507
|
+
}, [bucket, initialValue]);
|
|
9431
9508
|
useIsomorphicLayoutEffect(() => {
|
|
9432
9509
|
updateState({ value });
|
|
9433
9510
|
if (onDidUpdate) {
|
|
@@ -9476,7 +9553,7 @@ const AppStateMd = createMetadata({
|
|
|
9476
9553
|
defaultValue: defaultProps$13.bucket
|
|
9477
9554
|
},
|
|
9478
9555
|
initialValue: {
|
|
9479
|
-
description: `This property contains the initial state value. Though you can use multiple \`${COMP$1r}\`component instances for the same bucket with their \`initialValue\` set, it may result in faulty app logic. When xmlui instantiates an \`${COMP$1r}\` with an explicit initial value, that value is immediately
|
|
9556
|
+
description: `This property contains the initial state value. Though you can use multiple \`${COMP$1r}\`component instances for the same bucket with their \`initialValue\` set, it may result in faulty app logic. When xmlui instantiates an \`${COMP$1r}\` with an explicit initial value, that value is immediately merged with the existing state. The issue may come from the behavior that \`initialValue\` is set (merged) only when a component mounts. By default, the bucket's initial state is undefined.`
|
|
9480
9557
|
}
|
|
9481
9558
|
},
|
|
9482
9559
|
apis: {
|
|
@@ -10034,13 +10111,13 @@ const styles$12 = {
|
|
|
10034
10111
|
const themeVars$M = `'{"padding-Link": "var(--xmlui-padding-Link)", "paddingHorizontal-Link": "var(--xmlui-paddingHorizontal-Link, var(--xmlui-padding-Link))", "paddingVertical-Link": "var(--xmlui-paddingVertical-Link, var(--xmlui-padding-Link))", "paddingLeft-Link": "var(--xmlui-paddingLeft-Link, var(--xmlui-paddingHorizontal-Link, var(--xmlui-padding-Link)))", "paddingRight-Link": "var(--xmlui-paddingRight-Link, var(--xmlui-paddingHorizontal-Link, var(--xmlui-padding-Link)))", "paddingTop-Link": "var(--xmlui-paddingTop-Link, var(--xmlui-paddingVertical-Link, var(--xmlui-padding-Link)))", "paddingBottom-Link": "var(--xmlui-paddingBottom-Link, var(--xmlui-paddingVertical-Link, var(--xmlui-padding-Link)))", "padding-icon-Link": "var(--xmlui-padding-icon-Link)", "paddingHorizontal-icon-Link": "var(--xmlui-paddingHorizontal-icon-Link, var(--xmlui-padding-icon-Link))", "paddingVertical-icon-Link": "var(--xmlui-paddingVertical-icon-Link, var(--xmlui-padding-icon-Link))", "paddingLeft-icon-Link": "var(--xmlui-paddingLeft-icon-Link, var(--xmlui-paddingHorizontal-icon-Link, var(--xmlui-padding-icon-Link)))", "paddingRight-icon-Link": "var(--xmlui-paddingRight-icon-Link, var(--xmlui-paddingHorizontal-icon-Link, var(--xmlui-padding-icon-Link)))", "paddingTop-icon-Link": "var(--xmlui-paddingTop-icon-Link, var(--xmlui-paddingVertical-icon-Link, var(--xmlui-padding-icon-Link)))", "paddingBottom-icon-Link": "var(--xmlui-paddingBottom-icon-Link, var(--xmlui-paddingVertical-icon-Link, var(--xmlui-padding-icon-Link)))", "border-Link": "var(--xmlui-border-Link)", "borderHorizontal-Link": "var(--xmlui-borderHorizontal-Link, var(--xmlui-border-Link))", "borderVertical-Link": "var(--xmlui-borderVertical-Link, var(--xmlui-border-Link))", "borderLeft-Link": "var(--xmlui-borderLeft-Link, var(--xmlui-borderHorizontal-Link, var(--xmlui-border-Link)))", "borderRight-Link": "var(--xmlui-borderRight-Link, var(--xmlui-borderHorizontal-Link, var(--xmlui-border-Link)))", "borderTop-Link": "var(--xmlui-borderTop-Link, var(--xmlui-borderVertical-Link, var(--xmlui-border-Link)))", "borderBottom-Link": "var(--xmlui-borderBottom-Link, var(--xmlui-borderVertical-Link, var(--xmlui-border-Link)))", "borderWidth-Link": "var(--xmlui-borderWidth-Link)", "borderHorizontalWidth-Link": "var(--xmlui-borderHorizontalWidth-Link, var(--xmlui-borderWidth-Link))", "borderLeftWidth-Link": "var(--xmlui-borderLeftWidth-Link, var(--xmlui-borderHorizontalWidth-Link, var(--xmlui-borderWidth-Link)))", "borderRightWidth-Link": "var(--xmlui-borderRightWidth-Link, var(--xmlui-borderHorizontalWidth-Link, var(--xmlui-borderWidth-Link)))", "borderVerticalWidth-Link": "var(--xmlui-borderVerticalWidth-Link, var(--xmlui-borderWidth-Link))", "borderTopWidth-Link": "var(--xmlui-borderTopWidth-Link, var(--xmlui-borderVerticalWidth-Link, var(--xmlui-borderWidth-Link)))", "borderBottomWidth-Link": "var(--xmlui-borderBottomWidth-Link, var(--xmlui-borderVerticalWidth-Link, var(--xmlui-borderWidth-Link)))", "borderStyle-Link": "var(--xmlui-borderStyle-Link)", "borderHorizontalStyle-Link": "var(--xmlui-borderHorizontalStyle-Link, var(--xmlui-borderStyle-Link))", "borderLeftStyle-Link": "var(--xmlui-borderLeftStyle-Link, var(--xmlui-borderHorizontalStyle-Link, var(--xmlui-borderStyle-Link)))", "borderRightStyle-Link": "var(--xmlui-borderRightStyle-Link, var(--xmlui-borderHorizontalStyle-Link, var(--xmlui-borderStyle-Link)))", "borderVerticalStyle-Link": "var(--xmlui-borderVerticalStyle-Link, var(--xmlui-borderStyle-Link))", "borderTopStyle-Link": "var(--xmlui-borderTopStyle-Link, var(--xmlui-borderVerticalStyle-Link, var(--xmlui-borderStyle-Link)))", "borderBottomStyle-Link": "var(--xmlui-borderBottomStyle-Link, var(--xmlui-borderVerticalStyle-Link, var(--xmlui-borderStyle-Link)))", "borderColor-Link": "var(--xmlui-borderColor-Link)", "borderHorizontalColor-Link": "var(--xmlui-borderHorizontalColor-Link, var(--xmlui-borderColor-Link))", "borderLeftColor-Link": "var(--xmlui-borderLeftColor-Link, var(--xmlui-borderHorizontalColor-Link, var(--xmlui-borderColor-Link)))", "borderRightColor-Link": "var(--xmlui-borderRightColor-Link, var(--xmlui-borderHorizontalColor-Link, var(--xmlui-borderColor-Link)))", "borderVerticalColor-Link": "var(--xmlui-borderVerticalColor-Link, var(--xmlui-borderColor-Link))", "borderTopColor-Link": "var(--xmlui-borderTopColor-Link, var(--xmlui-borderVerticalColor-Link, var(--xmlui-borderColor-Link)))", "borderBottomColor-Link": "var(--xmlui-borderBottomColor-Link, var(--xmlui-borderVerticalColor-Link, var(--xmlui-borderColor-Link)))", "borderStartStartRadius-Link": "var(--xmlui-borderStartStartRadius-Link, var(--xmlui-borderRadius-Link))", "borderStartEndRadius-Link": "var(--xmlui-borderStartEndRadius-Link, var(--xmlui-borderRadius-Link))", "borderEndStartRadius-Link": "var(--xmlui-borderEndStartRadius-Link, var(--xmlui-borderRadius-Link))", "borderEndEndRadius-Link": "var(--xmlui-borderEndEndRadius-Link, var(--xmlui-borderRadius-Link))", "textColor-Link": "var(--xmlui-textColor-Link)", "fontFamily-Link": "var(--xmlui-fontFamily-Link)", "fontSize-Link": "var(--xmlui-fontSize-Link)", "fontStyle-Link": "var(--xmlui-fontStyle-Link)", "fontVariant-Link": "var(--xmlui-fontVariant-Link)", "fontWeight-Link": "var(--xmlui-fontWeight-Link)", "fontStretch-Link": "var(--xmlui-fontStretch-Link)", "textDecorationLine-Link": "var(--xmlui-textDecorationLine-Link)", "textDecorationColor-Link": "var(--xmlui-textDecorationColor-Link)", "textDecorationStyle-Link": "var(--xmlui-textDecorationStyle-Link)", "textDecorationThickness-Link": "var(--xmlui-textDecorationThickness-Link)", "textUnderlineOffset-Link": "var(--xmlui-textUnderlineOffset-Link)", "lineHeight-Link": "var(--xmlui-lineHeight-Link)", "backgroundColor-Link": "var(--xmlui-backgroundColor-Link)", "textTransform-Link": "var(--xmlui-textTransform-Link)", "letterSpacing-Link": "var(--xmlui-letterSpacing-Link)", "wordSpacing-Link": "var(--xmlui-wordSpacing-Link)", "textShadow-Link": "var(--xmlui-textShadow-Link)", "textIndent-Link": "var(--xmlui-textIndent-Link)", "textAlign-Link": "var(--xmlui-textAlign-Link)", "textAlignLast-Link": "var(--xmlui-textAlignLast-Link)", "wordBreak-Link": "var(--xmlui-wordBreak-Link)", "wordWrap-Link": "var(--xmlui-wordWrap-Link)", "direction-Link": "var(--xmlui-direction-Link)", "writingMode-Link": "var(--xmlui-writingMode-Link)", "lineBreak-Link": "var(--xmlui-lineBreak-Link)", "textColor-Link--active": "var(--xmlui-textColor-Link--active)", "textColor-Link--hover": "var(--xmlui-textColor-Link--hover)", "textColor-Link--hover--active": "var(--xmlui-textColor-Link--hover--active)", "fontWeight-Link--active": "var(--xmlui-fontWeight-Link--active)", "gap-icon-Link": "var(--xmlui-gap-icon-Link)", "textDecorationColor-Link--hover": "var(--xmlui-textDecorationColor-Link--hover)", "textDecorationColor-Link--active": "var(--xmlui-textDecorationColor-Link--active)", "outlineWidth-Link--focus": "var(--xmlui-outlineWidth-Link--focus)", "outlineColor-Link--focus": "var(--xmlui-outlineColor-Link--focus)", "outlineStyle-Link--focus": "var(--xmlui-outlineStyle-Link--focus)", "outlineOffset-Link--focus": "var(--xmlui-outlineOffset-Link--focus)"}'`;
|
|
10035
10112
|
const container$1 = "_container_1iujp_14";
|
|
10036
10113
|
const active$3 = "_active_1iujp_75";
|
|
10037
|
-
const disabled$
|
|
10114
|
+
const disabled$a = "_disabled_1iujp_79";
|
|
10038
10115
|
const iconWrapper = "_iconWrapper_1iujp_94";
|
|
10039
10116
|
const styles$11 = {
|
|
10040
10117
|
themeVars: themeVars$M,
|
|
10041
10118
|
container: container$1,
|
|
10042
10119
|
active: active$3,
|
|
10043
|
-
disabled: disabled$
|
|
10120
|
+
disabled: disabled$a,
|
|
10044
10121
|
iconWrapper
|
|
10045
10122
|
};
|
|
10046
10123
|
const defaultProps$$ = {
|
|
@@ -10760,10 +10837,10 @@ const checkboxComponentRenderer = createComponentRenderer(
|
|
|
10760
10837
|
);
|
|
10761
10838
|
}
|
|
10762
10839
|
);
|
|
10763
|
-
const themeVars$J = `'{"backgroundColor-ContentSeparator": "var(--xmlui-backgroundColor-ContentSeparator)", "size-ContentSeparator": "var(--xmlui-size-ContentSeparator)"}'`;
|
|
10764
|
-
const separator = "
|
|
10765
|
-
const horizontal$3 = "
|
|
10766
|
-
const vertical$3 = "
|
|
10840
|
+
const themeVars$J = `'{"backgroundColor-ContentSeparator": "var(--xmlui-backgroundColor-ContentSeparator)", "size-ContentSeparator": "var(--xmlui-size-ContentSeparator)", "marginTop-ContentSeparator": "var(--xmlui-marginTop-ContentSeparator)", "marginBottom-ContentSeparator": "var(--xmlui-marginBottom-ContentSeparator)", "marginVertical-ContentSeparator": "var(--xmlui-marginVertical-ContentSeparator)", "marginLeft-ContentSeparator": "var(--xmlui-marginLeft-ContentSeparator)", "marginRight-ContentSeparator": "var(--xmlui-marginRight-ContentSeparator)", "marginHorizontal-ContentSeparator": "var(--xmlui-marginHorizontal-ContentSeparator)"}'`;
|
|
10841
|
+
const separator = "_separator_13z1k_14";
|
|
10842
|
+
const horizontal$3 = "_horizontal_13z1k_21";
|
|
10843
|
+
const vertical$3 = "_vertical_13z1k_25";
|
|
10767
10844
|
const styles$_ = {
|
|
10768
10845
|
themeVars: themeVars$J,
|
|
10769
10846
|
separator,
|
|
@@ -10817,6 +10894,8 @@ const ContentSeparatorMd = createMetadata({
|
|
|
10817
10894
|
defaultThemeVars: {
|
|
10818
10895
|
[`backgroundColor-${COMP$1k}`]: "$color-surface-200",
|
|
10819
10896
|
[`size-${COMP$1k}`]: "1px",
|
|
10897
|
+
[`marginVertical-${COMP$1k}`]: "0",
|
|
10898
|
+
[`marginHorizontal-${COMP$1k}`]: "0",
|
|
10820
10899
|
light: {
|
|
10821
10900
|
// --- No light-specific theme vars
|
|
10822
10901
|
},
|
|
@@ -10846,7 +10925,7 @@ const adornment$3 = "_adornment_17ucd_56";
|
|
|
10846
10925
|
const error$b = "_error_17ucd_59";
|
|
10847
10926
|
const warning$c = "_warning_17ucd_87";
|
|
10848
10927
|
const valid$b = "_valid_17ucd_115";
|
|
10849
|
-
const disabled$
|
|
10928
|
+
const disabled$9 = "_disabled_17ucd_143";
|
|
10850
10929
|
const indicator$3 = "_indicator_17ucd_149";
|
|
10851
10930
|
const datePickerInput = "_datePickerInput_17ucd_150";
|
|
10852
10931
|
const inlinePickerMenu = "_inlinePickerMenu_17ucd_153";
|
|
@@ -10893,7 +10972,7 @@ const styles$Z = {
|
|
|
10893
10972
|
error: error$b,
|
|
10894
10973
|
warning: warning$c,
|
|
10895
10974
|
valid: valid$b,
|
|
10896
|
-
disabled: disabled$
|
|
10975
|
+
disabled: disabled$9,
|
|
10897
10976
|
indicator: indicator$3,
|
|
10898
10977
|
datePickerInput,
|
|
10899
10978
|
inlinePickerMenu,
|
|
@@ -11501,7 +11580,7 @@ const DropdownMenuSubContent = "_DropdownMenuSubContent_iu9k6_19";
|
|
|
11501
11580
|
const DropdownMenuItem = "_DropdownMenuItem_iu9k6_29";
|
|
11502
11581
|
const DropdownMenuSubTrigger = "_DropdownMenuSubTrigger_iu9k6_30";
|
|
11503
11582
|
const active$2 = "_active_iu9k6_53";
|
|
11504
|
-
const disabled$
|
|
11583
|
+
const disabled$8 = "_disabled_iu9k6_63";
|
|
11505
11584
|
const wrapper$h = "_wrapper_iu9k6_74";
|
|
11506
11585
|
const DropdownMenuSeparator = "_DropdownMenuSeparator_iu9k6_78";
|
|
11507
11586
|
const styles$Y = {
|
|
@@ -11511,7 +11590,7 @@ const styles$Y = {
|
|
|
11511
11590
|
DropdownMenuItem,
|
|
11512
11591
|
DropdownMenuSubTrigger,
|
|
11513
11592
|
active: active$2,
|
|
11514
|
-
disabled: disabled$
|
|
11593
|
+
disabled: disabled$8,
|
|
11515
11594
|
wrapper: wrapper$h,
|
|
11516
11595
|
DropdownMenuSeparator
|
|
11517
11596
|
};
|
|
@@ -12275,7 +12354,7 @@ const FileUploadDropZone = forwardRef(function FileUploadDropZone2({
|
|
|
12275
12354
|
}, forwardedRef) {
|
|
12276
12355
|
const accept = acceptedFileTypes ? acceptedFileTypes.split(",").reduce((acc, type) => ({ ...acc, [type.trim()]: [] }), {}) : void 0;
|
|
12277
12356
|
const onDrop = useCallback(
|
|
12278
|
-
|
|
12357
|
+
(acceptedFiles) => {
|
|
12279
12358
|
if (!acceptedFiles.length) {
|
|
12280
12359
|
return;
|
|
12281
12360
|
}
|
|
@@ -12791,14 +12870,15 @@ function backendValidationArrived({
|
|
|
12791
12870
|
};
|
|
12792
12871
|
}
|
|
12793
12872
|
const themeVars$B = `'{"padding-ModalDialog": "var(--xmlui-padding-ModalDialog)", "paddingHorizontal-ModalDialog": "var(--xmlui-paddingHorizontal-ModalDialog, var(--xmlui-padding-ModalDialog))", "paddingVertical-ModalDialog": "var(--xmlui-paddingVertical-ModalDialog, var(--xmlui-padding-ModalDialog))", "paddingLeft-ModalDialog": "var(--xmlui-paddingLeft-ModalDialog, var(--xmlui-paddingHorizontal-ModalDialog, var(--xmlui-padding-ModalDialog)))", "paddingRight-ModalDialog": "var(--xmlui-paddingRight-ModalDialog, var(--xmlui-paddingHorizontal-ModalDialog, var(--xmlui-padding-ModalDialog)))", "paddingTop-ModalDialog": "var(--xmlui-paddingTop-ModalDialog, var(--xmlui-paddingVertical-ModalDialog, var(--xmlui-padding-ModalDialog)))", "paddingBottom-ModalDialog": "var(--xmlui-paddingBottom-ModalDialog, var(--xmlui-paddingVertical-ModalDialog, var(--xmlui-padding-ModalDialog)))", "padding-overlay-ModalDialog": "var(--xmlui-padding-overlay-ModalDialog)", "paddingHorizontal-overlay-ModalDialog": "var(--xmlui-paddingHorizontal-overlay-ModalDialog, var(--xmlui-padding-overlay-ModalDialog))", "paddingVertical-overlay-ModalDialog": "var(--xmlui-paddingVertical-overlay-ModalDialog, var(--xmlui-padding-overlay-ModalDialog))", "paddingLeft-overlay-ModalDialog": "var(--xmlui-paddingLeft-overlay-ModalDialog, var(--xmlui-paddingHorizontal-overlay-ModalDialog, var(--xmlui-padding-overlay-ModalDialog)))", "paddingRight-overlay-ModalDialog": "var(--xmlui-paddingRight-overlay-ModalDialog, var(--xmlui-paddingHorizontal-overlay-ModalDialog, var(--xmlui-padding-overlay-ModalDialog)))", "paddingTop-overlay-ModalDialog": "var(--xmlui-paddingTop-overlay-ModalDialog, var(--xmlui-paddingVertical-overlay-ModalDialog, var(--xmlui-padding-overlay-ModalDialog)))", "paddingBottom-overlay-ModalDialog": "var(--xmlui-paddingBottom-overlay-ModalDialog, var(--xmlui-paddingVertical-overlay-ModalDialog, var(--xmlui-padding-overlay-ModalDialog)))", "Dialog:backgroundColor-ModalDialog": "var(--xmlui-backgroundColor-ModalDialog)", "Dialog:backgroundColor-overlay-ModalDialog": "var(--xmlui-backgroundColor-overlay-ModalDialog)", "Dialog:borderRadius-ModalDialog": "var(--xmlui-borderRadius-ModalDialog)", "Dialog:fontFamily-ModalDialog": "var(--xmlui-fontFamily-ModalDialog)", "Dialog:textColor-ModalDialog": "var(--xmlui-textColor-ModalDialog)", "Dialog:minWidth-ModalDialog": "var(--xmlui-minWidth-ModalDialog)", "Dialog:maxWidth-ModalDialog": "var(--xmlui-maxWidth-ModalDialog)", "Dialog:marginBottom-title-ModalDialog": "var(--xmlui-marginBottom-title-ModalDialog)"}'`;
|
|
12794
|
-
const overlay$2 = "
|
|
12795
|
-
const fullScreen = "
|
|
12796
|
-
const content$6 = "
|
|
12797
|
-
const overlayBg$1 = "
|
|
12798
|
-
const nested = "
|
|
12799
|
-
const
|
|
12800
|
-
const
|
|
12801
|
-
const
|
|
12873
|
+
const overlay$2 = "_overlay_do4x4_14";
|
|
12874
|
+
const fullScreen = "_fullScreen_do4x4_22";
|
|
12875
|
+
const content$6 = "_content_do4x4_28";
|
|
12876
|
+
const overlayBg$1 = "_overlayBg_do4x4_37";
|
|
12877
|
+
const nested = "_nested_do4x4_43";
|
|
12878
|
+
const contentAnimation = "_contentAnimation_do4x4_74";
|
|
12879
|
+
const dialogTitle = "_dialogTitle_do4x4_80";
|
|
12880
|
+
const innerContent = "_innerContent_do4x4_85";
|
|
12881
|
+
const closeButton = "_closeButton_do4x4_110";
|
|
12802
12882
|
const styles$S = {
|
|
12803
12883
|
themeVars: themeVars$B,
|
|
12804
12884
|
overlay: overlay$2,
|
|
@@ -12806,6 +12886,7 @@ const styles$S = {
|
|
|
12806
12886
|
content: content$6,
|
|
12807
12887
|
overlayBg: overlayBg$1,
|
|
12808
12888
|
nested,
|
|
12889
|
+
contentAnimation,
|
|
12809
12890
|
dialogTitle,
|
|
12810
12891
|
innerContent,
|
|
12811
12892
|
closeButton
|
|
@@ -12904,6 +12985,7 @@ const ModalDialog = React__default.forwardRef(
|
|
|
12904
12985
|
className,
|
|
12905
12986
|
onOpen,
|
|
12906
12987
|
onClose,
|
|
12988
|
+
externalAnimation = true,
|
|
12907
12989
|
...rest
|
|
12908
12990
|
}, ref) => {
|
|
12909
12991
|
const { root: root2 } = useTheme();
|
|
@@ -12952,7 +13034,13 @@ const ModalDialog = React__default.forwardRef(
|
|
|
12952
13034
|
{
|
|
12953
13035
|
...rest,
|
|
12954
13036
|
"data-part-id": PART_CONTENT,
|
|
12955
|
-
className: classnames(
|
|
13037
|
+
className: classnames(
|
|
13038
|
+
{
|
|
13039
|
+
[styles$S.contentAnimation]: !externalAnimation
|
|
13040
|
+
},
|
|
13041
|
+
styles$S.content,
|
|
13042
|
+
className
|
|
13043
|
+
),
|
|
12956
13044
|
onPointerDownOutside: (event) => {
|
|
12957
13045
|
if (event.target instanceof Element && (event.target.closest("._debug-inspect-button") !== null || event.target.localName === "com-1password-button")) {
|
|
12958
13046
|
event.preventDefault();
|
|
@@ -13898,7 +13986,7 @@ function useValidation(validations, onValidate, value, dispatch, bindTo, throttl
|
|
|
13898
13986
|
if (!ignore) {
|
|
13899
13987
|
dispatch(fieldValidated(bindTo, partialResult));
|
|
13900
13988
|
if (partialResult.partial) {
|
|
13901
|
-
(async () => {
|
|
13989
|
+
void (async () => {
|
|
13902
13990
|
const result = await throttledAsyncValidate(validations, onValidate, deferredValue);
|
|
13903
13991
|
if (!ignore) {
|
|
13904
13992
|
dispatch(fieldValidated(bindTo, result));
|
|
@@ -13914,7 +14002,7 @@ function useValidation(validations, onValidate, value, dispatch, bindTo, throttl
|
|
|
13914
14002
|
);
|
|
13915
14003
|
}
|
|
13916
14004
|
function useValidationDisplay(bindTo, value, validationResult, validationMode = defaultValidationMode) {
|
|
13917
|
-
const interactionFlags = useFormContextPart((value2) => value2.interactionFlags[bindTo]) || EMPTY_OBJECT;
|
|
14005
|
+
const interactionFlags = useFormContextPart((value2) => value2 == null ? void 0 : value2.interactionFlags[bindTo]) || EMPTY_OBJECT;
|
|
13918
14006
|
const forceShowValidationResult = interactionFlags.forceShowValidationResult;
|
|
13919
14007
|
const focused2 = interactionFlags.focused;
|
|
13920
14008
|
const afterFirstDirtyBlur = interactionFlags.afterFirstDirtyBlur;
|
|
@@ -14198,7 +14286,6 @@ const Form = forwardRef(function({
|
|
|
14198
14286
|
...rest
|
|
14199
14287
|
}, ref) {
|
|
14200
14288
|
const formRef = useRef(null);
|
|
14201
|
-
useImperativeHandle(ref, () => formRef.current);
|
|
14202
14289
|
const [confirmSubmitModalVisible, setConfirmSubmitModalVisible] = useState(false);
|
|
14203
14290
|
const requestModalFormClose = useModalFormClose();
|
|
14204
14291
|
const isEnabled2 = enabled2 && !formState.submitInProgress;
|
|
@@ -14235,7 +14322,7 @@ const Form = forwardRef(function({
|
|
|
14235
14322
|
]);
|
|
14236
14323
|
const doCancel = useEvent(() => {
|
|
14237
14324
|
onCancel == null ? void 0 : onCancel();
|
|
14238
|
-
requestModalFormClose();
|
|
14325
|
+
void requestModalFormClose();
|
|
14239
14326
|
});
|
|
14240
14327
|
const doSubmit = useEvent(async (event) => {
|
|
14241
14328
|
var _a2;
|
|
@@ -14265,7 +14352,7 @@ const Form = forwardRef(function({
|
|
|
14265
14352
|
dispatch(formSubmitted());
|
|
14266
14353
|
await (onSuccess == null ? void 0 : onSuccess(result));
|
|
14267
14354
|
if (!keepModalOpenOnSubmit) {
|
|
14268
|
-
requestModalFormClose();
|
|
14355
|
+
void requestModalFormClose();
|
|
14269
14356
|
}
|
|
14270
14357
|
if (initialValue === EMPTY_OBJECT) {
|
|
14271
14358
|
flushSync(() => {
|
|
@@ -14445,13 +14532,15 @@ const FormWithContextVar = forwardRef(function({
|
|
|
14445
14532
|
const completedNotificationMessage = extractValue.asOptionalString(node.props.completedNotificationMessage) || "";
|
|
14446
14533
|
const errorNotificationMessage = extractValue.asOptionalString(node.props.errorNotificationMessage) || "";
|
|
14447
14534
|
const submitUrl = extractValue.asOptionalString(node.props.submitUrl) || extractValue.asOptionalString(node.props._data_url);
|
|
14535
|
+
const itemLabelWidth = extractValue.asOptionalString(node.props.itemLabelWidth);
|
|
14536
|
+
const { cssProps: itemLabelWidthCssProps } = resolveLayoutProps({ width: itemLabelWidth });
|
|
14448
14537
|
return /* @__PURE__ */ jsx(Slot, { ref, style: style2, children: /* @__PURE__ */ jsx(
|
|
14449
14538
|
Form,
|
|
14450
14539
|
{
|
|
14451
14540
|
keepModalOpenOnSubmit: extractValue.asOptionalBoolean(node.props.keepModalOpenOnSubmit),
|
|
14452
14541
|
itemLabelPosition: extractValue.asOptionalString(node.props.itemLabelPosition),
|
|
14453
14542
|
itemLabelBreak: extractValue.asOptionalBoolean(node.props.itemLabelBreak),
|
|
14454
|
-
itemLabelWidth:
|
|
14543
|
+
itemLabelWidth: itemLabelWidthCssProps.width,
|
|
14455
14544
|
hideButtonRowUntilDirty: extractValue.asOptionalBoolean(node.props.hideButtonRowUntilDirty),
|
|
14456
14545
|
formState,
|
|
14457
14546
|
dispatch,
|
|
@@ -15005,7 +15094,6 @@ class Lexer {
|
|
|
15005
15094
|
* Fetches the next token from the input stream
|
|
15006
15095
|
*/
|
|
15007
15096
|
fetch() {
|
|
15008
|
-
const lexer = this;
|
|
15009
15097
|
const input2 = this.input;
|
|
15010
15098
|
const startPos = this._prefetchedPos || input2.position;
|
|
15011
15099
|
const line2 = input2.line;
|
|
@@ -15018,6 +15106,14 @@ class Lexer {
|
|
|
15018
15106
|
let lastEndColumn = input2.column;
|
|
15019
15107
|
let ch = null;
|
|
15020
15108
|
let useResolver = false;
|
|
15109
|
+
const appendTokenChar = () => {
|
|
15110
|
+
text2 += ch;
|
|
15111
|
+
this._prefetched = null;
|
|
15112
|
+
this._prefetchedPos = null;
|
|
15113
|
+
this._prefetchedColumn = null;
|
|
15114
|
+
lastEndPos = input2.position;
|
|
15115
|
+
lastEndColumn = input2.position;
|
|
15116
|
+
};
|
|
15021
15117
|
let phase = this.getStartingPhaseThenReset();
|
|
15022
15118
|
while (true) {
|
|
15023
15119
|
ch = this.fetchNextChar();
|
|
@@ -15606,14 +15702,6 @@ class Lexer {
|
|
|
15606
15702
|
}
|
|
15607
15703
|
appendTokenChar();
|
|
15608
15704
|
}
|
|
15609
|
-
function appendTokenChar() {
|
|
15610
|
-
text2 += ch;
|
|
15611
|
-
lexer._prefetched = null;
|
|
15612
|
-
lexer._prefetchedPos = null;
|
|
15613
|
-
lexer._prefetchedColumn = null;
|
|
15614
|
-
lastEndPos = input2.position;
|
|
15615
|
-
lastEndColumn = input2.position;
|
|
15616
|
-
}
|
|
15617
15705
|
function makeToken() {
|
|
15618
15706
|
if (useResolver) {
|
|
15619
15707
|
tokenType = resolverHash.get(text2) ?? (isIdStart(text2[0]) && text2[text2.length - 1] !== "'" ? TokenType.Identifier : TokenType.Unknown);
|
|
@@ -16722,9 +16810,16 @@ class Parser {
|
|
|
16722
16810
|
* : "finally" blockStatement
|
|
16723
16811
|
*/
|
|
16724
16812
|
parseTryStatement() {
|
|
16813
|
+
const getBlock = () => {
|
|
16814
|
+
const nextToken2 = this._lexer.peek();
|
|
16815
|
+
if (nextToken2.type !== TokenType.LBrace) {
|
|
16816
|
+
this.reportError("W012", nextToken2);
|
|
16817
|
+
return null;
|
|
16818
|
+
}
|
|
16819
|
+
return this.parseBlockStatement();
|
|
16820
|
+
};
|
|
16725
16821
|
const startToken = this._lexer.peek();
|
|
16726
16822
|
let endToken = this._lexer.get();
|
|
16727
|
-
const parser = this;
|
|
16728
16823
|
const tryB = getBlock();
|
|
16729
16824
|
let catchB;
|
|
16730
16825
|
let catchV;
|
|
@@ -16776,14 +16871,6 @@ class Parser {
|
|
|
16776
16871
|
startToken,
|
|
16777
16872
|
endToken
|
|
16778
16873
|
);
|
|
16779
|
-
function getBlock() {
|
|
16780
|
-
const nextToken2 = parser._lexer.peek();
|
|
16781
|
-
if (nextToken2.type !== TokenType.LBrace) {
|
|
16782
|
-
parser.reportError("W012", nextToken2);
|
|
16783
|
-
return null;
|
|
16784
|
-
}
|
|
16785
|
-
return parser.parseBlockStatement();
|
|
16786
|
-
}
|
|
16787
16874
|
}
|
|
16788
16875
|
/**
|
|
16789
16876
|
* Parses a switch statement
|
|
@@ -19805,7 +19892,7 @@ function processStatementQueue(statements, evalContext, thread) {
|
|
|
19805
19892
|
thread.breakLabelValue = queue.length > 0 ? queue.peek().label : -1;
|
|
19806
19893
|
let outcome;
|
|
19807
19894
|
try {
|
|
19808
|
-
(_a2 = evalContext == null ? void 0 : evalContext.onStatementStarted) == null ? void 0 : _a2.call(evalContext, evalContext, queueItem.statement);
|
|
19895
|
+
void ((_a2 = evalContext == null ? void 0 : evalContext.onStatementStarted) == null ? void 0 : _a2.call(evalContext, evalContext, queueItem.statement));
|
|
19809
19896
|
outcome = processStatement(
|
|
19810
19897
|
queueItem.statement,
|
|
19811
19898
|
queueItem.execInfo ?? {},
|
|
@@ -19845,7 +19932,7 @@ function processStatementQueue(statements, evalContext, thread) {
|
|
|
19845
19932
|
diagInfo.clearToLabels++;
|
|
19846
19933
|
}
|
|
19847
19934
|
}
|
|
19848
|
-
(_b = evalContext == null ? void 0 : evalContext.onStatementCompleted) == null ? void 0 : _b.call(evalContext, evalContext, queueItem.statement);
|
|
19935
|
+
void ((_b = evalContext == null ? void 0 : evalContext.onStatementCompleted) == null ? void 0 : _b.call(evalContext, evalContext, queueItem.statement));
|
|
19849
19936
|
if (queue.length > diagInfo.maxQueueLength) {
|
|
19850
19937
|
diagInfo.maxQueueLength = queue.length;
|
|
19851
19938
|
}
|
|
@@ -20562,7 +20649,7 @@ function evalAssignment(evaluator, thisStack, expr, evalContext, thread) {
|
|
|
20562
20649
|
const rootScope = getRootIdScope(leftValue, evalContext, thread);
|
|
20563
20650
|
const updatesState = rootScope && rootScope.type !== "block";
|
|
20564
20651
|
if (updatesState && evalContext.onWillUpdate) {
|
|
20565
|
-
evalContext.onWillUpdate(rootScope, rootScope.name, "assignment");
|
|
20652
|
+
void evalContext.onWillUpdate(rootScope, rootScope.name, "assignment");
|
|
20566
20653
|
}
|
|
20567
20654
|
evaluator(thisStack, leftValue, evalContext, thread);
|
|
20568
20655
|
thisStack.pop();
|
|
@@ -20570,7 +20657,7 @@ function evalAssignment(evaluator, thisStack, expr, evalContext, thread) {
|
|
|
20570
20657
|
thisStack.pop();
|
|
20571
20658
|
const value = evalAssignmentCore(thisStack, expr, evalContext, thread);
|
|
20572
20659
|
if (updatesState && evalContext.onDidUpdate) {
|
|
20573
|
-
evalContext.onDidUpdate(rootScope, rootScope.name, "assignment");
|
|
20660
|
+
void evalContext.onDidUpdate(rootScope, rootScope.name, "assignment");
|
|
20574
20661
|
}
|
|
20575
20662
|
return value;
|
|
20576
20663
|
}
|
|
@@ -20578,13 +20665,13 @@ function evalPreOrPost(evaluator, thisStack, expr, evalContext, thread) {
|
|
|
20578
20665
|
const rootScope = getRootIdScope(expr.expr, evalContext, thread);
|
|
20579
20666
|
const updatesState = rootScope && rootScope.type !== "block";
|
|
20580
20667
|
if (updatesState && evalContext.onWillUpdate) {
|
|
20581
|
-
evalContext.onWillUpdate(rootScope, rootScope.name, "pre-post");
|
|
20668
|
+
void evalContext.onWillUpdate(rootScope, rootScope.name, "pre-post");
|
|
20582
20669
|
}
|
|
20583
20670
|
evaluator(thisStack, expr.expr, evalContext, thread);
|
|
20584
20671
|
thisStack.pop();
|
|
20585
20672
|
const value = evalPreOrPostCore(thisStack, expr, evalContext, thread);
|
|
20586
20673
|
if (updatesState && evalContext.onDidUpdate) {
|
|
20587
|
-
evalContext.onDidUpdate(rootScope, rootScope.name, "pre-post");
|
|
20674
|
+
void evalContext.onDidUpdate(rootScope, rootScope.name, "pre-post");
|
|
20588
20675
|
}
|
|
20589
20676
|
return value;
|
|
20590
20677
|
}
|
|
@@ -20663,11 +20750,11 @@ function evalFunctionInvocation(evaluator, thisStack, expr, evalContext, thread)
|
|
|
20663
20750
|
const rootScope = getRootIdScope(expr.obj, evalContext, thread);
|
|
20664
20751
|
const updatesState = rootScope && rootScope.type !== "block";
|
|
20665
20752
|
if (updatesState && evalContext.onWillUpdate) {
|
|
20666
|
-
evalContext.onWillUpdate(rootScope, rootScope.name, "function-call");
|
|
20753
|
+
void evalContext.onWillUpdate(rootScope, rootScope.name, "function-call");
|
|
20667
20754
|
}
|
|
20668
20755
|
const value = ((_b = evalContext.options) == null ? void 0 : _b.defaultToOptionalMemberAccess) ? functionObj == null ? void 0 : functionObj.call(currentContext, ...functionArgs) : functionObj.call(currentContext, ...functionArgs);
|
|
20669
20756
|
if (updatesState && evalContext.onDidUpdate) {
|
|
20670
|
-
evalContext.onDidUpdate(rootScope, rootScope.name, "function-call");
|
|
20757
|
+
void evalContext.onDidUpdate(rootScope, rootScope.name, "function-call");
|
|
20671
20758
|
}
|
|
20672
20759
|
setExprValue(expr, { value }, thread);
|
|
20673
20760
|
thisStack.push(value);
|
|
@@ -21839,62 +21926,99 @@ function useLongPress(elementRef, action2, delay2 = 500) {
|
|
|
21839
21926
|
};
|
|
21840
21927
|
}, [elementRef, action2, delay2]);
|
|
21841
21928
|
}
|
|
21842
|
-
const
|
|
21843
|
-
|
|
21844
|
-
|
|
21845
|
-
|
|
21846
|
-
|
|
21847
|
-
|
|
21848
|
-
|
|
21849
|
-
|
|
21850
|
-
|
|
21851
|
-
|
|
21852
|
-
|
|
21853
|
-
|
|
21854
|
-
|
|
21855
|
-
|
|
21856
|
-
const
|
|
21857
|
-
|
|
21858
|
-
|
|
21859
|
-
|
|
21860
|
-
|
|
21861
|
-
|
|
21862
|
-
|
|
21863
|
-
|
|
21864
|
-
|
|
21865
|
-
const slideInFromTop = "_slideInFromTop_11axh_1";
|
|
21866
|
-
const
|
|
21867
|
-
const
|
|
21868
|
-
const
|
|
21869
|
-
const
|
|
21870
|
-
const
|
|
21871
|
-
const
|
|
21872
|
-
const
|
|
21873
|
-
const
|
|
21874
|
-
const
|
|
21875
|
-
const
|
|
21876
|
-
const
|
|
21877
|
-
const
|
|
21929
|
+
const SelectContext = createContext({
|
|
21930
|
+
value: null,
|
|
21931
|
+
onChange: (selectedValue) => {
|
|
21932
|
+
},
|
|
21933
|
+
setOpen: (open) => {
|
|
21934
|
+
},
|
|
21935
|
+
setSelectedIndex: (index) => {
|
|
21936
|
+
},
|
|
21937
|
+
options: /* @__PURE__ */ new Set(),
|
|
21938
|
+
optionRenderer: void 0
|
|
21939
|
+
});
|
|
21940
|
+
function useSelect() {
|
|
21941
|
+
return useContext(SelectContext);
|
|
21942
|
+
}
|
|
21943
|
+
const OptionContext = createContext({
|
|
21944
|
+
onOptionAdd: () => {
|
|
21945
|
+
},
|
|
21946
|
+
onOptionRemove: () => {
|
|
21947
|
+
}
|
|
21948
|
+
});
|
|
21949
|
+
function useOption() {
|
|
21950
|
+
return useContext(OptionContext);
|
|
21951
|
+
}
|
|
21952
|
+
const themeVars$y = `'{"border-Select": "var(--xmlui-border-Select)", "borderHorizontal-Select": "var(--xmlui-borderHorizontal-Select, var(--xmlui-border-Select))", "borderVertical-Select": "var(--xmlui-borderVertical-Select, var(--xmlui-border-Select))", "borderLeft-Select": "var(--xmlui-borderLeft-Select, var(--xmlui-borderHorizontal-Select, var(--xmlui-border-Select)))", "borderRight-Select": "var(--xmlui-borderRight-Select, var(--xmlui-borderHorizontal-Select, var(--xmlui-border-Select)))", "borderTop-Select": "var(--xmlui-borderTop-Select, var(--xmlui-borderVertical-Select, var(--xmlui-border-Select)))", "borderBottom-Select": "var(--xmlui-borderBottom-Select, var(--xmlui-borderVertical-Select, var(--xmlui-border-Select)))", "borderWidth-Select": "var(--xmlui-borderWidth-Select)", "borderHorizontalWidth-Select": "var(--xmlui-borderHorizontalWidth-Select, var(--xmlui-borderWidth-Select))", "borderLeftWidth-Select": "var(--xmlui-borderLeftWidth-Select, var(--xmlui-borderHorizontalWidth-Select, var(--xmlui-borderWidth-Select)))", "borderRightWidth-Select": "var(--xmlui-borderRightWidth-Select, var(--xmlui-borderHorizontalWidth-Select, var(--xmlui-borderWidth-Select)))", "borderVerticalWidth-Select": "var(--xmlui-borderVerticalWidth-Select, var(--xmlui-borderWidth-Select))", "borderTopWidth-Select": "var(--xmlui-borderTopWidth-Select, var(--xmlui-borderVerticalWidth-Select, var(--xmlui-borderWidth-Select)))", "borderBottomWidth-Select": "var(--xmlui-borderBottomWidth-Select, var(--xmlui-borderVerticalWidth-Select, var(--xmlui-borderWidth-Select)))", "borderStyle-Select": "var(--xmlui-borderStyle-Select)", "borderHorizontalStyle-Select": "var(--xmlui-borderHorizontalStyle-Select, var(--xmlui-borderStyle-Select))", "borderLeftStyle-Select": "var(--xmlui-borderLeftStyle-Select, var(--xmlui-borderHorizontalStyle-Select, var(--xmlui-borderStyle-Select)))", "borderRightStyle-Select": "var(--xmlui-borderRightStyle-Select, var(--xmlui-borderHorizontalStyle-Select, var(--xmlui-borderStyle-Select)))", "borderVerticalStyle-Select": "var(--xmlui-borderVerticalStyle-Select, var(--xmlui-borderStyle-Select))", "borderTopStyle-Select": "var(--xmlui-borderTopStyle-Select, var(--xmlui-borderVerticalStyle-Select, var(--xmlui-borderStyle-Select)))", "borderBottomStyle-Select": "var(--xmlui-borderBottomStyle-Select, var(--xmlui-borderVerticalStyle-Select, var(--xmlui-borderStyle-Select)))", "borderColor-Select": "var(--xmlui-borderColor-Select)", "borderHorizontalColor-Select": "var(--xmlui-borderHorizontalColor-Select, var(--xmlui-borderColor-Select))", "borderLeftColor-Select": "var(--xmlui-borderLeftColor-Select, var(--xmlui-borderHorizontalColor-Select, var(--xmlui-borderColor-Select)))", "borderRightColor-Select": "var(--xmlui-borderRightColor-Select, var(--xmlui-borderHorizontalColor-Select, var(--xmlui-borderColor-Select)))", "borderVerticalColor-Select": "var(--xmlui-borderVerticalColor-Select, var(--xmlui-borderColor-Select))", "borderTopColor-Select": "var(--xmlui-borderTopColor-Select, var(--xmlui-borderVerticalColor-Select, var(--xmlui-borderColor-Select)))", "borderBottomColor-Select": "var(--xmlui-borderBottomColor-Select, var(--xmlui-borderVerticalColor-Select, var(--xmlui-borderColor-Select)))", "borderStartStartRadius-Select": "var(--xmlui-borderStartStartRadius-Select, var(--xmlui-borderRadius-Select))", "borderStartEndRadius-Select": "var(--xmlui-borderStartEndRadius-Select, var(--xmlui-borderRadius-Select))", "borderEndStartRadius-Select": "var(--xmlui-borderEndStartRadius-Select, var(--xmlui-borderRadius-Select))", "borderEndEndRadius-Select": "var(--xmlui-borderEndEndRadius-Select, var(--xmlui-borderRadius-Select))", "padding-Select": "var(--xmlui-padding-Select)", "paddingHorizontal-Select": "var(--xmlui-paddingHorizontal-Select, var(--xmlui-padding-Select))", "paddingVertical-Select": "var(--xmlui-paddingVertical-Select, var(--xmlui-padding-Select))", "paddingLeft-Select": "var(--xmlui-paddingLeft-Select, var(--xmlui-paddingHorizontal-Select, var(--xmlui-padding-Select)))", "paddingRight-Select": "var(--xmlui-paddingRight-Select, var(--xmlui-paddingHorizontal-Select, var(--xmlui-padding-Select)))", "paddingTop-Select": "var(--xmlui-paddingTop-Select, var(--xmlui-paddingVertical-Select, var(--xmlui-padding-Select)))", "paddingBottom-Select": "var(--xmlui-paddingBottom-Select, var(--xmlui-paddingVertical-Select, var(--xmlui-padding-Select)))", "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: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:fontSize-Select-default": "var(--xmlui-fontSize-Select-default)", "Input:backgroundColor-Select-default": "var(--xmlui-backgroundColor-Select-default)", "Input:boxShadow-Select-default": "var(--xmlui-boxShadow-Select-default)", "Input:textColor-Select-default": "var(--xmlui-textColor-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:textColor-placeholder-Select-default": "var(--xmlui-textColor-placeholder-Select-default)", "Input:fontSize-placeholder-Select-default": "var(--xmlui-fontSize-placeholder-Select-default)", "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:fontSize-Select-error": "var(--xmlui-fontSize-Select-error)", "Input:backgroundColor-Select-error": "var(--xmlui-backgroundColor-Select-error)", "Input:boxShadow-Select-error": "var(--xmlui-boxShadow-Select-error)", "Input:textColor-Select-error": "var(--xmlui-textColor-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:textColor-placeholder-Select-error": "var(--xmlui-textColor-placeholder-Select-error)", "Input:fontSize-placeholder-Select-error": "var(--xmlui-fontSize-placeholder-Select-error)", "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:fontSize-Select-warning": "var(--xmlui-fontSize-Select-warning)", "Input:backgroundColor-Select-warning": "var(--xmlui-backgroundColor-Select-warning)", "Input:boxShadow-Select-warning": "var(--xmlui-boxShadow-Select-warning)", "Input:textColor-Select-warning": "var(--xmlui-textColor-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:textColor-placeholder-Select-warning": "var(--xmlui-textColor-placeholder-Select-warning)", "Input:fontSize-placeholder-Select-warning": "var(--xmlui-fontSize-placeholder-Select-warning)", "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:fontSize-Select-success": "var(--xmlui-fontSize-Select-success)", "Input:backgroundColor-Select-success": "var(--xmlui-backgroundColor-Select-success)", "Input:boxShadow-Select-success": "var(--xmlui-boxShadow-Select-success)", "Input:textColor-Select-success": "var(--xmlui-textColor-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)", "Input:textColor-placeholder-Select-success": "var(--xmlui-textColor-placeholder-Select-success)", "Input:fontSize-placeholder-Select-success": "var(--xmlui-fontSize-placeholder-Select-success)", "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)", "Input:outlineWidth-Select--focus": "var(--xmlui-outlineWidth-Select--focus)", "Input:outlineColor-Select--focus": "var(--xmlui-outlineColor-Select--focus)", "Input:outlineStyle-Select--focus": "var(--xmlui-outlineStyle-Select--focus)", "Input:outlineOffset-Select--focus": "var(--xmlui-outlineOffset-Select--focus)", "Input:textColor-placeholder-Select": "var(--xmlui-textColor-placeholder-Select)", "paddingVertical-Select-badge": "var(--xmlui-paddingVertical-Select-badge)", "paddingHorizontal-Select-badge": "var(--xmlui-paddingHorizontal-Select-badge)", "borderRadius-Select-badge": "var(--xmlui-borderRadius-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: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--active": "var(--xmlui-backgroundColor-item-Select--active)", "backgroundColor-item-Select--hover": "var(--xmlui-backgroundColor-item-Select--hover)", "textColor-item-Select--disabled": "var(--xmlui-textColor-item-Select--disabled)", "opacity-text-item-Select--disabled": "var(--xmlui-opacity-text-item-Select--disabled)", "textColor-indicator-Select": "var(--xmlui-textColor-indicator-Select)"}'`;
|
|
21953
|
+
const selectTrigger = "_selectTrigger_1v71t_17";
|
|
21954
|
+
const error$8 = "_error_1v71t_54";
|
|
21955
|
+
const warning$9 = "_warning_1v71t_80";
|
|
21956
|
+
const valid$8 = "_valid_1v71t_106";
|
|
21957
|
+
const disabled$7 = "_disabled_1v71t_132";
|
|
21958
|
+
const focused$3 = "_focused_1v71t_139";
|
|
21959
|
+
const placeholder = "_placeholder_1v71t_145";
|
|
21960
|
+
const actions$1 = "_actions_1v71t_162";
|
|
21961
|
+
const action$1 = "_action_1v71t_162";
|
|
21962
|
+
const emptyList = "_emptyList_1v71t_173";
|
|
21963
|
+
const badgeListContainer = "_badgeListContainer_1v71t_185";
|
|
21964
|
+
const badgeList$1 = "_badgeList_1v71t_185";
|
|
21965
|
+
const inputWrapper$1 = "_inputWrapper_1v71t_198";
|
|
21966
|
+
const badge$1 = "_badge_1v71t_185";
|
|
21967
|
+
const selectContent = "_selectContent_1v71t_233";
|
|
21968
|
+
const command$1 = "_command_1v71t_241";
|
|
21969
|
+
const commandInputContainer = "_commandInputContainer_1v71t_246";
|
|
21970
|
+
const commandInput$1 = "_commandInput_1v71t_246";
|
|
21971
|
+
const commandList$1 = "_commandList_1v71t_265";
|
|
21972
|
+
const multiSelectOption = "_multiSelectOption_1v71t_272";
|
|
21973
|
+
const multiSelectOptionContent = "_multiSelectOptionContent_1v71t_286";
|
|
21974
|
+
const highlighted$1 = "_highlighted_1v71t_295";
|
|
21975
|
+
const disabledOption$1 = "_disabledOption_1v71t_301";
|
|
21976
|
+
const selectValue = "_selectValue_1v71t_316";
|
|
21977
|
+
const selectDropdownContent = "_selectDropdownContent_1v71t_331";
|
|
21978
|
+
const fadeIn = "_fadeIn_1v71t_1";
|
|
21979
|
+
const zoomIn = "_zoomIn_1v71t_1";
|
|
21980
|
+
const fadeOut = "_fadeOut_1v71t_1";
|
|
21981
|
+
const zoomOut = "_zoomOut_1v71t_1";
|
|
21982
|
+
const slideInFromTop = "_slideInFromTop_1v71t_1";
|
|
21983
|
+
const slideInFromRight = "_slideInFromRight_1v71t_1";
|
|
21984
|
+
const slideInFromLeft = "_slideInFromLeft_1v71t_1";
|
|
21985
|
+
const slideInFromBottom = "_slideInFromBottom_1v71t_1";
|
|
21986
|
+
const selectViewport = "_selectViewport_1v71t_364";
|
|
21987
|
+
const selectScrollUpButton = "_selectScrollUpButton_1v71t_368";
|
|
21988
|
+
const selectScrollDownButton = "_selectScrollDownButton_1v71t_376";
|
|
21989
|
+
const selectEmpty = "_selectEmpty_1v71t_384";
|
|
21990
|
+
const selectOption = "_selectOption_1v71t_397";
|
|
21991
|
+
const selectOptionContent = "_selectOptionContent_1v71t_420";
|
|
21992
|
+
const selectOptionIndicator = "_selectOptionIndicator_1v71t_434";
|
|
21993
|
+
const loading = "_loading_1v71t_444";
|
|
21994
|
+
const srOnly = "_srOnly_1v71t_447";
|
|
21878
21995
|
const styles$O = {
|
|
21879
21996
|
themeVars: themeVars$y,
|
|
21880
|
-
|
|
21997
|
+
selectTrigger,
|
|
21881
21998
|
error: error$8,
|
|
21882
21999
|
warning: warning$9,
|
|
21883
22000
|
valid: valid$8,
|
|
21884
|
-
|
|
22001
|
+
disabled: disabled$7,
|
|
22002
|
+
focused: focused$3,
|
|
22003
|
+
placeholder,
|
|
22004
|
+
actions: actions$1,
|
|
22005
|
+
action: action$1,
|
|
22006
|
+
emptyList,
|
|
21885
22007
|
badgeListContainer,
|
|
21886
22008
|
badgeList: badgeList$1,
|
|
22009
|
+
inputWrapper: inputWrapper$1,
|
|
21887
22010
|
badge: badge$1,
|
|
21888
|
-
|
|
21889
|
-
placeholder,
|
|
21890
|
-
emptyList,
|
|
21891
|
-
selectScrollUpButton,
|
|
21892
|
-
selectScrollDownButton,
|
|
22011
|
+
selectContent,
|
|
21893
22012
|
command: command$1,
|
|
21894
22013
|
commandInputContainer,
|
|
21895
22014
|
commandInput: commandInput$1,
|
|
21896
22015
|
commandList: commandList$1,
|
|
21897
|
-
|
|
22016
|
+
multiSelectOption,
|
|
22017
|
+
multiSelectOptionContent,
|
|
22018
|
+
highlighted: highlighted$1,
|
|
22019
|
+
disabledOption: disabledOption$1,
|
|
22020
|
+
selectValue,
|
|
22021
|
+
selectDropdownContent,
|
|
21898
22022
|
fadeIn,
|
|
21899
22023
|
zoomIn,
|
|
21900
22024
|
fadeOut,
|
|
@@ -21903,20 +22027,67 @@ const styles$O = {
|
|
|
21903
22027
|
slideInFromRight,
|
|
21904
22028
|
slideInFromLeft,
|
|
21905
22029
|
slideInFromBottom,
|
|
21906
|
-
multiComboboxOption,
|
|
21907
|
-
multiComboboxOptionContent,
|
|
21908
|
-
selectItem,
|
|
21909
|
-
selectItemContent,
|
|
21910
|
-
selectItemIndicator,
|
|
21911
22030
|
selectViewport,
|
|
22031
|
+
selectScrollUpButton,
|
|
22032
|
+
selectScrollDownButton,
|
|
21912
22033
|
selectEmpty,
|
|
22034
|
+
selectOption,
|
|
22035
|
+
selectOptionContent,
|
|
22036
|
+
selectOptionIndicator,
|
|
21913
22037
|
loading,
|
|
21914
22038
|
srOnly
|
|
21915
22039
|
};
|
|
21916
|
-
const
|
|
21917
|
-
function
|
|
21918
|
-
|
|
21919
|
-
}
|
|
22040
|
+
const SelectOption = forwardRef(
|
|
22041
|
+
function SelectOption2(option, ref) {
|
|
22042
|
+
const visibleContentRef = useRef(null);
|
|
22043
|
+
const { value, label: label2, enabled: enabled2 = true, children, className } = option;
|
|
22044
|
+
const { value: selectedValue, optionRenderer } = useSelect();
|
|
22045
|
+
const { onOptionRemove, onOptionAdd } = useOption();
|
|
22046
|
+
const opt = useMemo(() => {
|
|
22047
|
+
return {
|
|
22048
|
+
...option,
|
|
22049
|
+
label: label2 ?? "",
|
|
22050
|
+
keywords: [label2 ?? ""]
|
|
22051
|
+
};
|
|
22052
|
+
}, [option, label2]);
|
|
22053
|
+
useEffect(() => {
|
|
22054
|
+
onOptionAdd(opt);
|
|
22055
|
+
return () => onOptionRemove(opt);
|
|
22056
|
+
}, [opt, onOptionAdd, onOptionRemove]);
|
|
22057
|
+
return /* @__PURE__ */ jsxs(
|
|
22058
|
+
Item$1,
|
|
22059
|
+
{
|
|
22060
|
+
ref,
|
|
22061
|
+
className: classnames(className, styles$O.selectOption),
|
|
22062
|
+
value,
|
|
22063
|
+
textValue: label2,
|
|
22064
|
+
disabled: !enabled2,
|
|
22065
|
+
onClick: (event) => {
|
|
22066
|
+
event.stopPropagation();
|
|
22067
|
+
},
|
|
22068
|
+
"data-state": selectedValue === value && "checked",
|
|
22069
|
+
children: [
|
|
22070
|
+
/* @__PURE__ */ jsx("span", { style: { display: "none" }, children: /* @__PURE__ */ jsx(ItemText, { children: label2 }) }),
|
|
22071
|
+
children ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22072
|
+
/* @__PURE__ */ jsx("div", { className: styles$O.selectOptionContent, ref: visibleContentRef, children }),
|
|
22073
|
+
selectedValue === value && /* @__PURE__ */ jsx(ItemIndicator, { className: styles$O.selectOptionIndicator, children: /* @__PURE__ */ jsx(Icon$l, { name: "checkmark" }) })
|
|
22074
|
+
] }) : optionRenderer ? /* @__PURE__ */ jsx("div", { className: styles$O.selectOptionContent, ref: visibleContentRef, children: optionRenderer(
|
|
22075
|
+
{
|
|
22076
|
+
label: label2,
|
|
22077
|
+
value,
|
|
22078
|
+
enabled: enabled2
|
|
22079
|
+
},
|
|
22080
|
+
selectedValue,
|
|
22081
|
+
false
|
|
22082
|
+
) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22083
|
+
/* @__PURE__ */ jsx("div", { className: styles$O.selectOptionContent, ref: visibleContentRef, children: label2 }),
|
|
22084
|
+
selectedValue === value && /* @__PURE__ */ jsx(ItemIndicator, { className: styles$O.selectItemIndicator, children: /* @__PURE__ */ jsx(Icon$l, { name: "checkmark" }) })
|
|
22085
|
+
] })
|
|
22086
|
+
]
|
|
22087
|
+
}
|
|
22088
|
+
);
|
|
22089
|
+
}
|
|
22090
|
+
);
|
|
21920
22091
|
const OptionTypeContext = React__default.createContext(null);
|
|
21921
22092
|
function useOptionType() {
|
|
21922
22093
|
return React__default.useContext(OptionTypeContext);
|
|
@@ -21927,15 +22098,6 @@ function OptionTypeProvider({
|
|
|
21927
22098
|
}) {
|
|
21928
22099
|
return /* @__PURE__ */ jsx(OptionTypeContext.Provider, { value: Component, children });
|
|
21929
22100
|
}
|
|
21930
|
-
const OptionContext = createContext({
|
|
21931
|
-
onOptionAdd: () => {
|
|
21932
|
-
},
|
|
21933
|
-
onOptionRemove: () => {
|
|
21934
|
-
}
|
|
21935
|
-
});
|
|
21936
|
-
function useOption() {
|
|
21937
|
-
return useContext(OptionContext);
|
|
21938
|
-
}
|
|
21939
22101
|
function HiddenOption(option) {
|
|
21940
22102
|
const { label: label2 } = option;
|
|
21941
22103
|
const { onOptionRemove, onOptionAdd } = useOption();
|
|
@@ -21954,18 +22116,6 @@ function HiddenOption(option) {
|
|
|
21954
22116
|
}, [opt, onOptionAdd, onOptionRemove]);
|
|
21955
22117
|
return /* @__PURE__ */ jsx("div", { ref: (el) => setNode(el), style: { display: "none" }, children: option.children });
|
|
21956
22118
|
}
|
|
21957
|
-
const defaultProps$L = {
|
|
21958
|
-
enabled: true,
|
|
21959
|
-
placeholder: "",
|
|
21960
|
-
autoFocus: false,
|
|
21961
|
-
searchable: false,
|
|
21962
|
-
multiSelect: false,
|
|
21963
|
-
required: false,
|
|
21964
|
-
inProgress: false,
|
|
21965
|
-
inProgressNotificationMessage: "",
|
|
21966
|
-
readOnly: false,
|
|
21967
|
-
validationStatus: "none"
|
|
21968
|
-
};
|
|
21969
22119
|
const SimpleSelect = forwardRef(
|
|
21970
22120
|
function SimpleSelect2(props, forwardedRef) {
|
|
21971
22121
|
const { root: root2 } = useTheme();
|
|
@@ -22031,25 +22181,24 @@ const SimpleSelect = forwardRef(
|
|
|
22031
22181
|
"div",
|
|
22032
22182
|
{
|
|
22033
22183
|
className: classnames(styles$O.selectValue, {
|
|
22034
|
-
[styles$O.selectValue]: value !== void 0,
|
|
22035
22184
|
[styles$O.placeholder]: value === void 0
|
|
22036
22185
|
}),
|
|
22037
22186
|
children: selectedOption ? selectedOption.label : readOnly2 ? "" : placeholder2
|
|
22038
22187
|
}
|
|
22039
22188
|
),
|
|
22040
|
-
/* @__PURE__ */ jsx(
|
|
22189
|
+
/* @__PURE__ */ jsx("span", { className: styles$O.action, children: /* @__PURE__ */ jsx(Icon$l, { name: "chevrondown" }) })
|
|
22041
22190
|
]
|
|
22042
22191
|
}
|
|
22043
22192
|
),
|
|
22044
22193
|
/* @__PURE__ */ jsx(Portal, { container: root2, children: /* @__PURE__ */ jsxs(
|
|
22045
22194
|
Content,
|
|
22046
22195
|
{
|
|
22047
|
-
className: styles$O.
|
|
22196
|
+
className: styles$O.selectDropdownContent,
|
|
22048
22197
|
position: "popper",
|
|
22049
22198
|
style: { maxHeight: height, minWidth: width },
|
|
22050
22199
|
children: [
|
|
22051
22200
|
/* @__PURE__ */ jsx(ScrollUpButton, { className: styles$O.selectScrollUpButton, children: /* @__PURE__ */ jsx(Icon$l, { name: "chevronup" }) }),
|
|
22052
|
-
/* @__PURE__ */ jsxs(
|
|
22201
|
+
/* @__PURE__ */ jsxs(Viewport, { className: styles$O.selectViewport, role: "listbox", children: [
|
|
22053
22202
|
children,
|
|
22054
22203
|
optionsArray.length === 0 && emptyListNode
|
|
22055
22204
|
] }),
|
|
@@ -22060,6 +22209,148 @@ const SimpleSelect = forwardRef(
|
|
|
22060
22209
|
] });
|
|
22061
22210
|
}
|
|
22062
22211
|
);
|
|
22212
|
+
const MultiSelectOption = forwardRef(function MultiSelectOption2(option, forwardedRef) {
|
|
22213
|
+
const id = useId();
|
|
22214
|
+
const {
|
|
22215
|
+
label: label2,
|
|
22216
|
+
value,
|
|
22217
|
+
enabled: enabled2 = true,
|
|
22218
|
+
keywords,
|
|
22219
|
+
readOnly: readOnly2,
|
|
22220
|
+
children,
|
|
22221
|
+
isHighlighted = false,
|
|
22222
|
+
itemIndex
|
|
22223
|
+
} = option;
|
|
22224
|
+
const {
|
|
22225
|
+
value: selectedValue,
|
|
22226
|
+
onChange,
|
|
22227
|
+
multiSelect,
|
|
22228
|
+
setOpen,
|
|
22229
|
+
setSelectedIndex,
|
|
22230
|
+
optionRenderer
|
|
22231
|
+
} = useSelect();
|
|
22232
|
+
const selected2 = useMemo(() => {
|
|
22233
|
+
return Array.isArray(selectedValue) && multiSelect ? selectedValue.map((v) => String(v)).includes(value) : String(selectedValue) === String(value);
|
|
22234
|
+
}, [selectedValue, value, multiSelect]);
|
|
22235
|
+
const handleClick = () => {
|
|
22236
|
+
if (readOnly2) {
|
|
22237
|
+
setOpen(false);
|
|
22238
|
+
return;
|
|
22239
|
+
}
|
|
22240
|
+
if (enabled2) {
|
|
22241
|
+
onChange(value);
|
|
22242
|
+
}
|
|
22243
|
+
};
|
|
22244
|
+
return /* @__PURE__ */ jsx(
|
|
22245
|
+
"div",
|
|
22246
|
+
{
|
|
22247
|
+
id,
|
|
22248
|
+
ref: forwardedRef,
|
|
22249
|
+
role: "option",
|
|
22250
|
+
"aria-disabled": !enabled2,
|
|
22251
|
+
"aria-selected": selected2,
|
|
22252
|
+
className: classnames(styles$O.multiSelectOption, {
|
|
22253
|
+
[styles$O.disabledOption]: !enabled2,
|
|
22254
|
+
[styles$O.highlighted]: isHighlighted
|
|
22255
|
+
}),
|
|
22256
|
+
onMouseDown: (e) => {
|
|
22257
|
+
e.preventDefault();
|
|
22258
|
+
e.stopPropagation();
|
|
22259
|
+
},
|
|
22260
|
+
onMouseEnter: () => {
|
|
22261
|
+
if (itemIndex !== void 0 && setSelectedIndex && enabled2) {
|
|
22262
|
+
setSelectedIndex(itemIndex);
|
|
22263
|
+
}
|
|
22264
|
+
},
|
|
22265
|
+
onClick: handleClick,
|
|
22266
|
+
"data-state": selected2 ? "checked" : void 0,
|
|
22267
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$O.multiSelectOptionContent, children: optionRenderer ? optionRenderer({ label: label2, value, enabled: enabled2, keywords }, selectedValue, false) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22268
|
+
children || label2,
|
|
22269
|
+
selected2 && /* @__PURE__ */ jsx(Icon$l, { name: "checkmark" })
|
|
22270
|
+
] }) })
|
|
22271
|
+
}
|
|
22272
|
+
);
|
|
22273
|
+
});
|
|
22274
|
+
const defaultProps$L = {
|
|
22275
|
+
enabled: true,
|
|
22276
|
+
placeholder: "",
|
|
22277
|
+
autoFocus: false,
|
|
22278
|
+
searchable: false,
|
|
22279
|
+
multiSelect: false,
|
|
22280
|
+
required: false,
|
|
22281
|
+
inProgress: false,
|
|
22282
|
+
inProgressNotificationMessage: "",
|
|
22283
|
+
readOnly: false,
|
|
22284
|
+
validationStatus: "none"
|
|
22285
|
+
};
|
|
22286
|
+
const SelectTriggerValue = ({
|
|
22287
|
+
value,
|
|
22288
|
+
placeholder: placeholder2,
|
|
22289
|
+
readOnly: readOnly2,
|
|
22290
|
+
multiSelect,
|
|
22291
|
+
options: options2,
|
|
22292
|
+
valueRenderer,
|
|
22293
|
+
toggleOption
|
|
22294
|
+
}) => {
|
|
22295
|
+
if (multiSelect) {
|
|
22296
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
22297
|
+
return /* @__PURE__ */ jsx("div", { className: styles$O.badgeListContainer, children: /* @__PURE__ */ jsx("div", { className: styles$O.badgeList, children: value.map(
|
|
22298
|
+
(v) => {
|
|
22299
|
+
var _a2;
|
|
22300
|
+
return valueRenderer ? valueRenderer(
|
|
22301
|
+
Array.from(options2).find((o) => o.value === `${v}`),
|
|
22302
|
+
() => {
|
|
22303
|
+
toggleOption(v);
|
|
22304
|
+
}
|
|
22305
|
+
) : /* @__PURE__ */ jsxs("span", { className: styles$O.badge, children: [
|
|
22306
|
+
(_a2 = Array.from(options2).find((o) => o.value === `${v}`)) == null ? void 0 : _a2.label,
|
|
22307
|
+
/* @__PURE__ */ jsx(
|
|
22308
|
+
Icon$l,
|
|
22309
|
+
{
|
|
22310
|
+
name: "close",
|
|
22311
|
+
size: "sm",
|
|
22312
|
+
onClick: (event) => {
|
|
22313
|
+
event.stopPropagation();
|
|
22314
|
+
toggleOption(v);
|
|
22315
|
+
}
|
|
22316
|
+
}
|
|
22317
|
+
)
|
|
22318
|
+
] }, v);
|
|
22319
|
+
}
|
|
22320
|
+
) }) });
|
|
22321
|
+
}
|
|
22322
|
+
return /* @__PURE__ */ jsx("span", { placeholder: placeholder2, className: styles$O.placeholder, children: placeholder2 });
|
|
22323
|
+
}
|
|
22324
|
+
if (value !== void 0 && value !== null && value !== "") {
|
|
22325
|
+
const selectedOption = Array.from(options2).find((o) => o.value === value);
|
|
22326
|
+
return /* @__PURE__ */ jsx("div", { className: styles$O.selectValue, children: selectedOption == null ? void 0 : selectedOption.label });
|
|
22327
|
+
}
|
|
22328
|
+
return /* @__PURE__ */ jsx("div", { "aria-placeholder": placeholder2, className: styles$O.placeholder, children: readOnly2 ? "" : placeholder2 || "" });
|
|
22329
|
+
};
|
|
22330
|
+
const SelectTriggerActions = ({
|
|
22331
|
+
value,
|
|
22332
|
+
multiSelect,
|
|
22333
|
+
enabled: enabled2,
|
|
22334
|
+
readOnly: readOnly2,
|
|
22335
|
+
clearValue,
|
|
22336
|
+
showChevron = true
|
|
22337
|
+
}) => {
|
|
22338
|
+
const hasValue = multiSelect ? Array.isArray(value) && value.length > 0 : value !== void 0 && value !== null && value !== "";
|
|
22339
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$O.actions, children: [
|
|
22340
|
+
hasValue && enabled2 && !readOnly2 && /* @__PURE__ */ jsx(
|
|
22341
|
+
"span",
|
|
22342
|
+
{
|
|
22343
|
+
className: styles$O.action,
|
|
22344
|
+
onClick: (event) => {
|
|
22345
|
+
event.stopPropagation();
|
|
22346
|
+
clearValue();
|
|
22347
|
+
},
|
|
22348
|
+
children: /* @__PURE__ */ jsx(Icon$l, { name: "close" })
|
|
22349
|
+
}
|
|
22350
|
+
),
|
|
22351
|
+
showChevron && /* @__PURE__ */ jsx("span", { className: styles$O.action, children: /* @__PURE__ */ jsx(Icon$l, { name: "chevrondown" }) })
|
|
22352
|
+
] });
|
|
22353
|
+
};
|
|
22063
22354
|
const Select = forwardRef(function Select2({
|
|
22064
22355
|
// Basic props
|
|
22065
22356
|
id,
|
|
@@ -22095,7 +22386,6 @@ const Select = forwardRef(function Select2({
|
|
|
22095
22386
|
children,
|
|
22096
22387
|
...rest
|
|
22097
22388
|
}, forwardedRef) {
|
|
22098
|
-
var _a2;
|
|
22099
22389
|
const [referenceElement, setReferenceElement] = useState(null);
|
|
22100
22390
|
const [open, setOpen] = useState(false);
|
|
22101
22391
|
const [width, setWidth] = useState(0);
|
|
@@ -22103,22 +22393,40 @@ const Select = forwardRef(function Select2({
|
|
|
22103
22393
|
const { root: root2 } = useTheme();
|
|
22104
22394
|
const [options2, setOptions] = useState(/* @__PURE__ */ new Set());
|
|
22105
22395
|
const isInForm = useIsInsideForm();
|
|
22396
|
+
const [searchTerm, setSearchTerm] = useState("");
|
|
22397
|
+
const [selectedIndex, setSelectedIndex] = useState(-1);
|
|
22398
|
+
const filteredOptions = useMemo(() => {
|
|
22399
|
+
if (!searchTerm || searchTerm.trim() === "") {
|
|
22400
|
+
return Array.from(options2);
|
|
22401
|
+
}
|
|
22402
|
+
const searchLower = searchTerm.toLowerCase();
|
|
22403
|
+
return Array.from(options2).filter((option) => {
|
|
22404
|
+
const extendedValue = option.value + " " + option.label + " " + (option.keywords || []).join(" ");
|
|
22405
|
+
return extendedValue.toLowerCase().includes(searchLower);
|
|
22406
|
+
});
|
|
22407
|
+
}, [options2, searchTerm]);
|
|
22408
|
+
useEffect(() => {
|
|
22409
|
+
if (!open) {
|
|
22410
|
+
setSelectedIndex(-1);
|
|
22411
|
+
setSearchTerm("");
|
|
22412
|
+
}
|
|
22413
|
+
}, [open]);
|
|
22106
22414
|
useEffect(() => {
|
|
22107
22415
|
if (initialValue !== void 0) {
|
|
22108
22416
|
updateState({ value: initialValue }, { initial: true });
|
|
22109
22417
|
}
|
|
22110
22418
|
}, [initialValue, updateState]);
|
|
22111
22419
|
useEffect(() => {
|
|
22112
|
-
var
|
|
22420
|
+
var _a2;
|
|
22113
22421
|
const current = referenceElement;
|
|
22114
|
-
(
|
|
22422
|
+
(_a2 = observer.current) == null ? void 0 : _a2.disconnect();
|
|
22115
22423
|
if (current) {
|
|
22116
22424
|
observer.current = new ResizeObserver(() => setWidth(current.clientWidth));
|
|
22117
22425
|
observer.current.observe(current);
|
|
22118
22426
|
}
|
|
22119
22427
|
return () => {
|
|
22120
|
-
var
|
|
22121
|
-
(
|
|
22428
|
+
var _a3;
|
|
22429
|
+
(_a3 = observer.current) == null ? void 0 : _a3.disconnect();
|
|
22122
22430
|
};
|
|
22123
22431
|
}, [referenceElement]);
|
|
22124
22432
|
const toggleOption = useCallback(
|
|
@@ -22137,6 +22445,84 @@ const Select = forwardRef(function Select2({
|
|
|
22137
22445
|
updateState({ value: newValue });
|
|
22138
22446
|
onDidChange(newValue);
|
|
22139
22447
|
}, [multiSelect, updateState, onDidChange]);
|
|
22448
|
+
const findNextEnabledIndex = useCallback(
|
|
22449
|
+
(currentIndex) => {
|
|
22450
|
+
for (let i = currentIndex + 1; i < filteredOptions.length; i++) {
|
|
22451
|
+
const item2 = filteredOptions[i];
|
|
22452
|
+
if (item2.enabled !== false) {
|
|
22453
|
+
return i;
|
|
22454
|
+
}
|
|
22455
|
+
}
|
|
22456
|
+
for (let i = 0; i <= currentIndex; i++) {
|
|
22457
|
+
const item2 = filteredOptions[i];
|
|
22458
|
+
if (item2.enabled !== false) {
|
|
22459
|
+
return i;
|
|
22460
|
+
}
|
|
22461
|
+
}
|
|
22462
|
+
return -1;
|
|
22463
|
+
},
|
|
22464
|
+
[filteredOptions]
|
|
22465
|
+
);
|
|
22466
|
+
const findPreviousEnabledIndex = useCallback(
|
|
22467
|
+
(currentIndex) => {
|
|
22468
|
+
for (let i = currentIndex - 1; i >= 0; i--) {
|
|
22469
|
+
const item2 = filteredOptions[i];
|
|
22470
|
+
if (item2.enabled !== false) {
|
|
22471
|
+
return i;
|
|
22472
|
+
}
|
|
22473
|
+
}
|
|
22474
|
+
for (let i = filteredOptions.length - 1; i >= currentIndex; i--) {
|
|
22475
|
+
const item2 = filteredOptions[i];
|
|
22476
|
+
if (item2.enabled !== false) {
|
|
22477
|
+
return i;
|
|
22478
|
+
}
|
|
22479
|
+
}
|
|
22480
|
+
return -1;
|
|
22481
|
+
},
|
|
22482
|
+
[filteredOptions]
|
|
22483
|
+
);
|
|
22484
|
+
const handleKeyDown = useCallback(
|
|
22485
|
+
(event) => {
|
|
22486
|
+
if (!open) return;
|
|
22487
|
+
switch (event.key) {
|
|
22488
|
+
case "ArrowDown":
|
|
22489
|
+
event.preventDefault();
|
|
22490
|
+
setSelectedIndex((prev) => {
|
|
22491
|
+
const nextIndex = findNextEnabledIndex(prev);
|
|
22492
|
+
return nextIndex !== -1 ? nextIndex : prev;
|
|
22493
|
+
});
|
|
22494
|
+
break;
|
|
22495
|
+
case "ArrowUp":
|
|
22496
|
+
event.preventDefault();
|
|
22497
|
+
setSelectedIndex((prev) => {
|
|
22498
|
+
const prevIndex = findPreviousEnabledIndex(prev);
|
|
22499
|
+
return prevIndex !== -1 ? prevIndex : prev;
|
|
22500
|
+
});
|
|
22501
|
+
break;
|
|
22502
|
+
case "Enter":
|
|
22503
|
+
event.preventDefault();
|
|
22504
|
+
if (selectedIndex >= 0 && selectedIndex < filteredOptions.length) {
|
|
22505
|
+
const selectedItem = filteredOptions[selectedIndex];
|
|
22506
|
+
if (selectedItem.enabled !== false) {
|
|
22507
|
+
toggleOption(selectedItem.value);
|
|
22508
|
+
}
|
|
22509
|
+
}
|
|
22510
|
+
break;
|
|
22511
|
+
case "Escape":
|
|
22512
|
+
event.preventDefault();
|
|
22513
|
+
setOpen(false);
|
|
22514
|
+
break;
|
|
22515
|
+
}
|
|
22516
|
+
},
|
|
22517
|
+
[
|
|
22518
|
+
open,
|
|
22519
|
+
selectedIndex,
|
|
22520
|
+
filteredOptions,
|
|
22521
|
+
toggleOption,
|
|
22522
|
+
findNextEnabledIndex,
|
|
22523
|
+
findPreviousEnabledIndex
|
|
22524
|
+
]
|
|
22525
|
+
);
|
|
22140
22526
|
const focus = useCallback(() => {
|
|
22141
22527
|
referenceElement == null ? void 0 : referenceElement.focus();
|
|
22142
22528
|
}, [referenceElement]);
|
|
@@ -22188,14 +22574,15 @@ const Select = forwardRef(function Select2({
|
|
|
22188
22574
|
value,
|
|
22189
22575
|
onChange: toggleOption,
|
|
22190
22576
|
setOpen,
|
|
22577
|
+
setSelectedIndex,
|
|
22191
22578
|
options: options2,
|
|
22192
22579
|
optionRenderer
|
|
22193
22580
|
}),
|
|
22194
|
-
[multiSelect, toggleOption, value, options2]
|
|
22581
|
+
[multiSelect, toggleOption, value, options2, optionRenderer]
|
|
22195
22582
|
);
|
|
22196
22583
|
return /* @__PURE__ */ jsx(SelectContext.Provider, { value: selectContextValue, children: /* @__PURE__ */ jsx(OptionContext.Provider, { value: optionContextValue, children: searchable || multiSelect ? /* @__PURE__ */ jsxs(OptionTypeProvider, { Component: HiddenOption, children: [
|
|
22197
22584
|
/* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, modal: false, children: [
|
|
22198
|
-
/* @__PURE__ */
|
|
22585
|
+
/* @__PURE__ */ jsxs(
|
|
22199
22586
|
PopoverTrigger,
|
|
22200
22587
|
{
|
|
22201
22588
|
...rest,
|
|
@@ -22221,45 +22608,30 @@ const Select = forwardRef(function Select2({
|
|
|
22221
22608
|
className
|
|
22222
22609
|
),
|
|
22223
22610
|
autoFocus,
|
|
22224
|
-
children:
|
|
22225
|
-
|
|
22226
|
-
|
|
22227
|
-
|
|
22228
|
-
|
|
22229
|
-
|
|
22230
|
-
|
|
22231
|
-
|
|
22232
|
-
|
|
22233
|
-
|
|
22234
|
-
|
|
22235
|
-
/* @__PURE__ */ jsx(
|
|
22236
|
-
Icon$l,
|
|
22237
|
-
{
|
|
22238
|
-
name: "close",
|
|
22239
|
-
size: "sm",
|
|
22240
|
-
onClick: (event) => {
|
|
22241
|
-
event.stopPropagation();
|
|
22242
|
-
toggleOption(v);
|
|
22243
|
-
}
|
|
22244
|
-
}
|
|
22245
|
-
)
|
|
22246
|
-
] }, v);
|
|
22611
|
+
children: [
|
|
22612
|
+
/* @__PURE__ */ jsx(
|
|
22613
|
+
SelectTriggerValue,
|
|
22614
|
+
{
|
|
22615
|
+
value,
|
|
22616
|
+
placeholder: placeholder2,
|
|
22617
|
+
readOnly: readOnly2,
|
|
22618
|
+
multiSelect,
|
|
22619
|
+
options: options2,
|
|
22620
|
+
valueRenderer,
|
|
22621
|
+
toggleOption
|
|
22247
22622
|
}
|
|
22248
|
-
)
|
|
22249
|
-
/* @__PURE__ */
|
|
22250
|
-
|
|
22251
|
-
|
|
22252
|
-
|
|
22253
|
-
|
|
22254
|
-
|
|
22255
|
-
|
|
22256
|
-
|
|
22257
|
-
|
|
22258
|
-
|
|
22259
|
-
|
|
22260
|
-
/* @__PURE__ */ jsx(Icon$l, { name: "chevrondown" })
|
|
22261
|
-
] })
|
|
22262
|
-
] })
|
|
22623
|
+
),
|
|
22624
|
+
/* @__PURE__ */ jsx(
|
|
22625
|
+
SelectTriggerActions,
|
|
22626
|
+
{
|
|
22627
|
+
value,
|
|
22628
|
+
multiSelect,
|
|
22629
|
+
enabled: enabled2,
|
|
22630
|
+
readOnly: readOnly2,
|
|
22631
|
+
clearValue
|
|
22632
|
+
}
|
|
22633
|
+
)
|
|
22634
|
+
]
|
|
22263
22635
|
}
|
|
22264
22636
|
),
|
|
22265
22637
|
open && /* @__PURE__ */ jsx(Portal$1, { container: root2, children: /* @__PURE__ */ jsx(FocusScope, { asChild: true, loop: true, trapped: true, children: /* @__PURE__ */ jsx(
|
|
@@ -22267,50 +22639,40 @@ const Select = forwardRef(function Select2({
|
|
|
22267
22639
|
{
|
|
22268
22640
|
style: { minWidth: width, height: dropdownHeight },
|
|
22269
22641
|
className: styles$O.selectContent,
|
|
22270
|
-
|
|
22271
|
-
|
|
22272
|
-
{
|
|
22273
|
-
|
|
22274
|
-
|
|
22275
|
-
|
|
22276
|
-
|
|
22277
|
-
|
|
22278
|
-
|
|
22642
|
+
onKeyDown: handleKeyDown,
|
|
22643
|
+
children: /* @__PURE__ */ jsxs("div", { className: styles$O.command, children: [
|
|
22644
|
+
searchable ? /* @__PURE__ */ jsxs("div", { className: styles$O.commandInputContainer, children: [
|
|
22645
|
+
/* @__PURE__ */ jsx(Icon$l, { name: "search" }),
|
|
22646
|
+
/* @__PURE__ */ jsx(
|
|
22647
|
+
"input",
|
|
22648
|
+
{
|
|
22649
|
+
role: "combobox",
|
|
22650
|
+
className: classnames(styles$O.commandInput),
|
|
22651
|
+
placeholder: "Search...",
|
|
22652
|
+
value: searchTerm,
|
|
22653
|
+
onChange: (e) => setSearchTerm(e.target.value),
|
|
22654
|
+
autoFocus: true
|
|
22279
22655
|
}
|
|
22280
|
-
|
|
22281
|
-
|
|
22282
|
-
|
|
22283
|
-
|
|
22284
|
-
|
|
22285
|
-
|
|
22286
|
-
|
|
22287
|
-
|
|
22288
|
-
|
|
22289
|
-
|
|
22290
|
-
|
|
22291
|
-
|
|
22292
|
-
|
|
22293
|
-
|
|
22294
|
-
|
|
22295
|
-
|
|
22296
|
-
|
|
22297
|
-
|
|
22298
|
-
|
|
22299
|
-
|
|
22300
|
-
{
|
|
22301
|
-
readOnly: readOnly2,
|
|
22302
|
-
value: value2,
|
|
22303
|
-
label: label2,
|
|
22304
|
-
enabled: enabled22,
|
|
22305
|
-
keywords
|
|
22306
|
-
},
|
|
22307
|
-
value2
|
|
22308
|
-
)),
|
|
22309
|
-
!inProgress && /* @__PURE__ */ jsx(CommandEmpty, { children: emptyListNode })
|
|
22310
|
-
] })
|
|
22311
|
-
]
|
|
22312
|
-
}
|
|
22313
|
-
)
|
|
22656
|
+
)
|
|
22657
|
+
] }) : /* @__PURE__ */ jsx("button", { autoFocus: true, "aria-hidden": "true", className: styles$O.srOnly }),
|
|
22658
|
+
/* @__PURE__ */ jsxs("div", { role: "listbox", className: styles$O.commandList, children: [
|
|
22659
|
+
inProgress && /* @__PURE__ */ jsx("div", { className: styles$O.loading, children: inProgressNotificationMessage }),
|
|
22660
|
+
filteredOptions.map(({ value: value2, label: label2, enabled: enabled22, keywords }, index) => /* @__PURE__ */ jsx(
|
|
22661
|
+
MultiSelectOption,
|
|
22662
|
+
{
|
|
22663
|
+
readOnly: readOnly2,
|
|
22664
|
+
value: value2,
|
|
22665
|
+
label: label2,
|
|
22666
|
+
enabled: enabled22,
|
|
22667
|
+
keywords,
|
|
22668
|
+
isHighlighted: selectedIndex === index,
|
|
22669
|
+
itemIndex: index
|
|
22670
|
+
},
|
|
22671
|
+
value2
|
|
22672
|
+
)),
|
|
22673
|
+
!inProgress && filteredOptions.length === 0 && /* @__PURE__ */ jsx("div", { children: emptyListNode })
|
|
22674
|
+
] })
|
|
22675
|
+
] })
|
|
22314
22676
|
}
|
|
22315
22677
|
) }) })
|
|
22316
22678
|
] }),
|
|
@@ -22341,104 +22703,6 @@ const Select = forwardRef(function Select2({
|
|
|
22341
22703
|
children
|
|
22342
22704
|
) }) }) });
|
|
22343
22705
|
});
|
|
22344
|
-
const ComboboxOption = forwardRef(function Combobox(option, forwardedRef) {
|
|
22345
|
-
const id = useId();
|
|
22346
|
-
const { label: label2, value, enabled: enabled2 = true, keywords, readOnly: readOnly2, children } = option;
|
|
22347
|
-
const { value: selectedValue, onChange, multiSelect, setOpen, optionRenderer } = useSelect();
|
|
22348
|
-
const selected2 = useMemo(() => {
|
|
22349
|
-
return Array.isArray(selectedValue) && multiSelect ? selectedValue.map((v) => String(v)).includes(value) : String(selectedValue) === String(value);
|
|
22350
|
-
}, [selectedValue, value, multiSelect]);
|
|
22351
|
-
return /* @__PURE__ */ jsx(
|
|
22352
|
-
CommandItem,
|
|
22353
|
-
{
|
|
22354
|
-
id,
|
|
22355
|
-
ref: forwardedRef,
|
|
22356
|
-
disabled: !enabled2,
|
|
22357
|
-
value,
|
|
22358
|
-
className: styles$O.multiComboboxOption,
|
|
22359
|
-
onSelect: () => {
|
|
22360
|
-
if (readOnly2) {
|
|
22361
|
-
setOpen(false);
|
|
22362
|
-
return;
|
|
22363
|
-
}
|
|
22364
|
-
onChange(value);
|
|
22365
|
-
},
|
|
22366
|
-
onClick: (event) => {
|
|
22367
|
-
event.stopPropagation();
|
|
22368
|
-
},
|
|
22369
|
-
"data-state": selected2 ? "checked" : void 0,
|
|
22370
|
-
keywords: [...keywords, label2],
|
|
22371
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$O.multiComboboxOptionContent, children: optionRenderer ? optionRenderer({ label: label2, value, enabled: enabled2, keywords }, selectedValue, false) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22372
|
-
children || label2,
|
|
22373
|
-
selected2 && /* @__PURE__ */ jsx(Icon$l, { name: "checkmark" })
|
|
22374
|
-
] }) })
|
|
22375
|
-
},
|
|
22376
|
-
id
|
|
22377
|
-
);
|
|
22378
|
-
});
|
|
22379
|
-
const SelectOption = React__default.forwardRef(
|
|
22380
|
-
(option, ref) => {
|
|
22381
|
-
var _a2;
|
|
22382
|
-
const visibleContentRef = useRef(null);
|
|
22383
|
-
const { value, label: label2, enabled: enabled2 = true, children, className } = option;
|
|
22384
|
-
const { value: selectedValue, optionRenderer } = useSelect();
|
|
22385
|
-
const { onOptionRemove, onOptionAdd } = useOption();
|
|
22386
|
-
const opt = useMemo(() => {
|
|
22387
|
-
var _a3, _b;
|
|
22388
|
-
return {
|
|
22389
|
-
...option,
|
|
22390
|
-
label: label2 ?? ((_a3 = visibleContentRef.current) == null ? void 0 : _a3.textContent) ?? "",
|
|
22391
|
-
keywords: [label2 ?? ((_b = visibleContentRef.current) == null ? void 0 : _b.textContent) ?? ""]
|
|
22392
|
-
// Store the rendered ReactNode for dropdown display
|
|
22393
|
-
};
|
|
22394
|
-
}, [option, label2, visibleContentRef.current]);
|
|
22395
|
-
useEffect(() => {
|
|
22396
|
-
onOptionAdd(opt);
|
|
22397
|
-
return () => onOptionRemove(opt);
|
|
22398
|
-
}, [opt, onOptionAdd, onOptionRemove]);
|
|
22399
|
-
return /* @__PURE__ */ jsxs(
|
|
22400
|
-
Item$1,
|
|
22401
|
-
{
|
|
22402
|
-
ref,
|
|
22403
|
-
className: classnames(styles$O.selectItem, className),
|
|
22404
|
-
value,
|
|
22405
|
-
textValue: label2 || ((_a2 = visibleContentRef.current) == null ? void 0 : _a2.textContent),
|
|
22406
|
-
disabled: !enabled2,
|
|
22407
|
-
onClick: (event) => {
|
|
22408
|
-
event.stopPropagation();
|
|
22409
|
-
},
|
|
22410
|
-
onMouseEnter: (event) => {
|
|
22411
|
-
const target2 = event.currentTarget;
|
|
22412
|
-
target2.setAttribute("data-highlighted", "");
|
|
22413
|
-
},
|
|
22414
|
-
onMouseLeave: (event) => {
|
|
22415
|
-
const target2 = event.currentTarget;
|
|
22416
|
-
target2.removeAttribute("data-highlighted");
|
|
22417
|
-
},
|
|
22418
|
-
"data-state": selectedValue === value && "checked",
|
|
22419
|
-
children: [
|
|
22420
|
-
/* @__PURE__ */ jsx("span", { style: { display: "none" }, children: /* @__PURE__ */ jsx(ItemText, { children: label2 }) }),
|
|
22421
|
-
children ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22422
|
-
/* @__PURE__ */ jsx("div", { className: styles$O.selectItemContent, ref: visibleContentRef, children }),
|
|
22423
|
-
selectedValue === value && /* @__PURE__ */ jsx(ItemIndicator, { className: styles$O.selectItemIndicator, children: /* @__PURE__ */ jsx(Icon$l, { name: "checkmark" }) })
|
|
22424
|
-
] }) : optionRenderer ? /* @__PURE__ */ jsx("div", { className: styles$O.selectItemContent, ref: visibleContentRef, children: optionRenderer(
|
|
22425
|
-
{
|
|
22426
|
-
label: label2,
|
|
22427
|
-
value,
|
|
22428
|
-
enabled: enabled2
|
|
22429
|
-
},
|
|
22430
|
-
selectedValue,
|
|
22431
|
-
false
|
|
22432
|
-
) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22433
|
-
/* @__PURE__ */ jsx("div", { className: styles$O.selectItemContent, ref: visibleContentRef, children: label2 }),
|
|
22434
|
-
selectedValue === value && /* @__PURE__ */ jsx(ItemIndicator, { className: styles$O.selectItemIndicator, children: /* @__PURE__ */ jsx(Icon$l, { name: "checkmark" }) })
|
|
22435
|
-
] })
|
|
22436
|
-
]
|
|
22437
|
-
}
|
|
22438
|
-
);
|
|
22439
|
-
}
|
|
22440
|
-
);
|
|
22441
|
-
SelectOption.displayName = "SelectOption";
|
|
22442
22706
|
const themeVars$x = `'{"gap-RadioGroupOption": "var(--xmlui-gap-RadioGroupOption)", "borderWidth-RadioGroupOption": "var(--xmlui-borderWidth-RadioGroupOption)", "borderWidth-RadioGroupOption-validation": "var(--xmlui-borderWidth-RadioGroupOption-validation)", "Input:borderColor-RadioGroupOption-default": "var(--xmlui-borderColor-RadioGroupOption-default)", "Input:borderColor-checked-RadioGroupOption": "var(--xmlui-borderColor-checked-RadioGroupOption)", "Input:borderColor-RadioGroupOption-default--hover": "var(--xmlui-borderColor-RadioGroupOption-default--hover)", "Input:borderColor-RadioGroupOption-default--active": "var(--xmlui-borderColor-RadioGroupOption-default--active)", "Input:borderColor-RadioGroupOption--disabled": "var(--xmlui-borderColor-RadioGroupOption--disabled)", "Input:borderColor-RadioGroupOption-error": "var(--xmlui-borderColor-RadioGroupOption-error)", "Input:borderColor-RadioGroupOption-warning": "var(--xmlui-borderColor-RadioGroupOption-warning)", "Input:borderColor-RadioGroupOption-success": "var(--xmlui-borderColor-RadioGroupOption-success)", "Input:backgroundColor-RadioGroupOption-default": "var(--xmlui-backgroundColor-RadioGroupOption-default)", "Input:backgroundColor-checked-RadioGroupOption": "var(--xmlui-backgroundColor-checked-RadioGroupOption)", "Input:backgroundColor-checked-RadioGroupOption--disabled": "var(--xmlui-backgroundColor-checked-RadioGroupOption--disabled)", "Input:color-RadioGroupOption--disabled": "var(--xmlui-color-RadioGroupOption--disabled)", "Input:fontSize-RadioGroupOption": "var(--xmlui-fontSize-RadioGroupOption)", "Input:fontWeight-RadioGroupOption": "var(--xmlui-fontWeight-RadioGroupOption)", "Input:textColor-RadioGroupOption-default": "var(--xmlui-textColor-RadioGroupOption-default)", "Input:textColor-RadioGroupOption-error": "var(--xmlui-textColor-RadioGroupOption-error)", "Input:textColor-RadioGroupOption-warning": "var(--xmlui-textColor-RadioGroupOption-warning)", "Input:textColor-RadioGroupOption-success": "var(--xmlui-textColor-RadioGroupOption-success)", "Input:outlineWidth-RadioGroupOption--focus": "var(--xmlui-outlineWidth-RadioGroupOption--focus)", "Input:outlineColor-RadioGroupOption--focus": "var(--xmlui-outlineColor-RadioGroupOption--focus)", "Input:outlineStyle-RadioGroupOption--focus": "var(--xmlui-outlineStyle-RadioGroupOption--focus)", "Input:outlineOffset-RadioGroupOption--focus": "var(--xmlui-outlineOffset-RadioGroupOption--focus)"}'`;
|
|
22443
22707
|
const radioGroupContainer = "_radioGroupContainer_fn2iu_14";
|
|
22444
22708
|
const radioOptionContainer = "_radioOptionContainer_fn2iu_20";
|
|
@@ -22987,24 +23251,25 @@ const TextArea = forwardRef(function TextArea2({
|
|
|
22987
23251
|
}
|
|
22988
23252
|
);
|
|
22989
23253
|
});
|
|
22990
|
-
const themeVars$v = `'{"border-AutoComplete": "var(--xmlui-border-AutoComplete)", "borderHorizontal-AutoComplete": "var(--xmlui-borderHorizontal-AutoComplete, var(--xmlui-border-AutoComplete))", "borderVertical-AutoComplete": "var(--xmlui-borderVertical-AutoComplete, var(--xmlui-border-AutoComplete))", "borderLeft-AutoComplete": "var(--xmlui-borderLeft-AutoComplete, var(--xmlui-borderHorizontal-AutoComplete, var(--xmlui-border-AutoComplete)))", "borderRight-AutoComplete": "var(--xmlui-borderRight-AutoComplete, var(--xmlui-borderHorizontal-AutoComplete, var(--xmlui-border-AutoComplete)))", "borderTop-AutoComplete": "var(--xmlui-borderTop-AutoComplete, var(--xmlui-borderVertical-AutoComplete, var(--xmlui-border-AutoComplete)))", "borderBottom-AutoComplete": "var(--xmlui-borderBottom-AutoComplete, var(--xmlui-borderVertical-AutoComplete, var(--xmlui-border-AutoComplete)))", "borderWidth-AutoComplete": "var(--xmlui-borderWidth-AutoComplete)", "borderHorizontalWidth-AutoComplete": "var(--xmlui-borderHorizontalWidth-AutoComplete, var(--xmlui-borderWidth-AutoComplete))", "borderLeftWidth-AutoComplete": "var(--xmlui-borderLeftWidth-AutoComplete, var(--xmlui-borderHorizontalWidth-AutoComplete, var(--xmlui-borderWidth-AutoComplete)))", "borderRightWidth-AutoComplete": "var(--xmlui-borderRightWidth-AutoComplete, var(--xmlui-borderHorizontalWidth-AutoComplete, var(--xmlui-borderWidth-AutoComplete)))", "borderVerticalWidth-AutoComplete": "var(--xmlui-borderVerticalWidth-AutoComplete, var(--xmlui-borderWidth-AutoComplete))", "borderTopWidth-AutoComplete": "var(--xmlui-borderTopWidth-AutoComplete, var(--xmlui-borderVerticalWidth-AutoComplete, var(--xmlui-borderWidth-AutoComplete)))", "borderBottomWidth-AutoComplete": "var(--xmlui-borderBottomWidth-AutoComplete, var(--xmlui-borderVerticalWidth-AutoComplete, var(--xmlui-borderWidth-AutoComplete)))", "borderStyle-AutoComplete": "var(--xmlui-borderStyle-AutoComplete)", "borderHorizontalStyle-AutoComplete": "var(--xmlui-borderHorizontalStyle-AutoComplete, var(--xmlui-borderStyle-AutoComplete))", "borderLeftStyle-AutoComplete": "var(--xmlui-borderLeftStyle-AutoComplete, var(--xmlui-borderHorizontalStyle-AutoComplete, var(--xmlui-borderStyle-AutoComplete)))", "borderRightStyle-AutoComplete": "var(--xmlui-borderRightStyle-AutoComplete, var(--xmlui-borderHorizontalStyle-AutoComplete, var(--xmlui-borderStyle-AutoComplete)))", "borderVerticalStyle-AutoComplete": "var(--xmlui-borderVerticalStyle-AutoComplete, var(--xmlui-borderStyle-AutoComplete))", "borderTopStyle-AutoComplete": "var(--xmlui-borderTopStyle-AutoComplete, var(--xmlui-borderVerticalStyle-AutoComplete, var(--xmlui-borderStyle-AutoComplete)))", "borderBottomStyle-AutoComplete": "var(--xmlui-borderBottomStyle-AutoComplete, var(--xmlui-borderVerticalStyle-AutoComplete, var(--xmlui-borderStyle-AutoComplete)))", "borderColor-AutoComplete": "var(--xmlui-borderColor-AutoComplete)", "borderHorizontalColor-AutoComplete": "var(--xmlui-borderHorizontalColor-AutoComplete, var(--xmlui-borderColor-AutoComplete))", "borderLeftColor-AutoComplete": "var(--xmlui-borderLeftColor-AutoComplete, var(--xmlui-borderHorizontalColor-AutoComplete, var(--xmlui-borderColor-AutoComplete)))", "borderRightColor-AutoComplete": "var(--xmlui-borderRightColor-AutoComplete, var(--xmlui-borderHorizontalColor-AutoComplete, var(--xmlui-borderColor-AutoComplete)))", "borderVerticalColor-AutoComplete": "var(--xmlui-borderVerticalColor-AutoComplete, var(--xmlui-borderColor-AutoComplete))", "borderTopColor-AutoComplete": "var(--xmlui-borderTopColor-AutoComplete, var(--xmlui-borderVerticalColor-AutoComplete, var(--xmlui-borderColor-AutoComplete)))", "borderBottomColor-AutoComplete": "var(--xmlui-borderBottomColor-AutoComplete, var(--xmlui-borderVerticalColor-AutoComplete, var(--xmlui-borderColor-AutoComplete)))", "borderStartStartRadius-AutoComplete": "var(--xmlui-borderStartStartRadius-AutoComplete, var(--xmlui-borderRadius-AutoComplete))", "borderStartEndRadius-AutoComplete": "var(--xmlui-borderStartEndRadius-AutoComplete, var(--xmlui-borderRadius-AutoComplete))", "borderEndStartRadius-AutoComplete": "var(--xmlui-borderEndStartRadius-AutoComplete, var(--xmlui-borderRadius-AutoComplete))", "borderEndEndRadius-AutoComplete": "var(--xmlui-borderEndEndRadius-AutoComplete, var(--xmlui-borderRadius-AutoComplete))", "padding-AutoComplete": "var(--xmlui-padding-AutoComplete)", "paddingHorizontal-AutoComplete": "var(--xmlui-paddingHorizontal-AutoComplete, var(--xmlui-padding-AutoComplete))", "paddingVertical-AutoComplete": "var(--xmlui-paddingVertical-AutoComplete, var(--xmlui-padding-AutoComplete))", "paddingLeft-AutoComplete": "var(--xmlui-paddingLeft-AutoComplete, var(--xmlui-paddingHorizontal-AutoComplete, var(--xmlui-padding-AutoComplete)))", "paddingRight-AutoComplete": "var(--xmlui-paddingRight-AutoComplete, var(--xmlui-paddingHorizontal-AutoComplete, var(--xmlui-padding-AutoComplete)))", "paddingTop-AutoComplete": "var(--xmlui-paddingTop-AutoComplete, var(--xmlui-paddingVertical-AutoComplete, var(--xmlui-padding-AutoComplete)))", "paddingBottom-AutoComplete": "var(--xmlui-paddingBottom-AutoComplete, var(--xmlui-paddingVertical-AutoComplete, var(--xmlui-padding-AutoComplete)))", "Input:borderRadius-AutoComplete-default": "var(--xmlui-borderRadius-AutoComplete-default)", "Input:borderColor-AutoComplete-default": "var(--xmlui-borderColor-AutoComplete-default)", "Input:borderWidth-AutoComplete-default": "var(--xmlui-borderWidth-AutoComplete-default)", "Input:borderStyle-AutoComplete-default": "var(--xmlui-borderStyle-AutoComplete-default)", "Input:fontSize-AutoComplete-default": "var(--xmlui-fontSize-AutoComplete-default)", "Input:backgroundColor-AutoComplete-default": "var(--xmlui-backgroundColor-AutoComplete-default)", "Input:boxShadow-AutoComplete-default": "var(--xmlui-boxShadow-AutoComplete-default)", "Input:textColor-AutoComplete-default": "var(--xmlui-textColor-AutoComplete-default)", "Input:borderColor-AutoComplete-default--hover": "var(--xmlui-borderColor-AutoComplete-default--hover)", "Input:backgroundColor-AutoComplete-default--hover": "var(--xmlui-backgroundColor-AutoComplete-default--hover)", "Input:boxShadow-AutoComplete-default--hover": "var(--xmlui-boxShadow-AutoComplete-default--hover)", "Input:textColor-AutoComplete-default--hover": "var(--xmlui-textColor-AutoComplete-default--hover)", "Input:textColor-placeholder-AutoComplete-default": "var(--xmlui-textColor-placeholder-AutoComplete-default)", "Input:fontSize-placeholder-AutoComplete-default": "var(--xmlui-fontSize-placeholder-AutoComplete-default)", "Input:borderRadius-AutoComplete-error": "var(--xmlui-borderRadius-AutoComplete-error)", "Input:borderColor-AutoComplete-error": "var(--xmlui-borderColor-AutoComplete-error)", "Input:borderWidth-AutoComplete-error": "var(--xmlui-borderWidth-AutoComplete-error)", "Input:borderStyle-AutoComplete-error": "var(--xmlui-borderStyle-AutoComplete-error)", "Input:fontSize-AutoComplete-error": "var(--xmlui-fontSize-AutoComplete-error)", "Input:backgroundColor-AutoComplete-error": "var(--xmlui-backgroundColor-AutoComplete-error)", "Input:boxShadow-AutoComplete-error": "var(--xmlui-boxShadow-AutoComplete-error)", "Input:textColor-AutoComplete-error": "var(--xmlui-textColor-AutoComplete-error)", "Input:borderColor-AutoComplete-error--hover": "var(--xmlui-borderColor-AutoComplete-error--hover)", "Input:backgroundColor-AutoComplete-error--hover": "var(--xmlui-backgroundColor-AutoComplete-error--hover)", "Input:boxShadow-AutoComplete-error--hover": "var(--xmlui-boxShadow-AutoComplete-error--hover)", "Input:textColor-AutoComplete-error--hover": "var(--xmlui-textColor-AutoComplete-error--hover)", "Input:textColor-placeholder-AutoComplete-error": "var(--xmlui-textColor-placeholder-AutoComplete-error)", "Input:fontSize-placeholder-AutoComplete-error": "var(--xmlui-fontSize-placeholder-AutoComplete-error)", "Input:borderRadius-AutoComplete-warning": "var(--xmlui-borderRadius-AutoComplete-warning)", "Input:borderColor-AutoComplete-warning": "var(--xmlui-borderColor-AutoComplete-warning)", "Input:borderWidth-AutoComplete-warning": "var(--xmlui-borderWidth-AutoComplete-warning)", "Input:borderStyle-AutoComplete-warning": "var(--xmlui-borderStyle-AutoComplete-warning)", "Input:fontSize-AutoComplete-warning": "var(--xmlui-fontSize-AutoComplete-warning)", "Input:backgroundColor-AutoComplete-warning": "var(--xmlui-backgroundColor-AutoComplete-warning)", "Input:boxShadow-AutoComplete-warning": "var(--xmlui-boxShadow-AutoComplete-warning)", "Input:textColor-AutoComplete-warning": "var(--xmlui-textColor-AutoComplete-warning)", "Input:borderColor-AutoComplete-warning--hover": "var(--xmlui-borderColor-AutoComplete-warning--hover)", "Input:backgroundColor-AutoComplete-warning--hover": "var(--xmlui-backgroundColor-AutoComplete-warning--hover)", "Input:boxShadow-AutoComplete-warning--hover": "var(--xmlui-boxShadow-AutoComplete-warning--hover)", "Input:textColor-AutoComplete-warning--hover": "var(--xmlui-textColor-AutoComplete-warning--hover)", "Input:textColor-placeholder-AutoComplete-warning": "var(--xmlui-textColor-placeholder-AutoComplete-warning)", "Input:fontSize-placeholder-AutoComplete-warning": "var(--xmlui-fontSize-placeholder-AutoComplete-warning)", "Input:borderRadius-AutoComplete-success": "var(--xmlui-borderRadius-AutoComplete-success)", "Input:borderColor-AutoComplete-success": "var(--xmlui-borderColor-AutoComplete-success)", "Input:borderWidth-AutoComplete-success": "var(--xmlui-borderWidth-AutoComplete-success)", "Input:borderStyle-AutoComplete-success": "var(--xmlui-borderStyle-AutoComplete-success)", "Input:fontSize-AutoComplete-success": "var(--xmlui-fontSize-AutoComplete-success)", "Input:backgroundColor-AutoComplete-success": "var(--xmlui-backgroundColor-AutoComplete-success)", "Input:boxShadow-AutoComplete-success": "var(--xmlui-boxShadow-AutoComplete-success)", "Input:textColor-AutoComplete-success": "var(--xmlui-textColor-AutoComplete-success)", "Input:borderColor-AutoComplete-success--hover": "var(--xmlui-borderColor-AutoComplete-success--hover)", "Input:backgroundColor-AutoComplete-success--hover": "var(--xmlui-backgroundColor-AutoComplete-success--hover)", "Input:boxShadow-AutoComplete-success--hover": "var(--xmlui-boxShadow-AutoComplete-success--hover)", "Input:textColor-AutoComplete-success--hover": "var(--xmlui-textColor-AutoComplete-success--hover)", "Input:textColor-placeholder-AutoComplete-success": "var(--xmlui-textColor-placeholder-AutoComplete-success)", "Input:fontSize-placeholder-AutoComplete-success": "var(--xmlui-fontSize-placeholder-AutoComplete-success)", "Input:backgroundColor-AutoComplete--disabled": "var(--xmlui-backgroundColor-AutoComplete--disabled)", "Input:textColor-AutoComplete--disabled": "var(--xmlui-textColor-AutoComplete--disabled)", "Input:borderColor-AutoComplete--disabled": "var(--xmlui-borderColor-AutoComplete--disabled)", "Input:outlineWidth-AutoComplete--focus": "var(--xmlui-outlineWidth-AutoComplete--focus)", "Input:outlineColor-AutoComplete--focus": "var(--xmlui-outlineColor-AutoComplete--focus)", "Input:outlineStyle-AutoComplete--focus": "var(--xmlui-outlineStyle-AutoComplete--focus)", "Input:outlineOffset-AutoComplete--focus": "var(--xmlui-outlineOffset-AutoComplete--focus)", "paddingVertical-AutoComplete-badge": "var(--xmlui-paddingVertical-AutoComplete-badge)", "paddingHorizontal-AutoComplete-badge": "var(--xmlui-paddingHorizontal-AutoComplete-badge)", "borderRadius-AutoComplete-badge": "var(--xmlui-borderRadius-AutoComplete-badge)", "Input:fontSize-AutoComplete-badge": "var(--xmlui-fontSize-AutoComplete-badge)", "Input:backgroundColor-AutoComplete-badge": "var(--xmlui-backgroundColor-AutoComplete-badge)", "Input:textColor-AutoComplete-badge": "var(--xmlui-textColor-AutoComplete-badge)", "Input:backgroundColor-AutoComplete-badge--hover": "var(--xmlui-backgroundColor-AutoComplete-badge--hover)", "Input:textColor-AutoComplete-badge--hover": "var(--xmlui-textColor-AutoComplete-badge--hover)", "Input:backgroundColor-AutoComplete-badge--active": "var(--xmlui-backgroundColor-AutoComplete-badge--active)", "Input:textColor-AutoComplete-badge--active": "var(--xmlui-textColor-AutoComplete-badge--active)", "Input:textColor-placeholder-AutoComplete": "var(--xmlui-textColor-placeholder-AutoComplete)", "Input:backgroundColor-menu-AutoComplete": "var(--xmlui-backgroundColor-menu-AutoComplete)", "Input:borderRadius-menu-AutoComplete": "var(--xmlui-borderRadius-menu-AutoComplete)", "Input:boxShadow-menu-AutoComplete": "var(--xmlui-boxShadow-menu-AutoComplete)", "backgroundColor-item-AutoComplete": "var(--xmlui-backgroundColor-item-AutoComplete)", "backgroundColor-item-AutoComplete--hover": "var(--xmlui-backgroundColor-item-AutoComplete--hover)", "textColor-item-AutoComplete--disabled": "var(--xmlui-textColor-item-AutoComplete--disabled)"}'`;
|
|
22991
|
-
const command = "
|
|
22992
|
-
const badgeListWrapper = "
|
|
22993
|
-
const error$5 = "
|
|
22994
|
-
const warning$6 = "
|
|
22995
|
-
const valid$5 = "
|
|
22996
|
-
const disabled$5 = "
|
|
22997
|
-
const focused$2 = "
|
|
22998
|
-
const badgeList = "
|
|
22999
|
-
const inputWrapper = "
|
|
23000
|
-
const badge = "
|
|
23001
|
-
const commandInput = "
|
|
23002
|
-
const actions = "
|
|
23003
|
-
const action = "
|
|
23004
|
-
const autoCompleteEmpty = "
|
|
23005
|
-
const commandList = "
|
|
23006
|
-
const autoCompleteOption = "
|
|
23007
|
-
const
|
|
23254
|
+
const themeVars$v = `'{"border-AutoComplete": "var(--xmlui-border-AutoComplete)", "borderHorizontal-AutoComplete": "var(--xmlui-borderHorizontal-AutoComplete, var(--xmlui-border-AutoComplete))", "borderVertical-AutoComplete": "var(--xmlui-borderVertical-AutoComplete, var(--xmlui-border-AutoComplete))", "borderLeft-AutoComplete": "var(--xmlui-borderLeft-AutoComplete, var(--xmlui-borderHorizontal-AutoComplete, var(--xmlui-border-AutoComplete)))", "borderRight-AutoComplete": "var(--xmlui-borderRight-AutoComplete, var(--xmlui-borderHorizontal-AutoComplete, var(--xmlui-border-AutoComplete)))", "borderTop-AutoComplete": "var(--xmlui-borderTop-AutoComplete, var(--xmlui-borderVertical-AutoComplete, var(--xmlui-border-AutoComplete)))", "borderBottom-AutoComplete": "var(--xmlui-borderBottom-AutoComplete, var(--xmlui-borderVertical-AutoComplete, var(--xmlui-border-AutoComplete)))", "borderWidth-AutoComplete": "var(--xmlui-borderWidth-AutoComplete)", "borderHorizontalWidth-AutoComplete": "var(--xmlui-borderHorizontalWidth-AutoComplete, var(--xmlui-borderWidth-AutoComplete))", "borderLeftWidth-AutoComplete": "var(--xmlui-borderLeftWidth-AutoComplete, var(--xmlui-borderHorizontalWidth-AutoComplete, var(--xmlui-borderWidth-AutoComplete)))", "borderRightWidth-AutoComplete": "var(--xmlui-borderRightWidth-AutoComplete, var(--xmlui-borderHorizontalWidth-AutoComplete, var(--xmlui-borderWidth-AutoComplete)))", "borderVerticalWidth-AutoComplete": "var(--xmlui-borderVerticalWidth-AutoComplete, var(--xmlui-borderWidth-AutoComplete))", "borderTopWidth-AutoComplete": "var(--xmlui-borderTopWidth-AutoComplete, var(--xmlui-borderVerticalWidth-AutoComplete, var(--xmlui-borderWidth-AutoComplete)))", "borderBottomWidth-AutoComplete": "var(--xmlui-borderBottomWidth-AutoComplete, var(--xmlui-borderVerticalWidth-AutoComplete, var(--xmlui-borderWidth-AutoComplete)))", "borderStyle-AutoComplete": "var(--xmlui-borderStyle-AutoComplete)", "borderHorizontalStyle-AutoComplete": "var(--xmlui-borderHorizontalStyle-AutoComplete, var(--xmlui-borderStyle-AutoComplete))", "borderLeftStyle-AutoComplete": "var(--xmlui-borderLeftStyle-AutoComplete, var(--xmlui-borderHorizontalStyle-AutoComplete, var(--xmlui-borderStyle-AutoComplete)))", "borderRightStyle-AutoComplete": "var(--xmlui-borderRightStyle-AutoComplete, var(--xmlui-borderHorizontalStyle-AutoComplete, var(--xmlui-borderStyle-AutoComplete)))", "borderVerticalStyle-AutoComplete": "var(--xmlui-borderVerticalStyle-AutoComplete, var(--xmlui-borderStyle-AutoComplete))", "borderTopStyle-AutoComplete": "var(--xmlui-borderTopStyle-AutoComplete, var(--xmlui-borderVerticalStyle-AutoComplete, var(--xmlui-borderStyle-AutoComplete)))", "borderBottomStyle-AutoComplete": "var(--xmlui-borderBottomStyle-AutoComplete, var(--xmlui-borderVerticalStyle-AutoComplete, var(--xmlui-borderStyle-AutoComplete)))", "borderColor-AutoComplete": "var(--xmlui-borderColor-AutoComplete)", "borderHorizontalColor-AutoComplete": "var(--xmlui-borderHorizontalColor-AutoComplete, var(--xmlui-borderColor-AutoComplete))", "borderLeftColor-AutoComplete": "var(--xmlui-borderLeftColor-AutoComplete, var(--xmlui-borderHorizontalColor-AutoComplete, var(--xmlui-borderColor-AutoComplete)))", "borderRightColor-AutoComplete": "var(--xmlui-borderRightColor-AutoComplete, var(--xmlui-borderHorizontalColor-AutoComplete, var(--xmlui-borderColor-AutoComplete)))", "borderVerticalColor-AutoComplete": "var(--xmlui-borderVerticalColor-AutoComplete, var(--xmlui-borderColor-AutoComplete))", "borderTopColor-AutoComplete": "var(--xmlui-borderTopColor-AutoComplete, var(--xmlui-borderVerticalColor-AutoComplete, var(--xmlui-borderColor-AutoComplete)))", "borderBottomColor-AutoComplete": "var(--xmlui-borderBottomColor-AutoComplete, var(--xmlui-borderVerticalColor-AutoComplete, var(--xmlui-borderColor-AutoComplete)))", "borderStartStartRadius-AutoComplete": "var(--xmlui-borderStartStartRadius-AutoComplete, var(--xmlui-borderRadius-AutoComplete))", "borderStartEndRadius-AutoComplete": "var(--xmlui-borderStartEndRadius-AutoComplete, var(--xmlui-borderRadius-AutoComplete))", "borderEndStartRadius-AutoComplete": "var(--xmlui-borderEndStartRadius-AutoComplete, var(--xmlui-borderRadius-AutoComplete))", "borderEndEndRadius-AutoComplete": "var(--xmlui-borderEndEndRadius-AutoComplete, var(--xmlui-borderRadius-AutoComplete))", "padding-AutoComplete": "var(--xmlui-padding-AutoComplete)", "paddingHorizontal-AutoComplete": "var(--xmlui-paddingHorizontal-AutoComplete, var(--xmlui-padding-AutoComplete))", "paddingVertical-AutoComplete": "var(--xmlui-paddingVertical-AutoComplete, var(--xmlui-padding-AutoComplete))", "paddingLeft-AutoComplete": "var(--xmlui-paddingLeft-AutoComplete, var(--xmlui-paddingHorizontal-AutoComplete, var(--xmlui-padding-AutoComplete)))", "paddingRight-AutoComplete": "var(--xmlui-paddingRight-AutoComplete, var(--xmlui-paddingHorizontal-AutoComplete, var(--xmlui-padding-AutoComplete)))", "paddingTop-AutoComplete": "var(--xmlui-paddingTop-AutoComplete, var(--xmlui-paddingVertical-AutoComplete, var(--xmlui-padding-AutoComplete)))", "paddingBottom-AutoComplete": "var(--xmlui-paddingBottom-AutoComplete, var(--xmlui-paddingVertical-AutoComplete, var(--xmlui-padding-AutoComplete)))", "padding-item-AutoComplete": "var(--xmlui-padding-item-AutoComplete)", "paddingHorizontal-item-AutoComplete": "var(--xmlui-paddingHorizontal-item-AutoComplete, var(--xmlui-padding-item-AutoComplete))", "paddingVertical-item-AutoComplete": "var(--xmlui-paddingVertical-item-AutoComplete, var(--xmlui-padding-item-AutoComplete))", "paddingLeft-item-AutoComplete": "var(--xmlui-paddingLeft-item-AutoComplete, var(--xmlui-paddingHorizontal-item-AutoComplete, var(--xmlui-padding-item-AutoComplete)))", "paddingRight-item-AutoComplete": "var(--xmlui-paddingRight-item-AutoComplete, var(--xmlui-paddingHorizontal-item-AutoComplete, var(--xmlui-padding-item-AutoComplete)))", "paddingTop-item-AutoComplete": "var(--xmlui-paddingTop-item-AutoComplete, var(--xmlui-paddingVertical-item-AutoComplete, var(--xmlui-padding-item-AutoComplete)))", "paddingBottom-item-AutoComplete": "var(--xmlui-paddingBottom-item-AutoComplete, var(--xmlui-paddingVertical-item-AutoComplete, var(--xmlui-padding-item-AutoComplete)))", "Input:borderRadius-AutoComplete-default": "var(--xmlui-borderRadius-AutoComplete-default)", "Input:borderColor-AutoComplete-default": "var(--xmlui-borderColor-AutoComplete-default)", "Input:borderWidth-AutoComplete-default": "var(--xmlui-borderWidth-AutoComplete-default)", "Input:borderStyle-AutoComplete-default": "var(--xmlui-borderStyle-AutoComplete-default)", "Input:fontSize-AutoComplete-default": "var(--xmlui-fontSize-AutoComplete-default)", "Input:backgroundColor-AutoComplete-default": "var(--xmlui-backgroundColor-AutoComplete-default)", "Input:boxShadow-AutoComplete-default": "var(--xmlui-boxShadow-AutoComplete-default)", "Input:textColor-AutoComplete-default": "var(--xmlui-textColor-AutoComplete-default)", "Input:borderColor-AutoComplete-default--hover": "var(--xmlui-borderColor-AutoComplete-default--hover)", "Input:backgroundColor-AutoComplete-default--hover": "var(--xmlui-backgroundColor-AutoComplete-default--hover)", "Input:boxShadow-AutoComplete-default--hover": "var(--xmlui-boxShadow-AutoComplete-default--hover)", "Input:textColor-AutoComplete-default--hover": "var(--xmlui-textColor-AutoComplete-default--hover)", "Input:textColor-placeholder-AutoComplete-default": "var(--xmlui-textColor-placeholder-AutoComplete-default)", "Input:fontSize-placeholder-AutoComplete-default": "var(--xmlui-fontSize-placeholder-AutoComplete-default)", "Input:borderRadius-AutoComplete-error": "var(--xmlui-borderRadius-AutoComplete-error)", "Input:borderColor-AutoComplete-error": "var(--xmlui-borderColor-AutoComplete-error)", "Input:borderWidth-AutoComplete-error": "var(--xmlui-borderWidth-AutoComplete-error)", "Input:borderStyle-AutoComplete-error": "var(--xmlui-borderStyle-AutoComplete-error)", "Input:fontSize-AutoComplete-error": "var(--xmlui-fontSize-AutoComplete-error)", "Input:backgroundColor-AutoComplete-error": "var(--xmlui-backgroundColor-AutoComplete-error)", "Input:boxShadow-AutoComplete-error": "var(--xmlui-boxShadow-AutoComplete-error)", "Input:textColor-AutoComplete-error": "var(--xmlui-textColor-AutoComplete-error)", "Input:borderColor-AutoComplete-error--hover": "var(--xmlui-borderColor-AutoComplete-error--hover)", "Input:backgroundColor-AutoComplete-error--hover": "var(--xmlui-backgroundColor-AutoComplete-error--hover)", "Input:boxShadow-AutoComplete-error--hover": "var(--xmlui-boxShadow-AutoComplete-error--hover)", "Input:textColor-AutoComplete-error--hover": "var(--xmlui-textColor-AutoComplete-error--hover)", "Input:textColor-placeholder-AutoComplete-error": "var(--xmlui-textColor-placeholder-AutoComplete-error)", "Input:fontSize-placeholder-AutoComplete-error": "var(--xmlui-fontSize-placeholder-AutoComplete-error)", "Input:borderRadius-AutoComplete-warning": "var(--xmlui-borderRadius-AutoComplete-warning)", "Input:borderColor-AutoComplete-warning": "var(--xmlui-borderColor-AutoComplete-warning)", "Input:borderWidth-AutoComplete-warning": "var(--xmlui-borderWidth-AutoComplete-warning)", "Input:borderStyle-AutoComplete-warning": "var(--xmlui-borderStyle-AutoComplete-warning)", "Input:fontSize-AutoComplete-warning": "var(--xmlui-fontSize-AutoComplete-warning)", "Input:backgroundColor-AutoComplete-warning": "var(--xmlui-backgroundColor-AutoComplete-warning)", "Input:boxShadow-AutoComplete-warning": "var(--xmlui-boxShadow-AutoComplete-warning)", "Input:textColor-AutoComplete-warning": "var(--xmlui-textColor-AutoComplete-warning)", "Input:borderColor-AutoComplete-warning--hover": "var(--xmlui-borderColor-AutoComplete-warning--hover)", "Input:backgroundColor-AutoComplete-warning--hover": "var(--xmlui-backgroundColor-AutoComplete-warning--hover)", "Input:boxShadow-AutoComplete-warning--hover": "var(--xmlui-boxShadow-AutoComplete-warning--hover)", "Input:textColor-AutoComplete-warning--hover": "var(--xmlui-textColor-AutoComplete-warning--hover)", "Input:textColor-placeholder-AutoComplete-warning": "var(--xmlui-textColor-placeholder-AutoComplete-warning)", "Input:fontSize-placeholder-AutoComplete-warning": "var(--xmlui-fontSize-placeholder-AutoComplete-warning)", "Input:borderRadius-AutoComplete-success": "var(--xmlui-borderRadius-AutoComplete-success)", "Input:borderColor-AutoComplete-success": "var(--xmlui-borderColor-AutoComplete-success)", "Input:borderWidth-AutoComplete-success": "var(--xmlui-borderWidth-AutoComplete-success)", "Input:borderStyle-AutoComplete-success": "var(--xmlui-borderStyle-AutoComplete-success)", "Input:fontSize-AutoComplete-success": "var(--xmlui-fontSize-AutoComplete-success)", "Input:backgroundColor-AutoComplete-success": "var(--xmlui-backgroundColor-AutoComplete-success)", "Input:boxShadow-AutoComplete-success": "var(--xmlui-boxShadow-AutoComplete-success)", "Input:textColor-AutoComplete-success": "var(--xmlui-textColor-AutoComplete-success)", "Input:borderColor-AutoComplete-success--hover": "var(--xmlui-borderColor-AutoComplete-success--hover)", "Input:backgroundColor-AutoComplete-success--hover": "var(--xmlui-backgroundColor-AutoComplete-success--hover)", "Input:boxShadow-AutoComplete-success--hover": "var(--xmlui-boxShadow-AutoComplete-success--hover)", "Input:textColor-AutoComplete-success--hover": "var(--xmlui-textColor-AutoComplete-success--hover)", "Input:textColor-placeholder-AutoComplete-success": "var(--xmlui-textColor-placeholder-AutoComplete-success)", "Input:fontSize-placeholder-AutoComplete-success": "var(--xmlui-fontSize-placeholder-AutoComplete-success)", "Input:backgroundColor-AutoComplete--disabled": "var(--xmlui-backgroundColor-AutoComplete--disabled)", "Input:textColor-AutoComplete--disabled": "var(--xmlui-textColor-AutoComplete--disabled)", "Input:borderColor-AutoComplete--disabled": "var(--xmlui-borderColor-AutoComplete--disabled)", "Input:outlineWidth-AutoComplete--focus": "var(--xmlui-outlineWidth-AutoComplete--focus)", "Input:outlineColor-AutoComplete--focus": "var(--xmlui-outlineColor-AutoComplete--focus)", "Input:outlineStyle-AutoComplete--focus": "var(--xmlui-outlineStyle-AutoComplete--focus)", "Input:outlineOffset-AutoComplete--focus": "var(--xmlui-outlineOffset-AutoComplete--focus)", "paddingVertical-AutoComplete-badge": "var(--xmlui-paddingVertical-AutoComplete-badge)", "paddingHorizontal-AutoComplete-badge": "var(--xmlui-paddingHorizontal-AutoComplete-badge)", "borderRadius-AutoComplete-badge": "var(--xmlui-borderRadius-AutoComplete-badge)", "Input:fontSize-AutoComplete-badge": "var(--xmlui-fontSize-AutoComplete-badge)", "Input:backgroundColor-AutoComplete-badge": "var(--xmlui-backgroundColor-AutoComplete-badge)", "Input:textColor-AutoComplete-badge": "var(--xmlui-textColor-AutoComplete-badge)", "Input:backgroundColor-AutoComplete-badge--hover": "var(--xmlui-backgroundColor-AutoComplete-badge--hover)", "Input:textColor-AutoComplete-badge--hover": "var(--xmlui-textColor-AutoComplete-badge--hover)", "Input:backgroundColor-AutoComplete-badge--active": "var(--xmlui-backgroundColor-AutoComplete-badge--active)", "Input:textColor-AutoComplete-badge--active": "var(--xmlui-textColor-AutoComplete-badge--active)", "Input:textColor-placeholder-AutoComplete": "var(--xmlui-textColor-placeholder-AutoComplete)", "Input:borderRadius-menu-AutoComplete": "var(--xmlui-borderRadius-menu-AutoComplete)", "Input:borderWidth-menu-AutoComplete": "var(--xmlui-borderWidth-menu-AutoComplete)", "Input:borderColor-menu-AutoComplete": "var(--xmlui-borderColor-menu-AutoComplete)", "Input:backgroundColor-menu-AutoComplete": "var(--xmlui-backgroundColor-menu-AutoComplete)", "Input:boxShadow-menu-AutoComplete": "var(--xmlui-boxShadow-menu-AutoComplete)", "backgroundColor-item-AutoComplete": "var(--xmlui-backgroundColor-item-AutoComplete)", "backgroundColor-item-AutoComplete--active": "var(--xmlui-backgroundColor-item-AutoComplete--active)", "backgroundColor-item-AutoComplete--hover": "var(--xmlui-backgroundColor-item-AutoComplete--hover)", "textColor-item-AutoComplete--disabled": "var(--xmlui-textColor-item-AutoComplete--disabled)"}'`;
|
|
23255
|
+
const command = "_command_1gtkp_14";
|
|
23256
|
+
const badgeListWrapper = "_badgeListWrapper_1gtkp_20";
|
|
23257
|
+
const error$5 = "_error_1gtkp_51";
|
|
23258
|
+
const warning$6 = "_warning_1gtkp_71";
|
|
23259
|
+
const valid$5 = "_valid_1gtkp_91";
|
|
23260
|
+
const disabled$5 = "_disabled_1gtkp_111";
|
|
23261
|
+
const focused$2 = "_focused_1gtkp_118";
|
|
23262
|
+
const badgeList = "_badgeList_1gtkp_20";
|
|
23263
|
+
const inputWrapper = "_inputWrapper_1gtkp_131";
|
|
23264
|
+
const badge = "_badge_1gtkp_20";
|
|
23265
|
+
const commandInput = "_commandInput_1gtkp_163";
|
|
23266
|
+
const actions = "_actions_1gtkp_178";
|
|
23267
|
+
const action = "_action_1gtkp_178";
|
|
23268
|
+
const autoCompleteEmpty = "_autoCompleteEmpty_1gtkp_186";
|
|
23269
|
+
const commandList = "_commandList_1gtkp_195";
|
|
23270
|
+
const autoCompleteOption = "_autoCompleteOption_1gtkp_208";
|
|
23271
|
+
const highlighted = "_highlighted_1gtkp_225";
|
|
23272
|
+
const disabledOption = "_disabledOption_1gtkp_228";
|
|
23008
23273
|
const styles$L = {
|
|
23009
23274
|
themeVars: themeVars$v,
|
|
23010
23275
|
command,
|
|
@@ -23022,8 +23287,9 @@ const styles$L = {
|
|
|
23022
23287
|
action,
|
|
23023
23288
|
autoCompleteEmpty,
|
|
23024
23289
|
commandList,
|
|
23025
|
-
"fade-in": "_fade-
|
|
23290
|
+
"fade-in": "_fade-in_1gtkp_1",
|
|
23026
23291
|
autoCompleteOption,
|
|
23292
|
+
highlighted,
|
|
23027
23293
|
disabledOption
|
|
23028
23294
|
};
|
|
23029
23295
|
const AutoCompleteContext = createContext({
|
|
@@ -23384,12 +23650,18 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23384
23650
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, ref: setReferenceElement, children: /* @__PURE__ */ jsxs(
|
|
23385
23651
|
"div",
|
|
23386
23652
|
{
|
|
23653
|
+
ref: forwardedRef,
|
|
23387
23654
|
style: style2,
|
|
23388
23655
|
"data-part-id": PART_LIST_WRAPPER,
|
|
23389
|
-
className: classnames(
|
|
23390
|
-
|
|
23391
|
-
|
|
23392
|
-
|
|
23656
|
+
className: classnames(
|
|
23657
|
+
className,
|
|
23658
|
+
styles$L.badgeListWrapper,
|
|
23659
|
+
styles$L[validationStatus],
|
|
23660
|
+
{
|
|
23661
|
+
[styles$L.disabled]: !enabled2,
|
|
23662
|
+
[styles$L.focused]: isFocused
|
|
23663
|
+
}
|
|
23664
|
+
),
|
|
23393
23665
|
"aria-expanded": open,
|
|
23394
23666
|
children: [
|
|
23395
23667
|
Array.isArray(selectedValue) && selectedValue.length > 0 && /* @__PURE__ */ jsx("div", { className: styles$L.badgeList, children: selectedValue.map((v, index) => /* @__PURE__ */ jsxs("span", { className: styles$L.badge, children: [
|
|
@@ -23567,7 +23839,7 @@ function CreatableItem({ onNewItem, isHighlighted = false }) {
|
|
|
23567
23839
|
},
|
|
23568
23840
|
onClick: handleClick,
|
|
23569
23841
|
role: "option",
|
|
23570
|
-
"aria-selected":
|
|
23842
|
+
"aria-selected": false,
|
|
23571
23843
|
children: `Create "${searchTerm}"`
|
|
23572
23844
|
}
|
|
23573
23845
|
);
|
|
@@ -23608,7 +23880,7 @@ function AutoCompleteOption(option) {
|
|
|
23608
23880
|
id,
|
|
23609
23881
|
role: "option",
|
|
23610
23882
|
"aria-disabled": !enabled2,
|
|
23611
|
-
"aria-selected":
|
|
23883
|
+
"aria-selected": selected2,
|
|
23612
23884
|
className: classnames(styles$L.autoCompleteOption, {
|
|
23613
23885
|
[styles$L.disabledOption]: !enabled2,
|
|
23614
23886
|
[styles$L.highlighted]: isHighlighted
|
|
@@ -24030,7 +24302,7 @@ function CodeBlock({
|
|
|
24030
24302
|
icon: /* @__PURE__ */ jsx(Icon$l, { name: "copy", "aria-hidden": true }),
|
|
24031
24303
|
onClick: () => {
|
|
24032
24304
|
if (!textToCopy) return;
|
|
24033
|
-
navigator.clipboard.writeText(textToCopy);
|
|
24305
|
+
void navigator.clipboard.writeText(textToCopy);
|
|
24034
24306
|
toast.success("Code copied!");
|
|
24035
24307
|
}
|
|
24036
24308
|
}
|
|
@@ -25338,7 +25610,7 @@ function hierarchyToNative(hierarchyData, fieldConfig) {
|
|
|
25338
25610
|
treeItemsById
|
|
25339
25611
|
};
|
|
25340
25612
|
}
|
|
25341
|
-
const TreeRow = memo(({ index,
|
|
25613
|
+
const TreeRow = memo(({ index, data }) => {
|
|
25342
25614
|
const {
|
|
25343
25615
|
nodes,
|
|
25344
25616
|
toggleNode,
|
|
@@ -25395,7 +25667,7 @@ const TreeRow = memo(({ index, style: style2, data }) => {
|
|
|
25395
25667
|
);
|
|
25396
25668
|
const nodeWithState = treeItem;
|
|
25397
25669
|
const isLoading = nodeWithState.loadingState === "loading";
|
|
25398
|
-
return /* @__PURE__ */ jsx("div", { style: {
|
|
25670
|
+
return /* @__PURE__ */ jsx("div", { style: { width: "100%", display: "flex" }, children: /* @__PURE__ */ jsxs(
|
|
25399
25671
|
"div",
|
|
25400
25672
|
{
|
|
25401
25673
|
className: classnames(styles$D.rowWrapper, {
|
|
@@ -25523,7 +25795,6 @@ const TreeComponent = memo((props) => {
|
|
|
25523
25795
|
iconCollapsed = defaultProps$E.iconCollapsed,
|
|
25524
25796
|
iconExpanded = defaultProps$E.iconExpanded,
|
|
25525
25797
|
iconSize = defaultProps$E.iconSize,
|
|
25526
|
-
itemHeight = defaultProps$E.itemHeight,
|
|
25527
25798
|
animateExpand = defaultProps$E.animateExpand,
|
|
25528
25799
|
expandRotation = defaultProps$E.expandRotation,
|
|
25529
25800
|
onItemClick,
|
|
@@ -25896,7 +26167,7 @@ const TreeComponent = memo((props) => {
|
|
|
25896
26167
|
if (currentIndex >= 0) {
|
|
25897
26168
|
const currentNode = flatTreeData[currentIndex];
|
|
25898
26169
|
if (currentNode.hasChildren && !currentNode.isExpanded) {
|
|
25899
|
-
toggleNode(currentNode);
|
|
26170
|
+
void toggleNode(currentNode);
|
|
25900
26171
|
} else if (currentNode.hasChildren && currentNode.isExpanded && currentIndex + 1 < flatTreeData.length) {
|
|
25901
26172
|
newIndex = currentIndex + 1;
|
|
25902
26173
|
}
|
|
@@ -25908,7 +26179,7 @@ const TreeComponent = memo((props) => {
|
|
|
25908
26179
|
if (currentIndex >= 0) {
|
|
25909
26180
|
const currentNode = flatTreeData[currentIndex];
|
|
25910
26181
|
if (currentNode.hasChildren && currentNode.isExpanded) {
|
|
25911
|
-
toggleNode(currentNode);
|
|
26182
|
+
void toggleNode(currentNode);
|
|
25912
26183
|
} else if (currentNode.depth > 0) {
|
|
25913
26184
|
for (let i = currentIndex - 1; i >= 0; i--) {
|
|
25914
26185
|
if (flatTreeData[i].depth < currentNode.depth) {
|
|
@@ -25940,7 +26211,7 @@ const TreeComponent = memo((props) => {
|
|
|
25940
26211
|
newIndex = currentIndex;
|
|
25941
26212
|
}
|
|
25942
26213
|
if (e.key === "Enter" && currentNode.hasChildren) {
|
|
25943
|
-
toggleNode(currentNode);
|
|
26214
|
+
void toggleNode(currentNode);
|
|
25944
26215
|
}
|
|
25945
26216
|
}
|
|
25946
26217
|
handled = true;
|
|
@@ -25986,10 +26257,6 @@ const TreeComponent = memo((props) => {
|
|
|
25986
26257
|
animateExpand,
|
|
25987
26258
|
expandRotation
|
|
25988
26259
|
]);
|
|
25989
|
-
const getItemKey = useCallback((index, data2) => {
|
|
25990
|
-
const node = data2.nodes[index];
|
|
25991
|
-
return (node == null ? void 0 : node.key) || (node == null ? void 0 : node.id) || `fallback-${index}`;
|
|
25992
|
-
}, []);
|
|
25993
26260
|
const treeApiMethods = useMemo(() => {
|
|
25994
26261
|
return {
|
|
25995
26262
|
// Expansion methods
|
|
@@ -26165,14 +26432,14 @@ const TreeComponent = memo((props) => {
|
|
|
26165
26432
|
(item2) => String(item2.key) === String(nodeId)
|
|
26166
26433
|
);
|
|
26167
26434
|
if (nodeIndex >= 0 && listRef.current) {
|
|
26168
|
-
listRef.current.
|
|
26435
|
+
listRef.current.scrollToIndex(nodeIndex, { align: "center" });
|
|
26169
26436
|
}
|
|
26170
26437
|
}, 0);
|
|
26171
26438
|
},
|
|
26172
26439
|
scrollToItem: (nodeId) => {
|
|
26173
26440
|
const nodeIndex = findNodeIndexById(nodeId);
|
|
26174
26441
|
if (nodeIndex >= 0 && listRef.current) {
|
|
26175
|
-
listRef.current.
|
|
26442
|
+
listRef.current.scrollToIndex(nodeIndex, { align: "center" });
|
|
26176
26443
|
}
|
|
26177
26444
|
},
|
|
26178
26445
|
appendNode: (parentNodeId, nodeData) => {
|
|
@@ -26489,19 +26756,8 @@ const TreeComponent = memo((props) => {
|
|
|
26489
26756
|
onFocus: handleTreeFocus,
|
|
26490
26757
|
onBlur: handleTreeBlur,
|
|
26491
26758
|
onKeyDown: handleKeyDown,
|
|
26492
|
-
|
|
26493
|
-
|
|
26494
|
-
{
|
|
26495
|
-
ref: listRef,
|
|
26496
|
-
height,
|
|
26497
|
-
itemCount: itemData.nodes.length,
|
|
26498
|
-
itemData,
|
|
26499
|
-
itemSize: itemHeight,
|
|
26500
|
-
itemKey: getItemKey,
|
|
26501
|
-
width,
|
|
26502
|
-
children: TreeRow
|
|
26503
|
-
}
|
|
26504
|
-
) })
|
|
26759
|
+
style: { height: "100%", overflow: "auto" },
|
|
26760
|
+
children: /* @__PURE__ */ jsx(Virtualizer, { ref: listRef, children: flatTreeData.map((node, index) => /* @__PURE__ */ jsx(TreeRow, { index, data: itemData }, node.key)) })
|
|
26505
26761
|
}
|
|
26506
26762
|
);
|
|
26507
26763
|
});
|
|
@@ -27296,7 +27552,7 @@ const TextMd = createMetadata({
|
|
|
27296
27552
|
`The text to be displayed. This value can also be set via nesting the text into the \`${COMP$14}\` component.`
|
|
27297
27553
|
),
|
|
27298
27554
|
variant: {
|
|
27299
|
-
description: "An optional string value that provides named presets for text variants with a unique combination of font style, weight, size, color, and other parameters. If not defined, the text uses the current style of its context.",
|
|
27555
|
+
description: "An optional string value that provides named presets for text variants with a unique combination of font style, weight, size, color, and other parameters. If not defined, the text uses the current style of its context. In addition to predefined variants, you can specify custom variant names and style them using theme variables with the pattern `{cssProperty}-Text-{variantName}` (e.g., `textColor-Text-brandTitle`, `fontSize-Text-highlight`). See the documentation for a complete list of supported CSS properties.",
|
|
27300
27556
|
availableValues: variantOptionsMd
|
|
27301
27557
|
},
|
|
27302
27558
|
maxLines: d(
|
|
@@ -27683,14 +27939,7 @@ function useRowSelection({
|
|
|
27683
27939
|
lastUpdateSourceRef.current = "table";
|
|
27684
27940
|
(_a3 = syncWithAppState.update) == null ? void 0 : _a3.call(syncWithAppState, { selectedIds: currentSelectionIds });
|
|
27685
27941
|
}
|
|
27686
|
-
}, [
|
|
27687
|
-
selectedItems,
|
|
27688
|
-
syncWithAppState,
|
|
27689
|
-
appStateSelection,
|
|
27690
|
-
idKey,
|
|
27691
|
-
rowsSelectable,
|
|
27692
|
-
syncState
|
|
27693
|
-
]);
|
|
27942
|
+
}, [selectedItems, syncWithAppState, appStateSelection, idKey, rowsSelectable, syncState]);
|
|
27694
27943
|
useEffect(() => {
|
|
27695
27944
|
if (syncState !== "idle") {
|
|
27696
27945
|
const resetTimer = requestAnimationFrame(() => {
|
|
@@ -27869,7 +28118,7 @@ function useRowSelection({
|
|
|
27869
28118
|
}
|
|
27870
28119
|
});
|
|
27871
28120
|
useEffect(() => {
|
|
27872
|
-
onSelectionDidChange == null ? void 0 : onSelectionDidChange(selectedItems);
|
|
28121
|
+
void (onSelectionDidChange == null ? void 0 : onSelectionDidChange(selectedItems));
|
|
27873
28122
|
}, [selectedItems, onSelectionDidChange]);
|
|
27874
28123
|
const checkAllRows = useEvent((checked) => {
|
|
27875
28124
|
if (!rowsSelectable) {
|
|
@@ -28274,7 +28523,6 @@ const PaginationNative = forwardRef(function PaginationNative2({
|
|
|
28274
28523
|
style: style2,
|
|
28275
28524
|
className,
|
|
28276
28525
|
labelPosition: orientation === "vertical" ? "top" : "start",
|
|
28277
|
-
isInputTemplateUsed: true,
|
|
28278
28526
|
children: /* @__PURE__ */ jsx(
|
|
28279
28527
|
"select",
|
|
28280
28528
|
{
|
|
@@ -29635,6 +29883,7 @@ const modalViewComponentRenderer = createComponentRenderer(
|
|
|
29635
29883
|
fullScreen: extractValue.asOptionalBoolean((_a2 = node.props) == null ? void 0 : _a2.fullScreen),
|
|
29636
29884
|
title: extractValue((_b = node.props) == null ? void 0 : _b.title),
|
|
29637
29885
|
closeButtonVisible: extractValue.asOptionalBoolean(node.props.closeButtonVisible),
|
|
29886
|
+
externalAnimation: extractValue.asOptionalBoolean(node.props.externalAnimation),
|
|
29638
29887
|
children: renderChild2(node.children, { type: "Stack" })
|
|
29639
29888
|
}
|
|
29640
29889
|
);
|
|
@@ -29780,7 +30029,6 @@ const IFrame = memo(forwardRef(function IFrame2({
|
|
|
29780
30029
|
...rest
|
|
29781
30030
|
}, ref) {
|
|
29782
30031
|
const iframeRef = useRef(null);
|
|
29783
|
-
useImperativeHandle(ref, () => iframeRef.current, []);
|
|
29784
30032
|
useEffect(() => {
|
|
29785
30033
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
29786
30034
|
postMessage: (message, targetOrigin = "*") => {
|
|
@@ -30823,7 +31071,7 @@ function Queue({
|
|
|
30823
31071
|
return;
|
|
30824
31072
|
}
|
|
30825
31073
|
let queueItem = queue[0];
|
|
30826
|
-
(async () => {
|
|
31074
|
+
void (async () => {
|
|
30827
31075
|
await doSingle(queueItem);
|
|
30828
31076
|
})();
|
|
30829
31077
|
}, [doComplete, doSingle, prevQueue, queue]);
|
|
@@ -31323,26 +31571,26 @@ const ListNative = forwardRef(function DynamicHeightList({
|
|
|
31323
31571
|
const tryToFetchPrevPage = useCallback(() => {
|
|
31324
31572
|
if (virtualizerRef.current && virtualizerRef.current.findStartIndex() < 10 && pageInfo && pageInfo.hasPrevPage && !pageInfo.isFetchingPrevPage && !isFetchingPrevPage.current) {
|
|
31325
31573
|
isFetchingPrevPage.current = true;
|
|
31326
|
-
|
|
31574
|
+
void async function doFetch() {
|
|
31327
31575
|
try {
|
|
31328
31576
|
await requestFetchPrevPage();
|
|
31329
31577
|
} finally {
|
|
31330
31578
|
isFetchingPrevPage.current = false;
|
|
31331
31579
|
}
|
|
31332
|
-
}
|
|
31580
|
+
}();
|
|
31333
31581
|
}
|
|
31334
31582
|
}, [pageInfo, requestFetchPrevPage]);
|
|
31335
31583
|
const isFetchingNextPage = useRef(false);
|
|
31336
31584
|
const tryToFetchNextPage = useCallback(() => {
|
|
31337
31585
|
if (virtualizerRef.current && virtualizerRef.current.findEndIndex() + 10 > rows.length && pageInfo && pageInfo.hasNextPage && !pageInfo.isFetchingNextPage && !isFetchingNextPage.current) {
|
|
31338
31586
|
isFetchingNextPage.current = true;
|
|
31339
|
-
|
|
31587
|
+
void async function doFetch() {
|
|
31340
31588
|
try {
|
|
31341
31589
|
await requestFetchNextPage();
|
|
31342
31590
|
} finally {
|
|
31343
31591
|
isFetchingNextPage.current = false;
|
|
31344
31592
|
}
|
|
31345
|
-
}
|
|
31593
|
+
}();
|
|
31346
31594
|
}
|
|
31347
31595
|
}, [rows.length, pageInfo, requestFetchNextPage]);
|
|
31348
31596
|
const initiallyFetchedExtraPages = useRef(false);
|
|
@@ -32238,7 +32486,7 @@ class PollClient {
|
|
|
32238
32486
|
this.polling = true;
|
|
32239
32487
|
this.tries = 0;
|
|
32240
32488
|
this.abortController = new AbortController();
|
|
32241
|
-
this.poll(this.abortController.signal);
|
|
32489
|
+
void this.poll(this.abortController.signal);
|
|
32242
32490
|
}
|
|
32243
32491
|
stopPoll() {
|
|
32244
32492
|
this.polling = false;
|
|
@@ -33064,7 +33312,7 @@ const SelectMd = createMetadata({
|
|
|
33064
33312
|
[`backgroundColor-${COMP$E}-badge--hover`]: "$color-primary-400",
|
|
33065
33313
|
[`backgroundColor-${COMP$E}-badge--active`]: "$color-primary-500",
|
|
33066
33314
|
[`textColor-item-${COMP$E}--disabled`]: "$color-surface-200",
|
|
33067
|
-
[`textColor-${COMP$E}-badge`]: "$color-surface-50",
|
|
33315
|
+
[`textColor-${COMP$E}-badge`]: "$const-color-surface-50",
|
|
33068
33316
|
[`backgroundColor-item-${COMP$E}`]: "$backgroundColor-dropdown-item",
|
|
33069
33317
|
[`backgroundColor-item-${COMP$E}--hover`]: "$backgroundColor-dropdown-item--hover",
|
|
33070
33318
|
[`backgroundColor-item-${COMP$E}--active`]: "$backgroundColor-dropdown-item--active",
|
|
@@ -33677,7 +33925,7 @@ async function invalidateQueries(invalidates, appContext, state) {
|
|
|
33677
33925
|
}
|
|
33678
33926
|
arrayToInvalidate.forEach((invalidate) => {
|
|
33679
33927
|
var _a3;
|
|
33680
|
-
(_a3 = appContext.queryClient) == null ? void 0 : _a3.invalidateQueries(
|
|
33928
|
+
void ((_a3 = appContext.queryClient) == null ? void 0 : _a3.invalidateQueries(
|
|
33681
33929
|
new DataLoaderQueryKeyGenerator(
|
|
33682
33930
|
extractParam(state, invalidate, appContext),
|
|
33683
33931
|
void 0,
|
|
@@ -33685,7 +33933,7 @@ async function invalidateQueries(invalidates, appContext, state) {
|
|
|
33685
33933
|
void 0,
|
|
33686
33934
|
void 0
|
|
33687
33935
|
).asPredicate()
|
|
33688
|
-
);
|
|
33936
|
+
));
|
|
33689
33937
|
});
|
|
33690
33938
|
} else {
|
|
33691
33939
|
await ((_a2 = appContext.queryClient) == null ? void 0 : _a2.invalidateQueries());
|
|
@@ -34153,7 +34401,7 @@ async function uploadFile({ appContext, state, lookupAction, uid }, {
|
|
|
34153
34401
|
throw e;
|
|
34154
34402
|
}
|
|
34155
34403
|
}
|
|
34156
|
-
invalidateQueries(invalidates, appContext, state);
|
|
34404
|
+
void invalidateQueries(invalidates, appContext, state);
|
|
34157
34405
|
return result;
|
|
34158
34406
|
}
|
|
34159
34407
|
const uploadAction = createAction("upload", uploadFile);
|
|
@@ -34239,7 +34487,7 @@ function Loader({
|
|
|
34239
34487
|
let intervalId;
|
|
34240
34488
|
if (pollIntervalInSeconds) {
|
|
34241
34489
|
intervalId = setInterval(() => {
|
|
34242
|
-
refetch();
|
|
34490
|
+
void refetch();
|
|
34243
34491
|
}, pollIntervalInSeconds * 1e3);
|
|
34244
34492
|
}
|
|
34245
34493
|
return () => {
|
|
@@ -34273,8 +34521,8 @@ function Loader({
|
|
|
34273
34521
|
}, [loaderLoaded2, uid]);
|
|
34274
34522
|
useEffect(() => {
|
|
34275
34523
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
34276
|
-
refetch:
|
|
34277
|
-
refetch(options2);
|
|
34524
|
+
refetch: (options2) => {
|
|
34525
|
+
void refetch(options2);
|
|
34278
34526
|
},
|
|
34279
34527
|
update: async (updater) => {
|
|
34280
34528
|
var _a2, _b;
|
|
@@ -34292,7 +34540,7 @@ function Loader({
|
|
|
34292
34540
|
}
|
|
34293
34541
|
(_b = appContext.queryClient) == null ? void 0 : _b.setQueryData(queryId, newData);
|
|
34294
34542
|
},
|
|
34295
|
-
addItem:
|
|
34543
|
+
addItem: (element, indexToInsert) => {
|
|
34296
34544
|
var _a2, _b;
|
|
34297
34545
|
const oldData = (_a2 = appContext.queryClient) == null ? void 0 : _a2.getQueryData(queryId);
|
|
34298
34546
|
const draft = createDraft(oldData);
|
|
@@ -34304,10 +34552,10 @@ function Loader({
|
|
|
34304
34552
|
const newData = finishDraft(draft);
|
|
34305
34553
|
(_b = appContext.queryClient) == null ? void 0 : _b.setQueryData(queryId, newData);
|
|
34306
34554
|
},
|
|
34307
|
-
getItems:
|
|
34555
|
+
getItems: () => {
|
|
34308
34556
|
return data;
|
|
34309
34557
|
},
|
|
34310
|
-
deleteItem:
|
|
34558
|
+
deleteItem: (element) => {
|
|
34311
34559
|
throw new Error("not implemented");
|
|
34312
34560
|
}
|
|
34313
34561
|
});
|
|
@@ -34468,7 +34716,9 @@ function MockLoader({
|
|
|
34468
34716
|
const waitTime = extractParam(state, loader.props.waitTime, appContext);
|
|
34469
34717
|
const responseObj = extractParam(state, loader.props.data, appContext);
|
|
34470
34718
|
const doLoad = useCallback(async () => {
|
|
34471
|
-
|
|
34719
|
+
if (waitTime) {
|
|
34720
|
+
await asyncWait(waitTime);
|
|
34721
|
+
}
|
|
34472
34722
|
return responseObj;
|
|
34473
34723
|
}, [responseObj, waitTime]);
|
|
34474
34724
|
return /* @__PURE__ */ jsx(
|
|
@@ -34616,7 +34866,7 @@ function PageableLoader({
|
|
|
34616
34866
|
const queryKey2 = thizRef.current;
|
|
34617
34867
|
return () => {
|
|
34618
34868
|
var _a2, _b;
|
|
34619
|
-
(_a2 = appContext.queryClient) == null ? void 0 : _a2.cancelQueries(queryKey2);
|
|
34869
|
+
void ((_a2 = appContext.queryClient) == null ? void 0 : _a2.cancelQueries(queryKey2));
|
|
34620
34870
|
(_b = appContext.queryClient) == null ? void 0 : _b.setQueryData(queryKey2, (old) => {
|
|
34621
34871
|
if (!old) {
|
|
34622
34872
|
return old;
|
|
@@ -34658,6 +34908,7 @@ function PageableLoader({
|
|
|
34658
34908
|
}, [
|
|
34659
34909
|
data,
|
|
34660
34910
|
error2,
|
|
34911
|
+
isRefetching,
|
|
34661
34912
|
loaderError2,
|
|
34662
34913
|
loaderLoaded2,
|
|
34663
34914
|
onLoaded,
|
|
@@ -34671,7 +34922,7 @@ function PageableLoader({
|
|
|
34671
34922
|
let intervalId;
|
|
34672
34923
|
if (pollIntervalInSeconds) {
|
|
34673
34924
|
intervalId = setInterval(() => {
|
|
34674
|
-
refetch();
|
|
34925
|
+
void refetch();
|
|
34675
34926
|
}, pollIntervalInSeconds * 1e3);
|
|
34676
34927
|
}
|
|
34677
34928
|
return () => {
|
|
@@ -34690,8 +34941,8 @@ function PageableLoader({
|
|
|
34690
34941
|
registerComponentApi({
|
|
34691
34942
|
fetchPrevPage,
|
|
34692
34943
|
fetchNextPage: stableFetchNextPage,
|
|
34693
|
-
refetch:
|
|
34694
|
-
refetch(options2);
|
|
34944
|
+
refetch: (options2) => {
|
|
34945
|
+
void refetch(options2);
|
|
34695
34946
|
},
|
|
34696
34947
|
update: async (updater) => {
|
|
34697
34948
|
var _a2, _b;
|
|
@@ -34715,7 +34966,7 @@ function PageableLoader({
|
|
|
34715
34966
|
const newData = finishDraft(draft);
|
|
34716
34967
|
(_b = appContext.queryClient) == null ? void 0 : _b.setQueryData(queryId, newData);
|
|
34717
34968
|
},
|
|
34718
|
-
addItem:
|
|
34969
|
+
addItem: (element, indexToInsert) => {
|
|
34719
34970
|
var _a2, _b;
|
|
34720
34971
|
const oldData = (_a2 = appContext.queryClient) == null ? void 0 : _a2.getQueryData(queryId);
|
|
34721
34972
|
const draft = createDraft(oldData);
|
|
@@ -34730,7 +34981,7 @@ function PageableLoader({
|
|
|
34730
34981
|
getItems: () => {
|
|
34731
34982
|
return data;
|
|
34732
34983
|
},
|
|
34733
|
-
deleteItem:
|
|
34984
|
+
deleteItem: (element) => {
|
|
34734
34985
|
throw new Error("not implemented");
|
|
34735
34986
|
}
|
|
34736
34987
|
});
|
|
@@ -34874,8 +35125,14 @@ function DataLoader({
|
|
|
34874
35125
|
}
|
|
34875
35126
|
const response = await fetch(queryUrl, fetchOptions);
|
|
34876
35127
|
if (!response.ok) {
|
|
34877
|
-
console.error(
|
|
34878
|
-
|
|
35128
|
+
console.error(
|
|
35129
|
+
"[SQL DataLoader] Failed response:",
|
|
35130
|
+
response.status,
|
|
35131
|
+
response.statusText
|
|
35132
|
+
);
|
|
35133
|
+
throw new Error(
|
|
35134
|
+
`Failed to execute SQL query: ${response.status} ${response.statusText}`
|
|
35135
|
+
);
|
|
34879
35136
|
}
|
|
34880
35137
|
const jsonResult = await response.json();
|
|
34881
35138
|
if (jsonResult && typeof jsonResult === "object") {
|
|
@@ -34903,15 +35160,7 @@ function DataLoader({
|
|
|
34903
35160
|
});
|
|
34904
35161
|
}
|
|
34905
35162
|
},
|
|
34906
|
-
[
|
|
34907
|
-
api,
|
|
34908
|
-
loader.props,
|
|
34909
|
-
state,
|
|
34910
|
-
url,
|
|
34911
|
-
body,
|
|
34912
|
-
rawBody,
|
|
34913
|
-
appContext
|
|
34914
|
-
]
|
|
35163
|
+
[api, loader.props, state, url, body, rawBody, appContext]
|
|
34915
35164
|
);
|
|
34916
35165
|
const queryId = useMemo(() => {
|
|
34917
35166
|
return new DataLoaderQueryKeyGenerator(
|
|
@@ -34944,7 +35193,7 @@ function DataLoader({
|
|
|
34944
35193
|
}
|
|
34945
35194
|
}
|
|
34946
35195
|
},
|
|
34947
|
-
[loader.props.inProgressNotificationMessage, loaderInProgressChanged2
|
|
35196
|
+
[loader.props.inProgressNotificationMessage, loaderInProgressChanged2]
|
|
34948
35197
|
);
|
|
34949
35198
|
const loaded = useCallback(
|
|
34950
35199
|
(data, pageInfo) => {
|
|
@@ -34967,7 +35216,7 @@ function DataLoader({
|
|
|
34967
35216
|
}
|
|
34968
35217
|
}
|
|
34969
35218
|
},
|
|
34970
|
-
[loader.props.completedNotificationMessage, loaderLoaded2
|
|
35219
|
+
[loader.props.completedNotificationMessage, loaderLoaded2]
|
|
34971
35220
|
);
|
|
34972
35221
|
const error2 = useCallback(
|
|
34973
35222
|
async (error22) => {
|
|
@@ -35092,7 +35341,9 @@ const dataLoaderRenderer = createLoaderRenderer(
|
|
|
35092
35341
|
}) => {
|
|
35093
35342
|
var _a2, _b, _c;
|
|
35094
35343
|
if (!((_a2 = loader.props) == null ? void 0 : _a2.url) || !loader.props.url.trim()) {
|
|
35095
|
-
throw new Error(
|
|
35344
|
+
throw new Error(
|
|
35345
|
+
"You must specify a non-empty (not whitespace-only) 'url' property for DataSource"
|
|
35346
|
+
);
|
|
35096
35347
|
}
|
|
35097
35348
|
return /* @__PURE__ */ jsx(
|
|
35098
35349
|
IndexAwareDataLoader,
|
|
@@ -35666,7 +35917,6 @@ const DateInput = forwardRef(function DateInputNative({
|
|
|
35666
35917
|
return null;
|
|
35667
35918
|
}
|
|
35668
35919
|
}, [day2, month2, year2]);
|
|
35669
|
-
useImperativeHandle(ref, () => dateInputRef.current);
|
|
35670
35920
|
useEffect(() => {
|
|
35671
35921
|
if (registerComponentApi) {
|
|
35672
35922
|
registerComponentApi({
|
|
@@ -36993,7 +37243,6 @@ const TimeInputNative = forwardRef(function TimeInputNative2({
|
|
|
36993
37243
|
const s24 = (second2 || "00").padStart(2, "0");
|
|
36994
37244
|
return `${h24}:${m24}:${s24}`;
|
|
36995
37245
|
}, [hour2, minute2, second2, amPm, is12HourFormat]);
|
|
36996
|
-
useImperativeHandle(ref, () => timeInputRef.current);
|
|
36997
37246
|
useEffect(() => {
|
|
36998
37247
|
if (registerComponentApi) {
|
|
36999
37248
|
registerComponentApi({
|
|
@@ -37740,7 +37989,6 @@ const Timer = forwardRef(function Timer2({
|
|
|
37740
37989
|
isPaused: () => isPaused,
|
|
37741
37990
|
isRunning: () => isRunning && !isPaused
|
|
37742
37991
|
}), [pause, resume, isPaused, isRunning]);
|
|
37743
|
-
useImperativeHandle(forwardedRef, () => timerApi, [timerApi]);
|
|
37744
37992
|
useEffect(() => {
|
|
37745
37993
|
if (registerComponentApi) {
|
|
37746
37994
|
registerComponentApi(timerApi);
|
|
@@ -39940,26 +40188,31 @@ const AutoCompleteMd = createMetadata({
|
|
|
39940
40188
|
},
|
|
39941
40189
|
themeVars: parseScssVar(styles$L.themeVars),
|
|
39942
40190
|
defaultThemeVars: {
|
|
39943
|
-
[`backgroundColor-menu-${COMP$j}`]: "$
|
|
40191
|
+
[`backgroundColor-menu-${COMP$j}`]: "$color-surface-raised",
|
|
39944
40192
|
[`boxShadow-menu-${COMP$j}`]: "$boxShadow-md",
|
|
39945
40193
|
[`borderRadius-menu-${COMP$j}`]: "$borderRadius",
|
|
39946
40194
|
[`borderWidth-menu-${COMP$j}`]: "1px",
|
|
39947
40195
|
[`borderColor-menu-${COMP$j}`]: "$borderColor",
|
|
39948
|
-
[`backgroundColor-item-${COMP$j}`]: "$backgroundColor-dropdown-item",
|
|
39949
|
-
[`backgroundColor-item-${COMP$j}--hover`]: "$backgroundColor-dropdown-item--active",
|
|
39950
|
-
[`backgroundColor-item-${COMP$j}--active`]: "$backgroundColor-dropdown-item--active",
|
|
39951
|
-
[`minHeight-Input`]: "39px",
|
|
39952
40196
|
[`backgroundColor-${COMP$j}-badge`]: "$color-primary-500",
|
|
39953
40197
|
[`fontSize-${COMP$j}-badge`]: "$fontSize-sm",
|
|
40198
|
+
[`paddingHorizontal-${COMP$j}-badge`]: "$space-2_5",
|
|
40199
|
+
[`paddingVertical-${COMP$j}-badge`]: "$space-0_5",
|
|
39954
40200
|
[`borderRadius-${COMP$j}-badge`]: "$borderRadius",
|
|
39955
|
-
[`paddingHorizontal-${COMP$j}
|
|
39956
|
-
[`paddingVertical-${COMP$j}
|
|
39957
|
-
[`paddingHorizontal-${COMP$j}`]: "$space-
|
|
40201
|
+
[`paddingHorizontal-item-${COMP$j}`]: "$space-2",
|
|
40202
|
+
[`paddingVertical-item-${COMP$j}`]: "$space-2",
|
|
40203
|
+
[`paddingHorizontal-${COMP$j}`]: "$space-2",
|
|
39958
40204
|
[`paddingVertical-${COMP$j}`]: "$space-2",
|
|
40205
|
+
[`opacity-text-item-${COMP$j}--disabled`]: "0.5",
|
|
40206
|
+
[`opacity-${COMP$j}--disabled`]: "0.5",
|
|
39959
40207
|
[`backgroundColor-${COMP$j}-badge--hover`]: "$color-primary-400",
|
|
39960
40208
|
[`backgroundColor-${COMP$j}-badge--active`]: "$color-primary-500",
|
|
39961
40209
|
[`textColor-item-${COMP$j}--disabled`]: "$color-surface-200",
|
|
39962
|
-
[`textColor-${COMP$j}-badge`]: "$const-color-surface-50"
|
|
40210
|
+
[`textColor-${COMP$j}-badge`]: "$const-color-surface-50",
|
|
40211
|
+
[`backgroundColor-item-${COMP$j}`]: "$backgroundColor-dropdown-item",
|
|
40212
|
+
[`backgroundColor-item-${COMP$j}--hover`]: "$backgroundColor-dropdown-item--hover",
|
|
40213
|
+
[`backgroundColor-item-${COMP$j}--active`]: "$backgroundColor-dropdown-item--active",
|
|
40214
|
+
// Default borderColor-Input--disabled is too light so the disabled component is barely visible
|
|
40215
|
+
[`borderColor-${COMP$j}--disabled`]: "initial"
|
|
39963
40216
|
}
|
|
39964
40217
|
});
|
|
39965
40218
|
const autoCompleteComponentRenderer = createComponentRenderer(
|
|
@@ -42406,7 +42659,7 @@ function InspectButton$1({
|
|
|
42406
42659
|
htmlElement.removeEventListener("mouseenter", mouseenter);
|
|
42407
42660
|
htmlElement.removeEventListener("mouseleave", mouseleave);
|
|
42408
42661
|
};
|
|
42409
|
-
}, [inspectId, node, inspectMode, setShowCode]);
|
|
42662
|
+
}, [inspectId, node, inspectMode, setShowCode, setInspectedNode]);
|
|
42410
42663
|
return /* @__PURE__ */ jsx(Fragment, { children: inspectMode ? null : visible && !!root2 && createPortal(
|
|
42411
42664
|
/* @__PURE__ */ jsx(
|
|
42412
42665
|
Button,
|
|
@@ -45786,7 +46039,7 @@ const Dialog = ({
|
|
|
45786
46039
|
] });
|
|
45787
46040
|
};
|
|
45788
46041
|
const ConfirmationModalContext = React__default.createContext({
|
|
45789
|
-
confirm:
|
|
46042
|
+
confirm: (title2, message, actionLabel) => Promise.resolve(false)
|
|
45790
46043
|
});
|
|
45791
46044
|
const useConfirm = () => useContext(ConfirmationModalContext);
|
|
45792
46045
|
const ConfirmationModalContextProvider = ({ children }) => {
|
|
@@ -45808,7 +46061,7 @@ const ConfirmationModalContextProvider = ({ children }) => {
|
|
|
45808
46061
|
}
|
|
45809
46062
|
}, [showConfirmationModal]);
|
|
45810
46063
|
const handleShow = useCallback(
|
|
45811
|
-
|
|
46064
|
+
(title22, message2, actionLabel) => {
|
|
45812
46065
|
if (typeof title22 === "string") {
|
|
45813
46066
|
setTitle(title22);
|
|
45814
46067
|
setButtons([
|
|
@@ -46630,7 +46883,7 @@ function IconProvider({ children }) {
|
|
|
46630
46883
|
/* @__PURE__ */ jsx("svg", { style: { display: "none" }, ref: spriteRootRef })
|
|
46631
46884
|
] });
|
|
46632
46885
|
}
|
|
46633
|
-
const version = "0.10.
|
|
46886
|
+
const version = "0.10.21";
|
|
46634
46887
|
const miscellaneousUtils = {
|
|
46635
46888
|
capitalize,
|
|
46636
46889
|
pluralize: pluralize$1,
|
|
@@ -47137,7 +47390,7 @@ async function evalCalculatedMemberAccessAsync(evaluator, thisStack, expr, evalC
|
|
|
47137
47390
|
await completeExprValue(expr.member, thread);
|
|
47138
47391
|
return evalCalculatedMemberAccessCore(thisStack, expr, evalContext, thread);
|
|
47139
47392
|
}
|
|
47140
|
-
|
|
47393
|
+
function evalSequenceAsync(evaluator, thisStack, expr, evalContext, thread) {
|
|
47141
47394
|
if (!expr.exprs || expr.exprs.length === 0) {
|
|
47142
47395
|
throw new Error(`Missing expression sequence`);
|
|
47143
47396
|
}
|
|
@@ -47249,7 +47502,7 @@ async function evalAssignmentAsync(evaluator, thisStack, expr, evalContext, thre
|
|
|
47249
47502
|
const rootScope = getRootIdScope(leftValue, evalContext, thread);
|
|
47250
47503
|
const updatesState = rootScope && rootScope.type !== "block";
|
|
47251
47504
|
if (updatesState && evalContext.onWillUpdate) {
|
|
47252
|
-
evalContext.onWillUpdate(rootScope, rootScope.name, "assignment");
|
|
47505
|
+
void evalContext.onWillUpdate(rootScope, rootScope.name, "assignment");
|
|
47253
47506
|
}
|
|
47254
47507
|
await evaluator(thisStack, leftValue, evalContext, thread);
|
|
47255
47508
|
thisStack.pop();
|
|
@@ -47259,7 +47512,7 @@ async function evalAssignmentAsync(evaluator, thisStack, expr, evalContext, thre
|
|
|
47259
47512
|
await completeExprValue(expr.expr, thread);
|
|
47260
47513
|
const value = evalAssignmentCore(thisStack, expr, evalContext, thread);
|
|
47261
47514
|
if (updatesState && evalContext.onDidUpdate) {
|
|
47262
|
-
evalContext.onDidUpdate(rootScope, rootScope.name, "assignment");
|
|
47515
|
+
void evalContext.onDidUpdate(rootScope, rootScope.name, "assignment");
|
|
47263
47516
|
}
|
|
47264
47517
|
return value;
|
|
47265
47518
|
}
|
|
@@ -47267,14 +47520,14 @@ async function evalPreOrPostAsync(evaluator, thisStack, expr, evalContext, threa
|
|
|
47267
47520
|
const rootScope = getRootIdScope(expr.expr, evalContext, thread);
|
|
47268
47521
|
const updatesState = rootScope && rootScope.type !== "block";
|
|
47269
47522
|
if (updatesState && evalContext.onWillUpdate) {
|
|
47270
|
-
evalContext.onWillUpdate(rootScope, rootScope.name, "pre-post");
|
|
47523
|
+
void evalContext.onWillUpdate(rootScope, rootScope.name, "pre-post");
|
|
47271
47524
|
}
|
|
47272
47525
|
await evaluator(thisStack, expr.expr, evalContext, thread);
|
|
47273
47526
|
thisStack.pop();
|
|
47274
47527
|
await completeExprValue(expr.expr, thread);
|
|
47275
47528
|
const value = evalPreOrPostCore(thisStack, expr, evalContext, thread);
|
|
47276
47529
|
if (updatesState && evalContext.onDidUpdate) {
|
|
47277
|
-
evalContext.onDidUpdate(rootScope, rootScope.name, "pre-post");
|
|
47530
|
+
void evalContext.onDidUpdate(rootScope, rootScope.name, "pre-post");
|
|
47278
47531
|
}
|
|
47279
47532
|
return value;
|
|
47280
47533
|
}
|
|
@@ -47322,8 +47575,8 @@ async function evalFunctionInvocationAsync(evaluator, thisStack, expr, evalConte
|
|
|
47322
47575
|
functionArgs.push(...funcArg);
|
|
47323
47576
|
} else {
|
|
47324
47577
|
if (arg.type === T_ARROW_EXPRESSION) {
|
|
47325
|
-
const funcArg =
|
|
47326
|
-
const wrappedFunc =
|
|
47578
|
+
const funcArg = createArrowFunctionAsync(evaluator, arg);
|
|
47579
|
+
const wrappedFunc = (...args) => {
|
|
47327
47580
|
return funcArg(arg.args, evalContext, thread, ...args);
|
|
47328
47581
|
};
|
|
47329
47582
|
functionArgs.push(wrappedFunc);
|
|
@@ -47331,7 +47584,7 @@ async function evalFunctionInvocationAsync(evaluator, thisStack, expr, evalConte
|
|
|
47331
47584
|
await evaluator([], arg, evalContext, thread);
|
|
47332
47585
|
const funcArg = await completeExprValue(arg, thread);
|
|
47333
47586
|
if (funcArg == null ? void 0 : funcArg._ARROW_EXPR_) {
|
|
47334
|
-
const wrappedFuncArg =
|
|
47587
|
+
const wrappedFuncArg = createArrowFunctionAsync(evaluator, funcArg);
|
|
47335
47588
|
const wrappedFunc = (...args) => wrappedFuncArg(funcArg.args, evalContext, thread, ...args);
|
|
47336
47589
|
functionArgs.push(wrappedFunc);
|
|
47337
47590
|
} else {
|
|
@@ -47360,18 +47613,18 @@ async function evalFunctionInvocationAsync(evaluator, thisStack, expr, evalConte
|
|
|
47360
47613
|
const rootScope = getRootIdScope(expr.obj, evalContext, thread);
|
|
47361
47614
|
const updatesState = rootScope && rootScope.type !== "block";
|
|
47362
47615
|
if (updatesState && evalContext.onWillUpdate) {
|
|
47363
|
-
evalContext.onWillUpdate(rootScope, rootScope.name, "function-call");
|
|
47616
|
+
void evalContext.onWillUpdate(rootScope, rootScope.name, "function-call");
|
|
47364
47617
|
}
|
|
47365
47618
|
const value = ((_b = evalContext.options) == null ? void 0 : _b.defaultToOptionalMemberAccess) ? functionObj == null ? void 0 : functionObj.call(currentContext, ...functionArgs) : functionObj.call(currentContext, ...functionArgs);
|
|
47366
47619
|
let returnValue = await completePromise(value);
|
|
47367
47620
|
if (updatesState && evalContext.onDidUpdate) {
|
|
47368
|
-
evalContext.onDidUpdate(rootScope, rootScope.name, "function-call");
|
|
47621
|
+
void evalContext.onDidUpdate(rootScope, rootScope.name, "function-call");
|
|
47369
47622
|
}
|
|
47370
47623
|
setExprValue(expr, { value: returnValue }, thread);
|
|
47371
47624
|
thisStack.push(returnValue);
|
|
47372
47625
|
return returnValue;
|
|
47373
47626
|
}
|
|
47374
|
-
|
|
47627
|
+
function createArrowFunctionAsync(evaluator, expr) {
|
|
47375
47628
|
return async (...args) => {
|
|
47376
47629
|
const runTimeEvalContext = args[1];
|
|
47377
47630
|
const runtimeThread = args[2];
|
|
@@ -47497,7 +47750,7 @@ async function createArrowFunctionAsync(evaluator, expr) {
|
|
|
47497
47750
|
return returnValue;
|
|
47498
47751
|
};
|
|
47499
47752
|
}
|
|
47500
|
-
|
|
47753
|
+
function completePromise(input2) {
|
|
47501
47754
|
const visited = /* @__PURE__ */ new Map();
|
|
47502
47755
|
return completePromiseInternal(input2);
|
|
47503
47756
|
async function completePromiseInternal(input22) {
|
|
@@ -50112,7 +50365,7 @@ const Animation$1 = forwardRef(function Animation2({
|
|
|
50112
50365
|
const [reset, setReset] = useState(false);
|
|
50113
50366
|
const [count, setCount] = useState(0);
|
|
50114
50367
|
const times = 1;
|
|
50115
|
-
|
|
50368
|
+
useId();
|
|
50116
50369
|
const animationSettings = useMemo(
|
|
50117
50370
|
() => ({
|
|
50118
50371
|
from: _animation.from,
|
|
@@ -50155,9 +50408,9 @@ const Animation$1 = forwardRef(function Animation2({
|
|
|
50155
50408
|
onStart,
|
|
50156
50409
|
onStop,
|
|
50157
50410
|
reset,
|
|
50411
|
+
once,
|
|
50158
50412
|
reverse2,
|
|
50159
|
-
toggle
|
|
50160
|
-
animationId
|
|
50413
|
+
toggle
|
|
50161
50414
|
]
|
|
50162
50415
|
);
|
|
50163
50416
|
const [springs, api] = useSpring(
|
|
@@ -50171,7 +50424,7 @@ const Animation$1 = forwardRef(function Animation2({
|
|
|
50171
50424
|
});
|
|
50172
50425
|
const composedRef = ref ? composeRefs(ref, forwardedRef) : forwardedRef;
|
|
50173
50426
|
const startAnimation = useCallback(() => {
|
|
50174
|
-
api.start(_animation);
|
|
50427
|
+
void api.start(_animation);
|
|
50175
50428
|
return () => {
|
|
50176
50429
|
api.stop();
|
|
50177
50430
|
};
|
|
@@ -50190,7 +50443,7 @@ const Animation$1 = forwardRef(function Animation2({
|
|
|
50190
50443
|
children,
|
|
50191
50444
|
(child, index) => animateWhenInView ? /* @__PURE__ */ jsx(AnimatedComponent, { ...rest, style: animationStyles, ref: composedRef, children: child }, index) : /* @__PURE__ */ jsx(AnimatedComponent, { ...rest, style: springs, ref: forwardedRef, children: child }, index)
|
|
50192
50445
|
);
|
|
50193
|
-
}, [animateWhenInView, animationStyles, children, springs, rest]);
|
|
50446
|
+
}, [animateWhenInView, animationStyles, children, springs, rest, composedRef, forwardedRef]);
|
|
50194
50447
|
return content2;
|
|
50195
50448
|
});
|
|
50196
50449
|
const tooltipBehavior = {
|
|
@@ -50221,12 +50474,11 @@ const animationBehavior = {
|
|
|
50221
50474
|
var _a2, _b;
|
|
50222
50475
|
const { extractValue } = context;
|
|
50223
50476
|
const animation = extractValue((_a2 = context.node.props) == null ? void 0 : _a2.animation, true);
|
|
50224
|
-
const animationOptions = extractValue(
|
|
50225
|
-
(_b = context.node.props) == null ? void 0 : _b.animationOptions,
|
|
50226
|
-
true
|
|
50227
|
-
);
|
|
50477
|
+
const animationOptions = extractValue((_b = context.node.props) == null ? void 0 : _b.animationOptions, true);
|
|
50228
50478
|
const parsedOptions = parseAnimationOptions(animationOptions);
|
|
50229
|
-
return /* @__PURE__ */ jsx(Animation$1, { animation: parseAnimation(animation), ...parsedOptions, children: node
|
|
50479
|
+
return /* @__PURE__ */ jsx(Animation$1, { animation: parseAnimation(animation), ...parsedOptions, children: context.node.type === "ModalDialog" ? cloneElement(node, {
|
|
50480
|
+
externalAnimation: true
|
|
50481
|
+
}) : node });
|
|
50230
50482
|
}
|
|
50231
50483
|
};
|
|
50232
50484
|
const labelBehavior = {
|
|
@@ -51220,11 +51472,6 @@ function AppContent({
|
|
|
51220
51472
|
root2
|
|
51221
51473
|
]);
|
|
51222
51474
|
const [appState, setAppState] = useState(EMPTY_OBJECT);
|
|
51223
|
-
const registerAppState = useCallback((bucket, initialValue) => {
|
|
51224
|
-
setAppState((prev) => {
|
|
51225
|
-
return { ...prev, [bucket]: initialValue };
|
|
51226
|
-
});
|
|
51227
|
-
}, []);
|
|
51228
51475
|
const update = useCallback((bucket, patch) => {
|
|
51229
51476
|
setAppState((prev) => {
|
|
51230
51477
|
return {
|
|
@@ -51238,11 +51485,10 @@ function AppContent({
|
|
|
51238
51485
|
}, []);
|
|
51239
51486
|
const appStateContextValue = useMemo(() => {
|
|
51240
51487
|
return {
|
|
51241
|
-
registerAppState,
|
|
51242
51488
|
appState,
|
|
51243
51489
|
update
|
|
51244
51490
|
};
|
|
51245
|
-
}, [appState,
|
|
51491
|
+
}, [appState, update]);
|
|
51246
51492
|
return /* @__PURE__ */ jsx(AppContext.Provider, { value: appContextValue, children: /* @__PURE__ */ jsx(AppStateContext.Provider, { value: appStateContextValue, children: /* @__PURE__ */ jsx(StandaloneComponent, { node: rootContainer, children }) }) });
|
|
51247
51493
|
}
|
|
51248
51494
|
function signError(error2) {
|
|
@@ -51382,8 +51628,8 @@ function ApiInterceptorProvider({
|
|
|
51382
51628
|
if (!interceptor) {
|
|
51383
51629
|
return;
|
|
51384
51630
|
}
|
|
51385
|
-
(async () => {
|
|
51386
|
-
const { initMock } = await import("./initMock-
|
|
51631
|
+
void (async () => {
|
|
51632
|
+
const { initMock } = await import("./initMock-Dw9wrVkQ.mjs");
|
|
51387
51633
|
const apiInstance2 = await initMock(interceptor);
|
|
51388
51634
|
setApiInstance(apiInstance2);
|
|
51389
51635
|
setInitialized(true);
|
|
@@ -51396,11 +51642,11 @@ function ApiInterceptorProvider({
|
|
|
51396
51642
|
if (!hasParentInterceptorContext) {
|
|
51397
51643
|
if (interceptor || forceInitialize) {
|
|
51398
51644
|
let interceptorWorker2;
|
|
51399
|
-
(async () => {
|
|
51645
|
+
void (async () => {
|
|
51400
51646
|
if (define_process_env_default$2.VITE_MOCK_ENABLED) {
|
|
51401
51647
|
const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
|
|
51402
|
-
useWorker ? import("./apiInterceptorWorker-
|
|
51403
|
-
import("./initMock-
|
|
51648
|
+
useWorker ? import("./apiInterceptorWorker-Dql7QGw2.mjs") : Promise.resolve({ createApiInterceptorWorker: () => null }),
|
|
51649
|
+
import("./initMock-Dw9wrVkQ.mjs")
|
|
51404
51650
|
]);
|
|
51405
51651
|
if (interceptor || forceInitialize) {
|
|
51406
51652
|
const apiInstance2 = await initMock(interceptor || {});
|
|
@@ -51434,10 +51680,10 @@ function ApiInterceptorProvider({
|
|
|
51434
51680
|
return;
|
|
51435
51681
|
}
|
|
51436
51682
|
if (parentInterceptorWorker) {
|
|
51437
|
-
(async () => {
|
|
51683
|
+
void (async () => {
|
|
51438
51684
|
const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
|
|
51439
|
-
import("./apiInterceptorWorker-
|
|
51440
|
-
import("./initMock-
|
|
51685
|
+
import("./apiInterceptorWorker-Dql7QGw2.mjs"),
|
|
51686
|
+
import("./initMock-Dw9wrVkQ.mjs")
|
|
51441
51687
|
]);
|
|
51442
51688
|
const apiInstance2 = await initMock(interceptor);
|
|
51443
51689
|
await createApiInterceptorWorker(apiInstance2, parentInterceptorWorker);
|
|
@@ -53932,13 +54178,7 @@ function xmlUiMarkupToComponent(source, fileId = 0) {
|
|
|
53932
54178
|
const { parse: parse2, getText } = createXmlUiParser(source);
|
|
53933
54179
|
const { node, errors } = parse2();
|
|
53934
54180
|
if (errors.length > 0) {
|
|
53935
|
-
const
|
|
53936
|
-
for (let i = 0; i < source.length; ++i) {
|
|
53937
|
-
if (source[i] === "\n") {
|
|
53938
|
-
newlinePositions.push(i);
|
|
53939
|
-
}
|
|
53940
|
-
}
|
|
53941
|
-
const errorsForDisplay = addDisplayFieldsToErrors(errors, source, newlinePositions);
|
|
54181
|
+
const errorsForDisplay = addDisplayFieldsToErrors(errors, source);
|
|
53942
54182
|
const erroneousCompoundComponentName = getCompoundCompName(node, getText);
|
|
53943
54183
|
return { component: null, errors: errorsForDisplay, erroneousCompoundComponentName };
|
|
53944
54184
|
}
|
|
@@ -54234,21 +54474,6 @@ function errReportComponent(errors, fileName, compoundCompName) {
|
|
|
54234
54474
|
comp.component = createErrorReportComponent(errors, fileName);
|
|
54235
54475
|
return comp;
|
|
54236
54476
|
}
|
|
54237
|
-
function offsetToPosition(offset, newlinePositions) {
|
|
54238
|
-
let left2 = 0;
|
|
54239
|
-
let right2 = newlinePositions.length;
|
|
54240
|
-
while (left2 < right2) {
|
|
54241
|
-
const mid = Math.floor((left2 + right2) / 2);
|
|
54242
|
-
if (newlinePositions[mid] < offset) {
|
|
54243
|
-
left2 = mid + 1;
|
|
54244
|
-
} else {
|
|
54245
|
-
right2 = mid;
|
|
54246
|
-
}
|
|
54247
|
-
}
|
|
54248
|
-
let line2 = left2 + 1;
|
|
54249
|
-
let col = left2 === 0 ? offset + 1 : offset - newlinePositions[left2 - 1];
|
|
54250
|
-
return { line: line2, col };
|
|
54251
|
-
}
|
|
54252
54477
|
function getCompoundCompName(node, getText) {
|
|
54253
54478
|
var _a2, _b, _c, _d, _e, _f;
|
|
54254
54479
|
const rootTag = (_a2 = node == null ? void 0 : node.children) == null ? void 0 : _a2[0];
|
|
@@ -54270,10 +54495,11 @@ function getCompoundCompName(node, getText) {
|
|
|
54270
54495
|
}
|
|
54271
54496
|
return void 0;
|
|
54272
54497
|
}
|
|
54273
|
-
function addDisplayFieldsToErrors(errors, source
|
|
54498
|
+
function addDisplayFieldsToErrors(errors, source) {
|
|
54499
|
+
const { offsetToPosForDisplay } = createDocumentCursor(source);
|
|
54274
54500
|
return errors.map((err) => {
|
|
54275
|
-
const { line: errPosLine,
|
|
54276
|
-
const { line: contextStartLine } =
|
|
54501
|
+
const { line: errPosLine, character: errPosCol } = offsetToPosForDisplay(err.pos);
|
|
54502
|
+
const { line: contextStartLine } = offsetToPosForDisplay(err.contextPos);
|
|
54277
54503
|
return {
|
|
54278
54504
|
...err,
|
|
54279
54505
|
errPosLine,
|
|
@@ -54283,6 +54509,38 @@ function addDisplayFieldsToErrors(errors, source, newlinePositions) {
|
|
|
54283
54509
|
};
|
|
54284
54510
|
});
|
|
54285
54511
|
}
|
|
54512
|
+
function createDocumentCursor(text2) {
|
|
54513
|
+
const newlinePositions = [];
|
|
54514
|
+
for (let i = 0; i < text2.length; ++i) {
|
|
54515
|
+
if (text2[i] === "\n") {
|
|
54516
|
+
newlinePositions.push(i);
|
|
54517
|
+
}
|
|
54518
|
+
}
|
|
54519
|
+
return {
|
|
54520
|
+
offsetToPos,
|
|
54521
|
+
offsetToPosForDisplay
|
|
54522
|
+
};
|
|
54523
|
+
function offsetToPos(offset) {
|
|
54524
|
+
let left2 = 0;
|
|
54525
|
+
let right2 = newlinePositions.length;
|
|
54526
|
+
while (left2 < right2) {
|
|
54527
|
+
const mid = Math.floor((left2 + right2) / 2);
|
|
54528
|
+
if (newlinePositions[mid] < offset) {
|
|
54529
|
+
left2 = mid + 1;
|
|
54530
|
+
} else {
|
|
54531
|
+
right2 = mid;
|
|
54532
|
+
}
|
|
54533
|
+
}
|
|
54534
|
+
let col = left2 === 0 ? offset : offset - newlinePositions[left2 - 1] - 1;
|
|
54535
|
+
return { line: left2, character: col };
|
|
54536
|
+
}
|
|
54537
|
+
function offsetToPosForDisplay(offset) {
|
|
54538
|
+
let pos = offsetToPos(offset);
|
|
54539
|
+
pos.line += 1;
|
|
54540
|
+
pos.character += 1;
|
|
54541
|
+
return pos;
|
|
54542
|
+
}
|
|
54543
|
+
}
|
|
54286
54544
|
const MotionContent = motion.create(SheetPrimitive.Content);
|
|
54287
54545
|
const overlayVariants = {
|
|
54288
54546
|
visible: { opacity: 1 },
|
|
@@ -54771,7 +55029,7 @@ function NestedApp({
|
|
|
54771
55029
|
}
|
|
54772
55030
|
return null;
|
|
54773
55031
|
});
|
|
54774
|
-
Promise.all(sheetPromises).then((sheets) => {
|
|
55032
|
+
void Promise.all(sheetPromises).then((sheets) => {
|
|
54775
55033
|
const validSheets = sheets.filter(Boolean);
|
|
54776
55034
|
shadowRef.current.adoptedStyleSheets = validSheets;
|
|
54777
55035
|
});
|
|
@@ -54890,7 +55148,10 @@ function NestedApp({
|
|
|
54890
55148
|
)
|
|
54891
55149
|
] });
|
|
54892
55150
|
}
|
|
54893
|
-
function NestedAppRoot({
|
|
55151
|
+
function NestedAppRoot({
|
|
55152
|
+
children,
|
|
55153
|
+
themeStylesToReset
|
|
55154
|
+
}) {
|
|
54894
55155
|
const themeVarReset = useMemo(() => {
|
|
54895
55156
|
const vars2 = {};
|
|
54896
55157
|
Object.keys(themeStylesToReset).forEach((key) => {
|
|
@@ -55029,7 +55290,7 @@ function AppWithCodeViewNative({
|
|
|
55029
55290
|
{
|
|
55030
55291
|
className: styles$e.headerButton,
|
|
55031
55292
|
onClick: () => {
|
|
55032
|
-
openPlayground();
|
|
55293
|
+
void openPlayground();
|
|
55033
55294
|
},
|
|
55034
55295
|
children: /* @__PURE__ */ jsx(RxOpenInNewWindow, {})
|
|
55035
55296
|
}
|
|
@@ -56613,21 +56874,21 @@ const FormItem = memo(function FormItem2({
|
|
|
56613
56874
|
return safeBindTo;
|
|
56614
56875
|
}
|
|
56615
56876
|
}, [bindTo, defaultId, itemIndex, parentFormItemId]);
|
|
56616
|
-
const labelWidthValue = useFormContextPart((value2) => labelWidth || value2.itemLabelWidth);
|
|
56877
|
+
const labelWidthValue = useFormContextPart((value2) => labelWidth || (value2 == null ? void 0 : value2.itemLabelWidth));
|
|
56617
56878
|
const labelBreakValue = useFormContextPart(
|
|
56618
|
-
(value2) => labelBreak2 !== void 0 ? labelBreak2 : value2.itemLabelBreak
|
|
56879
|
+
(value2) => labelBreak2 !== void 0 ? labelBreak2 : value2 == null ? void 0 : value2.itemLabelBreak
|
|
56619
56880
|
);
|
|
56620
56881
|
const labelPositionValue = useFormContextPart(
|
|
56621
|
-
(value2) => labelPosition || value2.itemLabelPosition || DEFAULT_LABEL_POSITIONS[type]
|
|
56882
|
+
(value2) => labelPosition || (value2 == null ? void 0 : value2.itemLabelPosition) || DEFAULT_LABEL_POSITIONS[type]
|
|
56622
56883
|
);
|
|
56623
56884
|
const initialValueFromSubject = useFormContextPart(
|
|
56624
|
-
(value2) => getByPath(value2.originalSubject, formItemId)
|
|
56885
|
+
(value2) => getByPath(value2 == null ? void 0 : value2.originalSubject, formItemId)
|
|
56625
56886
|
);
|
|
56626
56887
|
const initialValue = initialValueFromSubject === void 0 ? initialValueFromProps : initialValueFromSubject;
|
|
56627
|
-
const value = useFormContextPart((value2) => getByPath(value2.subject, formItemId));
|
|
56628
|
-
const validationResult = useFormContextPart((value2) => value2.validationResults[formItemId]);
|
|
56629
|
-
const dispatch = useFormContextPart((value2) => value2.dispatch);
|
|
56630
|
-
const formEnabled = useFormContextPart((value2) => value2.enabled);
|
|
56888
|
+
const value = useFormContextPart((value2) => getByPath(value2 == null ? void 0 : value2.subject, formItemId));
|
|
56889
|
+
const validationResult = useFormContextPart((value2) => value2 == null ? void 0 : value2.validationResults[formItemId]);
|
|
56890
|
+
const dispatch = useFormContextPart((value2) => value2 == null ? void 0 : value2.dispatch);
|
|
56891
|
+
const formEnabled = useFormContextPart((value2) => value2 == null ? void 0 : value2.enabled);
|
|
56631
56892
|
const isEnabled2 = enabled2 && formEnabled;
|
|
56632
56893
|
useEffect(() => {
|
|
56633
56894
|
if (initialValue !== void 0) {
|
|
@@ -56897,6 +57158,10 @@ const FormItem = memo(function FormItem2({
|
|
|
56897
57158
|
}
|
|
56898
57159
|
}
|
|
56899
57160
|
const [animateContainerRef] = useAutoAnimate({ duration: 100 });
|
|
57161
|
+
const isInsideForm = useIsInsideForm();
|
|
57162
|
+
if (!isInsideForm) {
|
|
57163
|
+
throw new Error("FormItem must be used inside a Form");
|
|
57164
|
+
}
|
|
56900
57165
|
return /* @__PURE__ */ jsx(
|
|
56901
57166
|
ItemWithLabel,
|
|
56902
57167
|
{
|
|
@@ -56965,7 +57230,7 @@ const filteredValidationSeverityValues = validationSeverityValues.filter(
|
|
|
56965
57230
|
const FormItemMd = createMetadata({
|
|
56966
57231
|
status: "stable",
|
|
56967
57232
|
allowArbitraryProps: true,
|
|
56968
|
-
description: "`FormItem` wraps individual input controls within a `Form`, providing data binding, validation, labeling, and layout functionality. It connects form controls to the parent form's data model and handles validation feedback automatically.",
|
|
57233
|
+
description: "`FormItem` wraps individual input controls within a `Form`, providing data binding, validation, labeling, and layout functionality. It connects form controls to the parent form's data model and handles validation feedback automatically.\n\n> **Note:** `FormItem` must be used inside a `Form` component.",
|
|
56969
57234
|
props: {
|
|
56970
57235
|
bindTo: {
|
|
56971
57236
|
description: "This property binds a particular input field to one of the attributes of the `Form` data. It names the property of the form's `data` data to get the input's initial value.When the field is saved, its value will be stored in the `data` property with this name. If the property is not set, the input will be bound to an internal data field but not submitted."
|