@xaui/native 0.9.1-beta.96 → 0.9.1-beta.98
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-C6JO2RTV.cjs +752 -0
- package/dist/chunk-SVS726BW.js +822 -0
- package/dist/{chunk-QT7KLGO3.js → chunk-V5FYHQKQ.js} +102 -87
- package/dist/{chunk-SIOSYITD.cjs → chunk-ZBFBF7S4.cjs} +60 -45
- package/dist/components/agenda-calendar/agenda-calendar-today-button.d.cts +4 -0
- package/dist/components/agenda-calendar/agenda-calendar-today-button.d.ts +4 -0
- package/dist/components/agenda-calendar/agenda-calendar.recipe.d.cts +1 -1
- package/dist/components/agenda-calendar/agenda-calendar.recipe.d.ts +1 -1
- package/dist/components/agenda-calendar/agenda-calendar.type.d.cts +4 -1
- package/dist/components/agenda-calendar/agenda-calendar.type.d.ts +4 -1
- package/dist/components/agenda-calendar/index.cjs +2 -2
- package/dist/components/agenda-calendar/index.js +1 -1
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/phone-number-field/index.cjs +16 -9
- package/dist/components/phone-number-field/index.js +9 -2
- package/dist/components/slide-button/index.cjs +30 -0
- package/dist/components/slide-button/index.d.cts +44 -0
- package/dist/components/slide-button/index.d.ts +44 -0
- package/dist/components/slide-button/index.js +30 -0
- package/dist/components/slide-button/slide-button-fill.d.cts +29 -0
- package/dist/components/slide-button/slide-button-fill.d.ts +29 -0
- package/dist/components/slide-button/slide-button-icon.d.cts +10 -0
- package/dist/components/slide-button/slide-button-icon.d.ts +10 -0
- package/dist/components/slide-button/slide-button-label.d.cts +20 -0
- package/dist/components/slide-button/slide-button-label.d.ts +20 -0
- package/dist/components/slide-button/slide-button-thumb.d.cts +20 -0
- package/dist/components/slide-button/slide-button-thumb.d.ts +20 -0
- package/dist/components/slide-button/slide-button.animation.d.cts +33 -0
- package/dist/components/slide-button/slide-button.animation.d.ts +33 -0
- package/dist/components/slide-button/slide-button.context.d.cts +7 -0
- package/dist/components/slide-button/slide-button.context.d.ts +7 -0
- package/dist/components/slide-button/slide-button.d.cts +56 -0
- package/dist/components/slide-button/slide-button.d.ts +56 -0
- package/dist/components/slide-button/slide-button.recipe.d.cts +31 -0
- package/dist/components/slide-button/slide-button.recipe.d.ts +31 -0
- package/dist/components/slide-button/slide-button.type.d.cts +79 -0
- package/dist/components/slide-button/slide-button.type.d.ts +79 -0
- package/dist/index.cjs +31 -13
- package/dist/index.js +35 -17
- package/package.json +11 -1
|
@@ -295,14 +295,30 @@ import { StyleSheet as StyleSheet2, View as View5 } from "react-native";
|
|
|
295
295
|
// src/components/agenda-calendar/agenda-calendar.recipe.ts
|
|
296
296
|
var SLOTS = ["root", "header", "nav", "navButton", "today", "todayDisabled", "todayLabel", "week", "picker", "pickerItem"];
|
|
297
297
|
var VARIANT_TOKENS = {
|
|
298
|
-
//
|
|
299
|
-
//
|
|
300
|
-
//
|
|
301
|
-
//
|
|
302
|
-
//
|
|
303
|
-
|
|
304
|
-
|
|
298
|
+
// The four the `Calendar` declares, answered on the pill rather than on a disc. The
|
|
299
|
+
// variant is a level of emphasis, and the two controls it reaches are the chosen day and
|
|
300
|
+
// this button — a strip whose chosen day is a soft wash under a pill that kept a hard
|
|
301
|
+
// accent border is two variants on one card.
|
|
302
|
+
//
|
|
303
|
+
// The emphasis runs the other way round from a `Button`'s, and on purpose: `primary`
|
|
304
|
+
// outlines rather than fills. The pill sits between two bare chevrons, so the filled
|
|
305
|
+
// accent that makes a `Button` primary would read here as the primary action of the whole
|
|
306
|
+
// card — the accent goes on the word instead, which is where the strip's own accent is.
|
|
307
|
+
primary: {
|
|
308
|
+
border: "border",
|
|
305
309
|
fg: "accent"
|
|
310
|
+
},
|
|
311
|
+
secondary: {
|
|
312
|
+
bg: "accentSoft",
|
|
313
|
+
fg: "accentSoftForeground"
|
|
314
|
+
},
|
|
315
|
+
tertiary: {
|
|
316
|
+
bg: "default",
|
|
317
|
+
fg: "defaultForeground"
|
|
318
|
+
},
|
|
319
|
+
// No fill and no border: the word alone, as `ghost` means everywhere else.
|
|
320
|
+
ghost: {
|
|
321
|
+
fg: "foreground"
|
|
306
322
|
}
|
|
307
323
|
};
|
|
308
324
|
var SIZES = {
|
|
@@ -381,18 +397,14 @@ var agendaCalendarRecipe = createRecipe({
|
|
|
381
397
|
alignItems: "center",
|
|
382
398
|
justifyContent: "center"
|
|
383
399
|
},
|
|
384
|
-
//
|
|
385
|
-
// filled button there would read as the primary action of the whole card.
|
|
400
|
+
// The box only. Whether it is outlined, washed or bare is the variant's, below.
|
|
386
401
|
today: {
|
|
387
402
|
alignItems: "center",
|
|
388
|
-
justifyContent: "center"
|
|
389
|
-
borderWidth: theme.borderWidth.default,
|
|
390
|
-
borderColor: theme.colors.border
|
|
403
|
+
justifyContent: "center"
|
|
391
404
|
},
|
|
392
405
|
todayLabel: {
|
|
393
406
|
fontFamily: theme.fontFamilies.body,
|
|
394
|
-
fontWeight: theme.fontWeights.medium
|
|
395
|
-
color: theme.colors.accent
|
|
407
|
+
fontWeight: theme.fontWeights.medium
|
|
396
408
|
},
|
|
397
409
|
week: {
|
|
398
410
|
flexDirection: "row"
|
|
@@ -416,14 +428,20 @@ var agendaCalendarRecipe = createRecipe({
|
|
|
416
428
|
}
|
|
417
429
|
}),
|
|
418
430
|
variantTokens: VARIANT_TOKENS,
|
|
419
|
-
// The
|
|
420
|
-
//
|
|
421
|
-
//
|
|
422
|
-
|
|
431
|
+
// The `Button`'s own paint, one slot down: the border's *width* follows the presence of
|
|
432
|
+
// the border role rather than a per-variant flag, because which variant outlines is
|
|
433
|
+
// already stated in the table above. `undefined` where a variant names no `bg` is the
|
|
434
|
+
// transparent the outlined and the bare pill both want.
|
|
435
|
+
paint: (theme, colors) => ({
|
|
436
|
+
today: {
|
|
437
|
+
backgroundColor: colors.bg,
|
|
438
|
+
borderColor: colors.border,
|
|
439
|
+
borderWidth: colors.border ? theme.borderWidth.default : 0
|
|
440
|
+
},
|
|
423
441
|
todayLabel: {
|
|
424
442
|
color: colors.fg
|
|
425
443
|
}
|
|
426
|
-
}
|
|
444
|
+
}),
|
|
427
445
|
variants: {
|
|
428
446
|
size: {
|
|
429
447
|
sm: sizeAxis(SIZES.sm),
|
|
@@ -440,11 +458,12 @@ var agendaCalendarRecipe = createRecipe({
|
|
|
440
458
|
}
|
|
441
459
|
})
|
|
442
460
|
},
|
|
443
|
-
// `
|
|
444
|
-
//
|
|
445
|
-
//
|
|
461
|
+
// The `Calendar`'s default, because the two resolve from the same `variant` prop and a
|
|
462
|
+
// card whose strip defaulted to one and whose pill to another is not one component.
|
|
463
|
+
// Naming it is also what makes `paint` and `tint` run at all — without a variant both are
|
|
464
|
+
// handed no colours, and the pill loses its word to RN's black.
|
|
446
465
|
defaultVariants: {
|
|
447
|
-
variant: "
|
|
466
|
+
variant: "primary",
|
|
448
467
|
size: "md"
|
|
449
468
|
}
|
|
450
469
|
});
|
|
@@ -499,14 +518,14 @@ var AgendaCalendarRoot = forwardRef6(function AgendaCalendar({
|
|
|
499
518
|
});
|
|
500
519
|
const resolvedLocale = locale ?? deviceLocale();
|
|
501
520
|
const weekStart = firstDayOfWeek ?? firstDayOfWeekFor(resolvedLocale);
|
|
502
|
-
const
|
|
521
|
+
const selection = {
|
|
503
522
|
variant,
|
|
504
523
|
size,
|
|
505
524
|
radius
|
|
506
525
|
};
|
|
507
526
|
const cells = calendarRecipe.resolve({
|
|
508
527
|
theme,
|
|
509
|
-
selection
|
|
528
|
+
selection,
|
|
510
529
|
states: {
|
|
511
530
|
disabled: isDisabled
|
|
512
531
|
}
|
|
@@ -514,12 +533,8 @@ var AgendaCalendarRoot = forwardRef6(function AgendaCalendar({
|
|
|
514
533
|
const cellTint = color ? calendarRecipe.tint({
|
|
515
534
|
theme,
|
|
516
535
|
color,
|
|
517
|
-
selection
|
|
536
|
+
selection
|
|
518
537
|
}) : void 0;
|
|
519
|
-
const selection = {
|
|
520
|
-
size,
|
|
521
|
-
radius
|
|
522
|
-
};
|
|
523
538
|
const styles = agendaCalendarRecipe.resolve({
|
|
524
539
|
theme,
|
|
525
540
|
selection,
|
|
@@ -617,7 +632,7 @@ var AgendaCalendarRoot = forwardRef6(function AgendaCalendar({
|
|
|
617
632
|
},
|
|
618
633
|
pickerItemLabelStyle: cells.dayLabel,
|
|
619
634
|
pickerItemLabelSelectedStyle: cellTint ? [cells.dayLabelSelected, cellTint.dayLabelSelected] : cells.dayLabelSelected,
|
|
620
|
-
todayStyle: styles.today,
|
|
635
|
+
todayStyle: tint ? [styles.today, tint.today] : styles.today,
|
|
621
636
|
todayDisabledStyle: styles.todayDisabled,
|
|
622
637
|
todayLabelStyle: tint ? [styles.todayLabel, tint.todayLabel] : styles.todayLabel,
|
|
623
638
|
weekStyle: styles.week,
|
|
@@ -784,25 +799,25 @@ var SPRING = {
|
|
|
784
799
|
stiffness: 220,
|
|
785
800
|
mass: 0.6
|
|
786
801
|
};
|
|
787
|
-
const
|
|
788
|
-
code: "function
|
|
789
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
790
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
802
|
+
const _worklet_6865118524057_init_data = {
|
|
803
|
+
code: "function chunkV5FYHQKQJs1(){const{drag,withSpring,SPRING}=this.__closure;drag.set(withSpring(0,SPRING));}",
|
|
804
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-V5FYHQKQ.js",
|
|
805
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkV5FYHQKQJs1\",\"drag\",\"withSpring\",\"SPRING\",\"__closure\",\"set\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-V5FYHQKQ.js\"],\"mappings\":\"AA40BkB,SAAAA,gBAAMA,CAAA,QAAAC,IAAA,CAAAC,UAAA,CAAAC,MAAA,OAAAC,SAAA,CAClBH,IAAI,CAACI,GAAG,CAACH,UAAU,CAAC,CAAC,CAAEC,MAAM,CAAC,CAAC,CACjC\",\"ignoreList\":[]}"
|
|
791
806
|
};
|
|
792
|
-
const
|
|
793
|
-
code: "function
|
|
794
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
795
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
807
|
+
const _worklet_7938979035346_init_data = {
|
|
808
|
+
code: "function chunkV5FYHQKQJs2(event){const{SWIPE_DISTANCE,SWIPE_VELOCITY,runOnJS,page,drag,withSpring,SPRING}=this.__closure;const forward=event.translationX<=-SWIPE_DISTANCE||event.velocityX<=-SWIPE_VELOCITY;const backward=event.translationX>=SWIPE_DISTANCE||event.velocityX>=SWIPE_VELOCITY;if(forward)runOnJS(page)(1);else if(backward)runOnJS(page)(-1);drag.set(withSpring(0,SPRING));}",
|
|
809
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-V5FYHQKQ.js",
|
|
810
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkV5FYHQKQJs2\",\"event\",\"SWIPE_DISTANCE\",\"SWIPE_VELOCITY\",\"runOnJS\",\"page\",\"drag\",\"withSpring\",\"SPRING\",\"__closure\",\"forward\",\"translationX\",\"velocityX\",\"backward\",\"set\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-V5FYHQKQ.js\"],\"mappings\":\"AAs0Bc,SAAAA,gBAAUA,CAAAC,KAAA,QAAAC,cAAA,CAAAC,cAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAC,IAAA,CAAAC,UAAA,CAAAC,MAAA,OAAAC,SAAA,CAClB,KAAM,CAAAC,OAAO,CAAGT,KAAK,CAACU,YAAY,EAAI,CAACT,cAAc,EAAID,KAAK,CAACW,SAAS,EAAI,CAACT,cAAc,CAC3F,KAAM,CAAAU,QAAQ,CAAGZ,KAAK,CAACU,YAAY,EAAIT,cAAc,EAAID,KAAK,CAACW,SAAS,EAAIT,cAAc,CAC1F,GAAIO,OAAO,CAAEN,OAAO,CAACC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IACzB,IAAIQ,QAAQ,CAAET,OAAO,CAACC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CACpCC,IAAI,CAACQ,GAAG,CAACP,UAAU,CAAC,CAAC,CAAEC,MAAM,CAAC,CAAC,CACjC\",\"ignoreList\":[]}"
|
|
796
811
|
};
|
|
797
|
-
const
|
|
798
|
-
code: "function
|
|
799
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
800
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
812
|
+
const _worklet_9375623676669_init_data = {
|
|
813
|
+
code: "function chunkV5FYHQKQJs3(event){const{drag,DRAG_FOLLOW}=this.__closure;drag.set(event.translationX*DRAG_FOLLOW);}",
|
|
814
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-V5FYHQKQ.js",
|
|
815
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkV5FYHQKQJs3\",\"event\",\"drag\",\"DRAG_FOLLOW\",\"__closure\",\"set\",\"translationX\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-V5FYHQKQ.js\"],\"mappings\":\"AAo0B0H,SAAAA,gBAAUA,CAAAC,KAAA,QAAAC,IAAA,CAAAC,WAAA,OAAAC,SAAA,CAC9HF,IAAI,CAACG,GAAG,CAACJ,KAAK,CAACK,YAAY,CAAGH,WAAW,CAAC,CAC5C\",\"ignoreList\":[]}"
|
|
801
816
|
};
|
|
802
|
-
const
|
|
803
|
-
code: "function
|
|
804
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
805
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
817
|
+
const _worklet_5818255412875_init_data = {
|
|
818
|
+
code: "function chunkV5FYHQKQJs4(){const{drag}=this.__closure;return{transform:[{translateX:drag.get()}]};}",
|
|
819
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-V5FYHQKQ.js",
|
|
820
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkV5FYHQKQJs4\",\"drag\",\"__closure\",\"transform\",\"translateX\",\"get\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-V5FYHQKQ.js\"],\"mappings\":\"AA+0BmC,SAAAA,gBAAMA,CAAA,QAAAC,IAAA,OAAAC,SAAA,CAEnC,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEH,IAAI,CAACI,GAAG,CAAC,CAAE,CAAC,CAAE,CAAC,CACpD\",\"ignoreList\":[]}"
|
|
806
821
|
};
|
|
807
822
|
var AgendaCalendarWeek = forwardRef9(function AgendaCalendarWeek2({
|
|
808
823
|
children,
|
|
@@ -822,30 +837,30 @@ var AgendaCalendarWeek = forwardRef9(function AgendaCalendarWeek2({
|
|
|
822
837
|
const page = useCallback3(direction => {
|
|
823
838
|
if (canGoByWeeks(direction)) goByWeeks(direction);
|
|
824
839
|
}, [canGoByWeeks, goByWeeks]);
|
|
825
|
-
const pan = Gesture.Pan().enabled(swipeable && !isDisabled).activeOffsetX([-12, 12]).failOffsetY([-16, 16]).onUpdate(function
|
|
826
|
-
|
|
840
|
+
const pan = Gesture.Pan().enabled(swipeable && !isDisabled).activeOffsetX([-12, 12]).failOffsetY([-16, 16]).onUpdate(function chunkV5FYHQKQJs3Factory({
|
|
841
|
+
_worklet_9375623676669_init_data,
|
|
827
842
|
drag,
|
|
828
843
|
DRAG_FOLLOW
|
|
829
844
|
}) {
|
|
830
845
|
const _e = [new global.Error(), -3, -27];
|
|
831
|
-
const
|
|
846
|
+
const chunkV5FYHQKQJs3 = function (event) {
|
|
832
847
|
drag.set(event.translationX * DRAG_FOLLOW);
|
|
833
848
|
};
|
|
834
|
-
|
|
849
|
+
chunkV5FYHQKQJs3.__closure = {
|
|
835
850
|
drag,
|
|
836
851
|
DRAG_FOLLOW
|
|
837
852
|
};
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
return
|
|
853
|
+
chunkV5FYHQKQJs3.__workletHash = 9375623676669;
|
|
854
|
+
chunkV5FYHQKQJs3.__pluginVersion = "0.7.4";
|
|
855
|
+
chunkV5FYHQKQJs3.__initData = _worklet_9375623676669_init_data;
|
|
856
|
+
chunkV5FYHQKQJs3.__stackDetails = _e;
|
|
857
|
+
return chunkV5FYHQKQJs3;
|
|
843
858
|
}({
|
|
844
|
-
|
|
859
|
+
_worklet_9375623676669_init_data,
|
|
845
860
|
drag,
|
|
846
861
|
DRAG_FOLLOW
|
|
847
|
-
})).onEnd(function
|
|
848
|
-
|
|
862
|
+
})).onEnd(function chunkV5FYHQKQJs2Factory({
|
|
863
|
+
_worklet_7938979035346_init_data,
|
|
849
864
|
SWIPE_DISTANCE,
|
|
850
865
|
SWIPE_VELOCITY,
|
|
851
866
|
runOnJS,
|
|
@@ -855,13 +870,13 @@ var AgendaCalendarWeek = forwardRef9(function AgendaCalendarWeek2({
|
|
|
855
870
|
SPRING
|
|
856
871
|
}) {
|
|
857
872
|
const _e = [new global.Error(), -8, -27];
|
|
858
|
-
const
|
|
873
|
+
const chunkV5FYHQKQJs2 = function (event) {
|
|
859
874
|
const forward = event.translationX <= -SWIPE_DISTANCE || event.velocityX <= -SWIPE_VELOCITY;
|
|
860
875
|
const backward = event.translationX >= SWIPE_DISTANCE || event.velocityX >= SWIPE_VELOCITY;
|
|
861
876
|
if (forward) runOnJS(page)(1);else if (backward) runOnJS(page)(-1);
|
|
862
877
|
drag.set(withSpring(0, SPRING));
|
|
863
878
|
};
|
|
864
|
-
|
|
879
|
+
chunkV5FYHQKQJs2.__closure = {
|
|
865
880
|
SWIPE_DISTANCE,
|
|
866
881
|
SWIPE_VELOCITY,
|
|
867
882
|
runOnJS,
|
|
@@ -870,13 +885,13 @@ var AgendaCalendarWeek = forwardRef9(function AgendaCalendarWeek2({
|
|
|
870
885
|
withSpring,
|
|
871
886
|
SPRING
|
|
872
887
|
};
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
return
|
|
888
|
+
chunkV5FYHQKQJs2.__workletHash = 7938979035346;
|
|
889
|
+
chunkV5FYHQKQJs2.__pluginVersion = "0.7.4";
|
|
890
|
+
chunkV5FYHQKQJs2.__initData = _worklet_7938979035346_init_data;
|
|
891
|
+
chunkV5FYHQKQJs2.__stackDetails = _e;
|
|
892
|
+
return chunkV5FYHQKQJs2;
|
|
878
893
|
}({
|
|
879
|
-
|
|
894
|
+
_worklet_7938979035346_init_data,
|
|
880
895
|
SWIPE_DISTANCE,
|
|
881
896
|
SWIPE_VELOCITY,
|
|
882
897
|
runOnJS,
|
|
@@ -884,54 +899,54 @@ var AgendaCalendarWeek = forwardRef9(function AgendaCalendarWeek2({
|
|
|
884
899
|
drag,
|
|
885
900
|
withSpring,
|
|
886
901
|
SPRING
|
|
887
|
-
})).onFinalize(function
|
|
888
|
-
|
|
902
|
+
})).onFinalize(function chunkV5FYHQKQJs1Factory({
|
|
903
|
+
_worklet_6865118524057_init_data,
|
|
889
904
|
drag,
|
|
890
905
|
withSpring,
|
|
891
906
|
SPRING
|
|
892
907
|
}) {
|
|
893
908
|
const _e = [new global.Error(), -4, -27];
|
|
894
|
-
const
|
|
909
|
+
const chunkV5FYHQKQJs1 = function () {
|
|
895
910
|
drag.set(withSpring(0, SPRING));
|
|
896
911
|
};
|
|
897
|
-
|
|
912
|
+
chunkV5FYHQKQJs1.__closure = {
|
|
898
913
|
drag,
|
|
899
914
|
withSpring,
|
|
900
915
|
SPRING
|
|
901
916
|
};
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
return
|
|
917
|
+
chunkV5FYHQKQJs1.__workletHash = 6865118524057;
|
|
918
|
+
chunkV5FYHQKQJs1.__pluginVersion = "0.7.4";
|
|
919
|
+
chunkV5FYHQKQJs1.__initData = _worklet_6865118524057_init_data;
|
|
920
|
+
chunkV5FYHQKQJs1.__stackDetails = _e;
|
|
921
|
+
return chunkV5FYHQKQJs1;
|
|
907
922
|
}({
|
|
908
|
-
|
|
923
|
+
_worklet_6865118524057_init_data,
|
|
909
924
|
drag,
|
|
910
925
|
withSpring,
|
|
911
926
|
SPRING
|
|
912
927
|
}));
|
|
913
|
-
const slide = useAnimatedStyle(function
|
|
914
|
-
|
|
928
|
+
const slide = useAnimatedStyle(function chunkV5FYHQKQJs4Factory({
|
|
929
|
+
_worklet_5818255412875_init_data,
|
|
915
930
|
drag
|
|
916
931
|
}) {
|
|
917
932
|
const _e = [new global.Error(), -2, -27];
|
|
918
|
-
const
|
|
933
|
+
const chunkV5FYHQKQJs4 = function () {
|
|
919
934
|
return {
|
|
920
935
|
transform: [{
|
|
921
936
|
translateX: drag.get()
|
|
922
937
|
}]
|
|
923
938
|
};
|
|
924
939
|
};
|
|
925
|
-
|
|
940
|
+
chunkV5FYHQKQJs4.__closure = {
|
|
926
941
|
drag
|
|
927
942
|
};
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
return
|
|
943
|
+
chunkV5FYHQKQJs4.__workletHash = 5818255412875;
|
|
944
|
+
chunkV5FYHQKQJs4.__pluginVersion = "0.7.4";
|
|
945
|
+
chunkV5FYHQKQJs4.__initData = _worklet_5818255412875_init_data;
|
|
946
|
+
chunkV5FYHQKQJs4.__stackDetails = _e;
|
|
947
|
+
return chunkV5FYHQKQJs4;
|
|
933
948
|
}({
|
|
934
|
-
|
|
949
|
+
_worklet_5818255412875_init_data,
|
|
935
950
|
drag
|
|
936
951
|
}), [drag]);
|
|
937
952
|
const cells = days.map(date => /* @__PURE__ */jsx9(View7, {
|
|
@@ -324,14 +324,30 @@ var AgendaCalendarNextButton = navButton(1, "XAUI.AgendaCalendar.NextButton", sh
|
|
|
324
324
|
// src/components/agenda-calendar/agenda-calendar.recipe.ts
|
|
325
325
|
var SLOTS = ["root", "header", "nav", "navButton", "today", "todayDisabled", "todayLabel", "week", "picker", "pickerItem"];
|
|
326
326
|
var VARIANT_TOKENS = {
|
|
327
|
-
//
|
|
328
|
-
//
|
|
329
|
-
//
|
|
330
|
-
//
|
|
331
|
-
//
|
|
332
|
-
|
|
333
|
-
|
|
327
|
+
// The four the `Calendar` declares, answered on the pill rather than on a disc. The
|
|
328
|
+
// variant is a level of emphasis, and the two controls it reaches are the chosen day and
|
|
329
|
+
// this button — a strip whose chosen day is a soft wash under a pill that kept a hard
|
|
330
|
+
// accent border is two variants on one card.
|
|
331
|
+
//
|
|
332
|
+
// The emphasis runs the other way round from a `Button`'s, and on purpose: `primary`
|
|
333
|
+
// outlines rather than fills. The pill sits between two bare chevrons, so the filled
|
|
334
|
+
// accent that makes a `Button` primary would read here as the primary action of the whole
|
|
335
|
+
// card — the accent goes on the word instead, which is where the strip's own accent is.
|
|
336
|
+
primary: {
|
|
337
|
+
border: "border",
|
|
334
338
|
fg: "accent"
|
|
339
|
+
},
|
|
340
|
+
secondary: {
|
|
341
|
+
bg: "accentSoft",
|
|
342
|
+
fg: "accentSoftForeground"
|
|
343
|
+
},
|
|
344
|
+
tertiary: {
|
|
345
|
+
bg: "default",
|
|
346
|
+
fg: "defaultForeground"
|
|
347
|
+
},
|
|
348
|
+
// No fill and no border: the word alone, as `ghost` means everywhere else.
|
|
349
|
+
ghost: {
|
|
350
|
+
fg: "foreground"
|
|
335
351
|
}
|
|
336
352
|
};
|
|
337
353
|
var SIZES = {
|
|
@@ -410,18 +426,14 @@ var agendaCalendarRecipe = _chunkSL3V7R2Ycjs.createRecipe.call(void 0, {
|
|
|
410
426
|
alignItems: "center",
|
|
411
427
|
justifyContent: "center"
|
|
412
428
|
},
|
|
413
|
-
//
|
|
414
|
-
// filled button there would read as the primary action of the whole card.
|
|
429
|
+
// The box only. Whether it is outlined, washed or bare is the variant's, below.
|
|
415
430
|
today: {
|
|
416
431
|
alignItems: "center",
|
|
417
|
-
justifyContent: "center"
|
|
418
|
-
borderWidth: theme.borderWidth.default,
|
|
419
|
-
borderColor: theme.colors.border
|
|
432
|
+
justifyContent: "center"
|
|
420
433
|
},
|
|
421
434
|
todayLabel: {
|
|
422
435
|
fontFamily: theme.fontFamilies.body,
|
|
423
|
-
fontWeight: theme.fontWeights.medium
|
|
424
|
-
color: theme.colors.accent
|
|
436
|
+
fontWeight: theme.fontWeights.medium
|
|
425
437
|
},
|
|
426
438
|
week: {
|
|
427
439
|
flexDirection: "row"
|
|
@@ -445,14 +457,20 @@ var agendaCalendarRecipe = _chunkSL3V7R2Ycjs.createRecipe.call(void 0, {
|
|
|
445
457
|
}
|
|
446
458
|
}),
|
|
447
459
|
variantTokens: VARIANT_TOKENS,
|
|
448
|
-
// The
|
|
449
|
-
//
|
|
450
|
-
//
|
|
451
|
-
|
|
460
|
+
// The `Button`'s own paint, one slot down: the border's *width* follows the presence of
|
|
461
|
+
// the border role rather than a per-variant flag, because which variant outlines is
|
|
462
|
+
// already stated in the table above. `undefined` where a variant names no `bg` is the
|
|
463
|
+
// transparent the outlined and the bare pill both want.
|
|
464
|
+
paint: (theme, colors) => ({
|
|
465
|
+
today: {
|
|
466
|
+
backgroundColor: colors.bg,
|
|
467
|
+
borderColor: colors.border,
|
|
468
|
+
borderWidth: colors.border ? theme.borderWidth.default : 0
|
|
469
|
+
},
|
|
452
470
|
todayLabel: {
|
|
453
471
|
color: colors.fg
|
|
454
472
|
}
|
|
455
|
-
}
|
|
473
|
+
}),
|
|
456
474
|
variants: {
|
|
457
475
|
size: {
|
|
458
476
|
sm: sizeAxis(SIZES.sm),
|
|
@@ -469,11 +487,12 @@ var agendaCalendarRecipe = _chunkSL3V7R2Ycjs.createRecipe.call(void 0, {
|
|
|
469
487
|
}
|
|
470
488
|
})
|
|
471
489
|
},
|
|
472
|
-
// `
|
|
473
|
-
//
|
|
474
|
-
//
|
|
490
|
+
// The `Calendar`'s default, because the two resolve from the same `variant` prop and a
|
|
491
|
+
// card whose strip defaulted to one and whose pill to another is not one component.
|
|
492
|
+
// Naming it is also what makes `paint` and `tint` run at all — without a variant both are
|
|
493
|
+
// handed no colours, and the pill loses its word to RN's black.
|
|
475
494
|
defaultVariants: {
|
|
476
|
-
variant: "
|
|
495
|
+
variant: "primary",
|
|
477
496
|
size: "md"
|
|
478
497
|
}
|
|
479
498
|
});
|
|
@@ -528,14 +547,14 @@ var AgendaCalendarRoot = _react.forwardRef.call(void 0, function AgendaCalendar(
|
|
|
528
547
|
});
|
|
529
548
|
const resolvedLocale = _nullishCoalesce(locale, () => deviceLocale());
|
|
530
549
|
const weekStart = _nullishCoalesce(firstDayOfWeek, () => _chunkISHMSP6Pcjs.firstDayOfWeekFor.call(void 0, resolvedLocale));
|
|
531
|
-
const
|
|
550
|
+
const selection = {
|
|
532
551
|
variant,
|
|
533
552
|
size,
|
|
534
553
|
radius
|
|
535
554
|
};
|
|
536
555
|
const cells = _chunk6ZWQDTGQcjs.calendarRecipe.resolve({
|
|
537
556
|
theme,
|
|
538
|
-
selection
|
|
557
|
+
selection,
|
|
539
558
|
states: {
|
|
540
559
|
disabled: isDisabled
|
|
541
560
|
}
|
|
@@ -543,12 +562,8 @@ var AgendaCalendarRoot = _react.forwardRef.call(void 0, function AgendaCalendar(
|
|
|
543
562
|
const cellTint = color ? _chunk6ZWQDTGQcjs.calendarRecipe.tint({
|
|
544
563
|
theme,
|
|
545
564
|
color,
|
|
546
|
-
selection
|
|
565
|
+
selection
|
|
547
566
|
}) : void 0;
|
|
548
|
-
const selection = {
|
|
549
|
-
size,
|
|
550
|
-
radius
|
|
551
|
-
};
|
|
552
567
|
const styles = agendaCalendarRecipe.resolve({
|
|
553
568
|
theme,
|
|
554
569
|
selection,
|
|
@@ -646,7 +661,7 @@ var AgendaCalendarRoot = _react.forwardRef.call(void 0, function AgendaCalendar(
|
|
|
646
661
|
},
|
|
647
662
|
pickerItemLabelStyle: cells.dayLabel,
|
|
648
663
|
pickerItemLabelSelectedStyle: cellTint ? [cells.dayLabelSelected, cellTint.dayLabelSelected] : cells.dayLabelSelected,
|
|
649
|
-
todayStyle: styles.today,
|
|
664
|
+
todayStyle: tint ? [styles.today, tint.today] : styles.today,
|
|
650
665
|
todayDisabledStyle: styles.todayDisabled,
|
|
651
666
|
todayLabelStyle: tint ? [styles.todayLabel, tint.todayLabel] : styles.todayLabel,
|
|
652
667
|
weekStyle: styles.week,
|
|
@@ -806,10 +821,10 @@ var SPRING = {
|
|
|
806
821
|
stiffness: 220,
|
|
807
822
|
mass: 0.6
|
|
808
823
|
};
|
|
809
|
-
const
|
|
810
|
-
code: "function
|
|
811
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
812
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
824
|
+
const _worklet_368808865208_init_data = {
|
|
825
|
+
code: "function chunkZBFBF7S4Cjs1(){const{drag}=this.__closure;return{transform:[{translateX:drag.get()}]};}",
|
|
826
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-ZBFBF7S4.cjs",
|
|
827
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkZBFBF7S4Cjs1\",\"drag\",\"__closure\",\"transform\",\"translateX\",\"get\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-ZBFBF7S4.cjs\"],\"mappings\":\"AA+0BuE,SAAAA,iBAAMA,CAAA,QAAAC,IAAA,OAAAC,SAAA,CAEvE,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEH,IAAI,CAACI,GAAG,CAAC,CAAE,CAAC,CAAE,CAAC,CACpD\",\"ignoreList\":[]}"
|
|
813
828
|
};
|
|
814
829
|
var AgendaCalendarWeek = _react.forwardRef.call(void 0, function AgendaCalendarWeek2({
|
|
815
830
|
children,
|
|
@@ -839,28 +854,28 @@ var AgendaCalendarWeek = _react.forwardRef.call(void 0, function AgendaCalendarW
|
|
|
839
854
|
}).onFinalize(() => {
|
|
840
855
|
drag.set(_reactnativereanimated.withSpring.call(void 0, 0, SPRING));
|
|
841
856
|
});
|
|
842
|
-
const slide = _reactnativereanimated.useAnimatedStyle.call(void 0, function
|
|
843
|
-
|
|
857
|
+
const slide = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkZBFBF7S4Cjs1Factory({
|
|
858
|
+
_worklet_368808865208_init_data,
|
|
844
859
|
drag
|
|
845
860
|
}) {
|
|
846
861
|
const _e = [new global.Error(), -2, -27];
|
|
847
|
-
const
|
|
862
|
+
const chunkZBFBF7S4Cjs1 = function () {
|
|
848
863
|
return {
|
|
849
864
|
transform: [{
|
|
850
865
|
translateX: drag.get()
|
|
851
866
|
}]
|
|
852
867
|
};
|
|
853
868
|
};
|
|
854
|
-
|
|
869
|
+
chunkZBFBF7S4Cjs1.__closure = {
|
|
855
870
|
drag
|
|
856
871
|
};
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
return
|
|
872
|
+
chunkZBFBF7S4Cjs1.__workletHash = 368808865208;
|
|
873
|
+
chunkZBFBF7S4Cjs1.__pluginVersion = "0.7.4";
|
|
874
|
+
chunkZBFBF7S4Cjs1.__initData = _worklet_368808865208_init_data;
|
|
875
|
+
chunkZBFBF7S4Cjs1.__stackDetails = _e;
|
|
876
|
+
return chunkZBFBF7S4Cjs1;
|
|
862
877
|
}({
|
|
863
|
-
|
|
878
|
+
_worklet_368808865208_init_data,
|
|
864
879
|
drag
|
|
865
880
|
}), [drag]);
|
|
866
881
|
const cells = days.map(date => /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
|
|
@@ -13,6 +13,10 @@ import { View } from 'react-native';
|
|
|
13
13
|
*
|
|
14
14
|
* The word is the caller's: "Today", "Aujourd'hui", "Hoy". R3 wraps a text child into the
|
|
15
15
|
* label, so `<AgendaCalendar.TodayButton>Today</…>` is the whole call.
|
|
16
|
+
*
|
|
17
|
+
* **It wears the card's `variant`**, the one that aims the chosen day: outlined with the
|
|
18
|
+
* word in the accent on `primary`, a soft fill on `secondary`, a neutral one on `tertiary`,
|
|
19
|
+
* the bare word on `ghost`. Nothing to pass — the pill reads the root's resolution.
|
|
16
20
|
*/
|
|
17
21
|
export declare const AgendaCalendarTodayButton: import("react").ForwardRefExoticComponent<{
|
|
18
22
|
children?: import("react").ReactNode;
|
|
@@ -13,6 +13,10 @@ import { View } from 'react-native';
|
|
|
13
13
|
*
|
|
14
14
|
* The word is the caller's: "Today", "Aujourd'hui", "Hoy". R3 wraps a text child into the
|
|
15
15
|
* label, so `<AgendaCalendar.TodayButton>Today</…>` is the whole call.
|
|
16
|
+
*
|
|
17
|
+
* **It wears the card's `variant`**, the one that aims the chosen day: outlined with the
|
|
18
|
+
* word in the accent on `primary`, a soft fill on `secondary`, a neutral one on `tertiary`,
|
|
19
|
+
* the bare word on `ghost`. Nothing to pass — the pill reads the root's resolution.
|
|
16
20
|
*/
|
|
17
21
|
export declare const AgendaCalendarTodayButton: import("react").ForwardRefExoticComponent<{
|
|
18
22
|
children?: import("react").ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SlotStyles } from '../../system/recipe';
|
|
2
2
|
import type { XAUITheme } from '../../theme/theme.type';
|
|
3
3
|
import type { AgendaCalendarSlot } from './agenda-calendar.type';
|
|
4
|
-
export declare const agendaCalendarRecipe: import("../..").Recipe<"header" | "nav" | "week" | "root" | "navButton" | "today" | "todayDisabled" | "todayLabel" | "picker" | "pickerItem", "
|
|
4
|
+
export declare const agendaCalendarRecipe: import("../..").Recipe<"header" | "nav" | "week" | "root" | "navButton" | "today" | "todayDisabled" | "todayLabel" | "picker" | "pickerItem", import("..").CalendarVariant, {
|
|
5
5
|
readonly size: {
|
|
6
6
|
readonly sm: (theme: XAUITheme) => SlotStyles<AgendaCalendarSlot>;
|
|
7
7
|
readonly md: (theme: XAUITheme) => SlotStyles<AgendaCalendarSlot>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SlotStyles } from '../../system/recipe';
|
|
2
2
|
import type { XAUITheme } from '../../theme/theme.type';
|
|
3
3
|
import type { AgendaCalendarSlot } from './agenda-calendar.type';
|
|
4
|
-
export declare const agendaCalendarRecipe: import("../..").Recipe<"header" | "nav" | "week" | "root" | "navButton" | "today" | "todayDisabled" | "todayLabel" | "picker" | "pickerItem", "
|
|
4
|
+
export declare const agendaCalendarRecipe: import("../..").Recipe<"header" | "nav" | "week" | "root" | "navButton" | "today" | "todayDisabled" | "todayLabel" | "picker" | "pickerItem", import("..").CalendarVariant, {
|
|
5
5
|
readonly size: {
|
|
6
6
|
readonly sm: (theme: XAUITheme) => SlotStyles<AgendaCalendarSlot>;
|
|
7
7
|
readonly md: (theme: XAUITheme) => SlotStyles<AgendaCalendarSlot>;
|
|
@@ -7,7 +7,10 @@ import type { RadiusKey, Size } from '../../theme/theme.type';
|
|
|
7
7
|
import type { WeekDay } from '../../utils/dates';
|
|
8
8
|
import type { CalendarVariant } from '../calendar';
|
|
9
9
|
export type AgendaCalendarSlot = 'root' | 'header' | 'nav' | 'navButton' | 'today' | 'todayDisabled' | 'todayLabel' | 'week' | 'picker' | 'pickerItem';
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* The `Calendar`'s four, because the chosen day is the same day. It aims the pill that says
|
|
12
|
+
* "Today" as well — the variant is the card's one level of emphasis, not the disc's alone.
|
|
13
|
+
*/
|
|
11
14
|
export type AgendaCalendarVariant = CalendarVariant;
|
|
12
15
|
/**
|
|
13
16
|
* Which strip is on screen: the week of days, the months of the year, or the years.
|
|
@@ -7,7 +7,10 @@ import type { RadiusKey, Size } from '../../theme/theme.type';
|
|
|
7
7
|
import type { WeekDay } from '../../utils/dates';
|
|
8
8
|
import type { CalendarVariant } from '../calendar';
|
|
9
9
|
export type AgendaCalendarSlot = 'root' | 'header' | 'nav' | 'navButton' | 'today' | 'todayDisabled' | 'todayLabel' | 'week' | 'picker' | 'pickerItem';
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* The `Calendar`'s four, because the chosen day is the same day. It aims the pill that says
|
|
12
|
+
* "Today" as well — the variant is the card's one level of emphasis, not the disc's alone.
|
|
13
|
+
*/
|
|
11
14
|
export type AgendaCalendarVariant = CalendarVariant;
|
|
12
15
|
/**
|
|
13
16
|
* Which strip is on screen: the week of days, the months of the year, or the years.
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkZBFBF7S4cjs = require('../../chunk-ZBFBF7S4.cjs');
|
|
18
18
|
require('../../chunk-6ZWQDTGQ.cjs');
|
|
19
19
|
require('../../chunk-ISHMSP6P.cjs');
|
|
20
20
|
require('../../chunk-WFEMJCXO.cjs');
|
|
@@ -46,4 +46,4 @@ require('../../chunk-TK44VBIE.cjs');
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
exports.AgendaCalendar =
|
|
49
|
+
exports.AgendaCalendar = _chunkZBFBF7S4cjs.AgendaCalendar; exports.AgendaCalendarDay = _chunkZBFBF7S4cjs.AgendaCalendarDay; exports.AgendaCalendarHeader = _chunkZBFBF7S4cjs.AgendaCalendarHeader; exports.AgendaCalendarMonthPicker = _chunkZBFBF7S4cjs.AgendaCalendarMonthPicker; exports.AgendaCalendarNav = _chunkZBFBF7S4cjs.AgendaCalendarNav; exports.AgendaCalendarNextButton = _chunkZBFBF7S4cjs.AgendaCalendarNextButton; exports.AgendaCalendarPreviousButton = _chunkZBFBF7S4cjs.AgendaCalendarPreviousButton; exports.AgendaCalendarRoot = _chunkZBFBF7S4cjs.AgendaCalendarRoot; exports.AgendaCalendarTitle = _chunkZBFBF7S4cjs.AgendaCalendarTitle; exports.AgendaCalendarTodayButton = _chunkZBFBF7S4cjs.AgendaCalendarTodayButton; exports.AgendaCalendarWeek = _chunkZBFBF7S4cjs.AgendaCalendarWeek; exports.AgendaCalendarWeekdays = _chunkZBFBF7S4cjs.AgendaCalendarWeekdays; exports.AgendaCalendarYearPicker = _chunkZBFBF7S4cjs.AgendaCalendarYearPicker; exports.agendaCalendarRecipe = _chunkZBFBF7S4cjs.agendaCalendarRecipe; exports.useAgendaCalendar = _chunkZBFBF7S4cjs.useAgendaCalendar;
|