@astryx-vue/core 0.46.3 → 0.47.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 (115) hide show
  1. package/dist/AvatarGroup/index.d.ts +1 -1
  2. package/dist/Banner/index.d.ts +1 -1
  3. package/dist/BottomSheet/index.d.ts +1 -1
  4. package/dist/Button/index.d.ts +1 -1
  5. package/dist/ButtonGroup/index.d.ts +1 -1
  6. package/dist/Calendar/index.d.ts +1 -1
  7. package/dist/Card/index.d.ts +1 -1
  8. package/dist/Carousel/index.d.ts +1 -1
  9. package/dist/Chat/index.d.ts +1 -1
  10. package/dist/CheckboxInput/index.d.ts +1 -1
  11. package/dist/CheckboxList/index.d.ts +1 -1
  12. package/dist/ClickableCard/index.d.ts +1 -1
  13. package/dist/Collapsible/index.d.ts +1 -1
  14. package/dist/CommandPalette/index.d.ts +1 -1
  15. package/dist/ContextMenu/index.d.ts +1 -1
  16. package/dist/DateInput/index.d.ts +1 -1
  17. package/dist/DateRangeInput/index.d.ts +1 -1
  18. package/dist/DateTimeInput/index.d.ts +1 -1
  19. package/dist/Dialog/index.d.ts +1 -1
  20. package/dist/Drawer/index.d.ts +1 -1
  21. package/dist/Heading/index.d.ts +1 -1
  22. package/dist/HoverCard/index.d.ts +1 -1
  23. package/dist/InfoTip/index.d.ts +1 -1
  24. package/dist/InternationalizationProvider/index.d.ts +1 -1
  25. package/dist/InternationalizationProvider/index.js +1 -1
  26. package/dist/{InternationalizationProvider-CyxgZ6jv.js → InternationalizationProvider-CI124o7O.js} +1 -1
  27. package/dist/Link/index.d.ts +1 -1
  28. package/dist/List/index.d.ts +1 -1
  29. package/dist/Markdown/index.d.ts +1 -1
  30. package/dist/MetadataList/index.d.ts +1 -1
  31. package/dist/MoreMenu/index.d.ts +1 -1
  32. package/dist/MultiSelector/index.d.ts +1 -1
  33. package/dist/NavItem/index.d.ts +1 -1
  34. package/dist/NumberInput/index.d.ts +1 -1
  35. package/dist/NumberInput/index.js +1 -1
  36. package/dist/{NumberInput-CxB2Lt8R.js → NumberInput-DC1ALFjZ.js} +2 -0
  37. package/dist/OverflowList/index.d.ts +1 -1
  38. package/dist/Overlay/index.d.ts +1 -1
  39. package/dist/Pagination/index.d.ts +1 -1
  40. package/dist/Pagination/index.js +1 -1
  41. package/dist/{Pagination-kyLNBr4_.js → Pagination-CR64PGww.js} +1 -1
  42. package/dist/Popover/index.d.ts +1 -1
  43. package/dist/PowerSearch/index.d.ts +1 -1
  44. package/dist/PowerSearch/index.js +1 -1
  45. package/dist/{PowerSearch-B_RQO3ZF.js → PowerSearch-BpCg9r13.js} +2 -2
  46. package/dist/ProgressBar/index.d.ts +1 -1
  47. package/dist/Radio/index.d.ts +1 -1
  48. package/dist/RadioList/index.d.ts +1 -1
  49. package/dist/ScrollableArea/index.d.ts +1 -1
  50. package/dist/SelectableCard/index.d.ts +1 -1
  51. package/dist/Selector/index.d.ts +1 -1
  52. package/dist/SideNav/index.d.ts +1 -1
  53. package/dist/Stepper/index.d.ts +1 -1
  54. package/dist/Switch/index.d.ts +1 -1
  55. package/dist/TabList/index.d.ts +1 -1
  56. package/dist/Table/index.d.ts +1 -1
  57. package/dist/Table/index.js +1 -1
  58. package/dist/{Table-DbJVAmQH.js → Table-BFIZ9yl7.js} +4 -4
  59. package/dist/Text/index.d.ts +1 -1
  60. package/dist/TextArea/index.d.ts +1 -1
  61. package/dist/TextInput/index.d.ts +1 -1
  62. package/dist/Thumbnail/index.js +1 -1
  63. package/dist/{Thumbnail-CYvBjbkJ.js → Thumbnail-D60-nKWf.js} +2 -2
  64. package/dist/TimeInput/index.d.ts +1 -1
  65. package/dist/Timestamp/index.d.ts +1 -1
  66. package/dist/ToggleButton/index.d.ts +1 -1
  67. package/dist/Token/index.d.ts +1 -1
  68. package/dist/Tokenizer/index.d.ts +1 -1
  69. package/dist/Toolbar/index.d.ts +1 -1
  70. package/dist/Tooltip/index.d.ts +1 -1
  71. package/dist/TopNav/index.d.ts +1 -1
  72. package/dist/TreeList/index.d.ts +1 -1
  73. package/dist/{index-CvtYT6T3.d.ts → index-4R2_PfBF.d.ts} +5 -5
  74. package/dist/{index-a6o69uPN.d.ts → index-Ak1b0V24.d.ts} +1 -1
  75. package/dist/{index-DSAtZP4A.d.ts → index-B8NGDyIe.d.ts} +1 -1
  76. package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
  77. package/dist/{index-CqSUm878.d.ts → index-BLPqfpBZ.d.ts} +1 -1
  78. package/dist/{index-C9iidKbL.d.ts → index-BPnP3Abd.d.ts} +2 -2
  79. package/dist/{index-BbHuan0g.d.ts → index-BZ_lQz43.d.ts} +1 -1
  80. package/dist/{index-B_XTzQhm.d.ts → index-C5HUsKnf.d.ts} +2 -2
  81. package/dist/{index-D46MxxOl.d.ts → index-C5NuAlfY.d.ts} +1 -1
  82. package/dist/{index-a_FOKJMw.d.ts → index-CBOv5j3c.d.ts} +1 -1
  83. package/dist/{index-CmqD5Ya9.d.ts → index-CD1-Hqm0.d.ts} +2 -2
  84. package/dist/{index-DpoPQpHU.d.ts → index-CK6rHNTd.d.ts} +84 -84
  85. package/dist/{index-jz9GfvS0.d.ts → index-COgrQZIL.d.ts} +2 -2
  86. package/dist/{index-DYU4kE-q.d.ts → index-Cg6pihUE.d.ts} +3 -3
  87. package/dist/{index-Dn4_BPHR.d.ts → index-CpLGbFCR.d.ts} +3 -3
  88. package/dist/{index-CCa_dvoF.d.ts → index-Ds4dOCSy.d.ts} +3 -3
  89. package/dist/{index-W1vk0b9d.d.ts → index-DvJSZh5M.d.ts} +4 -4
  90. package/dist/{index-83Gp-isU.d.ts → index-Dw8-uyda.d.ts} +2 -2
  91. package/dist/{index-BtqvPjAf.d.ts → index-Otl047R1.d.ts} +2 -2
  92. package/dist/{index-Dmr81uHZ.d.ts → index-YpwwNU0k.d.ts} +2 -2
  93. package/dist/{index-BfFpUr1B.d.ts → index-ZKBj_1nu.d.ts} +1 -1
  94. package/dist/{index-DyikW_sN.d.ts → index-aBeGbS1N.d.ts} +1 -1
  95. package/dist/{index-Cm36VS1A.d.ts → index-mK1ICsVg.d.ts} +2 -2
  96. package/dist/{index-CtYlR9Cu.d.ts → index-rdwI-mcm.d.ts} +1 -1
  97. package/dist/{index-NOXYEdOI.d.ts → index-utZGF4GR.d.ts} +1 -1
  98. package/dist/{index-C89cIh4E.d.ts → index-waTkqxTz.d.ts} +1 -1
  99. package/dist/index.d.ts +29 -29
  100. package/dist/index.js +10 -10
  101. package/dist/{loadCatalog-YkQJ7sxu.d.ts → loadCatalog-BLR2kAhy.d.ts} +27 -2
  102. package/dist/{loadCatalog--oXKoMve.js → loadCatalog-DT1OyK-2.js} +54 -7
  103. package/dist/locale/index.d.ts +3 -3
  104. package/dist/locale/index.js +4 -4
  105. package/dist/{locale-BH7q40Eo.js → locale-BWvGrrcM.js} +1 -1
  106. package/dist/{thumbnail-BI82Ijpj.js → thumbnail-ASg6cXnd.js} +4 -2
  107. package/locales/en.json +74 -10
  108. package/locales/vi-VN.json +1336 -0
  109. package/package.json +1 -1
  110. package/styles/field.css +19 -0
  111. package/styles/file-input.css +28 -0
  112. package/styles/input-group.css +14 -3
  113. package/styles/number-input.css +29 -3
  114. package/styles/text-input.css +4 -0
  115. package/dist/{index-CNZCQgHF.d.ts → index-DKlE9Iqk.d.ts} +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@astryx-vue/core",
