@xaui/native 0.9.1-alpha.20 → 0.9.1-alpha.21
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-A4VD4MHK.cjs → chunk-4NE3SLTM.cjs} +63 -125
- package/dist/chunk-5LC6KVL3.cjs +68 -0
- package/dist/{chunk-6ARON3XT.cjs → chunk-APCBIHLR.cjs} +23 -50
- package/dist/chunk-BPBY7ON7.cjs +451 -0
- package/dist/{chunk-WXAME7KB.js → chunk-IBRVMLUF.js} +97 -157
- package/dist/{chunk-4EPS7UBO.js → chunk-ISVUXVFL.js} +18 -43
- package/dist/chunk-JL27KVRT.js +68 -0
- package/dist/chunk-RRRGLRRP.cjs +28 -0
- package/dist/chunk-SGHP76GU.js +28 -0
- package/dist/{chunk-MWXE7D4L.js → chunk-TUJBDS5M.js} +1 -1
- package/dist/{chunk-BHTFIZTQ.cjs → chunk-UL263KGM.cjs} +1 -1
- package/dist/chunk-YRCUALUQ.js +451 -0
- package/dist/components/button/index.cjs +5 -3
- package/dist/components/button/index.d.cts +3 -2
- package/dist/components/button/index.d.ts +3 -2
- package/dist/components/button/index.js +4 -2
- package/dist/components/card/index.cjs +20 -0
- package/dist/components/card/index.d.cts +620 -0
- package/dist/components/card/index.d.ts +620 -0
- package/dist/components/card/index.js +20 -0
- package/dist/components/typography/index.d.cts +1 -1
- package/dist/components/typography/index.d.ts +1 -1
- package/dist/{create-recipe-CPXFo2rk.d.ts → create-recipe-CC3NNCqF.d.ts} +6 -1
- package/dist/{create-recipe-C0XXjuow.d.cts → create-recipe-CPBFg7ym.d.cts} +6 -1
- package/dist/icon.type-BkcEPJbK.d.ts +73 -0
- package/dist/icon.type-Cs1tMX0W.d.cts +73 -0
- package/dist/index.cjs +21 -5
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +24 -8
- package/dist/{pressable-feedback.type-BwkKLQlX.d.ts → pressable-feedback.type-DsvWZXWC.d.ts} +4 -72
- package/dist/{pressable-feedback.type-1K8YEOb8.d.cts → pressable-feedback.type-wfeiJz5m.d.cts} +4 -72
- package/dist/system/index.cjs +4 -2
- package/dist/system/index.d.cts +5 -3
- package/dist/system/index.d.ts +5 -3
- package/dist/system/index.js +7 -5
- package/dist/theme/index.cjs +2 -2
- package/dist/theme/index.d.cts +1 -1
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.js +1 -1
- package/package.json +11 -1
|
@@ -39,68 +39,8 @@ function _optionalChain(ops) {
|
|
|
39
39
|
var _chunkEVXZGNPAcjs = require('./chunk-EVXZGNPA.cjs');
|
|
40
40
|
var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
|
|
41
41
|
|
|
42
|
-
// src/system/icon/icon-context.ts
|
|
43
|
-
var _react = require('react');
|
|
44
|
-
var IconContext = _react.createContext.call(void 0, {});
|
|
45
|
-
IconContext.displayName = "XAUI.Icon.Context";
|
|
46
|
-
function useIconContext() {
|
|
47
|
-
return _react.useContext.call(void 0, IconContext);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// src/system/icon/icon.tsx
|
|
51
|
-
|
|
52
|
-
var _reactnative = require('react-native');
|
|
53
|
-
var _jsxruntime = require('react/jsx-runtime');
|
|
54
|
-
function Icon(props) {
|
|
55
|
-
const inherited = useIconContext();
|
|
56
|
-
const theme = _chunk57SJ4LJFcjs.useXAUITheme.call(void 0);
|
|
57
|
-
const size = _nullishCoalesce(_nullishCoalesce(props.size, () => inherited.size), () => theme.fontSizes.md);
|
|
58
|
-
const color = _nullishCoalesce(_nullishCoalesce(props.color, () => inherited.color), () => theme.colors.foreground);
|
|
59
|
-
if (props.as) {
|
|
60
|
-
const Component = props.as;
|
|
61
|
-
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, Component, {
|
|
62
|
-
size,
|
|
63
|
-
color
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
if (_react.isValidElement.call(void 0, props.children)) {
|
|
67
|
-
return _react.cloneElement.call(void 0, props.children, {
|
|
68
|
-
width: size,
|
|
69
|
-
height: size,
|
|
70
|
-
color
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
if (props.source) return /* @__PURE__ */_jsxruntime.jsx.call(void 0, IconImage, {
|
|
74
|
-
...props,
|
|
75
|
-
resolved: {
|
|
76
|
-
size,
|
|
77
|
-
color
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
throw new Error("XAUI: Icon needs one of `as` (an icon component), a raw SVG element as its child, or `source` (an image). It renders nothing on its own.");
|
|
81
|
-
}
|
|
82
|
-
Icon.displayName = "XAUI.Icon";
|
|
83
|
-
function IconImage({
|
|
84
|
-
source,
|
|
85
|
-
style,
|
|
86
|
-
resolved,
|
|
87
|
-
size: _size,
|
|
88
|
-
color: _color,
|
|
89
|
-
...props
|
|
90
|
-
}) {
|
|
91
|
-
const [styleProps] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
|
|
92
|
-
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Image, {
|
|
93
|
-
source,
|
|
94
|
-
style: [{
|
|
95
|
-
width: resolved.size,
|
|
96
|
-
height: resolved.size,
|
|
97
|
-
tintColor: resolved.color
|
|
98
|
-
}, styleProps, style]
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
|
|
102
42
|
// src/system/pressable-feedback/pressable-feedback-context.ts
|
|
103
|
-
|
|
43
|
+
var _react = require('react');
|
|
104
44
|
var [FeedbackProvider, useFeedback] = _chunkEVXZGNPAcjs.createSlotContext.call(void 0, "PressableFeedback");
|
|
105
45
|
var DisableAllContext = _react.createContext.call(void 0, false);
|
|
106
46
|
|
|
@@ -108,13 +48,13 @@ var DisableAllContext = _react.createContext.call(void 0, false);
|
|
|
108
48
|
var PRESS_SCALE = 0.985;
|
|
109
49
|
var PRESS_DURATION = 300;
|
|
110
50
|
var SCALE_REFERENCE_WIDTH = 300;
|
|
111
|
-
const
|
|
112
|
-
code: "function
|
|
113
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
114
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
51
|
+
const _worklet_7095389161049_init_data = {
|
|
52
|
+
code: "function pressScaleFor_chunk4NE3SLTMCjs1(width){const{SCALE_REFERENCE_WIDTH,PRESS_SCALE}=this.__closure;const coefficient=width>0?SCALE_REFERENCE_WIDTH/width:1;return 1-(1-PRESS_SCALE)*coefficient;}",
|
|
53
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-4NE3SLTM.cjs",
|
|
54
|
+
sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunk4NE3SLTMCjs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-4NE3SLTM.cjs\"],\"mappings\":\"AAoBA,SAAAA,+BAA8BA,CAAAC,KAAA,QAAAC,qBAAA,CAAAC,WAAA,OAAAC,SAAA,CAE5B,KAAM,CAAAC,WAAW,CAAGJ,KAAK,CAAG,CAAC,CAAGC,qBAAqB,CAAGD,KAAK,CAAG,CAAC,CACjE,MAAO,EAAC,CAAG,CAAC,CAAC,CAAGE,WAAW,EAAIE,WAAW,CAC5C\",\"ignoreList\":[]}"
|
|
115
55
|
};
|
|
116
|
-
const pressScaleFor = function
|
|
117
|
-
|
|
56
|
+
const pressScaleFor = function pressScaleFor_chunk4NE3SLTMCjs1Factory({
|
|
57
|
+
_worklet_7095389161049_init_data,
|
|
118
58
|
SCALE_REFERENCE_WIDTH,
|
|
119
59
|
PRESS_SCALE
|
|
120
60
|
}) {
|
|
@@ -127,13 +67,13 @@ const pressScaleFor = function pressScaleFor_chunkA4VD4MHKCjs1Factory({
|
|
|
127
67
|
SCALE_REFERENCE_WIDTH,
|
|
128
68
|
PRESS_SCALE
|
|
129
69
|
};
|
|
130
|
-
pressScaleFor.__workletHash =
|
|
70
|
+
pressScaleFor.__workletHash = 7095389161049;
|
|
131
71
|
pressScaleFor.__pluginVersion = "0.7.4";
|
|
132
|
-
pressScaleFor.__initData =
|
|
72
|
+
pressScaleFor.__initData = _worklet_7095389161049_init_data;
|
|
133
73
|
pressScaleFor.__stackDetails = _e;
|
|
134
74
|
return pressScaleFor;
|
|
135
75
|
}({
|
|
136
|
-
|
|
76
|
+
_worklet_7095389161049_init_data,
|
|
137
77
|
SCALE_REFERENCE_WIDTH,
|
|
138
78
|
PRESS_SCALE
|
|
139
79
|
});
|
|
@@ -146,26 +86,26 @@ var RIPPLE_CONFIRM_DURATION = 225;
|
|
|
146
86
|
var RIPPLE_FADE_IN = 75;
|
|
147
87
|
var RIPPLE_FADE_OUT_DELAY = 225;
|
|
148
88
|
var RIPPLE_FADE_OUT = 150;
|
|
149
|
-
const
|
|
150
|
-
code: "function
|
|
151
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
152
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
89
|
+
const _worklet_16185247461666_init_data = {
|
|
90
|
+
code: "function rippleRadiusFor_chunk4NE3SLTMCjs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
|
|
91
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-4NE3SLTM.cjs",
|
|
92
|
+
sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunk4NE3SLTMCjs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-4NE3SLTM.cjs\"],\"mappings\":\"AAkCA,SAAAA,iCAAwCA,CAAAC,KAAA,CAAAC,MAAA,EAEtC,MAAO,CAAAC,IAAI,CAACC,IAAI,CAACH,KAAK,CAAGA,KAAK,CAAGC,MAAM,CAAGA,MAAM,CAAC,CAAG,CAAC,CAAG,CAAC,CAC3D\",\"ignoreList\":[]}"
|
|
153
93
|
};
|
|
154
|
-
const rippleRadiusFor = function
|
|
155
|
-
|
|
94
|
+
const rippleRadiusFor = function rippleRadiusFor_chunk4NE3SLTMCjs2Factory({
|
|
95
|
+
_worklet_16185247461666_init_data
|
|
156
96
|
}) {
|
|
157
97
|
const _e = [new global.Error(), 1, -27];
|
|
158
98
|
const rippleRadiusFor = function (width, height) {
|
|
159
99
|
return Math.sqrt(width * width + height * height) / 2 + 5;
|
|
160
100
|
};
|
|
161
101
|
rippleRadiusFor.__closure = {};
|
|
162
|
-
rippleRadiusFor.__workletHash =
|
|
102
|
+
rippleRadiusFor.__workletHash = 16185247461666;
|
|
163
103
|
rippleRadiusFor.__pluginVersion = "0.7.4";
|
|
164
|
-
rippleRadiusFor.__initData =
|
|
104
|
+
rippleRadiusFor.__initData = _worklet_16185247461666_init_data;
|
|
165
105
|
rippleRadiusFor.__stackDetails = _e;
|
|
166
106
|
return rippleRadiusFor;
|
|
167
107
|
}({
|
|
168
|
-
|
|
108
|
+
_worklet_16185247461666_init_data
|
|
169
109
|
});
|
|
170
110
|
var ALL_OFF = {
|
|
171
111
|
scale: false,
|
|
@@ -269,6 +209,7 @@ function feedbackChildren(children, asChild) {
|
|
|
269
209
|
|
|
270
210
|
// src/system/pressable-feedback/pressable-feedback.tsx
|
|
271
211
|
|
|
212
|
+
var _reactnative = require('react-native');
|
|
272
213
|
var _reactnativereanimated = require('react-native-reanimated');
|
|
273
214
|
var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
|
|
274
215
|
|
|
@@ -289,7 +230,7 @@ function radiusFrom(style) {
|
|
|
289
230
|
}
|
|
290
231
|
|
|
291
232
|
// src/system/pressable-feedback/pressable-feedback.tsx
|
|
292
|
-
|
|
233
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
293
234
|
var AnimatedPressable = _reactnativereanimated2.default.createAnimatedComponent(_reactnative.Pressable);
|
|
294
235
|
var AnimatedSlot = _reactnativereanimated2.default.createAnimatedComponent(_chunkEVXZGNPAcjs.Slot);
|
|
295
236
|
var PressableFeedback = _react.forwardRef.call(void 0, function PressableFeedback2({
|
|
@@ -339,10 +280,10 @@ var StaticFeedback = _react.forwardRef.call(void 0, function StaticFeedback2({
|
|
|
339
280
|
})
|
|
340
281
|
});
|
|
341
282
|
});
|
|
342
|
-
const
|
|
343
|
-
code: "function
|
|
344
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
345
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
283
|
+
const _worklet_404966677504_init_data = {
|
|
284
|
+
code: "function chunk4NE3SLTMCjs3(){const{animation,pressedScale,progress}=this.__closure;if(!animation.scale)return{};return{transform:[{scale:1-(1-pressedScale.value)*progress.value}]};}",
|
|
285
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-4NE3SLTM.cjs",
|
|
286
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunk4NE3SLTMCjs3\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-4NE3SLTM.cjs\"],\"mappings\":\"AAiN6E,SAAAA,iBAAMA,CAAA,QAAAC,SAAA,CAAAC,YAAA,CAAAC,QAAA,OAAAC,SAAA,CAE/E,GAAI,CAACH,SAAS,CAACI,KAAK,CAAE,MAAO,CAAC,CAAC,CAC/B,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAED,KAAK,CAAE,CAAC,CAAG,CAAC,CAAC,CAAGH,YAAY,CAACK,KAAK,EAAIJ,QAAQ,CAACI,KAAM,CAAC,CAAE,CAAC,CAClF\",\"ignoreList\":[]}"
|
|
346
287
|
};
|
|
347
288
|
var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2({
|
|
348
289
|
isPressed = false,
|
|
@@ -371,14 +312,14 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
|
|
|
371
312
|
});
|
|
372
313
|
}, [isPressed, progress]);
|
|
373
314
|
const pressedScale = _reactnativereanimated.useDerivedValue.call(void 0, () => pressScaleFor(size.value.width));
|
|
374
|
-
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function
|
|
375
|
-
|
|
315
|
+
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunk4NE3SLTMCjs3Factory({
|
|
316
|
+
_worklet_404966677504_init_data,
|
|
376
317
|
animation,
|
|
377
318
|
pressedScale,
|
|
378
319
|
progress
|
|
379
320
|
}) {
|
|
380
321
|
const _e = [new global.Error(), -4, -27];
|
|
381
|
-
const
|
|
322
|
+
const chunk4NE3SLTMCjs3 = function () {
|
|
382
323
|
if (!animation.scale) return {};
|
|
383
324
|
return {
|
|
384
325
|
transform: [{
|
|
@@ -386,18 +327,18 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
|
|
|
386
327
|
}]
|
|
387
328
|
};
|
|
388
329
|
};
|
|
389
|
-
|
|
330
|
+
chunk4NE3SLTMCjs3.__closure = {
|
|
390
331
|
animation,
|
|
391
332
|
pressedScale,
|
|
392
333
|
progress
|
|
393
334
|
};
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
return
|
|
335
|
+
chunk4NE3SLTMCjs3.__workletHash = 404966677504;
|
|
336
|
+
chunk4NE3SLTMCjs3.__pluginVersion = "0.7.4";
|
|
337
|
+
chunk4NE3SLTMCjs3.__initData = _worklet_404966677504_init_data;
|
|
338
|
+
chunk4NE3SLTMCjs3.__stackDetails = _e;
|
|
339
|
+
return chunk4NE3SLTMCjs3;
|
|
399
340
|
}({
|
|
400
|
-
|
|
341
|
+
_worklet_404966677504_init_data,
|
|
401
342
|
animation,
|
|
402
343
|
pressedScale,
|
|
403
344
|
progress
|
|
@@ -539,10 +480,10 @@ function PressableFeedbackHighlight({
|
|
|
539
480
|
}
|
|
540
481
|
PressableFeedbackHighlight.displayName = "XAUI.PressableFeedback.Highlight";
|
|
541
482
|
markOverlay(PressableFeedbackHighlight);
|
|
542
|
-
const
|
|
543
|
-
code: "function
|
|
544
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
545
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
483
|
+
const _worklet_7964971622326_init_data = {
|
|
484
|
+
code: "function chunk4NE3SLTMCjs4(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
|
|
485
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-4NE3SLTM.cjs",
|
|
486
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunk4NE3SLTMCjs4\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-4NE3SLTM.cjs\"],\"mappings\":\"AA+V6E,SAAAA,iBAAMA,CAAA,QAAAC,KAAA,CAAAC,OAAA,OAAAC,SAAA,CAE/E,MAAO,CAAED,OAAO,CAAED,KAAK,CAACG,KAAK,CAAGF,OAAQ,CAAC,CAC3C\",\"ignoreList\":[]}"
|
|
546
487
|
};
|
|
547
488
|
function AnimatedHighlight({
|
|
548
489
|
base,
|
|
@@ -558,28 +499,28 @@ function AnimatedHighlight({
|
|
|
558
499
|
duration
|
|
559
500
|
});
|
|
560
501
|
}, [isPressed, shown, duration]);
|
|
561
|
-
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function
|
|
562
|
-
|
|
502
|
+
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunk4NE3SLTMCjs4Factory({
|
|
503
|
+
_worklet_7964971622326_init_data,
|
|
563
504
|
shown,
|
|
564
505
|
opacity
|
|
565
506
|
}) {
|
|
566
507
|
const _e = [new global.Error(), -3, -27];
|
|
567
|
-
const
|
|
508
|
+
const chunk4NE3SLTMCjs4 = function () {
|
|
568
509
|
return {
|
|
569
510
|
opacity: shown.value * opacity
|
|
570
511
|
};
|
|
571
512
|
};
|
|
572
|
-
|
|
513
|
+
chunk4NE3SLTMCjs4.__closure = {
|
|
573
514
|
shown,
|
|
574
515
|
opacity
|
|
575
516
|
};
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
return
|
|
517
|
+
chunk4NE3SLTMCjs4.__workletHash = 7964971622326;
|
|
518
|
+
chunk4NE3SLTMCjs4.__pluginVersion = "0.7.4";
|
|
519
|
+
chunk4NE3SLTMCjs4.__initData = _worklet_7964971622326_init_data;
|
|
520
|
+
chunk4NE3SLTMCjs4.__stackDetails = _e;
|
|
521
|
+
return chunk4NE3SLTMCjs4;
|
|
581
522
|
}({
|
|
582
|
-
|
|
523
|
+
_worklet_7964971622326_init_data,
|
|
583
524
|
shown,
|
|
584
525
|
opacity
|
|
585
526
|
}), [shown, opacity]);
|
|
@@ -643,10 +584,10 @@ function PressableFeedbackRipple({
|
|
|
643
584
|
}
|
|
644
585
|
PressableFeedbackRipple.displayName = "XAUI.PressableFeedback.Ripple";
|
|
645
586
|
markOverlay(PressableFeedbackRipple);
|
|
646
|
-
const
|
|
647
|
-
code: "function
|
|
648
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
649
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
587
|
+
const _worklet_16723479562203_init_data = {
|
|
588
|
+
code: "function chunk4NE3SLTMCjs5(){const{wave,RIPPLE_START_SCALE,center,opacity,radius}=this.__closure;const t=wave.expand.value;const from=wave.origin.value;const scale=RIPPLE_START_SCALE+(1-RIPPLE_START_SCALE)*t;const x=from.x+(center.x-from.x)*t;const y=from.y+(center.y-from.y)*t;return{opacity:wave.alpha.value*opacity,transform:[{translateX:x-radius},{translateY:y-radius},{scale:scale}]};}",
|
|
589
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-4NE3SLTM.cjs",
|
|
590
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunk4NE3SLTMCjs5\",\"wave\",\"RIPPLE_START_SCALE\",\"center\",\"opacity\",\"radius\",\"__closure\",\"t\",\"expand\",\"value\",\"from\",\"origin\",\"scale\",\"x\",\"y\",\"alpha\",\"transform\",\"translateX\",\"translateY\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-4NE3SLTM.cjs\"],\"mappings\":\"AA+Z6E,SAAAA,iBAAMA,CAAA,QAAAC,IAAA,CAAAC,kBAAA,CAAAC,MAAA,CAAAC,OAAA,CAAAC,MAAA,OAAAC,SAAA,CAE/E,KAAM,CAAAC,CAAC,CAAGN,IAAI,CAACO,MAAM,CAACC,KAAK,CAC3B,KAAM,CAAAC,IAAI,CAAGT,IAAI,CAACU,MAAM,CAACF,KAAK,CAC9B,KAAM,CAAAG,KAAK,CAAGV,kBAAkB,CAAG,CAAC,CAAC,CAAGA,kBAAkB,EAAIK,CAAC,CAC/D,KAAM,CAAAM,CAAC,CAAGH,IAAI,CAACG,CAAC,CAAG,CAACV,MAAM,CAACU,CAAC,CAAGH,IAAI,CAACG,CAAC,EAAIN,CAAC,CAC1C,KAAM,CAAAO,CAAC,CAAGJ,IAAI,CAACI,CAAC,CAAG,CAACX,MAAM,CAACW,CAAC,CAAGJ,IAAI,CAACI,CAAC,EAAIP,CAAC,CAC1C,MAAO,CAELH,OAAO,CAAEH,IAAI,CAACc,KAAK,CAACN,KAAK,CAAGL,OAAO,CACnCY,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEJ,CAAC,CAAGR,MAAO,CAAC,CAAE,CAAEa,UAAU,CAAEJ,CAAC,CAAGT,MAAO,CAAC,CAAE,CAAEO,KAAA,CAAAA,KAAM,CAAC,CAC/E,CAAC,CACH\",\"ignoreList\":[]}"
|
|
650
591
|
};
|
|
651
592
|
function RippleWave({
|
|
652
593
|
wave,
|
|
@@ -656,8 +597,8 @@ function RippleWave({
|
|
|
656
597
|
opacity,
|
|
657
598
|
style
|
|
658
599
|
}) {
|
|
659
|
-
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function
|
|
660
|
-
|
|
600
|
+
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunk4NE3SLTMCjs5Factory({
|
|
601
|
+
_worklet_16723479562203_init_data,
|
|
661
602
|
wave,
|
|
662
603
|
RIPPLE_START_SCALE,
|
|
663
604
|
center,
|
|
@@ -665,7 +606,7 @@ function RippleWave({
|
|
|
665
606
|
radius
|
|
666
607
|
}) {
|
|
667
608
|
const _e = [new global.Error(), -6, -27];
|
|
668
|
-
const
|
|
609
|
+
const chunk4NE3SLTMCjs5 = function () {
|
|
669
610
|
const t = wave.expand.value;
|
|
670
611
|
const from = wave.origin.value;
|
|
671
612
|
const scale = RIPPLE_START_SCALE + (1 - RIPPLE_START_SCALE) * t;
|
|
@@ -683,20 +624,20 @@ function RippleWave({
|
|
|
683
624
|
}]
|
|
684
625
|
};
|
|
685
626
|
};
|
|
686
|
-
|
|
627
|
+
chunk4NE3SLTMCjs5.__closure = {
|
|
687
628
|
wave,
|
|
688
629
|
RIPPLE_START_SCALE,
|
|
689
630
|
center,
|
|
690
631
|
opacity,
|
|
691
632
|
radius
|
|
692
633
|
};
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
return
|
|
634
|
+
chunk4NE3SLTMCjs5.__workletHash = 16723479562203;
|
|
635
|
+
chunk4NE3SLTMCjs5.__pluginVersion = "0.7.4";
|
|
636
|
+
chunk4NE3SLTMCjs5.__initData = _worklet_16723479562203_init_data;
|
|
637
|
+
chunk4NE3SLTMCjs5.__stackDetails = _e;
|
|
638
|
+
return chunk4NE3SLTMCjs5;
|
|
698
639
|
}({
|
|
699
|
-
|
|
640
|
+
_worklet_16723479562203_init_data,
|
|
700
641
|
wave,
|
|
701
642
|
RIPPLE_START_SCALE,
|
|
702
643
|
center,
|
|
@@ -732,9 +673,6 @@ var PressableFeedback3 = Object.assign(PressableFeedback, {
|
|
|
732
673
|
Highlight: PressableFeedbackHighlight,
|
|
733
674
|
Ripple: PressableFeedbackRipple
|
|
734
675
|
});
|
|
735
|
-
exports.IconContext = IconContext;
|
|
736
|
-
exports.useIconContext = useIconContext;
|
|
737
|
-
exports.Icon = Icon;
|
|
738
676
|
exports.useFeedback = useFeedback;
|
|
739
677
|
exports.PRESS_SCALE = PRESS_SCALE;
|
|
740
678
|
exports.PRESS_DURATION = PRESS_DURATION;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
|
+
|
|
3
|
+
var _chunkEVXZGNPAcjs = require('./chunk-EVXZGNPA.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
|
|
7
|
+
|
|
8
|
+
// src/system/icon/icon-context.ts
|
|
9
|
+
var _react = require('react');
|
|
10
|
+
var IconContext = _react.createContext.call(void 0, {});
|
|
11
|
+
IconContext.displayName = "XAUI.Icon.Context";
|
|
12
|
+
function useIconContext() {
|
|
13
|
+
return _react.useContext.call(void 0, IconContext);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// src/system/icon/icon.tsx
|
|
17
|
+
|
|
18
|
+
var _reactnative = require('react-native');
|
|
19
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
20
|
+
function Icon(props) {
|
|
21
|
+
const inherited = useIconContext();
|
|
22
|
+
const theme = _chunk57SJ4LJFcjs.useXAUITheme.call(void 0, );
|
|
23
|
+
const size = _nullishCoalesce(_nullishCoalesce(props.size, () => ( inherited.size)), () => ( theme.fontSizes.md));
|
|
24
|
+
const color = _nullishCoalesce(_nullishCoalesce(props.color, () => ( inherited.color)), () => ( theme.colors.foreground));
|
|
25
|
+
if (props.as) {
|
|
26
|
+
const Component = props.as;
|
|
27
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component, { size, color });
|
|
28
|
+
}
|
|
29
|
+
if (_react.isValidElement.call(void 0, props.children)) {
|
|
30
|
+
return _react.cloneElement.call(void 0, props.children, {
|
|
31
|
+
width: size,
|
|
32
|
+
height: size,
|
|
33
|
+
color
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
if (props.source) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, IconImage, { ...props, resolved: { size, color } });
|
|
37
|
+
throw new Error(
|
|
38
|
+
"XAUI: Icon needs one of `as` (an icon component), a raw SVG element as its child, or `source` (an image). It renders nothing on its own."
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
Icon.displayName = "XAUI.Icon";
|
|
42
|
+
function IconImage({
|
|
43
|
+
source,
|
|
44
|
+
style,
|
|
45
|
+
resolved,
|
|
46
|
+
size: _size,
|
|
47
|
+
color: _color,
|
|
48
|
+
...props
|
|
49
|
+
}) {
|
|
50
|
+
const [styleProps] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
|
|
51
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
52
|
+
_reactnative.Image,
|
|
53
|
+
{
|
|
54
|
+
source,
|
|
55
|
+
style: [
|
|
56
|
+
{ width: resolved.size, height: resolved.size, tintColor: resolved.color },
|
|
57
|
+
styleProps,
|
|
58
|
+
style
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
exports.IconContext = IconContext; exports.useIconContext = useIconContext; exports.Icon = Icon;
|
|
@@ -36,7 +36,9 @@ function _optionalChain(ops) {
|
|
|
36
36
|
}
|
|
37
37
|
return value;
|
|
38
38
|
}
|
|
39
|
-
var
|
|
39
|
+
var _chunkRRRGLRRPcjs = require('./chunk-RRRGLRRP.cjs');
|
|
40
|
+
var _chunk5LC6KVL3cjs = require('./chunk-5LC6KVL3.cjs');
|
|
41
|
+
var _chunk4NE3SLTMcjs = require('./chunk-4NE3SLTM.cjs');
|
|
40
42
|
var _chunkUVO4GFSWcjs = require('./chunk-UVO4GFSW.cjs');
|
|
41
43
|
var _chunkEVXZGNPAcjs = require('./chunk-EVXZGNPA.cjs');
|
|
42
44
|
var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
|
|
@@ -54,7 +56,7 @@ function ButtonIcon({
|
|
|
54
56
|
const {
|
|
55
57
|
icon
|
|
56
58
|
} = useButton();
|
|
57
|
-
return /* @__PURE__ */_jsxruntime.jsx.call(void 0,
|
|
59
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunk5LC6KVL3cjs.Icon, {
|
|
58
60
|
size: _nullishCoalesce(size, () => icon.size),
|
|
59
61
|
color: _nullishCoalesce(color, () => icon.color),
|
|
60
62
|
...rest
|
|
@@ -108,10 +110,10 @@ function ButtonSpinner({
|
|
|
108
110
|
});
|
|
109
111
|
}
|
|
110
112
|
ButtonSpinner.displayName = "XAUI.Button.Spinner";
|
|
111
|
-
const
|
|
112
|
-
code: "function
|
|
113
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
114
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
113
|
+
const _worklet_6059163963819_init_data = {
|
|
114
|
+
code: "function chunkAPCBIHLRCjs1(){const{angle}=this.__closure;return{transform:[{rotate:angle.value+\"deg\"}]};}",
|
|
115
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-APCBIHLR.cjs",
|
|
116
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkAPCBIHLRCjs1\",\"angle\",\"__closure\",\"transform\",\"rotate\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-APCBIHLR.cjs\"],\"mappings\":\"AAoF6E,SAAAA,iBAAMA,CAAA,QAAAC,KAAA,OAAAC,SAAA,CAE/E,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAEC,MAAM,CAAKH,KAAK,CAACI,KAAK,MAAM,CAAC,CAAE,CAAC,CACzD\",\"ignoreList\":[]}"
|
|
115
117
|
};
|
|
116
118
|
function SpinningRing({
|
|
117
119
|
style
|
|
@@ -124,28 +126,28 @@ function SpinningRing({
|
|
|
124
126
|
}), -1, false);
|
|
125
127
|
return () => _reactnativereanimated.cancelAnimation.call(void 0, angle);
|
|
126
128
|
}, [angle]);
|
|
127
|
-
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function
|
|
128
|
-
|
|
129
|
+
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkAPCBIHLRCjs1Factory({
|
|
130
|
+
_worklet_6059163963819_init_data,
|
|
129
131
|
angle
|
|
130
132
|
}) {
|
|
131
133
|
const _e = [new global.Error(), -2, -27];
|
|
132
|
-
const
|
|
134
|
+
const chunkAPCBIHLRCjs1 = function () {
|
|
133
135
|
return {
|
|
134
136
|
transform: [{
|
|
135
137
|
rotate: `${angle.value}deg`
|
|
136
138
|
}]
|
|
137
139
|
};
|
|
138
140
|
};
|
|
139
|
-
|
|
141
|
+
chunkAPCBIHLRCjs1.__closure = {
|
|
140
142
|
angle
|
|
141
143
|
};
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
return
|
|
144
|
+
chunkAPCBIHLRCjs1.__workletHash = 6059163963819;
|
|
145
|
+
chunkAPCBIHLRCjs1.__pluginVersion = "0.7.4";
|
|
146
|
+
chunkAPCBIHLRCjs1.__initData = _worklet_6059163963819_init_data;
|
|
147
|
+
chunkAPCBIHLRCjs1.__stackDetails = _e;
|
|
148
|
+
return chunkAPCBIHLRCjs1;
|
|
147
149
|
}({
|
|
148
|
-
|
|
150
|
+
_worklet_6059163963819_init_data,
|
|
149
151
|
angle
|
|
150
152
|
}), [angle]);
|
|
151
153
|
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.View, {
|
|
@@ -155,33 +157,6 @@ function SpinningRing({
|
|
|
155
157
|
|
|
156
158
|
// src/components/button/button.tsx
|
|
157
159
|
|
|
158
|
-
// src/hooks/use-press-state.ts
|
|
159
|
-
|
|
160
|
-
function usePressState(handlers = {}) {
|
|
161
|
-
const [isPressed, setIsPressed] = _react.useState.call(void 0, false);
|
|
162
|
-
const latest = _react.useRef.call(void 0, handlers);
|
|
163
|
-
latest.current = handlers;
|
|
164
|
-
const onPressIn = _react.useCallback.call(void 0, event => {
|
|
165
|
-
setIsPressed(true);
|
|
166
|
-
_optionalChain([latest, 'access', _ => _.current, 'access', _2 => _2.onPressIn, 'optionalCall', _3 => _3(event)]);
|
|
167
|
-
}, []);
|
|
168
|
-
const onPressOut = _react.useCallback.call(void 0, event => {
|
|
169
|
-
setIsPressed(false);
|
|
170
|
-
_optionalChain([latest, 'access', _4 => _4.current, 'access', _5 => _5.onPressOut, 'optionalCall', _6 => _6(event)]);
|
|
171
|
-
}, []);
|
|
172
|
-
const press = _react.useRef.call(void 0, {
|
|
173
|
-
onPressIn,
|
|
174
|
-
onPressOut
|
|
175
|
-
}).current;
|
|
176
|
-
return [isPressed, press];
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// src/utils/warn-dev.ts
|
|
180
|
-
function warnDev(message) {
|
|
181
|
-
if (typeof __DEV__ !== "undefined" && !__DEV__) return;
|
|
182
|
-
console.warn(`XAUI: ${message}`);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
160
|
// src/components/button/button.recipe.ts
|
|
186
161
|
var SLOTS = ["root", "label", "icon", "spinner"];
|
|
187
162
|
var VARIANT_TOKENS = {
|
|
@@ -446,7 +421,7 @@ var ButtonRoot = _react.forwardRef.call(void 0, function Button({
|
|
|
446
421
|
}, ref) {
|
|
447
422
|
const theme = _chunk57SJ4LJFcjs.useXAUITheme.call(void 0);
|
|
448
423
|
const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
|
|
449
|
-
const [isPressed, press] = usePressState({
|
|
424
|
+
const [isPressed, press] = _chunkRRRGLRRPcjs.usePressState.call(void 0, {
|
|
450
425
|
onPressIn,
|
|
451
426
|
onPressOut
|
|
452
427
|
});
|
|
@@ -472,7 +447,7 @@ var ButtonRoot = _react.forwardRef.call(void 0, function Button({
|
|
|
472
447
|
states
|
|
473
448
|
}) : void 0;
|
|
474
449
|
const context = _react.useMemo.call(void 0, () => {
|
|
475
|
-
const icon = _reactnative.StyleSheet.flatten([styles.icon, _optionalChain([tint, 'optionalAccess',
|
|
450
|
+
const icon = _reactnative.StyleSheet.flatten([styles.icon, _optionalChain([tint, 'optionalAccess', _ => _.icon])]);
|
|
476
451
|
return {
|
|
477
452
|
labelStyle: tint ? [styles.label, tint.label] : styles.label,
|
|
478
453
|
spinnerStyle: tint ? [styles.spinner, tint.spinner] : styles.spinner,
|
|
@@ -486,17 +461,17 @@ var ButtonRoot = _react.forwardRef.call(void 0, function Button({
|
|
|
486
461
|
isLoading
|
|
487
462
|
};
|
|
488
463
|
}, [styles, tint, isDisabled, isLoading]);
|
|
489
|
-
const rootStyle = [styles.root, _optionalChain([tint, 'optionalAccess',
|
|
464
|
+
const rootStyle = [styles.root, _optionalChain([tint, 'optionalAccess', _2 => _2.root]), styleProps, typeof style === "function" ? style({
|
|
490
465
|
pressed: isPressed
|
|
491
466
|
}) : style];
|
|
492
467
|
const text = _chunkEVXZGNPAcjs.childrenToString.call(void 0, children);
|
|
493
468
|
const showSpinner = isLoading && !containsElementOfType(children, ButtonSpinner);
|
|
494
469
|
if (isIconOnly && !rest.accessibilityLabel && !rest["aria-label"]) {
|
|
495
|
-
warnDev("Button: an icon-only button needs an `accessibilityLabel` \u2014 there is no text for a screen reader to read, so it announces as an unlabelled button.");
|
|
470
|
+
_chunkRRRGLRRPcjs.warnDev.call(void 0, "Button: an icon-only button needs an `accessibilityLabel` \u2014 there is no text for a screen reader to read, so it announces as an unlabelled button.");
|
|
496
471
|
}
|
|
497
472
|
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, ButtonProvider, {
|
|
498
473
|
value: context,
|
|
499
|
-
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0,
|
|
474
|
+
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunk4NE3SLTMcjs.PressableFeedback, {
|
|
500
475
|
ref,
|
|
501
476
|
isPressed,
|
|
502
477
|
isDisabled: isDisabled || isLoading,
|
|
@@ -528,7 +503,5 @@ var Button2 = Object.assign(ButtonRoot, {
|
|
|
528
503
|
Spinner: ButtonSpinner
|
|
529
504
|
});
|
|
530
505
|
exports.useButton = useButton;
|
|
531
|
-
exports.usePressState = usePressState;
|
|
532
|
-
exports.warnDev = warnDev;
|
|
533
506
|
exports.buttonRecipe = buttonRecipe;
|
|
534
507
|
exports.Button = Button2;
|