@xaui/native 0.9.1-alpha.21 → 0.9.1-alpha.23

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 (81) hide show
  1. package/dist/{chunk-RMLFMRWL.js → chunk-2U6JR7BF.js} +5 -5
  2. package/dist/{chunk-N7C4UNUL.js → chunk-3JATAB7S.js} +23 -1
  3. package/dist/chunk-4MHJOWM4.cjs +364 -0
  4. package/dist/{chunk-2WMVDMFV.cjs → chunk-6HXWQ5AU.cjs} +2 -2
  5. package/dist/chunk-6WW4CSPY.cjs +82 -0
  6. package/dist/chunk-AHL33YAO.js +425 -0
  7. package/dist/{chunk-XHZBXYVU.js → chunk-AKXG43S4.js} +1 -1
  8. package/dist/{chunk-4NE3SLTM.cjs → chunk-BH5DSJVX.cjs} +102 -73
  9. package/dist/{chunk-BPBY7ON7.cjs → chunk-BNWS26PX.cjs} +19 -21
  10. package/dist/{chunk-5LC6KVL3.cjs → chunk-DXGQ43IV.cjs} +3 -3
  11. package/dist/chunk-E3LXUXE7.js +451 -0
  12. package/dist/{chunk-ISVUXVFL.js → chunk-FNQF4KQV.js} +19 -71
  13. package/dist/{chunk-YRCUALUQ.js → chunk-FTCTTBLG.js} +7 -9
  14. package/dist/{chunk-JL27KVRT.js → chunk-FVP5FUVS.js} +3 -3
  15. package/dist/{chunk-UL263KGM.cjs → chunk-GBPWTFTU.cjs} +10 -10
  16. package/dist/{chunk-TUJBDS5M.js → chunk-GG2WWCBK.js} +10 -10
  17. package/dist/{chunk-EVXZGNPA.cjs → chunk-HUZ4AUM2.cjs} +98 -98
  18. package/dist/chunk-I6PE5UUH.cjs +425 -0
  19. package/dist/{chunk-33QILJJH.cjs → chunk-IBEX4XGV.cjs} +11 -11
  20. package/dist/{chunk-IBRVMLUF.js → chunk-KM2TI5IC.js} +107 -80
  21. package/dist/chunk-OGC4RKE3.js +364 -0
  22. package/dist/{chunk-JXLRHKCQ.js → chunk-OYZYWWJ6.js} +1 -1
  23. package/dist/{chunk-EXX6ATAS.js → chunk-PMO62QK4.js} +101 -101
  24. package/dist/{chunk-UBA6AEY6.cjs → chunk-RAWOJ3N3.cjs} +8 -8
  25. package/dist/chunk-TIP3T7JJ.cjs +451 -0
  26. package/dist/{chunk-APCBIHLR.cjs → chunk-VDRRD6GM.cjs} +29 -81
  27. package/dist/{chunk-UVO4GFSW.cjs → chunk-YXVKQMCK.cjs} +23 -1
  28. package/dist/chunk-ZQ3JSWRO.js +82 -0
  29. package/dist/close-button.type-BUYuoSt2.d.ts +36 -0
  30. package/dist/close-button.type-CHsgZ3wO.d.cts +36 -0
  31. package/dist/components/alert/index.cjs +17 -0
  32. package/dist/components/alert/index.d.cts +169 -0
  33. package/dist/components/alert/index.d.ts +169 -0
  34. package/dist/components/alert/index.js +17 -0
  35. package/dist/components/button/index.cjs +6 -7
  36. package/dist/components/button/index.d.cts +74 -125
  37. package/dist/components/button/index.d.ts +74 -125
  38. package/dist/components/button/index.js +5 -6
  39. package/dist/components/card/index.cjs +5 -6
  40. package/dist/components/card/index.d.cts +74 -74
  41. package/dist/components/card/index.d.ts +74 -74
  42. package/dist/components/card/index.js +4 -5
  43. package/dist/components/chip/index.cjs +17 -0
  44. package/dist/components/chip/index.d.cts +608 -0
  45. package/dist/components/chip/index.d.ts +608 -0
  46. package/dist/components/chip/index.js +17 -0
  47. package/dist/components/input/index.cjs +14 -0
  48. package/dist/components/input/index.d.cts +213 -0
  49. package/dist/components/input/index.d.ts +213 -0
  50. package/dist/components/input/index.js +14 -0
  51. package/dist/components/typography/index.cjs +4 -4
  52. package/dist/components/typography/index.d.cts +4 -4
  53. package/dist/components/typography/index.d.ts +4 -4
  54. package/dist/components/typography/index.js +3 -3
  55. package/dist/components/view/index.cjs +3 -3
  56. package/dist/components/view/index.d.cts +7 -7
  57. package/dist/components/view/index.d.ts +7 -7
  58. package/dist/components/view/index.js +2 -2
  59. package/dist/{create-recipe-CC3NNCqF.d.ts → create-recipe-C4JkINrA.d.ts} +18 -5
  60. package/dist/{create-recipe-CPBFg7ym.d.cts → create-recipe-dBN_ewZc.d.cts} +18 -5
  61. package/dist/{icon.type-Cs1tMX0W.d.cts → icon.type-CF4KiMKl.d.cts} +1 -1
  62. package/dist/{icon.type-BkcEPJbK.d.ts → icon.type-Dq4_qePa.d.ts} +1 -1
  63. package/dist/index.cjs +44 -14
  64. package/dist/index.d.cts +9 -5
  65. package/dist/index.d.ts +9 -5
  66. package/dist/index.js +74 -44
  67. package/dist/{pressable-feedback.type-wfeiJz5m.d.cts → pressable-feedback.type-BA2C9sSz.d.cts} +1 -1
  68. package/dist/{pressable-feedback.type-DsvWZXWC.d.ts → pressable-feedback.type-Bs4dQlGj.d.ts} +1 -1
  69. package/dist/{style-props.type-B1BG5TCm.d.cts → style-props.type-CfnoGEP7.d.cts} +1 -1
  70. package/dist/{style-props.type-B1BG5TCm.d.ts → style-props.type-CfnoGEP7.d.ts} +1 -1
  71. package/dist/system/index.cjs +15 -7
  72. package/dist/system/index.d.cts +175 -101
  73. package/dist/system/index.d.ts +175 -101
  74. package/dist/system/index.js +15 -7
  75. package/dist/theme/index.cjs +2 -2
  76. package/dist/theme/index.d.cts +10 -10
  77. package/dist/theme/index.d.ts +10 -10
  78. package/dist/theme/index.js +1 -1
  79. package/package.json +31 -1
  80. package/dist/chunk-RRRGLRRP.cjs +0 -28
  81. package/dist/chunk-SGHP76GU.js +0 -28
