@xaui/native 0.9.1-alpha.37 → 0.9.1-alpha.39
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.
- package/dist/{chunk-OULTSBKU.js → chunk-26OGEFQI.js} +1 -1
- package/dist/chunk-2EGR4LWD.js +145 -0
- package/dist/{chunk-TJHYSSBZ.js → chunk-346QBNUD.js} +1 -1
- package/dist/chunk-37L7YGZV.cjs +425 -0
- package/dist/{chunk-PPWXLZGL.js → chunk-3GFRSZYR.js} +15 -23
- package/dist/{chunk-DKH6BNPF.cjs → chunk-3JXI2IHV.cjs} +13 -13
- package/dist/{chunk-7B3UBUC6.cjs → chunk-4KFKWBN5.cjs} +23 -2
- package/dist/{chunk-IGLKACSR.cjs → chunk-4KSKQD37.cjs} +5 -5
- package/dist/{chunk-UBOXW5WO.cjs → chunk-54CWXA34.cjs} +61 -61
- package/dist/chunk-64MXEVT3.js +66 -0
- package/dist/{chunk-ZJWEVFAO.cjs → chunk-66FOASTP.cjs} +9 -9
- package/dist/{chunk-5PPNDKRX.js → chunk-6CO6FM67.js} +16 -16
- package/dist/{chunk-DVDQSW7U.cjs → chunk-76XDVA24.cjs} +65 -190
- package/dist/{chunk-54FJOKAN.cjs → chunk-7GHM4GKL.cjs} +25 -25
- package/dist/chunk-7KLBTMXV.cjs +478 -0
- package/dist/{chunk-AP6RVIIK.cjs → chunk-7TOG4TVU.cjs} +21 -21
- package/dist/{chunk-LEWW24RQ.cjs → chunk-A7YB7YWX.cjs} +3 -3
- package/dist/{chunk-3P6M2R4S.cjs → chunk-AAVCMCJ3.cjs} +4 -4
- package/dist/{chunk-VFTT3Q4B.cjs → chunk-BNFIFRQA.cjs} +3 -3
- package/dist/{chunk-JXNFOOKC.js → chunk-DY3SUG5P.js} +5 -5
- package/dist/chunk-EKS3W46M.cjs +66 -0
- package/dist/{chunk-EOJ5MYAQ.js → chunk-EYD4H4X6.js} +4 -4
- package/dist/{chunk-RGKWNK4T.js → chunk-FBCWNXZC.js} +58 -58
- package/dist/{chunk-HXW4ANVB.js → chunk-FHUYHV6J.js} +25 -4
- package/dist/chunk-GJSFKH4L.js +586 -0
- package/dist/{chunk-6G3XWPNP.js → chunk-HA6BFY3A.js} +3 -3
- package/dist/{chunk-FTQHDJYL.cjs → chunk-HOI5425P.cjs} +9 -9
- package/dist/{chunk-XWY4DF37.js → chunk-JKP4TPIL.js} +86 -289
- package/dist/{chunk-YXPYOOHU.js → chunk-K72UDPVN.js} +27 -27
- package/dist/{chunk-NTD3NPRX.cjs → chunk-KSUV74BE.cjs} +2 -2
- package/dist/{chunk-UGF35NSE.js → chunk-LIUO6D3D.js} +75 -75
- package/dist/{chunk-E3X5ODKQ.js → chunk-LTX6TB5I.js} +1 -1
- package/dist/chunk-LUPCPLND.cjs +145 -0
- package/dist/{chunk-BORJJYDW.js → chunk-MXGER5PI.js} +2 -2
- package/dist/{chunk-GTT4NHS2.cjs → chunk-NCCRQK3P.cjs} +11 -11
- package/dist/chunk-NCTOTTVW.js +13 -0
- package/dist/{chunk-NKPTXTTS.js → chunk-QZ24MZRX.js} +3 -3
- package/dist/{chunk-7LSY4WFL.js → chunk-R7BU4CPS.js} +2 -2
- package/dist/{chunk-JB5LGQ54.cjs → chunk-RKCWYUGA.cjs} +3 -3
- package/dist/{chunk-SMW6ZWMH.js → chunk-S2WNWMNT.js} +1 -1
- package/dist/{chunk-WVLSQO6K.cjs → chunk-S4QUM4EE.cjs} +9 -9
- package/dist/{chunk-SO5UAGIU.js → chunk-SACDOFGF.js} +15 -15
- package/dist/{chunk-CUQTAPBU.cjs → chunk-SIP5J7HU.cjs} +17 -17
- package/dist/{chunk-O3A3DBSZ.js → chunk-SZLXPF3G.js} +1 -1
- package/dist/{chunk-437QULXO.cjs → chunk-TDTUAIFF.cjs} +5 -5
- package/dist/{chunk-DRMT346W.cjs → chunk-TGMVEHV7.cjs} +64 -64
- package/dist/{chunk-TDYPY2J7.js → chunk-TRETQZEW.js} +7 -7
- package/dist/{chunk-ITURCQMQ.cjs → chunk-URA25DU4.cjs} +5 -5
- package/dist/{chunk-4PTWZCOK.js → chunk-USF6EWYR.js} +7 -7
- package/dist/{chunk-P747CRAY.cjs → chunk-VZK3NLBH.cjs} +9 -9
- package/dist/chunk-WFEMJCXO.cjs +13 -0
- package/dist/chunk-XAFP5JLK.js +425 -0
- package/dist/{chunk-RVRVGG73.js → chunk-XNMZQSY5.js} +2 -2
- package/dist/{chunk-K4TWKF5U.cjs → chunk-XSQPVDFH.cjs} +15 -25
- package/dist/{chunk-JDSE4TQL.js → chunk-XTC2SLFT.js} +1 -1
- package/dist/{chunk-C5VDFRAD.cjs → chunk-XWNG2U4K.cjs} +2 -2
- package/dist/components/accordion/index.cjs +35 -0
- package/dist/components/accordion/index.d.cts +299 -0
- package/dist/components/accordion/index.d.ts +299 -0
- package/dist/components/accordion/index.js +35 -0
- package/dist/components/alert/index.cjs +7 -7
- package/dist/components/alert/index.d.cts +2 -2
- package/dist/components/alert/index.d.ts +2 -2
- package/dist/components/alert/index.js +6 -6
- package/dist/components/avatar/index.cjs +4 -4
- package/dist/components/avatar/index.d.cts +3 -3
- package/dist/components/avatar/index.d.ts +3 -3
- package/dist/components/avatar/index.js +3 -3
- package/dist/components/badge/index.cjs +3 -3
- package/dist/components/badge/index.d.cts +1 -1
- package/dist/components/badge/index.d.ts +1 -1
- package/dist/components/badge/index.js +2 -2
- package/dist/components/button/index.cjs +8 -7
- package/dist/components/button/index.d.cts +204 -204
- package/dist/components/button/index.d.ts +204 -204
- package/dist/components/button/index.js +7 -6
- package/dist/components/card/index.cjs +5 -5
- package/dist/components/card/index.d.cts +206 -206
- package/dist/components/card/index.d.ts +206 -206
- package/dist/components/card/index.js +4 -4
- package/dist/components/checkbox/index.cjs +5 -5
- package/dist/components/checkbox/index.d.cts +408 -408
- package/dist/components/checkbox/index.d.ts +408 -408
- package/dist/components/checkbox/index.js +4 -4
- package/dist/components/chip/index.cjs +7 -7
- package/dist/components/chip/index.d.cts +205 -205
- package/dist/components/chip/index.d.ts +205 -205
- package/dist/components/chip/index.js +6 -6
- package/dist/components/divider/index.cjs +3 -3
- package/dist/components/divider/index.d.cts +3 -3
- package/dist/components/divider/index.d.ts +3 -3
- package/dist/components/divider/index.js +2 -2
- package/dist/components/field-group/index.cjs +5 -5
- package/dist/components/field-group/index.d.cts +8 -8
- package/dist/components/field-group/index.d.ts +8 -8
- package/dist/components/field-group/index.js +4 -4
- package/dist/components/input-otp/index.cjs +3 -3
- package/dist/components/input-otp/index.d.cts +2 -2
- package/dist/components/input-otp/index.d.ts +2 -2
- package/dist/components/input-otp/index.js +2 -2
- package/dist/components/popover/index.cjs +37 -0
- package/dist/components/popover/index.d.cts +254 -0
- package/dist/components/popover/index.d.ts +254 -0
- package/dist/components/popover/index.js +37 -0
- package/dist/components/radio/index.cjs +5 -5
- package/dist/components/radio/index.d.cts +419 -419
- package/dist/components/radio/index.d.ts +419 -419
- package/dist/components/radio/index.js +4 -4
- package/dist/components/select/index.cjs +10 -7
- package/dist/components/select/index.d.cts +24 -45
- package/dist/components/select/index.d.ts +24 -45
- package/dist/components/select/index.js +9 -6
- package/dist/components/skeleton/index.d.cts +1 -1
- package/dist/components/skeleton/index.d.ts +1 -1
- package/dist/components/spinner/index.cjs +5 -4
- package/dist/components/spinner/index.d.cts +1 -1
- package/dist/components/spinner/index.d.ts +1 -1
- package/dist/components/spinner/index.js +4 -3
- package/dist/components/switch/index.cjs +5 -5
- package/dist/components/switch/index.d.cts +409 -409
- package/dist/components/switch/index.d.ts +409 -409
- package/dist/components/switch/index.js +4 -4
- package/dist/components/text-area/index.cjs +4 -4
- package/dist/components/text-area/index.js +3 -3
- package/dist/components/text-field/index.cjs +3 -3
- package/dist/components/text-field/index.d.cts +3 -3
- package/dist/components/text-field/index.d.ts +3 -3
- package/dist/components/text-field/index.js +2 -2
- package/dist/components/typography/index.cjs +3 -3
- package/dist/components/typography/index.d.cts +5 -5
- package/dist/components/typography/index.d.ts +5 -5
- package/dist/components/typography/index.js +2 -2
- package/dist/components/view/index.cjs +3 -3
- package/dist/components/view/index.d.cts +8 -8
- package/dist/components/view/index.d.ts +8 -8
- package/dist/components/view/index.js +2 -2
- package/dist/index.cjs +89 -28
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +109 -48
- package/dist/placement-DHa0Rrh1.d.cts +38 -0
- package/dist/placement-DHa0Rrh1.d.ts +38 -0
- package/dist/system/index.cjs +24 -8
- package/dist/system/index.d.cts +83 -34
- package/dist/system/index.d.ts +83 -34
- package/dist/system/index.js +24 -8
- package/package.json +21 -1
- /package/dist/{chunk-OJCCV65P.cjs → chunk-GGW43Q37.cjs} +0 -0
- /package/dist/{chunk-MESKS6AI.js → chunk-WHJTBTYM.js} +0 -0
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunkEKS3W46Mcjs = require('./chunk-EKS3W46M.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunk4KFKWBN5cjs = require('./chunk-4KFKWBN5.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunk7EIHHOHPcjs = require('./chunk-7EIHHOHP.cjs');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _chunkTGMVEHV7cjs = require('./chunk-TGMVEHV7.cjs');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _chunk7DPL3ZDScjs = require('./chunk-7DPL3ZDS.cjs');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
var _chunk7GHM4GKLcjs = require('./chunk-7GHM4GKL.cjs');
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
var _chunkFNEUOBCVcjs = require('./chunk-FNEUOBCV.cjs');
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
|
|
33
|
+
|
|
34
|
+
// src/components/accordion/accordion-content.tsx
|
|
35
|
+
var _react = require('react');
|
|
36
|
+
var _reactnativereanimated = require('react-native-reanimated'); var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
|
|
37
|
+
|
|
38
|
+
// src/components/accordion/accordion.animation.ts
|
|
39
|
+
|
|
40
|
+
var LAYOUT = _reactnativereanimated.LinearTransition.springify().damping(140).stiffness(1600).mass(4);
|
|
41
|
+
var CONTENT_MS = 200;
|
|
42
|
+
var contentEntering = _reactnativereanimated.FadeIn.duration(CONTENT_MS).easing(
|
|
43
|
+
_reactnativereanimated.Easing.out(_reactnativereanimated.Easing.ease)
|
|
44
|
+
);
|
|
45
|
+
var contentExiting = _reactnativereanimated.FadeOut.duration(CONTENT_MS).easing(
|
|
46
|
+
_reactnativereanimated.Easing.in(_reactnativereanimated.Easing.ease)
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
// src/components/accordion/accordion.context.ts
|
|
50
|
+
var [AccordionProvider, useAccordion] = _chunk7GHM4GKLcjs.createSlotContext.call(void 0, "Accordion");
|
|
51
|
+
var [AccordionItemProvider, useAccordionItem] = _chunk7GHM4GKLcjs.createSlotContext.call(void 0, "Accordion.Item");
|
|
52
|
+
|
|
53
|
+
// src/components/accordion/accordion-content.tsx
|
|
54
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
55
|
+
var AccordionContent = _react.forwardRef.call(void 0,
|
|
56
|
+
function AccordionContent2({ children, style, ...props }, ref) {
|
|
57
|
+
const { contentStyle } = useAccordion();
|
|
58
|
+
const { isExpanded } = useAccordionItem();
|
|
59
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
60
|
+
if (!isExpanded) return null;
|
|
61
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
62
|
+
_reactnativereanimated2.default.View,
|
|
63
|
+
{
|
|
64
|
+
ref,
|
|
65
|
+
entering: contentEntering,
|
|
66
|
+
exiting: contentExiting,
|
|
67
|
+
...rest,
|
|
68
|
+
style: [contentStyle, styleProps, style],
|
|
69
|
+
children
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
AccordionContent.displayName = "XAUI.Accordion.Content";
|
|
75
|
+
|
|
76
|
+
// src/components/accordion/accordion-indicator.tsx
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
function AccordionIndicator({
|
|
86
|
+
as = _chunk4KFKWBN5cjs.ChevronDownIcon,
|
|
87
|
+
...props
|
|
88
|
+
}) {
|
|
89
|
+
const { indicatorStyle } = useAccordion();
|
|
90
|
+
const { isExpanded } = useAccordionItem();
|
|
91
|
+
const progress = _reactnativereanimated.useSharedValue.call(void 0, isExpanded ? 1 : 0);
|
|
92
|
+
_react.useEffect.call(void 0, () => {
|
|
93
|
+
progress.set(_reactnativereanimated.withSpring.call(void 0, isExpanded ? 1 : 0, _chunkEKS3W46Mcjs.INDICATOR_SPRING));
|
|
94
|
+
}, [isExpanded, progress]);
|
|
95
|
+
const rotation = _reactnativereanimated.useAnimatedStyle.call(void 0, () => ({
|
|
96
|
+
transform: [
|
|
97
|
+
{
|
|
98
|
+
rotate: `${_reactnativereanimated.interpolate.call(void 0, progress.get(), [0, 1], [_chunkEKS3W46Mcjs.INDICATOR_ROTATION[0], _chunkEKS3W46Mcjs.INDICATOR_ROTATION[1]])}deg`
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}));
|
|
102
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.View, { style: [indicatorStyle, rotation], children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4KFKWBN5cjs.Icon, { as, ...props }) });
|
|
103
|
+
}
|
|
104
|
+
AccordionIndicator.displayName = "XAUI.Accordion.Indicator";
|
|
105
|
+
|
|
106
|
+
// src/components/accordion/accordion-item.tsx
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
var AccordionItem = _react.forwardRef.call(void 0,
|
|
111
|
+
function AccordionItem2({ value, children, isDisabled = false, style, ...props }, ref) {
|
|
112
|
+
const { itemStyle, isDisabled: isRootDisabled, isExpanded } = useAccordion();
|
|
113
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
114
|
+
const expanded = isExpanded(value);
|
|
115
|
+
const disabled = isRootDisabled || isDisabled;
|
|
116
|
+
const context = _react.useMemo.call(void 0,
|
|
117
|
+
() => ({ value, isExpanded: expanded, isDisabled: disabled }),
|
|
118
|
+
[value, expanded, disabled]
|
|
119
|
+
);
|
|
120
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AccordionItemProvider, { value: context, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
121
|
+
_reactnativereanimated2.default.View,
|
|
122
|
+
{
|
|
123
|
+
ref,
|
|
124
|
+
layout: LAYOUT,
|
|
125
|
+
...rest,
|
|
126
|
+
style: [itemStyle, styleProps, style],
|
|
127
|
+
children: typeof children === "function" ? children(context) : children
|
|
128
|
+
}
|
|
129
|
+
) });
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
AccordionItem.displayName = "XAUI.Accordion.Item";
|
|
133
|
+
|
|
134
|
+
// src/components/accordion/accordion-trigger.tsx
|
|
135
|
+
|
|
136
|
+
var _reactnative = require('react-native');
|
|
137
|
+
|
|
138
|
+
var AccordionTrigger = _react.forwardRef.call(void 0,
|
|
139
|
+
function AccordionTrigger2({
|
|
140
|
+
children,
|
|
141
|
+
asChild = false,
|
|
142
|
+
accessibilityRole = "button",
|
|
143
|
+
accessibilityState,
|
|
144
|
+
style,
|
|
145
|
+
onPress,
|
|
146
|
+
onPressIn,
|
|
147
|
+
onPressOut,
|
|
148
|
+
...props
|
|
149
|
+
}, ref) {
|
|
150
|
+
const { triggerStyle, triggerPressedStyle, labelStyle, glyph, toggle } = useAccordion();
|
|
151
|
+
const { value, isExpanded, isDisabled } = useAccordionItem();
|
|
152
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
153
|
+
const [isPressed, press] = _chunk7DPL3ZDScjs.usePressState.call(void 0, { onPressIn, onPressOut });
|
|
154
|
+
const handlePress = _react.useCallback.call(void 0,
|
|
155
|
+
(event) => {
|
|
156
|
+
_optionalChain([onPress, 'optionalCall', _ => _(event)]);
|
|
157
|
+
toggle(value);
|
|
158
|
+
},
|
|
159
|
+
[onPress, toggle, value]
|
|
160
|
+
);
|
|
161
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4KFKWBN5cjs.IconContext.Provider, { value: glyph, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
162
|
+
_chunkTGMVEHV7cjs.PressableFeedback,
|
|
163
|
+
{
|
|
164
|
+
ref,
|
|
165
|
+
isPressed,
|
|
166
|
+
isDisabled,
|
|
167
|
+
asChild,
|
|
168
|
+
accessibilityRole,
|
|
169
|
+
accessibilityState: {
|
|
170
|
+
disabled: isDisabled,
|
|
171
|
+
expanded: isExpanded,
|
|
172
|
+
...accessibilityState
|
|
173
|
+
},
|
|
174
|
+
...rest,
|
|
175
|
+
style: [
|
|
176
|
+
triggerStyle,
|
|
177
|
+
isPressed && triggerPressedStyle,
|
|
178
|
+
styleProps,
|
|
179
|
+
typeof style === "function" ? style({ pressed: isPressed }) : style
|
|
180
|
+
],
|
|
181
|
+
onPress: handlePress,
|
|
182
|
+
onPressIn: press.onPressIn,
|
|
183
|
+
onPressOut: press.onPressOut,
|
|
184
|
+
children: asChild ? children : wrapText(children, labelStyle)
|
|
185
|
+
}
|
|
186
|
+
) });
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
AccordionTrigger.displayName = "XAUI.Accordion.Trigger";
|
|
190
|
+
function wrapText(children, style) {
|
|
191
|
+
return _react.Children.map(
|
|
192
|
+
children,
|
|
193
|
+
(child) => typeof child === "string" || typeof child === "number" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style, children: child }) : child
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// src/components/accordion/accordion.tsx
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
// src/components/accordion/accordion.hook.ts
|
|
203
|
+
|
|
204
|
+
function useExpansion({
|
|
205
|
+
value,
|
|
206
|
+
defaultValue,
|
|
207
|
+
onValueChange,
|
|
208
|
+
selectionMode,
|
|
209
|
+
isCollapsible
|
|
210
|
+
}) {
|
|
211
|
+
const [current, setCurrent] = _chunk7EIHHOHPcjs.useControllableState.call(void 0, {
|
|
212
|
+
value,
|
|
213
|
+
defaultValue: _nullishCoalesce(defaultValue, () => ( (selectionMode === "multiple" ? [] : ""))),
|
|
214
|
+
onChange: onValueChange
|
|
215
|
+
});
|
|
216
|
+
const isExpanded = _react.useCallback.call(void 0,
|
|
217
|
+
(item) => Array.isArray(current) ? current.includes(item) : current === item,
|
|
218
|
+
[current]
|
|
219
|
+
);
|
|
220
|
+
const toggle = _react.useCallback.call(void 0,
|
|
221
|
+
(item) => {
|
|
222
|
+
setCurrent((value_) => nextValue(value_, item, selectionMode, isCollapsible));
|
|
223
|
+
},
|
|
224
|
+
[isCollapsible, selectionMode, setCurrent]
|
|
225
|
+
);
|
|
226
|
+
return _react.useMemo.call(void 0, () => ({ isExpanded, toggle }), [isExpanded, toggle]);
|
|
227
|
+
}
|
|
228
|
+
function nextValue(current, item, selectionMode, isCollapsible) {
|
|
229
|
+
if (selectionMode === "multiple") {
|
|
230
|
+
const list = Array.isArray(current) ? current : current ? [current] : [];
|
|
231
|
+
if (!list.includes(item)) return [...list, item];
|
|
232
|
+
if (!isCollapsible && list.length === 1) return current;
|
|
233
|
+
return list.filter((value) => value !== item);
|
|
234
|
+
}
|
|
235
|
+
if (current !== item) return item;
|
|
236
|
+
return isCollapsible ? "" : current;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// src/components/accordion/accordion.recipe.ts
|
|
240
|
+
|
|
241
|
+
var SLOTS = [
|
|
242
|
+
"root",
|
|
243
|
+
"container",
|
|
244
|
+
"separator",
|
|
245
|
+
"item",
|
|
246
|
+
"trigger",
|
|
247
|
+
"indicator",
|
|
248
|
+
"content"
|
|
249
|
+
];
|
|
250
|
+
var VARIANT_TOKENS = {
|
|
251
|
+
primary: { bg: "surface", fg: "surfaceForeground" },
|
|
252
|
+
secondary: { bg: "surfaceSecondary", fg: "surfaceSecondaryForeground" },
|
|
253
|
+
tertiary: { border: "border", fg: "foreground" },
|
|
254
|
+
ghost: { fg: "foreground" }
|
|
255
|
+
};
|
|
256
|
+
var HAIRLINE = _reactnative.StyleSheet.hairlineWidth;
|
|
257
|
+
var SIZES = {
|
|
258
|
+
xs: { padding: 2.5, gap: 2.5, label: "sm", glyph: "md", radius: "md" },
|
|
259
|
+
sm: { padding: 3, gap: 3, label: "md", glyph: "lg", radius: "lg" },
|
|
260
|
+
md: { padding: 3, gap: 4, label: "md", glyph: "lg", radius: "xl" },
|
|
261
|
+
lg: { padding: 4, gap: 4, label: "lg", glyph: "xl", radius: "2xl" }
|
|
262
|
+
};
|
|
263
|
+
var TRIGGER_PADDING_VERTICAL = 4;
|
|
264
|
+
function sizeAxis(step) {
|
|
265
|
+
const { padding, gap, label, glyph, radius } = step;
|
|
266
|
+
return (theme) => ({
|
|
267
|
+
// Both layers, at the same value: the outer one draws the corner, the inner one is
|
|
268
|
+
// what a pressed row is cut against.
|
|
269
|
+
root: { borderRadius: theme.radius[radius] },
|
|
270
|
+
container: { borderRadius: theme.radius[radius] },
|
|
271
|
+
trigger: {
|
|
272
|
+
paddingVertical: theme.spacing(TRIGGER_PADDING_VERTICAL),
|
|
273
|
+
paddingHorizontal: theme.spacing(padding),
|
|
274
|
+
gap: theme.spacing(gap),
|
|
275
|
+
fontSize: theme.fontSizes[label],
|
|
276
|
+
lineHeight: theme.lineHeights[label]
|
|
277
|
+
},
|
|
278
|
+
indicator: { fontSize: theme.fontSizes[glyph] },
|
|
279
|
+
content: {
|
|
280
|
+
paddingHorizontal: theme.spacing(padding),
|
|
281
|
+
paddingBottom: theme.spacing(TRIGGER_PADDING_VERTICAL)
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
var accordionRecipe = _chunkFNEUOBCVcjs.createRecipe.call(void 0, {
|
|
286
|
+
slots: SLOTS,
|
|
287
|
+
base: (theme) => ({
|
|
288
|
+
// The root carries the shadow and the border; it must **not** clip. On iOS
|
|
289
|
+
// `overflow: 'hidden'` sets `masksToBounds`, which clips the layer's own shadow along
|
|
290
|
+
// with everything else, and a lifted `primary` would have none at all.
|
|
291
|
+
root: { flexDirection: "column", borderCurve: "continuous" },
|
|
292
|
+
// So the clipping is one layer in. This is the one extra node in the component, and
|
|
293
|
+
// it is here for a platform constraint rather than for layout: a single layer cannot
|
|
294
|
+
// both cast a shadow and clip its children on iOS. Without it a pressed row paints
|
|
295
|
+
// over the card's rounded corner, square, for as long as a finger is on it.
|
|
296
|
+
container: { flexDirection: "column", overflow: "hidden" },
|
|
297
|
+
separator: { height: HAIRLINE, backgroundColor: theme.colors.separator },
|
|
298
|
+
// This one is load-bearing: it is what makes the height animation read as a panel
|
|
299
|
+
// unrolling rather than as content sliding out from behind the row above it.
|
|
300
|
+
item: { flexDirection: "column", overflow: "hidden" },
|
|
301
|
+
trigger: {
|
|
302
|
+
flexDirection: "row",
|
|
303
|
+
alignItems: "center",
|
|
304
|
+
justifyContent: "space-between",
|
|
305
|
+
fontFamily: theme.fontFamilies.body,
|
|
306
|
+
fontWeight: theme.fontWeights.medium
|
|
307
|
+
},
|
|
308
|
+
indicator: { alignItems: "center", justifyContent: "center" }
|
|
309
|
+
}),
|
|
310
|
+
variantTokens: VARIANT_TOKENS,
|
|
311
|
+
/**
|
|
312
|
+
* The fill is the **root's**, never the row's. A row that painted its own would stack
|
|
313
|
+
* two fills where the separator sits, and the hairline would disappear into the seam.
|
|
314
|
+
*/
|
|
315
|
+
paint: (theme, colors) => ({
|
|
316
|
+
root: {
|
|
317
|
+
backgroundColor: colors.bg,
|
|
318
|
+
borderColor: colors.border,
|
|
319
|
+
borderWidth: colors.border ? theme.borderWidth.default : 0
|
|
320
|
+
},
|
|
321
|
+
trigger: { color: colors.fg },
|
|
322
|
+
indicator: { color: theme.colors.muted }
|
|
323
|
+
}),
|
|
324
|
+
variants: {
|
|
325
|
+
size: {
|
|
326
|
+
xs: sizeAxis(SIZES.xs),
|
|
327
|
+
sm: sizeAxis(SIZES.sm),
|
|
328
|
+
md: sizeAxis(SIZES.md),
|
|
329
|
+
lg: sizeAxis(SIZES.lg)
|
|
330
|
+
},
|
|
331
|
+
radius: _chunkFNEUOBCVcjs.radiusAxis.call(void 0, "root", "container")
|
|
332
|
+
},
|
|
333
|
+
/**
|
|
334
|
+
* A container inset from its own edge, and its separators inset with it. `ghost` has no
|
|
335
|
+
* edge to be inset from, so its rows run the full width and the hairline runs with them
|
|
336
|
+
* — which is the difference between a list on a page and a list in a box.
|
|
337
|
+
*
|
|
338
|
+
* `primary` is the only one lifted. It is the one that reads as a card, and HeroUI puts
|
|
339
|
+
* their `--shadow-surface` on exactly that variant. `secondary` and `tertiary` have too
|
|
340
|
+
* little fill to lift — a shadow under either would read as dirt rather than as height
|
|
341
|
+
* — and in dark mode the theme's surface shadow is already nothing (§4), which is why
|
|
342
|
+
* this names the role rather than a set of numbers.
|
|
343
|
+
*/
|
|
344
|
+
compoundVariants: [
|
|
345
|
+
...["primary", "secondary", "tertiary"].map((variant) => ({
|
|
346
|
+
when: { variant },
|
|
347
|
+
style: (theme) => ({
|
|
348
|
+
separator: { marginHorizontal: theme.spacing(3) }
|
|
349
|
+
})
|
|
350
|
+
})),
|
|
351
|
+
{
|
|
352
|
+
when: { variant: "primary" },
|
|
353
|
+
style: (theme) => ({
|
|
354
|
+
root: theme.shadows.surface
|
|
355
|
+
})
|
|
356
|
+
}
|
|
357
|
+
],
|
|
358
|
+
states: {
|
|
359
|
+
// On the row, not on the root: pressing one row must not tint the whole container.
|
|
360
|
+
pressed: (theme) => ({
|
|
361
|
+
trigger: { backgroundColor: theme.colors.defaultSoftPressed }
|
|
362
|
+
}),
|
|
363
|
+
disabled: (theme) => ({ root: { opacity: theme.opacity.disabled } })
|
|
364
|
+
},
|
|
365
|
+
defaultVariants: { variant: "ghost", size: "md" }
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
// src/components/accordion/accordion.tsx
|
|
369
|
+
|
|
370
|
+
var AccordionRoot = _react.forwardRef.call(void 0, function Accordion({
|
|
371
|
+
children,
|
|
372
|
+
variant,
|
|
373
|
+
size,
|
|
374
|
+
radius,
|
|
375
|
+
color,
|
|
376
|
+
selectionMode = "single",
|
|
377
|
+
value,
|
|
378
|
+
defaultValue,
|
|
379
|
+
onValueChange,
|
|
380
|
+
isDisabled = false,
|
|
381
|
+
isCollapsible = true,
|
|
382
|
+
hasSeparator = true,
|
|
383
|
+
asChild = false,
|
|
384
|
+
style,
|
|
385
|
+
...props
|
|
386
|
+
}, ref) {
|
|
387
|
+
const theme = _chunk57SJ4LJFcjs.useXAUITheme.call(void 0, );
|
|
388
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
389
|
+
const { isExpanded, toggle } = useExpansion({
|
|
390
|
+
value,
|
|
391
|
+
defaultValue,
|
|
392
|
+
onValueChange,
|
|
393
|
+
selectionMode,
|
|
394
|
+
isCollapsible
|
|
395
|
+
});
|
|
396
|
+
const selection = { variant, size, radius };
|
|
397
|
+
const styles = accordionRecipe.resolve({
|
|
398
|
+
theme,
|
|
399
|
+
selection,
|
|
400
|
+
states: { disabled: isDisabled }
|
|
401
|
+
});
|
|
402
|
+
const pressed = accordionRecipe.resolve({
|
|
403
|
+
theme,
|
|
404
|
+
selection,
|
|
405
|
+
states: { pressed: true }
|
|
406
|
+
});
|
|
407
|
+
const tint = color ? accordionRecipe.tint({ theme, color, selection }) : void 0;
|
|
408
|
+
const context = _react.useMemo.call(void 0, () => {
|
|
409
|
+
const trigger = _reactnative.StyleSheet.flatten([styles.trigger, _optionalChain([tint, 'optionalAccess', _2 => _2.trigger])]);
|
|
410
|
+
const indicator = _reactnative.StyleSheet.flatten([
|
|
411
|
+
styles.indicator,
|
|
412
|
+
_optionalChain([tint, 'optionalAccess', _3 => _3.indicator])
|
|
413
|
+
]);
|
|
414
|
+
return {
|
|
415
|
+
separatorStyle: styles.separator,
|
|
416
|
+
itemStyle: styles.item,
|
|
417
|
+
triggerStyle: tint ? [styles.trigger, tint.trigger] : styles.trigger,
|
|
418
|
+
triggerPressedStyle: pressed.trigger,
|
|
419
|
+
indicatorStyle: styles.indicator,
|
|
420
|
+
contentStyle: styles.content,
|
|
421
|
+
// The trigger is a row of views, so a stringifiable child is wrapped in a `Text` of
|
|
422
|
+
// its own — and that text takes the type the recipe put on the row.
|
|
423
|
+
labelStyle: {
|
|
424
|
+
color: trigger.color,
|
|
425
|
+
fontFamily: trigger.fontFamily,
|
|
426
|
+
fontWeight: trigger.fontWeight,
|
|
427
|
+
fontSize: trigger.fontSize,
|
|
428
|
+
lineHeight: trigger.lineHeight
|
|
429
|
+
},
|
|
430
|
+
glyph: {
|
|
431
|
+
size: indicator.fontSize,
|
|
432
|
+
color: typeof indicator.color === "string" ? indicator.color : void 0
|
|
433
|
+
},
|
|
434
|
+
isDisabled,
|
|
435
|
+
isExpanded,
|
|
436
|
+
toggle
|
|
437
|
+
};
|
|
438
|
+
}, [styles, pressed, tint, isDisabled, isExpanded, toggle]);
|
|
439
|
+
const rootStyle = [styles.root, _optionalChain([tint, 'optionalAccess', _4 => _4.root]), styleProps, style];
|
|
440
|
+
const items = _react.Children.toArray(children);
|
|
441
|
+
const rows = items.map((child, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
|
|
442
|
+
child,
|
|
443
|
+
hasSeparator && index < items.length - 1 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.View, { layout: LAYOUT, style: styles.separator }) : null
|
|
444
|
+
] }, index));
|
|
445
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AccordionProvider, { value: context, children: asChild ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7GHM4GKLcjs.Slot, { ref, ...rest, style: rootStyle, children }) : (
|
|
446
|
+
// Two layers, and the only place in the library where a root has one inside it.
|
|
447
|
+
// A single layer cannot both cast a shadow and clip its children on iOS, and this
|
|
448
|
+
// component needs both: `primary` is lifted, and a pressed row has to be cut
|
|
449
|
+
// against the card's rounded corner rather than painting over it.
|
|
450
|
+
//
|
|
451
|
+
// The layout transition is on each of them as well as on every row. Without it on
|
|
452
|
+
// the outer one the accordion's own height jumps to its new total in one frame
|
|
453
|
+
// while the rows inside it are still animating.
|
|
454
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.View, { ref, layout: LAYOUT, ...rest, style: rootStyle, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.View, { layout: LAYOUT, style: styles.container, children: rows }) })
|
|
455
|
+
) });
|
|
456
|
+
});
|
|
457
|
+
AccordionRoot.displayName = "XAUI.Accordion.Root";
|
|
458
|
+
|
|
459
|
+
// src/components/accordion/index.ts
|
|
460
|
+
var Accordion2 = Object.assign(AccordionRoot, {
|
|
461
|
+
Item: AccordionItem,
|
|
462
|
+
Trigger: AccordionTrigger,
|
|
463
|
+
Indicator: AccordionIndicator,
|
|
464
|
+
Content: AccordionContent
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
exports.LAYOUT = LAYOUT; exports.useAccordion = useAccordion; exports.useAccordionItem = useAccordionItem; exports.AccordionContent = AccordionContent; exports.AccordionIndicator = AccordionIndicator; exports.AccordionItem = AccordionItem; exports.AccordionTrigger = AccordionTrigger; exports.accordionRecipe = accordionRecipe; exports.AccordionRoot = AccordionRoot; exports.Accordion = Accordion2;
|
|
@@ -29,8 +29,8 @@ function _optionalChain(ops) {
|
|
|
29
29
|
}
|
|
30
30
|
return value;
|
|
31
31
|
}
|
|
32
|
-
var
|
|
33
|
-
var
|
|
32
|
+
var _chunk4KFKWBN5cjs = require('./chunk-4KFKWBN5.cjs');
|
|
33
|
+
var _chunk7GHM4GKLcjs = require('./chunk-7GHM4GKL.cjs');
|
|
34
34
|
var _chunkFNEUOBCVcjs = require('./chunk-FNEUOBCV.cjs');
|
|
35
35
|
var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
|
|
36
36
|
var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
|
|
@@ -42,7 +42,7 @@ var _reactnative = require('react-native');
|
|
|
42
42
|
// src/components/avatar/avatar-initials.tsx
|
|
43
43
|
|
|
44
44
|
// src/components/avatar/avatar.context.ts
|
|
45
|
-
var [AvatarProvider, useAvatar] =
|
|
45
|
+
var [AvatarProvider, useAvatar] = _chunk7GHM4GKLcjs.createSlotContext.call(void 0, "Avatar");
|
|
46
46
|
|
|
47
47
|
// src/components/avatar/avatar-initials.tsx
|
|
48
48
|
var _jsxruntime = require('react/jsx-runtime');
|
|
@@ -79,7 +79,7 @@ var AvatarFallback = _react.forwardRef.call(void 0, function AvatarFallback2({
|
|
|
79
79
|
icon
|
|
80
80
|
} = useAvatar();
|
|
81
81
|
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
82
|
-
const text =
|
|
82
|
+
const text = _chunk7GHM4GKLcjs.childrenToString.call(void 0, children);
|
|
83
83
|
const content = text !== null ? /* @__PURE__ */_jsxruntime.jsx.call(void 0, AvatarInitials, {
|
|
84
84
|
children: text
|
|
85
85
|
}) : children;
|
|
@@ -87,7 +87,7 @@ var AvatarFallback = _react.forwardRef.call(void 0, function AvatarFallback2({
|
|
|
87
87
|
ref,
|
|
88
88
|
style: [fallbackStyle, styleProps, style],
|
|
89
89
|
...rest,
|
|
90
|
-
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0,
|
|
90
|
+
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunk4KFKWBN5cjs.IconContext.Provider, {
|
|
91
91
|
value: icon,
|
|
92
92
|
children: content
|
|
93
93
|
})
|
|
@@ -134,10 +134,10 @@ var AvatarImage = _react.forwardRef.call(void 0, function AvatarImage2({
|
|
|
134
134
|
});
|
|
135
135
|
});
|
|
136
136
|
AvatarImage.displayName = "XAUI.Avatar.Image";
|
|
137
|
-
const
|
|
138
|
-
code: "function
|
|
139
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
140
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
137
|
+
const _worklet_11644836485943_init_data = {
|
|
138
|
+
code: "function chunk7TOG4TVUCjs1(){const{opacity}=this.__closure;return{opacity:opacity.value};}",
|
|
139
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-7TOG4TVU.cjs",
|
|
140
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunk7TOG4TVUCjs1\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-7TOG4TVU.cjs\"],\"mappings\":\"AAoG+E,SAAAA,iBAAMA,CAAA,QAAAC,OAAA,OAAAC,SAAA,CAE/E,MAAO,CAAED,OAAO,CAAEA,OAAO,CAACE,KAAM,CAAC,CACnC\",\"ignoreList\":[]}"
|
|
141
141
|
};
|
|
142
142
|
var FadingImage = _react.forwardRef.call(void 0, function FadingImage2({
|
|
143
143
|
onLoad,
|
|
@@ -151,26 +151,26 @@ var FadingImage = _react.forwardRef.call(void 0, function FadingImage2({
|
|
|
151
151
|
});
|
|
152
152
|
_optionalChain([onLoad, 'optionalCall', _ => _(event)]);
|
|
153
153
|
}, [opacity, onLoad]);
|
|
154
|
-
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function
|
|
155
|
-
|
|
154
|
+
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunk7TOG4TVUCjs1Factory({
|
|
155
|
+
_worklet_11644836485943_init_data,
|
|
156
156
|
opacity
|
|
157
157
|
}) {
|
|
158
158
|
const _e = [new global.Error(), -2, -27];
|
|
159
|
-
const
|
|
159
|
+
const chunk7TOG4TVUCjs1 = function () {
|
|
160
160
|
return {
|
|
161
161
|
opacity: opacity.value
|
|
162
162
|
};
|
|
163
163
|
};
|
|
164
|
-
|
|
164
|
+
chunk7TOG4TVUCjs1.__closure = {
|
|
165
165
|
opacity
|
|
166
166
|
};
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return
|
|
167
|
+
chunk7TOG4TVUCjs1.__workletHash = 11644836485943;
|
|
168
|
+
chunk7TOG4TVUCjs1.__pluginVersion = "0.7.4";
|
|
169
|
+
chunk7TOG4TVUCjs1.__initData = _worklet_11644836485943_init_data;
|
|
170
|
+
chunk7TOG4TVUCjs1.__stackDetails = _e;
|
|
171
|
+
return chunk7TOG4TVUCjs1;
|
|
172
172
|
}({
|
|
173
|
-
|
|
173
|
+
_worklet_11644836485943_init_data,
|
|
174
174
|
opacity
|
|
175
175
|
}), [opacity]);
|
|
176
176
|
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.Image, {
|
|
@@ -382,11 +382,11 @@ var AvatarRoot = _react.forwardRef.call(void 0, function Avatar({
|
|
|
382
382
|
};
|
|
383
383
|
}, [styles, tint]);
|
|
384
384
|
const rootStyle = [styles.root, _optionalChain([tint, 'optionalAccess', _3 => _3.root]), styleProps, style];
|
|
385
|
-
const text =
|
|
385
|
+
const text = _chunk7GHM4GKLcjs.childrenToString.call(void 0, children);
|
|
386
386
|
const content = text !== null ? /* @__PURE__ */_jsxruntime.jsx.call(void 0, AvatarFallback, {
|
|
387
387
|
children: text
|
|
388
388
|
}) : children;
|
|
389
|
-
const Root = asChild ?
|
|
389
|
+
const Root = asChild ? _chunk7GHM4GKLcjs.Slot : _reactnative.View;
|
|
390
390
|
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, AvatarProvider, {
|
|
391
391
|
value: context,
|
|
392
392
|
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, Root, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk7GHM4GKLcjs = require('./chunk-7GHM4GKL.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -18,7 +18,7 @@ var _react = require('react');
|
|
|
18
18
|
var _reactnative = require('react-native');
|
|
19
19
|
|
|
20
20
|
// src/components/text-field/text-field.context.ts
|
|
21
|
-
var [TextFieldProvider, useTextField] =
|
|
21
|
+
var [TextFieldProvider, useTextField] = _chunk7GHM4GKLcjs.createSlotContext.call(void 0, "TextField");
|
|
22
22
|
|
|
23
23
|
// src/components/text-field/text-field-description.tsx
|
|
24
24
|
var _jsxruntime = require('react/jsx-runtime');
|
|
@@ -505,7 +505,7 @@ var TextFieldRoot = _react.forwardRef.call(void 0, function TextField({
|
|
|
505
505
|
const rootStyle = [styles.root, _optionalChain([tint, 'optionalAccess', _3 => _3.root]), styleProps, style];
|
|
506
506
|
const surface = asChild ? (
|
|
507
507
|
// R12 — the caller's element *is* the column.
|
|
508
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
508
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7GHM4GKLcjs.Slot, { ref, ...rest, style: rootStyle, children })
|
|
509
509
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { ref, ...rest, style: rootStyle, children });
|
|
510
510
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TextFieldProvider, { value: context, children: surface });
|
|
511
511
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkTGMVEHV7cjs = require('./chunk-TGMVEHV7.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk7DPL3ZDScjs = require('./chunk-7DPL3ZDS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkEJQCQPETcjs = require('./chunk-EJQCQPET.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
|
|
@@ -45,7 +45,7 @@ var CloseButton = _react.forwardRef.call(void 0, function CloseButton2({
|
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
47
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
48
|
-
|
|
48
|
+
_chunkTGMVEHV7cjs.PressableFeedback,
|
|
49
49
|
{
|
|
50
50
|
ref,
|
|
51
51
|
isPressed,
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
-
var
|
|
3
|
+
var _chunk7GHM4GKLcjs = require('./chunk-7GHM4GKL.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkFNEUOBCVcjs = require('./chunk-FNEUOBCV.cjs');
|
|
@@ -81,7 +81,7 @@ var Typography = _react.forwardRef.call(void 0, function Typography2({ children,
|
|
|
81
81
|
const styles = typographyRecipe.resolve({ theme, selection });
|
|
82
82
|
const tint = color ? typographyRecipe.tint({ theme, color, selection }) : void 0;
|
|
83
83
|
const rootStyle = [styles.root, _optionalChain([tint, 'optionalAccess', _ => _.root]), styleProps, style];
|
|
84
|
-
const Root = asChild ?
|
|
84
|
+
const Root = asChild ? _chunk7GHM4GKLcjs.Slot : _reactnative.Text;
|
|
85
85
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { ref, style: rootStyle, ...rest, children });
|
|
86
86
|
});
|
|
87
87
|
Typography.displayName = "XAUI.Typography";
|
|
@@ -92,7 +92,7 @@ Typography.displayName = "XAUI.Typography";
|
|
|
92
92
|
|
|
93
93
|
var TextSpan = _react.forwardRef.call(void 0, function TextSpan2({ children, asChild = false, style, ...props }, ref) {
|
|
94
94
|
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
95
|
-
const Root = asChild ?
|
|
95
|
+
const Root = asChild ? _chunk7GHM4GKLcjs.Slot : _reactnative.Text;
|
|
96
96
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { ref, style: [styleProps, style], ...rest, children });
|
|
97
97
|
});
|
|
98
98
|
TextSpan.displayName = "XAUI.TextSpan";
|