hazo_ui 6.11.2 → 6.12.3

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/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { twMerge } from 'tailwind-merge';
4
4
  import * as React27 from 'react';
5
5
  import React27__default, { lazy, useRef, useState, useCallback, useEffect, useMemo, Fragment, Suspense, useSyncExternalStore } from 'react';
6
6
  import { generateRequestId } from 'hazo_core';
7
- import { optional_import, withContext, setBrowserCorrelationId } from 'hazo_core/client';
7
+ import { withContext, setBrowserCorrelationId } from 'hazo_core/client';
8
8
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
9
9
  import { Slot } from '@radix-ui/react-slot';
10
10
  import { cva } from 'class-variance-authority';
@@ -15,6 +15,7 @@ import * as SelectPrimitive from '@radix-ui/react-select';
15
15
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
16
16
  import { DayPicker } from 'react-day-picker';
17
17
  import { format } from 'date-fns';
18
+ import { createPackageT, resolvePackageLocale } from 'hazo_core/i18n';
18
19
  import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter, pointerWithin, rectIntersection, closestCorners, DragOverlay, useDroppable } from '@dnd-kit/core';
19
20
  import { sortableKeyboardCoordinates, SortableContext, verticalListSortingStrategy, arrayMove, useSortable } from '@dnd-kit/sortable';
20
21
  import { CSS } from '@dnd-kit/utilities';
