@nxgt/material 3.94.0 → 3.95.1

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 (391) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +6 -2
  3. package/dist/{alert-dialog-BaqK-rmd.js → alert-dialog-D4r0Kn9h.js} +1 -1
  4. package/dist/{async-slice-BfNpIJAH.js → async-slice-Bx438UlG.js} +1 -1
  5. package/dist/{button-CozGHXAv.js → button-Z_xcg10A.js} +1 -1
  6. package/dist/{calculator-BIx6cwgU.js → calculator-BfIBMiFX.js} +10 -10
  7. package/dist/calculator-field.js +6 -6
  8. package/dist/{calculator-segment-BsaxUtzL.js → calculator-segment-DQE1EFdw.js} +1 -1
  9. package/dist/calculator.js +1 -1
  10. package/dist/charts.js +3 -3
  11. package/dist/{chip-DMEUGYdC.js → chip-Bb9SM3Ly.js} +2 -2
  12. package/dist/{code-editor-BWfky-aN.js → code-editor-Cw-dOrn2.js} +4 -4
  13. package/dist/code-editor.js +4 -4
  14. package/dist/{code-language-items-BUaNYJuw.js → code-language-items-BVfxGKiv.js} +2 -2
  15. package/dist/components/components.css +7 -1
  16. package/dist/components/theme-tokens.css +7 -0
  17. package/dist/components/ui/dates/duration-field/duration-field-expressive.css +2 -63
  18. package/dist/components/ui/dates/picker-trigger/typed-box-expressive.css +30 -21
  19. package/dist/components/ui/fields/number-field/number-field-score.css +151 -0
  20. package/dist/components/ui/fields/quantity-field/quantity-field.css +117 -0
  21. package/dist/components/ui/primitives/field-box/field-box-parts.css +1 -2
  22. package/dist/components/ui/primitives/field-box/field-box-tokens.css +54 -36
  23. package/dist/components/ui/primitives/field-box/field-box.css +44 -86
  24. package/dist/components/ui/primitives/field-box/field-stepper.css +129 -0
  25. package/dist/{components-CZpdAQMh.js → components-DXCfO95n.js} +13787 -13699
  26. package/dist/components.js +26 -27
  27. package/dist/{conversion-variant-aIBhul_U.js → conversion-variant-Ciii9Rbh.js} +4 -4
  28. package/dist/currency-field-DipsI0Bv.js +303 -0
  29. package/dist/{dialog-H40HjqXN.js → dialog-CFuONiW5.js} +3 -3
  30. package/dist/dnd.js +1 -1
  31. package/dist/{dropdown-menu-CawkIlW8.js → dropdown-menu-BvtBDoSD.js} +1 -1
  32. package/dist/editor.js +8 -8
  33. package/dist/{empty-state-sRVjgCis.js → empty-state-n2zb23YG.js} +1 -1
  34. package/dist/{financial-variant-Bqo9-swy.js → financial-variant-CTXTLbE_.js} +7 -7
  35. package/dist/{hooks-BTj_WJm9.js → hooks-zyRsvilJ.js} +2 -2
  36. package/dist/hooks.js +2 -2
  37. package/dist/{hover-card-BZU1DWGY.js → hover-card-BJ15hu7B.js} +1 -1
  38. package/dist/i18n.js +3 -3
  39. package/dist/{icon-badge-CXgvqMsM.js → icon-badge-B2ns44Cz.js} +1 -1
  40. package/dist/{icon-button-B9WjQ3RO.js → icon-button-BG438okX.js} +1 -1
  41. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  42. package/dist/lib/components/ui/fields/number-field/number-control.d.ts +10 -3
  43. package/dist/lib/components/ui/fields/number-field/number-field-base.d.ts +2 -0
  44. package/dist/lib/components/ui/fields/number-field/number-field.d.ts +7 -1
  45. package/dist/lib/components/ui/fields/number-field/number-field.types.d.ts +13 -0
  46. package/dist/lib/components/ui/fields/number-field/number-score-control.d.ts +19 -0
  47. package/dist/lib/components/ui/fields/number-field/number-stepper.d.ts +16 -2
  48. package/dist/lib/components/ui/fields/quantity-field/quantity-field.d.ts +4 -3
  49. package/dist/lib/components/ui/fields/quantity-field/quantity-row.d.ts +5 -9
  50. package/dist/lib/components/ui/fields/quantity-field/quantity-unit-menu.d.ts +19 -0
  51. package/dist/lib/components/ui/fields/quantity-field/quantity-unit.d.ts +11 -4
  52. package/dist/lib/components/ui/fields/quantity-field/use-unit-chip-name.d.ts +14 -0
  53. package/dist/lib/components/ui/fields/switch/partials/switch-row.d.ts +2 -2
  54. package/dist/lib/components/ui/fields/switch/switch.d.ts +2 -2
  55. package/dist/lib/components/ui/fields/text-field/text-field-units.d.ts +24 -0
  56. package/dist/lib/components/ui/fields/text-field/text-field.d.ts +9 -0
  57. package/dist/lib/components/ui/fields/verification-code/partials/code-surface.d.ts +13 -6
  58. package/dist/lib/components/ui/fields/verification-code/partials/recovery-input.d.ts +1 -1
  59. package/dist/lib/components/ui/layout/app-shell/app-sidebar-group.d.ts +12 -0
  60. package/dist/lib/components/ui/layout/app-shell/types.d.ts +7 -0
  61. package/dist/lib/components/ui/primitives/input-group/input-group.d.ts +1 -1
  62. package/dist/lib/i18n/resources/en/en.d.ts +5 -0
  63. package/dist/lib/i18n/resources/en/material.json.d.ts +7 -2
  64. package/dist/lib/i18n/resources/fr/fr.d.ts +5 -0
  65. package/dist/lib/i18n/resources/fr/material.json.d.ts +7 -2
  66. package/dist/lib/i18n/resources/resources.d.ts +10 -0
  67. package/dist/lib/i18n/translator.d.ts +1 -1
  68. package/dist/lib.js +1 -1
  69. package/dist/main.js +32 -33
  70. package/dist/map.js +8 -8
  71. package/dist/material.css +1 -1
  72. package/dist/pdf-reader.js +1 -1
  73. package/dist/percent-field-Cjc_3pP0.js +137 -0
  74. package/dist/{picker-surface-D2aYI4v7.js → picker-surface-Cr2n42qv.js} +4 -4
  75. package/dist/{popover-QQYPWzw6.js → popover-XBAX2Shp.js} +1 -1
  76. package/dist/{pos-types-BIeZGGAs.js → pos-types-BFVWeJki.js} +1 -1
  77. package/dist/{pos-variant-Cdn1AVoA.js → pos-variant-DWB8Bc12.js} +4 -4
  78. package/dist/print.js +1 -1
  79. package/dist/{programmer-variant-CMBybkqw.js → programmer-variant-B-wPnDeX.js} +2 -2
  80. package/dist/{public-CPxFxbi4.js → public-D1bH-KPQ.js} +9 -9
  81. package/dist/{rich-code-block-DKJ8eKzL.js → rich-code-block-DP2RT7pV.js} +5 -5
  82. package/dist/{scientific-variant-CXL1ayb7.js → scientific-variant-BP08Mo0g.js} +2 -2
  83. package/dist/{sortable-provider-BYqwwyr1.js → sortable-provider-CHGZrS0f.js} +2 -2
  84. package/dist/{spinner-D7ol2n_-.js → spinner-rk8J5y9O.js} +1 -1
  85. package/dist/styles.css +2 -0
  86. package/dist/{tabs-DyiFTy5g.js → tabs-nuYLggwC.js} +1 -1
  87. package/dist/text-field-DOndWDT5.js +169 -0
  88. package/dist/theme-picker.js +2 -2
  89. package/dist/{theme-toggle-QZ0bIrg9.js → theme-toggle-5waw9Wk8.js} +1 -1
  90. package/dist/{toolbar-items-BpOEBsSt.js → toolbar-items-Bo-nMzKJ.js} +4 -4
  91. package/dist/{translate-material-DlMetRSJ.js → translate-material-H5GMStyF.js} +1 -1
  92. package/dist/{translator-VtzVrnLm.js → translator-gdpQeToI.js} +14 -4
  93. package/dist/{use-chat-composer-DQ2rTD_q.js → use-chat-composer-DEd6GM2N.js} +23 -24
  94. package/dist/{use-heading-spy-17B5xa7B.js → use-heading-spy-n_wPa5jC.js} +4 -4
  95. package/dist/{use-material-translation-Cx5u36V5.js → use-material-translation-BW5HZMwt.js} +1 -1
  96. package/dist/{use-return-focus-S7g7q_Yn.js → use-return-focus-BC4sGh1b.js} +1 -1
  97. package/docs/README.md +1 -0
  98. package/docs/components/date-and-time.md +25 -23
  99. package/docs/components/form-fields.md +80 -26
  100. package/docs/components/navigation-and-layout.md +1 -1
  101. package/docs/guides/app-shell.md +15 -0
  102. package/docs/guides/field-look-2-x.md +10 -4
  103. package/docs/guides/field-look-refined.md +130 -0
  104. package/docs/guides/layouts.md +2 -1
  105. package/docs/guides/theming.md +39 -31
  106. package/docs/previews/backgrounds-icons-quiet-band.webp +0 -0
  107. package/docs/previews/backgrounds-icons.webp +0 -0
  108. package/docs/previews/backgrounds-matrix.webp +0 -0
  109. package/docs/previews/buttons-actions-actioncard.webp +0 -0
  110. package/docs/previews/buttons-actions-backlink.webp +0 -0
  111. package/docs/previews/buttons-actions-button.webp +0 -0
  112. package/docs/previews/buttons-actions-buttongroup.webp +0 -0
  113. package/docs/previews/buttons-actions-fab.webp +0 -0
  114. package/docs/previews/buttons-actions-fabmenu.webp +0 -0
  115. package/docs/previews/buttons-actions-iconbutton.webp +0 -0
  116. package/docs/previews/buttons-actions-languageswitcher.webp +0 -0
  117. package/docs/previews/buttons-actions-linkbutton.webp +0 -0
  118. package/docs/previews/buttons-actions-loadmorebutton.webp +0 -0
  119. package/docs/previews/buttons-actions-loadmorefooter.webp +0 -0
  120. package/docs/previews/buttons-actions-responsivebutton.webp +0 -0
  121. package/docs/previews/buttons-actions-scrolltolatestbutton.webp +0 -0
  122. package/docs/previews/buttons-actions-scrolltotop.webp +0 -0
  123. package/docs/previews/buttons-actions-splitbutton.webp +0 -0
  124. package/docs/previews/buttons-actions-themetoggle.webp +0 -0
  125. package/docs/previews/buttons-actions-toolbar-density-and-keyboard.webp +0 -0
  126. package/docs/previews/buttons-actions-toolbar.webp +0 -0
  127. package/docs/previews/data-display-accordioncard.webp +0 -0
  128. package/docs/previews/data-display-apiendpoint.webp +0 -0
  129. package/docs/previews/data-display-apioperation.webp +0 -0
  130. package/docs/previews/data-display-avatar.webp +0 -0
  131. package/docs/previews/data-display-badge.webp +0 -0
  132. package/docs/previews/data-display-card-presets.webp +0 -0
  133. package/docs/previews/data-display-changehistory.webp +0 -0
  134. package/docs/previews/data-display-chip.webp +0 -0
  135. package/docs/previews/data-display-codegroup.webp +0 -0
  136. package/docs/previews/data-display-description.webp +0 -0
  137. package/docs/previews/data-display-enrolmentcard.webp +0 -0
  138. package/docs/previews/data-display-enrolmentsecret.webp +0 -0
  139. package/docs/previews/data-display-metric-cards.webp +0 -0
  140. package/docs/previews/data-display-periodcards.webp +0 -0
  141. package/docs/previews/data-display-recoverycodes.webp +0 -0
  142. package/docs/previews/data-display-recoverycodesstatus.webp +0 -0
  143. package/docs/previews/data-display-secretcard.webp +0 -0
  144. package/docs/previews/data-display-terminal.webp +0 -0
  145. package/docs/previews/data-display-timeline.webp +0 -0
  146. package/docs/previews/data-display-tonevalue.webp +0 -0
  147. package/docs/previews/data-display-votetally.webp +0 -0
  148. package/docs/previews/data-table-filter-lists-datagrid.webp +0 -0
  149. package/docs/previews/data-table-filter-lists-datatable.webp +0 -0
  150. package/docs/previews/data-table-filter-lists-daygroupedlist.webp +0 -0
  151. package/docs/previews/data-table-filter-lists-drag-and-drop.webp +0 -0
  152. package/docs/previews/data-table-filter-lists-facetgroup.webp +0 -0
  153. package/docs/previews/data-table-filter-lists-filter.webp +0 -0
  154. package/docs/previews/data-table-filter-lists-listempty.webp +0 -0
  155. package/docs/previews/data-table-filter-lists-listpane.webp +0 -0
  156. package/docs/previews/data-table-filter-lists-markinglist.webp +0 -0
  157. package/docs/previews/data-table-filter-lists-pagination.webp +0 -0
  158. package/docs/previews/data-table-filter-lists-servertable.webp +0 -0
  159. package/docs/previews/data-table-filter-lists-tree.webp +0 -0
  160. package/docs/previews/date-time-agefield.webp +0 -0
  161. package/docs/previews/date-time-calendar-expressive.webp +0 -0
  162. package/docs/previews/date-time-calendar.webp +0 -0
  163. package/docs/previews/date-time-datefield.webp +0 -0
  164. package/docs/previews/date-time-daterangefield.webp +0 -0
  165. package/docs/previews/date-time-durationfield.webp +0 -0
  166. package/docs/previews/date-time-fields-expressive.webp +0 -0
  167. package/docs/previews/date-time-halfdayrangefield.webp +0 -0
  168. package/docs/previews/date-time-nowindicator.webp +0 -0
  169. package/docs/previews/date-time-timefield.webp +0 -0
  170. package/docs/previews/date-time-timepicker-tiles.webp +0 -0
  171. package/docs/previews/date-time-timepicker.webp +0 -0
  172. package/docs/previews/feedback-status-alert.webp +0 -0
  173. package/docs/previews/feedback-status-alertdialog.webp +0 -0
  174. package/docs/previews/feedback-status-celebration.webp +0 -0
  175. package/docs/previews/feedback-status-circularprogress.webp +0 -0
  176. package/docs/previews/feedback-status-confirmationdialog.webp +0 -0
  177. package/docs/previews/feedback-status-confirmdialog.webp +0 -0
  178. package/docs/previews/feedback-status-countdowntimer.webp +0 -0
  179. package/docs/previews/feedback-status-customalertdialog.webp +0 -0
  180. package/docs/previews/feedback-status-customdialog.webp +0 -0
  181. package/docs/previews/feedback-status-emptystate.webp +0 -0
  182. package/docs/previews/feedback-status-errorstate.webp +0 -0
  183. package/docs/previews/feedback-status-hydrateloading.webp +0 -0
  184. package/docs/previews/feedback-status-illustration-education.webp +0 -0
  185. package/docs/previews/feedback-status-illustration-game.webp +0 -0
  186. package/docs/previews/feedback-status-illustration-health.webp +0 -0
  187. package/docs/previews/feedback-status-illustration.webp +0 -0
  188. package/docs/previews/feedback-status-notificationrow.webp +0 -0
  189. package/docs/previews/feedback-status-notifications.webp +0 -0
  190. package/docs/previews/feedback-status-pageloadfailed.webp +0 -0
  191. package/docs/previews/feedback-status-progress.webp +0 -0
  192. package/docs/previews/feedback-status-skeleton.webp +0 -0
  193. package/docs/previews/feedback-status-spinner.webp +0 -0
  194. package/docs/previews/feedback-status-stalenotice.webp +0 -0
  195. package/docs/previews/feedback-status-stepupdialog-retry.webp +0 -0
  196. package/docs/previews/feedback-status-stepupdialog.webp +0 -0
  197. package/docs/previews/feedback-status-toast.webp +0 -0
  198. package/docs/previews/feedback-status-typingindicator.webp +0 -0
  199. package/docs/previews/feedback-status-unsaveddialog.webp +0 -0
  200. package/docs/previews/form-fields-attributes.webp +0 -0
  201. package/docs/previews/form-fields-choicelistfield.webp +0 -0
  202. package/docs/previews/form-fields-colorfield.webp +0 -0
  203. package/docs/previews/form-fields-contacts.webp +0 -0
  204. package/docs/previews/form-fields-countryfield.webp +0 -0
  205. package/docs/previews/form-fields-currencyfield.webp +0 -0
  206. package/docs/previews/form-fields-emailfield.webp +0 -0
  207. package/docs/previews/form-fields-field.webp +0 -0
  208. package/docs/previews/form-fields-formsection.webp +0 -0
  209. package/docs/previews/form-fields-inlineedit.webp +0 -0
  210. package/docs/previews/form-fields-inputgroupfield.webp +0 -0
  211. package/docs/previews/form-fields-localizedtextfields.webp +0 -0
  212. package/docs/previews/form-fields-markdowntextareafield.webp +0 -0
  213. package/docs/previews/form-fields-numberfield.webp +0 -0
  214. package/docs/previews/form-fields-openinghours.webp +0 -0
  215. package/docs/previews/form-fields-otpfield.webp +0 -0
  216. package/docs/previews/form-fields-passwordfield.webp +0 -0
  217. package/docs/previews/form-fields-percentfield.webp +0 -0
  218. package/docs/previews/form-fields-phonefield.webp +0 -0
  219. package/docs/previews/form-fields-postaladdress.webp +0 -0
  220. package/docs/previews/form-fields-repeatablegroup.webp +0 -0
  221. package/docs/previews/form-fields-searchfield.webp +0 -0
  222. package/docs/previews/form-fields-slider.webp +0 -0
  223. package/docs/previews/form-fields-switch.webp +0 -0
  224. package/docs/previews/form-fields-textareafield.webp +0 -0
  225. package/docs/previews/form-fields-textfield.webp +0 -0
  226. package/docs/previews/form-fields-timezonefield.webp +0 -0
  227. package/docs/previews/form-fields-urlfield.webp +0 -0
  228. package/docs/previews/form-fields-verificationcode.webp +0 -0
  229. package/docs/previews/foundations-themes-gallery.webp +0 -0
  230. package/docs/previews/foundations-themes-icon-motifs.webp +0 -0
  231. package/docs/previews/foundations-themes-nesting.webp +0 -0
  232. package/docs/previews/foundations-themes-provider.webp +0 -0
  233. package/docs/previews/foundations-themes-themepicker.webp +0 -0
  234. package/docs/previews/guides-i18n-i18nprovider.webp +0 -0
  235. package/docs/previews/guides-i18n-translated-components.webp +0 -0
  236. package/docs/previews/media-files-audioplayer.webp +0 -0
  237. package/docs/previews/media-files-camera.webp +0 -0
  238. package/docs/previews/media-files-carousel.webp +0 -0
  239. package/docs/previews/media-files-filelist.webp +0 -0
  240. package/docs/previews/media-files-filelistfield.webp +0 -0
  241. package/docs/previews/media-files-filepreview.webp +0 -0
  242. package/docs/previews/media-files-gallery-image-lists.webp +0 -0
  243. package/docs/previews/media-files-gallery-video.webp +0 -0
  244. package/docs/previews/media-files-gallery-viewer.webp +0 -0
  245. package/docs/previews/media-files-gallery.webp +0 -0
  246. package/docs/previews/media-files-imagecropper.webp +0 -0
  247. package/docs/previews/media-files-imageeditor.webp +0 -0
  248. package/docs/previews/media-files-imagefield.webp +0 -0
  249. package/docs/previews/media-files-lightboxgallery.webp +0 -0
  250. package/docs/previews/media-files-map.webp +0 -0
  251. package/docs/previews/media-files-mediaplayer.webp +0 -0
  252. package/docs/previews/media-files-mediaplayerhost.webp +0 -0
  253. package/docs/previews/media-files-mediaplayerlightbox.webp +0 -0
  254. package/docs/previews/media-files-mediaplayermini.webp +0 -0
  255. package/docs/previews/media-files-minigallery.webp +0 -0
  256. package/docs/previews/media-files-pdfreader.webp +0 -0
  257. package/docs/previews/media-files-uploadfield.webp +0 -0
  258. package/docs/previews/navigation-layout-appshell-blue-moon.webp +0 -0
  259. package/docs/previews/navigation-layout-appshell-footer-icon.webp +0 -0
  260. package/docs/previews/navigation-layout-appshell-menu-badge.webp +0 -0
  261. package/docs/previews/navigation-layout-appshell-page-ground.webp +0 -0
  262. package/docs/previews/navigation-layout-appshell-themes.webp +0 -0
  263. package/docs/previews/navigation-layout-appshell.webp +0 -0
  264. package/docs/previews/navigation-layout-authcard-split.webp +0 -0
  265. package/docs/previews/navigation-layout-authcard.webp +0 -0
  266. package/docs/previews/navigation-layout-background.webp +0 -0
  267. package/docs/previews/navigation-layout-breadcrumb.webp +0 -0
  268. package/docs/previews/navigation-layout-doc-api.webp +0 -0
  269. package/docs/previews/navigation-layout-doc-blocks.webp +0 -0
  270. package/docs/previews/navigation-layout-doc.webp +0 -0
  271. package/docs/previews/navigation-layout-editorlayout.webp +0 -0
  272. package/docs/previews/navigation-layout-hero.webp +0 -0
  273. package/docs/previews/navigation-layout-landinglayout.webp +0 -0
  274. package/docs/previews/navigation-layout-listdetailslayout.webp +0 -0
  275. package/docs/previews/navigation-layout-pager.webp +0 -0
  276. package/docs/previews/navigation-layout-recordpage.webp +0 -0
  277. package/docs/previews/navigation-layout-settingslayout.webp +0 -0
  278. package/docs/previews/navigation-layout-sidebar.webp +0 -0
  279. package/docs/previews/navigation-layout-steps.webp +0 -0
  280. package/docs/previews/navigation-layout-stickyactionbar.webp +0 -0
  281. package/docs/previews/navigation-layout-threadlayout-pages.webp +0 -0
  282. package/docs/previews/navigation-layout-toc.webp +0 -0
  283. package/docs/previews/overlays-menus-contextmenu.webp +0 -0
  284. package/docs/previews/overlays-menus-dialog.webp +0 -0
  285. package/docs/previews/overlays-menus-drawer.webp +0 -0
  286. package/docs/previews/overlays-menus-dropdownmenu.webp +0 -0
  287. package/docs/previews/overlays-menus-hovercard.webp +0 -0
  288. package/docs/previews/overlays-menus-popover.webp +0 -0
  289. package/docs/previews/overlays-menus-sheet.webp +0 -0
  290. package/docs/previews/overlays-menus-tooltip.webp +0 -0
  291. package/docs/previews/primitives-accordion.webp +0 -0
  292. package/docs/previews/primitives-card.webp +0 -0
  293. package/docs/previews/primitives-collapsible.webp +0 -0
  294. package/docs/previews/primitives-extendedlabel.webp +0 -0
  295. package/docs/previews/primitives-helpertext.webp +0 -0
  296. package/docs/previews/primitives-input.webp +0 -0
  297. package/docs/previews/primitives-inputgroup.webp +0 -0
  298. package/docs/previews/primitives-label.webp +0 -0
  299. package/docs/previews/primitives-scrollarea.webp +0 -0
  300. package/docs/previews/primitives-segmentednav.webp +0 -0
  301. package/docs/previews/primitives-tabs.webp +0 -0
  302. package/docs/previews/primitives-tabsnav.webp +0 -0
  303. package/docs/previews/primitives-textarea.webp +0 -0
  304. package/docs/previews/primitives-toggle.webp +0 -0
  305. package/docs/previews/primitives-togglegroup.webp +0 -0
  306. package/docs/previews/primitives-typography.webp +0 -0
  307. package/docs/previews/rich-widgets-calculator-conversion.webp +0 -0
  308. package/docs/previews/rich-widgets-chat-action-proposal.webp +0 -0
  309. package/docs/previews/rich-widgets-chat-advanced.webp +0 -0
  310. package/docs/previews/rich-widgets-chat-composer.webp +0 -0
  311. package/docs/previews/rich-widgets-chat-inbox.webp +0 -0
  312. package/docs/previews/rich-widgets-chat-overview.webp +0 -0
  313. package/docs/previews/rich-widgets-chat-thread.webp +0 -0
  314. package/docs/previews/rich-widgets-chat-widget.webp +0 -0
  315. package/docs/previews/rich-widgets-codeeditor.webp +0 -0
  316. package/docs/previews/rich-widgets-compacteditor.webp +0 -0
  317. package/docs/previews/rich-widgets-documenteditor.webp +0 -0
  318. package/docs/previews/rich-widgets-drawing.webp +0 -0
  319. package/docs/previews/rich-widgets-emojipicker.webp +0 -0
  320. package/docs/previews/rich-widgets-eventcalendar.webp +0 -0
  321. package/docs/previews/rich-widgets-kanban-phone-layout.webp +0 -0
  322. package/docs/previews/rich-widgets-kanban.webp +0 -0
  323. package/docs/previews/rich-widgets-mentionlist.webp +0 -0
  324. package/docs/previews/rich-widgets-native-charts-areachart.webp +0 -0
  325. package/docs/previews/rich-widgets-native-charts-barchart.webp +0 -0
  326. package/docs/previews/rich-widgets-native-charts-combochart.webp +0 -0
  327. package/docs/previews/rich-widgets-native-charts-donutchart.webp +0 -0
  328. package/docs/previews/rich-widgets-native-charts-funnelchart.webp +0 -0
  329. package/docs/previews/rich-widgets-native-charts-heatmapchart.webp +0 -0
  330. package/docs/previews/rich-widgets-native-charts-linechart-reference.webp +0 -0
  331. package/docs/previews/rich-widgets-native-charts-linechart.webp +0 -0
  332. package/docs/previews/rich-widgets-native-charts-palette.webp +0 -0
  333. package/docs/previews/rich-widgets-native-charts-piechart.webp +0 -0
  334. package/docs/previews/rich-widgets-native-charts-radarchart.webp +0 -0
  335. package/docs/previews/rich-widgets-native-charts-radialbarchart.webp +0 -0
  336. package/docs/previews/rich-widgets-native-charts-scatterchart.webp +0 -0
  337. package/docs/previews/rich-widgets-questioncard-rich-content.webp +0 -0
  338. package/docs/previews/rich-widgets-questionmediaview.webp +0 -0
  339. package/docs/previews/rich-widgets-questionnavigator.webp +0 -0
  340. package/docs/previews/rich-widgets-quiz.webp +0 -0
  341. package/docs/previews/rich-widgets-richchatcomposer.webp +0 -0
  342. package/docs/previews/rich-widgets-richtexteditor.webp +0 -0
  343. package/docs/previews/rich-widgets-richtextviewer.webp +0 -0
  344. package/docs/previews/selection-choice-autocomplete.webp +0 -0
  345. package/docs/previews/selection-choice-checkbox.webp +0 -0
  346. package/docs/previews/selection-choice-checkboxgroup.webp +0 -0
  347. package/docs/previews/selection-choice-checkcardfield.webp +0 -0
  348. package/docs/previews/selection-choice-chipgroupfield.webp +0 -0
  349. package/docs/previews/selection-choice-choicecardgroup.webp +0 -0
  350. package/docs/previews/selection-choice-combobox.webp +0 -0
  351. package/docs/previews/selection-choice-comboboxfield.webp +0 -0
  352. package/docs/previews/selection-choice-optiontile.webp +0 -0
  353. package/docs/previews/selection-choice-radiogroup.webp +0 -0
  354. package/docs/previews/selection-choice-select.webp +0 -0
  355. package/docs/previews/selection-choice-selectfield.webp +0 -0
  356. package/docs/previews/selection-choice-sortablelist.webp +0 -0
  357. package/docs/previews/selection-choice-switcher.webp +0 -0
  358. package/docs/previews/selection-choice-transferlist.webp +0 -0
  359. package/docs/previews/selection-choice-treeselectfield.webp +0 -0
  360. package/docs/roadmap.md +13 -10
  361. package/docs/troubleshooting.md +44 -0
  362. package/lib/components/components.css +7 -1
  363. package/lib/components/theme-tokens.css +7 -0
  364. package/lib/components/ui/dates/duration-field/duration-field-expressive.css +2 -63
  365. package/lib/components/ui/dates/picker-trigger/typed-box-expressive.css +30 -21
  366. package/lib/components/ui/fields/number-field/number-field-score.css +151 -0
  367. package/lib/components/ui/fields/quantity-field/quantity-field.css +117 -0
  368. package/lib/components/ui/primitives/field-box/field-box-parts.css +1 -2
  369. package/lib/components/ui/primitives/field-box/field-box-tokens.css +54 -36
  370. package/lib/components/ui/primitives/field-box/field-box.css +44 -86
  371. package/lib/components/ui/primitives/field-box/field-stepper.css +129 -0
  372. package/lib/styles.css +2 -0
  373. package/lib/themes/ambre.css +5 -1
  374. package/lib/themes/ardoise.css +5 -1
  375. package/lib/themes/bleumono.css +5 -1
  376. package/lib/themes/bluemoon.css +5 -1
  377. package/lib/themes/corail.css +5 -1
  378. package/lib/themes/foret.css +5 -1
  379. package/lib/themes/lavande.css +5 -1
  380. package/lib/themes/menthe.css +5 -1
  381. package/lib/themes/ocean.css +5 -1
  382. package/lib/themes/pink.css +5 -1
  383. package/lib/themes/prune.css +5 -1
  384. package/lib/themes/sable.css +5 -1
  385. package/lib/themes/slate.css +5 -1
  386. package/lib/themes/teal.css +5 -1
  387. package/package.json +2 -2
  388. package/dist/currency-field-IcEMAcAw.js +0 -289
  389. package/dist/input-group-Df9vp2EZ.js +0 -70
  390. package/dist/percent-field-DrI4_J7x.js +0 -14
  391. package/dist/text-field-BAdY-kpO.js +0 -59
