@hzblj/kara-components 0.7.0 → 0.8.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.
Files changed (117) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +5 -5
  3. package/lib/module/atoms/activity-indicator/activity-indicator.android.js +42 -0
  4. package/lib/module/atoms/activity-indicator/activity-indicator.android.js.map +1 -0
  5. package/lib/module/atoms/activity-indicator/activity-indicator.ios.js +19 -0
  6. package/lib/module/atoms/activity-indicator/activity-indicator.ios.js.map +1 -0
  7. package/lib/module/atoms/activity-indicator/activity-indicator.types.js +4 -0
  8. package/lib/module/atoms/activity-indicator/activity-indicator.types.js.map +1 -0
  9. package/lib/module/atoms/activity-indicator/index.js +2 -1
  10. package/lib/module/atoms/activity-indicator/index.js.map +1 -1
  11. package/lib/module/atoms/avatar/avatar.js +2 -4
  12. package/lib/module/atoms/avatar/avatar.js.map +1 -1
  13. package/lib/module/atoms/blur-view/blur-view.android.js +100 -0
  14. package/lib/module/atoms/blur-view/blur-view.android.js.map +1 -0
  15. package/lib/module/atoms/blur-view/blur-view.ios.js +43 -0
  16. package/lib/module/atoms/blur-view/blur-view.ios.js.map +1 -0
  17. package/lib/module/atoms/blur-view/blur-view.types.js +4 -0
  18. package/lib/module/atoms/blur-view/blur-view.types.js.map +1 -0
  19. package/lib/module/atoms/blur-view/index.js +5 -0
  20. package/lib/module/atoms/blur-view/index.js.map +1 -0
  21. package/lib/module/atoms/glass-view/glass-view.android.js +36 -5
  22. package/lib/module/atoms/glass-view/glass-view.android.js.map +1 -1
  23. package/lib/module/atoms/image/image.js +13 -6
  24. package/lib/module/atoms/image/image.js.map +1 -1
  25. package/lib/module/atoms/image/image.types.js +4 -0
  26. package/lib/module/atoms/image/image.types.js.map +1 -0
  27. package/lib/module/atoms/image/index.js +1 -0
  28. package/lib/module/atoms/image/index.js.map +1 -1
  29. package/lib/module/atoms/index.js +1 -0
  30. package/lib/module/atoms/index.js.map +1 -1
  31. package/lib/module/atoms/island/island.android.js +6 -2
  32. package/lib/module/atoms/island/island.android.js.map +1 -1
  33. package/lib/module/atoms/island/island.ios.js +5 -2
  34. package/lib/module/atoms/island/island.ios.js.map +1 -1
  35. package/lib/module/atoms/pressable/pressable.js +38 -6
  36. package/lib/module/atoms/pressable/pressable.js.map +1 -1
  37. package/lib/module/atoms/rn-text/rn-text.js +5 -2
  38. package/lib/module/atoms/rn-text/rn-text.js.map +1 -1
  39. package/lib/module/atoms/skeleton/skeleton.js +5 -5
  40. package/lib/module/atoms/skeleton/skeleton.js.map +1 -1
  41. package/lib/module/atoms/text/text.android.js +5 -2
  42. package/lib/module/atoms/text/text.android.js.map +1 -1
  43. package/lib/module/atoms/text/text.ios.js +14 -3
  44. package/lib/module/atoms/text/text.ios.js.map +1 -1
  45. package/lib/module/molecules/collapsible/collapsible.android.js +37 -7
  46. package/lib/module/molecules/collapsible/collapsible.android.js.map +1 -1
  47. package/lib/module/molecules/navigation-bar/navigation-bar.android.js +2 -8
  48. package/lib/module/molecules/navigation-bar/navigation-bar.android.js.map +1 -1
  49. package/lib/module/molecules/pager/pager.android.js +5 -4
  50. package/lib/module/molecules/pager/pager.android.js.map +1 -1
  51. package/lib/module/molecules/scroll-edge-container/scroll-edge-container.android.js +114 -11
  52. package/lib/module/molecules/scroll-edge-container/scroll-edge-container.android.js.map +1 -1
  53. package/lib/module/molecules/stepper/stepper.ios.js +45 -8
  54. package/lib/module/molecules/stepper/stepper.ios.js.map +1 -1
  55. package/lib/module/ripple-clip.js +9 -1
  56. package/lib/module/ripple-clip.js.map +1 -1
  57. package/lib/typescript/atoms/activity-indicator/activity-indicator.d.ts +1 -3
  58. package/lib/typescript/atoms/activity-indicator/activity-indicator.ios.d.ts +3 -0
  59. package/lib/typescript/atoms/activity-indicator/activity-indicator.types.d.ts +17 -0
  60. package/lib/typescript/atoms/activity-indicator/index.d.ts +1 -0
  61. package/lib/typescript/atoms/blur-view/blur-view.d.ts +1 -0
  62. package/lib/typescript/atoms/blur-view/blur-view.ios.d.ts +3 -0
  63. package/lib/typescript/atoms/blur-view/blur-view.types.d.ts +31 -0
  64. package/lib/typescript/atoms/blur-view/index.d.ts +2 -0
  65. package/lib/typescript/atoms/box/a-box.d.ts +1 -1
  66. package/lib/typescript/atoms/glass-view/glass-view.types.d.ts +12 -5
  67. package/lib/typescript/atoms/image/image.d.ts +12 -4
  68. package/lib/typescript/atoms/image/image.types.d.ts +4 -0
  69. package/lib/typescript/atoms/image/index.d.ts +1 -0
  70. package/lib/typescript/atoms/index.d.ts +1 -0
  71. package/lib/typescript/atoms/island/island.types.d.ts +8 -4
  72. package/lib/typescript/atoms/pressable/pressable.types.d.ts +5 -3
  73. package/lib/typescript/atoms/rn-text/rn-text.types.d.ts +7 -2
  74. package/lib/typescript/atoms/skeleton/skeleton.types.d.ts +8 -4
  75. package/lib/typescript/atoms/text/text.types.d.ts +7 -2
  76. package/lib/typescript/molecules/scroll-edge-container/scroll-edge-container.types.d.ts +6 -4
  77. package/lib/typescript/molecules/stepper/stepper.ios.d.ts +5 -0
  78. package/lib/typescript/molecules/stepper/stepper.types.d.ts +1 -4
  79. package/package.json +5 -5
  80. package/src/atoms/activity-indicator/activity-indicator.android.tsx +32 -0
  81. package/src/atoms/activity-indicator/activity-indicator.ios.tsx +15 -0
  82. package/src/atoms/activity-indicator/activity-indicator.types.ts +20 -0
  83. package/src/atoms/activity-indicator/index.ts +1 -0
  84. package/src/atoms/avatar/avatar.tsx +1 -1
  85. package/src/atoms/blur-view/blur-view.android.tsx +68 -0
  86. package/src/atoms/blur-view/blur-view.ios.tsx +37 -0
  87. package/src/atoms/blur-view/blur-view.types.ts +34 -0
  88. package/src/atoms/blur-view/index.ts +2 -0
  89. package/src/atoms/glass-view/glass-view.android.tsx +41 -3
  90. package/src/atoms/glass-view/glass-view.types.ts +12 -5
  91. package/src/atoms/image/image.tsx +11 -12
  92. package/src/atoms/image/image.types.ts +6 -0
  93. package/src/atoms/image/index.ts +1 -0
  94. package/src/atoms/index.ts +1 -0
  95. package/src/atoms/island/island.android.tsx +10 -2
  96. package/src/atoms/island/island.ios.tsx +4 -2
  97. package/src/atoms/island/island.types.ts +8 -4
  98. package/src/atoms/pressable/pressable.tsx +46 -6
  99. package/src/atoms/pressable/pressable.types.ts +5 -3
  100. package/src/atoms/rn-text/rn-text.tsx +6 -3
  101. package/src/atoms/rn-text/rn-text.types.ts +15 -9
  102. package/src/atoms/skeleton/skeleton.tsx +4 -4
  103. package/src/atoms/skeleton/skeleton.types.ts +8 -4
  104. package/src/atoms/text/text.android.tsx +7 -1
  105. package/src/atoms/text/text.ios.tsx +14 -3
  106. package/src/atoms/text/text.types.ts +7 -2
  107. package/src/molecules/collapsible/collapsible.android.tsx +47 -7
  108. package/src/molecules/navigation-bar/navigation-bar.android.tsx +1 -6
  109. package/src/molecules/pager/pager.android.tsx +4 -1
  110. package/src/molecules/scroll-edge-container/scroll-edge-container.android.tsx +103 -10
  111. package/src/molecules/scroll-edge-container/scroll-edge-container.types.ts +6 -4
  112. package/src/molecules/stepper/stepper.ios.tsx +37 -1
  113. package/src/molecules/stepper/stepper.types.ts +1 -4
  114. package/src/ripple-clip.ts +10 -1
  115. package/lib/module/atoms/activity-indicator/activity-indicator.js +0 -14
  116. package/lib/module/atoms/activity-indicator/activity-indicator.js.map +0 -1
  117. package/src/atoms/activity-indicator/activity-indicator.tsx +0 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # @hzblj/kara-components
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#17](https://github.com/hzblj/kara-ui/pull/17) [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29) Thanks [@hzblj](https://github.com/hzblj)! - `ActivityIndicator` plays Material 3's expressive `LoadingIndicator` on Android — its shapes morph as it turns — in a host of its own, so it still renders anywhere; iOS keeps UIKit's spinner. It takes the design system's props now, not React Native's: `color` is a token (`fill.accent.primary` by default), `size` is `small` or `large`.
8
+
9
+ `Collapsible` on Android spans its parent, the chevron at the far end, and its row is never shorter than Material's 48dp touch target; the chevron sat right after the label. `Pager`'s dots on Android are centred under the pages.
10
+
11
+ - [#17](https://github.com/hzblj/kara-ui/pull/17) [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29) Thanks [@hzblj](https://github.com/hzblj)! - Android gets glass and a scroll edge of its own.
12
+
13
+ - `GlassView` is frosted glass on Android: what lies behind the capsule, blurred (Android 12+), under a translucent tonal surface — or its `tint` — and a light hairline, the blurred surfaces Android 16 gives its own system UI. It was an almost clear capsule that left its content unreadable over a photo. Below Android 12 the same colours are drawn near-opaque. kara-native's new `BackdropBlurView` (`/jetpack-compose`) does the blur — blurred, then saturated, as iOS lifts the colour under its materials: a plain view, no host, and an idle screen draws no frames.
14
+ - `ScrollEdgeContainer` on Android behaves like a Material top app bar on scroll: the bars stay transparent at rest and fill with the scrolled container colour once content scrolls under the top one, the bottom one while there is more below. Its scroll view also takes the room between the bars now — it grew to its content's height, ran under the bottom bar and could not scroll.
15
+ - New token `surface.secondary`: Material's `surfaceContainer` on Android, `tertiarySystemGroupedBackgroundColor` on iOS — a step above `surface.primary`.
16
+
17
+ - [#17](https://github.com/hzblj/kara-ui/pull/17) [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29) Thanks [@hzblj](https://github.com/hzblj)! - `Pressable` on Android presses the Material way: a ripple over the content — the pressed state layer — clipped to the pressable's shape, and nothing scales. iOS keeps its spring to 96%. Give the `Pressable` the `borderRadius` of what it wraps (`full` around a `GlassView`) and the ripple follows it.
18
+
19
+ `Collapsible` on Android expands down from its row with a fade, and its chevron turns toward the content; it grew from a corner and the chevron jumped.
20
+
21
+ - [#17](https://github.com/hzblj/kara-ui/pull/17) [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29) Thanks [@hzblj](https://github.com/hzblj)! - New `BlurView`: the system materials, by SwiftUI's names — `ultraThin`, `thin`, `regular`, `thick`, `ultraThick`.
22
+
23
+ - iOS: UIKit's `system*Material` blur as a plain view — no SwiftUI host, cheap enough for a list cell — with `vibrancy` (`primary` to `quaternary`, `fill`, `separator`) to draw the content the way iOS draws its own on a material.
24
+ - Android: what lies behind, blurred and saturated (Android 12+), under a Material tonal surface that rises from `surface` to `surfaceContainerHighest` as the material thickens; below Android 12 the surface alone.
25
+ - `appearance` pins a material to light or dark whatever the app's; `borderRadius` shapes it and clips the content.
26
+
27
+ kara-native adds `BlurView` (`/swift-ui`).
28
+
29
+ - [#17](https://github.com/hzblj/kara-ui/pull/17) [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29) Thanks [@hzblj](https://github.com/hzblj)! - `sx` reaches the components that still took raw styles or none:
30
+
31
+ - `Text` takes the native `sx` surface — padding, a background, a frame (`wide` puts the text on the side `align` names) and the `ios` bucket. `ios.contentTransition` with the new `ios.animation` rolls a number to its next value, and `ios.monospacedDigit` keeps it from shifting what follows. `Stepper` on iOS is built on it.
32
+ - `RnText` takes `Box`'s `sx` props for its own box — margins, `flex`, padding — all but `align`, which still aligns its lines.
33
+ - `Image` is `sx(expo-image)`, the way `Box` is `sx(View)`: `w`, `h`, `aspectRatio`, `borderRadius`, `position`… instead of a `style` object. Its props are exported as `ImageProps`.
34
+ - `Island` takes the same `sx` props for where it sits in React Native layout: `<Island h={240} matchContents={false}>`. An explicit `style` still wins.
35
+ - `Skeleton` is sized with the `sx` names, `h` and `w` (was `height` and `width`), and `w` takes a percentage: `<Skeleton h={12} w="60%" />` for a line that ends early.
36
+ - The React Native surface gains `inset`, all four edges at once: `position="absolute" inset={0}` fills the parent.
37
+
38
+ ### Patch Changes
39
+
40
+ - Updated dependencies [[`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29), [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29), [`bf2e70c`](https://github.com/hzblj/kara-ui/commit/bf2e70c8ae5a07fffb6433bd2ce08e371695ec50), [`4c7eaa0`](https://github.com/hzblj/kara-ui/commit/4c7eaa021ee4a4b0475e1dfb420fa5803c21ba29)]:
41
+ - @hzblj/kara-native@0.8.0
42
+ - @hzblj/kara-theme@0.8.0
43
+ - @hzblj/kara-sx@0.8.0
44
+
3
45
  ## 0.7.0
4
46
 
5
47
  ### Minor Changes
package/README.md CHANGED
@@ -8,9 +8,9 @@
8
8
  [license-badge]: https://img.shields.io/badge/license-MIT-ff5700?labelColor=27272a
9
9
  [license-url]: https://github.com/hzblj/kara-ui/blob/main/LICENSE
10
10
 
11
- <a href="https://kara.janblazej.dev"><img src="https://kara.janblazej.dev/og.png" alt="Kara — native UI for Expo: real SwiftUI and Jetpack Compose views" width="720"></a>
11
+ <a href="https://www.kara.janblazej.dev"><img src="https://www.kara.janblazej.dev/og.png" alt="Kara — native UI for Expo: real SwiftUI and Jetpack Compose views" width="720"></a>
12
12
 
13
- The components of [Kara UI](https://kara.janblazej.dev) — a native-first design system for Expo.
13
+ The components of [Kara UI](https://www.kara.janblazej.dev) — a native-first design system for Expo.
14
14
 
15
15
  > **Install [`@hzblj/kara-ui`](https://www.npmjs.com/package/@hzblj/kara-ui) instead.** This package is one of its
16
16
  > building blocks, published so its types resolve; everything here is re-exported from `@hzblj/kara-ui`.
@@ -26,9 +26,9 @@ The components of [Kara UI](https://kara.janblazej.dev) — a native-first desig
26
26
 
27
27
  ## Documentation
28
28
 
29
- - [Components](https://kara.janblazej.dev/docs/components) — every one photographed on iOS and Android, with its props
30
- - [Screen and Island](https://kara.janblazej.dev/docs/hosts)
31
- - [Haptics](https://kara.janblazej.dev/docs/haptics)
29
+ - [Components](https://www.kara.janblazej.dev/docs/components) — every one photographed on iOS and Android, with its props
30
+ - [Screen and Island](https://www.kara.janblazej.dev/docs/hosts)
31
+ - [Haptics](https://www.kara.janblazej.dev/docs/haptics)
32
32
 
33
33
  ## License
34
34
 
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ import { Host, LoadingIndicator } from '@expo/ui/jetpack-compose';
4
+ import { fillMaxSize, testID as testIdModifier } from '@expo/ui/jetpack-compose/modifiers';
5
+ import { useAppTheme } from '@hzblj/kara-theme';
6
+ import { useMemo } from 'react';
7
+ import { StyleSheet } from 'react-native';
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ /** Material's 48dp for a screen; half of it in a row, about where React Native's small spinner sat. */
10
+ const styles = StyleSheet.create({
11
+ large: {
12
+ height: 48,
13
+ width: 48
14
+ },
15
+ small: {
16
+ height: 24,
17
+ width: 24
18
+ }
19
+ });
20
+
21
+ /**
22
+ * Material 3's expressive `LoadingIndicator` in a host of its own, sized here rather than measured, so it renders
23
+ * anywhere and takes its place in the first frame.
24
+ */
25
+ export const ActivityIndicator = ({
26
+ color = 'fill.accent.primary',
27
+ size = 'small',
28
+ testID
29
+ }) => {
30
+ const theme = useAppTheme();
31
+ const modifiers = useMemo(() => testID ? [fillMaxSize(), testIdModifier(testID)] : [fillMaxSize()], [testID]);
32
+ return /*#__PURE__*/_jsx(Host, {
33
+ colorScheme: theme.dark ? 'dark' : 'light',
34
+ seedColor: theme.materialSeed,
35
+ style: styles[size],
36
+ children: /*#__PURE__*/_jsx(LoadingIndicator, {
37
+ color: theme.color(color),
38
+ modifiers: modifiers
39
+ })
40
+ });
41
+ };
42
+ //# sourceMappingURL=activity-indicator.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Host","LoadingIndicator","fillMaxSize","testID","testIdModifier","useAppTheme","useMemo","StyleSheet","jsx","_jsx","styles","create","large","height","width","small","ActivityIndicator","color","size","theme","modifiers","colorScheme","dark","seedColor","materialSeed","style","children"],"sourceRoot":"../../../../src","sources":["atoms/activity-indicator/activity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
+ "use strict";
2
+
3
+ import { useAppTheme } from '@hzblj/kara-theme';
4
+ import { ActivityIndicator as RNActivityIndicator } from 'react-native';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ /** React Native's spinner, which on iOS is UIKit's own `UIActivityIndicatorView`. */
7
+ export const ActivityIndicator = ({
8
+ color = 'fill.accent.primary',
9
+ size = 'small',
10
+ testID
11
+ }) => {
12
+ const theme = useAppTheme();
13
+ return /*#__PURE__*/_jsx(RNActivityIndicator, {
14
+ color: theme.color(color),
15
+ size: size,
16
+ testID: testID
17
+ });
18
+ };
19
+ //# sourceMappingURL=activity-indicator.ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useAppTheme","ActivityIndicator","RNActivityIndicator","jsx","_jsx","color","size","testID","theme"],"sourceRoot":"../../../../src","sources":["atoms/activity-indicator/activity-indicator.ios.tsx"],"mappings":";;AAAA,SAAQA,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,iBAAiB,IAAIC,mBAAmB,QAAO,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAIrE;AACA,OAAO,MAAMH,iBAA6C,GAAGA,CAAC;EAC5DI,KAAK,GAAG,qBAAqB;EAC7BC,IAAI,GAAG,OAAO;EACdC;AACsB,CAAC,KAAK;EAC5B,MAAMC,KAAK,GAAGR,WAAW,CAAC,CAAC;EAE3B,oBAAOI,IAAA,CAACF,mBAAmB;IAACG,KAAK,EAAEG,KAAK,CAACH,KAAK,CAACA,KAAK,CAAE;IAACC,IAAI,EAAEA,IAAK;IAACC,MAAM,EAAEA;EAAO,CAAE,CAAC;AACvF,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=activity-indicator.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["atoms/activity-indicator/activity-indicator.types.ts"],"mappings":"","ignoreList":[]}
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
2
 
3
- export * from "./activity-indicator.js";
3
+ export * from './activity-indicator';
4
+ export * from "./activity-indicator.types.js";
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["atoms/activity-indicator/index.ts"],"mappings":";;AAAA,cAAc,yBAAsB","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["atoms/activity-indicator/index.ts"],"mappings":";;AAAA,cAAc,sBAAsB;AACpC,cAAc,+BAA4B","ignoreList":[]}
@@ -32,11 +32,9 @@ export const Avatar = ({
32
32
  testID: testID,
33
33
  w: diameter,
34
34
  children: source ? /*#__PURE__*/_jsx(Image, {
35
+ h: diameter,
35
36
  source: source,
36
- style: {
37
- height: diameter,
38
- width: diameter
39
- }
37
+ w: diameter
40
38
  }) : /*#__PURE__*/_jsx(RnText, {
41
39
  color: "content.secondary",
42
40
  variant: VARIANT[size],
@@ -1 +1 @@
1
- {"version":3,"names":["spacing","Box","Image","RnText","jsx","_jsx","DIAMETER","lg","s64","md","s40","sm","s24","VARIANT","Avatar","initials","size","source","testID","diameter","align","bg","borderRadius","h","justify","overflow","w","children","style","height","width","color","variant"],"sourceRoot":"../../../../src","sources":["atoms/avatar/avatar.tsx"],"mappings":";;AAAA,SAAQA,OAAO,QAAO,mBAAmB;AAEzC,SAAQC,GAAG,QAAO,iBAAQ;AAC1B,SAAQC,KAAK,QAAO,mBAAU;AAC9B,SAAQC,MAAM,QAAO,qBAAY;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGjC,MAAMC,QAAQ,GAAG;EACfC,EAAE,EAAEP,OAAO,CAACQ,GAAG;EACfC,EAAE,EAAET,OAAO,CAACU,GAAG;EACfC,EAAE,EAAEX,OAAO,CAACY;AACd,CAA+C;AAE/C,MAAMC,OAAO,GAAG;EACdN,EAAE,EAAE,WAAW;EACfE,EAAE,EAAE,aAAa;EACjBE,EAAE,EAAE;AACN,CAAU;AAEV,OAAO,MAAMG,MAAuB,GAAGA,CAAC;EAACC,QAAQ;EAAEC,IAAI,GAAG,IAAI;EAAEC,MAAM;EAAEC;AAAmB,CAAC,KAAK;EAC/F,MAAMC,QAAQ,GAAGb,QAAQ,CAACU,IAAI,CAAC;EAE/B,oBACEX,IAAA,CAACJ,GAAG;IACFmB,KAAK,EAAC,QAAQ;IACdC,EAAE,EAAC,eAAe;IAClBC,YAAY,EAAC,MAAM;IACnBC,CAAC,EAAEJ,QAAS;IACZK,OAAO,EAAC,QAAQ;IAChBC,QAAQ,EAAC,QAAQ;IACjBP,MAAM,EAAEA,MAAO;IACfQ,CAAC,EAAEP,QAAS;IAAAQ,QAAA,EAEXV,MAAM,gBACLZ,IAAA,CAACH,KAAK;MAACe,MAAM,EAAEA,MAAO;MAACW,KAAK,EAAE;QAACC,MAAM,EAAEV,QAAQ;QAAEW,KAAK,EAAEX;MAAQ;IAAE,CAAE,CAAC,gBAErEd,IAAA,CAACF,MAAM;MAAC4B,KAAK,EAAC,mBAAmB;MAACC,OAAO,EAAEnB,OAAO,CAACG,IAAI,CAAE;MAAAW,QAAA,EACtDZ,QAAQ,IAAI;IAAE,CACT;EACT,CACE,CAAC;AAEV,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["spacing","Box","Image","RnText","jsx","_jsx","DIAMETER","lg","s64","md","s40","sm","s24","VARIANT","Avatar","initials","size","source","testID","diameter","align","bg","borderRadius","h","justify","overflow","w","children","color","variant"],"sourceRoot":"../../../../src","sources":["atoms/avatar/avatar.tsx"],"mappings":";;AAAA,SAAQA,OAAO,QAAO,mBAAmB;AAEzC,SAAQC,GAAG,QAAO,iBAAQ;AAC1B,SAAQC,KAAK,QAAO,mBAAU;AAC9B,SAAQC,MAAM,QAAO,qBAAY;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGjC,MAAMC,QAAQ,GAAG;EACfC,EAAE,EAAEP,OAAO,CAACQ,GAAG;EACfC,EAAE,EAAET,OAAO,CAACU,GAAG;EACfC,EAAE,EAAEX,OAAO,CAACY;AACd,CAA+C;AAE/C,MAAMC,OAAO,GAAG;EACdN,EAAE,EAAE,WAAW;EACfE,EAAE,EAAE,aAAa;EACjBE,EAAE,EAAE;AACN,CAAU;AAEV,OAAO,MAAMG,MAAuB,GAAGA,CAAC;EAACC,QAAQ;EAAEC,IAAI,GAAG,IAAI;EAAEC,MAAM;EAAEC;AAAmB,CAAC,KAAK;EAC/F,MAAMC,QAAQ,GAAGb,QAAQ,CAACU,IAAI,CAAC;EAE/B,oBACEX,IAAA,CAACJ,GAAG;IACFmB,KAAK,EAAC,QAAQ;IACdC,EAAE,EAAC,eAAe;IAClBC,YAAY,EAAC,MAAM;IACnBC,CAAC,EAAEJ,QAAS;IACZK,OAAO,EAAC,QAAQ;IAChBC,QAAQ,EAAC,QAAQ;IACjBP,MAAM,EAAEA,MAAO;IACfQ,CAAC,EAAEP,QAAS;IAAAQ,QAAA,EAEXV,MAAM,gBACLZ,IAAA,CAACH,KAAK;MAACqB,CAAC,EAAEJ,QAAS;MAACF,MAAM,EAAEA,MAAO;MAACS,CAAC,EAAEP;IAAS,CAAE,CAAC,gBAEnDd,IAAA,CAACF,MAAM;MAACyB,KAAK,EAAC,mBAAmB;MAACC,OAAO,EAAEhB,OAAO,CAACG,IAAI,CAAE;MAAAW,QAAA,EACtDZ,QAAQ,IAAI;IAAE,CACT;EACT,CACE,CAAC;AAEV,CAAC","ignoreList":[]}
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+
3
+ import { BackdropBlurView } from '@hzblj/kara-native/jetpack-compose';
4
+ import { useSx } from '@hzblj/kara-sx';
5
+ import { useAppTheme, withOpacity } from '@hzblj/kara-theme';
6
+ import { useMemo } from 'react';
7
+ import { StyleSheet } from 'react-native';
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ const MATERIALS = {
10
+ regular: {
11
+ blur: 28,
12
+ fill: 'surface.secondary',
13
+ opacity: {
14
+ dark: 'o75',
15
+ light: 'o60'
16
+ },
17
+ saturation: 1.6
18
+ },
19
+ thick: {
20
+ blur: 30,
21
+ fill: 'surface.secondary',
22
+ opacity: {
23
+ dark: 'o85',
24
+ light: 'o80'
25
+ },
26
+ saturation: 1.4
27
+ },
28
+ thin: {
29
+ blur: 24,
30
+ fill: 'surface.primary',
31
+ opacity: {
32
+ dark: 'o60',
33
+ light: 'o40'
34
+ },
35
+ saturation: 1.7
36
+ },
37
+ ultraThick: {
38
+ blur: 32,
39
+ fill: 'fill.quaternary',
40
+ opacity: {
41
+ dark: 'o90',
42
+ light: 'o90'
43
+ },
44
+ saturation: 1.2
45
+ },
46
+ ultraThin: {
47
+ blur: 20,
48
+ fill: 'surface.base',
49
+ opacity: {
50
+ dark: 'o50',
51
+ light: 'o25'
52
+ },
53
+ saturation: 1.8
54
+ }
55
+ };
56
+
57
+ /**
58
+ * The materials in Android's terms: kara's `BackdropBlurView` — what lies behind, blurred and saturated — under a
59
+ * Material tonal surface that gets higher and more opaque as the material thickens. Pinned to the appearance the app
60
+ * is not in, the surface is Material's inverse one. `vibrancy` has no Android counterpart and is left out.
61
+ */
62
+ export const BlurView = ({
63
+ appearance,
64
+ children,
65
+ material = 'regular',
66
+ testID,
67
+ vibrancy: _vibrancy,
68
+ ...sx
69
+ }) => {
70
+ const theme = useAppTheme();
71
+ const resolved = useSx(sx);
72
+ const spec = MATERIALS[material];
73
+ const inverted = appearance !== undefined && appearance === 'dark' !== theme.dark;
74
+ const dark = appearance ? appearance === 'dark' : theme.dark;
75
+ const base = String(theme.color(inverted ? 'surface.high.contrast' : spec.fill));
76
+ const {
77
+ cornerRadius,
78
+ style
79
+ } = useMemo(() => {
80
+ const {
81
+ borderRadius,
82
+ ...rest
83
+ } = StyleSheet.flatten(resolved) ?? {};
84
+ return {
85
+ cornerRadius: typeof borderRadius === 'number' ? borderRadius : 0,
86
+ style: rest
87
+ };
88
+ }, [resolved]);
89
+ return /*#__PURE__*/_jsx(BackdropBlurView, {
90
+ blurRadius: spec.blur,
91
+ cornerRadius: cornerRadius,
92
+ fallbackTint: withOpacity(base, 'o95'),
93
+ glassTint: withOpacity(base, spec.opacity[dark ? 'dark' : 'light']),
94
+ saturation: spec.saturation,
95
+ style: style,
96
+ testID: testID,
97
+ children: children
98
+ });
99
+ };
100
+ //# sourceMappingURL=blur-view.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BackdropBlurView","useSx","useAppTheme","withOpacity","useMemo","StyleSheet","jsx","_jsx","MATERIALS","regular","blur","fill","opacity","dark","light","saturation","thick","thin","ultraThick","ultraThin","BlurView","appearance","children","material","testID","vibrancy","_vibrancy","sx","theme","resolved","spec","inverted","undefined","base","String","color","cornerRadius","style","borderRadius","rest","flatten","blurRadius","fallbackTint","glassTint"],"sourceRoot":"../../../../src","sources":["atoms/blur-view/blur-view.android.tsx"],"mappings":";;AAAA,SAAQA,gBAAgB,QAAO,oCAAoC;AACnE,SAAQC,KAAK,QAAO,gBAAgB;AACpC,SAA2CC,WAAW,EAAEC,WAAW,QAAO,mBAAmB;AAC7F,SAAQC,OAAO,QAAO,OAAO;AAC7B,SAAQC,UAAU,QAAO,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAkBvC,MAAMC,SAA6C,GAAG;EACpDC,OAAO,EAAE;IAACC,IAAI,EAAE,EAAE;IAAEC,IAAI,EAAE,mBAAmB;IAAEC,OAAO,EAAE;MAACC,IAAI,EAAE,KAAK;MAAEC,KAAK,EAAE;IAAK,CAAC;IAAEC,UAAU,EAAE;EAAG,CAAC;EACrGC,KAAK,EAAE;IAACN,IAAI,EAAE,EAAE;IAAEC,IAAI,EAAE,mBAAmB;IAAEC,OAAO,EAAE;MAACC,IAAI,EAAE,KAAK;MAAEC,KAAK,EAAE;IAAK,CAAC;IAAEC,UAAU,EAAE;EAAG,CAAC;EACnGE,IAAI,EAAE;IAACP,IAAI,EAAE,EAAE;IAAEC,IAAI,EAAE,iBAAiB;IAAEC,OAAO,EAAE;MAACC,IAAI,EAAE,KAAK;MAAEC,KAAK,EAAE;IAA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CAAC;IAClE,OAAO;MAACO,YAAY,EAAE,OAAOE,YAAY,KAAK,QAAQ,GAAGA,YAAY,GAAG,CAAC;MAAED,KAAK,EAAEE;IAAI,CAAC;EACzF,CAAC,EAAE,CAACV,QAAQ,CAAC,CAAC;EAEd,oBACEtB,IAAA,CAACP,gBAAgB;IACfyC,UAAU,EAAEX,IAAI,CAACpB,IAAK;IACtB0B,YAAY,EAAEA,YAAa;IAC3BM,YAAY,EAAEvC,WAAW,CAAC8B,IAAI,EAAE,KAAK,CAAE;IACvCU,SAAS,EAAExC,WAAW,CAAC8B,IAAI,EAAEH,IAAI,CAAClB,OAAO,CAACC,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,CAAE;IACpEE,UAAU,EAAEe,IAAI,CAACf,UAAW;IAC5BsB,KAAK,EAAEA,KAAM;IACbb,MAAM,EAAEA,MAAO;IAAAF,QAAA,EAEdA;EAAQ,CACO,CAAC;AAEvB,CAAC","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ import { BlurView as NativeBlurView } from '@hzblj/kara-native/swift-ui';
4
+ import { useSx } from '@hzblj/kara-sx';
5
+ import { useAppTheme } from '@hzblj/kara-theme';
6
+ import { useMemo } from 'react';
7
+ import { StyleSheet } from 'react-native';
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ /** `borderRadius` is the material's shape, so it goes to the effect view — the one that clips — not the layout box. */
10
+ export const BlurView = ({
11
+ appearance,
12
+ children,
13
+ material = 'regular',
14
+ testID,
15
+ vibrancy,
16
+ ...sx
17
+ }) => {
18
+ const theme = useAppTheme();
19
+ const resolved = useSx(sx);
20
+ const {
21
+ cornerRadius,
22
+ style
23
+ } = useMemo(() => {
24
+ const {
25
+ borderRadius,
26
+ ...rest
27
+ } = StyleSheet.flatten(resolved) ?? {};
28
+ return {
29
+ cornerRadius: typeof borderRadius === 'number' ? borderRadius : 0,
30
+ style: rest
31
+ };
32
+ }, [resolved]);
33
+ return /*#__PURE__*/_jsx(NativeBlurView, {
34
+ colorScheme: appearance ?? (theme.dark ? 'dark' : 'light'),
35
+ cornerRadius: cornerRadius,
36
+ material: material,
37
+ style: style,
38
+ testID: testID,
39
+ vibrancy: vibrancy,
40
+ children: children
41
+ });
42
+ };
43
+ //# sourceMappingURL=blur-view.ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BlurView","NativeBlurView","useSx","useAppTheme","useMemo","StyleSheet","jsx","_jsx","appearance","children","material","testID","vibrancy","sx","theme","resolved","cornerRadius","style","borderRadius","rest","flatten","colorScheme","dark"],"sourceRoot":"../../../../src","sources":["atoms/blur-view/blur-view.ios.tsx"],"mappings":";;AAAA,SAAQA,QAAQ,IAAIC,cAAc,QAAO,6BAA6B;AACtE,SAAQC,KAAK,QAAO,gBAAgB;AACpC,SAAQC,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,OAAO,QAAO,OAAO;AAC7B,SAAQC,UAAU,QAAO,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAIvC;AACA,OAAO,MAAMP,QAA2B,GAAGA,CAAC;EAC1CQ,UAAU;EACVC,QAAQ;EACRC,QAAQ,GAAG,SAAS;EACpBC,MAAM;EACNC,QAAQ;EACR,GAAGC;AACU,CAAC,KAAK;EACnB,MAAMC,KAAK,GAAGX,WAAW,CAAC,CAAC;EAC3B,MAAMY,QAAQ,GAAGb,KAAK,CAACW,EAAE,CAAC;EAC1B,MAAM;IAACG,YAAY;IAAEC;EAAK,CAAC,GAAGb,OAAO,CAAC,MAAM;IAC1C,MAAM;MAACc,YAAY;MAAE,GAAGC;IAAI,CAAC,GAAGd,UAAU,CAACe,OAAO,CAACL,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClE,OAAO;MAACC,YAAY,EAAE,OAAOE,YAAY,KAAK,QAAQ,GAAGA,YAAY,GAAG,CAAC;MAAED,KAAK,EAAEE;IAAI,CAAC;EACzF,CAAC,EAAE,CAACJ,QAAQ,CAAC,CAAC;EAEd,oBACER,IAAA,CAACN,cAAc;IACboB,WAAW,EAAEb,UAAU,KAAKM,KAAK,CAACQ,IAAI,GAAG,MAAM,GAAG,OAAO,CAAE;IAC3DN,YAAY,EAAEA,YAAa;IAC3BN,QAAQ,EAAEA,QAAS;IACnBO,KAAK,EAAEA,KAAM;IACbN,MAAM,EAAEA,MAAO;IACfC,QAAQ,EAAEA,QAAS;IAAAH,QAAA,EAElBA;EAAQ,CACK,CAAC;AAErB,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=blur-view.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["atoms/blur-view/blur-view.types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ export * from './blur-view';
4
+ export * from "./blur-view.types.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["atoms/blur-view/index.ts"],"mappings":";;AAAA,cAAc,aAAa;AAC3B,cAAc,sBAAmB","ignoreList":[]}
@@ -1,9 +1,40 @@
1
1
  "use strict";
2
2
 
3
- import { GlassFallback } from "./glass-fallback.js";
3
+ import { BackdropBlurView } from '@hzblj/kara-native/jetpack-compose';
4
+ import { useSx } from '@hzblj/kara-sx';
5
+ import { radii, useAppTheme, withOpacity } from '@hzblj/kara-theme';
4
6
  import { jsx as _jsx } from "react/jsx-runtime";
5
- /** Android has no Liquid Glass, so this is always the fallback capsule. */
6
- export const GlassView = props => /*#__PURE__*/_jsx(GlassFallback, {
7
- ...props
8
- });
7
+ /** dp. Strong enough that a photo behind reads as colour and light, not as detail. */
8
+ const BLUR_RADIUS = 16;
9
+
10
+ /**
11
+ * Frosted glass, Android's way: what lies behind the capsule, blurred (Android 12+), under a tonal Material surface
12
+ * and a light hairline — the blurred surfaces Android 16 gives its own system UI, not a copy of iOS's lens. Without a
13
+ * tint it is the surface colour, translucent, so the content keeps its usual colours on it; a tint fills it with that
14
+ * colour instead. Below Android 12, with nothing to blur, the same colours are drawn near-opaque. Android has no swell,
15
+ * so `interactive` changes nothing here — the `Pressable` around it gives the press its feedback.
16
+ */
17
+ export const GlassView = ({
18
+ children,
19
+ interactive: _interactive,
20
+ testID,
21
+ tint,
22
+ ...sx
23
+ }) => {
24
+ const theme = useAppTheme();
25
+ const style = useSx(sx);
26
+ const base = String(theme.color(tint ?? 'surface.primary'));
27
+ return /*#__PURE__*/_jsx(BackdropBlurView, {
28
+ blurRadius: BLUR_RADIUS,
29
+ cornerRadius: radii.full,
30
+ fallbackTint: withOpacity(base, 'o95'),
31
+ glassTint: withOpacity(base, tint ? 'o85' : 'o50'),
32
+ hairlineColor: withOpacity(String(theme.color('content.on.bg')), theme.dark ? 'o20' : 'o60'),
33
+ hairlineWidth: 1,
34
+ saturation: 1.6,
35
+ style: style,
36
+ testID: testID,
37
+ children: children
38
+ });
39
+ };
9
40
  //# sourceMappingURL=glass-view.android.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["GlassFallback","jsx","_jsx","GlassView","props"],"sourceRoot":"../../../../src","sources":["atoms/glass-view/glass-view.android.tsx"],"mappings":";;AAAA,SAAQA,aAAa,QAAO,qBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAG9C;AACA,OAAO,MAAMC,SAA6B,GAAIC,KAAqB,iBAAKF,IAAA,CAACF,aAAa;EAAA,GAAKI;AAAK,CAAG,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BackdropBlurView","useSx","radii","useAppTheme","withOpacity","jsx","_jsx","BLUR_RADIUS","GlassView","children","interactive","_interactive","testID","tint","sx","theme","style","base","String","color","blurRadius","cornerRadius","full","fallbackTint","glassTint","hairlineColor","dark","hairlineWidth","saturation"],"sourceRoot":"../../../../src","sources":["atoms/glass-view/glass-view.android.tsx"],"mappings":";;AAAA,SAAQA,gBAAgB,QAAO,oCAAoC;AACnE,SAAQC,KAAK,QAAO,gBAAgB;AACpC,SAAQC,KAAK,EAAEC,WAAW,EAAEC,WAAW,QAAO,mBAAmB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAIjE;AACA,MAAMC,WAAW,GAAG,EAAE;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,SAA6B,GAAGA,CAAC;EAC5CC,QAAQ;EACRC,WAAW,EAAEC,YAAY;EACzBC,MAAM;EACNC,IAAI;EACJ,GAAGC;AACW,CAAC,KAAK;EACpB,MAAMC,KAAK,GAAGZ,WAAW,CAAC,CAAC;EAC3B,MAAMa,KAAK,GAAGf,KAAK,CAACa,EAAE,CAAC;EACvB,MAAMG,IAAI,GAAGC,MAAM,CAACH,KAAK,CAACI,KAAK,CAACN,IAAI,IAAI,iBAAiB,CAAC,CAAC;EAE3D,oBACEP,IAAA,CAACN,gBAAgB;IACfoB,UAAU,EAAEb,WAAY;IACxBc,YAAY,EAAEnB,KAAK,CAACoB,IAAK;IACzBC,YAAY,EAAEnB,WAAW,CAACa,IAAI,EAAE,KAAK,CAAE;IACvCO,SAAS,EAAEpB,WAAW,CAACa,IAAI,EAAEJ,IAAI,GAAG,KAAK,GAAG,KAAK,CAAE;IACnDY,aAAa,EAAErB,WAAW,CAACc,MAAM,CAACH,KAAK,CAACI,KAAK,CAAC,eAAe,CAAC,CAAC,EAAEJ,KAAK,CAACW,IAAI,GAAG,KAAK,GAAG,KAAK,CAAE;IAC7FC,aAAa,EAAE,CAAE;IACjBC,UAAU,EAAE,GAAI;IAChBZ,KAAK,EAAEA,KAAM;IACbJ,MAAM,EAAEA,MAAO;IAAAH,QAAA,EAEdA;EAAQ,CACO,CAAC;AAEvB,CAAC","ignoreList":[]}
@@ -1,14 +1,21 @@
1
1
  "use strict";
2
2
 
3
+ import { sx } from '@hzblj/kara-sx';
3
4
  import { duration } from '@hzblj/kara-theme';
4
5
  import { Image as ExpoImage } from 'expo-image';
5
6
  import { jsx as _jsx } from "react/jsx-runtime";
6
- const Image = props => /*#__PURE__*/_jsx(ExpoImage, {
7
- transition: {
8
- duration: duration.d100,
9
- timing: 'linear'
10
- },
7
+ const FADE = {
8
+ duration: duration.d100,
9
+ timing: 'linear'
10
+ };
11
+ const FadingImage = props => /*#__PURE__*/_jsx(ExpoImage, {
12
+ transition: FADE,
11
13
  ...props
12
14
  });
13
- export { Image };
15
+
16
+ /**
17
+ * `expo-image` with the `sx` props, the way `Box` is a `View` with them, and the design system's 100 ms linear fade
18
+ * already applied, so a loaded image never pops in. An explicit `transition` wins, and so does an explicit `style`.
19
+ */
20
+ export const Image = sx(FadingImage);
14
21
  //# sourceMappingURL=image.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["duration","Image","ExpoImage","jsx","_jsx","props","transition","d100","timing"],"sourceRoot":"../../../../src","sources":["atoms/image/image.tsx"],"mappings":";;AAAA,SAAQA,QAAQ,QAAO,mBAAmB;AAC1C,SAAQC,KAAK,IAAIC,SAAS,QAAmB,YAAY;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGzD,MAAMH,KAAqB,GAAGI,KAAK,iBACjCD,IAAA,CAACF,SAAS;EACRI,UAAU,EAAE;IACVN,QAAQ,EAAEA,QAAQ,CAACO,IAAI;IACvBC,MAAM,EAAE;EACV,CAAE;EAAA,GACEH;AAAK,CACV,CACF;AAED,SAAQJ,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["sx","duration","Image","ExpoImage","jsx","_jsx","FADE","d100","timing","FadingImage","props","transition"],"sourceRoot":"../../../../src","sources":["atoms/image/image.tsx"],"mappings":";;AAAA,SAAQA,EAAE,QAAO,gBAAgB;AACjC,SAAQC,QAAQ,QAAO,mBAAmB;AAC1C,SAAQC,KAAK,IAAIC,SAAS,QAA0C,YAAY;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGhF,MAAMC,IAAI,GAAG;EAACL,QAAQ,EAAEA,QAAQ,CAACM,IAAI;EAAEC,MAAM,EAAE;AAAQ,CAAU;AAEjE,MAAMC,WAAW,GAAIC,KAA8C,iBAAKL,IAAA,CAACF,SAAS;EAACQ,UAAU,EAAEL,IAAK;EAAA,GAAKI;AAAK,CAAG,CAAC;;AAElH;AACA;AACA;AACA;AACA,OAAO,MAAMR,KAAK,GAAGF,EAAE,CAACS,WAAW,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=image.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["atoms/image/image.types.ts"],"mappings":"","ignoreList":[]}
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  export * from "./image.js";
4
+ export * from "./image.types.js";
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["atoms/image/index.ts"],"mappings":";;AAAA,cAAc,YAAS","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["atoms/image/index.ts"],"mappings":";;AAAA,cAAc,YAAS;AACvB,cAAc,kBAAe","ignoreList":[]}
@@ -3,6 +3,7 @@
3
3
  export * from "./activity-indicator/index.js";
4
4
  export * from "./avatar/index.js";
5
5
  export * from "./badge/index.js";
6
+ export * from "./blur-view/index.js";
6
7
  export * from "./box/index.js";
7
8
  export * from "./button/index.js";
8
9
  export * from "./card/index.js";
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["atoms/index.ts"],"mappings":";;AAAA,cAAc,+BAAsB;AACpC,cAAc,mBAAU;AACxB,cAAc,kBAAS;AACvB,cAAc,gBAAO;AACrB,cAAc,mBAAU;AACxB,cAAc,iBAAQ;AACtB,cAAc,qBAAY;AAC1B,cAAc,iBAAQ;AACtB,cAAc,yBAAgB;AAC9B,cAAc,wBAAe;AAC7B,cAAc,oBAAW;AACzB,cAAc,gBAAO;AACrB,cAAc,uBAAc;AAC5B,cAAc,oBAAW;AACzB,cAAc,iBAAQ;AACtB,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Ac,oBAAW;AACzB,cAAc,mBAAU;AACxB,cAAc,iBAAQ;AACtB,cAAc,uBAAc;AAC5B,cAAc,oBAAW;AACzB,cAAc,oBAAW","ignoreList":[]}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  import { Host } from '@expo/ui/jetpack-compose';
4
+ import { useSx } from '@hzblj/kara-sx';
4
5
  import { useAppTheme } from '@hzblj/kara-theme';
5
6
  import { HostBoundary } from "../../host-context.js";
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -15,14 +16,17 @@ const MATCH_NEITHER = {
15
16
  export const Island = ({
16
17
  children,
17
18
  matchContents = true,
18
- style
19
+ style,
20
+ testID: _testID,
21
+ ...sx
19
22
  }) => {
20
23
  const theme = useAppTheme();
24
+ const resolved = useSx(sx);
21
25
  return /*#__PURE__*/_jsx(Host, {
22
26
  colorScheme: theme.dark ? 'dark' : 'light',
23
27
  matchContents: matchContents ? MATCH_HEIGHT_ONLY : MATCH_NEITHER,
24
28
  seedColor: theme.materialSeed,
25
- style: style,
29
+ style: style ? [resolved, style] : resolved,
26
30
  children: /*#__PURE__*/_jsx(HostBoundary, {
27
31
  children: children
28
32
  })
@@ -1 +1 @@
1
- {"version":3,"names":["Host","useAppTheme","HostBoundary","jsx","_jsx","MATCH_HEIGHT_ONLY","horizontal","vertical","MATCH_NEITHER","Island","children","matchContents","style","theme","colorScheme","dark","seedColor","materialSeed"],"sourceRoot":"../../../../src","sources":["atoms/island/island.android.tsx"],"mappings":";;AAAA,SAAQA,IAAI,QAAO,0BAA0B;AAC7C,SAAQC,WAAW,QAAO,mBAAmB;AAE7C,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAG/C,MAAMC,iBAAiB,GAAG;EAACC,UAAU,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAI,CAAC;AAE7D,MAAMC,aAAa,GAAG;EAACF,UAAU,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAK,CAAC;AAE1D,OAAO,MAAME,MAAuB,GAAGA,CAAC;EAACC,QAAQ;EAAEC,aAAa,GAAG,IAAI;EAAEC;AAAkB,CAAC,KAAK;EAC/F,MAAMC,KAAK,GAAGZ,WAAW,CAAC,CAAC;EAE3B,oBACEG,IAAA,CAACJ,IAAI;IACHc,WAAW,EAAED,KAAK,CAACE,IAAI,GAAG,MAAM,GAAG,OAAQ;IAC3CJ,aAAa,EAAEA,aAAa,GAAGN,iBAAiB,GAAGG,aAAc;IACjEQ,SAAS,EAAEH,KAAK,CAACI,YAAa;IAC9BL,KAAK,EAAEA,KAAM;IAAAF,QAAA,eAEbN,IAAA,CAACF,YAAY;MAAAQ,QAAA,EAAEA;IAAQ,CAAe;EAAC,CACnC,CAAC;AAEX,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Host","useSx","useAppTheme","HostBoundary","jsx","_jsx","MATCH_HEIGHT_ONLY","horizontal","vertical","MATCH_NEITHER","Island","children","matchContents","style","testID","_testID","sx","theme","resolved","colorScheme","dark","seedColor","materialSeed"],"sourceRoot":"../../../../src","sources":["atoms/island/island.android.tsx"],"mappings":";;AAAA,SAAQA,IAAI,QAAO,0BAA0B;AAC7C,SAAQC,KAAK,QAAO,gBAAgB;AACpC,SAAQC,WAAW,QAAO,mBAAmB;AAE7C,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAG/C,MAAMC,iBAAiB,GAAG;EAACC,UAAU,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAI,CAAC;AAE7D,MAAMC,aAAa,GAAG;EAACF,UAAU,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAK,CAAC;AAE1D,OAAO,MAAME,MAAuB,GAAGA,CAAC;EACtCC,QAAQ;EACRC,aAAa,GAAG,IAAI;EACpBC,KAAK;EACLC,MAAM,EAAEC,OAAO;EACf,GAAGC;AACQ,CAAC,KAAK;EACjB,MAAMC,KAAK,GAAGf,WAAW,CAAC,CAAC;EAC3B,MAAMgB,QAAQ,GAAGjB,KAAK,CAACe,EAAE,CAAC;EAE1B,oBACEX,IAAA,CAACL,IAAI;IACHmB,WAAW,EAAEF,KAAK,CAACG,IAAI,GAAG,MAAM,GAAG,OAAQ;IAC3CR,aAAa,EAAEA,aAAa,GAAGN,iBAAiB,GAAGG,aAAc;IACjEY,SAAS,EAAEJ,KAAK,CAACK,YAAa;IAC9BT,KAAK,EAAEA,KAAK,GAAG,CAACK,QAAQ,EAAEL,KAAK,CAAC,GAAGK,QAAS;IAAAP,QAAA,eAE5CN,IAAA,CAACF,YAAY;MAAAQ,QAAA,EAAEA;IAAQ,CAAe;EAAC,CACnC,CAAC;AAEX,CAAC","ignoreList":[]}
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { Host } from '@expo/ui/swift-ui';
4
4
  import { dynamicTypeSize } from '@expo/ui/swift-ui/modifiers';
5
+ import { useSx } from '@hzblj/kara-sx';
5
6
  import { MAX_DYNAMIC_TYPE_SIZE, useAppTheme } from '@hzblj/kara-theme';
6
7
  import { HostBoundary } from "../../host-context.js";
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -20,15 +21,17 @@ export const Island = ({
20
21
  children,
21
22
  matchContents = true,
22
23
  style,
23
- testID
24
+ testID,
25
+ ...sx
24
26
  }) => {
25
27
  const theme = useAppTheme();
28
+ const resolved = useSx(sx);
26
29
  return /*#__PURE__*/_jsx(Host, {
27
30
  colorScheme: theme.dark ? 'dark' : 'light',
28
31
  matchContents: matchContents ? MATCH_HEIGHT_ONLY : MATCH_NEITHER,
29
32
  modifiers: DYNAMIC_TYPE_CAP,
30
33
  seedColor: theme.materialSeed,
31
- style: style,
34
+ style: style ? [resolved, style] : resolved,
32
35
  testID: testID,
33
36
  children: /*#__PURE__*/_jsx(HostBoundary, {
34
37
  children: children
@@ -1 +1 @@
1
- {"version":3,"names":["Host","dynamicTypeSize","MAX_DYNAMIC_TYPE_SIZE","useAppTheme","HostBoundary","jsx","_jsx","DYNAMIC_TYPE_CAP","max","MATCH_HEIGHT_ONLY","horizontal","vertical","MATCH_NEITHER","Island","children","matchContents","style","testID","theme","colorScheme","dark","modifiers","seedColor","materialSeed"],"sourceRoot":"../../../../src","sources":["atoms/island/island.ios.tsx"],"mappings":";;AAAA,SAAQA,IAAI,QAAO,mBAAmB;AACtC,SAAQC,eAAe,QAAO,6BAA6B;AAC3D,SAAQC,qBAAqB,EAAEC,WAAW,QAAO,mBAAmB;AAEpE,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAG/C,MAAMC,gBAAgB,GAAG,CAACN,eAAe,CAAC;EAACO,GAAG,EAAEN;AAAqB,CAAC,CAAC,CAAC;AAExE,MAAMO,iBAAiB,GAAG;EAACC,UAAU,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAI,CAAC;AAE7D,MAAMC,aAAa,GAAG;EAACF,UAAU,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAK,CAAC;AAE1D,OAAO,MAAME,MAAuB,GAAGA,CAAC;EAACC,QAAQ;EAAEC,aAAa,GAAG,IAAI;EAAEC,KAAK;EAAEC;AAAmB,CAAC,KAAK;EACvG,MAAMC,KAAK,GAAGf,WAAW,CAAC,CAAC;EAE3B,oBACEG,IAAA,CAACN,IAAI;IACHmB,WAAW,EAAED,KAAK,CAACE,IAAI,GAAG,MAAM,GAAG,OAAQ;IAC3CL,aAAa,EAAEA,aAAa,GAAGN,iBAAiB,GAAGG,aAAc;IACjES,SAAS,EAAEd,gBAAiB;IAC5Be,SAAS,EAAEJ,KAAK,CAACK,YAAa;IAC9BP,KAAK,EAAEA,KAAM;IACbC,MAAM,EAAEA,MAAO;IAAAH,QAAA,eAEfR,IAAA,CAACF,YAAY;MAAAU,QAAA,EAAEA;IAAQ,CAAe;EAAC,CACnC,CAAC;AAEX,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Host","dynamicTypeSize","useSx","MAX_DYNAMIC_TYPE_SIZE","useAppTheme","HostBoundary","jsx","_jsx","DYNAMIC_TYPE_CAP","max","MATCH_HEIGHT_ONLY","horizontal","vertical","MATCH_NEITHER","Island","children","matchContents","style","testID","sx","theme","resolved","colorScheme","dark","modifiers","seedColor","materialSeed"],"sourceRoot":"../../../../src","sources":["atoms/island/island.ios.tsx"],"mappings":";;AAAA,SAAQA,IAAI,QAAO,mBAAmB;AACtC,SAAQC,eAAe,QAAO,6BAA6B;AAC3D,SAAQC,KAAK,QAAO,gBAAgB;AACpC,SAAQC,qBAAqB,EAAEC,WAAW,QAAO,mBAAmB;AAEpE,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAG/C,MAAMC,gBAAgB,GAAG,CAACP,eAAe,CAAC;EAACQ,GAAG,EAAEN;AAAqB,CAAC,CAAC,CAAC;AAExE,MAAMO,iBAAiB,GAAG;EAACC,UAAU,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAI,CAAC;AAE7D,MAAMC,aAAa,GAAG;EAACF,UAAU,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAK,CAAC;AAE1D,OAAO,MAAME,MAAuB,GAAGA,CAAC;EAACC,QAAQ;EAAEC,aAAa,GAAG,IAAI;EAAEC,KAAK;EAAEC,MAAM;EAAE,GAAGC;AAAe,CAAC,KAAK;EAC9G,MAAMC,KAAK,GAAGhB,WAAW,CAAC,CAAC;EAC3B,MAAMiB,QAAQ,GAAGnB,KAAK,CAACiB,EAAE,CAAC;EAE1B,oBACEZ,IAAA,CAACP,IAAI;IACHsB,WAAW,EAAEF,KAAK,CAACG,IAAI,GAAG,MAAM,GAAG,OAAQ;IAC3CP,aAAa,EAAEA,aAAa,GAAGN,iBAAiB,GAAGG,aAAc;IACjEW,SAAS,EAAEhB,gBAAiB;IAC5BiB,SAAS,EAAEL,KAAK,CAACM,YAAa;IAC9BT,KAAK,EAAEA,KAAK,GAAG,CAACI,QAAQ,EAAEJ,KAAK,CAAC,GAAGI,QAAS;IAC5CH,MAAM,EAA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