@underverse-ui/underverse 2.0.39 → 2.0.41

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.
Files changed (39) hide show
  1. package/api-reference.json +1 -1
  2. package/dist/{DatePicker-FDOTQMNL.js → DatePicker-BYYBKHWH.js} +4 -4
  3. package/dist/{EmojiPicker-Z7QPW4DA.js → EmojiPicker-NKY2LOGI.js} +5 -5
  4. package/dist/{chunk-JG3U26V6.js → chunk-C2EHPHWH.js} +3 -3
  5. package/dist/{chunk-JABD2ONI.js → chunk-CJ6RPCJN.js} +3 -3
  6. package/dist/{chunk-BGCDAFGB.js → chunk-GKUKLOSO.js} +287 -5392
  7. package/dist/chunk-GKUKLOSO.js.map +1 -0
  8. package/dist/{chunk-EN33T3LJ.js → chunk-IW6FSDIT.js} +2 -2
  9. package/dist/{chunk-5GMQ23IU.js → chunk-PNUDVGMI.js} +2 -2
  10. package/dist/{chunk-6XQTRIP6.js → chunk-PSWS64LA.js} +55 -7
  11. package/dist/chunk-PSWS64LA.js.map +1 -0
  12. package/dist/{chunk-GZ7EDNGF.js → chunk-TVCZXO6G.js} +7308 -1782
  13. package/dist/chunk-TVCZXO6G.js.map +1 -0
  14. package/dist/{chunk-5VCM2Z7M.js → chunk-VYTIGF3V.js} +4 -4
  15. package/dist/{chunk-TSBKJELM.js → chunk-WZH3Y3BL.js} +2 -2
  16. package/dist/index.cjs +37386 -36852
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +99 -1
  19. package/dist/index.d.ts +99 -1
  20. package/dist/index.js +118 -104
  21. package/dist/index.js.map +1 -1
  22. package/dist/{menu-bar-VXAMTP3E.js → menu-bar-67LDC7IR.js} +34 -7
  23. package/dist/menu-bar-67LDC7IR.js.map +1 -0
  24. package/dist/ueditor.cjs +16951 -16431
  25. package/dist/ueditor.cjs.map +1 -1
  26. package/dist/ueditor.js +6 -6
  27. package/package.json +3 -1
  28. package/dist/chunk-6XQTRIP6.js.map +0 -1
  29. package/dist/chunk-BGCDAFGB.js.map +0 -1
  30. package/dist/chunk-GZ7EDNGF.js.map +0 -1
  31. package/dist/menu-bar-VXAMTP3E.js.map +0 -1
  32. /package/dist/{DatePicker-FDOTQMNL.js.map → DatePicker-BYYBKHWH.js.map} +0 -0
  33. /package/dist/{EmojiPicker-Z7QPW4DA.js.map → EmojiPicker-NKY2LOGI.js.map} +0 -0
  34. /package/dist/{chunk-JG3U26V6.js.map → chunk-C2EHPHWH.js.map} +0 -0
  35. /package/dist/{chunk-JABD2ONI.js.map → chunk-CJ6RPCJN.js.map} +0 -0
  36. /package/dist/{chunk-EN33T3LJ.js.map → chunk-IW6FSDIT.js.map} +0 -0
  37. /package/dist/{chunk-5GMQ23IU.js.map → chunk-PNUDVGMI.js.map} +0 -0
  38. /package/dist/{chunk-5VCM2Z7M.js.map → chunk-VYTIGF3V.js.map} +0 -0
  39. /package/dist/{chunk-TSBKJELM.js.map → chunk-WZH3Y3BL.js.map} +0 -0
