@nxgt/material 3.75.0 → 3.76.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 (239) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +37 -1
  3. package/dist/{alert-dialog-BfO_ri-N.js → alert-dialog-653apk3f.js} +8 -7
  4. package/dist/{async-slice-roMAJVzG.js → async-slice-CXLbQuOc.js} +1 -1
  5. package/dist/{bubble-input-B7BVd9fX.js → bubble-input-CQwVSoU3.js} +30 -29
  6. package/dist/{button-DgenqmpS.js → button-3op3rtZh.js} +5 -4
  7. package/dist/calculator-BaSMe0SK.js +1189 -0
  8. package/dist/calculator-announce-DRd2c6Dq.js +89 -0
  9. package/dist/calculator-context-BugcKuVG.js +10 -0
  10. package/dist/calculator-field.js +172 -0
  11. package/dist/calculator-panel-announce-AZSnZUSr.js +29 -0
  12. package/dist/calculator-segment-BlJE1LaS.js +22 -0
  13. package/dist/calculator.js +2 -0
  14. package/dist/charts.js +3 -3
  15. package/dist/{chip-CiDczNxO.js → chip-MuKDwtkG.js} +2 -2
  16. package/dist/{code-editor-CohlhFsA.js → code-editor-Bp2RrdNx.js} +13 -13
  17. package/dist/code-editor.js +37 -37
  18. package/dist/{code-language-items-Cs8GLYDp.js → code-language-items-B7WR5ua_.js} +19 -24
  19. package/dist/components/base-content.css +9 -4
  20. package/dist/components/ui/collections/server-table/server-table-phone-row.css +10 -3
  21. package/dist/{components-zJdfH4im.js → components-Ci3Zo8kC.js} +15837 -17245
  22. package/dist/components.js +37 -28
  23. package/dist/conversion-variant-BDFAxqe9.js +529 -0
  24. package/dist/copy-to-clipboard-Be5Ffvs_.js +7 -0
  25. package/dist/currency-B-r3ig11.js +16 -0
  26. package/dist/currency-field-BJ9rSrif.js +285 -0
  27. package/dist/{number.utils-BG_eEt5g.js → date.utils-DUvqcjan.js} +1 -7
  28. package/dist/dialog-Bm5LvVlB.js +166 -0
  29. package/dist/dist-BZe2evxL.js +139 -0
  30. package/dist/dist-CxhKjOYm.js +28 -0
  31. package/dist/dist-DHdUUM1w.js +241 -0
  32. package/dist/{dist-C4wtXCjf.js → dist-DOK3zo5C.js} +33 -32
  33. package/dist/dist-DWZXlCZR.js +182 -0
  34. package/dist/dist-DkQbkF9T.js +33 -0
  35. package/dist/dnd.js +1 -1
  36. package/dist/{dropdown-menu-CzR6JP31.js → dropdown-menu-xlZ6NYUA.js} +160 -159
  37. package/dist/editor.js +299 -298
  38. package/dist/{empty-state-DjHGMp5F.js → empty-state-C0kviQdW.js} +2 -2
  39. package/dist/{field-blur-CdASxjL7.js → field-blur-DkiZOVNV.js} +178 -180
  40. package/dist/{field-blur-context-kZ4SD7xu.js → field-blur-context-BLGgf_3z.js} +2 -2
  41. package/dist/financial-variant-BsZEa5sF.js +459 -0
  42. package/dist/{hooks-Dqq8O3Az.js → hooks-Dg94jPRq.js} +12 -12
  43. package/dist/hooks.js +2 -2
  44. package/dist/{hover-card-BPKqte4a.js → hover-card-B1g55Hi6.js} +44 -43
  45. package/dist/i18n.js +3 -3
  46. package/dist/icon-badge-BcW66bRk.js +17 -0
  47. package/dist/{icon-button-Cr-DyDGg.js → icon-button-Cogxy1cy.js} +5 -4
  48. package/dist/{in-dialog-Vwkyp-M5.js → in-dialog-D61Yeaol.js} +2 -1
  49. package/dist/input-CC2joTjB.js +56 -0
  50. package/dist/key-layout-cR79xfGE.js +38 -0
  51. package/dist/lib/calculator/index.d.ts +16 -0
  52. package/dist/lib/calculator-field/index.d.ts +12 -0
  53. package/dist/lib/components/ui/collections/filter/use-filter-field-config.d.ts +2 -2
  54. package/dist/lib/components/ui/feedback/moment/moment-body.d.ts +17 -2
  55. package/dist/lib/components/ui/feedback/moment/moment-passive.d.ts +13 -0
  56. package/dist/lib/components/ui/feedback/moment/moment.d.ts +16 -2
  57. package/dist/lib/components/ui/fields/calculator-field/apply-calculated.d.ts +17 -0
  58. package/dist/lib/components/ui/fields/calculator-field/calculator-field-content.d.ts +16 -0
  59. package/dist/lib/components/ui/fields/calculator-field/calculator-field-trigger.d.ts +4 -0
  60. package/dist/lib/components/ui/fields/calculator-field/calculator-field.d.ts +12 -0
  61. package/dist/lib/components/ui/fields/calculator-field/calculator-field.types.d.ts +31 -0
  62. package/dist/lib/components/ui/fields/calculator-field/calculator-form-field.d.ts +4 -0
  63. package/dist/lib/components/ui/fields/calculator-field/index.d.ts +3 -0
  64. package/dist/lib/components/ui/fields/calculator-field/use-calculator-field.d.ts +15 -0
  65. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  66. package/dist/lib/components/ui/fields/currency-field/currency-field.d.ts +7 -1
  67. package/dist/lib/components/ui/layout/app-shell/app-sidebar-context.d.ts +4 -0
  68. package/dist/lib/components/ui/widgets/calculator/calculator-announce.d.ts +27 -0
  69. package/dist/lib/components/ui/widgets/calculator/calculator-clipboard.d.ts +19 -0
  70. package/dist/lib/components/ui/widgets/calculator/calculator-context.d.ts +49 -0
  71. package/dist/lib/components/ui/widgets/calculator/calculator-feedback.d.ts +18 -0
  72. package/dist/lib/components/ui/widgets/calculator/calculator-keyboard.d.ts +30 -0
  73. package/dist/lib/components/ui/widgets/calculator/calculator-storage.d.ts +17 -0
  74. package/dist/lib/components/ui/widgets/calculator/calculator-variant-steps.d.ts +16 -0
  75. package/dist/lib/components/ui/widgets/calculator/calculator.d.ts +11 -0
  76. package/dist/lib/components/ui/widgets/calculator/calculator.selectors.d.ts +23 -0
  77. package/dist/lib/components/ui/widgets/calculator/calculator.slice.d.ts +1881 -0
  78. package/dist/lib/components/ui/widgets/calculator/currency.d.ts +9 -0
  79. package/dist/lib/components/ui/widgets/calculator/engine.d.ts +22 -0
  80. package/dist/lib/components/ui/widgets/calculator/index.d.ts +3 -0
  81. package/dist/lib/components/ui/widgets/calculator/partials/calculator-announcer.d.ts +2 -0
  82. package/dist/lib/components/ui/widgets/calculator/partials/calculator-display.d.ts +3 -0
  83. package/dist/lib/components/ui/widgets/calculator/partials/calculator-key.d.ts +17 -0
  84. package/dist/lib/components/ui/widgets/calculator/partials/calculator-keypad.d.ts +8 -0
  85. package/dist/lib/components/ui/widgets/calculator/partials/calculator-loading.d.ts +6 -0
  86. package/dist/lib/components/ui/widgets/calculator/partials/calculator-memory.d.ts +2 -0
  87. package/dist/lib/components/ui/widgets/calculator/partials/calculator-panel-announce.d.ts +10 -0
  88. package/dist/lib/components/ui/widgets/calculator/partials/calculator-panel-body.d.ts +9 -0
  89. package/dist/lib/components/ui/widgets/calculator/partials/calculator-screen.d.ts +4 -0
  90. package/dist/lib/components/ui/widgets/calculator/partials/calculator-segment.d.ts +21 -0
  91. package/dist/lib/components/ui/widgets/calculator/partials/calculator-shell.d.ts +9 -0
  92. package/dist/lib/components/ui/widgets/calculator/partials/calculator-switcher.d.ts +5 -0
  93. package/dist/lib/components/ui/widgets/calculator/partials/calculator-tape.d.ts +4 -0
  94. package/dist/lib/components/ui/widgets/calculator/partials/calculator-tools.d.ts +4 -0
  95. package/dist/lib/components/ui/widgets/calculator/partials/keypad-navigation.d.ts +24 -0
  96. package/dist/lib/components/ui/widgets/calculator/types.d.ts +102 -0
  97. package/dist/lib/components/ui/widgets/calculator/use-calculator-clipboard.d.ts +19 -0
  98. package/dist/lib/components/ui/widgets/calculator/use-calculator-conversion.d.ts +4 -0
  99. package/dist/lib/components/ui/widgets/calculator/use-calculator-feedback.d.ts +3 -0
  100. package/dist/lib/components/ui/widgets/calculator/use-calculator-keyboard.d.ts +22 -0
  101. package/dist/lib/components/ui/widgets/calculator/use-calculator-persistence.d.ts +14 -0
  102. package/dist/lib/components/ui/widgets/calculator/use-calculator-pos.d.ts +25 -0
  103. package/dist/lib/components/ui/widgets/calculator/use-calculator-press.d.ts +26 -0
  104. package/dist/lib/components/ui/widgets/calculator/use-calculator-tape.d.ts +29 -0
  105. package/dist/lib/components/ui/widgets/calculator/use-calculator-value.d.ts +9 -0
  106. package/dist/lib/components/ui/widgets/calculator/use-calculator-variant.d.ts +23 -0
  107. package/dist/lib/components/ui/widgets/calculator/use-calculator.d.ts +10 -0
  108. package/dist/lib/components/ui/widgets/calculator/use-engine-settings.d.ts +10 -0
  109. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-fields.d.ts +19 -0
  110. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-labels.d.ts +17 -0
  111. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-math.d.ts +31 -0
  112. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-names.d.ts +4 -0
  113. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-panel.d.ts +7 -0
  114. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-rates.d.ts +29 -0
  115. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-result.d.ts +15 -0
  116. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-state.d.ts +36 -0
  117. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-variant.d.ts +3 -0
  118. package/dist/lib/components/ui/widgets/calculator/variants/conversion/use-conversion.d.ts +24 -0
  119. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-change.d.ts +4 -0
  120. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-figures.d.ts +43 -0
  121. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-format.d.ts +12 -0
  122. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-loan-math.d.ts +14 -0
  123. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-loan.d.ts +4 -0
  124. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-margin.d.ts +4 -0
  125. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-math.d.ts +10 -0
  126. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-panel.d.ts +7 -0
  127. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-parts.d.ts +35 -0
  128. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-table.d.ts +7 -0
  129. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-variant.d.ts +3 -0
  130. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-vat.d.ts +4 -0
  131. package/dist/lib/components/ui/widgets/calculator/variants/key-layout.d.ts +51 -0
  132. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-announce.d.ts +16 -0
  133. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-aside.d.ts +2 -0
  134. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-display.d.ts +2 -0
  135. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-fields.d.ts +2 -0
  136. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-layout.d.ts +9 -0
  137. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-line.d.ts +6 -0
  138. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-names.d.ts +2 -0
  139. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-state.d.ts +3 -0
  140. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-tender.d.ts +2 -0
  141. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-ticket-data.d.ts +41 -0
  142. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-ticket.d.ts +5 -0
  143. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-totals.d.ts +2 -0
  144. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-types.d.ts +76 -0
  145. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-variant.d.ts +3 -0
  146. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-vat.d.ts +2 -0
  147. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-view.d.ts +28 -0
  148. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-announce.d.ts +19 -0
  149. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-base.d.ts +11 -0
  150. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-bitpad.d.ts +14 -0
  151. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-display.d.ts +9 -0
  152. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-layout.d.ts +6 -0
  153. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-names.d.ts +2 -0
  154. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-readouts.d.ts +14 -0
  155. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-reduce.d.ts +29 -0
  156. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-state.d.ts +22 -0
  157. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-toolbar.d.ts +5 -0
  158. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-variant.d.ts +3 -0
  159. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-word.d.ts +15 -0
  160. package/dist/lib/components/ui/widgets/calculator/variants/registry.d.ts +21 -0
  161. package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-layout.d.ts +3 -0
  162. package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-names.d.ts +2 -0
  163. package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-toolbar.d.ts +2 -0
  164. package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-variant.d.ts +3 -0
  165. package/dist/lib/components/ui/widgets/calculator/variants/standard/standard-layout.d.ts +3 -0
  166. package/dist/lib/components/ui/widgets/calculator/variants/variant-loader.d.ts +34 -0
  167. package/dist/lib/components/ui/widgets/calculator/variants/variant-logic.d.ts +40 -0
  168. package/dist/lib/components/ui/widgets/calculator/variants/variant-types.d.ts +62 -0
  169. package/dist/lib/i18n/resources/en/en.d.ts +412 -0
  170. package/dist/lib/i18n/resources/en/material.json.d.ts +412 -0
  171. package/dist/lib/i18n/resources/fr/fr.d.ts +412 -0
  172. package/dist/lib/i18n/resources/fr/material.json.d.ts +412 -0
  173. package/dist/lib/i18n/resources/resources.d.ts +824 -0
  174. package/dist/lib/i18n/translator.d.ts +1 -1
  175. package/dist/lib.js +4 -3
  176. package/dist/main.js +50 -40
  177. package/dist/map.js +66 -65
  178. package/dist/material.css +1 -1
  179. package/dist/native-select-w_FlBLHV.js +40 -0
  180. package/dist/number.utils-CSueQZcv.js +7 -0
  181. package/dist/pdf-reader.js +1 -1
  182. package/dist/percent-field-lahyDJDG.js +14 -0
  183. package/dist/picker-surface-CV09H7Nb.js +1220 -0
  184. package/dist/popover-Cd7DkND4.js +233 -0
  185. package/dist/pos-types-DKCkOTYy.js +49 -0
  186. package/dist/pos-variant-GrUfbTTP.js +603 -0
  187. package/dist/print.js +1 -1
  188. package/dist/programmer-variant-eKJNKENL.js +501 -0
  189. package/dist/programmer-word-CNCF7DJF.js +15 -0
  190. package/dist/{public-DC9VQw4Z.js → public-y6g4ddxd.js} +895 -892
  191. package/dist/{rich-code-block-DBSL9zEN.js → rich-code-block-CRQ0iyLb.js} +5 -5
  192. package/dist/scientific-variant-2y3UxAAU.js +149 -0
  193. package/dist/{sortable-provider-C4tk5esY.js → sortable-provider-DdiI3Fwk.js} +2 -2
  194. package/dist/{spinner-B2MubVWb.js → spinner-C1QIewWv.js} +133 -159
  195. package/dist/standard-layout-BuSRr3TY.js +40 -0
  196. package/dist/tabs-DzEqMb1W.js +383 -0
  197. package/dist/{icon-badge-B9uvDoyY.js → text-field-BAdY-kpO.js} +20 -34
  198. package/dist/theme-picker.js +3 -3
  199. package/dist/{theme-toggle-BInlu21G.js → theme-toggle-C_VeiiCm.js} +2 -2
  200. package/dist/toggle-FeCCJqbg.js +40 -0
  201. package/dist/{toggle-group-DXXlqid2.js → toggle-group-CVMxEpWi.js} +1 -1
  202. package/dist/{toolbar-items-CRJSx1MU.js → toolbar-items-D310xDuM.js} +333 -554
  203. package/dist/{translate-material-pVlPJ1v4.js → translate-material-BypJJ1l5.js} +1 -1
  204. package/dist/{translator-BoYCward.js → translator-DJkf4J7t.js} +824 -0
  205. package/dist/{typography-B6YMbCge.js → typography-CYEquVeb.js} +1 -1
  206. package/dist/{use-chat-composer-BvWQogJe.js → use-chat-composer-DMXu9E1O.js} +4198 -4600
  207. package/dist/{use-heading-spy-B_Z4ArDh.js → use-heading-spy-DJR8YYm6.js} +19 -19
  208. package/dist/{use-material-translation-CIS2n3RB.js → use-material-translation-CD6QoVal.js} +1 -1
  209. package/dist/{use-return-focus-DNQtADAR.js → use-return-focus-Cevw_6yq.js} +106 -105
  210. package/dist/useLatest-C2PnQEeD.js +8 -0
  211. package/docs/README.md +1 -0
  212. package/docs/components/feedback-and-status.md +10 -1
  213. package/docs/components/form-fields.md +1 -0
  214. package/docs/components/rich-widgets.md +108 -0
  215. package/docs/getting-started.md +1 -0
  216. package/docs/guides/calculator.md +468 -0
  217. package/docs/guides/forms.md +4 -2
  218. package/docs/guides/i18n.md +5 -0
  219. package/docs/previews/rich-widgets-calculator-conversion.webp +0 -0
  220. package/docs/previews/rich-widgets-calculator-point-of-sale.webp +0 -0
  221. package/docs/previews/rich-widgets-calculator.webp +0 -0
  222. package/docs/roadmap.md +9 -3
  223. package/docs/troubleshooting.md +134 -0
  224. package/lib/components/base-content.css +9 -4
  225. package/lib/components/ui/collections/server-table/server-table-phone-row.css +10 -3
  226. package/lib/components/ui/widgets/calculator/calculator-bands.css +146 -0
  227. package/lib/components/ui/widgets/calculator/calculator-display.css +83 -0
  228. package/lib/components/ui/widgets/calculator/calculator-keys.css +118 -0
  229. package/lib/components/ui/widgets/calculator/calculator-pos-ticket.css +185 -0
  230. package/lib/components/ui/widgets/calculator/calculator-pos.css +38 -0
  231. package/lib/components/ui/widgets/calculator/calculator-tape.css +71 -0
  232. package/lib/components/ui/widgets/calculator/calculator.css +97 -0
  233. package/lib/components/ui/widgets/calculator/variants/conversion/conversion.css +98 -0
  234. package/lib/components/ui/widgets/calculator/variants/financial/financial.css +162 -0
  235. package/lib/components/ui/widgets/calculator/variants/programmer/programmer.css +162 -0
  236. package/package.json +17 -3
  237. package/dist/dialog-AGsB3bv4.js +0 -219
  238. package/dist/dist-B7RjY7SL.js +0 -158
  239. package/dist/dist-lmHmz_bu.js +0 -419