@@ -1,8 +1,9 @@
1
1
  /* The date, range and time fields' box, over the field box. The same box at
2
- * rest as a text field (surface, hairline border, radius, hover and filled
3
- * tint: the shared bordered box, #2406), with a 2px primary boundary
4
- * while a segment has focus or the picker is open and an error boundary when
5
- * invalid. The segments are in segmented-input-expressive.css.
2
+ * rest as a text field (surface, hairline border, radius, hover: the
3
+ * shared bordered box), with the shared focus ring (1px primary
4
+ * border, 4px ring) while a segment has focus or the picker is open, and the
5
+ * shared error border when invalid. The segments are in
6
+ * segmented-input-expressive.css.
6
7
  * `data-tonal` belongs to the date and time fields: the typed box and
7
8
  * the sheet entry box. No other field sets it. */
8
9
  @layer components {
@@ -11,35 +12,43 @@
11
12
  --_fx-pill: var(--primary);
12
13
  --_fx-pill-fg: var(--primary-foreground);
13
14
  --_fx-line: var(--primary-text);
14
- --_fx-err: var(--error);
15
15
  }
16
16
  :is(.dark, [data-theme="dark"]) .nxgt-field-box.nxgt-field-box[data-tonal] {
17
17
  --_fx-tint: color-mix(in oklab, var(--primary) 34%, var(--background));
18
18
  --_fx-pill: var(--primary-text);
19
19
  --_fx-pill-fg: var(--background);
20
20
  }
