blend-native 0.0.1-beta.0
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/README.md +404 -0
- package/lib/commonjs/a11y/announcement.js +42 -0
- package/lib/commonjs/a11y/announcement.js.map +1 -0
- package/lib/commonjs/a11y/useLiveRegion.js +37 -0
- package/lib/commonjs/a11y/useLiveRegion.js.map +1 -0
- package/lib/commonjs/adapters/cssStringAdapter.js +363 -0
- package/lib/commonjs/adapters/cssStringAdapter.js.map +1 -0
- package/lib/commonjs/adapters/optionalGradient.js +33 -0
- package/lib/commonjs/adapters/optionalGradient.js.map +1 -0
- package/lib/commonjs/adapters/surfaceStyle.js +159 -0
- package/lib/commonjs/adapters/surfaceStyle.js.map +1 -0
- package/lib/commonjs/components/Alert/Alert.js +130 -0
- package/lib/commonjs/components/Alert/Alert.js.map +1 -0
- package/lib/commonjs/components/Alert/AlertActions.js +74 -0
- package/lib/commonjs/components/Alert/AlertActions.js.map +1 -0
- package/lib/commonjs/components/Alert/AlertClose.js +48 -0
- package/lib/commonjs/components/Alert/AlertClose.js.map +1 -0
- package/lib/commonjs/components/Alert/AlertText.js +49 -0
- package/lib/commonjs/components/Alert/AlertText.js.map +1 -0
- package/lib/commonjs/components/Alert/alert.tokens.js +6 -0
- package/lib/commonjs/components/Alert/alert.tokens.js.map +1 -0
- package/lib/commonjs/components/Alert/alert.types.js +6 -0
- package/lib/commonjs/components/Alert/alert.types.js.map +1 -0
- package/lib/commonjs/components/Alert/alert.utils.js +80 -0
- package/lib/commonjs/components/Alert/alert.utils.js.map +1 -0
- package/lib/commonjs/components/Alert/index.js +51 -0
- package/lib/commonjs/components/Alert/index.js.map +1 -0
- package/lib/commonjs/components/Button/Button.js +125 -0
- package/lib/commonjs/components/Button/Button.js.map +1 -0
- package/lib/commonjs/components/Button/button.types.js +6 -0
- package/lib/commonjs/components/Button/button.types.js.map +1 -0
- package/lib/commonjs/components/Button/button.utils.js +129 -0
- package/lib/commonjs/components/Button/button.utils.js.map +1 -0
- package/lib/commonjs/components/Button/index.js +57 -0
- package/lib/commonjs/components/Button/index.js.map +1 -0
- package/lib/commonjs/components/Skeleton/Skeleton.js +154 -0
- package/lib/commonjs/components/Skeleton/Skeleton.js.map +1 -0
- package/lib/commonjs/components/Skeleton/index.js +20 -0
- package/lib/commonjs/components/Skeleton/index.js.map +1 -0
- package/lib/commonjs/components/Skeleton/skeleton.types.js +6 -0
- package/lib/commonjs/components/Skeleton/skeleton.types.js.map +1 -0
- package/lib/commonjs/components/Skeleton/skeleton.utils.js +45 -0
- package/lib/commonjs/components/Skeleton/skeleton.utils.js.map +1 -0
- package/lib/commonjs/components/Tag/Tag.js +161 -0
- package/lib/commonjs/components/Tag/Tag.js.map +1 -0
- package/lib/commonjs/components/Tag/index.js +33 -0
- package/lib/commonjs/components/Tag/index.js.map +1 -0
- package/lib/commonjs/components/Tag/tag.types.js +6 -0
- package/lib/commonjs/components/Tag/tag.types.js.map +1 -0
- package/lib/commonjs/components/Tag/tag.utils.js +69 -0
- package/lib/commonjs/components/Tag/tag.utils.js.map +1 -0
- package/lib/commonjs/components/TextInput/TextInput.js +138 -0
- package/lib/commonjs/components/TextInput/TextInput.js.map +1 -0
- package/lib/commonjs/components/TextInput/index.js +14 -0
- package/lib/commonjs/components/TextInput/index.js.map +1 -0
- package/lib/commonjs/components/TextInput/textInput.types.js +6 -0
- package/lib/commonjs/components/TextInput/textInput.types.js.map +1 -0
- package/lib/commonjs/components/TextInput/textInput.utils.js +40 -0
- package/lib/commonjs/components/TextInput/textInput.utils.js.map +1 -0
- package/lib/commonjs/components/shared/field/FieldFooter.js +51 -0
- package/lib/commonjs/components/shared/field/FieldFooter.js.map +1 -0
- package/lib/commonjs/components/shared/field/FieldLabels.js +67 -0
- package/lib/commonjs/components/shared/field/FieldLabels.js.map +1 -0
- package/lib/commonjs/components/shared/field/fieldState.js +37 -0
- package/lib/commonjs/components/shared/field/fieldState.js.map +1 -0
- package/lib/commonjs/components/shared/group.js +73 -0
- package/lib/commonjs/components/shared/group.js.map +1 -0
- package/lib/commonjs/index.js +256 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/motion/motion.js +128 -0
- package/lib/commonjs/motion/motion.js.map +1 -0
- package/lib/commonjs/motion/useReduceMotion.js +37 -0
- package/lib/commonjs/motion/useReduceMotion.js.map +1 -0
- package/lib/commonjs/overlay/portal.js +110 -0
- package/lib/commonjs/overlay/portal.js.map +1 -0
- package/lib/commonjs/overlay/positioning.js +122 -0
- package/lib/commonjs/overlay/positioning.js.map +1 -0
- package/lib/commonjs/overlay/safeAreaInsets.js +30 -0
- package/lib/commonjs/overlay/safeAreaInsets.js.map +1 -0
- package/lib/commonjs/overlay/sheet/BottomSheet.js +196 -0
- package/lib/commonjs/overlay/sheet/BottomSheet.js.map +1 -0
- package/lib/commonjs/overlay/sheet/sheetMath.js +60 -0
- package/lib/commonjs/overlay/sheet/sheetMath.js.map +1 -0
- package/lib/commonjs/overlay/toast/ToastOutlet.js +106 -0
- package/lib/commonjs/overlay/toast/ToastOutlet.js.map +1 -0
- package/lib/commonjs/overlay/toast/toastStore.js +76 -0
- package/lib/commonjs/overlay/toast/toastStore.js.map +1 -0
- package/lib/commonjs/overlay/useAnchoredPosition.js +85 -0
- package/lib/commonjs/overlay/useAnchoredPosition.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/primitives/Block.js +112 -0
- package/lib/commonjs/primitives/Block.js.map +1 -0
- package/lib/commonjs/primitives/Pressable.js +348 -0
- package/lib/commonjs/primitives/Pressable.js.map +1 -0
- package/lib/commonjs/primitives/PrimitiveInput.js +66 -0
- package/lib/commonjs/primitives/PrimitiveInput.js.map +1 -0
- package/lib/commonjs/primitives/Separator.js +55 -0
- package/lib/commonjs/primitives/Separator.js.map +1 -0
- package/lib/commonjs/primitives/Slot.js +78 -0
- package/lib/commonjs/primitives/Slot.js.map +1 -0
- package/lib/commonjs/primitives/Text.js +73 -0
- package/lib/commonjs/primitives/Text.js.map +1 -0
- package/lib/commonjs/primitives/pressFeedback.js +53 -0
- package/lib/commonjs/primitives/pressFeedback.js.map +1 -0
- package/lib/commonjs/primitives/textStyle.js +27 -0
- package/lib/commonjs/primitives/textStyle.js.map +1 -0
- package/lib/commonjs/primitives/tintSlot.js +45 -0
- package/lib/commonjs/primitives/tintSlot.js.map +1 -0
- package/lib/commonjs/primitives/touchTarget.js +64 -0
- package/lib/commonjs/primitives/touchTarget.js.map +1 -0
- package/lib/commonjs/theme/BlendNativeProvider.js +90 -0
- package/lib/commonjs/theme/BlendNativeProvider.js.map +1 -0
- package/lib/commonjs/theme/breakpoint.js +36 -0
- package/lib/commonjs/theme/breakpoint.js.map +1 -0
- package/lib/commonjs/theme/fonts.js +58 -0
- package/lib/commonjs/theme/fonts.js.map +1 -0
- package/lib/commonjs/theme/nativeTokenRegistry.js +44 -0
- package/lib/commonjs/theme/nativeTokenRegistry.js.map +1 -0
- package/lib/commonjs/theme/systemTheme.js +35 -0
- package/lib/commonjs/theme/systemTheme.js.map +1 -0
- package/lib/commonjs/theme/useNativeBreakpoint.js +33 -0
- package/lib/commonjs/theme/useNativeBreakpoint.js.map +1 -0
- package/lib/commonjs/theme/useNativeTokens.js +71 -0
- package/lib/commonjs/theme/useNativeTokens.js.map +1 -0
- package/lib/module/a11y/announcement.js +38 -0
- package/lib/module/a11y/announcement.js.map +1 -0
- package/lib/module/a11y/useLiveRegion.js +33 -0
- package/lib/module/a11y/useLiveRegion.js.map +1 -0
- package/lib/module/adapters/cssStringAdapter.js +352 -0
- package/lib/module/adapters/cssStringAdapter.js.map +1 -0
- package/lib/module/adapters/optionalGradient.js +29 -0
- package/lib/module/adapters/optionalGradient.js.map +1 -0
- package/lib/module/adapters/surfaceStyle.js +155 -0
- package/lib/module/adapters/surfaceStyle.js.map +1 -0
- package/lib/module/components/Alert/Alert.js +126 -0
- package/lib/module/components/Alert/Alert.js.map +1 -0
- package/lib/module/components/Alert/AlertActions.js +70 -0
- package/lib/module/components/Alert/AlertActions.js.map +1 -0
- package/lib/module/components/Alert/AlertClose.js +44 -0
- package/lib/module/components/Alert/AlertClose.js.map +1 -0
- package/lib/module/components/Alert/AlertText.js +45 -0
- package/lib/module/components/Alert/AlertText.js.map +1 -0
- package/lib/module/components/Alert/alert.tokens.js +4 -0
- package/lib/module/components/Alert/alert.tokens.js.map +1 -0
- package/lib/module/components/Alert/alert.types.js +4 -0
- package/lib/module/components/Alert/alert.types.js.map +1 -0
- package/lib/module/components/Alert/alert.utils.js +72 -0
- package/lib/module/components/Alert/alert.utils.js.map +1 -0
- package/lib/module/components/Alert/index.js +6 -0
- package/lib/module/components/Alert/index.js.map +1 -0
- package/lib/module/components/Button/Button.js +121 -0
- package/lib/module/components/Button/Button.js.map +1 -0
- package/lib/module/components/Button/button.types.js +4 -0
- package/lib/module/components/Button/button.types.js.map +1 -0
- package/lib/module/components/Button/button.utils.js +120 -0
- package/lib/module/components/Button/button.utils.js.map +1 -0
- package/lib/module/components/Button/index.js +5 -0
- package/lib/module/components/Button/index.js.map +1 -0
- package/lib/module/components/Skeleton/Skeleton.js +149 -0
- package/lib/module/components/Skeleton/Skeleton.js.map +1 -0
- package/lib/module/components/Skeleton/index.js +4 -0
- package/lib/module/components/Skeleton/index.js.map +1 -0
- package/lib/module/components/Skeleton/skeleton.types.js +4 -0
- package/lib/module/components/Skeleton/skeleton.types.js.map +1 -0
- package/lib/module/components/Skeleton/skeleton.utils.js +40 -0
- package/lib/module/components/Skeleton/skeleton.utils.js.map +1 -0
- package/lib/module/components/Tag/Tag.js +157 -0
- package/lib/module/components/Tag/Tag.js.map +1 -0
- package/lib/module/components/Tag/index.js +5 -0
- package/lib/module/components/Tag/index.js.map +1 -0
- package/lib/module/components/Tag/tag.types.js +4 -0
- package/lib/module/components/Tag/tag.types.js.map +1 -0
- package/lib/module/components/Tag/tag.utils.js +64 -0
- package/lib/module/components/Tag/tag.utils.js.map +1 -0
- package/lib/module/components/TextInput/TextInput.js +134 -0
- package/lib/module/components/TextInput/TextInput.js.map +1 -0
- package/lib/module/components/TextInput/index.js +4 -0
- package/lib/module/components/TextInput/index.js.map +1 -0
- package/lib/module/components/TextInput/textInput.types.js +4 -0
- package/lib/module/components/TextInput/textInput.types.js.map +1 -0
- package/lib/module/components/TextInput/textInput.utils.js +36 -0
- package/lib/module/components/TextInput/textInput.utils.js.map +1 -0
- package/lib/module/components/shared/field/FieldFooter.js +47 -0
- package/lib/module/components/shared/field/FieldFooter.js.map +1 -0
- package/lib/module/components/shared/field/FieldLabels.js +63 -0
- package/lib/module/components/shared/field/FieldLabels.js.map +1 -0
- package/lib/module/components/shared/field/fieldState.js +33 -0
- package/lib/module/components/shared/field/fieldState.js.map +1 -0
- package/lib/module/components/shared/group.js +68 -0
- package/lib/module/components/shared/group.js.map +1 -0
- package/lib/module/index.js +80 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/motion/motion.js +123 -0
- package/lib/module/motion/motion.js.map +1 -0
- package/lib/module/motion/useReduceMotion.js +33 -0
- package/lib/module/motion/useReduceMotion.js.map +1 -0
- package/lib/module/overlay/portal.js +104 -0
- package/lib/module/overlay/portal.js.map +1 -0
- package/lib/module/overlay/positioning.js +118 -0
- package/lib/module/overlay/positioning.js.map +1 -0
- package/lib/module/overlay/safeAreaInsets.js +27 -0
- package/lib/module/overlay/safeAreaInsets.js.map +1 -0
- package/lib/module/overlay/sheet/BottomSheet.js +190 -0
- package/lib/module/overlay/sheet/BottomSheet.js.map +1 -0
- package/lib/module/overlay/sheet/sheetMath.js +53 -0
- package/lib/module/overlay/sheet/sheetMath.js.map +1 -0
- package/lib/module/overlay/toast/ToastOutlet.js +101 -0
- package/lib/module/overlay/toast/ToastOutlet.js.map +1 -0
- package/lib/module/overlay/toast/toastStore.js +66 -0
- package/lib/module/overlay/toast/toastStore.js.map +1 -0
- package/lib/module/overlay/useAnchoredPosition.js +82 -0
- package/lib/module/overlay/useAnchoredPosition.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/primitives/Block.js +107 -0
- package/lib/module/primitives/Block.js.map +1 -0
- package/lib/module/primitives/Pressable.js +339 -0
- package/lib/module/primitives/Pressable.js.map +1 -0
- package/lib/module/primitives/PrimitiveInput.js +62 -0
- package/lib/module/primitives/PrimitiveInput.js.map +1 -0
- package/lib/module/primitives/Separator.js +50 -0
- package/lib/module/primitives/Separator.js.map +1 -0
- package/lib/module/primitives/Slot.js +69 -0
- package/lib/module/primitives/Slot.js.map +1 -0
- package/lib/module/primitives/Text.js +68 -0
- package/lib/module/primitives/Text.js.map +1 -0
- package/lib/module/primitives/pressFeedback.js +48 -0
- package/lib/module/primitives/pressFeedback.js.map +1 -0
- package/lib/module/primitives/textStyle.js +23 -0
- package/lib/module/primitives/textStyle.js.map +1 -0
- package/lib/module/primitives/tintSlot.js +42 -0
- package/lib/module/primitives/tintSlot.js.map +1 -0
- package/lib/module/primitives/touchTarget.js +58 -0
- package/lib/module/primitives/touchTarget.js.map +1 -0
- package/lib/module/theme/BlendNativeProvider.js +78 -0
- package/lib/module/theme/BlendNativeProvider.js.map +1 -0
- package/lib/module/theme/breakpoint.js +33 -0
- package/lib/module/theme/breakpoint.js.map +1 -0
- package/lib/module/theme/fonts.js +55 -0
- package/lib/module/theme/fonts.js.map +1 -0
- package/lib/module/theme/nativeTokenRegistry.js +40 -0
- package/lib/module/theme/nativeTokenRegistry.js.map +1 -0
- package/lib/module/theme/systemTheme.js +31 -0
- package/lib/module/theme/systemTheme.js.map +1 -0
- package/lib/module/theme/useNativeBreakpoint.js +24 -0
- package/lib/module/theme/useNativeBreakpoint.js.map +1 -0
- package/lib/module/theme/useNativeTokens.js +67 -0
- package/lib/module/theme/useNativeTokens.js.map +1 -0
- package/lib/typescript/commonjs/a11y/announcement.d.ts +26 -0
- package/lib/typescript/commonjs/a11y/announcement.d.ts.map +1 -0
- package/lib/typescript/commonjs/a11y/useLiveRegion.d.ts +17 -0
- package/lib/typescript/commonjs/a11y/useLiveRegion.d.ts.map +1 -0
- package/lib/typescript/commonjs/adapters/cssStringAdapter.d.ts +119 -0
- package/lib/typescript/commonjs/adapters/cssStringAdapter.d.ts.map +1 -0
- package/lib/typescript/commonjs/adapters/optionalGradient.d.ts +32 -0
- package/lib/typescript/commonjs/adapters/optionalGradient.d.ts.map +1 -0
- package/lib/typescript/commonjs/adapters/surfaceStyle.d.ts +75 -0
- package/lib/typescript/commonjs/adapters/surfaceStyle.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Alert/Alert.d.ts +14 -0
- package/lib/typescript/commonjs/components/Alert/Alert.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Alert/AlertActions.d.ts +13 -0
- package/lib/typescript/commonjs/components/Alert/AlertActions.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Alert/AlertClose.d.ts +22 -0
- package/lib/typescript/commonjs/components/Alert/AlertClose.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Alert/AlertText.d.ts +19 -0
- package/lib/typescript/commonjs/components/Alert/AlertText.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Alert/alert.tokens.d.ts +17 -0
- package/lib/typescript/commonjs/components/Alert/alert.tokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Alert/alert.types.d.ts +70 -0
- package/lib/typescript/commonjs/components/Alert/alert.types.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Alert/alert.utils.d.ts +58 -0
- package/lib/typescript/commonjs/components/Alert/alert.utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Alert/index.d.ts +7 -0
- package/lib/typescript/commonjs/components/Alert/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Button/Button.d.ts +22 -0
- package/lib/typescript/commonjs/components/Button/Button.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Button/button.types.d.ts +37 -0
- package/lib/typescript/commonjs/components/Button/button.types.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Button/button.utils.d.ts +98 -0
- package/lib/typescript/commonjs/components/Button/button.utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Button/index.d.ts +5 -0
- package/lib/typescript/commonjs/components/Button/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +7 -0
- package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Skeleton/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Skeleton/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Skeleton/skeleton.types.d.ts +25 -0
- package/lib/typescript/commonjs/components/Skeleton/skeleton.types.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Skeleton/skeleton.utils.d.ts +21 -0
- package/lib/typescript/commonjs/components/Skeleton/skeleton.utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Tag/Tag.d.ts +21 -0
- package/lib/typescript/commonjs/components/Tag/Tag.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Tag/index.d.ts +4 -0
- package/lib/typescript/commonjs/components/Tag/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Tag/tag.types.d.ts +56 -0
- package/lib/typescript/commonjs/components/Tag/tag.types.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Tag/tag.utils.d.ts +41 -0
- package/lib/typescript/commonjs/components/Tag/tag.utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/TextInput/TextInput.d.ts +33 -0
- package/lib/typescript/commonjs/components/TextInput/TextInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/TextInput/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/TextInput/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/TextInput/textInput.types.d.ts +45 -0
- package/lib/typescript/commonjs/components/TextInput/textInput.types.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/TextInput/textInput.utils.d.ts +35 -0
- package/lib/typescript/commonjs/components/TextInput/textInput.utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/shared/field/FieldFooter.d.ts +22 -0
- package/lib/typescript/commonjs/components/shared/field/FieldFooter.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/shared/field/FieldLabels.d.ts +27 -0
- package/lib/typescript/commonjs/components/shared/field/FieldLabels.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/shared/field/fieldState.d.ts +23 -0
- package/lib/typescript/commonjs/components/shared/field/fieldState.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/shared/group.d.ts +50 -0
- package/lib/typescript/commonjs/components/shared/group.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +74 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/motion/motion.d.ts +121 -0
- package/lib/typescript/commonjs/motion/motion.d.ts.map +1 -0
- package/lib/typescript/commonjs/motion/useReduceMotion.d.ts +14 -0
- package/lib/typescript/commonjs/motion/useReduceMotion.d.ts.map +1 -0
- package/lib/typescript/commonjs/overlay/portal.d.ts +20 -0
- package/lib/typescript/commonjs/overlay/portal.d.ts.map +1 -0
- package/lib/typescript/commonjs/overlay/positioning.d.ts +65 -0
- package/lib/typescript/commonjs/overlay/positioning.d.ts.map +1 -0
- package/lib/typescript/commonjs/overlay/safeAreaInsets.d.ts +19 -0
- package/lib/typescript/commonjs/overlay/safeAreaInsets.d.ts.map +1 -0
- package/lib/typescript/commonjs/overlay/sheet/BottomSheet.d.ts +56 -0
- package/lib/typescript/commonjs/overlay/sheet/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/commonjs/overlay/sheet/sheetMath.d.ts +32 -0
- package/lib/typescript/commonjs/overlay/sheet/sheetMath.d.ts.map +1 -0
- package/lib/typescript/commonjs/overlay/toast/ToastOutlet.d.ts +17 -0
- package/lib/typescript/commonjs/overlay/toast/ToastOutlet.d.ts.map +1 -0
- package/lib/typescript/commonjs/overlay/toast/toastStore.d.ts +45 -0
- package/lib/typescript/commonjs/overlay/toast/toastStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/overlay/useAnchoredPosition.d.ts +40 -0
- package/lib/typescript/commonjs/overlay/useAnchoredPosition.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/primitives/Block.d.ts +37 -0
- package/lib/typescript/commonjs/primitives/Block.d.ts.map +1 -0
- package/lib/typescript/commonjs/primitives/Pressable.d.ts +135 -0
- package/lib/typescript/commonjs/primitives/Pressable.d.ts.map +1 -0
- package/lib/typescript/commonjs/primitives/PrimitiveInput.d.ts +42 -0
- package/lib/typescript/commonjs/primitives/PrimitiveInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/primitives/Separator.d.ts +28 -0
- package/lib/typescript/commonjs/primitives/Separator.d.ts.map +1 -0
- package/lib/typescript/commonjs/primitives/Slot.d.ts +48 -0
- package/lib/typescript/commonjs/primitives/Slot.d.ts.map +1 -0
- package/lib/typescript/commonjs/primitives/Text.d.ts +50 -0
- package/lib/typescript/commonjs/primitives/Text.d.ts.map +1 -0
- package/lib/typescript/commonjs/primitives/pressFeedback.d.ts +39 -0
- package/lib/typescript/commonjs/primitives/pressFeedback.d.ts.map +1 -0
- package/lib/typescript/commonjs/primitives/textStyle.d.ts +13 -0
- package/lib/typescript/commonjs/primitives/textStyle.d.ts.map +1 -0
- package/lib/typescript/commonjs/primitives/tintSlot.d.ts +10 -0
- package/lib/typescript/commonjs/primitives/tintSlot.d.ts.map +1 -0
- package/lib/typescript/commonjs/primitives/touchTarget.d.ts +43 -0
- package/lib/typescript/commonjs/primitives/touchTarget.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/BlendNativeProvider.d.ts +69 -0
- package/lib/typescript/commonjs/theme/BlendNativeProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/breakpoint.d.ts +27 -0
- package/lib/typescript/commonjs/theme/breakpoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/fonts.d.ts +34 -0
- package/lib/typescript/commonjs/theme/fonts.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/nativeTokenRegistry.d.ts +34 -0
- package/lib/typescript/commonjs/theme/nativeTokenRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/systemTheme.d.ts +25 -0
- package/lib/typescript/commonjs/theme/systemTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/useNativeBreakpoint.d.ts +17 -0
- package/lib/typescript/commonjs/theme/useNativeBreakpoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/useNativeTokens.d.ts +4 -0
- package/lib/typescript/commonjs/theme/useNativeTokens.d.ts.map +1 -0
- package/lib/typescript/module/a11y/announcement.d.ts +26 -0
- package/lib/typescript/module/a11y/announcement.d.ts.map +1 -0
- package/lib/typescript/module/a11y/useLiveRegion.d.ts +17 -0
- package/lib/typescript/module/a11y/useLiveRegion.d.ts.map +1 -0
- package/lib/typescript/module/adapters/cssStringAdapter.d.ts +119 -0
- package/lib/typescript/module/adapters/cssStringAdapter.d.ts.map +1 -0
- package/lib/typescript/module/adapters/optionalGradient.d.ts +32 -0
- package/lib/typescript/module/adapters/optionalGradient.d.ts.map +1 -0
- package/lib/typescript/module/adapters/surfaceStyle.d.ts +75 -0
- package/lib/typescript/module/adapters/surfaceStyle.d.ts.map +1 -0
- package/lib/typescript/module/components/Alert/Alert.d.ts +14 -0
- package/lib/typescript/module/components/Alert/Alert.d.ts.map +1 -0
- package/lib/typescript/module/components/Alert/AlertActions.d.ts +13 -0
- package/lib/typescript/module/components/Alert/AlertActions.d.ts.map +1 -0
- package/lib/typescript/module/components/Alert/AlertClose.d.ts +22 -0
- package/lib/typescript/module/components/Alert/AlertClose.d.ts.map +1 -0
- package/lib/typescript/module/components/Alert/AlertText.d.ts +19 -0
- package/lib/typescript/module/components/Alert/AlertText.d.ts.map +1 -0
- package/lib/typescript/module/components/Alert/alert.tokens.d.ts +17 -0
- package/lib/typescript/module/components/Alert/alert.tokens.d.ts.map +1 -0
- package/lib/typescript/module/components/Alert/alert.types.d.ts +70 -0
- package/lib/typescript/module/components/Alert/alert.types.d.ts.map +1 -0
- package/lib/typescript/module/components/Alert/alert.utils.d.ts +58 -0
- package/lib/typescript/module/components/Alert/alert.utils.d.ts.map +1 -0
- package/lib/typescript/module/components/Alert/index.d.ts +7 -0
- package/lib/typescript/module/components/Alert/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Button/Button.d.ts +22 -0
- package/lib/typescript/module/components/Button/Button.d.ts.map +1 -0
- package/lib/typescript/module/components/Button/button.types.d.ts +37 -0
- package/lib/typescript/module/components/Button/button.types.d.ts.map +1 -0
- package/lib/typescript/module/components/Button/button.utils.d.ts +98 -0
- package/lib/typescript/module/components/Button/button.utils.d.ts.map +1 -0
- package/lib/typescript/module/components/Button/index.d.ts +5 -0
- package/lib/typescript/module/components/Button/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +7 -0
- package/lib/typescript/module/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/lib/typescript/module/components/Skeleton/index.d.ts +3 -0
- package/lib/typescript/module/components/Skeleton/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Skeleton/skeleton.types.d.ts +25 -0
- package/lib/typescript/module/components/Skeleton/skeleton.types.d.ts.map +1 -0
- package/lib/typescript/module/components/Skeleton/skeleton.utils.d.ts +21 -0
- package/lib/typescript/module/components/Skeleton/skeleton.utils.d.ts.map +1 -0
- package/lib/typescript/module/components/Tag/Tag.d.ts +21 -0
- package/lib/typescript/module/components/Tag/Tag.d.ts.map +1 -0
- package/lib/typescript/module/components/Tag/index.d.ts +4 -0
- package/lib/typescript/module/components/Tag/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Tag/tag.types.d.ts +56 -0
- package/lib/typescript/module/components/Tag/tag.types.d.ts.map +1 -0
- package/lib/typescript/module/components/Tag/tag.utils.d.ts +41 -0
- package/lib/typescript/module/components/Tag/tag.utils.d.ts.map +1 -0
- package/lib/typescript/module/components/TextInput/TextInput.d.ts +33 -0
- package/lib/typescript/module/components/TextInput/TextInput.d.ts.map +1 -0
- package/lib/typescript/module/components/TextInput/index.d.ts +3 -0
- package/lib/typescript/module/components/TextInput/index.d.ts.map +1 -0
- package/lib/typescript/module/components/TextInput/textInput.types.d.ts +45 -0
- package/lib/typescript/module/components/TextInput/textInput.types.d.ts.map +1 -0
- package/lib/typescript/module/components/TextInput/textInput.utils.d.ts +35 -0
- package/lib/typescript/module/components/TextInput/textInput.utils.d.ts.map +1 -0
- package/lib/typescript/module/components/shared/field/FieldFooter.d.ts +22 -0
- package/lib/typescript/module/components/shared/field/FieldFooter.d.ts.map +1 -0
- package/lib/typescript/module/components/shared/field/FieldLabels.d.ts +27 -0
- package/lib/typescript/module/components/shared/field/FieldLabels.d.ts.map +1 -0
- package/lib/typescript/module/components/shared/field/fieldState.d.ts +23 -0
- package/lib/typescript/module/components/shared/field/fieldState.d.ts.map +1 -0
- package/lib/typescript/module/components/shared/group.d.ts +50 -0
- package/lib/typescript/module/components/shared/group.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +74 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/motion/motion.d.ts +121 -0
- package/lib/typescript/module/motion/motion.d.ts.map +1 -0
- package/lib/typescript/module/motion/useReduceMotion.d.ts +14 -0
- package/lib/typescript/module/motion/useReduceMotion.d.ts.map +1 -0
- package/lib/typescript/module/overlay/portal.d.ts +20 -0
- package/lib/typescript/module/overlay/portal.d.ts.map +1 -0
- package/lib/typescript/module/overlay/positioning.d.ts +65 -0
- package/lib/typescript/module/overlay/positioning.d.ts.map +1 -0
- package/lib/typescript/module/overlay/safeAreaInsets.d.ts +19 -0
- package/lib/typescript/module/overlay/safeAreaInsets.d.ts.map +1 -0
- package/lib/typescript/module/overlay/sheet/BottomSheet.d.ts +56 -0
- package/lib/typescript/module/overlay/sheet/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/module/overlay/sheet/sheetMath.d.ts +32 -0
- package/lib/typescript/module/overlay/sheet/sheetMath.d.ts.map +1 -0
- package/lib/typescript/module/overlay/toast/ToastOutlet.d.ts +17 -0
- package/lib/typescript/module/overlay/toast/ToastOutlet.d.ts.map +1 -0
- package/lib/typescript/module/overlay/toast/toastStore.d.ts +45 -0
- package/lib/typescript/module/overlay/toast/toastStore.d.ts.map +1 -0
- package/lib/typescript/module/overlay/useAnchoredPosition.d.ts +40 -0
- package/lib/typescript/module/overlay/useAnchoredPosition.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/primitives/Block.d.ts +37 -0
- package/lib/typescript/module/primitives/Block.d.ts.map +1 -0
- package/lib/typescript/module/primitives/Pressable.d.ts +135 -0
- package/lib/typescript/module/primitives/Pressable.d.ts.map +1 -0
- package/lib/typescript/module/primitives/PrimitiveInput.d.ts +42 -0
- package/lib/typescript/module/primitives/PrimitiveInput.d.ts.map +1 -0
- package/lib/typescript/module/primitives/Separator.d.ts +28 -0
- package/lib/typescript/module/primitives/Separator.d.ts.map +1 -0
- package/lib/typescript/module/primitives/Slot.d.ts +48 -0
- package/lib/typescript/module/primitives/Slot.d.ts.map +1 -0
- package/lib/typescript/module/primitives/Text.d.ts +50 -0
- package/lib/typescript/module/primitives/Text.d.ts.map +1 -0
- package/lib/typescript/module/primitives/pressFeedback.d.ts +39 -0
- package/lib/typescript/module/primitives/pressFeedback.d.ts.map +1 -0
- package/lib/typescript/module/primitives/textStyle.d.ts +13 -0
- package/lib/typescript/module/primitives/textStyle.d.ts.map +1 -0
- package/lib/typescript/module/primitives/tintSlot.d.ts +10 -0
- package/lib/typescript/module/primitives/tintSlot.d.ts.map +1 -0
- package/lib/typescript/module/primitives/touchTarget.d.ts +43 -0
- package/lib/typescript/module/primitives/touchTarget.d.ts.map +1 -0
- package/lib/typescript/module/theme/BlendNativeProvider.d.ts +69 -0
- package/lib/typescript/module/theme/BlendNativeProvider.d.ts.map +1 -0
- package/lib/typescript/module/theme/breakpoint.d.ts +27 -0
- package/lib/typescript/module/theme/breakpoint.d.ts.map +1 -0
- package/lib/typescript/module/theme/fonts.d.ts +34 -0
- package/lib/typescript/module/theme/fonts.d.ts.map +1 -0
- package/lib/typescript/module/theme/nativeTokenRegistry.d.ts +34 -0
- package/lib/typescript/module/theme/nativeTokenRegistry.d.ts.map +1 -0
- package/lib/typescript/module/theme/systemTheme.d.ts +25 -0
- package/lib/typescript/module/theme/systemTheme.d.ts.map +1 -0
- package/lib/typescript/module/theme/useNativeBreakpoint.d.ts +17 -0
- package/lib/typescript/module/theme/useNativeBreakpoint.d.ts.map +1 -0
- package/lib/typescript/module/theme/useNativeTokens.d.ts +4 -0
- package/lib/typescript/module/theme/useNativeTokens.d.ts.map +1 -0
- package/package.json +137 -0
- package/src/a11y/announcement.ts +41 -0
- package/src/a11y/useLiveRegion.ts +36 -0
- package/src/adapters/cssStringAdapter.ts +403 -0
- package/src/adapters/optionalGradient.ts +39 -0
- package/src/adapters/surfaceStyle.ts +209 -0
- package/src/components/Alert/Alert.tsx +167 -0
- package/src/components/Alert/AlertActions.tsx +98 -0
- package/src/components/Alert/AlertClose.tsx +53 -0
- package/src/components/Alert/AlertText.tsx +58 -0
- package/src/components/Alert/alert.tokens.ts +24 -0
- package/src/components/Alert/alert.types.ts +81 -0
- package/src/components/Alert/alert.utils.ts +94 -0
- package/src/components/Alert/index.ts +21 -0
- package/src/components/Button/Button.tsx +180 -0
- package/src/components/Button/button.types.ts +44 -0
- package/src/components/Button/button.utils.ts +213 -0
- package/src/components/Button/index.ts +12 -0
- package/src/components/Skeleton/Skeleton.tsx +196 -0
- package/src/components/Skeleton/index.ts +2 -0
- package/src/components/Skeleton/skeleton.types.ts +28 -0
- package/src/components/Skeleton/skeleton.utils.ts +56 -0
- package/src/components/Tag/Tag.tsx +204 -0
- package/src/components/Tag/index.ts +7 -0
- package/src/components/Tag/tag.types.ts +63 -0
- package/src/components/Tag/tag.utils.ts +82 -0
- package/src/components/TextInput/TextInput.tsx +165 -0
- package/src/components/TextInput/index.ts +2 -0
- package/src/components/TextInput/textInput.types.ts +54 -0
- package/src/components/TextInput/textInput.utils.ts +68 -0
- package/src/components/shared/field/FieldFooter.tsx +66 -0
- package/src/components/shared/field/FieldLabels.tsx +86 -0
- package/src/components/shared/field/fieldState.ts +39 -0
- package/src/components/shared/group.ts +72 -0
- package/src/index.ts +144 -0
- package/src/motion/motion.ts +115 -0
- package/src/motion/useReduceMotion.ts +36 -0
- package/src/overlay/portal.tsx +122 -0
- package/src/overlay/positioning.ts +196 -0
- package/src/overlay/safeAreaInsets.ts +36 -0
- package/src/overlay/sheet/BottomSheet.tsx +276 -0
- package/src/overlay/sheet/sheetMath.ts +58 -0
- package/src/overlay/toast/ToastOutlet.tsx +127 -0
- package/src/overlay/toast/toastStore.ts +96 -0
- package/src/overlay/useAnchoredPosition.ts +92 -0
- package/src/primitives/Block.tsx +129 -0
- package/src/primitives/Pressable.tsx +528 -0
- package/src/primitives/PrimitiveInput.tsx +87 -0
- package/src/primitives/Separator.tsx +65 -0
- package/src/primitives/Slot.tsx +94 -0
- package/src/primitives/Text.tsx +98 -0
- package/src/primitives/pressFeedback.ts +78 -0
- package/src/primitives/textStyle.ts +24 -0
- package/src/primitives/tintSlot.ts +44 -0
- package/src/primitives/touchTarget.ts +72 -0
- package/src/theme/BlendNativeProvider.tsx +147 -0
- package/src/theme/breakpoint.ts +38 -0
- package/src/theme/fonts.ts +63 -0
- package/src/theme/nativeTokenRegistry.ts +57 -0
- package/src/theme/systemTheme.ts +34 -0
- package/src/theme/useNativeBreakpoint.ts +27 -0
- package/src/theme/useNativeTokens.ts +99 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { ViewStyle } from 'react-native';
|
|
2
|
+
import { ButtonV2Size, ButtonV2State, ButtonV2SubType, ButtonV2Type, type ButtonV2TokensType } from '@juspay/blend-design-system/node';
|
|
3
|
+
import { type GroupPosition } from '../shared/group';
|
|
4
|
+
/**
|
|
5
|
+
* Native ButtonV2 style resolver.
|
|
6
|
+
*
|
|
7
|
+
* Reimplements `packages/blend/lib/components/ButtonV2/utils.ts` for RN. Web
|
|
8
|
+
* builds a `ButtonStylesReturn` carrying `_active` / `_hover` /
|
|
9
|
+
* `_focusVisible` / `_disabled` pseudo-state maps; RN has no pseudo-selectors,
|
|
10
|
+
* so this returns the token strings per state and lets `Pressable` compose
|
|
11
|
+
* them against `{ pressed }`.
|
|
12
|
+
*
|
|
13
|
+
* `_hover` and `_focusVisible` have no native counterpart and are dropped.
|
|
14
|
+
*/
|
|
15
|
+
export type ButtonV2NativeStyles = {
|
|
16
|
+
/** CSS-string background token for the default state. */
|
|
17
|
+
background: string;
|
|
18
|
+
activeBackground: string;
|
|
19
|
+
disabledBackground: string;
|
|
20
|
+
/** CSS-string border token per state. */
|
|
21
|
+
border: string;
|
|
22
|
+
activeBorder: string;
|
|
23
|
+
disabledBorder: string;
|
|
24
|
+
/** CSS-string box-shadow token per state. */
|
|
25
|
+
boxShadow: string;
|
|
26
|
+
activeBoxShadow: string;
|
|
27
|
+
/** Resolved text/icon colour for the current state. */
|
|
28
|
+
textColor: string;
|
|
29
|
+
/** Padding token strings per direction. */
|
|
30
|
+
padding: {
|
|
31
|
+
top: string;
|
|
32
|
+
right: string;
|
|
33
|
+
bottom: string;
|
|
34
|
+
left: string;
|
|
35
|
+
};
|
|
36
|
+
gap: string;
|
|
37
|
+
borderRadius: string;
|
|
38
|
+
/**
|
|
39
|
+
* Border widths to overlay for the group position. Interior members drop
|
|
40
|
+
* their shared edges so a seam is one line wide, not two.
|
|
41
|
+
*/
|
|
42
|
+
groupBorderWidths: Pick<ViewStyle, 'borderLeftWidth' | 'borderRightWidth'>;
|
|
43
|
+
/** `'auto'` for the inline subType, otherwise undefined. */
|
|
44
|
+
height: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Resolve padding tokens per direction.
|
|
48
|
+
* Mirrors `getButtonPadding` in web `utils.ts`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function getButtonPadding(size: ButtonV2Size, buttonType: ButtonV2Type, subType: ButtonV2SubType, tokens: ButtonV2TokensType): {
|
|
51
|
+
top: string;
|
|
52
|
+
right: string;
|
|
53
|
+
bottom: string;
|
|
54
|
+
left: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Resolve the border radius, collapsing joined edges inside a button group.
|
|
58
|
+
*
|
|
59
|
+
* Mirrors `getButtonV2BorderRadius` in web `utils.ts`. The collapsing itself
|
|
60
|
+
* lives in `shared/group` because Tag needs the same algorithm.
|
|
61
|
+
*/
|
|
62
|
+
export declare function getButtonV2BorderRadius(size: ButtonV2Size, buttonType: ButtonV2Type, subType: ButtonV2SubType, buttonGroupPosition: GroupPosition | undefined, tokens: ButtonV2TokensType): string;
|
|
63
|
+
/**
|
|
64
|
+
* Resolve the max height for each icon slot.
|
|
65
|
+
*
|
|
66
|
+
* Mirrors `getIconMaxHeight` in web `utils.ts`, including both behaviours
|
|
67
|
+
* that were previously missing on native: the inline subType stretches slots
|
|
68
|
+
* to `100%`, and a per-slot `maxHeight` overrides the size-derived default.
|
|
69
|
+
*/
|
|
70
|
+
export declare function getIconMaxHeight(subType: ButtonV2SubType, leftSlotMaxHeight: string | number | undefined, rightSlotMaxHeight: string | number | undefined, defaultMaxHeight: string | number): {
|
|
71
|
+
left: string | number;
|
|
72
|
+
right: string | number;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Height override for the inline subType.
|
|
76
|
+
* Mirrors `getButtonHeight` in web `utils.ts` (`fit-content` → RN `auto`).
|
|
77
|
+
*/
|
|
78
|
+
export declare function getButtonHeight(subType: ButtonV2SubType): string | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Spinner size for the current button size.
|
|
81
|
+
*
|
|
82
|
+
* Web maps these to explicit pixel sizes (16/18/20 for sm/md/lg) so the
|
|
83
|
+
* loader never overflows a small button; RN's `ActivityIndicator` accepts a
|
|
84
|
+
* number on both platforms.
|
|
85
|
+
*/
|
|
86
|
+
export declare function getLoaderSize(size: ButtonV2Size): number;
|
|
87
|
+
/**
|
|
88
|
+
* Resolve the text/icon colour for the current state.
|
|
89
|
+
* Mirrors `getTextColor` in web `utils.ts`.
|
|
90
|
+
*/
|
|
91
|
+
export declare function getTextColor(disabled: boolean | undefined, state: ButtonV2State, buttonType: ButtonV2Type, subType: ButtonV2SubType, tokens: ButtonV2TokensType): string;
|
|
92
|
+
/**
|
|
93
|
+
* Compute the full native style set for a button.
|
|
94
|
+
*
|
|
95
|
+
* The native equivalent of `getButtonStyles` in web `utils.ts`.
|
|
96
|
+
*/
|
|
97
|
+
export declare function getButtonNativeStyles(isDisabled: boolean, buttonType: ButtonV2Type, subType: ButtonV2SubType, size: ButtonV2Size, state: ButtonV2State, tokens: ButtonV2TokensType, buttonGroupPosition?: GroupPosition): ButtonV2NativeStyles;
|
|
98
|
+
//# sourceMappingURL=button.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/button.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EACH,YAAY,EACZ,aAAa,EACb,eAAe,EACf,YAAY,EAEZ,KAAK,kBAAkB,EAC1B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAGH,KAAK,aAAa,EACrB,MAAM,iBAAiB,CAAA;AAExB;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAA;IACxB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,MAAM,CAAA;IACtB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAA;IACjB,2CAA2C;IAC3C,OAAO,EAAE;QACL,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,EAAE,MAAM,CAAA;KACf,CAAA;IACD,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,iBAAiB,EAAE,IAAI,CAAC,SAAS,EAAE,iBAAiB,GAAG,kBAAkB,CAAC,CAAA;IAC1E,4DAA4D;IAC5D,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,CAAA;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC5B,IAAI,EAAE,YAAY,EAClB,UAAU,EAAE,YAAY,EACxB,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,kBAAkB,GAC3B;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAe9D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACnC,IAAI,EAAE,YAAY,EAClB,UAAU,EAAE,YAAY,EACxB,OAAO,EAAE,eAAe,EACxB,mBAAmB,EAAE,aAAa,GAAG,SAAS,EAC9C,MAAM,EAAE,kBAAkB,GAC3B,MAAM,CAKR;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC5B,OAAO,EAAE,eAAe,EACxB,iBAAiB,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAC9C,kBAAkB,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAC/C,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAClC;IAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAQnD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS,CAE5E;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAOxD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CACxB,QAAQ,EAAE,OAAO,GAAG,SAAS,EAC7B,KAAK,EAAE,aAAa,EACpB,UAAU,EAAE,YAAY,EACxB,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,kBAAkB,GAC3B,MAAM,CAMR;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACjC,UAAU,EAAE,OAAO,EACnB,UAAU,EAAE,YAAY,EACxB,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,kBAAkB,EAC1B,mBAAmB,CAAC,EAAE,aAAa,GACpC,oBAAoB,CA+BtB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as Button } from './Button';
|
|
2
|
+
export type { ButtonNativeProps } from './button.types';
|
|
3
|
+
export { getButtonNativeStyles, getButtonPadding, getButtonV2BorderRadius, getButtonHeight, getIconMaxHeight, getLoaderSize, getTextColor, } from './button.utils';
|
|
4
|
+
export type { ButtonV2NativeStyles } from './button.utils';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EACH,qBAAqB,EACrB,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,YAAY,GACf,MAAM,gBAAgB,CAAA;AACvB,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SkeletonShape, SkeletonVariant } from '@juspay/blend-design-system/node';
|
|
3
|
+
import type { SkeletonNativeProps } from './skeleton.types';
|
|
4
|
+
export declare const Skeleton: React.MemoExoticComponent<({ variant, shape, width, height, borderRadius, children, style, testID, }: SkeletonNativeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
5
|
+
export default Skeleton;
|
|
6
|
+
export type { SkeletonShape, SkeletonVariant };
|
|
7
|
+
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAexE,OAAO,KAAK,EACR,aAAa,EAEb,eAAe,EAClB,MAAM,kCAAkC,CAAA;AASzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AA6J3D,eAAO,MAAM,QAAQ,wGA9HlB,mBAAmB,6CA8H0B,CAAA;AAQhD,eAAe,QAAQ,CAAA;AAEvB,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ViewStyle } from 'react-native';
|
|
3
|
+
import type { SkeletonShape, SkeletonVariant } from '@juspay/blend-design-system/node';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the native `Skeleton`.
|
|
6
|
+
*
|
|
7
|
+
* Either a placeholder box (`width`/`height`) or a wrapper
|
|
8
|
+
* (`children` size the box and render invisible underneath the surface).
|
|
9
|
+
*/
|
|
10
|
+
export type SkeletonNativeProps = {
|
|
11
|
+
/** `pulse` (default) breathes; `wave`/`shimmer` sweep a gradient. */
|
|
12
|
+
variant?: SkeletonVariant;
|
|
13
|
+
/** Drives the token border radius; `circle` resolves a numeric half. */
|
|
14
|
+
shape?: SkeletonShape;
|
|
15
|
+
/** Box width for standalone use. Token strings (`"120px"`) accepted. */
|
|
16
|
+
width?: string | number;
|
|
17
|
+
height?: string | number;
|
|
18
|
+
/** Explicit radius override (wins over `shape`). */
|
|
19
|
+
borderRadius?: number;
|
|
20
|
+
/** Wrap mode: content keeps its layout, renders invisible. */
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
style?: ViewStyle;
|
|
23
|
+
testID?: string;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=skeleton.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Skeleton/skeleton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,KAAK,EACR,aAAa,EACb,eAAe,EAClB,MAAM,kCAAkC,CAAA;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAC9B,qEAAqE;IACrE,OAAO,CAAC,EAAE,eAAe,CAAA;IACzB,wEAAwE;IACxE,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SkeletonShape, SkeletonTokensType } from '@juspay/blend-design-system/node';
|
|
2
|
+
/**
|
|
3
|
+
* Pure resolution for the native Skeleton — vitest-testable, worklet-free.
|
|
4
|
+
*/
|
|
5
|
+
/** Default when the token duration cannot be parsed. */
|
|
6
|
+
export declare const SKELETON_FALLBACK_DURATION = 1500;
|
|
7
|
+
/**
|
|
8
|
+
* Animation cycle length in milliseconds, from the token's CSS duration
|
|
9
|
+
* string (`"1.5s"`).
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveSkeletonDuration(tokens: SkeletonTokensType): number;
|
|
12
|
+
/**
|
|
13
|
+
* Border radius for a shape.
|
|
14
|
+
*
|
|
15
|
+
* The `circle` token is CSS `"50%"`, which RN cannot express — a circle
|
|
16
|
+
* needs a numeric radius of half the box. When the box size is unknown
|
|
17
|
+
* (string sizes, wrap mode) a large radius produces the same pill/circle
|
|
18
|
+
* silhouette, the same trick web's `radius.full` relies on.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveSkeletonRadius(shape: SkeletonShape, tokens: SkeletonTokensType, width?: string | number, height?: string | number): number;
|
|
21
|
+
//# sourceMappingURL=skeleton.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/Skeleton/skeleton.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,aAAa,EACb,kBAAkB,EACrB,MAAM,kCAAkC,CAAA;AAOzC;;GAEG;AAEH,wDAAwD;AACxD,eAAO,MAAM,0BAA0B,OAAO,CAAA;AAE9C;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAK1E;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACjC,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,kBAAkB,EAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GACzB,MAAM,CAcR"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { View as RNView } from 'react-native';
|
|
2
|
+
import type { TagNativeProps } from './tag.types';
|
|
3
|
+
/**
|
|
4
|
+
* Tag — React Native implementation of web's `TagV2`.
|
|
5
|
+
*
|
|
6
|
+
* Tokens resolve through `useNativeTokens('TAGV2')`, the native counterpart
|
|
7
|
+
* of web's `useResponsiveTokens('TAGV2')`, so theme and per-slot overrides
|
|
8
|
+
* come from `BlendNativeProvider` rather than a per-component prop.
|
|
9
|
+
*
|
|
10
|
+
* Like web, the rendered element depends on interactivity: web picks
|
|
11
|
+
* `PrimitiveButton` when `onClick` is supplied and `Block` otherwise; native
|
|
12
|
+
* picks `Pressable` vs `Block`. Both branches resolve their styles through
|
|
13
|
+
* the same `resolveSurfaceStyle`, so the two render identically apart from
|
|
14
|
+
* press feedback.
|
|
15
|
+
*
|
|
16
|
+
* TagV2's tokens contain no gradients, shadows, or state matrix, so this
|
|
17
|
+
* component needs no native module — it is pure JS.
|
|
18
|
+
*/
|
|
19
|
+
declare const Tag: import("react").ForwardRefExoticComponent<TagNativeProps & import("react").RefAttributes<RNView>>;
|
|
20
|
+
export default Tag;
|
|
21
|
+
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA;AAmBlD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAgBjD;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,GAAG,mGAmJP,CAAA;AAIF,eAAe,GAAG,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAA;AACtC,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,EACH,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,GAC3B,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { GestureResponderEvent, ViewStyle } from 'react-native';
|
|
3
|
+
import type { TagV2Color, TagV2Size, TagV2SubType, TagV2Type } from '@juspay/blend-design-system/node';
|
|
4
|
+
import type { GroupPosition } from '../shared/group';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the native `Tag`.
|
|
7
|
+
*
|
|
8
|
+
* Mirrors web `TagV2Props` (`packages/blend/lib/components/TagV2/
|
|
9
|
+
* TagV2.types.ts`) with DOM-specific pieces replaced by RN equivalents:
|
|
10
|
+
*
|
|
11
|
+
* - `onClick` → `onPress`, carrying a `GestureResponderEvent`.
|
|
12
|
+
* - `aria-pressed` → `pressed`, surfaced as `accessibilityState.selected`.
|
|
13
|
+
* - `HTMLAttributes` passthrough → RN `View`/`Pressable` props via `...rest`.
|
|
14
|
+
*
|
|
15
|
+
* `skeleton` is deliberately **absent** rather than accepted-and-ignored.
|
|
16
|
+
* Web's `TagV2` renders a `TagSkeleton`, which has no native counterpart yet;
|
|
17
|
+
* omitting the prop from the type keeps it a compile error instead of a
|
|
18
|
+
* silent no-op. Same decision as `Button`.
|
|
19
|
+
*/
|
|
20
|
+
export type TagSlot = {
|
|
21
|
+
slot: React.ReactNode;
|
|
22
|
+
/** Overrides the size-derived slot max height from tokens. */
|
|
23
|
+
maxHeight?: string | number;
|
|
24
|
+
};
|
|
25
|
+
export type TagNativeProps = {
|
|
26
|
+
text: string;
|
|
27
|
+
size?: TagV2Size;
|
|
28
|
+
type?: TagV2Type;
|
|
29
|
+
subType?: TagV2SubType;
|
|
30
|
+
color?: TagV2Color;
|
|
31
|
+
leftSlot?: TagSlot;
|
|
32
|
+
rightSlot?: TagSlot;
|
|
33
|
+
/**
|
|
34
|
+
* Position within a tag group. Collapses the border radius on the joined
|
|
35
|
+
* edges, matching web's `getTagBorderRadius`.
|
|
36
|
+
*/
|
|
37
|
+
tagGroupPosition?: GroupPosition;
|
|
38
|
+
/**
|
|
39
|
+
* Providing this makes the tag interactive: it renders as a pressable
|
|
40
|
+
* with `accessibilityRole="button"` instead of a static view, mirroring
|
|
41
|
+
* web's `TagElement = onClick ? PrimitiveButton : Block`.
|
|
42
|
+
*/
|
|
43
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Toggle state for interactive tags. Maps to web's `aria-pressed` and to
|
|
46
|
+
* RN's `accessibilityState.selected`, and is folded into the accessible
|
|
47
|
+
* name exactly as web's `getAccessibleName` does.
|
|
48
|
+
*/
|
|
49
|
+
pressed?: boolean | 'mixed';
|
|
50
|
+
/** Overrides the accessible name derived from `text`. */
|
|
51
|
+
accessibilityLabel?: string;
|
|
52
|
+
testID?: string;
|
|
53
|
+
/** Escape hatch for RN styles the token props do not cover. */
|
|
54
|
+
style?: ViewStyle;
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=tag.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tag/tag.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,KAAK,EACR,UAAU,EACV,SAAS,EACT,YAAY,EACZ,SAAS,EACZ,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEpD;;;;;;;;;;;;;;GAcG;AAEH,MAAM,MAAM,OAAO,GAAG;IAClB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,aAAa,CAAA;IAChC;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAA;IAChD;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;IAC3B,yDAAyD;IACzD,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,+DAA+D;IAC/D,KAAK,CAAC,EAAE,SAAS,CAAA;CACpB,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TagV2Size, TagV2SubType, type TagV2TokensType } from '@juspay/blend-design-system/node';
|
|
2
|
+
import { type GroupPosition } from '../shared/group';
|
|
3
|
+
/**
|
|
4
|
+
* Native Tag style helpers.
|
|
5
|
+
*
|
|
6
|
+
* Ported from `packages/blend/lib/components/TagV2/utils.ts`. Both functions
|
|
7
|
+
* below are pure string/logic helpers with no DOM dependency, so they are
|
|
8
|
+
* reproduced verbatim in behaviour — keeping web and native visually and
|
|
9
|
+
* semantically identical is the whole point.
|
|
10
|
+
*
|
|
11
|
+
* Web's third helper, `createKeyboardHandler` (Enter/Space → click), has no
|
|
12
|
+
* native counterpart: RN's `Pressable` handles activation itself, including
|
|
13
|
+
* for switch-control and keyboard users.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the border radius for a tag, collapsing the joined edges when the
|
|
17
|
+
* tag sits inside a group.
|
|
18
|
+
*
|
|
19
|
+
* Mirrors `getTagBorderRadius` in web `utils.ts`. The collapsing itself lives
|
|
20
|
+
* in `shared/group` because Button needs exactly the same algorithm.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getTagBorderRadius(size: TagV2Size, subType: TagV2SubType, tagGroupPosition: GroupPosition | undefined, tokens: TagV2TokensType): string;
|
|
23
|
+
/**
|
|
24
|
+
* Build the accessible name for a tag.
|
|
25
|
+
*
|
|
26
|
+
* Mirrors `getAccessibleName` in web `utils.ts`: non-interactive tags get no
|
|
27
|
+
* explicit name (the text content is announced instead), and interactive
|
|
28
|
+
* tags fold their toggle state into the label.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getAccessibleName(text: string, isInteractive: boolean, pressed: boolean | 'mixed' | undefined): string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Resolve the accessibility state for a tag.
|
|
33
|
+
*
|
|
34
|
+
* `'mixed'` has no RN equivalent — RN's `selected` is a boolean — so it is
|
|
35
|
+
* reported as unselected and carried in the accessible name instead, which
|
|
36
|
+
* is what `getAccessibleName` already appends.
|
|
37
|
+
*/
|
|
38
|
+
export declare function getTagAccessibilityState(isInteractive: boolean, pressed: boolean | 'mixed' | undefined): {
|
|
39
|
+
selected: boolean;
|
|
40
|
+
} | undefined;
|
|
41
|
+
//# sourceMappingURL=tag.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tag/tag.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,YAAY,EACZ,KAAK,eAAe,EACvB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE5E;;;;;;;;;;;GAWG;AAEH;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAC9B,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,YAAY,EACrB,gBAAgB,EAAE,aAAa,GAAG,SAAS,EAC3C,MAAM,EAAE,eAAe,GACxB,MAAM,CAKR;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC7B,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,OAAO,EACtB,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,GACvC,MAAM,GAAG,SAAS,CAgBpB;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACpC,aAAa,EAAE,OAAO,EACtB,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,GACvC;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAGnC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { TextInputProps as RNTextInputProps, View as RNView } from 'react-native';
|
|
2
|
+
import { InputSizeV2 } from '@juspay/blend-design-system/node';
|
|
3
|
+
/**
|
|
4
|
+
* TextInput — React Native implementation of web's `TextInputV2`, and the
|
|
5
|
+
* reference consumer of the shared field chrome (`FieldLabels`,
|
|
6
|
+
* `FieldFooter`, `PrimitiveInput`) the rest of the InputsV2 family will
|
|
7
|
+
* reuse.
|
|
8
|
+
*
|
|
9
|
+
* Anatomy matches web: a column of label row, bordered field row (left
|
|
10
|
+
* slot / input / right slot), and footer — all resolved from the
|
|
11
|
+
* `TEXT_INPUTV2` token slot. Focus is component state re-resolving the
|
|
12
|
+
* container against the FOCUS tokens, replacing web's `_focus` pseudo
|
|
13
|
+
* object; the spread-only focus ring has no RN equivalent and is dropped.
|
|
14
|
+
*/
|
|
15
|
+
declare const TextInput: import("react").ForwardRefExoticComponent<{
|
|
16
|
+
value: string;
|
|
17
|
+
onChangeText?: (text: string) => void;
|
|
18
|
+
label?: string;
|
|
19
|
+
subLabel?: string;
|
|
20
|
+
size?: InputSizeV2;
|
|
21
|
+
error?: import("../shared/field/fieldState").FieldError;
|
|
22
|
+
hintText?: string;
|
|
23
|
+
required?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
leftSlot?: import("./textInput.types").TextInputSlot;
|
|
26
|
+
rightSlot?: import("./textInput.types").TextInputSlot;
|
|
27
|
+
testID?: string;
|
|
28
|
+
accessibilityLabel?: string;
|
|
29
|
+
style?: import("react-native").ViewStyle;
|
|
30
|
+
inputRef?: React.Ref<import("react-native").TextInput>;
|
|
31
|
+
} & Omit<RNTextInputProps, "value" | "style" | "placeholderTextColor" | "editable" | "onChangeText"> & import("react").RefAttributes<RNView>>;
|
|
32
|
+
export default TextInput;
|
|
33
|
+
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/TextInput/TextInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,cAAc,IAAI,gBAAgB,EAClC,IAAI,IAAI,MAAM,EACjB,MAAM,cAAc,CAAA;AACrB,OAAO,EACH,WAAW,EAEd,MAAM,kCAAkC,CAAA;AAWzC;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;6IAiIb,CAAA;AAIF,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/TextInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAClD,YAAY,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { TextInput as RNTextInput, TextInputProps as RNTextInputProps, ViewStyle } from 'react-native';
|
|
3
|
+
import type { InputSizeV2 } from '@juspay/blend-design-system/node';
|
|
4
|
+
import type { FieldError } from '../shared/field/fieldState';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the native `TextInput` — the port of web's `TextInputV2`.
|
|
7
|
+
*
|
|
8
|
+
* Web pieces swapped for RN ones: `onChange` on a DOM input becomes RN's
|
|
9
|
+
* `onChangeText`, `data-testid` becomes `testID`, and the HTML-attribute
|
|
10
|
+
* passthrough becomes RN `TextInputProps` (which supplies `placeholder`,
|
|
11
|
+
* `keyboardType`, `autoCapitalize`, `secureTextEntry`, ... for free).
|
|
12
|
+
*
|
|
13
|
+
* Deliberately omitted rather than accepted-and-ignored (the `skeleton`
|
|
14
|
+
* precedent — passing them should be a compile error, not a no-op):
|
|
15
|
+
*
|
|
16
|
+
* - `dropdown` — the embedded SingleSelect needs the native Select family.
|
|
17
|
+
* - `helpIconText` — needs a native Tooltip.
|
|
18
|
+
* - The floating-label mode (web floats the label into `lg` inputs on
|
|
19
|
+
* phones) — deferred until the field pattern settles on native.
|
|
20
|
+
*/
|
|
21
|
+
export type TextInputSlot = {
|
|
22
|
+
slot: React.ReactElement;
|
|
23
|
+
maxHeight?: string | number;
|
|
24
|
+
};
|
|
25
|
+
export type TextInputNativeProps = {
|
|
26
|
+
value: string;
|
|
27
|
+
onChangeText?: (text: string) => void;
|
|
28
|
+
label?: string;
|
|
29
|
+
subLabel?: string;
|
|
30
|
+
size?: InputSizeV2;
|
|
31
|
+
error?: FieldError;
|
|
32
|
+
hintText?: string;
|
|
33
|
+
required?: boolean;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
leftSlot?: TextInputSlot;
|
|
36
|
+
rightSlot?: TextInputSlot;
|
|
37
|
+
testID?: string;
|
|
38
|
+
/** Screen-reader name; defaults to `label`. */
|
|
39
|
+
accessibilityLabel?: string;
|
|
40
|
+
/** Escape hatch for the outer column (label + field + footer). */
|
|
41
|
+
style?: ViewStyle;
|
|
42
|
+
/** Ref to the underlying RN TextInput (focus/blur/clear). */
|
|
43
|
+
inputRef?: React.Ref<RNTextInput>;
|
|
44
|
+
} & Omit<RNTextInputProps, 'value' | 'onChangeText' | 'style' | 'editable' | 'placeholderTextColor'>;
|
|
45
|
+
//# sourceMappingURL=textInput.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textInput.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/TextInput/textInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EACR,SAAS,IAAI,WAAW,EACxB,cAAc,IAAI,gBAAgB,EAClC,SAAS,EACZ,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAE5D;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,MAAM,aAAa,GAAG;IACxB,IAAI,EAAE,KAAK,CAAC,YAAY,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,+CAA+C;IAC/C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,kEAAkE;IAClE,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;CACpC,GAAG,IAAI,CACJ,gBAAgB,EAChB,OAAO,GAAG,cAAc,GAAG,OAAO,GAAG,UAAU,GAAG,sBAAsB,CAC3E,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { InputSizeV2, InputStateV2, type TextInputV2TokensType } from '@juspay/blend-design-system/node';
|
|
2
|
+
/**
|
|
3
|
+
* Native TextInputV2 style resolver.
|
|
4
|
+
*
|
|
5
|
+
* Reimplements the inline resolution `TextInputV2.tsx` performs for RN. Web
|
|
6
|
+
* expresses hover/focus through styled-components pseudo-state objects; on
|
|
7
|
+
* native the field re-resolves against the current visual state (focus
|
|
8
|
+
* tracked in component state), so this returns plain token strings for one
|
|
9
|
+
* state at a time — the pattern `getButtonNativeStyles` set.
|
|
10
|
+
*/
|
|
11
|
+
export type TextInputNativeStyles = {
|
|
12
|
+
/** Outer column: label / field / footer. */
|
|
13
|
+
gap: string;
|
|
14
|
+
/** The bordered field row. */
|
|
15
|
+
container: {
|
|
16
|
+
border: string;
|
|
17
|
+
backgroundColor: string;
|
|
18
|
+
borderRadius: string;
|
|
19
|
+
gap: string;
|
|
20
|
+
paddingTop: string;
|
|
21
|
+
paddingRight: string;
|
|
22
|
+
paddingBottom: string;
|
|
23
|
+
paddingLeft: string;
|
|
24
|
+
};
|
|
25
|
+
/** The editable text. */
|
|
26
|
+
text: {
|
|
27
|
+
fontSize: string;
|
|
28
|
+
fontWeight: string;
|
|
29
|
+
lineHeight: string;
|
|
30
|
+
color: string;
|
|
31
|
+
};
|
|
32
|
+
placeholderColor: string;
|
|
33
|
+
};
|
|
34
|
+
export declare function getTextInputNativeStyles(tokens: TextInputV2TokensType, size: InputSizeV2, visualState: InputStateV2): TextInputNativeStyles;
|
|
35
|
+
//# sourceMappingURL=textInput.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textInput.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/TextInput/textInput.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,YAAY,EACZ,KAAK,qBAAqB,EAC7B,MAAM,kCAAkC,CAAA;AAEzC;;;;;;;;GAQG;AAEH,MAAM,MAAM,qBAAqB,GAAG;IAChC,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAA;IACX,8BAA8B;IAC9B,SAAS,EAAE;QACP,MAAM,EAAE,MAAM,CAAA;QACd,eAAe,EAAE,MAAM,CAAA;QACvB,YAAY,EAAE,MAAM,CAAA;QACpB,GAAG,EAAE,MAAM,CAAA;QACX,UAAU,EAAE,MAAM,CAAA;QAClB,YAAY,EAAE,MAAM,CAAA;QACpB,aAAa,EAAE,MAAM,CAAA;QACrB,WAAW,EAAE,MAAM,CAAA;KACtB,CAAA;IACD,yBAAyB;IACzB,IAAI,EAAE;QACF,QAAQ,EAAE,MAAM,CAAA;QAChB,UAAU,EAAE,MAAM,CAAA;QAClB,UAAU,EAAE,MAAM,CAAA;QAClB,KAAK,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,gBAAgB,EAAE,MAAM,CAAA;CAC3B,CAAA;AAED,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,qBAAqB,EAC7B,IAAI,EAAE,WAAW,EACjB,WAAW,EAAE,YAAY,GAC1B,qBAAqB,CAuBvB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { InputSizeV2, type TextInputV2TokensType } from '@juspay/blend-design-system/node';
|
|
2
|
+
import type { FieldError } from './fieldState';
|
|
3
|
+
/**
|
|
4
|
+
* Footer under a field: the error message when erroring, else the hint.
|
|
5
|
+
*
|
|
6
|
+
* Ports web's `InputFooterV2` against the same `bottomContainer` token
|
|
7
|
+
* shape. Web marks the error `role="alert"` + `aria-live="polite"`; the
|
|
8
|
+
* native split is the Alert pattern — `accessibilityLiveRegion` for
|
|
9
|
+
* Android, an imperative announcement for iOS.
|
|
10
|
+
*/
|
|
11
|
+
export type FieldFooterProps = {
|
|
12
|
+
error?: FieldError;
|
|
13
|
+
hintText?: string;
|
|
14
|
+
size?: InputSizeV2;
|
|
15
|
+
tokens: TextInputV2TokensType['bottomContainer'];
|
|
16
|
+
testID?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function FieldFooter({ error, hintText, size, tokens, testID, }: FieldFooterProps): import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
+
export declare namespace FieldFooter {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=FieldFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldFooter.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/field/FieldFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,KAAK,qBAAqB,EAC7B,MAAM,kCAAkC,CAAA;AAIzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C;;;;;;;GAOG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC3B,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,MAAM,EAAE,qBAAqB,CAAC,iBAAiB,CAAC,CAAA;IAChD,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,IAAqB,EACrB,MAAM,EACN,MAAM,GACT,EAAE,gBAAgB,kDA+BlB;yBArCe,WAAW"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InputSizeV2, InputStateV2, type TextInputV2TokensType } from '@juspay/blend-design-system/node';
|
|
2
|
+
/**
|
|
3
|
+
* Label row above a field: label, required marker, sublabel.
|
|
4
|
+
*
|
|
5
|
+
* Ports web's `InputLabelsV2` against the same `topContainer` token shape,
|
|
6
|
+
* with two deliberate omissions:
|
|
7
|
+
*
|
|
8
|
+
* - `helpIconText` — web wraps a help icon in `Tooltip`; native has no
|
|
9
|
+
* tooltip yet, so the prop does not exist rather than silently doing
|
|
10
|
+
* nothing (the `skeleton` precedent).
|
|
11
|
+
* - `as="label"`/`htmlFor` — no DOM. The field component instead puts the
|
|
12
|
+
* label text into the input's `accessibilityLabel`.
|
|
13
|
+
*/
|
|
14
|
+
export type FieldLabelsProps = {
|
|
15
|
+
label?: string;
|
|
16
|
+
sublabel?: string;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
size?: InputSizeV2;
|
|
19
|
+
state?: InputStateV2;
|
|
20
|
+
tokens: TextInputV2TokensType['topContainer'];
|
|
21
|
+
testID?: string;
|
|
22
|
+
};
|
|
23
|
+
export declare function FieldLabels({ label, sublabel, required, size, state, tokens, testID, }: FieldLabelsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
+
export declare namespace FieldLabels {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=FieldLabels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldLabels.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/field/FieldLabels.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,YAAY,EACZ,KAAK,qBAAqB,EAC7B,MAAM,kCAAkC,CAAA;AAIzC;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,qBAAqB,CAAC,cAAc,CAAC,CAAA;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,QAAgB,EAChB,IAAqB,EACrB,KAA4B,EAC5B,MAAM,EACN,MAAM,GACT,EAAE,gBAAgB,kDA4ClB;yBApDe,WAAW"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InputStateV2 } from '@juspay/blend-design-system/node';
|
|
2
|
+
/**
|
|
3
|
+
* Input state derivation, shared by every field component.
|
|
4
|
+
*
|
|
5
|
+
* Mirrors web's `getInputState` (`InputsV2/TextInputV2/utils.ts`) and the
|
|
6
|
+
* per-variant resolution `TextInputV2.tsx` performs inline: error always
|
|
7
|
+
* wins, then disabled, and focus applies only when nothing stronger does.
|
|
8
|
+
* `HOVER` exists in the enum but has no touch counterpart.
|
|
9
|
+
*
|
|
10
|
+
* Pure and RN-free so the whole truth table unit-tests under vitest.
|
|
11
|
+
*/
|
|
12
|
+
export type FieldError = {
|
|
13
|
+
show: boolean;
|
|
14
|
+
message?: string;
|
|
15
|
+
} | undefined;
|
|
16
|
+
/** The state driving label/footer colours — web's `getInputState`. */
|
|
17
|
+
export declare function getFieldState(error: FieldError, disabled?: boolean): InputStateV2;
|
|
18
|
+
/**
|
|
19
|
+
* The state driving the input container's border/background/text, which
|
|
20
|
+
* unlike the label state also reflects focus.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getFieldVisualState(error: FieldError, disabled: boolean | undefined, focused: boolean): InputStateV2;
|
|
23
|
+
//# sourceMappingURL=fieldState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldState.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/field/fieldState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAE/D;;;;;;;;;GASG;AAEH,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAA;AAExE,sEAAsE;AACtE,wBAAgB,aAAa,CACzB,KAAK,EAAE,UAAU,EACjB,QAAQ,CAAC,EAAE,OAAO,GACnB,YAAY,CAId;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAC/B,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,OAAO,GAAG,SAAS,EAC7B,OAAO,EAAE,OAAO,GACjB,YAAY,CAKd"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ViewStyle } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Shared styling for grouped controls (button groups, tag groups).
|
|
4
|
+
*
|
|
5
|
+
* Members join edge to edge, so each keeps its radius only on the outward
|
|
6
|
+
* corners, and interior members drop the borders they would otherwise double
|
|
7
|
+
* up with their neighbour. Web implements the radius half identically in
|
|
8
|
+
* `ButtonV2/utils.ts` and `TagV2/utils.ts`, and the border half in
|
|
9
|
+
* `ButtonV2/utils.ts` (`getButtonBorderStyles`).
|
|
10
|
+
*
|
|
11
|
+
* Mirrors `components/shared/` in the web package, which holds cross-component
|
|
12
|
+
* internals rather than components.
|
|
13
|
+
*/
|
|
14
|
+
/** Where a control sits within its group. `undefined` means ungrouped. */
|
|
15
|
+
export type GroupPosition = 'center' | 'left' | 'right';
|
|
16
|
+
/**
|
|
17
|
+
* Collapse a control's border radius for its position in a group.
|
|
18
|
+
*
|
|
19
|
+
* Returns a CSS string — either the untouched radius or a four-corner
|
|
20
|
+
* shorthand in CSS order (top-left, top-right, bottom-right, bottom-left).
|
|
21
|
+
* `parseBorderRadius` handles both forms.
|
|
22
|
+
*
|
|
23
|
+
* ```
|
|
24
|
+
* getGroupedBorderRadius('10px', undefined) -> '10px'
|
|
25
|
+
* getGroupedBorderRadius('10px', 'left') -> '10px 0 0 10px'
|
|
26
|
+
* getGroupedBorderRadius('10px', 'right') -> '0 10px 10px 0'
|
|
27
|
+
* getGroupedBorderRadius('10px', 'center') -> '0px 0px 0px 0px'
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function getGroupedBorderRadius(radius: string | number, position: GroupPosition | undefined): string;
|
|
31
|
+
/**
|
|
32
|
+
* Border widths to overlay for a control's position in a group.
|
|
33
|
+
*
|
|
34
|
+
* Interior (`center`) members drop their left and right borders so a shared
|
|
35
|
+
* edge is one line wide rather than two. Web does this in
|
|
36
|
+
* `getButtonBorderStyles`, which sets `borderLeft`/`borderRight` to `'none'`
|
|
37
|
+
* for the centre position and leaves the end caps fully bordered.
|
|
38
|
+
*
|
|
39
|
+
* Returned as a `ViewStyle` fragment to spread *after* the resolved surface,
|
|
40
|
+
* so `borderWidth: 1` still applies to the remaining sides.
|
|
41
|
+
*
|
|
42
|
+
* ```
|
|
43
|
+
* getGroupedBorderWidths(undefined) -> {}
|
|
44
|
+
* getGroupedBorderWidths('left') -> {}
|
|
45
|
+
* getGroupedBorderWidths('right') -> {}
|
|
46
|
+
* getGroupedBorderWidths('center') -> { borderLeftWidth: 0, borderRightWidth: 0 }
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function getGroupedBorderWidths(position: GroupPosition | undefined): Pick<ViewStyle, 'borderLeftWidth' | 'borderRightWidth'>;
|
|
50
|
+
//# sourceMappingURL=group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C;;;;;;;;;;;GAWG;AAEH,0EAA0E;AAC1E,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;AAKvD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAClC,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,QAAQ,EAAE,aAAa,GAAG,SAAS,GACpC,MAAM,CAQR;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CAClC,QAAQ,EAAE,aAAa,GAAG,SAAS,GACpC,IAAI,CAAC,SAAS,EAAE,iBAAiB,GAAG,kBAAkB,CAAC,CAGzD"}
|