@astryx-vue/core 0.26.1 → 0.28.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 (178) hide show
  1. package/dist/AlertDialog/index.js +1 -1
  2. package/dist/{AlertDialog-CGGkPG4T.js → AlertDialog-B195FgtL.js} +2 -2
  3. package/dist/AppShell/index.js +1 -1
  4. package/dist/{AppShell-DGJgCvS6.js → AppShell-Da255Ktm.js} +3 -3
  5. package/dist/AvatarGroup/index.d.ts +1 -1
  6. package/dist/Banner/index.d.ts +1 -1
  7. package/dist/BottomSheet/index.d.ts +1 -1
  8. package/dist/Breadcrumbs/index.d.ts +2 -2
  9. package/dist/Breadcrumbs/index.js +2 -2
  10. package/dist/{Breadcrumbs-BZsjHn_5.js → Breadcrumbs-CmtcXM4e.js} +1 -1
  11. package/dist/Button/index.d.ts +1 -1
  12. package/dist/ButtonGroup/index.d.ts +1 -1
  13. package/dist/Calendar/index.d.ts +1 -1
  14. package/dist/Carousel/index.d.ts +1 -1
  15. package/dist/Center/index.d.ts +1 -1
  16. package/dist/Chat/index.d.ts +1 -1
  17. package/dist/Chat/index.js +1 -1
  18. package/dist/CheckboxInput/index.d.ts +1 -1
  19. package/dist/CheckboxList/index.d.ts +1 -1
  20. package/dist/CheckboxList/index.js +1 -1
  21. package/dist/{CheckboxList-CWHlG8Jq.js → CheckboxList-DGM-cgX5.js} +2 -2
  22. package/dist/ClickableCard/index.d.ts +1 -1
  23. package/dist/ClickableCard/index.js +1 -1
  24. package/dist/Collapsible/index.js +1 -1
  25. package/dist/{Collapsible-BSRdsb6w.js → Collapsible-B2vrr_YP.js} +2 -2
  26. package/dist/ComplexSelector/index.js +1 -1
  27. package/dist/{ComplexSelector-DI3J30Ho.js → ComplexSelector-Dq9esodQ.js} +1 -1
  28. package/dist/ContextMenu/index.d.ts +2 -2
  29. package/dist/ContextMenu/index.js +2 -2
  30. package/dist/{ContextMenu-CVf4OqJP.js → ContextMenu-DB4XcNKf.js} +1 -1
  31. package/dist/DateInput/index.d.ts +1 -1
  32. package/dist/DateInput/index.js +1 -1
  33. package/dist/{DateInput-DK-FI37x.js → DateInput-DNqm49AX.js} +1 -1
  34. package/dist/DateRangeInput/index.d.ts +1 -1
  35. package/dist/DateRangeInput/index.js +1 -1
  36. package/dist/{DateRangeInput-ClriBc4F.js → DateRangeInput-Bch513M0.js} +1 -1
  37. package/dist/DateTimeInput/index.d.ts +1 -1
  38. package/dist/DateTimeInput/index.js +1 -1
  39. package/dist/{DateTimeInput-BdXkBBYi.js → DateTimeInput-BCFgCeNy.js} +1 -1
  40. package/dist/Dialog/index.d.ts +1 -1
  41. package/dist/Divider/index.d.ts +1 -1
  42. package/dist/Drawer/index.d.ts +1 -1
  43. package/dist/DropdownMenu/index.d.ts +2 -2
  44. package/dist/DropdownMenu/index.js +3 -3
  45. package/dist/{DropdownMenu-CdwEvDld.js → DropdownMenu-D9swCben.js} +3 -3
  46. package/dist/{DropdownMenu-q5euMYv-.js → DropdownMenu-DlfMGzZ2.js} +3 -33
  47. package/dist/{DropdownMenuRadioItem.vue-DINRx71W.d.ts → DropdownMenuRadioItem.vue-C8rePTyz.d.ts} +1 -1
  48. package/dist/HoverCard/index.d.ts +1 -1
  49. package/dist/InfoTip/index.d.ts +1 -1
  50. package/dist/InternationalizationProvider/index.d.ts +1 -1
  51. package/dist/InternationalizationProvider/index.js +1 -1
  52. package/dist/{InternationalizationProvider-8qllKdVk.js → InternationalizationProvider-CEmlN48L.js} +1 -1
  53. package/dist/{Item-DUI1Qnnd.js → Item-C8UAQwFQ.js} +193 -111
  54. package/dist/Link/index.d.ts +1 -1
  55. package/dist/List/index.d.ts +2 -2
  56. package/dist/List/index.js +2 -2
  57. package/dist/{ListItem-C8SqSrU6.js → ListItem-BlrEngDO.js} +11 -3
  58. package/dist/MetadataList/index.d.ts +1 -1
  59. package/dist/MoreMenu/index.d.ts +1 -1
  60. package/dist/MoreMenu/index.js +1 -1
  61. package/dist/{MoreMenu-DAq29azZ.js → MoreMenu-GPcHAauX.js} +3 -1
  62. package/dist/MultiSelector/index.d.ts +1 -1
  63. package/dist/NavItem/index.d.ts +1 -1
  64. package/dist/NavItem/index.js +1 -1
  65. package/dist/NumberInput/index.d.ts +1 -1
  66. package/dist/Outline/index.js +1 -1
  67. package/dist/{Outline-DvQbXc_H.js → Outline-DI9MZnuQ.js} +106 -50
  68. package/dist/OverflowList/index.d.ts +1 -1
  69. package/dist/Pagination/index.d.ts +1 -1
  70. package/dist/Pagination/index.js +1 -1
  71. package/dist/{Pagination-CRrou1P-.js → Pagination-BNPBvFW1.js} +2 -2
  72. package/dist/Popover/index.d.ts +1 -1
  73. package/dist/Popover/index.js +1 -1
  74. package/dist/{Popover-sERt08TR.js → Popover-MJQZog5m.js} +2 -2
  75. package/dist/PowerSearch/index.d.ts +1 -1
  76. package/dist/PowerSearch/index.js +1 -1
  77. package/dist/{PowerSearch-CiVIW13b.js → PowerSearch-Bv-yUo6C.js} +10 -8
  78. package/dist/Radio/index.d.ts +1 -1
  79. package/dist/RadioList/index.d.ts +1 -1
  80. package/dist/ScrollableArea/index.d.ts +1 -1
  81. package/dist/SelectableCard/index.d.ts +1 -1
  82. package/dist/Selector/index.d.ts +1 -1
  83. package/dist/Selector/index.js +1 -1
  84. package/dist/SideNav/index.d.ts +1 -1
  85. package/dist/SideNav/index.js +2 -2
  86. package/dist/{SideNav-CHSwzwTt.js → SideNav-B_0Fv-ZU.js} +4 -4
  87. package/dist/Stack/index.d.ts +1 -1
  88. package/dist/Stepper/index.d.ts +1 -1
  89. package/dist/Switch/index.d.ts +1 -1
  90. package/dist/TabList/index.d.ts +1 -1
  91. package/dist/Table/index.d.ts +1 -1
  92. package/dist/Table/index.js +1 -1
  93. package/dist/{Table-DEqfIA3q.js → Table-B0Aj43zB.js} +9 -9
  94. package/dist/TextArea/index.d.ts +1 -1
  95. package/dist/TextInput/index.d.ts +1 -1
  96. package/dist/TimeInput/index.d.ts +1 -1
  97. package/dist/Timestamp/index.d.ts +1 -1
  98. package/dist/ToggleButton/index.d.ts +1 -1
  99. package/dist/Token/index.d.ts +1 -1
  100. package/dist/Tokenizer/index.d.ts +2 -2
  101. package/dist/Tokenizer/index.js +1 -1
  102. package/dist/Tokenizer-iJb-WZ55.js +2067 -0
  103. package/dist/Toolbar/index.d.ts +1 -1
  104. package/dist/Tooltip/index.d.ts +1 -1
  105. package/dist/TopNav/index.d.ts +1 -1
  106. package/dist/TopNav/index.js +1 -1
  107. package/dist/{TopNav-Ce79A3zT.js → TopNav-ctvKlpxf.js} +1 -1
  108. package/dist/TreeList/index.d.ts +1 -1
  109. package/dist/TreeList/index.js +1 -1
  110. package/dist/{TreeList-BEPHdVYu.js → TreeList-Dh0uAj2B.js} +48 -7
  111. package/dist/Typeahead/index.d.ts +1 -1
  112. package/dist/Typeahead/index.js +2 -2
  113. package/dist/{Typeahead-CBrUdbHv.js → Typeahead-D2O3n477.js} +1 -1
  114. package/dist/{animator-BooLoGyI.js → animator-BGq5a6vT.js} +4 -300
  115. package/dist/{batch-CM-vJhQg.js → batch-BhaAWUIt.js} +3 -2
  116. package/dist/{bezier-Cts7gENO.js → bezier-Df-yGuNZ.js} +1 -90
  117. package/dist/composables/index.js +2 -1
  118. package/dist/{composables-BtqijTIO.js → composables-BTRbNgmR.js} +4 -41
  119. package/dist/{context-DH8E-qjm.js → context-jtpQfR6F.js} +1 -1
  120. package/dist/{edge-BYXwSggM.js → edge-CJIswPTX.js} +1 -1
  121. package/dist/{edgeRide-B5mlN2Q4.js → edgeRide-Drk4V-MC.js} +2 -2
  122. package/dist/{index-ZbNwGVkS.d.ts → index-BKnyTWPM.d.ts} +1 -1
  123. package/dist/{index-DeZ11MNP.d.ts → index-BLsYMZgA.d.ts} +4 -4
  124. package/dist/{index-D7ShT2c-.d.ts → index-BgT6mH3U.d.ts} +1 -1
  125. package/dist/{index-BD-Pxni9.d.ts → index-BhxqUt3y.d.ts} +1 -1
  126. package/dist/{index-LqFjvL4C.d.ts → index-Bu4R0WZA.d.ts} +21 -5
  127. package/dist/{index-B5aHF0Ml.d.ts → index-C0nKJSA2.d.ts} +1 -1
  128. package/dist/{index-DlKz3dB1.d.ts → index-C6IcBhAn.d.ts} +2 -2
  129. package/dist/{index-Cm36VS1A.d.ts → index-C9uW39Mj.d.ts} +1 -1
  130. package/dist/{index-CnOH43-f.d.ts → index-CBH9Gyte.d.ts} +1 -1
  131. package/dist/{index-CRtGmCHi.d.ts → index-CEtFUoIm.d.ts} +1 -1
  132. package/dist/{index-C4S65SAW.d.ts → index-CKnr0JlT.d.ts} +1 -1
  133. package/dist/{index-BdhQpERn.d.ts → index-CMZnO7VU.d.ts} +4 -4
  134. package/dist/{index-DY1kpap1.d.ts → index-CkzTX9pb.d.ts} +42 -42
  135. package/dist/{index-DSMv6W8s.d.ts → index-Ct6SEtjd.d.ts} +4 -4
  136. package/dist/{index-C8wfe0Mr.d.ts → index-D05JGsT3.d.ts} +1 -1
  137. package/dist/{index-FeZXsFO-.d.ts → index-DDrL_-hJ.d.ts} +1 -1
  138. package/dist/{index-DDVCVpnG.d.ts → index-DE-QPNz0.d.ts} +1 -1
  139. package/dist/{index-BxWCX2pJ.d.ts → index-DFLPv9io.d.ts} +3 -3
  140. package/dist/{index-CB6VQETg.d.ts → index-DIw5D3zj.d.ts} +2 -2
  141. package/dist/{index-eCp-ElSp.d.ts → index-DYabo8TI.d.ts} +1 -1
  142. package/dist/{index-Otl047R1.d.ts → index-DofC9Rll.d.ts} +1 -1
  143. package/dist/{index-C2zWUiJ1.d.ts → index-DogWVRJi.d.ts} +1 -1
  144. package/dist/{index-aHC2C89h.d.ts → index-Ea2V_FSK.d.ts} +4 -4
  145. package/dist/{index-DPklTi3o.d.ts → index-Q1oG9yIT.d.ts} +1 -1
  146. package/dist/{index-NOXYEdOI.d.ts → index-utZGF4GR.d.ts} +1 -1
  147. package/dist/index.d.ts +30 -30
  148. package/dist/index.js +39 -37
  149. package/dist/{landing-B9Uvex6x.js → landing-CBaXCGEg.js} +2 -2
  150. package/dist/{loadCatalog-BRd5XCbW.js → loadCatalog-Blm5sm1o.js} +36 -8
  151. package/dist/{loadCatalog-CLm4V7mm.d.ts → loadCatalog-DDLjLKYA.d.ts} +21 -0
  152. package/dist/locale/index.d.ts +2 -2
  153. package/dist/locale/index.js +3 -3
  154. package/dist/{locale-BkAezFog.js → locale-Y7dHbjs4.js} +1 -1
  155. package/dist/resolveMotion-CurhYTVC.js +307 -0
  156. package/dist/{themeTiming-CWEvdh31.js → themeTiming-BFDOPRjK.js} +1 -1
  157. package/dist/timing-CSHWQbTJ.js +90 -0
  158. package/dist/tokenizer-C1y-55Ft.js +72 -0
  159. package/dist/{types-Gw2OjSK9.d.ts → types-ClOMFbqC.d.ts} +2 -2
  160. package/dist/useAnimatedLayout-DC2l3WrE.js +40 -0
  161. package/dist/{useMenuDrillIn-CP0P49ej.js → useMenuDrillIn-BQx6lQMz.js} +1 -1
  162. package/dist/useMenuEntranceHold-buV5S9yk.js +33 -0
  163. package/dist/{useTypeaheadMenuConfig-DeDGVR8S.js → useTypeaheadMenuConfig-Do0jOyEm.js} +35 -35
  164. package/package.json +1 -1
  165. package/styles/list.css +102 -5
  166. package/styles/metadata-list.css +6 -1
  167. package/styles/more-menu.css +42 -35
  168. package/styles/outline.css +2 -1
  169. package/styles/sheet-confirmation.css +8 -0
  170. package/styles/tokenizer-sheet.css +203 -0
  171. package/styles.css +2 -0
  172. package/dist/Tokenizer-2zj57yDt.js +0 -888
  173. package/dist/tokenizer-ChiAuPN-.js +0 -34
  174. package/dist/{Chat-RE_6Ez79.js → Chat-Bg1IuDMt.js} +1 -1
  175. package/dist/{ClickableCard-CwGxO0GU.js → ClickableCard-ChmOwgYq.js} +1 -1
  176. package/dist/{NavItem-c1ScHEJY.js → NavItem-kj9FbbFS.js} +1 -1
  177. package/dist/{Selector-Bj4q6aT5.js → Selector-BrNA4sLV.js} +1 -1
  178. package/dist/{index-J6YRJ7Ul.d.ts → index-CHx33xGa.d.ts} +1 -1
