hazo_ui 6.12.4 → 6.12.5
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 +28 -0
- package/README.md +1 -1
- package/dist/index.cjs +313 -215
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +313 -215
- package/dist/index.js.map +1 -1
- package/dist/index.locale-picker.cjs +217 -3
- package/dist/index.locale-picker.cjs.map +1 -1
- package/dist/index.locale-picker.d.cts +1 -1
- package/dist/index.locale-picker.d.ts +1 -1
- package/dist/index.locale-picker.js +217 -3
- package/dist/index.locale-picker.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -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 t35 = arguments[e];
|
|
116
|
+
for (var r in t35) ({}).hasOwnProperty.call(t35, r) && (n[r] = t35[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 t35 = {};
|
|
131
131
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
132
132
|
if (-1 !== e.indexOf(n)) continue;
|
|
133
|
-
|
|
133
|
+
t35[n] = r[n];
|
|
134
134
|
}
|
|
135
|
-
return
|
|
135
|
+
return t35;
|
|
136
136
|
}
|
|
137
137
|
module.exports = _objectWithoutPropertiesLoose10, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
138
138
|
}
|
|
@@ -778,7 +778,81 @@ var en_default = {
|
|
|
778
778
|
"celebration.share": "Share",
|
|
779
779
|
"celebration.copy_image": "Copy image",
|
|
780
780
|
"celebration.dismiss": "Dismiss",
|
|
781
|
-
"charts.date_range": "Date range"
|
|
781
|
+
"charts.date_range": "Date range",
|
|
782
|
+
"flex_input.must_be_valid_number": "Must be a valid number",
|
|
783
|
+
"flex_input.max_decimals": "Maximum {{count}} decimal places allowed",
|
|
784
|
+
"flex_input.min_value": "Must be at least {{min}}",
|
|
785
|
+
"flex_input.max_value": "Must be at most {{max}}",
|
|
786
|
+
"flex_input.alpha_only": "Only letters, numbers, and spaces are allowed",
|
|
787
|
+
"flex_input.must_be_valid_email": "Must be a valid email address",
|
|
788
|
+
"flex_input.min_characters": "Must be at least {{min}} characters",
|
|
789
|
+
"flex_input.max_characters": "Must be at most {{max}} characters",
|
|
790
|
+
"flex_input.invalid_format": "Invalid format",
|
|
791
|
+
"flex_input.invalid_input": "Invalid input",
|
|
792
|
+
"textbox.placeholder": "Type here...",
|
|
793
|
+
"textarea.placeholder": "Type here...",
|
|
794
|
+
"common.remove": "Remove",
|
|
795
|
+
"locale_picker.change_language": "Change language",
|
|
796
|
+
"app_logo.alt_fallback": "Logo",
|
|
797
|
+
"app_header.aria_label": "Application header",
|
|
798
|
+
"skeleton.loading_content": "Loading content",
|
|
799
|
+
"spinner.loading": "Loading",
|
|
800
|
+
"spinner.loading_text": "Loading...",
|
|
801
|
+
"rte.update_link": "Update Link",
|
|
802
|
+
"rte.add_link": "Add Link",
|
|
803
|
+
"rte.remove_link": "Remove",
|
|
804
|
+
"rte.select_size": "Select size",
|
|
805
|
+
"rte.custom_size": "Custom size",
|
|
806
|
+
"rte.insert_table": "Insert",
|
|
807
|
+
"rte.search_variables": "Search variables...",
|
|
808
|
+
"rte.no_variables": "No variables found.",
|
|
809
|
+
"rte.table_operations": "Table Operations",
|
|
810
|
+
"rte.add_row_above": "Add row above",
|
|
811
|
+
"rte.add_row_below": "Add row below",
|
|
812
|
+
"rte.add_col_left": "Add col left",
|
|
813
|
+
"rte.add_col_right": "Add col right",
|
|
814
|
+
"rte.delete_row": "Delete row",
|
|
815
|
+
"rte.delete_col": "Delete col",
|
|
816
|
+
"rte.delete_table": "Delete table",
|
|
817
|
+
"rte.insert_table_heading": "Insert Table",
|
|
818
|
+
"rte.placeholder": "Start typing...",
|
|
819
|
+
"sort.asc": "Asc",
|
|
820
|
+
"sort.desc": "Desc",
|
|
821
|
+
"sort.reorder_aria": "Reorder {{field}}",
|
|
822
|
+
"sort.priority_aria": "Sort priority {{n}}",
|
|
823
|
+
"sort.direction_aria": "Sort direction for {{field}}",
|
|
824
|
+
"sort.remove_aria": "Remove {{field}} from sort",
|
|
825
|
+
"sort.active_sorts": "Active sorts",
|
|
826
|
+
"sort.no_active_sorts": "No active sorts",
|
|
827
|
+
"sort.button_label": "Sort",
|
|
828
|
+
"sort.empty_message": "No sort fields yet. Add one below to start ordering rows.",
|
|
829
|
+
"sort.all_fields_added": "All fields added",
|
|
830
|
+
"sort.add_sort_field": "Add sort field",
|
|
831
|
+
"sort.no_fields_available": "No fields available.",
|
|
832
|
+
"kanban.dnd_pickup": "Picked up {{item}}. Currently in {{column}}. Use arrow keys to choose a different column. Press space to drop, escape to cancel.",
|
|
833
|
+
"kanban.dnd_over": "{{item}} over {{column}}.",
|
|
834
|
+
"kanban.dnd_drop": "{{item}} dropped in {{column}}, position {{pos}}.",
|
|
835
|
+
"kanban.dnd_reorder": "{{item}} reordered to position {{pos}} in {{column}}.",
|
|
836
|
+
"kanban.dnd_cancel": "Movement cancelled. {{item}} returned to {{column}}.",
|
|
837
|
+
"kanban.draggable_card": "draggable card",
|
|
838
|
+
"loading.still_loading": "We're still trying to load the {{label}}. The connection may be slow.",
|
|
839
|
+
"loading.try_again": "Try again",
|
|
840
|
+
"loading.gentle_message": "Loading {{label}}\u2026",
|
|
841
|
+
"loading.default_label": "content",
|
|
842
|
+
"loading.firm_message": "Still working on it \u2014 almost there.",
|
|
843
|
+
"icon_picker.emoji_tab": "Emoji",
|
|
844
|
+
"icon_picker.tools_group": "Tools",
|
|
845
|
+
"icon_picker.home_group": "Home",
|
|
846
|
+
"icon_picker.weather_group": "Weather",
|
|
847
|
+
"icon_picker.nature_group": "Nature",
|
|
848
|
+
"icon_picker.symbols_group": "Symbols",
|
|
849
|
+
"icon_picker.no_results": "No icons found",
|
|
850
|
+
"error.correlation_id": "Correlation ID",
|
|
851
|
+
"charts.total": "Total: {{value}}",
|
|
852
|
+
"charts.pct_of_first": "% of first: {{pct}}%",
|
|
853
|
+
"charts.pct_of_prev": "% of prev: {{pct}}%",
|
|
854
|
+
"charts.dropoff": "Drop-off: \u2212{{value}}",
|
|
855
|
+
"toast.missing_prefix": "Missing: {{items}}"
|
|
782
856
|
};
|
|
783
857
|
var t = createPackageT("hazo_ui", en_default);
|
|
784
858
|
function FilterFieldItem({
|
|
@@ -1266,7 +1340,7 @@ function SortableSortFieldItem({
|
|
|
1266
1340
|
...attributes,
|
|
1267
1341
|
...listeners,
|
|
1268
1342
|
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",
|
|
1269
|
-
"aria-label":
|
|
1343
|
+
"aria-label": t2("sort.reorder_aria", { field: fieldLabel }),
|
|
1270
1344
|
children: /* @__PURE__ */ jsx(GripVertical, { className: "cls_drag_icon h-4 w-4" })
|
|
1271
1345
|
}
|
|
1272
1346
|
),
|
|
@@ -1274,7 +1348,7 @@ function SortableSortFieldItem({
|
|
|
1274
1348
|
"span",
|
|
1275
1349
|
{
|
|
1276
1350
|
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",
|
|
1277
|
-
"aria-label":
|
|
1351
|
+
"aria-label": t2("sort.priority_aria", { n: priority }),
|
|
1278
1352
|
children: priority
|
|
1279
1353
|
}
|
|
1280
1354
|
),
|
|
@@ -1283,7 +1357,7 @@ function SortableSortFieldItem({
|
|
|
1283
1357
|
"div",
|
|
1284
1358
|
{
|
|
1285
1359
|
role: "radiogroup",
|
|
1286
|
-
"aria-label":
|
|
1360
|
+
"aria-label": t2("sort.direction_aria", { field: fieldLabel }),
|
|
1287
1361
|
className: "cls_direction_control inline-flex shrink-0 items-center rounded-md border border-border/70 bg-muted/40 p-0.5",
|
|
1288
1362
|
children: [
|
|
1289
1363
|
/* @__PURE__ */ jsxs(
|
|
@@ -1297,7 +1371,7 @@ function SortableSortFieldItem({
|
|
|
1297
1371
|
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",
|
|
1298
1372
|
children: [
|
|
1299
1373
|
/* @__PURE__ */ jsx(ArrowUp, { className: "h-3 w-3" }),
|
|
1300
|
-
"
|
|
1374
|
+
t2("sort.asc")
|
|
1301
1375
|
]
|
|
1302
1376
|
}
|
|
1303
1377
|
),
|
|
@@ -1312,7 +1386,7 @@ function SortableSortFieldItem({
|
|
|
1312
1386
|
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",
|
|
1313
1387
|
children: [
|
|
1314
1388
|
/* @__PURE__ */ jsx(ArrowDown, { className: "h-3 w-3" }),
|
|
1315
|
-
"
|
|
1389
|
+
t2("sort.desc")
|
|
1316
1390
|
]
|
|
1317
1391
|
}
|
|
1318
1392
|
)
|
|
@@ -1326,7 +1400,7 @@ function SortableSortFieldItem({
|
|
|
1326
1400
|
size: "sm",
|
|
1327
1401
|
onClick: onDelete,
|
|
1328
1402
|
className: "cls_delete_btn h-7 w-7 shrink-0 p-0 text-muted-foreground/60 hover:bg-destructive/10 hover:text-destructive",
|
|
1329
|
-
"aria-label":
|
|
1403
|
+
"aria-label": t2("sort.remove_aria", { field: fieldLabel }),
|
|
1330
1404
|
children: /* @__PURE__ */ jsx(X, { className: "cls_delete_icon h-3.5 w-3.5" })
|
|
1331
1405
|
}
|
|
1332
1406
|
)
|
|
@@ -1439,16 +1513,16 @@ function HazoUiMultiSortDialog({
|
|
|
1439
1513
|
};
|
|
1440
1514
|
const hasActiveSorts = initialSortFields.length > 0;
|
|
1441
1515
|
const tooltipContent = hasActiveSorts ? /* @__PURE__ */ jsxs("div", { className: "cls_sort_tooltip_content space-y-1", children: [
|
|
1442
|
-
/* @__PURE__ */ jsx("div", { className: "cls_tooltip_title text-xs font-semibold mb-1", children: "
|
|
1516
|
+
/* @__PURE__ */ jsx("div", { className: "cls_tooltip_title text-xs font-semibold mb-1", children: t2("sort.active_sorts") }),
|
|
1443
1517
|
initialSortFields.map((sortConfig, index) => /* @__PURE__ */ jsxs("div", { className: "cls_tooltip_item text-xs", children: [
|
|
1444
1518
|
index + 1,
|
|
1445
1519
|
". ",
|
|
1446
1520
|
getFieldLabel(sortConfig.field),
|
|
1447
1521
|
" (",
|
|
1448
|
-
sortConfig.direction === "asc" ? "
|
|
1522
|
+
sortConfig.direction === "asc" ? t2("sort.asc") : t2("sort.desc"),
|
|
1449
1523
|
")"
|
|
1450
1524
|
] }, sortConfig.field))
|
|
1451
|
-
] }) : /* @__PURE__ */ jsx("div", { className: "cls_sort_tooltip_content text-xs", children: "
|
|
1525
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "cls_sort_tooltip_content text-xs", children: t2("sort.no_active_sorts") });
|
|
1452
1526
|
return /* @__PURE__ */ jsxs(Dialog, { open: isOpen, onOpenChange: setIsOpen, children: [
|
|
1453
1527
|
/* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
1454
1528
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
@@ -1468,7 +1542,7 @@ function HazoUiMultiSortDialog({
|
|
|
1468
1542
|
)
|
|
1469
1543
|
}
|
|
1470
1544
|
),
|
|
1471
|
-
"
|
|
1545
|
+
t2("sort.button_label"),
|
|
1472
1546
|
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 })
|
|
1473
1547
|
]
|
|
1474
1548
|
}
|
|
@@ -1513,7 +1587,7 @@ function HazoUiMultiSortDialog({
|
|
|
1513
1587
|
}
|
|
1514
1588
|
)
|
|
1515
1589
|
}
|
|
1516
|
-
) }) : /* @__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: "
|
|
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: t2("sort.empty_message") }),
|
|
1517
1591
|
/* @__PURE__ */ jsx("div", { className: "cls_add_field_section", children: /* @__PURE__ */ jsxs(Popover, { open: isComboboxOpen, onOpenChange: setIsComboboxOpen, children: [
|
|
1518
1592
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
1519
1593
|
Button,
|
|
@@ -1525,13 +1599,13 @@ function HazoUiMultiSortDialog({
|
|
|
1525
1599
|
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",
|
|
1526
1600
|
children: [
|
|
1527
1601
|
/* @__PURE__ */ jsx(Plus, { className: "cls_plus_icon h-4 w-4" }),
|
|
1528
|
-
/* @__PURE__ */ jsx("span", { children: availableFieldsToAdd.length === 0 ? "
|
|
1602
|
+
/* @__PURE__ */ jsx("span", { children: availableFieldsToAdd.length === 0 ? t2("sort.all_fields_added") : t2("sort.add_sort_field") })
|
|
1529
1603
|
]
|
|
1530
1604
|
}
|
|
1531
1605
|
) }),
|
|
1532
1606
|
/* @__PURE__ */ jsx(PopoverContent, { className: "cls_combobox_popover w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ jsxs(Command, { children: [
|
|
1533
1607
|
/* @__PURE__ */ jsx(CommandInput, { placeholder: t2("sort.search_fields"), className: "cls_command_input" }),
|
|
1534
|
-
/* @__PURE__ */ jsx(CommandList, { children: availableFieldsToAdd.length === 0 ? /* @__PURE__ */ jsx(CommandEmpty, { children: "
|
|
1608
|
+
/* @__PURE__ */ jsx(CommandList, { children: availableFieldsToAdd.length === 0 ? /* @__PURE__ */ jsx(CommandEmpty, { children: t2("sort.no_fields_available") }) : /* @__PURE__ */ jsx(CommandGroup, { children: availableFieldsToAdd.map((field) => /* @__PURE__ */ jsx(
|
|
1535
1609
|
CommandItem,
|
|
1536
1610
|
{
|
|
1537
1611
|
value: field.label,
|
|
@@ -2067,11 +2141,11 @@ var SYMBOLS_ICONS = [
|
|
|
2067
2141
|
"Wrench"
|
|
2068
2142
|
];
|
|
2069
2143
|
var LUCIDE_GROUPS = [
|
|
2070
|
-
{ key: "tools",
|
|
2071
|
-
{ key: "home",
|
|
2072
|
-
{ key: "weather",
|
|
2073
|
-
{ key: "nature",
|
|
2074
|
-
{ key: "symbols",
|
|
2144
|
+
{ key: "tools", label_key: "icon_picker.tools_group", icons: TOOLS_ICONS },
|
|
2145
|
+
{ key: "home", label_key: "icon_picker.home_group", icons: HOME_ICONS },
|
|
2146
|
+
{ key: "weather", label_key: "icon_picker.weather_group", icons: WEATHER_ICONS },
|
|
2147
|
+
{ key: "nature", label_key: "icon_picker.nature_group", icons: NATURE_ICONS },
|
|
2148
|
+
{ key: "symbols", label_key: "icon_picker.symbols_group", icons: SYMBOLS_ICONS }
|
|
2075
2149
|
];
|
|
2076
2150
|
var EMOJI_ITEMS = [
|
|
2077
2151
|
// Faces
|
|
@@ -2284,11 +2358,11 @@ function HazoUiIconPicker({
|
|
|
2284
2358
|
name
|
|
2285
2359
|
);
|
|
2286
2360
|
}),
|
|
2287
|
-
filtered_search_results.length === 0 && /* @__PURE__ */ jsx("p", { className: "col-span-8 py-4 text-center text-sm text-muted-foreground", children: "
|
|
2361
|
+
filtered_search_results.length === 0 && /* @__PURE__ */ jsx("p", { className: "col-span-8 py-4 text-center text-sm text-muted-foreground", children: t3("icon_picker.no_results") })
|
|
2288
2362
|
] }) : /* @__PURE__ */ jsxs(Tabs, { defaultValue: "emoji", children: [
|
|
2289
2363
|
/* @__PURE__ */ jsxs(TabsList, { className: "grid w-full grid-cols-6", children: [
|
|
2290
|
-
/* @__PURE__ */ jsx(TabsTrigger, { value: "emoji", children: "
|
|
2291
|
-
LUCIDE_GROUPS.map((group) => /* @__PURE__ */ jsx(TabsTrigger, { value: group.key, children: group.
|
|
2364
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "emoji", children: t3("icon_picker.emoji_tab") }),
|
|
2365
|
+
LUCIDE_GROUPS.map((group) => /* @__PURE__ */ jsx(TabsTrigger, { value: group.key, children: t3(group.label_key) }, group.key))
|
|
2292
2366
|
] }),
|
|
2293
2367
|
/* @__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(
|
|
2294
2368
|
"button",
|
|
@@ -2320,6 +2394,7 @@ function HazoUiIconPicker({
|
|
|
2320
2394
|
}
|
|
2321
2395
|
) });
|
|
2322
2396
|
}
|
|
2397
|
+
var t4 = createPackageT("hazo_ui", en_default);
|
|
2323
2398
|
function validateInput(value, input_type, text_len_min, text_len_max, num_min, num_max, regex, num_decimals) {
|
|
2324
2399
|
if (value === "") {
|
|
2325
2400
|
return { isValid: true };
|
|
@@ -2328,36 +2403,36 @@ function validateInput(value, input_type, text_len_min, text_len_max, num_min, n
|
|
|
2328
2403
|
case "numeric": {
|
|
2329
2404
|
const numValue = parseFloat(value);
|
|
2330
2405
|
if (isNaN(numValue)) {
|
|
2331
|
-
return { isValid: false, errorMessage: "
|
|
2406
|
+
return { isValid: false, errorMessage: t4("flex_input.must_be_valid_number") };
|
|
2332
2407
|
}
|
|
2333
2408
|
if (num_decimals !== void 0) {
|
|
2334
2409
|
const decimalPlaces = value.split(".")[1]?.length || 0;
|
|
2335
2410
|
if (decimalPlaces > num_decimals) {
|
|
2336
2411
|
return {
|
|
2337
2412
|
isValid: false,
|
|
2338
|
-
errorMessage:
|
|
2413
|
+
errorMessage: t4("flex_input.max_decimals", { count: num_decimals })
|
|
2339
2414
|
};
|
|
2340
2415
|
}
|
|
2341
2416
|
}
|
|
2342
2417
|
if (num_min !== void 0 && numValue < num_min) {
|
|
2343
|
-
return { isValid: false, errorMessage:
|
|
2418
|
+
return { isValid: false, errorMessage: t4("flex_input.min_value", { min: num_min }) };
|
|
2344
2419
|
}
|
|
2345
2420
|
if (num_max !== void 0 && numValue > num_max) {
|
|
2346
|
-
return { isValid: false, errorMessage:
|
|
2421
|
+
return { isValid: false, errorMessage: t4("flex_input.max_value", { max: num_max }) };
|
|
2347
2422
|
}
|
|
2348
2423
|
break;
|
|
2349
2424
|
}
|
|
2350
2425
|
case "alpha": {
|
|
2351
2426
|
const alphaRegex = /^[A-Za-z0-9\s]*$/;
|
|
2352
2427
|
if (!alphaRegex.test(value)) {
|
|
2353
|
-
return { isValid: false, errorMessage: "
|
|
2428
|
+
return { isValid: false, errorMessage: t4("flex_input.alpha_only") };
|
|
2354
2429
|
}
|
|
2355
2430
|
break;
|
|
2356
2431
|
}
|
|
2357
2432
|
case "email": {
|
|
2358
2433
|
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
2359
2434
|
if (!emailRegex.test(value)) {
|
|
2360
|
-
return { isValid: false, errorMessage: "
|
|
2435
|
+
return { isValid: false, errorMessage: t4("flex_input.must_be_valid_email") };
|
|
2361
2436
|
}
|
|
2362
2437
|
break;
|
|
2363
2438
|
}
|
|
@@ -2365,13 +2440,13 @@ function validateInput(value, input_type, text_len_min, text_len_max, num_min, n
|
|
|
2365
2440
|
if (text_len_min !== void 0 && value.length < text_len_min) {
|
|
2366
2441
|
return {
|
|
2367
2442
|
isValid: false,
|
|
2368
|
-
errorMessage:
|
|
2443
|
+
errorMessage: t4("flex_input.min_characters", { min: text_len_min })
|
|
2369
2444
|
};
|
|
2370
2445
|
}
|
|
2371
2446
|
if (text_len_max !== void 0 && value.length > text_len_max) {
|
|
2372
2447
|
return {
|
|
2373
2448
|
isValid: false,
|
|
2374
|
-
errorMessage:
|
|
2449
|
+
errorMessage: t4("flex_input.max_characters", { max: text_len_max })
|
|
2375
2450
|
};
|
|
2376
2451
|
}
|
|
2377
2452
|
break;
|
|
@@ -2380,7 +2455,7 @@ function validateInput(value, input_type, text_len_min, text_len_max, num_min, n
|
|
|
2380
2455
|
if (regex) {
|
|
2381
2456
|
const regexPattern = typeof regex === "string" ? new RegExp(regex) : regex;
|
|
2382
2457
|
if (!regexPattern.test(value)) {
|
|
2383
|
-
return { isValid: false, errorMessage: "
|
|
2458
|
+
return { isValid: false, errorMessage: t4("flex_input.invalid_format") };
|
|
2384
2459
|
}
|
|
2385
2460
|
}
|
|
2386
2461
|
return { isValid: true };
|
|
@@ -2476,7 +2551,7 @@ var HazoUiFlexInput = React27.forwardRef(
|
|
|
2476
2551
|
num_decimals
|
|
2477
2552
|
);
|
|
2478
2553
|
if (!validation.isValid) {
|
|
2479
|
-
setErrorMessage(validation.errorMessage || format_guide || "
|
|
2554
|
+
setErrorMessage(validation.errorMessage || format_guide || t4("flex_input.invalid_input"));
|
|
2480
2555
|
} else {
|
|
2481
2556
|
setErrorMessage(void 0);
|
|
2482
2557
|
}
|
|
@@ -3706,10 +3781,10 @@ var BLOCK_TYPE_LABEL_KEYS = {
|
|
|
3706
3781
|
"code-block": "rte.block_type.code_block",
|
|
3707
3782
|
blockquote: "rte.block_type.blockquote"
|
|
3708
3783
|
};
|
|
3709
|
-
function get_translated_block_types(
|
|
3784
|
+
function get_translated_block_types(t35) {
|
|
3710
3785
|
return BLOCK_TYPES.map((type) => ({
|
|
3711
3786
|
...type,
|
|
3712
|
-
label:
|
|
3787
|
+
label: t35(BLOCK_TYPE_LABEL_KEYS[type.value])
|
|
3713
3788
|
}));
|
|
3714
3789
|
}
|
|
3715
3790
|
|
|
@@ -3756,7 +3831,7 @@ function get_file_extension(filename) {
|
|
|
3756
3831
|
function is_image_file(mime_type) {
|
|
3757
3832
|
return mime_type.startsWith("image/");
|
|
3758
3833
|
}
|
|
3759
|
-
var
|
|
3834
|
+
var t5 = createPackageT("hazo_ui", en_default);
|
|
3760
3835
|
var ALL_ON = {
|
|
3761
3836
|
undo_redo: true,
|
|
3762
3837
|
block_type: true,
|
|
@@ -3811,7 +3886,7 @@ var Toolbar = ({
|
|
|
3811
3886
|
}
|
|
3812
3887
|
const tb = { ...ALL_ON, ...toolbar };
|
|
3813
3888
|
const font_family_options = font_families && font_families.length > 0 ? font_families : FONT_FAMILIES;
|
|
3814
|
-
const block_type_options = get_translated_block_types(
|
|
3889
|
+
const block_type_options = get_translated_block_types(t5);
|
|
3815
3890
|
const get_current_font_size = () => {
|
|
3816
3891
|
const attrs = editor.getAttributes("textStyle");
|
|
3817
3892
|
return attrs.fontSize || FONT_SIZE_CONFIG.default;
|
|
@@ -3955,7 +4030,7 @@ var Toolbar = ({
|
|
|
3955
4030
|
{
|
|
3956
4031
|
onClick: () => editor.chain().focus().undo().run(),
|
|
3957
4032
|
disabled: !editor.can().undo(),
|
|
3958
|
-
tooltip:
|
|
4033
|
+
tooltip: t5("rte.undo"),
|
|
3959
4034
|
children: /* @__PURE__ */ jsx(LuUndo2, { className: "h-4 w-4" })
|
|
3960
4035
|
},
|
|
3961
4036
|
"undo"
|
|
@@ -3965,7 +4040,7 @@ var Toolbar = ({
|
|
|
3965
4040
|
{
|
|
3966
4041
|
onClick: () => editor.chain().focus().redo().run(),
|
|
3967
4042
|
disabled: !editor.can().redo(),
|
|
3968
|
-
tooltip:
|
|
4043
|
+
tooltip: t5("rte.redo"),
|
|
3969
4044
|
children: /* @__PURE__ */ jsx(LuRedo2, { className: "h-4 w-4" })
|
|
3970
4045
|
},
|
|
3971
4046
|
"redo"
|
|
@@ -4006,7 +4081,7 @@ var Toolbar = ({
|
|
|
4006
4081
|
ToolbarButton,
|
|
4007
4082
|
{
|
|
4008
4083
|
onClick: () => handle_font_size_change(-2),
|
|
4009
|
-
tooltip:
|
|
4084
|
+
tooltip: t5("rte.decrease_font_size"),
|
|
4010
4085
|
children: /* @__PURE__ */ jsx(LuMinus, { className: "h-3 w-3" })
|
|
4011
4086
|
}
|
|
4012
4087
|
),
|
|
@@ -4015,7 +4090,7 @@ var Toolbar = ({
|
|
|
4015
4090
|
ToolbarButton,
|
|
4016
4091
|
{
|
|
4017
4092
|
onClick: () => handle_font_size_change(FONT_SIZE_CONFIG.step),
|
|
4018
|
-
tooltip:
|
|
4093
|
+
tooltip: t5("rte.increase_font_size"),
|
|
4019
4094
|
children: /* @__PURE__ */ jsx(LuPlus, { className: "h-3 w-3" })
|
|
4020
4095
|
}
|
|
4021
4096
|
)
|
|
@@ -4033,7 +4108,7 @@ var Toolbar = ({
|
|
|
4033
4108
|
{
|
|
4034
4109
|
onClick: () => editor.chain().focus().toggleBold().run(),
|
|
4035
4110
|
is_active: editor.isActive("bold"),
|
|
4036
|
-
tooltip:
|
|
4111
|
+
tooltip: t5("rte.bold"),
|
|
4037
4112
|
children: /* @__PURE__ */ jsx(LuBold, { className: "h-4 w-4" })
|
|
4038
4113
|
},
|
|
4039
4114
|
"bold"
|
|
@@ -4047,7 +4122,7 @@ var Toolbar = ({
|
|
|
4047
4122
|
{
|
|
4048
4123
|
onClick: () => editor.chain().focus().toggleItalic().run(),
|
|
4049
4124
|
is_active: editor.isActive("italic"),
|
|
4050
|
-
tooltip:
|
|
4125
|
+
tooltip: t5("rte.italic"),
|
|
4051
4126
|
children: /* @__PURE__ */ jsx(LuItalic, { className: "h-4 w-4" })
|
|
4052
4127
|
},
|
|
4053
4128
|
"italic"
|
|
@@ -4061,7 +4136,7 @@ var Toolbar = ({
|
|
|
4061
4136
|
{
|
|
4062
4137
|
onClick: () => editor.chain().focus().toggleUnderline().run(),
|
|
4063
4138
|
is_active: editor.isActive("underline"),
|
|
4064
|
-
tooltip:
|
|
4139
|
+
tooltip: t5("rte.underline"),
|
|
4065
4140
|
children: /* @__PURE__ */ jsx(LuUnderline, { className: "h-4 w-4" })
|
|
4066
4141
|
},
|
|
4067
4142
|
"underline"
|
|
@@ -4075,7 +4150,7 @@ var Toolbar = ({
|
|
|
4075
4150
|
{
|
|
4076
4151
|
onClick: () => editor.chain().focus().toggleStrike().run(),
|
|
4077
4152
|
is_active: editor.isActive("strike"),
|
|
4078
|
-
tooltip:
|
|
4153
|
+
tooltip: t5("rte.strikethrough"),
|
|
4079
4154
|
children: /* @__PURE__ */ jsx(LuStrikethrough, { className: "h-4 w-4" })
|
|
4080
4155
|
},
|
|
4081
4156
|
"strike"
|
|
@@ -4089,7 +4164,7 @@ var Toolbar = ({
|
|
|
4089
4164
|
{
|
|
4090
4165
|
onClick: () => editor.chain().focus().toggleSubscript().run(),
|
|
4091
4166
|
is_active: editor.isActive("subscript"),
|
|
4092
|
-
tooltip:
|
|
4167
|
+
tooltip: t5("rte.subscript"),
|
|
4093
4168
|
children: /* @__PURE__ */ jsx(LuSubscript, { className: "h-4 w-4" })
|
|
4094
4169
|
},
|
|
4095
4170
|
"sub"
|
|
@@ -4103,7 +4178,7 @@ var Toolbar = ({
|
|
|
4103
4178
|
{
|
|
4104
4179
|
onClick: () => editor.chain().focus().toggleSuperscript().run(),
|
|
4105
4180
|
is_active: editor.isActive("superscript"),
|
|
4106
|
-
tooltip:
|
|
4181
|
+
tooltip: t5("rte.superscript"),
|
|
4107
4182
|
children: /* @__PURE__ */ jsx(LuSuperscript, { className: "h-4 w-4" })
|
|
4108
4183
|
},
|
|
4109
4184
|
"super"
|
|
@@ -4117,7 +4192,7 @@ var Toolbar = ({
|
|
|
4117
4192
|
if (tb.link) {
|
|
4118
4193
|
items.push(
|
|
4119
4194
|
/* @__PURE__ */ jsxs(Popover, { open: link_popover_open, onOpenChange: set_link_popover_open, children: [
|
|
4120
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { is_active: editor.isActive("link"), tooltip:
|
|
4195
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { is_active: editor.isActive("link"), tooltip: t5("rte.link"), children: /* @__PURE__ */ jsx(LuLink, { className: "h-4 w-4" }) }) }),
|
|
4121
4196
|
/* @__PURE__ */ jsx(PopoverContent, { className: "w-80 p-3", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
4122
4197
|
/* @__PURE__ */ jsx(
|
|
4123
4198
|
Input,
|
|
@@ -4129,17 +4204,14 @@ var Toolbar = ({
|
|
|
4129
4204
|
}
|
|
4130
4205
|
),
|
|
4131
4206
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
4132
|
-
/* @__PURE__ */
|
|
4133
|
-
editor.isActive("link") ? "Update" : "Add",
|
|
4134
|
-
" Link"
|
|
4135
|
-
] }),
|
|
4207
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", onClick: handle_set_link, className: "flex-1", children: editor.isActive("link") ? t5("rte.update_link") : t5("rte.add_link") }),
|
|
4136
4208
|
editor.isActive("link") && /* @__PURE__ */ jsx(
|
|
4137
4209
|
Button,
|
|
4138
4210
|
{
|
|
4139
4211
|
size: "sm",
|
|
4140
4212
|
variant: "destructive",
|
|
4141
4213
|
onClick: handle_remove_link,
|
|
4142
|
-
children: "
|
|
4214
|
+
children: t5("rte.remove_link")
|
|
4143
4215
|
}
|
|
4144
4216
|
)
|
|
4145
4217
|
] })
|
|
@@ -4153,7 +4225,7 @@ var Toolbar = ({
|
|
|
4153
4225
|
ToolbarButton,
|
|
4154
4226
|
{
|
|
4155
4227
|
onClick: () => editor.chain().focus().unsetAllMarks().clearNodes().run(),
|
|
4156
|
-
tooltip:
|
|
4228
|
+
tooltip: t5("rte.clear_formatting"),
|
|
4157
4229
|
children: /* @__PURE__ */ jsx(LuRemoveFormatting, { className: "h-4 w-4" })
|
|
4158
4230
|
},
|
|
4159
4231
|
"clear"
|
|
@@ -4167,7 +4239,7 @@ var Toolbar = ({
|
|
|
4167
4239
|
if (tb.text_color) {
|
|
4168
4240
|
items.push(
|
|
4169
4241
|
/* @__PURE__ */ jsxs(Popover, { open: text_color_open, onOpenChange: set_text_color_open, children: [
|
|
4170
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip:
|
|
4242
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t5("rte.text_color"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
4171
4243
|
/* @__PURE__ */ jsx(LuPalette, { className: "h-4 w-4" }),
|
|
4172
4244
|
/* @__PURE__ */ jsx(
|
|
4173
4245
|
"div",
|
|
@@ -4210,7 +4282,7 @@ var Toolbar = ({
|
|
|
4210
4282
|
if (tb.highlight_color) {
|
|
4211
4283
|
items.push(
|
|
4212
4284
|
/* @__PURE__ */ jsxs(Popover, { open: highlight_color_open, onOpenChange: set_highlight_color_open, children: [
|
|
4213
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip:
|
|
4285
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t5("rte.highlight_color"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
4214
4286
|
/* @__PURE__ */ jsx(LuHighlighter, { className: "h-4 w-4" }),
|
|
4215
4287
|
/* @__PURE__ */ jsx(
|
|
4216
4288
|
"div",
|
|
@@ -4253,7 +4325,7 @@ var Toolbar = ({
|
|
|
4253
4325
|
{
|
|
4254
4326
|
onClick: () => editor.chain().focus().setTextAlign("left").run(),
|
|
4255
4327
|
is_active: editor.isActive({ textAlign: "left" }),
|
|
4256
|
-
tooltip:
|
|
4328
|
+
tooltip: t5("rte.align_left"),
|
|
4257
4329
|
children: /* @__PURE__ */ jsx(LuAlignLeft, { className: "h-4 w-4" })
|
|
4258
4330
|
},
|
|
4259
4331
|
"align-left"
|
|
@@ -4263,7 +4335,7 @@ var Toolbar = ({
|
|
|
4263
4335
|
{
|
|
4264
4336
|
onClick: () => editor.chain().focus().setTextAlign("center").run(),
|
|
4265
4337
|
is_active: editor.isActive({ textAlign: "center" }),
|
|
4266
|
-
tooltip:
|
|
4338
|
+
tooltip: t5("rte.align_center"),
|
|
4267
4339
|
children: /* @__PURE__ */ jsx(LuAlignCenter, { className: "h-4 w-4" })
|
|
4268
4340
|
},
|
|
4269
4341
|
"align-center"
|
|
@@ -4273,7 +4345,7 @@ var Toolbar = ({
|
|
|
4273
4345
|
{
|
|
4274
4346
|
onClick: () => editor.chain().focus().setTextAlign("right").run(),
|
|
4275
4347
|
is_active: editor.isActive({ textAlign: "right" }),
|
|
4276
|
-
tooltip:
|
|
4348
|
+
tooltip: t5("rte.align_right"),
|
|
4277
4349
|
children: /* @__PURE__ */ jsx(LuAlignRight, { className: "h-4 w-4" })
|
|
4278
4350
|
},
|
|
4279
4351
|
"align-right"
|
|
@@ -4283,7 +4355,7 @@ var Toolbar = ({
|
|
|
4283
4355
|
{
|
|
4284
4356
|
onClick: () => editor.chain().focus().setTextAlign("justify").run(),
|
|
4285
4357
|
is_active: editor.isActive({ textAlign: "justify" }),
|
|
4286
|
-
tooltip:
|
|
4358
|
+
tooltip: t5("rte.justify"),
|
|
4287
4359
|
children: /* @__PURE__ */ jsx(LuAlignJustify, { className: "h-4 w-4" })
|
|
4288
4360
|
},
|
|
4289
4361
|
"align-justify"
|
|
@@ -4299,7 +4371,7 @@ var Toolbar = ({
|
|
|
4299
4371
|
{
|
|
4300
4372
|
onClick: () => editor.chain().focus().toggleBulletList().run(),
|
|
4301
4373
|
is_active: editor.isActive("bulletList"),
|
|
4302
|
-
tooltip:
|
|
4374
|
+
tooltip: t5("rte.bullet_list"),
|
|
4303
4375
|
children: /* @__PURE__ */ jsx(LuList, { className: "h-4 w-4" })
|
|
4304
4376
|
},
|
|
4305
4377
|
"bullet"
|
|
@@ -4313,7 +4385,7 @@ var Toolbar = ({
|
|
|
4313
4385
|
{
|
|
4314
4386
|
onClick: () => editor.chain().focus().toggleOrderedList().run(),
|
|
4315
4387
|
is_active: editor.isActive("orderedList"),
|
|
4316
|
-
tooltip:
|
|
4388
|
+
tooltip: t5("rte.ordered_list"),
|
|
4317
4389
|
children: /* @__PURE__ */ jsx(LuListOrdered, { className: "h-4 w-4" })
|
|
4318
4390
|
},
|
|
4319
4391
|
"ordered"
|
|
@@ -4327,7 +4399,7 @@ var Toolbar = ({
|
|
|
4327
4399
|
{
|
|
4328
4400
|
onClick: () => editor.chain().focus().toggleTaskList().run(),
|
|
4329
4401
|
is_active: editor.isActive("taskList"),
|
|
4330
|
-
tooltip:
|
|
4402
|
+
tooltip: t5("rte.checklist"),
|
|
4331
4403
|
children: /* @__PURE__ */ jsx(LuListChecks, { className: "h-4 w-4" })
|
|
4332
4404
|
},
|
|
4333
4405
|
"task"
|
|
@@ -4349,7 +4421,7 @@ var Toolbar = ({
|
|
|
4349
4421
|
}
|
|
4350
4422
|
},
|
|
4351
4423
|
disabled: !editor.can().liftListItem("listItem") && !editor.can().liftListItem("taskItem"),
|
|
4352
|
-
tooltip:
|
|
4424
|
+
tooltip: t5("rte.decrease_indent"),
|
|
4353
4425
|
children: /* @__PURE__ */ jsx(LuIndentDecrease, { className: "h-4 w-4" })
|
|
4354
4426
|
},
|
|
4355
4427
|
"indent-dec"
|
|
@@ -4365,7 +4437,7 @@ var Toolbar = ({
|
|
|
4365
4437
|
}
|
|
4366
4438
|
},
|
|
4367
4439
|
disabled: !editor.can().sinkListItem("listItem") && !editor.can().sinkListItem("taskItem"),
|
|
4368
|
-
tooltip:
|
|
4440
|
+
tooltip: t5("rte.increase_indent"),
|
|
4369
4441
|
children: /* @__PURE__ */ jsx(LuIndentIncrease, { className: "h-4 w-4" })
|
|
4370
4442
|
},
|
|
4371
4443
|
"indent-inc"
|
|
@@ -4376,7 +4448,7 @@ var Toolbar = ({
|
|
|
4376
4448
|
const items = [];
|
|
4377
4449
|
if (tb.horizontal_rule) {
|
|
4378
4450
|
items.push(
|
|
4379
|
-
/* @__PURE__ */ jsx(ToolbarButton, { onClick: handle_hr_insert, tooltip:
|
|
4451
|
+
/* @__PURE__ */ jsx(ToolbarButton, { onClick: handle_hr_insert, tooltip: t5("rte.horizontal_rule"), children: /* @__PURE__ */ jsx(RxDividerHorizontal, { className: "h-4 w-4" }) }, "hr")
|
|
4380
4452
|
);
|
|
4381
4453
|
}
|
|
4382
4454
|
if (tb.image) {
|
|
@@ -4385,7 +4457,7 @@ var Toolbar = ({
|
|
|
4385
4457
|
ToolbarButton,
|
|
4386
4458
|
{
|
|
4387
4459
|
onClick: () => image_input_ref.current?.click(),
|
|
4388
|
-
tooltip:
|
|
4460
|
+
tooltip: t5("rte.insert_image"),
|
|
4389
4461
|
children: /* @__PURE__ */ jsx(LuImage, { className: "h-4 w-4" })
|
|
4390
4462
|
},
|
|
4391
4463
|
"image"
|
|
@@ -4399,14 +4471,14 @@ var Toolbar = ({
|
|
|
4399
4471
|
ToolbarButton,
|
|
4400
4472
|
{
|
|
4401
4473
|
is_active: editor.isActive("table"),
|
|
4402
|
-
tooltip:
|
|
4474
|
+
tooltip: t5("rte.table"),
|
|
4403
4475
|
children: /* @__PURE__ */ jsx(LuTable, { className: "h-4 w-4" })
|
|
4404
4476
|
}
|
|
4405
4477
|
) }),
|
|
4406
4478
|
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-3", align: "start", children: editor.isActive("table") ? (
|
|
4407
4479
|
// Table editing controls when inside a table
|
|
4408
4480
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
4409
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium mb-1", children: "
|
|
4481
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium mb-1", children: t5("rte.table_operations") }),
|
|
4410
4482
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-1", children: [
|
|
4411
4483
|
/* @__PURE__ */ jsxs(
|
|
4412
4484
|
Button,
|
|
@@ -4417,7 +4489,7 @@ var Toolbar = ({
|
|
|
4417
4489
|
onClick: handle_add_row_before,
|
|
4418
4490
|
children: [
|
|
4419
4491
|
/* @__PURE__ */ jsx(LuTableRowsSplit, { className: "h-3 w-3 mr-1" }),
|
|
4420
|
-
"
|
|
4492
|
+
t5("rte.add_row_above")
|
|
4421
4493
|
]
|
|
4422
4494
|
}
|
|
4423
4495
|
),
|
|
@@ -4430,7 +4502,7 @@ var Toolbar = ({
|
|
|
4430
4502
|
onClick: handle_add_row_after,
|
|
4431
4503
|
children: [
|
|
4432
4504
|
/* @__PURE__ */ jsx(LuTableRowsSplit, { className: "h-3 w-3 mr-1" }),
|
|
4433
|
-
"
|
|
4505
|
+
t5("rte.add_row_below")
|
|
4434
4506
|
]
|
|
4435
4507
|
}
|
|
4436
4508
|
),
|
|
@@ -4443,7 +4515,7 @@ var Toolbar = ({
|
|
|
4443
4515
|
onClick: handle_add_col_before,
|
|
4444
4516
|
children: [
|
|
4445
4517
|
/* @__PURE__ */ jsx(LuTableColumnsSplit, { className: "h-3 w-3 mr-1" }),
|
|
4446
|
-
"
|
|
4518
|
+
t5("rte.add_col_left")
|
|
4447
4519
|
]
|
|
4448
4520
|
}
|
|
4449
4521
|
),
|
|
@@ -4456,7 +4528,7 @@ var Toolbar = ({
|
|
|
4456
4528
|
onClick: handle_add_col_after,
|
|
4457
4529
|
children: [
|
|
4458
4530
|
/* @__PURE__ */ jsx(LuTableColumnsSplit, { className: "h-3 w-3 mr-1" }),
|
|
4459
|
-
"
|
|
4531
|
+
t5("rte.add_col_right")
|
|
4460
4532
|
]
|
|
4461
4533
|
}
|
|
4462
4534
|
),
|
|
@@ -4469,7 +4541,7 @@ var Toolbar = ({
|
|
|
4469
4541
|
onClick: handle_delete_row,
|
|
4470
4542
|
children: [
|
|
4471
4543
|
/* @__PURE__ */ jsx(LuTrash2, { className: "h-3 w-3 mr-1" }),
|
|
4472
|
-
"
|
|
4544
|
+
t5("rte.delete_row")
|
|
4473
4545
|
]
|
|
4474
4546
|
}
|
|
4475
4547
|
),
|
|
@@ -4482,7 +4554,7 @@ var Toolbar = ({
|
|
|
4482
4554
|
onClick: handle_delete_col,
|
|
4483
4555
|
children: [
|
|
4484
4556
|
/* @__PURE__ */ jsx(LuTrash2, { className: "h-3 w-3 mr-1" }),
|
|
4485
|
-
"
|
|
4557
|
+
t5("rte.delete_col")
|
|
4486
4558
|
]
|
|
4487
4559
|
}
|
|
4488
4560
|
)
|
|
@@ -4496,7 +4568,7 @@ var Toolbar = ({
|
|
|
4496
4568
|
onClick: handle_delete_table,
|
|
4497
4569
|
children: [
|
|
4498
4570
|
/* @__PURE__ */ jsx(LuTrash2, { className: "h-3 w-3 mr-1" }),
|
|
4499
|
-
"
|
|
4571
|
+
t5("rte.delete_table")
|
|
4500
4572
|
]
|
|
4501
4573
|
}
|
|
4502
4574
|
)
|
|
@@ -4504,7 +4576,7 @@ var Toolbar = ({
|
|
|
4504
4576
|
) : (
|
|
4505
4577
|
// Table size picker when not in a table
|
|
4506
4578
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
4507
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium mb-1", children: "
|
|
4579
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium mb-1", children: t5("rte.insert_table_heading") }),
|
|
4508
4580
|
/* @__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(
|
|
4509
4581
|
"div",
|
|
4510
4582
|
{
|
|
@@ -4518,9 +4590,9 @@ var Toolbar = ({
|
|
|
4518
4590
|
},
|
|
4519
4591
|
col_idx
|
|
4520
4592
|
)) }, row_idx)) }),
|
|
4521
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs text-center text-muted-foreground", children: hovered_cell ? `${hovered_cell.col} x ${hovered_cell.row}` : "
|
|
4593
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-center text-muted-foreground", children: hovered_cell ? `${hovered_cell.col} x ${hovered_cell.row}` : t5("rte.select_size") }),
|
|
4522
4594
|
/* @__PURE__ */ jsxs("div", { className: "border-t pt-2 mt-1", children: [
|
|
4523
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mb-2", children: "
|
|
4595
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mb-2", children: t5("rte.custom_size") }),
|
|
4524
4596
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4525
4597
|
/* @__PURE__ */ jsx(
|
|
4526
4598
|
Input,
|
|
@@ -4553,7 +4625,7 @@ var Toolbar = ({
|
|
|
4553
4625
|
onClick: () => handle_table_insert(table_rows, table_cols),
|
|
4554
4626
|
children: [
|
|
4555
4627
|
/* @__PURE__ */ jsx(LuGrid3X3, { className: "h-3 w-3 mr-1" }),
|
|
4556
|
-
"
|
|
4628
|
+
t5("rte.insert_table")
|
|
4557
4629
|
]
|
|
4558
4630
|
}
|
|
4559
4631
|
)
|
|
@@ -4571,11 +4643,11 @@ var Toolbar = ({
|
|
|
4571
4643
|
if (tb.variables && variables.length > 0) {
|
|
4572
4644
|
items.push(
|
|
4573
4645
|
/* @__PURE__ */ jsxs(Popover, { open: variables_menu_open, onOpenChange: set_variables_menu_open, children: [
|
|
4574
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip:
|
|
4646
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t5("rte.insert_variable"), children: /* @__PURE__ */ jsx(LuVariable, { className: "h-4 w-4" }) }) }),
|
|
4575
4647
|
/* @__PURE__ */ jsx(PopoverContent, { className: "w-64 p-0", align: "start", children: /* @__PURE__ */ jsxs(Command, { children: [
|
|
4576
|
-
/* @__PURE__ */ jsx(CommandInput, { placeholder: "
|
|
4648
|
+
/* @__PURE__ */ jsx(CommandInput, { placeholder: t5("rte.search_variables"), className: "h-8 text-xs" }),
|
|
4577
4649
|
/* @__PURE__ */ jsxs(CommandList, { children: [
|
|
4578
|
-
/* @__PURE__ */ jsx(CommandEmpty, { children: "
|
|
4650
|
+
/* @__PURE__ */ jsx(CommandEmpty, { children: t5("rte.no_variables") }),
|
|
4579
4651
|
/* @__PURE__ */ jsx(CommandGroup, { children: variables.map((variable) => /* @__PURE__ */ jsx(
|
|
4580
4652
|
CommandItem,
|
|
4581
4653
|
{
|
|
@@ -4600,7 +4672,7 @@ var Toolbar = ({
|
|
|
4600
4672
|
ToolbarButton,
|
|
4601
4673
|
{
|
|
4602
4674
|
onClick: () => file_input_ref.current?.click(),
|
|
4603
|
-
tooltip:
|
|
4675
|
+
tooltip: t5("rte.attach_file"),
|
|
4604
4676
|
children: /* @__PURE__ */ jsx(LuPaperclip, { className: "h-4 w-4" })
|
|
4605
4677
|
},
|
|
4606
4678
|
"attach"
|
|
@@ -4872,6 +4944,7 @@ var VariableExtension = Node.create({
|
|
|
4872
4944
|
};
|
|
4873
4945
|
}
|
|
4874
4946
|
});
|
|
4947
|
+
var t6 = createPackageT("hazo_ui", en_default);
|
|
4875
4948
|
function debounce_fn(func, wait) {
|
|
4876
4949
|
let timeout_id = null;
|
|
4877
4950
|
return (output) => {
|
|
@@ -4888,7 +4961,7 @@ var HazoUiRte = ({
|
|
|
4888
4961
|
attachments: initial_attachments = [],
|
|
4889
4962
|
variables = [],
|
|
4890
4963
|
on_change,
|
|
4891
|
-
placeholder
|
|
4964
|
+
placeholder,
|
|
4892
4965
|
min_height = "200px",
|
|
4893
4966
|
max_height = "400px",
|
|
4894
4967
|
disabled = false,
|
|
@@ -4897,6 +4970,7 @@ var HazoUiRte = ({
|
|
|
4897
4970
|
toolbar,
|
|
4898
4971
|
font_families
|
|
4899
4972
|
}) => {
|
|
4973
|
+
const resolved_placeholder = placeholder ?? t6("rte.placeholder");
|
|
4900
4974
|
const [attachments, set_attachments] = React27.useState(
|
|
4901
4975
|
initial_attachments
|
|
4902
4976
|
);
|
|
@@ -4946,7 +5020,7 @@ var HazoUiRte = ({
|
|
|
4946
5020
|
}
|
|
4947
5021
|
}),
|
|
4948
5022
|
Placeholder.configure({
|
|
4949
|
-
placeholder
|
|
5023
|
+
placeholder: resolved_placeholder
|
|
4950
5024
|
}),
|
|
4951
5025
|
HorizontalRule,
|
|
4952
5026
|
Table.configure({
|
|
@@ -5121,7 +5195,7 @@ var HazoUiRte = ({
|
|
|
5121
5195
|
);
|
|
5122
5196
|
};
|
|
5123
5197
|
HazoUiRte.displayName = "HazoUiRte";
|
|
5124
|
-
var
|
|
5198
|
+
var t7 = createPackageT("hazo_ui", en_default);
|
|
5125
5199
|
function CanvasTextToolbar({
|
|
5126
5200
|
bold,
|
|
5127
5201
|
italic,
|
|
@@ -5152,14 +5226,14 @@ function CanvasTextToolbar({
|
|
|
5152
5226
|
),
|
|
5153
5227
|
style,
|
|
5154
5228
|
children: [
|
|
5155
|
-
/* @__PURE__ */ jsx(ToolbarButton, { is_active: bold, onClick: onBold, tooltip:
|
|
5156
|
-
/* @__PURE__ */ jsx(ToolbarButton, { is_active: italic, onClick: onItalic, tooltip:
|
|
5229
|
+
/* @__PURE__ */ jsx(ToolbarButton, { is_active: bold, onClick: onBold, tooltip: t7("canvas_toolbar.bold"), children: /* @__PURE__ */ jsx(LuBold, { className: "h-4 w-4" }) }),
|
|
5230
|
+
/* @__PURE__ */ jsx(ToolbarButton, { is_active: italic, onClick: onItalic, tooltip: t7("canvas_toolbar.italic"), children: /* @__PURE__ */ jsx(LuItalic, { className: "h-4 w-4" }) }),
|
|
5157
5231
|
/* @__PURE__ */ jsx(
|
|
5158
5232
|
ToolbarButton,
|
|
5159
5233
|
{
|
|
5160
5234
|
is_active: underline,
|
|
5161
5235
|
onClick: onUnderline,
|
|
5162
|
-
tooltip:
|
|
5236
|
+
tooltip: t7("canvas_toolbar.underline"),
|
|
5163
5237
|
children: /* @__PURE__ */ jsx(LuUnderline, { className: "h-4 w-4" })
|
|
5164
5238
|
}
|
|
5165
5239
|
),
|
|
@@ -5169,7 +5243,7 @@ function CanvasTextToolbar({
|
|
|
5169
5243
|
{
|
|
5170
5244
|
is_active: align === "left",
|
|
5171
5245
|
onClick: () => onAlign?.("left"),
|
|
5172
|
-
tooltip:
|
|
5246
|
+
tooltip: t7("canvas_toolbar.align_left"),
|
|
5173
5247
|
children: /* @__PURE__ */ jsx(LuAlignLeft, { className: "h-4 w-4" })
|
|
5174
5248
|
}
|
|
5175
5249
|
),
|
|
@@ -5178,7 +5252,7 @@ function CanvasTextToolbar({
|
|
|
5178
5252
|
{
|
|
5179
5253
|
is_active: align === "center",
|
|
5180
5254
|
onClick: () => onAlign?.("center"),
|
|
5181
|
-
tooltip:
|
|
5255
|
+
tooltip: t7("canvas_toolbar.align_center"),
|
|
5182
5256
|
children: /* @__PURE__ */ jsx(LuAlignCenter, { className: "h-4 w-4" })
|
|
5183
5257
|
}
|
|
5184
5258
|
),
|
|
@@ -5187,7 +5261,7 @@ function CanvasTextToolbar({
|
|
|
5187
5261
|
{
|
|
5188
5262
|
is_active: align === "right",
|
|
5189
5263
|
onClick: () => onAlign?.("right"),
|
|
5190
|
-
tooltip:
|
|
5264
|
+
tooltip: t7("canvas_toolbar.align_right"),
|
|
5191
5265
|
children: /* @__PURE__ */ jsx(LuAlignRight, { className: "h-4 w-4" })
|
|
5192
5266
|
}
|
|
5193
5267
|
),
|
|
@@ -5196,7 +5270,7 @@ function CanvasTextToolbar({
|
|
|
5196
5270
|
"label",
|
|
5197
5271
|
{
|
|
5198
5272
|
className: "relative flex h-8 w-8 cursor-pointer items-center justify-center rounded-md hover:bg-accent",
|
|
5199
|
-
title:
|
|
5273
|
+
title: t7("canvas_toolbar.text_color"),
|
|
5200
5274
|
children: [
|
|
5201
5275
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
5202
5276
|
/* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-muted-foreground", children: "A" }),
|
|
@@ -5226,7 +5300,7 @@ function CanvasTextToolbar({
|
|
|
5226
5300
|
{
|
|
5227
5301
|
is_active: verticalAlign === "top",
|
|
5228
5302
|
onClick: () => onVerticalAlign?.("top"),
|
|
5229
|
-
tooltip:
|
|
5303
|
+
tooltip: t7("canvas_toolbar.align_top"),
|
|
5230
5304
|
children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyStart, { className: "h-4 w-4" })
|
|
5231
5305
|
}
|
|
5232
5306
|
),
|
|
@@ -5235,7 +5309,7 @@ function CanvasTextToolbar({
|
|
|
5235
5309
|
{
|
|
5236
5310
|
is_active: verticalAlign === "middle",
|
|
5237
5311
|
onClick: () => onVerticalAlign?.("middle"),
|
|
5238
|
-
tooltip:
|
|
5312
|
+
tooltip: t7("canvas_toolbar.align_middle"),
|
|
5239
5313
|
children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyCenter, { className: "h-4 w-4" })
|
|
5240
5314
|
}
|
|
5241
5315
|
),
|
|
@@ -5244,7 +5318,7 @@ function CanvasTextToolbar({
|
|
|
5244
5318
|
{
|
|
5245
5319
|
is_active: verticalAlign === "bottom",
|
|
5246
5320
|
onClick: () => onVerticalAlign?.("bottom"),
|
|
5247
|
-
tooltip:
|
|
5321
|
+
tooltip: t7("canvas_toolbar.align_bottom"),
|
|
5248
5322
|
children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyEnd, { className: "h-4 w-4" })
|
|
5249
5323
|
}
|
|
5250
5324
|
),
|
|
@@ -5255,7 +5329,7 @@ function CanvasTextToolbar({
|
|
|
5255
5329
|
value: font,
|
|
5256
5330
|
onChange: (e) => onFont?.(e.target.value),
|
|
5257
5331
|
className: "h-8 text-xs rounded-md border border-border bg-background px-1 text-foreground focus:outline-none",
|
|
5258
|
-
title:
|
|
5332
|
+
title: t7("canvas_toolbar.font_family"),
|
|
5259
5333
|
children: [
|
|
5260
5334
|
/* @__PURE__ */ jsx("option", { value: "sans-serif", children: "Sans" }),
|
|
5261
5335
|
/* @__PURE__ */ jsx("option", { value: "serif", children: "Serif" }),
|
|
@@ -5267,12 +5341,12 @@ function CanvasTextToolbar({
|
|
|
5267
5341
|
}
|
|
5268
5342
|
),
|
|
5269
5343
|
/* @__PURE__ */ jsx("div", { className: "mx-1 h-6 w-px bg-border" }),
|
|
5270
|
-
/* @__PURE__ */ jsx(ToolbarButton, { is_active: bullet, onClick: onBullet, tooltip:
|
|
5344
|
+
/* @__PURE__ */ jsx(ToolbarButton, { is_active: bullet, onClick: onBullet, tooltip: t7("canvas_toolbar.bullet_list"), children: /* @__PURE__ */ jsx(LuList, { className: "h-4 w-4" }) })
|
|
5271
5345
|
]
|
|
5272
5346
|
}
|
|
5273
5347
|
) });
|
|
5274
5348
|
}
|
|
5275
|
-
var
|
|
5349
|
+
var t8 = createPackageT("hazo_ui", en_default);
|
|
5276
5350
|
var MdEditorLazy = lazy(() => import('@uiw/react-md-editor'));
|
|
5277
5351
|
var EDITOR_TEXTAREA_SELECTOR = ".w-md-editor-text-input";
|
|
5278
5352
|
function MarkdownEditor({
|
|
@@ -5362,13 +5436,13 @@ function MarkdownEditor({
|
|
|
5362
5436
|
try {
|
|
5363
5437
|
const url = await onImageUpload(file);
|
|
5364
5438
|
if (!url) {
|
|
5365
|
-
setError(
|
|
5439
|
+
setError(t8("markdown.upload_failed"));
|
|
5366
5440
|
onChange(before + after);
|
|
5367
5441
|
return;
|
|
5368
5442
|
}
|
|
5369
5443
|
onChange(before + `` + after);
|
|
5370
5444
|
} catch {
|
|
5371
|
-
setError(
|
|
5445
|
+
setError(t8("markdown.upload_failed"));
|
|
5372
5446
|
onChange(before + after);
|
|
5373
5447
|
} finally {
|
|
5374
5448
|
setUploading(false);
|
|
@@ -5392,7 +5466,7 @@ function MarkdownEditor({
|
|
|
5392
5466
|
{
|
|
5393
5467
|
className: "flex items-center justify-center rounded-md border border-border bg-muted/30 text-sm text-muted-foreground",
|
|
5394
5468
|
style: { height },
|
|
5395
|
-
children:
|
|
5469
|
+
children: t8("markdown.loading_editor")
|
|
5396
5470
|
}
|
|
5397
5471
|
),
|
|
5398
5472
|
children: /* @__PURE__ */ jsx(
|
|
@@ -5404,7 +5478,7 @@ function MarkdownEditor({
|
|
|
5404
5478
|
preview: effectivePreview,
|
|
5405
5479
|
visibleDragbar: false,
|
|
5406
5480
|
commands: editorCommands,
|
|
5407
|
-
textareaProps: { placeholder: placeholder ??
|
|
5481
|
+
textareaProps: { placeholder: placeholder ?? t8("markdown.placeholder"), onPaste: handlePaste }
|
|
5408
5482
|
}
|
|
5409
5483
|
)
|
|
5410
5484
|
}
|
|
@@ -5413,7 +5487,7 @@ function MarkdownEditor({
|
|
|
5413
5487
|
{
|
|
5414
5488
|
className: "flex items-center justify-center rounded-md border border-border bg-muted/30 text-sm text-muted-foreground",
|
|
5415
5489
|
style: { height },
|
|
5416
|
-
children:
|
|
5490
|
+
children: t8("markdown.loading_editor")
|
|
5417
5491
|
}
|
|
5418
5492
|
) }),
|
|
5419
5493
|
useCustomPreview && showPreview && /* @__PURE__ */ jsx(
|
|
@@ -5427,7 +5501,7 @@ function MarkdownEditor({
|
|
|
5427
5501
|
]
|
|
5428
5502
|
}
|
|
5429
5503
|
),
|
|
5430
|
-
uploading && /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-muted-foreground", children:
|
|
5504
|
+
uploading && /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: t8("markdown.uploading_image") }),
|
|
5431
5505
|
error && /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-destructive", children: error })
|
|
5432
5506
|
] });
|
|
5433
5507
|
}
|
|
@@ -6126,6 +6200,7 @@ var Text = Node.create({
|
|
|
6126
6200
|
renderMarkdown: (node) => node.text || ""
|
|
6127
6201
|
});
|
|
6128
6202
|
var index_default3 = Text;
|
|
6203
|
+
var t9 = createPackageT("hazo_ui", en_default);
|
|
6129
6204
|
var SingleLineDocument = index_default.extend({
|
|
6130
6205
|
content: "paragraph"
|
|
6131
6206
|
});
|
|
@@ -6163,7 +6238,7 @@ var HazoUiTextbox = ({
|
|
|
6163
6238
|
value,
|
|
6164
6239
|
default_value,
|
|
6165
6240
|
prefixes,
|
|
6166
|
-
placeholder
|
|
6241
|
+
placeholder,
|
|
6167
6242
|
disabled = false,
|
|
6168
6243
|
className,
|
|
6169
6244
|
pill_variant = "default",
|
|
@@ -6174,6 +6249,7 @@ var HazoUiTextbox = ({
|
|
|
6174
6249
|
on_command_change,
|
|
6175
6250
|
on_command_remove
|
|
6176
6251
|
}) => {
|
|
6252
|
+
const resolved_placeholder = placeholder ?? t9("textbox.placeholder");
|
|
6177
6253
|
const generated_instance_id = React27.useId();
|
|
6178
6254
|
const instance_id = provided_instance_id || generated_instance_id;
|
|
6179
6255
|
const [suggestion_state, set_suggestion_state] = React27.useState(null);
|
|
@@ -6206,7 +6282,7 @@ var HazoUiTextbox = ({
|
|
|
6206
6282
|
index_default2,
|
|
6207
6283
|
index_default3,
|
|
6208
6284
|
Placeholder.configure({
|
|
6209
|
-
placeholder
|
|
6285
|
+
placeholder: resolved_placeholder
|
|
6210
6286
|
}),
|
|
6211
6287
|
CommandNodeExtension.configure({}),
|
|
6212
6288
|
...suggestion_extensions
|
|
@@ -6585,7 +6661,7 @@ var HazoUiTextbox = ({
|
|
|
6585
6661
|
edit_selected_index === edit_commands.length && "bg-destructive/10"
|
|
6586
6662
|
),
|
|
6587
6663
|
onClick: handle_command_remove,
|
|
6588
|
-
children: /* @__PURE__ */ jsx("span", { children: "
|
|
6664
|
+
children: /* @__PURE__ */ jsx("span", { children: t9("common.remove") })
|
|
6589
6665
|
}
|
|
6590
6666
|
)
|
|
6591
6667
|
] })
|
|
@@ -6663,6 +6739,7 @@ var HardBreak = Node.create({
|
|
|
6663
6739
|
}
|
|
6664
6740
|
});
|
|
6665
6741
|
var index_default4 = HardBreak;
|
|
6742
|
+
var t10 = createPackageT("hazo_ui", en_default);
|
|
6666
6743
|
var get_editor_output2 = (editor) => {
|
|
6667
6744
|
if (!editor) {
|
|
6668
6745
|
return { plain_text: "", display_text: "", commands: [] };
|
|
@@ -6717,7 +6794,7 @@ var HazoUiTextarea = ({
|
|
|
6717
6794
|
value,
|
|
6718
6795
|
default_value,
|
|
6719
6796
|
prefixes,
|
|
6720
|
-
placeholder
|
|
6797
|
+
placeholder,
|
|
6721
6798
|
disabled = false,
|
|
6722
6799
|
className,
|
|
6723
6800
|
pill_variant = "default",
|
|
@@ -6731,6 +6808,7 @@ var HazoUiTextarea = ({
|
|
|
6731
6808
|
on_command_change,
|
|
6732
6809
|
on_command_remove
|
|
6733
6810
|
}) => {
|
|
6811
|
+
const resolved_placeholder = placeholder ?? t10("textarea.placeholder");
|
|
6734
6812
|
const generated_instance_id = React27.useId();
|
|
6735
6813
|
const instance_id = provided_instance_id || generated_instance_id;
|
|
6736
6814
|
const [suggestion_state, set_suggestion_state] = React27.useState(null);
|
|
@@ -6765,7 +6843,7 @@ var HazoUiTextarea = ({
|
|
|
6765
6843
|
index_default3,
|
|
6766
6844
|
index_default4,
|
|
6767
6845
|
Placeholder.configure({
|
|
6768
|
-
placeholder
|
|
6846
|
+
placeholder: resolved_placeholder
|
|
6769
6847
|
}),
|
|
6770
6848
|
CommandNodeExtension.configure({}),
|
|
6771
6849
|
...suggestion_extensions
|
|
@@ -7155,7 +7233,7 @@ var HazoUiTextarea = ({
|
|
|
7155
7233
|
backgroundColor: edit_selected_index === edit_commands.length ? "rgba(239, 68, 68, 0.1)" : "inherit"
|
|
7156
7234
|
},
|
|
7157
7235
|
onClick: handle_command_remove,
|
|
7158
|
-
children: /* @__PURE__ */ jsx("span", { children: "
|
|
7236
|
+
children: /* @__PURE__ */ jsx("span", { children: t10("common.remove") })
|
|
7159
7237
|
}
|
|
7160
7238
|
)
|
|
7161
7239
|
] })
|
|
@@ -7215,7 +7293,7 @@ function resolve_animation_classes(open_anim = "zoom", close_anim = "zoom") {
|
|
|
7215
7293
|
const close_classes = close_anim in ANIMATION_PRESETS ? ANIMATION_PRESETS[close_anim].close : close_anim;
|
|
7216
7294
|
return `${open_classes} ${close_classes}`;
|
|
7217
7295
|
}
|
|
7218
|
-
var
|
|
7296
|
+
var t11 = createPackageT("hazo_ui", en_default);
|
|
7219
7297
|
var VARIANT_PRESETS = {
|
|
7220
7298
|
info: {
|
|
7221
7299
|
header_background_color: "var(--dialog-info-bg)",
|
|
@@ -7309,11 +7387,11 @@ function HazoUiDialog({
|
|
|
7309
7387
|
const cancel_ref = React27.useRef(null);
|
|
7310
7388
|
const variant_preset = variant !== "default" ? VARIANT_PRESETS[variant] : is_status_kind || is_confirm_kind ? NEUTRAL_VARIANT_PRESET : void 0;
|
|
7311
7389
|
const resolved_action_button_variant = actionButtonVariant ?? variant_preset?.action_button_variant ?? "default";
|
|
7312
|
-
const resolved_title = title ??
|
|
7313
|
-
const resolved_cancel_text = cancelButtonText ??
|
|
7390
|
+
const resolved_title = title ?? t11("dialog.default_title");
|
|
7391
|
+
const resolved_cancel_text = cancelButtonText ?? t11("dialog.cancel");
|
|
7314
7392
|
const showCancelButton = showCancelButtonProp ?? (is_status_kind ? false : true);
|
|
7315
7393
|
const closeOnConfirm = closeOnConfirmProp ?? (is_status_kind || is_confirm_kind ? true : false);
|
|
7316
|
-
const actionButtonText = actionButtonTextProp ?? (is_status_kind ?
|
|
7394
|
+
const actionButtonText = actionButtonTextProp ?? (is_status_kind ? t11("dialog.ok") : is_confirm_kind ? showCancelButton ? t11("dialog.confirm") : t11("dialog.ok") : t11("dialog.confirm"));
|
|
7317
7395
|
const actionButtonLoading = actionButtonLoadingProp ?? (is_confirm_kind ? internal_confirm_loading : false);
|
|
7318
7396
|
const handleConfirm = () => {
|
|
7319
7397
|
if (is_confirm_kind) {
|
|
@@ -7640,7 +7718,7 @@ function HazoUiDialog({
|
|
|
7640
7718
|
style: headerBar ? { color: "var(--dialog-header-bar-fg)" } : finalHeaderTextColor ? { color: finalHeaderTextColor } : void 0,
|
|
7641
7719
|
children: [
|
|
7642
7720
|
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
7643
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children:
|
|
7721
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: t11("dialog.close") })
|
|
7644
7722
|
]
|
|
7645
7723
|
}
|
|
7646
7724
|
)
|
|
@@ -7649,7 +7727,7 @@ function HazoUiDialog({
|
|
|
7649
7727
|
)
|
|
7650
7728
|
] }) });
|
|
7651
7729
|
}
|
|
7652
|
-
var
|
|
7730
|
+
var t12 = createPackageT("hazo_ui", en_default);
|
|
7653
7731
|
function HazoUiConfirmDialog({
|
|
7654
7732
|
open,
|
|
7655
7733
|
onOpenChange,
|
|
@@ -7658,7 +7736,7 @@ function HazoUiConfirmDialog({
|
|
|
7658
7736
|
children,
|
|
7659
7737
|
variant = "default",
|
|
7660
7738
|
confirmLabel,
|
|
7661
|
-
cancelLabel =
|
|
7739
|
+
cancelLabel = t12("confirm.cancel"),
|
|
7662
7740
|
showCancelButton = true,
|
|
7663
7741
|
onConfirm,
|
|
7664
7742
|
onCancel,
|
|
@@ -7707,7 +7785,7 @@ var Slider = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
7707
7785
|
}
|
|
7708
7786
|
));
|
|
7709
7787
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
7710
|
-
var
|
|
7788
|
+
var t13 = createPackageT("hazo_ui", en_default);
|
|
7711
7789
|
async function getCroppedImg(imageSrc, areaPixels, outputSize, quality) {
|
|
7712
7790
|
const img = await new Promise((resolve, reject) => {
|
|
7713
7791
|
const image = new Image();
|
|
@@ -7761,7 +7839,7 @@ var HazoUiImageCropper = React27.forwardRef(function HazoUiImageCropper2({
|
|
|
7761
7839
|
y: 0
|
|
7762
7840
|
});
|
|
7763
7841
|
const [zoom, set_zoom] = React27.useState(1);
|
|
7764
|
-
const resolved_zoom_label = zoomLabel ??
|
|
7842
|
+
const resolved_zoom_label = zoomLabel ?? t13("cropper.zoom");
|
|
7765
7843
|
const cropped_area_pixels_ref = React27.useRef(null);
|
|
7766
7844
|
const handle_crop_complete = React27.useCallback(
|
|
7767
7845
|
(_croppedArea, croppedAreaPixels) => {
|
|
@@ -7836,7 +7914,7 @@ var HazoUiImageCropper = React27.forwardRef(function HazoUiImageCropper2({
|
|
|
7836
7914
|
] });
|
|
7837
7915
|
});
|
|
7838
7916
|
HazoUiImageCropper.displayName = "HazoUiImageCropper";
|
|
7839
|
-
var
|
|
7917
|
+
var t14 = createPackageT("hazo_ui", en_default);
|
|
7840
7918
|
function HazoUiImageCropperDialog({
|
|
7841
7919
|
open,
|
|
7842
7920
|
onOpenChange,
|
|
@@ -7850,10 +7928,10 @@ function HazoUiImageCropperDialog({
|
|
|
7850
7928
|
outputSize = 512,
|
|
7851
7929
|
quality = 0.9
|
|
7852
7930
|
}) {
|
|
7853
|
-
const resolved_title = title ??
|
|
7854
|
-
const resolved_confirm_label = confirmLabel ??
|
|
7855
|
-
const resolved_cancel_label = cancelLabel ??
|
|
7856
|
-
const resolved_zoom_label = zoomLabel ??
|
|
7931
|
+
const resolved_title = title ?? t14("cropper.title");
|
|
7932
|
+
const resolved_confirm_label = confirmLabel ?? t14("cropper.save");
|
|
7933
|
+
const resolved_cancel_label = cancelLabel ?? t14("cropper.cancel");
|
|
7934
|
+
const resolved_zoom_label = zoomLabel ?? t14("cropper.zoom");
|
|
7857
7935
|
const cropper_ref = React27.useRef(null);
|
|
7858
7936
|
const [image_src, set_image_src] = React27.useState(null);
|
|
7859
7937
|
const [is_confirming, set_is_confirming] = React27.useState(false);
|
|
@@ -8339,6 +8417,7 @@ var CardFooter = React27.forwardRef(
|
|
|
8339
8417
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
8340
8418
|
);
|
|
8341
8419
|
CardFooter.displayName = "CardFooter";
|
|
8420
|
+
var t15 = createPackageT("hazo_ui", en_default);
|
|
8342
8421
|
function Spinner({ className, size = "md" }) {
|
|
8343
8422
|
const sizeClasses = { sm: "h-4 w-4", md: "h-8 w-8", lg: "h-12 w-12" };
|
|
8344
8423
|
return /* @__PURE__ */ jsx(
|
|
@@ -8346,8 +8425,8 @@ function Spinner({ className, size = "md" }) {
|
|
|
8346
8425
|
{
|
|
8347
8426
|
className: cn("animate-spin rounded-full border-2 border-current border-t-transparent text-primary", sizeClasses[size], className),
|
|
8348
8427
|
role: "status",
|
|
8349
|
-
"aria-label": "
|
|
8350
|
-
children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "
|
|
8428
|
+
"aria-label": t15("spinner.loading"),
|
|
8429
|
+
children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: t15("spinner.loading_text") })
|
|
8351
8430
|
}
|
|
8352
8431
|
);
|
|
8353
8432
|
}
|
|
@@ -8483,6 +8562,7 @@ var InputAffix = React27.forwardRef(
|
|
|
8483
8562
|
}
|
|
8484
8563
|
);
|
|
8485
8564
|
InputAffix.displayName = "InputAffix";
|
|
8565
|
+
var t16 = createPackageT("hazo_ui", en_default);
|
|
8486
8566
|
var SkeletonBase = React27.forwardRef(
|
|
8487
8567
|
({ className, ...rest }, ref) => /* @__PURE__ */ jsx(
|
|
8488
8568
|
"div",
|
|
@@ -8524,18 +8604,19 @@ function SkeletonRect({ width = "100%", height = 96, radius = 6, className }) {
|
|
|
8524
8604
|
}
|
|
8525
8605
|
);
|
|
8526
8606
|
}
|
|
8527
|
-
function SkeletonGroup({ label
|
|
8607
|
+
function SkeletonGroup({ label, children, className, ...rest }) {
|
|
8608
|
+
const resolved_label = label ?? t16("skeleton.loading_content");
|
|
8528
8609
|
return /* @__PURE__ */ jsxs(
|
|
8529
8610
|
"div",
|
|
8530
8611
|
{
|
|
8531
8612
|
role: "status",
|
|
8532
8613
|
"aria-busy": "true",
|
|
8533
|
-
"aria-label":
|
|
8614
|
+
"aria-label": resolved_label,
|
|
8534
8615
|
className: cn("space-y-2", className),
|
|
8535
8616
|
...rest,
|
|
8536
8617
|
children: [
|
|
8537
8618
|
children,
|
|
8538
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children:
|
|
8619
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: resolved_label })
|
|
8539
8620
|
]
|
|
8540
8621
|
}
|
|
8541
8622
|
);
|
|
@@ -8570,7 +8651,7 @@ function EmptyState({
|
|
|
8570
8651
|
}
|
|
8571
8652
|
);
|
|
8572
8653
|
}
|
|
8573
|
-
var
|
|
8654
|
+
var t17 = createPackageT("hazo_ui", en_default);
|
|
8574
8655
|
function ErrorBanner({
|
|
8575
8656
|
severity = "error",
|
|
8576
8657
|
title,
|
|
@@ -8605,7 +8686,7 @@ function ErrorBanner({
|
|
|
8605
8686
|
{
|
|
8606
8687
|
type: "button",
|
|
8607
8688
|
onClick: onDismiss,
|
|
8608
|
-
"aria-label":
|
|
8689
|
+
"aria-label": t17("error.dismiss"),
|
|
8609
8690
|
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",
|
|
8610
8691
|
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
8611
8692
|
}
|
|
@@ -8614,9 +8695,9 @@ function ErrorBanner({
|
|
|
8614
8695
|
}
|
|
8615
8696
|
);
|
|
8616
8697
|
}
|
|
8617
|
-
var
|
|
8698
|
+
var t18 = createPackageT("hazo_ui", en_default);
|
|
8618
8699
|
function ErrorPage({
|
|
8619
|
-
title
|
|
8700
|
+
title,
|
|
8620
8701
|
description,
|
|
8621
8702
|
errorCode,
|
|
8622
8703
|
correlationId,
|
|
@@ -8624,6 +8705,7 @@ function ErrorPage({
|
|
|
8624
8705
|
illustration,
|
|
8625
8706
|
className
|
|
8626
8707
|
}) {
|
|
8708
|
+
const resolved_title = title ?? t18("error.something_went_wrong");
|
|
8627
8709
|
return /* @__PURE__ */ jsxs(
|
|
8628
8710
|
"div",
|
|
8629
8711
|
{
|
|
@@ -8636,10 +8718,10 @@ function ErrorPage({
|
|
|
8636
8718
|
children: [
|
|
8637
8719
|
/* @__PURE__ */ jsx("div", { className: "text-destructive", children: illustration ?? /* @__PURE__ */ jsx(OctagonAlert, { className: "h-16 w-16", "aria-hidden": "true" }) }),
|
|
8638
8720
|
errorCode ? /* @__PURE__ */ jsx("div", { className: "rounded-full bg-muted px-3 py-1 text-xs font-mono uppercase tracking-wider text-muted-foreground", children: errorCode }) : null,
|
|
8639
|
-
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-semibold text-foreground", children:
|
|
8721
|
+
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-semibold text-foreground", children: resolved_title }),
|
|
8640
8722
|
description ? /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children: description }) : null,
|
|
8641
8723
|
correlationId ? /* @__PURE__ */ jsxs("div", { className: "w-full rounded-md border bg-muted/40 px-3 py-2 text-left", children: [
|
|
8642
|
-
/* @__PURE__ */ jsx("div", { className: "text-[10px] uppercase tracking-wider text-muted-foreground", children: "
|
|
8724
|
+
/* @__PURE__ */ jsx("div", { className: "text-[10px] uppercase tracking-wider text-muted-foreground", children: t18("error.correlation_id") }),
|
|
8643
8725
|
/* @__PURE__ */ jsx("code", { className: "break-all text-xs", children: correlationId })
|
|
8644
8726
|
] }) : null,
|
|
8645
8727
|
actions ? /* @__PURE__ */ jsx("div", { className: "mt-2 flex flex-wrap items-center justify-center gap-2", children: actions }) : null
|
|
@@ -8647,16 +8729,17 @@ function ErrorPage({
|
|
|
8647
8729
|
}
|
|
8648
8730
|
);
|
|
8649
8731
|
}
|
|
8650
|
-
var
|
|
8732
|
+
var t19 = createPackageT("hazo_ui", en_default);
|
|
8651
8733
|
function LoadingTimeout({
|
|
8652
8734
|
active,
|
|
8653
8735
|
children,
|
|
8654
8736
|
skeleton,
|
|
8655
8737
|
onRetry,
|
|
8656
8738
|
thresholds,
|
|
8657
|
-
label
|
|
8739
|
+
label,
|
|
8658
8740
|
className
|
|
8659
8741
|
}) {
|
|
8742
|
+
const resolved_label = label ?? t19("loading.default_label");
|
|
8660
8743
|
const timeouts = {
|
|
8661
8744
|
gentle: thresholds?.gentle ?? 5e3,
|
|
8662
8745
|
firm: thresholds?.firm ?? 15e3,
|
|
@@ -8686,15 +8769,15 @@ function LoadingTimeout({
|
|
|
8686
8769
|
ErrorBanner,
|
|
8687
8770
|
{
|
|
8688
8771
|
severity: "error",
|
|
8689
|
-
title:
|
|
8690
|
-
message:
|
|
8772
|
+
title: t19("loading.taking_longer"),
|
|
8773
|
+
message: t19("loading.still_loading", { label: resolved_label }),
|
|
8691
8774
|
action: onRetry ? /* @__PURE__ */ jsx(
|
|
8692
8775
|
"button",
|
|
8693
8776
|
{
|
|
8694
8777
|
type: "button",
|
|
8695
8778
|
onClick: onRetry,
|
|
8696
8779
|
className: "rounded bg-foreground/10 px-3 py-1.5 text-sm font-medium hover:bg-foreground/15",
|
|
8697
|
-
children: "
|
|
8780
|
+
children: t19("loading.try_again")
|
|
8698
8781
|
}
|
|
8699
8782
|
) : null
|
|
8700
8783
|
}
|
|
@@ -8702,12 +8785,8 @@ function LoadingTimeout({
|
|
|
8702
8785
|
}
|
|
8703
8786
|
return /* @__PURE__ */ jsxs("div", { className, role: "status", "aria-busy": "true", "aria-live": "polite", children: [
|
|
8704
8787
|
skeleton,
|
|
8705
|
-
phase === "gentle" ? /* @__PURE__ */
|
|
8706
|
-
|
|
8707
|
-
label,
|
|
8708
|
-
"\u2026"
|
|
8709
|
-
] }) : null,
|
|
8710
|
-
phase === "firm" ? /* @__PURE__ */ jsx("div", { className: "mt-3 text-center text-sm text-muted-foreground", children: "Still working on it \u2014 almost there." }) : null
|
|
8788
|
+
phase === "gentle" ? /* @__PURE__ */ jsx("div", { className: "mt-3 text-center text-sm text-muted-foreground", children: t19("loading.gentle_message", { label: resolved_label }) }) : null,
|
|
8789
|
+
phase === "firm" ? /* @__PURE__ */ jsx("div", { className: "mt-3 text-center text-sm text-muted-foreground", children: t19("loading.firm_message") }) : null
|
|
8711
8790
|
] });
|
|
8712
8791
|
}
|
|
8713
8792
|
function ProgressiveImage({
|
|
@@ -8788,7 +8867,7 @@ function NotificationCountBadge({
|
|
|
8788
8867
|
}
|
|
8789
8868
|
);
|
|
8790
8869
|
}
|
|
8791
|
-
var
|
|
8870
|
+
var t20 = createPackageT("hazo_ui", en_default);
|
|
8792
8871
|
function NotificationItem({
|
|
8793
8872
|
isRead,
|
|
8794
8873
|
timestamp,
|
|
@@ -8819,7 +8898,7 @@ function NotificationItem({
|
|
|
8819
8898
|
/* @__PURE__ */ jsx("div", { className: "cls_notification_item_dot_col flex-shrink-0 pt-1.5", children: !isRead ? /* @__PURE__ */ jsx(
|
|
8820
8899
|
"span",
|
|
8821
8900
|
{
|
|
8822
|
-
"aria-label":
|
|
8901
|
+
"aria-label": t20("notification.unread"),
|
|
8823
8902
|
className: "cls_notification_item_dot block w-2 h-2 rounded-full bg-primary"
|
|
8824
8903
|
}
|
|
8825
8904
|
) : /* @__PURE__ */ jsx("span", { className: "block w-2 h-2", "aria-hidden": "true" }) }),
|
|
@@ -8843,13 +8922,13 @@ function NotificationItem({
|
|
|
8843
8922
|
}
|
|
8844
8923
|
);
|
|
8845
8924
|
}
|
|
8846
|
-
var
|
|
8925
|
+
var t21 = createPackageT("hazo_ui", en_default);
|
|
8847
8926
|
function LoadingSkeletons() {
|
|
8848
8927
|
return /* @__PURE__ */ jsx(
|
|
8849
8928
|
"div",
|
|
8850
8929
|
{
|
|
8851
8930
|
"aria-busy": "true",
|
|
8852
|
-
"aria-label":
|
|
8931
|
+
"aria-label": t21("notification.loading"),
|
|
8853
8932
|
className: "cls_notification_panel_loading space-y-0",
|
|
8854
8933
|
children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs(
|
|
8855
8934
|
"div",
|
|
@@ -8908,7 +8987,7 @@ function NotificationPanel({
|
|
|
8908
8987
|
}
|
|
8909
8988
|
);
|
|
8910
8989
|
}
|
|
8911
|
-
var
|
|
8990
|
+
var t22 = createPackageT("hazo_ui", en_default);
|
|
8912
8991
|
function HazoUiToaster({
|
|
8913
8992
|
position = "bottom-right",
|
|
8914
8993
|
closeButton = true,
|
|
@@ -8954,12 +9033,14 @@ function permissionToast({
|
|
|
8954
9033
|
action,
|
|
8955
9034
|
duration = 5e3
|
|
8956
9035
|
}) {
|
|
8957
|
-
const description = missingPermissions.length === 0 ?
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
|
|
9036
|
+
const description = missingPermissions.length === 0 ? t22("toast.permission_denied_message") : t22("toast.missing_prefix", {
|
|
9037
|
+
items: missingPermissions.map((key) => {
|
|
9038
|
+
const label = descriptions?.[key];
|
|
9039
|
+
return label ? `\`${key}\` \u2014 ${label}` : `\`${key}\``;
|
|
9040
|
+
}).join("; ")
|
|
9041
|
+
});
|
|
8961
9042
|
return errorToast({
|
|
8962
|
-
title:
|
|
9043
|
+
title: t22("toast.permission_required"),
|
|
8963
9044
|
description,
|
|
8964
9045
|
action,
|
|
8965
9046
|
duration
|
|
@@ -9217,6 +9298,7 @@ function use_fullscreen() {
|
|
|
9217
9298
|
const { isFullscreen, toggle } = useFullscreen(ref);
|
|
9218
9299
|
return { is_fullscreen: isFullscreen, toggle, ref };
|
|
9219
9300
|
}
|
|
9301
|
+
var t23 = createPackageT("hazo_ui", en_default);
|
|
9220
9302
|
function KanbanCard({
|
|
9221
9303
|
item,
|
|
9222
9304
|
renderCard,
|
|
@@ -9278,7 +9360,7 @@ function KanbanCard({
|
|
|
9278
9360
|
...listeners,
|
|
9279
9361
|
role: "button",
|
|
9280
9362
|
tabIndex: 0,
|
|
9281
|
-
"aria-roledescription": "
|
|
9363
|
+
"aria-roledescription": t23("kanban.draggable_card"),
|
|
9282
9364
|
"aria-grabbed": isDragging,
|
|
9283
9365
|
onDoubleClick: () => {
|
|
9284
9366
|
if (showEdit && onEditRequest && !dragging) onEditRequest(item);
|
|
@@ -9603,7 +9685,7 @@ function KanbanLaneStrip({
|
|
|
9603
9685
|
}
|
|
9604
9686
|
);
|
|
9605
9687
|
}
|
|
9606
|
-
var
|
|
9688
|
+
var t24 = createPackageT("hazo_ui", en_default);
|
|
9607
9689
|
var DEFAULT_PRIORITIES = ["P0", "P1", "P2", "P3"];
|
|
9608
9690
|
function humanize(key) {
|
|
9609
9691
|
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(" ");
|
|
@@ -9618,7 +9700,7 @@ function auto_detect_fields(item, columns) {
|
|
|
9618
9700
|
}
|
|
9619
9701
|
}
|
|
9620
9702
|
if (columns.length > 0) {
|
|
9621
|
-
out.push({ key: "columnKey", type: "status", label:
|
|
9703
|
+
out.push({ key: "columnKey", type: "status", label: t24("kanban.status_label") });
|
|
9622
9704
|
}
|
|
9623
9705
|
return out;
|
|
9624
9706
|
}
|
|
@@ -9715,7 +9797,7 @@ function KanbanEditor({
|
|
|
9715
9797
|
isDirty: is_dirty
|
|
9716
9798
|
};
|
|
9717
9799
|
const open = item !== null;
|
|
9718
|
-
const title = item && titleFn ? titleFn(item) : item ?
|
|
9800
|
+
const title = item && titleFn ? titleFn(item) : item ? t24("kanban.edit_fallback", { id: item.id }) : "";
|
|
9719
9801
|
const priority_var = item?.priority ? `--hazo-kanban-priority-${String(item.priority).toLowerCase()}` : null;
|
|
9720
9802
|
const header_bar_color = priority_var ? `hsl(var(${priority_var}))` : void 0;
|
|
9721
9803
|
const use_default_footer = !(renderBody && hideFooter);
|
|
@@ -9727,18 +9809,18 @@ function KanbanEditor({
|
|
|
9727
9809
|
if (!o && !saving) onClose();
|
|
9728
9810
|
},
|
|
9729
9811
|
title,
|
|
9730
|
-
description:
|
|
9812
|
+
description: t24("kanban.update_description"),
|
|
9731
9813
|
sizeWidth: "min(90vw, 480px)",
|
|
9732
9814
|
openAnimation: "none",
|
|
9733
9815
|
closeAnimation: "none",
|
|
9734
9816
|
headerBar: !!priority_var,
|
|
9735
9817
|
headerBarColor: header_bar_color,
|
|
9736
9818
|
contentClassName: cn("cls_hazo_kanban_editor", priority_var && "pt-0"),
|
|
9737
|
-
actionButtonText: saving ?
|
|
9819
|
+
actionButtonText: saving ? t24("kanban.saving") : t24("kanban.save"),
|
|
9738
9820
|
actionButtonIcon: saving ? void 0 : /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 mr-2" }),
|
|
9739
9821
|
actionButtonLoading: saving,
|
|
9740
9822
|
actionButtonDisabled: !is_dirty || !all_required_filled || saving,
|
|
9741
|
-
cancelButtonText:
|
|
9823
|
+
cancelButtonText: t24("kanban.cancel"),
|
|
9742
9824
|
showCancelButton: true,
|
|
9743
9825
|
onConfirm: handle_save,
|
|
9744
9826
|
onCancel: onClose,
|
|
@@ -9843,7 +9925,7 @@ function KanbanEditorFieldRow({
|
|
|
9843
9925
|
/* @__PURE__ */ jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsx(
|
|
9844
9926
|
SelectValue,
|
|
9845
9927
|
{
|
|
9846
|
-
placeholder: field.placeholder ??
|
|
9928
|
+
placeholder: field.placeholder ?? t24("kanban.select_placeholder", { label })
|
|
9847
9929
|
}
|
|
9848
9930
|
) }),
|
|
9849
9931
|
/* @__PURE__ */ jsx(SelectContent, { children: (field.options ?? []).map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt, children: opt }, opt)) })
|
|
@@ -9859,7 +9941,7 @@ function KanbanEditorFieldRow({
|
|
|
9859
9941
|
/* @__PURE__ */ jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsx(
|
|
9860
9942
|
SelectValue,
|
|
9861
9943
|
{
|
|
9862
|
-
placeholder: field.placeholder ??
|
|
9944
|
+
placeholder: field.placeholder ?? t24("kanban.select_priority")
|
|
9863
9945
|
}
|
|
9864
9946
|
) }),
|
|
9865
9947
|
/* @__PURE__ */ jsx(SelectContent, { children: priorities.map((p) => /* @__PURE__ */ jsx(SelectItem, { value: p, children: p }, p)) })
|
|
@@ -9875,7 +9957,7 @@ function KanbanEditorFieldRow({
|
|
|
9875
9957
|
/* @__PURE__ */ jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsx(
|
|
9876
9958
|
SelectValue,
|
|
9877
9959
|
{
|
|
9878
|
-
placeholder: field.placeholder ??
|
|
9960
|
+
placeholder: field.placeholder ?? t24("kanban.select_status")
|
|
9879
9961
|
}
|
|
9880
9962
|
) }),
|
|
9881
9963
|
/* @__PURE__ */ jsx(SelectContent, { children: columns.map((col) => /* @__PURE__ */ jsx(SelectItem, { value: col.key, children: col.title }, col.key)) })
|
|
@@ -9884,6 +9966,7 @@ function KanbanEditorFieldRow({
|
|
|
9884
9966
|
)
|
|
9885
9967
|
] });
|
|
9886
9968
|
}
|
|
9969
|
+
var t25 = createPackageT("hazo_ui", en_default);
|
|
9887
9970
|
var EMPTY_FILTER = {
|
|
9888
9971
|
search: "",
|
|
9889
9972
|
categories: [],
|
|
@@ -9891,7 +9974,7 @@ var EMPTY_FILTER = {
|
|
|
9891
9974
|
};
|
|
9892
9975
|
function HazoUiKanbanFilter({
|
|
9893
9976
|
search = true,
|
|
9894
|
-
searchPlaceholder
|
|
9977
|
+
searchPlaceholder,
|
|
9895
9978
|
categories,
|
|
9896
9979
|
priorities,
|
|
9897
9980
|
value,
|
|
@@ -9899,6 +9982,7 @@ function HazoUiKanbanFilter({
|
|
|
9899
9982
|
onChange,
|
|
9900
9983
|
className
|
|
9901
9984
|
}) {
|
|
9985
|
+
const resolved_search_placeholder = searchPlaceholder ?? t25("common.search");
|
|
9902
9986
|
const is_controlled = value !== void 0;
|
|
9903
9987
|
const [internal, set_internal] = React27.useState(
|
|
9904
9988
|
defaultValue ?? EMPTY_FILTER
|
|
@@ -9925,7 +10009,7 @@ function HazoUiKanbanFilter({
|
|
|
9925
10009
|
{
|
|
9926
10010
|
value: current.search,
|
|
9927
10011
|
onChange: (e) => update({ ...current, search: e.target.value }),
|
|
9928
|
-
placeholder:
|
|
10012
|
+
placeholder: resolved_search_placeholder,
|
|
9929
10013
|
className: "cls_hazo_kanban_filter_search w-full sm:w-64"
|
|
9930
10014
|
}
|
|
9931
10015
|
),
|
|
@@ -10010,16 +10094,25 @@ function applyKanbanFilter(items, filter) {
|
|
|
10010
10094
|
return true;
|
|
10011
10095
|
});
|
|
10012
10096
|
}
|
|
10097
|
+
var t26 = createPackageT("hazo_ui", en_default);
|
|
10013
10098
|
var UNMATCHED_LANE_KEY = "__hazo_lane_unmatched__";
|
|
10014
10099
|
function bucket_key(lane_key, column_key) {
|
|
10015
10100
|
return lane_key == null ? column_key : `${lane_key}\0${column_key}`;
|
|
10016
10101
|
}
|
|
10017
10102
|
function default_announcements(itemLabel) {
|
|
10018
10103
|
return {
|
|
10019
|
-
onDragStart: ({ item, fromColumn }) =>
|
|
10020
|
-
onDragOver: ({ item, overColumn }) => overColumn ?
|
|
10021
|
-
onDragEnd: ({ item, fromColumn, toColumn, newIndex }) => fromColumn === toColumn ?
|
|
10022
|
-
|
|
10104
|
+
onDragStart: ({ item, fromColumn }) => t26("kanban.dnd_pickup", { item: itemLabel(item), column: fromColumn }),
|
|
10105
|
+
onDragOver: ({ item, overColumn }) => overColumn ? t26("kanban.dnd_over", { item: itemLabel(item), column: overColumn }) : "",
|
|
10106
|
+
onDragEnd: ({ item, fromColumn, toColumn, newIndex }) => fromColumn === toColumn ? t26("kanban.dnd_reorder", {
|
|
10107
|
+
item: itemLabel(item),
|
|
10108
|
+
pos: newIndex + 1,
|
|
10109
|
+
column: toColumn
|
|
10110
|
+
}) : t26("kanban.dnd_drop", {
|
|
10111
|
+
item: itemLabel(item),
|
|
10112
|
+
column: toColumn,
|
|
10113
|
+
pos: newIndex + 1
|
|
10114
|
+
}),
|
|
10115
|
+
onDragCancel: ({ item, fromColumn }) => t26("kanban.dnd_cancel", { item: itemLabel(item), column: fromColumn })
|
|
10023
10116
|
};
|
|
10024
10117
|
}
|
|
10025
10118
|
function group_items_by_column(items, overlay, columns, lanes) {
|
|
@@ -10823,7 +10916,7 @@ function serializeFilter(filter) {
|
|
|
10823
10916
|
const fields = (filter.fields ?? []).map((f) => `${f.field}:${f.operator ?? ""}:${String(f.value)}`).join(",");
|
|
10824
10917
|
return `${filter.search ?? ""}|${fields}`;
|
|
10825
10918
|
}
|
|
10826
|
-
var
|
|
10919
|
+
var t27 = createPackageT("hazo_ui", en_default);
|
|
10827
10920
|
function HazoUiTable(props) {
|
|
10828
10921
|
const state = useTableState(props);
|
|
10829
10922
|
const { columns, rows, getRowKey, className, caption } = props;
|
|
@@ -10858,12 +10951,12 @@ function HazoUiTable(props) {
|
|
|
10858
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(
|
|
10859
10952
|
EmptyState,
|
|
10860
10953
|
{
|
|
10861
|
-
title: typeof props.empty === "string" && props.empty ||
|
|
10954
|
+
title: typeof props.empty === "string" && props.empty || t27("table.empty")
|
|
10862
10955
|
}
|
|
10863
10956
|
) : props.empty : typeof props.noResults === "string" || props.noResults === void 0 ? /* @__PURE__ */ jsx(
|
|
10864
10957
|
EmptyState,
|
|
10865
10958
|
{
|
|
10866
|
-
title: typeof props.noResults === "string" && props.noResults ||
|
|
10959
|
+
title: typeof props.noResults === "string" && props.noResults || t27("table.no_results")
|
|
10867
10960
|
}
|
|
10868
10961
|
) : props.noResults }) : /* @__PURE__ */ jsx(
|
|
10869
10962
|
TableMobileCards,
|
|
@@ -10886,7 +10979,7 @@ function HazoUiTable(props) {
|
|
|
10886
10979
|
{
|
|
10887
10980
|
type: "button",
|
|
10888
10981
|
onClick: (e) => state.cycleHeaderSort(c.key, e.shiftKey),
|
|
10889
|
-
title:
|
|
10982
|
+
title: t27("table.sort_tooltip"),
|
|
10890
10983
|
className: "cls_hazo_ui_table_sort_btn inline-flex items-center gap-1 hover:text-foreground",
|
|
10891
10984
|
children: [
|
|
10892
10985
|
/* @__PURE__ */ jsx("span", { children: c.label }),
|
|
@@ -10918,12 +11011,12 @@ function HazoUiTable(props) {
|
|
|
10918
11011
|
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(
|
|
10919
11012
|
EmptyState,
|
|
10920
11013
|
{
|
|
10921
|
-
title: typeof props.empty === "string" && props.empty ||
|
|
11014
|
+
title: typeof props.empty === "string" && props.empty || t27("table.empty")
|
|
10922
11015
|
}
|
|
10923
11016
|
) : 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(
|
|
10924
11017
|
EmptyState,
|
|
10925
11018
|
{
|
|
10926
|
-
title: typeof props.noResults === "string" && props.noResults ||
|
|
11019
|
+
title: typeof props.noResults === "string" && props.noResults || t27("table.no_results")
|
|
10927
11020
|
}
|
|
10928
11021
|
) : props.noResults })
|
|
10929
11022
|
}
|
|
@@ -11037,7 +11130,7 @@ function PaginationFooter({
|
|
|
11037
11130
|
const end = Math.min((page + 1) * pageSize, total);
|
|
11038
11131
|
const lastPage = Math.max(0, Math.ceil(total / pageSize) - 1);
|
|
11039
11132
|
return /* @__PURE__ */ jsxs("div", { className: "cls_hazo_ui_table_pagination flex items-center justify-between gap-3 pt-2 text-sm", children: [
|
|
11040
|
-
/* @__PURE__ */ jsx("span", { className: "cls_hazo_ui_table_page_counter text-muted-foreground", children:
|
|
11133
|
+
/* @__PURE__ */ jsx("span", { className: "cls_hazo_ui_table_page_counter text-muted-foreground", children: t27("table.showing", {
|
|
11041
11134
|
start: String(start),
|
|
11042
11135
|
end: String(end),
|
|
11043
11136
|
total: String(total)
|
|
@@ -11050,8 +11143,8 @@ function PaginationFooter({
|
|
|
11050
11143
|
size: "sm",
|
|
11051
11144
|
onClick: () => onPageChange(Math.max(0, page - 1)),
|
|
11052
11145
|
disabled: page === 0,
|
|
11053
|
-
"aria-label":
|
|
11054
|
-
children:
|
|
11146
|
+
"aria-label": t27("table.prev_aria"),
|
|
11147
|
+
children: t27("table.prev")
|
|
11055
11148
|
}
|
|
11056
11149
|
),
|
|
11057
11150
|
/* @__PURE__ */ jsx(
|
|
@@ -11061,8 +11154,8 @@ function PaginationFooter({
|
|
|
11061
11154
|
size: "sm",
|
|
11062
11155
|
onClick: () => onPageChange(Math.min(lastPage, page + 1)),
|
|
11063
11156
|
disabled: page >= lastPage,
|
|
11064
|
-
"aria-label":
|
|
11065
|
-
children:
|
|
11157
|
+
"aria-label": t27("table.next_aria"),
|
|
11158
|
+
children: t27("table.next")
|
|
11066
11159
|
}
|
|
11067
11160
|
)
|
|
11068
11161
|
] })
|
|
@@ -11106,7 +11199,7 @@ function Toolbar2(props) {
|
|
|
11106
11199
|
setSearchValue(v);
|
|
11107
11200
|
onSearchChange(v);
|
|
11108
11201
|
},
|
|
11109
|
-
placeholder: searchPlaceholder ??
|
|
11202
|
+
placeholder: searchPlaceholder ?? t27("table.search_placeholder"),
|
|
11110
11203
|
className: "cls_hazo_ui_table_search w-full sm:max-w-xs"
|
|
11111
11204
|
}
|
|
11112
11205
|
) : /* @__PURE__ */ jsx("div", {}),
|
|
@@ -11154,8 +11247,8 @@ function renderErrorState(error, serverError) {
|
|
|
11154
11247
|
return /* @__PURE__ */ jsx(
|
|
11155
11248
|
EmptyState,
|
|
11156
11249
|
{
|
|
11157
|
-
title:
|
|
11158
|
-
description: msg ||
|
|
11250
|
+
title: t27("table.error_title"),
|
|
11251
|
+
description: msg || t27("table.error_description")
|
|
11159
11252
|
}
|
|
11160
11253
|
);
|
|
11161
11254
|
}
|
|
@@ -11391,7 +11484,7 @@ function StackedBars({
|
|
|
11391
11484
|
}
|
|
11392
11485
|
);
|
|
11393
11486
|
}
|
|
11394
|
-
var
|
|
11487
|
+
var t28 = createPackageT("hazo_ui", en_default);
|
|
11395
11488
|
function DateRangeSelector({
|
|
11396
11489
|
value,
|
|
11397
11490
|
onChange,
|
|
@@ -11399,7 +11492,7 @@ function DateRangeSelector({
|
|
|
11399
11492
|
className,
|
|
11400
11493
|
ariaLabel
|
|
11401
11494
|
}) {
|
|
11402
|
-
const resolved_aria = ariaLabel ??
|
|
11495
|
+
const resolved_aria = ariaLabel ?? t28("charts.date_range");
|
|
11403
11496
|
return /* @__PURE__ */ jsx(
|
|
11404
11497
|
"div",
|
|
11405
11498
|
{
|
|
@@ -11431,6 +11524,7 @@ function DateRangeSelector({
|
|
|
11431
11524
|
}
|
|
11432
11525
|
);
|
|
11433
11526
|
}
|
|
11527
|
+
var t29 = createPackageT("hazo_ui", en_default);
|
|
11434
11528
|
var PAD_LEFT2 = 80;
|
|
11435
11529
|
var PAD_RIGHT2 = 72;
|
|
11436
11530
|
var PAD_TOP2 = 12;
|
|
@@ -11581,12 +11675,12 @@ function FunnelChart({
|
|
|
11581
11675
|
const bubble_anchor_y = bar_y + BAR_H / 2;
|
|
11582
11676
|
const lines = [
|
|
11583
11677
|
{ text: step.label, accent: true },
|
|
11584
|
-
{ text:
|
|
11585
|
-
{ text:
|
|
11678
|
+
{ text: t29("charts.total", { value: fmt(total) }), accent: false },
|
|
11679
|
+
{ text: t29("charts.pct_of_first", { pct: pct_first }), accent: false }
|
|
11586
11680
|
];
|
|
11587
11681
|
if (i > 0) {
|
|
11588
|
-
lines.push({ text:
|
|
11589
|
-
lines.push({ text:
|
|
11682
|
+
lines.push({ text: t29("charts.pct_of_prev", { pct: pct_prev }), accent: false });
|
|
11683
|
+
lines.push({ text: t29("charts.dropoff", { value: fmt(dropoff) }), accent: false });
|
|
11590
11684
|
}
|
|
11591
11685
|
if (step.segments) {
|
|
11592
11686
|
step.segments.forEach((seg) => {
|
|
@@ -11647,7 +11741,7 @@ function FunnelChart({
|
|
|
11647
11741
|
|
|
11648
11742
|
// src/assets/celebration-chime.mp3
|
|
11649
11743
|
var celebration_chime_default = "data:text/plain;charset=utf-8,";
|
|
11650
|
-
var
|
|
11744
|
+
var t30 = createPackageT("hazo_ui", en_default);
|
|
11651
11745
|
var CELEBRATION_GRADIENT = "linear-gradient(135deg, #667eea 0%, #764ba2 100%)";
|
|
11652
11746
|
var CARD_SIZE = 1080;
|
|
11653
11747
|
var PREVIEW_SIZE = 400;
|
|
@@ -11845,7 +11939,7 @@ function CelebrationModalInner({
|
|
|
11845
11939
|
{
|
|
11846
11940
|
className: "cls_celebration_close_btn absolute top-3 right-3 z-10 p-1.5 rounded-full hover:bg-black/10 transition-colors",
|
|
11847
11941
|
onClick: close_modal,
|
|
11848
|
-
"aria-label":
|
|
11942
|
+
"aria-label": t30("celebration.close"),
|
|
11849
11943
|
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4 text-gray-600" })
|
|
11850
11944
|
}
|
|
11851
11945
|
),
|
|
@@ -11908,21 +12002,21 @@ function CelebrationModalInner({
|
|
|
11908
12002
|
disabled: is_downloading,
|
|
11909
12003
|
children: [
|
|
11910
12004
|
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" }),
|
|
11911
|
-
|
|
12005
|
+
t30("celebration.download_png")
|
|
11912
12006
|
]
|
|
11913
12007
|
}
|
|
11914
12008
|
),
|
|
11915
12009
|
can_share && /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: handle_share, children: [
|
|
11916
12010
|
/* @__PURE__ */ jsx(Share2, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
11917
|
-
|
|
12011
|
+
t30("celebration.share")
|
|
11918
12012
|
] }),
|
|
11919
12013
|
/* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: handle_copy, children: [
|
|
11920
12014
|
/* @__PURE__ */ jsx(Copy, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
11921
|
-
|
|
12015
|
+
t30("celebration.copy_image")
|
|
11922
12016
|
] })
|
|
11923
12017
|
] })
|
|
11924
12018
|
] }),
|
|
11925
|
-
!shareableCard && /* @__PURE__ */ jsx("div", { className: "cls_celebration_footer pb-8", children: /* @__PURE__ */ jsx(Button, { size: "sm", onClick: close_modal, children:
|
|
12019
|
+
!shareableCard && /* @__PURE__ */ jsx("div", { className: "cls_celebration_footer pb-8", children: /* @__PURE__ */ jsx(Button, { size: "sm", onClick: close_modal, children: t30("celebration.dismiss") }) })
|
|
11926
12020
|
]
|
|
11927
12021
|
}
|
|
11928
12022
|
)
|
|
@@ -11944,8 +12038,8 @@ function computeEta(durationWindow, unitCount, concurrency = 1, fallbackUnitMs =
|
|
|
11944
12038
|
}
|
|
11945
12039
|
function easeToward(elapsed, eta, maxCap = 0.95) {
|
|
11946
12040
|
if (eta <= 0 || elapsed <= 0) return 0;
|
|
11947
|
-
const
|
|
11948
|
-
return maxCap * (1 - Math.exp(-1.5 *
|
|
12041
|
+
const t35 = elapsed / eta;
|
|
12042
|
+
return maxCap * (1 - Math.exp(-1.5 * t35));
|
|
11949
12043
|
}
|
|
11950
12044
|
function HazoUiProgressBar({
|
|
11951
12045
|
value,
|
|
@@ -12121,7 +12215,7 @@ function upsertEntry(entries, entry) {
|
|
|
12121
12215
|
function removeEntry(entries, id) {
|
|
12122
12216
|
return entries.filter((e) => e.id !== id);
|
|
12123
12217
|
}
|
|
12124
|
-
var
|
|
12218
|
+
var t31 = createPackageT("hazo_ui", en_default);
|
|
12125
12219
|
function HazoUiMemoryDropdown({
|
|
12126
12220
|
history_key,
|
|
12127
12221
|
placeholder,
|
|
@@ -12129,8 +12223,8 @@ function HazoUiMemoryDropdown({
|
|
|
12129
12223
|
add_entry,
|
|
12130
12224
|
empty_label
|
|
12131
12225
|
}) {
|
|
12132
|
-
const resolved_placeholder = placeholder ??
|
|
12133
|
-
const resolved_empty_label = empty_label ??
|
|
12226
|
+
const resolved_placeholder = placeholder ?? t31("memory.search_placeholder");
|
|
12227
|
+
const resolved_empty_label = empty_label ?? t31("memory.no_history");
|
|
12134
12228
|
const { value: stored, setValue } = useHazoState(history_key, {
|
|
12135
12229
|
level: "scope",
|
|
12136
12230
|
fallback: []
|
|
@@ -12255,7 +12349,7 @@ function EntryRow({ entry, on_select, onDelete }) {
|
|
|
12255
12349
|
onClick: (e) => onDelete(entry.id, e),
|
|
12256
12350
|
onMouseEnter: () => setDeleteHovered(true),
|
|
12257
12351
|
onMouseLeave: () => setDeleteHovered(false),
|
|
12258
|
-
"aria-label":
|
|
12352
|
+
"aria-label": t31("memory.remove_aria", { label: entry.label }),
|
|
12259
12353
|
style: {
|
|
12260
12354
|
flexShrink: 0,
|
|
12261
12355
|
background: "none",
|
|
@@ -12274,6 +12368,7 @@ function EntryRow({ entry, on_select, onDelete }) {
|
|
|
12274
12368
|
}
|
|
12275
12369
|
);
|
|
12276
12370
|
}
|
|
12371
|
+
var t32 = createPackageT("hazo_ui", en_default);
|
|
12277
12372
|
function Logo({
|
|
12278
12373
|
logoUrl,
|
|
12279
12374
|
logoUrlDark,
|
|
@@ -12283,7 +12378,7 @@ function Logo({
|
|
|
12283
12378
|
className,
|
|
12284
12379
|
imgClassName
|
|
12285
12380
|
}) {
|
|
12286
|
-
const alt = appTitle ?? "
|
|
12381
|
+
const alt = appTitle ?? t32("app_logo.alt_fallback");
|
|
12287
12382
|
let content = null;
|
|
12288
12383
|
if (logoUrl) {
|
|
12289
12384
|
content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
@@ -12318,11 +12413,12 @@ function Logo({
|
|
|
12318
12413
|
}
|
|
12319
12414
|
return /* @__PURE__ */ jsx("div", { className: cn("inline-flex items-center gap-2", className), children: content });
|
|
12320
12415
|
}
|
|
12416
|
+
var t33 = createPackageT("hazo_ui", en_default);
|
|
12321
12417
|
function AppHeader({ identity, homeHref, navItems, actions, className }) {
|
|
12322
12418
|
return /* @__PURE__ */ jsxs(
|
|
12323
12419
|
"header",
|
|
12324
12420
|
{
|
|
12325
|
-
"aria-label": "
|
|
12421
|
+
"aria-label": t33("app_header.aria_label"),
|
|
12326
12422
|
className: cn(
|
|
12327
12423
|
"flex w-full items-center justify-between gap-4 border-b bg-navbar text-navbar-fg border-navbar-border px-4 py-2.5",
|
|
12328
12424
|
className
|
|
@@ -12830,6 +12926,7 @@ function HazoBrowserTab({
|
|
|
12830
12926
|
}
|
|
12831
12927
|
);
|
|
12832
12928
|
}
|
|
12929
|
+
var t34 = createPackageT("hazo_ui", en_default);
|
|
12833
12930
|
var native_name_cache = /* @__PURE__ */ new Map();
|
|
12834
12931
|
function get_native_name(code) {
|
|
12835
12932
|
const cached = native_name_cache.get(code);
|
|
@@ -12901,9 +12998,10 @@ function LocalePicker({
|
|
|
12901
12998
|
flags = false,
|
|
12902
12999
|
alternates,
|
|
12903
13000
|
activeLocale,
|
|
12904
|
-
triggerLabel
|
|
13001
|
+
triggerLabel,
|
|
12905
13002
|
className
|
|
12906
13003
|
}) {
|
|
13004
|
+
const resolved_trigger_label = triggerLabel ?? t34("locale_picker.change_language");
|
|
12907
13005
|
const options = React27.useMemo(() => {
|
|
12908
13006
|
return Object.entries(alternates ?? {}).map(([code, url]) => {
|
|
12909
13007
|
const href = safeHref(url);
|
|
@@ -12918,7 +13016,7 @@ function LocalePicker({
|
|
|
12918
13016
|
return /* @__PURE__ */ jsx(
|
|
12919
13017
|
"nav",
|
|
12920
13018
|
{
|
|
12921
|
-
"aria-label":
|
|
13019
|
+
"aria-label": resolved_trigger_label,
|
|
12922
13020
|
className: cn("cls_locale_picker_inline flex items-center gap-1", className),
|
|
12923
13021
|
children: options.map((opt) => /* @__PURE__ */ jsxs(
|
|
12924
13022
|
"a",
|
|
@@ -12948,7 +13046,7 @@ function LocalePicker({
|
|
|
12948
13046
|
variant: "outline",
|
|
12949
13047
|
size: "sm",
|
|
12950
13048
|
lang: activeLocale,
|
|
12951
|
-
"aria-label":
|
|
13049
|
+
"aria-label": resolved_trigger_label,
|
|
12952
13050
|
className: cn("cls_locale_picker_trigger gap-1.5", className),
|
|
12953
13051
|
children: [
|
|
12954
13052
|
flags && /* @__PURE__ */ jsx(FlagIcon, { code: active_option?.code ?? options[0].code }),
|