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

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 (75) 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-ISVUXVFL.js → chunk-FNQF4KQV.js} +19 -71
  12. package/dist/{chunk-YRCUALUQ.js → chunk-FTCTTBLG.js} +7 -9
  13. package/dist/{chunk-JL27KVRT.js → chunk-FVP5FUVS.js} +3 -3
  14. package/dist/{chunk-UL263KGM.cjs → chunk-GBPWTFTU.cjs} +10 -10
  15. package/dist/{chunk-TUJBDS5M.js → chunk-GG2WWCBK.js} +10 -10
  16. package/dist/{chunk-EVXZGNPA.cjs → chunk-HUZ4AUM2.cjs} +98 -98
  17. package/dist/chunk-I6PE5UUH.cjs +425 -0
  18. package/dist/{chunk-33QILJJH.cjs → chunk-IBEX4XGV.cjs} +11 -11
  19. package/dist/{chunk-IBRVMLUF.js → chunk-KM2TI5IC.js} +107 -80
  20. package/dist/chunk-OGC4RKE3.js +364 -0
  21. package/dist/{chunk-JXLRHKCQ.js → chunk-OYZYWWJ6.js} +1 -1
  22. package/dist/{chunk-EXX6ATAS.js → chunk-PMO62QK4.js} +101 -101
  23. package/dist/{chunk-UBA6AEY6.cjs → chunk-RAWOJ3N3.cjs} +8 -8
  24. package/dist/{chunk-APCBIHLR.cjs → chunk-VDRRD6GM.cjs} +29 -81
  25. package/dist/{chunk-UVO4GFSW.cjs → chunk-YXVKQMCK.cjs} +23 -1
  26. package/dist/chunk-ZQ3JSWRO.js +82 -0
  27. package/dist/close-button.type-BUYuoSt2.d.ts +36 -0
  28. package/dist/close-button.type-CHsgZ3wO.d.cts +36 -0
  29. package/dist/components/alert/index.cjs +17 -0
  30. package/dist/components/alert/index.d.cts +169 -0
  31. package/dist/components/alert/index.d.ts +169 -0
  32. package/dist/components/alert/index.js +17 -0
  33. package/dist/components/button/index.cjs +6 -7
  34. package/dist/components/button/index.d.cts +193 -244
  35. package/dist/components/button/index.d.ts +193 -244
  36. package/dist/components/button/index.js +5 -6
  37. package/dist/components/card/index.cjs +5 -6
  38. package/dist/components/card/index.d.cts +193 -193
  39. package/dist/components/card/index.d.ts +193 -193
  40. package/dist/components/card/index.js +4 -5
  41. package/dist/components/chip/index.cjs +17 -0
  42. package/dist/components/chip/index.d.cts +608 -0
  43. package/dist/components/chip/index.d.ts +608 -0
  44. package/dist/components/chip/index.js +17 -0
  45. package/dist/components/typography/index.cjs +4 -4
  46. package/dist/components/typography/index.d.cts +4 -4
  47. package/dist/components/typography/index.d.ts +4 -4
  48. package/dist/components/typography/index.js +3 -3
  49. package/dist/components/view/index.cjs +3 -3
  50. package/dist/components/view/index.d.cts +7 -7
  51. package/dist/components/view/index.d.ts +7 -7
  52. package/dist/components/view/index.js +2 -2
  53. package/dist/{create-recipe-CC3NNCqF.d.ts → create-recipe-CbXika57.d.ts} +4 -3
  54. package/dist/{create-recipe-CPBFg7ym.d.cts → create-recipe-jHlk434p.d.cts} +4 -3
  55. package/dist/{icon.type-Cs1tMX0W.d.cts → icon.type-CF4KiMKl.d.cts} +1 -1
  56. package/dist/{icon.type-BkcEPJbK.d.ts → icon.type-Dq4_qePa.d.ts} +1 -1
  57. package/dist/index.cjs +36 -14
  58. package/dist/index.d.cts +8 -5
  59. package/dist/index.d.ts +8 -5
  60. package/dist/index.js +55 -33
  61. package/dist/{pressable-feedback.type-wfeiJz5m.d.cts → pressable-feedback.type-BA2C9sSz.d.cts} +1 -1
  62. package/dist/{pressable-feedback.type-DsvWZXWC.d.ts → pressable-feedback.type-Bs4dQlGj.d.ts} +1 -1
  63. package/dist/{style-props.type-B1BG5TCm.d.cts → style-props.type-CfnoGEP7.d.cts} +1 -1
  64. package/dist/{style-props.type-B1BG5TCm.d.ts → style-props.type-CfnoGEP7.d.ts} +1 -1
  65. package/dist/system/index.cjs +15 -7
  66. package/dist/system/index.d.cts +174 -100
  67. package/dist/system/index.d.ts +174 -100
  68. package/dist/system/index.js +15 -7
  69. package/dist/theme/index.cjs +2 -2
  70. package/dist/theme/index.d.cts +10 -10
  71. package/dist/theme/index.d.ts +10 -10
  72. package/dist/theme/index.js +1 -1
  73. package/package.json +21 -1
  74. package/dist/chunk-RRRGLRRP.cjs +0 -28
  75. package/dist/chunk-SGHP76GU.js +0 -28
