@astryx-vue/core 0.7.28 → 0.8.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 (193) hide show
  1. package/dist/AlertDialog/index.d.ts +1 -1
  2. package/dist/AlertDialog/index.js +1 -1
  3. package/dist/{AlertDialog-DZpJzvOC.js → AlertDialog-BO2LucRK.js} +3 -3
  4. package/dist/AvatarGroup/index.d.ts +1 -1
  5. package/dist/Banner/index.d.ts +1 -1
  6. package/dist/Banner/index.js +1 -1
  7. package/dist/{Banner-Dx2JtVc-.js → Banner-C-8DEWdJ.js} +1 -1
  8. package/dist/BottomSheet/index.d.ts +1 -1
  9. package/dist/Breadcrumbs/index.d.ts +2 -2
  10. package/dist/Breadcrumbs/index.js +1 -1
  11. package/dist/{Breadcrumbs-Brgi3F8q.js → Breadcrumbs-sakAtNnr.js} +1 -1
  12. package/dist/Button/index.d.ts +2 -2
  13. package/dist/Button/index.js +1 -1
  14. package/dist/{Button-DsjdehLZ.js → Button-BeNp2zq_.js} +7 -4
  15. package/dist/ButtonGroup/index.d.ts +1 -1
  16. package/dist/ButtonGroup/index.js +1 -1
  17. package/dist/{ButtonGroup-CSW7a9vq.js → ButtonGroup-CosYAili.js} +15 -4
  18. package/dist/Calendar/index.d.ts +1 -1
  19. package/dist/Carousel/index.d.ts +1 -1
  20. package/dist/Carousel/index.js +1 -1
  21. package/dist/{Carousel-CSsQ4GHW.js → Carousel-BOlQQSju.js} +83 -6
  22. package/dist/Center/index.d.ts +1 -1
  23. package/dist/Chat/index.d.ts +1 -1
  24. package/dist/Chat/index.js +1 -1
  25. package/dist/{Chat-j2m3Exwo.js → Chat-Bl_Wr2lK.js} +5 -5
  26. package/dist/CheckboxInput/index.d.ts +1 -1
  27. package/dist/CheckboxList/index.d.ts +1 -1
  28. package/dist/ClickableCard/index.d.ts +1 -1
  29. package/dist/Code/index.js +1 -1
  30. package/dist/{CodeBlock-PSnUWX57.js → CodeBlock-CSxQPryb.js} +1 -1
  31. package/dist/ComplexSelector/index.d.ts +1 -1
  32. package/dist/ComplexSelector/index.js +1 -1
  33. package/dist/{ComplexSelector-BgnhEjIN.js → ComplexSelector-DFKi6sKq.js} +1 -1
  34. package/dist/ContextMenu/index.d.ts +2 -2
  35. package/dist/DateInput/index.d.ts +1 -1
  36. package/dist/DateInput/index.js +1 -1
  37. package/dist/{DateInput-BY9qdl_H.js → DateInput-CI1_FFPZ.js} +1 -1
  38. package/dist/DateRangeInput/index.d.ts +1 -1
  39. package/dist/DateRangeInput/index.js +1 -1
  40. package/dist/{DateRangeInput-C0vyG95Z.js → DateRangeInput-lTx_eqfT.js} +2 -2
  41. package/dist/DateTimeInput/index.d.ts +1 -1
  42. package/dist/DateTimeInput/index.js +1 -1
  43. package/dist/{DateTimeInput-BmIljXWd.js → DateTimeInput-BouEOOwo.js} +3 -3
  44. package/dist/Dialog/index.js +1 -1
  45. package/dist/{DialogHeader-Dfegdd7v.js → DialogHeader-cr9rFLYM.js} +1 -1
  46. package/dist/Drawer/index.d.ts +1 -1
  47. package/dist/Drawer/index.js +1 -1
  48. package/dist/{Drawer-7LLlGQcE.js → Drawer-Ba-yG1rk.js} +1 -1
  49. package/dist/DropdownMenu/index.d.ts +2 -2
  50. package/dist/DropdownMenu/index.js +2 -2
  51. package/dist/{DropdownMenu-CJxA-kJ2.js → DropdownMenu-BJicFgwf.js} +1 -1
  52. package/dist/{DropdownMenu-B6SXhr61.js → DropdownMenu-BPZjqbcw.js} +1 -1
  53. package/dist/{DropdownMenuRadioItem.vue-D455cIQQ.d.ts → DropdownMenuRadioItem.vue-C9DdN6UE.d.ts} +1 -1
  54. package/dist/Field/index.d.ts +2 -2
  55. package/dist/Field/index.js +1 -1
  56. package/dist/{FieldInfoTip-BJAaKJjM.js → FieldInfoTip-BouJddgS.js} +1 -1
  57. package/dist/FieldStatus/index.d.ts +1 -1
  58. package/dist/FileInput/index.d.ts +1 -1
  59. package/dist/FileInput/index.js +1 -1
  60. package/dist/{FileInput-C6eX4nBl.js → FileInput-CFUgV2px.js} +1 -1
  61. package/dist/Heading/index.d.ts +1 -1
  62. package/dist/Icon/index.d.ts +3 -3
  63. package/dist/IconButton/index.d.ts +1 -1
  64. package/dist/IconButton/index.js +1 -1
  65. package/dist/{IconButton-Crtfruc0.js → IconButton-C91rhbvu.js} +1 -1
  66. package/dist/Indicator/index.d.ts +2 -2
  67. package/dist/InfoTip/index.d.ts +1 -1
  68. package/dist/{InputClearButton-DjIxNNH8.js → InputClearButton-BiF7qGMR.js} +4 -2
  69. package/dist/InputGroup/index.d.ts +1 -1
  70. package/dist/Lightbox/index.js +1 -1
  71. package/dist/{Lightbox-rY1XJs38.js → Lightbox-VlvxtZn4.js} +1 -1
  72. package/dist/Link/index.d.ts +1 -1
  73. package/dist/Markdown/index.js +1 -1
  74. package/dist/{Markdown-BQbchOad.js → Markdown-DsE-40yq.js} +1 -1
  75. package/dist/{MediaTheme-Bt7WBTkq.js → MediaTheme-BVKUsMfC.js} +37 -1
  76. package/dist/MoreMenu/index.d.ts +1 -1
  77. package/dist/MoreMenu/index.js +1 -1
  78. package/dist/{MoreMenu-C2ZrGrJ-.js → MoreMenu-1lxF-JY5.js} +1 -1
  79. package/dist/MultiSelector/index.d.ts +1 -1
  80. package/dist/MultiSelector/index.js +1 -1
  81. package/dist/{MultiSelector-DWKh7ePj.js → MultiSelector-Slqiulwd.js} +1 -1
  82. package/dist/NumberInput/index.d.ts +1 -1
  83. package/dist/NumberInput/index.js +1 -1
  84. package/dist/{NumberInput-Bzc9v9oU.js → NumberInput-Bsz7bmRp.js} +2 -2
  85. package/dist/OverflowList/index.d.ts +1 -1
  86. package/dist/Pagination/index.d.ts +1 -1
  87. package/dist/Popover/index.d.ts +1 -1
  88. package/dist/Popover/index.js +1 -1
  89. package/dist/{Popover-DaGcaKHo.js → Popover-cnfHz2tm.js} +1 -1
  90. package/dist/PowerSearch/index.js +1 -1
  91. package/dist/{PowerSearch-CtC5P-zt.js → PowerSearch-2jO62NSM.js} +8 -8
  92. package/dist/Radio/index.d.ts +1 -1
  93. package/dist/RadioList/index.d.ts +1 -1
  94. package/dist/ScrollableArea/index.d.ts +1 -1
  95. package/dist/SelectableCard/index.d.ts +1 -1
  96. package/dist/Selector/index.d.ts +1 -1
  97. package/dist/SideNav/index.d.ts +1 -1
  98. package/dist/SideNav/index.js +1 -1
  99. package/dist/{SideNav-YO-fBuwR.js → SideNav-DeVtoFFq.js} +1 -1
  100. package/dist/Slider/index.d.ts +1 -1
  101. package/dist/Switch/index.d.ts +1 -1
  102. package/dist/Table/index.d.ts +1 -1
  103. package/dist/Table/index.js +1 -1
  104. package/dist/{Table-DkibnUnt.js → Table-sKQpWVKc.js} +6 -6
  105. package/dist/Text/index.d.ts +1 -1
  106. package/dist/TextArea/index.d.ts +1 -1
  107. package/dist/TextArea/index.js +1 -1
  108. package/dist/{TextArea-CKg-oybo.js → TextArea-BzcHz2qI.js} +3 -3
  109. package/dist/TextInput/index.d.ts +1 -1
  110. package/dist/TextInput/index.js +1 -1
  111. package/dist/{TextInput-QnW6aidH.js → TextInput-BeJNEQL6.js} +3 -3
  112. package/dist/Theme/index.d.ts +3 -3
  113. package/dist/Theme/index.js +3 -3
  114. package/dist/{Theme-BQe--DY6.js → Theme-1r_aWHvr.js} +330 -4
  115. package/dist/Thumbnail/index.js +1 -1
  116. package/dist/{Thumbnail-Cqt2l_zO.js → Thumbnail-CTkLFo-A.js} +1 -1
  117. package/dist/{TimeField-2QBI5tU6.js → TimeField-BGtS_m-U.js} +1 -1
  118. package/dist/TimeInput/index.d.ts +1 -1
  119. package/dist/TimeInput/index.js +1 -1
  120. package/dist/{TimeInput-DYAsRNAO.js → TimeInput-BKfg3SZ7.js} +1 -1
  121. package/dist/Timer/index.d.ts +1 -1
  122. package/dist/Timestamp/index.d.ts +1 -1
  123. package/dist/Timestamp/index.js +1 -1
  124. package/dist/{Timestamp-CwNc1inn.js → Timestamp-B7H0KScU.js} +1 -1
  125. package/dist/Toast/index.js +1 -1
  126. package/dist/{Toast-cVNBdW-q.js → Toast-aI9QMW-L.js} +2 -2
  127. package/dist/ToggleButton/index.d.ts +1 -1
  128. package/dist/ToggleButton/index.js +1 -1
  129. package/dist/{ToggleButton-BMn4yJXe.js → ToggleButton-DI9I-LBH.js} +14 -7
  130. package/dist/Token/index.d.ts +1 -1
  131. package/dist/Toolbar/index.d.ts +1 -1
  132. package/dist/TopNav/index.d.ts +1 -1
  133. package/dist/composables/index.d.ts +2 -2
  134. package/dist/composables/index.js +3 -3
  135. package/dist/{composables-lCxHhZQY.js → composables-CF4EnyHW.js} +441 -1
  136. package/dist/context-BJ9RkXYX.js +676 -0
  137. package/dist/{index-D44l1Esr.d.ts → index-9GQ1lEoF.d.ts} +128 -48
  138. package/dist/{index-BBTU-TKb.d.ts → index-9eluGe3a.d.ts} +1 -1
  139. package/dist/{index-BU78NOP-.d.ts → index-B0R5CLPF.d.ts} +1 -1
  140. package/dist/{index-Ukeoz7_9.d.ts → index-B62UAbz4.d.ts} +1 -1
  141. package/dist/{index-D57GW53K.d.ts → index-BMVI4cM5.d.ts} +1 -1
  142. package/dist/{index-CbNLiaWw.d.ts → index-Bfm6mF-r.d.ts} +47 -2
  143. package/dist/{index-CAoenU4T.d.ts → index-BlhbRf58.d.ts} +1 -1
  144. package/dist/{index-wkeCkhTi.d.ts → index-BmYnVNI-.d.ts} +3 -3
  145. package/dist/{index-BO9TY87G.d.ts → index-BxWCX2pJ.d.ts} +3 -3
  146. package/dist/{index-waTkqxTz.d.ts → index-C89cIh4E.d.ts} +1 -1
  147. package/dist/{index-BZuEYd9y.d.ts → index-CEjvYAUZ.d.ts} +1 -1
  148. package/dist/{index-CvquEEGw.d.ts → index-CXOAA8us.d.ts} +2 -2
  149. package/dist/{index-DCU6dy7n.d.ts → index-Ccj-2j56.d.ts} +32 -2
  150. package/dist/{index-BPyRH3WL.d.ts → index-CfXW4km8.d.ts} +1 -1
  151. package/dist/{index-rdwI-mcm.d.ts → index-CtYlR9Cu.d.ts} +1 -1
  152. package/dist/{index-CEHqYyz5.d.ts → index-CuW4AQ7M.d.ts} +1 -1
  153. package/dist/{index-D1JXm7Et.d.ts → index-Cy1rEWC-.d.ts} +1 -1
  154. package/dist/{index-C16d2Fc4.d.ts → index-DDAcxZAP.d.ts} +1 -1
  155. package/dist/{index-BtuK-muv.d.ts → index-Dbw5OTuo.d.ts} +2 -2
  156. package/dist/{index-DN1RqxjP.d.ts → index-DxR6cZBf.d.ts} +1 -1
  157. package/dist/{index-a1jCiQP7.d.ts → index-FzAAjCFZ.d.ts} +1 -1
  158. package/dist/{index-IFFGXlhq.d.ts → index-GmoeIuhl.d.ts} +1 -1
  159. package/dist/{index-CL6DNvOo.d.ts → index-MEix_m1o.d.ts} +1 -1
  160. package/dist/{index-DhMCql2U.d.ts → index-NHtQmIIM.d.ts} +1 -1
  161. package/dist/{index-BKnyTWPM.d.ts → index-ZbNwGVkS.d.ts} +1 -1
  162. package/dist/index.d.ts +33 -34
  163. package/dist/index.js +40 -40
  164. package/dist/{semantic-CXHSMwPK.d.ts → semantic-Dj507RuV.d.ts} +1 -1
  165. package/dist/snapPagingValue-B5hfph1H.js +93 -0
  166. package/dist/{types-Dcai2Icw.d.ts → types-D8t_HevJ.d.ts} +1 -0
  167. package/dist/{types-hB0M54I7.d.ts → types-DRpOiAlm.d.ts} +1 -1
  168. package/dist/{types-BwVJBE-G.d.ts → types-bAQk3F8G.d.ts} +1 -1
  169. package/dist/{types-Bq4Yl6CS.d.ts → types-uWxXh1Jm.d.ts} +7 -2
  170. package/dist/{useActionGroupTracking-BncJjk1A.js → useActionGroupTracking-B4niQ_tR.js} +3 -3
  171. package/dist/{useInputStatusIcon-DCnx00BM.js → useInputStatusIcon-Da2FiXwF.js} +1 -1
  172. package/package.json +1 -1
  173. package/styles/avatar.css +2 -2
  174. package/styles/badge.css +8 -0
  175. package/styles/button.css +3 -0
  176. package/styles/chat.css +10 -3
  177. package/styles/dropdown-menu.css +3 -3
  178. package/styles/field.css +9 -9
  179. package/styles/icon.css +4 -0
  180. package/styles/input-group.css +6 -6
  181. package/styles/list.css +7 -0
  182. package/styles/more-menu.css +4 -4
  183. package/styles/number-input.css +6 -6
  184. package/styles/power-search.css +3 -3
  185. package/styles/progress-bar.css +8 -0
  186. package/styles/status-dot.css +21 -1
  187. package/styles/stepper.css +11 -3
  188. package/styles/text-area.css +1 -1
  189. package/styles/touch-hit-area.css +37 -0
  190. package/styles.css +1 -0
  191. package/dist/context-CZP3jfy-.js +0 -125
  192. package/dist/index-BNbAJV9C.d.ts +0 -81
  193. package/dist/{index-5FGt4HsB.d.ts → index-J6YRJ7Ul.d.ts} +1 -1
