@lmvz-ds/styles 0.14.0

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/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@lmvz-ds/styles",
3
+ "private": false,
4
+ "version": "0.14.0",
5
+ "description": "The styles of the design system",
6
+ "author": "Patrick Nemenz <patrick.nemenz@adesso.at>",
7
+ "volta": {
8
+ "extends": "../../package.json"
9
+ },
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "files": [
14
+ "dist/",
15
+ "assets/"
16
+ ],
17
+ "exports": {
18
+ "./*": "./dist/*",
19
+ "./assets/*": "./assets/*"
20
+ },
21
+ "unpkg": "dist/themes/all.css",
22
+ "license": "UNLICENSED",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://bitbucket.org/lmvz/lmvz-ds"
26
+ },
27
+ "scripts": {
28
+ "build": "vite build --config vite.config.ts && cp ./src/no-transform/*.css ./dist/",
29
+ "lint": "stylelint \"src/**/*.css\" --config ./stylelint.config.mjs"
30
+ },
31
+ "nx": {
32
+ "targets": {
33
+ "build": {
34
+ "cache": true,
35
+ "dependsOn": [
36
+ "^build"
37
+ ],
38
+ "outputs": [
39
+ "{projectRoot}/dist"
40
+ ]
41
+ }
42
+ }
43
+ },
44
+ "devDependencies": {
45
+ "@lmvz-ds/design-tokens": "^0.14.0",
46
+ "@lmvz-ds/lib-styles": "^0.14.0",
47
+ "postcss-import": "^16.1.1",
48
+ "rollup-plugin-postcss": "^4.0.2",
49
+ "stylelint": "^17.0.0",
50
+ "stylelint-config-standard": "^40.0.0",
51
+ "stylelint-value-no-unknown-custom-properties": "file:../../stylelint-value-no-unknown-custom-properties",
52
+ "vite": "^7.3.1"
53
+ },
54
+ "gitHead": "271fe2c4dd8e113b1fba7350eccfc2fa48062625"
55
+ }
package/readme.md ADDED
@@ -0,0 +1,61 @@
1
+ # LMVZ Styles
2
+
3
+ This package contains all global design system styles for export (i.e. themes and style bundles).
4
+
5
+ See Conventions at the bottom, before editing!
6
+
7
+ ## Usage in your project
8
+
9
+ Always import one of the available themes as early in your application as possible, e.g. in your main CSS file
10
+
11
+ ```css
12
+ @import '@lmvz-ds/styles/themes/light.css';
13
+ ```
14
+
15
+ ... or in your HTML
16
+
17
+ ```html
18
+ <link rel="stylesheet" href=".../@lmvz-ds/styles/themes/light.css" />
19
+ ```
20
+
21
+ Optionally, you can then import available `style/`-Packages:
22
+
23
+ - @lmvz-ds/styles/bundles/typography.css
24
+ - @lmvz-ds/styles/bundles/button.css
25
+
26
+ These will provide styles in the global CSS scope and target native DOM elements.
27
+
28
+ ## Structure & Concepts
29
+
30
+ ### Trade-Offs and Constraints
31
+
32
+ - The full set of (base) variables must only be bundled along with themes, as a singular import.
33
+ - Themes must be provided in singular and plural forms: When a website includes only one, it must be "active" without further configuration; when a toggle is to be implemented, all themes can be imported at once and switched (using an html attribute "data-theme-lmvz-[theme]").
34
+
35
+ ### Internal Abstractions
36
+
37
+ Internal abstractions are defined in `./internal`. Layering is allowed here, but be conscious about it.
38
+
39
+ ### Bundles
40
+
41
+ These bundle abstractions and Fragments onto layers, for import into a consuming app. Bundles may provide global Component styles as [Constructable Style Sheets](https://stenciljs.com/docs/styling#constructable-stylesheets)
42
+
43
+ ### Themes
44
+
45
+ The primary function of Themes is to provide a pre-built set of Design Tokens (from the `packages/design-tokens` package) to consuming apps. They are built and exposed just like any other style Bundle.
46
+
47
+ ## Tech Setup
48
+
49
+ Styles are bundled using postcss (integrated via vite -> rollup -> postcss).
50
+
51
+ ## Conventions
52
+
53
+ - Be careful not to bloat Themes too much (e.g. by importing other Bundles), to allow for selective imports.
54
+ - Layers are not to be exposed separately, but only as part of Themes.
55
+ - Always import the Layers definition before layering your own styles.
56
+ - Only layer styles that are being exported as part of a Bundle or Theme, to otherwise allow generic re-use!
57
+ - Prefer (Component-) local style definitions over global ones.
58
+
59
+ ## TODOs
60
+
61
+ - [ ] Setup stylelint with the given Conventions