@hanwenbo/x-taro-ui 0.0.1 → 0.0.2

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 (55) hide show
  1. package/es/adapters/miniapp/overlayHost.js +14 -8
  2. package/es/auth/components.d.ts +17 -15
  3. package/es/auth/components.js +253 -133
  4. package/es/auth/entries/locales.d.ts +2 -0
  5. package/es/auth/entries/locales.js +1 -0
  6. package/es/auth/index.d.ts +1 -0
  7. package/es/auth/index.js +2 -1
  8. package/es/auth/internal.d.ts +17 -11
  9. package/es/auth/internal.js +107 -42
  10. package/es/auth/phoneNumberInput.d.ts +4 -2
  11. package/es/auth/phoneNumberInput.js +27 -8
  12. package/es/auth/provider.d.ts +2 -2
  13. package/es/auth/styles.css +161 -99
  14. package/es/auth/theme.js +20 -4
  15. package/es/components/_shared/render.d.ts +1 -1
  16. package/es/components/button/button.js +23 -3
  17. package/es/components/button/types.d.ts +6 -0
  18. package/es/components/capsuleTabs/capsuleTabs.js +4 -0
  19. package/es/components/icon/lucide.generated.d.ts +10 -0
  20. package/es/components/icon/lucide.generated.js +10 -0
  21. package/es/components/inputItem/inputItem.js +5 -2
  22. package/es/components/list/list.d.ts +1 -1
  23. package/es/components/pagination/pagination.js +18 -5
  24. package/es/components/sectionList/sectionList.d.ts +1 -2
  25. package/es/components/segmented/segmented.js +10 -2
  26. package/es/components/touchableOpacity/touchableOpacity.js +1 -0
  27. package/es/taro-components.d.ts +6 -0
  28. package/lib/adapters/miniapp/overlayHost.js +13 -6
  29. package/lib/auth/components.d.ts +17 -15
  30. package/lib/auth/components.js +257 -125
  31. package/lib/auth/entries/locales.d.ts +2 -0
  32. package/lib/auth/entries/locales.js +33 -0
  33. package/lib/auth/index.d.ts +1 -0
  34. package/lib/auth/index.js +13 -0
  35. package/lib/auth/internal.d.ts +17 -11
  36. package/lib/auth/internal.js +76 -31
  37. package/lib/auth/phoneNumberInput.d.ts +4 -2
  38. package/lib/auth/phoneNumberInput.js +65 -45
  39. package/lib/auth/provider.d.ts +2 -2
  40. package/lib/auth/styles.css +161 -99
  41. package/lib/auth/theme.js +7 -4
  42. package/lib/components/_shared/render.d.ts +1 -1
  43. package/lib/components/button/button.js +7 -0
  44. package/lib/components/button/types.d.ts +6 -0
  45. package/lib/components/capsuleTabs/capsuleTabs.js +1 -0
  46. package/lib/components/icon/lucide.generated.d.ts +10 -0
  47. package/lib/components/icon/lucide.generated.js +24 -0
  48. package/lib/components/inputItem/inputItem.js +3 -0
  49. package/lib/components/list/list.d.ts +1 -1
  50. package/lib/components/pagination/pagination.js +19 -5
  51. package/lib/components/sectionList/sectionList.d.ts +1 -2
  52. package/lib/components/segmented/segmented.js +6 -1
  53. package/lib/components/touchableOpacity/touchableOpacity.js +1 -0
  54. package/lib/taro-components.d.ts +6 -0
  55. package/package.json +4 -4
@@ -1,15 +1,15 @@
1
1
  .x-taro-auth-panel {
2
2
  box-sizing: border-box;
3
3
  width: 100%;
4
- max-width: var(--x-taro-auth-panel-max-width, 1120px);
4
+ max-width: var(--x-taro-auth-panel-max-width, 100%);
5
5
  margin: 0 auto;
6
- color: var(--x-color-foreground);
6
+ color: var(--foreground);
7
7
  }
8
8
 
