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.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 t14 = arguments[e];
116
- for (var r in t14) ({}).hasOwnProperty.call(t14, r) && (n[r] = t14[r]);
115
+ var t22 = arguments[e];
116
+ for (var r in t22) ({}).hasOwnProperty.call(t22, r) && (n[r] = t22[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 t14 = {};
130
+ var t22 = {};
131
131
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
132
132
  if (-1 !== e.indexOf(n)) continue;
133
- t14[n] = r[n];
133
+ t22[n] = r[n];
134
134
  }
135
- return t14;
135
+ return t22;
136
136
  }
137
137
  module.exports = _objectWithoutPropertiesLoose10, module.exports.__esModule = true, module.exports["default"] = module.exports;
138
138
  }
@@ -747,7 +747,38 @@ var en_default = {
747
747
  "icon_picker.search_placeholder": "Search icons...",
748
748
  "common.loading": "Loading...",
749
749
  "common.cancel": "Cancel",
750
- "common.search": "Search..."
750
+ "common.search": "Search...",
751
+ "dialog.default_title": "Action required",
752
+ "dialog.cancel": "Cancel",
753
+ "dialog.ok": "OK",
754
+ "dialog.confirm": "Confirm",
755
+ "dialog.close": "Close",
756
+ "kanban.status_label": "Status",
757
+ "kanban.edit_fallback": "Edit {{id}}",
758
+ "kanban.update_description": "Update card details below.",
759
+ "kanban.saving": "Saving\u2026",
760
+ "kanban.save": "Save",
761
+ "kanban.cancel": "Cancel",
762
+ "kanban.select_placeholder": "Select {{label}}\u2026",
763
+ "kanban.select_priority": "Select priority\u2026",
764
+ "kanban.select_status": "Select status\u2026",
765
+ "markdown.placeholder": "Write in Markdown\u2026",
766
+ "markdown.upload_failed": "Upload failed.",
767
+ "markdown.loading_editor": "Loading editor\u2026",
768
+ "markdown.uploading_image": "Uploading image\u2026",
769
+ "cropper.title": "Crop photo",
770
+ "cropper.save": "Save",
771
+ "cropper.cancel": "Cancel",
772
+ "cropper.zoom": "Zoom",
773
+ "memory.search_placeholder": "Search history\u2026",
774
+ "memory.no_history": "No history yet",
775
+ "memory.remove_aria": "Remove {{label}} from history",
776
+ "celebration.close": "Close celebration",
777
+ "celebration.download_png": "Download PNG",
778
+ "celebration.share": "Share",
779
+ "celebration.copy_image": "Copy image",
780
+ "celebration.dismiss": "Dismiss",
781
+ "charts.date_range": "Date range"
751
782
  };
752
783
  var t = createPackageT("hazo_ui", en_default);
753
784
  function FilterFieldItem({
@@ -3675,10 +3706,10 @@ var BLOCK_TYPE_LABEL_KEYS = {
3675
3706
  "code-block": "rte.block_type.code_block",
3676
3707
  blockquote: "rte.block_type.blockquote"
3677
3708
  };
3678
- function get_translated_block_types(t14) {
3709
+ function get_translated_block_types(t22) {
3679
3710
  return BLOCK_TYPES.map((type) => ({
3680
3711
  ...type,
3681
- label: t14(BLOCK_TYPE_LABEL_KEYS[type.value])
3712
+ label: t22(BLOCK_TYPE_LABEL_KEYS[type.value])
3682
3713
  }));
3683
3714
  }
3684
3715
 
@@ -5241,13 +5272,14 @@ function CanvasTextToolbar({
5241
5272
  }
5242
5273
  ) });
5243
5274
  }
5275
+ var t6 = createPackageT("hazo_ui", en_default);
5244
5276
  var MdEditorLazy = lazy(() => import('@uiw/react-md-editor'));
5245
5277
  var EDITOR_TEXTAREA_SELECTOR = ".w-md-editor-text-input";
