@xaui/native 0.9.1-alpha.93 → 0.9.1-alpha.94
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,999 @@
|
|
|
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 _chunkFTPPUTWLcjs = require('./chunk-FTPPUTWL.cjs');
|
|
40
|
+
var _chunkWFEMJCXOcjs = require('./chunk-WFEMJCXO.cjs');
|
|
41
|
+
var _chunk7EIHHOHPcjs = require('./chunk-7EIHHOHP.cjs');
|
|
42
|
+
var _chunkHBYT7B47cjs = require('./chunk-HBYT7B47.cjs');
|
|
43
|
+
var _chunk7DPL3ZDScjs = require('./chunk-7DPL3ZDS.cjs');
|
|
44
|
+
var _chunkSL3V7R2Ycjs = require('./chunk-SL3V7R2Y.cjs');
|
|
45
|
+
var _chunkCDRGTUYFcjs = require('./chunk-CDRGTUYF.cjs');
|
|
46
|
+
var _chunkEJQCQPETcjs = require('./chunk-EJQCQPET.cjs');
|
|
47
|
+
var _chunkIIAQISBGcjs = require('./chunk-IIAQISBG.cjs');
|
|
48
|
+
var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
|
|
49
|
+
|
|
50
|
+
// src/components/carousel/carousel-content.tsx
|
|
51
|
+
var _react = require('react');
|
|
52
|
+
var _reactnativereanimated = require('react-native-reanimated');
|
|
53
|
+
var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
|
|
54
|
+
|
|
55
|
+
// src/components/carousel/carousel.context.ts
|
|
56
|
+
var [CarouselProvider, useCarousel] = _chunkCDRGTUYFcjs.createSlotContext.call(void 0, "Carousel");
|
|
57
|
+
|
|
58
|
+
// src/components/carousel/carousel-content.tsx
|
|
59
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
60
|
+
const _worklet_1139016072441_init_data = {
|
|
61
|
+
code: "function chunkGWTURY4SCjs1(event){const{offset,_chunkFTPPUTWLcjs,step,count,settled,_reactnativereanimated,onSettle}=this.__closure;offset.set(event.contentOffset.x);const next=_chunkFTPPUTWLcjs.indexFromOffset.call(void 0,event.contentOffset.x,step,count);if(next!==settled.get()){settled.set(next);_reactnativereanimated.runOnJS.call(void 0,onSettle)(next);}}",
|
|
62
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-GWTURY4S.cjs",
|
|
63
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkGWTURY4SCjs1\",\"event\",\"offset\",\"_chunkFTPPUTWLcjs\",\"step\",\"count\",\"settled\",\"_reactnativereanimated\",\"onSettle\",\"__closure\",\"set\",\"contentOffset\",\"x\",\"next\",\"indexFromOffset\",\"call\",\"get\",\"runOnJS\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-GWTURY4S.cjs\"],\"mappings\":\"AA6EO,SAAAA,iBAAUA,CAAAC,KAAA,QAAAC,MAAA,CAAAC,iBAAA,CAAAC,IAAA,CAAAC,KAAA,CAAAC,OAAA,CAAAC,sBAAA,CAAAC,QAAA,OAAAC,SAAA,CAETP,MAAM,CAACQ,GAAG,CAACT,KAAK,CAACU,aAAa,CAACC,CAAC,CAAC,CACjC,KAAM,CAAAC,IAAI,CAAGV,iBAAiB,CAACW,eAAe,CAACC,IAAI,CAAC,IAAK,EAAC,CAAEd,KAAK,CAACU,aAAa,CAACC,CAAC,CAAER,IAAI,CAAEC,KAAK,CAAC,CAC/F,GAAIQ,IAAI,GAAKP,OAAO,CAACU,GAAG,CAAC,CAAC,CAAE,CAC1BV,OAAO,CAACI,GAAG,CAACG,IAAI,CAAC,CACjBN,sBAAsB,CAACU,OAAO,CAACF,IAAI,CAAC,IAAK,EAAC,CAAEP,QAAQ,CAAC,CAACK,IAAI,CAAC,CAC7D,CACF\",\"ignoreList\":[]}"
|
|
64
|
+
};
|
|
65
|
+
var CarouselContent = _react.forwardRef.call(void 0, function CarouselContent2({
|
|
66
|
+
children,
|
|
67
|
+
style,
|
|
68
|
+
onLayout,
|
|
69
|
+
...props
|
|
70
|
+
}, ref) {
|
|
71
|
+
const {
|
|
72
|
+
contentStyle,
|
|
73
|
+
metrics,
|
|
74
|
+
width,
|
|
75
|
+
count,
|
|
76
|
+
setCount,
|
|
77
|
+
offset,
|
|
78
|
+
trackRef,
|
|
79
|
+
isDisabled,
|
|
80
|
+
onInteract,
|
|
81
|
+
onSettle,
|
|
82
|
+
setTrackHeight
|
|
83
|
+
} = useCarousel();
|
|
84
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
85
|
+
const track = _chunkWFEMJCXOcjs.useMergedRef.call(void 0, ref, trackRef);
|
|
86
|
+
const given = _react.Children.count(children);
|
|
87
|
+
_react.useEffect.call(void 0, () => {
|
|
88
|
+
if (given !== count) setCount(given);
|
|
89
|
+
}, [count, given, setCount]);
|
|
90
|
+
const handleLayout = event => {
|
|
91
|
+
_optionalChain([onLayout, 'optionalCall', _2 => _2(event)]);
|
|
92
|
+
setTrackHeight(event.nativeEvent.layout.height);
|
|
93
|
+
};
|
|
94
|
+
const settled = _reactnativereanimated.useSharedValue.call(void 0, 0);
|
|
95
|
+
const {
|
|
96
|
+
step
|
|
97
|
+
} = metrics;
|
|
98
|
+
const scroll = _reactnativereanimated.useAnimatedScrollHandler.call(void 0, function chunkGWTURY4SCjs1Factory({
|
|
99
|
+
_worklet_1139016072441_init_data,
|
|
100
|
+
offset,
|
|
101
|
+
_chunkFTPPUTWLcjs,
|
|
102
|
+
step,
|
|
103
|
+
count,
|
|
104
|
+
settled,
|
|
105
|
+
_reactnativereanimated,
|
|
106
|
+
onSettle
|
|
107
|
+
}) {
|
|
108
|
+
const _e = [new global.Error(), -8, -27];
|
|
109
|
+
const chunkGWTURY4SCjs1 = function (event) {
|
|
110
|
+
offset.set(event.contentOffset.x);
|
|
111
|
+
const next = _chunkFTPPUTWLcjs.indexFromOffset.call(void 0, event.contentOffset.x, step, count);
|
|
112
|
+
if (next !== settled.get()) {
|
|
113
|
+
settled.set(next);
|
|
114
|
+
_reactnativereanimated.runOnJS.call(void 0, onSettle)(next);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
chunkGWTURY4SCjs1.__closure = {
|
|
118
|
+
offset,
|
|
119
|
+
_chunkFTPPUTWLcjs,
|
|
120
|
+
step,
|
|
121
|
+
count,
|
|
122
|
+
settled,
|
|
123
|
+
_reactnativereanimated,
|
|
124
|
+
onSettle
|
|
125
|
+
};
|
|
126
|
+
chunkGWTURY4SCjs1.__workletHash = 1139016072441;
|
|
127
|
+
chunkGWTURY4SCjs1.__pluginVersion = "0.7.4";
|
|
128
|
+
chunkGWTURY4SCjs1.__initData = _worklet_1139016072441_init_data;
|
|
129
|
+
chunkGWTURY4SCjs1.__stackDetails = _e;
|
|
130
|
+
return chunkGWTURY4SCjs1;
|
|
131
|
+
}({
|
|
132
|
+
_worklet_1139016072441_init_data,
|
|
133
|
+
offset,
|
|
134
|
+
_chunkFTPPUTWLcjs,
|
|
135
|
+
step,
|
|
136
|
+
count,
|
|
137
|
+
settled,
|
|
138
|
+
_reactnativereanimated,
|
|
139
|
+
onSettle
|
|
140
|
+
}), [offset, settled, step, count, onSettle]);
|
|
141
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.ScrollView, {
|
|
142
|
+
ref: track,
|
|
143
|
+
horizontal: true,
|
|
144
|
+
showsHorizontalScrollIndicator: false,
|
|
145
|
+
scrollEnabled: !isDisabled,
|
|
146
|
+
snapToInterval: metrics.step,
|
|
147
|
+
decelerationRate: "fast",
|
|
148
|
+
disableIntervalMomentum: true,
|
|
149
|
+
scrollEventThrottle: 16,
|
|
150
|
+
...rest,
|
|
151
|
+
contentContainerStyle: [{
|
|
152
|
+
gap: metrics.gap
|
|
153
|
+
},
|
|
154
|
+
// R13 — the inset is the same at both ends, so one key rather than two, and no
|
|
155
|
+
// side to get the wrong way round in a right-to-left layout.
|
|
156
|
+
{
|
|
157
|
+
paddingHorizontal: metrics.inset
|
|
158
|
+
}],
|
|
159
|
+
style: [contentStyle, styleProps, style],
|
|
160
|
+
onLayout: handleLayout,
|
|
161
|
+
onScroll: scroll,
|
|
162
|
+
onScrollBeginDrag: onInteract,
|
|
163
|
+
children: width > 0 ? children : null
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
CarouselContent.displayName = "XAUI.Carousel.Content";
|
|
167
|
+
|
|
168
|
+
// src/components/carousel/carousel-counter.tsx
|
|
169
|
+
|
|
170
|
+
var _reactnative = require('react-native');
|
|
171
|
+
var CarouselCounter = _react.forwardRef.call(void 0, function CarouselCounter2({
|
|
172
|
+
children,
|
|
173
|
+
style,
|
|
174
|
+
...props
|
|
175
|
+
}, ref) {
|
|
176
|
+
const {
|
|
177
|
+
counterStyle,
|
|
178
|
+
index,
|
|
179
|
+
count
|
|
180
|
+
} = useCarousel();
|
|
181
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
182
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Text, {
|
|
183
|
+
ref,
|
|
184
|
+
...rest,
|
|
185
|
+
style: [counterStyle, styleProps, style],
|
|
186
|
+
children: _nullishCoalesce(children, () => `${count === 0 ? 0 : index + 1} / ${count}`)
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
CarouselCounter.displayName = "XAUI.Carousel.Counter";
|
|
190
|
+
|
|
191
|
+
// src/components/carousel/carousel-indicator.tsx
|
|
192
|
+
|
|
193
|
+
var HIT_SLOP = 8;
|
|
194
|
+
var AnimatedPressable = _reactnativereanimated2.default.createAnimatedComponent(_reactnative.Pressable);
|
|
195
|
+
var CarouselIndicator = _react.forwardRef.call(void 0, function CarouselIndicator2({
|
|
196
|
+
children,
|
|
197
|
+
style,
|
|
198
|
+
...props
|
|
199
|
+
}, ref) {
|
|
200
|
+
const {
|
|
201
|
+
indicatorStyle,
|
|
202
|
+
count
|
|
203
|
+
} = useCarousel();
|
|
204
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
205
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
|
|
206
|
+
ref,
|
|
207
|
+
...rest,
|
|
208
|
+
style: [indicatorStyle, styleProps, style],
|
|
209
|
+
children: _nullishCoalesce(children, () => Array.from({
|
|
210
|
+
length: count
|
|
211
|
+
}, (_, index) => /* @__PURE__ */_jsxruntime.jsx.call(void 0, CarouselDot, {
|
|
212
|
+
index
|
|
213
|
+
}, index)))
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
CarouselIndicator.displayName = "XAUI.Carousel.Indicator";
|
|
217
|
+
const _worklet_4647020388871_init_data = {
|
|
218
|
+
code: "function chunkGWTURY4SCjs2(){const{_chunkFTPPUTWLcjs,offset,step,count,index,width,pill,_reactnativereanimated,restColor,active}=this.__closure;const distance=Math.abs(_chunkFTPPUTWLcjs.progressFromOffset.call(void 0,offset.get(),step,count)-index);const nearness=Math.max(0,1-distance);return{width:width+(pill-width)*nearness,backgroundColor:_reactnativereanimated.interpolateColor.call(void 0,nearness,[0,1],[restColor,active])};}",
|
|
219
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-GWTURY4S.cjs",
|
|
220
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkGWTURY4SCjs2\",\"_chunkFTPPUTWLcjs\",\"offset\",\"step\",\"count\",\"index\",\"width\",\"pill\",\"_reactnativereanimated\",\"restColor\",\"active\",\"__closure\",\"distance\",\"Math\",\"abs\",\"progressFromOffset\",\"call\",\"get\",\"nearness\",\"max\",\"backgroundColor\",\"interpolateColor\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-GWTURY4S.cjs\"],\"mappings\":\"AAmKoE,SAAAA,iBAAMA,CAAA,QAAAC,iBAAA,CAAAC,MAAA,CAAAC,IAAA,CAAAC,KAAA,CAAAC,KAAA,CAAAC,KAAA,CAAAC,IAAA,CAAAC,sBAAA,CAAAC,SAAA,CAAAC,MAAA,OAAAC,SAAA,CAEtE,KAAM,CAAAC,QAAQ,CAAGC,IAAI,CAACC,GAAG,CAACb,iBAAiB,CAACc,kBAAkB,CAACC,IAAI,CAAC,IAAK,EAAC,CAAEd,MAAM,CAACe,GAAG,CAAC,CAAC,CAAEd,IAAI,CAAEC,KAAK,CAAC,CAAGC,KAAK,CAAC,CAC/G,KAAM,CAAAa,QAAQ,CAAGL,IAAI,CAACM,GAAG,CAAC,CAAC,CAAE,CAAC,CAAGP,QAAQ,CAAC,CAC1C,MAAO,CACLN,KAAK,CAAEA,KAAK,CAAG,CAACC,IAAI,CAAGD,KAAK,EAAIY,QAAQ,CACxCE,eAAe,CAAEZ,sBAAsB,CAACa,gBAAgB,CAACL,IAAI,CAAC,IAAK,EAAC,CAAEE,QAAQ,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAACT,SAAS,CAAEC,MAAM,CAAC,CAC7G,CAAC,CACH\",\"ignoreList\":[]}"
|
|
221
|
+
};
|
|
222
|
+
var CarouselDot = _react.forwardRef.call(void 0, function CarouselDot2({
|
|
223
|
+
index,
|
|
224
|
+
children,
|
|
225
|
+
style,
|
|
226
|
+
...props
|
|
227
|
+
}, ref) {
|
|
228
|
+
const {
|
|
229
|
+
dotStyle,
|
|
230
|
+
dotInk,
|
|
231
|
+
offset,
|
|
232
|
+
metrics,
|
|
233
|
+
count,
|
|
234
|
+
index: current,
|
|
235
|
+
isDisabled,
|
|
236
|
+
goTo,
|
|
237
|
+
onInteract
|
|
238
|
+
} = useCarousel();
|
|
239
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
240
|
+
const {
|
|
241
|
+
step
|
|
242
|
+
} = metrics;
|
|
243
|
+
const {
|
|
244
|
+
rest: restColor,
|
|
245
|
+
active,
|
|
246
|
+
width,
|
|
247
|
+
pill
|
|
248
|
+
} = dotInk;
|
|
249
|
+
const grow = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkGWTURY4SCjs2Factory({
|
|
250
|
+
_worklet_4647020388871_init_data,
|
|
251
|
+
_chunkFTPPUTWLcjs,
|
|
252
|
+
offset,
|
|
253
|
+
step,
|
|
254
|
+
count,
|
|
255
|
+
index,
|
|
256
|
+
width,
|
|
257
|
+
pill,
|
|
258
|
+
_reactnativereanimated,
|
|
259
|
+
restColor,
|
|
260
|
+
active
|
|
261
|
+
}) {
|
|
262
|
+
const _e = [new global.Error(), -11, -27];
|
|
263
|
+
const chunkGWTURY4SCjs2 = function () {
|
|
264
|
+
const distance = Math.abs(_chunkFTPPUTWLcjs.progressFromOffset.call(void 0, offset.get(), step, count) - index);
|
|
265
|
+
const nearness = Math.max(0, 1 - distance);
|
|
266
|
+
return {
|
|
267
|
+
width: width + (pill - width) * nearness,
|
|
268
|
+
backgroundColor: _reactnativereanimated.interpolateColor.call(void 0, nearness, [0, 1], [restColor, active])
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
chunkGWTURY4SCjs2.__closure = {
|
|
272
|
+
_chunkFTPPUTWLcjs,
|
|
273
|
+
offset,
|
|
274
|
+
step,
|
|
275
|
+
count,
|
|
276
|
+
index,
|
|
277
|
+
width,
|
|
278
|
+
pill,
|
|
279
|
+
_reactnativereanimated,
|
|
280
|
+
restColor,
|
|
281
|
+
active
|
|
282
|
+
};
|
|
283
|
+
chunkGWTURY4SCjs2.__workletHash = 4647020388871;
|
|
284
|
+
chunkGWTURY4SCjs2.__pluginVersion = "0.7.4";
|
|
285
|
+
chunkGWTURY4SCjs2.__initData = _worklet_4647020388871_init_data;
|
|
286
|
+
chunkGWTURY4SCjs2.__stackDetails = _e;
|
|
287
|
+
return chunkGWTURY4SCjs2;
|
|
288
|
+
}({
|
|
289
|
+
_worklet_4647020388871_init_data,
|
|
290
|
+
_chunkFTPPUTWLcjs,
|
|
291
|
+
offset,
|
|
292
|
+
step,
|
|
293
|
+
count,
|
|
294
|
+
index,
|
|
295
|
+
width,
|
|
296
|
+
pill,
|
|
297
|
+
_reactnativereanimated,
|
|
298
|
+
restColor,
|
|
299
|
+
active
|
|
300
|
+
}), [offset, step, count, index, width, pill, restColor, active]);
|
|
301
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, AnimatedPressable, {
|
|
302
|
+
ref,
|
|
303
|
+
accessibilityRole: "button",
|
|
304
|
+
accessibilityState: {
|
|
305
|
+
selected: index === current,
|
|
306
|
+
disabled: isDisabled
|
|
307
|
+
},
|
|
308
|
+
accessibilityValue: {
|
|
309
|
+
now: index + 1,
|
|
310
|
+
min: 1,
|
|
311
|
+
max: count
|
|
312
|
+
},
|
|
313
|
+
disabled: isDisabled,
|
|
314
|
+
hitSlop: HIT_SLOP,
|
|
315
|
+
...rest,
|
|
316
|
+
style: [dotStyle, grow, styleProps, style],
|
|
317
|
+
onPress: () => {
|
|
318
|
+
onInteract();
|
|
319
|
+
goTo(index);
|
|
320
|
+
},
|
|
321
|
+
children
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
CarouselDot.displayName = "XAUI.Carousel.Dot";
|
|
325
|
+
|
|
326
|
+
// src/components/carousel/carousel-item.tsx
|
|
327
|
+
|
|
328
|
+
var CarouselItem = _react.forwardRef.call(void 0, function CarouselItem2({
|
|
329
|
+
children,
|
|
330
|
+
style,
|
|
331
|
+
...props
|
|
332
|
+
}, ref) {
|
|
333
|
+
const {
|
|
334
|
+
itemStyle,
|
|
335
|
+
metrics
|
|
336
|
+
} = useCarousel();
|
|
337
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
338
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
|
|
339
|
+
ref,
|
|
340
|
+
...rest,
|
|
341
|
+
style: [itemStyle, {
|
|
342
|
+
width: metrics.itemWidth
|
|
343
|
+
}, styleProps, style],
|
|
344
|
+
children
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
CarouselItem.displayName = "XAUI.Carousel.Item";
|
|
348
|
+
|
|
349
|
+
// src/components/carousel/carousel-control.tsx
|
|
350
|
+
|
|
351
|
+
// src/components/carousel/carousel.style.ts
|
|
352
|
+
|
|
353
|
+
var QUARTER = _reactnative.I18nManager.isRTL ? "-45deg" : "45deg";
|
|
354
|
+
var carouselSheet = _reactnative.StyleSheet.create({
|
|
355
|
+
/** Towards the end of the series — pointing right in a left-to-right layout. */
|
|
356
|
+
chevronForward: {
|
|
357
|
+
borderStartWidth: 0,
|
|
358
|
+
borderBottomWidth: 0,
|
|
359
|
+
transform: [{
|
|
360
|
+
rotate: QUARTER
|
|
361
|
+
}]
|
|
362
|
+
},
|
|
363
|
+
/** And back the other way. */
|
|
364
|
+
chevronBack: {
|
|
365
|
+
borderEndWidth: 0,
|
|
366
|
+
borderTopWidth: 0,
|
|
367
|
+
transform: [{
|
|
368
|
+
rotate: QUARTER
|
|
369
|
+
}]
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
// src/components/carousel/carousel-control.tsx
|
|
374
|
+
|
|
375
|
+
function control({
|
|
376
|
+
delta,
|
|
377
|
+
displayName,
|
|
378
|
+
edge,
|
|
379
|
+
turn
|
|
380
|
+
}) {
|
|
381
|
+
const Component = _react.forwardRef.call(void 0, function CarouselControl({
|
|
382
|
+
children,
|
|
383
|
+
asChild = false,
|
|
384
|
+
style,
|
|
385
|
+
onPressIn,
|
|
386
|
+
onPressOut,
|
|
387
|
+
...props
|
|
388
|
+
}, ref) {
|
|
389
|
+
const {
|
|
390
|
+
controlStyle,
|
|
391
|
+
controlInactiveStyle,
|
|
392
|
+
chevronStyle,
|
|
393
|
+
controlBox,
|
|
394
|
+
trackHeight,
|
|
395
|
+
index,
|
|
396
|
+
count,
|
|
397
|
+
hasLoop,
|
|
398
|
+
isDisabled,
|
|
399
|
+
moveBy,
|
|
400
|
+
onInteract
|
|
401
|
+
} = useCarousel();
|
|
402
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
403
|
+
const [isPressed, press] = _chunk7DPL3ZDScjs.usePressState.call(void 0, {
|
|
404
|
+
onPressIn,
|
|
405
|
+
onPressOut
|
|
406
|
+
});
|
|
407
|
+
if (!asChild && !rest.accessibilityLabel && !rest["aria-label"]) {
|
|
408
|
+
_chunkEJQCQPETcjs.warnDev.call(void 0, `${displayName}: a carousel arrow needs an \`accessibilityLabel\` \u2014 a chevron is not text, and there is nothing beside it that names the action.`);
|
|
409
|
+
}
|
|
410
|
+
const atEnd = delta > 0 ? index >= count - 1 : index <= 0;
|
|
411
|
+
const isInactive = isDisabled || !hasLoop && atEnd;
|
|
412
|
+
const place = {
|
|
413
|
+
// Half a button above the track's middle. Zero until the track has been measured,
|
|
414
|
+
// which puts the arrow at the top for one frame and nowhere wrong after it.
|
|
415
|
+
top: Math.max(0, (trackHeight - controlBox.size) / 2),
|
|
416
|
+
[edge]: controlBox.inset
|
|
417
|
+
};
|
|
418
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkHBYT7B47cjs.PressableFeedback, {
|
|
419
|
+
ref,
|
|
420
|
+
isPressed,
|
|
421
|
+
asChild,
|
|
422
|
+
accessibilityRole: "button",
|
|
423
|
+
accessibilityState: {
|
|
424
|
+
disabled: isInactive
|
|
425
|
+
},
|
|
426
|
+
isDisabled: isInactive,
|
|
427
|
+
...rest,
|
|
428
|
+
style: [controlStyle, isInactive ? controlInactiveStyle : null, place, styleProps, typeof style === "function" ? style({
|
|
429
|
+
pressed: isPressed
|
|
430
|
+
}) : style],
|
|
431
|
+
onPress: () => {
|
|
432
|
+
onInteract();
|
|
433
|
+
moveBy(delta);
|
|
434
|
+
},
|
|
435
|
+
onPressIn: press.onPressIn,
|
|
436
|
+
onPressOut: press.onPressOut,
|
|
437
|
+
children: _nullishCoalesce(children, () => (/* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
|
|
438
|
+
style: [chevronStyle, carouselSheet[turn]]
|
|
439
|
+
})))
|
|
440
|
+
});
|
|
441
|
+
});
|
|
442
|
+
Component.displayName = displayName;
|
|
443
|
+
return Component;
|
|
444
|
+
}
|
|
445
|
+
var CarouselPrevious = control({
|
|
446
|
+
delta: -1,
|
|
447
|
+
displayName: "XAUI.Carousel.Previous",
|
|
448
|
+
edge: "start",
|
|
449
|
+
turn: "chevronBack"
|
|
450
|
+
});
|
|
451
|
+
var CarouselNext = control({
|
|
452
|
+
delta: 1,
|
|
453
|
+
displayName: "XAUI.Carousel.Next",
|
|
454
|
+
edge: "end",
|
|
455
|
+
turn: "chevronForward"
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
// src/components/carousel/carousel.tsx
|
|
459
|
+
|
|
460
|
+
// src/components/carousel/carousel.recipe.ts
|
|
461
|
+
var SLOTS = ["root", "content", "item", "control", "controlInactive", "chevron", "indicator", "dot", "dotActive", "counter", "thumbnails", "thumbnail", "thumbnailActive"];
|
|
462
|
+
var VARIANT_TOKENS = {
|
|
463
|
+
// The arrows sit **on** the slide, so their ground is the raised one rather than the
|
|
464
|
+
// page's: a control the same colour as the page vanishes over a pale photograph.
|
|
465
|
+
primary: {
|
|
466
|
+
bg: "surface",
|
|
467
|
+
fg: "foreground",
|
|
468
|
+
bgSelected: "accent",
|
|
469
|
+
fgSelected: "foreground"
|
|
470
|
+
},
|
|
471
|
+
secondary: {
|
|
472
|
+
bg: "default",
|
|
473
|
+
fg: "defaultForeground",
|
|
474
|
+
bgSelected: "defaultForeground",
|
|
475
|
+
fgSelected: "defaultForeground"
|
|
476
|
+
},
|
|
477
|
+
tertiary: {
|
|
478
|
+
bg: "surface",
|
|
479
|
+
fg: "foreground",
|
|
480
|
+
border: "border",
|
|
481
|
+
bgSelected: "foreground",
|
|
482
|
+
fgSelected: "foreground"
|
|
483
|
+
},
|
|
484
|
+
// No ground at all: the chevron is drawn straight on the slide, which is what a carousel
|
|
485
|
+
// over a dark photograph wants and what a carousel over a white one must not use.
|
|
486
|
+
ghost: {
|
|
487
|
+
fg: "foreground",
|
|
488
|
+
bgSelected: "accent",
|
|
489
|
+
fgSelected: "foreground"
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
var SIZES = {
|
|
493
|
+
xs: {
|
|
494
|
+
control: 24,
|
|
495
|
+
chevron: 6,
|
|
496
|
+
stroke: 1.5,
|
|
497
|
+
dot: 5,
|
|
498
|
+
pill: 14,
|
|
499
|
+
gap: 1.5,
|
|
500
|
+
thumbnail: 40,
|
|
501
|
+
counter: "xs"
|
|
502
|
+
},
|
|
503
|
+
sm: {
|
|
504
|
+
control: 30,
|
|
505
|
+
chevron: 7,
|
|
506
|
+
stroke: 1.5,
|
|
507
|
+
dot: 6,
|
|
508
|
+
pill: 18,
|
|
509
|
+
gap: 2,
|
|
510
|
+
thumbnail: 48,
|
|
511
|
+
counter: "xs"
|
|
512
|
+
},
|
|
513
|
+
md: {
|
|
514
|
+
control: 36,
|
|
515
|
+
chevron: 8,
|
|
516
|
+
stroke: 2,
|
|
517
|
+
dot: 7,
|
|
518
|
+
pill: 22,
|
|
519
|
+
gap: 2.5,
|
|
520
|
+
thumbnail: 60,
|
|
521
|
+
counter: "sm"
|
|
522
|
+
},
|
|
523
|
+
lg: {
|
|
524
|
+
control: 44,
|
|
525
|
+
chevron: 10,
|
|
526
|
+
stroke: 2,
|
|
527
|
+
dot: 8,
|
|
528
|
+
pill: 26,
|
|
529
|
+
gap: 3,
|
|
530
|
+
thumbnail: 72,
|
|
531
|
+
counter: "md"
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
function carouselGap(theme, size) {
|
|
535
|
+
return theme.spacing(SIZES[size].gap);
|
|
536
|
+
}
|
|
537
|
+
function carouselControlBox(theme, size) {
|
|
538
|
+
return {
|
|
539
|
+
size: SIZES[size].control,
|
|
540
|
+
inset: theme.spacing(2)
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
function sizeAxis(step) {
|
|
544
|
+
const {
|
|
545
|
+
control: control2,
|
|
546
|
+
chevron,
|
|
547
|
+
stroke,
|
|
548
|
+
dot,
|
|
549
|
+
pill,
|
|
550
|
+
gap,
|
|
551
|
+
thumbnail,
|
|
552
|
+
counter
|
|
553
|
+
} = step;
|
|
554
|
+
return theme => ({
|
|
555
|
+
control: {
|
|
556
|
+
width: control2,
|
|
557
|
+
height: control2,
|
|
558
|
+
borderRadius: control2 / 2
|
|
559
|
+
},
|
|
560
|
+
chevron: {
|
|
561
|
+
width: chevron,
|
|
562
|
+
height: chevron,
|
|
563
|
+
borderWidth: stroke
|
|
564
|
+
},
|
|
565
|
+
indicator: {
|
|
566
|
+
gap: theme.spacing(gap) * 0.5,
|
|
567
|
+
height: dot
|
|
568
|
+
},
|
|
569
|
+
dot: {
|
|
570
|
+
width: dot,
|
|
571
|
+
height: dot,
|
|
572
|
+
borderRadius: dot / 2
|
|
573
|
+
},
|
|
574
|
+
/**
|
|
575
|
+
* The chosen dot, **read as values and never applied as a style**: the width and the
|
|
576
|
+
* colour are interpolated on the UI thread, and a worklet cannot read a `StyleSheet`
|
|
577
|
+
* id. The root flattens this slot into `dotInk`, so the recipe still owns both numbers.
|
|
578
|
+
*
|
|
579
|
+
* A pill, not a wider dot: the corner stays the dot's own, so the shape grows sideways
|
|
580
|
+
* out of the circle it was rather than turning into a different one.
|
|
581
|
+
*/
|
|
582
|
+
dotActive: {
|
|
583
|
+
width: pill,
|
|
584
|
+
height: dot,
|
|
585
|
+
borderRadius: dot / 2
|
|
586
|
+
},
|
|
587
|
+
thumbnails: {
|
|
588
|
+
gap: theme.spacing(gap) * 0.75
|
|
589
|
+
},
|
|
590
|
+
thumbnail: {
|
|
591
|
+
width: thumbnail,
|
|
592
|
+
height: thumbnail
|
|
593
|
+
},
|
|
594
|
+
thumbnailActive: {
|
|
595
|
+
width: thumbnail,
|
|
596
|
+
height: thumbnail
|
|
597
|
+
},
|
|
598
|
+
counter: {
|
|
599
|
+
fontSize: theme.fontSizes[counter],
|
|
600
|
+
lineHeight: theme.lineHeights[counter]
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
var carouselRecipe = _chunkSL3V7R2Ycjs.createRecipe.call(void 0, {
|
|
605
|
+
slots: SLOTS,
|
|
606
|
+
base: theme => ({
|
|
607
|
+
root: {
|
|
608
|
+
flexDirection: "column",
|
|
609
|
+
gap: theme.spacing(2),
|
|
610
|
+
position: "relative"
|
|
611
|
+
},
|
|
612
|
+
content: {
|
|
613
|
+
flexGrow: 0
|
|
614
|
+
},
|
|
615
|
+
item: {
|
|
616
|
+
borderCurve: "continuous",
|
|
617
|
+
overflow: "hidden",
|
|
618
|
+
// A slide is exactly as wide as `carouselMetrics` said and never less. In a row it
|
|
619
|
+
// is a flex item, and a flex item with a width still *shrinks* to fit its container
|
|
620
|
+
// — so five slides in a track one slide wide would each squeeze down to a fifth, the
|
|
621
|
+
// content would stop overflowing, and a carousel with nowhere to scroll to would sit
|
|
622
|
+
// there showing all five at once and ignoring its own arrows.
|
|
623
|
+
flexShrink: 0
|
|
624
|
+
},
|
|
625
|
+
/**
|
|
626
|
+
* An arrow at the end of a series that does not loop. It stays in place and stays
|
|
627
|
+
* legible — a control that disappears at the last slide takes its width with it and
|
|
628
|
+
* shifts everything beside it.
|
|
629
|
+
*
|
|
630
|
+
* A slot rather than a state, because the engine's states are a fixed set and this is
|
|
631
|
+
* not one of them: the carousel is not disabled, one of its two arrows is.
|
|
632
|
+
*/
|
|
633
|
+
controlInactive: {
|
|
634
|
+
opacity: theme.opacity.disabled
|
|
635
|
+
},
|
|
636
|
+
control: {
|
|
637
|
+
// Over the slides rather than beside them: an arrow in the flow would move the track
|
|
638
|
+
// it belongs to, and the two would disagree about where the middle is.
|
|
639
|
+
position: "absolute",
|
|
640
|
+
alignItems: "center",
|
|
641
|
+
justifyContent: "center",
|
|
642
|
+
borderCurve: "continuous",
|
|
643
|
+
...theme.shadows.surface
|
|
644
|
+
},
|
|
645
|
+
// The box and the stroke only. Which two of the four edges are actually drawn is
|
|
646
|
+
// `carousel.style.ts`'s — it is geometry, and it differs between the two arrows.
|
|
647
|
+
chevron: {},
|
|
648
|
+
indicator: {
|
|
649
|
+
flexDirection: "row",
|
|
650
|
+
alignItems: "center",
|
|
651
|
+
justifyContent: "center"
|
|
652
|
+
},
|
|
653
|
+
// A neutral fill rather than a faint version of the active one: the dots sit under
|
|
654
|
+
// the slides, on the page, and a pale tint of the accent there reads as a control that
|
|
655
|
+
// has half failed to load. `color` reaches the pill, which is the thing it should move.
|
|
656
|
+
dot: {
|
|
657
|
+
backgroundColor: theme.colors.default
|
|
658
|
+
},
|
|
659
|
+
counter: {
|
|
660
|
+
fontFamily: theme.fontFamilies.body,
|
|
661
|
+
color: theme.colors.muted
|
|
662
|
+
},
|
|
663
|
+
thumbnails: {
|
|
664
|
+
flexGrow: 0,
|
|
665
|
+
flexDirection: "row"
|
|
666
|
+
},
|
|
667
|
+
thumbnail: {
|
|
668
|
+
borderCurve: "continuous",
|
|
669
|
+
overflow: "hidden",
|
|
670
|
+
// The strip is a row too, and the same squeeze applies to it.
|
|
671
|
+
flexShrink: 0,
|
|
672
|
+
// The ring is always there and only its colour moves, so choosing a thumbnail does
|
|
673
|
+
// not resize it — a border that appears on selection nudges every thumbnail after it.
|
|
674
|
+
borderWidth: theme.borderWidth.field,
|
|
675
|
+
borderColor: "transparent"
|
|
676
|
+
},
|
|
677
|
+
thumbnailActive: {
|
|
678
|
+
borderCurve: "continuous",
|
|
679
|
+
overflow: "hidden",
|
|
680
|
+
flexShrink: 0,
|
|
681
|
+
borderWidth: theme.borderWidth.field
|
|
682
|
+
}
|
|
683
|
+
}),
|
|
684
|
+
variantTokens: VARIANT_TOKENS,
|
|
685
|
+
paint: (theme, colors) => ({
|
|
686
|
+
control: {
|
|
687
|
+
backgroundColor: colors.bg,
|
|
688
|
+
borderColor: colors.border,
|
|
689
|
+
borderWidth: colors.border ? theme.borderWidth.default : 0
|
|
690
|
+
},
|
|
691
|
+
chevron: {
|
|
692
|
+
borderColor: colors.fg
|
|
693
|
+
},
|
|
694
|
+
dotActive: {
|
|
695
|
+
backgroundColor: colors.bgSelected
|
|
696
|
+
},
|
|
697
|
+
thumbnailActive: {
|
|
698
|
+
borderColor: colors.bgSelected
|
|
699
|
+
}
|
|
700
|
+
}),
|
|
701
|
+
variants: {
|
|
702
|
+
size: {
|
|
703
|
+
xs: sizeAxis(SIZES.xs),
|
|
704
|
+
sm: sizeAxis(SIZES.sm),
|
|
705
|
+
md: sizeAxis(SIZES.md),
|
|
706
|
+
lg: sizeAxis(SIZES.lg)
|
|
707
|
+
},
|
|
708
|
+
/** The slides' corner, and the thumbnails'. The arrows stay round. */
|
|
709
|
+
radius: _chunkSL3V7R2Ycjs.radiusAxis.call(void 0, "item", "thumbnail", "thumbnailActive")
|
|
710
|
+
},
|
|
711
|
+
states: {
|
|
712
|
+
disabled: theme => ({
|
|
713
|
+
root: {
|
|
714
|
+
opacity: theme.opacity.disabled
|
|
715
|
+
}
|
|
716
|
+
})
|
|
717
|
+
},
|
|
718
|
+
defaultVariants: {
|
|
719
|
+
variant: "primary",
|
|
720
|
+
size: "md",
|
|
721
|
+
radius: "2xl"
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
// src/components/carousel/carousel.tsx
|
|
726
|
+
|
|
727
|
+
function setTrackOffset(track, x) {
|
|
728
|
+
_optionalChain([track, 'access', _3 => _3.current, 'optionalAccess', _4 => _4.scrollTo, 'call', _5 => _5({
|
|
729
|
+
x,
|
|
730
|
+
y: 0,
|
|
731
|
+
animated: false
|
|
732
|
+
})]);
|
|
733
|
+
}
|
|
734
|
+
var GLIDE_MS = 420;
|
|
735
|
+
var GLIDE_FRAME_MS = 16;
|
|
736
|
+
function easeOutCubic(t) {
|
|
737
|
+
return 1 - (1 - t) ** 3;
|
|
738
|
+
}
|
|
739
|
+
var CarouselRoot = _react.forwardRef.call(void 0, function Carousel({
|
|
740
|
+
children,
|
|
741
|
+
variant,
|
|
742
|
+
size = "md",
|
|
743
|
+
color,
|
|
744
|
+
radius,
|
|
745
|
+
index: indexProp,
|
|
746
|
+
defaultIndex = 0,
|
|
747
|
+
onIndexChange,
|
|
748
|
+
itemsPerView = 1,
|
|
749
|
+
peek = 0,
|
|
750
|
+
gap,
|
|
751
|
+
hasLoop = false,
|
|
752
|
+
autoPlayInterval,
|
|
753
|
+
isDisabled = false,
|
|
754
|
+
asChild = false,
|
|
755
|
+
style,
|
|
756
|
+
onLayout,
|
|
757
|
+
...props
|
|
758
|
+
}, ref) {
|
|
759
|
+
const theme = _chunkIIAQISBGcjs.useXAUITheme.call(void 0);
|
|
760
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
761
|
+
const [index, setIndex] = _chunk7EIHHOHPcjs.useControllableState.call(void 0, {
|
|
762
|
+
value: indexProp,
|
|
763
|
+
defaultValue: defaultIndex,
|
|
764
|
+
onChange: onIndexChange
|
|
765
|
+
});
|
|
766
|
+
const [width, setWidth] = _react.useState.call(void 0, 0);
|
|
767
|
+
const [trackHeight, setTrackHeight] = _react.useState.call(void 0, 0);
|
|
768
|
+
const [count, setCount] = _react.useState.call(void 0, 0);
|
|
769
|
+
const hasInteracted = _react.useRef.call(void 0, false);
|
|
770
|
+
const trackRef = _reactnativereanimated.useAnimatedRef.call(void 0);
|
|
771
|
+
const offset = _reactnativereanimated.useSharedValue.call(void 0, 0);
|
|
772
|
+
const glideTimer = _react.useRef.call(void 0, null);
|
|
773
|
+
const selection = {
|
|
774
|
+
variant,
|
|
775
|
+
size,
|
|
776
|
+
radius
|
|
777
|
+
};
|
|
778
|
+
const styles = carouselRecipe.resolve({
|
|
779
|
+
theme,
|
|
780
|
+
selection,
|
|
781
|
+
states: {
|
|
782
|
+
disabled: isDisabled
|
|
783
|
+
}
|
|
784
|
+
});
|
|
785
|
+
const tint = color ? carouselRecipe.tint({
|
|
786
|
+
theme,
|
|
787
|
+
color,
|
|
788
|
+
selection
|
|
789
|
+
}) : void 0;
|
|
790
|
+
const dotInk = _react.useMemo.call(void 0, () => {
|
|
791
|
+
const at = _reactnative.StyleSheet.flatten([styles.dot]);
|
|
792
|
+
const on = _reactnative.StyleSheet.flatten([styles.dotActive, _optionalChain([tint, 'optionalAccess', _6 => _6.dotActive])]);
|
|
793
|
+
return {
|
|
794
|
+
rest: typeof at.backgroundColor === "string" ? at.backgroundColor : theme.colors.default,
|
|
795
|
+
active: typeof on.backgroundColor === "string" ? on.backgroundColor : theme.colors.accent,
|
|
796
|
+
width: typeof at.width === "number" ? at.width : 0,
|
|
797
|
+
pill: typeof on.width === "number" ? on.width : 0
|
|
798
|
+
};
|
|
799
|
+
}, [styles, tint, theme]);
|
|
800
|
+
const resolvedGap = _nullishCoalesce(gap, () => carouselGap(theme, size));
|
|
801
|
+
const controlBox = _react.useMemo.call(void 0, () => carouselControlBox(theme, size), [theme, size]);
|
|
802
|
+
const metrics = _react.useMemo.call(void 0, () => _chunkFTPPUTWLcjs.carouselMetrics.call(void 0, {
|
|
803
|
+
width,
|
|
804
|
+
itemsPerView,
|
|
805
|
+
gap: resolvedGap,
|
|
806
|
+
peek
|
|
807
|
+
}), [width, itemsPerView, resolvedGap, peek]);
|
|
808
|
+
const handleLayout = event => {
|
|
809
|
+
_optionalChain([onLayout, 'optionalCall', _7 => _7(event)]);
|
|
810
|
+
setWidth(event.nativeEvent.layout.width);
|
|
811
|
+
};
|
|
812
|
+
const stopGlide = _react.useCallback.call(void 0, () => {
|
|
813
|
+
if (glideTimer.current !== null) {
|
|
814
|
+
clearInterval(glideTimer.current);
|
|
815
|
+
glideTimer.current = null;
|
|
816
|
+
}
|
|
817
|
+
}, []);
|
|
818
|
+
const glideTo = _react.useCallback.call(void 0, x => {
|
|
819
|
+
stopGlide();
|
|
820
|
+
const from = offset.get();
|
|
821
|
+
const distance = x - from;
|
|
822
|
+
if (Math.abs(distance) < 1) {
|
|
823
|
+
setTrackOffset(trackRef, x);
|
|
824
|
+
return;
|
|
825
|
+
}
|
|
826
|
+
const start = Date.now();
|
|
827
|
+
glideTimer.current = setInterval(() => {
|
|
828
|
+
const t = Math.min(1, (Date.now() - start) / GLIDE_MS);
|
|
829
|
+
setTrackOffset(trackRef, from + distance * easeOutCubic(t));
|
|
830
|
+
if (t >= 1) stopGlide();
|
|
831
|
+
}, GLIDE_FRAME_MS);
|
|
832
|
+
}, [offset, stopGlide, trackRef]);
|
|
833
|
+
const goTo = _react.useCallback.call(void 0, next => {
|
|
834
|
+
glideTo(next * metrics.step);
|
|
835
|
+
setIndex(next);
|
|
836
|
+
}, [glideTo, metrics.step, setIndex]);
|
|
837
|
+
const moveBy = _react.useCallback.call(void 0, delta => goTo(_chunkFTPPUTWLcjs.stepIndex.call(void 0, index, delta, count, hasLoop)), [count, goTo, hasLoop, index]);
|
|
838
|
+
const onInteract = _react.useCallback.call(void 0, () => {
|
|
839
|
+
hasInteracted.current = true;
|
|
840
|
+
stopGlide();
|
|
841
|
+
}, [stopGlide]);
|
|
842
|
+
_react.useEffect.call(void 0, () => stopGlide, [stopGlide]);
|
|
843
|
+
_react.useEffect.call(void 0, () => {
|
|
844
|
+
if (!autoPlayInterval || isDisabled || count < 2) return;
|
|
845
|
+
const timer = setInterval(() => {
|
|
846
|
+
if (hasInteracted.current) {
|
|
847
|
+
clearInterval(timer);
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
850
|
+
setIndex(current => {
|
|
851
|
+
const next = _chunkFTPPUTWLcjs.stepIndex.call(void 0, current, 1, count, true);
|
|
852
|
+
glideTo(next * metrics.step);
|
|
853
|
+
return next;
|
|
854
|
+
});
|
|
855
|
+
}, autoPlayInterval);
|
|
856
|
+
return () => clearInterval(timer);
|
|
857
|
+
}, [autoPlayInterval, count, isDisabled, glideTo, metrics.step, setIndex]);
|
|
858
|
+
const context = _react.useMemo.call(void 0, () => ({
|
|
859
|
+
contentStyle: styles.content,
|
|
860
|
+
itemStyle: styles.item,
|
|
861
|
+
controlStyle: [styles.control, _optionalChain([tint, 'optionalAccess', _8 => _8.control])],
|
|
862
|
+
controlInactiveStyle: [styles.control, _optionalChain([tint, 'optionalAccess', _9 => _9.control]), styles.controlInactive],
|
|
863
|
+
chevronStyle: [styles.chevron, _optionalChain([tint, 'optionalAccess', _10 => _10.chevron])],
|
|
864
|
+
indicatorStyle: styles.indicator,
|
|
865
|
+
dotStyle: styles.dot,
|
|
866
|
+
dotInk,
|
|
867
|
+
counterStyle: styles.counter,
|
|
868
|
+
thumbnailsStyle: styles.thumbnails,
|
|
869
|
+
thumbnailStyle: styles.thumbnail,
|
|
870
|
+
thumbnailActiveStyle: [styles.thumbnailActive, _optionalChain([tint, 'optionalAccess', _11 => _11.thumbnailActive])],
|
|
871
|
+
index,
|
|
872
|
+
count,
|
|
873
|
+
setCount,
|
|
874
|
+
metrics,
|
|
875
|
+
width,
|
|
876
|
+
trackHeight,
|
|
877
|
+
setTrackHeight,
|
|
878
|
+
controlBox,
|
|
879
|
+
hasLoop,
|
|
880
|
+
isDisabled,
|
|
881
|
+
offset,
|
|
882
|
+
trackRef,
|
|
883
|
+
goTo,
|
|
884
|
+
moveBy,
|
|
885
|
+
onInteract,
|
|
886
|
+
onSettle: setIndex
|
|
887
|
+
}), [styles, tint, dotInk, index, count, metrics, width, trackHeight, setTrackHeight, controlBox, hasLoop, isDisabled, offset, goTo, moveBy, onInteract, setIndex]);
|
|
888
|
+
const rootStyle = [styles.root, styleProps, style];
|
|
889
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, CarouselProvider, {
|
|
890
|
+
value: context,
|
|
891
|
+
children: asChild ? /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkCDRGTUYFcjs.Slot, {
|
|
892
|
+
ref,
|
|
893
|
+
...rest,
|
|
894
|
+
onLayout: handleLayout,
|
|
895
|
+
style: rootStyle,
|
|
896
|
+
children
|
|
897
|
+
}) : /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
|
|
898
|
+
ref,
|
|
899
|
+
...rest,
|
|
900
|
+
onLayout: handleLayout,
|
|
901
|
+
style: rootStyle,
|
|
902
|
+
children
|
|
903
|
+
})
|
|
904
|
+
});
|
|
905
|
+
});
|
|
906
|
+
CarouselRoot.displayName = "XAUI.Carousel.Root";
|
|
907
|
+
|
|
908
|
+
// src/components/carousel/carousel-thumbnails.tsx
|
|
909
|
+
|
|
910
|
+
var CarouselThumbnails = _react.forwardRef.call(void 0, function CarouselThumbnails2({
|
|
911
|
+
children,
|
|
912
|
+
style,
|
|
913
|
+
...props
|
|
914
|
+
}, ref) {
|
|
915
|
+
const {
|
|
916
|
+
thumbnailsStyle
|
|
917
|
+
} = useCarousel();
|
|
918
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
919
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.ScrollView, {
|
|
920
|
+
ref,
|
|
921
|
+
horizontal: true,
|
|
922
|
+
showsHorizontalScrollIndicator: false,
|
|
923
|
+
...rest,
|
|
924
|
+
style: [thumbnailsStyle, styleProps, style],
|
|
925
|
+
contentContainerStyle: CONTENT,
|
|
926
|
+
children
|
|
927
|
+
});
|
|
928
|
+
});
|
|
929
|
+
CarouselThumbnails.displayName = "XAUI.Carousel.Thumbnails";
|
|
930
|
+
var CONTENT = {
|
|
931
|
+
flexDirection: "row",
|
|
932
|
+
gap: 8
|
|
933
|
+
};
|
|
934
|
+
var CarouselThumbnail = _react.forwardRef.call(void 0, function CarouselThumbnail2({
|
|
935
|
+
index,
|
|
936
|
+
children,
|
|
937
|
+
style,
|
|
938
|
+
...props
|
|
939
|
+
}, ref) {
|
|
940
|
+
const {
|
|
941
|
+
thumbnailStyle,
|
|
942
|
+
thumbnailActiveStyle,
|
|
943
|
+
index: current,
|
|
944
|
+
count,
|
|
945
|
+
isDisabled,
|
|
946
|
+
goTo,
|
|
947
|
+
onInteract
|
|
948
|
+
} = useCarousel();
|
|
949
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
950
|
+
const isActive = index === current;
|
|
951
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Pressable, {
|
|
952
|
+
ref,
|
|
953
|
+
accessibilityRole: "button",
|
|
954
|
+
accessibilityState: {
|
|
955
|
+
selected: isActive,
|
|
956
|
+
disabled: isDisabled
|
|
957
|
+
},
|
|
958
|
+
accessibilityValue: {
|
|
959
|
+
now: index + 1,
|
|
960
|
+
min: 1,
|
|
961
|
+
max: count
|
|
962
|
+
},
|
|
963
|
+
disabled: isDisabled,
|
|
964
|
+
...rest,
|
|
965
|
+
style: [isActive ? thumbnailActiveStyle : thumbnailStyle, styleProps, style],
|
|
966
|
+
onPress: () => {
|
|
967
|
+
onInteract();
|
|
968
|
+
goTo(index);
|
|
969
|
+
},
|
|
970
|
+
children
|
|
971
|
+
});
|
|
972
|
+
});
|
|
973
|
+
CarouselThumbnail.displayName = "XAUI.Carousel.Thumbnail";
|
|
974
|
+
|
|
975
|
+
// src/components/carousel/index.ts
|
|
976
|
+
var Carousel2 = Object.assign(CarouselRoot, {
|
|
977
|
+
Content: CarouselContent,
|
|
978
|
+
Item: CarouselItem,
|
|
979
|
+
Previous: CarouselPrevious,
|
|
980
|
+
Next: CarouselNext,
|
|
981
|
+
Indicator: CarouselIndicator,
|
|
982
|
+
Dot: CarouselDot,
|
|
983
|
+
Counter: CarouselCounter,
|
|
984
|
+
Thumbnails: CarouselThumbnails,
|
|
985
|
+
Thumbnail: CarouselThumbnail
|
|
986
|
+
});
|
|
987
|
+
exports.useCarousel = useCarousel;
|
|
988
|
+
exports.CarouselContent = CarouselContent;
|
|
989
|
+
exports.CarouselCounter = CarouselCounter;
|
|
990
|
+
exports.CarouselIndicator = CarouselIndicator;
|
|
991
|
+
exports.CarouselDot = CarouselDot;
|
|
992
|
+
exports.CarouselItem = CarouselItem;
|
|
993
|
+
exports.CarouselPrevious = CarouselPrevious;
|
|
994
|
+
exports.CarouselNext = CarouselNext;
|
|
995
|
+
exports.carouselRecipe = carouselRecipe;
|
|
996
|
+
exports.CarouselRoot = CarouselRoot;
|
|
997
|
+
exports.CarouselThumbnails = CarouselThumbnails;
|
|
998
|
+
exports.CarouselThumbnail = CarouselThumbnail;
|
|
999
|
+
exports.Carousel = Carousel2;
|