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