5246
5278
  function MarkdownEditor({
5247
5279
  value,
5248
5280
  onChange,
5249
5281
  height = 600,
5250
- placeholder = "Write in Markdown\u2026",
5282
+ placeholder,
5251
5283
  className,
5252
5284
  colorMode = "light",
5253
5285
  preview = "edit",
@@ -5330,13 +5362,13 @@ function MarkdownEditor({
5330
5362
  try {
5331
5363
  const url = await onImageUpload(file);
5332
5364
  if (!url) {
5333
- setError("Upload failed.");
5365
+ setError(t6("markdown.upload_failed"));
5334
5366
  onChange(before + after);
5335
5367
  return;
5336
5368
  }
5337
5369
  onChange(before + `![](${url})` + after);
5338
5370
  } catch {
5339
- setError("Upload failed.");
5371
+ setError(t6("markdown.upload_failed"));
5340
5372
  onChange(before + after);
5341
5373
  } finally {
5342
5374
  setUploading(false);
@@ -5360,7 +5392,7 @@ function MarkdownEditor({
5360
5392
  {
5361
5393
  className: "flex items-center justify-center rounded-md border border-border bg-muted/30 text-sm text-muted-foreground",
5362
5394
  style: { height },
5363
- children: "Loading editor\u2026"
5395
+ children: t6("markdown.loading_editor")
5364
5396
  }
5365
5397
  ),
5366
5398
  children: /* @__PURE__ */ jsx(
@@ -5372,7 +5404,7 @@ function MarkdownEditor({
5372
5404
  preview: effectivePreview,
5373
5405
  visibleDragbar: false,
5374
5406
  commands: editorCommands,
5375
- textareaProps: { placeholder, onPaste: handlePaste }
5407
+ textareaProps: { placeholder: placeholder ?? t6("markdown.placeholder"), onPaste: handlePaste }
5376
5408
  }
5377
5409
  )
5378
5410
  }
@@ -5381,7 +5413,7 @@ function MarkdownEditor({
5381
5413
  {
5382
5414
  className: "flex items-center justify-center rounded-md border border-border bg-muted/30 text-sm text-muted-foreground",
5383
5415
  style: { height },
5384
- children: "Loading editor\u2026"
5416
+ children: t6("markdown.loading_editor")
5385
5417
  }
5386
5418
  ) }),
5387
5419
  useCustomPreview && showPreview && /* @__PURE__ */ jsx(
@@ -5395,7 +5427,7 @@ function MarkdownEditor({
5395
5427
  ]
5396
5428
  }
5397
5429
  ),
5398
- uploading && /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: "Uploading image\u2026" }),
5430
+ uploading && /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: t6("markdown.uploading_image") }),
5399
5431
  error && /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-destructive", children: error })
5400
5432
  ] });
5401
5433
  }
@@ -7183,6 +7215,7 @@ function resolve_animation_classes(open_anim = "zoom", close_anim = "zoom") {
7183
7215
  const close_classes = close_anim in ANIMATION_PRESETS ? ANIMATION_PRESETS[close_anim].close : close_anim;
7184
7216
  return `${open_classes} ${close_classes}`;
7185
7217
  }
