hazo_ui 6.12.3 → 6.12.4

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.cjs CHANGED
@@ -182,8 +182,8 @@ var require_extends = __commonJS({
182
182
  function _extends11() {
183
183
  return module.exports = _extends11 = Object.assign ? Object.assign.bind() : function(n) {
184
184
  for (var e = 1; e < arguments.length; e++) {
185
- var t14 = arguments[e];
186
- for (var r in t14) ({}).hasOwnProperty.call(t14, r) && (n[r] = t14[r]);
185
+ var t22 = arguments[e];
186
+ for (var r in t22) ({}).hasOwnProperty.call(t22, r) && (n[r] = t22[r]);
187
187
  }
188
188
  return n;
189
189
  }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends11.apply(null, arguments);
@@ -197,12 +197,12 @@ var require_objectWithoutPropertiesLoose = __commonJS({
197
197
  "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js"(exports, module) {
198
198
  function _objectWithoutPropertiesLoose10(r, e) {
199
199
  if (null == r) return {};
200
- var t14 = {};
200
+ var t22 = {};
201
201
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
202
202
  if (-1 !== e.indexOf(n)) continue;
203
- t14[n] = r[n];
203
+ t22[n] = r[n];
204
204
  }
205
- return t14;
205
+ return t22;
206
206
  }
207
207
  module.exports = _objectWithoutPropertiesLoose10, module.exports.__esModule = true, module.exports["default"] = module.exports;
208
208
  }
@@ -817,7 +817,38 @@ var en_default = {
817
817
  "icon_picker.search_placeholder": "Search icons...",
818
818
  "common.loading": "Loading...",
819
819
  "common.cancel": "Cancel",
820
- "common.search": "Search..."
820
+ "common.search": "Search...",
821
+ "dialog.default_title": "Action required",
822
+ "dialog.cancel": "Cancel",
823
+ "dialog.ok": "OK",
824
+ "dialog.confirm": "Confirm",
825
+ "dialog.close": "Close",
826
+ "kanban.status_label": "Status",
827
+ "kanban.edit_fallback": "Edit {{id}}",
828
+ "kanban.update_description": "Update card details below.",
829
+ "kanban.saving": "Saving\u2026",
830
+ "kanban.save": "Save",
831
+ "kanban.cancel": "Cancel",
832
+ "kanban.select_placeholder": "Select {{label}}\u2026",
833
+ "kanban.select_priority": "Select priority\u2026",
834
+ "kanban.select_status": "Select status\u2026",
835
+ "markdown.placeholder": "Write in Markdown\u2026",
836
+ "markdown.upload_failed": "Upload failed.",
837
+ "markdown.loading_editor": "Loading editor\u2026",
838
+ "markdown.uploading_image": "Uploading image\u2026",
839
+ "cropper.title": "Crop photo",
840
+ "cropper.save": "Save",
841
+ "cropper.cancel": "Cancel",
842
+ "cropper.zoom": "Zoom",
843
+ "memory.search_placeholder": "Search history\u2026",
844
+ "memory.no_history": "No history yet",
845
+ "memory.remove_aria": "Remove {{label}} from history",
846
+ "celebration.close": "Close celebration",
847
+ "celebration.download_png": "Download PNG",
848
+ "celebration.share": "Share",
849
+ "celebration.copy_image": "Copy image",
850
+ "celebration.dismiss": "Dismiss",
851
+ "charts.date_range": "Date range"
821
852
  };
822
853
  var t = i18n.createPackageT("hazo_ui", en_default);
823
854
  function FilterFieldItem({
@@ -3745,10 +3776,10 @@ var BLOCK_TYPE_LABEL_KEYS = {
3745
3776
  "code-block": "rte.block_type.code_block",
3746
3777
  blockquote: "rte.block_type.blockquote"
3747
3778
  };
3748
- function get_translated_block_types(t14) {
3779
+ function get_translated_block_types(t22) {
3749
3780
  return BLOCK_TYPES.map((type) => ({
3750
3781
  ...type,
3751
- label: t14(BLOCK_TYPE_LABEL_KEYS[type.value])
3782
+ label: t22(BLOCK_TYPE_LABEL_KEYS[type.value])
3752
3783
  }));
3753
3784
  }
3754
3785
 
@@ -5311,13 +5342,14 @@ function CanvasTextToolbar({
5311
5342
  }
5312
5343
  ) });
5313
5344
  }
5345
+ var t6 = i18n.createPackageT("hazo_ui", en_default);
5314
5346
  var MdEditorLazy = React27.lazy(() => import('@uiw/react-md-editor'));
5315
5347
  var EDITOR_TEXTAREA_SELECTOR = ".w-md-editor-text-input";
5316
5348
  function MarkdownEditor({
5317
5349
  value,
5318
5350
  onChange,
5319
5351
  height = 600,
5320
- placeholder = "Write in Markdown\u2026",
5352
+ placeholder,
5321
5353
  className,
5322
5354
  colorMode = "light",
5323
5355
  preview = "edit",
@@ -5400,13 +5432,13 @@ function MarkdownEditor({
5400
5432
  try {
5401
5433
  const url = await onImageUpload(file);
5402
5434
  if (!url) {
5403
- setError("Upload failed.");
5435
+ setError(t6("markdown.upload_failed"));
5404
5436
  onChange(before + after);
5405
5437
  return;
5406
5438
  }
5407
5439
  onChange(before + `![](${url})` + after);
5408
5440
  } catch {
5409
- setError("Upload failed.");
5441
+ setError(t6("markdown.upload_failed"));
5410
5442
  onChange(before + after);
5411
5443
  } finally {
5412
5444
  setUploading(false);
@@ -5430,7 +5462,7 @@ function MarkdownEditor({
5430
5462
  {
5431
5463
  className: "flex items-center justify-center rounded-md border border-border bg-muted/30 text-sm text-muted-foreground",
5432
5464
  style: { height },
5433
- children: "Loading editor\u2026"
5465
+ children: t6("markdown.loading_editor")
5434
5466
  }
5435
5467
  ),
5436
5468
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -5442,7 +5474,7 @@ function MarkdownEditor({
5442
5474
  preview: effectivePreview,
5443
5475
  visibleDragbar: false,
5444
5476
  commands: editorCommands,
5445
- textareaProps: { placeholder, onPaste: handlePaste }
5477
+ textareaProps: { placeholder: placeholder ?? t6("markdown.placeholder"), onPaste: handlePaste }
5446
5478
  }
5447
5479
  )
5448
5480
  }
@@ -5451,7 +5483,7 @@ function MarkdownEditor({
5451
5483
  {
5452
5484
  className: "flex items-center justify-center rounded-md border border-border bg-muted/30 text-sm text-muted-foreground",
5453
5485
  style: { height },
5454
- children: "Loading editor\u2026"
5486
+ children: t6("markdown.loading_editor")
5455
5487
  }
5456
5488
  ) }),
5457
5489
  useCustomPreview && showPreview && /* @__PURE__ */ jsxRuntime.jsx(
@@ -5465,7 +5497,7 @@ function MarkdownEditor({
5465
5497
  ]
5466
5498
  }
5467
5499
  ),
5468
- uploading && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: "Uploading image\u2026" }),
5500
+ uploading && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: t6("markdown.uploading_image") }),
5469
5501
  error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-xs text-destructive", children: error })
5470
5502
  ] });
5471
5503
  }
