xmlui 0.11.19 → 0.11.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/{index-CtiJg1j6.js → index-CkNqkb53.js} +1131 -891
- package/dist/lib/index.css +1 -1
- package/dist/lib/{initMock-B4QMy8Go.js → initMock-CP3zGYe3.js} +2 -2
- package/dist/lib/testing.d.ts +1 -0
- package/dist/lib/xmlui.d.ts +6 -8
- package/dist/lib/xmlui.js +1 -1
- package/dist/metadata/{collectedComponentMetadata-_5XPZQ5U.js → collectedComponentMetadata-DTO7KlLw.js} +1130 -890
- package/dist/metadata/{initMock-DhLoHW95.js → initMock-D78LB-9A.js} +2 -2
- package/dist/metadata/xmlui-metadata.css +1 -1
- package/dist/metadata/xmlui-metadata.js +1 -1
- package/dist/metadata/xmlui-metadata.umd.cjs +3 -3
- package/dist/standalone/xmlui-standalone.es.d.ts +8 -14
- package/dist/standalone/xmlui-standalone.umd.js +36 -36
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import React__default, { forwardRef, useState, useEffect, useId,
|
|
3
|
+
import React__default, { forwardRef, useState, useEffect, useId, useRef, cloneElement, useInsertionEffect, useCallback, useContext, useLayoutEffect, useMemo, createContext, useTransition, memo, useDeferredValue, createElement, useReducer, isValidElement, Fragment as Fragment$1, Children, startTransition } from "react";
|
|
4
4
|
import { throttle, get, isEmpty, cloneDeep, omit, omitBy, isUndefined, isString, isPlainObject, noop as noop$2, isEqual, isArray, isNumber, set, isNil, union, uniq, orderBy as orderBy$1, isObject, groupBy, sortBy, merge, defaultTo, capitalize, unset, setWith, keyBy, pick, isNaN as isNaN$1 } from "lodash-es";
|
|
5
5
|
import { formatDistanceToNow, parse, format, parseISO, isValid, isToday, isYesterday, isTomorrow, isThisWeek, formatRelative, isThisYear, isSameDay, differenceInMinutes } from "date-fns";
|
|
6
6
|
import classnames from "classnames";
|
|
@@ -12,18 +12,20 @@ import Color from "color";
|
|
|
12
12
|
import toast, { Toaster, ToastBar } from "react-hot-toast";
|
|
13
13
|
import { useLocation, NavLink as NavLink$1, useNavigate, Link, Routes, Route, Navigate, useParams, useSearchParams } from "@remix-run/react";
|
|
14
14
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
15
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
15
16
|
import { DropdownMenu as DropdownMenu$1, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuContent as DropdownMenuContent$1, DropdownMenuItem as DropdownMenuItem$1, DropdownMenuSub, DropdownMenuSubTrigger as DropdownMenuSubTrigger$1, DropdownMenuSubContent as DropdownMenuSubContent$1 } from "@radix-ui/react-dropdown-menu";
|
|
16
17
|
import { createContext as createContext$1, useContextSelector } from "use-context-selector";
|
|
17
18
|
import { parseRegExpLiteral } from "@eslint-community/regexpp";
|
|
18
19
|
import memoizeOne from "memoize-one";
|
|
19
20
|
import { DayPicker } from "react-day-picker";
|
|
20
|
-
import { Popover, PopoverTrigger, PopoverPortal, PopoverContent, Portal } from "@radix-ui/react-popover";
|
|
21
|
+
import { Popover, PopoverTrigger, PopoverPortal, PopoverContent, Portal as Portal$1 } from "@radix-ui/react-popover";
|
|
21
22
|
import EmojiPicker, { EmojiStyle } from "emoji-picker-react";
|
|
22
23
|
import * as dropzone from "react-dropzone";
|
|
23
24
|
import produce, { createDraft, finishDraft, enableMapSet } from "immer";
|
|
25
|
+
import { Item as Item$1, ItemText, ItemIndicator, Root, Trigger, Portal, Content, ScrollUpButton, Viewport, Group, Label, ScrollDownButton } from "@radix-ui/react-select";
|
|
24
26
|
import * as InnerRadioGroup from "@radix-ui/react-radio-group";
|
|
25
27
|
import TextareaAutosize from "react-textarea-autosize";
|
|
26
|
-
import { Root as Root$
|
|
28
|
+
import { Root as Root$2, Track, Range, Thumb } from "@radix-ui/react-slider";
|
|
27
29
|
import * as RadixTooltip from "@radix-ui/react-tooltip";
|
|
28
30
|
import ReactMarkdown from "react-markdown";
|
|
29
31
|
import remarkGfm from "remark-gfm";
|
|
@@ -38,7 +40,7 @@ import * as HoverCard from "@radix-ui/react-hover-card";
|
|
|
38
40
|
import { useSpring, useInView, animated } from "@react-spring/web";
|
|
39
41
|
import Papa from "papaparse";
|
|
40
42
|
import getUserLocale from "get-user-locale";
|
|
41
|
-
import { Root, List, Trigger, Content } from "@radix-ui/react-tabs";
|
|
43
|
+
import { Root as Root$1, List, Trigger as Trigger$1, Content as Content$1 } from "@radix-ui/react-tabs";
|
|
42
44
|
import scrollIntoView from "scroll-into-view-if-needed";
|
|
43
45
|
import * as RAccordion from "@radix-ui/react-accordion";
|
|
44
46
|
import useEmblaCarousel from "embla-carousel-react";
|
|
@@ -464,19 +466,22 @@ function getElementRef(element) {
|
|
|
464
466
|
return element.props.ref || element.ref;
|
|
465
467
|
}
|
|
466
468
|
const themeVars$13 = `'{"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)"}'`;
|
|
467
|
-
const container$3 = "
|
|
468
|
-
const top$1 = "
|
|
469
|
-
const end = "
|
|
470
|
-
const bottom$1 = "
|
|
471
|
-
const start = "
|
|
472
|
-
const shrinkToLabel = "
|
|
473
|
-
const inputLabel = "
|
|
474
|
-
const
|
|
475
|
-
const
|
|
476
|
-
const
|
|
477
|
-
const requiredMark = "
|
|
478
|
-
const itemWithLabel = "
|
|
479
|
-
const
|
|
469
|
+
const container$3 = "_container_ni4pj_14";
|
|
470
|
+
const top$1 = "_top_ni4pj_21";
|
|
471
|
+
const end = "_end_ni4pj_26";
|
|
472
|
+
const bottom$1 = "_bottom_ni4pj_31";
|
|
473
|
+
const start = "_start_ni4pj_36";
|
|
474
|
+
const shrinkToLabel = "_shrinkToLabel_ni4pj_41";
|
|
475
|
+
const inputLabel = "_inputLabel_ni4pj_44";
|
|
476
|
+
const labelBreak = "_labelBreak_ni4pj_57";
|
|
477
|
+
const required = "_required_ni4pj_62";
|
|
478
|
+
const disabled$c = "_disabled_ni4pj_69";
|
|
479
|
+
const requiredMark = "_requiredMark_ni4pj_73";
|
|
480
|
+
const itemWithLabel = "_itemWithLabel_ni4pj_77";
|
|
481
|
+
const wrapper$n = "_wrapper_ni4pj_82";
|
|
482
|
+
const validationResultWrapper = "_validationResultWrapper_ni4pj_90";
|
|
483
|
+
const helperTextContainer = "_helperTextContainer_ni4pj_93";
|
|
484
|
+
const labelWrapper$1 = "_labelWrapper_ni4pj_96";
|
|
480
485
|
const styles$1l = {
|
|
481
486
|
themeVars: themeVars$13,
|
|
482
487
|
container: container$3,
|
|
@@ -486,12 +491,15 @@ const styles$1l = {
|
|
|
486
491
|
start,
|
|
487
492
|
shrinkToLabel,
|
|
488
493
|
inputLabel,
|
|
489
|
-
disabled: disabled$c,
|
|
490
494
|
labelBreak,
|
|
491
495
|
required,
|
|
496
|
+
disabled: disabled$c,
|
|
492
497
|
requiredMark,
|
|
493
498
|
itemWithLabel,
|
|
494
|
-
|
|
499
|
+
wrapper: wrapper$n,
|
|
500
|
+
validationResultWrapper,
|
|
501
|
+
helperTextContainer,
|
|
502
|
+
labelWrapper: labelWrapper$1
|
|
495
503
|
};
|
|
496
504
|
const themeVars$12 = `'{"size-Spinner": "var(--xmlui-size-Spinner)", "thickness-Spinner": "var(--xmlui-thickness-Spinner)", "borderColor-Spinner": "var(--xmlui-borderColor-Spinner)"}'`;
|
|
497
505
|
const fullScreenSpinnerWrapper = "_fullScreenSpinnerWrapper_b1pgc_50";
|
|
@@ -605,69 +613,72 @@ const ItemWithLabel = forwardRef(function ItemWithLabel2({
|
|
|
605
613
|
}, ref) {
|
|
606
614
|
const generatedId2 = useId();
|
|
607
615
|
const inputId = id || generatedId2;
|
|
616
|
+
const inputRef = useRef(null);
|
|
617
|
+
const inputHeight = inputRef.current?.offsetHeight;
|
|
618
|
+
const labelWrapperHeight = labelPosition === "start" || labelPosition === "end" ? inputHeight : "auto";
|
|
608
619
|
if (label2 === void 0 && !validationResult) {
|
|
609
|
-
return /* @__PURE__ */ jsx(Part, { partId: PART_LABELED_ITEM, children: /* @__PURE__ */ jsx(
|
|
610
|
-
Slot,
|
|
611
|
-
{
|
|
612
|
-
...rest,
|
|
613
|
-
style: style2,
|
|
614
|
-
className,
|
|
615
|
-
id: inputId,
|
|
616
|
-
ref,
|
|
617
|
-
children
|
|
618
|
-
}
|
|
619
|
-
) });
|
|
620
|
+
return /* @__PURE__ */ jsx(Part, { partId: PART_LABELED_ITEM, children: /* @__PURE__ */ jsx(Slot, { ...rest, style: style2, className, id: inputId, ref, children }) });
|
|
620
621
|
}
|
|
621
|
-
return /* @__PURE__ */
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
{
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
622
|
+
return /* @__PURE__ */ jsx("div", { ...rest, ref, style: style2, className: classnames(className, styles$1l.itemWithLabel), children: /* @__PURE__ */ jsxs(
|
|
623
|
+
"div",
|
|
624
|
+
{
|
|
625
|
+
className: classnames(styles$1l.container, {
|
|
626
|
+
[styles$1l.top]: labelPosition === "top",
|
|
627
|
+
[styles$1l.bottom]: labelPosition === "bottom",
|
|
628
|
+
[styles$1l.start]: labelPosition === "start",
|
|
629
|
+
[styles$1l.end]: labelPosition === "end",
|
|
630
|
+
[styles$1l.shrinkToLabel]: shrinkToLabel2
|
|
631
|
+
}),
|
|
632
|
+
children: [
|
|
633
|
+
/* @__PURE__ */ jsx(
|
|
634
|
+
"div",
|
|
635
|
+
{
|
|
636
|
+
className: styles$1l.labelWrapper,
|
|
637
|
+
style: {
|
|
638
|
+
height: labelWrapperHeight
|
|
639
|
+
},
|
|
640
|
+
children: label2 && /* @__PURE__ */ jsx(Part, { partId: PART_LABEL, children: /* @__PURE__ */ jsxs(
|
|
641
|
+
"label",
|
|
642
|
+
{
|
|
643
|
+
htmlFor: inputId,
|
|
644
|
+
onClick: onLabelClick || (() => document.getElementById(inputId)?.focus()),
|
|
645
|
+
style: {
|
|
646
|
+
...labelStyle,
|
|
647
|
+
width: labelWidth && numberRegex.test(labelWidth) ? `${labelWidth}px` : labelWidth,
|
|
648
|
+
flexShrink: labelWidth !== void 0 ? 0 : void 0
|
|
649
|
+
},
|
|
650
|
+
className: classnames(styles$1l.inputLabel, {
|
|
651
|
+
[styles$1l.required]: required2,
|
|
652
|
+
[styles$1l.disabled]: !enabled2,
|
|
653
|
+
[styles$1l.labelBreak]: labelBreak2
|
|
654
|
+
}),
|
|
655
|
+
children: [
|
|
656
|
+
label2,
|
|
657
|
+
" ",
|
|
658
|
+
required2 && /* @__PURE__ */ jsx("span", { className: styles$1l.requiredMark, children: "*" }),
|
|
659
|
+
validationInProgress && /* @__PURE__ */ jsx(
|
|
660
|
+
Spinner,
|
|
661
|
+
{
|
|
662
|
+
style: { height: "1em", width: "1em", marginLeft: "1em", alignSelf: "center" }
|
|
663
|
+
}
|
|
664
|
+
)
|
|
665
|
+
]
|
|
666
|
+
}
|
|
667
|
+
) })
|
|
668
|
+
}
|
|
669
|
+
),
|
|
670
|
+
/* @__PURE__ */ jsxs("div", { className: styles$1l.wrapper, children: [
|
|
661
671
|
/* @__PURE__ */ jsx(Part, { partId: PART_LABELED_ITEM, children: cloneElement(children, {
|
|
662
672
|
id: !isInputTemplateUsed ? inputId : void 0,
|
|
663
673
|
style: void 0,
|
|
664
|
-
className: void 0
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
674
|
+
className: void 0,
|
|
675
|
+
ref: inputRef
|
|
676
|
+
}) }),
|
|
677
|
+
validationResult && /* @__PURE__ */ jsx("div", { className: styles$1l.validationResultWrapper, children: validationResult })
|
|
678
|
+
] })
|
|
679
|
+
]
|
|
680
|
+
}
|
|
681
|
+
) });
|
|
671
682
|
});
|
|
672
683
|
function createMetadata(metadata) {
|
|
673
684
|
return metadata;
|
|
@@ -3238,20 +3249,16 @@ class EngineError extends Error {
|
|
|
3238
3249
|
}
|
|
3239
3250
|
class GenericBackendError extends EngineError {
|
|
3240
3251
|
constructor(info2, errorCode) {
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
} else if (info2?.message) {
|
|
3249
|
-
message += `${info2.message}`;
|
|
3250
|
-
}
|
|
3251
|
-
super(message || info2?.message || "Unknown error");
|
|
3252
|
+
const message = info2?.message || info2?.error?.message || info2?.title || // RFC 7807
|
|
3253
|
+
(typeof info2?.error === "string" ? info2.error : null) || (typeof info2 === "string" ? info2 : null) || "Unknown error";
|
|
3254
|
+
const extractedDetails = info2?.details || info2?.detail || // RFC 7807
|
|
3255
|
+
info2?.error?.details || info2?.errors || // Validation errors array
|
|
3256
|
+
(info2?.error && typeof info2.error === "object" ? info2.error : null) || null;
|
|
3257
|
+
const details = extractedDetails ? info2?.issues ? { ...extractedDetails, issues: info2.issues } : extractedDetails : info2?.issues ? { issues: info2.issues } : null;
|
|
3258
|
+
super(message);
|
|
3252
3259
|
this.info = info2;
|
|
3253
3260
|
this.errorCategory = "GenericBackendError";
|
|
3254
|
-
this.details =
|
|
3261
|
+
this.details = details;
|
|
3255
3262
|
this.statusCode = errorCode;
|
|
3256
3263
|
Object.setPrototypeOf(this, GenericBackendError.prototype);
|
|
3257
3264
|
}
|
|
@@ -3291,6 +3298,13 @@ class ThrowStatementError extends EngineError {
|
|
|
3291
3298
|
Object.setPrototypeOf(this, ThrowStatementError.prototype);
|
|
3292
3299
|
}
|
|
3293
3300
|
}
|
|
3301
|
+
function createContextVariableError(err) {
|
|
3302
|
+
return {
|
|
3303
|
+
statusCode: err.statusCode || 500,
|
|
3304
|
+
message: err.message || "An error occurred",
|
|
3305
|
+
details: err.details || {}
|
|
3306
|
+
};
|
|
3307
|
+
}
|
|
3294
3308
|
function useContentAlignment(orientation, horizontal2, vertical2) {
|
|
3295
3309
|
return useMemo(() => {
|
|
3296
3310
|
return orientation === "horizontal" ? {
|
|
@@ -3966,7 +3980,7 @@ const defaultCompResult = {
|
|
|
3966
3980
|
cssProps: {},
|
|
3967
3981
|
issues: /* @__PURE__ */ new Set()
|
|
3968
3982
|
};
|
|
3969
|
-
function resolveLayoutProps(layoutProps = EMPTY_OBJECT, layoutContext) {
|
|
3983
|
+
function resolveLayoutProps(layoutProps = EMPTY_OBJECT, layoutContext, disableInlineStyle) {
|
|
3970
3984
|
const result = {
|
|
3971
3985
|
cssProps: {},
|
|
3972
3986
|
issues: /* @__PURE__ */ new Set()
|
|
@@ -3974,128 +3988,128 @@ function resolveLayoutProps(layoutProps = EMPTY_OBJECT, layoutContext) {
|
|
|
3974
3988
|
if (!!getOrientation(layoutContext)) {
|
|
3975
3989
|
result.cssProps.flexShrink = 0;
|
|
3976
3990
|
}
|
|
3977
|
-
collectCss("width");
|
|
3991
|
+
collectCss("width", false);
|
|
3978
3992
|
const horizontalStarSize = getHorizontalStarSize(result.cssProps.width, layoutContext);
|
|
3979
3993
|
if (horizontalStarSize !== null) {
|
|
3980
3994
|
result.cssProps.flex = horizontalStarSize;
|
|
3981
3995
|
result.cssProps.flexShrink = 1;
|
|
3982
3996
|
}
|
|
3983
|
-
collectCss("minWidth");
|
|
3984
|
-
collectCss("maxWidth");
|
|
3985
|
-
collectCss("height");
|
|
3997
|
+
collectCss("minWidth", false);
|
|
3998
|
+
collectCss("maxWidth", false);
|
|
3999
|
+
collectCss("height", false);
|
|
3986
4000
|
const verticalStarSize = getVerticalStarSize(result.cssProps.height, layoutContext);
|
|
3987
4001
|
if (verticalStarSize !== null) {
|
|
3988
4002
|
result.cssProps.flex = verticalStarSize;
|
|
3989
4003
|
result.cssProps.flexShrink = 1;
|
|
3990
4004
|
}
|
|
3991
|
-
collectCss("minHeight");
|
|
3992
|
-
collectCss("maxHeight");
|
|
3993
|
-
collectCss("top");
|
|
3994
|
-
collectCss("right");
|
|
3995
|
-
collectCss("bottom");
|
|
3996
|
-
collectCss("left");
|
|
3997
|
-
collectCss("gap");
|
|
3998
|
-
collectCss("padding");
|
|
4005
|
+
collectCss("minHeight", false);
|
|
4006
|
+
collectCss("maxHeight", false);
|
|
4007
|
+
collectCss("top", disableInlineStyle);
|
|
4008
|
+
collectCss("right", disableInlineStyle);
|
|
4009
|
+
collectCss("bottom", disableInlineStyle);
|
|
4010
|
+
collectCss("left", disableInlineStyle);
|
|
4011
|
+
collectCss("gap", disableInlineStyle);
|
|
4012
|
+
collectCss("padding", disableInlineStyle);
|
|
3999
4013
|
const paddingHorizontal = transformLayoutValue("paddingHorizontal");
|
|
4000
4014
|
if (paddingHorizontal) {
|
|
4001
4015
|
result.cssProps.paddingLeft = paddingHorizontal;
|
|
4002
4016
|
result.cssProps.paddingRight = paddingHorizontal;
|
|
4003
4017
|
}
|
|
4004
|
-
collectCss("paddingRight");
|
|
4005
|
-
collectCss("paddingLeft");
|
|
4018
|
+
collectCss("paddingRight", disableInlineStyle);
|
|
4019
|
+
collectCss("paddingLeft", disableInlineStyle);
|
|
4006
4020
|
const paddingVertical = transformLayoutValue("paddingVertical");
|
|
4007
4021
|
if (paddingVertical) {
|
|
4008
4022
|
result.cssProps.paddingTop = paddingVertical;
|
|
4009
4023
|
result.cssProps.paddingBottom = paddingVertical;
|
|
4010
4024
|
}
|
|
4011
|
-
collectCss("paddingTop");
|
|
4012
|
-
collectCss("paddingBottom");
|
|
4013
|
-
collectCss("margin");
|
|
4025
|
+
collectCss("paddingTop", disableInlineStyle);
|
|
4026
|
+
collectCss("paddingBottom", disableInlineStyle);
|
|
4027
|
+
collectCss("margin", disableInlineStyle);
|
|
4014
4028
|
const marginHorizontal = transformLayoutValue("marginHorizontal");
|
|
4015
4029
|
if (marginHorizontal) {
|
|
4016
4030
|
result.cssProps.marginLeft = marginHorizontal;
|
|
4017
4031
|
result.cssProps.marginRight = marginHorizontal;
|
|
4018
4032
|
}
|
|
4019
|
-
collectCss("marginRight");
|
|
4020
|
-
collectCss("marginLeft");
|
|
4033
|
+
collectCss("marginRight", disableInlineStyle);
|
|
4034
|
+
collectCss("marginLeft", disableInlineStyle);
|
|
4021
4035
|
const marginVertical = transformLayoutValue("marginVertical");
|
|
4022
4036
|
if (marginVertical) {
|
|
4023
4037
|
result.cssProps.marginTop = marginVertical;
|
|
4024
4038
|
result.cssProps.marginBottom = marginVertical;
|
|
4025
4039
|
}
|
|
4026
|
-
collectCss("marginTop");
|
|
4027
|
-
collectCss("marginBottom");
|
|
4028
|
-
collectCss("border");
|
|
4040
|
+
collectCss("marginTop", disableInlineStyle);
|
|
4041
|
+
collectCss("marginBottom", disableInlineStyle);
|
|
4042
|
+
collectCss("border", disableInlineStyle);
|
|
4029
4043
|
const horizontalBorder = transformLayoutValue("borderHorizontal");
|
|
4030
4044
|
if (horizontalBorder) {
|
|
4031
4045
|
result.cssProps.borderLeft = horizontalBorder;
|
|
4032
4046
|
result.cssProps.borderRight = horizontalBorder;
|
|
4033
4047
|
}
|
|
4034
|
-
collectCss("borderRight");
|
|
4035
|
-
collectCss("borderLeft");
|
|
4048
|
+
collectCss("borderRight", disableInlineStyle);
|
|
4049
|
+
collectCss("borderLeft", disableInlineStyle);
|
|
4036
4050
|
const verticalBorder = transformLayoutValue("borderVertical");
|
|
4037
4051
|
if (verticalBorder) {
|
|
4038
4052
|
result.cssProps.borderTop = verticalBorder;
|
|
4039
4053
|
result.cssProps.borderBottom = verticalBorder;
|
|
4040
4054
|
}
|
|
4041
|
-
collectCss("borderTop");
|
|
4042
|
-
collectCss("borderBottom");
|
|
4043
|
-
collectCss("borderColor");
|
|
4044
|
-
collectCss("borderStyle");
|
|
4045
|
-
collectCss("borderWidth");
|
|
4046
|
-
collectCss("borderRadius");
|
|
4047
|
-
collectCss("radiusTopLeft", "borderTopLeftRadius");
|
|
4048
|
-
collectCss("radiusTopRight", "borderTopRightRadius");
|
|
4049
|
-
collectCss("radiusBottomLeft", "borderBottomLeftRadius");
|
|
4050
|
-
collectCss("radiusBottomRight", "borderBottomRightRadius");
|
|
4051
|
-
collectCss("color");
|
|
4052
|
-
collectCss("fontFamily");
|
|
4053
|
-
collectCss("fontSize");
|
|
4054
|
-
collectCss("fontWeight");
|
|
4055
|
-
collectCss("fontStyle");
|
|
4056
|
-
collectCss("fontVariant");
|
|
4057
|
-
collectCss("lineBreak");
|
|
4058
|
-
collectCss("textDecoration");
|
|
4059
|
-
collectCss("textDecorationLine");
|
|
4060
|
-
collectCss("textDecorationColor");
|
|
4061
|
-
collectCss("textDecorationStyle");
|
|
4062
|
-
collectCss("textDecorationThickness");
|
|
4063
|
-
collectCss("textIndent");
|
|
4064
|
-
collectCss("textShadow");
|
|
4065
|
-
collectCss("textUnderlineOffset");
|
|
4066
|
-
collectCss("userSelect");
|
|
4067
|
-
collectCss("letterSpacing");
|
|
4068
|
-
collectCss("textTransform");
|
|
4069
|
-
collectCss("lineHeight");
|
|
4070
|
-
collectCss("textAlign");
|
|
4071
|
-
collectCss("textAlignLast");
|
|
4072
|
-
collectCss("textWrap");
|
|
4073
|
-
collectCss("wordBreak");
|
|
4074
|
-
collectCss("wordSpacing");
|
|
4075
|
-
collectCss("wordWrap");
|
|
4076
|
-
collectCss("writingMode");
|
|
4077
|
-
collectCss("backgroundColor");
|
|
4078
|
-
collectCss("background");
|
|
4079
|
-
collectCss("boxShadow");
|
|
4080
|
-
collectCss("direction");
|
|
4081
|
-
collectCss("overflowX");
|
|
4082
|
-
collectCss("overflowY");
|
|
4083
|
-
collectCss("zIndex");
|
|
4084
|
-
collectCss("opacity");
|
|
4085
|
-
collectCss("zoom");
|
|
4086
|
-
collectCss("cursor");
|
|
4087
|
-
collectCss("whiteSpace");
|
|
4088
|
-
collectCss("transform");
|
|
4089
|
-
collectCss("outline");
|
|
4090
|
-
collectCss("outlineWidth");
|
|
4091
|
-
collectCss("outlineColor");
|
|
4092
|
-
collectCss("outlineStyle");
|
|
4093
|
-
collectCss("outlineOffset");
|
|
4055
|
+
collectCss("borderTop", disableInlineStyle);
|
|
4056
|
+
collectCss("borderBottom", disableInlineStyle);
|
|
4057
|
+
collectCss("borderColor", disableInlineStyle);
|
|
4058
|
+
collectCss("borderStyle", disableInlineStyle);
|
|
4059
|
+
collectCss("borderWidth", disableInlineStyle);
|
|
4060
|
+
collectCss("borderRadius", disableInlineStyle);
|
|
4061
|
+
collectCss("radiusTopLeft", disableInlineStyle, "borderTopLeftRadius");
|
|
4062
|
+
collectCss("radiusTopRight", disableInlineStyle, "borderTopRightRadius");
|
|
4063
|
+
collectCss("radiusBottomLeft", disableInlineStyle, "borderBottomLeftRadius");
|
|
4064
|
+
collectCss("radiusBottomRight", disableInlineStyle, "borderBottomRightRadius");
|
|
4065
|
+
collectCss("color", disableInlineStyle);
|
|
4066
|
+
collectCss("fontFamily", disableInlineStyle);
|
|
4067
|
+
collectCss("fontSize", disableInlineStyle);
|
|
4068
|
+
collectCss("fontWeight", disableInlineStyle);
|
|
4069
|
+
collectCss("fontStyle", disableInlineStyle);
|
|
4070
|
+
collectCss("fontVariant", disableInlineStyle);
|
|
4071
|
+
collectCss("lineBreak", disableInlineStyle);
|
|
4072
|
+
collectCss("textDecoration", disableInlineStyle);
|
|
4073
|
+
collectCss("textDecorationLine", disableInlineStyle);
|
|
4074
|
+
collectCss("textDecorationColor", disableInlineStyle);
|
|
4075
|
+
collectCss("textDecorationStyle", disableInlineStyle);
|
|
4076
|
+
collectCss("textDecorationThickness", disableInlineStyle);
|
|
4077
|
+
collectCss("textIndent", disableInlineStyle);
|
|
4078
|
+
collectCss("textShadow", disableInlineStyle);
|
|
4079
|
+
collectCss("textUnderlineOffset", disableInlineStyle);
|
|
4080
|
+
collectCss("userSelect", disableInlineStyle);
|
|
4081
|
+
collectCss("letterSpacing", disableInlineStyle);
|
|
4082
|
+
collectCss("textTransform", disableInlineStyle);
|
|
4083
|
+
collectCss("lineHeight", disableInlineStyle);
|
|
4084
|
+
collectCss("textAlign", disableInlineStyle);
|
|
4085
|
+
collectCss("textAlignLast", disableInlineStyle);
|
|
4086
|
+
collectCss("textWrap", disableInlineStyle);
|
|
4087
|
+
collectCss("wordBreak", disableInlineStyle);
|
|
4088
|
+
collectCss("wordSpacing", disableInlineStyle);
|
|
4089
|
+
collectCss("wordWrap", disableInlineStyle);
|
|
4090
|
+
collectCss("writingMode", disableInlineStyle);
|
|
4091
|
+
collectCss("backgroundColor", disableInlineStyle);
|
|
4092
|
+
collectCss("background", disableInlineStyle);
|
|
4093
|
+
collectCss("boxShadow", disableInlineStyle);
|
|
4094
|
+
collectCss("direction", disableInlineStyle);
|
|
4095
|
+
collectCss("overflowX", disableInlineStyle);
|
|
4096
|
+
collectCss("overflowY", disableInlineStyle);
|
|
4097
|
+
collectCss("zIndex", disableInlineStyle);
|
|
4098
|
+
collectCss("opacity", disableInlineStyle);
|
|
4099
|
+
collectCss("zoom", disableInlineStyle);
|
|
4100
|
+
collectCss("cursor", disableInlineStyle);
|
|
4101
|
+
collectCss("whiteSpace", disableInlineStyle);
|
|
4102
|
+
collectCss("transform", disableInlineStyle);
|
|
4103
|
+
collectCss("outline", disableInlineStyle);
|
|
4104
|
+
collectCss("outlineWidth", disableInlineStyle);
|
|
4105
|
+
collectCss("outlineColor", disableInlineStyle);
|
|
4106
|
+
collectCss("outlineStyle", disableInlineStyle);
|
|
4107
|
+
collectCss("outlineOffset", disableInlineStyle);
|
|
4094
4108
|
const wrapContent = transformLayoutValue("wrapContent");
|
|
4095
4109
|
if (wrapContent) {
|
|
4096
4110
|
result.cssProps.flexWrap = wrapContent === "true" ? "wrap" : "nowrap";
|
|
4097
4111
|
}
|
|
4098
|
-
collectCss("canShrink", "flexShrink");
|
|
4112
|
+
collectCss("canShrink", disableInlineStyle, "flexShrink");
|
|
4099
4113
|
const canShrink = transformLayoutValue("canShrink");
|
|
4100
4114
|
if (canShrink) {
|
|
4101
4115
|
result.cssProps.flexShrink = canShrink === "true" ? 1 : 0;
|
|
@@ -4169,7 +4183,8 @@ function resolveLayoutProps(layoutProps = EMPTY_OBJECT, layoutContext) {
|
|
|
4169
4183
|
return value;
|
|
4170
4184
|
}
|
|
4171
4185
|
}
|
|
4172
|
-
function collectCss(prop, propCssName = "") {
|
|
4186
|
+
function collectCss(prop, disableInlineStyle2 = false, propCssName = "") {
|
|
4187
|
+
if (disableInlineStyle2) return;
|
|
4173
4188
|
const value = transformLayoutValue(prop);
|
|
4174
4189
|
if (value) {
|
|
4175
4190
|
result.cssProps[propCssName || prop] = value;
|
|
@@ -5890,7 +5905,7 @@ const RootThemeDefinition = {
|
|
|
5890
5905
|
"backgroundColor-tree-row--selected--before": $colorPrimary50,
|
|
5891
5906
|
// --- Border colors
|
|
5892
5907
|
borderColor: "rgb(from $color-surface-900 r g b / 0.1)",
|
|
5893
|
-
"borderColor--disabled": $
|
|
5908
|
+
"borderColor--disabled": $colorSurface200,
|
|
5894
5909
|
// --- Text colors
|
|
5895
5910
|
"textColor-secondary": $colorSurface600,
|
|
5896
5911
|
// --- Input is an abstract component, so we define its default theme variables here
|
|
@@ -7277,6 +7292,7 @@ function Theme({
|
|
|
7277
7292
|
id,
|
|
7278
7293
|
isRoot = defaultProps$1d.isRoot,
|
|
7279
7294
|
applyIf,
|
|
7295
|
+
disableInlineStyle,
|
|
7280
7296
|
renderChild: renderChild2,
|
|
7281
7297
|
node,
|
|
7282
7298
|
tone,
|
|
@@ -7373,7 +7389,8 @@ function Theme({
|
|
|
7373
7389
|
themeStyles: themeCssVars,
|
|
7374
7390
|
themeVars: allThemeVarsWithResolvedHierarchicalVars,
|
|
7375
7391
|
getResourceUrl,
|
|
7376
|
-
getThemeVar
|
|
7392
|
+
getThemeVar,
|
|
7393
|
+
disableInlineStyle
|
|
7377
7394
|
};
|
|
7378
7395
|
return themeVal;
|
|
7379
7396
|
}, [
|
|
@@ -7384,7 +7401,8 @@ function Theme({
|
|
|
7384
7401
|
getResourceUrl,
|
|
7385
7402
|
getThemeVar,
|
|
7386
7403
|
themeCssVars,
|
|
7387
|
-
themeTone
|
|
7404
|
+
themeTone,
|
|
7405
|
+
disableInlineStyle
|
|
7388
7406
|
]);
|
|
7389
7407
|
const { indexing } = useIndexerContext();
|
|
7390
7408
|
const rootClasses = useMemo(() => {
|
|
@@ -7479,6 +7497,11 @@ const ThemeMd = createMetadata({
|
|
|
7479
7497
|
void 0,
|
|
7480
7498
|
"boolean",
|
|
7481
7499
|
true
|
|
7500
|
+
),
|
|
7501
|
+
disableInlineStyle: d(
|
|
7502
|
+
`This property controls whether inline styles are disabled for components within this theme. When undefined, uses the appGlobals.disableInlineStyle setting.`,
|
|
7503
|
+
void 0,
|
|
7504
|
+
"boolean"
|
|
7482
7505
|
)
|
|
7483
7506
|
},
|
|
7484
7507
|
opaque: true
|
|
@@ -7499,6 +7522,7 @@ const themeComponentRenderer = createComponentRenderer(
|
|
|
7499
7522
|
id: extractValue.asOptionalString(node.props.themeId),
|
|
7500
7523
|
isRoot: extractValue.asOptionalBoolean(node.props.root),
|
|
7501
7524
|
applyIf: extractValue.asOptionalBoolean(node.props.applyIf),
|
|
7525
|
+
disableInlineStyle: extractValue.asOptionalBoolean(node.props.disableInlineStyle),
|
|
7502
7526
|
layoutContext,
|
|
7503
7527
|
renderChild: renderChild2,
|
|
7504
7528
|
tone: themeTone,
|
|
@@ -17508,37 +17532,20 @@ const Toggle = forwardRef(function Toggle2({
|
|
|
17508
17532
|
const MemoizedItem = memo(
|
|
17509
17533
|
({
|
|
17510
17534
|
node,
|
|
17511
|
-
item: item2,
|
|
17512
|
-
context,
|
|
17513
17535
|
renderChild: renderChild2,
|
|
17514
17536
|
layoutContext,
|
|
17515
|
-
contextVars = EMPTY_OBJECT
|
|
17516
|
-
itemKey = "$item",
|
|
17517
|
-
contextKey = "$context"
|
|
17537
|
+
contextVars = EMPTY_OBJECT
|
|
17518
17538
|
}) => {
|
|
17519
17539
|
const shallowMemoedContextVars = useShallowCompareMemoize(contextVars);
|
|
17520
|
-
const
|
|
17521
|
-
|
|
17522
|
-
return {
|
|
17523
|
-
type: "Container",
|
|
17524
|
-
contextVars: {
|
|
17525
|
-
[itemKey]: { ...item2, ...context },
|
|
17526
|
-
...shallowMemoedContextVars
|
|
17527
|
-
},
|
|
17528
|
-
children: Array.isArray(node) ? node : [node]
|
|
17529
|
-
};
|
|
17530
|
-
}
|
|
17531
|
-
return {
|
|
17540
|
+
const nodeWithContextVars = useMemo(
|
|
17541
|
+
() => ({
|
|
17532
17542
|
type: "Container",
|
|
17533
|
-
contextVars:
|
|
17534
|
-
[itemKey]: item2,
|
|
17535
|
-
[contextKey]: context,
|
|
17536
|
-
...shallowMemoedContextVars
|
|
17537
|
-
},
|
|
17543
|
+
contextVars: shallowMemoedContextVars,
|
|
17538
17544
|
children: Array.isArray(node) ? node : [node]
|
|
17539
|
-
}
|
|
17540
|
-
|
|
17541
|
-
|
|
17545
|
+
}),
|
|
17546
|
+
[node, shallowMemoedContextVars]
|
|
17547
|
+
);
|
|
17548
|
+
return /* @__PURE__ */ jsx(Fragment, { children: renderChild2(nodeWithContextVars, layoutContext) });
|
|
17542
17549
|
}
|
|
17543
17550
|
);
|
|
17544
17551
|
MemoizedItem.displayName = "MemoizedItem";
|
|
@@ -18492,36 +18499,8 @@ const DropdownMenu = forwardRef(function DropdownMenu2({
|
|
|
18492
18499
|
setOpen(false);
|
|
18493
18500
|
}, []);
|
|
18494
18501
|
const contentRef = useRef(null);
|
|
18495
|
-
const handleKeyDown = useCallback((event) => {
|
|
18496
|
-
if (event.key === "Escape") {
|
|
18497
|
-
setOpen(false);
|
|
18498
|
-
return;
|
|
18499
|
-
}
|
|
18500
|
-
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
18501
|
-
event.preventDefault();
|
|
18502
|
-
const content2 = contentRef.current;
|
|
18503
|
-
if (!content2) return;
|
|
18504
|
-
const menuItems = Array.from(
|
|
18505
|
-
content2.querySelectorAll('[role="menuitem"]:not([class*="disabled"])')
|
|
18506
|
-
);
|
|
18507
|
-
if (menuItems.length === 0) return;
|
|
18508
|
-
const currentIndex = menuItems.findIndex((item2) => item2 === document.activeElement);
|
|
18509
|
-
let nextIndex;
|
|
18510
|
-
if (currentIndex === -1) {
|
|
18511
|
-
nextIndex = event.key === "ArrowDown" ? 0 : menuItems.length - 1;
|
|
18512
|
-
} else if (event.key === "ArrowDown") {
|
|
18513
|
-
nextIndex = currentIndex < menuItems.length - 1 ? currentIndex + 1 : 0;
|
|
18514
|
-
} else {
|
|
18515
|
-
nextIndex = currentIndex > 0 ? currentIndex - 1 : menuItems.length - 1;
|
|
18516
|
-
}
|
|
18517
|
-
menuItems[nextIndex]?.focus();
|
|
18518
|
-
}
|
|
18519
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
18520
|
-
return;
|
|
18521
|
-
}
|
|
18522
|
-
}, []);
|
|
18523
18502
|
return /* @__PURE__ */ jsx(DropdownMenuContext.Provider, { value: { closeMenu }, children: /* @__PURE__ */ jsxs(
|
|
18524
|
-
|
|
18503
|
+
DropdownMenuPrimitive.Root,
|
|
18525
18504
|
{
|
|
18526
18505
|
open,
|
|
18527
18506
|
onOpenChange: async (isOpen) => {
|
|
@@ -18545,31 +18524,20 @@ const DropdownMenu = forwardRef(function DropdownMenu2({
|
|
|
18545
18524
|
},
|
|
18546
18525
|
modal,
|
|
18547
18526
|
children: [
|
|
18548
|
-
/* @__PURE__ */ jsx(
|
|
18549
|
-
|
|
18527
|
+
/* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, { ...rest, asChild: true, disabled: disabled2, ref, children: triggerTemplate ? triggerTemplate : /* @__PURE__ */ jsx(
|
|
18528
|
+
Button,
|
|
18550
18529
|
{
|
|
18551
|
-
|
|
18552
|
-
|
|
18530
|
+
icon: /* @__PURE__ */ jsx(Icon$l, { name: triggerButtonIcon, fallback: "chevrondown" }),
|
|
18531
|
+
iconPosition: triggerButtonIconPosition,
|
|
18532
|
+
type: "button",
|
|
18533
|
+
variant: triggerButtonVariant,
|
|
18534
|
+
themeColor: triggerButtonThemeColor,
|
|
18553
18535
|
disabled: disabled2,
|
|
18554
|
-
|
|
18555
|
-
"aria-haspopup": "menu",
|
|
18556
|
-
"aria-expanded": open,
|
|
18557
|
-
children: triggerTemplate ? triggerTemplate : /* @__PURE__ */ jsx(
|
|
18558
|
-
Button,
|
|
18559
|
-
{
|
|
18560
|
-
icon: /* @__PURE__ */ jsx(Icon$l, { name: triggerButtonIcon, fallback: "chevrondown" }),
|
|
18561
|
-
iconPosition: triggerButtonIconPosition,
|
|
18562
|
-
type: "button",
|
|
18563
|
-
variant: triggerButtonVariant,
|
|
18564
|
-
themeColor: triggerButtonThemeColor,
|
|
18565
|
-
disabled: disabled2,
|
|
18566
|
-
children: label2
|
|
18567
|
-
}
|
|
18568
|
-
)
|
|
18536
|
+
children: label2
|
|
18569
18537
|
}
|
|
18570
|
-
),
|
|
18571
|
-
/* @__PURE__ */ jsx(Portal, { container: root2, children: /* @__PURE__ */ jsx(
|
|
18572
|
-
|
|
18538
|
+
) }),
|
|
18539
|
+
/* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container: root2, children: /* @__PURE__ */ jsx(
|
|
18540
|
+
DropdownMenuPrimitive.Content,
|
|
18573
18541
|
{
|
|
18574
18542
|
ref: contentRef,
|
|
18575
18543
|
align: alignment,
|
|
@@ -18577,13 +18545,8 @@ const DropdownMenu = forwardRef(function DropdownMenu2({
|
|
|
18577
18545
|
className: classnames(styles$_.DropdownMenuContent, className, {
|
|
18578
18546
|
[styles$_.compact]: compact2
|
|
18579
18547
|
}),
|
|
18580
|
-
onOpenAutoFocus: (e) => {
|
|
18581
|
-
e.preventDefault();
|
|
18582
|
-
contentRef.current?.focus();
|
|
18583
|
-
},
|
|
18584
|
-
onKeyDownCapture: handleKeyDown,
|
|
18585
|
-
role: "menu",
|
|
18586
18548
|
tabIndex: -1,
|
|
18549
|
+
loop: true,
|
|
18587
18550
|
children
|
|
18588
18551
|
}
|
|
18589
18552
|
) })
|
|
@@ -18617,25 +18580,8 @@ const MenuItem = forwardRef(function MenuItem2({
|
|
|
18617
18580
|
},
|
|
18618
18581
|
[enabled2, onClick, context]
|
|
18619
18582
|
);
|
|
18620
|
-
const handleKeyDown = useCallback(
|
|
18621
|
-
(event) => {
|
|
18622
|
-
if (!enabled2) return;
|
|
18623
|
-
if (event.key === "Enter") {
|
|
18624
|
-
event.preventDefault();
|
|
18625
|
-
event.stopPropagation();
|
|
18626
|
-
onClick(event);
|
|
18627
|
-
context?.closeMenu();
|
|
18628
|
-
} else if (event.key === " ") {
|
|
18629
|
-
event.preventDefault();
|
|
18630
|
-
event.stopPropagation();
|
|
18631
|
-
onClick(event);
|
|
18632
|
-
context?.closeMenu();
|
|
18633
|
-
}
|
|
18634
|
-
},
|
|
18635
|
-
[enabled2, onClick, context]
|
|
18636
|
-
);
|
|
18637
18583
|
return /* @__PURE__ */ jsxs(
|
|
18638
|
-
|
|
18584
|
+
DropdownMenuPrimitive.Item,
|
|
18639
18585
|
{
|
|
18640
18586
|
style: style2,
|
|
18641
18587
|
className: classnames(className, styles$_.DropdownMenuItem, {
|
|
@@ -18645,7 +18591,6 @@ const MenuItem = forwardRef(function MenuItem2({
|
|
|
18645
18591
|
}),
|
|
18646
18592
|
ref,
|
|
18647
18593
|
onClick: handleClick,
|
|
18648
|
-
onKeyDown: handleKeyDown,
|
|
18649
18594
|
role: "menuitem",
|
|
18650
18595
|
tabIndex: enabled2 ? 0 : -1,
|
|
18651
18596
|
children: [
|
|
@@ -18659,28 +18604,14 @@ const MenuItem = forwardRef(function MenuItem2({
|
|
|
18659
18604
|
const SubMenuItem = forwardRef(function SubMenuItem2({ children, label: label2, triggerTemplate }, ref) {
|
|
18660
18605
|
const { root: root2 } = useTheme();
|
|
18661
18606
|
const [open, setOpen] = useState(false);
|
|
18662
|
-
return /* @__PURE__ */ jsxs(
|
|
18663
|
-
/* @__PURE__ */ jsx(
|
|
18664
|
-
|
|
18665
|
-
|
|
18666
|
-
className: styles$_.DropdownMenuSubTrigger,
|
|
18667
|
-
role: "menuitem",
|
|
18668
|
-
tabIndex: 0,
|
|
18669
|
-
ref,
|
|
18670
|
-
onMouseEnter: () => setOpen(true),
|
|
18671
|
-
onMouseLeave: () => setOpen(false),
|
|
18672
|
-
children: triggerTemplate ? triggerTemplate : /* @__PURE__ */ jsx("div", { children: label2 })
|
|
18673
|
-
}
|
|
18674
|
-
) }),
|
|
18675
|
-
/* @__PURE__ */ jsx(Portal, { container: root2, children: /* @__PURE__ */ jsx(
|
|
18676
|
-
PopoverContent,
|
|
18607
|
+
return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.Sub, { open, onOpenChange: setOpen, children: [
|
|
18608
|
+
/* @__PURE__ */ jsx(DropdownMenuPrimitive.SubTrigger, { ref, className: styles$_.DropdownMenuSubTrigger, asChild: true, children: triggerTemplate ? triggerTemplate : /* @__PURE__ */ jsx("div", { children: label2 }) }),
|
|
18609
|
+
/* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container: root2, children: /* @__PURE__ */ jsx(
|
|
18610
|
+
DropdownMenuPrimitive.SubContent,
|
|
18677
18611
|
{
|
|
18678
18612
|
className: styles$_.DropdownMenuSubContent,
|
|
18679
|
-
|
|
18680
|
-
|
|
18681
|
-
onMouseEnter: () => setOpen(true),
|
|
18682
|
-
onMouseLeave: () => setOpen(false),
|
|
18683
|
-
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
18613
|
+
sideOffset: 2,
|
|
18614
|
+
loop: true,
|
|
18684
18615
|
children
|
|
18685
18616
|
}
|
|
18686
18617
|
) })
|
|
@@ -19484,7 +19415,7 @@ const FlowLayoutContext = createContext({
|
|
|
19484
19415
|
const FlowItemBreak = ({ force }) => /* @__PURE__ */ jsx("div", { className: classnames(styles$X.break, { [styles$X.forceBreak]: force }) });
|
|
19485
19416
|
const FlowItemWrapper = forwardRef(function FlowItemWrapper2({ children, forceBreak: forceBreak2, ...restProps }, ref) {
|
|
19486
19417
|
const { rowGap, columnGap, setNumberOfChildren } = useContext(FlowLayoutContext);
|
|
19487
|
-
const { mediaSize } = useAppContext();
|
|
19418
|
+
const { mediaSize, appGlobals } = useAppContext();
|
|
19488
19419
|
useIsomorphicLayoutEffect(() => {
|
|
19489
19420
|
setNumberOfChildren((prev) => prev + 1);
|
|
19490
19421
|
return () => {
|
|
@@ -19508,10 +19439,11 @@ const FlowItemWrapper = forwardRef(function FlowItemWrapper2({ children, forceBr
|
|
|
19508
19439
|
{
|
|
19509
19440
|
type: "Stack",
|
|
19510
19441
|
orientation: "horizontal"
|
|
19511
|
-
}
|
|
19442
|
+
},
|
|
19443
|
+
appGlobals?.disableInlineStyle
|
|
19512
19444
|
).cssProps || {}
|
|
19513
19445
|
);
|
|
19514
|
-
}, [_maxWidth, _minWidth, _width]);
|
|
19446
|
+
}, [_maxWidth, _minWidth, _width, appGlobals]);
|
|
19515
19447
|
const resolvedWidth = useMemo(() => {
|
|
19516
19448
|
if (width && typeof width === "string" && width.startsWith("var(")) {
|
|
19517
19449
|
if (!resolvedCssVars[width]) {
|
|
@@ -21451,18 +21383,26 @@ const Form = forwardRef(function({
|
|
|
21451
21383
|
children: cancelLabel
|
|
21452
21384
|
},
|
|
21453
21385
|
"cancel"
|
|
21454
|
-
) });
|
|
21386
|
+
) }, PART_CANCEL_BUTTON);
|
|
21455
21387
|
const submitButton = useMemo(
|
|
21456
|
-
() => /* @__PURE__ */ jsx(Part, { partId: PART_SUBMIT_BUTTON, children: /* @__PURE__ */ jsx(Button, { type: "submit", disabled: !isEnabled2 || !enableSubmit, children: formState.submitInProgress ? saveInProgressLabel : saveLabel }, "submit") }),
|
|
21388
|
+
() => /* @__PURE__ */ jsx(Part, { partId: PART_SUBMIT_BUTTON, children: /* @__PURE__ */ jsx(Button, { type: "submit", disabled: !isEnabled2 || !enableSubmit, children: formState.submitInProgress ? saveInProgressLabel : saveLabel }, "submit") }, PART_SUBMIT_BUTTON),
|
|
21457
21389
|
[isEnabled2, enableSubmit, formState.submitInProgress, saveInProgressLabel, saveLabel]
|
|
21458
21390
|
);
|
|
21391
|
+
const getData = useCallback(() => {
|
|
21392
|
+
return cloneDeep(cleanUpSubject(formState.subject, formState.noSubmitFields));
|
|
21393
|
+
}, [formState.subject, formState.noSubmitFields]);
|
|
21394
|
+
const getIsDirtyFlag = useCallback(() => {
|
|
21395
|
+
return isDirty;
|
|
21396
|
+
}, [isDirty]);
|
|
21459
21397
|
useEffect(() => {
|
|
21460
21398
|
registerComponentApi?.({
|
|
21461
21399
|
reset: doReset,
|
|
21462
21400
|
update: updateData,
|
|
21463
|
-
validate: doValidate
|
|
21401
|
+
validate: doValidate,
|
|
21402
|
+
getData,
|
|
21403
|
+
isDirty: getIsDirtyFlag
|
|
21464
21404
|
});
|
|
21465
|
-
}, [doReset, updateData, doValidate, registerComponentApi]);
|
|
21405
|
+
}, [doReset, updateData, doValidate, getData, registerComponentApi, getIsDirtyFlag]);
|
|
21466
21406
|
let safeButtonRow = /* @__PURE__ */ jsx(Fragment, { children: buttonRow2 || /* @__PURE__ */ jsxs("div", { className: styles$V.buttonRow, children: [
|
|
21467
21407
|
swapCancelAndSave && [submitButton, cancelButton],
|
|
21468
21408
|
!swapCancelAndSave && [cancelButton, submitButton]
|
|
@@ -21524,7 +21464,8 @@ const FormWithContextVar = forwardRef(function({
|
|
|
21524
21464
|
style: style2,
|
|
21525
21465
|
className,
|
|
21526
21466
|
lookupEventHandler,
|
|
21527
|
-
registerComponentApi
|
|
21467
|
+
registerComponentApi,
|
|
21468
|
+
appContext
|
|
21528
21469
|
}, ref) {
|
|
21529
21470
|
const [formState, dispatch] = useReducer(formReducer, initialState);
|
|
21530
21471
|
const $data = useMemo(() => {
|
|
@@ -21560,7 +21501,7 @@ const FormWithContextVar = forwardRef(function({
|
|
|
21560
21501
|
const errorNotificationMessage = extractValue.asOptionalString(node.props.errorNotificationMessage) || "";
|
|
21561
21502
|
const submitUrl = extractValue.asOptionalString(node.props.submitUrl) || extractValue.asOptionalString(node.props._data_url);
|
|
21562
21503
|
const itemLabelWidth = extractValue.asOptionalString(node.props.itemLabelWidth);
|
|
21563
|
-
const { cssProps: itemLabelWidthCssProps } = resolveLayoutProps({ width: itemLabelWidth });
|
|
21504
|
+
const { cssProps: itemLabelWidthCssProps } = resolveLayoutProps({ width: itemLabelWidth }, void 0, appContext?.appGlobals?.disableInlineStyle);
|
|
21564
21505
|
return /* @__PURE__ */ jsx(Slot, { ref, style: style2, children: /* @__PURE__ */ jsx(
|
|
21565
21506
|
Form,
|
|
21566
21507
|
{
|
|
@@ -21731,6 +21672,11 @@ const FormMd = createMetadata({
|
|
|
21731
21672
|
description: "This method triggers validation on all form fields without submitting the form. It displays validation errors and returns the validation result along with the cleaned form data. This is useful for implementing custom submit buttons or performing operations that require validated data without actually submitting the form.",
|
|
21732
21673
|
signature: "validate(): Promise<{ isValid: boolean, data: Record<string, any>, errors: ValidationResult[], warnings: ValidationResult[], validationResults: Record<string, ValidationResult> }>",
|
|
21733
21674
|
returns: "A promise that resolves to an object containing validation status, cleaned data, and detailed validation results."
|
|
21675
|
+
},
|
|
21676
|
+
getData: {
|
|
21677
|
+
description: "This method returns a deep clone of the current form data object. Changes to the returned object do not affect the form's internal state.",
|
|
21678
|
+
signature: "getData(): Record<string, any>",
|
|
21679
|
+
returns: "A deep clone of the current form data object."
|
|
21734
21680
|
}
|
|
21735
21681
|
},
|
|
21736
21682
|
themeVars: parseScssVar(styles$V.themeVars),
|
|
@@ -21755,7 +21701,7 @@ const FormMd = createMetadata({
|
|
|
21755
21701
|
const formComponentRenderer = createComponentRenderer(
|
|
21756
21702
|
COMP$1f,
|
|
21757
21703
|
FormMd,
|
|
21758
|
-
({ node, renderChild: renderChild2, extractValue, className, lookupEventHandler, registerComponentApi }) => {
|
|
21704
|
+
({ node, renderChild: renderChild2, extractValue, className, lookupEventHandler, registerComponentApi, appContext }) => {
|
|
21759
21705
|
return /* @__PURE__ */ jsx(
|
|
21760
21706
|
FormWithContextVar,
|
|
21761
21707
|
{
|
|
@@ -21764,7 +21710,8 @@ const formComponentRenderer = createComponentRenderer(
|
|
|
21764
21710
|
extractValue,
|
|
21765
21711
|
lookupEventHandler,
|
|
21766
21712
|
className,
|
|
21767
|
-
registerComponentApi
|
|
21713
|
+
registerComponentApi,
|
|
21714
|
+
appContext
|
|
21768
21715
|
}
|
|
21769
21716
|
);
|
|
21770
21717
|
}
|
|
@@ -22364,47 +22311,48 @@ function useLongPress(elementRef, action2, delay2 = 500) {
|
|
|
22364
22311
|
}, [elementRef, action2, delay2]);
|
|
22365
22312
|
}
|
|
22366
22313
|
const themeVars$B = `'{"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)", "minHeight-Select": "var(--xmlui-minHeight-Select)", "minHeight-item-Select": "var(--xmlui-minHeight-item-Select)"}'`;
|
|
22367
|
-
const selectTrigger = "
|
|
22368
|
-
const error$8 = "
|
|
22369
|
-
const warning$9 = "
|
|
22370
|
-
const valid$8 = "
|
|
22371
|
-
const disabled$7 = "
|
|
22372
|
-
const placeholder = "
|
|
22373
|
-
const actions$1 = "
|
|
22374
|
-
const action$1 = "
|
|
22375
|
-
const emptyList = "
|
|
22376
|
-
const badgeListContainer = "
|
|
22377
|
-
const badgeList$1 = "
|
|
22378
|
-
const inputWrapper$1 = "
|
|
22379
|
-
const badge$1 = "
|
|
22380
|
-
const selectContent = "
|
|
22381
|
-
const command$1 = "
|
|
22382
|
-
const commandInputContainer = "
|
|
22383
|
-
const commandInput$1 = "
|
|
22384
|
-
const commandList$1 = "
|
|
22385
|
-
const
|
|
22386
|
-
const
|
|
22387
|
-
const
|
|
22388
|
-
const
|
|
22389
|
-
const
|
|
22390
|
-
const
|
|
22391
|
-
const
|
|
22392
|
-
const
|
|
22393
|
-
const
|
|
22394
|
-
const
|
|
22395
|
-
const
|
|
22396
|
-
const
|
|
22397
|
-
const
|
|
22398
|
-
const
|
|
22399
|
-
const
|
|
22400
|
-
const
|
|
22401
|
-
const
|
|
22402
|
-
const
|
|
22403
|
-
const
|
|
22404
|
-
const
|
|
22405
|
-
const
|
|
22406
|
-
const
|
|
22407
|
-
const
|
|
22314
|
+
const selectTrigger = "_selectTrigger_1c0m5_17";
|
|
22315
|
+
const error$8 = "_error_1c0m5_55";
|
|
22316
|
+
const warning$9 = "_warning_1c0m5_81";
|
|
22317
|
+
const valid$8 = "_valid_1c0m5_107";
|
|
22318
|
+
const disabled$7 = "_disabled_1c0m5_133";
|
|
22319
|
+
const placeholder = "_placeholder_1c0m5_145";
|
|
22320
|
+
const actions$1 = "_actions_1c0m5_162";
|
|
22321
|
+
const action$1 = "_action_1c0m5_162";
|
|
22322
|
+
const emptyList = "_emptyList_1c0m5_176";
|
|
22323
|
+
const badgeListContainer = "_badgeListContainer_1c0m5_188";
|
|
22324
|
+
const badgeList$1 = "_badgeList_1c0m5_188";
|
|
22325
|
+
const inputWrapper$1 = "_inputWrapper_1c0m5_201";
|
|
22326
|
+
const badge$1 = "_badge_1c0m5_188";
|
|
22327
|
+
const selectContent = "_selectContent_1c0m5_236";
|
|
22328
|
+
const command$1 = "_command_1c0m5_254";
|
|
22329
|
+
const commandInputContainer = "_commandInputContainer_1c0m5_259";
|
|
22330
|
+
const commandInput$1 = "_commandInput_1c0m5_259";
|
|
22331
|
+
const commandList$1 = "_commandList_1c0m5_277";
|
|
22332
|
+
const groupHeader = "_groupHeader_1c0m5_284";
|
|
22333
|
+
const multiSelectOption = "_multiSelectOption_1c0m5_296";
|
|
22334
|
+
const multiSelectOptionContent = "_multiSelectOptionContent_1c0m5_311";
|
|
22335
|
+
const highlighted$1 = "_highlighted_1c0m5_320";
|
|
22336
|
+
const disabledOption$1 = "_disabledOption_1c0m5_326";
|
|
22337
|
+
const selectValue = "_selectValue_1c0m5_341";
|
|
22338
|
+
const selectDropdownContent = "_selectDropdownContent_1c0m5_351";
|
|
22339
|
+
const fadeIn = "_fadeIn_1c0m5_1";
|
|
22340
|
+
const zoomIn = "_zoomIn_1c0m5_1";
|
|
22341
|
+
const fadeOut = "_fadeOut_1c0m5_1";
|
|
22342
|
+
const zoomOut = "_zoomOut_1c0m5_1";
|
|
22343
|
+
const slideInFromTop = "_slideInFromTop_1c0m5_1";
|
|
22344
|
+
const slideInFromRight = "_slideInFromRight_1c0m5_1";
|
|
22345
|
+
const slideInFromLeft = "_slideInFromLeft_1c0m5_1";
|
|
22346
|
+
const slideInFromBottom = "_slideInFromBottom_1c0m5_1";
|
|
22347
|
+
const selectViewport = "_selectViewport_1c0m5_383";
|
|
22348
|
+
const selectScrollUpButton = "_selectScrollUpButton_1c0m5_387";
|
|
22349
|
+
const selectScrollDownButton = "_selectScrollDownButton_1c0m5_395";
|
|
22350
|
+
const selectEmpty = "_selectEmpty_1c0m5_403";
|
|
22351
|
+
const selectOption = "_selectOption_1c0m5_416";
|
|
22352
|
+
const selectOptionContent = "_selectOptionContent_1c0m5_440";
|
|
22353
|
+
const selectOptionIndicator = "_selectOptionIndicator_1c0m5_454";
|
|
22354
|
+
const loading = "_loading_1c0m5_464";
|
|
22355
|
+
const srOnly = "_srOnly_1c0m5_467";
|
|
22408
22356
|
const styles$Q = {
|
|
22409
22357
|
themeVars: themeVars$B,
|
|
22410
22358
|
selectTrigger,
|
|
@@ -22425,6 +22373,7 @@ const styles$Q = {
|
|
|
22425
22373
|
commandInputContainer,
|
|
22426
22374
|
commandInput: commandInput$1,
|
|
22427
22375
|
commandList: commandList$1,
|
|
22376
|
+
groupHeader,
|
|
22428
22377
|
multiSelectOption,
|
|
22429
22378
|
multiSelectOptionContent,
|
|
22430
22379
|
highlighted: highlighted$1,
|
|
@@ -22457,8 +22406,11 @@ const SelectContext = createContext({
|
|
|
22457
22406
|
},
|
|
22458
22407
|
setSelectedIndex: (index) => {
|
|
22459
22408
|
},
|
|
22460
|
-
|
|
22461
|
-
|
|
22409
|
+
optionRenderer: void 0,
|
|
22410
|
+
onOptionAdd: () => {
|
|
22411
|
+
},
|
|
22412
|
+
onOptionRemove: () => {
|
|
22413
|
+
}
|
|
22462
22414
|
});
|
|
22463
22415
|
function useSelect() {
|
|
22464
22416
|
return useContext(SelectContext);
|
|
@@ -22483,22 +22435,235 @@ function useOption() {
|
|
|
22483
22435
|
return useContext(OptionContext);
|
|
22484
22436
|
}
|
|
22485
22437
|
function HiddenOption(option) {
|
|
22486
|
-
const {
|
|
22487
|
-
const
|
|
22488
|
-
|
|
22489
|
-
|
|
22490
|
-
|
|
22438
|
+
const { onOptionAdd, onOptionRemove } = useOption();
|
|
22439
|
+
const nodeRef = useRef(null);
|
|
22440
|
+
useEffect(() => {
|
|
22441
|
+
let textNode;
|
|
22442
|
+
if (nodeRef.current) {
|
|
22443
|
+
textNode = nodeRef.current.textContent;
|
|
22444
|
+
}
|
|
22445
|
+
const opt = {
|
|
22491
22446
|
...option,
|
|
22492
|
-
label:
|
|
22493
|
-
keywords: option.keywords || [label2 ?? node?.textContent ?? ""]
|
|
22494
|
-
// Store the rendered ReactNode for dropdown display
|
|
22447
|
+
label: option.label || textNode || option.value
|
|
22495
22448
|
};
|
|
22496
|
-
}, [option, node, label2]);
|
|
22497
|
-
useEffect(() => {
|
|
22498
22449
|
onOptionAdd(opt);
|
|
22499
|
-
|
|
22500
|
-
|
|
22450
|
+
return () => {
|
|
22451
|
+
onOptionRemove(opt);
|
|
22452
|
+
};
|
|
22453
|
+
}, [option, onOptionAdd, onOptionRemove]);
|
|
22454
|
+
return /* @__PURE__ */ jsx(
|
|
22455
|
+
"span",
|
|
22456
|
+
{
|
|
22457
|
+
ref: nodeRef,
|
|
22458
|
+
style: { display: "none", visibility: "hidden", width: 0, height: 0, position: "absolute" },
|
|
22459
|
+
children: option.children
|
|
22460
|
+
}
|
|
22461
|
+
);
|
|
22501
22462
|
}
|
|
22463
|
+
const SelectOption = forwardRef(
|
|
22464
|
+
function SelectOption2(option, ref) {
|
|
22465
|
+
const visibleContentRef = useRef(null);
|
|
22466
|
+
const { value, label: label2, enabled: enabled2 = true, children, className } = option;
|
|
22467
|
+
const { value: selectedValue, optionRenderer } = useSelect();
|
|
22468
|
+
return /* @__PURE__ */ jsx(
|
|
22469
|
+
Item$1,
|
|
22470
|
+
{
|
|
22471
|
+
ref,
|
|
22472
|
+
className: classnames(className, styles$Q.selectOption),
|
|
22473
|
+
value,
|
|
22474
|
+
textValue: label2,
|
|
22475
|
+
disabled: !enabled2,
|
|
22476
|
+
onClick: (event) => {
|
|
22477
|
+
event.stopPropagation();
|
|
22478
|
+
},
|
|
22479
|
+
"data-state": selectedValue === value && "checked",
|
|
22480
|
+
children: children ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22481
|
+
/* @__PURE__ */ jsxs("div", { className: styles$Q.selectOptionContent, ref: visibleContentRef, children: [
|
|
22482
|
+
/* @__PURE__ */ jsx("span", { style: { visibility: "hidden", position: "absolute", width: 0, height: 0 }, children: /* @__PURE__ */ jsx(ItemText, { children: label2 }) }),
|
|
22483
|
+
children
|
|
22484
|
+
] }),
|
|
22485
|
+
selectedValue === value && /* @__PURE__ */ jsx(ItemIndicator, { className: styles$Q.selectOptionIndicator, children: /* @__PURE__ */ jsx(Icon$l, { name: "checkmark" }) })
|
|
22486
|
+
] }) : optionRenderer ? /* @__PURE__ */ jsxs("div", { className: styles$Q.selectOptionContent, ref: visibleContentRef, children: [
|
|
22487
|
+
/* @__PURE__ */ jsx("span", { style: { visibility: "hidden", position: "absolute", width: 0, height: 0 }, children: /* @__PURE__ */ jsx(ItemText, { children: label2 }) }),
|
|
22488
|
+
optionRenderer(
|
|
22489
|
+
{
|
|
22490
|
+
label: label2,
|
|
22491
|
+
value,
|
|
22492
|
+
enabled: enabled2
|
|
22493
|
+
},
|
|
22494
|
+
selectedValue,
|
|
22495
|
+
false
|
|
22496
|
+
)
|
|
22497
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22498
|
+
/* @__PURE__ */ jsx("div", { className: styles$Q.selectOptionContent, ref: visibleContentRef, children: /* @__PURE__ */ jsx(ItemText, { children: label2 }) }),
|
|
22499
|
+
selectedValue === value && /* @__PURE__ */ jsx(ItemIndicator, { className: styles$Q.selectItemIndicator, children: /* @__PURE__ */ jsx(Icon$l, { name: "checkmark" }) })
|
|
22500
|
+
] })
|
|
22501
|
+
}
|
|
22502
|
+
);
|
|
22503
|
+
}
|
|
22504
|
+
);
|
|
22505
|
+
const SimpleSelect = forwardRef(
|
|
22506
|
+
function SimpleSelect2(props, forwardedRef) {
|
|
22507
|
+
const { root: root2 } = useTheme();
|
|
22508
|
+
const {
|
|
22509
|
+
enabled: enabled2,
|
|
22510
|
+
onBlur,
|
|
22511
|
+
autoFocus,
|
|
22512
|
+
onValueChange,
|
|
22513
|
+
validationStatus,
|
|
22514
|
+
value,
|
|
22515
|
+
height,
|
|
22516
|
+
style: style2,
|
|
22517
|
+
placeholder: placeholder2,
|
|
22518
|
+
id,
|
|
22519
|
+
triggerRef,
|
|
22520
|
+
onFocus,
|
|
22521
|
+
width,
|
|
22522
|
+
readOnly: readOnly2,
|
|
22523
|
+
emptyListNode,
|
|
22524
|
+
className,
|
|
22525
|
+
modal,
|
|
22526
|
+
groupBy: groupBy2,
|
|
22527
|
+
groupHeaderRenderer,
|
|
22528
|
+
ungroupedHeaderRenderer,
|
|
22529
|
+
clearable,
|
|
22530
|
+
onClear,
|
|
22531
|
+
options: options2,
|
|
22532
|
+
children,
|
|
22533
|
+
...rest
|
|
22534
|
+
} = props;
|
|
22535
|
+
const composedRef = forwardRef ? composeRefs(triggerRef, forwardedRef) : triggerRef;
|
|
22536
|
+
const [open, setOpen] = useState(false);
|
|
22537
|
+
const stringValue = useMemo(() => {
|
|
22538
|
+
return value != void 0 ? String(value) : void 0;
|
|
22539
|
+
}, [value]);
|
|
22540
|
+
const handleValueChange = useCallback(
|
|
22541
|
+
(val) => {
|
|
22542
|
+
if (readOnly2) return;
|
|
22543
|
+
onValueChange(val);
|
|
22544
|
+
},
|
|
22545
|
+
[onValueChange, readOnly2]
|
|
22546
|
+
);
|
|
22547
|
+
const selectedOption = useMemo(() => {
|
|
22548
|
+
return options2.find((option) => `${option.value}` === `${value}`);
|
|
22549
|
+
}, [options2, value]);
|
|
22550
|
+
const groupedOptions = useMemo(() => {
|
|
22551
|
+
if (!groupBy2) return null;
|
|
22552
|
+
const groups = {};
|
|
22553
|
+
options2.forEach((option) => {
|
|
22554
|
+
const groupKey = option[groupBy2] || "Ungrouped";
|
|
22555
|
+
if (!groups[groupKey]) {
|
|
22556
|
+
groups[groupKey] = [];
|
|
22557
|
+
}
|
|
22558
|
+
groups[groupKey].push(option);
|
|
22559
|
+
});
|
|
22560
|
+
const sortedGroups = {};
|
|
22561
|
+
if (groups["Ungrouped"]) {
|
|
22562
|
+
sortedGroups["Ungrouped"] = groups["Ungrouped"];
|
|
22563
|
+
}
|
|
22564
|
+
Object.keys(groups).filter((key) => key !== "Ungrouped").sort().forEach((key) => {
|
|
22565
|
+
sortedGroups[key] = groups[key];
|
|
22566
|
+
});
|
|
22567
|
+
return sortedGroups;
|
|
22568
|
+
}, [groupBy2, options2]);
|
|
22569
|
+
return /* @__PURE__ */ jsxs(
|
|
22570
|
+
Root,
|
|
22571
|
+
{
|
|
22572
|
+
open,
|
|
22573
|
+
value: stringValue,
|
|
22574
|
+
onValueChange: handleValueChange,
|
|
22575
|
+
onOpenChange: () => enabled2 && !readOnly2 && setOpen(!open),
|
|
22576
|
+
children: [
|
|
22577
|
+
/* @__PURE__ */ jsxs(
|
|
22578
|
+
Trigger,
|
|
22579
|
+
{
|
|
22580
|
+
...rest,
|
|
22581
|
+
id,
|
|
22582
|
+
ref: composedRef,
|
|
22583
|
+
"aria-haspopup": "listbox",
|
|
22584
|
+
style: style2,
|
|
22585
|
+
onFocus,
|
|
22586
|
+
onBlur,
|
|
22587
|
+
disabled: !enabled2,
|
|
22588
|
+
className: classnames(className, styles$Q.selectTrigger, {
|
|
22589
|
+
[styles$Q.error]: validationStatus === "error",
|
|
22590
|
+
[styles$Q.warning]: validationStatus === "warning",
|
|
22591
|
+
[styles$Q.valid]: validationStatus === "valid"
|
|
22592
|
+
}),
|
|
22593
|
+
onClick: (event) => {
|
|
22594
|
+
event.stopPropagation();
|
|
22595
|
+
},
|
|
22596
|
+
autoFocus,
|
|
22597
|
+
children: [
|
|
22598
|
+
/* @__PURE__ */ jsx(
|
|
22599
|
+
"div",
|
|
22600
|
+
{
|
|
22601
|
+
className: classnames(styles$Q.selectValue, {
|
|
22602
|
+
[styles$Q.placeholder]: value === void 0
|
|
22603
|
+
}),
|
|
22604
|
+
children: selectedOption ? selectedOption.label : readOnly2 ? "" : placeholder2
|
|
22605
|
+
}
|
|
22606
|
+
),
|
|
22607
|
+
clearable && value !== void 0 && value !== "" && !readOnly2 && enabled2 && /* @__PURE__ */ jsx(Part, { partId: "clearButton", children: /* @__PURE__ */ jsx(
|
|
22608
|
+
"button",
|
|
22609
|
+
{
|
|
22610
|
+
type: "button",
|
|
22611
|
+
className: styles$Q.clearButton,
|
|
22612
|
+
onPointerDown: (e) => {
|
|
22613
|
+
e.preventDefault();
|
|
22614
|
+
e.stopPropagation();
|
|
22615
|
+
onClear?.();
|
|
22616
|
+
},
|
|
22617
|
+
tabIndex: -1,
|
|
22618
|
+
children: /* @__PURE__ */ jsx(Icon$l, { name: "close" })
|
|
22619
|
+
}
|
|
22620
|
+
) }),
|
|
22621
|
+
/* @__PURE__ */ jsx("span", { className: styles$Q.action, children: /* @__PURE__ */ jsx(Icon$l, { name: "chevrondown" }) })
|
|
22622
|
+
]
|
|
22623
|
+
}
|
|
22624
|
+
),
|
|
22625
|
+
/* @__PURE__ */ jsx(Portal, { container: root2, children: /* @__PURE__ */ jsxs(
|
|
22626
|
+
Content,
|
|
22627
|
+
{
|
|
22628
|
+
collisionPadding: 0,
|
|
22629
|
+
className: styles$Q.selectDropdownContent,
|
|
22630
|
+
position: "popper",
|
|
22631
|
+
align: "start",
|
|
22632
|
+
style: { maxHeight: height, width },
|
|
22633
|
+
children: [
|
|
22634
|
+
/* @__PURE__ */ jsx(ScrollUpButton, { className: styles$Q.selectScrollUpButton, children: /* @__PURE__ */ jsx(Icon$l, { name: "chevronup" }) }),
|
|
22635
|
+
/* @__PURE__ */ jsx(Part, { partId: "listWrapper", children: /* @__PURE__ */ jsx(Viewport, { className: styles$Q.selectViewport, role: "listbox", children: groupBy2 && groupedOptions ? (
|
|
22636
|
+
// Render grouped options directly from options array
|
|
22637
|
+
/* @__PURE__ */ jsx(Fragment, { children: Object.keys(groupedOptions).length === 0 ? emptyListNode : Object.entries(groupedOptions).map(([groupName, groupOptions]) => /* @__PURE__ */ jsxs(Group, { children: [
|
|
22638
|
+
groupName === "Ungrouped" ? ungroupedHeaderRenderer && /* @__PURE__ */ jsx(Label, { className: styles$Q.groupHeader, children: ungroupedHeaderRenderer() }) : /* @__PURE__ */ jsx(Label, { className: styles$Q.groupHeader, children: groupHeaderRenderer ? groupHeaderRenderer(groupName) : groupName }),
|
|
22639
|
+
groupOptions.map((option) => /* @__PURE__ */ jsx(
|
|
22640
|
+
SelectOption,
|
|
22641
|
+
{
|
|
22642
|
+
value: option.value,
|
|
22643
|
+
label: option.label,
|
|
22644
|
+
enabled: option.enabled,
|
|
22645
|
+
className: styles$Q.selectOption,
|
|
22646
|
+
children: option.children
|
|
22647
|
+
},
|
|
22648
|
+
option.value
|
|
22649
|
+
))
|
|
22650
|
+
] }, groupName)) })
|
|
22651
|
+
) : (
|
|
22652
|
+
// Render flat options
|
|
22653
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22654
|
+
/* @__PURE__ */ jsx(OptionTypeProvider, { Component: SelectOption, children }),
|
|
22655
|
+
options2.length === 0 && emptyListNode
|
|
22656
|
+
] })
|
|
22657
|
+
) }) }),
|
|
22658
|
+
/* @__PURE__ */ jsx(ScrollDownButton, { className: styles$Q.selectScrollDownButton, children: /* @__PURE__ */ jsx(Icon$l, { name: "chevrondown" }) })
|
|
22659
|
+
]
|
|
22660
|
+
}
|
|
22661
|
+
) })
|
|
22662
|
+
]
|
|
22663
|
+
}
|
|
22664
|
+
);
|
|
22665
|
+
}
|
|
22666
|
+
);
|
|
22502
22667
|
const PART_LIST_WRAPPER$1 = "listWrapper";
|
|
22503
22668
|
const PART_CLEAR_BUTTON$1 = "clearButton";
|
|
22504
22669
|
const defaultProps$M = {
|
|
@@ -22515,24 +22680,20 @@ const defaultProps$M = {
|
|
|
22515
22680
|
clearable: false
|
|
22516
22681
|
};
|
|
22517
22682
|
const SelectTriggerValue = ({
|
|
22518
|
-
value,
|
|
22519
22683
|
placeholder: placeholder2,
|
|
22520
22684
|
readOnly: readOnly2,
|
|
22521
22685
|
multiSelect,
|
|
22522
|
-
|
|
22686
|
+
selectedOptions,
|
|
22523
22687
|
valueRenderer,
|
|
22524
22688
|
toggleOption
|
|
22525
22689
|
}) => {
|
|
22526
|
-
if (
|
|
22527
|
-
if (
|
|
22528
|
-
return /* @__PURE__ */ jsx("div", { className: styles$Q.badgeListContainer, children: /* @__PURE__ */ jsx("div", { className: styles$Q.badgeList, children:
|
|
22529
|
-
(
|
|
22530
|
-
|
|
22531
|
-
|
|
22532
|
-
|
|
22533
|
-
}
|
|
22534
|
-
) : /* @__PURE__ */ jsxs("span", { className: styles$Q.badge, children: [
|
|
22535
|
-
Array.from(options2).find((o) => o.value === `${v}`)?.label,
|
|
22690
|
+
if (selectedOptions.length) {
|
|
22691
|
+
if (multiSelect) {
|
|
22692
|
+
return /* @__PURE__ */ jsx("div", { className: styles$Q.badgeListContainer, children: /* @__PURE__ */ jsx("div", { className: styles$Q.badgeList, children: selectedOptions.map(
|
|
22693
|
+
(option) => valueRenderer ? valueRenderer(option, () => {
|
|
22694
|
+
if (!readOnly2) toggleOption(option.value);
|
|
22695
|
+
}) : /* @__PURE__ */ jsxs("span", { className: styles$Q.badge, children: [
|
|
22696
|
+
option.label,
|
|
22536
22697
|
/* @__PURE__ */ jsx(
|
|
22537
22698
|
Icon$l,
|
|
22538
22699
|
{
|
|
@@ -22540,20 +22701,17 @@ const SelectTriggerValue = ({
|
|
|
22540
22701
|
size: "sm",
|
|
22541
22702
|
onClick: (event) => {
|
|
22542
22703
|
event.stopPropagation();
|
|
22543
|
-
toggleOption(
|
|
22704
|
+
if (!readOnly2) toggleOption(option.value);
|
|
22544
22705
|
}
|
|
22545
22706
|
}
|
|
22546
22707
|
)
|
|
22547
|
-
] },
|
|
22708
|
+
] }, option.value)
|
|
22548
22709
|
) }) });
|
|
22710
|
+
} else {
|
|
22711
|
+
return /* @__PURE__ */ jsx("div", { className: styles$Q.selectValue, children: selectedOptions[0]?.label });
|
|
22549
22712
|
}
|
|
22550
|
-
return /* @__PURE__ */ jsx("span", { placeholder: placeholder2, className: styles$Q.placeholder, children: placeholder2 });
|
|
22551
22713
|
}
|
|
22552
|
-
|
|
22553
|
-
const selectedOption = Array.from(options2).find((o) => o.value === value);
|
|
22554
|
-
return /* @__PURE__ */ jsx("div", { className: styles$Q.selectValue, children: selectedOption?.label });
|
|
22555
|
-
}
|
|
22556
|
-
return /* @__PURE__ */ jsx("div", { "aria-placeholder": placeholder2, className: styles$Q.placeholder, children: readOnly2 ? "" : placeholder2 || "" });
|
|
22714
|
+
return /* @__PURE__ */ jsx("span", { placeholder: placeholder2, className: styles$Q.placeholder, children: placeholder2 });
|
|
22557
22715
|
};
|
|
22558
22716
|
const SelectTriggerActions = ({
|
|
22559
22717
|
value,
|
|
@@ -22577,7 +22735,14 @@ const SelectTriggerActions = ({
|
|
|
22577
22735
|
children: /* @__PURE__ */ jsx(Icon$l, { name: "close" })
|
|
22578
22736
|
}
|
|
22579
22737
|
) }),
|
|
22580
|
-
showChevron && /* @__PURE__ */ jsx(
|
|
22738
|
+
showChevron && /* @__PURE__ */ jsx(
|
|
22739
|
+
"span",
|
|
22740
|
+
{
|
|
22741
|
+
className: classnames(styles$Q.action, { [styles$Q.disabled]: !enabled2 || readOnly2 }),
|
|
22742
|
+
"aria-disabled": !enabled2 || readOnly2,
|
|
22743
|
+
children: /* @__PURE__ */ jsx(Icon$l, { name: "chevrondown" })
|
|
22744
|
+
}
|
|
22745
|
+
)
|
|
22581
22746
|
] });
|
|
22582
22747
|
};
|
|
22583
22748
|
const Select = forwardRef(function Select2({
|
|
@@ -22610,6 +22775,10 @@ const Select = forwardRef(function Select2({
|
|
|
22610
22775
|
// Progress state
|
|
22611
22776
|
inProgress = defaultProps$M.inProgress,
|
|
22612
22777
|
inProgressNotificationMessage = defaultProps$M.inProgressNotificationMessage,
|
|
22778
|
+
// Grouping
|
|
22779
|
+
groupBy: groupBy2,
|
|
22780
|
+
groupHeaderRenderer,
|
|
22781
|
+
ungroupedHeaderRenderer,
|
|
22613
22782
|
// Internal
|
|
22614
22783
|
updateState = noop$1,
|
|
22615
22784
|
registerComponentApi,
|
|
@@ -22622,9 +22791,17 @@ const Select = forwardRef(function Select2({
|
|
|
22622
22791
|
const [width, setWidth] = useState(0);
|
|
22623
22792
|
const observer = useRef();
|
|
22624
22793
|
const { root: root2 } = useTheme();
|
|
22625
|
-
const [options2, setOptions] = useState(
|
|
22794
|
+
const [options2, setOptions] = useState([]);
|
|
22626
22795
|
const [searchTerm, setSearchTerm] = useState("");
|
|
22627
22796
|
const [selectedIndex, setSelectedIndex] = useState(-1);
|
|
22797
|
+
const selectedOptions = useMemo(() => {
|
|
22798
|
+
if (!multiSelect) {
|
|
22799
|
+
return options2.filter((option) => `${option.value}` === `${value}`);
|
|
22800
|
+
} else {
|
|
22801
|
+
return Array.isArray(value) ? options2.filter((option) => value.map((v) => String(v)).includes(String(option.value))) : [];
|
|
22802
|
+
}
|
|
22803
|
+
}, [multiSelect, options2, value]);
|
|
22804
|
+
const currentValue = value !== void 0 ? value : initialValue;
|
|
22628
22805
|
const filteredOptions = useMemo(() => {
|
|
22629
22806
|
if (!searchTerm || searchTerm.trim() === "") {
|
|
22630
22807
|
return Array.from(options2);
|
|
@@ -22635,6 +22812,34 @@ const Select = forwardRef(function Select2({
|
|
|
22635
22812
|
return extendedValue.toLowerCase().includes(searchLower);
|
|
22636
22813
|
});
|
|
22637
22814
|
}, [options2, searchTerm]);
|
|
22815
|
+
const groupedOptions = useMemo(() => {
|
|
22816
|
+
if (!groupBy2) return null;
|
|
22817
|
+
const optionsToGroup = searchTerm ? filteredOptions : Array.from(options2);
|
|
22818
|
+
const groups = {};
|
|
22819
|
+
optionsToGroup.forEach((option) => {
|
|
22820
|
+
const groupKey = option[groupBy2] || "Ungrouped";
|
|
22821
|
+
if (!groups[groupKey]) {
|
|
22822
|
+
groups[groupKey] = [];
|
|
22823
|
+
}
|
|
22824
|
+
groups[groupKey].push(option);
|
|
22825
|
+
});
|
|
22826
|
+
const sortedGroups = {};
|
|
22827
|
+
if (groups["Ungrouped"]) {
|
|
22828
|
+
sortedGroups["Ungrouped"] = groups["Ungrouped"];
|
|
22829
|
+
}
|
|
22830
|
+
Object.keys(groups).filter((key) => key !== "Ungrouped").sort().forEach((key) => {
|
|
22831
|
+
sortedGroups[key] = groups[key];
|
|
22832
|
+
});
|
|
22833
|
+
return sortedGroups;
|
|
22834
|
+
}, [groupBy2, options2, filteredOptions, searchTerm]);
|
|
22835
|
+
const flattenedGroupedOptions = useMemo(() => {
|
|
22836
|
+
if (!groupedOptions) return null;
|
|
22837
|
+
const flattened = [];
|
|
22838
|
+
Object.entries(groupedOptions).forEach(([_, groupOptions]) => {
|
|
22839
|
+
flattened.push(...groupOptions);
|
|
22840
|
+
});
|
|
22841
|
+
return flattened;
|
|
22842
|
+
}, [groupedOptions]);
|
|
22638
22843
|
useEffect(() => {
|
|
22639
22844
|
if (!open) {
|
|
22640
22845
|
setSelectedIndex(-1);
|
|
@@ -22648,25 +22853,30 @@ const Select = forwardRef(function Select2({
|
|
|
22648
22853
|
}, [initialValue, updateState]);
|
|
22649
22854
|
useEffect(() => {
|
|
22650
22855
|
const current = referenceElement;
|
|
22651
|
-
observer.current
|
|
22856
|
+
const currentObserver = observer.current;
|
|
22857
|
+
currentObserver?.disconnect();
|
|
22652
22858
|
if (current) {
|
|
22653
|
-
|
|
22654
|
-
observer.current
|
|
22859
|
+
const newObserver = new ResizeObserver(() => setWidth(current.clientWidth));
|
|
22860
|
+
observer.current = newObserver;
|
|
22861
|
+
newObserver.observe(current);
|
|
22862
|
+
return () => {
|
|
22863
|
+
newObserver.disconnect();
|
|
22864
|
+
};
|
|
22655
22865
|
}
|
|
22656
22866
|
return () => {
|
|
22657
|
-
|
|
22867
|
+
currentObserver?.disconnect();
|
|
22658
22868
|
};
|
|
22659
22869
|
}, [referenceElement]);
|
|
22660
22870
|
const toggleOption = useCallback(
|
|
22661
22871
|
(selectedValue) => {
|
|
22662
|
-
const newSelectedValue = multiSelect ? Array.isArray(
|
|
22872
|
+
const newSelectedValue = multiSelect ? Array.isArray(currentValue) ? currentValue.map((v) => String(v)).includes(String(selectedValue)) ? currentValue.filter((v) => String(v) !== String(selectedValue)) : [...currentValue, selectedValue] : [selectedValue] : String(selectedValue) === String(currentValue) ? null : selectedValue;
|
|
22663
22873
|
updateState({ value: newSelectedValue });
|
|
22664
22874
|
onDidChange(newSelectedValue);
|
|
22665
22875
|
if (!multiSelect) {
|
|
22666
22876
|
setOpen(false);
|
|
22667
22877
|
}
|
|
22668
22878
|
},
|
|
22669
|
-
[multiSelect,
|
|
22879
|
+
[multiSelect, currentValue, updateState, onDidChange]
|
|
22670
22880
|
);
|
|
22671
22881
|
const clearValue = useCallback(() => {
|
|
22672
22882
|
const newValue = multiSelect ? [] : "";
|
|
@@ -22675,45 +22885,48 @@ const Select = forwardRef(function Select2({
|
|
|
22675
22885
|
}, [multiSelect, updateState, onDidChange]);
|
|
22676
22886
|
const findNextEnabledIndex = useCallback(
|
|
22677
22887
|
(currentIndex) => {
|
|
22678
|
-
|
|
22679
|
-
|
|
22680
|
-
|
|
22888
|
+
const optionsList = flattenedGroupedOptions ? flattenedGroupedOptions : filteredOptions;
|
|
22889
|
+
if (optionsList.length === 0) return -1;
|
|
22890
|
+
for (let i = currentIndex + 1; i < optionsList.length; i++) {
|
|
22891
|
+
const item2 = optionsList[i];
|
|
22681
22892
|
if (item2 && item2.enabled !== false) {
|
|
22682
22893
|
return i;
|
|
22683
22894
|
}
|
|
22684
22895
|
}
|
|
22685
22896
|
for (let i = 0; i <= currentIndex; i++) {
|
|
22686
|
-
const item2 =
|
|
22897
|
+
const item2 = optionsList[i];
|
|
22687
22898
|
if (item2 && item2.enabled !== false) {
|
|
22688
22899
|
return i;
|
|
22689
22900
|
}
|
|
22690
22901
|
}
|
|
22691
22902
|
return -1;
|
|
22692
22903
|
},
|
|
22693
|
-
[filteredOptions]
|
|
22904
|
+
[filteredOptions, flattenedGroupedOptions]
|
|
22694
22905
|
);
|
|
22695
22906
|
const findPreviousEnabledIndex = useCallback(
|
|
22696
22907
|
(currentIndex) => {
|
|
22697
|
-
|
|
22908
|
+
const optionsList = flattenedGroupedOptions ? flattenedGroupedOptions : filteredOptions;
|
|
22909
|
+
if (optionsList.length === 0) return -1;
|
|
22698
22910
|
for (let i = currentIndex - 1; i >= 0; i--) {
|
|
22699
|
-
const item2 =
|
|
22911
|
+
const item2 = optionsList[i];
|
|
22700
22912
|
if (item2 && item2.enabled !== false) {
|
|
22701
22913
|
return i;
|
|
22702
22914
|
}
|
|
22703
22915
|
}
|
|
22704
|
-
for (let i =
|
|
22705
|
-
const item2 =
|
|
22916
|
+
for (let i = optionsList.length - 1; i >= currentIndex; i--) {
|
|
22917
|
+
const item2 = optionsList[i];
|
|
22706
22918
|
if (item2 && item2.enabled !== false) {
|
|
22707
22919
|
return i;
|
|
22708
22920
|
}
|
|
22709
22921
|
}
|
|
22710
22922
|
return -1;
|
|
22711
22923
|
},
|
|
22712
|
-
[filteredOptions]
|
|
22924
|
+
[filteredOptions, flattenedGroupedOptions]
|
|
22713
22925
|
);
|
|
22714
22926
|
const handleKeyDown = useCallback(
|
|
22715
22927
|
(event) => {
|
|
22716
22928
|
if (!open) return;
|
|
22929
|
+
const optionsList = flattenedGroupedOptions ? flattenedGroupedOptions : filteredOptions;
|
|
22717
22930
|
switch (event.key) {
|
|
22718
22931
|
case "ArrowDown":
|
|
22719
22932
|
event.preventDefault();
|
|
@@ -22731,8 +22944,8 @@ const Select = forwardRef(function Select2({
|
|
|
22731
22944
|
break;
|
|
22732
22945
|
case "Enter":
|
|
22733
22946
|
event.preventDefault();
|
|
22734
|
-
if (selectedIndex >= 0 && selectedIndex <
|
|
22735
|
-
const selectedItem =
|
|
22947
|
+
if (selectedIndex >= 0 && selectedIndex < optionsList.length) {
|
|
22948
|
+
const selectedItem = optionsList[selectedIndex];
|
|
22736
22949
|
if (selectedItem && selectedItem.enabled !== false) {
|
|
22737
22950
|
toggleOption(selectedItem.value);
|
|
22738
22951
|
if (!multiSelect) {
|
|
@@ -22751,6 +22964,7 @@ const Select = forwardRef(function Select2({
|
|
|
22751
22964
|
open,
|
|
22752
22965
|
selectedIndex,
|
|
22753
22966
|
filteredOptions,
|
|
22967
|
+
flattenedGroupedOptions,
|
|
22754
22968
|
toggleOption,
|
|
22755
22969
|
multiSelect,
|
|
22756
22970
|
findNextEnabledIndex,
|
|
@@ -22786,248 +23000,225 @@ const Select = forwardRef(function Select2({
|
|
|
22786
23000
|
[emptyListTemplate]
|
|
22787
23001
|
);
|
|
22788
23002
|
const onOptionAdd = useCallback((option) => {
|
|
22789
|
-
setOptions((prev) =>
|
|
22790
|
-
const exists = Array.from(prev).some((opt) => opt.value === option.value);
|
|
22791
|
-
if (exists) {
|
|
22792
|
-
return prev;
|
|
22793
|
-
}
|
|
22794
|
-
const newSet = new Set(prev);
|
|
22795
|
-
newSet.add(option);
|
|
22796
|
-
return newSet;
|
|
22797
|
-
});
|
|
23003
|
+
setOptions((prev) => [...prev, option]);
|
|
22798
23004
|
}, []);
|
|
22799
23005
|
const onOptionRemove = useCallback((option) => {
|
|
22800
|
-
setOptions((prev) =>
|
|
22801
|
-
const optionsSet = new Set(prev);
|
|
22802
|
-
optionsSet.delete(option);
|
|
22803
|
-
return optionsSet;
|
|
22804
|
-
});
|
|
23006
|
+
setOptions((prev) => prev.filter((opt) => opt.value !== option.value));
|
|
22805
23007
|
}, []);
|
|
22806
|
-
const optionContextValue = useMemo(
|
|
22807
|
-
() => ({
|
|
22808
|
-
onOptionAdd,
|
|
22809
|
-
onOptionRemove
|
|
22810
|
-
}),
|
|
22811
|
-
[onOptionAdd, onOptionRemove]
|
|
22812
|
-
);
|
|
22813
23008
|
const selectContextValue = useMemo(
|
|
22814
23009
|
() => ({
|
|
22815
23010
|
multiSelect,
|
|
22816
23011
|
readOnly: readOnly2,
|
|
22817
|
-
value,
|
|
23012
|
+
value: currentValue,
|
|
22818
23013
|
onChange: toggleOption,
|
|
22819
23014
|
setOpen,
|
|
22820
23015
|
setSelectedIndex,
|
|
22821
|
-
options: options2,
|
|
22822
23016
|
highlightedValue: selectedIndex >= 0 && selectedIndex < filteredOptions.length && filteredOptions[selectedIndex] ? filteredOptions[selectedIndex].value : void 0,
|
|
22823
23017
|
optionRenderer
|
|
22824
23018
|
}),
|
|
22825
23019
|
[
|
|
22826
23020
|
multiSelect,
|
|
22827
23021
|
readOnly2,
|
|
22828
|
-
|
|
23022
|
+
currentValue,
|
|
22829
23023
|
toggleOption,
|
|
22830
|
-
options2,
|
|
22831
23024
|
selectedIndex,
|
|
22832
23025
|
filteredOptions,
|
|
22833
23026
|
optionRenderer
|
|
22834
23027
|
]
|
|
22835
23028
|
);
|
|
23029
|
+
const optionContextValue = useMemo(
|
|
23030
|
+
() => ({
|
|
23031
|
+
onOptionAdd,
|
|
23032
|
+
onOptionRemove
|
|
23033
|
+
}),
|
|
23034
|
+
[onOptionAdd, onOptionRemove]
|
|
23035
|
+
);
|
|
23036
|
+
const useSimpleSelect = !searchable && !multiSelect;
|
|
22836
23037
|
return /* @__PURE__ */ jsx(SelectContext.Provider, { value: selectContextValue, children: /* @__PURE__ */ jsxs(OptionContext.Provider, { value: optionContextValue, children: [
|
|
22837
|
-
|
|
22838
|
-
|
|
22839
|
-
|
|
22840
|
-
|
|
22841
|
-
|
|
22842
|
-
|
|
22843
|
-
|
|
22844
|
-
|
|
22845
|
-
|
|
22846
|
-
|
|
22847
|
-
|
|
22848
|
-
|
|
22849
|
-
|
|
22850
|
-
|
|
22851
|
-
|
|
22852
|
-
|
|
22853
|
-
|
|
22854
|
-
|
|
22855
|
-
|
|
22856
|
-
|
|
22857
|
-
|
|
22858
|
-
|
|
22859
|
-
|
|
22860
|
-
|
|
22861
|
-
|
|
22862
|
-
|
|
22863
|
-
|
|
22864
|
-
|
|
22865
|
-
|
|
22866
|
-
|
|
22867
|
-
|
|
22868
|
-
|
|
22869
|
-
|
|
22870
|
-
|
|
22871
|
-
|
|
22872
|
-
|
|
22873
|
-
|
|
22874
|
-
|
|
22875
|
-
|
|
22876
|
-
|
|
22877
|
-
|
|
22878
|
-
|
|
22879
|
-
|
|
22880
|
-
|
|
22881
|
-
|
|
22882
|
-
|
|
22883
|
-
|
|
22884
|
-
|
|
22885
|
-
|
|
22886
|
-
|
|
22887
|
-
|
|
22888
|
-
|
|
22889
|
-
|
|
22890
|
-
|
|
22891
|
-
|
|
22892
|
-
|
|
22893
|
-
|
|
22894
|
-
|
|
22895
|
-
|
|
22896
|
-
|
|
23038
|
+
useSimpleSelect ? (
|
|
23039
|
+
// SimpleSelect mode (Radix UI Select)
|
|
23040
|
+
/* @__PURE__ */ jsx(
|
|
23041
|
+
SimpleSelect,
|
|
23042
|
+
{
|
|
23043
|
+
value: currentValue,
|
|
23044
|
+
onValueChange: (val) => toggleOption(val),
|
|
23045
|
+
id,
|
|
23046
|
+
options: options2,
|
|
23047
|
+
style: style2,
|
|
23048
|
+
className,
|
|
23049
|
+
onFocus,
|
|
23050
|
+
onBlur,
|
|
23051
|
+
enabled: enabled2,
|
|
23052
|
+
validationStatus,
|
|
23053
|
+
triggerRef: setReferenceElement,
|
|
23054
|
+
autoFocus,
|
|
23055
|
+
placeholder: placeholder2,
|
|
23056
|
+
height: dropdownHeight,
|
|
23057
|
+
width,
|
|
23058
|
+
readOnly: readOnly2,
|
|
23059
|
+
emptyListNode,
|
|
23060
|
+
modal,
|
|
23061
|
+
groupBy: groupBy2,
|
|
23062
|
+
groupHeaderRenderer,
|
|
23063
|
+
ungroupedHeaderRenderer,
|
|
23064
|
+
clearable,
|
|
23065
|
+
onClear: clearValue,
|
|
23066
|
+
...rest,
|
|
23067
|
+
children
|
|
23068
|
+
}
|
|
23069
|
+
)
|
|
23070
|
+
) : (
|
|
23071
|
+
// Popover mode (searchable or multi-select)
|
|
23072
|
+
/* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
|
|
23073
|
+
Popover,
|
|
23074
|
+
{
|
|
23075
|
+
open,
|
|
23076
|
+
onOpenChange: (isOpen) => {
|
|
23077
|
+
if (!enabled2 || readOnly2) return;
|
|
23078
|
+
setOpen(isOpen);
|
|
23079
|
+
},
|
|
23080
|
+
modal,
|
|
23081
|
+
children: [
|
|
23082
|
+
/* @__PURE__ */ jsx(Part, { partId: PART_LIST_WRAPPER$1, children: /* @__PURE__ */ jsxs(
|
|
23083
|
+
PopoverTrigger,
|
|
23084
|
+
{
|
|
23085
|
+
...rest,
|
|
23086
|
+
ref: composeRefs(setReferenceElement, forwardedRef),
|
|
23087
|
+
id,
|
|
23088
|
+
"aria-haspopup": "listbox",
|
|
23089
|
+
style: style2,
|
|
23090
|
+
onFocus,
|
|
23091
|
+
onBlur,
|
|
23092
|
+
disabled: !enabled2,
|
|
23093
|
+
"aria-expanded": open,
|
|
23094
|
+
className: classnames(className, styles$Q.selectTrigger, styles$Q[validationStatus], {
|
|
23095
|
+
[styles$Q.disabled]: !enabled2,
|
|
23096
|
+
[styles$Q.multi]: multiSelect
|
|
23097
|
+
}),
|
|
23098
|
+
role: "combobox",
|
|
23099
|
+
onClick: (event) => {
|
|
23100
|
+
if (!enabled2 || readOnly2) return;
|
|
23101
|
+
event.stopPropagation();
|
|
23102
|
+
setOpen((prev) => !prev);
|
|
23103
|
+
},
|
|
23104
|
+
onKeyDown: (event) => {
|
|
23105
|
+
if (!enabled2 || readOnly2) return;
|
|
23106
|
+
if (!open && (event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === " " || event.key === "Enter")) {
|
|
23107
|
+
event.preventDefault();
|
|
23108
|
+
setOpen(true);
|
|
23109
|
+
if (filteredOptions.length > 0) {
|
|
23110
|
+
const firstEnabledIndex = findNextEnabledIndex(-1);
|
|
23111
|
+
setSelectedIndex(firstEnabledIndex !== -1 ? firstEnabledIndex : 0);
|
|
23112
|
+
}
|
|
23113
|
+
return;
|
|
22897
23114
|
}
|
|
22898
|
-
|
|
22899
|
-
|
|
22900
|
-
SelectTriggerActions,
|
|
22901
|
-
{
|
|
22902
|
-
value,
|
|
22903
|
-
multiSelect,
|
|
22904
|
-
enabled: enabled2,
|
|
22905
|
-
readOnly: readOnly2,
|
|
22906
|
-
clearable,
|
|
22907
|
-
clearValue
|
|
23115
|
+
if (open) {
|
|
23116
|
+
handleKeyDown(event);
|
|
22908
23117
|
}
|
|
22909
|
-
|
|
22910
|
-
|
|
22911
|
-
|
|
22912
|
-
) }),
|
|
22913
|
-
open && /* @__PURE__ */ jsx(Portal, { container: root2, children: /* @__PURE__ */ jsx(
|
|
22914
|
-
PopoverContent,
|
|
22915
|
-
{
|
|
22916
|
-
style: { minWidth: width, height: dropdownHeight },
|
|
22917
|
-
className: classnames(styles$Q.selectContent, styles$Q[validationStatus]),
|
|
22918
|
-
onKeyDown: handleKeyDown,
|
|
22919
|
-
children: /* @__PURE__ */ jsxs("div", { className: styles$Q.command, children: [
|
|
22920
|
-
searchable ? /* @__PURE__ */ jsxs("div", { className: styles$Q.commandInputContainer, children: [
|
|
22921
|
-
/* @__PURE__ */ jsx(Icon$l, { name: "search" }),
|
|
23118
|
+
},
|
|
23119
|
+
autoFocus,
|
|
23120
|
+
children: [
|
|
22922
23121
|
/* @__PURE__ */ jsx(
|
|
22923
|
-
|
|
23122
|
+
SelectTriggerValue,
|
|
22924
23123
|
{
|
|
22925
|
-
|
|
22926
|
-
|
|
22927
|
-
|
|
22928
|
-
|
|
22929
|
-
|
|
23124
|
+
readOnly: readOnly2,
|
|
23125
|
+
placeholder: placeholder2,
|
|
23126
|
+
multiSelect,
|
|
23127
|
+
selectedOptions,
|
|
23128
|
+
valueRenderer,
|
|
23129
|
+
toggleOption
|
|
22930
23130
|
}
|
|
22931
|
-
)
|
|
22932
|
-
|
|
22933
|
-
|
|
22934
|
-
// When searching, show only filtered options
|
|
22935
|
-
filteredOptions.length === 0 ? /* @__PURE__ */ jsx("div", { children: emptyListNode }) : filteredOptions.map(({ value: value2, label: label2, enabled: enabled22, keywords }, index) => /* @__PURE__ */ jsx(
|
|
22936
|
-
SelectOptionItem,
|
|
23131
|
+
),
|
|
23132
|
+
/* @__PURE__ */ jsx(
|
|
23133
|
+
SelectTriggerActions,
|
|
22937
23134
|
{
|
|
23135
|
+
value: currentValue,
|
|
23136
|
+
multiSelect,
|
|
23137
|
+
enabled: enabled2,
|
|
22938
23138
|
readOnly: readOnly2,
|
|
22939
|
-
|
|
22940
|
-
|
|
22941
|
-
|
|
22942
|
-
|
|
22943
|
-
|
|
22944
|
-
|
|
22945
|
-
|
|
22946
|
-
|
|
22947
|
-
|
|
22948
|
-
|
|
22949
|
-
|
|
22950
|
-
|
|
22951
|
-
|
|
22952
|
-
|
|
23139
|
+
clearable,
|
|
23140
|
+
clearValue
|
|
23141
|
+
}
|
|
23142
|
+
)
|
|
23143
|
+
]
|
|
23144
|
+
}
|
|
23145
|
+
) }),
|
|
23146
|
+
/* @__PURE__ */ jsx(Portal$1, { container: root2, children: /* @__PURE__ */ jsx(
|
|
23147
|
+
PopoverContent,
|
|
23148
|
+
{
|
|
23149
|
+
style: { minWidth: width, height: dropdownHeight },
|
|
23150
|
+
className: classnames(styles$Q.selectContent, styles$Q[validationStatus]),
|
|
23151
|
+
onKeyDown: handleKeyDown,
|
|
23152
|
+
children: /* @__PURE__ */ jsxs("div", { className: styles$Q.command, children: [
|
|
23153
|
+
searchable ? /* @__PURE__ */ jsxs("div", { className: styles$Q.commandInputContainer, children: [
|
|
23154
|
+
/* @__PURE__ */ jsx(Icon$l, { name: "search" }),
|
|
23155
|
+
/* @__PURE__ */ jsx(
|
|
23156
|
+
"input",
|
|
23157
|
+
{
|
|
23158
|
+
role: "searchbox",
|
|
23159
|
+
className: classnames(styles$Q.commandInput),
|
|
23160
|
+
placeholder: "Search...",
|
|
23161
|
+
value: searchTerm,
|
|
23162
|
+
onChange: (e) => setSearchTerm(e.target.value)
|
|
23163
|
+
}
|
|
23164
|
+
)
|
|
23165
|
+
] }) : /* @__PURE__ */ jsx("button", { "aria-hidden": "true", className: styles$Q.srOnly }),
|
|
23166
|
+
/* @__PURE__ */ jsxs("div", { role: "listbox", className: styles$Q.commandList, children: [
|
|
23167
|
+
inProgress ? /* @__PURE__ */ jsx("div", { className: styles$Q.loading, children: inProgressNotificationMessage }) : (
|
|
23168
|
+
// When searching, show filtered options (with or without grouping)
|
|
23169
|
+
groupBy2 && groupedOptions ? (
|
|
23170
|
+
// Render grouped filtered options
|
|
23171
|
+
Object.entries(groupedOptions).map(([groupName, groupOptions]) => /* @__PURE__ */ jsxs("div", { children: [
|
|
23172
|
+
groupName === "Ungrouped" ? ungroupedHeaderRenderer && /* @__PURE__ */ jsx("div", { className: styles$Q.groupHeader, children: ungroupedHeaderRenderer() }) : groupHeaderRenderer ? /* @__PURE__ */ jsx("div", { className: styles$Q.groupHeader, children: groupHeaderRenderer(groupName) }) : /* @__PURE__ */ jsx("div", { className: styles$Q.groupHeader, children: groupName }),
|
|
23173
|
+
groupOptions.map(({ value: value2, label: label2, enabled: enabled22, keywords }, groupIndex) => {
|
|
23174
|
+
const optionsList = flattenedGroupedOptions || filteredOptions;
|
|
23175
|
+
const globalIndex = optionsList.findIndex(
|
|
23176
|
+
(opt) => opt.value === value2
|
|
23177
|
+
);
|
|
23178
|
+
return /* @__PURE__ */ jsx(
|
|
23179
|
+
SelectOptionItem,
|
|
23180
|
+
{
|
|
23181
|
+
readOnly: readOnly2,
|
|
23182
|
+
value: value2,
|
|
23183
|
+
label: label2,
|
|
23184
|
+
enabled: enabled22,
|
|
23185
|
+
keywords,
|
|
23186
|
+
isHighlighted: selectedIndex === globalIndex,
|
|
23187
|
+
itemIndex: globalIndex
|
|
23188
|
+
},
|
|
23189
|
+
value2
|
|
23190
|
+
);
|
|
23191
|
+
})
|
|
23192
|
+
] }, groupName))
|
|
23193
|
+
) : (
|
|
23194
|
+
// Render flat filtered options
|
|
23195
|
+
filteredOptions.map(({ value: value2, label: label2, enabled: enabled22, keywords }, index) => /* @__PURE__ */ jsx(
|
|
23196
|
+
SelectOptionItem,
|
|
23197
|
+
{
|
|
23198
|
+
readOnly: readOnly2,
|
|
23199
|
+
value: value2,
|
|
23200
|
+
label: label2,
|
|
23201
|
+
enabled: enabled22,
|
|
23202
|
+
keywords,
|
|
23203
|
+
isHighlighted: selectedIndex === index,
|
|
23204
|
+
itemIndex: index
|
|
23205
|
+
},
|
|
23206
|
+
value2
|
|
23207
|
+
))
|
|
23208
|
+
)
|
|
23209
|
+
),
|
|
23210
|
+
filteredOptions.length === 0 && emptyListNode
|
|
22953
23211
|
] })
|
|
22954
|
-
|
|
22955
|
-
|
|
22956
|
-
}
|
|
22957
|
-
|
|
22958
|
-
|
|
22959
|
-
}
|
|
22960
|
-
)
|
|
22961
|
-
|
|
23212
|
+
] })
|
|
23213
|
+
}
|
|
23214
|
+
) })
|
|
23215
|
+
]
|
|
23216
|
+
}
|
|
23217
|
+
) })
|
|
23218
|
+
),
|
|
23219
|
+
/* @__PURE__ */ jsx("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx(OptionTypeProvider, { Component: HiddenOption, children }) })
|
|
22962
23220
|
] }) });
|
|
22963
23221
|
});
|
|
22964
|
-
function VisibleSelectOption(option) {
|
|
22965
|
-
const { value, label: label2, enabled: enabled2 = true, children } = option;
|
|
22966
|
-
const { onOptionAdd } = useOption();
|
|
22967
|
-
const {
|
|
22968
|
-
value: selectedValue,
|
|
22969
|
-
onChange,
|
|
22970
|
-
multiSelect,
|
|
22971
|
-
readOnly: readOnly2,
|
|
22972
|
-
setOpen,
|
|
22973
|
-
highlightedValue,
|
|
22974
|
-
optionRenderer
|
|
22975
|
-
} = useSelect();
|
|
22976
|
-
const optionRef = useRef(null);
|
|
22977
|
-
const opt = useMemo(() => {
|
|
22978
|
-
return {
|
|
22979
|
-
...option,
|
|
22980
|
-
label: label2 ?? "",
|
|
22981
|
-
keywords: option.keywords || [label2 ?? ""]
|
|
22982
|
-
};
|
|
22983
|
-
}, [option, label2]);
|
|
22984
|
-
useEffect(() => {
|
|
22985
|
-
onOptionAdd(opt);
|
|
22986
|
-
}, [opt, onOptionAdd]);
|
|
22987
|
-
const selected2 = useMemo(() => {
|
|
22988
|
-
return Array.isArray(selectedValue) && multiSelect ? selectedValue.map((v) => String(v)).includes(value) : String(selectedValue) === String(value);
|
|
22989
|
-
}, [selectedValue, value, multiSelect]);
|
|
22990
|
-
const isHighlighted = useMemo(() => {
|
|
22991
|
-
return highlightedValue !== void 0 && String(highlightedValue) === String(value);
|
|
22992
|
-
}, [highlightedValue, value]);
|
|
22993
|
-
useEffect(() => {
|
|
22994
|
-
if (isHighlighted && optionRef.current) {
|
|
22995
|
-
optionRef.current.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
22996
|
-
}
|
|
22997
|
-
}, [isHighlighted]);
|
|
22998
|
-
const handleClick = () => {
|
|
22999
|
-
if (readOnly2) {
|
|
23000
|
-
setOpen(false);
|
|
23001
|
-
return;
|
|
23002
|
-
}
|
|
23003
|
-
if (enabled2) {
|
|
23004
|
-
onChange(value);
|
|
23005
|
-
}
|
|
23006
|
-
};
|
|
23007
|
-
return /* @__PURE__ */ jsx(
|
|
23008
|
-
"div",
|
|
23009
|
-
{
|
|
23010
|
-
ref: optionRef,
|
|
23011
|
-
role: "option",
|
|
23012
|
-
"aria-disabled": !enabled2,
|
|
23013
|
-
"aria-selected": selected2,
|
|
23014
|
-
className: classnames(styles$Q.multiSelectOption, {
|
|
23015
|
-
[styles$Q.disabledOption]: !enabled2,
|
|
23016
|
-
[styles$Q.highlighted]: isHighlighted
|
|
23017
|
-
}),
|
|
23018
|
-
onMouseDown: (e) => {
|
|
23019
|
-
e.preventDefault();
|
|
23020
|
-
e.stopPropagation();
|
|
23021
|
-
},
|
|
23022
|
-
onClick: handleClick,
|
|
23023
|
-
"data-state": selected2 ? "checked" : void 0,
|
|
23024
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$Q.multiSelectOptionContent, children: optionRenderer ? optionRenderer({ label: label2, value, enabled: enabled2 }, selectedValue, false) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23025
|
-
children || label2,
|
|
23026
|
-
selected2 && /* @__PURE__ */ jsx(Icon$l, { name: "checkmark" })
|
|
23027
|
-
] }) })
|
|
23028
|
-
}
|
|
23029
|
-
);
|
|
23030
|
-
}
|
|
23031
23222
|
function SelectOptionItem(option) {
|
|
23032
23223
|
const {
|
|
23033
23224
|
value,
|
|
@@ -23093,19 +23284,19 @@ function SelectOptionItem(option) {
|
|
|
23093
23284
|
}
|
|
23094
23285
|
);
|
|
23095
23286
|
}
|
|
23096
|
-
const themeVars$A = `'{"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:
|
|
23097
|
-
const radioGroupContainer = "
|
|
23098
|
-
const radioOptionContainer = "
|
|
23099
|
-
const radioOption = "
|
|
23100
|
-
const checked = "
|
|
23101
|
-
const error$7 = "
|
|
23102
|
-
const warning$8 = "
|
|
23103
|
-
const valid$7 = "
|
|
23104
|
-
const indicator$2 = "
|
|
23105
|
-
const disabled$6 = "
|
|
23106
|
-
const itemContainer$1 = "
|
|
23107
|
-
const optionLabel = "
|
|
23108
|
-
const label = "
|
|
23287
|
+
const themeVars$A = `'{"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:textColor-RadioGroupOption--disabled": "var(--xmlui-textColor-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)"}'`;
|
|
23288
|
+
const radioGroupContainer = "_radioGroupContainer_1iwha_14";
|
|
23289
|
+
const radioOptionContainer = "_radioOptionContainer_1iwha_20";
|
|
23290
|
+
const radioOption = "_radioOption_1iwha_20";
|
|
23291
|
+
const checked = "_checked_1iwha_54";
|
|
23292
|
+
const error$7 = "_error_1iwha_54";
|
|
23293
|
+
const warning$8 = "_warning_1iwha_54";
|
|
23294
|
+
const valid$7 = "_valid_1iwha_54";
|
|
23295
|
+
const indicator$2 = "_indicator_1iwha_69";
|
|
23296
|
+
const disabled$6 = "_disabled_1iwha_77";
|
|
23297
|
+
const itemContainer$1 = "_itemContainer_1iwha_80";
|
|
23298
|
+
const optionLabel = "_optionLabel_1iwha_87";
|
|
23299
|
+
const label = "_label_1iwha_91";
|
|
23109
23300
|
const styles$P = {
|
|
23110
23301
|
themeVars: themeVars$A,
|
|
23111
23302
|
radioGroupContainer,
|
|
@@ -23228,7 +23419,9 @@ const RadioGroup = forwardRef(function RadioGroup2({
|
|
|
23228
23419
|
}, [autofocus]);
|
|
23229
23420
|
useCallback(() => {
|
|
23230
23421
|
if (radioGroupRef.current) {
|
|
23231
|
-
const selectedRadio = radioGroupRef.current.querySelector(
|
|
23422
|
+
const selectedRadio = radioGroupRef.current.querySelector(
|
|
23423
|
+
'[role="radio"][aria-checked="true"]'
|
|
23424
|
+
);
|
|
23232
23425
|
if (selectedRadio) {
|
|
23233
23426
|
selectedRadio.focus();
|
|
23234
23427
|
return;
|
|
@@ -23324,8 +23517,20 @@ const RadioGroupOption = ({
|
|
|
23324
23517
|
}),
|
|
23325
23518
|
[enabled2, radioGroupContext, value]
|
|
23326
23519
|
);
|
|
23327
|
-
const item2 = useMemo(
|
|
23328
|
-
()
|
|
23520
|
+
const item2 = useMemo(() => {
|
|
23521
|
+
if (optionRenderer) {
|
|
23522
|
+
return /* @__PURE__ */ jsx(
|
|
23523
|
+
UnwrappedRadioItem,
|
|
23524
|
+
{
|
|
23525
|
+
id,
|
|
23526
|
+
value,
|
|
23527
|
+
checked: value === radioGroupContext.value,
|
|
23528
|
+
disabled: !enabled2,
|
|
23529
|
+
statusStyles
|
|
23530
|
+
}
|
|
23531
|
+
);
|
|
23532
|
+
}
|
|
23533
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23329
23534
|
/* @__PURE__ */ jsx(
|
|
23330
23535
|
UnwrappedRadioItem,
|
|
23331
23536
|
{
|
|
@@ -23337,16 +23542,15 @@ const RadioGroupOption = ({
|
|
|
23337
23542
|
}
|
|
23338
23543
|
),
|
|
23339
23544
|
/* @__PURE__ */ jsx("label", { htmlFor: id, className: classnames(styles$P.label, statusStyles), children: label2 ?? value })
|
|
23340
|
-
] })
|
|
23341
|
-
|
|
23342
|
-
);
|
|
23545
|
+
] });
|
|
23546
|
+
}, [enabled2, id, label2, optionRenderer, statusStyles, value, radioGroupContext]);
|
|
23343
23547
|
return /* @__PURE__ */ jsx(
|
|
23344
23548
|
"div",
|
|
23345
23549
|
{
|
|
23346
23550
|
className: classnames(styles$P.radioOptionContainer, className),
|
|
23347
23551
|
style: style2,
|
|
23348
23552
|
"data-radio-item": true,
|
|
23349
|
-
children: !!optionRenderer ? /* @__PURE__ */ jsxs("label", { className: styles$P.optionLabel, children: [
|
|
23553
|
+
children: !!optionRenderer ? /* @__PURE__ */ jsxs("label", { htmlFor: id, className: styles$P.optionLabel, children: [
|
|
23350
23554
|
/* @__PURE__ */ jsx("div", { className: styles$P.itemContainer, children: item2 }),
|
|
23351
23555
|
optionRenderer({
|
|
23352
23556
|
$checked: value === radioGroupContext.value,
|
|
@@ -23631,24 +23835,24 @@ const TextArea = forwardRef(function TextArea2({
|
|
|
23631
23835
|
return /* @__PURE__ */ jsx(Part, { partId: PART_INPUT, children: /* @__PURE__ */ jsx("textarea", { ...textareaProps, rows, className: classnames(classes) }) });
|
|
23632
23836
|
});
|
|
23633
23837
|
const themeVars$y = `'{"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:gap-adornment-AutoComplete": "var(--xmlui-gap-adornment-AutoComplete)", "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)"}'`;
|
|
23634
|
-
const command = "
|
|
23635
|
-
const badgeListWrapper = "
|
|
23636
|
-
const error$5 = "
|
|
23637
|
-
const warning$6 = "
|
|
23638
|
-
const valid$5 = "
|
|
23639
|
-
const disabled$5 = "
|
|
23640
|
-
const focused$2 = "
|
|
23641
|
-
const badgeList = "
|
|
23642
|
-
const inputWrapper = "
|
|
23643
|
-
const badge = "
|
|
23644
|
-
const commandInput = "
|
|
23645
|
-
const actions = "
|
|
23646
|
-
const action = "
|
|
23647
|
-
const autoCompleteEmpty = "
|
|
23648
|
-
const commandList = "
|
|
23649
|
-
const autoCompleteOption = "
|
|
23650
|
-
const highlighted = "
|
|
23651
|
-
const disabledOption = "
|
|
23838
|
+
const command = "_command_57zg7_14";
|
|
23839
|
+
const badgeListWrapper = "_badgeListWrapper_57zg7_20";
|
|
23840
|
+
const error$5 = "_error_57zg7_51";
|
|
23841
|
+
const warning$6 = "_warning_57zg7_71";
|
|
23842
|
+
const valid$5 = "_valid_57zg7_91";
|
|
23843
|
+
const disabled$5 = "_disabled_57zg7_111";
|
|
23844
|
+
const focused$2 = "_focused_57zg7_117";
|
|
23845
|
+
const badgeList = "_badgeList_57zg7_20";
|
|
23846
|
+
const inputWrapper = "_inputWrapper_57zg7_130";
|
|
23847
|
+
const badge = "_badge_57zg7_20";
|
|
23848
|
+
const commandInput = "_commandInput_57zg7_162";
|
|
23849
|
+
const actions = "_actions_57zg7_176";
|
|
23850
|
+
const action = "_action_57zg7_176";
|
|
23851
|
+
const autoCompleteEmpty = "_autoCompleteEmpty_57zg7_187";
|
|
23852
|
+
const commandList = "_commandList_57zg7_196";
|
|
23853
|
+
const autoCompleteOption = "_autoCompleteOption_57zg7_208";
|
|
23854
|
+
const highlighted = "_highlighted_57zg7_225";
|
|
23855
|
+
const disabledOption = "_disabledOption_57zg7_228";
|
|
23652
23856
|
const styles$N = {
|
|
23653
23857
|
themeVars: themeVars$y,
|
|
23654
23858
|
command,
|
|
@@ -23666,7 +23870,7 @@ const styles$N = {
|
|
|
23666
23870
|
action,
|
|
23667
23871
|
autoCompleteEmpty,
|
|
23668
23872
|
commandList,
|
|
23669
|
-
"fade-in": "_fade-
|
|
23873
|
+
"fade-in": "_fade-in_57zg7_1",
|
|
23670
23874
|
autoCompleteOption,
|
|
23671
23875
|
highlighted,
|
|
23672
23876
|
disabledOption
|
|
@@ -23677,7 +23881,7 @@ const AutoCompleteContext = createContext({
|
|
|
23677
23881
|
},
|
|
23678
23882
|
inputValue: "",
|
|
23679
23883
|
searchTerm: "",
|
|
23680
|
-
options:
|
|
23884
|
+
options: [],
|
|
23681
23885
|
open: false,
|
|
23682
23886
|
setOpen: (open) => {
|
|
23683
23887
|
},
|
|
@@ -23692,7 +23896,7 @@ function useAutoComplete() {
|
|
|
23692
23896
|
const PART_LIST_WRAPPER = "listWrapper";
|
|
23693
23897
|
function isOptionsExist(options2, newOptions) {
|
|
23694
23898
|
return newOptions.some(
|
|
23695
|
-
(option) =>
|
|
23899
|
+
(option) => options2.some((o) => o.value === option.value || o.label === option.label)
|
|
23696
23900
|
);
|
|
23697
23901
|
}
|
|
23698
23902
|
const defaultProps$H = {
|
|
@@ -23741,7 +23945,7 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23741
23945
|
const [referenceElement, setReferenceElement] = useState(null);
|
|
23742
23946
|
const inputRef = useRef(null);
|
|
23743
23947
|
const [open, setOpen] = useState(initiallyOpen);
|
|
23744
|
-
const [options2, setOptions] = useState(
|
|
23948
|
+
const [options2, setOptions] = useState([]);
|
|
23745
23949
|
const [inputValue, setInputValue] = useState("");
|
|
23746
23950
|
const { root: root2 } = useTheme();
|
|
23747
23951
|
const [width, setWidth] = useState(0);
|
|
@@ -23751,17 +23955,17 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23751
23955
|
const [selectedIndex, setSelectedIndex] = useState(-1);
|
|
23752
23956
|
const filteredOptions = useMemo(() => {
|
|
23753
23957
|
if (!searchTerm || searchTerm.trim() === "") {
|
|
23754
|
-
return
|
|
23958
|
+
return options2;
|
|
23755
23959
|
}
|
|
23756
23960
|
const searchLower = searchTerm.toLowerCase();
|
|
23757
|
-
return
|
|
23961
|
+
return options2.filter((option) => {
|
|
23758
23962
|
const extendedValue = option.value + " " + option.label + " " + (option.keywords || []).join(" ");
|
|
23759
23963
|
return extendedValue.toLowerCase().includes(searchLower);
|
|
23760
23964
|
});
|
|
23761
23965
|
}, [options2, searchTerm]);
|
|
23762
23966
|
const shouldShowCreatable = useMemo(() => {
|
|
23763
23967
|
if (!creatable || !searchTerm || searchTerm.trim() === "") return false;
|
|
23764
|
-
const searchTermExists =
|
|
23968
|
+
const searchTermExists = options2.some(
|
|
23765
23969
|
(option) => option.value === searchTerm || option.label === searchTerm
|
|
23766
23970
|
);
|
|
23767
23971
|
if (searchTermExists) return false;
|
|
@@ -23786,17 +23990,16 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23786
23990
|
};
|
|
23787
23991
|
}, [referenceElement]);
|
|
23788
23992
|
const selectedValue = useMemo(() => {
|
|
23789
|
-
const optionsArray = Array.from(options2);
|
|
23790
23993
|
if (Array.isArray(value)) {
|
|
23791
23994
|
if (value.length === 0) return [];
|
|
23792
|
-
return
|
|
23995
|
+
return options2.filter((o) => value.includes(`${o.value}`));
|
|
23793
23996
|
}
|
|
23794
|
-
return
|
|
23997
|
+
return options2.find((o) => `${o.value}` === `${value}`);
|
|
23795
23998
|
}, [value, options2]);
|
|
23796
23999
|
const toggleOption = useCallback(
|
|
23797
24000
|
(selectedItem) => {
|
|
23798
24001
|
if (selectedItem === "") return;
|
|
23799
|
-
const option =
|
|
24002
|
+
const option = options2.find((opt) => opt.value === selectedItem);
|
|
23800
24003
|
if (option && option.enabled === false) return;
|
|
23801
24004
|
const newSelectedValue = multi ? Array.isArray(value) ? value.includes(selectedItem) ? value.filter((v) => v !== selectedItem) : [...value, selectedItem] : [selectedItem] : selectedItem === value ? null : selectedItem;
|
|
23802
24005
|
updateState({ value: newSelectedValue });
|
|
@@ -23817,7 +24020,7 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23817
24020
|
setInputValue(selectedValue?.label || "");
|
|
23818
24021
|
setSearchTerm("");
|
|
23819
24022
|
}
|
|
23820
|
-
}, [
|
|
24023
|
+
}, [selectedValue]);
|
|
23821
24024
|
const clearValue = useCallback(() => {
|
|
23822
24025
|
const newValue = multi ? [] : "";
|
|
23823
24026
|
setInputValue("");
|
|
@@ -23825,22 +24028,10 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23825
24028
|
onDidChange(newValue);
|
|
23826
24029
|
}, [multi, updateState, onDidChange]);
|
|
23827
24030
|
const onOptionAdd = useCallback((option) => {
|
|
23828
|
-
setOptions((prev) =>
|
|
23829
|
-
const newSet = new Set(prev);
|
|
23830
|
-
const existing = Array.from(prev).find((opt) => opt.value === option.value);
|
|
23831
|
-
if (existing) {
|
|
23832
|
-
newSet.delete(existing);
|
|
23833
|
-
}
|
|
23834
|
-
newSet.add(option);
|
|
23835
|
-
return newSet;
|
|
23836
|
-
});
|
|
24031
|
+
setOptions((prev) => [...prev, option]);
|
|
23837
24032
|
}, []);
|
|
23838
24033
|
const onOptionRemove = useCallback((option) => {
|
|
23839
|
-
setOptions((prev) =>
|
|
23840
|
-
const optionsSet = new Set(prev);
|
|
23841
|
-
optionsSet.delete(option);
|
|
23842
|
-
return optionsSet;
|
|
23843
|
-
});
|
|
24034
|
+
setOptions((prev) => prev.filter((opt) => opt.value !== option.value));
|
|
23844
24035
|
}, []);
|
|
23845
24036
|
const allItems = useMemo(() => {
|
|
23846
24037
|
const items = [];
|
|
@@ -24025,7 +24216,7 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
24025
24216
|
{
|
|
24026
24217
|
open,
|
|
24027
24218
|
onOpenChange: (isOpen) => {
|
|
24028
|
-
if (readOnly2) return;
|
|
24219
|
+
if (readOnly2 || !enabled2) return;
|
|
24029
24220
|
setOpen(isOpen);
|
|
24030
24221
|
if (!isOpen) {
|
|
24031
24222
|
setSelectedIndex(-1);
|
|
@@ -24049,7 +24240,7 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
24049
24240
|
),
|
|
24050
24241
|
"aria-expanded": open,
|
|
24051
24242
|
onClick: (event) => {
|
|
24052
|
-
if (readOnly2) return;
|
|
24243
|
+
if (readOnly2 || !enabled2) return;
|
|
24053
24244
|
if (multi && open) {
|
|
24054
24245
|
return;
|
|
24055
24246
|
}
|
|
@@ -24137,9 +24328,10 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
24137
24328
|
/* @__PURE__ */ jsx(
|
|
24138
24329
|
"span",
|
|
24139
24330
|
{
|
|
24140
|
-
className: styles$N.action,
|
|
24331
|
+
className: classnames(styles$N.action, { [styles$N.disabled]: !enabled2 || readOnly2 }),
|
|
24332
|
+
"aria-disabled": !enabled2 || readOnly2,
|
|
24141
24333
|
onClick: () => {
|
|
24142
|
-
if (readOnly2) return;
|
|
24334
|
+
if (readOnly2 || !enabled2) return;
|
|
24143
24335
|
setOpen(!open);
|
|
24144
24336
|
inputRef.current?.focus();
|
|
24145
24337
|
},
|
|
@@ -24151,62 +24343,45 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
24151
24343
|
]
|
|
24152
24344
|
}
|
|
24153
24345
|
) }) }),
|
|
24154
|
-
|
|
24346
|
+
/* @__PURE__ */ jsx(Portal$1, { container: root2, children: /* @__PURE__ */ jsx(
|
|
24155
24347
|
PopoverContent,
|
|
24156
24348
|
{
|
|
24157
24349
|
style: { width, height: dropdownHeight },
|
|
24158
24350
|
className: styles$N.popoverContent,
|
|
24159
24351
|
align: "start",
|
|
24160
24352
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
24161
|
-
children: /* @__PURE__ */ jsx(
|
|
24162
|
-
|
|
24163
|
-
|
|
24164
|
-
|
|
24165
|
-
|
|
24166
|
-
|
|
24167
|
-
|
|
24168
|
-
|
|
24169
|
-
|
|
24170
|
-
|
|
24171
|
-
|
|
24172
|
-
|
|
24173
|
-
|
|
24174
|
-
|
|
24175
|
-
|
|
24176
|
-
|
|
24177
|
-
|
|
24178
|
-
|
|
24179
|
-
|
|
24180
|
-
|
|
24181
|
-
|
|
24182
|
-
|
|
24183
|
-
|
|
24184
|
-
|
|
24185
|
-
|
|
24186
|
-
|
|
24187
|
-
readOnly: readOnly2,
|
|
24188
|
-
isHighlighted: selectedIndex === itemIndex,
|
|
24189
|
-
itemIndex
|
|
24190
|
-
},
|
|
24191
|
-
value2
|
|
24192
|
-
);
|
|
24193
|
-
}) })
|
|
24194
|
-
] })
|
|
24195
|
-
) : (
|
|
24196
|
-
// When not searching, show all children directly (includes Options and other components like Button)
|
|
24197
|
-
/* @__PURE__ */ jsx(OptionTypeProvider, { Component: VisibleAutoCompleteOption, children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24198
|
-
children,
|
|
24199
|
-
options2.size === 0 && /* @__PURE__ */ jsx("div", { children: emptyListNode })
|
|
24200
|
-
] }) })
|
|
24201
|
-
)
|
|
24202
|
-
}
|
|
24203
|
-
)
|
|
24353
|
+
children: /* @__PURE__ */ jsx("div", { role: "listbox", className: styles$N.commandList, style: { height: dropdownHeight }, children: searchTerm ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24354
|
+
filteredOptions.map(({ value: value2, label: label2, enabled: enabled22, keywords }, index) => {
|
|
24355
|
+
const itemIndex = shouldShowCreatable ? index + 1 : index;
|
|
24356
|
+
return /* @__PURE__ */ jsx(
|
|
24357
|
+
AutoCompleteOption,
|
|
24358
|
+
{
|
|
24359
|
+
value: value2,
|
|
24360
|
+
label: label2,
|
|
24361
|
+
enabled: enabled22,
|
|
24362
|
+
keywords,
|
|
24363
|
+
readOnly: readOnly2,
|
|
24364
|
+
isHighlighted: selectedIndex === itemIndex,
|
|
24365
|
+
itemIndex
|
|
24366
|
+
},
|
|
24367
|
+
value2
|
|
24368
|
+
);
|
|
24369
|
+
}),
|
|
24370
|
+
shouldShowCreatable && /* @__PURE__ */ jsx(
|
|
24371
|
+
CreatableItem,
|
|
24372
|
+
{
|
|
24373
|
+
onNewItem: onItemCreated,
|
|
24374
|
+
isHighlighted: selectedIndex === 0
|
|
24375
|
+
}
|
|
24376
|
+
),
|
|
24377
|
+
filteredOptions.length === 0 && !shouldShowCreatable && /* @__PURE__ */ jsx("div", { children: emptyListNode })
|
|
24378
|
+
] }) : /* @__PURE__ */ jsx(OptionTypeProvider, { Component: AutoCompleteOption, children }) })
|
|
24204
24379
|
}
|
|
24205
24380
|
) })
|
|
24206
24381
|
]
|
|
24207
24382
|
}
|
|
24208
24383
|
),
|
|
24209
|
-
|
|
24384
|
+
/* @__PURE__ */ jsx("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx(OptionTypeProvider, { Component: HiddenOption, children }) })
|
|
24210
24385
|
] }) });
|
|
24211
24386
|
});
|
|
24212
24387
|
function CreatableItem({ onNewItem, isHighlighted = false }) {
|
|
@@ -24250,65 +24425,6 @@ function CreatableItem({ onNewItem, isHighlighted = false }) {
|
|
|
24250
24425
|
}
|
|
24251
24426
|
return /* @__PURE__ */ jsx("span", { style: { display: "none" } });
|
|
24252
24427
|
}
|
|
24253
|
-
function VisibleAutoCompleteOption(option) {
|
|
24254
|
-
const { value, label: label2, enabled: enabled2 = true, children } = option;
|
|
24255
|
-
const { onOptionAdd } = useOption();
|
|
24256
|
-
const {
|
|
24257
|
-
value: selectedValue,
|
|
24258
|
-
onChange,
|
|
24259
|
-
multi,
|
|
24260
|
-
setOpen,
|
|
24261
|
-
readOnly: readOnly2,
|
|
24262
|
-
// Use readOnly from AutoComplete context value
|
|
24263
|
-
optionRenderer
|
|
24264
|
-
} = useAutoComplete();
|
|
24265
|
-
const opt = useMemo(() => {
|
|
24266
|
-
return {
|
|
24267
|
-
...option,
|
|
24268
|
-
label: label2 ?? "",
|
|
24269
|
-
keywords: option.keywords || [label2 ?? ""]
|
|
24270
|
-
};
|
|
24271
|
-
}, [option, label2]);
|
|
24272
|
-
useEffect(() => {
|
|
24273
|
-
onOptionAdd(opt);
|
|
24274
|
-
}, [opt, onOptionAdd]);
|
|
24275
|
-
const selected2 = multi ? selectedValue?.includes(value) : selectedValue === value;
|
|
24276
|
-
const handleClick = () => {
|
|
24277
|
-
if (readOnly2) {
|
|
24278
|
-
setOpen(false);
|
|
24279
|
-
return;
|
|
24280
|
-
}
|
|
24281
|
-
if (enabled2) {
|
|
24282
|
-
onChange(value);
|
|
24283
|
-
if (!multi) {
|
|
24284
|
-
setOpen(false);
|
|
24285
|
-
}
|
|
24286
|
-
}
|
|
24287
|
-
};
|
|
24288
|
-
return /* @__PURE__ */ jsx(
|
|
24289
|
-
"div",
|
|
24290
|
-
{
|
|
24291
|
-
role: "option",
|
|
24292
|
-
"aria-disabled": !enabled2,
|
|
24293
|
-
"aria-selected": selected2,
|
|
24294
|
-
className: classnames(styles$N.autoCompleteOption, {
|
|
24295
|
-
[styles$N.disabledOption]: !enabled2
|
|
24296
|
-
}),
|
|
24297
|
-
onMouseDown: (e) => {
|
|
24298
|
-
e.preventDefault();
|
|
24299
|
-
e.stopPropagation();
|
|
24300
|
-
},
|
|
24301
|
-
onClick: handleClick,
|
|
24302
|
-
children: children ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24303
|
-
/* @__PURE__ */ jsx("div", { className: styles$N.autoCompleteOptionContent, children }),
|
|
24304
|
-
selected2 && /* @__PURE__ */ jsx(Icon$l, { name: "checkmark" })
|
|
24305
|
-
] }) : optionRenderer ? optionRenderer({ label: label2, value, enabled: enabled2 }, selectedValue, false) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24306
|
-
/* @__PURE__ */ jsx("div", { className: styles$N.autoCompleteOptionContent, children: label2 }),
|
|
24307
|
-
selected2 && /* @__PURE__ */ jsx(Icon$l, { name: "checkmark" })
|
|
24308
|
-
] })
|
|
24309
|
-
}
|
|
24310
|
-
);
|
|
24311
|
-
}
|
|
24312
24428
|
function AutoCompleteOption(option) {
|
|
24313
24429
|
const {
|
|
24314
24430
|
value,
|
|
@@ -27903,7 +28019,7 @@ const treeComponentRenderer = createComponentRenderer(
|
|
|
27903
28019
|
// - All original source data properties (custom fields)
|
|
27904
28020
|
...flatTreeNode
|
|
27905
28021
|
};
|
|
27906
|
-
return node.props.itemTemplate ? /* @__PURE__ */ jsx(MemoizedItem, { node: node.props.itemTemplate, item: itemContext, renderChild: renderChild2 }) : /* @__PURE__ */ jsx(MemoizedItem, { node: defaultItemTemplate, item: itemContext, renderChild: renderChild2 });
|
|
28022
|
+
return node.props.itemTemplate ? /* @__PURE__ */ jsx(MemoizedItem, { node: node.props.itemTemplate, contextVars: { $item: itemContext }, renderChild: renderChild2 }) : /* @__PURE__ */ jsx(MemoizedItem, { node: defaultItemTemplate, contextVars: { $item: itemContext }, renderChild: renderChild2 });
|
|
27907
28023
|
}
|
|
27908
28024
|
}
|
|
27909
28025
|
);
|
|
@@ -28570,33 +28686,36 @@ const fragmentComponentRenderer = createComponentRenderer(
|
|
|
28570
28686
|
}
|
|
28571
28687
|
);
|
|
28572
28688
|
const themeVars$p = `'{"textColor-pagination-Table": "var(--xmlui-textColor-pagination-Table)", "backgroundColor-Table": "var(--xmlui-backgroundColor-Table)", "textColor-Table": "var(--xmlui-textColor-Table)", "backgroundColor-row-Table": "var(--xmlui-backgroundColor-row-Table)", "backgroundColor-row-Table--hover": "var(--xmlui-backgroundColor-row-Table--hover)", "backgroundColor-selected-Table": "var(--xmlui-backgroundColor-selected-Table)", "backgroundColor-selected-Table--hover": "var(--xmlui-backgroundColor-selected-Table--hover)", "backgroundColor-heading-Table": "var(--xmlui-backgroundColor-heading-Table)", "backgroundColor-heading-Table--hover": "var(--xmlui-backgroundColor-heading-Table--hover)", "backgroundColor-heading-Table--active": "var(--xmlui-backgroundColor-heading-Table--active)", "padding-heading-Table": "var(--xmlui-padding-heading-Table)", "paddingHorizontal-heading-Table": "var(--xmlui-paddingHorizontal-heading-Table, var(--xmlui-padding-heading-Table))", "paddingVertical-heading-Table": "var(--xmlui-paddingVertical-heading-Table, var(--xmlui-padding-heading-Table))", "paddingLeft-heading-Table": "var(--xmlui-paddingLeft-heading-Table, var(--xmlui-paddingHorizontal-heading-Table, var(--xmlui-padding-heading-Table)))", "paddingRight-heading-Table": "var(--xmlui-paddingRight-heading-Table, var(--xmlui-paddingHorizontal-heading-Table, var(--xmlui-padding-heading-Table)))", "paddingTop-heading-Table": "var(--xmlui-paddingTop-heading-Table, var(--xmlui-paddingVertical-heading-Table, var(--xmlui-padding-heading-Table)))", "paddingBottom-heading-Table": "var(--xmlui-paddingBottom-heading-Table, var(--xmlui-paddingVertical-heading-Table, var(--xmlui-padding-heading-Table)))", "padding-cell-Table": "var(--xmlui-padding-cell-Table)", "paddingHorizontal-cell-Table": "var(--xmlui-paddingHorizontal-cell-Table, var(--xmlui-padding-cell-Table))", "paddingVertical-cell-Table": "var(--xmlui-paddingVertical-cell-Table, var(--xmlui-padding-cell-Table))", "paddingLeft-cell-Table": "var(--xmlui-paddingLeft-cell-Table, var(--xmlui-paddingHorizontal-cell-Table, var(--xmlui-padding-cell-Table)))", "paddingRight-cell-Table": "var(--xmlui-paddingRight-cell-Table, var(--xmlui-paddingHorizontal-cell-Table, var(--xmlui-padding-cell-Table)))", "paddingTop-cell-Table": "var(--xmlui-paddingTop-cell-Table, var(--xmlui-paddingVertical-cell-Table, var(--xmlui-padding-cell-Table)))", "paddingBottom-cell-Table": "var(--xmlui-paddingBottom-cell-Table, var(--xmlui-paddingVertical-cell-Table, var(--xmlui-padding-cell-Table)))", "paddingHorizontal-cell-first-Table": "var(--xmlui-paddingHorizontal-cell-first-Table)", "paddingHorizontal-cell-last-Table": "var(--xmlui-paddingHorizontal-cell-last-Table)", "border-cell-Table": "var(--xmlui-border-cell-Table)", "borderHorizontal-cell-Table": "var(--xmlui-borderHorizontal-cell-Table, var(--xmlui-border-cell-Table))", "borderVertical-cell-Table": "var(--xmlui-borderVertical-cell-Table, var(--xmlui-border-cell-Table))", "borderLeft-cell-Table": "var(--xmlui-borderLeft-cell-Table, var(--xmlui-borderHorizontal-cell-Table, var(--xmlui-border-cell-Table)))", "borderRight-cell-Table": "var(--xmlui-borderRight-cell-Table, var(--xmlui-borderHorizontal-cell-Table, var(--xmlui-border-cell-Table)))", "borderTop-cell-Table": "var(--xmlui-borderTop-cell-Table, var(--xmlui-borderVertical-cell-Table, var(--xmlui-border-cell-Table)))", "borderBottom-cell-Table": "var(--xmlui-borderBottom-cell-Table)", "borderWidth-cell-Table": "var(--xmlui-borderWidth-cell-Table)", "borderHorizontalWidth-cell-Table": "var(--xmlui-borderHorizontalWidth-cell-Table, var(--xmlui-borderWidth-cell-Table))", "borderLeftWidth-cell-Table": "var(--xmlui-borderLeftWidth-cell-Table, var(--xmlui-borderHorizontalWidth-cell-Table, var(--xmlui-borderWidth-cell-Table)))", "borderRightWidth-cell-Table": "var(--xmlui-borderRightWidth-cell-Table, var(--xmlui-borderHorizontalWidth-cell-Table, var(--xmlui-borderWidth-cell-Table)))", "borderVerticalWidth-cell-Table": "var(--xmlui-borderVerticalWidth-cell-Table, var(--xmlui-borderWidth-cell-Table))", "borderTopWidth-cell-Table": "var(--xmlui-borderTopWidth-cell-Table, var(--xmlui-borderVerticalWidth-cell-Table, var(--xmlui-borderWidth-cell-Table)))", "borderBottomWidth-cell-Table": "var(--xmlui-borderBottomWidth-cell-Table, var(--xmlui-borderVerticalWidth-cell-Table, var(--xmlui-borderWidth-cell-Table)))", "borderStyle-cell-Table": "var(--xmlui-borderStyle-cell-Table)", "borderHorizontalStyle-cell-Table": "var(--xmlui-borderHorizontalStyle-cell-Table, var(--xmlui-borderStyle-cell-Table))", "borderLeftStyle-cell-Table": "var(--xmlui-borderLeftStyle-cell-Table, var(--xmlui-borderHorizontalStyle-cell-Table, var(--xmlui-borderStyle-cell-Table)))", "borderRightStyle-cell-Table": "var(--xmlui-borderRightStyle-cell-Table, var(--xmlui-borderHorizontalStyle-cell-Table, var(--xmlui-borderStyle-cell-Table)))", "borderVerticalStyle-cell-Table": "var(--xmlui-borderVerticalStyle-cell-Table, var(--xmlui-borderStyle-cell-Table))", "borderTopStyle-cell-Table": "var(--xmlui-borderTopStyle-cell-Table, var(--xmlui-borderVerticalStyle-cell-Table, var(--xmlui-borderStyle-cell-Table)))", "borderBottomStyle-cell-Table": "var(--xmlui-borderBottomStyle-cell-Table, var(--xmlui-borderVerticalStyle-cell-Table, var(--xmlui-borderStyle-cell-Table)))", "borderColor-cell-Table": "var(--xmlui-borderColor-cell-Table)", "borderHorizontalColor-cell-Table": "var(--xmlui-borderHorizontalColor-cell-Table, var(--xmlui-borderColor-cell-Table))", "borderLeftColor-cell-Table": "var(--xmlui-borderLeftColor-cell-Table, var(--xmlui-borderHorizontalColor-cell-Table, var(--xmlui-borderColor-cell-Table)))", "borderRightColor-cell-Table": "var(--xmlui-borderRightColor-cell-Table, var(--xmlui-borderHorizontalColor-cell-Table, var(--xmlui-borderColor-cell-Table)))", "borderVerticalColor-cell-Table": "var(--xmlui-borderVerticalColor-cell-Table, var(--xmlui-borderColor-cell-Table))", "borderTopColor-cell-Table": "var(--xmlui-borderTopColor-cell-Table, var(--xmlui-borderVerticalColor-cell-Table, var(--xmlui-borderColor-cell-Table)))", "borderBottomColor-cell-Table": "var(--xmlui-borderBottomColor-cell-Table, var(--xmlui-borderVerticalColor-cell-Table, var(--xmlui-borderColor-cell-Table)))", "borderStartStartRadius-cell-Table": "var(--xmlui-borderStartStartRadius-cell-Table, var(--xmlui-borderRadius-cell-Table))", "borderStartEndRadius-cell-Table": "var(--xmlui-borderStartEndRadius-cell-Table, var(--xmlui-borderRadius-cell-Table))", "borderEndStartRadius-cell-Table": "var(--xmlui-borderEndStartRadius-cell-Table, var(--xmlui-borderRadius-cell-Table))", "borderEndEndRadius-cell-Table": "var(--xmlui-borderEndEndRadius-cell-Table, var(--xmlui-borderRadius-cell-Table))", "border-Table": "var(--xmlui-border-Table)", "borderHorizontal-Table": "var(--xmlui-borderHorizontal-Table, var(--xmlui-border-Table))", "borderVertical-Table": "var(--xmlui-borderVertical-Table, var(--xmlui-border-Table))", "borderLeft-Table": "var(--xmlui-borderLeft-Table, var(--xmlui-borderHorizontal-Table, var(--xmlui-border-Table)))", "borderRight-Table": "var(--xmlui-borderRight-Table, var(--xmlui-borderHorizontal-Table, var(--xmlui-border-Table)))", "borderTop-Table": "var(--xmlui-borderTop-Table, var(--xmlui-borderVertical-Table, var(--xmlui-border-Table)))", "borderBottom-Table": "var(--xmlui-borderBottom-Table, var(--xmlui-borderVertical-Table, var(--xmlui-border-Table)))", "borderWidth-Table": "var(--xmlui-borderWidth-Table)", "borderHorizontalWidth-Table": "var(--xmlui-borderHorizontalWidth-Table, var(--xmlui-borderWidth-Table))", "borderLeftWidth-Table": "var(--xmlui-borderLeftWidth-Table, var(--xmlui-borderHorizontalWidth-Table, var(--xmlui-borderWidth-Table)))", "borderRightWidth-Table": "var(--xmlui-borderRightWidth-Table, var(--xmlui-borderHorizontalWidth-Table, var(--xmlui-borderWidth-Table)))", "borderVerticalWidth-Table": "var(--xmlui-borderVerticalWidth-Table, var(--xmlui-borderWidth-Table))", "borderTopWidth-Table": "var(--xmlui-borderTopWidth-Table, var(--xmlui-borderVerticalWidth-Table, var(--xmlui-borderWidth-Table)))", "borderBottomWidth-Table": "var(--xmlui-borderBottomWidth-Table, var(--xmlui-borderVerticalWidth-Table, var(--xmlui-borderWidth-Table)))", "borderStyle-Table": "var(--xmlui-borderStyle-Table)", "borderHorizontalStyle-Table": "var(--xmlui-borderHorizontalStyle-Table, var(--xmlui-borderStyle-Table))", "borderLeftStyle-Table": "var(--xmlui-borderLeftStyle-Table, var(--xmlui-borderHorizontalStyle-Table, var(--xmlui-borderStyle-Table)))", "borderRightStyle-Table": "var(--xmlui-borderRightStyle-Table, var(--xmlui-borderHorizontalStyle-Table, var(--xmlui-borderStyle-Table)))", "borderVerticalStyle-Table": "var(--xmlui-borderVerticalStyle-Table, var(--xmlui-borderStyle-Table))", "borderTopStyle-Table": "var(--xmlui-borderTopStyle-Table, var(--xmlui-borderVerticalStyle-Table, var(--xmlui-borderStyle-Table)))", "borderBottomStyle-Table": "var(--xmlui-borderBottomStyle-Table, var(--xmlui-borderVerticalStyle-Table, var(--xmlui-borderStyle-Table)))", "borderColor-Table": "var(--xmlui-borderColor-Table)", "borderHorizontalColor-Table": "var(--xmlui-borderHorizontalColor-Table, var(--xmlui-borderColor-Table))", "borderLeftColor-Table": "var(--xmlui-borderLeftColor-Table, var(--xmlui-borderHorizontalColor-Table, var(--xmlui-borderColor-Table)))", "borderRightColor-Table": "var(--xmlui-borderRightColor-Table, var(--xmlui-borderHorizontalColor-Table, var(--xmlui-borderColor-Table)))", "borderVerticalColor-Table": "var(--xmlui-borderVerticalColor-Table, var(--xmlui-borderColor-Table))", "borderTopColor-Table": "var(--xmlui-borderTopColor-Table, var(--xmlui-borderVerticalColor-Table, var(--xmlui-borderColor-Table)))", "borderBottomColor-Table": "var(--xmlui-borderBottomColor-Table, var(--xmlui-borderVerticalColor-Table, var(--xmlui-borderColor-Table)))", "borderStartStartRadius-Table": "var(--xmlui-borderStartStartRadius-Table, var(--xmlui-borderRadius-Table))", "borderStartEndRadius-Table": "var(--xmlui-borderStartEndRadius-Table, var(--xmlui-borderRadius-Table))", "borderEndStartRadius-Table": "var(--xmlui-borderEndStartRadius-Table, var(--xmlui-borderRadius-Table))", "borderEndEndRadius-Table": "var(--xmlui-borderEndEndRadius-Table, var(--xmlui-borderRadius-Table))", "backgroundColor-pagination-Table": "var(--xmlui-backgroundColor-pagination-Table)", "textColor-heading-Table": "var(--xmlui-textColor-heading-Table)", "fontWeight-row-Table": "var(--xmlui-fontWeight-row-Table)", "fontSize-row-Table": "var(--xmlui-fontSize-row-Table)", "fontWeight-heading-Table": "var(--xmlui-fontWeight-heading-Table)", "fontSize-heading-Table": "var(--xmlui-fontSize-heading-Table)", "textTransform-heading-Table": "var(--xmlui-textTransform-heading-Table)", "borderRadius-Table": "var(--xmlui-borderRadius-Table)", "outlineWidth-heading-Table--focus": "var(--xmlui-outlineWidth-heading-Table--focus)", "outlineColor-heading-Table--focus": "var(--xmlui-outlineColor-heading-Table--focus)", "outlineStyle-heading-Table--focus": "var(--xmlui-outlineStyle-heading-Table--focus)", "outlineOffset-heading-Table--focus": "var(--xmlui-outlineOffset-heading-Table--focus)", "borderBottom-last-row-Table": "var(--xmlui-borderBottom-last-row-Table)"}'`;
|
|
28573
|
-
const wrapper$c = "
|
|
28574
|
-
const noScroll = "
|
|
28575
|
-
const headerWrapper$1 = "
|
|
28576
|
-
const tableBody = "
|
|
28577
|
-
const clickableHeader = "
|
|
28578
|
-
const headerContent = "
|
|
28579
|
-
const
|
|
28580
|
-
const
|
|
28581
|
-
const
|
|
28582
|
-
const
|
|
28583
|
-
const
|
|
28584
|
-
const
|
|
28585
|
-
const
|
|
28586
|
-
const
|
|
28587
|
-
const
|
|
28588
|
-
const
|
|
28589
|
-
const
|
|
28590
|
-
const
|
|
28591
|
-
const
|
|
28592
|
-
const
|
|
28593
|
-
const
|
|
28594
|
-
const
|
|
28595
|
-
const
|
|
28596
|
-
const
|
|
28597
|
-
const
|
|
28598
|
-
const
|
|
28599
|
-
const
|
|
28689
|
+
const wrapper$c = "_wrapper_17ovr_14";
|
|
28690
|
+
const noScroll = "_noScroll_17ovr_42";
|
|
28691
|
+
const headerWrapper$1 = "_headerWrapper_17ovr_45";
|
|
28692
|
+
const tableBody = "_tableBody_17ovr_46";
|
|
28693
|
+
const clickableHeader = "_clickableHeader_17ovr_51";
|
|
28694
|
+
const headerContent = "_headerContent_17ovr_65";
|
|
28695
|
+
const orderingIndicator = "_orderingIndicator_17ovr_68";
|
|
28696
|
+
const activeOrdering = "_activeOrdering_17ovr_73";
|
|
28697
|
+
const alwaysShow = "_alwaysShow_17ovr_73";
|
|
28698
|
+
const headerRow = "_headerRow_17ovr_111";
|
|
28699
|
+
const columnCell = "_columnCell_17ovr_115";
|
|
28700
|
+
const cell = "_cell_17ovr_116";
|
|
28701
|
+
const alignTop = "_alignTop_17ovr_124";
|
|
28702
|
+
const alignCenter$1 = "_alignCenter_17ovr_128";
|
|
28703
|
+
const alignBottom = "_alignBottom_17ovr_132";
|
|
28704
|
+
const table = "_table_17ovr_46";
|
|
28705
|
+
const row$1 = "_row_17ovr_140";
|
|
28706
|
+
const checkBoxWrapper = "_checkBoxWrapper_17ovr_147";
|
|
28707
|
+
const showInHeader = "_showInHeader_17ovr_152";
|
|
28708
|
+
const selected = "_selected_17ovr_156";
|
|
28709
|
+
const allSelected = "_allSelected_17ovr_156";
|
|
28710
|
+
const cellContent = "_cellContent_17ovr_187";
|
|
28711
|
+
const focused = "_focused_17ovr_214";
|
|
28712
|
+
const disabled$2 = "_disabled_17ovr_226";
|
|
28713
|
+
const noBottomBorder = "_noBottomBorder_17ovr_233";
|
|
28714
|
+
const noRows$1 = "_noRows_17ovr_258";
|
|
28715
|
+
const loadingWrapper$1 = "_loadingWrapper_17ovr_297";
|
|
28716
|
+
const forceHoverWrapper = "_forceHoverWrapper_17ovr_310";
|
|
28717
|
+
const resizer$1 = "_resizer_17ovr_313";
|
|
28718
|
+
const isResizing = "_isResizing_17ovr_334";
|
|
28600
28719
|
const styles$E = {
|
|
28601
28720
|
themeVars: themeVars$p,
|
|
28602
28721
|
wrapper: wrapper$c,
|
|
@@ -28605,6 +28724,9 @@ const styles$E = {
|
|
|
28605
28724
|
tableBody,
|
|
28606
28725
|
clickableHeader,
|
|
28607
28726
|
headerContent,
|
|
28727
|
+
orderingIndicator,
|
|
28728
|
+
activeOrdering,
|
|
28729
|
+
alwaysShow,
|
|
28608
28730
|
headerRow,
|
|
28609
28731
|
columnCell,
|
|
28610
28732
|
cell,
|
|
@@ -28709,6 +28831,7 @@ function useRowSelection({
|
|
|
28709
28831
|
rowsSelectable,
|
|
28710
28832
|
enableMultiRowSelection,
|
|
28711
28833
|
rowDisabledPredicate,
|
|
28834
|
+
rowUnselectablePredicate,
|
|
28712
28835
|
onSelectionDidChange,
|
|
28713
28836
|
initiallySelected = EMPTY_ARRAY,
|
|
28714
28837
|
syncWithAppState
|
|
@@ -28964,7 +29087,7 @@ function useRowSelection({
|
|
|
28964
29087
|
return;
|
|
28965
29088
|
}
|
|
28966
29089
|
setSelectedRowIds(
|
|
28967
|
-
checked2 ? items.filter((item2) =>
|
|
29090
|
+
checked2 ? items.filter((item2) => !(rowDisabledPredicate?.(item2) || rowUnselectablePredicate?.(item2))).map((item2) => item2[idKey]) : []
|
|
28968
29091
|
);
|
|
28969
29092
|
});
|
|
28970
29093
|
const selectedRowIdMap = useMemo(() => {
|
|
@@ -29417,6 +29540,9 @@ const CheckboxToleranceValues = ["none", "compact", "comfortable", "spacious"];
|
|
|
29417
29540
|
function defaultIsRowDisabled(_) {
|
|
29418
29541
|
return false;
|
|
29419
29542
|
}
|
|
29543
|
+
function defaultIsRowUnselectable(_) {
|
|
29544
|
+
return false;
|
|
29545
|
+
}
|
|
29420
29546
|
const SELECT_COLUMN_WIDTH = 42;
|
|
29421
29547
|
const DEFAULT_PAGE_SIZES = [10];
|
|
29422
29548
|
const getCheckboxTolerancePixels = (tolerance) => {
|
|
@@ -29476,6 +29602,7 @@ const Table = forwardRef(
|
|
|
29476
29602
|
pageSize = pageSizeOptions?.[0] || DEFAULT_PAGE_SIZES[0],
|
|
29477
29603
|
currentPageIndex = 0,
|
|
29478
29604
|
rowDisabledPredicate = defaultIsRowDisabled,
|
|
29605
|
+
rowUnselectablePredicate = defaultIsRowUnselectable,
|
|
29479
29606
|
sortBy: sortBy2,
|
|
29480
29607
|
sortingDirection = defaultProps$C.sortingDirection,
|
|
29481
29608
|
iconSortAsc,
|
|
@@ -29490,6 +29617,7 @@ const Table = forwardRef(
|
|
|
29490
29617
|
hideHeader = defaultProps$C.hideHeader,
|
|
29491
29618
|
hideNoDataView = defaultProps$C.hideNoDataView,
|
|
29492
29619
|
alwaysShowSelectionHeader = defaultProps$C.alwaysShowSelectionHeader,
|
|
29620
|
+
alwaysShowSortingIndicator = defaultProps$C.alwaysShowSortingIndicator,
|
|
29493
29621
|
registerComponentApi,
|
|
29494
29622
|
onSelectionDidChange,
|
|
29495
29623
|
noBottomBorder: noBottomBorder2 = defaultProps$C.noBottomBorder,
|
|
@@ -29543,6 +29671,7 @@ const Table = forwardRef(
|
|
|
29543
29671
|
rowsSelectable,
|
|
29544
29672
|
enableMultiRowSelection,
|
|
29545
29673
|
rowDisabledPredicate,
|
|
29674
|
+
rowUnselectablePredicate,
|
|
29546
29675
|
onSelectionDidChange,
|
|
29547
29676
|
initiallySelected,
|
|
29548
29677
|
syncWithAppState
|
|
@@ -29667,14 +29796,16 @@ const Table = forwardRef(
|
|
|
29667
29796
|
indeterminate: table22.getIsSomeRowsSelected(),
|
|
29668
29797
|
forceHover: headerCheckboxHovered,
|
|
29669
29798
|
onDidChange: () => {
|
|
29670
|
-
const allSelected2 = table22.getRowModel().rows.every(
|
|
29799
|
+
const allSelected2 = table22.getRowModel().rows.every(
|
|
29800
|
+
(row2) => rowDisabledPredicate(row2.original) || rowUnselectablePredicate(row2.original) || row2.getIsSelected()
|
|
29801
|
+
);
|
|
29671
29802
|
checkAllRows(!allSelected2);
|
|
29672
29803
|
}
|
|
29673
29804
|
}
|
|
29674
29805
|
}
|
|
29675
29806
|
) : null,
|
|
29676
29807
|
cell: ({ row: row2 }) => {
|
|
29677
|
-
return /* @__PURE__ */ jsx(
|
|
29808
|
+
return /* @__PURE__ */ jsx(Fragment, { children: row2.getCanSelect() && /* @__PURE__ */ jsx(
|
|
29678
29809
|
Toggle,
|
|
29679
29810
|
{
|
|
29680
29811
|
...{
|
|
@@ -29693,7 +29824,7 @@ const Table = forwardRef(
|
|
|
29693
29824
|
}
|
|
29694
29825
|
}
|
|
29695
29826
|
}
|
|
29696
|
-
);
|
|
29827
|
+
) });
|
|
29697
29828
|
}
|
|
29698
29829
|
};
|
|
29699
29830
|
return rowsSelectable ? [selectColumn, ...columnsWithCustomCell] : columnsWithCustomCell;
|
|
@@ -29705,6 +29836,7 @@ const Table = forwardRef(
|
|
|
29705
29836
|
checkAllRows,
|
|
29706
29837
|
toggleRow,
|
|
29707
29838
|
rowDisabledPredicate,
|
|
29839
|
+
rowUnselectablePredicate,
|
|
29708
29840
|
hoveredRowId,
|
|
29709
29841
|
headerCheckboxHovered
|
|
29710
29842
|
]);
|
|
@@ -29749,12 +29881,18 @@ const Table = forwardRef(
|
|
|
29749
29881
|
right: right2
|
|
29750
29882
|
};
|
|
29751
29883
|
}, [columnsWithSelectColumn]);
|
|
29884
|
+
const enableRowSelectionFn = useCallback(
|
|
29885
|
+
(row2) => {
|
|
29886
|
+
return rowsSelectable && !rowUnselectablePredicate(row2.original);
|
|
29887
|
+
},
|
|
29888
|
+
[rowUnselectablePredicate, rowsSelectable]
|
|
29889
|
+
);
|
|
29752
29890
|
const table2 = useReactTable({
|
|
29753
29891
|
columns: columnsWithSelectColumn,
|
|
29754
29892
|
data: sortedData,
|
|
29755
29893
|
getCoreRowModel: getCoreRowModel(),
|
|
29756
29894
|
getPaginationRowModel: isPaginated ? getPaginationRowModel() : void 0,
|
|
29757
|
-
enableRowSelection:
|
|
29895
|
+
enableRowSelection: enableRowSelectionFn,
|
|
29758
29896
|
enableMultiRowSelection,
|
|
29759
29897
|
columnResizeMode: "onChange",
|
|
29760
29898
|
getRowId: useCallback(
|
|
@@ -29904,7 +30042,7 @@ const Table = forwardRef(
|
|
|
29904
30042
|
event.preventDefault();
|
|
29905
30043
|
event.stopPropagation();
|
|
29906
30044
|
const allSelected2 = table2.getRowModel().rows.every(
|
|
29907
|
-
(row2) => rowDisabledPredicate(row2.original) || row2.getIsSelected()
|
|
30045
|
+
(row2) => rowDisabledPredicate(row2.original) || rowUnselectablePredicate(row2.original) || row2.getIsSelected()
|
|
29908
30046
|
);
|
|
29909
30047
|
checkAllRows(!allSelected2);
|
|
29910
30048
|
}
|
|
@@ -29982,13 +30120,22 @@ const Table = forwardRef(
|
|
|
29982
30120
|
header2.column.columnDef.header,
|
|
29983
30121
|
header2.getContext()
|
|
29984
30122
|
),
|
|
29985
|
-
header2.column.columnDef.enableSorting && /* @__PURE__ */ jsx(
|
|
29986
|
-
|
|
30123
|
+
header2.column.columnDef.enableSorting && /* @__PURE__ */ jsx(Part, { partId: "orderIndicator", children: /* @__PURE__ */ jsx(
|
|
30124
|
+
"span",
|
|
29987
30125
|
{
|
|
29988
|
-
|
|
29989
|
-
|
|
29990
|
-
|
|
29991
|
-
|
|
30126
|
+
className: classnames(styles$E.orderingIndicator, {
|
|
30127
|
+
[styles$E.activeOrdering]: header2.column.columnDef.meta?.accessorKey === _sortBy,
|
|
30128
|
+
[styles$E.alwaysShow]: alwaysShowSortingIndicator
|
|
30129
|
+
}),
|
|
30130
|
+
children: /* @__PURE__ */ jsx(
|
|
30131
|
+
ColumnOrderingIndicator,
|
|
30132
|
+
{
|
|
30133
|
+
iconSortAsc,
|
|
30134
|
+
iconSortDesc,
|
|
30135
|
+
iconNoSort,
|
|
30136
|
+
direction: header2.column.columnDef.meta?.accessorKey === _sortBy ? _sortingDirection : void 0
|
|
30137
|
+
}
|
|
30138
|
+
)
|
|
29992
30139
|
}
|
|
29993
30140
|
) })
|
|
29994
30141
|
] })
|
|
@@ -30050,6 +30197,9 @@ const Table = forwardRef(
|
|
|
30050
30197
|
rowVirtualizer.measureElement(el);
|
|
30051
30198
|
},
|
|
30052
30199
|
onClick: (event) => {
|
|
30200
|
+
if (!row2.getCanSelect()) {
|
|
30201
|
+
return;
|
|
30202
|
+
}
|
|
30053
30203
|
if (event?.defaultPrevented) {
|
|
30054
30204
|
return;
|
|
30055
30205
|
}
|
|
@@ -30175,6 +30325,7 @@ const defaultProps$C = {
|
|
|
30175
30325
|
hideHeader: false,
|
|
30176
30326
|
hideNoDataView: false,
|
|
30177
30327
|
alwaysShowSelectionHeader: false,
|
|
30328
|
+
alwaysShowSortingIndicator: false,
|
|
30178
30329
|
noBottomBorder: false,
|
|
30179
30330
|
paginationControlsLocation: "bottom",
|
|
30180
30331
|
cellVerticalAlign: "center",
|
|
@@ -30272,6 +30423,9 @@ const TableMd = createMetadata({
|
|
|
30272
30423
|
rowDisabledPredicate: d(
|
|
30273
30424
|
`This property defines a predicate function with a return value that determines if the row should be disabled. The function retrieves the item to display and should return a Boolean-like value.`
|
|
30274
30425
|
),
|
|
30426
|
+
rowUnselectablePredicate: {
|
|
30427
|
+
description: `This property defines a predicate function with a return value that determines if the row should be unselectable. The function retrieves the item to display and should return a Boolean-like value. This property only has an effect when the \`rowsSelectable\` property is set to \`true\`.`
|
|
30428
|
+
},
|
|
30275
30429
|
noDataTemplate: dComponent(
|
|
30276
30430
|
`A property to customize what to display if the table does not contain any data.`
|
|
30277
30431
|
),
|
|
@@ -30304,12 +30458,17 @@ const TableMd = createMetadata({
|
|
|
30304
30458
|
alwaysShowSelectionHeader: {
|
|
30305
30459
|
description: "This property indicates when the row selection header is displayed. When the value is `true,` the selection header is always visible. Otherwise, it is displayed only when hovered.",
|
|
30306
30460
|
valueType: "boolean",
|
|
30307
|
-
defaultValue:
|
|
30461
|
+
defaultValue: defaultProps$C.alwaysShowSelectionHeader
|
|
30462
|
+
},
|
|
30463
|
+
alwaysShowSortingIndicator: {
|
|
30464
|
+
description: `This property indicates whether the sorting indicator is always visible in the column headers. When set to \`true\`, the sorting indicator is always visible. Otherwise, it is visible only when the user hovers over/focuses the column header or the column is sorted.`,
|
|
30465
|
+
valueType: "boolean",
|
|
30466
|
+
defaultValue: defaultProps$C.alwaysShowSortingIndicator
|
|
30308
30467
|
},
|
|
30309
30468
|
noBottomBorder: {
|
|
30310
30469
|
description: `This property indicates whether the table should have a bottom border. When set to \`true\`, the table does not have a bottom border. Otherwise, it has a bottom border.`,
|
|
30311
30470
|
valueType: "boolean",
|
|
30312
|
-
defaultValue:
|
|
30471
|
+
defaultValue: defaultProps$C.noBottomBorder
|
|
30313
30472
|
},
|
|
30314
30473
|
paginationControlsLocation: {
|
|
30315
30474
|
description: `This property determines the location of the pagination controls. It can be set to \`top\`, \`bottom\`, or \`both\`.`,
|
|
@@ -30321,7 +30480,7 @@ const TableMd = createMetadata({
|
|
|
30321
30480
|
description: `This property controls the vertical alignment of cell content. It can be set to \`top\`, \`center\`, or \`bottom\`.`,
|
|
30322
30481
|
valueType: "string",
|
|
30323
30482
|
availableValues: ["top", "center", "bottom"],
|
|
30324
|
-
defaultValue:
|
|
30483
|
+
defaultValue: defaultProps$C.cellVerticalAlign
|
|
30325
30484
|
},
|
|
30326
30485
|
checkboxTolerance: {
|
|
30327
30486
|
description: `This property controls the tolerance area around checkboxes for easier interaction. This property only has an effect when the rowsSelectable property is set to \`true\`. \`none\` provides no tolerance (0px), \`compact\` provides minimal tolerance (8px), \`comfortable\` provides medium tolerance (12px), and \`spacious\` provides generous tolerance (16px) for improved accessibility.`,
|
|
@@ -30376,6 +30535,7 @@ const TableMd = createMetadata({
|
|
|
30376
30535
|
[`outlineWidth-heading-${COMP$14}--focus`]: "$outlineWidth--focus",
|
|
30377
30536
|
[`outlineStyle-heading-${COMP$14}--focus`]: "$outlineStyle--focus",
|
|
30378
30537
|
[`outlineOffset-heading-${COMP$14}--focus`]: "$outlineOffset--focus",
|
|
30538
|
+
[`outlineColor-heading-${COMP$14}--focus`]: "$outlineColor--focus",
|
|
30379
30539
|
[`fontSize-heading-${COMP$14}`]: "$fontSize-tiny",
|
|
30380
30540
|
[`fontWeight-heading-${COMP$14}`]: "$fontWeight-bold",
|
|
30381
30541
|
[`textTransform-heading-${COMP$14}`]: "uppercase",
|
|
@@ -30384,7 +30544,6 @@ const TableMd = createMetadata({
|
|
|
30384
30544
|
// [`backgroundColor-row-${COMP}`]: "inherit",
|
|
30385
30545
|
[`backgroundColor-selected-${COMP$14}--hover`]: `$backgroundColor-row-${COMP$14}--hover`,
|
|
30386
30546
|
[`backgroundColor-pagination-${COMP$14}`]: `$backgroundColor-${COMP$14}`,
|
|
30387
|
-
[`outlineColor-heading-${COMP$14}--focus`]: "$outlineColor--focus",
|
|
30388
30547
|
[`textColor-pagination-${COMP$14}`]: "$color-secondary",
|
|
30389
30548
|
[`backgroundColor-row-${COMP$14}--hover`]: "$color-primary-50",
|
|
30390
30549
|
[`backgroundColor-selected-${COMP$14}`]: "$color-primary-100",
|
|
@@ -30488,6 +30647,7 @@ const TableWithColumns = memo(
|
|
|
30488
30647
|
isPaginated: extractValue.asOptionalBoolean(node.props?.isPaginated),
|
|
30489
30648
|
headerHeight: extractValue.asSize(node.props.headerHeight),
|
|
30490
30649
|
rowDisabledPredicate: lookupSyncCallback(node.props.rowDisabledPredicate),
|
|
30650
|
+
rowUnselectablePredicate: lookupSyncCallback(node.props.rowUnselectablePredicate),
|
|
30491
30651
|
sortBy: extractValue(node.props?.sortBy),
|
|
30492
30652
|
sortingDirection: extractValue(node.props?.sortDirection),
|
|
30493
30653
|
iconSortAsc: extractValue.asOptionalString(node.props?.iconSortAsc),
|
|
@@ -30505,6 +30665,9 @@ const TableWithColumns = memo(
|
|
|
30505
30665
|
alwaysShowSelectionHeader: extractValue.asOptionalBoolean(
|
|
30506
30666
|
node.props.alwaysShowSelectionHeader
|
|
30507
30667
|
),
|
|
30668
|
+
alwaysShowSortingIndicator: extractValue.asOptionalBoolean(
|
|
30669
|
+
node.props.alwaysShowSortingIndicator
|
|
30670
|
+
),
|
|
30508
30671
|
noBottomBorder: extractValue.asOptionalBoolean(node.props.noBottomBorder),
|
|
30509
30672
|
paginationControlsLocation: extractValue.asOptionalString(
|
|
30510
30673
|
node.props.paginationControlsLocation
|
|
@@ -32689,11 +32852,8 @@ function MemoizedSection({
|
|
|
32689
32852
|
{
|
|
32690
32853
|
node,
|
|
32691
32854
|
renderChild: renderChild2,
|
|
32692
|
-
item: item2,
|
|
32693
|
-
context: sectionContext,
|
|
32694
|
-
itemKey: "$group",
|
|
32695
|
-
contextKey: "$group",
|
|
32696
32855
|
contextVars: {
|
|
32856
|
+
$group: { ...item2, ...sectionContext },
|
|
32697
32857
|
...contextVars,
|
|
32698
32858
|
$isFirst: item2.index === 0,
|
|
32699
32859
|
$isLast: item2.index === item2.count - 1
|
|
@@ -32846,10 +33006,10 @@ const dynamicHeightListComponentRenderer = createComponentRenderer(
|
|
|
32846
33006
|
MemoizedItem,
|
|
32847
33007
|
{
|
|
32848
33008
|
node: itemTemplate,
|
|
32849
|
-
item: item2,
|
|
32850
33009
|
renderChild: renderChild2,
|
|
32851
33010
|
layoutContext,
|
|
32852
33011
|
contextVars: {
|
|
33012
|
+
$item: item2,
|
|
32853
33013
|
$itemIndex: rowIndex,
|
|
32854
33014
|
$isFirst: rowIndex === 0,
|
|
32855
33015
|
$isLast: rowIndex === count - 1
|
|
@@ -32871,10 +33031,10 @@ const dynamicHeightListComponentRenderer = createComponentRenderer(
|
|
|
32871
33031
|
MemoizedItem,
|
|
32872
33032
|
{
|
|
32873
33033
|
node: node.props.groupFooterTemplate ?? { type: "Fragment" },
|
|
32874
|
-
item: item2,
|
|
32875
33034
|
renderChild: renderChild2,
|
|
32876
|
-
|
|
32877
|
-
|
|
33035
|
+
contextVars: {
|
|
33036
|
+
$group: item2
|
|
33037
|
+
}
|
|
32878
33038
|
},
|
|
32879
33039
|
key
|
|
32880
33040
|
) : null : void 0
|
|
@@ -33271,7 +33431,6 @@ class RestApiProxy {
|
|
|
33271
33431
|
body: requestBody
|
|
33272
33432
|
};
|
|
33273
33433
|
if (onUploadProgress) {
|
|
33274
|
-
console.log("Falling back to axios. Reason: onUploadProgress specified");
|
|
33275
33434
|
const axios = (await import("axios")).default;
|
|
33276
33435
|
try {
|
|
33277
33436
|
const response = await axios.request({
|
|
@@ -35059,7 +35218,8 @@ const RadioGroupMd = createMetadata({
|
|
|
35059
35218
|
[`backgroundColor-checked-${RGOption}`]: "$color-primary-500",
|
|
35060
35219
|
[`backgroundColor-checked-${RGOption}--disabled`]: `$textColor--disabled`,
|
|
35061
35220
|
[`fontSize-${RGOption}`]: "$fontSize-sm",
|
|
35062
|
-
[`fontWeight-${RGOption}`]: "$fontWeight-bold"
|
|
35221
|
+
[`fontWeight-${RGOption}`]: "$fontWeight-bold",
|
|
35222
|
+
[`textColor-${RGOption}--disabled`]: "$textColor--disabled"
|
|
35063
35223
|
}
|
|
35064
35224
|
});
|
|
35065
35225
|
const radioGroupRenderer = createComponentRenderer(
|
|
@@ -35261,6 +35421,18 @@ const SelectMd = createMetadata({
|
|
|
35261
35421
|
isInternal: true,
|
|
35262
35422
|
description: "internal radix modal prop",
|
|
35263
35423
|
valueType: "boolean"
|
|
35424
|
+
},
|
|
35425
|
+
groupBy: {
|
|
35426
|
+
description: "This property sets which attribute should be used to group the available options. No grouping is done if omitted. Use it with the `category` attribute on `Options` to define groups. If no options belong to a group, that group will not be shown.",
|
|
35427
|
+
valueType: "string"
|
|
35428
|
+
},
|
|
35429
|
+
groupHeaderTemplate: {
|
|
35430
|
+
description: `Enables the customization of how option groups are displayed in the dropdown. You can use the \`$group\` context variable to access the group name.`,
|
|
35431
|
+
valueType: "ComponentDef"
|
|
35432
|
+
},
|
|
35433
|
+
ungroupedHeaderTemplate: {
|
|
35434
|
+
description: `Enables the customization of how the ungrouped options header is displayed in the dropdown. If not provided, ungrouped options will not have a header.`,
|
|
35435
|
+
valueType: "ComponentDef"
|
|
35264
35436
|
}
|
|
35265
35437
|
},
|
|
35266
35438
|
events: {
|
|
@@ -35291,7 +35463,8 @@ const SelectMd = createMetadata({
|
|
|
35291
35463
|
},
|
|
35292
35464
|
contextVars: {
|
|
35293
35465
|
$item: d("Represents the current option's data (label and value properties)"),
|
|
35294
|
-
$itemContext: d("Provides utility methods like `removeItem()` for multi-select scenarios")
|
|
35466
|
+
$itemContext: d("Provides utility methods like `removeItem()` for multi-select scenarios"),
|
|
35467
|
+
$group: d("Group name when using `groupBy` (available in group header templates)")
|
|
35295
35468
|
},
|
|
35296
35469
|
themeVars: parseScssVar(styles$Q.themeVars),
|
|
35297
35470
|
defaultThemeVars: {
|
|
@@ -35309,17 +35482,15 @@ const SelectMd = createMetadata({
|
|
|
35309
35482
|
[`paddingVertical-item-${COMP$F}`]: "$space-2",
|
|
35310
35483
|
[`paddingHorizontal-${COMP$F}`]: "$space-2",
|
|
35311
35484
|
[`paddingVertical-${COMP$F}`]: "$space-2",
|
|
35312
|
-
[`opacity-text-item-${COMP$F}--disabled`]: "0.5",
|
|
35313
|
-
[`opacity-${COMP$F}--disabled`]: "0.5",
|
|
35314
35485
|
[`backgroundColor-${COMP$F}-badge--hover`]: "$color-primary-400",
|
|
35315
35486
|
[`backgroundColor-${COMP$F}-badge--active`]: "$color-primary-500",
|
|
35316
|
-
[`textColor-item-${COMP$F}--disabled`]: "$color-surface-
|
|
35487
|
+
[`textColor-item-${COMP$F}--disabled`]: "$color-surface-300",
|
|
35317
35488
|
[`textColor-${COMP$F}-badge`]: "$const-color-surface-50",
|
|
35318
35489
|
[`backgroundColor-item-${COMP$F}`]: "$backgroundColor-dropdown-item",
|
|
35319
35490
|
[`backgroundColor-item-${COMP$F}--hover`]: "$backgroundColor-dropdown-item--hover",
|
|
35320
35491
|
[`backgroundColor-item-${COMP$F}--active`]: "$backgroundColor-dropdown-item--active",
|
|
35321
|
-
|
|
35322
|
-
[`
|
|
35492
|
+
[`borderColor-${COMP$F}--disabled`]: "$borderColor--disabled",
|
|
35493
|
+
[`textColor-${COMP$F}--disabled`]: "$textColor--disabled",
|
|
35323
35494
|
[`minHeight-${COMP$F}`]: "$space-7",
|
|
35324
35495
|
[`minHeight-item-${COMP$F}`]: "$space-7"
|
|
35325
35496
|
}
|
|
@@ -35335,7 +35506,8 @@ const selectComponentRenderer = createComponentRenderer(
|
|
|
35335
35506
|
renderChild: renderChild2,
|
|
35336
35507
|
lookupEventHandler,
|
|
35337
35508
|
className,
|
|
35338
|
-
registerComponentApi
|
|
35509
|
+
registerComponentApi,
|
|
35510
|
+
...rest
|
|
35339
35511
|
}) => {
|
|
35340
35512
|
const multiSelect = extractValue.asOptionalBoolean(node.props.multiSelect);
|
|
35341
35513
|
const searchable = extractValue.asOptionalBoolean(node.props.searchable);
|
|
@@ -35368,15 +35540,38 @@ const selectComponentRenderer = createComponentRenderer(
|
|
|
35368
35540
|
dropdownHeight: extractValue(node.props.dropdownHeight),
|
|
35369
35541
|
required: extractValue.asOptionalBoolean(node.props.required),
|
|
35370
35542
|
modal: extractValue.asOptionalBoolean(node.props.modal),
|
|
35543
|
+
groupBy: extractValue(node.props.groupBy),
|
|
35544
|
+
groupHeaderRenderer: node.props.groupHeaderTemplate ? (groupName) => {
|
|
35545
|
+
return /* @__PURE__ */ jsx(
|
|
35546
|
+
MemoizedItem,
|
|
35547
|
+
{
|
|
35548
|
+
contextVars: {
|
|
35549
|
+
$group: groupName
|
|
35550
|
+
},
|
|
35551
|
+
node: node.props.groupHeaderTemplate,
|
|
35552
|
+
renderChild: renderChild2
|
|
35553
|
+
}
|
|
35554
|
+
);
|
|
35555
|
+
} : void 0,
|
|
35556
|
+
ungroupedHeaderRenderer: node.props.ungroupedHeaderTemplate ? () => {
|
|
35557
|
+
return /* @__PURE__ */ jsx(
|
|
35558
|
+
MemoizedItem,
|
|
35559
|
+
{
|
|
35560
|
+
contextVars: {},
|
|
35561
|
+
node: node.props.ungroupedHeaderTemplate,
|
|
35562
|
+
renderChild: renderChild2
|
|
35563
|
+
}
|
|
35564
|
+
);
|
|
35565
|
+
} : void 0,
|
|
35371
35566
|
valueRenderer: node.props.valueTemplate ? (item2, removeItem) => {
|
|
35372
35567
|
return /* @__PURE__ */ jsx(
|
|
35373
35568
|
MemoizedItem,
|
|
35374
35569
|
{
|
|
35375
35570
|
contextVars: {
|
|
35571
|
+
$item: item2,
|
|
35376
35572
|
$itemContext: { removeItem }
|
|
35377
35573
|
},
|
|
35378
35574
|
node: node.props.valueTemplate,
|
|
35379
|
-
item: item2,
|
|
35380
35575
|
renderChild: renderChild2
|
|
35381
35576
|
}
|
|
35382
35577
|
);
|
|
@@ -35386,8 +35581,8 @@ const selectComponentRenderer = createComponentRenderer(
|
|
|
35386
35581
|
MemoizedItem,
|
|
35387
35582
|
{
|
|
35388
35583
|
node: node.props.optionTemplate,
|
|
35389
|
-
item: item2,
|
|
35390
35584
|
contextVars: {
|
|
35585
|
+
$item: item2,
|
|
35391
35586
|
$selectedValue: val,
|
|
35392
35587
|
$inTrigger: inTrigger
|
|
35393
35588
|
},
|
|
@@ -35772,8 +35967,8 @@ function Column({ nodeChildren, renderChild: renderChild2, ...columnMetadata })
|
|
|
35772
35967
|
MemoizedItem,
|
|
35773
35968
|
{
|
|
35774
35969
|
node: nodeChildren,
|
|
35775
|
-
item: row2,
|
|
35776
35970
|
contextVars: {
|
|
35971
|
+
$item: row2,
|
|
35777
35972
|
$rowIndex: rowIndex,
|
|
35778
35973
|
$colIndex: colIndex,
|
|
35779
35974
|
$row: row2,
|
|
@@ -36254,7 +36449,7 @@ async function callApi({ state, appContext, lookupAction, getCurrentState, apiIn
|
|
|
36254
36449
|
});
|
|
36255
36450
|
const result = await onErrorFn?.(e, stateContext["$param"]);
|
|
36256
36451
|
const errorMessage = extractParam(
|
|
36257
|
-
{ ...stateContext, $error: e },
|
|
36452
|
+
{ ...stateContext, $error: createContextVariableError(e) },
|
|
36258
36453
|
errorNotificationMessage,
|
|
36259
36454
|
appContext
|
|
36260
36455
|
);
|
|
@@ -37705,7 +37900,7 @@ function DataLoader({
|
|
|
37705
37900
|
async (error22) => {
|
|
37706
37901
|
loaderError2(error22);
|
|
37707
37902
|
if (onError) {
|
|
37708
|
-
const result = await onError(error22);
|
|
37903
|
+
const result = await onError(createContextVariableError(error22));
|
|
37709
37904
|
if (result === false) {
|
|
37710
37905
|
if (loadingToastIdRef.current) {
|
|
37711
37906
|
toast.dismiss(loadingToastIdRef.current);
|
|
@@ -37716,7 +37911,7 @@ function DataLoader({
|
|
|
37716
37911
|
const errorMessage = extractParam(
|
|
37717
37912
|
{
|
|
37718
37913
|
...stateRef.current.state,
|
|
37719
|
-
$error: error22
|
|
37914
|
+
$error: createContextVariableError(error22)
|
|
37720
37915
|
},
|
|
37721
37916
|
loader.props.errorNotificationMessage,
|
|
37722
37917
|
stateRef.current.appContext
|
|
@@ -40675,7 +40870,7 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
40675
40870
|
className: classnames(className, styles$p.tabs, styles$p.accordionView),
|
|
40676
40871
|
style: style2,
|
|
40677
40872
|
children: /* @__PURE__ */ jsx(
|
|
40678
|
-
Root,
|
|
40873
|
+
Root$1,
|
|
40679
40874
|
{
|
|
40680
40875
|
value: `${currentTab}`,
|
|
40681
40876
|
onValueChange: (tab) => {
|
|
@@ -40691,7 +40886,7 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
40691
40886
|
className: styles$p.accordionRoot,
|
|
40692
40887
|
children: /* @__PURE__ */ jsxs("div", { className: styles$p.accordionInterleaved, children: [
|
|
40693
40888
|
/* @__PURE__ */ jsx(List, { className: styles$p.accordionList, children: tabItems.map((tab, index) => /* @__PURE__ */ jsx(
|
|
40694
|
-
Trigger,
|
|
40889
|
+
Trigger$1,
|
|
40695
40890
|
{
|
|
40696
40891
|
value: tab.innerId,
|
|
40697
40892
|
asChild: true,
|
|
@@ -40726,7 +40921,7 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
40726
40921
|
) });
|
|
40727
40922
|
}
|
|
40728
40923
|
return /* @__PURE__ */ jsx(TabContext.Provider, { value: tabContextValue, children: /* @__PURE__ */ jsxs(
|
|
40729
|
-
Root,
|
|
40924
|
+
Root$1,
|
|
40730
40925
|
{
|
|
40731
40926
|
...rest,
|
|
40732
40927
|
id: tabsId,
|
|
@@ -40758,7 +40953,7 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
40758
40953
|
children: [
|
|
40759
40954
|
!distributeEvenly2 && !headerRenderer && tabAlignment === "end" && /* @__PURE__ */ jsx("div", { className: styles$p.filler, "data-orientation": orientation }),
|
|
40760
40955
|
!distributeEvenly2 && !headerRenderer && tabAlignment === "center" && /* @__PURE__ */ jsx("div", { className: styles$p.filler, "data-orientation": orientation }),
|
|
40761
|
-
tabItems.map((tab, index) => /* @__PURE__ */ jsx(Trigger, { value: tab.innerId, asChild: true, children: /* @__PURE__ */ jsx(
|
|
40956
|
+
tabItems.map((tab, index) => /* @__PURE__ */ jsx(Trigger$1, { value: tab.innerId, asChild: true, children: /* @__PURE__ */ jsx(
|
|
40762
40957
|
"div",
|
|
40763
40958
|
{
|
|
40764
40959
|
role: "tab",
|
|
@@ -40865,7 +41060,6 @@ const tabsComponentRenderer = createComponentRenderer(
|
|
|
40865
41060
|
MemoizedItem,
|
|
40866
41061
|
{
|
|
40867
41062
|
node: node.props.headerTemplate,
|
|
40868
|
-
itemKey: "$header",
|
|
40869
41063
|
contextVars: {
|
|
40870
41064
|
$header: item2
|
|
40871
41065
|
},
|
|
@@ -41353,7 +41547,7 @@ const TabItemComponent = forwardRef(function TabItemComponent2({ children, label
|
|
|
41353
41547
|
const tabIndex = tabItems?.findIndex((item2) => item2.innerId === innerId) ?? 0;
|
|
41354
41548
|
const contentOrder = tabIndex * 2 + 1;
|
|
41355
41549
|
return /* @__PURE__ */ createElement(
|
|
41356
|
-
Content,
|
|
41550
|
+
Content$1,
|
|
41357
41551
|
{
|
|
41358
41552
|
...rest,
|
|
41359
41553
|
key: innerId,
|
|
@@ -41401,7 +41595,6 @@ const tabItemComponentRenderer = createComponentRenderer(
|
|
|
41401
41595
|
MemoizedItem,
|
|
41402
41596
|
{
|
|
41403
41597
|
node: node.props.headerTemplate,
|
|
41404
|
-
itemKey: "$header",
|
|
41405
41598
|
contextVars: {
|
|
41406
41599
|
$header: {
|
|
41407
41600
|
id: item2.id,
|
|
@@ -41548,7 +41741,9 @@ const accordionItemComponentRenderer = createComponentRenderer(
|
|
|
41548
41741
|
MemoizedItem,
|
|
41549
41742
|
{
|
|
41550
41743
|
node: node.props.headerTemplate ?? { type: "Fragment" },
|
|
41551
|
-
|
|
41744
|
+
contextVars: {
|
|
41745
|
+
$item: item2
|
|
41746
|
+
},
|
|
41552
41747
|
renderChild: renderChild2
|
|
41553
41748
|
}
|
|
41554
41749
|
) : void 0,
|
|
@@ -42186,12 +42381,51 @@ const carouselItemComponentRenderer = createComponentRenderer(
|
|
|
42186
42381
|
return /* @__PURE__ */ jsx(CarouselItemComponent, { children: renderChild2(node.children) });
|
|
42187
42382
|
}
|
|
42188
42383
|
);
|
|
42189
|
-
const breakout = "
|
|
42384
|
+
const breakout = "_breakout_z3cnt_2";
|
|
42190
42385
|
const styles$l = {
|
|
42191
42386
|
breakout
|
|
42192
42387
|
};
|
|
42193
42388
|
const Breakout = ({ children, style: style2, ...rest }) => {
|
|
42194
|
-
|
|
42389
|
+
const ref = useRef(null);
|
|
42390
|
+
const [breakoutStyle, setBreakoutStyle] = useState({});
|
|
42391
|
+
const calculatedRef = useRef(false);
|
|
42392
|
+
useLayoutEffect(() => {
|
|
42393
|
+
const updateBreakoutStyle = () => {
|
|
42394
|
+
if (!ref.current) return;
|
|
42395
|
+
const currentMarginLeft = ref.current.style.marginLeft;
|
|
42396
|
+
const currentMarginRight = ref.current.style.marginRight;
|
|
42397
|
+
const currentWidth = ref.current.style.width;
|
|
42398
|
+
ref.current.style.marginLeft = "0px";
|
|
42399
|
+
ref.current.style.marginRight = "0px";
|
|
42400
|
+
ref.current.style.width = "auto";
|
|
42401
|
+
const rect = ref.current.getBoundingClientRect();
|
|
42402
|
+
const viewportWidth = window.innerWidth;
|
|
42403
|
+
ref.current.style.marginLeft = currentMarginLeft;
|
|
42404
|
+
ref.current.style.marginRight = currentMarginRight;
|
|
42405
|
+
ref.current.style.width = currentWidth;
|
|
42406
|
+
const offsetLeft = rect.left;
|
|
42407
|
+
const offsetRight = viewportWidth - rect.right;
|
|
42408
|
+
const newStyle = {
|
|
42409
|
+
marginLeft: `-${offsetLeft}px`,
|
|
42410
|
+
marginRight: `-${offsetRight}px`,
|
|
42411
|
+
width: `${viewportWidth}px`
|
|
42412
|
+
};
|
|
42413
|
+
setBreakoutStyle(newStyle);
|
|
42414
|
+
calculatedRef.current = true;
|
|
42415
|
+
};
|
|
42416
|
+
if (!calculatedRef.current) {
|
|
42417
|
+
updateBreakoutStyle();
|
|
42418
|
+
}
|
|
42419
|
+
const handleResize = () => {
|
|
42420
|
+
calculatedRef.current = false;
|
|
42421
|
+
updateBreakoutStyle();
|
|
42422
|
+
};
|
|
42423
|
+
window.addEventListener("resize", handleResize);
|
|
42424
|
+
return () => {
|
|
42425
|
+
window.removeEventListener("resize", handleResize);
|
|
42426
|
+
};
|
|
42427
|
+
}, []);
|
|
42428
|
+
return /* @__PURE__ */ jsx("div", { ...rest, ref, style: { ...breakoutStyle, ...style2 }, className: styles$l.breakout, children });
|
|
42195
42429
|
};
|
|
42196
42430
|
const COMP$p = "Breakout";
|
|
42197
42431
|
const BreakoutMd = createMetadata({
|
|
@@ -42456,7 +42690,7 @@ const APICallMd = createMetadata({
|
|
|
42456
42690
|
valueType: "string"
|
|
42457
42691
|
},
|
|
42458
42692
|
errorNotificationMessage: {
|
|
42459
|
-
description: "
|
|
42693
|
+
description: "",
|
|
42460
42694
|
valueType: "string"
|
|
42461
42695
|
},
|
|
42462
42696
|
completedNotificationMessage: {
|
|
@@ -42545,6 +42779,13 @@ const optionComponentRenderer = createComponentRenderer(
|
|
|
42545
42779
|
}
|
|
42546
42780
|
const hasTextNodeChild = node.children?.length === 1 && (node.children[0].type === "TextNode" || node.children[0].type === "TextNodeCData");
|
|
42547
42781
|
const textNodeChild = hasTextNodeChild ? renderChild2(node.children) : void 0;
|
|
42782
|
+
const extraProps = {};
|
|
42783
|
+
const knownProps = /* @__PURE__ */ new Set(["label", "value", "enabled", "keywords"]);
|
|
42784
|
+
Object.keys(node.props).forEach((key) => {
|
|
42785
|
+
if (!knownProps.has(key)) {
|
|
42786
|
+
extraProps[key] = extractValue(node.props[key]);
|
|
42787
|
+
}
|
|
42788
|
+
});
|
|
42548
42789
|
return /* @__PURE__ */ jsx(
|
|
42549
42790
|
OptionNative,
|
|
42550
42791
|
{
|
|
@@ -42562,6 +42803,7 @@ const optionComponentRenderer = createComponentRenderer(
|
|
|
42562
42803
|
layoutContext
|
|
42563
42804
|
}
|
|
42564
42805
|
) : void 0 : void 0,
|
|
42806
|
+
...extraProps,
|
|
42565
42807
|
children: !hasTextNodeChild && renderChild2(node.children)
|
|
42566
42808
|
}
|
|
42567
42809
|
);
|
|
@@ -42670,17 +42912,15 @@ const AutoCompleteMd = createMetadata({
|
|
|
42670
42912
|
[`paddingVertical-item-${COMP$k}`]: "$space-2",
|
|
42671
42913
|
[`paddingHorizontal-${COMP$k}`]: "$space-2",
|
|
42672
42914
|
[`paddingVertical-${COMP$k}`]: "$space-2",
|
|
42673
|
-
[`opacity-text-item-${COMP$k}--disabled`]: "0.5",
|
|
42674
|
-
[`opacity-${COMP$k}--disabled`]: "0.5",
|
|
42675
42915
|
[`backgroundColor-${COMP$k}-badge--hover`]: "$color-primary-400",
|
|
42676
42916
|
[`backgroundColor-${COMP$k}-badge--active`]: "$color-primary-500",
|
|
42677
|
-
[`textColor-item-${COMP$k}--disabled`]: "$color-surface-
|
|
42917
|
+
[`textColor-item-${COMP$k}--disabled`]: "$color-surface-300",
|
|
42678
42918
|
[`textColor-${COMP$k}-badge`]: "$const-color-surface-50",
|
|
42679
42919
|
[`backgroundColor-item-${COMP$k}`]: "$backgroundColor-dropdown-item",
|
|
42680
42920
|
[`backgroundColor-item-${COMP$k}--hover`]: "$backgroundColor-dropdown-item--hover",
|
|
42681
42921
|
[`backgroundColor-item-${COMP$k}--active`]: "$backgroundColor-dropdown-item--active",
|
|
42682
|
-
|
|
42683
|
-
[`
|
|
42922
|
+
[`borderColor-${COMP$k}--disabled`]: "$borderColor--disabled",
|
|
42923
|
+
[`textColor-${COMP$k}--disabled`]: "$textColor--disabled"
|
|
42684
42924
|
}
|
|
42685
42925
|
});
|
|
42686
42926
|
const autoCompleteComponentRenderer = createComponentRenderer(
|
|
@@ -42724,8 +42964,8 @@ const autoCompleteComponentRenderer = createComponentRenderer(
|
|
|
42724
42964
|
MemoizedItem,
|
|
42725
42965
|
{
|
|
42726
42966
|
node: node.props.optionTemplate,
|
|
42727
|
-
|
|
42728
|
-
|
|
42967
|
+
contextVars: {
|
|
42968
|
+
$item: item2,
|
|
42729
42969
|
$selectedValue: val,
|
|
42730
42970
|
$inTrigger: inTrigger
|
|
42731
42971
|
},
|
|
@@ -44780,11 +45020,11 @@ const htmlWbrTagRenderer = createComponentRenderer(
|
|
|
44780
45020
|
return /* @__PURE__ */ jsx("wbr", { className, ...props, children: renderChild2(node.children) });
|
|
44781
45021
|
}
|
|
44782
45022
|
);
|
|
44783
|
-
const themeVars$5 = `'{"Input:borderRadius-ColorPicker--default": "var(--xmlui-borderRadius-ColorPicker--default)", "Input:borderColor-ColorPicker--default": "var(--xmlui-borderColor-ColorPicker--default)", "Input:borderWidth-ColorPicker--default": "var(--xmlui-borderWidth-ColorPicker--default)", "Input:borderStyle-ColorPicker--default": "var(--xmlui-borderStyle-ColorPicker--default)", "Input:boxShadow-ColorPicker--default": "var(--xmlui-boxShadow-ColorPicker--default)", "Input:borderColor-ColorPicker--default--hover": "var(--xmlui-borderColor-ColorPicker--default--hover)", "Input:boxShadow-ColorPicker--default--hover": "var(--xmlui-boxShadow-ColorPicker--default--hover)", "Input:borderColor-ColorPicker--default--focus": "var(--xmlui-borderColor-ColorPicker--default--focus)", "Input:boxShadow-ColorPicker--default--focus": "var(--xmlui-boxShadow-ColorPicker--default--focus)", "Input:borderRadius-ColorPicker--error": "var(--xmlui-borderRadius-ColorPicker--error)", "Input:borderColor-ColorPicker--error": "var(--xmlui-borderColor-ColorPicker--error)", "Input:borderWidth-ColorPicker--error": "var(--xmlui-borderWidth-ColorPicker--error)", "Input:borderStyle-ColorPicker--error": "var(--xmlui-borderStyle-ColorPicker--error)", "Input:boxShadow-ColorPicker--error": "var(--xmlui-boxShadow-ColorPicker--error)", "Input:borderColor-ColorPicker--error--hover": "var(--xmlui-borderColor-ColorPicker--error--hover)", "Input:boxShadow-ColorPicker--error--hover": "var(--xmlui-boxShadow-ColorPicker--error--hover)", "Input:borderColor-ColorPicker--error--focus": "var(--xmlui-borderColor-ColorPicker--error--focus)", "Input:boxShadow-ColorPicker--error--focus": "var(--xmlui-boxShadow-ColorPicker--error--focus)", "Input:borderRadius-ColorPicker--warning": "var(--xmlui-borderRadius-ColorPicker--warning)", "Input:borderColor-ColorPicker--warning": "var(--xmlui-borderColor-ColorPicker--warning)", "Input:borderWidth-ColorPicker--warning": "var(--xmlui-borderWidth-ColorPicker--warning)", "Input:borderStyle-ColorPicker--warning": "var(--xmlui-borderStyle-ColorPicker--warning)", "Input:boxShadow-ColorPicker--warning": "var(--xmlui-boxShadow-ColorPicker--warning)", "Input:borderColor-ColorPicker--warning--hover": "var(--xmlui-borderColor-ColorPicker--warning--hover)", "Input:boxShadow-ColorPicker--warning--hover": "var(--xmlui-boxShadow-ColorPicker--warning--hover)", "Input:borderColor-ColorPicker--warning--focus": "var(--xmlui-borderColor-ColorPicker--warning--focus)", "Input:boxShadow-ColorPicker--warning--focus": "var(--xmlui-boxShadow-ColorPicker--warning--focus)", "Input:borderRadius-ColorPicker--success": "var(--xmlui-borderRadius-ColorPicker--success)", "Input:borderColor-ColorPicker--success": "var(--xmlui-borderColor-ColorPicker--success)", "Input:borderWidth-ColorPicker--success": "var(--xmlui-borderWidth-ColorPicker--success)", "Input:borderStyle-ColorPicker--success": "var(--xmlui-borderStyle-ColorPicker--success)", "Input:boxShadow-ColorPicker--success": "var(--xmlui-boxShadow-ColorPicker--success)", "Input:borderColor-ColorPicker--success--hover": "var(--xmlui-borderColor-ColorPicker--success--hover)", "Input:boxShadow-ColorPicker--success--hover": "var(--xmlui-boxShadow-ColorPicker--success--hover)", "Input:borderColor-ColorPicker--success--focus": "var(--xmlui-borderColor-ColorPicker--success--focus)", "Input:boxShadow-ColorPicker--success--focus": "var(--xmlui-boxShadow-ColorPicker--success--focus)", "Input:backgroundColor-ColorPicker": "var(--xmlui-backgroundColor-ColorPicker)"}'`;
|
|
44784
|
-
const colorInput = "
|
|
44785
|
-
const error$1 = "
|
|
44786
|
-
const warning$1 = "
|
|
44787
|
-
const valid$1 = "
|
|
45023
|
+
const themeVars$5 = `'{"Input:borderRadius-ColorPicker--default": "var(--xmlui-borderRadius-ColorPicker--default)", "Input:borderColor-ColorPicker--default": "var(--xmlui-borderColor-ColorPicker--default)", "Input:borderWidth-ColorPicker--default": "var(--xmlui-borderWidth-ColorPicker--default)", "Input:borderStyle-ColorPicker--default": "var(--xmlui-borderStyle-ColorPicker--default)", "Input:boxShadow-ColorPicker--default": "var(--xmlui-boxShadow-ColorPicker--default)", "Input:borderColor-ColorPicker--default--hover": "var(--xmlui-borderColor-ColorPicker--default--hover)", "Input:boxShadow-ColorPicker--default--hover": "var(--xmlui-boxShadow-ColorPicker--default--hover)", "Input:borderColor-ColorPicker--default--focus": "var(--xmlui-borderColor-ColorPicker--default--focus)", "Input:boxShadow-ColorPicker--default--focus": "var(--xmlui-boxShadow-ColorPicker--default--focus)", "Input:borderRadius-ColorPicker--error": "var(--xmlui-borderRadius-ColorPicker--error)", "Input:borderColor-ColorPicker--error": "var(--xmlui-borderColor-ColorPicker--error)", "Input:borderWidth-ColorPicker--error": "var(--xmlui-borderWidth-ColorPicker--error)", "Input:borderStyle-ColorPicker--error": "var(--xmlui-borderStyle-ColorPicker--error)", "Input:boxShadow-ColorPicker--error": "var(--xmlui-boxShadow-ColorPicker--error)", "Input:borderColor-ColorPicker--error--hover": "var(--xmlui-borderColor-ColorPicker--error--hover)", "Input:boxShadow-ColorPicker--error--hover": "var(--xmlui-boxShadow-ColorPicker--error--hover)", "Input:borderColor-ColorPicker--error--focus": "var(--xmlui-borderColor-ColorPicker--error--focus)", "Input:boxShadow-ColorPicker--error--focus": "var(--xmlui-boxShadow-ColorPicker--error--focus)", "Input:borderRadius-ColorPicker--warning": "var(--xmlui-borderRadius-ColorPicker--warning)", "Input:borderColor-ColorPicker--warning": "var(--xmlui-borderColor-ColorPicker--warning)", "Input:borderWidth-ColorPicker--warning": "var(--xmlui-borderWidth-ColorPicker--warning)", "Input:borderStyle-ColorPicker--warning": "var(--xmlui-borderStyle-ColorPicker--warning)", "Input:boxShadow-ColorPicker--warning": "var(--xmlui-boxShadow-ColorPicker--warning)", "Input:borderColor-ColorPicker--warning--hover": "var(--xmlui-borderColor-ColorPicker--warning--hover)", "Input:boxShadow-ColorPicker--warning--hover": "var(--xmlui-boxShadow-ColorPicker--warning--hover)", "Input:borderColor-ColorPicker--warning--focus": "var(--xmlui-borderColor-ColorPicker--warning--focus)", "Input:boxShadow-ColorPicker--warning--focus": "var(--xmlui-boxShadow-ColorPicker--warning--focus)", "Input:borderRadius-ColorPicker--success": "var(--xmlui-borderRadius-ColorPicker--success)", "Input:borderColor-ColorPicker--success": "var(--xmlui-borderColor-ColorPicker--success)", "Input:borderWidth-ColorPicker--success": "var(--xmlui-borderWidth-ColorPicker--success)", "Input:borderStyle-ColorPicker--success": "var(--xmlui-borderStyle-ColorPicker--success)", "Input:boxShadow-ColorPicker--success": "var(--xmlui-boxShadow-ColorPicker--success)", "Input:borderColor-ColorPicker--success--hover": "var(--xmlui-borderColor-ColorPicker--success--hover)", "Input:boxShadow-ColorPicker--success--hover": "var(--xmlui-boxShadow-ColorPicker--success--hover)", "Input:borderColor-ColorPicker--success--focus": "var(--xmlui-borderColor-ColorPicker--success--focus)", "Input:boxShadow-ColorPicker--success--focus": "var(--xmlui-boxShadow-ColorPicker--success--focus)", "Input:backgroundColor-ColorPicker": "var(--xmlui-backgroundColor-ColorPicker)", "Input:width-ColorPicker": "var(--xmlui-width-ColorPicker)"}'`;
|
|
45024
|
+
const colorInput = "_colorInput_724av_14";
|
|
45025
|
+
const error$1 = "_error_724av_48";
|
|
45026
|
+
const warning$1 = "_warning_724av_63";
|
|
45027
|
+
const valid$1 = "_valid_724av_78";
|
|
44788
45028
|
const styles$h = {
|
|
44789
45029
|
themeVars: themeVars$5,
|
|
44790
45030
|
colorInput,
|
|
@@ -44873,7 +45113,6 @@ const ColorPicker = forwardRef(
|
|
|
44873
45113
|
...rest,
|
|
44874
45114
|
id,
|
|
44875
45115
|
className: classnames(className, styles$h.colorInput, {
|
|
44876
|
-
[styles$h.disabled]: !enabled2,
|
|
44877
45116
|
[styles$h.error]: validationStatus === "error",
|
|
44878
45117
|
[styles$h.warning]: validationStatus === "warning",
|
|
44879
45118
|
[styles$h.valid]: validationStatus === "valid"
|
|
@@ -44930,7 +45169,10 @@ const ColorPickerMd = createMetadata({
|
|
|
44930
45169
|
}
|
|
44931
45170
|
}
|
|
44932
45171
|
},
|
|
44933
|
-
themeVars: parseScssVar(styles$h.themeVars)
|
|
45172
|
+
themeVars: parseScssVar(styles$h.themeVars),
|
|
45173
|
+
defaultThemeVars: {
|
|
45174
|
+
[`width-${COMP$i}`]: "48px"
|
|
45175
|
+
}
|
|
44934
45176
|
});
|
|
44935
45177
|
const colorPickerComponentRenderer = createComponentRenderer(
|
|
44936
45178
|
"ColorPicker",
|
|
@@ -45986,7 +46228,6 @@ const areaChartComponentRenderer = createComponentRenderer(
|
|
|
45986
46228
|
MemoizedItem,
|
|
45987
46229
|
{
|
|
45988
46230
|
node: node.props.tooltipTemplate,
|
|
45989
|
-
item: tooltipData,
|
|
45990
46231
|
contextVars: {
|
|
45991
46232
|
$tooltip: tooltipData
|
|
45992
46233
|
},
|
|
@@ -46455,7 +46696,6 @@ const barChartComponentRenderer = createComponentRenderer(
|
|
|
46455
46696
|
MemoizedItem,
|
|
46456
46697
|
{
|
|
46457
46698
|
node: node.props.tooltipTemplate,
|
|
46458
|
-
item: tooltipData,
|
|
46459
46699
|
contextVars: {
|
|
46460
46700
|
$tooltip: tooltipData
|
|
46461
46701
|
},
|
|
@@ -47236,7 +47476,6 @@ const lineChartComponentRenderer = createComponentRenderer(
|
|
|
47236
47476
|
MemoizedItem,
|
|
47237
47477
|
{
|
|
47238
47478
|
node: node.props.tooltipTemplate,
|
|
47239
|
-
item: tooltipData,
|
|
47240
47479
|
contextVars: {
|
|
47241
47480
|
$tooltip: tooltipData
|
|
47242
47481
|
},
|
|
@@ -47537,7 +47776,6 @@ const radarChartComponentRenderer = createComponentRenderer(
|
|
|
47537
47776
|
MemoizedItem,
|
|
47538
47777
|
{
|
|
47539
47778
|
node: node.props.tooltipTemplate,
|
|
47540
|
-
item: tooltipData,
|
|
47541
47779
|
contextVars: {
|
|
47542
47780
|
$tooltip: tooltipData
|
|
47543
47781
|
},
|
|
@@ -47924,8 +48162,6 @@ const toastComponentRenderer = createComponentRenderer(
|
|
|
47924
48162
|
MemoizedItem,
|
|
47925
48163
|
{
|
|
47926
48164
|
node: template || node.children,
|
|
47927
|
-
itemKey: "$_TEMP",
|
|
47928
|
-
contextKey: "$_TEMP",
|
|
47929
48165
|
contextVars: {
|
|
47930
48166
|
$param: context
|
|
47931
48167
|
},
|
|
@@ -49501,7 +49737,7 @@ function IconProvider({ children }) {
|
|
|
49501
49737
|
/* @__PURE__ */ jsx("svg", { style: { display: "none" }, ref: spriteRootRef })
|
|
49502
49738
|
] });
|
|
49503
49739
|
}
|
|
49504
|
-
const version = "0.11.
|
|
49740
|
+
const version = "0.11.21";
|
|
49505
49741
|
const miscellaneousUtils = {
|
|
49506
49742
|
capitalize,
|
|
49507
49743
|
pluralize: pluralize$1,
|
|
@@ -52940,7 +53176,7 @@ const ComponentAdapter = forwardRef(function ComponentAdapter2({
|
|
|
52940
53176
|
memoedLookupEventHandler,
|
|
52941
53177
|
descriptor?.nonVisual || isApiBound || isCompoundComponent
|
|
52942
53178
|
);
|
|
52943
|
-
const { getResourceUrl } = useTheme();
|
|
53179
|
+
const { getResourceUrl, disableInlineStyle: themeDisableInlineStyle } = useTheme();
|
|
52944
53180
|
const extractResourceUrl = useCallback(
|
|
52945
53181
|
(url) => {
|
|
52946
53182
|
const extractedUrl = valueExtractor(url);
|
|
@@ -52958,10 +53194,14 @@ const ComponentAdapter = forwardRef(function ComponentAdapter2({
|
|
|
52958
53194
|
resolvedLayoutProps[key] = valueExtractor(safeNode.props[key], true);
|
|
52959
53195
|
}
|
|
52960
53196
|
});
|
|
52961
|
-
return resolveLayoutProps(
|
|
52962
|
-
|
|
52963
|
-
|
|
52964
|
-
|
|
53197
|
+
return resolveLayoutProps(
|
|
53198
|
+
resolvedLayoutProps,
|
|
53199
|
+
{
|
|
53200
|
+
...layoutContextRef?.current,
|
|
53201
|
+
mediaSize: appContext.mediaSize
|
|
53202
|
+
},
|
|
53203
|
+
themeDisableInlineStyle ?? appContext.appGlobals?.disableInlineStyle
|
|
53204
|
+
);
|
|
52965
53205
|
}, [appContext.mediaSize, layoutContextRef, safeNode.props, valueExtractor]);
|
|
52966
53206
|
const stableLayoutCss = useShallowCompareMemoize(cssProps);
|
|
52967
53207
|
const className = useComponentStyle(stableLayoutCss);
|
|
@@ -57141,7 +57381,7 @@ function ApiInterceptorProvider({
|
|
|
57141
57381
|
return;
|
|
57142
57382
|
}
|
|
57143
57383
|
void (async () => {
|
|
57144
|
-
const { initMock } = await import("./initMock-
|
|
57384
|
+
const { initMock } = await import("./initMock-D78LB-9A.js");
|
|
57145
57385
|
const apiInstance2 = await initMock(interceptor);
|
|
57146
57386
|
setApiInstance(apiInstance2);
|
|
57147
57387
|
setInitialized(true);
|
|
@@ -57158,7 +57398,7 @@ function ApiInterceptorProvider({
|
|
|
57158
57398
|
if (define_process_env_default.VITE_MOCK_ENABLED) {
|
|
57159
57399
|
const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
|
|
57160
57400
|
useWorker ? import("./apiInterceptorWorker-Wgm2_zjg.js") : Promise.resolve({ createApiInterceptorWorker: () => null }),
|
|
57161
|
-
import("./initMock-
|
|
57401
|
+
import("./initMock-D78LB-9A.js")
|
|
57162
57402
|
]);
|
|
57163
57403
|
if (interceptor || forceInitialize) {
|
|
57164
57404
|
const apiInstance2 = await initMock(interceptor || {});
|
|
@@ -57195,7 +57435,7 @@ function ApiInterceptorProvider({
|
|
|
57195
57435
|
void (async () => {
|
|
57196
57436
|
const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
|
|
57197
57437
|
import("./apiInterceptorWorker-Wgm2_zjg.js"),
|
|
57198
|
-
import("./initMock-
|
|
57438
|
+
import("./initMock-D78LB-9A.js")
|
|
57199
57439
|
]);
|
|
57200
57440
|
const apiInstance2 = await initMock(interceptor);
|
|
57201
57441
|
await createApiInterceptorWorker(apiInstance2, parentInterceptorWorker);
|
|
@@ -58994,7 +59234,7 @@ const Slider = forwardRef(
|
|
|
58994
59234
|
thumbsRef.current = thumbsRef.current.slice(0, displayValue.length);
|
|
58995
59235
|
}, [displayValue.length]);
|
|
58996
59236
|
return /* @__PURE__ */ jsx("div", { ...rest, ref, style: style2, className: classnames(styles$M.sliderContainer, className), "data-slider-container": true, children: /* @__PURE__ */ jsxs(
|
|
58997
|
-
Root$
|
|
59237
|
+
Root$2,
|
|
58998
59238
|
{
|
|
58999
59239
|
ref: inputRef,
|
|
59000
59240
|
minStepsBetweenThumbs,
|
|
@@ -59233,7 +59473,7 @@ const FormItem = memo(function FormItem2({
|
|
|
59233
59473
|
const initialValueFromSubject = useFormContextPart(
|
|
59234
59474
|
(value2) => getByPath(value2?.originalSubject, formItemId)
|
|
59235
59475
|
);
|
|
59236
|
-
const initialValue = initialValueFromSubject === void 0 ? initialValueFromProps : initialValueFromSubject;
|
|
59476
|
+
const initialValue = initialValueFromSubject === void 0 || initialValueFromSubject === null ? initialValueFromProps : initialValueFromSubject;
|
|
59237
59477
|
const value = useFormContextPart((value2) => getByPath(value2?.subject, formItemId));
|
|
59238
59478
|
const validationResult = useFormContextPart((value2) => value2?.validationResults[formItemId]);
|
|
59239
59479
|
const dispatch = useFormContextPart((value2) => value2?.dispatch);
|
|
@@ -59890,7 +60130,7 @@ const DataSourceMd = createMetadata({
|
|
|
59890
60130
|
valueType: "string"
|
|
59891
60131
|
},
|
|
59892
60132
|
errorNotificationMessage: {
|
|
59893
|
-
description: "
|
|
60133
|
+
description: "",
|
|
59894
60134
|
valueType: "string"
|
|
59895
60135
|
},
|
|
59896
60136
|
resultSelector: {
|