@@ -0,0 +1,451 @@
1
+ import {
2
+ createRecipe,
3
+ radiusAxis
4
+ } from "./chunk-3JATAB7S.js";
5
+ import {
6
+ useXAUITheme
7
+ } from "./chunk-A3EGFI6T.js";
8
+ import {
9
+ Slot,
10
+ createSlotContext,
11
+ useStyleProps
12
+ } from "./chunk-PMO62QK4.js";
13
+
14
+ // src/components/input/input-description.tsx
15
+ import { forwardRef } from "react";
16
+ import { Text } from "react-native";
17
+
18
+ // src/components/input/input.context.ts
19
+ var [InputProvider, useInput] = createSlotContext("Input");
20
+
21
+ // src/components/input/input-description.tsx
22
+ import { jsx } from "react/jsx-runtime";
23
+ var InputDescription = forwardRef(
24
+ function InputDescription2({ children, style, nativeID, ...props }, ref) {
25
+ const { descriptionStyle, descriptionId } = useInput();
26
+ const [styleProps, rest] = useStyleProps(props);
27
+ return /* @__PURE__ */ jsx(
28
+ Text,
29
+ {
30
+ ref,
31
+ nativeID: nativeID ?? descriptionId,
32
+ style: [descriptionStyle, styleProps, style],
33
+ ...rest,
34
+ children
35
+ }
36
+ );
37
+ }
38
+ );
39
+ InputDescription.displayName = "XAUI.Input.Description";
40
+
41
+ // src/components/input/input-error.tsx
42
+ import { forwardRef as forwardRef2 } from "react";
43
+ import { Text as Text2 } from "react-native";
44
+ import { jsx as jsx2 } from "react/jsx-runtime";
45
+ var InputError = forwardRef2(function InputError2({ children, style, ...props }, ref) {
46
+ const { errorStyle } = useInput();
47
+ const [styleProps, rest] = useStyleProps(props);
48
+ return /* @__PURE__ */ jsx2(Text2, { ref, style: [errorStyle, styleProps, style], ...rest, children });
49
+ });
50
+ InputError.displayName = "XAUI.Input.Error";
51
+
52
+ // src/components/input/input-field.tsx
53
+ import { forwardRef as forwardRef3, useCallback } from "react";
54
+ import { TextInput } from "react-native";
55
+ import { jsx as jsx3 } from "react/jsx-runtime";
56
+ var InputField = forwardRef3(function InputField2({ style, onFocus, onBlur, placeholderTextColor, ...props }, ref) {
57
+ const {
58
+ fieldStyle,
59
+ placeholderTextColor: resolvedPlaceholder,
60
+ onFieldFocus,
61
+ onFieldBlur,
62
+ labelId,
63
+ descriptionId,
64
+ isDisabled,
65
+ isInvalid
66
+ } = useInput();
67
+ const [styleProps, rest] = useStyleProps(props);
68
+ const handleFocus = useCallback(
69
+ (event) => {
70
+ onFieldFocus(event);
71
+ onFocus?.(event);
72
+ },
73
+ [onFieldFocus, onFocus]
74
+ );
75
+ const handleBlur = useCallback(
76
+ (event) => {
77
+ onFieldBlur(event);
78
+ onBlur?.(event);
79
+ },
80
+ [onFieldBlur, onBlur]
81
+ );
82
+ return /* @__PURE__ */ jsx3(
83
+ TextInput,
84
+ {
85
+ ref,
86
+ "aria-labelledby": labelId,
87
+ "aria-describedby": descriptionId,
88
+ "aria-invalid": isInvalid,
89
+ editable: !isDisabled,
90
+ accessibilityState: { disabled: isDisabled },
91
+ placeholderTextColor: placeholderTextColor ?? resolvedPlaceholder,
92
+ ...rest,
93
+ style: [fieldStyle, styleProps, style],
94
+ onFocus: handleFocus,
95
+ onBlur: handleBlur
96
+ }
97
+ );
98
+ });
99
+ InputField.displayName = "XAUI.Input.Field";
100
+
101
+ // src/components/input/input-label.tsx
102
+ import { forwardRef as forwardRef4 } from "react";
103
+ import { Text as Text3 } from "react-native";
104
+ import { jsx as jsx4 } from "react/jsx-runtime";
105
+ var InputLabel = forwardRef4(function InputLabel2({ children, style, nativeID, ...props }, ref) {
106
+ const { labelStyle, labelId } = useInput();
107
+ const [styleProps, rest] = useStyleProps(props);
108
+ return /* @__PURE__ */ jsx4(
109
+ Text3,
110
+ {
111
+ ref,
112
+ nativeID: nativeID ?? labelId,
113
+ style: [labelStyle, styleProps, style],
114
+ ...rest,
115
+ children
116
+ }
117
+ );
118
+ });
119
+ InputLabel.displayName = "XAUI.Input.Label";
120
+
121
+ // src/components/input/input.tsx
122
+ import { forwardRef as forwardRef5, useCallback as useCallback2, useId, useMemo, useState } from "react";
123
+ import { StyleSheet, View } from "react-native";
124
+
125
+ // src/components/input/input.recipe.ts
126
+ var SLOTS = [
127
+ "root",
128
+ "label",
129
+ "field",
130
+ "placeholder",
131
+ "description",
132
+ "error"
133
+ ];
134
+ var VARIANT_TOKENS = {
135
+ primary: {
136
+ bg: "fieldBackground",
137
+ border: "fieldBorder",
138
+ borderFocus: "fieldBorderFocus",
139
+ fg: "fieldForeground"
140
+ },
141
+ // `bg: 'default'` is the neutral *token*, not this variant's name — the two namespaces
142
+ // meet here and nowhere else. It is also what keeps a field visible on a card, where
143
+ // `fieldBackground` is the card's own colour.
144
+ secondary: {
145
+ bg: "default",
146
+ border: "fieldBorder",
147
+ borderFocus: "fieldBorderFocus",
148
+ fg: "fieldForeground"
149
+ },
150
+ tertiary: {
151
+ border: "fieldBorder",
152
+ borderFocus: "fieldBorderFocus",
153
+ fg: "fieldForeground"
154
+ },
155
+ ghost: { borderFocus: "fieldBorderFocus", fg: "fieldForeground" }
156
+ };
157
+ function sizeAxis(step) {
158
+ const { control, padding, gap, field, label, help } = step;
159
+ return (theme) => {
160
+ const inset = { paddingHorizontal: theme.spacing(LABEL_INSET) };
161
+ const helpType = {
162
+ fontSize: theme.fontSizes[help],
163
+ lineHeight: theme.lineHeights[help]
164
+ };
165
+ return {
166
+ root: { gap: theme.spacing(gap) },
167
+ label: {
168
+ ...inset,
169
+ fontSize: theme.fontSizes[label],
170
+ lineHeight: theme.lineHeights[label]
171
+ },
172
+ field: {
173
+ minHeight: theme.controlHeights[control],
174
+ paddingHorizontal: theme.spacing(padding),
175
+ fontSize: theme.fontSizes[field]
176
+ },
177
+ description: { ...inset, ...helpType },
178
+ error: { ...inset, ...helpType }
179
+ };
180
+ };
181
+ }
182
+ var LABEL_INSET = 1.5;
183
+ var SIZES = {
184
+ xs: {
185
+ control: "xs",
186
+ padding: 2.5,
187
+ gap: 1,
188
+ field: "sm",
189
+ label: "sm",
190
+ help: "xs",
191
+ labelInside: "xs"
192
+ },
193
+ sm: {
194
+ control: "sm",
195
+ padding: 3,
196
+ gap: 1,
197
+ field: "md",
198
+ label: "sm",
199
+ help: "xs",
200
+ labelInside: "xs"
201
+ },
202
+ md: {
203
+ control: "md",
204
+ padding: 3,
205
+ gap: 1.5,
206
+ field: "md",
207
+ label: "md",
208
+ help: "sm",
209
+ labelInside: "xs"
210
+ },
211
+ lg: {
212
+ control: "lg",
213
+ padding: 4,
214
+ gap: 2,
215
+ field: "lg",
216
+ label: "lg",
217
+ help: "md",
218
+ labelInside: "sm"
219
+ }
220
+ };
221
+ function insideLabel(step) {
222
+ const { control, padding, field, labelInside } = step;
223
+ return (theme) => {
224
+ const top = theme.spacing(LABEL_INSIDE_TOP);
225
+ const block = top + theme.lineHeights[labelInside];
226
+ return {
227
+ label: {
228
+ position: "absolute",
229
+ top,
230
+ // `start`, never `left` (R13): RTL mirrors the logical property and only it.
231
+ start: theme.spacing(padding),
232
+ paddingHorizontal: 0,
233
+ fontSize: theme.fontSizes[labelInside],
234
+ lineHeight: theme.lineHeights[labelInside]
235
+ },
236
+ // The height is built from the two lines it now holds rather than added to the
237
+ // control height: `controlHeights` already pays for centring one line, so adding
238
+ // the label's block to it would pay for that room twice. It is floored at the
239
+ // control height all the same, so a theme that raises `controlHeights` does not end
240
+ // up with an inside field shorter than the outside one beside it.
241
+ field: {
242
+ minHeight: Math.max(
243
+ block + theme.lineHeights[field] + top,
244
+ theme.controlHeights[control]
245
+ ),
246
+ paddingTop: block,
247
+ paddingBottom: top
248
+ }
249
+ };
250
+ };
251
+ }
252
+ var LABEL_INSIDE_TOP = 1.5;
253
+ var inputRecipe = createRecipe({
254
+ slots: SLOTS,
255
+ base: (theme) => ({
256
+ root: { flexDirection: "column" },
257
+ label: {
258
+ fontFamily: theme.fontFamilies.body,
259
+ fontWeight: theme.fontWeights.medium
260
+ },
261
+ field: {
262
+ fontFamily: theme.fontFamilies.body,
263
+ // `regular`, not `medium`: what the user typed is content, not a control's label,
264
+ // and a heavier weight makes a filled field read as a button.
265
+ fontWeight: theme.fontWeights.regular,
266
+ borderWidth: theme.borderWidth.field,
267
+ // The theme has a radius named for this component, so every size uses it and the
268
+ // `radius` axis is what overrides it — the same shape a `Chip` takes from `full`.
269
+ borderRadius: theme.radius.field,
270
+ borderCurve: "continuous",
271
+ // RN centres a single line inside `minHeight` on iOS and pins it to the top on
272
+ // Android. Saying it removes a difference nobody chose.
273
+ textAlignVertical: "center"
274
+ },
275
+ // Not a node — the root flattens this one into `placeholderTextColor`, which is a
276
+ // `TextInput` prop rather than a style.
277
+ placeholder: { color: theme.colors.fieldPlaceholder },
278
+ description: {
279
+ fontFamily: theme.fontFamilies.body,
280
+ color: theme.colors.muted
281
+ },
282
+ error: {
283
+ fontFamily: theme.fontFamilies.body,
284
+ color: theme.colors.danger
285
+ }
286
+ }),
287
+ variantTokens: VARIANT_TOKENS,
288
+ /**
289
+ * Where the variant's colours land. The border width follows the *presence* of the
290
+ * border role, so `ghost` needs no rule of its own to say it has no edge.
291
+ *
292
+ * The label is **not** painted from the variant: it sits outside the box, on the screen
293
+ * behind it, so it takes `foreground` and not the field's own text colour. That is also
294
+ * why a tinted input does not tint its label — the tint is the field's, not the form's.
295
+ */
296
+ paint: (theme, colors) => ({
297
+ field: {
298
+ backgroundColor: colors.bg,
299
+ borderColor: colors.border,
300
+ borderWidth: colors.border ? theme.borderWidth.field : 0,
301
+ color: colors.fg
302
+ },
303
+ label: { color: theme.colors.foreground }
304
+ }),
305
+ /**
306
+ * Declaration order is application order, and it is load-bearing here: `isInvalid`
307
+ * comes after `size` so its border wins, and it must also outrank focus — which is why
308
+ * the root passes `focused` only when the field is *not* invalid, rather than relying
309
+ * on an order that states cannot express.
310
+ */
311
+ variants: {
312
+ size: {
313
+ xs: sizeAxis(SIZES.xs),
314
+ sm: sizeAxis(SIZES.sm),
315
+ md: sizeAxis(SIZES.md),
316
+ lg: sizeAxis(SIZES.lg)
317
+ },
318
+ radius: radiusAxis("field"),
319
+ /**
320
+ * `outside` is the base behaviour, so it adds nothing — it is declared because an
321
+ * axis needs both of its values for the selection to be typed, and because a reader
322
+ * looking for "what does outside do" should find the answer here rather than infer it
323
+ * from an absence. The size-dependent half of `inside` is in `compoundVariants`.
324
+ */
325
+ labelPlacement: {
326
+ outside: () => ({}),
327
+ inside: () => ({})
328
+ },
329
+ isInvalid: {
330
+ true: (theme) => ({
331
+ field: { borderColor: theme.colors.danger },
332
+ // The label and the description turn with it: on a long form the field that is
333
+ // wrong has to be findable without reading every message.
334
+ label: { color: theme.colors.danger },
335
+ description: { color: theme.colors.danger }
336
+ })
337
+ }
338
+ },
339
+ /**
340
+ * The focus treatment is the border darkening towards the mode's ink — the theme's
341
+ * `fieldBorderFocus`, which is `fieldBorder` mixed 26% towards `fieldForeground`. No
342
+ * ring and no accent: a form where every focused field flashes the brand colour is a
343
+ * form where the accent has stopped meaning "the action".
344
+ *
345
+ * `borderFocus` is a role rather than a token named here, so a raw `color` follows the
346
+ * field into focus the same way it follows a `Button` into its pressed state.
347
+ */
348
+ /**
349
+ * What `primary` adds to a filled field, and the four halves of the inside label that
350
+ * need to know the size — a compound is how the engine expresses a rule that depends on
351
+ * two axes at once.
352
+ */
353
+ compoundVariants: [
354
+ {
355
+ when: { variant: "primary" },
356
+ style: (theme) => ({ field: theme.shadows.field })
357
+ },
358
+ { when: { size: "xs", labelPlacement: "inside" }, style: insideLabel(SIZES.xs) },
359
+ { when: { size: "sm", labelPlacement: "inside" }, style: insideLabel(SIZES.sm) },
360
+ { when: { size: "md", labelPlacement: "inside" }, style: insideLabel(SIZES.md) },
361
+ { when: { size: "lg", labelPlacement: "inside" }, style: insideLabel(SIZES.lg) }
362
+ ],
363
+ states: {
364
+ focused: (_theme, colors) => ({ field: { borderColor: colors.borderFocus } }),
365
+ disabled: (theme) => ({ root: { opacity: theme.opacity.disabled } })
366
+ },
367
+ defaultVariants: { variant: "secondary", size: "md", labelPlacement: "outside" }
368
+ });
369
+
370
+ // src/components/input/input.tsx
371
+ import { jsx as jsx5 } from "react/jsx-runtime";
372
+ var InputRoot = forwardRef5(function Input({
373
+ children,
374
+ variant,
375
+ size,
376
+ radius,
377
+ labelPlacement,
378
+ color,
379
+ isInvalid = false,
380
+ isDisabled = false,
381
+ asChild = false,
382
+ style,
383
+ ...props
384
+ }, ref) {
385
+ const theme = useXAUITheme();
386
+ const [styleProps, rest] = useStyleProps(props);
387
+ const [isFocused, setIsFocused] = useState(false);
388
+ const onFieldFocus = useCallback2(() => setIsFocused(true), []);
389
+ const onFieldBlur = useCallback2(() => setIsFocused(false), []);
390
+ const id = useId();
391
+ const labelId = `${id}-label`;
392
+ const descriptionId = `${id}-description`;
393
+ const selection = {
394
+ variant,
395
+ size,
396
+ radius,
397
+ labelPlacement,
398
+ isInvalid: isInvalid ? "true" : void 0
399
+ };
400
+ const states = { focused: isFocused && !isInvalid, disabled: isDisabled };
401
+ const styles = inputRecipe.resolve({ theme, selection, states });
402
+ const tint = color ? inputRecipe.tint({ theme, color, selection, states }) : void 0;
403
+ const context = useMemo(() => {
404
+ const placeholder = StyleSheet.flatten(styles.placeholder);
405
+ return {
406
+ labelStyle: tint ? [styles.label, tint.label] : styles.label,
407
+ fieldStyle: tint ? [styles.field, tint.field] : styles.field,
408
+ descriptionStyle: styles.description,
409
+ errorStyle: styles.error,
410
+ // `ColorValue` also covers the platform's opaque colours, which `TextInput` cannot
411
+ // take for a placeholder.
412
+ placeholderTextColor: typeof placeholder.color === "string" ? placeholder.color : void 0,
413
+ onFieldFocus,
414
+ onFieldBlur,
415
+ labelId,
416
+ descriptionId,
417
+ isDisabled,
418
+ isInvalid
419
+ };
420
+ }, [
421
+ styles,
422
+ tint,
423
+ onFieldFocus,
424
+ onFieldBlur,
425
+ labelId,
426
+ descriptionId,
427
+ isDisabled,
428
+ isInvalid
429
+ ]);
430
+ const rootStyle = [styles.root, tint?.root, styleProps, style];
431
+ const surface = asChild ? (
432
+ // R12 — the caller's element *is* the column.
433
+ /* @__PURE__ */ jsx5(Slot, { ref, ...rest, style: rootStyle, children })
434
+ ) : /* @__PURE__ */ jsx5(View, { ref, ...rest, style: rootStyle, children });
435
+ return /* @__PURE__ */ jsx5(InputProvider, { value: context, children: surface });
436
+ });
437
+ InputRoot.displayName = "XAUI.Input.Root";
438
+
439
+ // src/components/input/index.ts
440
+ var Input2 = Object.assign(InputRoot, {
441
+ Label: InputLabel,
442
+ Field: InputField,
443
+ Description: InputDescription,
444
+ Error: InputError
445
+ });
446
+
447
+ export {
448
+ useInput,
449
+ inputRecipe,
450
+ Input2 as Input
451
+ };
@@ -1,9 +1,8 @@
1
- import { usePressState, warnDev } from "./chunk-SGHP76GU.js";
2
- import { Icon } from "./chunk-JL27KVRT.js";
3
- import { PressableFeedback } from "./chunk-IBRVMLUF.js";
4
- import { createRecipe } from "./chunk-N7C4UNUL.js";
5
- import { childrenToString, createSlotContext, useStyleProps } from "./chunk-EXX6ATAS.js";
1
+ import { Icon } from "./chunk-FVP5FUVS.js";
2
+ import { PressableFeedback, usePressState, warnDev } from "./chunk-KM2TI5IC.js";
3
+ import { createRecipe, radiusAxis } from "./chunk-3JATAB7S.js";
6
4
  import { useXAUITheme } from "./chunk-A3EGFI6T.js";
