@astryx-vue/core 0.41.1 → 0.42.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.
Files changed (241) hide show
  1. package/dist/AlertDialog/index.js +1 -1
  2. package/dist/{AlertDialog-DxrO48Kg.js → AlertDialog-Cld8wc2u.js} +3 -3
  3. package/dist/AvatarGroup/index.d.ts +1 -1
  4. package/dist/AvatarGroup/index.js +1 -1
  5. package/dist/{AvatarGroup-BZ5iG7M-.js → AvatarGroup-CU1zqtTi.js} +1 -1
  6. package/dist/Banner/index.d.ts +1 -1
  7. package/dist/Banner/index.js +1 -1
  8. package/dist/{Banner-0YtnbBU6.js → Banner-5KOS4fe8.js} +1 -1
  9. package/dist/BottomSheet/index.d.ts +1 -1
  10. package/dist/Breadcrumbs/index.d.ts +2 -2
  11. package/dist/Breadcrumbs/index.js +2 -2
  12. package/dist/{Breadcrumbs-9KMHiyXr.js → Breadcrumbs-Bcrk04nL.js} +1 -1
  13. package/dist/Button/index.d.ts +1 -1
  14. package/dist/Button/index.js +1 -1
  15. package/dist/{Button-ClyetTf6.js → Button-tVILPfaj.js} +2 -2
  16. package/dist/ButtonGroup/index.d.ts +1 -1
  17. package/dist/ButtonGroup/index.js +1 -1
  18. package/dist/{ButtonGroup-tk0H2O8q.js → ButtonGroup-D7p8oEry.js} +2 -2
  19. package/dist/Calendar/index.d.ts +1 -1
  20. package/dist/Calendar/index.js +2 -2
  21. package/dist/{Calendar-CfhOlgQJ.js → Calendar-Brz2iDeZ.js} +1 -1
  22. package/dist/{Calendar-DbAQvHgy.js → Calendar-C1E1ZiaS.js} +1 -1
  23. package/dist/Carousel/index.d.ts +1 -1
  24. package/dist/Carousel/index.js +1 -1
  25. package/dist/{Carousel-utfvjW5p.js → Carousel-DlHeba5J.js} +1 -1
  26. package/dist/Chat/index.d.ts +1 -1
  27. package/dist/Chat/index.js +1 -1
  28. package/dist/{Chat-DL583Xle.js → Chat-B0jgkmWf.js} +1 -1
  29. package/dist/CheckboxInput/index.d.ts +1 -1
  30. package/dist/CheckboxInput/index.js +1 -1
  31. package/dist/{CheckboxInput-BQH87pfn.js → CheckboxInput-BhKf3JOh.js} +4 -4
  32. package/dist/CheckboxList/index.d.ts +1 -1
  33. package/dist/CheckboxList/index.js +1 -1
  34. package/dist/{CheckboxListItem-BL7gDglY.js → CheckboxListItem-DFCDLwLP.js} +4 -4
  35. package/dist/ClickableCard/index.d.ts +1 -1
  36. package/dist/ClickableCard/index.js +1 -1
  37. package/dist/{ClickableCard-CdByvXDr.js → ClickableCard-DyBa2X4I.js} +1 -1
  38. package/dist/Code/index.js +2 -2
  39. package/dist/{Code-KvqZ1ZES.js → Code-BtJV5J-h.js} +1 -1
  40. package/dist/{CodeBlock-e2rlXQWO.js → CodeBlock-D1i3lEK3.js} +1 -1
  41. package/dist/Collapsible/index.js +1 -1
  42. package/dist/{Collapsible-CTc7irlw.js → Collapsible-CXbcOn80.js} +1 -1
  43. package/dist/CommandPalette/index.js +1 -1
  44. package/dist/{CommandPalette-PBYSDIpx.js → CommandPalette-DyjB9xE_.js} +1 -1
  45. package/dist/ComplexSelector/index.js +1 -1
  46. package/dist/{ComplexSelector-CPg5jcdL.js → ComplexSelector-MRuOupEd.js} +2 -2
  47. package/dist/ContextMenu/index.d.ts +2 -2
  48. package/dist/ContextMenu/index.js +2 -2
  49. package/dist/{ContextMenu-DcZEviKv.js → ContextMenu-JZUal7pu.js} +1 -1
  50. package/dist/DateInput/index.d.ts +1 -1
  51. package/dist/DateInput/index.js +1 -1
  52. package/dist/{DateInput-C4qtEFDW.js → DateInput-B76O2ceL.js} +579 -78
  53. package/dist/DateRangeInput/index.d.ts +1 -1
  54. package/dist/DateRangeInput/index.js +1 -1
  55. package/dist/{DateRangeInput-CGqCQAlT.js → DateRangeInput-B8ZWK6sm.js} +4 -4
  56. package/dist/DateTimeInput/index.d.ts +1 -1
  57. package/dist/DateTimeInput/index.js +1 -1
  58. package/dist/{DateTimeInput-CAirxttc.js → DateTimeInput-DOaPB2D4.js} +4 -4
  59. package/dist/Dialog/index.js +1 -1
  60. package/dist/{DialogHeader-BS8mjD8z.js → DialogHeader-B4cnOihd.js} +1 -1
  61. package/dist/Divider/index.d.ts +1 -1
  62. package/dist/Drawer/index.d.ts +1 -1
  63. package/dist/Drawer/index.js +1 -1
  64. package/dist/{Drawer-Cq1Y_1iJ.js → Drawer-dk9etcN3.js} +1 -1
  65. package/dist/DropdownMenu/index.d.ts +2 -2
  66. package/dist/DropdownMenu/index.js +2 -2
  67. package/dist/{DropdownMenu-CSn1OQ2D.js → DropdownMenu-Dqkyvelz.js} +3 -3
  68. package/dist/{DropdownMenuRadioItem.vue-BFCbIBfb.d.ts → DropdownMenuRadioItem.vue-BrcSzOfA.d.ts} +1 -1
  69. package/dist/Field/index.js +3 -3
  70. package/dist/{Field-BzGwGqwa.js → Field-B_GThk2X.js} +1 -1
  71. package/dist/{FieldInfoTip-DqsdZxo0.js → FieldInfoTip-jhm02XZs.js} +1 -1
  72. package/dist/{FieldLabel-DdMLaCP_.js → FieldLabel-C0XDwWCd.js} +1 -1
  73. package/dist/FileInput/index.js +1 -1
  74. package/dist/{FileInput-B_BXknEU.js → FileInput-CbXrw3RO.js} +3 -3
  75. package/dist/HoverCard/index.d.ts +1 -1
  76. package/dist/IconButton/index.js +1 -1
  77. package/dist/{IconButton-kj1M_L7a.js → IconButton-CU1kvO7X.js} +1 -1
  78. package/dist/InfoTip/index.d.ts +1 -1
  79. package/dist/InfoTip/index.js +1 -1
  80. package/dist/{InfoTip-DJIb8b29.js → InfoTip-BwxUx7Hk.js} +1 -1
  81. package/dist/{InputClearButton-wd0VoZja.js → InputClearButton-CN8J7JOl.js} +1 -1
  82. package/dist/InputGroup/index.js +1 -1
  83. package/dist/{InputGroup-DGiF9Xaz.js → InputGroup-Ca-SOzyp.js} +1 -1
  84. package/dist/InternationalizationProvider/index.js +2 -1
  85. package/dist/{InternationalizationProvider-C37KH-mM.js → InternationalizationProvider-Ddr5L4mQ.js} +4 -60
  86. package/dist/Item-B6nYjAw3.js +1476 -0
  87. package/dist/Lightbox/index.js +1 -1
  88. package/dist/{Lightbox-Fu6RCX0k.js → Lightbox-DCI-S6Ln.js} +1 -1
  89. package/dist/Link/index.d.ts +1 -1
  90. package/dist/Link/index.js +1 -1
  91. package/dist/{Link-zPVCNAM6.js → Link-B5CJso43.js} +1 -1
  92. package/dist/List/index.d.ts +3 -2
  93. package/dist/List/index.js +4 -4
  94. package/dist/{List-D4w6clf-.js → List-DuWNjAKk.js} +2 -2
  95. package/dist/{ListItem-uvJaYGOJ.js → ListItem-BxQt4Emy.js} +8 -3
  96. package/dist/Markdown/index.d.ts +1 -1
  97. package/dist/Markdown/index.js +1 -1
  98. package/dist/{Markdown-BiXz75mz.js → Markdown-BFV7g8oa.js} +118 -59
  99. package/dist/MoreMenu/index.d.ts +1 -1
  100. package/dist/MoreMenu/index.js +1 -1
  101. package/dist/{MoreMenu-CgT9SajI.js → MoreMenu-DOVbdDmP.js} +2 -2
  102. package/dist/MultiSelector/index.d.ts +1 -1
  103. package/dist/MultiSelector/index.js +1 -1
  104. package/dist/{MultiSelector-CaL3UDIc.js → MultiSelector-BLESAk-K.js} +3 -3
  105. package/dist/NavItem/index.d.ts +1 -1
  106. package/dist/NavItem/index.js +1 -1
  107. package/dist/{NavItem-D_1ecPv_.js → NavItem-BR639emm.js} +1 -1
  108. package/dist/NavMenu/index.js +1 -1
  109. package/dist/{NavMenuItem-DqBCA1VP.js → NavMenuItem-C9e62bSc.js} +1 -1
  110. package/dist/NumberInput/index.d.ts +1 -1
  111. package/dist/NumberInput/index.js +1 -1
  112. package/dist/{NumberInput-0lTA5weY.js → NumberInput-C7cRBlQm.js} +3 -3
  113. package/dist/Outline/index.js +1 -1
  114. package/dist/{Outline-BoxN40Bd.js → Outline-BcZMmO9Y.js} +1 -1
  115. package/dist/OverflowList/index.d.ts +1 -1
  116. package/dist/OverflowList/index.js +1 -1
  117. package/dist/{OverflowList-7oui4oT5.js → OverflowList-cjl0AaEP.js} +1 -1
  118. package/dist/Pagination/index.d.ts +1 -1
  119. package/dist/Pagination/index.js +1 -1
  120. package/dist/{Pagination-BrkX0lga.js → Pagination-BnA277o8.js} +2 -2
  121. package/dist/Popover/index.d.ts +1 -1
  122. package/dist/Popover/index.js +1 -1
  123. package/dist/{Popover-BZ4VWDtv.js → Popover-DfO-mkcm.js} +1 -1
  124. package/dist/PowerSearch/index.d.ts +1 -1
  125. package/dist/PowerSearch/index.js +1 -1
  126. package/dist/{PowerSearch-BSoQJbHK.js → PowerSearch-CvBTNf6L.js} +19 -19
  127. package/dist/ProgressBar/index.d.ts +1 -1
  128. package/dist/Radio/index.d.ts +1 -1
  129. package/dist/Radio/index.js +1 -1
  130. package/dist/{RadioGroup-CrRm7H51.js → RadioGroup-CVOlUPbf.js} +4 -4
  131. package/dist/RadioList/index.d.ts +1 -1
  132. package/dist/RadioList/index.js +1 -1
  133. package/dist/{RadioListItem-iPD3y2Eo.js → RadioListItem-5y613Xrt.js} +1 -1
  134. package/dist/Resizable/index.d.ts +1 -1
  135. package/dist/ScrollableArea/index.d.ts +1 -1
  136. package/dist/SegmentedControl/index.js +1 -1
  137. package/dist/{SegmentedControl-D8A_jaFC.js → SegmentedControl-B6BQlTfN.js} +3 -3
  138. package/dist/SelectableCard/index.d.ts +1 -1
  139. package/dist/SelectableCard/index.js +1 -1
  140. package/dist/{SelectableCard-DIruuGBa.js → SelectableCard-C2hl7HBW.js} +1 -1
  141. package/dist/Selector/index.d.ts +1 -1
  142. package/dist/Selector/index.js +1 -1
  143. package/dist/{Selector-CFdM10Uc.js → Selector-Dw_0e0zY.js} +1 -1
  144. package/dist/SideNav/index.d.ts +1 -1
  145. package/dist/SideNav/index.js +1 -1
  146. package/dist/{SideNav-Cl1H-baW.js → SideNav-dsff7R2R.js} +2 -2
  147. package/dist/Slider/index.js +1 -1
  148. package/dist/{Slider-Bd3wpFo7.js → Slider-CN5NOM10.js} +3 -3
  149. package/dist/Stepper/index.d.ts +1 -1
  150. package/dist/Stepper/index.js +1 -1
  151. package/dist/{Stepper-CZU_Zvi5.js → Stepper-BYZasZK7.js} +1 -1
  152. package/dist/Swipe/index.d.ts +3 -0
  153. package/dist/Swipe/index.js +2 -0
  154. package/dist/Switch/index.d.ts +1 -1
  155. package/dist/Switch/index.js +1 -1
  156. package/dist/{Switch-BpkKyz98.js → Switch-DHr3_O1r.js} +4 -4
  157. package/dist/TabList/index.js +1 -1
  158. package/dist/{TabList-DZ2i0QIt.js → TabList-O34fxJlZ.js} +1 -1
  159. package/dist/Table/index.d.ts +1 -1
  160. package/dist/Table/index.js +1 -1
  161. package/dist/{Table-fSipO9Ju.js → Table-sTJtTqmi.js} +9 -9
  162. package/dist/TextArea/index.d.ts +1 -1
  163. package/dist/TextArea/index.js +1 -1
  164. package/dist/{TextArea-D5aDDlgr.js → TextArea-TO_A1D_W.js} +4 -4
  165. package/dist/TextInput/index.d.ts +1 -1
  166. package/dist/TextInput/index.js +1 -1
  167. package/dist/{TextInput-CVRWRtoL.js → TextInput-jIBboBDS.js} +4 -4
  168. package/dist/Thumbnail/index.js +1 -1
  169. package/dist/{Thumbnail-zFN5p6dk.js → Thumbnail-CRltyNsq.js} +2 -2
  170. package/dist/{TimeField-B49DgkyR.js → TimeField-BG409_10.js} +1 -1
  171. package/dist/TimeInput/index.d.ts +1 -1
  172. package/dist/TimeInput/index.js +1 -1
  173. package/dist/{TimeInput-BoFij92p.js → TimeInput-CQzBs55U.js} +2 -2
  174. package/dist/Timestamp/index.d.ts +1 -1
  175. package/dist/Timestamp/index.js +1 -1
  176. package/dist/{Timestamp-DunFvQYG.js → Timestamp-s4Nksy5i.js} +1 -1
  177. package/dist/Toast/index.js +1 -1
  178. package/dist/{Toast-BnIq3gzw.js → Toast-DcKB9QHW.js} +1 -1
  179. package/dist/ToggleButton/index.d.ts +1 -1
  180. package/dist/ToggleButton/index.js +1 -1
  181. package/dist/{ToggleButton-CLgj6yLQ.js → ToggleButton-DZgHhJd7.js} +3 -3
  182. package/dist/Token/index.d.ts +1 -1
  183. package/dist/Token/index.js +1 -1
  184. package/dist/{Token-BPjnWrHl.js → Token-B6mV8hyk.js} +1 -1
  185. package/dist/Tokenizer/index.d.ts +1 -1
  186. package/dist/Tokenizer/index.js +1 -1
  187. package/dist/{Tokenizer-CMv-Bi0y.js → Tokenizer-BvCiuyhk.js} +5 -5
  188. package/dist/Toolbar/index.d.ts +1 -1
  189. package/dist/Tooltip/index.d.ts +1 -1
  190. package/dist/TopNav/index.d.ts +1 -1
  191. package/dist/TopNav/index.js +1 -1
  192. package/dist/{TopNav-DUkn4CMv.js → TopNav-xKD14HTR.js} +2 -2
  193. package/dist/TreeList/index.d.ts +1 -1
  194. package/dist/TreeList/index.js +1 -1
  195. package/dist/{TreeList-o5MrA7rz.js → TreeList-BOr0GpJC.js} +1 -1
  196. package/dist/Typeahead/index.js +1 -1
  197. package/dist/{Typeahead-DXlsxjkQ.js → Typeahead-C18-lx2P.js} +3 -3
  198. package/dist/{accessibleName-9UI6HUaA.js → accessibleName-Chl0zwq_.js} +1 -1
  199. package/dist/{boxHold-DfsWCZLh.js → boxHold-BCbXt9_d.js} +1 -1
  200. package/dist/composables/index.js +4 -3
  201. package/dist/{composables-Dzpv7G2Z.js → composables-CKAzgdPD.js} +3 -473
  202. package/dist/context-BNCjTOCB.js +60 -0
  203. package/dist/createSwipe-DXObfkyb.js +77 -0
  204. package/dist/{index-CJT9kM7e.d.ts → index-3vt1Ew4A.d.ts} +2 -2
  205. package/dist/{index-BFPb14Xj.d.ts → index-B9LwZ19y.d.ts} +6 -6
  206. package/dist/{index-ZKBj_1nu.d.ts → index-BfFpUr1B.d.ts} +1 -1
  207. package/dist/{index-DofC9Rll.d.ts → index-BtqvPjAf.d.ts} +1 -1
  208. package/dist/{index-CKnr0JlT.d.ts → index-C4S65SAW.d.ts} +1 -1
  209. package/dist/{index-D05JGsT3.d.ts → index-C8wfe0Mr.d.ts} +1 -1
  210. package/dist/{index-Bwh8O-v8.d.ts → index-CZ29Xu_E.d.ts} +1 -1
  211. package/dist/{index-COgrQZIL.d.ts → index-CdvmnNMH.d.ts} +1 -1
  212. package/dist/{index-DYabo8TI.d.ts → index-DPhQZXYw.d.ts} +1 -1
  213. package/dist/index-DPsvfn2V.d.ts +25 -0
  214. package/dist/{index-CuW4AQ7M.d.ts → index-DXHmlFcC.d.ts} +3 -3
  215. package/dist/{index-YP5WRwXH.d.ts → index-Dn6iAyK4.d.ts} +5 -5
  216. package/dist/{index-CCa_dvoF.d.ts → index-Ds4dOCSy.d.ts} +3 -3
  217. package/dist/{index-DgNCHxvu.d.ts → index-J83fLEyo.d.ts} +2 -2
  218. package/dist/{index-COqeB2ug.d.ts → index-Nln6FiRr.d.ts} +1 -1
  219. package/dist/{index-4_uuTfaY.d.ts → index-VWHtgjGh.d.ts} +1 -1
  220. package/dist/{index-0RIgvtdm.d.ts → index-ZXrvTM3A.d.ts} +2 -2
  221. package/dist/{index-uWIhWgDN.d.ts → index-lNjYxF1K.d.ts} +45 -44
  222. package/dist/{index-Ak1b0V24.d.ts → index-tdOyqA_U.d.ts} +1 -1
  223. package/dist/{index-LYiWcVDD.d.ts → index-v27zktLu.d.ts} +2 -2
  224. package/dist/index.d.ts +25 -23
  225. package/dist/index.js +81 -78
  226. package/dist/itemSlots-Dl7Ipj5I.js +539 -0
  227. package/dist/{pressSlot-5Bp-B175.js → pressSlot-31XyOhUS.js} +20 -2
  228. package/dist/swipeHost-B2OlVVZt.d.ts +73 -0
  229. package/dist/{types-D9mwL8sz.d.ts → types-wKC-Ws-M.d.ts} +29 -10
  230. package/dist/{useActionGroupTracking-Cujjrmt3.js → useActionGroupTracking-CioHSqgG.js} +2 -2
  231. package/dist/{useCalendarGrid-0WvxbeFC.js → useCalendarGrid-BpBA8UZa.js} +1 -1
  232. package/dist/{useInputStatusIcon-2sRn-Nbf.js → useInputStatusIcon-D0xNp9jO.js} +1 -1
  233. package/dist/{usePressFeedback-Ber7MRiI.js → usePressFeedback-D4oohqP5.js} +1 -1
  234. package/dist/{useTouchHitArea-B6g7fhfF.js → useTouchHitArea-rwyNMxFb.js} +1 -1
  235. package/package.json +5 -1
  236. package/styles/date-input.css +36 -0
  237. package/styles/list.css +125 -69
  238. package/styles/markdown.css +17 -0
  239. package/dist/Item-DC1v56yE.js +0 -723
  240. package/dist/itemSlots-BxUu7hje.js +0 -54
  241. package/dist/{index-D8lv2BiD.d.ts → index-J6YRJ7Ul.d.ts} +1 -1
