@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.
- package/CHANGELOG.md +42 -0
- package/README.md +6 -2
- package/dist/{alert-dialog-BaqK-rmd.js → alert-dialog-D4r0Kn9h.js} +1 -1
- package/dist/{async-slice-BfNpIJAH.js → async-slice-Bx438UlG.js} +1 -1
- package/dist/{button-CozGHXAv.js → button-Z_xcg10A.js} +1 -1
- package/dist/{calculator-BIx6cwgU.js → calculator-BfIBMiFX.js} +10 -10
- package/dist/calculator-field.js +6 -6
- package/dist/{calculator-segment-BsaxUtzL.js → calculator-segment-DQE1EFdw.js} +1 -1
- package/dist/calculator.js +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-DMEUGYdC.js → chip-Bb9SM3Ly.js} +2 -2
- package/dist/{code-editor-BWfky-aN.js → code-editor-Cw-dOrn2.js} +4 -4
- package/dist/code-editor.js +4 -4
- package/dist/{code-language-items-BUaNYJuw.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-CZpdAQMh.js → components-DXCfO95n.js} +13787 -13699
- package/dist/components.js +26 -27
- package/dist/{conversion-variant-aIBhul_U.js → conversion-variant-Ciii9Rbh.js} +4 -4
- package/dist/currency-field-DipsI0Bv.js +303 -0
- package/dist/{dialog-H40HjqXN.js → dialog-CFuONiW5.js} +3 -3
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-CawkIlW8.js → dropdown-menu-BvtBDoSD.js} +1 -1
- package/dist/editor.js +8 -8
- package/dist/{empty-state-sRVjgCis.js → empty-state-n2zb23YG.js} +1 -1
- package/dist/{financial-variant-Bqo9-swy.js → financial-variant-CTXTLbE_.js} +7 -7
- package/dist/{hooks-BTj_WJm9.js → hooks-zyRsvilJ.js} +2 -2
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-BZU1DWGY.js → hover-card-BJ15hu7B.js} +1 -1
- package/dist/i18n.js +3 -3
- package/dist/{icon-badge-CXgvqMsM.js → icon-badge-B2ns44Cz.js} +1 -1
- package/dist/{icon-button-B9WjQ3RO.js → icon-button-BG438okX.js} +1 -1
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- 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 +24 -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/i18n/resources/en/en.d.ts +5 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +7 -2
- package/dist/lib/i18n/resources/fr/fr.d.ts +5 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +7 -2
- package/dist/lib/i18n/resources/resources.d.ts +10 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +32 -33
- package/dist/map.js +8 -8
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/percent-field-Cjc_3pP0.js +137 -0
- package/dist/{picker-surface-D2aYI4v7.js → picker-surface-Cr2n42qv.js} +4 -4
- package/dist/{popover-QQYPWzw6.js → popover-XBAX2Shp.js} +1 -1
- package/dist/{pos-types-BIeZGGAs.js → pos-types-BFVWeJki.js} +1 -1
- package/dist/{pos-variant-Cdn1AVoA.js → pos-variant-DWB8Bc12.js} +4 -4
- package/dist/print.js +1 -1
- package/dist/{programmer-variant-CMBybkqw.js → programmer-variant-B-wPnDeX.js} +2 -2
- package/dist/{public-CPxFxbi4.js → public-D1bH-KPQ.js} +9 -9
- package/dist/{rich-code-block-DKJ8eKzL.js → rich-code-block-DP2RT7pV.js} +5 -5
- package/dist/{scientific-variant-CXL1ayb7.js → scientific-variant-BP08Mo0g.js} +2 -2
- package/dist/{sortable-provider-BYqwwyr1.js → sortable-provider-CHGZrS0f.js} +2 -2
- package/dist/{spinner-D7ol2n_-.js → spinner-rk8J5y9O.js} +1 -1
- package/dist/styles.css +2 -0
- package/dist/{tabs-DyiFTy5g.js → tabs-nuYLggwC.js} +1 -1
- package/dist/text-field-DOndWDT5.js +169 -0
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-QZ0bIrg9.js → theme-toggle-5waw9Wk8.js} +1 -1
- package/dist/{toolbar-items-BpOEBsSt.js → toolbar-items-Bo-nMzKJ.js} +4 -4
- package/dist/{translate-material-DlMetRSJ.js → translate-material-H5GMStyF.js} +1 -1
- package/dist/{translator-VtzVrnLm.js → translator-gdpQeToI.js} +14 -4
- package/dist/{use-chat-composer-DQ2rTD_q.js → use-chat-composer-DEd6GM2N.js} +23 -24
- package/dist/{use-heading-spy-17B5xa7B.js → use-heading-spy-n_wPa5jC.js} +4 -4
- package/dist/{use-material-translation-Cx5u36V5.js → use-material-translation-BW5HZMwt.js} +1 -1
- package/dist/{use-return-focus-S7g7q_Yn.js → use-return-focus-BC4sGh1b.js} +1 -1
- package/docs/README.md +1 -0
- package/docs/components/date-and-time.md +25 -23
- package/docs/components/form-fields.md +80 -26
- package/docs/components/navigation-and-layout.md +1 -1
- package/docs/guides/app-shell.md +15 -0
- package/docs/guides/field-look-2-x.md +10 -4
- package/docs/guides/field-look-refined.md +130 -0
- 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-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 +44 -0
- 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-IcEMAcAw.js +0 -289
- package/dist/input-group-Df9vp2EZ.js +0 -70
- package/dist/percent-field-DrI4_J7x.js +0 -14
- package/dist/text-field-BAdY-kpO.js +0 -59
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { n as t } from "./spinner-D7ol2n_-.js";
|
|
3
|
-
import { a as n, i as r, n as i } from "./field-blur-context-BLGgf_3z.js";
|
|
4
|
-
import { i as a } from "./translate-material-DlMetRSJ.js";
|
|
5
|
-
import { t as o } from "./use-material-translation-Cx5u36V5.js";
|
|
6
|
-
import { t as s } from "./icon-button-B9WjQ3RO.js";
|
|
7
|
-
import { t as c } from "./input-CC2joTjB.js";
|
|
8
|
-
import { a as l, i as u, n as d, t as f } from "./input-group-Df9vp2EZ.js";
|
|
9
|
-
import { t as p } from "./text-field-BAdY-kpO.js";
|
|
10
|
-
import { t as m } from "./number.utils-CSueQZcv.js";
|
|
11
|
-
import { useCallback as h, useEffect as g, useId as _, useMemo as v, useRef as y, useState as b } from "react";
|
|
12
|
-
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
13
|
-
import { Minus as C, Plus as w } from "lucide-react";
|
|
14
|
-
import { clampNumber as T, parseNumberInput as E, stepNumber as D } from "@nxgt/material-core/parse-number";
|
|
15
|
-
import { currencyFractionDigits as O } from "@nxgt/material-core/currency-digits";
|
|
16
|
-
//#region lib/components/ui/fields/number-field/number-stepper.tsx
|
|
17
|
-
function k({ hovered: e, focused: t, focusVisible: n }) {
|
|
18
|
-
return e || !t || n;
|
|
19
|
-
}
|
|
20
|
-
function A(e) {
|
|
21
|
-
try {
|
|
22
|
-
return e.matches(":focus-visible");
|
|
23
|
-
} catch {
|
|
24
|
-
return !0;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function j({ direction: e, label: n, disabled: r, onStep: i }) {
|
|
28
|
-
let a = y(null), o = y(!1), [c, l] = b(!1);
|
|
29
|
-
return /* @__PURE__ */ x(t, {
|
|
30
|
-
content: n,
|
|
31
|
-
open: c,
|
|
32
|
-
onOpenChange: (e) => {
|
|
33
|
-
let t = a.current;
|
|
34
|
-
l(e && k({
|
|
35
|
-
hovered: o.current,
|
|
36
|
-
focused: t != null && document.activeElement === t,
|
|
37
|
-
focusVisible: t != null && A(t)
|
|
38
|
-
}));
|
|
39
|
-
},
|
|
40
|
-
children: /* @__PURE__ */ x(s, {
|
|
41
|
-
ref: a,
|
|
42
|
-
variant: "outlined",
|
|
43
|
-
color: "default",
|
|
44
|
-
className: "size-9 shrink-0 rounded-field",
|
|
45
|
-
disabled: r,
|
|
46
|
-
"aria-label": n,
|
|
47
|
-
onPointerEnter: () => {
|
|
48
|
-
o.current = !0;
|
|
49
|
-
},
|
|
50
|
-
onPointerLeave: () => {
|
|
51
|
-
o.current = !1;
|
|
52
|
-
},
|
|
53
|
-
onClick: () => i(e),
|
|
54
|
-
children: x(e < 0 ? C : w, {})
|
|
55
|
-
})
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
function M(e) {
|
|
59
|
-
let { t } = o();
|
|
60
|
-
return e ? {
|
|
61
|
-
decreaseLabel: t("material.number-field.decrease-named", "Decrease {label}", { label: e }),
|
|
62
|
-
increaseLabel: t("material.number-field.increase-named", "Increase {label}", { label: e })
|
|
63
|
-
} : {
|
|
64
|
-
decreaseLabel: t("material.number-field.decrease", "Decrease"),
|
|
65
|
-
increaseLabel: t("material.number-field.increase", "Increase")
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region lib/components/ui/fields/number-field/format-number-input.ts
|
|
70
|
-
function N(e, t = "en") {
|
|
71
|
-
let n = String(e === 0 ? 0 : e);
|
|
72
|
-
try {
|
|
73
|
-
let r = m(e === 0 ? 0 : e, {
|
|
74
|
-
language: t,
|
|
75
|
-
useGrouping: !1,
|
|
76
|
-
maximumFractionDigits: 20,
|
|
77
|
-
numberingSystem: "latn"
|
|
78
|
-
}), i = E(r);
|
|
79
|
-
return e !== 0 && i !== e ? n : r;
|
|
80
|
-
} catch {
|
|
81
|
-
return n;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
//#endregion
|
|
85
|
-
//#region lib/components/ui/fields/number-field/use-number-input.ts
|
|
86
|
-
function P({ value: e, defaultValue: t, onChange: n, min: r, max: i, step: a, language: o }) {
|
|
87
|
-
let s = (e) => N(e, o), c = e !== void 0, [l, u] = b(t), d = c ? e : l, [f, p] = b(() => d == null ? "" : s(d));
|
|
88
|
-
g(() => {
|
|
89
|
-
c && p((t) => e == null ? t.trim() === "" ? t : "" : E(t) === e ? t : N(e, o));
|
|
90
|
-
}, [
|
|
91
|
-
c,
|
|
92
|
-
e,
|
|
93
|
-
o
|
|
94
|
-
]);
|
|
95
|
-
let m = y(o);
|
|
96
|
-
g(() => {
|
|
97
|
-
m.current !== o && (m.current = o, p((e) => d != null && E(e) === d ? N(d, o) : e));
|
|
98
|
-
}, [o, d]);
|
|
99
|
-
let h = (e) => {
|
|
100
|
-
c || u(e), n?.(e);
|
|
101
|
-
};
|
|
102
|
-
return {
|
|
103
|
-
draft: f,
|
|
104
|
-
amount: d,
|
|
105
|
-
type: (e) => {
|
|
106
|
-
if (p(e), e.trim() === "") h(null);
|
|
107
|
-
else {
|
|
108
|
-
let t = E(e);
|
|
109
|
-
t != null && h(t);
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
commit: (e) => {
|
|
113
|
-
let t = E(e), n = t == null ? null : T(t, r, i);
|
|
114
|
-
p(n == null ? "" : s(n)), h(n);
|
|
115
|
-
},
|
|
116
|
-
stepBy: (e) => {
|
|
117
|
-
let t = D(d, e, a, r, i);
|
|
118
|
-
p(s(t)), h(t);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
//#endregion
|
|
123
|
-
//#region lib/components/ui/fields/number-field/number-control.tsx
|
|
124
|
-
function F({ error: e, disabled: t, value: n, defaultValue: r = null, onChange: i, onBlur: a, min: s, max: p, step: m = 1, hideSteppers: h = !1, suffix: g, stepperName: _, ...v }) {
|
|
125
|
-
let { language: y } = o(), { draft: b, amount: C, type: w, commit: T, stepBy: E } = P({
|
|
126
|
-
value: n,
|
|
127
|
-
defaultValue: r,
|
|
128
|
-
onChange: i,
|
|
129
|
-
min: s,
|
|
130
|
-
max: p,
|
|
131
|
-
step: m,
|
|
132
|
-
language: y
|
|
133
|
-
}), { decreaseLabel: D, increaseLabel: O } = M(_), k = s != null && C != null && C <= s, A = p != null && C != null && C >= p, N = {
|
|
134
|
-
...v,
|
|
135
|
-
inputMode: "decimal",
|
|
136
|
-
autoComplete: "off",
|
|
137
|
-
disabled: t,
|
|
138
|
-
"aria-invalid": e || void 0,
|
|
139
|
-
value: b,
|
|
140
|
-
className: "text-center",
|
|
141
|
-
onChange: (e) => w(e.target.value),
|
|
142
|
-
onBlur: (e) => {
|
|
143
|
-
T(e.target.value), a?.(e);
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
return /* @__PURE__ */ S("div", {
|
|
147
|
-
className: "flex items-center gap-1",
|
|
148
|
-
children: [
|
|
149
|
-
!h && /* @__PURE__ */ x(j, {
|
|
150
|
-
direction: -1,
|
|
151
|
-
label: D,
|
|
152
|
-
disabled: t || k,
|
|
153
|
-
onStep: E
|
|
154
|
-
}),
|
|
155
|
-
g == null ? /* @__PURE__ */ x(c, { ...N }) : /* @__PURE__ */ S(f, {
|
|
156
|
-
className: "flex-1",
|
|
157
|
-
children: [/* @__PURE__ */ x(u, { ...N }), /* @__PURE__ */ x(d, {
|
|
158
|
-
align: "inline-end",
|
|
159
|
-
children: /* @__PURE__ */ x(l, { children: g })
|
|
160
|
-
})]
|
|
161
|
-
}),
|
|
162
|
-
!h && /* @__PURE__ */ x(j, {
|
|
163
|
-
direction: 1,
|
|
164
|
-
label: O,
|
|
165
|
-
disabled: t || A,
|
|
166
|
-
onStep: E
|
|
167
|
-
})
|
|
168
|
-
]
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
//#endregion
|
|
172
|
-
//#region lib/components/ui/fields/number-field/number-field.tsx
|
|
173
|
-
function I({ label: t, helperText: a, error: o, required: s, className: c, name: l, id: u, "aria-describedby": d, ...f }) {
|
|
174
|
-
let p = i(), m = _(), h = u ?? m, g = _();
|
|
175
|
-
return /* @__PURE__ */ S("div", {
|
|
176
|
-
ref: p,
|
|
177
|
-
"data-slot": "number-field",
|
|
178
|
-
"data-pw": l ?? "number-field",
|
|
179
|
-
className: e("grid w-full content-start gap-1.5", c),
|
|
180
|
-
children: [
|
|
181
|
-
t && /* @__PURE__ */ x(r, {
|
|
182
|
-
htmlFor: h,
|
|
183
|
-
withAsterisk: s,
|
|
184
|
-
children: t
|
|
185
|
-
}),
|
|
186
|
-
/* @__PURE__ */ x(F, {
|
|
187
|
-
...f,
|
|
188
|
-
id: h,
|
|
189
|
-
name: l,
|
|
190
|
-
stepperName: typeof t == "string" && t ? t : f["aria-label"] || void 0,
|
|
191
|
-
error: o,
|
|
192
|
-
required: s,
|
|
193
|
-
"aria-describedby": [a ? g : void 0, d].filter(Boolean).join(" ") || void 0
|
|
194
|
-
}),
|
|
195
|
-
a && /* @__PURE__ */ x(n, {
|
|
196
|
-
id: g,
|
|
197
|
-
error: o,
|
|
198
|
-
children: a
|
|
199
|
-
})
|
|
200
|
-
]
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
//#endregion
|
|
204
|
-
//#region lib/components/ui/fields/currency-field/parse-currency.ts
|
|
205
|
-
function L(e) {
|
|
206
|
-
let t = e.trim().replace(/[\s\u00a0]/g, "");
|
|
207
|
-
if (!t) return null;
|
|
208
|
-
let n = t.lastIndexOf(",") > t.lastIndexOf(".") ? t.replace(/\./g, "").replace(",", ".") : t.replace(/,/g, ""), r = Number(n);
|
|
209
|
-
return Number.isFinite(r) ? r : null;
|
|
210
|
-
}
|
|
211
|
-
//#endregion
|
|
212
|
-
//#region lib/components/ui/fields/currency-field/use-currency-amount.ts
|
|
213
|
-
function R(e, t, n) {
|
|
214
|
-
return m(e, {
|
|
215
|
-
language: n,
|
|
216
|
-
minimumFractionDigits: t,
|
|
217
|
-
maximumFractionDigits: t
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
function z({ value: e, defaultValue: t, onChange: n, currency: r, fractionDigits: i }) {
|
|
221
|
-
let o = v(() => O(r, i), [r, i]), s = a()?.language, c = e !== void 0, [l, u] = b(t), d = c ? e : l, f = y(null), p = h((e) => {
|
|
222
|
-
let t = R(e, o, s);
|
|
223
|
-
return f.current = {
|
|
224
|
-
text: t,
|
|
225
|
-
value: e
|
|
226
|
-
}, t;
|
|
227
|
-
}, [o, s]), [m, _] = b(() => d == null ? "" : p(d));
|
|
228
|
-
g(() => {
|
|
229
|
-
c && _((t) => e == null ? "" : L(t) === e || f.current?.text === t && f.current.value === e ? t : p(e));
|
|
230
|
-
}, [
|
|
231
|
-
c,
|
|
232
|
-
e,
|
|
233
|
-
p
|
|
234
|
-
]);
|
|
235
|
-
let x = y(d);
|
|
236
|
-
x.current = d, g(() => {
|
|
237
|
-
let e = x.current;
|
|
238
|
-
_(e == null ? "" : p(e));
|
|
239
|
-
}, [p]);
|
|
240
|
-
let S = (e) => {
|
|
241
|
-
c || u(e), n?.(e);
|
|
242
|
-
};
|
|
243
|
-
return {
|
|
244
|
-
draft: m,
|
|
245
|
-
change: (e) => {
|
|
246
|
-
_(e);
|
|
247
|
-
let t = L(e);
|
|
248
|
-
e.trim() === "" ? S(null) : t != null && S(t);
|
|
249
|
-
},
|
|
250
|
-
commit: (e) => {
|
|
251
|
-
let t = e.trim(), n = f.current?.text === t ? f.current.value : L(e);
|
|
252
|
-
_(n == null ? t : p(n)), S(n);
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
//#endregion
|
|
257
|
-
//#region lib/components/ui/fields/currency-field/currency-field.tsx
|
|
258
|
-
function B({ value: t, defaultValue: n = null, onChange: r, currency: i = "EUR", fractionDigits: a, trailingAction: o, className: s, ...c }) {
|
|
259
|
-
let { draft: l, change: u, commit: d } = z({
|
|
260
|
-
value: t,
|
|
261
|
-
defaultValue: n,
|
|
262
|
-
onChange: r,
|
|
263
|
-
currency: i,
|
|
264
|
-
fractionDigits: a
|
|
265
|
-
});
|
|
266
|
-
return /* @__PURE__ */ x(p, {
|
|
267
|
-
...c,
|
|
268
|
-
className: e(o && "[&_input]:pr-28!", s),
|
|
269
|
-
inputMode: "decimal",
|
|
270
|
-
autoComplete: "off",
|
|
271
|
-
spellCheck: !1,
|
|
272
|
-
value: l,
|
|
273
|
-
trailing: o ? /* @__PURE__ */ S("span", {
|
|
274
|
-
"data-slot": "currency-trailing",
|
|
275
|
-
className: "flex h-8! w-auto! items-center gap-1 bg-transparent! pointer-coarse:h-11! ps-1 pe-1.5 text-xs font-medium text-muted-foreground",
|
|
276
|
-
children: [i, o]
|
|
277
|
-
}) : /* @__PURE__ */ x("span", {
|
|
278
|
-
"data-slot": "currency-code",
|
|
279
|
-
className: "flex h-8! w-auto! items-center justify-center bg-transparent! px-1 text-xs leading-none font-medium text-muted-foreground pointer-coarse:h-11!",
|
|
280
|
-
children: i
|
|
281
|
-
}),
|
|
282
|
-
onChange: (e) => u(e.target.value),
|
|
283
|
-
onBlur: (e) => {
|
|
284
|
-
d(e.target.value), c.onBlur?.(e);
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
//#endregion
|
|
289
|
-
export { T as a, F as i, L as n, E as o, I as r, D as s, B as t };
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { t } from "./dist-DkQbkF9T.js";
|
|
3
|
-
import { t as n } from "./icon-button-B9WjQ3RO.js";
|
|
4
|
-
import { a as r, o as i } from "./input-CC2joTjB.js";
|
|
5
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
6
|
-
//#region lib/components/ui/primitives/input-group/input-group.tsx
|
|
7
|
-
function o({ className: t, ...n }) {
|
|
8
|
-
return /* @__PURE__ */ a("div", {
|
|
9
|
-
"data-slot": "input-group",
|
|
10
|
-
role: "group",
|
|
11
|
-
className: e(i, "group/input-group relative flex w-full items-center outline-none", "h-11 max-h-full min-w-0 has-[>textarea]:h-auto", "has-[>[data-align=inline-start]]:[&>input]:ps-2", "has-[>[data-align=inline-end]]:[&>input]:pe-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", t),
|
|
12
|
-
...n
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
var s = t("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none [&>kbd]:rounded-field-inner [&>svg:not([class*='size-'])]:size-4", {
|
|
16
|
-
variants: { align: {
|
|
17
|
-
"inline-start": "order-first ps-3 has-[>button]:ps-[0.3rem] has-[>kbd]:ps-[0.4rem]",
|
|
18
|
-
"inline-end": "order-last pe-3 has-[>button]:pe-[0.3rem] has-[>kbd]:pe-[0.4rem]",
|
|
19
|
-
"block-start": "order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3",
|
|
20
|
-
"block-end": "order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"
|
|
21
|
-
} },
|
|
22
|
-
defaultVariants: { align: "inline-start" }
|
|
23
|
-
});
|
|
24
|
-
function c({ className: t, align: n = "inline-start", ...r }) {
|
|
25
|
-
return /* @__PURE__ */ a("div", {
|
|
26
|
-
role: "group",
|
|
27
|
-
"data-slot": "input-group-addon",
|
|
28
|
-
"data-align": n,
|
|
29
|
-
className: e(s({ align: n }), t),
|
|
30
|
-
onClick: (e) => {
|
|
31
|
-
e.target.closest("button") || e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
32
|
-
},
|
|
33
|
-
...r
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
function l({ className: t, type: r = "button", variant: i = "ghost", ...o }) {
|
|
37
|
-
return /* @__PURE__ */ a(n, {
|
|
38
|
-
type: r,
|
|
39
|
-
variant: i,
|
|
40
|
-
className: e("size-8", t),
|
|
41
|
-
...o
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
function u({ className: t, ...n }) {
|
|
45
|
-
return /* @__PURE__ */ a("span", {
|
|
46
|
-
className: e("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", t),
|
|
47
|
-
...n
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
function d({ className: t, type: n = "text", ...i }) {
|
|
51
|
-
return /* @__PURE__ */ a("input", {
|
|
52
|
-
type: n,
|
|
53
|
-
"data-slot": "input-group-control",
|
|
54
|
-
"data-pw": i.name ?? "input",
|
|
55
|
-
className: e("h-full w-full min-w-0 flex-1 bg-transparent px-2 py-1 text-base outline-none md:text-sm", "pointer-coarse:-my-px pointer-coarse:h-[calc(100%+2px)]", "placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground disabled:pointer-events-none", t),
|
|
56
|
-
...i,
|
|
57
|
-
placeholder: r(i.placeholder, n)
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
function f({ className: t, ...n }) {
|
|
61
|
-
return /* @__PURE__ */ a("textarea", {
|
|
62
|
-
"data-slot": "input-group-control",
|
|
63
|
-
"data-pw": n.name ?? "textarea",
|
|
64
|
-
className: e("field-sizing-content min-h-16 w-full min-w-[min(280px,100%)] flex-1 resize-none bg-transparent px-3 py-3 text-base outline-none md:text-sm", "placeholder:text-muted-foreground disabled:pointer-events-none", t),
|
|
65
|
-
...n,
|
|
66
|
-
placeholder: r(n.placeholder, "text")
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
//#endregion
|
|
70
|
-
export { u as a, d as i, c as n, f as o, l as r, o as t };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { r as e } from "./currency-field-IcEMAcAw.js";
|
|
2
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
//#region lib/components/ui/fields/percent-field/percent-field.tsx
|
|
4
|
-
function n({ min: n = 0, max: r = 100, step: i = 1, ...a }) {
|
|
5
|
-
return /* @__PURE__ */ t(e, {
|
|
6
|
-
...a,
|
|
7
|
-
min: n,
|
|
8
|
-
max: r,
|
|
9
|
-
step: i,
|
|
10
|
-
suffix: "%"
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
export { n as t };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { a as t, i as n, n as r } from "./field-blur-context-BLGgf_3z.js";
|
|
3
|
-
import { t as i } from "./input-CC2joTjB.js";
|
|
4
|
-
import { isValidElement as a, useId as o } from "react";
|
|
5
|
-
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
-
import { describedBy as l } from "@nxgt/material-core/described-by";
|
|
7
|
-
//#region lib/components/ui/fields/text-field/text-field.tsx
|
|
8
|
-
function u({ error: u, helperText: f, label: p, className: m, leading: h, trailing: g, ..._ }) {
|
|
9
|
-
let v = r(), y = o(), b = o(), x = l(_["aria-describedby"], !!f && b), S = !!h && !a(h), C = !!g && !a(g), w = /* @__PURE__ */ c("div", {
|
|
10
|
-
className: e("relative", {
|
|
11
|
-
"*:first:size-8 *:first:absolute *:first:top-[calc(50%-16px)] *:first:left-1.5 [&_input]:pl-10 *:first:bg-muted/80 *:first:text-muted-foreground": !!h && !S,
|
|
12
|
-
"*:last:size-8 *:last:absolute *:last:top-[calc(50%-16px)] *:last:right-1.5 *:last:pointer-coarse:size-11 *:last:pointer-coarse:top-[calc(50%-22px)] *:last:pointer-coarse:right-0 [&_input]:pr-.5 *:last:bg-muted/80 *:last:text-muted-foreground": !!g && !C,
|
|
13
|
-
"[&_input]:ps-12": S,
|
|
14
|
-
"[&_input]:pe-16": C
|
|
15
|
-
}),
|
|
16
|
-
children: [
|
|
17
|
-
S ? /* @__PURE__ */ s(d, {
|
|
18
|
-
slot: "leading",
|
|
19
|
-
children: h
|
|
20
|
-
}) : h && h,
|
|
21
|
-
/* @__PURE__ */ s(i, {
|
|
22
|
-
"aria-invalid": u,
|
|
23
|
-
..._,
|
|
24
|
-
id: _.id ?? y,
|
|
25
|
-
"aria-describedby": x
|
|
26
|
-
}),
|
|
27
|
-
C ? /* @__PURE__ */ s(d, {
|
|
28
|
-
slot: "trailing",
|
|
29
|
-
children: g
|
|
30
|
-
}) : g && g
|
|
31
|
-
]
|
|
32
|
-
});
|
|
33
|
-
return /* @__PURE__ */ c("div", {
|
|
34
|
-
ref: v,
|
|
35
|
-
"data-slot": "text-field",
|
|
36
|
-
className: e("grid w-full content-start gap-1.5", m),
|
|
37
|
-
children: [/* @__PURE__ */ s(n, {
|
|
38
|
-
withAsterisk: _.required,
|
|
39
|
-
htmlFor: _.id ?? y,
|
|
40
|
-
children: p
|
|
41
|
-
}), /* @__PURE__ */ c("div", {
|
|
42
|
-
className: "flex flex-col gap-0.5",
|
|
43
|
-
children: [w, f ? /* @__PURE__ */ s(t, {
|
|
44
|
-
id: b,
|
|
45
|
-
error: u,
|
|
46
|
-
children: f
|
|
47
|
-
}) : null]
|
|
48
|
-
})]
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function d({ slot: t, children: n }) {
|
|
52
|
-
return /* @__PURE__ */ s("span", {
|
|
53
|
-
"data-slot": `text-field-${t}`,
|
|
54
|
-
className: e("absolute inset-y-1 flex min-w-9 items-center justify-center rounded-field-inner bg-muted/80 px-2 text-sm whitespace-nowrap text-muted-foreground", t === "leading" ? "start-1" : "end-1"),
|
|
55
|
-
children: n
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
//#endregion
|
|
59
|
-
export { u as t };
|