@underverse-ui/underverse 1.0.210 → 2.0.0
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/CHANGELOG.md +9 -0
- package/LICENSE +21 -0
- package/README.md +243 -706
- package/api-reference.json +1 -1
- package/dist/{EmojiPicker-FEJJDAWZ.js → EmojiPicker-34YATB7Z.js} +4 -4
- package/dist/{chunk-F6A7HJE4.js → chunk-A7XL4RDV.js} +3 -3
- package/dist/{chunk-CYCBSKWI.js → chunk-KGNYK5YF.js} +2 -2
- package/dist/{chunk-AMAILXHP.js → chunk-LTIU5FQY.js} +4 -4
- package/dist/chunk-LTIU5FQY.js.map +1 -0
- package/dist/{chunk-GKY5DHGR.js → chunk-MNZVW2QX.js} +3 -3
- package/dist/{chunk-BRDGIALS.js → chunk-PLHJWXCW.js} +24 -30
- package/dist/{chunk-BRDGIALS.js.map → chunk-PLHJWXCW.js.map} +1 -1
- package/dist/{chunk-4E43DRP2.js → chunk-QIMAN4VF.js} +15 -9
- package/dist/{chunk-4E43DRP2.js.map → chunk-QIMAN4VF.js.map} +1 -1
- package/dist/index.cjs +156 -116
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +136 -96
- package/dist/index.js.map +1 -1
- package/dist/{menu-bar-6GS5LLTD.js → menu-bar-SPAAI5X6.js} +4 -4
- package/dist/ueditor.cjs +12 -6
- package/dist/ueditor.cjs.map +1 -1
- package/dist/ueditor.js +4 -4
- package/package.json +3 -1
- package/dist/chunk-AMAILXHP.js.map +0 -1
- /package/dist/{EmojiPicker-FEJJDAWZ.js.map → EmojiPicker-34YATB7Z.js.map} +0 -0
- /package/dist/{chunk-F6A7HJE4.js.map → chunk-A7XL4RDV.js.map} +0 -0
- /package/dist/{chunk-CYCBSKWI.js.map → chunk-KGNYK5YF.js.map} +0 -0
- /package/dist/{chunk-GKY5DHGR.js.map → chunk-MNZVW2QX.js.map} +0 -0
- /package/dist/{menu-bar-6GS5LLTD.js.map → menu-bar-SPAAI5X6.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
extractImageSrcsFromHtml,
|
|
5
5
|
normalizeImageUrl,
|
|
6
6
|
prepareUEditorContentForSave
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QIMAN4VF.js";
|
|
8
8
|
import {
|
|
9
9
|
EmojiPicker_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-A7XL4RDV.js";
|
|
11
11
|
import {
|
|
12
12
|
getEmojiImageUrl,
|
|
13
13
|
getEmojiUnifiedCode,
|
|
14
14
|
setEmojiBaseUrl
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KGNYK5YF.js";
|
|
16
16
|
import "./chunk-4TYW5K4J.js";
|
|
17
17
|
import {
|
|
18
18
|
Modal_default
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MNZVW2QX.js";
|
|
20
20
|
import {
|
|
21
21
|
DropdownMenuItem,
|
|
22
22
|
DropdownMenuSeparator,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
shadcnAnimationStyles,
|
|
35
35
|
useShadCNAnimations,
|
|
36
36
|
useUnderverseUIConfig
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-LTIU5FQY.js";
|
|
38
38
|
import {
|
|
39
39
|
ForceInternalTranslationsProvider,
|
|
40
40
|
NextIntlAdapter,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
useUnderverseLocale,
|
|
55
55
|
useUnderverseTranslations,
|
|
56
56
|
vi_default
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-PLHJWXCW.js";
|
|
58
58
|
import {
|
|
59
59
|
__export,
|
|
60
60
|
__require
|
|
@@ -846,19 +846,7 @@ function useOverlayScrollbarTarget(targetRef, options = {}) {
|
|
|
846
846
|
return () => {
|
|
847
847
|
controller.destroy();
|
|
848
848
|
};
|
|
849
|
-
}, [
|
|
850
|
-
targetRef,
|
|
851
|
-
resolved.enabled,
|
|
852
|
-
resolved.theme,
|
|
853
|
-
resolved.visibility,
|
|
854
|
-
resolved.autoHide,
|
|
855
|
-
resolved.autoHideDelay,
|
|
856
|
-
resolved.dragScroll,
|
|
857
|
-
resolved.clickScroll,
|
|
858
|
-
resolved.overflowX,
|
|
859
|
-
resolved.overflowY,
|
|
860
|
-
resolved.exclude
|
|
861
|
-
]);
|
|
849
|
+
}, [resolved, targetRef]);
|
|
862
850
|
}
|
|
863
851
|
var OverlayScrollbarProvider_default = OverlayScrollbarProvider;
|
|
864
852
|
|
|
@@ -5799,6 +5787,10 @@ import { Calendar, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight3, S
|
|
|
5799
5787
|
import * as React23 from "react";
|
|
5800
5788
|
import { useId as useId5 } from "react";
|
|
5801
5789
|
import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5790
|
+
function normalizeToLocalDate(date) {
|
|
5791
|
+
if (!date) return null;
|
|
5792
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
5793
|
+
}
|
|
5802
5794
|
var DatePicker = ({
|
|
5803
5795
|
id,
|
|
5804
5796
|
value,
|
|
@@ -5832,16 +5824,15 @@ var DatePicker = ({
|
|
|
5832
5824
|
const [isFocused, setIsFocused] = React23.useState(false);
|
|
5833
5825
|
const [inputValue, setInputValue] = React23.useState("");
|
|
5834
5826
|
React23.useEffect(() => {
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5827
|
+
setInputValue((currentInput) => {
|
|
5828
|
+
if (value) {
|
|
5829
|
+
const parsed = parseDateString(currentInput, locale);
|
|
5830
|
+
const isSame = parsed && parsed.getTime() === value.getTime();
|
|
5831
|
+
return isSame ? currentInput : formatDateShort(value, locale);
|
|
5840
5832
|
}
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
}, [value, locale, isFocused]);
|
|
5833
|
+
return isFocused ? currentInput : "";
|
|
5834
|
+
});
|
|
5835
|
+
}, [isFocused, locale, value]);
|
|
5845
5836
|
const handleInputChange = (e) => {
|
|
5846
5837
|
const text = e.target.value;
|
|
5847
5838
|
setInputValue(text);
|
|
@@ -5860,7 +5851,7 @@ var DatePicker = ({
|
|
|
5860
5851
|
if (required) {
|
|
5861
5852
|
setLocalRequiredError(tv("required"));
|
|
5862
5853
|
} else {
|
|
5863
|
-
onChange(void 0);
|
|
5854
|
+
if (value) onChange(void 0);
|
|
5864
5855
|
setLocalRequiredError(void 0);
|
|
5865
5856
|
}
|
|
5866
5857
|
} else {
|
|
@@ -6258,6 +6249,7 @@ var DatePicker = ({
|
|
|
6258
6249
|
const autoId = useId5();
|
|
6259
6250
|
const resolvedId = id ? String(id) : `datepicker-${autoId}`;
|
|
6260
6251
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
6252
|
+
const panelId = `${resolvedId}-panel`;
|
|
6261
6253
|
const labelSize = sizeStyles7[size].label;
|
|
6262
6254
|
const radiusClass = size === "sm" ? "rounded-md" : "rounded-lg";
|
|
6263
6255
|
const verticalGap = size === "sm" ? "space-y-1.5" : size === "lg" ? "space-y-2.5" : "space-y-2";
|
|
@@ -6306,6 +6298,7 @@ var DatePicker = ({
|
|
|
6306
6298
|
{
|
|
6307
6299
|
open: isOpen,
|
|
6308
6300
|
onOpenChange: setIsOpen,
|
|
6301
|
+
contentProps: { id: panelId },
|
|
6309
6302
|
placement: "bottom-start",
|
|
6310
6303
|
disabled,
|
|
6311
6304
|
contentWidth: sizeStyles7[size].contentWidth,
|
|
@@ -6322,12 +6315,6 @@ var DatePicker = ({
|
|
|
6322
6315
|
"div",
|
|
6323
6316
|
{
|
|
6324
6317
|
ref: triggerRef,
|
|
6325
|
-
id: resolvedId,
|
|
6326
|
-
role: "button",
|
|
6327
|
-
"aria-label": value ? formatDateDisplay(value) : placeholder || t("placeholder"),
|
|
6328
|
-
"aria-labelledby": labelId,
|
|
6329
|
-
"aria-required": required,
|
|
6330
|
-
"aria-invalid": !!effectiveError,
|
|
6331
6318
|
className: cn(
|
|
6332
6319
|
"group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
|
|
6333
6320
|
formControlFixedClass,
|
|
@@ -6359,8 +6346,16 @@ var DatePicker = ({
|
|
|
6359
6346
|
"input",
|
|
6360
6347
|
{
|
|
6361
6348
|
ref: inputRef,
|
|
6349
|
+
id: resolvedId,
|
|
6362
6350
|
type: "text",
|
|
6351
|
+
role: "combobox",
|
|
6363
6352
|
"aria-label": value ? formatDateDisplay(value) : placeholder || t("placeholder"),
|
|
6353
|
+
"aria-labelledby": labelId,
|
|
6354
|
+
"aria-haspopup": "dialog",
|
|
6355
|
+
"aria-expanded": isOpen,
|
|
6356
|
+
"aria-controls": panelId,
|
|
6357
|
+
"aria-required": required,
|
|
6358
|
+
"aria-invalid": !!effectiveError,
|
|
6364
6359
|
disabled,
|
|
6365
6360
|
placeholder: placeholder || t("placeholder"),
|
|
6366
6361
|
value: isFocused ? inputValue : value ? formatDateDisplay(value) : "",
|
|
@@ -6467,19 +6462,18 @@ var DateRangePicker = ({
|
|
|
6467
6462
|
return `${startStr} - ${formatDateShort(e, locale)}`;
|
|
6468
6463
|
}, [locale]);
|
|
6469
6464
|
React23.useEffect(() => {
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
}
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
}, [startDate, endDate, locale, isFocused, getRangeString]);
|
|
6465
|
+
setInputValue((currentInput) => {
|
|
6466
|
+
if (startDate) {
|
|
6467
|
+
const parts = currentInput.split(/\s*-\s*/);
|
|
6468
|
+
const inputStart = parts[0] ? parseDateString(parts[0], locale) : null;
|
|
6469
|
+
const inputEnd = parts[1] ? parseDateString(parts[1], locale) : null;
|
|
6470
|
+
const startSame = inputStart && inputStart.getTime() === startDate.getTime();
|
|
6471
|
+
const endSame = !endDate && !inputEnd || endDate && inputEnd && endDate.getTime() === inputEnd.getTime();
|
|
6472
|
+
return startSame && endSame ? currentInput : getRangeString(startDate, endDate);
|
|
6473
|
+
}
|
|
6474
|
+
return isFocused ? currentInput : "";
|
|
6475
|
+
});
|
|
6476
|
+
}, [endDate, getRangeString, isFocused, locale, startDate]);
|
|
6483
6477
|
const handleInputChange = (e) => {
|
|
6484
6478
|
const text = e.target.value;
|
|
6485
6479
|
setInputValue(text);
|
|
@@ -6528,7 +6522,7 @@ var DateRangePicker = ({
|
|
|
6528
6522
|
} else {
|
|
6529
6523
|
setTempStart(null);
|
|
6530
6524
|
setTempEnd(null);
|
|
6531
|
-
onChange(void 0, void 0);
|
|
6525
|
+
if (startDate || endDate) onChange(void 0, void 0);
|
|
6532
6526
|
setLocalRequiredError(void 0);
|
|
6533
6527
|
}
|
|
6534
6528
|
} else {
|
|
@@ -6559,8 +6553,8 @@ var DateRangePicker = ({
|
|
|
6559
6553
|
}
|
|
6560
6554
|
}
|
|
6561
6555
|
if (startDate) {
|
|
6562
|
-
setTempStart(
|
|
6563
|
-
setTempEnd(
|
|
6556
|
+
setTempStart(normalizeToLocalDate(startDate));
|
|
6557
|
+
setTempEnd(normalizeToLocalDate(endDate));
|
|
6564
6558
|
setInputValue(getRangeString(startDate, endDate));
|
|
6565
6559
|
setLocalRequiredError(void 0);
|
|
6566
6560
|
} else {
|
|
@@ -6664,21 +6658,17 @@ var DateRangePicker = ({
|
|
|
6664
6658
|
footerMargin: "mt-5 pt-4 gap-2.5"
|
|
6665
6659
|
}
|
|
6666
6660
|
};
|
|
6667
|
-
const
|
|
6668
|
-
|
|
6669
|
-
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
6670
|
-
};
|
|
6671
|
-
const minDay = React23.useMemo(() => normalizeToLocal(minDate), [minDate]);
|
|
6672
|
-
const maxDay = React23.useMemo(() => normalizeToLocal(maxDate), [maxDate]);
|
|
6661
|
+
const minDay = normalizeToLocalDate(minDate);
|
|
6662
|
+
const maxDay = normalizeToLocalDate(maxDate);
|
|
6673
6663
|
const [viewDate, setViewDate] = React23.useState(startDate || /* @__PURE__ */ new Date());
|
|
6674
|
-
const [tempStart, setTempStart] = React23.useState(
|
|
6675
|
-
const [tempEnd, setTempEnd] = React23.useState(
|
|
6664
|
+
const [tempStart, setTempStart] = React23.useState(normalizeToLocalDate(startDate));
|
|
6665
|
+
const [tempEnd, setTempEnd] = React23.useState(normalizeToLocalDate(endDate));
|
|
6676
6666
|
const [hoveredDate, setHoveredDate] = React23.useState(null);
|
|
6677
6667
|
React23.useEffect(() => {
|
|
6678
|
-
setTempStart(
|
|
6668
|
+
setTempStart(normalizeToLocalDate(startDate));
|
|
6679
6669
|
}, [startDate]);
|
|
6680
6670
|
React23.useEffect(() => {
|
|
6681
|
-
setTempEnd(
|
|
6671
|
+
setTempEnd(normalizeToLocalDate(endDate));
|
|
6682
6672
|
}, [endDate]);
|
|
6683
6673
|
React23.useEffect(() => {
|
|
6684
6674
|
if (!isOpen) {
|
|
@@ -6697,12 +6687,12 @@ var DateRangePicker = ({
|
|
|
6697
6687
|
const inRange = (d, s, e) => d > s && d < e;
|
|
6698
6688
|
const getDaysInMonth = (d) => new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate();
|
|
6699
6689
|
const getFirstDayOfMonth = (d) => new Date(d.getFullYear(), d.getMonth(), 1).getDay();
|
|
6700
|
-
const navigateMonth =
|
|
6690
|
+
const navigateMonth = (direction) => {
|
|
6701
6691
|
setViewDate((prev) => new Date(prev.getFullYear(), prev.getMonth() + (direction === "next" ? 1 : -1), 1));
|
|
6702
|
-
}
|
|
6703
|
-
const navigateYearRange =
|
|
6692
|
+
};
|
|
6693
|
+
const navigateYearRange = (direction) => {
|
|
6704
6694
|
setViewDate((prev) => new Date(prev.getFullYear() + (direction === "next" ? 12 : -12), prev.getMonth(), 1));
|
|
6705
|
-
}
|
|
6695
|
+
};
|
|
6706
6696
|
const isElementVerticallyScrollable = (el) => {
|
|
6707
6697
|
const style = window.getComputedStyle(el);
|
|
6708
6698
|
const overflowY = style.overflowY;
|
|
@@ -6731,11 +6721,13 @@ var DateRangePicker = ({
|
|
|
6731
6721
|
const steps = Math.trunc(wheelDeltaRef.current / threshold);
|
|
6732
6722
|
wheelDeltaRef.current -= steps * threshold;
|
|
6733
6723
|
const direction = steps > 0 ? "next" : "prev";
|
|
6734
|
-
for (let i = 0; i < Math.abs(steps); i++)
|
|
6724
|
+
for (let i = 0; i < Math.abs(steps); i++) {
|
|
6725
|
+
setViewDate((prev) => new Date(prev.getFullYear(), prev.getMonth() + (direction === "next" ? 1 : -1), 1));
|
|
6726
|
+
}
|
|
6735
6727
|
};
|
|
6736
6728
|
container.addEventListener("wheel", onWheel, { passive: false });
|
|
6737
6729
|
return () => container.removeEventListener("wheel", onWheel);
|
|
6738
|
-
}, [isOpen
|
|
6730
|
+
}, [isOpen]);
|
|
6739
6731
|
const handleSelect = (date) => {
|
|
6740
6732
|
const localDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
6741
6733
|
if (!tempStart || tempStart && tempEnd) {
|
|
@@ -7018,6 +7010,7 @@ var DateRangePicker = ({
|
|
|
7018
7010
|
const autoId = useId5();
|
|
7019
7011
|
const resolvedId = id ? String(id) : `daterangepicker-${autoId}`;
|
|
7020
7012
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
7013
|
+
const panelId = `${resolvedId}-panel`;
|
|
7021
7014
|
const globalConfig = useUnderverseUIConfig();
|
|
7022
7015
|
const resolvedBorderMode = borderMode ?? globalConfig.borderMode ?? "full";
|
|
7023
7016
|
return /* @__PURE__ */ jsxs20("div", { className: cn("space-y-1.5", className), children: [
|
|
@@ -7062,6 +7055,7 @@ var DateRangePicker = ({
|
|
|
7062
7055
|
{
|
|
7063
7056
|
open: isOpen,
|
|
7064
7057
|
onOpenChange: setIsOpen,
|
|
7058
|
+
contentProps: { id: panelId },
|
|
7065
7059
|
placement: "bottom-start",
|
|
7066
7060
|
disabled,
|
|
7067
7061
|
contentWidth: sizeStyles7[size].contentWidth,
|
|
@@ -7077,12 +7071,6 @@ var DateRangePicker = ({
|
|
|
7077
7071
|
"div",
|
|
7078
7072
|
{
|
|
7079
7073
|
ref: triggerRef,
|
|
7080
|
-
id: resolvedId,
|
|
7081
|
-
role: "button",
|
|
7082
|
-
"aria-label": tempStart ? displayLabel : placeholder,
|
|
7083
|
-
"aria-labelledby": labelId,
|
|
7084
|
-
"aria-required": required,
|
|
7085
|
-
"aria-invalid": !!effectiveError,
|
|
7086
7074
|
className: cn(
|
|
7087
7075
|
"group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
|
|
7088
7076
|
formControlFixedClass,
|
|
@@ -7113,8 +7101,16 @@ var DateRangePicker = ({
|
|
|
7113
7101
|
"input",
|
|
7114
7102
|
{
|
|
7115
7103
|
ref: inputRef,
|
|
7104
|
+
id: resolvedId,
|
|
7116
7105
|
type: "text",
|
|
7106
|
+
role: "combobox",
|
|
7117
7107
|
"aria-label": tempStart ? displayLabel : placeholder,
|
|
7108
|
+
"aria-labelledby": labelId,
|
|
7109
|
+
"aria-haspopup": "dialog",
|
|
7110
|
+
"aria-expanded": isOpen,
|
|
7111
|
+
"aria-controls": panelId,
|
|
7112
|
+
"aria-required": required,
|
|
7113
|
+
"aria-invalid": !!effectiveError,
|
|
7118
7114
|
disabled,
|
|
7119
7115
|
placeholder,
|
|
7120
7116
|
value: isFocused ? inputValue : tempStart ? displayLabel : "",
|
|
@@ -7949,6 +7945,7 @@ var LunarDatePicker = ({
|
|
|
7949
7945
|
const autoId = useId6();
|
|
7950
7946
|
const resolvedId = id ? String(id) : `lunar-datepicker-${autoId}`;
|
|
7951
7947
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
7948
|
+
const panelId = `${resolvedId}-panel`;
|
|
7952
7949
|
const labelSize = sizeStyles7[size].label;
|
|
7953
7950
|
const verticalGap = size === "sm" ? "space-y-1.5" : size === "lg" ? "space-y-2.5" : "space-y-2";
|
|
7954
7951
|
const effectiveError = localRequiredError;
|
|
@@ -7994,6 +7991,7 @@ var LunarDatePicker = ({
|
|
|
7994
7991
|
{
|
|
7995
7992
|
open: isOpen,
|
|
7996
7993
|
onOpenChange: setIsOpen,
|
|
7994
|
+
contentProps: { id: panelId },
|
|
7997
7995
|
placement: "bottom-start",
|
|
7998
7996
|
borderMode: resolvedBorderMode,
|
|
7999
7997
|
disabled,
|
|
@@ -8010,12 +8008,6 @@ var LunarDatePicker = ({
|
|
|
8010
8008
|
"div",
|
|
8011
8009
|
{
|
|
8012
8010
|
ref: triggerRef,
|
|
8013
|
-
id: resolvedId,
|
|
8014
|
-
role: "button",
|
|
8015
|
-
"aria-label": value ? formatDateDisplay(value) : placeholder || t("placeholder"),
|
|
8016
|
-
"aria-labelledby": labelId,
|
|
8017
|
-
"aria-required": required,
|
|
8018
|
-
"aria-invalid": !!effectiveError,
|
|
8019
8011
|
className: cn(
|
|
8020
8012
|
"group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
|
|
8021
8013
|
formControlFixedClass,
|
|
@@ -8047,8 +8039,16 @@ var LunarDatePicker = ({
|
|
|
8047
8039
|
"input",
|
|
8048
8040
|
{
|
|
8049
8041
|
ref: inputRef,
|
|
8042
|
+
id: resolvedId,
|
|
8050
8043
|
type: "text",
|
|
8044
|
+
role: "combobox",
|
|
8051
8045
|
"aria-label": value ? formatDateDisplay(value) : placeholder || t("placeholder"),
|
|
8046
|
+
"aria-labelledby": labelId,
|
|
8047
|
+
"aria-haspopup": "dialog",
|
|
8048
|
+
"aria-expanded": isOpen,
|
|
8049
|
+
"aria-controls": panelId,
|
|
8050
|
+
"aria-required": required,
|
|
8051
|
+
"aria-invalid": !!effectiveError,
|
|
8052
8052
|
disabled,
|
|
8053
8053
|
placeholder: placeholder || t("placeholder"),
|
|
8054
8054
|
value: isFocused ? inputValue : value ? formatDateDisplay(value) : "",
|
|
@@ -8575,6 +8575,7 @@ var LunarDateRangePicker = ({
|
|
|
8575
8575
|
const autoId = useId6();
|
|
8576
8576
|
const resolvedId = id ? String(id) : `lunardaterangepicker-${autoId}`;
|
|
8577
8577
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
8578
|
+
const panelId = `${resolvedId}-panel`;
|
|
8578
8579
|
return /* @__PURE__ */ jsxs21("div", { className: cn("space-y-1.5", className), children: [
|
|
8579
8580
|
label && /* @__PURE__ */ jsxs21(
|
|
8580
8581
|
"label",
|
|
@@ -8617,6 +8618,7 @@ var LunarDateRangePicker = ({
|
|
|
8617
8618
|
{
|
|
8618
8619
|
open: isOpen,
|
|
8619
8620
|
onOpenChange: setIsOpen,
|
|
8621
|
+
contentProps: { id: panelId },
|
|
8620
8622
|
placement: "bottom-start",
|
|
8621
8623
|
disabled,
|
|
8622
8624
|
contentWidth: sizeStyles7[size].contentWidth,
|
|
@@ -8629,13 +8631,18 @@ var LunarDateRangePicker = ({
|
|
|
8629
8631
|
"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-300"
|
|
8630
8632
|
),
|
|
8631
8633
|
trigger: /* @__PURE__ */ jsxs21(
|
|
8632
|
-
"
|
|
8634
|
+
"button",
|
|
8633
8635
|
{
|
|
8634
8636
|
ref: triggerRef,
|
|
8635
8637
|
id: resolvedId,
|
|
8636
|
-
|
|
8638
|
+
type: "button",
|
|
8639
|
+
role: "combobox",
|
|
8640
|
+
disabled,
|
|
8637
8641
|
"aria-label": tempStart ? displayLabel : placeholder,
|
|
8638
8642
|
"aria-labelledby": labelId,
|
|
8643
|
+
"aria-haspopup": "dialog",
|
|
8644
|
+
"aria-expanded": isOpen,
|
|
8645
|
+
"aria-controls": panelId,
|
|
8639
8646
|
"aria-required": required,
|
|
8640
8647
|
"aria-invalid": !!effectiveError,
|
|
8641
8648
|
className: cn(
|
|
@@ -9167,6 +9174,9 @@ function MonthYearPicker({
|
|
|
9167
9174
|
const resolvedBorderMode = borderMode ?? globalConfig.input?.borderMode ?? globalConfig.borderMode ?? "full";
|
|
9168
9175
|
const gi18n = useGlobalI18n();
|
|
9169
9176
|
const tv = useSmartTranslations("ValidationInput");
|
|
9177
|
+
const autoId = React25.useId();
|
|
9178
|
+
const triggerId = `month-year-picker-trigger-${autoId}`;
|
|
9179
|
+
const panelId = `${triggerId}-panel`;
|
|
9170
9180
|
const now = /* @__PURE__ */ new Date();
|
|
9171
9181
|
const currentYear = now.getFullYear();
|
|
9172
9182
|
const resolvedMinYear = minYear ?? minDate?.getFullYear() ?? currentYear - 50;
|
|
@@ -9314,11 +9324,14 @@ function MonthYearPicker({
|
|
|
9314
9324
|
const trigger = variant === "inline" ? null : /* @__PURE__ */ jsxs22(
|
|
9315
9325
|
"button",
|
|
9316
9326
|
{
|
|
9327
|
+
id: triggerId,
|
|
9317
9328
|
type: "button",
|
|
9329
|
+
role: "combobox",
|
|
9318
9330
|
disabled,
|
|
9319
9331
|
"aria-label": gi18n.selectMonthYear ?? "Select month and year",
|
|
9320
9332
|
"aria-haspopup": "dialog",
|
|
9321
9333
|
"aria-expanded": open,
|
|
9334
|
+
"aria-controls": panelId,
|
|
9322
9335
|
"aria-required": required,
|
|
9323
9336
|
"aria-invalid": !!effectiveError,
|
|
9324
9337
|
className: cn(
|
|
@@ -9542,6 +9555,7 @@ function MonthYearPicker({
|
|
|
9542
9555
|
trigger,
|
|
9543
9556
|
open,
|
|
9544
9557
|
onOpenChange: handleOpenChange,
|
|
9558
|
+
contentProps: { id: panelId },
|
|
9545
9559
|
placement: "bottom",
|
|
9546
9560
|
contentWidth,
|
|
9547
9561
|
matchTriggerWidth,
|
|
@@ -10714,6 +10728,7 @@ function TimePicker({
|
|
|
10714
10728
|
const directEditInputRef = React27.useRef(null);
|
|
10715
10729
|
const triggerId = `time-picker-trigger-${autoId}`;
|
|
10716
10730
|
const labelId = label ? `time-picker-label-${autoId}` : void 0;
|
|
10731
|
+
const panelId = `${triggerId}-panel`;
|
|
10717
10732
|
React27.useEffect(() => {
|
|
10718
10733
|
if (isControlled) {
|
|
10719
10734
|
const parsed = parseTime(value, format, includeSeconds);
|
|
@@ -11024,11 +11039,13 @@ function TimePicker({
|
|
|
11024
11039
|
{
|
|
11025
11040
|
id: triggerId,
|
|
11026
11041
|
type: "button",
|
|
11042
|
+
role: "combobox",
|
|
11027
11043
|
disabled,
|
|
11028
11044
|
"aria-label": gi18n.selectTime ?? "Select time",
|
|
11029
11045
|
"aria-labelledby": labelId,
|
|
11030
11046
|
"aria-haspopup": "dialog",
|
|
11031
11047
|
"aria-expanded": open,
|
|
11048
|
+
"aria-controls": panelId,
|
|
11032
11049
|
"aria-required": required,
|
|
11033
11050
|
"aria-invalid": !!effectiveError,
|
|
11034
11051
|
className: cn(
|
|
@@ -11380,7 +11397,7 @@ function TimePicker({
|
|
|
11380
11397
|
] })
|
|
11381
11398
|
] });
|
|
11382
11399
|
if (variant === "inline") {
|
|
11383
|
-
return /* @__PURE__ */ jsxs24("div", { className: "w-
|
|
11400
|
+
return /* @__PURE__ */ jsxs24("div", { className: "w-80 max-w-full", ...rest, children: [
|
|
11384
11401
|
label && /* @__PURE__ */ jsx31("div", { className: "flex items-center justify-between mb-3", children: /* @__PURE__ */ jsxs24(
|
|
11385
11402
|
"label",
|
|
11386
11403
|
{
|
|
@@ -11414,7 +11431,7 @@ function TimePicker({
|
|
|
11414
11431
|
{
|
|
11415
11432
|
className: cn(
|
|
11416
11433
|
panelSz.contentPadding,
|
|
11417
|
-
|
|
11434
|
+
getPanelBorderRadiusClass(resolvedBorderMode),
|
|
11418
11435
|
"border bg-card/95 backdrop-blur-sm shadow-xl",
|
|
11419
11436
|
effectiveError ? "border-destructive/60 bg-destructive/5" : "border-border/60",
|
|
11420
11437
|
className
|
|
@@ -11468,6 +11485,7 @@ function TimePicker({
|
|
|
11468
11485
|
trigger,
|
|
11469
11486
|
open,
|
|
11470
11487
|
onOpenChange: handleOpenChange,
|
|
11488
|
+
contentProps: { id: panelId },
|
|
11471
11489
|
placement: "bottom-start",
|
|
11472
11490
|
matchTriggerWidth: shouldMatchTriggerWidth,
|
|
11473
11491
|
contentWidth: shouldMatchTriggerWidth ? void 0 : contentWidth,
|
|
@@ -11523,6 +11541,10 @@ var DateTimePicker = ({
|
|
|
11523
11541
|
const t = useSmartTranslations("DateTimePicker");
|
|
11524
11542
|
const tv = useSmartTranslations("ValidationInput");
|
|
11525
11543
|
const locale = useSmartLocale();
|
|
11544
|
+
const autoId = React28.useId();
|
|
11545
|
+
const triggerId = `date-time-picker-trigger-${autoId}`;
|
|
11546
|
+
const panelId = `${triggerId}-panel`;
|
|
11547
|
+
const labelId = label ? `${triggerId}-label` : void 0;
|
|
11526
11548
|
const [open, setOpen] = React28.useState(false);
|
|
11527
11549
|
const [localRequiredError, setLocalRequiredError] = React28.useState();
|
|
11528
11550
|
const sizeStyles7 = {
|
|
@@ -11663,11 +11685,19 @@ var DateTimePicker = ({
|
|
|
11663
11685
|
const weekdays = getWeekdays(locale);
|
|
11664
11686
|
const effectiveError = localRequiredError;
|
|
11665
11687
|
return /* @__PURE__ */ jsxs25("div", { className: cn("space-y-1.5", className), children: [
|
|
11666
|
-
label && /* @__PURE__ */ jsxs25(
|
|
11667
|
-
label,
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
|
|
11688
|
+
label && /* @__PURE__ */ jsxs25(
|
|
11689
|
+
"label",
|
|
11690
|
+
{
|
|
11691
|
+
id: labelId,
|
|
11692
|
+
htmlFor: triggerId,
|
|
11693
|
+
className: cn(sizeStyles7[size].label, "font-medium text-foreground flex items-center gap-1", effectiveError && "text-destructive", labelClassName),
|
|
11694
|
+
children: [
|
|
11695
|
+
label,
|
|
11696
|
+
" ",
|
|
11697
|
+
required && /* @__PURE__ */ jsx32("span", { className: "text-destructive", children: "*" })
|
|
11698
|
+
]
|
|
11699
|
+
}
|
|
11700
|
+
),
|
|
11671
11701
|
/* @__PURE__ */ jsx32(
|
|
11672
11702
|
"input",
|
|
11673
11703
|
{
|
|
@@ -11690,11 +11720,19 @@ var DateTimePicker = ({
|
|
|
11690
11720
|
{
|
|
11691
11721
|
open,
|
|
11692
11722
|
onOpenChange: setOpen,
|
|
11723
|
+
contentProps: { id: panelId },
|
|
11693
11724
|
trigger: /* @__PURE__ */ jsxs25(
|
|
11694
11725
|
"button",
|
|
11695
11726
|
{
|
|
11727
|
+
id: triggerId,
|
|
11696
11728
|
type: "button",
|
|
11729
|
+
role: "combobox",
|
|
11697
11730
|
disabled,
|
|
11731
|
+
"aria-haspopup": "dialog",
|
|
11732
|
+
"aria-expanded": open,
|
|
11733
|
+
"aria-controls": panelId,
|
|
11734
|
+
"aria-label": labelId ? void 0 : displayValue || placeholder || "Select date & time",
|
|
11735
|
+
"aria-labelledby": labelId,
|
|
11698
11736
|
"aria-required": required,
|
|
11699
11737
|
"aria-invalid": !!effectiveError,
|
|
11700
11738
|
className: cn(
|
|
@@ -14701,7 +14739,7 @@ function CalendarTimeline({
|
|
|
14701
14739
|
|
|
14702
14740
|
// src/components/MultiCombobox.tsx
|
|
14703
14741
|
import * as React35 from "react";
|
|
14704
|
-
import { useId as
|
|
14742
|
+
import { useId as useId10 } from "react";
|
|
14705
14743
|
import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
|
|
14706
14744
|
import { ChevronDown as ChevronDown4, Search as Search5, Check as Check6, SearchX as SearchX2, Loader2 as Loader23, X as X12, Sparkles as Sparkles3 } from "lucide-react";
|
|
14707
14745
|
import { Fragment as Fragment11, jsx as jsx39, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
@@ -14932,7 +14970,7 @@ var MultiCombobox = ({
|
|
|
14932
14970
|
outline: "border-2 border-input bg-transparent hover:border-primary",
|
|
14933
14971
|
ghost: "border border-transparent bg-muted/50 hover:bg-muted"
|
|
14934
14972
|
};
|
|
14935
|
-
const autoId =
|
|
14973
|
+
const autoId = useId10();
|
|
14936
14974
|
const resolvedId = id ? String(id) : `multicombobox-${autoId}`;
|
|
14937
14975
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
14938
14976
|
const labelSize = formControlSizeStyles[size].label;
|
|
@@ -16637,7 +16675,7 @@ function OverlayControls({
|
|
|
16637
16675
|
}
|
|
16638
16676
|
|
|
16639
16677
|
// src/components/CategoryTreeSelect.tsx
|
|
16640
|
-
import { useEffect as useEffect20, useId as
|
|
16678
|
+
import { useEffect as useEffect20, useId as useId12, useMemo as useMemo18, useRef as useRef17, useState as useState27 } from "react";
|
|
16641
16679
|
import { useVirtualizer as useVirtualizer3 } from "@tanstack/react-virtual";
|
|
16642
16680
|
import { ChevronRight as ChevronRight7, ChevronDown as ChevronDown5, FolderTree, Layers, Search as Search6, SearchX as SearchX3, X as X13 } from "lucide-react";
|
|
16643
16681
|
import { jsx as jsx43, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
@@ -16807,7 +16845,7 @@ function CategoryTreeSelect(props) {
|
|
|
16807
16845
|
useOverlayScrollbarTarget(dropdownViewportRef, {
|
|
16808
16846
|
enabled: isOpen && useOverlayScrollbar && !virtualized && !inline && !viewOnly
|
|
16809
16847
|
});
|
|
16810
|
-
const autoId =
|
|
16848
|
+
const autoId = useId12();
|
|
16811
16849
|
const resolvedId = id ? String(id) : `category-tree-select-${autoId}`;
|
|
16812
16850
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
16813
16851
|
const effectiveError = error ?? localRequiredError;
|
|
@@ -20792,7 +20830,7 @@ var MusicPlayer = ({
|
|
|
20792
20830
|
var MusicPlayer_default = MusicPlayer;
|
|
20793
20831
|
|
|
20794
20832
|
// src/components/Grid.tsx
|
|
20795
|
-
import React47, { useId as
|
|
20833
|
+
import React47, { useId as useId13 } from "react";
|
|
20796
20834
|
import { Fragment as Fragment18, jsx as jsx53, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
20797
20835
|
var BP_MIN = {
|
|
20798
20836
|
sm: 640,
|
|
@@ -20857,7 +20895,7 @@ var GridRoot = React47.forwardRef(
|
|
|
20857
20895
|
children,
|
|
20858
20896
|
...rest
|
|
20859
20897
|
}, ref) => {
|
|
20860
|
-
const id =
|
|
20898
|
+
const id = useId13().replace(/[:]/g, "");
|
|
20861
20899
|
const baseClass = `uv-grid-${id}`;
|
|
20862
20900
|
const baseCols = toTemplateCols(columns, minColumnWidth);
|
|
20863
20901
|
const baseRows = toTemplateRows(rows);
|
|
@@ -21624,6 +21662,7 @@ function DataTableHeader({
|
|
|
21624
21662
|
},
|
|
21625
21663
|
[
|
|
21626
21664
|
filters,
|
|
21665
|
+
gi18n,
|
|
21627
21666
|
headerAlign,
|
|
21628
21667
|
headerMinHeightClass,
|
|
21629
21668
|
headerTitleClass,
|
|
@@ -21632,6 +21671,7 @@ function DataTableHeader({
|
|
|
21632
21671
|
setFilters,
|
|
21633
21672
|
setSort,
|
|
21634
21673
|
sort,
|
|
21674
|
+
sortByLabel,
|
|
21635
21675
|
sortIconClass,
|
|
21636
21676
|
t
|
|
21637
21677
|
]
|
|
@@ -22950,7 +22990,7 @@ function NotificationModal({ isOpen, onClose, notification, titleText, openLinkT
|
|
|
22950
22990
|
var NotificationModal_default = NotificationModal;
|
|
22951
22991
|
|
|
22952
22992
|
// src/components/AccessDenied.tsx
|
|
22953
|
-
import { useState as useState36, useEffect as useEffect26, useId as
|
|
22993
|
+
import { useState as useState36, useEffect as useEffect26, useId as useId15, useRef as useRef22 } from "react";
|
|
22954
22994
|
import { jsx as jsx64, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
22955
22995
|
var VARIANT_COLOR_VARS = {
|
|
22956
22996
|
destructive: "var(--destructive)",
|
|
@@ -22992,7 +23032,7 @@ function AccessDenied({
|
|
|
22992
23032
|
}) {
|
|
22993
23033
|
const design = VARIANT_DESIGNS[variant];
|
|
22994
23034
|
const colorVar = VARIANT_COLOR_VARS[variant];
|
|
22995
|
-
const reactId =
|
|
23035
|
+
const reactId = useId15();
|
|
22996
23036
|
const cleanId = reactId.replace(/:/g, "");
|
|
22997
23037
|
const clipId = `white-clip-${cleanId}`;
|
|
22998
23038
|
const textId = `text-s-${cleanId}`;
|