@@ -1,22 +1,29 @@
1
1
  import { r as AnimatedLayout } from "./useAnimatedLayout-C0koWm4a.js";
2
2
  import { n as Reorderable } from "./createReorderable-Bw3Q9mUd.js";
3
+ import { i as Swipe, n as ItemSwipeActionVariant, r as ItemSwipeBehavior } from "./swipeHost-B2OlVVZt.js";
3
4
  import { Component, MaybeRefOrGetter, VNodeChild } from "vue";
4
5
  //#region src/List/types.d.ts
5
6
  /** 滑动露出的一侧。`leading` 是往行内末尾拖,`trailing` 是往行内开头拖。 */
6
7
  type ItemSwipeSide = 'leading' | 'trailing';
7
- /** `reveal` 松手后停开;`commit` 越过阈值就滑出并触发最外侧,一侧只适合一个操作。 */
8
- type ItemSwipeBehavior = 'reveal' | 'commit';
9
- /** 横滑露出的一个操作。数组里越靠后越靠外。 */
8
+ /**
9
+ * 横滑露出的一个操作。数组里越靠后越靠外。
10
+ * @deprecated 改用 `SwipeAction`:它的 `id` 必填,`onActivate` 会收到操作的 `id` 和行的 `itemKey`。
11
+ */
10
12
  interface ItemSwipeAction {
11
13
  id?: string;
12
14
  label: string;
13
15
  icon?: Component;
14
- onActivate: () => void;
16
+ onActivate: () => void | Promise<void>;
15
17
  isDisabled?: boolean;
16
- variant?: 'neutral' | 'accent' | 'destructive';
17
- /** 触发后行停在滑出的位置,不再弹回。行本身不会被删掉。 */
18
+ /** @default 'accent' */
19
+ variant?: ItemSwipeActionVariant;
20
+ /**
21
+ * 触发后行停在滑出的位置,不再弹回。行本身不会被删掉。
22
+ * @default false
23
+ */
18
24
  hasRemoval?: boolean;
19
25
  }