package/dist/index.js CHANGED
@@ -4,35 +4,35 @@ import {
4
4
  extractImageSrcsFromHtml,
5
5
  normalizeImageUrl,
6
6
  prepareUEditorContentForSave
7
- } from "./chunk-BGCDAFGB.js";
7
+ } from "./chunk-GKUKLOSO.js";
8
8
  import {
9
9
  EmojiPicker_default
10
- } from "./chunk-5VCM2Z7M.js";
10
+ } from "./chunk-VYTIGF3V.js";
11
11
  import {
12
12
  getEmojiImageUrl,
13
13
  getEmojiUnifiedCode,
14
14
  setEmojiBaseUrl
15
- } from "./chunk-TSBKJELM.js";
15
+ } from "./chunk-WZH3Y3BL.js";
16
16
  import "./chunk-4TYW5K4J.js";
17
17
  import {
18
18
  CompactDatePicker,
19
19
  DatePicker,
20
20
  DateRangePicker,
21
21
  date_exports
22
- } from "./chunk-JG3U26V6.js";
22
+ } from "./chunk-C2EHPHWH.js";
23
23
  import {
24
24
  Modal_default
25
- } from "./chunk-JABD2ONI.js";
25
+ } from "./chunk-CJ6RPCJN.js";
26
26
  import {
27
27
  DropdownMenuItem,
28
28
  DropdownMenuSeparator,
29
29
  DropdownMenu_default,
30
30
  SelectDropdown
31
- } from "./chunk-GZ7EDNGF.js";
31
+ } from "./chunk-TVCZXO6G.js";
32
32
  import {
33
33
  Tooltip,
34
34
  useHydrated
35
- } from "./chunk-EN33T3LJ.js";
35
+ } from "./chunk-IW6FSDIT.js";
36
36
  import {
37
37
  Popover,
38
38
  UnderverseConfigProvider,
@@ -43,7 +43,7 @@ import {
43
43
  shadcnAnimationStyles,
44
44
  useShadCNAnimations,
45
45
  useUnderverseUIConfig
46
- } from "./chunk-5GMQ23IU.js";
46
+ } from "./chunk-PNUDVGMI.js";
47
47
  import {
48
48
  ForceInternalTranslationsProvider,
49
49
  NextIntlAdapter,
@@ -68,7 +68,7 @@ import {
68
68
  useUnderverseLocale,
69
69
  useUnderverseTranslations,
70
70
  vi_default
71
- } from "./chunk-6XQTRIP6.js";
71
+ } from "./chunk-PSWS64LA.js";
72
72
  import {
73
73
  __export,
74
74
  __require
@@ -20289,9 +20289,55 @@ function DataTableHeader({
20289
20289
  const isRightAlign = resolvedHeaderAlign === "right";
20290
20290
  const isCenterAlign = resolvedHeaderAlign === "center";
20291
20291
  const columnLabel = getColumnLabel(col.title) || col.key;
20292
- const sortByText = sortByLabel ?? gi18n.sortBy ?? "Sort by";
20293
- const sortLabel = `${sortByText} ${columnLabel}`;
20292
+ const sortByText = sortByLabel ?? gi18n.sortBy ?? (t("sortBy") !== "sortBy" ? t("sortBy") : void 0);
20293
+ const sortLabel = sortByText ? `${sortByText} ${columnLabel}` : columnLabel;
20294
+ const hasSortTooltip = Boolean(sortByText);
20294
20295
  const useEndIcon = (col.iconPosition ?? "end") === "end";
20296
+ const sortButton = /* @__PURE__ */ jsx57(
20297
+ "button",
20298
+ {
20299
+ type: "button",
20300
+ className: cn(
20301
+ "p-1 rounded-lg transition-all duration-200 hover:bg-foreground/10",
20302
+ useEndIcon && isCenterAlign && "col-start-3 justify-self-end",
20303
+ sort?.key === col.key ? "opacity-100 bg-foreground/10" : "opacity-60 hover:opacity-100"
20304
+ ),
20305
+ onClick: () => {
20306
+ setCurPage(1);
20307
+ setSort((current) => {
20308
+ if (!current || current.key !== col.key) return { key: col.key, order: "asc" };
20309
+ if (current.order === "asc") return { key: col.key, order: "desc" };
20310
+ return null;
20311
+ });
20312
+ },
20313
+ "aria-label": sortLabel,
20314
+ title: hasSortTooltip ? sortLabel : void 0,
20315
+ children: /* @__PURE__ */ jsxs49("svg", { viewBox: "0 0 20 20", fill: "none", className: cn("inline-block", sortIconClass), children: [
20316
+ /* @__PURE__ */ jsx57(
20317
+ "path",
20318
+ {
20319
+ d: "M5 7.5l5-5 5 5",
20320
+ stroke: "currentColor",
20321
+ strokeWidth: "1.5",
20322
+ strokeLinecap: "round",
20323
+ strokeLinejoin: "round",
20324
+ opacity: sort?.key === col.key && sort.order === "asc" ? 1 : 0.4
20325
+ }
20326
+ ),
20327
+ /* @__PURE__ */ jsx57(
20328
+ "path",
20329
+ {
20330
+ d: "M5 12.5l5 5 5-5",
20331
+ stroke: "currentColor",
20332
+ strokeWidth: "1.5",
20333
+ strokeLinecap: "round",
20334
+ strokeLinejoin: "round",
20335
+ opacity: sort?.key === col.key && sort.order === "desc" ? 1 : 0.4
20336
+ }
20337
+ )
20338
+ ] })
20339
+ }
20340
+ );
20295
20341
  const titleContent = /* @__PURE__ */ jsxs49(
20296
20342
  "div",
20297
20343
  {
@@ -20313,85 +20359,46 @@ function DataTableHeader({
20313
20359
  children: col.title
20314
20360
  }
20315
20361
  ),
20316
- col.sortable && /* @__PURE__ */ jsx57(
20362
+ col.sortable && (hasSortTooltip ? /* @__PURE__ */ jsx57(
20317
20363
  Tooltip,
20318
20364
  {
20319
20365
  placement: "top",
20320
20366
  content: /* @__PURE__ */ jsx57("span", { className: "text-xs font-medium", children: sortLabel }),
20321
- children: /* @__PURE__ */ jsx57(
20322
- "button",
20323
- {
20324
- type: "button",
20325
- className: cn(
20326
- "p-1 rounded-lg transition-all duration-200 hover:bg-foreground/10",
20327
- useEndIcon && isCenterAlign && "col-start-3 justify-self-end",
20328
- sort?.key === col.key ? "opacity-100 bg-foreground/10" : "opacity-60 hover:opacity-100"
20329
- ),
20330
- onClick: () => {
20331
- setCurPage(1);
20332
- setSort((current) => {
20333
- if (!current || current.key !== col.key) return { key: col.key, order: "asc" };
20334
- if (current.order === "asc") return { key: col.key, order: "desc" };
20335
- return null;
20336
- });
20337
- },
20338
- "aria-label": sortLabel,
20339
- children: /* @__PURE__ */ jsxs49("svg", { viewBox: "0 0 20 20", fill: "none", className: cn("inline-block", sortIconClass), children: [
20340
- /* @__PURE__ */ jsx57(
20341
- "path",
20342
- {
20343
- d: "M5 7.5l5-5 5 5",
20344
- stroke: "currentColor",
20345
- strokeWidth: "1.5",
20346
- strokeLinecap: "round",
20347
- strokeLinejoin: "round",
20348
- opacity: sort?.key === col.key && sort.order === "asc" ? 1 : 0.4
20349
- }
20350
- ),
20351
- /* @__PURE__ */ jsx57(
20352
- "path",
20353
- {
20354
- d: "M5 12.5l5 5 5-5",
20355
- stroke: "currentColor",
20356
- strokeWidth: "1.5",
20357
- strokeLinecap: "round",
20358
- strokeLinejoin: "round",
20359
- opacity: sort?.key === col.key && sort.order === "desc" ? 1 : 0.4
20360
- }
20361
- )
20362
- ] })
20363
- }
20364
- )
20367
+ children: sortButton
20365
20368
  }
20366
- )
20369
+ ) : sortButton)
20367
20370
  ]
20368
20371
  }
20369
20372
  );
20373
+ const filterText = gi18n.filterByColumn ? gi18n.filterByColumn(columnLabel) : t("filterByColumn") !== "filterByColumn" ? t("filterByColumn").replace("{column}", columnLabel) : t("filterBy") !== "filterBy" ? `${t("filterBy")} ${columnLabel}` : void 0;
20374
+ const filterLabel = filterText ?? columnLabel;
20375
+ const hasFilterTooltip = Boolean(filterText);
20376
+ const filterButton = /* @__PURE__ */ jsx57(
20377
+ "button",
20378
+ {
20379
+ type: "button",
20380
+ title: hasFilterTooltip ? filterLabel : void 0,
20381
+ className: cn(
20382
+ "p-1.5 rounded-lg transition-all duration-200 hover:bg-foreground/10",
20383
+ filters[col.key] ? "bg-foreground/10 opacity-100" : "opacity-60 hover:opacity-100"
20384
+ ),
20385
+ "aria-label": filterLabel,
20386
+ children: /* @__PURE__ */ jsx57(FilterIcon, { className: "w-4 h-4" })
20387
+ }
20388
+ );
20370
20389
  const filterContent = col.filter ? /* @__PURE__ */ jsx57(
20371
20390
  Popover,
20372
20391
  {
20373
20392
  getPortalContainer,
20374
20393
  placement: "bottom-start",
20375
- trigger: /* @__PURE__ */ jsx57("span", { className: "inline-flex", children: /* @__PURE__ */ jsx57(
20394
+ trigger: /* @__PURE__ */ jsx57("span", { className: "inline-flex", children: hasFilterTooltip ? /* @__PURE__ */ jsx57(
20376
20395
  Tooltip,
20377
20396
  {
20378
20397
  placement: "top",
20379
- content: /* @__PURE__ */ jsx57("span", { className: "text-xs font-medium", children: gi18n.filterByColumn ? gi18n.filterByColumn(columnLabel) : `Filter by ${columnLabel}` }),
20380
- children: /* @__PURE__ */ jsx57(
20381
- "button",
20382
- {
20383
- type: "button",
20384
- title: gi18n.filterByColumn ? gi18n.filterByColumn(columnLabel) : `Filter by ${columnLabel}`,
20385
- className: cn(
20386
- "p-1.5 rounded-lg transition-all duration-200 hover:bg-foreground/10",
20387
- filters[col.key] ? "bg-foreground/10 opacity-100" : "opacity-60 hover:opacity-100"
20388
- ),
20389
- "aria-label": gi18n.filterByColumn ? gi18n.filterByColumn(columnLabel) : `Filter by ${columnLabel}`,
20390
- children: /* @__PURE__ */ jsx57(FilterIcon, { className: "w-4 h-4" })
20391
- }
20392
- )
20398
+ content: /* @__PURE__ */ jsx57("span", { className: "text-xs font-medium", children: filterLabel }),
20399
+ children: filterButton
20393
20400
  }
20394
- ) }),
20401
+ ) : filterButton }),
20395
20402
  children: /* @__PURE__ */ jsxs49("div", { className: "p-3 w-64 space-y-3", children: [
20396
20403
  /* @__PURE__ */ jsxs49("div", { className: "flex items-center justify-between", children: [
20397
20404
  /* @__PURE__ */ jsx57("div", { className: "text-sm font-medium", children: col.title }),
@@ -20480,36 +20487,42 @@ function DataTableHeader({
20480
20487
  ),
20481
20488
  children: [
20482
20489
  renderHeaderContent(col, isLeaf),
20483
- isLeaf && enableHeaderAutoFit && /* @__PURE__ */ jsx57(
20484
- Tooltip,
20485
- {
20486
- placement: "top",
20487
- content: /* @__PURE__ */ jsx57("span", { className: "text-xs font-medium", children: "Double click to auto-fit" }),
20488
- children: /* @__PURE__ */ jsx57(
20489
- "button",
20490
- {
20491
- type: "button",
20492
- "aria-label": gi18n.autoFitColumn ? gi18n.autoFitColumn(String(col.title)) : `Auto fit ${String(col.title)}`,
20493
- onClick: (event) => {
20494
- event.preventDefault();
20495
- event.stopPropagation();
20496
- },
20497
- onDoubleClick: (event) => {
20498
- event.preventDefault();
20499
- event.stopPropagation();
20500
- onAutoFitColumn?.(col.key);
20501
- },
20502
- className: cn(
20503
- "absolute inset-y-0 right-0 z-10 w-3",
20504
- !isLastCell && "-mr-1",
20505
- "cursor-col-resize select-none bg-transparent",
20506
- "after:absolute after:inset-y-2 after:right-0.8 after:w-px after:bg-border/0 after:transition-colors",
20507
- "hover:after:bg-primary/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary"
20508
- )
20509
- }
20510
- )
20511
- }
20512
- )
20490
+ isLeaf && enableHeaderAutoFit && (() => {
20491
+ const autoFitTooltipText = t("doubleClickToAutoFit") !== "doubleClickToAutoFit" ? t("doubleClickToAutoFit") : void 0;
20492
+ const autoFitAriaLabel = gi18n.autoFitColumn ? gi18n.autoFitColumn(String(col.title)) : t("autoFitColumn") !== "autoFitColumn" ? t("autoFitColumn").replace("{column}", String(col.title)) : autoFitTooltipText ? `${autoFitTooltipText} ${String(col.title)}` : `Auto fit ${String(col.title)}`;
20493
+ const autoFitButton = /* @__PURE__ */ jsx57(
20494
+ "button",
20495
+ {
20496
+ type: "button",
20497
+ "aria-label": autoFitAriaLabel,
20498
+ title: autoFitTooltipText,
20499
+ onClick: (event) => {
20500
+ event.preventDefault();
20501
+ event.stopPropagation();
20502
+ },
20503
+ onDoubleClick: (event) => {
20504
+ event.preventDefault();
20505
+ event.stopPropagation();
20506
+ onAutoFitColumn?.(col.key);
20507
+ },
20508
+ className: cn(
20509
+ "absolute inset-y-0 right-0 z-10 w-3",
20510
+ !isLastCell && "-mr-1",
20511
+ "cursor-col-resize select-none bg-transparent",
20512
+ "after:absolute after:inset-y-2 after:right-0.8 after:w-px after:bg-border/0 after:transition-colors",
20513
+ "hover:after:bg-primary/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary"
20514
+ )
20515
+ }
20516
+ );
20517
+ return autoFitTooltipText ? /* @__PURE__ */ jsx57(
20518
+ Tooltip,
20519
+ {
20520
+ placement: "top",
20521
+ content: /* @__PURE__ */ jsx57("span", { className: "text-xs font-medium", children: autoFitTooltipText }),
20522
+ children: autoFitButton
20523
+ }
20524
+ ) : autoFitButton;
20525
+ })()
20513
20526
  ]
20514
20527
  },
20515
20528
  col.key
@@ -21380,6 +21393,7 @@ function DataTable({
21380
21393
  paginationRange,
21381
21394
  enableHeaderAutoFit = true,
21382
21395
  labels,
21396
+ sortByLabel,
21383
21397
  columnColorGroups,
21384
21398
  borderMode,
21385
21399
  getPortalContainer,
@@ -21589,7 +21603,7 @@ function DataTable({
21589
21603
  enableHeaderAutoFit,
21590
21604
  getStickyHeaderClass,
21591
21605
  getStickyHeaderCellStyle,
21592
- sortByLabel: labels?.sortBy,
21606
+ sortByLabel: sortByLabel ?? labels?.sortBy,
21593
21607
  t,
21594
21608
  columnColorGroups,
21595
21609
  getPortalContainer