@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.cjs
CHANGED
|
@@ -2077,35 +2077,29 @@ function NextIntlAdapterProvider({
|
|
|
2077
2077
|
messages
|
|
2078
2078
|
}) {
|
|
2079
2079
|
const normalizedLocale = normalizeLocale(locale, "en");
|
|
2080
|
-
const
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
const translate = React7.useCallback((namespace, key, values) => {
|
|
2085
|
-
let translator = translatorCache.get(namespace);
|
|
2086
|
-
if (!translator) {
|
|
2087
|
-
const runtimeTranslator = (0, import_next_intl.createTranslator)({
|
|
2088
|
-
locale: normalizedLocale,
|
|
2089
|
-
messages,
|
|
2090
|
-
namespace,
|
|
2091
|
-
onError: () => {
|
|
2092
|
-
}
|
|
2093
|
-
});
|
|
2094
|
-
translator = (translationKey, translationValues) => runtimeTranslator(translationKey, translationValues);
|
|
2095
|
-
translatorCache.set(namespace, translator);
|
|
2096
|
-
}
|
|
2097
|
-
try {
|
|
2098
|
-
return {
|
|
2099
|
-
locale: normalizedLocale,
|
|
2100
|
-
translated: translator(key, values)
|
|
2101
|
-
};
|
|
2102
|
-
} catch {
|
|
2103
|
-
return {
|
|
2104
|
-
locale: normalizedLocale,
|
|
2105
|
-
translated: null
|
|
2106
|
-
};
|
|
2080
|
+
const runtimeTranslator = React7.useMemo(() => (0, import_next_intl.createTranslator)({
|
|
2081
|
+
locale: normalizedLocale,
|
|
2082
|
+
messages,
|
|
2083
|
+
onError: () => {
|
|
2107
2084
|
}
|
|
2108
|
-
}, [messages, normalizedLocale
|
|
2085
|
+
}), [messages, normalizedLocale]);
|
|
2086
|
+
const translate = React7.useCallback(
|
|
2087
|
+
(namespace, key, values) => {
|
|
2088
|
+
const namespacedKey = namespace ? `${namespace}.${key}` : key;
|
|
2089
|
+
try {
|
|
2090
|
+
return {
|
|
2091
|
+
locale: normalizedLocale,
|
|
2092
|
+
translated: runtimeTranslator(namespacedKey, values)
|
|
2093
|
+
};
|
|
2094
|
+
} catch {
|
|
2095
|
+
return {
|
|
2096
|
+
locale: normalizedLocale,
|
|
2097
|
+
translated: null
|
|
2098
|
+
};
|
|
2099
|
+
}
|
|
2100
|
+
},
|
|
2101
|
+
[normalizedLocale, runtimeTranslator]
|
|
2102
|
+
);
|
|
2109
2103
|
const value = React7.useMemo(() => ({
|
|
2110
2104
|
locale: normalizedLocale,
|
|
2111
2105
|
translate
|
|
@@ -2670,7 +2664,7 @@ var init_Tooltip = __esm({
|
|
|
2670
2664
|
onBlur: chainEventHandlers(
|
|
2671
2665
|
triggerPassthroughProps.onBlur,
|
|
2672
2666
|
childProps.onBlur,
|
|
2673
|
-
(
|
|
2667
|
+
() => {
|
|
2674
2668
|
handleBlur();
|
|
2675
2669
|
}
|
|
2676
2670
|
)
|
|
@@ -8242,7 +8236,7 @@ var init_editor_styles = __esm({
|
|
|
8242
8236
|
"[&_td]:px-2",
|
|
8243
8237
|
"[&_td]:py-0",
|
|
8244
8238
|
"[&_td]:whitespace-normal",
|
|
8245
|
-
"[&_td]:
|
|
8239
|
+
"[&_td]:wrap-anywhere",
|
|
8246
8240
|
"[&_td]:[word-break:normal]",
|
|
8247
8241
|
"[&_td[data-text-wrap='nowrap']]:whitespace-nowrap",
|
|
8248
8242
|
"[&_td[data-text-wrap='nowrap']]:[overflow-wrap:normal]",
|
|
@@ -8254,7 +8248,7 @@ var init_editor_styles = __esm({
|
|
|
8254
8248
|
"[&_th]:px-2",
|
|
8255
8249
|
"[&_th]:py-0",
|
|
8256
8250
|
"[&_th]:whitespace-normal",
|
|
8257
|
-
"[&_th]:
|
|
8251
|
+
"[&_th]:wrap-anywhere",
|
|
8258
8252
|
"[&_th]:[word-break:normal]",
|
|
8259
8253
|
"[&_th[data-text-wrap='nowrap']]:whitespace-nowrap",
|
|
8260
8254
|
"[&_th[data-text-wrap='nowrap']]:[overflow-wrap:normal]",
|
|
@@ -10284,19 +10278,7 @@ function useOverlayScrollbarTarget(targetRef, options = {}) {
|
|
|
10284
10278
|
return () => {
|
|
10285
10279
|
controller.destroy();
|
|
10286
10280
|
};
|
|
10287
|
-
}, [
|
|
10288
|
-
targetRef,
|
|
10289
|
-
resolved.enabled,
|
|
10290
|
-
resolved.theme,
|
|
10291
|
-
resolved.visibility,
|
|
10292
|
-
resolved.autoHide,
|
|
10293
|
-
resolved.autoHideDelay,
|
|
10294
|
-
resolved.dragScroll,
|
|
10295
|
-
resolved.clickScroll,
|
|
10296
|
-
resolved.overflowX,
|
|
10297
|
-
resolved.overflowY,
|
|
10298
|
-
resolved.exclude
|
|
10299
|
-
]);
|
|
10281
|
+
}, [resolved, targetRef]);
|
|
10300
10282
|
}
|
|
10301
10283
|
var OverlayScrollbarProvider_default = OverlayScrollbarProvider;
|
|
10302
10284
|
|
|
@@ -15307,6 +15289,10 @@ init_radius();
|
|
|
15307
15289
|
init_UnderverseConfigContext();
|
|
15308
15290
|
init_form_control_size();
|
|
15309
15291
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
15292
|
+
function normalizeToLocalDate(date) {
|
|
15293
|
+
if (!date) return null;
|
|
15294
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
15295
|
+
}
|
|
15310
15296
|
var DatePicker = ({
|
|
15311
15297
|
id,
|
|
15312
15298
|
value,
|
|
@@ -15340,16 +15326,15 @@ var DatePicker = ({
|
|
|
15340
15326
|
const [isFocused, setIsFocused] = React34.useState(false);
|
|
15341
15327
|
const [inputValue, setInputValue] = React34.useState("");
|
|
15342
15328
|
React34.useEffect(() => {
|
|
15343
|
-
|
|
15344
|
-
|
|
15345
|
-
|
|
15346
|
-
|
|
15347
|
-
|
|
15329
|
+
setInputValue((currentInput) => {
|
|
15330
|
+
if (value) {
|
|
15331
|
+
const parsed = parseDateString(currentInput, locale);
|
|
15332
|
+
const isSame = parsed && parsed.getTime() === value.getTime();
|
|
15333
|
+
return isSame ? currentInput : formatDateShort(value, locale);
|
|
15348
15334
|
}
|
|
15349
|
-
|
|
15350
|
-
|
|
15351
|
-
|
|
15352
|
-
}, [value, locale, isFocused]);
|
|
15335
|
+
return isFocused ? currentInput : "";
|
|
15336
|
+
});
|
|
15337
|
+
}, [isFocused, locale, value]);
|
|
15353
15338
|
const handleInputChange = (e) => {
|
|
15354
15339
|
const text = e.target.value;
|
|
15355
15340
|
setInputValue(text);
|
|
@@ -15368,7 +15353,7 @@ var DatePicker = ({
|
|
|
15368
15353
|
if (required) {
|
|
15369
15354
|
setLocalRequiredError(tv("required"));
|
|
15370
15355
|
} else {
|
|
15371
|
-
onChange(void 0);
|
|
15356
|
+
if (value) onChange(void 0);
|
|
15372
15357
|
setLocalRequiredError(void 0);
|
|
15373
15358
|
}
|
|
15374
15359
|
} else {
|
|
@@ -15766,6 +15751,7 @@ var DatePicker = ({
|
|
|
15766
15751
|
const autoId = (0, import_react22.useId)();
|
|
15767
15752
|
const resolvedId = id ? String(id) : `datepicker-${autoId}`;
|
|
15768
15753
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
15754
|
+
const panelId = `${resolvedId}-panel`;
|
|
15769
15755
|
const labelSize = sizeStyles8[size].label;
|
|
15770
15756
|
const radiusClass = size === "sm" ? "rounded-md" : "rounded-lg";
|
|
15771
15757
|
const verticalGap = size === "sm" ? "space-y-1.5" : size === "lg" ? "space-y-2.5" : "space-y-2";
|
|
@@ -15814,6 +15800,7 @@ var DatePicker = ({
|
|
|
15814
15800
|
{
|
|
15815
15801
|
open: isOpen,
|
|
15816
15802
|
onOpenChange: setIsOpen,
|
|
15803
|
+
contentProps: { id: panelId },
|
|
15817
15804
|
placement: "bottom-start",
|
|
15818
15805
|
disabled,
|
|
15819
15806
|
contentWidth: sizeStyles8[size].contentWidth,
|
|
@@ -15830,12 +15817,6 @@ var DatePicker = ({
|
|
|
15830
15817
|
"div",
|
|
15831
15818
|
{
|
|
15832
15819
|
ref: triggerRef,
|
|
15833
|
-
id: resolvedId,
|
|
15834
|
-
role: "button",
|
|
15835
|
-
"aria-label": value ? formatDateDisplay(value) : placeholder || t("placeholder"),
|
|
15836
|
-
"aria-labelledby": labelId,
|
|
15837
|
-
"aria-required": required,
|
|
15838
|
-
"aria-invalid": !!effectiveError,
|
|
15839
15820
|
className: cn(
|
|
15840
15821
|
"group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
|
|
15841
15822
|
formControlFixedClass,
|
|
@@ -15867,8 +15848,16 @@ var DatePicker = ({
|
|
|
15867
15848
|
"input",
|
|
15868
15849
|
{
|
|
15869
15850
|
ref: inputRef,
|
|
15851
|
+
id: resolvedId,
|
|
15870
15852
|
type: "text",
|
|
15853
|
+
role: "combobox",
|
|
15871
15854
|
"aria-label": value ? formatDateDisplay(value) : placeholder || t("placeholder"),
|
|
15855
|
+
"aria-labelledby": labelId,
|
|
15856
|
+
"aria-haspopup": "dialog",
|
|
15857
|
+
"aria-expanded": isOpen,
|
|
15858
|
+
"aria-controls": panelId,
|
|
15859
|
+
"aria-required": required,
|
|
15860
|
+
"aria-invalid": !!effectiveError,
|
|
15872
15861
|
disabled,
|
|
15873
15862
|
placeholder: placeholder || t("placeholder"),
|
|
15874
15863
|
value: isFocused ? inputValue : value ? formatDateDisplay(value) : "",
|
|
@@ -15975,19 +15964,18 @@ var DateRangePicker = ({
|
|
|
15975
15964
|
return `${startStr} - ${formatDateShort(e, locale)}`;
|
|
15976
15965
|
}, [locale]);
|
|
15977
15966
|
React34.useEffect(() => {
|
|
15978
|
-
|
|
15979
|
-
|
|
15980
|
-
|
|
15981
|
-
|
|
15982
|
-
|
|
15983
|
-
|
|
15984
|
-
|
|
15985
|
-
|
|
15986
|
-
}
|
|
15987
|
-
|
|
15988
|
-
|
|
15989
|
-
|
|
15990
|
-
}, [startDate, endDate, locale, isFocused, getRangeString]);
|
|
15967
|
+
setInputValue((currentInput) => {
|
|
15968
|
+
if (startDate) {
|
|
15969
|
+
const parts = currentInput.split(/\s*-\s*/);
|
|
15970
|
+
const inputStart = parts[0] ? parseDateString(parts[0], locale) : null;
|
|
15971
|
+
const inputEnd = parts[1] ? parseDateString(parts[1], locale) : null;
|
|
15972
|
+
const startSame = inputStart && inputStart.getTime() === startDate.getTime();
|
|
15973
|
+
const endSame = !endDate && !inputEnd || endDate && inputEnd && endDate.getTime() === inputEnd.getTime();
|
|
15974
|
+
return startSame && endSame ? currentInput : getRangeString(startDate, endDate);
|
|
15975
|
+
}
|
|
15976
|
+
return isFocused ? currentInput : "";
|
|
15977
|
+
});
|
|
15978
|
+
}, [endDate, getRangeString, isFocused, locale, startDate]);
|
|
15991
15979
|
const handleInputChange = (e) => {
|
|
15992
15980
|
const text = e.target.value;
|
|
15993
15981
|
setInputValue(text);
|
|
@@ -16036,7 +16024,7 @@ var DateRangePicker = ({
|
|
|
16036
16024
|
} else {
|
|
16037
16025
|
setTempStart(null);
|
|
16038
16026
|
setTempEnd(null);
|
|
16039
|
-
onChange(void 0, void 0);
|
|
16027
|
+
if (startDate || endDate) onChange(void 0, void 0);
|
|
16040
16028
|
setLocalRequiredError(void 0);
|
|
16041
16029
|
}
|
|
16042
16030
|
} else {
|
|
@@ -16067,8 +16055,8 @@ var DateRangePicker = ({
|
|
|
16067
16055
|
}
|
|
16068
16056
|
}
|
|
16069
16057
|
if (startDate) {
|
|
16070
|
-
setTempStart(
|
|
16071
|
-
setTempEnd(
|
|
16058
|
+
setTempStart(normalizeToLocalDate(startDate));
|
|
16059
|
+
setTempEnd(normalizeToLocalDate(endDate));
|
|
16072
16060
|
setInputValue(getRangeString(startDate, endDate));
|
|
16073
16061
|
setLocalRequiredError(void 0);
|
|
16074
16062
|
} else {
|
|
@@ -16172,21 +16160,17 @@ var DateRangePicker = ({
|
|
|
16172
16160
|
footerMargin: "mt-5 pt-4 gap-2.5"
|
|
16173
16161
|
}
|
|
16174
16162
|
};
|
|
16175
|
-
const
|
|
16176
|
-
|
|
16177
|
-
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
16178
|
-
};
|
|
16179
|
-
const minDay = React34.useMemo(() => normalizeToLocal(minDate), [minDate]);
|
|
16180
|
-
const maxDay = React34.useMemo(() => normalizeToLocal(maxDate), [maxDate]);
|
|
16163
|
+
const minDay = normalizeToLocalDate(minDate);
|
|
16164
|
+
const maxDay = normalizeToLocalDate(maxDate);
|
|
16181
16165
|
const [viewDate, setViewDate] = React34.useState(startDate || /* @__PURE__ */ new Date());
|
|
16182
|
-
const [tempStart, setTempStart] = React34.useState(
|
|
16183
|
-
const [tempEnd, setTempEnd] = React34.useState(
|
|
16166
|
+
const [tempStart, setTempStart] = React34.useState(normalizeToLocalDate(startDate));
|
|
16167
|
+
const [tempEnd, setTempEnd] = React34.useState(normalizeToLocalDate(endDate));
|
|
16184
16168
|
const [hoveredDate, setHoveredDate] = React34.useState(null);
|
|
16185
16169
|
React34.useEffect(() => {
|
|
16186
|
-
setTempStart(
|
|
16170
|
+
setTempStart(normalizeToLocalDate(startDate));
|
|
16187
16171
|
}, [startDate]);
|
|
16188
16172
|
React34.useEffect(() => {
|
|
16189
|
-
setTempEnd(
|
|
16173
|
+
setTempEnd(normalizeToLocalDate(endDate));
|
|
16190
16174
|
}, [endDate]);
|
|
16191
16175
|
React34.useEffect(() => {
|
|
16192
16176
|
if (!isOpen) {
|
|
@@ -16205,12 +16189,12 @@ var DateRangePicker = ({
|
|
|
16205
16189
|
const inRange = (d, s, e) => d > s && d < e;
|
|
16206
16190
|
const getDaysInMonth = (d) => new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate();
|
|
16207
16191
|
const getFirstDayOfMonth = (d) => new Date(d.getFullYear(), d.getMonth(), 1).getDay();
|
|
16208
|
-
const navigateMonth =
|
|
16192
|
+
const navigateMonth = (direction) => {
|
|
16209
16193
|
setViewDate((prev) => new Date(prev.getFullYear(), prev.getMonth() + (direction === "next" ? 1 : -1), 1));
|
|
16210
|
-
}
|
|
16211
|
-
const navigateYearRange =
|
|
16194
|
+
};
|
|
16195
|
+
const navigateYearRange = (direction) => {
|
|
16212
16196
|
setViewDate((prev) => new Date(prev.getFullYear() + (direction === "next" ? 12 : -12), prev.getMonth(), 1));
|
|
16213
|
-
}
|
|
16197
|
+
};
|
|
16214
16198
|
const isElementVerticallyScrollable = (el) => {
|
|
16215
16199
|
const style = window.getComputedStyle(el);
|
|
16216
16200
|
const overflowY = style.overflowY;
|
|
@@ -16239,11 +16223,13 @@ var DateRangePicker = ({
|
|
|
16239
16223
|
const steps = Math.trunc(wheelDeltaRef.current / threshold);
|
|
16240
16224
|
wheelDeltaRef.current -= steps * threshold;
|
|
16241
16225
|
const direction = steps > 0 ? "next" : "prev";
|
|
16242
|
-
for (let i = 0; i < Math.abs(steps); i++)
|
|
16226
|
+
for (let i = 0; i < Math.abs(steps); i++) {
|
|
16227
|
+
setViewDate((prev) => new Date(prev.getFullYear(), prev.getMonth() + (direction === "next" ? 1 : -1), 1));
|
|
16228
|
+
}
|
|
16243
16229
|
};
|
|
16244
16230
|
container.addEventListener("wheel", onWheel, { passive: false });
|
|
16245
16231
|
return () => container.removeEventListener("wheel", onWheel);
|
|
16246
|
-
}, [isOpen
|
|
16232
|
+
}, [isOpen]);
|
|
16247
16233
|
const handleSelect = (date) => {
|
|
16248
16234
|
const localDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
16249
16235
|
if (!tempStart || tempStart && tempEnd) {
|
|
@@ -16526,6 +16512,7 @@ var DateRangePicker = ({
|
|
|
16526
16512
|
const autoId = (0, import_react22.useId)();
|
|
16527
16513
|
const resolvedId = id ? String(id) : `daterangepicker-${autoId}`;
|
|
16528
16514
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
16515
|
+
const panelId = `${resolvedId}-panel`;
|
|
16529
16516
|
const globalConfig = useUnderverseUIConfig();
|
|
16530
16517
|
const resolvedBorderMode = borderMode ?? globalConfig.borderMode ?? "full";
|
|
16531
16518
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("space-y-1.5", className), children: [
|
|
@@ -16570,6 +16557,7 @@ var DateRangePicker = ({
|
|
|
16570
16557
|
{
|
|
16571
16558
|
open: isOpen,
|
|
16572
16559
|
onOpenChange: setIsOpen,
|
|
16560
|
+
contentProps: { id: panelId },
|
|
16573
16561
|
placement: "bottom-start",
|
|
16574
16562
|
disabled,
|
|
16575
16563
|
contentWidth: sizeStyles8[size].contentWidth,
|
|
@@ -16585,12 +16573,6 @@ var DateRangePicker = ({
|
|
|
16585
16573
|
"div",
|
|
16586
16574
|
{
|
|
16587
16575
|
ref: triggerRef,
|
|
16588
|
-
id: resolvedId,
|
|
16589
|
-
role: "button",
|
|
16590
|
-
"aria-label": tempStart ? displayLabel : placeholder,
|
|
16591
|
-
"aria-labelledby": labelId,
|
|
16592
|
-
"aria-required": required,
|
|
16593
|
-
"aria-invalid": !!effectiveError,
|
|
16594
16576
|
className: cn(
|
|
16595
16577
|
"group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
|
|
16596
16578
|
formControlFixedClass,
|
|
@@ -16621,8 +16603,16 @@ var DateRangePicker = ({
|
|
|
16621
16603
|
"input",
|
|
16622
16604
|
{
|
|
16623
16605
|
ref: inputRef,
|
|
16606
|
+
id: resolvedId,
|
|
16624
16607
|
type: "text",
|
|
16608
|
+
role: "combobox",
|
|
16625
16609
|
"aria-label": tempStart ? displayLabel : placeholder,
|
|
16610
|
+
"aria-labelledby": labelId,
|
|
16611
|
+
"aria-haspopup": "dialog",
|
|
16612
|
+
"aria-expanded": isOpen,
|
|
16613
|
+
"aria-controls": panelId,
|
|
16614
|
+
"aria-required": required,
|
|
16615
|
+
"aria-invalid": !!effectiveError,
|
|
16626
16616
|
disabled,
|
|
16627
16617
|
placeholder,
|
|
16628
16618
|
value: isFocused ? inputValue : tempStart ? displayLabel : "",
|
|
@@ -17464,6 +17454,7 @@ var LunarDatePicker = ({
|
|
|
17464
17454
|
const autoId = (0, import_react23.useId)();
|
|
17465
17455
|
const resolvedId = id ? String(id) : `lunar-datepicker-${autoId}`;
|
|
17466
17456
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
17457
|
+
const panelId = `${resolvedId}-panel`;
|
|
17467
17458
|
const labelSize = sizeStyles8[size].label;
|
|
17468
17459
|
const verticalGap = size === "sm" ? "space-y-1.5" : size === "lg" ? "space-y-2.5" : "space-y-2";
|
|
17469
17460
|
const effectiveError = localRequiredError;
|
|
@@ -17509,6 +17500,7 @@ var LunarDatePicker = ({
|
|
|
17509
17500
|
{
|
|
17510
17501
|
open: isOpen,
|
|
17511
17502
|
onOpenChange: setIsOpen,
|
|
17503
|
+
contentProps: { id: panelId },
|
|
17512
17504
|
placement: "bottom-start",
|
|
17513
17505
|
borderMode: resolvedBorderMode,
|
|
17514
17506
|
disabled,
|
|
@@ -17525,12 +17517,6 @@ var LunarDatePicker = ({
|
|
|
17525
17517
|
"div",
|
|
17526
17518
|
{
|
|
17527
17519
|
ref: triggerRef,
|
|
17528
|
-
id: resolvedId,
|
|
17529
|
-
role: "button",
|
|
17530
|
-
"aria-label": value ? formatDateDisplay(value) : placeholder || t("placeholder"),
|
|
17531
|
-
"aria-labelledby": labelId,
|
|
17532
|
-
"aria-required": required,
|
|
17533
|
-
"aria-invalid": !!effectiveError,
|
|
17534
17520
|
className: cn(
|
|
17535
17521
|
"group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
|
|
17536
17522
|
formControlFixedClass,
|
|
@@ -17562,8 +17548,16 @@ var LunarDatePicker = ({
|
|
|
17562
17548
|
"input",
|
|
17563
17549
|
{
|
|
17564
17550
|
ref: inputRef,
|
|
17551
|
+
id: resolvedId,
|
|
17565
17552
|
type: "text",
|
|
17553
|
+
role: "combobox",
|
|
17566
17554
|
"aria-label": value ? formatDateDisplay(value) : placeholder || t("placeholder"),
|
|
17555
|
+
"aria-labelledby": labelId,
|
|
17556
|
+
"aria-haspopup": "dialog",
|
|
17557
|
+
"aria-expanded": isOpen,
|
|
17558
|
+
"aria-controls": panelId,
|
|
17559
|
+
"aria-required": required,
|
|
17560
|
+
"aria-invalid": !!effectiveError,
|
|
17567
17561
|
disabled,
|
|
17568
17562
|
placeholder: placeholder || t("placeholder"),
|
|
17569
17563
|
value: isFocused ? inputValue : value ? formatDateDisplay(value) : "",
|
|
@@ -18090,6 +18084,7 @@ var LunarDateRangePicker = ({
|
|
|
18090
18084
|
const autoId = (0, import_react23.useId)();
|
|
18091
18085
|
const resolvedId = id ? String(id) : `lunardaterangepicker-${autoId}`;
|
|
18092
18086
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
18087
|
+
const panelId = `${resolvedId}-panel`;
|
|
18093
18088
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("space-y-1.5", className), children: [
|
|
18094
18089
|
label && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
18095
18090
|
"label",
|
|
@@ -18132,6 +18127,7 @@ var LunarDateRangePicker = ({
|
|
|
18132
18127
|
{
|
|
18133
18128
|
open: isOpen,
|
|
18134
18129
|
onOpenChange: setIsOpen,
|
|
18130
|
+
contentProps: { id: panelId },
|
|
18135
18131
|
placement: "bottom-start",
|
|
18136
18132
|
disabled,
|
|
18137
18133
|
contentWidth: sizeStyles8[size].contentWidth,
|
|
@@ -18144,13 +18140,18 @@ var LunarDateRangePicker = ({
|
|
|
18144
18140
|
"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-300"
|
|
18145
18141
|
),
|
|
18146
18142
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
18147
|
-
"
|
|
18143
|
+
"button",
|
|
18148
18144
|
{
|
|
18149
18145
|
ref: triggerRef,
|
|
18150
18146
|
id: resolvedId,
|
|
18151
|
-
|
|
18147
|
+
type: "button",
|
|
18148
|
+
role: "combobox",
|
|
18149
|
+
disabled,
|
|
18152
18150
|
"aria-label": tempStart ? displayLabel : placeholder,
|
|
18153
18151
|
"aria-labelledby": labelId,
|
|
18152
|
+
"aria-haspopup": "dialog",
|
|
18153
|
+
"aria-expanded": isOpen,
|
|
18154
|
+
"aria-controls": panelId,
|
|
18154
18155
|
"aria-required": required,
|
|
18155
18156
|
"aria-invalid": !!effectiveError,
|
|
18156
18157
|
className: cn(
|
|
@@ -18692,6 +18693,9 @@ function MonthYearPicker({
|
|
|
18692
18693
|
const resolvedBorderMode = borderMode ?? globalConfig.input?.borderMode ?? globalConfig.borderMode ?? "full";
|
|
18693
18694
|
const gi18n = useGlobalI18n();
|
|
18694
18695
|
const tv = useSmartTranslations("ValidationInput");
|
|
18696
|
+
const autoId = React36.useId();
|
|
18697
|
+
const triggerId = `month-year-picker-trigger-${autoId}`;
|
|
18698
|
+
const panelId = `${triggerId}-panel`;
|
|
18695
18699
|
const now = /* @__PURE__ */ new Date();
|
|
18696
18700
|
const currentYear = now.getFullYear();
|
|
18697
18701
|
const resolvedMinYear = minYear ?? minDate?.getFullYear() ?? currentYear - 50;
|
|
@@ -18839,11 +18843,14 @@ function MonthYearPicker({
|
|
|
18839
18843
|
const trigger = variant === "inline" ? null : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
18840
18844
|
"button",
|
|
18841
18845
|
{
|
|
18846
|
+
id: triggerId,
|
|
18842
18847
|
type: "button",
|
|
18848
|
+
role: "combobox",
|
|
18843
18849
|
disabled,
|
|
18844
18850
|
"aria-label": gi18n.selectMonthYear ?? "Select month and year",
|
|
18845
18851
|
"aria-haspopup": "dialog",
|
|
18846
18852
|
"aria-expanded": open,
|
|
18853
|
+
"aria-controls": panelId,
|
|
18847
18854
|
"aria-required": required,
|
|
18848
18855
|
"aria-invalid": !!effectiveError,
|
|
18849
18856
|
className: cn(
|
|
@@ -19067,6 +19074,7 @@ function MonthYearPicker({
|
|
|
19067
19074
|
trigger,
|
|
19068
19075
|
open,
|
|
19069
19076
|
onOpenChange: handleOpenChange,
|
|
19077
|
+
contentProps: { id: panelId },
|
|
19070
19078
|
placement: "bottom",
|
|
19071
19079
|
contentWidth,
|
|
19072
19080
|
matchTriggerWidth,
|
|
@@ -20246,6 +20254,7 @@ function TimePicker({
|
|
|
20246
20254
|
const directEditInputRef = React38.useRef(null);
|
|
20247
20255
|
const triggerId = `time-picker-trigger-${autoId}`;
|
|
20248
20256
|
const labelId = label ? `time-picker-label-${autoId}` : void 0;
|
|
20257
|
+
const panelId = `${triggerId}-panel`;
|
|
20249
20258
|
React38.useEffect(() => {
|
|
20250
20259
|
if (isControlled) {
|
|
20251
20260
|
const parsed = parseTime(value, format, includeSeconds);
|
|
@@ -20556,11 +20565,13 @@ function TimePicker({
|
|
|
20556
20565
|
{
|
|
20557
20566
|
id: triggerId,
|
|
20558
20567
|
type: "button",
|
|
20568
|
+
role: "combobox",
|
|
20559
20569
|
disabled,
|
|
20560
20570
|
"aria-label": gi18n.selectTime ?? "Select time",
|
|
20561
20571
|
"aria-labelledby": labelId,
|
|
20562
20572
|
"aria-haspopup": "dialog",
|
|
20563
20573
|
"aria-expanded": open,
|
|
20574
|
+
"aria-controls": panelId,
|
|
20564
20575
|
"aria-required": required,
|
|
20565
20576
|
"aria-invalid": !!effectiveError,
|
|
20566
20577
|
className: cn(
|
|
@@ -20912,7 +20923,7 @@ function TimePicker({
|
|
|
20912
20923
|
] })
|
|
20913
20924
|
] });
|
|
20914
20925
|
if (variant === "inline") {
|
|
20915
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "w-
|
|
20926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "w-80 max-w-full", ...rest, children: [
|
|
20916
20927
|
label && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex items-center justify-between mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
20917
20928
|
"label",
|
|
20918
20929
|
{
|
|
@@ -20946,7 +20957,7 @@ function TimePicker({
|
|
|
20946
20957
|
{
|
|
20947
20958
|
className: cn(
|
|
20948
20959
|
panelSz.contentPadding,
|
|
20949
|
-
|
|
20960
|
+
getPanelBorderRadiusClass(resolvedBorderMode),
|
|
20950
20961
|
"border bg-card/95 backdrop-blur-sm shadow-xl",
|
|
20951
20962
|
effectiveError ? "border-destructive/60 bg-destructive/5" : "border-border/60",
|
|
20952
20963
|
className
|
|
@@ -21000,6 +21011,7 @@ function TimePicker({
|
|
|
21000
21011
|
trigger,
|
|
21001
21012
|
open,
|
|
21002
21013
|
onOpenChange: handleOpenChange,
|
|
21014
|
+
contentProps: { id: panelId },
|
|
21003
21015
|
placement: "bottom-start",
|
|
21004
21016
|
matchTriggerWidth: shouldMatchTriggerWidth,
|
|
21005
21017
|
contentWidth: shouldMatchTriggerWidth ? void 0 : contentWidth,
|
|
@@ -21059,6 +21071,10 @@ var DateTimePicker = ({
|
|
|
21059
21071
|
const t = useSmartTranslations("DateTimePicker");
|
|
21060
21072
|
const tv = useSmartTranslations("ValidationInput");
|
|
21061
21073
|
const locale = useSmartLocale();
|
|
21074
|
+
const autoId = React39.useId();
|
|
21075
|
+
const triggerId = `date-time-picker-trigger-${autoId}`;
|
|
21076
|
+
const panelId = `${triggerId}-panel`;
|
|
21077
|
+
const labelId = label ? `${triggerId}-label` : void 0;
|
|
21062
21078
|
const [open, setOpen] = React39.useState(false);
|
|
21063
21079
|
const [localRequiredError, setLocalRequiredError] = React39.useState();
|
|
21064
21080
|
const sizeStyles8 = {
|
|
@@ -21199,11 +21215,19 @@ var DateTimePicker = ({
|
|
|
21199
21215
|
const weekdays = getWeekdays(locale);
|
|
21200
21216
|
const effectiveError = localRequiredError;
|
|
21201
21217
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn("space-y-1.5", className), children: [
|
|
21202
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
21203
|
-
label,
|
|
21204
|
-
|
|
21205
|
-
|
|
21206
|
-
|
|
21218
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
21219
|
+
"label",
|
|
21220
|
+
{
|
|
21221
|
+
id: labelId,
|
|
21222
|
+
htmlFor: triggerId,
|
|
21223
|
+
className: cn(sizeStyles8[size].label, "font-medium text-foreground flex items-center gap-1", effectiveError && "text-destructive", labelClassName),
|
|
21224
|
+
children: [
|
|
21225
|
+
label,
|
|
21226
|
+
" ",
|
|
21227
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-destructive", children: "*" })
|
|
21228
|
+
]
|
|
21229
|
+
}
|
|
21230
|
+
),
|
|
21207
21231
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
21208
21232
|
"input",
|
|
21209
21233
|
{
|
|
@@ -21226,11 +21250,19 @@ var DateTimePicker = ({
|
|
|
21226
21250
|
{
|
|
21227
21251
|
open,
|
|
21228
21252
|
onOpenChange: setOpen,
|
|
21253
|
+
contentProps: { id: panelId },
|
|
21229
21254
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
21230
21255
|
"button",
|
|
21231
21256
|
{
|
|
21257
|
+
id: triggerId,
|
|
21232
21258
|
type: "button",
|
|
21259
|
+
role: "combobox",
|
|
21233
21260
|
disabled,
|
|
21261
|
+
"aria-haspopup": "dialog",
|
|
21262
|
+
"aria-expanded": open,
|
|
21263
|
+
"aria-controls": panelId,
|
|
21264
|
+
"aria-label": labelId ? void 0 : displayValue || placeholder || "Select date & time",
|
|
21265
|
+
"aria-labelledby": labelId,
|
|
21234
21266
|
"aria-required": required,
|
|
21235
21267
|
"aria-invalid": !!effectiveError,
|
|
21236
21268
|
className: cn(
|
|
@@ -31209,6 +31241,7 @@ function DataTableHeader({
|
|
|
31209
31241
|
},
|
|
31210
31242
|
[
|
|
31211
31243
|
filters,
|
|
31244
|
+
gi18n,
|
|
31212
31245
|
headerAlign,
|
|
31213
31246
|
headerMinHeightClass,
|
|
31214
31247
|
headerTitleClass,
|
|
@@ -31217,6 +31250,7 @@ function DataTableHeader({
|
|
|
31217
31250
|
setFilters,
|
|
31218
31251
|
setSort,
|
|
31219
31252
|
sort,
|
|
31253
|
+
sortByLabel,
|
|
31220
31254
|
sortIconClass,
|
|
31221
31255
|
t
|
|
31222
31256
|
]
|
|
@@ -45190,7 +45224,7 @@ function TableResizeHandles({
|
|
|
45190
45224
|
"data-resizing": active ? "true" : "false",
|
|
45191
45225
|
className: cn(
|
|
45192
45226
|
"pointer-events-none absolute z-[38] box-border border border-primary/55",
|
|
45193
|
-
active && "border-primary bg-primary/
|
|
45227
|
+
active && "border-primary bg-primary/3"
|
|
45194
45228
|
),
|
|
45195
45229
|
style: {
|
|
45196
45230
|
left: layout.tableLeft,
|
|
@@ -47253,11 +47287,17 @@ function useUEditorOutput({
|
|
|
47253
47287
|
onJsonChange,
|
|
47254
47288
|
outputDebounceMs
|
|
47255
47289
|
}) {
|
|
47256
|
-
const callbacksRef = React91.useRef({
|
|
47290
|
+
const callbacksRef = React91.useRef({
|
|
47291
|
+
onChange,
|
|
47292
|
+
onHtmlChange,
|
|
47293
|
+
onJsonChange
|
|
47294
|
+
});
|
|
47257
47295
|
const pendingEditorRef = React91.useRef(null);
|
|
47258
47296
|
const timeoutRef = React91.useRef(null);
|
|
47259
47297
|
const debounceMs = normalizeDebounceMs(outputDebounceMs);
|
|
47260
|
-
|
|
47298
|
+
React91.useLayoutEffect(() => {
|
|
47299
|
+
callbacksRef.current = { onChange, onHtmlChange, onJsonChange };
|
|
47300
|
+
}, [onChange, onHtmlChange, onJsonChange]);
|
|
47261
47301
|
const flushOutputUpdates = React91.useCallback(() => {
|
|
47262
47302
|
if (timeoutRef.current !== null) {
|
|
47263
47303
|
clearTimeout(timeoutRef.current);
|