@nxgt/material 3.100.1 → 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.
Files changed (156) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +32 -2
  3. package/dist/{alert-dialog-DYzxchiS.js → alert-dialog-NFyAiSqc.js} +1 -1
  4. package/dist/{async-slice-drJyPvuM.js → async-slice-D35bX79S.js} +1 -1
  5. package/dist/{bubble-input-CQwVSoU3.js → bubble-input-BxI1WmNs.js} +17 -5
  6. package/dist/{button-GeIsUekU.js → button-Be7GZzF9.js} +2 -2
  7. package/dist/{calculator-BS4PAm6l.js → calculator-BGy1Q7rn.js} +261 -460
  8. package/dist/calculator-field.js +7 -7
  9. package/dist/{calculator-segment-CEdwE24M.js → calculator-segment-uixk6lBg.js} +1 -1
  10. package/dist/calculator.js +1 -1
  11. package/dist/charts.js +3 -3
  12. package/dist/{chip-BdEtFQ85.js → chip-3rWebZEM.js} +2 -2
  13. package/dist/{code-editor-BByXZOGy.js → code-editor-BqSVMfy-.js} +178 -177
  14. package/dist/code-editor.js +5 -5
  15. package/dist/{code-language-items-CSZX5zxD.js → code-language-items-Cf2LJVg2.js} +14 -5
  16. package/dist/components/ui/actions/action-card/action-card-tile.css +47 -0
  17. package/dist/components/ui/display/code/code-moonlight.css +10 -10
  18. package/dist/{components-BrZkSs3O.js → components-D2liJ9Yu.js} +17725 -17287
  19. package/dist/components.js +38 -37
  20. package/dist/{conversion-variant-DTQqAyDt.js → conversion-variant-clFZ6ZMJ.js} +5 -5
  21. package/dist/{currency-field-Dnju7ss2.js → currency-field-CBFEVNM1.js} +24 -23
  22. package/dist/{dialog-5_2__tu8.js → dialog-CrIIINTk.js} +3 -3
  23. package/dist/dnd.js +1 -1
  24. package/dist/{dropdown-menu-FdGC5kIP.js → dropdown-menu-BnfLWu8n.js} +1 -1
  25. package/dist/editor.js +9 -9
  26. package/dist/{empty-state-BoepPG5v.js → empty-state-CuUaCPY7.js} +1 -1
  27. package/dist/{field-blur-DkiZOVNV.js → field-blur-DMJwPLsg.js} +9 -9
  28. package/dist/field-blur-context-3rKussBQ.js +29 -0
  29. package/dist/{financial-variant-BhqJp5C-.js → financial-variant-BY_VCUuk.js} +5 -5
  30. package/dist/{hooks-C8MhL6hs.js → hooks-hHoZbL-4.js} +106 -61
  31. package/dist/hooks.js +6 -6
  32. package/dist/{hover-card-CmHJeBeY.js → hover-card-Do2-uzlF.js} +1 -1
  33. package/dist/i18n.js +3 -3
  34. package/dist/{icon-badge-LGUPQh_c.js → icon-badge-CHaVNEmb.js} +1 -1
  35. package/dist/{icon-button-BSVpO1jP.js → icon-button-BIAubLeJ.js} +1 -1
  36. package/dist/key-layout-D2goCDkD.js +31 -0
  37. package/dist/keypad.js +551 -0
  38. package/dist/label-DR-zZyGQ.js +47 -0
  39. package/dist/lib/components/ui/display/code/code-block-parts.d.ts +1 -1
  40. package/dist/lib/components/ui/display/code/code-block.d.ts +4 -1
  41. package/dist/lib/components/ui/display/code/languages.d.ts +2 -0
  42. package/dist/lib/components/ui/display/code/moonlight-tokens.d.ts +10 -10
  43. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-dialog-props.d.ts +73 -0
  44. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-dialog-rules.d.ts +12 -0
  45. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-dialog.d.ts +5 -61
  46. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-footer.d.ts +12 -0
  47. package/dist/lib/components/ui/feedback/confirm-dialog/confirm-phrase.d.ts +26 -0
  48. package/dist/lib/components/ui/feedback/confirm-dialog/use-confirm-action.d.ts +1 -1
  49. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  50. package/dist/lib/components/ui/layout/index.d.ts +1 -0
  51. package/dist/lib/components/ui/layout/panel-card/index.d.ts +1 -0
  52. package/dist/lib/components/ui/layout/panel-card/panel-card.d.ts +21 -0
  53. package/dist/lib/components/ui/selection/index.d.ts +1 -0
  54. package/dist/lib/components/ui/selection/status-menu/index.d.ts +3 -0
  55. package/dist/lib/components/ui/selection/status-menu/partials/status-confirm.d.ts +12 -0
  56. package/dist/lib/components/ui/selection/status-menu/partials/status-icon.d.ts +6 -0
  57. package/dist/lib/components/ui/selection/status-menu/partials/status-items.d.ts +18 -0
  58. package/dist/lib/components/ui/selection/status-menu/partials/status-menu-list.d.ts +14 -0
  59. package/dist/lib/components/ui/selection/status-menu/partials/status-sheet-row.d.ts +11 -0
  60. package/dist/lib/components/ui/selection/status-menu/partials/status-sheet.d.ts +21 -0
  61. package/dist/lib/components/ui/selection/status-menu/partials/status-trigger.d.ts +18 -0
  62. package/dist/lib/components/ui/selection/status-menu/status-menu-data.d.ts +12 -0
  63. package/dist/lib/components/ui/selection/status-menu/status-menu-form-field.d.ts +20 -0
  64. package/dist/lib/components/ui/selection/status-menu/status-menu.d.ts +13 -0
  65. package/dist/lib/components/ui/selection/status-menu/types.d.ts +76 -0
  66. package/dist/lib/components/ui/selection/status-menu/use-status-change.d.ts +18 -0
  67. package/dist/lib/components/ui/selection/status-menu/use-status-menu.d.ts +30 -0
  68. package/dist/lib/components/ui/widgets/calculator/partials/calculator-keypad.d.ts +1 -5
  69. package/dist/lib/components/ui/widgets/calculator/variants/key-layout.d.ts +3 -49
  70. package/dist/lib/components/ui/widgets/keypad/cash-model.d.ts +16 -0
  71. package/dist/lib/components/ui/widgets/keypad/index.d.ts +5 -0
  72. package/dist/lib/components/ui/widgets/keypad/key-layout.d.ts +56 -0
  73. package/dist/lib/components/ui/widgets/keypad/keypad-binding.d.ts +32 -0
  74. package/dist/lib/components/ui/widgets/keypad/keypad-cash.d.ts +28 -0
  75. package/dist/lib/components/ui/widgets/keypad/keypad-display.d.ts +11 -0
  76. package/dist/lib/components/ui/widgets/keypad/keypad-entry.d.ts +39 -0
  77. package/dist/lib/components/ui/widgets/keypad/keypad-grid.d.ts +27 -0
  78. package/dist/lib/components/ui/widgets/{calculator/partials/calculator-key.d.ts → keypad/keypad-key.d.ts} +6 -3
  79. package/dist/lib/components/ui/widgets/keypad/keypad-layout.d.ts +19 -0
  80. package/dist/lib/components/ui/widgets/{calculator/partials → keypad}/keypad-navigation.d.ts +1 -1
  81. package/dist/lib/components/ui/widgets/keypad/keypad.d.ts +9 -0
  82. package/dist/lib/components/ui/widgets/keypad/keypad.types.d.ts +91 -0
  83. package/dist/lib/components/ui/widgets/keypad/use-keypad-cash.d.ts +14 -0
  84. package/dist/lib/components/ui/widgets/keypad/use-keypad-keyboard.d.ts +7 -0
  85. package/dist/lib/components/ui/widgets/keypad/use-keypad-number.d.ts +10 -0
  86. package/dist/lib/components/ui/widgets/keypad/use-keypad-quantity.d.ts +16 -0
  87. package/dist/lib/components/ui/widgets/keypad/use-keypad-value.d.ts +17 -0
  88. package/dist/lib/components/ui/widgets/keypad/use-keypad.d.ts +23 -0
  89. package/dist/lib/hooks/index.d.ts +2 -0
  90. package/dist/lib/hooks/use-barcode-scanner.d.ts +39 -0
  91. package/dist/lib/hooks/use-latched.d.ts +18 -0
  92. package/dist/lib/i18n/resources/en/en.d.ts +25 -0
  93. package/dist/lib/i18n/resources/en/material.json.d.ts +26 -1
  94. package/dist/lib/i18n/resources/fr/fr.d.ts +25 -0
  95. package/dist/lib/i18n/resources/fr/material.json.d.ts +26 -1
  96. package/dist/lib/i18n/resources/resources.d.ts +50 -0
  97. package/dist/lib/i18n/translator.d.ts +1 -1
  98. package/dist/lib/keypad/index.d.ts +20 -0
  99. package/dist/lib.js +1 -1
  100. package/dist/main.js +54 -53
  101. package/dist/map.js +9 -9
  102. package/dist/material.css +1 -1
  103. package/dist/pdf-reader.js +1 -1
  104. package/dist/{percent-field-DGlU_xii.js → percent-field-DU8eIMD3.js} +15 -14
  105. package/dist/{picker-surface-CGhqNR8a.js → picker-surface-XmA--JVI.js} +4 -4
  106. package/dist/{popover-ZxL7ktKk.js → popover-D8iHiAbl.js} +1 -1
  107. package/dist/{pos-types-BQ0QpYMp.js → pos-types-BEAY27Rm.js} +1 -1
  108. package/dist/{pos-variant-CKy8h_5i.js → pos-variant-ClGI92Lt.js} +25 -25
  109. package/dist/print.js +1 -1
  110. package/dist/{programmer-variant-CbHstE28.js → programmer-variant-Boq2O8hB.js} +30 -30
  111. package/dist/{public-D-tdOz4b.js → public-DOrXKmcL.js} +9 -9
  112. package/dist/{rich-code-block-CTPj1LuD.js → rich-code-block-Djj2XE_u.js} +18 -18
  113. package/dist/{scientific-variant-B8U9h3II.js → scientific-variant-BzF_aMQP.js} +8 -8
  114. package/dist/{sortable-provider-CSoWE7Ce.js → sortable-provider-DCZjsIIH.js} +2 -2
  115. package/dist/{spinner-ffuwBXHl.js → spinner-Cg0y_E_K.js} +1 -1
  116. package/dist/standard-layout-DTr9yy8Z.js +48 -0
  117. package/dist/{tabs-JgRq6ZJx.js → tabs-DpessV5s.js} +1 -1
  118. package/dist/{text-field-DURkIP-v.js → text-field-Dxk9lAKM.js} +16 -15
  119. package/dist/theme-picker.js +13 -13
  120. package/dist/{theme-toggle-n_Zg7JAA.js → theme-toggle-B6Jl5Kfn.js} +1 -1
  121. package/dist/{toolbar-items-IANZdcw4.js → toolbar-items-Cs1XrZsH.js} +4 -4
  122. package/dist/{translate-material-CMHUH5Ha.js → translate-material-Du0j0t97.js} +1 -1
  123. package/dist/{translator-9zA-Um3W.js → translator-BVs4n0Fz.js} +52 -2
  124. package/dist/use-calculator-keyboard-BZ1CA4Ut.js +222 -0
  125. package/dist/{use-chat-composer-BoIN7RCA.js → use-chat-composer-B4m3OEm1.js} +241 -240
  126. package/dist/{use-heading-spy-8o20PEZH.js → use-heading-spy-CO3_AtY9.js} +240 -142
  127. package/dist/{use-material-translation-CLNaMhUf.js → use-material-translation-uNc1FyC8.js} +1 -1
  128. package/dist/{use-return-focus-DWhbTGVe.js → use-return-focus-AfLRrUm-.js} +1 -1
  129. package/docs/README.md +1 -0
  130. package/docs/components/README.md +1 -0
  131. package/docs/components/buttons-and-actions.md +34 -2
  132. package/docs/components/data-display.md +4 -1
  133. package/docs/components/feedback-and-status.md +34 -0
  134. package/docs/components/navigation-and-layout.md +28 -0
  135. package/docs/components/rich-widgets.md +28 -0
  136. package/docs/components/selection-and-choice.md +120 -0
  137. package/docs/guides/calculator.md +1 -1
  138. package/docs/guides/cards-and-tiles.md +21 -24
  139. package/docs/guides/forms.md +1 -0
  140. package/docs/guides/helpers.md +78 -0
  141. package/docs/guides/keypad.md +225 -0
  142. package/docs/previews/data-display-codeblock.webp +0 -0
  143. package/docs/previews/data-display-codegroup.webp +0 -0
  144. package/docs/previews/data-display-jsonviewer.webp +0 -0
  145. package/docs/previews/navigation-layout-panelcard.webp +0 -0
  146. package/docs/previews/rich-widgets-keypad.webp +0 -0
  147. package/docs/previews/selection-choice-statusmenu.webp +0 -0
  148. package/docs/roadmap.md +21 -0
  149. package/docs/troubleshooting.md +63 -0
  150. package/lib/components/ui/actions/action-card/action-card-tile.css +47 -0
  151. package/lib/components/ui/display/code/code-moonlight.css +10 -10
  152. package/lib/components/ui/widgets/calculator/calculator.css +87 -0
  153. package/package.json +7 -2
  154. package/dist/field-blur-context-BLGgf_3z.js +0 -73
  155. package/dist/key-layout-cR79xfGE.js +0 -38
  156. 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-8o20PEZH.js";