@@ -0,0 +1,425 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+
4
+ var _chunk6WW4CSPYcjs = require('./chunk-6WW4CSPY.cjs');
5
+
6
+
7
+ var _chunkDXGQ43IVcjs = require('./chunk-DXGQ43IV.cjs');
8
+
9
+
10
+
11
+
12
+ var _chunkBH5DSJVXcjs = require('./chunk-BH5DSJVX.cjs');
13
+
14
+
15
+
16
+ var _chunkYXVKQMCKcjs = require('./chunk-YXVKQMCK.cjs');
17
+
18
+
19
+ var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
20
+
21
+
22
+
23
+
24
+
25
+ var _chunkHUZ4AUM2cjs = require('./chunk-HUZ4AUM2.cjs');
26
+
27
+ // src/components/chip/chip-avatar.tsx
28
+ var _react = require('react');
29
+ var _reactnative = require('react-native');
30
+
31
+ // src/components/chip/chip.context.ts
32
+ var [ChipProvider, useChip] = _chunkHUZ4AUM2cjs.createSlotContext.call(void 0, "Chip");
33
+
34
+ // src/components/chip/chip.style.ts
35
+
36
+ var chipSheet = _reactnative.StyleSheet.create({
37
+ avatarImage: { width: "100%", height: "100%" }
38
+ });
39
+
40
+ // src/components/chip/chip-avatar.tsx
41
+ var _jsxruntime = require('react/jsx-runtime');
42
+ var ChipAvatar = _react.forwardRef.call(void 0, function ChipAvatar2({ children, source, style, ...props }, ref) {
43
+ const { avatarStyle } = useChip();
44
+ const [styleProps, rest] = _chunkHUZ4AUM2cjs.useStyleProps.call(void 0, props);
45
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { ref, style: [avatarStyle, styleProps, style], ...rest, children: source ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Image, { source, style: chipSheet.avatarImage }) : children });
46
+ });
47
+ ChipAvatar.displayName = "XAUI.Chip.Avatar";
48
+
49
+ // src/components/chip/chip-close.tsx
50
+
51
+
52
+ var ChipClose = _react.forwardRef.call(void 0, function ChipClose2({ isDisabled, ...props }, ref) {
53
+ const { closeStyle, closeGlyphStyle, isDisabled: isChipDisabled } = useChip();
54
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
55
+ _chunk6WW4CSPYcjs.CloseButton,
56
+ {
57
+ ref,
58
+ name: "Chip.Close",
59
+ baseStyle: closeStyle,
60
+ glyphStyle: closeGlyphStyle,
61
+ isDisabled: _nullishCoalesce(isDisabled, () => ( isChipDisabled)),
62
+ ...props
63
+ }
64
+ );
65
+ });
66
+ ChipClose.displayName = "XAUI.Chip.Close";
67
+
68
+ // src/components/chip/chip-dot.tsx
69
+
70
+
71
+
72
+ var ChipDot = _react.forwardRef.call(void 0, function ChipDot2({ style, ...props }, ref) {
73
+ const { dotStyle } = useChip();
74
+ const [styleProps, rest] = _chunkHUZ4AUM2cjs.useStyleProps.call(void 0, props);
75
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { ref, style: [dotStyle, styleProps, style], ...rest });
76
+ });
77
+ ChipDot.displayName = "XAUI.Chip.Dot";
78
+
79
+ // src/components/chip/chip-icon.tsx
80
+
81
+ function ChipIcon({ size, color, ...rest }) {
82
+ const { icon } = useChip();
83
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDXGQ43IVcjs.Icon, { size: _nullishCoalesce(size, () => ( icon.size)), color: _nullishCoalesce(color, () => ( icon.color)), ...rest });
84
+ }
85
+ ChipIcon.displayName = "XAUI.Chip.Icon";
86
+
87
+ // src/components/chip/chip-label.tsx
88
+
89
+
90
+
91
+ var ChipLabel = _react.forwardRef.call(void 0, function ChipLabel2({ children, style, numberOfLines = 1, ...props }, ref) {
92
+ const { labelStyle } = useChip();
93
+ const [styleProps, rest] = _chunkHUZ4AUM2cjs.useStyleProps.call(void 0, props);
94
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
95
+ _reactnative.Text,
96
+ {
97
+ ref,
98
+ numberOfLines,
99
+ style: [labelStyle, styleProps, style],
100
+ ...rest,
101
+ children
102
+ }
103
+ );
104
+ });
105
+ ChipLabel.displayName = "XAUI.Chip.Label";
106
+
107
+ // src/components/chip/chip.tsx
108
+
109
+
110
+
111
+ // src/components/chip/chip.recipe.ts
112
+ var SLOTS = [
113
+ "root",
114
+ "label",
115
+ "icon",
116
+ "dot",
117
+ "avatar",
118
+ "close",
119
+ "closeGlyph"
120
+ ];
121
+ var VARIANT_TOKENS = {
122
+ primary: { bg: "accent", bgPressed: "accentPressed", fg: "accentForeground" },
123
+ secondary: {
124
+ bg: "accentSoft",
125
+ bgPressed: "accentSoftPressed",
126
+ fg: "accentSoftForeground"
127
+ },
128
+ default: { bg: "default", bgPressed: "defaultPressed", fg: "defaultForeground" },
129
+ tertiary: { border: "border", bgPressed: "defaultSoftPressed", fg: "foreground" },
130
+ ghost: { bgPressed: "defaultSoftPressed", fg: "foreground" },
131
+ success: { bg: "success", bgPressed: "successPressed", fg: "successForeground" },
132
+ "success-soft": {
133
+ bg: "successSoft",
134
+ bgPressed: "successSoftPressed",
135
+ fg: "successSoftForeground"
136
+ },
137
+ warning: { bg: "warning", bgPressed: "warningPressed", fg: "warningForeground" },
138
+ "warning-soft": {
139
+ bg: "warningSoft",
140
+ bgPressed: "warningSoftPressed",
141
+ fg: "warningSoftForeground"
142
+ },
143
+ danger: { bg: "danger", bgPressed: "dangerPressed", fg: "dangerForeground" },
144
+ "danger-soft": {
145
+ bg: "dangerSoft",
146
+ bgPressed: "dangerSoftPressed",
147
+ fg: "dangerSoftForeground"
148
+ }
149
+ };
150
+ function sizeAxis(step) {
151
+ const { height, padding, gap, label, glyph, dot, avatar, cross } = step;
152
+ return (theme) => {
153
+ const diameter = theme.spacing(avatar);
154
+ const box = theme.fontSizes[glyph];
155
+ const inset = theme.spacing(padding);
156
+ const cap = (theme.spacing(height) - diameter) / 2;
157
+ return {
158
+ root: {
159
+ height: theme.spacing(height),
160
+ paddingHorizontal: inset,
161
+ gap: theme.spacing(gap)
162
+ },
163
+ label: {
164
+ fontSize: theme.fontSizes[label],
165
+ lineHeight: theme.lineHeights[label]
166
+ },
167
+ icon: { fontSize: box },
168
+ dot: circle(theme.spacing(dot)),
169
+ avatar: {
170
+ ...circle(diameter),
171
+ // **The one margin on a slot in this component**, and R4 is about spacing between
172
+ // slots — this is not that. The root's horizontal padding is set for text, several
173
+ // times the gap the height leaves above the avatar, so a face sits visibly pushed
174
+ // into the chip while a label beside it looks right. Cancelling the difference
175
+ // seats it in the capsule's rounded end instead. Clamped at zero, because a theme
176
+ // with tighter padding than that gap needs no pull at all.
177
+ //
178
+ // R13 — `marginStart`, so it is the leading edge in RTL too. `Chip.Avatar` is a
179
+ // leading slot by contract, which is what makes a leading-only correction sound.
180
+ marginStart: -Math.max(0, inset - cap)
181
+ },
182
+ // The touch target is the glyph's box; `hitSlop` on the slot is what makes it
183
+ // reachable, because a cross big enough to hit is a cross too big to look right.
184
+ close: { width: box, height: box },
185
+ closeGlyph: { width: theme.spacing(cross) }
186
+ };
187
+ };
188
+ }
189
+ function circle(diameter) {
190
+ return { width: diameter, height: diameter, borderRadius: diameter / 2 };
191
+ }
192
+ var SIZES = {
193
+ xs: {
194
+ height: 5,
195
+ padding: 2,
196
+ gap: 1,
197
+ label: "xs",
198
+ glyph: "sm",
199
+ dot: 1,
200
+ avatar: 3.5,
201
+ cross: 2
202
+ },
203
+ sm: {
204
+ height: 6,
205
+ padding: 2.5,
206
+ gap: 1,
207
+ label: "xs",
208
+ glyph: "sm",
209
+ dot: 1.25,
210
+ avatar: 4.5,
211
+ cross: 2
212
+ },
213
+ md: {
214
+ height: 7,
215
+ padding: 3,
216
+ gap: 1,
217
+ label: "sm",
218
+ glyph: "md",
219
+ dot: 1.5,
220
+ avatar: 5.5,
221
+ cross: 2.5
222
+ },
223
+ lg: {
224
+ height: 9,
225
+ padding: 4,
226
+ gap: 1.5,
227
+ label: "md",
228
+ glyph: "lg",
229
+ dot: 2,
230
+ avatar: 7,
231
+ cross: 3
232
+ }
233
+ };
234
+ var chipRecipe = _chunkYXVKQMCKcjs.createRecipe.call(void 0, {
235
+ slots: SLOTS,
236
+ // The cross's own geometry — thickness and centring — belongs to the shared
237
+ // `CloseButton`; what stays below is the box and bar size this component's scale sets.
238
+ base: (theme) => ({
239
+ ..._chunk6WW4CSPYcjs.closeButtonBase.call(void 0, theme),
240
+ root: {
241
+ // A chip hugs its content where a `Button` fills its column. The difference is what
242
+ // the two are: a button is a control the layout sizes, a chip is a token *about*
243
+ // something, and a tag stretched across a screen has stopped being one. It is also
244
+ // the one line of HeroUI's chip that is not a measurement.
245
+ alignSelf: "flex-start",
246
+ flexDirection: "row",
247
+ alignItems: "center",
248
+ justifyContent: "center",
249
+ borderWidth: 0,
250
+ // The capsule the name means, at every size. HeroUI reaches it through a radius
251
+ // ladder that React Native would clamp to the same pill anyway; saying `full` says
252
+ // it once, and `radius` is still there for the tag that wants square corners.
253
+ borderRadius: theme.radius.full,
254
+ // Squircle corners for when `radius` overrides the pill. Free on Android.
255
+ borderCurve: "continuous"
256
+ // Deliberately no `overflow: 'hidden'`, where HeroUI clips: the press overlays
257
+ // carry their own corners (`system/pressable-feedback/`), so nothing needs the clip
258
+ // — and clipping here would cut a badge or a shadow a caller hangs off the chip.
259
+ },
260
+ label: {
261
+ fontFamily: theme.fontFamilies.body,
262
+ fontWeight: theme.fontWeights.medium
263
+ },
264
+ avatar: { overflow: "hidden", alignItems: "center", justifyContent: "center" }
265
+ }),
266
+ variantTokens: VARIANT_TOKENS,
267
+ /**
268
+ * Where the variant's colours land, for every variant at once. The border width follows
269
+ * the *presence* of the border role rather than a per-variant flag — `tertiary` is the
270
+ * only variant that names one, and that fact is already in the table above.
271
+ *
272
+ * The dot and the cross take the foreground rather than a status token of their own: on
273
+ * a filled `success` chip the readable colour is the one the label already uses, and on
274
+ * a `success-soft` one it is the green that token resolves to. One rule, eleven
275
+ * variants, and a tinted chip gets it for free.
276
+ */
277
+ paint: (theme, colors) => ({
278
+ root: {
279
+ backgroundColor: colors.bg,
280
+ borderColor: colors.border,
281
+ borderWidth: colors.border ? theme.borderWidth.default : 0
282
+ },
283
+ label: { color: colors.fg },
284
+ icon: { color: colors.fg },
285
+ dot: { backgroundColor: colors.fg },
286
+ closeGlyph: { backgroundColor: colors.fg }
287
+ }),
288
+ /** Declaration order is application order: `radius` overrides the capsule `base` set. */
289
+ variants: {
290
+ size: {
291
+ xs: sizeAxis(SIZES.xs),
292
+ sm: sizeAxis(SIZES.sm),
293
+ md: sizeAxis(SIZES.md),
294
+ lg: sizeAxis(SIZES.lg)
295
+ },
296
+ radius: _chunkYXVKQMCKcjs.radiusAxis.call(void 0, "root")
297
+ },
298
+ /**
299
+ * The pressed colour is the variant's own `…Pressed` token, as on the `Button` and not
300
+ * as on the `Card`: a chip is small enough that a wash over it reads as a smudge, while
301
+ * the fill going one step down reads as the thing itself being pushed. A tinted chip
302
+ * presses through the same OKLab formula as a token one.
303
+ */
304
+ states: {
305
+ pressed: (_theme, colors) => ({ root: { backgroundColor: colors.bgPressed } }),
306
+ disabled: (theme) => ({ root: { opacity: theme.opacity.disabled } })
307
+ },
308
+ defaultVariants: { variant: "primary", size: "md" }
309
+ });
310
+
311
+ // src/components/chip/chip.tsx
312
+
313
+ var ChipRoot = _react.forwardRef.call(void 0, function Chip({
314
+ children,
315
+ variant,
316
+ size,
317
+ radius,
318
+ color,
319
+ isDisabled = false,
320
+ isPressable = false,
321
+ asChild = false,
322
+ accessibilityRole,
323
+ accessibilityState,
324
+ animation,
325
+ style,
326
+ onPressIn,
327
+ onPressOut,
328
+ ...props
329
+ }, ref) {
330
+ const theme = _chunk57SJ4LJFcjs.useXAUITheme.call(void 0, );
331
+ const [styleProps, rest] = _chunkHUZ4AUM2cjs.useStyleProps.call(void 0, props);
332
+ const [isPressed, press] = _chunkBH5DSJVXcjs.usePressState.call(void 0, { onPressIn, onPressOut });
333
+ const selection = { variant, size, radius };
334
+ const states = { pressed: isPressed, disabled: isDisabled };
335
+ const styles = chipRecipe.resolve({ theme, selection, states });
336
+ const tint = color ? chipRecipe.tint({ theme, color, selection, states }) : void 0;
337
+ const context = _react.useMemo.call(void 0, () => {
338
+ const icon = _reactnative.StyleSheet.flatten([styles.icon, _optionalChain([tint, 'optionalAccess', _ => _.icon])]);
339
+ return {
340
+ labelStyle: tint ? [styles.label, tint.label] : styles.label,
341
+ dotStyle: tint ? [styles.dot, tint.dot] : styles.dot,
342
+ avatarStyle: styles.avatar,
343
+ closeStyle: styles.close,
344
+ closeGlyphStyle: tint ? [styles.closeGlyph, tint.closeGlyph] : styles.closeGlyph,
345
+ icon: {
346
+ size: icon.fontSize,
347
+ // `ColorValue` also covers the platform's opaque colours, which `Icon` cannot
348
+ // hand to a third-party component expecting a string.
349
+ color: typeof icon.color === "string" ? icon.color : void 0
350
+ },
351
+ isDisabled
352
+ };
353
+ }, [styles, tint, isDisabled]);
354
+ const rootStyle = [
355
+ styles.root,
356
+ _optionalChain([tint, 'optionalAccess', _2 => _2.root]),
357
+ styleProps,
358
+ typeof style === "function" ? style({ pressed: isPressed }) : style
359
+ ];
360
+ const text = _chunkHUZ4AUM2cjs.childrenToString.call(void 0, children);
361
+ const content = text !== null ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChipLabel, { children: text }) : children;
362
+ if (!isPressable && !asChild && (onPressIn || onPressOut || rest.onPress || rest.onLongPress)) {
363
+ _chunkBH5DSJVXcjs.warnDev.call(void 0,
364
+ "Chip: a press handler needs `isPressable`. Without it the chip renders a View, which never receives the touch \u2014 add `isPressable` to make it a control. A `Chip.Close` is its own control and needs neither."
365
+ );
366
+ }
367
+ const surface = isPressable ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
368
+ _chunkBH5DSJVXcjs.PressableFeedback,
369
+ {
370
+ ref,
371
+ isPressed,
372
+ isDisabled,
373
+ asChild,
374
+ animation,
375
+ accessibilityRole: _nullishCoalesce(accessibilityRole, () => ( "button")),
376
+ accessibilityState: { disabled: isDisabled, ...accessibilityState },
377
+ ...rest,
378
+ style: rootStyle,
379
+ onPressIn: press.onPressIn,
380
+ onPressOut: press.onPressOut,
381
+ children: asChild ? children : content
382
+ }
383
+ ) : asChild ? (
384
+ // R12 — the caller's element is the chip, so it takes the children it was written
385
+ // with and the auto-wrap does not apply.
386
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
387
+ _chunkHUZ4AUM2cjs.Slot,
388
+ {
389
+ ref,
390
+ accessibilityRole,
391
+ accessibilityState,
392
+ ...rest,
393
+ style: rootStyle,
394
+ children
395
+ }
396
+ )
397
+ ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
398
+ _reactnative.View,
399
+ {
400
+ ref,
401
+ accessibilityRole,
402
+ accessibilityState,
403
+ ...rest,
404
+ style: rootStyle,
405
+ children: content
406
+ }
407
+ );
408
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChipProvider, { value: context, children: surface });
409
+ });
410
+ ChipRoot.displayName = "XAUI.Chip.Root";
411
+
412
+ // src/components/chip/index.ts
413
+ var Chip2 = Object.assign(ChipRoot, {
414
+ Label: ChipLabel,
415
+ Icon: ChipIcon,
416
+ Dot: ChipDot,
417
+ Avatar: ChipAvatar,
418
+ Close: ChipClose
419
+ });
420
+
421
+
422
+
423
+
424
+
425
+ exports.useChip = useChip; exports.chipRecipe = chipRecipe; exports.Chip = Chip2;
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkEVXZGNPAcjs = require('./chunk-EVXZGNPA.cjs');
4
+ var _chunkHUZ4AUM2cjs = require('./chunk-HUZ4AUM2.cjs');
5
5
 
