@alfadocs/ui-kit 1.114.0 → 1.115.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/{actions-cell-renderer-BVn3vDTg.js → actions-cell-renderer-bI27uXXC.js} +2 -2
- package/dist/_chunks/{ai-permission-notice-BkgcGmu8.js → ai-permission-notice-C-xR2_iS.js} +2 -2
- package/dist/_chunks/{alia-sidebar-CKkg3gc8.js → alia-sidebar-BBxbMRmX.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-DaS-j8Jd.js → anamnesis-summary-rows-BZ36ULQk.js} +4 -4
- package/dist/_chunks/{antenatal-schedule-timeline-DmlXxevC.js → antenatal-schedule-timeline-va9zx7tJ.js} +11 -11
- package/dist/_chunks/{appointment-card-FKOnH1uJ.js → appointment-card-D_-aBrx5.js} +2 -2
- package/dist/_chunks/{appointment-timeline-eOi-y8m3.js → appointment-timeline-DxLu3afn.js} +3 -3
- package/dist/_chunks/{appointment-tray-C6oBvsG5.js → appointment-tray-BhXOJpIJ.js} +2 -2
- package/dist/_chunks/{ar-C4YQVTH6.js → ar-BFvUBJ_g.js} +10 -10
- package/dist/_chunks/{balance-badge-cell-BAZynD--.js → balance-badge-cell-CXHihM22.js} +28 -27
- package/dist/_chunks/buildMatchPatternFn-jbaE1-W0.js +68 -0
- package/dist/_chunks/{calendar-appointment-editor-dialog-iyh9QqNw.js → calendar-appointment-editor-dialog-BVzFi4hH.js} +519 -531
- package/dist/_chunks/{care-plan-card-DMjlYlFc.js → care-plan-card-BA3MfdfZ.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-3hguBW45.js → care-plan-entry-card-CUtFZ813.js} +2 -2
- package/dist/_chunks/{chart-bddVIElM.js → chart-DebrFZ6L.js} +2 -2
- package/dist/_chunks/{chat-container-baxzy8k8.js → chat-container-B83b4hut.js} +2 -2
- package/dist/_chunks/checkbox-DV4sNDeB.js +282 -0
- package/dist/_chunks/{checkbox-group-eGdv9fZc.js → checkbox-group-EfinQS1h.js} +2 -2
- package/dist/_chunks/chevrons-up-down-CgiVAHb7.js +15 -0
- package/dist/_chunks/compact-editor-fields-cP6yh7xv.js +21 -0
- package/dist/_chunks/{cycle-calculator-Dd-XbKmZ.js → cycle-calculator-C68V9rdH.js} +5 -5
- package/dist/_chunks/data-grid-tabs-CsLbIv0h.js +365 -0
- package/dist/_chunks/data-table-DXaE2Ret.js +1693 -0
- package/dist/_chunks/data-table-tabs-NYLhD8_Z.js +242 -0
- package/dist/_chunks/date-locale-OG-MupVD.js +83 -0
- package/dist/_chunks/{date-picker-CdhXlgVI.js → date-picker-DBVTj6lO.js} +21 -20
- package/dist/_chunks/{date-picker-variants-Dt6UbonG.js → date-picker-variants-J1EeAhIH.js} +601 -678
- package/dist/_chunks/date-range-panel-CBFfkgmz.js +62 -0
- package/dist/_chunks/{date-range-picker-DCADIR8o.js → date-range-picker-PTRpDkXT.js} +72 -70
- package/dist/_chunks/{date-time-picker-CT2bC7-A.js → date-time-picker-CJnqiQoT.js} +22 -21
- package/dist/_chunks/{de-B1B3PIgY.js → de-i9wbjGPc.js} +2 -2
- package/dist/_chunks/{due-date-calculator-Dl6SyMHO.js → due-date-calculator-C1UA5jpS.js} +6 -6
- package/dist/_chunks/{editable-currency-cell-renderer-BUdFMh67.js → editable-currency-cell-renderer-CtlMhLai.js} +3 -3
- package/dist/_chunks/{el-iLqGpapg.js → el-Cm-rWthb.js} +20 -20
- package/dist/_chunks/{en-GB-CxPRQbD6.js → en-GB-BHn82gW8.js} +11 -10
- package/dist/_chunks/en-US-C4QKhzhA.js +46 -0
- package/dist/_chunks/{es-Bg1oqwDs.js → es-B_6Z19UA.js} +4 -4
- package/dist/_chunks/{face-scheme-DlcQaQVR.js → face-scheme-DkoxiDCh.js} +2 -2
- package/dist/_chunks/{file-manager-LG7B_UHB.js → file-manager-DFFExyym.js} +4 -4
- package/dist/_chunks/format-ql5WTsYT.js +846 -0
- package/dist/_chunks/{fr-DpGxyOGI.js → fr-gTba51QO.js} +7 -7
- package/dist/_chunks/funnel-DpPV3Qkd.js +20 -0
- package/dist/_chunks/{gestational-age-calculator-DmzYdW5e.js → gestational-age-calculator-60y1RyQL.js} +7 -7
- package/dist/_chunks/grid-context-AwsLJRhH.js +46 -0
- package/dist/_chunks/{hcg-doubling-Tr72PetS.js → hcg-doubling-CC-dbKE8.js} +6 -5
- package/dist/_chunks/{heatmap-CNxCDl0D.js → heatmap-eXdtmEoU.js} +4 -4
- package/dist/_chunks/{hi-3Dtsksrw.js → hi-BIHq9ncx.js} +10 -10
- package/dist/_chunks/icon-button-group-C9mPK-bX.js +442 -0
- package/dist/_chunks/{index-CJE9uQmb.js → index-Bze5jCG_.js} +2 -1
- package/dist/_chunks/{isSameWeek-DyVftHWi.js → isSameWeek-CZOtDcsd.js} +2 -2
- package/dist/_chunks/{it-Cp0CA13d.js → it-DaCPWJ9Y.js} +11 -11
- package/dist/_chunks/{ja-9FOyR1lb.js → ja-BRCpkD95.js} +26 -26
- package/dist/_chunks/{kit-extensions-DZJRmDI6.js → kit-extensions-CzG0RmhQ.js} +4 -4
- package/dist/_chunks/link-cell-renderer-Ditt5mvT.js +800 -0
- package/dist/_chunks/{login-dev-card-D7orCfJT.js → login-dev-card-CPndtWdz.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-CPNVBVLH.js → marketplace-app-shell-CcEHJgDd.js} +2 -2
- package/dist/_chunks/match-BATShpSX.js +336 -0
- package/dist/_chunks/{nl-sfx-zJgR.js → nl-5tAwYo00.js} +6 -6
- package/dist/_chunks/normalizeDates-BBNNIR-v.js +36 -0
- package/dist/_chunks/{notes-panel-DXMTObBv.js → notes-panel-BVYG_MJE.js} +2 -2
- package/dist/_chunks/{parse-B0s7bY4d.js → parse-BLBWPIgE.js} +63 -61
- package/dist/_chunks/{parseISO-DZZ5a-zK.js → parseISO-Dl4T9peU.js} +2 -2
- package/dist/_chunks/parts-Wz2LeGnH.js +1113 -0
- package/dist/_chunks/{patient-details-DdtXBNjt.js → patient-details-DlT-vpSe.js} +2 -2
- package/dist/_chunks/{patient-field-row-D9rb-QJH.js → patient-field-row-B54uzvu-.js} +3 -3
- package/dist/_chunks/{patient-summary-card-CGHz-Bvm.js → patient-summary-card-Dy9-CzON.js} +3 -3
- package/dist/_chunks/{periodontal-diagnosis-xheWfi4g.js → periodontal-diagnosis-DnZuZD14.js} +2 -2
- package/dist/_chunks/{permission-matrix-BJ6sg3Zp.js → permission-matrix-BXmhICzN.js} +3 -3
- package/dist/_chunks/{pl-BLh7KO-s.js → pl-mLYbfByR.js} +7 -7
- package/dist/_chunks/{pregnancy-dating-BvorzHrd.js → pregnancy-dating-qZpw3zj8.js} +7 -7
- package/dist/_chunks/privacy-mask-BlJK51MD.js +78 -0
- package/dist/_chunks/privacy-mask-text-B8YfzB7L.js +7 -0
- package/dist/_chunks/{pt-CPKOrOLj.js → pt-CgaqtlD9.js} +6 -6
- package/dist/_chunks/{radiograph-panel.agent-CXah49KM.js → radiograph-panel.agent-C1LGeX-G.js} +3 -3
- package/dist/_chunks/{registration-form-Lw9T7IXr.js → registration-form-DW-0X7S4.js} +2 -2
- package/dist/_chunks/{reserved.agent-D2jwJPac.js → reserved.agent-6p3Hm4oH.js} +9 -9
- package/dist/_chunks/{rich-text-editor-BLS2cK-u.js → rich-text-editor-efaMWbYz.js} +3 -3
- package/dist/_chunks/{ro-Dc-oNqbF.js → ro-CpDg1-8v.js} +2 -2
- package/dist/_chunks/{ru-BtNpDZRR.js → ru-B7VMyjud.js} +9 -9
- package/dist/_chunks/saved-view-tabs-DLWm88Eq.js +932 -0
- package/dist/_chunks/{send-registration-link-form-DfbTjrEK.js → send-registration-link-form-DWxWa_cJ.js} +5 -5
- package/dist/_chunks/{sidebar-2VsPlNkZ.js → sidebar-D5DFYN5K.js} +326 -335
- package/dist/_chunks/{slot-grid-BhjaLJ0o.js → slot-grid-b4eZXokb.js} +3 -3
- package/dist/_chunks/{sq-D4c7olaV.js → sq-B0Ree_9P.js} +2 -2
- package/dist/_chunks/subDays-Bsoy023P.js +8 -0
- package/dist/_chunks/{sv-Bf_dHPvh.js → sv-D9fP66O7.js} +4 -4
- package/dist/_chunks/{tag-DOZGz0fT.js → tag-BNlcEJfE.js} +70 -67
- package/dist/_chunks/{task-card-DqVoitRk.js → task-card-BNbkwIYM.js} +2 -2
- package/dist/_chunks/{task-editor-D--LwVrg.js → task-editor-CSa6vQ9r.js} +377 -391
- package/dist/_chunks/{task-tray-C6j8HVMv.js → task-tray-Bmi9wCHq.js} +2 -2
- package/dist/_chunks/{tasks-panel-D6PuF4MQ.js → tasks-panel-CVjY1d7Q.js} +2 -2
- package/dist/_chunks/{theme-toggle-Czq3K9jB.js → theme-toggle-CObX2Ffa.js} +2 -2
- package/dist/_chunks/toolbar-Bc3pjfG5.js +9907 -0
- package/dist/_chunks/{tr-xqQ6cbGY.js → tr-Bcz5LCHZ.js} +2 -2
- package/dist/_chunks/{transcript-panel-A781Pkzr.js → transcript-panel-Wr8e4Zgi.js} +2 -2
- package/dist/_chunks/{treatment-receipt-pFqWFyD_.js → treatment-receipt-BydbojdD.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-BK_Gw1GG.js → use-appointment-details-read-BMAiQYo6.js} +4 -4
- package/dist/_chunks/{voice-control-panel-BGiX4sqB.js → voice-control-panel-Be_c0CQ0.js} +2 -2
- package/dist/_chunks/{workflow-webhook-action-CtBn5JvO.js → workflow-webhook-action-DNSe65yd.js} +2 -2
- package/dist/_chunks/{zh-CN-C657DBCO.js → zh-CN-B7Ek17US.js} +11 -11
- package/dist/agent-catalog.json +717 -6
- package/dist/agent-i18n/en.json +50 -2
- package/dist/components/_shared/privacy-mask-text.d.ts +4 -0
- package/dist/components/_shared/privacy-mask.d.ts +2 -4
- package/dist/components/_shared/saved-view-tabs/saved-tab.d.ts +54 -0
- package/dist/components/_shared/saved-view-tabs/saved-view-tabs.d.ts +93 -0
- package/dist/components/_shared/saved-view-tabs/use-saved-view-tabs.d.ts +59 -0
- package/dist/components/_shared/saved-view-tabs/view-adapter.d.ts +69 -0
- package/dist/components/_shared/table-filters/calendar-day.d.ts +27 -0
- package/dist/components/_shared/table-filters/predicates.d.ts +56 -0
- package/dist/components/_shared/table-toolbar/context.d.ts +28 -0
- package/dist/components/_shared/table-toolbar/describe-filter.d.ts +42 -0
- package/dist/components/_shared/table-toolbar/export-files.d.ts +47 -0
- package/dist/components/{data-table/xlsx-export.d.ts → _shared/table-toolbar/export-xlsx.d.ts} +2 -2
- package/dist/components/_shared/table-toolbar/parts.d.ts +125 -0
- package/dist/components/_shared/table-toolbar/seam.d.ts +261 -0
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/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/chart/index.js +1 -1
- package/dist/components/chat-container/index.js +1 -1
- package/dist/components/checkbox/checkbox.d.ts +66 -6
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-grid/announcer.d.ts +27 -0
- package/dist/components/data-grid/body.d.ts +95 -0
- package/dist/components/data-grid/columns.d.ts +96 -0
- package/dist/components/data-grid/data-grid.agent.d.ts +2 -1
- package/dist/components/data-grid/data-grid.d.ts +11 -27
- package/dist/components/data-grid/data-grid.variants.d.ts +118 -0
- package/dist/components/data-grid/editors.d.ts +8 -0
- package/dist/components/data-grid/export-snapshot.d.ts +3 -0
- package/dist/components/data-grid/features.d.ts +56 -0
- package/dist/components/data-grid/filter-fns.d.ts +23 -0
- package/dist/components/data-grid/filters/date-range-panel.d.ts +8 -0
- package/dist/components/data-grid/filters/filter-panels.d.ts +27 -0
- package/dist/components/data-grid/filters/filter-trigger.d.ts +7 -0
- package/dist/components/data-grid/footer.d.ts +10 -0
- package/dist/components/data-grid/grid-context.d.ts +18 -0
- package/dist/components/data-grid/handle.d.ts +60 -0
- package/dist/components/data-grid/header.d.ts +12 -0
- package/dist/components/data-grid/index.d.ts +3 -0
- package/dist/components/data-grid/index.js +10 -3
- package/dist/components/data-grid/keyboard.d.ts +76 -0
- package/dist/components/data-grid/pager.d.ts +18 -0
- package/dist/components/data-grid/persistence.d.ts +60 -0
- package/dist/components/data-grid/print.d.ts +10 -0
- package/dist/components/data-grid/responsive.d.ts +36 -0
- package/dist/components/data-grid/selection.d.ts +58 -0
- package/dist/components/data-grid/state.d.ts +119 -0
- package/dist/components/data-grid/states.d.ts +34 -0
- package/dist/components/data-grid/toolbar-seam.d.ts +7 -0
- package/dist/components/data-grid/toolbar.d.ts +41 -0
- package/dist/components/data-grid/types.d.ts +1346 -0
- package/dist/components/data-grid/use-data-grid-engine.d.ts +9 -0
- package/dist/components/data-grid/virtual-rows.d.ts +43 -0
- package/dist/components/data-grid-tabs/data-grid-tabs.agent.d.ts +9 -0
- package/dist/components/data-grid-tabs/data-grid-tabs.d.ts +4 -0
- package/dist/components/data-grid-tabs/grid-view-adapter.d.ts +15 -0
- package/dist/components/data-grid-tabs/index.d.ts +5 -0
- package/dist/components/data-grid-tabs/index.js +8 -0
- package/dist/components/data-grid-tabs/types.d.ts +220 -0
- package/dist/components/data-table/ag-toolbar-seam.d.ts +35 -0
- package/dist/components/data-table/calendar-day.d.ts +4 -21
- package/dist/components/data-table/data-table.d.ts +10 -6
- package/dist/components/data-table/filters/date-range-filter.d.ts +5 -9
- package/dist/components/data-table/filters/filter-kind.d.ts +6 -0
- package/dist/components/data-table/filters/number-filter.d.ts +6 -10
- package/dist/components/data-table/filters/select-filter.d.ts +2 -4
- package/dist/components/data-table/filters/text-filter.d.ts +2 -5
- package/dist/components/data-table/index.js +4 -4
- package/dist/components/data-table/toolbar.d.ts +25 -21
- package/dist/components/data-table-tabs/ag-view-adapter.d.ts +17 -0
- package/dist/components/data-table-tabs/data-table-tabs.d.ts +34 -33
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/data-table-tabs/use-data-table-filter-tabs.d.ts +11 -66
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/icon-button-group/icon-button-group.d.ts +19 -1
- package/dist/components/icon-button-group/index.d.ts +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/notes-panel/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-table/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/permission-matrix/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/task-card/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/theme-toggle/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/treatment-receipt/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/host-compat.css +33 -2
- package/dist/i18n/locales/ar.d.ts +94 -0
- package/dist/i18n/locales/ar.js +96 -2
- package/dist/i18n/locales/de.d.ts +94 -0
- package/dist/i18n/locales/de.js +96 -2
- package/dist/i18n/locales/el.d.ts +94 -0
- package/dist/i18n/locales/el.js +96 -2
- package/dist/i18n/locales/en.d.ts +94 -0
- package/dist/i18n/locales/en.js +97 -2
- package/dist/i18n/locales/es.d.ts +94 -0
- package/dist/i18n/locales/es.js +96 -2
- package/dist/i18n/locales/fr.d.ts +94 -0
- package/dist/i18n/locales/fr.js +96 -2
- package/dist/i18n/locales/hi.d.ts +94 -0
- package/dist/i18n/locales/hi.js +96 -2
- package/dist/i18n/locales/it.d.ts +94 -0
- package/dist/i18n/locales/it.js +96 -2
- package/dist/i18n/locales/ja.d.ts +94 -0
- package/dist/i18n/locales/ja.js +96 -2
- package/dist/i18n/locales/nl.d.ts +94 -0
- package/dist/i18n/locales/nl.js +96 -2
- package/dist/i18n/locales/pl.d.ts +94 -0
- package/dist/i18n/locales/pl.js +96 -2
- package/dist/i18n/locales/pt.d.ts +94 -0
- package/dist/i18n/locales/pt.js +96 -2
- package/dist/i18n/locales/ro.d.ts +94 -0
- package/dist/i18n/locales/ro.js +96 -2
- package/dist/i18n/locales/ru.d.ts +94 -0
- package/dist/i18n/locales/ru.js +96 -2
- package/dist/i18n/locales/sq.d.ts +94 -0
- package/dist/i18n/locales/sq.js +96 -2
- package/dist/i18n/locales/sv.d.ts +94 -0
- package/dist/i18n/locales/sv.js +96 -2
- package/dist/i18n/locales/tr.d.ts +94 -0
- package/dist/i18n/locales/tr.js +96 -2
- package/dist/i18n/locales/zh.d.ts +94 -0
- package/dist/i18n/locales/zh.js +96 -2
- package/dist/index.js +1044 -1032
- package/dist/locales/ar.json +96 -2
- package/dist/locales/de.json +96 -2
- package/dist/locales/el.json +96 -2
- package/dist/locales/en.json +96 -2
- package/dist/locales/es.json +96 -2
- package/dist/locales/fr.json +96 -2
- package/dist/locales/hi.json +96 -2
- package/dist/locales/it.json +96 -2
- package/dist/locales/ja.json +96 -2
- package/dist/locales/nl.json +96 -2
- package/dist/locales/pl.json +96 -2
- package/dist/locales/pt.json +96 -2
- package/dist/locales/ro.json +96 -2
- package/dist/locales/ru.json +96 -2
- package/dist/locales/sq.json +96 -2
- package/dist/locales/sv.json +96 -2
- package/dist/locales/tr.json +96 -2
- package/dist/locales/zh.json +96 -2
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/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/registration-form/index.js +1 -1
- package/dist/patterns/send-registration-link-form/index.js +1 -1
- package/dist/patterns/workflow-webhook-action/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +5 -1
- package/dist/_chunks/checkbox-a7Sh-dXb.js +0 -227
- package/dist/_chunks/data-grid.agent-CASyEAnb.js +0 -1773
- package/dist/_chunks/data-table-C9idMvs0.js +0 -2042
- package/dist/_chunks/data-table-tabs-Db7zToFD.js +0 -728
- package/dist/_chunks/format--x5jypvH.js +0 -1319
- package/dist/_chunks/icon-button-group-mXvYDaba.js +0 -427
- package/dist/_chunks/link-cell-renderer-_Fv3WEmb.js +0 -867
- package/dist/_chunks/privacy-mask-Dc3kdkCR.js +0 -81
- package/dist/_chunks/subDays-DKISP2nE.js +0 -8
|
@@ -1,728 +0,0 @@
|
|
|
1
|
-
import { jsxs as O, jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as de, useCallback as u, useRef as T, useEffect as me, forwardRef as De, useId as Fe, useState as pe, useImperativeHandle as je } from "react";
|
|
3
|
-
import * as ce from "@radix-ui/react-tabs";
|
|
4
|
-
import { a as ne, c as ke } from "./index-D2ZczOXr.js";
|
|
5
|
-
import { useTranslation as Ae } from "react-i18next";
|
|
6
|
-
import { I as le } from "./icon-button-S8_weU3g.js";
|
|
7
|
-
import { P as ue } from "./popover-CN5IsOeS.js";
|
|
8
|
-
import { T as ze } from "./text-input-B6iAgCr3.js";
|
|
9
|
-
import { u as Ke } from "./use-direction-Dp8h70PP.js";
|
|
10
|
-
import { u as Me } from "./registry-DvAUVLHh.js";
|
|
11
|
-
import { u as Ie } from "./use-controllable-state-BiY4xTzM.js";
|
|
12
|
-
import { X as we } from "./x-B5YnXwCz.js";
|
|
13
|
-
import { P as Pe } from "./plus-DzMQ_c6b.js";
|
|
14
|
-
import { C as qe } from "./check-DrFSN__t.js";
|
|
15
|
-
const Le = {
|
|
16
|
-
id: "data-table-tabs",
|
|
17
|
-
capabilities: ["select_single", "view_change"],
|
|
18
|
-
state: {
|
|
19
|
-
activeTabId: {
|
|
20
|
-
type: "string | null",
|
|
21
|
-
descriptionKey: "ui.agent.dataTableTabs.state.activeTabId",
|
|
22
|
-
description: "Id of the currently-active saved-filter tab.",
|
|
23
|
-
read: (n) => n.getActiveTabId()
|
|
24
|
-
},
|
|
25
|
-
tabs: {
|
|
26
|
-
type: "Array<{ id, label }>",
|
|
27
|
-
descriptionKey: "ui.agent.dataTableTabs.state.tabs",
|
|
28
|
-
description: "The saved-filter tabs, in strip order (ids + labels).",
|
|
29
|
-
read: (n) => n.getTabs().map(({ id: i, label: v }) => ({ id: i, label: v }))
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
actions: {
|
|
33
|
-
select_tab: {
|
|
34
|
-
// Applies a saved filter model — a view change, like apply_filter.
|
|
35
|
-
safety: "read",
|
|
36
|
-
argsType: "{ id: string }",
|
|
37
|
-
argsSchema: {
|
|
38
|
-
type: "object",
|
|
39
|
-
properties: {
|
|
40
|
-
id: { type: "string", description: "Tab id to activate." }
|
|
41
|
-
},
|
|
42
|
-
required: ["id"]
|
|
43
|
-
},
|
|
44
|
-
idempotent: !0,
|
|
45
|
-
descriptionKey: "ui.agent.dataTableTabs.actions.selectTab",
|
|
46
|
-
description: "Activate a saved-filter tab: snapshots the outgoing tab, applies the incoming filter model to the table.",
|
|
47
|
-
invoke: (n, i) => {
|
|
48
|
-
n.selectTab(i.id);
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
get_tabs: {
|
|
52
|
-
safety: "read",
|
|
53
|
-
returns: "Array<{ id: string, label: string }>",
|
|
54
|
-
returnsSchema: {
|
|
55
|
-
type: "array",
|
|
56
|
-
items: {
|
|
57
|
-
type: "object",
|
|
58
|
-
properties: {
|
|
59
|
-
id: { type: "string" },
|
|
60
|
-
label: { type: "string" }
|
|
61
|
-
},
|
|
62
|
-
required: ["id", "label"]
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
idempotent: !0,
|
|
66
|
-
descriptionKey: "ui.agent.dataTableTabs.actions.getTabs",
|
|
67
|
-
description: "Return the saved-filter tabs (ids + labels) in order.",
|
|
68
|
-
invoke: (n) => n.getTabs().map(({ id: i, label: v }) => ({ id: i, label: v }))
|
|
69
|
-
},
|
|
70
|
-
add_tab: {
|
|
71
|
-
safety: "write",
|
|
72
|
-
argsType: "{ label?: string }",
|
|
73
|
-
argsSchema: {
|
|
74
|
-
type: "object",
|
|
75
|
-
properties: {
|
|
76
|
-
label: {
|
|
77
|
-
type: "string",
|
|
78
|
-
description: "Display name for the new tab. Defaults to a numbered name."
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
required: []
|
|
82
|
-
},
|
|
83
|
-
idempotent: !1,
|
|
84
|
-
descriptionKey: "ui.agent.dataTableTabs.actions.addTab",
|
|
85
|
-
description: "Add a new tab capturing the table's current filter model, and activate it. Returns the new tab id.",
|
|
86
|
-
returns: "string",
|
|
87
|
-
returnsSchema: { type: "string" },
|
|
88
|
-
invoke: (n, i) => n.addTab(i.label)
|
|
89
|
-
},
|
|
90
|
-
rename_tab: {
|
|
91
|
-
safety: "write",
|
|
92
|
-
argsType: "{ id: string, label: string }",
|
|
93
|
-
argsSchema: {
|
|
94
|
-
type: "object",
|
|
95
|
-
properties: {
|
|
96
|
-
id: { type: "string", description: "Tab id to rename." },
|
|
97
|
-
label: { type: "string", description: "New display name." }
|
|
98
|
-
},
|
|
99
|
-
required: ["id", "label"]
|
|
100
|
-
},
|
|
101
|
-
idempotent: !0,
|
|
102
|
-
descriptionKey: "ui.agent.dataTableTabs.actions.renameTab",
|
|
103
|
-
description: "Rename a saved-filter tab. No-op on locked tabs and empty labels.",
|
|
104
|
-
invoke: (n, i) => {
|
|
105
|
-
n.renameTab(i.id, i.label);
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
remove_tab: {
|
|
109
|
-
// Removes a saved filter permanently — destructive, do not downgrade.
|
|
110
|
-
safety: "destructive",
|
|
111
|
-
argsType: "{ id: string }",
|
|
112
|
-
argsSchema: {
|
|
113
|
-
type: "object",
|
|
114
|
-
properties: {
|
|
115
|
-
id: { type: "string", description: "Tab id to remove." }
|
|
116
|
-
},
|
|
117
|
-
required: ["id"]
|
|
118
|
-
},
|
|
119
|
-
idempotent: !0,
|
|
120
|
-
descriptionKey: "ui.agent.dataTableTabs.actions.removeTab",
|
|
121
|
-
description: "Remove a saved-filter tab (its saved filter is lost). No-op on locked tabs and the last remaining tab.",
|
|
122
|
-
invoke: (n, i) => {
|
|
123
|
-
n.removeTab(i.id);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
domHooks: {
|
|
128
|
-
root: { attr: "data-component", value: "data-table-tabs" },
|
|
129
|
-
instanceId: { attr: "data-component-id", sourceProp: "id" },
|
|
130
|
-
item: { attr: "data-tab-id" }
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
let xe = 0;
|
|
134
|
-
function Oe() {
|
|
135
|
-
try {
|
|
136
|
-
if (typeof crypto < "u" && "randomUUID" in crypto)
|
|
137
|
-
return crypto.randomUUID();
|
|
138
|
-
} catch {
|
|
139
|
-
}
|
|
140
|
-
return xe += 1, `tab-${xe}`;
|
|
141
|
-
}
|
|
142
|
-
function be(n) {
|
|
143
|
-
return typeof n == "object" && n !== null && !Array.isArray(n) && Object.getPrototypeOf(n) !== null;
|
|
144
|
-
}
|
|
145
|
-
function Ee(n) {
|
|
146
|
-
return !be(n) || n.v !== 1 || !Array.isArray(n.tabs) ? !1 : n.tabs.every(
|
|
147
|
-
(i) => be(i) && typeof i.id == "string" && typeof i.label == "string" && be(i.filterModel)
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
function Ve(n) {
|
|
151
|
-
var k, z;
|
|
152
|
-
const {
|
|
153
|
-
getTable: i,
|
|
154
|
-
tabs: v,
|
|
155
|
-
defaultTabs: A,
|
|
156
|
-
onTabsChange: R,
|
|
157
|
-
activeTabId: re,
|
|
158
|
-
defaultActiveTabId: se,
|
|
159
|
-
onActiveTabChange: ie,
|
|
160
|
-
persistKey: j,
|
|
161
|
-
persistActiveTab: E = !1,
|
|
162
|
-
captureQuickFilter: w = !1,
|
|
163
|
-
applyOnActivate: N = !0,
|
|
164
|
-
maxTabs: V = 8,
|
|
165
|
-
createTab: C,
|
|
166
|
-
makeTabId: _ = Oe
|
|
167
|
-
} = n, { t: $ } = Ae("ui"), U = v !== void 0, G = de(() => A && A.length > 0 ? A : [
|
|
168
|
-
{
|
|
169
|
-
id: "default",
|
|
170
|
-
label: $("dataTableTabs.newTabName", { number: 1 }),
|
|
171
|
-
filterModel: {}
|
|
172
|
-
}
|
|
173
|
-
], []), g = de(() => {
|
|
174
|
-
if (!j || U || typeof window > "u")
|
|
175
|
-
return null;
|
|
176
|
-
try {
|
|
177
|
-
const t = window.localStorage.getItem(`data-table-tabs:${j}`);
|
|
178
|
-
if (!t) return null;
|
|
179
|
-
const a = JSON.parse(t);
|
|
180
|
-
return Ee(a) ? a : null;
|
|
181
|
-
} catch {
|
|
182
|
-
return null;
|
|
183
|
-
}
|
|
184
|
-
}, []), Q = (g == null ? void 0 : g.tabs) ?? null, X = E && (g != null && g.activeTabId) && g.tabs.some((t) => t.id === g.activeTabId) ? g.activeTabId : void 0, K = u(
|
|
185
|
-
(t, a) => {
|
|
186
|
-
if (!(!j || U))
|
|
187
|
-
try {
|
|
188
|
-
const r = {
|
|
189
|
-
v: 1,
|
|
190
|
-
tabs: t,
|
|
191
|
-
...E && a ? { activeTabId: a } : {}
|
|
192
|
-
};
|
|
193
|
-
window.localStorage.setItem(
|
|
194
|
-
`data-table-tabs:${j}`,
|
|
195
|
-
JSON.stringify(r)
|
|
196
|
-
);
|
|
197
|
-
} catch {
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
[j, U, E]
|
|
201
|
-
), [W, Y] = Ie({
|
|
202
|
-
value: v,
|
|
203
|
-
defaultValue: Q ?? G,
|
|
204
|
-
onChange: R
|
|
205
|
-
}), S = de(() => W ?? G, [W, G]), o = u(
|
|
206
|
-
(t) => {
|
|
207
|
-
const a = t(m.current);
|
|
208
|
-
m.current = a, Y(a), K(a, f.current);
|
|
209
|
-
},
|
|
210
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
211
|
-
[Y, K]
|
|
212
|
-
), [Z, D] = Ie({
|
|
213
|
-
value: re,
|
|
214
|
-
defaultValue: X ?? se ?? ((k = S[0]) == null ? void 0 : k.id) ?? "default",
|
|
215
|
-
onChange: ie
|
|
216
|
-
}), H = Z ?? ((z = S[0]) == null ? void 0 : z.id) ?? "default", m = T(S);
|
|
217
|
-
m.current = S;
|
|
218
|
-
const f = T(H);
|
|
219
|
-
f.current = H;
|
|
220
|
-
const M = T(!1), b = T(i);
|
|
221
|
-
b.current = i;
|
|
222
|
-
const x = u(() => {
|
|
223
|
-
const t = b.current();
|
|
224
|
-
if (!t) return;
|
|
225
|
-
const a = t.getFilter() ?? {}, r = w ? (() => {
|
|
226
|
-
var d;
|
|
227
|
-
const l = (d = t.getRawApi()) == null ? void 0 : d.getGridOption("quickFilterText");
|
|
228
|
-
return typeof l == "string" && l.length > 0 ? l : void 0;
|
|
229
|
-
})() : void 0;
|
|
230
|
-
o(
|
|
231
|
-
(l) => l.map(
|
|
232
|
-
(d) => d.id === f.current ? {
|
|
233
|
-
...d,
|
|
234
|
-
filterModel: a,
|
|
235
|
-
...w ? { quickFilter: r } : {}
|
|
236
|
-
} : d
|
|
237
|
-
)
|
|
238
|
-
);
|
|
239
|
-
}, [w, o]), y = u(
|
|
240
|
-
(t) => {
|
|
241
|
-
if (!t) return;
|
|
242
|
-
const a = b.current();
|
|
243
|
-
if (a) {
|
|
244
|
-
M.current = !0;
|
|
245
|
-
try {
|
|
246
|
-
a.setFilter(t.filterModel ?? {});
|
|
247
|
-
const r = a.getRawApi();
|
|
248
|
-
w && (r == null || r.setGridOption("quickFilterText", t.quickFilter ?? "")), r == null || r.onFilterChanged();
|
|
249
|
-
} finally {
|
|
250
|
-
M.current = !1;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
[w]
|
|
255
|
-
);
|
|
256
|
-
me(() => {
|
|
257
|
-
let t;
|
|
258
|
-
const a = () => {
|
|
259
|
-
M.current || x();
|
|
260
|
-
}, r = (c) => {
|
|
261
|
-
const L = c.getRawApi();
|
|
262
|
-
if (!L) return !1;
|
|
263
|
-
if (L.addEventListener("filterChanged", a), t = () => L.removeEventListener("filterChanged", a), N) {
|
|
264
|
-
const F = m.current.find(
|
|
265
|
-
(B) => B.id === f.current
|
|
266
|
-
);
|
|
267
|
-
F && (Object.keys(F.filterModel ?? {}).length > 0 || w && F.quickFilter) && y(F);
|
|
268
|
-
}
|
|
269
|
-
return !0;
|
|
270
|
-
}, l = b.current();
|
|
271
|
-
if (l && r(l)) return () => t == null ? void 0 : t();
|
|
272
|
-
const d = window.setInterval(() => {
|
|
273
|
-
const c = b.current();
|
|
274
|
-
c && r(c) && window.clearInterval(d);
|
|
275
|
-
}, 50);
|
|
276
|
-
return () => {
|
|
277
|
-
window.clearInterval(d), t == null || t();
|
|
278
|
-
};
|
|
279
|
-
}, [N, y, x, w]);
|
|
280
|
-
const P = u(
|
|
281
|
-
(t) => {
|
|
282
|
-
if (t === f.current) return;
|
|
283
|
-
const a = m.current.find((r) => r.id === t);
|
|
284
|
-
a && (x(), D(t), f.current = t, K(m.current, t), N && y(a));
|
|
285
|
-
},
|
|
286
|
-
[
|
|
287
|
-
N,
|
|
288
|
-
y,
|
|
289
|
-
x,
|
|
290
|
-
D,
|
|
291
|
-
K
|
|
292
|
-
]
|
|
293
|
-
), q = u(
|
|
294
|
-
(t, a) => {
|
|
295
|
-
var d;
|
|
296
|
-
if (m.current.length >= V) return f.current;
|
|
297
|
-
const r = m.current.length + 1, l = C ? C(r) : {
|
|
298
|
-
id: _(),
|
|
299
|
-
label: t ?? $("dataTableTabs.newTabName", { number: r }),
|
|
300
|
-
// New tab = copy of the CURRENT live model, so the grid view does
|
|
301
|
-
// not jump on add — the natural gesture is "save my current
|
|
302
|
-
// filter as a tab".
|
|
303
|
-
filterModel: a ?? ((d = b.current()) == null ? void 0 : d.getFilter()) ?? {}
|
|
304
|
-
};
|
|
305
|
-
return D(l.id), f.current = l.id, o((c) => [...c, l]), l.id;
|
|
306
|
-
},
|
|
307
|
-
[C, _, V, D, o, $]
|
|
308
|
-
), ee = u(
|
|
309
|
-
(t, a) => {
|
|
310
|
-
const r = a.trim();
|
|
311
|
-
r && o(
|
|
312
|
-
(l) => l.map(
|
|
313
|
-
(d) => d.id === t && !d.locked ? { ...d, label: r } : d
|
|
314
|
-
)
|
|
315
|
-
);
|
|
316
|
-
},
|
|
317
|
-
[o]
|
|
318
|
-
), te = u(
|
|
319
|
-
(t) => {
|
|
320
|
-
const a = m.current, r = a.find((c) => c.id === t);
|
|
321
|
-
if (!r || r.locked || a.length <= 1) return;
|
|
322
|
-
const l = a.findIndex((c) => c.id === t), d = a.filter((c) => c.id !== t);
|
|
323
|
-
if (o(() => d), f.current === t) {
|
|
324
|
-
const c = d[Math.max(0, l - 1)];
|
|
325
|
-
c && (D(c.id), f.current = c.id, N && y(c));
|
|
326
|
-
}
|
|
327
|
-
},
|
|
328
|
-
[N, y, D, o]
|
|
329
|
-
), ae = u(() => m.current, []), oe = u(() => f.current, []);
|
|
330
|
-
return {
|
|
331
|
-
tabs: S,
|
|
332
|
-
activeTabId: H,
|
|
333
|
-
selectTab: P,
|
|
334
|
-
addTab: q,
|
|
335
|
-
renameTab: ee,
|
|
336
|
-
removeTab: te,
|
|
337
|
-
atCapacity: S.length >= V,
|
|
338
|
-
getTabsSnapshot: ae,
|
|
339
|
-
getActiveTabIdSnapshot: oe
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
const _e = ke(
|
|
343
|
-
[
|
|
344
|
-
// The strip scrolls horizontally when tabs overflow; focusable tabs inside
|
|
345
|
-
// (with an inset focus ring, below) satisfy scrollable-region-focusable.
|
|
346
|
-
// No baseline border and no leading padding: the first tab sits flush with
|
|
347
|
-
// the table's inline-start edge and the active tab merges straight into the
|
|
348
|
-
// grid header below — the table's own rounded top is the only edge drawn.
|
|
349
|
-
"ds:flex ds:items-end ds:gap-[var(--spacing-2xs)] ds:overflow-x-auto",
|
|
350
|
-
"ds:pe-[var(--spacing-2xs)]"
|
|
351
|
-
].join(" "),
|
|
352
|
-
{
|
|
353
|
-
variants: {
|
|
354
|
-
size: {
|
|
355
|
-
md: "",
|
|
356
|
-
lg: ""
|
|
357
|
-
}
|
|
358
|
-
},
|
|
359
|
-
defaultVariants: { size: "md" }
|
|
360
|
-
}
|
|
361
|
-
), $e = ke(
|
|
362
|
-
[
|
|
363
|
-
// `group` so the pointer-only ✕ can reveal on hover/focus/active; `relative`
|
|
364
|
-
// so that ✕ can be absolutely positioned in the trailing padding (below).
|
|
365
|
-
"ds:group ds:relative ds:inline-flex ds:items-center ds:justify-center",
|
|
366
|
-
"ds:whitespace-nowrap ds:select-none ds:cursor-pointer ds:shrink-0",
|
|
367
|
-
// Logical top corners so the leading corner can be squared in either text
|
|
368
|
-
// direction (see the first-tab override + the grid corner below). Inactive
|
|
369
|
-
// tabs take a crisp white fill so they read clearly against a warm page
|
|
370
|
-
// instead of dissolving into it; muted text keeps them clearly unselected.
|
|
371
|
-
// (Focus ring is INSET — see FOCUS_RING — so the scroll container never
|
|
372
|
-
// clips it and the flush-leading first tab keeps its ring.)
|
|
373
|
-
"ds:[border-start-start-radius:var(--radius-md)] ds:[border-start-end-radius:var(--radius-md)]",
|
|
374
|
-
"ds:bg-background ds:text-muted-foreground",
|
|
375
|
-
// Match the grid header's eyebrow treatment (uppercase, tracked, medium):
|
|
376
|
-
// the strip reads as one unit with the header below. `text-transform` is
|
|
377
|
-
// display-only — the stored label keeps its case for the rename editor, and
|
|
378
|
-
// uppercase is a no-op on caseless scripts (Arabic, CJK).
|
|
379
|
-
"ds:font-medium ds:uppercase ds:tracking-[var(--letter-spacing-uppercase)]",
|
|
380
|
-
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
381
|
-
"ds:hover:bg-muted/40 ds:hover:text-foreground",
|
|
382
|
-
// NOTE: the focus ring is applied by the component (see FOCUS_RING), gated
|
|
383
|
-
// on keyboard modality — Radix focuses the trigger on click, which would
|
|
384
|
-
// otherwise show a `:focus-visible` ring on a plain mouse selection.
|
|
385
|
-
// Active = the table header surface (`--muted`): a 1px downward pull fuses
|
|
386
|
-
// it into one continuous grey sheet with the grid header below. That fuse
|
|
387
|
-
// (grey fill + foreground text) is the whole selection cue — no accent bar.
|
|
388
|
-
"ds:data-[state=active]:bg-muted ds:data-[state=active]:text-foreground",
|
|
389
|
-
"ds:data-[state=active]:z-[1]",
|
|
390
|
-
"ds:data-[state=active]:[margin-block-end:-1px]",
|
|
391
|
-
"ds:disabled:pointer-events-none ds:disabled:opacity-50"
|
|
392
|
-
].join(" "),
|
|
393
|
-
{
|
|
394
|
-
variants: {
|
|
395
|
-
size: {
|
|
396
|
-
// Symmetric inline padding so the label centres and every tab matches,
|
|
397
|
-
// removable or not; the ✕ lives in the trailing padding (absolute).
|
|
398
|
-
md: "ds:h-10 ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-2xs)]",
|
|
399
|
-
lg: "ds:h-12 ds:ps-[var(--spacing-lg)] ds:pe-[var(--spacing-lg)] ds:text-[length:var(--font-size-xs)]"
|
|
400
|
-
}
|
|
401
|
-
},
|
|
402
|
-
defaultVariants: { size: "md" }
|
|
403
|
-
}
|
|
404
|
-
), Ue = "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:[outline-offset:calc(-1*var(--focus-ring-width))]";
|
|
405
|
-
function Ge() {
|
|
406
|
-
const [n, i] = pe(!1);
|
|
407
|
-
return me(() => {
|
|
408
|
-
const v = () => i((R) => R || !0), A = () => i((R) => R && !1);
|
|
409
|
-
return document.addEventListener("keydown", v, !0), document.addEventListener("pointerdown", A, !0), () => {
|
|
410
|
-
document.removeEventListener("keydown", v, !0), document.removeEventListener("pointerdown", A, !0);
|
|
411
|
-
};
|
|
412
|
-
}, []), n;
|
|
413
|
-
}
|
|
414
|
-
const He = De(function({
|
|
415
|
-
getTable: i,
|
|
416
|
-
tabs: v,
|
|
417
|
-
defaultTabs: A,
|
|
418
|
-
onTabsChange: R,
|
|
419
|
-
activeTabId: re,
|
|
420
|
-
defaultActiveTabId: se,
|
|
421
|
-
onActiveTabChange: ie,
|
|
422
|
-
persistKey: j,
|
|
423
|
-
persistActiveTab: E,
|
|
424
|
-
captureQuickFilter: w = !1,
|
|
425
|
-
applyOnActivate: N = !0,
|
|
426
|
-
allowAdd: V = !0,
|
|
427
|
-
allowRename: C = !0,
|
|
428
|
-
allowRemove: _ = !0,
|
|
429
|
-
maxTabs: $ = 8,
|
|
430
|
-
createTab: U,
|
|
431
|
-
makeTabId: G,
|
|
432
|
-
renameOnAdd: g = !0,
|
|
433
|
-
size: Q = "md",
|
|
434
|
-
id: X,
|
|
435
|
-
className: K,
|
|
436
|
-
"aria-label": W,
|
|
437
|
-
children: Y
|
|
438
|
-
}, S) {
|
|
439
|
-
const { t: o } = Ae("ui"), Z = T(null), D = Ke(Z), H = Ge(), m = Fe(), f = `${m}-panel`, M = `${m}-hint`, {
|
|
440
|
-
tabs: b,
|
|
441
|
-
activeTabId: x,
|
|
442
|
-
selectTab: y,
|
|
443
|
-
addTab: P,
|
|
444
|
-
renameTab: q,
|
|
445
|
-
removeTab: ee,
|
|
446
|
-
atCapacity: te,
|
|
447
|
-
getTabsSnapshot: ae,
|
|
448
|
-
getActiveTabIdSnapshot: oe
|
|
449
|
-
} = Ve({
|
|
450
|
-
getTable: i,
|
|
451
|
-
tabs: v,
|
|
452
|
-
defaultTabs: A,
|
|
453
|
-
onTabsChange: R,
|
|
454
|
-
activeTabId: re,
|
|
455
|
-
defaultActiveTabId: se,
|
|
456
|
-
onActiveTabChange: ie,
|
|
457
|
-
persistKey: j,
|
|
458
|
-
persistActiveTab: E,
|
|
459
|
-
captureQuickFilter: w,
|
|
460
|
-
applyOnActivate: N,
|
|
461
|
-
maxTabs: $,
|
|
462
|
-
createTab: U,
|
|
463
|
-
makeTabId: G
|
|
464
|
-
}), [k, z] = pe(null), t = T(null), a = b.find((e) => e.id === k), [r, l] = pe("");
|
|
465
|
-
me(() => {
|
|
466
|
-
if (!r) return;
|
|
467
|
-
const e = setTimeout(() => l(""), 3e3);
|
|
468
|
-
return () => clearTimeout(e);
|
|
469
|
-
}, [r]);
|
|
470
|
-
const d = T(/* @__PURE__ */ new Map()), c = u((e) => {
|
|
471
|
-
requestAnimationFrame(() => {
|
|
472
|
-
var s;
|
|
473
|
-
(s = d.current.get(e)) == null || s.focus();
|
|
474
|
-
});
|
|
475
|
-
}, []), L = u(
|
|
476
|
-
(e) => C && !e.locked,
|
|
477
|
-
[C]
|
|
478
|
-
), F = u(
|
|
479
|
-
(e) => _ && !e.locked && b.length > 1,
|
|
480
|
-
[_, b.length]
|
|
481
|
-
), B = u(
|
|
482
|
-
(e) => {
|
|
483
|
-
L(e) && z(e.id);
|
|
484
|
-
},
|
|
485
|
-
[L]
|
|
486
|
-
), Re = u(() => {
|
|
487
|
-
var e;
|
|
488
|
-
if (k) {
|
|
489
|
-
const s = ((e = t.current) == null ? void 0 : e.value) ?? "";
|
|
490
|
-
s.trim() && (q(k, s), l(
|
|
491
|
-
o("dataTableTabs.announce.renamed", { name: s.trim() })
|
|
492
|
-
));
|
|
493
|
-
}
|
|
494
|
-
z(null);
|
|
495
|
-
}, [k, q, o]), fe = u(() => z(null), []), Ne = u(() => {
|
|
496
|
-
const e = o("dataTableTabs.newTabName", { number: b.length + 1 }), s = P();
|
|
497
|
-
l(o("dataTableTabs.announce.added", { name: e })), g && C ? z(s) : c(s);
|
|
498
|
-
}, [P, C, c, g, o, b.length]), J = u(
|
|
499
|
-
(e) => {
|
|
500
|
-
if (!F(e)) return;
|
|
501
|
-
const s = b.findIndex((h) => h.id === e.id), I = b.filter((h) => h.id !== e.id)[Math.max(0, s - 1)];
|
|
502
|
-
ee(e.id), l(o("dataTableTabs.announce.removed", { name: e.label })), I && c(I.id);
|
|
503
|
-
},
|
|
504
|
-
[F, c, ee, o, b]
|
|
505
|
-
), Ce = u(
|
|
506
|
-
(e, s) => {
|
|
507
|
-
e.key === "Delete" || e.key === "Backspace" ? (e.preventDefault(), J(s)) : e.key === "F2" && (e.preventDefault(), B(s));
|
|
508
|
-
},
|
|
509
|
-
[J, B]
|
|
510
|
-
), ge = T(y);
|
|
511
|
-
ge.current = y;
|
|
512
|
-
const Te = T(P);
|
|
513
|
-
Te.current = P;
|
|
514
|
-
const ve = T(q);
|
|
515
|
-
ve.current = q;
|
|
516
|
-
const he = T(J);
|
|
517
|
-
he.current = J;
|
|
518
|
-
const ye = T({
|
|
519
|
-
getTabs: () => ae(),
|
|
520
|
-
getActiveTabId: () => oe() ?? null,
|
|
521
|
-
selectTab: (e) => ge.current(e),
|
|
522
|
-
addTab: (e, s) => Te.current(e, s),
|
|
523
|
-
renameTab: (e, s) => ve.current(e, s),
|
|
524
|
-
removeTab: (e) => {
|
|
525
|
-
const s = ae().find((I) => I.id === e);
|
|
526
|
-
s && he.current(s);
|
|
527
|
-
}
|
|
528
|
-
});
|
|
529
|
-
je(S, () => ye.current, []), Me(Le, ye.current, X);
|
|
530
|
-
const Se = `${m}-tab-${x}`;
|
|
531
|
-
return /* @__PURE__ */ O(
|
|
532
|
-
"div",
|
|
533
|
-
{
|
|
534
|
-
ref: Z,
|
|
535
|
-
"data-component": "data-table-tabs",
|
|
536
|
-
"data-component-id": X,
|
|
537
|
-
className: ne("ds:flex ds:min-w-0 ds:flex-col", K),
|
|
538
|
-
children: [
|
|
539
|
-
/* @__PURE__ */ O(
|
|
540
|
-
ue.Root,
|
|
541
|
-
{
|
|
542
|
-
open: k !== null,
|
|
543
|
-
onOpenChange: (e) => {
|
|
544
|
-
e || fe();
|
|
545
|
-
},
|
|
546
|
-
children: [
|
|
547
|
-
/* @__PURE__ */ O(
|
|
548
|
-
ce.Root,
|
|
549
|
-
{
|
|
550
|
-
value: x,
|
|
551
|
-
onValueChange: y,
|
|
552
|
-
orientation: "horizontal",
|
|
553
|
-
activationMode: "manual",
|
|
554
|
-
dir: D,
|
|
555
|
-
children: [
|
|
556
|
-
/* @__PURE__ */ O("div", { className: "ds:flex ds:items-end ds:gap-[var(--spacing-2xs)]", children: [
|
|
557
|
-
/* @__PURE__ */ p(
|
|
558
|
-
ce.List,
|
|
559
|
-
{
|
|
560
|
-
"aria-label": W ?? o("dataTableTabs.tablistLabel"),
|
|
561
|
-
"aria-describedby": M,
|
|
562
|
-
className: ne(
|
|
563
|
-
_e({ size: Q }),
|
|
564
|
-
"ds:min-w-0 ds:flex-initial"
|
|
565
|
-
),
|
|
566
|
-
children: b.map((e, s) => {
|
|
567
|
-
const I = /* @__PURE__ */ O(
|
|
568
|
-
ce.Trigger,
|
|
569
|
-
{
|
|
570
|
-
ref: (h) => {
|
|
571
|
-
h ? d.current.set(e.id, h) : d.current.delete(e.id);
|
|
572
|
-
},
|
|
573
|
-
value: e.id,
|
|
574
|
-
id: `${m}-tab-${e.id}`,
|
|
575
|
-
"aria-controls": f,
|
|
576
|
-
"data-tab-id": e.id,
|
|
577
|
-
className: ne(
|
|
578
|
-
$e({ size: Q }),
|
|
579
|
-
// The leading tab sits flush in the panel's leading-top
|
|
580
|
-
// corner: square that corner (and the grid's, below) so
|
|
581
|
-
// the leading edge is one straight line with no cut-in.
|
|
582
|
-
s === 0 && "ds:[border-start-start-radius:0]",
|
|
583
|
-
// Keyboard-only focus ring; in pointer mode suppress the
|
|
584
|
-
// UA default outline that Radix's click-focus would show.
|
|
585
|
-
H ? Ue : "ds:focus-visible:outline-none"
|
|
586
|
-
),
|
|
587
|
-
onKeyDown: (h) => Ce(h, e),
|
|
588
|
-
onDoubleClick: () => B(e),
|
|
589
|
-
children: [
|
|
590
|
-
/* @__PURE__ */ p("span", { className: "ds:max-w-[12rem] ds:truncate", children: e.label }),
|
|
591
|
-
F(e) && // Visual-only dismiss — pointer removal fires here;
|
|
592
|
-
// keyboard removal is Delete/Backspace on the trigger.
|
|
593
|
-
// No role/tabIndex: interactive content inside <button>
|
|
594
|
-
// is invalid HTML (kit TabsTrigger precedent). Absolutely
|
|
595
|
-
// positioned in the trailing padding and hidden until the
|
|
596
|
-
// tab is hovered/focused or active, so it reserves no flow
|
|
597
|
-
// space — every tab keeps the same symmetric padding
|
|
598
|
-
// whether or not it can be removed, and labels never
|
|
599
|
-
// reflow when it reveals.
|
|
600
|
-
/* @__PURE__ */ p(
|
|
601
|
-
"span",
|
|
602
|
-
{
|
|
603
|
-
"aria-hidden": "true",
|
|
604
|
-
className: ne(
|
|
605
|
-
"ds:absolute ds:end-[var(--spacing-2xs)] ds:top-1/2 ds:-translate-y-1/2",
|
|
606
|
-
"ds:inline-flex ds:items-center ds:justify-center",
|
|
607
|
-
"ds:size-3.5 ds:rounded-[var(--radius-sm)]",
|
|
608
|
-
"ds:opacity-0 ds:transition-opacity ds:motion-reduce:transition-none",
|
|
609
|
-
"ds:group-hover:opacity-100 ds:group-focus-visible:opacity-100",
|
|
610
|
-
"ds:group-data-[state=active]:opacity-100",
|
|
611
|
-
"ds:hover:bg-muted-foreground/20"
|
|
612
|
-
),
|
|
613
|
-
onPointerDown: (h) => {
|
|
614
|
-
h.stopPropagation(), h.preventDefault(), J(e);
|
|
615
|
-
},
|
|
616
|
-
children: /* @__PURE__ */ p(we, { className: "ds:size-3" })
|
|
617
|
-
}
|
|
618
|
-
)
|
|
619
|
-
]
|
|
620
|
-
},
|
|
621
|
-
e.id
|
|
622
|
-
);
|
|
623
|
-
return k === e.id ? /* @__PURE__ */ p(ue.Anchor, { asChild: !0, children: I }, e.id) : I;
|
|
624
|
-
})
|
|
625
|
-
}
|
|
626
|
-
),
|
|
627
|
-
V && /* @__PURE__ */ p(
|
|
628
|
-
le,
|
|
629
|
-
{
|
|
630
|
-
intent: "ghost",
|
|
631
|
-
size: "sm",
|
|
632
|
-
icon: /* @__PURE__ */ p(Pe, { "aria-hidden": "true" }),
|
|
633
|
-
tooltip: o(te ? "dataTableTabs.maxTabsReached" : "dataTableTabs.addTab"),
|
|
634
|
-
disabled: te,
|
|
635
|
-
className: "ds:mb-[var(--spacing-2xs)] ds:shrink-0",
|
|
636
|
-
onClick: Ne
|
|
637
|
-
}
|
|
638
|
-
)
|
|
639
|
-
] }),
|
|
640
|
-
/* @__PURE__ */ p(
|
|
641
|
-
"div",
|
|
642
|
-
{
|
|
643
|
-
role: "tabpanel",
|
|
644
|
-
id: f,
|
|
645
|
-
"aria-labelledby": Se,
|
|
646
|
-
className: "ds:min-w-0 ds:[&_.ag-root-wrapper]:[border-start-start-radius:0]",
|
|
647
|
-
children: Y
|
|
648
|
-
}
|
|
649
|
-
)
|
|
650
|
-
]
|
|
651
|
-
}
|
|
652
|
-
),
|
|
653
|
-
/* @__PURE__ */ p(
|
|
654
|
-
ue.Content,
|
|
655
|
-
{
|
|
656
|
-
side: "bottom",
|
|
657
|
-
align: "start",
|
|
658
|
-
"aria-label": o("dataTableTabs.rename.title"),
|
|
659
|
-
className: "ds:w-64",
|
|
660
|
-
onCloseAutoFocus: (e) => {
|
|
661
|
-
e.preventDefault(), a ? c(a.id) : x && c(x);
|
|
662
|
-
},
|
|
663
|
-
onOpenAutoFocus: (e) => {
|
|
664
|
-
var s, I;
|
|
665
|
-
e.preventDefault(), (s = t.current) == null || s.focus(), (I = t.current) == null || I.select();
|
|
666
|
-
},
|
|
667
|
-
children: /* @__PURE__ */ O(
|
|
668
|
-
"form",
|
|
669
|
-
{
|
|
670
|
-
className: "ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
671
|
-
onSubmit: (e) => {
|
|
672
|
-
e.preventDefault(), Re();
|
|
673
|
-
},
|
|
674
|
-
children: [
|
|
675
|
-
/* @__PURE__ */ p(
|
|
676
|
-
ze,
|
|
677
|
-
{
|
|
678
|
-
ref: t,
|
|
679
|
-
size: "sm",
|
|
680
|
-
"aria-label": o("dataTableTabs.rename.inputLabel"),
|
|
681
|
-
defaultValue: (a == null ? void 0 : a.label) ?? "",
|
|
682
|
-
maxLength: 60,
|
|
683
|
-
className: "ds:min-w-0 ds:flex-1"
|
|
684
|
-
}
|
|
685
|
-
),
|
|
686
|
-
/* @__PURE__ */ p(
|
|
687
|
-
le,
|
|
688
|
-
{
|
|
689
|
-
type: "submit",
|
|
690
|
-
intent: "ghost",
|
|
691
|
-
size: "sm",
|
|
692
|
-
icon: /* @__PURE__ */ p(qe, { "aria-hidden": "true" }),
|
|
693
|
-
tooltip: o("dataTableTabs.rename.save")
|
|
694
|
-
}
|
|
695
|
-
),
|
|
696
|
-
/* @__PURE__ */ p(
|
|
697
|
-
le,
|
|
698
|
-
{
|
|
699
|
-
type: "button",
|
|
700
|
-
intent: "ghost",
|
|
701
|
-
size: "sm",
|
|
702
|
-
icon: /* @__PURE__ */ p(we, { "aria-hidden": "true" }),
|
|
703
|
-
tooltip: o("dataTableTabs.rename.cancel"),
|
|
704
|
-
onClick: fe
|
|
705
|
-
}
|
|
706
|
-
)
|
|
707
|
-
]
|
|
708
|
-
}
|
|
709
|
-
)
|
|
710
|
-
}
|
|
711
|
-
)
|
|
712
|
-
]
|
|
713
|
-
}
|
|
714
|
-
),
|
|
715
|
-
/* @__PURE__ */ p("span", { id: M, className: "ds:sr-only", children: o("dataTableTabs.hint") }),
|
|
716
|
-
/* @__PURE__ */ p("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: r })
|
|
717
|
-
]
|
|
718
|
-
}
|
|
719
|
-
);
|
|
720
|
-
});
|
|
721
|
-
He.displayName = "DataTableTabs";
|
|
722
|
-
export {
|
|
723
|
-
He as D,
|
|
724
|
-
_e as a,
|
|
725
|
-
$e as b,
|
|
726
|
-
Le as d
|
|
727
|
-
};
|
|
728
|
-
//# sourceMappingURL=data-table-tabs-Db7zToFD.js.map
|