3
3
  "type": "module",
4
- "version": "0.46.3",
4
+ "version": "0.47.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",
package/styles/field.css CHANGED
@@ -277,6 +277,25 @@
277
277
  }
278
278
  }
279
279
 
280
+ /*
281
+ * 细指针下清除按钮的目标长到 24px(WCAG 2.2 SC 2.5.8):只往上下的内边距和字段末端长,
282
+ * 不朝文字那边长,点在文字末尾仍然放光标。中间挖空按钮自己的盒子,指针在那里落到图标上。
283
+ */
284
+ @media (pointer: fine) {
285
+ .astryx-input-clear-button::after {
286
+ position: absolute;
287
+ inset-block: -2px;
288
+ inset-inline-start: 0;
289
+ inset-inline-end: -4px;
290
+ content: '';
291
+ clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 0 2px, calc(100% - 4px) 2px, calc(100% - 4px) calc(100% - 2px), 0 calc(100% - 2px), 0 2px);
292
+ }
293
+
294
+ .astryx-input-clear-button:dir(rtl)::after {
295
+ clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 4px 2px, 100% 2px, 100% calc(100% - 2px), 4px calc(100% - 2px), 4px 2px);
296
+ }
297
+ }
298
+
280
299
  @media (forced-colors: active) {
281
300
  .astryx-field-status {
282
301
  border: 1px solid CanvasText;
@@ -5,6 +5,26 @@
5
5
  width: 100%;
6
6
  }
7
7
 
8
+ /*
9
+ * 输入模式:行高是尺寸给的下限,上下内边距是尺寸减去一行提示和边框剩下的部分。
10
+ * 字放大或提示换行时,行从这里往上长,不会切掉字。
11
+ */
12
+ .astryx-file-input:not([data-mode='dropzone']) {
13
+ --_file-input-row: var(--astryx-input-height-md, 32px);
14
+ --_file-input-line: calc(var(--astryx-text-body-size, 14px) * var(--astryx-text-body-leading, 1.4286));
15
+ height: auto;
16
+ min-height: var(--_file-input-row);
17
+ padding-block: max(0px, calc((var(--_file-input-row) - var(--_file-input-line) - 2 * var(--astryx-border-width, 1px)) / 2));
18
+ }
19
+
20
+ .astryx-file-input:not([data-mode='dropzone'])[data-size='sm'] {
21
+ --_file-input-row: var(--astryx-input-height-sm, 28px);
22
+ }
23
+
24
+ .astryx-file-input:not([data-mode='dropzone'])[data-size='lg'] {
25
+ --_file-input-row: var(--astryx-input-height-lg, 36px);
26
+ }
27
+
8
28
  .astryx-file-input[data-mode='dropzone'] {
9
29
  flex-direction: column;
10
30
  justify-content: center;
@@ -76,6 +96,14 @@
76
96
  white-space: normal;
77
97
  }
78
98
 
99
+ /* 输入模式的提示在边框里换行,放不下的长词在词内断开;文件名仍然截短成一行。 */
100
+ .astryx-file-input:not([data-mode='dropzone']) .astryx-file-input-text[data-placeholder='true'] {
101
+ flex: 1;
102
+ line-height: var(--astryx-text-body-leading, 1.4286);
103
+ white-space: normal;
104
+ overflow-wrap: break-word;
105
+ }
106
+
79
107
  .astryx-file-input-text[data-placeholder='true'] {
80
108
  color: var(--astryx-color-text-secondary, #525252);
81
109
  }
@@ -7,7 +7,9 @@
7
7
  align-items: stretch;
8
8
  width: 100%;
9
9
  min-width: 0;
10
- height: var(--astryx-input-height-md, 32px);
10
+ /* 组管行高,成员撑满:尺寸给下限,字放大到一行加边框比它高时跟着长高。 */
11
+ --_input-group-line: calc(var(--astryx-text-body-size, 14px) * var(--astryx-text-body-leading, 1.4286) + 2 * var(--astryx-border-width, 1px));
12
+ height: max(var(--astryx-input-height-md, 32px), var(--_input-group-line));
11
13
  overflow: hidden;
12
14
  border: var(--astryx-border-width, 1px) solid var(--astryx-input-border, var(--astryx-color-border-control, light-dark(#848484, #777777)));
13
15
  border-radius: var(--astryx-radius-element, 0.625rem);
@@ -16,11 +18,20 @@
16
18
  }
17
19
 
18
20
  .astryx-input-group.size-sm {
19
- height: var(--astryx-input-height-sm, 28px);
21
+ height: max(var(--astryx-input-height-sm, 28px), var(--_input-group-line));
20
22
  }
21
23
 
22
24
  .astryx-input-group.size-lg {
23
- height: var(--astryx-input-height-lg, 36px);
25
+ height: max(var(--astryx-input-height-lg, 36px), var(--_input-group-line));
26
+ }
27
+
28
+ /* iOS 上输入框字号有 16px 下限,行也按它算。 */
29
+ @media (pointer: coarse) {
30
+ @supports (-webkit-touch-callout: none) {
31
+ .astryx-input-group {
32
+ --_input-group-line: calc(max(1rem, var(--astryx-text-body-size, 14px)) * var(--astryx-text-body-leading, 1.4286) + 2 * var(--astryx-border-width, 1px));
33
+ }
34
+ }
24
35
  }
25
36
 
26
37
  .astryx-input-group:focus-within:not(.is-disabled) {
@@ -7,7 +7,13 @@
7
7
  align-items: stretch;
8
8
  width: 100%;
9
9
  min-width: 0;
10
- height: var(--astryx-input-height-md, 32px);
10
+ /*
11
+ * 行高:尺寸给下限,字放大到一行加边框比它高时跟着长高。有步进按钮时还不低于那一列
12
+ * (两个 xsm 图标和中间的分隔线,图标随字号变大),粗指针下按钮隐藏,不算这一列。
13
+ */
14
+ --_number-input-line: calc(var(--astryx-text-body-size, 14px) * var(--astryx-text-body-leading, 1.4286) + 2 * var(--astryx-border-width, 1px));
15
+ --_number-input-steppers: 0px;
16
+ height: max(var(--astryx-input-height-md, 32px), var(--_number-input-line), var(--_number-input-steppers));
11
17
  border: var(--astryx-border-width, 1px) solid var(--astryx-input-border, var(--astryx-color-border-control, light-dark(#848484, #777777)));
12
18
  border-radius: var(--astryx-radius-element, 0.625rem);
13
19
  background: var(--astryx-input-background, #fff);
@@ -19,11 +25,27 @@
19
25
  }
20
26
 
21
27
  .astryx-number-input.size-sm {
22
- height: var(--astryx-input-height-sm, 28px);
28
+ height: max(var(--astryx-input-height-sm, 28px), var(--_number-input-line), var(--_number-input-steppers));
23
29
  }
24
30
 
25
31
  .astryx-number-input.size-lg {
26
- height: var(--astryx-input-height-lg, 36px);
32
+ height: max(var(--astryx-input-height-lg, 36px), var(--_number-input-line), var(--_number-input-steppers));
33
+ }
34
+
35
+ .astryx-number-input[data-steppers='true'] {
36
+ --_number-input-steppers: calc(2 * 0.75rem + 3 * var(--astryx-border-width, 1px));
37
+ }
38
+
39
+ @media (pointer: coarse) {
40
+ .astryx-number-input[data-steppers='true'] {
41
+ --_number-input-steppers: 0px;
42
+ }
43
+
44
+ @supports (-webkit-touch-callout: none) {
45
+ .astryx-number-input {
46
+ --_number-input-line: calc(max(1rem, var(--astryx-text-body-size, 14px)) * var(--astryx-text-body-leading, 1.4286) + 2 * var(--astryx-border-width, 1px));
47
+ }
48
+ }
27
49
  }
28
50
 
29
51
  .astryx-number-input[data-status='error'] {
@@ -193,6 +215,10 @@
193
215
  }
194
216
  }
195
217
 
218
+ :where([data-astryx-reduced-motion]) .astryx-number-input {
219
+ transition: none;
220
+ }
221
+
196
222
  @media (forced-colors: active) {
197
223
  .astryx-number-input {
198
224
  border-color: ButtonText;
@@ -129,6 +129,10 @@
129
129
  }
130
130
  }
131
131
 
132
+ :where([data-astryx-reduced-motion]) .astryx-text-input {
133
+ transition: none;
134
+ }
135
+
132
136
  @media (forced-colors: active) {
133
137
  .astryx-text-input {
134
138
  border-color: ButtonText;
@@ -44,8 +44,8 @@ declare const __VLS_base: import("vue").DefineComponent<TokenProps, {}, {}, {},
44
44
  }>, {
45
45
  size: TokenSize;
46
46
  disabled: boolean;
47
- color: "default" | "blue" | "cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow";
48
47
  labelHidden: boolean;
48
+ color: "default" | "blue" | "cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow";
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>;