@@ -0,0 +1,162 @@
1
+ /* The Programmer variant: the four-base readouts, the word controls and the
2
+ * bit pad. Widths are container queries on `.nxgt-calc`; no inline style. */
3
+ .nxgt-prog-toolbar {
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: 0.5rem;
7
+ }
8
+ .nxgt-prog-bases {
9
+ display: grid;
10
+ gap: 2px;
11
+ min-width: 0;
12
+ margin: 0;
13
+ padding: 0;
14
+ border: 0;
15
+ }
16
+ .nxgt-prog-base {
17
+ position: relative;
18
+ display: flex;
19
+ align-items: center;
20
+ gap: 0.75rem;
21
+ min-height: 2.75rem;
22
+ padding: 0.25rem 0.875rem;
23
+ border-radius: 0.875rem;
24
+ background: var(--muted);
25
+ cursor: pointer;
26
+ }
27
+ .nxgt-prog-base:has(:checked) {
28
+ background: var(--secondary-container);
29
+ }
30
+ .nxgt-prog-base:has(:checked)::before {
31
+ content: "";
32
+ position: absolute;
33
+ inset-block: 0.5rem;
34
+ inset-inline-start: 0.25rem;
35
+ inline-size: 0.1875rem;
36
+ border-radius: 9999px;
37
+ background: var(--primary);
38
+ }
39
+ .nxgt-prog-base:has(:focus-visible) {
40
+ outline: 2px solid var(--ring);
41
+ outline-offset: 2px;
42
+ }
43
+ .nxgt-prog-base-name {
44
+ flex: none;
45
+ inline-size: 2.25rem;
46
+ font-size: 0.75rem;
47
+ font-weight: 600;
48
+ letter-spacing: 0.04em;
49
+ color: var(--muted-foreground);
50
+ }
51
+ .nxgt-prog-base-value {
52
+ flex: 1 1 auto;
53
+ min-width: 0;
54
+ font-size: 0.9375rem;
55
+ font-variant-numeric: tabular-nums;
56
+ overflow-wrap: anywhere;
57
+ text-align: end;
58
+ }
59
+ .nxgt-prog-bits-toggle {
60
+ min-height: 2.75rem;
61
+ padding-inline: 1rem;
62
+ border: 0;
63
+ border-radius: 9999px;
64
+ background: var(--muted);
65
+ color: var(--foreground);
66
+ font: inherit;
67
+ font-size: 0.875rem;
68
+ cursor: pointer;
69
+ }
70
+ .nxgt-prog-bits-toggle[aria-expanded="true"] {
71
+ background: var(--secondary-container);
72
+ }
73
+ .nxgt-prog-bits-toggle:focus-visible,
74
+ .nxgt-prog-bit:focus-visible {
75
+ outline: 2px solid var(--ring);
76
+ outline-offset: 2px;
77
+ }
78
+ .nxgt-prog-bitpad {
79
+ display: flex;
80
+ flex-direction: column;
81
+ align-items: flex-start;
82
+ gap: 0.5rem;
83
+ }
84
+ .nxgt-prog-bits {
85
+ display: grid;
86
+ grid-template-columns: minmax(0, 1fr);
87
+ gap: 0.5rem;
88
+ justify-items: center;
89
+ inline-size: 100%;
90
+ }
91
+ .nxgt-prog-bits[hidden] {
92
+ display: none;
93
+ }
94
+ .nxgt-prog-nibble {
95
+ display: grid;
96
+ grid-template-columns: repeat(4, 2.75rem);
97
+ gap: 2px;
98
+ }
99
+ .nxgt-prog-bit {
100
+ display: flex;
101
+ flex-direction: column;
102
+ align-items: center;
103
+ justify-content: center;
104
+ min-width: 2.75rem;
105
+ min-height: 2.75rem;
106
+ padding: 0;
107
+ border: 0;
108
+ border-radius: 0.75rem;
109
+ background: var(--muted);
110
+ color: var(--foreground);
111
+ font: inherit;
112
+ font-variant-numeric: tabular-nums;
113
+ line-height: 1.1;
114
+ cursor: pointer;
115
+ }
116
+ .nxgt-prog-bit small {
117
+ font-size: 0.625rem;
118
+ opacity: 0.7;
119
+ }
120
+ .nxgt-prog-bit[aria-pressed="true"] {
121
+ background: var(--primary);
122
+ color: var(--primary-foreground);
123
+ }
124
+ /* A digit the base does not have: kept in the tab order, drawn faint. */
125
+ .nxgt-calc-key[aria-disabled="true"] {
126
+ opacity: 0.38;
127
+ cursor: not-allowed;
128
+ filter: none;
129
+ }
130
+ .nxgt-calc-key[aria-disabled="true"]:active {
131
+ transform: none;
132
+ border-radius: inherit;
133
+ }
134
+ /* The pad while the expression does not calculate. */
135
+ .nxgt-prog-bit[aria-disabled="true"] {
136
+ opacity: 0.38;
137
+ cursor: not-allowed;
138
+ }
139
+ /* Two nibbles a row from 400, four from 760. */
140
+ @container nxgt-calc (min-width: 400px) {
141
+ .nxgt-prog-bits {
142
+ grid-template-columns: repeat(2, minmax(0, max-content));
143
+ justify-content: center;
144
+ }
145
+ }
146
+ @container nxgt-calc (min-width: 760px) {
147
+ .nxgt-prog-bits {
148
+ grid-template-columns: repeat(4, minmax(0, max-content));
149
+ }
150
+ }
151
+ @media (forced-colors: active) {
152
+ .nxgt-prog-base:has(:checked),
153
+ .nxgt-prog-bit[aria-pressed="true"] {
154
+ background: Highlight;
155
+ color: HighlightText;
156
+ }
157
+ .nxgt-prog-base,
158
+ .nxgt-prog-bit,
159
+ .nxgt-prog-bits-toggle {
160
+ border: 1px solid ButtonText;
161
+ }
162
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material",
3
- "version": "3.75.0",
3
+ "version": "3.76.0",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"
@@ -80,6 +80,16 @@
80
80
  "types": "./dist/lib/barcode/index.d.ts",
81
81
  "require": "./dist/barcode.js"
82
82
  },
