@inf-monkeys-tech/monkeys-design 0.4.35 → 0.4.36
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/components/base/index.d.mts +2 -2
- package/dist/components/base/index.d.ts +2 -2
- package/dist/components/base/index.js +445 -2
- package/dist/components/base/index.js.map +1 -1
- package/dist/components/base/index.mjs +445 -3
- package/dist/components/base/index.mjs.map +1 -1
- package/dist/components/workbench/index.d.mts +1 -1
- package/dist/components/workbench/index.d.ts +1 -1
- package/dist/components/workbench/index.js +444 -2
- package/dist/components/workbench/index.js.map +1 -1
- package/dist/components/workbench/index.mjs +444 -2
- package/dist/components/workbench/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +445 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +445 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{theme-Cuy60thu.d.ts → theme-Clm5dVb0.d.mts} +4 -2
- package/dist/{theme-CoG9vCPT.d.mts → theme-sIoU5-YC.d.ts} +4 -2
- package/dist/theme-system/index.d.mts +1 -1
- package/dist/theme-system/index.d.ts +1 -1
- package/dist/theme-system/index.js +444 -2
- package/dist/theme-system/index.js.map +1 -1
- package/dist/theme-system/index.mjs +444 -2
- package/dist/theme-system/index.mjs.map +1 -1
- package/dist/{types-CZALgtez.d.mts → types-Bn6PEDsX.d.mts} +43 -1
- package/dist/{types-CZALgtez.d.ts → types-Bn6PEDsX.d.ts} +43 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11716,6 +11716,448 @@ function BaseLoadingState({
|
|
|
11716
11716
|
}
|
|
11717
11717
|
);
|
|
11718
11718
|
}
|
|
11719
|
+
function normalizeValues(values) {
|
|
11720
|
+
const nextValues = [];
|
|
11721
|
+
const seen = /* @__PURE__ */ new Set();
|
|
11722
|
+
values?.forEach((value) => {
|
|
11723
|
+
if (seen.has(value)) return;
|
|
11724
|
+
seen.add(value);
|
|
11725
|
+
nextValues.push(value);
|
|
11726
|
+
});
|
|
11727
|
+
return nextValues;
|
|
11728
|
+
}
|
|
11729
|
+
function getNextEnabledIndex(options, currentIndex, direction) {
|
|
11730
|
+
if (!options.length) return -1;
|
|
11731
|
+
const startIndex = currentIndex >= 0 ? currentIndex : 0;
|
|
11732
|
+
for (let offset = 1; offset <= options.length; offset += 1) {
|
|
11733
|
+
const nextIndex = (startIndex + offset * direction + options.length) % options.length;
|
|
11734
|
+
if (!options[nextIndex]?.disabled) {
|
|
11735
|
+
return nextIndex;
|
|
11736
|
+
}
|
|
11737
|
+
}
|
|
11738
|
+
return -1;
|
|
11739
|
+
}
|
|
11740
|
+
function getFirstEnabledIndex(options) {
|
|
11741
|
+
return options.findIndex((option) => !option.disabled);
|
|
11742
|
+
}
|
|
11743
|
+
function getSafeTagCount(maxTagCount, total) {
|
|
11744
|
+
if (maxTagCount === void 0) return total;
|
|
11745
|
+
if (!Number.isFinite(maxTagCount)) return total;
|
|
11746
|
+
return Math.max(0, Math.min(total, Math.floor(maxTagCount)));
|
|
11747
|
+
}
|
|
11748
|
+
function getDefaultRemoveLabel(option) {
|
|
11749
|
+
return `Remove ${option.value}`;
|
|
11750
|
+
}
|
|
11751
|
+
var BaseMultiSelect = forwardRef(
|
|
11752
|
+
function BaseMultiSelect2({
|
|
11753
|
+
options,
|
|
11754
|
+
value,
|
|
11755
|
+
defaultValue,
|
|
11756
|
+
name,
|
|
11757
|
+
placeholder = "Select options",
|
|
11758
|
+
icon,
|
|
11759
|
+
invalid = false,
|
|
11760
|
+
disabled = false,
|
|
11761
|
+
required = false,
|
|
11762
|
+
openForPreview = false,
|
|
11763
|
+
maxTagCount,
|
|
11764
|
+
removeLabel = getDefaultRemoveLabel,
|
|
11765
|
+
emptyLabel = "No options",
|
|
11766
|
+
appearance,
|
|
11767
|
+
className,
|
|
11768
|
+
classNames,
|
|
11769
|
+
style,
|
|
11770
|
+
id,
|
|
11771
|
+
"aria-invalid": nativeAriaInvalid,
|
|
11772
|
+
"aria-label": nativeAriaLabel,
|
|
11773
|
+
"aria-labelledby": nativeAriaLabelledBy,
|
|
11774
|
+
onValueChange,
|
|
11775
|
+
...rootProps
|
|
11776
|
+
}, ref) {
|
|
11777
|
+
const theme = resolveBaseAppearance(appearance);
|
|
11778
|
+
const generatedId = useId();
|
|
11779
|
+
const multiSelectId = id ?? generatedId;
|
|
11780
|
+
const controlId = `${multiSelectId}-control`;
|
|
11781
|
+
const listboxId = `${multiSelectId}-listbox`;
|
|
11782
|
+
const rootRef = useRef(null);
|
|
11783
|
+
const optionList = options ?? [];
|
|
11784
|
+
const forceOpen = openForPreview;
|
|
11785
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(false);
|
|
11786
|
+
const open = forceOpen || uncontrolledOpen;
|
|
11787
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(
|
|
11788
|
+
() => normalizeValues(defaultValue)
|
|
11789
|
+
);
|
|
11790
|
+
const [activeIndex, setActiveIndex] = useState(
|
|
11791
|
+
() => getFirstEnabledIndex(optionList)
|
|
11792
|
+
);
|
|
11793
|
+
const isControlled = value !== void 0;
|
|
11794
|
+
const selectedValues = useMemo(
|
|
11795
|
+
() => normalizeValues(isControlled ? value : uncontrolledValue),
|
|
11796
|
+
[isControlled, uncontrolledValue, value]
|
|
11797
|
+
);
|
|
11798
|
+
const selectedValueSet = useMemo(
|
|
11799
|
+
() => new Set(selectedValues),
|
|
11800
|
+
[selectedValues]
|
|
11801
|
+
);
|
|
11802
|
+
const optionByValue = useMemo(() => {
|
|
11803
|
+
const map = /* @__PURE__ */ new Map();
|
|
11804
|
+
optionList.forEach((option) => {
|
|
11805
|
+
if (!map.has(option.value)) {
|
|
11806
|
+
map.set(option.value, option);
|
|
11807
|
+
}
|
|
11808
|
+
});
|
|
11809
|
+
return map;
|
|
11810
|
+
}, [optionList]);
|
|
11811
|
+
const selectedOptions = useMemo(
|
|
11812
|
+
() => selectedValues.map((selectedValue) => optionByValue.get(selectedValue)).filter(
|
|
11813
|
+
(option) => option !== void 0
|
|
11814
|
+
),
|
|
11815
|
+
[optionByValue, selectedValues]
|
|
11816
|
+
);
|
|
11817
|
+
const firstEnabledIndex = useMemo(
|
|
11818
|
+
() => getFirstEnabledIndex(optionList),
|
|
11819
|
+
[optionList]
|
|
11820
|
+
);
|
|
11821
|
+
const resolvedActiveIndex = activeIndex >= 0 && !optionList[activeIndex]?.disabled ? activeIndex : firstEnabledIndex;
|
|
11822
|
+
const visibleTagCount = getSafeTagCount(
|
|
11823
|
+
maxTagCount,
|
|
11824
|
+
selectedOptions.length
|
|
11825
|
+
);
|
|
11826
|
+
const visibleOptions = selectedOptions.slice(0, visibleTagCount);
|
|
11827
|
+
const overflowCount = selectedOptions.length - visibleOptions.length;
|
|
11828
|
+
const isPlaceholder = selectedOptions.length === 0;
|
|
11829
|
+
const setRootRef = (node) => {
|
|
11830
|
+
rootRef.current = node;
|
|
11831
|
+
if (typeof ref === "function") {
|
|
11832
|
+
ref(node);
|
|
11833
|
+
} else if (ref) {
|
|
11834
|
+
ref.current = node;
|
|
11835
|
+
}
|
|
11836
|
+
};
|
|
11837
|
+
const setOpen = (nextOpen) => {
|
|
11838
|
+
if (disabled || forceOpen) return;
|
|
11839
|
+
setUncontrolledOpen(nextOpen);
|
|
11840
|
+
if (nextOpen) {
|
|
11841
|
+
setActiveIndex(resolvedActiveIndex);
|
|
11842
|
+
}
|
|
11843
|
+
};
|
|
11844
|
+
useEffect(() => {
|
|
11845
|
+
if (!open || forceOpen) return void 0;
|
|
11846
|
+
const handlePointerDown = (event) => {
|
|
11847
|
+
if (!rootRef.current?.contains(event.target)) {
|
|
11848
|
+
setUncontrolledOpen(false);
|
|
11849
|
+
}
|
|
11850
|
+
};
|
|
11851
|
+
document.addEventListener("pointerdown", handlePointerDown);
|
|
11852
|
+
return () => {
|
|
11853
|
+
document.removeEventListener("pointerdown", handlePointerDown);
|
|
11854
|
+
};
|
|
11855
|
+
}, [forceOpen, open]);
|
|
11856
|
+
useEffect(() => {
|
|
11857
|
+
if (resolvedActiveIndex >= 0 && resolvedActiveIndex !== activeIndex) {
|
|
11858
|
+
setActiveIndex(resolvedActiveIndex);
|
|
11859
|
+
}
|
|
11860
|
+
}, [activeIndex, resolvedActiveIndex]);
|
|
11861
|
+
const commitValues = (nextValues) => {
|
|
11862
|
+
const normalizedValues = normalizeValues(nextValues);
|
|
11863
|
+
if (!isControlled) {
|
|
11864
|
+
setUncontrolledValue(normalizedValues);
|
|
11865
|
+
}
|
|
11866
|
+
onValueChange?.(normalizedValues);
|
|
11867
|
+
};
|
|
11868
|
+
const toggleOption = (option) => {
|
|
11869
|
+
if (!option || option.disabled || disabled) return;
|
|
11870
|
+
const nextValues = selectedValueSet.has(option.value) ? selectedValues.filter((selectedValue) => selectedValue !== option.value) : [...selectedValues, option.value];
|
|
11871
|
+
commitValues(nextValues);
|
|
11872
|
+
};
|
|
11873
|
+
const removeOption = (option) => {
|
|
11874
|
+
if (disabled) return;
|
|
11875
|
+
commitValues(
|
|
11876
|
+
selectedValues.filter((selectedValue) => selectedValue !== option.value)
|
|
11877
|
+
);
|
|
11878
|
+
};
|
|
11879
|
+
const focusOption = (direction) => {
|
|
11880
|
+
const nextIndex = getNextEnabledIndex(
|
|
11881
|
+
optionList,
|
|
11882
|
+
resolvedActiveIndex,
|
|
11883
|
+
direction
|
|
11884
|
+
);
|
|
11885
|
+
if (nextIndex >= 0) {
|
|
11886
|
+
setActiveIndex(nextIndex);
|
|
11887
|
+
}
|
|
11888
|
+
};
|
|
11889
|
+
const handleKeyDown = (event) => {
|
|
11890
|
+
if (disabled) return;
|
|
11891
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
11892
|
+
event.preventDefault();
|
|
11893
|
+
if (!open) {
|
|
11894
|
+
setOpen(true);
|
|
11895
|
+
setActiveIndex(firstEnabledIndex);
|
|
11896
|
+
return;
|
|
11897
|
+
}
|
|
11898
|
+
focusOption(event.key === "ArrowDown" ? 1 : -1);
|
|
11899
|
+
return;
|
|
11900
|
+
}
|
|
11901
|
+
if (event.key === "Home") {
|
|
11902
|
+
event.preventDefault();
|
|
11903
|
+
setOpen(true);
|
|
11904
|
+
setActiveIndex(firstEnabledIndex);
|
|
11905
|
+
return;
|
|
11906
|
+
}
|
|
11907
|
+
if (event.key === "End") {
|
|
11908
|
+
event.preventDefault();
|
|
11909
|
+
setOpen(true);
|
|
11910
|
+
for (let index = optionList.length - 1; index >= 0; index -= 1) {
|
|
11911
|
+
if (!optionList[index]?.disabled) {
|
|
11912
|
+
setActiveIndex(index);
|
|
11913
|
+
break;
|
|
11914
|
+
}
|
|
11915
|
+
}
|
|
11916
|
+
return;
|
|
11917
|
+
}
|
|
11918
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
11919
|
+
event.preventDefault();
|
|
11920
|
+
if (!open) {
|
|
11921
|
+
setOpen(true);
|
|
11922
|
+
return;
|
|
11923
|
+
}
|
|
11924
|
+
toggleOption(optionList[resolvedActiveIndex]);
|
|
11925
|
+
return;
|
|
11926
|
+
}
|
|
11927
|
+
if (event.key === "Escape") {
|
|
11928
|
+
setOpen(false);
|
|
11929
|
+
}
|
|
11930
|
+
};
|
|
11931
|
+
return /* @__PURE__ */ jsxs(
|
|
11932
|
+
"div",
|
|
11933
|
+
{
|
|
11934
|
+
...rootProps,
|
|
11935
|
+
id,
|
|
11936
|
+
ref: setRootRef,
|
|
11937
|
+
className: cn(
|
|
11938
|
+
theme.slots.controlWrapper,
|
|
11939
|
+
"overflow-visible",
|
|
11940
|
+
open && "z-50",
|
|
11941
|
+
invalid && theme.slots.controlInvalid,
|
|
11942
|
+
disabled && theme.slots.controlDisabled,
|
|
11943
|
+
classNames?.root,
|
|
11944
|
+
className
|
|
11945
|
+
),
|
|
11946
|
+
style: {
|
|
11947
|
+
...theme.styles.control,
|
|
11948
|
+
...invalid ? theme.styles.controlInvalid : void 0,
|
|
11949
|
+
...disabled ? theme.styles.controlDisabled : void 0,
|
|
11950
|
+
...style
|
|
11951
|
+
},
|
|
11952
|
+
children: [
|
|
11953
|
+
hasRenderableNode(icon) ? /* @__PURE__ */ jsx("span", { className: cn(theme.slots.controlIcon, classNames?.icon), children: icon }) : null,
|
|
11954
|
+
/* @__PURE__ */ jsx(
|
|
11955
|
+
"div",
|
|
11956
|
+
{
|
|
11957
|
+
id: controlId,
|
|
11958
|
+
role: "combobox",
|
|
11959
|
+
tabIndex: disabled ? -1 : 0,
|
|
11960
|
+
"aria-haspopup": "listbox",
|
|
11961
|
+
"aria-expanded": open,
|
|
11962
|
+
"aria-controls": listboxId,
|
|
11963
|
+
"aria-disabled": disabled || void 0,
|
|
11964
|
+
"aria-required": required || void 0,
|
|
11965
|
+
"aria-invalid": nativeAriaInvalid ?? (invalid || void 0),
|
|
11966
|
+
"aria-label": nativeAriaLabel,
|
|
11967
|
+
"aria-labelledby": nativeAriaLabelledBy,
|
|
11968
|
+
className: cn(
|
|
11969
|
+
theme.slots.controlBase,
|
|
11970
|
+
"flex min-h-9 cursor-pointer flex-wrap items-center gap-1.5 py-1.5 pr-9 text-left",
|
|
11971
|
+
disabled && "!cursor-not-allowed",
|
|
11972
|
+
classNames?.control
|
|
11973
|
+
),
|
|
11974
|
+
onClick: () => setOpen(!open),
|
|
11975
|
+
onKeyDown: handleKeyDown,
|
|
11976
|
+
children: /* @__PURE__ */ jsxs(
|
|
11977
|
+
"span",
|
|
11978
|
+
{
|
|
11979
|
+
className: cn(
|
|
11980
|
+
"flex min-w-0 flex-1 flex-wrap items-center gap-1.5",
|
|
11981
|
+
classNames?.tagList
|
|
11982
|
+
),
|
|
11983
|
+
children: [
|
|
11984
|
+
visibleOptions.map((option) => /* @__PURE__ */ jsxs(
|
|
11985
|
+
"span",
|
|
11986
|
+
{
|
|
11987
|
+
className: cn(
|
|
11988
|
+
"inline-flex max-w-full items-center gap-1 rounded-full border border-border/70 bg-muted/65 px-2 py-0.5 text-xs font-medium text-foreground",
|
|
11989
|
+
classNames?.tag
|
|
11990
|
+
),
|
|
11991
|
+
children: [
|
|
11992
|
+
/* @__PURE__ */ jsx(
|
|
11993
|
+
"span",
|
|
11994
|
+
{
|
|
11995
|
+
className: cn(
|
|
11996
|
+
"max-w-40 truncate",
|
|
11997
|
+
classNames?.tagLabel
|
|
11998
|
+
),
|
|
11999
|
+
children: option.label
|
|
12000
|
+
}
|
|
12001
|
+
),
|
|
12002
|
+
/* @__PURE__ */ jsx(
|
|
12003
|
+
"button",
|
|
12004
|
+
{
|
|
12005
|
+
type: "button",
|
|
12006
|
+
"aria-label": removeLabel(option),
|
|
12007
|
+
disabled,
|
|
12008
|
+
className: cn(
|
|
12009
|
+
"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-muted-foreground hover:bg-background/80 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed",
|
|
12010
|
+
classNames?.tagRemove
|
|
12011
|
+
),
|
|
12012
|
+
onClick: (event) => {
|
|
12013
|
+
event.preventDefault();
|
|
12014
|
+
event.stopPropagation();
|
|
12015
|
+
removeOption(option);
|
|
12016
|
+
},
|
|
12017
|
+
onMouseDown: (event) => {
|
|
12018
|
+
event.preventDefault();
|
|
12019
|
+
event.stopPropagation();
|
|
12020
|
+
},
|
|
12021
|
+
onKeyDown: (event) => event.stopPropagation(),
|
|
12022
|
+
children: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "x" })
|
|
12023
|
+
}
|
|
12024
|
+
)
|
|
12025
|
+
]
|
|
12026
|
+
},
|
|
12027
|
+
option.value
|
|
12028
|
+
)),
|
|
12029
|
+
overflowCount > 0 ? /* @__PURE__ */ jsxs(
|
|
12030
|
+
"span",
|
|
12031
|
+
{
|
|
12032
|
+
className: cn(
|
|
12033
|
+
"inline-flex max-w-full items-center rounded-full border border-border/70 bg-muted/45 px-2 py-0.5 text-xs font-medium text-muted-foreground",
|
|
12034
|
+
classNames?.tag
|
|
12035
|
+
),
|
|
12036
|
+
children: [
|
|
12037
|
+
"+",
|
|
12038
|
+
overflowCount
|
|
12039
|
+
]
|
|
12040
|
+
}
|
|
12041
|
+
) : null,
|
|
12042
|
+
isPlaceholder ? /* @__PURE__ */ jsx(
|
|
12043
|
+
"span",
|
|
12044
|
+
{
|
|
12045
|
+
className: cn(
|
|
12046
|
+
"min-w-0 truncate",
|
|
12047
|
+
theme.slots.selectPlaceholder,
|
|
12048
|
+
classNames?.placeholder
|
|
12049
|
+
),
|
|
12050
|
+
children: placeholder
|
|
12051
|
+
}
|
|
12052
|
+
) : null
|
|
12053
|
+
]
|
|
12054
|
+
}
|
|
12055
|
+
)
|
|
12056
|
+
}
|
|
12057
|
+
),
|
|
12058
|
+
/* @__PURE__ */ jsx(
|
|
12059
|
+
"span",
|
|
12060
|
+
{
|
|
12061
|
+
className: cn(
|
|
12062
|
+
theme.slots.selectChevron,
|
|
12063
|
+
open && "rotate-[225deg]",
|
|
12064
|
+
classNames?.chevron
|
|
12065
|
+
)
|
|
12066
|
+
}
|
|
12067
|
+
),
|
|
12068
|
+
name ? selectedValues.map((selectedValue) => /* @__PURE__ */ jsx(
|
|
12069
|
+
"input",
|
|
12070
|
+
{
|
|
12071
|
+
type: "hidden",
|
|
12072
|
+
name,
|
|
12073
|
+
value: selectedValue,
|
|
12074
|
+
className: classNames?.hiddenInput
|
|
12075
|
+
},
|
|
12076
|
+
selectedValue
|
|
12077
|
+
)) : null,
|
|
12078
|
+
open ? /* @__PURE__ */ jsx(
|
|
12079
|
+
"div",
|
|
12080
|
+
{
|
|
12081
|
+
id: listboxId,
|
|
12082
|
+
role: "listbox",
|
|
12083
|
+
"aria-multiselectable": "true",
|
|
12084
|
+
"aria-labelledby": controlId,
|
|
12085
|
+
className: cn(theme.slots.selectMenu, classNames?.menu),
|
|
12086
|
+
style: theme.styles.selectMenu,
|
|
12087
|
+
children: optionList.length > 0 ? optionList.map((option, index) => {
|
|
12088
|
+
const selected = selectedValueSet.has(option.value);
|
|
12089
|
+
const active = index === resolvedActiveIndex;
|
|
12090
|
+
return /* @__PURE__ */ jsxs(
|
|
12091
|
+
"button",
|
|
12092
|
+
{
|
|
12093
|
+
type: "button",
|
|
12094
|
+
role: "option",
|
|
12095
|
+
"aria-selected": selected,
|
|
12096
|
+
disabled: option.disabled,
|
|
12097
|
+
className: cn(
|
|
12098
|
+
theme.slots.selectOption,
|
|
12099
|
+
"gap-2",
|
|
12100
|
+
active && theme.slots.selectOptionActive,
|
|
12101
|
+
selected && theme.slots.selectOptionSelected,
|
|
12102
|
+
option.disabled && theme.slots.selectOptionDisabled,
|
|
12103
|
+
classNames?.option
|
|
12104
|
+
),
|
|
12105
|
+
style: {
|
|
12106
|
+
...theme.styles.selectOption,
|
|
12107
|
+
...active ? theme.styles.selectOptionActive : void 0,
|
|
12108
|
+
...selected ? theme.styles.selectOptionSelected : void 0
|
|
12109
|
+
},
|
|
12110
|
+
onMouseEnter: () => {
|
|
12111
|
+
if (!option.disabled) {
|
|
12112
|
+
setActiveIndex(index);
|
|
12113
|
+
}
|
|
12114
|
+
},
|
|
12115
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
12116
|
+
onClick: () => toggleOption(option),
|
|
12117
|
+
children: [
|
|
12118
|
+
/* @__PURE__ */ jsx(
|
|
12119
|
+
"span",
|
|
12120
|
+
{
|
|
12121
|
+
"aria-hidden": "true",
|
|
12122
|
+
className: cn(
|
|
12123
|
+
"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-border/70 text-[10px]",
|
|
12124
|
+
selected && "border-primary/40 bg-primary text-primary-foreground",
|
|
12125
|
+
classNames?.optionIndicator
|
|
12126
|
+
),
|
|
12127
|
+
children: selected ? "\u2713" : null
|
|
12128
|
+
}
|
|
12129
|
+
),
|
|
12130
|
+
/* @__PURE__ */ jsx(
|
|
12131
|
+
"span",
|
|
12132
|
+
{
|
|
12133
|
+
className: cn(
|
|
12134
|
+
"min-w-0 flex-1 truncate",
|
|
12135
|
+
classNames?.optionLabel
|
|
12136
|
+
),
|
|
12137
|
+
children: option.label
|
|
12138
|
+
}
|
|
12139
|
+
)
|
|
12140
|
+
]
|
|
12141
|
+
},
|
|
12142
|
+
option.value
|
|
12143
|
+
);
|
|
12144
|
+
}) : /* @__PURE__ */ jsx(
|
|
12145
|
+
"div",
|
|
12146
|
+
{
|
|
12147
|
+
className: cn(
|
|
12148
|
+
"px-2.5 py-2 text-sm text-muted-foreground",
|
|
12149
|
+
classNames?.empty
|
|
12150
|
+
),
|
|
12151
|
+
children: emptyLabel
|
|
12152
|
+
}
|
|
12153
|
+
)
|
|
12154
|
+
}
|
|
12155
|
+
) : null
|
|
12156
|
+
]
|
|
12157
|
+
}
|
|
12158
|
+
);
|
|
12159
|
+
}
|
|
12160
|
+
);
|
|
11719
12161
|
function BaseNotice({
|
|
11720
12162
|
tone,
|
|
11721
12163
|
icon,
|
|
@@ -12117,7 +12559,7 @@ function getInitialValue2(options, defaultValue) {
|
|
|
12117
12559
|
}
|
|
12118
12560
|
return "";
|
|
12119
12561
|
}
|
|
12120
|
-
function
|
|
12562
|
+
function getNextEnabledIndex2(options, currentIndex, direction) {
|
|
12121
12563
|
if (!options.length) return -1;
|
|
12122
12564
|
for (let offset = 1; offset <= options.length; offset += 1) {
|
|
12123
12565
|
const nextIndex = (currentIndex + offset * direction + options.length) % options.length;
|
|
@@ -12219,7 +12661,7 @@ var BaseSelect = forwardRef(
|
|
|
12219
12661
|
};
|
|
12220
12662
|
const focusOption = (direction) => {
|
|
12221
12663
|
const currentIndex = activeIndex >= 0 ? activeIndex : 0;
|
|
12222
|
-
const nextIndex =
|
|
12664
|
+
const nextIndex = getNextEnabledIndex2(optionList, currentIndex, direction);
|
|
12223
12665
|
if (nextIndex >= 0) {
|
|
12224
12666
|
commitValue(optionList[nextIndex].value, optionList[nextIndex].disabled);
|
|
12225
12667
|
}
|
|
@@ -24674,6 +25116,6 @@ lodash/lodash.js:
|
|
|
24674
25116
|
*)
|
|
24675
25117
|
*/
|
|
24676
25118
|
|
|
24677
|
-
export { ARTIST_CONFIG, ARTIST_DEFAULT_QUICK_ACTIONS, AppHeader, AppLayout, AppSidebar, ArtistLandingPage, AuthDivider, BSD_CONFIG, BSD_DEFAULT_FEATURE_CARDS, BaseAccordion, BaseAvatar, BaseBadge, BaseBreadcrumb, BaseButton, BaseCheckbox, BaseContextMenu, BaseContextMenuCheckboxItem, BaseContextMenuContent, BaseContextMenuItem, BaseContextMenuLabel, BaseContextMenuRadioGroup, BaseContextMenuRadioItem, BaseContextMenuSeparator, BaseContextMenuSub, BaseContextMenuSubContent, BaseContextMenuSubTrigger, BaseContextMenuTrigger, BaseDescriptionList, BaseDialog, BaseDivider, BaseDropdownMenu, BaseEmptyState, BaseField, BaseInput, BaseLayout, BaseLayoutPane, BaseLayoutResizeHandle, BaseLayoutSplit, BaseLoadingState, BaseNotice, BasePagination, BasePanel, BaseProgress, BaseRadioGroup, BaseSectionHeader, BaseSegmentedControl, BaseSelect, BaseSkeleton, BaseSwitch, BaseTable, BaseTableBody, BaseTableCaption, BaseTableCell, BaseTableContainer, BaseTableEmpty, BaseTableFooter, BaseTableFooterBar, BaseTableHead, BaseTableHeader, BaseTableLoading, BaseTableRow, BaseTabs, BaseTextarea, BaseToolbar, BaseTooltip, BsdLandingPage, BsdToolboxPanel, CONCEPT_CONFIG, CONCEPT_DEFAULT_QUICK_ACTIONS, ConceptDesignLandingPage, DarkModeSelector, DarkModeSubMenu, DataExplorerActionBar, DataExplorerButton, DataExplorerCheckbox, DataExplorerCollectionFooter, DataExplorerDetailField, DataExplorerDetailSection, DataExplorerDetailShell, DataExplorerDisplayActionMenu, DataExplorerDisplayCard, DataExplorerDisplayCollectionView, DataExplorerDisplayListItem, DataExplorerDisplayMedia, DataExplorerImagePreview, DataExplorerPage, DataExplorerRecordCard, DataExplorerSelect, DataExplorerToolbarActions, DataExplorerToolbarShell, DataExplorerTree, DataExplorerTreeShell, DataExplorerView, DataExplorerViewCollection, DataExplorerViewItem, DataExplorerViewItemShell, DataExplorerViewShell, DataExplorerViewTree, DefaultLandingPage, DynamicComponent, EmailAuth, I18nSelector, InteractiveTable, InteractiveTableEditableTextCell, InteractiveTableReadonlyCell, InteractiveTableSelectCell, LoginLayout, MonkeysToastProvider, MonkeysToaster, NavButton, OAuthButton, OIDCButton, PendingApproval, MonkeysToastProvider as ToastProvider, MonkeysToaster as Toaster, WorkbenchContentPane, WorkbenchContentToolbar, WorkbenchDetailSidebar, WorkbenchGalleryCard, WorkbenchGallerySettingsButton, WorkbenchGallerySettingsPanel, WorkbenchGalleryView, WorkbenchLaneView, WorkbenchMasonryLayout, WorkbenchResizableSidebar, WorkbenchTableView, applyMonkeysTheme, calculateHue, calculateLightness, calculateSaturation, clearRegistry, cn3 as cn, createSolidColorScale, extractToastMessage, genTailwindTheme, getBaseBadgeToneClassName, getBaseButtonToneClassName, getBaseMenuItemToneClassName, getBaseNoticeToneClassName, getDataExplorerActionToneClassName, getDataExplorerMenuItemToneClassName, getRegisteredComponents, getRegisteredThemes, getThemeConfig, hasCustomComponent, markDarkColor, registerComponent, registerTheme, resolveBaseAppearance, resolveComponent, resolveDataExplorerAppearance, resolveMonkeysTheme, resolveToastVariantForMessage, setNeocardTheme, setTailwindTheme, toast, useDarkMode, useToastFeed, useToastOnValue };
|
|
25119
|
+
export { ARTIST_CONFIG, ARTIST_DEFAULT_QUICK_ACTIONS, AppHeader, AppLayout, AppSidebar, ArtistLandingPage, AuthDivider, BSD_CONFIG, BSD_DEFAULT_FEATURE_CARDS, BaseAccordion, BaseAvatar, BaseBadge, BaseBreadcrumb, BaseButton, BaseCheckbox, BaseContextMenu, BaseContextMenuCheckboxItem, BaseContextMenuContent, BaseContextMenuItem, BaseContextMenuLabel, BaseContextMenuRadioGroup, BaseContextMenuRadioItem, BaseContextMenuSeparator, BaseContextMenuSub, BaseContextMenuSubContent, BaseContextMenuSubTrigger, BaseContextMenuTrigger, BaseDescriptionList, BaseDialog, BaseDivider, BaseDropdownMenu, BaseEmptyState, BaseField, BaseInput, BaseLayout, BaseLayoutPane, BaseLayoutResizeHandle, BaseLayoutSplit, BaseLoadingState, BaseMultiSelect, BaseNotice, BasePagination, BasePanel, BaseProgress, BaseRadioGroup, BaseSectionHeader, BaseSegmentedControl, BaseSelect, BaseSkeleton, BaseSwitch, BaseTable, BaseTableBody, BaseTableCaption, BaseTableCell, BaseTableContainer, BaseTableEmpty, BaseTableFooter, BaseTableFooterBar, BaseTableHead, BaseTableHeader, BaseTableLoading, BaseTableRow, BaseTabs, BaseTextarea, BaseToolbar, BaseTooltip, BsdLandingPage, BsdToolboxPanel, CONCEPT_CONFIG, CONCEPT_DEFAULT_QUICK_ACTIONS, ConceptDesignLandingPage, DarkModeSelector, DarkModeSubMenu, DataExplorerActionBar, DataExplorerButton, DataExplorerCheckbox, DataExplorerCollectionFooter, DataExplorerDetailField, DataExplorerDetailSection, DataExplorerDetailShell, DataExplorerDisplayActionMenu, DataExplorerDisplayCard, DataExplorerDisplayCollectionView, DataExplorerDisplayListItem, DataExplorerDisplayMedia, DataExplorerImagePreview, DataExplorerPage, DataExplorerRecordCard, DataExplorerSelect, DataExplorerToolbarActions, DataExplorerToolbarShell, DataExplorerTree, DataExplorerTreeShell, DataExplorerView, DataExplorerViewCollection, DataExplorerViewItem, DataExplorerViewItemShell, DataExplorerViewShell, DataExplorerViewTree, DefaultLandingPage, DynamicComponent, EmailAuth, I18nSelector, InteractiveTable, InteractiveTableEditableTextCell, InteractiveTableReadonlyCell, InteractiveTableSelectCell, LoginLayout, MonkeysToastProvider, MonkeysToaster, NavButton, OAuthButton, OIDCButton, PendingApproval, MonkeysToastProvider as ToastProvider, MonkeysToaster as Toaster, WorkbenchContentPane, WorkbenchContentToolbar, WorkbenchDetailSidebar, WorkbenchGalleryCard, WorkbenchGallerySettingsButton, WorkbenchGallerySettingsPanel, WorkbenchGalleryView, WorkbenchLaneView, WorkbenchMasonryLayout, WorkbenchResizableSidebar, WorkbenchTableView, applyMonkeysTheme, calculateHue, calculateLightness, calculateSaturation, clearRegistry, cn3 as cn, createSolidColorScale, extractToastMessage, genTailwindTheme, getBaseBadgeToneClassName, getBaseButtonToneClassName, getBaseMenuItemToneClassName, getBaseNoticeToneClassName, getDataExplorerActionToneClassName, getDataExplorerMenuItemToneClassName, getRegisteredComponents, getRegisteredThemes, getThemeConfig, hasCustomComponent, markDarkColor, registerComponent, registerTheme, resolveBaseAppearance, resolveComponent, resolveDataExplorerAppearance, resolveMonkeysTheme, resolveToastVariantForMessage, setNeocardTheme, setTailwindTheme, toast, useDarkMode, useToastFeed, useToastOnValue };
|
|
24678
25120
|
//# sourceMappingURL=index.mjs.map
|
|
24679
25121
|
//# sourceMappingURL=index.mjs.map
|