@graupl/graupl 1.0.0-alpha.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 (81) hide show
  1. package/.browserslistrc +3 -0
  2. package/.czrc +3 -0
  3. package/.editorconfig +13 -0
  4. package/.github/CODE_OF_CONDUCT.md +73 -0
  5. package/.github/COMMIT_CONVENTION.md +17 -0
  6. package/.github/CONTRIBUTING.md +86 -0
  7. package/.github/ISSUE_TEMPLATE/bug_report.md +30 -0
  8. package/.github/ISSUE_TEMPLATE/documentation.md +20 -0
  9. package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  10. package/.github/SECURITY.md +26 -0
  11. package/.github/dependabot.yml +17 -0
  12. package/.github/pull_request_template.md +5 -0
  13. package/.github/workflows/codeql-analysis.yml +71 -0
  14. package/.github/workflows/docs.yml +59 -0
  15. package/.github/workflows/test.yml +27 -0
  16. package/.husky/commit-msg +4 -0
  17. package/.husky/pre-commit +5 -0
  18. package/.prettierignore +12 -0
  19. package/.stylelintignore +0 -0
  20. package/.versionrc.cjs +61 -0
  21. package/CHANGELOG.md +43 -0
  22. package/README.md +3 -0
  23. package/commitlint.config.js +5 -0
  24. package/dist/base/link/link.css +26 -0
  25. package/dist/base/link/link.css.map +1 -0
  26. package/dist/component/button/button.css +55 -0
  27. package/dist/component/button/button.css.map +1 -0
  28. package/dist/graupl.css +171 -0
  29. package/dist/graupl.css.map +1 -0
  30. package/dist/layout/columns/columns.css +26 -0
  31. package/dist/layout/columns/columns.css.map +1 -0
  32. package/dist/layout/container/container.css +38 -0
  33. package/dist/layout/container/container.css.map +1 -0
  34. package/dist/state/focus/focus.css +10 -0
  35. package/dist/state/focus/focus.css.map +1 -0
  36. package/dist/theme/theme.css +26 -0
  37. package/dist/theme/theme.css.map +1 -0
  38. package/docs/.vitepress/config.js +11 -0
  39. package/docs/.vitepress/theme/custom.scss +35 -0
  40. package/docs/.vitepress/theme/index.js +4 -0
  41. package/docs/index.md +7 -0
  42. package/eslint.config.js +73 -0
  43. package/index.html +29 -0
  44. package/lint-staged.config.js +6 -0
  45. package/package.json +61 -0
  46. package/postcss.config.cjs +12 -0
  47. package/prettier.config.js +16 -0
  48. package/scss/_defaults.scss +40 -0
  49. package/scss/_variables.scss +63 -0
  50. package/scss/base/_index.scss +3 -0
  51. package/scss/base/link/_defaults.scss +9 -0
  52. package/scss/base/link/_index.scss +33 -0
  53. package/scss/base/link/_variables.scss +31 -0
  54. package/scss/base/link/link.scss +3 -0
  55. package/scss/component/_index.scss +3 -0
  56. package/scss/component/button/_defaults.scss +10 -0
  57. package/scss/component/button/_index.scss +67 -0
  58. package/scss/component/button/_variables.scss +102 -0
  59. package/scss/component/button/button.scss +3 -0
  60. package/scss/graupl.scss +9 -0
  61. package/scss/layout/_index.scss +4 -0
  62. package/scss/layout/columns/_defaults.scss +13 -0
  63. package/scss/layout/columns/_index.scss +30 -0
  64. package/scss/layout/columns/_variables.scss +20 -0
  65. package/scss/layout/columns/columns.scss +3 -0
  66. package/scss/layout/container/_defaults.scss +10 -0
  67. package/scss/layout/container/_index.scss +50 -0
  68. package/scss/layout/container/_variables.scss +26 -0
  69. package/scss/layout/container/container.scss +3 -0
  70. package/scss/mixins/_layer.scss +14 -0
  71. package/scss/mixins/_media-queries.scss +15 -0
  72. package/scss/state/_index.scss +3 -0
  73. package/scss/state/focus/_defaults.scss +10 -0
  74. package/scss/state/focus/_index.scss +13 -0
  75. package/scss/state/focus/_variables.scss +36 -0
  76. package/scss/state/focus/focus.scss +3 -0
  77. package/scss/theme/_defaults.scss +45 -0
  78. package/scss/theme/_index.scss +35 -0
  79. package/scss/theme/_variables.scss +177 -0
  80. package/scss/theme/theme.scss +3 -0
  81. package/stylelint.config.js +14 -0