83
+ "./calculator": {
84
+ "import": "./dist/calculator.js",
85
+ "types": "./dist/lib/calculator/index.d.ts",
86
+ "require": "./dist/calculator.js"
87
+ },
88
+ "./calculator-field": {
89
+ "import": "./dist/calculator-field.js",
90
+ "types": "./dist/lib/calculator-field/index.d.ts",
91
+ "require": "./dist/calculator-field.js"
92
+ },
83
93
  "./draw/animate": {
84
94
  "import": "./dist/draw-animate.js",
85
95
  "types": "./dist/lib/draw-animate/index.d.ts",
@@ -211,6 +221,10 @@
211
221
  "style": "./lib/map/map.css",
212
222
  "default": "./lib/map/map.css"
213
223
  },
224
+ "./calculator.css": {
225
+ "style": "./lib/components/ui/widgets/calculator/calculator.css",
226
+ "default": "./lib/components/ui/widgets/calculator/calculator.css"
227
+ },
214
228
  "./galleries.css": {
215
229
  "style": "./lib/galleries/galleries.css",
216
230
  "default": "./lib/galleries/galleries.css"
@@ -376,7 +390,7 @@
376
390
  "docs:previews": "rm -rf node_modules/.cache/nxgt-preview-free/missing && NXGT_PREVIEW_FREE=1 vitest run --project previews && bun .storybook/preview-free-report.ts"
377
391
  },