@@ -7253,6 +7285,7 @@ function resolve_animation_classes(open_anim = "zoom", close_anim = "zoom") {
7253
7285
  const close_classes = close_anim in ANIMATION_PRESETS ? ANIMATION_PRESETS[close_anim].close : close_anim;
7254
7286
  return `${open_classes} ${close_classes}`;
7255
7287
  }
7288
+ var t7 = i18n.createPackageT("hazo_ui", en_default);
7256
7289
  var VARIANT_PRESETS = {
7257
7290
  info: {
7258
7291
  header_background_color: "var(--dialog-info-bg)",
@@ -7302,11 +7335,11 @@ function HazoUiDialog({
7302
7335
  children,
7303
7336
  onConfirm,
7304
7337
  onCancel,
7305
- title = "Action required",
7338
+ title,
7306
7339
  description,
7307
7340
  actionButtonText: actionButtonTextProp,
7308
7341
  actionButtonVariant,
7309
- cancelButtonText = "Cancel",
7342
+ cancelButtonText,
7310
7343
  showCancelButton: showCancelButtonProp,
7311
7344
  showActionButton = true,
7312
7345
  closeOnConfirm: closeOnConfirmProp,
@@ -7346,9 +7379,11 @@ function HazoUiDialog({
7346
7379
  const cancel_ref = React27__namespace.useRef(null);
7347
7380
  const variant_preset = variant !== "default" ? VARIANT_PRESETS[variant] : is_status_kind || is_confirm_kind ? NEUTRAL_VARIANT_PRESET : void 0;
7348
7381
  const resolved_action_button_variant = actionButtonVariant ?? variant_preset?.action_button_variant ?? "default";
7382
+ const resolved_title = title ?? t7("dialog.default_title");
7383
+ const resolved_cancel_text = cancelButtonText ?? t7("dialog.cancel");
7349
7384
  const showCancelButton = showCancelButtonProp ?? (is_status_kind ? false : true);
7350
7385
  const closeOnConfirm = closeOnConfirmProp ?? (is_status_kind || is_confirm_kind ? true : false);
7351
- const actionButtonText = actionButtonTextProp ?? (is_status_kind ? "OK" : is_confirm_kind ? showCancelButton ? "Confirm" : "OK" : "Confirm");
7386
+ const actionButtonText = actionButtonTextProp ?? (is_status_kind ? t7("dialog.ok") : is_confirm_kind ? showCancelButton ? t7("dialog.confirm") : t7("dialog.ok") : t7("dialog.confirm"));
7352
7387
  const actionButtonLoading = actionButtonLoadingProp ?? (is_confirm_kind ? internal_confirm_loading : false);
7353
7388
  const handleConfirm = () => {
7354
7389
  if (is_confirm_kind) {
@@ -7483,7 +7518,7 @@ function HazoUiDialog({
7483
7518
  },
7484
7519
  children: [
7485
7520
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cls_confirm_dialog_body px-6 pt-7 pb-5", children: [
7486
- /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { className: "cls_confirm_dialog_title text-[17px] font-semibold text-foreground mb-2.5", children: title }),
7521
+ /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { className: "cls_confirm_dialog_title text-[17px] font-semibold text-foreground mb-2.5", children: resolved_title }),
7487
7522
  children ? /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_confirm_dialog_children text-sm text-muted-foreground leading-relaxed", children }) }) : description ? /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Description, { className: "cls_confirm_dialog_description text-sm text-muted-foreground leading-relaxed", children: description }) : null
7488
7523
  ] }),
7489
7524
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_confirm_dialog_separator border-t border-border" }),
@@ -7498,7 +7533,7 @@ function HazoUiDialog({
7498
7533
  onClick: handleCancel,
7499
7534
  disabled: actionButtonLoading,
7500
7535
  style: cancelButtonStyles,
7501
- children: cancelButtonText
7536
+ children: resolved_cancel_text
7502
7537
  }
7503
7538
  ),
7504
7539
  showActionButton && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -7564,7 +7599,7 @@ function HazoUiDialog({
7564
7599
  ...finalHeaderBackgroundColor && { backgroundColor: finalHeaderBackgroundColor },
7565
7600
  ...finalHeaderTextColor && { color: finalHeaderTextColor }
7566
7601
  },
7567
- children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: titleClassName, children: title })
7602
+ children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: titleClassName, children: resolved_title })
7568
7603
  }
7569
7604
  ),