5
+ import { childrenToString, createSlotContext, useStyleProps } from "./chunk-PMO62QK4.js";
7
6
 
8
7
  // src/components/button/button.context.ts
9
8
  var [ButtonProvider, useButton] = createSlotContext("Button");
@@ -74,10 +73,10 @@ function ButtonSpinner({
74
73
  });
75
74
  }
76
75
  ButtonSpinner.displayName = "XAUI.Button.Spinner";
77
- const _worklet_4101557563546_init_data = {
78
- code: "function chunkISVUXVFLJs1(){const{angle}=this.__closure;return{transform:[{rotate:angle.value+\"deg\"}]};}",
79
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-ISVUXVFL.js",
80
- sourceMap: "{\"version\":3,\"names\":[\"chunkISVUXVFLJs1\",\"angle\",\"__closure\",\"transform\",\"rotate\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-ISVUXVFL.js\"],\"mappings\":\"AAoFyC,SAAAA,gBAAMA,CAAA,QAAAC,KAAA,OAAAC,SAAA,CAE3C,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAEC,MAAM,CAAKH,KAAK,CAACI,KAAK,MAAM,CAAC,CAAE,CAAC,CACzD\",\"ignoreList\":[]}"
76
+ const _worklet_763735822272_init_data = {
77
+ code: "function chunkFNQF4KQVJs1(){const{angle}=this.__closure;return{transform:[{rotate:angle.value+\"deg\"}]};}",
78
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-FNQF4KQV.js",
79
+ sourceMap: "{\"version\":3,\"names\":[\"chunkFNQF4KQVJs1\",\"angle\",\"__closure\",\"transform\",\"rotate\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-FNQF4KQV.js\"],\"mappings\":\"AAmFyC,SAAAA,gBAAMA,CAAA,QAAAC,KAAA,OAAAC,SAAA,CAE3C,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAEC,MAAM,CAAKH,KAAK,CAACI,KAAK,MAAM,CAAC,CAAE,CAAC,CACzD\",\"ignoreList\":[]}"
81
80
  };
82
81
  function SpinningRing({
83
82
  style
@@ -90,28 +89,28 @@ function SpinningRing({
90
89
  }), -1, false);
91
90
  return () => cancelAnimation(angle);
92
91
  }, [angle]);
