@alfadocs/ui-kit 1.149.1 → 1.151.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/dist/_chunks/{address-autocomplete-_LeOFdM7.js → address-autocomplete-Bt1nwxyn.js} +2 -2
- package/dist/_chunks/{address-fields-C4khof4C.js → address-fields-COumFRSX.js} +2 -2
- package/dist/_chunks/{agenda-tray-NgxPuAAz.js → agenda-tray-CmfcYQhc.js} +2 -2
- package/dist/_chunks/{ai-summary-panel-Cdsve-XN.js → ai-summary-panel-DyAHCqaj.js} +4 -4
- package/dist/_chunks/{alia-sidebar-Bjuxk8mU.js → alia-sidebar-BqZjnVoF.js} +2 -2
- package/dist/_chunks/{anamnesis-card-G0qzw0Oi.js → anamnesis-card-CoiG7vDj.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-QCv6zW-J.js → anamnesis-summary-rows-CFpaA1GP.js} +4 -4
- package/dist/_chunks/{app-frame-DUPEwu4E.js → app-frame-XEjLsLGY.js} +2 -2
- package/dist/_chunks/{appointment-card-HOZrABrQ.js → appointment-card-BPZggqck.js} +2 -2
- package/dist/_chunks/{appointment-details-panel.history-BxNqcA-r.js → appointment-details-panel.history-FSsTXj1t.js} +84 -71
- package/dist/_chunks/{appointment-details-panel.identity--_j07UG1.js → appointment-details-panel.identity-9hRo85Lx.js} +91 -79
- package/dist/_chunks/appointment-peek-CmQM4wvx.js +223 -0
- package/dist/_chunks/{appointment-timeline-CuZW-CGT.js → appointment-timeline-COfoHpoJ.js} +4 -4
- package/dist/_chunks/{appointment-tray-CFCxukwq.js → appointment-tray-BlKwDJKi.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-BPz9bQAB.js → balance-badge-cell-OghXENKK.js} +4 -4
- package/dist/_chunks/{bill-line-table-B8Cc2pTH.js → bill-line-table-DxV5_Dmq.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-fQleWmJE.js → calendar-appointment-editor-dialog-BPAfWtm9.js} +590 -583
- package/dist/_chunks/{calendar-editor-discard-host-DWS_kM-a.js → calendar-editor-discard-host-BudLsUZO.js} +5 -5
- package/dist/_chunks/{calendar-waiting-list-panel-BKBHfBpn.js → calendar-waiting-list-panel-DukgSOPH.js} +9 -9
- package/dist/_chunks/{calendar-workspace.model-4zmA3BFE.js → calendar-workspace.model-BulUpy0I.js} +2 -2
- package/dist/_chunks/{calendar.sheets-lgAqJB34.js → calendar.sheets-OmTiQdCg.js} +11 -11
- package/dist/_chunks/{calls-panel-BTTfHnPD.js → calls-panel-eohONLia.js} +5 -5
- package/dist/_chunks/{care-plan-card-2U2LuIJD.js → care-plan-card-DJXNWjKB.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-CUAlQv1c.js → care-plan-entry-card-W5QvNv8m.js} +2 -2
- package/dist/_chunks/code-BfU9G1ZM.js +15 -0
- package/dist/_chunks/{communications-panel-DDzUyoHi.js → communications-panel-CqiFs8BH.js} +4 -4
- package/dist/_chunks/{connection-status-Bi6KPTlh.js → connection-status-C13KmOPL.js} +2 -2
- package/dist/_chunks/control-room-rail-BmpTKtL1.js +456 -0
- package/dist/_chunks/{data-grid-CkzbCZSo.js → data-grid-DTAwrOiq.js} +3 -3
- package/dist/_chunks/{data-table-DFAYYsSc.js → data-table-CgpHO6EZ.js} +2 -2
- package/dist/_chunks/{default-tabs-C45FVzsG.js → default-tabs-CZaDDf1G.js} +4 -4
- package/dist/_chunks/{description-list-DA4TgL_I.js → description-list-DaldSpGy.js} +29 -26
- package/dist/_chunks/dev-bypass-button-DFcNpCQj.js +24 -0
- package/dist/_chunks/{document-preview-oSuJsJ3k.js → document-preview-TbwhY_eK.js} +4 -4
- package/dist/_chunks/{editable-currency-cell-renderer-DXJI0fnU.js → editable-currency-cell-renderer-a3CrwNKm.js} +143 -168
- package/dist/_chunks/{editable-description-BsSjLnSx.js → editable-description-B2F54K4T.js} +34 -33
- package/dist/_chunks/{empty-state-5REM7oDM.js → empty-state-qHtpcasr.js} +65 -77
- package/dist/_chunks/{entity-summary-CZmGcWi2.js → entity-summary-BNnTP1F6.js} +62 -50
- package/dist/_chunks/{error-boundary-BQ5mRqEd.js → error-boundary-BDS1XStO.js} +2 -2
- package/dist/_chunks/{error-page-CdNGIezW.js → error-page-3gWV-Vmj.js} +2 -2
- package/dist/_chunks/{error-page-illustration-BdJLuMdV.js → error-page-illustration-CJCjLk_-.js} +125 -149
- package/dist/_chunks/{face-scheme-BC2whb1S.js → face-scheme-DRYGaszs.js} +255 -264
- package/dist/_chunks/feature-preview-switch-B_8JTya_.js +75 -0
- package/dist/_chunks/{file-manager-Cp3Z4VvM.js → file-manager-DMvYx-Gq.js} +165 -180
- package/dist/_chunks/folder-DvNxod7_.js +36 -0
- package/dist/_chunks/{heatmap-DvsZ-mcL.js → heatmap-BZNkPkDD.js} +4 -4
- package/dist/_chunks/{help-me-write-templates-DlA54nu5.js → help-me-write-templates-VnvlK87x.js} +3 -3
- package/dist/_chunks/{info-tip-cCppV1fD.js → info-tip-DkVISvo-.js} +2 -2
- package/dist/_chunks/{invoice-upload-list-BReimsvV.js → invoice-upload-list-DutydbjC.js} +3 -3
- package/dist/_chunks/{link-cell-renderer-CWLArl5e.js → link-cell-renderer-DTunki79.js} +3 -3
- package/dist/_chunks/{login-dev-card-DqUNJcd7.js → login-dev-card-CQz9yhrU.js} +2 -2
- package/dist/_chunks/{map-view-n6GiDRWM.js → map-view-B67HXWPR.js} +2 -2
- package/dist/_chunks/mark-adrift-LBqHvZwv.js +42 -0
- package/dist/_chunks/{marketplace-app-shell-CGA-R-zt.js → marketplace-app-shell-CclaaAvb.js} +3 -3
- package/dist/_chunks/message-square-warning-DsGGfd0K.js +22 -0
- package/dist/_chunks/{message-tray-Dx2HPcKB.js → message-tray-DysT-DPS.js} +2 -2
- package/dist/_chunks/{note-timeline-BbjHMhkL.js → note-timeline-CS5j2OKD.js} +86 -77
- package/dist/_chunks/notebook-text-spVSekMN.js +21 -0
- package/dist/_chunks/{notes-panel-Cw06dLDm.js → notes-panel-d0I3hOEY.js} +363 -341
- package/dist/_chunks/{notification-tray-BnC5OItw.js → notification-tray-CjGDlwLg.js} +2 -2
- package/dist/_chunks/{optical-prescription-DZvauMiM.js → optical-prescription-CAnXavjq.js} +3 -3
- package/dist/_chunks/{panel-header-CbtlTe85.js → panel-header-DTc5OFUg.js} +78 -66
- package/dist/_chunks/panel-right-CnMHSvLU.js +15 -0
- package/dist/_chunks/{panel-subview-DjBwNV16.js → panel-subview-B5hnQwfQ.js} +3 -3
- package/dist/_chunks/{patient-account-settings-Do0QbDJe.js → patient-account-settings-DQx_9CYV.js} +3 -3
- package/dist/_chunks/{patient-check-in-resume-Bxy1_Pfo.js → patient-check-in-resume-BOHcm9hT.js} +6 -6
- package/dist/_chunks/{patient-details-Cj3dp9GB.js → patient-details-wFIzTz7N.js} +4 -4
- package/dist/_chunks/{patient-field-row-DDjsUsc_.js → patient-field-row-BDgfYLgz.js} +202 -201
- package/dist/_chunks/{patient-summary-card-roM9Esfb.js → patient-summary-card-ZunOre3Q.js} +158 -164
- package/dist/_chunks/{payment-request-card-C9VglWsV.js → payment-request-card-BSSfKrcc.js} +3 -3
- package/dist/_chunks/{portal-details-CKF4yFHs.js → portal-details-R-lwrisO.js} +4 -4
- package/dist/_chunks/{portal-documents-DvpAwmSI.js → portal-documents-C6XlWpEl.js} +3 -3
- package/dist/_chunks/{portal-parts-Cvu4PfIY.js → portal-parts-DlvSUZFX.js} +3 -3
- package/dist/_chunks/{practice-results-D0TAgL8v.js → practice-results-CqoB5YAv.js} +5 -5
- package/dist/_chunks/{prescription-history-CQuJmd4H.js → prescription-history-CxBM3gnm.js} +4 -4
- package/dist/_chunks/{privacy-mask-zVh0ntm0.js → privacy-mask-CaLBAxzj.js} +3 -3
- package/dist/_chunks/{product-hub-panel-NVpRuJeW.js → product-hub-panel-RJzrDcGp.js} +3 -3
- package/dist/_chunks/{public-header.agent-Dzo6ujrE.js → public-header.agent-B2CqVq4s.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-BUZPsuSP.js → radiograph-panel.agent-kgCmmgZk.js} +4 -4
- package/dist/_chunks/{registration-form-AtRCt8n5.js → registration-form-Dbe1sFZb.js} +2 -2
- package/dist/_chunks/{registry-connection-panel-ACOsXu3F.js → registry-connection-panel-BkPPA3Fj.js} +4 -4
- package/dist/_chunks/{reserved.agent-DjvapRF1.js → reserved.agent-C-sMq0pb.js} +5 -5
- package/dist/_chunks/{reviews-panel-Cw5ygAxs.js → reviews-panel-jIz5aP2X.js} +4 -4
- package/dist/_chunks/rich-text-editor-DTadvKa7.js +4716 -0
- package/dist/_chunks/{scroll-area-CY5SLYNw.js → scroll-area-RQtcKkHf.js} +84 -79
- package/dist/_chunks/{sheet-CZDjW9Q-.js → sheet-1LXzej6Q.js} +2 -2
- package/dist/_chunks/{sidebar-D5DFYN5K.js → sidebar-BV9JCgS4.js} +2 -2
- package/dist/_chunks/{signed-out-frame-CC25CgKo.js → signed-out-frame-CKA8SSbU.js} +2 -2
- package/dist/_chunks/{signing-end-screen-Bq6tkFE6.js → signing-end-screen-HXkalppf.js} +2 -2
- package/dist/_chunks/{slot-grid-khIpy8Gx.js → slot-grid-DdqeF6PW.js} +2 -2
- package/dist/_chunks/{sync-tray-BQD-HuA4.js → sync-tray-CSVGzuur.js} +2 -2
- package/dist/_chunks/{task-editor-C-4I2sBa.js → task-editor-aXjGMwYA.js} +6 -6
- package/dist/_chunks/{task-tray-CxxcGGgx.js → task-tray-C48Vq8nt.js} +2 -2
- package/dist/_chunks/{tasks-panel-BDPQPOP6.js → tasks-panel-BdxHb-fX.js} +3 -3
- package/dist/_chunks/text-area-DbxGkpzE.js +269 -0
- package/dist/_chunks/{tool-rail-DjPEiBa2.js → tool-rail-B4p6MmxA.js} +383 -363
- package/dist/_chunks/{toolbar-B9oh9XY9.js → toolbar-B2JJ_XDT.js} +2 -2
- package/dist/_chunks/tooth-chip-DOv925IH.js +41 -0
- package/dist/_chunks/{transaction-chip-CkYd-3ky.js → transaction-chip-6jToArJn.js} +45 -43
- package/dist/_chunks/{transcript-panel-Wr8e4Zgi.js → transcript-panel-Dc0fK4WO.js} +2 -2
- package/dist/_chunks/{treatment-receipt-BZzwvsnY.js → treatment-receipt-CZQV1NkJ.js} +59 -62
- package/dist/_chunks/use-appointment-details-read-BR3TQOHx.js +2091 -0
- package/dist/_chunks/user-round-DZxRG9zq.js +15 -0
- package/dist/_chunks/{week-availability-D0tTll4q.js → week-availability-D00rMjsX.js} +2 -2
- package/dist/_chunks/{workflow-map-F7OThorL.js → workflow-map-DLUTUZ27.js} +2 -2
- package/dist/agent-catalog.json +15 -1
- package/dist/appointment-editor-panel/index.js +4 -4
- package/dist/booking-tools-data/index.js +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/calendar-action-buttons/index.js +1 -1
- package/dist/components/_shared/appointment-format.d.ts +4 -0
- package/dist/components/_shared/mark-adrift.d.ts +12 -0
- package/dist/components/_shared/patient-field-row.d.ts +5 -1
- package/dist/components/_shared/safe-html.d.ts +6 -0
- package/dist/components/_shared/tooth-chip.d.ts +21 -0
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-summary-panel/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/app-frame/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +12 -2
- package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +3 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +12 -2
- package/dist/components/appointment-details-panel/description-length.d.ts +18 -0
- package/dist/components/appointment-details-panel/index.d.ts +1 -0
- package/dist/components/appointment-details-panel/index.js +7 -6
- package/dist/components/appointment-peek/appointment-peek.d.ts +45 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bill-line-table/index.js +1 -1
- package/dist/components/bill-table/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calls-panel/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/communications-panel/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/control-room-rail/control-room-rail.d.ts +24 -0
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/data-grid/index.js +2 -2
- package/dist/components/data-table/index.js +3 -3
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/dev-bypass-button/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/editable-description/editable-description.d.ts +7 -0
- package/dist/components/editable-description/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/error-boundary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/feature-preview-switch/feature-preview-switch.d.ts +55 -0
- package/dist/components/feature-preview-switch/index.d.ts +2 -0
- package/dist/components/feature-preview-switch/index.js +5 -0
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/invoice-upload-list/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/note-timeline/note-timeline.d.ts +8 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +33 -2
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/panel-header/index.js +1 -1
- package/dist/components/panel-header/panel-header.d.ts +8 -0
- package/dist/components/panel-subview/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +9 -0
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/registry-connection-panel/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +18 -5
- package/dist/components/rich-text-editor/index.d.ts +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/rich-text-editor/link-bar.d.ts +8 -0
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +25 -3
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/scroll-area/scroll-area.d.ts +6 -0
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/sync-tray/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/text-area/index.js +1 -1
- package/dist/components/text-area/text-area.d.ts +15 -0
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tool-rail/tool-rail.d.ts +23 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts +7 -0
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/treatment-receipt/index.js +1 -1
- package/dist/components/treatment-receipt/treatment-receipt.d.ts +6 -1
- package/dist/components/week-availability/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/find-free-slots-panel/index.js +1 -1
- package/dist/host-compat.css +4 -1
- package/dist/host-legacy.css +63 -4
- package/dist/i18n/locales/ar.d.ts +18 -0
- package/dist/i18n/locales/ar.js +18 -3
- package/dist/i18n/locales/de.d.ts +18 -0
- package/dist/i18n/locales/de.js +18 -3
- package/dist/i18n/locales/el.d.ts +18 -0
- package/dist/i18n/locales/el.js +21 -3
- package/dist/i18n/locales/en.d.ts +18 -0
- package/dist/i18n/locales/en.js +21 -3
- package/dist/i18n/locales/es.d.ts +18 -0
- package/dist/i18n/locales/es.js +21 -3
- package/dist/i18n/locales/fr.d.ts +18 -0
- package/dist/i18n/locales/fr.js +21 -3
- package/dist/i18n/locales/hi.d.ts +18 -0
- package/dist/i18n/locales/hi.js +18 -3
- package/dist/i18n/locales/it.d.ts +28 -10
- package/dist/i18n/locales/it.js +31 -13
- package/dist/i18n/locales/ja.d.ts +18 -0
- package/dist/i18n/locales/ja.js +18 -3
- package/dist/i18n/locales/nl.d.ts +18 -0
- package/dist/i18n/locales/nl.js +18 -3
- package/dist/i18n/locales/pl.d.ts +18 -0
- package/dist/i18n/locales/pl.js +21 -3
- package/dist/i18n/locales/pt.d.ts +18 -0
- package/dist/i18n/locales/pt.js +21 -3
- package/dist/i18n/locales/ro.d.ts +18 -0
- package/dist/i18n/locales/ro.js +21 -3
- package/dist/i18n/locales/ru.d.ts +18 -0
- package/dist/i18n/locales/ru.js +18 -3
- package/dist/i18n/locales/sq.d.ts +18 -0
- package/dist/i18n/locales/sq.js +21 -3
- package/dist/i18n/locales/sv.d.ts +18 -0
- package/dist/i18n/locales/sv.js +18 -3
- package/dist/i18n/locales/tr.d.ts +18 -0
- package/dist/i18n/locales/tr.js +18 -3
- package/dist/i18n/locales/zh.d.ts +18 -0
- package/dist/i18n/locales/zh.js +18 -3
- package/dist/index.js +820 -817
- package/dist/locales/ar.json +21 -3
- package/dist/locales/de.json +21 -3
- package/dist/locales/el.json +21 -3
- package/dist/locales/en.json +21 -3
- package/dist/locales/es.json +21 -3
- package/dist/locales/fr.json +21 -3
- package/dist/locales/hi.json +21 -3
- package/dist/locales/it.json +31 -13
- package/dist/locales/ja.json +21 -3
- package/dist/locales/nl.json +21 -3
- package/dist/locales/pl.json +21 -3
- package/dist/locales/pt.json +21 -3
- package/dist/locales/ro.json +21 -3
- package/dist/locales/ru.json +21 -3
- package/dist/locales/sq.json +21 -3
- package/dist/locales/sv.json +21 -3
- package/dist/locales/tr.json +21 -3
- package/dist/locales/zh.json +21 -3
- package/dist/online-bookings-panel/index.js +2 -2
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +4 -4
- package/dist/patterns/error-page/index.js +2 -2
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-account-settings/index.js +1 -1
- package/dist/patterns/patient-check-in/index.js +1 -1
- package/dist/patterns/patient-portal/index.js +2 -2
- package/dist/patterns/prescription/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/patterns/signing/index.js +1 -1
- package/dist/redactor.css +9 -0
- package/dist/safe-html/index.js +33 -19
- package/dist/tokens.css +61 -52
- package/dist/waiting-list-panel/index.js +3 -3
- package/package.json +5 -1
- package/dist/_chunks/appointment-peek-B3raO90X.js +0 -123
- package/dist/_chunks/contact-round-DiSvB3LP.js +0 -18
- package/dist/_chunks/control-room-rail-BQvaYowi.js +0 -416
- package/dist/_chunks/dev-bypass-button-BzfYGPuf.js +0 -33
- package/dist/_chunks/folder-BghC8_S2.js +0 -20
- package/dist/_chunks/rich-text-editor-eGdYDPK2.js +0 -4405
- package/dist/_chunks/text-area-COMVJ1yE.js +0 -258
- package/dist/_chunks/use-appointment-details-read-Bl1DHXQ2.js +0 -1998
- /package/dist/{patterns → components}/_shared/mark-pieces.d.ts +0 -0
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { jsxs as E, jsx as D } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ge, useRef as j, useCallback as z, useState as W, useMemo as be, useEffect as he } from "react";
|
|
3
|
+
import { c as ye } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as xe } from "react-i18next";
|
|
5
|
+
import { u as Te, a as we } from "./form-field-context-DtiROUJV.js";
|
|
6
|
+
import { u as Y } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
7
|
+
import { u as Ae } from "./use-dom-value-DTxHhQAN.js";
|
|
8
|
+
import { u as Ve } from "./registry-DvAUVLHh.js";
|
|
9
|
+
const Fe = {
|
|
10
|
+
id: "text-area",
|
|
11
|
+
capabilities: ["set_value", "edit_inline"],
|
|
12
|
+
state: {
|
|
13
|
+
value: {
|
|
14
|
+
type: "string",
|
|
15
|
+
descriptionKey: "ui.agent.textArea.state.value",
|
|
16
|
+
description: "Current value of the textarea.",
|
|
17
|
+
read: (t) => t.getValue()
|
|
18
|
+
},
|
|
19
|
+
isEmpty: {
|
|
20
|
+
type: "boolean",
|
|
21
|
+
descriptionKey: "ui.agent.textArea.state.isEmpty",
|
|
22
|
+
description: "Whether the textarea has no value.",
|
|
23
|
+
read: (t) => t.getValue() === ""
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
actions: {
|
|
27
|
+
set_value: {
|
|
28
|
+
safety: "write",
|
|
29
|
+
argsType: "{ value: string }",
|
|
30
|
+
argsSchema: {
|
|
31
|
+
type: "object",
|
|
32
|
+
properties: { value: { type: "string" } },
|
|
33
|
+
required: ["value"]
|
|
34
|
+
},
|
|
35
|
+
idempotent: !0,
|
|
36
|
+
descriptionKey: "ui.agent.textArea.actions.setValue",
|
|
37
|
+
description: "Replace the textarea value.",
|
|
38
|
+
invoke: (t, l) => {
|
|
39
|
+
t.setValue(l.value);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
clear: {
|
|
43
|
+
safety: "destructive",
|
|
44
|
+
idempotent: !0,
|
|
45
|
+
descriptionKey: "ui.agent.textArea.actions.clear",
|
|
46
|
+
description: "Empty the textarea. Loses any typed value.",
|
|
47
|
+
invoke: (t) => {
|
|
48
|
+
t.clear();
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
focus: {
|
|
52
|
+
safety: "read",
|
|
53
|
+
descriptionKey: "ui.agent.textArea.actions.focus",
|
|
54
|
+
description: "Move keyboard focus to the textarea.",
|
|
55
|
+
invoke: (t) => {
|
|
56
|
+
t.focus();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
domHooks: {
|
|
61
|
+
root: {
|
|
62
|
+
attr: "data-component",
|
|
63
|
+
value: "text-area",
|
|
64
|
+
description: "Marks the TextArea wrapper."
|
|
65
|
+
},
|
|
66
|
+
instanceId: {
|
|
67
|
+
attr: "data-component-id",
|
|
68
|
+
sourceProp: "id",
|
|
69
|
+
description: "Sourced from the id prop."
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}, Ie = ye(
|
|
73
|
+
[
|
|
74
|
+
"ds:block ds:w-full ds:border ds:rounded-[var(--radius-sm)] ds:bg-input ds:text-foreground",
|
|
75
|
+
"ds:shadow-[var(--shadow-input)]",
|
|
76
|
+
"ds:leading-[var(--line-height-base)]",
|
|
77
|
+
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
|
|
78
|
+
"ds:focus:outline-none",
|
|
79
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
80
|
+
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
81
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
82
|
+
"ds:disabled:cursor-not-allowed ds:disabled:opacity-50",
|
|
83
|
+
"ds:read-only:bg-muted ds:read-only:cursor-default ds:read-only:shadow-none",
|
|
84
|
+
"ds:transition-[height,color,background-color,border-color,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
85
|
+
"ds:placeholder:text-muted-foreground"
|
|
86
|
+
].join(" "),
|
|
87
|
+
{
|
|
88
|
+
variants: {
|
|
89
|
+
size: {
|
|
90
|
+
sm: "ds:min-h-8 ds:text-[length:var(--font-size-sm)]",
|
|
91
|
+
md: "ds:min-h-[var(--min-target-size)] ds:text-[length:var(--font-size-base)]",
|
|
92
|
+
lg: "ds:min-h-[calc(var(--min-target-size)*1.5)] ds:text-[length:var(--font-size-lg)]"
|
|
93
|
+
},
|
|
94
|
+
tone: {
|
|
95
|
+
default: "ds:border-[color:var(--control-border)]",
|
|
96
|
+
error: "ds:border-destructive"
|
|
97
|
+
},
|
|
98
|
+
resize: {
|
|
99
|
+
auto: "ds:resize-none",
|
|
100
|
+
manual: "ds:resize-y"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
defaultVariants: { size: "md", tone: "default", resize: "manual" }
|
|
104
|
+
}
|
|
105
|
+
), Ne = (t, l) => (l ? t > 1 : t >= 1) ? "ds:text-destructive" : t >= 0.9 ? "ds:text-[color:var(--warning-foreground)]" : "ds:text-muted-foreground", ke = (t) => [...t].length, Ee = ge(
|
|
106
|
+
({
|
|
107
|
+
size: t = "md",
|
|
108
|
+
tone: l = "default",
|
|
109
|
+
autoResize: n = !1,
|
|
110
|
+
minRows: h = 2,
|
|
111
|
+
maxRows: y,
|
|
112
|
+
showCounter: G,
|
|
113
|
+
softMaxLength: x,
|
|
114
|
+
measureLength: J = ke,
|
|
115
|
+
className: Q,
|
|
116
|
+
id: T,
|
|
117
|
+
disabled: U,
|
|
118
|
+
value: B,
|
|
119
|
+
defaultValue: w,
|
|
120
|
+
maxLength: v,
|
|
121
|
+
rows: X,
|
|
122
|
+
onChange: i,
|
|
123
|
+
onCompositionStart: A,
|
|
124
|
+
onCompositionEnd: V,
|
|
125
|
+
onInput: Z,
|
|
126
|
+
...L
|
|
127
|
+
}, f) => {
|
|
128
|
+
const { t: H } = xe("ui"), d = Te(), S = we(d, T), R = d.disabled || U, C = d.invalid ? "error" : l, a = j(null), ee = z(
|
|
129
|
+
(e) => {
|
|
130
|
+
a.current = e, typeof f == "function" ? f(e) : f && (f.current = e);
|
|
131
|
+
},
|
|
132
|
+
[f]
|
|
133
|
+
), s = B !== void 0, [te, F] = W(
|
|
134
|
+
String(w ?? "")
|
|
135
|
+
), I = s ? String(B) : te, p = j(!1), K = Ae(
|
|
136
|
+
a,
|
|
137
|
+
s ? I : void 0,
|
|
138
|
+
p
|
|
139
|
+
), O = j(s);
|
|
140
|
+
Y(() => {
|
|
141
|
+
if (O.current === s || (O.current = s, s)) return;
|
|
142
|
+
const e = String(w ?? "");
|
|
143
|
+
a.current && (a.current.value = e), F(e);
|
|
144
|
+
});
|
|
145
|
+
const N = z(() => {
|
|
146
|
+
const e = a.current;
|
|
147
|
+
if (!e || !n) return;
|
|
148
|
+
const r = window.getComputedStyle(e), u = parseFloat(r.lineHeight), m = parseFloat(r.paddingTop), b = parseFloat(r.paddingBottom), le = parseFloat(r.borderTopWidth), fe = parseFloat(r.borderBottomWidth), q = m + b + le + fe, pe = (Number.isFinite(u) ? u : 24) * h + q, me = typeof y == "number" ? (Number.isFinite(u) ? u : 24) * y + q : Number.POSITIVE_INFINITY;
|
|
149
|
+
e.style.height = "auto";
|
|
150
|
+
const ve = Math.max(pe, Math.min(e.scrollHeight, me));
|
|
151
|
+
e.style.height = `${ve}px`;
|
|
152
|
+
}, [n, h, y]);
|
|
153
|
+
Y(() => {
|
|
154
|
+
n && N();
|
|
155
|
+
}, [n, N, I]);
|
|
156
|
+
const re = (e) => {
|
|
157
|
+
s || F(e.target.value), !p.current && (i == null || i(e), s && K());
|
|
158
|
+
}, se = (e) => {
|
|
159
|
+
p.current = !0, A == null || A(e);
|
|
160
|
+
}, oe = (e) => {
|
|
161
|
+
p.current = !1, V == null || V(e);
|
|
162
|
+
const r = e.currentTarget;
|
|
163
|
+
s || F(r.value), i == null || i({
|
|
164
|
+
...e,
|
|
165
|
+
target: r,
|
|
166
|
+
currentTarget: r
|
|
167
|
+
}), s && K(), n && N();
|
|
168
|
+
}, k = z((e) => {
|
|
169
|
+
var b;
|
|
170
|
+
const r = a.current;
|
|
171
|
+
if (!r) return;
|
|
172
|
+
const u = Object.getPrototypeOf(r), m = (b = Object.getOwnPropertyDescriptor(u, "value")) == null ? void 0 : b.set;
|
|
173
|
+
m == null || m.call(r, e), r.dispatchEvent(new Event("input", { bubbles: !0 })), r.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
174
|
+
}, []), ae = be(
|
|
175
|
+
() => ({
|
|
176
|
+
getValue: () => {
|
|
177
|
+
var e;
|
|
178
|
+
return ((e = a.current) == null ? void 0 : e.value) ?? "";
|
|
179
|
+
},
|
|
180
|
+
setValue: (e) => k(e),
|
|
181
|
+
clear: () => k(""),
|
|
182
|
+
focus: () => {
|
|
183
|
+
var e;
|
|
184
|
+
return (e = a.current) == null ? void 0 : e.focus();
|
|
185
|
+
}
|
|
186
|
+
}),
|
|
187
|
+
[k]
|
|
188
|
+
);
|
|
189
|
+
Ve(Fe, ae, T);
|
|
190
|
+
const P = typeof v == "number" && v > 0 ? v : void 0, o = P ?? (typeof x == "number" && x > 0 ? x : void 0), g = o !== void 0 && (G ?? !0), c = J(I), M = o !== void 0 ? Math.max(0, o - c) : 0, ne = o !== void 0 ? c / o : 0, _ = o !== void 0 && c > o, [ie, de] = W("");
|
|
191
|
+
he(() => {
|
|
192
|
+
if (!g) return;
|
|
193
|
+
const e = window.setTimeout(() => {
|
|
194
|
+
p.current || de(
|
|
195
|
+
// Past a soft limit "0 characters remaining" would read as full,
|
|
196
|
+
// not over: say the count itself, as the eye reads it.
|
|
197
|
+
_ ? `${c} / ${o}` : H("inputs.textarea.charactersRemaining", {
|
|
198
|
+
count: M,
|
|
199
|
+
defaultValue: "{{count}} characters remaining"
|
|
200
|
+
})
|
|
201
|
+
);
|
|
202
|
+
}, 500);
|
|
203
|
+
return () => window.clearTimeout(e);
|
|
204
|
+
}, [g, M, _, c, o, H]);
|
|
205
|
+
const $ = g ? `${S}-counter` : void 0, ce = [d.describedBy || void 0, $].filter(Boolean).join(" ") || void 0, ue = n ? "auto" : "manual";
|
|
206
|
+
return /* @__PURE__ */ E(
|
|
207
|
+
"div",
|
|
208
|
+
{
|
|
209
|
+
"data-component": "text-area",
|
|
210
|
+
"data-component-id": T,
|
|
211
|
+
className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
212
|
+
children: [
|
|
213
|
+
/* @__PURE__ */ D(
|
|
214
|
+
"textarea",
|
|
215
|
+
{
|
|
216
|
+
ref: ee,
|
|
217
|
+
id: S,
|
|
218
|
+
defaultValue: s ? void 0 : w,
|
|
219
|
+
disabled: R,
|
|
220
|
+
"aria-describedby": ce,
|
|
221
|
+
"aria-invalid": d.invalid || void 0,
|
|
222
|
+
"aria-required": d.required || void 0,
|
|
223
|
+
maxLength: v,
|
|
224
|
+
rows: n ? h : X,
|
|
225
|
+
onChange: re,
|
|
226
|
+
onCompositionStart: se,
|
|
227
|
+
onCompositionEnd: oe,
|
|
228
|
+
onInput: Z,
|
|
229
|
+
className: Ie({
|
|
230
|
+
size: t,
|
|
231
|
+
tone: C,
|
|
232
|
+
resize: ue,
|
|
233
|
+
className: Q
|
|
234
|
+
}),
|
|
235
|
+
...L
|
|
236
|
+
}
|
|
237
|
+
),
|
|
238
|
+
g ? /* @__PURE__ */ E(
|
|
239
|
+
"div",
|
|
240
|
+
{
|
|
241
|
+
id: $,
|
|
242
|
+
className: "ds:flex ds:justify-end type-meta ds:tabular-nums",
|
|
243
|
+
children: [
|
|
244
|
+
/* @__PURE__ */ E(
|
|
245
|
+
"span",
|
|
246
|
+
{
|
|
247
|
+
"aria-hidden": "true",
|
|
248
|
+
className: Ne(ne, P === void 0),
|
|
249
|
+
children: [
|
|
250
|
+
c,
|
|
251
|
+
" / ",
|
|
252
|
+
o
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
),
|
|
256
|
+
/* @__PURE__ */ D("span", { className: "ds:sr-only", "aria-live": "polite", children: ie })
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
) : null
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
);
|
|
265
|
+
Ee.displayName = "TextArea";
|
|
266
|
+
export {
|
|
267
|
+
Ee as T
|
|
268
|
+
};
|
|
269
|
+
//# sourceMappingURL=text-area-DbxGkpzE.js.map
|