@gospore/theme 1.0.129 → 1.0.130
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 +12 -22
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,37 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Provides the base styling primitives for the entire Design System: a Vue
|
|
4
4
|
`<Theme>` component that toggles dark/light mode, runtime helpers for storing
|
|
5
|
-
the preferred mode, a `<ThemeSwitcher>` dropdown, and the
|
|
6
|
-
|
|
5
|
+
the preferred mode, a `<ThemeSwitcher>` dropdown, and the compiled token bundle
|
|
6
|
+
(`theme.css`) that exposes colors, typography, spacing, elevation, etc.
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
|
|
11
|
+
npm install @gospore/theme
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Install Font Awesome + `what-input` if you plan to use the optional theme
|
|
15
|
-
switcher. The package ships compiled CSS
|
|
15
|
+
switcher. The package ships compiled CSS plus the Vue utilities listed above.
|
|
16
16
|
|
|
17
17
|
## Loading tokens
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
`component-bundle.less` directly.
|
|
19
|
+
Import the bundled CSS once near your app entry point so the shared tokens and
|
|
20
|
+
dark-mode rules are available to every component:
|
|
22
21
|
|
|
23
22
|
```js
|
|
24
|
-
//
|
|
25
|
-
import
|
|
26
|
-
|
|
27
|
-
export default defineConfig({
|
|
28
|
-
css: {
|
|
29
|
-
preprocessorOptions: {
|
|
30
|
-
less: {
|
|
31
|
-
additionalData: '@import "@gospore/theme/src/component-bundle.less";\n',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
});
|
|
23
|
+
// main.ts
|
|
24
|
+
import "@gospore/theme/theme.css";
|
|
36
25
|
```
|
|
37
26
|
|
|
38
27
|
## Theme component
|
|
@@ -77,9 +66,10 @@ use it with `v-model`.
|
|
|
77
66
|
|
|
78
67
|
## Utility files
|
|
79
68
|
|
|
80
|
-
- `src
|
|
81
|
-
`
|
|
82
|
-
|
|
69
|
+
- Token source files live under `src/` (`basic.less`, `styles.less`,
|
|
70
|
+
`colors.css`, `fonts.css`, `sizing.css`, `elevation.css`, `transitions.css`,
|
|
71
|
+
`borders.css`, `layering.css`). They are bundled into `theme.css`; when
|
|
72
|
+
contributing inside this repo you can import the individual files as needed.
|
|
83
73
|
- `modeStorage.js`: helpers for reading/writing the current theme mode.
|
|
84
74
|
|
|
85
75
|
## Accessibility & motion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gospore/theme",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.130",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Gospore",
|
|
6
6
|
"type": "module",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"vue": "^3.4.20"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@gospore/dropdown-menu": "^1.0.
|
|
31
|
+
"@gospore/dropdown-menu": "^1.0.98",
|
|
32
32
|
"what-input": "^5.2.12"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -36,6 +36,6 @@
|
|
|
36
36
|
"unplugin-vue-macros": "^2.14.5",
|
|
37
37
|
"vite": "^7.1.12"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "52ae3a10ae28da88ed7bfb64c3929a22ffc4d03f",
|
|
40
40
|
"types": "./dist/index.d.ts"
|
|
41
41
|
}
|