xmlui 0.11.20 → 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-BQKYtkKU.js → index-CkNqkb53.js} +856 -611
- package/dist/lib/index.css +1 -1
- package/dist/lib/{initMock-DoewYSkg.js → initMock-CP3zGYe3.js} +2 -2
- package/dist/lib/xmlui.js +1 -1
- package/dist/metadata/{collectedComponentMetadata-Ul5p46oY.js → collectedComponentMetadata-DTO7KlLw.js} +857 -612
- package/dist/metadata/{initMock-CYmQLPJo.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.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";
|
|
@@ -18,13 +18,14 @@ import { createContext as createContext$1, useContextSelector } from "use-contex
|
|
|
18
18
|
import { parseRegExpLiteral } from "@eslint-community/regexpp";
|
|
19
19
|
import memoizeOne from "memoize-one";
|
|
20
20
|
import { DayPicker } from "react-day-picker";
|
|
21
|
-
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";
|
|
22
22
|
import EmojiPicker, { EmojiStyle } from "emoji-picker-react";
|
|
23
23
|
import * as dropzone from "react-dropzone";
|
|
24
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";
|
|
25
26
|
import * as InnerRadioGroup from "@radix-ui/react-radio-group";
|
|
26
27
|
import TextareaAutosize from "react-textarea-autosize";
|
|
27
|
-
import { Root as Root$
|
|
28
|
+
import { Root as Root$2, Track, Range, Thumb } from "@radix-ui/react-slider";
|
|
28
29
|
import * as RadixTooltip from "@radix-ui/react-tooltip";
|
|
29
30
|
import ReactMarkdown from "react-markdown";
|
|
30
31
|
import remarkGfm from "remark-gfm";
|
|
@@ -39,7 +40,7 @@ import * as HoverCard from "@radix-ui/react-hover-card";
|
|
|
39
40
|
import { useSpring, useInView, animated } from "@react-spring/web";
|
|
40
41
|
import Papa from "papaparse";
|
|
41
42
|
import getUserLocale from "get-user-locale";
|
|
42
|
-
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";
|
|
43
44
|
import scrollIntoView from "scroll-into-view-if-needed";
|
|
44
45
|
import * as RAccordion from "@radix-ui/react-accordion";
|
|
45
46
|
import useEmblaCarousel from "embla-carousel-react";
|
|
@@ -465,19 +466,22 @@ function getElementRef(element) {
|
|
|
465
466
|
return element.props.ref || element.ref;
|
|
466
467
|
}
|
|
467
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)"}'`;
|
|
468
|
-
const container$3 = "
|
|
469
|
-
const top$1 = "
|
|
470
|
-
const end = "
|
|
471
|
-
const bottom$1 = "
|
|
472
|
-
const start = "
|
|
473
|
-
const shrinkToLabel = "
|
|
474
|
-
const inputLabel = "
|
|
475
|
-
const
|
|
476
|
-
const
|
|
477
|
-
const
|
|
478
|
-
const requiredMark = "
|
|
479
|
-
const itemWithLabel = "
|
|
480
|
-
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";
|
|
481
485
|
const styles$1l = {
|
|
482
486
|
themeVars: themeVars$13,
|
|
483
487
|
container: container$3,
|
|
@@ -487,12 +491,15 @@ const styles$1l = {
|
|
|
487
491
|
start,
|
|
488
492
|
shrinkToLabel,
|
|
489
493
|
inputLabel,
|
|
490
|
-
disabled: disabled$c,
|
|
491
494
|
labelBreak,
|
|
492
495
|
required,
|
|
496
|
+
disabled: disabled$c,
|
|
493
497
|
requiredMark,
|
|
494
498
|
itemWithLabel,
|
|
495
|
-
|
|
499
|
+
wrapper: wrapper$n,
|
|
500
|
+
validationResultWrapper,
|
|
501
|
+
helperTextContainer,
|
|
502
|
+
labelWrapper: labelWrapper$1
|
|
496
503
|
};
|
|
497
504
|
const themeVars$12 = `'{"size-Spinner": "var(--xmlui-size-Spinner)", "thickness-Spinner": "var(--xmlui-thickness-Spinner)", "borderColor-Spinner": "var(--xmlui-borderColor-Spinner)"}'`;
|
|
498
505
|
const fullScreenSpinnerWrapper = "_fullScreenSpinnerWrapper_b1pgc_50";
|
|
@@ -606,69 +613,72 @@ const ItemWithLabel = forwardRef(function ItemWithLabel2({
|
|
|
606
613
|
}, ref) {
|
|
607
614
|
const generatedId2 = useId();
|
|
608
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";
|
|
609
619
|
if (label2 === void 0 && !validationResult) {
|
|
610
|
-
return /* @__PURE__ */ jsx(Part, { partId: PART_LABELED_ITEM, children: /* @__PURE__ */ jsx(
|
|
611
|
-
Slot,
|
|
612
|
-
{
|
|
613
|
-
...rest,
|
|
614
|
-
style: style2,
|
|
615
|
-
className,
|
|
616
|
-
id: inputId,
|
|
617
|
-
ref,
|
|
618
|
-
children
|
|
619
|
-
}
|
|
620
|
-
) });
|
|
620
|
+
return /* @__PURE__ */ jsx(Part, { partId: PART_LABELED_ITEM, children: /* @__PURE__ */ jsx(Slot, { ...rest, style: style2, className, id: inputId, ref, children }) });
|
|
621
621
|
}
|
|
622
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
661
|
-
|
|
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: [
|
|
662
671
|
/* @__PURE__ */ jsx(Part, { partId: PART_LABELED_ITEM, children: cloneElement(children, {
|
|
663
672
|
id: !isInputTemplateUsed ? inputId : void 0,
|
|
664
673
|
style: void 0,
|
|
665
|
-
className: void 0
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
674
|
+
className: void 0,
|
|
675
|
+
ref: inputRef
|
|
676
|
+
}) }),
|
|
677
|
+
validationResult && /* @__PURE__ */ jsx("div", { className: styles$1l.validationResultWrapper, children: validationResult })
|
|
678
|
+
] })
|
|
679
|
+
]
|
|
680
|
+
}
|
|
681
|
+
) });
|
|
672
682
|
});
|
|
673
683
|
function createMetadata(metadata) {
|
|
674
684
|
return metadata;
|
|
@@ -3239,20 +3249,16 @@ class EngineError extends Error {
|
|
|
3239
3249
|
}
|
|
3240
3250
|
class GenericBackendError extends EngineError {
|
|
3241
3251
|
constructor(info2, errorCode) {
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
} else if (info2?.message) {
|
|
3250
|
-
message += `${info2.message}`;
|
|
3251
|
-
}
|
|
3252
|
-
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);
|
|
3253
3259
|
this.info = info2;
|
|
3254
3260
|
this.errorCategory = "GenericBackendError";
|
|
3255
|
-
this.details =
|
|
3261
|
+
this.details = details;
|
|
3256
3262
|
this.statusCode = errorCode;
|
|
3257
3263
|
Object.setPrototypeOf(this, GenericBackendError.prototype);
|
|
3258
3264
|
}
|
|
@@ -3292,6 +3298,13 @@ class ThrowStatementError extends EngineError {
|
|
|
3292
3298
|
Object.setPrototypeOf(this, ThrowStatementError.prototype);
|
|
3293
3299
|
}
|
|
3294
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
|
+
}
|
|
3295
3308
|
function useContentAlignment(orientation, horizontal2, vertical2) {
|
|
3296
3309
|
return useMemo(() => {
|
|
3297
3310
|
return orientation === "horizontal" ? {
|
|
@@ -5892,7 +5905,7 @@ const RootThemeDefinition = {
|
|
|
5892
5905
|
"backgroundColor-tree-row--selected--before": $colorPrimary50,
|
|
5893
5906
|
// --- Border colors
|
|
5894
5907
|
borderColor: "rgb(from $color-surface-900 r g b / 0.1)",
|
|
5895
|
-
"borderColor--disabled": $
|
|
5908
|
+
"borderColor--disabled": $colorSurface200,
|
|
5896
5909
|
// --- Text colors
|
|
5897
5910
|
"textColor-secondary": $colorSurface600,
|
|
5898
5911
|
// --- Input is an abstract component, so we define its default theme variables here
|
|
@@ -22298,47 +22311,48 @@ function useLongPress(elementRef, action2, delay2 = 500) {
|
|
|
22298
22311
|
}, [elementRef, action2, delay2]);
|
|
22299
22312
|
}
|
|
22300
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)"}'`;
|
|
22301
|
-
const selectTrigger = "
|
|
22302
|
-
const error$8 = "
|
|
22303
|
-
const warning$9 = "
|
|
22304
|
-
const valid$8 = "
|
|
22305
|
-
const disabled$7 = "
|
|
22306
|
-
const placeholder = "
|
|
22307
|
-
const actions$1 = "
|
|
22308
|
-
const action$1 = "
|
|
22309
|
-
const emptyList = "
|
|
22310
|
-
const badgeListContainer = "
|
|
22311
|
-
const badgeList$1 = "
|
|
22312
|
-
const inputWrapper$1 = "
|
|
22313
|
-
const badge$1 = "
|
|
22314
|
-
const selectContent = "
|
|
22315
|
-
const command$1 = "
|
|
22316
|
-
const commandInputContainer = "
|
|
22317
|
-
const commandInput$1 = "
|
|
22318
|
-
const commandList$1 = "
|
|
22319
|
-
const
|
|
22320
|
-
const
|
|
22321
|
-
const
|
|
22322
|
-
const
|
|
22323
|
-
const
|
|
22324
|
-
const
|
|
22325
|
-
const
|
|
22326
|
-
const
|
|
22327
|
-
const
|
|
22328
|
-
const
|
|
22329
|
-
const
|
|
22330
|
-
const
|
|
22331
|
-
const
|
|
22332
|
-
const
|
|
22333
|
-
const
|
|
22334
|
-
const
|
|
22335
|
-
const
|
|
22336
|
-
const
|
|
22337
|
-
const
|
|
22338
|
-
const
|
|
22339
|
-
const
|
|
22340
|
-
const
|
|
22341
|
-
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";
|
|
22342
22356
|
const styles$Q = {
|
|
22343
22357
|
themeVars: themeVars$B,
|
|
22344
22358
|
selectTrigger,
|
|
@@ -22359,6 +22373,7 @@ const styles$Q = {
|
|
|
22359
22373
|
commandInputContainer,
|
|
22360
22374
|
commandInput: commandInput$1,
|
|
22361
22375
|
commandList: commandList$1,
|
|
22376
|
+
groupHeader,
|
|
22362
22377
|
multiSelectOption,
|
|
22363
22378
|
multiSelectOptionContent,
|
|
22364
22379
|
highlighted: highlighted$1,
|
|
@@ -22391,8 +22406,11 @@ const SelectContext = createContext({
|
|
|
22391
22406
|
},
|
|
22392
22407
|
setSelectedIndex: (index) => {
|
|
22393
22408
|
},
|
|
22394
|
-
|
|
22395
|
-
|
|
22409
|
+
optionRenderer: void 0,
|
|
22410
|
+
onOptionAdd: () => {
|
|
22411
|
+
},
|
|
22412
|
+
onOptionRemove: () => {
|
|
22413
|
+
}
|
|
22396
22414
|
});
|
|
22397
22415
|
function useSelect() {
|
|
22398
22416
|
return useContext(SelectContext);
|
|
@@ -22417,22 +22435,235 @@ function useOption() {
|
|
|
22417
22435
|
return useContext(OptionContext);
|
|
22418
22436
|
}
|
|
22419
22437
|
function HiddenOption(option) {
|
|
22420
|
-
const {
|
|
22421
|
-
const
|
|
22422
|
-
|
|
22423
|
-
|
|
22424
|
-
|
|
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 = {
|
|
22425
22446
|
...option,
|
|
22426
|
-
label:
|
|
22427
|
-
keywords: option.keywords || [label2 ?? node?.textContent ?? ""]
|
|
22428
|
-
// Store the rendered ReactNode for dropdown display
|
|
22447
|
+
label: option.label || textNode || option.value
|
|
22429
22448
|
};
|
|
22430
|
-
}, [option, node, label2]);
|
|
22431
|
-
useEffect(() => {
|
|
22432
22449
|
onOptionAdd(opt);
|
|
22433
|
-
|
|
22434
|
-
|
|
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
|
+
);
|
|
22435
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
|
+
);
|
|
22436
22667
|
const PART_LIST_WRAPPER$1 = "listWrapper";
|
|
22437
22668
|
const PART_CLEAR_BUTTON$1 = "clearButton";
|
|
22438
22669
|
const defaultProps$M = {
|
|
@@ -22449,24 +22680,20 @@ const defaultProps$M = {
|
|
|
22449
22680
|
clearable: false
|
|
22450
22681
|
};
|
|
22451
22682
|
const SelectTriggerValue = ({
|
|
22452
|
-
value,
|
|
22453
22683
|
placeholder: placeholder2,
|
|
22454
22684
|
readOnly: readOnly2,
|
|
22455
22685
|
multiSelect,
|
|
22456
|
-
|
|
22686
|
+
selectedOptions,
|
|
22457
22687
|
valueRenderer,
|
|
22458
22688
|
toggleOption
|
|
22459
22689
|
}) => {
|
|
22460
|
-
if (
|
|
22461
|
-
if (
|
|
22462
|
-
return /* @__PURE__ */ jsx("div", { className: styles$Q.badgeListContainer, children: /* @__PURE__ */ jsx("div", { className: styles$Q.badgeList, children:
|
|
22463
|
-
(
|
|
22464
|
-
|
|
22465
|
-
|
|
22466
|
-
|
|
22467
|
-
}
|
|
22468
|
-
) : /* @__PURE__ */ jsxs("span", { className: styles$Q.badge, children: [
|
|
22469
|
-
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,
|
|
22470
22697
|
/* @__PURE__ */ jsx(
|
|
22471
22698
|
Icon$l,
|
|
22472
22699
|
{
|
|
@@ -22474,20 +22701,17 @@ const SelectTriggerValue = ({
|
|
|
22474
22701
|
size: "sm",
|
|
22475
22702
|
onClick: (event) => {
|
|
22476
22703
|
event.stopPropagation();
|
|
22477
|
-
toggleOption(
|
|
22704
|
+
if (!readOnly2) toggleOption(option.value);
|
|
22478
22705
|
}
|
|
22479
22706
|
}
|
|
22480
22707
|
)
|
|
22481
|
-
] },
|
|
22708
|
+
] }, option.value)
|
|
22482
22709
|
) }) });
|
|
22710
|
+
} else {
|
|
22711
|
+
return /* @__PURE__ */ jsx("div", { className: styles$Q.selectValue, children: selectedOptions[0]?.label });
|
|
22483
22712
|
}
|
|
22484
|
-
return /* @__PURE__ */ jsx("span", { placeholder: placeholder2, className: styles$Q.placeholder, children: placeholder2 });
|
|
22485
|
-
}
|
|
22486
|
-
if (value !== void 0 && value !== null && value !== "") {
|
|
22487
|
-
const selectedOption = Array.from(options2).find((o) => o.value === value);
|
|
22488
|
-
return /* @__PURE__ */ jsx("div", { className: styles$Q.selectValue, children: selectedOption?.label });
|
|
22489
22713
|
}
|
|
22490
|
-
return /* @__PURE__ */ jsx("
|
|
22714
|
+
return /* @__PURE__ */ jsx("span", { placeholder: placeholder2, className: styles$Q.placeholder, children: placeholder2 });
|
|
22491
22715
|
};
|
|
22492
22716
|
const SelectTriggerActions = ({
|
|
22493
22717
|
value,
|
|
@@ -22500,10 +22724,9 @@ const SelectTriggerActions = ({
|
|
|
22500
22724
|
}) => {
|
|
22501
22725
|
const hasValue = multiSelect ? Array.isArray(value) && value.length > 0 : value !== void 0 && value !== null && value !== "";
|
|
22502
22726
|
return /* @__PURE__ */ jsxs("div", { className: styles$Q.actions, children: [
|
|
22503
|
-
hasValue && enabled2 && !readOnly2 && clearable && /* @__PURE__ */ jsx(
|
|
22727
|
+
hasValue && enabled2 && !readOnly2 && clearable && /* @__PURE__ */ jsx(Part, { partId: PART_CLEAR_BUTTON$1, children: /* @__PURE__ */ jsx(
|
|
22504
22728
|
"span",
|
|
22505
22729
|
{
|
|
22506
|
-
"data-part-id": PART_CLEAR_BUTTON$1,
|
|
22507
22730
|
className: styles$Q.action,
|
|
22508
22731
|
onClick: (event) => {
|
|
22509
22732
|
event.stopPropagation();
|
|
@@ -22511,8 +22734,15 @@ const SelectTriggerActions = ({
|
|
|
22511
22734
|
},
|
|
22512
22735
|
children: /* @__PURE__ */ jsx(Icon$l, { name: "close" })
|
|
22513
22736
|
}
|
|
22514
|
-
),
|
|
22515
|
-
showChevron && /* @__PURE__ */ jsx(
|
|
22737
|
+
) }),
|
|
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
|
+
)
|
|
22516
22746
|
] });
|
|
22517
22747
|
};
|
|
22518
22748
|
const Select = forwardRef(function Select2({
|
|
@@ -22545,6 +22775,10 @@ const Select = forwardRef(function Select2({
|
|
|
22545
22775
|
// Progress state
|
|
22546
22776
|
inProgress = defaultProps$M.inProgress,
|
|
22547
22777
|
inProgressNotificationMessage = defaultProps$M.inProgressNotificationMessage,
|
|
22778
|
+
// Grouping
|
|
22779
|
+
groupBy: groupBy2,
|
|
22780
|
+
groupHeaderRenderer,
|
|
22781
|
+
ungroupedHeaderRenderer,
|
|
22548
22782
|
// Internal
|
|
22549
22783
|
updateState = noop$1,
|
|
22550
22784
|
registerComponentApi,
|
|
@@ -22557,9 +22791,17 @@ const Select = forwardRef(function Select2({
|
|
|
22557
22791
|
const [width, setWidth] = useState(0);
|
|
22558
22792
|
const observer = useRef();
|
|
22559
22793
|
const { root: root2 } = useTheme();
|
|
22560
|
-
const [options2, setOptions] = useState(
|
|
22794
|
+
const [options2, setOptions] = useState([]);
|
|
22561
22795
|
const [searchTerm, setSearchTerm] = useState("");
|
|
22562
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;
|
|
22563
22805
|
const filteredOptions = useMemo(() => {
|
|
22564
22806
|
if (!searchTerm || searchTerm.trim() === "") {
|
|
22565
22807
|
return Array.from(options2);
|
|
@@ -22570,6 +22812,34 @@ const Select = forwardRef(function Select2({
|
|
|
22570
22812
|
return extendedValue.toLowerCase().includes(searchLower);
|
|
22571
22813
|
});
|
|
22572
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]);
|
|
22573
22843
|
useEffect(() => {
|
|
22574
22844
|
if (!open) {
|
|
22575
22845
|
setSelectedIndex(-1);
|
|
@@ -22583,25 +22853,30 @@ const Select = forwardRef(function Select2({
|
|
|
22583
22853
|
}, [initialValue, updateState]);
|
|
22584
22854
|
useEffect(() => {
|
|
22585
22855
|
const current = referenceElement;
|
|
22586
|
-
observer.current
|
|
22856
|
+
const currentObserver = observer.current;
|
|
22857
|
+
currentObserver?.disconnect();
|
|
22587
22858
|
if (current) {
|
|
22588
|
-
|
|
22589
|
-
observer.current
|
|
22859
|
+
const newObserver = new ResizeObserver(() => setWidth(current.clientWidth));
|
|
22860
|
+
observer.current = newObserver;
|
|
22861
|
+
newObserver.observe(current);
|
|
22862
|
+
return () => {
|
|
22863
|
+
newObserver.disconnect();
|
|
22864
|
+
};
|
|
22590
22865
|
}
|
|
22591
22866
|
return () => {
|
|
22592
|
-
|
|
22867
|
+
currentObserver?.disconnect();
|
|
22593
22868
|
};
|
|
22594
22869
|
}, [referenceElement]);
|
|
22595
22870
|
const toggleOption = useCallback(
|
|
22596
22871
|
(selectedValue) => {
|
|
22597
|
-
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;
|
|
22598
22873
|
updateState({ value: newSelectedValue });
|
|
22599
22874
|
onDidChange(newSelectedValue);
|
|
22600
22875
|
if (!multiSelect) {
|
|
22601
22876
|
setOpen(false);
|
|
22602
22877
|
}
|
|
22603
22878
|
},
|
|
22604
|
-
[multiSelect,
|
|
22879
|
+
[multiSelect, currentValue, updateState, onDidChange]
|
|
22605
22880
|
);
|
|
22606
22881
|
const clearValue = useCallback(() => {
|
|
22607
22882
|
const newValue = multiSelect ? [] : "";
|
|
@@ -22610,45 +22885,48 @@ const Select = forwardRef(function Select2({
|
|
|
22610
22885
|
}, [multiSelect, updateState, onDidChange]);
|
|
22611
22886
|
const findNextEnabledIndex = useCallback(
|
|
22612
22887
|
(currentIndex) => {
|
|
22613
|
-
|
|
22614
|
-
|
|
22615
|
-
|
|
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];
|
|
22616
22892
|
if (item2 && item2.enabled !== false) {
|
|
22617
22893
|
return i;
|
|
22618
22894
|
}
|
|
22619
22895
|
}
|
|
22620
22896
|
for (let i = 0; i <= currentIndex; i++) {
|
|
22621
|
-
const item2 =
|
|
22897
|
+
const item2 = optionsList[i];
|
|
22622
22898
|
if (item2 && item2.enabled !== false) {
|
|
22623
22899
|
return i;
|
|
22624
22900
|
}
|
|
22625
22901
|
}
|
|
22626
22902
|
return -1;
|
|
22627
22903
|
},
|
|
22628
|
-
[filteredOptions]
|
|
22904
|
+
[filteredOptions, flattenedGroupedOptions]
|
|
22629
22905
|
);
|
|
22630
22906
|
const findPreviousEnabledIndex = useCallback(
|
|
22631
22907
|
(currentIndex) => {
|
|
22632
|
-
|
|
22908
|
+
const optionsList = flattenedGroupedOptions ? flattenedGroupedOptions : filteredOptions;
|
|
22909
|
+
if (optionsList.length === 0) return -1;
|
|
22633
22910
|
for (let i = currentIndex - 1; i >= 0; i--) {
|
|
22634
|
-
const item2 =
|
|
22911
|
+
const item2 = optionsList[i];
|
|
22635
22912
|
if (item2 && item2.enabled !== false) {
|
|
22636
22913
|
return i;
|
|
22637
22914
|
}
|
|
22638
22915
|
}
|
|
22639
|
-
for (let i =
|
|
22640
|
-
const item2 =
|
|
22916
|
+
for (let i = optionsList.length - 1; i >= currentIndex; i--) {
|
|
22917
|
+
const item2 = optionsList[i];
|
|
22641
22918
|
if (item2 && item2.enabled !== false) {
|
|
22642
22919
|
return i;
|
|
22643
22920
|
}
|
|
22644
22921
|
}
|
|
22645
22922
|
return -1;
|
|
22646
22923
|
},
|
|
22647
|
-
[filteredOptions]
|
|
22924
|
+
[filteredOptions, flattenedGroupedOptions]
|
|
22648
22925
|
);
|
|
22649
22926
|
const handleKeyDown = useCallback(
|
|
22650
22927
|
(event) => {
|
|
22651
22928
|
if (!open) return;
|
|
22929
|
+
const optionsList = flattenedGroupedOptions ? flattenedGroupedOptions : filteredOptions;
|
|
22652
22930
|
switch (event.key) {
|
|
22653
22931
|
case "ArrowDown":
|
|
22654
22932
|
event.preventDefault();
|
|
@@ -22666,8 +22944,8 @@ const Select = forwardRef(function Select2({
|
|
|
22666
22944
|
break;
|
|
22667
22945
|
case "Enter":
|
|
22668
22946
|
event.preventDefault();
|
|
22669
|
-
if (selectedIndex >= 0 && selectedIndex <
|
|
22670
|
-
const selectedItem =
|
|
22947
|
+
if (selectedIndex >= 0 && selectedIndex < optionsList.length) {
|
|
22948
|
+
const selectedItem = optionsList[selectedIndex];
|
|
22671
22949
|
if (selectedItem && selectedItem.enabled !== false) {
|
|
22672
22950
|
toggleOption(selectedItem.value);
|
|
22673
22951
|
if (!multiSelect) {
|
|
@@ -22686,6 +22964,7 @@ const Select = forwardRef(function Select2({
|
|
|
22686
22964
|
open,
|
|
22687
22965
|
selectedIndex,
|
|
22688
22966
|
filteredOptions,
|
|
22967
|
+
flattenedGroupedOptions,
|
|
22689
22968
|
toggleOption,
|
|
22690
22969
|
multiSelect,
|
|
22691
22970
|
findNextEnabledIndex,
|
|
@@ -22721,249 +23000,225 @@ const Select = forwardRef(function Select2({
|
|
|
22721
23000
|
[emptyListTemplate]
|
|
22722
23001
|
);
|
|
22723
23002
|
const onOptionAdd = useCallback((option) => {
|
|
22724
|
-
setOptions((prev) =>
|
|
22725
|
-
const exists = Array.from(prev).some((opt) => opt.value === option.value);
|
|
22726
|
-
if (exists) {
|
|
22727
|
-
return prev;
|
|
22728
|
-
}
|
|
22729
|
-
const newSet = new Set(prev);
|
|
22730
|
-
newSet.add(option);
|
|
22731
|
-
return newSet;
|
|
22732
|
-
});
|
|
23003
|
+
setOptions((prev) => [...prev, option]);
|
|
22733
23004
|
}, []);
|
|
22734
23005
|
const onOptionRemove = useCallback((option) => {
|
|
22735
|
-
setOptions((prev) =>
|
|
22736
|
-
const optionsSet = new Set(prev);
|
|
22737
|
-
optionsSet.delete(option);
|
|
22738
|
-
return optionsSet;
|
|
22739
|
-
});
|
|
23006
|
+
setOptions((prev) => prev.filter((opt) => opt.value !== option.value));
|
|
22740
23007
|
}, []);
|
|
22741
|
-
const optionContextValue = useMemo(
|
|
22742
|
-
() => ({
|
|
22743
|
-
onOptionAdd,
|
|
22744
|
-
onOptionRemove
|
|
22745
|
-
}),
|
|
22746
|
-
[onOptionAdd, onOptionRemove]
|
|
22747
|
-
);
|
|
22748
23008
|
const selectContextValue = useMemo(
|
|
22749
23009
|
() => ({
|
|
22750
23010
|
multiSelect,
|
|
22751
23011
|
readOnly: readOnly2,
|
|
22752
|
-
value,
|
|
23012
|
+
value: currentValue,
|
|
22753
23013
|
onChange: toggleOption,
|
|
22754
23014
|
setOpen,
|
|
22755
23015
|
setSelectedIndex,
|
|
22756
|
-
options: options2,
|
|
22757
23016
|
highlightedValue: selectedIndex >= 0 && selectedIndex < filteredOptions.length && filteredOptions[selectedIndex] ? filteredOptions[selectedIndex].value : void 0,
|
|
22758
23017
|
optionRenderer
|
|
22759
23018
|
}),
|
|
22760
23019
|
[
|
|
22761
23020
|
multiSelect,
|
|
22762
23021
|
readOnly2,
|
|
22763
|
-
|
|
23022
|
+
currentValue,
|
|
22764
23023
|
toggleOption,
|
|
22765
|
-
options2,
|
|
22766
23024
|
selectedIndex,
|
|
22767
23025
|
filteredOptions,
|
|
22768
23026
|
optionRenderer
|
|
22769
23027
|
]
|
|
22770
23028
|
);
|
|
23029
|
+
const optionContextValue = useMemo(
|
|
23030
|
+
() => ({
|
|
23031
|
+
onOptionAdd,
|
|
23032
|
+
onOptionRemove
|
|
23033
|
+
}),
|
|
23034
|
+
[onOptionAdd, onOptionRemove]
|
|
23035
|
+
);
|
|
23036
|
+
const useSimpleSelect = !searchable && !multiSelect;
|
|
22771
23037
|
return /* @__PURE__ */ jsx(SelectContext.Provider, { value: selectContextValue, children: /* @__PURE__ */ jsxs(OptionContext.Provider, { value: optionContextValue, children: [
|
|
22772
|
-
|
|
22773
|
-
|
|
22774
|
-
|
|
22775
|
-
|
|
22776
|
-
|
|
22777
|
-
|
|
22778
|
-
|
|
22779
|
-
|
|
22780
|
-
|
|
22781
|
-
|
|
22782
|
-
|
|
22783
|
-
|
|
22784
|
-
|
|
22785
|
-
|
|
22786
|
-
|
|
22787
|
-
|
|
22788
|
-
|
|
22789
|
-
|
|
22790
|
-
|
|
22791
|
-
|
|
22792
|
-
|
|
22793
|
-
|
|
22794
|
-
|
|
22795
|
-
|
|
22796
|
-
|
|
22797
|
-
|
|
22798
|
-
|
|
22799
|
-
|
|
22800
|
-
|
|
22801
|
-
|
|
22802
|
-
|
|
22803
|
-
|
|
22804
|
-
|
|
22805
|
-
|
|
22806
|
-
|
|
22807
|
-
|
|
22808
|
-
|
|
22809
|
-
|
|
22810
|
-
|
|
22811
|
-
|
|
22812
|
-
|
|
22813
|
-
|
|
22814
|
-
|
|
22815
|
-
|
|
22816
|
-
|
|
22817
|
-
|
|
22818
|
-
|
|
22819
|
-
|
|
22820
|
-
|
|
22821
|
-
|
|
22822
|
-
|
|
22823
|
-
|
|
22824
|
-
|
|
22825
|
-
|
|
22826
|
-
|
|
22827
|
-
|
|
22828
|
-
|
|
22829
|
-
|
|
22830
|
-
|
|
22831
|
-
|
|
22832
|
-
|
|
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;
|
|
22833
23114
|
}
|
|
22834
|
-
|
|
22835
|
-
|
|
22836
|
-
SelectTriggerActions,
|
|
22837
|
-
{
|
|
22838
|
-
value,
|
|
22839
|
-
multiSelect,
|
|
22840
|
-
enabled: enabled2,
|
|
22841
|
-
readOnly: readOnly2,
|
|
22842
|
-
clearable,
|
|
22843
|
-
clearValue
|
|
23115
|
+
if (open) {
|
|
23116
|
+
handleKeyDown(event);
|
|
22844
23117
|
}
|
|
22845
|
-
|
|
22846
|
-
|
|
22847
|
-
|
|
22848
|
-
),
|
|
22849
|
-
open && /* @__PURE__ */ jsx(Portal, { container: root2, children: /* @__PURE__ */ jsx(
|
|
22850
|
-
PopoverContent,
|
|
22851
|
-
{
|
|
22852
|
-
style: { minWidth: width, height: dropdownHeight },
|
|
22853
|
-
className: classnames(styles$Q.selectContent, styles$Q[validationStatus]),
|
|
22854
|
-
onKeyDown: handleKeyDown,
|
|
22855
|
-
children: /* @__PURE__ */ jsxs("div", { className: styles$Q.command, children: [
|
|
22856
|
-
searchable ? /* @__PURE__ */ jsxs("div", { className: styles$Q.commandInputContainer, children: [
|
|
22857
|
-
/* @__PURE__ */ jsx(Icon$l, { name: "search" }),
|
|
23118
|
+
},
|
|
23119
|
+
autoFocus,
|
|
23120
|
+
children: [
|
|
22858
23121
|
/* @__PURE__ */ jsx(
|
|
22859
|
-
|
|
23122
|
+
SelectTriggerValue,
|
|
22860
23123
|
{
|
|
22861
|
-
|
|
22862
|
-
|
|
22863
|
-
|
|
22864
|
-
|
|
22865
|
-
|
|
23124
|
+
readOnly: readOnly2,
|
|
23125
|
+
placeholder: placeholder2,
|
|
23126
|
+
multiSelect,
|
|
23127
|
+
selectedOptions,
|
|
23128
|
+
valueRenderer,
|
|
23129
|
+
toggleOption
|
|
22866
23130
|
}
|
|
22867
|
-
)
|
|
22868
|
-
|
|
22869
|
-
|
|
22870
|
-
// When searching, show only filtered options
|
|
22871
|
-
filteredOptions.length === 0 ? /* @__PURE__ */ jsx("div", { children: emptyListNode }) : filteredOptions.map(({ value: value2, label: label2, enabled: enabled22, keywords }, index) => /* @__PURE__ */ jsx(
|
|
22872
|
-
SelectOptionItem,
|
|
23131
|
+
),
|
|
23132
|
+
/* @__PURE__ */ jsx(
|
|
23133
|
+
SelectTriggerActions,
|
|
22873
23134
|
{
|
|
23135
|
+
value: currentValue,
|
|
23136
|
+
multiSelect,
|
|
23137
|
+
enabled: enabled2,
|
|
22874
23138
|
readOnly: readOnly2,
|
|
22875
|
-
|
|
22876
|
-
|
|
22877
|
-
|
|
22878
|
-
|
|
22879
|
-
|
|
22880
|
-
|
|
22881
|
-
|
|
22882
|
-
|
|
22883
|
-
|
|
22884
|
-
|
|
22885
|
-
|
|
22886
|
-
|
|
22887
|
-
|
|
22888
|
-
|
|
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
|
|
22889
23211
|
] })
|
|
22890
|
-
|
|
22891
|
-
|
|
22892
|
-
}
|
|
22893
|
-
|
|
22894
|
-
|
|
22895
|
-
}
|
|
22896
|
-
)
|
|
22897
|
-
|
|
23212
|
+
] })
|
|
23213
|
+
}
|
|
23214
|
+
) })
|
|
23215
|
+
]
|
|
23216
|
+
}
|
|
23217
|
+
) })
|
|
23218
|
+
),
|
|
23219
|
+
/* @__PURE__ */ jsx("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx(OptionTypeProvider, { Component: HiddenOption, children }) })
|
|
22898
23220
|
] }) });
|
|
22899
23221
|
});
|
|
22900
|
-
function VisibleSelectOption(option) {
|
|
22901
|
-
const { value, label: label2, enabled: enabled2 = true, children } = option;
|
|
22902
|
-
const { onOptionAdd } = useOption();
|
|
22903
|
-
const {
|
|
22904
|
-
value: selectedValue,
|
|
22905
|
-
onChange,
|
|
22906
|
-
multiSelect,
|
|
22907
|
-
readOnly: readOnly2,
|
|
22908
|
-
setOpen,
|
|
22909
|
-
highlightedValue,
|
|
22910
|
-
optionRenderer
|
|
22911
|
-
} = useSelect();
|
|
22912
|
-
const optionRef = useRef(null);
|
|
22913
|
-
const opt = useMemo(() => {
|
|
22914
|
-
return {
|
|
22915
|
-
...option,
|
|
22916
|
-
label: label2 ?? "",
|
|
22917
|
-
keywords: option.keywords || [label2 ?? ""]
|
|
22918
|
-
};
|
|
22919
|
-
}, [option, label2]);
|
|
22920
|
-
useEffect(() => {
|
|
22921
|
-
onOptionAdd(opt);
|
|
22922
|
-
}, [opt, onOptionAdd]);
|
|
22923
|
-
const selected2 = useMemo(() => {
|
|
22924
|
-
return Array.isArray(selectedValue) && multiSelect ? selectedValue.map((v) => String(v)).includes(value) : String(selectedValue) === String(value);
|
|
22925
|
-
}, [selectedValue, value, multiSelect]);
|
|
22926
|
-
const isHighlighted = useMemo(() => {
|
|
22927
|
-
return highlightedValue !== void 0 && String(highlightedValue) === String(value);
|
|
22928
|
-
}, [highlightedValue, value]);
|
|
22929
|
-
useEffect(() => {
|
|
22930
|
-
if (isHighlighted && optionRef.current) {
|
|
22931
|
-
optionRef.current.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
22932
|
-
}
|
|
22933
|
-
}, [isHighlighted]);
|
|
22934
|
-
const handleClick = () => {
|
|
22935
|
-
if (readOnly2) {
|
|
22936
|
-
setOpen(false);
|
|
22937
|
-
return;
|
|
22938
|
-
}
|
|
22939
|
-
if (enabled2) {
|
|
22940
|
-
onChange(value);
|
|
22941
|
-
}
|
|
22942
|
-
};
|
|
22943
|
-
return /* @__PURE__ */ jsx(
|
|
22944
|
-
"div",
|
|
22945
|
-
{
|
|
22946
|
-
ref: optionRef,
|
|
22947
|
-
role: "option",
|
|
22948
|
-
"aria-disabled": !enabled2,
|
|
22949
|
-
"aria-selected": selected2,
|
|
22950
|
-
className: classnames(styles$Q.multiSelectOption, {
|
|
22951
|
-
[styles$Q.disabledOption]: !enabled2,
|
|
22952
|
-
[styles$Q.highlighted]: isHighlighted
|
|
22953
|
-
}),
|
|
22954
|
-
onMouseDown: (e) => {
|
|
22955
|
-
e.preventDefault();
|
|
22956
|
-
e.stopPropagation();
|
|
22957
|
-
},
|
|
22958
|
-
onClick: handleClick,
|
|
22959
|
-
"data-state": selected2 ? "checked" : void 0,
|
|
22960
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$Q.multiSelectOptionContent, children: optionRenderer ? optionRenderer({ label: label2, value, enabled: enabled2 }, selectedValue, false) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22961
|
-
children || label2,
|
|
22962
|
-
selected2 && /* @__PURE__ */ jsx(Icon$l, { name: "checkmark" })
|
|
22963
|
-
] }) })
|
|
22964
|
-
}
|
|
22965
|
-
);
|
|
22966
|
-
}
|
|
22967
23222
|
function SelectOptionItem(option) {
|
|
22968
23223
|
const {
|
|
22969
23224
|
value,
|
|
@@ -23029,19 +23284,19 @@ function SelectOptionItem(option) {
|
|
|
23029
23284
|
}
|
|
23030
23285
|
);
|
|
23031
23286
|
}
|
|
23032
|
-
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:
|
|
23033
|
-
const radioGroupContainer = "
|
|
23034
|
-
const radioOptionContainer = "
|
|
23035
|
-
const radioOption = "
|
|
23036
|
-
const checked = "
|
|
23037
|
-
const error$7 = "
|
|
23038
|
-
const warning$8 = "
|
|
23039
|
-
const valid$7 = "
|
|
23040
|
-
const indicator$2 = "
|
|
23041
|
-
const disabled$6 = "
|
|
23042
|
-
const itemContainer$1 = "
|
|
23043
|
-
const optionLabel = "
|
|
23044
|
-
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";
|
|
23045
23300
|
const styles$P = {
|
|
23046
23301
|
themeVars: themeVars$A,
|
|
23047
23302
|
radioGroupContainer,
|
|
@@ -23164,7 +23419,9 @@ const RadioGroup = forwardRef(function RadioGroup2({
|
|
|
23164
23419
|
}, [autofocus]);
|
|
23165
23420
|
useCallback(() => {
|
|
23166
23421
|
if (radioGroupRef.current) {
|
|
23167
|
-
const selectedRadio = radioGroupRef.current.querySelector(
|
|
23422
|
+
const selectedRadio = radioGroupRef.current.querySelector(
|
|
23423
|
+
'[role="radio"][aria-checked="true"]'
|
|
23424
|
+
);
|
|
23168
23425
|
if (selectedRadio) {
|
|
23169
23426
|
selectedRadio.focus();
|
|
23170
23427
|
return;
|
|
@@ -23260,8 +23517,20 @@ const RadioGroupOption = ({
|
|
|
23260
23517
|
}),
|
|
23261
23518
|
[enabled2, radioGroupContext, value]
|
|
23262
23519
|
);
|
|
23263
|
-
const item2 = useMemo(
|
|
23264
|
-
()
|
|
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: [
|
|
23265
23534
|
/* @__PURE__ */ jsx(
|
|
23266
23535
|
UnwrappedRadioItem,
|
|
23267
23536
|
{
|
|
@@ -23273,16 +23542,15 @@ const RadioGroupOption = ({
|
|
|
23273
23542
|
}
|
|
23274
23543
|
),
|
|
23275
23544
|
/* @__PURE__ */ jsx("label", { htmlFor: id, className: classnames(styles$P.label, statusStyles), children: label2 ?? value })
|
|
23276
|
-
] })
|
|
23277
|
-
|
|
23278
|
-
);
|
|
23545
|
+
] });
|
|
23546
|
+
}, [enabled2, id, label2, optionRenderer, statusStyles, value, radioGroupContext]);
|
|
23279
23547
|
return /* @__PURE__ */ jsx(
|
|
23280
23548
|
"div",
|
|
23281
23549
|
{
|
|
23282
23550
|
className: classnames(styles$P.radioOptionContainer, className),
|
|
23283
23551
|
style: style2,
|
|
23284
23552
|
"data-radio-item": true,
|
|
23285
|
-
children: !!optionRenderer ? /* @__PURE__ */ jsxs("label", { className: styles$P.optionLabel, children: [
|
|
23553
|
+
children: !!optionRenderer ? /* @__PURE__ */ jsxs("label", { htmlFor: id, className: styles$P.optionLabel, children: [
|
|
23286
23554
|
/* @__PURE__ */ jsx("div", { className: styles$P.itemContainer, children: item2 }),
|
|
23287
23555
|
optionRenderer({
|
|
23288
23556
|
$checked: value === radioGroupContext.value,
|
|
@@ -23567,24 +23835,24 @@ const TextArea = forwardRef(function TextArea2({
|
|
|
23567
23835
|
return /* @__PURE__ */ jsx(Part, { partId: PART_INPUT, children: /* @__PURE__ */ jsx("textarea", { ...textareaProps, rows, className: classnames(classes) }) });
|
|
23568
23836
|
});
|
|
23569
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)"}'`;
|
|
23570
|
-
const command = "
|
|
23571
|
-
const badgeListWrapper = "
|
|
23572
|
-
const error$5 = "
|
|
23573
|
-
const warning$6 = "
|
|
23574
|
-
const valid$5 = "
|
|
23575
|
-
const disabled$5 = "
|
|
23576
|
-
const focused$2 = "
|
|
23577
|
-
const badgeList = "
|
|
23578
|
-
const inputWrapper = "
|
|
23579
|
-
const badge = "
|
|
23580
|
-
const commandInput = "
|
|
23581
|
-
const actions = "
|
|
23582
|
-
const action = "
|
|
23583
|
-
const autoCompleteEmpty = "
|
|
23584
|
-
const commandList = "
|
|
23585
|
-
const autoCompleteOption = "
|
|
23586
|
-
const highlighted = "
|
|
23587
|
-
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";
|
|
23588
23856
|
const styles$N = {
|
|
23589
23857
|
themeVars: themeVars$y,
|
|
23590
23858
|
command,
|
|
@@ -23602,7 +23870,7 @@ const styles$N = {
|
|
|
23602
23870
|
action,
|
|
23603
23871
|
autoCompleteEmpty,
|
|
23604
23872
|
commandList,
|
|
23605
|
-
"fade-in": "_fade-
|
|
23873
|
+
"fade-in": "_fade-in_57zg7_1",
|
|
23606
23874
|
autoCompleteOption,
|
|
23607
23875
|
highlighted,
|
|
23608
23876
|
disabledOption
|
|
@@ -23613,7 +23881,7 @@ const AutoCompleteContext = createContext({
|
|
|
23613
23881
|
},
|
|
23614
23882
|
inputValue: "",
|
|
23615
23883
|
searchTerm: "",
|
|
23616
|
-
options:
|
|
23884
|
+
options: [],
|
|
23617
23885
|
open: false,
|
|
23618
23886
|
setOpen: (open) => {
|
|
23619
23887
|
},
|
|
@@ -23628,7 +23896,7 @@ function useAutoComplete() {
|
|
|
23628
23896
|
const PART_LIST_WRAPPER = "listWrapper";
|
|
23629
23897
|
function isOptionsExist(options2, newOptions) {
|
|
23630
23898
|
return newOptions.some(
|
|
23631
|
-
(option) =>
|
|
23899
|
+
(option) => options2.some((o) => o.value === option.value || o.label === option.label)
|
|
23632
23900
|
);
|
|
23633
23901
|
}
|
|
23634
23902
|
const defaultProps$H = {
|
|
@@ -23677,7 +23945,7 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23677
23945
|
const [referenceElement, setReferenceElement] = useState(null);
|
|
23678
23946
|
const inputRef = useRef(null);
|
|
23679
23947
|
const [open, setOpen] = useState(initiallyOpen);
|
|
23680
|
-
const [options2, setOptions] = useState(
|
|
23948
|
+
const [options2, setOptions] = useState([]);
|
|
23681
23949
|
const [inputValue, setInputValue] = useState("");
|
|
23682
23950
|
const { root: root2 } = useTheme();
|
|
23683
23951
|
const [width, setWidth] = useState(0);
|
|
@@ -23687,17 +23955,17 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23687
23955
|
const [selectedIndex, setSelectedIndex] = useState(-1);
|
|
23688
23956
|
const filteredOptions = useMemo(() => {
|
|
23689
23957
|
if (!searchTerm || searchTerm.trim() === "") {
|
|
23690
|
-
return
|
|
23958
|
+
return options2;
|
|
23691
23959
|
}
|
|
23692
23960
|
const searchLower = searchTerm.toLowerCase();
|
|
23693
|
-
return
|
|
23961
|
+
return options2.filter((option) => {
|
|
23694
23962
|
const extendedValue = option.value + " " + option.label + " " + (option.keywords || []).join(" ");
|
|
23695
23963
|
return extendedValue.toLowerCase().includes(searchLower);
|
|
23696
23964
|
});
|
|
23697
23965
|
}, [options2, searchTerm]);
|
|
23698
23966
|
const shouldShowCreatable = useMemo(() => {
|
|
23699
23967
|
if (!creatable || !searchTerm || searchTerm.trim() === "") return false;
|
|
23700
|
-
const searchTermExists =
|
|
23968
|
+
const searchTermExists = options2.some(
|
|
23701
23969
|
(option) => option.value === searchTerm || option.label === searchTerm
|
|
23702
23970
|
);
|
|
23703
23971
|
if (searchTermExists) return false;
|
|
@@ -23722,17 +23990,16 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23722
23990
|
};
|
|
23723
23991
|
}, [referenceElement]);
|
|
23724
23992
|
const selectedValue = useMemo(() => {
|
|
23725
|
-
const optionsArray = Array.from(options2);
|
|
23726
23993
|
if (Array.isArray(value)) {
|
|
23727
23994
|
if (value.length === 0) return [];
|
|
23728
|
-
return
|
|
23995
|
+
return options2.filter((o) => value.includes(`${o.value}`));
|
|
23729
23996
|
}
|
|
23730
|
-
return
|
|
23997
|
+
return options2.find((o) => `${o.value}` === `${value}`);
|
|
23731
23998
|
}, [value, options2]);
|
|
23732
23999
|
const toggleOption = useCallback(
|
|
23733
24000
|
(selectedItem) => {
|
|
23734
24001
|
if (selectedItem === "") return;
|
|
23735
|
-
const option =
|
|
24002
|
+
const option = options2.find((opt) => opt.value === selectedItem);
|
|
23736
24003
|
if (option && option.enabled === false) return;
|
|
23737
24004
|
const newSelectedValue = multi ? Array.isArray(value) ? value.includes(selectedItem) ? value.filter((v) => v !== selectedItem) : [...value, selectedItem] : [selectedItem] : selectedItem === value ? null : selectedItem;
|
|
23738
24005
|
updateState({ value: newSelectedValue });
|
|
@@ -23753,7 +24020,7 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23753
24020
|
setInputValue(selectedValue?.label || "");
|
|
23754
24021
|
setSearchTerm("");
|
|
23755
24022
|
}
|
|
23756
|
-
}, [
|
|
24023
|
+
}, [selectedValue]);
|
|
23757
24024
|
const clearValue = useCallback(() => {
|
|
23758
24025
|
const newValue = multi ? [] : "";
|
|
23759
24026
|
setInputValue("");
|
|
@@ -23761,22 +24028,10 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23761
24028
|
onDidChange(newValue);
|
|
23762
24029
|
}, [multi, updateState, onDidChange]);
|
|
23763
24030
|
const onOptionAdd = useCallback((option) => {
|
|
23764
|
-
setOptions((prev) =>
|
|
23765
|
-
const newSet = new Set(prev);
|
|
23766
|
-
const existing = Array.from(prev).find((opt) => opt.value === option.value);
|
|
23767
|
-
if (existing) {
|
|
23768
|
-
newSet.delete(existing);
|
|
23769
|
-
}
|
|
23770
|
-
newSet.add(option);
|
|
23771
|
-
return newSet;
|
|
23772
|
-
});
|
|
24031
|
+
setOptions((prev) => [...prev, option]);
|
|
23773
24032
|
}, []);
|
|
23774
24033
|
const onOptionRemove = useCallback((option) => {
|
|
23775
|
-
setOptions((prev) =>
|
|
23776
|
-
const optionsSet = new Set(prev);
|
|
23777
|
-
optionsSet.delete(option);
|
|
23778
|
-
return optionsSet;
|
|
23779
|
-
});
|
|
24034
|
+
setOptions((prev) => prev.filter((opt) => opt.value !== option.value));
|
|
23780
24035
|
}, []);
|
|
23781
24036
|
const allItems = useMemo(() => {
|
|
23782
24037
|
const items = [];
|
|
@@ -23961,7 +24216,7 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23961
24216
|
{
|
|
23962
24217
|
open,
|
|
23963
24218
|
onOpenChange: (isOpen) => {
|
|
23964
|
-
if (readOnly2) return;
|
|
24219
|
+
if (readOnly2 || !enabled2) return;
|
|
23965
24220
|
setOpen(isOpen);
|
|
23966
24221
|
if (!isOpen) {
|
|
23967
24222
|
setSelectedIndex(-1);
|
|
@@ -23985,7 +24240,7 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23985
24240
|
),
|
|
23986
24241
|
"aria-expanded": open,
|
|
23987
24242
|
onClick: (event) => {
|
|
23988
|
-
if (readOnly2) return;
|
|
24243
|
+
if (readOnly2 || !enabled2) return;
|
|
23989
24244
|
if (multi && open) {
|
|
23990
24245
|
return;
|
|
23991
24246
|
}
|
|
@@ -24073,9 +24328,10 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
24073
24328
|
/* @__PURE__ */ jsx(
|
|
24074
24329
|
"span",
|
|
24075
24330
|
{
|
|
24076
|
-
className: styles$N.action,
|
|
24331
|
+
className: classnames(styles$N.action, { [styles$N.disabled]: !enabled2 || readOnly2 }),
|
|
24332
|
+
"aria-disabled": !enabled2 || readOnly2,
|
|
24077
24333
|
onClick: () => {
|
|
24078
|
-
if (readOnly2) return;
|
|
24334
|
+
if (readOnly2 || !enabled2) return;
|
|
24079
24335
|
setOpen(!open);
|
|
24080
24336
|
inputRef.current?.focus();
|
|
24081
24337
|
},
|
|
@@ -24087,62 +24343,45 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
24087
24343
|
]
|
|
24088
24344
|
}
|
|
24089
24345
|
) }) }),
|
|
24090
|
-
|
|
24346
|
+
/* @__PURE__ */ jsx(Portal$1, { container: root2, children: /* @__PURE__ */ jsx(
|
|
24091
24347
|
PopoverContent,
|
|
24092
24348
|
{
|
|
24093
24349
|
style: { width, height: dropdownHeight },
|
|
24094
24350
|
className: styles$N.popoverContent,
|
|
24095
24351
|
align: "start",
|
|
24096
24352
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
24097
|
-
children: /* @__PURE__ */ jsx(
|
|
24098
|
-
|
|
24099
|
-
|
|
24100
|
-
|
|
24101
|
-
|
|
24102
|
-
|
|
24103
|
-
|
|
24104
|
-
|
|
24105
|
-
|
|
24106
|
-
|
|
24107
|
-
|
|
24108
|
-
|
|
24109
|
-
|
|
24110
|
-
|
|
24111
|
-
|
|
24112
|
-
|
|
24113
|
-
|
|
24114
|
-
|
|
24115
|
-
|
|
24116
|
-
|
|
24117
|
-
|
|
24118
|
-
|
|
24119
|
-
|
|
24120
|
-
|
|
24121
|
-
|
|
24122
|
-
|
|
24123
|
-
readOnly: readOnly2,
|
|
24124
|
-
isHighlighted: selectedIndex === itemIndex,
|
|
24125
|
-
itemIndex
|
|
24126
|
-
},
|
|
24127
|
-
value2
|
|
24128
|
-
);
|
|
24129
|
-
}) })
|
|
24130
|
-
] })
|
|
24131
|
-
) : (
|
|
24132
|
-
// When not searching, show all children directly (includes Options and other components like Button)
|
|
24133
|
-
/* @__PURE__ */ jsx(OptionTypeProvider, { Component: VisibleAutoCompleteOption, children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24134
|
-
children,
|
|
24135
|
-
options2.size === 0 && /* @__PURE__ */ jsx("div", { children: emptyListNode })
|
|
24136
|
-
] }) })
|
|
24137
|
-
)
|
|
24138
|
-
}
|
|
24139
|
-
)
|
|
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 }) })
|
|
24140
24379
|
}
|
|
24141
24380
|
) })
|
|
24142
24381
|
]
|
|
24143
24382
|
}
|
|
24144
24383
|
),
|
|
24145
|
-
|
|
24384
|
+
/* @__PURE__ */ jsx("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx(OptionTypeProvider, { Component: HiddenOption, children }) })
|
|
24146
24385
|
] }) });
|
|
24147
24386
|
});
|
|
24148
24387
|
function CreatableItem({ onNewItem, isHighlighted = false }) {
|
|
@@ -24186,65 +24425,6 @@ function CreatableItem({ onNewItem, isHighlighted = false }) {
|
|
|
24186
24425
|
}
|
|
24187
24426
|
return /* @__PURE__ */ jsx("span", { style: { display: "none" } });
|
|
24188
24427
|
}
|
|
24189
|
-
function VisibleAutoCompleteOption(option) {
|
|
24190
|
-
const { value, label: label2, enabled: enabled2 = true, children } = option;
|
|
24191
|
-
const { onOptionAdd } = useOption();
|
|
24192
|
-
const {
|
|
24193
|
-
value: selectedValue,
|
|
24194
|
-
onChange,
|
|
24195
|
-
multi,
|
|
24196
|
-
setOpen,
|
|
24197
|
-
readOnly: readOnly2,
|
|
24198
|
-
// Use readOnly from AutoComplete context value
|
|
24199
|
-
optionRenderer
|
|
24200
|
-
} = useAutoComplete();
|
|
24201
|
-
const opt = useMemo(() => {
|
|
24202
|
-
return {
|
|
24203
|
-
...option,
|
|
24204
|
-
label: label2 ?? "",
|
|
24205
|
-
keywords: option.keywords || [label2 ?? ""]
|
|
24206
|
-
};
|
|
24207
|
-
}, [option, label2]);
|
|
24208
|
-
useEffect(() => {
|
|
24209
|
-
onOptionAdd(opt);
|
|
24210
|
-
}, [opt, onOptionAdd]);
|
|
24211
|
-
const selected2 = multi ? selectedValue?.includes(value) : selectedValue === value;
|
|
24212
|
-
const handleClick = () => {
|
|
24213
|
-
if (readOnly2) {
|
|
24214
|
-
setOpen(false);
|
|
24215
|
-
return;
|
|
24216
|
-
}
|
|
24217
|
-
if (enabled2) {
|
|
24218
|
-
onChange(value);
|
|
24219
|
-
if (!multi) {
|
|
24220
|
-
setOpen(false);
|
|
24221
|
-
}
|
|
24222
|
-
}
|
|
24223
|
-
};
|
|
24224
|
-
return /* @__PURE__ */ jsx(
|
|
24225
|
-
"div",
|
|
24226
|
-
{
|
|
24227
|
-
role: "option",
|
|
24228
|
-
"aria-disabled": !enabled2,
|
|
24229
|
-
"aria-selected": selected2,
|
|
24230
|
-
className: classnames(styles$N.autoCompleteOption, {
|
|
24231
|
-
[styles$N.disabledOption]: !enabled2
|
|
24232
|
-
}),
|
|
24233
|
-
onMouseDown: (e) => {
|
|
24234
|
-
e.preventDefault();
|
|
24235
|
-
e.stopPropagation();
|
|
24236
|
-
},
|
|
24237
|
-
onClick: handleClick,
|
|
24238
|
-
children: children ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24239
|
-
/* @__PURE__ */ jsx("div", { className: styles$N.autoCompleteOptionContent, children }),
|
|
24240
|
-
selected2 && /* @__PURE__ */ jsx(Icon$l, { name: "checkmark" })
|
|
24241
|
-
] }) : optionRenderer ? optionRenderer({ label: label2, value, enabled: enabled2 }, selectedValue, false) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24242
|
-
/* @__PURE__ */ jsx("div", { className: styles$N.autoCompleteOptionContent, children: label2 }),
|
|
24243
|
-
selected2 && /* @__PURE__ */ jsx(Icon$l, { name: "checkmark" })
|
|
24244
|
-
] })
|
|
24245
|
-
}
|
|
24246
|
-
);
|
|
24247
|
-
}
|
|
24248
24428
|
function AutoCompleteOption(option) {
|
|
24249
24429
|
const {
|
|
24250
24430
|
value,
|
|
@@ -28651,6 +28831,7 @@ function useRowSelection({
|
|
|
28651
28831
|
rowsSelectable,
|
|
28652
28832
|
enableMultiRowSelection,
|
|
28653
28833
|
rowDisabledPredicate,
|
|
28834
|
+
rowUnselectablePredicate,
|
|
28654
28835
|
onSelectionDidChange,
|
|
28655
28836
|
initiallySelected = EMPTY_ARRAY,
|
|
28656
28837
|
syncWithAppState
|
|
@@ -28906,7 +29087,7 @@ function useRowSelection({
|
|
|
28906
29087
|
return;
|
|
28907
29088
|
}
|
|
28908
29089
|
setSelectedRowIds(
|
|
28909
|
-
checked2 ? items.filter((item2) =>
|
|
29090
|
+
checked2 ? items.filter((item2) => !(rowDisabledPredicate?.(item2) || rowUnselectablePredicate?.(item2))).map((item2) => item2[idKey]) : []
|
|
28910
29091
|
);
|
|
28911
29092
|
});
|
|
28912
29093
|
const selectedRowIdMap = useMemo(() => {
|
|
@@ -29359,6 +29540,9 @@ const CheckboxToleranceValues = ["none", "compact", "comfortable", "spacious"];
|
|
|
29359
29540
|
function defaultIsRowDisabled(_) {
|
|
29360
29541
|
return false;
|
|
29361
29542
|
}
|
|
29543
|
+
function defaultIsRowUnselectable(_) {
|
|
29544
|
+
return false;
|
|
29545
|
+
}
|
|
29362
29546
|
const SELECT_COLUMN_WIDTH = 42;
|
|
29363
29547
|
const DEFAULT_PAGE_SIZES = [10];
|
|
29364
29548
|
const getCheckboxTolerancePixels = (tolerance) => {
|
|
@@ -29418,6 +29602,7 @@ const Table = forwardRef(
|
|
|
29418
29602
|
pageSize = pageSizeOptions?.[0] || DEFAULT_PAGE_SIZES[0],
|
|
29419
29603
|
currentPageIndex = 0,
|
|
29420
29604
|
rowDisabledPredicate = defaultIsRowDisabled,
|
|
29605
|
+
rowUnselectablePredicate = defaultIsRowUnselectable,
|
|
29421
29606
|
sortBy: sortBy2,
|
|
29422
29607
|
sortingDirection = defaultProps$C.sortingDirection,
|
|
29423
29608
|
iconSortAsc,
|
|
@@ -29486,6 +29671,7 @@ const Table = forwardRef(
|
|
|
29486
29671
|
rowsSelectable,
|
|
29487
29672
|
enableMultiRowSelection,
|
|
29488
29673
|
rowDisabledPredicate,
|
|
29674
|
+
rowUnselectablePredicate,
|
|
29489
29675
|
onSelectionDidChange,
|
|
29490
29676
|
initiallySelected,
|
|
29491
29677
|
syncWithAppState
|
|
@@ -29610,14 +29796,16 @@ const Table = forwardRef(
|
|
|
29610
29796
|
indeterminate: table22.getIsSomeRowsSelected(),
|
|
29611
29797
|
forceHover: headerCheckboxHovered,
|
|
29612
29798
|
onDidChange: () => {
|
|
29613
|
-
const allSelected2 = table22.getRowModel().rows.every(
|
|
29799
|
+
const allSelected2 = table22.getRowModel().rows.every(
|
|
29800
|
+
(row2) => rowDisabledPredicate(row2.original) || rowUnselectablePredicate(row2.original) || row2.getIsSelected()
|
|
29801
|
+
);
|
|
29614
29802
|
checkAllRows(!allSelected2);
|
|
29615
29803
|
}
|
|
29616
29804
|
}
|
|
29617
29805
|
}
|
|
29618
29806
|
) : null,
|
|
29619
29807
|
cell: ({ row: row2 }) => {
|
|
29620
|
-
return /* @__PURE__ */ jsx(
|
|
29808
|
+
return /* @__PURE__ */ jsx(Fragment, { children: row2.getCanSelect() && /* @__PURE__ */ jsx(
|
|
29621
29809
|
Toggle,
|
|
29622
29810
|
{
|
|
29623
29811
|
...{
|
|
@@ -29636,7 +29824,7 @@ const Table = forwardRef(
|
|
|
29636
29824
|
}
|
|
29637
29825
|
}
|
|
29638
29826
|
}
|
|
29639
|
-
);
|
|
29827
|
+
) });
|
|
29640
29828
|
}
|
|
29641
29829
|
};
|
|
29642
29830
|
return rowsSelectable ? [selectColumn, ...columnsWithCustomCell] : columnsWithCustomCell;
|
|
@@ -29648,6 +29836,7 @@ const Table = forwardRef(
|
|
|
29648
29836
|
checkAllRows,
|
|
29649
29837
|
toggleRow,
|
|
29650
29838
|
rowDisabledPredicate,
|
|
29839
|
+
rowUnselectablePredicate,
|
|
29651
29840
|
hoveredRowId,
|
|
29652
29841
|
headerCheckboxHovered
|
|
29653
29842
|
]);
|
|
@@ -29692,12 +29881,18 @@ const Table = forwardRef(
|
|
|
29692
29881
|
right: right2
|
|
29693
29882
|
};
|
|
29694
29883
|
}, [columnsWithSelectColumn]);
|
|
29884
|
+
const enableRowSelectionFn = useCallback(
|
|
29885
|
+
(row2) => {
|
|
29886
|
+
return rowsSelectable && !rowUnselectablePredicate(row2.original);
|
|
29887
|
+
},
|
|
29888
|
+
[rowUnselectablePredicate, rowsSelectable]
|
|
29889
|
+
);
|
|
29695
29890
|
const table2 = useReactTable({
|
|
29696
29891
|
columns: columnsWithSelectColumn,
|
|
29697
29892
|
data: sortedData,
|
|
29698
29893
|
getCoreRowModel: getCoreRowModel(),
|
|
29699
29894
|
getPaginationRowModel: isPaginated ? getPaginationRowModel() : void 0,
|
|
29700
|
-
enableRowSelection:
|
|
29895
|
+
enableRowSelection: enableRowSelectionFn,
|
|
29701
29896
|
enableMultiRowSelection,
|
|
29702
29897
|
columnResizeMode: "onChange",
|
|
29703
29898
|
getRowId: useCallback(
|
|
@@ -29847,7 +30042,7 @@ const Table = forwardRef(
|
|
|
29847
30042
|
event.preventDefault();
|
|
29848
30043
|
event.stopPropagation();
|
|
29849
30044
|
const allSelected2 = table2.getRowModel().rows.every(
|
|
29850
|
-
(row2) => rowDisabledPredicate(row2.original) || row2.getIsSelected()
|
|
30045
|
+
(row2) => rowDisabledPredicate(row2.original) || rowUnselectablePredicate(row2.original) || row2.getIsSelected()
|
|
29851
30046
|
);
|
|
29852
30047
|
checkAllRows(!allSelected2);
|
|
29853
30048
|
}
|
|
@@ -30002,6 +30197,9 @@ const Table = forwardRef(
|
|
|
30002
30197
|
rowVirtualizer.measureElement(el);
|
|
30003
30198
|
},
|
|
30004
30199
|
onClick: (event) => {
|
|
30200
|
+
if (!row2.getCanSelect()) {
|
|
30201
|
+
return;
|
|
30202
|
+
}
|
|
30005
30203
|
if (event?.defaultPrevented) {
|
|
30006
30204
|
return;
|
|
30007
30205
|
}
|
|
@@ -30225,6 +30423,9 @@ const TableMd = createMetadata({
|
|
|
30225
30423
|
rowDisabledPredicate: d(
|
|
30226
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.`
|
|
30227
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
|
+
},
|
|
30228
30429
|
noDataTemplate: dComponent(
|
|
30229
30430
|
`A property to customize what to display if the table does not contain any data.`
|
|
30230
30431
|
),
|
|
@@ -30446,6 +30647,7 @@ const TableWithColumns = memo(
|
|
|
30446
30647
|
isPaginated: extractValue.asOptionalBoolean(node.props?.isPaginated),
|
|
30447
30648
|
headerHeight: extractValue.asSize(node.props.headerHeight),
|
|
30448
30649
|
rowDisabledPredicate: lookupSyncCallback(node.props.rowDisabledPredicate),
|
|
30650
|
+
rowUnselectablePredicate: lookupSyncCallback(node.props.rowUnselectablePredicate),
|
|
30449
30651
|
sortBy: extractValue(node.props?.sortBy),
|
|
30450
30652
|
sortingDirection: extractValue(node.props?.sortDirection),
|
|
30451
30653
|
iconSortAsc: extractValue.asOptionalString(node.props?.iconSortAsc),
|
|
@@ -33229,7 +33431,6 @@ class RestApiProxy {
|
|
|
33229
33431
|
body: requestBody
|
|
33230
33432
|
};
|
|
33231
33433
|
if (onUploadProgress) {
|
|
33232
|
-
console.log("Falling back to axios. Reason: onUploadProgress specified");
|
|
33233
33434
|
const axios = (await import("axios")).default;
|
|
33234
33435
|
try {
|
|
33235
33436
|
const response = await axios.request({
|
|
@@ -35017,7 +35218,8 @@ const RadioGroupMd = createMetadata({
|
|
|
35017
35218
|
[`backgroundColor-checked-${RGOption}`]: "$color-primary-500",
|
|
35018
35219
|
[`backgroundColor-checked-${RGOption}--disabled`]: `$textColor--disabled`,
|
|
35019
35220
|
[`fontSize-${RGOption}`]: "$fontSize-sm",
|
|
35020
|
-
[`fontWeight-${RGOption}`]: "$fontWeight-bold"
|
|
35221
|
+
[`fontWeight-${RGOption}`]: "$fontWeight-bold",
|
|
35222
|
+
[`textColor-${RGOption}--disabled`]: "$textColor--disabled"
|
|
35021
35223
|
}
|
|
35022
35224
|
});
|
|
35023
35225
|
const radioGroupRenderer = createComponentRenderer(
|
|
@@ -35219,6 +35421,18 @@ const SelectMd = createMetadata({
|
|
|
35219
35421
|
isInternal: true,
|
|
35220
35422
|
description: "internal radix modal prop",
|
|
35221
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"
|
|
35222
35436
|
}
|
|
35223
35437
|
},
|
|
35224
35438
|
events: {
|
|
@@ -35249,7 +35463,8 @@ const SelectMd = createMetadata({
|
|
|
35249
35463
|
},
|
|
35250
35464
|
contextVars: {
|
|
35251
35465
|
$item: d("Represents the current option's data (label and value properties)"),
|
|
35252
|
-
$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)")
|
|
35253
35468
|
},
|
|
35254
35469
|
themeVars: parseScssVar(styles$Q.themeVars),
|
|
35255
35470
|
defaultThemeVars: {
|
|
@@ -35267,17 +35482,15 @@ const SelectMd = createMetadata({
|
|
|
35267
35482
|
[`paddingVertical-item-${COMP$F}`]: "$space-2",
|
|
35268
35483
|
[`paddingHorizontal-${COMP$F}`]: "$space-2",
|
|
35269
35484
|
[`paddingVertical-${COMP$F}`]: "$space-2",
|
|
35270
|
-
[`opacity-text-item-${COMP$F}--disabled`]: "0.5",
|
|
35271
|
-
[`opacity-${COMP$F}--disabled`]: "0.5",
|
|
35272
35485
|
[`backgroundColor-${COMP$F}-badge--hover`]: "$color-primary-400",
|
|
35273
35486
|
[`backgroundColor-${COMP$F}-badge--active`]: "$color-primary-500",
|
|
35274
|
-
[`textColor-item-${COMP$F}--disabled`]: "$color-surface-
|
|
35487
|
+
[`textColor-item-${COMP$F}--disabled`]: "$color-surface-300",
|
|
35275
35488
|
[`textColor-${COMP$F}-badge`]: "$const-color-surface-50",
|
|
35276
35489
|
[`backgroundColor-item-${COMP$F}`]: "$backgroundColor-dropdown-item",
|
|
35277
35490
|
[`backgroundColor-item-${COMP$F}--hover`]: "$backgroundColor-dropdown-item--hover",
|
|
35278
35491
|
[`backgroundColor-item-${COMP$F}--active`]: "$backgroundColor-dropdown-item--active",
|
|
35279
|
-
|
|
35280
|
-
[`
|
|
35492
|
+
[`borderColor-${COMP$F}--disabled`]: "$borderColor--disabled",
|
|
35493
|
+
[`textColor-${COMP$F}--disabled`]: "$textColor--disabled",
|
|
35281
35494
|
[`minHeight-${COMP$F}`]: "$space-7",
|
|
35282
35495
|
[`minHeight-item-${COMP$F}`]: "$space-7"
|
|
35283
35496
|
}
|
|
@@ -35293,7 +35506,8 @@ const selectComponentRenderer = createComponentRenderer(
|
|
|
35293
35506
|
renderChild: renderChild2,
|
|
35294
35507
|
lookupEventHandler,
|
|
35295
35508
|
className,
|
|
35296
|
-
registerComponentApi
|
|
35509
|
+
registerComponentApi,
|
|
35510
|
+
...rest
|
|
35297
35511
|
}) => {
|
|
35298
35512
|
const multiSelect = extractValue.asOptionalBoolean(node.props.multiSelect);
|
|
35299
35513
|
const searchable = extractValue.asOptionalBoolean(node.props.searchable);
|
|
@@ -35326,6 +35540,29 @@ const selectComponentRenderer = createComponentRenderer(
|
|
|
35326
35540
|
dropdownHeight: extractValue(node.props.dropdownHeight),
|
|
35327
35541
|
required: extractValue.asOptionalBoolean(node.props.required),
|
|
35328
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,
|
|
35329
35566
|
valueRenderer: node.props.valueTemplate ? (item2, removeItem) => {
|
|
35330
35567
|
return /* @__PURE__ */ jsx(
|
|
35331
35568
|
MemoizedItem,
|
|
@@ -36212,7 +36449,7 @@ async function callApi({ state, appContext, lookupAction, getCurrentState, apiIn
|
|
|
36212
36449
|
});
|
|
36213
36450
|
const result = await onErrorFn?.(e, stateContext["$param"]);
|
|
36214
36451
|
const errorMessage = extractParam(
|
|
36215
|
-
{ ...stateContext, $error: e },
|
|
36452
|
+
{ ...stateContext, $error: createContextVariableError(e) },
|
|
36216
36453
|
errorNotificationMessage,
|
|
36217
36454
|
appContext
|
|
36218
36455
|
);
|
|
@@ -37663,7 +37900,7 @@ function DataLoader({
|
|
|
37663
37900
|
async (error22) => {
|
|
37664
37901
|
loaderError2(error22);
|
|
37665
37902
|
if (onError) {
|
|
37666
|
-
const result = await onError(error22);
|
|
37903
|
+
const result = await onError(createContextVariableError(error22));
|
|
37667
37904
|
if (result === false) {
|
|
37668
37905
|
if (loadingToastIdRef.current) {
|
|
37669
37906
|
toast.dismiss(loadingToastIdRef.current);
|
|
@@ -37674,7 +37911,7 @@ function DataLoader({
|
|
|
37674
37911
|
const errorMessage = extractParam(
|
|
37675
37912
|
{
|
|
37676
37913
|
...stateRef.current.state,
|
|
37677
|
-
$error: error22
|
|
37914
|
+
$error: createContextVariableError(error22)
|
|
37678
37915
|
},
|
|
37679
37916
|
loader.props.errorNotificationMessage,
|
|
37680
37917
|
stateRef.current.appContext
|
|
@@ -40633,7 +40870,7 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
40633
40870
|
className: classnames(className, styles$p.tabs, styles$p.accordionView),
|
|
40634
40871
|
style: style2,
|
|
40635
40872
|
children: /* @__PURE__ */ jsx(
|
|
40636
|
-
Root,
|
|
40873
|
+
Root$1,
|
|
40637
40874
|
{
|
|
40638
40875
|
value: `${currentTab}`,
|
|
40639
40876
|
onValueChange: (tab) => {
|
|
@@ -40649,7 +40886,7 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
40649
40886
|
className: styles$p.accordionRoot,
|
|
40650
40887
|
children: /* @__PURE__ */ jsxs("div", { className: styles$p.accordionInterleaved, children: [
|
|
40651
40888
|
/* @__PURE__ */ jsx(List, { className: styles$p.accordionList, children: tabItems.map((tab, index) => /* @__PURE__ */ jsx(
|
|
40652
|
-
Trigger,
|
|
40889
|
+
Trigger$1,
|
|
40653
40890
|
{
|
|
40654
40891
|
value: tab.innerId,
|
|
40655
40892
|
asChild: true,
|
|
@@ -40684,7 +40921,7 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
40684
40921
|
) });
|
|
40685
40922
|
}
|
|
40686
40923
|
return /* @__PURE__ */ jsx(TabContext.Provider, { value: tabContextValue, children: /* @__PURE__ */ jsxs(
|
|
40687
|
-
Root,
|
|
40924
|
+
Root$1,
|
|
40688
40925
|
{
|
|
40689
40926
|
...rest,
|
|
40690
40927
|
id: tabsId,
|
|
@@ -40716,7 +40953,7 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
40716
40953
|
children: [
|
|
40717
40954
|
!distributeEvenly2 && !headerRenderer && tabAlignment === "end" && /* @__PURE__ */ jsx("div", { className: styles$p.filler, "data-orientation": orientation }),
|
|
40718
40955
|
!distributeEvenly2 && !headerRenderer && tabAlignment === "center" && /* @__PURE__ */ jsx("div", { className: styles$p.filler, "data-orientation": orientation }),
|
|
40719
|
-
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(
|
|
40720
40957
|
"div",
|
|
40721
40958
|
{
|
|
40722
40959
|
role: "tab",
|
|
@@ -41310,7 +41547,7 @@ const TabItemComponent = forwardRef(function TabItemComponent2({ children, label
|
|
|
41310
41547
|
const tabIndex = tabItems?.findIndex((item2) => item2.innerId === innerId) ?? 0;
|
|
41311
41548
|
const contentOrder = tabIndex * 2 + 1;
|
|
41312
41549
|
return /* @__PURE__ */ createElement(
|
|
41313
|
-
Content,
|
|
41550
|
+
Content$1,
|
|
41314
41551
|
{
|
|
41315
41552
|
...rest,
|
|
41316
41553
|
key: innerId,
|
|
@@ -42453,7 +42690,7 @@ const APICallMd = createMetadata({
|
|
|
42453
42690
|
valueType: "string"
|
|
42454
42691
|
},
|
|
42455
42692
|
errorNotificationMessage: {
|
|
42456
|
-
description: "
|
|
42693
|
+
description: "",
|
|
42457
42694
|
valueType: "string"
|
|
42458
42695
|
},
|
|
42459
42696
|
completedNotificationMessage: {
|
|
@@ -42542,6 +42779,13 @@ const optionComponentRenderer = createComponentRenderer(
|
|
|
42542
42779
|
}
|
|
42543
42780
|
const hasTextNodeChild = node.children?.length === 1 && (node.children[0].type === "TextNode" || node.children[0].type === "TextNodeCData");
|
|
42544
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
|
+
});
|
|
42545
42789
|
return /* @__PURE__ */ jsx(
|
|
42546
42790
|
OptionNative,
|
|
42547
42791
|
{
|
|
@@ -42559,6 +42803,7 @@ const optionComponentRenderer = createComponentRenderer(
|
|
|
42559
42803
|
layoutContext
|
|
42560
42804
|
}
|
|
42561
42805
|
) : void 0 : void 0,
|
|
42806
|
+
...extraProps,
|
|
42562
42807
|
children: !hasTextNodeChild && renderChild2(node.children)
|
|
42563
42808
|
}
|
|
42564
42809
|
);
|
|
@@ -42667,17 +42912,15 @@ const AutoCompleteMd = createMetadata({
|
|
|
42667
42912
|
[`paddingVertical-item-${COMP$k}`]: "$space-2",
|
|
42668
42913
|
[`paddingHorizontal-${COMP$k}`]: "$space-2",
|
|
42669
42914
|
[`paddingVertical-${COMP$k}`]: "$space-2",
|
|
42670
|
-
[`opacity-text-item-${COMP$k}--disabled`]: "0.5",
|
|
42671
|
-
[`opacity-${COMP$k}--disabled`]: "0.5",
|
|
42672
42915
|
[`backgroundColor-${COMP$k}-badge--hover`]: "$color-primary-400",
|
|
42673
42916
|
[`backgroundColor-${COMP$k}-badge--active`]: "$color-primary-500",
|
|
42674
|
-
[`textColor-item-${COMP$k}--disabled`]: "$color-surface-
|
|
42917
|
+
[`textColor-item-${COMP$k}--disabled`]: "$color-surface-300",
|
|
42675
42918
|
[`textColor-${COMP$k}-badge`]: "$const-color-surface-50",
|
|
42676
42919
|
[`backgroundColor-item-${COMP$k}`]: "$backgroundColor-dropdown-item",
|
|
42677
42920
|
[`backgroundColor-item-${COMP$k}--hover`]: "$backgroundColor-dropdown-item--hover",
|
|
42678
42921
|
[`backgroundColor-item-${COMP$k}--active`]: "$backgroundColor-dropdown-item--active",
|
|
42679
|
-
|
|
42680
|
-
[`
|
|
42922
|
+
[`borderColor-${COMP$k}--disabled`]: "$borderColor--disabled",
|
|
42923
|
+
[`textColor-${COMP$k}--disabled`]: "$textColor--disabled"
|
|
42681
42924
|
}
|
|
42682
42925
|
});
|
|
42683
42926
|
const autoCompleteComponentRenderer = createComponentRenderer(
|
|
@@ -44777,11 +45020,11 @@ const htmlWbrTagRenderer = createComponentRenderer(
|
|
|
44777
45020
|
return /* @__PURE__ */ jsx("wbr", { className, ...props, children: renderChild2(node.children) });
|
|
44778
45021
|
}
|
|
44779
45022
|
);
|
|
44780
|
-
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)"}'`;
|
|
44781
|
-
const colorInput = "
|
|
44782
|
-
const error$1 = "
|
|
44783
|
-
const warning$1 = "
|
|
44784
|
-
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";
|
|
44785
45028
|
const styles$h = {
|
|
44786
45029
|
themeVars: themeVars$5,
|
|
44787
45030
|
colorInput,
|
|
@@ -44870,7 +45113,6 @@ const ColorPicker = forwardRef(
|
|
|
44870
45113
|
...rest,
|
|
44871
45114
|
id,
|
|
44872
45115
|
className: classnames(className, styles$h.colorInput, {
|
|
44873
|
-
[styles$h.disabled]: !enabled2,
|
|
44874
45116
|
[styles$h.error]: validationStatus === "error",
|
|
44875
45117
|
[styles$h.warning]: validationStatus === "warning",
|
|
44876
45118
|
[styles$h.valid]: validationStatus === "valid"
|
|
@@ -44927,7 +45169,10 @@ const ColorPickerMd = createMetadata({
|
|
|
44927
45169
|
}
|
|
44928
45170
|
}
|
|
44929
45171
|
},
|
|
44930
|
-
themeVars: parseScssVar(styles$h.themeVars)
|
|
45172
|
+
themeVars: parseScssVar(styles$h.themeVars),
|
|
45173
|
+
defaultThemeVars: {
|
|
45174
|
+
[`width-${COMP$i}`]: "48px"
|
|
45175
|
+
}
|
|
44931
45176
|
});
|
|
44932
45177
|
const colorPickerComponentRenderer = createComponentRenderer(
|
|
44933
45178
|
"ColorPicker",
|
|
@@ -49492,7 +49737,7 @@ function IconProvider({ children }) {
|
|
|
49492
49737
|
/* @__PURE__ */ jsx("svg", { style: { display: "none" }, ref: spriteRootRef })
|
|
49493
49738
|
] });
|
|
49494
49739
|
}
|
|
49495
|
-
const version = "0.11.
|
|
49740
|
+
const version = "0.11.21";
|
|
49496
49741
|
const miscellaneousUtils = {
|
|
49497
49742
|
capitalize,
|
|
49498
49743
|
pluralize: pluralize$1,
|
|
@@ -57136,7 +57381,7 @@ function ApiInterceptorProvider({
|
|
|
57136
57381
|
return;
|
|
57137
57382
|
}
|
|
57138
57383
|
void (async () => {
|
|
57139
|
-
const { initMock } = await import("./initMock-
|
|
57384
|
+
const { initMock } = await import("./initMock-D78LB-9A.js");
|
|
57140
57385
|
const apiInstance2 = await initMock(interceptor);
|
|
57141
57386
|
setApiInstance(apiInstance2);
|
|
57142
57387
|
setInitialized(true);
|
|
@@ -57153,7 +57398,7 @@ function ApiInterceptorProvider({
|
|
|
57153
57398
|
if (define_process_env_default.VITE_MOCK_ENABLED) {
|
|
57154
57399
|
const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
|
|
57155
57400
|
useWorker ? import("./apiInterceptorWorker-Wgm2_zjg.js") : Promise.resolve({ createApiInterceptorWorker: () => null }),
|
|
57156
|
-
import("./initMock-
|
|
57401
|
+
import("./initMock-D78LB-9A.js")
|
|
57157
57402
|
]);
|
|
57158
57403
|
if (interceptor || forceInitialize) {
|
|
57159
57404
|
const apiInstance2 = await initMock(interceptor || {});
|
|
@@ -57190,7 +57435,7 @@ function ApiInterceptorProvider({
|
|
|
57190
57435
|
void (async () => {
|
|
57191
57436
|
const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
|
|
57192
57437
|
import("./apiInterceptorWorker-Wgm2_zjg.js"),
|
|
57193
|
-
import("./initMock-
|
|
57438
|
+
import("./initMock-D78LB-9A.js")
|
|
57194
57439
|
]);
|
|
57195
57440
|
const apiInstance2 = await initMock(interceptor);
|
|
57196
57441
|
await createApiInterceptorWorker(apiInstance2, parentInterceptorWorker);
|
|
@@ -58989,7 +59234,7 @@ const Slider = forwardRef(
|
|
|
58989
59234
|
thumbsRef.current = thumbsRef.current.slice(0, displayValue.length);
|
|
58990
59235
|
}, [displayValue.length]);
|
|
58991
59236
|
return /* @__PURE__ */ jsx("div", { ...rest, ref, style: style2, className: classnames(styles$M.sliderContainer, className), "data-slider-container": true, children: /* @__PURE__ */ jsxs(
|
|
58992
|
-
Root$
|
|
59237
|
+
Root$2,
|
|
58993
59238
|
{
|
|
58994
59239
|
ref: inputRef,
|
|
58995
59240
|
minStepsBetweenThumbs,
|
|
@@ -59885,7 +60130,7 @@ const DataSourceMd = createMetadata({
|
|
|
59885
60130
|
valueType: "string"
|
|
59886
60131
|
},
|
|
59887
60132
|
errorNotificationMessage: {
|
|
59888
|
-
description: "
|
|
60133
|
+
description: "",
|
|
59889
60134
|
valueType: "string"
|
|
59890
60135
|
},
|
|
59891
60136
|
resultSelector: {
|