@nxgt/material 3.62.0 → 3.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -1
  3. package/dist/alert-dialog-RHm6WtQj.js +189 -0
  4. package/dist/{async-slice-HJY_VJjD.js → async-slice-DmX59NyA.js} +3 -4
  5. package/dist/{button-7BuUCGRm.js → button-DfS_amfQ.js} +1 -1
  6. package/dist/charts.js +3 -3
  7. package/dist/{chip-kQOrHlDX.js → chip-Cbndukko.js} +2 -2
  8. package/dist/{code-editor-Ckc9TTCM.js → code-editor-B0tN8Ha_.js} +11 -11
  9. package/dist/code-editor.js +5 -5
  10. package/dist/{code-language-items-rCPB0Xee.js → code-language-items-andgHKrM.js} +2 -2
  11. package/dist/components/ui/layout/sidebar/sidebar-tokens.css +13 -1
  12. package/dist/{components-TDDUQ1Y0.js → components-Cm2doOJS.js} +14345 -14224
  13. package/dist/components.js +28 -26
  14. package/dist/dialog-Bd7Hid2L.js +219 -0
  15. package/dist/dnd.js +1 -1
  16. package/dist/{dropdown-menu-CiobN1wi.js → dropdown-menu-_SyVmSuy.js} +1 -1
  17. package/dist/editor.js +707 -706
  18. package/dist/{empty-state-DA517HAb.js → empty-state-D-2ZMXXJ.js} +2 -2
  19. package/dist/escape-owner-DpaP0lm1.js +19 -0
  20. package/dist/{field-blur-DdvY0NQQ.js → field-blur-DyOByjzw.js} +1 -1
  21. package/dist/{field-blur-context-DbJQZkEB.js → field-blur-context-DPe5_Nv5.js} +1 -1
  22. package/dist/hooks-a7_exKWS.js +329 -0
  23. package/dist/hooks.js +3 -3
  24. package/dist/{hover-card-DPs9huSs.js → hover-card-D_0smKBQ.js} +2 -2
  25. package/dist/i18n.js +8 -10
  26. package/dist/{icon-badge-C646JTOI.js → icon-badge-CBCU3ySF.js} +14 -14
  27. package/dist/{icon-button-DvP0Gy3j.js → icon-button-hKHsWTAt.js} +1 -1
  28. package/dist/lib/components/ui/feedback/index.d.ts +1 -0
  29. package/dist/lib/components/ui/feedback/unsaved-dialog/index.d.ts +1 -0
  30. package/dist/lib/components/ui/feedback/unsaved-dialog/unsaved-dialog.d.ts +20 -0
  31. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  32. package/dist/lib/components/ui/fields/textarea-field/textarea-footer.d.ts +2 -1
  33. package/dist/lib/components/ui/widgets/education/questions/index.d.ts +3 -1
  34. package/dist/lib/components/ui/widgets/education/questions/partials/question-content.d.ts +1 -1
  35. package/dist/lib/components/ui/widgets/education/questions/partials/question-top.d.ts +6 -0
  36. package/dist/lib/components/ui/widgets/education/questions/question-long-text.d.ts +5 -0
  37. package/dist/lib/components/ui/widgets/education/questions/question-media-content.d.ts +24 -0
  38. package/dist/lib/components/ui/widgets/education/questions/question-media-helpers.d.ts +11 -0
  39. package/dist/lib/components/ui/widgets/education/questions/question-media-view.d.ts +18 -0
  40. package/dist/lib/components/ui/widgets/education/questions/question-media-view.types.d.ts +32 -0
  41. package/dist/lib/components/ui/widgets/education/questions/question-options.d.ts +2 -2
  42. package/dist/lib/components/ui/widgets/education/questions/question-text.d.ts +1 -1
  43. package/dist/lib/components/ui/widgets/education/questions/question.d.ts +1 -1
  44. package/dist/lib/components/ui/widgets/education/questions/types.d.ts +38 -1
  45. package/dist/lib/components/ui/widgets/education/questions/use-reload-focus.d.ts +13 -0
  46. package/dist/lib/hooks/index.d.ts +3 -0
  47. package/dist/lib/hooks/unsaved-guard-rules.d.ts +30 -0
  48. package/dist/lib/hooks/use-react-router-block.d.ts +11 -0
  49. package/dist/lib/hooks/use-unsaved-guard/guard-core.d.ts +30 -0
  50. package/dist/lib/hooks/use-unsaved-guard/index.d.ts +3 -0
  51. package/dist/lib/hooks/use-unsaved-guard/types.d.ts +63 -0
  52. package/dist/lib/hooks/use-unsaved-guard/use-discard-guard.d.ts +15 -0
  53. package/dist/lib/hooks/use-unsaved-guard/use-unsaved-guard.d.ts +19 -0
  54. package/dist/lib/i18n/resources/en/en.d.ts +20 -0
  55. package/dist/lib/i18n/resources/en/material.json.d.ts +21 -1
  56. package/dist/lib/i18n/resources/fr/fr.d.ts +20 -0
  57. package/dist/lib/i18n/resources/fr/material.json.d.ts +21 -1
  58. package/dist/lib/i18n/resources/resources.d.ts +40 -0
  59. package/dist/lib/i18n/translator.d.ts +1 -1
  60. package/dist/lib.js +1 -1
  61. package/dist/main.js +42 -43
  62. package/dist/map.js +63 -63
  63. package/dist/material.css +1 -1
  64. package/dist/pdf-reader.js +1 -1
  65. package/dist/print.js +1 -2
  66. package/dist/{public-BYsrhyPW.js → public-D8JGp3PH.js} +823 -822
  67. package/dist/{rich-code-block-WJxDWPPY.js → rich-code-block-0R3bidsM.js} +5 -5
  68. package/dist/{sortable-provider-oPjlhlZo.js → sortable-provider-B75v53sB.js} +2 -2
  69. package/dist/{spinner-C5lObWXT.js → spinner-CAnpF3RK.js} +1 -1
  70. package/dist/theme-picker.js +2 -2
  71. package/dist/{theme-toggle-CPEq5JG-.js → theme-toggle-pQ5F602V.js} +1 -1
  72. package/dist/{toolbar-items-ByvXcMHm.js → toolbar-items-_ezD5B0r.js} +4 -4
  73. package/dist/translate-material-CvZK8_S6.js +96 -0
  74. package/dist/{stored-language-B-tiWZU2.js → translator-Caf-d96e.js} +2497 -8
  75. package/dist/{escape-owner-r57kuPjn.js → typography-CEK19bj8.js} +17 -34
  76. package/dist/{use-chat-composer-CzOVaIed.js → use-chat-composer-Dpvi_-CR.js} +5164 -5338
  77. package/dist/{use-heading-spy-BOtygPFu.js → use-heading-spy-mmcyEGmm.js} +186 -71
  78. package/dist/{use-material-translation-B5j3jZs7.js → use-material-translation-C_1cWRzW.js} +1 -2
  79. package/dist/use-return-focus-1ZIchrBM.js +269 -0
  80. package/docs/components/feedback-and-status.md +23 -0
  81. package/docs/components/navigation-and-layout.md +4 -3
  82. package/docs/components/rich-widgets.md +73 -1
  83. package/docs/guides/helpers.md +63 -0
  84. package/docs/guides/theming.md +13 -3
  85. package/docs/previews/feedback-status-unsaveddialog.webp +0 -0
  86. package/lib/components/ui/layout/sidebar/sidebar-tokens.css +13 -1
  87. package/package.json +1 -1
  88. package/dist/dialog-yfPkLqUQ.js +0 -482
  89. package/dist/hooks-CGnqFngB.js +0 -187
  90. package/dist/i18n-provider-BehR6cU7.js +0 -79
  91. package/dist/translate-material-tUaLZUmT.js +0 -20
  92. package/dist/translator-B9XjUDRu.js +0 -2451
