@muraldevkit/ds-foundation 2.17.0 → 2.19.0-dev-rMoq.1

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.
Files changed (40) hide show
  1. package/README.md +10 -5
  2. package/dist/fonts.css +0 -1
  3. package/dist/fonts.min.css +2 -1
  4. package/dist/foundation.css +681 -514
  5. package/dist/foundation.css.map +1 -1
  6. package/dist/foundation.min.css +2 -1
  7. package/dist/foundation.min.css.map +1 -1
  8. package/dist/tokens/contextual-variables/border.json +134 -0
  9. package/dist/tokens/contextual-variables/color.json +352 -0
  10. package/dist/tokens/contextual-variables/shadows.json +30 -0
  11. package/dist/tokens/contextual-variables/spacing.json +120 -0
  12. package/dist/tokens/contextual-variables/typography.json +232 -0
  13. package/dist/tokens/global-variables/border.json +61 -0
  14. package/dist/tokens/global-variables/color.json +636 -0
  15. package/dist/tokens/global-variables/motion.json +63 -0
  16. package/dist/tokens/global-variables/shadows.json +86 -0
  17. package/dist/tokens/global-variables/spacing.json +60 -0
  18. package/dist/tokens/global-variables/typography.json +208 -0
  19. package/package.json +5 -15
  20. package/src/styles/_tokens.scss +781 -0
  21. package/src/styles/contextual-variables/index.scss +0 -3
  22. package/src/styles/contextual-variables/spacing.scss +8 -169
  23. package/src/styles/contextual-variables/typography.scss +9 -374
  24. package/src/styles/index.scss +10 -10
  25. package/dist/tokens/border.json +0 -39
  26. package/dist/tokens/color.json +0 -419
  27. package/dist/tokens/motion.json +0 -41
  28. package/dist/tokens/shadows.json +0 -21
  29. package/dist/tokens/spacing.json +0 -46
  30. package/dist/tokens/typography.json +0 -152
  31. package/src/styles/contextual-variables/border.scss +0 -200
  32. package/src/styles/contextual-variables/color.scss +0 -519
  33. package/src/styles/contextual-variables/shadows.scss +0 -44
  34. package/src/styles/global-variables/border.scss +0 -65
  35. package/src/styles/global-variables/color.scss +0 -784
  36. package/src/styles/global-variables/index.scss +0 -7
  37. package/src/styles/global-variables/motion.scss +0 -65
  38. package/src/styles/global-variables/shadows.scss +0 -39
  39. package/src/styles/global-variables/spacing.scss +0 -79
  40. package/src/styles/global-variables/typography.scss +0 -203
package/README.md CHANGED
@@ -33,15 +33,18 @@ Under `src/styles` you'll find the foundation styles of the design system that a
33
33
 
34
34
  #### Noteworthy files
35
35
 
36
+ - **\_tokens.scss** — **Generated by Style Dictionary** from `src/tokens/**/*.json` during `npm run build`. Declares every `--mrl-*` custom property at `:root`. Committed to the repo as a verified snapshot of what the JSON compiles to. **Do not edit by hand** — edit the JSON sources instead.
36
37
  - **\_functions.scss** - Helper and utility functions used to reduce repetitive code.
37
38
  - **\_mixins.scss** - Helper and utility mixins used for reducing repetitive code when the output is CSS.