6
6
  // src/components/view/grid.tsx
7
7
  var _react = require('react');
@@ -30,7 +30,7 @@ function spanWidth({ cellWidth, columns, gap }, span) {
30
30
  var _jsxruntime = require('react/jsx-runtime');
31
31
  var GridRoot = _react.forwardRef.call(void 0, function Grid({ children, columns = 2, gap = 0, style, onLayout, ...props }, ref) {
32
32
  const [width, setWidth] = _react.useState.call(void 0, );
33
- const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
33
+ const [styleProps, rest] = _chunkHUZ4AUM2cjs.useStyleProps.call(void 0, props);
34
34
  const safeColumns = Math.max(Math.floor(columns), 1);
35
35
  const cellWidth = width === void 0 ? void 0 : (width - gap * (safeColumns - 1)) / safeColumns;
36
36
  const context = _react.useMemo.call(void 0,
@@ -73,7 +73,7 @@ function isGridItem(child) {
73
73
 
74
74
  var GridItem = _react.forwardRef.call(void 0, function GridItem2({ children, span = 1, style, ...props }, ref) {
75
75
  const grid = useGrid();
76
- const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
76
+ const [styleProps, rest] = _chunkHUZ4AUM2cjs.useStyleProps.call(void 0, props);
77
77
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
78
78
  _reactnative.View,
79
79
  {
@@ -91,8 +91,8 @@ GridItem.displayName = "XAUI.Grid.Item";
91
91
 
92
92
 
93
93
  var StackRoot = _react.forwardRef.call(void 0, function Stack({ children, asChild = false, style, ...props }, ref) {
94
- const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
95
- const Root = asChild ? _chunkEVXZGNPAcjs.Slot : _reactnative.View;
94
+ const [styleProps, rest] = _chunkHUZ4AUM2cjs.useStyleProps.call(void 0, props);
95
+ const Root = asChild ? _chunkHUZ4AUM2cjs.Slot : _reactnative.View;
96
96
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { ref, style: [{ position: "relative" }, styleProps, style], ...rest, children });
97
97
  });
98
98
  StackRoot.displayName = "XAUI.Stack";
@@ -102,8 +102,8 @@ StackRoot.displayName = "XAUI.Stack";
102
102
 
103
103
 
104
104
  var StackItem = _react.forwardRef.call(void 0, function StackItem2({ children, asChild = false, style, ...props }, ref) {
105
- const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
106
- const Root = asChild ? _chunkEVXZGNPAcjs.Slot : _reactnative.View;
105
+ const [styleProps, rest] = _chunkHUZ4AUM2cjs.useStyleProps.call(void 0, props);
106
+ const Root = asChild ? _chunkHUZ4AUM2cjs.Slot : _reactnative.View;
107
107
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { ref, style: [{ position: "absolute" }, styleProps, style], ...rest, children });
108
108
  });
109
109
  StackItem.displayName = "XAUI.Stack.Item";
@@ -113,8 +113,8 @@ StackItem.displayName = "XAUI.Stack.Item";
113
113
 
114
114
 
115
115
  var Row = _react.forwardRef.call(void 0, function Row2({ children, asChild = false, style, ...props }, ref) {
116
- const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
117
- const Root = asChild ? _chunkEVXZGNPAcjs.Slot : _reactnative.View;
116
+ const [styleProps, rest] = _chunkHUZ4AUM2cjs.useStyleProps.call(void 0, props);
117
+ const Root = asChild ? _chunkHUZ4AUM2cjs.Slot : _reactnative.View;
118
118
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { ref, style: [{ flexDirection: "row" }, styleProps, style], ...rest, children });
119
119
  });
120
120
  Row.displayName = "XAUI.Row";
@@ -124,8 +124,8 @@ Row.displayName = "XAUI.Row";
124
124
 
125
125
 
126
126
  var Column = _react.forwardRef.call(void 0, function Column2({ children, asChild = false, style, ...props }, ref) {
127
- const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
128
- const Root = asChild ? _chunkEVXZGNPAcjs.Slot : _reactnative.View;
127
+ const [styleProps, rest] = _chunkHUZ4AUM2cjs.useStyleProps.call(void 0, props);
128
+ const Root = asChild ? _chunkHUZ4AUM2cjs.Slot : _reactnative.View;
129
129
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { ref, style: [{ flexDirection: "column" }, styleProps, style], ...rest, children });
130
130
  });
131
131
  Column.displayName = "XAUI.Column";