@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
|
@@ -2,6 +2,29 @@ import {
|
|
|
2
2
|
mergeRefs
|
|
3
3
|
} from "./chunk-36PRYGAM.js";
|
|
4
4
|
|
|
5
|
+
// src/system/slot/children-to-string.ts
|
|
6
|
+
import { isValidElement } from "react";
|
|
7
|
+
function childrenToString(children) {
|
|
8
|
+
const text = stringify(children);
|
|
9
|
+
return text === null || text === "" ? null : text;
|
|
10
|
+
}
|
|
11
|
+
function stringify(node) {
|
|
12
|
+
if (node === null || node === void 0 || typeof node === "boolean") return "";
|
|
13
|
+
if (typeof node === "string") return node;
|
|
14
|
+
if (typeof node === "number") return String(node);
|
|
15
|
+
if (isValidElement(node)) return null;
|
|
16
|
+
if (Array.isArray(node)) {
|
|
17
|
+
let text = "";
|
|
18
|
+
for (const child of node) {
|
|
19
|
+
const part = stringify(child);
|
|
20
|
+
if (part === null) return null;
|
|
21
|
+
text += part;
|
|
22
|
+
}
|
|
23
|
+
return text;
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
|
|
5
28
|
// src/system/slot/create-slot-context.ts
|
|
6
29
|
import { createContext, useContext } from "react";
|
|
7
30
|
function createSlotContext(name) {
|
|
@@ -69,9 +92,9 @@ function resolveStyle(style, state) {
|
|
|
69
92
|
}
|
|
70
93
|
|
|
71
94
|
// src/system/slot/slot.tsx
|
|
72
|
-
import { cloneElement, forwardRef, isValidElement } from "react";
|
|
95
|
+
import { cloneElement, forwardRef, isValidElement as isValidElement2 } from "react";
|
|
73
96
|
var Slot = forwardRef(function Slot2({ children, ...ours }, ref) {
|
|
74
|
-
if (!
|
|
97
|
+
if (!isValidElement2(children)) {
|
|
75
98
|
throw new Error(
|
|
76
99
|
"XAUI: asChild expects exactly one React element as its child, and merges the component's props into it. Text, a fragment, several children or none give it nothing to merge into \u2014 drop `asChild` to render the component itself."
|
|
77
100
|
);
|
|
@@ -88,32 +111,9 @@ function refOf(element) {
|
|
|
88
111
|
return fromProps ?? fromElement;
|
|
89
112
|
}
|
|
90
113
|
|
|
91
|
-
// src/system/slot/children-to-string.ts
|
|
92
|
-
import { isValidElement as isValidElement2 } from "react";
|
|
93
|
-
function childrenToString(children) {
|
|
94
|
-
const text = stringify(children);
|
|
95
|
-
return text === null || text === "" ? null : text;
|
|
96
|
-
}
|
|
97
|
-
function stringify(node) {
|
|
98
|
-
if (node === null || node === void 0 || typeof node === "boolean") return "";
|
|
99
|
-
if (typeof node === "string") return node;
|
|
100
|
-
if (typeof node === "number") return String(node);
|
|
101
|
-
if (isValidElement2(node)) return null;
|
|
102
|
-
if (Array.isArray(node)) {
|
|
103
|
-
let text = "";
|
|
104
|
-
for (const child of node) {
|
|
105
|
-
const part = stringify(child);
|
|
106
|
-
if (part === null) return null;
|
|
107
|
-
text += part;
|
|
108
|
-
}
|
|
109
|
-
return text;
|
|
110
|
-
}
|
|
111
|
-
return null;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
114
|
export {
|
|
115
|
+
childrenToString,
|
|
115
116
|
createSlotContext,
|
|
116
117
|
mergeProps,
|
|
117
|
-
Slot
|
|
118
|
-
childrenToString
|
|
118
|
+
Slot
|
|
119
119
|
};
|
|
@@ -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');
|
|
@@ -71,7 +71,7 @@ var Divider = _react.forwardRef.call(void 0, function Divider2({ children, orien
|
|
|
71
71
|
const selection = { orientation, size };
|
|
72
72
|
const styles = dividerRecipe.resolve({ theme, selection });
|
|
73
73
|
const tint = color ? dividerRecipe.tint({ theme, color, selection }) : void 0;
|
|
74
|
-
const Root = asChild ?
|
|
74
|
+
const Root = asChild ? _chunk7GHM4GKLcjs.Slot : _reactnative.View;
|
|
75
75
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
76
76
|
Root,
|
|
77
77
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Slot, createSlotContext } from "./chunk-
|
|
1
|
+
import { Slot, createSlotContext } from "./chunk-K72UDPVN.js";
|
|
2
2
|
import { contrastOn, isHex, useXAUITheme } from "./chunk-A3EGFI6T.js";
|
|
3
3
|
import { useStyleProps } from "./chunk-M63GFNKV.js";
|
|
4
4
|
|
|
@@ -11,13 +11,13 @@ var DisableAllContext = createContext(false);
|
|
|
11
11
|
var PRESS_SCALE = 0.985;
|
|
12
12
|
var PRESS_DURATION = 300;
|
|
13
13
|
var SCALE_REFERENCE_WIDTH = 300;
|
|
14
|
-
const
|
|
15
|
-
code: "function
|
|
16
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
17
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
14
|
+
const _worklet_7958378817002_init_data = {
|
|
15
|
+
code: "function pressScaleFor_chunkLIUO6D3DJs1(width){const{SCALE_REFERENCE_WIDTH,PRESS_SCALE}=this.__closure;const coefficient=width>0?SCALE_REFERENCE_WIDTH/width:1;return 1-(1-PRESS_SCALE)*coefficient;}",
|
|
16
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-LIUO6D3D.js",
|
|
17
|
+
sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunkLIUO6D3DJs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-LIUO6D3D.js\"],\"mappings\":\"AAsBA,SAAAA,8BAA8BA,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\":[]}"
|
|
18
18
|
};
|
|
19
|
-
const pressScaleFor = function
|
|
20
|
-
|
|
19
|
+
const pressScaleFor = function pressScaleFor_chunkLIUO6D3DJs1Factory({
|
|
20
|
+
_worklet_7958378817002_init_data,
|
|
21
21
|
SCALE_REFERENCE_WIDTH,
|
|
22
22
|
PRESS_SCALE
|
|
23
23
|
}) {
|
|
@@ -30,13 +30,13 @@ const pressScaleFor = function pressScaleFor_chunkUGF35NSEJs1Factory({
|
|
|
30
30
|
SCALE_REFERENCE_WIDTH,
|
|
31
31
|
PRESS_SCALE
|
|
32
32
|
};
|
|
33
|
-
pressScaleFor.__workletHash =
|
|
33
|
+
pressScaleFor.__workletHash = 7958378817002;
|
|
34
34
|
pressScaleFor.__pluginVersion = "0.7.4";
|
|
35
|
-
pressScaleFor.__initData =
|
|
35
|
+
pressScaleFor.__initData = _worklet_7958378817002_init_data;
|
|
36
36
|
pressScaleFor.__stackDetails = _e;
|
|
37
37
|
return pressScaleFor;
|
|
38
38
|
}({
|
|
39
|
-
|
|
39
|
+
_worklet_7958378817002_init_data,
|
|
40
40
|
SCALE_REFERENCE_WIDTH,
|
|
41
41
|
PRESS_SCALE
|
|
42
42
|
});
|
|
@@ -49,26 +49,26 @@ var RIPPLE_CONFIRM_DURATION = 225;
|
|
|
49
49
|
var RIPPLE_FADE_IN = 75;
|
|
50
50
|
var RIPPLE_FADE_OUT_DELAY = 225;
|
|
51
51
|
var RIPPLE_FADE_OUT = 150;
|
|
52
|
-
const
|
|
53
|
-
code: "function
|
|
54
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
55
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
52
|
+
const _worklet_1503266360337_init_data = {
|
|
53
|
+
code: "function rippleRadiusFor_chunkLIUO6D3DJs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
|
|
54
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-LIUO6D3D.js",
|
|
55
|
+
sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunkLIUO6D3DJs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-LIUO6D3D.js\"],\"mappings\":\"AAoCA,SAAAA,gCAAwCA,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\":[]}"
|
|
56
56
|
};
|
|
57
|
-
const rippleRadiusFor = function
|
|
58
|
-
|
|
57
|
+
const rippleRadiusFor = function rippleRadiusFor_chunkLIUO6D3DJs2Factory({
|
|
58
|
+
_worklet_1503266360337_init_data
|
|
59
59
|
}) {
|
|
60
60
|
const _e = [new global.Error(), 1, -27];
|
|
61
61
|
const rippleRadiusFor = function (width, height) {
|
|
62
62
|
return Math.sqrt(width * width + height * height) / 2 + 5;
|
|
63
63
|
};
|
|
64
64
|
rippleRadiusFor.__closure = {};
|
|
65
|
-
rippleRadiusFor.__workletHash =
|
|
65
|
+
rippleRadiusFor.__workletHash = 1503266360337;
|
|
66
66
|
rippleRadiusFor.__pluginVersion = "0.7.4";
|
|
67
|
-
rippleRadiusFor.__initData =
|
|
67
|
+
rippleRadiusFor.__initData = _worklet_1503266360337_init_data;
|
|
68
68
|
rippleRadiusFor.__stackDetails = _e;
|
|
69
69
|
return rippleRadiusFor;
|
|
70
70
|
}({
|
|
71
|
-
|
|
71
|
+
_worklet_1503266360337_init_data
|
|
72
72
|
});
|
|
73
73
|
var ALL_OFF = {
|
|
74
74
|
scale: false,
|
|
@@ -242,15 +242,15 @@ var StaticFeedback = forwardRef(function StaticFeedback2({
|
|
|
242
242
|
})
|
|
243
243
|
});
|
|
244
244
|
});
|
|
245
|
-
const
|
|
246
|
-
code: "function
|
|
247
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
248
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
245
|
+
const _worklet_1247134191396_init_data = {
|
|
246
|
+
code: "function chunkLIUO6D3DJs3(){const{pressScaleFor,size}=this.__closure;return pressScaleFor(size.value.width);}",
|
|
247
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-LIUO6D3D.js",
|
|
248
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkLIUO6D3DJs3\",\"pressScaleFor\",\"size\",\"__closure\",\"value\",\"width\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-LIUO6D3D.js\"],\"mappings\":\"AAkNuC,SAAAA,iBAAA,QAAAC,aAAA,CAAAC,IAAA,OAAAC,SAAA,OAAM,CAAAF,aAAc,CAAAC,IAAK,CAAAE,KAAM,CAAAC,KAAK\",\"ignoreList\":[]}"
|
|
249
249
|
};
|
|
250
|
-
const
|
|
251
|
-
code: "function
|
|
252
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
253
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
250
|
+
const _worklet_5395641393396_init_data = {
|
|
251
|
+
code: "function chunkLIUO6D3DJs4(){const{animation,pressedScale,progress}=this.__closure;if(!animation.scale)return{};return{transform:[{scale:1-(1-pressedScale.value)*progress.value}]};}",
|
|
252
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-LIUO6D3D.js",
|
|
253
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkLIUO6D3DJs4\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-LIUO6D3D.js\"],\"mappings\":\"AAmNyC,SAAAA,gBAAMA,CAAA,QAAAC,SAAA,CAAAC,YAAA,CAAAC,QAAA,OAAAC,SAAA,CAE3C,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\":[]}"
|
|
254
254
|
};
|
|
255
255
|
var AnimatedFeedback = forwardRef(function AnimatedFeedback2({
|
|
256
256
|
isPressed = false,
|
|
@@ -278,35 +278,35 @@ var AnimatedFeedback = forwardRef(function AnimatedFeedback2({
|
|
|
278
278
|
easing: Easing.out(Easing.ease)
|
|
279
279
|
});
|
|
280
280
|
}, [isPressed, progress]);
|
|
281
|
-
const pressedScale = useDerivedValue(function
|
|
282
|
-
|
|
281
|
+
const pressedScale = useDerivedValue(function chunkLIUO6D3DJs3Factory({
|
|
282
|
+
_worklet_1247134191396_init_data,
|
|
283
283
|
pressScaleFor,
|
|
284
284
|
size
|
|
285
285
|
}) {
|
|
286
286
|
const _e = [new global.Error(), -3, -27];
|
|
287
|
-
const
|
|
288
|
-
|
|
287
|
+
const chunkLIUO6D3DJs3 = () => pressScaleFor(size.value.width);
|
|
288
|
+
chunkLIUO6D3DJs3.__closure = {
|
|
289
289
|
pressScaleFor,
|
|
290
290
|
size
|
|
291
291
|
};
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
return
|
|
292
|
+
chunkLIUO6D3DJs3.__workletHash = 1247134191396;
|
|
293
|
+
chunkLIUO6D3DJs3.__pluginVersion = "0.7.4";
|
|
294
|
+
chunkLIUO6D3DJs3.__initData = _worklet_1247134191396_init_data;
|
|
295
|
+
chunkLIUO6D3DJs3.__stackDetails = _e;
|
|
296
|
+
return chunkLIUO6D3DJs3;
|
|
297
297
|
}({
|
|
298
|
-
|
|
298
|
+
_worklet_1247134191396_init_data,
|
|
299
299
|
pressScaleFor,
|
|
300
300
|
size
|
|
301
301
|
}));
|
|
302
|
-
const animatedStyle = useAnimatedStyle(function
|
|
303
|
-
|
|
302
|
+
const animatedStyle = useAnimatedStyle(function chunkLIUO6D3DJs4Factory({
|
|
303
|
+
_worklet_5395641393396_init_data,
|
|
304
304
|
animation,
|
|
305
305
|
pressedScale,
|
|
306
306
|
progress
|
|
307
307
|
}) {
|
|
308
308
|
const _e = [new global.Error(), -4, -27];
|
|
309
|
-
const
|
|
309
|
+
const chunkLIUO6D3DJs4 = function () {
|
|
310
310
|
if (!animation.scale) return {};
|
|
311
311
|
return {
|
|
312
312
|
transform: [{
|
|
@@ -314,18 +314,18 @@ var AnimatedFeedback = forwardRef(function AnimatedFeedback2({
|
|
|
314
314
|
}]
|
|
315
315
|
};
|
|
316
316
|
};
|
|
317
|
-
|
|
317
|
+
chunkLIUO6D3DJs4.__closure = {
|
|
318
318
|
animation,
|
|
319
319
|
pressedScale,
|
|
320
320
|
progress
|
|
321
321
|
};
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
return
|
|
322
|
+
chunkLIUO6D3DJs4.__workletHash = 5395641393396;
|
|
323
|
+
chunkLIUO6D3DJs4.__pluginVersion = "0.7.4";
|
|
324
|
+
chunkLIUO6D3DJs4.__initData = _worklet_5395641393396_init_data;
|
|
325
|
+
chunkLIUO6D3DJs4.__stackDetails = _e;
|
|
326
|
+
return chunkLIUO6D3DJs4;
|
|
327
327
|
}({
|
|
328
|
-
|
|
328
|
+
_worklet_5395641393396_init_data,
|
|
329
329
|
animation,
|
|
330
330
|
pressedScale,
|
|
331
331
|
progress
|
|
@@ -470,10 +470,10 @@ function PressableFeedbackHighlight({
|
|
|
470
470
|
}
|
|
471
471
|
PressableFeedbackHighlight.displayName = "XAUI.PressableFeedback.Highlight";
|
|
472
472
|
markOverlay(PressableFeedbackHighlight);
|
|
473
|
-
const
|
|
474
|
-
code: "function
|
|
475
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
476
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
473
|
+
const _worklet_12470112011780_init_data = {
|
|
474
|
+
code: "function chunkLIUO6D3DJs5(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
|
|
475
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-LIUO6D3D.js",
|
|
476
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkLIUO6D3DJs5\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-LIUO6D3D.js\"],\"mappings\":\"AAiW0C,SAAAA,gBAAMA,CAAA,QAAAC,KAAA,CAAAC,OAAA,OAAAC,SAAA,CAE5C,MAAO,CAAED,OAAO,CAAED,KAAK,CAACG,KAAK,CAAGF,OAAQ,CAAC,CAC3C\",\"ignoreList\":[]}"
|
|
477
477
|
};
|
|
478
478
|
function AnimatedHighlight({
|
|
479
479
|
base,
|
|
@@ -489,28 +489,28 @@ function AnimatedHighlight({
|
|
|
489
489
|
duration
|
|
490
490
|
});
|
|
491
491
|
}, [isPressed, shown, duration]);
|
|
492
|
-
const animatedStyle = useAnimatedStyle2(function
|
|
493
|
-
|
|
492
|
+
const animatedStyle = useAnimatedStyle2(function chunkLIUO6D3DJs5Factory({
|
|
493
|
+
_worklet_12470112011780_init_data,
|
|
494
494
|
shown,
|
|
495
495
|
opacity
|
|
496
496
|
}) {
|
|
497
497
|
const _e = [new global.Error(), -3, -27];
|
|
498
|
-
const
|
|
498
|
+
const chunkLIUO6D3DJs5 = function () {
|
|
499
499
|
return {
|
|
500
500
|
opacity: shown.value * opacity
|
|
501
501
|
};
|
|
502
502
|
};
|
|
503
|
-
|
|
503
|
+
chunkLIUO6D3DJs5.__closure = {
|
|
504
504
|
shown,
|
|
505
505
|
opacity
|
|
506
506
|
};
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
return
|
|
507
|
+
chunkLIUO6D3DJs5.__workletHash = 12470112011780;
|
|
508
|
+
chunkLIUO6D3DJs5.__pluginVersion = "0.7.4";
|
|
509
|
+
chunkLIUO6D3DJs5.__initData = _worklet_12470112011780_init_data;
|
|
510
|
+
chunkLIUO6D3DJs5.__stackDetails = _e;
|
|
511
|
+
return chunkLIUO6D3DJs5;
|
|
512
512
|
}({
|
|
513
|
-
|
|
513
|
+
_worklet_12470112011780_init_data,
|
|
514
514
|
shown,
|
|
515
515
|
opacity
|
|
516
516
|
}), [shown, opacity]);
|
|
@@ -577,10 +577,10 @@ function PressableFeedbackRipple({
|
|
|
577
577
|
}
|
|
578
578
|
PressableFeedbackRipple.displayName = "XAUI.PressableFeedback.Ripple";
|
|
579
579
|
markOverlay(PressableFeedbackRipple);
|
|
580
|
-
const
|
|
581
|
-
code: "function
|
|
582
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
583
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
580
|
+
const _worklet_12101639339339_init_data = {
|
|
581
|
+
code: "function chunkLIUO6D3DJs6(){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}]};}",
|
|
582
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-LIUO6D3D.js",
|
|
583
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkLIUO6D3DJs6\",\"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-LIUO6D3D.js\"],\"mappings\":\"AAia0C,SAAAA,gBAAMA,CAAA,QAAAC,IAAA,CAAAC,kBAAA,CAAAC,MAAA,CAAAC,OAAA,CAAAC,MAAA,OAAAC,SAAA,CAE5C,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\":[]}"
|
|
584
584
|
};
|
|
585
585
|
function RippleWave({
|
|
586
586
|
wave,
|
|
@@ -590,8 +590,8 @@ function RippleWave({
|
|
|
590
590
|
opacity,
|
|
591
591
|
style
|
|
592
592
|
}) {
|
|
593
|
-
const animatedStyle = useAnimatedStyle3(function
|
|
594
|
-
|
|
593
|
+
const animatedStyle = useAnimatedStyle3(function chunkLIUO6D3DJs6Factory({
|
|
594
|
+
_worklet_12101639339339_init_data,
|
|
595
595
|
wave,
|
|
596
596
|
RIPPLE_START_SCALE,
|
|
597
597
|
center,
|
|
@@ -599,7 +599,7 @@ function RippleWave({
|
|
|
599
599
|
radius
|
|
600
600
|
}) {
|
|
601
601
|
const _e = [new global.Error(), -6, -27];
|
|
602
|
-
const
|
|
602
|
+
const chunkLIUO6D3DJs6 = function () {
|
|
603
603
|
const t = wave.expand.value;
|
|
604
604
|
const from = wave.origin.value;
|
|
605
605
|
const scale = RIPPLE_START_SCALE + (1 - RIPPLE_START_SCALE) * t;
|
|
@@ -617,20 +617,20 @@ function RippleWave({
|
|
|
617
617
|
}]
|
|
618
618
|
};
|
|
619
619
|
};
|
|
620
|
-
|
|
620
|
+
chunkLIUO6D3DJs6.__closure = {
|
|
621
621
|
wave,
|
|
622
622
|
RIPPLE_START_SCALE,
|
|
623
623
|
center,
|
|
624
624
|
opacity,
|
|
625
625
|
radius
|
|
626
626
|
};
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
return
|
|
627
|
+
chunkLIUO6D3DJs6.__workletHash = 12101639339339;
|
|
628
|
+
chunkLIUO6D3DJs6.__pluginVersion = "0.7.4";
|
|
629
|
+
chunkLIUO6D3DJs6.__initData = _worklet_12101639339339_init_data;
|
|
630
|
+
chunkLIUO6D3DJs6.__stackDetails = _e;
|
|
631
|
+
return chunkLIUO6D3DJs6;
|
|
632
632
|
}({
|
|
633
|
-
|
|
633
|
+
_worklet_12101639339339_init_data,
|
|
634
634
|
wave,
|
|
635
635
|
RIPPLE_START_SCALE,
|
|
636
636
|
center,
|
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
var _chunkWDDXU3OHcjs = require('./chunk-WDDXU3OH.cjs');
|
|
4
|
+
|
|
5
|
+
// src/hooks/use-anchored-position.ts
|
|
6
|
+
var _react = require('react');
|
|
7
|
+
var _reactnative = require('react-native');
|
|
8
|
+
|
|
9
|
+
// src/utils/placement.ts
|
|
10
|
+
var OPPOSITE = {
|
|
11
|
+
top: "bottom",
|
|
12
|
+
bottom: "top",
|
|
13
|
+
start: "end",
|
|
14
|
+
end: "start"
|
|
15
|
+
};
|
|
16
|
+
function axisOf(placement) {
|
|
17
|
+
return placement === "top" || placement === "bottom" ? "vertical" : "horizontal";
|
|
18
|
+
}
|
|
19
|
+
function resolvePlacement(input) {
|
|
20
|
+
const { anchor, content, window, offset, alignOffset, insets } = input;
|
|
21
|
+
const available = window.width - insets.start - insets.end;
|
|
22
|
+
const width = Math.min(resolveWidth(input), Math.max(available, 0));
|
|
23
|
+
const placement = choosePlacement(input);
|
|
24
|
+
const room = Math.max(roomFor(placement, input), 0);
|
|
25
|
+
const vertical = axisOf(placement) === "vertical";
|
|
26
|
+
const maxHeight = vertical ? room : Math.max(window.height - insets.top - insets.bottom, 0);
|
|
27
|
+
const height = Math.min(content.height, maxHeight);
|
|
28
|
+
const top = clamp(
|
|
29
|
+
vertical ? placement === "bottom" ? anchor.y + anchor.height + offset : anchor.y - offset - height : alignedCross(input, height) + alignOffset,
|
|
30
|
+
insets.top,
|
|
31
|
+
Math.max(window.height - insets.bottom - height, insets.top)
|
|
32
|
+
);
|
|
33
|
+
const start = clamp(
|
|
34
|
+
vertical ? alignedCross(input, width) + alignOffset : placement === "end" ? anchor.x + anchor.width + offset : anchor.x - offset - width,
|
|
35
|
+
insets.start,
|
|
36
|
+
Math.max(window.width - insets.end - width, insets.start)
|
|
37
|
+
);
|
|
38
|
+
return { top, start, width, maxHeight, placement };
|
|
39
|
+
}
|
|
40
|
+
function resolveWidth(input) {
|
|
41
|
+
const { width, anchor, content, placement, window, insets } = input;
|
|
42
|
+
if (width === "trigger") {
|
|
43
|
+
return axisOf(placement) === "vertical" ? anchor.width : content.width;
|
|
44
|
+
}
|
|
45
|
+
if (width === "full") return Math.max(window.width - insets.start - insets.end, 0);
|
|
46
|
+
if (width === "content-fit") return content.width;
|
|
47
|
+
return width;
|
|
48
|
+
}
|
|
49
|
+
function choosePlacement(input) {
|
|
50
|
+
const { placement, avoidCollisions, content } = input;
|
|
51
|
+
if (!avoidCollisions) return placement;
|
|
52
|
+
const wanted = axisOf(placement) === "vertical" ? content.height : content.width;
|
|
53
|
+
if (roomFor(placement, input) >= wanted) return placement;
|
|
54
|
+
const other = OPPOSITE[placement];
|
|
55
|
+
return roomFor(other, input) > roomFor(placement, input) ? other : placement;
|
|
56
|
+
}
|
|
57
|
+
function roomFor(placement, input) {
|
|
58
|
+
const { anchor, window, offset, insets } = input;
|
|
59
|
+
switch (placement) {
|
|
60
|
+
case "bottom":
|
|
61
|
+
return window.height - insets.bottom - (anchor.y + anchor.height) - offset;
|
|
62
|
+
case "top":
|
|
63
|
+
return anchor.y - insets.top - offset;
|
|
64
|
+
case "end":
|
|
65
|
+
return window.width - insets.end - (anchor.x + anchor.width) - offset;
|
|
66
|
+
case "start":
|
|
67
|
+
return anchor.x - insets.start - offset;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function alignedCross({ align, anchor, placement }, size) {
|
|
71
|
+
const vertical = axisOf(placement) === "vertical";
|
|
72
|
+
const origin = vertical ? anchor.x : anchor.y;
|
|
73
|
+
const extent = vertical ? anchor.width : anchor.height;
|
|
74
|
+
if (align === "start") return origin;
|
|
75
|
+
if (align === "end") return origin + extent - size;
|
|
76
|
+
return origin + (extent - size) / 2;
|
|
77
|
+
}
|
|
78
|
+
function clamp(value, min, max) {
|
|
79
|
+
return Math.min(Math.max(value, min), max);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// src/hooks/use-anchored-position.ts
|
|
83
|
+
function useAnchoredPosition({
|
|
84
|
+
anchor,
|
|
85
|
+
isOpen,
|
|
86
|
+
onLayout,
|
|
87
|
+
...options
|
|
88
|
+
}) {
|
|
89
|
+
const window = _reactnative.useWindowDimensions.call(void 0, );
|
|
90
|
+
const origin = _nullishCoalesce(_optionalChain([_react.useContext.call(void 0, _chunkWDDXU3OHcjs.PortalContext), 'optionalAccess', _ => _.origin]), () => ( ZERO));
|
|
91
|
+
const [measured, setMeasured] = _react.useState.call(void 0, null);
|
|
92
|
+
const onContentLayout = _react.useCallback.call(void 0,
|
|
93
|
+
(event) => {
|
|
94
|
+
_optionalChain([onLayout, 'optionalCall', _2 => _2(event)]);
|
|
95
|
+
const { width, height } = event.nativeEvent.layout;
|
|
96
|
+
setMeasured(
|
|
97
|
+
(current) => current !== null && current.width === width && current.height === height ? current : { width, height }
|
|
98
|
+
);
|
|
99
|
+
},
|
|
100
|
+
[onLayout]
|
|
101
|
+
);
|
|
102
|
+
if (!isOpen && measured !== null) setMeasured(null);
|
|
103
|
+
const local = anchor && {
|
|
104
|
+
...anchor,
|
|
105
|
+
x: anchor.x - origin.x,
|
|
106
|
+
y: anchor.y - origin.y
|
|
107
|
+
};
|
|
108
|
+
const position = local && measured ? resolvePlacement({
|
|
109
|
+
anchor: local,
|
|
110
|
+
content: measured,
|
|
111
|
+
window: {
|
|
112
|
+
width: window.width - origin.x,
|
|
113
|
+
height: window.height - origin.y
|
|
114
|
+
},
|
|
115
|
+
...options
|
|
116
|
+
}) : null;
|
|
117
|
+
return {
|
|
118
|
+
position,
|
|
119
|
+
onContentLayout,
|
|
120
|
+
measuringStyle: {
|
|
121
|
+
// Invisible, and at the start of the host, so the reader never sees the panel at
|
|
122
|
+
// the wrong place during the frame it is being measured in.
|
|
123
|
+
opacity: 0,
|
|
124
|
+
top: 0,
|
|
125
|
+
start: 0,
|
|
126
|
+
...measuringWidth(options, _optionalChain([local, 'optionalAccess', _3 => _3.width]), window)
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function measuringWidth({
|
|
131
|
+
width,
|
|
132
|
+
maxWidth,
|
|
133
|
+
insets
|
|
134
|
+
}, anchorWidth, window) {
|
|
135
|
+
const screen = Math.max(window.width - insets.start - insets.end, 0);
|
|
136
|
+
if (width === "trigger") return { width: anchorWidth };
|
|
137
|
+
if (width === "full") return { width: screen };
|
|
138
|
+
if (typeof width === "number") return { width };
|
|
139
|
+
return { maxWidth: Math.min(_nullishCoalesce(maxWidth, () => ( Number.POSITIVE_INFINITY)), screen) };
|
|
140
|
+
}
|
|
141
|
+
var ZERO = { x: 0, y: 0 };
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
exports.useAnchoredPosition = useAnchoredPosition;
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
} from "./chunk-F6W3JQ7K.js";
|
|
7
7
|
import {
|
|
8
8
|
PressableFeedback
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LIUO6D3D.js";
|
|
10
10
|
import {
|
|
11
11
|
usePressState
|
|
12
12
|
} from "./chunk-423RQBOX.js";
|
|
13
13
|
import {
|
|
14
14
|
childrenToString,
|
|
15
15
|
createSlotContext
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-K72UDPVN.js";
|
|
17
17
|
import {
|
|
18
18
|
createRecipe,
|
|
19
19
|
radiusAxis
|
|
@@ -1,22 +1,22 @@
|
|
|
1
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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkXSQPVDFHcjs = require('./chunk-XSQPVDFH.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk4KFKWBN5cjs = require('./chunk-4KFKWBN5.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkTGMVEHV7cjs = require('./chunk-TGMVEHV7.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk7DPL3ZDScjs = require('./chunk-7DPL3ZDS.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkEJQCQPETcjs = require('./chunk-EJQCQPET.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunk7GHM4GKLcjs = require('./chunk-7GHM4GKL.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
@@ -29,13 +29,13 @@ var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
|
|
|
29
29
|
var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
|
|
30
30
|
|
|
31
31
|
// src/components/button/button.context.ts
|
|
32
|
-
var [ButtonProvider, useButton] =
|
|
32
|
+
var [ButtonProvider, useButton] = _chunk7GHM4GKLcjs.createSlotContext.call(void 0, "Button");
|
|
33
33
|
|
|
34
34
|
// src/components/button/button-icon.tsx
|
|
35
35
|
var _jsxruntime = require('react/jsx-runtime');
|
|
36
36
|
function ButtonIcon({ size, color, ...rest }) {
|
|
37
37
|
const { icon } = useButton();
|
|
38
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
38
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4KFKWBN5cjs.Icon, { size: _nullishCoalesce(size, () => ( icon.size)), color: _nullishCoalesce(color, () => ( icon.color)), ...rest });
|
|
39
39
|
}
|
|
40
40
|
ButtonIcon.displayName = "XAUI.Button.Icon";
|
|
41
41
|
|
|
@@ -76,7 +76,7 @@ function ButtonSpinner({
|
|
|
76
76
|
}
|
|
77
77
|
ButtonSpinner.displayName = "XAUI.Button.Spinner";
|
|
78
78
|
function SpinningRing({ style }) {
|
|
79
|
-
const rotation =
|
|
79
|
+
const rotation = _chunkXSQPVDFHcjs.useRotation.call(void 0, );
|
|
80
80
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.View, { style: [style, rotation] });
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -267,7 +267,7 @@ var ButtonRoot = _react.forwardRef.call(void 0, function Button({
|
|
|
267
267
|
styleProps,
|
|
268
268
|
typeof style === "function" ? style({ pressed: isPressed }) : style
|
|
269
269
|
];
|
|
270
|
-
const text =
|
|
270
|
+
const text = _chunk7GHM4GKLcjs.childrenToString.call(void 0, children);
|
|
271
271
|
const showSpinner = isLoading && !containsElementOfType(children, ButtonSpinner);
|
|
272
272
|
if (isIconOnly && !rest.accessibilityLabel && !rest["aria-label"]) {
|
|
273
273
|
_chunkEJQCQPETcjs.warnDev.call(void 0,
|
|
@@ -275,7 +275,7 @@ var ButtonRoot = _react.forwardRef.call(void 0, function Button({
|
|
|
275
275
|
);
|
|
276
276
|
}
|
|
277
277
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ButtonProvider, { value: context, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
278
|
-
|
|
278
|
+
_chunkTGMVEHV7cjs.PressableFeedback,
|
|
279
279
|
{
|
|
280
280
|
ref,
|
|
281
281
|
isPressed,
|