@xaui/native 0.9.1-alpha.91 → 0.9.1-alpha.92

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 (86) hide show
  1. package/dist/chunk-3A5RK2R7.js +40 -0
  2. package/dist/chunk-6JAGPPZU.cjs +788 -0
  3. package/dist/chunk-7NQL5DXY.js +302 -0
  4. package/dist/chunk-FTPPUTWL.cjs +40 -0
  5. package/dist/chunk-GGP2ERSV.js +487 -0
  6. package/dist/chunk-KPKEZWZM.js +517 -0
  7. package/dist/chunk-LKRQUQZQ.cjs +487 -0
  8. package/dist/{chunk-LIEXFWTN.js → chunk-P5M5URAB.js} +29 -126
  9. package/dist/chunk-UR37LVPU.cjs +382 -0
  10. package/dist/chunk-XWIPLZTD.cjs +302 -0
  11. package/dist/components/carousel/index.cjs +3 -2
  12. package/dist/components/carousel/index.js +2 -1
  13. package/dist/components/index.d.cts +3 -0
  14. package/dist/components/index.d.ts +3 -0
  15. package/dist/components/number-pad/index.cjs +40 -0
  16. package/dist/components/number-pad/index.d.cts +60 -0
  17. package/dist/components/number-pad/index.d.ts +60 -0
  18. package/dist/components/number-pad/index.js +40 -0
  19. package/dist/components/number-pad/number-pad-action.d.cts +24 -0
  20. package/dist/components/number-pad/number-pad-action.d.ts +24 -0
  21. package/dist/components/number-pad/number-pad-backspace.d.cts +18 -0
  22. package/dist/components/number-pad/number-pad-backspace.d.ts +18 -0
  23. package/dist/components/number-pad/number-pad-cell.d.cts +7 -0
  24. package/dist/components/number-pad/number-pad-cell.d.ts +7 -0
  25. package/dist/components/number-pad/number-pad-icon.d.cts +13 -0
  26. package/dist/components/number-pad/number-pad-icon.d.ts +13 -0
  27. package/dist/components/number-pad/number-pad-key.d.cts +24 -0
  28. package/dist/components/number-pad/number-pad-key.d.ts +24 -0
  29. package/dist/components/number-pad/number-pad-label.d.cts +14 -0
  30. package/dist/components/number-pad/number-pad-label.d.ts +14 -0
  31. package/dist/components/number-pad/number-pad.context.d.cts +18 -0
  32. package/dist/components/number-pad/number-pad.context.d.ts +18 -0
  33. package/dist/components/number-pad/number-pad.d.cts +57 -0
  34. package/dist/components/number-pad/number-pad.d.ts +57 -0
  35. package/dist/components/number-pad/number-pad.recipe.d.cts +11 -0
  36. package/dist/components/number-pad/number-pad.recipe.d.ts +11 -0
  37. package/dist/components/number-pad/number-pad.style.d.cts +13 -0
  38. package/dist/components/number-pad/number-pad.style.d.ts +13 -0
  39. package/dist/components/number-pad/number-pad.type.d.cts +135 -0
  40. package/dist/components/number-pad/number-pad.type.d.ts +135 -0
  41. package/dist/components/number-pad/number-pad.utils.d.cts +34 -0
  42. package/dist/components/number-pad/number-pad.utils.d.ts +34 -0
  43. package/dist/components/pager/index.cjs +31 -0
  44. package/dist/components/pager/index.d.cts +60 -0
  45. package/dist/components/pager/index.d.ts +60 -0
  46. package/dist/components/pager/index.js +31 -0
  47. package/dist/components/pager/pager-content.d.cts +24 -0
  48. package/dist/components/pager/pager-content.d.ts +24 -0
  49. package/dist/components/pager/pager-indicator.d.cts +47 -0
  50. package/dist/components/pager/pager-indicator.d.ts +47 -0
  51. package/dist/components/pager/pager-page.d.cts +16 -0
  52. package/dist/components/pager/pager-page.d.ts +16 -0
  53. package/dist/components/pager/pager.context.d.cts +7 -0
  54. package/dist/components/pager/pager.context.d.ts +7 -0
  55. package/dist/components/pager/pager.d.cts +71 -0
  56. package/dist/components/pager/pager.d.ts +71 -0
  57. package/dist/components/pager/pager.recipe.d.cts +15 -0
  58. package/dist/components/pager/pager.recipe.d.ts +15 -0
  59. package/dist/components/pager/pager.type.d.cts +108 -0
  60. package/dist/components/pager/pager.type.d.ts +108 -0
  61. package/dist/components/rating/index.cjs +30 -0
  62. package/dist/components/rating/index.d.cts +41 -0
  63. package/dist/components/rating/index.d.ts +41 -0
  64. package/dist/components/rating/index.js +30 -0
  65. package/dist/components/rating/rating-icon.d.cts +16 -0
  66. package/dist/components/rating/rating-icon.d.ts +16 -0
  67. package/dist/components/rating/rating-item.d.cts +23 -0
  68. package/dist/components/rating/rating-item.d.ts +23 -0
  69. package/dist/components/rating/rating-star.d.cts +19 -0
  70. package/dist/components/rating/rating-star.d.ts +19 -0
  71. package/dist/components/rating/rating.context.d.cts +16 -0
  72. package/dist/components/rating/rating.context.d.ts +16 -0
  73. package/dist/components/rating/rating.d.cts +59 -0
  74. package/dist/components/rating/rating.d.ts +59 -0
  75. package/dist/components/rating/rating.recipe.d.cts +11 -0
  76. package/dist/components/rating/rating.recipe.d.ts +11 -0
  77. package/dist/components/rating/rating.style.d.cts +24 -0
  78. package/dist/components/rating/rating.style.d.ts +24 -0
  79. package/dist/components/rating/rating.type.d.cts +108 -0
  80. package/dist/components/rating/rating.type.d.ts +108 -0
  81. package/dist/components/rating/rating.utils.d.cts +28 -0
  82. package/dist/components/rating/rating.utils.d.ts +28 -0
  83. package/dist/index.cjs +90 -29
  84. package/dist/index.js +146 -85
  85. package/package.json +31 -1
  86. package/dist/chunk-K5UO3HBW.cjs +0 -1007
