@factorialco/f0-react-native 0.27.0 → 0.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -32
- package/lib/module/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.js +2 -0
- package/lib/module/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.js.map +1 -0
- package/lib/module/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.md +159 -0
- package/lib/module/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.types.js +2 -0
- package/lib/module/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.types.js.map +1 -0
- package/lib/module/components/primitives/F0Text/AnimatedF0Text/index.js +2 -0
- package/lib/module/components/primitives/F0Text/AnimatedF0Text/index.js.map +1 -0
- package/lib/module/components/primitives/F0Text/F0Text/F0Text.js +2 -0
- package/lib/module/components/primitives/F0Text/F0Text/F0Text.js.map +1 -0
- package/{src/components/primitives → lib/module/components/primitives/F0Text}/F0Text/F0Text.md +86 -18
- package/lib/module/components/primitives/F0Text/F0Text/F0Text.styles.js +2 -0
- package/lib/module/components/primitives/F0Text/F0Text/F0Text.styles.js.map +1 -0
- package/lib/module/components/primitives/F0Text/F0Text/F0Text.types.js +2 -0
- package/lib/module/components/primitives/F0Text/F0Text/F0Text.types.js.map +1 -0
- package/lib/module/components/primitives/F0Text/F0Text/index.js +2 -0
- package/lib/module/components/primitives/F0Text/F0Text/index.js.map +1 -0
- package/lib/module/components/primitives/F0Text/index.js +1 -1
- package/lib/module/components/primitives/F0Text/index.js.map +1 -1
- package/lib/module/styles/theme.css +7 -0
- package/lib/typescript/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.d.ts +5 -0
- package/lib/typescript/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.d.ts.map +1 -0
- package/lib/typescript/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.types.d.ts +45 -0
- package/lib/typescript/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.types.d.ts.map +1 -0
- package/lib/typescript/components/primitives/F0Text/AnimatedF0Text/index.d.ts +8 -0
- package/lib/typescript/components/primitives/F0Text/AnimatedF0Text/index.d.ts.map +1 -0
- package/lib/typescript/components/primitives/F0Text/F0Text/F0Text.d.ts.map +1 -0
- package/lib/typescript/components/primitives/F0Text/{F0Text.styles.d.ts → F0Text/F0Text.styles.d.ts} +6 -2
- package/lib/typescript/components/primitives/F0Text/F0Text/F0Text.styles.d.ts.map +1 -0
- package/lib/typescript/components/primitives/F0Text/{F0Text.types.d.ts → F0Text/F0Text.types.d.ts} +1 -1
- package/lib/typescript/components/primitives/F0Text/F0Text/F0Text.types.d.ts.map +1 -0
- package/lib/typescript/components/primitives/F0Text/F0Text/index.d.ts +9 -0
- package/lib/typescript/components/primitives/F0Text/F0Text/index.d.ts.map +1 -0
- package/lib/typescript/components/primitives/F0Text/index.d.ts +5 -2
- package/lib/typescript/components/primitives/F0Text/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.md +159 -0
- package/src/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.tsx +72 -0
- package/src/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.types.ts +61 -0
- package/src/components/primitives/F0Text/AnimatedF0Text/__tests__/AnimatedF0Text.spec.tsx +131 -0
- package/src/components/primitives/F0Text/AnimatedF0Text/__tests__/__snapshots__/AnimatedF0Text.spec.tsx.snap +144 -0
- package/src/components/primitives/F0Text/AnimatedF0Text/index.ts +8 -0
- package/{lib/module/components/primitives → src/components/primitives/F0Text}/F0Text/F0Text.md +86 -18
- package/src/components/primitives/F0Text/{F0Text.styles.ts → F0Text/F0Text.styles.ts} +5 -2
- package/src/components/primitives/F0Text/{F0Text.tsx → F0Text/F0Text.tsx} +1 -1
- package/src/components/primitives/F0Text/{F0Text.types.ts → F0Text/F0Text.types.ts} +1 -0
- package/src/components/primitives/F0Text/{__tests__/index.spec.tsx → F0Text/__tests__/F0Text.spec.tsx} +1 -0
- package/src/components/primitives/F0Text/{__tests__/__snapshots__/index.spec.tsx.snap → F0Text/__tests__/__snapshots__/F0Text.spec.tsx.snap} +9 -0
- package/src/components/primitives/F0Text/F0Text/index.ts +22 -0
- package/src/components/primitives/F0Text/index.ts +6 -2
- package/src/styles/theme.css +7 -0
- package/lib/module/components/primitives/F0Text/F0Text.js +0 -2
- package/lib/module/components/primitives/F0Text/F0Text.js.map +0 -1
- package/lib/module/components/primitives/F0Text/F0Text.styles.js +0 -2
- package/lib/module/components/primitives/F0Text/F0Text.styles.js.map +0 -1
- package/lib/module/components/primitives/F0Text/F0Text.types.js +0 -2
- package/lib/module/components/primitives/F0Text/F0Text.types.js.map +0 -1
- package/lib/typescript/components/primitives/F0Text/F0Text.d.ts.map +0 -1
- package/lib/typescript/components/primitives/F0Text/F0Text.styles.d.ts.map +0 -1
- package/lib/typescript/components/primitives/F0Text/F0Text.types.d.ts.map +0 -1
- /package/lib/typescript/components/primitives/F0Text/{F0Text.d.ts → F0Text/F0Text.d.ts} +0 -0
package/{lib/module/components/primitives → src/components/primitives/F0Text}/F0Text/F0Text.md
RENAMED
|
@@ -20,6 +20,7 @@ import { F0Text } from "@factorialco/f0-react-native"
|
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
|
+
<!-- prettier-ignore -->
|
|
23
24
|
```tsx
|
|
24
25
|
<>
|
|
25
26
|
<F0Text variant="heading-lg">Welcome</F0Text>
|
|
@@ -60,6 +61,7 @@ All variants use **Inter** font family with the weight included in the variant n
|
|
|
60
61
|
|
|
61
62
|
| Variant | Size | Line Height | Weight | Letter Spacing |
|
|
62
63
|
| ------------ | ---- | ----------- | -------------- | -------------- |
|
|
64
|
+
| `heading-xl` | 36px | 40px | Semibold (600) | -0.2px |
|
|
63
65
|
| `heading-lg` | 24px | 32px | Semibold (600) | -0.2px |
|
|
64
66
|
| `heading-md` | 20px | 28px | Semibold (600) | -0.2px |
|
|
65
67
|
| `heading-sm` | 16px | 24px | Semibold (600) | - |
|
|
@@ -97,9 +99,11 @@ All variants use **Inter** font family with the weight included in the variant n
|
|
|
97
99
|
|
|
98
100
|
### Typography Variants
|
|
99
101
|
|
|
102
|
+
<!-- prettier-ignore -->
|
|
100
103
|
```tsx
|
|
101
104
|
<>
|
|
102
105
|
{/* Headings */}
|
|
106
|
+
<F0Text variant="heading-xl">Extra Large Heading</F0Text>
|
|
103
107
|
<F0Text variant="heading-lg">Large Heading</F0Text>
|
|
104
108
|
<F0Text variant="heading-md">Medium Heading</F0Text>
|
|
105
109
|
<F0Text variant="heading-sm">Small Heading</F0Text>
|
|
@@ -117,6 +121,7 @@ All variants use **Inter** font family with the weight included in the variant n
|
|
|
117
121
|
|
|
118
122
|
### Colors
|
|
119
123
|
|
|
124
|
+
<!-- prettier-ignore -->
|
|
120
125
|
```tsx
|
|
121
126
|
<>
|
|
122
127
|
<F0Text variant="body-sm-default" color="default">
|
|
@@ -139,6 +144,7 @@ All variants use **Inter** font family with the weight included in the variant n
|
|
|
139
144
|
|
|
140
145
|
### Text Decorations & Transforms
|
|
141
146
|
|
|
147
|
+
<!-- prettier-ignore -->
|
|
142
148
|
```tsx
|
|
143
149
|
<>
|
|
144
150
|
<F0Text variant="body-sm-default" decoration="underline">
|
|
@@ -158,6 +164,7 @@ All variants use **Inter** font family with the weight included in the variant n
|
|
|
158
164
|
|
|
159
165
|
### Truncation
|
|
160
166
|
|
|
167
|
+
<!-- prettier-ignore -->
|
|
161
168
|
```tsx
|
|
162
169
|
<>
|
|
163
170
|
<F0Text variant="body-sm-default" numberOfLines={1}>
|
|
@@ -175,6 +182,7 @@ All variants use **Inter** font family with the weight included in the variant n
|
|
|
175
182
|
|
|
176
183
|
F0Text doesn't accept `className` to prevent typography override. Use a View wrapper for spacing:
|
|
177
184
|
|
|
185
|
+
<!-- prettier-ignore -->
|
|
178
186
|
```tsx
|
|
179
187
|
<>
|
|
180
188
|
{/* Spacing with View wrapper */}
|
|
@@ -197,6 +205,7 @@ F0Text doesn't accept `className` to prevent typography override. Use a View wra
|
|
|
197
205
|
|
|
198
206
|
### Combined Props
|
|
199
207
|
|
|
208
|
+
<!-- prettier-ignore -->
|
|
200
209
|
```tsx
|
|
201
210
|
<F0Text
|
|
202
211
|
variant="heading-md"
|
|
@@ -211,6 +220,7 @@ F0Text doesn't accept `className` to prevent typography override. Use a View wra
|
|
|
211
220
|
|
|
212
221
|
### Nested Text
|
|
213
222
|
|
|
223
|
+
<!-- prettier-ignore -->
|
|
214
224
|
```tsx
|
|
215
225
|
<F0Text variant="body-sm-default">
|
|
216
226
|
This is regular text with{" "}
|
|
@@ -223,6 +233,7 @@ F0Text doesn't accept `className` to prevent typography override. Use a View wra
|
|
|
223
233
|
|
|
224
234
|
### Real-world Card Example
|
|
225
235
|
|
|
236
|
+
<!-- prettier-ignore -->
|
|
226
237
|
```tsx
|
|
227
238
|
<View className="rounded-lg bg-f0-background-secondary p-4">
|
|
228
239
|
<View className="mb-2">
|
|
@@ -243,27 +254,82 @@ F0Text doesn't accept `className` to prevent typography override. Use a View wra
|
|
|
243
254
|
## Architecture
|
|
244
255
|
|
|
245
256
|
```
|
|
246
|
-
F0Text/
|
|
247
|
-
├── F0Text
|
|
248
|
-
├── F0Text.
|
|
249
|
-
├── F0Text.
|
|
250
|
-
├── F0Text.
|
|
251
|
-
├──
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
257
|
+
F0Text/ # Parent folder for text primitives
|
|
258
|
+
├── F0Text/ # Static text component
|
|
259
|
+
│ ├── F0Text.tsx # Main component
|
|
260
|
+
│ ├── F0Text.md # Documentation
|
|
261
|
+
│ ├── F0Text.types.ts # TypeScript types
|
|
262
|
+
│ ├── F0Text.styles.ts # Tailwind variants config
|
|
263
|
+
│ ├── index.ts # Public exports
|
|
264
|
+
│ └── __tests__/
|
|
265
|
+
│ ├── F0Text.spec.tsx
|
|
266
|
+
│ └── __snapshots__/
|
|
267
|
+
├── AnimatedF0Text/ # Animated text component
|
|
268
|
+
│ ├── AnimatedF0Text.tsx
|
|
269
|
+
│ ├── AnimatedF0Text.md
|
|
270
|
+
│ ├── AnimatedF0Text.types.ts
|
|
271
|
+
│ ├── index.ts
|
|
272
|
+
│ └── __tests__/
|
|
273
|
+
│ ├── AnimatedF0Text.spec.tsx
|
|
274
|
+
│ └── __snapshots__/
|
|
275
|
+
└── index.ts # Barrel re-exporting both
|
|
255
276
|
```
|
|
256
277
|
|
|
257
278
|
### Font Family
|
|
258
279
|
|
|
259
|
-
F0Text uses **Inter** font family through Tailwind/Uniwind font
|
|
280
|
+
F0Text uses the **Inter** font family through Tailwind/Uniwind `font-*` utility classes,
|
|
281
|
+
which map to `--font-*` CSS variables defined in the app's `@theme`:
|
|
282
|
+
|
|
283
|
+
| Tailwind Class | CSS Variable | Font Name | Font Weight |
|
|
284
|
+
| --------------- | ----------------- | -------------- | ----------- |
|
|
285
|
+
| `font-normal` | `--font-normal` | Inter-Regular | 400 |
|
|
286
|
+
| `font-medium` | `--font-medium` | Inter-Medium | 500 |
|
|
287
|
+
| `font-semibold` | `--font-semibold` | Inter-SemiBold | 600 |
|
|
288
|
+
| `font-bold` | `--font-bold` | Inter-Bold | 700 |
|
|
289
|
+
|
|
290
|
+
#### Host App Font Setup
|
|
291
|
+
|
|
292
|
+
The consuming app must embed the Inter `.ttf` files and wire them up for both
|
|
293
|
+
iOS and Android. See the [README "Add Inter Fonts"](../../../../../README.md#5️⃣-add-inter-fonts-host-app) section for the full
|
|
294
|
+
step-by-step guide. The short version:
|
|
295
|
+
|
|
296
|
+
1. **Name font files to match their PostScript name** (e.g. `Inter-Regular.ttf`
|
|
297
|
+
for PostScript name `Inter-Regular`). iOS resolves fonts by PostScript name,
|
|
298
|
+
Android by asset file name — matching them avoids platform-specific overrides.
|
|
299
|
+
|
|
300
|
+
2. **Register via `expo-font`** config plugin in `app.json`:
|
|
301
|
+
|
|
302
|
+
```json
|
|
303
|
+
[
|
|
304
|
+
"expo-font",
|
|
305
|
+
{
|
|
306
|
+
"fonts": [
|
|
307
|
+
"./assets/fonts/Inter/Inter-Regular.ttf",
|
|
308
|
+
"./assets/fonts/Inter/Inter-Medium.ttf",
|
|
309
|
+
"./assets/fonts/Inter/Inter-SemiBold.ttf",
|
|
310
|
+
"./assets/fonts/Inter/Inter-Bold.ttf"
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
]
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
3. **Define `@theme` variables** in `global.css`:
|
|
317
|
+
|
|
318
|
+
```css
|
|
319
|
+
@theme {
|
|
320
|
+
--font-normal: "Inter-Regular";
|
|
321
|
+
--font-medium: "Inter-Medium";
|
|
322
|
+
--font-semibold: "Inter-SemiBold";
|
|
323
|
+
--font-bold: "Inter-Bold";
|
|
324
|
+
}
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
The `@theme` values must match the file names (without `.ttf`). Uniwind maps
|
|
328
|
+
`font-normal`, `font-medium`, `font-semibold`, and `font-bold` utility classes
|
|
329
|
+
to these variables.
|
|
260
330
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
| `font-normal` | Inter-Regular | 400 |
|
|
264
|
-
| `font-medium` | Inter-Medium | 500 |
|
|
265
|
-
| `font-semibold` | Inter-SemiBold | 600 |
|
|
266
|
-
| `font-bold` | Inter-Bold | 700 |
|
|
331
|
+
> **Rebuild required:** Font changes are picked up at native build time.
|
|
332
|
+
> Run `npx expo prebuild --clean` after adding or renaming font files.
|
|
267
333
|
|
|
268
334
|
## Accessibility
|
|
269
335
|
|
|
@@ -279,6 +345,7 @@ F0Text uses **Inter** font family through Tailwind/Uniwind font weight classes:
|
|
|
279
345
|
|
|
280
346
|
### Best Practices
|
|
281
347
|
|
|
348
|
+
<!-- prettier-ignore -->
|
|
282
349
|
```tsx
|
|
283
350
|
// ✅ Good: Use appropriate variant
|
|
284
351
|
<F0Text variant="body-md-semibold">Bold text</F0Text>
|
|
@@ -287,11 +354,12 @@ F0Text uses **Inter** font family through Tailwind/Uniwind font weight classes:
|
|
|
287
354
|
// <F0Text className="font-bold">Text</F0Text>
|
|
288
355
|
```
|
|
289
356
|
|
|
357
|
+
<!-- prettier-ignore -->
|
|
290
358
|
```tsx
|
|
291
359
|
// ✅ Good: Memoized handler
|
|
292
360
|
const handlePress = useCallback(() => {}, [])
|
|
293
|
-
|
|
361
|
+
<F0Text onPress={handlePress}>Click</F0Text>
|
|
294
362
|
|
|
295
363
|
// ❌ Bad: Inline function
|
|
296
|
-
|
|
364
|
+
<F0Text onPress={() => {}}>Click</F0Text>
|
|
297
365
|
```
|
|
@@ -2,14 +2,17 @@ import { tv, type VariantProps } from "tailwind-variants"
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Text component variants using tailwind-variants
|
|
5
|
-
* Font weights (font-normal, font-medium, font-semibold) map to
|
|
6
|
-
* Inter font families (Inter-Regular, Inter-Medium, Inter-SemiBold)
|
|
5
|
+
* Font weights (font-normal, font-medium, font-semibold, font-bold) map to
|
|
6
|
+
* Inter font families (Inter-Regular, Inter-Medium, Inter-SemiBold, Inter-Bold)
|
|
7
|
+
* via --font-* CSS variables defined in @theme.
|
|
7
8
|
*/
|
|
8
9
|
export const textVariants = tv({
|
|
9
10
|
base: "",
|
|
10
11
|
variants: {
|
|
11
12
|
variant: {
|
|
12
13
|
// Heading variants
|
|
14
|
+
"heading-xl":
|
|
15
|
+
"text-[36px] leading-[40px] tracking-[-0.2px] font-semibold",
|
|
13
16
|
"heading-lg":
|
|
14
17
|
"text-[24px] leading-[32px] tracking-[-0.2px] font-semibold",
|
|
15
18
|
"heading-md":
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Text as RNText } from "react-native"
|
|
3
3
|
|
|
4
|
-
import { omitProps } from "
|
|
4
|
+
import { omitProps } from "../../../../lib/utils"
|
|
5
5
|
|
|
6
6
|
import { textVariants } from "./F0Text.styles"
|
|
7
7
|
import { F0_TEXT_BANNED_PROPS, type F0TextProps } from "./F0Text.types"
|
|
@@ -198,6 +198,15 @@ exports[`F0Text Snapshots renders all typography variants: variant-heading-sm 1`
|
|
|
198
198
|
</Text>
|
|
199
199
|
`;
|
|
200
200
|
|
|
201
|
+
exports[`F0Text Snapshots renders all typography variants: variant-heading-xl 1`] = `
|
|
202
|
+
<Text
|
|
203
|
+
className="text-[36px] leading-[40px] tracking-[-0.2px] font-semibold text-f0-foreground text-left"
|
|
204
|
+
>
|
|
205
|
+
heading-xl
|
|
206
|
+
text
|
|
207
|
+
</Text>
|
|
208
|
+
`;
|
|
209
|
+
|
|
201
210
|
exports[`F0Text Snapshots renders with alignment options: align-center 1`] = `
|
|
202
211
|
<Text
|
|
203
212
|
className="text-[14px] leading-[20px] font-normal text-f0-foreground text-center"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* F0Text - Text primitive component
|
|
3
|
+
*
|
|
4
|
+
* @see F0Text.md for documentation
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export { F0Text } from "./F0Text"
|
|
8
|
+
export type {
|
|
9
|
+
F0TextProps,
|
|
10
|
+
TypographyVariant,
|
|
11
|
+
TextColor,
|
|
12
|
+
TextAlign,
|
|
13
|
+
TextDecoration,
|
|
14
|
+
TextTransform,
|
|
15
|
+
} from "./F0Text"
|
|
16
|
+
export {
|
|
17
|
+
TYPOGRAPHY_VARIANTS,
|
|
18
|
+
TEXT_COLORS,
|
|
19
|
+
TEXT_ALIGN,
|
|
20
|
+
TEXT_DECORATIONS,
|
|
21
|
+
TEXT_TRANSFORMS,
|
|
22
|
+
} from "./F0Text"
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* F0Text - Text primitive
|
|
2
|
+
* F0Text - Text primitive components
|
|
3
3
|
*
|
|
4
|
-
* @see F0Text.md for documentation
|
|
4
|
+
* @see F0Text/F0Text.md for documentation
|
|
5
|
+
* @see AnimatedF0Text/AnimatedF0Text.md for animated variant documentation
|
|
5
6
|
*/
|
|
6
7
|
|
|
7
8
|
export { F0Text } from "./F0Text"
|
|
@@ -20,3 +21,6 @@ export {
|
|
|
20
21
|
TEXT_DECORATIONS,
|
|
21
22
|
TEXT_TRANSFORMS,
|
|
22
23
|
} from "./F0Text"
|
|
24
|
+
|
|
25
|
+
export { AnimatedF0Text } from "./AnimatedF0Text"
|
|
26
|
+
export type { AnimatedF0TextProps } from "./AnimatedF0Text"
|
package/src/styles/theme.css
CHANGED
|
@@ -77,6 +77,13 @@
|
|
|
77
77
|
--tracking-4xl: -0.02em;
|
|
78
78
|
|
|
79
79
|
/* Semantic Typography Tokens - F0Text Variants */
|
|
80
|
+
/* Heading xl */
|
|
81
|
+
--p-text-heading-xl-font-size: 2.25rem; /* 36px */
|
|
82
|
+
--p-text-heading-xl-font-line-height: 2.5rem; /* 40px */
|
|
83
|
+
--p-text-heading-xl-font-letter-spacing: -0.2px;
|
|
84
|
+
--p-text-heading-xl-font-weight: 600;
|
|
85
|
+
--p-text-heading-xl-font-family: Inter;
|
|
86
|
+
|
|
80
87
|
/* Heading lg */
|
|
81
88
|
--p-text-heading-lg-font-size: 1.5rem; /* 24px */
|
|
82
89
|
--p-text-heading-lg-font-line-height: 2rem; /* 32px */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["variant","color","align","decoration","transform","children","numberOfLines"];import React from"react";import{Text as RNText}from"react-native";import{omitProps}from"../../../lib/utils";import{textVariants}from"./F0Text.styles";import{F0_TEXT_BANNED_PROPS}from"./F0Text.types";import{jsx as _jsx}from"react/jsx-runtime";var F0TextComponent=React.forwardRef(function(_ref,ref){var _ref$variant=_ref.variant,variant=_ref$variant===void 0?"body-sm-default":_ref$variant,_ref$color=_ref.color,color=_ref$color===void 0?"default":_ref$color,_ref$align=_ref.align,align=_ref$align===void 0?"left":_ref$align,_ref$decoration=_ref.decoration,decoration=_ref$decoration===void 0?"none":_ref$decoration,_ref$transform=_ref.transform,transform=_ref$transform===void 0?"none":_ref$transform,children=_ref.children,numberOfLines=_ref.numberOfLines,rest=_objectWithoutProperties(_ref,_excluded);var textClassName=React.useMemo(function(){return textVariants({variant:variant,color:color,align:align,decoration:decoration,transform:transform});},[variant,color,align,decoration,transform]);return _jsx(RNText,Object.assign({ref:ref},omitProps(rest,F0_TEXT_BANNED_PROPS),{className:textClassName,numberOfLines:numberOfLines,ellipsizeMode:numberOfLines?"tail":undefined,children:children}));});F0TextComponent.displayName="F0Text";export var F0Text=React.memo(F0TextComponent);export{TYPOGRAPHY_VARIANTS,TEXT_COLORS,TEXT_ALIGN,TEXT_DECORATIONS,TEXT_TRANSFORMS}from"./F0Text.types";
|
|
2
|
-
//# sourceMappingURL=F0Text.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","RNText","omitProps","textVariants","F0_TEXT_BANNED_PROPS","jsx","_jsx","F0TextComponent","forwardRef","_ref","ref","_ref$variant","variant","_ref$color","color","_ref$align","align","_ref$decoration","decoration","_ref$transform","transform","children","numberOfLines","rest","_objectWithoutProperties","_excluded","textClassName","useMemo","Object","assign","className","ellipsizeMode","undefined","displayName","F0Text","memo","TYPOGRAPHY_VARIANTS","TEXT_COLORS","TEXT_ALIGN","TEXT_DECORATIONS","TEXT_TRANSFORMS"],"sourceRoot":"../../../../../src","sources":["components/primitives/F0Text/F0Text.tsx"],"mappings":"mLAAA,MAAO,CAAAA,KAAK,KAAM,OAAO,CACzB,OAASC,IAAI,GAAI,CAAAC,MAAM,KAAQ,cAAc,CAE7C,OAASC,SAAS,KAAQ,oBAAoB,CAE9C,OAASC,YAAY,KAAQ,iBAAiB,CAC9C,OAASC,oBAAoB,KAA0B,gBAAgB,QAAAC,GAAA,IAAAC,IAAA,yBAUvE,GAAM,CAAAC,eAAe,CAAGR,KAAK,CAACS,UAAU,CACtC,SAAAC,IAAA,CAWEC,GAAG,CAC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,QAAQ,CAEtC,MAAO,IAAM,CAAAC,MAAM,CAAGnC,KAAK,CAACoC,IAAI,CAAC5B,eAAe,CAAC,CAIjD,OACE6B,mBAAmB,CACnBC,WAAW,CACXC,UAAU,CACVC,gBAAgB,CAChBC,eAAe,KACV,gBAAgB","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{tv}from"tailwind-variants";export var textVariants=tv({base:"",variants:{variant:{"heading-lg":"text-[24px] leading-[32px] tracking-[-0.2px] font-semibold","heading-md":"text-[20px] leading-[28px] tracking-[-0.2px] font-semibold","heading-sm":"text-[16px] leading-[24px] font-semibold","body-md-default":"text-[16px] leading-[24px] font-normal","body-md-medium":"text-[16px] leading-[24px] font-medium","body-md-semibold":"text-[16px] leading-[24px] font-semibold","body-sm-default":"text-[14px] leading-[20px] font-normal","body-sm-medium":"text-[14px] leading-[20px] font-medium","body-sm-semibold":"text-[14px] leading-[20px] font-semibold","body-xs-medium":"text-[12px] leading-[16px] font-medium"},color:{default:"text-f0-foreground",secondary:"text-f0-foreground-secondary",tertiary:"text-f0-foreground-tertiary",inverse:"text-f0-foreground-inverse","inverse-secondary":"text-f0-foreground-inverse-secondary",disabled:"text-f0-foreground-disabled",accent:"text-f0-foreground-accent",critical:"text-f0-foreground-critical",info:"text-f0-foreground-info",warning:"text-f0-foreground-warning",positive:"text-f0-foreground-positive",selected:"text-f0-foreground-selected"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"},decoration:{none:"",underline:"underline","line-through":"line-through"},transform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"}},defaultVariants:{variant:"body-sm-default",color:"default",align:"left",decoration:"none",transform:"none"}});
|
|
2
|
-
//# sourceMappingURL=F0Text.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["tv","textVariants","base","variants","variant","color","default","secondary","tertiary","inverse","disabled","accent","critical","info","warning","positive","selected","align","left","center","right","justify","decoration","none","underline","transform","uppercase","lowercase","capitalize","defaultVariants"],"sourceRoot":"../../../../../src","sources":["components/primitives/F0Text/F0Text.styles.ts"],"mappings":"AAAA,OAASA,EAAE,KAA2B,mBAAmB,CAOzD,MAAO,IAAM,CAAAC,YAAY,CAAGD,EAAE,CAAC,CAC7BE,IAAI,CAAE,EAAE,CACRC,QAAQ,CAAE,CACRC,OAAO,CAAE,CAEP,YAAY,CACV,4DAA4D,CAC9D,YAAY,CACV,4DAA4D,CAC9D,YAAY,CAAE,0CAA0C,CAGxD,iBAAiB,CAAE,wCAAwC,CAC3D,gBAAgB,CAAE,wCAAwC,CAC1D,kBAAkB,CAAE,0CAA0C,CAC9D,iBAAiB,CAAE,wCAAwC,CAC3D,gBAAgB,CAAE,wCAAwC,CAC1D,kBAAkB,CAAE,0CAA0C,CAC9D,gBAAgB,CAAE,wCACpB,CAAC,CACDC,KAAK,CAAE,CACLC,OAAO,CAAE,oBAAoB,CAC7BC,SAAS,CAAE,8BAA8B,CACzCC,QAAQ,CAAE,6BAA6B,CACvCC,OAAO,CAAE,4BAA4B,CACrC,mBAAmB,CAAE,sCAAsC,CAC3DC,QAAQ,CAAE,6BAA6B,CACvCC,MAAM,CAAE,2BAA2B,CACnCC,QAAQ,CAAE,6BAA6B,CACvCC,IAAI,CAAE,yBAAyB,CAC/BC,OAAO,CAAE,4BAA4B,CACrCC,QAAQ,CAAE,6BAA6B,CACvCC,QAAQ,CAAE,6BACZ,CAAC,CACDC,KAAK,CAAE,CACLC,IAAI,CAAE,WAAW,CACjBC,MAAM,CAAE,aAAa,CACrBC,KAAK,CAAE,YAAY,CACnBC,OAAO,CAAE,cACX,CAAC,CACDC,UAAU,CAAE,CACVC,IAAI,CAAE,EAAE,CACRC,SAAS,CAAE,WAAW,CACtB,cAAc,CAAE,cAClB,CAAC,CACDC,SAAS,CAAE,CACTF,IAAI,CAAE,EAAE,CACRG,SAAS,CAAE,WAAW,CACtBC,SAAS,CAAE,WAAW,CACtBC,UAAU,CAAE,YACd,CACF,CAAC,CACDC,eAAe,CAAE,CACfzB,OAAO,CAAE,iBAAiB,CAC1BC,KAAK,CAAE,SAAS,CAChBY,KAAK,CAAE,MAAM,CACbK,UAAU,CAAE,MAAM,CAClBG,SAAS,CAAE,MACb,CACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export var F0_TEXT_BANNED_PROPS=["style","className"];export var TYPOGRAPHY_VARIANTS=["heading-lg","heading-md","heading-sm","body-md-default","body-md-medium","body-md-semibold","body-sm-default","body-sm-medium","body-sm-semibold","body-xs-medium"];export var TEXT_COLORS=["default","secondary","tertiary","inverse","inverse-secondary","disabled","accent","critical","info","warning","positive","selected"];export var TEXT_ALIGN=["left","center","right","justify"];export var TEXT_DECORATIONS=["none","underline","line-through"];export var TEXT_TRANSFORMS=["none","uppercase","lowercase","capitalize"];
|
|
2
|
-
//# sourceMappingURL=F0Text.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["F0_TEXT_BANNED_PROPS","TYPOGRAPHY_VARIANTS","TEXT_COLORS","TEXT_ALIGN","TEXT_DECORATIONS","TEXT_TRANSFORMS"],"sourceRoot":"../../../../../src","sources":["components/primitives/F0Text/F0Text.types.ts"],"mappings":"AAOA,MAAO,IAAM,CAAAA,oBAAoB,CAAG,CAAC,OAAO,CAAE,WAAW,CAAU,CAKnE,MAAO,IAAM,CAAAC,mBAAmB,CAAG,CACjC,YAAY,CACZ,YAAY,CACZ,YAAY,CACZ,iBAAiB,CACjB,gBAAgB,CAChB,kBAAkB,CAClB,iBAAiB,CACjB,gBAAgB,CAChB,kBAAkB,CAClB,gBAAgB,CACR,CAOV,MAAO,IAAM,CAAAC,WAAW,CAAG,CACzB,SAAS,CACT,WAAW,CACX,UAAU,CACV,SAAS,CACT,mBAAmB,CACnB,UAAU,CACV,QAAQ,CACR,UAAU,CACV,MAAM,CACN,SAAS,CACT,UAAU,CACV,UAAU,CACF,CAOV,MAAO,IAAM,CAAAC,UAAU,CAAG,CAAC,MAAM,CAAE,QAAQ,CAAE,OAAO,CAAE,SAAS,CAAU,CAOzE,MAAO,IAAM,CAAAC,gBAAgB,CAAG,CAAC,MAAM,CAAE,WAAW,CAAE,cAAc,CAAU,CAO9E,MAAO,IAAM,CAAAC,eAAe,CAAG,CAC7B,MAAM,CACN,WAAW,CACX,WAAW,CACX,YAAY,CACJ","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"F0Text.d.ts","sourceRoot":"","sources":["../../../../../src/components/primitives/F0Text/F0Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA;AAK7C,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAoDvE,eAAO,MAAM,MAAM,uGAA8B,CAAA;AAGjD,YAAY,EAAE,WAAW,EAAE,CAAA;AAC3B,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,eAAe,GAChB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EACV,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,cAAc,EACd,aAAa,GACd,MAAM,gBAAgB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"F0Text.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/primitives/F0Text/F0Text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEzD;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CA2DvB,CAAA;AAEF,MAAM,MAAM,Y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