@xaui/native 0.9.1-alpha.93 → 0.9.1-beta.95
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-PAQZOD2L.js → chunk-2JFMCW5E.js} +1 -1
- package/dist/chunk-2TLPFGGR.cjs +251 -0
- package/dist/{chunk-TPYOQSKT.js → chunk-2UNLQRXY.js} +1 -1
- package/dist/{chunk-JKDWYNSG.js → chunk-2XEQDQAN.js} +109 -107
- package/dist/{chunk-RXEUKYM5.js → chunk-33BA4LVN.js} +1 -1
- package/dist/{chunk-ODQHAPQW.js → chunk-4AIIAF6U.js} +24 -22
- package/dist/{chunk-QCH7X7O2.cjs → chunk-4LRVB6WR.cjs} +14 -14
- package/dist/{chunk-QUSQEYLP.cjs → chunk-53E2E7GS.cjs} +26 -28
- package/dist/{chunk-2B6PUYTP.cjs → chunk-55KGHYYU.cjs} +4 -4
- package/dist/{chunk-B33OU34Z.cjs → chunk-5O7E73QP.cjs} +12 -12
- package/dist/{chunk-FVEMTBU4.js → chunk-5XTF2JDK.js} +2 -2
- package/dist/{chunk-V2CEKPJ6.js → chunk-6MVKLRLZ.js} +1 -1
- package/dist/{chunk-RSIWSVXI.js → chunk-6NAZ2IHL.js} +1 -1
- package/dist/{chunk-LPJ3UBSO.cjs → chunk-6NRWZR7T.cjs} +2 -2
- package/dist/{chunk-FXN32S75.cjs → chunk-6SRFQSPR.cjs} +3 -3
- package/dist/{chunk-7EVW6O2Q.js → chunk-6W45YHTF.js} +1 -1
- package/dist/{chunk-7NQL5DXY.js → chunk-6XY3XAEQ.js} +1 -1
- package/dist/{chunk-UEW3GAP5.cjs → chunk-6ZWQDTGQ.cjs} +5 -5
- package/dist/{chunk-VMPCXS4S.js → chunk-7OVYYZ7H.js} +22 -20
- package/dist/{chunk-CYOUOQXT.cjs → chunk-AHJLQJOE.cjs} +5 -5
- package/dist/{chunk-OPLPLFGK.cjs → chunk-AHKKEM3K.cjs} +66 -23
- package/dist/{chunk-WIX4SYZI.cjs → chunk-AIHKBSQ5.cjs} +2 -2
- package/dist/{chunk-WRZV6ORJ.js → chunk-AYOJXFHR.js} +1 -1
- package/dist/{chunk-OD6H7ANY.js → chunk-B5DBFS6M.js} +1 -1
- package/dist/{chunk-VQGNLX5C.js → chunk-BYDGJU5A.js} +1 -1
- package/dist/{chunk-NVODH2PR.js → chunk-CCTAJXZ3.js} +63 -61
- package/dist/{chunk-ORXVXYKC.cjs → chunk-CHGBWFDI.cjs} +63 -26
- package/dist/{chunk-WLJPO3AS.cjs → chunk-CZ2NUGUI.cjs} +357 -201
- package/dist/{chunk-PYQ2P3M5.cjs → chunk-CZEWWCWG.cjs} +58 -58
- package/dist/{chunk-PDSR42YC.cjs → chunk-D22K3NZU.cjs} +3 -3
- package/dist/{chunk-TRWZEOCO.js → chunk-DBP5CA5R.js} +2 -2
- package/dist/{chunk-QN2D5ZCS.cjs → chunk-DE4RSR7Q.cjs} +3 -3
- package/dist/{chunk-FOOXBVOQ.js → chunk-E5E2QA4K.js} +22 -20
- package/dist/{chunk-LECYGVIH.js → chunk-EQUD3NHO.js} +50 -48
- package/dist/chunk-ERIGD4SE.cjs +686 -0
- package/dist/{chunk-62AYYMZP.cjs → chunk-FDYPWVNP.cjs} +3 -3
- package/dist/chunk-GN7BWYXP.cjs +627 -0
- package/dist/chunk-GWTURY4S.cjs +999 -0
- package/dist/{chunk-OW4N2C3M.cjs → chunk-HBYT7B47.cjs} +88 -61
- package/dist/{chunk-XWIPLZTD.cjs → chunk-HOV25N3M.cjs} +2 -2
- package/dist/{chunk-5MMBEDZG.cjs → chunk-I3XIZWCV.cjs} +29 -29
- package/dist/{chunk-EDNCHCIN.cjs → chunk-IAJG7GYE.cjs} +2 -2
- package/dist/{chunk-P7OHZCU3.js → chunk-IAWLQN2W.js} +2 -2
- package/dist/{chunk-RCSEVEIR.js → chunk-ICVIWXK4.js} +1 -1
- package/dist/{chunk-RREJUSAS.cjs → chunk-IMIY34F4.cjs} +3 -3
- package/dist/{chunk-ZWS3FQ3J.js → chunk-IUDQG3JI.js} +57 -57
- package/dist/{chunk-O6B72H4B.js → chunk-K7VDLVLE.js} +6 -8
- package/dist/{chunk-P2CJNTAP.js → chunk-KFB24VYT.js} +22 -20
- package/dist/chunk-KHPODIQV.cjs +540 -0
- package/dist/{chunk-CBRW53GN.cjs → chunk-KMK6FUTK.cjs} +39 -23
- package/dist/{chunk-2AFA5HA2.js → chunk-KQW25RCC.js} +77 -75
- package/dist/{chunk-X4CZYJZ6.cjs → chunk-LCGJA37L.cjs} +12 -12
- package/dist/{chunk-SUJLTC2K.js → chunk-LPGY2IDX.js} +1 -1
- package/dist/{chunk-P5M5URAB.js → chunk-LSZW4G7B.js} +31 -31
- package/dist/{chunk-GYEQEF5H.js → chunk-LUPU7FJK.js} +1 -1
- package/dist/chunk-MNBEUNC5.cjs +792 -0
- package/dist/{chunk-AIND5F7P.js → chunk-MTQGFUW5.js} +29 -29
- package/dist/chunk-NGXLJ5ZF.cjs +395 -0
- package/dist/{chunk-DYQB54JA.cjs → chunk-NPAGA6SH.cjs} +2 -2
- package/dist/{chunk-QELEKXN3.cjs → chunk-OMI2FRCU.cjs} +5 -5
- package/dist/{chunk-EBCAPIBD.js → chunk-OX23MW5E.js} +70 -50
- package/dist/{chunk-MMFIMQMQ.js → chunk-OZLOYXLW.js} +2 -2
- package/dist/{chunk-JBZ7SBRV.cjs → chunk-Q3ZKZ2Y6.cjs} +3 -3
- package/dist/{chunk-TCWW7JI2.js → chunk-QT7KLGO3.js} +65 -63
- package/dist/{chunk-6RU6GUJP.js → chunk-QZF7RSVV.js} +1 -1
- package/dist/{chunk-UYQLW7OD.js → chunk-RAYO2TJL.js} +2 -2
- package/dist/{chunk-FRLWG5LM.js → chunk-RFT5MGJC.js} +25 -25
- package/dist/chunk-SIOSYITD.cjs +1039 -0
- package/dist/{chunk-USIWPESU.js → chunk-SIX5AVXG.js} +1 -1
- package/dist/{chunk-52XUGOLD.js → chunk-SX5U5UJQ.js} +3 -3
- package/dist/{chunk-GGP2ERSV.js → chunk-T5ES7FOL.js} +1 -1
- package/dist/{chunk-MSORLKO7.cjs → chunk-V3C3ATRO.cjs} +2 -2
- package/dist/{chunk-BI5ME4QP.cjs → chunk-VBS6VWW4.cjs} +5 -5
- package/dist/{chunk-2SHWOFQV.js → chunk-VQ4OTVET.js} +29 -29
- package/dist/{chunk-6GQ7UTJ7.cjs → chunk-VXAIFOXL.cjs} +2 -2
- package/dist/{chunk-BJVO7DWJ.js → chunk-W4F4NQXM.js} +1 -1
- package/dist/{chunk-ZE4IHUUO.cjs → chunk-WNEDQTH6.cjs} +2 -2
- package/dist/{chunk-CBXILKQZ.cjs → chunk-WPYJW3WM.cjs} +3 -3
- package/dist/{chunk-QHXTO525.js → chunk-WYJHDTU7.js} +1 -1
- package/dist/{chunk-PROLOLZ5.cjs → chunk-X22PLAP6.cjs} +2 -2
- package/dist/chunk-X6GT4H4I.cjs +662 -0
- package/dist/{chunk-RLC3EXMV.js → chunk-XM4IN4Q6.js} +2 -2
- package/dist/{chunk-ZKGVOXLQ.js → chunk-XOZMGNVS.js} +1 -1
- package/dist/chunk-XXXR2AD3.cjs +94 -0
- package/dist/{chunk-JC4YCKKL.js → chunk-YI5D4QZP.js} +22 -20
- package/dist/{chunk-AR7667VN.cjs → chunk-YJA7OQQZ.cjs} +4 -4
- package/dist/{chunk-PAQD6UUF.cjs → chunk-YJIVPYMG.cjs} +3 -3
- package/dist/{chunk-JJYHW4PV.js → chunk-YOPWQHNO.js} +1 -1
- package/dist/{chunk-LKRQUQZQ.cjs → chunk-YRANVNJG.cjs} +2 -2
- package/dist/chunk-ZDJQ643D.js +62 -0
- package/dist/components/accordion/index.cjs +3 -3
- package/dist/components/accordion/index.js +2 -2
- package/dist/components/agenda-calendar/index.cjs +4 -4
- package/dist/components/agenda-calendar/index.js +3 -3
- package/dist/components/alert/index.cjs +4 -4
- package/dist/components/alert/index.js +3 -3
- package/dist/components/autocomplete/index.cjs +3 -3
- package/dist/components/autocomplete/index.js +2 -2
- package/dist/components/bottom-sheet/index.cjs +3 -3
- package/dist/components/bottom-sheet/index.js +2 -2
- package/dist/components/button/index.cjs +3 -3
- package/dist/components/button/index.js +2 -2
- package/dist/components/calendar/index.cjs +3 -3
- package/dist/components/calendar/index.js +2 -2
- package/dist/components/card/index.cjs +3 -3
- package/dist/components/card/index.js +2 -2
- package/dist/components/carousel/index.cjs +3 -3
- package/dist/components/carousel/index.js +2 -2
- package/dist/components/checkbox/index.cjs +3 -3
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/chip/index.cjs +4 -4
- package/dist/components/chip/index.js +3 -3
- package/dist/components/close-button/index.cjs +4 -4
- package/dist/components/close-button/index.js +3 -3
- package/dist/components/color-picker/index.cjs +6 -6
- package/dist/components/color-picker/index.js +5 -5
- package/dist/components/combobox/index.cjs +4 -4
- package/dist/components/combobox/index.js +3 -3
- package/dist/components/date-picker/index.cjs +4 -4
- package/dist/components/date-picker/index.js +3 -3
- package/dist/components/date-range-picker/index.cjs +6 -6
- package/dist/components/date-range-picker/index.js +5 -5
- package/dist/components/date-time-picker/date-time-picker-indicator.d.cts +2 -2
- package/dist/components/date-time-picker/date-time-picker-indicator.d.ts +2 -2
- package/dist/components/date-time-picker/date-time-picker.type.d.cts +3 -2
- package/dist/components/date-time-picker/date-time-picker.type.d.ts +3 -2
- package/dist/components/date-time-picker/index.cjs +8 -9
- package/dist/components/date-time-picker/index.d.cts +1 -1
- package/dist/components/date-time-picker/index.d.ts +1 -1
- package/dist/components/date-time-picker/index.js +7 -8
- package/dist/components/dialog/index.cjs +4 -4
- package/dist/components/dialog/index.js +3 -3
- package/dist/components/dummy-field/index.cjs +3 -3
- package/dist/components/dummy-field/index.js +2 -2
- package/dist/components/fab/index.cjs +3 -3
- package/dist/components/fab/index.js +2 -2
- package/dist/components/flip-card/index.cjs +3 -3
- package/dist/components/flip-card/index.js +2 -2
- package/dist/components/index.d.cts +0 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/list-box/index.cjs +2 -2
- package/dist/components/list-box/index.js +1 -1
- package/dist/components/menu/index.cjs +3 -3
- package/dist/components/menu/index.js +2 -2
- package/dist/components/morph-button/index.cjs +3 -3
- package/dist/components/morph-button/index.js +2 -2
- package/dist/components/number-field/number-field-increment.d.cts +2 -2
- package/dist/components/number-field/number-field-increment.d.ts +2 -2
- package/dist/components/number-pad/index.cjs +3 -3
- package/dist/components/number-pad/index.js +2 -2
- package/dist/components/number-stepper/index.cjs +3 -3
- package/dist/components/number-stepper/index.js +2 -2
- package/dist/components/pager/index.cjs +2 -2
- package/dist/components/pager/index.js +1 -1
- package/dist/components/phone-number-field/index.cjs +14 -14
- package/dist/components/phone-number-field/index.js +3 -3
- package/dist/components/popover/index.cjs +3 -3
- package/dist/components/popover/index.js +2 -2
- package/dist/components/radio/index.cjs +3 -3
- package/dist/components/radio/index.js +2 -2
- package/dist/components/range-calendar/index.cjs +4 -4
- package/dist/components/range-calendar/index.js +3 -3
- package/dist/components/rating/index.cjs +3 -3
- package/dist/components/rating/index.js +2 -2
- package/dist/components/search-field/index.cjs +4 -4
- package/dist/components/search-field/index.js +3 -3
- package/dist/components/segment/index.cjs +4 -4
- package/dist/components/segment/index.js +2 -2
- package/dist/components/select/index.cjs +3 -3
- package/dist/components/select/index.js +2 -2
- package/dist/components/slider/index.cjs +2 -2
- package/dist/components/slider/index.js +1 -1
- package/dist/components/snackbar/index.cjs +3 -3
- package/dist/components/snackbar/index.js +2 -2
- package/dist/components/switch/index.cjs +3 -3
- package/dist/components/switch/index.js +2 -2
- package/dist/components/table/index.cjs +4 -4
- package/dist/components/table/index.js +3 -3
- package/dist/components/tabs/index.cjs +4 -4
- package/dist/components/tabs/index.js +3 -3
- package/dist/components/tag-group/index.cjs +4 -4
- package/dist/components/tag-group/index.js +3 -3
- package/dist/components/time-picker/index.cjs +4 -5
- package/dist/components/time-picker/index.d.cts +1 -1
- package/dist/components/time-picker/index.d.ts +1 -1
- package/dist/components/time-picker/index.js +3 -4
- package/dist/components/time-picker/time-picker-display.d.cts +3 -3
- package/dist/components/time-picker/time-picker-display.d.ts +3 -3
- package/dist/components/time-picker/time-picker-indicator.d.cts +2 -2
- package/dist/components/time-picker/time-picker-indicator.d.ts +2 -2
- package/dist/components/time-picker/time-picker.d.cts +1 -1
- package/dist/components/time-picker/time-picker.d.ts +1 -1
- package/dist/components/time-picker/time-picker.type.d.cts +11 -1
- package/dist/components/time-picker/time-picker.type.d.ts +11 -1
- package/dist/components/toast/index.cjs +3 -3
- package/dist/components/toast/index.js +2 -2
- package/dist/components/toggle-button/index.cjs +3 -3
- package/dist/components/toggle-button/index.js +2 -2
- package/dist/components/wheel-picker/index.cjs +2 -2
- package/dist/components/wheel-picker/index.js +1 -1
- package/dist/index.cjs +47 -60
- package/dist/index.js +50 -63
- package/dist/system/index.cjs +3 -3
- package/dist/system/index.js +2 -2
- package/dist/utils/time.d.cts +29 -0
- package/dist/utils/time.d.ts +29 -0
- package/package.json +1 -11
- package/dist/chunk-3MRCSXGT.js +0 -73
- package/dist/chunk-5E6SHYEQ.cjs +0 -631
- package/dist/chunk-6JAGPPZU.cjs +0 -788
- package/dist/chunk-CEPX7CKM.cjs +0 -365
- package/dist/chunk-CHFPFYNV.js +0 -60
- package/dist/chunk-ECR6GPJ6.js +0 -198
- package/dist/chunk-GBTNFQXN.cjs +0 -33
- package/dist/chunk-GZAGWNQM.cjs +0 -719
- package/dist/chunk-ILXKBDC6.cjs +0 -209
- package/dist/chunk-IPD3IUE2.cjs +0 -640
- package/dist/chunk-P2V6PIM7.cjs +0 -478
- package/dist/chunk-Q2BWXT55.cjs +0 -1011
- package/dist/chunk-UFKSUELU.cjs +0 -453
- package/dist/chunk-W4IPOWLY.cjs +0 -198
- package/dist/chunk-YSTLHVQV.cjs +0 -73
- package/dist/components/time-field/index.cjs +0 -27
- package/dist/components/time-field/index.d.cts +0 -52
- package/dist/components/time-field/index.d.ts +0 -52
- package/dist/components/time-field/index.js +0 -27
- package/dist/components/time-field/time-field-field.d.cts +0 -11
- package/dist/components/time-field/time-field-field.d.ts +0 -11
- package/dist/components/time-field/time-field-period.d.cts +0 -34
- package/dist/components/time-field/time-field-period.d.ts +0 -34
- package/dist/components/time-field/time-field.context.d.cts +0 -9
- package/dist/components/time-field/time-field.context.d.ts +0 -9
- package/dist/components/time-field/time-field.d.cts +0 -56
- package/dist/components/time-field/time-field.d.ts +0 -56
- package/dist/components/time-field/time-field.type.d.cts +0 -72
- package/dist/components/time-field/time-field.type.d.ts +0 -72
- package/dist/utils/time-mask.d.cts +0 -68
- package/dist/utils/time-mask.d.ts +0 -68
|
@@ -0,0 +1,686 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
function _interopRequireDefault(obj) {
|
|
7
|
+
return obj && obj.__esModule ? obj : {
|
|
8
|
+
default: obj
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function _nullishCoalesce(lhs, rhsFn) {
|
|
12
|
+
if (lhs != null) {
|
|
13
|
+
return lhs;
|
|
14
|
+
} else {
|
|
15
|
+
return rhsFn();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function _optionalChain(ops) {
|
|
19
|
+
let lastAccessLHS = undefined;
|
|
20
|
+
let value = ops[0];
|
|
21
|
+
let i = 1;
|
|
22
|
+
while (i < ops.length) {
|
|
23
|
+
const op = ops[i];
|
|
24
|
+
const fn = ops[i + 1];
|
|
25
|
+
i += 2;
|
|
26
|
+
if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
if (op === 'access' || op === 'optionalAccess') {
|
|
30
|
+
lastAccessLHS = value;
|
|
31
|
+
value = fn(value);
|
|
32
|
+
} else if (op === 'call' || op === 'optionalCall') {
|
|
33
|
+
value = fn((...args) => value.call(lastAccessLHS, ...args));
|
|
34
|
+
lastAccessLHS = undefined;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
var _chunkFJGPDWMScjs = require('./chunk-FJGPDWMS.cjs');
|
|
40
|
+
var _chunkYVYYONTPcjs = require('./chunk-YVYYONTP.cjs');
|
|
41
|
+
var _chunkJ5COSALOcjs = require('./chunk-J5COSALO.cjs');
|
|
42
|
+
var _chunkWDDXU3OHcjs = require('./chunk-WDDXU3OH.cjs');
|
|
43
|
+
var _chunkEKS3W46Mcjs = require('./chunk-EKS3W46M.cjs');
|
|
44
|
+
var _chunkWFEMJCXOcjs = require('./chunk-WFEMJCXO.cjs');
|
|
45
|
+
var _chunk7EIHHOHPcjs = require('./chunk-7EIHHOHP.cjs');
|
|
46
|
+
var _chunkHBYT7B47cjs = require('./chunk-HBYT7B47.cjs');
|
|
47
|
+
var _chunk7DPL3ZDScjs = require('./chunk-7DPL3ZDS.cjs');
|
|
48
|
+
var _chunkGSZDN6EZcjs = require('./chunk-GSZDN6EZ.cjs');
|
|
49
|
+
var _chunkFHNIGHN5cjs = require('./chunk-FHNIGHN5.cjs');
|
|
50
|
+
var _chunkCDRGTUYFcjs = require('./chunk-CDRGTUYF.cjs');
|
|
51
|
+
var _chunkIIAQISBGcjs = require('./chunk-IIAQISBG.cjs');
|
|
52
|
+
var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
|
|
53
|
+
|
|
54
|
+
// src/components/select/select-content.tsx
|
|
55
|
+
var _react = require('react');
|
|
56
|
+
var _reactnative = require('react-native');
|
|
57
|
+
var _reactnativereanimated = require('react-native-reanimated');
|
|
58
|
+
var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
|
|
59
|
+
|
|
60
|
+
// src/components/select/select-item.tsx
|
|
61
|
+
|
|
62
|
+
// src/components/select/select-item-label.tsx
|
|
63
|
+
|
|
64
|
+
// src/components/select/select.context.ts
|
|
65
|
+
var [SelectProvider, useSelect] = _chunkCDRGTUYFcjs.createSlotContext.call(void 0, "Select");
|
|
66
|
+
var [SelectItemProvider, useSelectItem] = _chunkCDRGTUYFcjs.createSlotContext.call(void 0, "Select.Item");
|
|
67
|
+
|
|
68
|
+
// src/components/select/select-item-label.tsx
|
|
69
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
70
|
+
var SelectItemLabel = _react.forwardRef.call(void 0, function SelectItemLabel2({
|
|
71
|
+
children,
|
|
72
|
+
numberOfLines = 1,
|
|
73
|
+
style,
|
|
74
|
+
...props
|
|
75
|
+
}, ref) {
|
|
76
|
+
const {
|
|
77
|
+
itemLabelStyle
|
|
78
|
+
} = useSelect();
|
|
79
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
80
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Text, {
|
|
81
|
+
ref,
|
|
82
|
+
numberOfLines,
|
|
83
|
+
...rest,
|
|
84
|
+
style: [itemLabelStyle, styleProps, style],
|
|
85
|
+
children
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
SelectItemLabel.displayName = "XAUI.Select.ItemLabel";
|
|
89
|
+
|
|
90
|
+
// src/components/select/select-item.tsx
|
|
91
|
+
|
|
92
|
+
var SelectItem = _react.forwardRef.call(void 0, function SelectItem2({
|
|
93
|
+
value,
|
|
94
|
+
label,
|
|
95
|
+
children,
|
|
96
|
+
isDisabled = false,
|
|
97
|
+
asChild = false,
|
|
98
|
+
accessibilityRole = "menuitem",
|
|
99
|
+
accessibilityState,
|
|
100
|
+
style,
|
|
101
|
+
onPress,
|
|
102
|
+
onPressIn,
|
|
103
|
+
onPressOut,
|
|
104
|
+
...props
|
|
105
|
+
}, ref) {
|
|
106
|
+
const {
|
|
107
|
+
itemStyle,
|
|
108
|
+
itemPressedStyle,
|
|
109
|
+
value: selected,
|
|
110
|
+
select,
|
|
111
|
+
registerLabel
|
|
112
|
+
} = useSelect();
|
|
113
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
114
|
+
const [isPressed, press] = _chunk7DPL3ZDScjs.usePressState.call(void 0, {
|
|
115
|
+
onPressIn,
|
|
116
|
+
onPressOut
|
|
117
|
+
});
|
|
118
|
+
const isSelected = selected === value;
|
|
119
|
+
const text = typeof children === "function" ? null : _chunkFHNIGHN5cjs.childrenToString.call(void 0, children);
|
|
120
|
+
const registered = _nullishCoalesce(_nullishCoalesce(label, () => text), () => void 0);
|
|
121
|
+
_react.useEffect.call(void 0, () => {
|
|
122
|
+
if (registered !== void 0) registerLabel(value, registered);
|
|
123
|
+
}, [registerLabel, value, registered]);
|
|
124
|
+
const handlePress = _react.useCallback.call(void 0, event => {
|
|
125
|
+
_optionalChain([onPress, 'optionalCall', _ => _(event)]);
|
|
126
|
+
select(value, registered);
|
|
127
|
+
}, [onPress, select, value, registered]);
|
|
128
|
+
const context = _react.useMemo.call(void 0, () => ({
|
|
129
|
+
isSelected,
|
|
130
|
+
isPressed,
|
|
131
|
+
isDisabled
|
|
132
|
+
}), [isSelected, isPressed, isDisabled]);
|
|
133
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, SelectItemProvider, {
|
|
134
|
+
value: context,
|
|
135
|
+
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkHBYT7B47cjs.PressableFeedback, {
|
|
136
|
+
ref,
|
|
137
|
+
isPressed,
|
|
138
|
+
isDisabled,
|
|
139
|
+
asChild,
|
|
140
|
+
accessibilityRole,
|
|
141
|
+
accessibilityState: {
|
|
142
|
+
disabled: isDisabled,
|
|
143
|
+
selected: isSelected,
|
|
144
|
+
...accessibilityState
|
|
145
|
+
},
|
|
146
|
+
...rest,
|
|
147
|
+
style: [itemStyle, isPressed && itemPressedStyle, styleProps, typeof style === "function" ? style({
|
|
148
|
+
pressed: isPressed
|
|
149
|
+
}) : style],
|
|
150
|
+
onPress: handlePress,
|
|
151
|
+
onPressIn: press.onPressIn,
|
|
152
|
+
onPressOut: press.onPressOut,
|
|
153
|
+
children: typeof children === "function" ? children(context) : /* @__PURE__ */_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {
|
|
154
|
+
children: text !== null ? /* @__PURE__ */_jsxruntime.jsx.call(void 0, SelectItemLabel, {
|
|
155
|
+
children: text
|
|
156
|
+
}) : children
|
|
157
|
+
})
|
|
158
|
+
})
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
SelectItem.displayName = "XAUI.Select.Item";
|
|
162
|
+
|
|
163
|
+
// src/components/select/select-content.tsx
|
|
164
|
+
|
|
165
|
+
var DEFAULT_OFFSET = 8;
|
|
166
|
+
var DEFAULT_INSETS = {
|
|
167
|
+
top: 12,
|
|
168
|
+
bottom: 12,
|
|
169
|
+
start: 12,
|
|
170
|
+
end: 12
|
|
171
|
+
};
|
|
172
|
+
var isSelectItem = type => type === SelectItem;
|
|
173
|
+
var SelectContent = _react.forwardRef.call(void 0, function SelectContent2({
|
|
174
|
+
children,
|
|
175
|
+
placement = "bottom",
|
|
176
|
+
align = "center",
|
|
177
|
+
width = "trigger",
|
|
178
|
+
minWidth,
|
|
179
|
+
offset = DEFAULT_OFFSET,
|
|
180
|
+
alignOffset = 0,
|
|
181
|
+
avoidCollisions = true,
|
|
182
|
+
insets,
|
|
183
|
+
style,
|
|
184
|
+
onLayout,
|
|
185
|
+
...props
|
|
186
|
+
}, ref) {
|
|
187
|
+
const context = useSelect();
|
|
188
|
+
const {
|
|
189
|
+
contentStyle,
|
|
190
|
+
isOpen,
|
|
191
|
+
anchor,
|
|
192
|
+
registerLabel
|
|
193
|
+
} = context;
|
|
194
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
195
|
+
const {
|
|
196
|
+
position,
|
|
197
|
+
onContentLayout,
|
|
198
|
+
measuringStyle
|
|
199
|
+
} = _chunkYVYYONTPcjs.useAnchoredPosition.call(void 0, {
|
|
200
|
+
anchor,
|
|
201
|
+
isOpen,
|
|
202
|
+
placement,
|
|
203
|
+
align,
|
|
204
|
+
width,
|
|
205
|
+
minWidth,
|
|
206
|
+
offset,
|
|
207
|
+
alignOffset,
|
|
208
|
+
avoidCollisions,
|
|
209
|
+
insets: {
|
|
210
|
+
...DEFAULT_INSETS,
|
|
211
|
+
...insets
|
|
212
|
+
},
|
|
213
|
+
onLayout
|
|
214
|
+
});
|
|
215
|
+
_react.useEffect.call(void 0, () => {
|
|
216
|
+
for (const [value, label] of _chunkFJGPDWMScjs.collectItemLabels.call(void 0, children, isSelectItem)) {
|
|
217
|
+
registerLabel(value, label);
|
|
218
|
+
}
|
|
219
|
+
}, [children, registerLabel]);
|
|
220
|
+
if (!isOpen || anchor === null) return null;
|
|
221
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkWDDXU3OHcjs.Portal, {
|
|
222
|
+
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, SelectProvider, {
|
|
223
|
+
value: context,
|
|
224
|
+
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.View, {
|
|
225
|
+
ref,
|
|
226
|
+
entering: position ? _chunkEKS3W46Mcjs.anchoredEntering.call(void 0, position.placement) : void 0,
|
|
227
|
+
exiting: position ? _chunkEKS3W46Mcjs.anchoredExiting.call(void 0, position.placement) : void 0,
|
|
228
|
+
onLayout: onContentLayout,
|
|
229
|
+
...rest,
|
|
230
|
+
style: [contentStyle, position === null ? measuringStyle : {
|
|
231
|
+
top: position.top,
|
|
232
|
+
start: position.start,
|
|
233
|
+
width: position.width,
|
|
234
|
+
maxHeight: position.maxHeight
|
|
235
|
+
}, styleProps, style],
|
|
236
|
+
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.ScrollView, {
|
|
237
|
+
bounces: false,
|
|
238
|
+
keyboardShouldPersistTaps: "handled",
|
|
239
|
+
showsVerticalScrollIndicator: false,
|
|
240
|
+
children
|
|
241
|
+
})
|
|
242
|
+
}, _nullishCoalesce(_optionalChain([position, 'optionalAccess', _2 => _2.placement]), () => "measuring"))
|
|
243
|
+
})
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
SelectContent.displayName = "XAUI.Select.Content";
|
|
247
|
+
|
|
248
|
+
// src/components/select/select-indicator.tsx
|
|
249
|
+
const _worklet_13355298017699_init_data = {
|
|
250
|
+
code: "function chunkERIGD4SECjs1(){const{_reactnativereanimated,progress,_chunkEKS3W46Mcjs}=this.__closure;return{transform:[{rotate:_reactnativereanimated.interpolate.call(void 0,progress.get(),[0,1],[_chunkEKS3W46Mcjs.INDICATOR_ROTATION[0],_chunkEKS3W46Mcjs.INDICATOR_ROTATION[1]])+\"deg\"}]};}",
|
|
251
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-ERIGD4SE.cjs",
|
|
252
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkERIGD4SECjs1\",\"_reactnativereanimated\",\"progress\",\"_chunkEKS3W46Mcjs\",\"__closure\",\"transform\",\"rotate\",\"interpolate\",\"call\",\"get\",\"INDICATOR_ROTATION\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-ERIGD4SE.cjs\"],\"mappings\":\"AAmQwE,SAAAA,iBAAMA,CAAA,QAAAC,sBAAA,CAAAC,QAAA,CAAAC,iBAAA,OAAAC,SAAA,CAE1E,MAAO,CACLC,SAAS,CAAE,CACT,CACEC,MAAM,CAAKL,sBAAsB,CAACM,WAAW,CAACC,IAAI,CAAC,IAAK,EAAC,CAAEN,QAAQ,CAACO,GAAG,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAACN,iBAAiB,CAACO,kBAAkB,CAAC,CAAC,CAAC,CAAEP,iBAAiB,CAACO,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,MACxK,CAAC,CAEL,CAAC,CACH\",\"ignoreList\":[]}"
|
|
253
|
+
};
|
|
254
|
+
function SelectIndicator({
|
|
255
|
+
as = _chunkGSZDN6EZcjs.ChevronDownIcon,
|
|
256
|
+
...props
|
|
257
|
+
}) {
|
|
258
|
+
const {
|
|
259
|
+
indicatorStyle,
|
|
260
|
+
isOpen
|
|
261
|
+
} = useSelect();
|
|
262
|
+
const progress = _reactnativereanimated.useSharedValue.call(void 0, isOpen ? 1 : 0);
|
|
263
|
+
_react.useEffect.call(void 0, () => {
|
|
264
|
+
progress.set(_reactnativereanimated.withSpring.call(void 0, isOpen ? 1 : 0, _chunkEKS3W46Mcjs.INDICATOR_SPRING));
|
|
265
|
+
}, [isOpen, progress]);
|
|
266
|
+
const rotation = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkERIGD4SECjs1Factory({
|
|
267
|
+
_worklet_13355298017699_init_data,
|
|
268
|
+
_reactnativereanimated,
|
|
269
|
+
progress,
|
|
270
|
+
_chunkEKS3W46Mcjs
|
|
271
|
+
}) {
|
|
272
|
+
const _e = [new global.Error(), -4, -27];
|
|
273
|
+
const chunkERIGD4SECjs1 = function () {
|
|
274
|
+
return {
|
|
275
|
+
transform: [{
|
|
276
|
+
rotate: `${_reactnativereanimated.interpolate.call(void 0, progress.get(), [0, 1], [_chunkEKS3W46Mcjs.INDICATOR_ROTATION[0], _chunkEKS3W46Mcjs.INDICATOR_ROTATION[1]])}deg`
|
|
277
|
+
}]
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
chunkERIGD4SECjs1.__closure = {
|
|
281
|
+
_reactnativereanimated,
|
|
282
|
+
progress,
|
|
283
|
+
_chunkEKS3W46Mcjs
|
|
284
|
+
};
|
|
285
|
+
chunkERIGD4SECjs1.__workletHash = 13355298017699;
|
|
286
|
+
chunkERIGD4SECjs1.__pluginVersion = "0.7.4";
|
|
287
|
+
chunkERIGD4SECjs1.__initData = _worklet_13355298017699_init_data;
|
|
288
|
+
chunkERIGD4SECjs1.__stackDetails = _e;
|
|
289
|
+
return chunkERIGD4SECjs1;
|
|
290
|
+
}({
|
|
291
|
+
_worklet_13355298017699_init_data,
|
|
292
|
+
_reactnativereanimated,
|
|
293
|
+
progress,
|
|
294
|
+
_chunkEKS3W46Mcjs
|
|
295
|
+
}), [progress]);
|
|
296
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.View, {
|
|
297
|
+
style: [indicatorStyle, rotation],
|
|
298
|
+
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkGSZDN6EZcjs.Icon, {
|
|
299
|
+
as,
|
|
300
|
+
...props
|
|
301
|
+
})
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
SelectIndicator.displayName = "XAUI.Select.Indicator";
|
|
305
|
+
|
|
306
|
+
// src/components/select/select-item-description.tsx
|
|
307
|
+
|
|
308
|
+
var SelectItemDescription = _react.forwardRef.call(void 0, function SelectItemDescription2({
|
|
309
|
+
children,
|
|
310
|
+
style,
|
|
311
|
+
...props
|
|
312
|
+
}, ref) {
|
|
313
|
+
const {
|
|
314
|
+
itemDescriptionStyle
|
|
315
|
+
} = useSelect();
|
|
316
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
317
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Text, {
|
|
318
|
+
ref,
|
|
319
|
+
...rest,
|
|
320
|
+
style: [itemDescriptionStyle, styleProps, style],
|
|
321
|
+
children
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
SelectItemDescription.displayName = "XAUI.Select.ItemDescription";
|
|
325
|
+
|
|
326
|
+
// src/components/select/select-item-indicator.tsx
|
|
327
|
+
|
|
328
|
+
// src/components/select/check-icon.tsx
|
|
329
|
+
var _reactnativesvg = require('react-native-svg');
|
|
330
|
+
function CheckIcon({
|
|
331
|
+
size = 20,
|
|
332
|
+
color = "currentColor"
|
|
333
|
+
}) {
|
|
334
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnativesvg.Svg, {
|
|
335
|
+
width: size,
|
|
336
|
+
height: size,
|
|
337
|
+
viewBox: "0 0 24 24",
|
|
338
|
+
fill: "none",
|
|
339
|
+
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnativesvg.Path, {
|
|
340
|
+
d: "m20 6-11 11-5-5",
|
|
341
|
+
stroke: color,
|
|
342
|
+
strokeWidth: 2,
|
|
343
|
+
strokeLinecap: "round",
|
|
344
|
+
strokeLinejoin: "round"
|
|
345
|
+
})
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
CheckIcon.displayName = "XAUI.Select.CheckIcon";
|
|
349
|
+
|
|
350
|
+
// src/components/select/select-item-indicator.tsx
|
|
351
|
+
|
|
352
|
+
function SelectItemIndicator({
|
|
353
|
+
as = CheckIcon,
|
|
354
|
+
color,
|
|
355
|
+
...props
|
|
356
|
+
}) {
|
|
357
|
+
const {
|
|
358
|
+
itemIndicatorStyle,
|
|
359
|
+
checkColor
|
|
360
|
+
} = useSelect();
|
|
361
|
+
const {
|
|
362
|
+
isSelected
|
|
363
|
+
} = useSelectItem();
|
|
364
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
|
|
365
|
+
style: itemIndicatorStyle,
|
|
366
|
+
children: isSelected ? /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkGSZDN6EZcjs.Icon, {
|
|
367
|
+
as,
|
|
368
|
+
color: _nullishCoalesce(color, () => checkColor),
|
|
369
|
+
...props
|
|
370
|
+
}) : null
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
SelectItemIndicator.displayName = "XAUI.Select.ItemIndicator";
|
|
374
|
+
|
|
375
|
+
// src/components/select/select-label.tsx
|
|
376
|
+
|
|
377
|
+
var SelectLabel = _react.forwardRef.call(void 0, function SelectLabel2({
|
|
378
|
+
children,
|
|
379
|
+
accessibilityRole = "header",
|
|
380
|
+
style,
|
|
381
|
+
...props
|
|
382
|
+
}, ref) {
|
|
383
|
+
const {
|
|
384
|
+
labelStyle
|
|
385
|
+
} = useSelect();
|
|
386
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
387
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Text, {
|
|
388
|
+
ref,
|
|
389
|
+
accessibilityRole,
|
|
390
|
+
...rest,
|
|
391
|
+
style: [labelStyle, styleProps, style],
|
|
392
|
+
children
|
|
393
|
+
});
|
|
394
|
+
});
|
|
395
|
+
SelectLabel.displayName = "XAUI.Select.Label";
|
|
396
|
+
|
|
397
|
+
// src/components/select/select-overlay.tsx
|
|
398
|
+
|
|
399
|
+
var AnimatedPressable = _reactnativereanimated2.default.createAnimatedComponent(_reactnative.Pressable);
|
|
400
|
+
var SelectOverlay = _react.forwardRef.call(void 0, function SelectOverlay2({
|
|
401
|
+
children,
|
|
402
|
+
isDismissable = true,
|
|
403
|
+
style,
|
|
404
|
+
...props
|
|
405
|
+
}, ref) {
|
|
406
|
+
const context = useSelect();
|
|
407
|
+
const {
|
|
408
|
+
overlayStyle,
|
|
409
|
+
isOpen,
|
|
410
|
+
close
|
|
411
|
+
} = context;
|
|
412
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
413
|
+
if (!isOpen) return null;
|
|
414
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkWDDXU3OHcjs.Portal, {
|
|
415
|
+
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, SelectProvider, {
|
|
416
|
+
value: context,
|
|
417
|
+
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, AnimatedPressable, {
|
|
418
|
+
ref,
|
|
419
|
+
entering: _chunkEKS3W46Mcjs.overlayEntering,
|
|
420
|
+
exiting: _chunkEKS3W46Mcjs.overlayExiting,
|
|
421
|
+
accessibilityRole: "none",
|
|
422
|
+
importantForAccessibility: "no",
|
|
423
|
+
onPress: isDismissable ? close : void 0,
|
|
424
|
+
...rest,
|
|
425
|
+
style: [overlayStyle, styleProps, style],
|
|
426
|
+
children
|
|
427
|
+
})
|
|
428
|
+
})
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
SelectOverlay.displayName = "XAUI.Select.Overlay";
|
|
432
|
+
|
|
433
|
+
// src/components/select/select-trigger.tsx
|
|
434
|
+
|
|
435
|
+
var SelectTrigger = _react.forwardRef.call(void 0, function SelectTrigger2({
|
|
436
|
+
children,
|
|
437
|
+
asChild = false,
|
|
438
|
+
accessibilityRole = "button",
|
|
439
|
+
accessibilityState,
|
|
440
|
+
style,
|
|
441
|
+
onLayout,
|
|
442
|
+
onPressIn,
|
|
443
|
+
onPressOut,
|
|
444
|
+
onPress,
|
|
445
|
+
...props
|
|
446
|
+
}, ref) {
|
|
447
|
+
const {
|
|
448
|
+
triggerStyle,
|
|
449
|
+
triggerPressedStyle,
|
|
450
|
+
glyph,
|
|
451
|
+
isOpen,
|
|
452
|
+
isDisabled,
|
|
453
|
+
isInvalid,
|
|
454
|
+
toggle,
|
|
455
|
+
setAnchor
|
|
456
|
+
} = useSelect();
|
|
457
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
458
|
+
const [isPressed, press] = _chunk7DPL3ZDScjs.usePressState.call(void 0, {
|
|
459
|
+
onPressIn,
|
|
460
|
+
onPressOut
|
|
461
|
+
});
|
|
462
|
+
const node = _react.useRef.call(void 0, null);
|
|
463
|
+
const refs = _chunkWFEMJCXOcjs.useMergedRef.call(void 0, node, ref);
|
|
464
|
+
const measure = _react.useCallback.call(void 0, () => {
|
|
465
|
+
_optionalChain([node, 'access', _3 => _3.current, 'optionalAccess', _4 => _4.measureInWindow, 'call', _5 => _5((x, y, width, height) => {
|
|
466
|
+
setAnchor({
|
|
467
|
+
x,
|
|
468
|
+
y,
|
|
469
|
+
width,
|
|
470
|
+
height
|
|
471
|
+
});
|
|
472
|
+
})]);
|
|
473
|
+
}, [setAnchor]);
|
|
474
|
+
const handleLayout = _react.useCallback.call(void 0, event => {
|
|
475
|
+
_optionalChain([onLayout, 'optionalCall', _6 => _6(event)]);
|
|
476
|
+
measure();
|
|
477
|
+
}, [measure, onLayout]);
|
|
478
|
+
_react.useEffect.call(void 0, () => {
|
|
479
|
+
if (isOpen) measure();
|
|
480
|
+
}, [isOpen, measure]);
|
|
481
|
+
const handlePress = _react.useCallback.call(void 0, event => {
|
|
482
|
+
_optionalChain([onPress, 'optionalCall', _7 => _7(event)]);
|
|
483
|
+
measure();
|
|
484
|
+
toggle();
|
|
485
|
+
}, [measure, onPress, toggle]);
|
|
486
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkGSZDN6EZcjs.IconContext.Provider, {
|
|
487
|
+
value: glyph,
|
|
488
|
+
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkHBYT7B47cjs.PressableFeedback, {
|
|
489
|
+
ref: refs,
|
|
490
|
+
isPressed,
|
|
491
|
+
isDisabled,
|
|
492
|
+
asChild,
|
|
493
|
+
accessibilityRole,
|
|
494
|
+
accessibilityState: {
|
|
495
|
+
disabled: isDisabled,
|
|
496
|
+
expanded: isOpen,
|
|
497
|
+
...accessibilityState
|
|
498
|
+
},
|
|
499
|
+
"aria-invalid": isInvalid || void 0,
|
|
500
|
+
...rest,
|
|
501
|
+
onLayout: handleLayout,
|
|
502
|
+
style: [triggerStyle, isPressed && triggerPressedStyle, styleProps, typeof style === "function" ? style({
|
|
503
|
+
pressed: isPressed
|
|
504
|
+
}) : style],
|
|
505
|
+
onPress: handlePress,
|
|
506
|
+
onPressIn: press.onPressIn,
|
|
507
|
+
onPressOut: press.onPressOut,
|
|
508
|
+
children
|
|
509
|
+
})
|
|
510
|
+
});
|
|
511
|
+
});
|
|
512
|
+
SelectTrigger.displayName = "XAUI.Select.Trigger";
|
|
513
|
+
|
|
514
|
+
// src/components/select/select-value.tsx
|
|
515
|
+
|
|
516
|
+
var SelectValue = _react.forwardRef.call(void 0, function SelectValue2({
|
|
517
|
+
placeholder,
|
|
518
|
+
children,
|
|
519
|
+
numberOfLines = 1,
|
|
520
|
+
style,
|
|
521
|
+
...props
|
|
522
|
+
}, ref) {
|
|
523
|
+
const {
|
|
524
|
+
valueStyle,
|
|
525
|
+
placeholderStyle,
|
|
526
|
+
value,
|
|
527
|
+
labelFor
|
|
528
|
+
} = useSelect();
|
|
529
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
530
|
+
const label = _nullishCoalesce(children, () => value !== void 0 ? labelFor(value) : void 0);
|
|
531
|
+
const isEmpty = label === void 0 || label === "";
|
|
532
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Text, {
|
|
533
|
+
ref,
|
|
534
|
+
numberOfLines,
|
|
535
|
+
...rest,
|
|
536
|
+
style: [valueStyle, isEmpty && placeholderStyle, styleProps, style],
|
|
537
|
+
children: isEmpty ? placeholder : label
|
|
538
|
+
});
|
|
539
|
+
});
|
|
540
|
+
SelectValue.displayName = "XAUI.Select.Value";
|
|
541
|
+
|
|
542
|
+
// src/components/select/select.tsx
|
|
543
|
+
|
|
544
|
+
function Select({
|
|
545
|
+
children,
|
|
546
|
+
variant,
|
|
547
|
+
size,
|
|
548
|
+
radius,
|
|
549
|
+
color,
|
|
550
|
+
value: controlledValue,
|
|
551
|
+
defaultValue,
|
|
552
|
+
onValueChange,
|
|
553
|
+
isOpen: controlledOpen,
|
|
554
|
+
defaultOpen = false,
|
|
555
|
+
onOpenChange,
|
|
556
|
+
isDisabled = false,
|
|
557
|
+
isInvalid = false
|
|
558
|
+
}) {
|
|
559
|
+
const theme = _chunkIIAQISBGcjs.useXAUITheme.call(void 0);
|
|
560
|
+
const {
|
|
561
|
+
labelFor,
|
|
562
|
+
registerLabel
|
|
563
|
+
} = _chunkFJGPDWMScjs.useLabelRegistry.call(void 0);
|
|
564
|
+
const [anchor, setAnchor] = _react.useState.call(void 0, null);
|
|
565
|
+
const [value, setValue] = _chunk7EIHHOHPcjs.useControllableState.call(void 0, {
|
|
566
|
+
value: controlledValue,
|
|
567
|
+
defaultValue,
|
|
568
|
+
onChange: onValueChange
|
|
569
|
+
});
|
|
570
|
+
const [isOpen, setOpen] = _chunk7EIHHOHPcjs.useControllableState.call(void 0, {
|
|
571
|
+
value: controlledOpen,
|
|
572
|
+
defaultValue: defaultOpen,
|
|
573
|
+
onChange: onOpenChange
|
|
574
|
+
});
|
|
575
|
+
const selection = {
|
|
576
|
+
variant,
|
|
577
|
+
size,
|
|
578
|
+
radius,
|
|
579
|
+
isOpen: isOpen ? "true" : void 0,
|
|
580
|
+
isInvalid: isInvalid ? "true" : void 0
|
|
581
|
+
};
|
|
582
|
+
const styles = _chunkJ5COSALOcjs.selectRecipe.resolve({
|
|
583
|
+
theme,
|
|
584
|
+
selection,
|
|
585
|
+
states: {
|
|
586
|
+
disabled: isDisabled
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
const pressed = _chunkJ5COSALOcjs.selectRecipe.resolve({
|
|
590
|
+
theme,
|
|
591
|
+
selection,
|
|
592
|
+
states: {
|
|
593
|
+
pressed: true
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
const tint = color ? _chunkJ5COSALOcjs.selectRecipe.tint({
|
|
597
|
+
theme,
|
|
598
|
+
color,
|
|
599
|
+
selection
|
|
600
|
+
}) : void 0;
|
|
601
|
+
const open = _react.useCallback.call(void 0, () => setOpen(true), [setOpen]);
|
|
602
|
+
const close = _react.useCallback.call(void 0, () => setOpen(false), [setOpen]);
|
|
603
|
+
const toggle = _react.useCallback.call(void 0, () => setOpen(!isOpen), [isOpen, setOpen]);
|
|
604
|
+
const select = _react.useCallback.call(void 0, (next, label) => {
|
|
605
|
+
if (label !== void 0) registerLabel(next, label);
|
|
606
|
+
setValue(next);
|
|
607
|
+
setOpen(false);
|
|
608
|
+
}, [registerLabel, setValue, setOpen]);
|
|
609
|
+
const context = _react.useMemo.call(void 0, () => {
|
|
610
|
+
const indicator = _reactnative.StyleSheet.flatten([styles.indicator, _optionalChain([tint, 'optionalAccess', _8 => _8.indicator])]);
|
|
611
|
+
const itemLabel = _reactnative.StyleSheet.flatten([styles.itemLabel]);
|
|
612
|
+
const tintedPlaceholder = tint ? _reactnative.StyleSheet.flatten([tint.value]).color : void 0;
|
|
613
|
+
return {
|
|
614
|
+
triggerStyle: tint ? [styles.trigger, tint.trigger] : styles.trigger,
|
|
615
|
+
triggerPressedStyle: pressed.trigger,
|
|
616
|
+
valueStyle: tint ? [styles.value, tint.value] : styles.value,
|
|
617
|
+
placeholderStyle: tintedPlaceholder ? [styles.placeholder, {
|
|
618
|
+
color: tintedPlaceholder
|
|
619
|
+
}] : styles.placeholder,
|
|
620
|
+
indicatorStyle: styles.indicator,
|
|
621
|
+
overlayStyle: styles.overlay,
|
|
622
|
+
contentStyle: styles.content,
|
|
623
|
+
labelStyle: styles.label,
|
|
624
|
+
itemStyle: styles.item,
|
|
625
|
+
itemPressedStyle: pressed.item,
|
|
626
|
+
itemLabelStyle: styles.itemLabel,
|
|
627
|
+
itemDescriptionStyle: styles.itemDescription,
|
|
628
|
+
itemIndicatorStyle: styles.itemIndicator,
|
|
629
|
+
glyph: {
|
|
630
|
+
size: indicator.fontSize,
|
|
631
|
+
// `ColorValue` also covers the platform's opaque colours, which `Icon` cannot
|
|
632
|
+
// hand to a third-party component expecting a string.
|
|
633
|
+
color: typeof indicator.color === "string" ? indicator.color : void 0
|
|
634
|
+
},
|
|
635
|
+
// The check reads the row's own colour rather than the chevron's: it belongs to the
|
|
636
|
+
// list, and the chevron belongs to the field.
|
|
637
|
+
checkColor: typeof itemLabel.color === "string" ? itemLabel.color : void 0,
|
|
638
|
+
value,
|
|
639
|
+
isOpen,
|
|
640
|
+
isDisabled,
|
|
641
|
+
isInvalid,
|
|
642
|
+
open,
|
|
643
|
+
close,
|
|
644
|
+
toggle,
|
|
645
|
+
select,
|
|
646
|
+
anchor,
|
|
647
|
+
setAnchor,
|
|
648
|
+
labelFor,
|
|
649
|
+
registerLabel
|
|
650
|
+
};
|
|
651
|
+
}, [styles, pressed, tint, value, isOpen, isDisabled, isInvalid, open, close, toggle, select, anchor, labelFor, registerLabel]);
|
|
652
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, SelectProvider, {
|
|
653
|
+
value: context,
|
|
654
|
+
children
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
Select.displayName = "XAUI.Select.Root";
|
|
658
|
+
|
|
659
|
+
// src/components/select/index.ts
|
|
660
|
+
var Select2 = Object.assign(Select, {
|
|
661
|
+
Trigger: SelectTrigger,
|
|
662
|
+
Value: SelectValue,
|
|
663
|
+
Indicator: SelectIndicator,
|
|
664
|
+
Overlay: SelectOverlay,
|
|
665
|
+
Content: SelectContent,
|
|
666
|
+
Label: SelectLabel,
|
|
667
|
+
Item: SelectItem,
|
|
668
|
+
ItemLabel: SelectItemLabel,
|
|
669
|
+
ItemDescription: SelectItemDescription,
|
|
670
|
+
ItemIndicator: SelectItemIndicator
|
|
671
|
+
});
|
|
672
|
+
exports.useSelect = useSelect;
|
|
673
|
+
exports.useSelectItem = useSelectItem;
|
|
674
|
+
exports.SelectItemLabel = SelectItemLabel;
|
|
675
|
+
exports.SelectItem = SelectItem;
|
|
676
|
+
exports.SelectContent = SelectContent;
|
|
677
|
+
exports.SelectIndicator = SelectIndicator;
|
|
678
|
+
exports.SelectItemDescription = SelectItemDescription;
|
|
679
|
+
exports.CheckIcon = CheckIcon;
|
|
680
|
+
exports.SelectItemIndicator = SelectItemIndicator;
|
|
681
|
+
exports.SelectLabel = SelectLabel;
|
|
682
|
+
exports.SelectOverlay = SelectOverlay;
|
|
683
|
+
exports.SelectTrigger = SelectTrigger;
|
|
684
|
+
exports.SelectValue = SelectValue;
|
|
685
|
+
exports.Select = Select;
|
|
686
|
+
exports.Select2 = Select2;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkWNEDQTH6cjs = require('./chunk-WNEDQTH6.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -35,7 +35,7 @@ function sizeAxis(box) {
|
|
|
35
35
|
var closeButtonRecipe = _chunkSL3V7R2Ycjs.createRecipe.call(void 0, {
|
|
36
36
|
slots: SLOTS,
|
|
37
37
|
base: (theme) => {
|
|
38
|
-
const shared =
|
|
38
|
+
const shared = _chunkWNEDQTH6cjs.closeButtonGeometry.call(void 0, theme);
|
|
39
39
|
return {
|
|
40
40
|
// The stroke does **not** scale with the box. It is the shared thickness the `Chip`,
|
|
41
41
|
// the `Alert` and the `Dialog` all draw their cross at, and a family of crosses that
|
|
@@ -81,7 +81,7 @@ var CloseButton = _react.forwardRef.call(void 0, function CloseButton2({ childre
|
|
|
81
81
|
});
|
|
82
82
|
const tint = color ? closeButtonRecipe.tint({ theme, color, selection }) : void 0;
|
|
83
83
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
84
|
-
|
|
84
|
+
_chunkWNEDQTH6cjs.CloseButtonBase,
|
|
85
85
|
{
|
|
86
86
|
ref,
|
|
87
87
|
name: "CloseButton",
|