@@ -0,0 +1,108 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ScrollViewProps, StyleProp, ViewProps, ViewStyle } from 'react-native';
3
+ import type Animated from 'react-native-reanimated';
4
+ import type { AnimatedRef, SharedValue } from 'react-native-reanimated';
5
+ import type { ViewStyleProps } from '../../system/style-props';
6
+ import type { Size } from '../../theme/theme.type';
7
+ export type PagerSlot = 'root' | 'content' | 'page' | 'indicator' | 'dot' | 'dotActive';
8
+ /**
9
+ * Which way the pages travel. `horizontal` is the onboarding flow and the gallery;
10
+ * `vertical` is the full-screen feed.
11
+ *
12
+ * It is the axis rather than a direction, so it needs no RTL branch: a horizontal pager
13
+ * mirrors with its scroll view, which is React Native's own behaviour.
14
+ */
15
+ export type PagerOrientation = 'horizontal' | 'vertical';
16
+ /**
17
+ * Three, and none of them an intent — a pager reports nothing, it is a way of arranging
18
+ * what does. They name **which colour the current dot takes**, because the dots are the
19
+ * only thing this component paints:
20
+ *
21
+ * - `primary` — the accent. The onboarding flow's answer.
22
+ * - `secondary` — the neutral foreground, for a pager on a plain page.
23
+ * - `tertiary` — the raised surface, which on a light theme is white: the pager over a
24
+ * photograph, where an accent dot disappears into whatever is behind it.
25
+ *
26
+ * `ghost` is absent rather than forgotten. A dot with no fill is not a dot, which is the
27
+ * reason `InputOTP` has no `ghost` either — a box that is not a box is not a box.
28
+ */
29
+ export type PagerVariant = 'primary' | 'secondary' | 'tertiary';
30
+ export type PagerSize = Size;
31
+ type PagerOwnProps = {
32
+ variant?: PagerVariant;
33
+ /** The dots' diameter and the gap between them. Never a page's size. */
34
+ size?: PagerSize;
35
+ /** A raw value (R7) for the current dot. The pages are yours and it never reaches them. */
36
+ color?: string;
37
+ /** @default 'horizontal' */
38
+ orientation?: PagerOrientation;
39
+ /** Which page is shown. Present means controlled. */
40
+ index?: number;
41
+ /** Where it starts when uncontrolled. */
42
+ defaultIndex?: number;
43
+ onIndexChange?: (index: number) => void;
44
+ /** Locks the swipe and the dots. */
45
+ isDisabled?: boolean;
46
+ style?: StyleProp<ViewStyle>;
47
+ children?: ReactNode;
48
+ };
49
+ /** R14 — the pager's own props, `View`'s, and every `ViewStyle` key neither claims. */
50
+ export type PagerProps = PagerOwnProps & Omit<ViewProps, keyof PagerOwnProps | 'style'> & Omit<ViewStyleProps, keyof PagerOwnProps>;
51
+ /** `ScrollView`'s own props win over the `ViewStyle` keys of the same name (R14). */
52
+ export type PagerContentProps = Omit<ScrollViewProps, 'style' | 'children'> & Omit<ViewStyleProps, keyof ScrollViewProps> & {
53
+ style?: StyleProp<ViewStyle>;
54
+ children?: ReactNode;
55
+ };
56
+ /** `View`'s own props win over the `ViewStyle` keys of the same name (R14). */
57
+ export type PagerViewSlotProps = Omit<ViewProps, 'style'> & Omit<ViewStyleProps, keyof ViewProps> & {
58
+ style?: StyleProp<ViewStyle>;
59
+ children?: ReactNode;
60
+ };
61
+ export type PagerDotProps = PagerViewSlotProps & {
62
+ /** Which page this dot stands for. */
63
+ index: number;
64
+ };
65
+ /** The two colours a dot travels between, read as values because a worklet interpolates them. */
66
+ export type PagerDotInk = {
67
+ rest: string;
68
+ active: string;
69
+ };
70
+ /** How big the track measured — a page is exactly this, on both axes. */
71
+ export type PagerTrackSize = {
72
+ width: number;
73
+ height: number;
74
+ };
75
+ /** R5 — resolved styles and measured numbers, never a token for a slot to resolve again. */
76
+ export type PagerContextValue = {
77
+ contentStyle: StyleProp<ViewStyle>;
78
+ pageStyle: StyleProp<ViewStyle>;
79
+ indicatorStyle: StyleProp<ViewStyle>;
80
+ dotStyle: StyleProp<ViewStyle>;
81
+ dotInk: PagerDotInk;
82
+ orientation: PagerOrientation;
83
+ /** The settled page. */
84
+ index: number;
85
+ /** How many pages the track was given, counted by the track itself. */
86
+ count: number;
87
+ setCount: (count: number) => void;
88
+ /**
89
+ * The track's own size, measured — **the track's, not the root's**. The indicator sits in
90
+ * the flow under the pages, so the root is taller than the box a page has to fill, and a
91
+ * page sized to the root would overflow it by exactly the dots.
92
+ *
93
+ * Zero until it has laid out, which is why the track draws nothing before then.
94
+ */
95
+ track: PagerTrackSize;
96
+ setTrack: (size: PagerTrackSize) => void;
97
+ /** How far one page travels — the track's size on the paging axis. */
98
+ step: number;
99
+ /** Where the track is, live, on the UI thread. */
100
+ offset: SharedValue<number>;
101
+ /** Moves the track and lets its own settle report back. */
102
+ goTo: (index: number) => void;
103
+ /** What the track calls when it crosses onto another page. */
104
+ onSettle: (index: number) => void;
105
+ trackRef: AnimatedRef<Animated.ScrollView>;
106
+ isDisabled: boolean;
107
+ };
108
+ export {};
@@ -0,0 +1,108 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ScrollViewProps, StyleProp, ViewProps, ViewStyle } from 'react-native';
3
+ import type Animated from 'react-native-reanimated';
4
+ import type { AnimatedRef, SharedValue } from 'react-native-reanimated';
5
+ import type { ViewStyleProps } from '../../system/style-props';
6
+ import type { Size } from '../../theme/theme.type';
7
+ export type PagerSlot = 'root' | 'content' | 'page' | 'indicator' | 'dot' | 'dotActive';
8
+ /**
9
+ * Which way the pages travel. `horizontal` is the onboarding flow and the gallery;
10
+ * `vertical` is the full-screen feed.
11
+ *
12
+ * It is the axis rather than a direction, so it needs no RTL branch: a horizontal pager
13
+ * mirrors with its scroll view, which is React Native's own behaviour.
14
+ */
15
+ export type PagerOrientation = 'horizontal' | 'vertical';
16
+ /**
17
+ * Three, and none of them an intent — a pager reports nothing, it is a way of arranging
18
+ * what does. They name **which colour the current dot takes**, because the dots are the
19
+ * only thing this component paints:
20
+ *
21
+ * - `primary` — the accent. The onboarding flow's answer.
22
+ * - `secondary` — the neutral foreground, for a pager on a plain page.
23
+ * - `tertiary` — the raised surface, which on a light theme is white: the pager over a
24
+ * photograph, where an accent dot disappears into whatever is behind it.
25
+ *
26
+ * `ghost` is absent rather than forgotten. A dot with no fill is not a dot, which is the
27
+ * reason `InputOTP` has no `ghost` either — a box that is not a box is not a box.
28
+ */
29
+ export type PagerVariant = 'primary' | 'secondary' | 'tertiary';
30
+ export type PagerSize = Size;
31
+ type PagerOwnProps = {
32
+ variant?: PagerVariant;
33
+ /** The dots' diameter and the gap between them. Never a page's size. */
34
+ size?: PagerSize;
35
+ /** A raw value (R7) for the current dot. The pages are yours and it never reaches them. */
36
+ color?: string;
37
+ /** @default 'horizontal' */
38
+ orientation?: PagerOrientation;
39
+ /** Which page is shown. Present means controlled. */
40
+ index?: number;
41
+ /** Where it starts when uncontrolled. */
42
+ defaultIndex?: number;
43
+ onIndexChange?: (index: number) => void;
44
+ /** Locks the swipe and the dots. */
45
+ isDisabled?: boolean;
46
+ style?: StyleProp<ViewStyle>;
47
+ children?: ReactNode;
48
+ };
49
+ /** R14 — the pager's own props, `View`'s, and every `ViewStyle` key neither claims. */
50
+ export type PagerProps = PagerOwnProps & Omit<ViewProps, keyof PagerOwnProps | 'style'> & Omit<ViewStyleProps, keyof PagerOwnProps>;
51
+ /** `ScrollView`'s own props win over the `ViewStyle` keys of the same name (R14). */
52
+ export type PagerContentProps = Omit<ScrollViewProps, 'style' | 'children'> & Omit<ViewStyleProps, keyof ScrollViewProps> & {
53
+ style?: StyleProp<ViewStyle>;
54
+ children?: ReactNode;
55
+ };
56
+ /** `View`'s own props win over the `ViewStyle` keys of the same name (R14). */
57
+ export type PagerViewSlotProps = Omit<ViewProps, 'style'> & Omit<ViewStyleProps, keyof ViewProps> & {
58
+ style?: StyleProp<ViewStyle>;
59
+ children?: ReactNode;
60
+ };
61
+ export type PagerDotProps = PagerViewSlotProps & {
62
+ /** Which page this dot stands for. */
63
+ index: number;
64
+ };
65
+ /** The two colours a dot travels between, read as values because a worklet interpolates them. */
66
+ export type PagerDotInk = {
67
+ rest: string;
68
+ active: string;
69
+ };
70
+ /** How big the track measured — a page is exactly this, on both axes. */
71
+ export type PagerTrackSize = {
72
+ width: number;
73
+ height: number;
74
+ };
75
+ /** R5 — resolved styles and measured numbers, never a token for a slot to resolve again. */
76
+ export type PagerContextValue = {
77
+ contentStyle: StyleProp<ViewStyle>;
78
+ pageStyle: StyleProp<ViewStyle>;
79
+ indicatorStyle: StyleProp<ViewStyle>;
80
+ dotStyle: StyleProp<ViewStyle>;
81
+ dotInk: PagerDotInk;
82
+ orientation: PagerOrientation;
83
+ /** The settled page. */
84
+ index: number;
85
+ /** How many pages the track was given, counted by the track itself. */
86
+ count: number;
87
+ setCount: (count: number) => void;
88
+ /**
89
+ * The track's own size, measured — **the track's, not the root's**. The indicator sits in
90
+ * the flow under the pages, so the root is taller than the box a page has to fill, and a
91
+ * page sized to the root would overflow it by exactly the dots.
92
+ *
93
+ * Zero until it has laid out, which is why the track draws nothing before then.
94
+ */
95
+ track: PagerTrackSize;
96
+ setTrack: (size: PagerTrackSize) => void;
97
+ /** How far one page travels — the track's size on the paging axis. */
98
+ step: number;
99
+ /** Where the track is, live, on the UI thread. */
100
+ offset: SharedValue<number>;
101
+ /** Moves the track and lets its own settle report back. */
102
+ goTo: (index: number) => void;
103
+ /** What the track calls when it crosses onto another page. */
104
+ onSettle: (index: number) => void;
105
+ trackRef: AnimatedRef<Animated.ScrollView>;
106
+ isDisabled: boolean;
107
+ };
108
+ export {};
@@ -0,0 +1,30 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+ var _chunkXWIPLZTDcjs = require('../../chunk-XWIPLZTD.cjs');
10
+ require('../../chunk-7EIHHOHP.cjs');
11
+ require('../../chunk-OW4N2C3M.cjs');
12
+ require('../../chunk-7DPL3ZDS.cjs');
13
+ require('../../chunk-GSZDN6EZ.cjs');
14
+ require('../../chunk-FHNIGHN5.cjs');
15
+ require('../../chunk-SL3V7R2Y.cjs');
16
+ require('../../chunk-TVJXC4HY.cjs');
17
+ require('../../chunk-CDRGTUYF.cjs');
18
+ require('../../chunk-H4E4HDEP.cjs');
19
+ require('../../chunk-EJQCQPET.cjs');
20
+ require('../../chunk-IIAQISBG.cjs');
21
+ require('../../chunk-TK44VBIE.cjs');
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+ exports.Rating = _chunkXWIPLZTDcjs.Rating; exports.RatingIcon = _chunkXWIPLZTDcjs.RatingIcon; exports.RatingItem = _chunkXWIPLZTDcjs.RatingItem; exports.RatingRoot = _chunkXWIPLZTDcjs.RatingRoot; exports.ratingRecipe = _chunkXWIPLZTDcjs.ratingRecipe; exports.useRating = _chunkXWIPLZTDcjs.useRating; exports.useRatingLayer = _chunkXWIPLZTDcjs.useRatingLayer;
@@ -0,0 +1,41 @@
1
+ import { RatingIcon } from './rating-icon';
2
+ export declare const Rating: import("react").ForwardRefExoticComponent<{
3
+ variant?: import("./rating.type").RatingVariant;
4
+ size?: import("./rating.type").RatingSize;
5
+ color?: string;
6
+ max?: number;
7
+ value?: number;
8
+ defaultValue?: number;
9
+ onValueChange?: (value: number) => void;
10
+ precision?: number;
11
+ isReadOnly?: boolean;
12
+ isDisabled?: boolean;
13
+ children?: import("react").ReactNode;
14
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
15
+ } & Omit<import("react-native").ViewProps, "style" | "children"> & Omit<import("../..").ViewStyleProps, keyof {
16
+ variant?: import("./rating.type").RatingVariant;
17
+ size?: import("./rating.type").RatingSize;
18
+ color?: string;
19
+ max?: number;
20
+ value?: number;
21
+ defaultValue?: number;
22
+ onValueChange?: (value: number) => void;
23
+ precision?: number;
24
+ isReadOnly?: boolean;
25
+ isDisabled?: boolean;
26
+ children?: import("react").ReactNode;
27
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
28
+ }> & import("react").RefAttributes<import("react-native").View>> & {
29
+ Item: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
30
+ index: number;
31
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
32
+ children?: import("react").ReactNode;
33
+ } & import("react").RefAttributes<import("react-native").View>>;
34
+ Icon: typeof RatingIcon;
35
+ };
36
+ export { RatingRoot } from './rating';
37
+ export { RatingIcon } from './rating-icon';
38
+ export { RatingItem } from './rating-item';
39
+ export { useRating, useRatingLayer } from './rating.context';
40
+ export { ratingRecipe } from './rating.recipe';
41
+ export type { RatingContextValue, RatingIconProps, RatingItemProps, RatingLayerContextValue, RatingProps, RatingSize, RatingSlot, RatingTone, RatingVariant, } from './rating.type';
@@ -0,0 +1,41 @@
1
+ import { RatingIcon } from './rating-icon';
2
+ export declare const Rating: import("react").ForwardRefExoticComponent<{
3
+ variant?: import("./rating.type").RatingVariant;
4
+ size?: import("./rating.type").RatingSize;
5
+ color?: string;
6
+ max?: number;
7
+ value?: number;
8
+ defaultValue?: number;
9
+ onValueChange?: (value: number) => void;
10
+ precision?: number;
11
+ isReadOnly?: boolean;
12
+ isDisabled?: boolean;
13
+ children?: import("react").ReactNode;
14
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
15
+ } & Omit<import("react-native").ViewProps, "style" | "children"> & Omit<import("../..").ViewStyleProps, keyof {
16
+ variant?: import("./rating.type").RatingVariant;
17
+ size?: import("./rating.type").RatingSize;
18
+ color?: string;
19
+ max?: number;
20
+ value?: number;
21
+ defaultValue?: number;
22
+ onValueChange?: (value: number) => void;
23
+ precision?: number;
24
+ isReadOnly?: boolean;
25
+ isDisabled?: boolean;
26
+ children?: import("react").ReactNode;
27
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
28
+ }> & import("react").RefAttributes<import("react-native").View>> & {
29
+ Item: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
30
+ index: number;
31
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
32
+ children?: import("react").ReactNode;
33
+ } & import("react").RefAttributes<import("react-native").View>>;
34
+ Icon: typeof RatingIcon;
35
+ };
36
+ export { RatingRoot } from './rating';
37
+ export { RatingIcon } from './rating-icon';
38
+ export { RatingItem } from './rating-item';
39
+ export { useRating, useRatingLayer } from './rating.context';
40
+ export { ratingRecipe } from './rating.recipe';
41
+ export type { RatingContextValue, RatingIconProps, RatingItemProps, RatingLayerContextValue, RatingProps, RatingSize, RatingSlot, RatingTone, RatingVariant, } from './rating.type';
@@ -0,0 +1,30 @@
1
+ import {
2
+ Rating,
3
+ RatingIcon,
4
+ RatingItem,
5
+ RatingRoot,
6
+ ratingRecipe,
7
+ useRating,
8
+ useRatingLayer
9
+ } from "../../chunk-7NQL5DXY.js";
10
+ import "../../chunk-F6W3JQ7K.js";
11
+ import "../../chunk-2AFA5HA2.js";
12
+ import "../../chunk-423RQBOX.js";
13
+ import "../../chunk-JN6IRT2M.js";
14
+ import "../../chunk-WFZDAXDI.js";
15
+ import "../../chunk-DKVXTMIJ.js";
16
+ import "../../chunk-3Q42X6EQ.js";
17
+ import "../../chunk-TTZOIXKE.js";
18
+ import "../../chunk-36PRYGAM.js";
19
+ import "../../chunk-EGLLDKN6.js";
20
+ import "../../chunk-Z6JBWRPL.js";
21
+ import "../../chunk-M63GFNKV.js";
22
+ export {
23
+ Rating,
24
+ RatingIcon,
25
+ RatingItem,
26
+ RatingRoot,
27
+ ratingRecipe,
28
+ useRating,
29
+ useRatingLayer
30
+ };
@@ -0,0 +1,16 @@
1
+ import type { RatingIconProps } from './rating.type';
2
+ /**
3
+ * The mark, as a glyph of your own — a heart, a flame, a paw.
4
+ *
5
+ * Written **once** and drawn twice, because a mark is the same glyph in two layers: the
6
+ * neutral ground, and the filled colour clipped to the fraction given. Which of the two this
7
+ * instance is in comes from the layer rather than from a prop, so the caller never has to
8
+ * keep two copies in step.
9
+ *
10
+ * An explicit `color` wins, as it does everywhere `Icon` appears — which is also how a
11
+ * caller opts out of the two-layer colouring entirely.
12
+ */
13
+ export declare function RatingIcon({ size, color, ...rest }: RatingIconProps): import("react").JSX.Element;
14
+ export declare namespace RatingIcon {
15
+ var displayName: string;
16
+ }
@@ -0,0 +1,16 @@
1
+ import type { RatingIconProps } from './rating.type';
2
+ /**
3
+ * The mark, as a glyph of your own — a heart, a flame, a paw.
4
+ *
5
+ * Written **once** and drawn twice, because a mark is the same glyph in two layers: the
6
+ * neutral ground, and the filled colour clipped to the fraction given. Which of the two this
7
+ * instance is in comes from the layer rather than from a prop, so the caller never has to
8
+ * keep two copies in step.
9
+ *
10
+ * An explicit `color` wins, as it does everywhere `Icon` appears — which is also how a
11
+ * caller opts out of the two-layer colouring entirely.
12
+ */
13
+ export declare function RatingIcon({ size, color, ...rest }: RatingIconProps): import("react").JSX.Element;
14
+ export declare namespace RatingIcon {
15
+ var displayName: string;
16
+ }
@@ -0,0 +1,23 @@
1
+ import { View } from 'react-native';
2
+ /**
3
+ * One mark.
4
+ *
5
+ * **It is the same glyph twice.** The neutral one sits in the flow and decides how wide the
6
+ * mark is; the filled one is pinned over it inside a clip whose width is the fraction given,
7
+ * so a value of 4.3 shows three tenths of the fifth mark. That fraction is what lets one
8
+ * component be both an input and a display of an average — a boolean per mark would have to
9
+ * round 4.3 to 4 and lose the thing the average was for.
10
+ *
11
+ * **The press reads where it landed.** `locationX` over the mark's width is the fraction the
12
+ * finger meant, and `snapValue` rounds it up to the nearest `precision` step: a tap anywhere
13
+ * in the first mark is one star rather than zero, and with `precision={0.5}` the left half of
14
+ * the third is 2.5 while the right half is 3.
15
+ *
16
+ * A mark owns its own press state, which is why the root publishes resolved styles and not
17
+ * the recipe (R5).
18
+ */
19
+ export declare const RatingItem: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
20
+ index: number;
21
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
22
+ children?: import("react").ReactNode;
23
+ } & import("react").RefAttributes<View>>;
@@ -0,0 +1,23 @@
1
+ import { View } from 'react-native';
2
+ /**
3
+ * One mark.
4
+ *
5
+ * **It is the same glyph twice.** The neutral one sits in the flow and decides how wide the
6
+ * mark is; the filled one is pinned over it inside a clip whose width is the fraction given,
7
+ * so a value of 4.3 shows three tenths of the fifth mark. That fraction is what lets one
8
+ * component be both an input and a display of an average — a boolean per mark would have to
9
+ * round 4.3 to 4 and lose the thing the average was for.
10
+ *
11
+ * **The press reads where it landed.** `locationX` over the mark's width is the fraction the
12
+ * finger meant, and `snapValue` rounds it up to the nearest `precision` step: a tap anywhere
13
+ * in the first mark is one star rather than zero, and with `precision={0.5}` the left half of
14
+ * the third is 2.5 while the right half is 3.
15
+ *
16
+ * A mark owns its own press state, which is why the root publishes resolved styles and not
17
+ * the recipe (R5).
18
+ */
19
+ export declare const RatingItem: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
20
+ index: number;
21
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
22
+ children?: import("react").ReactNode;
23
+ } & import("react").RefAttributes<View>>;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The mark a `Rating` draws when the caller composes nothing.
3
+ *
4
+ * **`★` in both layers**, one in the neutral ground and one in the filled colour — never a
5
+ * hollow `☆` under a solid one. Two reasons, and the second is the load-bearing one: a solid
6
+ * pair is what every store's rating looks like, and `☆` (U+2606) is not in Android's system
7
+ * face, so the empty half of the row would render as a box on the platform where most of it
8
+ * is read. `★` (U+2605) is present on both.
9
+ *
10
+ * A character rather than an SVG, so the component needs no `react-native-svg` for the one
11
+ * glyph it draws itself. `Rating.Icon` replaces it with anything.
12
+ *
13
+ * **Internal** — the two layers are the `Rating.Item`'s arrangement, and a caller reaching
14
+ * for this directly would be reaching past the thing that positions it.
15
+ */
16
+ export declare function RatingStar(): import("react").JSX.Element;
17
+ export declare namespace RatingStar {
18
+ var displayName: string;
19
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The mark a `Rating` draws when the caller composes nothing.
3
+ *
4
+ * **`★` in both layers**, one in the neutral ground and one in the filled colour — never a
5
+ * hollow `☆` under a solid one. Two reasons, and the second is the load-bearing one: a solid
6
+ * pair is what every store's rating looks like, and `☆` (U+2606) is not in Android's system
7
+ * face, so the empty half of the row would render as a box on the platform where most of it
8
+ * is read. `★` (U+2605) is present on both.
9
+ *
10
+ * A character rather than an SVG, so the component needs no `react-native-svg` for the one
11
+ * glyph it draws itself. `Rating.Icon` replaces it with anything.
12
+ *
13
+ * **Internal** — the two layers are the `Rating.Item`'s arrangement, and a caller reaching
14
+ * for this directly would be reaching past the thing that positions it.
15
+ */
16
+ export declare function RatingStar(): import("react").JSX.Element;
17
+ export declare namespace RatingStar {
18
+ var displayName: string;
19
+ }
@@ -0,0 +1,16 @@
1
+ import type { RatingContextValue, RatingLayerContextValue } from './rating.type';
2
+ /**
3
+ * R10 — `useRating` is exported so a control beside the row can read or set the value, and
4
+ * so a caller can write their own mark against the same `select` the built-in ones call.
5
+ * Outside a `<Rating>` it throws by name.
6
+ */
7
+ export declare const RatingProvider: import("react").Provider<RatingContextValue | null>, useRating: () => RatingContextValue;
8
+ /**
9
+ * Which of a mark's two layers a glyph is drawn in.
10
+ *
11
+ * It exists so `Rating.Icon` needs no prop to know its colour: a mark is the same glyph
12
+ * twice, once in the neutral ground and once in the filled colour clipped to the fraction
13
+ * given, and the caller writes that glyph **once**. A `tone` prop would have made them write
14
+ * it twice and keep the two in step.
15
+ */
16
+ export declare const RatingLayerProvider: import("react").Provider<RatingLayerContextValue | null>, useRatingLayer: () => RatingLayerContextValue;
@@ -0,0 +1,16 @@
1
+ import type { RatingContextValue, RatingLayerContextValue } from './rating.type';
2
+ /**
3
+ * R10 — `useRating` is exported so a control beside the row can read or set the value, and
4
+ * so a caller can write their own mark against the same `select` the built-in ones call.
5
+ * Outside a `<Rating>` it throws by name.
6
+ */
7
+ export declare const RatingProvider: import("react").Provider<RatingContextValue | null>, useRating: () => RatingContextValue;
8
+ /**
9
+ * Which of a mark's two layers a glyph is drawn in.
10
+ *
11
+ * It exists so `Rating.Icon` needs no prop to know its colour: a mark is the same glyph
12
+ * twice, once in the neutral ground and once in the filled colour clipped to the fraction
13
+ * given, and the caller writes that glyph **once**. A `tone` prop would have made them write
14
+ * it twice and keep the two in step.
15
+ */
16
+ export declare const RatingLayerProvider: import("react").Provider<RatingLayerContextValue | null>, useRatingLayer: () => RatingLayerContextValue;
@@ -0,0 +1,59 @@
1
+ import { View } from 'react-native';
2
+ /**
3
+ * A row of marks, given or shown.
4
+ *
5
+ * ```tsx
6
+ * <Rating value={score} onValueChange={setScore} />
7
+ *
8
+ * <Rating value={4.3} isReadOnly />
9
+ *
10
+ * <Rating value={score} onValueChange={setScore} precision={0.5}>
11
+ * <Rating.Icon as={HeartIcon} />
12
+ * </Rating>
13
+ * ```
14
+ *
15
+ * **One component for the input and the average.** The fill of each mark is a *fraction*,
16
+ * so 4.3 shows three tenths of the fifth mark — a boolean per mark would have had to round
17
+ * it, and rounding is exactly what an average must not do. `precision` governs input only.
18
+ *
19
+ * **The row is data, not markup.** `max` says how many marks there are, so the root renders
20
+ * them; five hand-written marks is a row that disagrees with the prop the moment either
21
+ * changes. `children` is therefore the **glyph**, written once and drawn once per mark.
22
+ *
23
+ * **There is no label.** A "4,3 sur 5" beside the row is a `Typography` in a `Row` — the
24
+ * screen's, not the rating's (R1), and the moment it were a slot it would need an alignment,
25
+ * a format and a language.
26
+ *
27
+ * **There is no `isClearable`**, deliberately. Tapping the mark you already chose to go back
28
+ * to nothing is a gesture half the world's rating inputs have and half do not, so it is not
29
+ * a default either way; a caller who wants it holds the value and compares
30
+ * (`onValueChange={next => setScore(next === score ? 0 : next)}`), which is three words and
31
+ * says which behaviour they picked.
32
+ */
33
+ export declare const RatingRoot: import("react").ForwardRefExoticComponent<{
34
+ variant?: import("./rating.type").RatingVariant;
35
+ size?: import("./rating.type").RatingSize;
36
+ color?: string;
37
+ max?: number;
38
+ value?: number;
39
+ defaultValue?: number;
40
+ onValueChange?: (value: number) => void;
41
+ precision?: number;
42
+ isReadOnly?: boolean;
43
+ isDisabled?: boolean;
44
+ children?: import("react").ReactNode;
45
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
46
+ } & Omit<import("react-native").ViewProps, "style" | "children"> & Omit<import("../..").ViewStyleProps, keyof {
47
+ variant?: import("./rating.type").RatingVariant;
48
+ size?: import("./rating.type").RatingSize;
49
+ color?: string;
50
+ max?: number;
51
+ value?: number;
52
+ defaultValue?: number;
53
+ onValueChange?: (value: number) => void;
54
+ precision?: number;
55
+ isReadOnly?: boolean;
56
+ isDisabled?: boolean;
57
+ children?: import("react").ReactNode;
58
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
59
+ }> & import("react").RefAttributes<View>>;
@@ -0,0 +1,59 @@
1
+ import { View } from 'react-native';
2
+ /**
3
+ * A row of marks, given or shown.
4
+ *
5
+ * ```tsx
6
+ * <Rating value={score} onValueChange={setScore} />
7
+ *
8
+ * <Rating value={4.3} isReadOnly />
9
+ *
10
+ * <Rating value={score} onValueChange={setScore} precision={0.5}>
11
+ * <Rating.Icon as={HeartIcon} />
12
+ * </Rating>
13
+ * ```
14
+ *
15
+ * **One component for the input and the average.** The fill of each mark is a *fraction*,
16
+ * so 4.3 shows three tenths of the fifth mark — a boolean per mark would have had to round
17
+ * it, and rounding is exactly what an average must not do. `precision` governs input only.
18
+ *
19
+ * **The row is data, not markup.** `max` says how many marks there are, so the root renders
20
+ * them; five hand-written marks is a row that disagrees with the prop the moment either
21
+ * changes. `children` is therefore the **glyph**, written once and drawn once per mark.
22
+ *
23
+ * **There is no label.** A "4,3 sur 5" beside the row is a `Typography` in a `Row` — the
24
+ * screen's, not the rating's (R1), and the moment it were a slot it would need an alignment,
25
+ * a format and a language.
26
+ *
27
+ * **There is no `isClearable`**, deliberately. Tapping the mark you already chose to go back
28
+ * to nothing is a gesture half the world's rating inputs have and half do not, so it is not
29
+ * a default either way; a caller who wants it holds the value and compares
30
+ * (`onValueChange={next => setScore(next === score ? 0 : next)}`), which is three words and
31
+ * says which behaviour they picked.
32
+ */
33
+ export declare const RatingRoot: import("react").ForwardRefExoticComponent<{
34
+ variant?: import("./rating.type").RatingVariant;
35
+ size?: import("./rating.type").RatingSize;
36
+ color?: string;
37
+ max?: number;
38
+ value?: number;
39
+ defaultValue?: number;
40
+ onValueChange?: (value: number) => void;
41
+ precision?: number;
42
+ isReadOnly?: boolean;
43
+ isDisabled?: boolean;
44
+ children?: import("react").ReactNode;
45
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
46
+ } & Omit<import("react-native").ViewProps, "style" | "children"> & Omit<import("../..").ViewStyleProps, keyof {
47
+ variant?: import("./rating.type").RatingVariant;
48
+ size?: import("./rating.type").RatingSize;
49
+ color?: string;
50
+ max?: number;
51
+ value?: number;
52
+ defaultValue?: number;
53
+ onValueChange?: (value: number) => void;
54
+ precision?: number;
55
+ isReadOnly?: boolean;
56
+ isDisabled?: boolean;
57
+ children?: import("react").ReactNode;
58
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
59
+ }> & import("react").RefAttributes<View>>;
@@ -0,0 +1,11 @@
1
+ import type { SlotStyles } from '../../system/recipe';
2
+ import type { XAUITheme } from '../../theme/theme.type';
3
+ import type { RatingSlot, RatingVariant } from './rating.type';
4
+ export declare const ratingRecipe: import("../..").Recipe<"root" | "glyph" | "item" | "glyphFill", RatingVariant, {
5
+ readonly size: {
6
+ readonly xs: (theme: XAUITheme) => SlotStyles<RatingSlot>;
7
+ readonly sm: (theme: XAUITheme) => SlotStyles<RatingSlot>;
8
+ readonly md: (theme: XAUITheme) => SlotStyles<RatingSlot>;
9
+ readonly lg: (theme: XAUITheme) => SlotStyles<RatingSlot>;
10
+ };
11
+ }>;