7570
7605
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -7595,7 +7630,7 @@ function HazoUiDialog({
7595
7630
  ),
7596
7631
  style: headerStyles,
7597
7632
  children: [
7598
- /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: titleClassName, children: title }),
7633
+ /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: titleClassName, children: resolved_title }),
7599
7634
  description && /* @__PURE__ */ jsxRuntime.jsx(
7600
7635
  DialogDescription,
7601
7636
  {
@@ -7646,7 +7681,7 @@ function HazoUiDialog({
7646
7681
  variant: "outline",
7647
7682
  onClick: handleCancel,
7648
7683
  style: cancelButtonStyles,
7649
- children: cancelButtonText
7684
+ children: resolved_cancel_text
7650
7685
  }
7651
7686
  ),
7652
7687
  showActionButton && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -7675,7 +7710,7 @@ function HazoUiDialog({
7675
7710
  style: headerBar ? { color: "var(--dialog-header-bar-fg)" } : finalHeaderTextColor ? { color: finalHeaderTextColor } : void 0,
7676
7711
  children: [
7677
7712
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
7678
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
7713
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t7("dialog.close") })
7679
7714
  ]
7680
7715
  }
7681
7716
  )
@@ -7684,7 +7719,7 @@ function HazoUiDialog({
7684
7719
  )
7685
7720
  ] }) });
7686
7721
  }
