@juwel-development/design-system 1.1.0 → 2.1.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.
Files changed (67) hide show
  1. package/README.md +19 -3
  2. package/dist/design-system.js +560 -43
  3. package/dist/index.css +1 -1
  4. package/dist/types/Display/Brandmark/Brandmark.d.ts +50 -0
  5. package/dist/types/Display/Checklist/Checklist.d.ts +26 -0
  6. package/dist/types/Display/DefinitionList/DefinitionList.d.ts +41 -0
  7. package/dist/types/Display/Figure/Figure.d.ts +52 -0
  8. package/dist/types/Display/Rail/Rail.d.ts +54 -0
  9. package/dist/types/Display/Table/Table.d.ts +61 -0
  10. package/dist/types/Display/Typography/Eyebrow/Eyebrow.d.ts +26 -0
  11. package/dist/types/Display/Typography/H1/H1.d.ts +27 -0
  12. package/dist/types/Display/Typography/H2/H2.d.ts +24 -0
  13. package/dist/types/Display/Typography/H3/H3.d.ts +23 -0
  14. package/dist/types/Display/Typography/H4/H4.d.ts +22 -0
  15. package/dist/types/Display/Typography/H5/H5.d.ts +23 -0
  16. package/dist/types/Display/Typography/H6/H6.d.ts +23 -0
  17. package/dist/types/Display/Typography/P/P.d.ts +25 -0
  18. package/dist/types/Display/Typography/Prose/Prose.d.ts +42 -0
  19. package/dist/types/Interaction/Button/Button.d.ts +7 -3
  20. package/dist/types/Interaction/Input/Input.d.ts +31 -0
  21. package/dist/types/Interaction/Link/Link.d.ts +27 -0
  22. package/dist/types/Interaction/TextArea/TextArea.d.ts +27 -0
  23. package/dist/types/Layout/Footer/Footer.d.ts +34 -0
  24. package/dist/types/Layout/Form/Form.d.ts +31 -0
  25. package/dist/types/Layout/Header/Header.d.ts +41 -0
  26. package/dist/types/Layout/Hero/Hero.d.ts +46 -0
  27. package/dist/types/Layout/PageHead/PageHead.d.ts +36 -0
  28. package/dist/types/Layout/Section/Section.d.ts +38 -0
  29. package/dist/types/Theme/Palette.d.ts +25 -6
  30. package/dist/types/Theme/renderTokens.d.ts +16 -3
  31. package/dist/types/index.d.ts +25 -1
  32. package/package.json +5 -1
  33. package/src/Display/.gitkeep +0 -0
  34. package/src/Display/Brandmark/Brandmark.tsx +97 -0
  35. package/src/Display/Checklist/Checklist.tsx +75 -0
  36. package/src/Display/DefinitionList/DefinitionList.tsx +90 -0
  37. package/src/Display/Figure/Figure.tsx +116 -0
  38. package/src/Display/Rail/Rail.tsx +108 -0
  39. package/src/Display/Table/Table.tsx +191 -0
  40. package/src/Display/Typography/Eyebrow/Eyebrow.tsx +46 -0
  41. package/src/Display/Typography/H1/H1.tsx +46 -0
  42. package/src/Display/Typography/H2/H2.tsx +43 -0
  43. package/src/Display/Typography/H3/H3.tsx +41 -0
  44. package/src/Display/Typography/H4/H4.tsx +40 -0
  45. package/src/Display/Typography/H5/H5.tsx +41 -0
  46. package/src/Display/Typography/H6/H6.tsx +41 -0
  47. package/src/Display/Typography/P/P.tsx +38 -0
  48. package/src/Display/Typography/Prose/Prose.tsx +91 -0
  49. package/src/Interaction/Button/Button.tsx +15 -10
  50. package/src/Interaction/Input/Input.tsx +120 -0
  51. package/src/Interaction/Link/Link.tsx +70 -0
  52. package/src/Interaction/TextArea/TextArea.tsx +110 -0
  53. package/src/Layout/.gitkeep +0 -0
  54. package/src/Layout/Footer/Footer.tsx +60 -0
  55. package/src/Layout/Form/Form.tsx +102 -0
  56. package/src/Layout/Header/Header.tsx +84 -0
  57. package/src/Layout/Hero/Hero.tsx +73 -0
  58. package/src/Layout/PageHead/PageHead.tsx +79 -0
  59. package/src/Layout/Section/Section.tsx +79 -0
  60. package/src/Theme/Palette.ts +38 -12
  61. package/src/Theme/renderTokens.ts +255 -18
  62. package/src/index.ts +25 -1
  63. package/src/styles.dark.css +9 -0
  64. package/src/styles.light.css +9 -0
  65. package/src/tokens.css +118 -9
  66. package/src/tokens.dark.css +169 -0
  67. package/src/tokens.light.css +169 -0
package/README.md CHANGED
@@ -42,16 +42,32 @@ on an ancestor re-points every token underneath it.
42
42
  A product re-themes the whole system by supplying its own values for the same role
43
43
  names, which is what lets one design system serve several brands.
44
44
 
45
+ ### Single-theme builds
46
+
47
+ `styles.css` and `tokens.css` carry both colour sets, so a product that ships only one
48
+ theme still emits a `.dark` block it can never remove. Two opt-in exports carry a single
49
+ theme's values in `:root` with no `.dark` block and no `dark:` variant:
50
+
51
+ ```tsx
52
+ // a light-only product
53
+ import '@juwel-development/design-system/styles.light.css';
54
+ // a dark-only product
55
+ import '@juwel-development/design-system/styles.dark.css';
56
+ ```
57
+
58
+ The tokens-only equivalents are `tokens.light.css` and `tokens.dark.css`. All three
59
+ variants are generated from the same palette, so they cannot drift.
60
+
45
61
  ### Changing the palette
46
62
 
47
- `src/Theme/Palette.ts` is the single source of truth. `src/tokens.css` is generated
48
- from it:
63
+ `src/Theme/Palette.ts` is the single source of truth. `src/tokens.css` and its
64
+ single-theme siblings `tokens.light.css` and `tokens.dark.css` are generated from it:
49
65
 
50
66
  ```bash
51
67
  npm run build:tokens
52
68
  ```
53
69
 
54
- The generated file is committed, and a test pins it to the palette - editing the
70
+ The generated files are committed, and a test pins each to the palette - editing the
55
71
  palette without regenerating fails the suite rather than shipping stale colours.
56
72
 
57
73
  ## Development