@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,22 +1,23 @@
1
- import { i as e } from "./translate-material-CMHUH5Ha.js";
2
- import { n as t } from "./use-heading-spy-Ciw9GBHL.js";
1
+ import { i as e } from "./translate-material-s_lxIV43.js";
2
+ import { n as t } from "./use-heading-spy-FIZlf9qj.js";
3
3
  import { t as n } from "./number.utils-CSueQZcv.js";
4
4
  import { useCallback as r, useEffect as i, useLayoutEffect as a, useMemo as o, useRef as s, useState as c } from "react";
5
5
  import { jsx as l } from "react/jsx-runtime";
6
6
  import { useBlocker as u, useNavigate as d, useSearchParams as f } from "react-router";
7
- import { createFormatters as p } from "@nxgt/material-core/print-format";
7
+ import { DEFAULT_SCANNER_MAX_GAP as p, DEFAULT_SCANNER_MIN_LENGTH as m, createScanner as h, createScanner as g } from "@nxgt/material-core/barcode-scanner";
8
+ import { createFormatters as _ } from "@nxgt/material-core/print-format";
8
9
  //#region lib/hooks/unsaved-guard-rules.ts
9
- function m(e, t, n = {}) {
10
+ function v(e, t, n = {}) {
10
11
  return e.pathname !== t.pathname || !n.ignoreSearch && e.search !== t.search;
11
12
  }
12
- function h({ dirty: e, released: t, context: n, leaves: r, ignoreSearch: i }) {
13
+ function y({ dirty: e, released: t, context: n, leaves: r, ignoreSearch: i }) {
13
14
  if (t || !e) return !1;
14
15
  let { currentLocation: a, nextLocation: o } = n;
15
- return r ? r(a, o) : m(a, o, { ignoreSearch: i });
16
+ return r ? r(a, o) : v(a, o, { ignoreSearch: i });
16
17
  }
17
18
  //#endregion
18
19
  //#region lib/hooks/use-allowed-transitions.ts
19
- function g(e, t, n) {
20
+ function b(e, t, n) {
20
21
  return (t[e] || []).map((e) => {
21
22
  let t = n[e];
22
23
  return t ? {
@@ -26,8 +27,52 @@ function g(e, t, n) {
26
27
  }).filter((e) => e !== null);
27
28
  }
28
29
  //#endregion
30
+ //#region lib/hooks/use-barcode-scanner.ts
31
+ var x = "input, textarea, select, [contenteditable='true']", S = (e, t) => {
32
+ let { closest: n } = e ?? {};
33
+ return typeof n == "function" && n.call(e, t) !== null;
34
+ };
35
+ function C(e, { onScan: t, acceptIn: n, onKey: r, maxGap: i, minLength: a }) {
36
+ let o = h({
37
+ maxGap: i,
38
+ minLength: a
39
+ }), s = (e) => {
40
+ let i = e;
41
+ if (i.ctrlKey || i.metaKey || i.altKey || i.repeat) return;
42
+ if (S(i.target, x) && !(n && S(i.target, n))) {
43
+ o.reset();
44
+ return;
45
+ }
46
+ let a = o.feed(i.key, i.timeStamp);
47
+ a.kind === "scan" && (i.preventDefault(), i.stopPropagation(), t(a.code)), r?.(i, {
48
+ result: a,
49
+ pending: o.pending
50
+ });
51
+ };
52
+ return e.addEventListener("keydown", s, !0), () => e.removeEventListener("keydown", s, !0);
53
+ }
54
+ function w(e) {
55
+ let t = s(e);
56
+ t.current = e;
57
+ let { enabled: n = !0, acceptIn: r, maxGap: a, minLength: o } = e;
58
+ i(() => {
59
+ if (n) return C(document, {
60
+ acceptIn: r,
61
+ maxGap: a,
62
+ minLength: o,
63
+ onScan: (e) => t.current.onScan(e),
64
+ onKey: (e, n) => t.current.onKey?.(e, n)
65
+ });
66
+ }, [
67
+ n,
68
+ r,
69
+ a,
70
+ o
71
+ ]);
72
+ }
73
+ //#endregion
29
74
  //#region lib/hooks/drafts-store.ts
30
- function _(e, t, n) {
75
+ function T(e, t, n) {
31
76
  let r = {};
32
77
  try {
33
78
  let i = e?.getItem(t);
@@ -41,7 +86,7 @@ function _(e, t, n) {
41
86
  } catch {}
42
87
  return r;
43
88
  }
44
- function v(e, t, n, r) {
89
+ function E(e, t, n, r) {
45
90
  try {
46
91
  let i = Object.keys(n);
47
92
  if (i.length === 0) {
@@ -55,34 +100,34 @@ function v(e, t, n, r) {
55
100
  }
56
101
  //#endregion
57
102
  //#region lib/hooks/use-drafts.ts
58
- function y() {
103
+ function D() {
59
104
  try {
60
105
  return window.sessionStorage;
61
106
  } catch {
62
107
  return;
63
108
  }
64
109
  }
65
- var b = (e) => JSON.parse(e);
66
- function x(e) {
110
+ var O = (e) => JSON.parse(e);
111
+ function k(e) {
67
112
  try {
68
- return e === void 0 ? y() : typeof e == "function" ? e() : e;
113
+ return e === void 0 ? D() : typeof e == "function" ? e() : e;
69
114
  } catch {
70
115
  return;
71
116
  }
72
117
  }
73
- function S(e, t) {
118
+ function A(e, t) {
74
119
  try {
75
- x(t)?.removeItem(e);
120
+ k(t)?.removeItem(e);
76
121
  } catch {}
77
122
  }
78
- function C(e, t = {}) {
79
- let { serialize: n = JSON.stringify, parse: a = b, storage: l } = t, [u, d] = c({
123
+ function j(e, t = {}) {
124
+ let { serialize: n = JSON.stringify, parse: a = O, storage: l } = t, [u, d] = c({
80
125
  key: e,
81
126
  drafts: {},
82
127
  loaded: !1
83
- }), f = s(u), p = u.key === e, m = p ? u.drafts : w, h = p && u.loaded;
128
+ }), f = s(u), p = u.key === e, m = p ? u.drafts : M, h = p && u.loaded;
84
129
  i(() => {
85
- let t = _(x(l), e, a), n = f.current, r = {
130
+ let t = T(k(l), e, a), n = f.current, r = {
86
131
  key: e,
87
132
  drafts: n.key === e ? {
88
133
  ...t,
@@ -93,41 +138,41 @@ function C(e, t = {}) {
93
138
  f.current = r, d(r);
94
139
  }, [e]);
95
140
  let g = r((t) => {
96
- let r = x(l), i = f.current, o = i.key === e && i.loaded, s = {
141
+ let r = k(l), i = f.current, o = i.key === e && i.loaded, s = {
97
142
  key: e,
98
- drafts: t(o ? i.drafts : _(r, e, a)),
143
+ drafts: t(o ? i.drafts : T(r, e, a)),
99
144
  loaded: o
100
145
  };
101
- v(r, e, s.drafts, n), f.current = s, d(s);
102
- }, [e]), y = r((e, t) => g((n) => ({
146
+ E(r, e, s.drafts, n), f.current = s, d(s);
147
+ }, [e]), _ = r((e, t) => g((n) => ({
103
148
  ...n,
104
149
  [e]: t
105
- })), [g]), S = r((e) => g((t) => {
150
+ })), [g]), v = r((e) => g((t) => {
106
151
  let { [e]: n, ...r } = t;
107
152
  return r;
108
- }), [g]), C = r(() => g(() => ({})), [g]);
153
+ }), [g]), y = r(() => g(() => ({})), [g]);
109
154
  return {
110
155
  get: r((e) => m[e], [m]),
111
- set: y,
112
- drop: S,
113
- clear: C,
156
+ set: _,
157
+ drop: v,
158
+ clear: y,
114
159
  keys: o(() => Object.keys(m), [m]),
115
160
  loaded: h
116
161
  };
117
162
  }
118
- var w = {};
163
+ var M = {};
119
164
  //#endregion
120
165
  //#region lib/hooks/use-formatters.ts
121
- function T(t = {}) {
166
+ function N(t = {}) {
122
167
  let n = e(), r = t.locale ?? n?.language ?? "en", { timeZone: i } = t;
123
- return o(() => p({
168
+ return o(() => _({
124
169
  locale: r,
125
170
  timeZone: i
126
171
  }), [r, i]);
127
172
  }
128
173
  //#endregion
129
174
  //#region lib/hooks/use-navigation.ts
130
- function E(e, t) {
175
+ function P(e, t) {
131
176
  let n = d();
132
177
  return r(() => {
133
178
  n(e, t);
@@ -137,7 +182,7 @@ function E(e, t) {
137
182
  t
138
183
  ]);
139
184
  }
140
- function D(e) {
185
+ function F(e) {
141
186
  let t = d();
142
187
  return o(() => e.map(({ to: e, options: n }) => () => {
143
188
  t(e, n);
@@ -145,7 +190,7 @@ function D(e) {
145
190
  }
146
191
  //#endregion
147
192
  //#region lib/hooks/use-number-formatter.ts
148
- function O() {
193
+ function I() {
149
194
  let t = e(), i = r((e, r) => n(e, {
150
195
  ...r,
151
196
  language: t?.language
@@ -161,7 +206,7 @@ function O() {
161
206
  }
162
207
  //#endregion
163
208
  //#region lib/hooks/use-options.ts
164
- function k(e, { filter: t, value: n, label: r, expanded: i }) {
209
+ function L(e, { filter: t, value: n, label: r, expanded: i }) {
165
210
  return e.filter((e) => e && (t?.(e) ?? !0)).map((e) => {
166
211
  let t = typeof n == "function" ? n(e) : e[n]?.toString() ?? "", a = "";
167
212
  return a = typeof r == "function" ? r(e) : Array.isArray(r) ? r.map((t) => e[t]).filter(Boolean).join(" ") : e[r]?.toString() ?? "", {
@@ -171,9 +216,9 @@ function k(e, { filter: t, value: n, label: r, expanded: i }) {
171
216
  };
172
217
  });
173
218
  }
174
- function A(e, t) {
219
+ function R(e, t) {
175
220
  let { filter: n, value: r, label: i, expanded: a } = t;
176
- return o(() => k(e, {
221
+ return o(() => L(e, {
177
222
  filter: n,
178
223
  value: r,
179
224
  label: i,
@@ -186,13 +231,13 @@ function A(e, t) {
186
231
  a
187
232
  ]);
188
233
  }
189
- function j(e) {
234
+ function z(e) {
190
235
  return e?.edges?.map((e) => e.node) ?? [];
191
236
  }
192
237
  //#endregion
193
238
  //#region lib/hooks/poll.ts
194
- var M = () => typeof document > "u" || document.visibilityState === "visible";
195
- function N({ ms: e, read: t, active: n = () => !0, visible: r = M, onError: i, flight: a = { current: !1 } }) {
239
+ var B = () => typeof document > "u" || document.visibilityState === "visible";
240
+ function V({ ms: e, read: t, active: n = () => !0, visible: r = B, onError: i, flight: a = { current: !1 } }) {
196
241
  let o = !1, s = setInterval(() => {
197
242
  a.current || !n() || !r() || (a.current = !0, new Promise((e) => e(t())).catch((e) => {
198
243
  o || i?.(e);
@@ -206,7 +251,7 @@ function N({ ms: e, read: t, active: n = () => !0, visible: r = M, onError: i, f
206
251
  }
207
252
  //#endregion
208
253
  //#region lib/hooks/use-poll.ts
209
- function P({ ms: e, enabled: t = !0, read: n, onError: r }) {
254
+ function H({ ms: e, enabled: t = !0, read: n, onError: r }) {
210
255
  let o = s({
211
256
  read: n,
212
257
  onError: r
@@ -217,7 +262,7 @@ function P({ ms: e, enabled: t = !0, read: n, onError: r }) {
217
262
  onError: r
218
263
  };
219
264
  }), i(() => {
220
- if (t) return N({
265
+ if (t) return V({
221
266
  ms: e,
222
267
  read: () => o.current.read(),
223
268
  onError: (e) => o.current.onError?.(e),
@@ -227,7 +272,7 @@ function P({ ms: e, enabled: t = !0, read: n, onError: r }) {
227
272
  }
228
273
  //#endregion
229
274
  //#region lib/hooks/use-react-router-block.ts
230
- var F = (e) => {
275
+ var U = (e) => {
231
276
  let t = u(e);
232
277
  return {
233
278
  state: t.state,
@@ -237,14 +282,14 @@ var F = (e) => {
237
282
  };
238
283
  //#endregion
239
284
  //#region lib/hooks/use-search-param.ts
240
- function I(e) {
285
+ function W(e) {
241
286
  let [t, n] = f();
242
287
  return o(() => t.get(e), [t, e]);
243
288
  }
244
289
  //#endregion
245
290
  //#region lib/hooks/use-unsaved-guard/guard-core.ts
246
- var L = (e) => typeof e == "function" ? e() : e;
247
- function R(e) {
291
+ var G = (e) => typeof e == "function" ? e() : e;
292
+ function K(e) {
248
293
  let t = !1, n, r = () => {
249
294
  n !== void 0 && clearTimeout(n), n = void 0;
250
295
  }, i = () => {
@@ -257,27 +302,27 @@ function R(e) {
257
302
  rearm: i,
258
303
  dispose: r,
259
304
  shouldBlock(n, r) {
260
- if (!h({
305
+ if (!y({
261
306
  dirty: !0,
262
307
  released: !1,
263
308
  context: n,
264
309
  ...r
265
310
  })) return !1;
266
311
  let a = t;
267
- return i(), !a && L(e());
312
+ return i(), !a && G(e());
268
313
  },
269
314
  shouldWarnUnload() {
270
- return !t && L(e());
315
+ return !t && G(e());
271
316
  }
272
317
  };
273
318
  }
274
- function z(e, t) {
319
+ function q(e, t) {
275
320
  let n = (e) => {
276
321
  t.shouldWarnUnload() && (e.preventDefault(), e.returnValue = "");
277
322
  };
278
323
  return e.addEventListener("beforeunload", n), () => e.removeEventListener("beforeunload", n);
279
324
  }
280
- async function B(e) {
325
+ async function J(e) {
281
326
  if (!e) return !1;
282
327
  try {
283
328
  return await e() === !0;
@@ -287,13 +332,13 @@ async function B(e) {
287
332
  }
288
333
  //#endregion
289
334
  //#region lib/hooks/use-unsaved-guard/use-discard-guard.tsx
290
- function V(e, n = {}) {
335
+ function Y(e, n = {}) {
291
336
  let i = s(e);
292
337
  i.current = e;
293
338
  let [a, o] = c(null);
294
339
  return {
295
340
  close: r((e) => {
296
- L(i.current) ? o(() => e) : e();
341
+ G(i.current) ? o(() => e) : e();
297
342
  }, []),
298
343
  dialog: /* @__PURE__ */ l(t, {
299
344
  ...n,
@@ -309,10 +354,10 @@ function V(e, n = {}) {
309
354
  }
310
355
  //#endregion
311
356
  //#region lib/hooks/use-unsaved-guard/use-unsaved-guard.tsx
312
- function H(e) {
313
- i(() => z(window, e), [e]);
357
+ function X(e) {
358
+ i(() => q(window, e), [e]);
314
359
  }
315
- function U(e, t) {
360
+ function Z(e, t) {
316
361
  let [n, r] = c(!1), a = s(!1), o = s(e);
317
362
  o.current = e;
318
363
  let l = s(t);
@@ -321,7 +366,7 @@ function U(e, t) {
321
366
  a.current = !1, r(!1);
322
367
  return;
323
368
  }
324
- a.current || (a.current = !0, B(l.current).then((e) => {
369
+ a.current || (a.current = !0, J(l.current).then((e) => {
325
370
  e ? o.current.proceed() : r(!0);
326
371
  }));
327
372
  }, [e.state]), {
@@ -330,14 +375,14 @@ function U(e, t) {
330
375
  blockerRef: o
331
376
  };
332
377
  }
333
- function W(e, n) {
378
+ function Q(e, n) {
334
379
  let { block: a, leaves: o, ignoreSearch: u, onBlock: d, ...f } = n, p = s(e);
335
380
  p.current = e;
336
- let [m] = c(() => R(() => p.current)), h = s(!1), { asking: g, setAsking: _, blockerRef: v } = U(a((e) => m.shouldBlock(e, {
381
+ let [m] = c(() => K(() => p.current)), h = s(!1), { asking: g, setAsking: _, blockerRef: v } = Z(a((e) => m.shouldBlock(e, {
337
382
  leaves: o,
338
383
  ignoreSearch: u
339
384
  })), d);
340
- H(m), i(() => m.dispose, [m]);
385
+ X(m), i(() => m.dispose, [m]);
341
386
  let y = typeof e == "boolean" ? e : void 0;
342
387
  return i(() => {
343
388
  y && m.rearm();
@@ -362,4 +407,4 @@ function W(e, n) {
362
407
  };
363
408
  }
364
409
  //#endregion
365
- export { m as _, P as a, j as c, E as d, D as f, g, C as h, F as i, A as l, S as m, V as n, N as o, T as p, I as r, k as s, W as t, O as u, h as v };
410
+ export { y as C, v as S, m as _, H as a, w as b, z as c, P as d, F as f, p as g, j as h, U as i, R as l, A as m, Y as n, V as o, N as p, W as r, L as s, Q as t, I as u, C as v, b as x, g as y };
package/dist/hooks.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { t as e } from "./use-ssr-media-query-C6M5m8sf.js";
2
2
  import { a as t, i as n, o as r, r as i, s as a } from "./theme-store-BdPp43cV.js";
3
3
  import { n as o, t as s } from "./use-theme-BCLireTd.js";
4
- import { a as c, f as l, g as u, i as d, o as f, p, r as m, s as h, t as g } from "./use-heading-spy-Ciw9GBHL.js";
4
+ import { a as c, f as l, g as u, i as d, o as f, p, r as m, s as h, t as g } from "./use-heading-spy-FIZlf9qj.js";
5
5
  import { r as _ } from "./use-csp-nonce-ZKs9k-ov.js";
6
6
  import { t as v } from "./use-mobile-BDro060N.js";
7
7
  import { t as y } from "./use-scroll-away-PQRFZkT2.js";
8
- import { _ as b, a as x, c as S, d as C, f as w, g as T, h as E, i as D, l as O, m as k, n as A, o as j, p as M, r as N, s as P, t as F, u as I, v as L } from "./hooks-DjcbJZiO.js";
9
- export { i as DEFAULT_THEME, n as applyResolvedTheme, t as applyThemeName, P as buildOptions, d as busySettler, k as clearDrafts, c as createSubmitGuard, S as extractNode, b as isLeaving, r as resolveTheme, a as resolveThemeName, L as shouldBlockNavigation, j as startPoll, T as useAllowedTransitions, m as useCountdown, _ as useCspNonce, A as useDiscardGuard, E as useDrafts, h as useFocusOnMount, M as useFormatters, g as useHeadingSpy, o as useIsClient, v as useIsMobile, l as useLatched, p as useLatchedWhileClosed, u as useLocalizedDate, C as useNavigationHandler, w as useNavigationHandlers, I as useNumberFormatter, O as useOptions, x as usePoll, D as useReactRouterBlock, y as useScrollAway, N as useSearchParam, e as useSsrMediaQuery, f as useSubmitOnce, s as useTheme, F as useUnsavedGuard };
8
+ import { C as b, S as x, _ as S, a as C, b as w, c as T, d as E, f as D, g as O, h as k, i as A, l as j, m as M, n as N, o as P, p as F, r as I, s as L, t as R, u as z, v as B, x as V, y as H } from "./hooks-C3vkQmzh.js";
9
+ export { O as DEFAULT_SCANNER_MAX_GAP, S as DEFAULT_SCANNER_MIN_LENGTH, i as DEFAULT_THEME, n as applyResolvedTheme, t as applyThemeName, B as attachBarcodeScanner, L as buildOptions, d as busySettler, M as clearDrafts, H as createScanner, c as createSubmitGuard, T as extractNode, x as isLeaving, r as resolveTheme, a as resolveThemeName, b as shouldBlockNavigation, P as startPoll, V as useAllowedTransitions, w as useBarcodeScanner, m as useCountdown, _ as useCspNonce, N as useDiscardGuard, k as useDrafts, h as useFocusOnMount, F as useFormatters, g as useHeadingSpy, o as useIsClient, v as useIsMobile, l as useLatched, p as useLatchedWhileClosed, u as useLocalizedDate, E as useNavigationHandler, D as useNavigationHandlers, z as useNumberFormatter, j as useOptions, C as usePoll, A as useReactRouterBlock, y as useScrollAway, I as useSearchParam, e as useSsrMediaQuery, f as useSubmitOnce, s as useTheme, R as useUnsavedGuard };
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
2
  import { o as t } from "./dist-DVRQkaTK.js";
3
3
  import { i as n, r, t as i } from "./dist-DWZXlCZR.js";
4
- import { S as a, d as o, f as s, l as c, p as l, x as u } from "./spinner-ffuwBXHl.js";
4
+ import { S as a, d as o, f as s, l as c, p as l, x as u } from "./spinner-CEVomQ5K.js";
5
5
  import { a as d, i as f } from "./dist-DHdUUM1w.js";
6
6
  import { t as p } from "./in-dialog-D61Yeaol.js";
7
7
  import { i as m } from "./escape-owner-DpaP0lm1.js";
package/dist/i18n.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./is-production-GLw59WU8.js";
2
- import { c as t, d as n, i as r, l as i, n as a, o, r as s, t as c, u as l } from "./translator-9zA-Um3W.js";
3
- import { i as u, n as d, r as f, t as p } from "./translate-material-CMHUH5Ha.js";
2
+ import { c as t, d as n, i as r, l as i, n as a, o, r as s, t as c, u as l } from "./translator-Cgql9srO.js";
3
+ import { i as u, n as d, r as f, t as p } from "./translate-material-s_lxIV43.js";
4
4
  import { o as m, t as h } from "./merge-BCZE6HGq.js";
5
- import { t as g } from "./use-material-translation-CLNaMhUf.js";
5
+ import { t as g } from "./use-material-translation-xNzbSVgS.js";
6
6
  import { useCallback as _ } from "react";
7
7
  //#region lib/i18n/merge-resources.ts
8
8
  function v(e, t, n = "") {
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
- import { t } from "./icon-button-BSVpO1jP.js";
2
+ import { t } from "./icon-button-CpKxV264.js";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  //#region lib/components/ui/actions/icon-button/icon-badge.tsx
5
5
  function r({ children: r, className: i, ...a }) {
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
2
  import { n as t } from "./use-shape-morph-BKA_R5P5.js";
3
3
  import { n, t as r } from "./dist-DVRQkaTK.js";
4
- import { n as i, t as a } from "./spinner-ffuwBXHl.js";
4
+ import { n as i, t as a } from "./spinner-CEVomQ5K.js";
5
5
  import { t as o } from "./dist-DkQbkF9T.js";
6
6
  import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./use-click-lock-Bwg_caHO.js";
7
7
  import { t as m } from "./is-production-GLw59WU8.js";
@@ -0,0 +1,31 @@
1
+ //#region lib/components/ui/widgets/keypad/key-layout.ts
2
+ var e = (e) => e.map((e) => ({
3
+ ...e,
4
+ span: (e.span ?? 1) * 3
5
+ })), t = (e, t) => t && e.alt ? {
6
+ ...e,
7
+ ...e.alt
8
+ } : e, n = (e) => e.sequence ?? [e.key], r = (e, t) => ({
9
+ key: `material.calculator.keys.${e}`,
10
+ fallback: t
11
+ }), i = (e, t, n, i, a, o, s) => ({
12
+ id: e,
13
+ key: t,
14
+ glyph: n,
15
+ role: i,
16
+ name: r(a, o),
17
+ span: s
18
+ }), a = [
19
+ "zero",
20
+ "one",
21
+ "two",
22
+ "three",
23
+ "four",
24
+ "five",
25
+ "six",
26
+ "seven",
27
+ "eight",
28
+ "nine"
29
+ ], o = (e, t) => i(`d${e}`, String(e), String(e), "digit", a[e] ?? "zero", String(e), t);
30
+ //#endregion
31
+ export { r as a, n as i, t as n, e as o, i as r, o as t };