@xaui/native 0.9.1-alpha.16 → 0.9.1-alpha.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-4K3LZS7M.js +448 -0
- package/dist/chunk-5SU7FXWH.cjs +448 -0
- package/dist/chunk-6PZF4PI7.js +100 -0
- package/dist/chunk-6VTBGBPP.cjs +100 -0
- package/dist/{chunk-KCUT47FY.cjs → chunk-BHAHJHAI.cjs} +5 -1
- package/dist/{chunk-UOJBK5Z4.js → chunk-L3AQNVRN.js} +1 -1
- package/dist/{chunk-BAACHVM4.cjs → chunk-M2VYRHVS.cjs} +2 -2
- package/dist/{chunk-E3756MJC.js → chunk-MBLPPOSO.js} +16 -15
- package/dist/{chunk-NLFE3CRM.cjs → chunk-ODH5WAVM.cjs} +24 -23
- package/dist/{chunk-PUER6Y4M.cjs → chunk-P5MKOLIW.cjs} +110 -409
- package/dist/chunk-VQPP6FCB.js +728 -0
- package/dist/{chunk-EHHSY2KB.js → chunk-XQE5PXOD.js} +5 -1
- package/dist/components/button/index.cjs +4 -3
- package/dist/components/button/index.d.cts +179 -178
- package/dist/components/button/index.d.ts +179 -178
- package/dist/components/button/index.js +3 -2
- package/dist/components/typography/index.cjs +12 -0
- package/dist/components/typography/index.d.cts +115 -0
- package/dist/components/typography/index.d.ts +115 -0
- package/dist/components/typography/index.js +12 -0
- package/dist/create-recipe-3_ElpCYt.d.cts +117 -0
- package/dist/create-recipe-DImq1AZA.d.ts +117 -0
- package/dist/index.cjs +17 -7
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +21 -11
- package/dist/pressable-feedback.type-UwqIG6ES.d.ts +195 -0
- package/dist/pressable-feedback.type-lgW5wQx5.d.cts +195 -0
- package/dist/system/index.cjs +5 -3
- package/dist/system/index.d.cts +10 -4
- package/dist/system/index.d.ts +10 -4
- package/dist/system/index.js +11 -9
- package/dist/theme/index.cjs +2 -2
- package/dist/theme/index.d.cts +2 -2
- package/dist/theme/index.d.ts +2 -2
- package/dist/theme/index.js +1 -1
- package/dist/{theme.type-C9bFJKFm.d.cts → theme.type-C2gNHpEx.d.cts} +1 -1
- package/dist/{theme.type-C9bFJKFm.d.ts → theme.type-C2gNHpEx.d.ts} +1 -1
- package/package.json +11 -1
- package/dist/chunk-64L44HEI.js +0 -1021
- package/dist/create-recipe-BcUu9b2I.d.cts +0 -280
- package/dist/create-recipe-DD9W6m9b.d.ts +0 -280
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import * as react_native from 'react-native';
|
|
4
|
+
import { TextProps, StyleProp, TextStyle, Text } from 'react-native';
|
|
5
|
+
import { o as TextStyleProps, R as Recipe } from '../../create-recipe-DImq1AZA.js';
|
|
6
|
+
import { X as XAUITheme } from '../../theme.type-C2gNHpEx.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The ten roles, aligned with HeroUI Native's `text` — six headings, three body steps and
|
|
10
|
+
* inline code. Each one fixes **size, line height, weight and family together**, which is
|
|
11
|
+
* what removes the separate `size` and `weight` props the legacy component carried, and
|
|
12
|
+
* with them the illegal combinations they allowed: a heading in `weight="light"`, a
|
|
13
|
+
* caption in `lg`.
|
|
14
|
+
*
|
|
15
|
+
* `h1`–`h6` name a level, not an HTML tag — React Native has no document outline, so the
|
|
16
|
+
* number is the step on the scale and nothing more. Announcing a heading to a screen
|
|
17
|
+
* reader stays explicit: `accessibilityRole="header"`.
|
|
18
|
+
*/
|
|
19
|
+
type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body' | 'body-sm' | 'body-xs' | 'code';
|
|
20
|
+
type TypographySlot = 'root';
|
|
21
|
+
type TypographyOwnProps = {
|
|
22
|
+
/** The role. It fixes size, line height, weight and family at once. */
|
|
23
|
+
variant?: TypographyVariant;
|
|
24
|
+
/**
|
|
25
|
+
* A raw tint (`'#7c3aed'`), never a token (R7). In a text component there is only one
|
|
26
|
+
* thing to tint, so it lands on the text itself.
|
|
27
|
+
*/
|
|
28
|
+
color?: string;
|
|
29
|
+
/** R12 — the child element becomes the text node, keeping this variant's style. */
|
|
30
|
+
asChild?: boolean;
|
|
31
|
+
style?: StyleProp<TextStyle>;
|
|
32
|
+
children?: ReactNode;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* R14 — the role's own vocabulary, then every `TextStyle` key it does not already claim.
|
|
36
|
+
* `color` is the component's, so it keeps its R7 meaning here rather than becoming the
|
|
37
|
+
* style key of the same name; `fontSize` and `fontWeight` stay available, which is how a
|
|
38
|
+
* one-off deviation is written without inventing a prop for it.
|
|
39
|
+
*/
|
|
40
|
+
type TypographyProps = Omit<TextProps, 'style'> & TypographyOwnProps & Omit<TextStyleProps, keyof TypographyOwnProps | keyof TextProps>;
|
|
41
|
+
type TextSpanOwnProps = {
|
|
42
|
+
/** R12 — the child element becomes the span. */
|
|
43
|
+
asChild?: boolean;
|
|
44
|
+
style?: StyleProp<TextStyle>;
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
};
|
|
47
|
+
type TextSpanProps = Omit<TextProps, 'style'> & TextSpanOwnProps & Omit<TextStyleProps, keyof TextSpanOwnProps | keyof TextProps>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Text, by the role it plays.
|
|
51
|
+
*
|
|
52
|
+
* ```tsx
|
|
53
|
+
* <Typography variant="heading-lg">Projets</Typography>
|
|
54
|
+
* <Typography>Trois en cours, un archivé.</Typography>
|
|
55
|
+
* <Typography variant="caption">Mis à jour il y a deux minutes</Typography>
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* **One node, and no slots.** A paragraph is a `Text`; there is nothing inside it for the
|
|
59
|
+
* component to publish. Styling a fragment of it is `TextSpan`'s job, not a slot of this
|
|
60
|
+
* one — React Native already makes a nested `Text` inherit from its parent, so a span
|
|
61
|
+
* needs no context, no resolved style and nothing from here. This component would only be
|
|
62
|
+
* duplicating a mechanism the platform ships.
|
|
63
|
+
*
|
|
64
|
+
* **The role fixes size, line height, weight and family together**, which is why there is
|
|
65
|
+
* no `size` and no `weight` prop: those axes are not free to combine. A one-off deviation
|
|
66
|
+
* is a style prop — `fontSize={17}` — said plainly rather than dressed as vocabulary.
|
|
67
|
+
*
|
|
68
|
+
* Alignment likewise has no prop of its own: `textAlign` is a `TextStyle` key, so R14
|
|
69
|
+
* already exposes it, and the caller writes the value React Native understands instead of
|
|
70
|
+
* a translation layer this component would have to keep honest.
|
|
71
|
+
*/
|
|
72
|
+
declare const Typography: react.ForwardRefExoticComponent<Omit<react_native.TextProps, "style"> & {
|
|
73
|
+
variant?: TypographyVariant;
|
|
74
|
+
color?: string;
|
|
75
|
+
asChild?: boolean;
|
|
76
|
+
style?: react_native.StyleProp<react_native.TextStyle>;
|
|
77
|
+
children?: react.ReactNode;
|
|
78
|
+
} & Omit<TextStyleProps, "color" | "pointerEvents" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "disabled" | "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "pressRetentionOffset" | "asChild" | "variant" | "allowFontScaling" | "ellipsizeMode" | "lineBreakMode" | "numberOfLines" | "onTextLayout" | "maxFontSizeMultiplier" | "minimumFontScale" | "adjustsFontSizeToFit" | "dynamicTypeRamp" | "suppressHighlighting" | "lineBreakStrategyIOS" | "selectable" | "selectionColor" | "textBreakStrategy" | "dataDetectorType" | "android_hyphenationFrequency"> & react.RefAttributes<Text>>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* A fragment of text, styled apart from the text around it.
|
|
82
|
+
*
|
|
83
|
+
* ```tsx
|
|
84
|
+
* <Typography>
|
|
85
|
+
* Supprimer <TextSpan fontWeight="600">trois projets</TextSpan> définitivement.
|
|
86
|
+
* </Typography>
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* **It is a bare React Native `Text`, and that is the whole design.** Nesting a `Text`
|
|
90
|
+
* inside a `Text` already inherits the parent's font, size, weight and colour on both
|
|
91
|
+
* platforms — so a span needs no context to read, no role to resolve and no provider
|
|
92
|
+
* above it. The legacy component published a `TextSpanContext` to carry that inheritance
|
|
93
|
+
* by hand; it was reimplementing the platform, and it is gone.
|
|
94
|
+
*
|
|
95
|
+
* What is left is R14 and nothing else: every `TextStyle` key as a prop, and `style` after
|
|
96
|
+
* them. There is no `variant` here on purpose — a span that names a role would be a
|
|
97
|
+
* `Typography`, and nesting one of those is how you change role mid-sentence.
|
|
98
|
+
*/
|
|
99
|
+
declare const TextSpan: react.ForwardRefExoticComponent<Omit<react_native.TextProps, "style"> & {
|
|
100
|
+
asChild?: boolean;
|
|
101
|
+
style?: react_native.StyleProp<react_native.TextStyle>;
|
|
102
|
+
children?: react.ReactNode;
|
|
103
|
+
} & Omit<TextStyleProps, "pointerEvents" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "disabled" | "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "pressRetentionOffset" | "asChild" | "allowFontScaling" | "ellipsizeMode" | "lineBreakMode" | "numberOfLines" | "onTextLayout" | "maxFontSizeMultiplier" | "minimumFontScale" | "adjustsFontSizeToFit" | "dynamicTypeRamp" | "suppressHighlighting" | "lineBreakStrategyIOS" | "selectable" | "selectionColor" | "textBreakStrategy" | "dataDetectorType" | "android_hyphenationFrequency"> & react.RefAttributes<Text>>;
|
|
104
|
+
|
|
105
|
+
/** Every role produces the same one slot, so the recipe's style functions share a shape. */
|
|
106
|
+
type StyleFn = (theme: XAUITheme) => Record<TypographySlot, TextStyle>;
|
|
107
|
+
/**
|
|
108
|
+
* There is no `base`. A text node's defaults are React Native's own, and restating them
|
|
109
|
+
* here would only give them a second place to drift from.
|
|
110
|
+
*/
|
|
111
|
+
declare const typographyRecipe: Recipe<"root", TypographyVariant, {
|
|
112
|
+
readonly variant: Record<TypographyVariant, StyleFn>;
|
|
113
|
+
}>;
|
|
114
|
+
|
|
115
|
+
export { TextSpan, type TextSpanProps, Typography, type TypographyProps, type TypographySlot, type TypographyVariant, typographyRecipe };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { ImageStyle, TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
import { X as XAUITheme, a as XAUIColors } from './theme.type-C2gNHpEx.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* R13 — React Native mirrors a layout under RTL through the Start/End properties and only
|
|
6
|
+
* those. A props API is exactly where someone writes `paddingLeft` without thinking, so
|
|
7
|
+
* the type removes the temptation instead of leaving it to a review.
|
|
8
|
+
*/
|
|
9
|
+
type DirectionalStyleKey = 'left' | 'right' | 'paddingLeft' | 'paddingRight' | 'marginLeft' | 'marginRight' | 'borderLeftWidth' | 'borderRightWidth' | 'borderLeftColor' | 'borderRightColor' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius';
|
|
10
|
+
/**
|
|
11
|
+
* `pointerEvents` is a style key *and* a `View` prop. R14 says the component's own prop
|
|
12
|
+
* wins, so it stays the prop it has always been and is not exposed twice — the one name
|
|
13
|
+
* where the two vocabularies collide.
|
|
14
|
+
*/
|
|
15
|
+
type ComponentOwnedStyleKey = 'pointerEvents';
|
|
16
|
+
/**
|
|
17
|
+
* The style keys of a node, exposed as props (R14). Not a maintained list: it derives
|
|
18
|
+
* from the React Native type, minus what R13 forbids.
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* type CardProps = ViewStyleProps & { variant?: CardVariant }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
type StyleProps<Style> = Omit<Style, DirectionalStyleKey | ComponentOwnedStyleKey>;
|
|
25
|
+
/** A root, or any slot that renders a view. */
|
|
26
|
+
type ViewStyleProps = StyleProps<ViewStyle>;
|
|
27
|
+
/** A text slot — `color`, `fontSize`, `letterSpacing`… */
|
|
28
|
+
type TextStyleProps = StyleProps<TextStyle>;
|
|
29
|
+
/** An image slot — `resizeMode`, `tintColor`… */
|
|
30
|
+
type ImageStyleProps = StyleProps<ImageStyle>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A slot is a view or a text node, and a recipe writes one object per slot, so the two
|
|
34
|
+
* RN style shapes are merged rather than discriminated per slot.
|
|
35
|
+
*/
|
|
36
|
+
type SlotStyle = ViewStyle & TextStyle;
|
|
37
|
+
type SlotStyles<Slot extends string> = Partial<Record<Slot, SlotStyle>>;
|
|
38
|
+
/** The roles a variant consumes. The variant names tokens; `paint` says where they land. */
|
|
39
|
+
type VariantRole = 'bg' | 'bgPressed' | 'fg' | 'border';
|
|
40
|
+
/** Token names per role — no colour value ever appears in a recipe. */
|
|
41
|
+
type VariantTokens = Partial<Record<VariantRole, keyof XAUIColors>>;
|
|
42
|
+
/** The same roles resolved: theme colours, or the slices of a raw `color`. */
|
|
43
|
+
type VariantColors = Partial<Record<VariantRole, string>>;
|
|
44
|
+
/**
|
|
45
|
+
* `disabled` is applied last of the three: a control that is both pressed and disabled
|
|
46
|
+
* has to read disabled.
|
|
47
|
+
*/
|
|
48
|
+
type StateName = 'focused' | 'pressed' | 'disabled';
|
|
49
|
+
type States = Partial<Record<StateName, boolean>>;
|
|
50
|
+
/** Reads the theme and the variant's resolved colours; returns one style per slot. */
|
|
51
|
+
type StyleFn<Slot extends string> = (theme: XAUITheme, colors: VariantColors) => SlotStyles<Slot>;
|
|
52
|
+
/** Named axes of finite token values — `{ size: { sm: fn, md: fn } }`. */
|
|
53
|
+
type Axes<Slot extends string> = Record<string, Record<string, StyleFn<Slot>>>;
|
|
54
|
+
/** One value per axis, plus the variant. Missing keys fall back to `defaultVariants`. */
|
|
55
|
+
type Selection<Variant extends string, A extends Axes<string>> = {
|
|
56
|
+
variant?: Variant;
|
|
57
|
+
} & {
|
|
58
|
+
[Axis in keyof A]?: Extract<keyof A[Axis], string>;
|
|
59
|
+
};
|
|
60
|
+
type CompoundVariant<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
|
|
61
|
+
when: Selection<Variant, A>;
|
|
62
|
+
style: StyleFn<Slot>;
|
|
63
|
+
};
|
|
64
|
+
type RecipeConfig<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
|
|
65
|
+
/** Every slot the component publishes. Slots a recipe never styles resolve to `{}`. */
|
|
66
|
+
slots: readonly Slot[];
|
|
67
|
+
base?: StyleFn<Slot>;
|
|
68
|
+
variantTokens?: Record<Variant, VariantTokens>;
|
|
69
|
+
/** Where the variant's colours land — written once, and it holds for every variant. */
|
|
70
|
+
paint?: StyleFn<Slot>;
|
|
71
|
+
variants?: A;
|
|
72
|
+
compoundVariants?: ReadonlyArray<CompoundVariant<Slot, Variant, A>>;
|
|
73
|
+
states?: Partial<Record<StateName, StyleFn<Slot>>>;
|
|
74
|
+
/**
|
|
75
|
+
* `NoInfer`, because this is the one place a single variant name appears on its own:
|
|
76
|
+
* without it, inference reads `Variant` off `{ variant: 'primary' }` and narrows the
|
|
77
|
+
* whole recipe to that one value, so every other variant becomes a type error at the
|
|
78
|
+
* call site. `variantTokens` is the declaration; this only picks a default from it.
|
|
79
|
+
*/
|
|
80
|
+
defaultVariants?: Selection<NoInfer<Variant>, A>;
|
|
81
|
+
};
|
|
82
|
+
/** Stable references: the same object for the same tokens, for the app's lifetime. */
|
|
83
|
+
type ResolvedStyles<Slot extends string> = Readonly<Record<Slot, SlotStyle>>;
|
|
84
|
+
/** A selection with `defaultVariants` already folded in, keyed by axis name. */
|
|
85
|
+
type ResolvedSelection = Readonly<Record<string, string | undefined>>;
|
|
86
|
+
|
|
87
|
+
type ResolveArgs<Variant extends string, A extends Axes<string>> = {
|
|
88
|
+
theme: XAUITheme;
|
|
89
|
+
selection?: Selection<Variant, A>;
|
|
90
|
+
states?: States;
|
|
91
|
+
};
|
|
92
|
+
type TintArgs<Variant extends string, A extends Axes<string>> = ResolveArgs<Variant, A> & {
|
|
93
|
+
color: string;
|
|
94
|
+
};
|
|
95
|
+
type Recipe<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
|
|
96
|
+
readonly slots: readonly Slot[];
|
|
97
|
+
/** The cached pass: stable `StyleSheet` references, keyed by tokens alone. */
|
|
98
|
+
resolve(args: ResolveArgs<Variant, A>): ResolvedStyles<Slot>;
|
|
99
|
+
/**
|
|
100
|
+
* The tint pass: the same functions run again with `color`'s slices in place of the
|
|
101
|
+
* theme's tokens. Uncached and allocating, and only ever called when `color` is set.
|
|
102
|
+
*/
|
|
103
|
+
tint(args: TintArgs<Variant, A>): SlotStyles<Slot>;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* A component's style, declared once. Resolution splits in two because the two halves
|
|
107
|
+
* have different lifetimes: everything keyed by a finite token is cached forever, and
|
|
108
|
+
* an arbitrary `color` is recomputed per render — which is what keeps the cache bounded
|
|
109
|
+
* by the number of token combinations rather than by the palette users invent.
|
|
110
|
+
*
|
|
111
|
+
* const styles = buttonRecipe.resolve({ theme, selection: { variant, size }, states })
|
|
112
|
+
* const tint = color ? buttonRecipe.tint({ theme, color, selection, states }) : undefined
|
|
113
|
+
* <View style={[styles.root, tint?.root, style]} />
|
|
114
|
+
*/
|
|
115
|
+
declare function createRecipe<Slot extends string, Variant extends string, const A extends Axes<Slot>>(config: RecipeConfig<Slot, Variant, A>): Recipe<Slot, Variant, A>;
|
|
116
|
+
|
|
117
|
+
export { type Axes as A, type CompoundVariant as C, type DirectionalStyleKey as D, type ImageStyleProps as I, type Recipe as R, type Selection as S, type TintArgs as T, type ViewStyleProps as V, type ResolveArgs as a, type RecipeConfig as b, createRecipe as c, type ResolvedSelection as d, type ResolvedStyles as e, type SlotStyle as f, type SlotStyles as g, type StateName as h, type States as i, type StyleFn as j, type VariantColors as k, type VariantRole as l, type VariantTokens as m, type StyleProps as n, type TextStyleProps as o };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { ImageStyle, TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
import { X as XAUITheme, a as XAUIColors } from './theme.type-C2gNHpEx.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* R13 — React Native mirrors a layout under RTL through the Start/End properties and only
|
|
6
|
+
* those. A props API is exactly where someone writes `paddingLeft` without thinking, so
|
|
7
|
+
* the type removes the temptation instead of leaving it to a review.
|
|
8
|
+
*/
|
|
9
|
+
type DirectionalStyleKey = 'left' | 'right' | 'paddingLeft' | 'paddingRight' | 'marginLeft' | 'marginRight' | 'borderLeftWidth' | 'borderRightWidth' | 'borderLeftColor' | 'borderRightColor' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius';
|
|
10
|
+
/**
|
|
11
|
+
* `pointerEvents` is a style key *and* a `View` prop. R14 says the component's own prop
|
|
12
|
+
* wins, so it stays the prop it has always been and is not exposed twice — the one name
|
|
13
|
+
* where the two vocabularies collide.
|
|
14
|
+
*/
|
|
15
|
+
type ComponentOwnedStyleKey = 'pointerEvents';
|
|
16
|
+
/**
|
|
17
|
+
* The style keys of a node, exposed as props (R14). Not a maintained list: it derives
|
|
18
|
+
* from the React Native type, minus what R13 forbids.
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* type CardProps = ViewStyleProps & { variant?: CardVariant }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
type StyleProps<Style> = Omit<Style, DirectionalStyleKey | ComponentOwnedStyleKey>;
|
|
25
|
+
/** A root, or any slot that renders a view. */
|
|
26
|
+
type ViewStyleProps = StyleProps<ViewStyle>;
|
|
27
|
+
/** A text slot — `color`, `fontSize`, `letterSpacing`… */
|
|
28
|
+
type TextStyleProps = StyleProps<TextStyle>;
|
|
29
|
+
/** An image slot — `resizeMode`, `tintColor`… */
|
|
30
|
+
type ImageStyleProps = StyleProps<ImageStyle>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A slot is a view or a text node, and a recipe writes one object per slot, so the two
|
|
34
|
+
* RN style shapes are merged rather than discriminated per slot.
|
|
35
|
+
*/
|
|
36
|
+
type SlotStyle = ViewStyle & TextStyle;
|
|
37
|
+
type SlotStyles<Slot extends string> = Partial<Record<Slot, SlotStyle>>;
|
|
38
|
+
/** The roles a variant consumes. The variant names tokens; `paint` says where they land. */
|
|
39
|
+
type VariantRole = 'bg' | 'bgPressed' | 'fg' | 'border';
|
|
40
|
+
/** Token names per role — no colour value ever appears in a recipe. */
|
|
41
|
+
type VariantTokens = Partial<Record<VariantRole, keyof XAUIColors>>;
|
|
42
|
+
/** The same roles resolved: theme colours, or the slices of a raw `color`. */
|
|
43
|
+
type VariantColors = Partial<Record<VariantRole, string>>;
|
|
44
|
+
/**
|
|
45
|
+
* `disabled` is applied last of the three: a control that is both pressed and disabled
|
|
46
|
+
* has to read disabled.
|
|
47
|
+
*/
|
|
48
|
+
type StateName = 'focused' | 'pressed' | 'disabled';
|
|
49
|
+
type States = Partial<Record<StateName, boolean>>;
|
|
50
|
+
/** Reads the theme and the variant's resolved colours; returns one style per slot. */
|
|
51
|
+
type StyleFn<Slot extends string> = (theme: XAUITheme, colors: VariantColors) => SlotStyles<Slot>;
|
|
52
|
+
/** Named axes of finite token values — `{ size: { sm: fn, md: fn } }`. */
|
|
53
|
+
type Axes<Slot extends string> = Record<string, Record<string, StyleFn<Slot>>>;
|
|
54
|
+
/** One value per axis, plus the variant. Missing keys fall back to `defaultVariants`. */
|
|
55
|
+
type Selection<Variant extends string, A extends Axes<string>> = {
|
|
56
|
+
variant?: Variant;
|
|
57
|
+
} & {
|
|
58
|
+
[Axis in keyof A]?: Extract<keyof A[Axis], string>;
|
|
59
|
+
};
|
|
60
|
+
type CompoundVariant<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
|
|
61
|
+
when: Selection<Variant, A>;
|
|
62
|
+
style: StyleFn<Slot>;
|
|
63
|
+
};
|
|
64
|
+
type RecipeConfig<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
|
|
65
|
+
/** Every slot the component publishes. Slots a recipe never styles resolve to `{}`. */
|
|
66
|
+
slots: readonly Slot[];
|
|
67
|
+
base?: StyleFn<Slot>;
|
|
68
|
+
variantTokens?: Record<Variant, VariantTokens>;
|
|
69
|
+
/** Where the variant's colours land — written once, and it holds for every variant. */
|
|
70
|
+
paint?: StyleFn<Slot>;
|
|
71
|
+
variants?: A;
|
|
72
|
+
compoundVariants?: ReadonlyArray<CompoundVariant<Slot, Variant, A>>;
|
|
73
|
+
states?: Partial<Record<StateName, StyleFn<Slot>>>;
|
|
74
|
+
/**
|
|
75
|
+
* `NoInfer`, because this is the one place a single variant name appears on its own:
|
|
76
|
+
* without it, inference reads `Variant` off `{ variant: 'primary' }` and narrows the
|
|
77
|
+
* whole recipe to that one value, so every other variant becomes a type error at the
|
|
78
|
+
* call site. `variantTokens` is the declaration; this only picks a default from it.
|
|
79
|
+
*/
|
|
80
|
+
defaultVariants?: Selection<NoInfer<Variant>, A>;
|
|
81
|
+
};
|
|
82
|
+
/** Stable references: the same object for the same tokens, for the app's lifetime. */
|
|
83
|
+
type ResolvedStyles<Slot extends string> = Readonly<Record<Slot, SlotStyle>>;
|
|
84
|
+
/** A selection with `defaultVariants` already folded in, keyed by axis name. */
|
|
85
|
+
type ResolvedSelection = Readonly<Record<string, string | undefined>>;
|
|
86
|
+
|
|
87
|
+
type ResolveArgs<Variant extends string, A extends Axes<string>> = {
|
|
88
|
+
theme: XAUITheme;
|
|
89
|
+
selection?: Selection<Variant, A>;
|
|
90
|
+
states?: States;
|
|
91
|
+
};
|
|
92
|
+
type TintArgs<Variant extends string, A extends Axes<string>> = ResolveArgs<Variant, A> & {
|
|
93
|
+
color: string;
|
|
94
|
+
};
|
|
95
|
+
type Recipe<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
|
|
96
|
+
readonly slots: readonly Slot[];
|
|
97
|
+
/** The cached pass: stable `StyleSheet` references, keyed by tokens alone. */
|
|
98
|
+
resolve(args: ResolveArgs<Variant, A>): ResolvedStyles<Slot>;
|
|
99
|
+
/**
|
|
100
|
+
* The tint pass: the same functions run again with `color`'s slices in place of the
|
|
101
|
+
* theme's tokens. Uncached and allocating, and only ever called when `color` is set.
|
|
102
|
+
*/
|
|
103
|
+
tint(args: TintArgs<Variant, A>): SlotStyles<Slot>;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* A component's style, declared once. Resolution splits in two because the two halves
|
|
107
|
+
* have different lifetimes: everything keyed by a finite token is cached forever, and
|
|
108
|
+
* an arbitrary `color` is recomputed per render — which is what keeps the cache bounded
|
|
109
|
+
* by the number of token combinations rather than by the palette users invent.
|
|
110
|
+
*
|
|
111
|
+
* const styles = buttonRecipe.resolve({ theme, selection: { variant, size }, states })
|
|
112
|
+
* const tint = color ? buttonRecipe.tint({ theme, color, selection, states }) : undefined
|
|
113
|
+
* <View style={[styles.root, tint?.root, style]} />
|
|
114
|
+
*/
|
|
115
|
+
declare function createRecipe<Slot extends string, Variant extends string, const A extends Axes<Slot>>(config: RecipeConfig<Slot, Variant, A>): Recipe<Slot, Variant, A>;
|
|
116
|
+
|
|
117
|
+
export { type Axes as A, type CompoundVariant as C, type DirectionalStyleKey as D, type ImageStyleProps as I, type Recipe as R, type Selection as S, type TintArgs as T, type ViewStyleProps as V, type ResolveArgs as a, type RecipeConfig as b, createRecipe as c, type ResolvedSelection as d, type ResolvedStyles as e, type SlotStyle as f, type SlotStyles as g, type StateName as h, type States as i, type StyleFn as j, type VariantColors as k, type VariantRole as l, type VariantTokens as m, type StyleProps as n, type TextStyleProps as o };
|
package/dist/index.cjs
CHANGED
|
@@ -4,16 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkODH5WAVMcjs = require('./chunk-ODH5WAVM.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk6VTBGBPPcjs = require('./chunk-6VTBGBPP.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
var _chunkM2VYRHVScjs = require('./chunk-M2VYRHVS.cjs');
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
|
|
@@ -38,22 +39,28 @@ var _chunkBAACHVM4cjs = require('./chunk-BAACHVM4.cjs');
|
|
|
38
39
|
|
|
39
40
|
|
|
40
41
|
|
|
42
|
+
var _chunkP5MKOLIWcjs = require('./chunk-P5MKOLIW.cjs');
|
|
41
43
|
|
|
42
44
|
|
|
43
45
|
|
|
44
|
-
var _chunkPUER6Y4Mcjs = require('./chunk-PUER6Y4M.cjs');
|
|
45
46
|
|
|
46
47
|
|
|
47
48
|
|
|
48
49
|
|
|
49
50
|
|
|
51
|
+
var _chunk5SU7FXWHcjs = require('./chunk-5SU7FXWH.cjs');
|
|
50
52
|
|
|
51
53
|
|
|
52
54
|
|
|
53
55
|
|
|
54
56
|
|
|
55
57
|
|
|
56
|
-
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
var _chunkBHAHJHAIcjs = require('./chunk-BHAHJHAI.cjs');
|
|
57
64
|
|
|
58
65
|
|
|
59
66
|
|
|
@@ -90,7 +97,7 @@ function useControllableState({
|
|
|
90
97
|
function useControlWarning(isControlled) {
|
|
91
98
|
const wasControlled = _react.useRef.call(void 0, isControlled);
|
|
92
99
|
if (wasControlled.current !== isControlled) {
|
|
93
|
-
|
|
100
|
+
_chunkODH5WAVMcjs.warnDev.call(void 0,
|
|
94
101
|
`a component switched from ${wasControlled.current ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}. Decide for the life of the component: pass \`value\` always, or never. Passing \`undefined\` for a value you do control reads as "uncontrolled" here.`
|
|
95
102
|
);
|
|
96
103
|
wasControlled.current = isControlled;
|
|
@@ -100,7 +107,7 @@ function useControlWarning(isControlled) {
|
|
|
100
107
|
// src/hooks/use-merged-ref.ts
|
|
101
108
|
|
|
102
109
|
function useMergedRef(...refs) {
|
|
103
|
-
return _react.useMemo.call(void 0, () =>
|
|
110
|
+
return _react.useMemo.call(void 0, () => _chunk5SU7FXWHcjs.mergeRefs.call(void 0, ...refs), refs);
|
|
104
111
|
}
|
|
105
112
|
|
|
106
113
|
// src/hooks/use-previous.ts
|
|
@@ -168,4 +175,7 @@ function usePrevious(value) {
|
|
|
168
175
|
|
|
169
176
|
|
|
170
177
|
|
|
171
|
-
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
exports.Button = _chunkODH5WAVMcjs.Button; exports.FEEDBACK_OVERLAY = _chunkP5MKOLIWcjs.FEEDBACK_OVERLAY; exports.HIGHLIGHT_DURATION = _chunkP5MKOLIWcjs.HIGHLIGHT_DURATION; exports.HIGHLIGHT_OPACITY = _chunkP5MKOLIWcjs.HIGHLIGHT_OPACITY; exports.Icon = _chunkP5MKOLIWcjs.Icon; exports.IconContext = _chunkP5MKOLIWcjs.IconContext; exports.PRESS_DURATION = _chunkP5MKOLIWcjs.PRESS_DURATION; exports.PRESS_SCALE = _chunkP5MKOLIWcjs.PRESS_SCALE; exports.Portal = _chunkM2VYRHVScjs.Portal; exports.PortalContext = _chunkM2VYRHVScjs.PortalContext; exports.PortalHost = _chunkM2VYRHVScjs.PortalHost; exports.PressableFeedback = _chunkP5MKOLIWcjs.PressableFeedback; exports.RIPPLE_CONFIRM_DURATION = _chunkP5MKOLIWcjs.RIPPLE_CONFIRM_DURATION; exports.RIPPLE_EXPAND_DURATION = _chunkP5MKOLIWcjs.RIPPLE_EXPAND_DURATION; exports.RIPPLE_FADE_IN = _chunkP5MKOLIWcjs.RIPPLE_FADE_IN; exports.RIPPLE_FADE_OUT = _chunkP5MKOLIWcjs.RIPPLE_FADE_OUT; exports.RIPPLE_FADE_OUT_DELAY = _chunkP5MKOLIWcjs.RIPPLE_FADE_OUT_DELAY; exports.RIPPLE_OPACITY = _chunkP5MKOLIWcjs.RIPPLE_OPACITY; exports.RIPPLE_START_SCALE = _chunkP5MKOLIWcjs.RIPPLE_START_SCALE; exports.SCALE_REFERENCE_WIDTH = _chunkP5MKOLIWcjs.SCALE_REFERENCE_WIDTH; exports.Slot = _chunk5SU7FXWHcjs.Slot; exports.TextSpan = _chunk6VTBGBPPcjs.TextSpan; exports.ThemeContext = _chunk6N5JXRUZcjs.ThemeContext; exports.Typography = _chunk6VTBGBPPcjs.Typography; exports.XAUIProvider = _chunkBHAHJHAIcjs.XAUIProvider; exports.buildRadius = _chunkBHAHJHAIcjs.buildRadius; exports.buildShadows = _chunkBHAHJHAIcjs.buildShadows; exports.buttonRecipe = _chunkODH5WAVMcjs.buttonRecipe; exports.childrenToString = _chunk5SU7FXWHcjs.childrenToString; exports.createRecipe = _chunk5SU7FXWHcjs.createRecipe; exports.createSlotContext = _chunk5SU7FXWHcjs.createSlotContext; exports.createTheme = _chunkBHAHJHAIcjs.createTheme; exports.defaultTheme = _chunkBHAHJHAIcjs.defaultTheme; exports.deriveColors = _chunkBHAHJHAIcjs.deriveColors; exports.deriveTint = _chunk6N5JXRUZcjs.deriveTint; exports.markOverlay = _chunkP5MKOLIWcjs.markOverlay; exports.mergeProps = _chunk5SU7FXWHcjs.mergeProps; exports.mergeRefs = _chunk5SU7FXWHcjs.mergeRefs; exports.palette = _chunkBHAHJHAIcjs.palette; exports.pressScaleFor = _chunkP5MKOLIWcjs.pressScaleFor; exports.primitives = _chunkBHAHJHAIcjs.primitives; exports.resolveAnimation = _chunkP5MKOLIWcjs.resolveAnimation; exports.resolveSlotAnimation = _chunkP5MKOLIWcjs.resolveSlotAnimation; exports.rippleRadiusFor = _chunkP5MKOLIWcjs.rippleRadiusFor; exports.sourceKeys = _chunkBHAHJHAIcjs.sourceKeys; exports.tokens = _chunkBHAHJHAIcjs.tokens; exports.typographyRecipe = _chunk6VTBGBPPcjs.typographyRecipe; exports.useButton = _chunkODH5WAVMcjs.useButton; exports.useColorMode = _chunk6N5JXRUZcjs.useColorMode; exports.useControllableState = useControllableState; exports.useFeedback = _chunkP5MKOLIWcjs.useFeedback; exports.useIconContext = _chunkP5MKOLIWcjs.useIconContext; exports.useMergedRef = useMergedRef; exports.usePressState = _chunkODH5WAVMcjs.usePressState; exports.usePrevious = usePrevious; exports.useStyleProps = _chunk5SU7FXWHcjs.useStyleProps; exports.useThemeColor = _chunk6N5JXRUZcjs.useThemeColor; exports.useXAUITheme = _chunk6N5JXRUZcjs.useXAUITheme;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export { Button, ButtonContextValue, ButtonIconProps, ButtonLabelProps, ButtonProps, ButtonSize, ButtonSlot, ButtonSpinnerProps, ButtonVariant, buttonRecipe, useButton } from './components/button/index.cjs';
|
|
2
|
+
export { TextSpan, TextSpanProps, Typography, TypographyProps, TypographySlot, TypographyVariant, typographyRecipe } from './components/typography/index.cjs';
|
|
2
3
|
import { RefCallback } from 'react';
|
|
3
4
|
import { PossibleRef } from './system/index.cjs';
|
|
4
5
|
export { AsChildProps, FEEDBACK_OVERLAY, HIGHLIGHT_DURATION, HIGHLIGHT_OPACITY, Icon, IconContext, MergeableProps, PRESS_DURATION, PRESS_SCALE, Portal, PortalContext, PortalHost, PortalHostProps, PortalMethods, PortalProps, PressableFeedback, PressableFeedbackHighlightProps, PressableFeedbackRippleProps, RIPPLE_CONFIRM_DURATION, RIPPLE_EXPAND_DURATION, RIPPLE_FADE_IN, RIPPLE_FADE_OUT, RIPPLE_FADE_OUT_DELAY, RIPPLE_OPACITY, RIPPLE_START_SCALE, SCALE_REFERENCE_WIDTH, Slot, SlotProps, childrenToString, createSlotContext, markOverlay, mergeProps, mergeRefs, pressScaleFor, resolveAnimation, resolveSlotAnimation, rippleRadiusFor, useFeedback, useIconContext, useStyleProps } from './system/index.cjs';
|
|
5
6
|
import { GestureResponderEvent } from 'react-native';
|
|
6
|
-
export { A as AnimationConfig, c as AnimationProp,
|
|
7
|
+
export { A as AnimationConfig, c as AnimationProp, F as FeedbackContext, I as IconComponentProps, a as IconContextValue, b as IconProps, P as PressableFeedbackProps, R as RadiusStyle, d as ResolvedAnimation, e as RippleWave, S as SlotAnimation } from './pressable-feedback.type-lgW5wQx5.cjs';
|
|
8
|
+
export { A as Axes, C as CompoundVariant, D as DirectionalStyleKey, I as ImageStyleProps, R as Recipe, b as RecipeConfig, a as ResolveArgs, d as ResolvedSelection, e as ResolvedStyles, S as Selection, f as SlotStyle, g as SlotStyles, h as StateName, i as States, j as StyleFn, n as StyleProps, o as TextStyleProps, T as TintArgs, k as VariantColors, l as VariantRole, m as VariantTokens, V as ViewStyleProps, c as createRecipe } from './create-recipe-3_ElpCYt.cjs';
|
|
7
9
|
export { ColorModePreference, PaletteFamily, PaletteShade, ThemeContext, XAUIProvider, XAUIProviderProps, XAUITint, buildRadius, buildShadows, createTheme, defaultTheme, deriveColors, deriveTint, palette, primitives, sourceKeys, tokens, useColorMode, useThemeColor, useXAUITheme } from './theme/index.cjs';
|
|
8
|
-
export { C as ColorMode, F as FontSizeKey,
|
|
10
|
+
export { C as ColorMode, F as FontSizeKey, b as FontWeightKey, R as RadiusKey, S as Size, a as XAUIColors, c as XAUIDerivedColors, d as XAUIPrimitiveColors, e as XAUIRadius, f as XAUIShadow, g as XAUISourceColors, X as XAUITheme, h as XAUIThemeConfig, i as XAUIThemeSet } from './theme.type-C2gNHpEx.cjs';
|
|
9
11
|
import 'react-native-reanimated';
|
|
10
12
|
|
|
11
13
|
type ControllableStateOptions<T> = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export { Button, ButtonContextValue, ButtonIconProps, ButtonLabelProps, ButtonProps, ButtonSize, ButtonSlot, ButtonSpinnerProps, ButtonVariant, buttonRecipe, useButton } from './components/button/index.js';
|
|
2
|
+
export { TextSpan, TextSpanProps, Typography, TypographyProps, TypographySlot, TypographyVariant, typographyRecipe } from './components/typography/index.js';
|
|
2
3
|
import { RefCallback } from 'react';
|
|
3
4
|
import { PossibleRef } from './system/index.js';
|
|
4
5
|
export { AsChildProps, FEEDBACK_OVERLAY, HIGHLIGHT_DURATION, HIGHLIGHT_OPACITY, Icon, IconContext, MergeableProps, PRESS_DURATION, PRESS_SCALE, Portal, PortalContext, PortalHost, PortalHostProps, PortalMethods, PortalProps, PressableFeedback, PressableFeedbackHighlightProps, PressableFeedbackRippleProps, RIPPLE_CONFIRM_DURATION, RIPPLE_EXPAND_DURATION, RIPPLE_FADE_IN, RIPPLE_FADE_OUT, RIPPLE_FADE_OUT_DELAY, RIPPLE_OPACITY, RIPPLE_START_SCALE, SCALE_REFERENCE_WIDTH, Slot, SlotProps, childrenToString, createSlotContext, markOverlay, mergeProps, mergeRefs, pressScaleFor, resolveAnimation, resolveSlotAnimation, rippleRadiusFor, useFeedback, useIconContext, useStyleProps } from './system/index.js';
|
|
5
6
|
import { GestureResponderEvent } from 'react-native';
|
|
6
|
-
export { A as AnimationConfig, c as AnimationProp,
|
|
7
|
+
export { A as AnimationConfig, c as AnimationProp, F as FeedbackContext, I as IconComponentProps, a as IconContextValue, b as IconProps, P as PressableFeedbackProps, R as RadiusStyle, d as ResolvedAnimation, e as RippleWave, S as SlotAnimation } from './pressable-feedback.type-UwqIG6ES.js';
|
|
8
|
+
export { A as Axes, C as CompoundVariant, D as DirectionalStyleKey, I as ImageStyleProps, R as Recipe, b as RecipeConfig, a as ResolveArgs, d as ResolvedSelection, e as ResolvedStyles, S as Selection, f as SlotStyle, g as SlotStyles, h as StateName, i as States, j as StyleFn, n as StyleProps, o as TextStyleProps, T as TintArgs, k as VariantColors, l as VariantRole, m as VariantTokens, V as ViewStyleProps, c as createRecipe } from './create-recipe-DImq1AZA.js';
|
|
7
9
|
export { ColorModePreference, PaletteFamily, PaletteShade, ThemeContext, XAUIProvider, XAUIProviderProps, XAUITint, buildRadius, buildShadows, createTheme, defaultTheme, deriveColors, deriveTint, palette, primitives, sourceKeys, tokens, useColorMode, useThemeColor, useXAUITheme } from './theme/index.js';
|
|
8
|
-
export { C as ColorMode, F as FontSizeKey,
|
|
10
|
+
export { C as ColorMode, F as FontSizeKey, b as FontWeightKey, R as RadiusKey, S as Size, a as XAUIColors, c as XAUIDerivedColors, d as XAUIPrimitiveColors, e as XAUIRadius, f as XAUIShadow, g as XAUISourceColors, X as XAUITheme, h as XAUIThemeConfig, i as XAUIThemeSet } from './theme.type-C2gNHpEx.js';
|
|
9
11
|
import 'react-native-reanimated';
|
|
10
12
|
|
|
11
13
|
type ControllableStateOptions<T> = {
|
package/dist/index.js
CHANGED
|
@@ -4,12 +4,17 @@ import {
|
|
|
4
4
|
useButton,
|
|
5
5
|
usePressState,
|
|
6
6
|
warnDev
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MBLPPOSO.js";
|
|
8
|
+
import {
|
|
9
|
+
TextSpan,
|
|
10
|
+
Typography,
|
|
11
|
+
typographyRecipe
|
|
12
|
+
} from "./chunk-6PZF4PI7.js";
|
|
8
13
|
import {
|
|
9
14
|
Portal,
|
|
10
15
|
PortalContext,
|
|
11
16
|
PortalHost
|
|
12
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-L3AQNVRN.js";
|
|
13
18
|
import {
|
|
14
19
|
FEEDBACK_OVERLAY,
|
|
15
20
|
HIGHLIGHT_DURATION,
|
|
@@ -27,21 +32,23 @@ import {
|
|
|
27
32
|
RIPPLE_OPACITY,
|
|
28
33
|
RIPPLE_START_SCALE,
|
|
29
34
|
SCALE_REFERENCE_WIDTH,
|
|
30
|
-
Slot,
|
|
31
|
-
childrenToString,
|
|
32
|
-
createRecipe,
|
|
33
|
-
createSlotContext,
|
|
34
35
|
markOverlay,
|
|
35
|
-
mergeProps,
|
|
36
|
-
mergeRefs,
|
|
37
36
|
pressScaleFor,
|
|
38
37
|
resolveAnimation,
|
|
39
38
|
resolveSlotAnimation,
|
|
40
39
|
rippleRadiusFor,
|
|
41
40
|
useFeedback,
|
|
42
|
-
useIconContext
|
|
41
|
+
useIconContext
|
|
42
|
+
} from "./chunk-VQPP6FCB.js";
|
|
43
|
+
import {
|
|
44
|
+
Slot,
|
|
45
|
+
childrenToString,
|
|
46
|
+
createRecipe,
|
|
47
|
+
createSlotContext,
|
|
48
|
+
mergeProps,
|
|
49
|
+
mergeRefs,
|
|
43
50
|
useStyleProps
|
|
44
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-4K3LZS7M.js";
|
|
45
52
|
import {
|
|
46
53
|
XAUIProvider,
|
|
47
54
|
buildRadius,
|
|
@@ -53,7 +60,7 @@ import {
|
|
|
53
60
|
primitives,
|
|
54
61
|
sourceKeys,
|
|
55
62
|
tokens
|
|
56
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-XQE5PXOD.js";
|
|
57
64
|
import {
|
|
58
65
|
ThemeContext,
|
|
59
66
|
deriveTint,
|
|
@@ -134,7 +141,9 @@ export {
|
|
|
134
141
|
RIPPLE_START_SCALE,
|
|
135
142
|
SCALE_REFERENCE_WIDTH,
|
|
136
143
|
Slot,
|
|
144
|
+
TextSpan,
|
|
137
145
|
ThemeContext,
|
|
146
|
+
Typography,
|
|
138
147
|
XAUIProvider,
|
|
139
148
|
buildRadius,
|
|
140
149
|
buildShadows,
|
|
@@ -157,6 +166,7 @@ export {
|
|
|
157
166
|
rippleRadiusFor,
|
|
158
167
|
sourceKeys,
|
|
159
168
|
tokens,
|
|
169
|
+
typographyRecipe,
|
|
160
170
|
useButton,
|
|
161
171
|
useColorMode,
|
|
162
172
|
useControllableState,
|