xmlui 0.10.23 → 0.10.25
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-CuPvcayg.mjs → index-CCEPGw_x.mjs} +704 -506
- package/dist/lib/index.css +1 -1
- package/dist/lib/{initMock-BBdNO6FB.mjs → initMock-DFcCR7ey.mjs} +1 -1
- package/dist/lib/xmlui.d.ts +1 -0
- package/dist/lib/xmlui.mjs +1 -1
- package/dist/metadata/{collectedComponentMetadata-Cp3Ljk8F.mjs → collectedComponentMetadata-mwkNkxN_.mjs} +700 -502
- package/dist/metadata/{initMock-Dki8247s.mjs → initMock-BVxHA6wu.mjs} +1 -1
- package/dist/metadata/style.css +1 -1
- package/dist/metadata/xmlui-metadata.mjs +1 -1
- package/dist/metadata/xmlui-metadata.umd.js +3 -3
- package/dist/scripts/package.json +1 -1
- package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +2 -1
- package/dist/scripts/src/components/AutoComplete/AutoComplete.spec.js +1 -1
- package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +30 -5
- package/dist/scripts/src/components/CodeBlock/highlight-code.js +5 -32
- package/dist/scripts/src/components/Form/Form.spec.js +2 -2
- package/dist/scripts/src/components/FormItem/FormItemNative.js +5 -1
- package/dist/scripts/src/components/Markdown/MarkdownNative.js +4 -3
- package/dist/scripts/src/components/Markdown/utils.js +4 -3
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +4 -6
- package/dist/scripts/src/components/ModalDialog/ModalDialog.spec.js +19 -0
- package/dist/scripts/src/components/NavGroup/NavGroup.spec.js +103 -11
- package/dist/scripts/src/components/NavGroup/NavGroupNative.js +6 -1
- package/dist/scripts/src/components/NestedApp/utils.js +6 -5
- package/dist/scripts/src/components/Option/Option.spec.js +3 -1
- package/dist/scripts/src/components/Select/HiddenOption.js +3 -3
- package/dist/scripts/src/components/Select/Select.js +2 -3
- package/dist/scripts/src/components/Select/Select.spec.js +53 -6
- package/dist/scripts/src/components/Select/SelectNative.js +187 -47
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +11 -0
- package/dist/scripts/src/components-core/rendering/Container.js +3 -4
- package/dist/scripts/src/components-core/rendering/StateContainer.js +16 -18
- package/dist/scripts/src/components-core/rendering/reducer.js +6 -3
- package/dist/scripts/src/components-core/utils/base64-utils.js +122 -0
- package/dist/scripts/src/components-core/utils/date-utils.js +12 -3
- package/dist/scripts/src/testing/ComponentDrivers.js +1 -1
- package/dist/standalone/xmlui-standalone.es.d.ts +1 -0
- package/dist/standalone/xmlui-standalone.umd.js +15 -15
- package/package.json +1 -1
- package/dist/scripts/src/components/Select/MultiSelectOption.js +0 -42
- package/dist/scripts/src/components/Select/SelectOption.js +0 -34
- package/dist/scripts/src/components/Select/SimpleSelect.js +0 -57
|
@@ -29,12 +29,10 @@ import { RenderPropSticky } from "react-sticky-el";
|
|
|
29
29
|
import * as dropzone from "react-dropzone";
|
|
30
30
|
import toast, { Toaster, ToastBar } from "react-hot-toast";
|
|
31
31
|
import memoizeOne from "memoize-one";
|
|
32
|
-
import { Popover, PopoverTrigger, Portal
|
|
33
|
-
import { FocusScope } from "@radix-ui/react-focus-scope";
|
|
34
|
-
import { Item as Item$1, ItemText, ItemIndicator, Root, Trigger, Portal, Content, ScrollUpButton, Viewport, ScrollDownButton, SelectItemText } from "@radix-ui/react-select";
|
|
32
|
+
import { Popover, PopoverTrigger, Portal, PopoverContent, PopoverPortal } from "@radix-ui/react-popover";
|
|
35
33
|
import * as InnerRadioGroup from "@radix-ui/react-radio-group";
|
|
36
34
|
import { DayPicker } from "react-day-picker";
|
|
37
|
-
import { Root
|
|
35
|
+
import { Root, Track, Range, Thumb } from "@radix-ui/react-slider";
|
|
38
36
|
import * as RadixTooltip from "@radix-ui/react-tooltip";
|
|
39
37
|
import ReactMarkdown from "react-markdown";
|
|
40
38
|
import remarkGfm from "remark-gfm";
|
|
@@ -44,7 +42,7 @@ import EmojiPicker, { EmojiStyle } from "emoji-picker-react";
|
|
|
44
42
|
import * as HoverCard from "@radix-ui/react-hover-card";
|
|
45
43
|
import { useSpring, useInView, animated } from "@react-spring/web";
|
|
46
44
|
import Papa from "papaparse";
|
|
47
|
-
import { Root as Root$
|
|
45
|
+
import { Root as Root$1, List, Trigger, Content } from "@radix-ui/react-tabs";
|
|
48
46
|
import scrollIntoView from "scroll-into-view-if-needed";
|
|
49
47
|
import * as RAccordion from "@radix-ui/react-accordion";
|
|
50
48
|
import useEmblaCarousel from "embla-carousel-react";
|
|
@@ -751,18 +749,19 @@ function getElementRef(element) {
|
|
|
751
749
|
return element.props.ref || element.ref;
|
|
752
750
|
}
|
|
753
751
|
const themeVars$11 = `'{"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)"}'`;
|
|
754
|
-
const container$3 = "
|
|
755
|
-
const top$1 = "
|
|
756
|
-
const end = "
|
|
757
|
-
const bottom$1 = "
|
|
758
|
-
const start = "
|
|
759
|
-
const shrinkToLabel = "
|
|
760
|
-
const inputLabel = "
|
|
761
|
-
const disabled$c = "
|
|
762
|
-
const labelBreak = "
|
|
763
|
-
const required = "
|
|
764
|
-
const requiredMark = "
|
|
765
|
-
const itemWithLabel = "
|
|
752
|
+
const container$3 = "_container_1bx6o_14";
|
|
753
|
+
const top$1 = "_top_1bx6o_21";
|
|
754
|
+
const end = "_end_1bx6o_26";
|
|
755
|
+
const bottom$1 = "_bottom_1bx6o_32";
|
|
756
|
+
const start = "_start_1bx6o_37";
|
|
757
|
+
const shrinkToLabel = "_shrinkToLabel_1bx6o_43";
|
|
758
|
+
const inputLabel = "_inputLabel_1bx6o_46";
|
|
759
|
+
const disabled$c = "_disabled_1bx6o_59";
|
|
760
|
+
const labelBreak = "_labelBreak_1bx6o_63";
|
|
761
|
+
const required = "_required_1bx6o_68";
|
|
762
|
+
const requiredMark = "_requiredMark_1bx6o_75";
|
|
763
|
+
const itemWithLabel = "_itemWithLabel_1bx6o_79";
|
|
764
|
+
const helperTextContainer = "_helperTextContainer_1bx6o_85";
|
|
766
765
|
const styles$1k = {
|
|
767
766
|
themeVars: themeVars$11,
|
|
768
767
|
container: container$3,
|
|
@@ -776,7 +775,8 @@ const styles$1k = {
|
|
|
776
775
|
labelBreak,
|
|
777
776
|
required,
|
|
778
777
|
requiredMark,
|
|
779
|
-
itemWithLabel
|
|
778
|
+
itemWithLabel,
|
|
779
|
+
helperTextContainer
|
|
780
780
|
};
|
|
781
781
|
const themeVars$10 = `'{"size-Spinner": "var(--xmlui-size-Spinner)", "thickness-Spinner": "var(--xmlui-thickness-Spinner)", "borderColor-Spinner": "var(--xmlui-borderColor-Spinner)"}'`;
|
|
782
782
|
const fullScreenSpinnerWrapper = "_fullScreenSpinnerWrapper_b1pgc_50";
|
|
@@ -4671,6 +4671,7 @@ const AppLayoutContext = createContext(null);
|
|
|
4671
4671
|
function useAppLayoutContext() {
|
|
4672
4672
|
return useContext(AppLayoutContext);
|
|
4673
4673
|
}
|
|
4674
|
+
const PART_HAMBURGER = "hamburger";
|
|
4674
4675
|
const defaultProps$1a = {
|
|
4675
4676
|
showLogo: true,
|
|
4676
4677
|
showNavPanelIf: true
|
|
@@ -4721,6 +4722,7 @@ const AppHeader = ({
|
|
|
4721
4722
|
hasRegisteredNavPanel && showNavPanelIf && /* @__PURE__ */ jsx(
|
|
4722
4723
|
Button,
|
|
4723
4724
|
{
|
|
4725
|
+
"data-part-id": PART_HAMBURGER,
|
|
4724
4726
|
onClick: toggleDrawer,
|
|
4725
4727
|
icon: /* @__PURE__ */ jsx(Icon, { name: "hamburger" }),
|
|
4726
4728
|
variant: "ghost",
|
|
@@ -5555,13 +5557,18 @@ const ExpandableNavGroup = forwardRef(function ExpandableNavGroup2({
|
|
|
5555
5557
|
...style2,
|
|
5556
5558
|
"--nav-link-level": layoutIsVertical ? level : 0
|
|
5557
5559
|
};
|
|
5560
|
+
const handleClick = (e) => {
|
|
5561
|
+
e.preventDefault();
|
|
5562
|
+
e.stopPropagation();
|
|
5563
|
+
setExpanded((prev) => !prev);
|
|
5564
|
+
};
|
|
5558
5565
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5559
5566
|
/* @__PURE__ */ jsxs(
|
|
5560
5567
|
NavLink,
|
|
5561
5568
|
{
|
|
5562
5569
|
...rest,
|
|
5563
5570
|
style: toggleStyle,
|
|
5564
|
-
onClick:
|
|
5571
|
+
onClick: handleClick,
|
|
5565
5572
|
icon: icon2,
|
|
5566
5573
|
to,
|
|
5567
5574
|
disabled: disabled2,
|
|
@@ -6034,7 +6041,7 @@ const themeVars$N = `'{"backgroundColor-Tree-row--selected": "var(--xmlui-backgr
|
|
|
6034
6041
|
const wrapper$j = "_wrapper_eyur1_14";
|
|
6035
6042
|
const rowWrapper = "_rowWrapper_eyur1_22";
|
|
6036
6043
|
const selected$2 = "_selected_eyur1_39";
|
|
6037
|
-
const focused$
|
|
6044
|
+
const focused$2 = "_focused_eyur1_46";
|
|
6038
6045
|
const gutter = "_gutter_eyur1_56";
|
|
6039
6046
|
const toggleWrapper = "_toggleWrapper_eyur1_63";
|
|
6040
6047
|
const hidden$2 = "_hidden_eyur1_72";
|
|
@@ -6046,7 +6053,7 @@ const styles$16 = {
|
|
|
6046
6053
|
wrapper: wrapper$j,
|
|
6047
6054
|
rowWrapper,
|
|
6048
6055
|
selected: selected$2,
|
|
6049
|
-
focused: focused$
|
|
6056
|
+
focused: focused$2,
|
|
6050
6057
|
gutter,
|
|
6051
6058
|
toggleWrapper,
|
|
6052
6059
|
hidden: hidden$2,
|
|
@@ -11740,7 +11747,7 @@ const showInHeader = "_showInHeader_1ylgd_138";
|
|
|
11740
11747
|
const selected$1 = "_selected_1ylgd_142";
|
|
11741
11748
|
const allSelected = "_allSelected_1ylgd_142";
|
|
11742
11749
|
const cellContent = "_cellContent_1ylgd_173";
|
|
11743
|
-
const focused$
|
|
11750
|
+
const focused$1 = "_focused_1ylgd_200";
|
|
11744
11751
|
const disabled$8 = "_disabled_1ylgd_212";
|
|
11745
11752
|
const noBottomBorder = "_noBottomBorder_1ylgd_219";
|
|
11746
11753
|
const noRows$1 = "_noRows_1ylgd_244";
|
|
@@ -11769,7 +11776,7 @@ const styles$12 = {
|
|
|
11769
11776
|
selected: selected$1,
|
|
11770
11777
|
allSelected,
|
|
11771
11778
|
cellContent,
|
|
11772
|
-
focused: focused$
|
|
11779
|
+
focused: focused$1,
|
|
11773
11780
|
disabled: disabled$8,
|
|
11774
11781
|
noBottomBorder,
|
|
11775
11782
|
noRows: noRows$1,
|
|
@@ -15394,15 +15401,15 @@ const flowLayoutComponentRenderer = createComponentRenderer(
|
|
|
15394
15401
|
}
|
|
15395
15402
|
);
|
|
15396
15403
|
const themeVars$A = `'{"padding-ModalDialog": "var(--xmlui-padding-ModalDialog)", "paddingHorizontal-ModalDialog": "var(--xmlui-paddingHorizontal-ModalDialog, var(--xmlui-padding-ModalDialog))", "paddingVertical-ModalDialog": "var(--xmlui-paddingVertical-ModalDialog, var(--xmlui-padding-ModalDialog))", "paddingLeft-ModalDialog": "var(--xmlui-paddingLeft-ModalDialog, var(--xmlui-paddingHorizontal-ModalDialog, var(--xmlui-padding-ModalDialog)))", "paddingRight-ModalDialog": "var(--xmlui-paddingRight-ModalDialog, var(--xmlui-paddingHorizontal-ModalDialog, var(--xmlui-padding-ModalDialog)))", "paddingTop-ModalDialog": "var(--xmlui-paddingTop-ModalDialog, var(--xmlui-paddingVertical-ModalDialog, var(--xmlui-padding-ModalDialog)))", "paddingBottom-ModalDialog": "var(--xmlui-paddingBottom-ModalDialog, var(--xmlui-paddingVertical-ModalDialog, var(--xmlui-padding-ModalDialog)))", "padding-overlay-ModalDialog": "var(--xmlui-padding-overlay-ModalDialog)", "paddingHorizontal-overlay-ModalDialog": "var(--xmlui-paddingHorizontal-overlay-ModalDialog, var(--xmlui-padding-overlay-ModalDialog))", "paddingVertical-overlay-ModalDialog": "var(--xmlui-paddingVertical-overlay-ModalDialog, var(--xmlui-padding-overlay-ModalDialog))", "paddingLeft-overlay-ModalDialog": "var(--xmlui-paddingLeft-overlay-ModalDialog, var(--xmlui-paddingHorizontal-overlay-ModalDialog, var(--xmlui-padding-overlay-ModalDialog)))", "paddingRight-overlay-ModalDialog": "var(--xmlui-paddingRight-overlay-ModalDialog, var(--xmlui-paddingHorizontal-overlay-ModalDialog, var(--xmlui-padding-overlay-ModalDialog)))", "paddingTop-overlay-ModalDialog": "var(--xmlui-paddingTop-overlay-ModalDialog, var(--xmlui-paddingVertical-overlay-ModalDialog, var(--xmlui-padding-overlay-ModalDialog)))", "paddingBottom-overlay-ModalDialog": "var(--xmlui-paddingBottom-overlay-ModalDialog, var(--xmlui-paddingVertical-overlay-ModalDialog, var(--xmlui-padding-overlay-ModalDialog)))", "Dialog:backgroundColor-ModalDialog": "var(--xmlui-backgroundColor-ModalDialog)", "Dialog:backgroundColor-overlay-ModalDialog": "var(--xmlui-backgroundColor-overlay-ModalDialog)", "Dialog:borderRadius-ModalDialog": "var(--xmlui-borderRadius-ModalDialog)", "Dialog:fontFamily-ModalDialog": "var(--xmlui-fontFamily-ModalDialog)", "Dialog:textColor-ModalDialog": "var(--xmlui-textColor-ModalDialog)", "Dialog:minWidth-ModalDialog": "var(--xmlui-minWidth-ModalDialog)", "Dialog:maxWidth-ModalDialog": "var(--xmlui-maxWidth-ModalDialog)", "Dialog:marginBottom-title-ModalDialog": "var(--xmlui-marginBottom-title-ModalDialog)"}'`;
|
|
15397
|
-
const overlay$2 = "
|
|
15398
|
-
const fullScreen = "
|
|
15399
|
-
const content$5 = "
|
|
15400
|
-
const overlayBg$1 = "
|
|
15401
|
-
const nested = "
|
|
15402
|
-
const contentAnimation = "
|
|
15403
|
-
const dialogTitle = "
|
|
15404
|
-
const innerContent = "
|
|
15405
|
-
const closeButton = "
|
|
15404
|
+
const overlay$2 = "_overlay_1rhbz_14";
|
|
15405
|
+
const fullScreen = "_fullScreen_1rhbz_22";
|
|
15406
|
+
const content$5 = "_content_1rhbz_28";
|
|
15407
|
+
const overlayBg$1 = "_overlayBg_1rhbz_37";
|
|
15408
|
+
const nested = "_nested_1rhbz_44";
|
|
15409
|
+
const contentAnimation = "_contentAnimation_1rhbz_76";
|
|
15410
|
+
const dialogTitle = "_dialogTitle_1rhbz_82";
|
|
15411
|
+
const innerContent = "_innerContent_1rhbz_87";
|
|
15412
|
+
const closeButton = "_closeButton_1rhbz_112";
|
|
15406
15413
|
const styles$V = {
|
|
15407
15414
|
themeVars: themeVars$A,
|
|
15408
15415
|
overlay: overlay$2,
|
|
@@ -15709,6 +15716,7 @@ const modalViewComponentRenderer = createComponentRenderer(
|
|
|
15709
15716
|
ModalDialogMd,
|
|
15710
15717
|
({
|
|
15711
15718
|
node,
|
|
15719
|
+
contextVars,
|
|
15712
15720
|
extractValue,
|
|
15713
15721
|
className,
|
|
15714
15722
|
renderChild: renderChild2,
|
|
@@ -15732,7 +15740,11 @@ const modalViewComponentRenderer = createComponentRenderer(
|
|
|
15732
15740
|
node,
|
|
15733
15741
|
renderChild: renderChild2,
|
|
15734
15742
|
layoutContext: { _insideModalFrame: true },
|
|
15735
|
-
contextVars: {
|
|
15743
|
+
contextVars: {
|
|
15744
|
+
...contextVars,
|
|
15745
|
+
$param: openParams == null ? void 0 : openParams[0],
|
|
15746
|
+
$params: openParams
|
|
15747
|
+
}
|
|
15736
15748
|
}
|
|
15737
15749
|
);
|
|
15738
15750
|
}
|
|
@@ -20533,72 +20545,48 @@ function useLongPress(elementRef, action2, delay2 = 500) {
|
|
|
20533
20545
|
};
|
|
20534
20546
|
}, [elementRef, action2, delay2]);
|
|
20535
20547
|
}
|
|
20536
|
-
const SelectContext = createContext({
|
|
20537
|
-
value: null,
|
|
20538
|
-
onChange: (selectedValue) => {
|
|
20539
|
-
},
|
|
20540
|
-
setOpen: (open) => {
|
|
20541
|
-
},
|
|
20542
|
-
setSelectedIndex: (index) => {
|
|
20543
|
-
},
|
|
20544
|
-
options: /* @__PURE__ */ new Set(),
|
|
20545
|
-
optionRenderer: void 0
|
|
20546
|
-
});
|
|
20547
|
-
function useSelect() {
|
|
20548
|
-
return useContext(SelectContext);
|
|
20549
|
-
}
|
|
20550
|
-
const OptionContext = createContext({
|
|
20551
|
-
onOptionAdd: () => {
|
|
20552
|
-
},
|
|
20553
|
-
onOptionRemove: () => {
|
|
20554
|
-
}
|
|
20555
|
-
});
|
|
20556
|
-
function useOption() {
|
|
20557
|
-
return useContext(OptionContext);
|
|
20558
|
-
}
|
|
20559
20548
|
const themeVars$p = `'{"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)"}'`;
|
|
20560
|
-
const selectTrigger = "
|
|
20561
|
-
const error$9 = "
|
|
20562
|
-
const warning$a = "
|
|
20563
|
-
const valid$9 = "
|
|
20564
|
-
const disabled$7 = "
|
|
20565
|
-
const
|
|
20566
|
-
const
|
|
20567
|
-
const
|
|
20568
|
-
const
|
|
20569
|
-
const
|
|
20570
|
-
const
|
|
20571
|
-
const
|
|
20572
|
-
const
|
|
20573
|
-
const
|
|
20574
|
-
const
|
|
20575
|
-
const
|
|
20576
|
-
const
|
|
20577
|
-
const
|
|
20578
|
-
const
|
|
20579
|
-
const
|
|
20580
|
-
const
|
|
20581
|
-
const
|
|
20582
|
-
const
|
|
20583
|
-
const
|
|
20584
|
-
const
|
|
20585
|
-
const
|
|
20586
|
-
const
|
|
20587
|
-
const
|
|
20588
|
-
const
|
|
20589
|
-
const
|
|
20590
|
-
const
|
|
20591
|
-
const
|
|
20592
|
-
const
|
|
20593
|
-
const
|
|
20594
|
-
const
|
|
20595
|
-
const
|
|
20596
|
-
const
|
|
20597
|
-
const
|
|
20598
|
-
const
|
|
20599
|
-
const
|
|
20600
|
-
const
|
|
20601
|
-
const srOnly = "_srOnly_ouv0k_447";
|
|
20549
|
+
const selectTrigger = "_selectTrigger_1rbu9_17";
|
|
20550
|
+
const error$9 = "_error_1rbu9_54";
|
|
20551
|
+
const warning$a = "_warning_1rbu9_80";
|
|
20552
|
+
const valid$9 = "_valid_1rbu9_106";
|
|
20553
|
+
const disabled$7 = "_disabled_1rbu9_132";
|
|
20554
|
+
const placeholder$1 = "_placeholder_1rbu9_145";
|
|
20555
|
+
const actions$1 = "_actions_1rbu9_162";
|
|
20556
|
+
const action$1 = "_action_1rbu9_162";
|
|
20557
|
+
const emptyList = "_emptyList_1rbu9_173";
|
|
20558
|
+
const badgeListContainer = "_badgeListContainer_1rbu9_185";
|
|
20559
|
+
const badgeList$1 = "_badgeList_1rbu9_185";
|
|
20560
|
+
const inputWrapper$1 = "_inputWrapper_1rbu9_198";
|
|
20561
|
+
const badge$1 = "_badge_1rbu9_185";
|
|
20562
|
+
const selectContent = "_selectContent_1rbu9_233";
|
|
20563
|
+
const command$1 = "_command_1rbu9_242";
|
|
20564
|
+
const commandInputContainer = "_commandInputContainer_1rbu9_247";
|
|
20565
|
+
const commandInput$1 = "_commandInput_1rbu9_247";
|
|
20566
|
+
const commandList$1 = "_commandList_1rbu9_266";
|
|
20567
|
+
const multiSelectOption = "_multiSelectOption_1rbu9_273";
|
|
20568
|
+
const multiSelectOptionContent = "_multiSelectOptionContent_1rbu9_287";
|
|
20569
|
+
const highlighted$1 = "_highlighted_1rbu9_296";
|
|
20570
|
+
const disabledOption$1 = "_disabledOption_1rbu9_302";
|
|
20571
|
+
const selectValue = "_selectValue_1rbu9_317";
|
|
20572
|
+
const selectDropdownContent = "_selectDropdownContent_1rbu9_332";
|
|
20573
|
+
const fadeIn = "_fadeIn_1rbu9_1";
|
|
20574
|
+
const zoomIn = "_zoomIn_1rbu9_1";
|
|
20575
|
+
const fadeOut = "_fadeOut_1rbu9_1";
|
|
20576
|
+
const zoomOut = "_zoomOut_1rbu9_1";
|
|
20577
|
+
const slideInFromTop = "_slideInFromTop_1rbu9_1";
|
|
20578
|
+
const slideInFromRight = "_slideInFromRight_1rbu9_1";
|
|
20579
|
+
const slideInFromLeft = "_slideInFromLeft_1rbu9_1";
|
|
20580
|
+
const slideInFromBottom = "_slideInFromBottom_1rbu9_1";
|
|
20581
|
+
const selectViewport = "_selectViewport_1rbu9_365";
|
|
20582
|
+
const selectScrollUpButton = "_selectScrollUpButton_1rbu9_369";
|
|
20583
|
+
const selectScrollDownButton = "_selectScrollDownButton_1rbu9_377";
|
|
20584
|
+
const selectEmpty = "_selectEmpty_1rbu9_385";
|
|
20585
|
+
const selectOption = "_selectOption_1rbu9_398";
|
|
20586
|
+
const selectOptionContent = "_selectOptionContent_1rbu9_421";
|
|
20587
|
+
const selectOptionIndicator = "_selectOptionIndicator_1rbu9_435";
|
|
20588
|
+
const loading = "_loading_1rbu9_445";
|
|
20589
|
+
const srOnly = "_srOnly_1rbu9_448";
|
|
20602
20590
|
const styles$J = {
|
|
20603
20591
|
themeVars: themeVars$p,
|
|
20604
20592
|
selectTrigger,
|
|
@@ -20606,7 +20594,6 @@ const styles$J = {
|
|
|
20606
20594
|
warning: warning$a,
|
|
20607
20595
|
valid: valid$9,
|
|
20608
20596
|
disabled: disabled$7,
|
|
20609
|
-
focused: focused$1,
|
|
20610
20597
|
placeholder: placeholder$1,
|
|
20611
20598
|
actions: actions$1,
|
|
20612
20599
|
action: action$1,
|
|
@@ -20644,57 +20631,20 @@ const styles$J = {
|
|
|
20644
20631
|
loading,
|
|
20645
20632
|
srOnly
|
|
20646
20633
|
};
|
|
20647
|
-
const
|
|
20648
|
-
|
|
20649
|
-
|
|
20650
|
-
|
|
20651
|
-
|
|
20652
|
-
|
|
20653
|
-
|
|
20654
|
-
|
|
20655
|
-
|
|
20656
|
-
|
|
20657
|
-
|
|
20658
|
-
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
onOptionAdd(opt);
|
|
20662
|
-
return () => onOptionRemove(opt);
|
|
20663
|
-
}, [opt, onOptionAdd, onOptionRemove]);
|
|
20664
|
-
return /* @__PURE__ */ jsxs(
|
|
20665
|
-
Item$1,
|
|
20666
|
-
{
|
|
20667
|
-
ref,
|
|
20668
|
-
className: classnames(className, styles$J.selectOption),
|
|
20669
|
-
value,
|
|
20670
|
-
textValue: label2,
|
|
20671
|
-
disabled: !enabled2,
|
|
20672
|
-
onClick: (event) => {
|
|
20673
|
-
event.stopPropagation();
|
|
20674
|
-
},
|
|
20675
|
-
"data-state": selectedValue === value && "checked",
|
|
20676
|
-
children: [
|
|
20677
|
-
/* @__PURE__ */ jsx("span", { style: { display: "none" }, children: /* @__PURE__ */ jsx(ItemText, { children: label2 }) }),
|
|
20678
|
-
children ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20679
|
-
/* @__PURE__ */ jsx("div", { className: styles$J.selectOptionContent, ref: visibleContentRef, children }),
|
|
20680
|
-
selectedValue === value && /* @__PURE__ */ jsx(ItemIndicator, { className: styles$J.selectOptionIndicator, children: /* @__PURE__ */ jsx(Icon, { name: "checkmark" }) })
|
|
20681
|
-
] }) : optionRenderer ? /* @__PURE__ */ jsx("div", { className: styles$J.selectOptionContent, ref: visibleContentRef, children: optionRenderer(
|
|
20682
|
-
{
|
|
20683
|
-
label: label2,
|
|
20684
|
-
value,
|
|
20685
|
-
enabled: enabled2
|
|
20686
|
-
},
|
|
20687
|
-
selectedValue,
|
|
20688
|
-
false
|
|
20689
|
-
) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20690
|
-
/* @__PURE__ */ jsx("div", { className: styles$J.selectOptionContent, ref: visibleContentRef, children: label2 }),
|
|
20691
|
-
selectedValue === value && /* @__PURE__ */ jsx(ItemIndicator, { className: styles$J.selectItemIndicator, children: /* @__PURE__ */ jsx(Icon, { name: "checkmark" }) })
|
|
20692
|
-
] })
|
|
20693
|
-
]
|
|
20694
|
-
}
|
|
20695
|
-
);
|
|
20696
|
-
}
|
|
20697
|
-
);
|
|
20634
|
+
const SelectContext = createContext({
|
|
20635
|
+
value: null,
|
|
20636
|
+
onChange: (selectedValue) => {
|
|
20637
|
+
},
|
|
20638
|
+
setOpen: (open) => {
|
|
20639
|
+
},
|
|
20640
|
+
setSelectedIndex: (index) => {
|
|
20641
|
+
},
|
|
20642
|
+
options: /* @__PURE__ */ new Set(),
|
|
20643
|
+
optionRenderer: void 0
|
|
20644
|
+
});
|
|
20645
|
+
function useSelect() {
|
|
20646
|
+
return useContext(SelectContext);
|
|
20647
|
+
}
|
|
20698
20648
|
const OptionTypeContext = React__default.createContext(null);
|
|
20699
20649
|
function useOptionType() {
|
|
20700
20650
|
return React__default.useContext(OptionTypeContext);
|
|
@@ -20705,9 +20655,18 @@ function OptionTypeProvider({
|
|
|
20705
20655
|
}) {
|
|
20706
20656
|
return /* @__PURE__ */ jsx(OptionTypeContext.Provider, { value: Component, children });
|
|
20707
20657
|
}
|
|
20658
|
+
const OptionContext = createContext({
|
|
20659
|
+
onOptionAdd: () => {
|
|
20660
|
+
},
|
|
20661
|
+
onOptionRemove: () => {
|
|
20662
|
+
}
|
|
20663
|
+
});
|
|
20664
|
+
function useOption() {
|
|
20665
|
+
return useContext(OptionContext);
|
|
20666
|
+
}
|
|
20708
20667
|
function HiddenOption(option) {
|
|
20709
20668
|
const { label: label2 } = option;
|
|
20710
|
-
const {
|
|
20669
|
+
const { onOptionAdd } = useOption();
|
|
20711
20670
|
const [node, setNode] = useState(null);
|
|
20712
20671
|
const opt = useMemo(() => {
|
|
20713
20672
|
return {
|
|
@@ -20719,165 +20678,10 @@ function HiddenOption(option) {
|
|
|
20719
20678
|
}, [option, node, label2]);
|
|
20720
20679
|
useEffect(() => {
|
|
20721
20680
|
onOptionAdd(opt);
|
|
20722
|
-
|
|
20723
|
-
}, [opt, onOptionAdd, onOptionRemove]);
|
|
20681
|
+
}, [opt, onOptionAdd]);
|
|
20724
20682
|
return /* @__PURE__ */ jsx("div", { ref: (el) => setNode(el), style: { display: "none" }, children: option.children });
|
|
20725
20683
|
}
|
|
20726
|
-
const
|
|
20727
|
-
function SimpleSelect2(props, forwardedRef) {
|
|
20728
|
-
const { root: root2 } = useTheme();
|
|
20729
|
-
const {
|
|
20730
|
-
enabled: enabled2,
|
|
20731
|
-
onBlur,
|
|
20732
|
-
autoFocus,
|
|
20733
|
-
onValueChange,
|
|
20734
|
-
validationStatus,
|
|
20735
|
-
value,
|
|
20736
|
-
height,
|
|
20737
|
-
style: style2,
|
|
20738
|
-
placeholder: placeholder2,
|
|
20739
|
-
id,
|
|
20740
|
-
triggerRef,
|
|
20741
|
-
onFocus,
|
|
20742
|
-
width,
|
|
20743
|
-
children,
|
|
20744
|
-
readOnly: readOnly2,
|
|
20745
|
-
emptyListNode,
|
|
20746
|
-
className,
|
|
20747
|
-
...rest
|
|
20748
|
-
} = props;
|
|
20749
|
-
const { options: options2 } = useSelect();
|
|
20750
|
-
const composedRef = forwardRef ? composeRefs(triggerRef, forwardedRef) : triggerRef;
|
|
20751
|
-
const stringValue = useMemo(() => {
|
|
20752
|
-
return value != void 0 ? String(value) : void 0;
|
|
20753
|
-
}, [value]);
|
|
20754
|
-
const handleValueChange = useCallback(
|
|
20755
|
-
(val) => {
|
|
20756
|
-
if (readOnly2) return;
|
|
20757
|
-
onValueChange(val);
|
|
20758
|
-
},
|
|
20759
|
-
[onValueChange, readOnly2]
|
|
20760
|
-
);
|
|
20761
|
-
const optionsArray = useMemo(() => Array.from(options2), [options2]);
|
|
20762
|
-
const selectedOption = useMemo(() => {
|
|
20763
|
-
return optionsArray.find((option) => String(option.value) === String(value));
|
|
20764
|
-
}, [optionsArray, value]);
|
|
20765
|
-
return /* @__PURE__ */ jsxs(Root, { value: stringValue, onValueChange: handleValueChange, children: [
|
|
20766
|
-
/* @__PURE__ */ jsxs(
|
|
20767
|
-
Trigger,
|
|
20768
|
-
{
|
|
20769
|
-
...rest,
|
|
20770
|
-
id,
|
|
20771
|
-
ref: composedRef,
|
|
20772
|
-
"aria-haspopup": "listbox",
|
|
20773
|
-
style: style2,
|
|
20774
|
-
onFocus,
|
|
20775
|
-
onBlur,
|
|
20776
|
-
disabled: !enabled2,
|
|
20777
|
-
className: classnames(className, styles$J.selectTrigger, {
|
|
20778
|
-
[styles$J.error]: validationStatus === "error",
|
|
20779
|
-
[styles$J.warning]: validationStatus === "warning",
|
|
20780
|
-
[styles$J.valid]: validationStatus === "valid"
|
|
20781
|
-
}),
|
|
20782
|
-
onClick: (event) => {
|
|
20783
|
-
event.stopPropagation();
|
|
20784
|
-
},
|
|
20785
|
-
autoFocus,
|
|
20786
|
-
children: [
|
|
20787
|
-
/* @__PURE__ */ jsx(
|
|
20788
|
-
"div",
|
|
20789
|
-
{
|
|
20790
|
-
className: classnames(styles$J.selectValue, {
|
|
20791
|
-
[styles$J.placeholder]: value === void 0
|
|
20792
|
-
}),
|
|
20793
|
-
children: selectedOption ? selectedOption.label : readOnly2 ? "" : placeholder2
|
|
20794
|
-
}
|
|
20795
|
-
),
|
|
20796
|
-
/* @__PURE__ */ jsx("span", { className: styles$J.action, children: /* @__PURE__ */ jsx(Icon, { name: "chevrondown" }) })
|
|
20797
|
-
]
|
|
20798
|
-
}
|
|
20799
|
-
),
|
|
20800
|
-
/* @__PURE__ */ jsx(Portal, { container: root2, children: /* @__PURE__ */ jsxs(
|
|
20801
|
-
Content,
|
|
20802
|
-
{
|
|
20803
|
-
className: styles$J.selectDropdownContent,
|
|
20804
|
-
position: "popper",
|
|
20805
|
-
style: { maxHeight: height, minWidth: width },
|
|
20806
|
-
children: [
|
|
20807
|
-
/* @__PURE__ */ jsx(ScrollUpButton, { className: styles$J.selectScrollUpButton, children: /* @__PURE__ */ jsx(Icon, { name: "chevronup" }) }),
|
|
20808
|
-
/* @__PURE__ */ jsxs(Viewport, { className: styles$J.selectViewport, role: "listbox", children: [
|
|
20809
|
-
children,
|
|
20810
|
-
optionsArray.length === 0 && emptyListNode
|
|
20811
|
-
] }),
|
|
20812
|
-
/* @__PURE__ */ jsx(ScrollDownButton, { className: styles$J.selectScrollDownButton, children: /* @__PURE__ */ jsx(Icon, { name: "chevrondown" }) })
|
|
20813
|
-
]
|
|
20814
|
-
}
|
|
20815
|
-
) })
|
|
20816
|
-
] });
|
|
20817
|
-
}
|
|
20818
|
-
);
|
|
20819
|
-
const MultiSelectOption = forwardRef(function MultiSelectOption2(option, forwardedRef) {
|
|
20820
|
-
const id = useId();
|
|
20821
|
-
const {
|
|
20822
|
-
label: label2,
|
|
20823
|
-
value,
|
|
20824
|
-
enabled: enabled2 = true,
|
|
20825
|
-
keywords,
|
|
20826
|
-
readOnly: readOnly2,
|
|
20827
|
-
children,
|
|
20828
|
-
isHighlighted = false,
|
|
20829
|
-
itemIndex
|
|
20830
|
-
} = option;
|
|
20831
|
-
const {
|
|
20832
|
-
value: selectedValue,
|
|
20833
|
-
onChange,
|
|
20834
|
-
multiSelect,
|
|
20835
|
-
setOpen,
|
|
20836
|
-
setSelectedIndex,
|
|
20837
|
-
optionRenderer
|
|
20838
|
-
} = useSelect();
|
|
20839
|
-
const selected2 = useMemo(() => {
|
|
20840
|
-
return Array.isArray(selectedValue) && multiSelect ? selectedValue.map((v) => String(v)).includes(value) : String(selectedValue) === String(value);
|
|
20841
|
-
}, [selectedValue, value, multiSelect]);
|
|
20842
|
-
const handleClick = () => {
|
|
20843
|
-
if (readOnly2) {
|
|
20844
|
-
setOpen(false);
|
|
20845
|
-
return;
|
|
20846
|
-
}
|
|
20847
|
-
if (enabled2) {
|
|
20848
|
-
onChange(value);
|
|
20849
|
-
}
|
|
20850
|
-
};
|
|
20851
|
-
return /* @__PURE__ */ jsx(
|
|
20852
|
-
"div",
|
|
20853
|
-
{
|
|
20854
|
-
id,
|
|
20855
|
-
ref: forwardedRef,
|
|
20856
|
-
role: "option",
|
|
20857
|
-
"aria-disabled": !enabled2,
|
|
20858
|
-
"aria-selected": selected2,
|
|
20859
|
-
className: classnames(styles$J.multiSelectOption, {
|
|
20860
|
-
[styles$J.disabledOption]: !enabled2,
|
|
20861
|
-
[styles$J.highlighted]: isHighlighted
|
|
20862
|
-
}),
|
|
20863
|
-
onMouseDown: (e) => {
|
|
20864
|
-
e.preventDefault();
|
|
20865
|
-
e.stopPropagation();
|
|
20866
|
-
},
|
|
20867
|
-
onMouseEnter: () => {
|
|
20868
|
-
if (itemIndex !== void 0 && setSelectedIndex && enabled2) {
|
|
20869
|
-
setSelectedIndex(itemIndex);
|
|
20870
|
-
}
|
|
20871
|
-
},
|
|
20872
|
-
onClick: handleClick,
|
|
20873
|
-
"data-state": selected2 ? "checked" : void 0,
|
|
20874
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$J.multiSelectOptionContent, children: optionRenderer ? optionRenderer({ label: label2, value, enabled: enabled2, keywords }, selectedValue, false) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20875
|
-
children || label2,
|
|
20876
|
-
selected2 && /* @__PURE__ */ jsx(Icon, { name: "checkmark" })
|
|
20877
|
-
] }) })
|
|
20878
|
-
}
|
|
20879
|
-
);
|
|
20880
|
-
});
|
|
20684
|
+
const PART_LIST_WRAPPER$1 = "listWrapper";
|
|
20881
20685
|
const defaultProps$F = {
|
|
20882
20686
|
enabled: true,
|
|
20883
20687
|
placeholder: "",
|
|
@@ -20999,7 +20803,6 @@ const Select = forwardRef(function Select2({
|
|
|
20999
20803
|
const observer = useRef();
|
|
21000
20804
|
const { root: root2 } = useTheme();
|
|
21001
20805
|
const [options2, setOptions] = useState(/* @__PURE__ */ new Set());
|
|
21002
|
-
const isInForm = useIsInsideForm();
|
|
21003
20806
|
const [searchTerm, setSearchTerm] = useState("");
|
|
21004
20807
|
const [selectedIndex, setSelectedIndex] = useState(-1);
|
|
21005
20808
|
const filteredOptions = useMemo(() => {
|
|
@@ -21054,15 +20857,16 @@ const Select = forwardRef(function Select2({
|
|
|
21054
20857
|
}, [multiSelect, updateState, onDidChange]);
|
|
21055
20858
|
const findNextEnabledIndex = useCallback(
|
|
21056
20859
|
(currentIndex) => {
|
|
20860
|
+
if (filteredOptions.length === 0) return -1;
|
|
21057
20861
|
for (let i = currentIndex + 1; i < filteredOptions.length; i++) {
|
|
21058
20862
|
const item2 = filteredOptions[i];
|
|
21059
|
-
if (item2.enabled !== false) {
|
|
20863
|
+
if (item2 && item2.enabled !== false) {
|
|
21060
20864
|
return i;
|
|
21061
20865
|
}
|
|
21062
20866
|
}
|
|
21063
20867
|
for (let i = 0; i <= currentIndex; i++) {
|
|
21064
20868
|
const item2 = filteredOptions[i];
|
|
21065
|
-
if (item2.enabled !== false) {
|
|
20869
|
+
if (item2 && item2.enabled !== false) {
|
|
21066
20870
|
return i;
|
|
21067
20871
|
}
|
|
21068
20872
|
}
|
|
@@ -21072,15 +20876,16 @@ const Select = forwardRef(function Select2({
|
|
|
21072
20876
|
);
|
|
21073
20877
|
const findPreviousEnabledIndex = useCallback(
|
|
21074
20878
|
(currentIndex) => {
|
|
20879
|
+
if (filteredOptions.length === 0) return -1;
|
|
21075
20880
|
for (let i = currentIndex - 1; i >= 0; i--) {
|
|
21076
20881
|
const item2 = filteredOptions[i];
|
|
21077
|
-
if (item2.enabled !== false) {
|
|
20882
|
+
if (item2 && item2.enabled !== false) {
|
|
21078
20883
|
return i;
|
|
21079
20884
|
}
|
|
21080
20885
|
}
|
|
21081
20886
|
for (let i = filteredOptions.length - 1; i >= currentIndex; i--) {
|
|
21082
20887
|
const item2 = filteredOptions[i];
|
|
21083
|
-
if (item2.enabled !== false) {
|
|
20888
|
+
if (item2 && item2.enabled !== false) {
|
|
21084
20889
|
return i;
|
|
21085
20890
|
}
|
|
21086
20891
|
}
|
|
@@ -21110,8 +20915,11 @@ const Select = forwardRef(function Select2({
|
|
|
21110
20915
|
event.preventDefault();
|
|
21111
20916
|
if (selectedIndex >= 0 && selectedIndex < filteredOptions.length) {
|
|
21112
20917
|
const selectedItem = filteredOptions[selectedIndex];
|
|
21113
|
-
if (selectedItem.enabled !== false) {
|
|
20918
|
+
if (selectedItem && selectedItem.enabled !== false) {
|
|
21114
20919
|
toggleOption(selectedItem.value);
|
|
20920
|
+
if (!multiSelect) {
|
|
20921
|
+
setOpen(false);
|
|
20922
|
+
}
|
|
21115
20923
|
}
|
|
21116
20924
|
}
|
|
21117
20925
|
break;
|
|
@@ -21126,6 +20934,7 @@ const Select = forwardRef(function Select2({
|
|
|
21126
20934
|
selectedIndex,
|
|
21127
20935
|
filteredOptions,
|
|
21128
20936
|
toggleOption,
|
|
20937
|
+
multiSelect,
|
|
21129
20938
|
findNextEnabledIndex,
|
|
21130
20939
|
findPreviousEnabledIndex
|
|
21131
20940
|
]
|
|
@@ -21159,7 +20968,15 @@ const Select = forwardRef(function Select2({
|
|
|
21159
20968
|
[emptyListTemplate]
|
|
21160
20969
|
);
|
|
21161
20970
|
const onOptionAdd = useCallback((option) => {
|
|
21162
|
-
setOptions((prev) =>
|
|
20971
|
+
setOptions((prev) => {
|
|
20972
|
+
const exists = Array.from(prev).some((opt) => opt.value === option.value);
|
|
20973
|
+
if (exists) {
|
|
20974
|
+
return prev;
|
|
20975
|
+
}
|
|
20976
|
+
const newSet = new Set(prev);
|
|
20977
|
+
newSet.add(option);
|
|
20978
|
+
return newSet;
|
|
20979
|
+
});
|
|
21163
20980
|
}, []);
|
|
21164
20981
|
const onOptionRemove = useCallback((option) => {
|
|
21165
20982
|
setOptions((prev) => {
|
|
@@ -21178,138 +20995,286 @@ const Select = forwardRef(function Select2({
|
|
|
21178
20995
|
const selectContextValue = useMemo(
|
|
21179
20996
|
() => ({
|
|
21180
20997
|
multiSelect,
|
|
20998
|
+
readOnly: readOnly2,
|
|
21181
20999
|
value,
|
|
21182
21000
|
onChange: toggleOption,
|
|
21183
21001
|
setOpen,
|
|
21184
21002
|
setSelectedIndex,
|
|
21185
21003
|
options: options2,
|
|
21004
|
+
highlightedValue: selectedIndex >= 0 && selectedIndex < filteredOptions.length && filteredOptions[selectedIndex] ? filteredOptions[selectedIndex].value : void 0,
|
|
21186
21005
|
optionRenderer
|
|
21187
21006
|
}),
|
|
21188
|
-
[
|
|
21007
|
+
[
|
|
21008
|
+
multiSelect,
|
|
21009
|
+
readOnly2,
|
|
21010
|
+
value,
|
|
21011
|
+
toggleOption,
|
|
21012
|
+
options2,
|
|
21013
|
+
selectedIndex,
|
|
21014
|
+
filteredOptions,
|
|
21015
|
+
optionRenderer
|
|
21016
|
+
]
|
|
21189
21017
|
);
|
|
21190
|
-
return /* @__PURE__ */ jsx(SelectContext.Provider, { value: selectContextValue, children: /* @__PURE__ */
|
|
21191
|
-
/* @__PURE__ */
|
|
21192
|
-
|
|
21193
|
-
|
|
21194
|
-
|
|
21195
|
-
|
|
21196
|
-
|
|
21197
|
-
|
|
21198
|
-
|
|
21199
|
-
|
|
21200
|
-
|
|
21201
|
-
|
|
21202
|
-
|
|
21203
|
-
|
|
21204
|
-
onClick: (event) => {
|
|
21205
|
-
event.stopPropagation();
|
|
21206
|
-
setOpen((prev) => !prev);
|
|
21207
|
-
},
|
|
21208
|
-
className: classnames(
|
|
21209
|
-
styles$J.selectTrigger,
|
|
21210
|
-
styles$J[validationStatus],
|
|
21018
|
+
return /* @__PURE__ */ jsx(SelectContext.Provider, { value: selectContextValue, children: /* @__PURE__ */ jsxs(OptionContext.Provider, { value: optionContextValue, children: [
|
|
21019
|
+
/* @__PURE__ */ jsx(OptionTypeProvider, { Component: VisibleSelectOption, children: /* @__PURE__ */ jsxs(
|
|
21020
|
+
Popover,
|
|
21021
|
+
{
|
|
21022
|
+
open,
|
|
21023
|
+
onOpenChange: (isOpen) => {
|
|
21024
|
+
if (!enabled2) return;
|
|
21025
|
+
setOpen(isOpen);
|
|
21026
|
+
setSelectedIndex(-1);
|
|
21027
|
+
},
|
|
21028
|
+
modal: false,
|
|
21029
|
+
children: [
|
|
21030
|
+
/* @__PURE__ */ jsxs(
|
|
21031
|
+
PopoverTrigger,
|
|
21211
21032
|
{
|
|
21212
|
-
|
|
21213
|
-
|
|
21214
|
-
|
|
21215
|
-
|
|
21216
|
-
|
|
21217
|
-
|
|
21218
|
-
|
|
21219
|
-
|
|
21220
|
-
|
|
21221
|
-
|
|
21222
|
-
|
|
21223
|
-
|
|
21224
|
-
|
|
21225
|
-
|
|
21226
|
-
|
|
21227
|
-
|
|
21228
|
-
|
|
21229
|
-
|
|
21230
|
-
|
|
21231
|
-
|
|
21232
|
-
|
|
21233
|
-
|
|
21234
|
-
|
|
21235
|
-
|
|
21236
|
-
|
|
21237
|
-
|
|
21238
|
-
|
|
21239
|
-
|
|
21240
|
-
|
|
21241
|
-
|
|
21242
|
-
}
|
|
21243
|
-
),
|
|
21244
|
-
open && /* @__PURE__ */ jsx(Portal$1, { container: root2, children: /* @__PURE__ */ jsx(FocusScope, { asChild: true, loop: true, trapped: true, children: /* @__PURE__ */ jsx(
|
|
21245
|
-
PopoverContent,
|
|
21246
|
-
{
|
|
21247
|
-
style: { minWidth: width, height: dropdownHeight },
|
|
21248
|
-
className: styles$J.selectContent,
|
|
21249
|
-
onKeyDown: handleKeyDown,
|
|
21250
|
-
children: /* @__PURE__ */ jsxs("div", { className: styles$J.command, children: [
|
|
21251
|
-
searchable ? /* @__PURE__ */ jsxs("div", { className: styles$J.commandInputContainer, children: [
|
|
21252
|
-
/* @__PURE__ */ jsx(Icon, { name: "search" }),
|
|
21253
|
-
/* @__PURE__ */ jsx(
|
|
21254
|
-
"input",
|
|
21255
|
-
{
|
|
21256
|
-
role: "combobox",
|
|
21257
|
-
className: classnames(styles$J.commandInput),
|
|
21258
|
-
placeholder: "Search...",
|
|
21259
|
-
value: searchTerm,
|
|
21260
|
-
onChange: (e) => setSearchTerm(e.target.value),
|
|
21261
|
-
autoFocus: true
|
|
21033
|
+
...rest,
|
|
21034
|
+
ref: composeRefs(setReferenceElement, forwardedRef),
|
|
21035
|
+
id,
|
|
21036
|
+
"aria-haspopup": "listbox",
|
|
21037
|
+
style: style2,
|
|
21038
|
+
onFocus,
|
|
21039
|
+
onBlur,
|
|
21040
|
+
disabled: !enabled2,
|
|
21041
|
+
"aria-expanded": open,
|
|
21042
|
+
"data-part-id": PART_LIST_WRAPPER$1,
|
|
21043
|
+
className: classnames(className, styles$J.selectTrigger, styles$J[validationStatus], {
|
|
21044
|
+
[styles$J.disabled]: !enabled2,
|
|
21045
|
+
[styles$J.multi]: multiSelect
|
|
21046
|
+
}),
|
|
21047
|
+
role: "combobox",
|
|
21048
|
+
onClick: (event) => {
|
|
21049
|
+
if (!enabled2) return;
|
|
21050
|
+
event.stopPropagation();
|
|
21051
|
+
setOpen((prev) => !prev);
|
|
21052
|
+
},
|
|
21053
|
+
onKeyDown: (event) => {
|
|
21054
|
+
if (!enabled2 || readOnly2) return;
|
|
21055
|
+
if (!open && (event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === " " || event.key === "Enter")) {
|
|
21056
|
+
event.preventDefault();
|
|
21057
|
+
setOpen(true);
|
|
21058
|
+
if (filteredOptions.length > 0) {
|
|
21059
|
+
const firstEnabledIndex = findNextEnabledIndex(-1);
|
|
21060
|
+
setSelectedIndex(firstEnabledIndex !== -1 ? firstEnabledIndex : 0);
|
|
21061
|
+
}
|
|
21062
|
+
return;
|
|
21262
21063
|
}
|
|
21263
|
-
|
|
21264
|
-
|
|
21265
|
-
|
|
21266
|
-
|
|
21267
|
-
|
|
21268
|
-
|
|
21269
|
-
|
|
21270
|
-
|
|
21271
|
-
|
|
21272
|
-
|
|
21273
|
-
|
|
21274
|
-
|
|
21275
|
-
|
|
21276
|
-
|
|
21277
|
-
|
|
21278
|
-
|
|
21279
|
-
|
|
21280
|
-
|
|
21281
|
-
|
|
21282
|
-
|
|
21283
|
-
|
|
21284
|
-
|
|
21285
|
-
|
|
21286
|
-
|
|
21287
|
-
|
|
21288
|
-
|
|
21289
|
-
|
|
21290
|
-
|
|
21291
|
-
|
|
21292
|
-
|
|
21293
|
-
|
|
21294
|
-
|
|
21295
|
-
|
|
21296
|
-
|
|
21297
|
-
|
|
21298
|
-
|
|
21299
|
-
|
|
21300
|
-
|
|
21301
|
-
|
|
21302
|
-
|
|
21303
|
-
|
|
21304
|
-
|
|
21305
|
-
|
|
21306
|
-
|
|
21307
|
-
|
|
21308
|
-
|
|
21309
|
-
|
|
21310
|
-
|
|
21311
|
-
|
|
21064
|
+
if (open) {
|
|
21065
|
+
handleKeyDown(event);
|
|
21066
|
+
}
|
|
21067
|
+
},
|
|
21068
|
+
autoFocus,
|
|
21069
|
+
children: [
|
|
21070
|
+
/* @__PURE__ */ jsx(
|
|
21071
|
+
SelectTriggerValue,
|
|
21072
|
+
{
|
|
21073
|
+
value,
|
|
21074
|
+
placeholder: placeholder2,
|
|
21075
|
+
readOnly: readOnly2,
|
|
21076
|
+
multiSelect,
|
|
21077
|
+
options: options2,
|
|
21078
|
+
valueRenderer,
|
|
21079
|
+
toggleOption
|
|
21080
|
+
}
|
|
21081
|
+
),
|
|
21082
|
+
/* @__PURE__ */ jsx(
|
|
21083
|
+
SelectTriggerActions,
|
|
21084
|
+
{
|
|
21085
|
+
value,
|
|
21086
|
+
multiSelect,
|
|
21087
|
+
enabled: enabled2,
|
|
21088
|
+
readOnly: readOnly2,
|
|
21089
|
+
clearValue
|
|
21090
|
+
}
|
|
21091
|
+
)
|
|
21092
|
+
]
|
|
21093
|
+
}
|
|
21094
|
+
),
|
|
21095
|
+
open && /* @__PURE__ */ jsx(Portal, { container: root2, children: /* @__PURE__ */ jsx(
|
|
21096
|
+
PopoverContent,
|
|
21097
|
+
{
|
|
21098
|
+
style: { minWidth: width, height: dropdownHeight },
|
|
21099
|
+
className: styles$J.selectContent,
|
|
21100
|
+
onKeyDown: handleKeyDown,
|
|
21101
|
+
children: /* @__PURE__ */ jsxs("div", { className: styles$J.command, children: [
|
|
21102
|
+
searchable ? /* @__PURE__ */ jsxs("div", { className: styles$J.commandInputContainer, children: [
|
|
21103
|
+
/* @__PURE__ */ jsx(Icon, { name: "search" }),
|
|
21104
|
+
/* @__PURE__ */ jsx(
|
|
21105
|
+
"input",
|
|
21106
|
+
{
|
|
21107
|
+
role: "searchbox",
|
|
21108
|
+
className: classnames(styles$J.commandInput),
|
|
21109
|
+
placeholder: "Search...",
|
|
21110
|
+
value: searchTerm,
|
|
21111
|
+
onChange: (e) => setSearchTerm(e.target.value)
|
|
21112
|
+
}
|
|
21113
|
+
)
|
|
21114
|
+
] }) : /* @__PURE__ */ jsx("button", { "aria-hidden": "true", className: styles$J.srOnly }),
|
|
21115
|
+
/* @__PURE__ */ jsx("div", { role: "listbox", className: styles$J.commandList, children: inProgress ? /* @__PURE__ */ jsx("div", { className: styles$J.loading, children: inProgressNotificationMessage }) : searchable && searchTerm ? (
|
|
21116
|
+
// When searching, show only filtered options
|
|
21117
|
+
filteredOptions.length === 0 ? /* @__PURE__ */ jsx("div", { children: emptyListNode }) : filteredOptions.map(({ value: value2, label: label2, enabled: enabled22, keywords }, index) => /* @__PURE__ */ jsx(
|
|
21118
|
+
SelectOptionItem,
|
|
21119
|
+
{
|
|
21120
|
+
readOnly: readOnly2,
|
|
21121
|
+
value: value2,
|
|
21122
|
+
label: label2,
|
|
21123
|
+
enabled: enabled22,
|
|
21124
|
+
keywords,
|
|
21125
|
+
isHighlighted: selectedIndex === index,
|
|
21126
|
+
itemIndex: index
|
|
21127
|
+
},
|
|
21128
|
+
value2
|
|
21129
|
+
))
|
|
21130
|
+
) : (
|
|
21131
|
+
// When not searching, show all children (includes Options and other components like Button)
|
|
21132
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21133
|
+
children,
|
|
21134
|
+
options2.size === 0 && /* @__PURE__ */ jsx("div", { children: emptyListNode })
|
|
21135
|
+
] })
|
|
21136
|
+
) })
|
|
21137
|
+
] })
|
|
21138
|
+
}
|
|
21139
|
+
) })
|
|
21140
|
+
]
|
|
21141
|
+
}
|
|
21142
|
+
) }),
|
|
21143
|
+
!open && /* @__PURE__ */ jsx("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx(OptionTypeProvider, { Component: HiddenOption, children }) })
|
|
21144
|
+
] }) });
|
|
21312
21145
|
});
|
|
21146
|
+
function VisibleSelectOption(option) {
|
|
21147
|
+
const { value, label: label2, enabled: enabled2 = true, children } = option;
|
|
21148
|
+
const { onOptionAdd } = useOption();
|
|
21149
|
+
const {
|
|
21150
|
+
value: selectedValue,
|
|
21151
|
+
onChange,
|
|
21152
|
+
multiSelect,
|
|
21153
|
+
readOnly: readOnly2,
|
|
21154
|
+
setOpen,
|
|
21155
|
+
highlightedValue,
|
|
21156
|
+
optionRenderer
|
|
21157
|
+
} = useSelect();
|
|
21158
|
+
const optionRef = useRef(null);
|
|
21159
|
+
const opt = useMemo(() => {
|
|
21160
|
+
return {
|
|
21161
|
+
...option,
|
|
21162
|
+
label: label2 ?? "",
|
|
21163
|
+
keywords: option.keywords || [label2 ?? ""]
|
|
21164
|
+
};
|
|
21165
|
+
}, [option, label2]);
|
|
21166
|
+
useEffect(() => {
|
|
21167
|
+
onOptionAdd(opt);
|
|
21168
|
+
}, [opt, onOptionAdd]);
|
|
21169
|
+
const selected2 = useMemo(() => {
|
|
21170
|
+
return Array.isArray(selectedValue) && multiSelect ? selectedValue.map((v) => String(v)).includes(value) : String(selectedValue) === String(value);
|
|
21171
|
+
}, [selectedValue, value, multiSelect]);
|
|
21172
|
+
const isHighlighted = useMemo(() => {
|
|
21173
|
+
return highlightedValue !== void 0 && String(highlightedValue) === String(value);
|
|
21174
|
+
}, [highlightedValue, value]);
|
|
21175
|
+
useEffect(() => {
|
|
21176
|
+
if (isHighlighted && optionRef.current) {
|
|
21177
|
+
optionRef.current.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
21178
|
+
}
|
|
21179
|
+
}, [isHighlighted]);
|
|
21180
|
+
const handleClick = () => {
|
|
21181
|
+
if (readOnly2) {
|
|
21182
|
+
setOpen(false);
|
|
21183
|
+
return;
|
|
21184
|
+
}
|
|
21185
|
+
if (enabled2) {
|
|
21186
|
+
onChange(value);
|
|
21187
|
+
}
|
|
21188
|
+
};
|
|
21189
|
+
return /* @__PURE__ */ jsx(
|
|
21190
|
+
"div",
|
|
21191
|
+
{
|
|
21192
|
+
ref: optionRef,
|
|
21193
|
+
role: "option",
|
|
21194
|
+
"aria-disabled": !enabled2,
|
|
21195
|
+
"aria-selected": selected2,
|
|
21196
|
+
className: classnames(styles$J.multiSelectOption, {
|
|
21197
|
+
[styles$J.disabledOption]: !enabled2,
|
|
21198
|
+
[styles$J.highlighted]: isHighlighted
|
|
21199
|
+
}),
|
|
21200
|
+
onMouseDown: (e) => {
|
|
21201
|
+
e.preventDefault();
|
|
21202
|
+
e.stopPropagation();
|
|
21203
|
+
},
|
|
21204
|
+
onClick: handleClick,
|
|
21205
|
+
"data-state": selected2 ? "checked" : void 0,
|
|
21206
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$J.multiSelectOptionContent, children: optionRenderer ? optionRenderer({ label: label2, value, enabled: enabled2 }, selectedValue, false) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21207
|
+
children || label2,
|
|
21208
|
+
selected2 && /* @__PURE__ */ jsx(Icon, { name: "checkmark" })
|
|
21209
|
+
] }) })
|
|
21210
|
+
}
|
|
21211
|
+
);
|
|
21212
|
+
}
|
|
21213
|
+
function SelectOptionItem(option) {
|
|
21214
|
+
const {
|
|
21215
|
+
value,
|
|
21216
|
+
label: label2,
|
|
21217
|
+
enabled: enabled2 = true,
|
|
21218
|
+
readOnly: readOnly2,
|
|
21219
|
+
children,
|
|
21220
|
+
isHighlighted = false,
|
|
21221
|
+
itemIndex
|
|
21222
|
+
} = option;
|
|
21223
|
+
const {
|
|
21224
|
+
value: selectedValue,
|
|
21225
|
+
onChange,
|
|
21226
|
+
multiSelect,
|
|
21227
|
+
setOpen,
|
|
21228
|
+
setSelectedIndex,
|
|
21229
|
+
optionRenderer
|
|
21230
|
+
} = useSelect();
|
|
21231
|
+
const optionRef = useRef(null);
|
|
21232
|
+
const selected2 = useMemo(() => {
|
|
21233
|
+
return Array.isArray(selectedValue) && multiSelect ? selectedValue.map((v) => String(v)).includes(value) : String(selectedValue) === String(value);
|
|
21234
|
+
}, [selectedValue, value, multiSelect]);
|
|
21235
|
+
useEffect(() => {
|
|
21236
|
+
if (isHighlighted && optionRef.current) {
|
|
21237
|
+
optionRef.current.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
21238
|
+
}
|
|
21239
|
+
}, [isHighlighted]);
|
|
21240
|
+
const handleClick = () => {
|
|
21241
|
+
if (readOnly2) {
|
|
21242
|
+
setOpen(false);
|
|
21243
|
+
return;
|
|
21244
|
+
}
|
|
21245
|
+
if (enabled2) {
|
|
21246
|
+
onChange(value);
|
|
21247
|
+
}
|
|
21248
|
+
};
|
|
21249
|
+
return /* @__PURE__ */ jsx(
|
|
21250
|
+
"div",
|
|
21251
|
+
{
|
|
21252
|
+
ref: optionRef,
|
|
21253
|
+
role: "option",
|
|
21254
|
+
"aria-disabled": !enabled2,
|
|
21255
|
+
"aria-selected": selected2,
|
|
21256
|
+
className: classnames(styles$J.multiSelectOption, {
|
|
21257
|
+
[styles$J.disabledOption]: !enabled2,
|
|
21258
|
+
[styles$J.highlighted]: isHighlighted
|
|
21259
|
+
}),
|
|
21260
|
+
onMouseDown: (e) => {
|
|
21261
|
+
e.preventDefault();
|
|
21262
|
+
e.stopPropagation();
|
|
21263
|
+
},
|
|
21264
|
+
onMouseEnter: () => {
|
|
21265
|
+
if (itemIndex !== void 0 && setSelectedIndex && enabled2) {
|
|
21266
|
+
setSelectedIndex(itemIndex);
|
|
21267
|
+
}
|
|
21268
|
+
},
|
|
21269
|
+
onClick: handleClick,
|
|
21270
|
+
"data-state": selected2 ? "checked" : void 0,
|
|
21271
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$J.multiSelectOptionContent, children: optionRenderer ? optionRenderer({ label: label2, value, enabled: enabled2 }, selectedValue, false) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21272
|
+
children || label2,
|
|
21273
|
+
selected2 && /* @__PURE__ */ jsx(Icon, { name: "checkmark" })
|
|
21274
|
+
] }) })
|
|
21275
|
+
}
|
|
21276
|
+
);
|
|
21277
|
+
}
|
|
21313
21278
|
const themeVars$o = `'{"gap-RadioGroupOption": "var(--xmlui-gap-RadioGroupOption)", "borderWidth-RadioGroupOption": "var(--xmlui-borderWidth-RadioGroupOption)", "borderWidth-RadioGroupOption-validation": "var(--xmlui-borderWidth-RadioGroupOption-validation)", "Input:borderColor-RadioGroupOption-default": "var(--xmlui-borderColor-RadioGroupOption-default)", "Input:borderColor-checked-RadioGroupOption": "var(--xmlui-borderColor-checked-RadioGroupOption)", "Input:borderColor-RadioGroupOption-default--hover": "var(--xmlui-borderColor-RadioGroupOption-default--hover)", "Input:borderColor-RadioGroupOption-default--active": "var(--xmlui-borderColor-RadioGroupOption-default--active)", "Input:borderColor-RadioGroupOption--disabled": "var(--xmlui-borderColor-RadioGroupOption--disabled)", "Input:borderColor-RadioGroupOption-error": "var(--xmlui-borderColor-RadioGroupOption-error)", "Input:borderColor-RadioGroupOption-warning": "var(--xmlui-borderColor-RadioGroupOption-warning)", "Input:borderColor-RadioGroupOption-success": "var(--xmlui-borderColor-RadioGroupOption-success)", "Input:backgroundColor-RadioGroupOption-default": "var(--xmlui-backgroundColor-RadioGroupOption-default)", "Input:backgroundColor-checked-RadioGroupOption": "var(--xmlui-backgroundColor-checked-RadioGroupOption)", "Input:backgroundColor-checked-RadioGroupOption--disabled": "var(--xmlui-backgroundColor-checked-RadioGroupOption--disabled)", "Input:color-RadioGroupOption--disabled": "var(--xmlui-color-RadioGroupOption--disabled)", "Input:fontSize-RadioGroupOption": "var(--xmlui-fontSize-RadioGroupOption)", "Input:fontWeight-RadioGroupOption": "var(--xmlui-fontWeight-RadioGroupOption)", "Input:textColor-RadioGroupOption-default": "var(--xmlui-textColor-RadioGroupOption-default)", "Input:textColor-RadioGroupOption-error": "var(--xmlui-textColor-RadioGroupOption-error)", "Input:textColor-RadioGroupOption-warning": "var(--xmlui-textColor-RadioGroupOption-warning)", "Input:textColor-RadioGroupOption-success": "var(--xmlui-textColor-RadioGroupOption-success)", "Input:outlineWidth-RadioGroupOption--focus": "var(--xmlui-outlineWidth-RadioGroupOption--focus)", "Input:outlineColor-RadioGroupOption--focus": "var(--xmlui-outlineColor-RadioGroupOption--focus)", "Input:outlineStyle-RadioGroupOption--focus": "var(--xmlui-outlineStyle-RadioGroupOption--focus)", "Input:outlineOffset-RadioGroupOption--focus": "var(--xmlui-outlineOffset-RadioGroupOption--focus)"}'`;
|
|
21314
21279
|
const radioGroupContainer = "_radioGroupContainer_fn2iu_14";
|
|
21315
21280
|
const radioOptionContainer = "_radioOptionContainer_fn2iu_20";
|
|
@@ -22117,32 +22082,24 @@ function ValidationSummary({
|
|
|
22117
22082
|
});
|
|
22118
22083
|
return ret;
|
|
22119
22084
|
}, [fieldValidationResults, generalValidationResults]);
|
|
22120
|
-
return /* @__PURE__ */ jsxs(
|
|
22121
|
-
|
|
22122
|
-
|
|
22123
|
-
|
|
22124
|
-
|
|
22125
|
-
|
|
22126
|
-
|
|
22127
|
-
|
|
22128
|
-
|
|
22129
|
-
|
|
22130
|
-
|
|
22131
|
-
|
|
22132
|
-
|
|
22133
|
-
|
|
22134
|
-
|
|
22135
|
-
|
|
22136
|
-
|
|
22137
|
-
|
|
22138
|
-
issues: groupedInvalidResults.error,
|
|
22139
|
-
severity: "error",
|
|
22140
|
-
heading: "Validation errors"
|
|
22141
|
-
}
|
|
22142
|
-
)
|
|
22143
|
-
]
|
|
22144
|
-
}
|
|
22145
|
-
);
|
|
22085
|
+
return /* @__PURE__ */ jsxs("div", { ref: animateContainerRef, className: styles$F.summaryContainer, "data-validation-summary": true, children: [
|
|
22086
|
+
/* @__PURE__ */ jsx(
|
|
22087
|
+
ValidationDisplay,
|
|
22088
|
+
{
|
|
22089
|
+
issues: groupedInvalidResults.warning,
|
|
22090
|
+
severity: "warning",
|
|
22091
|
+
heading: "Validation warnings"
|
|
22092
|
+
}
|
|
22093
|
+
),
|
|
22094
|
+
/* @__PURE__ */ jsx(
|
|
22095
|
+
ValidationDisplay,
|
|
22096
|
+
{
|
|
22097
|
+
issues: groupedInvalidResults.error,
|
|
22098
|
+
severity: "error",
|
|
22099
|
+
heading: "Validation errors"
|
|
22100
|
+
}
|
|
22101
|
+
)
|
|
22102
|
+
] });
|
|
22146
22103
|
}
|
|
22147
22104
|
const ValidationDisplay = ({
|
|
22148
22105
|
heading: heading2,
|
|
@@ -22893,7 +22850,15 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
22893
22850
|
onDidChange(newValue);
|
|
22894
22851
|
}, [multi, updateState, onDidChange]);
|
|
22895
22852
|
const onOptionAdd = useCallback((option) => {
|
|
22896
|
-
setOptions((prev) =>
|
|
22853
|
+
setOptions((prev) => {
|
|
22854
|
+
const newSet = new Set(prev);
|
|
22855
|
+
const existing = Array.from(prev).find((opt) => opt.value === option.value);
|
|
22856
|
+
if (existing) {
|
|
22857
|
+
newSet.delete(existing);
|
|
22858
|
+
}
|
|
22859
|
+
newSet.add(option);
|
|
22860
|
+
return newSet;
|
|
22861
|
+
});
|
|
22897
22862
|
}, []);
|
|
22898
22863
|
const onOptionRemove = useCallback((option) => {
|
|
22899
22864
|
setOptions((prev) => {
|
|
@@ -23109,6 +23074,14 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23109
23074
|
}
|
|
23110
23075
|
),
|
|
23111
23076
|
"aria-expanded": open,
|
|
23077
|
+
onClick: (event) => {
|
|
23078
|
+
if (readOnly2) return;
|
|
23079
|
+
if (multi && open) {
|
|
23080
|
+
return;
|
|
23081
|
+
}
|
|
23082
|
+
event.stopPropagation();
|
|
23083
|
+
setOpen((prev) => !prev);
|
|
23084
|
+
},
|
|
23112
23085
|
children: [
|
|
23113
23086
|
Array.isArray(selectedValue) && selectedValue.length > 0 && /* @__PURE__ */ jsx("div", { className: styles$E.badgeList, children: selectedValue.map((v, index) => /* @__PURE__ */ jsxs("span", { className: styles$E.badge, children: [
|
|
23114
23087
|
v == null ? void 0 : v.label,
|
|
@@ -23206,7 +23179,7 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23206
23179
|
]
|
|
23207
23180
|
}
|
|
23208
23181
|
) }),
|
|
23209
|
-
open && /* @__PURE__ */ jsx(Portal
|
|
23182
|
+
open && /* @__PURE__ */ jsx(Portal, { container: root2, children: /* @__PURE__ */ jsx(
|
|
23210
23183
|
PopoverContent,
|
|
23211
23184
|
{
|
|
23212
23185
|
style: { width, height: dropdownHeight },
|
|
@@ -23256,7 +23229,7 @@ const AutoComplete = forwardRef(function AutoComplete2({
|
|
|
23256
23229
|
] }) }) });
|
|
23257
23230
|
});
|
|
23258
23231
|
function CreatableItem({ onNewItem, isHighlighted = false }) {
|
|
23259
|
-
const { value, options: options2, searchTerm, onChange, setOpen, setSelectedIndex } = useAutoComplete();
|
|
23232
|
+
const { value, options: options2, searchTerm, onChange, setOpen, setSelectedIndex, multi } = useAutoComplete();
|
|
23260
23233
|
const { onOptionAdd } = useOption();
|
|
23261
23234
|
if (isOptionsExist(options2, [{ value: searchTerm, label: searchTerm }]) || Array.isArray(value) && (value == null ? void 0 : value.find((s) => s === searchTerm)) || searchTerm === value) {
|
|
23262
23235
|
return /* @__PURE__ */ jsx("span", { style: { display: "none" } });
|
|
@@ -23266,7 +23239,9 @@ function CreatableItem({ onNewItem, isHighlighted = false }) {
|
|
|
23266
23239
|
onOptionAdd(newOption);
|
|
23267
23240
|
onNewItem == null ? void 0 : onNewItem(searchTerm);
|
|
23268
23241
|
onChange(searchTerm);
|
|
23269
|
-
|
|
23242
|
+
if (!multi) {
|
|
23243
|
+
setOpen(false);
|
|
23244
|
+
}
|
|
23270
23245
|
};
|
|
23271
23246
|
const Item2 = /* @__PURE__ */ jsx(
|
|
23272
23247
|
"div",
|
|
@@ -23317,7 +23292,9 @@ function AutoCompleteOption(option) {
|
|
|
23317
23292
|
const handleClick = () => {
|
|
23318
23293
|
if (!readOnly2 && enabled2) {
|
|
23319
23294
|
onChange(value);
|
|
23320
|
-
|
|
23295
|
+
if (!multi) {
|
|
23296
|
+
setOpen(false);
|
|
23297
|
+
}
|
|
23321
23298
|
}
|
|
23322
23299
|
};
|
|
23323
23300
|
return /* @__PURE__ */ jsx(
|
|
@@ -23469,31 +23446,220 @@ const styles$A = {
|
|
|
23469
23446
|
htmlVideo,
|
|
23470
23447
|
htmlDetails
|
|
23471
23448
|
};
|
|
23472
|
-
|
|
23473
|
-
const
|
|
23474
|
-
|
|
23449
|
+
function uint8ArrayToBase64(bytes) {
|
|
23450
|
+
const base64abc = [
|
|
23451
|
+
"A",
|
|
23452
|
+
"B",
|
|
23453
|
+
"C",
|
|
23454
|
+
"D",
|
|
23455
|
+
"E",
|
|
23456
|
+
"F",
|
|
23457
|
+
"G",
|
|
23458
|
+
"H",
|
|
23459
|
+
"I",
|
|
23460
|
+
"J",
|
|
23461
|
+
"K",
|
|
23462
|
+
"L",
|
|
23463
|
+
"M",
|
|
23464
|
+
"N",
|
|
23465
|
+
"O",
|
|
23466
|
+
"P",
|
|
23467
|
+
"Q",
|
|
23468
|
+
"R",
|
|
23469
|
+
"S",
|
|
23470
|
+
"T",
|
|
23471
|
+
"U",
|
|
23472
|
+
"V",
|
|
23473
|
+
"W",
|
|
23474
|
+
"X",
|
|
23475
|
+
"Y",
|
|
23476
|
+
"Z",
|
|
23477
|
+
"a",
|
|
23478
|
+
"b",
|
|
23479
|
+
"c",
|
|
23480
|
+
"d",
|
|
23481
|
+
"e",
|
|
23482
|
+
"f",
|
|
23483
|
+
"g",
|
|
23484
|
+
"h",
|
|
23485
|
+
"i",
|
|
23486
|
+
"j",
|
|
23487
|
+
"k",
|
|
23488
|
+
"l",
|
|
23489
|
+
"m",
|
|
23490
|
+
"n",
|
|
23491
|
+
"o",
|
|
23492
|
+
"p",
|
|
23493
|
+
"q",
|
|
23494
|
+
"r",
|
|
23495
|
+
"s",
|
|
23496
|
+
"t",
|
|
23497
|
+
"u",
|
|
23498
|
+
"v",
|
|
23499
|
+
"w",
|
|
23500
|
+
"x",
|
|
23501
|
+
"y",
|
|
23502
|
+
"z",
|
|
23503
|
+
"0",
|
|
23504
|
+
"1",
|
|
23505
|
+
"2",
|
|
23506
|
+
"3",
|
|
23507
|
+
"4",
|
|
23508
|
+
"5",
|
|
23509
|
+
"6",
|
|
23510
|
+
"7",
|
|
23511
|
+
"8",
|
|
23512
|
+
"9",
|
|
23513
|
+
"+",
|
|
23514
|
+
"/"
|
|
23515
|
+
];
|
|
23516
|
+
let result = "";
|
|
23517
|
+
let i;
|
|
23518
|
+
const l = bytes.length;
|
|
23519
|
+
for (i = 2; i < l; i += 3) {
|
|
23520
|
+
result += base64abc[bytes[i - 2] >> 2];
|
|
23521
|
+
result += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
23522
|
+
result += base64abc[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
|
|
23523
|
+
result += base64abc[bytes[i] & 63];
|
|
23524
|
+
}
|
|
23525
|
+
if (i === l + 1) {
|
|
23526
|
+
result += base64abc[bytes[i - 2] >> 2];
|
|
23527
|
+
result += base64abc[(bytes[i - 2] & 3) << 4];
|
|
23528
|
+
result += "==";
|
|
23529
|
+
}
|
|
23530
|
+
if (i === l) {
|
|
23531
|
+
result += base64abc[bytes[i - 2] >> 2];
|
|
23532
|
+
result += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
23533
|
+
result += base64abc[(bytes[i - 1] & 15) << 2];
|
|
23534
|
+
result += "=";
|
|
23535
|
+
}
|
|
23536
|
+
return result;
|
|
23537
|
+
}
|
|
23475
23538
|
function encodeToBase64(value) {
|
|
23476
|
-
if (
|
|
23477
|
-
return
|
|
23539
|
+
if (value === null || value === void 0) {
|
|
23540
|
+
return "";
|
|
23478
23541
|
}
|
|
23479
23542
|
const valueToString = typeof value === "object" ? JSON.stringify(value) : value.toString();
|
|
23480
23543
|
if (typeof window !== "undefined") {
|
|
23481
|
-
|
|
23544
|
+
const encoder = new TextEncoder();
|
|
23545
|
+
const data = encoder.encode(valueToString);
|
|
23546
|
+
return uint8ArrayToBase64(data);
|
|
23482
23547
|
}
|
|
23483
|
-
const buff = Buffer.from(valueToString, "
|
|
23548
|
+
const buff = Buffer.from(valueToString, "utf8");
|
|
23484
23549
|
return buff.toString("base64");
|
|
23485
23550
|
}
|
|
23551
|
+
function base64ToUint8Array(base64) {
|
|
23552
|
+
const base64abc = [
|
|
23553
|
+
"A",
|
|
23554
|
+
"B",
|
|
23555
|
+
"C",
|
|
23556
|
+
"D",
|
|
23557
|
+
"E",
|
|
23558
|
+
"F",
|
|
23559
|
+
"G",
|
|
23560
|
+
"H",
|
|
23561
|
+
"I",
|
|
23562
|
+
"J",
|
|
23563
|
+
"K",
|
|
23564
|
+
"L",
|
|
23565
|
+
"M",
|
|
23566
|
+
"N",
|
|
23567
|
+
"O",
|
|
23568
|
+
"P",
|
|
23569
|
+
"Q",
|
|
23570
|
+
"R",
|
|
23571
|
+
"S",
|
|
23572
|
+
"T",
|
|
23573
|
+
"U",
|
|
23574
|
+
"V",
|
|
23575
|
+
"W",
|
|
23576
|
+
"X",
|
|
23577
|
+
"Y",
|
|
23578
|
+
"Z",
|
|
23579
|
+
"a",
|
|
23580
|
+
"b",
|
|
23581
|
+
"c",
|
|
23582
|
+
"d",
|
|
23583
|
+
"e",
|
|
23584
|
+
"f",
|
|
23585
|
+
"g",
|
|
23586
|
+
"h",
|
|
23587
|
+
"i",
|
|
23588
|
+
"j",
|
|
23589
|
+
"k",
|
|
23590
|
+
"l",
|
|
23591
|
+
"m",
|
|
23592
|
+
"n",
|
|
23593
|
+
"o",
|
|
23594
|
+
"p",
|
|
23595
|
+
"q",
|
|
23596
|
+
"r",
|
|
23597
|
+
"s",
|
|
23598
|
+
"t",
|
|
23599
|
+
"u",
|
|
23600
|
+
"v",
|
|
23601
|
+
"w",
|
|
23602
|
+
"x",
|
|
23603
|
+
"y",
|
|
23604
|
+
"z",
|
|
23605
|
+
"0",
|
|
23606
|
+
"1",
|
|
23607
|
+
"2",
|
|
23608
|
+
"3",
|
|
23609
|
+
"4",
|
|
23610
|
+
"5",
|
|
23611
|
+
"6",
|
|
23612
|
+
"7",
|
|
23613
|
+
"8",
|
|
23614
|
+
"9",
|
|
23615
|
+
"+",
|
|
23616
|
+
"/"
|
|
23617
|
+
];
|
|
23618
|
+
const lookup = new Uint8Array(256);
|
|
23619
|
+
for (let i = 0; i < base64abc.length; i++) {
|
|
23620
|
+
lookup[base64abc[i].charCodeAt(0)] = i;
|
|
23621
|
+
}
|
|
23622
|
+
let paddingLength = 0;
|
|
23623
|
+
if (base64.endsWith("==")) {
|
|
23624
|
+
paddingLength = 2;
|
|
23625
|
+
} else if (base64.endsWith("=")) {
|
|
23626
|
+
paddingLength = 1;
|
|
23627
|
+
}
|
|
23628
|
+
const length = base64.length;
|
|
23629
|
+
const bufferLength = length * 3 / 4 - paddingLength;
|
|
23630
|
+
const bytes = new Uint8Array(bufferLength);
|
|
23631
|
+
let p = 0;
|
|
23632
|
+
for (let i = 0; i < length; i += 4) {
|
|
23633
|
+
const encoded1 = lookup[base64.charCodeAt(i)];
|
|
23634
|
+
const encoded2 = lookup[base64.charCodeAt(i + 1)];
|
|
23635
|
+
const encoded3 = lookup[base64.charCodeAt(i + 2)];
|
|
23636
|
+
const encoded4 = lookup[base64.charCodeAt(i + 3)];
|
|
23637
|
+
bytes[p++] = encoded1 << 2 | encoded2 >> 4;
|
|
23638
|
+
if (p < bufferLength) {
|
|
23639
|
+
bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;
|
|
23640
|
+
}
|
|
23641
|
+
if (p < bufferLength) {
|
|
23642
|
+
bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;
|
|
23643
|
+
}
|
|
23644
|
+
}
|
|
23645
|
+
return bytes;
|
|
23646
|
+
}
|
|
23486
23647
|
function decodeFromBase64(value) {
|
|
23487
23648
|
if (!value) {
|
|
23488
23649
|
return null;
|
|
23489
23650
|
}
|
|
23490
23651
|
const valueToString = typeof value === "object" ? JSON.stringify(value) : value.toString();
|
|
23491
23652
|
if (typeof window !== "undefined") {
|
|
23492
|
-
|
|
23653
|
+
const bytes = base64ToUint8Array(valueToString);
|
|
23654
|
+
const decoder = new TextDecoder();
|
|
23655
|
+
return decoder.decode(bytes);
|
|
23493
23656
|
}
|
|
23494
23657
|
const buff = Buffer.from(valueToString, "base64");
|
|
23495
|
-
return buff.toString("
|
|
23658
|
+
return buff.toString("utf8");
|
|
23496
23659
|
}
|
|
23660
|
+
const highlightRowsClass = "codeBlockHighlightRow";
|
|
23661
|
+
const highlightSubstringsClass = "codeBlockHighlightString";
|
|
23662
|
+
const highlightSubstringsEmphasisClass = "codeBlockHighlightStringEmphasis";
|
|
23497
23663
|
function parseMetaAndHighlightCode(node, codeHighlighter, themeTone) {
|
|
23498
23664
|
const rawCodeStr = getCodeStrFromNode(node);
|
|
23499
23665
|
const rawMeta = getCodeMetaFromNode(node, CodeHighlighterMetaKeysData);
|
|
@@ -24522,7 +24688,7 @@ function ApiInterceptorProvider({
|
|
|
24522
24688
|
return;
|
|
24523
24689
|
}
|
|
24524
24690
|
void (async () => {
|
|
24525
|
-
const { initMock } = await import("./initMock-
|
|
24691
|
+
const { initMock } = await import("./initMock-DFcCR7ey.mjs");
|
|
24526
24692
|
const apiInstance2 = await initMock(interceptor);
|
|
24527
24693
|
setApiInstance(apiInstance2);
|
|
24528
24694
|
setInitialized(true);
|
|
@@ -24539,7 +24705,7 @@ function ApiInterceptorProvider({
|
|
|
24539
24705
|
if (process.env.VITE_MOCK_ENABLED) {
|
|
24540
24706
|
const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
|
|
24541
24707
|
useWorker ? import("./apiInterceptorWorker-QiltRtq1.mjs") : Promise.resolve({ createApiInterceptorWorker: () => null }),
|
|
24542
|
-
import("./initMock-
|
|
24708
|
+
import("./initMock-DFcCR7ey.mjs")
|
|
24543
24709
|
]);
|
|
24544
24710
|
if (interceptor || forceInitialize) {
|
|
24545
24711
|
const apiInstance2 = await initMock(interceptor || {});
|
|
@@ -24576,7 +24742,7 @@ function ApiInterceptorProvider({
|
|
|
24576
24742
|
void (async () => {
|
|
24577
24743
|
const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
|
|
24578
24744
|
import("./apiInterceptorWorker-QiltRtq1.mjs"),
|
|
24579
|
-
import("./initMock-
|
|
24745
|
+
import("./initMock-DFcCR7ey.mjs")
|
|
24580
24746
|
]);
|
|
24581
24747
|
const apiInstance2 = await initMock(interceptor);
|
|
24582
24748
|
await createApiInterceptorWorker(apiInstance2, parentInterceptorWorker);
|
|
@@ -25080,13 +25246,14 @@ async function compress(str) {
|
|
|
25080
25246
|
return await concatUint8Arrays(chunks);
|
|
25081
25247
|
}
|
|
25082
25248
|
async function concatUint8Arrays(uint8arrays) {
|
|
25083
|
-
const
|
|
25249
|
+
const blobParts = uint8arrays.map((u) => new Uint8Array(u).buffer);
|
|
25250
|
+
const blob = new Blob(blobParts);
|
|
25084
25251
|
const buffer = await blob.arrayBuffer();
|
|
25085
25252
|
return new Uint8Array(buffer);
|
|
25086
25253
|
}
|
|
25087
25254
|
async function createQueryString(target2) {
|
|
25088
25255
|
const compressed = await compress(target2);
|
|
25089
|
-
const base64 =
|
|
25256
|
+
const base64 = uint8ArrayToBase64(compressed);
|
|
25090
25257
|
return encodeURIComponent(base64);
|
|
25091
25258
|
}
|
|
25092
25259
|
function withoutTrailingSlash(str) {
|
|
@@ -25506,9 +25673,9 @@ const Markdown = memo(
|
|
|
25506
25673
|
},
|
|
25507
25674
|
samp({ ...props }) {
|
|
25508
25675
|
const markdownContentBase64 = props == null ? void 0 : props["data-pg-markdown"];
|
|
25509
|
-
const markdownContent2 = markdownContentBase64 ?
|
|
25676
|
+
const markdownContent2 = markdownContentBase64 ? decodeFromBase64(markdownContentBase64) : "";
|
|
25510
25677
|
const dataContentBase64 = props == null ? void 0 : props["data-pg-content"];
|
|
25511
|
-
const jsonContent =
|
|
25678
|
+
const jsonContent = decodeFromBase64(dataContentBase64);
|
|
25512
25679
|
const appProps = JSON.parse(jsonContent);
|
|
25513
25680
|
return /* @__PURE__ */ jsx(
|
|
25514
25681
|
AppWithCodeViewNative,
|
|
@@ -25536,7 +25703,7 @@ const Markdown = memo(
|
|
|
25536
25703
|
section({ children: children2, ...props }) {
|
|
25537
25704
|
const treeContentBase64 = props == null ? void 0 : props["data-tree-content"];
|
|
25538
25705
|
if (treeContentBase64 !== void 0) {
|
|
25539
|
-
const content2 =
|
|
25706
|
+
const content2 = decodeFromBase64(treeContentBase64);
|
|
25540
25707
|
return /* @__PURE__ */ jsx(TreeDisplay, { content: content2 });
|
|
25541
25708
|
}
|
|
25542
25709
|
return null;
|
|
@@ -26074,8 +26241,8 @@ function convertPlaygroundPatternToMarkdown(content2) {
|
|
|
26074
26241
|
}
|
|
26075
26242
|
}
|
|
26076
26243
|
const jsonString = JSON.stringify(pgContent);
|
|
26077
|
-
const base64ContentString =
|
|
26078
|
-
const base64MarkdownString =
|
|
26244
|
+
const base64ContentString = encodeToBase64(jsonString);
|
|
26245
|
+
const base64MarkdownString = encodeToBase64(markdownContent2);
|
|
26079
26246
|
return '<samp data-pg-content="' + base64ContentString + '" data-pg-markdown="' + base64MarkdownString + '"></samp>\n\n';
|
|
26080
26247
|
}
|
|
26081
26248
|
function observeTreeDisplay(content2) {
|
|
@@ -26108,7 +26275,7 @@ function observeTreeDisplay(content2) {
|
|
|
26108
26275
|
function convertTreeDisplayToMarkdown(content2) {
|
|
26109
26276
|
if (content2.startsWith("```xmlui-tree") && content2.endsWith("```")) {
|
|
26110
26277
|
const treeContent = content2.slice("```xmlui-tree".length, content2.indexOf("```", "```xmlui-tree".length)).trim();
|
|
26111
|
-
return `<section data-tree-content="${
|
|
26278
|
+
return `<section data-tree-content="${encodeToBase64(treeContent)}"></section>
|
|
26112
26279
|
|
|
26113
26280
|
`;
|
|
26114
26281
|
}
|
|
@@ -26549,7 +26716,7 @@ const Slider = forwardRef(
|
|
|
26549
26716
|
thumbsRef.current = thumbsRef.current.slice(0, displayValue.length);
|
|
26550
26717
|
}, [displayValue.length]);
|
|
26551
26718
|
return /* @__PURE__ */ jsx("div", { ...rest, ref, style: style2, className: classnames(styles$D.sliderContainer, className), "data-slider-container": true, children: /* @__PURE__ */ jsxs(
|
|
26552
|
-
Root
|
|
26719
|
+
Root,
|
|
26553
26720
|
{
|
|
26554
26721
|
ref: inputRef,
|
|
26555
26722
|
minStepsBetweenThumbs,
|
|
@@ -27225,7 +27392,7 @@ const FormItem = memo(function FormItem2({
|
|
|
27225
27392
|
onBlur,
|
|
27226
27393
|
style: style2,
|
|
27227
27394
|
className,
|
|
27228
|
-
validationResult: /* @__PURE__ */ jsx("div", { ref: animateContainerRef, children: isHelperTextShown && (validationResult == null ? void 0 : validationResult.validations.map((singleValidation, i) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
27395
|
+
validationResult: /* @__PURE__ */ jsx("div", { ref: animateContainerRef, className: styles$1k.helperTextContainer, children: isHelperTextShown && (validationResult == null ? void 0 : validationResult.validations.map((singleValidation, i) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
27229
27396
|
singleValidation.isValid && !!singleValidation.validMessage && /* @__PURE__ */ jsx(
|
|
27230
27397
|
HelperText,
|
|
27231
27398
|
{
|
|
@@ -30036,7 +30203,7 @@ const selectComponentRenderer = createComponentRenderer(
|
|
|
30036
30203
|
updateState: isControlled ? void 0 : updateState,
|
|
30037
30204
|
searchable,
|
|
30038
30205
|
initialValue: extractValue(node.props.initialValue),
|
|
30039
|
-
value:
|
|
30206
|
+
value: state == null ? void 0 : state.value,
|
|
30040
30207
|
autoFocus: extractValue.asOptionalBoolean(node.props.autoFocus),
|
|
30041
30208
|
enabled: extractValue.asOptionalBoolean(node.props.enabled),
|
|
30042
30209
|
placeholder: extractValue.asOptionalString(node.props.placeholder),
|
|
@@ -30071,7 +30238,7 @@ const selectComponentRenderer = createComponentRenderer(
|
|
|
30071
30238
|
$selectedValue: val,
|
|
30072
30239
|
$inTrigger: inTrigger
|
|
30073
30240
|
},
|
|
30074
|
-
renderChild:
|
|
30241
|
+
renderChild: renderChild2
|
|
30075
30242
|
}
|
|
30076
30243
|
);
|
|
30077
30244
|
} : void 0,
|
|
@@ -37840,7 +38007,7 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
37840
38007
|
className: classnames(className, styles$k.tabs, styles$k.accordionView),
|
|
37841
38008
|
style: style2,
|
|
37842
38009
|
children: /* @__PURE__ */ jsx(
|
|
37843
|
-
Root$
|
|
38010
|
+
Root$1,
|
|
37844
38011
|
{
|
|
37845
38012
|
value: `${currentTab}`,
|
|
37846
38013
|
onValueChange: (tab) => {
|
|
@@ -37856,7 +38023,7 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
37856
38023
|
className: styles$k.accordionRoot,
|
|
37857
38024
|
children: /* @__PURE__ */ jsxs("div", { className: styles$k.accordionInterleaved, children: [
|
|
37858
38025
|
/* @__PURE__ */ jsx(List, { className: styles$k.accordionList, children: tabItems.map((tab, index) => /* @__PURE__ */ jsx(
|
|
37859
|
-
Trigger
|
|
38026
|
+
Trigger,
|
|
37860
38027
|
{
|
|
37861
38028
|
value: tab.innerId,
|
|
37862
38029
|
asChild: true,
|
|
@@ -37891,7 +38058,7 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
37891
38058
|
) });
|
|
37892
38059
|
}
|
|
37893
38060
|
return /* @__PURE__ */ jsx(TabContext.Provider, { value: tabContextValue, children: /* @__PURE__ */ jsxs(
|
|
37894
|
-
Root$
|
|
38061
|
+
Root$1,
|
|
37895
38062
|
{
|
|
37896
38063
|
...rest,
|
|
37897
38064
|
id: tabsId,
|
|
@@ -37923,7 +38090,7 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
37923
38090
|
children: [
|
|
37924
38091
|
!distributeEvenly2 && !headerRenderer && tabAlignment === "end" && /* @__PURE__ */ jsx("div", { className: styles$k.filler, "data-orientation": orientation }),
|
|
37925
38092
|
!distributeEvenly2 && !headerRenderer && tabAlignment === "center" && /* @__PURE__ */ jsx("div", { className: styles$k.filler, "data-orientation": orientation }),
|
|
37926
|
-
tabItems.map((tab, index) => /* @__PURE__ */ jsx(Trigger
|
|
38093
|
+
tabItems.map((tab, index) => /* @__PURE__ */ jsx(Trigger, { value: tab.innerId, asChild: true, children: /* @__PURE__ */ jsx(
|
|
37927
38094
|
"div",
|
|
37928
38095
|
{
|
|
37929
38096
|
role: "tab",
|
|
@@ -38742,7 +38909,7 @@ const TabItemComponent = forwardRef(function TabItemComponent2({ children, label
|
|
|
38742
38909
|
const tabIndex = (tabItems == null ? void 0 : tabItems.findIndex((item2) => item2.innerId === innerId)) ?? 0;
|
|
38743
38910
|
const contentOrder = tabIndex * 2 + 1;
|
|
38744
38911
|
return /* @__PURE__ */ createElement(
|
|
38745
|
-
Content
|
|
38912
|
+
Content,
|
|
38746
38913
|
{
|
|
38747
38914
|
...rest,
|
|
38748
38915
|
key: innerId,
|
|
@@ -46470,7 +46637,7 @@ function IconProvider({ children }) {
|
|
|
46470
46637
|
/* @__PURE__ */ jsx("svg", { style: { display: "none" }, ref: spriteRootRef })
|
|
46471
46638
|
] });
|
|
46472
46639
|
}
|
|
46473
|
-
const version = "0.10.
|
|
46640
|
+
const version = "0.10.25";
|
|
46474
46641
|
const miscellaneousUtils = {
|
|
46475
46642
|
capitalize,
|
|
46476
46643
|
pluralize: pluralize$1,
|
|
@@ -46482,13 +46649,22 @@ const miscellaneousUtils = {
|
|
|
46482
46649
|
function isoDateString(date) {
|
|
46483
46650
|
return (!date ? /* @__PURE__ */ new Date() : new Date(date)).toJSON();
|
|
46484
46651
|
}
|
|
46485
|
-
function formatDate(date) {
|
|
46652
|
+
function formatDate(date, formatString) {
|
|
46653
|
+
if (formatString) {
|
|
46654
|
+
return format(new Date(date), formatString);
|
|
46655
|
+
}
|
|
46486
46656
|
return new Date(date).toLocaleDateString();
|
|
46487
46657
|
}
|
|
46488
|
-
function formatDateTime(date) {
|
|
46658
|
+
function formatDateTime(date, formatString) {
|
|
46659
|
+
if (formatString) {
|
|
46660
|
+
return format(new Date(date), formatString);
|
|
46661
|
+
}
|
|
46489
46662
|
return new Date(date).toLocaleString();
|
|
46490
46663
|
}
|
|
46491
|
-
function formatTime(date) {
|
|
46664
|
+
function formatTime(date, formatString) {
|
|
46665
|
+
if (formatString) {
|
|
46666
|
+
return format(new Date(date), formatString);
|
|
46667
|
+
}
|
|
46492
46668
|
return new Date(date).toLocaleTimeString();
|
|
46493
46669
|
}
|
|
46494
46670
|
function formatTimeWithoutSeconds(date) {
|
|
@@ -46738,21 +46914,21 @@ function createContainerReducer(debugView) {
|
|
|
46738
46914
|
case ContainerActionKind.EVENT_HANDLER_STARTED: {
|
|
46739
46915
|
const { eventName } = action2.payload;
|
|
46740
46916
|
const inProgressFlagName = `${eventName}InProgress`;
|
|
46741
|
-
state[uid] = { ...state[uid], [inProgressFlagName]: true };
|
|
46917
|
+
state[uid] = state[uid] ? { ...state[uid], [inProgressFlagName]: true } : { [inProgressFlagName]: true };
|
|
46742
46918
|
storeNextValue(state[uid]);
|
|
46743
46919
|
break;
|
|
46744
46920
|
}
|
|
46745
46921
|
case ContainerActionKind.EVENT_HANDLER_COMPLETED: {
|
|
46746
46922
|
const { eventName } = action2.payload;
|
|
46747
46923
|
const inProgressFlagName = `${eventName}InProgress`;
|
|
46748
|
-
state[uid] = { ...state[uid], [inProgressFlagName]: false };
|
|
46924
|
+
state[uid] = state[uid] ? { ...state[uid], [inProgressFlagName]: false } : { [inProgressFlagName]: false };
|
|
46749
46925
|
storeNextValue(state[uid]);
|
|
46750
46926
|
break;
|
|
46751
46927
|
}
|
|
46752
46928
|
case ContainerActionKind.EVENT_HANDLER_ERROR: {
|
|
46753
46929
|
const { eventName } = action2.payload;
|
|
46754
46930
|
const inProgressFlagName = `${eventName}InProgress`;
|
|
46755
|
-
state[uid] = { ...state[uid], [inProgressFlagName]: false };
|
|
46931
|
+
state[uid] = state[uid] ? { ...state[uid], [inProgressFlagName]: false } : { [inProgressFlagName]: false };
|
|
46756
46932
|
storeNextValue(state[uid]);
|
|
46757
46933
|
break;
|
|
46758
46934
|
}
|
|
@@ -48326,7 +48502,9 @@ const Container = memo(
|
|
|
48326
48502
|
const runCodeAsync = useEvent(
|
|
48327
48503
|
async (source, componentUid, options2, ...eventArgs) => {
|
|
48328
48504
|
var _a3, _b, _c;
|
|
48329
|
-
const canSignEventLifecycle = () =>
|
|
48505
|
+
const canSignEventLifecycle = () => {
|
|
48506
|
+
return componentUid.description !== void 0 && (options2 == null ? void 0 : options2.eventName) !== void 0;
|
|
48507
|
+
};
|
|
48330
48508
|
let changes = [];
|
|
48331
48509
|
const getComponentStateClone = () => {
|
|
48332
48510
|
changes.length = 0;
|
|
@@ -48844,7 +49022,9 @@ const StateContainer = memo(
|
|
|
48844
49022
|
const routingParams = useRoutingParams();
|
|
48845
49023
|
const memoedVars = useRef(/* @__PURE__ */ new Map());
|
|
48846
49024
|
const stateFromOutside = useShallowCompareMemoize(
|
|
48847
|
-
useMemo(() =>
|
|
49025
|
+
useMemo(() => {
|
|
49026
|
+
return extractScopedState(parentState, node.uses);
|
|
49027
|
+
}, [node.uses, parentState])
|
|
48848
49028
|
);
|
|
48849
49029
|
const debugView = useDebugView();
|
|
48850
49030
|
const containerReducer = createContainerReducer(debugView);
|
|
@@ -48853,10 +49033,15 @@ const StateContainer = memo(
|
|
|
48853
49033
|
const componentStateWithApis = useShallowCompareMemoize(
|
|
48854
49034
|
useMemo(() => {
|
|
48855
49035
|
const ret = { ...componentState };
|
|
49036
|
+
const registeredApiKeys = new Set(
|
|
49037
|
+
Object.getOwnPropertySymbols(componentApis).map((s) => s.description).filter((d2) => d2 !== void 0)
|
|
49038
|
+
);
|
|
48856
49039
|
for (const stateKey of Object.getOwnPropertySymbols(componentState)) {
|
|
48857
49040
|
const value = componentState[stateKey];
|
|
48858
49041
|
if (stateKey.description) {
|
|
48859
|
-
|
|
49042
|
+
if (registeredApiKeys.has(stateKey.description)) {
|
|
49043
|
+
ret[stateKey.description] = value;
|
|
49044
|
+
}
|
|
48860
49045
|
}
|
|
48861
49046
|
}
|
|
48862
49047
|
if (Reflect.ownKeys(componentApis).length === 0) {
|
|
@@ -48920,8 +49105,11 @@ const StateContainer = memo(
|
|
|
48920
49105
|
const mergedWithVars = useMergedState(resolvedLocalVars, componentStateWithApis);
|
|
48921
49106
|
const combinedState = useCombinedState(
|
|
48922
49107
|
stateFromOutside,
|
|
49108
|
+
// Parent state (lower priority) - allows local vars to shadow
|
|
48923
49109
|
node.contextVars,
|
|
49110
|
+
// Context vars like $item
|
|
48924
49111
|
mergedWithVars,
|
|
49112
|
+
// Local vars and component state (higher priority) - enables shadowing
|
|
48925
49113
|
routingParams
|
|
48926
49114
|
);
|
|
48927
49115
|
const registerComponentApi = useCallback((uid, api) => {
|
|
@@ -49805,9 +49993,19 @@ const ComponentAdapter = forwardRef(function ComponentAdapter2({
|
|
|
49805
49993
|
const stableLayoutCss = useShallowCompareMemoize(cssProps);
|
|
49806
49994
|
const className = useComponentStyle(stableLayoutCss);
|
|
49807
49995
|
const { inspectId, refreshInspection } = useInspector(safeNode, uid);
|
|
49996
|
+
const contextVars = useMemo(() => {
|
|
49997
|
+
const vars2 = {};
|
|
49998
|
+
for (const key of Object.keys(state)) {
|
|
49999
|
+
if (key.startsWith("$")) {
|
|
50000
|
+
vars2[key] = state[key];
|
|
50001
|
+
}
|
|
50002
|
+
}
|
|
50003
|
+
return vars2;
|
|
50004
|
+
}, [state]);
|
|
49808
50005
|
const rendererContext = {
|
|
49809
50006
|
node: safeNode,
|
|
49810
50007
|
state: state[uid] || EMPTY_OBJECT,
|
|
50008
|
+
contextVars,
|
|
49811
50009
|
updateState: memoedUpdateState,
|
|
49812
50010
|
appContext,
|
|
49813
50011
|
extractValue: valueExtractor,
|