21
- .nxgt-field-box.nxgt-field-box[data-tonal]:is(
22
- [data-focused],
23
- [data-open]:not([data-open="false"])
21
+ /* Focus, error, read-only and disabled are the shared field box's
22
+ * (field-box.css): the 1px primary border with the 4px ring, the error
23
+ * border, the dashed hairline, the recessed surface. Two cases the box
24
+ * does not see itself get the same ring here: the picker open, and a
25
+ * button around the box (a trigger) with keyboard focus. */
26
+ .nxgt-field-box.nxgt-field-box[data-tonal][data-open]:not(
27
+ [data-open="false"]
24
28
  ),
25
29
  button:focus-visible > .nxgt-field-box.nxgt-field-box[data-tonal] {
26
- border-color: var(--_fx-line);
27
- box-shadow: inset 0 0 0 1px var(--_fx-line);
30
+ border-color: var(--nxgt-field-focus);
31
+ box-shadow:
32
+ 0 0 0 1px var(--nxgt-field-focus),
33
+ 0 0 0 4px var(--nxgt-field-halo);
28
34
  }
29
35
  .nxgt-field-box.nxgt-field-box.nxgt-field-box[data-tonal][data-invalid]:not(
30
36
  [data-invalid="false"]
31
- ) {
32
- border-color: var(--_fx-err);
37
+ ):is([data-open]:not([data-open="false"])),
38
+ button:focus-visible
39
+ > .nxgt-field-box.nxgt-field-box.nxgt-field-box[data-tonal][data-invalid]:not(
40
+ [data-invalid="false"]
41
+ ) {
42
+ border-color: var(--nxgt-field-error);
43
+ box-shadow:
44
+ 0 0 0 1px var(--nxgt-field-error),
45
+ 0 0 0 4px var(--nxgt-field-halo-invalid);
33
46
  }
34
- .nxgt-field-box.nxgt-field-box.nxgt-field-box[data-tonal][data-invalid]:not(
35
- [data-invalid="false"]
36
- ):is([data-focused], [data-open]) {
37
- box-shadow: inset 0 0 0 1px var(--_fx-err);
38
- }
39
- .nxgt-field-box.nxgt-field-box[data-tonal][data-disabled] {
40
- border-color: var(--nxgt-field-border);
41
- background-color: var(--nxgt-field-bg);
42
- box-shadow: none;
47
+
48
+ @media (forced-colors: active) {
49
+ button:focus-visible > .nxgt-field-box.nxgt-field-box[data-tonal] {
50
+ outline: 2px solid Highlight;
51
+ }
43
52
  }
44
53
 
45
54
  /* The button that opens the picker: a tint circle, primary while open. */
@@ -0,0 +1,151 @@
1
+ /* NumberField `variant="score"`: a big tabular value with its maximum on the
2
+ * same baseline. No box at rest (a quiet band, 6% of the tone), a 1px frame on
3
+ * hover, the field focus ring on focus. A tone is text colour plus a shape
4
+ * marker (circle, triangle, diamond, square), never colour alone. Locked is a
5
+ * dashed frame with a lock; an error is the tone text with a border. The frame
6
+ * is one border on all sides (no start-side border on a rounded box). */
7
+ @layer components {
8
+ .nxgt-score {
9
+ --_sc-tone: var(--nxgt-tone-text, var(--foreground));
10
+ --_sc-frame: transparent;
11
+ display: inline-flex;
12
+ align-items: baseline;
13
+ gap: 0.375rem;
14
+ inline-size: fit-content;
15
+ max-inline-size: 100%;
16
+ padding: 0.25rem 0.75rem;
17
+ border: 1px solid var(--_sc-frame);
18
+ border-radius: var(--nxgt-field-radius, 0.5rem);
19
+ background: color-mix(in oklab, var(--_sc-tone) 6%, transparent);
20
+ color: var(--_sc-tone);
21
+ transition:
22
+ border-color var(--nxgt-motion-effects-default-duration)
23
+ var(--nxgt-motion-effects-default),
24
+ box-shadow var(--nxgt-motion-effects-default-duration)
25
+ var(--nxgt-motion-effects-default);
26
+ }
27
+ .nxgt-score:not([data-tone]) {
28
+ --_sc-tone: var(--foreground);
29
+ }
30
+ .nxgt-score:hover:not([data-disabled], [data-locked]) {
31
+ --_sc-frame: var(--nxgt-field-border-hover, var(--border));
32
+ }
33
+ .nxgt-score:focus-within {
34
+ --_sc-frame: var(--nxgt-field-focus);
35
+ box-shadow:
36
+ 0 0 0 1px var(--nxgt-field-focus),
37
+ 0 0 0 4px var(--nxgt-field-halo);
38
+ }
39
+ .nxgt-score[data-invalid] {
40
+ --_sc-frame: var(--nxgt-field-error);
41
+ box-shadow: inset 0 0 0 1px var(--nxgt-field-error);
42
+ }
43
+ .nxgt-score[data-invalid]:focus-within {
44
+ box-shadow:
45
+ 0 0 0 1px var(--nxgt-field-error),
46
+ 0 0 0 4px var(--nxgt-field-halo-invalid);
47
+ }
48
+
49
+ .nxgt-score-input {
50
+ field-sizing: content;
51
+ min-inline-size: 1ch;
52
+ max-inline-size: 100%;
53
+ padding: 0;
54
+ border: 0;
55
+ outline: 0;
56
+ background: transparent;
57
+ color: inherit;
58
+ font: inherit;
59
+ font-size: 1.75rem;
60
+ font-weight: 600;
61
+ line-height: 1.2;
62
+ font-variant-numeric: tabular-nums;
63
+ text-align: start;
64
+ }
65
+ .nxgt-score-input::placeholder {
66
+ color: var(--muted-foreground);
67
+ font-weight: 400;
68
+ }
69
+ .nxgt-score-max {
70
+ color: var(--muted-foreground);
71
+ font-size: 1rem;
72
+ font-variant-numeric: tabular-nums;
73
+ white-space: nowrap;
74
+ }
75
+
76
+ /* The tone's shape, filled with the text colour and centred on the value. */
77
+ .nxgt-score-shape {
78
+ align-self: center;
79
+ flex: none;
80
+ inline-size: 0.625rem;
81
+ block-size: 0.625rem;
82
+ background: currentColor;
83
+ }
84
+ .nxgt-score-shape[data-shape="circle"] {
85
+ border-radius: 50%;
86
+ }
87
+ .nxgt-score-shape[data-shape="triangle"] {
88
+ clip-path: polygon(50% 0, 100% 100%, 0 100%);
89
+ }
90
+ .nxgt-score-shape[data-shape="diamond"] {
91
+ clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
92
+ }
93
+
94
+ /* Locked: read-only, muted, a dashed frame and a lock. */
95
+ .nxgt-score[data-locked] {
96
+ --_sc-tone: var(--muted-foreground);
97
+ /* The dashed frame keeps 3:1 against the page (1.4.11). */
98
+ --_sc-frame: var(--nxgt-field-border, var(--border));
99
+ border-style: dashed;
100
+ background: transparent;
101
+ cursor: default;
102
+ }
103
+ /* Locked and invalid: the error colour, still dashed. */
104
+ .nxgt-score[data-locked][data-invalid] {
105
+ --_sc-frame: var(--nxgt-field-error);
106
+ }
107
+ .nxgt-score[data-locked] .nxgt-score-input {
108
+ cursor: default;
109
+ }
110
+ .nxgt-score-lock {
111
+ align-self: center;
112
+ flex: none;
113
+ inline-size: 0.875rem;
114
+ block-size: 0.875rem;
115
+ }
116
+ .nxgt-score[data-disabled] {
117
+ opacity: 0.6;
118
+ cursor: not-allowed;
119
+ }
120
+ .nxgt-score[data-disabled] .nxgt-score-input {
121
+ cursor: not-allowed;
122
+ }
123
+
124
+ /* No field-sizing: the markup sets `size` to the text's length, so the
125
+ * input stays as wide as its value and the max still hugs it. */
126
+ @supports not (field-sizing: content) {
127
+ .nxgt-score-input {
128
+ inline-size: auto;
129
+ min-inline-size: 1ch;
130
+ }
131
+ }
132
+
133
+ @media (forced-colors: active) {
134
+ .nxgt-score {
135
+ border-color: ButtonBorder;
136
+ background: transparent;
137
+ color: CanvasText;
138
+ }
139
+ .nxgt-score:focus-within {
140
+ border-color: Highlight;
141
+ outline: 2px solid Highlight;
142
+ }
143
+ .nxgt-score[data-invalid] {
144
+ border-color: Mark;
145
+ }
146
+ .nxgt-score-shape {
147
+ background: CanvasText;
148
+ forced-color-adjust: none;
149
+ }
150
+ }
151
+ }
@@ -0,0 +1,117 @@
1
+ /* QuantityField: the unit as a soft chip inside the field's one box, before the
2
+ * −/+ pair (field-stepper.css). The chip takes the steppers' tint; a focus on
3
+ * it draws the box's focus ring; a coarse pointer gets a 44px target. */
4
+ @layer components {
5
+ .nxgt-quantity-unit-addon {
6
+ --_dd-btn: color-mix(in oklab, var(--primary) 14%, var(--background));
7
+ --_dd-btn-hover: color-mix(in oklab, var(--primary) 22%, var(--background));
8
+ --_qty-chip: 1.75rem;
9
+ align-self: stretch;
10
+ margin-inline: 0.25rem;
11
+ cursor: default;
12
+ }
13
+ :is(.dark, [data-theme="dark"]) .nxgt-quantity-unit-addon {
14
+ --_dd-btn: color-mix(in oklab, var(--primary) 34%, var(--background));
15
+ --_dd-btn-hover: color-mix(in oklab, var(--primary) 44%, var(--background));
16
+ }
17
+
18
+ .nxgt-quantity-unit {
19
+ position: relative;
20
+ display: inline-flex;
21
+ align-items: center;
22
+ gap: 0.25rem;
23
+ min-inline-size: 0;
24
+ max-inline-size: 100%;
25
+ block-size: var(--_qty-chip);
26
+ padding-inline: 0.625rem 0.5rem;
27
+ border-radius: var(--nxgt-shape-corner-full);
28
+ background: var(--_dd-btn);
29
+ color: var(--primary-text);
30
+ font-size: 0.75rem;
31
+ font-weight: 600;
32
+ cursor: pointer;
33
+ outline: none;
34
+ transition: background-color var(--nxgt-motion-effects-default-duration)
35
+ var(--nxgt-motion-effects-default);
36
+ }
37
+ .nxgt-quantity-unit > span {
38
+ min-inline-size: 0;
39
+ overflow: hidden;
40
+ text-overflow: ellipsis;
41
+ white-space: nowrap;
42
+ }
43
+ .nxgt-quantity-unit svg {
44
+ flex: none;
45
+ inline-size: 0.875rem;
46
+ block-size: 0.875rem;
47
+ }
48
+ .nxgt-quantity-unit:hover:not(:disabled),
49
+ .nxgt-quantity-unit[aria-expanded="true"] {
50
+ background: var(--_dd-btn-hover);
51
+ }
52
+ .nxgt-quantity-unit:focus-visible {
53
+ outline: 2px solid var(--_fx-line, var(--nxgt-field-focus));
54
+ outline-offset: -2px;
55
+ }
56
+ .nxgt-quantity-unit:disabled {
57
+ cursor: not-allowed;
58
+ }
59
+ .nxgt-quantity-unit-addon[data-disabled] .nxgt-quantity-unit {
60
+ background: transparent;
61
+ color: var(--muted-foreground);
62
+ }
63
+
64
+ @media (pointer: coarse) {
65
+ .nxgt-quantity-unit-addon {
66
+ --_qty-chip: 2.25rem;
67
+ }
68
+ /* A transparent 44px target around the 36px chip. */
69
+ .nxgt-quantity-unit::after {
70
+ content: "";
71
+ position: absolute;
72
+ inset: -0.25rem -0.125rem;
73
+ }
74
+ }
75
+
76
+ /* The box's focus ring while the chip (not the value) has focus. */
77
+ .nxgt-field-box:where(:has(.nxgt-quantity-unit:focus-visible)) {
78
+ border-color: var(--nxgt-field-focus);
79
+ box-shadow:
80
+ 0 0 0 1px var(--nxgt-field-focus),
81
+ 0 0 0 4px var(--nxgt-field-halo);
82
+ }
83
+ .nxgt-field-box:where(
84
+ :has([data-slot][aria-invalid="true"]):has(
85
+ .nxgt-quantity-unit:focus-visible
86
+ )
87
+ ) {
88
+ border-color: var(--nxgt-field-error);
89
+ box-shadow:
90
+ 0 0 0 1px var(--nxgt-field-error),
91
+ 0 0 0 4px var(--nxgt-field-halo-invalid);
92
+ }
93
+
94
+ @media (prefers-reduced-motion: reduce) {
95
+ .nxgt-quantity-unit {
96
+ transition: none;
97
+ }
98
+ }
99
+ @media (forced-colors: active) {
100
+ .nxgt-quantity-unit {
101
+ forced-color-adjust: none;
102
+ border: 1px solid ButtonBorder;
103
+ background: ButtonFace;
104
+ color: ButtonText;
105
+ }
106
+ .nxgt-quantity-unit:focus-visible {
107
+ outline-color: Highlight;
108
+ }
109
+ .nxgt-quantity-unit[aria-expanded="true"] {
110
+ border-color: Highlight;
111
+ }
112
+ .nxgt-quantity-unit:disabled {
113
+ border-color: GrayText;
114
+ color: GrayText;
115
+ }
116
+ }
117
+ }
@@ -28,7 +28,6 @@
28
28
  .nxgt-field-box[data-size] {
29
29
  min-height: var(--nxgt-field-h);
30
30
  }
31
-
32
31
  .nxgt-field-box[data-open]:not([data-open="false"]) {
33
32
  border-color: var(--nxgt-field-focus);
34
33
  }
@@ -198,7 +197,7 @@
198
197
  font-variant-numeric: tabular-nums;
199
198
  }
200
199
  /* A soft chip in a box (a chips box) takes the page's surface, so it
201
- * reads apart from the box's tint. */
200
+ * reads apart from the box's surface. */
202
201
  .nxgt-field-box .nxgt-chip[data-look="soft"][data-tone="neutral"] {
203
202
  --chip-bg: var(--background);
204
203
  --chip-bg-hover: color-mix(
@@ -3,39 +3,48 @@
3
3
  * only, so not in the shared theme-tokens.css. Declared again under .dark so
4
4
  * a dark wrapper computes them from its own colours. Unlayered, like the
5
5
  * theme tokens: an app's own `:root` / `.dark` rule after the import wins.
6
- * The filled tint is translucent, as `bg-primary/10` (the tint fields had
7
- * before, which light keeps exactly). Dark: the filled tint is stronger,
8
- * so a filled field still reads apart from an empty one on the near-black
9
- * page (≥ 1.10:1 between the two, ≥ 1.15:1 against the page;
10
- * Guides/Accessibility/Field contrast measures both). */
6
+ * The Refined look: the surface is the card, the rest border keeps 3:1
7
+ * against it (1.4.11; Guides/Accessibility/Field contrast measures both
8
+ * themes), the focus ring is 4px. There is no filled tint any more: the
9
+ * `-filled` tokens stay, as aliases of the rest values, so a read resolves;
10
+ * an override no longer paints: style on `data-filled` instead. */
11
11
  :root,
12
12
  [data-nxgt-theme] {
13
- --nxgt-field-bg: color-mix(in oklab, var(--foreground) 2%, var(--background));
13
+ --nxgt-field-bg: var(--card);
14
14
  --nxgt-field-bg-hover: color-mix(
15
15
  in oklab,
16
- var(--foreground) 6.5%,
17
- var(--background)
16
+ var(--foreground) 2.5%,
17
+ var(--card)
18
18
  );
19
- --nxgt-field-bg-filled: color-mix(in oklab, var(--primary) 10%, transparent);
20
- --nxgt-field-bg-filled-hover: color-mix(
19
+ /* Aliases: a filled field looks like an empty one. */
20
+ --nxgt-field-bg-filled: var(--nxgt-field-bg);
21
+ --nxgt-field-bg-filled-hover: var(--nxgt-field-bg-hover);
22
+ --nxgt-field-bg-invalid: var(--nxgt-field-bg);
23
+ --nxgt-field-bg-disabled: color-mix(
21
24
  in oklab,
22
- var(--primary) 14%,
23
- transparent
25
+ var(--foreground) 5%,
26
+ var(--card)
24
27
  );
25
- --nxgt-field-bg-invalid: color-mix(
28
+ --nxgt-field-border: color-mix(in oklab, var(--foreground) 52%, var(--card));
29
+ --nxgt-field-border-hover: color-mix(
26
30
  in oklab,
27
- var(--error) 5%,
28
- var(--background)
31
+ var(--foreground) 74%,
32
+ var(--card)
29
33
  );
30
- --nxgt-field-border: color-mix(in oklab, var(--foreground) 14%, transparent);
31
- --nxgt-field-border-hover: color-mix(
34
+ --nxgt-field-border-readonly: color-mix(
35
+ in oklab,
36
+ var(--foreground) 50%,
37
+ var(--card)
38
+ );
39
+ --nxgt-field-border-disabled: color-mix(
32
40
  in oklab,
33
41
  var(--foreground) 24%,
34
- transparent
42
+ var(--card)
35
43
  );
36
44
  --nxgt-field-focus: var(--primary-text);
37
- --nxgt-field-halo: color-mix(in oklab, var(--primary-text) 22%, transparent);
38
- --nxgt-field-halo-invalid: color-mix(in oklab, var(--error) 22%, transparent);
45
+ --nxgt-field-error: var(--error-text);
46
+ --nxgt-field-halo: color-mix(in oklab, var(--primary-text) 24%, transparent);
47
+ --nxgt-field-halo-invalid: color-mix(in oklab, var(--error) 26%, transparent);
39
48
  --nxgt-field-well: color-mix(in oklab, var(--foreground) 6%, transparent);
40
49
  --nxgt-field-radius: 0.5rem;
41
50
  --nxgt-field-inner-radius: 0.25rem;
@@ -70,32 +79,41 @@
70
79
  var(--muted-foreground) 78%,
71
80
  var(--foreground)
72
81
  );
73
- --nxgt-field-bg: color-mix(in oklab, var(--foreground) 5%, var(--background));
82
+ --nxgt-field-bg: var(--card);
74
83
  --nxgt-field-bg-hover: color-mix(
75
84
  in oklab,
76
- var(--foreground) 9%,
77
- var(--background)
85
+ var(--foreground) 2.5%,
86
+ var(--card)
78
87
  );
79
- --nxgt-field-bg-filled: color-mix(in oklab, var(--primary) 26%, transparent);
80
- --nxgt-field-bg-filled-hover: color-mix(
88
+ /* Aliases: a filled field looks like an empty one. */
89
+ --nxgt-field-bg-filled: var(--nxgt-field-bg);
90
+ --nxgt-field-bg-filled-hover: var(--nxgt-field-bg-hover);
91
+ --nxgt-field-bg-invalid: var(--nxgt-field-bg);
92
+ --nxgt-field-bg-disabled: color-mix(
81
93
  in oklab,
82
- var(--primary) 32%,
83
- transparent
94
+ var(--foreground) 5%,
95
+ var(--card)
84
96
  );
85
- --nxgt-field-bg-invalid: color-mix(
97
+ --nxgt-field-border: color-mix(in oklab, var(--foreground) 52%, var(--card));
98
+ --nxgt-field-border-hover: color-mix(
86
99
  in oklab,
87
- var(--error) 10%,
88
- var(--background)
100
+ var(--foreground) 74%,
101
+ var(--card)
89
102
  );
90
- --nxgt-field-border: color-mix(in oklab, var(--foreground) 16%, transparent);
91
- --nxgt-field-border-hover: color-mix(
103
+ --nxgt-field-border-readonly: color-mix(
104
+ in oklab,
105
+ var(--foreground) 50%,
106
+ var(--card)
107
+ );
108
+ --nxgt-field-border-disabled: color-mix(
92
109
  in oklab,
93
- var(--foreground) 32%,
94
- transparent
110
+ var(--foreground) 24%,
111
+ var(--card)
95
112
  );
96
113
  --nxgt-field-focus: var(--primary-text);
97
- --nxgt-field-halo: color-mix(in oklab, var(--primary-text) 35%, transparent);
98
- --nxgt-field-halo-invalid: color-mix(in oklab, var(--error) 40%, transparent);
114
+ --nxgt-field-error: var(--error-text);
115
+ --nxgt-field-halo: color-mix(in oklab, var(--primary-text) 24%, transparent);
116
+ --nxgt-field-halo-invalid: color-mix(in oklab, var(--error) 26%, transparent);
99
117
  --nxgt-field-well: color-mix(in oklab, var(--foreground) 10%, transparent);
100
118
  --nxgt-field-list-shadow:
101
119
  0 0 0 1px color-mix(in oklab, var(--foreground) 12%, transparent),
@@ -1,18 +1,14 @@
1
1
  /* The field box: the look of every text field and picker trigger (Input,
2
- * Textarea, InputGroup, then Select, Combobox, the date fields). A soft
3
- * neutral surface, the primary tint once it holds a value, a hairline that
4
- * firms on hover, the border in primary with a 3px halo on focus.
2
+ * Textarea, InputGroup, then Select, Combobox, the date fields). The
3
+ * Refined look: the card as surface, a 1px border that keeps 3:1 and firms
4
+ * on hover, the primary border with a 4px ring on focus. A filled field
5
+ * looks like an empty one.
5
6
  * Look only: height and padding stay with each component, and a utility
6
7
  * class still wins (this is @layer components).
7
8
  *
8
- * Filled: `:placeholder-shown` for an <input> or <textarea> (CSS alone, no
9
- * state: the same markup on the server); `data-filled` on any other box,
10
- * which never matches the pseudo-class (#324), and on a file, date, time,
11
- * month, week, colour or range input, which never shows a placeholder; a
12
- * box holding an input-group control reads the control's; a <select> is
13
- * filled while its chosen option has a value, a Select trigger while
14
- * Radix does not mark it `data-placeholder`, and a chips box while it
15
- * holds a chip.
9
+ * Filled: `data-filled` stays on a box that holds a value (components set
10
+ * it, apps may style on it), but it paints nothing: the `-filled` tokens
11
+ * alias the rest ones.
16
12
  * Focus: the box itself, or an input or a combobox button directly in it
17
13
  * (TreeSelectField's box beside its chips), or the input among a chips
18
14
  * box's values.
@@ -23,7 +19,7 @@
23
19
  * field-box-modes.css. */
24
20
  @layer components {
25
21
  .nxgt-field-box {
26
- /* The surface at rest and under the pointer; filled swaps both. */
22
+ /* The surface at rest and under the pointer. */
27
23
  --_field-rest: var(--nxgt-field-bg);
28
24
  --_field-hover: var(--nxgt-field-bg-hover);
29
25
  border: 1px solid var(--nxgt-field-border);
@@ -41,53 +37,8 @@
41
37
  var(--nxgt-spring-fast, ease-out);
42
38
  }
43
39
 
44
- /* Filled. A file, date, time, month, week, colour or range input never
45
- * shows its placeholder, so `:placeholder-shown` cannot tell it is
46
- * empty: such an input tints only with `data-filled`. */
47
- .nxgt-field-box:where(
48
- :is(
49
- input:not(
50
- :is(
51
- [type="file"],
52
- [type="date"],
53
- [type="time"],
54
- [type="datetime-local"],
55
- [type="month"],
56
- [type="week"],
57
- [type="color"],
58
- [type="range"]
59
- )
60
- ),
61
- textarea
62
- ):not(:placeholder-shown),
63
- [data-filled]:not([data-filled="false"]),
64
- select:has(option:checked:not([value=""])),
65
- [data-slot="select-trigger"]:not([data-placeholder]),
66
- [data-slot="combobox-chips"]:has(
67
- [data-slot="combobox-chip"],
68
- [data-slot="chip"]
69
- ),
70
- :has(
71
- [data-slot="input-group-control"]:not(
72
- :is(
73
- [type="file"],
74
- [type="date"],
75
- [type="time"],
76
- [type="datetime-local"],
77
- [type="month"],
78
- [type="week"],
79
- [type="color"],
80
- [type="range"]
81
- )
82
- ):not(:placeholder-shown)
83
- )
84
- ) {
85
- --_field-rest: var(--nxgt-field-bg-filled);
86
- --_field-hover: var(--nxgt-field-bg-filled-hover);
87
- }
88
-
89
40
  /* Every state below is wrapped in :where(), so they all weigh one class
90
- * and their order decides: hover, focus, error, read-only, disabled. */
41
+ * and their order decides: hover, read-only, disabled, focus, error. */
91
42
 
92
43
  /* Hover: never on a disabled or read-only box. */
93
44
  .nxgt-field-box:where(:hover):where(
@@ -103,7 +54,31 @@
103
54
  background-color: var(--_field-hover);
104
55
  }
105
56
 
106
- /* Focus: the border in primary and a soft halo outside. */
57
+ /* Read-only: no surface, a dashed hairline. Before the focus rule, so a
58
+ * focused read-only box still shows its ring. */
59
+ .nxgt-field-box:where(
60
+ :is([readonly], [data-readonly]):not(:disabled),
61
+ :has([data-slot="input-group-control"][readonly])
62
+ ) {
63
+ border-style: dashed;
64
+ border-color: var(--nxgt-field-border-readonly);
65
+ background-color: transparent;
66
+ }
67
+
68
+ /* Disabled: a recessed surface and a light border, the box at 62 %. */
69
+ .nxgt-field-box:where(
70
+ :disabled,
71
+ [data-disabled],
72
+ :has([data-slot="input-group-control"]:disabled)
73
+ ) {
74
+ cursor: not-allowed;
75
+ border-color: var(--nxgt-field-border-disabled);
76
+ background-color: var(--nxgt-field-bg-disabled);
77
+ opacity: 0.62;
78
+ }
79
+
80
+ /* Focus: the 1px border and a 1px line in primary, and a 4px ring
81
+ * outside (it replaces the 3px halo). */
107
82
  .nxgt-field-box:where(
108
83
  :is(input, textarea, select, button, [role="combobox"]):focus-visible,
109
84
  [data-focused],
@@ -112,17 +87,19 @@
112
87
  :has([data-slot="input-group-control"]:focus-visible)
113
88
  ) {
114
89
  border-color: var(--nxgt-field-focus);
115
- box-shadow: 0 0 0 3px var(--nxgt-field-halo);
90
+ box-shadow:
91
+ 0 0 0 1px var(--nxgt-field-focus),
92
+ 0 0 0 4px var(--nxgt-field-halo);
116
93
  }
117
94
 
118
- /* Error: the border in the error colour and a faint error wash. */
95
+ /* Error: the border in the error text colour and a 1px line inside it. */
119
96
  .nxgt-field-box:where(
120
97
  [aria-invalid="true"],
121
98
  [data-invalid]:not([data-invalid="false"]),
122
99
  :has([data-slot][aria-invalid="true"])
123
100
  ) {
124
- border-color: var(--error);
125
- background-color: var(--nxgt-field-bg-invalid);
101
+ border-color: var(--nxgt-field-error);
102
+ box-shadow: inset 0 0 0 1px var(--nxgt-field-error);
126
103
  }
127
104
  .nxgt-field-box:where(
128
105
  [aria-invalid="true"],
@@ -135,7 +112,9 @@
135
112
  :has(> [data-slot="combobox-chips-values"] > input:focus-visible),
136
113
  :has([data-slot="input-group-control"]:focus-visible)
137
114
  ) {
138
- box-shadow: 0 0 0 3px var(--nxgt-field-halo-invalid);
115
+ box-shadow:
116
+ 0 0 0 1px var(--nxgt-field-error),
117
+ 0 0 0 4px var(--nxgt-field-halo-invalid);
139
118
  }
140
119
  /* Open in error: the error border stays (it outranks the open border,
141
120
  * field-box-parts.css), the error being still there. */
@@ -144,28 +123,7 @@
144
123
  [data-invalid]:not([data-invalid="false"]),
145
124
  :has([data-slot][aria-invalid="true"])
146
125
  ) {
147
- border-color: var(--error);
148
- }
149
-
150
- /* Read-only: no surface, a dashed hairline. */
151
- .nxgt-field-box:where(
152
- :is([readonly], [data-readonly]):not(:disabled),
153
- :has([data-slot="input-group-control"][readonly])
154
- ) {
155
- border-style: dashed;
156
- background-color: transparent;
157
- }
158
-
159
- /* Disabled: the whole box at half strength, on the neutral surface
160
- * (never the filled tint). */
161
- .nxgt-field-box:where(
162
- :disabled,
163
- [data-disabled],
164
- :has([data-slot="input-group-control"]:disabled)
165
- ) {
166
- cursor: not-allowed;
167
- background-color: var(--nxgt-field-bg);
168
- opacity: 0.5;
126
+ border-color: var(--nxgt-field-error);
169
127
  }
170
128
 
171
129
  /* A Select trigger shows the chosen item's children (Radix clones them