@vsn-ux/gaia-styles 1.0.0-alpha.2
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 +125 -0
- package/dist/all-no-reset-10pt.css +994 -0
- package/dist/all-no-reset.css +994 -0
- package/dist/all.css +1135 -0
- package/dist/base.css +6 -0
- package/dist/components/avatar.css +34 -0
- package/dist/components/badge.css +116 -0
- package/dist/components/button.css +115 -0
- package/dist/components/card.css +38 -0
- package/dist/components/checkbox.css +89 -0
- package/dist/components/form-field.css +28 -0
- package/dist/components/input.css +71 -0
- package/dist/components/menu.css +61 -0
- package/dist/components/radio-button.css +107 -0
- package/dist/components/segmented-control.css +74 -0
- package/dist/components/text-area.css +61 -0
- package/dist/components/tooltip.css +124 -0
- package/dist/components.css +765 -0
- package/dist/design-tokens.css +159 -0
- package/dist/design-tokens.d.ts +167 -0
- package/dist/design-tokens.js +1654 -0
- package/package.json +73 -0
- package/src/design-tokens/dtcg-tokens.json +504 -0
- package/src/font/Inter-Bold.woff2 +0 -0
- package/src/font/Inter-BoldItalic.woff2 +0 -0
- package/src/font/Inter-Italic.woff2 +0 -0
- package/src/font/Inter-Medium.woff2 +0 -0
- package/src/font/Inter-MediumItalic.woff2 +0 -0
- package/src/font/Inter-Regular.woff2 +0 -0
- package/src/font/Inter-SemiBold.woff2 +0 -0
- package/src/font/Inter-SemiBoldItalic.woff2 +0 -0
- package/src/font/inter.css +56 -0
- package/src/styles/all-no-reset-10pt.css +12 -0
- package/src/styles/all-no-reset.css +7 -0
- package/src/styles/all.css +8 -0
- package/src/styles/base.css +3 -0
- package/src/styles/components/avatar.css +11 -0
- package/src/styles/components/badge.css +39 -0
- package/src/styles/components/button.css +83 -0
- package/src/styles/components/card.css +19 -0
- package/src/styles/components/checkbox.css +66 -0
- package/src/styles/components/form-field.css +11 -0
- package/src/styles/components/input.css +40 -0
- package/src/styles/components/menu.css +28 -0
- package/src/styles/components/radio-button.css +44 -0
- package/src/styles/components/segmented-control.css +40 -0
- package/src/styles/components/text-area.css +27 -0
- package/src/styles/components/tooltip.css +92 -0
- package/src/styles/components.css +12 -0
- package/src/styles/tailwind.css +2 -0
- package/src/styles/theme.css +68 -0
package/README.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Gaia Styles and Utilities
|
|
2
|
+
|
|
3
|
+
A collection of utilities for Gaia design system:
|
|
4
|
+
|
|
5
|
+
🚀 Design Tokens in [DTCG](https://tr.designtokens.org/format/) format.\
|
|
6
|
+
🚀 CSS styles in [BEM](https://getbem.com/) methodology.\
|
|
7
|
+
🚀 [Tailwindcss](https://tailwindcss.com/) theme palette and components.\
|
|
8
|
+
🚀 Follows [Semantic Versioning](https://semver.org/).
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm i @vsn-ux/gaia-styles
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Upon installation, choose what you need:
|
|
17
|
+
|
|
18
|
+
- Looking for regular CSS styles? Check out [CSS Styles](#css-styles).
|
|
19
|
+
- A fan of Tailwindcss? Jump into [Tailwindcss](#tailwindcss) section.
|
|
20
|
+
- Searching for primitives like Design Tokens? See [Design Tokens](#design-tokens).
|
|
21
|
+
|
|
22
|
+
## Design Tokens
|
|
23
|
+
|
|
24
|
+
Low-level primitives that are useful for building themes and style systems.\
|
|
25
|
+
This library provides design tokens in three formats:
|
|
26
|
+
|
|
27
|
+
- Official [DTCG](https://tr.designtokens.org/format/) format in JSON, which can be imported from `@vsn-ux/gaia-styles/design-tokens.json`. Use this format if you want to compile the tokens into other formats.
|
|
28
|
+
- As CSS variables, which can be imported from `@vsn-ux/gaia-styles/design-tokens.css`. These are generated from the DTCG tokens using [Terrazzo](https://terrazzo.app/).
|
|
29
|
+
- JS format, which can be imported from `@vsn-ux/gaia-styles/design-tokens`. These are generated from the DTCG tokens using [Terrazzo](https://terrazzo.app/).
|
|
30
|
+
|
|
31
|
+
## CSS Styles
|
|
32
|
+
|
|
33
|
+
### Everything: Reset + Design Tokens + Base Styles + Components
|
|
34
|
+
|
|
35
|
+
Ideal for fresh projects or once fully migrated.
|
|
36
|
+
|
|
37
|
+
> \*Reset is a stylesheet designed to reduce browser inconsistencies. [Read more](https://tailwindcss.com/docs/preflight).
|
|
38
|
+
|
|
39
|
+
```css
|
|
40
|
+
@import '@vsn-ux/gaia-styles/all.css';
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
> Note: This does not include the Inter font faces. Read [Inter font](#inter-font) section for more information.
|
|
44
|
+
|
|
45
|
+
### Design Tokens + Base Styles + Components
|
|
46
|
+
|
|
47
|
+
Ideal for migrating existing projects. Based on default 16px root font size.
|
|
48
|
+
|
|
49
|
+
```css
|
|
50
|
+
@import '@vsn-ux/gaia-styles/all-no-reset.css';
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
> Note: This does not include the Inter font faces. Read [Inter font](#inter-font) section for more information.
|
|
54
|
+
|
|
55
|
+
### Design Tokens + Global Styles + Components (based on 10px font size)
|
|
56
|
+
|
|
57
|
+
Based on default 10px root font size, handy if coming from [VUD](https://vud.visma.com).
|
|
58
|
+
|
|
59
|
+
```css
|
|
60
|
+
@import '@vsn-ux/gaia-styles/all-no-reset-10pt.css';
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
> Note: This does not include the Inter font faces. Read [Inter font](#inter-font) section for more information.
|
|
64
|
+
|
|
65
|
+
### Component styles
|
|
66
|
+
|
|
67
|
+
Want to import just the components without reset and base styles?
|
|
68
|
+
|
|
69
|
+
```css
|
|
70
|
+
/* design tokens are required for components to work */
|
|
71
|
+
@import '@vsn-ux/gaia-styles/design-tokens.css';
|
|
72
|
+
|
|
73
|
+
/* import all components at once */
|
|
74
|
+
@import '@vsn-ux/gaia-styles/components.css';
|
|
75
|
+
/* or pick the ones you need */
|
|
76
|
+
@import '@vsn-ux/gaia-styles/components/button.css';
|
|
77
|
+
@import '@vsn-ux/gaia-styles/components/checkbox.css';
|
|
78
|
+
/* ... */
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Base styles
|
|
82
|
+
|
|
83
|
+
Want to import just the components without reset and base styles?
|
|
84
|
+
|
|
85
|
+
```css
|
|
86
|
+
/* design tokens are required for base styles to work */
|
|
87
|
+
@import '@vsn-ux/gaia-styles/design-tokens.css';
|
|
88
|
+
|
|
89
|
+
@import '@vsn-ux/gaia-styles/base.css';
|
|
90
|
+
/* ... */
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Inter font
|
|
94
|
+
|
|
95
|
+
The package includes the Inter font faces. In case you want to load them by other means, look at [rsms.me/inter](https://rsms.me/inter/).
|
|
96
|
+
|
|
97
|
+
```css
|
|
98
|
+
@import '@vsn-ux/gaia-styles/font/inter.css';
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Tailwindcss
|
|
102
|
+
|
|
103
|
+
❗ This is for the latest version **v4** and above.
|
|
104
|
+
|
|
105
|
+
Instead of importing `@import "tailwindcss";`, import the following:
|
|
106
|
+
|
|
107
|
+
```css
|
|
108
|
+
@import '@vsn-ux/gaia-styles/tailwindcss';
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
In case you want to customize something, use this:
|
|
112
|
+
|
|
113
|
+
```css
|
|
114
|
+
@import '@vsn-ux/gaia-styles/design-tokens.css';
|
|
115
|
+
|
|
116
|
+
@layer theme, base, components, utilities;
|
|
117
|
+
|
|
118
|
+
@import 'tailwindcss/preflight.css' layer(base);
|
|
119
|
+
@import 'tailwindcss/utilities.css' layer(utilities);
|
|
120
|
+
@import '@vsn-ux/gaia-styles/tailwindcss/theme.css' layer(theme);
|
|
121
|
+
@import '@vsn-ux/gaia-styles/tailwindcss/base.css' layer(base);
|
|
122
|
+
@import '@vsn-ux/gaia-styles/tailwindcss/components.css' layer(components);
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
> The following example is the exact content of `@vsn-ux/gaia-styles/tailwindcss`.
|