93
- const animatedStyle = useAnimatedStyle(function chunkISVUXVFLJs1Factory({
94
- _worklet_4101557563546_init_data,
92
+ const animatedStyle = useAnimatedStyle(function chunkFNQF4KQVJs1Factory({
93
+ _worklet_763735822272_init_data,
95
94
  angle
96
95
  }) {
97
96
  const _e = [new global.Error(), -2, -27];
98
- const chunkISVUXVFLJs1 = function () {
97
+ const chunkFNQF4KQVJs1 = function () {
99
98
  return {
100
99
  transform: [{
101
100
  rotate: `${angle.value}deg`
102
101
  }]
103
102
  };
104
103
  };
105
- chunkISVUXVFLJs1.__closure = {
104
+ chunkFNQF4KQVJs1.__closure = {
106
105
  angle
107
106
  };
108
- chunkISVUXVFLJs1.__workletHash = 4101557563546;
109
- chunkISVUXVFLJs1.__pluginVersion = "0.7.4";
110
- chunkISVUXVFLJs1.__initData = _worklet_4101557563546_init_data;
111
- chunkISVUXVFLJs1.__stackDetails = _e;
112
- return chunkISVUXVFLJs1;
107
+ chunkFNQF4KQVJs1.__workletHash = 763735822272;
108
+ chunkFNQF4KQVJs1.__pluginVersion = "0.7.4";
109
+ chunkFNQF4KQVJs1.__initData = _worklet_763735822272_init_data;
110
+ chunkFNQF4KQVJs1.__stackDetails = _e;
111
+ return chunkFNQF4KQVJs1;
113
112
  }({
114
- _worklet_4101557563546_init_data,
113
+ _worklet_763735822272_init_data,
115
114
  angle
116
115
  }), [angle]);
117
116
  return /* @__PURE__ */jsx3(Animated.View, {
@@ -273,58 +272,7 @@ var buttonRecipe = createRecipe({
273
272
  radius: "4xl"
274
273
  })
275
274
  },
276
- radius: {
277
- xs: t => ({
278
- root: {
279
- borderRadius: t.radius.xs
280
- }
281
- }),
282
- sm: t => ({
283
- root: {
284
- borderRadius: t.radius.sm
285
- }
286
- }),
287
- md: t => ({
288
- root: {
289
- borderRadius: t.radius.md
290
- }
291
- }),
292
- lg: t => ({
293
- root: {
294
- borderRadius: t.radius.lg
295
- }
296
- }),
297
- xl: t => ({
298
- root: {
299
- borderRadius: t.radius.xl
300
- }
301
- }),
302
- "2xl": t => ({
303
- root: {
304
- borderRadius: t.radius["2xl"]
305
- }
306
- }),
307
- "3xl": t => ({
308
- root: {
309
- borderRadius: t.radius["3xl"]
310
- }
311
- }),
312
- "4xl": t => ({
313
- root: {
314
- borderRadius: t.radius["4xl"]
315
- }
316
- }),
317
- field: t => ({
318
- root: {
319
- borderRadius: t.radius.field
320
- }
321
- }),
322
- full: t => ({
323
- root: {
324
- borderRadius: t.radius.full
325
- }
326
- })
327
- },
275
+ radius: radiusAxis("root"),
328
276
  // A square on a fixed height. No width is computed, and none needs to be.
329
277
  isIconOnly: {
330
278
  true: () => ({
@@ -1,22 +1,20 @@
1
1
  import {
2
+ PressableFeedback,
2
3
  usePressState,
3
4
  warnDev
4
- } from "./chunk-SGHP76GU.js";
5
- import {
6
- PressableFeedback
7
- } from "./chunk-IBRVMLUF.js";
5
+ } from "./chunk-KM2TI5IC.js";
8
6
  import {
9
7
  createRecipe
10
- } from "./chunk-N7C4UNUL.js";
8
+ } from "./chunk-3JATAB7S.js";
9
+ import {
10
+ useXAUITheme
11
+ } from "./chunk-A3EGFI6T.js";
11
12
  import {
12
13
  Slot,
13
14
  childrenToString,
14
15
  createSlotContext,
15
16
  useStyleProps
16
- } from "./chunk-EXX6ATAS.js";
17
- import {
18
- useXAUITheme
19
- } from "./chunk-A3EGFI6T.js";
17
+ } from "./chunk-PMO62QK4.js";
20
18
 
21
19
  // src/components/card/card-background.tsx
22
20
  import { forwardRef } from "react";
@@ -1,9 +1,9 @@
1
- import {
2
- useStyleProps
3
- } from "./chunk-EXX6ATAS.js";
4
1
  import {
5
2
  useXAUITheme
6
3
  } from "./chunk-A3EGFI6T.js";
4
+ import {
5
+ useStyleProps
6
+ } from "./chunk-PMO62QK4.js";
7
7
 
8
8
  // src/system/icon/icon-context.ts
9
9
  import { createContext, useContext } from "react";
@@ -179,7 +179,7 @@ var tokens = {
179
179
  fieldBorder: "#e4e4e7",
180
180
  success: "#15803d",
181
181
  successForeground: "#fafafa",
182
- warning: "#b45309",
182
+ warning: "#c2410c",
183
183
  warningForeground: "#fafafa",
184
184
  danger: "#dc2626",
185
185
  dangerForeground: "#fafafa",
@@ -191,7 +191,7 @@ var tokens = {
191
191
  link: "#18181b",
192
192
  accentPressed: "#8533d3",
193
193
  successPressed: "#1b753a",
194
- warningPressed: "#a34d13",
194
+ warningPressed: "#af3e15",
195
195
  dangerPressed: "#c72927",
196
196
  defaultPressed: "#dbdbde",
197
197
  surfacePressed: "#eaeaea",
@@ -204,9 +204,9 @@ var tokens = {
204
204
  successSoft: "rgba(21, 128, 61, 0.15)",
205
205
  successSoftForeground: "#205f34",
206
206
  successSoftPressed: "rgba(21, 128, 61, 0.2)",
207
- warningSoft: "rgba(180, 83, 9, 0.15)",
208
- warningSoftForeground: "#793f1e",
209
- warningSoftPressed: "rgba(180, 83, 9, 0.2)",
207
+ warningSoft: "rgba(194, 65, 12, 0.15)",
208
+ warningSoftForeground: "#82361e",
209
+ warningSoftPressed: "rgba(194, 65, 12, 0.2)",
210
210
  dangerSoft: "rgba(220, 38, 38, 0.15)",
211
211
  dangerSoftForeground: "#b22b28",
212
212
  dangerSoftPressed: "rgba(220, 38, 38, 0.2)",
@@ -249,7 +249,7 @@ var tokens = {
249
249
  fieldBorder: "#3f3f46",
250
250
  success: "#4ade80",
251
251
  successForeground: "#18181b",
252
- warning: "#fbbf24",
252
+ warning: "#fb923c",
253
253
  warningForeground: "#18181b",
254
254
  danger: "#f87171",
255
255
  dangerForeground: "#18181b",
@@ -261,7 +261,7 @@ var tokens = {
261
261
  link: "#fafafa",
262
262
  accentPressed: "#c691fd",
263
263
  successPressed: "#64e18d",
264
- warningPressed: "#fbc54b",
264
+ warningPressed: "#fc9d55",
265
265
  dangerPressed: "#fa807e",
266
266
  defaultPressed: "#2e2e31",
267
267
  surfacePressed: "#27272a",
@@ -274,9 +274,9 @@ var tokens = {
274
274
  successSoft: "rgba(74, 222, 128, 0.15)",
275
275
  successSoftForeground: "#8de8a6",
276
276
  successSoftPressed: "rgba(74, 222, 128, 0.2)",
277
- warningSoft: "rgba(251, 191, 36, 0.15)",
278
- warningSoftForeground: "#fbd586",
279
- warningSoftPressed: "rgba(251, 191, 36, 0.2)",
277
+ warningSoft: "rgba(251, 146, 60, 0.15)",
278
+ warningSoftForeground: "#feb887",
279
+ warningSoftPressed: "rgba(251, 146, 60, 0.2)",
280
280
  dangerSoft: "rgba(248, 113, 113, 0.15)",
281
281
  dangerSoftForeground: "#fc8f8c",
282
282
  dangerSoftPressed: "rgba(248, 113, 113, 0.2)",