@expo/styleguide 8.0.0-alpha.0 → 8.0.0-alpha.10
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 +32 -4
- package/dist/expo-theme.css +3 -21
- package/dist/index.d.ts +1 -0
- package/dist/index.js +270 -82
- package/dist/src/components/Button/Button.d.ts +26 -0
- package/dist/src/components/Button/ButtonBase.d.ts +8 -0
- package/dist/src/components/Button/helpers.d.ts +6 -0
- package/dist/src/components/Button/index.d.ts +2 -0
- package/dist/src/components/Link/Link.d.ts +6 -0
- package/dist/src/components/Link/LinkBase.d.ts +12 -0
- package/dist/src/components/Link/index.d.ts +2 -0
- package/dist/src/components/{BlockingSetInitialColorMode.d.ts → Theme/BlockingSetInitialColorMode.d.ts} +2 -2
- package/dist/src/components/{ThemeProvider.d.ts → Theme/ThemeProvider.d.ts} +2 -2
- package/dist/src/components/Theme/index.d.ts +2 -0
- package/dist/src/components/index.d.ts +3 -3
- package/dist/src/helpers/mergeClasses.d.ts +1 -0
- package/dist/src/logos/DocsLogo.d.ts +2 -3
- package/dist/src/logos/ExpoGoLogo.d.ts +2 -3
- package/dist/src/logos/Logo.d.ts +2 -3
- package/dist/src/logos/RouterLogo.d.ts +2 -0
- package/dist/src/logos/SnackLogo.d.ts +2 -3
- package/dist/src/logos/WordMarkLogo.d.ts +2 -3
- package/dist/src/logos/index.d.ts +1 -0
- package/dist/src/styles/themes.d.ts +0 -9
- package/package.json +13 -10
- package/tailwind.js +318 -297
- package/dist/src/components/ButtonBase.d.ts +0 -9
- package/dist/src/types/index.d.ts +0 -10
- package/dist/tailwind.js +0 -396
package/README.md
CHANGED
|
@@ -1,17 +1,45 @@
|
|
|
1
1
|
# @expo/styleguide
|
|
2
2
|
|
|
3
|
-
Expo's styleguide components for use on the web.
|
|
3
|
+
Expo's styleguide and components for use on the web.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
1. Install Expo Styleguide package:
|
|
8
|
+
```shell
|
|
9
|
+
yarn add @expo/styleguide
|
|
10
|
+
```
|
|
11
|
+
2. Import global CSS files from the package in your JS(X)/TS(X) code:
|
|
12
|
+
```jsx
|
|
13
|
+
import "@expo/styleguide/dist/expo-theme.css";
|
|
14
|
+
```
|
|
15
|
+
or import it the main stylesheet file:
|
|
16
|
+
```css
|
|
17
|
+
@import "@expo/styleguide/dist/expo-theme.css";
|
|
18
|
+
```
|
|
19
|
+
3. Add `'./node_modules/@expo/styleguide/dist/**/*.{js,ts,jsx,tsx}'` to the Tailwind `content` paths.
|
|
20
|
+
|
|
21
|
+
### Tailwind theme
|
|
22
|
+
|
|
23
|
+
For the Styleguide we use our custom Tailwind theme, which is based on the default TW theme, with the following differences:
|
|
24
|
+
* only valid media screen scopes are: `xs:`, `sm:`, `md:`, `lg:` and `xl:`
|
|
25
|
+
* there is a custom `hocus:` scope which is a shorthand for hover and focus states
|
|
26
|
+
* typography elements are predefined as a `heading-[size]` styles sets
|
|
27
|
+
* `icon-[size]` are custom component classes defined for icons sizing
|
|
28
|
+
|
|
29
|
+
The theme can be extended, if needed, and includes `@tailwindcss/typography` plugin by default, with a stripped down version of default config.
|
|
30
|
+
|
|
31
|
+
## Development
|
|
32
|
+
|
|
33
|
+
### Get started
|
|
6
34
|
|
|
7
35
|
1. Install dependencies with `yarn`.
|
|
8
36
|
2. Build everything with `yarn build`.
|
|
9
37
|
3. Develop with `yarn dev`.
|
|
10
38
|
|
|
11
|
-
|
|
39
|
+
### Changing Tailwind theme
|
|
12
40
|
|
|
13
41
|
In order to see changes made to the exported **tailwind.js** config:
|
|
14
42
|
|
|
15
43
|
- Change a value in **packages/styleguide/tailwind.js**
|
|
16
|
-
- Run yarn
|
|
44
|
+
- Run `yarn build` in **packages/styleguide**
|
|
17
45
|
- Navigate to **example-web** and restart the dev server
|
package/dist/expo-theme.css
CHANGED
|
@@ -116,15 +116,6 @@
|
|
|
116
116
|
--expo-theme-button-secondary-destructive-disabled-border: var(--red5);
|
|
117
117
|
--expo-theme-button-secondary-destructive-disabled-text: var(--red8);
|
|
118
118
|
|
|
119
|
-
/* Project icon backgrounds */
|
|
120
|
-
--expo-theme-project-blue: linear-gradient(#81b2eb, #6299d9);
|
|
121
|
-
--expo-theme-project-green: linear-gradient(#6eb87f, #54a767);
|
|
122
|
-
--expo-theme-project-yellow: linear-gradient(#edcd5f, #e5c145);
|
|
123
|
-
--expo-theme-project-orange: linear-gradient(#eb9f6a, #d9864c);
|
|
124
|
-
--expo-theme-project-red: linear-gradient(#eb7171, #d95757);
|
|
125
|
-
--expo-theme-project-pink: linear-gradient(#eb8dc5, #d977b2);
|
|
126
|
-
--expo-theme-project-purple: linear-gradient(#a687e0, #8a66cc);
|
|
127
|
-
|
|
128
119
|
/* Light shadows */
|
|
129
120
|
--expo-theme-shadows-none: 0 0 transparent;
|
|
130
121
|
--expo-theme-shadows-xs: 0 1px 3px rgba(0, 0, 0, 0.025),
|
|
@@ -228,26 +219,17 @@
|
|
|
228
219
|
--expo-theme-button-primary-destructive-text: var(--expo-color-white);
|
|
229
220
|
--expo-theme-button-primary-destructive-disabled-background: var(--red6);
|
|
230
221
|
--expo-theme-button-primary-destructive-disabled-border: var(--red6);
|
|
231
|
-
--expo-theme-button-primary-destructive-disabled-text: var(--
|
|
222
|
+
--expo-theme-button-primary-destructive-disabled-text: var(--red12);
|
|
232
223
|
|
|
233
224
|
--expo-theme-button-secondary-destructive-background: var(--red3);
|
|
234
225
|
--expo-theme-button-secondary-destructive-border: var(--red7);
|
|
235
226
|
--expo-theme-button-secondary-destructive-hover: var(--red2);
|
|
236
227
|
--expo-theme-button-secondary-destructive-icon: var(--red9);
|
|
237
|
-
--expo-theme-button-secondary-destructive-text: var(--
|
|
228
|
+
--expo-theme-button-secondary-destructive-text: var(--red11);
|
|
238
229
|
--expo-theme-button-secondary-destructive-disabled-background: var(--red2);
|
|
239
230
|
--expo-theme-button-secondary-destructive-disabled-border: var(--red6);
|
|
240
231
|
--expo-theme-button-secondary-destructive-disabled-text: var(--red10);
|
|
241
232
|
|
|
242
|
-
/* Project icon backgrounds */
|
|
243
|
-
--expo-theme-project-blue: linear-gradient(#537296, #395a80);
|
|
244
|
-
--expo-theme-project-green: linear-gradient(#4b7d56, #32633d);
|
|
245
|
-
--expo-theme-project-yellow: linear-gradient(#a67f35, #8a6319);
|
|
246
|
-
--expo-theme-project-orange: linear-gradient(#ab744d, #8c5731);
|
|
247
|
-
--expo-theme-project-red: linear-gradient(#b25656, #8c3838);
|
|
248
|
-
--expo-theme-project-pink: linear-gradient(#995c81, #8a4c71);
|
|
249
|
-
--expo-theme-project-purple: linear-gradient(#715c99, #4e3973);
|
|
250
|
-
|
|
251
233
|
/* Dark shadows */
|
|
252
234
|
--expo-theme-shadows-none: 0 0 transparent;
|
|
253
235
|
--expo-theme-shadows-xs: 0 1px 3px rgba(0, 0, 0, 0.3),
|
|
@@ -271,4 +253,4 @@
|
|
|
271
253
|
:root {
|
|
272
254
|
--expo-theme-heading-base-font-size: 16px;
|
|
273
255
|
}
|
|
274
|
-
}
|
|
256
|
+
}
|
package/dist/index.d.ts
CHANGED