@oxyhq/bloom 0.26.1 → 0.28.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/lib/commonjs/animated-check/AnimatedCheck.js +162 -0
- package/lib/commonjs/animated-check/AnimatedCheck.js.map +1 -0
- package/lib/commonjs/animated-check/index.js +13 -0
- package/lib/commonjs/animated-check/index.js.map +1 -0
- package/lib/commonjs/avatar/Avatar.js +67 -96
- package/lib/commonjs/avatar/Avatar.js.map +1 -1
- package/lib/commonjs/avatar/AvatarRing.js +183 -0
- package/lib/commonjs/avatar/AvatarRing.js.map +1 -0
- package/lib/commonjs/avatar/index.js.map +1 -1
- package/lib/commonjs/avatar/squircle-path.js +14 -0
- package/lib/commonjs/avatar/squircle-path.js.map +1 -0
- package/lib/commonjs/avatar/svg-module.js +15 -0
- package/lib/commonjs/avatar/svg-module.js.map +1 -0
- package/lib/commonjs/dialog/placement.js +9 -7
- package/lib/commonjs/dialog/placement.js.map +1 -1
- package/lib/commonjs/fill/index.js.map +1 -1
- package/lib/commonjs/hooks/index.js +20 -0
- package/lib/commonjs/hooks/index.js.map +1 -1
- package/lib/commonjs/hooks/useGutters.js +106 -0
- package/lib/commonjs/hooks/useGutters.js.map +1 -0
- package/lib/commonjs/hooks/useHaptics.js +69 -0
- package/lib/commonjs/hooks/useHaptics.js.map +1 -0
- package/lib/commonjs/hooks/useInteractionState.js +8 -2
- package/lib/commonjs/hooks/useInteractionState.js.map +1 -1
- package/lib/commonjs/index.js +155 -63
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +155 -63
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/media-inset-border/MediaInsetBorder.js +50 -0
- package/lib/commonjs/media-inset-border/MediaInsetBorder.js.map +1 -0
- package/lib/commonjs/media-inset-border/index.js +13 -0
- package/lib/commonjs/media-inset-border/index.js.map +1 -0
- package/lib/commonjs/motion/ScreenTransition.js +46 -0
- package/lib/commonjs/motion/ScreenTransition.js.map +1 -0
- package/lib/commonjs/motion/index.js +32 -0
- package/lib/commonjs/motion/index.js.map +1 -0
- package/lib/commonjs/motion/motion.js +93 -0
- package/lib/commonjs/motion/motion.js.map +1 -0
- package/lib/commonjs/pressable-scale/PressableScale.js +75 -0
- package/lib/commonjs/pressable-scale/PressableScale.js.map +1 -0
- package/lib/commonjs/pressable-scale/index.js +13 -0
- package/lib/commonjs/pressable-scale/index.js.map +1 -0
- package/lib/commonjs/pressable-with-hover/PressableWithHover.js +36 -0
- package/lib/commonjs/pressable-with-hover/PressableWithHover.js.map +1 -0
- package/lib/commonjs/pressable-with-hover/index.js +13 -0
- package/lib/commonjs/pressable-with-hover/index.js.map +1 -0
- package/lib/commonjs/styles/breakpoints.js +24 -0
- package/lib/commonjs/styles/breakpoints.js.map +1 -0
- package/lib/commonjs/styles/index.js +7 -0
- package/lib/commonjs/styles/index.js.map +1 -1
- package/lib/commonjs/subtle-hover/SubtleHover.js +69 -0
- package/lib/commonjs/subtle-hover/SubtleHover.js.map +1 -0
- package/lib/commonjs/subtle-hover/index.js +13 -0
- package/lib/commonjs/subtle-hover/index.js.map +1 -0
- package/lib/commonjs/theme/build-theme.js +2 -0
- package/lib/commonjs/theme/build-theme.js.map +1 -1
- package/lib/commonjs/theme/gradients.js +39 -0
- package/lib/commonjs/theme/gradients.js.map +1 -0
- package/lib/commonjs/theme/index.js +7 -0
- package/lib/commonjs/theme/index.js.map +1 -1
- package/lib/module/animated-check/AnimatedCheck.js +157 -0
- package/lib/module/animated-check/AnimatedCheck.js.map +1 -0
- package/lib/module/animated-check/index.js +4 -0
- package/lib/module/animated-check/index.js.map +1 -0
- package/lib/module/avatar/Avatar.js +66 -96
- package/lib/module/avatar/Avatar.js.map +1 -1
- package/lib/module/avatar/AvatarRing.js +177 -0
- package/lib/module/avatar/AvatarRing.js.map +1 -0
- package/lib/module/avatar/index.js.map +1 -1
- package/lib/module/avatar/squircle-path.js +10 -0
- package/lib/module/avatar/squircle-path.js.map +1 -0
- package/lib/module/avatar/svg-module.js +11 -0
- package/lib/module/avatar/svg-module.js.map +1 -0
- package/lib/module/dialog/placement.js +9 -7
- package/lib/module/dialog/placement.js.map +1 -1
- package/lib/module/fill/index.js.map +1 -1
- package/lib/module/hooks/index.js +2 -0
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/useGutters.js +103 -0
- package/lib/module/hooks/useGutters.js.map +1 -0
- package/lib/module/hooks/useHaptics.js +65 -0
- package/lib/module/hooks/useHaptics.js.map +1 -0
- package/lib/module/hooks/useInteractionState.js +10 -3
- package/lib/module/hooks/useInteractionState.js.map +1 -1
- package/lib/module/index.js +10 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +10 -1
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/media-inset-border/MediaInsetBorder.js +47 -0
- package/lib/module/media-inset-border/MediaInsetBorder.js.map +1 -0
- package/lib/module/media-inset-border/index.js +4 -0
- package/lib/module/media-inset-border/index.js.map +1 -0
- package/lib/module/motion/ScreenTransition.js +40 -0
- package/lib/module/motion/ScreenTransition.js.map +1 -0
- package/lib/module/motion/index.js +5 -0
- package/lib/module/motion/index.js.map +1 -0
- package/lib/module/motion/motion.js +87 -0
- package/lib/module/motion/motion.js.map +1 -0
- package/lib/module/pressable-scale/PressableScale.js +72 -0
- package/lib/module/pressable-scale/PressableScale.js.map +1 -0
- package/lib/module/pressable-scale/index.js +4 -0
- package/lib/module/pressable-scale/index.js.map +1 -0
- package/lib/module/pressable-with-hover/PressableWithHover.js +31 -0
- package/lib/module/pressable-with-hover/PressableWithHover.js.map +1 -0
- package/lib/module/pressable-with-hover/index.js +4 -0
- package/lib/module/pressable-with-hover/index.js.map +1 -0
- package/lib/module/styles/breakpoints.js +20 -0
- package/lib/module/styles/breakpoints.js.map +1 -0
- package/lib/module/styles/index.js +1 -0
- package/lib/module/styles/index.js.map +1 -1
- package/lib/module/subtle-hover/SubtleHover.js +66 -0
- package/lib/module/subtle-hover/SubtleHover.js.map +1 -0
- package/lib/module/subtle-hover/index.js +4 -0
- package/lib/module/subtle-hover/index.js.map +1 -0
- package/lib/module/theme/build-theme.js +2 -0
- package/lib/module/theme/build-theme.js.map +1 -1
- package/lib/module/theme/gradients.js +35 -0
- package/lib/module/theme/gradients.js.map +1 -0
- package/lib/module/theme/index.js +1 -0
- package/lib/module/theme/index.js.map +1 -1
- package/lib/typescript/commonjs/animated-check/AnimatedCheck.d.ts +18 -0
- package/lib/typescript/commonjs/animated-check/AnimatedCheck.d.ts.map +1 -0
- package/lib/typescript/commonjs/animated-check/index.d.ts +3 -0
- package/lib/typescript/commonjs/animated-check/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/commonjs/avatar/AvatarRing.d.ts +27 -0
- package/lib/typescript/commonjs/avatar/AvatarRing.d.ts.map +1 -0
- package/lib/typescript/commonjs/avatar/index.d.ts +1 -1
- package/lib/typescript/commonjs/avatar/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/avatar/squircle-path.d.ts +8 -0
- package/lib/typescript/commonjs/avatar/squircle-path.d.ts.map +1 -0
- package/lib/typescript/commonjs/avatar/svg-module.d.ts +8 -0
- package/lib/typescript/commonjs/avatar/svg-module.d.ts.map +1 -0
- package/lib/typescript/commonjs/avatar/types.d.ts +30 -0
- package/lib/typescript/commonjs/avatar/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/placement.d.ts +8 -7
- package/lib/typescript/commonjs/dialog/placement.d.ts.map +1 -1
- package/lib/typescript/commonjs/fill/index.d.ts +2 -2
- package/lib/typescript/commonjs/fill/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/index.d.ts +4 -0
- package/lib/typescript/commonjs/hooks/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useGutters.d.ts +32 -0
- package/lib/typescript/commonjs/hooks/useGutters.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useHaptics.d.ts +28 -0
- package/lib/typescript/commonjs/hooks/useHaptics.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useInteractionState.d.ts +6 -0
- package/lib/typescript/commonjs/hooks/useInteractionState.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +16 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +16 -0
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-inset-border/MediaInsetBorder.d.ts +26 -0
- package/lib/typescript/commonjs/media-inset-border/MediaInsetBorder.d.ts.map +1 -0
- package/lib/typescript/commonjs/media-inset-border/index.d.ts +3 -0
- package/lib/typescript/commonjs/media-inset-border/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/motion/ScreenTransition.d.ts +33 -0
- package/lib/typescript/commonjs/motion/ScreenTransition.d.ts.map +1 -0
- package/lib/typescript/commonjs/motion/index.d.ts +4 -0
- package/lib/typescript/commonjs/motion/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/motion/motion.d.ts +24 -0
- package/lib/typescript/commonjs/motion/motion.d.ts.map +1 -0
- package/lib/typescript/commonjs/pressable-scale/PressableScale.d.ts +21 -0
- package/lib/typescript/commonjs/pressable-scale/PressableScale.d.ts.map +1 -0
- package/lib/typescript/commonjs/pressable-scale/index.d.ts +3 -0
- package/lib/typescript/commonjs/pressable-scale/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/pressable-with-hover/PressableWithHover.d.ts +18 -0
- package/lib/typescript/commonjs/pressable-with-hover/PressableWithHover.d.ts.map +1 -0
- package/lib/typescript/commonjs/pressable-with-hover/index.d.ts +3 -0
- package/lib/typescript/commonjs/pressable-with-hover/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/styles/breakpoints.d.ts +18 -0
- package/lib/typescript/commonjs/styles/breakpoints.d.ts.map +1 -0
- package/lib/typescript/commonjs/styles/index.d.ts +2 -0
- package/lib/typescript/commonjs/styles/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/subtle-hover/SubtleHover.d.ts +32 -0
- package/lib/typescript/commonjs/subtle-hover/SubtleHover.d.ts.map +1 -0
- package/lib/typescript/commonjs/subtle-hover/index.d.ts +3 -0
- package/lib/typescript/commonjs/subtle-hover/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/build-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/gradients.d.ts +12 -0
- package/lib/typescript/commonjs/theme/gradients.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/index.d.ts +2 -1
- package/lib/typescript/commonjs/theme/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/types.d.ts +11 -0
- package/lib/typescript/commonjs/theme/types.d.ts.map +1 -1
- package/lib/typescript/module/animated-check/AnimatedCheck.d.ts +18 -0
- package/lib/typescript/module/animated-check/AnimatedCheck.d.ts.map +1 -0
- package/lib/typescript/module/animated-check/index.d.ts +3 -0
- package/lib/typescript/module/animated-check/index.d.ts.map +1 -0
- package/lib/typescript/module/avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/module/avatar/AvatarRing.d.ts +27 -0
- package/lib/typescript/module/avatar/AvatarRing.d.ts.map +1 -0
- package/lib/typescript/module/avatar/index.d.ts +1 -1
- package/lib/typescript/module/avatar/index.d.ts.map +1 -1
- package/lib/typescript/module/avatar/squircle-path.d.ts +8 -0
- package/lib/typescript/module/avatar/squircle-path.d.ts.map +1 -0
- package/lib/typescript/module/avatar/svg-module.d.ts +8 -0
- package/lib/typescript/module/avatar/svg-module.d.ts.map +1 -0
- package/lib/typescript/module/avatar/types.d.ts +30 -0
- package/lib/typescript/module/avatar/types.d.ts.map +1 -1
- package/lib/typescript/module/dialog/placement.d.ts +8 -7
- package/lib/typescript/module/dialog/placement.d.ts.map +1 -1
- package/lib/typescript/module/fill/index.d.ts +2 -2
- package/lib/typescript/module/fill/index.d.ts.map +1 -1
- package/lib/typescript/module/hooks/index.d.ts +4 -0
- package/lib/typescript/module/hooks/index.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useGutters.d.ts +32 -0
- package/lib/typescript/module/hooks/useGutters.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useHaptics.d.ts +28 -0
- package/lib/typescript/module/hooks/useHaptics.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useInteractionState.d.ts +6 -0
- package/lib/typescript/module/hooks/useInteractionState.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +16 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +16 -0
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/media-inset-border/MediaInsetBorder.d.ts +26 -0
- package/lib/typescript/module/media-inset-border/MediaInsetBorder.d.ts.map +1 -0
- package/lib/typescript/module/media-inset-border/index.d.ts +3 -0
- package/lib/typescript/module/media-inset-border/index.d.ts.map +1 -0
- package/lib/typescript/module/motion/ScreenTransition.d.ts +33 -0
- package/lib/typescript/module/motion/ScreenTransition.d.ts.map +1 -0
- package/lib/typescript/module/motion/index.d.ts +4 -0
- package/lib/typescript/module/motion/index.d.ts.map +1 -0
- package/lib/typescript/module/motion/motion.d.ts +24 -0
- package/lib/typescript/module/motion/motion.d.ts.map +1 -0
- package/lib/typescript/module/pressable-scale/PressableScale.d.ts +21 -0
- package/lib/typescript/module/pressable-scale/PressableScale.d.ts.map +1 -0
- package/lib/typescript/module/pressable-scale/index.d.ts +3 -0
- package/lib/typescript/module/pressable-scale/index.d.ts.map +1 -0
- package/lib/typescript/module/pressable-with-hover/PressableWithHover.d.ts +18 -0
- package/lib/typescript/module/pressable-with-hover/PressableWithHover.d.ts.map +1 -0
- package/lib/typescript/module/pressable-with-hover/index.d.ts +3 -0
- package/lib/typescript/module/pressable-with-hover/index.d.ts.map +1 -0
- package/lib/typescript/module/styles/breakpoints.d.ts +18 -0
- package/lib/typescript/module/styles/breakpoints.d.ts.map +1 -0
- package/lib/typescript/module/styles/index.d.ts +2 -0
- package/lib/typescript/module/styles/index.d.ts.map +1 -1
- package/lib/typescript/module/subtle-hover/SubtleHover.d.ts +32 -0
- package/lib/typescript/module/subtle-hover/SubtleHover.d.ts.map +1 -0
- package/lib/typescript/module/subtle-hover/index.d.ts +3 -0
- package/lib/typescript/module/subtle-hover/index.d.ts.map +1 -0
- package/lib/typescript/module/theme/build-theme.d.ts.map +1 -1
- package/lib/typescript/module/theme/gradients.d.ts +12 -0
- package/lib/typescript/module/theme/gradients.d.ts.map +1 -0
- package/lib/typescript/module/theme/index.d.ts +2 -1
- package/lib/typescript/module/theme/index.d.ts.map +1 -1
- package/lib/typescript/module/theme/types.d.ts +11 -0
- package/lib/typescript/module/theme/types.d.ts.map +1 -1
- package/package.json +73 -1
- package/src/__tests__/AnimatedCheck.test.tsx +31 -0
- package/src/__tests__/MediaInsetBorder.test.tsx +36 -0
- package/src/__tests__/Motion.test.tsx +58 -0
- package/src/__tests__/PressableScale.test.tsx +29 -0
- package/src/__tests__/PressableWithHover.test.tsx +48 -0
- package/src/__tests__/SubtleHover.test.tsx +42 -0
- package/src/__tests__/theme-gradients.test.ts +31 -0
- package/src/__tests__/theme.test.ts +3 -0
- package/src/__tests__/useGutters.test.ts +58 -0
- package/src/__tests__/useHaptics.test.tsx +58 -0
- package/src/__tests__/useInteractionState.test.ts +27 -0
- package/src/animated-check/AnimatedCheck.stories.tsx +60 -0
- package/src/animated-check/AnimatedCheck.tsx +173 -0
- package/src/animated-check/index.ts +2 -0
- package/src/avatar/Avatar.stories.tsx +95 -0
- package/src/avatar/Avatar.tsx +61 -110
- package/src/avatar/AvatarRing.tsx +170 -0
- package/src/avatar/index.ts +6 -1
- package/src/avatar/squircle-path.ts +11 -0
- package/src/avatar/svg-module.ts +11 -0
- package/src/avatar/types.ts +32 -0
- package/src/dialog/placement.ts +10 -7
- package/src/fill/index.tsx +2 -2
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useGutters.ts +99 -0
- package/src/hooks/useHaptics.tsx +69 -0
- package/src/hooks/useInteractionState.ts +8 -2
- package/src/index.ts +20 -0
- package/src/index.web.ts +20 -0
- package/src/media-inset-border/MediaInsetBorder.stories.tsx +60 -0
- package/src/media-inset-border/MediaInsetBorder.tsx +72 -0
- package/src/media-inset-border/index.ts +2 -0
- package/src/motion/Motion.stories.tsx +99 -0
- package/src/motion/ScreenTransition.tsx +71 -0
- package/src/motion/index.ts +3 -0
- package/src/motion/motion.ts +75 -0
- package/src/pressable-scale/PressableScale.stories.tsx +71 -0
- package/src/pressable-scale/PressableScale.tsx +103 -0
- package/src/pressable-scale/index.ts +2 -0
- package/src/pressable-with-hover/PressableWithHover.stories.tsx +43 -0
- package/src/pressable-with-hover/PressableWithHover.tsx +43 -0
- package/src/pressable-with-hover/index.ts +2 -0
- package/src/styles/breakpoints.ts +18 -0
- package/src/styles/index.ts +2 -0
- package/src/subtle-hover/SubtleHover.stories.tsx +72 -0
- package/src/subtle-hover/SubtleHover.tsx +90 -0
- package/src/subtle-hover/index.ts +2 -0
- package/src/theme/build-theme.ts +2 -0
- package/src/theme/gradients.ts +61 -0
- package/src/theme/index.ts +2 -1
- package/src/theme/types.ts +13 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { PixelRatio, Platform, StyleSheet } from 'react-native';
|
|
5
|
+
import { Fill } from "../fill/index.js";
|
|
6
|
+
import { borderRadius } from "../styles/tokens.js";
|
|
7
|
+
import { useTheme } from "../theme/index.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A 1px (hairline) inset border reads too heavy on high-DPI web displays, so we
|
|
11
|
+
* drop to 0.5px there. On native the platform hairline is already correct, and
|
|
12
|
+
* `PixelRatio` is only consulted on web.
|
|
13
|
+
*/
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
const HAIRLINE_WIDTH = Platform.OS === 'web' && PixelRatio.get() > 1 ? 0.5 : StyleSheet.hairlineWidth;
|
|
16
|
+
/**
|
|
17
|
+
* A theme-aware hairline border painted just inside a media box (image, avatar,
|
|
18
|
+
* embed) to separate it from the surrounding background. Absolutely positioned
|
|
19
|
+
* to fill its parent (built on {@link Fill}) and non-interactive.
|
|
20
|
+
*/
|
|
21
|
+
export function MediaInsetBorder({
|
|
22
|
+
opaque,
|
|
23
|
+
style,
|
|
24
|
+
children
|
|
25
|
+
}) {
|
|
26
|
+
const theme = useTheme();
|
|
27
|
+
return /*#__PURE__*/_jsx(Fill, {
|
|
28
|
+
style: [styles.base, {
|
|
29
|
+
borderColor: theme.colors.border
|
|
30
|
+
}, !opaque && styles.soft, style],
|
|
31
|
+
children: children
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
MediaInsetBorder.displayName = 'MediaInsetBorder';
|
|
35
|
+
const styles = StyleSheet.create({
|
|
36
|
+
base: {
|
|
37
|
+
borderRadius: borderRadius.sm,
|
|
38
|
+
borderWidth: HAIRLINE_WIDTH,
|
|
39
|
+
pointerEvents: 'none'
|
|
40
|
+
},
|
|
41
|
+
// Non-opaque: same border color at reduced opacity so it reads as a subtle,
|
|
42
|
+
// lower-contrast separator rather than a hard edge.
|
|
43
|
+
soft: {
|
|
44
|
+
opacity: 0.6
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=MediaInsetBorder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","PixelRatio","Platform","StyleSheet","Fill","borderRadius","useTheme","jsx","_jsx","HAIRLINE_WIDTH","OS","get","hairlineWidth","MediaInsetBorder","opaque","style","children","theme","styles","base","borderColor","colors","border","soft","displayName","create","sm","borderWidth","pointerEvents","opacity"],"sourceRoot":"../../../src","sources":["media-inset-border/MediaInsetBorder.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,UAAU,EACVC,QAAQ,EACRC,UAAU,QAGL,cAAc;AAErB,SAASC,IAAI,QAAQ,kBAAS;AAC9B,SAASC,YAAY,QAAQ,qBAAkB;AAC/C,SAASC,QAAQ,QAAQ,mBAAU;;AAEnC;AACA;AACA;AACA;AACA;AAJA,SAAAC,GAAA,IAAAC,IAAA;AAKA,MAAMC,cAAc,GAClBP,QAAQ,CAACQ,EAAE,KAAK,KAAK,IAAIT,UAAU,CAACU,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,GAAGR,UAAU,CAACS,aAAa;AAiBhF;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAC;EAAEC,MAAM;EAAEC,KAAK;EAAEC;AAAgC,CAAC,EAAE;EACnF,MAAMC,KAAK,GAAGX,QAAQ,CAAC,CAAC;EAExB,oBACEE,IAAA,CAACJ,IAAI;IACHW,KAAK,EAAE,CACLG,MAAM,CAACC,IAAI,EACX;MAAEC,WAAW,EAAEH,KAAK,CAACI,MAAM,CAACC;IAAO,CAAC,EACpC,CAACR,MAAM,IAAII,MAAM,CAACK,IAAI,EACtBR,KAAK,CACL;IAAAC,QAAA,EAEDA;EAAQ,CACL,CAAC;AAEX;AAEAH,gBAAgB,CAACW,WAAW,GAAG,kBAAkB;AAEjD,MAAMN,MAAM,GAAGf,UAAU,CAACsB,MAAM,CAAC;EAC/BN,IAAI,EAAE;IACJd,YAAY,EAAEA,YAAY,CAACqB,EAAE;IAC7BC,WAAW,EAAElB,cAAc;IAC3BmB,aAAa,EAAE;EACjB,CAAC;EACD;EACA;EACAL,IAAI,EAAE;IACJM,OAAO,EAAE;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MediaInsetBorder"],"sourceRoot":"../../../src","sources":["media-inset-border/index.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,uBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Platform } from 'react-native';
|
|
5
|
+
import Animated, { Easing, FadeIn, FadeOut, SlideInLeft, SlideInRight } from 'react-native-reanimated';
|
|
6
|
+
|
|
7
|
+
/** Direction the incoming screen travels. */
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
/** CSS-smooth deceleration for the native slide. */
|
|
10
|
+
const SLIDE_EASING = Easing.out(Easing.exp);
|
|
11
|
+
/** Web cross-fade duration (ms) — "totally vibes based", per the Bluesky original. */
|
|
12
|
+
const WEB_FADE_DURATION = 90;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Wraps `children` in a Reanimated layout-animated view that slides in
|
|
16
|
+
* directionally on native and (optionally) cross-fades on web. Ported from
|
|
17
|
+
* Bluesky's `ScreenTransition`.
|
|
18
|
+
*
|
|
19
|
+
* On web the slide is intentionally dropped: layout animations there are
|
|
20
|
+
* unreliable, so `enabledWeb` gates a simple fade and the default is no
|
|
21
|
+
* transition at all.
|
|
22
|
+
*/
|
|
23
|
+
export function ScreenTransition({
|
|
24
|
+
direction,
|
|
25
|
+
enabledWeb,
|
|
26
|
+
style,
|
|
27
|
+
children
|
|
28
|
+
}) {
|
|
29
|
+
const isWeb = Platform.OS === 'web';
|
|
30
|
+
const entering = isWeb ? enabledWeb ? FadeIn.duration(WEB_FADE_DURATION) : undefined : (direction === 'forward' ? SlideInRight : SlideInLeft).easing(SLIDE_EASING);
|
|
31
|
+
const exiting = isWeb ? enabledWeb ? FadeOut.duration(WEB_FADE_DURATION) : undefined : FadeOut.duration(WEB_FADE_DURATION);
|
|
32
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
33
|
+
entering: entering,
|
|
34
|
+
exiting: exiting,
|
|
35
|
+
style: style,
|
|
36
|
+
children: children
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
ScreenTransition.displayName = 'ScreenTransition';
|
|
40
|
+
//# sourceMappingURL=ScreenTransition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Platform","Animated","Easing","FadeIn","FadeOut","SlideInLeft","SlideInRight","jsx","_jsx","SLIDE_EASING","out","exp","WEB_FADE_DURATION","ScreenTransition","direction","enabledWeb","style","children","isWeb","OS","entering","duration","undefined","easing","exiting","View","displayName"],"sourceRoot":"../../../src","sources":["motion/ScreenTransition.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAwC,cAAc;AACvE,OAAOC,QAAQ,IACbC,MAAM,EACNC,MAAM,EACNC,OAAO,EACPC,WAAW,EACXC,YAAY,QACP,yBAAyB;;AAEhC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAmBA;AACA,MAAMC,YAAY,GAAGP,MAAM,CAACQ,GAAG,CAACR,MAAM,CAACS,GAAG,CAAC;AAC3C;AACA,MAAMC,iBAAiB,GAAG,EAAE;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAC;EAC/BC,SAAS;EACTC,UAAU;EACVC,KAAK;EACLC;AACqB,CAAC,EAAE;EACxB,MAAMC,KAAK,GAAGlB,QAAQ,CAACmB,EAAE,KAAK,KAAK;EAEnC,MAAMC,QAAQ,GAAGF,KAAK,GAClBH,UAAU,GACRZ,MAAM,CAACkB,QAAQ,CAACT,iBAAiB,CAAC,GAClCU,SAAS,GACX,CAACR,SAAS,KAAK,SAAS,GAAGR,YAAY,GAAGD,WAAW,EAAEkB,MAAM,CAACd,YAAY,CAAC;EAE/E,MAAMe,OAAO,GAAGN,KAAK,GACjBH,UAAU,GACRX,OAAO,CAACiB,QAAQ,CAACT,iBAAiB,CAAC,GACnCU,SAAS,GACXlB,OAAO,CAACiB,QAAQ,CAACT,iBAAiB,CAAC;EAEvC,oBACEJ,IAAA,CAACP,QAAQ,CAACwB,IAAI;IAACL,QAAQ,EAAEA,QAAS;IAACI,OAAO,EAAEA,OAAQ;IAACR,KAAK,EAAEA,KAAM;IAAAC,QAAA,EAC/DA;EAAQ,CACI,CAAC;AAEpB;AAEAJ,gBAAgB,CAACa,WAAW,GAAG,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ScaleAndFadeIn","ScaleAndFadeOut","ShrinkAndPop","ScreenTransition"],"sourceRoot":"../../../src","sources":["motion/index.ts"],"mappings":";;AAAA,SAASA,cAAc,EAAEC,eAAe,EAAEC,YAAY,QAAQ,aAAU;AACxE,SAASC,gBAAgB,QAAQ,uBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { withDelay, withSequence, withTiming } from 'react-native-reanimated';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Reanimated custom layout-animation presets. Each is a worklet builder
|
|
7
|
+
* compatible with an `Animated.View`'s `entering` / `exiting` prop:
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Animated.View entering={ScaleAndFadeIn} exiting={ScaleAndFadeOut} />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* Ported from Bluesky's custom-animation set. The `'worklet'` directive is
|
|
14
|
+
* preserved through Bloom's build; the consuming app's Metro + reanimated Babel
|
|
15
|
+
* plugin transforms it so the animation runs on the UI thread (same path the
|
|
16
|
+
* existing `bottom-sheet` gesture worklets rely on).
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/** Entering: fade in while growing from 70% to full size. */
|
|
20
|
+
export const ScaleAndFadeIn = () => {
|
|
21
|
+
'worklet';
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
animations: {
|
|
25
|
+
opacity: withTiming(1),
|
|
26
|
+
transform: [{
|
|
27
|
+
scale: withTiming(1)
|
|
28
|
+
}]
|
|
29
|
+
},
|
|
30
|
+
initialValues: {
|
|
31
|
+
opacity: 0,
|
|
32
|
+
transform: [{
|
|
33
|
+
scale: 0.7
|
|
34
|
+
}]
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** Exiting counterpart to {@link ScaleAndFadeIn}: fade out while shrinking to 70%. */
|
|
40
|
+
export const ScaleAndFadeOut = () => {
|
|
41
|
+
'worklet';
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
animations: {
|
|
45
|
+
opacity: withTiming(0),
|
|
46
|
+
transform: [{
|
|
47
|
+
scale: withTiming(0.7)
|
|
48
|
+
}]
|
|
49
|
+
},
|
|
50
|
+
initialValues: {
|
|
51
|
+
opacity: 1,
|
|
52
|
+
transform: [{
|
|
53
|
+
scale: 1
|
|
54
|
+
}]
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Exiting with a brief "pop": the scale dips to 70%, overshoots to 110%, and the
|
|
61
|
+
* element fades out. Good for confirming a tapped or removed item.
|
|
62
|
+
*/
|
|
63
|
+
export const ShrinkAndPop = () => {
|
|
64
|
+
'worklet';
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
animations: {
|
|
68
|
+
opacity: withDelay(125, withTiming(0, {
|
|
69
|
+
duration: 125
|
|
70
|
+
})),
|
|
71
|
+
transform: [{
|
|
72
|
+
scale: withSequence(withTiming(0.7, {
|
|
73
|
+
duration: 75
|
|
74
|
+
}), withTiming(1.1, {
|
|
75
|
+
duration: 150
|
|
76
|
+
}))
|
|
77
|
+
}]
|
|
78
|
+
},
|
|
79
|
+
initialValues: {
|
|
80
|
+
opacity: 1,
|
|
81
|
+
transform: [{
|
|
82
|
+
scale: 1
|
|
83
|
+
}]
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=motion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["withDelay","withSequence","withTiming","ScaleAndFadeIn","animations","opacity","transform","scale","initialValues","ScaleAndFadeOut","ShrinkAndPop","duration"],"sourceRoot":"../../../src","s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AE;QAAI,CAAC,CACnC;MACF,CAAC;IAEL,CAAC;IACDH,aAAa,EAAE;MACbH,OAAO,EAAE,CAAC;MACVC,SAAS,EAAE,CAAC;QAAEC,KAAK,EAAE;MAAE,CAAC;IAC1B;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
|
+
import { Platform, Pressable } from 'react-native';
|
|
5
|
+
import Animated, { cancelAnimation, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
6
|
+
|
|
7
|
+
/** Press-in / press-out timing, in ms. */
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const DURATION = 100;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* True on touch-capable web browsers (coarse pointer). The press-scale
|
|
13
|
+
* affordance only makes sense where a finger obscures the element — with a
|
|
14
|
+
* mouse it reads as jitter — so it is disabled on non-touch web, matching the
|
|
15
|
+
* native / web-touch behaviour.
|
|
16
|
+
*/
|
|
17
|
+
const IS_WEB_TOUCH_DEVICE = Platform.OS === 'web' && typeof window !== 'undefined' && typeof window.matchMedia === 'function' && window.matchMedia('(pointer: coarse)').matches;
|
|
18
|
+
const SCALE_SUPPORTED = Platform.OS !== 'web' || IS_WEB_TOUCH_DEVICE;
|
|
19
|
+
/**
|
|
20
|
+
* A drop-in {@link Pressable} whose content springs to a smaller scale on
|
|
21
|
+
* press-in and back on release. The outer pressable stays full size (so the
|
|
22
|
+
* touch target never shrinks) while an inner wrapper scales.
|
|
23
|
+
*
|
|
24
|
+
* Honours the OS "reduce motion" setting and disables the effect on non-touch
|
|
25
|
+
* web pointers.
|
|
26
|
+
*/
|
|
27
|
+
export const PressableScale = /*#__PURE__*/forwardRef(function PressableScale({
|
|
28
|
+
targetScale = 0.98,
|
|
29
|
+
style,
|
|
30
|
+
contentContainerStyle,
|
|
31
|
+
children,
|
|
32
|
+
onPressIn,
|
|
33
|
+
onPressOut,
|
|
34
|
+
...rest
|
|
35
|
+
}, ref) {
|
|
36
|
+
const reducedMotion = useReducedMotion();
|
|
37
|
+
const animate = SCALE_SUPPORTED && !reducedMotion;
|
|
38
|
+
const scale = useSharedValue(1);
|
|
39
|
+
const animatedStyle = useAnimatedStyle(() => ({
|
|
40
|
+
transform: [{
|
|
41
|
+
scale: scale.value
|
|
42
|
+
}]
|
|
43
|
+
}));
|
|
44
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
45
|
+
ref: ref,
|
|
46
|
+
accessibilityRole: "button",
|
|
47
|
+
onPressIn: e => {
|
|
48
|
+
onPressIn?.(e);
|
|
49
|
+
if (!animate) return;
|
|
50
|
+
cancelAnimation(scale);
|
|
51
|
+
scale.value = withTiming(targetScale, {
|
|
52
|
+
duration: DURATION
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
onPressOut: e => {
|
|
56
|
+
onPressOut?.(e);
|
|
57
|
+
if (!animate) return;
|
|
58
|
+
cancelAnimation(scale);
|
|
59
|
+
scale.value = withTiming(1, {
|
|
60
|
+
duration: DURATION
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
style: style,
|
|
64
|
+
...rest,
|
|
65
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
66
|
+
style: [animate ? animatedStyle : null, contentContainerStyle],
|
|
67
|
+
children: children
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
PressableScale.displayName = 'PressableScale';
|
|
72
|
+
//# sourceMappingURL=PressableScale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","forwardRef","Platform","Pressable","Animated","cancelAnimation","useAnimatedStyle","useReducedMotion","useSharedValue","withTiming","jsx","_jsx","DURATION","IS_WEB_TOUCH_DEVICE","OS","window","matchMedia","matches","SCALE_SUPPORTED","PressableScale","targetScale","style","contentContainerStyle","children","onPressIn","onPressOut","rest","ref","reducedMotion","animate","scale","animatedStyle","transform","value","accessibilityRole","e","duration","View","displayName"],"sourceRoot":"../../../src","sources":["pressable-scale/PressableScale.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SACEC,QAAQ,EACRC,SAAS,QAKJ,cAAc;AACrB,OAAOC,QAAQ,IACbC,eAAe,EACfC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;;AAEhC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,MAAMC,QAAQ,GAAG,GAAG;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GACvBX,QAAQ,CAACY,EAAE,KAAK,KAAK,IACrB,OAAOC,MAAM,KAAK,WAAW,IAC7B,OAAOA,MAAM,CAACC,UAAU,KAAK,UAAU,IACvCD,MAAM,CAACC,UAAU,CAAC,mBAAmB,CAAC,CAACC,OAAO;AAEhD,MAAMC,eAAe,GAAGhB,QAAQ,CAACY,EAAE,KAAK,KAAK,IAAID,mBAAmB;AAapE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMM,cAAc,gBAAGlB,UAAU,CACtC,SAASkB,cAAcA,CACrB;EACEC,WAAW,GAAG,IAAI;EAClBC,KAAK;EACLC,qBAAqB;EACrBC,QAAQ;EACRC,SAAS;EACTC,UAAU;EACV,GAAGC;AACL,CAAC,EACDC,GAAG,EACH;EACA,MAAMC,aAAa,GAAGrB,gBAAgB,CAAC,CAAC;EACxC,MAAMsB,OAAO,GAAGX,eAAe,IAAI,CAACU,aAAa;EAEjD,MAAME,KAAK,GAAGtB,cAAc,CAAC,CAAC,CAAC;EAE/B,MAAMuB,aAAa,GAAGzB,gBAAgB,CAAC,OAAO;IAC5C0B,SAAS,EAAE,CAAC;MAAEF,KAAK,EAAEA,KAAK,CAACG;IAAM,CAAC;EACpC,CAAC,CAAC,CAAC;EAEH,oBACEtB,IAAA,CAACR,SAAS;IACRwB,GAAG,EAAEA,GAAI;IACTO,iBAAiB,EAAC,QAAQ;IAC1BV,SAAS,EAAGW,CAAC,IAAK;MAChBX,SAAS,GAAGW,CAAC,CAAC;MACd,IAAI,CAACN,OAAO,EAAE;MACdxB,eAAe,CAACyB,KAAK,CAAC;MACtBA,KAAK,CAACG,KAAK,GAAGxB,UAAU,CAACW,WAAW,EAAE;QAAEgB,QAAQ,EAAExB;MAAS,CAAC,CAAC;IAC/D,CAAE;IACFa,UAAU,EAAGU,CAAC,IAAK;MACjBV,UAAU,GAAGU,CAAC,CAAC;MACf,IAAI,CAACN,OAAO,EAAE;MACdxB,eAAe,CAACyB,KAAK,CAAC;MACtBA,KAAK,CAACG,KAAK,GAAGxB,UAAU,CAAC,CAAC,EAAE;QAAE2B,QAAQ,EAAExB;MAAS,CAAC,CAAC;IACrD,CAAE;IACFS,KAAK,EAAEA,KAAM;IAAA,GACTK,IAAI;IAAAH,QAAA,eAERZ,IAAA,CAACP,QAAQ,CAACiC,IAAI;MAAChB,KAAK,EAAE,CAACQ,OAAO,GAAGE,aAAa,GAAG,IAAI,EAAET,qBAAqB,CAAE;MAAAC,QAAA,EAC3EA;IAAQ,CACI;EAAC,CACP,CAAC;AAEhB,CACF,CAAC;AAEDJ,cAAc,CAACmB,WAAW,GAAG,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PressableScale"],"sourceRoot":"../../../src","sources":["pressable-scale/index.ts"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,qBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
|
+
import { Pressable } from 'react-native';
|
|
5
|
+
import { useInteractionState } from "../hooks/useInteractionState.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* A {@link Pressable} that merges `hoverStyle` on top of `style` while hovered.
|
|
9
|
+
* Hover is a web-only affordance (native platforms have no pointer hover), so
|
|
10
|
+
* this behaves like a plain `Pressable` on touch devices.
|
|
11
|
+
*/
|
|
12
|
+
export const PressableWithHover = /*#__PURE__*/forwardRef(function PressableWithHover({
|
|
13
|
+
style,
|
|
14
|
+
hoverStyle,
|
|
15
|
+
...props
|
|
16
|
+
}, ref) {
|
|
17
|
+
const {
|
|
18
|
+
state: hovered,
|
|
19
|
+
onIn: onHoverIn,
|
|
20
|
+
onOut: onHoverOut
|
|
21
|
+
} = useInteractionState();
|
|
22
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
23
|
+
...props,
|
|
24
|
+
ref: ref,
|
|
25
|
+
onHoverIn: onHoverIn,
|
|
26
|
+
onHoverOut: onHoverOut,
|
|
27
|
+
style: hovered ? [style, hoverStyle] : style
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
PressableWithHover.displayName = 'PressableWithHover';
|
|
31
|
+
//# sourceMappingURL=PressableWithHover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","forwardRef","Pressable","useInteractionState","jsx","_jsx","PressableWithHover","style","hoverStyle","props","ref","state","hovered","onIn","onHoverIn","onOut","onHoverOut","displayName"],"sourceRoot":"../../../src","sources":["pressable-with-hover/PressableWithHover.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SACEC,SAAS,QAKJ,cAAc;AAErB,SAASC,mBAAmB,QAAQ,iCAA8B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAYnE;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,gBAAGL,UAAU,CAC1C,SAASK,kBAAkBA,CAAC;EAAEC,KAAK;EAAEC,UAAU;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,EAAE;EAChE,MAAM;IAAEC,KAAK,EAAEC,OAAO;IAAEC,IAAI,EAAEC,SAAS;IAAEC,KAAK,EAAEC;EAAW,CAAC,GAAGb,mBAAmB,CAAC,CAAC;EAEpF,oBACEE,IAAA,CAACH,SAAS;IAAA,GACJO,KAAK;IACTC,GAAG,EAAEA,GAAI;IACTI,SAAS,EAAEA,SAAU;IACrBE,UAAU,EAAEA,UAAW;IACvBT,KAAK,EAAEK,OAAO,GAAG,CAACL,KAAK,EAAEC,UAAU,CAAC,GAAGD;EAAM,CAC9C,CAAC;AAEN,CACF,CAAC;AAEDD,kBAAkB,CAACW,WAAW,GAAG,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PressableWithHover"],"sourceRoot":"../../../src","sources":["pressable-with-hover/index.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,yBAAsB","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Bloom's responsive breakpoint min-widths (px), matching the Tailwind /
|
|
5
|
+
* NativeWind defaults used across the design system.
|
|
6
|
+
*
|
|
7
|
+
* This is the SINGLE SOURCE OF TRUTH for breakpoint values. Anything that
|
|
8
|
+
* branches on viewport width — the `<Dialog>` responsive `placement` resolver,
|
|
9
|
+
* the `useGutters` hook — reads from here rather than hardcoding its own
|
|
10
|
+
* numbers, so a change here propagates everywhere.
|
|
11
|
+
*/
|
|
12
|
+
export const BREAKPOINTS = {
|
|
13
|
+
sm: 640,
|
|
14
|
+
md: 768,
|
|
15
|
+
lg: 1024,
|
|
16
|
+
xl: 1280
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** A named responsive breakpoint tier. */
|
|
20
|
+
//# sourceMappingURL=breakpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BREAKPOINTS","sm","md","lg","xl"],"sourceRoot":"../../../src","sources":["styles/breakpoints.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,WAAW,GAAG;EACzBC,EAAE,EAAE,GAAG;EACPC,EAAE,EAAE,GAAG;EACPC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE;AACN,CAAU;;AAEV","ignoreList":[]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
export { atoms, flatten } from "./atoms.js";
|
|
4
4
|
export * as tokens from "./tokens.js";
|
|
5
|
+
export { BREAKPOINTS } from "./breakpoints.js";
|
|
5
6
|
export { Z_INDEX, zIndex } from "./z-index.js";
|
|
6
7
|
export { web, native, ios, android, platform, select } from "./platform.js";
|
|
7
8
|
export { SUPPORTS_NATIVE_DRIVER } from "./native-driver.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["atoms","flatten","tokens","Z_INDEX","zIndex","web","native","ios","android","platform","select","SUPPORTS_NATIVE_DRIVER"],"sourceRoot":"../../../src","sources":["styles/index.ts"],"mappings":";;AAAA,SAASA,KAAK,EAAEC,OAAO,QAAQ,YAAS;AAExC,OAAO,KAAKC,MAAM,MAAM,aAAU;AAClC,SAASC,OAAO,EAAEC,MAAM,QAAQ,cAAW;AAC3C,SAASC,GAAG,EAAEC,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,eAAY;AACxE,SAASC,sBAAsB,QAAQ,oBAAiB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["atoms","flatten","tokens","BREAKPOINTS","Z_INDEX","zIndex","web","native","ios","android","platform","select","SUPPORTS_NATIVE_DRIVER"],"sourceRoot":"../../../src","sources":["styles/index.ts"],"mappings":";;AAAA,SAASA,KAAK,EAAEC,OAAO,QAAQ,YAAS;AAExC,OAAO,KAAKC,MAAM,MAAM,aAAU;AAClC,SAASC,WAAW,QAAQ,kBAAe;AAE3C,SAASC,OAAO,EAAEC,MAAM,QAAQ,cAAW;AAC3C,SAASC,GAAG,EAAEC,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,eAAY;AACxE,SAASC,sBAAsB,QAAQ,oBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Platform, StyleSheet, View } from 'react-native';
|
|
5
|
+
import { useTheme } from "../theme/index.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* True on touch-capable web browsers (coarse pointer). A hover wash only makes
|
|
9
|
+
* sense with a hovering pointer, so it is suppressed on touch web to match
|
|
10
|
+
* native (which has no hover at all).
|
|
11
|
+
*/
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
const IS_WEB_TOUCH_DEVICE = Platform.OS === 'web' && typeof window !== 'undefined' && typeof window.matchMedia === 'function' && window.matchMedia('(pointer: coarse)').matches;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Web-only style that (a) cross-fades the overlay opacity and (b) promotes it to
|
|
17
|
+
* its own GPU layer so Safari doesn't nudge the layout by a subpixel when the
|
|
18
|
+
* overlay composites on hover. Cast because RN's `ViewStyle` has no `willChange`
|
|
19
|
+
* / `transition*` keys; react-native-web forwards them to the DOM node.
|
|
20
|
+
*/
|
|
21
|
+
const WEB_TRANSITION = {
|
|
22
|
+
transitionProperty: 'opacity',
|
|
23
|
+
transitionDuration: '0.1s',
|
|
24
|
+
transitionTimingFunction: 'ease',
|
|
25
|
+
willChange: 'opacity'
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* An absolutely-positioned, non-interactive contrast wash that fades in while
|
|
29
|
+
* its parent is hovered. Ported from Bluesky's `SubtleHover`. Pairs naturally
|
|
30
|
+
* with {@link useInteractionState} — pass its `state` as `hover`.
|
|
31
|
+
*
|
|
32
|
+
* Renders nothing on touch-web (no hovering pointer) and on native unless
|
|
33
|
+
* `native` is set. Color comes from the theme's `contrast50` token so the wash
|
|
34
|
+
* tracks the active preset and light/dark mode.
|
|
35
|
+
*/
|
|
36
|
+
export function SubtleHover({
|
|
37
|
+
hover,
|
|
38
|
+
opacity,
|
|
39
|
+
style,
|
|
40
|
+
native = false
|
|
41
|
+
}) {
|
|
42
|
+
const theme = useTheme();
|
|
43
|
+
const isWeb = Platform.OS === 'web';
|
|
44
|
+
if (isWeb ? IS_WEB_TOUCH_DEVICE : !native) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
const targetOpacity = opacity ?? (theme.isDark ? 0.4 : 0.5);
|
|
48
|
+
return /*#__PURE__*/_jsx(View, {
|
|
49
|
+
style: [styles.overlay, {
|
|
50
|
+
backgroundColor: theme.colors.contrast50,
|
|
51
|
+
opacity: hover ? targetOpacity : 0
|
|
52
|
+
}, isWeb ? WEB_TRANSITION : null, style]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
SubtleHover.displayName = 'SubtleHover';
|
|
56
|
+
const styles = StyleSheet.create({
|
|
57
|
+
overlay: {
|
|
58
|
+
position: 'absolute',
|
|
59
|
+
top: 0,
|
|
60
|
+
left: 0,
|
|
61
|
+
right: 0,
|
|
62
|
+
bottom: 0,
|
|
63
|
+
pointerEvents: 'none'
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=SubtleHover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Platform","StyleSheet","View","useTheme","jsx","_jsx","IS_WEB_TOUCH_DEVICE","OS","window","matchMedia","matches","WEB_TRANSITION","transitionProperty","transitionDuration","transitionTimingFunction","willChange","SubtleHover","hover","opacity","style","native","theme","isWeb","targetOpacity","isDark","styles","overlay","backgroundColor","colors","contrast50","displayName","create","position","top","left","right","bottom","pointerEvents"],"sourceRoot":"../../../src","sources":["subtle-hover/SubtleHover.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAA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AGxB,UAAU,CAAC8B,MAAM,CAAC;EAC/BL,OAAO,EAAE;IACPM,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SubtleHover"],"sourceRoot":"../../../src","sources":["subtle-hover/index.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,kBAAe","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ import { Platform } from 'react-native';
|
|
|
4
4
|
import { APP_COLOR_PRESETS } from "./color-presets.js";
|
|
5
5
|
import { getAdaptiveColors } from "./adaptive-colors.js";
|
|
6
6
|
import { getResolvedTokens, hslToSrgb } from "./token-registry.js";
|
|
7
|
+
import { THEME_GRADIENTS } from "./gradients.js";
|
|
7
8
|
/**
|
|
8
9
|
* Status colors used across the design system. Independent of the accent
|
|
9
10
|
* preset so semantic intent stays stable across themes.
|
|
@@ -102,6 +103,7 @@ export function buildTheme(preset, resolved, isAdaptive = false) {
|
|
|
102
103
|
return {
|
|
103
104
|
mode: resolved,
|
|
104
105
|
colors,
|
|
106
|
+
gradients: THEME_GRADIENTS,
|
|
105
107
|
isDark: resolved === 'dark',
|
|
106
108
|
isLight: resolved === 'light'
|
|
107
109
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","APP_COLOR_PRESETS","getAdaptiveColors","getResolvedTokens","hslToSrgb","STATUS_COLORS","success","error","warning","info","extractHue","triple","first","split","replace","hue","parseInt","Number","isFinite","buildColorsFromPreset","preset","resolved","t","isDark","g","k","hslRgb","h","s","l","presetTokens","dark","light","pHue","dHue","background","backgroundSecondary","backgroundTertiary","text","textSecondary","textTertiary","border","borderLight","primary","primaryForeground","primaryLight","primaryDark","secondary","tint","icon","iconActive","primarySubtle","primarySubtleForeground","negative","negativeForeground","negativeSubtle","negativeSubtleForeground","contrast50","card","shadow","overlay","buildTheme","isAdaptive","adaptive","OS","undefined","colors","mode","isLight"],"sourceRoot":"../../../src","sources":["theme/build-theme.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,iBAAiB,QAA2B,oBAAiB;AACtE,SAASC,iBAAiB,QAAQ,sBAAmB;AACrD,SAASC,iBAAiB,EAAEC,SAAS,QAAQ,qBAAkB;
|
|
1
|
+
{"version":3,"names":["Platform","APP_COLOR_PRESETS","getAdaptiveColors","getResolvedTokens","hslToSrgb","THEME_GRADIENTS","STATUS_COLORS","success","error","warning","info","extractHue","triple","first","split","replace","hue","parseInt","Number","isFinite","buildColorsFromPreset","preset","resolved","t","isDark","g","k","hslRgb","h","s","l","presetTokens","dark","light","pHue","dHue","background","backgroundSecondary","backgroundTertiary","text","textSecondary","textTertiary","border","borderLight","primary","primaryForeground","primaryLight","primaryDark","secondary","tint","icon","iconActive","primarySubtle","primarySubtleForeground","negative","negativeForeground","negativeSubtle","negativeSubtleForeground","contrast50","card","shadow","overlay","buildTheme","isAdaptive","adaptive","OS","undefined","colors","mode","gradients","isLight"],"sourceRoot":"../../../src","sources":["theme/build-theme.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,iBAAiB,QAA2B,oBAAiB;AACtE,SAASC,iBAAiB,QAAQ,sBAAmB;AACrD,SAASC,iBAAiB,EAAEC,SAAS,QAAQ,qBAAkB;AAC/D,SAASC,eAAe,QAAQ,gBAAa;AAG7C;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAG;EAC3BC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,SAAS;EAChBC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE;AACR,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAACC,MAAc,EAAU;EAC1C,MAAMC,KAAK,GAAG,CAACD,M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E,EAAE,CAAC,GAAGR,MAAM,CAACQ,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC;IAC9EuB,UAAU,EAAElC,MAAM,GAAGG,MAAM,CAACO,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,GAAGP,MAAM,CAACO,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC;IAEhEyB,IAAI,EAAElC,CAAC,CAAC,SAAS,CAAC;IAClBmC,MAAM,EAAEpC,MAAM,GAAG,oBAAoB,GAAG,oBAAoB;IAC5DqC,OAAO,EAAE;EACX,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CACxBzC,MAAoB,EACpBC,QAA0B,EAC1ByC,UAAmB,GAAG,KAAK,EACpB;EACP,MAAMC,QAAQ,GAAGD,UAAU,IAAI/D,QAAQ,CAACiE,EAAE,KAAK,KAAK,GAAG/D,iBAAiB,CAAC,CAAC,GAAGgE,SAAS;EACtF,MAAMC,MAAM,GAAGH,QAAQ,IAAI5C,qBAAqB,CAACC,MAAM,EAAEC,QAAQ,CAAC;EAElE,OAAO;IACL8C,IAAI,EAAE9C,QAAQ;IACd6C,MAAM;IACNE,SAAS,EAAEhE,eAAe;IAC1BmB,MAAM,EAAEF,QAAQ,KAAK,MAAM;IAC3BgD,OAAO,EAAEhD,QAAQ,KAAK;EACxB,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Brand-neutral named linear-gradient palettes shared across the design system —
|
|
5
|
+
* decorative avatar rings, hero surfaces, empty-state art, and similar accents.
|
|
6
|
+
*
|
|
7
|
+
* Each entry lists ordered `[offset, color]` stops where `offset` is a `0–1`
|
|
8
|
+
* position along the gradient axis. These are intentionally theme-agnostic (the
|
|
9
|
+
* same values are exposed in light and dark mode) and not tied to any single
|
|
10
|
+
* app's brand, so components can reference them by a stable, descriptive name.
|
|
11
|
+
*/
|
|
12
|
+
export const THEME_GRADIENTS = {
|
|
13
|
+
sky: {
|
|
14
|
+
values: [[0, '#0A7AFF'], [1, '#59B9FF']]
|
|
15
|
+
},
|
|
16
|
+
midnight: {
|
|
17
|
+
values: [[0, '#022C5E'], [1, '#4079BC']]
|
|
18
|
+
},
|
|
19
|
+
sunrise: {
|
|
20
|
+
values: [[0, '#4E90AE'], [0.4, '#AEA3AB'], [0.8, '#E6A98F'], [1, '#F3A84C']]
|
|
21
|
+
},
|
|
22
|
+
sunset: {
|
|
23
|
+
values: [[0, '#6772AF'], [0.6, '#B88BB6'], [1, '#FFA6AC']]
|
|
24
|
+
},
|
|
25
|
+
summer: {
|
|
26
|
+
values: [[0, '#FF6A56'], [0.3, '#FF9156'], [1, '#FFDD87']]
|
|
27
|
+
},
|
|
28
|
+
nordic: {
|
|
29
|
+
values: [[0, '#083367'], [1, '#9EE8C1']]
|
|
30
|
+
},
|
|
31
|
+
bonfire: {
|
|
32
|
+
values: [[0, '#203E4E'], [0.4, '#755B62'], [0.8, '#CD7765'], [1, '#EF956E']]
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=gradients.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["THEME_GRADIENTS","sky","values","midnight","sunrise","sunset","summer","nordic","bonfire"],"sourceRoot":"../../../src","sources":["theme/gradients.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,eAA+B,GAAG;EAC7CC,GAAG,EAAE;IACHC,MAAM,EAAE,CACN,CAAC,CAAC,EAAE,SAAS,CAAC,EACd,CAAC,CAAC,EAAE,SAAS,CAAC;EAElB,CAAC;EACDC,QAAQ,EAAE;IACRD,MAAM,EAAE,CACN,CAAC,CAAC,EAAE,SAAS,CAAC,EACd,CAAC,CAAC,EAAE,SAAS,CAAC;EAElB,CAAC;EACDE,OAAO,EAAE;IACPF,MAAM,EAAE,CACN,CAAC,CAAC,EAAE,SAAS,CAAC,EACd,CAAC,GAAG,EAAE,SAAS,CAAC,EAChB,CAAC,GAAG,EAAE,SAAS,CAAC,EAChB,CAAC,CAAC,EAAE,SAAS,CAAC;EAElB,CAAC;EACDG,MAAM,EAAE;IACNH,MAAM,EAAE,CACN,CAAC,CAAC,EAAE,SAAS,CAAC,EACd,CAAC,GAAG,EAAE,SAAS,CAAC,EAChB,CAAC,CAAC,EAAE,SAAS,CAAC;EAElB,CAAC;EACDI,MAAM,EAAE;IACNJ,MAAM,EAAE,CACN,CAAC,CAAC,EAAE,SAAS,CAAC,EACd,CAAC,GAAG,EAAE,SAAS,CAAC,EAChB,CAAC,CAAC,EAAE,SAAS,CAAC;EAElB,CAAC;EACDK,MAAM,EAAE;IACNL,MAAM,EAAE,CACN,CAAC,CAAC,EAAE,SAAS,CAAC,EACd,CAAC,CAAC,EAAE,SAAS,CAAC;EAElB,CAAC;EACDM,OAAO,EAAE;IACPN,MAAM,EAAE,CACN,CAAC,CAAC,EAAE,SAAS,CAAC,EACd,CAAC,GAAG,EAAE,SAAS,CAAC,EAChB,CAAC,GAAG,EAAE,SAAS,CAAC,EAChB,CAAC,CAAC,EAAE,SAAS,CAAC;EAElB;AACF,CAAC","ignoreList":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export { BloomThemeProvider } from "./BloomThemeProvider.js";
|
|
4
4
|
export { BloomColorScope, useColorScopeStyle } from './color-scope';
|
|
5
5
|
export { buildTheme, STATUS_COLORS } from "./build-theme.js";
|
|
6
|
+
export { THEME_GRADIENTS } from "./gradients.js";
|
|
6
7
|
export { useTheme, useThemeColor, useBloomTheme } from "./use-theme.js";
|
|
7
8
|
export { useNavigationTheme } from "./use-navigation-theme.js";
|
|
8
9
|
export { APP_COLOR_NAMES, PREMIUM_COLOR_NAMES, APP_COLOR_PRESETS, HEX_TO_APP_COLOR, hexToAppColorName } from "./color-presets.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BloomThemeProvider","BloomColorScope","useColorScopeStyle","buildTheme","STATUS_COLORS","useTheme","useThemeColor","useBloomTheme","useNavigationTheme","APP_COLOR_NAMES","PREMIUM_COLOR_NAMES","APP_COLOR_PRESETS","HEX_TO_APP_COLOR","hexToAppColorName","getPresetVars","applyPresetVarsToDocument","applyDarkClass","setColorSchemeSafe","initCssInteropDarkMode","webLocalStorage"],"sourceRoot":"../../../src","sources":["theme/index.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,yBAAsB;AAKzD,SAASC,eAAe,EAAEC,kBAAkB,QAAQ,eAAe;AAEnE,SAASC,UAAU,EAAEC,aAAa,QAAQ,kBAAe;AACzD,SAASC,QAAQ,EAAEC,aAAa,EAAEC,aAAa,QAAQ,gBAAa;AACpE,SAASC,kBAAkB,QAAQ,2BAAwB;AAI3D,SACEC,eAAe,EACfC,mBAAmB,EACnBC,iBAAiB,EACjBC,gBAAgB,EAChBC,iBAAiB,QACZ,oBAAiB;AACxB,SAASC,aAAa,EAAEC,yBAAyB,QAAQ,kBAAe;AACxE,SAASC,cAAc,QAAQ,uBAAoB;AACnD,SAASC,kBAAkB,QAAQ,4BAAyB;AAC5D,SAASC,sBAAsB,QAAQ,uBAAoB;AAE3D,SAASC,eAAe,QAAQ,kBAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["BloomThemeProvider","BloomColorScope","useColorScopeStyle","buildTheme","STATUS_COLORS","THEME_GRADIENTS","useTheme","useThemeColor","useBloomTheme","useNavigationTheme","APP_COLOR_NAMES","PREMIUM_COLOR_NAMES","APP_COLOR_PRESETS","HEX_TO_APP_COLOR","hexToAppColorName","getPresetVars","applyPresetVarsToDocument","applyDarkClass","setColorSchemeSafe","initCssInteropDarkMode","webLocalStorage"],"sourceRoot":"../../../src","sources":["theme/index.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,yBAAsB;AAKzD,SAASC,eAAe,EAAEC,kBAAkB,QAAQ,eAAe;AAEnE,SAASC,UAAU,EAAEC,aAAa,QAAQ,kBAAe;AACzD,SAASC,eAAe,QAAQ,gBAAa;AAC7C,SAASC,QAAQ,EAAEC,aAAa,EAAEC,aAAa,QAAQ,gBAAa;AACpE,SAASC,kBAAkB,QAAQ,2BAAwB;AAI3D,SACEC,eAAe,EACfC,mBAAmB,EACnBC,iBAAiB,EACjBC,gBAAgB,EAChBC,iBAAiB,QACZ,oBAAiB;AACxB,SAASC,aAAa,EAAEC,yBAAyB,QAAQ,kBAAe;AACxE,SAASC,cAAc,QAAQ,uBAAoB;AACnD,SAASC,kBAAkB,QAAQ,4BAAyB;AAC5D,SAASC,sBAAsB,QAAQ,uBAAoB;AAE3D,SAASC,eAAe,QAAQ,kBAAe","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AnimatedCheckRef {
|
|
3
|
+
/** Replays the draw-on animation from the start. */
|
|
4
|
+
play: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface AnimatedCheckProps {
|
|
7
|
+
/** Width and height in px. Defaults to `24`. */
|
|
8
|
+
size?: number;
|
|
9
|
+
/** Stroke color of the ring and check. Defaults to the theme success color. */
|
|
10
|
+
color?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A draw-on checkmark: a ring strokes on, then the check strokes in. Expose a
|
|
14
|
+
* ref and call `ref.current?.play()` to (re)play — e.g. on a successful submit.
|
|
15
|
+
* Ported from Bluesky's `AnimatedCheck`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const AnimatedCheck: React.ForwardRefExoticComponent<AnimatedCheckProps & React.RefAttributes<AnimatedCheckRef>>;
|
|
18
|
+
//# sourceMappingURL=AnimatedCheck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimatedCheck.d.ts","sourceRoot":"","sources":["../../../../src/animated-check/AnimatedCheck.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAgCrF,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAyGD;;;;GAIG;AACH,eAAO,MAAM,aAAa,6FAWzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/animated-check/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../src/avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../src/avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAY/D,OAAO,KAAK,EAAE,WAAW,EAAoB,MAAM,SAAS,CAAC;AA4X7D,eAAO,MAAM,MAAM,yCAAwB,CAAC"}
|