package/styles/list.css CHANGED
@@ -20,11 +20,49 @@
20
20
  margin: 0;
21
21
  padding-inline-start: 0;
22
22
  overflow-inline: clip;
23
+ /* 行的热区只在列表里抬高,不会盖过页面上吸顶的头部。 */
24
+ isolation: isolate;
23
25
  list-style-type: none;
24
26
  }
25
27
 
26
28
  .astryx-list[data-dividers='true'] {
27
- gap: 0;
29
+ row-gap: 0;
30
+ }
31
+
32
+ /*
33
+ * 有序列表的行共用一列标记:列表是两列的网格(标记按内容宽度,其余占满),
34
+ * 每行用子网格接上这两列,数字位数变了,别的行的文字和嵌套列表也不动。
35
+ * 不支持子网格时保持弹性布局。
36
+ */
37
+ @supports (grid-template-columns: subgrid) {
38
+ .astryx-list[data-list-style='decimal'] {
39
+ display: grid;
40
+ grid-template-columns: max-content minmax(0, 1fr);
41
+ column-gap: var(--astryx-spacing-2, 8px);
42
+ }
43
+
44
+ .astryx-list[data-list-style='decimal'] > .astryx-list-item {
45
+ grid-column: 1 / -1;
46
+ }
47
+
48
+ .astryx-list[data-list-style='decimal'] > .astryx-list-item:not(.astryx-item--swipe):has(> .astryx-item__marker-content) {
49
+ display: grid;
50
+ grid-template-columns: subgrid;
51
+ }
52
+ }
53
+
54
+ /* 标记之外的内容在同一格里,仍沿用行的对齐和间距。 */
55
+ .astryx-item__marker-content {
56
+ display: flex;
57
+ flex: 1;
58
+ align-items: inherit;
59
+ align-self: stretch;
60
+ gap: inherit;
61
+ min-width: 0;
62
+ }
63
+
64
+ .astryx-item[data-align='first-line'] > .astryx-item__marker-content {
65
+ align-self: baseline;
28
66
  }
