@pickle-ui/react-native 1.0.0-beta.1 → 1.0.0-beta.3
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 +62 -24
- package/dist/components/Badge.js +1 -1
- package/dist/components/Badge.js.map +1 -1
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Button.js +27 -23
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Card.d.ts.map +1 -1
- package/dist/components/Card.js +7 -4
- package/dist/components/Card.js.map +1 -1
- package/dist/components/Flex.d.ts +25 -0
- package/dist/components/Flex.d.ts.map +1 -0
- package/dist/components/Flex.js +24 -0
- package/dist/components/Flex.js.map +1 -0
- package/dist/components/Grid.d.ts +36 -0
- package/dist/components/Grid.d.ts.map +1 -0
- package/dist/components/Grid.js +68 -0
- package/dist/components/Grid.js.map +1 -0
- package/dist/components/Separator.d.ts +11 -0
- package/dist/components/Separator.d.ts.map +1 -0
- package/dist/components/Separator.js +12 -0
- package/dist/components/Separator.js.map +1 -0
- package/dist/components/Spinner.d.ts +14 -0
- package/dist/components/Spinner.d.ts.map +1 -0
- package/dist/components/Spinner.js +41 -0
- package/dist/components/Spinner.js.map +1 -0
- package/dist/components/Text.d.ts.map +1 -1
- package/dist/components/Text.js +5 -4
- package/dist/components/Text.js.map +1 -1
- package/dist/components/XStack.d.ts +4 -0
- package/dist/components/XStack.d.ts.map +1 -0
- package/dist/components/XStack.js +6 -0
- package/dist/components/XStack.js.map +1 -0
- package/dist/components/YStack.d.ts +4 -0
- package/dist/components/YStack.d.ts.map +1 -0
- package/dist/components/YStack.js +6 -0
- package/dist/components/YStack.js.map +1 -0
- package/dist/components/_internal/InputFrame.d.ts +13 -0
- package/dist/components/_internal/InputFrame.d.ts.map +1 -0
- package/dist/components/_internal/InputFrame.js +14 -0
- package/dist/components/_internal/InputFrame.js.map +1 -0
- package/dist/components/_internal/StoryItem.d.ts +6 -0
- package/dist/components/_internal/StoryItem.d.ts.map +1 -0
- package/dist/components/_internal/StoryItem.js +9 -0
- package/dist/components/_internal/StoryItem.js.map +1 -0
- package/dist/components/_internal/layout.d.ts +79 -0
- package/dist/components/_internal/layout.d.ts.map +1 -0
- package/dist/components/_internal/layout.js +73 -0
- package/dist/components/_internal/layout.js.map +1 -0
- package/dist/components/_internal/useControllableState.d.ts +7 -0
- package/dist/components/_internal/useControllableState.d.ts.map +1 -0
- package/dist/components/_internal/useControllableState.js +17 -0
- package/dist/components/_internal/useControllableState.js.map +1 -0
- package/dist/components/form/Checkbox.d.ts +26 -0
- package/dist/components/form/Checkbox.d.ts.map +1 -0
- package/dist/components/form/Checkbox.js +43 -0
- package/dist/components/form/Checkbox.js.map +1 -0
- package/dist/components/form/Form.context.d.ts +34 -0
- package/dist/components/form/Form.context.d.ts.map +1 -0
- package/dist/components/form/Form.context.js +53 -0
- package/dist/components/form/Form.context.js.map +1 -0
- package/dist/components/form/Form.d.ts +33 -0
- package/dist/components/form/Form.d.ts.map +1 -0
- package/dist/components/form/Form.js +36 -0
- package/dist/components/form/Form.js.map +1 -0
- package/dist/components/form/FormCheckbox.d.ts +7 -0
- package/dist/components/form/FormCheckbox.d.ts.map +1 -0
- package/dist/components/form/FormCheckbox.js +24 -0
- package/dist/components/form/FormCheckbox.js.map +1 -0
- package/dist/components/form/FormDescription.d.ts +4 -0
- package/dist/components/form/FormDescription.d.ts.map +1 -0
- package/dist/components/form/FormDescription.js +7 -0
- package/dist/components/form/FormDescription.js.map +1 -0
- package/dist/components/form/FormError.d.ts +5 -0
- package/dist/components/form/FormError.d.ts.map +1 -0
- package/dist/components/form/FormError.js +8 -0
- package/dist/components/form/FormError.js.map +1 -0
- package/dist/components/form/FormField.d.ts +17 -0
- package/dist/components/form/FormField.d.ts.map +1 -0
- package/dist/components/form/FormField.js +36 -0
- package/dist/components/form/FormField.js.map +1 -0
- package/dist/components/form/FormInput.d.ts +10 -0
- package/dist/components/form/FormInput.d.ts.map +1 -0
- package/dist/components/form/FormInput.js +36 -0
- package/dist/components/form/FormInput.js.map +1 -0
- package/dist/components/form/FormInputGroup.d.ts +8 -0
- package/dist/components/form/FormInputGroup.d.ts.map +1 -0
- package/dist/components/form/FormInputGroup.js +18 -0
- package/dist/components/form/FormInputGroup.js.map +1 -0
- package/dist/components/form/FormLabel.d.ts +4 -0
- package/dist/components/form/FormLabel.d.ts.map +1 -0
- package/dist/components/form/FormLabel.js +7 -0
- package/dist/components/form/FormLabel.js.map +1 -0
- package/dist/components/form/FormRadioGroup.d.ts +11 -0
- package/dist/components/form/FormRadioGroup.d.ts.map +1 -0
- package/dist/components/form/FormRadioGroup.js +24 -0
- package/dist/components/form/FormRadioGroup.js.map +1 -0
- package/dist/components/form/FormRoot.d.ts +13 -0
- package/dist/components/form/FormRoot.d.ts.map +1 -0
- package/dist/components/form/FormRoot.js +19 -0
- package/dist/components/form/FormRoot.js.map +1 -0
- package/dist/components/form/FormTextarea.d.ts +7 -0
- package/dist/components/form/FormTextarea.d.ts.map +1 -0
- package/dist/components/form/FormTextarea.js +27 -0
- package/dist/components/form/FormTextarea.js.map +1 -0
- package/dist/components/form/Input.d.ts +17 -0
- package/dist/components/form/Input.d.ts.map +1 -0
- package/dist/components/form/Input.js +32 -0
- package/dist/components/form/Input.js.map +1 -0
- package/dist/components/form/InputGroup.context.d.ts +10 -0
- package/dist/components/form/InputGroup.context.d.ts.map +1 -0
- package/dist/components/form/InputGroup.context.js +8 -0
- package/dist/components/form/InputGroup.context.js.map +1 -0
- package/dist/components/form/InputGroup.d.ts +31 -0
- package/dist/components/form/InputGroup.d.ts.map +1 -0
- package/dist/components/form/InputGroup.js +123 -0
- package/dist/components/form/InputGroup.js.map +1 -0
- package/dist/components/form/RadioGroup.d.ts +29 -0
- package/dist/components/form/RadioGroup.d.ts.map +1 -0
- package/dist/components/form/RadioGroup.js +42 -0
- package/dist/components/form/RadioGroup.js.map +1 -0
- package/dist/components/form/Textarea.d.ts +19 -0
- package/dist/components/form/Textarea.d.ts.map +1 -0
- package/dist/components/form/Textarea.js +26 -0
- package/dist/components/form/Textarea.js.map +1 -0
- package/dist/entries/checkbox.d.ts +3 -0
- package/dist/entries/checkbox.d.ts.map +1 -0
- package/dist/entries/checkbox.js +2 -0
- package/dist/entries/checkbox.js.map +1 -0
- package/dist/entries/flex.d.ts +3 -0
- package/dist/entries/flex.d.ts.map +1 -0
- package/dist/entries/flex.js +2 -0
- package/dist/entries/flex.js.map +1 -0
- package/dist/entries/form.d.ts +3 -0
- package/dist/entries/form.d.ts.map +1 -0
- package/dist/entries/form.js +2 -0
- package/dist/entries/form.js.map +1 -0
- package/dist/entries/grid.d.ts +3 -0
- package/dist/entries/grid.d.ts.map +1 -0
- package/dist/entries/grid.js +2 -0
- package/dist/entries/grid.js.map +1 -0
- package/dist/entries/input-group.d.ts +3 -0
- package/dist/entries/input-group.d.ts.map +1 -0
- package/dist/entries/input-group.js +2 -0
- package/dist/entries/input-group.js.map +1 -0
- package/dist/entries/input.d.ts +3 -0
- package/dist/entries/input.d.ts.map +1 -0
- package/dist/entries/input.js +2 -0
- package/dist/entries/input.js.map +1 -0
- package/dist/entries/radio-group.d.ts +3 -0
- package/dist/entries/radio-group.d.ts.map +1 -0
- package/dist/entries/radio-group.js +2 -0
- package/dist/entries/radio-group.js.map +1 -0
- package/dist/entries/separator.d.ts +3 -0
- package/dist/entries/separator.d.ts.map +1 -0
- package/dist/entries/separator.js +2 -0
- package/dist/entries/separator.js.map +1 -0
- package/dist/entries/spinner.d.ts +3 -0
- package/dist/entries/spinner.d.ts.map +1 -0
- package/dist/entries/spinner.js +2 -0
- package/dist/entries/spinner.js.map +1 -0
- package/dist/entries/textarea.d.ts +3 -0
- package/dist/entries/textarea.d.ts.map +1 -0
- package/dist/entries/textarea.js +2 -0
- package/dist/entries/textarea.js.map +1 -0
- package/dist/entries/x-stack.d.ts +3 -0
- package/dist/entries/x-stack.d.ts.map +1 -0
- package/dist/entries/x-stack.js +2 -0
- package/dist/entries/x-stack.js.map +1 -0
- package/dist/entries/y-stack.d.ts +3 -0
- package/dist/entries/y-stack.d.ts.map +1 -0
- package/dist/entries/y-stack.js +2 -0
- package/dist/entries/y-stack.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +8 -3
- package/src/base.css +23 -5
- package/src/components/Badge.tsx +1 -1
- package/src/components/Button.tsx +27 -23
- package/src/components/Card.tsx +12 -8
- package/src/components/Flex.stories.tsx +58 -0
- package/src/components/Flex.test.tsx +57 -0
- package/src/components/Flex.tsx +52 -0
- package/src/components/Grid.stories.tsx +55 -0
- package/src/components/Grid.test.tsx +140 -0
- package/src/components/Grid.tsx +166 -0
- package/src/components/Separator.stories.tsx +39 -0
- package/src/components/Separator.test.tsx +25 -0
- package/src/components/Separator.tsx +30 -0
- package/src/components/Spinner.stories.tsx +35 -0
- package/src/components/Spinner.test.tsx +30 -0
- package/src/components/Spinner.tsx +75 -0
- package/src/components/Text.stories.tsx +49 -0
- package/src/components/Text.tsx +5 -4
- package/src/components/XStack.stories.tsx +46 -0
- package/src/components/XStack.test.tsx +13 -0
- package/src/components/XStack.tsx +7 -0
- package/src/components/YStack.stories.tsx +46 -0
- package/src/components/YStack.test.tsx +13 -0
- package/src/components/YStack.tsx +7 -0
- package/src/components/_internal/InputFrame.tsx +50 -0
- package/src/components/_internal/StoryItem.tsx +24 -0
- package/src/components/_internal/layout.ts +103 -0
- package/src/components/_internal/useControllableState.ts +25 -0
- package/src/components/form/Checkbox.stories.tsx +67 -0
- package/src/components/form/Checkbox.test.tsx +88 -0
- package/src/components/form/Checkbox.tsx +167 -0
- package/src/components/form/Form.context.ts +91 -0
- package/src/components/form/Form.stories.tsx +152 -0
- package/src/components/form/Form.test.tsx +195 -0
- package/src/components/form/Form.tsx +51 -0
- package/src/components/form/FormCheckbox.tsx +42 -0
- package/src/components/form/FormDescription.tsx +14 -0
- package/src/components/form/FormError.tsx +20 -0
- package/src/components/form/FormField.tsx +82 -0
- package/src/components/form/FormInput.tsx +70 -0
- package/src/components/form/FormInputGroup.tsx +30 -0
- package/src/components/form/FormLabel.tsx +17 -0
- package/src/components/form/FormRadioGroup.tsx +48 -0
- package/src/components/form/FormRoot.tsx +41 -0
- package/src/components/form/FormTextarea.tsx +56 -0
- package/src/components/form/Input.stories.tsx +105 -0
- package/src/components/form/Input.test.tsx +76 -0
- package/src/components/form/Input.tsx +81 -0
- package/src/components/form/InputGroup.context.ts +11 -0
- package/src/components/form/InputGroup.stories.tsx +129 -0
- package/src/components/form/InputGroup.test.tsx +95 -0
- package/src/components/form/InputGroup.tsx +266 -0
- package/src/components/form/RadioGroup.stories.tsx +62 -0
- package/src/components/form/RadioGroup.test.tsx +98 -0
- package/src/components/form/RadioGroup.tsx +151 -0
- package/src/components/form/Textarea.stories.tsx +61 -0
- package/src/components/form/Textarea.test.tsx +35 -0
- package/src/components/form/Textarea.tsx +74 -0
- package/src/entries/checkbox.ts +2 -0
- package/src/entries/flex.ts +2 -0
- package/src/entries/form.ts +13 -0
- package/src/entries/grid.ts +2 -0
- package/src/entries/input-group.ts +8 -0
- package/src/entries/input.ts +2 -0
- package/src/entries/radio-group.ts +5 -0
- package/src/entries/separator.ts +2 -0
- package/src/entries/spinner.ts +2 -0
- package/src/entries/textarea.ts +2 -0
- package/src/entries/x-stack.ts +2 -0
- package/src/entries/y-stack.ts +2 -0
- package/src/fonts.test.tsx +244 -0
- package/src/index.ts +12 -0
- package/src/styles.css +12 -0
- package/dist/components/_internal/Spinner.d.ts +0 -9
- package/dist/components/_internal/Spinner.d.ts.map +0 -1
- package/dist/components/_internal/Spinner.js +0 -31
- package/dist/components/_internal/Spinner.js.map +0 -1
- package/src/components/_internal/Spinner.tsx +0 -49
package/README.md
CHANGED
|
@@ -43,7 +43,18 @@ after Tailwind and Uniwind, which is why they come from the same file.
|
|
|
43
43
|
To bring your own token set, import its pieces instead: `tailwindcss`,
|
|
44
44
|
`uniwind`, your tokens as Uniwind themes, then
|
|
45
45
|
`@pickle-ui/react-native/base.css`, which adds the components to Uniwind's
|
|
46
|
-
content sources
|
|
46
|
+
content sources, the `Text` type scale and the font defaults.
|
|
47
|
+
|
|
48
|
+
To use your app's font, set `--font-sans` to one family name after the import
|
|
49
|
+
(`@theme { --font-sans: 'Nunito'; }`) and load its faces under that name with
|
|
50
|
+
expo-font; each text's weight picks its face. Headings follow, unless you also
|
|
51
|
+
set `--font-heading`. Without `--font-sans`, text keeps the system font.
|
|
52
|
+
|
|
53
|
+
Load every weight under that one name (expo-font's `fontDefinitions`, in
|
|
54
|
+
`useFonts` or its config plugin) rather than declaring a family per weight
|
|
55
|
+
(`--font-sans-medium`, as Uniwind's FAQ does): the components only read
|
|
56
|
+
`--font-sans` and `--font-heading`, so they'd draw the regular face at every
|
|
57
|
+
weight.
|
|
47
58
|
|
|
48
59
|
Then use the components:
|
|
49
60
|
|
|
@@ -72,30 +83,57 @@ steps, token overrides and runtime brand colors.
|
|
|
72
83
|
|
|
73
84
|
Each export is also available from its own subpath.
|
|
74
85
|
|
|
75
|
-
| Export | Subpath | Notes
|
|
76
|
-
| --------------- | ----------------------------------------- |
|
|
77
|
-
| `Badge` | `@pickle-ui/react-native/badge` | `variant`: `default`, `secondary`, `outline`, `destructive`, `info`, `success`, `warning`, `error` and the statuses `pending`, `submitted`, `inProgress`, `inReview`, `failed`, `expired`; `size`: `sm`, `md`, `lg`
|
|
78
|
-
| `Button` | `@pickle-ui/react-native/button` | `variant`: `default`, `secondary`, `destructive`, `destructive-outline`, `outline`, `ghost`, `link`; `size`: `xs` … `xl`, `icon-xs` … `icon-xl`; `loading`
|
|
79
|
-
| `Card` | `@pickle-ui/react-native/card` | Parts: `Card.Header`, `Card.Title`, `Card.Description`, `Card.Action`, `Card.Content`, `Card.Footer`
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
86
|
+
| Export | Subpath | Notes |
|
|
87
|
+
| --------------- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
88
|
+
| `Badge` | `@pickle-ui/react-native/badge` | `variant`: `default`, `secondary`, `outline`, `destructive`, `info`, `success`, `warning`, `error` and the statuses `pending`, `submitted`, `inProgress`, `inReview`, `failed`, `expired`; `size`: `sm`, `md`, `lg` |
|
|
89
|
+
| `Button` | `@pickle-ui/react-native/button` | `variant`: `default`, `secondary`, `destructive`, `destructive-outline`, `outline`, `ghost`, `link`; `size`: `xs` … `xl`, `icon-xs` … `icon-xl`; `loading` |
|
|
90
|
+
| `Card` | `@pickle-ui/react-native/card` | Parts: `Card.Header`, `Card.Title`, `Card.Description`, `Card.Action`, `Card.Content`, `Card.Footer` |
|
|
91
|
+
| `Checkbox` | `@pickle-ui/react-native/checkbox` | `checked` / `defaultChecked` / `onCheckedChange`, `indeterminate`, `invalid`, `disabled`, `label`; `size`: `md`, `sm`; `classNames`: `field`, `indicator`, `label` |
|
|
92
|
+
| `Flex` | `@pickle-ui/react-native/flex` | A row by default, like the web; `direction`, `wrap`, `align`, `justify`, `gap`, `gapX`, `gapY` |
|
|
93
|
+
| `Form` | `@pickle-ui/react-native/form` | React Hook Form bindings: `Form.Field` (`label`, `description`, `error`), `Form.Input`, `Form.Textarea`, `Form.InputGroup`, `Form.Checkbox`, `Form.RadioGroup`, `Form.Button`, `Form.Label`, `Form.Description`, `Form.Error` |
|
|
94
|
+
| `Grid` | `@pickle-ui/react-native/grid` | Equal columns built from rows of cells (no CSS grid on native): `columns`, `rows`, `flow`, `gap`, `gapX`, `gapY`, `align`, `justify`, `placeContent`, `placeItems`; items can't stretch to their cell's height, give them `flex-1` |
|
|
95
|
+
| `Input` | `@pickle-ui/react-native/input` | `size`: `sm`, `md`, `lg`, the `Button` heights; `invalid`, `disabled`, `unstyled`; `classNames.input` |
|
|
96
|
+
| `InputGroup` | `@pickle-ui/react-native/input-group` | Parts: `InputGroup.Input`, `InputGroup.Addon` (`align`: `inline-start`, `inline-end`, `block-start`, `block-end`), `InputGroup.Button`, `InputGroup.Text` |
|
|
97
|
+
| `RadioGroup` | `@pickle-ui/react-native/radio-group` | `value` / `defaultValue` / `onValueChange`, `disabled`; parts: `RadioGroup.Item` (`value`, `label`, `invalid`, `disabled`, `size`: `md`, `sm`; `classNames`: `field`, `indicator`, `label`) |
|
|
98
|
+
| `Separator` | `@pickle-ui/react-native/separator` | `orientation`: `horizontal`, `vertical`; `role="separator"`, announced on the web only |
|
|
99
|
+
| `Spinner` | `@pickle-ui/react-native/spinner` | Announced as "Loading": `accessibilityLabel` renames it, `aria-hidden` makes it decorative; size it with `size-*` and color it with `text-*` |
|
|
100
|
+
| `Text` | `@pickle-ui/react-native/text` | `variant`: `h1` … `h4`, `lead`, `body`, `small`, `code`; `tone`: `muted`, `primary`, `destructive`; `weight`: `normal`, `bold`; `truncate` |
|
|
101
|
+
| `Textarea` | `@pickle-ui/react-native/textarea` | Grows with its content from three lines; `size`, `invalid`, `disabled`; `classNames.textarea` |
|
|
102
|
+
| `XStack` | `@pickle-ui/react-native/x-stack` | `Flex` as a row |
|
|
103
|
+
| `YStack` | `@pickle-ui/react-native/y-stack` | `Flex` as a column |
|
|
104
|
+
| `createTheme` | `@pickle-ui/react-native/theme` | Derives a theme from a brand color, the same as on the web; apply it with `ScopedVariables` |
|
|
105
|
+
| `cn` | `@pickle-ui/react-native/cn` | Joins class names; later classes win, and `text-h1` … `text-code` count as font sizes |
|
|
106
|
+
| `useColorToken` | `@pickle-ui/react-native/use-color-token` | Reads a token as a color string, for props that don't take a `className` |
|
|
84
107
|
|
|
85
108
|
Every component takes the props of the React Native element it renders,
|
|
86
|
-
`className` included, and merges your `className` last.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
109
|
+
`className` included, and merges your `className` last. Where native differs
|
|
110
|
+
from the web:
|
|
111
|
+
|
|
112
|
+
- **Form fields** take `invalid` and `disabled` props where the web reads the
|
|
113
|
+
`aria-invalid` and `disabled` attributes, and draw the web's focus ring
|
|
114
|
+
while they have focus.
|
|
115
|
+
- **`Checkbox` and `RadioGroup.Item`** take a `label` prop: a separate label
|
|
116
|
+
element couldn't toggle the control. Text styles don't cascade on native, so
|
|
117
|
+
`classNames.field` styles the row around the control and `classNames.label`
|
|
118
|
+
the label text.
|
|
119
|
+
- **`Form`** needs `react-hook-form` (a peer dependency). React Native has no
|
|
120
|
+
`<form>`, so `Form` takes `onSubmit` and runs it through `handleSubmit` when
|
|
121
|
+
`Form.Button` is pressed, or the return key in a `Form.Input`, like Enter on
|
|
122
|
+
the web. Give `Form.Button` an `onPress` for another action. A `Form.Field`
|
|
123
|
+
label names its control and focuses it when pressed.
|
|
124
|
+
- **`Button` and `Badge`** wrap text children in their label and render other
|
|
125
|
+
children, such as icons, as they are. Icons don't inherit the label's color
|
|
126
|
+
on native: pass it to the icon, for example with `useColorToken`. An
|
|
127
|
+
icon-only button needs an `icon*` size and an `accessibilityLabel`.
|
|
128
|
+
- **Touch targets**: buttons keep the web's dimensions and the text sizes it
|
|
129
|
+
uses from `sm` up (14px at `md`), and a `hitSlop` stretches each size to a
|
|
130
|
+
44pt touch target, as the web's `pointer-coarse` hit area does.
|
|
131
|
+
- **`Text`** sizes come from the shared type scale (`--text-h1` … `--text-code`
|
|
132
|
+
in `@pickle-ui/tokens/typography.css`); override them like any token.
|
|
133
|
+
Headings (`h1` … `h4`) are announced as headers.
|
|
134
|
+
- **Fonts**: every component's text uses `--font-sans`, and `h1`, `h2` and
|
|
135
|
+
`Card.Title` use `--font-heading`, like the web; `code` keeps the platform's
|
|
136
|
+
monospace font.
|
|
99
137
|
|
|
100
138
|
## Theming
|
|
101
139
|
|
|
@@ -123,4 +161,4 @@ export function Branded({ children }: { children: React.ReactNode }) {
|
|
|
123
161
|
The values are `oklch()` colors: Uniwind resolves them in `className`
|
|
124
162
|
utilities (`bg-primary`), but React Native can't read them from a `style`
|
|
125
163
|
prop, so draw with the tokens rather than the raw values. Fonts from
|
|
126
|
-
`createTheme`
|
|
164
|
+
`createTheme` apply too, but React Native reads one family name, not a stack.
|
package/dist/components/Badge.js
CHANGED
|
@@ -30,7 +30,7 @@ const badgeVariants = cva('flex-row items-center justify-center gap-1 self-start
|
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
});
|
|
33
|
-
const labelVariants = cva('font-medium', {
|
|
33
|
+
const labelVariants = cva('font-sans font-medium', {
|
|
34
34
|
defaultVariants: { size: 'md', variant: 'default' },
|
|
35
35
|
variants: {
|
|
36
36
|
size: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../src/components/Badge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAE/B,0DAA0D;AAC1D,MAAM,aAAa,GAAG,GAAG,CACvB,4FAA4F,EAC5F;IACE,eAAe,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE;IACnD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,EAAE,EAAE,wBAAwB;YAC5B,EAAE,EAAE,sBAAsB;YAC1B,EAAE,EAAE,0BAA0B;SAC/B;QACD,OAAO,EAAE;YACP,OAAO,EAAE,YAAY;YACrB,WAAW,EAAE,gBAAgB;YAC7B,KAAK,EAAE,uBAAuB;YAC9B,OAAO,EAAE,cAAc;YACvB,MAAM,EAAE,uBAAuB;YAC/B,IAAI,EAAE,gBAAgB;YACtB,UAAU,EAAE,gBAAgB;YAC5B,QAAQ,EAAE,mBAA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AAC,CAAC,CAAC,CAC1B,KAAK,CACN,CAAC,CAAC,CAAC,IAAI,CACT,GACI,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAe,SAAS,EAAc,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAe,SAAS,EAAc,MAAM,cAAc,CAAC;AASlE,QAAA,MAAM,cAAc;;;8EAgCnB,CAAC;AAuFF,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,EACtC,UAAU,CACX,GACC,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC;;;;OAIG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uEAAuE;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEJ,wBAAgB,MAAM,CAAC,EACrB,kBAAkB,EAClB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,cAAc,EACd,OAAe,EACf,IAAW,EACX,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,WAAW,+BAuDb"}
|
|
@@ -3,10 +3,11 @@ import { cva } from 'class-variance-authority';
|
|
|
3
3
|
import { Children, isValidElement } from 'react';
|
|
4
4
|
import { Pressable, Text, View } from 'react-native';
|
|
5
5
|
import { cn } from '../lib/cn';
|
|
6
|
-
import { Spinner } from './
|
|
6
|
+
import { Spinner } from './Spinner';
|
|
7
7
|
// Same variants, sizes and dimensions as `Button` in @pickle-ui/react on a
|
|
8
|
-
// phone
|
|
9
|
-
//
|
|
8
|
+
// phone, with its text sizes from `sm` up. `hitSlop` stretches every size to a
|
|
9
|
+
// 44pt touch target, like the web's `pointer-coarse` hit area. Paddings leave
|
|
10
|
+
// room for the 1pt border.
|
|
10
11
|
const buttonVariants = cva('flex-row items-center justify-center gap-2 rounded-lg border disabled:opacity-64', {
|
|
11
12
|
defaultVariants: { size: 'md', variant: 'default' },
|
|
12
13
|
variants: {
|
|
@@ -33,24 +34,26 @@ const buttonVariants = cva('flex-row items-center justify-center gap-2 rounded-l
|
|
|
33
34
|
},
|
|
34
35
|
},
|
|
35
36
|
});
|
|
36
|
-
const labelVariants = cva('font-medium', {
|
|
37
|
+
const labelVariants = cva('font-sans font-medium', {
|
|
37
38
|
compoundVariants: [
|
|
38
39
|
{ className: 'underline', pressed: true, variant: 'link' },
|
|
39
40
|
],
|
|
40
41
|
defaultVariants: { size: 'md', variant: 'default' },
|
|
41
42
|
variants: {
|
|
42
43
|
pressed: { false: '', true: '' },
|
|
44
|
+
// The web's sizes from `sm` up, not its larger phone sizes, which only
|
|
45
|
+
// stop iOS Safari zooming into focused fields.
|
|
43
46
|
size: {
|
|
44
|
-
icon: 'text-
|
|
45
|
-
'icon-lg': 'text-
|
|
46
|
-
'icon-sm': 'text-
|
|
47
|
-
'icon-xl': 'text-
|
|
48
|
-
'icon-xs': 'text-
|
|
49
|
-
lg: 'text-
|
|
50
|
-
md: 'text-
|
|
51
|
-
sm: 'text-
|
|
52
|
-
xl: 'text-
|
|
53
|
-
xs: 'text-
|
|
47
|
+
icon: 'text-sm',
|
|
48
|
+
'icon-lg': 'text-sm',
|
|
49
|
+
'icon-sm': 'text-sm',
|
|
50
|
+
'icon-xl': 'text-sm',
|
|
51
|
+
'icon-xs': 'text-sm',
|
|
52
|
+
lg: 'text-sm',
|
|
53
|
+
md: 'text-sm',
|
|
54
|
+
sm: 'text-sm',
|
|
55
|
+
xl: 'text-base',
|
|
56
|
+
xs: 'text-xs',
|
|
54
57
|
},
|
|
55
58
|
variant: {
|
|
56
59
|
default: 'text-primary-foreground',
|
|
@@ -63,16 +66,17 @@ const labelVariants = cva('font-medium', {
|
|
|
63
66
|
},
|
|
64
67
|
},
|
|
65
68
|
});
|
|
66
|
-
|
|
69
|
+
// Sized and dimmed like the web button's icons, in the label's color.
|
|
70
|
+
const spinnerVariants = cva('size-4 opacity-80', {
|
|
67
71
|
variants: {
|
|
68
72
|
variant: {
|
|
69
|
-
default: '
|
|
70
|
-
destructive: '
|
|
71
|
-
'destructive-outline': '
|
|
72
|
-
ghost: '
|
|
73
|
-
link: '
|
|
74
|
-
outline: '
|
|
75
|
-
secondary: '
|
|
73
|
+
default: 'text-primary-foreground',
|
|
74
|
+
destructive: 'text-destructive-foreground',
|
|
75
|
+
'destructive-outline': 'text-foreground',
|
|
76
|
+
ghost: 'text-foreground',
|
|
77
|
+
link: 'text-foreground',
|
|
78
|
+
outline: 'text-foreground',
|
|
79
|
+
secondary: 'text-secondary-foreground',
|
|
76
80
|
},
|
|
77
81
|
},
|
|
78
82
|
});
|
|
@@ -116,6 +120,6 @@ export function Button({ accessibilityState, children, className, disabled, labe
|
|
|
116
120
|
...accessibilityState,
|
|
117
121
|
busy: loading,
|
|
118
122
|
disabled: isDisabled,
|
|
119
|
-
}, className: cn(buttonVariants({ size, variant }), className), disabled: isDisabled, hitSlop: size ? HIT_SLOP[size] : undefined, ...props, children: ({ pressed }) => (_jsxs(_Fragment, { children: [isSolid && !isDisabled ? (_jsx(View, { className: highlightVariants({ pressed, size }), pointerEvents: "none" })) : null, Children.map(children, (child) => typeof child === 'string' || typeof child === 'number' ? (_jsx(Text, { className: cn(labelVariants({ pressed, size, variant }), loading && 'opacity-0', labelClassName), children: child })) : isValidElement(child) ? (loading ? (_jsx(View, { className: "opacity-0", children: child })) : (child)) : null), loading ? (_jsx(View, { className: "absolute", children: _jsx(Spinner, { className: spinnerVariants({ variant }) }) })) : null] })) }));
|
|
123
|
+
}, className: cn(buttonVariants({ size, variant }), className), disabled: isDisabled, hitSlop: size ? HIT_SLOP[size] : undefined, ...props, children: ({ pressed }) => (_jsxs(_Fragment, { children: [isSolid && !isDisabled ? (_jsx(View, { className: highlightVariants({ pressed, size }), pointerEvents: "none" })) : null, Children.map(children, (child) => typeof child === 'string' || typeof child === 'number' ? (_jsx(Text, { className: cn(labelVariants({ pressed, size, variant }), loading && 'opacity-0', labelClassName), children: child })) : isValidElement(child) ? (loading ? (_jsx(View, { className: "opacity-0", children: child })) : (child)) : null), loading ? (_jsx(View, { className: "absolute", children: _jsx(Spinner, { "aria-hidden": true, className: spinnerVariants({ variant }) }) })) : null] })) }));
|
|
120
124
|
}
|
|
121
125
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAe,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAe,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,2EAA2E;AAC3E,+EAA+E;AAC/E,8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E,MAAM,GAAG,SAAS,CAAC,CAAC;AACvE,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC;AAChE,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC;AAChE,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC;AAC1D,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAKjE,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAE3D;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,+BAE7D;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,+BASrE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAI3D;AAED;;;GAGG;AACH,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BA0BrE;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAUnD;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAWzD;AAED,QAAA,MAAM,IAAI;;;;;;;CAOR,CAAC;AAEH,OAAO,EACL,IAAI,EACJ,UAAU,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,GACV,CAAC"}
|
package/dist/components/Card.js
CHANGED
|
@@ -22,18 +22,21 @@ function CardFooter({ className, ...props }) {
|
|
|
22
22
|
* like the web header's grid.
|
|
23
23
|
*/
|
|
24
24
|
function CardHeader({ children, className, ...props }) {
|
|
25
|
-
const
|
|
26
|
-
const
|
|
25
|
+
const actions = [];
|
|
26
|
+
const rest = [];
|
|
27
|
+
for (const child of Children.toArray(children)) {
|
|
28
|
+
(isValidElement(child) && child.type === CardAction ? actions : rest).push(child);
|
|
29
|
+
}
|
|
27
30
|
if (actions.length === 0) {
|
|
28
31
|
return (_jsx(View, { className: cn('gap-1.5 px-6', className), ...props, children: children }));
|
|
29
32
|
}
|
|
30
|
-
return (_jsxs(View, { className: cn('flex-row items-start gap-4 px-6', className), ...props, children: [_jsx(View, { className: "flex-1 gap-1.5", children:
|
|
33
|
+
return (_jsxs(View, { className: cn('flex-row items-start gap-4 px-6', className), ...props, children: [_jsx(View, { className: "flex-1 gap-1.5", children: rest }), actions] }));
|
|
31
34
|
}
|
|
32
35
|
function CardRoot({ className, ...props }) {
|
|
33
36
|
return (_jsx(View, { className: cn('border-border bg-card gap-4 rounded-2xl border py-6 shadow-xs shadow-black/5', className), ...props }));
|
|
34
37
|
}
|
|
35
38
|
function CardTitle({ className, ...props }) {
|
|
36
|
-
return (_jsx(Text, { className: cn('text-card-foreground leading-none', className), variant: "h3", ...props }));
|
|
39
|
+
return (_jsx(Text, { className: cn('text-card-foreground font-heading leading-none', className), variant: "h3", ...props }));
|
|
37
40
|
}
|
|
38
41
|
const Card = Object.assign(CardRoot, {
|
|
39
42
|
Action: CardAction,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../src/components/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAkB,MAAM,QAAQ,CAAC;AAU9C,2EAA2E;AAC3E,mEAAmE;AAEnE,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE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AAE,SAAS,CAAC,KAAM,KAAK,YACtD,QAAQ,GACJ,CACR,CAAC;IACJ,CAAC;IAED,OAAO,CACL,MAAC,IAAI,IACH,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,SAAS,CAAC,KACvD,KAAK,aAET,KAAC,IAAI,IAAC,SAAS,EAAC,gBAAgB,YAAE,IAAI,GAAQ,EAC7C,OAAO,IACH,CACR,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAa;IAClD,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CACX,8EAA8E,EAC9E,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAkB;IACxD,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CACX,gDAAgD,EAChD,SAAS,CACV,EACD,OAAO,EAAC,IAAI,KACR,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;IACnC,MAAM,EAAE,UAAU;IAClB,OAAO,EAAE,WAAW;IACpB,WAAW,EAAE,eAAe;IAC5B,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,SAAS;CACjB,CAAC,CAAC;AAEH,OAAO,EACL,IAAI,EACJ,UAAU,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,GACV,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import { type LayoutStyleProps } from './_internal/layout';
|
|
3
|
+
declare const directionClasses: {
|
|
4
|
+
readonly column: "flex-col";
|
|
5
|
+
readonly 'column-reverse': "flex-col-reverse";
|
|
6
|
+
readonly row: "flex-row";
|
|
7
|
+
readonly 'row-reverse': "flex-row-reverse";
|
|
8
|
+
};
|
|
9
|
+
declare const wrapClasses: {
|
|
10
|
+
readonly nowrap: "flex-nowrap";
|
|
11
|
+
readonly wrap: "flex-wrap";
|
|
12
|
+
readonly 'wrap-reverse': "flex-wrap-reverse";
|
|
13
|
+
};
|
|
14
|
+
export type FlexProps = LayoutStyleProps & Omit<React.ComponentProps<typeof View>, keyof LayoutStyleProps> & {
|
|
15
|
+
direction?: keyof typeof directionClasses;
|
|
16
|
+
wrap?: keyof typeof wrapClasses;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A `View` laid out with flexbox props, like `Flex` in @pickle-ui/react. It
|
|
20
|
+
* defaults to a row, as on the web, where React Native's `View` stacks its
|
|
21
|
+
* children in a column.
|
|
22
|
+
*/
|
|
23
|
+
export declare function Flex({ align, className, direction, gap, gapX, gapY, justify, wrap, ...props }: FlexProps): import("react").JSX.Element;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=Flex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../src/components/Flex.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE7E,QAAA,MAAM,gBAAgB;;;;;CAKZ,CAAC;AAEX,QAAA,MAAM,WAAW;;;;CAIP,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,gBAAgB,GACtC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,MAAM,gBAAgB,CAAC,GAAG;IAChE,SAAS,CAAC,EAAE,MAAM,OAAO,gBAAgB,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;CACjC,CAAC;AAEJ;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,SAAS,EACT,SAAiB,EACjB,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,SAAS,+BAYX"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { cn } from '../lib/cn';
|
|
4
|
+
import { getLayoutClasses } from './_internal/layout';
|
|
5
|
+
const directionClasses = {
|
|
6
|
+
column: 'flex-col',
|
|
7
|
+
'column-reverse': 'flex-col-reverse',
|
|
8
|
+
row: 'flex-row',
|
|
9
|
+
'row-reverse': 'flex-row-reverse',
|
|
10
|
+
};
|
|
11
|
+
const wrapClasses = {
|
|
12
|
+
nowrap: 'flex-nowrap',
|
|
13
|
+
wrap: 'flex-wrap',
|
|
14
|
+
'wrap-reverse': 'flex-wrap-reverse',
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A `View` laid out with flexbox props, like `Flex` in @pickle-ui/react. It
|
|
18
|
+
* defaults to a row, as on the web, where React Native's `View` stacks its
|
|
19
|
+
* children in a column.
|
|
20
|
+
*/
|
|
21
|
+
export function Flex({ align, className, direction = 'row', gap, gapX, gapY, justify, wrap, ...props }) {
|
|
22
|
+
return (_jsx(View, { className: cn(getLayoutClasses({ align, gap, gapX, gapY, justify }), directionClasses[direction], wrap === undefined ? undefined : wrapClasses[wrap], className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=Flex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flex.js","sourceRoot":"","sources":["../../src/components/Flex.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAE7E,MAAM,gBAAgB,GAAG;IACvB,MAAM,EAAE,UAAU;IAClB,gBAAgB,EAAE,kBAAkB;IACpC,GAAG,EAAE,UAAU;IACf,aAAa,EAAE,kBAAkB;CACzB,CAAC;AAEX,MAAM,WAAW,GAAG;IAClB,MAAM,EAAE,aAAa;IACrB,IAAI,EAAE,WAAW;IACjB,cAAc,EAAE,mBAAmB;CAC3B,CAAC;AAQX;;;;GAIG;AACH,MAAM,UAAU,IAAI,CAAC,EACnB,KAAK,EACL,SAAS,EACT,SAAS,GAAG,KAAK,EACjB,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACE;IACV,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CACX,gBAAgB,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EACrD,gBAAgB,CAAC,SAAS,CAAC,EAC3B,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,EAClD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import { type LayoutAlign, type LayoutGap, type LayoutJustify } from './_internal/layout';
|
|
3
|
+
type GridFlow = 'column' | 'column-dense' | 'dense' | 'row' | 'row-dense';
|
|
4
|
+
type GridPlaceContent = 'baseline' | 'stretch' | LayoutJustify;
|
|
5
|
+
type GridTrackCount = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
6
|
+
export type GridProps = React.ComponentProps<typeof View> & {
|
|
7
|
+
/**
|
|
8
|
+
* Places each item down its cell, like CSS `align-items`. `stretch` and
|
|
9
|
+
* `baseline` place it at the top: give the item `flex-1` to fill the cell.
|
|
10
|
+
*/
|
|
11
|
+
align?: LayoutAlign;
|
|
12
|
+
columns?: GridTrackCount;
|
|
13
|
+
/**
|
|
14
|
+
* Fills rows first (`row`) or columns first (`column`). Items can't span
|
|
15
|
+
* cells on native, so the `dense` flows place them like `row` and `column`.
|
|
16
|
+
*/
|
|
17
|
+
flow?: GridFlow;
|
|
18
|
+
gap?: LayoutGap;
|
|
19
|
+
gapX?: LayoutGap;
|
|
20
|
+
gapY?: LayoutGap;
|
|
21
|
+
/** Distributes the cells along each row, like CSS `justify-content`. */
|
|
22
|
+
justify?: LayoutJustify;
|
|
23
|
+
/** Distributes the rows and the cells, like CSS `place-content`. */
|
|
24
|
+
placeContent?: GridPlaceContent;
|
|
25
|
+
/** Places each item across and down its cell, like CSS `place-items`. */
|
|
26
|
+
placeItems?: LayoutAlign;
|
|
27
|
+
rows?: GridTrackCount;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Lays its children out in equal columns, like `Grid` in @pickle-ui/react.
|
|
31
|
+
* Items fill their cell's width by default and the cells of a row share its
|
|
32
|
+
* height.
|
|
33
|
+
*/
|
|
34
|
+
export declare function Grid({ align, children, className, columns, flow, gap, gapX, gapY, justify, placeContent, placeItems, rows, ...props }: GridProps): import("react").JSX.Element;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=Grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../src/components/Grid.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAO5B,KAAK,QAAQ,GAAG,QAAQ,GAAG,cAAc,GAAG,OAAO,GAAG,KAAK,GAAG,WAAW,CAAC;AAC1E,KAAK,gBAAgB,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,CAAC;AAC/D,KAAK,cAAc,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAqCvE,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,GAAG;IAC1D;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,wEAAwE;IACxE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,oEAAoE;IACpE,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,yEAAyE;IACzE,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,QAAQ,EACR,SAAS,EACT,OAAO,EACP,IAAY,EACZ,GAAG,EACH,IAAU,EACV,IAAU,EACV,OAAO,EACP,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,SAAS,+BAyDX"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Children, Fragment, isValidElement } from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { cn } from '../lib/cn';
|
|
5
|
+
import { gapXClasses, gapYClasses, } from './_internal/layout';
|
|
6
|
+
// Cells are columns: `items-*` places an item across the cell's width and
|
|
7
|
+
// `justify-*` down its height. A cell can't stretch an item vertically, so
|
|
8
|
+
// `stretch` and `baseline` place it at the top; give the item `flex-1` to fill
|
|
9
|
+
// its cell's height.
|
|
10
|
+
const horizontalClasses = {
|
|
11
|
+
baseline: 'items-start',
|
|
12
|
+
center: 'items-center',
|
|
13
|
+
end: 'items-end',
|
|
14
|
+
start: 'items-start',
|
|
15
|
+
stretch: 'items-stretch',
|
|
16
|
+
};
|
|
17
|
+
const verticalClasses = {
|
|
18
|
+
baseline: 'justify-start',
|
|
19
|
+
center: 'justify-center',
|
|
20
|
+
end: 'justify-end',
|
|
21
|
+
start: 'justify-start',
|
|
22
|
+
stretch: 'justify-start',
|
|
23
|
+
};
|
|
24
|
+
// Distributes the rows down the grid and the cells along each row, like CSS
|
|
25
|
+
// `align-content` and `justify-content`. Cells share each row's width, so only
|
|
26
|
+
// a grid taller than its rows shows the difference; `stretch` grows the rows
|
|
27
|
+
// into that height instead.
|
|
28
|
+
const contentClasses = {
|
|
29
|
+
around: 'justify-around',
|
|
30
|
+
baseline: 'justify-start',
|
|
31
|
+
between: 'justify-between',
|
|
32
|
+
center: 'justify-center',
|
|
33
|
+
end: 'justify-end',
|
|
34
|
+
evenly: 'justify-evenly',
|
|
35
|
+
start: 'justify-start',
|
|
36
|
+
stretch: 'justify-start',
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Lays its children out in equal columns, like `Grid` in @pickle-ui/react.
|
|
40
|
+
* Items fill their cell's width by default and the cells of a row share its
|
|
41
|
+
* height.
|
|
42
|
+
*/
|
|
43
|
+
export function Grid({ align, children, className, columns, flow = 'row', gap, gapX = gap, gapY = gap, justify, placeContent, placeItems, rows, ...props }) {
|
|
44
|
+
const items = flattenChildren(children);
|
|
45
|
+
const byColumn = flow === 'column' || flow === 'column-dense';
|
|
46
|
+
const rowCount = byColumn
|
|
47
|
+
? (rows ?? 1)
|
|
48
|
+
: Math.max(rows ?? 0, Math.ceil(items.length / (columns ?? 1)));
|
|
49
|
+
const columnCount = byColumn
|
|
50
|
+
? Math.max(columns ?? 1, Math.ceil(items.length / rowCount))
|
|
51
|
+
: (columns ?? 1);
|
|
52
|
+
const vertical = placeItems ?? align;
|
|
53
|
+
const distribution = placeContent ?? justify;
|
|
54
|
+
return (_jsx(View, { className: cn(gapY === undefined ? undefined : gapYClasses[gapY], placeContent === undefined ? undefined : contentClasses[placeContent], className), ...props, children: Array.from({ length: rowCount }, (_, row) => (_jsx(View, { className: cn('flex-row', gapX === undefined ? undefined : gapXClasses[gapX], distribution === undefined
|
|
55
|
+
? undefined
|
|
56
|
+
: contentClasses[distribution], placeContent === 'stretch' ? 'grow' : undefined), children: Array.from({ length: columnCount }, (_, column) => (_jsx(View, { className: cn('flex-1', placeItems === undefined
|
|
57
|
+
? undefined
|
|
58
|
+
: horizontalClasses[placeItems], vertical === undefined ? undefined : verticalClasses[vertical]), children: items[byColumn
|
|
59
|
+
? column * rowCount + row
|
|
60
|
+
: row * columnCount + column] }, column))) }, row))) }));
|
|
61
|
+
}
|
|
62
|
+
/** The grid items, with fragments opened up as on the web. */
|
|
63
|
+
function flattenChildren(children) {
|
|
64
|
+
return Children.toArray(children).flatMap((child) => isValidElement(child) && child.type === Fragment
|
|
65
|
+
? flattenChildren(child.props.children)
|
|
66
|
+
: [child]);
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=Grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../src/components/Grid.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAkB,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAC/B,OAAO,EACL,WAAW,EACX,WAAW,GAIZ,MAAM,oBAAoB,CAAC;AAW5B,0EAA0E;AAC1E,2EAA2E;AAC3E,+EAA+E;AAC/E,qBAAqB;AACrB,MAAM,iBAAiB,GAAG;IACxB,QAAQ,EAAE,aAAa;IACvB,MAAM,EAAE,cAAc;IACtB,GAAG,EAAE,WAAW;IAChB,KAAK,EAAE,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C/D,YAIC,KAAK,CACH,QAAQ;oBACN,CAAC,CAAC,MAAM,GAAG,QAAQ,GAAG,GAAG;oBACzB,CAAC,CAAC,GAAG,GAAG,WAAW,GAAG,MAAM,CAC/B,IAPE,MAAM,CASN,CACR,CAAC,IArBG,GAAG,CAsBH,CACR,CAAC,GACG,CACR,CAAC;AACJ,CAAC;AAED,8DAA8D;AAC9D,SAAS,eAAe,CAAC,QAAmB;IAC1C,OAAO,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAClD,cAAc,CAA2B,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ;QACxE,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;QACvC,CAAC,CAAC,CAAC,KAAK,CAAC,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
export type SeparatorProps = React.ComponentProps<typeof View> & {
|
|
3
|
+
orientation?: 'horizontal' | 'vertical';
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* A 1px rule in the border color, like `Separator` in @pickle-ui/react. Its
|
|
7
|
+
* `separator` role reaches screen readers on the web; iOS and Android have no
|
|
8
|
+
* separator trait, so they skip it like any non-focusable view.
|
|
9
|
+
*/
|
|
10
|
+
export declare function Separator({ className, orientation, ...props }: SeparatorProps): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=Separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../src/components/Separator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIpC,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,GAAG;IAC/D,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACzC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,WAA0B,EAC1B,GAAG,KAAK,EACT,EAAE,cAAc,+BAYhB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { cn } from '../lib/cn';
|
|
4
|
+
/**
|
|
5
|
+
* A 1px rule in the border color, like `Separator` in @pickle-ui/react. Its
|
|
6
|
+
* `separator` role reaches screen readers on the web; iOS and Android have no
|
|
7
|
+
* separator trait, so they skip it like any non-focusable view.
|
|
8
|
+
*/
|
|
9
|
+
export function Separator({ className, orientation = 'horizontal', ...props }) {
|
|
10
|
+
return (_jsx(View, { className: cn('bg-border shrink-0', orientation === 'horizontal' ? 'h-px w-full' : 'w-px self-stretch', className), role: "separator", ...props }));
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=Separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Separator.js","sourceRoot":"","sources":["../../src/components/Separator.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAM/B;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,EACxB,SAAS,EACT,WAAW,GAAG,YAAY,EAC1B,GAAG,KAAK,EACO;IACf,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CACX,oBAAoB,EACpB,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,mBAAmB,EAClE,SAAS,CACV,EACD,IAAI,EAAC,WAAW,KACZ,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
export type SpinnerProps = Omit<React.ComponentProps<typeof View>, 'children'> & {
|
|
3
|
+
/** Hides the spinner from screen readers, when visible text already says what is loading. */
|
|
4
|
+
'aria-hidden'?: boolean;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* The web `Spinner`'s look on native: a three-quarter ring turning once a
|
|
8
|
+
* second, drawn inside a `size-6` box like the web icon. Size it with
|
|
9
|
+
* `size-*` and color it with `text-*`, as on the web. Announced as "Loading"
|
|
10
|
+
* by default; `accessibilityLabel` replaces the name and `aria-hidden` makes
|
|
11
|
+
* it decorative.
|
|
12
|
+
*/
|
|
13
|
+
export declare function Spinner({ accessibilityLabel, 'aria-hidden': ariaHidden, className, style, ...props }: SpinnerProps): import("react").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/components/Spinner.tsx"],"names":[],"mappings":"AACA,OAAO,EAA8B,IAAI,EAAE,MAAM,cAAc,CAAC;AAKhE,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EACjC,UAAU,CACX,GAAG;IACF,6FAA6F;IAC7F,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,EACtB,kBAA8B,EAC9B,aAAa,EAAE,UAAkB,EACjC,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,YAAY,+BA+Cd"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { Animated, Easing, Platform, View } from 'react-native';
|
|
4
|
+
import { useResolveClassNames } from 'uniwind';
|
|
5
|
+
import { cn } from '../lib/cn';
|
|
6
|
+
/**
|
|
7
|
+
* The web `Spinner`'s look on native: a three-quarter ring turning once a
|
|
8
|
+
* second, drawn inside a `size-6` box like the web icon. Size it with
|
|
9
|
+
* `size-*` and color it with `text-*`, as on the web. Announced as "Loading"
|
|
10
|
+
* by default; `accessibilityLabel` replaces the name and `aria-hidden` makes
|
|
11
|
+
* it decorative.
|
|
12
|
+
*/
|
|
13
|
+
export function Spinner({ accessibilityLabel = 'Loading', 'aria-hidden': ariaHidden = false, className, style, ...props }) {
|
|
14
|
+
const [turn] = useState(() => new Animated.Value(0));
|
|
15
|
+
const box = cn('text-foreground size-6', className);
|
|
16
|
+
// React Native has no `currentColor`: the ring reads the `text-*` color, and
|
|
17
|
+
// its stroke follows the box like the icon's (2px at 24px).
|
|
18
|
+
const { color, width } = useResolveClassNames(box);
|
|
19
|
+
const strokeWidth = typeof width === 'number' ? width / 12 : 2;
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const loop = Animated.loop(Animated.timing(turn, {
|
|
22
|
+
duration: 1000,
|
|
23
|
+
easing: Easing.linear,
|
|
24
|
+
toValue: 1,
|
|
25
|
+
// react-native-web has no native driver and warns when asked for it.
|
|
26
|
+
useNativeDriver: Platform.OS !== 'web',
|
|
27
|
+
}));
|
|
28
|
+
loop.start();
|
|
29
|
+
return () => loop.stop();
|
|
30
|
+
}, [turn]);
|
|
31
|
+
const rotate = turn.interpolate({
|
|
32
|
+
inputRange: [0, 1],
|
|
33
|
+
outputRange: ['0deg', '360deg'],
|
|
34
|
+
});
|
|
35
|
+
return (_jsx(Animated.View, { accessibilityLabel: ariaHidden ? undefined : accessibilityLabel, accessibilityRole: ariaHidden ? undefined : 'progressbar', accessible: !ariaHidden, "aria-hidden": ariaHidden, className: cn('items-center justify-center', box), style: [style, { transform: [{ rotate }] }], ...props, children: _jsx(View, { className: "size-3/4 rounded-full", style: {
|
|
36
|
+
borderColor: typeof color === 'string' ? color : undefined,
|
|
37
|
+
borderTopColor: 'transparent',
|
|
38
|
+
borderWidth: strokeWidth,
|
|
39
|
+
} }) }));
|
|
40
|
+
}
|
|
41
|
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|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/components/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,IAAI,IAAI,UAAU,EAAwB,MAAM,cAAc,CAAC;AAMxE,QAAA,MAAM,YAAY;;;;8EAuBhB,CAAC;AAWH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,GAC7D,YAAY,CAAC,OAAO,YAAY,CAAC,GAAG;IAClC,kDAAkD;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEJ,wBAAgB,IAAI,CAAC,EACnB,SAAS,EACT,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,OAAgB,EAChB,MAAM,EACN,GAAG,KAAK,EACT,EAAE,SAAS,+BAYX"}
|