9
9
  .x-taro-auth-panel--card {
10
- padding: var(--x-taro-auth-panel-padding, 48px);
11
- background: var(--x-color-card);
12
- border: 2px solid var(--x-color-border);
10
+ padding: var(--x-taro-auth-panel-padding, var(--x-space-6) var(--x-space-5));
11
+ background: var(--card);
12
+ border: var(--x-space-px) solid var(--border);
13
13
  border-radius: var(--x-radius-xl);
14
14
  box-shadow: var(--x-shadow-sm);
15
15
  }
@@ -19,23 +19,23 @@
19
19
  .x-taro-auth-security__header {
20
20
  display: flex;
21
21
  flex-direction: column;
22
- align-items: center;
23
- margin-bottom: 44px;
24
- text-align: center;
25
- gap: 16px;
22
+ align-items: flex-start;
23
+ margin-bottom: var(--x-space-6);
24
+ text-align: left;
25
+ gap: var(--x-space-2);
26
26
  }
27
27
 
28
28
  .x-taro-auth-panel__logo {
29
29
  display: flex;
30
30
  justify-content: center;
31
- margin-bottom: 8px;
31
+ margin-bottom: var(--x-space-1);
32
32
  }
33
33
 
34
34
  .x-taro-auth-panel__title,
35
35
  .x-taro-auth-quick__title,
36
36
  .x-taro-auth-security__title {
37
- color: var(--x-color-foreground);
38
- font-size: 48px;
37
+ color: var(--foreground);
38
+ font-size: var(--x-font-size-2xl);
39
39
  font-weight: 700;
40
40
  line-height: 1.25;
41
41
  }
@@ -45,68 +45,100 @@
45
45
  .x-taro-auth-security__description,
46
46
  .x-taro-auth-security__value,
47
47
  .x-taro-auth-security__loading {
48
- color: var(--x-color-muted-foreground);
49
- font-size: 28px;
50
- line-height: 1.5;
48
+ color: var(--muted-foreground);
49
+ font-size: var(--x-font-size-sm);
50
+ line-height: 1.7;
51
51
  }
52
52
 
53
53
  .x-taro-auth-form,
54
54
  .x-taro-auth-field,
55
55
  .x-taro-auth-agreements,
56
56
  .x-taro-auth-third-party,
57
- .x-taro-auth-third-party__items,
58
57
  .x-taro-auth-success {
59
58
  display: flex;
60
59
  flex-direction: column;
61
- gap: var(--x-taro-auth-form-gap, 32px);
60
+ gap: var(--x-taro-auth-form-gap, calc(var(--x-space-4) + calc(var(--x-space-1) / 2)));
61
+ }
62
+
63
+ .x-taro-auth-third-party {
64
+ gap: var(--x-space-4);
65
+ }
66
+
67
+ .x-taro-auth-third-party__items {
68
+ display: flex;
69
+ flex-direction: row;
70
+ flex-wrap: wrap;
71
+ justify-content: center;
72
+ align-self: center;
73
+ width: 100%;
74
+ max-width: calc(var(--x-space-8) * 8 + var(--x-space-2) * 3);
75
+ gap: var(--x-space-4) var(--x-space-2);
76
+ }
77
+
78
+ .x-taro-auth-third-party__icon {
79
+ display: flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+ width: calc(var(--x-space-10) + var(--x-space-1));
83
+ height: calc(var(--x-space-10) + var(--x-space-1));
84
+ flex-shrink: 0;
85
+ }
86
+
87
+ .x-taro-auth-third-party__label {
88
+ max-width: calc(var(--x-space-8) * 2);
89
+ color: var(--muted-foreground);
90
+ font-size: var(--x-font-size-xs);
91
+ font-weight: 400;
92
+ line-height: 1.5;
93
+ white-space: normal;
94
+ overflow-wrap: anywhere;
95
+ text-align: center;
62
96
  }
63
97
 
64
98
  .x-taro-auth-field {
65
- gap: 14px;
99
+ gap: var(--x-space-2);
66
100
  }
67
101
 
68
102
  .x-taro-auth-field__label,