@@ -34,18 +34,18 @@
34
34
  }
35
35
 
36
36
  .astryx-input-group.status-error {
37
- --astryx-input-focus: var(--astryx-input-error, #e33f4a);
38
- border-color: var(--astryx-input-error, #e33f4a);
37
+ --astryx-input-focus: var(--astryx-input-error, var(--astryx-color-border-error, #e33f4a));
38
+ border-color: var(--astryx-input-error, var(--astryx-color-border-error, #e33f4a));
39
39
  }
40
40
 
41
41
  .astryx-input-group.status-warning {
42
- --astryx-input-focus: var(--astryx-input-warning, #a67a00);
43
- border-color: var(--astryx-input-warning, #a67a00);
42
+ --astryx-input-focus: var(--astryx-input-warning, var(--astryx-color-border-warning, #a67a00));
43
+ border-color: var(--astryx-input-warning, var(--astryx-color-border-warning, #a67a00));
44
44
  }
45
45
 
46
46
  .astryx-input-group.status-success {
47
- --astryx-input-focus: var(--astryx-input-success, #198100);
48
- border-color: var(--astryx-input-success, #198100);
47
+ --astryx-input-focus: var(--astryx-input-success, var(--astryx-color-border-success, #198100));
48
+ border-color: var(--astryx-input-success, var(--astryx-color-border-success, #198100));
49
49
  }
50
50
 
51
51
  .astryx-input-group-shell {
package/styles/list.css CHANGED
@@ -405,4 +405,11 @@
405
405
  transition: none;
406
406
  }
407
407
  }
408
+
409
+ /* 强制配色会把危险操作的底色换成 ButtonFace,补一圈边让按钮的形状还看得见。 */
410
+ @media (forced-colors: active) {
411
+ .astryx-item__swipe-action[data-variant='destructive'] {
412
+ border: 1px solid CanvasText;
413
+ }
414
+ }
408
415
  }
@@ -175,7 +175,7 @@
175
175
  }
176
176
 
177
177
  .astryx-more-menu__item--destructive {
178
- color: var(--astryx-more-menu-destructive-foreground, var(--astryx-icon-error-foreground, light-dark(#76000c, #ffc4be)));
178
+ color: var(--astryx-more-menu-destructive-foreground, var(--astryx-color-text-error, light-dark(#76000c, #ffc4be)));
179
179
  }
180
180
 
181
181
  .astryx-more-menu__item-start,
@@ -357,10 +357,10 @@
357
357
  }
358
358
 
359
359
  .astryx-more-menu__sheet-item--destructive {
360
- --astryx-item-label-color: var(--astryx-more-menu-destructive-foreground, var(--astryx-icon-error-foreground, light-dark(#76000c, #ffc4be)));
361
- --astryx-item-description-color: var(--astryx-more-menu-destructive-foreground, var(--astryx-icon-error-foreground, light-dark(#76000c, #ffc4be)));
360
+ --astryx-item-label-color: var(--astryx-more-menu-destructive-foreground, var(--astryx-color-text-error, light-dark(#76000c, #ffc4be)));
361
+ --astryx-item-description-color: var(--astryx-more-menu-destructive-foreground, var(--astryx-color-text-error, light-dark(#76000c, #ffc4be)));
362
362
 
363
- color: var(--astryx-more-menu-destructive-foreground, var(--astryx-icon-error-foreground, light-dark(#76000c, #ffc4be)));
363
+ color: var(--astryx-more-menu-destructive-foreground, var(--astryx-color-text-error, light-dark(#76000c, #ffc4be)));
364
364
  }
365
365
 
366
366
  .astryx-more-menu-sheet-enter-active,
@@ -27,18 +27,18 @@
27
27
  }
28
28
 
29
29
  .astryx-number-input[data-status='error'] {
30
- --astryx-input-status-color: var(--astryx-input-error, #e33f4a);
31
- border-color: var(--astryx-input-error, #e33f4a);
30
+ --astryx-input-status-color: var(--astryx-input-error, var(--astryx-color-border-error, #e33f4a));
31
+ border-color: var(--astryx-input-error, var(--astryx-color-border-error, #e33f4a));
32
32
  }
33
33
 
34
34
  .astryx-number-input[data-status='warning'] {
35
- --astryx-input-status-color: var(--astryx-input-warning, #a67a00);
36
- border-color: var(--astryx-input-warning, #a67a00);
35
+ --astryx-input-status-color: var(--astryx-input-warning, var(--astryx-color-border-warning, #a67a00));
36
+ border-color: var(--astryx-input-warning, var(--astryx-color-border-warning, #a67a00));
37
37
  }
38
38
 
39
39
  .astryx-number-input[data-status='success'] {
40
- --astryx-input-status-color: var(--astryx-input-success, #198100);
41
- border-color: var(--astryx-input-success, #198100);
40
+ --astryx-input-status-color: var(--astryx-input-success, var(--astryx-color-border-success, #198100));
41
+ border-color: var(--astryx-input-success, var(--astryx-color-border-success, #198100));
42
42
  }
43
43
 
44
44
  /* The icon before the input text. */
@@ -67,15 +67,15 @@
67
67
  }
68
68
 
69
69
  .astryx-power-search-control.status-error {
70
- --astryx-input-status-color: var(--astryx-input-error, #e33f4a);
70
+ --astryx-input-status-color: var(--astryx-input-error, var(--astryx-color-border-error, #e33f4a));
71
71
  }
72
72
 
73
73
  .astryx-power-search-control.status-warning {
74
- --astryx-input-status-color: var(--astryx-input-warning, #a67a00);
74
+ --astryx-input-status-color: var(--astryx-input-warning, var(--astryx-color-border-warning, #a67a00));
75
75
  }
76
76
 
77
77
  .astryx-power-search-control.status-success {
78
- --astryx-input-status-color: var(--astryx-input-success, #198100);
78
+ --astryx-input-status-color: var(--astryx-input-success, var(--astryx-color-border-success, #198100));
79
79
  }
80
80
 
81
81
  .astryx-power-search-icon,
@@ -193,4 +193,12 @@
193
193
  animation-duration: 3s;
194
194
  }
195
195
  }
196
+
197
+ /* 强制配色会把填充色换成 Canvas,补一圈边让进度还看得见。 */
198
+ @media (forced-colors: active) {
199
+ .astryx-progress-bar-fill {
200
+ outline: 1px solid CanvasText;
201
+ outline-offset: -1px;
202
+ }
203
+ }
196
204
  }
@@ -51,8 +51,20 @@
51
51
  color: var(--astryx-status-dot-accent-icon-foreground, var(--astryx-color-on-accent, #fff));
52
52
  }
53
53
 
54
+ .astryx-status-dot[data-variant='info'] .astryx-status-dot__icon {
55
+ color: var(--astryx-status-dot-icon-foreground, var(--astryx-color-on-info, #fff));
56
+ }
57
+
58
+ .astryx-status-dot[data-variant='success'] .astryx-status-dot__icon {
59
+ color: var(--astryx-status-dot-icon-foreground, var(--astryx-color-on-success, #fff));
60
+ }
61
+
54
62
  .astryx-status-dot[data-variant='warning'] .astryx-status-dot__icon {
55
- color: var(--astryx-status-dot-warning-icon-foreground, #171717);
63
+ color: var(--astryx-status-dot-warning-icon-foreground, var(--astryx-color-on-warning, #171717));
64
+ }
65
+
66
+ .astryx-status-dot[data-variant='error'] .astryx-status-dot__icon {
67
+ color: var(--astryx-status-dot-icon-foreground, var(--astryx-color-on-error, #fff));
56
68
  }
57
69
 
58
70
  .astryx-status-dot--pulsing {
@@ -69,4 +81,12 @@
69
81
  0%, 100% { opacity: 1; }
70
82
  50% { opacity: 0.4; }
71
83
  }
84
+
85
+ /* 强制配色会把状态底色换成 Canvas,补一圈边让圆点的形状还看得见。 */
86
+ @media (forced-colors: active) {
87
+ .astryx-status-dot:is([data-variant='info'], [data-variant='success'], [data-variant='warning'], [data-variant='error']) {
88
+ outline: 1px solid CanvasText;
89
+ outline-offset: -1px;
90
+ }
91
+ }
72
92
  }
@@ -298,17 +298,17 @@
298
298
 
299
299
  .astryx-step-indicator[data-status='success'] {
300
300
  background: transparent;
301
- color: var(--astryx-color-success, #16a34a);
301
+ color: var(--astryx-color-icon-success, #16a34a);
302
302
  }
303
303
 
304
304
  .astryx-step-indicator[data-status='warning'] {
305
305
  background: transparent;
306
- color: var(--astryx-color-warning, #ca8a04);
306
+ color: var(--astryx-color-icon-warning, #ca8a04);
307
307
  }
308
308
 
309
309
  .astryx-step-indicator[data-status='error'] {
310
310
  background: transparent;
311
- color: var(--astryx-color-error, #dc2626);
311
+ color: var(--astryx-color-icon-error, #dc2626);
312
312
  }
313
313
 
314
314
  /* 指示点自带 data-progress / data-status:嵌套的步骤条不会吃到外层步骤的状态。 */
@@ -485,4 +485,12 @@
485
485
  transition-delay: 0s;
486
486
  }
487
487
  }
488
+
489
+ /* 强制配色会把数字徽标的底色换成 Canvas,补一圈边让徽标的形状还看得见。 */
490
+ @media (forced-colors: active) {
491
+ .astryx-step-indicator[data-glyph='number'] {
492
+ outline: 1px solid CanvasText;
493
+ outline-offset: -1px;
494
+ }
495
+ }
488
496
  }
@@ -33,7 +33,7 @@
33
33
  }
34
34
 
35
35
  .astryx-text-area-count[data-over='true'] {
36
- color: var(--astryx-input-error, #e33f4a);
36
+ color: var(--astryx-color-text-error, #e33f4a);
37
37
  }
38
38
 
39
39
  .astryx-text-area:has(.astryx-text-area-count) {
@@ -0,0 +1,37 @@
1
+ @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
2
+
3
+ /*
4
+ * 触控热区:粗指针下,一个透明的伪元素从被测元素的边框盒往外伸出 `--astryx-hit-inset-*`
5
+ * (useTouchHitArea 测量后写在被测元素上,往下继承)。按在它上面就是按在宿主上,
6
+ * 宿主自己的盒子不变。细指针下没有这个伪元素。
7
+ *
8
+ * - `.astryx-touch-hit-area`:画在 `::after` 上。伪元素的包含块是最近的定位祖先,
9
+ * 它就得是被测的那个元素。Button 把类放在内容包裹层上,热区以按钮为包含块,
10
+ * 按钮自己的 `::before`(触屏按压)和 `::after` 留给原来的用途。
11
+ * - `.astryx-touch-hit-area-below`:画在宿主自己的 `::before` 上,宿主就是包含块。
12
+ * 成员铺满盒子的组用它,定位的成员画在热区上面,成员自己那块的点按还是成员的。
13
+ *
14
+ * 偏移从包含块的内边距盒算起,测量从边框盒算起。宿主有边框时在 `--_hit-border`
15
+ * 里给出边框宽度,用负外边距补上;宽度写成不带单位的 0 时外边距的 calc 无效,正好退回 0。
16
+ */
17
+ @layer astryx.components {
18
+ @media (pointer: coarse) {
19
+ .astryx-touch-hit-area::after,
20
+ .astryx-touch-hit-area-below::before {
21
+ content: '';
22
+ position: absolute;
23
+ inset:
24
+ calc(var(--astryx-hit-inset-top, 0px) * -1)
25
+ calc(var(--astryx-hit-inset-right, 0px) * -1)
26
+ calc(var(--astryx-hit-inset-bottom, 0px) * -1)
27
+ calc(var(--astryx-hit-inset-left, 0px) * -1);
28
+ margin: calc(var(--_hit-border, 0px) * -1);
29
+ /* 宿主内容被隐藏(忙碌时)也照样接点按。 */
30
+ visibility: visible;
31
+ }
32
+
33
+ .astryx-touch-hit-area-below {
34
+ position: relative;
35
+ }
36
+ }
37
+ }
package/styles.css CHANGED
@@ -101,6 +101,7 @@
101
101
  @import './styles/toolbar.css';
102
102
  @import './styles/tooltip.css';
103
103
  @import './styles/top-nav.css';
104
+ @import './styles/touch-hit-area.css';
104
105
  @import './styles/tree-list.css';
105
106
  @import './styles/typeahead.css';
106
107
  @import './styles/visually-hidden.css';
@@ -1,125 +0,0 @@
1
- import { c as PRESS_GROUP_ITEM_ATTRIBUTE, l as isTrackedByGroup, r as pressFadeMs, t as PRESSED_ATTRIBUTE } from "./pressFeedback-Bwwpex9q.js";
2
- import { t as armStrayClick } from "./strayClick-CY-_ImKv.js";
3
- import { t as defineLayerScopedKey } from "./scopedProvide-C-Df7c15.js";
4
- //#region src/composables/internal/actionGroupTracker.ts
5
- /** 组跟踪手指和笔的滑动;鼠标保持原生按钮的行为。 */
6
- const GROUP_PRESS_POINTERS = ["touch", "pen"];
7
- /** 不可用的动作不亮也不执行。 */
8
- const DISABLED = ":disabled, [aria-disabled=\"true\"]";
9
- /** 摊到组跟踪的每个动作上的标记。 */
10
- function pressGroupItemProps(pointerTypes = GROUP_PRESS_POINTERS) {
11
- return { [PRESS_GROUP_ITEM_ATTRIBUTE]: pointerTypes.join(" ") };
12
- }
13
- function measure(root, pointerType) {
14
- const actions = [];
15
- for (const element of root.querySelectorAll(`[${PRESS_GROUP_ITEM_ATTRIBUTE}]`)) {
16
- if (element.matches(DISABLED) || !isTrackedByGroup(element, pointerType)) continue;
17
- const { left, top, right, bottom } = element.getBoundingClientRect();
18
- actions.push({
19
- element,
20
- left,
21
- top,
22
- right,
23
- bottom
24
- });
25
- }
26
- return actions;
27
- }
28
- function createActionGroupTracker() {
29
- let actions = [];
30
- let highlighted = null;
31
- let landedOn = null;
32
- let isTracking = false;
33
- const fades = /* @__PURE__ */ new Map();
34
- function clearFade(element) {
35
- const fade = fades.get(element);
36
- if (fade != null) {
37
- clearTimeout(fade);
38
- fades.delete(element);
39
- }
40
- }
41
- function paint(element, state) {
42
- if (element == null) return;
43
- clearFade(element);
44
- if (state === "none") {
45
- element.removeAttribute(PRESSED_ATTRIBUTE);
46
- return;
47
- }
48
- element.setAttribute(PRESSED_ATTRIBUTE, state);
49
- if (state === "fading") fades.set(element, setTimeout(() => {
50
- fades.delete(element);
51
- if (element.getAttribute("data-astryx-press") === "fading") element.removeAttribute(PRESSED_ATTRIBUTE);
52
- }, pressFadeMs(element)));
53
- }
54
- /** 手指下的动作。没有布局(测试环境)时几个矩形都包含这个点,落点所在的那个优先。 */
55
- function actionAt(x, y) {
56
- let first = null;
57
- for (const action of actions) {
58
- if (x < action.left || x > action.right || y < action.top || y > action.bottom) continue;
59
- if (landedOn != null && action.element.contains(landedOn)) return action.element;
60
- first ??= action.element;
61
- }
62
- return first;
63
- }
64
- function highlight(next) {
65
- if (next === highlighted) return;
66
- paint(highlighted, "none");
67
- highlighted = next;
68
- paint(next, "on");
69
- }
70
- function reset() {
71
- actions = [];
72
- highlighted = null;
73
- landedOn = null;
74
- isTracking = false;
75
- }
76
- return {
77
- begin(root, pointerType, x, y, landed) {
78
- paint(highlighted, "none");
79
- highlighted = null;
80
- actions = measure(root, pointerType);
81
- landedOn = landed;
82
- isTracking = true;
83
- highlight(actionAt(x, y));
84
- return highlighted;
85
- },
86
- move(x, y) {
87
- if (isTracking) highlight(actionAt(x, y));
88
- },
89
- end() {
90
- const lifted = highlighted;
91
- const wasTracking = isTracking;
92
- reset();
93
- if (!wasTracking || lifted == null) return null;
94
- paint(lifted, "fading");
95
- if (lifted.matches(DISABLED)) return null;
96
- armStrayClick(lifted.ownerDocument);
97
- lifted.click();
98
- return lifted;
99
- },
100
- cancel() {
101
- paint(highlighted, "none");
102
- reset();
103
- },
104
- get highlighted() {
105
- return highlighted;
106
- },
107
- get isTracking() {
108
- return isTracking;
109
- },
110
- dispose() {
111
- for (const [element, fade] of fades) {
112
- clearTimeout(fade);
113
- if (element.getAttribute("data-astryx-press") === "fading") element.removeAttribute(PRESSED_ATTRIBUTE);
114
- }
115
- fades.clear();
116
- paint(highlighted, "none");
117
- reset();
118
- }
119
- };
120
- }
121
- //#endregion
122
- //#region src/Button/context.ts
123
- const buttonGroupContextKey = defineLayerScopedKey("astryx-button-group", null);
124
- //#endregion
125
- export { pressGroupItemProps as i, GROUP_PRESS_POINTERS as n, createActionGroupTracker as r, buttonGroupContextKey as t };
@@ -1,81 +0,0 @@
1
- import { n as SpacingStep } from "./types-BTk0WZ0b.js";
2
- import { VNode } from "vue";
3
- //#region src/Carousel/types.d.ts
4
- /** Gap steps the carousel actually spaces with. Padding accepts every spacing step. */
5
- type CarouselGap = 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4;
6
- interface CarouselHandle {
7
- /** Scroll forward by roughly one viewport. With `hasLoop`, wraps to the start at the end. */
8
- scrollNext: () => void;
9
- /** Scroll backward by roughly one viewport. With `hasLoop`, wraps to the end at the start. */
10
- scrollPrev: () => void;
11
- /**
12
- * Scroll the item at the 0-based index to the start edge.
13
- * The index is clamped. Only the carousel scrolls.
14
- */
15
- scrollTo: (index: number) => void;
16
- /** Whether a forward scroll is available. With `hasLoop`, true whenever the content overflows. */
17
- canScrollNext: () => boolean;
18
- /** Whether a backward scroll is available. With `hasLoop`, true whenever the content overflows. */
19
- canScrollPrev: () => boolean;
20
- }
21
- interface CarouselProps {
22
- /**
23
- * Gap between items, as a spacing step.
24
- * @default 1
25
- */
26
- gap?: CarouselGap;
27
- /**
28
- * Show previous and next buttons when the content overflows.
29
- * @default true
30
- */
31
- hasButtons?: boolean;
32
- /**
33
- * Fade the edges that hide overflow, so it is obvious there is more to scroll.
34
- * @default true
35
- */
36
- hasEdgeFade?: boolean;
37
- /**
38
- * Wrap from the last item back to the first, and the other way around.
39
- * Buttons stay available at both edges. Has no effect when the content fits.
40
- * @default false
41
- */
42
- hasLoop?: boolean;
43
- /**
44
- * Snap each direct child to the start edge.
45
- * @default false
46
- */
47
- hasSnap?: boolean;
48
- /**
49
- * Inline padding inside the scrollport, with matching scroll-padding so snap
50
- * points line up with the content edge.
51
- */
52
- padding?: SpacingStep;
53
- /**
54
- * Accessible name of the carousel region.
55
- * @default 'Carousel' (localized)
56
- */
57
- label?: string;
58
- }
59
- interface CarouselSlots {
60
- /** Carousel items, rendered in a horizontal scrollport. */
61
- default?: () => VNode[];
62
- }
63
- //#endregion
64
- //#region src/Carousel/Carousel.vue.d.ts
65
- type __VLS_Slots = CarouselSlots;
66
- declare const __VLS_base: import("vue").DefineComponent<CarouselProps, CarouselHandle, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CarouselProps> & Readonly<{}>, {
67
- gap: CarouselGap;
68
- hasButtons: boolean;
69
- hasEdgeFade: boolean;
70
- hasLoop: boolean;
71
- hasSnap: boolean;
72
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
73
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
74
- declare const _default: typeof __VLS_export;
75
- type __VLS_WithSlots<T, S> = T & {
76
- new (): {
77
- $slots: S;
78
- };
79
- };
80
- //#endregion
81
- export { CarouselSlots as a, CarouselProps as i, CarouselGap as n, CarouselHandle as r, _default as t };
@@ -44,8 +44,8 @@ declare const __VLS_base: import("vue").DefineComponent<TokenProps, {}, {}, {},
44
44
  }>, {
45
45
  size: TokenSize;
46
46
  disabled: boolean;
47
- labelHidden: boolean;
48
47
  color: "default" | "blue" | "cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow";
48
+ labelHidden: boolean;
49
49
  removable: boolean;
50
50
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
51
51
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;