@inf-monkeys-tech/monkeys-design 0.4.34 → 0.4.35
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/LICENSE +21 -21
- package/README.md +226 -226
- package/dist/components/base/index.d.mts +2 -2
- package/dist/components/base/index.d.ts +2 -2
- package/dist/components/base/index.js +2 -445
- package/dist/components/base/index.js.map +1 -1
- package/dist/components/base/index.mjs +3 -445
- package/dist/components/base/index.mjs.map +1 -1
- package/dist/components/data-explorer/index.js.map +1 -1
- package/dist/components/data-explorer/index.mjs.map +1 -1
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/index.mjs.map +1 -1
- package/dist/components/login/index.js.map +1 -1
- package/dist/components/login/index.mjs.map +1 -1
- package/dist/components/toast/index.d.mts +75 -0
- package/dist/components/toast/index.d.ts +75 -0
- package/dist/components/toast/index.js +283 -0
- package/dist/components/toast/index.js.map +1 -0
- package/dist/components/toast/index.mjs +273 -0
- package/dist/components/toast/index.mjs.map +1 -0
- package/dist/components/toolbar/index.js.map +1 -1
- package/dist/components/toolbar/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 +2 -444
- package/dist/components/workbench/index.js.map +1 -1
- package/dist/components/workbench/index.mjs +2 -444
- package/dist/components/workbench/index.mjs.map +1 -1
- package/dist/icons/oauth/index.js.map +1 -1
- package/dist/icons/oauth/index.mjs.map +1 -1
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +286 -455
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +278 -455
- package/dist/index.mjs.map +1 -1
- package/dist/palette/index.js.map +1 -1
- package/dist/palette/index.mjs.map +1 -1
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/index.mjs.map +1 -1
- package/dist/styles/artist-login.scss +374 -374
- package/dist/styles/global.scss +21 -21
- package/dist/styles/workflow-board.scss +440 -440
- package/dist/styles/workflow-nodes.css +340 -340
- package/dist/{theme-sIoU5-YC.d.ts → theme-CoG9vCPT.d.mts} +2 -4
- package/dist/{theme-Clm5dVb0.d.mts → theme-Cuy60thu.d.ts} +2 -4
- package/dist/theme-system/index.d.mts +1 -1
- package/dist/theme-system/index.d.ts +1 -1
- package/dist/theme-system/index.js +2 -444
- package/dist/theme-system/index.js.map +1 -1
- package/dist/theme-system/index.mjs +2 -444
- package/dist/theme-system/index.mjs.map +1 -1
- package/dist/themes/artist/index.js.map +1 -1
- package/dist/themes/artist/index.mjs.map +1 -1
- package/dist/themes/bsd/index.js.map +1 -1
- package/dist/themes/bsd/index.mjs.map +1 -1
- package/dist/themes/concept/index.js.map +1 -1
- package/dist/themes/concept/index.mjs.map +1 -1
- package/dist/themes/default/index.js.map +1 -1
- package/dist/themes/default/index.mjs.map +1 -1
- package/dist/{types-Bn6PEDsX.d.mts → types-CZALgtez.d.mts} +1 -43
- package/dist/{types-Bn6PEDsX.d.ts → types-CZALgtez.d.ts} +1 -43
- package/package.json +146 -139
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
5
5
|
var ContextMenu = require('@radix-ui/react-context-menu');
|
|
6
6
|
var DropdownMenu3 = require('@radix-ui/react-dropdown-menu');
|
|
7
7
|
var core = require('@dnd-kit/core');
|
|
8
|
+
var sonner = require('sonner');
|
|
8
9
|
var Tooltip = require('@radix-ui/react-tooltip');
|
|
9
10
|
|
|
10
11
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -749,7 +750,7 @@ var require_lodash = __commonJS({
|
|
|
749
750
|
}
|
|
750
751
|
var runInContext = (function runInContext2(context) {
|
|
751
752
|
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
|
752
|
-
var Array2 = context.Array,
|
|
753
|
+
var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError2 = context.TypeError;
|
|
753
754
|
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
|
|
754
755
|
var coreJsData = context["__core-js_shared__"];
|
|
755
756
|
var funcToString = funcProto.toString;
|
|
@@ -774,8 +775,8 @@ var require_lodash = __commonJS({
|
|
|
774
775
|
} catch (e) {
|
|
775
776
|
}
|
|
776
777
|
})();
|
|
777
|
-
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow =
|
|
778
|
-
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined2, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow =
|
|
778
|
+
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
779
|
+
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined2, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
|
|
779
780
|
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
|
|
780
781
|
var metaMap = WeakMap && new WeakMap();
|
|
781
782
|
var realNames = {};
|
|
@@ -11742,448 +11743,6 @@ function BaseLoadingState({
|
|
|
11742
11743
|
}
|
|
11743
11744
|
);
|
|
11744
11745
|
}
|
|
11745
|
-
function normalizeValues(values) {
|
|
11746
|
-
const nextValues = [];
|
|
11747
|
-
const seen = /* @__PURE__ */ new Set();
|
|
11748
|
-
values?.forEach((value) => {
|
|
11749
|
-
if (seen.has(value)) return;
|
|
11750
|
-
seen.add(value);
|
|
11751
|
-
nextValues.push(value);
|
|
11752
|
-
});
|
|
11753
|
-
return nextValues;
|
|
11754
|
-
}
|
|
11755
|
-
function getNextEnabledIndex(options, currentIndex, direction) {
|
|
11756
|
-
if (!options.length) return -1;
|
|
11757
|
-
const startIndex = currentIndex >= 0 ? currentIndex : 0;
|
|
11758
|
-
for (let offset = 1; offset <= options.length; offset += 1) {
|
|
11759
|
-
const nextIndex = (startIndex + offset * direction + options.length) % options.length;
|
|
11760
|
-
if (!options[nextIndex]?.disabled) {
|
|
11761
|
-
return nextIndex;
|
|
11762
|
-
}
|
|
11763
|
-
}
|
|
11764
|
-
return -1;
|
|
11765
|
-
}
|
|
11766
|
-
function getFirstEnabledIndex(options) {
|
|
11767
|
-
return options.findIndex((option) => !option.disabled);
|
|
11768
|
-
}
|
|
11769
|
-
function getSafeTagCount(maxTagCount, total) {
|
|
11770
|
-
if (maxTagCount === void 0) return total;
|
|
11771
|
-
if (!Number.isFinite(maxTagCount)) return total;
|
|
11772
|
-
return Math.max(0, Math.min(total, Math.floor(maxTagCount)));
|
|
11773
|
-
}
|
|
11774
|
-
function getDefaultRemoveLabel(option) {
|
|
11775
|
-
return `Remove ${option.value}`;
|
|
11776
|
-
}
|
|
11777
|
-
var BaseMultiSelect = React.forwardRef(
|
|
11778
|
-
function BaseMultiSelect2({
|
|
11779
|
-
options,
|
|
11780
|
-
value,
|
|
11781
|
-
defaultValue,
|
|
11782
|
-
name,
|
|
11783
|
-
placeholder = "Select options",
|
|
11784
|
-
icon,
|
|
11785
|
-
invalid = false,
|
|
11786
|
-
disabled = false,
|
|
11787
|
-
required = false,
|
|
11788
|
-
openForPreview = false,
|
|
11789
|
-
maxTagCount,
|
|
11790
|
-
removeLabel = getDefaultRemoveLabel,
|
|
11791
|
-
emptyLabel = "No options",
|
|
11792
|
-
appearance,
|
|
11793
|
-
className,
|
|
11794
|
-
classNames,
|
|
11795
|
-
style,
|
|
11796
|
-
id,
|
|
11797
|
-
"aria-invalid": nativeAriaInvalid,
|
|
11798
|
-
"aria-label": nativeAriaLabel,
|
|
11799
|
-
"aria-labelledby": nativeAriaLabelledBy,
|
|
11800
|
-
onValueChange,
|
|
11801
|
-
...rootProps
|
|
11802
|
-
}, ref) {
|
|
11803
|
-
const theme = resolveBaseAppearance(appearance);
|
|
11804
|
-
const generatedId = React.useId();
|
|
11805
|
-
const multiSelectId = id ?? generatedId;
|
|
11806
|
-
const controlId = `${multiSelectId}-control`;
|
|
11807
|
-
const listboxId = `${multiSelectId}-listbox`;
|
|
11808
|
-
const rootRef = React.useRef(null);
|
|
11809
|
-
const optionList = options ?? [];
|
|
11810
|
-
const forceOpen = openForPreview;
|
|
11811
|
-
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);
|
|
11812
|
-
const open = forceOpen || uncontrolledOpen;
|
|
11813
|
-
const [uncontrolledValue, setUncontrolledValue] = React.useState(
|
|
11814
|
-
() => normalizeValues(defaultValue)
|
|
11815
|
-
);
|
|
11816
|
-
const [activeIndex, setActiveIndex] = React.useState(
|
|
11817
|
-
() => getFirstEnabledIndex(optionList)
|
|
11818
|
-
);
|
|
11819
|
-
const isControlled = value !== void 0;
|
|
11820
|
-
const selectedValues = React.useMemo(
|
|
11821
|
-
() => normalizeValues(isControlled ? value : uncontrolledValue),
|
|
11822
|
-
[isControlled, uncontrolledValue, value]
|
|
11823
|
-
);
|
|
11824
|
-
const selectedValueSet = React.useMemo(
|
|
11825
|
-
() => new Set(selectedValues),
|
|
11826
|
-
[selectedValues]
|
|
11827
|
-
);
|
|
11828
|
-
const optionByValue = React.useMemo(() => {
|
|
11829
|
-
const map = /* @__PURE__ */ new Map();
|
|
11830
|
-
optionList.forEach((option) => {
|
|
11831
|
-
if (!map.has(option.value)) {
|
|
11832
|
-
map.set(option.value, option);
|
|
11833
|
-
}
|
|
11834
|
-
});
|
|
11835
|
-
return map;
|
|
11836
|
-
}, [optionList]);
|
|
11837
|
-
const selectedOptions = React.useMemo(
|
|
11838
|
-
() => selectedValues.map((selectedValue) => optionByValue.get(selectedValue)).filter(
|
|
11839
|
-
(option) => option !== void 0
|
|
11840
|
-
),
|
|
11841
|
-
[optionByValue, selectedValues]
|
|
11842
|
-
);
|
|
11843
|
-
const firstEnabledIndex = React.useMemo(
|
|
11844
|
-
() => getFirstEnabledIndex(optionList),
|
|
11845
|
-
[optionList]
|
|
11846
|
-
);
|
|
11847
|
-
const resolvedActiveIndex = activeIndex >= 0 && !optionList[activeIndex]?.disabled ? activeIndex : firstEnabledIndex;
|
|
11848
|
-
const visibleTagCount = getSafeTagCount(
|
|
11849
|
-
maxTagCount,
|
|
11850
|
-
selectedOptions.length
|
|
11851
|
-
);
|
|
11852
|
-
const visibleOptions = selectedOptions.slice(0, visibleTagCount);
|
|
11853
|
-
const overflowCount = selectedOptions.length - visibleOptions.length;
|
|
11854
|
-
const isPlaceholder = selectedOptions.length === 0;
|
|
11855
|
-
const setRootRef = (node) => {
|
|
11856
|
-
rootRef.current = node;
|
|
11857
|
-
if (typeof ref === "function") {
|
|
11858
|
-
ref(node);
|
|
11859
|
-
} else if (ref) {
|
|
11860
|
-
ref.current = node;
|
|
11861
|
-
}
|
|
11862
|
-
};
|
|
11863
|
-
const setOpen = (nextOpen) => {
|
|
11864
|
-
if (disabled || forceOpen) return;
|
|
11865
|
-
setUncontrolledOpen(nextOpen);
|
|
11866
|
-
if (nextOpen) {
|
|
11867
|
-
setActiveIndex(resolvedActiveIndex);
|
|
11868
|
-
}
|
|
11869
|
-
};
|
|
11870
|
-
React.useEffect(() => {
|
|
11871
|
-
if (!open || forceOpen) return void 0;
|
|
11872
|
-
const handlePointerDown = (event) => {
|
|
11873
|
-
if (!rootRef.current?.contains(event.target)) {
|
|
11874
|
-
setUncontrolledOpen(false);
|
|
11875
|
-
}
|
|
11876
|
-
};
|
|
11877
|
-
document.addEventListener("pointerdown", handlePointerDown);
|
|
11878
|
-
return () => {
|
|
11879
|
-
document.removeEventListener("pointerdown", handlePointerDown);
|
|
11880
|
-
};
|
|
11881
|
-
}, [forceOpen, open]);
|
|
11882
|
-
React.useEffect(() => {
|
|
11883
|
-
if (resolvedActiveIndex >= 0 && resolvedActiveIndex !== activeIndex) {
|
|
11884
|
-
setActiveIndex(resolvedActiveIndex);
|
|
11885
|
-
}
|
|
11886
|
-
}, [activeIndex, resolvedActiveIndex]);
|
|
11887
|
-
const commitValues = (nextValues) => {
|
|
11888
|
-
const normalizedValues = normalizeValues(nextValues);
|
|
11889
|
-
if (!isControlled) {
|
|
11890
|
-
setUncontrolledValue(normalizedValues);
|
|
11891
|
-
}
|
|
11892
|
-
onValueChange?.(normalizedValues);
|
|
11893
|
-
};
|
|
11894
|
-
const toggleOption = (option) => {
|
|
11895
|
-
if (!option || option.disabled || disabled) return;
|
|
11896
|
-
const nextValues = selectedValueSet.has(option.value) ? selectedValues.filter((selectedValue) => selectedValue !== option.value) : [...selectedValues, option.value];
|
|
11897
|
-
commitValues(nextValues);
|
|
11898
|
-
};
|
|
11899
|
-
const removeOption = (option) => {
|
|
11900
|
-
if (disabled) return;
|
|
11901
|
-
commitValues(
|
|
11902
|
-
selectedValues.filter((selectedValue) => selectedValue !== option.value)
|
|
11903
|
-
);
|
|
11904
|
-
};
|
|
11905
|
-
const focusOption = (direction) => {
|
|
11906
|
-
const nextIndex = getNextEnabledIndex(
|
|
11907
|
-
optionList,
|
|
11908
|
-
resolvedActiveIndex,
|
|
11909
|
-
direction
|
|
11910
|
-
);
|
|
11911
|
-
if (nextIndex >= 0) {
|
|
11912
|
-
setActiveIndex(nextIndex);
|
|
11913
|
-
}
|
|
11914
|
-
};
|
|
11915
|
-
const handleKeyDown = (event) => {
|
|
11916
|
-
if (disabled) return;
|
|
11917
|
-
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
11918
|
-
event.preventDefault();
|
|
11919
|
-
if (!open) {
|
|
11920
|
-
setOpen(true);
|
|
11921
|
-
setActiveIndex(firstEnabledIndex);
|
|
11922
|
-
return;
|
|
11923
|
-
}
|
|
11924
|
-
focusOption(event.key === "ArrowDown" ? 1 : -1);
|
|
11925
|
-
return;
|
|
11926
|
-
}
|
|
11927
|
-
if (event.key === "Home") {
|
|
11928
|
-
event.preventDefault();
|
|
11929
|
-
setOpen(true);
|
|
11930
|
-
setActiveIndex(firstEnabledIndex);
|
|
11931
|
-
return;
|
|
11932
|
-
}
|
|
11933
|
-
if (event.key === "End") {
|
|
11934
|
-
event.preventDefault();
|
|
11935
|
-
setOpen(true);
|
|
11936
|
-
for (let index = optionList.length - 1; index >= 0; index -= 1) {
|
|
11937
|
-
if (!optionList[index]?.disabled) {
|
|
11938
|
-
setActiveIndex(index);
|
|
11939
|
-
break;
|
|
11940
|
-
}
|
|
11941
|
-
}
|
|
11942
|
-
return;
|
|
11943
|
-
}
|
|
11944
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
11945
|
-
event.preventDefault();
|
|
11946
|
-
if (!open) {
|
|
11947
|
-
setOpen(true);
|
|
11948
|
-
return;
|
|
11949
|
-
}
|
|
11950
|
-
toggleOption(optionList[resolvedActiveIndex]);
|
|
11951
|
-
return;
|
|
11952
|
-
}
|
|
11953
|
-
if (event.key === "Escape") {
|
|
11954
|
-
setOpen(false);
|
|
11955
|
-
}
|
|
11956
|
-
};
|
|
11957
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11958
|
-
"div",
|
|
11959
|
-
{
|
|
11960
|
-
...rootProps,
|
|
11961
|
-
id,
|
|
11962
|
-
ref: setRootRef,
|
|
11963
|
-
className: cn(
|
|
11964
|
-
theme.slots.controlWrapper,
|
|
11965
|
-
"overflow-visible",
|
|
11966
|
-
open && "z-50",
|
|
11967
|
-
invalid && theme.slots.controlInvalid,
|
|
11968
|
-
disabled && theme.slots.controlDisabled,
|
|
11969
|
-
classNames?.root,
|
|
11970
|
-
className
|
|
11971
|
-
),
|
|
11972
|
-
style: {
|
|
11973
|
-
...theme.styles.control,
|
|
11974
|
-
...invalid ? theme.styles.controlInvalid : void 0,
|
|
11975
|
-
...disabled ? theme.styles.controlDisabled : void 0,
|
|
11976
|
-
...style
|
|
11977
|
-
},
|
|
11978
|
-
children: [
|
|
11979
|
-
hasRenderableNode(icon) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(theme.slots.controlIcon, classNames?.icon), children: icon }) : null,
|
|
11980
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11981
|
-
"div",
|
|
11982
|
-
{
|
|
11983
|
-
id: controlId,
|
|
11984
|
-
role: "combobox",
|
|
11985
|
-
tabIndex: disabled ? -1 : 0,
|
|
11986
|
-
"aria-haspopup": "listbox",
|
|
11987
|
-
"aria-expanded": open,
|
|
11988
|
-
"aria-controls": listboxId,
|
|
11989
|
-
"aria-disabled": disabled || void 0,
|
|
11990
|
-
"aria-required": required || void 0,
|
|
11991
|
-
"aria-invalid": nativeAriaInvalid ?? (invalid || void 0),
|
|
11992
|
-
"aria-label": nativeAriaLabel,
|
|
11993
|
-
"aria-labelledby": nativeAriaLabelledBy,
|
|
11994
|
-
className: cn(
|
|
11995
|
-
theme.slots.controlBase,
|
|
11996
|
-
"flex min-h-9 cursor-pointer flex-wrap items-center gap-1.5 py-1.5 pr-9 text-left",
|
|
11997
|
-
disabled && "!cursor-not-allowed",
|
|
11998
|
-
classNames?.control
|
|
11999
|
-
),
|
|
12000
|
-
onClick: () => setOpen(!open),
|
|
12001
|
-
onKeyDown: handleKeyDown,
|
|
12002
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12003
|
-
"span",
|
|
12004
|
-
{
|
|
12005
|
-
className: cn(
|
|
12006
|
-
"flex min-w-0 flex-1 flex-wrap items-center gap-1.5",
|
|
12007
|
-
classNames?.tagList
|
|
12008
|
-
),
|
|
12009
|
-
children: [
|
|
12010
|
-
visibleOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12011
|
-
"span",
|
|
12012
|
-
{
|
|
12013
|
-
className: cn(
|
|
12014
|
-
"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",
|
|
12015
|
-
classNames?.tag
|
|
12016
|
-
),
|
|
12017
|
-
children: [
|
|
12018
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12019
|
-
"span",
|
|
12020
|
-
{
|
|
12021
|
-
className: cn(
|
|
12022
|
-
"max-w-40 truncate",
|
|
12023
|
-
classNames?.tagLabel
|
|
12024
|
-
),
|
|
12025
|
-
children: option.label
|
|
12026
|
-
}
|
|
12027
|
-
),
|
|
12028
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12029
|
-
"button",
|
|
12030
|
-
{
|
|
12031
|
-
type: "button",
|
|
12032
|
-
"aria-label": removeLabel(option),
|
|
12033
|
-
disabled,
|
|
12034
|
-
className: cn(
|
|
12035
|
-
"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",
|
|
12036
|
-
classNames?.tagRemove
|
|
12037
|
-
),
|
|
12038
|
-
onClick: (event) => {
|
|
12039
|
-
event.preventDefault();
|
|
12040
|
-
event.stopPropagation();
|
|
12041
|
-
removeOption(option);
|
|
12042
|
-
},
|
|
12043
|
-
onMouseDown: (event) => {
|
|
12044
|
-
event.preventDefault();
|
|
12045
|
-
event.stopPropagation();
|
|
12046
|
-
},
|
|
12047
|
-
onKeyDown: (event) => event.stopPropagation(),
|
|
12048
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "x" })
|
|
12049
|
-
}
|
|
12050
|
-
)
|
|
12051
|
-
]
|
|
12052
|
-
},
|
|
12053
|
-
option.value
|
|
12054
|
-
)),
|
|
12055
|
-
overflowCount > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12056
|
-
"span",
|
|
12057
|
-
{
|
|
12058
|
-
className: cn(
|
|
12059
|
-
"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",
|
|
12060
|
-
classNames?.tag
|
|
12061
|
-
),
|
|
12062
|
-
children: [
|
|
12063
|
-
"+",
|
|
12064
|
-
overflowCount
|
|
12065
|
-
]
|
|
12066
|
-
}
|
|
12067
|
-
) : null,
|
|
12068
|
-
isPlaceholder ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
12069
|
-
"span",
|
|
12070
|
-
{
|
|
12071
|
-
className: cn(
|
|
12072
|
-
"min-w-0 truncate",
|
|
12073
|
-
theme.slots.selectPlaceholder,
|
|
12074
|
-
classNames?.placeholder
|
|
12075
|
-
),
|
|
12076
|
-
children: placeholder
|
|
12077
|
-
}
|
|
12078
|
-
) : null
|
|
12079
|
-
]
|
|
12080
|
-
}
|
|
12081
|
-
)
|
|
12082
|
-
}
|
|
12083
|
-
),
|
|
12084
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12085
|
-
"span",
|
|
12086
|
-
{
|
|
12087
|
-
className: cn(
|
|
12088
|
-
theme.slots.selectChevron,
|
|
12089
|
-
open && "rotate-[225deg]",
|
|
12090
|
-
classNames?.chevron
|
|
12091
|
-
)
|
|
12092
|
-
}
|
|
12093
|
-
),
|
|
12094
|
-
name ? selectedValues.map((selectedValue) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
12095
|
-
"input",
|
|
12096
|
-
{
|
|
12097
|
-
type: "hidden",
|
|
12098
|
-
name,
|
|
12099
|
-
value: selectedValue,
|
|
12100
|
-
className: classNames?.hiddenInput
|
|
12101
|
-
},
|
|
12102
|
-
selectedValue
|
|
12103
|
-
)) : null,
|
|
12104
|
-
open ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
12105
|
-
"div",
|
|
12106
|
-
{
|
|
12107
|
-
id: listboxId,
|
|
12108
|
-
role: "listbox",
|
|
12109
|
-
"aria-multiselectable": "true",
|
|
12110
|
-
"aria-labelledby": controlId,
|
|
12111
|
-
className: cn(theme.slots.selectMenu, classNames?.menu),
|
|
12112
|
-
style: theme.styles.selectMenu,
|
|
12113
|
-
children: optionList.length > 0 ? optionList.map((option, index) => {
|
|
12114
|
-
const selected = selectedValueSet.has(option.value);
|
|
12115
|
-
const active = index === resolvedActiveIndex;
|
|
12116
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12117
|
-
"button",
|
|
12118
|
-
{
|
|
12119
|
-
type: "button",
|
|
12120
|
-
role: "option",
|
|
12121
|
-
"aria-selected": selected,
|
|
12122
|
-
disabled: option.disabled,
|
|
12123
|
-
className: cn(
|
|
12124
|
-
theme.slots.selectOption,
|
|
12125
|
-
"gap-2",
|
|
12126
|
-
active && theme.slots.selectOptionActive,
|
|
12127
|
-
selected && theme.slots.selectOptionSelected,
|
|
12128
|
-
option.disabled && theme.slots.selectOptionDisabled,
|
|
12129
|
-
classNames?.option
|
|
12130
|
-
),
|
|
12131
|
-
style: {
|
|
12132
|
-
...theme.styles.selectOption,
|
|
12133
|
-
...active ? theme.styles.selectOptionActive : void 0,
|
|
12134
|
-
...selected ? theme.styles.selectOptionSelected : void 0
|
|
12135
|
-
},
|
|
12136
|
-
onMouseEnter: () => {
|
|
12137
|
-
if (!option.disabled) {
|
|
12138
|
-
setActiveIndex(index);
|
|
12139
|
-
}
|
|
12140
|
-
},
|
|
12141
|
-
onMouseDown: (event) => event.preventDefault(),
|
|
12142
|
-
onClick: () => toggleOption(option),
|
|
12143
|
-
children: [
|
|
12144
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12145
|
-
"span",
|
|
12146
|
-
{
|
|
12147
|
-
"aria-hidden": "true",
|
|
12148
|
-
className: cn(
|
|
12149
|
-
"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-border/70 text-[10px]",
|
|
12150
|
-
selected && "border-primary/40 bg-primary text-primary-foreground",
|
|
12151
|
-
classNames?.optionIndicator
|
|
12152
|
-
),
|
|
12153
|
-
children: selected ? "\u2713" : null
|
|
12154
|
-
}
|
|
12155
|
-
),
|
|
12156
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12157
|
-
"span",
|
|
12158
|
-
{
|
|
12159
|
-
className: cn(
|
|
12160
|
-
"min-w-0 flex-1 truncate",
|
|
12161
|
-
classNames?.optionLabel
|
|
12162
|
-
),
|
|
12163
|
-
children: option.label
|
|
12164
|
-
}
|
|
12165
|
-
)
|
|
12166
|
-
]
|
|
12167
|
-
},
|
|
12168
|
-
option.value
|
|
12169
|
-
);
|
|
12170
|
-
}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
12171
|
-
"div",
|
|
12172
|
-
{
|
|
12173
|
-
className: cn(
|
|
12174
|
-
"px-2.5 py-2 text-sm text-muted-foreground",
|
|
12175
|
-
classNames?.empty
|
|
12176
|
-
),
|
|
12177
|
-
children: emptyLabel
|
|
12178
|
-
}
|
|
12179
|
-
)
|
|
12180
|
-
}
|
|
12181
|
-
) : null
|
|
12182
|
-
]
|
|
12183
|
-
}
|
|
12184
|
-
);
|
|
12185
|
-
}
|
|
12186
|
-
);
|
|
12187
11746
|
function BaseNotice({
|
|
12188
11747
|
tone,
|
|
12189
11748
|
icon,
|
|
@@ -12585,7 +12144,7 @@ function getInitialValue2(options, defaultValue) {
|
|
|
12585
12144
|
}
|
|
12586
12145
|
return "";
|
|
12587
12146
|
}
|
|
12588
|
-
function
|
|
12147
|
+
function getNextEnabledIndex(options, currentIndex, direction) {
|
|
12589
12148
|
if (!options.length) return -1;
|
|
12590
12149
|
for (let offset = 1; offset <= options.length; offset += 1) {
|
|
12591
12150
|
const nextIndex = (currentIndex + offset * direction + options.length) % options.length;
|
|
@@ -12687,7 +12246,7 @@ var BaseSelect = React.forwardRef(
|
|
|
12687
12246
|
};
|
|
12688
12247
|
const focusOption = (direction) => {
|
|
12689
12248
|
const currentIndex = activeIndex >= 0 ? activeIndex : 0;
|
|
12690
|
-
const nextIndex =
|
|
12249
|
+
const nextIndex = getNextEnabledIndex(optionList, currentIndex, direction);
|
|
12691
12250
|
if (nextIndex >= 0) {
|
|
12692
12251
|
commitValue(optionList[nextIndex].value, optionList[nextIndex].disabled);
|
|
12693
12252
|
}
|
|
@@ -24585,7 +24144,271 @@ function WorkbenchLaneView({
|
|
|
24585
24144
|
}) }) : null })
|
|
24586
24145
|
] });
|
|
24587
24146
|
}
|
|
24588
|
-
|
|
24147
|
+
var DEFAULT_TOAST_DURATION = 5200;
|
|
24148
|
+
var TOAST_DEDUPE_WINDOW = 1200;
|
|
24149
|
+
var DEFAULT_MESSAGES = {
|
|
24150
|
+
errorTitle: "Error",
|
|
24151
|
+
warningTitle: "Warning",
|
|
24152
|
+
defaultErrorDescription: "Something went wrong.",
|
|
24153
|
+
defaultWarningDescription: "Please check and try again."
|
|
24154
|
+
};
|
|
24155
|
+
var ACTIONABLE_TOAST_PATTERNS = [
|
|
24156
|
+
/^(please|select|enter|provide|write|choose|confirm|fill)\b/i,
|
|
24157
|
+
/^(请|请选择|请先|请输入|请填写|请确认|请留意)/
|
|
24158
|
+
];
|
|
24159
|
+
var DEFAULT_TOAST_CLASS_NAMES = {
|
|
24160
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
24161
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
24162
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
24163
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
24164
|
+
};
|
|
24165
|
+
var recentToastSignatures = /* @__PURE__ */ new Map();
|
|
24166
|
+
function cn4(...classNames) {
|
|
24167
|
+
return classNames.filter(Boolean).join(" ");
|
|
24168
|
+
}
|
|
24169
|
+
function isToastInput(input) {
|
|
24170
|
+
if (!input || typeof input !== "object" || React.isValidElement(input)) {
|
|
24171
|
+
return false;
|
|
24172
|
+
}
|
|
24173
|
+
return "title" in input || "description" in input || "variant" in input;
|
|
24174
|
+
}
|
|
24175
|
+
function isEmptyToastContent(value) {
|
|
24176
|
+
return value == null || typeof value === "string" && !value.trim();
|
|
24177
|
+
}
|
|
24178
|
+
function normalizeToastInput(input, variant, options) {
|
|
24179
|
+
const { description: _description, ...baseOptions } = options ?? {};
|
|
24180
|
+
if (isToastInput(input)) {
|
|
24181
|
+
return {
|
|
24182
|
+
...baseOptions,
|
|
24183
|
+
...input,
|
|
24184
|
+
variant: input.variant ?? variant
|
|
24185
|
+
};
|
|
24186
|
+
}
|
|
24187
|
+
return {
|
|
24188
|
+
...baseOptions,
|
|
24189
|
+
title: input,
|
|
24190
|
+
variant
|
|
24191
|
+
};
|
|
24192
|
+
}
|
|
24193
|
+
function resolveValue(candidate, value) {
|
|
24194
|
+
if (typeof candidate === "function") {
|
|
24195
|
+
return candidate(value);
|
|
24196
|
+
}
|
|
24197
|
+
return candidate;
|
|
24198
|
+
}
|
|
24199
|
+
function shouldEmitToast(signature) {
|
|
24200
|
+
const now = Date.now();
|
|
24201
|
+
for (const [key, timestamp] of recentToastSignatures.entries()) {
|
|
24202
|
+
if (now - timestamp > TOAST_DEDUPE_WINDOW) {
|
|
24203
|
+
recentToastSignatures.delete(key);
|
|
24204
|
+
}
|
|
24205
|
+
}
|
|
24206
|
+
const previousTimestamp = recentToastSignatures.get(signature);
|
|
24207
|
+
if (previousTimestamp && now - previousTimestamp < TOAST_DEDUPE_WINDOW) {
|
|
24208
|
+
return false;
|
|
24209
|
+
}
|
|
24210
|
+
recentToastSignatures.set(signature, now);
|
|
24211
|
+
return true;
|
|
24212
|
+
}
|
|
24213
|
+
function translateMessage(translate, value) {
|
|
24214
|
+
return translate ? translate(value, { defaultValue: value }) : value;
|
|
24215
|
+
}
|
|
24216
|
+
function getDefaultMessage(messages, key) {
|
|
24217
|
+
return messages?.[key] ?? DEFAULT_MESSAGES[key];
|
|
24218
|
+
}
|
|
24219
|
+
function emitToast(input) {
|
|
24220
|
+
const { title, description, duration, variant = "info", ...options } = input;
|
|
24221
|
+
const message = isEmptyToastContent(title) ? description : title;
|
|
24222
|
+
if (isEmptyToastContent(message)) {
|
|
24223
|
+
return void 0;
|
|
24224
|
+
}
|
|
24225
|
+
const descriptionValue = !isEmptyToastContent(description) && description !== message ? description : void 0;
|
|
24226
|
+
const sonnerOptions = {
|
|
24227
|
+
...options,
|
|
24228
|
+
description: descriptionValue,
|
|
24229
|
+
duration: duration ?? DEFAULT_TOAST_DURATION
|
|
24230
|
+
};
|
|
24231
|
+
switch (variant) {
|
|
24232
|
+
case "error":
|
|
24233
|
+
return sonner.toast.error(message, sonnerOptions);
|
|
24234
|
+
case "warning":
|
|
24235
|
+
return sonner.toast.warning(message, sonnerOptions);
|
|
24236
|
+
case "success":
|
|
24237
|
+
return sonner.toast.success(message, sonnerOptions);
|
|
24238
|
+
default:
|
|
24239
|
+
return sonner.toast(message, sonnerOptions);
|
|
24240
|
+
}
|
|
24241
|
+
}
|
|
24242
|
+
function extractToastMessage(value, fallback = "") {
|
|
24243
|
+
if (!value) return fallback;
|
|
24244
|
+
if (typeof value === "string") {
|
|
24245
|
+
const nextMessage = value.trim();
|
|
24246
|
+
return nextMessage || fallback;
|
|
24247
|
+
}
|
|
24248
|
+
if (value instanceof Error) {
|
|
24249
|
+
const nextMessage = String(value.message || "").trim();
|
|
24250
|
+
return nextMessage || fallback;
|
|
24251
|
+
}
|
|
24252
|
+
if (typeof value === "object" && typeof value.message === "string") {
|
|
24253
|
+
const nextMessage = value.message.trim();
|
|
24254
|
+
if (nextMessage) return nextMessage;
|
|
24255
|
+
}
|
|
24256
|
+
if (typeof value === "object" && typeof value.title === "string") {
|
|
24257
|
+
const nextTitle = value.title.trim();
|
|
24258
|
+
if (nextTitle) return nextTitle;
|
|
24259
|
+
}
|
|
24260
|
+
return fallback;
|
|
24261
|
+
}
|
|
24262
|
+
function resolveToastVariantForMessage(value) {
|
|
24263
|
+
const message = extractToastMessage(value);
|
|
24264
|
+
if (ACTIONABLE_TOAST_PATTERNS.some((pattern) => pattern.test(message))) {
|
|
24265
|
+
return "warning";
|
|
24266
|
+
}
|
|
24267
|
+
return "error";
|
|
24268
|
+
}
|
|
24269
|
+
function MonkeysToaster({
|
|
24270
|
+
className,
|
|
24271
|
+
closeButton = true,
|
|
24272
|
+
position = "bottom-right",
|
|
24273
|
+
richColors = true,
|
|
24274
|
+
toastOptions,
|
|
24275
|
+
useThemeClassNames = true,
|
|
24276
|
+
visibleToasts = 10,
|
|
24277
|
+
...props
|
|
24278
|
+
}) {
|
|
24279
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
24280
|
+
sonner.Toaster,
|
|
24281
|
+
{
|
|
24282
|
+
className: cn4("pointer-events-auto toaster group", className),
|
|
24283
|
+
closeButton,
|
|
24284
|
+
position,
|
|
24285
|
+
richColors,
|
|
24286
|
+
toastOptions: {
|
|
24287
|
+
...toastOptions,
|
|
24288
|
+
classNames: useThemeClassNames ? {
|
|
24289
|
+
...DEFAULT_TOAST_CLASS_NAMES,
|
|
24290
|
+
...toastOptions?.classNames
|
|
24291
|
+
} : toastOptions?.classNames
|
|
24292
|
+
},
|
|
24293
|
+
visibleToasts,
|
|
24294
|
+
...props
|
|
24295
|
+
}
|
|
24296
|
+
);
|
|
24297
|
+
}
|
|
24298
|
+
function MonkeysToastProvider({ children, toasterProps }) {
|
|
24299
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
24300
|
+
children,
|
|
24301
|
+
/* @__PURE__ */ jsxRuntime.jsx(MonkeysToaster, { ...toasterProps })
|
|
24302
|
+
] });
|
|
24303
|
+
}
|
|
24304
|
+
function useToastOnValue(value, options = {}) {
|
|
24305
|
+
const previousSignatureRef = React.useRef(null);
|
|
24306
|
+
const translate = options.translate;
|
|
24307
|
+
React.useEffect(() => {
|
|
24308
|
+
if (!value) {
|
|
24309
|
+
previousSignatureRef.current = null;
|
|
24310
|
+
return;
|
|
24311
|
+
}
|
|
24312
|
+
const variant = resolveValue(options.variant, value) ?? "error";
|
|
24313
|
+
const rawTitle = resolveValue(options.title, value);
|
|
24314
|
+
const rawFallbackDescription = resolveValue(options.fallbackDescription, value);
|
|
24315
|
+
const rawDescription = resolveValue(options.description, value) ?? extractToastMessage(value, rawFallbackDescription || "");
|
|
24316
|
+
const title = translateMessage(
|
|
24317
|
+
translate,
|
|
24318
|
+
rawTitle || getDefaultMessage(options.messages, variant === "warning" ? "warningTitle" : "errorTitle")
|
|
24319
|
+
);
|
|
24320
|
+
const description = translateMessage(
|
|
24321
|
+
translate,
|
|
24322
|
+
rawDescription || getDefaultMessage(
|
|
24323
|
+
options.messages,
|
|
24324
|
+
variant === "warning" ? "defaultWarningDescription" : "defaultErrorDescription"
|
|
24325
|
+
)
|
|
24326
|
+
);
|
|
24327
|
+
const signature = resolveValue(options.signature, value) || [variant, title, description].join("|");
|
|
24328
|
+
if (previousSignatureRef.current === signature) {
|
|
24329
|
+
return;
|
|
24330
|
+
}
|
|
24331
|
+
previousSignatureRef.current = signature;
|
|
24332
|
+
if (!shouldEmitToast(signature)) {
|
|
24333
|
+
return;
|
|
24334
|
+
}
|
|
24335
|
+
toast.show({
|
|
24336
|
+
variant,
|
|
24337
|
+
title,
|
|
24338
|
+
description,
|
|
24339
|
+
duration: resolveValue(options.duration, value)
|
|
24340
|
+
});
|
|
24341
|
+
}, [
|
|
24342
|
+
options.description,
|
|
24343
|
+
options.duration,
|
|
24344
|
+
options.fallbackDescription,
|
|
24345
|
+
options.messages,
|
|
24346
|
+
options.signature,
|
|
24347
|
+
options.title,
|
|
24348
|
+
options.variant,
|
|
24349
|
+
translate,
|
|
24350
|
+
value
|
|
24351
|
+
]);
|
|
24352
|
+
}
|
|
24353
|
+
function useToastFeed(items, options = {}) {
|
|
24354
|
+
const previousVisibleSignaturesRef = React.useRef(/* @__PURE__ */ new Set());
|
|
24355
|
+
const translate = options.translate;
|
|
24356
|
+
const emitItem = React.useCallback(
|
|
24357
|
+
(item, index, visibleSignatures) => {
|
|
24358
|
+
const variant = item.variant ?? "info";
|
|
24359
|
+
const title = translateMessage(
|
|
24360
|
+
translate,
|
|
24361
|
+
item.title || getDefaultMessage(options.messages, variant === "warning" ? "warningTitle" : "errorTitle")
|
|
24362
|
+
);
|
|
24363
|
+
const description = translateMessage(
|
|
24364
|
+
translate,
|
|
24365
|
+
item.description || getDefaultMessage(
|
|
24366
|
+
options.messages,
|
|
24367
|
+
variant === "warning" ? "defaultWarningDescription" : "defaultErrorDescription"
|
|
24368
|
+
)
|
|
24369
|
+
);
|
|
24370
|
+
const signature = item.signature || [variant, title, description, index].join("|");
|
|
24371
|
+
visibleSignatures.add(signature);
|
|
24372
|
+
if (previousVisibleSignaturesRef.current.has(signature) || !shouldEmitToast(signature)) {
|
|
24373
|
+
return;
|
|
24374
|
+
}
|
|
24375
|
+
toast.show({
|
|
24376
|
+
variant,
|
|
24377
|
+
title,
|
|
24378
|
+
description,
|
|
24379
|
+
duration: item.duration
|
|
24380
|
+
});
|
|
24381
|
+
},
|
|
24382
|
+
[options.messages, translate]
|
|
24383
|
+
);
|
|
24384
|
+
React.useEffect(() => {
|
|
24385
|
+
const visibleSignatures = /* @__PURE__ */ new Set();
|
|
24386
|
+
items.forEach((item, index) => {
|
|
24387
|
+
if (item) {
|
|
24388
|
+
emitItem(item, index, visibleSignatures);
|
|
24389
|
+
}
|
|
24390
|
+
});
|
|
24391
|
+
previousVisibleSignaturesRef.current = visibleSignatures;
|
|
24392
|
+
}, [emitItem, items]);
|
|
24393
|
+
}
|
|
24394
|
+
var toast = Object.assign(
|
|
24395
|
+
(message, options) => sonner.toast(message, options),
|
|
24396
|
+
{
|
|
24397
|
+
show: emitToast,
|
|
24398
|
+
error: (input, options) => emitToast(normalizeToastInput(input, "error", options)),
|
|
24399
|
+
warning: (input, options) => emitToast(normalizeToastInput(input, "warning", options)),
|
|
24400
|
+
success: (input, options) => emitToast(normalizeToastInput(input, "success", options)),
|
|
24401
|
+
info: (input, options) => emitToast(normalizeToastInput(input, "info", options)),
|
|
24402
|
+
message: sonner.toast.message,
|
|
24403
|
+
promise: sonner.toast.promise,
|
|
24404
|
+
dismiss: sonner.toast.dismiss,
|
|
24405
|
+
loading: sonner.toast.loading,
|
|
24406
|
+
custom: sonner.toast.custom,
|
|
24407
|
+
getHistory: sonner.toast.getHistory,
|
|
24408
|
+
getToasts: sonner.toast.getToasts
|
|
24409
|
+
}
|
|
24410
|
+
);
|
|
24411
|
+
function cn5(...inputs) {
|
|
24589
24412
|
return inputs.filter(Boolean).join(" ");
|
|
24590
24413
|
}
|
|
24591
24414
|
function SunIcon({ className }) {
|
|
@@ -24637,7 +24460,7 @@ function DarkModeSelector({
|
|
|
24637
24460
|
const trigger = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu3__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24638
24461
|
"button",
|
|
24639
24462
|
{
|
|
24640
|
-
className:
|
|
24463
|
+
className: cn5(
|
|
24641
24464
|
"inline-flex h-8 w-8 items-center justify-center rounded-md text-[hsl(var(--foreground))] hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))] transition-colors focus-visible:outline-none",
|
|
24642
24465
|
className
|
|
24643
24466
|
),
|
|
@@ -24671,7 +24494,7 @@ function DarkModeSelector({
|
|
|
24671
24494
|
children: options.map(({ value, label, Icon }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24672
24495
|
DropdownMenu3__namespace.Item,
|
|
24673
24496
|
{
|
|
24674
|
-
className:
|
|
24497
|
+
className: cn5(
|
|
24675
24498
|
"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))]",
|
|
24676
24499
|
mode === value && "bg-[hsl(var(--accent))]"
|
|
24677
24500
|
),
|
|
@@ -24733,7 +24556,7 @@ function DarkModeSubMenu({
|
|
|
24733
24556
|
{
|
|
24734
24557
|
checked: mode === value,
|
|
24735
24558
|
disabled: mode === value,
|
|
24736
|
-
className:
|
|
24559
|
+
className: cn5(
|
|
24737
24560
|
"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 pl-7 text-sm outline-none transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))] data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
24738
24561
|
),
|
|
24739
24562
|
onCheckedChange: () => onModeChange(value),
|
|
@@ -24749,7 +24572,7 @@ function DarkModeSubMenu({
|
|
|
24749
24572
|
) })
|
|
24750
24573
|
] });
|
|
24751
24574
|
}
|
|
24752
|
-
function
|
|
24575
|
+
function cn6(...inputs) {
|
|
24753
24576
|
return inputs.filter(Boolean).join(" ");
|
|
24754
24577
|
}
|
|
24755
24578
|
function GlobeIcon({ className }) {
|
|
@@ -24769,7 +24592,7 @@ function I18nSelector({
|
|
|
24769
24592
|
const trigger = /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu3__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24770
24593
|
"button",
|
|
24771
24594
|
{
|
|
24772
|
-
className:
|
|
24595
|
+
className: cn6(
|
|
24773
24596
|
"inline-flex h-8 w-8 items-center justify-center rounded-md text-[hsl(var(--foreground))] hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))] transition-colors focus-visible:outline-none",
|
|
24774
24597
|
className
|
|
24775
24598
|
),
|
|
@@ -24803,7 +24626,7 @@ function I18nSelector({
|
|
|
24803
24626
|
children: languages.map(({ code, label }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
24804
24627
|
DropdownMenu3__namespace.Item,
|
|
24805
24628
|
{
|
|
24806
|
-
className:
|
|
24629
|
+
className: cn6(
|
|
24807
24630
|
"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))]",
|
|
24808
24631
|
currentLanguage === code && "bg-[hsl(var(--accent))]"
|
|
24809
24632
|
),
|
|
@@ -24917,7 +24740,6 @@ exports.BaseLayoutPane = BaseLayoutPane;
|
|
|
24917
24740
|
exports.BaseLayoutResizeHandle = BaseLayoutResizeHandle;
|
|
24918
24741
|
exports.BaseLayoutSplit = BaseLayoutSplit;
|
|
24919
24742
|
exports.BaseLoadingState = BaseLoadingState;
|
|
24920
|
-
exports.BaseMultiSelect = BaseMultiSelect;
|
|
24921
24743
|
exports.BaseNotice = BaseNotice;
|
|
24922
24744
|
exports.BasePagination = BasePagination;
|
|
24923
24745
|
exports.BasePanel = BasePanel;
|
|
@@ -24986,10 +24808,14 @@ exports.InteractiveTableEditableTextCell = InteractiveTableEditableTextCell;
|
|
|
24986
24808
|
exports.InteractiveTableReadonlyCell = InteractiveTableReadonlyCell;
|
|
24987
24809
|
exports.InteractiveTableSelectCell = InteractiveTableSelectCell;
|
|
24988
24810
|
exports.LoginLayout = LoginLayout;
|
|
24811
|
+
exports.MonkeysToastProvider = MonkeysToastProvider;
|
|
24812
|
+
exports.MonkeysToaster = MonkeysToaster;
|
|
24989
24813
|
exports.NavButton = NavButton;
|
|
24990
24814
|
exports.OAuthButton = OAuthButton;
|
|
24991
24815
|
exports.OIDCButton = OIDCButton;
|
|
24992
24816
|
exports.PendingApproval = PendingApproval;
|
|
24817
|
+
exports.ToastProvider = MonkeysToastProvider;
|
|
24818
|
+
exports.Toaster = MonkeysToaster;
|
|
24993
24819
|
exports.WorkbenchContentPane = WorkbenchContentPane;
|
|
24994
24820
|
exports.WorkbenchContentToolbar = WorkbenchContentToolbar;
|
|
24995
24821
|
exports.WorkbenchDetailSidebar = WorkbenchDetailSidebar;
|
|
@@ -25008,6 +24834,7 @@ exports.calculateSaturation = calculateSaturation;
|
|
|
25008
24834
|
exports.clearRegistry = clearRegistry;
|
|
25009
24835
|
exports.cn = cn3;
|
|
25010
24836
|
exports.createSolidColorScale = createSolidColorScale;
|
|
24837
|
+
exports.extractToastMessage = extractToastMessage;
|
|
25011
24838
|
exports.genTailwindTheme = genTailwindTheme;
|
|
25012
24839
|
exports.getBaseBadgeToneClassName = getBaseBadgeToneClassName;
|
|
25013
24840
|
exports.getBaseButtonToneClassName = getBaseButtonToneClassName;
|
|
@@ -25026,8 +24853,12 @@ exports.resolveBaseAppearance = resolveBaseAppearance;
|
|
|
25026
24853
|
exports.resolveComponent = resolveComponent;
|
|
25027
24854
|
exports.resolveDataExplorerAppearance = resolveDataExplorerAppearance;
|
|
25028
24855
|
exports.resolveMonkeysTheme = resolveMonkeysTheme;
|
|
24856
|
+
exports.resolveToastVariantForMessage = resolveToastVariantForMessage;
|
|
25029
24857
|
exports.setNeocardTheme = setNeocardTheme;
|
|
25030
24858
|
exports.setTailwindTheme = setTailwindTheme;
|
|
24859
|
+
exports.toast = toast;
|
|
25031
24860
|
exports.useDarkMode = useDarkMode;
|
|
24861
|
+
exports.useToastFeed = useToastFeed;
|
|
24862
|
+
exports.useToastOnValue = useToastOnValue;
|
|
25032
24863
|
//# sourceMappingURL=index.js.map
|
|
25033
24864
|
//# sourceMappingURL=index.js.map
|