@graupl/graupl 1.0.0-alpha.2 → 1.0.0-alpha.3

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 (48) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/base/form/form.css +1 -85
  3. package/dist/base/form/form.css.map +1 -1
  4. package/dist/base/link/link.css +1 -25
  5. package/dist/base/link/link.css.map +1 -1
  6. package/dist/component/button/button.css +1 -61
  7. package/dist/component/button/button.css.map +1 -1
  8. package/dist/graupl.css +1 -320
  9. package/dist/graupl.css.map +1 -1
  10. package/dist/layout/columns/columns.css +1 -40
  11. package/dist/layout/columns/columns.css.map +1 -1
  12. package/dist/layout/container/container.css +1 -37
  13. package/dist/layout/container/container.css.map +1 -1
  14. package/dist/state/focus/focus.css +1 -9
  15. package/dist/state/focus/focus.css.map +1 -1
  16. package/dist/theme/theme.css +1 -69
  17. package/dist/theme/theme.css.map +1 -1
  18. package/dist/utilities/background/background.css +1 -0
  19. package/dist/utilities/colors/colors.css +2 -0
  20. package/dist/utilities/colors/colors.css.map +1 -0
  21. package/docs/.vitepress/config.js +41 -1
  22. package/docs/.vitepress/theme/custom.scss +29 -29
  23. package/docs/compiling-graupl.md +56 -0
  24. package/docs/introduction.md +5 -0
  25. package/index.html +6 -2
  26. package/package.json +27 -1
  27. package/postcss.config.cjs +1 -1
  28. package/scss/_defaults.scss +3 -0
  29. package/scss/_index.scss +14 -0
  30. package/scss/_init.scss +3 -0
  31. package/scss/base/form/_variables.scss +8 -8
  32. package/scss/base/link/_variables.scss +5 -8
  33. package/scss/component/button/_defaults.scss +2 -0
  34. package/scss/component/button/_index.scss +47 -19
  35. package/scss/component/button/_variables.scss +36 -10
  36. package/scss/functions/_important.scss +11 -0
  37. package/scss/functions/_theme.scss +11 -0
  38. package/scss/graupl.scss +1 -5
  39. package/scss/layout/columns/_index.scss +1 -1
  40. package/scss/state/focus/_variables.scss +3 -3
  41. package/scss/theme/_defaults.scss +48 -31
  42. package/scss/theme/_index.scss +13 -66
  43. package/scss/theme/_variables.scss +92 -452
  44. package/scss/utilities/_index.scss +3 -0
  45. package/scss/utilities/colors/_defaults.scss +7 -0
  46. package/scss/utilities/colors/_index.scss +22 -0
  47. package/scss/utilities/colors/_variables.scss +3 -0
  48. package/scss/utilities/colors/colors.scss +3 -0