69
103
  .x-taro-auth-security__label {
70
- color: var(--x-color-foreground);
71
- font-size: 28px;
104
+ color: var(--foreground);
105
+ font-size: var(--x-font-size-sm);
72
106
  font-weight: 600;
73
107
  line-height: 1.4;
74
108
  }
75
109
 
76
110
  .x-taro-auth-field__hint {
77
- color: var(--x-color-muted-foreground);
78
- font-size: 24px;
111
+ color: var(--muted-foreground);
112
+ font-size: var(--x-font-size-xs);
79
113
  }
80
114
 
81
115
  .x-taro-auth-field__error {
82
- color: var(--x-color-destructive);
83
- font-size: 24px;
116
+ color: var(--destructive);
117
+ font-size: var(--x-font-size-xs);
84
118
  }
85
119
 
86
120
  .x-taro-auth-error {
87
- padding: 20px 24px;
88
- color: var(--x-color-destructive);
89
- background: var(--x-color-destructive-muted, rgb(254 242 242));
90
- border: 2px solid var(--x-color-destructive-border, rgb(254 202 202));
121
+ padding: calc(var(--x-space-2) + var(--x-space-1) / 2) var(--x-space-3);
122
+ color: var(--destructive);
123
+ background: var(--muted);
124
+ border: var(--x-space-px) solid var(--destructive);
91
125
  border-radius: var(--x-radius-lg);
92
126
  }
93
127
 
94
128
  .x-taro-auth-error__text {
95
129
  color: inherit;
96
- font-size: 26px;
130
+ font-size: calc(var(--x-font-size-xs) + var(--x-space-px));
97
131
  }
98
132
 