7218
+ var t7 = createPackageT("hazo_ui", en_default);
7186
7219
  var VARIANT_PRESETS = {
7187
7220
  info: {
7188
7221
  header_background_color: "var(--dialog-info-bg)",
@@ -7232,11 +7265,11 @@ function HazoUiDialog({
7232
7265
  children,
7233
7266
  onConfirm,
7234
7267
  onCancel,
7235
- title = "Action required",
7268
+ title,
7236
7269
  description,
7237
7270
  actionButtonText: actionButtonTextProp,
7238
7271
  actionButtonVariant,
7239
- cancelButtonText = "Cancel",
7272
+ cancelButtonText,
7240
7273
  showCancelButton: showCancelButtonProp,
7241
7274
  showActionButton = true,
7242
7275
  closeOnConfirm: closeOnConfirmProp,
@@ -7276,9 +7309,11 @@ function HazoUiDialog({
7276
7309
  const cancel_ref = React27.useRef(null);
7277
7310
  const variant_preset = variant !== "default" ? VARIANT_PRESETS[variant] : is_status_kind || is_confirm_kind ? NEUTRAL_VARIANT_PRESET : void 0;
7278
7311
  const resolved_action_button_variant = actionButtonVariant ?? variant_preset?.action_button_variant ?? "default";
7312
+ const resolved_title = title ?? t7("dialog.default_title");
7313
+ const resolved_cancel_text = cancelButtonText ?? t7("dialog.cancel");
7279
7314
  const showCancelButton = showCancelButtonProp ?? (is_status_kind ? false : true);
7280
7315
  const closeOnConfirm = closeOnConfirmProp ?? (is_status_kind || is_confirm_kind ? true : false);
7281
- const actionButtonText = actionButtonTextProp ?? (is_status_kind ? "OK" : is_confirm_kind ? showCancelButton ? "Confirm" : "OK" : "Confirm");
7316
+ const actionButtonText = actionButtonTextProp ?? (is_status_kind ? t7("dialog.ok") : is_confirm_kind ? showCancelButton ? t7("dialog.confirm") : t7("dialog.ok") : t7("dialog.confirm"));
7282
7317
  const actionButtonLoading = actionButtonLoadingProp ?? (is_confirm_kind ? internal_confirm_loading : false);
7283
7318
  const handleConfirm = () => {
7284
7319
  if (is_confirm_kind) {
@@ -7413,7 +7448,7 @@ function HazoUiDialog({
7413
7448
  },
7414
7449
  children: [
7415
7450
  /* @__PURE__ */ jsxs("div", { className: "cls_confirm_dialog_body px-6 pt-7 pb-5", children: [
7416
- /* @__PURE__ */ jsx(DialogPrimitive.Title, { className: "cls_confirm_dialog_title text-[17px] font-semibold text-foreground mb-2.5", children: title }),
7451
+ /* @__PURE__ */ jsx(DialogPrimitive.Title, { className: "cls_confirm_dialog_title text-[17px] font-semibold text-foreground mb-2.5", children: resolved_title }),
7417
7452
  children ? /* @__PURE__ */ jsx(DialogPrimitive.Description, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "cls_confirm_dialog_children text-sm text-muted-foreground leading-relaxed", children }) }) : description ? /* @__PURE__ */ jsx(DialogPrimitive.Description, { className: "cls_confirm_dialog_description text-sm text-muted-foreground leading-relaxed", children: description }) : null
7418
7453
  ] }),
7419
7454
  /* @__PURE__ */ jsx("div", { className: "cls_confirm_dialog_separator border-t border-border" }),
@@ -7428,7 +7463,7 @@ function HazoUiDialog({
7428
7463
  onClick: handleCancel,
7429
7464
  disabled: actionButtonLoading,
7430
7465
  style: cancelButtonStyles,
7431
- children: cancelButtonText
7466
+ children: resolved_cancel_text
7432
7467
  }
7433
7468
  ),
7434
7469
  showActionButton && /* @__PURE__ */ jsxs(
@@ -7494,7 +7529,7 @@ function HazoUiDialog({
7494
7529
  ...finalHeaderBackgroundColor && { backgroundColor: finalHeaderBackgroundColor },
7495
7530
  ...finalHeaderTextColor && { color: finalHeaderTextColor }
7496
7531
  },
7497
- children: /* @__PURE__ */ jsx(DialogTitle, { className: titleClassName, children: title })
7532
+ children: /* @__PURE__ */ jsx(DialogTitle, { className: titleClassName, children: resolved_title })
7498
7533
  }
7499
7534
  ),
7500
7535
  /* @__PURE__ */ jsx(
@@ -7525,7 +7560,7 @@ function HazoUiDialog({
7525
7560
  ),
7526
7561
  style: headerStyles,
7527
7562
  children: [
7528
- /* @__PURE__ */ jsx(DialogTitle, { className: titleClassName, children: title }),
7563
+ /* @__PURE__ */ jsx(DialogTitle, { className: titleClassName, children: resolved_title }),
7529
7564
  description && /* @__PURE__ */ jsx(
7530
7565
  DialogDescription,
7531
7566
  {
@@ -7576,7 +7611,7 @@ function HazoUiDialog({
7576
7611
  variant: "outline",
7577
7612
  onClick: handleCancel,
7578
7613
  style: cancelButtonStyles,
7579
- children: cancelButtonText
7614
+ children: resolved_cancel_text
7580
7615
  }
7581
7616
  ),
7582
7617
  showActionButton && /* @__PURE__ */ jsxs(
@@ -7605,7 +7640,7 @@ function HazoUiDialog({
7605
7640
  style: headerBar ? { color: "var(--dialog-header-bar-fg)" } : finalHeaderTextColor ? { color: finalHeaderTextColor } : void 0,
7606
7641
  children: [
7607
7642
  /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
7608
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
7643
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: t7("dialog.close") })
7609
7644
  ]
7610
7645
  }
7611
7646
  )
@@ -7614,7 +7649,7 @@ function HazoUiDialog({
7614
7649
  )
7615
7650
  ] }) });
7616
7651
  }
7617
- var t6 = createPackageT("hazo_ui", en_default);
7652
+ var t8 = createPackageT("hazo_ui", en_default);
7618
7653
  function HazoUiConfirmDialog({
7619
7654
  open,
7620
7655
  onOpenChange,
@@ -7623,7 +7658,7 @@ function HazoUiConfirmDialog({
7623
7658
  children,
7624
7659
  variant = "default",
7625
7660
  confirmLabel,
7626
- cancelLabel = t6("confirm.cancel"),
7661
+ cancelLabel = t8("confirm.cancel"),
7627
7662
  showCancelButton = true,
7628
7663
  onConfirm,
7629
7664
  onCancel,
@@ -7672,6 +7707,7 @@ var Slider = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
7672
7707
  }
7673
7708
  ));
7674
7709
  Slider.displayName = SliderPrimitive.Root.displayName;
7710
+ var t9 = createPackageT("hazo_ui", en_default);
7675
7711
  async function getCroppedImg(imageSrc, areaPixels, outputSize, quality) {
7676
7712
  const img = await new Promise((resolve, reject) => {
7677
7713
  const image = new Image();
@@ -7717,7 +7753,7 @@ var HazoUiImageCropper = React27.forwardRef(function HazoUiImageCropper2({
7717
7753
  onCropped,
7718
7754
  outputSize = 512,
7719
7755
  quality = 0.9,
7720
- zoomLabel = "Zoom",
7756
+ zoomLabel,
7721
7757
  className
7722
7758
  }, ref) {
7723
7759
  const [crop, set_crop] = React27.useState({
@@ -7725,6 +7761,7 @@ var HazoUiImageCropper = React27.forwardRef(function HazoUiImageCropper2({
7725
7761
  y: 0
7726
7762
  });
7727
7763
  const [zoom, set_zoom] = React27.useState(1);
7764
+ const resolved_zoom_label = zoomLabel ?? t9("cropper.zoom");
7728
7765
  const cropped_area_pixels_ref = React27.useRef(null);
7729
7766
  const handle_crop_complete = React27.useCallback(
7730
7767
  (_croppedArea, croppedAreaPixels) => {
@@ -7781,7 +7818,7 @@ var HazoUiImageCropper = React27.forwardRef(function HazoUiImageCropper2({
7781
7818
  {
7782
7819
  className: "cls_zoom_label text-sm font-medium text-foreground",
7783
7820
  id: "hazo-cropper-zoom-label",
7784
- children: zoomLabel
7821
+ children: resolved_zoom_label
7785
7822
  }
7786
7823
  ),
7787
7824
  /* @__PURE__ */ jsx(
@@ -7799,19 +7836,24 @@ var HazoUiImageCropper = React27.forwardRef(function HazoUiImageCropper2({
7799
7836
  ] });
7800
7837
  });
7801
7838
  HazoUiImageCropper.displayName = "HazoUiImageCropper";
7839
+ var t10 = createPackageT("hazo_ui", en_default);
7802
7840
  function HazoUiImageCropperDialog({
7803
7841
  open,
7804
7842
  onOpenChange,
7805
7843
  file,
7806
7844
  onConfirm,
7807
7845
  onCancel,
7808
- title = "Crop photo",
7809
- confirmLabel = "Save",
7810
- cancelLabel = "Cancel",
7811
- zoomLabel = "Zoom",
7846
+ title,
7847
+ confirmLabel,
7848
+ cancelLabel,
7849
+ zoomLabel,
7812
7850
  outputSize = 512,
7813
7851
  quality = 0.9
7814
7852
  }) {
7853
+ const resolved_title = title ?? t10("cropper.title");
7854
+ const resolved_confirm_label = confirmLabel ?? t10("cropper.save");
7855
+ const resolved_cancel_label = cancelLabel ?? t10("cropper.cancel");
7856
+ const resolved_zoom_label = zoomLabel ?? t10("cropper.zoom");
7815
7857
  const cropper_ref = React27.useRef(null);
7816
7858
  const [image_src, set_image_src] = React27.useState(null);
7817
7859
  const [is_confirming, set_is_confirming] = React27.useState(false);
@@ -7842,9 +7884,9 @@ function HazoUiImageCropperDialog({
7842
7884
  {
7843
7885
  open,
7844
7886
  onOpenChange,
7845
- title,
7846
- actionButtonText: confirmLabel,
7847
- cancelButtonText: cancelLabel,
7887
+ title: resolved_title,
7888
+ actionButtonText: resolved_confirm_label,
7889
+ cancelButtonText: resolved_cancel_label,
7848
7890
  onConfirm: handle_confirm,
7849
7891
  onCancel,
7850
7892
  actionButtonLoading: is_confirming,
@@ -7857,7 +7899,7 @@ function HazoUiImageCropperDialog({
7857
7899
  imageSrc: image_src,
7858
7900
  outputSize,
7859
7901
  quality,
7860
- zoomLabel
7902
+ zoomLabel: resolved_zoom_label
7861
7903
  }
7862
7904
  )
7863
7905
  }
@@ -8528,7 +8570,7 @@ function EmptyState({
8528
8570
  }
8529
8571
  );
8530
8572
  }
8531
- var t7 = createPackageT("hazo_ui", en_default);
8573
+ var t11 = createPackageT("hazo_ui", en_default);
8532
8574
  function ErrorBanner({
8533
8575
  severity = "error",
8534
8576
  title,
@@ -8563,7 +8605,7 @@ function ErrorBanner({
8563
8605
  {
8564
8606
  type: "button",
8565
8607
  onClick: onDismiss,
8566
- "aria-label": t7("error.dismiss"),
8608
+ "aria-label": t11("error.dismiss"),
8567
8609
  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",
8568
8610
  children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4", "aria-hidden": "true" })
8569
8611
  }
@@ -8572,9 +8614,9 @@ function ErrorBanner({
8572
8614
  }
8573
8615
  );
8574
8616
  }
8575
- var t8 = createPackageT("hazo_ui", en_default);
8617
+ var t12 = createPackageT("hazo_ui", en_default);
8576
8618
  function ErrorPage({
8577
- title = t8("error.something_went_wrong"),
8619
+ title = t12("error.something_went_wrong"),
8578
8620
  description,
8579
8621
  errorCode,
8580
8622
  correlationId,
@@ -8605,7 +8647,7 @@ function ErrorPage({
8605
8647
  }
8606
8648
  );
8607
8649
  }
8608
- var t9 = createPackageT("hazo_ui", en_default);
8650
+ var t13 = createPackageT("hazo_ui", en_default);
8609
8651
  function LoadingTimeout({
8610
8652
  active,
8611
8653
  children,
@@ -8644,7 +8686,7 @@ function LoadingTimeout({
8644
8686
  ErrorBanner,
8645
8687
  {
8646
8688
  severity: "error",
8647
- title: t9("loading.taking_longer"),
8689
+ title: t13("loading.taking_longer"),
8648
8690
  message: `We're still trying to load the ${label}. The connection may be slow.`,
8649
8691
  action: onRetry ? /* @__PURE__ */ jsx(
8650
8692
  "button",
@@ -8746,7 +8788,7 @@ function NotificationCountBadge({
8746
8788
  }
8747
8789
  );
8748
8790
  }
8749
- var t10 = createPackageT("hazo_ui", en_default);
8791
+ var t14 = createPackageT("hazo_ui", en_default);
8750
8792
  function NotificationItem({
8751
8793
  isRead,
8752
8794
  timestamp,
@@ -8777,7 +8819,7 @@ function NotificationItem({
8777
8819
  /* @__PURE__ */ jsx("div", { className: "cls_notification_item_dot_col flex-shrink-0 pt-1.5", children: !isRead ? /* @__PURE__ */ jsx(
8778
8820
  "span",
8779
8821
  {
8780
- "aria-label": t10("notification.unread"),
8822
+ "aria-label": t14("notification.unread"),
8781
8823
  className: "cls_notification_item_dot block w-2 h-2 rounded-full bg-primary"
8782
8824
  }
8783
8825
  ) : /* @__PURE__ */ jsx("span", { className: "block w-2 h-2", "aria-hidden": "true" }) }),
@@ -8801,13 +8843,13 @@ function NotificationItem({
8801
8843
  }
8802
8844
  );
8803
8845
  }
8804
- var t11 = createPackageT("hazo_ui", en_default);
8846
+ var t15 = createPackageT("hazo_ui", en_default);
8805
8847
  function LoadingSkeletons() {
8806
8848
  return /* @__PURE__ */ jsx(
8807
8849
  "div",
8808
8850
  {
8809
8851
  "aria-busy": "true",
8810
- "aria-label": t11("notification.loading"),
8852
+ "aria-label": t15("notification.loading"),
8811
8853
  className: "cls_notification_panel_loading space-y-0",
8812
8854
  children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs(
8813
8855
  "div",
@@ -8866,7 +8908,7 @@ function NotificationPanel({
8866
8908
  }
8867
8909
  );
8868
8910
  }
8869
- var t12 = createPackageT("hazo_ui", en_default);
8911
+ var t16 = createPackageT("hazo_ui", en_default);
8870
8912
  function HazoUiToaster({
8871
8913
  position = "bottom-right",
8872
8914
  closeButton = true,
@@ -8912,12 +8954,12 @@ function permissionToast({
8912
8954
  action,
8913
8955
  duration = 5e3
8914
8956
  }) {
8915
- const description = missingPermissions.length === 0 ? t12("toast.permission_denied_message") : `Missing: ${missingPermissions.map((key) => {
8957
+ const description = missingPermissions.length === 0 ? t16("toast.permission_denied_message") : `Missing: ${missingPermissions.map((key) => {
8916
8958
  const label = descriptions?.[key];
8917
8959
  return label ? `\`${key}\` \u2014 ${label}` : `\`${key}\``;
8918
8960
  }).join("; ")}`;
8919
8961
  return errorToast({
8920
- title: t12("toast.permission_required"),
8962
+ title: t16("toast.permission_required"),
8921
8963
  description,
8922
8964
  action,
8923
8965
  duration
@@ -9561,6 +9603,7 @@ function KanbanLaneStrip({
9561
9603
  }
9562
9604
  );
9563
9605
  }
9606
+ var t17 = createPackageT("hazo_ui", en_default);
9564
9607
  var DEFAULT_PRIORITIES = ["P0", "P1", "P2", "P3"];
9565
9608
  function humanize(key) {
9566
9609
  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(" ");
@@ -9575,7 +9618,7 @@ function auto_detect_fields(item, columns) {
9575
9618
  }
9576
9619
  }
9577
9620
  if (columns.length > 0) {
9578
- out.push({ key: "columnKey", type: "status", label: "Status" });
9621
+ out.push({ key: "columnKey", type: "status", label: t17("kanban.status_label") });
9579
9622
  }
9580
9623
  return out;
9581
9624
  }
@@ -9672,7 +9715,7 @@ function KanbanEditor({
9672
9715
  isDirty: is_dirty
9673
9716
  };
9674
9717
  const open = item !== null;
9675
- const title = item && titleFn ? titleFn(item) : item ? `Edit ${item.id}` : "";
9718
+ const title = item && titleFn ? titleFn(item) : item ? t17("kanban.edit_fallback", { id: item.id }) : "";
9676
9719
  const priority_var = item?.priority ? `--hazo-kanban-priority-${String(item.priority).toLowerCase()}` : null;
9677
9720
  const header_bar_color = priority_var ? `hsl(var(${priority_var}))` : void 0;
9678
9721
  const use_default_footer = !(renderBody && hideFooter);
@@ -9684,18 +9727,18 @@ function KanbanEditor({
9684
9727
  if (!o && !saving) onClose();
9685
9728
  },
9686
9729
  title,
9687
- description: "Update card details below.",
9730
+ description: t17("kanban.update_description"),
9688
9731
  sizeWidth: "min(90vw, 480px)",
9689
9732
  openAnimation: "none",
9690
9733
  closeAnimation: "none",
9691
9734
  headerBar: !!priority_var,
9692
9735
  headerBarColor: header_bar_color,
9693
9736
  contentClassName: cn("cls_hazo_kanban_editor", priority_var && "pt-0"),
9694
- actionButtonText: saving ? "Saving\u2026" : "Save",
9737
+ actionButtonText: saving ? t17("kanban.saving") : t17("kanban.save"),
9695
9738
  actionButtonIcon: saving ? void 0 : /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 mr-2" }),
9696
9739
  actionButtonLoading: saving,
9697
9740
  actionButtonDisabled: !is_dirty || !all_required_filled || saving,
9698
- cancelButtonText: "Cancel",
9741
+ cancelButtonText: t17("kanban.cancel"),
9699
9742
  showCancelButton: true,
9700
9743
  onConfirm: handle_save,
9701
9744
  onCancel: onClose,
@@ -9800,7 +9843,7 @@ function KanbanEditorFieldRow({
9800
9843
  /* @__PURE__ */ jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsx(
9801
9844
  SelectValue,
9802
9845
  {
9803
- placeholder: field.placeholder ?? `Select ${label}\u2026`
9846
+ placeholder: field.placeholder ?? t17("kanban.select_placeholder", { label })
9804
9847
  }
9805
9848
  ) }),
9806
9849
  /* @__PURE__ */ jsx(SelectContent, { children: (field.options ?? []).map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt, children: opt }, opt)) })
@@ -9816,7 +9859,7 @@ function KanbanEditorFieldRow({
9816
9859
  /* @__PURE__ */ jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsx(
9817
9860
  SelectValue,
9818
9861
  {
9819
- placeholder: field.placeholder ?? "Select priority\u2026"
9862
+ placeholder: field.placeholder ?? t17("kanban.select_priority")
9820
9863
  }
9821
9864
  ) }),
9822
9865
  /* @__PURE__ */ jsx(SelectContent, { children: priorities.map((p) => /* @__PURE__ */ jsx(SelectItem, { value: p, children: p }, p)) })
@@ -9832,7 +9875,7 @@ function KanbanEditorFieldRow({
9832
9875
  /* @__PURE__ */ jsx(SelectTrigger, { id, children: /* @__PURE__ */ jsx(
9833
9876
  SelectValue,
9834
9877
  {
9835
- placeholder: field.placeholder ?? "Select status\u2026"
9878
+ placeholder: field.placeholder ?? t17("kanban.select_status")
9836
9879
  }
9837
9880
  ) }),
9838
9881
  /* @__PURE__ */ jsx(SelectContent, { children: columns.map((col) => /* @__PURE__ */ jsx(SelectItem, { value: col.key, children: col.title }, col.key)) })
@@ -10780,7 +10823,7 @@ function serializeFilter(filter) {
10780
10823
  const fields = (filter.fields ?? []).map((f) => `${f.field}:${f.operator ?? ""}:${String(f.value)}`).join(",");
10781
10824
  return `${filter.search ?? ""}|${fields}`;
10782
10825
  }
10783
- var t13 = createPackageT("hazo_ui", en_default);
10826
+ var t18 = createPackageT("hazo_ui", en_default);
10784
10827
  function HazoUiTable(props) {
10785
10828
  const state = useTableState(props);
10786
10829
  const { columns, rows, getRowKey, className, caption } = props;
@@ -10815,12 +10858,12 @@ function HazoUiTable(props) {
10815
10858
  ) }) : 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(
10816
10859
  EmptyState,
10817
10860
  {
10818
- title: typeof props.empty === "string" && props.empty || t13("table.empty")
10861
+ title: typeof props.empty === "string" && props.empty || t18("table.empty")
10819
10862
  }
10820
10863
  ) : props.empty : typeof props.noResults === "string" || props.noResults === void 0 ? /* @__PURE__ */ jsx(
10821
10864
  EmptyState,
10822
10865
  {
10823
- title: typeof props.noResults === "string" && props.noResults || t13("table.no_results")
10866
+ title: typeof props.noResults === "string" && props.noResults || t18("table.no_results")
10824
10867
  }
10825
10868
  ) : props.noResults }) : /* @__PURE__ */ jsx(
10826
10869
  TableMobileCards,
@@ -10843,7 +10886,7 @@ function HazoUiTable(props) {
10843
10886
  {
10844
10887
  type: "button",
10845
10888
  onClick: (e) => state.cycleHeaderSort(c.key, e.shiftKey),
10846
- title: t13("table.sort_tooltip"),
10889
+ title: t18("table.sort_tooltip"),
10847
10890
  className: "cls_hazo_ui_table_sort_btn inline-flex items-center gap-1 hover:text-foreground",
10848
10891
  children: [
10849
10892
  /* @__PURE__ */ jsx("span", { children: c.label }),
@@ -10875,12 +10918,12 @@ function HazoUiTable(props) {
10875
10918
  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(
10876
10919
  EmptyState,
10877
10920
  {
10878
- title: typeof props.empty === "string" && props.empty || t13("table.empty")
10921
+ title: typeof props.empty === "string" && props.empty || t18("table.empty")
10879
10922
  }
10880
10923
  ) : 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(
10881
10924
  EmptyState,
10882
10925
  {
10883
- title: typeof props.noResults === "string" && props.noResults || t13("table.no_results")
10926
+ title: typeof props.noResults === "string" && props.noResults || t18("table.no_results")
10884
10927
  }
10885
10928
  ) : props.noResults })
10886
10929
  }
@@ -10994,7 +11037,7 @@ function PaginationFooter({
10994
11037
  const end = Math.min((page + 1) * pageSize, total);
10995
11038
  const lastPage = Math.max(0, Math.ceil(total / pageSize) - 1);
10996
11039
  return /* @__PURE__ */ jsxs("div", { className: "cls_hazo_ui_table_pagination flex items-center justify-between gap-3 pt-2 text-sm", children: [
10997
- /* @__PURE__ */ jsx("span", { className: "cls_hazo_ui_table_page_counter text-muted-foreground", children: t13("table.showing", {
11040
+ /* @__PURE__ */ jsx("span", { className: "cls_hazo_ui_table_page_counter text-muted-foreground", children: t18("table.showing", {
10998
11041
  start: String(start),
10999
11042
  end: String(end),
11000
11043
  total: String(total)
@@ -11007,8 +11050,8 @@ function PaginationFooter({
11007
11050
  size: "sm",
11008
11051
  onClick: () => onPageChange(Math.max(0, page - 1)),
11009
11052
  disabled: page === 0,
11010
- "aria-label": t13("table.prev_aria"),
11011
- children: t13("table.prev")
11053
+ "aria-label": t18("table.prev_aria"),
11054
+ children: t18("table.prev")
11012
11055
  }
11013
11056
  ),
11014
11057
  /* @__PURE__ */ jsx(
@@ -11018,8 +11061,8 @@ function PaginationFooter({
11018
11061
  size: "sm",
11019
11062
  onClick: () => onPageChange(Math.min(lastPage, page + 1)),
11020
11063
  disabled: page >= lastPage,
11021
- "aria-label": t13("table.next_aria"),
11022
- children: t13("table.next")
11064
+ "aria-label": t18("table.next_aria"),
11065
+ children: t18("table.next")
11023
11066
  }
11024
11067
  )
11025
11068
  ] })
@@ -11063,7 +11106,7 @@ function Toolbar2(props) {
11063
11106
  setSearchValue(v);
11064
11107
  onSearchChange(v);
11065
11108
  },
11066
- placeholder: searchPlaceholder ?? t13("table.search_placeholder"),
11109
+ placeholder: searchPlaceholder ?? t18("table.search_placeholder"),
11067
11110
  className: "cls_hazo_ui_table_search w-full sm:max-w-xs"
11068
11111
  }
11069
11112
  ) : /* @__PURE__ */ jsx("div", {}),
@@ -11111,8 +11154,8 @@ function renderErrorState(error, serverError) {
11111
11154
  return /* @__PURE__ */ jsx(
11112
11155
  EmptyState,
11113
11156
  {
11114
- title: t13("table.error_title"),
11115
- description: msg || t13("table.error_description")
11157
+ title: t18("table.error_title"),
11158
+ description: msg || t18("table.error_description")
11116
11159
  }
11117
11160
  );
11118
11161
  }
@@ -11348,18 +11391,20 @@ function StackedBars({
11348
11391
  }
11349
11392
  );
11350
11393
  }
11394
+ var t19 = createPackageT("hazo_ui", en_default);
11351
11395
  function DateRangeSelector({
11352
11396
  value,
11353
11397
  onChange,
11354
11398
  options,
11355
11399
  className,
11356
- ariaLabel = "Date range"
11400
+ ariaLabel
11357
11401
  }) {
11402
+ const resolved_aria = ariaLabel ?? t19("charts.date_range");
11358
11403
  return /* @__PURE__ */ jsx(
11359
11404
  "div",
11360
11405
  {
11361
11406
  role: "group",
11362
- "aria-label": ariaLabel,
11407
+ "aria-label": resolved_aria,
11363
11408
  className: cn(
11364
11409
  "cls_hazo_date_range_selector inline-flex items-center gap-0 rounded-md border bg-background p-0.5",
11365
11410
  className
@@ -11602,6 +11647,7 @@ function FunnelChart({
11602
11647
 
11603
11648
  // src/assets/celebration-chime.mp3
11604
11649
  var celebration_chime_default = "data:text/plain;charset=utf-8,";
11650
+ var t20 = createPackageT("hazo_ui", en_default);
11605
11651
  var CELEBRATION_GRADIENT = "linear-gradient(135deg, #667eea 0%, #764ba2 100%)";
11606
11652
  var CARD_SIZE = 1080;
11607
11653
  var PREVIEW_SIZE = 400;
@@ -11799,7 +11845,7 @@ function CelebrationModalInner({
11799
11845
  {
11800
11846
  className: "cls_celebration_close_btn absolute top-3 right-3 z-10 p-1.5 rounded-full hover:bg-black/10 transition-colors",
11801
11847
  onClick: close_modal,
11802
- "aria-label": "Close celebration",
11848
+ "aria-label": t20("celebration.close"),
11803
11849
  children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4 text-gray-600" })
11804
11850
  }
11805
11851
  ),
@@ -11862,21 +11908,21 @@ function CelebrationModalInner({
11862
11908
  disabled: is_downloading,
11863
11909
  children: [
11864
11910
  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" }),
11865
- "Download PNG"
11911
+ t20("celebration.download_png")
11866
11912
  ]
11867
11913
  }
11868
11914
  ),
11869
11915
  can_share && /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: handle_share, children: [
11870
11916
  /* @__PURE__ */ jsx(Share2, { className: "h-3.5 w-3.5 mr-1.5" }),
11871
- "Share"
11917
+ t20("celebration.share")
11872
11918
  ] }),
11873
11919
  /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: handle_copy, children: [
11874
11920
  /* @__PURE__ */ jsx(Copy, { className: "h-3.5 w-3.5 mr-1.5" }),
11875
- "Copy image"
11921
+ t20("celebration.copy_image")
11876
11922
  ] })
11877
11923
  ] })
11878
11924
  ] }),
11879
- !shareableCard && /* @__PURE__ */ jsx("div", { className: "cls_celebration_footer pb-8", children: /* @__PURE__ */ jsx(Button, { size: "sm", onClick: close_modal, children: "Dismiss" }) })
11925
+ !shareableCard && /* @__PURE__ */ jsx("div", { className: "cls_celebration_footer pb-8", children: /* @__PURE__ */ jsx(Button, { size: "sm", onClick: close_modal, children: t20("celebration.dismiss") }) })
11880
11926
  ]
11881
11927
  }
11882
11928
  )
@@ -11898,8 +11944,8 @@ function computeEta(durationWindow, unitCount, concurrency = 1, fallbackUnitMs =
11898
11944
  }
11899
11945
  function easeToward(elapsed, eta, maxCap = 0.95) {
11900
11946
  if (eta <= 0 || elapsed <= 0) return 0;
11901
- const t14 = elapsed / eta;
11902
- return maxCap * (1 - Math.exp(-1.5 * t14));
11947
+ const t22 = elapsed / eta;
11948
+ return maxCap * (1 - Math.exp(-1.5 * t22));
11903
11949
  }
11904
11950
  function HazoUiProgressBar({
11905
11951
  value,
@@ -12075,13 +12121,16 @@ function upsertEntry(entries, entry) {
12075
12121
  function removeEntry(entries, id) {
12076
12122
  return entries.filter((e) => e.id !== id);
12077
12123
  }
12124
+ var t21 = createPackageT("hazo_ui", en_default);
12078
12125
  function HazoUiMemoryDropdown({
12079
12126
  history_key,
12080
- placeholder = "Search history\u2026",
12127
+ placeholder,
12081
12128
  on_select,
12082
12129
  add_entry,
12083
- empty_label = "No history yet"
12130
+ empty_label
12084
12131
  }) {
12132
+ const resolved_placeholder = placeholder ?? t21("memory.search_placeholder");
12133
+ const resolved_empty_label = empty_label ?? t21("memory.no_history");
12085
12134
  const { value: stored, setValue } = useHazoState(history_key, {
12086
12135
  level: "scope",
12087
12136
  fallback: []
@@ -12119,7 +12168,7 @@ function HazoUiMemoryDropdown({
12119
12168
  type: "text",
12120
12169
  value: query,
12121
12170
  onChange: (e) => setQuery(e.target.value),
12122
- placeholder,
12171
+ placeholder: resolved_placeholder,
12123
12172
  style: {
12124
12173
  width: "100%",
12125
12174
  background: "#FFFFFF",
@@ -12149,7 +12198,7 @@ function HazoUiMemoryDropdown({
12149
12198
  fontStyle: "italic",
12150
12199
  fontSize: 13
12151
12200
  },
12152
- children: empty_label
12201
+ children: resolved_empty_label
12153
12202
  }
12154
12203
  ) : filtered.map((entry) => /* @__PURE__ */ jsx(
12155
12204
  EntryRow,
@@ -12206,7 +12255,7 @@ function EntryRow({ entry, on_select, onDelete }) {
12206
12255
  onClick: (e) => onDelete(entry.id, e),
12207
12256
  onMouseEnter: () => setDeleteHovered(true),
12208
12257
  onMouseLeave: () => setDeleteHovered(false),
12209
- "aria-label": `Remove ${entry.label} from history`,
12258
+ "aria-label": t21("memory.remove_aria", { label: entry.label }),
12210
12259
  style: {
12211
12260
  flexShrink: 0,
12212
12261
  background: "none",