@graupl/graupl 1.0.0-alpha.0 → 1.0.0-alpha.2
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/CHANGELOG.md +26 -0
- package/dist/base/form/form.css +86 -0
- package/dist/base/form/form.css.map +1 -0
- package/dist/base/link/link.css +5 -5
- package/dist/base/link/link.css.map +1 -1
- package/dist/component/button/button.css +26 -19
- package/dist/component/button/button.css.map +1 -1
- package/dist/graupl.css +190 -40
- package/dist/graupl.css.map +1 -1
- package/dist/layout/columns/columns.css +15 -0
- package/dist/layout/columns/columns.css.map +1 -1
- package/dist/state/focus/focus.css +2 -2
- package/dist/state/focus/focus.css.map +1 -1
- package/dist/theme/theme.css +58 -14
- package/dist/theme/theme.css.map +1 -1
- package/docs/.vitepress/theme/custom.scss +28 -28
- package/index.html +82 -5
- package/package.json +1 -1
- package/scss/base/_index.scss +1 -0
- package/scss/base/form/_defaults.scss +9 -0
- package/scss/base/form/_index.scss +90 -0
- package/scss/base/form/_variables.scss +133 -0
- package/scss/base/form/form.scss +3 -0
- package/scss/base/link/_variables.scss +4 -4
- package/scss/component/button/_index.scss +18 -10
- package/scss/component/button/_variables.scss +9 -9
- package/scss/layout/columns/_defaults.scss +1 -0
- package/scss/layout/columns/_index.scss +8 -0
- package/scss/layout/columns/_variables.scss +4 -0
- package/scss/state/focus/_variables.scss +2 -2
- package/scss/theme/_defaults.scss +11 -0
- package/scss/theme/_index.scss +70 -14
- package/scss/theme/_variables.scss +356 -62
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@layer graupl.state{
|
|
2
2
|
*:focus-visible{
|
|
3
3
|
border-color:transparent;
|
|
4
|
-
outline:var(--graupl-focus-outline-width, var(--graupl-focus-width, var(--graupl-border-width, 2px))) var(--graupl-focus-outline-style, dotted) var(--graupl-focus-outline-color, var(--graupl-theme-active--
|
|
4
|
+
outline:var(--graupl-focus-outline-width, var(--graupl-focus-width, var(--graupl-border-width, 2px))) var(--graupl-focus-outline-style, dotted) var(--graupl-focus-outline-color, var(--graupl-theme-active--primary--900, var(--graupl-theme-light--primary--900, var(--graupl-primary--900, hsl(219, 100%, 10%)))));
|
|
5
5
|
outline-offset:var(--graupl-focus-outline-offset, calc(-1 * var(--graupl-focus-outline-width, var(--graupl-focus-width, var(--graupl-border-width, 2px)))));
|
|
6
|
-
box-shadow:var(--graupl-focus-box-shadow, var(--graupl-focus-width, var(--graupl-border-width, 2px)) var(--graupl-focus-width, var(--graupl-border-width, 2px)) 0 0 var(--graupl-focus-box-shadow-style, inset) var(--graupl-focus-box-shadow-color, var(--graupl-theme-active--
|
|
6
|
+
box-shadow:var(--graupl-focus-box-shadow, var(--graupl-focus-width, var(--graupl-border-width, 2px)) var(--graupl-focus-width, var(--graupl-border-width, 2px)) 0 0 var(--graupl-focus-box-shadow-style, inset) var(--graupl-focus-box-shadow-color, var(--graupl-theme-active--primary--100, var(--graupl-theme-light--primary--100, var(--graupl-primary--100, hsl(219, 100%, 95%))))), 0 0 0 var(--graupl-focus-width, var(--graupl-border-width, 2px)) var(--graupl-focus-box-shadow-style, inset) var(--graupl-focus-box-shadow-color, var(--graupl-theme-active--primary--100, var(--graupl-theme-light--primary--100, var(--graupl-primary--100, hsl(219, 100%, 95%))))));
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../scss/mixins/_layer.scss","../../../scss/state/focus/_index.scss","../../../scss/state/focus/_variables.scss","focus.css"],"names":[],"mappings":"AASI;ECHF;IACE,wBAAA;IACA,
|
|
1
|
+
{"version":3,"sources":["../../../scss/mixins/_layer.scss","../../../scss/state/focus/_index.scss","../../../scss/state/focus/_variables.scss","focus.css"],"names":[],"mappings":"AASI;ECHF;IACE,wBAAA;IACA,qTAAA;IACA,2JCUmB;IDTnB,gpBCqBe;ECxBjB;AACF","file":"focus.css"}
|
package/dist/theme/theme.css
CHANGED
|
@@ -1,25 +1,69 @@
|
|
|
1
1
|
@layer graupl.theme{
|
|
2
2
|
:root{
|
|
3
|
-
background:var(--graupl-theme-active--
|
|
4
|
-
color:var(--graupl-theme-active--
|
|
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
5
|
font-family:var(--graupl-font-family, system-ui, -apple-system, blinkmacsystemfont, Segoe UI, roboto, Helvetica Neue, arial, sans-serif);
|
|
6
6
|
font-size:var(--graupl-font-size, clamp(0.85rem, 0.8rem + 0.5vw, 1.25rem));
|
|
7
7
|
}
|
|
8
8
|
.dark-mode{
|
|
9
|
-
--graupl-theme-active--primary:var(--graupl-theme-dark--primary, var(--graupl-primary--
|
|
10
|
-
--graupl-theme-active--primary--
|
|
11
|
-
--graupl-theme-active--primary--
|
|
12
|
-
--graupl-theme-active--
|
|
13
|
-
--graupl-theme-active--
|
|
14
|
-
--graupl-theme-active--
|
|
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;
|
|
15
37
|
}
|
|
16
38
|
.light-mode{
|
|
17
|
-
--graupl-theme-active--primary:var(--graupl-theme-light--primary, var(--graupl-primary--
|
|
18
|
-
--graupl-theme-active--primary--
|
|
19
|
-
--graupl-theme-active--primary--
|
|
20
|
-
--graupl-theme-active--
|
|
21
|
-
--graupl-theme-active--
|
|
22
|
-
--graupl-theme-active--
|
|
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;
|
|
23
67
|
}
|
|
24
68
|
}
|
|
25
69
|
|
package/dist/theme/theme.css.map
CHANGED
|
@@ -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
|
|
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,35 +1,35 @@
|
|
|
1
1
|
@use "../../../scss/theme/variables" as theme;
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
--vp-c-brand: #{theme.$theme-light--primary--
|
|
5
|
-
--vp-c-brand-1: #{theme.$theme-light--primary--
|
|
6
|
-
--vp-c-brand-2: #{theme.$theme-light--primary--
|
|
7
|
-
--vp-c-brand-3: #{theme.$theme-light--primary--
|
|
8
|
-
--vp-c-bg: #{theme.$theme-light--
|
|
9
|
-
--vp-c-bg-alt: #{theme.$theme-light--
|
|
10
|
-
--vp-c-bg-elv: #{theme.$theme-light--
|
|
11
|
-
--vp-c-bg-soft: #{theme.$theme-light--
|
|
12
|
-
--vp-c-border: #{theme.$theme-light--
|
|
13
|
-
--vp-c-divider: #{theme.$theme-light--secondary--
|
|
14
|
-
--vp-c-gutter: #{theme.$theme-light--secondary--
|
|
15
|
-
--vp-c-text-1: #{theme.$theme-light--
|
|
16
|
-
--vp-c-text-2: #{theme.$theme-light--
|
|
17
|
-
--vp-c-text-3: #{theme.$theme-light--
|
|
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};
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.dark {
|
|
21
|
-
--vp-c-brand: #{theme.$theme-light--primary--
|
|
22
|
-
--vp-c-brand-1: #{theme.$theme-light--primary--
|
|
23
|
-
--vp-c-brand-2: #{theme.$theme-light--primary--
|
|
24
|
-
--vp-c-brand-3: #{theme.$theme-light--primary--
|
|
25
|
-
--vp-c-bg: #{theme.$theme-light--
|
|
26
|
-
--vp-c-bg-alt: #{theme.$theme-light--
|
|
27
|
-
--vp-c-bg-elv: #{theme.$theme-light--
|
|
28
|
-
--vp-c-bg-soft: #{theme.$theme-light--
|
|
29
|
-
--vp-c-border: #{theme.$theme-light--
|
|
30
|
-
--vp-c-divider: #{theme.$theme-light--secondary--
|
|
31
|
-
--vp-c-gutter: #{theme.$theme-light--secondary--
|
|
32
|
-
--vp-c-text-1: #{theme.$theme-light--
|
|
33
|
-
--vp-c-text-2: #{theme.$theme-light--
|
|
34
|
-
--vp-c-text-3: #{theme.$theme-light--
|
|
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};
|
|
35
35
|
}
|
package/index.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
2
|
+
<html lang="en" class="light-mode">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
@@ -16,14 +16,91 @@
|
|
|
16
16
|
<h1>Hello Graupl!</h1>
|
|
17
17
|
<p>Graupl is a modular CSS framework with the goal of making it easy to theme a site.</p>
|
|
18
18
|
<p>This source code can be found in <a href="https://github.com/Graupl/graupl">GitHub</a>.</p>
|
|
19
|
-
<p>Graupl
|
|
19
|
+
<p>Graupl supports light and dark modes out-of-the-box.</p>
|
|
20
20
|
<h2>Buttons</h2>
|
|
21
|
-
<p>There are
|
|
22
|
-
<div class="columns">
|
|
23
|
-
<button class="button">Button</button>
|
|
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">
|
|
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
|
+
<button class="button tertiary">Tertiary Button</button>
|
|
26
27
|
</div>
|
|
28
|
+
<h2>Form elements</h2>
|
|
29
|
+
<p>Graupl provides default styling for all form elements.</p>
|
|
30
|
+
<label for="input">Input</label>
|
|
31
|
+
<input type="text" placeholder="Input" id="input">
|
|
32
|
+
<label for="input-readonly">Readonly Input</label>
|
|
33
|
+
<input type="text" placeholder="Readonly Input" id="input-readonly" value="Readonly Input"readonly>
|
|
34
|
+
<label for="input-disabled">Disabled Input</label>
|
|
35
|
+
<input type="text" placeholder="Disabled Input" id="input-disabled" disabled>
|
|
36
|
+
<label for="textarea">Textarea</label>
|
|
37
|
+
<textarea class="textarea" placeholder="Textarea" id="textarea"></textarea>
|
|
38
|
+
<label for="textarea-readonly">Readonly Textarea</label>
|
|
39
|
+
<textarea class="textarea" placeholder="Readonly Textarea" id="textarea-readonly" readonly>Readonly Textarea</textarea>
|
|
40
|
+
<label for="textarea-disabled">Disabled Textarea</label>
|
|
41
|
+
<textarea class="textarea" placeholder="Disabled Textarea" id="textarea-disabled" disabled></textarea>
|
|
42
|
+
<label for="select">Select</label>
|
|
43
|
+
<select id="select">
|
|
44
|
+
<option value="1">Option 1</option>
|
|
45
|
+
<option value="2">Option 2</option>
|
|
46
|
+
<optgroup label="Group 1">
|
|
47
|
+
<option value="3">Option 3</option>
|
|
48
|
+
<option value="4">Option 4</option>
|
|
49
|
+
<option value="5">Option 5</option>
|
|
50
|
+
</optgroup>
|
|
51
|
+
</select>
|
|
52
|
+
<label for="select-disabled">Disabled Select</label>
|
|
53
|
+
<select id="select-disabled" disabled>
|
|
54
|
+
<option value="1">Option 1</option>
|
|
55
|
+
<option value="2">Option 2</option>
|
|
56
|
+
<optgroup label="Group 1">
|
|
57
|
+
<option value="3">Option 3</option>
|
|
58
|
+
<option value="4">Option 4</option>
|
|
59
|
+
<option value="5">Option 5</option>
|
|
60
|
+
</optgroup>
|
|
61
|
+
</select>
|
|
62
|
+
<label for"multi-select">Multi-select</label>
|
|
63
|
+
<select id="multi-select" multiple>
|
|
64
|
+
<option value="1">Option 1</option>
|
|
65
|
+
<option value="2">Option 2</option>
|
|
66
|
+
<optgroup label="Group 1">
|
|
67
|
+
<option value="3">Option 3</option>
|
|
68
|
+
<option value="4">Option 4</option>
|
|
69
|
+
<option value="5">Option 5</option>
|
|
70
|
+
</optgroup>
|
|
71
|
+
</select>
|
|
72
|
+
<label for="multi-select-disabled">Disabled Multi-select</label>
|
|
73
|
+
<select id="multi-select-disabled" multiple disabled>
|
|
74
|
+
<option value="1">Option 1</option>
|
|
75
|
+
<option value="2">Option 2</option>
|
|
76
|
+
<optgroup label="Group 1">
|
|
77
|
+
<option value="3">Option 3</option>
|
|
78
|
+
<option value="4">Option 4</option>
|
|
79
|
+
<option value="5">Option 5</option>
|
|
80
|
+
</optgroup>
|
|
81
|
+
</select>
|
|
82
|
+
<fieldset>
|
|
83
|
+
<legend>Checkboxes</legend>
|
|
84
|
+
<label for="checkbox">
|
|
85
|
+
<input type="checkbox" id="checkbox"> Checkbox</label>
|
|
86
|
+
<label for="checkbox-checked">
|
|
87
|
+
<input type="checkbox" id="checkbox-checked" checked> Checked Checkbox</label>
|
|
88
|
+
<label for="checkbox-disabled">
|
|
89
|
+
<input type="checkbox" id="checkbox-disabled" disabled> Disabled Checkbox</label>
|
|
90
|
+
</fieldset>
|
|
91
|
+
<fieldset>
|
|
92
|
+
<legend>Radio Buttons</legend>
|
|
93
|
+
<label for="radio"><input type="radio" id="radio" name="radio"> Radio</label>
|
|
94
|
+
<label for="radio-checked"><input type="radio" id="radio-checked" name="radio" checked> Checked Radio</label>
|
|
95
|
+
<label for="radio-disabled"><input type="radio" id="radio-disabled" name="radio" disabled> Disabled Radio</label>
|
|
96
|
+
</fieldset>
|
|
97
|
+
<fieldset disabled>
|
|
98
|
+
<legend>Disabled Fieldset</legend>
|
|
99
|
+
<label for="disabled-fieldset-checkbox">
|
|
100
|
+
<input type="checkbox" id="disabled-fieldset-checkbox"> Checkbox</label>
|
|
101
|
+
</fieldset>
|
|
102
|
+
<label for="range">Range</label>
|
|
103
|
+
<input type="range" class="range" id="range">
|
|
27
104
|
</main>
|
|
28
105
|
</body>
|
|
29
106
|
</html>
|
package/package.json
CHANGED
package/scss/base/_index.scss
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
@forward "../../defaults";
|
|
8
|
+
|
|
9
|
+
$fieldset-direction: column !default;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Graupl form base styles.
|
|
2
|
+
|
|
3
|
+
@use "variables" as *;
|
|
4
|
+
@use "../../mixins/layer" as *;
|
|
5
|
+
|
|
6
|
+
@include layer(base) {
|
|
7
|
+
input,
|
|
8
|
+
textarea,
|
|
9
|
+
select {
|
|
10
|
+
padding: $input-padding;
|
|
11
|
+
border-width: $input-border-width;
|
|
12
|
+
border-style: $input-border-style;
|
|
13
|
+
border-radius: $input-border-radius;
|
|
14
|
+
font-size: $input-font-size;
|
|
15
|
+
|
|
16
|
+
&:disabled {
|
|
17
|
+
cursor: not-allowed;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
label {
|
|
22
|
+
font-size: $label-font-size;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
fieldset {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-flow: $fieldset-direction wrap;
|
|
28
|
+
gap: $fieldset-gap;
|
|
29
|
+
padding: $fieldset-padding;
|
|
30
|
+
border-width: $fieldset-border-width;
|
|
31
|
+
border-style: $fieldset-border-style;
|
|
32
|
+
border-radius: $fieldset-border-radius;
|
|
33
|
+
font-size: $fieldset-font-size;
|
|
34
|
+
|
|
35
|
+
&:disabled {
|
|
36
|
+
input,
|
|
37
|
+
textarea,
|
|
38
|
+
select {
|
|
39
|
+
cursor: not-allowed;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@include layer(theme) {
|
|
46
|
+
input,
|
|
47
|
+
textarea,
|
|
48
|
+
select {
|
|
49
|
+
border-color: $input-border-color;
|
|
50
|
+
background: $input-background;
|
|
51
|
+
color: $input-color;
|
|
52
|
+
accent-color: $input-accent-color;
|
|
53
|
+
|
|
54
|
+
&::placeholder {
|
|
55
|
+
color: $input-placeholder-color;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:disabled {
|
|
59
|
+
border-color: $input-disabled-border-color;
|
|
60
|
+
color: $input-disabled-color;
|
|
61
|
+
|
|
62
|
+
&::placeholder {
|
|
63
|
+
color: $input-disabled-placeholder-color;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
label {
|
|
69
|
+
color: $label-color;
|
|
70
|
+
|
|
71
|
+
&:has(+ input:disabled, + textarea:disabled, + select:disabled) {
|
|
72
|
+
color: $label-disabled-color;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
fieldset {
|
|
77
|
+
border-color: $fieldset-border-color;
|
|
78
|
+
background: $fieldset-background;
|
|
79
|
+
color: $fieldset-color;
|
|
80
|
+
|
|
81
|
+
&:disabled {
|
|
82
|
+
border-color: $fieldset-disabled-border-color;
|
|
83
|
+
color: $fieldset-disabled-color;
|
|
84
|
+
|
|
85
|
+
label {
|
|
86
|
+
color: $label-disabled-color;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// Variables referencing custom properties.
|
|
2
|
+
|
|
3
|
+
@use "../../variables" as base;
|
|
4
|
+
@use "../../theme/variables" as theme;
|
|
5
|
+
@use "defaults";
|
|
6
|
+
@use "sass:map";
|
|
7
|
+
|
|
8
|
+
$input-padding-x: var(--#{defaults.$prefix}-input-padding-x, #{base.$gap});
|
|
9
|
+
$input-padding-y: var(
|
|
10
|
+
--#{defaults.$prefix}-input-padding-y,
|
|
11
|
+
calc(#{base.$gap} / 2)
|
|
12
|
+
);
|
|
13
|
+
$input-padding: var(
|
|
14
|
+
--#{defaults.$prefix}-input-padding,
|
|
15
|
+
#{$input-padding-y} #{$input-padding-x}
|
|
16
|
+
);
|
|
17
|
+
$input-font-size: var(
|
|
18
|
+
--#{defaults.$prefix}-input-font-size,
|
|
19
|
+
#{map.get(base.$font-size, default)}
|
|
20
|
+
);
|
|
21
|
+
$label-font-size: var(
|
|
22
|
+
--#{defaults.$prefix}-label-font-size,
|
|
23
|
+
#{$input-font-size}
|
|
24
|
+
);
|
|
25
|
+
$fieldset-direction: var(
|
|
26
|
+
--#{defaults.$prefix}-fieldset-direction,
|
|
27
|
+
#{defaults.$fieldset-direction}
|
|
28
|
+
);
|
|
29
|
+
$fieldset-gap: var(--#{defaults.$prefix}-fieldset-gap, calc(#{base.$gap} / 4));
|
|
30
|
+
$fieldset-padding-x: var(
|
|
31
|
+
--#{defaults.$prefix}-fieldset-padding-x,
|
|
32
|
+
#{$input-padding-x}
|
|
33
|
+
);
|
|
34
|
+
$fieldset-padding-y: var(
|
|
35
|
+
--#{defaults.$prefix}-fieldset-padding-y,
|
|
36
|
+
#{$input-padding-y}
|
|
37
|
+
);
|
|
38
|
+
$fieldset-padding: var(
|
|
39
|
+
--#{defaults.$prefix}-fieldset-padding,
|
|
40
|
+
#{$fieldset-padding-y} #{$fieldset-padding-x}
|
|
41
|
+
);
|
|
42
|
+
$fieldset-font-size: var(
|
|
43
|
+
--#{defaults.$prefix}-fieldset-font-size,
|
|
44
|
+
#{$input-font-size}
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
// Background properties.
|
|
48
|
+
$input-background: var(
|
|
49
|
+
--#{defaults.$prefix}-input-background,
|
|
50
|
+
#{theme.$theme-active--primary--100}
|
|
51
|
+
);
|
|
52
|
+
$fieldset-background: var(
|
|
53
|
+
--#{defaults.$prefix}-fieldset-background,
|
|
54
|
+
#{$input-background}
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
// Text properties.
|
|
58
|
+
$input-color: var(
|
|
59
|
+
--#{defaults.$prefix}-input-color,
|
|
60
|
+
#{theme.$theme-active--primary--900}
|
|
61
|
+
);
|
|
62
|
+
$input-placeholder-color: var(
|
|
63
|
+
--#{defaults.$prefix}-input-placeholder-color,
|
|
64
|
+
#{theme.$theme-active--secondary--600}
|
|
65
|
+
);
|
|
66
|
+
$label-color: var(--#{defaults.$prefix}-label-color, #{$input-color});
|
|
67
|
+
$fieldset-color: var(--#{defaults.$prefix}-fieldset-color, #{$input-color});
|
|
68
|
+
$input-disabled-color: var(
|
|
69
|
+
--#{defaults.$prefix}-input-disabled-color,
|
|
70
|
+
#{theme.$theme-active--secondary--400}
|
|
71
|
+
);
|
|
72
|
+
$input-disabled-placeholder-color: var(
|
|
73
|
+
--#{defaults.$prefix}-input-disabled-placeholder-color,
|
|
74
|
+
#{$input-disabled-color}
|
|
75
|
+
);
|
|
76
|
+
$label-disabled-color: var(
|
|
77
|
+
--#{defaults.$prefix}-label-disabled-color,
|
|
78
|
+
#{$input-disabled-color}
|
|
79
|
+
);
|
|
80
|
+
$fieldset-disabled-color: var(
|
|
81
|
+
--#{defaults.$prefix}-fieldset-disabled-color,
|
|
82
|
+
#{$input-disabled-color}
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
// Border properties.
|
|
86
|
+
$input-border-width: var(
|
|
87
|
+
--#{defaults.$prefix}-input-border-width,
|
|
88
|
+
#{base.$border-width}
|
|
89
|
+
);
|
|
90
|
+
$input-border-style: var(
|
|
91
|
+
--#{defaults.$prefix}-botton-border-style,
|
|
92
|
+
#{base.$border-style}
|
|
93
|
+
);
|
|
94
|
+
$input-border-radius: var(
|
|
95
|
+
--#{defaults.$prefix}-input-border-radius,
|
|
96
|
+
#{base.$border-radius}
|
|
97
|
+
);
|
|
98
|
+
$fieldset-border-width: var(
|
|
99
|
+
--#{defaults.$prefix}-fieldset-border-width,
|
|
100
|
+
#{$input-border-width}
|
|
101
|
+
);
|
|
102
|
+
$fieldset-border-style: var(
|
|
103
|
+
--#{defaults.$prefix}-fieldset-border-style,
|
|
104
|
+
#{$input-border-style}
|
|
105
|
+
);
|
|
106
|
+
$fieldset-border-radius: var(
|
|
107
|
+
--#{defaults.$prefix}-fieldset-border-radius,
|
|
108
|
+
#{$input-border-radius}
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
// Border colour properties.
|
|
112
|
+
$input-border-color: var(
|
|
113
|
+
--#{defaults.$prefix}-input-border-color,
|
|
114
|
+
#{theme.$theme-active--secondary--700}
|
|
115
|
+
);
|
|
116
|
+
$input-disabled-border-color: var(
|
|
117
|
+
--#{defaults.$prefix}-input-disabled-border-color,
|
|
118
|
+
#{theme.$theme-active--secondary--200}
|
|
119
|
+
);
|
|
120
|
+
$fieldset-border-color: var(
|
|
121
|
+
--#{defaults.$prefix}-fieldset-border-color,
|
|
122
|
+
#{$input-border-color}
|
|
123
|
+
);
|
|
124
|
+
$fieldset-disabled-border-color: var(
|
|
125
|
+
--#{defaults.$prefix}-fieldset-disabled-border-color,
|
|
126
|
+
#{$input-disabled-border-color}
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
// Accent color properties.
|
|
130
|
+
$input-accent-color: var(
|
|
131
|
+
--#{defaults.$prefix}-input-accent-color,
|
|
132
|
+
#{theme.$theme-active--primary--700}
|
|
133
|
+
);
|
|
@@ -15,17 +15,17 @@ $link-text-decoration-thickness: var(
|
|
|
15
15
|
);
|
|
16
16
|
$link-color: var(
|
|
17
17
|
--#{defaults.$prefix}-link-color,
|
|
18
|
-
#{theme.$theme-active--primary}
|
|
18
|
+
#{theme.$theme-active--primary--700}
|
|
19
19
|
);
|
|
20
20
|
$link-hover-color: var(
|
|
21
21
|
--#{defaults.$prefix}-link-hover-color,
|
|
22
|
-
#{theme.$theme-active--
|
|
22
|
+
#{theme.$theme-active--tertiary--700}
|
|
23
23
|
);
|
|
24
24
|
$link-active-color: var(
|
|
25
25
|
--#{defaults.$prefix}-link-active-color,
|
|
26
|
-
#{theme.$theme-active--
|
|
26
|
+
#{theme.$theme-active--tertiary--700}
|
|
27
27
|
);
|
|
28
28
|
$link-visited-color: var(
|
|
29
29
|
--#{defaults.$prefix}-link-visited-color,
|
|
30
|
-
#{theme.$theme-active--primary}
|
|
30
|
+
#{theme.$theme-active--primary--700}
|
|
31
31
|
);
|
|
@@ -49,19 +49,27 @@
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
&.primary {
|
|
52
|
-
--#{defaults.$prefix}-button-hover-background: #{theme.$theme-active--primary};
|
|
53
|
-
--#{defaults.$prefix}-button-active-background: #{theme.$theme-active--primary};
|
|
54
|
-
--#{defaults.$prefix}-button-border-color: #{theme.$theme-active--primary};
|
|
55
|
-
--#{defaults.$prefix}-button-hover-border-color: #{theme.$theme-active--primary};
|
|
56
|
-
--#{defaults.$prefix}-button-active-border-color: #{theme.$theme-active--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
57
|
}
|
|
58
58
|
|
|
59
59
|
&.secondary {
|
|
60
|
-
--#{defaults.$prefix}-button-hover-background: #{theme.$theme-active--secondary};
|
|
61
|
-
--#{defaults.$prefix}-button-active-background: #{theme.$theme-active--secondary};
|
|
62
|
-
--#{defaults.$prefix}-button-border-color: #{theme.$theme-active--secondary};
|
|
63
|
-
--#{defaults.$prefix}-button-hover-border-color: #{theme.$theme-active--secondary};
|
|
64
|
-
--#{defaults.$prefix}-button-active-border-color: #{theme.$theme-active--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};
|
|
65
|
+
}
|
|
66
|
+
|
|
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};
|
|
65
73
|
}
|
|
66
74
|
}
|
|
67
75
|
}
|
|
@@ -48,29 +48,29 @@ $button-active-transform: var(
|
|
|
48
48
|
// Background properties.
|
|
49
49
|
$button-background: var(
|
|
50
50
|
--#{defaults.$prefix}-button-background,
|
|
51
|
-
#{theme.$theme-active--
|
|
51
|
+
#{theme.$theme-active--primary--100}
|
|
52
52
|
);
|
|
53
53
|
$button-hover-background: var(
|
|
54
54
|
--#{defaults.$prefix}-button-hover-background,
|
|
55
|
-
#{theme.$theme-active--
|
|
55
|
+
#{theme.$theme-active--primary--900}
|
|
56
56
|
);
|
|
57
57
|
$button-active-background: var(
|
|
58
58
|
--#{defaults.$prefix}-button-active-background,
|
|
59
|
-
#{theme.$theme-active--
|
|
59
|
+
#{theme.$theme-active--primary--900}
|
|
60
60
|
);
|
|
61
61
|
|
|
62
62
|
// Text properties.
|
|
63
63
|
$button-color: var(
|
|
64
64
|
--#{defaults.$prefix}-button-color,
|
|
65
|
-
#{theme.$theme-active--
|
|
65
|
+
#{theme.$theme-active--primary--900}
|
|
66
66
|
);
|
|
67
67
|
$button-hover-color: var(
|
|
68
68
|
--#{defaults.$prefix}-button-hover-color,
|
|
69
|
-
#{theme.$theme-active--
|
|
69
|
+
#{theme.$theme-active--primary--100}
|
|
70
70
|
);
|
|
71
71
|
$button-active-color: var(
|
|
72
72
|
--#{defaults.$prefix}-button-active-color,
|
|
73
|
-
#{theme.$theme-active--
|
|
73
|
+
#{theme.$theme-active--primary--100}
|
|
74
74
|
);
|
|
75
75
|
|
|
76
76
|
// Border properties.
|
|
@@ -90,13 +90,13 @@ $button-border-radius: var(
|
|
|
90
90
|
// Border colour properties.
|
|
91
91
|
$button-border-color: var(
|
|
92
92
|
--#{defaults.$prefix}-button-border-color,
|
|
93
|
-
#{theme.$theme-active--
|
|
93
|
+
#{theme.$theme-active--primary--900}
|
|
94
94
|
);
|
|
95
95
|
$button-hover-border-color: var(
|
|
96
96
|
--#{defaults.$prefix}-button-hover-border-color,
|
|
97
|
-
#{theme.$theme-active--
|
|
97
|
+
#{theme.$theme-active--primary--900}
|
|
98
98
|
);
|
|
99
99
|
$button-active-border-color: var(
|
|
100
100
|
--#{defaults.$prefix}-button-active-border-color,
|
|
101
|
-
#{theme.$theme-active--
|
|
101
|
+
#{theme.$theme-active--primary--900}
|
|
102
102
|
);
|