@nxgt/material 2.16.0 → 2.18.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 (112) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +9 -4
  3. package/dist/{_Uint8Array-CjLUgWgf.js → _Uint8Array-C7apDrb7.js} +1 -1
  4. package/dist/{_overRest-HfSwfmH1.js → _overRest-CCAbV-eT.js} +1 -1
  5. package/dist/async-slice-Cuekts5f.js +459 -0
  6. package/dist/{blockDiagram-BEXU5L5S-DSNWJcbS.js → blockDiagram-BEXU5L5S-B63zbmDg.js} +2 -2
  7. package/dist/{chunk-3FUC2YCW-CcZvlyvW.js → chunk-3FUC2YCW-CE9T5wr6.js} +2 -2
  8. package/dist/{chunk-7M6MHVWA-21OdxoBq.js → chunk-7M6MHVWA-BjaezAbj.js} +1 -1
  9. package/dist/{chunk-GNY47TPC-BZdgq2LF.js → chunk-GNY47TPC-DjnciAsL.js} +4 -4
  10. package/dist/{chunk-NETBCI7D-CAgvlb0w.js → chunk-NETBCI7D-CxQxB74H.js} +1 -1
  11. package/dist/{chunk-Z7XXMR3K-BSXPgLtN.js → chunk-Z7XXMR3K-BBrCUBwp.js} +1 -1
  12. package/dist/{classDiagram-v2-NBCMYWYE-D_BHO1iT.js → classDiagram-v2-NBCMYWYE-FeyVcYCs.js} +2 -2
  13. package/dist/components/components.css +1 -0
  14. package/dist/components/print-only.css +44 -0
  15. package/dist/{components-Bkdm6jn6.js → components-CsPEBzNF.js} +59383 -58881
  16. package/dist/components.js +6 -6
  17. package/dist/{dagre-6A5THRUB-CsnftAPx.js → dagre-6A5THRUB-BjO_Ytfq.js} +64 -64
  18. package/dist/{diagram-22UHCM2B-D0yPa8vo.js → diagram-22UHCM2B-BBKawlhX.js} +2 -2
  19. package/dist/{diagram-3UASUU5V-f8LIX2sj.js → diagram-3UASUU5V-CKj_37_k.js} +1 -1
  20. package/dist/dnd.js +1 -1
  21. package/dist/{elk-276RUBZZ-DI8bDQAL.js → elk-276RUBZZ-DmkPwZLS.js} +3 -3
  22. package/dist/{erDiagram-OPXOYQCR-BGHFtxmB.js → erDiagram-OPXOYQCR-Dja943M3.js} +2 -2
  23. package/dist/{field-blur-C-5K6U1F.js → field-blur-DNHXOY0J.js} +3 -3
  24. package/dist/{flowDiagram-KWPJA3E3-CnFLTW-3.js → flowDiagram-KWPJA3E3-jmbjSQZS.js} +3 -3
  25. package/dist/{ganttDiagram-FUAMR5RP-B5uyVKE4.js → ganttDiagram-FUAMR5RP-BONNpqJt.js} +1 -1
  26. package/dist/{graphlib-BqO9Go2u.js → graphlib-DxjKaXeR.js} +42 -42
  27. package/dist/hooks.js +38 -26
  28. package/dist/{i18n-provider-C3SlA4J0.js → i18n-provider-Dv9ZSmgO.js} +1 -1
  29. package/dist/i18n.js +6 -6
  30. package/dist/{isArrayLikeObject-83P1fvEs.js → isArrayLikeObject-H8k6W51O.js} +3 -3
  31. package/dist/{isEmpty-C2z3Hypl.js → isEmpty-B0Bavg-e.js} +9 -9
  32. package/dist/{journeyDiagram-ZHPQQLJL-CKtbGcVT.js → journeyDiagram-ZHPQQLJL-C_omtnEz.js} +1 -1
  33. package/dist/lib/components/ui/actions/copy-button/use-copy-status.d.ts +13 -0
  34. package/dist/lib/components/ui/display/enrolment-secret/enrolment-secret.d.ts +30 -0
  35. package/dist/lib/components/ui/display/enrolment-secret/index.d.ts +2 -0
  36. package/dist/lib/components/ui/display/enrolment-secret/use-enrolment-secret-labels.d.ts +11 -0
  37. package/dist/lib/components/ui/display/index.d.ts +2 -0
  38. package/dist/lib/components/ui/display/recovery-codes/index.d.ts +4 -0
  39. package/dist/lib/components/ui/display/recovery-codes/partials/recovery-codes-actions.d.ts +14 -0
  40. package/dist/lib/components/ui/display/recovery-codes/partials/recovery-codes-confirm.d.ts +13 -0
  41. package/dist/lib/components/ui/display/recovery-codes/partials/recovery-codes-list.d.ts +5 -0
  42. package/dist/lib/components/ui/display/recovery-codes/recovery-codes.d.ts +8 -0
  43. package/dist/lib/components/ui/display/recovery-codes/types.d.ts +64 -0
  44. package/dist/lib/components/ui/display/recovery-codes/use-recovery-codes-labels.d.ts +7 -0
  45. package/dist/lib/components/ui/fields/form-section/form-section-classes.d.ts +30 -0
  46. package/dist/lib/components/ui/fields/form-section/form-section.d.ts +25 -0
  47. package/dist/lib/components/ui/fields/form-section/index.d.ts +1 -0
  48. package/dist/lib/components/ui/fields/index.d.ts +1 -0
  49. package/dist/lib/components/ui/forms/index.d.ts +1 -0
  50. package/dist/lib/components/ui/forms/use-code-resolver.d.ts +42 -0
  51. package/dist/lib/components/ui/layout/auth-card/auth-card-notice.d.ts +18 -0
  52. package/dist/lib/components/ui/layout/auth-card/auth-card.d.ts +35 -0
  53. package/dist/lib/components/ui/layout/auth-card/index.d.ts +1 -0
  54. package/dist/lib/components/ui/layout/index.d.ts +1 -0
  55. package/dist/lib/components/ui/selection/autocomplete/types.d.ts +9 -1
  56. package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-status.d.ts +2 -2
  57. package/dist/lib/components/ui/selection/autocomplete/use-autocomplete.d.ts +2 -2
  58. package/dist/lib/hooks/index.d.ts +2 -0
  59. package/dist/lib/hooks/use-focus-on-mount.d.ts +24 -0
  60. package/dist/lib/hooks/use-submit-once.d.ts +32 -0
  61. package/dist/lib/i18n/resources/en/en.d.ts +21 -0
  62. package/dist/lib/i18n/resources/en/material.json.d.ts +21 -0
  63. package/dist/lib/i18n/resources/fr/fr.d.ts +21 -0
  64. package/dist/lib/i18n/resources/fr/material.json.d.ts +21 -0
  65. package/dist/lib/i18n/resources/resources.d.ts +42 -0
  66. package/dist/lib/i18n/translator.d.ts +1 -1
  67. package/dist/lib/lib/index.d.ts +1 -0
  68. package/dist/lib.js +58 -102
  69. package/dist/main.js +16 -16
  70. package/dist/map.js +22 -22
  71. package/dist/material.css +1 -1
  72. package/dist/{merge-CZIEHTTe.js → merge-Js8537dg.js} +4 -4
  73. package/dist/{mermaid.core-Cp75fWA9.js → mermaid.core-9dpDfc6Y.js} +21 -21
  74. package/dist/{mindmap-definition-NLK3R4M7-CFYIlEfW.js → mindmap-definition-NLK3R4M7-CjYayluH.js} +2 -2
  75. package/dist/{pieDiagram-5QR66LMP-CjvtBYDr.js → pieDiagram-5QR66LMP-BfFcf84S.js} +1 -1
  76. package/dist/print.js +2 -2
  77. package/dist/{quadrantDiagram-O4NWA36T-DPj8ndqA.js → quadrantDiagram-O4NWA36T-DdvYjvR0.js} +1 -1
  78. package/dist/{requirementDiagram-PLB6GJNP-DjVFwRJg.js → requirementDiagram-PLB6GJNP-CGG6Y3SN.js} +2 -2
  79. package/dist/{sankeyDiagram-IPEJSGJF-63wsgHUY.js → sankeyDiagram-IPEJSGJF-DJufZkAf.js} +1 -1
  80. package/dist/{sortable-provider-Chbn1x1i.js → sortable-provider-CUT5Wfdl.js} +1 -1
  81. package/dist/{stateDiagram-v2-GCMORJYK-DNc8m371.js → stateDiagram-v2-GCMORJYK-vRvpKK9I.js} +2 -2
  82. package/dist/{stored-language-DPqzxRmf.js → stored-language-BKoohv2_.js} +42 -0
  83. package/dist/{swimlanes-2SLR337P-B7_gOJxx.js → swimlanes-2SLR337P-Czy9f6gp.js} +3 -3
  84. package/dist/{swimlanesDiagram-TC7HE7FX-tqlBrGuu.js → swimlanesDiagram-TC7HE7FX-C6RYBQ-A.js} +3 -3
  85. package/dist/{timeline-definition-EJHVYXUP-DIA9CBZK.js → timeline-definition-EJHVYXUP-CS9RiAiW.js} +1 -1
  86. package/dist/{translate-material-CqB-j9WD.js → translate-material-CCJg3yfc.js} +2 -2
  87. package/dist/{translator-DTl9h__E.js → translator-DEde7BKz.js} +1 -1
  88. package/dist/{use-heading-spy-C1KA3PrF.js → use-heading-spy-XkSExwoT.js} +67 -59
  89. package/dist/{use-material-translation-DMa4Xrnd.js → use-material-translation-Cndoq_iK.js} +2 -2
  90. package/dist/{usecaseDiagram-POWQR4AR-FMjCkoxs.js → usecaseDiagram-POWQR4AR-CW-8YHgN.js} +2 -2
  91. package/dist/{xychartDiagram-PMCCYNJV-B76HOkCh.js → xychartDiagram-PMCCYNJV-G4PopeeF.js} +1 -1
  92. package/docs/components/README.md +3 -3
  93. package/docs/components/data-display.md +101 -0
  94. package/docs/components/feedback-and-status.md +2 -0
  95. package/docs/components/form-fields.md +78 -0
  96. package/docs/components/navigation-and-layout.md +51 -0
  97. package/docs/components/overlays-and-menus.md +18 -0
  98. package/docs/components/selection-and-choice.md +11 -3
  99. package/docs/guides/forms.md +111 -0
  100. package/docs/guides/helpers.md +81 -0
  101. package/docs/guides/i18n.md +17 -0
  102. package/docs/guides/printing.md +27 -0
  103. package/docs/previews/data-display-enrolmentsecret.webp +0 -0
  104. package/docs/previews/data-display-recoverycodes.webp +0 -0
  105. package/docs/previews/form-fields-formsection.webp +0 -0
  106. package/docs/previews/navigation-layout-authcard.webp +0 -0
  107. package/docs/roadmap.md +15 -0
  108. package/docs/troubleshooting.md +141 -0
  109. package/lib/components/components.css +1 -0
  110. package/lib/components/print-only.css +44 -0
  111. package/package.json +2 -2
  112. package/dist/async-slice-CsE3hkCD.js +0 -411