@@ -1,70 +1,2 @@
1
- @layer graupl.theme{
2
- :root{
3
- background:var(--graupl-theme-active--primary--100, var(--graupl-theme-light--primary--100, var(--graupl-primary--100, hsl(219, 100%, 95%))));
4
- color:var(--graupl-theme-active--primary--900, var(--graupl-theme-light--primary--900, var(--graupl-primary--900, hsl(219, 100%, 10%))));
5
- font-family:var(--graupl-font-family, system-ui, -apple-system, blinkmacsystemfont, Segoe UI, roboto, Helvetica Neue, arial, sans-serif);
6
- font-size:var(--graupl-font-size, clamp(0.85rem, 0.8rem + 0.5vw, 1.25rem));
7
- }
8
- .dark-mode{
9
- --graupl-theme-active--primary--100:var(--graupl-theme-dark--primary--100, var(--graupl-primary--900, hsl(219, 100%, 10%)));
10
- --graupl-theme-active--primary--200:var(--graupl-theme-dark--primary--200, var(--graupl-primary--800, hsl(219, 90%, 20%)));
11
- --graupl-theme-active--primary--300:var(--graupl-theme-dark--primary--300, var(--graupl-primary--700, hsl(219, 80%, 35%)));
12
- --graupl-theme-active--primary--400:var(--graupl-theme-dark--primary--400, var(--graupl-primary--600, hsl(219, 75%, 45%)));
13
- --graupl-theme-active--primary--500:var(--graupl-theme-dark--primary--500, var(--graupl-primary--500, hsl(219, 75%, 50%)));
14
- --graupl-theme-active--primary--600:var(--graupl-theme-dark--primary--600, var(--graupl-primary--400, hsl(219, 75%, 55%)));
15
- --graupl-theme-active--primary--700:var(--graupl-theme-dark--primary--700, var(--graupl-primary--300, hsl(219, 80%, 65%)));
16
- --graupl-theme-active--primary--800:var(--graupl-theme-dark--primary--800, var(--graupl-primary--200, hsl(219, 90%, 80%)));
17
- --graupl-theme-active--primary--900:var(--graupl-theme-dark--primary--900, var(--graupl-primary--100, hsl(219, 100%, 95%)));
18
- --graupl-theme-active--secondary--100:var(--graupl-theme-dark--secondary--100, var(--graupl-secondary--900, hsl(235, 40%, 10%)));
19
- --graupl-theme-active--secondary--200:var(--graupl-theme-dark--secondary--200, var(--graupl-secondary--800, hsl(235, 30%, 20%)));
20
- --graupl-theme-active--secondary--300:var(--graupl-theme-dark--secondary--300, var(--graupl-secondary--700, hsl(235, 20%, 35%)));
21
- --graupl-theme-active--secondary--400:var(--graupl-theme-dark--secondary--400, var(--graupl-secondary--600, hsl(235, 15%, 45%)));
22
- --graupl-theme-active--secondary--500:var(--graupl-theme-dark--secondary--500, var(--graupl-secondary--500, hsl(235, 15%, 50%)));
23
- --graupl-theme-active--secondary--600:var(--graupl-theme-dark--secondary--600, var(--graupl-secondary--400, hsl(235, 15%, 55%)));
24
- --graupl-theme-active--secondary--700:var(--graupl-theme-dark--secondary--700, var(--graupl-secondary--300, hsl(235, 20%, 65%)));
25
- --graupl-theme-active--secondary--800:var(--graupl-theme-dark--secondary--800, var(--graupl-secondary--200, hsl(235, 30%, 80%)));
26
- --graupl-theme-active--secondary--900:var(--graupl-theme-dark--secondary--900, var(--graupl-secondary--100, hsl(235, 40%, 95%)));
27
- --graupl-theme-active--tertiary--100:var(--graupl-theme-dark--tertiary--100, var(--graupl-tertiary--900, hsl(340, 85%, 10%)));
28
- --graupl-theme-active--tertiary--200:var(--graupl-theme-dark--tertiary--200, var(--graupl-tertiary--800, hsl(340, 75%, 20%)));
29
- --graupl-theme-active--tertiary--300:var(--graupl-theme-dark--tertiary--300, var(--graupl-tertiary--700, hsl(340, 65%, 35%)));
30
- --graupl-theme-active--tertiary--400:var(--graupl-theme-dark--tertiary--400, var(--graupl-tertiary--600, hsl(340, 60%, 45%)));
31
- --graupl-theme-active--tertiary--500:var(--graupl-theme-dark--tertiary--500, var(--graupl-tertiary--500, hsl(340, 60%, 50%)));
32
- --graupl-theme-active--tertiary--600:var(--graupl-theme-dark--tertiary--600, var(--graupl-tertiary--400, hsl(340, 60%, 55%)));
33
- --graupl-theme-active--tertiary--700:var(--graupl-theme-dark--tertiary--700, var(--graupl-tertiary--300, hsl(340, 65%, 65%)));
34
- --graupl-theme-active--tertiary--800:var(--graupl-theme-dark--tertiary--800, var(--graupl-tertiary--200, hsl(340, 75%, 80%)));
35
- --graupl-theme-active--tertiary--900:var(--graupl-theme-dark--tertiary--900, var(--graupl-tertiary--100, hsl(340, 85%, 95%)));
36
- color-scheme:dark;
37
- }
38
- .light-mode{
39
- --graupl-theme-active--primary--100:var(--graupl-theme-light--primary--100, var(--graupl-primary--100, hsl(219, 100%, 95%)));
40
- --graupl-theme-active--primary--200:var(--graupl-theme-light--primary--200, var(--graupl-primary--200, hsl(219, 90%, 80%)));
41
- --graupl-theme-active--primary--300:var(--graupl-theme-light--primary--300, var(--graupl-primary--300, hsl(219, 80%, 65%)));
42
- --graupl-theme-active--primary--400:var(--graupl-theme-light--primary--400, var(--graupl-primary--400, hsl(219, 75%, 55%)));
43
- --graupl-theme-active--primary--500:var(--graupl-theme-light--primary--500, var(--graupl-primary--500, hsl(219, 75%, 50%)));
44
- --graupl-theme-active--primary--600:var(--graupl-theme-light--primary--600, var(--graupl-primary--600, hsl(219, 75%, 45%)));
45
- --graupl-theme-active--primary--700:var(--graupl-theme-light--primary--700, var(--graupl-primary--700, hsl(219, 80%, 35%)));
46
- --graupl-theme-active--primary--800:var(--graupl-theme-light--primary--800, var(--graupl-primary--800, hsl(219, 90%, 20%)));
47
- --graupl-theme-active--primary--900:var(--graupl-theme-light--primary--900, var(--graupl-primary--900, hsl(219, 100%, 10%)));
48
- --graupl-theme-active--secondary--100:var(--graupl-theme-light--secondary--100, var(--graupl-secondary--100, hsl(235, 40%, 95%)));
49
- --graupl-theme-active--secondary--200:var(--graupl-theme-light--secondary--200, var(--graupl-secondary--200, hsl(235, 30%, 80%)));
50
- --graupl-theme-active--secondary--300:var(--graupl-theme-light--secondary--300, var(--graupl-secondary--300, hsl(235, 20%, 65%)));
51
- --graupl-theme-active--secondary--400:var(--graupl-theme-light--secondary--400, var(--graupl-secondary--400, hsl(235, 15%, 55%)));
52
- --graupl-theme-active--secondary--500:var(--graupl-theme-light--secondary--500, var(--graupl-secondary--500, hsl(235, 15%, 50%)));
53
- --graupl-theme-active--secondary--600:var(--graupl-theme-light--secondary--600, var(--graupl-secondary--600, hsl(235, 15%, 45%)));
54
- --graupl-theme-active--secondary--700:var(--graupl-theme-light--secondary--700, var(--graupl-secondary--700, hsl(235, 20%, 35%)));
55
- --graupl-theme-active--secondary--800:var(--graupl-theme-light--secondary--800, var(--graupl-secondary--800, hsl(235, 30%, 20%)));
56
- --graupl-theme-active--secondary--900:var(--graupl-theme-light--secondary--900, var(--graupl-secondary--900, hsl(235, 40%, 10%)));
57
- --graupl-theme-active--tertiary--100:var(--graupl-theme-light--tertiary--100, var(--graupl-tertiary--100, hsl(340, 85%, 95%)));
58
- --graupl-theme-active--tertiary--200:var(--graupl-theme-light--tertiary--200, var(--graupl-tertiary--200, hsl(340, 75%, 80%)));
59
- --graupl-theme-active--tertiary--300:var(--graupl-theme-light--tertiary--300, var(--graupl-tertiary--300, hsl(340, 65%, 65%)));
60
- --graupl-theme-active--tertiary--400:var(--graupl-theme-light--tertiary--400, var(--graupl-tertiary--400, hsl(340, 60%, 55%)));
61
- --graupl-theme-active--tertiary--500:var(--graupl-theme-light--tertiary--500, var(--graupl-tertiary--500, hsl(340, 60%, 50%)));
62
- --graupl-theme-active--tertiary--600:var(--graupl-theme-light--tertiary--600, var(--graupl-tertiary--600, hsl(340, 60%, 45%)));
63
- --graupl-theme-active--tertiary--700:var(--graupl-theme-light--tertiary--700, var(--graupl-tertiary--700, hsl(340, 65%, 35%)));
64
- --graupl-theme-active--tertiary--800:var(--graupl-theme-light--tertiary--800, var(--graupl-tertiary--800, hsl(340, 75%, 20%)));
65
- --graupl-theme-active--tertiary--900:var(--graupl-theme-light--tertiary--900, var(--graupl-tertiary--900, hsl(340, 85%, 10%)));
66
- color-scheme:light;
67
- }
68
- }
69
-
1
+ @layer graupl.theme{:root{background:var(--graupl-theme-active--primary--100,var(--graupl-theme-light--primary--100,var(--graupl-primary--100,#e6eeff)));color:var(--graupl-theme-active--primary--900,var(--graupl-theme-light--primary--900,var(--graupl-primary--900,#001233)));font-family:var(--graupl-font-family,system-ui,-apple-system,blinkmacsystemfont,Segoe UI,roboto,Helvetica Neue,arial,sans-serif);font-size:var(--graupl-font-size,clamp(.85rem,.8rem + .5vw,1.25rem))}.dark-mode{--graupl-theme-active--primary--100:var(--graupl-theme-dark--primary--100,var(--graupl-primary--900,#001233));--graupl-theme-active--primary--200:var(--graupl-theme-dark--primary--200,var(--graupl-primary--800,#052561));--graupl-theme-active--primary--300:var(--graupl-theme-dark--primary--300,var(--graupl-primary--700,#1244a1));--graupl-theme-active--primary--400:var(--graupl-theme-dark--primary--400,var(--graupl-primary--600,#1d59c9));--graupl-theme-active--primary--500:var(--graupl-theme-dark--primary--500,var(--graupl-primary--500,#2063df));--graupl-theme-active--primary--600:var(--graupl-theme-dark--primary--600,var(--graupl-primary--400,#3672e2));--graupl-theme-active--primary--700:var(--graupl-theme-dark--primary--700,var(--graupl-primary--300,#5e90ed));--graupl-theme-active--primary--800:var(--graupl-theme-dark--primary--800,var(--graupl-primary--200,#9ebefa));--graupl-theme-active--primary--900:var(--graupl-theme-dark--primary--900,var(--graupl-primary--100,#e6eeff));--graupl-theme-active--secondary--100:var(--graupl-theme-dark--secondary--100,var(--graupl-secondary--900,#0f1124));--graupl-theme-active--secondary--200:var(--graupl-theme-dark--secondary--200,var(--graupl-secondary--800,#242642));--graupl-theme-active--secondary--300:var(--graupl-theme-dark--secondary--300,var(--graupl-secondary--700,#474a6b));--graupl-theme-active--secondary--400:var(--graupl-theme-dark--secondary--400,var(--graupl-secondary--600,#626484));--graupl-theme-active--secondary--500:var(--graupl-theme-dark--secondary--500,var(--graupl-secondary--500,#6c7093));--graupl-theme-active--secondary--600:var(--graupl-theme-dark--secondary--600,var(--graupl-secondary--400,#7b7e9d));--graupl-theme-active--secondary--700:var(--graupl-theme-dark--secondary--700,var(--graupl-secondary--300,#9497b8));--graupl-theme-active--secondary--800:var(--graupl-theme-dark--secondary--800,var(--graupl-secondary--200,#bdbfdb));--graupl-theme-active--secondary--900:var(--graupl-theme-dark--secondary--900,var(--graupl-secondary--100,#edeef7));--graupl-theme-active--tertiary--100:var(--graupl-theme-dark--tertiary--100,var(--graupl-tertiary--900,#2f0412));--graupl-theme-active--tertiary--200:var(--graupl-theme-dark--tertiary--200,var(--graupl-tertiary--800,#590d26));--graupl-theme-active--tertiary--300:var(--graupl-theme-dark--tertiary--300,var(--graupl-tertiary--700,#931f46));--graupl-theme-active--tertiary--400:var(--graupl-theme-dark--tertiary--400,var(--graupl-tertiary--600,#b82e5c));--graupl-theme-active--tertiary--500:var(--graupl-theme-dark--tertiary--500,var(--graupl-tertiary--500,#c36));--graupl-theme-active--tertiary--600:var(--graupl-theme-dark--tertiary--600,var(--graupl-tertiary--400,#d14775));--graupl-theme-active--tertiary--700:var(--graupl-theme-dark--tertiary--700,var(--graupl-tertiary--300,#e06c92));--graupl-theme-active--tertiary--800:var(--graupl-theme-dark--tertiary--800,var(--graupl-tertiary--200,#f2a6bf));--graupl-theme-active--tertiary--900:var(--graupl-theme-dark--tertiary--900,var(--graupl-tertiary--100,#fde7ef));color-scheme:dark}.light-mode{--graupl-theme-active--primary--100:var(--graupl-theme-light--primary--100,var(--graupl-primary--100,#e6eeff));--graupl-theme-active--primary--200:var(--graupl-theme-light--primary--200,var(--graupl-primary--200,#9ebefa));--graupl-theme-active--primary--300:var(--graupl-theme-light--primary--300,var(--graupl-primary--300,#5e90ed));--graupl-theme-active--primary--400:var(--graupl-theme-light--primary--400,var(--graupl-primary--400,#3672e2));--graupl-theme-active--primary--500:var(--graupl-theme-light--primary--500,var(--graupl-primary--500,#2063df));--graupl-theme-active--primary--600:var(--graupl-theme-light--primary--600,var(--graupl-primary--600,#1d59c9));--graupl-theme-active--primary--700:var(--graupl-theme-light--primary--700,var(--graupl-primary--700,#1244a1));--graupl-theme-active--primary--800:var(--graupl-theme-light--primary--800,var(--graupl-primary--800,#052561));--graupl-theme-active--primary--900:var(--graupl-theme-light--primary--900,var(--graupl-primary--900,#001233));--graupl-theme-active--secondary--100:var(--graupl-theme-light--secondary--100,var(--graupl-secondary--100,#edeef7));--graupl-theme-active--secondary--200:var(--graupl-theme-light--secondary--200,var(--graupl-secondary--200,#bdbfdb));--graupl-theme-active--secondary--300:var(--graupl-theme-light--secondary--300,var(--graupl-secondary--300,#9497b8));--graupl-theme-active--secondary--400:var(--graupl-theme-light--secondary--400,var(--graupl-secondary--400,#7b7e9d));--graupl-theme-active--secondary--500:var(--graupl-theme-light--secondary--500,var(--graupl-secondary--500,#6c7093));--graupl-theme-active--secondary--600:var(--graupl-theme-light--secondary--600,var(--graupl-secondary--600,#626484));--graupl-theme-active--secondary--700:var(--graupl-theme-light--secondary--700,var(--graupl-secondary--700,#474a6b));--graupl-theme-active--secondary--800:var(--graupl-theme-light--secondary--800,var(--graupl-secondary--800,#242642));--graupl-theme-active--secondary--900:var(--graupl-theme-light--secondary--900,var(--graupl-secondary--900,#0f1124));--graupl-theme-active--tertiary--100:var(--graupl-theme-light--tertiary--100,var(--graupl-tertiary--100,#fde7ef));--graupl-theme-active--tertiary--200:var(--graupl-theme-light--tertiary--200,var(--graupl-tertiary--200,#f2a6bf));--graupl-theme-active--tertiary--300:var(--graupl-theme-light--tertiary--300,var(--graupl-tertiary--300,#e06c92));--graupl-theme-active--tertiary--400:var(--graupl-theme-light--tertiary--400,var(--graupl-tertiary--400,#d14775));--graupl-theme-active--tertiary--500:var(--graupl-theme-light--tertiary--500,var(--graupl-tertiary--500,#c36));--graupl-theme-active--tertiary--600:var(--graupl-theme-light--tertiary--600,var(--graupl-tertiary--600,#b82e5c));--graupl-theme-active--tertiary--700:var(--graupl-theme-light--tertiary--700,var(--graupl-tertiary--700,#931f46));--graupl-theme-active--tertiary--800:var(--graupl-theme-light--tertiary--800,var(--graupl-tertiary--800,#590d26));--graupl-theme-active--tertiary--900:var(--graupl-theme-light--tertiary--900,var(--graupl-tertiary--900,#2f0412));color-scheme:light}}
70
2
  /*# sourceMappingURL=theme.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["../../scss/mixins/_layer.scss","../../scss/theme/_index.scss","../../scss/theme/_variables.scss","theme.css"],"names":[],"mappings":"AASI;ECDF;IACE,6ICkMyB;IDjMzB,wICiOyB;IDhOzB,wIC0cU;IDzcV,0EC0cQ;EC/cV;EFSA;IAEE,2HAAA;IACA,0HAAA;IACA,0HAAA;IACA,0HAAA;IACA,0HAAA;IACA,0HAAA;IACA,0HAAA;IACA,0HAAA;IACA,2HAAA;IAGA,gIAAA;IACA,gIAAA;IACA,gIAAA;IACA,gIAAA;IACA,gIAAA;IACA,gIAAA;IACA,gIAAA;IACA,gIAAA;IACA,gIAAA;IAGA,6HAAA;IACA,6HAAA;IACA,6HAAA;IACA,6HAAA;IACA,6HAAA;IACA,6HAAA;IACA,6HAAA;IACA,6HAAA;IACA,6HAAA;IAEA,iBAAA;EEbF;EFiBA;IAEE,4HAAA;IACA,2HAAA;IACA,2HAAA;IACA,2HAAA;IACA,2HAAA;IACA,2HAAA;IACA,2HAAA;IACA,2HAAA;IACA,4HAAA;IAGA,iIAAA;IACA,iIAAA;IACA,iIAAA;IACA,iIAAA;IACA,iIAAA;IACA,iIAAA;IACA,iIAAA;IACA,iIAAA;IACA,iIAAA;IAGA,8HAAA;IACA,8HAAA;IACA,8HAAA;IACA,8HAAA;IACA,8HAAA;IACA,8HAAA;IACA,8HAAA;IACA,8HAAA;IACA,8HAAA;IAEA,kBAAA;EErBF;AACF","file":"theme.css"}
1
+ {"version":3,"sources":["../../scss/mixins/_layer.scss","../../scss/theme/_index.scss","../../scss/theme/_variables.scss","theme.css"],"names":[],"mappings":"AASI,oBCAF,MACE,8HAAA,CACA,yHAAA,CACA,gICiGU,CDhGV,oEENF,CFUA,WAGM,6GAAA,CAAA,6GAAA,CAAA,6GAAA,CAAA,6GAAA,CAAA,6GAAA,CAAA,6GAAA,CAAA,6GAAA,CAAA,6GAAA,CAAA,6GAAA,CAAA,mHAAA,CAAA,mHAAA,CAAA,mHAAA,CAAA,mHAAA,CAAA,mHAAA,CAAA,mHAAA,CAAA,mHAAA,CAAA,mHAAA,CAAA,mHAAA,CAAA,gHAAA,CAAA,gHAAA,CAAA,gHAAA,CAAA,gHAAA,CAAA,6GAAA,CAAA,gHAAA,CAAA,gHAAA,CAAA,gHAAA,CAAA,gHAAA,CAIJ,iBEaF,CFTA,YAGM,8GAAA,CAAA,8GAAA,CAAA,8GAAA,CAAA,8GAAA,CAAA,8GAAA,CAAA,8GAAA,CAAA,8GAAA,CAAA,8GAAA,CAAA,8GAAA,CAAA,oHAAA,CAAA,oHAAA,CAAA,oHAAA,CAAA,oHAAA,CAAA,oHAAA,CAAA,oHAAA,CAAA,oHAAA,CAAA,oHAAA,CAAA,oHAAA,CAAA,iHAAA,CAAA,iHAAA,CAAA,iHAAA,CAAA,iHAAA,CAAA,8GAAA,CAAA,iHAAA,CAAA,iHAAA,CAAA,iHAAA,CAAA,iHAAA,CAIJ,kBEgCF,CACF","file":"theme.css"}
@@ -0,0 +1 @@
1
+ body:before{border-bottom:2px solid #000;content:"Error: Undefined variable.\a \2577 \a 6 \2502 @if defaults.$use-important {\a \2502 ^^^^^^^^^^^^^^^^^^^^^^^\a \2575 \a scss/functions/_important.scss 6:7 insert()\a scss/utilities/background/_index.scss 14:21 @content\a scss/mixins/_layer.scss 11:7 layer()\a scss/utilities/background/_index.scss 8:1 @forward\a scss/utilities/background/background.scss 3:1 root stylesheet";display:block;font-family:Source Code Pro,SF Mono,Monaco,Inconsolata,Fira Mono,Droid Sans Mono,monospace,monospace;margin-bottom:1em;padding:1em;white-space:pre}
@@ -0,0 +1,2 @@
1
+ @layer graupl.utilities{.background-primary-100{background:var(--graupl-theme-active--primary--100,var(--graupl-theme-light--primary--100,var(--graupl-primary--100,#e6eeff)))!important}.color-primary-100{color:var(--graupl-theme-active--primary--100,var(--graupl-theme-light--primary--100,var(--graupl-primary--100,#e6eeff)))!important}.background-primary-200{background:var(--graupl-theme-active--primary--200,var(--graupl-theme-light--primary--200,var(--graupl-primary--200,#9ebefa)))!important}.color-primary-200{color:var(--graupl-theme-active--primary--200,var(--graupl-theme-light--primary--200,var(--graupl-primary--200,#9ebefa)))!important}.background-primary-300{background:var(--graupl-theme-active--primary--300,var(--graupl-theme-light--primary--300,var(--graupl-primary--300,#5e90ed)))!important}.color-primary-300{color:var(--graupl-theme-active--primary--300,var(--graupl-theme-light--primary--300,var(--graupl-primary--300,#5e90ed)))!important}.background-primary-400{background:var(--graupl-theme-active--primary--400,var(--graupl-theme-light--primary--400,var(--graupl-primary--400,#3672e2)))!important}.color-primary-400{color:var(--graupl-theme-active--primary--400,var(--graupl-theme-light--primary--400,var(--graupl-primary--400,#3672e2)))!important}.background-primary-500{background:var(--graupl-theme-active--primary--500,var(--graupl-theme-light--primary--500,var(--graupl-primary--500,#2063df)))!important}.color-primary-500{color:var(--graupl-theme-active--primary--500,var(--graupl-theme-light--primary--500,var(--graupl-primary--500,#2063df)))!important}.background-primary-600{background:var(--graupl-theme-active--primary--600,var(--graupl-theme-light--primary--600,var(--graupl-primary--600,#1d59c9)))!important}.color-primary-600{color:var(--graupl-theme-active--primary--600,var(--graupl-theme-light--primary--600,var(--graupl-primary--600,#1d59c9)))!important}.background-primary-700{background:var(--graupl-theme-active--primary--700,var(--graupl-theme-light--primary--700,var(--graupl-primary--700,#1244a1)))!important}.color-primary-700{color:var(--graupl-theme-active--primary--700,var(--graupl-theme-light--primary--700,var(--graupl-primary--700,#1244a1)))!important}.background-primary-800{background:var(--graupl-theme-active--primary--800,var(--graupl-theme-light--primary--800,var(--graupl-primary--800,#052561)))!important}.color-primary-800{color:var(--graupl-theme-active--primary--800,var(--graupl-theme-light--primary--800,var(--graupl-primary--800,#052561)))!important}.background-primary-900{background:var(--graupl-theme-active--primary--900,var(--graupl-theme-light--primary--900,var(--graupl-primary--900,#001233)))!important}.color-primary-900{color:var(--graupl-theme-active--primary--900,var(--graupl-theme-light--primary--900,var(--graupl-primary--900,#001233)))!important}.background-secondary-100{background:var(--graupl-theme-active--secondary--100,var(--graupl-theme-light--secondary--100,var(--graupl-secondary--100,#edeef7)))!important}.color-secondary-100{color:var(--graupl-theme-active--secondary--100,var(--graupl-theme-light--secondary--100,var(--graupl-secondary--100,#edeef7)))!important}.background-secondary-200{background:var(--graupl-theme-active--secondary--200,var(--graupl-theme-light--secondary--200,var(--graupl-secondary--200,#bdbfdb)))!important}.color-secondary-200{color:var(--graupl-theme-active--secondary--200,var(--graupl-theme-light--secondary--200,var(--graupl-secondary--200,#bdbfdb)))!important}.background-secondary-300{background:var(--graupl-theme-active--secondary--300,var(--graupl-theme-light--secondary--300,var(--graupl-secondary--300,#9497b8)))!important}.color-secondary-300{color:var(--graupl-theme-active--secondary--300,var(--graupl-theme-light--secondary--300,var(--graupl-secondary--300,#9497b8)))!important}.background-secondary-400{background:var(--graupl-theme-active--secondary--400,var(--graupl-theme-light--secondary--400,var(--graupl-secondary--400,#7b7e9d)))!important}.color-secondary-400{color:var(--graupl-theme-active--secondary--400,var(--graupl-theme-light--secondary--400,var(--graupl-secondary--400,#7b7e9d)))!important}.background-secondary-500{background:var(--graupl-theme-active--secondary--500,var(--graupl-theme-light--secondary--500,var(--graupl-secondary--500,#6c7093)))!important}.color-secondary-500{color:var(--graupl-theme-active--secondary--500,var(--graupl-theme-light--secondary--500,var(--graupl-secondary--500,#6c7093)))!important}.background-secondary-600{background:var(--graupl-theme-active--secondary--600,var(--graupl-theme-light--secondary--600,var(--graupl-secondary--600,#626484)))!important}.color-secondary-600{color:var(--graupl-theme-active--secondary--600,var(--graupl-theme-light--secondary--600,var(--graupl-secondary--600,#626484)))!important}.background-secondary-700{background:var(--graupl-theme-active--secondary--700,var(--graupl-theme-light--secondary--700,var(--graupl-secondary--700,#474a6b)))!important}.color-secondary-700{color:var(--graupl-theme-active--secondary--700,var(--graupl-theme-light--secondary--700,var(--graupl-secondary--700,#474a6b)))!important}.background-secondary-800{background:var(--graupl-theme-active--secondary--800,var(--graupl-theme-light--secondary--800,var(--graupl-secondary--800,#242642)))!important}.color-secondary-800{color:var(--graupl-theme-active--secondary--800,var(--graupl-theme-light--secondary--800,var(--graupl-secondary--800,#242642)))!important}.background-secondary-900{background:var(--graupl-theme-active--secondary--900,var(--graupl-theme-light--secondary--900,var(--graupl-secondary--900,#0f1124)))!important}.color-secondary-900{color:var(--graupl-theme-active--secondary--900,var(--graupl-theme-light--secondary--900,var(--graupl-secondary--900,#0f1124)))!important}.background-tertiary-100{background:var(--graupl-theme-active--tertiary--100,var(--graupl-theme-light--tertiary--100,var(--graupl-tertiary--100,#fde7ef)))!important}.color-tertiary-100{color:var(--graupl-theme-active--tertiary--100,var(--graupl-theme-light--tertiary--100,var(--graupl-tertiary--100,#fde7ef)))!important}.background-tertiary-200{background:var(--graupl-theme-active--tertiary--200,var(--graupl-theme-light--tertiary--200,var(--graupl-tertiary--200,#f2a6bf)))!important}.color-tertiary-200{color:var(--graupl-theme-active--tertiary--200,var(--graupl-theme-light--tertiary--200,var(--graupl-tertiary--200,#f2a6bf)))!important}.background-tertiary-300{background:var(--graupl-theme-active--tertiary--300,var(--graupl-theme-light--tertiary--300,var(--graupl-tertiary--300,#e06c92)))!important}.color-tertiary-300{color:var(--graupl-theme-active--tertiary--300,var(--graupl-theme-light--tertiary--300,var(--graupl-tertiary--300,#e06c92)))!important}.background-tertiary-400{background:var(--graupl-theme-active--tertiary--400,var(--graupl-theme-light--tertiary--400,var(--graupl-tertiary--400,#d14775)))!important}.color-tertiary-400{color:var(--graupl-theme-active--tertiary--400,var(--graupl-theme-light--tertiary--400,var(--graupl-tertiary--400,#d14775)))!important}.background-tertiary-500{background:var(--graupl-theme-active--tertiary--500,var(--graupl-theme-light--tertiary--500,var(--graupl-tertiary--500,#c36)))!important}.color-tertiary-500{color:var(--graupl-theme-active--tertiary--500,var(--graupl-theme-light--tertiary--500,var(--graupl-tertiary--500,#c36)))!important}.background-tertiary-600{background:var(--graupl-theme-active--tertiary--600,var(--graupl-theme-light--tertiary--600,var(--graupl-tertiary--600,#b82e5c)))!important}.color-tertiary-600{color:var(--graupl-theme-active--tertiary--600,var(--graupl-theme-light--tertiary--600,var(--graupl-tertiary--600,#b82e5c)))!important}.background-tertiary-700{background:var(--graupl-theme-active--tertiary--700,var(--graupl-theme-light--tertiary--700,var(--graupl-tertiary--700,#931f46)))!important}.color-tertiary-700{color:var(--graupl-theme-active--tertiary--700,var(--graupl-theme-light--tertiary--700,var(--graupl-tertiary--700,#931f46)))!important}.background-tertiary-800{background:var(--graupl-theme-active--tertiary--800,var(--graupl-theme-light--tertiary--800,var(--graupl-tertiary--800,#590d26)))!important}.color-tertiary-800{color:var(--graupl-theme-active--tertiary--800,var(--graupl-theme-light--tertiary--800,var(--graupl-tertiary--800,#590d26)))!important}.background-tertiary-900{background:var(--graupl-theme-active--tertiary--900,var(--graupl-theme-light--tertiary--900,var(--graupl-tertiary--900,#2f0412)))!important}.color-tertiary-900{color:var(--graupl-theme-active--tertiary--900,var(--graupl-theme-light--tertiary--900,var(--graupl-tertiary--900,#2f0412)))!important}}
2
+ /*# sourceMappingURL=colors.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../scss/mixins/_layer.scss","../../../scss/utilities/colors/_index.scss","colors.css"],"names":[],"mappings":"AASI,wBCGE,wBACE,wICTN,CDYI,mBACE,mICVN,CDKI,wBACE,wICHN,CDMI,mBACE,mICJN,CDDI,wBACE,wICGN,CDAI,mBACE,mICEN,CDPI,wBACE,wICSN,CDNI,mBACE,mICQN,CDbI,wBACE,wICeN,CDZI,mBACE,mICcN,CDnBI,wBACE,wICqBN,CDlBI,mBACE,mICoBN,CDzBI,wBACE,wIC2BN,CDxBI,mBACE,mIC0BN,CD/BI,wBACE,wICiCN,CD9BI,mBACE,mICgCN,CDrCI,wBACE,wICuCN,CDpCI,mBACE,mICsCN,CD3CI,0BACE,8IC6CN,CD1CI,qBACE,yIC4CN,CDjDI,0BACE,8ICmDN,CDhDI,qBACE,yICkDN,CDvDI,0BACE,8ICyDN,CDtDI,qBACE,yICwDN,CD7DI,0BACE,8IC+DN,CD5DI,qBACE,yIC8DN,CDnEI,0BACE,8ICqEN,CDlEI,qBACE,yICoEN,CDzEI,0BACE,8IC2EN,CDxEI,qBACE,yIC0EN,CD/EI,0BACE,8ICiFN,CD9EI,qBACE,yICgFN,CDrFI,0BACE,8ICuFN,CDpFI,qBACE,yICsFN,CD3FI,0BACE,8IC6FN,CD1FI,qBACE,yIC4FN,CDjGI,yBACE,2ICmGN,CDhGI,oBACE,sICkGN,CDvGI,yBACE,2ICyGN,CDtGI,oBACE,sICwGN,CD7GI,yBACE,2IC+GN,CD5GI,oBACE,sIC8GN,CDnHI,yBACE,2ICqHN,CDlHI,oBACE,sICoHN,CDzHI,yBACE,wIC2HN,CDxHI,oBACE,mIC0HN,CD/HI,yBACE,2ICiIN,CD9HI,oBACE,sICgIN,CDrII,yBACE,2ICuIN,CDpII,oBACE,sICsIN,CD3II,yBACE,2IC6IN,CD1II,oBACE,sIC4IN,CDjJI,yBACE,2ICmJN,CDhJI,oBACE,sICkJN,CACF","file":"colors.css"}
@@ -1,11 +1,51 @@
1
1
  import { defineConfig } from "vitepress";
2
2
 
3
+ // Get the current version from the package.json file.
4
+ import { version } from "../../package.json";
5
+
3
6
  export default defineConfig({
4
7
  lang: "en-US",
5
8
  title: "Graupl",
6
9
  description: "A modular and modern CSS framework.",
7
10
  base: "/graupl/",
8
11
  themeConfig: {
9
- socialLinks: [{ icon: "github", url: "https://github.com/Graupl/graupl" }],
12
+ nav: [
13
+ {
14
+ text: "Docs",
15
+ link: "/introduction",
16
+ },
17
+ {
18
+ text: version,
19
+ items: [
20
+ {
21
+ text: "Current release",
22
+ link: `https://github.com/Graupl/graupl/releases/tag/v${version}`,
23
+ },
24
+ {
25
+ text: "Changelog",
26
+ link: "https://github.com/Graupl/graupl/blob/1.x/CHANGELOG.md",
27
+ },
28
+ {
29
+ text: "Contributing",
30
+ link: "https://github.com/Graupl/graupl/blob/1.x/.github/CONTRIBUTING.md",
31
+ },
32
+ ],
33
+ },
34
+ ],
35
+
36
+ socialLinks: [{ icon: "github", link: "https://github.com/Graupl/graupl" }],
37
+
38
+ sidebar: {
39
+ "/": [
40
+ {
41
+ text: "Getting Started",
42
+ items: [{ text: "Introduction", link: "/introduction" }],
43
+ },
44
+ {
45
+ text: "Advenced Topics",
46
+ items: [{ text: "Compiling Graupl", link: "/compiling-graupl" }],
47
+ },
48
+ ],
49
+ },
10
50
  },
11
51
  });
@@ -1,35 +1,35 @@
1
- @use "../../../scss/theme/variables" as theme;
1
+ @use "../../../scss/functions/theme";
2
2
 
3
3
  :root {
4
- --vp-c-brand: #{theme.$theme-light--primary--700};
5
- --vp-c-brand-1: #{theme.$theme-light--primary--700};
6
- --vp-c-brand-2: #{theme.$theme-light--primary--700};
7
- --vp-c-brand-3: #{theme.$theme-light--primary--700};
8
- --vp-c-bg: #{theme.$theme-light--primary--100};
9
- --vp-c-bg-alt: #{theme.$theme-light--primary--100};
10
- --vp-c-bg-elv: #{theme.$theme-light--primary--100};
11
- --vp-c-bg-soft: #{theme.$theme-light--primary--100};
12
- --vp-c-border: #{theme.$theme-light--tertiary--700};
13
- --vp-c-divider: #{theme.$theme-light--secondary--700};
14
- --vp-c-gutter: #{theme.$theme-light--secondary--700};
15
- --vp-c-text-1: #{theme.$theme-light--primary--900};
16
- --vp-c-text-2: #{theme.$theme-light--primary--900};
17
- --vp-c-text-3: #{theme.$theme-light--primary--900};
4
+ --vp-c-brand: #{theme.get(primary, 700)};
5
+ --vp-c-brand-1: #{theme.get(primary, 700)};
6
+ --vp-c-brand-2: #{theme.get(primary, 700)};
7
+ --vp-c-brand-3: #{theme.get(primary, 700)};
8
+ --vp-c-bg: #{theme.get(primary, 100)};
9
+ --vp-c-bg-alt: #{theme.get(primary, 100)};
10
+ --vp-c-bg-elv: #{theme.get(primary, 100)};
11
+ --vp-c-bg-soft: #{theme.get(primary, 100)};
12
+ --vp-c-border: #{theme.get(tertiary, 700)};
13
+ --vp-c-divider: #{theme.get(secondary, 700)};
14
+ --vp-c-gutter: #{theme.get(secondary, 700)};
15
+ --vp-c-text-1: #{theme.get(primary, 900)};
16
+ --vp-c-text-2: #{theme.get(primary, 900)};
17
+ --vp-c-text-3: #{theme.get(primary, 900)};
18
18
  }
19
19
 
20
20
  .dark {
21
- --vp-c-brand: #{theme.$theme-light--primary--300};
22
- --vp-c-brand-1: #{theme.$theme-light--primary--300};
23
- --vp-c-brand-2: #{theme.$theme-light--primary--300};
24
- --vp-c-brand-3: #{theme.$theme-light--primary--300};
25
- --vp-c-bg: #{theme.$theme-light--primary--900};
26
- --vp-c-bg-alt: #{theme.$theme-light--primary--900};
27
- --vp-c-bg-elv: #{theme.$theme-light--primary--900};
28
- --vp-c-bg-soft: #{theme.$theme-light--primary--900};
29
- --vp-c-border: #{theme.$theme-light--tertiary--300};
30
- --vp-c-divider: #{theme.$theme-light--secondary--300};
31
- --vp-c-gutter: #{theme.$theme-light--secondary--300};
32
- --vp-c-text-1: #{theme.$theme-light--primary--100};
33
- --vp-c-text-2: #{theme.$theme-light--primary--100};
34
- --vp-c-text-3: #{theme.$theme-light--primary--100};
21
+ --vp-c-brand: #{theme.get(primary, 300)};
22
+ --vp-c-brand-1: #{theme.get(primary, 300)};
23
+ --vp-c-brand-2: #{theme.get(primary, 300)};
24
+ --vp-c-brand-3: #{theme.get(primary, 300)};
25
+ --vp-c-bg: #{theme.get(primary, 900)};
26
+ --vp-c-bg-alt: #{theme.get(primary, 900)};
27
+ --vp-c-bg-elv: #{theme.get(primary, 900)};
28
+ --vp-c-bg-soft: #{theme.get(primary, 900)};
29
+ --vp-c-border: #{theme.get(tertiary, 300)};
30
+ --vp-c-divider: #{theme.get(secondary, 300)};
31
+ --vp-c-gutter: #{theme.get(secondary, 300)};
32
+ --vp-c-text-1: #{theme.get(primary, 100)};
33
+ --vp-c-text-2: #{theme.get(primary, 100)};
34
+ --vp-c-text-3: #{theme.get(primary, 100)};
35
35
  }
@@ -0,0 +1,56 @@
1
+ # Compiling your own version of Graupl
2
+
3
+ If you want to compile your own version of Graupl, you can! Here's how:
4
+
5
+ ```scss
6
+ // Import Graupl.
7
+ @forward '@graupl/graupl';
8
+
9
+ // Import your own theme...
10
+ ```
11
+
12
+ ## Overriding Graupl's default variables
13
+
14
+ Graupl's sass variables are all declared with `!default` flag. This means you can override them in your own theme file.
15
+
16
+ ```scss
17
+ // Import the file containing the variables you want to override.
18
+ @forward '@graupl/graupl/defaults' with (
19
+ $prefix: 'custom',
20
+ );
21
+
22
+ // Import Graupl.
23
+ @forward '@graupl/graupl';
24
+
25
+ // Import your own theme...
26
+ ```
27
+
28
+ ## Adding new theme colours
29
+
30
+ You can add new colours to Graupl by adding to the `$custom-colours` map.
31
+
32
+ ```scss
33
+ // Import the theme's defaults.
34
+ @forward "@graupl/graupl/theme/defaults" with (
35
+ $custom-colors: (
36
+ custom: (
37
+ 100: #f0f0f0,
38
+ 200: #e0e0e0,
39
+ 300: #d0d0d0,
40
+ 400: #c0c0c0,
41
+ 500: #b0b0b0,
42
+ 600: #a0a0a0,
43
+ 700: #909090,
44
+ 800: #808080,
45
+ 900: #707070,
46
+ ),
47
+ ),
48
+ );
49
+
50
+ // Import Graupl.
51
+ @forward '@graupl/graupl';
52
+
53
+ // Import your own theme...
54
+ ```
55
+
56
+ These colours will have new classes generated for them, e.g. `background-custom-100`, `color-custom-100`, etc. as well as component variants, e.g. `button custom`, and full dark-mode support.
@@ -0,0 +1,5 @@
1
+ # Introduction
2
+
3
+ Graupl is a collection of Sass utilities and components that can be used to build a website or web application. It is designed to be flexible and customizable, so you can use as much or as little of it as you need.
4
+
5
+ We need a lot more documentation, so sit tight!
package/index.html CHANGED
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en" class="light-mode">
2
+ <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -19,11 +19,15 @@
19
19
  <p>Graupl supports light and dark modes out-of-the-box.</p>
20
20
  <h2>Buttons</h2>
21
21
  <p>There are 4 colours of buttons supported by default, with plans to have a "graupl-theme" plugin that adds more.</p>
22
- <div class="columns columns-4">
22
+ <div class="columns count-4">
23
23
  <button class="button">Default Button</button>
24
24
  <button class="button primary">Primary Button</button>
25
25
  <button class="button secondary">Secondary Button</button>
26
26
  <button class="button tertiary">Tertiary Button</button>
27
+ <button class="button" disabled>Default Button</button>
28
+ <button class="button primary" disabled>Primary Button</button>
29
+ <button class="button secondary" disabled>Secondary Button</button>
30
+ <button class="button tertiary" disabled>Tertiary Button</button>
27
31
  </div>
28
32
  <h2>Form elements</h2>
29
33
  <p>Graupl provides default styling for all form elements.</p>
package/package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "name": "@graupl/graupl",
3
- "version": "1.0.0-alpha.2",
3
+ "version": "1.0.0-alpha.3",
4
4
  "description": "A modular and modern CSS framework.",
5
5
  "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "sass": "./scss"
9
+ },
10
+ "./base": {
11
+ "sass": "./scss/base"
12
+ },
13
+ "./components": {
14
+ "sass": "./scss/component"
15
+ },
16
+ "./layout": {
17
+ "sass": "./scss/layout"
18
+ },
19
+ "./mixins": {
20
+ "sass": "./scss/mixins"
21
+ },
22
+ "./state": {
23
+ "sass": "./scss/state"
24
+ },
25
+ "./theme": {
26
+ "sass": "./scss/theme"
27
+ },
28
+ "./utilities": {
29
+ "sass": "./scss/utilities"
30
+ }
31
+ },
6
32
  "scripts": {
7
33
  "prepare": "husky install",
8
34
  "commit": "git cz",
@@ -4,7 +4,7 @@ const config = {
4
4
  require("autoprefixer"),
5
5
  // @todo: add cssnano when ready
6
6
  // Waiting on upstream issue for postcss-calc: https://github.com/postcss/postcss-calc/issues/77
7
- // require("cssnano"),
7
+ require("cssnano"),
8
8
  require("postcss-discard-comments"),
9
9
  ],
10
10
  };
@@ -7,6 +7,9 @@
7
7
  // Prefix for custom properties and other naming conventions.
8
8
  $prefix: "graupl" !default;
9
9
 
10
+ // Settings.
11
+ $use-important: true !default;
12
+
10
13
  // Layout properties.
11
14
  $content-max-width: 96ch !default;
12
15
 
@@ -0,0 +1,14 @@
1
+ // Graupl Components.
2
+ //
3
+ // Forwards all components for easy development.
4
+
5
+ // Forward the layer initialization.
6
+ @forward "init";
7
+
8
+ // Forward all layers.
9
+ @forward "base";
10
+ @forward "layout";
11
+ @forward "component";
12
+ @forward "state";
13
+ @forward "theme";
14
+ @forward "utilities";
@@ -0,0 +1,3 @@
1
+ // Graupl layer initialization.
2
+
3
+ @layer graupl.base, graupl.layout, graupl.component, graupl.theme, graupl.utilities, graupl.state;
@@ -1,9 +1,9 @@
1
1
  // Variables referencing custom properties.
2
2
 
3
3
  @use "../../variables" as base;
4
- @use "../../theme/variables" as theme;
5
4
  @use "defaults";
6
5
  @use "sass:map";
6
+ @use "../../functions/theme";
7
7
 
8
8
  $input-padding-x: var(--#{defaults.$prefix}-input-padding-x, #{base.$gap});
9
9
  $input-padding-y: var(
@@ -47,7 +47,7 @@ $fieldset-font-size: var(
47
47
  // Background properties.
48
48
  $input-background: var(
49
49
  --#{defaults.$prefix}-input-background,
50
- #{theme.$theme-active--primary--100}
50
+ #{theme.get(primary, 100)}
51
51
  );
52
52
  $fieldset-background: var(
53
53
  --#{defaults.$prefix}-fieldset-background,
@@ -57,17 +57,17 @@ $fieldset-background: var(
57
57
  // Text properties.
58
58
  $input-color: var(
59
59
  --#{defaults.$prefix}-input-color,
60
- #{theme.$theme-active--primary--900}
60
+ #{theme.get(primary, 900)}
61
61
  );
62
62
  $input-placeholder-color: var(
63
63
  --#{defaults.$prefix}-input-placeholder-color,
64
- #{theme.$theme-active--secondary--600}
64
+ #{theme.get(secondary, 600)}
65
65
  );
66
66
  $label-color: var(--#{defaults.$prefix}-label-color, #{$input-color});
67
67
  $fieldset-color: var(--#{defaults.$prefix}-fieldset-color, #{$input-color});
68
68
  $input-disabled-color: var(
69
69
  --#{defaults.$prefix}-input-disabled-color,
70
- #{theme.$theme-active--secondary--400}
70
+ #{theme.get(secondary, 400)}
71
71
  );
72
72
  $input-disabled-placeholder-color: var(
73
73
  --#{defaults.$prefix}-input-disabled-placeholder-color,
@@ -111,11 +111,11 @@ $fieldset-border-radius: var(
111
111
  // Border colour properties.
112
112
  $input-border-color: var(
113
113
  --#{defaults.$prefix}-input-border-color,
114
- #{theme.$theme-active--secondary--700}
114
+ #{theme.get(secondary, 700)}
115
115
  );
116
116
  $input-disabled-border-color: var(
117
117
  --#{defaults.$prefix}-input-disabled-border-color,
118
- #{theme.$theme-active--secondary--200}
118
+ #{theme.get(secondary, 200)}
119
119
  );
120
120
  $fieldset-border-color: var(
121
121
  --#{defaults.$prefix}-fieldset-border-color,
@@ -129,5 +129,5 @@ $fieldset-disabled-border-color: var(
129
129
  // Accent color properties.
130
130
  $input-accent-color: var(
131
131
  --#{defaults.$prefix}-input-accent-color,
132
- #{theme.$theme-active--primary--700}
132
+ #{theme.get(primary, 700)}
133
133
  );
@@ -1,8 +1,8 @@
1
1
  // Variables referencing custom properties.
2
2
 
3
3
  @use "../../variables" as base;
4
- @use "../../theme/variables" as theme;
5
4
  @use "defaults";
5
+ @use "../../functions/theme";
6
6
 
7
7
  // Link properties.
8
8
  $link-text-decoration: var(
@@ -13,19 +13,16 @@ $link-text-decoration-thickness: var(
13
13
  --#{defaults.$prefix}-link-text-decoration-thickness,
14
14
  #{base.$border-width}
15
15
  );
16
- $link-color: var(
17
- --#{defaults.$prefix}-link-color,
18
- #{theme.$theme-active--primary--700}
19
- );
16
+ $link-color: var(--#{defaults.$prefix}-link-color, #{theme.get(primary, 700)});
20
17
  $link-hover-color: var(
21
18
  --#{defaults.$prefix}-link-hover-color,
22
- #{theme.$theme-active--tertiary--700}
19
+ #{theme.get(tertiary, 700)}
23
20
  );
24
21
  $link-active-color: var(
25
22
  --#{defaults.$prefix}-link-active-color,
26
- #{theme.$theme-active--tertiary--700}
23
+ #{theme.get(tertiary, 700)}
27
24
  );
28
25
  $link-visited-color: var(
29
26
  --#{defaults.$prefix}-link-visited-color,
30
- #{theme.$theme-active--primary--700}
27
+ #{theme.get(primary, 700)}
31
28
  );
@@ -7,4 +7,6 @@
7
7
  @forward "../../defaults";
8
8
 
9
9
  $button-hover-transform: none !default;
10
+ $button-hover-transform-reduced-motion: none !default;
10
11
  $button-active-transform: scale(0.95) !default;
12
+ $button-active-transform-reduced-motion: scale(0.98) !default;
@@ -4,6 +4,8 @@
4
4
  @use "../../theme/variables" as theme;
5
5
  @use "variables" as *;
6
6
  @use "../../mixins/layer" as *;
7
+ @use "../../mixins/media-queries" as *;
8
+ @use "sass:map";
7
9
 
8
10
  @include layer(component) {
9
11
  .button {
@@ -27,6 +29,29 @@
27
29
  &:active {
28
30
  transform: $button-active-transform;
29
31
  }
32
+
33
+ &:disabled {
34
+ cursor: not-allowed;
35
+
36
+ &:hover,
37
+ &:active {
38
+ transform: none;
39
+ }
40
+ }
41
+ }
42
+
43
+ @include animation-off {
44
+ .button {
45
+ transition: $button-transition-reduced-motion;
46
+
47
+ &:hover {
48
+ transform: $button-hover-transform-reduced-motion;
49
+ }
50
+
51
+ &:active {
52
+ transform: $button-active-transform-reduced-motion;
53
+ }
54
+ }
30
55
  }
31
56
  }
32
57
 
@@ -48,28 +73,31 @@
48
73
  color: $button-active-color;
49
74
  }
50
75
 
51
- &.primary {
52
- --#{defaults.$prefix}-button-hover-background: #{theme.$theme-active--primary--700};
53
- --#{defaults.$prefix}-button-active-background: #{theme.$theme-active--primary--700};
54
- --#{defaults.$prefix}-button-border-color: #{theme.$theme-active--primary--700};
55
- --#{defaults.$prefix}-button-hover-border-color: #{theme.$theme-active--primary--700};
56
- --#{defaults.$prefix}-button-active-border-color: #{theme.$theme-active--primary--700};
57
- }
76
+ &:disabled {
77
+ border-color: $button-disabled-border-color;
78
+ background: $button-disabled-background;
79
+ color: $button-disabled-color;
58
80
 
59
- &.secondary {
60
- --#{defaults.$prefix}-button-hover-background: #{theme.$theme-active--secondary--700};
61
- --#{defaults.$prefix}-button-active-background: #{theme.$theme-active--secondary--700};
62
- --#{defaults.$prefix}-button-border-color: #{theme.$theme-active--secondary--700};
63
- --#{defaults.$prefix}-button-hover-border-color: #{theme.$theme-active--secondary--700};
64
- --#{defaults.$prefix}-button-active-border-color: #{theme.$theme-active--secondary--700};
81
+ &:hover,
82
+ &:active {
83
+ border-color: $button-disabled-border-color;
84
+ background: $button-disabled-background;
85
+ color: $button-disabled-color;
86
+ }
65
87
  }
66
88
 
67
- &.tertiary {
68
- --#{defaults.$prefix}-button-hover-background: #{theme.$theme-active--tertiary--700};
69
- --#{defaults.$prefix}-button-active-background: #{theme.$theme-active--tertiary--700};
70
- --#{defaults.$prefix}-button-border-color: #{theme.$theme-active--tertiary--700};
71
- --#{defaults.$prefix}-button-hover-border-color: #{theme.$theme-active--tertiary--700};
72
- --#{defaults.$prefix}-button-active-border-color: #{theme.$theme-active--tertiary--700};
89
+ @each $color, $map in theme.$theme-active {
90
+ &.#{$color} {
91
+ --#{defaults.$prefix}-button-hover-background: #{map.get($map, 700)};
92
+ --#{defaults.$prefix}-button-active-background: #{map.get($map, 700)};
93
+ --#{defaults.$prefix}-button-border-color: #{map.get($map, 700)};
94
+ --#{defaults.$prefix}-button-hover-border-color: #{map.get($map, 700)};
95
+ --#{defaults.$prefix}-button-active-border-color: #{map.get($map, 700)};
96
+ --#{defaults.$prefix}-button-disabled-border-color: #{map.get(
97
+ $map,
98
+ 200
99
+ )};
100
+ }
73
101
  }
74
102
  }
75
103
  }