@alfadocs/ui-kit 0.70.0 → 0.71.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-fields-CPbFJ8e8.js +246 -0
- package/dist/_chunks/{ai-prompt-input-CuhTo9mh.js → ai-prompt-input-V4DdOeqv.js} +2 -2
- package/dist/_chunks/{alia-sidebar-B47qRQb5.js → alia-sidebar-DvIUzIX9.js} +107 -106
- package/dist/_chunks/{anatomy-scheme-CJB6dI6p.js → anatomy-scheme-CXSk11UJ.js} +2 -2
- package/dist/_chunks/{app-frame-BYx1gcV7.js → app-frame-DIEMIC5V.js} +67 -56
- package/dist/_chunks/{appointment-card-C06aZqA7.js → appointment-card-DVaeJNVB.js} +82 -98
- package/dist/_chunks/{appointment-timeline-BJM0S_Fg.js → appointment-timeline-PJgnrjFb.js} +159 -157
- package/dist/_chunks/{appointment-tray-DRRw5ROi.js → appointment-tray-B16QPGbm.js} +2 -2
- package/dist/_chunks/{audio-recorder-Cpdk5qpQ.js → audio-recorder-DNDsOLqO.js} +2 -2
- package/dist/_chunks/{autocomplete-DOeGouCL.js → autocomplete-BrONKN8l.js} +168 -146
- package/dist/_chunks/{bishop-score-DnYWtZa_.js → bishop-score-Cym_TeQY.js} +2 -2
- package/dist/_chunks/{booking-DUBI0oqt.js → booking-C7do4vaR.js} +4 -4
- package/dist/_chunks/{button-group-Ciq6J4IW.js → button-group-CvEnVzY7.js} +32 -35
- package/dist/_chunks/{care-plan-card-C5sTfY9G.js → care-plan-card-DzPDYgtK.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-CXnxGCWA.js → care-plan-entry-card-CEnQy7YP.js} +3 -3
- package/dist/_chunks/care-plan-header-DcXFXWit.js +198 -0
- package/dist/_chunks/{chat-message-3V54YipB.js → chat-message-DzpcJR-q.js} +25 -23
- package/dist/_chunks/city-input-Dkgaak7I.js +169 -0
- package/dist/_chunks/clipboard-list-S7s-MXQq.js +25 -0
- package/dist/_chunks/{combobox-Clum7gJ1.js → combobox-DnqSF0IH.js} +131 -114
- package/dist/_chunks/connection-status-CY1HV8Wg.js +108 -0
- package/dist/_chunks/control-room-rail-FAQZrGVL.js +333 -0
- package/dist/_chunks/country-select-BwUZQvTa.js +709 -0
- package/dist/_chunks/editable-currency-cell-renderer-CGELrkIj.js +410 -0
- package/dist/_chunks/{entity-card-9_62gY7l.js → entity-card-DmrgYSEX.js} +4 -4
- package/dist/_chunks/entity-summary-CaM1Y-xE.js +291 -0
- package/dist/_chunks/field-array-siUZzfYe.js +146 -0
- package/dist/_chunks/{field-value-NXYczdpO.js → field-value-3jMM0uDx.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-CF2ISaYQ.js → gestational-age-calculator-DKzEV5Qi.js} +2 -2
- package/dist/_chunks/iban-input-B0TWzR1R.js +436 -0
- package/dist/_chunks/icon-picker-0B7KhrF1.js +272 -0
- package/dist/_chunks/image-cropper-D9jqJy19.js +367 -0
- package/dist/_chunks/{link-cell-renderer-CTXqtXV-.js → link-cell-renderer-De_SLjSq.js} +262 -261
- package/dist/_chunks/list-checks-BUs75d_o.js +18 -0
- package/dist/_chunks/{marketplace-app-shell-Skhfp6vK.js → marketplace-app-shell-BGqkywsi.js} +3 -3
- package/dist/_chunks/message-card-DsHFFiL1.js +319 -0
- package/dist/_chunks/{message-tray-DwrBLJlf.js → message-tray-C0a6CL1_.js} +172 -135
- package/dist/_chunks/{multi-select-BdHHDrRN.js → multi-select-WE4S9FIF.js} +75 -63
- package/dist/_chunks/nav-grid-9xphY3FM.js +169 -0
- package/dist/_chunks/notes-panel-DXiMfuvp.js +320 -0
- package/dist/_chunks/notification-card-BMqNzCIt.js +290 -0
- package/dist/_chunks/{notification-tray-AEun6DN2.js → notification-tray-BmUlCx3g.js} +201 -166
- package/dist/_chunks/{operator-hero-CR0Rqh4-.js → operator-hero-BO8TqzX2.js} +2 -2
- package/dist/_chunks/panel-header-D313n_9-.js +105 -0
- package/dist/_chunks/{patient-details-Dlhqb5ig.js → patient-details-DgfTJimE.js} +280 -196
- package/dist/_chunks/{patient-search-Be6cLrHR.js → patient-search-CSWQKOSP.js} +2 -2
- package/dist/_chunks/{patient-shell-DV3XEtIB.js → patient-shell-BMwsIKlW.js} +3 -3
- package/dist/_chunks/{patient-summary-card-WySCMwwA.js → patient-summary-card-D4NdgYJB.js} +27 -12
- package/dist/_chunks/{patient-table-CHxf3Oqk.js → patient-table-CERknpd8.js} +3 -3
- package/dist/_chunks/{payment-request-card-BcZJwu9z.js → payment-request-card-Blf-MFNY.js} +2 -2
- package/dist/_chunks/permission-matrix-Bw5oexUt.js +174 -0
- package/dist/_chunks/position-grid-CcvqHaKN.js +169 -0
- package/dist/_chunks/postal-code-input-UCOYuRY2.js +192 -0
- package/dist/_chunks/{practice-results-C6qDfxos.js → practice-results-El5Z-oVp.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-CRVWswD-.js → pregnancy-dating-CunHrOpO.js} +2 -2
- package/dist/_chunks/{product-hub-panel-e6pW220e.js → product-hub-panel-DtU7KXxm.js} +257 -217
- package/dist/_chunks/province-select-D_TZvix3.js +261 -0
- package/dist/_chunks/{public-header.agent-DqkqA-ca.js → public-header.agent-TxmC_x1I.js} +2 -2
- package/dist/_chunks/radiograph-panel.agent-tWjN2nHX.js +553 -0
- package/dist/_chunks/reviews-panel-DxkSrgMl.js +559 -0
- package/dist/_chunks/rich-text-editor-C8tyGjfb.js +2621 -0
- package/dist/_chunks/{scroll-area-5wNK0Cyz.js → scroll-area-BZOvUhwQ.js} +2 -2
- package/dist/_chunks/{select-DMLG44F5.js → select-KsyRr8WH.js} +114 -102
- package/dist/_chunks/{sheet-BxsE7eQm.js → sheet-umkfZjF6.js} +53 -42
- package/dist/_chunks/{sidebar-DY9jGjgt.js → sidebar-QCp9wHNP.js} +125 -113
- package/dist/_chunks/{tabs-BxcOziCo.js → tabs-CYZVKKDl.js} +2 -2
- package/dist/_chunks/task-card-DCdsI0ZT.js +189 -0
- package/dist/_chunks/{task-tray-qOEQflu4.js → task-tray-DNVejijD.js} +2 -2
- package/dist/_chunks/tasks-panel-C9odmawT.js +757 -0
- package/dist/_chunks/token-insert-menu-CFQqTe_n.js +147 -0
- package/dist/_chunks/{ai-tools-rail-B5NEghsp.js → tool-rail-BZx0-yIr.js} +152 -139
- package/dist/_chunks/{tooth-scheme-BhQoPNBD.js → tooth-scheme-DJZtzfeY.js} +470 -468
- package/dist/_chunks/{transcript-panel-3THQX6nJ.js → transcript-panel-CHGHHHdT.js} +95 -83
- package/dist/_chunks/{unit-converter-YEpD9evj.js → unit-converter-CwlZbfdn.js} +2 -2
- package/dist/_chunks/{workflow-map-Dy8mLCqF.js → workflow-map-M8MBBHQm.js} +106 -118
- package/dist/agent-catalog.json +2062 -226
- package/dist/agent-i18n/en.json +206 -8
- package/dist/components/_shared/option.d.ts +2 -0
- package/dist/components/_shared/patient-fields.d.ts +1 -1
- package/dist/components/address-fields/address-fields.agent.d.ts +9 -0
- package/dist/components/address-fields/address-fields.d.ts +29 -0
- package/dist/components/address-fields/index.d.ts +5 -0
- package/dist/components/address-fields/index.js +6 -0
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/anatomy-scheme/index.js +1 -1
- package/dist/components/app-frame/app-frame.d.ts +2 -2
- package/dist/components/app-frame/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts +10 -0
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button-group/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/care-plan-header/care-plan-header.d.ts +16 -5
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/city-input/city-input.agent.d.ts +8 -0
- package/dist/components/city-input/city-input.d.ts +57 -0
- package/dist/components/city-input/index.d.ts +5 -0
- package/dist/components/city-input/index.js +6 -0
- package/dist/components/combobox/combobox.d.ts +17 -0
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/connection-status/connection-status.agent.d.ts +4 -0
- package/dist/components/connection-status/connection-status.d.ts +36 -0
- package/dist/components/connection-status/index.d.ts +4 -0
- package/dist/components/connection-status/index.js +6 -0
- package/dist/components/control-room-rail/control-room-context.d.ts +5 -5
- package/dist/components/control-room-rail/control-room-rail.agent.d.ts +4 -0
- package/dist/components/control-room-rail/control-room-rail.d.ts +5 -5
- package/dist/components/control-room-rail/index.d.ts +1 -0
- package/dist/components/control-room-rail/index.js +4 -3
- package/dist/components/counter/counter.d.ts +1 -1
- package/dist/components/country-select/country-select.agent.d.ts +8 -0
- package/dist/components/country-select/country-select.d.ts +51 -0
- package/dist/components/country-select/index.d.ts +6 -0
- package/dist/components/country-select/index.js +9 -0
- package/dist/components/country-select/iso-3166.d.ts +15 -0
- package/dist/components/data-table/cell-renderers/reorder-cell-renderer.d.ts +34 -0
- package/dist/components/data-table/index.d.ts +2 -0
- package/dist/components/data-table/index.js +13 -11
- package/dist/components/entity-summary/entity-summary.agent.d.ts +4 -0
- package/dist/components/entity-summary/entity-summary.d.ts +53 -4
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/field-array/field-array.agent.d.ts +4 -0
- package/dist/components/field-array/field-array.d.ts +45 -0
- package/dist/components/field-array/index.d.ts +4 -0
- package/dist/components/field-array/index.js +6 -0
- package/dist/components/freemium-paywall/freemium-paywall.d.ts +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/iban-input/iban-input.agent.d.ts +4 -0
- package/dist/components/iban-input/iban-input.d.ts +51 -0
- package/dist/components/iban-input/index.d.ts +5 -0
- package/dist/components/iban-input/index.js +13 -0
- package/dist/components/iban-input/is-valid-iban.d.ts +31 -0
- package/dist/components/icon-picker/icon-picker.agent.d.ts +4 -0
- package/dist/components/icon-picker/icon-picker.d.ts +41 -0
- package/dist/components/icon-picker/index.d.ts +4 -0
- package/dist/components/icon-picker/index.js +6 -0
- package/dist/components/image-cropper/crop-geometry.d.ts +30 -0
- package/dist/components/image-cropper/image-cropper.agent.d.ts +4 -0
- package/dist/components/image-cropper/image-cropper.d.ts +32 -0
- package/dist/components/image-cropper/index.d.ts +5 -0
- package/dist/components/image-cropper/index.js +11 -0
- package/dist/components/index.d.ts +16 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-card/message-card.d.ts +14 -0
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/message-tray/message-tray.d.ts +4 -0
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/nav-grid/index.d.ts +4 -0
- package/dist/components/nav-grid/index.js +7 -0
- package/dist/components/nav-grid/nav-grid.agent.d.ts +4 -0
- package/dist/components/nav-grid/nav-grid.d.ts +41 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.agent.d.ts +4 -0
- package/dist/components/notes-panel/notes-panel.d.ts +30 -0
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-card/notification-card.d.ts +15 -0
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/notification-tray/notification-tray.d.ts +4 -0
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/panel-header/index.d.ts +3 -0
- package/dist/components/panel-header/index.js +7 -0
- package/dist/components/panel-header/panel-header.d.ts +41 -0
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/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/payment-card/index.js +1 -1
- package/dist/components/permission-matrix/index.d.ts +4 -0
- package/dist/components/permission-matrix/index.js +7 -0
- package/dist/components/permission-matrix/permission-matrix.agent.d.ts +4 -0
- package/dist/components/permission-matrix/permission-matrix.d.ts +47 -0
- package/dist/components/position-grid/index.d.ts +4 -0
- package/dist/components/position-grid/index.js +7 -0
- package/dist/components/position-grid/position-grid.agent.d.ts +4 -0
- package/dist/components/position-grid/position-grid.d.ts +39 -0
- package/dist/components/postal-code-input/index.d.ts +5 -0
- package/dist/components/postal-code-input/index.js +6 -0
- package/dist/components/postal-code-input/postal-code-input.agent.d.ts +8 -0
- package/dist/components/postal-code-input/postal-code-input.d.ts +27 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/product-hub-tray/product-hub-tray.d.ts +13 -1
- package/dist/components/province-select/index.d.ts +6 -0
- package/dist/components/province-select/index.js +7 -0
- package/dist/components/province-select/it-provinces.d.ts +8 -0
- package/dist/components/province-select/province-select.agent.d.ts +8 -0
- package/dist/components/province-select/province-select.d.ts +38 -0
- package/dist/components/public-footer/public-footer.d.ts +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +17 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.d.ts +8 -2
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/skeleton/skeleton.d.ts +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-card/task-card.d.ts +14 -6
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.d.ts +4 -0
- package/dist/components/tasks-panel/index.js +6 -0
- package/dist/components/tasks-panel/tasks-panel.agent.d.ts +4 -0
- package/dist/components/tasks-panel/tasks-panel.d.ts +152 -0
- package/dist/components/token-insert-menu/index.d.ts +4 -0
- package/dist/components/token-insert-menu/index.js +6 -0
- package/dist/components/token-insert-menu/token-insert-menu.agent.d.ts +4 -0
- package/dist/components/token-insert-menu/token-insert-menu.d.ts +33 -0
- package/dist/components/tool-rail/index.d.ts +4 -0
- package/dist/components/tool-rail/index.js +6 -0
- package/dist/components/tool-rail/tool-rail.agent.d.ts +4 -0
- package/dist/components/{ai-tools-rail/ai-tools-rail.d.ts → tool-rail/tool-rail.d.ts} +29 -12
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/tooth-scheme/tooth-scheme.d.ts +9 -0
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/transcript-panel/transcript-panel.d.ts +2 -2
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/use-edge-resize.d.ts +2 -2
- package/dist/i18n/locales/ar.d.ts +167 -2
- package/dist/i18n/locales/ar.js +157 -5
- package/dist/i18n/locales/de.d.ts +167 -2
- package/dist/i18n/locales/de.js +159 -5
- package/dist/i18n/locales/el.d.ts +167 -2
- package/dist/i18n/locales/el.js +164 -5
- package/dist/i18n/locales/en.d.ts +167 -2
- package/dist/i18n/locales/en.js +170 -5
- package/dist/i18n/locales/es.d.ts +167 -2
- package/dist/i18n/locales/es.js +156 -5
- package/dist/i18n/locales/fr.d.ts +167 -2
- package/dist/i18n/locales/fr.js +159 -5
- package/dist/i18n/locales/hi.d.ts +167 -2
- package/dist/i18n/locales/hi.js +155 -5
- package/dist/i18n/locales/it.d.ts +167 -2
- package/dist/i18n/locales/it.js +159 -5
- package/dist/i18n/locales/ja.d.ts +167 -2
- package/dist/i18n/locales/ja.js +160 -5
- package/dist/i18n/locales/nl.d.ts +167 -2
- package/dist/i18n/locales/nl.js +152 -5
- package/dist/i18n/locales/pl.d.ts +167 -2
- package/dist/i18n/locales/pl.js +160 -5
- package/dist/i18n/locales/pt.d.ts +167 -2
- package/dist/i18n/locales/pt.js +164 -5
- package/dist/i18n/locales/ro.d.ts +167 -2
- package/dist/i18n/locales/ro.js +164 -5
- package/dist/i18n/locales/ru.d.ts +167 -2
- package/dist/i18n/locales/ru.js +157 -5
- package/dist/i18n/locales/sq.d.ts +167 -2
- package/dist/i18n/locales/sq.js +161 -5
- package/dist/i18n/locales/sv.d.ts +167 -2
- package/dist/i18n/locales/sv.js +159 -5
- package/dist/i18n/locales/tr.d.ts +167 -2
- package/dist/i18n/locales/tr.js +157 -5
- package/dist/i18n/locales/zh.d.ts +167 -2
- package/dist/i18n/locales/zh.js +152 -5
- package/dist/index.js +823 -755
- package/dist/locales/ar.json +170 -5
- package/dist/locales/de.json +170 -5
- package/dist/locales/el.json +170 -5
- package/dist/locales/en.json +170 -5
- package/dist/locales/es.json +170 -5
- package/dist/locales/fr.json +170 -5
- package/dist/locales/hi.json +170 -5
- package/dist/locales/it.json +170 -5
- package/dist/locales/ja.json +170 -5
- package/dist/locales/nl.json +170 -5
- package/dist/locales/pl.json +170 -5
- package/dist/locales/pt.json +170 -5
- package/dist/locales/ro.json +170 -5
- package/dist/locales/ru.json +170 -5
- package/dist/locales/sq.json +170 -5
- package/dist/locales/sv.json +170 -5
- package/dist/locales/tr.json +170 -5
- package/dist/locales/zh.json +170 -5
- package/dist/patterns/alia-assistant/alia-types.d.ts +9 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +9 -1
- package/package.json +65 -5
- package/dist/_chunks/care-plan-header-BUwqDTtz.js +0 -206
- package/dist/_chunks/control-room-rail-Y8ryLYsP.js +0 -229
- package/dist/_chunks/editable-currency-cell-renderer-C9twtALM.js +0 -328
- package/dist/_chunks/entity-summary-BxRjFh_4.js +0 -138
- package/dist/_chunks/message-card-Bx4GmLvf.js +0 -277
- package/dist/_chunks/notes-panel-ay8_lPrA.js +0 -158
- package/dist/_chunks/notification-card-D2jiKSJJ.js +0 -259
- package/dist/_chunks/radiograph-panel.agent-CAX-C3g3.js +0 -558
- package/dist/_chunks/reviews-panel-Dq7LMDcH.js +0 -555
- package/dist/_chunks/rich-text-editor-DlCqPixb.js +0 -2158
- package/dist/_chunks/task-card-BwY9jaV1.js +0 -124
- package/dist/components/ai-tools-rail/ai-tools-rail.agent.d.ts +0 -4
- package/dist/components/ai-tools-rail/index.d.ts +0 -4
- package/dist/components/ai-tools-rail/index.js +0 -6
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsxs as D, jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as Re, useRef as m, useState as E, useMemo as R, useId as ke, useCallback as F, useEffect as Te, useImperativeHandle as ze, Fragment as _e } from "react";
|
|
3
3
|
import { c as w } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as Ae } from "react-i18next";
|
|
5
|
-
import { I as
|
|
6
|
-
import { S as
|
|
7
|
-
import { a as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
const
|
|
13
|
-
id: "
|
|
5
|
+
import { I as Se } from "./icon-button-LqoiKcUN.js";
|
|
6
|
+
import { S as De } from "./scroll-area-BZOvUhwQ.js";
|
|
7
|
+
import { a as Ee } from "./tooltip-DvmfrNvB.js";
|
|
8
|
+
import { u as Ne } from "./use-controllable-state-BiY4xTzM.js";
|
|
9
|
+
import { u as Ce } from "./use-edge-resize-ZnGG7gyO.js";
|
|
10
|
+
import { u as te } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
11
|
+
import { u as Ve } from "./registry-DvAUVLHh.js";
|
|
12
|
+
const Le = {
|
|
13
|
+
id: "tool-rail",
|
|
14
14
|
capabilities: ["open", "close", "select_single"],
|
|
15
15
|
state: {
|
|
16
16
|
activeToolId: {
|
|
17
17
|
type: "string | null",
|
|
18
|
-
descriptionKey: "ui.
|
|
18
|
+
descriptionKey: "ui.toolRail.agent.state.activeToolId",
|
|
19
19
|
description: "Id of the tool whose panel is currently open, or null when the rail is collapsed to its strip. No panel content is ever exposed.",
|
|
20
20
|
read: (o) => o.getActiveToolId()
|
|
21
21
|
}
|
|
@@ -33,7 +33,7 @@ const Ve = {
|
|
|
33
33
|
idempotent: !0,
|
|
34
34
|
// descriptionKey shape is intentionally pre-existing — already resolves to
|
|
35
35
|
// real multi-locale translations; do not canonicalise.
|
|
36
|
-
descriptionKey: "ui.
|
|
36
|
+
descriptionKey: "ui.toolRail.agent.actions.open",
|
|
37
37
|
description: "Open the given tool's panel.",
|
|
38
38
|
examples: [{ args: { id: "inbox" }, note: "Open the inbox tool panel." }],
|
|
39
39
|
invoke: (o, a) => {
|
|
@@ -43,7 +43,7 @@ const Ve = {
|
|
|
43
43
|
close: {
|
|
44
44
|
safety: "read",
|
|
45
45
|
idempotent: !0,
|
|
46
|
-
descriptionKey: "ui.
|
|
46
|
+
descriptionKey: "ui.toolRail.agent.actions.close",
|
|
47
47
|
description: "Collapse the rail to its strip (no active tool).",
|
|
48
48
|
invoke: (o) => {
|
|
49
49
|
o.close();
|
|
@@ -58,7 +58,7 @@ const Ve = {
|
|
|
58
58
|
required: ["id"]
|
|
59
59
|
},
|
|
60
60
|
idempotent: !0,
|
|
61
|
-
descriptionKey: "ui.
|
|
61
|
+
descriptionKey: "ui.toolRail.agent.actions.selectTool",
|
|
62
62
|
description: "Set the active tool by id (opens its panel), or pass null to collapse.",
|
|
63
63
|
invoke: (o, a) => {
|
|
64
64
|
o.setActiveTool(a.id);
|
|
@@ -68,8 +68,8 @@ const Ve = {
|
|
|
68
68
|
domHooks: {
|
|
69
69
|
root: {
|
|
70
70
|
attr: "data-component",
|
|
71
|
-
value: "
|
|
72
|
-
description: "Marks the
|
|
71
|
+
value: "tool-rail",
|
|
72
|
+
description: "Marks the ToolRail wrapper."
|
|
73
73
|
},
|
|
74
74
|
instanceId: {
|
|
75
75
|
attr: "data-component-id",
|
|
@@ -81,7 +81,7 @@ const Ve = {
|
|
|
81
81
|
description: "Stable tool id emitted on each strip IconButton. The active icon also carries data-active set to its id."
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
},
|
|
84
|
+
}, Ke = "ds:[inline-size:3rem]", je = "ds:[inline-size:var(--tool-rail-panel-inline-size,var(--ai-tools-rail-panel-inline-size,22rem))]", ae = "--tool-rail-panel-inline-size", Pe = 288, Me = 640, qe = 352, Be = w(
|
|
85
85
|
["ds:flex ds:shrink-0 ds:h-full", "ds:bg-[var(--background)]"].join(" "),
|
|
86
86
|
{
|
|
87
87
|
variants: {
|
|
@@ -99,23 +99,23 @@ const Ve = {
|
|
|
99
99
|
},
|
|
100
100
|
defaultVariants: { side: "end" }
|
|
101
101
|
}
|
|
102
|
-
),
|
|
102
|
+
), Fe = w(
|
|
103
103
|
[
|
|
104
104
|
"ds:flex ds:shrink-0 ds:flex-col ds:items-center",
|
|
105
105
|
"ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]",
|
|
106
106
|
"ds:gap-[var(--spacing-xs)]",
|
|
107
|
-
|
|
107
|
+
Ke
|
|
108
108
|
].join(" ")
|
|
109
109
|
), Ue = w(
|
|
110
110
|
[
|
|
111
111
|
"ds:relative ds:flex ds:min-h-0 ds:flex-col ds:h-full",
|
|
112
112
|
"ds:bg-[var(--background)]",
|
|
113
|
-
|
|
113
|
+
je,
|
|
114
114
|
// Defensive: the panel doesn't animate its width today, but if a
|
|
115
115
|
// consumer adds a transition on the var, suppress it mid-drag.
|
|
116
116
|
"ds:data-[resizing]:transition-none"
|
|
117
117
|
].join(" ")
|
|
118
|
-
),
|
|
118
|
+
), He = w(
|
|
119
119
|
[
|
|
120
120
|
"ds:absolute ds:[inset-block:0] ds:z-[1] ds:select-none ds:touch-none",
|
|
121
121
|
"ds:[inline-size:var(--resizable-handle-size)] ds:cursor-col-resize",
|
|
@@ -139,7 +139,7 @@ const Ve = {
|
|
|
139
139
|
},
|
|
140
140
|
defaultVariants: { edge: "inline-start" }
|
|
141
141
|
}
|
|
142
|
-
),
|
|
142
|
+
), $e = w(
|
|
143
143
|
[
|
|
144
144
|
"ds:absolute ds:-top-[var(--spacing-xs)] ds:-end-[var(--spacing-xs)]",
|
|
145
145
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
@@ -152,7 +152,7 @@ const Ve = {
|
|
|
152
152
|
"ds:pointer-events-none ds:select-none",
|
|
153
153
|
"ds:forced-colors:outline ds:forced-colors:outline-1 ds:forced-colors:outline-[CanvasText]"
|
|
154
154
|
].join(" ")
|
|
155
|
-
),
|
|
155
|
+
), Oe = w(
|
|
156
156
|
// `group/rail-tool` lets an affordance overlay (e.g. a pin star) reveal on
|
|
157
157
|
// hover / focus-within of the whole slot.
|
|
158
158
|
["ds:group/rail-tool ds:relative", "ds:rounded-[var(--radius-sm)]"],
|
|
@@ -160,7 +160,7 @@ const Ve = {
|
|
|
160
160
|
variants: {
|
|
161
161
|
dragging: { true: "ds:opacity-60", false: "" },
|
|
162
162
|
dropTarget: {
|
|
163
|
-
true: "ds:outline-[length:var(--focus-ring-width)] ds:outline-dashed ds:outline-[var(--
|
|
163
|
+
true: "ds:outline-[length:var(--focus-ring-width)] ds:outline-dashed ds:outline-[var(--accent)] ds:outline-offset-[length:var(--focus-ring-offset)]",
|
|
164
164
|
false: ""
|
|
165
165
|
},
|
|
166
166
|
reorderable: {
|
|
@@ -175,127 +175,129 @@ const Ve = {
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
);
|
|
178
|
-
function
|
|
178
|
+
function We(o, a) {
|
|
179
179
|
return o > 99 ? a : String(o);
|
|
180
180
|
}
|
|
181
|
-
const
|
|
181
|
+
const Ze = Re(
|
|
182
182
|
({
|
|
183
183
|
id: o,
|
|
184
184
|
tools: a,
|
|
185
185
|
activeToolId: re,
|
|
186
|
-
defaultActiveToolId:
|
|
187
|
-
onActiveToolChange:
|
|
188
|
-
side:
|
|
186
|
+
defaultActiveToolId: ne = null,
|
|
187
|
+
onActiveToolChange: ie,
|
|
188
|
+
side: k = "end",
|
|
189
189
|
railLabel: oe,
|
|
190
|
-
resizablePanel:
|
|
191
|
-
onReorder:
|
|
192
|
-
formatReorderAnnouncement:
|
|
193
|
-
renderToolAffordance:
|
|
194
|
-
renderPanelHeader:
|
|
195
|
-
|
|
196
|
-
|
|
190
|
+
resizablePanel: T = !1,
|
|
191
|
+
onReorder: z,
|
|
192
|
+
formatReorderAnnouncement: N,
|
|
193
|
+
renderToolAffordance: C,
|
|
194
|
+
renderPanelHeader: U,
|
|
195
|
+
dataComponent: le = "tool-rail",
|
|
196
|
+
agentAdapter: de = Le,
|
|
197
|
+
className: ce
|
|
198
|
+
}, ue) => {
|
|
197
199
|
var Q;
|
|
198
|
-
const { t: p } = Ae(), [
|
|
200
|
+
const { t: p } = Ae(), [fe, v] = Ne({
|
|
199
201
|
value: re,
|
|
200
|
-
defaultValue:
|
|
201
|
-
onChange:
|
|
202
|
-
}), g =
|
|
202
|
+
defaultValue: ne,
|
|
203
|
+
onChange: ie
|
|
204
|
+
}), g = fe ?? null, V = m([]), _ = m(null), [L, K] = E(0), h = m(!1), j = m(!1), b = R(
|
|
203
205
|
() => a.findIndex((e) => e.id === g),
|
|
204
206
|
[a, g]
|
|
205
|
-
), l = b >= 0 ? a[b] : null,
|
|
207
|
+
), l = b >= 0 ? a[b] : null, pe = R(
|
|
206
208
|
() => a.findIndex((e) => !e.disabled),
|
|
207
209
|
[a]
|
|
208
|
-
),
|
|
210
|
+
), H = R(() => {
|
|
209
211
|
var s;
|
|
210
212
|
const e = (s = a[0]) == null ? void 0 : s.scope;
|
|
211
213
|
return e ? a.findIndex((t) => t.scope && t.scope !== e) : -1;
|
|
212
|
-
}, [a]),
|
|
214
|
+
}, [a]), ve = H > 0, d = R(() => {
|
|
213
215
|
var t;
|
|
214
|
-
const e = a.findIndex((
|
|
216
|
+
const e = a.findIndex((i) => i.reorderable);
|
|
215
217
|
if (e < 0) return null;
|
|
216
218
|
let s = e;
|
|
217
219
|
for (; s + 1 < a.length && ((t = a[s + 1]) != null && t.reorderable); ) s += 1;
|
|
218
220
|
return { first: e, last: s };
|
|
219
|
-
}, [a]),
|
|
221
|
+
}, [a]), $ = !!z && d !== null, ge = ke(), [I, P] = E(null), [O, A] = E(null), [be, me] = E(""), M = m(!1), W = F(
|
|
220
222
|
(e, s) => {
|
|
221
|
-
if (!
|
|
223
|
+
if (!z || !d) return;
|
|
222
224
|
const t = Math.max(
|
|
223
225
|
d.first,
|
|
224
226
|
Math.min(d.last, s)
|
|
225
227
|
);
|
|
226
228
|
if (t === e) return;
|
|
227
|
-
|
|
228
|
-
const
|
|
229
|
-
if (
|
|
230
|
-
const
|
|
231
|
-
tool:
|
|
229
|
+
z(e, t);
|
|
230
|
+
const i = a[e];
|
|
231
|
+
if (i) {
|
|
232
|
+
const n = N ? N({ tool: i, from: e, to: t }) : p("toolRail.reorderAnnounce", {
|
|
233
|
+
tool: i.label,
|
|
232
234
|
to: t - d.first + 1,
|
|
233
235
|
total: d.last - d.first + 1,
|
|
234
236
|
defaultValue: "{{tool}} moved to position {{to}} of {{total}}"
|
|
235
237
|
});
|
|
236
|
-
|
|
238
|
+
n && (M.current = !M.current, me(M.current ? n : `${n}`));
|
|
237
239
|
}
|
|
238
240
|
},
|
|
239
|
-
[
|
|
240
|
-
), x = b >= 0 ? b :
|
|
241
|
+
[z, d, a, p, N]
|
|
242
|
+
), x = b >= 0 ? b : L >= 0 && !((Q = a[L]) != null && Q.disabled) ? L : pe, he = F(
|
|
241
243
|
(e, s) => {
|
|
242
|
-
const t = a.find((
|
|
244
|
+
const t = a.find((i) => i.id === e);
|
|
243
245
|
!t || t.disabled || (h.current = s, v(g === e ? null : e));
|
|
244
246
|
},
|
|
245
247
|
[a, g, v]
|
|
246
|
-
),
|
|
248
|
+
), ye = F(
|
|
247
249
|
(e) => {
|
|
248
250
|
var y, r, u;
|
|
249
251
|
const s = a.length;
|
|
250
252
|
if (s === 0 || e.altKey) return;
|
|
251
253
|
let t = null;
|
|
252
254
|
if (e.key === "ArrowDown" ? t = (x + 1) % s : e.key === "ArrowUp" ? t = (x - 1 + s) % s : e.key === "Home" ? t = 0 : e.key === "End" && (t = s - 1), t === null) return;
|
|
253
|
-
const
|
|
254
|
-
let
|
|
255
|
-
for (; c < s && ((y = a[
|
|
256
|
-
|
|
257
|
-
(r = a[
|
|
255
|
+
const i = e.key === "ArrowUp" || e.key === "End";
|
|
256
|
+
let n = t, c = 0;
|
|
257
|
+
for (; c < s && ((y = a[n]) != null && y.disabled); )
|
|
258
|
+
n = i ? (n - 1 + s) % s : (n + 1) % s, c += 1;
|
|
259
|
+
(r = a[n]) != null && r.disabled || (e.preventDefault(), K(n), (u = V.current[n]) == null || u.focus());
|
|
258
260
|
},
|
|
259
261
|
[a, x]
|
|
260
|
-
),
|
|
262
|
+
), S = m(null);
|
|
261
263
|
Te(() => {
|
|
262
|
-
const e =
|
|
264
|
+
const e = S.current;
|
|
263
265
|
if (!e) return;
|
|
264
266
|
const s = (t) => {
|
|
265
267
|
if (t.key !== "Escape" || b < 0) return;
|
|
266
268
|
t.preventDefault();
|
|
267
|
-
const
|
|
268
|
-
v(null),
|
|
269
|
-
var
|
|
270
|
-
(
|
|
269
|
+
const i = b;
|
|
270
|
+
v(null), K(i), requestAnimationFrame(() => {
|
|
271
|
+
var n;
|
|
272
|
+
(n = V.current[i]) == null || n.focus();
|
|
271
273
|
});
|
|
272
274
|
};
|
|
273
275
|
return e.addEventListener("keydown", s), () => e.removeEventListener("keydown", s);
|
|
274
|
-
}, [b, v]),
|
|
276
|
+
}, [b, v]), te(() => {
|
|
275
277
|
var e;
|
|
276
278
|
l && h.current && ((e = _.current) == null || e.focus()), h.current = !1;
|
|
277
279
|
}, [l]);
|
|
278
|
-
const
|
|
279
|
-
edge:
|
|
280
|
+
const Z = k === "end" ? "inline-start" : "inline-end", { separatorProps: X, isResizing: Y, isResized: G } = Ce({
|
|
281
|
+
edge: Z,
|
|
280
282
|
targetRef: _,
|
|
281
|
-
cssProperty:
|
|
282
|
-
minSize:
|
|
283
|
-
maxSize:
|
|
284
|
-
defaultSize:
|
|
285
|
-
disabled: !
|
|
286
|
-
}),
|
|
287
|
-
|
|
283
|
+
cssProperty: ae,
|
|
284
|
+
minSize: Pe,
|
|
285
|
+
maxSize: Me,
|
|
286
|
+
defaultSize: qe,
|
|
287
|
+
disabled: !T
|
|
288
|
+
}), J = X["aria-valuenow"];
|
|
289
|
+
te(() => {
|
|
288
290
|
var e;
|
|
289
|
-
!
|
|
290
|
-
|
|
291
|
-
`${
|
|
291
|
+
!T || !G || !l || (e = _.current) == null || e.style.setProperty(
|
|
292
|
+
ae,
|
|
293
|
+
`${J}px`
|
|
292
294
|
);
|
|
293
|
-
}, [l,
|
|
294
|
-
const
|
|
295
|
-
|
|
296
|
-
const B =
|
|
295
|
+
}, [l, T, G, J]);
|
|
296
|
+
const q = m(g);
|
|
297
|
+
q.current = g;
|
|
298
|
+
const B = R(
|
|
297
299
|
() => ({
|
|
298
|
-
getActiveToolId: () =>
|
|
300
|
+
getActiveToolId: () => q.current,
|
|
299
301
|
setActiveTool: (e) => {
|
|
300
302
|
h.current = !1, v(e);
|
|
301
303
|
},
|
|
@@ -304,37 +306,43 @@ const $e = Ie(
|
|
|
304
306
|
!s || s.disabled || (h.current = !1, v(e));
|
|
305
307
|
},
|
|
306
308
|
close: () => {
|
|
307
|
-
|
|
309
|
+
const e = q.current;
|
|
310
|
+
h.current = !1, v(null), e != null && requestAnimationFrame(() => {
|
|
311
|
+
var s, t;
|
|
312
|
+
(t = (s = S.current) == null ? void 0 : s.querySelector(
|
|
313
|
+
`[data-tool-id="${CSS.escape(e)}"]`
|
|
314
|
+
)) == null || t.focus();
|
|
315
|
+
});
|
|
308
316
|
}
|
|
309
317
|
}),
|
|
310
318
|
[a, v]
|
|
311
319
|
);
|
|
312
|
-
|
|
313
|
-
const
|
|
320
|
+
ze(ue, () => B, [B]), Ve(de, B, o);
|
|
321
|
+
const we = p("toolRail.badgeCountOverflow", {
|
|
314
322
|
defaultValue: "99+"
|
|
315
323
|
});
|
|
316
324
|
return /* @__PURE__ */ D(
|
|
317
325
|
"div",
|
|
318
326
|
{
|
|
319
|
-
ref:
|
|
320
|
-
"data-component":
|
|
327
|
+
ref: S,
|
|
328
|
+
"data-component": le,
|
|
321
329
|
"data-component-id": o,
|
|
322
|
-
"data-side":
|
|
323
|
-
className: [
|
|
330
|
+
"data-side": k,
|
|
331
|
+
className: [Be({ side: k }), ce].filter(Boolean).join(" "),
|
|
324
332
|
children: [
|
|
325
|
-
|
|
333
|
+
$ ? /* @__PURE__ */ f("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: be }) : null,
|
|
326
334
|
l ? /* @__PURE__ */ D(
|
|
327
335
|
"aside",
|
|
328
336
|
{
|
|
329
337
|
ref: _,
|
|
330
338
|
tabIndex: -1,
|
|
331
|
-
"aria-label": p("
|
|
339
|
+
"aria-label": p("toolRail.panelLabel", {
|
|
332
340
|
tool: l.label,
|
|
333
341
|
defaultValue: "{{tool}} panel"
|
|
334
342
|
}),
|
|
335
|
-
"data-
|
|
343
|
+
"data-tool-rail-state": "expanded",
|
|
336
344
|
"data-active-tool": l.id,
|
|
337
|
-
"data-resizing":
|
|
345
|
+
"data-resizing": Y ? "" : void 0,
|
|
338
346
|
className: [
|
|
339
347
|
Ue(),
|
|
340
348
|
// Subtle shadow — not a line — separating the panel from the
|
|
@@ -348,61 +356,66 @@ const $e = Ie(
|
|
|
348
356
|
// theme the soft shadow becomes a solid 1px border on that same
|
|
349
357
|
// strip-facing edge.
|
|
350
358
|
"ds:z-[1]",
|
|
351
|
-
|
|
359
|
+
k === "end" ? "ds:shadow-[var(--shadow-chrome-end)] ds:[.theme-accessible_&]:border-e ds:[.theme-accessible_&]:border-[var(--border)] ds:[.theme-accessible_&]:shadow-none" : "ds:shadow-[var(--shadow-chrome-start)] ds:[.theme-accessible_&]:border-s ds:[.theme-accessible_&]:border-[var(--border)] ds:[.theme-accessible_&]:shadow-none",
|
|
352
360
|
"ds:focus-visible:outline-none"
|
|
353
361
|
].join(" "),
|
|
354
362
|
children: [
|
|
355
|
-
|
|
363
|
+
U ? U(l, { isActive: !0 }) : null,
|
|
356
364
|
l.header ? /* @__PURE__ */ f("div", { className: "ds:shrink-0", children: l.header }) : null,
|
|
357
|
-
l.fill ?
|
|
358
|
-
|
|
365
|
+
l.fill ? (
|
|
366
|
+
// data-tool-fill: a self-scrolling panel owns its own native
|
|
367
|
+
// scroll (it can't use the rail's ScrollArea), so a token rule
|
|
368
|
+
// paints its scrollbar to match the 8px overlay. See tokens/index.css.
|
|
369
|
+
/* @__PURE__ */ f("div", { "data-tool-fill": "", className: "ds:flex-1 ds:min-h-0", children: l.panel })
|
|
370
|
+
) : /* @__PURE__ */ f(
|
|
371
|
+
De,
|
|
359
372
|
{
|
|
360
373
|
orientation: "vertical",
|
|
361
374
|
className: "ds:flex-1 ds:min-h-0",
|
|
362
375
|
children: l.panel
|
|
363
376
|
}
|
|
364
377
|
),
|
|
365
|
-
|
|
378
|
+
T ? /* @__PURE__ */ f(
|
|
366
379
|
"div",
|
|
367
380
|
{
|
|
368
|
-
...
|
|
369
|
-
"aria-label": p("
|
|
381
|
+
...X,
|
|
382
|
+
"aria-label": p("toolRail.resizePanel", {
|
|
370
383
|
defaultValue: "Resize tool panel"
|
|
371
384
|
}),
|
|
372
|
-
"data-resizing":
|
|
373
|
-
className:
|
|
385
|
+
"data-resizing": Y ? "" : void 0,
|
|
386
|
+
className: He({ edge: Z })
|
|
374
387
|
}
|
|
375
388
|
) : null
|
|
376
389
|
]
|
|
377
390
|
}
|
|
378
391
|
) : null,
|
|
379
|
-
/* @__PURE__ */ f(
|
|
392
|
+
/* @__PURE__ */ f(Ee, { children: /* @__PURE__ */ f(
|
|
380
393
|
"div",
|
|
381
394
|
{
|
|
382
395
|
role: "toolbar",
|
|
383
396
|
"aria-orientation": "vertical",
|
|
384
|
-
"aria-label": oe ?? p("
|
|
385
|
-
className:
|
|
386
|
-
onKeyDown:
|
|
397
|
+
"aria-label": oe ?? p("toolRail.railLabel", { defaultValue: "Tools" }),
|
|
398
|
+
className: Fe(),
|
|
399
|
+
onKeyDown: ye,
|
|
387
400
|
children: a.map((e, s) => {
|
|
388
|
-
const t = e.id === g,
|
|
401
|
+
const t = e.id === g, i = typeof e.badgeCount == "number" && e.badgeCount > 0, n = i ? p("toolRail.toolWithCount", {
|
|
389
402
|
tool: e.label,
|
|
390
403
|
count: e.badgeCount,
|
|
391
404
|
defaultValue: "{{tool}}, {{count}} updates"
|
|
392
|
-
}) : e.label, c =
|
|
393
|
-
return /* @__PURE__ */ D(
|
|
394
|
-
|
|
405
|
+
}) : e.label, c = $ && !!e.reorderable && !e.disabled, y = c ? `${ge}-${e.id}` : void 0;
|
|
406
|
+
return /* @__PURE__ */ D(_e, { children: [
|
|
407
|
+
ve && s === H ? /* @__PURE__ */ f(
|
|
395
408
|
"div",
|
|
396
409
|
{
|
|
397
410
|
role: "separator",
|
|
398
411
|
"aria-orientation": "horizontal",
|
|
399
|
-
className: "ds:my-[var(--spacing-2xs)] ds:h-px ds:w-[var(--spacing-lg)] ds:shrink-0 ds:bg-[var(--border)]"
|
|
412
|
+
className: "ds:my-[var(--spacing-2xs)] ds:h-px ds:w-[var(--spacing-lg)] ds:shrink-0 ds:bg-[var(--border)] ds:forced-colors:bg-[CanvasText]"
|
|
400
413
|
}
|
|
401
414
|
) : null,
|
|
402
415
|
/* @__PURE__ */ D(
|
|
403
416
|
"div",
|
|
404
417
|
{
|
|
405
|
-
className:
|
|
418
|
+
className: Oe({
|
|
406
419
|
dragging: I === s,
|
|
407
420
|
dropTarget: O === s && I !== s,
|
|
408
421
|
reorderable: c
|
|
@@ -410,33 +423,33 @@ const $e = Ie(
|
|
|
410
423
|
"data-dragging": I === s ? "" : void 0,
|
|
411
424
|
draggable: c || void 0,
|
|
412
425
|
onDragStart: c ? (r) => {
|
|
413
|
-
|
|
426
|
+
P(s), r.dataTransfer.effectAllowed = "move", r.dataTransfer.setData(
|
|
414
427
|
"text/plain",
|
|
415
428
|
String(s)
|
|
416
429
|
);
|
|
417
430
|
} : void 0,
|
|
418
431
|
onDragOver: c ? (r) => {
|
|
419
|
-
I !== null && (r.preventDefault(), r.dataTransfer.dropEffect = "move", O !== s &&
|
|
432
|
+
I !== null && (r.preventDefault(), r.dataTransfer.dropEffect = "move", O !== s && A(s));
|
|
420
433
|
} : void 0,
|
|
421
|
-
onDragLeave: c ? () =>
|
|
434
|
+
onDragLeave: c ? () => A((r) => r === s ? null : r) : void 0,
|
|
422
435
|
onDrop: c ? (r) => {
|
|
423
436
|
r.preventDefault();
|
|
424
437
|
const u = I;
|
|
425
|
-
|
|
438
|
+
A(null), P(null), !(u === null || u === s) && W(u, s);
|
|
426
439
|
} : void 0,
|
|
427
440
|
onDragEnd: c ? () => {
|
|
428
|
-
|
|
441
|
+
P(null), A(null);
|
|
429
442
|
} : void 0,
|
|
430
443
|
children: [
|
|
431
444
|
/* @__PURE__ */ f(
|
|
432
|
-
|
|
445
|
+
Se,
|
|
433
446
|
{
|
|
434
447
|
ref: (r) => {
|
|
435
448
|
V.current[s] = r;
|
|
436
449
|
},
|
|
437
450
|
icon: e.icon,
|
|
438
451
|
tooltip: e.label,
|
|
439
|
-
"aria-label":
|
|
452
|
+
"aria-label": n,
|
|
440
453
|
intent: "ghost",
|
|
441
454
|
size: "sm",
|
|
442
455
|
disabled: e.disabled,
|
|
@@ -448,46 +461,46 @@ const $e = Ie(
|
|
|
448
461
|
"aria-keyshortcuts": c ? "Alt+ArrowUp Alt+ArrowDown" : void 0,
|
|
449
462
|
tabIndex: s === x ? 0 : -1,
|
|
450
463
|
onFocus: () => {
|
|
451
|
-
e.disabled ||
|
|
464
|
+
e.disabled || K(s);
|
|
452
465
|
},
|
|
453
|
-
onClick: () =>
|
|
466
|
+
onClick: () => he(e.id, j.current),
|
|
454
467
|
onKeyDown: (r) => {
|
|
455
468
|
if (r.key === "Enter" || r.key === " ") {
|
|
456
|
-
|
|
469
|
+
j.current = !0;
|
|
457
470
|
return;
|
|
458
471
|
}
|
|
459
472
|
if (c && r.altKey && d) {
|
|
460
473
|
let u = null;
|
|
461
474
|
if (r.key === "ArrowUp" ? u = s - 1 : r.key === "ArrowDown" ? u = s + 1 : r.key === "Home" ? u = d.first : r.key === "End" && (u = d.last), u !== null) {
|
|
462
475
|
r.preventDefault();
|
|
463
|
-
const
|
|
476
|
+
const Ie = Math.max(
|
|
464
477
|
d.first,
|
|
465
478
|
Math.min(d.last, u)
|
|
466
|
-
),
|
|
467
|
-
|
|
479
|
+
), xe = e.id;
|
|
480
|
+
W(s, Ie), requestAnimationFrame(() => {
|
|
468
481
|
var ee, se;
|
|
469
|
-
(se = (ee =
|
|
470
|
-
`[data-tool-id="${CSS.escape(
|
|
482
|
+
(se = (ee = S.current) == null ? void 0 : ee.querySelector(
|
|
483
|
+
`[data-tool-id="${CSS.escape(xe)}"]`
|
|
471
484
|
)) == null || se.focus();
|
|
472
485
|
});
|
|
473
486
|
}
|
|
474
487
|
}
|
|
475
488
|
},
|
|
476
489
|
onKeyUp: (r) => {
|
|
477
|
-
(r.key === "Enter" || r.key === " ") && (
|
|
490
|
+
(r.key === "Enter" || r.key === " ") && (j.current = !1);
|
|
478
491
|
}
|
|
479
492
|
}
|
|
480
493
|
),
|
|
481
|
-
|
|
494
|
+
i ? /* @__PURE__ */ f("span", { "aria-hidden": "true", className: $e(), children: We(
|
|
482
495
|
e.badgeCount,
|
|
483
|
-
|
|
496
|
+
we
|
|
484
497
|
) }) : null,
|
|
485
|
-
|
|
498
|
+
C == null ? void 0 : C(e, {
|
|
486
499
|
index: s,
|
|
487
500
|
isActive: t,
|
|
488
501
|
isRovingTarget: s === x
|
|
489
502
|
}),
|
|
490
|
-
y ? /* @__PURE__ */ f("span", { id: y, className: "ds:sr-only", children: p("
|
|
503
|
+
y ? /* @__PURE__ */ f("span", { id: y, className: "ds:sr-only", children: p("toolRail.reorderInstructions", {
|
|
491
504
|
tool: e.label,
|
|
492
505
|
defaultValue: "Reorder {{tool}}. Press Alt + Up or Alt + Down to move."
|
|
493
506
|
}) }) : null
|
|
@@ -503,9 +516,9 @@ const $e = Ie(
|
|
|
503
516
|
);
|
|
504
517
|
}
|
|
505
518
|
);
|
|
506
|
-
|
|
519
|
+
Ze.displayName = "ToolRail";
|
|
507
520
|
export {
|
|
508
|
-
|
|
509
|
-
|
|
521
|
+
Ze as T,
|
|
522
|
+
Le as t
|
|
510
523
|
};
|
|
511
|
-
//# sourceMappingURL=
|
|
524
|
+
//# sourceMappingURL=tool-rail-BZx0-yIr.js.map
|