@@ -1,9 +1,14 @@
1
- import { r as e } from "./i18n-provider-BehR6cU7.js";
2
- import { _ as t, g as n, h as r, n as i, v as a, y as o } from "./number.utils-BG_eEt5g.js";
3
- import { useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
4
- import { busySettler as f, busySettler as p, createSubmitGuard as m, createSubmitGuard as h } from "@nxgt/material-core/submit-guard";
1
+ import { t as e } from "./utils-BLfntITJ.js";
2
+ import { a as t, c as n, d as r, i, n as a, r as o, t as s, u as c } from "./alert-dialog-RHm6WtQj.js";
3
+ import { a as l } from "./button-DfS_amfQ.js";
4
+ import { i as u } from "./translate-material-CvZK8_S6.js";
5
+ import { t as d } from "./use-material-translation-C_1cWRzW.js";
6
+ import { _ as f, g as p, h as m, n as h, v as g, y as _ } from "./number.utils-BG_eEt5g.js";
7
+ import { useCallback as v, useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
8
+ import { jsx as C, jsxs as w } from "react/jsx-runtime";
9
+ import { busySettler as T, busySettler as E, createSubmitGuard as D, createSubmitGuard as O } from "@nxgt/material-core/submit-guard";
5
10
  //#region ../../node_modules/date-fns/locale/fr/_lib/formatDistance.js
6
- var g = {
11
+ var k = {
7
12
  lessThanXSeconds: {
8
13
  one: "moins d’une seconde",
9
14
  other: "moins de {{count}} secondes"
@@ -65,11 +70,11 @@ var g = {
65
70
  one: "presqu’un an",
66
71
  other: "presque {{count}} ans"
67
72
  }
68
- }, _ = (e, t, n) => {
69
- let r, i = g[e];
73
+ }, A = (e, t, n) => {
74
+ let r, i = k[e];
70
75
  return r = typeof i == "string" ? i : t === 1 ? i.one : i.other.replace("{{count}}", String(t)), n?.addSuffix ? n.comparison && n.comparison > 0 ? "dans " + r : "il y a " + r : r;
71
- }, v = {
72
- date: o({
76
+ }, j = {
77
+ date: _({
73
78
  formats: {
74
79
  full: "EEEE d MMMM y",
75
80
  long: "d MMMM y",
@@ -78,7 +83,7 @@ var g = {
78
83
  },
79
84
  defaultWidth: "full"
80
85
  }),
81
- time: o({
86
+ time: _({
82
87
  formats: {
83
88
  full: "HH:mm:ss zzzz",
84
89
  long: "HH:mm:ss z",
@@ -87,7 +92,7 @@ var g = {
87
92
  },
88
93
  defaultWidth: "full"
89
94
  }),
90
- dateTime: o({
95
+ dateTime: _({
91
96
  formats: {
92
97
  full: "{{date}} 'à' {{time}}",
93
98
  long: "{{date}} 'à' {{time}}",
@@ -96,18 +101,18 @@ var g = {
96
101
  },
97
102
  defaultWidth: "full"
98
103
  })
99
- }, y = {
104
+ }, M = {
100
105
  lastWeek: "eeee 'dernier à' p",
101
106
  yesterday: "'hier à' p",
102
107
  today: "'aujourd’hui à' p",
103
108
  tomorrow: "'demain à' p'",
104
109
  nextWeek: "eeee 'prochain à' p",
105
110
  other: "P"
106
- }, b = (e, t, n, r) => y[e], x = {
111
+ }, N = (e, t, n, r) => M[e], P = {
107
112
  narrow: ["av. J.-C", "ap. J.-C"],
108
113
  abbreviated: ["av. J.-C", "ap. J.-C"],
109
114
  wide: ["avant Jésus-Christ", "après Jésus-Christ"]
110
- }, S = {
115
+ }, F = {
111
116
  narrow: [
112
117
  "T1",
113
118
  "T2",
@@ -126,7 +131,7 @@ var g = {
126
131
  "3ème trimestre",
127
132
  "4ème trimestre"
128
133
  ]
129
- }, C = {
134
+ }, I = {
130
135
  narrow: [
131
136
  "J",
132
137
  "F",
@@ -169,7 +174,7 @@ var g = {
169
174
  "novembre",
170
175
  "décembre"
171
176
  ]
172
- }, w = {
177
+ }, L = {
173
178
  narrow: [
174
179
  "D",
175
180
  "L",
@@ -206,7 +211,7 @@ var g = {
206
211
  "vendredi",
207
212
  "samedi"
208
213
  ]
209
- }, T = {
214
+ }, R = {
210
215
  narrow: {
211
216
  am: "AM",
212
217
  pm: "PM",
@@ -237,7 +242,7 @@ var g = {
237
242
  evening: "du soir",
238
243
  night: "du matin"
239
244
  }
240
- }, E = (e, t) => {
245
+ }, z = (e, t) => {
241
246
  let n = Number(e), r = t?.unit;
242
247
  if (n === 0) return "0";
243
248
  let i = [
@@ -248,48 +253,48 @@ var g = {
248
253
  "second"
249
254
  ], a;
250
255
  return a = n === 1 ? r && i.includes(r) ? "ère" : "er" : "ème", n + a;
251
- }, D = ["MMM", "MMMM"], O = {
252
- en: r,
256
+ }, B = ["MMM", "MMMM"], V = {
257
+ en: m,
253
258
  fr: {
254
259
  code: "fr",
255
- formatDistance: _,
256
- formatLong: v,
257
- formatRelative: b,
260
+ formatDistance: A,
261
+ formatLong: j,
262
+ formatRelative: N,
258
263
  localize: {
259
- preprocessor: (e, t) => e.getDate() === 1 || !t.some((e) => e.isToken && D.includes(e.value)) ? t : t.map((e) => e.isToken && e.value === "do" ? {
264
+ preprocessor: (e, t) => e.getDate() === 1 || !t.some((e) => e.isToken && B.includes(e.value)) ? t : t.map((e) => e.isToken && e.value === "do" ? {
260
265
  isToken: !0,
261
266
  value: "d"
262
267
  } : e),
263
- ordinalNumber: E,
264
- era: a({
265
- values: x,
268
+ ordinalNumber: z,
269
+ era: g({
270
+ values: P,
266
271
  defaultWidth: "wide"
267
272
  }),
268
- quarter: a({
269
- values: S,
273
+ quarter: g({
274
+ values: F,
270
275
  defaultWidth: "wide",
271
276
  argumentCallback: (e) => e - 1
272
277
  }),
273
- month: a({
274
- values: C,
278
+ month: g({
279
+ values: I,
275
280
  defaultWidth: "wide"
276
281
  }),
277
- day: a({
278
- values: w,
282
+ day: g({
283
+ values: L,
279
284
  defaultWidth: "wide"
280
285
  }),
281
- dayPeriod: a({
282
- values: T,
286
+ dayPeriod: g({
287
+ values: R,
283
288
  defaultWidth: "wide"
284
289
  })
285
290
  },
286
291
  match: {
287
- ordinalNumber: n({
292
+ ordinalNumber: p({
288
293
  matchPattern: /^(\d+)(ième|ère|ème|er|e)?/i,
289
294
  parsePattern: /\d+/i,
290
295
  valueCallback: (e) => parseInt(e)
291
296
  }),
292
- era: t({
297
+ era: f({
293
298
  matchPatterns: {
294
299
  narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
295
300
  abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
@@ -299,7 +304,7 @@ var g = {
299
304
  parsePatterns: { any: [/^av/i, /^ap/i] },
300
305
  defaultParseWidth: "any"
301
306
  }),
302
- quarter: t({
307
+ quarter: f({
303
308
  matchPatterns: {
304
309
  narrow: /^T?[1234]/i,
305
310
  abbreviated: /^[1234](er|ème|e)? trim\.?/i,
@@ -315,7 +320,7 @@ var g = {
315
320
  defaultParseWidth: "any",
316
321
  valueCallback: (e) => e + 1
317
322
  }),
318
- month: t({
323
+ month: f({
319
324
  matchPatterns: {
320
325
  narrow: /^[jfmasond]/i,
321
326
  abbreviated: /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
@@ -354,7 +359,7 @@ var g = {
354
359
  },
355
360
  defaultParseWidth: "any"
356
361
  }),
357
- day: t({
362
+ day: f({
358
363
  matchPatterns: {
359
364
  narrow: /^[lmjvsd]/i,
360
365
  short: /^(di|lu|ma|me|je|ve|sa)/i,
@@ -384,7 +389,7 @@ var g = {
384
389
  },
385
390
  defaultParseWidth: "any"
386
391
  }),
387
- dayPeriod: t({
392
+ dayPeriod: f({
388
393
  matchPatterns: {
389
394
  narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
390
395
  any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i
@@ -409,66 +414,176 @@ var g = {
409
414
  }
410
415
  }
411
416
  };
412
- function k() {
413
- let t = e()?.language ?? "en", n = l(() => O[t] ?? r, [t]);
417
+ function H() {
418
+ let e = u()?.language ?? "en", t = b(() => V[e] ?? m, [e]);
414
419
  return {
415
- language: t,
416
- locale: n,
417
- format: s((e, t) => i.format(e, t, n), [n])
420
+ language: e,
421
+ locale: t,
422
+ format: v((e, n) => h.format(e, n, t), [t])
418
423
  };
419
424
  }
420
425
  //#endregion
426
+ //#region lib/components/ui/feedback/alert-dialog/alert-dialog-actions.tsx
427
+ function U({ className: t, ...n }) {
428
+ return /* @__PURE__ */ C(c, {
429
+ className: e(l({
430
+ variant: n.variant,
431
+ color: n.color
432
+ }), t),
433
+ ...n
434
+ });
435
+ }
436
+ function W({ className: t, ...n }) {
437
+ return /* @__PURE__ */ C(r, {
438
+ "data-variant": n.variant ?? "tonal",
439
+ className: e(l({
440
+ variant: n.variant ?? "tonal",
441
+ color: n.color
442
+ }), t),
443
+ ...n
444
+ });
445
+ }
446
+ //#endregion
421
447
  //#region lib/hooks/use-focus-on-mount.ts
422
- function A(e = !0) {
423
- let t = u(null);
424
- return c(() => {
448
+ function G(e = !0) {
449
+ let t = x(null);
450
+ return y(() => {
425
451
  e && t.current?.focus();
426
452
  }, [e]), t;
427
453
  }
428
454
  //#endregion
429
455
  //#region lib/hooks/use-submit-once.ts
430
- function j(e) {
431
- let [t] = d(m), [n] = d(() => f(t)), r = e !== void 0;
432
- return c(() => {
456
+ function K(e) {
457
+ let [t] = S(D), [n] = S(() => T(t)), r = e !== void 0;
458
+ return y(() => {
433
459
  e !== void 0 && n(e);
434
- }, [e, n]), s((e, n) => t.once(e, {
460
+ }, [e, n]), v((e, n) => t.once(e, {
435
461
  settleSync: !r,
436
462
  ...n
437
463
  }), [t, r]);
438
464
  }
439
465
  //#endregion
466
+ //#region lib/components/ui/feedback/confirm-dialog/confirm-dialog-rules.ts
467
+ function q(e) {
468
+ return e === "destructive" ? "max-sm:flex-col" : void 0;
469
+ }
470
+ function J({ busy: e, confirmDisabled: t, lockOnRefusal: n, error: r }) {
471
+ return e || !!t || !!n && !!r;
472
+ }
473
+ //#endregion
474
+ //#region lib/components/ui/feedback/confirm-dialog/use-confirm-action.ts
475
+ function Y({ open: e, onOpenChange: t, onConfirm: n }) {
476
+ let { t: r } = d(), [i, a] = S(!1), [o, s] = S(null);
477
+ return y(() => {
478
+ e || s(null);
479
+ }, [e]), {
480
+ pending: i,
481
+ error: o,
482
+ handleOpenChange: (e) => {
483
+ e && s(null), t(e);
484
+ },
485
+ handleConfirm: async (e) => {
486
+ e.preventDefault(), s(null), a(!0);
487
+ try {
488
+ await n(), t(!1);
489
+ } catch (e) {
490
+ s(e instanceof Error && e.message ? e.message : r("material.confirm-dialog.failed", "The action failed."));
491
+ } finally {
492
+ a(!1);
493
+ }
494
+ }
495
+ };
496
+ }
497
+ //#endregion
498
+ //#region lib/components/ui/feedback/confirm-dialog/confirm-dialog.tsx
499
+ function X({ open: e, onOpenChange: r, title: c, description: l, confirmLabel: u, cancelLabel: f, cancelVariant: p, onConfirm: m, variant: h = "default", loading: g = !1, confirmDisabled: _, lockOnRefusal: v, onCloseAutoFocus: y }) {
500
+ let { t: b } = d(), { pending: x, error: S, handleOpenChange: T, handleConfirm: E } = Y({
501
+ open: e,
502
+ onOpenChange: r,
503
+ onConfirm: m
504
+ }), D = g || x;
505
+ return /* @__PURE__ */ C(s, {
506
+ open: e,
507
+ onOpenChange: T,
508
+ children: /* @__PURE__ */ w(a, {
509
+ onCloseAutoFocus: y,
510
+ children: [
511
+ /* @__PURE__ */ w(t, { children: [/* @__PURE__ */ C(n, { children: c }), /* @__PURE__ */ C(o, { children: l })] }),
512
+ S && /* @__PURE__ */ C("p", {
513
+ role: "alert",
514
+ className: "text-sm text-error-text",
515
+ children: S
516
+ }),
517
+ /* @__PURE__ */ w(i, {
518
+ className: q(h),
519
+ children: [/* @__PURE__ */ C(W, {
520
+ disabled: D,
521
+ variant: p,
522
+ children: f ?? b("material.confirm-dialog.cancel", "Cancel")
523
+ }), /* @__PURE__ */ C(U, {
524
+ onClick: E,
525
+ color: h === "destructive" ? "error" : "primary",
526
+ disabled: J({
527
+ busy: D,
528
+ confirmDisabled: _,
529
+ lockOnRefusal: v,
530
+ error: S
531
+ }),
532
+ children: D ? b("material.confirm-dialog.processing", "Processing...") : u ?? b("material.confirm-dialog.confirm", "Confirm")
533
+ })]
534
+ })
535
+ ]
536
+ })
537
+ });
538
+ }
539
+ //#endregion
440
540
  //#region lib/hooks/use-countdown.ts
441
- function M(e, { paused: t = !1, onExpire: n, key: r } = {}) {
442
- let [i, a] = d(e), [o, s] = d({
541
+ function Z(e, { paused: t = !1, onExpire: n, key: r } = {}) {
542
+ let [i, a] = S(e), [o, s] = S({
443
543
  duration: e,
444
544
  key: r
445
- }), l = u(e), f = u(n);
446
- f.current = n;
447
- let p = o.duration !== e || o.key !== r;
448
- return p && (s({
545
+ }), c = x(e), l = x(n);
546
+ l.current = n;
547
+ let u = o.duration !== e || o.key !== r;
548
+ return u && (s({
449
549
  duration: e,
450
550
  key: r
451
- }), a(e)), c(() => {
452
- l.current = e;
453
- }, [e, r]), c(() => {
454
- if (t || l.current <= 0) return;
455
- let e = Date.now() + l.current * 1e3, n = window.setInterval(() => {
551
+ }), a(e)), y(() => {
552
+ c.current = e;
553
+ }, [e, r]), y(() => {
554
+ if (t || c.current <= 0) return;
555
+ let e = Date.now() + c.current * 1e3, n = window.setInterval(() => {
456
556
  let t = Math.max(0, (e - Date.now()) / 1e3);
457
- l.current = t, a(t), t <= 0 && (window.clearInterval(n), f.current?.());
557
+ c.current = t, a(t), t <= 0 && (window.clearInterval(n), l.current?.());
458
558
  }, 250);
459
559
  return () => window.clearInterval(n);
460
560
  }, [
461
561
  t,
462
562
  e,
463
563
  r
464
- ]), p ? e : i;
564
+ ]), u ? e : i;
565
+ }
566
+ //#endregion
567
+ //#region lib/components/ui/feedback/unsaved-dialog/unsaved-dialog.tsx
568
+ function Q({ open: e, onOpenChange: t, onLeave: n, title: r, description: i, stayLabel: a, leaveLabel: o }) {
569
+ let { t: s } = d();
570
+ return /* @__PURE__ */ C(X, {
571
+ open: e,
572
+ onOpenChange: t,
573
+ variant: "destructive",
574
+ title: r ?? s("material.unsaved.title", "Leave without saving?"),
575
+ description: i ?? s("material.unsaved.description", "Your changes have not been saved and will be lost."),
576
+ cancelLabel: a ?? s("material.unsaved.stay", "Stay"),
577
+ confirmLabel: o ?? s("material.unsaved.leave", "Leave"),
578
+ onConfirm: n
579
+ });
465
580
  }
466
581
  //#endregion
467
582
  //#region lib/hooks/use-heading-spy.ts
468
- var N = "0px 0px -65% 0px", P = [0, 1];
469
- function F(e, t, n) {
470
- let r = n?.rootMargin ?? N, i = n?.threshold ?? P;
471
- c(() => {
583
+ var $ = "0px 0px -65% 0px", ee = [0, 1];
584
+ function te(e, t, n) {
585
+ let r = n?.rootMargin ?? $, i = n?.threshold ?? ee;
586
+ y(() => {
472
587
  if (e.length === 0) return;
473
588
  let n = e.map((e) => document.getElementById(e)).filter((e) => e != null);
474
589
  if (n.length === 0) return;
@@ -489,4 +604,4 @@ function F(e, t, n) {
489
604
  ]);
490
605
  }
491
606
  //#endregion
492
- export { j as a, h as i, M as n, A as o, p as r, k as s, F as t };
607
+ export { E as a, G as c, H as d, X as i, U as l, Q as n, O as o, Z as r, K as s, te as t, W as u };
@@ -1,5 +1,4 @@
1
- import { r as e } from "./i18n-provider-BehR6cU7.js";
2
- import { t } from "./translate-material-tUaLZUmT.js";
1
+ import { i as e, t } from "./translate-material-CvZK8_S6.js";
3
2
  import { useCallback as n } from "react";
4
3
  //#region lib/i18n/use-material-translation.ts
5
4
  function r() {