@qw-ui/core 0.3.0-next.8 → 0.3.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/README.md +21 -37
- package/dist/action-sheet/action-sheet.d.ts +110 -0
- package/dist/action-sheet/index.d.ts +2 -0
- package/dist/action-sheet/index.js +2 -0
- package/dist/action-sheet-Cvcr1S_m.js +183 -0
- package/dist/action-sheet-Cvcr1S_m.js.map +1 -0
- package/dist/area-picker/area-picker.d.ts +113 -0
- package/dist/area-picker/index.d.ts +1 -0
- package/dist/area-picker/index.js +348 -0
- package/dist/area-picker/index.js.map +1 -0
- package/dist/aria-description-CimD2M_C.js +13 -0
- package/dist/aria-description-CimD2M_C.js.map +1 -0
- package/dist/aria-description.d.ts +2 -0
- package/dist/avatar/avatar-load.d.ts +76 -0
- package/dist/avatar/avatar.d.ts +22 -5
- package/dist/avatar/index.d.ts +1 -0
- package/dist/avatar/index.js +57 -18
- package/dist/avatar/index.js.map +1 -1
- package/dist/avatar-load-w9dq05oV.js +139 -0
- package/dist/avatar-load-w9dq05oV.js.map +1 -0
- package/dist/back-top/back-top.d.ts +77 -0
- package/dist/back-top/index.d.ts +1 -0
- package/dist/back-top/index.js +189 -0
- package/dist/back-top/index.js.map +1 -0
- package/dist/badge/badge.d.ts +85 -0
- package/dist/badge/index.d.ts +1 -0
- package/dist/badge/index.js +88 -0
- package/dist/badge/index.js.map +1 -0
- package/dist/button/button.d.ts +13 -0
- package/dist/button/index.js +3 -5
- package/dist/button/index.js.map +1 -1
- package/dist/calendar/calendar.d.ts +100 -0
- package/dist/calendar/index.d.ts +1 -0
- package/dist/calendar/index.js +2 -0
- package/dist/calendar-CmpK3stz.js +363 -0
- package/dist/calendar-CmpK3stz.js.map +1 -0
- package/dist/card/card.d.ts +68 -0
- package/dist/card/index.d.ts +2 -0
- package/dist/card/index.js +2 -0
- package/dist/card-DRtWa6Cr.js +107 -0
- package/dist/card-DRtWa6Cr.js.map +1 -0
- package/dist/cascader/cascader.d.ts +115 -0
- package/dist/cascader/index.d.ts +1 -0
- package/dist/cascader/index.js +2 -0
- package/dist/cascader-D-xMjs7P.js +333 -0
- package/dist/cascader-D-xMjs7P.js.map +1 -0
- package/dist/cell/cell.d.ts +41 -0
- package/dist/cell/index.d.ts +1 -0
- package/dist/cell/index.js +43 -0
- package/dist/cell/index.js.map +1 -0
- package/dist/check-list/check-list.d.ts +78 -0
- package/dist/check-list/index.d.ts +2 -0
- package/dist/check-list/index.js +2 -0
- package/dist/check-list-BvZHQt5w.js +60 -0
- package/dist/check-list-BvZHQt5w.js.map +1 -0
- package/dist/checkbox/checkbox.d.ts +59 -0
- package/dist/checkbox/index.d.ts +2 -0
- package/dist/checkbox/index.js +2 -0
- package/dist/checkbox-BlndJrz5.js +127 -0
- package/dist/checkbox-BlndJrz5.js.map +1 -0
- package/dist/checkbox-group/checkbox-group.d.ts +86 -0
- package/dist/checkbox-group/index.d.ts +3 -0
- package/dist/checkbox-group/index.js +2 -0
- package/dist/checkbox-group-gGfsTv-e.js +223 -0
- package/dist/checkbox-group-gGfsTv-e.js.map +1 -0
- package/dist/choice-group-C4c9m0qe.js +373 -0
- package/dist/choice-group-C4c9m0qe.js.map +1 -0
- package/dist/circle/circle.d.ts +97 -0
- package/dist/circle/index.d.ts +1 -0
- package/dist/circle/index.js +119 -0
- package/dist/circle/index.js.map +1 -0
- package/dist/collapse/collapse.d.ts +98 -0
- package/dist/collapse/index.d.ts +2 -0
- package/dist/collapse/index.js +2 -0
- package/dist/collapse-B969h7-H.js +226 -0
- package/dist/collapse-B969h7-H.js.map +1 -0
- package/dist/countdown/countdown.d.ts +114 -0
- package/dist/countdown/index.d.ts +1 -0
- package/dist/countdown/index.js +309 -0
- package/dist/countdown/index.js.map +1 -0
- package/dist/date-picker/date-picker.d.ts +168 -0
- package/dist/date-picker/index.d.ts +1 -0
- package/dist/date-picker/index.js +401 -0
- package/dist/date-picker/index.js.map +1 -0
- package/dist/descriptions/descriptions.d.ts +69 -0
- package/dist/descriptions/index.d.ts +1 -0
- package/dist/descriptions/index.js +86 -0
- package/dist/descriptions/index.js.map +1 -0
- package/dist/dialog/dialog.d.ts +61 -43
- package/dist/dialog/index.js +73 -19
- package/dist/dialog/index.js.map +1 -1
- package/dist/divider/divider.d.ts +18 -2
- package/dist/divider/index.js +20 -2
- package/dist/divider/index.js.map +1 -1
- package/dist/dropdown/dropdown.d.ts +172 -0
- package/dist/dropdown/index.d.ts +2 -0
- package/dist/dropdown/index.js +467 -0
- package/dist/dropdown/index.js.map +1 -0
- package/dist/ellipsis/ellipsis-layout.d.ts +34 -0
- package/dist/ellipsis/ellipsis.d.ts +88 -0
- package/dist/ellipsis/index.d.ts +2 -0
- package/dist/ellipsis/index.js +320 -0
- package/dist/ellipsis/index.js.map +1 -0
- package/dist/empty/empty-illustration.d.ts +3 -0
- package/dist/empty/empty.d.ts +43 -1
- package/dist/empty/index.js +2 -21
- package/dist/empty-CAgyvhUI.js +166 -0
- package/dist/empty-CAgyvhUI.js.map +1 -0
- package/dist/field/field.d.ts +95 -0
- package/dist/field/index.d.ts +2 -0
- package/dist/field/index.js +2 -0
- package/dist/field-DMHGIMZF.js +241 -0
- package/dist/field-DMHGIMZF.js.map +1 -0
- package/dist/floating-bubble/floating-bubble.d.ts +116 -0
- package/dist/floating-bubble/index.d.ts +1 -0
- package/dist/floating-bubble/index.js +333 -0
- package/dist/floating-bubble/index.js.map +1 -0
- package/dist/floating-panel/floating-panel.d.ts +80 -0
- package/dist/floating-panel/index.d.ts +2 -0
- package/dist/floating-panel/index.js +2 -0
- package/dist/floating-panel-Cbm5njBJ.js +363 -0
- package/dist/floating-panel-Cbm5njBJ.js.map +1 -0
- package/dist/footer/footer.d.ts +94 -0
- package/dist/footer/index.d.ts +1 -0
- package/dist/footer/index.js +154 -0
- package/dist/footer/index.js.map +1 -0
- package/dist/form/connect.d.ts +6 -0
- package/dist/form/form.d.ts +100 -0
- package/dist/form/ids.d.ts +14 -0
- package/dist/form/index.d.ts +13 -0
- package/dist/form/index.js +3 -0
- package/dist/form/methods.d.ts +5 -0
- package/dist/form/model.d.ts +24 -0
- package/dist/form/native.d.ts +25 -0
- package/dist/form/rules.d.ts +40 -0
- package/dist/form/ssr.d.ts +7 -0
- package/dist/form/types.d.ts +150 -0
- package/dist/form-BAGkIEMY.js +1354 -0
- package/dist/form-BAGkIEMY.js.map +1 -0
- package/dist/format-BDUY0C_c.js +89 -0
- package/dist/format-BDUY0C_c.js.map +1 -0
- package/dist/gesture-_SRHIvBm.js +30 -0
- package/dist/gesture-_SRHIvBm.js.map +1 -0
- package/dist/grid/grid-item.d.ts +22 -0
- package/dist/grid/grid.d.ts +42 -0
- package/dist/grid/index.d.ts +2 -0
- package/dist/grid/index.js +73 -0
- package/dist/grid/index.js.map +1 -0
- package/dist/icon/icon.d.ts +37 -1
- package/dist/icon/identity.d.ts +3 -0
- package/dist/icon/index.js +2 -20
- package/dist/icon-Cgdbnk1u.js +77 -0
- package/dist/icon-Cgdbnk1u.js.map +1 -0
- package/dist/image/image-load.d.ts +24 -0
- package/dist/image/image.d.ts +45 -8
- package/dist/image/index.d.ts +1 -0
- package/dist/image/index.js +116 -14
- package/dist/image/index.js.map +1 -1
- package/dist/image-preview/image-preview.d.ts +124 -0
- package/dist/image-preview/index.d.ts +1 -0
- package/dist/image-preview/index.js +450 -0
- package/dist/image-preview/index.js.map +1 -0
- package/dist/index-bar/index-bar.d.ts +121 -0
- package/dist/index-bar/index.d.ts +1 -0
- package/dist/index-bar/index.js +386 -0
- package/dist/index-bar/index.js.map +1 -0
- package/dist/index.d.ts +115 -10
- package/dist/index.js +151 -11
- package/dist/index.js.map +1 -0
- package/dist/infinite-scroll/index.d.ts +1 -0
- package/dist/infinite-scroll/index.js +248 -0
- package/dist/infinite-scroll/index.js.map +1 -0
- package/dist/infinite-scroll/infinite-scroll.d.ts +95 -0
- package/dist/input/index.js +181 -22
- package/dist/input/index.js.map +1 -1
- package/dist/input/input.d.ts +44 -1
- package/dist/layer-IpFrl5--.js +414 -0
- package/dist/layer-IpFrl5--.js.map +1 -0
- package/dist/layout-BRSqi4AQ.js +43 -0
- package/dist/layout-BRSqi4AQ.js.map +1 -0
- package/dist/layout.d.ts +13 -0
- package/dist/list/index.d.ts +2 -0
- package/dist/list/index.js +2 -0
- package/dist/list/list.d.ts +30 -0
- package/dist/list-6-iz-Irh.js +28 -0
- package/dist/list-6-iz-Irh.js.map +1 -0
- package/dist/loading/index.js +45 -2
- package/dist/loading/index.js.map +1 -1
- package/dist/loading/loading.d.ts +45 -2
- package/dist/modal-dialog-machine-CF9_z3Dm.js +487 -0
- package/dist/modal-dialog-machine-CF9_z3Dm.js.map +1 -0
- package/dist/modal-dialog-machine.d.ts +21 -0
- package/dist/modal-dismissable-lifetime.d.ts +21 -0
- package/dist/modal-registry.d.ts +24 -0
- package/dist/modal-render-hydration.d.ts +35 -0
- package/dist/modal-render-runtime.d.ts +19 -0
- package/dist/modal-render-scope.d.ts +63 -0
- package/dist/nav-bar/index.d.ts +1 -0
- package/dist/nav-bar/index.js +115 -0
- package/dist/nav-bar/index.js.map +1 -0
- package/dist/nav-bar/nav-bar.d.ts +76 -0
- package/dist/notice-bar/index.d.ts +2 -0
- package/dist/notice-bar/index.js +2 -0
- package/dist/notice-bar/notice-bar.d.ts +103 -0
- package/dist/notice-bar-DMpwLvRb.js +231 -0
- package/dist/notice-bar-DMpwLvRb.js.map +1 -0
- package/dist/notify/index.d.ts +1 -0
- package/dist/notify/index.js +251 -0
- package/dist/notify/index.js.map +1 -0
- package/dist/notify/notify.d.ts +123 -0
- package/dist/number-keyboard/index.d.ts +1 -0
- package/dist/number-keyboard/index.js +333 -0
- package/dist/number-keyboard/index.js.map +1 -0
- package/dist/number-keyboard/number-keyboard.d.ts +141 -0
- package/dist/overlay-panel/index.d.ts +2 -0
- package/dist/overlay-panel/index.js +2 -0
- package/dist/overlay-panel/overlay-panel.d.ts +20 -0
- package/dist/overlay-panel-Z_qdKeBj.js +26 -0
- package/dist/overlay-panel-Z_qdKeBj.js.map +1 -0
- package/dist/page-indicator/index.d.ts +1 -0
- package/dist/page-indicator/index.js +138 -0
- package/dist/page-indicator/index.js.map +1 -0
- package/dist/page-indicator/page-indicator.d.ts +93 -0
- package/dist/pagination/index.d.ts +1 -0
- package/dist/pagination/index.js +198 -0
- package/dist/pagination/index.js.map +1 -0
- package/dist/pagination/pagination.d.ts +125 -0
- package/dist/password-input/index.d.ts +1 -0
- package/dist/password-input/index.js +317 -0
- package/dist/password-input/index.js.map +1 -0
- package/dist/password-input/password-input.d.ts +144 -0
- package/dist/picker/index.d.ts +8 -0
- package/dist/picker/index.js +2 -0
- package/dist/picker/picker-machine.d.ts +80 -0
- package/dist/picker/picker.d.ts +121 -0
- package/dist/picker/platform.d.ts +84 -0
- package/dist/picker/selection-connect.d.ts +90 -0
- package/dist/picker/selection-model.d.ts +211 -0
- package/dist/picker-BykFntQN.js +1675 -0
- package/dist/picker-BykFntQN.js.map +1 -0
- package/dist/popover/index.d.ts +3 -0
- package/dist/popover/index.js +253 -0
- package/dist/popover/index.js.map +1 -0
- package/dist/popover/layer.d.ts +44 -0
- package/dist/popover/popover.d.ts +104 -0
- package/dist/popover/positioning.d.ts +132 -0
- package/dist/popup/index.d.ts +2 -0
- package/dist/popup/index.js +2 -0
- package/dist/popup/popup.d.ts +60 -0
- package/dist/popup-z5d8IYCt.js +576 -0
- package/dist/popup-z5d8IYCt.js.map +1 -0
- package/dist/portal-BHCNTWhg.js +78 -0
- package/dist/portal-BHCNTWhg.js.map +1 -0
- package/dist/portal.d.ts +61 -0
- package/dist/price/format.d.ts +19 -0
- package/dist/price/index.d.ts +1 -0
- package/dist/price/index.js +154 -0
- package/dist/price/index.js.map +1 -0
- package/dist/price/price.d.ts +88 -0
- package/dist/progress/index.d.ts +1 -0
- package/dist/progress/index.js +2 -0
- package/dist/progress/progress.d.ts +32 -0
- package/dist/progress-f3iYEfdA.js +37 -0
- package/dist/progress-f3iYEfdA.js.map +1 -0
- package/dist/pull-refresh/index.d.ts +1 -0
- package/dist/pull-refresh/index.js +414 -0
- package/dist/pull-refresh/index.js.map +1 -0
- package/dist/pull-refresh/pull-refresh.d.ts +118 -0
- package/dist/radio-group/index.d.ts +3 -0
- package/dist/radio-group/index.js +2 -0
- package/dist/radio-group/radio-group.d.ts +78 -0
- package/dist/radio-group-BOIMuqnS.js +230 -0
- package/dist/radio-group-BOIMuqnS.js.map +1 -0
- package/dist/rate/index.d.ts +1 -0
- package/dist/rate/index.js +2 -0
- package/dist/rate/rate-form.d.ts +28 -0
- package/dist/rate/rate.d.ts +144 -0
- package/dist/rate-5XsU2QkY.js +631 -0
- package/dist/rate-5XsU2QkY.js.map +1 -0
- package/dist/reorder/index.d.ts +1 -0
- package/dist/reorder/index.js +720 -0
- package/dist/reorder/index.js.map +1 -0
- package/dist/reorder/reorder.d.ts +190 -0
- package/dist/result/index.d.ts +1 -0
- package/dist/result/index.js +123 -0
- package/dist/result/index.js.map +1 -0
- package/dist/result/result.d.ts +88 -0
- package/dist/safe-area/index.d.ts +1 -0
- package/dist/safe-area/index.js +42 -0
- package/dist/safe-area/index.js.map +1 -0
- package/dist/safe-area/safe-area.d.ts +28 -0
- package/dist/search-bar/index.js +4 -2
- package/dist/search-bar/index.js.map +1 -1
- package/dist/search-bar/search-bar.d.ts +6 -0
- package/dist/segmented/index.d.ts +2 -0
- package/dist/segmented/index.js +2 -0
- package/dist/segmented/segmented.d.ts +127 -0
- package/dist/segmented-BaU38_L4.js +367 -0
- package/dist/segmented-BaU38_L4.js.map +1 -0
- package/dist/selection-form-BOM_odUk.js +88 -0
- package/dist/selection-form-BOM_odUk.js.map +1 -0
- package/dist/selection-form.d.ts +27 -0
- package/dist/selection-ivXqO1eu.js +55 -0
- package/dist/selection-ivXqO1eu.js.map +1 -0
- package/dist/selection.d.ts +29 -0
- package/dist/selector/choice-group.d.ts +114 -0
- package/dist/selector/index.d.ts +2 -0
- package/dist/selector/index.js +2 -0
- package/dist/selector/selector.d.ts +90 -0
- package/dist/selector-BU2MMJ4N.js +93 -0
- package/dist/selector-BU2MMJ4N.js.map +1 -0
- package/dist/share-sheet/index.d.ts +1 -0
- package/dist/share-sheet/index.js +138 -0
- package/dist/share-sheet/index.js.map +1 -0
- package/dist/share-sheet/share-sheet.d.ts +139 -0
- package/dist/side-nav/index.d.ts +1 -0
- package/dist/side-nav/index.js +99 -0
- package/dist/side-nav/index.js.map +1 -0
- package/dist/side-nav/side-nav.d.ts +94 -0
- package/dist/skeleton/index.js +51 -2
- package/dist/skeleton/index.js.map +1 -1
- package/dist/skeleton/skeleton.d.ts +34 -3
- package/dist/slider/index.d.ts +1 -0
- package/dist/slider/index.js +482 -0
- package/dist/slider/index.js.map +1 -0
- package/dist/slider/slider.d.ts +174 -0
- package/dist/space/index.d.ts +1 -0
- package/dist/space/index.js +52 -0
- package/dist/space/index.js.map +1 -0
- package/dist/space/space.d.ts +46 -0
- package/dist/statistic/index.d.ts +1 -0
- package/dist/statistic/index.js +152 -0
- package/dist/statistic/index.js.map +1 -0
- package/dist/statistic/statistic.d.ts +101 -0
- package/dist/stepper/index.d.ts +1 -0
- package/dist/stepper/index.js +172 -0
- package/dist/stepper/index.js.map +1 -0
- package/dist/stepper/stepper.d.ts +161 -0
- package/dist/steps/index.d.ts +1 -0
- package/dist/steps/index.js +72 -0
- package/dist/steps/index.js.map +1 -0
- package/dist/steps/steps.d.ts +67 -0
- package/dist/sticky/index.d.ts +1 -0
- package/dist/sticky/index.js +145 -0
- package/dist/sticky/index.js.map +1 -0
- package/dist/sticky/sticky.d.ts +70 -0
- package/dist/swipe-action/index.d.ts +1 -0
- package/dist/swipe-action/index.js +417 -0
- package/dist/swipe-action/index.js.map +1 -0
- package/dist/swipe-action/swipe-action.d.ts +148 -0
- package/dist/swiper/gesture.d.ts +32 -0
- package/dist/swiper/index.d.ts +1 -0
- package/dist/swiper/index.js +2 -0
- package/dist/swiper/swiper.d.ts +177 -0
- package/dist/swiper-BKivDkHp.js +550 -0
- package/dist/swiper-BKivDkHp.js.map +1 -0
- package/dist/switch/index.d.ts +1 -0
- package/dist/switch/index.js +168 -0
- package/dist/switch/index.js.map +1 -0
- package/dist/switch/switch.d.ts +142 -0
- package/dist/tabbar/index.d.ts +1 -0
- package/dist/tabbar/index.js +95 -0
- package/dist/tabbar/index.js.map +1 -0
- package/dist/tabbar/tabbar.d.ts +119 -0
- package/dist/tabs/index.js +22 -1
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/tabs.d.ts +12 -8
- package/dist/tag/index.js +123 -2
- package/dist/tag/index.js.map +1 -1
- package/dist/tag/tag.d.ts +67 -1
- package/dist/textarea/index.d.ts +2 -0
- package/dist/textarea/index.js +2 -242
- package/dist/textarea/platform.d.ts +22 -0
- package/dist/textarea/textarea.d.ts +169 -46
- package/dist/textarea-qbnruDUG.js +775 -0
- package/dist/textarea-qbnruDUG.js.map +1 -0
- package/dist/time-picker/index.d.ts +1 -0
- package/dist/time-picker/index.js +228 -0
- package/dist/time-picker/index.js.map +1 -0
- package/dist/time-picker/time-picker.d.ts +83 -0
- package/dist/timeline/index.d.ts +1 -0
- package/dist/timeline/index.js +131 -0
- package/dist/timeline/index.js.map +1 -0
- package/dist/timeline/timeline.d.ts +79 -0
- package/dist/toast/index.js +47 -4
- package/dist/toast/index.js.map +1 -1
- package/dist/toast/toast.d.ts +26 -3
- package/dist/top-bar/index.js +16 -2
- package/dist/top-bar/index.js.map +1 -1
- package/dist/top-bar/top-bar.d.ts +13 -2
- package/dist/tree-select/index.d.ts +1 -0
- package/dist/tree-select/index.js +512 -0
- package/dist/tree-select/index.js.map +1 -0
- package/dist/tree-select/tree-select.d.ts +215 -0
- package/dist/typography/index.d.ts +1 -0
- package/dist/typography/index.js +82 -0
- package/dist/typography/index.js.map +1 -0
- package/dist/typography/typography.d.ts +54 -0
- package/dist/upload/index.d.ts +1 -0
- package/dist/upload/index.js +458 -0
- package/dist/upload/index.js.map +1 -0
- package/dist/upload/upload.d.ts +172 -0
- package/dist/virtual-list/index.d.ts +1 -0
- package/dist/virtual-list/index.js +445 -0
- package/dist/virtual-list/index.js.map +1 -0
- package/dist/virtual-list/virtual-list.d.ts +160 -0
- package/dist/visual-manifest.d.ts +27 -0
- package/dist/watermark/index.d.ts +1 -0
- package/dist/watermark/index.js +260 -0
- package/dist/watermark/index.js.map +1 -0
- package/dist/watermark/watermark.d.ts +106 -0
- package/package.json +417 -44
- package/dist/empty/index.js.map +0 -1
- package/dist/icon/index.js.map +0 -1
- package/dist/textarea/index.js.map +0 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/** Semantic description list contract: dl/dt/dd grid, shared by every adapter. */
|
|
2
|
+
export declare const DESCRIPTIONS_LAYOUTS: readonly ["horizontal", "vertical"];
|
|
3
|
+
export declare const DESCRIPTIONS_PARTS: readonly ["root", "title", "list", "item", "label", "value"];
|
|
4
|
+
export declare const DESCRIPTIONS_MAX_COLUMN = 4;
|
|
5
|
+
export type DescriptionsLayout = (typeof DESCRIPTIONS_LAYOUTS)[number];
|
|
6
|
+
export type DescriptionsPart = (typeof DESCRIPTIONS_PARTS)[number];
|
|
7
|
+
/** One label/value pair. `T` lets framework adapters pass rich nodes without changing Core decisions. */
|
|
8
|
+
export interface DescriptionsItem<T = string> {
|
|
9
|
+
/** Stable key; also exposed as data-value. */
|
|
10
|
+
id: string;
|
|
11
|
+
label: T;
|
|
12
|
+
/** undefined/null/"" renders `emptyText`. */
|
|
13
|
+
value?: T | null;
|
|
14
|
+
/** Columns occupied; integer clamped to 1..column. */
|
|
15
|
+
span?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface QwDescriptionsProps<T = string> {
|
|
18
|
+
/** Optional caption above the list (plain region text, not a heading). */
|
|
19
|
+
title?: string;
|
|
20
|
+
items: readonly DescriptionsItem<T>[];
|
|
21
|
+
/** Integer 1–4; invalid values use 1. */
|
|
22
|
+
column?: number;
|
|
23
|
+
/** horizontal: label beside value (default); vertical: label above value. */
|
|
24
|
+
layout?: DescriptionsLayout;
|
|
25
|
+
bordered?: boolean;
|
|
26
|
+
/** Placeholder for empty values; default "-". */
|
|
27
|
+
emptyText?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ResolvedDescriptionsItem<T = string> extends DescriptionsItem<T> {
|
|
30
|
+
index: number;
|
|
31
|
+
span: number;
|
|
32
|
+
empty: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface ResolvedDescriptionsState<T = string> {
|
|
35
|
+
title?: string;
|
|
36
|
+
column: number;
|
|
37
|
+
layout: DescriptionsLayout;
|
|
38
|
+
bordered: boolean;
|
|
39
|
+
emptyText: string;
|
|
40
|
+
items: ResolvedDescriptionsItem<T>[];
|
|
41
|
+
}
|
|
42
|
+
export declare function normalizeDescriptionsColumn(column: unknown): number;
|
|
43
|
+
export declare function resolveDescriptionsState<T = string>(props: QwDescriptionsProps<T>): ResolvedDescriptionsState<T>;
|
|
44
|
+
type Part<P extends DescriptionsPart> = {
|
|
45
|
+
"data-scope": "descriptions";
|
|
46
|
+
"data-part": P;
|
|
47
|
+
};
|
|
48
|
+
export declare function getDescriptionsRootProps(state: ResolvedDescriptionsState<unknown>): Part<"root"> & {
|
|
49
|
+
"data-layout": DescriptionsLayout;
|
|
50
|
+
"data-bordered"?: "true";
|
|
51
|
+
style: Record<string, string>;
|
|
52
|
+
};
|
|
53
|
+
export declare function getDescriptionsTitleProps(present: boolean): Part<"title"> & {
|
|
54
|
+
hidden?: true;
|
|
55
|
+
};
|
|
56
|
+
export declare function getDescriptionsListProps(state: ResolvedDescriptionsState<unknown>): Part<"list"> & {
|
|
57
|
+
"data-column": number;
|
|
58
|
+
};
|
|
59
|
+
export declare function getDescriptionsItemProps(item: ResolvedDescriptionsItem<unknown>): Part<"item"> & {
|
|
60
|
+
"data-value": string;
|
|
61
|
+
"data-span": number;
|
|
62
|
+
"data-empty"?: "true";
|
|
63
|
+
style: Record<string, string>;
|
|
64
|
+
};
|
|
65
|
+
export declare function getDescriptionsLabelProps(): Part<"label">;
|
|
66
|
+
export declare function getDescriptionsValueProps(item: ResolvedDescriptionsItem<unknown>): Part<"value"> & {
|
|
67
|
+
"data-empty"?: "true";
|
|
68
|
+
};
|
|
69
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./descriptions.js";
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
//#region src/descriptions/descriptions.ts
|
|
2
|
+
/** Semantic description list contract: dl/dt/dd grid, shared by every adapter. */
|
|
3
|
+
const DESCRIPTIONS_LAYOUTS = ["horizontal", "vertical"];
|
|
4
|
+
const DESCRIPTIONS_PARTS = [
|
|
5
|
+
"root",
|
|
6
|
+
"title",
|
|
7
|
+
"list",
|
|
8
|
+
"item",
|
|
9
|
+
"label",
|
|
10
|
+
"value"
|
|
11
|
+
];
|
|
12
|
+
const DESCRIPTIONS_MAX_COLUMN = 4;
|
|
13
|
+
function normalizeDescriptionsColumn(column) {
|
|
14
|
+
if (typeof column !== "number" || !Number.isFinite(column)) return 1;
|
|
15
|
+
const value = Math.floor(column);
|
|
16
|
+
return value < 1 ? 1 : Math.min(4, value);
|
|
17
|
+
}
|
|
18
|
+
function normalizeSpan(span, column) {
|
|
19
|
+
if (typeof span !== "number" || !Number.isFinite(span)) return 1;
|
|
20
|
+
return Math.max(1, Math.min(column, Math.floor(span)));
|
|
21
|
+
}
|
|
22
|
+
function isEmptyValue(value) {
|
|
23
|
+
return value === void 0 || value === null || value === "";
|
|
24
|
+
}
|
|
25
|
+
function resolveDescriptionsState(props) {
|
|
26
|
+
const column = normalizeDescriptionsColumn(props.column);
|
|
27
|
+
return {
|
|
28
|
+
title: typeof props.title === "string" && props.title !== "" ? props.title : void 0,
|
|
29
|
+
column,
|
|
30
|
+
layout: DESCRIPTIONS_LAYOUTS.includes(props.layout) ? props.layout : "horizontal",
|
|
31
|
+
bordered: props.bordered === true,
|
|
32
|
+
emptyText: typeof props.emptyText === "string" ? props.emptyText : "-",
|
|
33
|
+
items: (props.items ?? []).map((item, index) => ({
|
|
34
|
+
...item,
|
|
35
|
+
index,
|
|
36
|
+
span: normalizeSpan(item.span, column),
|
|
37
|
+
empty: isEmptyValue(item.value)
|
|
38
|
+
}))
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
const part = (name) => ({
|
|
42
|
+
"data-scope": "descriptions",
|
|
43
|
+
"data-part": name
|
|
44
|
+
});
|
|
45
|
+
function getDescriptionsRootProps(state) {
|
|
46
|
+
return {
|
|
47
|
+
...part("root"),
|
|
48
|
+
"data-layout": state.layout,
|
|
49
|
+
...state.bordered ? { "data-bordered": "true" } : {},
|
|
50
|
+
style: { "--qw-descriptions-column": String(state.column) }
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function getDescriptionsTitleProps(present) {
|
|
54
|
+
return {
|
|
55
|
+
...part("title"),
|
|
56
|
+
...present ? {} : { hidden: true }
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function getDescriptionsListProps(state) {
|
|
60
|
+
return {
|
|
61
|
+
...part("list"),
|
|
62
|
+
"data-column": state.column
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function getDescriptionsItemProps(item) {
|
|
66
|
+
return {
|
|
67
|
+
...part("item"),
|
|
68
|
+
"data-value": item.id,
|
|
69
|
+
"data-span": item.span,
|
|
70
|
+
...item.empty ? { "data-empty": "true" } : {},
|
|
71
|
+
style: { gridColumnEnd: `span ${item.span}` }
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function getDescriptionsLabelProps() {
|
|
75
|
+
return part("label");
|
|
76
|
+
}
|
|
77
|
+
function getDescriptionsValueProps(item) {
|
|
78
|
+
return {
|
|
79
|
+
...part("value"),
|
|
80
|
+
...item.empty ? { "data-empty": "true" } : {}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
export { DESCRIPTIONS_LAYOUTS, DESCRIPTIONS_MAX_COLUMN, DESCRIPTIONS_PARTS, getDescriptionsItemProps, getDescriptionsLabelProps, getDescriptionsListProps, getDescriptionsRootProps, getDescriptionsTitleProps, getDescriptionsValueProps, normalizeDescriptionsColumn, resolveDescriptionsState };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/descriptions/descriptions.ts"],"sourcesContent":["/** Semantic description list contract: dl/dt/dd grid, shared by every adapter. */\nexport const DESCRIPTIONS_LAYOUTS = [\"horizontal\", \"vertical\"] as const;\nexport const DESCRIPTIONS_PARTS = [\"root\", \"title\", \"list\", \"item\", \"label\", \"value\"] as const;\nexport const DESCRIPTIONS_MAX_COLUMN = 4;\nexport type DescriptionsLayout = (typeof DESCRIPTIONS_LAYOUTS)[number];\nexport type DescriptionsPart = (typeof DESCRIPTIONS_PARTS)[number];\n\n/** One label/value pair. `T` lets framework adapters pass rich nodes without changing Core decisions. */\nexport interface DescriptionsItem<T = string> {\n /** Stable key; also exposed as data-value. */\n id: string;\n label: T;\n /** undefined/null/\"\" renders `emptyText`. */\n value?: T | null;\n /** Columns occupied; integer clamped to 1..column. */\n span?: number;\n}\nexport interface QwDescriptionsProps<T = string> {\n /** Optional caption above the list (plain region text, not a heading). */\n title?: string;\n items: readonly DescriptionsItem<T>[];\n /** Integer 1–4; invalid values use 1. */\n column?: number;\n /** horizontal: label beside value (default); vertical: label above value. */\n layout?: DescriptionsLayout;\n bordered?: boolean;\n /** Placeholder for empty values; default \"-\". */\n emptyText?: string;\n}\nexport interface ResolvedDescriptionsItem<T = string> extends DescriptionsItem<T> {\n index: number;\n span: number;\n empty: boolean;\n}\nexport interface ResolvedDescriptionsState<T = string> {\n title?: string;\n column: number;\n layout: DescriptionsLayout;\n bordered: boolean;\n emptyText: string;\n items: ResolvedDescriptionsItem<T>[];\n}\n\nexport function normalizeDescriptionsColumn(column: unknown): number {\n if (typeof column !== \"number\" || !Number.isFinite(column)) return 1;\n const value = Math.floor(column);\n return value < 1 ? 1 : Math.min(DESCRIPTIONS_MAX_COLUMN, value);\n}\nfunction normalizeSpan(span: unknown, column: number): number {\n if (typeof span !== \"number\" || !Number.isFinite(span)) return 1;\n return Math.max(1, Math.min(column, Math.floor(span)));\n}\nfunction isEmptyValue(value: unknown): boolean {\n return value === undefined || value === null || value === \"\";\n}\n\nexport function resolveDescriptionsState<T = string>(props: QwDescriptionsProps<T>): ResolvedDescriptionsState<T> {\n const column = normalizeDescriptionsColumn(props.column);\n return {\n title: typeof props.title === \"string\" && props.title !== \"\" ? props.title : undefined,\n column,\n layout: DESCRIPTIONS_LAYOUTS.includes(props.layout!) ? props.layout! : \"horizontal\",\n bordered: props.bordered === true,\n emptyText: typeof props.emptyText === \"string\" ? props.emptyText : \"-\",\n items: (props.items ?? []).map((item, index) => ({ ...item, index, span: normalizeSpan(item.span, column), empty: isEmptyValue(item.value) })),\n };\n}\n\ntype Part<P extends DescriptionsPart> = { \"data-scope\": \"descriptions\"; \"data-part\": P };\nconst part = <P extends DescriptionsPart>(name: P): Part<P> => ({ \"data-scope\": \"descriptions\", \"data-part\": name });\n\nexport function getDescriptionsRootProps(state: ResolvedDescriptionsState<unknown>): Part<\"root\"> & { \"data-layout\": DescriptionsLayout; \"data-bordered\"?: \"true\"; style: Record<string, string> } {\n return { ...part(\"root\"), \"data-layout\": state.layout, ...(state.bordered ? { \"data-bordered\": \"true\" as const } : {}), style: { \"--qw-descriptions-column\": String(state.column) } };\n}\nexport function getDescriptionsTitleProps(present: boolean): Part<\"title\"> & { hidden?: true } {\n return { ...part(\"title\"), ...(present ? {} : { hidden: true as const }) };\n}\nexport function getDescriptionsListProps(state: ResolvedDescriptionsState<unknown>): Part<\"list\"> & { \"data-column\": number } {\n return { ...part(\"list\"), \"data-column\": state.column };\n}\nexport function getDescriptionsItemProps(item: ResolvedDescriptionsItem<unknown>): Part<\"item\"> & { \"data-value\": string; \"data-span\": number; \"data-empty\"?: \"true\"; style: Record<string, string> } {\n return { ...part(\"item\"), \"data-value\": item.id, \"data-span\": item.span, ...(item.empty ? { \"data-empty\": \"true\" as const } : {}), style: { gridColumnEnd: `span ${item.span}` } };\n}\nexport function getDescriptionsLabelProps(): Part<\"label\"> { return part(\"label\"); }\nexport function getDescriptionsValueProps(item: ResolvedDescriptionsItem<unknown>): Part<\"value\"> & { \"data-empty\"?: \"true\" } {\n return { ...part(\"value\"), ...(item.empty ? { \"data-empty\": \"true\" as const } : {}) };\n}\n"],"mappings":";;AACA,MAAa,uBAAuB,CAAC,cAAc,UAAU;AAC7D,MAAa,qBAAqB;CAAC;CAAQ;CAAS;CAAQ;CAAQ;CAAS;AAAO;AACpF,MAAa,0BAA0B;AAwCvC,SAAgB,4BAA4B,QAAyB;CACnE,IAAI,OAAO,WAAW,YAAY,CAAC,OAAO,SAAS,MAAM,GAAG,OAAO;CACnE,MAAM,QAAQ,KAAK,MAAM,MAAM;CAC/B,OAAO,QAAQ,IAAI,IAAI,KAAK,IAAA,GAA6B,KAAK;AAChE;AACA,SAAS,cAAc,MAAe,QAAwB;CAC5D,IAAI,OAAO,SAAS,YAAY,CAAC,OAAO,SAAS,IAAI,GAAG,OAAO;CAC/D,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,QAAQ,KAAK,MAAM,IAAI,CAAC,CAAC;AACvD;AACA,SAAS,aAAa,OAAyB;CAC7C,OAAO,UAAU,KAAA,KAAa,UAAU,QAAQ,UAAU;AAC5D;AAEA,SAAgB,yBAAqC,OAA6D;CAChH,MAAM,SAAS,4BAA4B,MAAM,MAAM;CACvD,OAAO;EACL,OAAO,OAAO,MAAM,UAAU,YAAY,MAAM,UAAU,KAAK,MAAM,QAAQ,KAAA;EAC7E;EACA,QAAQ,qBAAqB,SAAS,MAAM,MAAO,IAAI,MAAM,SAAU;EACvE,UAAU,MAAM,aAAa;EAC7B,WAAW,OAAO,MAAM,cAAc,WAAW,MAAM,YAAY;EACnE,QAAQ,MAAM,SAAS,CAAC,EAAA,CAAG,KAAK,MAAM,WAAW;GAAE,GAAG;GAAM;GAAO,MAAM,cAAc,KAAK,MAAM,MAAM;GAAG,OAAO,aAAa,KAAK,KAAK;EAAE,EAAE;CAC/I;AACF;AAGA,MAAM,QAAoC,UAAsB;CAAE,cAAc;CAAgB,aAAa;AAAK;AAElH,SAAgB,yBAAyB,OAA0J;CACjM,OAAO;EAAE,GAAG,KAAK,MAAM;EAAG,eAAe,MAAM;EAAQ,GAAI,MAAM,WAAW,EAAE,iBAAiB,OAAgB,IAAI,CAAC;EAAI,OAAO,EAAE,4BAA4B,OAAO,MAAM,MAAM,EAAE;CAAE;AACtL;AACA,SAAgB,0BAA0B,SAAqD;CAC7F,OAAO;EAAE,GAAG,KAAK,OAAO;EAAG,GAAI,UAAU,CAAC,IAAI,EAAE,QAAQ,KAAc;CAAG;AAC3E;AACA,SAAgB,yBAAyB,OAAqF;CAC5H,OAAO;EAAE,GAAG,KAAK,MAAM;EAAG,eAAe,MAAM;CAAO;AACxD;AACA,SAAgB,yBAAyB,MAA6J;CACpM,OAAO;EAAE,GAAG,KAAK,MAAM;EAAG,cAAc,KAAK;EAAI,aAAa,KAAK;EAAM,GAAI,KAAK,QAAQ,EAAE,cAAc,OAAgB,IAAI,CAAC;EAAI,OAAO,EAAE,eAAe,QAAQ,KAAK,OAAO;CAAE;AACnL;AACA,SAAgB,4BAA2C;CAAE,OAAO,KAAK,OAAO;AAAG;AACnF,SAAgB,0BAA0B,MAAoF;CAC5H,OAAO;EAAE,GAAG,KAAK,OAAO;EAAG,GAAI,KAAK,QAAQ,EAAE,cAAc,OAAgB,IAAI,CAAC;CAAG;AACtF"}
|
package/dist/dialog/dialog.d.ts
CHANGED
|
@@ -1,59 +1,77 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Api, type Props as ZagDialogProps, type Service } from "@zag-js/dialog";
|
|
2
|
+
import type { NormalizeProps, PropTypes } from "@zag-js/types";
|
|
2
3
|
/**
|
|
3
|
-
* QwDialogProps — Dialog
|
|
4
|
+
* QwDialogProps — H5 系统 Dialog 的跨框架行为输入。
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* 2. 命名 rebrand:把 zag 的 closeOnInteractOutside / preventScroll 改成业务易懂命名;
|
|
8
|
-
* 3. 业务 props 透出:onOpenChange / initialFocus / returnFocus 在 React/Vue 同名。
|
|
9
|
-
*
|
|
10
|
-
* 业务方只需 import 本类型,不需要直接 import `@zag-js/*`。
|
|
6
|
+
* 只暴露业务能理解的开合、遮罩点击、body 滚动控制;modal / role / focus
|
|
7
|
+
* 策略是组件内部无障碍政策,不作为业务 API。
|
|
11
8
|
*/
|
|
12
9
|
export interface QwDialogProps {
|
|
13
|
-
/** 唯一 id
|
|
10
|
+
/** 唯一 id 前缀;不传时由适配层提供 SSR/CSR 稳定 id。 */
|
|
14
11
|
id?: string;
|
|
15
12
|
/** 受控开关。 */
|
|
16
13
|
open?: boolean;
|
|
17
14
|
/** 非受控初值。 */
|
|
18
15
|
defaultOpen?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* 禁用 trigger:禁用后点击/键盘都不打开。
|
|
43
|
-
* adapter 层声明式属性(落到原生 button[disabled])——zag dialog 无此 context,不进 machine。
|
|
44
|
-
*/
|
|
45
|
-
disabled?: boolean;
|
|
16
|
+
/** 点击遮罩关闭,默认 true。 */
|
|
17
|
+
closeOnMaskClick?: boolean;
|
|
18
|
+
/** Dialog 打开时禁止 body 滚动,默认 true。 */
|
|
19
|
+
disableBodyScroll?: boolean;
|
|
20
|
+
/** 状态变化回调。 */
|
|
21
|
+
onOpenChange?: (open: boolean) => void;
|
|
22
|
+
}
|
|
23
|
+
export interface QwDialogActionProps {
|
|
24
|
+
/** 是否展示取消按钮,默认 true。 */
|
|
25
|
+
showCancel?: boolean;
|
|
26
|
+
/** 取消按钮禁用。 */
|
|
27
|
+
cancelDisabled?: boolean;
|
|
28
|
+
/** 确认按钮禁用。 */
|
|
29
|
+
confirmDisabled?: boolean;
|
|
30
|
+
/** 确认按钮忙碌;忙碌时视为禁用。 */
|
|
31
|
+
confirmLoading?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface QwDialogActionState {
|
|
34
|
+
showCancel: boolean;
|
|
35
|
+
cancelDisabled: boolean;
|
|
36
|
+
confirmDisabled: boolean;
|
|
37
|
+
confirmLoading: boolean;
|
|
46
38
|
}
|
|
47
39
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* 用 re-export 而非 `const x = dialog.x` 以保留原始可移植类型 (避免 TS2742)。
|
|
40
|
+
* 共用 Core 的 Zag dialog 薄包装;connect 只追加纯声明属性 getter。
|
|
41
|
+
* 各框架适配层只实例化 service 并摊 prop-getter。
|
|
51
42
|
*/
|
|
52
|
-
export
|
|
43
|
+
export declare function connect<T extends PropTypes>(service: Service, normalize: NormalizeProps<T>): Api<T> & {
|
|
44
|
+
getOriginProps(): T["element"];
|
|
45
|
+
};
|
|
46
|
+
export { modalDialogMachine as dialogMachine } from "../modal-dialog-machine.js";
|
|
53
47
|
/** rebrand zag 的 DialogApi 类型对外。 */
|
|
54
48
|
export type { Api as QwDialogApi } from "@zag-js/dialog";
|
|
49
|
+
/** 把 H5 Dialog 公开 props 转成 zag dialog machine context。 */
|
|
50
|
+
export declare function createDialogProps(props?: QwDialogProps): Partial<ZagDialogProps>;
|
|
51
|
+
/** 键盘激活时适配层传入的最小事件。Core 不查询 document。 */
|
|
52
|
+
export interface DialogTriggerKeyEvent {
|
|
53
|
+
readonly key: string;
|
|
54
|
+
readonly defaultPrevented: boolean;
|
|
55
|
+
preventDefault(): void;
|
|
56
|
+
readonly currentTarget: object | null;
|
|
57
|
+
}
|
|
55
58
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
59
|
+
* 非按钮触发器的 Enter / Space。先交给已有 keydown(例如 zag),
|
|
60
|
+
* 未被取消时 preventDefault,并点击 currentTarget,让点击路径统一打开。
|
|
58
61
|
*/
|
|
59
|
-
export declare function
|
|
62
|
+
export declare function handleDialogTriggerKey<E extends DialogTriggerKeyEvent>(event: E, previous?: (event: E) => void): void;
|
|
63
|
+
export interface DialogActionTask {
|
|
64
|
+
/** 动作当前不可用(含确认中的忙碌)。 */
|
|
65
|
+
disabled: boolean;
|
|
66
|
+
/** 先通知调用方。返回 Promise 时,关闭推迟到它完成。 */
|
|
67
|
+
invoke?: () => unknown;
|
|
68
|
+
close: () => void;
|
|
69
|
+
}
|
|
70
|
+
/** 禁用的动作不通知、不关闭。启用的动作先通知,再关闭;Promise 要等它完成。 */
|
|
71
|
+
export declare function runDialogAction(task: DialogActionTask): void;
|
|
72
|
+
/** 把触发器上的可序列化属性交给真实 button。函数和 type 留在适配层。 */
|
|
73
|
+
export declare function dialogSlottedTriggerAttrs(source: object): Array<[string, string]>;
|
|
74
|
+
/** 双栈共享的 Dialog 操作区状态归一化。 */
|
|
75
|
+
export declare function resolveDialogActionState(props?: QwDialogActionProps): QwDialogActionState;
|
|
76
|
+
export { createPortalPlan, readPortalHostLocale, resolvePortalCopy } from "../portal.js";
|
|
77
|
+
export type { PortalCopy, PortalCopyAttribute, PortalKind, PortalPart, PortalPlan, PortalResolvedCopy, PortalSnapshot, PortalTarget, PortalVariableMode, } from "../portal.js";
|
package/dist/dialog/index.js
CHANGED
|
@@ -1,35 +1,89 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as modalOriginAttrs, o as modalRequestService, r as modalDialogMachine, t as cancelModalClose } from "../modal-dialog-machine-CF9_z3Dm.js";
|
|
2
|
+
import { n as readPortalHostLocale, r as resolvePortalCopy, t as createPortalPlan } from "../portal-BHCNTWhg.js";
|
|
3
|
+
import { connect as connect$1 } from "@zag-js/dialog";
|
|
2
4
|
//#region src/dialog/dialog.ts
|
|
3
5
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
+
* 共用 Core 的 Zag dialog 薄包装;connect 只追加纯声明属性 getter。
|
|
7
|
+
* 各框架适配层只实例化 service 并摊 prop-getter。
|
|
6
8
|
*/
|
|
9
|
+
function connect(service, normalize) {
|
|
10
|
+
const api = connect$1(modalRequestService(service), normalize);
|
|
11
|
+
return {
|
|
12
|
+
...api,
|
|
13
|
+
setOpen(open) {
|
|
14
|
+
if (open) cancelModalClose(service);
|
|
15
|
+
api.setOpen(open);
|
|
16
|
+
},
|
|
17
|
+
getOriginProps: () => normalize.element(modalOriginAttrs(service.scope.id, "dialog"))
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/** 把 H5 Dialog 公开 props 转成 zag dialog machine context。 */
|
|
7
21
|
function createDialogProps(props = {}) {
|
|
8
22
|
const ctx = {
|
|
9
23
|
id: props.id,
|
|
10
24
|
open: props.open,
|
|
11
|
-
defaultOpen: props.defaultOpen,
|
|
12
|
-
role:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
25
|
+
defaultOpen: typeof props.open === "boolean" ? false : props.defaultOpen,
|
|
26
|
+
role: "dialog",
|
|
27
|
+
modal: true,
|
|
28
|
+
closeOnEscape: true,
|
|
29
|
+
closeOnInteractOutside: props.closeOnMaskClick !== false,
|
|
30
|
+
preventScroll: props.disableBodyScroll !== false
|
|
16
31
|
};
|
|
17
|
-
if (props.modal !== void 0) ctx.modal = props.modal;
|
|
18
32
|
if (props.onOpenChange) {
|
|
19
33
|
const cb = props.onOpenChange;
|
|
20
|
-
ctx.onOpenChange = (d) => cb(
|
|
34
|
+
ctx.onOpenChange = (d) => cb(d.open);
|
|
21
35
|
}
|
|
22
|
-
if (typeof props.initialFocus === "object") {
|
|
23
|
-
const sel = props.initialFocus.selector;
|
|
24
|
-
ctx.initialFocusEl = () => document.querySelector(sel);
|
|
25
|
-
}
|
|
26
|
-
if (typeof props.returnFocus === "object") {
|
|
27
|
-
const sel = props.returnFocus.selector;
|
|
28
|
-
ctx.finalFocusEl = () => document.querySelector(sel);
|
|
29
|
-
} else if (props.returnFocus === "none") ctx.restoreFocus = false;
|
|
30
36
|
return ctx;
|
|
31
37
|
}
|
|
38
|
+
function clickTarget(target) {
|
|
39
|
+
if (target && "click" in target && typeof target.click === "function") target.click();
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 非按钮触发器的 Enter / Space。先交给已有 keydown(例如 zag),
|
|
43
|
+
* 未被取消时 preventDefault,并点击 currentTarget,让点击路径统一打开。
|
|
44
|
+
*/
|
|
45
|
+
function handleDialogTriggerKey(event, previous) {
|
|
46
|
+
previous?.(event);
|
|
47
|
+
if (event.defaultPrevented) return;
|
|
48
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
49
|
+
event.preventDefault();
|
|
50
|
+
clickTarget(event.currentTarget);
|
|
51
|
+
}
|
|
52
|
+
function isThenable(value) {
|
|
53
|
+
return !!value && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
|
|
54
|
+
}
|
|
55
|
+
/** 禁用的动作不通知、不关闭。启用的动作先通知,再关闭;Promise 要等它完成。 */
|
|
56
|
+
function runDialogAction(task) {
|
|
57
|
+
if (task.disabled) return;
|
|
58
|
+
const result = task.invoke?.();
|
|
59
|
+
if (isThenable(result)) {
|
|
60
|
+
result.then(() => task.close());
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
task.close();
|
|
64
|
+
}
|
|
65
|
+
/** 把触发器上的可序列化属性交给真实 button。函数和 type 留在适配层。 */
|
|
66
|
+
function dialogSlottedTriggerAttrs(source) {
|
|
67
|
+
const assigned = [];
|
|
68
|
+
for (const [key, value] of Object.entries(source)) {
|
|
69
|
+
if (value == null || typeof value === "function") continue;
|
|
70
|
+
if (key === "type" || key === "style" || key === "tabIndex" || key === "tabindex") continue;
|
|
71
|
+
if (typeof value === "boolean") assigned.push([key, value ? "true" : "false"]);
|
|
72
|
+
else if (typeof value === "string" || typeof value === "number") assigned.push([key, String(value)]);
|
|
73
|
+
}
|
|
74
|
+
return assigned;
|
|
75
|
+
}
|
|
76
|
+
/** 双栈共享的 Dialog 操作区状态归一化。 */
|
|
77
|
+
function resolveDialogActionState(props = {}) {
|
|
78
|
+
const confirmLoading = props.confirmLoading ?? false;
|
|
79
|
+
return {
|
|
80
|
+
showCancel: props.showCancel !== false,
|
|
81
|
+
cancelDisabled: props.cancelDisabled ?? false,
|
|
82
|
+
confirmDisabled: (props.confirmDisabled ?? false) || confirmLoading,
|
|
83
|
+
confirmLoading
|
|
84
|
+
};
|
|
85
|
+
}
|
|
32
86
|
//#endregion
|
|
33
|
-
export { connect, createDialogProps, dialogMachine };
|
|
87
|
+
export { connect, createDialogProps, createPortalPlan, modalDialogMachine as dialogMachine, dialogSlottedTriggerAttrs, handleDialogTriggerKey, readPortalHostLocale, resolveDialogActionState, resolvePortalCopy, runDialogAction };
|
|
34
88
|
|
|
35
89
|
//# sourceMappingURL=index.js.map
|
package/dist/dialog/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/dialog/dialog.ts"],"sourcesContent":["import type
|
|
1
|
+
{"version":3,"file":"index.js","names":["zagConnect"],"sources":["../../src/dialog/dialog.ts"],"sourcesContent":["import { connect as zagConnect, type Api, type OpenChangeDetails, type Props as ZagDialogProps, type Service } from \"@zag-js/dialog\";\nimport type { NormalizeProps, PropTypes } from \"@zag-js/types\";\nimport { modalOriginAttrs, modalRequestService, cancelModalClose } from \"../modal-dialog-machine.js\";\n\n/**\n * QwDialogProps — H5 系统 Dialog 的跨框架行为输入。\n *\n * 只暴露业务能理解的开合、遮罩点击、body 滚动控制;modal / role / focus\n * 策略是组件内部无障碍政策,不作为业务 API。\n */\nexport interface QwDialogProps {\n /** 唯一 id 前缀;不传时由适配层提供 SSR/CSR 稳定 id。 */\n id?: string;\n /** 受控开关。 */\n open?: boolean;\n /** 非受控初值。 */\n defaultOpen?: boolean;\n /** 点击遮罩关闭,默认 true。 */\n closeOnMaskClick?: boolean;\n /** Dialog 打开时禁止 body 滚动,默认 true。 */\n disableBodyScroll?: boolean;\n /** 状态变化回调。 */\n onOpenChange?: (open: boolean) => void;\n}\n\nexport interface QwDialogActionProps {\n /** 是否展示取消按钮,默认 true。 */\n showCancel?: boolean;\n /** 取消按钮禁用。 */\n cancelDisabled?: boolean;\n /** 确认按钮禁用。 */\n confirmDisabled?: boolean;\n /** 确认按钮忙碌;忙碌时视为禁用。 */\n confirmLoading?: boolean;\n}\n\nexport interface QwDialogActionState {\n showCancel: boolean;\n cancelDisabled: boolean;\n confirmDisabled: boolean;\n confirmLoading: boolean;\n}\n\n/**\n * 共用 Core 的 Zag dialog 薄包装;connect 只追加纯声明属性 getter。\n * 各框架适配层只实例化 service 并摊 prop-getter。\n */\nexport function connect<T extends PropTypes>(service: Service, normalize: NormalizeProps<T>): Api<T> & { getOriginProps(): T[\"element\"] } {\n const api = zagConnect(modalRequestService(service), normalize);\n return { ...api, setOpen(open) { if (open) cancelModalClose(service); api.setOpen(open); }, getOriginProps: () => normalize.element(modalOriginAttrs(service.scope.id, \"dialog\")) };\n}\nexport { modalDialogMachine as dialogMachine } from \"../modal-dialog-machine.js\";\n\n/** rebrand zag 的 DialogApi 类型对外。 */\nexport type { Api as QwDialogApi } from \"@zag-js/dialog\";\n\n/** 把 H5 Dialog 公开 props 转成 zag dialog machine context。 */\nexport function createDialogProps(props: QwDialogProps = {}): Partial<ZagDialogProps> {\n const ctx: Partial<ZagDialogProps> = {\n id: props.id,\n open: props.open,\n // Zag seeds initialState with open || defaultOpen; a controlled boolean owns the initial state.\n defaultOpen: typeof props.open === \"boolean\" ? false : props.defaultOpen,\n role: \"dialog\",\n modal: true,\n closeOnEscape: true,\n closeOnInteractOutside: props.closeOnMaskClick !== false,\n preventScroll: props.disableBodyScroll !== false,\n };\n\n if (props.onOpenChange) {\n const cb = props.onOpenChange;\n ctx.onOpenChange = (d: OpenChangeDetails) => cb(d.open);\n }\n\n return ctx;\n}\n\n/** 键盘激活时适配层传入的最小事件。Core 不查询 document。 */\nexport interface DialogTriggerKeyEvent {\n readonly key: string;\n readonly defaultPrevented: boolean;\n preventDefault(): void;\n readonly currentTarget: object | null;\n}\n\nfunction clickTarget(target: object | null): void {\n if (target && \"click\" in target && typeof target.click === \"function\") target.click();\n}\n\n/**\n * 非按钮触发器的 Enter / Space。先交给已有 keydown(例如 zag),\n * 未被取消时 preventDefault,并点击 currentTarget,让点击路径统一打开。\n */\nexport function handleDialogTriggerKey<E extends DialogTriggerKeyEvent>(\n event: E,\n previous?: (event: E) => void,\n): void {\n previous?.(event);\n if (event.defaultPrevented) return;\n if (event.key !== \"Enter\" && event.key !== \" \") return;\n event.preventDefault();\n clickTarget(event.currentTarget);\n}\n\nexport interface DialogActionTask {\n /** 动作当前不可用(含确认中的忙碌)。 */\n disabled: boolean;\n /** 先通知调用方。返回 Promise 时,关闭推迟到它完成。 */\n invoke?: () => unknown;\n close: () => void;\n}\n\nfunction isThenable(value: unknown): value is PromiseLike<unknown> {\n return !!value && (typeof value === \"object\" || typeof value === \"function\") && typeof (value as PromiseLike<unknown>).then === \"function\";\n}\n\n/** 禁用的动作不通知、不关闭。启用的动作先通知,再关闭;Promise 要等它完成。 */\nexport function runDialogAction(task: DialogActionTask): void {\n if (task.disabled) return;\n const result = task.invoke?.();\n if (isThenable(result)) {\n void result.then(() => task.close());\n return;\n }\n task.close();\n}\n\n/** 把触发器上的可序列化属性交给真实 button。函数和 type 留在适配层。 */\nexport function dialogSlottedTriggerAttrs(source: object): Array<[string, string]> {\n const assigned: Array<[string, string]> = [];\n for (const [key, value] of Object.entries(source)) {\n if (value == null || typeof value === \"function\") continue;\n if (key === \"type\" || key === \"style\" || key === \"tabIndex\" || key === \"tabindex\") continue;\n if (typeof value === \"boolean\") assigned.push([key, value ? \"true\" : \"false\"]);\n else if (typeof value === \"string\" || typeof value === \"number\") assigned.push([key, String(value)]);\n }\n return assigned;\n}\n\n/** 双栈共享的 Dialog 操作区状态归一化。 */\nexport function resolveDialogActionState(\n props: QwDialogActionProps = {},\n): QwDialogActionState {\n const confirmLoading = props.confirmLoading ?? false;\n return {\n showCancel: props.showCancel !== false,\n cancelDisabled: props.cancelDisabled ?? false,\n confirmDisabled: (props.confirmDisabled ?? false) || confirmLoading,\n confirmLoading,\n };\n}\n\nexport { createPortalPlan, readPortalHostLocale, resolvePortalCopy } from \"../portal.js\";\nexport type {\n PortalCopy,\n PortalCopyAttribute,\n PortalKind,\n PortalPart,\n PortalPlan,\n PortalResolvedCopy,\n PortalSnapshot,\n PortalTarget,\n PortalVariableMode,\n} from \"../portal.js\";\n"],"mappings":";;;;;;;;AA+CA,SAAgB,QAA6B,SAAkB,WAA2E;CACxI,MAAM,MAAMA,UAAW,oBAAoB,OAAO,GAAG,SAAS;CAC9D,OAAO;EAAE,GAAG;EAAK,QAAQ,MAAM;GAAE,IAAI,MAAM,iBAAiB,OAAO;GAAG,IAAI,QAAQ,IAAI;EAAG;EAAG,sBAAsB,UAAU,QAAQ,iBAAiB,QAAQ,MAAM,IAAI,QAAQ,CAAC;CAAE;AACpL;;AAOA,SAAgB,kBAAkB,QAAuB,CAAC,GAA4B;CACpF,MAAM,MAA+B;EACnC,IAAI,MAAM;EACV,MAAM,MAAM;EAEZ,aAAa,OAAO,MAAM,SAAS,YAAY,QAAQ,MAAM;EAC7D,MAAM;EACN,OAAO;EACP,eAAe;EACf,wBAAwB,MAAM,qBAAqB;EACnD,eAAe,MAAM,sBAAsB;CAC7C;CAEA,IAAI,MAAM,cAAc;EACtB,MAAM,KAAK,MAAM;EACjB,IAAI,gBAAgB,MAAyB,GAAG,EAAE,IAAI;CACxD;CAEA,OAAO;AACT;AAUA,SAAS,YAAY,QAA6B;CAChD,IAAI,UAAU,WAAW,UAAU,OAAO,OAAO,UAAU,YAAY,OAAO,MAAM;AACtF;;;;;AAMA,SAAgB,uBACd,OACA,UACM;CACN,WAAW,KAAK;CAChB,IAAI,MAAM,kBAAkB;CAC5B,IAAI,MAAM,QAAQ,WAAW,MAAM,QAAQ,KAAK;CAChD,MAAM,eAAe;CACrB,YAAY,MAAM,aAAa;AACjC;AAUA,SAAS,WAAW,OAA+C;CACjE,OAAO,CAAC,CAAC,UAAU,OAAO,UAAU,YAAY,OAAO,UAAU,eAAe,OAAQ,MAA+B,SAAS;AAClI;;AAGA,SAAgB,gBAAgB,MAA8B;CAC5D,IAAI,KAAK,UAAU;CACnB,MAAM,SAAS,KAAK,SAAS;CAC7B,IAAI,WAAW,MAAM,GAAG;EACtB,OAAY,WAAW,KAAK,MAAM,CAAC;EACnC;CACF;CACA,KAAK,MAAM;AACb;;AAGA,SAAgB,0BAA0B,QAAyC;CACjF,MAAM,WAAoC,CAAC;CAC3C,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,GAAG;EACjD,IAAI,SAAS,QAAQ,OAAO,UAAU,YAAY;EAClD,IAAI,QAAQ,UAAU,QAAQ,WAAW,QAAQ,cAAc,QAAQ,YAAY;EACnF,IAAI,OAAO,UAAU,WAAW,SAAS,KAAK,CAAC,KAAK,QAAQ,SAAS,OAAO,CAAC;OACxE,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU,SAAS,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC,CAAC;CACrG;CACA,OAAO;AACT;;AAGA,SAAgB,yBACd,QAA6B,CAAC,GACT;CACrB,MAAM,iBAAiB,MAAM,kBAAkB;CAC/C,OAAO;EACL,YAAY,MAAM,eAAe;EACjC,gBAAgB,MAAM,kBAAkB;EACxC,kBAAkB,MAAM,mBAAmB,UAAU;EACrD;CACF;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Divider 契约 — 原型 A(无状态),
|
|
2
|
+
* Divider 契约 — 原型 A(无状态),Core 无 machine,承载三栈共享的类型与渲染契约。
|
|
3
3
|
* 渲染契约:`role="separator"`,`data-scope="divider"`,`data-part="root"`;
|
|
4
4
|
* `data-orientation` / `data-weight` 摊平枚举,`vertical` 额外输出 `aria-orientation`。
|
|
5
5
|
*
|
|
@@ -14,10 +14,26 @@ export declare const DIVIDER_PARTS: readonly ["root"];
|
|
|
14
14
|
export type DividerOrientation = (typeof DIVIDER_ORIENTATIONS)[number];
|
|
15
15
|
export type DividerWeight = (typeof DIVIDER_WEIGHTS)[number];
|
|
16
16
|
export type DividerPart = (typeof DIVIDER_PARTS)[number];
|
|
17
|
-
/** QwDividerProps —
|
|
17
|
+
/** QwDividerProps — 三栈共享的行为与渲染契约(全字段可选)。 */
|
|
18
18
|
export interface QwDividerProps {
|
|
19
19
|
/** 方向,默认 horizontal。 */
|
|
20
20
|
orientation?: DividerOrientation;
|
|
21
21
|
/** 粗细,默认 thin(细,0.5px)。 */
|
|
22
22
|
weight?: DividerWeight;
|
|
23
23
|
}
|
|
24
|
+
export interface ResolvedDividerState {
|
|
25
|
+
orientation: DividerOrientation;
|
|
26
|
+
weight: DividerWeight;
|
|
27
|
+
}
|
|
28
|
+
/** Resolve the passive display contract once for every adapter. */
|
|
29
|
+
export declare function resolveDividerState(props?: QwDividerProps): ResolvedDividerState;
|
|
30
|
+
export interface DividerRootProps {
|
|
31
|
+
role: "separator";
|
|
32
|
+
"data-scope": "divider";
|
|
33
|
+
"data-part": "root";
|
|
34
|
+
"data-orientation": DividerOrientation;
|
|
35
|
+
"data-weight": DividerWeight;
|
|
36
|
+
"aria-orientation"?: "vertical";
|
|
37
|
+
}
|
|
38
|
+
/** Spread after caller attributes: Core owns these semantics. */
|
|
39
|
+
export declare function getDividerRootProps(state: ResolvedDividerState): DividerRootProps;
|
package/dist/divider/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/divider/divider.ts
|
|
2
2
|
/**
|
|
3
|
-
* Divider 契约 — 原型 A(无状态),
|
|
3
|
+
* Divider 契约 — 原型 A(无状态),Core 无 machine,承载三栈共享的类型与渲染契约。
|
|
4
4
|
* 渲染契约:`role="separator"`,`data-scope="divider"`,`data-part="root"`;
|
|
5
5
|
* `data-orientation` / `data-weight` 摊平枚举,`vertical` 额外输出 `aria-orientation`。
|
|
6
6
|
*
|
|
@@ -12,7 +12,25 @@ const DIVIDER_ORIENTATIONS = ["horizontal", "vertical"];
|
|
|
12
12
|
const DIVIDER_WEIGHTS = ["thin", "thick"];
|
|
13
13
|
/** Divider 各渲染部位全集(data-part 取值)。 */
|
|
14
14
|
const DIVIDER_PARTS = ["root"];
|
|
15
|
+
/** Resolve the passive display contract once for every adapter. */
|
|
16
|
+
function resolveDividerState(props = {}) {
|
|
17
|
+
return {
|
|
18
|
+
orientation: DIVIDER_ORIENTATIONS.includes(props.orientation) ? props.orientation : "horizontal",
|
|
19
|
+
weight: DIVIDER_WEIGHTS.includes(props.weight) ? props.weight : "thin"
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** Spread after caller attributes: Core owns these semantics. */
|
|
23
|
+
function getDividerRootProps(state) {
|
|
24
|
+
return {
|
|
25
|
+
role: "separator",
|
|
26
|
+
"data-scope": "divider",
|
|
27
|
+
"data-part": "root",
|
|
28
|
+
"data-orientation": state.orientation,
|
|
29
|
+
"data-weight": state.weight,
|
|
30
|
+
"aria-orientation": state.orientation === "vertical" ? "vertical" : void 0
|
|
31
|
+
};
|
|
32
|
+
}
|
|
15
33
|
//#endregion
|
|
16
|
-
export { DIVIDER_ORIENTATIONS, DIVIDER_PARTS, DIVIDER_WEIGHTS };
|
|
34
|
+
export { DIVIDER_ORIENTATIONS, DIVIDER_PARTS, DIVIDER_WEIGHTS, getDividerRootProps, resolveDividerState };
|
|
17
35
|
|
|
18
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/divider/divider.ts"],"sourcesContent":["/**\n * Divider 契约 — 原型 A(无状态),
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/divider/divider.ts"],"sourcesContent":["/**\n * Divider 契约 — 原型 A(无状态),Core 无 machine,承载三栈共享的类型与渲染契约。\n * 渲染契约:`role=\"separator\"`,`data-scope=\"divider\"`,`data-part=\"root\"`;\n * `data-orientation` / `data-weight` 摊平枚举,`vertical` 额外输出 `aria-orientation`。\n *\n * 方向 / 粗细词表以运行时常量数组为唯一事实源(类型从常量推导),__test__ 直接锁死。\n */\n\n/** 方向全集:horizontal 水平(默认)/ vertical 垂直。 */\nexport const DIVIDER_ORIENTATIONS = [\"horizontal\", \"vertical\"] as const;\n\n/** 粗细全集:thin 细 0.5px(默认)/ thick 粗 1px。 */\nexport const DIVIDER_WEIGHTS = [\"thin\", \"thick\"] as const;\n\n/** Divider 各渲染部位全集(data-part 取值)。 */\nexport const DIVIDER_PARTS = [\"root\"] as const;\n\nexport type DividerOrientation = (typeof DIVIDER_ORIENTATIONS)[number];\nexport type DividerWeight = (typeof DIVIDER_WEIGHTS)[number];\nexport type DividerPart = (typeof DIVIDER_PARTS)[number];\n\n/** QwDividerProps — 三栈共享的行为与渲染契约(全字段可选)。 */\nexport interface QwDividerProps {\n /** 方向,默认 horizontal。 */\n orientation?: DividerOrientation;\n /** 粗细,默认 thin(细,0.5px)。 */\n weight?: DividerWeight;\n}\n\n\nexport interface ResolvedDividerState { orientation: DividerOrientation; weight: DividerWeight }\n/** Resolve the passive display contract once for every adapter. */\nexport function resolveDividerState(props: QwDividerProps = {}): ResolvedDividerState {\n return { orientation: DIVIDER_ORIENTATIONS.includes(props.orientation!) ? props.orientation! : \"horizontal\", weight: DIVIDER_WEIGHTS.includes(props.weight!) ? props.weight! : \"thin\" };\n}\nexport interface DividerRootProps {\n role: \"separator\"; \"data-scope\": \"divider\"; \"data-part\": \"root\";\n \"data-orientation\": DividerOrientation; \"data-weight\": DividerWeight; \"aria-orientation\"?: \"vertical\";\n}\n/** Spread after caller attributes: Core owns these semantics. */\nexport function getDividerRootProps(state: ResolvedDividerState): DividerRootProps {\n return { role: \"separator\", \"data-scope\": \"divider\", \"data-part\": \"root\", \"data-orientation\": state.orientation, \"data-weight\": state.weight, \"aria-orientation\": state.orientation === \"vertical\" ? \"vertical\" : undefined };\n}\n"],"mappings":";;;;;;;;;AASA,MAAa,uBAAuB,CAAC,cAAc,UAAU;;AAG7D,MAAa,kBAAkB,CAAC,QAAQ,OAAO;;AAG/C,MAAa,gBAAgB,CAAC,MAAM;;AAiBpC,SAAgB,oBAAoB,QAAwB,CAAC,GAAyB;CACpF,OAAO;EAAE,aAAa,qBAAqB,SAAS,MAAM,WAAY,IAAI,MAAM,cAAe;EAAc,QAAQ,gBAAgB,SAAS,MAAM,MAAO,IAAI,MAAM,SAAU;CAAO;AACxL;;AAMA,SAAgB,oBAAoB,OAA+C;CACjF,OAAO;EAAE,MAAM;EAAa,cAAc;EAAW,aAAa;EAAQ,oBAAoB,MAAM;EAAa,eAAe,MAAM;EAAQ,oBAAoB,MAAM,gBAAgB,aAAa,aAAa,KAAA;CAAU;AAC9N"}
|