@graupl/graupl 1.0.0-alpha.9 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/codeql-analysis.yml +3 -3
- package/.husky/commit-msg +0 -1
- package/.husky/pre-commit +0 -1
- package/CHANGELOG.md +160 -0
- package/build.js +7 -0
- package/dist/css/base/button.css +2 -0
- package/dist/css/base/button.css.map +1 -0
- package/dist/css/base/form.css +2 -0
- package/dist/css/base/form.css.map +1 -0
- package/dist/css/base/link.css +2 -0
- package/dist/css/base/link.css.map +1 -0
- package/dist/css/base/table.css +2 -0
- package/dist/css/base/table.css.map +1 -0
- package/dist/css/base.css +2 -0
- package/dist/css/base.css.map +1 -0
- package/dist/css/component/accordion.css +2 -0
- package/dist/css/component/accordion.css.map +1 -0
- package/dist/css/component/alert.css +2 -0
- package/dist/css/component/alert.css.map +1 -0
- package/dist/css/component/card.css +2 -0
- package/dist/css/component/card.css.map +1 -0
- package/dist/css/component/carousel.css +2 -0
- package/dist/css/component/carousel.css.map +1 -0
- package/dist/css/component/input-group.css +2 -0
- package/dist/css/component/input-group.css.map +1 -0
- package/dist/css/component/menu.css +2 -0
- package/dist/css/component/menu.css.map +1 -0
- package/dist/css/component/navigation.css +2 -0
- package/dist/css/component/navigation.css.map +1 -0
- package/dist/css/component.css +2 -0
- package/dist/css/component.css.map +1 -0
- package/dist/css/graupl.css +2 -0
- package/dist/css/graupl.css.map +1 -0
- package/dist/css/init.css +2 -0
- package/dist/css/init.css.map +1 -0
- package/dist/css/layout/columns.css +2 -0
- package/dist/css/layout/columns.css.map +1 -0
- package/dist/css/layout/container.css +2 -0
- package/dist/css/layout/container.css.map +1 -0
- package/dist/css/layout/flex-columns.css +2 -0
- package/dist/css/layout/flex-columns.css.map +1 -0
- package/dist/css/layout.css +2 -0
- package/dist/css/layout.css.map +1 -0
- package/dist/css/normalize.css +2 -0
- package/dist/css/normalize.css.map +1 -0
- package/dist/css/state/focus.css +2 -0
- package/dist/css/state/focus.css.map +1 -0
- package/dist/css/state.css +2 -0
- package/dist/css/state.css.map +1 -0
- package/dist/css/theme/color.css +2 -0
- package/dist/css/theme/color.css.map +1 -0
- package/dist/css/theme/typography.css +2 -0
- package/dist/css/theme/typography.css.map +1 -0
- package/dist/css/theme.css +2 -0
- package/dist/css/theme.css.map +1 -0
- package/dist/css/utilities/alignment.css +2 -0
- package/dist/css/utilities/alignment.css.map +1 -0
- package/dist/css/utilities/color.css +2 -0
- package/dist/css/utilities/color.css.map +1 -0
- package/dist/css/utilities/display.css +2 -0
- package/dist/css/utilities/display.css.map +1 -0
- package/dist/css/utilities/flex.css +2 -0
- package/dist/css/utilities/flex.css.map +1 -0
- package/dist/css/utilities/height.css +2 -0
- package/dist/css/utilities/height.css.map +1 -0
- package/dist/css/utilities/inset.css +2 -0
- package/dist/css/utilities/inset.css.map +1 -0
- package/dist/css/utilities/justification.css +2 -0
- package/dist/css/utilities/justification.css.map +1 -0
- package/dist/css/utilities/list.css +2 -0
- package/dist/css/utilities/list.css.map +1 -0
- package/dist/css/utilities/order.css +2 -0
- package/dist/css/utilities/order.css.map +1 -0
- package/dist/css/utilities/postion.css +2 -0
- package/dist/css/utilities/postion.css.map +1 -0
- package/dist/css/utilities/ratio.css +2 -0
- package/dist/css/utilities/ratio.css.map +1 -0
- package/dist/css/utilities/spacing.css +2 -0
- package/dist/css/utilities/spacing.css.map +1 -0
- package/dist/css/utilities/typography.css +2 -0
- package/dist/css/utilities/typography.css.map +1 -0
- package/dist/css/utilities/visibility.css +2 -0
- package/dist/css/utilities/visibility.css.map +1 -0
- package/dist/css/utilities/width.css +2 -0
- package/dist/css/utilities/width.css.map +1 -0
- package/dist/css/utilities.css +2 -0
- package/dist/css/utilities.css.map +1 -0
- package/dist/js/component/accordion.cjs.js +3 -0
- package/dist/js/component/accordion.esm.js +1289 -0
- package/dist/js/component/accordion.iife.js +3 -0
- package/dist/js/component/alert.cjs.js +3 -0
- package/dist/js/component/alert.esm.js +529 -0
- package/dist/js/component/alert.iife.js +3 -0
- package/dist/js/component/carousel.cjs.js +3 -0
- package/dist/js/component/carousel.esm.js +1110 -0
- package/dist/js/component/carousel.iife.js +3 -0
- package/dist/js/graupl.cjs.js +5 -0
- package/dist/js/graupl.esm.js +1462 -0
- package/dist/js/graupl.iife.js +5 -0
- package/docs/.vitepress/config.js +39 -12
- package/docs/components/alert.md +130 -0
- package/docs/components/button.md +84 -0
- package/docs/components/card.md +369 -0
- package/docs/components/index.md +1 -0
- package/docs/components/inputgroup.md +159 -0
- package/docs/components/menu.md +326 -0
- package/docs/components/navigation.md +158 -0
- package/docs/content.md +237 -0
- package/docs/defaults.md +121 -0
- package/docs/forms.md +79 -0
- package/docs/functions.md +9 -0
- package/docs/getting-started.md +1 -0
- package/docs/index.md +1 -7
- package/docs/introduction.md +22 -2
- package/docs/layout.md +200 -0
- package/docs/mixins.md +47 -0
- package/docs/state.md +67 -0
- package/docs/theme.md +258 -0
- package/docs/utilities.md +357 -0
- package/eslint.config.js +1 -0
- package/index.html +816 -327
- package/index.js +12 -0
- package/package.json +31 -10
- package/scss/base/button.scss +3 -0
- package/scss/base/form.scss +1 -1
- package/scss/base/link.scss +1 -1
- package/scss/base/table.scss +1 -1
- package/scss/base.scss +1 -1
- package/scss/component/accordion.scss +3 -0
- package/scss/component/alert.scss +3 -0
- package/scss/component/card.scss +3 -0
- package/scss/component/carousel.scss +3 -0
- package/scss/component/input-group.scss +1 -1
- package/scss/component/menu.scss +3 -0
- package/scss/component/navigation.scss +3 -0
- package/scss/component.scss +1 -1
- package/scss/graupl.scss +1 -3
- package/scss/init.scss +3 -0
- package/scss/layout/columns.scss +1 -1
- package/scss/layout/container.scss +1 -1
- package/scss/layout/flex-columns.scss +3 -0
- package/scss/layout.scss +1 -1
- package/scss/normalize.scss +3 -0
- package/scss/state/focus.scss +1 -1
- package/scss/state.scss +1 -1
- package/scss/theme/color.scss +1 -1
- package/scss/theme/typography.scss +1 -1
- package/scss/theme.scss +1 -1
- package/scss/utilities/alignment.scss +3 -0
- package/scss/utilities/color.scss +3 -0
- package/scss/utilities/display.scss +3 -0
- package/scss/utilities/flex.scss +3 -0
- package/scss/utilities/height.scss +3 -0
- package/scss/utilities/inset.scss +3 -0
- package/scss/utilities/justification.scss +3 -0
- package/scss/utilities/list.scss +3 -0
- package/scss/utilities/order.scss +3 -0
- package/scss/utilities/postion.scss +3 -0
- package/scss/utilities/ratio.scss +3 -0
- package/scss/utilities/spacing.scss +1 -1
- package/scss/utilities/typography.scss +1 -1
- package/scss/utilities/visibility.scss +3 -0
- package/scss/utilities/width.scss +3 -0
- package/scss/utilities.scss +1 -1
- package/src/js/accordion/Accordion.js +1163 -0
- package/src/js/accordion/AccordionItem.js +496 -0
- package/src/js/accordion/index.js +10 -0
- package/src/js/alert/Alert.js +581 -0
- package/src/js/alert/index.js +11 -0
- package/src/js/carousel/Carousel.js +1427 -0
- package/src/js/carousel/index.js +10 -0
- package/src/js/domHelpers.js +37 -0
- package/src/js/eventHandlers.js +39 -0
- package/src/js/navigation/index.js +36 -0
- package/src/js/storage.js +106 -0
- package/src/js/validate.js +225 -0
- package/src/scss/_defaults.scss +75 -6
- package/src/scss/_index.scss +4 -3
- package/src/scss/_init.scss +2 -2
- package/src/scss/_normalize.scss +197 -0
- package/src/scss/_variables.scss +17 -17
- package/src/scss/base/_index.scss +2 -1
- package/src/scss/base/button/_defaults.scss +60 -0
- package/src/scss/base/button/_index.scss +107 -0
- package/src/scss/base/button/_mixins.scss +166 -0
- package/src/scss/base/button/_variables.scss +176 -0
- package/src/scss/base/form/_defaults.scss +14 -4
- package/src/scss/base/form/_index.scss +23 -20
- package/src/scss/base/form/_variables.scss +46 -37
- package/src/scss/base/link/_defaults.scss +48 -5
- package/src/scss/base/link/_index.scss +111 -10
- package/src/scss/base/link/_variables.scss +239 -9
- package/src/scss/base/table/_defaults.scss +49 -4
- package/src/scss/base/table/_index.scss +102 -8
- package/src/scss/base/table/_variables.scss +87 -17
- package/src/scss/component/_index.scss +7 -3
- package/src/scss/component/accordion/_defaults.scss +40 -0
- package/src/scss/component/accordion/_index.scss +180 -0
- package/src/scss/component/accordion/_variables.scss +316 -0
- package/src/scss/component/alert/_defaults.scss +49 -0
- package/src/scss/component/alert/_index.scss +118 -0
- package/src/scss/component/alert/_variables.scss +170 -0
- package/src/scss/component/card/_defaults.scss +32 -0
- package/src/scss/component/card/_index.scss +178 -0
- package/src/scss/component/card/_variables.scss +186 -0
- package/src/scss/component/carousel/_defaults.scss +43 -0
- package/src/scss/component/carousel/_index.scss +188 -0
- package/src/scss/component/carousel/_variables.scss +104 -0
- package/src/scss/component/input-group/_defaults.scss +11 -4
- package/src/scss/component/input-group/_index.scss +13 -11
- package/src/scss/component/input-group/_variables.scss +16 -13
- package/src/scss/component/menu/_defaults.scss +66 -0
- package/src/scss/component/menu/_index.scss +305 -0
- package/src/scss/component/menu/_variables.scss +500 -0
- package/src/scss/component/navigation/_defaults.scss +29 -0
- package/src/scss/component/navigation/_index.scss +189 -0
- package/src/scss/component/navigation/_variables.scss +237 -0
- package/src/scss/functions/_important.scss +2 -0
- package/src/scss/functions/_screen.scss +30 -0
- package/src/scss/functions/_theme.scss +28 -7
- package/src/scss/layout/_index.scss +2 -1
- package/src/scss/layout/columns/_defaults.scss +12 -4
- package/src/scss/layout/columns/_index.scss +32 -10
- package/src/scss/layout/columns/_variables.scss +13 -9
- package/src/scss/layout/container/_defaults.scss +13 -4
- package/src/scss/layout/container/_index.scss +12 -7
- package/src/scss/layout/container/_variables.scss +14 -11
- package/src/scss/layout/flex-columns/_defaults.scss +18 -0
- package/src/scss/layout/flex-columns/_index.scss +80 -0
- package/src/scss/layout/flex-columns/_variables.scss +26 -0
- package/src/scss/mixins/_animation.scss +15 -0
- package/src/scss/mixins/_layer.scss +3 -5
- package/src/scss/mixins/_screen.scss +56 -0
- package/src/scss/mixins/_utility.scss +30 -0
- package/src/scss/mixins/_visually-hidden.scss +20 -0
- package/src/scss/state/_index.scss +1 -1
- package/src/scss/state/focus/_defaults.scss +6 -4
- package/src/scss/state/focus/_index.scss +7 -7
- package/src/scss/state/focus/_mixins.scss +15 -0
- package/src/scss/state/focus/_variables.scss +14 -10
- package/src/scss/theme/_index.scss +1 -1
- package/src/scss/theme/color/_defaults.scss +101 -19
- package/src/scss/theme/color/_index.scss +18 -18
- package/src/scss/theme/color/_variables.scss +73 -65
- package/src/scss/theme/typography/_defaults.scss +7 -5
- package/src/scss/theme/typography/_index.scss +1 -1
- package/src/scss/theme/typography/_variables.scss +62 -58
- package/src/scss/utilities/_index.scss +14 -2
- package/src/scss/utilities/alignment/_defaults.scss +62 -0
- package/src/scss/utilities/alignment/_index.scss +75 -0
- package/src/scss/utilities/alignment/_variables.scss +6 -0
- package/src/scss/utilities/color/_defaults.scss +35 -0
- package/src/scss/utilities/color/_index.scss +91 -0
- package/src/scss/utilities/color/_variables.scss +6 -0
- package/src/scss/utilities/display/_defaults.scss +32 -0
- package/src/scss/utilities/display/_index.scss +61 -0
- package/src/scss/utilities/display/_variables.scss +6 -0
- package/src/scss/utilities/flex/_defaults.scss +63 -0
- package/src/scss/utilities/flex/_index.scss +71 -0
- package/src/scss/utilities/flex/_variables.scss +6 -0
- package/src/scss/utilities/height/_defaults.scss +41 -0
- package/src/scss/utilities/height/_index.scss +98 -0
- package/src/scss/utilities/height/_variables.scss +6 -0
- package/src/scss/utilities/inset/_defaults.scss +41 -0
- package/src/scss/utilities/inset/_index.scss +37 -0
- package/src/scss/utilities/inset/_variables.scss +6 -0
- package/src/scss/utilities/justification/_defaults.scss +59 -0
- package/src/scss/utilities/justification/_index.scss +75 -0
- package/src/scss/utilities/justification/_variables.scss +6 -0
- package/src/scss/utilities/list/_defaults.scss +39 -0
- package/src/scss/utilities/list/_index.scss +56 -0
- package/src/scss/utilities/list/_variables.scss +6 -0
- package/src/scss/utilities/order/_defaults.scss +22 -0
- package/src/scss/utilities/order/_index.scss +63 -0
- package/src/scss/utilities/order/_variables.scss +6 -0
- package/src/scss/utilities/position/_defaults.scss +26 -0
- package/src/scss/utilities/position/_index.scss +37 -0
- package/src/scss/utilities/position/_variables.scss +6 -0
- package/src/scss/utilities/ratio/_defaults.scss +28 -0
- package/src/scss/utilities/ratio/_index.scss +52 -0
- package/src/scss/utilities/ratio/_variables.scss +9 -0
- package/src/scss/utilities/spacing/_defaults.scss +9 -4
- package/src/scss/utilities/spacing/_index.scss +138 -33
- package/src/scss/utilities/spacing/_variables.scss +5 -2
- package/src/scss/utilities/typography/_defaults.scss +29 -4
- package/src/scss/utilities/typography/_index.scss +155 -23
- package/src/scss/utilities/typography/_variables.scss +5 -2
- package/src/scss/utilities/visibility/_defaults.scss +25 -0
- package/src/scss/utilities/visibility/_index.scss +36 -0
- package/src/scss/utilities/visibility/_variables.scss +6 -0
- package/src/scss/utilities/width/_defaults.scss +41 -0
- package/src/scss/utilities/width/_index.scss +98 -0
- package/src/scss/utilities/width/_variables.scss +6 -0
- package/stylelint.config.js +5 -0
- package/vite.config.js +57 -0
- package/dist/base/form.css +0 -2
- package/dist/base/form.css.map +0 -1
- package/dist/base/link.css +0 -2
- package/dist/base/link.css.map +0 -1
- package/dist/base/table.css +0 -2
- package/dist/base/table.css.map +0 -1
- package/dist/base.css +0 -2
- package/dist/base.css.map +0 -1
- package/dist/component/button.css +0 -2
- package/dist/component/button.css.map +0 -1
- package/dist/component/input-group.css +0 -2
- package/dist/component/input-group.css.map +0 -1
- package/dist/component/table.css +0 -2
- package/dist/component/table.css.map +0 -1
- package/dist/component.css +0 -2
- package/dist/component.css.map +0 -1
- package/dist/graupl.css +0 -2
- package/dist/graupl.css.map +0 -1
- package/dist/layout/columns.css +0 -2
- package/dist/layout/columns.css.map +0 -1
- package/dist/layout/container.css +0 -2
- package/dist/layout/container.css.map +0 -1
- package/dist/layout.css +0 -2
- package/dist/layout.css.map +0 -1
- package/dist/state/focus.css +0 -2
- package/dist/state/focus.css.map +0 -1
- package/dist/state.css +0 -2
- package/dist/state.css.map +0 -1
- package/dist/theme/color.css +0 -2
- package/dist/theme/color.css.map +0 -1
- package/dist/theme/typography.css +0 -2
- package/dist/theme/typography.css.map +0 -1
- package/dist/theme.css +0 -2
- package/dist/theme.css.map +0 -1
- package/dist/utilities/colors.css +0 -2
- package/dist/utilities/colors.css.map +0 -1
- package/dist/utilities/spacing.css +0 -2
- package/dist/utilities/spacing.css.map +0 -1
- package/dist/utilities/typography.css +0 -2
- package/dist/utilities/typography.css.map +0 -1
- package/dist/utilities.css +0 -2
- package/dist/utilities.css.map +0 -1
- package/scss/component/button.scss +0 -3
- package/scss/component/table.scss +0 -3
- package/scss/utilities/colors.scss +0 -3
- package/src/scss/component/button/_defaults.scss +0 -39
- package/src/scss/component/button/_index.scss +0 -98
- package/src/scss/component/button/_variables.scss +0 -131
- package/src/scss/component/table/_defaults.scss +0 -30
- package/src/scss/component/table/_index.scss +0 -77
- package/src/scss/component/table/_variables.scss +0 -64
- package/src/scss/mixins/_media-queries.scss +0 -26
- package/src/scss/utilities/colors/_defaults.scss +0 -5
- package/src/scss/utilities/colors/_index.scss +0 -22
- package/src/scss/utilities/colors/_variables.scss +0 -3
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl color theme styles.
|
|
2
2
|
|
|
3
3
|
@use "variables" as *;
|
|
4
4
|
@use "../../mixins/layer" as *;
|
|
5
|
+
@use "defaults";
|
|
5
6
|
@use "../../defaults" as root-defaults;
|
|
6
7
|
@use "sass:map";
|
|
7
8
|
@use "../../functions/theme";
|
|
@@ -9,34 +10,33 @@
|
|
|
9
10
|
@include layer(theme) {
|
|
10
11
|
:root {
|
|
11
12
|
background: $root-background;
|
|
12
|
-
color: $root-
|
|
13
|
+
color: $root-color;
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
// Generate the default colour properties.
|
|
16
|
+
@each $color, $map in defaults.$colors {
|
|
15
17
|
@each $shade, $value in $map {
|
|
16
|
-
--#{root-defaults.$prefix}
|
|
18
|
+
--#{root-defaults.$prefix}#{$color}--#{$shade}: #{$value};
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
|
-
}
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
@each $color, $map in $theme-dark {
|
|
22
|
+
// Generate the active theme properties.
|
|
23
|
+
@each $color, $map in map.get($themes, defaults.$default-theme) {
|
|
24
24
|
@each $shade, $value in $map {
|
|
25
|
-
--#{root-defaults.$prefix}
|
|
25
|
+
--#{root-defaults.$prefix}theme-active--#{$color}--#{$shade}: #{$value};
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
color-scheme: dark;
|
|
30
28
|
}
|
|
31
29
|
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
@each $
|
|
36
|
-
|
|
30
|
+
// Generate the available theme properties.
|
|
31
|
+
@each $theme-name, $theme in $themes {
|
|
32
|
+
#{defaults.$theme-selector-prefix}#{$theme-name}#{defaults.$theme-selector-suffix} {
|
|
33
|
+
@each $color, $map in $theme {
|
|
34
|
+
@each $shade, $value in $map {
|
|
35
|
+
--#{root-defaults.$prefix}theme-active--#{$color}--#{$shade}: #{$value};
|
|
36
|
+
}
|
|
37
37
|
}
|
|
38
|
-
}
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
color-scheme: #{$theme-name};
|
|
40
|
+
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl color theme variables.
|
|
2
|
+
//
|
|
3
|
+
// These values are to be used to directly style components and provide a
|
|
4
|
+
// cleaner way to reference custom properties.
|
|
2
5
|
|
|
3
6
|
@use "defaults";
|
|
4
7
|
@use "../../defaults" as root-defaults;
|
|
@@ -15,7 +18,7 @@ $colors: ();
|
|
|
15
18
|
@each $shade, $value in $map {
|
|
16
19
|
// Set the custom prop name and fallback value.
|
|
17
20
|
$color-property: var(
|
|
18
|
-
--#{root-defaults.$prefix}
|
|
21
|
+
--#{root-defaults.$prefix}#{$color}--#{$shade},
|
|
19
22
|
$value
|
|
20
23
|
);
|
|
21
24
|
|
|
@@ -37,85 +40,90 @@ $colors: ();
|
|
|
37
40
|
);
|
|
38
41
|
}
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
$theme-active: ();
|
|
43
|
+
$themes: (
|
|
44
|
+
active: (),
|
|
45
|
+
);
|
|
44
46
|
|
|
45
|
-
//
|
|
46
|
-
@each $
|
|
47
|
-
|
|
48
|
-
$light-map: ();
|
|
49
|
-
$dark-map: ();
|
|
50
|
-
$active-map: ();
|
|
47
|
+
// Generate all of the theme properties.
|
|
48
|
+
@each $theme-name, $theme-map in defaults.$theme-map {
|
|
49
|
+
$theme: ();
|
|
51
50
|
|
|
52
|
-
@each $
|
|
53
|
-
|
|
54
|
-
$dark-shade: map.get(defaults.$dark-map, $shade);
|
|
55
|
-
$dark-value: map.get($map, $dark-shade);
|
|
51
|
+
@each $color-name, $map in $theme-map {
|
|
52
|
+
$color-map: ();
|
|
56
53
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
);
|
|
54
|
+
@each $shade, $value in $map {
|
|
55
|
+
$color-property: var(
|
|
56
|
+
--#{root-defaults.$prefix}theme-#{$theme-name}--#{$color-name}--#{$shade},
|
|
57
|
+
#{map.get($colors, map.get($value, color), map.get($value, shade))}
|
|
58
|
+
);
|
|
59
|
+
$color-map: map.merge(
|
|
60
|
+
$color-map,
|
|
61
|
+
(
|
|
62
|
+
$shade: $color-property,
|
|
63
|
+
)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
70
66
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
$light-map,
|
|
67
|
+
$theme: map.merge(
|
|
68
|
+
$theme,
|
|
74
69
|
(
|
|
75
|
-
$
|
|
70
|
+
$color-name: $color-map,
|
|
76
71
|
)
|
|
77
72
|
);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
$themes: map.merge(
|
|
76
|
+
$themes,
|
|
77
|
+
(
|
|
78
|
+
$theme-name: $theme,
|
|
79
|
+
)
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Generate the active theme properties.
|
|
84
|
+
@each $color-name, $map in map.get($themes, defaults.$default-theme) {
|
|
85
|
+
$color-map: ();
|
|
86
|
+
|
|
87
|
+
@each $shade, $value in $map {
|
|
88
|
+
$color-property: var(
|
|
89
|
+
--#{root-defaults.$prefix}theme-active--#{$color-name}--#{$shade},
|
|
90
|
+
#{$value}
|
|
83
91
|
);
|
|
84
|
-
$
|
|
85
|
-
$
|
|
92
|
+
$color-map: map.merge(
|
|
93
|
+
$color-map,
|
|
86
94
|
(
|
|
87
|
-
$shade: $
|
|
95
|
+
$shade: $color-property,
|
|
88
96
|
)
|
|
89
97
|
);
|
|
90
98
|
}
|
|
91
99
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
$theme-light,
|
|
95
|
-
(
|
|
96
|
-
$color: $light-map,
|
|
97
|
-
)
|
|
98
|
-
);
|
|
99
|
-
$theme-dark: map.merge(
|
|
100
|
-
$theme-dark,
|
|
101
|
-
(
|
|
102
|
-
$color: $dark-map,
|
|
103
|
-
)
|
|
104
|
-
);
|
|
105
|
-
$theme-active: map.merge(
|
|
106
|
-
$theme-active,
|
|
100
|
+
$themes: map.merge(
|
|
101
|
+
$themes,
|
|
107
102
|
(
|
|
108
|
-
|
|
103
|
+
active: map.merge(
|
|
104
|
+
map.get($themes, active),
|
|
105
|
+
(
|
|
106
|
+
$color-name: $color-map,
|
|
107
|
+
)
|
|
108
|
+
),
|
|
109
109
|
)
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
// Colour properties.
|
|
114
|
-
$root-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
)
|
|
118
|
-
$root-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
);
|
|
114
|
+
$root-color: var(--#{root-defaults.$prefix}root-color);
|
|
115
|
+
$root-background: var(--#{root-defaults.$prefix}root-background);
|
|
116
|
+
|
|
117
|
+
@if map.has-key($themes, active, primary, 900) {
|
|
118
|
+
$root-color: var(
|
|
119
|
+
--#{root-defaults.$prefix}root-color,
|
|
120
|
+
#{map.get(map.get(map.get($themes, active), primary), 900)}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@if map.has-key($themes, active, primary, 100) {
|
|
125
|
+
$root-background: var(
|
|
126
|
+
--#{root-defaults.$prefix}root-background,
|
|
127
|
+
#{map.get(map.get(map.get($themes, active), primary), 100)}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl typography theme default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling components.
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|
|
9
11
|
// font properties.
|
|
10
|
-
$font-size: 1rem !default;
|
|
12
|
+
$font-size-base: 1rem !default;
|
|
11
13
|
$root-font-size: clamp(0.85rem, calc(0.8rem + 0.5vw), 1.25rem) !default;
|
|
12
14
|
$line-height: 1.2em !default;
|
|
13
15
|
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl typography theme variables.
|
|
2
|
+
//
|
|
3
|
+
// These values are to be used to directly style components and provide a
|
|
4
|
+
// cleaner way to reference custom properties.
|
|
2
5
|
|
|
3
6
|
@use "defaults";
|
|
4
7
|
@use "../../defaults" as root-defaults;
|
|
@@ -6,9 +9,12 @@
|
|
|
6
9
|
@use "sass:map";
|
|
7
10
|
|
|
8
11
|
// Font properties.
|
|
9
|
-
$font-size: var(
|
|
12
|
+
$font-size-base: var(
|
|
13
|
+
--#{root-defaults.$prefix}font-size-base,
|
|
14
|
+
#{defaults.$font-size-base}
|
|
15
|
+
);
|
|
10
16
|
$line-height: var(
|
|
11
|
-
--#{root-defaults.$prefix}
|
|
17
|
+
--#{root-defaults.$prefix}line-height,
|
|
12
18
|
#{defaults.$line-height}
|
|
13
19
|
);
|
|
14
20
|
|
|
@@ -17,8 +23,8 @@ $font-sizes: ();
|
|
|
17
23
|
|
|
18
24
|
@each $key, $value in defaults.$font-size-multipliers {
|
|
19
25
|
$size: var(
|
|
20
|
-
--#{root-defaults.$prefix}
|
|
21
|
-
calc(#{$value} * #{$font-size})
|
|
26
|
+
--#{root-defaults.$prefix}font-#{$key},
|
|
27
|
+
calc(#{$value} * #{$font-size-base})
|
|
22
28
|
);
|
|
23
29
|
$font-sizes: map.set($font-sizes, $key, $size);
|
|
24
30
|
}
|
|
@@ -26,202 +32,200 @@ $font-sizes: ();
|
|
|
26
32
|
$font-weights: ();
|
|
27
33
|
|
|
28
34
|
@each $key, $value in defaults.$font-weights {
|
|
29
|
-
$weight: var(--#{root-defaults.$prefix}
|
|
35
|
+
$weight: var(--#{root-defaults.$prefix}font-weight-#{$key}, $value);
|
|
30
36
|
$font-weights: map.set($font-weights, $key, $weight);
|
|
31
37
|
}
|
|
32
38
|
|
|
33
39
|
$font-weight-bold: var(
|
|
34
|
-
--#{root-defaults.$prefix}
|
|
40
|
+
--#{root-defaults.$prefix}font-weight-bold,
|
|
35
41
|
#{map.get($font-weights, bold)}
|
|
36
42
|
);
|
|
37
43
|
|
|
38
44
|
// Root properties.
|
|
39
45
|
$root-font-family: var(
|
|
40
|
-
--#{root-defaults.$prefix}
|
|
46
|
+
--#{root-defaults.$prefix}root-font-family,
|
|
41
47
|
#{defaults.$root-font-family}
|
|
42
48
|
);
|
|
43
49
|
$root-font-size: var(
|
|
44
|
-
--#{root-defaults.$prefix}
|
|
50
|
+
--#{root-defaults.$prefix}root-font-size,
|
|
45
51
|
#{defaults.$root-font-size}
|
|
46
52
|
);
|
|
47
53
|
|
|
48
54
|
// Typography properties.
|
|
49
55
|
$body-font-size: var(
|
|
50
|
-
--#{root-defaults.$prefix}
|
|
56
|
+
--#{root-defaults.$prefix}body-font-size,
|
|
51
57
|
#{map.get($font-sizes, base)}
|
|
52
58
|
);
|
|
53
59
|
$body-line-height: var(
|
|
54
|
-
--#{root-defaults.$prefix}
|
|
60
|
+
--#{root-defaults.$prefix}body-line-height,
|
|
55
61
|
#{$line-height}
|
|
56
62
|
);
|
|
57
63
|
$body-font-weight: var(
|
|
58
|
-
--#{root-defaults.$prefix}
|
|
64
|
+
--#{root-defaults.$prefix}body-font-weight,
|
|
59
65
|
#{map.get($font-weights, normal)}
|
|
60
66
|
);
|
|
61
67
|
$paragraph-font-size: var(
|
|
62
|
-
--#{root-defaults.$prefix}
|
|
68
|
+
--#{root-defaults.$prefix}paragraph-font-size,
|
|
63
69
|
#{$body-font-size}
|
|
64
70
|
);
|
|
65
71
|
$paragraph-line-height: var(
|
|
66
|
-
--#{root-defaults.$prefix}
|
|
72
|
+
--#{root-defaults.$prefix}paragraph-line-height,
|
|
67
73
|
#{$body-line-height}
|
|
68
74
|
);
|
|
69
75
|
$paragraph-margin: var(
|
|
70
|
-
--#{root-defaults.$prefix}
|
|
76
|
+
--#{root-defaults.$prefix}paragraph-margin,
|
|
71
77
|
0 0 #{map.get(root-variables.$spacers, 2)} 0
|
|
72
78
|
);
|
|
73
79
|
$paragraph-font-weight: var(
|
|
74
|
-
--#{root-defaults.$prefix}
|
|
80
|
+
--#{root-defaults.$prefix}paragraph-font-weight,
|
|
75
81
|
#{$body-font-weight}
|
|
76
82
|
);
|
|
77
83
|
$small-font-size: var(
|
|
78
|
-
--#{root-defaults.$prefix}
|
|
84
|
+
--#{root-defaults.$prefix}small-font-size,
|
|
79
85
|
#{map.get($font-sizes, sm)}
|
|
80
86
|
);
|
|
81
87
|
$small-line-height: var(
|
|
82
|
-
--#{root-defaults.$prefix}
|
|
88
|
+
--#{root-defaults.$prefix}small-line-height,
|
|
83
89
|
#{$line-height}
|
|
84
90
|
);
|
|
85
91
|
$small-margin: var(
|
|
86
|
-
--#{root-defaults.$prefix}
|
|
92
|
+
--#{root-defaults.$prefix}small-margin,
|
|
87
93
|
0 0 #{map.get(root-variables.$spacers, 2)} 0
|
|
88
94
|
);
|
|
89
95
|
$small-font-weight: var(
|
|
90
|
-
--#{root-defaults.$prefix}
|
|
96
|
+
--#{root-defaults.$prefix}small-font-weight,
|
|
91
97
|
#{$body-font-weight}
|
|
92
98
|
);
|
|
93
99
|
|
|
94
100
|
// Headings properties.
|
|
95
101
|
$heading-font-family: var(
|
|
96
|
-
--#{root-defaults.$prefix}
|
|
102
|
+
--#{root-defaults.$prefix}heading-font-family,
|
|
97
103
|
$root-font-family
|
|
98
104
|
);
|
|
99
105
|
$heading-line-height: var(
|
|
100
|
-
--#{root-defaults.$prefix}
|
|
106
|
+
--#{root-defaults.$prefix}heading-line-height,
|
|
101
107
|
#{$line-height}
|
|
102
108
|
);
|
|
103
109
|
$heading-margin: var(
|
|
104
|
-
--#{root-defaults.$prefix}
|
|
105
|
-
#{map.get(root-variables.$spacers, 5)} 0
|
|
106
|
-
|
|
107
|
-
2
|
|
108
|
-
)} 0
|
|
110
|
+
--#{root-defaults.$prefix}heading-margin,
|
|
111
|
+
#{map.get(root-variables.$spacers, 5)} 0
|
|
112
|
+
#{map.get(root-variables.$spacers, 2)} 0
|
|
109
113
|
);
|
|
110
114
|
$heading-font-weight: var(
|
|
111
|
-
--#{root-defaults.$prefix}
|
|
115
|
+
--#{root-defaults.$prefix}heading-font-weight,
|
|
112
116
|
#{$font-weight-bold}
|
|
113
117
|
);
|
|
114
118
|
|
|
115
119
|
// H1 properties.
|
|
116
120
|
$h1-font-size: var(
|
|
117
|
-
--#{root-defaults.$prefix}
|
|
121
|
+
--#{root-defaults.$prefix}h1-font-size,
|
|
118
122
|
#{map.get($font-sizes, 5xl)}
|
|
119
123
|
);
|
|
120
124
|
$h1-line-height: var(
|
|
121
|
-
--#{root-defaults.$prefix}
|
|
125
|
+
--#{root-defaults.$prefix}h1-line-height,
|
|
122
126
|
#{$heading-line-height}
|
|
123
127
|
);
|
|
124
|
-
$h1-margin: var(--#{root-defaults.$prefix}
|
|
128
|
+
$h1-margin: var(--#{root-defaults.$prefix}h1-margin, #{$heading-margin});
|
|
125
129
|
$h1-font-family: var(
|
|
126
|
-
--#{root-defaults.$prefix}
|
|
130
|
+
--#{root-defaults.$prefix}h1-font-family,
|
|
127
131
|
$heading-font-family
|
|
128
132
|
);
|
|
129
133
|
$h1-font-weight: var(
|
|
130
|
-
--#{root-defaults.$prefix}
|
|
134
|
+
--#{root-defaults.$prefix}h1-font-weight,
|
|
131
135
|
$heading-font-weight
|
|
132
136
|
);
|
|
133
137
|
|
|
134
138
|
// H2 properties.
|
|
135
139
|
$h2-font-size: var(
|
|
136
|
-
--#{root-defaults.$prefix}
|
|
140
|
+
--#{root-defaults.$prefix}h2-font-size,
|
|
137
141
|
#{map.get($font-sizes, 4xl)}
|
|
138
142
|
);
|
|
139
143
|
$h2-line-height: var(
|
|
140
|
-
--#{root-defaults.$prefix}
|
|
144
|
+
--#{root-defaults.$prefix}h2-line-height,
|
|
141
145
|
#{$heading-line-height}
|
|
142
146
|
);
|
|
143
|
-
$h2-margin: var(--#{root-defaults.$prefix}
|
|
147
|
+
$h2-margin: var(--#{root-defaults.$prefix}h2-margin, #{$heading-margin});
|
|
144
148
|
$h2-font-family: var(
|
|
145
|
-
--#{root-defaults.$prefix}
|
|
149
|
+
--#{root-defaults.$prefix}h2-font-family,
|
|
146
150
|
$heading-font-family
|
|
147
151
|
);
|
|
148
152
|
$h2-font-weight: var(
|
|
149
|
-
--#{root-defaults.$prefix}
|
|
153
|
+
--#{root-defaults.$prefix}h2-font-weight,
|
|
150
154
|
$heading-font-weight
|
|
151
155
|
);
|
|
152
156
|
|
|
153
157
|
// H3 properties.
|
|
154
158
|
$h3-font-size: var(
|
|
155
|
-
--#{root-defaults.$prefix}
|
|
159
|
+
--#{root-defaults.$prefix}h3-font-size,
|
|
156
160
|
#{map.get($font-sizes, 3xl)}
|
|
157
161
|
);
|
|
158
162
|
$h3-line-height: var(
|
|
159
|
-
--#{root-defaults.$prefix}
|
|
163
|
+
--#{root-defaults.$prefix}h3-line-height,
|
|
160
164
|
#{$heading-line-height}
|
|
161
165
|
);
|
|
162
|
-
$h3-margin: var(--#{root-defaults.$prefix}
|
|
166
|
+
$h3-margin: var(--#{root-defaults.$prefix}h3-margin, #{$heading-margin});
|
|
163
167
|
$h3-font-family: var(
|
|
164
|
-
--#{root-defaults.$prefix}
|
|
168
|
+
--#{root-defaults.$prefix}h3-font-family,
|
|
165
169
|
$heading-font-family
|
|
166
170
|
);
|
|
167
171
|
$h3-font-weight: var(
|
|
168
|
-
--#{root-defaults.$prefix}
|
|
172
|
+
--#{root-defaults.$prefix}h3-font-weight,
|
|
169
173
|
$heading-font-weight
|
|
170
174
|
);
|
|
171
175
|
|
|
172
176
|
// H4 properties.
|
|
173
177
|
$h4-font-size: var(
|
|
174
|
-
--#{root-defaults.$prefix}
|
|
178
|
+
--#{root-defaults.$prefix}h4-font-size,
|
|
175
179
|
#{map.get($font-sizes, 2xl)}
|
|
176
180
|
);
|
|
177
181
|
$h4-line-height: var(
|
|
178
|
-
--#{root-defaults.$prefix}
|
|
182
|
+
--#{root-defaults.$prefix}h4-line-height,
|
|
179
183
|
#{$heading-line-height}
|
|
180
184
|
);
|
|
181
|
-
$h4-margin: var(--#{root-defaults.$prefix}
|
|
185
|
+
$h4-margin: var(--#{root-defaults.$prefix}h4-margin, #{$heading-margin});
|
|
182
186
|
$h4-font-family: var(
|
|
183
|
-
--#{root-defaults.$prefix}
|
|
187
|
+
--#{root-defaults.$prefix}h4-font-family,
|
|
184
188
|
$heading-font-family
|
|
185
189
|
);
|
|
186
190
|
$h4-font-weight: var(
|
|
187
|
-
--#{root-defaults.$prefix}
|
|
191
|
+
--#{root-defaults.$prefix}h4-font-weight,
|
|
188
192
|
$heading-font-weight
|
|
189
193
|
);
|
|
190
194
|
|
|
191
195
|
// H5 properties.
|
|
192
196
|
$h5-font-size: var(
|
|
193
|
-
--#{root-defaults.$prefix}
|
|
197
|
+
--#{root-defaults.$prefix}h5-font-size,
|
|
194
198
|
#{map.get($font-sizes, xl)}
|
|
195
199
|
);
|
|
196
200
|
$h5-line-height: var(
|
|
197
|
-
--#{root-defaults.$prefix}
|
|
201
|
+
--#{root-defaults.$prefix}h5-line-height,
|
|
198
202
|
#{$heading-line-height}
|
|
199
203
|
);
|
|
200
|
-
$h5-margin: var(--#{root-defaults.$prefix}
|
|
204
|
+
$h5-margin: var(--#{root-defaults.$prefix}h5-margin, #{$heading-margin});
|
|
201
205
|
$h5-font-family: var(
|
|
202
|
-
--#{root-defaults.$prefix}
|
|
206
|
+
--#{root-defaults.$prefix}h5-font-family,
|
|
203
207
|
$heading-font-family
|
|
204
208
|
);
|
|
205
209
|
$h5-font-weight: var(
|
|
206
|
-
--#{root-defaults.$prefix}
|
|
210
|
+
--#{root-defaults.$prefix}h5-font-weight,
|
|
207
211
|
$heading-font-weight
|
|
208
212
|
);
|
|
209
213
|
|
|
210
214
|
// H6 properties.
|
|
211
215
|
$h6-font-size: var(
|
|
212
|
-
--#{root-defaults.$prefix}
|
|
216
|
+
--#{root-defaults.$prefix}h6-font-size,
|
|
213
217
|
#{map.get($font-sizes, lg)}
|
|
214
218
|
);
|
|
215
219
|
$h6-line-height: var(
|
|
216
|
-
--#{root-defaults.$prefix}
|
|
220
|
+
--#{root-defaults.$prefix}h6-line-height,
|
|
217
221
|
#{$heading-line-height}
|
|
218
222
|
);
|
|
219
|
-
$h6-margin: var(--#{root-defaults.$prefix}
|
|
223
|
+
$h6-margin: var(--#{root-defaults.$prefix}h6-margin, #{$heading-margin});
|
|
220
224
|
$h6-font-family: var(
|
|
221
|
-
--#{root-defaults.$prefix}
|
|
225
|
+
--#{root-defaults.$prefix}h6-font-family,
|
|
222
226
|
$heading-font-family
|
|
223
227
|
);
|
|
224
228
|
$h6-font-weight: var(
|
|
225
|
-
--#{root-defaults.$prefix}
|
|
229
|
+
--#{root-defaults.$prefix}h6-font-weight,
|
|
226
230
|
$heading-font-weight
|
|
227
231
|
);
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl utilities styles.
|
|
2
2
|
|
|
3
|
-
@forward "
|
|
3
|
+
@forward "alignment";
|
|
4
|
+
@forward "color";
|
|
5
|
+
@forward "display";
|
|
6
|
+
@forward "flex";
|
|
7
|
+
@forward "height";
|
|
8
|
+
@forward "inset";
|
|
9
|
+
@forward "justification";
|
|
10
|
+
@forward "list";
|
|
11
|
+
@forward "order";
|
|
12
|
+
@forward "position";
|
|
13
|
+
@forward "ratio";
|
|
4
14
|
@forward "spacing";
|
|
5
15
|
@forward "typography";
|
|
16
|
+
@forward "visibility";
|
|
17
|
+
@forward "width";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// @graupl/graupl alignment utilities default values.
|
|
2
|
+
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
8
|
+
|
|
9
|
+
@use "sass:map";
|
|
10
|
+
|
|
11
|
+
// Align content properties.
|
|
12
|
+
$align-content-class-prefix: "align-content-" !default;
|
|
13
|
+
$base-align-content-properties: (
|
|
14
|
+
normal: normal,
|
|
15
|
+
start: flex-start,
|
|
16
|
+
end: flex-end,
|
|
17
|
+
center: center,
|
|
18
|
+
between: space-between,
|
|
19
|
+
around: space-around,
|
|
20
|
+
evenly: space-evenly,
|
|
21
|
+
baseline: baseline,
|
|
22
|
+
stretch: stretch,
|
|
23
|
+
);
|
|
24
|
+
$custom-align-content-properties: () !default;
|
|
25
|
+
$align-content-properties: map.merge(
|
|
26
|
+
$base-align-content-properties,
|
|
27
|
+
$custom-align-content-properties
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
// Align items properties.
|
|
31
|
+
$align-items-class-prefix: "align-items-" !default;
|
|
32
|
+
$base-align-items-properties: (
|
|
33
|
+
start: start,
|
|
34
|
+
end: end,
|
|
35
|
+
center: center,
|
|
36
|
+
baseline: baseline,
|
|
37
|
+
stretch: stretch,
|
|
38
|
+
);
|
|
39
|
+
$custom-align-items-properties: () !default;
|
|
40
|
+
$align-items-properties: map.merge(
|
|
41
|
+
$base-align-items-properties,
|
|
42
|
+
$custom-align-items-properties
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// Align self properties.
|
|
46
|
+
$align-self-class-prefix: "align-self-" !default;
|
|
47
|
+
$base-align-self-properties: (
|
|
48
|
+
auto: auto,
|
|
49
|
+
start: start,
|
|
50
|
+
end: end,
|
|
51
|
+
center: center,
|
|
52
|
+
baseline: baseline,
|
|
53
|
+
stretch: stretch,
|
|
54
|
+
);
|
|
55
|
+
$custom-align-self-properties: () !default;
|
|
56
|
+
$align-self-properties: map.merge(
|
|
57
|
+
$base-align-self-properties,
|
|
58
|
+
$custom-align-self-properties
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
// Responsive utility flag.
|
|
62
|
+
$responsive: false !default;
|