38
- - **global-variables/\*.scss** - Uses Sass maps to export global tokens as CSS variables for external use.
39
- - **contextual-variables/\*.scss** - Uses Sass maps to generate contextual token CSS variables for use across components and applications.
39
+ - **global-variables/breakpoints.scss** — Sass-only breakpoint variables (`$mrl-breakpoint-01..05`). Lives outside the JSON because `@media` queries cannot reference `var(--…)`.
40
+ - **contextual-variables/\*.scss** — Viewport-responsive overrides on top of the JSON-sourced custom properties. Used for the small set of tokens whose value changes inside `@media` blocks (Style Dictionary emits a flat `:root {}` and cannot model media queries).
40
41
  - **baseline.scss** - Ensures modern, cross-browser element rendering. Based off of [Normalize.css](https://necolas.github.io/normalize.css/).
41
42
  - **grid.scss** - Utility classes to allow applications to create consistent layouts.
42
- - **index.scss** - Collection of all SCSS modules in the `styles` directory **except** `fonts.scss`.
43
+ - **index.scss** - Collection of all SCSS modules in the `styles` directory **except** `fonts.scss`. Forwards `_tokens` first.
43
44
  - **fonts.scss** - Collection of font styles for loading fonts - compiles separately from other scss files.
44
45
 
46
+ The authored source of truth for every token is the DTCG-format JSON under `src/tokens/global-variables/` and `src/tokens/contextual-variables/`. See [`architecture.md`](./architecture.md) for the full pipeline.
47
+
45
48
  Applications are encouraged to use these files in their custom implementations to assist with alignment and consistency as Mural's UI design updates.
46
49
 
47
50
  ## Usage
@@ -68,12 +71,14 @@ To support the a more developer friendly environment, the design system provides
68
71
 
69
72
  #### CSS files
70
73
 
71
- To transpile the SCSS and get the CSS files, run:
74
+ To compile the DTCG token JSON into `_tokens.scss` and then transpile the SCSS to CSS, run:
72
75
 
73
76
  ```bash
74
- npm run build:styles
77
+ npm run build
75
78
  ```
76
79
 
80
+ This runs `build.mjs`, which (1) executes Style Dictionary to regenerate `src/styles/_tokens.scss` from `src/tokens/**/*.json` and (2) compiles the Sass entry points to expanded + minified CSS with source maps. The DTCG JSON is also copied to `dist/tokens/` for downstream tooling.
81
+
77
82
  The design system provides compiled and minified versions of the baseline foundation styles and font declarations. The available CSS files are:
78
83
 
79
84
  1. `@muraldevkit/ds-foundation/dist/foundation.css`
package/dist/fonts.css CHANGED
@@ -41,5 +41,4 @@
41
41
  font-weight: 500;
42
42
  src: url("../assets/fonts/STKBureau-SerifBook.12072022.woff2") format("woff2");
43
43
  }
44
-
45
44
  /*# sourceMappingURL=fonts.css.map */
@@ -1 +1,2 @@
1
- .mrl-u-focus-wrapper{position:relative}@font-face{font-family:abcsocial;font-style:normal;font-weight:400;src:url("../assets/fonts/ABCSocial-Regular.12072022.woff2") format("woff2")}@font-face{font-family:abcsocial;font-style:normal;font-weight:500;src:url("../assets/fonts/ABCSocial-Medium.12072022.woff2") format("woff2")}@font-face{font-family:abcsocial;font-style:normal;font-weight:700;src:url("../assets/fonts/ABCSocial-Bold.12072022.woff2") format("woff2")}@font-face{font-family:abcsocial;font-style:normal;font-weight:800;src:url("../assets/fonts/ABCSocial-Black.12072022.woff2") format("woff2")}@font-face{font-family:stkbureau;font-style:normal;font-weight:400;src:url("../assets/fonts/STKBureau-SerifLight.12072022.woff2") format("woff2")}@font-face{font-family:stkbureau;font-style:normal;font-weight:500;src:url("../assets/fonts/STKBureau-SerifBook.12072022.woff2") format("woff2")}/*# sourceMappingURL=fonts.min.css.map */
1
+ .mrl-u-focus-wrapper{position:relative}@font-face{font-family:abcsocial;font-style:normal;font-weight:400;src:url("../assets/fonts/ABCSocial-Regular.12072022.woff2") format("woff2")}@font-face{font-family:abcsocial;font-style:normal;font-weight:500;src:url("../assets/fonts/ABCSocial-Medium.12072022.woff2") format("woff2")}@font-face{font-family:abcsocial;font-style:normal;font-weight:700;src:url("../assets/fonts/ABCSocial-Bold.12072022.woff2") format("woff2")}@font-face{font-family:abcsocial;font-style:normal;font-weight:800;src:url("../assets/fonts/ABCSocial-Black.12072022.woff2") format("woff2")}@font-face{font-family:stkbureau;font-style:normal;font-weight:400;src:url("../assets/fonts/STKBureau-SerifLight.12072022.woff2") format("woff2")}@font-face{font-family:stkbureau;font-style:normal;font-weight:500;src:url("../assets/fonts/STKBureau-SerifBook.12072022.woff2") format("woff2")}
2
+ /*# sourceMappingURL=fonts.min.css.map */