package/CHANGELOG.md CHANGED
@@ -1,5 +1,101 @@
1
1
  # @nxgt/material
2
2
 
3
+ ## 2.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#553](https://github.com/softistx/nxgt-material/pull/553) [`d4c7848`](https://github.com/softistx/nxgt-material/commit/d4c7848768d97e458a77aa8d96c127c13430250f) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Autocomplete: `searchError` is honoured with `onSearch` too (softistx/nxgt-material#551): when it is set, the app's own reason is shown and announced in place of the generic "The search failed. Try again." (a rejected `onSearch` still reaches `onSearchError` / `@search-error`, where the app can keep the reason and pass it back). And an option can be disabled on its own (softistx/nxgt-material#552): `options[].disabled`, in the local `options` and in what `onSearch` returns, is rendered greyed out with `aria-disabled` and never picked, by click or Enter, in `single` and `multiple` mode. In `@nxgt/material` the arrow keys still reach it so that it is announced (Base UI's combobox behaviour); in `@nxgt/material-vue` Tab skips it and Enter picks the first enabled option. Both packages export the option type with `disabled?`. Workarounds for [#551](https://github.com/softistx/nxgt-material/issues/551) and [#552](https://github.com/softistx/nxgt-material/issues/552) can be removed. Fixes [#551](https://github.com/softistx/nxgt-material/issues/551), fixes [#552](https://github.com/softistx/nxgt-material/issues/552).
8
+
9
+ ### Patch Changes
10
+
11
+ - [#555](https://github.com/softistx/nxgt-material/pull/555) [`1fe6a5c`](https://github.com/softistx/nxgt-material/commit/1fe6a5c752610f8bc6ed9121c667887cebb92934) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `DialogContent` and `AlertDialogContent` used to overflow the screen: a tall
12
+ dialog on a phone left its title off-screen. They are now capped at the dynamic
13
+ viewport (`max-h-[calc(100dvh-2rem)]`, `100vh` where `dvh` is unsupported) and
14
+ scroll inside themselves. On browsers with `dvh` support, an app's own
15
+ `max-h-*` class wins. `SheetContent` scrolls too, and a top or bottom sheet is
16
+ capped at the viewport.
17
+
18
+ Content wider than the dialog now scrolls horizontally or is clipped. To keep
19
+ the old behaviour, pass `max-h-none overflow-visible` as the `className`
20
+ (React) or `class` (Vue). For a dialog that should grow taller than the screen
21
+ and scroll inside the overlay instead of capping, use `DialogScrollContent`.
22
+
23
+ ## 2.17.0
24
+
25
+ ### Minor Changes
26
+
27
+ - [#535](https://github.com/softistx/nxgt-material/pull/535) [`a088c1c`](https://github.com/softistx/nxgt-material/commit/a088c1c8f08f8c4483fe0ba0e35eedfbe1b193f9) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Three form and focus helpers, the same names in both libraries (softistx/nxgt-material#500). Fixes [#500](https://github.com/softistx/nxgt-material/issues/500).
28
+
29
+ - **`useFocusOnMount<T>(focus?)`** (`@nxgt/material/hooks`, `@nxgt/material-vue/composables`, auto-imported by the Nuxt module): the element takes focus once mounted, and again whenever `focus` turns true. Put it on the heading of what replaced the content the user acted on (a wizard's next step, "Message sent"), with `tabIndex={-1}` / `tabindex="-1"`. React returns a `RefObject`, Vue a `ShallowRef` to bind with `ref="…"`.
30
+ - **`useSubmitOnce(busy?)`** (same entries): one submit in flight. `const submitOnce = useSubmitOnce(); <form onSubmit={submitOnce(handleSubmit(save))}>` (Vue: `const onSubmit = submitOnce(handleSubmit(save))`) drops a double click or a second Enter until `save` ends; a dropped call's event has its default prevented. Return the request's promise, or pass its busy flag (Vue: a ref or getter): the guard then opens once the flag was true and is false again, for the submit that was on its way when it rose. Without `busy`, a handler that returns no promise (an early `return`) opens the guard at once. The framework-free `createSubmitGuard()` and `busySettler(guard)` are re-exported by both from `@nxgt/material-core/submit-guard`.
31
+ - **`useCodeResolver(schema, { translate, codeOf?, language? })`** (`@nxgt/material/components`, `@nxgt/material-vue/components`): a zod 4 schema's errors worded in the page's language. A refinement carrying `params.code` (`.refine(isFree, { params: { code: 'errors.taken' } })`) reads as your translator's words for that code, every other issue as `zodLocaleError`'s, with your `material.zod.*` overrides. `createCodeErrorMap`, `defaultCodeOf`, `isEmptyRequired` and the type `CodeIssue` are exported beside it. React returns a react-hook-form `Resolver` (`useForm({ resolver })`); Vue a computed vee-validate `TypedSchema` (`useForm({ validationSchema })`), so a language switch re-words the errors on screen.
32
+ - `@nxgt/material-core` adds `/submit-guard` (`createSubmitGuard` with `once(run, { settleSync })`, a run-scoped `settle(run)` and `pendingRun()`, and `busySettler`) and `/code-errors` (`createCodeErrorMap`, `defaultCodeOf`, `isEmptyRequired`): the error map is typed by shape, with no zod dependency.
33
+
34
+ An app with a local copy marked `To extract to material (request [#500](https://github.com/softistx/nxgt-material/issues/500))` — `useFocusOnMount`, `createSubmitGuard` / `useSubmitOnce`, `useCodeResolver` and the code error map behind it — can delete it and import the same names from `@nxgt/material` / `@nxgt/material-vue` (`createSubmitGuard` and `createCodeErrorMap` from `@nxgt/material-core/submit-guard` and `/code-errors`). A local `useSubmitOnce(busy)` keeps its call; a local code error map becomes `useCodeResolver(schema, { translate, codeOf })`, with `codeOf: (issue) => (isEmptyRequired(issue) ? '<your required code>' : defaultCodeOf(issue))` where empty required fields had a code of their own.
35
+
36
+ - [#531](https://github.com/softistx/nxgt-material/pull/531) [`031a67c`](https://github.com/softistx/nxgt-material/commit/031a67ca5d837e4f0a55745c1be96566a19f578c) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Add `FormSection` (Storybook `Form fields/FormSection`), a titled section of a
37
+ long form: a heading (an `h2` by default, `titleAs` / `title-as` for `h3`–`h6`),
38
+ an optional description and actions beside the title, then its fields. Inside
39
+ the form grid (`.form-grid-layout` / `[data-slot="form-fields"]`) it spans the
40
+ whole row and lays its fields out in the grid's columns, one column on a
41
+ phone; switches, textareas, chips and file fields still take a row of their
42
+ own. A rule separates it from the section before (`separated`, default on).
43
+ It is a `role="group"` named by its heading and described by its
44
+ description, so `getByRole('group', { name: 'Profile' })` finds it.
45
+
46
+ ```tsx
47
+ <form className="form-grid-layout">
48
+ <div data-slot="form-fields">
49
+ <FormSection title="Profile" description="Shown on your public page.">
50
+ <TextFormField control={control} name="name" label="Name" />
51
+ </FormSection>
52
+ </div>
53
+ </form>
54
+ ```
55
+
56
+ ```vue
57
+ <FormSection title="Profile" description="Shown on your public page.">
58
+ <template #actions><Button size="sm">Add</Button></template>
59
+ <TextFormField name="name" label="Name" />
60
+ </FormSection>
61
+ ```
62
+
63
+ Fixes [#499](https://github.com/softistx/nxgt-material/issues/499).
64
+
65
+ Migration: an app with a local section shell marked `To extract to material
66
+ (request [#499](https://github.com/softistx/nxgt-material/issues/499))` — a `SectionTitle` heading (`text-sm font-semibold uppercase
67
+ tracking-wide text-muted-foreground`) followed by its fields, with a
68
+ `Separator` between sections inside `[data-slot="form-fields"]` — can delete
69
+ it and wrap each section's fields in `FormSection` from `@nxgt/material` /
70
+ `@nxgt/material-vue` instead: `title` replaces the `SectionTitle`, and the
71
+ `Separator` goes (the rule is drawn by the section).
72
+
73
+ - [#544](https://github.com/softistx/nxgt-material/pull/544) [`e071e15`](https://github.com/softistx/nxgt-material/commit/e071e15a1d3b31c7e8fe7ad83d5a206687d18d9f) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Signed-out pages and two-step verification: `AuthCard`, `EnrolmentSecret` and `RecoveryCodes`, the same names in both libraries (`@nxgt/material/components`, `@nxgt/material-vue/components`, registered by the Nuxt module). Fixes [#498](https://github.com/softistx/nxgt-material/issues/498).
74
+
75
+ - **`AuthCard`** (Storybook `Navigation & layout/AuthCard`): the frame of a sign-in, sign-up or reset page. One `<main tabIndex={-1}>` (focusable by script, never by Tab), a centred card whose `title` is the page's `h1`, a `description`, a `notice` above the form (`noticeTone` `'info'` | `'success'` | `'warning'` are `role="status"`, `'error'` is `role="alert"`), `focusTitle` to move the focus to the `h1` on an end state ("Check your inbox"), a row above the card for `brand` and `toolbar` (rendered only when one is given), a `banner` above it and a `footer` under the card. Padded with `max(1rem, env(safe-area-inset-*))` by classes, no inline style. Vue: the same props, and slots `title`, `description`, `notice`, `brand`, `toolbar`, `banner`, `footer`.
76
+ - **`EnrolmentSecret`** (`Data display/EnrolmentSecret`): a TOTP enrolment — the `otpauth://` URI's QR code (the library's `QRCode`, level M, named "QR code to scan with your authenticator app"), the URI as a link ("Open in your authenticator app": a phone cannot scan its own screen) and the secret in groups of four in a group named "Setup key", with a `CopyButton` that copies it without spaces and announces "Key copied". `uri`, `secret`, `showQrCode` (default `true`), `qrSize` (default `192`) and a prop per label. Side by side once the component is 28rem wide, stacked on a phone, the key wrapping inside the card.
77
+ - **`RecoveryCodes`** (`Data display/RecoveryCodes`): one-time codes shown once, in a card. An ordered list named "Recovery codes"; "Copy codes" (one per line, announced "Codes copied" / "Copy failed" by the component's own polite status region, no `Toaster` needed); "Download" (a text file: `fileHeading`, `fileNote`, a blank line, the codes; `fileName` defaults to `recovery-codes.txt`); "Print" (the card alone, through the new print rules in `styles.css`); and "I have saved these codes", which "Done" requires: pressed before, it moves the focus to the box, marks it `aria-invalid` and says "Tick the box once your codes are safe". `title` / `titleAs` (`h2` by default), `description`, `warning` (`false` hides it), `focusTitle` (default `true`), `onDone` (the "Done" button shows only with it; Vue: `@done`), `saved` / `onSavedChange` (Vue: `v-model:saved`) and `labels`.
78
+
79
+ ```tsx
80
+ <AuthCard title="Two-step verification" brand={<Logo />} toolbar={<LanguageSwitcher />}>
81
+ <EnrolmentSecret uri={enrolment.uri} secret={enrolment.secret} />
82
+ </AuthCard>
83
+ <RecoveryCodes codes={codes} fileHeading={`Recovery codes for ${email}`} saved={saved} onSavedChange={setSaved} onDone={done} />
84
+ ```
85
+
86
+ ```vue
87
+ <RecoveryCodes v-model:saved="saved" :codes="codes" :file-heading="`Recovery codes for ${email}`" @done="done" />
88
+ ```
89
+
90
+ `groupSecret`, `recoveryCodesText` and `downloadText` are re-exported beside them. `@nxgt/material-core` adds `/two-factor`: `groupSecret(secret, size = 4)`, `recoveryCodesText(codes, { heading?, note? })` and `downloadText(text, fileName, { type? })` (an object URL revoked a minute later, as `/pdf-download` does: both now share one helper). It also adds `/print-only`: `printOnly(element, name?)` prints one element of the page through `data-nxgt-print` on `<html>` and `data-nxgt-print-target` on the element, removed on `afterprint` or once a blocking `print()` returns; the rules are the new `print-only.css` in each library's `styles.css`, and both libraries re-export `printOnly`, `PRINT_ATTRIBUTE` and `PRINT_TARGET_ATTRIBUTE` from `/lib`. `CopyButton` and `RecoveryCodes` share the copy-and-announce state; `CopyButton` behaves as before. In `@nxgt/material-vue`, `Checkbox` now shows a `#helper-text` (or `#label`) slot that is added after the first render.
91
+
92
+ Migration: local copies marked `To extract to material (request [#498](https://github.com/softistx/nxgt-material/issues/498))` can be deleted. A local sign-in frame becomes `AuthCard` (its subtitle is `description`; brand, language switcher and banner go in `brand`, `toolbar` and `banner`). A local enrolment block becomes `EnrolmentSecret uri secret`, and a local grouping helper `groupSecret`. A local recovery-codes display becomes `RecoveryCodes`, a local file builder `recoveryCodesText(codes, { heading, note })`, and a local print-only rule `printOnly`; the app keeps its wording (`title`, `description`, `fileHeading`, `fileNote`, `labels`), its data loading and its navigation guard while `saved` is false.
93
+
94
+ ### Patch Changes
95
+
96
+ - Updated dependencies [[`a088c1c`](https://github.com/softistx/nxgt-material/commit/a088c1c8f08f8c4483fe0ba0e35eedfbe1b193f9), [`e071e15`](https://github.com/softistx/nxgt-material/commit/e071e15a1d3b31c7e8fe7ad83d5a206687d18d9f)]:
97
+ - @nxgt/material-core@0.10.0
98
+
3
99
  ## 2.16.0
4
100
 
5
101
  ### Minor Changes
package/README.md CHANGED
@@ -13,11 +13,12 @@ drag-and-drop, i18n, and `Icon`. Tailwind CSS v4 + Base UI.
13
13
  - **Form fields ship in pairs.** Each one has a standalone component
14
14
  (`TextField`) and a React Hook Form wrapper (`TextFormField`). Both are in
15
15
  the same barrel. The [forms guide](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/guides/forms.md) covers validation,
16
+ errors worded by code in the page's language (`useCodeResolver`),
16
17
  composite values, config-driven forms and server errors.
17
18
  - **Helpers** ([helpers guide](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/guides/helpers.md)): `cn`, `clientOnly`,
18
19
  date, number, storage and URL utilities, a Zod error map, and Redux Toolkit
19
- slice factories in `/lib`. Theme, i18n-aware formatting and option hooks are
20
- in `/hooks`.
20
+ slice factories in `/lib`. Theme, i18n-aware formatting, option, focus
21
+ (`useFocusOnMount`) and one-submit (`useSubmitOnce`) hooks are in `/hooks`.
21
22
  - **i18n** ([i18n guide](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/guides/i18n.md)): an `I18nProvider` with ICU
22
23
  messages and shipped `en` / `fr` strings. Your app merges in its own
23
24
  resources.
@@ -137,12 +138,12 @@ into a tarball. A missing sheet renders nothing, with no error and no fallback.
137
138
  | Specifier | What is in it |
138
139
  | --- | --- |
139
140
  | `@nxgt/material` | Everything below in one barrel, plus the compiled `style` condition (`dist/material.css`, for apps without Tailwind) |
140
- | `@nxgt/material/components` | UI components and `*FormField` wrappers ([Components](#components)) |
141
+ | `@nxgt/material/components` | UI components, `*FormField` wrappers and `useCodeResolver` ([Components](#components)) |
141
142
  | `@nxgt/material/print` | PDF documents over `@react-pdf/renderer`: the `PrintDocument` page shell, the print blocks, and `PrintDataTable`, `PrintKeyValue` and `PrintMetric` from column definitions and plain rows; documents as plain data (`pdfDocument` and its builders); `downloadPdf`, `openPdf`, `usePdfFile` and `pdfResponse` to get the file in one call — **its own entry, and not in the barrel above** ([printing guide](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/guides/printing.md)) |
142
143
  | `@nxgt/material/map` | Leaflet maps, markers, a location field — **its own entry, not in the barrel, and browser-only** ([maps guide](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/guides/maps.md)) |
143
144
  | `@nxgt/material/vite` | build-time helpers for consumers: `pdfkitStandardFonts()` ([printing guide](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/guides/printing.md)), `cspAssetsInlineLimit`, a `build.assetsInlineLimit` that never inlines a font ([CSP guide](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/guides/csp.md#katex-fonts)) |
144
145
  | `@nxgt/material/next` | `withNxgtPrint(nextConfig)`: the `next.config.ts` a Next.js route handler that imports `/print` needs, `output: 'standalone'` included. Node only, no dependency on `next` ([printing guide](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/guides/printing.md#nextjs-serverexternalpackages-and-output-standalone)) |
145
- | `@nxgt/material/hooks` | `useTheme`, `useIsClient`, `useIsMobile`, `useLocalizedDate`, `useCspNonce`, … ([helpers](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/guides/helpers.md#nxgtmaterialhooks)) |
146
+ | `@nxgt/material/hooks` | `useTheme`, `useIsClient`, `useIsMobile`, `useLocalizedDate`, `useCspNonce`, `useFocusOnMount`, `useSubmitOnce`, … ([helpers](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/guides/helpers.md#nxgtmaterialhooks)) |
146
147
  | `@nxgt/material/dnd` | `@dnd-kit` primitives ([helpers](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/guides/helpers.md#nxgtmaterialdnd)) |
147
148
  | `@nxgt/material/i18n` | `I18nProvider`, `mergeResources`, `createTranslator` ([i18n guide](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/guides/i18n.md)) |
148
149
  | `@nxgt/material/lib` | `cn`, `clientOnly`, date, number and storage utilities, `useSliceReducer`, `getCspNonce` / `setCspNonce` ([helpers](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/guides/helpers.md#nxgtmateriallib)) |
@@ -330,6 +331,7 @@ React-only today: `Combobox` (not planned in Vue) and `StepperIndicator`.
330
331
  | Preview | Component | What it does | @nxgt/material-vue |
331
332
  | --- | --- | --- | --- |
332
333
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/form-fields-field.webp" width="120" alt="Field"> | [`Field`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/form-fields.md#field) · `FormField` | Renders the field matching a config `type` (text, select, date, upload, otp…). | `Field` |
334
+ | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/form-fields-formsection.webp" width="120" alt="FormSection"> | [`FormSection`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/form-fields.md#formsection) | A titled section of a form (an `h2` by default) with an optional description and actions, its fields in the form grid's columns, one column on a phone. | `FormSection` |
333
335
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/form-fields-textfield.webp" width="120" alt="TextField"> | [`TextField`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/form-fields.md#textfield) · `TextFormField` | Labelled input with leading / trailing adornments and helper text. | `TextField`, `TextFormField` |
334
336
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/form-fields-textareafield.webp" width="120" alt="TextareaField"> | [`TextareaField`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/form-fields.md#textareafield) · `TextareaFormField` | Labelled textarea with row sizing and a `maxLength` counter. | `TextareaField`, `TextareaFormField` |
335
337
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/form-fields-emailfield.webp" width="120" alt="EmailField"> | [`EmailField`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/form-fields.md#emailfield) · `EmailFormField` | Validates on blur; shows a `mailto:` button once the address is valid. | `EmailField`, `EmailFormField` |
@@ -413,6 +415,8 @@ React-only today: `Combobox` (not planned in Vue) and `StepperIndicator`.
413
415
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/data-display-paramtable.webp" width="120" alt="ParamTable"> | [`ParamTable`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/data-display.md#paramtable) | Name / type / default / description table; stacked cards below `sm`. | `ParamTable` |
414
416
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/data-display-qrcode.webp" width="120" alt="QRCode"> | [`QRCode`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/data-display.md#qrcode) | QR code on a padded tile, with an optional centred logo. | `QRCode` |
415
417
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/data-display-barecode.webp" width="120" alt="Barecode"> | [`Barecode`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/data-display.md#barecode) | 1D barcode. | `Barecode` |
418
+ | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/data-display-enrolmentsecret.webp" width="120" alt="EnrolmentSecret"> | [`EnrolmentSecret`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/data-display.md#enrolmentsecret), `groupSecret` | A TOTP enrolment: the `otpauth://` QR code, the URI as a link to the authenticator app, and the key grouped by four, copyable, wrapping on a phone. | `EnrolmentSecret` |
419
+ | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/data-display-recoverycodes.webp" width="120" alt="RecoveryCodes"> | [`RecoveryCodes`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/data-display.md#recoverycodes), `recoveryCodesText`, `downloadText` | One-time recovery codes: a list, copy (announced), download, print of the card alone, and an "I have saved these codes" confirmation before Done. | `RecoveryCodes` |
416
420
 
417
421
  ### Data table, filter & lists
418
422
 
@@ -430,6 +434,7 @@ React-only today: `Combobox` (not planned in Vue) and `StepperIndicator`.
430
434
  | Preview | Component | What it does | @nxgt/material-vue |
431
435
  | --- | --- | --- | --- |
432
436
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/navigation-layout-appshell.webp" width="120" alt="ActivityLayout"> | [`ActivityLayout`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/navigation-and-layout.md#activitylayout), `ActivityContent`, `AppSidebar`, `AppHeader`, `AppBreadcrumb`, `AppBreadcrumbItem`, `AppBreadcrumbSeparator` | App shell: sidebar built from `items`, a header with a mobile sheet, route breadcrumbs and a titled page; entries are real links, and `linkComponent` swaps the link. See the [app shell guide](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/guides/app-shell.md). | `ActivityLayout`, `ActivityContent`, `AppSidebar`, `AppHeader`, `AppBreadcrumb` |
437
+ | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/navigation-layout-authcard.webp" width="120" alt="AuthCard"> | [`AuthCard`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/navigation-and-layout.md#authcard) | The frame of a signed-out page: one `main`, a centred card whose title is the `h1` (focusable on an end state), a status or alert notice, a brand and toolbar row, safe-area padding. | `AuthCard` |
433
438
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/navigation-layout-sidebar.webp" width="120" alt="Sidebar"> | [`Sidebar`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/navigation-and-layout.md#sidebar), `SidebarHeader`, `SidebarContent`, `SidebarFooter`, `SidebarMenuItem`, `SidebarMenuLabel` | Collapsible navigation sidebar with icons, tooltips and active items. | `Sidebar` (same parts) |
434
439
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/navigation-layout-topappbar.webp" width="120" alt="TopAppBar"> | [`TopAppBar`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/navigation-and-layout.md#topappbar), `BottomAppBar` | Top bar surface, and a bottom bar of icon actions with an active state. | `TopAppBar`, `BottomAppBar` |
435
440
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/previews/navigation-layout-breadcrumb.webp" width="120" alt="Breadcrumb"> | [`Breadcrumb`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/components/navigation-and-layout.md#breadcrumb), `BreadcrumbList`, `BreadcrumbItem`, `BreadcrumbLink`, `BreadcrumbPage`, `BreadcrumbSeparator`, `BreadcrumbEllipsis` | Breadcrumb primitives. | `Breadcrumb` (same parts) |
@@ -1,4 +1,4 @@
1
- import { S as e, T as t, d as n, g as r, l as i, u as a, v as o, w as s, x as c } from "./translator-DTl9h__E.js";
1
+ import { S as e, T as t, d as n, g as r, l as i, u as a, v as o, w as s, x as c } from "./translator-DEde7BKz.js";
2
2
  //#region ../../node_modules/lodash-es/_isIndex.js
3
3
  var l = 9007199254740991, u = /^(?:0|[1-9]\d*)$/;
4
4
  function d(e, t) {
@@ -1,4 +1,4 @@
1
- import { m as e, p as t } from "./translator-DTl9h__E.js";
1
+ import { m as e, p as t } from "./translator-DEde7BKz.js";
2
2
  //#region ../../node_modules/lodash-es/identity.js
3
3
  function n(e) {
4
4
  return e;
@@ -0,0 +1,459 @@
1
+ import { a as e, i as t, t as n } from "./stored-language-BKoohv2_.js";
2
+ import { C as r, S as i, h as a, l as o, m as s, p as c, r as l, u, v as d, w as f, x as p } from "./translator-DEde7BKz.js";
3
+ import { a as m, c as h, d as g, i as _, n as v, r as y, t as b, u as ee } from "./_Uint8Array-C7apDrb7.js";
4
+ import { L as te } from "./number.utils-BiBN2hWJ.js";
5
+ import { Suspense as ne, createContext as re, createElement as x, useContext as ie, useEffect as ae, useMemo as S, useReducer as oe, useState as se, useSyncExternalStore as ce } from "react";
6
+ import { asyncThunkCreator as le, buildCreateSlice as ue } from "@reduxjs/toolkit";
7
+ import { invalidFormatMessage as de, sizeMessage as fe } from "@nxgt/material-core/zod-issue-messages";
8
+ import { useDispatch as pe } from "react-redux";
9
+ //#region ../../node_modules/lodash-es/_WeakMap.js
10
+ var C = s(f, "WeakMap"), me = y(Object.keys, Object), he = Object.prototype.hasOwnProperty;
11
+ function w(e) {
12
+ if (!ee(e)) return me(e);
13
+ var t = [];
14
+ for (var n in Object(e)) he.call(e, n) && n != "constructor" && t.push(n);
15
+ return t;
16
+ }
17
+ //#endregion
18
+ //#region ../../node_modules/lodash-es/keys.js
19
+ function T(e) {
20
+ return g(e) ? _(e) : w(e);
21
+ }
22
+ //#endregion
23
+ //#region ../../node_modules/lodash-es/_arrayPush.js
24
+ function ge(e, t) {
25
+ for (var n = -1, r = t.length, i = e.length; ++n < r;) e[i + n] = t[n];
26
+ return e;
27
+ }
28
+ //#endregion
29
+ //#region ../../node_modules/lodash-es/_arrayFilter.js
30
+ function _e(e, t) {
31
+ for (var n = -1, r = e == null ? 0 : e.length, i = 0, a = []; ++n < r;) {
32
+ var o = e[n];
33
+ t(o, n, e) && (a[i++] = o);
34
+ }
35
+ return a;
36
+ }
37
+ //#endregion
38
+ //#region ../../node_modules/lodash-es/stubArray.js
39
+ function E() {
40
+ return [];
41
+ }
42
+ //#endregion
43
+ //#region ../../node_modules/lodash-es/_getSymbols.js
44
+ var ve = Object.prototype.propertyIsEnumerable, D = Object.getOwnPropertySymbols, O = D ? function(e) {
45
+ return e == null ? [] : (e = Object(e), _e(D(e), function(t) {
46
+ return ve.call(e, t);
47
+ }));
48
+ } : E;
49
+ //#endregion
50
+ //#region ../../node_modules/lodash-es/_baseGetAllKeys.js
51
+ function k(e, t, n) {
52
+ var r = t(e);
53
+ return d(e) ? r : ge(r, n(e));
54
+ }
55
+ //#endregion
56
+ //#region ../../node_modules/lodash-es/_getAllKeys.js
57
+ function A(e) {
58
+ return k(e, T, O);
59
+ }
60
+ //#endregion
61
+ //#region ../../node_modules/lodash-es/_DataView.js
62
+ var j = s(f, "DataView"), M = s(f, "Promise"), N = s(f, "Set"), ye = "[object Map]", be = "[object Object]", P = "[object Promise]", F = "[object Set]", I = "[object WeakMap]", L = "[object DataView]", xe = a(j), Se = a(u), Ce = a(M), we = a(N), Te = a(C), R = i;
63
+ (j && R(new j(/* @__PURE__ */ new ArrayBuffer(1))) != L || u && R(new u()) != ye || M && R(M.resolve()) != P || N && R(new N()) != F || C && R(new C()) != I) && (R = function(e) {
64
+ var t = i(e), n = t == be ? e.constructor : void 0, r = n ? a(n) : "";
65
+ if (r) switch (r) {
66
+ case xe: return L;
67
+ case Se: return ye;
68
+ case Ce: return P;
69
+ case we: return F;
70
+ case Te: return I;
71
+ }
72
+ return t;
73
+ });
74
+ var z = R, Ee = "__lodash_hash_undefined__";
75
+ function De(e) {
76
+ return this.__data__.set(e, Ee), this;
77
+ }
78
+ //#endregion
79
+ //#region ../../node_modules/lodash-es/_setCacheHas.js
80
+ function Oe(e) {
81
+ return this.__data__.has(e);
82
+ }
83
+ //#endregion
84
+ //#region ../../node_modules/lodash-es/_SetCache.js
85
+ function B(e) {
86
+ var t = -1, n = e == null ? 0 : e.length;
87
+ for (this.__data__ = new o(); ++t < n;) this.add(e[t]);
88
+ }
89
+ B.prototype.add = B.prototype.push = De, B.prototype.has = Oe;
90
+ //#endregion
91
+ //#region ../../node_modules/lodash-es/_arraySome.js
92
+ function ke(e, t) {
93
+ for (var n = -1, r = e == null ? 0 : e.length; ++n < r;) if (t(e[n], n, e)) return !0;
94
+ return !1;
95
+ }
96
+ //#endregion
97
+ //#region ../../node_modules/lodash-es/_cacheHas.js
98
+ function V(e, t) {
99
+ return e.has(t);
100
+ }
101
+ //#endregion
102
+ //#region ../../node_modules/lodash-es/_equalArrays.js
103
+ var Ae = 1, je = 2;
104
+ function H(e, t, n, r, i, a) {
105
+ var o = n & Ae, s = e.length, c = t.length;
106
+ if (s != c && !(o && c > s)) return !1;
107
+ var l = a.get(e), u = a.get(t);
108
+ if (l && u) return l == t && u == e;
109
+ var d = -1, f = !0, p = n & je ? new B() : void 0;
110
+ for (a.set(e, t), a.set(t, e); ++d < s;) {
111
+ var m = e[d], h = t[d];
112
+ if (r) var g = o ? r(h, m, d, t, e, a) : r(m, h, d, e, t, a);
113
+ if (g !== void 0) {
114
+ if (g) continue;
115
+ f = !1;
116
+ break;
117
+ }
118
+ if (p) {
119
+ if (!ke(t, function(e, t) {
120
+ if (!V(p, t) && (m === e || i(m, e, n, r, a))) return p.push(t);
121
+ })) {
122
+ f = !1;
123
+ break;
124
+ }
125
+ } else if (!(m === h || i(m, h, n, r, a))) {
126
+ f = !1;
127
+ break;
128
+ }
129
+ }
130
+ return a.delete(e), a.delete(t), f;
131
+ }
132
+ //#endregion
133
+ //#region ../../node_modules/lodash-es/_mapToArray.js
134
+ function Me(e) {
135
+ var t = -1, n = Array(e.size);
136
+ return e.forEach(function(e, r) {
137
+ n[++t] = [r, e];
138
+ }), n;
139
+ }
140
+ //#endregion
141
+ //#region ../../node_modules/lodash-es/_setToArray.js
142
+ function U(e) {
143
+ var t = -1, n = Array(e.size);
144
+ return e.forEach(function(e) {
145
+ n[++t] = e;
146
+ }), n;
147
+ }
148
+ //#endregion
149
+ //#region ../../node_modules/lodash-es/_equalByTag.js
150
+ var Ne = 1, Pe = 2, Fe = "[object Boolean]", Ie = "[object Date]", Le = "[object Error]", Re = "[object Map]", ze = "[object Number]", Be = "[object RegExp]", Ve = "[object Set]", He = "[object String]", Ue = "[object Symbol]", We = "[object ArrayBuffer]", Ge = "[object DataView]", W = r ? r.prototype : void 0, G = W ? W.valueOf : void 0;
151
+ function Ke(e, t, n, r, i, a, o) {
152
+ switch (n) {
153
+ case Ge:
154
+ if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1;
155
+ e = e.buffer, t = t.buffer;
156
+ case We: return !(e.byteLength != t.byteLength || !a(new b(e), new b(t)));
157
+ case Fe:
158
+ case Ie:
159
+ case ze: return c(+e, +t);
160
+ case Le: return e.name == t.name && e.message == t.message;
161
+ case Be:
162
+ case He: return e == t + "";
163
+ case Re: var s = Me;
164
+ case Ve:
165
+ var l = r & Ne;
166
+ if (s ||= U, e.size != t.size && !l) return !1;
167
+ var u = o.get(e);
168
+ if (u) return u == t;
169
+ r |= Pe, o.set(e, t);
170
+ var d = H(s(e), s(t), r, i, a, o);
171
+ return o.delete(e), d;
172
+ case Ue: if (G) return G.call(e) == G.call(t);
173
+ }
174
+ return !1;
175
+ }
176
+ //#endregion
177
+ //#region ../../node_modules/lodash-es/_equalObjects.js
178
+ var qe = 1, Je = Object.prototype.hasOwnProperty;
179
+ function Ye(e, t, n, r, i, a) {
180
+ var o = n & qe, s = A(e), c = s.length;
181
+ if (c != A(t).length && !o) return !1;
182
+ for (var l = c; l--;) {
183
+ var u = s[l];
184
+ if (!(o ? u in t : Je.call(t, u))) return !1;
185
+ }
186
+ var d = a.get(e), f = a.get(t);
187
+ if (d && f) return d == t && f == e;
188
+ var p = !0;
189
+ a.set(e, t), a.set(t, e);
190
+ for (var m = o; ++l < c;) {
191
+ u = s[l];
192
+ var h = e[u], g = t[u];
193
+ if (r) var _ = o ? r(g, h, u, t, e, a) : r(h, g, u, e, t, a);
194
+ if (!(_ === void 0 ? h === g || i(h, g, n, r, a) : _)) {
195
+ p = !1;
196
+ break;
197
+ }
198
+ m ||= u == "constructor";
199
+ }
200
+ if (p && !m) {
201
+ var v = e.constructor, y = t.constructor;
202
+ v != y && "constructor" in e && "constructor" in t && !(typeof v == "function" && v instanceof v && typeof y == "function" && y instanceof y) && (p = !1);
203
+ }
204
+ return a.delete(e), a.delete(t), p;
205
+ }
206
+ //#endregion
207
+ //#region ../../node_modules/lodash-es/_baseIsEqualDeep.js
208
+ var Xe = 1, K = "[object Arguments]", q = "[object Array]", J = "[object Object]", Y = Object.prototype.hasOwnProperty;
209
+ function Ze(e, t, n, r, i, a) {
210
+ var o = d(e), s = d(t), c = o ? q : z(e), l = s ? q : z(t);
211
+ c = c == K ? J : c, l = l == K ? J : l;
212
+ var u = c == J, f = l == J, p = c == l;
213
+ if (p && h(e)) {
214
+ if (!h(t)) return !1;
215
+ o = !0, u = !1;
216
+ }
217
+ if (p && !u) return a ||= new v(), o || m(e) ? H(e, t, n, r, i, a) : Ke(e, t, c, n, r, i, a);
218
+ if (!(n & Xe)) {
219
+ var g = u && Y.call(e, "__wrapped__"), _ = f && Y.call(t, "__wrapped__");
220
+ if (g || _) {
221
+ var y = g ? e.value() : e, b = _ ? t.value() : t;
222
+ return a ||= new v(), i(y, b, n, r, a);
223
+ }
224
+ }
225
+ return p ? (a ||= new v(), Ye(e, t, n, r, i, a)) : !1;
226
+ }
227
+ //#endregion
228
+ //#region ../../node_modules/lodash-es/_baseIsEqual.js
229
+ function X(e, t, n, r, i) {
230
+ return e === t ? !0 : e == null || t == null || !p(e) && !p(t) ? e !== e && t !== t : Ze(e, t, n, r, X, i);
231
+ }
232
+ //#endregion
233
+ //#region ../../node_modules/lodash-es/isEqual.js
234
+ function Qe(e, t) {
235
+ return X(e, t);
236
+ }
237
+ //#endregion
238
+ //#region ../../node_modules/lodash-es/isNil.js
239
+ function $e(e) {
240
+ return e == null;
241
+ }
242
+ //#endregion
243
+ //#region lib/lib/string.utils.ts
244
+ function Z(e) {
245
+ return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
246
+ }
247
+ function et(e) {
248
+ return e ? e.toLowerCase().replace(/_/g, "-") : "";
249
+ }
250
+ function tt(e, t = ", ") {
251
+ return e.filter((e) => !!e).join(t);
252
+ }
253
+ function nt(e, t) {
254
+ let n = t.trim();
255
+ if (!n) return [{
256
+ text: e,
257
+ match: !1
258
+ }];
259
+ let r = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), i = new RegExp(r, "ig"), a = [], o = 0;
260
+ for (let t of e.matchAll(i)) {
261
+ let n = t.index ?? 0;
262
+ n > o && a.push({
263
+ text: e.slice(o, n),
264
+ match: !1
265
+ }), a.push({
266
+ text: t[0],
267
+ match: !0
268
+ }), o = n + t[0].length;
269
+ }
270
+ return o < e.length && a.push({
271
+ text: e.slice(o),
272
+ match: !1
273
+ }), a.length > 0 ? a : [{
274
+ text: e,
275
+ match: !1
276
+ }];
277
+ }
278
+ var rt = {
279
+ enumToKebabCase: et,
280
+ joinTruthyParts: tt,
281
+ slugify: Z,
282
+ splitMatch: nt
283
+ }, it = /* @__PURE__ */ new WeakMap();
284
+ function at(e, t) {
285
+ it.set(e, t);
286
+ }
287
+ function ot(e) {
288
+ return it.get(e);
289
+ }
290
+ //#endregion
291
+ //#region lib/lib/redux/use-slice-reducer.ts
292
+ function Q(e, t) {
293
+ return t ? {
294
+ ...e,
295
+ ...t
296
+ } : e;
297
+ }
298
+ var st = "nxgt/useSliceReducer/restore", ct = () => () => {}, lt = () => !1;
299
+ function ut(e) {
300
+ return (t, n) => n.type === st ? n.payload : e(t, n);
301
+ }
302
+ function dt(e, t) {
303
+ let n = ot(e), r = ce(ct, lt, () => n !== void 0), [i] = se(r), [a, o] = oe(S(() => ut(e.reducer), [e.reducer]), t, (t) => Q(r && n ? n() : e.getInitialState(), t));
304
+ return ae(() => {
305
+ i && o({
306
+ type: st,
307
+ payload: Q(e.getInitialState(), t)
308
+ });
309
+ }, []), [a, S(() => {
310
+ let t = {};
311
+ for (let n in e.actions) t[n] = (...t) => {
312
+ o(e.actions[n](...t));
313
+ };
314
+ return t;
315
+ }, [o, e.actions])];
316
+ }
317
+ //#endregion
318
+ //#region lib/lib/redux/use-slice-selector.ts
319
+ function ft(e, t) {
320
+ return S(() => t(e), [e, t]);
321
+ }
322
+ //#endregion
323
+ //#region lib/lib/url.utils.ts
324
+ function $(e) {
325
+ return new URL(e.url).searchParams;
326
+ }
327
+ function pt(e, t) {
328
+ return $(e).get(t);
329
+ }
330
+ function mt(e) {
331
+ return /^(https?:)?\/\//.test(e) || e.startsWith("mailto:");
332
+ }
333
+ //#endregion
334
+ //#region lib/lib/client-only.utils.ts
335
+ var ht = re(!1);
336
+ function gt(e) {
337
+ function t(t) {
338
+ let n = ie(ht), r = te();
339
+ return !n && !r ? null : x(ht.Provider, { value: !0 }, x(ne, { fallback: null }, x(e, t)));
340
+ }
341
+ return t.displayName = `ClientOnly(${e.displayName ?? e.name ?? "Component"})`, t;
342
+ }
343
+ //#endregion
344
+ //#region lib/lib/zod-error-map.ts
345
+ var _t = (e) => {
346
+ let t = typeof e;
347
+ switch (t) {
348
+ case "number": return Number.isNaN(e) ? "NaN" : "number";
349
+ case "object":
350
+ if (Array.isArray(e)) return "array";
351
+ if (e === null) return "null";
352
+ if (Object.getPrototypeOf(e) !== Object.prototype && e.constructor) return e.constructor.name;
353
+ }
354
+ return t;
355
+ }, vt = ({ storageKey: r = t, language: i, translate: a = l } = {}) => {
356
+ let o = () => typeof i == "function" ? i() : i ?? n(r, "en", e);
357
+ return (e) => {
358
+ let t = o(), n = (e, n) => a(e, n, t), r = (e, t) => {
359
+ let r = n(e, t);
360
+ return r === e ? void 0 : r;
361
+ };
362
+ switch (e.code) {
363
+ case "invalid_type": {
364
+ let t = {
365
+ expected: e.expected,
366
+ received: _t(e.input)
367
+ };
368
+ return e.input ? r(`material.zod.invalid_type.${e.expected}`, t) ?? n("material.zod.invalid_type.default", t) : n("material.zod.required", t);
369
+ }
370
+ case "invalid_value": return e.values.length === 1 ? n("material.zod.invalid_value_single", { value: e.values[0] }) : n("material.zod.invalid_value_multiple", { values: e.values.join(" | ") });
371
+ case "too_big":
372
+ case "too_small": return fe(e, {
373
+ translate: n,
374
+ lookup: r
375
+ });
376
+ case "invalid_format": return de(e, {
377
+ translate: n,
378
+ lookup: r
379
+ });
380
+ case "not_multiple_of": return n("material.zod.not_multiple_of", { divisor: e.divisor });
381
+ case "unrecognized_keys": return n(`material.zod.unrecognized_keys_${e.keys.length > 1 ? "multiple" : "single"}`, { keys: e.keys.join(", ") });
382
+ case "invalid_key": return n("material.zod.invalid_key", { origin: e.origin });
383
+ case "invalid_union": return n("material.zod.invalid_union");
384
+ case "invalid_element": return n("material.zod.invalid_element", { origin: e.origin });
385
+ default: return n("material.zod.default");
386
+ }
387
+ };
388
+ };
389
+ //#endregion
390
+ //#region ../../node_modules/redux/dist/redux.mjs
391
+ function yt(e) {
392
+ return `Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
393
+ }
394
+ var bt = () => Math.random().toString(36).substring(7).split("").join(".");
395
+ `${/* @__PURE__ */ bt()}`, `${/* @__PURE__ */ bt()}`;
396
+ function xt(e) {
397
+ if (e === void 0) return "undefined";
398
+ if (e === null) return "null";
399
+ let t = typeof e;
400
+ switch (t) {
401
+ case "boolean":
402
+ case "string":
403
+ case "number":
404
+ case "symbol":
405
+ case "function": return t;
406
+ }
407
+ if (Array.isArray(e)) return "array";
408
+ if (wt(e)) return "date";
409
+ if (Ct(e)) return "error";
410
+ let n = St(e);
411
+ switch (n) {
412
+ case "Symbol":
413
+ case "Promise":
414
+ case "WeakMap":
415
+ case "WeakSet":
416
+ case "Map":
417
+ case "Set": return n;
418
+ }
419
+ return Object.prototype.toString.call(e).slice(8, -1).toLowerCase().replace(/\s/g, "");
420
+ }
421
+ function St(e) {
422
+ return typeof e.constructor == "function" ? e.constructor.name : null;
423
+ }
424
+ function Ct(e) {
425
+ return e instanceof Error || typeof e.message == "string" && e.constructor && typeof e.constructor.stackTraceLimit == "number";
426
+ }
427
+ function wt(e) {
428
+ return e instanceof Date || typeof e.toDateString == "function" && typeof e.getDate == "function" && typeof e.setDate == "function";
429
+ }
430
+ function Tt(e) {
431
+ let t = typeof e;
432
+ return process.env.NODE_ENV !== "production" && (t = xt(e)), t;
433
+ }
434
+ function Et(e, t) {
435
+ return function(...n) {
436
+ return t(e.apply(this, n));
437
+ };
438
+ }
439
+ function Dt(e, t) {
440
+ if (typeof e == "function") return Et(e, t);
441
+ if (typeof e != "object" || !e) throw Error(process.env.NODE_ENV === "production" ? yt(16) : `bindActionCreators expected an object or a function, but instead received: '${Tt(e)}'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?`);
442
+ let n = {};
443
+ for (let r in e) {
444
+ let i = e[r];
445
+ typeof i == "function" && (n[r] = Et(i, t));
446
+ }
447
+ return n;
448
+ }
449
+ //#endregion
450
+ //#region lib/lib/redux/use-actions.ts
451
+ function Ot(e, t) {
452
+ let n = pe();
453
+ return S(() => Dt(e, n), t ? [n, ...t] : [n]);
454
+ }
455
+ //#endregion
456
+ //#region lib/lib/redux/async-slice.ts
457
+ var kt = ue({ creators: { asyncThunk: le } });
458
+ //#endregion
459
+ export { _e as A, B as C, k as D, A as E, T as M, w as N, O, V as S, N as T, nt as _, gt as a, X as b, $ as c, dt as d, at as f, Z as g, tt as h, vt as i, ge as j, E as k, ft as l, et as m, Ot as n, mt as o, rt as p, _t as r, pt as s, kt as t, Q as u, $e as v, z as w, U as x, Qe as y };