@qw-ui/core 0.3.0-next.40 → 0.3.0-next.42
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 +9 -0
- package/dist/badge/index.js +14 -1
- package/dist/badge/index.js.map +1 -1
- 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 +32 -3
- package/dist/dialog/index.js +58 -3
- 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 +107 -14
- package/dist/index.js +148 -14
- 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/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 +3 -1
- package/dist/search-bar/index.js.map +1 -1
- package/dist/search-bar/search-bar.d.ts +4 -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/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.js +62 -3
- package/dist/stepper/index.js.map +1 -1
- package/dist/stepper/stepper.d.ts +44 -4
- 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.js +135 -10
- package/dist/switch/index.js.map +1 -1
- package/dist/switch/switch.d.ts +93 -6
- package/dist/tabbar/index.js +46 -1
- package/dist/tabbar/index.js.map +1 -1
- package/dist/tabbar/tabbar.d.ts +50 -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 +165 -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 +6 -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 +399 -50
- package/dist/empty/index.js.map +0 -1
- package/dist/icon/index.js.map +0 -1
- package/dist/textarea/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,59 +1,43 @@
|
|
|
1
1
|
# @qw-ui/core
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
**层级 L2 · 行为唯一事实源**。所有组件的交互逻辑、状态机、ARIA 语义、键盘与 focus 行为都只写在这里;React/Vue 适配层零业务逻辑。纯 TypeScript,无样式、SSR 安全。
|
|
3
|
+
跨框架无样式行为层。Framework-neutral headless contracts for qw-ui.
|
|
6
4
|
|
|
7
5
|
## 安装
|
|
8
6
|
|
|
7
|
+
当前开发版本使用 `next`:
|
|
8
|
+
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
npm install @qw-ui/core@next
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
包发布于 [公共 npm](https://www.npmjs.com/package/@qw-ui/core)。如环境配置了其他镜像,可在安装命令后追加 `--registry=https://registry.npmjs.org/`。
|
|
14
14
|
|
|
15
15
|
## 最小示例
|
|
16
16
|
|
|
17
|
-
按子路径导入某组件的 machine / 契约类型(每个组件一个 export 入口):
|
|
18
|
-
|
|
19
17
|
```ts
|
|
20
|
-
import
|
|
21
|
-
import type { QwDialogProps, QwDialogApi } from "@qw-ui/core/dialog";
|
|
22
|
-
import { resolveIconName } from "@qw-ui/core/icon";
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
子路径与组件 slug 一一对应:`dialog / tabs / toast / button / empty / divider / loading / skeleton / top-bar / icon / search-bar / avatar / image / textarea / tag / input`。
|
|
18
|
+
import { resolveButtonState, BUTTON_VARIANTS } from '@qw-ui/core/button';
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
index.ts + __test__/ + docs/{overview.md, accessibility.md, demos.ts, visual.ts}
|
|
20
|
+
const state = resolveButtonState({ loading: true });
|
|
21
|
+
console.log(state.effectiveDisabled); // true
|
|
22
|
+
console.log(BUTTON_VARIANTS); // solid / soft / outline / ghost / link
|
|
33
23
|
```
|
|
34
24
|
|
|
35
|
-
|
|
25
|
+
## 使用说明
|
|
36
26
|
|
|
37
|
-
|
|
27
|
+
适合实现自定义框架适配层或直接使用共享行为契约。此包不提供组件 CSS,也不直接渲染 UI。常规应用优先使用 React、Vue 或 WC 包;状态机 API 以对应组件子路径的类型声明为准。
|
|
38
28
|
|
|
39
|
-
|
|
40
|
-
|---|---|
|
|
41
|
-
| [@qw-ui/react](../react/README.md) | 基于本包 machine 的 React 适配 |
|
|
42
|
-
| [@qw-ui/vue](../vue/README.md) | 基于本包 machine 的 Vue 适配 |
|
|
43
|
-
| [@qw-ui/tokens](../tokens/README.md) | 组件视觉所依赖的 T3 token(本包自身零样式) |
|
|
44
|
-
| [@qw-ui/icons](../icons/README.md) | `icon` 子路径的图标名解析依赖 |
|
|
29
|
+
## 兼容性
|
|
45
30
|
|
|
46
|
-
|
|
31
|
+
ESM / TypeScript,支持无 DOM 的服务端导入。交互组件的运行环境基线为 Chrome 123 / iOS Safari 16.4。
|
|
47
32
|
|
|
48
|
-
|
|
49
|
-
|---|---|---|
|
|
50
|
-
| `latest`(稳定) | `pnpm add @qw-ui/core` | `main` 通道,Release PR review 后发布 |
|
|
51
|
-
| `next`(预发布) | `pnpm add @qw-ui/core@next` | `release/next` 通道,高频自增 `x.y.z-next.N` |
|
|
33
|
+
## 版本通道
|
|
52
34
|
|
|
53
|
-
|
|
35
|
+
- `next`:main 更新并通过检查后自动发布,用于试用当前能力。
|
|
36
|
+
- `latest`:负责人手动发布的正式版本。正式版可用后,使用 `npm install @qw-ui/core@latest`;正式版支持范围以该版本 README 为准。
|
|
37
|
+
- 生产项目建议锁定明确版本。配套使用的 `@qw-ui/*` 包应选择同批版本;内部运行时依赖由包管理器安装。
|
|
54
38
|
|
|
55
|
-
##
|
|
39
|
+
## 文档与许可证
|
|
56
40
|
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
41
|
+
- [组件文档与接入指南](https://qw-ui.qianwen.com/)
|
|
42
|
+
- [npm 版本列表](https://www.npmjs.com/package/@qw-ui/core?activeTab=versions)
|
|
43
|
+
- MIT,详见包内 `LICENSE`。
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { machine, Props as ZagDialogProps, Service } from "@zag-js/dialog";
|
|
2
|
+
import type { ModalRenderRuntime } from "../modal-render-runtime.js";
|
|
3
|
+
import { connectPopup, type QwPopupProps } from "../popup/popup.js";
|
|
4
|
+
/**
|
|
5
|
+
* ActionSheet 的 Core machine。物理层就是 Popup 的同一 machine(modalDialogMachine 惰性 scope lookup、
|
|
6
|
+
* 单层模态与 Zag effects 全部继承);动作数据经 machine props 传入,处理器只读最新 service.prop。
|
|
7
|
+
*/
|
|
8
|
+
export declare const actionSheetMachine: typeof machine;
|
|
9
|
+
/** 单个纵向文字动作。value 是精确通知值,label/description 不作身份。 */
|
|
10
|
+
export interface QwActionSheetAction {
|
|
11
|
+
value: string;
|
|
12
|
+
label: string;
|
|
13
|
+
/** 可见说明,trim 后为空视为缺省。 */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** 危险动作:可见危险说明 + data-danger;没有第二次确认。 */
|
|
16
|
+
danger?: boolean;
|
|
17
|
+
/** 危险说明,优先于 description;都缺省时为「危险操作」。 */
|
|
18
|
+
dangerDescription?: string;
|
|
19
|
+
/** 原生 disabled:不可聚焦、不通知、不关闭。 */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** 为 true 时通知动作但不请求关闭。默认 false。 */
|
|
22
|
+
keepOpen?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** ActionSheet 输入。固定底部,不接受 placement。 */
|
|
25
|
+
export interface QwActionSheetProps extends Omit<QwPopupProps, "placement"> {
|
|
26
|
+
/** 纵向动作,缺省 []。 */
|
|
27
|
+
actions?: readonly QwActionSheetAction[];
|
|
28
|
+
/** 是否显示取消按钮,默认 true。 */
|
|
29
|
+
showCancel?: boolean;
|
|
30
|
+
/** 取消按钮文字,默认「取消」。 */
|
|
31
|
+
cancelText?: string;
|
|
32
|
+
/** 每次启用动作被激活时通知一次。 */
|
|
33
|
+
onAction?: (value: string) => void;
|
|
34
|
+
}
|
|
35
|
+
/** Core 派生的动作数据。适配层只渲染,不判断 disabled/duplicate/keepOpen。 */
|
|
36
|
+
export interface QwResolvedActionSheetAction {
|
|
37
|
+
readonly source: QwActionSheetAction;
|
|
38
|
+
readonly sourceIndex: number;
|
|
39
|
+
readonly value: string;
|
|
40
|
+
readonly label: string;
|
|
41
|
+
readonly description?: string;
|
|
42
|
+
readonly dangerDescription?: string;
|
|
43
|
+
readonly danger: boolean;
|
|
44
|
+
readonly duplicate: boolean;
|
|
45
|
+
readonly disabled: boolean;
|
|
46
|
+
readonly keepOpen: boolean;
|
|
47
|
+
/** 去重后的可见说明条目(普通说明、危险说明)。 */
|
|
48
|
+
readonly accessibleDescription: readonly string[];
|
|
49
|
+
/** 渲染用说明文本;无说明时 undefined。 */
|
|
50
|
+
readonly descriptionText?: string;
|
|
51
|
+
}
|
|
52
|
+
/** createActionSheetProps 的输出:Zag dialog context + 动作数据(只供 Core 处理器读取)。 */
|
|
53
|
+
export type QwActionSheetMachineProps = Partial<ZagDialogProps> & {
|
|
54
|
+
actions?: readonly QwActionSheetAction[];
|
|
55
|
+
onAction?: (value: string) => void;
|
|
56
|
+
};
|
|
57
|
+
type ActionSheetNormalize = Parameters<typeof connectPopup>[1];
|
|
58
|
+
type NormalizedProps = ReturnType<ActionSheetNormalize["element"]>;
|
|
59
|
+
export type QwActionSheetApi = ReturnType<typeof connectPopup> & {
|
|
60
|
+
readonly actions: readonly QwResolvedActionSheetAction[];
|
|
61
|
+
readonly showCancel: boolean;
|
|
62
|
+
readonly cancelText: string;
|
|
63
|
+
getListProps(): NormalizedProps;
|
|
64
|
+
getItemProps(details: {
|
|
65
|
+
index: number;
|
|
66
|
+
}): NormalizedProps;
|
|
67
|
+
getActionProps(details: {
|
|
68
|
+
index: number;
|
|
69
|
+
}): NormalizedProps;
|
|
70
|
+
getActionLabelProps(details: {
|
|
71
|
+
index: number;
|
|
72
|
+
}): NormalizedProps;
|
|
73
|
+
getActionDescriptionProps(details: {
|
|
74
|
+
index: number;
|
|
75
|
+
}): NormalizedProps;
|
|
76
|
+
getCancelProps(): NormalizedProps;
|
|
77
|
+
};
|
|
78
|
+
/** 可访问名称:title → ariaLabel → 「动作面板」。空白视为缺省。 */
|
|
79
|
+
export declare function getActionSheetAccessibleName(props: Pick<QwActionSheetProps, "title" | "ariaLabel">): string;
|
|
80
|
+
/**
|
|
81
|
+
* 归一化动作:按输入顺序保留全部可见项;重复 value 只第一项可能启用,第一项 disabled 不晋升后项。
|
|
82
|
+
* 危险说明 dangerDescription → description → 「危险操作」,与普通说明相同则只出现一次。
|
|
83
|
+
*/
|
|
84
|
+
export declare function resolveActionSheetActions(actions?: readonly QwActionSheetAction[]): readonly QwResolvedActionSheetAction[];
|
|
85
|
+
export type QwActionSheetActivation = {
|
|
86
|
+
readonly kind: "blocked";
|
|
87
|
+
} | {
|
|
88
|
+
readonly kind: "action";
|
|
89
|
+
readonly value: string;
|
|
90
|
+
readonly requestClose: boolean;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* 以最新列表复核一次渲染时的动作:源对象 identity + sourceIndex + value 都一致且仍启用才放行。
|
|
94
|
+
* 已删除、被同值新对象替换、被禁用或变成重复后项的旧处理器一律 blocked。
|
|
95
|
+
*/
|
|
96
|
+
export declare function resolveActionSheetActivation(latestActions: readonly QwActionSheetAction[] | undefined, rendered: Pick<QwResolvedActionSheetAction, "source" | "sourceIndex" | "value">): QwActionSheetActivation;
|
|
97
|
+
/** Popup 的 data 属性(placement 固定 bottom)。 */
|
|
98
|
+
export declare function getActionSheetDataAttrs(props: Pick<QwActionSheetProps, "safeArea">): Record<string, string | undefined>;
|
|
99
|
+
/**
|
|
100
|
+
* 公开 props → 同一 Popup machine 的 context。机械委托 createPopupProps(props, runtime):
|
|
101
|
+
* 受控优先、初态许可/拒绝仍由 Popup Core 决定;actions/onAction 只作为最新数据随 service.prop 传递。
|
|
102
|
+
*/
|
|
103
|
+
export declare function createActionSheetProps(props?: QwActionSheetProps, runtime?: ModalRenderRuntime): QwActionSheetMachineProps;
|
|
104
|
+
/**
|
|
105
|
+
* 包装 connectPopup:继承开合/getters 与单层模态拒绝,增加动作 list/item/label/description/cancel getters。
|
|
106
|
+
* 动作激活:读最新 service.prop("actions") 复核 → onAction(value) → 非 keepOpen 时同一 api.setOpen(false)。
|
|
107
|
+
* 取消只请求关闭,零动作通知。
|
|
108
|
+
*/
|
|
109
|
+
export declare function connectActionSheet(service: Service, normalize: ActionSheetNormalize, props?: QwActionSheetProps, runtime?: ModalRenderRuntime): QwActionSheetApi;
|
|
110
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { actionSheetMachine, createActionSheetProps, connectActionSheet, resolveActionSheetActions, resolveActionSheetActivation, getActionSheetAccessibleName, getActionSheetDataAttrs, } from "./action-sheet.js";
|
|
2
|
+
export type { QwActionSheetAction, QwActionSheetProps, QwActionSheetApi, QwActionSheetMachineProps, QwActionSheetActivation, QwResolvedActionSheetAction, } from "./action-sheet.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as getActionSheetDataAttrs, i as getActionSheetAccessibleName, n as connectActionSheet, o as resolveActionSheetActions, r as createActionSheetProps, s as resolveActionSheetActivation, t as actionSheetMachine } from "../action-sheet-Cvcr1S_m.js";
|
|
2
|
+
export { actionSheetMachine, connectActionSheet, createActionSheetProps, getActionSheetAccessibleName, getActionSheetDataAttrs, resolveActionSheetActions, resolveActionSheetActivation };
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { n as createPopupProps, o as popupMachine, t as connectPopup } from "./popup-z5d8IYCt.js";
|
|
2
|
+
//#region src/action-sheet/action-sheet.ts
|
|
3
|
+
/**
|
|
4
|
+
* ActionSheet 的 Core machine。物理层就是 Popup 的同一 machine(modalDialogMachine 惰性 scope lookup、
|
|
5
|
+
* 单层模态与 Zag effects 全部继承);动作数据经 machine props 传入,处理器只读最新 service.prop。
|
|
6
|
+
*/
|
|
7
|
+
const actionSheetMachine = popupMachine;
|
|
8
|
+
const FALLBACK_NAME = "动作面板";
|
|
9
|
+
const DANGER_FALLBACK = "危险操作";
|
|
10
|
+
const CANCEL_TEXT = "取消";
|
|
11
|
+
const text = (value) => {
|
|
12
|
+
const normalized = value?.trim();
|
|
13
|
+
return normalized ? normalized : void 0;
|
|
14
|
+
};
|
|
15
|
+
/** 可访问名称:title → ariaLabel → 「动作面板」。空白视为缺省。 */
|
|
16
|
+
function getActionSheetAccessibleName(props) {
|
|
17
|
+
return text(props.title) ?? text(props.ariaLabel) ?? FALLBACK_NAME;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 归一化动作:按输入顺序保留全部可见项;重复 value 只第一项可能启用,第一项 disabled 不晋升后项。
|
|
21
|
+
* 危险说明 dangerDescription → description → 「危险操作」,与普通说明相同则只出现一次。
|
|
22
|
+
*/
|
|
23
|
+
function resolveActionSheetActions(actions = []) {
|
|
24
|
+
const seen = /* @__PURE__ */ new Set();
|
|
25
|
+
return actions.map((source, sourceIndex) => {
|
|
26
|
+
const duplicate = seen.has(source.value);
|
|
27
|
+
seen.add(source.value);
|
|
28
|
+
const description = text(source.description);
|
|
29
|
+
const danger = source.danger === true;
|
|
30
|
+
const dangerDescription = danger ? text(source.dangerDescription) ?? description ?? DANGER_FALLBACK : void 0;
|
|
31
|
+
const accessibleDescription = [description, dangerDescription].filter((entry) => entry !== void 0).filter((entry, index, entries) => entries.indexOf(entry) === index);
|
|
32
|
+
return {
|
|
33
|
+
source,
|
|
34
|
+
sourceIndex,
|
|
35
|
+
value: source.value,
|
|
36
|
+
label: source.label,
|
|
37
|
+
description,
|
|
38
|
+
dangerDescription,
|
|
39
|
+
danger,
|
|
40
|
+
duplicate,
|
|
41
|
+
disabled: source.disabled === true || duplicate,
|
|
42
|
+
keepOpen: source.keepOpen === true,
|
|
43
|
+
accessibleDescription,
|
|
44
|
+
descriptionText: accessibleDescription.length > 0 ? accessibleDescription.join(" ") : void 0
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 以最新列表复核一次渲染时的动作:源对象 identity + sourceIndex + value 都一致且仍启用才放行。
|
|
50
|
+
* 已删除、被同值新对象替换、被禁用或变成重复后项的旧处理器一律 blocked。
|
|
51
|
+
*/
|
|
52
|
+
function resolveActionSheetActivation(latestActions, rendered) {
|
|
53
|
+
const latest = resolveActionSheetActions(latestActions)[rendered.sourceIndex];
|
|
54
|
+
if (!latest || latest.source !== rendered.source || latest.value !== rendered.value || latest.disabled) return { kind: "blocked" };
|
|
55
|
+
return {
|
|
56
|
+
kind: "action",
|
|
57
|
+
value: latest.value,
|
|
58
|
+
requestClose: !latest.keepOpen
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function toPopupProps(props) {
|
|
62
|
+
const { actions: _actions, showCancel: _showCancel, cancelText: _cancelText, onAction: _onAction, ...rest } = props;
|
|
63
|
+
const popup = {
|
|
64
|
+
...rest,
|
|
65
|
+
placement: "bottom"
|
|
66
|
+
};
|
|
67
|
+
if (!text(props.title)) popup.ariaLabel = getActionSheetAccessibleName(props);
|
|
68
|
+
return popup;
|
|
69
|
+
}
|
|
70
|
+
/** Popup 的 data 属性(placement 固定 bottom)。 */
|
|
71
|
+
function getActionSheetDataAttrs(props) {
|
|
72
|
+
return {
|
|
73
|
+
"data-placement": "bottom",
|
|
74
|
+
"data-safe-area": props.safeArea === false ? void 0 : ""
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* 公开 props → 同一 Popup machine 的 context。机械委托 createPopupProps(props, runtime):
|
|
79
|
+
* 受控优先、初态许可/拒绝仍由 Popup Core 决定;actions/onAction 只作为最新数据随 service.prop 传递。
|
|
80
|
+
*/
|
|
81
|
+
function createActionSheetProps(props = {}, runtime) {
|
|
82
|
+
return {
|
|
83
|
+
...createPopupProps(toPopupProps(props), runtime),
|
|
84
|
+
actions: props.actions ?? [],
|
|
85
|
+
onAction: props.onAction
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function stableId(service) {
|
|
89
|
+
return `action-sheet:${service.scope.id ?? ""}`;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* 包装 connectPopup:继承开合/getters 与单层模态拒绝,增加动作 list/item/label/description/cancel getters。
|
|
93
|
+
* 动作激活:读最新 service.prop("actions") 复核 → onAction(value) → 非 keepOpen 时同一 api.setOpen(false)。
|
|
94
|
+
* 取消只请求关闭,零动作通知。
|
|
95
|
+
*/
|
|
96
|
+
function connectActionSheet(service, normalize, props = {}, runtime) {
|
|
97
|
+
const popup = connectPopup(service, normalize, toPopupProps(props), runtime);
|
|
98
|
+
const actions = resolveActionSheetActions(props.actions);
|
|
99
|
+
const base = stableId(service);
|
|
100
|
+
const isOpen = () => service.state.matches("open");
|
|
101
|
+
const readProp = (key) => service.prop(key);
|
|
102
|
+
const labelId = (index) => `${base}:action:${index}:label`;
|
|
103
|
+
const descriptionId = (index) => `${base}:action:${index}:description`;
|
|
104
|
+
const showCancel = props.showCancel !== false;
|
|
105
|
+
const cancelText = text(props.cancelText) ?? CANCEL_TEXT;
|
|
106
|
+
const activate = (rendered) => (event) => {
|
|
107
|
+
if (!isOpen()) return;
|
|
108
|
+
const result = resolveActionSheetActivation(readProp("actions") ?? props.actions, rendered);
|
|
109
|
+
if (result.kind === "blocked") {
|
|
110
|
+
event?.preventDefault?.();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
(readProp("onAction") ?? props.onAction)?.(result.value);
|
|
114
|
+
if (result.requestClose) popup.setOpen(false);
|
|
115
|
+
};
|
|
116
|
+
return {
|
|
117
|
+
...popup,
|
|
118
|
+
actions,
|
|
119
|
+
showCancel,
|
|
120
|
+
cancelText,
|
|
121
|
+
getListProps: () => normalize.element({
|
|
122
|
+
"data-scope": "action-sheet",
|
|
123
|
+
"data-part": "list",
|
|
124
|
+
"data-visual-target": "action-sheet-list",
|
|
125
|
+
"data-empty": actions.length === 0 ? "" : void 0
|
|
126
|
+
}),
|
|
127
|
+
getItemProps: () => normalize.element({
|
|
128
|
+
"data-scope": "action-sheet",
|
|
129
|
+
"data-part": "entry"
|
|
130
|
+
}),
|
|
131
|
+
getActionProps({ index }) {
|
|
132
|
+
const action = actions[index];
|
|
133
|
+
if (!action) return normalize.element({
|
|
134
|
+
"data-scope": "action-sheet",
|
|
135
|
+
"data-part": "item",
|
|
136
|
+
type: "button",
|
|
137
|
+
disabled: true
|
|
138
|
+
});
|
|
139
|
+
const labelledBy = action.danger && !action.description && action.descriptionText ? `${labelId(index)} ${descriptionId(index)}` : labelId(index);
|
|
140
|
+
return normalize.element({
|
|
141
|
+
"data-scope": "action-sheet",
|
|
142
|
+
"data-part": "item",
|
|
143
|
+
"data-visual-target": action.danger ? "action-sheet-danger" : "action-sheet-item",
|
|
144
|
+
id: `${base}:action:${index}`,
|
|
145
|
+
type: "button",
|
|
146
|
+
disabled: action.disabled,
|
|
147
|
+
"aria-labelledby": labelledBy,
|
|
148
|
+
"aria-describedby": action.descriptionText ? descriptionId(index) : void 0,
|
|
149
|
+
"data-value": action.value,
|
|
150
|
+
"data-danger": action.danger ? "" : void 0,
|
|
151
|
+
"data-disabled": action.disabled ? "" : void 0,
|
|
152
|
+
"data-duplicate": action.duplicate ? "" : void 0,
|
|
153
|
+
"data-keep-open": action.keepOpen ? "" : void 0,
|
|
154
|
+
onClick: activate(action)
|
|
155
|
+
});
|
|
156
|
+
},
|
|
157
|
+
getActionLabelProps: ({ index }) => normalize.element({
|
|
158
|
+
"data-scope": "action-sheet",
|
|
159
|
+
"data-part": "label",
|
|
160
|
+
id: labelId(index),
|
|
161
|
+
"data-danger": actions[index]?.danger ? "" : void 0
|
|
162
|
+
}),
|
|
163
|
+
getActionDescriptionProps: ({ index }) => normalize.element({
|
|
164
|
+
"data-scope": "action-sheet",
|
|
165
|
+
"data-part": "description",
|
|
166
|
+
"data-visual-target": "action-sheet-description",
|
|
167
|
+
id: descriptionId(index),
|
|
168
|
+
"data-danger": actions[index]?.danger ? "" : void 0
|
|
169
|
+
}),
|
|
170
|
+
getCancelProps: () => normalize.element({
|
|
171
|
+
"data-scope": "action-sheet",
|
|
172
|
+
"data-part": "cancel",
|
|
173
|
+
"data-visual-target": "action-sheet-cancel",
|
|
174
|
+
id: `${base}:cancel`,
|
|
175
|
+
type: "button",
|
|
176
|
+
onClick: () => popup.setOpen(false)
|
|
177
|
+
})
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
//#endregion
|
|
181
|
+
export { getActionSheetDataAttrs as a, getActionSheetAccessibleName as i, connectActionSheet as n, resolveActionSheetActions as o, createActionSheetProps as r, resolveActionSheetActivation as s, actionSheetMachine as t };
|
|
182
|
+
|
|
183
|
+
//# sourceMappingURL=action-sheet-Cvcr1S_m.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-sheet-Cvcr1S_m.js","names":[],"sources":["../src/action-sheet/action-sheet.ts"],"sourcesContent":["import type { machine, Props as ZagDialogProps, Service } from \"@zag-js/dialog\";\nimport type { ModalRenderRuntime } from \"../modal-render-runtime.js\";\nimport {\n connectPopup,\n createPopupProps,\n popupMachine,\n type QwPopupProps,\n} from \"../popup/popup.js\";\n\n/**\n * ActionSheet 的 Core machine。物理层就是 Popup 的同一 machine(modalDialogMachine 惰性 scope lookup、\n * 单层模态与 Zag effects 全部继承);动作数据经 machine props 传入,处理器只读最新 service.prop。\n */\nexport const actionSheetMachine: typeof machine = popupMachine;\n\n/** 单个纵向文字动作。value 是精确通知值,label/description 不作身份。 */\nexport interface QwActionSheetAction {\n value: string;\n label: string;\n /** 可见说明,trim 后为空视为缺省。 */\n description?: string;\n /** 危险动作:可见危险说明 + data-danger;没有第二次确认。 */\n danger?: boolean;\n /** 危险说明,优先于 description;都缺省时为「危险操作」。 */\n dangerDescription?: string;\n /** 原生 disabled:不可聚焦、不通知、不关闭。 */\n disabled?: boolean;\n /** 为 true 时通知动作但不请求关闭。默认 false。 */\n keepOpen?: boolean;\n}\n\n/** ActionSheet 输入。固定底部,不接受 placement。 */\nexport interface QwActionSheetProps extends Omit<QwPopupProps, \"placement\"> {\n /** 纵向动作,缺省 []。 */\n actions?: readonly QwActionSheetAction[];\n /** 是否显示取消按钮,默认 true。 */\n showCancel?: boolean;\n /** 取消按钮文字,默认「取消」。 */\n cancelText?: string;\n /** 每次启用动作被激活时通知一次。 */\n onAction?: (value: string) => void;\n}\n\n/** Core 派生的动作数据。适配层只渲染,不判断 disabled/duplicate/keepOpen。 */\nexport interface QwResolvedActionSheetAction {\n readonly source: QwActionSheetAction;\n readonly sourceIndex: number;\n readonly value: string;\n readonly label: string;\n readonly description?: string;\n readonly dangerDescription?: string;\n readonly danger: boolean;\n readonly duplicate: boolean;\n readonly disabled: boolean;\n readonly keepOpen: boolean;\n /** 去重后的可见说明条目(普通说明、危险说明)。 */\n readonly accessibleDescription: readonly string[];\n /** 渲染用说明文本;无说明时 undefined。 */\n readonly descriptionText?: string;\n}\n\n/** createActionSheetProps 的输出:Zag dialog context + 动作数据(只供 Core 处理器读取)。 */\nexport type QwActionSheetMachineProps = Partial<ZagDialogProps> & {\n actions?: readonly QwActionSheetAction[];\n onAction?: (value: string) => void;\n};\n\ntype ActionSheetNormalize = Parameters<typeof connectPopup>[1];\ntype NormalizedProps = ReturnType<ActionSheetNormalize[\"element\"]>;\n\nexport type QwActionSheetApi = ReturnType<typeof connectPopup> & {\n readonly actions: readonly QwResolvedActionSheetAction[];\n readonly showCancel: boolean;\n readonly cancelText: string;\n getListProps(): NormalizedProps;\n getItemProps(details: { index: number }): NormalizedProps;\n getActionProps(details: { index: number }): NormalizedProps;\n getActionLabelProps(details: { index: number }): NormalizedProps;\n getActionDescriptionProps(details: { index: number }): NormalizedProps;\n getCancelProps(): NormalizedProps;\n};\n\nconst FALLBACK_NAME = \"动作面板\";\nconst DANGER_FALLBACK = \"危险操作\";\nconst CANCEL_TEXT = \"取消\";\n\nconst text = (value: string | undefined): string | undefined => {\n const normalized = value?.trim();\n return normalized ? normalized : undefined;\n};\n\n/** 可访问名称:title → ariaLabel → 「动作面板」。空白视为缺省。 */\nexport function getActionSheetAccessibleName(props: Pick<QwActionSheetProps, \"title\" | \"ariaLabel\">): string {\n return text(props.title) ?? text(props.ariaLabel) ?? FALLBACK_NAME;\n}\n\n/**\n * 归一化动作:按输入顺序保留全部可见项;重复 value 只第一项可能启用,第一项 disabled 不晋升后项。\n * 危险说明 dangerDescription → description → 「危险操作」,与普通说明相同则只出现一次。\n */\nexport function resolveActionSheetActions(\n actions: readonly QwActionSheetAction[] = [],\n): readonly QwResolvedActionSheetAction[] {\n const seen = new Set<string>();\n return actions.map((source, sourceIndex) => {\n const duplicate = seen.has(source.value);\n seen.add(source.value);\n const description = text(source.description);\n const danger = source.danger === true;\n const dangerDescription = danger ? text(source.dangerDescription) ?? description ?? DANGER_FALLBACK : undefined;\n const accessibleDescription = [description, dangerDescription]\n .filter((entry): entry is string => entry !== undefined)\n .filter((entry, index, entries) => entries.indexOf(entry) === index);\n return {\n source,\n sourceIndex,\n value: source.value,\n label: source.label,\n description,\n dangerDescription,\n danger,\n duplicate,\n disabled: source.disabled === true || duplicate,\n keepOpen: source.keepOpen === true,\n accessibleDescription,\n descriptionText: accessibleDescription.length > 0 ? accessibleDescription.join(\" \") : undefined,\n };\n });\n}\n\nexport type QwActionSheetActivation =\n | { readonly kind: \"blocked\" }\n | { readonly kind: \"action\"; readonly value: string; readonly requestClose: boolean };\n\n/**\n * 以最新列表复核一次渲染时的动作:源对象 identity + sourceIndex + value 都一致且仍启用才放行。\n * 已删除、被同值新对象替换、被禁用或变成重复后项的旧处理器一律 blocked。\n */\nexport function resolveActionSheetActivation(\n latestActions: readonly QwActionSheetAction[] | undefined,\n rendered: Pick<QwResolvedActionSheetAction, \"source\" | \"sourceIndex\" | \"value\">,\n): QwActionSheetActivation {\n const latest = resolveActionSheetActions(latestActions)[rendered.sourceIndex];\n if (!latest || latest.source !== rendered.source || latest.value !== rendered.value || latest.disabled) return { kind: \"blocked\" };\n return { kind: \"action\", value: latest.value, requestClose: !latest.keepOpen };\n}\n\nfunction toPopupProps(props: QwActionSheetProps): QwPopupProps {\n const { actions: _actions, showCancel: _showCancel, cancelText: _cancelText, onAction: _onAction, ...rest } = props;\n void _actions; void _showCancel; void _cancelText; void _onAction;\n const popup: QwPopupProps = { ...rest, placement: \"bottom\" };\n // 有标题时 Zag 写 aria-labelledby;无标题时名称回退「动作面板」而非 Popup 的「弹出层」。\n if (!text(props.title)) popup.ariaLabel = getActionSheetAccessibleName(props);\n return popup;\n}\n\n/** Popup 的 data 属性(placement 固定 bottom)。 */\nexport function getActionSheetDataAttrs(props: Pick<QwActionSheetProps, \"safeArea\">): Record<string, string | undefined> {\n return { \"data-placement\": \"bottom\", \"data-safe-area\": props.safeArea === false ? undefined : \"\" };\n}\n\n/**\n * 公开 props → 同一 Popup machine 的 context。机械委托 createPopupProps(props, runtime):\n * 受控优先、初态许可/拒绝仍由 Popup Core 决定;actions/onAction 只作为最新数据随 service.prop 传递。\n */\nexport function createActionSheetProps(props: QwActionSheetProps = {}, runtime?: ModalRenderRuntime): QwActionSheetMachineProps {\n return { ...createPopupProps(toPopupProps(props), runtime), actions: props.actions ?? [], onAction: props.onAction };\n}\n\nfunction stableId(service: Service): string {\n return `action-sheet:${service.scope.id ?? \"\"}`;\n}\n\n/**\n * 包装 connectPopup:继承开合/getters 与单层模态拒绝,增加动作 list/item/label/description/cancel getters。\n * 动作激活:读最新 service.prop(\"actions\") 复核 → onAction(value) → 非 keepOpen 时同一 api.setOpen(false)。\n * 取消只请求关闭,零动作通知。\n */\nexport function connectActionSheet(\n service: Service,\n normalize: ActionSheetNormalize,\n props: QwActionSheetProps = {},\n runtime?: ModalRenderRuntime,\n): QwActionSheetApi {\n const popup = connectPopup(service, normalize, toPopupProps(props), runtime);\n const actions = resolveActionSheetActions(props.actions);\n const base = stableId(service);\n const isOpen = () => service.state.matches(\"open\");\n const readProp = <K extends \"actions\" | \"onAction\">(key: K): QwActionSheetMachineProps[K] =>\n (service.prop as unknown as (name: K) => QwActionSheetMachineProps[K])(key);\n const labelId = (index: number) => `${base}:action:${index}:label`;\n const descriptionId = (index: number) => `${base}:action:${index}:description`;\n const showCancel = props.showCancel !== false;\n const cancelText = text(props.cancelText) ?? CANCEL_TEXT;\n\n const activate = (rendered: QwResolvedActionSheetAction) => (event?: { preventDefault?(): void }) => {\n if (!isOpen()) return;\n const result = resolveActionSheetActivation(readProp(\"actions\") ?? props.actions, rendered);\n if (result.kind === \"blocked\") {\n event?.preventDefault?.();\n return;\n }\n (readProp(\"onAction\") ?? props.onAction)?.(result.value);\n if (result.requestClose) popup.setOpen(false);\n };\n\n return {\n ...popup,\n actions,\n showCancel,\n cancelText,\n getListProps: () => normalize.element({\n \"data-scope\": \"action-sheet\",\n \"data-part\": \"list\",\n \"data-visual-target\": \"action-sheet-list\",\n \"data-empty\": actions.length === 0 ? \"\" : undefined,\n }),\n getItemProps: () => normalize.element({ \"data-scope\": \"action-sheet\", \"data-part\": \"entry\" }),\n getActionProps({ index }) {\n const action = actions[index];\n if (!action) return normalize.element({ \"data-scope\": \"action-sheet\", \"data-part\": \"item\", type: \"button\", disabled: true });\n const labelledBy = action.danger && !action.description && action.descriptionText\n ? `${labelId(index)} ${descriptionId(index)}`\n : labelId(index);\n return normalize.element({\n \"data-scope\": \"action-sheet\",\n \"data-part\": \"item\",\n \"data-visual-target\": action.danger ? \"action-sheet-danger\" : \"action-sheet-item\",\n id: `${base}:action:${index}`,\n type: \"button\",\n disabled: action.disabled,\n \"aria-labelledby\": labelledBy,\n \"aria-describedby\": action.descriptionText ? descriptionId(index) : undefined,\n \"data-value\": action.value,\n \"data-danger\": action.danger ? \"\" : undefined,\n \"data-disabled\": action.disabled ? \"\" : undefined,\n \"data-duplicate\": action.duplicate ? \"\" : undefined,\n \"data-keep-open\": action.keepOpen ? \"\" : undefined,\n onClick: activate(action),\n });\n },\n getActionLabelProps: ({ index }) => normalize.element({\n \"data-scope\": \"action-sheet\",\n \"data-part\": \"label\",\n id: labelId(index),\n \"data-danger\": actions[index]?.danger ? \"\" : undefined,\n }),\n getActionDescriptionProps: ({ index }) => normalize.element({\n \"data-scope\": \"action-sheet\",\n \"data-part\": \"description\",\n \"data-visual-target\": \"action-sheet-description\",\n id: descriptionId(index),\n \"data-danger\": actions[index]?.danger ? \"\" : undefined,\n }),\n getCancelProps: () => normalize.element({\n \"data-scope\": \"action-sheet\",\n \"data-part\": \"cancel\",\n \"data-visual-target\": \"action-sheet-cancel\",\n id: `${base}:cancel`,\n type: \"button\",\n onClick: () => popup.setOpen(false),\n }),\n };\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { type Machine, type Service } from "@zag-js/core";
|
|
2
|
+
import { type CascaderOption } from "../cascader/cascader.js";
|
|
3
|
+
import type { QwPickerProps } from "../picker/picker.js";
|
|
4
|
+
import type { PickerColumn, PickerValue } from "../picker/selection-model.js";
|
|
5
|
+
/** Caller-owned region data. No national administrative dataset is bundled. Codes are opaque strings. */
|
|
6
|
+
export interface AreaPickerNode {
|
|
7
|
+
code: string;
|
|
8
|
+
label: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
leaf?: boolean;
|
|
11
|
+
children?: AreaPickerNode[];
|
|
12
|
+
}
|
|
13
|
+
export interface AreaPickerChangeDetails {
|
|
14
|
+
value: string[];
|
|
15
|
+
labels: string[];
|
|
16
|
+
path: AreaPickerNode[];
|
|
17
|
+
code: string | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface AreaPickerLoadDetails {
|
|
20
|
+
node: AreaPickerNode;
|
|
21
|
+
path: string[];
|
|
22
|
+
signal: AbortSignal;
|
|
23
|
+
}
|
|
24
|
+
export interface QwAreaPickerProps extends Omit<QwPickerProps, "columns" | "value" | "defaultValue" | "onValueChange" | "onPreviewChange"> {
|
|
25
|
+
data: readonly AreaPickerNode[];
|
|
26
|
+
/** Explicit locale boundary copied by the real Picker portal. */
|
|
27
|
+
lang?: string;
|
|
28
|
+
dir?: string;
|
|
29
|
+
value?: string[];
|
|
30
|
+
defaultValue?: string[];
|
|
31
|
+
/** Maximum hierarchy depth, default 3. Explicit leaf nodes may terminate earlier. */
|
|
32
|
+
maxDepth?: number;
|
|
33
|
+
columnLabels?: string[];
|
|
34
|
+
loadChildren?: (details: AreaPickerLoadDetails) => Promise<AreaPickerNode[]>;
|
|
35
|
+
loadingText?: string;
|
|
36
|
+
errorText?: string;
|
|
37
|
+
retryText?: string;
|
|
38
|
+
name?: string;
|
|
39
|
+
onValueChange?: (details: AreaPickerChangeDetails) => void;
|
|
40
|
+
onPreviewChange?: (details: AreaPickerChangeDetails) => void;
|
|
41
|
+
}
|
|
42
|
+
export declare const AREA_PICKER_PARTS: readonly ["root", "status", "retry-trigger", "input"];
|
|
43
|
+
export declare function toAreaPickerOptions(data: readonly AreaPickerNode[]): CascaderOption[];
|
|
44
|
+
/** Fill enabled descendants; a disabled ancestor invalidates its entire branch. */
|
|
45
|
+
export declare function resolveAreaPickerValue(options: readonly CascaderOption[], value: readonly (string | null)[], maxDepth?: number): string[];
|
|
46
|
+
export interface QwAreaPickerSchema {
|
|
47
|
+
props: QwAreaPickerProps;
|
|
48
|
+
context: {
|
|
49
|
+
value: string[];
|
|
50
|
+
preview: string[];
|
|
51
|
+
base: string;
|
|
52
|
+
options: CascaderOption[];
|
|
53
|
+
loading: string[];
|
|
54
|
+
error: string[];
|
|
55
|
+
};
|
|
56
|
+
refs: {
|
|
57
|
+
controller: AbortController | null;
|
|
58
|
+
active: boolean;
|
|
59
|
+
request: number;
|
|
60
|
+
options: CascaderOption[] | undefined;
|
|
61
|
+
};
|
|
62
|
+
state: "idle";
|
|
63
|
+
action: "preview" | "commit" | "sync" | "success" | "error" | "retry" | "reset" | "open";
|
|
64
|
+
effect: "lifecycle";
|
|
65
|
+
event: {
|
|
66
|
+
type: "PREVIEW" | "COMMIT";
|
|
67
|
+
value: PickerValue;
|
|
68
|
+
} | {
|
|
69
|
+
type: "SYNC" | "RETRY" | "RESET" | "OPEN";
|
|
70
|
+
} | {
|
|
71
|
+
type: "SUCCESS";
|
|
72
|
+
request: number;
|
|
73
|
+
path: string[];
|
|
74
|
+
data: AreaPickerNode[];
|
|
75
|
+
} | {
|
|
76
|
+
type: "ERROR";
|
|
77
|
+
request: number;
|
|
78
|
+
path: string[];
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export type QwAreaPickerMachine = Machine<QwAreaPickerSchema>;
|
|
82
|
+
export type QwAreaPickerService = Service<QwAreaPickerSchema>;
|
|
83
|
+
export declare function createAreaPickerProps(props: QwAreaPickerProps): QwAreaPickerProps;
|
|
84
|
+
export declare const areaPickerMachine: QwAreaPickerMachine;
|
|
85
|
+
export interface QwAreaPickerApi {
|
|
86
|
+
value: string[];
|
|
87
|
+
labels: string[];
|
|
88
|
+
previewValue: string[];
|
|
89
|
+
valid: boolean;
|
|
90
|
+
loading: boolean;
|
|
91
|
+
error: boolean;
|
|
92
|
+
statusText: string;
|
|
93
|
+
retryText: string;
|
|
94
|
+
columns: PickerColumn[];
|
|
95
|
+
pickerProps: QwPickerProps;
|
|
96
|
+
notifyPreview(value: PickerValue): void;
|
|
97
|
+
notifyCommit(value: PickerValue): void;
|
|
98
|
+
retry(): void;
|
|
99
|
+
getRootProps(): Record<string, string | undefined>;
|
|
100
|
+
getStatusProps(): Record<string, string | boolean>;
|
|
101
|
+
getRetryProps(): {
|
|
102
|
+
type: "button";
|
|
103
|
+
hidden: boolean;
|
|
104
|
+
onClick(): void;
|
|
105
|
+
};
|
|
106
|
+
getInputProps(): {
|
|
107
|
+
type: "hidden";
|
|
108
|
+
name: string | undefined;
|
|
109
|
+
value: string;
|
|
110
|
+
disabled: boolean;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export declare function connectAreaPicker(service: QwAreaPickerService, props: QwAreaPickerProps): QwAreaPickerApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./area-picker.js";
|