1
+ import { i as e } from "./translate-material-Du0j0t97.js";
2
+ import { n as t } from "./use-heading-spy-CO3_AtY9.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, i as l, m as u, o as d, r as f, s as p, t as m } from "./use-heading-spy-8o20PEZH.js";
5
- import { r as h } from "./use-csp-nonce-ZKs9k-ov.js";
6
- import { t as g } from "./use-mobile-BDro060N.js";
7
- import { t as _ } from "./use-scroll-away-PQRFZkT2.js";
8
- import { _ as v, a as y, c as b, d as x, f as S, g as C, h as w, i as T, l as E, m as D, n as O, o as k, p as A, r as j, s as M, t as N, u as P, v as F } from "./hooks-C8MhL6hs.js";
9
- export { i as DEFAULT_THEME, n as applyResolvedTheme, t as applyThemeName, M as buildOptions, l as busySettler, D as clearDrafts, c as createSubmitGuard, b as extractNode, v as isLeaving, r as resolveTheme, a as resolveThemeName, F as shouldBlockNavigation, k as startPoll, C as useAllowedTransitions, f as useCountdown, h as useCspNonce, O as useDiscardGuard, w as useDrafts, p as useFocusOnMount, A as useFormatters, m as useHeadingSpy, o as useIsClient, g as useIsMobile, u as useLocalizedDate, x as useNavigationHandler, S as useNavigationHandlers, P as useNumberFormatter, E as useOptions, y as usePoll, T as useReactRouterBlock, _ as useScrollAway, j as useSearchParam, e as useSsrMediaQuery, d as useSubmitOnce, s as useTheme, N as useUnsavedGuard };
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-CO3_AtY9.js";
5
+ import { r as _ } from "./use-csp-nonce-ZKs9k-ov.js";
6
+ import { t as v } from "./use-mobile-BDro060N.js";
7
+ import { t as y } from "./use-scroll-away-PQRFZkT2.js";
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-hHoZbL-4.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-Cg0y_E_K.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-BVs4n0Fz.js";
3
+ import { i as u, n as d, r as f, t as p } from "./translate-material-Du0j0t97.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-uNc1FyC8.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-BIAubLeJ.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-Cg0y_E_K.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 };