@xaui/native 0.9.1-alpha.94 → 0.9.1-beta.100
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-AXKDHX5V.cjs → chunk-2IOL3VDP.cjs} +3 -3
- package/dist/{chunk-LUPU7FJK.js → chunk-356DND54.js} +1 -1
- package/dist/{chunk-B5DBFS6M.js → chunk-3BRVAMXQ.js} +1 -1
- package/dist/{chunk-4LRVB6WR.cjs → chunk-3DQCHPB6.cjs} +12 -12
- package/dist/{chunk-5O7E73QP.cjs → chunk-3MMOZP4Y.cjs} +8 -8
- package/dist/{chunk-X6GT4H4I.cjs → chunk-3TBT6ORW.cjs} +15 -15
- package/dist/{chunk-DN3X5WIB.js → chunk-3VMKOQXH.js} +1 -1
- package/dist/{chunk-WPYJW3WM.cjs → chunk-435MOVG2.cjs} +3 -3
- package/dist/{chunk-V4IFH65I.cjs → chunk-5CXOSDFI.cjs} +2 -2
- package/dist/{chunk-5XTF2JDK.js → chunk-5G36GMFS.js} +1 -1
- package/dist/{chunk-VBS6VWW4.cjs → chunk-5UT5I53X.cjs} +3 -3
- package/dist/{chunk-4AIIAF6U.js → chunk-73EVNWZI.js} +16 -16
- package/dist/{chunk-7OVYYZ7H.js → chunk-7EPH24S2.js} +15 -15
- package/dist/{chunk-G2YHGLN3.cjs → chunk-7JWOAGB3.cjs} +9 -9
- package/dist/{chunk-6SRFQSPR.cjs → chunk-ADGHFLBJ.cjs} +1 -1
- package/dist/{chunk-OZLOYXLW.js → chunk-BBQQIO6L.js} +4 -4
- package/dist/{chunk-X22PLAP6.cjs → chunk-BGBJTBFC.cjs} +1 -1
- package/dist/{chunk-33BA4LVN.js → chunk-BH4IN6H6.js} +1 -1
- package/dist/{chunk-WLWZG2PA.cjs → chunk-BKY5YQ7W.cjs} +1 -1
- package/dist/{chunk-AHJLQJOE.cjs → chunk-C2S6J27O.cjs} +1 -1
- package/dist/chunk-C6JO2RTV.cjs +752 -0
- package/dist/{chunk-2TLPFGGR.cjs → chunk-CS6CYB4I.cjs} +34 -25
- package/dist/{chunk-WYRM77XM.cjs → chunk-ENZBKNFJ.cjs} +15 -15
- package/dist/{chunk-ERIGD4SE.cjs → chunk-ETY5PM3E.cjs} +150 -39
- package/dist/{chunk-YJIVPYMG.cjs → chunk-FLKTJ46K.cjs} +15 -15
- package/dist/{chunk-OX23MW5E.js → chunk-FSVZXWLZ.js} +44 -44
- package/dist/{chunk-E5E2QA4K.js → chunk-GVZJNIHN.js} +176 -62
- package/dist/{chunk-6W45YHTF.js → chunk-HDERVGWZ.js} +1 -1
- package/dist/{chunk-KHPODIQV.cjs → chunk-IHRPAKCZ.cjs} +15 -15
- package/dist/{chunk-2XEQDQAN.js → chunk-IVELCJEN.js} +99 -99
- package/dist/{chunk-5YZUYSV7.js → chunk-JYV53WUN.js} +1 -1
- package/dist/{chunk-DE4RSR7Q.cjs → chunk-KAYZH7ZN.cjs} +1 -1
- package/dist/{chunk-IMIY34F4.cjs → chunk-KIXHSX3L.cjs} +1 -1
- package/dist/{chunk-7M6YKCHX.js → chunk-KZZWNDDO.js} +2 -2
- package/dist/{chunk-J5COSALO.cjs → chunk-L4B6Z45Q.cjs} +5 -5
- package/dist/{chunk-KFB24VYT.js → chunk-LMMHAGOM.js} +26 -17
- package/dist/{chunk-EQUD3NHO.js → chunk-LYWXGEED.js} +43 -43
- package/dist/{chunk-BYDGJU5A.js → chunk-M352N6PQ.js} +5 -5
- package/dist/{chunk-XOZMGNVS.js → chunk-MXSIY6QQ.js} +3 -3
- package/dist/{chunk-3CPLJJWX.js → chunk-MZUYTCCB.js} +1 -1
- package/dist/{chunk-K7VDLVLE.js → chunk-NQDTGYHC.js} +3 -3
- package/dist/{chunk-NADCILBL.cjs → chunk-NRU5APUE.cjs} +4 -4
- package/dist/{chunk-43S673KF.js → chunk-NTVPLDJC.js} +1 -1
- package/dist/{chunk-7AVZ2FST.cjs → chunk-NXVSNESK.cjs} +12 -12
- package/dist/{chunk-E4FWGZH2.js → chunk-OUNTRW6E.js} +5 -5
- package/dist/{chunk-MNBEUNC5.cjs → chunk-QRH45OO3.cjs} +144 -33
- package/dist/chunk-SVS726BW.js +822 -0
- package/dist/{chunk-YOPWQHNO.js → chunk-TNFLBURM.js} +1 -1
- package/dist/{chunk-YCQEX25B.cjs → chunk-U6YD3UBO.cjs} +7 -7
- package/dist/{chunk-GN7BWYXP.cjs → chunk-USQK6SFZ.cjs} +15 -15
- package/dist/{chunk-QT7KLGO3.js → chunk-V5FYHQKQ.js} +102 -87
- package/dist/{chunk-KMK6FUTK.cjs → chunk-V5V2QYFH.cjs} +9 -9
- package/dist/{chunk-YGETADPV.js → chunk-V7YT4SDX.js} +2 -2
- package/dist/{chunk-DBP5CA5R.js → chunk-VL2ZT4BB.js} +3 -3
- package/dist/{chunk-Q6OVVUAT.js → chunk-VTGWFZCA.js} +2 -2
- package/dist/{chunk-YI5D4QZP.js → chunk-WIGDDZHO.js} +190 -76
- package/dist/{chunk-NGXLJ5ZF.cjs → chunk-WSDDUVF6.cjs} +22 -22
- package/dist/{chunk-AIHKBSQ5.cjs → chunk-YUCK5VJO.cjs} +8 -8
- package/dist/{chunk-SIOSYITD.cjs → chunk-ZBFBF7S4.cjs} +60 -45
- package/dist/{chunk-SX5U5UJQ.js → chunk-ZBY7Q7WJ.js} +2 -2
- package/dist/{chunk-53E2E7GS.cjs → chunk-ZNKHL5O6.cjs} +15 -15
- package/dist/{chunk-U5CUBDJA.js → chunk-ZR5YOCOQ.js} +15 -15
- package/dist/components/accordion/accordion.animation.d.cts +1 -1
- package/dist/components/accordion/accordion.animation.d.ts +1 -1
- package/dist/components/accordion/accordion.type.d.cts +1 -1
- package/dist/components/accordion/accordion.type.d.ts +1 -1
- package/dist/components/accordion/index.cjs +2 -2
- package/dist/components/accordion/index.js +1 -1
- 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/alert/alert-icon.d.cts +2 -2
- package/dist/components/alert/alert-icon.d.ts +2 -2
- package/dist/components/alert/alert.type.d.cts +1 -1
- package/dist/components/alert/alert.type.d.ts +1 -1
- package/dist/components/alert/index.cjs +2 -2
- package/dist/components/alert/index.js +1 -1
- package/dist/components/autocomplete/autocomplete-description.d.cts +14 -0
- package/dist/components/autocomplete/autocomplete-description.d.ts +14 -0
- package/dist/components/autocomplete/autocomplete-error.d.cts +12 -0
- package/dist/components/autocomplete/autocomplete-error.d.ts +12 -0
- package/dist/components/autocomplete/autocomplete-label.d.cts +15 -0
- package/dist/components/autocomplete/autocomplete-label.d.ts +15 -0
- package/dist/components/autocomplete/autocomplete.d.cts +50 -7
- package/dist/components/autocomplete/autocomplete.d.ts +50 -7
- package/dist/components/autocomplete/autocomplete.type.d.cts +21 -4
- package/dist/components/autocomplete/autocomplete.type.d.ts +21 -4
- package/dist/components/autocomplete/index.cjs +10 -3
- package/dist/components/autocomplete/index.d.cts +50 -3
- package/dist/components/autocomplete/index.d.ts +50 -3
- package/dist/components/autocomplete/index.js +9 -2
- package/dist/components/avatar/avatar-fallback.d.cts +1 -1
- package/dist/components/avatar/avatar-fallback.d.ts +1 -1
- package/dist/components/avatar/avatar.d.cts +1 -1
- package/dist/components/avatar/avatar.d.ts +1 -1
- package/dist/components/avatar/avatar.type.d.cts +1 -1
- package/dist/components/avatar/avatar.type.d.ts +1 -1
- package/dist/components/avatar/index.cjs +2 -2
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/bottom-sheet/bottom-sheet.d.cts +1 -1
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +1 -1
- package/dist/components/bottom-sheet/index.cjs +2 -2
- package/dist/components/bottom-sheet/index.js +1 -1
- package/dist/components/card/card-background.d.cts +1 -1
- package/dist/components/card/card-background.d.ts +1 -1
- package/dist/components/card/card.utils.d.cts +1 -1
- package/dist/components/card/card.utils.d.ts +1 -1
- package/dist/components/checkbox/checkbox.recipe.d.cts +1 -1
- package/dist/components/checkbox/checkbox.recipe.d.ts +1 -1
- package/dist/components/checkbox/checkbox.type.d.cts +1 -1
- package/dist/components/checkbox/checkbox.type.d.ts +1 -1
- package/dist/components/checkbox/index.cjs +2 -2
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/chip/chip.type.d.cts +1 -1
- package/dist/components/chip/chip.type.d.ts +1 -1
- package/dist/components/chip/index.cjs +2 -2
- package/dist/components/chip/index.js +1 -1
- package/dist/components/color-picker/index.cjs +7 -7
- package/dist/components/color-picker/index.js +6 -6
- package/dist/components/combobox/combobox.type.d.cts +5 -1
- package/dist/components/combobox/combobox.type.d.ts +5 -1
- package/dist/components/combobox/index.cjs +5 -4
- package/dist/components/combobox/index.d.cts +15 -1
- package/dist/components/combobox/index.d.ts +15 -1
- package/dist/components/combobox/index.js +4 -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 +4 -4
- package/dist/components/date-range-picker/index.js +3 -3
- package/dist/components/date-time-picker/index.cjs +5 -5
- package/dist/components/date-time-picker/index.js +4 -4
- package/dist/components/dialog/index.cjs +2 -2
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dummy-field/index.cjs +5 -5
- package/dist/components/dummy-field/index.js +4 -4
- package/dist/components/field-group/field-group-icon.d.cts +1 -1
- package/dist/components/field-group/field-group-icon.d.ts +1 -1
- package/dist/components/field-group/index.cjs +4 -4
- package/dist/components/field-group/index.js +3 -3
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/input-otp/input-otp.type.d.cts +1 -1
- package/dist/components/input-otp/input-otp.type.d.ts +1 -1
- package/dist/components/list-box/list-box-item-suffix.d.cts +1 -1
- package/dist/components/list-box/list-box-item-suffix.d.ts +1 -1
- package/dist/components/mask-field/index.cjs +5 -5
- package/dist/components/mask-field/index.js +4 -4
- package/dist/components/menu/index.cjs +2 -2
- package/dist/components/menu/index.js +1 -1
- package/dist/components/number-field/index.cjs +5 -5
- package/dist/components/number-field/index.js +4 -4
- package/dist/components/phone-number-field/index.cjs +37 -30
- package/dist/components/phone-number-field/index.js +13 -6
- package/dist/components/popover/index.cjs +2 -2
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover.recipe.d.cts +1 -1
- package/dist/components/popover/popover.recipe.d.ts +1 -1
- package/dist/components/search-field/index.cjs +5 -5
- package/dist/components/search-field/index.js +4 -4
- package/dist/components/select/index.cjs +10 -3
- package/dist/components/select/index.d.cts +45 -4
- package/dist/components/select/index.d.ts +45 -4
- package/dist/components/select/index.js +9 -2
- package/dist/components/select/select-description.d.cts +14 -0
- package/dist/components/select/select-description.d.ts +14 -0
- package/dist/components/select/select-error.d.cts +13 -0
- package/dist/components/select/select-error.d.ts +13 -0
- package/dist/components/select/select-group-label.d.cts +11 -0
- package/dist/components/select/select-group-label.d.ts +11 -0
- package/dist/components/select/select-indicator.d.cts +1 -1
- package/dist/components/select/select-indicator.d.ts +1 -1
- package/dist/components/select/select-label.d.cts +11 -2
- package/dist/components/select/select-label.d.ts +11 -2
- package/dist/components/select/select.d.cts +49 -9
- package/dist/components/select/select.d.ts +49 -9
- package/dist/components/select/select.recipe.d.cts +1 -1
- package/dist/components/select/select.recipe.d.ts +1 -1
- package/dist/components/select/select.type.d.cts +33 -9
- package/dist/components/select/select.type.d.ts +33 -9
- package/dist/components/skeleton/skeleton.type.d.cts +1 -1
- package/dist/components/skeleton/skeleton.type.d.ts +1 -1
- 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/components/slider/slider-thumb.d.cts +1 -1
- package/dist/components/slider/slider-thumb.d.ts +1 -1
- package/dist/components/slider/slider.recipe.d.cts +1 -1
- package/dist/components/slider/slider.recipe.d.ts +1 -1
- package/dist/components/spinner/spinner.d.cts +1 -1
- package/dist/components/spinner/spinner.d.ts +1 -1
- package/dist/components/switch/switch.style.d.cts +1 -1
- package/dist/components/switch/switch.style.d.ts +1 -1
- package/dist/components/table/index.cjs +3 -3
- package/dist/components/table/index.js +2 -2
- package/dist/components/text-area/index.cjs +4 -4
- package/dist/components/text-area/index.js +3 -3
- package/dist/components/text-area/text-area.d.cts +1 -1
- package/dist/components/text-area/text-area.d.ts +1 -1
- package/dist/components/text-field/index.cjs +3 -3
- package/dist/components/text-field/index.js +2 -2
- package/dist/components/text-field/text-field.type.d.cts +4 -4
- package/dist/components/text-field/text-field.type.d.ts +4 -4
- package/dist/components/time-picker/index.cjs +4 -4
- package/dist/components/time-picker/index.js +3 -3
- package/dist/components/toast/index.cjs +2 -2
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/toast.animation.d.cts +2 -2
- package/dist/components/toast/toast.animation.d.ts +2 -2
- package/dist/components/toast/toast.utils.d.cts +1 -1
- package/dist/components/toast/toast.utils.d.ts +1 -1
- package/dist/components/typography/typography.type.d.cts +1 -1
- package/dist/components/typography/typography.type.d.ts +1 -1
- package/dist/hooks/use-rotation.d.cts +1 -1
- package/dist/hooks/use-rotation.d.ts +1 -1
- package/dist/index.cjs +66 -42
- package/dist/index.js +74 -50
- package/dist/system/anchored/indicator-spring.d.cts +2 -2
- package/dist/system/anchored/indicator-spring.d.ts +2 -2
- package/dist/theme/derive-colors.d.cts +1 -1
- package/dist/theme/derive-colors.d.ts +1 -1
- package/dist/theme/index.cjs +2 -2
- package/dist/theme/index.js +1 -1
- package/package.json +11 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import type { ViewStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* A button you drag rather than tap, for the action that should not happen by accident:
|
|
5
|
+
* slide the thumb to the far end and it fires once. Below the threshold it springs home.
|
|
6
|
+
*
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <SlideButton onConfirm={unlock}>Slide to confirm</SlideButton>
|
|
9
|
+
*
|
|
10
|
+
* <SlideButton variant="danger" onConfirm={wipe}>
|
|
11
|
+
* <SlideButton.Fill />
|
|
12
|
+
* <SlideButton.Label>Slide to delete</SlideButton.Label>
|
|
13
|
+
* <SlideButton.Thumb>
|
|
14
|
+
* <SlideButton.Icon as={TrashIcon} />
|
|
15
|
+
* </SlideButton.Thumb>
|
|
16
|
+
* </SlideButton>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* **It is the `Slider`'s gesture without the value.** The thumb runs the same pan on the
|
|
20
|
+
* same optional `react-native-gesture-handler` peer, the track measures its own length
|
|
21
|
+
* the same way, and the travel is inset by the thumb at each end for the same reason —
|
|
22
|
+
* but there is no `min`, `max` or `step`, because the only positions that mean anything
|
|
23
|
+
* are "not yet" and "done".
|
|
24
|
+
*
|
|
25
|
+
* **Once confirmed it stays confirmed.** Uncontrolled, a slide is a one-shot. Pass
|
|
26
|
+
* `isConfirmed` to drive it — set it back to `false` and the thumb springs home, re-armed.
|
|
27
|
+
*
|
|
28
|
+
* **A bare string is the whole component.** `<SlideButton>Slide</SlideButton>` composes
|
|
29
|
+
* the fill, the label and the thumb for you; write the slots out to put a mark in the
|
|
30
|
+
* thumb or leave the fill off.
|
|
31
|
+
*/
|
|
32
|
+
export declare const SlideButtonRoot: import("react").ForwardRefExoticComponent<{
|
|
33
|
+
children?: import("react").ReactNode;
|
|
34
|
+
variant?: import("./slide-button.type").SlideButtonVariant;
|
|
35
|
+
size?: import("./slide-button.type").SlideButtonSize;
|
|
36
|
+
radius?: import("../..").RadiusKey;
|
|
37
|
+
color?: string;
|
|
38
|
+
threshold?: number;
|
|
39
|
+
isConfirmed?: boolean;
|
|
40
|
+
defaultConfirmed?: boolean;
|
|
41
|
+
onConfirm?: () => void;
|
|
42
|
+
isDisabled?: boolean;
|
|
43
|
+
style?: import("react-native").StyleProp<ViewStyle>;
|
|
44
|
+
} & Omit<import("react-native").ViewProps, keyof {
|
|
45
|
+
children?: import("react").ReactNode;
|
|
46
|
+
variant?: import("./slide-button.type").SlideButtonVariant;
|
|
47
|
+
size?: import("./slide-button.type").SlideButtonSize;
|
|
48
|
+
radius?: import("../..").RadiusKey;
|
|
49
|
+
color?: string;
|
|
50
|
+
threshold?: number;
|
|
51
|
+
isConfirmed?: boolean;
|
|
52
|
+
defaultConfirmed?: boolean;
|
|
53
|
+
onConfirm?: () => void;
|
|
54
|
+
isDisabled?: boolean;
|
|
55
|
+
style?: import("react-native").StyleProp<ViewStyle>;
|
|
56
|
+
}> & Omit<import("../..").ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDisabled" | "radius" | "size" | "variant" | "threshold" | "isConfirmed" | "defaultConfirmed" | "onConfirm"> & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import type { ViewStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* A button you drag rather than tap, for the action that should not happen by accident:
|
|
5
|
+
* slide the thumb to the far end and it fires once. Below the threshold it springs home.
|
|
6
|
+
*
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <SlideButton onConfirm={unlock}>Slide to confirm</SlideButton>
|
|
9
|
+
*
|
|
10
|
+
* <SlideButton variant="danger" onConfirm={wipe}>
|
|
11
|
+
* <SlideButton.Fill />
|
|
12
|
+
* <SlideButton.Label>Slide to delete</SlideButton.Label>
|
|
13
|
+
* <SlideButton.Thumb>
|
|
14
|
+
* <SlideButton.Icon as={TrashIcon} />
|
|
15
|
+
* </SlideButton.Thumb>
|
|
16
|
+
* </SlideButton>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* **It is the `Slider`'s gesture without the value.** The thumb runs the same pan on the
|
|
20
|
+
* same optional `react-native-gesture-handler` peer, the track measures its own length
|
|
21
|
+
* the same way, and the travel is inset by the thumb at each end for the same reason —
|
|
22
|
+
* but there is no `min`, `max` or `step`, because the only positions that mean anything
|
|
23
|
+
* are "not yet" and "done".
|
|
24
|
+
*
|
|
25
|
+
* **Once confirmed it stays confirmed.** Uncontrolled, a slide is a one-shot. Pass
|
|
26
|
+
* `isConfirmed` to drive it — set it back to `false` and the thumb springs home, re-armed.
|
|
27
|
+
*
|
|
28
|
+
* **A bare string is the whole component.** `<SlideButton>Slide</SlideButton>` composes
|
|
29
|
+
* the fill, the label and the thumb for you; write the slots out to put a mark in the
|
|
30
|
+
* thumb or leave the fill off.
|
|
31
|
+
*/
|
|
32
|
+
export declare const SlideButtonRoot: import("react").ForwardRefExoticComponent<{
|
|
33
|
+
children?: import("react").ReactNode;
|
|
34
|
+
variant?: import("./slide-button.type").SlideButtonVariant;
|
|
35
|
+
size?: import("./slide-button.type").SlideButtonSize;
|
|
36
|
+
radius?: import("../..").RadiusKey;
|
|
37
|
+
color?: string;
|
|
38
|
+
threshold?: number;
|
|
39
|
+
isConfirmed?: boolean;
|
|
40
|
+
defaultConfirmed?: boolean;
|
|
41
|
+
onConfirm?: () => void;
|
|
42
|
+
isDisabled?: boolean;
|
|
43
|
+
style?: import("react-native").StyleProp<ViewStyle>;
|
|
44
|
+
} & Omit<import("react-native").ViewProps, keyof {
|
|
45
|
+
children?: import("react").ReactNode;
|
|
46
|
+
variant?: import("./slide-button.type").SlideButtonVariant;
|
|
47
|
+
size?: import("./slide-button.type").SlideButtonSize;
|
|
48
|
+
radius?: import("../..").RadiusKey;
|
|
49
|
+
color?: string;
|
|
50
|
+
threshold?: number;
|
|
51
|
+
isConfirmed?: boolean;
|
|
52
|
+
defaultConfirmed?: boolean;
|
|
53
|
+
onConfirm?: () => void;
|
|
54
|
+
isDisabled?: boolean;
|
|
55
|
+
style?: import("react-native").StyleProp<ViewStyle>;
|
|
56
|
+
}> & Omit<import("../..").ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDisabled" | "radius" | "size" | "variant" | "threshold" | "isConfirmed" | "defaultConfirmed" | "onConfirm"> & import("react").RefAttributes<View>>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { SlotStyles } from '../../system/recipe';
|
|
2
|
+
import type { XAUITheme } from '../../theme/theme.type';
|
|
3
|
+
import type { SlideButtonSize, SlideButtonSlot, SlideButtonVariant } from './slide-button.type';
|
|
4
|
+
type SizeStep = {
|
|
5
|
+
/** The control-height key. The handle's height is that less twice the inset. */
|
|
6
|
+
height: SlideButtonSize;
|
|
7
|
+
/** How far the handle sits in from the pill's edge, in points. The air around it. */
|
|
8
|
+
inset: number;
|
|
9
|
+
/**
|
|
10
|
+
* The mark's box, in points — the side of the built-in chevron, and the size an `Icon`
|
|
11
|
+
* in the handle inherits. Off the spacing grid: it is a drawn mark, not a gap.
|
|
12
|
+
*/
|
|
13
|
+
glyph: number;
|
|
14
|
+
/** The label's type key. */
|
|
15
|
+
label: SlideButtonSize;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The three sizes, measured rather than scaled off one number: a slide button is a target
|
|
19
|
+
* before it is type, so the height leads and the rest follows it.
|
|
20
|
+
*/
|
|
21
|
+
declare const SIZES: Record<SlideButtonSize, SizeStep>;
|
|
22
|
+
export declare const slideButtonRecipe: import("../..").Recipe<"label" | "fill" | "root" | "glyph" | "thumb" | "fillClip" | "labelSwept", SlideButtonVariant, {
|
|
23
|
+
readonly size: {
|
|
24
|
+
readonly sm: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
|
|
25
|
+
readonly md: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
|
|
26
|
+
readonly lg: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
|
|
27
|
+
};
|
|
28
|
+
/** After `size`, so a caller's `radius` wins over the pill's `full`. */
|
|
29
|
+
readonly radius: Record<import("../..").RadiusKey, import("../..").StyleFn<"fill" | "root" | "fillClip">>;
|
|
30
|
+
}>;
|
|
31
|
+
export { SIZES as slideButtonSizes };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { SlotStyles } from '../../system/recipe';
|
|
2
|
+
import type { XAUITheme } from '../../theme/theme.type';
|
|
3
|
+
import type { SlideButtonSize, SlideButtonSlot, SlideButtonVariant } from './slide-button.type';
|
|
4
|
+
type SizeStep = {
|
|
5
|
+
/** The control-height key. The handle's height is that less twice the inset. */
|
|
6
|
+
height: SlideButtonSize;
|
|
7
|
+
/** How far the handle sits in from the pill's edge, in points. The air around it. */
|
|
8
|
+
inset: number;
|
|
9
|
+
/**
|
|
10
|
+
* The mark's box, in points — the side of the built-in chevron, and the size an `Icon`
|
|
11
|
+
* in the handle inherits. Off the spacing grid: it is a drawn mark, not a gap.
|
|
12
|
+
*/
|
|
13
|
+
glyph: number;
|
|
14
|
+
/** The label's type key. */
|
|
15
|
+
label: SlideButtonSize;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The three sizes, measured rather than scaled off one number: a slide button is a target
|
|
19
|
+
* before it is type, so the height leads and the rest follows it.
|
|
20
|
+
*/
|
|
21
|
+
declare const SIZES: Record<SlideButtonSize, SizeStep>;
|
|
22
|
+
export declare const slideButtonRecipe: import("../..").Recipe<"label" | "fill" | "root" | "glyph" | "thumb" | "fillClip" | "labelSwept", SlideButtonVariant, {
|
|
23
|
+
readonly size: {
|
|
24
|
+
readonly sm: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
|
|
25
|
+
readonly md: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
|
|
26
|
+
readonly lg: (theme: XAUITheme) => SlotStyles<SlideButtonSlot>;
|
|
27
|
+
};
|
|
28
|
+
/** After `size`, so a caller's `radius` wins over the pill's `full`. */
|
|
29
|
+
readonly radius: Record<import("../..").RadiusKey, import("../..").StyleFn<"fill" | "root" | "fillClip">>;
|
|
30
|
+
}>;
|
|
31
|
+
export { SIZES as slideButtonSizes };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
3
|
+
import type { StyleProp, TextProps, TextStyle, ViewProps, ViewStyle } from 'react-native';
|
|
4
|
+
import type { IconContextValue, IconProps } from '../../system/icon';
|
|
5
|
+
import type { TextStyleProps, ViewStyleProps } from '../../system/style-props';
|
|
6
|
+
import type { RadiusKey } from '../../theme/theme.type';
|
|
7
|
+
export type SlideButtonSlot = 'root' | 'fillClip' | 'fill' | 'label' | 'labelSwept' | 'thumb' | 'glyph';
|
|
8
|
+
/**
|
|
9
|
+
* The flat variant union, the same ten values every control in the library takes. A
|
|
10
|
+
* slide-to-confirm is still a button — a slide-to-delete is a real `danger` use — so the
|
|
11
|
+
* intents stay.
|
|
12
|
+
*/
|
|
13
|
+
export type SlideButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'success' | 'success-soft' | 'warning' | 'warning-soft' | 'danger' | 'danger-soft';
|
|
14
|
+
export type SlideButtonSize = 'sm' | 'md' | 'lg';
|
|
15
|
+
type SlideButtonOwnProps = {
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
variant?: SlideButtonVariant;
|
|
18
|
+
/** Height, horizontal padding and the label's type. Never a width. */
|
|
19
|
+
size?: SlideButtonSize;
|
|
20
|
+
/** Overrides the pill's corner. `full` unless you say otherwise. */
|
|
21
|
+
radius?: RadiusKey;
|
|
22
|
+
/** A raw tint (R7). Lands on the pill, or on the label for `ghost` — never on the thumb. */
|
|
23
|
+
color?: string;
|
|
24
|
+
/**
|
|
25
|
+
* How far along the track the thumb has to reach for the slide to count, from 0 to 1.
|
|
26
|
+
* Below it the thumb springs home on release.
|
|
27
|
+
* @default 0.9
|
|
28
|
+
*/
|
|
29
|
+
threshold?: number;
|
|
30
|
+
/** Controlled: `true` pins the thumb at the end, `false` springs it home. */
|
|
31
|
+
isConfirmed?: boolean;
|
|
32
|
+
/** The starting state when uncontrolled. Once confirmed it stays confirmed. @default false */
|
|
33
|
+
defaultConfirmed?: boolean;
|
|
34
|
+
/** Fires once, when the thumb reaches `threshold` — the action the slide guards. */
|
|
35
|
+
onConfirm?: () => void;
|
|
36
|
+
isDisabled?: boolean;
|
|
37
|
+
style?: StyleProp<ViewStyle>;
|
|
38
|
+
};
|
|
39
|
+
export type SlideButtonProps = SlideButtonOwnProps & Omit<ViewProps, keyof SlideButtonOwnProps> & Omit<ViewStyleProps, keyof SlideButtonOwnProps | keyof ViewProps>;
|
|
40
|
+
type SlideButtonFillOwnProps = {
|
|
41
|
+
children?: never;
|
|
42
|
+
};
|
|
43
|
+
export type SlideButtonFillProps = SlideButtonFillOwnProps & Omit<ViewProps, 'children'> & Omit<ViewStyleProps, keyof ViewProps>;
|
|
44
|
+
export type SlideButtonLabelProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
};
|
|
47
|
+
type SlideButtonThumbOwnProps = {
|
|
48
|
+
/** Replaces the built-in chevron — an `Icon`, or anything else. */
|
|
49
|
+
children?: ReactNode;
|
|
50
|
+
};
|
|
51
|
+
export type SlideButtonThumbProps = SlideButtonThumbOwnProps & Omit<ViewProps, keyof SlideButtonThumbOwnProps> & Omit<ViewStyleProps, keyof SlideButtonThumbOwnProps | keyof ViewProps>;
|
|
52
|
+
export type SlideButtonIconProps = IconProps;
|
|
53
|
+
/** R5 — resolved style ids and the shared progress the animated slots read. */
|
|
54
|
+
export type SlideButtonContextValue = {
|
|
55
|
+
/** The window the trail is cut to — the pill's shape, so the cut stays off the handle. */
|
|
56
|
+
fillClipStyle: StyleProp<ViewStyle>;
|
|
57
|
+
fillStyle: StyleProp<ViewStyle>;
|
|
58
|
+
labelStyle: StyleProp<TextStyle>;
|
|
59
|
+
/** The label's swept copy, already carrying the width the clip must not re-centre it in. */
|
|
60
|
+
labelSweptStyle: StyleProp<TextStyle>;
|
|
61
|
+
thumbStyle: StyleProp<ViewStyle>;
|
|
62
|
+
glyphStyle: StyleProp<ViewStyle>;
|
|
63
|
+
icon: IconContextValue;
|
|
64
|
+
/** The handle's offset from the leading edge, in points, driven on the UI thread. */
|
|
65
|
+
offset: SharedValue<number>;
|
|
66
|
+
/** How far the handle can travel — the track's length less the handle and its insets. */
|
|
67
|
+
travel: number;
|
|
68
|
+
/** The handle's width, the amount the travel is shortened by. */
|
|
69
|
+
thumbSize: number;
|
|
70
|
+
/** The fraction of `travel` the thumb must reach for the slide to count, from 0 to 1. */
|
|
71
|
+
threshold: number;
|
|
72
|
+
isDisabled: boolean;
|
|
73
|
+
isConfirmed: boolean;
|
|
74
|
+
/** Called from the pan on release once the thumb has reached `threshold`. */
|
|
75
|
+
confirm: () => void;
|
|
76
|
+
/** The pill's measured width. Zero until it has been laid out. */
|
|
77
|
+
trackLength: number;
|
|
78
|
+
};
|
|
79
|
+
export {};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
3
|
+
import type { StyleProp, TextProps, TextStyle, ViewProps, ViewStyle } from 'react-native';
|
|
4
|
+
import type { IconContextValue, IconProps } from '../../system/icon';
|
|
5
|
+
import type { TextStyleProps, ViewStyleProps } from '../../system/style-props';
|
|
6
|
+
import type { RadiusKey } from '../../theme/theme.type';
|
|
7
|
+
export type SlideButtonSlot = 'root' | 'fillClip' | 'fill' | 'label' | 'labelSwept' | 'thumb' | 'glyph';
|
|
8
|
+
/**
|
|
9
|
+
* The flat variant union, the same ten values every control in the library takes. A
|
|
10
|
+
* slide-to-confirm is still a button — a slide-to-delete is a real `danger` use — so the
|
|
11
|
+
* intents stay.
|
|
12
|
+
*/
|
|
13
|
+
export type SlideButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'success' | 'success-soft' | 'warning' | 'warning-soft' | 'danger' | 'danger-soft';
|
|
14
|
+
export type SlideButtonSize = 'sm' | 'md' | 'lg';
|
|
15
|
+
type SlideButtonOwnProps = {
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
variant?: SlideButtonVariant;
|
|
18
|
+
/** Height, horizontal padding and the label's type. Never a width. */
|
|
19
|
+
size?: SlideButtonSize;
|
|
20
|
+
/** Overrides the pill's corner. `full` unless you say otherwise. */
|
|
21
|
+
radius?: RadiusKey;
|
|
22
|
+
/** A raw tint (R7). Lands on the pill, or on the label for `ghost` — never on the thumb. */
|
|
23
|
+
color?: string;
|
|
24
|
+
/**
|
|
25
|
+
* How far along the track the thumb has to reach for the slide to count, from 0 to 1.
|
|
26
|
+
* Below it the thumb springs home on release.
|
|
27
|
+
* @default 0.9
|
|
28
|
+
*/
|
|
29
|
+
threshold?: number;
|
|
30
|
+
/** Controlled: `true` pins the thumb at the end, `false` springs it home. */
|
|
31
|
+
isConfirmed?: boolean;
|
|
32
|
+
/** The starting state when uncontrolled. Once confirmed it stays confirmed. @default false */
|
|
33
|
+
defaultConfirmed?: boolean;
|
|
34
|
+
/** Fires once, when the thumb reaches `threshold` — the action the slide guards. */
|
|
35
|
+
onConfirm?: () => void;
|
|
36
|
+
isDisabled?: boolean;
|
|
37
|
+
style?: StyleProp<ViewStyle>;
|
|
38
|
+
};
|
|
39
|
+
export type SlideButtonProps = SlideButtonOwnProps & Omit<ViewProps, keyof SlideButtonOwnProps> & Omit<ViewStyleProps, keyof SlideButtonOwnProps | keyof ViewProps>;
|
|
40
|
+
type SlideButtonFillOwnProps = {
|
|
41
|
+
children?: never;
|
|
42
|
+
};
|
|
43
|
+
export type SlideButtonFillProps = SlideButtonFillOwnProps & Omit<ViewProps, 'children'> & Omit<ViewStyleProps, keyof ViewProps>;
|
|
44
|
+
export type SlideButtonLabelProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
};
|
|
47
|
+
type SlideButtonThumbOwnProps = {
|
|
48
|
+
/** Replaces the built-in chevron — an `Icon`, or anything else. */
|
|
49
|
+
children?: ReactNode;
|
|
50
|
+
};
|
|
51
|
+
export type SlideButtonThumbProps = SlideButtonThumbOwnProps & Omit<ViewProps, keyof SlideButtonThumbOwnProps> & Omit<ViewStyleProps, keyof SlideButtonThumbOwnProps | keyof ViewProps>;
|
|
52
|
+
export type SlideButtonIconProps = IconProps;
|
|
53
|
+
/** R5 — resolved style ids and the shared progress the animated slots read. */
|
|
54
|
+
export type SlideButtonContextValue = {
|
|
55
|
+
/** The window the trail is cut to — the pill's shape, so the cut stays off the handle. */
|
|
56
|
+
fillClipStyle: StyleProp<ViewStyle>;
|
|
57
|
+
fillStyle: StyleProp<ViewStyle>;
|
|
58
|
+
labelStyle: StyleProp<TextStyle>;
|
|
59
|
+
/** The label's swept copy, already carrying the width the clip must not re-centre it in. */
|
|
60
|
+
labelSweptStyle: StyleProp<TextStyle>;
|
|
61
|
+
thumbStyle: StyleProp<ViewStyle>;
|
|
62
|
+
glyphStyle: StyleProp<ViewStyle>;
|
|
63
|
+
icon: IconContextValue;
|
|
64
|
+
/** The handle's offset from the leading edge, in points, driven on the UI thread. */
|
|
65
|
+
offset: SharedValue<number>;
|
|
66
|
+
/** How far the handle can travel — the track's length less the handle and its insets. */
|
|
67
|
+
travel: number;
|
|
68
|
+
/** The handle's width, the amount the travel is shortened by. */
|
|
69
|
+
thumbSize: number;
|
|
70
|
+
/** The fraction of `travel` the thumb must reach for the slide to count, from 0 to 1. */
|
|
71
|
+
threshold: number;
|
|
72
|
+
isDisabled: boolean;
|
|
73
|
+
isConfirmed: boolean;
|
|
74
|
+
/** Called from the pan on release once the thumb has reached `threshold`. */
|
|
75
|
+
confirm: () => void;
|
|
76
|
+
/** The pill's measured width. Zero until it has been laid out. */
|
|
77
|
+
trackLength: number;
|
|
78
|
+
};
|
|
79
|
+
export {};
|
|
@@ -12,7 +12,7 @@ import type { SliderThumbProps } from './slider.type';
|
|
|
12
12
|
* the scale can stay on the other thread.
|
|
13
13
|
*
|
|
14
14
|
* It is a **disc of the page's own colour inside a ring of the fill's**, which is the
|
|
15
|
-
* legacy component's shape rather than
|
|
15
|
+
* legacy component's shape rather than the reference implementation's capsule-with-a-core. A solid accent knob
|
|
16
16
|
* on an accent fill disappears the moment the value reaches the top; a ring never does.
|
|
17
17
|
*/
|
|
18
18
|
export declare function SliderThumb({ index, accessibilityValueText, style, ...props }: SliderThumbProps): import("react").JSX.Element;
|
|
@@ -12,7 +12,7 @@ import type { SliderThumbProps } from './slider.type';
|
|
|
12
12
|
* the scale can stay on the other thread.
|
|
13
13
|
*
|
|
14
14
|
* It is a **disc of the page's own colour inside a ring of the fill's**, which is the
|
|
15
|
-
* legacy component's shape rather than
|
|
15
|
+
* legacy component's shape rather than the reference implementation's capsule-with-a-core. A solid accent knob
|
|
16
16
|
* on an accent fill disappears the moment the value reaches the top; a ring never does.
|
|
17
17
|
*/
|
|
18
18
|
export declare function SliderThumb({ index, accessibilityValueText, style, ...props }: SliderThumbProps): import("react").JSX.Element;
|
|
@@ -11,7 +11,7 @@ type SizeStep = {
|
|
|
11
11
|
* The legacy slider's proportions, point for point.
|
|
12
12
|
*
|
|
13
13
|
* A **thin rail with a round knob on it**, not a capsule with a core inside — which is what
|
|
14
|
-
* this component shipped as, borrowed from
|
|
14
|
+
* this component shipped as, borrowed from the reference implementation's. The rail is 6 to 10 points and the
|
|
15
15
|
* knob 16 to 24, so the knob overhangs the rail by half their difference on each side. That
|
|
16
16
|
* overhang is the shape: it is what makes the knob read as sitting *on* a line rather than
|
|
17
17
|
* as a segment *of* one.
|
|
@@ -11,7 +11,7 @@ type SizeStep = {
|
|
|
11
11
|
* The legacy slider's proportions, point for point.
|
|
12
12
|
*
|
|
13
13
|
* A **thin rail with a round knob on it**, not a capsule with a core inside — which is what
|
|
14
|
-
* this component shipped as, borrowed from
|
|
14
|
+
* this component shipped as, borrowed from the reference implementation's. The rail is 6 to 10 points and the
|
|
15
15
|
* knob 16 to 24, so the knob overhangs the rail by half their difference on each side. That
|
|
16
16
|
* overhang is the shape: it is what makes the knob read as sitting *on* a line rather than
|
|
17
17
|
* as a segment *of* one.
|
|
@@ -14,7 +14,7 @@ import type { StyleProp, ViewStyle } from 'react-native';
|
|
|
14
14
|
* the same circle with a quarter missing. There is nothing between them for a slot to
|
|
15
15
|
* name, and the two are one figure rather than two parts.
|
|
16
16
|
*
|
|
17
|
-
* It is
|
|
17
|
+
* It is the reference implementation's spinner drawn with borders instead of a gradient stroke. Theirs fades a
|
|
18
18
|
* single arc from opaque to 55%, which needs an SVG `linearGradient` and therefore
|
|
19
19
|
* `react-native-svg` — an optional peer, which a component in the fifteen-component core
|
|
20
20
|
* cannot require. Two circles of one ink at two opacities read as the same figure and
|
|
@@ -14,7 +14,7 @@ import type { StyleProp, ViewStyle } from 'react-native';
|
|
|
14
14
|
* the same circle with a quarter missing. There is nothing between them for a slot to
|
|
15
15
|
* name, and the two are one figure rather than two parts.
|
|
16
16
|
*
|
|
17
|
-
* It is
|
|
17
|
+
* It is the reference implementation's spinner drawn with borders instead of a gradient stroke. Theirs fades a
|
|
18
18
|
* single arc from opaque to 55%, which needs an SVG `linearGradient` and therefore
|
|
19
19
|
* `react-native-svg` — an optional peer, which a component in the fifteen-component core
|
|
20
20
|
* cannot require. Two circles of one ink at two opacities read as the same figure and
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* on two nodes, and they have to arrive together — which they only do if neither owns the
|
|
4
4
|
* number.
|
|
5
5
|
*
|
|
6
|
-
* 175ms is
|
|
6
|
+
* 175ms is the reference implementation's, and it is the length of the platform's own switch.
|
|
7
7
|
*/
|
|
8
8
|
export declare const SWITCH_DURATION = 175;
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* on two nodes, and they have to arrive together — which they only do if neither owns the
|
|
4
4
|
* number.
|
|
5
5
|
*
|
|
6
|
-
* 175ms is
|
|
6
|
+
* 175ms is the reference implementation's, and it is the length of the platform's own switch.
|
|
7
7
|
*/
|
|
8
8
|
export declare const SWITCH_DURATION = 175;
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
18
|
-
require('../../chunk-
|
|
17
|
+
var _chunk435MOVG2cjs = require('../../chunk-435MOVG2.cjs');
|
|
18
|
+
require('../../chunk-BGBJTBFC.cjs');
|
|
19
19
|
require('../../chunk-OE5T7LJQ.cjs');
|
|
20
20
|
require('../../chunk-F6CQ6CBI.cjs');
|
|
21
21
|
require('../../chunk-7EIHHOHP.cjs');
|
|
@@ -45,4 +45,4 @@ require('../../chunk-TK44VBIE.cjs');
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
exports.Table =
|
|
48
|
+
exports.Table = _chunk435MOVG2cjs.Table; exports.TableBody = _chunk435MOVG2cjs.TableBody; exports.TableCell = _chunk435MOVG2cjs.TableCell; exports.TableColumn = _chunk435MOVG2cjs.TableColumn; exports.TableContent = _chunk435MOVG2cjs.TableContent; exports.TableFooter = _chunk435MOVG2cjs.TableFooter; exports.TableHeader = _chunk435MOVG2cjs.TableHeader; exports.TableRoot = _chunk435MOVG2cjs.TableRoot; exports.TableRow = _chunk435MOVG2cjs.TableRow; exports.TableScrollContainer = _chunk435MOVG2cjs.TableScrollContainer; exports.TableSelectAllCell = _chunk435MOVG2cjs.TableSelectAllCell; exports.TableSelectionCell = _chunk435MOVG2cjs.TableSelectionCell; exports.tableRecipe = _chunk435MOVG2cjs.tableRecipe; exports.useTable = _chunk435MOVG2cjs.useTable; exports.useTableRow = _chunk435MOVG2cjs.useTableRow;
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
tableRecipe,
|
|
15
15
|
useTable,
|
|
16
16
|
useTableRow
|
|
17
|
-
} from "../../chunk-
|
|
18
|
-
import "../../chunk-
|
|
17
|
+
} from "../../chunk-356DND54.js";
|
|
18
|
+
import "../../chunk-3BRVAMXQ.js";
|
|
19
19
|
import "../../chunk-BTKWPEOF.js";
|
|
20
20
|
import "../../chunk-BA2DBSAN.js";
|
|
21
21
|
import "../../chunk-F6W3JQ7K.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
4
|
+
var _chunkU6YD3UBOcjs = require('../../chunk-U6YD3UBO.cjs');
|
|
5
|
+
require('../../chunk-2IOL3VDP.cjs');
|
|
6
|
+
require('../../chunk-BKY5YQ7W.cjs');
|
|
7
7
|
require('../../chunk-FHNIGHN5.cjs');
|
|
8
8
|
require('../../chunk-SL3V7R2Y.cjs');
|
|
9
9
|
require('../../chunk-TVJXC4HY.cjs');
|
|
@@ -15,4 +15,4 @@ require('../../chunk-TK44VBIE.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.TextArea =
|
|
18
|
+
exports.TextArea = _chunkU6YD3UBOcjs.TextArea; exports.useTextArea = _chunkU6YD3UBOcjs.useTextArea;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TextArea,
|
|
3
3
|
useTextArea
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-3VMKOQXH.js";
|
|
5
|
+
import "../../chunk-JYV53WUN.js";
|
|
6
|
+
import "../../chunk-NTVPLDJC.js";
|
|
7
7
|
import "../../chunk-WFZDAXDI.js";
|
|
8
8
|
import "../../chunk-DKVXTMIJ.js";
|
|
9
9
|
import "../../chunk-3Q42X6EQ.js";
|
|
@@ -16,7 +16,7 @@ import type { View } from 'react-native';
|
|
|
16
16
|
* `.Error` **are** the `TextField`'s slots — not wrappers around them, the same components —
|
|
17
17
|
* and only `TextArea.Field` differs, by being multiline and by taking its height in lines.
|
|
18
18
|
*
|
|
19
|
-
* That is also
|
|
19
|
+
* That is also the reference implementation's answer: their `TextArea` renders their `TextField` with three defaults.
|
|
20
20
|
* A component of its own is what a caller looks for; sharing every line of it is what
|
|
21
21
|
* keeps the two from drifting.
|
|
22
22
|
*
|
|
@@ -16,7 +16,7 @@ import type { View } from 'react-native';
|
|
|
16
16
|
* `.Error` **are** the `TextField`'s slots — not wrappers around them, the same components —
|
|
17
17
|
* and only `TextArea.Field` differs, by being multiline and by taking its height in lines.
|
|
18
18
|
*
|
|
19
|
-
* That is also
|
|
19
|
+
* That is also the reference implementation's answer: their `TextArea` renders their `TextField` with three defaults.
|
|
20
20
|
* A component of its own is what a caller looks for; sharing every line of it is what
|
|
21
21
|
* keeps the two from drifting.
|
|
22
22
|
*
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk2IOL3VDPcjs = require('../../chunk-2IOL3VDP.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkBKY5YQ7Wcjs = require('../../chunk-BKY5YQ7W.cjs');
|
|
14
14
|
require('../../chunk-FHNIGHN5.cjs');
|
|
15
15
|
require('../../chunk-SL3V7R2Y.cjs');
|
|
16
16
|
require('../../chunk-TVJXC4HY.cjs');
|
|
@@ -29,4 +29,4 @@ require('../../chunk-TK44VBIE.cjs');
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
exports.FIELD_GLYPH_SIZES =
|
|
32
|
+
exports.FIELD_GLYPH_SIZES = _chunkBKY5YQ7Wcjs.FIELD_GLYPH_SIZES; exports.TextField = _chunk2IOL3VDPcjs.TextField; exports.TextFieldDescription = _chunk2IOL3VDPcjs.TextFieldDescription; exports.TextFieldError = _chunk2IOL3VDPcjs.TextFieldError; exports.TextFieldField = _chunk2IOL3VDPcjs.TextFieldField; exports.TextFieldLabel = _chunk2IOL3VDPcjs.TextFieldLabel; exports.TextFieldRoot = _chunk2IOL3VDPcjs.TextFieldRoot; exports.textFieldRecipe = _chunkBKY5YQ7Wcjs.textFieldRecipe; exports.useTextField = _chunk2IOL3VDPcjs.useTextField;
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
TextFieldLabel,
|
|
7
7
|
TextFieldRoot,
|
|
8
8
|
useTextField
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-JYV53WUN.js";
|
|
10
10
|
import {
|
|
11
11
|
FIELD_GLYPH_SIZES,
|
|
12
12
|
textFieldRecipe
|
|
13
|
-
} from "../../chunk-
|
|
13
|
+
} from "../../chunk-NTVPLDJC.js";
|
|
14
14
|
import "../../chunk-WFZDAXDI.js";
|
|
15
15
|
import "../../chunk-DKVXTMIJ.js";
|
|
16
16
|
import "../../chunk-3Q42X6EQ.js";
|
|
@@ -9,11 +9,11 @@ export type TextFieldSlot = 'root' | 'label' | 'field' | 'textArea' | 'placehold
|
|
|
9
9
|
* `success`, `warning` and `danger` are absent here for the same reason they are there.
|
|
10
10
|
*
|
|
11
11
|
* This is where the theme's `field*` family is finally read, and the four names split
|
|
12
|
-
*
|
|
12
|
+
* the reference implementation's two-name `primary | secondary` by saying what each of their ends already is:
|
|
13
13
|
*
|
|
14
|
-
* - **`primary`** — the `fieldBackground` fill plus the theme's `field` shadow.
|
|
14
|
+
* - **`primary`** — the `fieldBackground` fill plus the theme's `field` shadow. The reference implementation's
|
|
15
15
|
* `primary`, with the elevation their flat token only implies.
|
|
16
|
-
* - **`secondary`** — the neutral `default` fill.
|
|
16
|
+
* - **`secondary`** — the neutral `default` fill. The reference implementation's `secondary`, and the default
|
|
17
17
|
* here: on a plain background a white field is its border and nothing else, while on a
|
|
18
18
|
* card the `fieldBackground` token *is* the card's own colour.
|
|
19
19
|
* - **`tertiary`** — the border alone, no fill. The same drop the `Button`'s `tertiary`
|
|
@@ -22,7 +22,7 @@ export type TextFieldSlot = 'root' | 'label' | 'field' | 'textArea' | 'placehold
|
|
|
22
22
|
* to move, so its focus shows in the caret alone.
|
|
23
23
|
*
|
|
24
24
|
* The first three name the `fieldBorder` edge and `ghost` gives it up. Its width is the
|
|
25
|
-
* theme's `borderWidth.field` —
|
|
25
|
+
* theme's `borderWidth.field` — the reference implementation's `--field-border-width`, which they ship at `0`
|
|
26
26
|
* and we ship at `1`. That is the one shipped default where the two differ;
|
|
27
27
|
* `createTheme({ borderWidth: { field: 0 } })` reproduces theirs.
|
|
28
28
|
*/
|
|
@@ -9,11 +9,11 @@ export type TextFieldSlot = 'root' | 'label' | 'field' | 'textArea' | 'placehold
|
|
|
9
9
|
* `success`, `warning` and `danger` are absent here for the same reason they are there.
|
|
10
10
|
*
|
|
11
11
|
* This is where the theme's `field*` family is finally read, and the four names split
|
|
12
|
-
*
|
|
12
|
+
* the reference implementation's two-name `primary | secondary` by saying what each of their ends already is:
|
|
13
13
|
*
|
|
14
|
-
* - **`primary`** — the `fieldBackground` fill plus the theme's `field` shadow.
|
|
14
|
+
* - **`primary`** — the `fieldBackground` fill plus the theme's `field` shadow. The reference implementation's
|
|
15
15
|
* `primary`, with the elevation their flat token only implies.
|
|
16
|
-
* - **`secondary`** — the neutral `default` fill.
|
|
16
|
+
* - **`secondary`** — the neutral `default` fill. The reference implementation's `secondary`, and the default
|
|
17
17
|
* here: on a plain background a white field is its border and nothing else, while on a
|
|
18
18
|
* card the `fieldBackground` token *is* the card's own colour.
|
|
19
19
|
* - **`tertiary`** — the border alone, no fill. The same drop the `Button`'s `tertiary`
|
|
@@ -22,7 +22,7 @@ export type TextFieldSlot = 'root' | 'label' | 'field' | 'textArea' | 'placehold
|
|
|
22
22
|
* to move, so its focus shows in the caret alone.
|
|
23
23
|
*
|
|
24
24
|
* The first three name the `fieldBorder` edge and `ghost` gives it up. Its width is the
|
|
25
|
-
* theme's `borderWidth.field` —
|
|
25
|
+
* theme's `borderWidth.field` — the reference implementation's `--field-border-width`, which they ship at `0`
|
|
26
26
|
* and we ship at `1`. That is the one shipped default where the two differ;
|
|
27
27
|
* `createTheme({ borderWidth: { field: 0 } })` reproduces theirs.
|
|
28
28
|
*/
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
require('../../chunk-
|
|
14
|
-
require('../../chunk-
|
|
12
|
+
var _chunkV5V2QYFHcjs = require('../../chunk-V5V2QYFH.cjs');
|
|
13
|
+
require('../../chunk-3TBT6ORW.cjs');
|
|
14
|
+
require('../../chunk-L4B6Z45Q.cjs');
|
|
15
15
|
require('../../chunk-WDDXU3OH.cjs');
|
|
16
16
|
require('../../chunk-EKS3W46M.cjs');
|
|
17
17
|
require('../../chunk-7EIHHOHP.cjs');
|
|
@@ -37,4 +37,4 @@ require('../../chunk-TK44VBIE.cjs');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
exports.TimePicker =
|
|
40
|
+
exports.TimePicker = _chunkV5V2QYFHcjs.TimePicker2; exports.TimePickerClock = _chunkV5V2QYFHcjs.TimePickerClock; exports.TimePickerDisplay = _chunkV5V2QYFHcjs.TimePickerDisplay; exports.TimePickerIndicator = _chunkV5V2QYFHcjs.TimePickerIndicator; exports.TimePickerRoot = _chunkV5V2QYFHcjs.TimePicker; exports.TimePickerSheet = _chunkV5V2QYFHcjs.TimePickerSheet; exports.TimePickerTrigger = _chunkV5V2QYFHcjs.TimePickerTrigger; exports.TimePickerValue = _chunkV5V2QYFHcjs.TimePickerValue; exports.timePickerRecipe = _chunkV5V2QYFHcjs.timePickerRecipe; exports.useTimePicker = _chunkV5V2QYFHcjs.useTimePicker;
|