26
+ /** @deprecated 改用 `CreateSwipeOptions`。 */
20
27
  interface ItemSwipeActions {
21
28
  leading?: ItemSwipeAction[];
22
29
  trailing?: ItemSwipeAction[];
@@ -224,12 +231,24 @@ interface ListItemProps {
224
231
  */
225
232
  itemKey?: string | number;
226
233
  /**
227
- * 触摸横滑露出的操作。鼠标不会开始这次拖动。
228
- * 每个操作还要在行自己的内容里能点到,否则键盘和鼠标够不着。
234
+ * 行的横滑操作,由一次 `createSwipe` 调用配好:横向拖动在每一侧露出的动词,声明成数据,
235
+ * 行据此画出面板。手指、笔或触控板的双指横滑把行拖到一边、露出这一侧的面板;鼠标拖动和鼠标
236
+ * 滚轮不会,偏竖直的拖动仍归滚动。手势只是触屏的快捷方式,永远不是行通往某个动词的唯一入口:
237
+ * 每个操作都要在行自己的内容里也能点到(菜单或 `endContent` 里的按钮),否则键盘和鼠标用户够不着。
238
+ * 开着的行在点它自己的内容(不激活任何东西)、按在别处、焦点在行外时列表或页面滚动、按 Escape 时合上。
239
+ *
240
+ * 只在 role 允许可交互后代的行上生效:`listitem` 或没有 role 的行;`option`、`menuitem*`、
241
+ * 作为内部控件放大点击区的行和禁用的行不生效。装着行的元素要在行内方向裁剪
242
+ * (`overflow-inline: clip`):`List` 已经这样做了,别的容器自己加一次。
243
+ */
244
+ swipe?: Swipe;
245
+ /**
246
+ * @deprecated 改传 `swipe`,写成 `createSwipe({ leading, trailing })`。仍可用,行为和 `swipe` 一致;
247
+ * 设置了 `swipe` 时忽略。
229
248
  */
230
249
  swipeActions?: ItemSwipeActions;
231
250
  /**
232
- * 松手之后怎么收场。
251
+ * @deprecated 改在 `createSwipe` 的选项里传 `swipeBehavior`。设置了 `swipe` 时忽略。
233
252
  * @default 'reveal'
234
253
  */
235
254
  swipeBehavior?: ItemSwipeBehavior;
@@ -282,4 +301,4 @@ interface ItemSlots extends ListItemSlots {
282
301
  marker?: () => VNodeChild;
283
302
  }
284
303
  //#endregion
285
- export { ListItemProps as _, ItemLayout as a, ListProps as b, ItemSwipeAction as c, ItemSwipeSide as d, ItemTarget as f, ListEdgeCompensation as g, ListEdge as h, ItemLabel as i, ItemSwipeActions as l, ListDensity as m, ItemDensity as n, ItemProps as o, ItemText as p, ItemElement as r, ItemSlots as s, ItemAlign as t, ItemSwipeBehavior as u, ListItemSlots as v, ListSlots as x, ListMarkerStyle as y };
304
+ export { ListItemSlots as _, ItemLayout as a, ListSlots as b, ItemSwipeAction as c, ItemTarget as d, ItemText as f, ListItemProps as g, ListEdgeCompensation as h, ItemLabel as i, ItemSwipeActions as l, ListEdge as m, ItemDensity as n, ItemProps as o, ListDensity as p, ItemElement as r, ItemSlots as s, ItemAlign as t, ItemSwipeSide as u, ListMarkerStyle as v, ListProps as y };
@@ -1,8 +1,8 @@
1
1
  import { n as msSinceInput } from "./inputAge-C-SoLwpD.js";
2
2
  import { n as isInsideScrollView } from "./scrollView-BGBtu5JP.js";
3
- import { i as createActionGroupTracker, o as resolveGroupTouch, r as GROUP_PRESS_POINTERS } from "./useTouchHitArea-B6g7fhfF.js";
3
+ import { i as createActionGroupTracker, o as resolveGroupTouch, r as GROUP_PRESS_POINTERS } from "./useTouchHitArea-rwyNMxFb.js";
4
4
  import { i as PRESS_SLOP_PX, n as PRESS_ONSET_MS } from "./pressGesture-CwmZDuSC.js";
5
- import { f as PRESS_GROUP_ITEM_ATTRIBUTE, p as isTrackedByGroup } from "./pressSlot-5Bp-B175.js";
5
+ import { f as PRESS_GROUP_ITEM_ATTRIBUTE, p as isTrackedByGroup } from "./pressSlot-31XyOhUS.js";
6
6
  import { getCurrentScope, onScopeDispose, toValue, watch } from "vue";
7
7
  //#region src/composables/internal/useActionGroupTracking.ts
8
8
  const DISABLED = ":disabled, [aria-disabled=\"true\"]";
@@ -176,4 +176,4 @@ function firstEnabledDay(month, isDisabled) {
176
176
  return null;
177
177
  }
178
178
  //#endregion
179
- export { monthOf as _, formatWeekdayDate as a, initialCalendarFocus as c, weekFieldName as d, weekStartIndex as f, isWithinMonths as g, isSameMonth as h, dateISO as i, sameCalendarDay as l, addMonthStarts as m, firstEnabledDay as n, fromCalendarDate as o, weekdayIndex as p, calendarDiffDays as r, inSpan as s, buildMonthWeeks as t, toCalendarDate as u, monthStartOf as v, toCalendarDay as y };
179
+ export { isWithinMonths as _, dateISO as a, toCalendarDay as b, inSpan as c, toCalendarDate as d, weekFieldName as f, isSameMonth as g, addMonthStarts as h, calendarISO as i, initialCalendarFocus as l, weekdayIndex as m, firstEnabledDay as n, formatWeekdayDate as o, weekStartIndex as p, calendarDiffDays as r, fromCalendarDate as s, buildMonthWeeks as t, sameCalendarDay as u, monthOf as v, monthStartOf as y };
@@ -1,5 +1,5 @@
1
1
  import { t as _sfc_main } from "./FieldIcon-C6A69-um.js";
2
- import { t as _sfc_main$1 } from "./FieldInfoTip-DqsdZxo0.js";
2
+ import { t as _sfc_main$1 } from "./FieldInfoTip-jhm02XZs.js";
3
3
  import { computed, toValue } from "vue";
4
4
  //#region src/composables/useInputStatusIcon.ts
5
5
  /**
@@ -3,7 +3,7 @@ import { n as isInsideScrollView } from "./scrollView-BGBtu5JP.js";
3
3
  import { a as subscribeInput } from "./inputStream-DmPkJ1aU.js";
4
4
  import { s as UIKIT_PRESS } from "./gestures-D_ih8YYG.js";
5
5
  import { a as idlePressGesture, o as pressGestureStep, r as PRESS_SCROLL_BRAKE_MS } from "./pressGesture-CwmZDuSC.js";
6
- import { a as finish, d as PRESS_CONTAINER_ATTRIBUTE, i as finger, l as PRESSABLE_ATTRIBUTE, m as pressSurfaceAt, n as apply, o as releaseIfDead, p as isTrackedByGroup, r as button, s as takeOver, u as PRESS_ACTION_ATTRIBUTE } from "./pressSlot-5Bp-B175.js";
6
+ import { a as finish, d as PRESS_CONTAINER_ATTRIBUTE, i as finger, l as PRESSABLE_ATTRIBUTE, m as pressSurfaceAt, n as apply, o as releaseIfDead, p as isTrackedByGroup, r as button, s as takeOver, u as PRESS_ACTION_ATTRIBUTE } from "./pressSlot-31XyOhUS.js";
7
7
  import { getCurrentInstance, getCurrentScope, onMounted, onScopeDispose } from "vue";
8
8
  import "../styles/pressable.css";
9
9
  //#region src/composables/internal/pressButton.ts
@@ -1,5 +1,5 @@
1
1
  import { t as armClickGuard } from "./clickGuard-BkegH2NW.js";
2
- import { c as pressFadeMs, f as PRESS_GROUP_ITEM_ATTRIBUTE, p as isTrackedByGroup, t as PRESSED_ATTRIBUTE } from "./pressSlot-5Bp-B175.js";
2
+ import { c as pressFadeMs, f as PRESS_GROUP_ITEM_ATTRIBUTE, p as isTrackedByGroup, t as PRESSED_ATTRIBUTE } from "./pressSlot-31XyOhUS.js";
3
3
  import { toValue, watch } from "vue";
4
4
  import "../styles/touch-hit-area.css";
5
5
  /** 不长:热区就是目标本身。 */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@astryx-vue/core",
3
3
  "type": "module",
4
- "version": "0.41.1",
4
+ "version": "0.42.0",
5
5
  "description": "Vue 3 components for the unofficial astryx-vue port of Astryx. Not affiliated with Meta.",
6
6
  "author": "ShenQingchuan",
7
7
  "license": "MIT",
@@ -212,6 +212,10 @@
212
212
  "types": "./dist/Stepper/index.d.ts",
213
213
  "import": "./dist/Stepper/index.js"
214
214
  },
215
+ "./Swipe": {
216
+ "types": "./dist/Swipe/index.d.ts",
217
+ "import": "./dist/Swipe/index.js"
218
+ },
215
219
  "./Table": {
216
220
  "types": "./dist/Table/index.d.ts",
217
221
  "import": "./dist/Table/index.js"
@@ -274,6 +274,42 @@
274
274
  cursor: default;
275
275
  }
276
276
 
277
+ .astryx-date-touch-months {
278
+ display: flex;
279
+ flex-direction: column;
280
+ min-width: 0;
281
+ }
282
+
283
+ /*
284
+ * 横向按月吸附的滚动区。每个吸附点都是整整一屏,所以每个月只有一个停靠位置。
285
+ * 不加 `scroll-snap-stop: always`:那样每次甩动最多翻一个月,「往后三个月」该是一甩,不是三下。
286
+ * `pan-x` 让浏览器只管横向平移,竖向的交给底部面板下拉收起。
287
+ */
288
+ .astryx-date-touch-scroller {
289
+ position: relative;
290
+ box-sizing: border-box;
291
+ overflow-x: auto;
292
+ overflow-y: hidden;
293
+ scroll-snap-type: x mandatory;
294
+ overscroll-behavior: contain;
295
+ scrollbar-width: none;
296
+ touch-action: pan-x;
297
+ }
298
+
299
+ .astryx-date-touch-scroller::-webkit-scrollbar {
300
+ display: none;
301
+ }
302
+
303
+ .astryx-date-touch-track {
304
+ display: grid;
305
+ }
306
+
307
+ .astryx-date-touch-pane {
308
+ grid-row: 1;
309
+ min-width: 0;
310
+ scroll-snap-align: start;
311
+ }
312
+
277
313
  .astryx-date-touch-wheels,
278
314
  .astryx-time-wheels {
279
315
  display: grid;
package/styles/list.css CHANGED
@@ -45,7 +45,7 @@
45
45
  grid-column: 1 / -1;
46
46
  }
47
47
 
48
- .astryx-list[data-list-style='decimal'] > .astryx-list-item:not(.astryx-item--swipe):has(> .astryx-item__marker-content) {
48
+ .astryx-list[data-list-style='decimal'] > .astryx-list-item:has(> .astryx-item__marker-content) {
49
49
  display: grid;
50
50
  grid-template-columns: subgrid;
51
51
  }
@@ -129,16 +129,10 @@
129
129
  /*
130
130
  * `bleed`: the row fills the list, so its text sits on the container's
131
131
  * padding line, never closer to the row's edge than its own inset. Square
132
- * corners make it meet the container's straight sides, like table rows. A
133
- * swiping row keeps this padding on its inner surface instead of the root,
134
- * which already carries the swipe panels.
132
+ * corners make it meet the container's straight sides, like table rows.
135
133
  */
136
134
  .astryx-list[data-edge='bleed'] > .astryx-list-item {
137
135
  border-radius: 0;
138
- }
139
-
140
- .astryx-list[data-edge='bleed'] > .astryx-list-item:not(.astryx-item--swipe),
141
- .astryx-list[data-edge='bleed'] > .astryx-list-item > .astryx-item__surface {
142
136
  padding-inline-start: max(var(--container-padding-inline-start, 0px), var(--astryx-item-inset-inline));
143
137
  padding-inline-end: max(var(--container-padding-inline-end, 0px), var(--astryx-item-inset-inline));
144
138
  }
@@ -250,8 +244,7 @@
250
244
  * 第一行中心;插槽比这一行高时把文字压下去。纯 CSS,不测量。
251
245
  * 生成内容用空替代文本,读屏器读不到任何东西。
252
246
  */
253
- .astryx-item[data-align='first-line'] > :is(.astryx-item__start, .astryx-item__end)::before,
254
- .astryx-item--swipe[data-align='first-line'] > .astryx-item__surface > :is(.astryx-item__start, .astryx-item__end)::before {
247
+ .astryx-item[data-align='first-line'] > :is(.astryx-item__start, .astryx-item__end)::before {
255
248
  content: "\200B";
256
249
  content: "\200B" / "";
257
250
  inline-size: 0;
@@ -370,7 +363,7 @@
370
363
  * 行只为自己的按钮或链接画环;委托模式下嵌套控件就是行的唯一 Tab 停点,照旧画在行上。
371
364
  * 起止插槽里的其他控件自己画环,同一次聚焦不会出现两个环。
372
365
  */
373
- .astryx-item:has(> .astryx-item__content:focus-visible, > .astryx-item__surface > .astryx-item__content:focus-visible),
366
+ .astryx-item:has(> .astryx-item__content:focus-visible),
374
367
  .astryx-item--delegate:has(:focus-visible) {
375
368
  outline: 2px solid var(--astryx-list-item-focus, light-dark(#0064e0, #2694fe));
376
369
  outline-offset: 3px;
@@ -451,106 +444,169 @@
451
444
  -webkit-line-clamp: var(--astryx-item-clamp-lines, 2);
452
445
  }
453
446
 
447
+ /*
448
+ * 横滑的行:根按手势每帧写在它上面的位移平移(见 Swipe/useSwipeAction.ts)。
449
+ * pan-y 让浏览器继续滚动列表;pinch-zoom 把在行上开始的双指缩放留给浏览器,页面仍可缩放。
450
+ */
454
451
  .astryx-item.astryx-item--swipe {
455
- position: relative;
456
- overflow: clip;
457
- padding: 0;
458
- /* pan-y 让浏览器继续滚动列表;pinch-zoom 把双指缩放留给浏览器,页面仍可缩放。 */
459
452
  touch-action: pan-y pinch-zoom;
460
- --_item-swipe-dir: 1;
461
- --_item-swipe-travel: 0;
462
- --_item-swipe-duration: 0s;
453
+ transform: translate3d(var(--_item-swipe-travel, 0px), 0, 0);
463
454
  }
464
455
 
465
- .astryx-item--swipe > .astryx-item__surface {
466
- position: relative;
467
- z-index: 1;
468
- display: flex;
469
- align-items: center;
470
- gap: var(--astryx-spacing-2, 8px);
471
- width: 100%;
472
- min-width: 0;
473
- padding-inline: var(--astryx-item-inset-inline);
474
- background: var(--astryx-color-background-surface, light-dark(#fff, #262626));
475
- transform: translateX(calc(var(--_item-swipe-travel) * var(--_item-swipe-dir) * 1px));
476
- transition: transform var(--_item-swipe-duration) var(--astryx-ease-standard, cubic-bezier(0.24, 1, 0.4, 1));
456
+ /*
457
+ * 一侧的窗口:行的静止盒子。它按位移反向平移,所以停在行静止的地方,并把轨道裁到那个盒子和圆角。
458
+ * 透明、不接点按:只有操作接触摸。
459
+ */
460
+ .astryx-item__swipe-window {
461
+ position: absolute;
462
+ inset: 0;
463
+ overflow: clip;
464
+ border-radius: inherit;
465
+ pointer-events: none;
466
+ transform: translate3d(calc(-1 * var(--_item-swipe-travel, 0px)), 0, 0);
477
467
  }
478
468
 
479
- .astryx-item--swipe[data-align='start'] > .astryx-item__surface {
480
- align-items: flex-start;
469
+ /*
470
+ * 轨道:静止时在窗口旁边,一个像素都不露。它跟着行走,所以窗口里露出的部分正好是行空出来的地方。
471
+ * 两倍行宽覆盖所有位移(含滑出)。操作从贴着行的那一边排成一行。::before 是盖满时的底色:
472
+ * 盖满面板的那个操作的颜色,只在它盖满时显示。
473
+ */
474
+ .astryx-item__swipe-track {
475
+ position: absolute;
476
+ inset-block: 0;
477
+ width: 200%;
478
+ overflow: clip;
479
+ border-radius: inherit;
480
+ display: flex;
481
+ isolation: isolate;
482
+ background-color: var(--astryx-color-background-surface, light-dark(#fff, #262626));
483
+ transform: translate3d(var(--_item-swipe-travel, 0px), 0, 0);
481
484
  }
482
485
 
483
- .astryx-item--swipe[data-align='first-line'] > .astryx-item__surface {
484
- align-items: baseline;
486
+ .astryx-item__swipe-track::before {
487
+ content: "";
488
+ position: absolute;
489
+ inset: 0;
490
+ z-index: -1;
491
+ opacity: 0;
492
+ pointer-events: none;
485
493
  }
486
494
 
487
- .astryx-item--swipe[data-density='compact'] > .astryx-item__surface {
488
- padding-block: var(--astryx-spacing-1, 4px);
495
+ .astryx-item__swipe-track[data-covered]::before {
496
+ opacity: 1;
489
497
  }
490
498
 
491
- .astryx-item--swipe[data-density='balanced'] > .astryx-item__surface {
492
- padding-block: var(--astryx-spacing-2, 8px);
499
+ .astryx-item__swipe-track[data-fill='neutral']::before {
500
+ background-color: var(--astryx-color-neutral, light-dark(rgb(0 0 0 / 0.06), rgb(255 255 255 / 0.1)));
493
501
  }
494
502
 
495
- .astryx-item--swipe[data-density='spacious'] > .astryx-item__surface {
496
- padding-block: var(--astryx-spacing-3, 12px);
503
+ .astryx-item__swipe-track[data-fill='accent']::before {
504
+ background-color: var(--astryx-color-accent, #25252a);
497
505
  }
498
506
 
499
- .astryx-item__swipe-panel {
500
- position: absolute;
501
- z-index: 0;
502
- inset-block: 0;
503
- display: flex;
507
+ .astryx-item__swipe-track[data-fill='destructive']::before {
508
+ background-color: var(--astryx-color-error, #a50c25);
504
509
  }
505
510
 
506
- .astryx-item__swipe-panel[data-side='leading'] {
507
- inset-inline-start: 0;
511
+ /* 最外侧操作在最后、贴着外缘。leading 一侧外缘是行内开头,所以从轨道的行内末尾反向排。 */
512
+ .astryx-item__swipe-track[data-side='leading'] {
513
+ inset-inline-end: 100%;
508
514
  flex-direction: row-reverse;
509
515
  }
510
516
 
511
- .astryx-item__swipe-panel[data-side='trailing'] {
512
- inset-inline-end: 0;
517
+ .astryx-item__swipe-track[data-side='trailing'] {
518
+ inset-inline-start: 100%;
513
519
  }
514
520
 
515
- .astryx-item__swipe-action {
516
- display: inline-flex;
521
+ /*
522
+ * 操作贴着轨道的位置:轨道走多少它就往回退多少,所以一直钉在外缘,直到行把它们全部露出(开宽),
523
+ * 之后跟着行走。
524
+ */
525
+ .astryx-item__swipe-entry {
526
+ --_item-swipe-entries-x: calc(var(--_item-swipe-pin, 0px) - var(--_item-swipe-sign, 1) * min(var(--_item-swipe-sign, 1) * var(--_item-swipe-travel, 0px), var(--_item-swipe-open, 0px)));
527
+ box-sizing: border-box;
528
+ display: flex;
529
+ flex-direction: column;
530
+ flex-shrink: 0;
517
531
  align-items: center;
518
532
  justify-content: center;
519
533
  gap: var(--astryx-spacing-1, 4px);
520
- min-width: 4.5rem;
521
- padding-inline: var(--astryx-spacing-2, 8px);
534
+ min-width: 72px;
535
+ height: 100%;
536
+ margin: 0;
537
+ padding-inline: var(--astryx-spacing-3, 12px);
522
538
  border: 0;
523
- background: var(--astryx-color-background-muted, #e5e5e5);
524
- color: var(--astryx-color-text-primary, #171717);
525
- font: inherit;
539
+ appearance: none;
526
540
  cursor: pointer;
541
+ font-family: var(--astryx-font-family-body, inherit);
542
+ font-size: var(--astryx-text-supporting-size, 0.8125rem);
543
+ font-weight: var(--astryx-font-weight-medium, 500);
544
+ line-height: var(--astryx-text-supporting-leading, 1.3846);
545
+ white-space: nowrap;
546
+ pointer-events: auto;
547
+ transform: translate3d(var(--_item-swipe-entries-x), 0, 0);
548
+ }
549
+
550
+ .astryx-item__swipe-entry:focus-visible {
551
+ outline: 2px solid var(--astryx-list-item-focus, light-dark(#0064e0, #2694fe));
552
+ outline-offset: -2px;
553
+ }
554
+
555
+ .astryx-item__swipe-entry[data-variant='neutral'] {
556
+ background-color: var(--astryx-color-neutral, light-dark(rgb(0 0 0 / 0.06), rgb(255 255 255 / 0.1)));
557
+ color: var(--astryx-color-text-primary, light-dark(#171717, #f5f5f5));
527
558
  }
528
559
 
529
- .astryx-item__swipe-action[data-variant='accent'] {
530
- background: var(--astryx-color-accent, #25252a);
560
+ .astryx-item__swipe-entry[data-variant='accent'] {
561
+ background-color: var(--astryx-color-accent, #25252a);
531
562
  color: var(--astryx-color-on-accent, #fff);
532
563
  }
533
564
 
534
- .astryx-item__swipe-action[data-variant='destructive'] {
535
- background: var(--astryx-color-error, #a50c25);
565
+ .astryx-item__swipe-entry[data-variant='destructive'] {
566
+ background-color: var(--astryx-color-error, #a50c25);
536
567
  color: var(--astryx-color-on-error, #fff);
537
568
  }
538
569
 
539
- .astryx-item__swipe-action[aria-disabled='true'] {
540
- opacity: 0.5;
570
+ /* 被别的操作盖住的操作立即隐藏、不淡出,颜色不会和盖住它的那个混在一起。 */
571
+ .astryx-item__swipe-entry--covered {
572
+ opacity: 0;
573
+ }
574
+
575
+ /* 半透明用滤镜做,操作自己的 opacity 留给盖满。 */
576
+ .astryx-item__swipe-entry[data-disabled] {
577
+ filter: opacity(0.5);
541
578
  cursor: default;
542
579
  }
543
580
 
544
- @media (prefers-reduced-motion: reduce) {
545
- .astryx-item,
546
- .astryx-item__surface {
547
- transition: none;
548
- }
581
+ /*
582
+ * 最外侧操作:它的颜色画在它旁边一直到行的外缘,填满行过了开宽后露出的地方,看起来像操作被拉长;
583
+ * 滑出时整行都是它的颜色。确认的全滑里它随操作的钉位滑到行边。
584
+ */
585
+ .astryx-item__swipe-entry--outer {
586
+ position: relative;
587
+ transform: translate3d(calc(var(--_item-swipe-entries-x) + var(--_item-swipe-slide, 0px) * var(--_item-swipe-confirm, 0)), 0, 0);
588
+ }
589
+
590
+ .astryx-item__swipe-entry--outer::after {
591
+ content: "";
592
+ position: absolute;
593
+ inset-block: 0;
594
+ width: 100vw;
595
+ background-color: inherit;
596
+ pointer-events: none;
597
+ }
598
+
599
+ .astryx-item__swipe-track[data-side='leading'] > .astryx-item__swipe-entry--outer::after {
600
+ inset-inline-end: 100%;
601
+ }
602
+
603
+ .astryx-item__swipe-track[data-side='trailing'] > .astryx-item__swipe-entry--outer::after {
604
+ inset-inline-start: 100%;
549
605
  }
550
606
 
551
- /* 强制配色会把危险操作的底色换成 ButtonFace,补一圈边让按钮的形状还看得见。 */
607
+ /* 强制配色会把危险操作的底色换成 Canvas,补一圈边让它的形状还看得见;用边框不用描边,焦点环不受影响。 */
552
608
  @media (forced-colors: active) {
553
- .astryx-item__swipe-action[data-variant='destructive'] {
609
+ .astryx-item__swipe-entry[data-variant='destructive'] {
554
610
  border: 1px solid CanvasText;
555
611
  }
556
612
  }
@@ -476,6 +476,23 @@
476
476
  text-align: end;
477
477
  }
478
478
 
479
+ /* 读向和表格相反的单元格:表格的终点在它自己的起点一侧,列线和显式对齐都按表格的方向摆。 */
480
+ .astryx-markdown__cell[data-against-table] {
481
+ border-inline-end: 0;
482
+ }
483
+
484
+ .astryx-markdown__cell[data-against-table]:not(:last-child) {
485
+ border-inline-start: var(--astryx-border-width, 1px) solid var(--astryx-color-border, #ebebeb);
486
+ }
487
+
488
+ .astryx-markdown__cell[data-against-table][data-align='right'] {
489
+ text-align: start;
490
+ }
491
+
492
+ .astryx-markdown__cell[data-against-table][data-align='left'] {
493
+ text-align: end;
494
+ }
495
+
479
496
  .astryx-markdown__image {
480
497
  display: block;
481
498
  max-width: 100%;