@nxgt/material 3.101.0 → 3.103.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.
- package/CHANGELOG.md +38 -0
- package/README.md +32 -2
- package/dist/{alert-dialog-DYzxchiS.js → alert-dialog-NFyAiSqc.js} +1 -1
- package/dist/{async-slice-drJyPvuM.js → async-slice-D35bX79S.js} +1 -1
- package/dist/{bubble-input-CQwVSoU3.js → bubble-input-BxI1WmNs.js} +17 -5
- package/dist/{button-GeIsUekU.js → button-Be7GZzF9.js} +2 -2
- package/dist/{calculator-BS4PAm6l.js → calculator-BGy1Q7rn.js} +261 -460
- package/dist/calculator-field.js +7 -7
- package/dist/{calculator-segment-CEdwE24M.js → calculator-segment-uixk6lBg.js} +1 -1
- package/dist/calculator.js +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-BdEtFQ85.js → chip-3rWebZEM.js} +2 -2
- package/dist/{code-editor-BByXZOGy.js → code-editor-BqSVMfy-.js} +178 -177
- package/dist/code-editor.js +5 -5
- package/dist/{code-language-items-CSZX5zxD.js → code-language-items-Cf2LJVg2.js} +14 -5
- package/dist/components/ui/actions/action-card/action-card-tile.css +47 -0
- package/dist/components/ui/display/code/code-moonlight.css +10 -10
- package/dist/{components-DQ4MljCr.js → components-D2liJ9Yu.js} +17725 -17287
- package/dist/components.js +38 -37
- package/dist/{conversion-variant-DTQqAyDt.js → conversion-variant-clFZ6ZMJ.js} +5 -5
- package/dist/{currency-field-Dnju7ss2.js → currency-field-CBFEVNM1.js} +24 -23
- package/dist/{dialog-5_2__tu8.js → dialog-CrIIINTk.js} +3 -3
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-FdGC5kIP.js → dropdown-menu-BnfLWu8n.js} +1 -1
- package/dist/editor.js +9 -9
- package/dist/{empty-state-BoepPG5v.js → empty-state-CuUaCPY7.js} +1 -1
- package/dist/{field-blur-DkiZOVNV.js → field-blur-DMJwPLsg.js} +9 -9
- package/dist/field-blur-context-3rKussBQ.js +29 -0
- package/dist/{financial-variant-BhqJp5C-.js → financial-variant-BY_VCUuk.js} +5 -5
- package/dist/{hooks-DjcbJZiO.js → hooks-hHoZbL-4.js} +106 -61
- package/dist/hooks.js +3 -3
- package/dist/{hover-card-CmHJeBeY.js → hover-card-Do2-uzlF.js} +1 -1
- package/dist/i18n.js +3 -3
- package/dist/{icon-badge-LGUPQh_c.js → icon-badge-CHaVNEmb.js} +1 -1
- package/dist/{icon-button-BSVpO1jP.js → icon-button-BIAubLeJ.js} +1 -1
- package/dist/key-layout-D2goCDkD.js +31 -0
- package/dist/keypad.js +551 -0
- package/dist/label-DR-zZyGQ.js +47 -0
- package/dist/lib/components/ui/display/code/code-block-parts.d.ts +1 -1
- package/dist/lib/components/ui/display/code/code-block.d.ts +4 -1
- package/dist/lib/components/ui/display/code/languages.d.ts +2 -0
- package/dist/lib/components/ui/display/code/moonlight-tokens.d.ts +10 -10
- package/dist/lib/components/ui/feedback/confirm-dialog/confirm-dialog-props.d.ts +73 -0
- package/dist/lib/components/ui/feedback/confirm-dialog/confirm-dialog-rules.d.ts +12 -0
- package/dist/lib/components/ui/feedback/confirm-dialog/confirm-dialog.d.ts +5 -61
- package/dist/lib/components/ui/feedback/confirm-dialog/confirm-footer.d.ts +12 -0
- package/dist/lib/components/ui/feedback/confirm-dialog/confirm-phrase.d.ts +26 -0
- package/dist/lib/components/ui/feedback/confirm-dialog/use-confirm-action.d.ts +1 -1
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/layout/index.d.ts +1 -0
- package/dist/lib/components/ui/layout/panel-card/index.d.ts +1 -0
- package/dist/lib/components/ui/layout/panel-card/panel-card.d.ts +21 -0
- package/dist/lib/components/ui/selection/index.d.ts +1 -0
- package/dist/lib/components/ui/selection/status-menu/index.d.ts +3 -0
- package/dist/lib/components/ui/selection/status-menu/partials/status-confirm.d.ts +12 -0
- package/dist/lib/components/ui/selection/status-menu/partials/status-icon.d.ts +6 -0
- package/dist/lib/components/ui/selection/status-menu/partials/status-items.d.ts +18 -0
- package/dist/lib/components/ui/selection/status-menu/partials/status-menu-list.d.ts +14 -0
- package/dist/lib/components/ui/selection/status-menu/partials/status-sheet-row.d.ts +11 -0
- package/dist/lib/components/ui/selection/status-menu/partials/status-sheet.d.ts +21 -0
- package/dist/lib/components/ui/selection/status-menu/partials/status-trigger.d.ts +18 -0
- package/dist/lib/components/ui/selection/status-menu/status-menu-data.d.ts +12 -0
- package/dist/lib/components/ui/selection/status-menu/status-menu-form-field.d.ts +20 -0
- package/dist/lib/components/ui/selection/status-menu/status-menu.d.ts +13 -0
- package/dist/lib/components/ui/selection/status-menu/types.d.ts +76 -0
- package/dist/lib/components/ui/selection/status-menu/use-status-change.d.ts +18 -0
- package/dist/lib/components/ui/selection/status-menu/use-status-menu.d.ts +30 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-keypad.d.ts +1 -5
- package/dist/lib/components/ui/widgets/calculator/variants/key-layout.d.ts +3 -49
- package/dist/lib/components/ui/widgets/keypad/cash-model.d.ts +16 -0
- package/dist/lib/components/ui/widgets/keypad/index.d.ts +5 -0
- package/dist/lib/components/ui/widgets/keypad/key-layout.d.ts +56 -0
- package/dist/lib/components/ui/widgets/keypad/keypad-binding.d.ts +32 -0
- package/dist/lib/components/ui/widgets/keypad/keypad-cash.d.ts +28 -0
- package/dist/lib/components/ui/widgets/keypad/keypad-display.d.ts +11 -0
- package/dist/lib/components/ui/widgets/keypad/keypad-entry.d.ts +39 -0
- package/dist/lib/components/ui/widgets/keypad/keypad-grid.d.ts +27 -0
- package/dist/lib/components/ui/widgets/{calculator/partials/calculator-key.d.ts → keypad/keypad-key.d.ts} +6 -3
- package/dist/lib/components/ui/widgets/keypad/keypad-layout.d.ts +19 -0
- package/dist/lib/components/ui/widgets/{calculator/partials → keypad}/keypad-navigation.d.ts +1 -1
- package/dist/lib/components/ui/widgets/keypad/keypad.d.ts +9 -0
- package/dist/lib/components/ui/widgets/keypad/keypad.types.d.ts +91 -0
- package/dist/lib/components/ui/widgets/keypad/use-keypad-cash.d.ts +14 -0
- package/dist/lib/components/ui/widgets/keypad/use-keypad-keyboard.d.ts +7 -0
- package/dist/lib/components/ui/widgets/keypad/use-keypad-number.d.ts +10 -0
- package/dist/lib/components/ui/widgets/keypad/use-keypad-quantity.d.ts +16 -0
- package/dist/lib/components/ui/widgets/keypad/use-keypad-value.d.ts +17 -0
- package/dist/lib/components/ui/widgets/keypad/use-keypad.d.ts +23 -0
- package/dist/lib/hooks/index.d.ts +1 -0
- package/dist/lib/hooks/use-barcode-scanner.d.ts +39 -0
- package/dist/lib/i18n/resources/en/en.d.ts +25 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +26 -1
- package/dist/lib/i18n/resources/fr/fr.d.ts +25 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +26 -1
- package/dist/lib/i18n/resources/resources.d.ts +50 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/keypad/index.d.ts +20 -0
- package/dist/lib.js +1 -1
- package/dist/main.js +54 -53
- package/dist/map.js +9 -9
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/{percent-field-DGlU_xii.js → percent-field-DU8eIMD3.js} +15 -14
- package/dist/{picker-surface-CGhqNR8a.js → picker-surface-XmA--JVI.js} +4 -4
- package/dist/{popover-ZxL7ktKk.js → popover-D8iHiAbl.js} +1 -1
- package/dist/{pos-types-BQ0QpYMp.js → pos-types-BEAY27Rm.js} +1 -1
- package/dist/{pos-variant-CKy8h_5i.js → pos-variant-ClGI92Lt.js} +25 -25
- package/dist/print.js +1 -1
- package/dist/{programmer-variant-CbHstE28.js → programmer-variant-Boq2O8hB.js} +30 -30
- package/dist/{public-D-tdOz4b.js → public-DOrXKmcL.js} +9 -9
- package/dist/{rich-code-block-CTPj1LuD.js → rich-code-block-Djj2XE_u.js} +18 -18
- package/dist/{scientific-variant-B8U9h3II.js → scientific-variant-BzF_aMQP.js} +8 -8
- package/dist/{sortable-provider-CSoWE7Ce.js → sortable-provider-DCZjsIIH.js} +2 -2
- package/dist/{spinner-ffuwBXHl.js → spinner-Cg0y_E_K.js} +1 -1
- package/dist/standard-layout-DTr9yy8Z.js +48 -0
- package/dist/{tabs-JgRq6ZJx.js → tabs-DpessV5s.js} +1 -1
- package/dist/{text-field-DURkIP-v.js → text-field-Dxk9lAKM.js} +16 -15
- package/dist/theme-picker.js +13 -13
- package/dist/{theme-toggle-n_Zg7JAA.js → theme-toggle-B6Jl5Kfn.js} +1 -1
- package/dist/{toolbar-items-IANZdcw4.js → toolbar-items-Cs1XrZsH.js} +4 -4
- package/dist/{translate-material-CMHUH5Ha.js → translate-material-Du0j0t97.js} +1 -1
- package/dist/{translator-9zA-Um3W.js → translator-BVs4n0Fz.js} +52 -2
- package/dist/use-calculator-keyboard-BZ1CA4Ut.js +222 -0
- package/dist/{use-chat-composer-BoIN7RCA.js → use-chat-composer-B4m3OEm1.js} +241 -240
- package/dist/{use-heading-spy-Ciw9GBHL.js → use-heading-spy-CO3_AtY9.js} +235 -154
- package/dist/{use-material-translation-CLNaMhUf.js → use-material-translation-uNc1FyC8.js} +1 -1
- package/dist/{use-return-focus-DWhbTGVe.js → use-return-focus-AfLRrUm-.js} +1 -1
- package/docs/README.md +1 -0
- package/docs/components/README.md +1 -0
- package/docs/components/buttons-and-actions.md +34 -2
- package/docs/components/data-display.md +4 -1
- package/docs/components/feedback-and-status.md +20 -0
- package/docs/components/navigation-and-layout.md +28 -0
- package/docs/components/rich-widgets.md +28 -0
- package/docs/components/selection-and-choice.md +120 -0
- package/docs/guides/calculator.md +1 -1
- package/docs/guides/cards-and-tiles.md +21 -24
- package/docs/guides/forms.md +1 -0
- package/docs/guides/helpers.md +49 -0
- package/docs/guides/keypad.md +225 -0
- package/docs/previews/data-display-codeblock.webp +0 -0
- package/docs/previews/data-display-codegroup.webp +0 -0
- package/docs/previews/data-display-jsonviewer.webp +0 -0
- package/docs/previews/navigation-layout-panelcard.webp +0 -0
- package/docs/previews/rich-widgets-keypad.webp +0 -0
- package/docs/previews/selection-choice-statusmenu.webp +0 -0
- package/docs/roadmap.md +21 -0
- package/docs/troubleshooting.md +63 -0
- package/lib/components/ui/actions/action-card/action-card-tile.css +47 -0
- package/lib/components/ui/display/code/code-moonlight.css +10 -10
- package/lib/components/ui/widgets/calculator/calculator.css +87 -0
- package/package.json +7 -2
- package/dist/field-blur-context-BLGgf_3z.js +0 -73
- package/dist/key-layout-cR79xfGE.js +0 -38
- 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-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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-NFyAiSqc.js";
|
|
3
|
+
import { t as l } from "./label-DR-zZyGQ.js";
|
|
4
|
+
import { a as u } from "./button-Be7GZzF9.js";
|
|
5
|
+
import { i as d } from "./translate-material-Du0j0t97.js";
|
|
6
|
+
import { t as f } from "./use-material-translation-uNc1FyC8.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
|
|
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
|
-
},
|
|
74
|
-
let r, i =
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
257
|
-
en:
|
|
258
|
+
}, B = ["MMM", "MMMM"], V = {
|
|
259
|
+
en: h,
|
|
258
260
|
fr: {
|
|
259
261
|
code: "fr",
|
|
260
|
-
formatDistance:
|
|
261
|
-
formatLong:
|
|
262
|
-
formatRelative:
|
|
262
|
+
formatDistance: ne,
|
|
263
|
+
formatLong: re,
|
|
264
|
+
formatRelative: N,
|
|
263
265
|
localize: {
|
|
264
|
-
preprocessor: (e, t) => e.getDate() === 1 || !t.some((e) => e.isToken &&
|
|
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:
|
|
269
|
-
era:
|
|
270
|
-
values:
|
|
270
|
+
ordinalNumber: z,
|
|
271
|
+
era: _({
|
|
272
|
+
values: P,
|
|
271
273
|
defaultWidth: "wide"
|
|
272
274
|
}),
|
|
273
|
-
quarter:
|
|
274
|
-
values:
|
|
275
|
+
quarter: _({
|
|
276
|
+
values: F,
|
|
275
277
|
defaultWidth: "wide",
|
|
276
278
|
argumentCallback: (e) => e - 1
|
|
277
279
|
}),
|
|
278
|
-
month:
|
|
279
|
-
values:
|
|
280
|
+
month: _({
|
|
281
|
+
values: I,
|
|
280
282
|
defaultWidth: "wide"
|
|
281
283
|
}),
|
|
282
|
-
day:
|
|
283
|
-
values:
|
|
284
|
+
day: _({
|
|
285
|
+
values: L,
|
|
284
286
|
defaultWidth: "wide"
|
|
285
287
|
}),
|
|
286
|
-
dayPeriod:
|
|
287
|
-
values:
|
|
288
|
+
dayPeriod: _({
|
|
289
|
+
values: R,
|
|
288
290
|
defaultWidth: "wide"
|
|
289
291
|
})
|
|
290
292
|
},
|
|
291
293
|
match: {
|
|
292
|
-
ordinalNumber:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
418
|
-
let 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:
|
|
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
|
|
428
|
-
return /* @__PURE__ */
|
|
429
|
-
className: e(
|
|
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
|
|
437
|
-
return /* @__PURE__ */
|
|
438
|
+
function W({ className: t, ...n }) {
|
|
439
|
+
return /* @__PURE__ */ D(r, {
|
|
438
440
|
"data-variant": n.variant ?? "tonal",
|
|
439
|
-
className: e(
|
|
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
|
|
449
|
-
let t =
|
|
450
|
+
function G(e) {
|
|
451
|
+
let t = w(e);
|
|
450
452
|
return e != null && (t.current = e), t.current;
|
|
451
453
|
}
|
|
452
|
-
function
|
|
453
|
-
let n =
|
|
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
|
|
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
|
|
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
|
|
474
|
-
function
|
|
475
|
-
return e.href && !e.onAction ? /* @__PURE__ */
|
|
476
|
-
className:
|
|
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__ */
|
|
482
|
+
}) : /* @__PURE__ */ D("button", {
|
|
481
483
|
type: "button",
|
|
482
|
-
className:
|
|
484
|
+
className: X,
|
|
483
485
|
onClick: () => {
|
|
484
486
|
e.onAction?.(), t();
|
|
485
487
|
},
|
|
486
488
|
children: e.label
|
|
487
489
|
});
|
|
488
490
|
}
|
|
489
|
-
function
|
|
490
|
-
return
|
|
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__ */
|
|
494
|
-
t.details != null && /* @__PURE__ */
|
|
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__ */
|
|
500
|
+
/* @__PURE__ */ D("span", { children: /* @__PURE__ */ D(ie, {
|
|
499
501
|
action: t.action,
|
|
500
502
|
close: n
|
|
501
503
|
}) })
|
|
502
504
|
]
|
|
503
|
-
}) : /* @__PURE__ */
|
|
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
|
|
508
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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
|
|
525
|
-
return typeof e == "string" && t == null ? /* @__PURE__ */
|
|
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__ */
|
|
529
|
+
children: /* @__PURE__ */ D("div", {
|
|
528
530
|
className: "space-y-2",
|
|
529
|
-
children: t == null ? e : /* @__PURE__ */
|
|
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
|
|
537
|
+
function ce(e) {
|
|
536
538
|
return e === "destructive" ? "max-sm:flex-col" : void 0;
|
|
537
539
|
}
|
|
538
|
-
function
|
|
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
|
|
544
|
-
let { t: r } =
|
|
545
|
-
return
|
|
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
|
|
567
|
-
let t =
|
|
568
|
-
return
|
|
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(
|
|
578
|
-
let {
|
|
579
|
-
title:
|
|
580
|
-
description:
|
|
581
|
-
details:
|
|
582
|
-
confirmLabel:
|
|
583
|
-
cancelLabel:
|
|
584
|
-
variant:
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
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__ */
|
|
598
|
-
details:
|
|
599
|
-
children:
|
|
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
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
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__ */
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
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
|
|
632
|
-
let t =
|
|
633
|
-
return
|
|
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
|
|
640
|
-
let [t] =
|
|
641
|
-
return
|
|
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]),
|
|
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
|
|
651
|
-
let [i, a] =
|
|
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 =
|
|
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)),
|
|
741
|
+
}), a(e)), x(() => {
|
|
661
742
|
c.current = e;
|
|
662
|
-
}, [e, r]),
|
|
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
|
|
678
|
-
let { t: s } =
|
|
679
|
-
return /* @__PURE__ */
|
|
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
|
|
693
|
-
function
|
|
694
|
-
let r = n?.rootMargin ??
|
|
695
|
-
|
|
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 {
|
|
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 };
|