@graupl/core 1.0.0-beta.22 → 1.0.0-beta.24
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/dist/css/base/button.css +2 -2
- package/dist/css/base/button.css.map +1 -1
- package/dist/css/base/form.css +2 -2
- package/dist/css/base/form.css.map +1 -1
- package/dist/css/base/link.css +2 -2
- package/dist/css/base/link.css.map +1 -1
- package/dist/css/base/table.css +2 -2
- package/dist/css/base/table.css.map +1 -1
- package/dist/css/base.css +2 -2
- package/dist/css/base.css.map +1 -1
- package/dist/css/component/accordion.css +2 -5
- package/dist/css/component/accordion.css.map +1 -1
- package/dist/css/component/alert.css +2 -2
- package/dist/css/component/alert.css.map +1 -1
- package/dist/css/component/badge.css +2 -2
- package/dist/css/component/badge.css.map +1 -1
- package/dist/css/component/card.css +2 -2
- package/dist/css/component/card.css.map +1 -1
- package/dist/css/component/carousel.css +2 -2
- package/dist/css/component/carousel.css.map +1 -1
- package/dist/css/component/disclosure.css +2 -2
- package/dist/css/component/disclosure.css.map +1 -1
- package/dist/css/component/input-group.css +2 -2
- package/dist/css/component/input-group.css.map +1 -1
- package/dist/css/component/list.css +2 -2
- package/dist/css/component/list.css.map +1 -1
- package/dist/css/component/menu.css +2 -2
- package/dist/css/component/menu.css.map +1 -1
- package/dist/css/component/navigation.css +2 -2
- package/dist/css/component/navigation.css.map +1 -1
- package/dist/css/component.css +2 -5
- package/dist/css/component.css.map +1 -1
- package/dist/css/graupl.css +2 -5
- package/dist/css/graupl.css.map +1 -1
- package/dist/css/init.css +2 -2
- package/dist/css/init.css.map +1 -1
- package/dist/css/layout/columns.css +2 -2
- package/dist/css/layout/columns.css.map +1 -1
- package/dist/css/layout/container.css +2 -2
- package/dist/css/layout/container.css.map +1 -1
- package/dist/css/layout/flex-columns.css +2 -2
- package/dist/css/layout/flex-columns.css.map +1 -1
- package/dist/css/layout.css +2 -5
- package/dist/css/layout.css.map +1 -1
- package/dist/css/normalize.css +2 -2
- package/dist/css/normalize.css.map +1 -1
- package/dist/css/state/focus.css +2 -2
- package/dist/css/state/focus.css.map +1 -1
- package/dist/css/state.css +2 -2
- package/dist/css/state.css.map +1 -1
- package/dist/css/theme/color.css +2 -2
- package/dist/css/theme/color.css.map +1 -1
- package/dist/css/theme/typography.css +2 -2
- package/dist/css/theme/typography.css.map +1 -1
- package/dist/css/theme.css +2 -2
- package/dist/css/theme.css.map +1 -1
- package/dist/css/utilities/alignment.css +1 -1
- package/dist/css/utilities/alignment.css.map +1 -1
- package/dist/css/utilities/background.css +2 -2
- package/dist/css/utilities/background.css.map +1 -1
- package/dist/css/utilities/border.css +2 -2
- package/dist/css/utilities/border.css.map +1 -1
- package/dist/css/utilities/color.css +2 -2
- package/dist/css/utilities/color.css.map +1 -1
- package/dist/css/utilities/container.css +1 -1
- package/dist/css/utilities/container.css.map +1 -1
- package/dist/css/utilities/display.css +2 -2
- package/dist/css/utilities/display.css.map +1 -1
- package/dist/css/utilities/flex.css +2 -2
- package/dist/css/utilities/flex.css.map +1 -1
- package/dist/css/utilities/gradient.css +2 -2
- package/dist/css/utilities/gradient.css.map +1 -1
- package/dist/css/utilities/height.css +2 -2
- package/dist/css/utilities/height.css.map +1 -1
- package/dist/css/utilities/inset.css +2 -2
- package/dist/css/utilities/inset.css.map +1 -1
- package/dist/css/utilities/justification.css +1 -1
- package/dist/css/utilities/justification.css.map +1 -1
- package/dist/css/utilities/list.css +1 -1
- package/dist/css/utilities/list.css.map +1 -1
- package/dist/css/utilities/order.css +2 -2
- package/dist/css/utilities/order.css.map +1 -1
- package/dist/css/utilities/position.css +2 -2
- package/dist/css/utilities/position.css.map +1 -1
- package/dist/css/utilities/ratio.css +2 -2
- package/dist/css/utilities/ratio.css.map +1 -1
- package/dist/css/utilities/spacing.css +2 -2
- package/dist/css/utilities/spacing.css.map +1 -1
- package/dist/css/utilities/typography.css +2 -2
- package/dist/css/utilities/typography.css.map +1 -1
- package/dist/css/utilities/visibility.css +2 -2
- package/dist/css/utilities/visibility.css.map +1 -1
- package/dist/css/utilities/visually-hidden.css +2 -2
- package/dist/css/utilities/visually-hidden.css.map +1 -1
- package/dist/css/utilities/width.css +2 -2
- package/dist/css/utilities/width.css.map +1 -1
- package/dist/css/utilities/z-index.css +1 -1
- package/dist/css/utilities/z-index.css.map +1 -1
- package/dist/css/utilities.css +2 -2
- package/dist/css/utilities.css.map +1 -1
- package/dist/js/accordion.js.map +1 -1
- package/dist/js/alert.js.map +1 -1
- package/dist/js/carousel.js.map +1 -1
- package/dist/js/component/accordion.cjs.js.map +1 -1
- package/dist/js/component/accordion.es.js.map +1 -1
- package/dist/js/component/accordion.iife.js.map +1 -1
- package/dist/js/component/alert.cjs.js.map +1 -1
- package/dist/js/component/alert.es.js.map +1 -1
- package/dist/js/component/alert.iife.js.map +1 -1
- package/dist/js/component/carousel.cjs.js.map +1 -1
- package/dist/js/component/carousel.es.js.map +1 -1
- package/dist/js/component/carousel.iife.js.map +1 -1
- package/dist/js/component/disclosure.cjs.js +2 -2
- package/dist/js/component/disclosure.cjs.js.map +1 -1
- package/dist/js/component/disclosure.es.js +2 -2
- package/dist/js/component/disclosure.es.js.map +1 -1
- package/dist/js/component/disclosure.iife.js +2 -2
- package/dist/js/component/disclosure.iife.js.map +1 -1
- package/dist/js/component/tabs.cjs.js +5 -0
- package/dist/js/component/tabs.cjs.js.map +1 -0
- package/dist/js/component/tabs.es.js +5 -0
- package/dist/js/component/tabs.es.js.map +1 -0
- package/dist/js/component/tabs.iife.js +5 -0
- package/dist/js/component/tabs.iife.js.map +1 -0
- package/dist/js/disclosure.js +2 -2
- package/dist/js/disclosure.js.map +1 -1
- package/dist/js/generator/accordion.cjs.js.map +1 -1
- package/dist/js/generator/accordion.es.js.map +1 -1
- package/dist/js/generator/accordion.iife.js.map +1 -1
- package/dist/js/generator/alert.cjs.js.map +1 -1
- package/dist/js/generator/alert.es.js.map +1 -1
- package/dist/js/generator/alert.iife.js.map +1 -1
- package/dist/js/generator/carousel.cjs.js.map +1 -1
- package/dist/js/generator/carousel.es.js.map +1 -1
- package/dist/js/generator/carousel.iife.js.map +1 -1
- package/dist/js/generator/disclosure.cjs.js +2 -2
- package/dist/js/generator/disclosure.cjs.js.map +1 -1
- package/dist/js/generator/disclosure.es.js +2 -2
- package/dist/js/generator/disclosure.es.js.map +1 -1
- package/dist/js/generator/disclosure.iife.js +2 -2
- package/dist/js/generator/disclosure.iife.js.map +1 -1
- package/dist/js/generator/navigation.cjs.js.map +1 -1
- package/dist/js/generator/navigation.es.js.map +1 -1
- package/dist/js/generator/navigation.iife.js.map +1 -1
- package/dist/js/generator/tabs.cjs.js +5 -0
- package/dist/js/generator/tabs.cjs.js.map +1 -0
- package/dist/js/generator/tabs.es.js +5 -0
- package/dist/js/generator/tabs.es.js.map +1 -0
- package/dist/js/generator/tabs.iife.js +5 -0
- package/dist/js/generator/tabs.iife.js.map +1 -0
- package/dist/js/graupl.js +5 -5
- package/dist/js/graupl.js.map +1 -1
- package/dist/js/navigation.js.map +1 -1
- package/dist/js/tabs.js +5 -0
- package/dist/js/tabs.js.map +1 -0
- package/package.json +4 -3
- package/src/js/disclosure/Disclosure.js +25 -45
- package/src/js/domHelpers.js +39 -22
- package/src/js/tabs/TabToggle.js +378 -0
- package/src/js/tabs/Tabs.js +1091 -0
- package/src/js/tabs/generator.js +32 -0
- package/src/js/tabs/index.js +5 -0
- package/src/scss/_defaults.scss +21 -88
- package/src/scss/_variables.scss +70 -0
- package/src/scss/base/button/_defaults.scss +2 -24
- package/src/scss/base/button/_index.scss +53 -52
- package/src/scss/base/button/_mixins.scss +24 -58
- package/src/scss/base/button/_variables.scss +139 -0
- package/src/scss/base/form/_defaults.scss +72 -2
- package/src/scss/base/form/_index.scss +196 -70
- package/src/scss/base/form/_variables.scss +166 -0
- package/src/scss/base/link/_defaults.scss +31 -0
- package/src/scss/base/link/_index.scss +177 -172
- package/src/scss/base/link/_variables.scss +215 -0
- package/src/scss/base/table/_defaults.scss +1 -11
- package/src/scss/base/table/_index.scss +126 -117
- package/src/scss/base/table/_variables.scss +214 -3
- package/src/scss/component/_index.scss +1 -0
- package/src/scss/component/accordion/_defaults.scss +73 -22
- package/src/scss/component/accordion/_index.scss +437 -62
- package/src/scss/component/accordion/_variables.scss +527 -101
- package/src/scss/component/alert/_defaults.scss +23 -32
- package/src/scss/component/alert/_index.scss +236 -30
- package/src/scss/component/alert/_variables.scss +155 -6
- package/src/scss/component/badge/_defaults.scss +1 -0
- package/src/scss/component/badge/_index.scss +25 -28
- package/src/scss/component/badge/_variables.scss +66 -2
- package/src/scss/component/card/_defaults.scss +64 -13
- package/src/scss/component/card/_index.scss +276 -30
- package/src/scss/component/card/_variables.scss +132 -0
- package/src/scss/component/carousel/_defaults.scss +73 -15
- package/src/scss/component/carousel/_index.scss +357 -41
- package/src/scss/component/carousel/_variables.scss +391 -0
- package/src/scss/component/disclosure/_index.scss +4 -4
- package/src/scss/component/disclosure/_variables.scss +127 -2
- package/src/scss/component/input-group/_defaults.scss +10 -3
- package/src/scss/component/input-group/_index.scss +72 -4
- package/src/scss/component/input-group/_variables.scss +37 -0
- package/src/scss/component/list/_defaults.scss +35 -2
- package/src/scss/component/list/_index.scss +159 -5
- package/src/scss/component/list/_variables.scss +152 -0
- package/src/scss/component/menu/_defaults.scss +49 -7
- package/src/scss/component/menu/_index.scss +325 -99
- package/src/scss/component/menu/_variables.scss +484 -1
- package/src/scss/component/navigation/_defaults.scss +45 -3
- package/src/scss/component/navigation/_index.scss +249 -98
- package/src/scss/component/navigation/_variables.scss +334 -5
- package/src/scss/component/tabs/_defaults.scss +82 -0
- package/src/scss/component/tabs/_index.scss +497 -0
- package/src/scss/component/tabs/_variables.scss +974 -0
- package/src/scss/layout/columns/_defaults.scss +5 -3
- package/src/scss/layout/columns/_index.scss +27 -21
- package/src/scss/layout/columns/_variables.scss +13 -0
- package/src/scss/layout/container/_defaults.scss +28 -11
- package/src/scss/layout/container/_index.scss +305 -161
- package/src/scss/layout/container/_variables.scss +148 -15
- package/src/scss/layout/flex-columns/_defaults.scss +5 -3
- package/src/scss/layout/flex-columns/_index.scss +28 -20
- package/src/scss/layout/flex-columns/_variables.scss +9 -0
- package/src/scss/mixins/_state.scss +37 -0
- package/src/scss/mixins/_theme.scss +36 -1
- package/src/scss/state/focus/_index.scss +17 -12
- package/src/scss/state/focus/_variables.scss +30 -4
- package/src/scss/theme/color/_defaults.scss +6 -35
- package/src/scss/theme/color/_index.scss +167 -1
- package/src/scss/theme/color/_variables.scss +155 -0
- package/src/scss/theme/typography/_defaults.scss +26 -19
- package/src/scss/theme/typography/_index.scss +176 -20
- package/src/scss/theme/typography/_variables.scss +186 -0
- package/src/scss/utilities/_template/_index.scss +0 -1
- package/src/scss/utilities/alignment/_defaults.scss +0 -33
- package/src/scss/utilities/alignment/_index.scss +24 -25
- package/src/scss/utilities/background/_defaults.scss +0 -77
- package/src/scss/utilities/background/_index.scss +32 -37
- package/src/scss/utilities/border/_defaults.scss +0 -33
- package/src/scss/utilities/border/_index.scss +25 -26
- package/src/scss/utilities/color/_defaults.scss +0 -19
- package/src/scss/utilities/color/_index.scss +22 -22
- package/src/scss/utilities/container/_defaults.scss +0 -11
- package/src/scss/utilities/container/_index.scss +20 -19
- package/src/scss/utilities/display/_defaults.scss +0 -11
- package/src/scss/utilities/display/_index.scss +20 -19
- package/src/scss/utilities/flex/_defaults.scss +0 -55
- package/src/scss/utilities/flex/_index.scss +28 -31
- package/src/scss/utilities/gradient/_defaults.scss +0 -28
- package/src/scss/utilities/gradient/_index.scss +27 -28
- package/src/scss/utilities/gradient/_variables.scss +15 -0
- package/src/scss/utilities/height/_defaults.scss +0 -8
- package/src/scss/utilities/height/_index.scss +22 -21
- package/src/scss/utilities/inset/_defaults.scss +0 -16
- package/src/scss/utilities/inset/_index.scss +20 -20
- package/src/scss/utilities/justification/_defaults.scss +0 -33
- package/src/scss/utilities/justification/_index.scss +24 -25
- package/src/scss/utilities/list/_defaults.scss +0 -22
- package/src/scss/utilities/list/_index.scss +22 -22
- package/src/scss/utilities/order/_defaults.scss +0 -8
- package/src/scss/utilities/order/_index.scss +20 -19
- package/src/scss/utilities/position/_defaults.scss +0 -11
- package/src/scss/utilities/position/_index.scss +20 -19
- package/src/scss/utilities/ratio/_defaults.scss +0 -8
- package/src/scss/utilities/ratio/_index.scss +22 -21
- package/src/scss/utilities/ratio/_variables.scss +6 -0
- package/src/scss/utilities/spacing/_defaults.scss +0 -11
- package/src/scss/utilities/spacing/_index.scss +18 -17
- package/src/scss/utilities/typography/_defaults.scss +0 -22
- package/src/scss/utilities/typography/_index.scss +27 -26
- package/src/scss/utilities/visibility/_defaults.scss +0 -11
- package/src/scss/utilities/visibility/_index.scss +19 -18
- package/src/scss/utilities/visually-hidden/_index.scss +19 -17
- package/src/scss/utilities/width/_defaults.scss +0 -8
- package/src/scss/utilities/width/_index.scss +21 -20
- package/src/scss/utilities/z-index/_defaults.scss +0 -11
- package/src/scss/utilities/z-index/_index.scss +19 -18
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import Tabs from "./Tabs.js";
|
|
2
|
+
import once from "@drupal/once";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Generates Tabs elements.
|
|
6
|
+
*
|
|
7
|
+
* @param {object} [options = {}] - Options for generating the tabs.
|
|
8
|
+
* @param {object} [options.options = {}] - Options to pass to the Tabs constructor.
|
|
9
|
+
* @param {HTMLElement} [options.context = document] - The element to base the selector off of.
|
|
10
|
+
* @param {string} [options.selector = .tabs] - The query selector for the tabs elements in the DOM.
|
|
11
|
+
*/
|
|
12
|
+
const generate = ({
|
|
13
|
+
options = {},
|
|
14
|
+
context = document,
|
|
15
|
+
selector = ".tabs",
|
|
16
|
+
} = {}) => {
|
|
17
|
+
once("graupl-tabs-generator", selector, context).forEach((tabsElement) => {
|
|
18
|
+
const tabsOptions = tabsElement.dataset.grauplTabsOptions
|
|
19
|
+
? JSON.parse(tabsElement.dataset.grauplTabsOptions.replace(/'/g, '"')) ||
|
|
20
|
+
{}
|
|
21
|
+
: {};
|
|
22
|
+
|
|
23
|
+
new Tabs({
|
|
24
|
+
tabsElement,
|
|
25
|
+
initialize: true,
|
|
26
|
+
...options,
|
|
27
|
+
...tabsOptions,
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default generate;
|
package/src/scss/_defaults.scss
CHANGED
|
@@ -26,7 +26,9 @@ $screen-aware-utilities: true !default;
|
|
|
26
26
|
$theme-aware-utilities: true !default;
|
|
27
27
|
$state-aware-utilities: true !default;
|
|
28
28
|
$container-aware-utilities: false !default;
|
|
29
|
+
$themeable-components: true !default;
|
|
29
30
|
$use-layers: true !default;
|
|
31
|
+
$show-warnings: true !default;
|
|
30
32
|
|
|
31
33
|
// Layout properties.
|
|
32
34
|
$content-max-width: 96ch !default;
|
|
@@ -34,21 +36,15 @@ $content-max-width: 96ch !default;
|
|
|
34
36
|
// Screen sizes.
|
|
35
37
|
$-screen-sizes: (
|
|
36
38
|
xs: 0,
|
|
37
|
-
sm:
|
|
38
|
-
md:
|
|
39
|
-
lg:
|
|
40
|
-
xl:
|
|
39
|
+
sm: 576px,
|
|
40
|
+
md: 768px,
|
|
41
|
+
lg: 1024px,
|
|
42
|
+
xl: 1280px,
|
|
43
|
+
hd: 1500px,
|
|
44
|
+
qhd: 1921px,
|
|
45
|
+
uhd: 2561px,
|
|
41
46
|
);
|
|
42
|
-
$custom-screen-sizes: () !default;
|
|
43
47
|
$screen-sizes: () !default;
|
|
44
|
-
|
|
45
|
-
// @todo remove this once $custom-screen-sizes is removed
|
|
46
|
-
@if $custom-screen-sizes != () {
|
|
47
|
-
@warn "`$custom-screen-sizes` is deprecated and will be removed in a future release of Graupl. Use `$screen-sizes` instead.";
|
|
48
|
-
|
|
49
|
-
$screen-sizes: map.merge($screen-sizes, $custom-screen-sizes);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
48
|
$screen-sizes: map.merge($-screen-sizes, $screen-sizes);
|
|
53
49
|
$-screen-size-triggers: (
|
|
54
50
|
navigation-collapse: (
|
|
@@ -82,48 +78,15 @@ $-screen-size-triggers: (
|
|
|
82
78
|
),
|
|
83
79
|
),
|
|
84
80
|
);
|
|
85
|
-
$custom-screen-size-triggers: () !default;
|
|
86
81
|
$screen-size-triggers: () !default;
|
|
87
|
-
|
|
88
|
-
// @todo remove this once $custom-screen-size-triggers is removed
|
|
89
|
-
@if $custom-screen-size-triggers != () {
|
|
90
|
-
@warn "`$custom-screen-size-triggers` is deprecated and will be removed in a future release of Graupl. Use `$screen-size-triggers` instead.";
|
|
91
|
-
|
|
92
|
-
$screen-size-triggers: map.merge(
|
|
93
|
-
$screen-size-triggers,
|
|
94
|
-
$custom-screen-size-triggers
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
82
|
$screen-size-triggers: map.merge($-screen-size-triggers, $screen-size-triggers);
|
|
99
83
|
|
|
100
84
|
// Container sizes.
|
|
101
85
|
$-container-sizes: $screen-sizes;
|
|
102
|
-
$custom-container-sizes: () !default;
|
|
103
86
|
$container-sizes: () !default;
|
|
104
|
-
|
|
105
|
-
// @todo remove this once $custom-container-sizes is removed
|
|
106
|
-
@if $custom-container-sizes != () {
|
|
107
|
-
@warn "`$custom-container-sizes` is deprecated and will be removed in a future release of Graupl. Use `$container-sizes` instead.";
|
|
108
|
-
|
|
109
|
-
$container-sizes: map.merge($container-sizes, $custom-container-sizes);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
87
|
$container-sizes: map.merge($-container-sizes, $container-sizes);
|
|
113
88
|
$-container-size-triggers: $screen-size-triggers;
|
|
114
|
-
$custom-container-size-triggers: () !default;
|
|
115
89
|
$container-size-triggers: () !default;
|
|
116
|
-
|
|
117
|
-
// @todo remove this once $custom-container-size-triggers is removed
|
|
118
|
-
@if $custom-container-size-triggers != () {
|
|
119
|
-
@warn "`$custom-container-size-triggers` is deprecated and will be removed in a future release of Graupl. Use `$container-size-triggers` instead.";
|
|
120
|
-
|
|
121
|
-
$container-size-triggers: map.merge(
|
|
122
|
-
$container-size-triggers,
|
|
123
|
-
$custom-container-size-triggers
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
90
|
$container-size-triggers: map.merge(
|
|
128
91
|
$-container-size-triggers,
|
|
129
92
|
$container-size-triggers
|
|
@@ -144,19 +107,7 @@ $-spacer-multipliers: (
|
|
|
144
107
|
9: 5,
|
|
145
108
|
10: 10,
|
|
146
109
|
);
|
|
147
|
-
$custom-spacer-multipliers: () !default;
|
|
148
110
|
$spacer-multipliers: () !default;
|
|
149
|
-
|
|
150
|
-
// @todo remove this once $custom-spacer-multipliers is removed
|
|
151
|
-
@if $custom-spacer-multipliers != () {
|
|
152
|
-
@warn "`$custom-spacer-multipliers` is deprecated and will be removed in a future release of Graupl. Use `$spacer-multipliers` instead.";
|
|
153
|
-
|
|
154
|
-
$spacer-multipliers: map.merge(
|
|
155
|
-
$spacer-multipliers,
|
|
156
|
-
$custom-spacer-multipliers
|
|
157
|
-
);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
111
|
$spacer-multipliers: map.merge($-spacer-multipliers, $spacer-multipliers);
|
|
161
112
|
|
|
162
113
|
// Size properties.
|
|
@@ -176,19 +127,7 @@ $-transition-durations: (
|
|
|
176
127
|
default: #{$transition-duration-base * 2.5}ms,
|
|
177
128
|
slow: #{$transition-duration-base * 3}ms,
|
|
178
129
|
);
|
|
179
|
-
$custom-transition-durations: () !default;
|
|
180
130
|
$transition-durations: () !default;
|
|
181
|
-
|
|
182
|
-
// @todo remove this once $custom-transition-durations is removed
|
|
183
|
-
@if $custom-transition-durations != () {
|
|
184
|
-
@warn "`$custom-transition-durations` is deprecated and will be removed in a future release of Graupl. Use `$transition-durations` instead.";
|
|
185
|
-
|
|
186
|
-
$transition-durations: map.merge(
|
|
187
|
-
$transition-durations,
|
|
188
|
-
$custom-transition-durations
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
131
|
$transition-durations: map.merge($-transition-durations, $transition-durations);
|
|
193
132
|
|
|
194
133
|
// Selector properties.
|
|
@@ -226,6 +165,12 @@ $-state-selectors: (
|
|
|
226
165
|
"[disabled]",
|
|
227
166
|
"[aria-disabled=true]",
|
|
228
167
|
),
|
|
168
|
+
selected: (
|
|
169
|
+
"[aria-selected=true]",
|
|
170
|
+
),
|
|
171
|
+
current: (
|
|
172
|
+
"[aria-current=true]",
|
|
173
|
+
),
|
|
229
174
|
);
|
|
230
175
|
$-state-class-selectors: (
|
|
231
176
|
visited: (
|
|
@@ -243,6 +188,12 @@ $-state-class-selectors: (
|
|
|
243
188
|
disabled: (
|
|
244
189
|
"#{$state-selector-base}disabled",
|
|
245
190
|
),
|
|
191
|
+
selected: (
|
|
192
|
+
"#{$state-selector-base}selected",
|
|
193
|
+
),
|
|
194
|
+
current: (
|
|
195
|
+
"#{$state-selector-base}current",
|
|
196
|
+
),
|
|
246
197
|
);
|
|
247
198
|
|
|
248
199
|
// Merge the state class selectors with the state selectors.
|
|
@@ -256,26 +207,8 @@ $-state-class-selectors: (
|
|
|
256
207
|
}
|
|
257
208
|
}
|
|
258
209
|
|
|
259
|
-
$custom-state-selectors: () !default;
|
|
260
210
|
$state-selectors: () !default;
|
|
261
211
|
|
|
262
|
-
// @todo remove this once $custom-state-selectors is removed
|
|
263
|
-
@if $custom-state-selectors != () {
|
|
264
|
-
@warn "`$custom-state-selectors` is deprecated and will be removed in a future release of Graupl. Use `$state-selectors` instead.";
|
|
265
|
-
|
|
266
|
-
@each $state, $selectors in $custom-state-selectors {
|
|
267
|
-
@if map.has-key($state-selectors, $state) {
|
|
268
|
-
$state-selectors: map.set(
|
|
269
|
-
$state-selectors,
|
|
270
|
-
$state,
|
|
271
|
-
list.join(map.get($state-selectors, $state), $selectors)
|
|
272
|
-
);
|
|
273
|
-
} @else {
|
|
274
|
-
$state-selectors: map.set($state-selectors, $state, $selectors);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
212
|
@each $state, $selectors in $-state-selectors {
|
|
280
213
|
@if map.has-key($state-selectors, $state) {
|
|
281
214
|
$state-selectors: map.set(
|
package/src/scss/_variables.scss
CHANGED
|
@@ -2,21 +2,60 @@
|
|
|
2
2
|
//
|
|
3
3
|
// These values are to be used to directly style components and provide a
|
|
4
4
|
// cleaner way to reference custom properties.
|
|
5
|
+
//
|
|
6
|
+
// Custom property defaults:
|
|
7
|
+
// | Custom property | Default |
|
|
8
|
+
// | ------------------------------------ | ---------------------------------- |
|
|
9
|
+
// | --graupl-content-max-width | 96ch |
|
|
10
|
+
// | --graupl-spacer | 1rem |
|
|
11
|
+
// | --graupl-spacer-0 | calc(0 * var(--graupl-spacer)) |
|
|
12
|
+
// | --graupl-spacer-1 | calc(0.125 * var(--graupl-spacer)) |
|
|
13
|
+
// | --graupl-spacer-2 | calc(0.25 * var(--graupl-spacer)) |
|
|
14
|
+
// | --graupl-spacer-3 | calc(0.5 * var(--graupl-spacer)) |
|
|
15
|
+
// | --graupl-spacer-4 | calc(0.75 * var(--graupl-spacer)) |
|
|
16
|
+
// | --graupl-spacer-5 | calc(1 * var(--graupl-spacer)) |
|
|
17
|
+
// | --graupl-spacer-6 | calc(1.5 * var(--graupl-spacer)) |
|
|
18
|
+
// | --graupl-spacer-7 | calc(2 * var(--graupl-spacer)) |
|
|
19
|
+
// | --graupl-spacer-8 | calc(3 * var(--graupl-spacer)) |
|
|
20
|
+
// | --graupl-spacer-9 | calc(5 * var(--graupl-spacer)) |
|
|
21
|
+
// | --graupl-spacer-10 | calc(10 * var(--graupl-spacer)) |
|
|
22
|
+
// | --graupl-border-radius | 0.125rem |
|
|
23
|
+
// | --graupl-border-top-left-radius | var(--graupl-border-radius) |
|
|
24
|
+
// | --graupl-border-top-right-radius | var(--graupl-border-radius) |
|
|
25
|
+
// | --graupl-border-bottom-right-radius | var(--graupl-border-radius) |
|
|
26
|
+
// | --graupl-border-bottom-left-radius | var(--graupl-border-radius) |
|
|
27
|
+
// | --graupl-border-width | 0.125rem |
|
|
28
|
+
// | --graupl-border-top-width | var(--graupl-border-width) |
|
|
29
|
+
// | --graupl-border-right-width | var(--graupl-border-width) |
|
|
30
|
+
// | --graupl-border-bottom-width | var(--graupl-border-width) |
|
|
31
|
+
// | --graupl-border-left-width | var(--graupl-border-width) |
|
|
32
|
+
// | --graupl-border-style | solid |
|
|
33
|
+
// | --graupl-border-top-style | var(--graupl-border-style) |
|
|
34
|
+
// | --graupl-border-right-style | var(--graupl-border-style) |
|
|
35
|
+
// | --graupl-border-bottom-style | var(--graupl-border-style) |
|
|
36
|
+
// | --graupl-border-left-style | var(--graupl-border-style) |
|
|
37
|
+
// | --graupl-transition-duration-fast | 150ms |
|
|
38
|
+
// | --graupl-transition-duration-default | 250ms |
|
|
39
|
+
// | --graupl-transition-duration-slow | 300ms |
|
|
40
|
+
// | --graupl-transition-timing-function | ease |
|
|
5
41
|
|
|
6
42
|
@use "defaults";
|
|
7
43
|
@use "sass:map";
|
|
8
44
|
|
|
9
45
|
// Layout properties.
|
|
46
|
+
// --graupl-content-max-width
|
|
10
47
|
$content-max-width: var(
|
|
11
48
|
--#{defaults.$prefix}content-max-width,
|
|
12
49
|
defaults.$content-max-width
|
|
13
50
|
);
|
|
14
51
|
|
|
15
52
|
// Spacing properties.
|
|
53
|
+
// --graupl-spacer
|
|
16
54
|
$spacer: var(--#{defaults.$prefix}spacer, defaults.$spacer);
|
|
17
55
|
$spacers: ();
|
|
18
56
|
|
|
19
57
|
@each $key, $value in defaults.$spacer-multipliers {
|
|
58
|
+
// --graupl-spacer-0, --graupl-spacer-1, --graupl-spacer-2, --graupl-spacer-3, --graupl-spacer-4, --graupl-spacer-5, --graupl-spacer-6, --graupl-spacer-7, --graupl-spacer-8, --graupl-spacer-9, --graupl-spacer-10
|
|
20
59
|
$space: var(
|
|
21
60
|
--#{defaults.$prefix}spacer-#{$key},
|
|
22
61
|
calc(#{$value} * #{$spacer})
|
|
@@ -25,50 +64,79 @@ $spacers: ();
|
|
|
25
64
|
}
|
|
26
65
|
|
|
27
66
|
// Border properties.
|
|
67
|
+
// --graupl-border-radius
|
|
28
68
|
$border-radius: var(
|
|
29
69
|
--#{defaults.$prefix}border-radius,
|
|
30
70
|
defaults.$border-radius
|
|
31
71
|
);
|
|
72
|
+
|
|
73
|
+
// --graupl-border-top-left-radius
|
|
32
74
|
$border-top-left-radius: var(
|
|
33
75
|
--#{defaults.$prefix}border-top-left-radius,
|
|
34
76
|
#{$border-radius}
|
|
35
77
|
);
|
|
78
|
+
|
|
79
|
+
// --graupl-border-top-right-radius
|
|
36
80
|
$border-top-right-radius: var(
|
|
37
81
|
--#{defaults.$prefix}border-top-right-radius,
|
|
38
82
|
#{$border-radius}
|
|
39
83
|
);
|
|
84
|
+
|
|
85
|
+
// --graupl-border-bottom-right-radius
|
|
40
86
|
$border-bottom-right-radius: var(
|
|
41
87
|
--#{defaults.$prefix}border-bottom-right-radius,
|
|
42
88
|
#{$border-radius}
|
|
43
89
|
);
|
|
90
|
+
|
|
91
|
+
// --graupl-border-bottom-left-radius
|
|
44
92
|
$border-bottom-left-radius: var(
|
|
45
93
|
--#{defaults.$prefix}border-bottom-left-radius,
|
|
46
94
|
#{$border-radius}
|
|
47
95
|
);
|
|
96
|
+
|
|
97
|
+
// --graupl-border-width
|
|
48
98
|
$border-width: var(--#{defaults.$prefix}border-width, defaults.$border-width);
|
|
99
|
+
|
|
100
|
+
// --graupl-border-top-width
|
|
49
101
|
$border-top-width: var(--#{defaults.$prefix}border-top-width, #{$border-width});
|
|
102
|
+
|
|
103
|
+
// --graupl-border-right-width
|
|
50
104
|
$border-right-width: var(
|
|
51
105
|
--#{defaults.$prefix}border-right-width,
|
|
52
106
|
#{$border-width}
|
|
53
107
|
);
|
|
108
|
+
|
|
109
|
+
// --graupl-border-bottom-width
|
|
54
110
|
$border-bottom-width: var(
|
|
55
111
|
--#{defaults.$prefix}border-bottom-width,
|
|
56
112
|
#{$border-width}
|
|
57
113
|
);
|
|
114
|
+
|
|
115
|
+
// --graupl-border-left-width
|
|
58
116
|
$border-left-width: var(
|
|
59
117
|
--#{defaults.$prefix}border-left-width,
|
|
60
118
|
#{$border-width}
|
|
61
119
|
);
|
|
120
|
+
|
|
121
|
+
// --graupl-border-style
|
|
62
122
|
$border-style: var(--#{defaults.$prefix}border-style, defaults.$border-style);
|
|
123
|
+
|
|
124
|
+
// --graupl-border-top-style
|
|
63
125
|
$border-top-style: var(--#{defaults.$prefix}border-top-style, #{$border-style});
|
|
126
|
+
|
|
127
|
+
// --graupl-border-right-style
|
|
64
128
|
$border-right-style: var(
|
|
65
129
|
--#{defaults.$prefix}border-right-style,
|
|
66
130
|
#{$border-style}
|
|
67
131
|
);
|
|
132
|
+
|
|
133
|
+
// --graupl-border-bottom-style
|
|
68
134
|
$border-bottom-style: var(
|
|
69
135
|
--#{defaults.$prefix}border-bottom-style,
|
|
70
136
|
#{$border-style}
|
|
71
137
|
);
|
|
138
|
+
|
|
139
|
+
// --graupl-border-left-style
|
|
72
140
|
$border-left-style: var(
|
|
73
141
|
--#{defaults.$prefix}border-left-style,
|
|
74
142
|
#{$border-style}
|
|
@@ -89,6 +157,8 @@ $transition-durations: (
|
|
|
89
157
|
map.get(defaults.$transition-durations, slow)
|
|
90
158
|
),
|
|
91
159
|
);
|
|
160
|
+
|
|
161
|
+
// --graupl-transition-timing-function
|
|
92
162
|
$transition-timing-function: var(
|
|
93
163
|
--#{defaults.$prefix}transition-timing-function,
|
|
94
164
|
defaults.$transition-timing-function
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
$selector-base: root-defaults.$component-selector-base !default;
|
|
15
15
|
$modifier-selector-base: root-defaults.$modifier-selector-base !default;
|
|
16
16
|
$generate-base-theme-map: root-defaults.$generate-base-theme-maps !default;
|
|
17
|
+
$themeable: true !default;
|
|
17
18
|
$button-selector-base: $selector-base !default;
|
|
18
19
|
$button-selector: "button" !default;
|
|
19
20
|
$button-link-selector-base: $modifier-selector-base !default;
|
|
@@ -31,8 +32,7 @@ $button-disabled-transform: $button-initial-transform !default;
|
|
|
31
32
|
// themed button bases.
|
|
32
33
|
//
|
|
33
34
|
// e.g.
|
|
34
|
-
// Primary buttons will use primary--900 as the text colour
|
|
35
|
-
// and primary--900 as the border colour.
|
|
35
|
+
// Primary buttons will use primary--900 as the text colour and primary--700 as the border colour.
|
|
36
36
|
//
|
|
37
37
|
// Secondary/tertiary buttons will use the same shade for their respective colours.
|
|
38
38
|
$-button-theme-mappings: (
|
|
@@ -44,30 +44,8 @@ $-button-theme-mappings: (
|
|
|
44
44
|
disabled-color: 200,
|
|
45
45
|
disabled-border-color: 200,
|
|
46
46
|
);
|
|
47
|
-
$custom-button-state-theme-map: () !default;
|
|
48
|
-
$button-state-theme-map: () !default;
|
|
49
47
|
$button-theme-mappings: () !default;
|
|
50
48
|
|
|
51
|
-
// @todo remove this once $custom-button-state-theme-map is removed
|
|
52
|
-
@if $custom-button-state-theme-map != () {
|
|
53
|
-
@warn "`$custom-button-state-theme-map` is deprecated and will be removed in a future release of Graupl. Use `$button-theme-mappings` instead.";
|
|
54
|
-
|
|
55
|
-
$button-theme-mappings: map.merge(
|
|
56
|
-
$button-theme-mappings,
|
|
57
|
-
$custom-button-state-theme-map
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// @todo remove the once $button-state-theme-map is removed
|
|
62
|
-
@if $button-state-theme-map != () {
|
|
63
|
-
@warn "`$button-state-theme-map` is deprecated and will be removed in a future release of Graupl. Use `$button-theme-mappings` instead.";
|
|
64
|
-
|
|
65
|
-
$button-theme-mappings: map.merge(
|
|
66
|
-
$button-theme-mappings,
|
|
67
|
-
$button-state-theme-map
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
49
|
// Merge the custom button state theme map with the default one.
|
|
72
50
|
@if $generate-base-theme-map {
|
|
73
51
|
$button-theme-mappings: map.merge(
|
|
@@ -12,62 +12,63 @@
|
|
|
12
12
|
// - `.link`: A component modifier to make the button component look like a link component.
|
|
13
13
|
//
|
|
14
14
|
// The following custom properties can be used to customize the button component:
|
|
15
|
-
// | Property
|
|
16
|
-
// | ---
|
|
17
|
-
// | `--graupl-button-min-width` | The minimum width of the button component. | `var(--graupl-interactive-min-width)`
|
|
18
|
-
// | `--graupl-button-min-height` | The minimum height of the button component. | `var(--graupl-interactive-min-height)`
|
|
19
|
-
// | `--graupl-button-padding-x` | The horizontal padding of the button component. | `var(--graupl-spacer-5)`
|
|
20
|
-
// | `--graupl-button-padding-y` | The vertical padding of the button component. | `var(--graupl-spacer-3)`
|
|
21
|
-
// | `--graupl-button-padding` | The padding of the button component (combines x and y padding). | `var(--graupl-button-padding-
|
|
22
|
-
// | `--graupl-button-font-size` | The font size of the button component. | `var(--graupl-font-size-base)`
|
|
23
|
-
// | `--graupl-button-transition` | The transition of the button component. | `background var(--graupl-transition-duration-fast), color var(--graupl-transition-duration-fast), transform var(--graupl-transition-duration-fast)`
|
|
24
|
-
// | `--graupl-button-transition-reduced-motion` | The transition of the button component when reduced motion is enabled. | `background var(--graupl-transition-duration-none), color var(--graupl-transition-duration-none)`
|
|
25
|
-
// | `--graupl-button-transform` | The transform of the button component. | `
|
|
26
|
-
// | `--graupl-button-visited-transform` | The transform of a visited button component. | `var(--graupl-button-transform)`
|
|
27
|
-
// | `--graupl-button-focus-transform` | The transform of a focused button component. | `var(--graupl-button-transform)`
|
|
28
|
-
// | `--graupl-button-hover-transform` | The transform of a hovered button component. | `var(--graupl-button-transform)`
|
|
29
|
-
// | `--graupl-button-active-transform` | The transform of an active button component. | `scale(0.95)`
|
|
30
|
-
// | `--graupl-button-disabled-transform` | The transform of a disabled button component. | `
|
|
31
|
-
// | `--graupl-button-background` | The background colour of the button component. | `var(--graupl-background)`
|
|
32
|
-
// | `--graupl-button-visited-background` | The background colour of a visited button component. | `var(--graupl-button-background)`
|
|
33
|
-
// | `--graupl-button-focus-background` | The background colour of a focused button component. | `var(--graupl-button-background)`
|
|
34
|
-
// | `--graupl-button-hover-background` | The background colour of a hovered button component. | `var(--graupl-color)`
|
|
35
|
-
// | `--graupl-button-active-background` | The background colour of an active button component. | `var(--graupl-button-hover-background)`
|
|
36
|
-
// | `--graupl-button-disabled-background` | The background colour of a disabled button component. | `var(--graupl-background)`
|
|
37
|
-
// | `--graupl-button-color` | The text colour of the button component. | `var(--graupl-color)`
|
|
38
|
-
// | `--graupl-button-visited-color` | The text colour of a visited button component. | `var(--graupl-button-color)`
|
|
39
|
-
// | `--graupl-button-focus-color` | The text colour of a focused button component. | `var(--graupl-button-color)`
|
|
40
|
-
// | `--graupl-button-hover-color` | The text colour of a hovered button component. | `var(--graupl-background)`
|
|
41
|
-
// | `--graupl-button-active-color` | The text colour of an active button component. | `var(--graupl-button-hover-color)`
|
|
42
|
-
// | `--graupl-button-disabled-color` | The text colour of a disabled button component. | `var(--graupl-theme-active--primary--200)`
|
|
43
|
-
// | `--graupl-button-border-top-width` | The top border width of the button component. | `var(--graupl-border-top-width)`
|
|
44
|
-
// | `--graupl-button-border-right-width` | The right border width of the button component. | `var(--graupl-border-right-width)`
|
|
45
|
-
// | `--graupl-button-border-bottom-width` | The bottom border width of the button component. | `var(--graupl-border-bottom-width)`
|
|
46
|
-
// | `--graupl-button-border-left-width` | The left border width of the button component. | `var(--graupl-border-left-width)`
|
|
47
|
-
// | `--graupl-button-border-width` | The border width of the button component (combines top, right, bottom, and left widths). | `var(--graupl-button-border-top-width) var(--graupl-button-border-right-width) var(--graupl-button-border-bottom-width) var(--graupl-button-border-left-width)`
|
|
48
|
-
// | `--graupl-button-border-top-style` | The top border style of the button component. | `var(--graupl-border-top-style)`
|
|
49
|
-
// | `--graupl-button-border-right-style` | The right border style of the button component. | `var(--graupl-border-right-style)`
|
|
50
|
-
// | `--graupl-button-border-bottom-style` | The bottom border style of the button component. | `var(--graupl-border-bottom-style)`
|
|
51
|
-
// | `--graupl-button-border-left-style` | The left border style of the button component. | `var(--graupl-border-left-style)`
|
|
52
|
-
// | `--graupl-button-border-style` | The border style of the button component (combines top, right, bottom, and left styles). | `var(--graupl-button-border-top-style) var(--graupl-button-border-right-style) var(--graupl-button-border-bottom-style) var(--graupl-button-border-left-style)`
|
|
53
|
-
// | `--graupl-button-border-top-left-radius` | The top left border radius of the button component. | `var(--graupl-border-top-left-radius)`
|
|
54
|
-
// | `--graupl-button-border-top-right-radius` | The top right border radius of the button component. | `var(--graupl-border-top-right-radius)`
|
|
55
|
-
// | `--graupl-button-border-bottom-right-radius` | The bottom right border radius of the button component. | `var(--graupl-border-bottom-right-radius)`
|
|
56
|
-
// | `--graupl-button-border-bottom-left-radius` | The bottom left border radius of the button component. | `var(--graupl-border-bottom-left-radius)`
|
|
57
|
-
// | `--graupl-button-border-radius` | The border radius of the button component (combines top-left, top-right, bottom-right, and bottom-left radii). | `var(--graupl-button-border-top-left-radius) var(--graupl-button-border-top-right-radius) var(--graupl-button-border-bottom-right-radius) var(--graupl-button-border-bottom-left-radius)`
|
|
58
|
-
// | `--graupl-button-border-color` | The border colour of the button component. | `var(--graupl-border-color)`
|
|
59
|
-
// | `--graupl-button-visited-border-color` | The border colour of a visited button component. | `var(--graupl-button-border-color)`
|
|
60
|
-
// | `--graupl-button-focus-border-color` | The border colour of a focused button component. | `var(--graupl-button-border-color)`
|
|
61
|
-
// | `--graupl-button-hover-border-color` | The border colour of a hovered button component. | `var(--graupl-border-color)`
|
|
62
|
-
// | `--graupl-button-active-border-color` | The border colour of an active button component. | `var(--graupl-button-hover-border-color)`
|
|
63
|
-
// | `--graupl-button-disabled-border-color` | The border colour of a disabled button component. | `var(--graupl-theme-active--primary--200)`
|
|
15
|
+
// | Property | Description | Default Value |
|
|
16
|
+
// | --- | --- | --- |
|
|
17
|
+
// | `--graupl-button-min-width` | The minimum width of the button component. | `var(--graupl-interactive-min-width)` |
|
|
18
|
+
// | `--graupl-button-min-height` | The minimum height of the button component. | `var(--graupl-interactive-min-height)` |
|
|
19
|
+
// | `--graupl-button-padding-x` | The horizontal padding of the button component. | `var(--graupl-spacer-5)` |
|
|
20
|
+
// | `--graupl-button-padding-y` | The vertical padding of the button component. | `var(--graupl-spacer-3)` |
|
|
21
|
+
// | `--graupl-button-padding` | The padding of the button component (combines x and y padding). | `var(--graupl-button-padding-y) var(--graupl-button-padding-x)` |
|
|
22
|
+
// | `--graupl-button-font-size` | The font size of the button component. | `var(--graupl-font-size-base)` |
|
|
23
|
+
// | `--graupl-button-transition` | The transition of the button component. | `background var(--graupl-transition-duration-fast) var(--graupl-transition-timing-function), color var(--graupl-transition-duration-fast) var(--graupl-transition-timing-function), transform var(--graupl-transition-duration-fast) var(--graupl-transition-timing-function)` |
|
|
24
|
+
// | `--graupl-button-transition-reduced-motion` | The transition of the button component when reduced motion is enabled. | `background var(--graupl-transition-duration-none) var(--graupl-transition-timing-function), color var(--graupl-transition-duration-none) var(--graupl-transition-timing-function)` |
|
|
25
|
+
// | `--graupl-button-transform` | The transform of the button component. | `none` |
|
|
26
|
+
// | `--graupl-button-visited-transform` | The transform of a visited button component. | `var(--graupl-button-transform)` |
|
|
27
|
+
// | `--graupl-button-focus-transform` | The transform of a focused button component. | `var(--graupl-button-transform)` |
|
|
28
|
+
// | `--graupl-button-hover-transform` | The transform of a hovered button component. | `var(--graupl-button-transform)` |
|
|
29
|
+
// | `--graupl-button-active-transform` | The transform of an active button component. | `scale(0.95)` |
|
|
30
|
+
// | `--graupl-button-disabled-transform` | The transform of a disabled button component. | `none` |
|
|
31
|
+
// | `--graupl-button-background` | The background colour of the button component. | `var(--graupl-background)` |
|
|
32
|
+
// | `--graupl-button-visited-background` | The background colour of a visited button component. | `var(--graupl-button-background)` |
|
|
33
|
+
// | `--graupl-button-focus-background` | The background colour of a focused button component. | `var(--graupl-button-background)` |
|
|
34
|
+
// | `--graupl-button-hover-background` | The background colour of a hovered button component. | `var(--graupl-color)` |
|
|
35
|
+
// | `--graupl-button-active-background` | The background colour of an active button component. | `var(--graupl-button-hover-background)` |
|
|
36
|
+
// | `--graupl-button-disabled-background` | The background colour of a disabled button component. | `var(--graupl-background)` |
|
|
37
|
+
// | `--graupl-button-color` | The text colour of the button component. | `var(--graupl-color)` |
|
|
38
|
+
// | `--graupl-button-visited-color` | The text colour of a visited button component. | `var(--graupl-button-color)` |
|
|
39
|
+
// | `--graupl-button-focus-color` | The text colour of a focused button component. | `var(--graupl-button-color)` |
|
|
40
|
+
// | `--graupl-button-hover-color` | The text colour of a hovered button component. | `var(--graupl-background)` |
|
|
41
|
+
// | `--graupl-button-active-color` | The text colour of an active button component. | `var(--graupl-button-hover-color)` |
|
|
42
|
+
// | `--graupl-button-disabled-color` | The text colour of a disabled button component. | `var(--graupl-theme-active--primary--200)` |
|
|
43
|
+
// | `--graupl-button-border-top-width` | The top border width of the button component. | `var(--graupl-border-top-width)` |
|
|
44
|
+
// | `--graupl-button-border-right-width` | The right border width of the button component. | `var(--graupl-border-right-width)` |
|
|
45
|
+
// | `--graupl-button-border-bottom-width` | The bottom border width of the button component. | `var(--graupl-border-bottom-width)` |
|
|
46
|
+
// | `--graupl-button-border-left-width` | The left border width of the button component. | `var(--graupl-border-left-width)` |
|
|
47
|
+
// | `--graupl-button-border-width` | The border width of the button component (combines top, right, bottom, and left widths). | `var(--graupl-button-border-top-width) var(--graupl-button-border-right-width) var(--graupl-button-border-bottom-width) var(--graupl-button-border-left-width)` |
|
|
48
|
+
// | `--graupl-button-border-top-style` | The top border style of the button component. | `var(--graupl-border-top-style)` |
|
|
49
|
+
// | `--graupl-button-border-right-style` | The right border style of the button component. | `var(--graupl-border-right-style)` |
|
|
50
|
+
// | `--graupl-button-border-bottom-style` | The bottom border style of the button component. | `var(--graupl-border-bottom-style)` |
|
|
51
|
+
// | `--graupl-button-border-left-style` | The left border style of the button component. | `var(--graupl-border-left-style)` |
|
|
52
|
+
// | `--graupl-button-border-style` | The border style of the button component (combines top, right, bottom, and left styles). | `var(--graupl-button-border-top-style) var(--graupl-button-border-right-style) var(--graupl-button-border-bottom-style) var(--graupl-button-border-left-style)` |
|
|
53
|
+
// | `--graupl-button-border-top-left-radius` | The top left border radius of the button component. | `var(--graupl-border-top-left-radius)` |
|
|
54
|
+
// | `--graupl-button-border-top-right-radius` | The top right border radius of the button component. | `var(--graupl-border-top-right-radius)` |
|
|
55
|
+
// | `--graupl-button-border-bottom-right-radius` | The bottom right border radius of the button component. | `var(--graupl-border-bottom-right-radius)` |
|
|
56
|
+
// | `--graupl-button-border-bottom-left-radius` | The bottom left border radius of the button component. | `var(--graupl-border-bottom-left-radius)` |
|
|
57
|
+
// | `--graupl-button-border-radius` | The border radius of the button component (combines top-left, top-right, bottom-right, and bottom-left radii). | `var(--graupl-button-border-top-left-radius) var(--graupl-button-border-top-right-radius) var(--graupl-button-border-bottom-right-radius) var(--graupl-button-border-bottom-left-radius)` |
|
|
58
|
+
// | `--graupl-button-border-color` | The border colour of the button component. | `var(--graupl-border-color)` |
|
|
59
|
+
// | `--graupl-button-visited-border-color` | The border colour of a visited button component. | `var(--graupl-button-border-color)` |
|
|
60
|
+
// | `--graupl-button-focus-border-color` | The border colour of a focused button component. | `var(--graupl-button-border-color)` |
|
|
61
|
+
// | `--graupl-button-hover-border-color` | The border colour of a hovered button component. | `var(--graupl-border-color)` |
|
|
62
|
+
// | `--graupl-button-active-border-color` | The border colour of an active button component. | `var(--graupl-button-hover-border-color)` |
|
|
63
|
+
// | `--graupl-button-disabled-border-color` | The border colour of a disabled button component. | `var(--graupl-theme-active--primary--200)` |
|
|
64
64
|
//
|
|
65
65
|
// The following sass variables can be used to customize the generation of the button component:
|
|
66
|
-
// | Variable
|
|
67
|
-
// | ---
|
|
66
|
+
// | Variable | Description | Default Value |
|
|
67
|
+
// | --- | --- | --- |
|
|
68
68
|
// | `$selector-base` | The selector base for the component. | `.` |
|
|
69
69
|
// | `$modifier-selector-base` | The selector base for component modifiers. | `.` |
|
|
70
70
|
// | `$generate-base-theme-map` | A flag to generate the base theme maps for button variants. | `true` |
|
|
71
|
+
// | `$themeable` | A flag that determines whether theme modifiers are generated. | `true` |
|
|
71
72
|
// | `$button-selector-base` | The selector base for the button component. | `$selector-base` |
|
|
72
73
|
// | `$button-selector` | The button component selector. | `button` |
|
|
73
74
|
// | `$button-link-selector-base` | The selector base for the button link component modifier. | `$modifier-selector-base` |
|
|
@@ -80,7 +81,7 @@
|
|
|
80
81
|
// | `$button-theme-mappings` | A map of properties and color shades used generate all button variants. | `()` |
|
|
81
82
|
// | `$button-theme-map` | A map of all properties, colors, and color shades used to generate all button variants. | `()` |
|
|
82
83
|
//
|
|
83
|
-
// Using `$button-theme-mappings`
|
|
84
|
+
// ## Using `$button-theme-mappings`
|
|
84
85
|
//
|
|
85
86
|
// `$button-theme-mappings` is a 1-level map of properties and shade values.
|
|
86
87
|
//
|