378
392
  "dependencies": {
379
- "@nxgt/material-core": "^0.48.0",
393
+ "@nxgt/material-core": "^0.49.0",
380
394
  "@base-ui/react": "^1.6.0",
381
395
  "@dnd-kit/core": "^6.3.1",
382
396
  "@dnd-kit/sortable": "^10.0.0",
@@ -463,7 +477,7 @@
463
477
  "@fontsource-variable/inter": "^5",
464
478
  "@fortawesome/fontawesome-free": "7.3.1",
465
479
  "@nxgt/material-testing": "0.0.0",
466
- "@nxgt/playwright": "^0.11.0",
480
+ "@nxgt/playwright": "^0.12.0",
467
481
  "@react-leaflet/core": "^3.0.0",
468
482
  "@react-pdf/renderer": "^4.9.0",
469
483
  "@storybook/addon-a11y": "10.6.0",
@@ -1,219 +0,0 @@
1
- import { t as e } from "./utils-BLfntITJ.js";
2
- import { n as t } from "./spinner-B2MubVWb.js";
3
- import { r as n, t as r } from "./in-dialog-Vwkyp-M5.js";
4
- import { a as i, c as a, i as o, l as s, n as c, o as l, r as u, s as d, t as f, u as p } from "./use-return-focus-DNQtADAR.js";
5
- import { t as m } from "./use-material-translation-CIS2n3RB.js";
6
- import { n as h } from "./icon-button-Cr-DyDGg.js";
7
- import { i as g } from "./escape-owner-DpaP0lm1.js";
8
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
9
- import { X as y } from "lucide-react";
10
- //#region lib/components/ui/primitives/field-box/field-box.ts
11
- var b = "nxgt-field-box", x = "nxgt-field-list", S = (e) => e ? "" : void 0;
12
- function C(e) {
13
- return {
14
- "data-size": e.size,
15
- "data-filled": S(e.filled),
16
- "data-open": S(e.list?.open),
17
- "data-list-side": e.list?.open ? e.list.side : void 0,
18
- "data-focused": S(e.focused),
19
- "data-invalid": S(e.invalid),
20
- "data-disabled": S(e.disabled),
21
- "data-readonly": S(e.readOnly)
22
- };
23
- }
24
- var w = /* @__PURE__ */ new Set([
25
- "checkbox",
26
- "radio",
27
- "file",
28
- "range",
29
- "color",
30
- "hidden",
31
- "button",
32
- "submit",
33
- "reset",
34
- "image"
35
- ]);
36
- function T(e, t = "text") {
37
- return e || (w.has(t) ? void 0 : " ");
38
- }
39
- //#endregion
40
- //#region lib/components/ui/primitives/input/input-box.ts
41
- var E = "selection:bg-primary selection:text-primary-foreground", D = [
42
- "inline-flex gap-2 items-center h-11 max-h-full w-full min-w-0",
43
- "px-2 py-1 text-base md:text-sm outline-none",
44
- "placeholder:text-muted-foreground",
45
- "file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-muted-foreground",
46
- "disabled:pointer-events-none"
47
- ], O = [
48
- ...D,
49
- E,
50
- b
51
- ], k = [...D, b], A = O;
52
- function j({ className: t, type: n = "text", ...r }) {
53
- return /* @__PURE__ */ _("input", {
54
- type: n,
55
- "data-slot": "input",
56
- className: e(A, t),
57
- "data-pw": r.name ?? "input",
58
- ...r,
59
- placeholder: T(r.placeholder, n)
60
- });
61
- }
62
- //#endregion
63
- //#region lib/components/ui/overlays/dialog/dialog-outside.ts
64
- function M(e) {
65
- let t = e.target;
66
- t instanceof Element && t.closest("[data-slot=\"combobox-content\"]") && e.preventDefault();
67
- }
68
- function N(e) {
69
- return (t) => {
70
- M(t), e?.(t);
71
- };
72
- }
73
- function P(e) {
74
- return {
75
- ...e,
76
- onPointerDownOutside: N(e.onPointerDownOutside),
77
- onFocusOutside: N(e.onFocusOutside),
78
- onInteractOutside: N(e.onInteractOutside)
79
- };
80
- }
81
- //#endregion
82
- //#region lib/components/ui/overlays/dialog/dialog-variants.ts
83
- var F = t("nxgt-dialog fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 p-6 [--dialog-px:1.5rem] max-h-[calc(100dvh-2rem)] supports-[not(height:100dvh)]:max-h-[calc(100vh-2rem)] overflow-y-auto has-[>[data-slot=dialog-body]]:flex has-[>[data-slot=dialog-body]]:flex-col has-[>[data-slot=dialog-body]]:overflow-hidden", {
84
- variants: {
85
- size: {
86
- sm: "sm:max-w-sm",
87
- md: "sm:max-w-lg",
88
- lg: "sm:max-w-2xl",
89
- xl: "sm:max-w-4xl",
90
- full: "sm:max-w-[calc(100%-4rem)]"
91
- },
92
- mobilePresentation: {
93
- dialog: "",
94
- "bottom-sheet": "max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:max-w-none max-sm:translate-x-0 max-sm:translate-y-0 max-sm:max-h-[calc(100dvh-1.5rem)] max-sm:pb-[max(1.5rem,env(safe-area-inset-bottom))]",
95
- top: "max-sm:top-3 max-sm:translate-y-0 max-sm:max-h-[calc(100dvh-1.5rem)]",
96
- fullscreen: "max-sm:inset-0 max-sm:h-dvh max-sm:max-h-none max-sm:max-w-none max-sm:translate-x-0 max-sm:translate-y-0 max-sm:content-start max-sm:pt-[max(1.5rem,env(safe-area-inset-top))]"
97
- }
98
- },
99
- defaultVariants: {
100
- size: "md",
101
- mobilePresentation: "dialog"
102
- }
103
- });
104
- //#endregion
105
- //#region lib/components/ui/overlays/dialog/dialog-parts.tsx
106
- function I({ className: t, ...n }) {
107
- return /* @__PURE__ */ _("div", {
108
- "data-slot": "dialog-header",
109
- className: e("flex flex-col gap-2 text-center sm:text-left", t),
110
- ...n
111
- });
112
- }
113
- function L({ className: t, stackOnPhone: n = !0, ...r }) {
114
- return /* @__PURE__ */ _("div", {
115
- "data-slot": "dialog-footer",
116
- className: e("flex gap-2 pt-2", n ? "flex-col-reverse max-sm:*:w-full sm:flex-row sm:justify-end" : "flex-row justify-end max-sm:justify-between", t),
117
- ...r
118
- });
119
- }
120
- function R({ className: t, ...n }) {
121
- return /* @__PURE__ */ _(s, {
122
- "data-slot": "dialog-title",
123
- className: e("text-2xl/8 font-medium tracking-tight text-foreground", t),
124
- ...n
125
- });
126
- }
127
- function z({ className: t, ...n }) {
128
- return /* @__PURE__ */ _(l, {
129
- "data-slot": "dialog-description",
130
- className: e("text-muted-foreground text-sm/6", t),
131
- ...n
132
- });
133
- }
134
- //#endregion
135
- //#region lib/components/ui/overlays/dialog/dialog.tsx
136
- function B({ ...e }) {
137
- return /* @__PURE__ */ _(n, {
138
- value: e.modal ?? !0,
139
- children: /* @__PURE__ */ _(u, {
140
- "data-slot": "dialog",
141
- ...e
142
- })
143
- });
144
- }
145
- function V({ asChild: e = !0, ...t }) {
146
- return /* @__PURE__ */ _(p, {
147
- "data-slot": "dialog-trigger",
148
- ...t,
149
- asChild: e
150
- });
151
- }
152
- function H({ ...e }) {
153
- return /* @__PURE__ */ _(a, {
154
- "data-slot": "dialog-portal",
155
- ...e
156
- });
157
- }
158
- function U({ className: t, color: n, children: r, type: i = "button", variant: a = "ghost", ...s }) {
159
- let { t: c } = m();
160
- return /* @__PURE__ */ _(o, {
161
- "aria-label": r ? void 0 : c("material.buttons.close", "Close"),
162
- ...s,
163
- type: i,
164
- className: e("absolute top-4 right-4", h({
165
- variant: a,
166
- color: n,
167
- className: t
168
- })),
169
- "data-slot": "dialog-close",
170
- children: r || /* @__PURE__ */ _(y, { className: "size-4" })
171
- });
172
- }
173
- function W({ className: t, scrim: n = "dim", ...r }) {
174
- return /* @__PURE__ */ _(d, {
175
- "data-slot": "dialog-overlay",
176
- "data-scrim": n,
177
- className: e("nxgt-scrim fixed inset-0 z-50", t),
178
- ...r
179
- });
180
- }
181
- function G({ className: t, children: n, onInteractOutside: a, onPointerDownOutside: o, onFocusOutside: s, onOpenAutoFocus: l, onCloseAutoFocus: u, onEscapeKeyDown: d, size: p, mobilePresentation: m, scrim: h, container: y, ref: b, ...x }) {
182
- let S = f({
183
- onOpenAutoFocus: l,
184
- onCloseAutoFocus: u
185
- }), C = c(P({
186
- ref: b,
187
- onEscapeKeyDown: d,
188
- onInteractOutside: a,
189
- onPointerDownOutside: o,
190
- onFocusOutside: s
191
- }));
192
- return /* @__PURE__ */ _(g, { children: /* @__PURE__ */ _(r, {
193
- value: !0,
194
- children: /* @__PURE__ */ v(H, {
195
- "data-slot": "dialog-portal",
196
- container: y,
197
- children: [/* @__PURE__ */ _(W, {
198
- ref: C.overlayRef,
199
- scrim: h
200
- }), /* @__PURE__ */ _(i, {
201
- ref: C.ref,
202
- "data-slot": "dialog-content",
203
- "data-presentation": m ?? void 0,
204
- className: e(F({
205
- size: p,
206
- mobilePresentation: m
207
- }), t),
208
- onOpenAutoFocus: S.onOpenAutoFocus,
209
- onCloseAutoFocus: S.onCloseAutoFocus,
210
- onEscapeKeyDown: C.onEscapeKeyDown,
211
- ...x,
212
- ...C.outside,
213
- children: n
214
- })]
215
- })
216
- }) });
217
- }
218
- //#endregion
219
- export { b as _, H as a, L as c, P as d, j as f, T as g, k as h, W as i, I as l, O as m, U as n, V as o, A as p, G as r, z as s, B as t, R as u, x as v, C as y };
@@ -1,158 +0,0 @@
1
- import { a as e, c as t, l as n, s as r } from "./dist-lmHmz_bu.js";
2
- import { i, n as a, r as o, t as s } from "./dist-C4wtXCjf.js";
3
- import * as c from "react";
4
- import { jsx as l } from "react/jsx-runtime";
5
- //#region ../../node_modules/@radix-ui/react-separator/dist/index.mjs
6
- var u = Object.defineProperty, d = (e, t) => u(e, "name", {
7
- value: t,
8
- configurable: !0
9
- }), f = "horizontal", p = ["horizontal", "vertical"], m = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ d(function(e, t) {
10
- let { decorative: r, orientation: i = f, ...a } = e, o = h(i) ? i : f, s = r ? { role: "none" } : {
11
- "aria-orientation": o === "vertical" ? o : void 0,
12
- role: "separator"
13
- };
14
- return /* @__PURE__ */ l(n.div, {
15
- "data-orientation": o,
16
- ...s,
17
- ...a,
18
- ref: t
19
- });
20
- }, "Separator"));
21
- function h(e) {
22
- return p.includes(e);
23
- }
24
- d(h, "isValidOrientation");
25
- var g = m, _ = Object.defineProperty, v = (e, t) => _(e, "name", {
26
- value: t,
27
- configurable: !0
28
- }), y = "Toggle", b = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ v(function(t, i) {
29
- let { pressed: a, defaultPressed: o, onPressedChange: s, ...c } = t, [u, d] = e({
30
- prop: a,
31
- onChange: s,
32
- defaultProp: o ?? !1,
33
- caller: y
34
- });
35
- return /* @__PURE__ */ l(n.button, {
36
- type: "button",
37
- "aria-pressed": u,
38
- "data-state": u ? "on" : "off",
39
- "data-disabled": t.disabled ? "" : void 0,
40
- ...c,
41
- ref: i,
42
- onClick: r(t.onClick, () => {
43
- t.disabled || d(!u);
44
- })
45
- });
46
- }, "Toggle")), x = b, S = Object.defineProperty, C = (e, t) => S(e, "name", {
47
- value: t,
48
- configurable: !0
49
- }), w = "ToggleGroup", [T, E] = t(w, [o]), D = o(), O = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ C(function(e, t) {
50
- let { type: n, ...r } = e;
51
- if (n === "single") return /* @__PURE__ */ l(j, {
52
- role: "radiogroup",
53
- ...r,
54
- ref: t
55
- });
56
- if (n === "multiple") return /* @__PURE__ */ l(M, {
57
- role: "toolbar",
58
- ...r,
59
- ref: t
60
- });
61
- throw Error(`Missing prop \`type\` expected on \`${w}\``);
62
- }, "ToggleGroup")), [k, A] = T(w), j = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ C(function(t, n) {
63
- let { value: r, defaultValue: i, onValueChange: a = /* @__PURE__ */ C(() => {}, "onValueChange"), ...o } = t, [s, u] = e({
64
- prop: r,
65
- defaultProp: i ?? "",
66
- onChange: a,
67
- caller: w
68
- });
69
- return /* @__PURE__ */ l(k, {
70
- scope: t.__scopeToggleGroup,
71
- type: "single",
72
- value: c.useMemo(() => s ? [s] : [], [s]),
73
- onItemActivate: u,
74
- onItemDeactivate: c.useCallback(() => u(""), [u]),
75
- children: /* @__PURE__ */ l(F, {
76
- ...o,
77
- ref: n
78
- })
79
- });
80
- }, "ToggleGroupImplSingle")), M = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ C(function(t, n) {
81
- let { value: r, defaultValue: i, onValueChange: a = /* @__PURE__ */ C(() => {}, "onValueChange"), ...o } = t, [s, u] = e({
82
- prop: r,
83
- defaultProp: i ?? [],
84
- onChange: a,
85
- caller: w
86
- }), d = c.useCallback((e) => u((t = []) => [...t, e]), [u]), f = c.useCallback((e) => u((t = []) => t.filter((t) => t !== e)), [u]);
87
- return /* @__PURE__ */ l(k, {
88
- scope: t.__scopeToggleGroup,
89
- type: "multiple",
90
- value: s,
91
- onItemActivate: d,
92
- onItemDeactivate: f,
93
- children: /* @__PURE__ */ l(F, {
94
- ...o,
95
- ref: n
96
- })
97
- });
98
- }, "ToggleGroupImplMultiple")), [N, P] = T(w), F = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ C(function(e, t) {
99
- let { __scopeToggleGroup: r, disabled: o = !1, rovingFocus: s = !0, orientation: c, dir: u, loop: d = !0, ...f } = e, p = D(r), m = i(u), h = {
100
- dir: m,
101
- ...f
102
- };
103
- return /* @__PURE__ */ l(N, {
104
- scope: r,
105
- rovingFocus: s,
106
- disabled: o,
107
- children: s ? /* @__PURE__ */ l(a, {
108
- asChild: !0,
109
- ...p,
110
- orientation: c,
111
- dir: m,
112
- loop: d,
113
- children: /* @__PURE__ */ l(n.div, {
114
- ...h,
115
- ref: t
116
- })
117
- }) : /* @__PURE__ */ l(n.div, {
118
- ...h,
119
- ref: t
120
- })
121
- });
122
- }, "ToggleGroupImpl")), I = "ToggleGroupItem", L = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ C(function(e, t) {
123
- let n = A(I, e.__scopeToggleGroup), r = P(I, e.__scopeToggleGroup), i = D(e.__scopeToggleGroup), a = n.value.includes(e.value), o = r.disabled || e.disabled, u = {
124
- ...e,
125
- pressed: a,
126
- disabled: o
127
- }, d = c.useRef(null);
128
- return r.rovingFocus ? /* @__PURE__ */ l(s, {
129
- asChild: !0,
130
- ...i,
131
- focusable: !o,
132
- active: a,
133
- ref: d,
134
- children: /* @__PURE__ */ l(R, {
135
- ...u,
136
- ref: t
137
- })
138
- }) : /* @__PURE__ */ l(R, {
139
- ...u,
140
- ref: t
141
- });
142
- }, "ToggleGroupItem")), R = /* @__PURE__ */ c.forwardRef(/* @__PURE__ */ C(function(e, t) {
143
- let { __scopeToggleGroup: n, value: r, ...i } = e, a = A(I, n), o = {
144
- role: "radio",
145
- "aria-checked": e.pressed,
146
- "aria-pressed": void 0
147
- };
148
- return /* @__PURE__ */ l(b, {
149
- ...a.type === "single" ? o : void 0,
150
- ...i,
151
- ref: t,
152
- onPressedChange: (e) => {
153
- e ? a.onItemActivate(r) : a.onItemDeactivate(r);
154
- }
155
- });
156
- }, "ToggleGroupItemImpl"));
157
- //#endregion
158
- export { g as a, x as i, L as n, E as r, O as t };