@nxgt/material 3.101.0 → 3.104.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 (207) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/README.md +37 -5
  3. package/dist/{alert-dialog-DYzxchiS.js → alert-dialog-CK_47jfm.js} +1 -1
  4. package/dist/{async-slice-drJyPvuM.js → async-slice-1ZNMiwyJ.js} +1 -1
  5. package/dist/{bubble-input-CQwVSoU3.js → bubble-input-BxI1WmNs.js} +17 -5
  6. package/dist/{button-GeIsUekU.js → button-YfEMZbRO.js} +2 -2
  7. package/dist/{calculator-BS4PAm6l.js → calculator-BmYZId4c.js} +261 -460
  8. package/dist/calculator-field.js +7 -7
  9. package/dist/{calculator-segment-CEdwE24M.js → calculator-segment-DJ08DJ-n.js} +1 -1
  10. package/dist/calculator.js +1 -1
  11. package/dist/charts.js +819 -764
  12. package/dist/{chip-BdEtFQ85.js → chip-DPj6e-3v.js} +2 -2
  13. package/dist/{code-editor-BByXZOGy.js → code-editor-CZg3nLZO.js} +178 -177
  14. package/dist/code-editor.js +5 -5
  15. package/dist/{code-language-items-CSZX5zxD.js → code-language-items-Nq1iOGId.js} +14 -5
  16. package/dist/components/ui/actions/action-card/action-card-tile.css +47 -0
  17. package/dist/components/ui/display/chip/chip-soft.css +27 -2
  18. package/dist/components/ui/display/code/code-moonlight.css +10 -10
  19. package/dist/components/ui/primitives/collapsible/collapsible.css +9 -0
  20. package/dist/{components-DQ4MljCr.js → components-B2wrH_W0.js} +19302 -18583
  21. package/dist/components.js +38 -37
  22. package/dist/{conversion-variant-DTQqAyDt.js → conversion-variant-C-LPx5ek.js} +5 -5
  23. package/dist/{currency-field-Dnju7ss2.js → currency-field-DnsRIA80.js} +24 -23
  24. package/dist/{dialog-5_2__tu8.js → dialog-BKBsDGFc.js} +3 -3
  25. package/dist/dnd.js +1 -1
  26. package/dist/{dropdown-menu-FdGC5kIP.js → dropdown-menu-QMDbRidH.js} +1 -1
  27. package/dist/editor.js +9 -9
  28. package/dist/{empty-state-BoepPG5v.js → empty-state-BLIJ6znY.js} +1 -1
  29. package/dist/{field-blur-DkiZOVNV.js → field-blur-DMJwPLsg.js} +9 -9
  30. package/dist/field-blur-context-3rKussBQ.js +29 -0
  31. package/dist/{financial-variant-BhqJp5C-.js → financial-variant-Ws0Jp01H.js} +5 -5
  32. package/dist/{hooks-DjcbJZiO.js → hooks-C3vkQmzh.js} +106 -61
  33. package/dist/hooks.js +3 -3
  34. package/dist/{hover-card-CmHJeBeY.js → hover-card-Df649U6I.js} +1 -1
  35. package/dist/i18n.js +3 -3
  36. package/dist/{icon-badge-LGUPQh_c.js → icon-badge-Cma1qOOJ.js} +1 -1
  37. package/dist/{icon-button-BSVpO1jP.js → icon-button-CpKxV264.js} +1 -1
  38. package/dist/key-layout-D2goCDkD.js +31 -0
  39. package/dist/keypad.js +551 -0
  40. package/dist/label-DR-zZyGQ.js +47 -0
  41. package/dist/lib/components/ui/actions/index.d.ts +1 -0
  42. package/dist/lib/components/ui/actions/product-tile/index.d.ts +1 -0
  43. package/dist/lib/components/ui/actions/product-tile/product-tile-link.d.ts +16 -0
  44. package/dist/lib/components/ui/actions/product-tile/product-tile.d.ts +41 -0
  45. package/dist/lib/components/ui/collections/data-table/data-table-density.d.ts +1 -1
  46. package/dist/lib/components/ui/collections/data-table/partials/data-table-scroll-region.d.ts +4 -1
  47. package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-list-bar.d.ts +6 -3
  48. package/dist/lib/components/ui/collections/data-table/partials/layouts/list-bar-in-row.d.ts +2 -1
  49. package/dist/lib/components/ui/collections/data-table/types.d.ts +11 -8
  50. package/dist/lib/components/ui/collections/data-table/virtual-option.d.ts +9 -3
  51. package/dist/lib/components/ui/collections/filter/use-filter-field-config.d.ts +2 -0
  52. package/dist/lib/components/ui/collections/server-table/partials/server-table-passed-through.d.ts +1 -0
  53. package/dist/lib/components/ui/collections/server-table/types.d.ts +1 -1
  54. package/dist/lib/components/ui/display/chip/chip.variants.d.ts +5 -4
  55. package/dist/lib/components/ui/display/code/code-block-parts.d.ts +1 -1
  56. package/dist/lib/components/ui/display/code/code-block.d.ts +4 -1
  57. package/dist/lib/components/ui/display/code/languages.d.ts +2 -0
  58. package/dist/lib/components/ui/display/code/moonlight-tokens.d.ts +10 -10
  59. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-dialog-props.d.ts +73 -0
  60. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-dialog-rules.d.ts +12 -0
  61. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-dialog.d.ts +5 -61
  62. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-footer.d.ts +12 -0
  63. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-phrase.d.ts +26 -0
  64. package/dist/lib/components/ui/feedback/confirm-dialog/use-confirm-action.d.ts +1 -1
  65. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  66. package/dist/lib/components/ui/fields/index.d.ts +1 -0
  67. package/dist/lib/components/ui/fields/quantity-field/types.d.ts +1 -1
  68. package/dist/lib/components/ui/fields/quantity-stepper/index.d.ts +2 -0
  69. package/dist/lib/components/ui/fields/quantity-stepper/quantity-stepper-model.d.ts +9 -0
  70. package/dist/lib/components/ui/fields/quantity-stepper/quantity-stepper-value.d.ts +15 -0
  71. package/dist/lib/components/ui/fields/quantity-stepper/quantity-stepper.d.ts +9 -0
  72. package/dist/lib/components/ui/fields/quantity-stepper/quantity-stepper.types.d.ts +35 -0
  73. package/dist/lib/components/ui/fields/quantity-stepper/use-quantity-stepper.d.ts +28 -0
  74. package/dist/lib/components/ui/layout/index.d.ts +1 -0
  75. package/dist/lib/components/ui/layout/pane-layout/pane-layout.d.ts +8 -3
  76. package/dist/lib/components/ui/layout/pane-layout/partials/pane-layout-classes.d.ts +2 -2
  77. package/dist/lib/components/ui/layout/pane-layout/partials/pane-layout-context.d.ts +9 -0
  78. package/dist/lib/components/ui/layout/pane-layout/partials/use-pane-layout-state.d.ts +7 -2
  79. package/dist/lib/components/ui/layout/panel-card/index.d.ts +1 -0
  80. package/dist/lib/components/ui/layout/panel-card/panel-card.d.ts +23 -0
  81. package/dist/lib/components/ui/primitives/collapsible/collapsible.d.ts +9 -1
  82. package/dist/lib/components/ui/primitives/tabs/partials/tabs-list.d.ts +6 -1
  83. package/dist/lib/components/ui/primitives/tabs/tabs-classes.d.ts +1 -0
  84. package/dist/lib/components/ui/selection/chip-group-field/chip-group-field.d.ts +8 -0
  85. package/dist/lib/components/ui/selection/chip-group-field/chip-group-field.types.d.ts +6 -0
  86. package/dist/lib/components/ui/selection/chip-group-field/partials/chip-group-reasons.d.ts +10 -0
  87. package/dist/lib/components/ui/selection/chip-group-field/partials/use-chip-rail.d.ts +12 -0
  88. package/dist/lib/components/ui/selection/choice-group/choice-group-root.d.ts +5 -2
  89. package/dist/lib/components/ui/selection/index.d.ts +1 -0
  90. package/dist/lib/components/ui/selection/status-menu/index.d.ts +3 -0
  91. package/dist/lib/components/ui/selection/status-menu/partials/status-confirm.d.ts +12 -0
  92. package/dist/lib/components/ui/selection/status-menu/partials/status-icon.d.ts +6 -0
  93. package/dist/lib/components/ui/selection/status-menu/partials/status-items.d.ts +18 -0
  94. package/dist/lib/components/ui/selection/status-menu/partials/status-menu-list.d.ts +14 -0
  95. package/dist/lib/components/ui/selection/status-menu/partials/status-sheet-row.d.ts +11 -0
  96. package/dist/lib/components/ui/selection/status-menu/partials/status-sheet.d.ts +21 -0
  97. package/dist/lib/components/ui/selection/status-menu/partials/status-trigger.d.ts +18 -0
  98. package/dist/lib/components/ui/selection/status-menu/status-menu-data.d.ts +12 -0
  99. package/dist/lib/components/ui/selection/status-menu/status-menu-form-field.d.ts +20 -0
  100. package/dist/lib/components/ui/selection/status-menu/status-menu.d.ts +13 -0
  101. package/dist/lib/components/ui/selection/status-menu/types.d.ts +76 -0
  102. package/dist/lib/components/ui/selection/status-menu/use-status-change.d.ts +18 -0
  103. package/dist/lib/components/ui/selection/status-menu/use-status-menu.d.ts +30 -0
  104. package/dist/lib/components/ui/widgets/calculator/partials/calculator-keypad.d.ts +1 -5
  105. package/dist/lib/components/ui/widgets/calculator/variants/key-layout.d.ts +3 -49
  106. package/dist/lib/components/ui/widgets/keypad/cash-model.d.ts +16 -0
  107. package/dist/lib/components/ui/widgets/keypad/index.d.ts +5 -0
  108. package/dist/lib/components/ui/widgets/keypad/key-layout.d.ts +56 -0
  109. package/dist/lib/components/ui/widgets/keypad/keypad-binding.d.ts +32 -0
  110. package/dist/lib/components/ui/widgets/keypad/keypad-cash.d.ts +28 -0
  111. package/dist/lib/components/ui/widgets/keypad/keypad-display.d.ts +11 -0
  112. package/dist/lib/components/ui/widgets/keypad/keypad-entry.d.ts +39 -0
  113. package/dist/lib/components/ui/widgets/keypad/keypad-grid.d.ts +27 -0
  114. package/dist/lib/components/ui/widgets/{calculator/partials/calculator-key.d.ts → keypad/keypad-key.d.ts} +6 -3
  115. package/dist/lib/components/ui/widgets/keypad/keypad-layout.d.ts +19 -0
  116. package/dist/lib/components/ui/widgets/{calculator/partials → keypad}/keypad-navigation.d.ts +1 -1
  117. package/dist/lib/components/ui/widgets/keypad/keypad.d.ts +9 -0
  118. package/dist/lib/components/ui/widgets/keypad/keypad.types.d.ts +91 -0
  119. package/dist/lib/components/ui/widgets/keypad/use-keypad-cash.d.ts +14 -0
  120. package/dist/lib/components/ui/widgets/keypad/use-keypad-keyboard.d.ts +7 -0
  121. package/dist/lib/components/ui/widgets/keypad/use-keypad-number.d.ts +10 -0
  122. package/dist/lib/components/ui/widgets/keypad/use-keypad-quantity.d.ts +16 -0
  123. package/dist/lib/components/ui/widgets/keypad/use-keypad-value.d.ts +17 -0
  124. package/dist/lib/components/ui/widgets/keypad/use-keypad.d.ts +23 -0
  125. package/dist/lib/components/ui/widgets/native-charts/core/label-placement.d.ts +25 -0
  126. package/dist/lib/components/ui/widgets/native-charts/core/reference-geometry.d.ts +3 -2
  127. package/dist/lib/hooks/index.d.ts +1 -0
  128. package/dist/lib/hooks/use-barcode-scanner.d.ts +39 -0
  129. package/dist/lib/i18n/resources/en/en.d.ts +28 -0
  130. package/dist/lib/i18n/resources/en/material.json.d.ts +30 -2
  131. package/dist/lib/i18n/resources/fr/fr.d.ts +28 -0
  132. package/dist/lib/i18n/resources/fr/material.json.d.ts +30 -2
  133. package/dist/lib/i18n/resources/resources.d.ts +56 -0
  134. package/dist/lib/i18n/translator.d.ts +1 -1
  135. package/dist/lib/keypad/index.d.ts +20 -0
  136. package/dist/lib/print/output/csv.d.ts +37 -0
  137. package/dist/lib/print/output/index.d.ts +1 -0
  138. package/dist/lib.js +1 -1
  139. package/dist/main.js +54 -53
  140. package/dist/map.js +9 -9
  141. package/dist/material.css +1 -1
  142. package/dist/pdf-reader.js +1 -1
  143. package/dist/{percent-field-DGlU_xii.js → percent-field-sAq7BaxN.js} +15 -14
  144. package/dist/{picker-surface-CGhqNR8a.js → picker-surface--6E-nvpU.js} +4 -4
  145. package/dist/{popover-ZxL7ktKk.js → popover-bEB8I_-w.js} +1 -1
  146. package/dist/{pos-types-BQ0QpYMp.js → pos-types-Cpdc4E33.js} +1 -1
  147. package/dist/{pos-variant-CKy8h_5i.js → pos-variant-ClMGu59I.js} +25 -25
  148. package/dist/print.js +146 -127
  149. package/dist/{programmer-variant-CbHstE28.js → programmer-variant-ChzgyA7x.js} +30 -30
  150. package/dist/{public-D-tdOz4b.js → public-BY8N5NDT.js} +9 -9
  151. package/dist/{rich-code-block-CTPj1LuD.js → rich-code-block-D2GiWuqD.js} +18 -18
  152. package/dist/{scientific-variant-B8U9h3II.js → scientific-variant-31_93gcZ.js} +8 -8
  153. package/dist/{sortable-provider-CSoWE7Ce.js → sortable-provider-DGiVn72t.js} +2 -2
  154. package/dist/{spinner-ffuwBXHl.js → spinner-CEVomQ5K.js} +1 -1
  155. package/dist/standard-layout-DTr9yy8Z.js +48 -0
  156. package/dist/{tabs-JgRq6ZJx.js → tabs-B8MXBbPW.js} +14 -14
  157. package/dist/{text-field-DURkIP-v.js → text-field-DN88qD0Q.js} +16 -15
  158. package/dist/theme-picker.js +13 -13
  159. package/dist/{theme-toggle-n_Zg7JAA.js → theme-toggle-C7pnu1Xh.js} +1 -1
  160. package/dist/{toolbar-items-IANZdcw4.js → toolbar-items-BDfoh8QB.js} +4 -4
  161. package/dist/{translate-material-CMHUH5Ha.js → translate-material-s_lxIV43.js} +1 -1
  162. package/dist/{translator-9zA-Um3W.js → translator-Cgql9srO.js} +56 -4
  163. package/dist/use-calculator-keyboard-DysnFK8m.js +222 -0
  164. package/dist/{use-chat-composer-BoIN7RCA.js → use-chat-composer-xCcp9fVc.js} +2250 -2195
  165. package/dist/{use-heading-spy-Ciw9GBHL.js → use-heading-spy-FIZlf9qj.js} +235 -154
  166. package/dist/{use-material-translation-CLNaMhUf.js → use-material-translation-xNzbSVgS.js} +1 -1
  167. package/dist/{use-return-focus-DWhbTGVe.js → use-return-focus-CW9KkDkp.js} +1 -1
  168. package/docs/README.md +2 -1
  169. package/docs/components/README.md +2 -0
  170. package/docs/components/buttons-and-actions.md +81 -2
  171. package/docs/components/data-display.md +6 -3
  172. package/docs/components/data-table-filter-and-lists.md +19 -6
  173. package/docs/components/feedback-and-status.md +20 -0
  174. package/docs/components/form-fields.md +60 -7
  175. package/docs/components/navigation-and-layout.md +48 -2
  176. package/docs/components/primitives.md +44 -2
  177. package/docs/components/rich-widgets.md +28 -0
  178. package/docs/components/selection-and-choice.md +176 -1
  179. package/docs/guides/calculator.md +1 -1
  180. package/docs/guides/cards-and-tiles.md +31 -24
  181. package/docs/guides/csp.md +4 -3
  182. package/docs/guides/data-grid.md +5 -4
  183. package/docs/guides/field-look-refined.md +2 -2
  184. package/docs/guides/forms.md +1 -0
  185. package/docs/guides/helpers.md +49 -0
  186. package/docs/guides/keypad.md +233 -0
  187. package/docs/guides/printing.md +51 -1
  188. package/docs/previews/buttons-actions-producttile.webp +0 -0
  189. package/docs/previews/data-display-codeblock.webp +0 -0
  190. package/docs/previews/data-display-codegroup.webp +0 -0
  191. package/docs/previews/data-display-jsonviewer.webp +0 -0
  192. package/docs/previews/form-fields-quantitystepper.webp +0 -0
  193. package/docs/previews/navigation-layout-panelcard.webp +0 -0
  194. package/docs/previews/rich-widgets-keypad.webp +0 -0
  195. package/docs/previews/selection-choice-statusmenu.webp +0 -0
  196. package/docs/roadmap.md +21 -0
  197. package/docs/troubleshooting.md +68 -4
  198. package/lib/components/ui/actions/action-card/action-card-tile.css +47 -0
  199. package/lib/components/ui/display/chip/chip-soft.css +27 -2
  200. package/lib/components/ui/display/code/code-moonlight.css +10 -10
  201. package/lib/components/ui/primitives/collapsible/collapsible.css +9 -0
  202. package/lib/components/ui/widgets/calculator/calculator-keys.css +3 -0
  203. package/lib/components/ui/widgets/calculator/calculator.css +118 -0
  204. package/package.json +7 -2
  205. package/dist/field-blur-context-BLGgf_3z.js +0 -73
  206. package/dist/key-layout-cR79xfGE.js +0 -38
  207. package/dist/standard-layout-BuSRr3TY.js +0 -40
