hazo_ui 6.12.5 → 6.14.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/CHANGE_LOG.md +90 -0
- package/README.md +18 -1
- package/dist/index.cjs +294 -243
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -5
- package/dist/index.d.ts +37 -5
- package/dist/index.js +293 -245
- package/dist/index.js.map +1 -1
- package/dist/index.locale-picker.cjs +18 -1
- package/dist/index.locale-picker.cjs.map +1 -1
- package/dist/index.locale-picker.js +19 -1
- package/dist/index.locale-picker.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
4
|
import * as React27 from 'react';
|
|
5
|
-
import React27__default, { lazy, useRef, useState, useCallback, useEffect, useMemo, Fragment, Suspense, useSyncExternalStore } from 'react';
|
|
5
|
+
import React27__default, { createContext, lazy, useContext, useRef, useState, useCallback, useEffect, useMemo, Fragment, Suspense, useSyncExternalStore } from 'react';
|
|
6
6
|
import { generateRequestId } from 'hazo_core';
|
|
7
7
|
import { withContext, setBrowserCorrelationId } from 'hazo_core/client';
|
|
8
8
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
@@ -112,8 +112,8 @@ var require_extends = __commonJS({
|
|
|
112
112
|
function _extends11() {
|
|
113
113
|
return module.exports = _extends11 = Object.assign ? Object.assign.bind() : function(n) {
|
|
114
114
|
for (var e = 1; e < arguments.length; e++) {
|
|
115
|
-
var
|
|
116
|
-
for (var r in
|
|
115
|
+
var t = arguments[e];
|
|
116
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
117
117
|
}
|
|
118
118
|
return n;
|
|
119
119
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends11.apply(null, arguments);
|
|
@@ -127,12 +127,12 @@ var require_objectWithoutPropertiesLoose = __commonJS({
|
|
|
127
127
|
"../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js"(exports, module) {
|
|
128
128
|
function _objectWithoutPropertiesLoose10(r, e) {
|
|
129
129
|
if (null == r) return {};
|
|
130
|
-
var
|
|
130
|
+
var t = {};
|
|
131
131
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
132
132
|
if (-1 !== e.indexOf(n)) continue;
|
|
133
|
-
|
|
133
|
+
t[n] = r[n];
|
|
134
134
|
}
|
|
135
|
-
return
|
|
135
|
+
return t;
|
|
136
136
|
}
|
|
137
137
|
module.exports = _objectWithoutPropertiesLoose10, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
138
138
|
}
|
|
@@ -683,6 +683,11 @@ var en_default = {
|
|
|
683
683
|
"rte.horizontal_rule": "Horizontal rule",
|
|
684
684
|
"rte.insert_image": "Insert image",
|
|
685
685
|
"rte.table": "Table",
|
|
686
|
+
"rte.tab_html": "HTML",
|
|
687
|
+
"rte.tab_plain_text": "Plain Text",
|
|
688
|
+
"rte.tab_raw_html": "Raw HTML",
|
|
689
|
+
"rte.empty_content": "(empty)",
|
|
690
|
+
"rte.link_placeholder": "https://example.com",
|
|
686
691
|
"rte.insert_variable": "Insert variable",
|
|
687
692
|
"rte.attach_file": "Attach file",
|
|
688
693
|
"rte.block_type.paragraph": "Paragraph",
|
|
@@ -731,6 +736,9 @@ var en_default = {
|
|
|
731
736
|
"canvas_toolbar.align_right": "Align right",
|
|
732
737
|
"canvas_toolbar.text_color": "Text color",
|
|
733
738
|
"canvas_toolbar.font_family": "Font family",
|
|
739
|
+
"canvas_toolbar.font_sans": "Sans",
|
|
740
|
+
"canvas_toolbar.font_serif": "Serif",
|
|
741
|
+
"canvas_toolbar.font_mono": "Mono",
|
|
734
742
|
"canvas_toolbar.align_top": "Align top",
|
|
735
743
|
"canvas_toolbar.align_middle": "Align middle",
|
|
736
744
|
"canvas_toolbar.align_bottom": "Align bottom",
|
|
@@ -743,6 +751,8 @@ var en_default = {
|
|
|
743
751
|
"notification.loading": "Loading notifications",
|
|
744
752
|
"notification.mark_all_read": "Mark all as read",
|
|
745
753
|
"notification.unread": "Unread",
|
|
754
|
+
"notification.unread_count": "{{count}} unread",
|
|
755
|
+
"browser_tab.close_aria": "Close {{label}}",
|
|
746
756
|
"confirm.cancel": "Cancel",
|
|
747
757
|
"icon_picker.search_placeholder": "Search icons...",
|
|
748
758
|
"common.loading": "Loading...",
|
|
@@ -762,10 +772,12 @@ var en_default = {
|
|
|
762
772
|
"kanban.select_placeholder": "Select {{label}}\u2026",
|
|
763
773
|
"kanban.select_priority": "Select priority\u2026",
|
|
764
774
|
"kanban.select_status": "Select status\u2026",
|
|
775
|
+
"kanban.clear": "Clear",
|
|
765
776
|
"markdown.placeholder": "Write in Markdown\u2026",
|
|
766
777
|
"markdown.upload_failed": "Upload failed.",
|
|
767
778
|
"markdown.loading_editor": "Loading editor\u2026",
|
|
768
779
|
"markdown.uploading_image": "Uploading image\u2026",
|
|
780
|
+
"markdown.upload_placeholder": "uploading\u2026",
|
|
769
781
|
"cropper.title": "Crop photo",
|
|
770
782
|
"cropper.save": "Save",
|
|
771
783
|
"cropper.cancel": "Cancel",
|
|
@@ -854,7 +866,26 @@ var en_default = {
|
|
|
854
866
|
"charts.dropoff": "Drop-off: \u2212{{value}}",
|
|
855
867
|
"toast.missing_prefix": "Missing: {{items}}"
|
|
856
868
|
};
|
|
857
|
-
var
|
|
869
|
+
var default_t = createPackageT("hazo_ui", en_default);
|
|
870
|
+
var defaultHazoUiT = default_t;
|
|
871
|
+
var HazoUiI18nContext = createContext(default_t);
|
|
872
|
+
function HazoUiI18nProvider({ t, children }) {
|
|
873
|
+
const safe_t = useMemo(
|
|
874
|
+
() => (key, values) => {
|
|
875
|
+
try {
|
|
876
|
+
return t(key, values);
|
|
877
|
+
} catch {
|
|
878
|
+
get_logger().warn("i18n_missing_key_fallback", { key });
|
|
879
|
+
return default_t(key, values);
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
[t]
|
|
883
|
+
);
|
|
884
|
+
return /* @__PURE__ */ jsx(HazoUiI18nContext.Provider, { value: safe_t, children });
|
|
885
|
+
}
|
|
886
|
+
function useHazoUiT() {
|
|
887
|
+
return useContext(HazoUiI18nContext);
|
|
888
|
+
}
|
|
858
889
|
function FilterFieldItem({
|
|
859
890
|
filterConfig,
|
|
860
891
|
fieldConfig,
|
|
@@ -862,6 +893,7 @@ function FilterFieldItem({
|
|
|
862
893
|
onOperatorChange,
|
|
863
894
|
onDelete
|
|
864
895
|
}) {
|
|
896
|
+
const t = useHazoUiT();
|
|
865
897
|
const [isCalendarOpen, setIsCalendarOpen] = useState(false);
|
|
866
898
|
const renderInput = () => {
|
|
867
899
|
switch (fieldConfig.type) {
|
|
@@ -1043,12 +1075,13 @@ function FilterFieldItem({
|
|
|
1043
1075
|
] })
|
|
1044
1076
|
] });
|
|
1045
1077
|
}
|
|
1078
|
+
var NO_INITIAL_FILTERS = [];
|
|
1046
1079
|
function HazoUiMultiFilterDialog({
|
|
1047
1080
|
availableFields,
|
|
1048
1081
|
onFilterChange,
|
|
1049
|
-
initialFilters =
|
|
1050
|
-
title
|
|
1051
|
-
description
|
|
1082
|
+
initialFilters = NO_INITIAL_FILTERS,
|
|
1083
|
+
title: titleProp,
|
|
1084
|
+
description: descriptionProp,
|
|
1052
1085
|
headerBackgroundColor,
|
|
1053
1086
|
headerTextColor,
|
|
1054
1087
|
submitButtonBackgroundColor,
|
|
@@ -1060,6 +1093,9 @@ function HazoUiMultiFilterDialog({
|
|
|
1060
1093
|
clearButtonTextColor,
|
|
1061
1094
|
clearButtonBorderColor
|
|
1062
1095
|
}) {
|
|
1096
|
+
const t = useHazoUiT();
|
|
1097
|
+
const description = descriptionProp ?? t("filter.description");
|
|
1098
|
+
const title = titleProp ?? t("filter.title");
|
|
1063
1099
|
const config = get_hazo_ui_config();
|
|
1064
1100
|
const finalSubmitBgColor = submitButtonBackgroundColor ?? config.submit_button_background_color;
|
|
1065
1101
|
const finalSubmitTextColor = submitButtonTextColor ?? config.submit_button_text_color;
|
|
@@ -1301,7 +1337,6 @@ function HazoUiMultiFilterDialog({
|
|
|
1301
1337
|
] })
|
|
1302
1338
|
] });
|
|
1303
1339
|
}
|
|
1304
|
-
var t2 = createPackageT("hazo_ui", en_default);
|
|
1305
1340
|
function SortableSortFieldItem({
|
|
1306
1341
|
sortConfig,
|
|
1307
1342
|
fieldLabel,
|
|
@@ -1309,6 +1344,7 @@ function SortableSortFieldItem({
|
|
|
1309
1344
|
onDirectionChange,
|
|
1310
1345
|
onDelete
|
|
1311
1346
|
}) {
|
|
1347
|
+
const t = useHazoUiT();
|
|
1312
1348
|
const {
|
|
1313
1349
|
attributes,
|
|
1314
1350
|
listeners,
|
|
@@ -1340,7 +1376,7 @@ function SortableSortFieldItem({
|
|
|
1340
1376
|
...attributes,
|
|
1341
1377
|
...listeners,
|
|
1342
1378
|
className: "cls_drag_handle flex h-7 w-5 shrink-0 cursor-grab items-center justify-center rounded text-muted-foreground/60 hover:text-foreground active:cursor-grabbing",
|
|
1343
|
-
"aria-label":
|
|
1379
|
+
"aria-label": t("sort.reorder_aria", { field: fieldLabel }),
|
|
1344
1380
|
children: /* @__PURE__ */ jsx(GripVertical, { className: "cls_drag_icon h-4 w-4" })
|
|
1345
1381
|
}
|
|
1346
1382
|
),
|
|
@@ -1348,7 +1384,7 @@ function SortableSortFieldItem({
|
|
|
1348
1384
|
"span",
|
|
1349
1385
|
{
|
|
1350
1386
|
className: "cls_priority_badge inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-muted text-[10px] font-semibold tabular-nums text-muted-foreground",
|
|
1351
|
-
"aria-label":
|
|
1387
|
+
"aria-label": t("sort.priority_aria", { n: priority }),
|
|
1352
1388
|
children: priority
|
|
1353
1389
|
}
|
|
1354
1390
|
),
|
|
@@ -1357,7 +1393,7 @@ function SortableSortFieldItem({
|
|
|
1357
1393
|
"div",
|
|
1358
1394
|
{
|
|
1359
1395
|
role: "radiogroup",
|
|
1360
|
-
"aria-label":
|
|
1396
|
+
"aria-label": t("sort.direction_aria", { field: fieldLabel }),
|
|
1361
1397
|
className: "cls_direction_control inline-flex shrink-0 items-center rounded-md border border-border/70 bg-muted/40 p-0.5",
|
|
1362
1398
|
children: [
|
|
1363
1399
|
/* @__PURE__ */ jsxs(
|
|
@@ -1371,7 +1407,7 @@ function SortableSortFieldItem({
|
|
|
1371
1407
|
className: "cls_dir_asc inline-flex items-center gap-1 rounded px-2 py-1 text-xs font-medium text-muted-foreground transition-colors data-[active=true]:bg-background data-[active=true]:text-foreground data-[active=true]:shadow-sm hover:text-foreground",
|
|
1372
1408
|
children: [
|
|
1373
1409
|
/* @__PURE__ */ jsx(ArrowUp, { className: "h-3 w-3" }),
|
|
1374
|
-
|
|
1410
|
+
t("sort.asc")
|
|
1375
1411
|
]
|
|
1376
1412
|
}
|
|
1377
1413
|
),
|
|
@@ -1386,7 +1422,7 @@ function SortableSortFieldItem({
|
|
|
1386
1422
|
className: "cls_dir_desc inline-flex items-center gap-1 rounded px-2 py-1 text-xs font-medium text-muted-foreground transition-colors data-[active=true]:bg-background data-[active=true]:text-foreground data-[active=true]:shadow-sm hover:text-foreground",
|
|
1387
1423
|
children: [
|
|
1388
1424
|
/* @__PURE__ */ jsx(ArrowDown, { className: "h-3 w-3" }),
|
|
1389
|
-
|
|
1425
|
+
t("sort.desc")
|
|
1390
1426
|
]
|
|
1391
1427
|
}
|
|
1392
1428
|
)
|
|
@@ -1400,7 +1436,7 @@ function SortableSortFieldItem({
|
|
|
1400
1436
|
size: "sm",
|
|
1401
1437
|
onClick: onDelete,
|
|
1402
1438
|
className: "cls_delete_btn h-7 w-7 shrink-0 p-0 text-muted-foreground/60 hover:bg-destructive/10 hover:text-destructive",
|
|
1403
|
-
"aria-label":
|
|
1439
|
+
"aria-label": t("sort.remove_aria", { field: fieldLabel }),
|
|
1404
1440
|
children: /* @__PURE__ */ jsx(X, { className: "cls_delete_icon h-3.5 w-3.5" })
|
|
1405
1441
|
}
|
|
1406
1442
|
)
|
|
@@ -1408,12 +1444,13 @@ function SortableSortFieldItem({
|
|
|
1408
1444
|
}
|
|
1409
1445
|
);
|
|
1410
1446
|
}
|
|
1447
|
+
var NO_INITIAL_SORT_FIELDS = [];
|
|
1411
1448
|
function HazoUiMultiSortDialog({
|
|
1412
1449
|
availableFields,
|
|
1413
1450
|
onSortChange,
|
|
1414
|
-
initialSortFields =
|
|
1415
|
-
title
|
|
1416
|
-
description
|
|
1451
|
+
initialSortFields = NO_INITIAL_SORT_FIELDS,
|
|
1452
|
+
title: titleProp,
|
|
1453
|
+
description: descriptionProp,
|
|
1417
1454
|
headerBackgroundColor,
|
|
1418
1455
|
headerTextColor,
|
|
1419
1456
|
submitButtonBackgroundColor,
|
|
@@ -1425,6 +1462,9 @@ function HazoUiMultiSortDialog({
|
|
|
1425
1462
|
clearButtonTextColor,
|
|
1426
1463
|
clearButtonBorderColor
|
|
1427
1464
|
}) {
|
|
1465
|
+
const t = useHazoUiT();
|
|
1466
|
+
const description = descriptionProp ?? t("sort.description");
|
|
1467
|
+
const title = titleProp ?? t("sort.title");
|
|
1428
1468
|
const config = get_hazo_ui_config();
|
|
1429
1469
|
const finalSubmitBgColor = submitButtonBackgroundColor ?? config.submit_button_background_color;
|
|
1430
1470
|
const finalSubmitTextColor = submitButtonTextColor ?? config.submit_button_text_color;
|
|
@@ -1513,16 +1553,16 @@ function HazoUiMultiSortDialog({
|
|
|
1513
1553
|
};
|
|
1514
1554
|
const hasActiveSorts = initialSortFields.length > 0;
|
|
1515
1555
|
const tooltipContent = hasActiveSorts ? /* @__PURE__ */ jsxs("div", { className: "cls_sort_tooltip_content space-y-1", children: [
|
|
1516
|
-
/* @__PURE__ */ jsx("div", { className: "cls_tooltip_title text-xs font-semibold mb-1", children:
|
|
1556
|
+
/* @__PURE__ */ jsx("div", { className: "cls_tooltip_title text-xs font-semibold mb-1", children: t("sort.active_sorts") }),
|
|
1517
1557
|
initialSortFields.map((sortConfig, index) => /* @__PURE__ */ jsxs("div", { className: "cls_tooltip_item text-xs", children: [
|
|
1518
1558
|
index + 1,
|
|
1519
1559
|
". ",
|
|
1520
1560
|
getFieldLabel(sortConfig.field),
|
|
1521
1561
|
" (",
|
|
1522
|
-
sortConfig.direction === "asc" ?
|
|
1562
|
+
sortConfig.direction === "asc" ? t("sort.asc") : t("sort.desc"),
|
|
1523
1563
|
")"
|
|
1524
1564
|
] }, sortConfig.field))
|
|
1525
|
-
] }) : /* @__PURE__ */ jsx("div", { className: "cls_sort_tooltip_content text-xs", children:
|
|
1565
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "cls_sort_tooltip_content text-xs", children: t("sort.no_active_sorts") });
|
|
1526
1566
|
return /* @__PURE__ */ jsxs(Dialog, { open: isOpen, onOpenChange: setIsOpen, children: [
|
|
1527
1567
|
/* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
1528
1568
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
@@ -1531,7 +1571,7 @@ function HazoUiMultiSortDialog({
|
|
|
1531
1571
|
variant: "outline",
|
|
1532
1572
|
size: "sm",
|
|
1533
1573
|
className: "cls_sort_button",
|
|
1534
|
-
"aria-label":
|
|
1574
|
+
"aria-label": t("sort.open_dialog_aria"),
|
|
1535
1575
|
children: [
|
|
1536
1576
|
/* @__PURE__ */ jsx(
|
|
1537
1577
|
ArrowUpDown,
|
|
@@ -1542,7 +1582,7 @@ function HazoUiMultiSortDialog({
|
|
|
1542
1582
|
)
|
|
1543
1583
|
}
|
|
1544
1584
|
),
|
|
1545
|
-
|
|
1585
|
+
t("sort.button_label"),
|
|
1546
1586
|
hasActiveSorts && /* @__PURE__ */ jsx("span", { className: "cls_sort_count ml-2 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-blue-600 px-1 text-[10px] font-semibold text-white", children: initialSortFields.length })
|
|
1547
1587
|
]
|
|
1548
1588
|
}
|
|
@@ -1587,7 +1627,7 @@ function HazoUiMultiSortDialog({
|
|
|
1587
1627
|
}
|
|
1588
1628
|
)
|
|
1589
1629
|
}
|
|
1590
|
-
) }) : /* @__PURE__ */ jsx("div", { className: "cls_empty_sort_fields rounded-lg border border-dashed border-border/70 bg-muted/20 px-4 py-6 text-center text-xs text-muted-foreground", children:
|
|
1630
|
+
) }) : /* @__PURE__ */ jsx("div", { className: "cls_empty_sort_fields rounded-lg border border-dashed border-border/70 bg-muted/20 px-4 py-6 text-center text-xs text-muted-foreground", children: t("sort.empty_message") }),
|
|
1591
1631
|
/* @__PURE__ */ jsx("div", { className: "cls_add_field_section", children: /* @__PURE__ */ jsxs(Popover, { open: isComboboxOpen, onOpenChange: setIsComboboxOpen, children: [
|
|
1592
1632
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
1593
1633
|
Button,
|
|
@@ -1599,13 +1639,13 @@ function HazoUiMultiSortDialog({
|
|
|
1599
1639
|
className: "cls_add_field_combobox w-full justify-start gap-2 border border-dashed border-border/70 text-sm font-medium text-muted-foreground hover:border-border hover:bg-muted/40 hover:text-foreground",
|
|
1600
1640
|
children: [
|
|
1601
1641
|
/* @__PURE__ */ jsx(Plus, { className: "cls_plus_icon h-4 w-4" }),
|
|
1602
|
-
/* @__PURE__ */ jsx("span", { children: availableFieldsToAdd.length === 0 ?
|
|
1642
|
+
/* @__PURE__ */ jsx("span", { children: availableFieldsToAdd.length === 0 ? t("sort.all_fields_added") : t("sort.add_sort_field") })
|
|
1603
1643
|
]
|
|
1604
1644
|
}
|
|
1605
1645
|
) }),
|
|
1606
1646
|
/* @__PURE__ */ jsx(PopoverContent, { className: "cls_combobox_popover w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ jsxs(Command, { children: [
|
|
1607
|
-
/* @__PURE__ */ jsx(CommandInput, { placeholder:
|
|
1608
|
-
/* @__PURE__ */ jsx(CommandList, { children: availableFieldsToAdd.length === 0 ? /* @__PURE__ */ jsx(CommandEmpty, { children:
|
|
1647
|
+
/* @__PURE__ */ jsx(CommandInput, { placeholder: t("sort.search_fields"), className: "cls_command_input" }),
|
|
1648
|
+
/* @__PURE__ */ jsx(CommandList, { children: availableFieldsToAdd.length === 0 ? /* @__PURE__ */ jsx(CommandEmpty, { children: t("sort.no_fields_available") }) : /* @__PURE__ */ jsx(CommandGroup, { children: availableFieldsToAdd.map((field) => /* @__PURE__ */ jsx(
|
|
1609
1649
|
CommandItem,
|
|
1610
1650
|
{
|
|
1611
1651
|
value: field.label,
|
|
@@ -1627,7 +1667,7 @@ function HazoUiMultiSortDialog({
|
|
|
1627
1667
|
onClick: handleClearAll,
|
|
1628
1668
|
className: "cls_clear_all_btn text-muted-foreground hover:text-foreground",
|
|
1629
1669
|
style: clearButtonStyles,
|
|
1630
|
-
children:
|
|
1670
|
+
children: t("sort.clear_all")
|
|
1631
1671
|
}
|
|
1632
1672
|
) }),
|
|
1633
1673
|
/* @__PURE__ */ jsxs("div", { className: "cls_footer_right flex items-center gap-2", children: [
|
|
@@ -1639,7 +1679,7 @@ function HazoUiMultiSortDialog({
|
|
|
1639
1679
|
onClick: handleCancel,
|
|
1640
1680
|
className: "cls_cancel_btn",
|
|
1641
1681
|
style: cancelButtonStyles,
|
|
1642
|
-
children:
|
|
1682
|
+
children: t("sort.cancel")
|
|
1643
1683
|
}
|
|
1644
1684
|
),
|
|
1645
1685
|
/* @__PURE__ */ jsx(
|
|
@@ -1649,7 +1689,7 @@ function HazoUiMultiSortDialog({
|
|
|
1649
1689
|
onClick: handleApply,
|
|
1650
1690
|
className: "cls_apply_btn",
|
|
1651
1691
|
style: submitButtonStyles,
|
|
1652
|
-
children:
|
|
1692
|
+
children: t("sort.apply")
|
|
1653
1693
|
}
|
|
1654
1694
|
)
|
|
1655
1695
|
] })
|
|
@@ -2068,7 +2108,6 @@ var TabsContent = React27.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2068
2108
|
}
|
|
2069
2109
|
));
|
|
2070
2110
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
2071
|
-
var t3 = createPackageT("hazo_ui", en_default);
|
|
2072
2111
|
function isLucideValue(value) {
|
|
2073
2112
|
return value.startsWith("lucide:");
|
|
2074
2113
|
}
|
|
@@ -2287,6 +2326,7 @@ function HazoUiIconPicker({
|
|
|
2287
2326
|
triggerClassName,
|
|
2288
2327
|
align = "start"
|
|
2289
2328
|
}) {
|
|
2329
|
+
const t = useHazoUiT();
|
|
2290
2330
|
const [open, set_open] = React27.useState(false);
|
|
2291
2331
|
const [search, set_search] = React27.useState("");
|
|
2292
2332
|
const handle_select = React27.useCallback(
|
|
@@ -2334,7 +2374,7 @@ function HazoUiIconPicker({
|
|
|
2334
2374
|
type: "text",
|
|
2335
2375
|
value: search,
|
|
2336
2376
|
onChange: (e) => set_search(e.target.value),
|
|
2337
|
-
placeholder:
|
|
2377
|
+
placeholder: t("icon_picker.search_placeholder"),
|
|
2338
2378
|
className: cn(
|
|
2339
2379
|
"cls_hazo_ui_icon_picker_search",
|
|
2340
2380
|
"mb-2 flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm",
|
|
@@ -2358,11 +2398,11 @@ function HazoUiIconPicker({
|
|
|
2358
2398
|
name
|
|
2359
2399
|
);
|
|
2360
2400
|
}),
|
|
2361
|
-
filtered_search_results.length === 0 && /* @__PURE__ */ jsx("p", { className: "col-span-8 py-4 text-center text-sm text-muted-foreground", children:
|
|
2401
|
+
filtered_search_results.length === 0 && /* @__PURE__ */ jsx("p", { className: "col-span-8 py-4 text-center text-sm text-muted-foreground", children: t("icon_picker.no_results") })
|
|
2362
2402
|
] }) : /* @__PURE__ */ jsxs(Tabs, { defaultValue: "emoji", children: [
|
|
2363
2403
|
/* @__PURE__ */ jsxs(TabsList, { className: "grid w-full grid-cols-6", children: [
|
|
2364
|
-
/* @__PURE__ */ jsx(TabsTrigger, { value: "emoji", children:
|
|
2365
|
-
LUCIDE_GROUPS.map((group) => /* @__PURE__ */ jsx(TabsTrigger, { value: group.key, children:
|
|
2404
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "emoji", children: t("icon_picker.emoji_tab") }),
|
|
2405
|
+
LUCIDE_GROUPS.map((group) => /* @__PURE__ */ jsx(TabsTrigger, { value: group.key, children: t(group.label_key) }, group.key))
|
|
2366
2406
|
] }),
|
|
2367
2407
|
/* @__PURE__ */ jsx(TabsContent, { value: "emoji", children: /* @__PURE__ */ jsx("div", { className: "grid max-h-56 grid-cols-8 gap-1 overflow-y-auto", children: EMOJI_ITEMS.map((emoji, index) => /* @__PURE__ */ jsx(
|
|
2368
2408
|
"button",
|
|
@@ -2394,8 +2434,7 @@ function HazoUiIconPicker({
|
|
|
2394
2434
|
}
|
|
2395
2435
|
) });
|
|
2396
2436
|
}
|
|
2397
|
-
|
|
2398
|
-
function validateInput(value, input_type, text_len_min, text_len_max, num_min, num_max, regex, num_decimals) {
|
|
2437
|
+
function validateInput(value, input_type, text_len_min, text_len_max, num_min, num_max, regex, num_decimals, t) {
|
|
2399
2438
|
if (value === "") {
|
|
2400
2439
|
return { isValid: true };
|
|
2401
2440
|
}
|
|
@@ -2403,36 +2442,36 @@ function validateInput(value, input_type, text_len_min, text_len_max, num_min, n
|
|
|
2403
2442
|
case "numeric": {
|
|
2404
2443
|
const numValue = parseFloat(value);
|
|
2405
2444
|
if (isNaN(numValue)) {
|
|
2406
|
-
return { isValid: false, errorMessage:
|
|
2445
|
+
return { isValid: false, errorMessage: t("flex_input.must_be_valid_number") };
|
|
2407
2446
|
}
|
|
2408
2447
|
if (num_decimals !== void 0) {
|
|
2409
2448
|
const decimalPlaces = value.split(".")[1]?.length || 0;
|
|
2410
2449
|
if (decimalPlaces > num_decimals) {
|
|
2411
2450
|
return {
|
|
2412
2451
|
isValid: false,
|
|
2413
|
-
errorMessage:
|
|
2452
|
+
errorMessage: t("flex_input.max_decimals", { count: num_decimals })
|
|
2414
2453
|
};
|
|
2415
2454
|
}
|
|
2416
2455
|
}
|
|
2417
2456
|
if (num_min !== void 0 && numValue < num_min) {
|
|
2418
|
-
return { isValid: false, errorMessage:
|
|
2457
|
+
return { isValid: false, errorMessage: t("flex_input.min_value", { min: num_min }) };
|
|
2419
2458
|
}
|
|
2420
2459
|
if (num_max !== void 0 && numValue > num_max) {
|
|
2421
|
-
return { isValid: false, errorMessage:
|
|
2460
|
+
return { isValid: false, errorMessage: t("flex_input.max_value", { max: num_max }) };
|
|
2422
2461
|
}
|
|
2423
2462
|
break;
|
|
2424
2463
|
}
|
|
2425
2464
|
case "alpha": {
|
|
2426
2465
|
const alphaRegex = /^[A-Za-z0-9\s]*$/;
|
|
2427
2466
|
if (!alphaRegex.test(value)) {
|
|
2428
|
-
return { isValid: false, errorMessage:
|
|
2467
|
+
return { isValid: false, errorMessage: t("flex_input.alpha_only") };
|
|
2429
2468
|
}
|
|
2430
2469
|
break;
|
|
2431
2470
|
}
|
|
2432
2471
|
case "email": {
|
|
2433
2472
|
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
2434
2473
|
if (!emailRegex.test(value)) {
|
|
2435
|
-
return { isValid: false, errorMessage:
|
|
2474
|
+
return { isValid: false, errorMessage: t("flex_input.must_be_valid_email") };
|
|
2436
2475
|
}
|
|
2437
2476
|
break;
|
|
2438
2477
|
}
|
|
@@ -2440,13 +2479,13 @@ function validateInput(value, input_type, text_len_min, text_len_max, num_min, n
|
|
|
2440
2479
|
if (text_len_min !== void 0 && value.length < text_len_min) {
|
|
2441
2480
|
return {
|
|
2442
2481
|
isValid: false,
|
|
2443
|
-
errorMessage:
|
|
2482
|
+
errorMessage: t("flex_input.min_characters", { min: text_len_min })
|
|
2444
2483
|
};
|
|
2445
2484
|
}
|
|
2446
2485
|
if (text_len_max !== void 0 && value.length > text_len_max) {
|
|
2447
2486
|
return {
|
|
2448
2487
|
isValid: false,
|
|
2449
|
-
errorMessage:
|
|
2488
|
+
errorMessage: t("flex_input.max_characters", { max: text_len_max })
|
|
2450
2489
|
};
|
|
2451
2490
|
}
|
|
2452
2491
|
break;
|
|
@@ -2455,7 +2494,7 @@ function validateInput(value, input_type, text_len_min, text_len_max, num_min, n
|
|
|
2455
2494
|
if (regex) {
|
|
2456
2495
|
const regexPattern = typeof regex === "string" ? new RegExp(regex) : regex;
|
|
2457
2496
|
if (!regexPattern.test(value)) {
|
|
2458
|
-
return { isValid: false, errorMessage:
|
|
2497
|
+
return { isValid: false, errorMessage: t("flex_input.invalid_format") };
|
|
2459
2498
|
}
|
|
2460
2499
|
}
|
|
2461
2500
|
return { isValid: true };
|
|
@@ -2506,6 +2545,7 @@ var HazoUiFlexInput = React27.forwardRef(
|
|
|
2506
2545
|
onBlur,
|
|
2507
2546
|
...props
|
|
2508
2547
|
}, ref) => {
|
|
2548
|
+
const t = useHazoUiT();
|
|
2509
2549
|
const [internalValue, setInternalValue] = React27.useState(
|
|
2510
2550
|
typeof controlledValue === "string" ? controlledValue : typeof controlledValue === "number" ? String(controlledValue) : ""
|
|
2511
2551
|
);
|
|
@@ -2548,10 +2588,11 @@ var HazoUiFlexInput = React27.forwardRef(
|
|
|
2548
2588
|
num_min,
|
|
2549
2589
|
num_max,
|
|
2550
2590
|
regex,
|
|
2551
|
-
num_decimals
|
|
2591
|
+
num_decimals,
|
|
2592
|
+
t
|
|
2552
2593
|
);
|
|
2553
2594
|
if (!validation.isValid) {
|
|
2554
|
-
setErrorMessage(validation.errorMessage || format_guide ||
|
|
2595
|
+
setErrorMessage(validation.errorMessage || format_guide || t("flex_input.invalid_input"));
|
|
2555
2596
|
} else {
|
|
2556
2597
|
setErrorMessage(void 0);
|
|
2557
2598
|
}
|
|
@@ -3781,10 +3822,10 @@ var BLOCK_TYPE_LABEL_KEYS = {
|
|
|
3781
3822
|
"code-block": "rte.block_type.code_block",
|
|
3782
3823
|
blockquote: "rte.block_type.blockquote"
|
|
3783
3824
|
};
|
|
3784
|
-
function get_translated_block_types(
|
|
3825
|
+
function get_translated_block_types(t) {
|
|
3785
3826
|
return BLOCK_TYPES.map((type) => ({
|
|
3786
3827
|
...type,
|
|
3787
|
-
label:
|
|
3828
|
+
label: t(BLOCK_TYPE_LABEL_KEYS[type.value])
|
|
3788
3829
|
}));
|
|
3789
3830
|
}
|
|
3790
3831
|
|
|
@@ -3831,7 +3872,6 @@ function get_file_extension(filename) {
|
|
|
3831
3872
|
function is_image_file(mime_type) {
|
|
3832
3873
|
return mime_type.startsWith("image/");
|
|
3833
3874
|
}
|
|
3834
|
-
var t5 = createPackageT("hazo_ui", en_default);
|
|
3835
3875
|
var ALL_ON = {
|
|
3836
3876
|
undo_redo: true,
|
|
3837
3877
|
block_type: true,
|
|
@@ -3868,6 +3908,7 @@ var Toolbar = ({
|
|
|
3868
3908
|
toolbar,
|
|
3869
3909
|
font_families
|
|
3870
3910
|
}) => {
|
|
3911
|
+
const t = useHazoUiT();
|
|
3871
3912
|
const [link_url, set_link_url] = React27.useState("https://");
|
|
3872
3913
|
const [link_popover_open, set_link_popover_open] = React27.useState(false);
|
|
3873
3914
|
const [text_color_open, set_text_color_open] = React27.useState(false);
|
|
@@ -3886,7 +3927,7 @@ var Toolbar = ({
|
|
|
3886
3927
|
}
|
|
3887
3928
|
const tb = { ...ALL_ON, ...toolbar };
|
|
3888
3929
|
const font_family_options = font_families && font_families.length > 0 ? font_families : FONT_FAMILIES;
|
|
3889
|
-
const block_type_options = get_translated_block_types(
|
|
3930
|
+
const block_type_options = get_translated_block_types(t);
|
|
3890
3931
|
const get_current_font_size = () => {
|
|
3891
3932
|
const attrs = editor.getAttributes("textStyle");
|
|
3892
3933
|
return attrs.fontSize || FONT_SIZE_CONFIG.default;
|
|
@@ -4030,7 +4071,7 @@ var Toolbar = ({
|
|
|
4030
4071
|
{
|
|
4031
4072
|
onClick: () => editor.chain().focus().undo().run(),
|
|
4032
4073
|
disabled: !editor.can().undo(),
|
|
4033
|
-
tooltip:
|
|
4074
|
+
tooltip: t("rte.undo"),
|
|
4034
4075
|
children: /* @__PURE__ */ jsx(LuUndo2, { className: "h-4 w-4" })
|
|
4035
4076
|
},
|
|
4036
4077
|
"undo"
|
|
@@ -4040,7 +4081,7 @@ var Toolbar = ({
|
|
|
4040
4081
|
{
|
|
4041
4082
|
onClick: () => editor.chain().focus().redo().run(),
|
|
4042
4083
|
disabled: !editor.can().redo(),
|
|
4043
|
-
tooltip:
|
|
4084
|
+
tooltip: t("rte.redo"),
|
|
4044
4085
|
children: /* @__PURE__ */ jsx(LuRedo2, { className: "h-4 w-4" })
|
|
4045
4086
|
},
|
|
4046
4087
|
"redo"
|
|
@@ -4081,7 +4122,7 @@ var Toolbar = ({
|
|
|
4081
4122
|
ToolbarButton,
|
|
4082
4123
|
{
|
|
4083
4124
|
onClick: () => handle_font_size_change(-2),
|
|
4084
|
-
tooltip:
|
|
4125
|
+
tooltip: t("rte.decrease_font_size"),
|
|
4085
4126
|
children: /* @__PURE__ */ jsx(LuMinus, { className: "h-3 w-3" })
|
|
4086
4127
|
}
|
|
4087
4128
|
),
|
|
@@ -4090,7 +4131,7 @@ var Toolbar = ({
|
|
|
4090
4131
|
ToolbarButton,
|
|
4091
4132
|
{
|
|
4092
4133
|
onClick: () => handle_font_size_change(FONT_SIZE_CONFIG.step),
|
|
4093
|
-
tooltip:
|
|
4134
|
+
tooltip: t("rte.increase_font_size"),
|
|
4094
4135
|
children: /* @__PURE__ */ jsx(LuPlus, { className: "h-3 w-3" })
|
|
4095
4136
|
}
|
|
4096
4137
|
)
|
|
@@ -4108,7 +4149,7 @@ var Toolbar = ({
|
|
|
4108
4149
|
{
|
|
4109
4150
|
onClick: () => editor.chain().focus().toggleBold().run(),
|
|
4110
4151
|
is_active: editor.isActive("bold"),
|
|
4111
|
-
tooltip:
|
|
4152
|
+
tooltip: t("rte.bold"),
|
|
4112
4153
|
children: /* @__PURE__ */ jsx(LuBold, { className: "h-4 w-4" })
|
|
4113
4154
|
},
|
|
4114
4155
|
"bold"
|
|
@@ -4122,7 +4163,7 @@ var Toolbar = ({
|
|
|
4122
4163
|
{
|
|
4123
4164
|
onClick: () => editor.chain().focus().toggleItalic().run(),
|
|
4124
4165
|
is_active: editor.isActive("italic"),
|
|
4125
|
-
tooltip:
|
|
4166
|
+
tooltip: t("rte.italic"),
|
|
4126
4167
|
children: /* @__PURE__ */ jsx(LuItalic, { className: "h-4 w-4" })
|
|
4127
4168
|
},
|
|
4128
4169
|
"italic"
|
|
@@ -4136,7 +4177,7 @@ var Toolbar = ({
|
|
|
4136
4177
|
{
|
|
4137
4178
|
onClick: () => editor.chain().focus().toggleUnderline().run(),
|
|
4138
4179
|
is_active: editor.isActive("underline"),
|
|
4139
|
-
tooltip:
|
|
4180
|
+
tooltip: t("rte.underline"),
|
|
4140
4181
|
children: /* @__PURE__ */ jsx(LuUnderline, { className: "h-4 w-4" })
|
|
4141
4182
|
},
|
|
4142
4183
|
"underline"
|
|
@@ -4150,7 +4191,7 @@ var Toolbar = ({
|
|
|
4150
4191
|
{
|
|
4151
4192
|
onClick: () => editor.chain().focus().toggleStrike().run(),
|
|
4152
4193
|
is_active: editor.isActive("strike"),
|
|
4153
|
-
tooltip:
|
|
4194
|
+
tooltip: t("rte.strikethrough"),
|
|
4154
4195
|
children: /* @__PURE__ */ jsx(LuStrikethrough, { className: "h-4 w-4" })
|
|
4155
4196
|
},
|
|
4156
4197
|
"strike"
|
|
@@ -4164,7 +4205,7 @@ var Toolbar = ({
|
|
|
4164
4205
|
{
|
|
4165
4206
|
onClick: () => editor.chain().focus().toggleSubscript().run(),
|
|
4166
4207
|
is_active: editor.isActive("subscript"),
|
|
4167
|
-
tooltip:
|
|
4208
|
+
tooltip: t("rte.subscript"),
|
|
4168
4209
|
children: /* @__PURE__ */ jsx(LuSubscript, { className: "h-4 w-4" })
|
|
4169
4210
|
},
|
|
4170
4211
|
"sub"
|
|
@@ -4178,7 +4219,7 @@ var Toolbar = ({
|
|
|
4178
4219
|
{
|
|
4179
4220
|
onClick: () => editor.chain().focus().toggleSuperscript().run(),
|
|
4180
4221
|
is_active: editor.isActive("superscript"),
|
|
4181
|
-
tooltip:
|
|
4222
|
+
tooltip: t("rte.superscript"),
|
|
4182
4223
|
children: /* @__PURE__ */ jsx(LuSuperscript, { className: "h-4 w-4" })
|
|
4183
4224
|
},
|
|
4184
4225
|
"super"
|
|
@@ -4192,26 +4233,26 @@ var Toolbar = ({
|
|
|
4192
4233
|
if (tb.link) {
|
|
4193
4234
|
items.push(
|
|
4194
4235
|
/* @__PURE__ */ jsxs(Popover, { open: link_popover_open, onOpenChange: set_link_popover_open, children: [
|
|
4195
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { is_active: editor.isActive("link"), tooltip:
|
|
4236
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { is_active: editor.isActive("link"), tooltip: t("rte.link"), children: /* @__PURE__ */ jsx(LuLink, { className: "h-4 w-4" }) }) }),
|
|
4196
4237
|
/* @__PURE__ */ jsx(PopoverContent, { className: "w-80 p-3", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
4197
4238
|
/* @__PURE__ */ jsx(
|
|
4198
4239
|
Input,
|
|
4199
4240
|
{
|
|
4200
4241
|
value: link_url,
|
|
4201
4242
|
onChange: (e) => set_link_url(e.target.value),
|
|
4202
|
-
placeholder: "
|
|
4243
|
+
placeholder: t("rte.link_placeholder"),
|
|
4203
4244
|
className: "h-8 text-sm"
|
|
4204
4245
|
}
|
|
4205
4246
|
),
|
|
4206
4247
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
4207
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", onClick: handle_set_link, className: "flex-1", children: editor.isActive("link") ?
|
|
4248
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", onClick: handle_set_link, className: "flex-1", children: editor.isActive("link") ? t("rte.update_link") : t("rte.add_link") }),
|
|
4208
4249
|
editor.isActive("link") && /* @__PURE__ */ jsx(
|
|
4209
4250
|
Button,
|
|
4210
4251
|
{
|
|
4211
4252
|
size: "sm",
|
|
4212
4253
|
variant: "destructive",
|
|
4213
4254
|
onClick: handle_remove_link,
|
|
4214
|
-
children:
|
|
4255
|
+
children: t("rte.remove_link")
|
|
4215
4256
|
}
|
|
4216
4257
|
)
|
|
4217
4258
|
] })
|
|
@@ -4225,7 +4266,7 @@ var Toolbar = ({
|
|
|
4225
4266
|
ToolbarButton,
|
|
4226
4267
|
{
|
|
4227
4268
|
onClick: () => editor.chain().focus().unsetAllMarks().clearNodes().run(),
|
|
4228
|
-
tooltip:
|
|
4269
|
+
tooltip: t("rte.clear_formatting"),
|
|
4229
4270
|
children: /* @__PURE__ */ jsx(LuRemoveFormatting, { className: "h-4 w-4" })
|
|
4230
4271
|
},
|
|
4231
4272
|
"clear"
|
|
@@ -4239,7 +4280,7 @@ var Toolbar = ({
|
|
|
4239
4280
|
if (tb.text_color) {
|
|
4240
4281
|
items.push(
|
|
4241
4282
|
/* @__PURE__ */ jsxs(Popover, { open: text_color_open, onOpenChange: set_text_color_open, children: [
|
|
4242
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip:
|
|
4283
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t("rte.text_color"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
4243
4284
|
/* @__PURE__ */ jsx(LuPalette, { className: "h-4 w-4" }),
|
|
4244
4285
|
/* @__PURE__ */ jsx(
|
|
4245
4286
|
"div",
|
|
@@ -4282,7 +4323,7 @@ var Toolbar = ({
|
|
|
4282
4323
|
if (tb.highlight_color) {
|
|
4283
4324
|
items.push(
|
|
4284
4325
|
/* @__PURE__ */ jsxs(Popover, { open: highlight_color_open, onOpenChange: set_highlight_color_open, children: [
|
|
4285
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip:
|
|
4326
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t("rte.highlight_color"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
4286
4327
|
/* @__PURE__ */ jsx(LuHighlighter, { className: "h-4 w-4" }),
|
|
4287
4328
|
/* @__PURE__ */ jsx(
|
|
4288
4329
|
"div",
|
|
@@ -4325,7 +4366,7 @@ var Toolbar = ({
|
|
|
4325
4366
|
{
|
|
4326
4367
|
onClick: () => editor.chain().focus().setTextAlign("left").run(),
|
|
4327
4368
|
is_active: editor.isActive({ textAlign: "left" }),
|
|
4328
|
-
tooltip:
|
|
4369
|
+
tooltip: t("rte.align_left"),
|
|
4329
4370
|
children: /* @__PURE__ */ jsx(LuAlignLeft, { className: "h-4 w-4" })
|
|
4330
4371
|
},
|
|
4331
4372
|
"align-left"
|
|
@@ -4335,7 +4376,7 @@ var Toolbar = ({
|
|
|
4335
4376
|
{
|
|
4336
4377
|
onClick: () => editor.chain().focus().setTextAlign("center").run(),
|
|
4337
4378
|
is_active: editor.isActive({ textAlign: "center" }),
|
|
4338
|
-
tooltip:
|
|
4379
|
+
tooltip: t("rte.align_center"),
|
|
4339
4380
|
children: /* @__PURE__ */ jsx(LuAlignCenter, { className: "h-4 w-4" })
|
|
4340
4381
|
},
|
|
4341
4382
|
"align-center"
|
|
@@ -4345,7 +4386,7 @@ var Toolbar = ({
|
|
|
4345
4386
|
{
|
|
4346
4387
|
onClick: () => editor.chain().focus().setTextAlign("right").run(),
|
|
4347
4388
|
is_active: editor.isActive({ textAlign: "right" }),
|
|
4348
|
-
tooltip:
|
|
4389
|
+
tooltip: t("rte.align_right"),
|
|
4349
4390
|
children: /* @__PURE__ */ jsx(LuAlignRight, { className: "h-4 w-4" })
|
|
4350
4391
|
},
|
|
4351
4392
|
"align-right"
|
|
@@ -4355,7 +4396,7 @@ var Toolbar = ({
|
|
|
4355
4396
|
{
|
|
4356
4397
|
onClick: () => editor.chain().focus().setTextAlign("justify").run(),
|
|
4357
4398
|
is_active: editor.isActive({ textAlign: "justify" }),
|
|
4358
|
-
tooltip:
|
|
4399
|
+
tooltip: t("rte.justify"),
|
|
4359
4400
|
children: /* @__PURE__ */ jsx(LuAlignJustify, { className: "h-4 w-4" })
|
|
4360
4401
|
},
|
|
4361
4402
|
"align-justify"
|
|
@@ -4371,7 +4412,7 @@ var Toolbar = ({
|
|
|
4371
4412
|
{
|
|
4372
4413
|
onClick: () => editor.chain().focus().toggleBulletList().run(),
|
|
4373
4414
|
is_active: editor.isActive("bulletList"),
|
|
4374
|
-
tooltip:
|
|
4415
|
+
tooltip: t("rte.bullet_list"),
|
|
4375
4416
|
children: /* @__PURE__ */ jsx(LuList, { className: "h-4 w-4" })
|
|
4376
4417
|
},
|
|
4377
4418
|
"bullet"
|
|
@@ -4385,7 +4426,7 @@ var Toolbar = ({
|
|
|
4385
4426
|
{
|
|
4386
4427
|
onClick: () => editor.chain().focus().toggleOrderedList().run(),
|
|
4387
4428
|
is_active: editor.isActive("orderedList"),
|
|
4388
|
-
tooltip:
|
|
4429
|
+
tooltip: t("rte.ordered_list"),
|
|
4389
4430
|
children: /* @__PURE__ */ jsx(LuListOrdered, { className: "h-4 w-4" })
|
|
4390
4431
|
},
|
|
4391
4432
|
"ordered"
|
|
@@ -4399,7 +4440,7 @@ var Toolbar = ({
|
|
|
4399
4440
|
{
|
|
4400
4441
|
onClick: () => editor.chain().focus().toggleTaskList().run(),
|
|
4401
4442
|
is_active: editor.isActive("taskList"),
|
|
4402
|
-
tooltip:
|
|
4443
|
+
tooltip: t("rte.checklist"),
|
|
4403
4444
|
children: /* @__PURE__ */ jsx(LuListChecks, { className: "h-4 w-4" })
|
|
4404
4445
|
},
|
|
4405
4446
|
"task"
|
|
@@ -4421,7 +4462,7 @@ var Toolbar = ({
|
|
|
4421
4462
|
}
|
|
4422
4463
|
},
|
|
4423
4464
|
disabled: !editor.can().liftListItem("listItem") && !editor.can().liftListItem("taskItem"),
|
|
4424
|
-
tooltip:
|
|
4465
|
+
tooltip: t("rte.decrease_indent"),
|
|
4425
4466
|
children: /* @__PURE__ */ jsx(LuIndentDecrease, { className: "h-4 w-4" })
|
|
4426
4467
|
},
|
|
4427
4468
|
"indent-dec"
|
|
@@ -4437,7 +4478,7 @@ var Toolbar = ({
|
|
|
4437
4478
|
}
|
|
4438
4479
|
},
|
|
4439
4480
|
disabled: !editor.can().sinkListItem("listItem") && !editor.can().sinkListItem("taskItem"),
|
|
4440
|
-
tooltip:
|
|
4481
|
+
tooltip: t("rte.increase_indent"),
|
|
4441
4482
|
children: /* @__PURE__ */ jsx(LuIndentIncrease, { className: "h-4 w-4" })
|
|
4442
4483
|
},
|
|
4443
4484
|
"indent-inc"
|
|
@@ -4448,7 +4489,7 @@ var Toolbar = ({
|
|
|
4448
4489
|
const items = [];
|
|
4449
4490
|
if (tb.horizontal_rule) {
|
|
4450
4491
|
items.push(
|
|
4451
|
-
/* @__PURE__ */ jsx(ToolbarButton, { onClick: handle_hr_insert, tooltip:
|
|
4492
|
+
/* @__PURE__ */ jsx(ToolbarButton, { onClick: handle_hr_insert, tooltip: t("rte.horizontal_rule"), children: /* @__PURE__ */ jsx(RxDividerHorizontal, { className: "h-4 w-4" }) }, "hr")
|
|
4452
4493
|
);
|
|
4453
4494
|
}
|
|
4454
4495
|
if (tb.image) {
|
|
@@ -4457,7 +4498,7 @@ var Toolbar = ({
|
|
|
4457
4498
|
ToolbarButton,
|
|
4458
4499
|
{
|
|
4459
4500
|
onClick: () => image_input_ref.current?.click(),
|
|
4460
|
-
tooltip:
|
|
4501
|
+
tooltip: t("rte.insert_image"),
|
|
4461
4502
|
children: /* @__PURE__ */ jsx(LuImage, { className: "h-4 w-4" })
|
|
4462
4503
|
},
|
|
4463
4504
|
"image"
|
|
@@ -4471,14 +4512,14 @@ var Toolbar = ({
|
|
|
4471
4512
|
ToolbarButton,
|
|
4472
4513
|
{
|
|
4473
4514
|
is_active: editor.isActive("table"),
|
|
4474
|
-
tooltip:
|
|
4515
|
+
tooltip: t("rte.table"),
|
|
4475
4516
|
children: /* @__PURE__ */ jsx(LuTable, { className: "h-4 w-4" })
|
|
4476
4517
|
}
|
|
4477
4518
|
) }),
|
|
4478
4519
|
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-3", align: "start", children: editor.isActive("table") ? (
|
|
4479
4520
|
// Table editing controls when inside a table
|
|
4480
4521
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
4481
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium mb-1", children:
|
|
4522
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium mb-1", children: t("rte.table_operations") }),
|
|
4482
4523
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-1", children: [
|
|
4483
4524
|
/* @__PURE__ */ jsxs(
|
|
4484
4525
|
Button,
|
|
@@ -4489,7 +4530,7 @@ var Toolbar = ({
|
|
|
4489
4530
|
onClick: handle_add_row_before,
|
|
4490
4531
|
children: [
|
|
4491
4532
|
/* @__PURE__ */ jsx(LuTableRowsSplit, { className: "h-3 w-3 mr-1" }),
|
|
4492
|
-
|
|
4533
|
+
t("rte.add_row_above")
|
|
4493
4534
|
]
|
|
4494
4535
|
}
|
|
4495
4536
|
),
|
|
@@ -4502,7 +4543,7 @@ var Toolbar = ({
|
|
|
4502
4543
|
onClick: handle_add_row_after,
|
|
4503
4544
|
children: [
|
|
4504
4545
|
/* @__PURE__ */ jsx(LuTableRowsSplit, { className: "h-3 w-3 mr-1" }),
|
|
4505
|
-
|
|
4546
|
+
t("rte.add_row_below")
|
|
4506
4547
|
]
|
|
4507
4548
|
}
|
|
4508
4549
|
),
|
|
@@ -4515,7 +4556,7 @@ var Toolbar = ({
|
|
|
4515
4556
|
onClick: handle_add_col_before,
|
|
4516
4557
|
children: [
|
|
4517
4558
|
/* @__PURE__ */ jsx(LuTableColumnsSplit, { className: "h-3 w-3 mr-1" }),
|
|
4518
|
-
|
|
4559
|
+
t("rte.add_col_left")
|
|
4519
4560
|
]
|
|
4520
4561
|
}
|
|
4521
4562
|
),
|
|
@@ -4528,7 +4569,7 @@ var Toolbar = ({
|
|
|
4528
4569
|
onClick: handle_add_col_after,
|
|
4529
4570
|
children: [
|
|
4530
4571
|
/* @__PURE__ */ jsx(LuTableColumnsSplit, { className: "h-3 w-3 mr-1" }),
|
|
4531
|
-
|
|
4572
|
+
t("rte.add_col_right")
|
|
4532
4573
|
]
|
|
4533
4574
|
}
|
|
4534
4575
|
),
|
|
@@ -4541,7 +4582,7 @@ var Toolbar = ({
|
|
|
4541
4582
|
onClick: handle_delete_row,
|
|
4542
4583
|
children: [
|
|
4543
4584
|
/* @__PURE__ */ jsx(LuTrash2, { className: "h-3 w-3 mr-1" }),
|
|
4544
|
-
|
|
4585
|
+
t("rte.delete_row")
|
|
4545
4586
|
]
|
|
4546
4587
|
}
|
|
4547
4588
|
),
|
|
@@ -4554,7 +4595,7 @@ var Toolbar = ({
|
|
|
4554
4595
|
onClick: handle_delete_col,
|
|
4555
4596
|
children: [
|
|
4556
4597
|
/* @__PURE__ */ jsx(LuTrash2, { className: "h-3 w-3 mr-1" }),
|
|
4557
|
-
|
|
4598
|
+
t("rte.delete_col")
|
|
4558
4599
|
]
|
|
4559
4600
|
}
|
|
4560
4601
|
)
|
|
@@ -4568,7 +4609,7 @@ var Toolbar = ({
|
|
|
4568
4609
|
onClick: handle_delete_table,
|
|
4569
4610
|
children: [
|
|
4570
4611
|
/* @__PURE__ */ jsx(LuTrash2, { className: "h-3 w-3 mr-1" }),
|
|
4571
|
-
|
|
4612
|
+
t("rte.delete_table")
|
|
4572
4613
|
]
|
|
4573
4614
|
}
|
|
4574
4615
|
)
|
|
@@ -4576,7 +4617,7 @@ var Toolbar = ({
|
|
|
4576
4617
|
) : (
|
|
4577
4618
|
// Table size picker when not in a table
|
|
4578
4619
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
4579
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium mb-1", children:
|
|
4620
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium mb-1", children: t("rte.insert_table_heading") }),
|
|
4580
4621
|
/* @__PURE__ */ jsx("div", { className: "grid gap-0.5", children: Array.from({ length: 6 }).map((_, row_idx) => /* @__PURE__ */ jsx("div", { className: "flex gap-0.5", children: Array.from({ length: 6 }).map((_2, col_idx) => /* @__PURE__ */ jsx(
|
|
4581
4622
|
"div",
|
|
4582
4623
|
{
|
|
@@ -4590,9 +4631,9 @@ var Toolbar = ({
|
|
|
4590
4631
|
},
|
|
4591
4632
|
col_idx
|
|
4592
4633
|
)) }, row_idx)) }),
|
|
4593
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs text-center text-muted-foreground", children: hovered_cell ? `${hovered_cell.col} x ${hovered_cell.row}` :
|
|
4634
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-center text-muted-foreground", children: hovered_cell ? `${hovered_cell.col} x ${hovered_cell.row}` : t("rte.select_size") }),
|
|
4594
4635
|
/* @__PURE__ */ jsxs("div", { className: "border-t pt-2 mt-1", children: [
|
|
4595
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mb-2", children:
|
|
4636
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mb-2", children: t("rte.custom_size") }),
|
|
4596
4637
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4597
4638
|
/* @__PURE__ */ jsx(
|
|
4598
4639
|
Input,
|
|
@@ -4625,7 +4666,7 @@ var Toolbar = ({
|
|
|
4625
4666
|
onClick: () => handle_table_insert(table_rows, table_cols),
|
|
4626
4667
|
children: [
|
|
4627
4668
|
/* @__PURE__ */ jsx(LuGrid3X3, { className: "h-3 w-3 mr-1" }),
|
|
4628
|
-
|
|
4669
|
+
t("rte.insert_table")
|
|
4629
4670
|
]
|
|
4630
4671
|
}
|
|
4631
4672
|
)
|
|
@@ -4643,11 +4684,11 @@ var Toolbar = ({
|
|
|
4643
4684
|
if (tb.variables && variables.length > 0) {
|
|
4644
4685
|
items.push(
|
|
4645
4686
|
/* @__PURE__ */ jsxs(Popover, { open: variables_menu_open, onOpenChange: set_variables_menu_open, children: [
|
|
4646
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip:
|
|
4687
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t("rte.insert_variable"), children: /* @__PURE__ */ jsx(LuVariable, { className: "h-4 w-4" }) }) }),
|
|
4647
4688
|
/* @__PURE__ */ jsx(PopoverContent, { className: "w-64 p-0", align: "start", children: /* @__PURE__ */ jsxs(Command, { children: [
|
|
4648
|
-
/* @__PURE__ */ jsx(CommandInput, { placeholder:
|
|
4689
|
+
/* @__PURE__ */ jsx(CommandInput, { placeholder: t("rte.search_variables"), className: "h-8 text-xs" }),
|
|
4649
4690
|
/* @__PURE__ */ jsxs(CommandList, { children: [
|
|
4650
|
-
/* @__PURE__ */ jsx(CommandEmpty, { children:
|
|
4691
|
+
/* @__PURE__ */ jsx(CommandEmpty, { children: t("rte.no_variables") }),
|
|
4651
4692
|
/* @__PURE__ */ jsx(CommandGroup, { children: variables.map((variable) => /* @__PURE__ */ jsx(
|
|
4652
4693
|
CommandItem,
|
|
4653
4694
|
{
|
|
@@ -4672,7 +4713,7 @@ var Toolbar = ({
|
|
|
4672
4713
|
ToolbarButton,
|
|
4673
4714
|
{
|
|
4674
4715
|
onClick: () => file_input_ref.current?.click(),
|
|
4675
|
-
tooltip:
|
|
4716
|
+
tooltip: t("rte.attach_file"),
|
|
4676
4717
|
children: /* @__PURE__ */ jsx(LuPaperclip, { className: "h-4 w-4" })
|
|
4677
4718
|
},
|
|
4678
4719
|
"attach"
|
|
@@ -4944,7 +4985,6 @@ var VariableExtension = Node.create({
|
|
|
4944
4985
|
};
|
|
4945
4986
|
}
|
|
4946
4987
|
});
|
|
4947
|
-
var t6 = createPackageT("hazo_ui", en_default);
|
|
4948
4988
|
function debounce_fn(func, wait) {
|
|
4949
4989
|
let timeout_id = null;
|
|
4950
4990
|
return (output) => {
|
|
@@ -4970,7 +5010,8 @@ var HazoUiRte = ({
|
|
|
4970
5010
|
toolbar,
|
|
4971
5011
|
font_families
|
|
4972
5012
|
}) => {
|
|
4973
|
-
const
|
|
5013
|
+
const t = useHazoUiT();
|
|
5014
|
+
const resolved_placeholder = placeholder ?? t("rte.placeholder");
|
|
4974
5015
|
const [attachments, set_attachments] = React27.useState(
|
|
4975
5016
|
initial_attachments
|
|
4976
5017
|
);
|
|
@@ -5164,9 +5205,9 @@ var HazoUiRte = ({
|
|
|
5164
5205
|
}
|
|
5165
5206
|
),
|
|
5166
5207
|
show_output_viewer && editor && /* @__PURE__ */ jsx("div", { className: "cls_rte_tabs border-b border-border px-2 pt-2", children: /* @__PURE__ */ jsx(Tabs, { value: active_tab, onValueChange: (v) => set_active_tab(v), children: /* @__PURE__ */ jsxs(TabsList, { className: "h-9", children: [
|
|
5167
|
-
/* @__PURE__ */ jsx(TabsTrigger, { value: "html", className: "text-sm", children: "
|
|
5168
|
-
/* @__PURE__ */ jsx(TabsTrigger, { value: "plain_text", className: "text-sm", children: "
|
|
5169
|
-
/* @__PURE__ */ jsx(TabsTrigger, { value: "raw_html", className: "text-sm", children: "
|
|
5208
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "html", className: "text-sm", children: t("rte.tab_html") }),
|
|
5209
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "plain_text", className: "text-sm", children: t("rte.tab_plain_text") }),
|
|
5210
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "raw_html", className: "text-sm", children: t("rte.tab_raw_html") })
|
|
5170
5211
|
] }) }) }),
|
|
5171
5212
|
/* @__PURE__ */ jsxs("div", { style: { minHeight: min_height, maxHeight: max_height }, className: "overflow-auto", children: [
|
|
5172
5213
|
active_tab === "html" && /* @__PURE__ */ jsx(
|
|
@@ -5179,8 +5220,8 @@ var HazoUiRte = ({
|
|
|
5179
5220
|
)
|
|
5180
5221
|
}
|
|
5181
5222
|
),
|
|
5182
|
-
active_tab === "plain_text" && /* @__PURE__ */ jsx("pre", { className: "cls_rte_plain_text p-4 text-sm whitespace-pre-wrap font-mono h-full", children: editor?.getText() || "
|
|
5183
|
-
active_tab === "raw_html" && /* @__PURE__ */ jsx("pre", { className: "cls_rte_raw_html p-4 text-xs whitespace-pre-wrap font-mono text-muted-foreground h-full", children: format_html(editor?.getHTML() || "") || "
|
|
5223
|
+
active_tab === "plain_text" && /* @__PURE__ */ jsx("pre", { className: "cls_rte_plain_text p-4 text-sm whitespace-pre-wrap font-mono h-full", children: editor?.getText() || t("rte.empty_content") }),
|
|
5224
|
+
active_tab === "raw_html" && /* @__PURE__ */ jsx("pre", { className: "cls_rte_raw_html p-4 text-xs whitespace-pre-wrap font-mono text-muted-foreground h-full", children: format_html(editor?.getHTML() || "") || t("rte.empty_content") })
|
|
5184
5225
|
] }),
|
|
5185
5226
|
/* @__PURE__ */ jsx(
|
|
5186
5227
|
AttachmentsList,
|
|
@@ -5195,7 +5236,6 @@ var HazoUiRte = ({
|
|
|
5195
5236
|
);
|
|
5196
5237
|
};
|
|
5197
5238
|
HazoUiRte.displayName = "HazoUiRte";
|
|
5198
|
-
var t7 = createPackageT("hazo_ui", en_default);
|
|
5199
5239
|
function CanvasTextToolbar({
|
|
5200
5240
|
bold,
|
|
5201
5241
|
italic,
|
|
@@ -5216,6 +5256,7 @@ function CanvasTextToolbar({
|
|
|
5216
5256
|
className,
|
|
5217
5257
|
style
|
|
5218
5258
|
}) {
|
|
5259
|
+
const t = useHazoUiT();
|
|
5219
5260
|
return /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 300, children: /* @__PURE__ */ jsxs(
|
|
5220
5261
|
"div",
|
|
5221
5262
|
{
|
|
@@ -5226,14 +5267,14 @@ function CanvasTextToolbar({
|
|
|
5226
5267
|
),
|
|
5227
5268
|
style,
|
|
5228
5269
|
children: [
|
|
5229
|
-
/* @__PURE__ */ jsx(ToolbarButton, { is_active: bold, onClick: onBold, tooltip:
|
|
5230
|
-
/* @__PURE__ */ jsx(ToolbarButton, { is_active: italic, onClick: onItalic, tooltip:
|
|
5270
|
+
/* @__PURE__ */ jsx(ToolbarButton, { is_active: bold, onClick: onBold, tooltip: t("canvas_toolbar.bold"), children: /* @__PURE__ */ jsx(LuBold, { className: "h-4 w-4" }) }),
|
|
5271
|
+
/* @__PURE__ */ jsx(ToolbarButton, { is_active: italic, onClick: onItalic, tooltip: t("canvas_toolbar.italic"), children: /* @__PURE__ */ jsx(LuItalic, { className: "h-4 w-4" }) }),
|
|
5231
5272
|
/* @__PURE__ */ jsx(
|
|
5232
5273
|
ToolbarButton,
|
|
5233
5274
|
{
|
|
5234
5275
|
is_active: underline,
|
|
5235
5276
|
onClick: onUnderline,
|
|
5236
|
-
tooltip:
|
|
5277
|
+
tooltip: t("canvas_toolbar.underline"),
|
|
5237
5278
|
children: /* @__PURE__ */ jsx(LuUnderline, { className: "h-4 w-4" })
|
|
5238
5279
|
}
|
|
5239
5280
|
),
|
|
@@ -5243,7 +5284,7 @@ function CanvasTextToolbar({
|
|
|
5243
5284
|
{
|
|
5244
5285
|
is_active: align === "left",
|
|
5245
5286
|
onClick: () => onAlign?.("left"),
|
|
5246
|
-
tooltip:
|
|
5287
|
+
tooltip: t("canvas_toolbar.align_left"),
|
|
5247
5288
|
children: /* @__PURE__ */ jsx(LuAlignLeft, { className: "h-4 w-4" })
|
|
5248
5289
|
}
|
|
5249
5290
|
),
|
|
@@ -5252,7 +5293,7 @@ function CanvasTextToolbar({
|
|
|
5252
5293
|
{
|
|
5253
5294
|
is_active: align === "center",
|
|
5254
5295
|
onClick: () => onAlign?.("center"),
|
|
5255
|
-
tooltip:
|
|
5296
|
+
tooltip: t("canvas_toolbar.align_center"),
|
|
5256
5297
|
children: /* @__PURE__ */ jsx(LuAlignCenter, { className: "h-4 w-4" })
|
|
5257
5298
|
}
|
|
5258
5299
|
),
|
|
@@ -5261,7 +5302,7 @@ function CanvasTextToolbar({
|
|
|
5261
5302
|
{
|
|
5262
5303
|
is_active: align === "right",
|
|
5263
5304
|
onClick: () => onAlign?.("right"),
|
|
5264
|
-
tooltip:
|
|
5305
|
+
tooltip: t("canvas_toolbar.align_right"),
|
|
5265
5306
|
children: /* @__PURE__ */ jsx(LuAlignRight, { className: "h-4 w-4" })
|
|
5266
5307
|
}
|
|
5267
5308
|
),
|
|
@@ -5270,7 +5311,7 @@ function CanvasTextToolbar({
|
|
|
5270
5311
|
"label",
|
|
5271
5312
|
{
|
|
5272
5313
|
className: "relative flex h-8 w-8 cursor-pointer items-center justify-center rounded-md hover:bg-accent",
|
|
5273
|
-
title:
|
|
5314
|
+
title: t("canvas_toolbar.text_color"),
|
|
5274
5315
|
children: [
|
|
5275
5316
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
5276
5317
|
/* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-muted-foreground", children: "A" }),
|
|
@@ -5300,7 +5341,7 @@ function CanvasTextToolbar({
|
|
|
5300
5341
|
{
|
|
5301
5342
|
is_active: verticalAlign === "top",
|
|
5302
5343
|
onClick: () => onVerticalAlign?.("top"),
|
|
5303
|
-
tooltip:
|
|
5344
|
+
tooltip: t("canvas_toolbar.align_top"),
|
|
5304
5345
|
children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyStart, { className: "h-4 w-4" })
|
|
5305
5346
|
}
|
|
5306
5347
|
),
|
|
@@ -5309,7 +5350,7 @@ function CanvasTextToolbar({
|
|
|
5309
5350
|
{
|
|
5310
5351
|
is_active: verticalAlign === "middle",
|
|
5311
5352
|
onClick: () => onVerticalAlign?.("middle"),
|
|
5312
|
-
tooltip:
|
|
5353
|
+
tooltip: t("canvas_toolbar.align_middle"),
|
|
5313
5354
|
children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyCenter, { className: "h-4 w-4" })
|
|
5314
5355
|
}
|
|
5315
5356
|
),
|
|
@@ -5318,7 +5359,7 @@ function CanvasTextToolbar({
|
|
|
5318
5359
|
{
|
|
5319
5360
|
is_active: verticalAlign === "bottom",
|
|
5320
5361
|
onClick: () => onVerticalAlign?.("bottom"),
|
|
5321
|
-
tooltip:
|
|
5362
|
+
tooltip: t("canvas_toolbar.align_bottom"),
|
|
5322
5363
|
children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyEnd, { className: "h-4 w-4" })
|
|
5323
5364
|
}
|
|
5324
5365
|
),
|
|
@@ -5329,11 +5370,11 @@ function CanvasTextToolbar({
|
|
|
5329
5370
|
value: font,
|
|
5330
5371
|
onChange: (e) => onFont?.(e.target.value),
|
|
5331
5372
|
className: "h-8 text-xs rounded-md border border-border bg-background px-1 text-foreground focus:outline-none",
|
|
5332
|
-
title:
|
|
5373
|
+
title: t("canvas_toolbar.font_family"),
|
|
5333
5374
|
children: [
|
|
5334
|
-
/* @__PURE__ */ jsx("option", { value: "sans-serif", children: "
|
|
5335
|
-
/* @__PURE__ */ jsx("option", { value: "serif", children: "
|
|
5336
|
-
/* @__PURE__ */ jsx("option", { value: "monospace", children: "
|
|
5375
|
+
/* @__PURE__ */ jsx("option", { value: "sans-serif", children: t("canvas_toolbar.font_sans") }),
|
|
5376
|
+
/* @__PURE__ */ jsx("option", { value: "serif", children: t("canvas_toolbar.font_serif") }),
|
|
5377
|
+
/* @__PURE__ */ jsx("option", { value: "monospace", children: t("canvas_toolbar.font_mono") }),
|
|
5337
5378
|
/* @__PURE__ */ jsx("option", { value: "Arial", children: "Arial" }),
|
|
5338
5379
|
/* @__PURE__ */ jsx("option", { value: "Georgia", children: "Georgia" }),
|
|
5339
5380
|
/* @__PURE__ */ jsx("option", { value: "Courier New", children: "Courier" })
|
|
@@ -5341,12 +5382,11 @@ function CanvasTextToolbar({
|
|
|
5341
5382
|
}
|
|
5342
5383
|
),
|
|
5343
5384
|
/* @__PURE__ */ jsx("div", { className: "mx-1 h-6 w-px bg-border" }),
|
|
5344
|
-
/* @__PURE__ */ jsx(ToolbarButton, { is_active: bullet, onClick: onBullet, tooltip:
|
|
5385
|
+
/* @__PURE__ */ jsx(ToolbarButton, { is_active: bullet, onClick: onBullet, tooltip: t("canvas_toolbar.bullet_list"), children: /* @__PURE__ */ jsx(LuList, { className: "h-4 w-4" }) })
|
|
5345
5386
|
]
|
|
5346
5387
|
}
|
|
5347
5388
|
) });
|
|
5348
5389
|
}
|
|
5349
|
-
var t8 = createPackageT("hazo_ui", en_default);
|
|
5350
5390
|
var MdEditorLazy = lazy(() => import('@uiw/react-md-editor'));
|
|
5351
5391
|
var EDITOR_TEXTAREA_SELECTOR = ".w-md-editor-text-input";
|
|
5352
5392
|
function MarkdownEditor({
|
|
@@ -5363,6 +5403,7 @@ function MarkdownEditor({
|
|
|
5363
5403
|
renderPreview,
|
|
5364
5404
|
showPreview = true
|
|
5365
5405
|
}) {
|
|
5406
|
+
const t = useHazoUiT();
|
|
5366
5407
|
const [mounted, setMounted] = useState(false);
|
|
5367
5408
|
useEffect(() => setMounted(true), []);
|
|
5368
5409
|
const valueRef = useRef(value);
|
|
@@ -5430,19 +5471,19 @@ function MarkdownEditor({
|
|
|
5430
5471
|
const current = valueRef.current;
|
|
5431
5472
|
const before = current.slice(0, start);
|
|
5432
5473
|
const after = current.slice(end);
|
|
5433
|
-
onChange(before + "![
|
|
5474
|
+
onChange(before + "![" + t("markdown.upload_placeholder") + "]()" + after);
|
|
5434
5475
|
setUploading(true);
|
|
5435
5476
|
setError("");
|
|
5436
5477
|
try {
|
|
5437
5478
|
const url = await onImageUpload(file);
|
|
5438
5479
|
if (!url) {
|
|
5439
|
-
setError(
|
|
5480
|
+
setError(t("markdown.upload_failed"));
|
|
5440
5481
|
onChange(before + after);
|
|
5441
5482
|
return;
|
|
5442
5483
|
}
|
|
5443
5484
|
onChange(before + `` + after);
|
|
5444
5485
|
} catch {
|
|
5445
|
-
setError(
|
|
5486
|
+
setError(t("markdown.upload_failed"));
|
|
5446
5487
|
onChange(before + after);
|
|
5447
5488
|
} finally {
|
|
5448
5489
|
setUploading(false);
|
|
@@ -5466,7 +5507,7 @@ function MarkdownEditor({
|
|
|
5466
5507
|
{
|
|
5467
5508
|
className: "flex items-center justify-center rounded-md border border-border bg-muted/30 text-sm text-muted-foreground",
|
|
5468
5509
|
style: { height },
|
|
5469
|
-
children:
|
|
5510
|
+
children: t("markdown.loading_editor")
|
|
5470
5511
|
}
|
|
5471
5512
|
),
|
|
5472
5513
|
children: /* @__PURE__ */ jsx(
|
|
@@ -5478,7 +5519,7 @@ function MarkdownEditor({
|
|
|
5478
5519
|
preview: effectivePreview,
|
|
5479
5520
|
visibleDragbar: false,
|
|
5480
5521
|
commands: editorCommands,
|
|
5481
|
-
textareaProps: { placeholder: placeholder ??
|
|
5522
|
+
textareaProps: { placeholder: placeholder ?? t("markdown.placeholder"), onPaste: handlePaste }
|
|
5482
5523
|
}
|
|
5483
5524
|
)
|
|
5484
5525
|
}
|
|
@@ -5487,7 +5528,7 @@ function MarkdownEditor({
|
|
|
5487
5528
|
{
|
|
5488
5529
|
className: "flex items-center justify-center rounded-md border border-border bg-muted/30 text-sm text-muted-foreground",
|
|
5489
5530
|
style: { height },
|
|
5490
|
-
children:
|
|
5531
|
+
children: t("markdown.loading_editor")
|
|
5491
5532
|
}
|
|
5492
5533
|
) }),
|
|
5493
5534
|
useCustomPreview && showPreview && /* @__PURE__ */ jsx(
|
|
@@ -5501,7 +5542,7 @@ function MarkdownEditor({
|
|
|
5501
5542
|
]
|
|
5502
5543
|
}
|
|
5503
5544
|
),
|
|
5504
|
-
uploading && /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-muted-foreground", children:
|
|
5545
|
+
uploading && /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: t("markdown.uploading_image") }),
|
|
5505
5546
|
error && /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-destructive", children: error })
|
|
5506
5547
|
] });
|
|
5507
5548
|
}
|
|
@@ -6200,7 +6241,6 @@ var Text = Node.create({
|
|
|
6200
6241
|
renderMarkdown: (node) => node.text || ""
|
|
6201
6242
|
});
|
|
6202
6243
|
var index_default3 = Text;
|
|
6203
|
-
var t9 = createPackageT("hazo_ui", en_default);
|
|
6204
6244
|
var SingleLineDocument = index_default.extend({
|
|
6205
6245
|
content: "paragraph"
|
|
6206
6246
|
});
|
|
@@ -6249,7 +6289,8 @@ var HazoUiTextbox = ({
|
|
|
6249
6289
|
on_command_change,
|
|
6250
6290
|
on_command_remove
|
|
6251
6291
|
}) => {
|
|
6252
|
-
const
|
|
6292
|
+
const t = useHazoUiT();
|
|
6293
|
+
const resolved_placeholder = placeholder ?? t("textbox.placeholder");
|
|
6253
6294
|
const generated_instance_id = React27.useId();
|
|
6254
6295
|
const instance_id = provided_instance_id || generated_instance_id;
|
|
6255
6296
|
const [suggestion_state, set_suggestion_state] = React27.useState(null);
|
|
@@ -6661,7 +6702,7 @@ var HazoUiTextbox = ({
|
|
|
6661
6702
|
edit_selected_index === edit_commands.length && "bg-destructive/10"
|
|
6662
6703
|
),
|
|
6663
6704
|
onClick: handle_command_remove,
|
|
6664
|
-
children: /* @__PURE__ */ jsx("span", { children:
|
|
6705
|
+
children: /* @__PURE__ */ jsx("span", { children: t("common.remove") })
|
|
6665
6706
|
}
|
|
6666
6707
|
)
|
|
6667
6708
|
] })
|
|
@@ -6739,7 +6780,6 @@ var HardBreak = Node.create({
|
|
|
6739
6780
|
}
|
|
6740
6781
|
});
|
|
6741
6782
|
var index_default4 = HardBreak;
|
|
6742
|
-
var t10 = createPackageT("hazo_ui", en_default);
|
|
6743
6783
|
var get_editor_output2 = (editor) => {
|
|
6744
6784
|
if (!editor) {
|
|
6745
6785
|
return { plain_text: "", display_text: "", commands: [] };
|
|
@@ -6808,7 +6848,8 @@ var HazoUiTextarea = ({
|
|
|
6808
6848
|
on_command_change,
|
|
6809
6849
|
on_command_remove
|
|
6810
6850
|
}) => {
|
|
6811
|
-
const
|
|
6851
|
+
const t = useHazoUiT();
|
|
6852
|
+
const resolved_placeholder = placeholder ?? t("textarea.placeholder");
|
|
6812
6853
|
const generated_instance_id = React27.useId();
|
|
6813
6854
|
const instance_id = provided_instance_id || generated_instance_id;
|
|
6814
6855
|
const [suggestion_state, set_suggestion_state] = React27.useState(null);
|
|
@@ -7233,7 +7274,7 @@ var HazoUiTextarea = ({
|
|
|
7233
7274
|
backgroundColor: edit_selected_index === edit_commands.length ? "rgba(239, 68, 68, 0.1)" : "inherit"
|
|
7234
7275
|
},
|
|
7235
7276
|
onClick: handle_command_remove,
|
|
7236
|
-
children: /* @__PURE__ */ jsx("span", { children:
|
|
7277
|
+
children: /* @__PURE__ */ jsx("span", { children: t("common.remove") })
|
|
7237
7278
|
}
|
|
7238
7279
|
)
|
|
7239
7280
|
] })
|
|
@@ -7293,7 +7334,6 @@ function resolve_animation_classes(open_anim = "zoom", close_anim = "zoom") {
|
|
|
7293
7334
|
const close_classes = close_anim in ANIMATION_PRESETS ? ANIMATION_PRESETS[close_anim].close : close_anim;
|
|
7294
7335
|
return `${open_classes} ${close_classes}`;
|
|
7295
7336
|
}
|
|
7296
|
-
var t11 = createPackageT("hazo_ui", en_default);
|
|
7297
7337
|
var VARIANT_PRESETS = {
|
|
7298
7338
|
info: {
|
|
7299
7339
|
header_background_color: "var(--dialog-info-bg)",
|
|
@@ -7380,6 +7420,7 @@ function HazoUiDialog({
|
|
|
7380
7420
|
showCloseButton = true,
|
|
7381
7421
|
kind
|
|
7382
7422
|
}) {
|
|
7423
|
+
const t = useHazoUiT();
|
|
7383
7424
|
const config = get_hazo_ui_config();
|
|
7384
7425
|
const is_confirm_kind = kind === "confirm";
|
|
7385
7426
|
const is_status_kind = kind === "status";
|
|
@@ -7387,11 +7428,11 @@ function HazoUiDialog({
|
|
|
7387
7428
|
const cancel_ref = React27.useRef(null);
|
|
7388
7429
|
const variant_preset = variant !== "default" ? VARIANT_PRESETS[variant] : is_status_kind || is_confirm_kind ? NEUTRAL_VARIANT_PRESET : void 0;
|
|
7389
7430
|
const resolved_action_button_variant = actionButtonVariant ?? variant_preset?.action_button_variant ?? "default";
|
|
7390
|
-
const resolved_title = title ??
|
|
7391
|
-
const resolved_cancel_text = cancelButtonText ??
|
|
7431
|
+
const resolved_title = title ?? t("dialog.default_title");
|
|
7432
|
+
const resolved_cancel_text = cancelButtonText ?? t("dialog.cancel");
|
|
7392
7433
|
const showCancelButton = showCancelButtonProp ?? (is_status_kind ? false : true);
|
|
7393
7434
|
const closeOnConfirm = closeOnConfirmProp ?? (is_status_kind || is_confirm_kind ? true : false);
|
|
7394
|
-
const actionButtonText = actionButtonTextProp ?? (is_status_kind ?
|
|
7435
|
+
const actionButtonText = actionButtonTextProp ?? (is_status_kind ? t("dialog.ok") : is_confirm_kind ? showCancelButton ? t("dialog.confirm") : t("dialog.ok") : t("dialog.confirm"));
|
|
7395
7436
|
const actionButtonLoading = actionButtonLoadingProp ?? (is_confirm_kind ? internal_confirm_loading : false);
|
|
7396
7437
|
const handleConfirm = () => {
|
|
7397
7438
|
if (is_confirm_kind) {
|
|
@@ -7718,7 +7759,7 @@ function HazoUiDialog({
|
|
|
7718
7759
|
style: headerBar ? { color: "var(--dialog-header-bar-fg)" } : finalHeaderTextColor ? { color: finalHeaderTextColor } : void 0,
|
|
7719
7760
|
children: [
|
|
7720
7761
|
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
7721
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children:
|
|
7762
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: t("dialog.close") })
|
|
7722
7763
|
]
|
|
7723
7764
|
}
|
|
7724
7765
|
)
|
|
@@ -7727,7 +7768,6 @@ function HazoUiDialog({
|
|
|
7727
7768
|
)
|
|
7728
7769
|
] }) });
|
|
7729
7770
|
}
|
|
7730
|
-
var t12 = createPackageT("hazo_ui", en_default);
|
|
7731
7771
|
function HazoUiConfirmDialog({
|
|
7732
7772
|
open,
|
|
7733
7773
|
onOpenChange,
|
|
@@ -7736,7 +7776,7 @@ function HazoUiConfirmDialog({
|
|
|
7736
7776
|
children,
|
|
7737
7777
|
variant = "default",
|
|
7738
7778
|
confirmLabel,
|
|
7739
|
-
cancelLabel
|
|
7779
|
+
cancelLabel: cancelLabelProp,
|
|
7740
7780
|
showCancelButton = true,
|
|
7741
7781
|
onConfirm,
|
|
7742
7782
|
onCancel,
|
|
@@ -7747,6 +7787,8 @@ function HazoUiConfirmDialog({
|
|
|
7747
7787
|
openAnimation = "zoom",
|
|
7748
7788
|
closeAnimation = "zoom"
|
|
7749
7789
|
}) {
|
|
7790
|
+
const t = useHazoUiT();
|
|
7791
|
+
const cancelLabel = cancelLabelProp ?? t("confirm.cancel");
|
|
7750
7792
|
const resolved_accent_color = confirmButtonColor ?? accentColor;
|
|
7751
7793
|
return /* @__PURE__ */ jsx(
|
|
7752
7794
|
HazoUiDialog,
|
|
@@ -7785,7 +7827,6 @@ var Slider = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
7785
7827
|
}
|
|
7786
7828
|
));
|
|
7787
7829
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
7788
|
-
var t13 = createPackageT("hazo_ui", en_default);
|
|
7789
7830
|
async function getCroppedImg(imageSrc, areaPixels, outputSize, quality) {
|
|
7790
7831
|
const img = await new Promise((resolve, reject) => {
|
|
7791
7832
|
const image = new Image();
|
|
@@ -7834,12 +7875,13 @@ var HazoUiImageCropper = React27.forwardRef(function HazoUiImageCropper2({
|
|
|
7834
7875
|
zoomLabel,
|
|
7835
7876
|
className
|
|
7836
7877
|
}, ref) {
|
|
7878
|
+
const t = useHazoUiT();
|
|
7837
7879
|
const [crop, set_crop] = React27.useState({
|
|
7838
7880
|
x: 0,
|
|
7839
7881
|
y: 0
|
|
7840
7882
|
});
|
|
7841
7883
|
const [zoom, set_zoom] = React27.useState(1);
|
|
7842
|
-
const resolved_zoom_label = zoomLabel ??
|
|
7884
|
+
const resolved_zoom_label = zoomLabel ?? t("cropper.zoom");
|
|
7843
7885
|
const cropped_area_pixels_ref = React27.useRef(null);
|
|
7844
7886
|
const handle_crop_complete = React27.useCallback(
|
|
7845
7887
|
(_croppedArea, croppedAreaPixels) => {
|
|
@@ -7914,7 +7956,6 @@ var HazoUiImageCropper = React27.forwardRef(function HazoUiImageCropper2({
|
|
|
7914
7956
|
] });
|
|
7915
7957
|
});
|
|
7916
7958
|
HazoUiImageCropper.displayName = "HazoUiImageCropper";
|
|
7917
|
-
var t14 = createPackageT("hazo_ui", en_default);
|
|
7918
7959
|
function HazoUiImageCropperDialog({
|
|
7919
7960
|
open,
|
|
7920
7961
|
onOpenChange,
|
|
@@ -7928,10 +7969,11 @@ function HazoUiImageCropperDialog({
|
|
|
7928
7969
|
outputSize = 512,
|
|
7929
7970
|
quality = 0.9
|
|
7930
7971
|
}) {
|
|
7931
|
-
const
|
|
7932
|
-
const
|
|
7933
|
-
const
|
|
7934
|
-
const
|
|
7972
|
+
const t = useHazoUiT();
|
|
7973
|
+
const resolved_title = title ?? t("cropper.title");
|
|
7974
|
+
const resolved_confirm_label = confirmLabel ?? t("cropper.save");
|
|
7975
|
+
const resolved_cancel_label = cancelLabel ?? t("cropper.cancel");
|
|
7976
|
+
const resolved_zoom_label = zoomLabel ?? t("cropper.zoom");
|
|
7935
7977
|
const cropper_ref = React27.useRef(null);
|
|
7936
7978
|
const [image_src, set_image_src] = React27.useState(null);
|
|
7937
7979
|
const [is_confirming, set_is_confirming] = React27.useState(false);
|
|
@@ -8417,16 +8459,16 @@ var CardFooter = React27.forwardRef(
|
|
|
8417
8459
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
8418
8460
|
);
|
|
8419
8461
|
CardFooter.displayName = "CardFooter";
|
|
8420
|
-
var t15 = createPackageT("hazo_ui", en_default);
|
|
8421
8462
|
function Spinner({ className, size = "md" }) {
|
|
8463
|
+
const t = useHazoUiT();
|
|
8422
8464
|
const sizeClasses = { sm: "h-4 w-4", md: "h-8 w-8", lg: "h-12 w-12" };
|
|
8423
8465
|
return /* @__PURE__ */ jsx(
|
|
8424
8466
|
"div",
|
|
8425
8467
|
{
|
|
8426
8468
|
className: cn("animate-spin rounded-full border-2 border-current border-t-transparent text-primary", sizeClasses[size], className),
|
|
8427
8469
|
role: "status",
|
|
8428
|
-
"aria-label":
|
|
8429
|
-
children: /* @__PURE__ */ jsx("span", { className: "sr-only", children:
|
|
8470
|
+
"aria-label": t("spinner.loading"),
|
|
8471
|
+
children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: t("spinner.loading_text") })
|
|
8430
8472
|
}
|
|
8431
8473
|
);
|
|
8432
8474
|
}
|
|
@@ -8562,7 +8604,6 @@ var InputAffix = React27.forwardRef(
|
|
|
8562
8604
|
}
|
|
8563
8605
|
);
|
|
8564
8606
|
InputAffix.displayName = "InputAffix";
|
|
8565
|
-
var t16 = createPackageT("hazo_ui", en_default);
|
|
8566
8607
|
var SkeletonBase = React27.forwardRef(
|
|
8567
8608
|
({ className, ...rest }, ref) => /* @__PURE__ */ jsx(
|
|
8568
8609
|
"div",
|
|
@@ -8605,7 +8646,8 @@ function SkeletonRect({ width = "100%", height = 96, radius = 6, className }) {
|
|
|
8605
8646
|
);
|
|
8606
8647
|
}
|
|
8607
8648
|
function SkeletonGroup({ label, children, className, ...rest }) {
|
|
8608
|
-
const
|
|
8649
|
+
const t = useHazoUiT();
|
|
8650
|
+
const resolved_label = label ?? t("skeleton.loading_content");
|
|
8609
8651
|
return /* @__PURE__ */ jsxs(
|
|
8610
8652
|
"div",
|
|
8611
8653
|
{
|
|
@@ -8651,7 +8693,6 @@ function EmptyState({
|
|
|
8651
8693
|
}
|
|
8652
8694
|
);
|
|
8653
8695
|
}
|
|
8654
|
-
var t17 = createPackageT("hazo_ui", en_default);
|
|
8655
8696
|
function ErrorBanner({
|
|
8656
8697
|
severity = "error",
|
|
8657
8698
|
title,
|
|
@@ -8661,6 +8702,7 @@ function ErrorBanner({
|
|
|
8661
8702
|
onDismiss,
|
|
8662
8703
|
className
|
|
8663
8704
|
}) {
|
|
8705
|
+
const t = useHazoUiT();
|
|
8664
8706
|
const palette = severity === "warning" ? "border-amber-300 bg-amber-50 text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-100" : "border-destructive/40 bg-destructive/10 text-destructive-foreground";
|
|
8665
8707
|
const iconColor = severity === "warning" ? "text-amber-600" : "text-destructive";
|
|
8666
8708
|
const resolvedIcon = icon ?? (severity === "warning" ? /* @__PURE__ */ jsx(AlertTriangle, { className: cn("h-5 w-5", iconColor), "aria-hidden": "true" }) : /* @__PURE__ */ jsx(OctagonAlert, { className: cn("h-5 w-5", iconColor), "aria-hidden": "true" }));
|
|
@@ -8686,7 +8728,7 @@ function ErrorBanner({
|
|
|
8686
8728
|
{
|
|
8687
8729
|
type: "button",
|
|
8688
8730
|
onClick: onDismiss,
|
|
8689
|
-
"aria-label":
|
|
8731
|
+
"aria-label": t("error.dismiss"),
|
|
8690
8732
|
className: "flex-shrink-0 rounded p-1 hover:bg-black/5 focus:outline-none focus:ring-2 focus:ring-offset-2 dark:hover:bg-white/5",
|
|
8691
8733
|
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
8692
8734
|
}
|
|
@@ -8695,7 +8737,6 @@ function ErrorBanner({
|
|
|
8695
8737
|
}
|
|
8696
8738
|
);
|
|
8697
8739
|
}
|
|
8698
|
-
var t18 = createPackageT("hazo_ui", en_default);
|
|
8699
8740
|
function ErrorPage({
|
|
8700
8741
|
title,
|
|
8701
8742
|
description,
|
|
@@ -8705,7 +8746,8 @@ function ErrorPage({
|
|
|
8705
8746
|
illustration,
|
|
8706
8747
|
className
|
|
8707
8748
|
}) {
|
|
8708
|
-
const
|
|
8749
|
+
const t = useHazoUiT();
|
|
8750
|
+
const resolved_title = title ?? t("error.something_went_wrong");
|
|
8709
8751
|
return /* @__PURE__ */ jsxs(
|
|
8710
8752
|
"div",
|
|
8711
8753
|
{
|
|
@@ -8721,7 +8763,7 @@ function ErrorPage({
|
|
|
8721
8763
|
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-semibold text-foreground", children: resolved_title }),
|
|
8722
8764
|
description ? /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children: description }) : null,
|
|
8723
8765
|
correlationId ? /* @__PURE__ */ jsxs("div", { className: "w-full rounded-md border bg-muted/40 px-3 py-2 text-left", children: [
|
|
8724
|
-
/* @__PURE__ */ jsx("div", { className: "text-[10px] uppercase tracking-wider text-muted-foreground", children:
|
|
8766
|
+
/* @__PURE__ */ jsx("div", { className: "text-[10px] uppercase tracking-wider text-muted-foreground", children: t("error.correlation_id") }),
|
|
8725
8767
|
/* @__PURE__ */ jsx("code", { className: "break-all text-xs", children: correlationId })
|
|
8726
8768
|
] }) : null,
|
|
8727
8769
|
actions ? /* @__PURE__ */ jsx("div", { className: "mt-2 flex flex-wrap items-center justify-center gap-2", children: actions }) : null
|
|
@@ -8729,7 +8771,6 @@ function ErrorPage({
|
|
|
8729
8771
|
}
|
|
8730
8772
|
);
|
|
8731
8773
|
}
|
|
8732
|
-
var t19 = createPackageT("hazo_ui", en_default);
|
|
8733
8774
|
function LoadingTimeout({
|
|
8734
8775
|
active,
|
|
8735
8776
|
children,
|
|
@@ -8739,7 +8780,8 @@ function LoadingTimeout({
|
|
|
8739
8780
|
label,
|
|
8740
8781
|
className
|
|
8741
8782
|
}) {
|
|
8742
|
-
const
|
|
8783
|
+
const t = useHazoUiT();
|
|
8784
|
+
const resolved_label = label ?? t("loading.default_label");
|
|
8743
8785
|
const timeouts = {
|
|
8744
8786
|
gentle: thresholds?.gentle ?? 5e3,
|
|
8745
8787
|
firm: thresholds?.firm ?? 15e3,
|
|
@@ -8769,15 +8811,15 @@ function LoadingTimeout({
|
|
|
8769
8811
|
ErrorBanner,
|
|
8770
8812
|
{
|
|
8771
8813
|
severity: "error",
|
|
8772
|
-
title:
|
|
8773
|
-
message:
|
|
8814
|
+
title: t("loading.taking_longer"),
|
|
8815
|
+
message: t("loading.still_loading", { label: resolved_label }),
|
|
8774
8816
|
action: onRetry ? /* @__PURE__ */ jsx(
|
|
8775
8817
|
"button",
|
|
8776
8818
|
{
|
|
8777
8819
|
type: "button",
|
|
8778
8820
|
onClick: onRetry,
|
|
8779
8821
|
className: "rounded bg-foreground/10 px-3 py-1.5 text-sm font-medium hover:bg-foreground/15",
|
|
8780
|
-
children:
|
|
8822
|
+
children: t("loading.try_again")
|
|
8781
8823
|
}
|
|
8782
8824
|
) : null
|
|
8783
8825
|
}
|
|
@@ -8785,8 +8827,8 @@ function LoadingTimeout({
|
|
|
8785
8827
|
}
|
|
8786
8828
|
return /* @__PURE__ */ jsxs("div", { className, role: "status", "aria-busy": "true", "aria-live": "polite", children: [
|
|
8787
8829
|
skeleton,
|
|
8788
|
-
phase === "gentle" ? /* @__PURE__ */ jsx("div", { className: "mt-3 text-center text-sm text-muted-foreground", children:
|
|
8789
|
-
phase === "firm" ? /* @__PURE__ */ jsx("div", { className: "mt-3 text-center text-sm text-muted-foreground", children:
|
|
8830
|
+
phase === "gentle" ? /* @__PURE__ */ jsx("div", { className: "mt-3 text-center text-sm text-muted-foreground", children: t("loading.gentle_message", { label: resolved_label }) }) : null,
|
|
8831
|
+
phase === "firm" ? /* @__PURE__ */ jsx("div", { className: "mt-3 text-center text-sm text-muted-foreground", children: t("loading.firm_message") }) : null
|
|
8790
8832
|
] });
|
|
8791
8833
|
}
|
|
8792
8834
|
function ProgressiveImage({
|
|
@@ -8847,13 +8889,14 @@ function NotificationCountBadge({
|
|
|
8847
8889
|
max = 9,
|
|
8848
8890
|
className
|
|
8849
8891
|
}) {
|
|
8892
|
+
const t = useHazoUiT();
|
|
8850
8893
|
if (count <= 0) return null;
|
|
8851
8894
|
const isOverflow = count > max;
|
|
8852
8895
|
const label = isOverflow ? `${max}+` : String(count);
|
|
8853
8896
|
return /* @__PURE__ */ jsx(
|
|
8854
8897
|
"span",
|
|
8855
8898
|
{
|
|
8856
|
-
"aria-label":
|
|
8899
|
+
"aria-label": t("notification.unread_count", { count }),
|
|
8857
8900
|
className: cn(
|
|
8858
8901
|
"cls_notification_count_badge",
|
|
8859
8902
|
"inline-flex items-center justify-center",
|
|
@@ -8867,7 +8910,6 @@ function NotificationCountBadge({
|
|
|
8867
8910
|
}
|
|
8868
8911
|
);
|
|
8869
8912
|
}
|
|
8870
|
-
var t20 = createPackageT("hazo_ui", en_default);
|
|
8871
8913
|
function NotificationItem({
|
|
8872
8914
|
isRead,
|
|
8873
8915
|
timestamp,
|
|
@@ -8878,6 +8920,7 @@ function NotificationItem({
|
|
|
8878
8920
|
onMarkRead,
|
|
8879
8921
|
markReadLabel
|
|
8880
8922
|
}) {
|
|
8923
|
+
const t = useHazoUiT();
|
|
8881
8924
|
const handleMarkRead = (e) => {
|
|
8882
8925
|
e.stopPropagation();
|
|
8883
8926
|
onMarkRead?.();
|
|
@@ -8898,7 +8941,7 @@ function NotificationItem({
|
|
|
8898
8941
|
/* @__PURE__ */ jsx("div", { className: "cls_notification_item_dot_col flex-shrink-0 pt-1.5", children: !isRead ? /* @__PURE__ */ jsx(
|
|
8899
8942
|
"span",
|
|
8900
8943
|
{
|
|
8901
|
-
"aria-label":
|
|
8944
|
+
"aria-label": t("notification.unread"),
|
|
8902
8945
|
className: "cls_notification_item_dot block w-2 h-2 rounded-full bg-primary"
|
|
8903
8946
|
}
|
|
8904
8947
|
) : /* @__PURE__ */ jsx("span", { className: "block w-2 h-2", "aria-hidden": "true" }) }),
|
|
@@ -8922,13 +8965,13 @@ function NotificationItem({
|
|
|
8922
8965
|
}
|
|
8923
8966
|
);
|
|
8924
8967
|
}
|
|
8925
|
-
var t21 = createPackageT("hazo_ui", en_default);
|
|
8926
8968
|
function LoadingSkeletons() {
|
|
8969
|
+
const t = useHazoUiT();
|
|
8927
8970
|
return /* @__PURE__ */ jsx(
|
|
8928
8971
|
"div",
|
|
8929
8972
|
{
|
|
8930
8973
|
"aria-busy": "true",
|
|
8931
|
-
"aria-label":
|
|
8974
|
+
"aria-label": t("notification.loading"),
|
|
8932
8975
|
className: "cls_notification_panel_loading space-y-0",
|
|
8933
8976
|
children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs(
|
|
8934
8977
|
"div",
|
|
@@ -8987,7 +9030,6 @@ function NotificationPanel({
|
|
|
8987
9030
|
}
|
|
8988
9031
|
);
|
|
8989
9032
|
}
|
|
8990
|
-
var t22 = createPackageT("hazo_ui", en_default);
|
|
8991
9033
|
function HazoUiToaster({
|
|
8992
9034
|
position = "bottom-right",
|
|
8993
9035
|
closeButton = true,
|
|
@@ -9031,16 +9073,17 @@ function permissionToast({
|
|
|
9031
9073
|
missingPermissions,
|
|
9032
9074
|
descriptions,
|
|
9033
9075
|
action,
|
|
9034
|
-
duration = 5e3
|
|
9076
|
+
duration = 5e3,
|
|
9077
|
+
t = defaultHazoUiT
|
|
9035
9078
|
}) {
|
|
9036
|
-
const description = missingPermissions.length === 0 ?
|
|
9079
|
+
const description = missingPermissions.length === 0 ? t("toast.permission_denied_message") : t("toast.missing_prefix", {
|
|
9037
9080
|
items: missingPermissions.map((key) => {
|
|
9038
9081
|
const label = descriptions?.[key];
|
|
9039
9082
|
return label ? `\`${key}\` \u2014 ${label}` : `\`${key}\``;
|
|
9040
9083
|
}).join("; ")
|
|
9041
9084
|
});
|
|
9042
9085
|
return errorToast({
|
|
9043
|
-
title:
|
|
9086
|
+
title: t("toast.permission_required"),
|
|
9044
9087
|
description,
|
|
9045
9088
|
action,
|
|
9046
9089
|
duration
|
|
@@ -9298,7 +9341,6 @@ function use_fullscreen() {
|
|
|
9298
9341
|
const { isFullscreen, toggle } = useFullscreen(ref);
|
|
9299
9342
|
return { is_fullscreen: isFullscreen, toggle, ref };
|
|
9300
9343
|
}
|
|
9301
|
-
var t23 = createPackageT("hazo_ui", en_default);
|
|
9302
9344
|
function KanbanCard({
|
|
9303
9345
|
item,
|
|
9304
9346
|
renderCard,
|
|
@@ -9307,6 +9349,7 @@ function KanbanCard({
|
|
|
9307
9349
|
showEdit = false,
|
|
9308
9350
|
onEditRequest
|
|
9309
9351
|
}) {
|
|
9352
|
+
const t = useHazoUiT();
|
|
9310
9353
|
const {
|
|
9311
9354
|
attributes,
|
|
9312
9355
|
listeners,
|
|
@@ -9360,7 +9403,7 @@ function KanbanCard({
|
|
|
9360
9403
|
...listeners,
|
|
9361
9404
|
role: "button",
|
|
9362
9405
|
tabIndex: 0,
|
|
9363
|
-
"aria-roledescription":
|
|
9406
|
+
"aria-roledescription": t("kanban.draggable_card"),
|
|
9364
9407
|
"aria-grabbed": isDragging,
|
|
9365
9408
|
onDoubleClick: () => {
|
|
9366
9409
|
if (showEdit && onEditRequest && !dragging) onEditRequest(item);
|
|
@@ -9377,7 +9420,7 @@ function KanbanCard({
|
|
|
9377
9420
|
e.stopPropagation();
|
|
9378
9421
|
onEditRequest(item);
|
|
9379
9422
|
},
|
|
9380
|
-
"aria-label":
|
|
9423
|
+
"aria-label": t("kanban.edit_fallback", { id: item.id }),
|
|
9381
9424
|
className: cn(
|
|
9382
9425
|
"cls_hazo_kanban_card_edit absolute top-1.5 right-1.5",
|
|
9383
9426
|
"p-1 rounded-md text-muted-foreground hover:text-foreground hover:bg-accent",
|
|
@@ -9685,12 +9728,11 @@ function KanbanLaneStrip({
|
|
|
9685
9728
|
}
|
|
9686
9729
|
);
|
|
9687
9730
|
}
|
|
9688
|
-
var t24 = createPackageT("hazo_ui", en_default);
|
|
9689
9731
|
var DEFAULT_PRIORITIES = ["P0", "P1", "P2", "P3"];
|
|
9690
9732
|
function humanize(key) {
|
|
9691
9733
|
return key.replace(/[_\-]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\s+/g, " ").trim().split(" ").map((w) => w ? w[0].toUpperCase() + w.slice(1) : w).join(" ");
|
|
9692
9734
|
}
|
|
9693
|
-
function auto_detect_fields(item, columns) {
|
|
9735
|
+
function auto_detect_fields(item, columns, t) {
|
|
9694
9736
|
const skip = /* @__PURE__ */ new Set(["id", "columnKey", "priority"]);
|
|
9695
9737
|
const out = [];
|
|
9696
9738
|
for (const [key, value] of Object.entries(item)) {
|
|
@@ -9700,7 +9742,7 @@ function auto_detect_fields(item, columns) {
|
|
|
9700
9742
|
}
|
|
9701
9743
|
}
|
|
9702
9744
|
if (columns.length > 0) {
|
|
9703
|
-
out.push({ key: "columnKey", type: "status", label:
|
|
9745
|
+
out.push({ key: "columnKey", type: "status", label: t("kanban.status_label") });
|
|
9704
9746
|
}
|
|
9705
9747
|
return out;
|
|
9706
9748
|
}
|
|
@@ -9715,6 +9757,7 @@ function KanbanEditor({
|
|
|
9715
9757
|
onSave,
|
|
9716
9758
|
onClose
|
|
9717
9759
|
}) {
|
|
9760
|
+
const t = useHazoUiT();
|
|
9718
9761
|
const [draft, set_draft] = React27.useState(item);
|
|
9719
9762
|
const [saving, set_saving] = React27.useState(false);
|
|
9720
9763
|
const [error, set_error] = React27.useState(null);
|
|
@@ -9729,7 +9772,7 @@ function KanbanEditor({
|
|
|
9729
9772
|
const resolved_fields = React27.useMemo(() => {
|
|
9730
9773
|
if (fields) return fields;
|
|
9731
9774
|
if (!item) return [];
|
|
9732
|
-
return auto_detect_fields(item, resolved_columns);
|
|
9775
|
+
return auto_detect_fields(item, resolved_columns, t);
|
|
9733
9776
|
}, [fields, item, resolved_columns]);
|
|
9734
9777
|
const required_keys = React27.useMemo(
|
|
9735
9778
|
() => resolved_fields.filter(
|
|
@@ -9797,7 +9840,7 @@ function KanbanEditor({
|
|
|
9797
9840
|
isDirty: is_dirty
|
|
9798
9841
|
};
|
|
9799
9842
|
const open = item !== null;
|
|
9800
|
-
const title = item && titleFn ? titleFn(item) : item ?
|
|
9843
|
+
const title = item && titleFn ? titleFn(item) : item ? t("kanban.edit_fallback", { id: item.id }) : "";
|
|
9801
9844
|
const priority_var = item?.priority ? `--hazo-kanban-priority-${String(item.priority).toLowerCase()}` : null;
|
|
9802
9845
|
const header_bar_color = priority_var ? `hsl(var(${priority_var}))` : void 0;
|
|
9803
9846
|
const use_default_footer = !(renderBody && hideFooter);
|
|
@@ -9809,18 +9852,18 @@ function KanbanEditor({
|
|
|
9809
9852
|
if (!o && !saving) onClose();
|
|
9810
9853
|
},
|
|
9811
9854
|
title,
|
|
9812
|
-
description:
|
|
9855
|
+
description: t("kanban.update_description"),
|
|
9813
9856
|
sizeWidth: "min(90vw, 480px)",
|
|
9814
9857
|
openAnimation: "none",
|
|
9815
9858
|
closeAnimation: "none",
|
|
9816
9859
|
headerBar: !!priority_var,
|
|
9817
9860
|
headerBarColor: header_bar_color,
|
|
9818
9861
|
contentClassName: cn("cls_hazo_kanban_editor", priority_var && "pt-0"),
|
|
9819
|
-
actionButtonText: saving ?
|
|
9862
|
+
actionButtonText: saving ? t("kanban.saving") : t("kanban.save"),
|
|
9820
9863
|
actionButtonIcon: saving ? void 0 : /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 mr-2" }),
|
|
9821
9864
|
actionButtonLoading: saving,
|
|
9822
9865
|
actionButtonDisabled: !is_dirty || !all_required_filled || saving,
|
|
9823
|
-
cancelButtonText:
|
|
9866
|
+
cancelButtonText: t("kanban.cancel"),
|
|
9824
9867
|
showCancelButton: true,
|
|
9825
9868
|
onConfirm: handle_save,
|
|
9826
9869
|
onCancel: onClose,
|
|
@@ -9858,6 +9901,7 @@ function KanbanEditorFieldRow({
|
|
|
9858
9901
|
priorities,
|
|
9859
9902
|
columns
|
|
9860
9903
|
}) {
|
|
9904
|
+
const t = useHazoUiT();
|
|
9861
9905
|
const id = `kanban-editor-${field.key}`;
|
|
9862
9906
|
const label = field.label ?? humanize(field.key);
|
|
9863
9907
|
const value = draft[field.key];
|
|
@@ -9925,7 +9969,7 @@ function KanbanEditorFieldRow({
|
|
|
9925
9969
|
/* @__PURE__ */ jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsx(
|
|
9926
9970
|
SelectValue,
|
|
9927
9971
|
{
|
|
9928
|
-
placeholder: field.placeholder ??
|
|
9972
|
+
placeholder: field.placeholder ?? t("kanban.select_placeholder", { label })
|
|
9929
9973
|
}
|
|
9930
9974
|
) }),
|
|
9931
9975
|
/* @__PURE__ */ jsx(SelectContent, { children: (field.options ?? []).map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt, children: opt }, opt)) })
|
|
@@ -9941,7 +9985,7 @@ function KanbanEditorFieldRow({
|
|
|
9941
9985
|
/* @__PURE__ */ jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsx(
|
|
9942
9986
|
SelectValue,
|
|
9943
9987
|
{
|
|
9944
|
-
placeholder: field.placeholder ??
|
|
9988
|
+
placeholder: field.placeholder ?? t("kanban.select_priority")
|
|
9945
9989
|
}
|
|
9946
9990
|
) }),
|
|
9947
9991
|
/* @__PURE__ */ jsx(SelectContent, { children: priorities.map((p) => /* @__PURE__ */ jsx(SelectItem, { value: p, children: p }, p)) })
|
|
@@ -9957,7 +10001,7 @@ function KanbanEditorFieldRow({
|
|
|
9957
10001
|
/* @__PURE__ */ jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsx(
|
|
9958
10002
|
SelectValue,
|
|
9959
10003
|
{
|
|
9960
|
-
placeholder: field.placeholder ??
|
|
10004
|
+
placeholder: field.placeholder ?? t("kanban.select_status")
|
|
9961
10005
|
}
|
|
9962
10006
|
) }),
|
|
9963
10007
|
/* @__PURE__ */ jsx(SelectContent, { children: columns.map((col) => /* @__PURE__ */ jsx(SelectItem, { value: col.key, children: col.title }, col.key)) })
|
|
@@ -9966,7 +10010,6 @@ function KanbanEditorFieldRow({
|
|
|
9966
10010
|
)
|
|
9967
10011
|
] });
|
|
9968
10012
|
}
|
|
9969
|
-
var t25 = createPackageT("hazo_ui", en_default);
|
|
9970
10013
|
var EMPTY_FILTER = {
|
|
9971
10014
|
search: "",
|
|
9972
10015
|
categories: [],
|
|
@@ -9982,7 +10025,8 @@ function HazoUiKanbanFilter({
|
|
|
9982
10025
|
onChange,
|
|
9983
10026
|
className
|
|
9984
10027
|
}) {
|
|
9985
|
-
const
|
|
10028
|
+
const t = useHazoUiT();
|
|
10029
|
+
const resolved_search_placeholder = searchPlaceholder ?? t("common.search");
|
|
9986
10030
|
const is_controlled = value !== void 0;
|
|
9987
10031
|
const [internal, set_internal] = React27.useState(
|
|
9988
10032
|
defaultValue ?? EMPTY_FILTER
|
|
@@ -10063,7 +10107,7 @@ function HazoUiKanbanFilter({
|
|
|
10063
10107
|
className: "cls_hazo_kanban_filter_clear",
|
|
10064
10108
|
children: [
|
|
10065
10109
|
/* @__PURE__ */ jsx(X, { className: "h-4 w-4 mr-1" }),
|
|
10066
|
-
"
|
|
10110
|
+
t("kanban.clear")
|
|
10067
10111
|
]
|
|
10068
10112
|
}
|
|
10069
10113
|
)
|
|
@@ -10094,25 +10138,24 @@ function applyKanbanFilter(items, filter) {
|
|
|
10094
10138
|
return true;
|
|
10095
10139
|
});
|
|
10096
10140
|
}
|
|
10097
|
-
var t26 = createPackageT("hazo_ui", en_default);
|
|
10098
10141
|
var UNMATCHED_LANE_KEY = "__hazo_lane_unmatched__";
|
|
10099
10142
|
function bucket_key(lane_key, column_key) {
|
|
10100
10143
|
return lane_key == null ? column_key : `${lane_key}\0${column_key}`;
|
|
10101
10144
|
}
|
|
10102
|
-
function default_announcements(itemLabel) {
|
|
10145
|
+
function default_announcements(itemLabel, t) {
|
|
10103
10146
|
return {
|
|
10104
|
-
onDragStart: ({ item, fromColumn }) =>
|
|
10105
|
-
onDragOver: ({ item, overColumn }) => overColumn ?
|
|
10106
|
-
onDragEnd: ({ item, fromColumn, toColumn, newIndex }) => fromColumn === toColumn ?
|
|
10147
|
+
onDragStart: ({ item, fromColumn }) => t("kanban.dnd_pickup", { item: itemLabel(item), column: fromColumn }),
|
|
10148
|
+
onDragOver: ({ item, overColumn }) => overColumn ? t("kanban.dnd_over", { item: itemLabel(item), column: overColumn }) : "",
|
|
10149
|
+
onDragEnd: ({ item, fromColumn, toColumn, newIndex }) => fromColumn === toColumn ? t("kanban.dnd_reorder", {
|
|
10107
10150
|
item: itemLabel(item),
|
|
10108
10151
|
pos: newIndex + 1,
|
|
10109
10152
|
column: toColumn
|
|
10110
|
-
}) :
|
|
10153
|
+
}) : t("kanban.dnd_drop", {
|
|
10111
10154
|
item: itemLabel(item),
|
|
10112
10155
|
column: toColumn,
|
|
10113
10156
|
pos: newIndex + 1
|
|
10114
10157
|
}),
|
|
10115
|
-
onDragCancel: ({ item, fromColumn }) =>
|
|
10158
|
+
onDragCancel: ({ item, fromColumn }) => t("kanban.dnd_cancel", { item: itemLabel(item), column: fromColumn })
|
|
10116
10159
|
};
|
|
10117
10160
|
}
|
|
10118
10161
|
function group_items_by_column(items, overlay, columns, lanes) {
|
|
@@ -10179,6 +10222,7 @@ function HazoUiKanban({
|
|
|
10179
10222
|
onCardSave,
|
|
10180
10223
|
disableEdit = false
|
|
10181
10224
|
}) {
|
|
10225
|
+
const t = useHazoUiT();
|
|
10182
10226
|
const label_fn = React27.useCallback(
|
|
10183
10227
|
(item) => itemLabel ? itemLabel(item) : item.id,
|
|
10184
10228
|
[itemLabel]
|
|
@@ -10236,7 +10280,7 @@ function HazoUiKanban({
|
|
|
10236
10280
|
return closestCorners(args);
|
|
10237
10281
|
}, []);
|
|
10238
10282
|
const merged_announcements = React27.useMemo(() => {
|
|
10239
|
-
const defaults = default_announcements(label_fn);
|
|
10283
|
+
const defaults = default_announcements(label_fn, t);
|
|
10240
10284
|
return {
|
|
10241
10285
|
onDragStart: announcements?.onDragStart ?? defaults.onDragStart,
|
|
10242
10286
|
onDragOver: announcements?.onDragOver ?? defaults.onDragOver,
|
|
@@ -10916,8 +10960,8 @@ function serializeFilter(filter) {
|
|
|
10916
10960
|
const fields = (filter.fields ?? []).map((f) => `${f.field}:${f.operator ?? ""}:${String(f.value)}`).join(",");
|
|
10917
10961
|
return `${filter.search ?? ""}|${fields}`;
|
|
10918
10962
|
}
|
|
10919
|
-
var t27 = createPackageT("hazo_ui", en_default);
|
|
10920
10963
|
function HazoUiTable(props) {
|
|
10964
|
+
const t = useHazoUiT();
|
|
10921
10965
|
const state = useTableState(props);
|
|
10922
10966
|
const { columns, rows, getRowKey, className, caption } = props;
|
|
10923
10967
|
const mobileBreakpoint = props.mobileBreakpoint ?? 768;
|
|
@@ -10948,15 +10992,15 @@ function HazoUiTable(props) {
|
|
|
10948
10992
|
/* @__PURE__ */ jsx(SkeletonBar, { className: "w-1/2" })
|
|
10949
10993
|
] })
|
|
10950
10994
|
] }, `mloader-${i}`)
|
|
10951
|
-
) }) : state.serverError != null ? /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_mobile_error py-6", children: renderErrorState(props.error, state.serverError) }) : state.displayed.length === 0 ? /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_mobile_empty py-6", children: noActiveFilters(state.filter) && rows.length === 0 ? typeof props.empty === "string" || props.empty === void 0 ? /* @__PURE__ */ jsx(
|
|
10995
|
+
) }) : state.serverError != null ? /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_mobile_error py-6", children: renderErrorState(props.error, state.serverError, t) }) : state.displayed.length === 0 ? /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_mobile_empty py-6", children: noActiveFilters(state.filter) && rows.length === 0 ? typeof props.empty === "string" || props.empty === void 0 ? /* @__PURE__ */ jsx(
|
|
10952
10996
|
EmptyState,
|
|
10953
10997
|
{
|
|
10954
|
-
title: typeof props.empty === "string" && props.empty ||
|
|
10998
|
+
title: typeof props.empty === "string" && props.empty || t("table.empty")
|
|
10955
10999
|
}
|
|
10956
11000
|
) : props.empty : typeof props.noResults === "string" || props.noResults === void 0 ? /* @__PURE__ */ jsx(
|
|
10957
11001
|
EmptyState,
|
|
10958
11002
|
{
|
|
10959
|
-
title: typeof props.noResults === "string" && props.noResults ||
|
|
11003
|
+
title: typeof props.noResults === "string" && props.noResults || t("table.no_results")
|
|
10960
11004
|
}
|
|
10961
11005
|
) : props.noResults }) : /* @__PURE__ */ jsx(
|
|
10962
11006
|
TableMobileCards,
|
|
@@ -10979,7 +11023,7 @@ function HazoUiTable(props) {
|
|
|
10979
11023
|
{
|
|
10980
11024
|
type: "button",
|
|
10981
11025
|
onClick: (e) => state.cycleHeaderSort(c.key, e.shiftKey),
|
|
10982
|
-
title:
|
|
11026
|
+
title: t("table.sort_tooltip"),
|
|
10983
11027
|
className: "cls_hazo_ui_table_sort_btn inline-flex items-center gap-1 hover:text-foreground",
|
|
10984
11028
|
children: [
|
|
10985
11029
|
/* @__PURE__ */ jsx("span", { children: c.label }),
|
|
@@ -11001,7 +11045,7 @@ function HazoUiTable(props) {
|
|
|
11001
11045
|
{
|
|
11002
11046
|
colSpan: columns.length,
|
|
11003
11047
|
className: "cls_hazo_ui_table_error_cell p-0",
|
|
11004
|
-
children: /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_error_wrap py-6", children: renderErrorState(props.error, state.serverError) })
|
|
11048
|
+
children: /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_error_wrap py-6", children: renderErrorState(props.error, state.serverError, t) })
|
|
11005
11049
|
}
|
|
11006
11050
|
) }) : state.displayed.length === 0 ? /* @__PURE__ */ jsx(TableRow2, { children: /* @__PURE__ */ jsx(
|
|
11007
11051
|
TableCell2,
|
|
@@ -11011,12 +11055,12 @@ function HazoUiTable(props) {
|
|
|
11011
11055
|
children: noActiveFilters(state.filter) && rows.length === 0 ? /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_empty_wrap py-6", children: typeof props.empty === "string" || props.empty === void 0 ? /* @__PURE__ */ jsx(
|
|
11012
11056
|
EmptyState,
|
|
11013
11057
|
{
|
|
11014
|
-
title: typeof props.empty === "string" && props.empty ||
|
|
11058
|
+
title: typeof props.empty === "string" && props.empty || t("table.empty")
|
|
11015
11059
|
}
|
|
11016
11060
|
) : props.empty }) : /* @__PURE__ */ jsx("div", { className: "cls_hazo_ui_table_no_results_wrap py-6", children: typeof props.noResults === "string" || props.noResults === void 0 ? /* @__PURE__ */ jsx(
|
|
11017
11061
|
EmptyState,
|
|
11018
11062
|
{
|
|
11019
|
-
title: typeof props.noResults === "string" && props.noResults ||
|
|
11063
|
+
title: typeof props.noResults === "string" && props.noResults || t("table.no_results")
|
|
11020
11064
|
}
|
|
11021
11065
|
) : props.noResults })
|
|
11022
11066
|
}
|
|
@@ -11126,11 +11170,12 @@ function PaginationFooter({
|
|
|
11126
11170
|
total,
|
|
11127
11171
|
onPageChange
|
|
11128
11172
|
}) {
|
|
11173
|
+
const t = useHazoUiT();
|
|
11129
11174
|
const start = total === 0 ? 0 : page * pageSize + 1;
|
|
11130
11175
|
const end = Math.min((page + 1) * pageSize, total);
|
|
11131
11176
|
const lastPage = Math.max(0, Math.ceil(total / pageSize) - 1);
|
|
11132
11177
|
return /* @__PURE__ */ jsxs("div", { className: "cls_hazo_ui_table_pagination flex items-center justify-between gap-3 pt-2 text-sm", children: [
|
|
11133
|
-
/* @__PURE__ */ jsx("span", { className: "cls_hazo_ui_table_page_counter text-muted-foreground", children:
|
|
11178
|
+
/* @__PURE__ */ jsx("span", { className: "cls_hazo_ui_table_page_counter text-muted-foreground", children: t("table.showing", {
|
|
11134
11179
|
start: String(start),
|
|
11135
11180
|
end: String(end),
|
|
11136
11181
|
total: String(total)
|
|
@@ -11143,8 +11188,8 @@ function PaginationFooter({
|
|
|
11143
11188
|
size: "sm",
|
|
11144
11189
|
onClick: () => onPageChange(Math.max(0, page - 1)),
|
|
11145
11190
|
disabled: page === 0,
|
|
11146
|
-
"aria-label":
|
|
11147
|
-
children:
|
|
11191
|
+
"aria-label": t("table.prev_aria"),
|
|
11192
|
+
children: t("table.prev")
|
|
11148
11193
|
}
|
|
11149
11194
|
),
|
|
11150
11195
|
/* @__PURE__ */ jsx(
|
|
@@ -11154,14 +11199,15 @@ function PaginationFooter({
|
|
|
11154
11199
|
size: "sm",
|
|
11155
11200
|
onClick: () => onPageChange(Math.min(lastPage, page + 1)),
|
|
11156
11201
|
disabled: page >= lastPage,
|
|
11157
|
-
"aria-label":
|
|
11158
|
-
children:
|
|
11202
|
+
"aria-label": t("table.next_aria"),
|
|
11203
|
+
children: t("table.next")
|
|
11159
11204
|
}
|
|
11160
11205
|
)
|
|
11161
11206
|
] })
|
|
11162
11207
|
] });
|
|
11163
11208
|
}
|
|
11164
11209
|
function Toolbar2(props) {
|
|
11210
|
+
const t = useHazoUiT();
|
|
11165
11211
|
const {
|
|
11166
11212
|
columns,
|
|
11167
11213
|
sort,
|
|
@@ -11199,7 +11245,7 @@ function Toolbar2(props) {
|
|
|
11199
11245
|
setSearchValue(v);
|
|
11200
11246
|
onSearchChange(v);
|
|
11201
11247
|
},
|
|
11202
|
-
placeholder: searchPlaceholder ??
|
|
11248
|
+
placeholder: searchPlaceholder ?? t("table.search_placeholder"),
|
|
11203
11249
|
className: "cls_hazo_ui_table_search w-full sm:max-w-xs"
|
|
11204
11250
|
}
|
|
11205
11251
|
) : /* @__PURE__ */ jsx("div", {}),
|
|
@@ -11240,15 +11286,15 @@ function LoadingRows({
|
|
|
11240
11286
|
function noActiveFilters(filter) {
|
|
11241
11287
|
return !filter.search && (!filter.fields || filter.fields.length === 0);
|
|
11242
11288
|
}
|
|
11243
|
-
function renderErrorState(error, serverError) {
|
|
11289
|
+
function renderErrorState(error, serverError, t) {
|
|
11244
11290
|
if (typeof error === "function") return error(serverError);
|
|
11245
11291
|
if (error !== void 0 && error !== null) return error;
|
|
11246
11292
|
const msg = serverError instanceof Error ? serverError.message : String(serverError);
|
|
11247
11293
|
return /* @__PURE__ */ jsx(
|
|
11248
11294
|
EmptyState,
|
|
11249
11295
|
{
|
|
11250
|
-
title:
|
|
11251
|
-
description: msg ||
|
|
11296
|
+
title: t("table.error_title"),
|
|
11297
|
+
description: msg || t("table.error_description")
|
|
11252
11298
|
}
|
|
11253
11299
|
);
|
|
11254
11300
|
}
|
|
@@ -11484,7 +11530,6 @@ function StackedBars({
|
|
|
11484
11530
|
}
|
|
11485
11531
|
);
|
|
11486
11532
|
}
|
|
11487
|
-
var t28 = createPackageT("hazo_ui", en_default);
|
|
11488
11533
|
function DateRangeSelector({
|
|
11489
11534
|
value,
|
|
11490
11535
|
onChange,
|
|
@@ -11492,7 +11537,8 @@ function DateRangeSelector({
|
|
|
11492
11537
|
className,
|
|
11493
11538
|
ariaLabel
|
|
11494
11539
|
}) {
|
|
11495
|
-
const
|
|
11540
|
+
const t = useHazoUiT();
|
|
11541
|
+
const resolved_aria = ariaLabel ?? t("charts.date_range");
|
|
11496
11542
|
return /* @__PURE__ */ jsx(
|
|
11497
11543
|
"div",
|
|
11498
11544
|
{
|
|
@@ -11524,7 +11570,6 @@ function DateRangeSelector({
|
|
|
11524
11570
|
}
|
|
11525
11571
|
);
|
|
11526
11572
|
}
|
|
11527
|
-
var t29 = createPackageT("hazo_ui", en_default);
|
|
11528
11573
|
var PAD_LEFT2 = 80;
|
|
11529
11574
|
var PAD_RIGHT2 = 72;
|
|
11530
11575
|
var PAD_TOP2 = 12;
|
|
@@ -11549,6 +11594,7 @@ function FunnelChart({
|
|
|
11549
11594
|
showTooltip = true,
|
|
11550
11595
|
className
|
|
11551
11596
|
}) {
|
|
11597
|
+
const t = useHazoUiT();
|
|
11552
11598
|
const [hover_idx, set_hover_idx] = React27.useState(null);
|
|
11553
11599
|
const fmt = valueFormat ?? format_num;
|
|
11554
11600
|
const totals = steps.map(step_total);
|
|
@@ -11675,12 +11721,12 @@ function FunnelChart({
|
|
|
11675
11721
|
const bubble_anchor_y = bar_y + BAR_H / 2;
|
|
11676
11722
|
const lines = [
|
|
11677
11723
|
{ text: step.label, accent: true },
|
|
11678
|
-
{ text:
|
|
11679
|
-
{ text:
|
|
11724
|
+
{ text: t("charts.total", { value: fmt(total) }), accent: false },
|
|
11725
|
+
{ text: t("charts.pct_of_first", { pct: pct_first }), accent: false }
|
|
11680
11726
|
];
|
|
11681
11727
|
if (i > 0) {
|
|
11682
|
-
lines.push({ text:
|
|
11683
|
-
lines.push({ text:
|
|
11728
|
+
lines.push({ text: t("charts.pct_of_prev", { pct: pct_prev }), accent: false });
|
|
11729
|
+
lines.push({ text: t("charts.dropoff", { value: fmt(dropoff) }), accent: false });
|
|
11684
11730
|
}
|
|
11685
11731
|
if (step.segments) {
|
|
11686
11732
|
step.segments.forEach((seg) => {
|
|
@@ -11741,7 +11787,6 @@ function FunnelChart({
|
|
|
11741
11787
|
|
|
11742
11788
|
// src/assets/celebration-chime.mp3
|
|
11743
11789
|
var celebration_chime_default = "data:text/plain;charset=utf-8,";
|
|
11744
|
-
var t30 = createPackageT("hazo_ui", en_default);
|
|
11745
11790
|
var CELEBRATION_GRADIENT = "linear-gradient(135deg, #667eea 0%, #764ba2 100%)";
|
|
11746
11791
|
var CARD_SIZE = 1080;
|
|
11747
11792
|
var PREVIEW_SIZE = 400;
|
|
@@ -11793,6 +11838,7 @@ function CelebrationModalInner({
|
|
|
11793
11838
|
payload,
|
|
11794
11839
|
onClose
|
|
11795
11840
|
}) {
|
|
11841
|
+
const t = useHazoUiT();
|
|
11796
11842
|
const {
|
|
11797
11843
|
id,
|
|
11798
11844
|
title,
|
|
@@ -11939,7 +11985,7 @@ function CelebrationModalInner({
|
|
|
11939
11985
|
{
|
|
11940
11986
|
className: "cls_celebration_close_btn absolute top-3 right-3 z-10 p-1.5 rounded-full hover:bg-black/10 transition-colors",
|
|
11941
11987
|
onClick: close_modal,
|
|
11942
|
-
"aria-label":
|
|
11988
|
+
"aria-label": t("celebration.close"),
|
|
11943
11989
|
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4 text-gray-600" })
|
|
11944
11990
|
}
|
|
11945
11991
|
),
|
|
@@ -12002,21 +12048,21 @@ function CelebrationModalInner({
|
|
|
12002
12048
|
disabled: is_downloading,
|
|
12003
12049
|
children: [
|
|
12004
12050
|
is_downloading ? /* @__PURE__ */ jsx(Loader2, { className: "h-3.5 w-3.5 mr-1.5 animate-spin" }) : /* @__PURE__ */ jsx(Download, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
12005
|
-
|
|
12051
|
+
t("celebration.download_png")
|
|
12006
12052
|
]
|
|
12007
12053
|
}
|
|
12008
12054
|
),
|
|
12009
12055
|
can_share && /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: handle_share, children: [
|
|
12010
12056
|
/* @__PURE__ */ jsx(Share2, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
12011
|
-
|
|
12057
|
+
t("celebration.share")
|
|
12012
12058
|
] }),
|
|
12013
12059
|
/* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: handle_copy, children: [
|
|
12014
12060
|
/* @__PURE__ */ jsx(Copy, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
12015
|
-
|
|
12061
|
+
t("celebration.copy_image")
|
|
12016
12062
|
] })
|
|
12017
12063
|
] })
|
|
12018
12064
|
] }),
|
|
12019
|
-
!shareableCard && /* @__PURE__ */ jsx("div", { className: "cls_celebration_footer pb-8", children: /* @__PURE__ */ jsx(Button, { size: "sm", onClick: close_modal, children:
|
|
12065
|
+
!shareableCard && /* @__PURE__ */ jsx("div", { className: "cls_celebration_footer pb-8", children: /* @__PURE__ */ jsx(Button, { size: "sm", onClick: close_modal, children: t("celebration.dismiss") }) })
|
|
12020
12066
|
]
|
|
12021
12067
|
}
|
|
12022
12068
|
)
|
|
@@ -12038,8 +12084,8 @@ function computeEta(durationWindow, unitCount, concurrency = 1, fallbackUnitMs =
|
|
|
12038
12084
|
}
|
|
12039
12085
|
function easeToward(elapsed, eta, maxCap = 0.95) {
|
|
12040
12086
|
if (eta <= 0 || elapsed <= 0) return 0;
|
|
12041
|
-
const
|
|
12042
|
-
return maxCap * (1 - Math.exp(-1.5 *
|
|
12087
|
+
const t = elapsed / eta;
|
|
12088
|
+
return maxCap * (1 - Math.exp(-1.5 * t));
|
|
12043
12089
|
}
|
|
12044
12090
|
function HazoUiProgressBar({
|
|
12045
12091
|
value,
|
|
@@ -12215,7 +12261,6 @@ function upsertEntry(entries, entry) {
|
|
|
12215
12261
|
function removeEntry(entries, id) {
|
|
12216
12262
|
return entries.filter((e) => e.id !== id);
|
|
12217
12263
|
}
|
|
12218
|
-
var t31 = createPackageT("hazo_ui", en_default);
|
|
12219
12264
|
function HazoUiMemoryDropdown({
|
|
12220
12265
|
history_key,
|
|
12221
12266
|
placeholder,
|
|
@@ -12223,8 +12268,9 @@ function HazoUiMemoryDropdown({
|
|
|
12223
12268
|
add_entry,
|
|
12224
12269
|
empty_label
|
|
12225
12270
|
}) {
|
|
12226
|
-
const
|
|
12227
|
-
const
|
|
12271
|
+
const t = useHazoUiT();
|
|
12272
|
+
const resolved_placeholder = placeholder ?? t("memory.search_placeholder");
|
|
12273
|
+
const resolved_empty_label = empty_label ?? t("memory.no_history");
|
|
12228
12274
|
const { value: stored, setValue } = useHazoState(history_key, {
|
|
12229
12275
|
level: "scope",
|
|
12230
12276
|
fallback: []
|
|
@@ -12310,6 +12356,7 @@ function HazoUiMemoryDropdown({
|
|
|
12310
12356
|
);
|
|
12311
12357
|
}
|
|
12312
12358
|
function EntryRow({ entry, on_select, onDelete }) {
|
|
12359
|
+
const t = useHazoUiT();
|
|
12313
12360
|
const [deleteHovered, setDeleteHovered] = React27.useState(false);
|
|
12314
12361
|
const [rowHovered, setRowHovered] = React27.useState(false);
|
|
12315
12362
|
return /* @__PURE__ */ jsxs(
|
|
@@ -12349,7 +12396,7 @@ function EntryRow({ entry, on_select, onDelete }) {
|
|
|
12349
12396
|
onClick: (e) => onDelete(entry.id, e),
|
|
12350
12397
|
onMouseEnter: () => setDeleteHovered(true),
|
|
12351
12398
|
onMouseLeave: () => setDeleteHovered(false),
|
|
12352
|
-
"aria-label":
|
|
12399
|
+
"aria-label": t("memory.remove_aria", { label: entry.label }),
|
|
12353
12400
|
style: {
|
|
12354
12401
|
flexShrink: 0,
|
|
12355
12402
|
background: "none",
|
|
@@ -12368,7 +12415,6 @@ function EntryRow({ entry, on_select, onDelete }) {
|
|
|
12368
12415
|
}
|
|
12369
12416
|
);
|
|
12370
12417
|
}
|
|
12371
|
-
var t32 = createPackageT("hazo_ui", en_default);
|
|
12372
12418
|
function Logo({
|
|
12373
12419
|
logoUrl,
|
|
12374
12420
|
logoUrlDark,
|
|
@@ -12378,7 +12424,8 @@ function Logo({
|
|
|
12378
12424
|
className,
|
|
12379
12425
|
imgClassName
|
|
12380
12426
|
}) {
|
|
12381
|
-
const
|
|
12427
|
+
const t = useHazoUiT();
|
|
12428
|
+
const alt = appTitle ?? t("app_logo.alt_fallback");
|
|
12382
12429
|
let content = null;
|
|
12383
12430
|
if (logoUrl) {
|
|
12384
12431
|
content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
@@ -12413,12 +12460,12 @@ function Logo({
|
|
|
12413
12460
|
}
|
|
12414
12461
|
return /* @__PURE__ */ jsx("div", { className: cn("inline-flex items-center gap-2", className), children: content });
|
|
12415
12462
|
}
|
|
12416
|
-
var t33 = createPackageT("hazo_ui", en_default);
|
|
12417
12463
|
function AppHeader({ identity, homeHref, navItems, actions, className }) {
|
|
12464
|
+
const t = useHazoUiT();
|
|
12418
12465
|
return /* @__PURE__ */ jsxs(
|
|
12419
12466
|
"header",
|
|
12420
12467
|
{
|
|
12421
|
-
"aria-label":
|
|
12468
|
+
"aria-label": t("app_header.aria_label"),
|
|
12422
12469
|
className: cn(
|
|
12423
12470
|
"flex w-full items-center justify-between gap-4 border-b bg-navbar text-navbar-fg border-navbar-border px-4 py-2.5",
|
|
12424
12471
|
className
|
|
@@ -12871,6 +12918,7 @@ function HazoBrowserTab({
|
|
|
12871
12918
|
add_menu,
|
|
12872
12919
|
className
|
|
12873
12920
|
}) {
|
|
12921
|
+
const t = useHazoUiT();
|
|
12874
12922
|
const handle_close = (e, id) => {
|
|
12875
12923
|
e.stopPropagation();
|
|
12876
12924
|
on_close?.(id);
|
|
@@ -12910,7 +12958,7 @@ function HazoBrowserTab({
|
|
|
12910
12958
|
"button",
|
|
12911
12959
|
{
|
|
12912
12960
|
type: "button",
|
|
12913
|
-
"aria-label":
|
|
12961
|
+
"aria-label": t("browser_tab.close_aria", { label: tab.label }),
|
|
12914
12962
|
onClick: (e) => handle_close(e, tab.id),
|
|
12915
12963
|
className: "cls_hazo_browser_tab_close flex-shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-muted hover:text-foreground focus:opacity-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
12916
12964
|
children: /* @__PURE__ */ jsx(X, { className: "h-3 w-3" })
|
|
@@ -12926,7 +12974,6 @@ function HazoBrowserTab({
|
|
|
12926
12974
|
}
|
|
12927
12975
|
);
|
|
12928
12976
|
}
|
|
12929
|
-
var t34 = createPackageT("hazo_ui", en_default);
|
|
12930
12977
|
var native_name_cache = /* @__PURE__ */ new Map();
|
|
12931
12978
|
function get_native_name(code) {
|
|
12932
12979
|
const cached = native_name_cache.get(code);
|
|
@@ -13001,7 +13048,8 @@ function LocalePicker({
|
|
|
13001
13048
|
triggerLabel,
|
|
13002
13049
|
className
|
|
13003
13050
|
}) {
|
|
13004
|
-
const
|
|
13051
|
+
const t = useHazoUiT();
|
|
13052
|
+
const resolved_trigger_label = triggerLabel ?? t("locale_picker.change_language");
|
|
13005
13053
|
const options = React27.useMemo(() => {
|
|
13006
13054
|
return Object.entries(alternates ?? {}).map(([code, url]) => {
|
|
13007
13055
|
const href = safeHref(url);
|
|
@@ -13072,6 +13120,6 @@ function LocalePicker({
|
|
|
13072
13120
|
}
|
|
13073
13121
|
LocalePicker.displayName = "LocalePicker";
|
|
13074
13122
|
|
|
13075
|
-
export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AppFooter, AppHeader, Badge, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, CanvasTextToolbar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CelebrationProvider, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandNodeExtension, CommandPill, CommandPopover, DEFAULT_ANNOUNCE_EVENT, DateRangeSelector, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorBanner, ErrorPage, FunnelChart, HazoBrowserTab, HazoContextProvider, HazoUiConfirmDialog, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiEtaProgress, HazoUiFlexInput, HazoUiFlexRadio, HazoUiIcon, HazoUiIconPicker, HazoUiImageCropper, HazoUiImageCropperDialog, HazoUiKanban, HazoUiKanbanFilter, HazoUiMemoryDropdown, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, HazoUiProgressBar, HazoUiRte, HazoUiTable, HazoUiTextarea, HazoUiTextbox, HazoUiToaster, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputAffix, InverseSparkline, Label3 as Label, LiveRegion, LoadingTimeout, LocalePicker, Logo, MarkdownEditor, NotificationCountBadge, NotificationItem, NotificationPanel, Popover, PopoverContent, PopoverTrigger, ProgressiveImage, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, SkeletonCircle, SkeletonGroup, SkeletonRect, Slider, Sparkline, Spinner, StackedBars, StatusBadge, Switch, Table2 as Table, TableBody, TableCaption, TableCell2 as TableCell, TableFooter, TableHead, TableHeader2 as TableHeader, TableRow2 as TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, announce, applyKanbanFilter, buttonGroupVariants, celebrate, cn, computeEta, create_command_suggestion_extension, easeToward, errorToast, format_num, generateUUID, get_hazo_ui_config, get_logger, hasUrlParam, isLucideValue, makeStatusBadge, median, parse_commands_from_text, permissionToast, pick_x_label_indices, readRememberedState, reset_hazo_ui_config, resolve_animation_classes, safeHref, set_hazo_ui_config, set_logger, successToast, text_to_tiptap_content, toggleVariants, upsertEntry as upsertMemoryEntry, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useEtaProgress, useFullscreen, useIsMobile, useLoadingState, useLocalStorage, useLongPress, useMediaQuery, useRememberedState, useScrollRestore, useSessionStorage, useViewport, useWakeLock, use_fullscreen, use_wake_lock, writeRememberedState };
|
|
13123
|
+
export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AppFooter, AppHeader, Badge, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, CanvasTextToolbar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CelebrationProvider, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandNodeExtension, CommandPill, CommandPopover, DEFAULT_ANNOUNCE_EVENT, DateRangeSelector, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorBanner, ErrorPage, FunnelChart, HazoBrowserTab, HazoContextProvider, HazoUiConfirmDialog, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiEtaProgress, HazoUiFlexInput, HazoUiFlexRadio, HazoUiI18nProvider, HazoUiIcon, HazoUiIconPicker, HazoUiImageCropper, HazoUiImageCropperDialog, HazoUiKanban, HazoUiKanbanFilter, HazoUiMemoryDropdown, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, HazoUiProgressBar, HazoUiRte, HazoUiTable, HazoUiTextarea, HazoUiTextbox, HazoUiToaster, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputAffix, InverseSparkline, Label3 as Label, LiveRegion, LoadingTimeout, LocalePicker, Logo, MarkdownEditor, NotificationCountBadge, NotificationItem, NotificationPanel, Popover, PopoverContent, PopoverTrigger, ProgressiveImage, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, SkeletonCircle, SkeletonGroup, SkeletonRect, Slider, Sparkline, Spinner, StackedBars, StatusBadge, Switch, Table2 as Table, TableBody, TableCaption, TableCell2 as TableCell, TableFooter, TableHead, TableHeader2 as TableHeader, TableRow2 as TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, announce, applyKanbanFilter, buttonGroupVariants, celebrate, cn, computeEta, create_command_suggestion_extension, defaultHazoUiT, easeToward, errorToast, format_num, generateUUID, get_hazo_ui_config, get_logger, hasUrlParam, isLucideValue, makeStatusBadge, median, parse_commands_from_text, permissionToast, pick_x_label_indices, readRememberedState, reset_hazo_ui_config, resolve_animation_classes, safeHref, set_hazo_ui_config, set_logger, successToast, text_to_tiptap_content, toggleVariants, upsertEntry as upsertMemoryEntry, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useEtaProgress, useFullscreen, useHazoUiT, useIsMobile, useLoadingState, useLocalStorage, useLongPress, useMediaQuery, useRememberedState, useScrollRestore, useSessionStorage, useViewport, useWakeLock, use_fullscreen, use_wake_lock, writeRememberedState };
|
|
13076
13124
|
//# sourceMappingURL=index.js.map
|
|
13077
13125
|
//# sourceMappingURL=index.js.map
|