@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 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
- ## Get started
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
- ## Changing Tailwind styles
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 tsc in **packages/styleguide**
44
+ - Run `yarn build` in **packages/styleguide**
17
45
  - Navigate to **example-web** and restart the dev server
@@ -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(--red11);
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(--expo-color-white);
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
@@ -3,3 +3,4 @@ export * from './src/logos';
3
3
  export { shadows } from './src/styles/shadows';
4
4
  export { theme } from './src/styles/themes';
5
5
  export { typography } from './src/styles/typography';
6
+ export { mergeClasses } from './src/helpers/mergeClasses';