7687
- var t6 = i18n.createPackageT("hazo_ui", en_default);
7722
+ var t8 = i18n.createPackageT("hazo_ui", en_default);
7688
7723
  function HazoUiConfirmDialog({
7689
7724
  open,
7690
7725
  onOpenChange,
@@ -7693,7 +7728,7 @@ function HazoUiConfirmDialog({
7693
7728
  children,
7694
7729
  variant = "default",
7695
7730
  confirmLabel,
7696
- cancelLabel = t6("confirm.cancel"),
7731
+ cancelLabel = t8("confirm.cancel"),
7697
7732
  showCancelButton = true,
7698
7733
  onConfirm,
7699
7734
  onCancel,
@@ -7742,6 +7777,7 @@ var Slider = React27__namespace.forwardRef(({ className, ...props }, ref) => /*
7742
7777
  }
7743
7778
  ));
7744
7779
  Slider.displayName = SliderPrimitive__namespace.Root.displayName;
7780
+ var t9 = i18n.createPackageT("hazo_ui", en_default);
7745
7781
  async function getCroppedImg(imageSrc, areaPixels, outputSize, quality) {
7746
7782
  const img = await new Promise((resolve, reject) => {
7747
7783
  const image = new Image();
@@ -7787,7 +7823,7 @@ var HazoUiImageCropper = React27__namespace.forwardRef(function HazoUiImageCropp
7787
7823
  onCropped,
7788
7824
  outputSize = 512,
7789
7825
  quality = 0.9,
7790
- zoomLabel = "Zoom",
7826
+ zoomLabel,
7791
7827
  className
7792
7828
  }, ref) {
7793
7829
  const [crop, set_crop] = React27__namespace.useState({
@@ -7795,6 +7831,7 @@ var HazoUiImageCropper = React27__namespace.forwardRef(function HazoUiImageCropp
7795
7831
  y: 0
7796
7832
  });
7797
7833
  const [zoom, set_zoom] = React27__namespace.useState(1);
7834
+ const resolved_zoom_label = zoomLabel ?? t9("cropper.zoom");
7798
7835
  const cropped_area_pixels_ref = React27__namespace.useRef(null);
7799
7836
  const handle_crop_complete = React27__namespace.useCallback(
7800
7837
  (_croppedArea, croppedAreaPixels) => {
@@ -7851,7 +7888,7 @@ var HazoUiImageCropper = React27__namespace.forwardRef(function HazoUiImageCropp
7851
7888
  {
7852
7889
  className: "cls_zoom_label text-sm font-medium text-foreground",
7853
7890
  id: "hazo-cropper-zoom-label",
7854
- children: zoomLabel
7891
+ children: resolved_zoom_label
7855
7892
  }
7856
7893
  ),
7857
7894
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -7869,19 +7906,24 @@ var HazoUiImageCropper = React27__namespace.forwardRef(function HazoUiImageCropp
7869
7906
  ] });
7870
7907
  });
7871
7908
  HazoUiImageCropper.displayName = "HazoUiImageCropper";
7909
+ var t10 = i18n.createPackageT("hazo_ui", en_default);
7872
7910
  function HazoUiImageCropperDialog({
7873
7911
  open,
7874
7912
  onOpenChange,
7875
7913
  file,
7876
7914
  onConfirm,
7877
7915
  onCancel,
7878
- title = "Crop photo",
7879
- confirmLabel = "Save",
7880
- cancelLabel = "Cancel",
7881
- zoomLabel = "Zoom",
7916
+ title,
7917
+ confirmLabel,
7918
+ cancelLabel,
7919
+ zoomLabel,
7882
7920
  outputSize = 512,
7883
7921
  quality = 0.9
7884
7922
  }) {
7923
+ const resolved_title = title ?? t10("cropper.title");
7924
+ const resolved_confirm_label = confirmLabel ?? t10("cropper.save");
7925
+ const resolved_cancel_label = cancelLabel ?? t10("cropper.cancel");
7926
+ const resolved_zoom_label = zoomLabel ?? t10("cropper.zoom");
7885
7927
  const cropper_ref = React27__namespace.useRef(null);
7886
7928
  const [image_src, set_image_src] = React27__namespace.useState(null);
7887
7929
  const [is_confirming, set_is_confirming] = React27__namespace.useState(false);
@@ -7912,9 +7954,9 @@ function HazoUiImageCropperDialog({
7912
7954
  {
7913
7955
  open,
7914
7956
  onOpenChange,
7915
- title,
7916
- actionButtonText: confirmLabel,
7917
- cancelButtonText: cancelLabel,
7957
+ title: resolved_title,
7958
+ actionButtonText: resolved_confirm_label,
7959
+ cancelButtonText: resolved_cancel_label,
7918
7960
  onConfirm: handle_confirm,
7919
7961
  onCancel,
7920
7962
  actionButtonLoading: is_confirming,
@@ -7927,7 +7969,7 @@ function HazoUiImageCropperDialog({
7927
7969
  imageSrc: image_src,
7928
7970
  outputSize,
7929
7971
  quality,
7930
- zoomLabel
7972
+ zoomLabel: resolved_zoom_label
7931
7973
  }
7932
7974
  )
7933
7975
  }
@@ -8598,7 +8640,7 @@ function EmptyState({
8598
8640
  }
8599
8641
  );
8600
8642
  }
8601
- var t7 = i18n.createPackageT("hazo_ui", en_default);
8643
+ var t11 = i18n.createPackageT("hazo_ui", en_default);
8602
8644
  function ErrorBanner({
8603
8645
  severity = "error",
8604
8646
  title,
@@ -8633,7 +8675,7 @@ function ErrorBanner({
8633
8675
  {
8634
8676
  type: "button",
8635
8677
  onClick: onDismiss,
8636
- "aria-label": t7("error.dismiss"),
8678
+ "aria-label": t11("error.dismiss"),
8637
8679
  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",
8638
8680
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4", "aria-hidden": "true" })
8639
8681
  }
@@ -8642,9 +8684,9 @@ function ErrorBanner({
8642
8684
  }
8643
8685
  );
8644
8686
  }
8645
- var t8 = i18n.createPackageT("hazo_ui", en_default);
8687
+ var t12 = i18n.createPackageT("hazo_ui", en_default);
8646
8688
  function ErrorPage({
8647
- title = t8("error.something_went_wrong"),
8689
+ title = t12("error.something_went_wrong"),
8648
8690
  description,
8649
8691
  errorCode,
8650
8692
  correlationId,
@@ -8675,7 +8717,7 @@ function ErrorPage({
8675
8717
  }
8676
8718
  );
8677
8719
  }
8678
- var t9 = i18n.createPackageT("hazo_ui", en_default);
8720
+ var t13 = i18n.createPackageT("hazo_ui", en_default);
8679
8721
  function LoadingTimeout({
8680
8722
  active,
8681
8723
  children,
@@ -8714,7 +8756,7 @@ function LoadingTimeout({
8714
8756
  ErrorBanner,
8715
8757
  {
8716
8758
  severity: "error",
8717
- title: t9("loading.taking_longer"),
8759
+ title: t13("loading.taking_longer"),
8718
8760
  message: `We're still trying to load the ${label}. The connection may be slow.`,
8719
8761
  action: onRetry ? /* @__PURE__ */ jsxRuntime.jsx(
8720
8762
  "button",
@@ -8816,7 +8858,7 @@ function NotificationCountBadge({
8816
8858
  }
8817
8859
  );
8818
8860
  }
8819
- var t10 = i18n.createPackageT("hazo_ui", en_default);
8861
+ var t14 = i18n.createPackageT("hazo_ui", en_default);
8820
8862
  function NotificationItem({
8821
8863
  isRead,
8822
8864
  timestamp,
@@ -8847,7 +8889,7 @@ function NotificationItem({
8847
8889
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_notification_item_dot_col flex-shrink-0 pt-1.5", children: !isRead ? /* @__PURE__ */ jsxRuntime.jsx(
8848
8890
  "span",
8849
8891
  {
8850
- "aria-label": t10("notification.unread"),
8892
+ "aria-label": t14("notification.unread"),
8851
8893
  className: "cls_notification_item_dot block w-2 h-2 rounded-full bg-primary"
8852
8894
  }
8853
8895
  ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block w-2 h-2", "aria-hidden": "true" }) }),
@@ -8871,13 +8913,13 @@ function NotificationItem({
8871
8913
  }
8872
8914
  );
8873
8915
  }
8874
- var t11 = i18n.createPackageT("hazo_ui", en_default);
8916
+ var t15 = i18n.createPackageT("hazo_ui", en_default);
8875
8917
  function LoadingSkeletons() {
8876
8918
  return /* @__PURE__ */ jsxRuntime.jsx(
8877
8919
  "div",
8878
8920
  {
8879
8921
  "aria-busy": "true",
8880
- "aria-label": t11("notification.loading"),
8922
+ "aria-label": t15("notification.loading"),
8881
8923
  className: "cls_notification_panel_loading space-y-0",
8882
8924
  children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxRuntime.jsxs(
8883
8925
  "div",
@@ -8936,7 +8978,7 @@ function NotificationPanel({
8936
8978
  }
8937
8979
  );
8938
8980
  }
8939
- var t12 = i18n.createPackageT("hazo_ui", en_default);
8981
+ var t16 = i18n.createPackageT("hazo_ui", en_default);
8940
8982
  function HazoUiToaster({
8941
8983
  position = "bottom-right",
8942
8984
  closeButton = true,
@@ -8982,12 +9024,12 @@ function permissionToast({
8982
9024
  action,
8983
9025
  duration = 5e3
8984
9026
  }) {
8985
- const description = missingPermissions.length === 0 ? t12("toast.permission_denied_message") : `Missing: ${missingPermissions.map((key) => {
9027
+ const description = missingPermissions.length === 0 ? t16("toast.permission_denied_message") : `Missing: ${missingPermissions.map((key) => {
8986
9028
  const label = descriptions?.[key];
8987
9029
  return label ? `\`${key}\` \u2014 ${label}` : `\`${key}\``;
8988
9030
  }).join("; ")}`;
8989
9031
  return errorToast({
8990
- title: t12("toast.permission_required"),
9032
+ title: t16("toast.permission_required"),
8991
9033
  description,
8992
9034
  action,
8993
9035
  duration
@@ -9631,6 +9673,7 @@ function KanbanLaneStrip({
9631
9673
  }
9632
9674
  );
9633
9675
  }
9676
+ var t17 = i18n.createPackageT("hazo_ui", en_default);
9634
9677
  var DEFAULT_PRIORITIES = ["P0", "P1", "P2", "P3"];
9635
9678
  function humanize(key) {
9636
9679
  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(" ");
@@ -9645,7 +9688,7 @@ function auto_detect_fields(item, columns) {
9645
9688
  }
9646
9689
  }
9647
9690
  if (columns.length > 0) {
9648
- out.push({ key: "columnKey", type: "status", label: "Status" });
9691
+ out.push({ key: "columnKey", type: "status", label: t17("kanban.status_label") });
9649
9692
  }
9650
9693
  return out;
9651
9694
  }
@@ -9742,7 +9785,7 @@ function KanbanEditor({
9742
9785
  isDirty: is_dirty
9743
9786
  };
9744
9787
  const open = item !== null;
9745
- const title = item && titleFn ? titleFn(item) : item ? `Edit ${item.id}` : "";
9788
+ const title = item && titleFn ? titleFn(item) : item ? t17("kanban.edit_fallback", { id: item.id }) : "";
9746
9789
  const priority_var = item?.priority ? `--hazo-kanban-priority-${String(item.priority).toLowerCase()}` : null;
9747
9790
  const header_bar_color = priority_var ? `hsl(var(${priority_var}))` : void 0;
9748
9791
  const use_default_footer = !(renderBody && hideFooter);
@@ -9754,18 +9797,18 @@ function KanbanEditor({
9754
9797
  if (!o && !saving) onClose();
9755
9798
  },
9756
9799
  title,
9757
- description: "Update card details below.",
9800
+ description: t17("kanban.update_description"),
9758
9801
  sizeWidth: "min(90vw, 480px)",
9759
9802
  openAnimation: "none",
9760
9803
  closeAnimation: "none",
9761
9804
  headerBar: !!priority_var,
9762
9805
  headerBarColor: header_bar_color,
9763
9806
  contentClassName: cn("cls_hazo_kanban_editor", priority_var && "pt-0"),
9764
- actionButtonText: saving ? "Saving\u2026" : "Save",
9807
+ actionButtonText: saving ? t17("kanban.saving") : t17("kanban.save"),
9765
9808
  actionButtonIcon: saving ? void 0 : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4 mr-2" }),
9766
9809
  actionButtonLoading: saving,
9767
9810
  actionButtonDisabled: !is_dirty || !all_required_filled || saving,
9768
- cancelButtonText: "Cancel",
9811
+ cancelButtonText: t17("kanban.cancel"),
9769
9812
  showCancelButton: true,
9770
9813
  onConfirm: handle_save,
9771
9814
  onCancel: onClose,
@@ -9870,7 +9913,7 @@ function KanbanEditorFieldRow({
9870
9913
  /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsxRuntime.jsx(
9871
9914
  SelectValue,
9872
9915
  {
9873
- placeholder: field.placeholder ?? `Select ${label}\u2026`
9916
+ placeholder: field.placeholder ?? t17("kanban.select_placeholder", { label })
9874
9917
  }
9875
9918
  ) }),
9876
9919
  /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: (field.options ?? []).map((opt) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: opt, children: opt }, opt)) })
@@ -9886,7 +9929,7 @@ function KanbanEditorFieldRow({
9886
9929
  /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsxRuntime.jsx(
9887
9930
  SelectValue,
9888
9931
  {
9889
- placeholder: field.placeholder ?? "Select priority\u2026"
9932
+ placeholder: field.placeholder ?? t17("kanban.select_priority")
9890
9933
  }
9891
9934
  ) }),
9892
9935
  /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: priorities.map((p) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: p, children: p }, p)) })
@@ -9902,7 +9945,7 @@ function KanbanEditorFieldRow({
9902
9945
  /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsxRuntime.jsx(
9903
9946
  SelectValue,
9904
9947
  {
9905
- placeholder: field.placeholder ?? "Select status\u2026"
9948
+ placeholder: field.placeholder ?? t17("kanban.select_status")
9906
9949
  }
9907
9950
  ) }),
9908
9951
  /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: columns.map((col) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: col.key, children: col.title }, col.key)) })
@@ -10850,7 +10893,7 @@ function serializeFilter(filter) {
10850
10893
  const fields = (filter.fields ?? []).map((f) => `${f.field}:${f.operator ?? ""}:${String(f.value)}`).join(",");
10851
10894
  return `${filter.search ?? ""}|${fields}`;
10852
10895
  }
10853
- var t13 = i18n.createPackageT("hazo_ui", en_default);
10896
+ var t18 = i18n.createPackageT("hazo_ui", en_default);
10854
10897
  function HazoUiTable(props) {
10855
10898
  const state = useTableState(props);
10856
10899
  const { columns, rows, getRowKey, className, caption } = props;
@@ -10885,12 +10928,12 @@ function HazoUiTable(props) {
10885
10928
  ) }) : state.serverError != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_hazo_ui_table_mobile_error py-6", children: renderErrorState(props.error, state.serverError) }) : state.displayed.length === 0 ? /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
10886
10929
  EmptyState,
10887
10930
  {
10888
- title: typeof props.empty === "string" && props.empty || t13("table.empty")
10931
+ title: typeof props.empty === "string" && props.empty || t18("table.empty")
10889
10932
  }
10890
10933
  ) : props.empty : typeof props.noResults === "string" || props.noResults === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
10891
10934
  EmptyState,
10892
10935
  {
10893
- title: typeof props.noResults === "string" && props.noResults || t13("table.no_results")
10936
+ title: typeof props.noResults === "string" && props.noResults || t18("table.no_results")
10894
10937
  }
10895
10938
  ) : props.noResults }) : /* @__PURE__ */ jsxRuntime.jsx(
10896
10939
  TableMobileCards,
@@ -10913,7 +10956,7 @@ function HazoUiTable(props) {
10913
10956
  {
10914
10957
  type: "button",
10915
10958
  onClick: (e) => state.cycleHeaderSort(c.key, e.shiftKey),
10916
- title: t13("table.sort_tooltip"),
10959
+ title: t18("table.sort_tooltip"),
10917
10960
  className: "cls_hazo_ui_table_sort_btn inline-flex items-center gap-1 hover:text-foreground",
10918
10961
  children: [
10919
10962
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: c.label }),
@@ -10945,12 +10988,12 @@ function HazoUiTable(props) {
10945
10988
  children: noActiveFilters(state.filter) && rows.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_hazo_ui_table_empty_wrap py-6", children: typeof props.empty === "string" || props.empty === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
10946
10989
  EmptyState,
10947
10990
  {
10948
- title: typeof props.empty === "string" && props.empty || t13("table.empty")
10991
+ title: typeof props.empty === "string" && props.empty || t18("table.empty")
10949
10992
  }
10950
10993
  ) : props.empty }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_hazo_ui_table_no_results_wrap py-6", children: typeof props.noResults === "string" || props.noResults === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
10951
10994
  EmptyState,
10952
10995
  {
10953
- title: typeof props.noResults === "string" && props.noResults || t13("table.no_results")
10996
+ title: typeof props.noResults === "string" && props.noResults || t18("table.no_results")
10954
10997
  }
10955
10998
  ) : props.noResults })
10956
10999
  }
@@ -11064,7 +11107,7 @@ function PaginationFooter({
11064
11107
  const end = Math.min((page + 1) * pageSize, total);
11065
11108
  const lastPage = Math.max(0, Math.ceil(total / pageSize) - 1);
11066
11109
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cls_hazo_ui_table_pagination flex items-center justify-between gap-3 pt-2 text-sm", children: [
11067
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cls_hazo_ui_table_page_counter text-muted-foreground", children: t13("table.showing", {
11110
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cls_hazo_ui_table_page_counter text-muted-foreground", children: t18("table.showing", {
11068
11111
  start: String(start),
11069
11112
  end: String(end),
11070
11113
  total: String(total)
@@ -11077,8 +11120,8 @@ function PaginationFooter({
11077
11120
  size: "sm",
11078
11121
  onClick: () => onPageChange(Math.max(0, page - 1)),
11079
11122
  disabled: page === 0,
11080
- "aria-label": t13("table.prev_aria"),
11081
- children: t13("table.prev")
11123
+ "aria-label": t18("table.prev_aria"),
11124
+ children: t18("table.prev")
11082
11125
  }
11083
11126
  ),
11084
11127
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -11088,8 +11131,8 @@ function PaginationFooter({
11088
11131
  size: "sm",
11089
11132
  onClick: () => onPageChange(Math.min(lastPage, page + 1)),
11090
11133
  disabled: page >= lastPage,
11091
- "aria-label": t13("table.next_aria"),
11092
- children: t13("table.next")
11134
+ "aria-label": t18("table.next_aria"),
11135
+ children: t18("table.next")
11093
11136
  }
11094
11137
  )
11095
11138
  ] })
@@ -11133,7 +11176,7 @@ function Toolbar2(props) {
11133
11176
  setSearchValue(v);
11134
11177
  onSearchChange(v);
11135
11178
  },
11136
- placeholder: searchPlaceholder ?? t13("table.search_placeholder"),
11179
+ placeholder: searchPlaceholder ?? t18("table.search_placeholder"),
11137
11180
  className: "cls_hazo_ui_table_search w-full sm:max-w-xs"
11138
11181
  }
11139
11182
  ) : /* @__PURE__ */ jsxRuntime.jsx("div", {}),
@@ -11181,8 +11224,8 @@ function renderErrorState(error, serverError) {
11181
11224
  return /* @__PURE__ */ jsxRuntime.jsx(
11182
11225
  EmptyState,
11183
11226
  {
11184
- title: t13("table.error_title"),
11185
- description: msg || t13("table.error_description")
11227
+ title: t18("table.error_title"),
11228
+ description: msg || t18("table.error_description")
11186
11229
  }
11187
11230
  );
11188
11231
  }
@@ -11418,18 +11461,20 @@ function StackedBars({
11418
11461
  }
11419
11462
  );
11420
11463
  }
11464
+ var t19 = i18n.createPackageT("hazo_ui", en_default);
11421
11465
  function DateRangeSelector({
11422
11466
  value,
11423
11467
  onChange,
11424
11468
  options,
11425
11469
  className,
11426
- ariaLabel = "Date range"
11470
+ ariaLabel
11427
11471
  }) {
11472
+ const resolved_aria = ariaLabel ?? t19("charts.date_range");
11428
11473
  return /* @__PURE__ */ jsxRuntime.jsx(
11429
11474
  "div",
11430
11475
  {
11431
11476
  role: "group",
11432
- "aria-label": ariaLabel,
11477
+ "aria-label": resolved_aria,
11433
11478
  className: cn(
11434
11479
  "cls_hazo_date_range_selector inline-flex items-center gap-0 rounded-md border bg-background p-0.5",
11435
11480
  className
@@ -11672,6 +11717,7 @@ function FunnelChart({
11672
11717
 
11673
11718
  // src/assets/celebration-chime.mp3
11674
11719
  var celebration_chime_default = "data:text/plain;charset=utf-8,";
11720
+ var t20 = i18n.createPackageT("hazo_ui", en_default);
11675
11721
  var CELEBRATION_GRADIENT = "linear-gradient(135deg, #667eea 0%, #764ba2 100%)";
11676
11722
  var CARD_SIZE = 1080;
11677
11723
  var PREVIEW_SIZE = 400;
@@ -11869,7 +11915,7 @@ function CelebrationModalInner({
11869
11915
  {
11870
11916
  className: "cls_celebration_close_btn absolute top-3 right-3 z-10 p-1.5 rounded-full hover:bg-black/10 transition-colors",
11871
11917
  onClick: close_modal,
11872
- "aria-label": "Close celebration",
11918
+ "aria-label": t20("celebration.close"),
11873
11919
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4 text-gray-600" })
11874
11920
  }
11875
11921
  ),
@@ -11932,21 +11978,21 @@ function CelebrationModalInner({
11932
11978
  disabled: is_downloading,
11933
11979
  children: [
11934
11980
  is_downloading ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-3.5 w-3.5 mr-1.5 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "h-3.5 w-3.5 mr-1.5" }),
11935
- "Download PNG"
11981
+ t20("celebration.download_png")
11936
11982
  ]
11937
11983
  }
11938
11984
  ),
11939
11985
  can_share && /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", onClick: handle_share, children: [
11940
11986
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Share2, { className: "h-3.5 w-3.5 mr-1.5" }),
11941
- "Share"
11987
+ t20("celebration.share")
11942
11988
  ] }),
11943
11989
  /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", onClick: handle_copy, children: [
11944
11990
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "h-3.5 w-3.5 mr-1.5" }),
11945
- "Copy image"
11991
+ t20("celebration.copy_image")
11946
11992
  ] })
11947
11993
  ] })
11948
11994
  ] }),
11949
- !shareableCard && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_celebration_footer pb-8", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", onClick: close_modal, children: "Dismiss" }) })
11995
+ !shareableCard && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_celebration_footer pb-8", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", onClick: close_modal, children: t20("celebration.dismiss") }) })
11950
11996
  ]
11951
11997
  }
11952
11998
  )
@@ -11968,8 +12014,8 @@ function computeEta(durationWindow, unitCount, concurrency = 1, fallbackUnitMs =
11968
12014
  }
11969
12015
  function easeToward(elapsed, eta, maxCap = 0.95) {
11970
12016
  if (eta <= 0 || elapsed <= 0) return 0;
11971
- const t14 = elapsed / eta;
11972
- return maxCap * (1 - Math.exp(-1.5 * t14));
12017
+ const t22 = elapsed / eta;
12018
+ return maxCap * (1 - Math.exp(-1.5 * t22));
11973
12019
  }
11974
12020
  function HazoUiProgressBar({
11975
12021
  value,
@@ -12145,13 +12191,16 @@ function upsertEntry(entries, entry) {
12145
12191
  function removeEntry(entries, id) {
12146
12192
  return entries.filter((e) => e.id !== id);
12147
12193
  }
12194
+ var t21 = i18n.createPackageT("hazo_ui", en_default);
12148
12195
  function HazoUiMemoryDropdown({
12149
12196
  history_key,
12150
- placeholder = "Search history\u2026",
12197
+ placeholder,
12151
12198
  on_select,
12152
12199
  add_entry,
12153
- empty_label = "No history yet"
12200
+ empty_label
12154
12201
  }) {
12202
+ const resolved_placeholder = placeholder ?? t21("memory.search_placeholder");
12203
+ const resolved_empty_label = empty_label ?? t21("memory.no_history");
12155
12204
  const { value: stored, setValue } = client$2.useHazoState(history_key, {
12156
12205
  level: "scope",
12157
12206
  fallback: []
@@ -12189,7 +12238,7 @@ function HazoUiMemoryDropdown({
12189
12238
  type: "text",
12190
12239
  value: query,
12191
12240
  onChange: (e) => setQuery(e.target.value),
12192
- placeholder,
12241
+ placeholder: resolved_placeholder,
12193
12242
  style: {
12194
12243
  width: "100%",
12195
12244
  background: "#FFFFFF",
@@ -12219,7 +12268,7 @@ function HazoUiMemoryDropdown({
12219
12268
  fontStyle: "italic",
12220
12269
  fontSize: 13
12221
12270
  },
12222
- children: empty_label
12271
+ children: resolved_empty_label
12223
12272
  }
12224
12273
  ) : filtered.map((entry) => /* @__PURE__ */ jsxRuntime.jsx(
12225
12274
  EntryRow,
@@ -12276,7 +12325,7 @@ function EntryRow({ entry, on_select, onDelete }) {
12276
12325
  onClick: (e) => onDelete(entry.id, e),
12277
12326
  onMouseEnter: () => setDeleteHovered(true),
12278
12327
  onMouseLeave: () => setDeleteHovered(false),
12279
- "aria-label": `Remove ${entry.label} from history`,
12328
+ "aria-label": t21("memory.remove_aria", { label: entry.label }),
12280
12329
  style: {
12281
12330
  flexShrink: 0,
12282
12331
  background: "none",