@app-studio/components 0.10.22 → 0.10.23
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/index.d.ts +229 -73
- package/dist/native/components/Background/Background/Background.view.js +7 -2
- package/dist/native/components/Background/Background/Background.view.js.map +1 -1
- package/dist/native/components/Button/Button/Button.style.d.ts +14 -0
- package/dist/native/components/Button/Button/Button.style.js +19 -5
- package/dist/native/components/Button/Button/Button.style.js.map +1 -1
- package/dist/native/components/Button/Button/Button.type.d.ts +9 -0
- package/dist/native/components/Button/Button/Button.type.js +3 -0
- package/dist/native/components/Button/Button/Button.type.js.map +1 -0
- package/dist/native/components/Button/Button/Button.view.js +4 -4
- package/dist/native/components/Button/Button/Button.view.js.map +1 -1
- package/dist/native/components/Drawer/Drawer/Drawer.type.d.ts +3 -0
- package/dist/native/components/Drawer/Drawer/Drawer.type.js +2 -0
- package/dist/native/components/Drawer/Drawer/Drawer.type.js.map +1 -0
- package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.type.d.ts +8 -0
- package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.type.js +2 -0
- package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.type.js.map +1 -0
- package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.type.d.ts +2 -1
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.type.d.ts +19 -0
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.type.js +2 -0
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.type.js.map +1 -0
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.js +3 -2
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.js.map +1 -1
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.native.js +2 -2
- package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.type.d.ts +12 -0
- package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.type.js +2 -0
- package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.type.js.map +1 -0
- package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.view.js +5 -2
- package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.view.js.map +1 -1
- package/dist/native/components/Form/Label/Label/Label.props.d.ts +1 -1
- package/dist/native/components/Form/Password/Password/Password.type.d.ts +10 -0
- package/dist/native/components/Form/Password/Password/Password.type.js +2 -0
- package/dist/native/components/Form/Password/Password/Password.type.js.map +1 -0
- package/dist/native/components/Form/Password/Password.js +22 -3
- package/dist/native/components/Form/Password/Password.js.map +1 -1
- package/dist/native/components/Form/Radio/Radio/Radio.type.d.ts +8 -0
- package/dist/native/components/Form/Radio/Radio/Radio.type.js +2 -0
- package/dist/native/components/Form/Radio/Radio/Radio.type.js.map +1 -0
- package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.type.d.ts +7 -0
- package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.type.js +2 -0
- package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.type.js.map +1 -0
- package/dist/native/components/Form/Select/Select/Select.props.d.ts +2 -2
- package/dist/native/components/Form/Select/Select/Select.type.d.ts +19 -0
- package/dist/native/components/Form/Select/Select/Select.type.js +2 -0
- package/dist/native/components/Form/Select/Select/Select.type.js.map +1 -0
- package/dist/native/components/Form/Select/Select/Select.view.js +15 -30
- package/dist/native/components/Form/Select/Select/Select.view.js.map +1 -1
- package/dist/native/components/Form/Selector/Selector/Selector.type.d.ts +19 -0
- package/dist/native/components/Form/Selector/Selector/Selector.type.js +2 -0
- package/dist/native/components/Form/Selector/Selector/Selector.type.js.map +1 -0
- package/dist/native/components/Form/Switch/Switch/Switch.type.d.ts +7 -0
- package/dist/native/components/Form/Switch/Switch/Switch.type.js +2 -0
- package/dist/native/components/Form/Switch/Switch/Switch.type.js.map +1 -0
- package/dist/native/components/Form/TagInput/TagInput/TagInput.view.js +6 -1
- package/dist/native/components/Form/TagInput/TagInput/TagInput.view.js.map +1 -1
- package/dist/native/components/Form/TextField/TextField/TextField.type.d.ts +12 -0
- package/dist/native/components/Form/TextField/TextField/TextField.type.js +2 -0
- package/dist/native/components/Form/TextField/TextField/TextField.type.js.map +1 -0
- package/dist/native/components/Form/TextField/TextField/TextField.view.js +4 -1
- package/dist/native/components/Form/TextField/TextField/TextField.view.js.map +1 -1
- package/dist/native/components/Input/FieldContainer/FieldContainer.js +1 -1
- package/dist/native/components/Input/FieldContainer/FieldContainer.js.map +1 -1
- package/dist/native/components/Input/FieldContent/FieldContent.js +13 -1
- package/dist/native/components/Input/FieldContent/FieldContent.js.map +1 -1
- package/dist/native/components/Input/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/native/components/Input/FieldWrapper/FieldWrapper.js.map +1 -1
- package/dist/native/components/Input/fieldSizes.d.ts +33 -0
- package/dist/native/components/Input/fieldSizes.js +37 -0
- package/dist/native/components/Input/fieldSizes.js.map +1 -0
- package/dist/native/components/Link/Link/Link.props.d.ts +5 -3
- package/dist/native/components/Link/Link/Link.type.d.ts +7 -0
- package/dist/native/components/Link/Link/Link.type.js +2 -0
- package/dist/native/components/Link/Link/Link.type.js.map +1 -0
- package/dist/native/components/Link/Link/Link.view.js +40 -25
- package/dist/native/components/Link/Link/Link.view.js.map +1 -1
- package/dist/native/components/Link/Link/Link.view.native.js +4 -3
- package/dist/native/components/Link/Link/Link.view.native.js.map +1 -1
- package/dist/native/components/Link/Link.js +1 -5
- package/dist/native/components/Link/Link.js.map +1 -1
- package/dist/native/components/Loader/Loader/Loader.type.d.ts +4 -0
- package/dist/native/components/Loader/Loader/Loader.type.js +2 -0
- package/dist/native/components/Loader/Loader/Loader.type.js.map +1 -0
- package/dist/native/components/Modal/Modal/Modal.type.d.ts +4 -0
- package/dist/native/components/Modal/Modal/Modal.type.js +2 -0
- package/dist/native/components/Modal/Modal/Modal.type.js.map +1 -0
- package/dist/native/components/Router/Router.match.js +1 -1
- package/dist/native/components/Router/Router.match.js.map +1 -1
- package/dist/native/components/Router/index.d.ts +1 -1
- package/dist/native/components/Tabs/Tabs/Tabs.type.d.ts +53 -0
- package/dist/native/components/Tabs/Tabs/Tabs.type.js +2 -0
- package/dist/native/components/Tabs/Tabs/Tabs.type.js.map +1 -0
- package/dist/web.cjs.js +7 -7
- package/dist/web.cjs.js.map +1 -1
- package/dist/web.esm.js +4479 -4479
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.js +6 -6
- package/dist/web.umd.js.map +1 -1
- package/docs/getting-started/introduction.md +74 -4
- package/package.json +1 -1
|
@@ -44,20 +44,90 @@ compatibility matrix, Reanimated wiring, and Metro/typecheck configuration.
|
|
|
44
44
|
|
|
45
45
|
## Quick Start
|
|
46
46
|
|
|
47
|
+
Wrap your app in `ThemeProvider` — it defines the CSS variables that every
|
|
48
|
+
`color-*` and `theme-*` token resolves against. Without it, tokens fall back to
|
|
49
|
+
undefined variables and components render uncoloured.
|
|
50
|
+
|
|
47
51
|
```jsx
|
|
48
52
|
import React from 'react';
|
|
53
|
+
import { ThemeProvider, Vertical } from 'app-studio';
|
|
49
54
|
import { Button, Text } from '@app-studio/components';
|
|
50
55
|
|
|
51
56
|
function App() {
|
|
52
57
|
return (
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
<ThemeProvider>
|
|
59
|
+
<Vertical gap={12} padding={24}>
|
|
60
|
+
<Text>Hello, world!</Text>
|
|
61
|
+
<Button onClick={() => console.log('Clicked!')}>Click me</Button>
|
|
62
|
+
</Vertical>
|
|
63
|
+
</ThemeProvider>
|
|
57
64
|
);
|
|
58
65
|
}
|
|
59
66
|
```
|
|
60
67
|
|
|
68
|
+
### Baseline document styles
|
|
69
|
+
|
|
70
|
+
This library styles **components, not the document**. It ships no CSS reset, so
|
|
71
|
+
the page keeps the browser's defaults until you set them yourself. On a fresh
|
|
72
|
+
project that shows up immediately as:
|
|
73
|
+
|
|
74
|
+
- body text in the browser's serif font, because nothing sets a `font-family`;
|
|
75
|
+
- an 8px `body` margin, which makes any `100vh` shell overflow by 16px and
|
|
76
|
+
produces a scrollbar you did not ask for;
|
|
77
|
+
- blue underlined `<a>` elements, including router links wrapping components.
|
|
78
|
+
|
|
79
|
+
A dozen lines are enough, and none of it competes with the design system:
|
|
80
|
+
|
|
81
|
+
```css
|
|
82
|
+
*,
|
|
83
|
+
*::before,
|
|
84
|
+
*::after {
|
|
85
|
+
box-sizing: border-box;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
html,
|
|
89
|
+
body {
|
|
90
|
+
margin: 0;
|
|
91
|
+
padding: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
body {
|
|
95
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
96
|
+
-webkit-font-smoothing: antialiased;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
a {
|
|
100
|
+
color: inherit;
|
|
101
|
+
text-decoration: none;
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Keep it to resets. Colours, spacing and typography should still come from the
|
|
106
|
+
theme so they stay adaptive to light/dark mode.
|
|
107
|
+
|
|
108
|
+
### Control sizes line up
|
|
109
|
+
|
|
110
|
+
Form controls of the same `size` render at the same height, so they can sit in a
|
|
111
|
+
row without extra alignment work. At `md` — the default — `TextField`, `Select`
|
|
112
|
+
and `Button` are all exactly 40px:
|
|
113
|
+
|
|
114
|
+
```jsx
|
|
115
|
+
<Horizontal gap={10} alignItems="center">
|
|
116
|
+
<TextField name="search" placeholder="Search…" />
|
|
117
|
+
<Select name="status" placeholder="Any status" options={options} />
|
|
118
|
+
<Button variant="outline">Filter</Button>
|
|
119
|
+
</Horizontal>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The scale is `xs` 24, `sm` 32, `md` 40, `lg` 48, `xl` 56, and it is shared: it
|
|
123
|
+
lives in `Input/fieldSizes` and is applied by the field shell, so `TextField`,
|
|
124
|
+
`Password`, `Select`, `DatePicker`, `TagInput` and `Button` all render exactly
|
|
125
|
+
their declared height at every size — including bordered variants, which used to
|
|
126
|
+
come out 2px taller.
|
|
127
|
+
|
|
128
|
+
`ComboBox` is the exception: it takes no `size` prop
|
|
129
|
+
(`Omit<InputProps, 'size'>`) and always renders at 40px, matching `md`.
|
|
130
|
+
|
|
61
131
|
## Component Categories
|
|
62
132
|
|
|
63
133
|
The library includes components in the following categories:
|