@nxgt/material 3.93.0 → 3.95.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.
- package/CHANGELOG.md +50 -0
- package/README.md +8 -3
- package/dist/{alert-dialog-D37eph4I.js → alert-dialog-D4r0Kn9h.js} +1 -1
- package/dist/{async-slice-BSqwhAj-.js → async-slice-Bx438UlG.js} +1 -1
- package/dist/{button-CG9SBAT-.js → button-Z_xcg10A.js} +1 -1
- package/dist/{calculator-YD3I3y-I.js → calculator-DGxClOmW.js} +10 -10
- package/dist/calculator-field.js +6 -6
- package/dist/{calculator-segment-Cjec9zi7.js → calculator-segment-DQE1EFdw.js} +1 -1
- package/dist/calculator.js +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-BbUSBl3i.js → chip-Bb9SM3Ly.js} +2 -2
- package/dist/{code-editor-ZEM7AAcs.js → code-editor-Cw-dOrn2.js} +4 -4
- package/dist/code-editor.js +4 -4
- package/dist/{code-language-items-CAuHPrHd.js → code-language-items-BVfxGKiv.js} +2 -2
- package/dist/components/components.css +7 -1
- package/dist/components/theme-tokens.css +7 -0
- package/dist/components/ui/dates/duration-field/duration-field-expressive.css +2 -63
- package/dist/components/ui/dates/picker-trigger/typed-box-expressive.css +30 -21
- package/dist/components/ui/fields/number-field/number-field-score.css +151 -0
- package/dist/components/ui/fields/quantity-field/quantity-field.css +117 -0
- package/dist/components/ui/primitives/field-box/field-box-parts.css +1 -2
- package/dist/components/ui/primitives/field-box/field-box-tokens.css +54 -36
- package/dist/components/ui/primitives/field-box/field-box.css +44 -86
- package/dist/components/ui/primitives/field-box/field-stepper.css +129 -0
- package/dist/{components-CuFTrmGy.js → components-5n6qa3vr.js} +19380 -18872
- package/dist/components.js +37 -38
- package/dist/{conversion-variant-DmEtTCSP.js → conversion-variant-BjIJep32.js} +4 -4
- package/dist/currency-field-DzLtJtDI.js +303 -0
- package/dist/{dialog-Jhpx6ulb.js → dialog-CFuONiW5.js} +3 -3
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-nl0Q3tQ2.js → dropdown-menu-BvtBDoSD.js} +1 -1
- package/dist/editor.js +442 -442
- package/dist/{empty-state-mrJuqph3.js → empty-state-n2zb23YG.js} +1 -1
- package/dist/{financial-variant-P8gFA9aI.js → financial-variant-CniddOSL.js} +7 -7
- package/dist/{hooks-CjSpziWf.js → hooks-zyRsvilJ.js} +2 -2
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-BNb1M8ij.js → hover-card-BJ15hu7B.js} +1 -1
- package/dist/i18n.js +3 -3
- package/dist/{icon-badge-CVMHwdFm.js → icon-badge-B2ns44Cz.js} +1 -1
- package/dist/{icon-button-Ch0PThsa.js → icon-button-BG438okX.js} +1 -1
- package/dist/lib/components/ui/display/entity-header/entity-metadata.d.ts +0 -7
- package/dist/lib/components/ui/display/entity-header/entity-stats.d.ts +2 -1
- package/dist/lib/components/ui/display/markdown/markdown.d.ts +2 -2
- package/dist/lib/components/ui/display/markdown/rehype-katex-classes.d.ts +21 -0
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/index.d.ts +1 -0
- package/dist/lib/components/ui/fields/markdown-textarea-field/index.d.ts +2 -0
- package/dist/lib/components/ui/fields/markdown-textarea-field/markdown-preview.d.ts +6 -0
- package/dist/lib/components/ui/fields/markdown-textarea-field/markdown-syntax-help.d.ts +4 -0
- package/dist/lib/components/ui/fields/markdown-textarea-field/markdown-tabs.d.ts +13 -0
- package/dist/lib/components/ui/fields/markdown-textarea-field/markdown-textarea-field.d.ts +23 -0
- package/dist/lib/components/ui/fields/markdown-textarea-field/markdown-textarea-form-field.d.ts +3 -0
- package/dist/lib/components/ui/fields/markdown-textarea-field/use-text-value.d.ts +6 -0
- package/dist/lib/components/ui/fields/number-field/number-control.d.ts +10 -3
- package/dist/lib/components/ui/fields/number-field/number-field-base.d.ts +2 -0
- package/dist/lib/components/ui/fields/number-field/number-field.d.ts +7 -1
- package/dist/lib/components/ui/fields/number-field/number-field.types.d.ts +13 -0
- package/dist/lib/components/ui/fields/number-field/number-score-control.d.ts +19 -0
- package/dist/lib/components/ui/fields/number-field/number-stepper.d.ts +16 -2
- package/dist/lib/components/ui/fields/quantity-field/quantity-field.d.ts +4 -3
- package/dist/lib/components/ui/fields/quantity-field/quantity-row.d.ts +5 -9
- package/dist/lib/components/ui/fields/quantity-field/quantity-unit-menu.d.ts +19 -0
- package/dist/lib/components/ui/fields/quantity-field/quantity-unit.d.ts +11 -4
- package/dist/lib/components/ui/fields/quantity-field/use-unit-chip-name.d.ts +14 -0
- package/dist/lib/components/ui/fields/switch/partials/switch-row.d.ts +2 -2
- package/dist/lib/components/ui/fields/switch/switch.d.ts +2 -2
- package/dist/lib/components/ui/fields/text-field/text-field-units.d.ts +22 -0
- package/dist/lib/components/ui/fields/text-field/text-field.d.ts +9 -0
- package/dist/lib/components/ui/fields/verification-code/partials/code-surface.d.ts +13 -6
- package/dist/lib/components/ui/fields/verification-code/partials/recovery-input.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/app-sidebar-group.d.ts +12 -0
- package/dist/lib/components/ui/layout/app-shell/types.d.ts +7 -0
- package/dist/lib/components/ui/primitives/input-group/input-group.d.ts +1 -1
- package/dist/lib/components/ui/widgets/education/questions/index.d.ts +1 -1
- package/dist/lib/components/ui/widgets/education/questions/partials/question-hints.d.ts +9 -0
- package/dist/lib/components/ui/widgets/education/questions/partials/question-reveal.d.ts +13 -0
- package/dist/lib/components/ui/widgets/education/questions/partials/rich-text.d.ts +17 -0
- package/dist/lib/components/ui/widgets/education/questions/types.d.ts +40 -1
- package/dist/lib/i18n/resources/en/en.d.ts +29 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +31 -2
- package/dist/lib/i18n/resources/fr/fr.d.ts +29 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +31 -2
- package/dist/lib/i18n/resources/resources.d.ts +58 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +53 -54
- package/dist/map.js +8 -8
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/percent-field-CeDpzUTS.js +137 -0
- package/dist/{picker-surface-CoNsDWxX.js → picker-surface-Cr2n42qv.js} +4 -4
- package/dist/{popover-BA1U82Wk.js → popover-XBAX2Shp.js} +1 -1
- package/dist/{pos-types-BQqv-kb6.js → pos-types-BFVWeJki.js} +1 -1
- package/dist/{pos-variant-D043n5y8.js → pos-variant-DWB8Bc12.js} +4 -4
- package/dist/print.js +1 -1
- package/dist/{programmer-variant-jneMqtLs.js → programmer-variant-B-wPnDeX.js} +2 -2
- package/dist/{public-DgrbdeZj.js → public-D1bH-KPQ.js} +9 -9
- package/dist/{rich-code-block-CGNjHawR.js → rich-code-block-DP2RT7pV.js} +5 -5
- package/dist/{scientific-variant-1L7brNNT.js → scientific-variant-BP08Mo0g.js} +2 -2
- package/dist/{sortable-provider-DZLV_svg.js → sortable-provider-CHGZrS0f.js} +2 -2
- package/dist/{spinner-CQqRWxAW.js → spinner-rk8J5y9O.js} +1 -1
- package/dist/styles.css +2 -0
- package/dist/{tabs-DQTx3C8e.js → tabs-nuYLggwC.js} +1 -1
- package/dist/text-field-DxKSPY0T.js +154 -0
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-3NQ3VmJH.js → theme-toggle-5waw9Wk8.js} +1 -1
- package/dist/{toolbar-items-BYCdJGUf.js → toolbar-items-Bo-nMzKJ.js} +4 -4
- package/dist/{translate-material-jxfcGlD5.js → translate-material-H5GMStyF.js} +1 -1
- package/dist/{translator-6XuDmqUJ.js → translator-gdpQeToI.js} +62 -4
- package/dist/{use-chat-composer-1eb4I1kM.js → use-chat-composer-yTODkjut.js} +24 -25
- package/dist/{use-heading-spy-CzPujlKr.js → use-heading-spy-n_wPa5jC.js} +4 -4
- package/dist/{use-material-translation-BUPqNmAg.js → use-material-translation-BW5HZMwt.js} +1 -1
- package/dist/{use-return-focus-B_enQxp5.js → use-return-focus-BC4sGh1b.js} +1 -1
- package/docs/README.md +1 -0
- package/docs/components/data-display.md +7 -6
- package/docs/components/date-and-time.md +25 -23
- package/docs/components/form-fields.md +119 -26
- package/docs/components/navigation-and-layout.md +1 -1
- package/docs/components/rich-widgets.md +29 -0
- package/docs/guides/app-shell.md +15 -0
- package/docs/guides/csp.md +20 -8
- package/docs/guides/field-look-2-x.md +10 -4
- package/docs/guides/field-look-refined.md +130 -0
- package/docs/guides/forms.md +1 -0
- package/docs/guides/i18n.md +1 -1
- package/docs/guides/layouts.md +2 -1
- package/docs/guides/theming.md +39 -31
- package/docs/previews/backgrounds-icons-quiet-band.webp +0 -0
- package/docs/previews/backgrounds-icons.webp +0 -0
- package/docs/previews/backgrounds-matrix.webp +0 -0
- package/docs/previews/buttons-actions-actioncard.webp +0 -0
- package/docs/previews/buttons-actions-backlink.webp +0 -0
- package/docs/previews/buttons-actions-button.webp +0 -0
- package/docs/previews/buttons-actions-buttongroup.webp +0 -0
- package/docs/previews/buttons-actions-fab.webp +0 -0
- package/docs/previews/buttons-actions-fabmenu.webp +0 -0
- package/docs/previews/buttons-actions-iconbutton.webp +0 -0
- package/docs/previews/buttons-actions-languageswitcher.webp +0 -0
- package/docs/previews/buttons-actions-linkbutton.webp +0 -0
- package/docs/previews/buttons-actions-loadmorebutton.webp +0 -0
- package/docs/previews/buttons-actions-loadmorefooter.webp +0 -0
- package/docs/previews/buttons-actions-responsivebutton.webp +0 -0
- package/docs/previews/buttons-actions-scrolltolatestbutton.webp +0 -0
- package/docs/previews/buttons-actions-scrolltotop.webp +0 -0
- package/docs/previews/buttons-actions-splitbutton.webp +0 -0
- package/docs/previews/buttons-actions-themetoggle.webp +0 -0
- package/docs/previews/buttons-actions-toolbar-density-and-keyboard.webp +0 -0
- package/docs/previews/buttons-actions-toolbar.webp +0 -0
- package/docs/previews/data-display-accordioncard.webp +0 -0
- package/docs/previews/data-display-apiendpoint.webp +0 -0
- package/docs/previews/data-display-apioperation.webp +0 -0
- package/docs/previews/data-display-avatar.webp +0 -0
- package/docs/previews/data-display-badge.webp +0 -0
- package/docs/previews/data-display-card-presets.webp +0 -0
- package/docs/previews/data-display-changehistory.webp +0 -0
- package/docs/previews/data-display-chip.webp +0 -0
- package/docs/previews/data-display-codegroup.webp +0 -0
- package/docs/previews/data-display-description.webp +0 -0
- package/docs/previews/data-display-enrolmentcard.webp +0 -0
- package/docs/previews/data-display-enrolmentsecret.webp +0 -0
- package/docs/previews/data-display-entityheader.webp +0 -0
- package/docs/previews/data-display-metric-cards.webp +0 -0
- package/docs/previews/data-display-periodcards.webp +0 -0
- package/docs/previews/data-display-recoverycodes.webp +0 -0
- package/docs/previews/data-display-recoverycodesstatus.webp +0 -0
- package/docs/previews/data-display-secretcard.webp +0 -0
- package/docs/previews/data-display-terminal.webp +0 -0
- package/docs/previews/data-display-timeline.webp +0 -0
- package/docs/previews/data-display-tonevalue.webp +0 -0
- package/docs/previews/data-display-votetally.webp +0 -0
- package/docs/previews/data-table-filter-lists-datagrid.webp +0 -0
- package/docs/previews/data-table-filter-lists-datatable.webp +0 -0
- package/docs/previews/data-table-filter-lists-daygroupedlist.webp +0 -0
- package/docs/previews/data-table-filter-lists-drag-and-drop.webp +0 -0
- package/docs/previews/data-table-filter-lists-facetgroup.webp +0 -0
- package/docs/previews/data-table-filter-lists-filter.webp +0 -0
- package/docs/previews/data-table-filter-lists-listempty.webp +0 -0
- package/docs/previews/data-table-filter-lists-listpane.webp +0 -0
- package/docs/previews/data-table-filter-lists-markinglist.webp +0 -0
- package/docs/previews/data-table-filter-lists-pagination.webp +0 -0
- package/docs/previews/data-table-filter-lists-servertable.webp +0 -0
- package/docs/previews/data-table-filter-lists-tree.webp +0 -0
- package/docs/previews/date-time-agefield.webp +0 -0
- package/docs/previews/date-time-calendar-expressive.webp +0 -0
- package/docs/previews/date-time-calendar.webp +0 -0
- package/docs/previews/date-time-datefield.webp +0 -0
- package/docs/previews/date-time-daterangefield.webp +0 -0
- package/docs/previews/date-time-durationfield.webp +0 -0
- package/docs/previews/date-time-fields-expressive.webp +0 -0
- package/docs/previews/date-time-halfdayrangefield.webp +0 -0
- package/docs/previews/date-time-nowindicator.webp +0 -0
- package/docs/previews/date-time-timefield.webp +0 -0
- package/docs/previews/date-time-timepicker-tiles.webp +0 -0
- package/docs/previews/date-time-timepicker.webp +0 -0
- package/docs/previews/feedback-status-alert.webp +0 -0
- package/docs/previews/feedback-status-alertdialog.webp +0 -0
- package/docs/previews/feedback-status-celebration.webp +0 -0
- package/docs/previews/feedback-status-circularprogress.webp +0 -0
- package/docs/previews/feedback-status-confirmationdialog.webp +0 -0
- package/docs/previews/feedback-status-confirmdialog.webp +0 -0
- package/docs/previews/feedback-status-countdowntimer.webp +0 -0
- package/docs/previews/feedback-status-customalertdialog.webp +0 -0
- package/docs/previews/feedback-status-customdialog.webp +0 -0
- package/docs/previews/feedback-status-emptystate.webp +0 -0
- package/docs/previews/feedback-status-errorstate.webp +0 -0
- package/docs/previews/feedback-status-hydrateloading.webp +0 -0
- package/docs/previews/feedback-status-illustration-education.webp +0 -0
- package/docs/previews/feedback-status-illustration-game.webp +0 -0
- package/docs/previews/feedback-status-illustration-health.webp +0 -0
- package/docs/previews/feedback-status-illustration.webp +0 -0
- package/docs/previews/feedback-status-notificationrow.webp +0 -0
- package/docs/previews/feedback-status-notifications.webp +0 -0
- package/docs/previews/feedback-status-pageloadfailed.webp +0 -0
- package/docs/previews/feedback-status-progress.webp +0 -0
- package/docs/previews/feedback-status-skeleton.webp +0 -0
- package/docs/previews/feedback-status-spinner.webp +0 -0
- package/docs/previews/feedback-status-stalenotice.webp +0 -0
- package/docs/previews/feedback-status-stepupdialog-retry.webp +0 -0
- package/docs/previews/feedback-status-stepupdialog.webp +0 -0
- package/docs/previews/feedback-status-toast.webp +0 -0
- package/docs/previews/feedback-status-typingindicator.webp +0 -0
- package/docs/previews/feedback-status-unsaveddialog.webp +0 -0
- package/docs/previews/form-fields-attributes.webp +0 -0
- package/docs/previews/form-fields-choicelistfield.webp +0 -0
- package/docs/previews/form-fields-colorfield.webp +0 -0
- package/docs/previews/form-fields-contacts.webp +0 -0
- package/docs/previews/form-fields-countryfield.webp +0 -0
- package/docs/previews/form-fields-currencyfield.webp +0 -0
- package/docs/previews/form-fields-emailfield.webp +0 -0
- package/docs/previews/form-fields-field.webp +0 -0
- package/docs/previews/form-fields-formsection.webp +0 -0
- package/docs/previews/form-fields-inlineedit.webp +0 -0
- package/docs/previews/form-fields-inputgroupfield.webp +0 -0
- package/docs/previews/form-fields-localizedtextfields.webp +0 -0
- package/docs/previews/form-fields-markdowntextareafield.webp +0 -0
- package/docs/previews/form-fields-numberfield.webp +0 -0
- package/docs/previews/form-fields-openinghours.webp +0 -0
- package/docs/previews/form-fields-otpfield.webp +0 -0
- package/docs/previews/form-fields-passwordfield.webp +0 -0
- package/docs/previews/form-fields-percentfield.webp +0 -0
- package/docs/previews/form-fields-phonefield.webp +0 -0
- package/docs/previews/form-fields-postaladdress.webp +0 -0
- package/docs/previews/form-fields-repeatablegroup.webp +0 -0
- package/docs/previews/form-fields-searchfield.webp +0 -0
- package/docs/previews/form-fields-slider.webp +0 -0
- package/docs/previews/form-fields-switch.webp +0 -0
- package/docs/previews/form-fields-textareafield.webp +0 -0
- package/docs/previews/form-fields-textfield.webp +0 -0
- package/docs/previews/form-fields-timezonefield.webp +0 -0
- package/docs/previews/form-fields-urlfield.webp +0 -0
- package/docs/previews/form-fields-verificationcode.webp +0 -0
- package/docs/previews/foundations-themes-gallery.webp +0 -0
- package/docs/previews/foundations-themes-icon-motifs.webp +0 -0
- package/docs/previews/foundations-themes-nesting.webp +0 -0
- package/docs/previews/foundations-themes-provider.webp +0 -0
- package/docs/previews/foundations-themes-themepicker.webp +0 -0
- package/docs/previews/guides-i18n-i18nprovider.webp +0 -0
- package/docs/previews/guides-i18n-translated-components.webp +0 -0
- package/docs/previews/media-files-audioplayer.webp +0 -0
- package/docs/previews/media-files-camera.webp +0 -0
- package/docs/previews/media-files-carousel.webp +0 -0
- package/docs/previews/media-files-filelist.webp +0 -0
- package/docs/previews/media-files-filelistfield.webp +0 -0
- package/docs/previews/media-files-filepreview.webp +0 -0
- package/docs/previews/media-files-gallery-image-lists.webp +0 -0
- package/docs/previews/media-files-gallery-video.webp +0 -0
- package/docs/previews/media-files-gallery-viewer.webp +0 -0
- package/docs/previews/media-files-gallery.webp +0 -0
- package/docs/previews/media-files-imagecropper.webp +0 -0
- package/docs/previews/media-files-imageeditor.webp +0 -0
- package/docs/previews/media-files-imagefield.webp +0 -0
- package/docs/previews/media-files-lightboxgallery.webp +0 -0
- package/docs/previews/media-files-map.webp +0 -0
- package/docs/previews/media-files-mediaplayer.webp +0 -0
- package/docs/previews/media-files-mediaplayerhost.webp +0 -0
- package/docs/previews/media-files-mediaplayerlightbox.webp +0 -0
- package/docs/previews/media-files-mediaplayermini.webp +0 -0
- package/docs/previews/media-files-minigallery.webp +0 -0
- package/docs/previews/media-files-pdfreader.webp +0 -0
- package/docs/previews/media-files-uploadfield.webp +0 -0
- package/docs/previews/navigation-layout-appshell-blue-moon.webp +0 -0
- package/docs/previews/navigation-layout-appshell-footer-icon.webp +0 -0
- package/docs/previews/navigation-layout-appshell-menu-badge.webp +0 -0
- package/docs/previews/navigation-layout-appshell-page-ground.webp +0 -0
- package/docs/previews/navigation-layout-appshell-themes.webp +0 -0
- package/docs/previews/navigation-layout-appshell.webp +0 -0
- package/docs/previews/navigation-layout-authcard-split.webp +0 -0
- package/docs/previews/navigation-layout-authcard.webp +0 -0
- package/docs/previews/navigation-layout-background.webp +0 -0
- package/docs/previews/navigation-layout-breadcrumb.webp +0 -0
- package/docs/previews/navigation-layout-doc-api.webp +0 -0
- package/docs/previews/navigation-layout-doc-blocks.webp +0 -0
- package/docs/previews/navigation-layout-doc.webp +0 -0
- package/docs/previews/navigation-layout-editorlayout.webp +0 -0
- package/docs/previews/navigation-layout-hero.webp +0 -0
- package/docs/previews/navigation-layout-landinglayout.webp +0 -0
- package/docs/previews/navigation-layout-listdetailslayout.webp +0 -0
- package/docs/previews/navigation-layout-pager.webp +0 -0
- package/docs/previews/navigation-layout-recordpage.webp +0 -0
- package/docs/previews/navigation-layout-settingslayout.webp +0 -0
- package/docs/previews/navigation-layout-sidebar.webp +0 -0
- package/docs/previews/navigation-layout-steps.webp +0 -0
- package/docs/previews/navigation-layout-stickyactionbar.webp +0 -0
- package/docs/previews/navigation-layout-threadlayout-pages.webp +0 -0
- package/docs/previews/navigation-layout-toc.webp +0 -0
- package/docs/previews/overlays-menus-contextmenu.webp +0 -0
- package/docs/previews/overlays-menus-dialog.webp +0 -0
- package/docs/previews/overlays-menus-drawer.webp +0 -0
- package/docs/previews/overlays-menus-dropdownmenu.webp +0 -0
- package/docs/previews/overlays-menus-hovercard.webp +0 -0
- package/docs/previews/overlays-menus-popover.webp +0 -0
- package/docs/previews/overlays-menus-sheet.webp +0 -0
- package/docs/previews/overlays-menus-tooltip.webp +0 -0
- package/docs/previews/primitives-accordion.webp +0 -0
- package/docs/previews/primitives-card.webp +0 -0
- package/docs/previews/primitives-collapsible.webp +0 -0
- package/docs/previews/primitives-extendedlabel.webp +0 -0
- package/docs/previews/primitives-helpertext.webp +0 -0
- package/docs/previews/primitives-input.webp +0 -0
- package/docs/previews/primitives-inputgroup.webp +0 -0
- package/docs/previews/primitives-label.webp +0 -0
- package/docs/previews/primitives-scrollarea.webp +0 -0
- package/docs/previews/primitives-segmentednav.webp +0 -0
- package/docs/previews/primitives-tabs.webp +0 -0
- package/docs/previews/primitives-tabsnav.webp +0 -0
- package/docs/previews/primitives-textarea.webp +0 -0
- package/docs/previews/primitives-toggle.webp +0 -0
- package/docs/previews/primitives-togglegroup.webp +0 -0
- package/docs/previews/primitives-typography.webp +0 -0
- package/docs/previews/rich-widgets-calculator-conversion.webp +0 -0
- package/docs/previews/rich-widgets-chat-action-proposal.webp +0 -0
- package/docs/previews/rich-widgets-chat-advanced.webp +0 -0
- package/docs/previews/rich-widgets-chat-composer.webp +0 -0
- package/docs/previews/rich-widgets-chat-inbox.webp +0 -0
- package/docs/previews/rich-widgets-chat-overview.webp +0 -0
- package/docs/previews/rich-widgets-chat-thread.webp +0 -0
- package/docs/previews/rich-widgets-chat-widget.webp +0 -0
- package/docs/previews/rich-widgets-codeeditor.webp +0 -0
- package/docs/previews/rich-widgets-compacteditor.webp +0 -0
- package/docs/previews/rich-widgets-documenteditor.webp +0 -0
- package/docs/previews/rich-widgets-drawing.webp +0 -0
- package/docs/previews/rich-widgets-emojipicker.webp +0 -0
- package/docs/previews/rich-widgets-eventcalendar.webp +0 -0
- package/docs/previews/rich-widgets-kanban-phone-layout.webp +0 -0
- package/docs/previews/rich-widgets-kanban.webp +0 -0
- package/docs/previews/rich-widgets-mentionlist.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-areachart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-barchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-combochart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-donutchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-funnelchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-heatmapchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-linechart-reference.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-linechart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-palette.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-piechart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-radarchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-radialbarchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-scatterchart.webp +0 -0
- package/docs/previews/rich-widgets-questioncard-rich-content.webp +0 -0
- package/docs/previews/rich-widgets-questionmediaview.webp +0 -0
- package/docs/previews/rich-widgets-questionnavigator.webp +0 -0
- package/docs/previews/rich-widgets-quiz.webp +0 -0
- package/docs/previews/rich-widgets-richchatcomposer.webp +0 -0
- package/docs/previews/rich-widgets-richtexteditor.webp +0 -0
- package/docs/previews/rich-widgets-richtextviewer.webp +0 -0
- package/docs/previews/selection-choice-autocomplete.webp +0 -0
- package/docs/previews/selection-choice-checkbox.webp +0 -0
- package/docs/previews/selection-choice-checkboxgroup.webp +0 -0
- package/docs/previews/selection-choice-checkcardfield.webp +0 -0
- package/docs/previews/selection-choice-chipgroupfield.webp +0 -0
- package/docs/previews/selection-choice-choicecardgroup.webp +0 -0
- package/docs/previews/selection-choice-combobox.webp +0 -0
- package/docs/previews/selection-choice-comboboxfield.webp +0 -0
- package/docs/previews/selection-choice-optiontile.webp +0 -0
- package/docs/previews/selection-choice-radiogroup.webp +0 -0
- package/docs/previews/selection-choice-select.webp +0 -0
- package/docs/previews/selection-choice-selectfield.webp +0 -0
- package/docs/previews/selection-choice-sortablelist.webp +0 -0
- package/docs/previews/selection-choice-switcher.webp +0 -0
- package/docs/previews/selection-choice-transferlist.webp +0 -0
- package/docs/previews/selection-choice-treeselectfield.webp +0 -0
- package/docs/roadmap.md +13 -10
- package/docs/troubleshooting.md +66 -6
- package/lib/components/components.css +7 -1
- package/lib/components/theme-tokens.css +7 -0
- package/lib/components/ui/dates/duration-field/duration-field-expressive.css +2 -63
- package/lib/components/ui/dates/picker-trigger/typed-box-expressive.css +30 -21
- package/lib/components/ui/fields/number-field/number-field-score.css +151 -0
- package/lib/components/ui/fields/quantity-field/quantity-field.css +117 -0
- package/lib/components/ui/primitives/field-box/field-box-parts.css +1 -2
- package/lib/components/ui/primitives/field-box/field-box-tokens.css +54 -36
- package/lib/components/ui/primitives/field-box/field-box.css +44 -86
- package/lib/components/ui/primitives/field-box/field-stepper.css +129 -0
- package/lib/styles.css +2 -0
- package/lib/themes/ambre.css +5 -1
- package/lib/themes/ardoise.css +5 -1
- package/lib/themes/bleumono.css +5 -1
- package/lib/themes/bluemoon.css +5 -1
- package/lib/themes/corail.css +5 -1
- package/lib/themes/foret.css +5 -1
- package/lib/themes/lavande.css +5 -1
- package/lib/themes/menthe.css +5 -1
- package/lib/themes/ocean.css +5 -1
- package/lib/themes/pink.css +5 -1
- package/lib/themes/prune.css +5 -1
- package/lib/themes/sable.css +5 -1
- package/lib/themes/slate.css +5 -1
- package/lib/themes/teal.css +5 -1
- package/package.json +2 -2
- package/dist/currency-field-CabGnVO9.js +0 -289
- package/dist/input-group-CPMSQcBx.js +0 -70
- package/dist/percent-field-TWyupyr_.js +0 -14
- package/dist/text-field-BAdY-kpO.js +0 -59
|
@@ -10,6 +10,7 @@ export * from './form-section/index.js';
|
|
|
10
10
|
export * from './inline-edit/index.js';
|
|
11
11
|
export * from './input-group-field/index.js';
|
|
12
12
|
export * from './localized-text-fields/index.js';
|
|
13
|
+
export * from './markdown-textarea-field/index.js';
|
|
13
14
|
export * from './number-field/index.js';
|
|
14
15
|
export * from './opening-hours/index.js';
|
|
15
16
|
export * from './otp-field/index.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type MarkdownTabsProps = {
|
|
3
|
+
/** The textarea (the Write tab). */
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
text: string;
|
|
6
|
+
minRows: number;
|
|
7
|
+
math: boolean;
|
|
8
|
+
mermaid: boolean;
|
|
9
|
+
previewClassName?: string;
|
|
10
|
+
};
|
|
11
|
+
/** The Write / Preview tab list and its two panels. */
|
|
12
|
+
export declare function MarkdownTabs({ children, text, minRows, math, mermaid, previewClassName, }: MarkdownTabsProps): import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export type MarkdownTextareaProps = {
|
|
3
|
+
label?: ReactNode;
|
|
4
|
+
helperText?: ReactNode;
|
|
5
|
+
error?: boolean;
|
|
6
|
+
/** Minimum height of the textarea, in lines. Default 6. */
|
|
7
|
+
minRows?: number;
|
|
8
|
+
/** Show the character counter. Default: when `maxLength` is set. */
|
|
9
|
+
showCount?: boolean;
|
|
10
|
+
/** Render `$...$` and `$$...$$` with KaTeX in the preview. Default `true`. */
|
|
11
|
+
math?: boolean;
|
|
12
|
+
/** Draw ```` ```mermaid ```` fences as diagrams in the preview. Default `false`. */
|
|
13
|
+
mermaid?: boolean;
|
|
14
|
+
/** Show the collapsible syntax help. Default `true`. */
|
|
15
|
+
showHelp?: boolean;
|
|
16
|
+
/** Class of the preview panel. */
|
|
17
|
+
previewClassName?: string;
|
|
18
|
+
} & ComponentProps<'textarea'>;
|
|
19
|
+
/**
|
|
20
|
+
* A textarea for Markdown with a Write / Preview tab list. The preview is
|
|
21
|
+
* rendered with `Markdown` (raw HTML is never rendered).
|
|
22
|
+
*/
|
|
23
|
+
export declare function MarkdownTextareaField({ error, helperText, label, className, minRows, showCount, maxLength, math, mermaid, showHelp, previewClassName, value, defaultValue, onChange, ...props }: MarkdownTextareaProps): import("react").JSX.Element;
|
package/dist/lib/components/ui/fields/markdown-textarea-field/markdown-textarea-form-field.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { UseControllerProps } from 'react-hook-form';
|
|
2
|
+
import { MarkdownTextareaProps } from './markdown-textarea-field.js';
|
|
3
|
+
export declare function MarkdownTextareaFormField<T extends Record<string, any>>({ control, name, ...props }: Pick<UseControllerProps<T>, 'control' | 'name'> & Omit<MarkdownTextareaProps, 'name'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ChangeEventHandler, ComponentProps } from 'react';
|
|
2
|
+
/** The text of a textarea that may be controlled or not, for the counter and the preview. */
|
|
3
|
+
export declare function useTextValue(value: ComponentProps<'textarea'>['value'], defaultValue: ComponentProps<'textarea'>['defaultValue'], onChange: ComponentProps<'textarea'>['onChange']): {
|
|
4
|
+
text: string;
|
|
5
|
+
handleChange: ChangeEventHandler<HTMLTextAreaElement>;
|
|
6
|
+
};
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { NumberFieldProps } from './number-field.types.js';
|
|
2
3
|
/**
|
|
3
|
-
* A NumberField's
|
|
4
|
-
*
|
|
4
|
+
* A NumberField's box, an InputGroup (role "group"): the value end-aligned in
|
|
5
|
+
* tabular figures, the suffix hugging it, then the "Decrease" and "Increase"
|
|
6
|
+
* buttons as a tinted round pair inside the box at the end (tab order: input,
|
|
7
|
+
* Decrease, Increase). The
|
|
5
8
|
* field's label, its help and its ids are the caller's.
|
|
6
9
|
*/
|
|
7
|
-
export declare function NumberControl({ error, disabled, value, defaultValue, onChange, onBlur, min, max, step, hideSteppers, suffix, stepperName, ...input }: Omit<NumberFieldProps, 'label' | 'helperText' | 'className'> & {
|
|
10
|
+
export declare function NumberControl({ error, disabled, value, defaultValue, onChange, onBlur, min, max, step, hideSteppers, suffix, stepperName, endAdornment, valueAlign, ...input }: Omit<NumberFieldProps, 'label' | 'helperText' | 'className'> & {
|
|
8
11
|
/** The field's plain-text name, appended to the steppers' own ("Increase Quantity"). */
|
|
9
12
|
stepperName?: string;
|
|
13
|
+
/** A part of the same box between the value and the steppers (QuantityField's unit chip). */
|
|
14
|
+
endAdornment?: ReactNode;
|
|
15
|
+
/** Where the value reads: `end` (default) or `start`, when a part follows it. */
|
|
16
|
+
valueAlign?: 'start' | 'end';
|
|
10
17
|
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { NumberFieldProps } from './number-field.types.js';
|
|
2
|
+
export declare function NumberFieldBase({ label, helperText, error, required, className, name, id, 'aria-describedby': ariaDescribedBy, variant: _variant, tone: _tone, locked: _locked, lockedReason: _lockedReason, ...control }: NumberFieldProps): import("react").JSX.Element;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import { NumberFieldProps } from './number-field.types.js';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* A number field. `variant="score"` draws a big value out of its max; the
|
|
4
|
+
* default is the boxed field (`NumberFieldBase`, which a field that never
|
|
5
|
+
* scores, such as CalculatorField, imports on its own to keep the score code
|
|
6
|
+
* out of its bundle).
|
|
7
|
+
*/
|
|
8
|
+
export declare function NumberField(props: NumberFieldProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FocusEventHandler, ReactNode, Ref } from 'react';
|
|
2
|
+
import { Tone } from '../../tones.js';
|
|
2
3
|
export type NumberFieldProps = {
|
|
3
4
|
label?: ReactNode;
|
|
4
5
|
helperText?: ReactNode;
|
|
@@ -17,6 +18,18 @@ export type NumberFieldProps = {
|
|
|
17
18
|
max?: number;
|
|
18
19
|
step?: number;
|
|
19
20
|
hideSteppers?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* `default` is the boxed field with its steppers. `score` is a big tabular
|
|
23
|
+
* value with its maximum (`suffix`, "/ 20") on the same baseline, no box at
|
|
24
|
+
* rest, no steppers.
|
|
25
|
+
*/
|
|
26
|
+
variant?: 'default' | 'score';
|
|
27
|
+
/** `score` only: the caller-set tone, drawn as text colour plus a shape marker (never colour alone). */
|
|
28
|
+
tone?: Tone;
|
|
29
|
+
/** `score` only: read-only and muted, a dashed frame and a lock. */
|
|
30
|
+
locked?: boolean;
|
|
31
|
+
/** `score` only: why it is locked, shown under the value and wired by `aria-describedby`. */
|
|
32
|
+
lockedReason?: ReactNode;
|
|
20
33
|
suffix?: ReactNode;
|
|
21
34
|
/** Names the input when it has no `label` of its own (a part of a larger field). */
|
|
22
35
|
'aria-label'?: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { NumberFieldProps } from './number-field.types.js';
|
|
3
|
+
/** The marker of a tone: success a circle, warning a triangle, error a diamond, any other a square. */
|
|
4
|
+
export declare function scoreShape(tone: string | undefined): "circle" | "square" | "diamond" | "triangle";
|
|
5
|
+
/**
|
|
6
|
+
* The `score` variant's box: a big tabular value with its maximum (`suffix`,
|
|
7
|
+
* "/ 20") on the same baseline, no box at rest, a hairline on hover and the
|
|
8
|
+
* focus ring on focus. A tone is the caller's: its text colour plus a shape
|
|
9
|
+
* marker (never colour alone). A locked score is read-only, muted, dashed, with
|
|
10
|
+
* a lock; its reason is wired by `aria-describedby` (`reasonId`).
|
|
11
|
+
*/
|
|
12
|
+
export declare function NumberScoreControl({ error, disabled, locked, reasonId, tone, value, defaultValue, onChange, onBlur, min, max, step, suffix, hideSteppers: _hideSteppers, ...input }: Omit<NumberFieldProps, 'label' | 'helperText' | 'className' | 'variant'> & {
|
|
13
|
+
reasonId?: string;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
/** Why a score is locked, under the value; the input names it in `aria-describedby`. */
|
|
16
|
+
export declare function ScoreReason({ id, children, }: {
|
|
17
|
+
id: string;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
}): import("react").JSX.Element | null;
|
|
@@ -9,11 +9,25 @@ export declare function stepperTooltipMayOpen({ hovered, focused, focusVisible,
|
|
|
9
9
|
focused: boolean;
|
|
10
10
|
focusVisible: boolean;
|
|
11
11
|
}): boolean;
|
|
12
|
-
/** A NumberField's "Decrease" or "Increase" button. */
|
|
13
|
-
export declare function NumberStepper({ direction, label, disabled, onStep, }: {
|
|
12
|
+
/** A NumberField's "Decrease" or "Increase" button: one of the tinted round pair at the end of its box. */
|
|
13
|
+
export declare function NumberStepper({ direction, label, disabled, atLimit, onStep, className, }: {
|
|
14
|
+
className?: string;
|
|
14
15
|
direction: -1 | 1;
|
|
15
16
|
label: string;
|
|
17
|
+
/** The whole field is disabled (native `disabled`). */
|
|
16
18
|
disabled?: boolean;
|
|
19
|
+
/** At `min` / `max`: `aria-disabled`, so a held button keeps focus and its tooltip. */
|
|
20
|
+
atLimit?: boolean;
|
|
21
|
+
onStep: (direction: -1 | 1) => void;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
23
|
+
/** The "Decrease" and "Increase" buttons as a tinted round pair (DurationField's look, field-stepper.css), one addon at the end of the NumberField's box. */
|
|
24
|
+
export declare function NumberStepperPair({ decreaseLabel, increaseLabel, atMin, atMax, fieldDisabled, onStep, }: {
|
|
25
|
+
decreaseLabel: string;
|
|
26
|
+
increaseLabel: string;
|
|
27
|
+
atMin?: boolean;
|
|
28
|
+
atMax?: boolean;
|
|
29
|
+
/** The whole field is disabled: native `disabled`, and the circles lose their tint. */
|
|
30
|
+
fieldDisabled?: boolean;
|
|
17
31
|
onStep: (direction: -1 | 1) => void;
|
|
18
32
|
}): import("react").JSX.Element;
|
|
19
33
|
/** The steppers' names: "Increase Quantity" once the field has a name, else "Increase". */
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { QuantityFieldProps } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* One labelled field holding an amount and its unit: a group named by the one
|
|
4
|
-
* label, a NumberField's number (locale decimal, min,
|
|
5
|
-
* after the field),
|
|
6
|
-
*
|
|
4
|
+
* label, and ONE field box holding a NumberField's number (locale decimal, min,
|
|
5
|
+
* max, step, steppers named after the field), the unit as a chip that opens a
|
|
6
|
+
* menu (a search and a typed unit with `allowCustomUnit`), and one message
|
|
7
|
+
* under the box. The value is `{ value, unit }`.
|
|
7
8
|
*/
|
|
8
9
|
export declare function QuantityField({ label, helperText, className, value, defaultValue, onChange, unitLabel, 'aria-label': ariaLabel, ...props }: QuantityFieldProps): import("react").JSX.Element;
|
|
@@ -6,17 +6,13 @@ type QuantityRowProps = Pick<QuantityFieldProps, 'name' | 'id' | 'placeholder' |
|
|
|
6
6
|
ariaLabel?: string;
|
|
7
7
|
describedBy?: string;
|
|
8
8
|
unitName: string;
|
|
9
|
+
unitNamed?: boolean;
|
|
9
10
|
stepperName?: string;
|
|
10
11
|
};
|
|
11
12
|
/**
|
|
12
|
-
* The
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* of the row, and it shrinks before the number does (the number's cell keeps
|
|
16
|
-
* 9rem: two 44px steppers and a 44px input), so the input stays a tap target at
|
|
17
|
-
* 375px; the select truncates and titles its value beyond the cap.
|
|
13
|
+
* The value, the unit chip and the steppers in ONE field box: the value at the
|
|
14
|
+
* start in tabular figures, the unit as a soft chip (capped at 52% of the box,
|
|
15
|
+
* it truncates before the value does), then the tinted round −/+ pair.
|
|
18
16
|
*/
|
|
19
|
-
export declare function
|
|
20
|
-
/** The pair on one line: the unit part shrinks first, the number (NumberControl's row) keeps 9rem. */
|
|
21
|
-
export declare function QuantityRow({ name, current, change, labelId, ariaLabel, describedBy, unitName, stepperName, unitPlaceholder, units, allowCustomUnit, ...props }: QuantityRowProps): import("react").JSX.Element;
|
|
17
|
+
export declare function QuantityRow({ name, current, change, labelId, ariaLabel, describedBy, unitName, unitNamed, stepperName, unitPlaceholder, units, allowCustomUnit, ...props }: QuantityRowProps): import("react").JSX.Element;
|
|
22
18
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { QuantityUnit } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The unit menu: a listbox of `units` with the chosen one checked. With
|
|
4
|
+
* `allowCustom` a search input sits on top and a "Use “x”" item offers what
|
|
5
|
+
* was typed. cmdk gives the arrows, Enter and the filter.
|
|
6
|
+
*/
|
|
7
|
+
export declare function QuantityUnitMenu({ units, unit, allowCustom, name, onPick, rootRef, }: {
|
|
8
|
+
units: QuantityUnit[];
|
|
9
|
+
unit: string;
|
|
10
|
+
allowCustom?: boolean;
|
|
11
|
+
/** Names the listbox. */
|
|
12
|
+
name: string;
|
|
13
|
+
onPick: (unit: string) => void;
|
|
14
|
+
rootRef: (element: HTMLDivElement | null) => void;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
/** The popover around the menu, end-aligned; focus lands on the search or the list. */
|
|
17
|
+
export declare function QuantityUnitPopup({ label, onPick, ...menu }: Omit<Parameters<typeof QuantityUnitMenu>[0], 'name' | 'rootRef'> & {
|
|
18
|
+
label: string;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { QuantityFieldProps } from './types.js';
|
|
2
|
-
type QuantityUnitProps = Pick<QuantityFieldProps, 'units' | 'allowCustomUnit' | 'disabled'
|
|
2
|
+
type QuantityUnitProps = Pick<QuantityFieldProps, 'units' | 'allowCustomUnit' | 'disabled'> & {
|
|
3
3
|
unit: string;
|
|
4
4
|
onUnit: (unit: string) => void;
|
|
5
5
|
name?: string;
|
|
6
|
+
/** Names the unit part ("Dose unit"): the menu's name, and the chip's when `chipName` is set. */
|
|
6
7
|
label: string;
|
|
8
|
+
/** The chip's own prefix when the caller named the part (`unitLabel`). */
|
|
9
|
+
named?: boolean;
|
|
7
10
|
placeholder?: string;
|
|
8
|
-
describedBy?: string;
|
|
9
11
|
};
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
+
/**
|
|
13
|
+
* A quantity's unit as a soft chip inside the field's box, before the steppers.
|
|
14
|
+
* It opens a menu end-aligned under it: a listbox of `units`, or with
|
|
15
|
+
* `allowCustomUnit` a search input and a "Use “x”" item. A unit outside
|
|
16
|
+
* `units` shows as typed. The chip is named "Unit: <label>".
|
|
17
|
+
*/
|
|
18
|
+
export declare function QuantityUnitChip({ units, allowCustomUnit, disabled, unit, onUnit, name, label, named, placeholder, }: QuantityUnitProps): import("react").JSX.Element;
|
|
12
19
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { QuantityUnit } from './types.js';
|
|
2
|
+
/** What the unit chip shows, and its accessible name ("Unit: mg", "Age unit: months"). */
|
|
3
|
+
export declare function useUnitChipName({ units, unit, label, named, placeholder, }: {
|
|
4
|
+
units: QuantityUnit[];
|
|
5
|
+
unit: string;
|
|
6
|
+
label: string;
|
|
7
|
+
named?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
}): {
|
|
10
|
+
known: QuantityUnit | undefined;
|
|
11
|
+
shown: string;
|
|
12
|
+
text: string;
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
@@ -6,11 +6,11 @@ export type SwitchRowProps = {
|
|
|
6
6
|
text: ReactNode;
|
|
7
7
|
isChecked: boolean;
|
|
8
8
|
error?: boolean;
|
|
9
|
-
/** `plain` draws the row without the field box: no border
|
|
9
|
+
/** `plain` draws the row without the field box: no border. */
|
|
10
10
|
variant?: 'box' | 'plain';
|
|
11
11
|
className?: string;
|
|
12
12
|
/** The switch itself. */
|
|
13
13
|
children: ReactNode;
|
|
14
14
|
};
|
|
15
|
-
/** The bordered row (or, `plain`, the unboxed one): its text,
|
|
15
|
+
/** The bordered row (or, `plain`, the unboxed one): its text, then the switch. The row carries `data-checked`; the checked state shows in the track, the thumb and the primary label. */
|
|
16
16
|
export declare function SwitchRow({ id, rowTextId, text, isChecked, error, variant, className, children, }: SwitchRowProps): import("react").JSX.Element;
|
|
@@ -6,9 +6,9 @@ export type SwitchProps = {
|
|
|
6
6
|
helperText?: ReactNode;
|
|
7
7
|
placeholder?: ReactNode;
|
|
8
8
|
/**
|
|
9
|
-
* How a labelled switch is drawn: `box` (default) is the bordered
|
|
9
|
+
* How a labelled switch is drawn: `box` (default) is the bordered
|
|
10
10
|
* row of an input; `plain` keeps the label beside the switch with no
|
|
11
|
-
* border
|
|
11
|
+
* border. Without a `label` or `placeholder` it changes nothing.
|
|
12
12
|
*/
|
|
13
13
|
variant?: 'box' | 'plain';
|
|
14
14
|
} & SwitchControlProps;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { InputProps } from '../../primitives/input/input.js';
|
|
3
|
+
/**
|
|
4
|
+
* What the hidden mirror measures: the value (the caller's when controlled,
|
|
5
|
+
* what was typed when not, the default after a form reset), else the
|
|
6
|
+
* placeholder. A password is measured as bullets, never as its text.
|
|
7
|
+
*/
|
|
8
|
+
export declare function mirrorText(type: string | undefined, value: string, placeholder: string | undefined): string;
|
|
9
|
+
/**
|
|
10
|
+
* The field box of a TextField with a text unit ("#", "/ 20", "kg"): a flex
|
|
11
|
+
* row of leading, input and trailing, all inside one box. Each side is an
|
|
12
|
+
* `InputGroupAddon` (a click on it focuses the input); a text unit is muted,
|
|
13
|
+
* 0.25rem from the value, and an element (an icon, an icon button) keeps its
|
|
14
|
+
* 32px (44px on a touch screen) size. With a trailing unit the input is sized
|
|
15
|
+
* to its content (a hidden mirror in the same grid cell, so it needs no
|
|
16
|
+
* `field-sizing`), which puts the unit right after the last character;
|
|
17
|
+
* without one the input fills the row. Internal.
|
|
18
|
+
*/
|
|
19
|
+
export declare function TextFieldUnits({ leading, trailing, ...props }: InputProps & {
|
|
20
|
+
leading?: ReactNode;
|
|
21
|
+
trailing?: ReactNode;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
@@ -3,7 +3,16 @@ import { InputProps } from '../../primitives/input/input.js';
|
|
|
3
3
|
export type TextFieldProps = {
|
|
4
4
|
label?: ReactNode;
|
|
5
5
|
helperText?: ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* Before the value. An element (an icon, an icon button) is muted, with no
|
|
8
|
+
* well fill; text ("#") is a muted unit that hugs the value.
|
|
9
|
+
*/
|
|
6
10
|
leading?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* After the value. An element (an icon, an icon button) is muted, with no
|
|
13
|
+
* well fill; text ("/ 20", "kg") is a muted unit that sits right after the
|
|
14
|
+
* value, which the input is sized to.
|
|
15
|
+
*/
|
|
7
16
|
trailing?: ReactNode;
|
|
8
17
|
error?: boolean;
|
|
9
18
|
} & InputProps;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The look the code field's two controls share, the six slots and the
|
|
3
|
-
* recovery code's text input:
|
|
3
|
+
* recovery code's text input: the field card fill
|
|
4
4
|
* inside a hairline ring that holds 3:1 against the card in both themes
|
|
5
|
-
* (WCAG 1.4.11
|
|
5
|
+
* (WCAG 1.4.11; the field border tokens, firmer on hover), a 1px primary ring
|
|
6
|
+
* with the 4px field halo over the page background while active,
|
|
6
7
|
* and a soft error tint. The ring is a transparent border in forced colours,
|
|
7
8
|
* where a box-shadow is dropped.
|
|
8
9
|
*/
|
|
9
|
-
export declare const SURFACE = "border border-transparent bg-
|
|
10
|
-
|
|
11
|
-
export declare const
|
|
12
|
-
|
|
10
|
+
export declare const SURFACE = "border border-transparent bg-(--nxgt-field-bg) ring-1 ring-inset ring-(--nxgt-field-border) hover:ring-(--nxgt-field-border-hover) transition-[box-shadow,background-color,color] duration-150 forced-colors:border-[ButtonText]";
|
|
11
|
+
/** The focus of a slot (the active one): the field box's 1px border and 4px halo. */
|
|
12
|
+
export declare const SURFACE_ACTIVE = "bg-background ring-1 ring-(--nxgt-field-focus) hover:ring-(--nxgt-field-focus) shadow-[0_0_0_4px_var(--nxgt-field-halo)] dark:bg-background forced-colors:border-[Highlight]";
|
|
13
|
+
/** The same focus on an input (the recovery code), on `:focus-visible`. */
|
|
14
|
+
export declare const FOCUS = "focus-visible:bg-background focus-visible:ring-(--nxgt-field-focus) focus-visible:shadow-[0_0_0_4px_var(--nxgt-field-halo)]";
|
|
15
|
+
export declare const SURFACE_ERROR = "bg-error/10 text-error-text ring-(--nxgt-field-error) hover:ring-(--nxgt-field-error) dark:bg-error/20 forced-colors:border-[LinkText]";
|
|
16
|
+
/** An error's focus: the error ring and its halo, no primary. */
|
|
17
|
+
export declare const SURFACE_ACTIVE_ERROR = "ring-(--nxgt-field-error) hover:ring-(--nxgt-field-error) shadow-[0_0_0_4px_var(--nxgt-field-halo-invalid)]";
|
|
18
|
+
export declare const FOCUS_ERROR = "focus-visible:ring-(--nxgt-field-error) focus-visible:shadow-[0_0_0_4px_var(--nxgt-field-halo-invalid)]";
|
|
19
|
+
export declare const SURFACE_LOCKED = "bg-foreground/4 text-muted-foreground ring-(--nxgt-field-border-disabled) hover:ring-(--nxgt-field-border-disabled) dark:bg-foreground/6 forced-colors:border-[GrayText]";
|
|
@@ -2,6 +2,6 @@ import { ComponentProps } from 'react';
|
|
|
2
2
|
type Props = {
|
|
3
3
|
state: 'idle' | 'error' | 'locked';
|
|
4
4
|
} & Omit<ComponentProps<'input'>, 'type'>;
|
|
5
|
-
/** The recovery code's text input, with the slots'
|
|
5
|
+
/** The recovery code's text input, with the slots' card fill and ring. */
|
|
6
6
|
export declare function RecoveryInput({ state, className, ...props }: Props): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AppShellLinkComponent, MenuItem } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* An entry of the expanded sidebar whose `children` fold (`defaultExpanded`
|
|
4
|
+
* set): the entry's row with a chevron button after it, then the children
|
|
5
|
+
* nested, hidden (out of the tab order too) while folded. The state is local, and a folded group opens at first when its current page is a child:
|
|
6
|
+
* the server render and the first client render both follow `defaultExpanded`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function AppSidebarGroup({ item, activeUrl, linkComponent, }: {
|
|
9
|
+
item: MenuItem;
|
|
10
|
+
activeUrl?: string;
|
|
11
|
+
linkComponent: AppShellLinkComponent;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
@@ -66,6 +66,13 @@ export type MenuItem = {
|
|
|
66
66
|
* like the expanded sidebar. Ignored without `children`.
|
|
67
67
|
*/
|
|
68
68
|
childrenIn?: 'sidebar';
|
|
69
|
+
/**
|
|
70
|
+
* Makes the `children` collapsible in the expanded sidebar: a chevron
|
|
71
|
+
* button after the entry folds and unfolds them. `true`: open at first;
|
|
72
|
+
* `false`: folded at first, unless the current page is one of them. Unset: they are always listed. The phone's menu
|
|
73
|
+
* sheet and the other presets ignore it. Ignored without `children` and with `display: 'icon'`.
|
|
74
|
+
*/
|
|
75
|
+
defaultExpanded?: boolean;
|
|
69
76
|
/** The section this entry belongs to, already translated: the drawer draws one section per group. */
|
|
70
77
|
group?: string;
|
|
71
78
|
/** Whether a bottom navigation bar shows this entry (the others go under "More"): the bar and the floating toolbar. */
|
|
@@ -10,7 +10,7 @@ declare function InputGroupButton({ className, type, variant, ...props }: IconBu
|
|
|
10
10
|
declare function InputGroupText({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
11
11
|
/**
|
|
12
12
|
* The control of an InputGroup: a bare `<input>`, the group is the field
|
|
13
|
-
* box (it reads the control's `:placeholder-shown` for
|
|
13
|
+
* box (it reads the control's `:placeholder-shown` for `data-filled`).
|
|
14
14
|
*/
|
|
15
15
|
declare function InputGroupInput({ className, type, ...props }: React.ComponentProps<'input'>): React.JSX.Element;
|
|
16
16
|
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<'textarea'>): React.JSX.Element;
|
|
@@ -2,4 +2,4 @@ export { QuestionCard } from './question.js';
|
|
|
2
2
|
export { answerParts, isAnswerCorrect, isAnswered, parseAnswerNumber, } from './question.utils.js';
|
|
3
3
|
export { QuestionMediaView } from './question-media-view.js';
|
|
4
4
|
export type { QuestionMediaFile, QuestionMediaViewProps, } from './question-media-view.types.js';
|
|
5
|
-
export type { Question, QuestionAnswer, QuestionCodeField, QuestionImage, QuestionKind, QuestionMedia, QuestionMediaKind, QuestionOption, QuestionPoints, QuestionProps, QuestionVerdict, } from './types.js';
|
|
5
|
+
export type { Question, QuestionAnswer, QuestionCodeField, QuestionExample, QuestionImage, QuestionKind, QuestionMedia, QuestionMediaKind, QuestionOption, QuestionPoints, QuestionProps, QuestionReference, QuestionVerdict, } from './types.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hints revealed one at a time. The button names the next one ("Show hint 2
|
|
3
|
+
* of 3"); the revealed hint takes the focus, and a status line keeps the count
|
|
4
|
+
* ("Hint 2 of 3") for a screen reader.
|
|
5
|
+
*/
|
|
6
|
+
export declare function QuestionHints({ hints, markdown, }: {
|
|
7
|
+
hints: string[];
|
|
8
|
+
markdown?: boolean;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Question } from '../types.js';
|
|
2
|
+
/** Why each option is right or wrong, for the options that carry an `explanation`. */
|
|
3
|
+
export declare function QuestionOptionExplanations({ question, }: {
|
|
4
|
+
question: Question;
|
|
5
|
+
}): import("react").JSX.Element | null;
|
|
6
|
+
/** The sources of a question: a labelled list, a link when there is a safe `url`. */
|
|
7
|
+
export declare function QuestionReferences({ question }: {
|
|
8
|
+
question: Question;
|
|
9
|
+
}): import("react").JSX.Element | null;
|
|
10
|
+
/** A `code` question's examples: a table with an input and an expected column. */
|
|
11
|
+
export declare function QuestionExamples({ question }: {
|
|
12
|
+
question: Question;
|
|
13
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Question } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* A question's text: plain, or Markdown with math when the question's
|
|
5
|
+
* `markdown` is on. Raw HTML is never rendered; mermaid is off. `inline` keeps
|
|
6
|
+
* it to phrasing content (the prompt, a label, a sentence).
|
|
7
|
+
*/
|
|
8
|
+
export declare function RichText({ markdown, inline, children, className, }: {
|
|
9
|
+
markdown?: boolean;
|
|
10
|
+
inline?: boolean;
|
|
11
|
+
children: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
/** An option label: inline Markdown only when it is a string and the question asks for it. */
|
|
15
|
+
export declare function richLabel(label: ReactNode, markdown?: boolean): ReactNode;
|
|
16
|
+
/** The answer parts of a sentence ("Correct answer: …"): option labels as inline Markdown, typed answers as they are. */
|
|
17
|
+
export declare function richParts(question: Question, parts: ReactNode[]): ReactNode[];
|
|
@@ -38,6 +38,22 @@ export type QuestionOption = {
|
|
|
38
38
|
description?: ReactNode;
|
|
39
39
|
/** A picture: the options of the question become picture cards. */
|
|
40
40
|
image?: QuestionImage;
|
|
41
|
+
/**
|
|
42
|
+
* Why this option is right or wrong, shown once the card is revealed (and in
|
|
43
|
+
* a `preview`), in a list under the question. Markdown when the question's
|
|
44
|
+
* `markdown` is on.
|
|
45
|
+
*/
|
|
46
|
+
explanation?: string;
|
|
47
|
+
};
|
|
48
|
+
/** A source quoted in the reveal: a plain title, or a link when it has a `url`. */
|
|
49
|
+
export type QuestionReference = {
|
|
50
|
+
title: string;
|
|
51
|
+
url?: string;
|
|
52
|
+
};
|
|
53
|
+
/** A visible example of a `code` question: what goes in and what must come out. */
|
|
54
|
+
export type QuestionExample = {
|
|
55
|
+
input: string;
|
|
56
|
+
expected: string;
|
|
41
57
|
};
|
|
42
58
|
/** A choice id, the ids of a multi, the text (or the number as text) typed. */
|
|
43
59
|
export type QuestionAnswer = string | string[] | null;
|
|
@@ -47,14 +63,37 @@ export type Question = {
|
|
|
47
63
|
kind: QuestionKind;
|
|
48
64
|
options?: QuestionOption[];
|
|
49
65
|
correct?: string | string[];
|
|
66
|
+
/** Markdown when `markdown` is on. */
|
|
50
67
|
explanation?: string;
|
|
51
68
|
required?: boolean;
|
|
52
69
|
placeholder?: string;
|
|
53
70
|
exact?: boolean;
|
|
54
71
|
/** A picture shown with the prompt; give it an `alt` unless decorative. */
|
|
55
72
|
media?: QuestionMedia;
|
|
56
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Draws the `prompt`, the string option labels, the `explanation`, the
|
|
75
|
+
* option explanations and the hints as Markdown with math (`$x^2$`), through
|
|
76
|
+
* the library's safe `Markdown` (raw HTML is not rendered, mermaid is off).
|
|
77
|
+
* Default `false`: plain text, as before.
|
|
78
|
+
*/
|
|
79
|
+
markdown?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Shown on demand, behind a "Show hint" button.
|
|
82
|
+
* @deprecated Use `hints`. Ignored when `hints` is not empty.
|
|
83
|
+
*/
|
|
57
84
|
hint?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Hints revealed one at a time, in order, behind a "Show hint 1 of N" button
|
|
87
|
+
* that moves the focus to the hint it reveals. Hidden once the card is
|
|
88
|
+
* revealed.
|
|
89
|
+
*/
|
|
90
|
+
hints?: string[];
|
|
91
|
+
/** Sources listed in the reveal; a `url` makes an external link (`rel="noopener noreferrer"`). */
|
|
92
|
+
references?: QuestionReference[];
|
|
93
|
+
/** `code`: the code field starts with this when there is no draft (`value` is null or undefined). */
|
|
94
|
+
starterCode?: string;
|
|
95
|
+
/** `code`: examples shown as a table (input, expected output) above the field. */
|
|
96
|
+
examples?: QuestionExample[];
|
|
58
97
|
/** `number`: how far off an answer may be and still count (default 0). */
|
|
59
98
|
tolerance?: number;
|
|
60
99
|
/** `number`: the unit shown after the field ("km", "%"). */
|
|
@@ -375,6 +375,17 @@ export declare const en: {
|
|
|
375
375
|
hint: string;
|
|
376
376
|
"show-hint": string;
|
|
377
377
|
"hide-hint": string;
|
|
378
|
+
rich: {
|
|
379
|
+
hints: string;
|
|
380
|
+
"show-next-hint": string;
|
|
381
|
+
"hint-n": string;
|
|
382
|
+
"option-explanations": string;
|
|
383
|
+
references: string;
|
|
384
|
+
"new-tab": string;
|
|
385
|
+
examples: string;
|
|
386
|
+
"example-input": string;
|
|
387
|
+
"example-expected": string;
|
|
388
|
+
};
|
|
378
389
|
correct: string;
|
|
379
390
|
incorrect: string;
|
|
380
391
|
unanswered: string;
|
|
@@ -1353,8 +1364,24 @@ export declare const en: {
|
|
|
1353
1364
|
"increase-named": string;
|
|
1354
1365
|
};
|
|
1355
1366
|
"quantity-field": {
|
|
1367
|
+
search: string;
|
|
1356
1368
|
unit: string;
|
|
1369
|
+
"unit-chip": string;
|
|
1357
1370
|
"unit-named": string;
|
|
1371
|
+
"use-typed": string;
|
|
1372
|
+
};
|
|
1373
|
+
"markdown-textarea-field": {
|
|
1374
|
+
write: string;
|
|
1375
|
+
preview: string;
|
|
1376
|
+
mode: string;
|
|
1377
|
+
empty: string;
|
|
1378
|
+
help: string;
|
|
1379
|
+
"help-bold": string;
|
|
1380
|
+
"help-list": string;
|
|
1381
|
+
"help-code": string;
|
|
1382
|
+
"help-inline-math": string;
|
|
1383
|
+
"help-block-math": string;
|
|
1384
|
+
"help-escape": string;
|
|
1358
1385
|
};
|
|
1359
1386
|
"textarea-field": {
|
|
1360
1387
|
count: string;
|
|
@@ -3518,6 +3545,8 @@ export declare const en: {
|
|
|
3518
3545
|
"rail-toggle": string;
|
|
3519
3546
|
"panel-collapse": string;
|
|
3520
3547
|
"panel-expand": string;
|
|
3548
|
+
"group-collapse": string;
|
|
3549
|
+
"group-expand": string;
|
|
3521
3550
|
};
|
|
3522
3551
|
dashboard: {
|
|
3523
3552
|
edit: string;
|