@@ -111,8 +112,8 @@ var require_extends = __commonJS({
111
112
  function _extends11() {
112
113
  return module.exports = _extends11 = Object.assign ? Object.assign.bind() : function(n) {
113
114
  for (var e = 1; e < arguments.length; e++) {
114
- var t4 = arguments[e];
115
- for (var r in t4) ({}).hasOwnProperty.call(t4, r) && (n[r] = t4[r]);
115
+ var t14 = arguments[e];
116
+ for (var r in t14) ({}).hasOwnProperty.call(t14, r) && (n[r] = t14[r]);
116
117
  }
117
118
  return n;
118
119
  }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends11.apply(null, arguments);
@@ -126,12 +127,12 @@ var require_objectWithoutPropertiesLoose = __commonJS({
126
127
  "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js"(exports, module) {
127
128
  function _objectWithoutPropertiesLoose10(r, e) {
128
129
  if (null == r) return {};
129
- var t4 = {};
130
+ var t14 = {};
130
131
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
131
132
  if (-1 !== e.indexOf(n)) continue;
132
- t4[n] = r[n];
133
+ t14[n] = r[n];
133
134
  }
134
- return t4;
135
+ return t14;
135
136
  }
136
137
  module.exports = _objectWithoutPropertiesLoose10, module.exports.__esModule = true, module.exports["default"] = module.exports;
137
138
  }
@@ -642,47 +643,6 @@ function Calendar({
642
643
  );
643
644
  }
644
645
  Calendar.displayName = "Calendar";
645
- var hazo_i18n_module = null;
646
- void optional_import("hazo_i18n").then((mod) => {
647
- hazo_i18n_module = mod;
648
- }).catch(() => {
649
- hazo_i18n_module = null;
650
- });
651
- function interpolate(template, vars) {
652
- if (!vars) return template;
653
- return template.replace(
654
- /\{\{\s*(\w+)\s*\}\}/g,
655
- (whole, name) => Object.prototype.hasOwnProperty.call(vars, name) ? vars[name] : whole
656
- );
657
- }
658
- function createPackageT(namespace, fallbackCatalog) {
659
- return function t4(key, vars) {
660
- const mod = hazo_i18n_module;
661
- if (mod && typeof mod.t === "function") {
662
- try {
663
- const translated = mod.t(`${namespace}.${key}`, vars);
664
- if (typeof translated === "string" && translated.length > 0) {
665
- return translated;
666
- }
667
- } catch {
668
- }
669
- }
670
- const template = fallbackCatalog[key];
671
- if (template === void 0) return key;
672
- return interpolate(template, vars);
673
- };
674
- }
675
- function resolvePackageLocale(defaultLocale) {
676
- const mod = hazo_i18n_module;
677
- if (mod && typeof mod.getStaticLocale === "function") {
678
- try {
679
- const locale = mod.getStaticLocale();
680
- if (typeof locale === "string" && locale.length > 0) return locale;
681
- } catch {
682
- }
683
- }
684
- return defaultLocale;
685
- }
686
646
 
687
647
  // src/locales/en.json
688
648
  var en_default = {
@@ -755,7 +715,39 @@ var en_default = {
755
715
  "filter.no_fields_available": "No fields available.",
756
716
  "filter.clear_all": "Clear all",
757
717
  "filter.cancel": "Cancel",
758
- "filter.apply": "Apply"
718
+ "filter.apply": "Apply",
719
+ "sort.title": "Sort",
720
+ "sort.description": "Add fields to sort by, drag to reorder, toggle ascending or descending.",
721
+ "sort.search_fields": "Search fields...",
722
+ "sort.open_dialog_aria": "Open sort dialog",
723
+ "sort.clear_all": "Clear all",
724
+ "sort.cancel": "Cancel",
725
+ "sort.apply": "Apply",
726
+ "canvas_toolbar.bold": "Bold",
727
+ "canvas_toolbar.italic": "Italic",
728
+ "canvas_toolbar.underline": "Underline",
729
+ "canvas_toolbar.align_left": "Align left",
730
+ "canvas_toolbar.align_center": "Align center",
731
+ "canvas_toolbar.align_right": "Align right",
732
+ "canvas_toolbar.text_color": "Text color",
733
+ "canvas_toolbar.font_family": "Font family",
734
+ "canvas_toolbar.align_top": "Align top",
735
+ "canvas_toolbar.align_middle": "Align middle",
736
+ "canvas_toolbar.align_bottom": "Align bottom",
737
+ "canvas_toolbar.bullet_list": "Bullet list",
738
+ "toast.permission_required": "Permission required",
739
+ "toast.permission_denied_message": "You do not have permission to perform this action.",
740
+ "error.something_went_wrong": "Something went wrong",
741
+ "error.dismiss": "Dismiss",
742
+ "loading.taking_longer": "This is taking longer than expected",
743
+ "notification.loading": "Loading notifications",
744
+ "notification.mark_all_read": "Mark all as read",
745
+ "notification.unread": "Unread",
746
+ "confirm.cancel": "Cancel",
747
+ "icon_picker.search_placeholder": "Search icons...",
748
+ "common.loading": "Loading...",
749
+ "common.cancel": "Cancel",
750
+ "common.search": "Search..."
759
751
  };
760
752
  var t = createPackageT("hazo_ui", en_default);
761
753
  function FilterFieldItem({
@@ -1204,6 +1196,7 @@ function HazoUiMultiFilterDialog({
1204
1196
  ] })
1205
1197
  ] });
1206
1198
  }
1199
+ var t2 = createPackageT("hazo_ui", en_default);
1207
1200
  function SortableSortFieldItem({
1208
1201
  sortConfig,
1209
1202
  fieldLabel,
@@ -1314,8 +1307,8 @@ function HazoUiMultiSortDialog({
1314
1307
  availableFields,
1315
1308
  onSortChange,
1316
1309
  initialSortFields = [],
1317
- title = "Sort",
1318
- description = "Add fields to sort by, drag to reorder, toggle ascending or descending.",
1310
+ title = t2("sort.title"),
1311
+ description = t2("sort.description"),
1319
1312
  headerBackgroundColor,
1320
1313
  headerTextColor,
1321
1314
  submitButtonBackgroundColor,
@@ -1433,7 +1426,7 @@ function HazoUiMultiSortDialog({
1433
1426
  variant: "outline",
1434
1427
  size: "sm",
1435
1428
  className: "cls_sort_button",
1436
- "aria-label": "Open sort dialog",
1429
+ "aria-label": t2("sort.open_dialog_aria"),
1437
1430
  children: [
1438
1431
  /* @__PURE__ */ jsx(
1439
1432
  ArrowUpDown,
@@ -1506,7 +1499,7 @@ function HazoUiMultiSortDialog({
1506
1499
  }
1507
1500
  ) }),
1508
1501
  /* @__PURE__ */ jsx(PopoverContent, { className: "cls_combobox_popover w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ jsxs(Command, { children: [
1509
- /* @__PURE__ */ jsx(CommandInput, { placeholder: "Search fields...", className: "cls_command_input" }),
1502
+ /* @__PURE__ */ jsx(CommandInput, { placeholder: t2("sort.search_fields"), className: "cls_command_input" }),
1510
1503
  /* @__PURE__ */ jsx(CommandList, { children: availableFieldsToAdd.length === 0 ? /* @__PURE__ */ jsx(CommandEmpty, { children: "No fields available." }) : /* @__PURE__ */ jsx(CommandGroup, { children: availableFieldsToAdd.map((field) => /* @__PURE__ */ jsx(
1511
1504
  CommandItem,
1512
1505
  {
@@ -1529,7 +1522,7 @@ function HazoUiMultiSortDialog({
1529
1522
  onClick: handleClearAll,
1530
1523
  className: "cls_clear_all_btn text-muted-foreground hover:text-foreground",
1531
1524
  style: clearButtonStyles,
1532
- children: "Clear all"
1525
+ children: t2("sort.clear_all")
1533
1526
  }
1534
1527
  ) }),
1535
1528
  /* @__PURE__ */ jsxs("div", { className: "cls_footer_right flex items-center gap-2", children: [
@@ -1541,7 +1534,7 @@ function HazoUiMultiSortDialog({
1541
1534
  onClick: handleCancel,
1542
1535
  className: "cls_cancel_btn",
1543
1536
  style: cancelButtonStyles,
1544
- children: "Cancel"
1537
+ children: t2("sort.cancel")
1545
1538
  }
1546
1539
  ),
1547
1540
  /* @__PURE__ */ jsx(
@@ -1551,7 +1544,7 @@ function HazoUiMultiSortDialog({
1551
1544
  onClick: handleApply,
1552
1545
  className: "cls_apply_btn",
1553
1546
  style: submitButtonStyles,
1554
- children: "Apply"
1547
+ children: t2("sort.apply")
1555
1548
  }
1556
1549
  )
1557
1550
  ] })
@@ -1970,6 +1963,7 @@ var TabsContent = React27.forwardRef(({ className, ...props }, ref) => /* @__PUR
1970
1963
  }
1971
1964
  ));
1972
1965
  TabsContent.displayName = TabsPrimitive.Content.displayName;
1966
+ var t3 = createPackageT("hazo_ui", en_default);
1973
1967
  function isLucideValue(value) {
1974
1968
  return value.startsWith("lucide:");
1975
1969
  }
@@ -2235,7 +2229,7 @@ function HazoUiIconPicker({
2235
2229
  type: "text",
2236
2230
  value: search,
2237
2231
  onChange: (e) => set_search(e.target.value),
2238
- placeholder: "Search icons...",
2232
+ placeholder: t3("icon_picker.search_placeholder"),
2239
2233
  className: cn(
2240
2234
  "cls_hazo_ui_icon_picker_search",
2241
2235
  "mb-2 flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm",
@@ -3681,10 +3675,10 @@ var BLOCK_TYPE_LABEL_KEYS = {
3681
3675
  "code-block": "rte.block_type.code_block",
3682
3676
  blockquote: "rte.block_type.blockquote"
3683
3677
  };
3684
- function get_translated_block_types(t4) {
3678
+ function get_translated_block_types(t14) {
3685
3679
  return BLOCK_TYPES.map((type) => ({
3686
3680
  ...type,
3687
- label: t4(BLOCK_TYPE_LABEL_KEYS[type.value])
3681
+ label: t14(BLOCK_TYPE_LABEL_KEYS[type.value])
3688
3682
  }));
3689
3683
  }
3690
3684
 
@@ -3731,7 +3725,7 @@ function get_file_extension(filename) {
3731
3725
  function is_image_file(mime_type) {
3732
3726
  return mime_type.startsWith("image/");
3733
3727
  }
3734
- var t2 = createPackageT("hazo_ui", en_default);
3728
+ var t4 = createPackageT("hazo_ui", en_default);
3735
3729
  var ALL_ON = {
3736
3730
  undo_redo: true,
3737
3731
  block_type: true,
@@ -3786,7 +3780,7 @@ var Toolbar = ({
3786
3780
  }
3787
3781
  const tb = { ...ALL_ON, ...toolbar };
3788
3782
  const font_family_options = font_families && font_families.length > 0 ? font_families : FONT_FAMILIES;
3789
- const block_type_options = get_translated_block_types(t2);
3783
+ const block_type_options = get_translated_block_types(t4);
3790
3784
  const get_current_font_size = () => {
3791
3785
  const attrs = editor.getAttributes("textStyle");
3792
3786
  return attrs.fontSize || FONT_SIZE_CONFIG.default;
@@ -3930,7 +3924,7 @@ var Toolbar = ({
3930
3924
  {
3931
3925
  onClick: () => editor.chain().focus().undo().run(),
3932
3926
  disabled: !editor.can().undo(),
3933
- tooltip: t2("rte.undo"),
3927
+ tooltip: t4("rte.undo"),
3934
3928
  children: /* @__PURE__ */ jsx(LuUndo2, { className: "h-4 w-4" })
3935
3929
  },
3936
3930
  "undo"
@@ -3940,7 +3934,7 @@ var Toolbar = ({
3940
3934
  {
3941
3935
  onClick: () => editor.chain().focus().redo().run(),
3942
3936
  disabled: !editor.can().redo(),
3943
- tooltip: t2("rte.redo"),
3937
+ tooltip: t4("rte.redo"),
3944
3938
  children: /* @__PURE__ */ jsx(LuRedo2, { className: "h-4 w-4" })
3945
3939
  },
3946
3940
  "redo"
@@ -3981,7 +3975,7 @@ var Toolbar = ({
3981
3975
  ToolbarButton,
3982
3976
  {
3983
3977
  onClick: () => handle_font_size_change(-2),
3984
- tooltip: t2("rte.decrease_font_size"),
3978
+ tooltip: t4("rte.decrease_font_size"),
3985
3979
  children: /* @__PURE__ */ jsx(LuMinus, { className: "h-3 w-3" })
3986
3980
  }
3987
3981
  ),
@@ -3990,7 +3984,7 @@ var Toolbar = ({
3990
3984
  ToolbarButton,
3991
3985
  {
3992
3986
  onClick: () => handle_font_size_change(FONT_SIZE_CONFIG.step),
3993
- tooltip: t2("rte.increase_font_size"),
3987
+ tooltip: t4("rte.increase_font_size"),
3994
3988
  children: /* @__PURE__ */ jsx(LuPlus, { className: "h-3 w-3" })
3995
3989
  }
3996
3990
  )
@@ -4008,7 +4002,7 @@ var Toolbar = ({
4008
4002
  {
4009
4003
  onClick: () => editor.chain().focus().toggleBold().run(),
4010
4004
  is_active: editor.isActive("bold"),
4011
- tooltip: t2("rte.bold"),
4005
+ tooltip: t4("rte.bold"),
4012
4006
  children: /* @__PURE__ */ jsx(LuBold, { className: "h-4 w-4" })
4013
4007
  },
4014
4008
  "bold"
@@ -4022,7 +4016,7 @@ var Toolbar = ({
4022
4016
  {
4023
4017
  onClick: () => editor.chain().focus().toggleItalic().run(),
4024
4018
  is_active: editor.isActive("italic"),
4025
- tooltip: t2("rte.italic"),
4019
+ tooltip: t4("rte.italic"),
4026
4020
  children: /* @__PURE__ */ jsx(LuItalic, { className: "h-4 w-4" })
4027
4021
  },
4028
4022
  "italic"
@@ -4036,7 +4030,7 @@ var Toolbar = ({
4036
4030
  {
4037
4031
  onClick: () => editor.chain().focus().toggleUnderline().run(),
4038
4032
  is_active: editor.isActive("underline"),
4039
- tooltip: t2("rte.underline"),
4033
+ tooltip: t4("rte.underline"),
4040
4034
  children: /* @__PURE__ */ jsx(LuUnderline, { className: "h-4 w-4" })
4041
4035
  },
4042
4036
  "underline"
@@ -4050,7 +4044,7 @@ var Toolbar = ({
4050
4044
  {
4051
4045
  onClick: () => editor.chain().focus().toggleStrike().run(),
4052
4046
  is_active: editor.isActive("strike"),
4053
- tooltip: t2("rte.strikethrough"),
4047
+ tooltip: t4("rte.strikethrough"),
4054
4048
  children: /* @__PURE__ */ jsx(LuStrikethrough, { className: "h-4 w-4" })
4055
4049
  },
4056
4050
  "strike"
@@ -4064,7 +4058,7 @@ var Toolbar = ({
4064
4058
  {
4065
4059
  onClick: () => editor.chain().focus().toggleSubscript().run(),
4066
4060
  is_active: editor.isActive("subscript"),
4067
- tooltip: t2("rte.subscript"),
4061
+ tooltip: t4("rte.subscript"),
4068
4062
  children: /* @__PURE__ */ jsx(LuSubscript, { className: "h-4 w-4" })
4069
4063
  },
4070
4064
  "sub"
@@ -4078,7 +4072,7 @@ var Toolbar = ({
4078
4072
  {
4079
4073
  onClick: () => editor.chain().focus().toggleSuperscript().run(),
4080
4074
  is_active: editor.isActive("superscript"),
4081
- tooltip: t2("rte.superscript"),
4075
+ tooltip: t4("rte.superscript"),
4082
4076
  children: /* @__PURE__ */ jsx(LuSuperscript, { className: "h-4 w-4" })
4083
4077
  },
4084
4078
  "super"
@@ -4092,7 +4086,7 @@ var Toolbar = ({
4092
4086
  if (tb.link) {
4093
4087
  items.push(
4094
4088
  /* @__PURE__ */ jsxs(Popover, { open: link_popover_open, onOpenChange: set_link_popover_open, children: [
4095
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { is_active: editor.isActive("link"), tooltip: t2("rte.link"), children: /* @__PURE__ */ jsx(LuLink, { className: "h-4 w-4" }) }) }),
4089
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { is_active: editor.isActive("link"), tooltip: t4("rte.link"), children: /* @__PURE__ */ jsx(LuLink, { className: "h-4 w-4" }) }) }),
4096
4090
  /* @__PURE__ */ jsx(PopoverContent, { className: "w-80 p-3", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
4097
4091
  /* @__PURE__ */ jsx(
4098
4092
  Input,
@@ -4128,7 +4122,7 @@ var Toolbar = ({
4128
4122
  ToolbarButton,
4129
4123
  {
4130
4124
  onClick: () => editor.chain().focus().unsetAllMarks().clearNodes().run(),
4131
- tooltip: t2("rte.clear_formatting"),
4125
+ tooltip: t4("rte.clear_formatting"),
4132
4126
  children: /* @__PURE__ */ jsx(LuRemoveFormatting, { className: "h-4 w-4" })
4133
4127
  },
4134
4128
  "clear"
@@ -4142,7 +4136,7 @@ var Toolbar = ({
4142
4136
  if (tb.text_color) {
4143
4137
  items.push(
4144
4138
  /* @__PURE__ */ jsxs(Popover, { open: text_color_open, onOpenChange: set_text_color_open, children: [
4145
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t2("rte.text_color"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
4139
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t4("rte.text_color"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
4146
4140
  /* @__PURE__ */ jsx(LuPalette, { className: "h-4 w-4" }),
4147
4141
  /* @__PURE__ */ jsx(
4148
4142
  "div",
@@ -4185,7 +4179,7 @@ var Toolbar = ({
4185
4179
  if (tb.highlight_color) {
4186
4180
  items.push(
4187
4181
  /* @__PURE__ */ jsxs(Popover, { open: highlight_color_open, onOpenChange: set_highlight_color_open, children: [
4188
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t2("rte.highlight_color"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
4182
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t4("rte.highlight_color"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
4189
4183
  /* @__PURE__ */ jsx(LuHighlighter, { className: "h-4 w-4" }),
4190
4184
  /* @__PURE__ */ jsx(
4191
4185
  "div",
@@ -4228,7 +4222,7 @@ var Toolbar = ({
4228
4222
  {
4229
4223
  onClick: () => editor.chain().focus().setTextAlign("left").run(),
4230
4224
  is_active: editor.isActive({ textAlign: "left" }),
4231
- tooltip: t2("rte.align_left"),
4225
+ tooltip: t4("rte.align_left"),
4232
4226
  children: /* @__PURE__ */ jsx(LuAlignLeft, { className: "h-4 w-4" })
4233
4227
  },
4234
4228
  "align-left"
@@ -4238,7 +4232,7 @@ var Toolbar = ({
4238
4232
  {
4239
4233
  onClick: () => editor.chain().focus().setTextAlign("center").run(),
4240
4234
  is_active: editor.isActive({ textAlign: "center" }),
4241
- tooltip: t2("rte.align_center"),
4235
+ tooltip: t4("rte.align_center"),
4242
4236
  children: /* @__PURE__ */ jsx(LuAlignCenter, { className: "h-4 w-4" })
4243
4237
  },
4244
4238
  "align-center"
@@ -4248,7 +4242,7 @@ var Toolbar = ({
4248
4242
  {
4249
4243
  onClick: () => editor.chain().focus().setTextAlign("right").run(),
4250
4244
  is_active: editor.isActive({ textAlign: "right" }),
4251
- tooltip: t2("rte.align_right"),
4245
+ tooltip: t4("rte.align_right"),
4252
4246
  children: /* @__PURE__ */ jsx(LuAlignRight, { className: "h-4 w-4" })
4253
4247
  },
4254
4248
  "align-right"
@@ -4258,7 +4252,7 @@ var Toolbar = ({
4258
4252
  {
4259
4253
  onClick: () => editor.chain().focus().setTextAlign("justify").run(),
4260
4254
  is_active: editor.isActive({ textAlign: "justify" }),
4261
- tooltip: t2("rte.justify"),
4255
+ tooltip: t4("rte.justify"),
4262
4256
  children: /* @__PURE__ */ jsx(LuAlignJustify, { className: "h-4 w-4" })
4263
4257
  },
4264
4258
  "align-justify"
@@ -4274,7 +4268,7 @@ var Toolbar = ({
4274
4268
  {
4275
4269
  onClick: () => editor.chain().focus().toggleBulletList().run(),
4276
4270
  is_active: editor.isActive("bulletList"),
4277
- tooltip: t2("rte.bullet_list"),
4271
+ tooltip: t4("rte.bullet_list"),
4278
4272
  children: /* @__PURE__ */ jsx(LuList, { className: "h-4 w-4" })
4279
4273
  },
4280
4274
  "bullet"
@@ -4288,7 +4282,7 @@ var Toolbar = ({
4288
4282
  {
4289
4283
  onClick: () => editor.chain().focus().toggleOrderedList().run(),
4290
4284
  is_active: editor.isActive("orderedList"),
4291
- tooltip: t2("rte.ordered_list"),
4285
+ tooltip: t4("rte.ordered_list"),
4292
4286
  children: /* @__PURE__ */ jsx(LuListOrdered, { className: "h-4 w-4" })
4293
4287
  },
4294
4288
  "ordered"
@@ -4302,7 +4296,7 @@ var Toolbar = ({
4302
4296
  {
4303
4297
  onClick: () => editor.chain().focus().toggleTaskList().run(),
4304
4298
  is_active: editor.isActive("taskList"),
4305
- tooltip: t2("rte.checklist"),
4299
+ tooltip: t4("rte.checklist"),
4306
4300
  children: /* @__PURE__ */ jsx(LuListChecks, { className: "h-4 w-4" })
4307
4301
  },
4308
4302
  "task"
@@ -4324,7 +4318,7 @@ var Toolbar = ({
4324
4318
  }
4325
4319
  },
4326
4320
  disabled: !editor.can().liftListItem("listItem") && !editor.can().liftListItem("taskItem"),
4327
- tooltip: t2("rte.decrease_indent"),
4321
+ tooltip: t4("rte.decrease_indent"),
4328
4322
  children: /* @__PURE__ */ jsx(LuIndentDecrease, { className: "h-4 w-4" })
4329
4323
  },
4330
4324
  "indent-dec"
@@ -4340,7 +4334,7 @@ var Toolbar = ({
4340
4334
  }
4341
4335
  },
4342
4336
  disabled: !editor.can().sinkListItem("listItem") && !editor.can().sinkListItem("taskItem"),
4343
- tooltip: t2("rte.increase_indent"),
4337
+ tooltip: t4("rte.increase_indent"),
4344
4338
  children: /* @__PURE__ */ jsx(LuIndentIncrease, { className: "h-4 w-4" })
4345
4339
  },
4346
4340
  "indent-inc"
@@ -4351,7 +4345,7 @@ var Toolbar = ({
4351
4345
  const items = [];
4352
4346
  if (tb.horizontal_rule) {
4353
4347
  items.push(
4354
- /* @__PURE__ */ jsx(ToolbarButton, { onClick: handle_hr_insert, tooltip: t2("rte.horizontal_rule"), children: /* @__PURE__ */ jsx(RxDividerHorizontal, { className: "h-4 w-4" }) }, "hr")
4348
+ /* @__PURE__ */ jsx(ToolbarButton, { onClick: handle_hr_insert, tooltip: t4("rte.horizontal_rule"), children: /* @__PURE__ */ jsx(RxDividerHorizontal, { className: "h-4 w-4" }) }, "hr")
4355
4349
  );
4356
4350
  }
4357
4351
  if (tb.image) {
@@ -4360,7 +4354,7 @@ var Toolbar = ({
4360
4354
  ToolbarButton,
4361
4355
  {
4362
4356
  onClick: () => image_input_ref.current?.click(),
4363
- tooltip: t2("rte.insert_image"),
4357
+ tooltip: t4("rte.insert_image"),
4364
4358
  children: /* @__PURE__ */ jsx(LuImage, { className: "h-4 w-4" })
4365
4359
  },
4366
4360
  "image"
@@ -4374,7 +4368,7 @@ var Toolbar = ({
4374
4368
  ToolbarButton,
4375
4369
  {
4376
4370
  is_active: editor.isActive("table"),
4377
- tooltip: t2("rte.table"),
4371
+ tooltip: t4("rte.table"),
4378
4372
  children: /* @__PURE__ */ jsx(LuTable, { className: "h-4 w-4" })
4379
4373
  }
4380
4374
  ) }),
@@ -4546,7 +4540,7 @@ var Toolbar = ({
4546
4540
  if (tb.variables && variables.length > 0) {
4547
4541
  items.push(
4548
4542
  /* @__PURE__ */ jsxs(Popover, { open: variables_menu_open, onOpenChange: set_variables_menu_open, children: [
4549
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t2("rte.insert_variable"), children: /* @__PURE__ */ jsx(LuVariable, { className: "h-4 w-4" }) }) }),
4543
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ToolbarButton, { tooltip: t4("rte.insert_variable"), children: /* @__PURE__ */ jsx(LuVariable, { className: "h-4 w-4" }) }) }),
4550
4544
  /* @__PURE__ */ jsx(PopoverContent, { className: "w-64 p-0", align: "start", children: /* @__PURE__ */ jsxs(Command, { children: [
4551
4545
  /* @__PURE__ */ jsx(CommandInput, { placeholder: "Search variables...", className: "h-8 text-xs" }),
4552
4546
  /* @__PURE__ */ jsxs(CommandList, { children: [
@@ -4575,7 +4569,7 @@ var Toolbar = ({
4575
4569
  ToolbarButton,
4576
4570
  {
4577
4571
  onClick: () => file_input_ref.current?.click(),
4578
- tooltip: t2("rte.attach_file"),
4572
+ tooltip: t4("rte.attach_file"),
4579
4573
  children: /* @__PURE__ */ jsx(LuPaperclip, { className: "h-4 w-4" })
4580
4574
  },
4581
4575
  "attach"
@@ -5096,6 +5090,7 @@ var HazoUiRte = ({
5096
5090
  );
5097
5091
  };
5098
5092
  HazoUiRte.displayName = "HazoUiRte";
5093
+ var t5 = createPackageT("hazo_ui", en_default);
5099
5094
  function CanvasTextToolbar({
5100
5095
  bold,
5101
5096
  italic,
@@ -5126,14 +5121,14 @@ function CanvasTextToolbar({
5126
5121
  ),
5127
5122
  style,
5128
5123
  children: [
5129
- /* @__PURE__ */ jsx(ToolbarButton, { is_active: bold, onClick: onBold, tooltip: "Bold", children: /* @__PURE__ */ jsx(LuBold, { className: "h-4 w-4" }) }),
5130
- /* @__PURE__ */ jsx(ToolbarButton, { is_active: italic, onClick: onItalic, tooltip: "Italic", children: /* @__PURE__ */ jsx(LuItalic, { className: "h-4 w-4" }) }),
5124
+ /* @__PURE__ */ jsx(ToolbarButton, { is_active: bold, onClick: onBold, tooltip: t5("canvas_toolbar.bold"), children: /* @__PURE__ */ jsx(LuBold, { className: "h-4 w-4" }) }),
5125
+ /* @__PURE__ */ jsx(ToolbarButton, { is_active: italic, onClick: onItalic, tooltip: t5("canvas_toolbar.italic"), children: /* @__PURE__ */ jsx(LuItalic, { className: "h-4 w-4" }) }),
5131
5126
  /* @__PURE__ */ jsx(
5132
5127
  ToolbarButton,
5133
5128
  {
5134
5129
  is_active: underline,
5135
5130
  onClick: onUnderline,
5136
- tooltip: "Underline",
5131
+ tooltip: t5("canvas_toolbar.underline"),
5137
5132
  children: /* @__PURE__ */ jsx(LuUnderline, { className: "h-4 w-4" })
5138
5133
  }
5139
5134
  ),
@@ -5143,7 +5138,7 @@ function CanvasTextToolbar({
5143
5138
  {
5144
5139
  is_active: align === "left",
5145
5140
  onClick: () => onAlign?.("left"),
5146
- tooltip: "Align left",
5141
+ tooltip: t5("canvas_toolbar.align_left"),
5147
5142
  children: /* @__PURE__ */ jsx(LuAlignLeft, { className: "h-4 w-4" })
5148
5143
  }
5149
5144
  ),
@@ -5152,7 +5147,7 @@ function CanvasTextToolbar({
5152
5147
  {
5153
5148
  is_active: align === "center",
5154
5149
  onClick: () => onAlign?.("center"),
5155
- tooltip: "Align center",
5150
+ tooltip: t5("canvas_toolbar.align_center"),
5156
5151
  children: /* @__PURE__ */ jsx(LuAlignCenter, { className: "h-4 w-4" })
5157
5152
  }
5158
5153
  ),
@@ -5161,7 +5156,7 @@ function CanvasTextToolbar({
5161
5156
  {
5162
5157
  is_active: align === "right",
5163
5158
  onClick: () => onAlign?.("right"),
5164
- tooltip: "Align right",
5159
+ tooltip: t5("canvas_toolbar.align_right"),
5165
5160
  children: /* @__PURE__ */ jsx(LuAlignRight, { className: "h-4 w-4" })
5166
5161
  }
5167
5162
  ),
@@ -5170,7 +5165,7 @@ function CanvasTextToolbar({
5170
5165
  "label",
5171
5166
  {
5172
5167
  className: "relative flex h-8 w-8 cursor-pointer items-center justify-center rounded-md hover:bg-accent",
5173
- title: "Text color",
5168
+ title: t5("canvas_toolbar.text_color"),
5174
5169
  children: [
5175
5170
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
5176
5171
  /* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-muted-foreground", children: "A" }),
@@ -5200,7 +5195,7 @@ function CanvasTextToolbar({
5200
5195
  {
5201
5196
  is_active: verticalAlign === "top",
5202
5197
  onClick: () => onVerticalAlign?.("top"),
5203
- tooltip: "Align top",
5198
+ tooltip: t5("canvas_toolbar.align_top"),
5204
5199
  children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyStart, { className: "h-4 w-4" })
5205
5200
  }
5206
5201
  ),
@@ -5209,7 +5204,7 @@ function CanvasTextToolbar({
5209
5204
  {
5210
5205
  is_active: verticalAlign === "middle",
5211
5206
  onClick: () => onVerticalAlign?.("middle"),
5212
- tooltip: "Align middle",
5207
+ tooltip: t5("canvas_toolbar.align_middle"),
5213
5208
  children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyCenter, { className: "h-4 w-4" })
5214
5209
  }
5215
5210
  ),
@@ -5218,7 +5213,7 @@ function CanvasTextToolbar({
5218
5213
  {
5219
5214
  is_active: verticalAlign === "bottom",
5220
5215
  onClick: () => onVerticalAlign?.("bottom"),
5221
- tooltip: "Align bottom",
5216
+ tooltip: t5("canvas_toolbar.align_bottom"),
5222
5217
  children: /* @__PURE__ */ jsx(LuAlignVerticalJustifyEnd, { className: "h-4 w-4" })
5223
5218
  }
5224
5219
  ),
@@ -5229,7 +5224,7 @@ function CanvasTextToolbar({
5229
5224
  value: font,
5230
5225
  onChange: (e) => onFont?.(e.target.value),
5231
5226
  className: "h-8 text-xs rounded-md border border-border bg-background px-1 text-foreground focus:outline-none",
5232
- title: "Font family",
5227
+ title: t5("canvas_toolbar.font_family"),
5233
5228
  children: [
5234
5229
  /* @__PURE__ */ jsx("option", { value: "sans-serif", children: "Sans" }),
5235
5230
  /* @__PURE__ */ jsx("option", { value: "serif", children: "Serif" }),
@@ -5241,7 +5236,7 @@ function CanvasTextToolbar({
5241
5236
  }
5242
5237
  ),
5243
5238
  /* @__PURE__ */ jsx("div", { className: "mx-1 h-6 w-px bg-border" }),
5244
- /* @__PURE__ */ jsx(ToolbarButton, { is_active: bullet, onClick: onBullet, tooltip: "Bullet list", children: /* @__PURE__ */ jsx(LuList, { className: "h-4 w-4" }) })
5239
+ /* @__PURE__ */ jsx(ToolbarButton, { is_active: bullet, onClick: onBullet, tooltip: t5("canvas_toolbar.bullet_list"), children: /* @__PURE__ */ jsx(LuList, { className: "h-4 w-4" }) })
5245
5240
  ]
5246
5241
  }
5247
5242
  ) });
@@ -7619,6 +7614,7 @@ function HazoUiDialog({
7619
7614
  )
7620
7615
  ] }) });
7621
7616
  }
7617
+ var t6 = createPackageT("hazo_ui", en_default);
7622
7618
  function HazoUiConfirmDialog({
7623
7619
  open,
7624
7620
  onOpenChange,
@@ -7627,7 +7623,7 @@ function HazoUiConfirmDialog({
7627
7623
  children,
7628
7624
  variant = "default",
7629
7625
  confirmLabel,
7630
- cancelLabel = "Cancel",
7626
+ cancelLabel = t6("confirm.cancel"),
7631
7627
  showCancelButton = true,
7632
7628
  onConfirm,
7633
7629
  onCancel,
@@ -8532,6 +8528,7 @@ function EmptyState({
8532
8528
  }
8533
8529
  );
8534
8530
  }
8531
+ var t7 = createPackageT("hazo_ui", en_default);
8535
8532
  function ErrorBanner({
8536
8533
  severity = "error",
8537
8534
  title,
@@ -8566,7 +8563,7 @@ function ErrorBanner({
8566
8563
  {
8567
8564
  type: "button",
8568
8565
  onClick: onDismiss,
8569
- "aria-label": "Dismiss",
8566
+ "aria-label": t7("error.dismiss"),
8570
8567
  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",
8571
8568
  children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4", "aria-hidden": "true" })
8572
8569
  }
@@ -8575,8 +8572,9 @@ function ErrorBanner({
8575
8572
  }
8576
8573
  );
8577
8574
  }
8575
+ var t8 = createPackageT("hazo_ui", en_default);
8578
8576
  function ErrorPage({
8579
- title = "Something went wrong",
8577
+ title = t8("error.something_went_wrong"),
8580
8578
  description,
8581
8579
  errorCode,
8582
8580
  correlationId,
@@ -8607,6 +8605,7 @@ function ErrorPage({
8607
8605
  }
8608
8606
  );
8609
8607
  }
8608
+ var t9 = createPackageT("hazo_ui", en_default);
8610
8609
  function LoadingTimeout({
8611
8610
  active,
8612
8611
  children,
@@ -8616,7 +8615,7 @@ function LoadingTimeout({
8616
8615
  label = "content",
8617
8616
  className
8618
8617
  }) {
8619
- const t4 = {
8618
+ const timeouts = {
8620
8619
  gentle: thresholds?.gentle ?? 5e3,
8621
8620
  firm: thresholds?.firm ?? 15e3,
8622
8621
  expired: thresholds?.expired ?? 3e4
@@ -8628,15 +8627,15 @@ function LoadingTimeout({
8628
8627
  return;
8629
8628
  }
8630
8629
  setPhase("silent");
8631
- const gentleTimer = window.setTimeout(() => setPhase("gentle"), t4.gentle);
8632
- const firmTimer = window.setTimeout(() => setPhase("firm"), t4.firm);
8633
- const expiredTimer = window.setTimeout(() => setPhase("expired"), t4.expired);
8630
+ const gentleTimer = window.setTimeout(() => setPhase("gentle"), timeouts.gentle);
8631
+ const firmTimer = window.setTimeout(() => setPhase("firm"), timeouts.firm);
8632
+ const expiredTimer = window.setTimeout(() => setPhase("expired"), timeouts.expired);
8634
8633
  return () => {
8635
8634
  window.clearTimeout(gentleTimer);
8636
8635
  window.clearTimeout(firmTimer);
8637
8636
  window.clearTimeout(expiredTimer);
8638
8637
  };
8639
- }, [active, t4.gentle, t4.firm, t4.expired]);
8638
+ }, [active, timeouts.gentle, timeouts.firm, timeouts.expired]);
8640
8639
  if (!active) {
8641
8640
  return /* @__PURE__ */ jsx(Fragment$1, { children });
8642
8641
  }
@@ -8645,7 +8644,7 @@ function LoadingTimeout({
8645
8644
  ErrorBanner,
8646
8645
  {
8647
8646
  severity: "error",
8648
- title: "This is taking longer than expected",
8647
+ title: t9("loading.taking_longer"),
8649
8648
  message: `We're still trying to load the ${label}. The connection may be slow.`,
8650
8649
  action: onRetry ? /* @__PURE__ */ jsx(
8651
8650
  "button",
@@ -8747,6 +8746,7 @@ function NotificationCountBadge({
8747
8746
  }
8748
8747
  );
8749
8748
  }
8749
+ var t10 = createPackageT("hazo_ui", en_default);
8750
8750
  function NotificationItem({
8751
8751
  isRead,
8752
8752
  timestamp,
@@ -8777,7 +8777,7 @@ function NotificationItem({
8777
8777
  /* @__PURE__ */ jsx("div", { className: "cls_notification_item_dot_col flex-shrink-0 pt-1.5", children: !isRead ? /* @__PURE__ */ jsx(
8778
8778
  "span",
8779
8779
  {
8780
- "aria-label": "Unread",
8780
+ "aria-label": t10("notification.unread"),
8781
8781
  className: "cls_notification_item_dot block w-2 h-2 rounded-full bg-primary"
8782
8782
  }
8783
8783
  ) : /* @__PURE__ */ jsx("span", { className: "block w-2 h-2", "aria-hidden": "true" }) }),
@@ -8801,12 +8801,13 @@ function NotificationItem({
8801
8801
  }
8802
8802
  );
8803
8803
  }
8804
+ var t11 = createPackageT("hazo_ui", en_default);
8804
8805
  function LoadingSkeletons() {
8805
8806
  return /* @__PURE__ */ jsx(
8806
8807
  "div",
8807
8808
  {
8808
8809
  "aria-busy": "true",
8809
- "aria-label": "Loading notifications",
8810
+ "aria-label": t11("notification.loading"),
8810
8811
  className: "cls_notification_panel_loading space-y-0",
8811
8812
  children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs(
8812
8813
  "div",
@@ -8865,6 +8866,7 @@ function NotificationPanel({
8865
8866
  }
8866
8867
  );
8867
8868
  }
8869
+ var t12 = createPackageT("hazo_ui", en_default);
8868
8870
  function HazoUiToaster({
8869
8871
  position = "bottom-right",
8870
8872
  closeButton = true,
@@ -8910,12 +8912,12 @@ function permissionToast({
8910
8912
  action,
8911
8913
  duration = 5e3
8912
8914
  }) {
8913
- const description = missingPermissions.length === 0 ? "You do not have permission to perform this action." : `Missing: ${missingPermissions.map((key) => {
8915
+ const description = missingPermissions.length === 0 ? t12("toast.permission_denied_message") : `Missing: ${missingPermissions.map((key) => {
8914
8916
  const label = descriptions?.[key];
8915
8917
  return label ? `\`${key}\` \u2014 ${label}` : `\`${key}\``;
8916
8918
  }).join("; ")}`;
8917
8919
  return errorToast({
8918
- title: "Permission required",
8920
+ title: t12("toast.permission_required"),
8919
8921
  description,
8920
8922
  action,
8921
8923
  duration
@@ -9110,41 +9112,55 @@ function useWakeLock() {
9110
9112
  }
9111
9113
  function useFullscreen(elementRef) {
9112
9114
  const [is_fullscreen, set_is_fullscreen] = useState(false);
9115
+ const supported = typeof document !== "undefined" && typeof document.documentElement.requestFullscreen === "function";
9113
9116
  useEffect(() => {
9114
- if (typeof document === "undefined") return;
9117
+ if (typeof document === "undefined" || !supported) return;
9115
9118
  const handle_change = () => {
9116
9119
  set_is_fullscreen(!!document.fullscreenElement);
9117
9120
  };
9118
9121
  document.addEventListener("fullscreenchange", handle_change);
9119
9122
  set_is_fullscreen(!!document.fullscreenElement);
9120
9123
  return () => document.removeEventListener("fullscreenchange", handle_change);
9121
- }, []);
9124
+ }, [supported]);
9122
9125
  const get_target = useCallback(() => {
9123
9126
  return elementRef?.current ?? document.documentElement;
9124
9127
  }, [elementRef]);
9125
9128
  const enter = useCallback(async () => {
9126
- if (typeof document === "undefined" || !document.documentElement.requestFullscreen) return;
9129
+ if (typeof document === "undefined") return;
9130
+ if (!supported) {
9131
+ set_is_fullscreen(true);
9132
+ return;
9133
+ }
9127
9134
  if (document.fullscreenElement) return;
9128
9135
  try {
9129
9136
  await get_target().requestFullscreen();
9130
9137
  } catch {
9131
9138
  }
9132
- }, [get_target]);
9139
+ }, [supported, get_target]);
9133
9140
  const exit = useCallback(async () => {
9134
9141
  if (typeof document === "undefined") return;
9142
+ if (!supported) {
9143
+ set_is_fullscreen(false);
9144
+ return;
9145
+ }
9135
9146
  if (!document.fullscreenElement) return;
9136
9147
  try {
9137
9148
  await document.exitFullscreen();
9138
9149
  } catch {
9139
9150
  }
9140
- }, []);
9151
+ }, [supported]);
9141
9152
  const toggle = useCallback(async () => {
9153
+ if (!supported) {
9154
+ if (is_fullscreen) await exit();
9155
+ else await enter();
9156
+ return;
9157
+ }
9142
9158
  if (document.fullscreenElement) {
9143
9159
  await exit();
9144
9160
  } else {
9145
9161
  await enter();
9146
9162
  }
9147
- }, [enter, exit]);
9163
+ }, [supported, is_fullscreen, enter, exit]);
9148
9164
  return { isFullscreen: is_fullscreen, enter, exit, toggle };
9149
9165
  }
9150
9166
  function use_wake_lock(active) {
@@ -10764,7 +10780,7 @@ function serializeFilter(filter) {
10764
10780
  const fields = (filter.fields ?? []).map((f) => `${f.field}:${f.operator ?? ""}:${String(f.value)}`).join(",");
10765
10781
  return `${filter.search ?? ""}|${fields}`;
10766
10782
  }
10767
- var t3 = createPackageT("hazo_ui", en_default);
10783
+ var t13 = createPackageT("hazo_ui", en_default);
10768
10784
  function HazoUiTable(props) {
10769
10785
  const state = useTableState(props);
10770
10786
  const { columns, rows, getRowKey, className, caption } = props;
@@ -10799,12 +10815,12 @@ function HazoUiTable(props) {
10799
10815
  ) }) : 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(
10800
10816
  EmptyState,
10801
10817
  {
10802
- title: typeof props.empty === "string" && props.empty || t3("table.empty")
10818
+ title: typeof props.empty === "string" && props.empty || t13("table.empty")
10803
10819
  }
10804
10820
  ) : props.empty : typeof props.noResults === "string" || props.noResults === void 0 ? /* @__PURE__ */ jsx(
10805
10821
  EmptyState,
10806
10822
  {
10807
- title: typeof props.noResults === "string" && props.noResults || t3("table.no_results")
10823
+ title: typeof props.noResults === "string" && props.noResults || t13("table.no_results")
10808
10824
  }
10809
10825
  ) : props.noResults }) : /* @__PURE__ */ jsx(
10810
10826
  TableMobileCards,
@@ -10827,7 +10843,7 @@ function HazoUiTable(props) {
10827
10843
  {
10828
10844
  type: "button",
10829
10845
  onClick: (e) => state.cycleHeaderSort(c.key, e.shiftKey),
10830
- title: t3("table.sort_tooltip"),
10846
+ title: t13("table.sort_tooltip"),
10831
10847
  className: "cls_hazo_ui_table_sort_btn inline-flex items-center gap-1 hover:text-foreground",
10832
10848
  children: [
10833
10849
  /* @__PURE__ */ jsx("span", { children: c.label }),
@@ -10859,12 +10875,12 @@ function HazoUiTable(props) {
10859
10875
  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(
10860
10876
  EmptyState,
10861
10877
  {
10862
- title: typeof props.empty === "string" && props.empty || t3("table.empty")
10878
+ title: typeof props.empty === "string" && props.empty || t13("table.empty")
10863
10879
  }
10864
10880
  ) : 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(
10865
10881
  EmptyState,
10866
10882
  {
10867
- title: typeof props.noResults === "string" && props.noResults || t3("table.no_results")
10883
+ title: typeof props.noResults === "string" && props.noResults || t13("table.no_results")
10868
10884
  }
10869
10885
  ) : props.noResults })
10870
10886
  }
@@ -10978,7 +10994,7 @@ function PaginationFooter({
10978
10994
  const end = Math.min((page + 1) * pageSize, total);
10979
10995
  const lastPage = Math.max(0, Math.ceil(total / pageSize) - 1);
10980
10996
  return /* @__PURE__ */ jsxs("div", { className: "cls_hazo_ui_table_pagination flex items-center justify-between gap-3 pt-2 text-sm", children: [
10981
- /* @__PURE__ */ jsx("span", { className: "cls_hazo_ui_table_page_counter text-muted-foreground", children: t3("table.showing", {
10997
+ /* @__PURE__ */ jsx("span", { className: "cls_hazo_ui_table_page_counter text-muted-foreground", children: t13("table.showing", {
10982
10998
  start: String(start),
10983
10999
  end: String(end),
10984
11000
  total: String(total)
@@ -10991,8 +11007,8 @@ function PaginationFooter({
10991
11007
  size: "sm",
10992
11008
  onClick: () => onPageChange(Math.max(0, page - 1)),
10993
11009
  disabled: page === 0,
10994
- "aria-label": t3("table.prev_aria"),
10995
- children: t3("table.prev")
11010
+ "aria-label": t13("table.prev_aria"),
11011
+ children: t13("table.prev")
10996
11012
  }
10997
11013
  ),
10998
11014
  /* @__PURE__ */ jsx(
@@ -11002,8 +11018,8 @@ function PaginationFooter({
11002
11018
  size: "sm",
11003
11019
  onClick: () => onPageChange(Math.min(lastPage, page + 1)),
11004
11020
  disabled: page >= lastPage,
11005
- "aria-label": t3("table.next_aria"),
11006
- children: t3("table.next")
11021
+ "aria-label": t13("table.next_aria"),
11022
+ children: t13("table.next")
11007
11023
  }
11008
11024
  )
11009
11025
  ] })
@@ -11047,7 +11063,7 @@ function Toolbar2(props) {
11047
11063
  setSearchValue(v);
11048
11064
  onSearchChange(v);
11049
11065
  },
11050
- placeholder: searchPlaceholder ?? t3("table.search_placeholder"),
11066
+ placeholder: searchPlaceholder ?? t13("table.search_placeholder"),
11051
11067
  className: "cls_hazo_ui_table_search w-full sm:max-w-xs"
11052
11068
  }
11053
11069
  ) : /* @__PURE__ */ jsx("div", {}),
@@ -11095,8 +11111,8 @@ function renderErrorState(error, serverError) {
11095
11111
  return /* @__PURE__ */ jsx(
11096
11112
  EmptyState,
11097
11113
  {
11098
- title: t3("table.error_title"),
11099
- description: msg || t3("table.error_description")
11114
+ title: t13("table.error_title"),
11115
+ description: msg || t13("table.error_description")
11100
11116
  }
11101
11117
  );
11102
11118
  }
@@ -11882,8 +11898,8 @@ function computeEta(durationWindow, unitCount, concurrency = 1, fallbackUnitMs =
11882
11898
  }
11883
11899
  function easeToward(elapsed, eta, maxCap = 0.95) {
11884
11900
  if (eta <= 0 || elapsed <= 0) return 0;
11885
- const t4 = elapsed / eta;
11886
- return maxCap * (1 - Math.exp(-1.5 * t4));
11901
+ const t14 = elapsed / eta;
11902
+ return maxCap * (1 - Math.exp(-1.5 * t14));
11887
11903
  }
11888
11904
  function HazoUiProgressBar({
11889
11905
  value,
@@ -11914,7 +11930,7 @@ function HazoUiProgressBar({
11914
11930
  children: /* @__PURE__ */ jsx(
11915
11931
  "div",
11916
11932
  {
11917
- className: "h-full rounded-full bg-accent transition-[width] duration-200 ease-out motion-reduce:transition-none",
11933
+ className: "h-full rounded-full bg-primary transition-[width] duration-200 ease-out motion-reduce:transition-none",
11918
11934
  style: { width: `${pct}%` }
11919
11935
  }
11920
11936
  )
@@ -12001,6 +12017,8 @@ function HazoUiEtaProgress({
12001
12017
  fallbackUnitMs = 5e3,
12002
12018
  level = "global",
12003
12019
  label,
12020
+ showPercent,
12021
+ size,
12004
12022
  endpoint,
12005
12023
  handleRef,
12006
12024
  className
@@ -12035,6 +12053,8 @@ function HazoUiEtaProgress({
12035
12053
  {
12036
12054
  value: handle.value,
12037
12055
  label,
12056
+ showPercent,
12057
+ size,
12038
12058
  className
12039
12059
  }
12040
12060
  );