@@ -0,0 +1,45 @@
1
+ // Default values for Graupl.
2
+ //
3
+ // Generally, these should not be used directly when styling components.
4
+ // They are mainly used to provide default fallbacks for custom properties
5
+ // which can be found in the `variables.scss` file.
6
+
7
+ @use "sass:map";
8
+ @forward "../defaults";
9
+
10
+ // Colours.
11
+ $primary: (
12
+ 100: hsl(219deg 100% 95%),
13
+ 200: hsl(219deg 90% 80%),
14
+ 300: hsl(219deg 80% 65%),
15
+ 400: hsl(219deg 75% 55%),
16
+ 500: hsl(219deg 75% 50%),
17
+ 600: hsl(219deg 75% 45%),
18
+ 700: hsl(219deg 80% 35%),
19
+ 800: hsl(219deg 90% 20%),
20
+ 900: hsl(219deg 100% 10%),
21
+ ) !default;
22
+ $secondary: (
23
+ 100: hsl(340deg 85% 95%),
24
+ 200: hsl(340deg 75% 80%),
25
+ 300: hsl(340deg 65% 65%),
26
+ 400: hsl(340deg 60% 55%),
27
+ 500: hsl(340deg 60% 50%),
28
+ 600: hsl(340deg 60% 45%),
29
+ 700: hsl(340deg 65% 35%),
30
+ 800: hsl(340deg 75% 20%),
31
+ 900: hsl(340deg 85% 10%),
32
+ ) !default;
33
+
34
+ // Font properties.
35
+ /* stylelint-disable-next-line scss/dollar-variable-colon-space-after */
36
+ $font-family:
37
+ system-ui,
38
+ -apple-system,
39
+ blinkmacsystemfont,
40
+ "Segoe UI",
41
+ roboto,
42
+ "Helvetica Neue",
43
+ arial,
44
+ sans-serif !default;
45
+ $font-size: clamp(0.85rem, calc(0.8rem + 0.5vw), 1.25rem);
@@ -0,0 +1,35 @@
1
+ // Graupl Theme.
2
+
3
+ @use "variables" as *;
4
+ @use "../mixins/layer" as *;
5
+ @use "defaults";
6
+ @use "sass:map";
7
+
8
+ @include layer(theme) {
9
+ :root {
10
+ background: $theme-active--light;
11
+ color: $theme-active--dark;
12
+ font-family: $font-family;
13
+ font-size: $font-size;
14
+ }
15
+
16
+ // Set the active theme for dark mode.
17
+ .dark-mode {
18
+ --#{defaults.$prefix}-theme-active--primary: #{$theme-dark--primary};
19
+ --#{defaults.$prefix}-theme-active--primary--dark: #{$theme-dark--primary--dark};
20
+ --#{defaults.$prefix}-theme-active--primary--light: #{$theme-dark--primary--light};
21
+ --#{defaults.$prefix}-theme-active--secondary: #{$theme-dark--secondary};
22
+ --#{defaults.$prefix}-theme-active--light: #{$theme-dark--light};
23
+ --#{defaults.$prefix}-theme-active--dark: #{$theme-dark--dark};
24
+ }
25
+
26
+ // Set the active theme for light mode.
27
+ .light-mode {
28
+ --#{defaults.$prefix}-theme-active--primary: #{$theme-light--primary};
29
+ --#{defaults.$prefix}-theme-active--primary--dark: #{$theme-light--primary--dark};
30
+ --#{defaults.$prefix}-theme-active--primary--light: #{$theme-light--primary--light};
31
+ --#{defaults.$prefix}-theme-active--secondary: #{$theme-light--secondary};
32
+ --#{defaults.$prefix}-theme-active--light: #{$theme-light--light};
33
+ --#{defaults.$prefix}-theme-active--dark: #{$theme-light--dark};
34
+ }
35
+ }
@@ -0,0 +1,177 @@
1
+ // Variables referencing custom properties.
2
+
3
+ @use "defaults";
4
+ @use "sass:map";
5
+
6
+ // Primary theme colours.
7
+ $primary: (
8
+ 100:
9
+ var(--#{defaults.$prefix}-primary--100, #{map.get(defaults.$primary, 100)}),
10
+ 200:
11
+ var(--#{defaults.$prefix}-primary--200, #{map.get(defaults.$primary, 200)}),
12
+ 300:
13
+ var(--#{defaults.$prefix}-primary--300, #{map.get(defaults.$primary, 300)}),
14
+ 400:
15
+ var(--#{defaults.$prefix}-primary--400, #{map.get(defaults.$primary, 400)}),
16
+ 500:
17
+ var(--#{defaults.$prefix}-primary--500, #{map.get(defaults.$primary, 500)}),
18
+ 600:
19
+ var(--#{defaults.$prefix}-primary--600, #{map.get(defaults.$primary, 600)}),
20
+ 700:
21
+ var(--#{defaults.$prefix}-primary--700, #{map.get(defaults.$primary, 700)}),
22
+ 800:
23
+ var(--#{defaults.$prefix}-primary--800, #{map.get(defaults.$primary, 800)}),
24
+ 900:
25
+ var(--#{defaults.$prefix}-primary--900, #{map.get(defaults.$primary, 900)}),
26
+ );
27
+
28
+ // Secondary theme colours.
29
+ $secondary: (
30
+ 100:
31
+ var(
32
+ --#{defaults.$prefix}-secondary--100,
33
+ #{map.get(defaults.$secondary, 100)}
34
+ ),
35
+ 200:
36
+ var(
37
+ --#{defaults.$prefix}-secondary--200,
38
+ #{map.get(defaults.$secondary, 200)}
39
+ ),
40
+ 300:
41
+ var(
42
+ --#{defaults.$prefix}-secondary--300,
43
+ #{map.get(defaults.$secondary, 300)}
44
+ ),
45
+ 400:
46
+ var(
47
+ --#{defaults.$prefix}-secondary--400,
48
+ #{map.get(defaults.$secondary, 400)}
49
+ ),
50
+ 500:
51
+ var(
52
+ --#{defaults.$prefix}-secondary--500,
53
+ #{map.get(defaults.$secondary, 500)}
54
+ ),
55
+ 600:
56
+ var(
57
+ --#{defaults.$prefix}-secondary--600,
58
+ #{map.get(defaults.$secondary, 600)}
59
+ ),
60
+ 700:
61
+ var(
62
+ --#{defaults.$prefix}-secondary--700,
63
+ #{map.get(defaults.$secondary, 700)}
64
+ ),
65
+ 800:
66
+ var(
67
+ --#{defaults.$prefix}-secondary--800,
68
+ #{map.get(defaults.$secondary, 800)}
69
+ ),
70
+ 900:
71
+ var(
72
+ --#{defaults.$prefix}-secondary--900,
73
+ #{map.get(defaults.$secondary, 900)}
74
+ ),
75
+ );
76
+
77
+ // Theme colours.
78
+ $theme-light--primary: var(
79
+ --#{defaults.$prefix}-theme-light--primary,
80
+ #{map.get($primary, 700)}
81
+ );
82
+ $theme-light--primary--dark: var(
83
+ --#{defaults.$prefix}-theme-light--primary--dark,
84
+ #{map.get($primary, 800)}
85
+ );
86
+ $theme-light--primary--light: var(
87
+ --#{defaults.$prefix}-theme-light--primary--light,
88
+ #{map.get($primary, 600)}
89
+ );
90
+ $theme-dark--primary: var(
91
+ --#{defaults.$prefix}-theme-dark--primary,
92
+ #{map.get($primary, 300)}
93
+ );
94
+ $theme-dark--primary--dark: var(
95
+ --#{defaults.$prefix}-theme-dark--primary--dark,
96
+ #{map.get($primary, 200)}
97
+ );
98
+ $theme-dark--primary--light: var(
99
+ --#{defaults.$prefix}-theme-dark--primary--light,
100
+ #{map.get($primary, 400)}
101
+ );
102
+ $theme-active--primary: var(
103
+ --#{defaults.$prefix}-theme-active--primary,
104
+ #{$theme-light--primary}
105
+ );
106
+ $theme-active--primary--dark: var(
107
+ --#{defaults.$prefix}-theme-active--primary--dark,
108
+ #{$theme-light--primary--dark}
109
+ );
110
+ $theme-active--primary--light: var(
111
+ --#{defaults.$prefix}-theme-active--primary--light,
112
+ #{$theme-light--primary--light}
113
+ );
114
+ $theme-light--secondary: var(
115
+ --#{defaults.$prefix}-theme-light--secondary,
116
+ #{map.get($secondary, 700)}
117
+ );
118
+ $theme-light--secondary--dark: var(
119
+ --#{defaults.$prefix}-theme-light--secondary--dark,
120
+ #{map.get($secondary, 800)}
121
+ );
122
+ $theme-light--secondary--light: var(
123
+ --#{defaults.$prefix}-theme-light--secondary--light,
124
+ #{map.get($secondary, 600)}
125
+ );
126
+ $theme-dark--secondary: var(
127
+ --#{defaults.$prefix}-theme-dark--secondary,
128
+ #{map.get($secondary, 300)}
129
+ );
130
+ $theme-dark--secondary--dark: var(
131
+ --#{defaults.$prefix}-theme-dark--secondary--dark,
132
+ #{map.get($secondary, 200)}
133
+ );
134
+ $theme-dark--secondary--light: var(
135
+ --#{defaults.$prefix}-theme-dark--secondary--light,
136
+ #{map.get($secondary, 400)}
137
+ );
138
+ $theme-active--secondary: var(
139
+ --#{defaults.$prefix}-theme-active--secondary,
140
+ #{$theme-light--secondary}
141
+ );
142
+ $theme-active--secondary--dark: var(
143
+ --#{defaults.$prefix}-theme-active--secondary--dark,
144
+ #{$theme-light--secondary--dark}
145
+ );
146
+ $theme-active--secondary--light: var(
147
+ --#{defaults.$prefix}-theme-active--secondary--light,
148
+ #{$theme-light--secondary--light}
149
+ );
150
+ $theme-light--light: var(
151
+ --#{defaults.$prefix}-theme-light--light,
152
+ #{map.get($primary, 100)}
153
+ );
154
+ $theme-dark--light: var(
155
+ --#{defaults.$prefix}-theme-dark--light,
156
+ #{map.get($primary, 900)}
157
+ );
158
+ $theme-active--light: var(
159
+ --#{defaults.$prefix}-theme-active--light,
160
+ #{$theme-light--light}
161
+ );
162
+ $theme-light--dark: var(
163
+ --#{defaults.$prefix}-theme-light--dark,
164
+ #{map.get($primary, 900)}
165
+ );
166
+ $theme-dark--dark: var(
167
+ --#{defaults.$prefix}-theme-dark--dark,
168
+ #{map.get($primary, 100)}
169
+ );
170
+ $theme-active--dark: var(
171
+ --#{defaults.$prefix}-theme-active--dark,
172
+ #{$theme-light--dark}
173
+ );
174
+
175
+ // Font properties.
176
+ $font-family: var(--#{defaults.$prefix}-font-family, #{defaults.$font-family});
177
+ $font-size: var(--#{defaults.$prefix}-font-size, #{defaults.$font-size});
@@ -0,0 +1,3 @@
1
+ // Graupl Theme.
2
+
3
+ @forward "index";
@@ -0,0 +1,14 @@
1
+ const config = {
2
+ extends: [
3
+ "stylelint-config-standard-scss",
4
+ "stylelint-config-sass-guidelines",
5
+ "stylelint-config-property-sort-order-smacss",
6
+ ],
7
+ plugins: ["stylelint-prettier"],
8
+ rules: {
9
+ "prettier/prettier": true,
10
+ "scss/comment-no-empty": null,
11
+ },
12
+ };
13
+
14
+ export default config;