@@ -1,14 +1,16 @@
1
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-DYzxchiS.js";
3
- import { a as l } from "./button-GeIsUekU.js";
4
- import { i as u } from "./translate-material-CMHUH5Ha.js";
5
- import { t as d } from "./use-material-translation-CLNaMhUf.js";
6
- import { _ as f, g as p, h as m, t as h, v as g, y as _ } from "./date.utils-JTEIo3mM.js";
7
- import { useCallback as v, useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
8
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
9
- import { busySettler as E, busySettler as D, createSubmitGuard as O, createSubmitGuard as k } from "@nxgt/material-core/submit-guard";
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-CK_47jfm.js";
3
+ import { t as l } from "./label-DR-zZyGQ.js";
4
+ import { a as u } from "./button-YfEMZbRO.js";
5
+ import { i as d } from "./translate-material-s_lxIV43.js";
6
+ import { t as f } from "./use-material-translation-xNzbSVgS.js";
7
+ import { _ as p, g as m, h, t as g, v as _, y as v } from "./date.utils-JTEIo3mM.js";
8
+ import { t as y } from "./input-CC2joTjB.js";
9
+ import { useCallback as b, useEffect as x, useId as S, useMemo as C, useRef as w, useState as T } from "react";
10
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
11
+ import { busySettler as k, busySettler as A, createSubmitGuard as j, createSubmitGuard as ee } from "@nxgt/material-core/submit-guard";
10
12
  //#region ../../node_modules/date-fns/locale/fr/_lib/formatDistance.js
11
- var A = {
13
+ var te = {
12
14
  lessThanXSeconds: {
13
15
  one: "moins d’une seconde",
14
16
  other: "moins de {{count}} secondes"
@@ -70,11 +72,11 @@ var A = {
70
72
  one: "presqu’un an",
71
73
  other: "presque {{count}} ans"
72
74
  }
73
- }, j = (e, t, n) => {
74
- let r, i = A[e];
75
+ }, ne = (e, t, n) => {
76
+ let r, i = te[e];
75
77
  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;
76
- }, M = {
77
- date: _({
78
+ }, re = {
79
+ date: v({
78
80
  formats: {
79
81
  full: "EEEE d MMMM y",
80
82
  long: "d MMMM y",
@@ -83,7 +85,7 @@ var A = {
83
85
  },
84
86
  defaultWidth: "full"
85
87
  }),
86
- time: _({
88
+ time: v({
87
89
  formats: {
88
90
  full: "HH:mm:ss zzzz",
89
91
  long: "HH:mm:ss z",
@@ -92,7 +94,7 @@ var A = {
92
94
  },
93
95
  defaultWidth: "full"
94
96
  }),
95
- dateTime: _({
97
+ dateTime: v({
96
98
  formats: {
97
99
  full: "{{date}} 'à' {{time}}",
98
100
  long: "{{date}} 'à' {{time}}",
@@ -101,18 +103,18 @@ var A = {
101
103
  },
102
104
  defaultWidth: "full"
103
105
  })
104
- }, N = {
106
+ }, M = {
105
107
  lastWeek: "eeee 'dernier à' p",
106
108
  yesterday: "'hier à' p",
107
109
  today: "'aujourd’hui à' p",
108
110
  tomorrow: "'demain à' p'",
109
111
  nextWeek: "eeee 'prochain à' p",
110
112
  other: "P"
111
- }, P = (e, t, n, r) => N[e], F = {
113
+ }, N = (e, t, n, r) => M[e], P = {
112
114
  narrow: ["av. J.-C", "ap. J.-C"],
113
115
  abbreviated: ["av. J.-C", "ap. J.-C"],
114
116
  wide: ["avant Jésus-Christ", "après Jésus-Christ"]
115
- }, I = {
117
+ }, F = {
116
118
  narrow: [
117
119
  "T1",
118
120
  "T2",
@@ -131,7 +133,7 @@ var A = {
131
133
  "3ème trimestre",
132
134
  "4ème trimestre"
133
135
  ]
134
- }, L = {
136
+ }, I = {
135
137
  narrow: [
136
138
  "J",
137
139
  "F",
@@ -174,7 +176,7 @@ var A = {
174
176
  "novembre",
175
177
  "décembre"
176
178
  ]
177
- }, R = {
179
+ }, L = {
178
180
  narrow: [
179
181
  "D",
180
182
  "L",
@@ -211,7 +213,7 @@ var A = {
211
213
  "vendredi",
212
214
  "samedi"
213
215
  ]
214
- }, z = {
216
+ }, R = {
215
217
  narrow: {
216
218
  am: "AM",
217
219
  pm: "PM",
@@ -242,7 +244,7 @@ var A = {
242
244
  evening: "du soir",
243
245
  night: "du matin"
244
246
  }
245
- }, B = (e, t) => {
247
+ }, z = (e, t) => {
246
248
  let n = Number(e), r = t?.unit;
247
249
  if (n === 0) return "0";
248
250
  let i = [
@@ -253,48 +255,48 @@ var A = {
253
255
  "second"
254
256
  ], a;
255
257
  return a = n === 1 ? r && i.includes(r) ? "ère" : "er" : "ème", n + a;
256
- }, V = ["MMM", "MMMM"], ee = {
257
- en: m,
258
+ }, B = ["MMM", "MMMM"], V = {
259
+ en: h,
258
260
  fr: {
259
261
  code: "fr",
260
- formatDistance: j,
261
- formatLong: M,
262
- formatRelative: P,
262
+ formatDistance: ne,
263
+ formatLong: re,
264
+ formatRelative: N,
263
265
  localize: {
264
- preprocessor: (e, t) => e.getDate() === 1 || !t.some((e) => e.isToken && V.includes(e.value)) ? t : t.map((e) => e.isToken && e.value === "do" ? {
266
+ preprocessor: (e, t) => e.getDate() === 1 || !t.some((e) => e.isToken && B.includes(e.value)) ? t : t.map((e) => e.isToken && e.value === "do" ? {
265
267
  isToken: !0,
266
268
  value: "d"
267
269
  } : e),
268
- ordinalNumber: B,
269
- era: g({
270
- values: F,
270
+ ordinalNumber: z,
271
+ era: _({
272
+ values: P,
271
273
  defaultWidth: "wide"
272
274
  }),
273
- quarter: g({
274
- values: I,
275
+ quarter: _({
276
+ values: F,
275
277
  defaultWidth: "wide",
276
278
  argumentCallback: (e) => e - 1
277
279
  }),
278
- month: g({
279
- values: L,
280
+ month: _({
281
+ values: I,
280
282
  defaultWidth: "wide"
281
283
  }),
282
- day: g({
283
- values: R,
284
+ day: _({
285
+ values: L,
284
286
  defaultWidth: "wide"
285
287
  }),
286
- dayPeriod: g({
287
- values: z,
288
+ dayPeriod: _({
289
+ values: R,
288
290
  defaultWidth: "wide"
289
291
  })
290
292
  },
291
293
  match: {
292
- ordinalNumber: p({
294
+ ordinalNumber: m({
293
295
  matchPattern: /^(\d+)(ième|ère|ème|er|e)?/i,
294
296
  parsePattern: /\d+/i,
295
297
  valueCallback: (e) => parseInt(e)
296
298
  }),
297
- era: f({
299
+ era: p({
298
300
  matchPatterns: {
299
301
  narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
300
302
  abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
@@ -304,7 +306,7 @@ var A = {
304
306
  parsePatterns: { any: [/^av/i, /^ap/i] },
305
307
  defaultParseWidth: "any"
306
308
  }),
307
- quarter: f({
309
+ quarter: p({
308
310
  matchPatterns: {
309
311
  narrow: /^T?[1234]/i,
310
312
  abbreviated: /^[1234](er|ème|e)? trim\.?/i,
@@ -320,7 +322,7 @@ var A = {
320
322
  defaultParseWidth: "any",
321
323
  valueCallback: (e) => e + 1
322
324
  }),
323
- month: f({
325
+ month: p({
324
326
  matchPatterns: {
325
327
  narrow: /^[jfmasond]/i,
326
328
  abbreviated: /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
@@ -359,7 +361,7 @@ var A = {
359
361
  },
360
362
  defaultParseWidth: "any"
361
363
  }),
362
- day: f({
364
+ day: p({
363
365
  matchPatterns: {
364
366
  narrow: /^[lmjvsd]/i,
365
367
  short: /^(di|lu|ma|me|je|ve|sa)/i,
@@ -389,7 +391,7 @@ var A = {
389
391
  },
390
392
  defaultParseWidth: "any"
391
393
  }),
392
- dayPeriod: f({
394
+ dayPeriod: p({
393
395
  matchPatterns: {
394
396
  narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
395
397
  any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i
@@ -414,29 +416,29 @@ var A = {
414
416
  }
415
417
  }
416
418
  };
417
- function te() {
418
- let e = u()?.language ?? "en", t = b(() => ee[e] ?? m, [e]);
419
+ function H() {
420
+ let e = d()?.language ?? "en", t = C(() => V[e] ?? h, [e]);
419
421
  return {
420
422
  language: e,
421
423
  locale: t,
422
- format: v((e, n) => h.format(e, n, t), [t])
424
+ format: b((e, n) => g.format(e, n, t), [t])
423
425
  };
424
426
  }
425
427
  //#endregion
426
428
  //#region lib/components/ui/feedback/alert-dialog/alert-dialog-actions.tsx
427
- function H({ className: t, ...n }) {
428
- return /* @__PURE__ */ w(c, {
429
- className: e(l({
429
+ function U({ className: t, ...n }) {
430
+ return /* @__PURE__ */ D(c, {
431
+ className: e(u({
430
432
  variant: n.variant,
431
433
  color: n.color
432
434
  }), t),
433
435
  ...n
434
436
  });
435
437
  }
436
- function U({ className: t, ...n }) {
437
- return /* @__PURE__ */ w(r, {
438
+ function W({ className: t, ...n }) {
439
+ return /* @__PURE__ */ D(r, {
438
440
  "data-variant": n.variant ?? "tonal",
439
- className: e(l({
441
+ className: e(u({
440
442
  variant: n.variant ?? "tonal",
441
443
  color: n.color
442
444
  }), t),
@@ -445,74 +447,74 @@ function U({ className: t, ...n }) {
445
447
  }
446
448
  //#endregion
447
449
  //#region lib/hooks/use-latched.ts
448
- function W(e) {
449
- let t = x(e);
450
+ function G(e) {
451
+ let t = w(e);
450
452
  return e != null && (t.current = e), t.current;
451
453
  }
452
- function G(e, t) {
453
- let n = x(t);
454
+ function K(e, t) {
455
+ let n = w(t);
454
456
  return e && (n.current = t), e ? t : n.current;
455
457
  }
456
458
  //#endregion
457
459
  //#region lib/components/ui/feedback/confirm-dialog/action-refusal.ts
458
- var K = class extends Error {
460
+ var q = class extends Error {
459
461
  action;
460
462
  details;
461
463
  constructor(e, t) {
462
464
  super(e), this.name = "ActionRefusal", this.action = t.action, this.details = t.details;
463
465
  }
464
466
  };
465
- function q(e) {
466
- return e instanceof K || e instanceof Error && e.name === "ActionRefusal" && typeof e.action?.label == "string";
467
- }
468
467
  function J(e) {
469
- return q(e) ? e.action : void 0;
468
+ return e instanceof q || e instanceof Error && e.name === "ActionRefusal" && typeof e.action?.label == "string";
469
+ }
470
+ function Y(e) {
471
+ return J(e) ? e.action : void 0;
470
472
  }
471
473
  //#endregion
472
474
  //#region lib/components/ui/feedback/confirm-dialog/confirm-refusal.tsx
473
- var Y = "font-medium text-inherit underline underline-offset-2";
474
- function X({ action: e, close: t }) {
475
- return e.href && !e.onAction ? /* @__PURE__ */ w("a", {
476
- className: Y,
475
+ var X = "font-medium text-inherit underline underline-offset-2";
476
+ function ie({ action: e, close: t }) {
477
+ return e.href && !e.onAction ? /* @__PURE__ */ D("a", {
478
+ className: X,
477
479
  href: e.href,
478
480
  onClick: t,
479
481
  children: e.label
480
- }) : /* @__PURE__ */ w("button", {
482
+ }) : /* @__PURE__ */ D("button", {
481
483
  type: "button",
482
- className: Y,
484
+ className: X,
483
485
  onClick: () => {
484
486
  e.onAction?.(), t();
485
487
  },
486
488
  children: e.label
487
489
  });
488
490
  }
489
- function Z({ message: e, cause: t, close: n }) {
490
- return q(t) ? /* @__PURE__ */ T("div", {
491
+ function ae({ message: e, cause: t, close: n }) {
492
+ return J(t) ? /* @__PURE__ */ O("div", {
491
493
  className: "flex flex-col gap-1",
492
494
  children: [
493
- /* @__PURE__ */ w("span", { children: e }),
494
- t.details != null && /* @__PURE__ */ w("span", {
495
+ /* @__PURE__ */ D("span", { children: e }),
496
+ t.details != null && /* @__PURE__ */ D("span", {
495
497
  className: "text-muted-foreground",
496
498
  children: t.details
497
499
  }),
498
- /* @__PURE__ */ w("span", { children: /* @__PURE__ */ w(X, {
500
+ /* @__PURE__ */ D("span", { children: /* @__PURE__ */ D(ie, {
499
501
  action: t.action,
500
502
  close: n
501
503
  }) })
502
504
  ]
503
- }) : /* @__PURE__ */ w(C, { children: e });
505
+ }) : /* @__PURE__ */ D(E, { children: e });
504
506
  }
505
507
  //#endregion
506
508
  //#region lib/components/ui/feedback/confirm-dialog/confirm-alert.tsx
507
- function ne({ message: e, cause: t, close: n, refusal: r }) {
508
- return /* @__PURE__ */ w("div", {
509
+ function oe({ message: e, cause: t, close: n, refusal: r }) {
510
+ return /* @__PURE__ */ D("div", {
509
511
  role: "alert",
510
512
  className: "text-sm text-error-text",
511
513
  children: r ? r({
512
514
  message: e,
513
515
  cause: t,
514
516
  close: n
515
- }) : /* @__PURE__ */ w(Z, {
517
+ }) : /* @__PURE__ */ D(ae, {
516
518
  message: e,
517
519
  cause: t,
518
520
  close: n
@@ -521,28 +523,97 @@ function ne({ message: e, cause: t, close: n, refusal: r }) {
521
523
  }
522
524
  //#endregion
523
525
  //#region lib/components/ui/feedback/confirm-dialog/confirm-description.tsx
524
- function re({ children: e, details: t }) {
525
- return typeof e == "string" && t == null ? /* @__PURE__ */ w(o, { children: e }) : /* @__PURE__ */ w(o, {
526
+ function se({ children: e, details: t }) {
527
+ return typeof e == "string" && t == null ? /* @__PURE__ */ D(o, { children: e }) : /* @__PURE__ */ D(o, {
526
528
  asChild: !0,
527
- children: /* @__PURE__ */ w("div", {
529
+ children: /* @__PURE__ */ D("div", {
528
530
  className: "space-y-2",
529
- children: t == null ? e : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", { children: e }), /* @__PURE__ */ w("div", { children: t })] })
531
+ children: t == null ? e : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("div", { children: e }), /* @__PURE__ */ D("div", { children: t })] })
530
532
  })
531
533
  });
532
534
  }
533
535
  //#endregion
534
536
  //#region lib/components/ui/feedback/confirm-dialog/confirm-dialog-rules.ts
535
- function ie(e) {
537
+ function ce(e) {
536
538
  return e === "destructive" ? "max-sm:flex-col" : void 0;
537
539
  }
538
- function ae({ busy: e, confirmDisabled: t, lockOnRefusal: n, error: r }) {
540
+ function le({ busy: e, confirmDisabled: t, lockOnRefusal: n, error: r }) {
539
541
  return e || !!t || !!n && !!r;
540
542
  }
543
+ function ue(e, t, n = "exact") {
544
+ if (t === "") return !0;
545
+ if (n === "exact") return e === t;
546
+ let r = e.trim(), i = t.trim();
547
+ return n === "trim" ? r === i : r.toLowerCase() === i.toLowerCase();
548
+ }
549
+ //#endregion
550
+ //#region lib/components/ui/feedback/confirm-dialog/confirm-footer.tsx
551
+ function de({ variant: e, busy: t, disabled: n, cancelLabel: r, confirmLabel: a, cancelVariant: o, onConfirm: s }) {
552
+ let { t: c } = f();
553
+ return /* @__PURE__ */ O(i, {
554
+ className: ce(e),
555
+ children: [/* @__PURE__ */ D(W, {
556
+ disabled: t,
557
+ variant: o,
558
+ children: r ?? c("material.confirm-dialog.cancel", "Cancel")
559
+ }), /* @__PURE__ */ D(U, {
560
+ onClick: s,
561
+ color: e === "destructive" ? "error" : "primary",
562
+ disabled: n,
563
+ children: t ? c("material.confirm-dialog.processing", "Processing...") : a ?? c("material.confirm-dialog.confirm", "Confirm")
564
+ })]
565
+ });
566
+ }
567
+ //#endregion
568
+ //#region lib/components/ui/feedback/confirm-dialog/confirm-phrase.tsx
569
+ var Z = "\0phrase\0";
570
+ function fe({ phrase: e, value: t, onValueChange: n, onEnter: r, disabled: i, inputRef: a }) {
571
+ let { t: o } = f(), s = S(), [c, u = ""] = o("material.confirm-dialog.type-phrase", "Type {phrase} to confirm", { phrase: Z }).split(Z);
572
+ return /* @__PURE__ */ O("div", {
573
+ className: "grid gap-2",
574
+ "data-slot": "confirm-phrase",
575
+ children: [/* @__PURE__ */ O(l, {
576
+ htmlFor: s,
577
+ children: [
578
+ c,
579
+ /* @__PURE__ */ D("code", {
580
+ className: "rounded bg-muted px-1 py-0.5 font-mono text-sm select-all",
581
+ children: e
582
+ }),
583
+ u
584
+ ]
585
+ }), /* @__PURE__ */ D(y, {
586
+ id: s,
587
+ ref: a,
588
+ value: t,
589
+ disabled: i,
590
+ autoComplete: "off",
591
+ autoCapitalize: "off",
592
+ autoCorrect: "off",
593
+ spellCheck: !1,
594
+ onChange: (e) => n(e.target.value),
595
+ onKeyDown: (e) => {
596
+ e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), r());
597
+ }
598
+ })]
599
+ });
600
+ }
601
+ function pe(e, t, n) {
602
+ let r = w(null), [i, a] = T("");
603
+ return x(() => {
604
+ e || a("");
605
+ }, [e]), {
606
+ ref: r,
607
+ typed: i,
608
+ setTyped: a,
609
+ missing: !!t && !ue(i, t ?? "", n)
610
+ };
611
+ }
541
612
  //#endregion
542
613
  //#region lib/components/ui/feedback/confirm-dialog/use-confirm-action.ts
543
- function oe({ open: e, onOpenChange: t, onConfirm: n }) {
544
- let { t: r } = d(), [i, a] = S(!1), [o, s] = S(null), [c, l] = S(null);
545
- return y(() => {
614
+ function me({ open: e, onOpenChange: t, onConfirm: n }) {
615
+ let { t: r } = f(), [i, a] = T(!1), [o, s] = T(null), [c, l] = T(null);
616
+ return x(() => {
546
617
  e || (s(null), l(null));
547
618
  }, [e]), {
548
619
  pending: i,
@@ -563,9 +634,9 @@ function oe({ open: e, onOpenChange: t, onConfirm: n }) {
563
634
  }
564
635
  };
565
636
  }
566
- function se(e) {
567
- let t = x(null);
568
- return y(() => {
637
+ function he(e) {
638
+ let t = w(null);
639
+ return x(() => {
569
640
  let n = t.current;
570
641
  if (!e || !n) return;
571
642
  let r = document.activeElement;
@@ -574,53 +645,63 @@ function se(e) {
574
645
  }
575
646
  //#endregion
576
647
  //#region lib/components/ui/feedback/confirm-dialog/confirm-dialog.tsx
577
- function Q({ open: e, onOpenChange: r, title: o, description: c, details: l, confirmLabel: u, cancelLabel: f, cancelVariant: p, onConfirm: m, variant: h = "default", loading: g = !1, confirmDisabled: _, lockOnRefusal: v, refusal: y, onCloseAutoFocus: b }) {
578
- let { t: x } = d(), { title: S, description: C, details: E, confirmLabel: D, cancelLabel: O, variant: k } = G(e, {
579
- title: o,
580
- description: c,
581
- details: l,
582
- confirmLabel: u,
583
- cancelLabel: f,
584
- variant: h
585
- }), { pending: A, error: j, cause: M, handleOpenChange: N, handleConfirm: P } = oe({
586
- open: e,
587
- onOpenChange: r,
588
- onConfirm: m
589
- }), F = g || A;
590
- return /* @__PURE__ */ w(s, {
591
- open: e,
592
- onOpenChange: N,
593
- children: /* @__PURE__ */ T(a, {
594
- ref: se(A),
595
- onCloseAutoFocus: b,
648
+ function Q(e) {
649
+ let { open: r, onOpenChange: i, onConfirm: o, loading: c = !1 } = e, l = K(r, {
650
+ title: e.title,
651
+ description: e.description,
652
+ details: e.details,
653
+ confirmLabel: e.confirmLabel,
654
+ cancelLabel: e.cancelLabel,
655
+ variant: e.variant ?? "default",
656
+ confirmPhrase: e.confirmPhrase
657
+ }), { pending: u, error: d, cause: f, handleOpenChange: p, handleConfirm: m } = me({
658
+ open: r,
659
+ onOpenChange: i,
660
+ onConfirm: o
661
+ }), h = c || u, g = he(u), _ = pe(r, l.confirmPhrase, e.confirmPhraseMatch ?? "exact"), v = le({
662
+ busy: h,
663
+ confirmDisabled: e.confirmDisabled || _.missing,
664
+ lockOnRefusal: e.lockOnRefusal,
665
+ error: d
666
+ });
667
+ return /* @__PURE__ */ D(s, {
668
+ open: r,
669
+ onOpenChange: p,
670
+ children: /* @__PURE__ */ O(a, {
671
+ ref: g,
672
+ onOpenAutoFocus: (e) => {
673
+ _.ref.current && (e.preventDefault(), _.ref.current.focus());
674
+ },
675
+ onCloseAutoFocus: e.onCloseAutoFocus,
596
676
  children: [
597
- /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(n, { children: S }), /* @__PURE__ */ w(re, {
598
- details: E,
599
- children: C
677
+ /* @__PURE__ */ O(t, { children: [/* @__PURE__ */ D(n, { children: l.title }), /* @__PURE__ */ D(se, {
678
+ details: l.details,
679
+ children: l.description
600
680
  })] }),
601
- j && /* @__PURE__ */ w(ne, {
602
- message: j,
603
- cause: M,
604
- close: () => r(!1),
605
- refusal: y
681
+ l.confirmPhrase && /* @__PURE__ */ D(fe, {
682
+ phrase: l.confirmPhrase,
683
+ value: _.typed,
684
+ onValueChange: _.setTyped,
685
+ onEnter: () => {
686
+ v || m({ preventDefault() {} });
687
+ },
688
+ disabled: h,
689
+ inputRef: _.ref
606
690
  }),
607
- /* @__PURE__ */ T(i, {
608
- className: ie(k),
609
- children: [/* @__PURE__ */ w(U, {
610
- disabled: F,
611
- variant: p,
612
- children: O ?? x("material.confirm-dialog.cancel", "Cancel")
613
- }), /* @__PURE__ */ w(H, {
614
- onClick: P,
615
- color: k === "destructive" ? "error" : "primary",
616
- disabled: ae({
617
- busy: F,
618
- confirmDisabled: _,
619
- lockOnRefusal: v,
620
- error: j
621
- }),
622
- children: F ? x("material.confirm-dialog.processing", "Processing...") : D ?? x("material.confirm-dialog.confirm", "Confirm")
623
- })]
691
+ d && /* @__PURE__ */ D(oe, {
692
+ message: d,
693
+ cause: f,
694
+ close: () => i(!1),
695
+ refusal: e.refusal
696
+ }),
697
+ /* @__PURE__ */ D(de, {
698
+ variant: l.variant,
699
+ busy: h,
700
+ disabled: v,
701
+ cancelLabel: l.cancelLabel,
702
+ confirmLabel: l.confirmLabel,
703
+ cancelVariant: e.cancelVariant,
704
+ onConfirm: m
624
705
  })
625
706
  ]
626
707
  })
@@ -628,38 +709,38 @@ function Q({ open: e, onOpenChange: r, title: o, description: c, details: l, con
628
709
  }
629
710
  //#endregion
630
711
  //#region lib/hooks/use-focus-on-mount.ts
631
- function ce(e = !0) {
632
- let t = x(null);
633
- return y(() => {
712
+ function ge(e = !0) {
713
+ let t = w(null);
714
+ return x(() => {
634
715
  e && t.current?.focus();
635
716
  }, [e]), t;
636
717
  }
637
718
  //#endregion
638
719
  //#region lib/hooks/use-submit-once.ts
639
- function le(e) {
640
- let [t] = S(O), [n] = S(() => E(t)), r = e !== void 0;
641
- return y(() => {
720
+ function $(e) {
721
+ let [t] = T(j), [n] = T(() => k(t)), r = e !== void 0;
722
+ return x(() => {
642
723
  e !== void 0 && n(e);
643
- }, [e, n]), v((e, n) => t.once(e, {
724
+ }, [e, n]), b((e, n) => t.once(e, {
644
725
  settleSync: !r,
645
726
  ...n
646
727
  }), [t, r]);
647
728
  }
648
729
  //#endregion
649
730
  //#region lib/hooks/use-countdown.ts
650
- function $(e, { paused: t = !1, onExpire: n, key: r } = {}) {
651
- let [i, a] = S(e), [o, s] = S({
731
+ function _e(e, { paused: t = !1, onExpire: n, key: r } = {}) {
732
+ let [i, a] = T(e), [o, s] = T({
652
733
  duration: e,
653
734
  key: r
654
- }), c = x(e), l = x(n);
735
+ }), c = w(e), l = w(n);
655
736
  l.current = n;
656
737
  let u = o.duration !== e || o.key !== r;
657
738
  return u && (s({
658
739
  duration: e,
659
740
  key: r
660
- }), a(e)), y(() => {
741
+ }), a(e)), x(() => {
661
742
  c.current = e;
662
- }, [e, r]), y(() => {
743
+ }, [e, r]), x(() => {
663
744
  if (t || c.current <= 0) return;
664
745
  let e = Date.now() + c.current * 1e3, n = window.setInterval(() => {
665
746
  let t = Math.max(0, (e - Date.now()) / 1e3);
@@ -674,9 +755,9 @@ function $(e, { paused: t = !1, onExpire: n, key: r } = {}) {
674
755
  }
675
756
  //#endregion
676
757
  //#region lib/components/ui/feedback/unsaved-dialog/unsaved-dialog.tsx
677
- function ue({ open: e, onOpenChange: t, onLeave: n, title: r, description: i, stayLabel: a, leaveLabel: o }) {
678
- let { t: s } = d();
679
- return /* @__PURE__ */ w(Q, {
758
+ function ve({ open: e, onOpenChange: t, onLeave: n, title: r, description: i, stayLabel: a, leaveLabel: o }) {
759
+ let { t: s } = f();
760
+ return /* @__PURE__ */ D(Q, {
680
761
  open: e,
681
762
  onOpenChange: t,
682
763
  variant: "destructive",
@@ -689,10 +770,10 @@ function ue({ open: e, onOpenChange: t, onLeave: n, title: r, description: i, st
689
770
  }
690
771
  //#endregion
691
772
  //#region lib/hooks/use-heading-spy.ts
692
- var de = "0px 0px -65% 0px", fe = [0, 1];
693
- function pe(e, t, n) {
694
- let r = n?.rootMargin ?? de, i = n?.threshold ?? fe;
695
- y(() => {
773
+ var ye = "0px 0px -65% 0px", be = [0, 1];
774
+ function xe(e, t, n) {
775
+ let r = n?.rootMargin ?? ye, i = n?.threshold ?? be;
776
+ x(() => {
696
777
  if (e.length === 0) return;
697
778
  let n = e.map((e) => document.getElementById(e)).filter((e) => e != null);
698
779
  if (n.length === 0) return;
@@ -713,4 +794,4 @@ function pe(e, t, n) {
713
794
  ]);
714
795
  }
715
796
  //#endregion
716
- export { k as a, Q as c, J as d, W as f, te as g, U as h, D as i, K as l, H as m, ue as n, le as o, G as p, $ as r, ce as s, pe as t, q as u };
797
+ export { ee as a, Q as c, Y as d, G as f, H as g, W as h, A as i, q as l, U as m, ve as n, $ as o, K as p, _e as r, ge as s, xe as t, J as u };
@@ -1,4 +1,4 @@
1
- import { i as e, t } from "./translate-material-CMHUH5Ha.js";
1
+ import { i as e, t } from "./translate-material-s_lxIV43.js";
2
2
  import { useCallback as n } from "react";
3
3
  //#region lib/i18n/use-material-translation.ts
4
4
  function r() {