99
- .x-taro-auth-selector {
100
- display: flex;
133
+ .x-taro-auth-selector,
134
+ .x-taro-auth-method-tabs {
101
135
  width: 100%;
102
- padding: 8px;
103
- background: var(--x-color-muted);
104
- border-radius: var(--x-radius-lg);
105
- gap: 8px;
136
+ min-width: 0;
106
137
  }
107
138
 
108
- .x-taro-auth-selector > button {
109
- flex: 1;
139
+ .x-taro-auth-panel__header--center {
140
+ align-items: center;
141
+ text-align: center;
110
142
  }
111
143
 
112
144
  .x-taro-auth-form__meta,
@@ -127,45 +159,49 @@
127
159
  }
128
160
 
129
161
  .x-taro-auth-form__actions {
130
- justify-content: flex-end;
131
- gap: 20px;
162
+ flex-direction: column-reverse;
163
+ align-items: center;
164
+ gap: var(--x-space-3);
132
165
  }
133
166
 
134
167
  .x-taro-auth-panel__footer {
135
168
  justify-content: center;
136
- margin-top: 36px;
137
- color: var(--x-color-muted-foreground);
138
- font-size: 28px;
139
- gap: 8px;
169
+ margin-top: var(--x-space-6);
170
+ color: var(--muted-foreground);
171
+ font-size: var(--x-font-size-sm);
172
+ gap: var(--x-space-1);
140
173
  }
141
174
 
142
175
  .x-taro-auth-divider {
143
- color: var(--x-color-muted-foreground);
144
- font-size: 24px;
145
- gap: 20px;
176
+ color: var(--muted-foreground);
177
+ font-size: var(--x-font-size-xs);
178
+ gap: var(--x-space-2);
146
179
  }
147
180
 
148
- .x-taro-auth-divider > view {
181
+ .x-taro-auth-divider__line {
149
182
  flex: 1;
150
- height: 2px;
151
- background: var(--x-color-border);
183
+ height: var(--x-space-px);
184
+ background: var(--border);
152
185
  }
153
186
 
154
187
  .x-taro-auth-phone {
188
+ box-sizing: border-box;
155
189
  width: 100%;
156
190
  min-width: 0;
157
191
  overflow: hidden;
158
- background: var(--x-color-background);
159
- border: 2px solid var(--x-color-input);
192
+ background: var(--background);
193
+ border: var(--x-space-px) solid var(--input);
160
194
  border-radius: var(--x-radius-lg);
161
195
  }
162
196
 
163
197
  .x-taro-auth-phone__country {
198
+ font-size: var(--x-taro-auth-phone-font-size);
199
+ line-height: 1.5;
164
200
  box-sizing: border-box;
165
- min-height: 84px;
166
- padding: 0 24px;
167
- border-right: 2px solid var(--x-color-border);
168
- gap: 12px;
201
+ min-height: calc(var(--x-taro-auth-phone-height) - var(--x-space-px) * 2);
202
+ padding: 0 var(--x-space-3);
203
+ border-right: var(--x-space-px) solid var(--border);
204
+ gap: calc(var(--x-space-1) + var(--x-space-1) / 2);
169
205
  }
170
206
 
171
207
  .x-taro-auth-phone__input {
@@ -177,23 +213,27 @@
177
213
 
178
214
  .x-taro-auth-steps {
179
215
  display: flex;
180
- margin-bottom: 44px;
181
- gap: 20px;
216
+ margin-bottom: var(--x-space-6);
217
+ gap: var(--x-space-2);
182
218
  }
183
219
 
184
- .x-taro-auth-steps > view {
220
+ .x-taro-auth-step {
185
221
  display: flex;
186
222
  flex: 1;
187
- padding-bottom: 16px;
188
- color: var(--x-color-muted-foreground);
189
- border-bottom: 4px solid var(--x-color-border);
190
- font-size: 24px;
191
- gap: 10px;
223
+ min-width: 0;
224
+ flex-direction: column;
225
+ align-items: flex-start;
226
+ line-height: 1.5;
227
+ padding-bottom: var(--x-space-2);
228
+ color: var(--muted-foreground);
229
+ border-bottom: calc(var(--x-space-1) / 2) solid var(--border);
230
+ font-size: var(--x-font-size-xs);
231
+ gap: calc(var(--x-space-1) + var(--x-space-px));
192
232
  }
193
233
 
194
- .x-taro-auth-steps > view[data-active='true'] {
195
- color: var(--x-color-foreground);
196
- border-bottom-color: var(--x-color-foreground);
234
+ .x-taro-auth-step[data-active='true'] {
235
+ color: var(--foreground);
236
+ border-bottom-color: var(--foreground);
197
237
  font-weight: 600;
198
238
  }
199
239
 
@@ -209,7 +249,7 @@
209
249
  @keyframes x-taro-auth-step-enter {
210
250
  from {
211
251
  opacity: 0;
212
- transform: translate3d(28px, 0, 0);
252
+ transform: translate3d(var(--x-font-size-sm), 0, 0);
213
253
  }
214
254
 
215
255
  to {
@@ -221,7 +261,7 @@
221
261
  @keyframes x-taro-auth-step-back {
222
262
  from {
223
263
  opacity: 0;
224
- transform: translate3d(-28px, 0, 0);
264
+ transform: translate3d(calc(-1 * var(--x-font-size-sm)), 0, 0);
225
265
  }
226
266
 
227
267
  to {
@@ -232,28 +272,38 @@
232
272
 
233
273
  .x-taro-auth-quick {
234
274
  position: relative;
235
- padding-top: 8px;
236
- }
237
-
238
- .x-taro-auth-quick__back,
239
- .x-taro-auth-quick__close {
240
- position: absolute;
241
- top: -16px;
242
- z-index: 1;
243
- width: 72px;
244
- min-width: 72px;
245
- height: 72px;
246
- padding: 0;
247
- background: var(--x-color-muted);
248
- border-radius: var(--x-radius-full);
275
+ padding-top: var(--x-space-1);
249
276
  }
250
277
 
251
- .x-taro-auth-quick__back {
252
- left: -16px;
278
+ .x-taro-auth-quick__nav {
279
+ display: flex;
280
+ justify-content: space-between;
281
+ margin-bottom: var(--x-space-3);
253
282
  }
254
-
255
- .x-taro-auth-quick__close {
256
- right: -16px;
283
+ .x-taro-auth-quick__nav:empty {
284
+ display: none;
285
+ }
286
+ .x-taro-auth-quick__nav--close {
287
+ justify-content: flex-end;
288
+ }
289
+ .x-taro-auth-step__number {
290
+ display: flex;
291
+ align-items: center;
292
+ justify-content: center;
293
+ width: var(--x-space-6);
294
+ height: var(--x-space-6);
295
+ border-radius: var(--x-radius-full);
296
+ background: var(--muted);
297
+ }
298
+ .x-taro-auth-step[data-active='true'] .x-taro-auth-step__number {
299
+ background: var(--primary);
300
+ color: var(--primary-foreground);
301
+ }
302
+ .x-taro-auth-panel__footer {
303
+ flex-wrap: wrap;
304
+ }
305
+ .x-taro-auth-security__value {
306
+ overflow-wrap: anywhere;
257
307
  }
258
308
 
259
309
  .x-taro-auth-success {
@@ -262,7 +312,7 @@
262
312
  }
263
313
 
264
314
  .x-taro-auth-success__title {
265
- font-size: 36px;
315
+ font-size: var(--x-font-size-lg);
266
316
  font-weight: 700;
267
317
  }
268
318
 
@@ -272,17 +322,20 @@
272
322
 
273
323
  .x-taro-auth-security__list {
274
324
  overflow: hidden;
275
- background: var(--x-color-card);
276
- border: 2px solid var(--x-color-border);
325
+ background: var(--card);
326
+ border: var(--x-space-px) solid var(--border);
277
327
  border-radius: var(--x-radius-xl);
278
328
  }
279
329
 
280
330
  .x-taro-auth-security__row {
281
331
  box-sizing: border-box;
282
- min-height: 168px;
283
- padding: var(--x-taro-auth-security-row-padding, 32px 36px);
284
- border-bottom: 2px solid var(--x-color-border);
285
- gap: 24px;
332
+ min-height: calc(var(--x-space-10) + var(--x-space-12));
333
+ padding: var(
334
+ --x-taro-auth-security-row-padding,
335
+ var(--x-space-4) calc(var(--x-space-4) + calc(var(--x-space-1) / 2))
336
+ );
337
+ border-bottom: var(--x-space-px) solid var(--border);
338
+ gap: var(--x-space-3);
286
339
  }
287
340
 
288
341
  .x-taro-auth-security__row:last-child {
@@ -294,18 +347,22 @@
294
347
  flex: 1;
295
348
  min-width: 0;
296
349
  flex-direction: column;
297
- gap: 8px;
350
+ gap: var(--x-space-1);
298
351
  }
299
352
 
300
- @media (max-width: 840px) {
353
+ @media (max-width: 40em) {
301
354
  .x-taro-auth-panel--card {
302
- padding: 40px 32px;
355
+ padding: var(--x-taro-auth-panel-padding, var(--x-space-6) var(--x-space-5));
303
356
  border-radius: var(--x-radius-lg);
304
357
  }
305
358
 
359
+ .x-taro-auth-panel__title {
360
+ font-size: var(--x-font-size-2xl);
361
+ }
362
+
306
363
  .x-taro-auth-security__row {
307
- min-height: 152px;
308
- padding: 28px;
364
+ min-height: calc(var(--x-space-10) + var(--x-space-8));
365
+ padding: var(--x-space-4);
309
366
  }
310
367
  }
311
368
 
@@ -314,3 +371,8 @@
314
371
  animation: none;
315
372
  }
316
373
  }
374
+
375
+ /* A footer inside a form already participates in its gap. */
376
+ .x-taro-auth-form > .x-taro-auth-panel__footer {
377
+ margin-top: 0;
378
+ }
package/lib/auth/theme.js CHANGED
@@ -28,14 +28,17 @@ function cssValue(value) {
28
28
  return typeof value === "number" ? `${value}px` : value;
29
29
  }
30
30
  function authThemeTokensToStyle(tokens) {
31
- return {
31
+ const style = {
32
32
  "--x-taro-auth-dialog-max-width": cssValue(tokens == null ? void 0 : tokens.dialogMaxWidth),
33
- "--x-taro-auth-form-gap": cssValue(tokens == null ? void 0 : tokens.formGap),
34
- "--x-taro-auth-motion-duration": cssValue(tokens == null ? void 0 : tokens.motionDuration),
35
- "--x-taro-auth-panel-max-width": cssValue(tokens == null ? void 0 : tokens.panelMaxWidth),
33
+ "--x-taro-auth-form-gap": cssValue((tokens == null ? void 0 : tokens.formGap) ?? 18),
34
+ "--x-taro-auth-motion-duration": typeof (tokens == null ? void 0 : tokens.motionDuration) === "number" ? `${tokens.motionDuration}ms` : tokens == null ? void 0 : tokens.motionDuration,
35
+ "--x-taro-auth-panel-max-width": cssValue((tokens == null ? void 0 : tokens.panelMaxWidth) ?? 460),
36
36
  "--x-taro-auth-panel-padding": cssValue(tokens == null ? void 0 : tokens.panelPadding),
37
37
  "--x-taro-auth-security-row-padding": cssValue(tokens == null ? void 0 : tokens.securityRowPadding)
38
38
  };
39
+ return Object.fromEntries(
40
+ Object.entries(style).filter(([, value]) => value !== void 0)
41
+ );
39
42
  }
40
43
  function resolveAuthThemeTokens(base, override) {
41
44
  return { ...base, ...override };
@@ -5,7 +5,7 @@ interface RenderTextNodeAttributes {
5
5
  className?: string;
6
6
  'data-slot'?: string;
7
7
  }
8
- export declare const renderTextNode: (node: React.ReactNode, style: React.CSSProperties, attributes?: RenderTextNodeAttributes) => true | Iterable<React.ReactNode> | React.JSX.Element | null;
8
+ export declare const renderTextNode: (node: React.ReactNode, style: React.CSSProperties, attributes?: RenderTextNodeAttributes) => true | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null;
9
9
  export declare const getStatusColor: (status: 'normal' | 'success' | 'warning' | 'error' | 'info', colors: {
10
10
  primary: string;
11
11
  success: string;
@@ -57,6 +57,7 @@ var Button = ({
57
57
  size: sizeProp,
58
58
  shape = "default",
59
59
  block = false,
60
+ compact = false,
60
61
  disabled: disabledProp = false,
61
62
  loading = false,
62
63
  icon,
@@ -126,12 +127,15 @@ var Button = ({
126
127
  const shapeRadius = shape === "rounded" || shape === "round" ? "var(--x-radius-full)" : shape === "square" || shape === "rectangular" ? 0 : buttonStyle.borderRadius;
127
128
  const combinedStyle = {
128
129
  ...buttonStyle,
130
+ ...resolvedVariant === "link" ? { borderWidth: 0, textDecoration: "underline" } : {},
131
+ ...compact ? { height: "auto", minHeight: 0, minWidth: 0, padding: 0, width: block ? "100%" : "auto" } : {},
129
132
  borderRadius: shapeRadius,
130
133
  gap: typeof gap === "number" ? `${gap}px` : gap,
131
134
  ...style,
132
135
  ...pressStyle,
133
136
  transition: "transform var(--x-duration-fast) var(--x-easing-standard), background-color var(--x-duration-emphasis) var(--x-easing-standard), border-color var(--x-duration-emphasis) var(--x-easing-standard), color var(--x-duration-emphasis) var(--x-easing-standard), opacity var(--x-duration-standard) var(--x-easing-standard)"
134
137
  };
138
+ const h5SemanticProps = { role: "button" };
135
139
  const iconNode = loading ? loadingIcon ?? /* @__PURE__ */ import_react.default.createElement(import_icon.Icon, { name: "Loader2", size: buttonTokens.iconSize, spin: true, color: buttonColors.color, block: true }) : icon;
136
140
  const renderedIconNode = import_react.default.isValidElement(iconNode) ? import_react.default.cloneElement(iconNode, {
137
141
  color: iconNode.props.color == null || iconNode.props.color === "currentColor" ? String(buttonStyle.color) : iconNode.props.color
@@ -142,6 +146,7 @@ var Button = ({
142
146
  fontWeight: buttonStyle.fontWeight,
143
147
  lineHeight: `${buttonTokens.lineHeight}px`,
144
148
  textAlign: "center",
149
+ textDecoration: resolvedVariant === "link" ? "underline" : void 0,
145
150
  whiteSpace: block ? "normal" : "nowrap",
146
151
  wordBreak: "keep-all"
147
152
  };
@@ -184,6 +189,7 @@ var Button = ({
184
189
  style: combinedStyle,
185
190
  disabled: interactionDisabled,
186
191
  formType: htmlType === "button" ? void 0 : htmlType,
192
+ ...h5SemanticProps,
187
193
  ariaLabel,
188
194
  "aria-disabled": interactionDisabled,
189
195
  "data-slot": "button",
@@ -194,6 +200,7 @@ var Button = ({
194
200
  "data-loading": loading ? "true" : "false",
195
201
  "data-disabled": interactionDisabled ? "true" : "false",
196
202
  "data-block": block ? "true" : "false",
203
+ "data-compact": compact ? "true" : "false",
197
204
  "data-icon-only": iconOnly ? "true" : "false",
198
205
  ...handlers
199
206
  },
@@ -24,6 +24,12 @@ export interface ButtonProps {
24
24
  shape?: 'default' | 'rounded' | 'round' | 'square' | 'rectangular';
25
25
  /** Full width button */
26
26
  block?: boolean;
27
+ /**
28
+ * Remove padding and preset dimensions for inline actions; preserve block width.
29
+ * Base button margins are zero. Sibling spacing belongs to the parent gap/layout.
30
+ * `variant="link"` alone does not remove size padding. Explicit style overrides still win.
31
+ */
32
+ compact?: boolean;
27
33
  /** Disabled state */
28
34
  disabled?: boolean;
29
35
  /** Loading state */
@@ -419,6 +419,7 @@ var CapsuleTabs = ({
419
419
  })
420
420
  );
421
421
  const panels = resolvedItems.map((item) => {
422
+ if (item.children == null) return null;
422
423
  const active = item.key === currentKey;
423
424
  if (!active && !item.forceRender) return null;
424
425
  if (!active && item.destroyOnClose) return null;
@@ -333,6 +333,9 @@ export declare const lucideIconNodes: {
333
333
  }], readonly ["path", {
334
334
  readonly d: "m15 5 4 4";
335
335
  }]];
336
+ readonly Phone: readonly [readonly ["path", {
337
+ readonly d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z";
338
+ }]];
336
339
  readonly Plus: readonly [readonly ["path", {
337
340
  readonly d: "M5 12h14";
338
341
  }], readonly ["path", {
@@ -534,6 +537,13 @@ export declare const lucideIconNodes: {
534
537
  readonly cy: "7";
535
538
  readonly r: "4";
536
539
  }]];
540
+ readonly UserRound: readonly [readonly ["circle", {
541
+ readonly cx: "12";
542
+ readonly cy: "8";
543
+ readonly r: "5";
544
+ }], readonly ["path", {
545
+ readonly d: "M20 21a8 8 0 0 0-16 0";
546
+ }]];
537
547
  readonly Users: readonly [readonly ["path", {
538
548
  readonly d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2";
539
549
  }], readonly ["circle", {
@@ -770,6 +770,14 @@ var lucideIconNodes = {
770
770
  }
771
771
  ]
772
772
  ],
773
+ Phone: [
774
+ [
775
+ "path",
776
+ {
777
+ d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"
778
+ }
779
+ ]
780
+ ],
773
781
  Plus: [
774
782
  [
775
783
  "path",
@@ -1295,6 +1303,22 @@ var lucideIconNodes = {
1295
1303
  }
1296
1304
  ]
1297
1305
  ],
1306
+ UserRound: [
1307
+ [
1308
+ "circle",
1309
+ {
1310
+ cx: "12",
1311
+ cy: "8",
1312
+ r: "5"
1313
+ }
1314
+ ],
1315
+ [
1316
+ "path",
1317
+ {
1318
+ d: "M20 21a8 8 0 0 0-16 0"
1319
+ }
1320
+ ]
1321
+ ],
1298
1322
  Users: [
1299
1323
  [
1300
1324
  "path",
@@ -207,6 +207,9 @@ var InputItem = import_react.default.forwardRef((props, ref) => {
207
207
  ...style
208
208
  };
209
209
  const inputStyle = {
210
+ // H5 renders Input as a host around .weui-input; center that child while
211
+ // preserving the full-height native hit target. Miniapp owns its text layout.
212
+ ...process.env.TARO_ENV === "h5" ? { display: "flex", alignItems: "center" } : {},
210
213
  minWidth: 0,
211
214
  width: "100%",
212
215
  flex: 1,
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { ListItemProps, ListProps } from './types';
3
3
  export declare const ListItem: React.FC<ListItemProps>;
4
- export declare const List: (<T>({ dataSource, renderItem, keyExtractor, emptyText, loading, loadingText, divider, header, headerFontSize, prefixWidth, mode, variant, children, className, style, testID, ...viewProps }: ListProps<T>) => React.JSX.Element) & {
4
+ export declare const List: (<T>({ dataSource, renderItem, keyExtractor, emptyText, loading, loadingText, divider, header, headerFontSize, prefixWidth, mode, variant, children, className, style, testID, ...viewProps }: ListProps<T>) => import("react/jsx-runtime").JSX.Element) & {
5
5
  displayName: string;
6
6
  Item: React.FC<ListItemProps>;
7
7
  };
@@ -167,19 +167,24 @@ var Pagination = ({
167
167
  {
168
168
  "data-slot": "pagination-total",
169
169
  style: {
170
- flexShrink: 0,
170
+ flexShrink: 1,
171
+ minWidth: 0,
172
+ maxWidth: "100%",
171
173
  display: "flex",
172
174
  alignItems: "center",
173
- height: sizeTokens.buttonSize
175
+ minHeight: sizeTokens.buttonSize
174
176
  }
175
177
  },
176
178
  /* @__PURE__ */ import_react.default.createElement(
177
179
  import_components.Text,
178
180
  {
179
181
  style: {
182
+ maxWidth: "100%",
180
183
  fontSize: sizeTokens.fontSize,
181
- lineHeight: `${sizeTokens.buttonSize}px`,
182
- color: palette.summary
184
+ lineHeight: `${sizeTokens.textLineHeight}px`,
185
+ color: palette.summary,
186
+ whiteSpace: "normal",
187
+ overflowWrap: "anywhere"
183
188
  }
184
189
  },
185
190
  content
@@ -230,7 +235,12 @@ var Pagination = ({
230
235
  ariaLabel: `第 ${pageNumber} 页`,
231
236
  disabled,
232
237
  onPress: () => changePage(pageNumber),
233
- style: getButtonStyle({ active: isActive, disabledState: disabled })
238
+ style: {
239
+ ...getButtonStyle({ active: isActive, disabledState: disabled }),
240
+ width: "auto",
241
+ paddingLeft: sizeTokens.ellipsisPaddingX,
242
+ paddingRight: sizeTokens.ellipsisPaddingX
243
+ }
234
244
  },
235
245
  /* @__PURE__ */ import_react.default.createElement(import_components.Text, { style: getPageTextStyle(isActive) }, pageNumber)
236
246
  );
@@ -382,6 +392,9 @@ var Pagination = ({
382
392
  flexDirection: "row",
383
393
  flexWrap: "wrap",
384
394
  alignItems: "center",
395
+ minWidth: 0,
396
+ maxWidth: "100%",
397
+ boxSizing: "border-box",
385
398
  gap: sizeTokens.gap,
386
399
  ...style
387
400
  }
@@ -398,6 +411,7 @@ var Pagination = ({
398
411
  flexWrap: "wrap",
399
412
  alignItems: "center",
400
413
  gap: groupGap,
414
+ minWidth: 0,
401
415
  maxWidth: "100%",
402
416
  overflowX: "visible"
403
417
  }