29
67
 
30
68
  .astryx-list:not([data-list-style='none']) {
@@ -92,6 +130,36 @@
92
130
  padding-inline-end: max(var(--container-padding-inline-end, 0px), var(--astryx-item-inset-inline));
93
131
  }
94
132
 
133
+ /*
134
+ * 粗指针下,可点的行朝相邻行留出的空隙长出热区。后面的行是没有 z-index 的定位元素,
135
+ * 会盖住前面行的热区,所以热区抬高一层。有分隔线时热区从分隔线外缘起算(最后一行没有分隔线)。
136
+ */
137
+ @media (pointer: coarse) {
138
+ .astryx-list > .astryx-list-item.astryx-touch-hit-area-band::after {
139
+ z-index: 1;
140
+ }
141
+
142
+ .astryx-list[data-dividers='true'] > .astryx-list-item.astryx-touch-hit-area-band:not(:last-child)::after {
143
+ margin-block-end: calc(var(--astryx-border-width, 1px) * -1);
144
+ }
145
+ }
146
+
147
+ /*
148
+ * 圆角卡片、对话框里,作为它第一个或最后一个子元素的 `bleed` 列表:首行、末行取容器
149
+ * 发布的圆角,减去自己保留的块方向内边距(行的底色和焦点环不被容器的弧线裁掉)。
150
+ * 有标题时列表的根是容器的子元素,头部在首行上面,所以只有末行取角。其余的角保持直角。
151
+ */
152
+ :is(.astryx-card, .astryx-dialog__inner) > .astryx-list[data-edge='bleed']:first-child > .astryx-list-item:first-child {
153
+ border-start-start-radius: max(0px, var(--_container-corner-block-start, 0px) - var(--container-padding-block-start, 0px));
154
+ border-start-end-radius: max(0px, var(--_container-corner-block-start, 0px) - var(--container-padding-block-start, 0px));
155
+ }
156
+
157
+ :is(.astryx-card, .astryx-dialog__inner) > .astryx-list[data-edge='bleed']:last-child > .astryx-list-item:last-child,
158
+ :is(.astryx-card, .astryx-dialog__inner) > .astryx-list-root:last-child > .astryx-list[data-edge='bleed'] > .astryx-list-item:last-child {
159
+ border-end-start-radius: max(0px, var(--_container-corner-block-end, 0px) - var(--container-padding-block-end, 0px));
160
+ border-end-end-radius: max(0px, var(--_container-corner-block-end, 0px) - var(--container-padding-block-end, 0px));
161
+ }
162
+
95
163
  .astryx-list-marker {
96
164
  box-sizing: border-box;
97
165
  display: flex;
@@ -123,15 +191,21 @@
123
191
  .astryx-list-marker__number {
124
192
  flex-shrink: 0;
125
193
  align-self: baseline;
126
- width: var(--astryx-spacing-4, 16px);
194
+ /* 数字右对齐、等宽,每个句点都在一条线上;比这一列更宽的数字先挂进行的内边距,再撑宽整列。 */
195
+ min-width: var(--astryx-spacing-4, 16px);
127
196
  color: var(--astryx-list-marker-foreground, light-dark(#171717, #fafafa));
128
197
  font-size: var(--astryx-text-body-size, 0.875rem);
198
+ font-variant-numeric: tabular-nums;
129
199
  line-height: var(--astryx-text-body-leading, 1.4286);
130
200
  display: flex;
131
201
  justify-content: flex-end;
132
202
  white-space: nowrap;
133
203
  }
134
204
 
205
+ .astryx-list-marker__number::before {
206
+ margin-inline-start: calc(-1 * var(--astryx-item-inset-inline, 8px));
207
+ }
208
+
135
209
  .astryx-list-marker__number[data-style='decimal']::before {
136
210
  content: counter(astryx-list) '.';
137
211
  }
@@ -221,10 +295,32 @@
221
295
  }
222
296
  }
223
297
 
224
- .astryx-item[data-astryx-press]:not([data-disabled='true']):not([data-selected='true']) {
298
+ .astryx-item[data-astryx-press]:not([data-disabled='true']) {
225
299
  background-image: var(--_press-paint-image);
226
300
  }
227
301
 
302
+ /*
303
+ * 选中行保留自己的底色,悬停和按下的色调作为图片层叠在上面。
304
+ * 高亮行的底色本来就是悬停色,只表现按下。
305
+ */
306
+ @media (hover: hover) {
307
+ .astryx-item[data-interactive='true'][data-selected='true']:not([data-disabled='true']):hover {
308
+ background-image: linear-gradient(
309
+ var(--astryx-list-item-hover-background, light-dark(#0536590c, #ffffff0c)),
310
+ var(--astryx-list-item-hover-background, light-dark(#0536590c, #ffffff0c))
311
+ );
312
+ }
313
+ }
314
+
315
+ @media not all and (pointer: coarse) {
316
+ .astryx-item[data-interactive='true'][data-selected='true']:not([data-disabled='true']):active {
317
+ background-image: linear-gradient(
318
+ var(--astryx-list-item-pressed-background, light-dark(#05365919, #ffffff19)),
319
+ var(--astryx-list-item-pressed-background, light-dark(#05365919, #ffffff19))
320
+ );
321
+ }
322
+ }
323
+
228
324
  /*
229
325
  * 行只为自己的按钮或链接画环;委托模式下嵌套控件就是行的唯一 Tab 停点,照旧画在行上。
230
326
  * 起止插槽里的其他控件自己画环,同一次聚焦不会出现两个环。
@@ -314,7 +410,8 @@
314
410
  position: relative;
315
411
  overflow: clip;
316
412
  padding: 0;
317
- touch-action: pan-y;
413
+ /* pan-y 让浏览器继续滚动列表;pinch-zoom 把双指缩放留给浏览器,页面仍可缩放。 */
414
+ touch-action: pan-y pinch-zoom;
318
415
  --_item-swipe-dir: 1;
319
416
  --_item-swipe-travel: 0;
320
417
  --_item-swipe-duration: 0s;
@@ -394,7 +491,7 @@
394
491
  color: var(--astryx-color-on-error, #fff);
395
492
  }
396
493
 
397
- .astryx-item__swipe-action:disabled {
494
+ .astryx-item__swipe-action[aria-disabled='true'] {
398
495
  opacity: 0.5;
399
496
  cursor: default;
400
497
  }
@@ -77,11 +77,16 @@
77
77
  font-size: var(--astryx-text-body-size, 1rem);
78
78
  line-height: var(--astryx-text-body-leading, 1.5);
79
79
  overflow-wrap: break-word;
80
- word-break: break-word;
81
80
  }
82
81
 
82
+ /*
83
+ * 标签的单词比一列还长时在列内折断。值只在单词比一行还长时才折断:
84
+ * 用 overflow-wrap 而不是 word-break,值的最窄宽度仍是最长的单词,
85
+ * 一行里并排的金额和说明不会被挤到一个字符一行。
86
+ */
83
87
  .astryx-metadata-list__label,
84
88
  .astryx-metadata-list__item-label {
89
+ word-break: break-word;
85
90
  display: flex;
86
91
  align-items: center;
87
92
  gap: var(--astryx-spacing-2, 8px);
@@ -227,52 +227,45 @@
227
227
  transform: scaleX(-1);
228
228
  }
229
229
 
230
- .astryx-more-menu-enter-active,
230
+ /*
231
+ * The anchored layer entrance (layer.css), as on DropdownMenu: the panel
232
+ * slides in from the side the positioning runtime writes, and scales about the
233
+ * point where it meets its trigger. It is a CSS animation, so it is running
234
+ * the moment the panel shows, and the entrance hold can wait for it.
235
+ */
236
+ .astryx-more-menu__layer[data-placement] {
237
+ animation-name: astryx-layer-enter;
238
+ animation-duration: var(--astryx-duration-fast-max, 165ms);
239
+ animation-fill-mode: backwards;
240
+ animation-timing-function: var(--astryx-ease-standard, cubic-bezier(0.24, 1, 0.4, 1));
241
+ transform-origin: var(--_astryx-layer-enter-origin, 50% 50%);
242
+ }
243
+
244
+ /* The inline preview has no trigger to grow from: it fades in where it sits. */
245
+ .astryx-more-menu__layer--inline.astryx-more-menu-enter-active,
231
246
  .astryx-more-menu-leave-active {
232
247
  transition:
233
248
  opacity var(--astryx-duration-fast-max, 165ms) var(--astryx-ease-standard, cubic-bezier(0.24, 1, 0.4, 1)),
234
249
  transform var(--astryx-duration-fast-max, 165ms) var(--astryx-ease-standard, cubic-bezier(0.24, 1, 0.4, 1));
235
250
  }
236
251
 
237
- .astryx-more-menu__layer[data-placement='below'] {
238
- transform-origin: top;
239
- }
240
-
241
- .astryx-more-menu__layer[data-placement='above'] {
242
- transform-origin: bottom;
243
- }
244
-
245
- .astryx-more-menu__layer[data-placement='start'] {
246
- transform-origin: left;
247
- }
248
-
249
- .astryx-more-menu__layer[data-placement='end'] {
250
- transform-origin: right;
251
- }
252
-
253
- .astryx-more-menu-enter-from,
252
+ .astryx-more-menu__layer--inline.astryx-more-menu-enter-from,
254
253
  .astryx-more-menu-leave-to {
255
254
  opacity: 0;
256
255
  }
257
256
 
258
- .astryx-more-menu__layer[data-placement='below'].astryx-more-menu-enter-from,
259
- .astryx-more-menu__layer[data-placement='below'].astryx-more-menu-leave-to {
260
- transform: translateY(calc(-1 * var(--astryx-spacing-2, 8px))) scale(0.95);
261
- }
262
-
263
- .astryx-more-menu__layer[data-placement='above'].astryx-more-menu-enter-from,
264
- .astryx-more-menu__layer[data-placement='above'].astryx-more-menu-leave-to {
265
- transform: translateY(var(--astryx-spacing-2, 8px)) scale(0.95);
266
- }
267
-
268
- .astryx-more-menu__layer[data-placement='start'].astryx-more-menu-enter-from,
269
- .astryx-more-menu__layer[data-placement='start'].astryx-more-menu-leave-to {
270
- transform: translateX(var(--astryx-spacing-2, 8px)) scale(0.95);
257
+ /* The leave runs back toward the trigger and keeps its last frame until Vue takes the panel away. */
258
+ .astryx-more-menu-leave-active {
259
+ animation: none;
271
260
  }
272
261
 
273
- .astryx-more-menu__layer[data-placement='end'].astryx-more-menu-enter-from,
274
- .astryx-more-menu__layer[data-placement='end'].astryx-more-menu-leave-to {
275
- transform: translateX(calc(-1 * var(--astryx-spacing-2, 8px))) scale(0.95);
262
+ .astryx-more-menu__layer[data-placement].astryx-more-menu-leave-to {
263
+ transform:
264
+ translate(
265
+ calc(var(--_astryx-layer-enter-x, var(--_astryx-layer-enter-from-x, 0)) * min(var(--astryx-spacing-2, 8px), var(--_astryx-layer-enter-gap, var(--astryx-spacing-2, 8px)))),
266
+ calc(var(--_astryx-layer-enter-y, var(--_astryx-layer-enter-from-y, -1)) * min(var(--astryx-spacing-2, 8px), var(--_astryx-layer-enter-gap, var(--astryx-spacing-2, 8px))))
267
+ )
268
+ scale(0.95);
276
269
  }
277
270
 
278
271
  /* The sheet presentation: a modal surface the thumb can reach. */
@@ -379,7 +372,7 @@
379
372
  }
380
373
 
381
374
  @media (prefers-reduced-motion: reduce) {
382
- .astryx-more-menu-enter-active,
375
+ .astryx-more-menu__layer--inline.astryx-more-menu-enter-active,
383
376
  .astryx-more-menu-leave-active,
384
377
  .astryx-more-menu-sheet-enter-active,
385
378
  .astryx-more-menu-sheet-leave-active,
@@ -388,4 +381,18 @@
388
381
  transition: none;
389
382
  }
390
383
  }
384
+
385
+ @media (prefers-reduced-motion: reduce) and (not (pointer: coarse)) {
386
+ .astryx-more-menu__layer[data-placement] {
387
+ animation: none;
388
+ }
389
+ }
390
+
391
+ @media (prefers-reduced-motion: reduce) and (pointer: coarse) {
392
+ .astryx-more-menu__layer[data-placement] {
393
+ animation-name: astryx-layer-fade-in;
394
+ animation-duration: var(--_astryx-reduced-motion-fade-duration, 200ms);
395
+ animation-timing-function: var(--_astryx-reduced-motion-fade-easing, cubic-bezier(0.42, 0, 0.58, 1));
396
+ }
397
+ }
391
398
  }
@@ -117,7 +117,8 @@
117
117
  }
118
118
 
119
119
  @media (prefers-reduced-motion: reduce) {
120
- .astryx-outline__indicator {
120
+ .astryx-outline__indicator,
121
+ .astryx-outline__link {
121
122
  transition: none;
122
123
  }
123
124
  }
@@ -0,0 +1,8 @@
1
+ @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
2
+
3
+ @layer astryx.components {
4
+ /* 盖在底部弹层上的确认框:两个大号按钮占满整行。 */
5
+ .astryx-sheet-confirmation__action {
6
+ width: 100%;
7
+ }
8
+ }
@@ -0,0 +1,203 @@
1
+ @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
2
+
3
+ @layer astryx.components {
4
+ /*
5
+ * 底部弹层呈现里的字段:沿用行内字段的框。按钮里不能放控件,所以触发器、标签、
6
+ * 末尾内容是兄弟元素;没有可输入的地方,光标表示「按」。
7
+ */
8
+ .astryx-tokenizer-control.astryx-tokenizer-sheet-field {
9
+ cursor: pointer;
10
+ }
11
+
12
+ .astryx-tokenizer-control.astryx-tokenizer-sheet-field.is-disabled {
13
+ cursor: default;
14
+ }
15
+
16
+ /* 框负责聚焦描边,触发器自己不画。有标签时它铺满整个框,点标签或空白处都打开弹层。 */
17
+ .astryx-tokenizer-sheet-trigger {
18
+ appearance: none;
19
+ flex-grow: 1;
20
+ align-self: stretch;
21
+ display: flex;
22
+ align-items: center;
23
+ min-width: 0;
24
+ margin: 0;
25
+ padding: 0;
26
+ border: 0;
27
+ background: transparent;
28
+ color: inherit;
29
+ font: inherit;
30
+ text-align: start;
31
+ cursor: inherit;
32
+ outline: none;
33
+ }
34
+
35
+ .astryx-tokenizer-sheet-trigger.has-tokens {
36
+ position: absolute;
37
+ inset: 0;
38
+ }
39
+
40
+ .astryx-tokenizer-sheet-trigger__placeholder {
41
+ padding-inline: var(--astryx-spacing-1, 4px);
42
+ color: var(--astryx-color-text-secondary, #525252);
43
+ }
44
+
45
+ /* 标签只是展示,点击穿到下面的触发器;自定义标签里的控件仍能点。 */
46
+ .astryx-tokenizer-sheet-field .astryx-tokenizer-token {
47
+ pointer-events: none;
48
+ }
49
+
50
+ .astryx-tokenizer-sheet-field .astryx-tokenizer-token :is(button, a, input, [tabindex]) {
51
+ position: relative;
52
+ pointer-events: auto;
53
+ }
54
+
55
+ .astryx-tokenizer-sheet-field__end {
56
+ position: relative;
57
+ display: inline-flex;
58
+ flex: none;
59
+ align-items: center;
60
+ gap: var(--astryx-spacing-1, 4px);
61
+ margin-inline-start: auto;
62
+ }
63
+
64
+ .astryx-tokenizer-sheet-field__status {
65
+ display: inline-flex;
66
+ color: var(--astryx-input-status-color, var(--astryx-color-text-secondary, #525252));
67
+ }
68
+
69
+ .astryx-tokenizer-sheet-field__status:empty {
70
+ display: none;
71
+ }
72
+
73
+ /* 弹层内容自己撑满高度并自己管滚动,底栏贴着底部;和抓手下的留白合起来,第一行离顶边 32px。 */
74
+ .astryx-tokenizer-sheet {
75
+ display: flex;
76
+ flex-direction: column;
77
+ height: 100%;
78
+ min-height: 0;
79
+ padding-inline: var(--astryx-spacing-3, 12px);
80
+ padding-block: var(--astryx-spacing-2, 8px) var(--astryx-spacing-3, 12px);
81
+ }
82
+
83
+ .astryx-tokenizer-sheet__search {
84
+ display: flex;
85
+ padding-block-end: var(--astryx-spacing-2, 8px);
86
+ }
87
+
88
+ .astryx-tokenizer-sheet__search > * {
89
+ flex: 1 1 0;
90
+ min-width: 0;
91
+ }
92
+
93
+ .astryx-tokenizer-sheet__list {
94
+ display: flex;
95
+ flex-direction: column;
96
+ flex-grow: 1;
97
+ min-height: 0;
98
+ overflow-y: auto;
99
+ }
100
+
101
+ .astryx-tokenizer-sheet__rows {
102
+ display: flex;
103
+ flex-direction: column;
104
+ }
105
+
106
+ .astryx-tokenizer-sheet__row-item {
107
+ display: contents;
108
+ }
109
+
110
+ /* 一行既是一个复选框,也是整块可点的区域。 */
111
+ .astryx-tokenizer-sheet__row {
112
+ display: flex;
113
+ align-items: center;
114
+ justify-content: space-between;
115
+ gap: var(--astryx-spacing-2, 8px);
116
+ width: 100%;
117
+ min-height: 44px;
118
+ padding-block: var(--astryx-spacing-2, 8px);
119
+ padding-inline: var(--astryx-spacing-1, 4px);
120
+ border: 0;
121
+ border-radius: var(--astryx-radius-element, 0.625rem);
122
+ background-color: transparent;
123
+ color: var(--astryx-color-text-primary, light-dark(#171717, #fafafa));
124
+ font-family: inherit;
125
+ text-align: start;
126
+ cursor: pointer;
127
+ }
128
+
129
+ .astryx-tokenizer-sheet__row[aria-disabled='true'] {
130
+ cursor: default;
131
+ }
132
+
133
+ .astryx-tokenizer-sheet__row[aria-disabled='true'] .astryx-tokenizer-sheet__row-label {
134
+ color: var(--astryx-color-text-disabled, var(--astryx-color-text-secondary, #525252));
135
+ }
136
+
137
+ @media (hover: hover) {
138
+ .astryx-tokenizer-sheet__row:hover:not([aria-disabled='true']) {
139
+ background-color: var(--astryx-color-overlay-hover, light-dark(#0000000a, #ffffff12));
140
+ }
141
+ }
142
+
143
+ .astryx-tokenizer-sheet__row:focus-visible {
144
+ outline: var(--astryx-focus-outline-width, 2px) var(--astryx-focus-outline-style, solid) var(--astryx-focus-outline-color, currentcolor);
145
+ outline-offset: calc(-1 * var(--astryx-focus-outline-width, 2px));
146
+ }
147
+
148
+ .astryx-tokenizer-sheet__row-label,
149
+ .astryx-tokenizer-sheet__create-label {
150
+ flex-grow: 1;
151
+ min-width: 0;
152
+ }
153
+
154
+ .astryx-tokenizer-sheet__create-row {
155
+ display: flex;
156
+ align-items: center;
157
+ gap: var(--astryx-spacing-2, 8px);
158
+ width: 100%;
159
+ min-height: 44px;
160
+ padding-block: var(--astryx-spacing-2, 8px);
161
+ padding-inline: var(--astryx-spacing-1, 4px);
162
+ }
163
+
164
+ .astryx-tokenizer-sheet__pending {
165
+ display: flex;
166
+ align-items: center;
167
+ justify-content: center;
168
+ min-height: 44px;
169
+ padding-block: var(--astryx-spacing-2, 8px);
170
+ }
171
+
172
+ .astryx-tokenizer-sheet__empty {
173
+ display: flex;
174
+ flex-direction: column;
175
+ flex-grow: 1;
176
+ justify-content: center;
177
+ }
178
+
179
+ /* 底栏在每种状态下都钉在底部,两个按钮等宽。 */
180
+ .astryx-tokenizer-sheet__footer {
181
+ display: flex;
182
+ align-items: center;
183
+ gap: var(--astryx-spacing-2, 8px);
184
+ margin-top: auto;
185
+ padding-block-start: var(--astryx-spacing-3, 12px);
186
+ }
187
+
188
+ .astryx-tokenizer-sheet__footer-action {
189
+ flex: 1 1 0;
190
+ min-width: 0;
191
+ }
192
+
193
+ @media (forced-colors: active) {
194
+ .astryx-tokenizer-sheet-field.is-disabled,
195
+ .astryx-tokenizer-sheet-field.is-disabled .astryx-tokenizer-sheet-trigger__placeholder,
196
+ .astryx-tokenizer-sheet-field.is-disabled .astryx-token,
197
+ .astryx-tokenizer-sheet__row[aria-disabled='true'],
198
+ .astryx-tokenizer-sheet__row[aria-disabled='true'] .astryx-text {
199
+ border-color: GrayText;
200
+ color: GrayText;
201
+ }
202
+ }
203
+ }
package/styles.css CHANGED
@@ -74,6 +74,7 @@
74
74
  @import './styles/scrollable-area.css';
75
75
  @import './styles/section.css';
76
76
  @import './styles/segmented-control.css';
77
+ @import './styles/sheet-confirmation.css';
77
78
  @import './styles/side-nav.css';
78
79
  @import './styles/skeleton.css';
79
80
  @import './styles/slider.css';
@@ -98,6 +99,7 @@
98
99
  @import './styles/toggle-button.css';
99
100
  @import './styles/token.css';
100
101
  @import './styles/tokenizer.css';
102
+ @import './styles/tokenizer-sheet.css';
101
103
  @import './styles/toolbar.css';
102
104
  @import './styles/tooltip.css';
103
105
  @import './styles/top-nav.css';