@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
|
@@ -8,100 +8,157 @@
|
|
|
8
8
|
// - `a`: The link component.
|
|
9
9
|
// - `.stretched`: A component modifier that makes the link component stretch to fill nearest relative container.
|
|
10
10
|
//
|
|
11
|
-
// The following custom properties
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
//
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
//
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
//
|
|
72
|
-
//
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
//
|
|
76
|
-
//
|
|
77
|
-
//
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
//
|
|
81
|
-
//
|
|
82
|
-
//
|
|
83
|
-
//
|
|
84
|
-
// The
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
//
|
|
95
|
-
//
|
|
96
|
-
//
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
11
|
+
// The following custom properties can be used to customize the link component:
|
|
12
|
+
// | Property | Description | Default Value |
|
|
13
|
+
// | --- | --- | --- |
|
|
14
|
+
// | `--graupl-link-text-decoration` | The text decoration for the link component. | `underline` |
|
|
15
|
+
// | `--graupl-link-visited-text-decoration` | The text decoration for a visited link component. | `var(--graupl-link-text-decoration)` |
|
|
16
|
+
// | `--graupl-link-focus-text-decoration` | The text decoration for a focused link component. | `var(--graupl-link-text-decoration)` |
|
|
17
|
+
// | `--graupl-link-hover-text-decoration` | The text decoration for a hovered link component. | `underline` |
|
|
18
|
+
// | `--graupl-link-active-text-decoration` | The text decoration for an active link component. | `var(--graupl-link-hover-text-decoration)` |
|
|
19
|
+
// | `--graupl-link-disabled-text-decoration` | The text decoration for a disabled link component. | `underline` |
|
|
20
|
+
// | `--graupl-link-text-decoration-thickness` | The text decoration thickness for the link component. | `var(--graupl-border-width)` |
|
|
21
|
+
// | `--graupl-link-visited-text-decoration-thickness` | The text decoration thickness for a visited link component. | `var(--graupl-link-text-decoration-thickness)` |
|
|
22
|
+
// | `--graupl-link-focus-text-decoration-thickness` | The text decoration thickness for a focused link component. | `var(--graupl-link-text-decoration-thickness)` |
|
|
23
|
+
// | `--graupl-link-hover-text-decoration-thickness` | The text decoration thickness for a hovered link component. | `var(--graupl-border-width)` |
|
|
24
|
+
// | `--graupl-link-active-text-decoration-thickness` | The text decoration thickness for an active link component. | `var(--graupl-link-hover-text-decoration-thickness)` |
|
|
25
|
+
// | `--graupl-link-disabled-text-decoration-thickness` | The text decoration thickness for a disabled link component. | `var(--graupl-border-width)` |
|
|
26
|
+
// | `--graupl-link-text-decoration-style` | The text decoration style for the link component. | `solid` |
|
|
27
|
+
// | `--graupl-link-visited-text-decoration-style` | The text decoration style for a visited link component. | `var(--graupl-link-text-decoration-style)` |
|
|
28
|
+
// | `--graupl-link-focus-text-decoration-style` | The text decoration style for a focused link component. | `var(--graupl-link-text-decoration-style)` |
|
|
29
|
+
// | `--graupl-link-hover-text-decoration-style` | The text decoration style for a hovered link component. | `solid` |
|
|
30
|
+
// | `--graupl-link-active-text-decoration-style` | The text decoration style for an active link component. | `var(--graupl-link-hover-text-decoration-style)` |
|
|
31
|
+
// | `--graupl-link-disabled-text-decoration-style` | The text decoration style for a disabled link component. | `solid` |
|
|
32
|
+
// | `--graupl-link-color` | The color for the link component. | `var(--graupl-theme-active--primary--700)` |
|
|
33
|
+
// | `--graupl-link-visited-color` | The color for a visited link component. | `var(--graupl-link-color)` |
|
|
34
|
+
// | `--graupl-link-focus-color` | The color for a focused link component. | `var(--graupl-link-color)` |
|
|
35
|
+
// | `--graupl-link-hover-color` | The color for a hovered link component. | `var(--graupl-theme-active--tertiary--700)` |
|
|
36
|
+
// | `--graupl-link-active-color` | The color for an active link component. | `var(--graupl-link-hover-color)` |
|
|
37
|
+
// | `--graupl-link-disabled-color` | The color for a disabled link component. | `var(--graupl-theme-active--primary--200)` |
|
|
38
|
+
// | `--graupl-link-text-decoration-color` | The text decoration color for the link component. | `var(--graupl-link-color)` |
|
|
39
|
+
// | `--graupl-link-visited-text-decoration-color` | The text decoration color for a visited link component. | `var(--graupl-link-visited-color)` |
|
|
40
|
+
// | `--graupl-link-focus-text-decoration-color` | The text decoration color for a focused link component. | `var(--graupl-link-focus-color)` |
|
|
41
|
+
// | `--graupl-link-hover-text-decoration-color` | The text decoration color for a hovered link component. | `var(--graupl-link-hover-color)` |
|
|
42
|
+
// | `--graupl-link-active-text-decoration-color` | The text decoration color for an active link component. | `var(--graupl-link-active-color)` |
|
|
43
|
+
// | `--graupl-link-disabled-text-decoration-color` | The text decoration color for a disabled link component. | `var(--graupl-link-disabled-color)` |
|
|
44
|
+
// | `--graupl-link-background` | The background color for the link component. | `transparent` |
|
|
45
|
+
// | `--graupl-link-visited-background` | The background color for a visited link component. | `var(--graupl-link-background)` |
|
|
46
|
+
// | `--graupl-link-focus-background` | The background color for a focused link component. | `var(--graupl-link-background)` |
|
|
47
|
+
// | `--graupl-link-hover-background` | The background color for a hovered link component. | `transparent` |
|
|
48
|
+
// | `--graupl-link-active-background` | The background color for an active link component. | `var(--graupl-link-hover-background)` |
|
|
49
|
+
// | `--graupl-link-disabled-background` | The background color for a disabled link component. | `transparent` |
|
|
50
|
+
// | `--graupl-link-padding-x` | The horizontal padding for the link component. | `var(--graupl-spacer-0)` |
|
|
51
|
+
// | `--graupl-link-padding-y` | The vertical padding for the link component. | `var(--graupl-spacer-0)` |
|
|
52
|
+
// | `--graupl-link-padding` | The padding for the link component (combines x and y padding). | `var(--graupl-link-padding-y) var(--graupl-link-padding-x)` |
|
|
53
|
+
// | `--graupl-link-transition` | The transition for the link 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)` |
|
|
54
|
+
// | `--graupl-link-transition-reduced-motion` | The transition for the link 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)` |
|
|
55
|
+
// | `--graupl-link-transform` | The transform for the link component. | `none` |
|
|
56
|
+
// | `--graupl-link-visited-transform` | The transform for a visited link component. | `var(--graupl-link-transform)` |
|
|
57
|
+
// | `--graupl-link-focus-transform` | The transform for a focused link component. | `var(--graupl-link-transform)` |
|
|
58
|
+
// | `--graupl-link-hover-transform` | The transform for a hovered link component. | `none` |
|
|
59
|
+
// | `--graupl-link-active-transform` | The transform for an active link component. | `var(--graupl-link-hover-transform)` |
|
|
60
|
+
// | `--graupl-link-disabled-transform` | The transform for a disabled link component. | `none` |
|
|
61
|
+
// | `--graupl-link-border-top-width` | The top border width for the link component. | `0` |
|
|
62
|
+
// | `--graupl-link-border-right-width` | The right border width for the link component. | `0` |
|
|
63
|
+
// | `--graupl-link-border-bottom-width` | The bottom border width for the link component. | `0` |
|
|
64
|
+
// | `--graupl-link-border-left-width` | The left border width for the link component. | `0` |
|
|
65
|
+
// | `--graupl-link-border-width` | The border width for the link component (combines top, right, bottom, and left widths). | `var(--graupl-link-border-top-width) var(--graupl-link-border-right-width) var(--graupl-link-border-bottom-width) var(--graupl-link-border-left-width)` |
|
|
66
|
+
// | `--graupl-link-border-top-style` | The top border style for the link component. | `var(--graupl-border-top-style)` |
|
|
67
|
+
// | `--graupl-link-border-right-style` | The right border style for the link component. | `var(--graupl-border-right-style)` |
|
|
68
|
+
// | `--graupl-link-border-bottom-style` | The bottom border style for the link component. | `var(--graupl-border-bottom-style)` |
|
|
69
|
+
// | `--graupl-link-border-left-style` | The left border style for the link component. | `var(--graupl-border-left-style)` |
|
|
70
|
+
// | `--graupl-link-border-style` | The border style for the link component (combines top, right, bottom, and left styles). | `var(--graupl-link-border-top-style) var(--graupl-link-border-right-style) var(--graupl-link-border-bottom-style) var(--graupl-link-border-left-style)` |
|
|
71
|
+
// | `--graupl-link-border-top-left-radius` | The top left border radius for the link component. | `var(--graupl-border-top-left-radius)` |
|
|
72
|
+
// | `--graupl-link-border-top-right-radius` | The top right border radius for the link component. | `var(--graupl-border-top-right-radius)` |
|
|
73
|
+
// | `--graupl-link-border-bottom-right-radius` | The bottom right border radius for the link component. | `var(--graupl-border-bottom-right-radius)` |
|
|
74
|
+
// | `--graupl-link-border-bottom-left-radius` | The bottom left border radius for the link component. | `var(--graupl-border-bottom-left-radius)` |
|
|
75
|
+
// | `--graupl-link-border-radius` | The border radius for the link component (combines top-left, top-right, bottom-right, and bottom-left radii). | `var(--graupl-link-border-top-left-radius) var(--graupl-link-border-top-right-radius) var(--graupl-link-border-bottom-right-radius) var(--graupl-link-border-bottom-left-radius)` |
|
|
76
|
+
// | `--graupl-link-border-color` | The border color for the link component. | `transparent` |
|
|
77
|
+
// | `--graupl-link-visited-border-color` | The border color for a visited link component. | `var(--graupl-link-border-color)` |
|
|
78
|
+
// | `--graupl-link-focus-border-color` | The border color for a focused link component. | `var(--graupl-link-border-color)` |
|
|
79
|
+
// | `--graupl-link-hover-border-color` | The border color for a hovered link component. | `transparent` |
|
|
80
|
+
// | `--graupl-link-active-border-color` | The border color for an active link component. | `var(--graupl-link-hover-border-color)` |
|
|
81
|
+
// | `--graupl-link-disabled-border-color` | The border color for a disabled link component. | `transparent` |
|
|
82
|
+
// | `--graupl-link-min-width` | The minimum width for the link component. | `auto` |
|
|
83
|
+
// | `--graupl-link-min-height` | The minimum height for the link component. | `auto` |
|
|
84
|
+
// | `--graupl-link-stretched-link-z-index` | The z-index for the stretched link component modifier. | `5` |
|
|
85
|
+
//
|
|
86
|
+
// The following sass variables can be used to customize the generation of the link component:
|
|
87
|
+
// | Variable | Description | Default Value |
|
|
88
|
+
// | -------------------------------------- | -------------------------------------------------------------- | ------------------------------------- |
|
|
89
|
+
// | `$selector-base` | The selector base for the component. | `""` |
|
|
90
|
+
// | `$modifier-selector-base` | The selector base for component modifiers. | `"."` |
|
|
91
|
+
// | `$generate-base-theme-map` | Flag to generate the base theme maps for link variants. | `true` |
|
|
92
|
+
// | `$themeable` | Flag to generate theme modifiers. | `false` |
|
|
93
|
+
// | `$link-selector-base` | The base selector for the link component. | `$selector-base` |
|
|
94
|
+
// | `$link-selector` | The selector for the link component. | `"a"` |
|
|
95
|
+
// | `$link-theme-prefix-selector-base` | Selector base used for link theme modifiers. | `$modifier-selector-base` |
|
|
96
|
+
// | `$link-theme-prefix-selector` | Selector prefix used for link theme modifiers. | `""` |
|
|
97
|
+
// | `$stretched-link-selector-base` | The base selector for the stretched link component modifier. | `$modifier-selector-base` |
|
|
98
|
+
// | `$stretched-link-selector` | The selector for the stretched link component modifier. | `"stretched"` |
|
|
99
|
+
// | `$stretched-link-pseudo-selector` | The pseudo selector for the stretched link component modifier. | `"before"` |
|
|
100
|
+
// | `$link-initial-text-decoration` | The initial text decoration for the link component. | `underline` |
|
|
101
|
+
// | `$link-final-text-decoration` | The final text decoration for the link component. | `$link-initial-text-decoration` |
|
|
102
|
+
// | `$link-disabled-text-decoration` | The disabled text decoration for the link component. | `$link-initial-text-decoration` |
|
|
103
|
+
// | `$link-initial-text-decoration-style` | The initial text decoration style for the link component. | `solid` |
|
|
104
|
+
// | `$link-final-text-decoration-style` | The final text decoration style for the link component. | `$link-initial-text-decoration-style` |
|
|
105
|
+
// | `$link-disabled-text-decoration-style` | The disabled text decoration style for the link component. | `$link-initial-text-decoration-style` |
|
|
106
|
+
// | `$link-initial-transform` | The initial transform for the link component. | `none` |
|
|
107
|
+
// | `$link-final-transform` | The final transform for the link component. | `$link-initial-transform` |
|
|
108
|
+
// | `$link-disabled-transform` | The disabled transform for the link component. | `$link-initial-transform` |
|
|
109
|
+
// | `$link-border-width` | The border width for the link component. | `0` |
|
|
110
|
+
// | `$link-min-width` | The minimum width for the link component. | `auto` |
|
|
111
|
+
// | `$link-min-height` | The minimum height for the link component. | `auto` |
|
|
112
|
+
// | `$stretched-link-z-index` | The z-index for the stretched link component modifier. | `5` |
|
|
113
|
+
// | `$link-theme-mappings` | Map of properties and shade values applied to themed links. | `()` |
|
|
114
|
+
// | `$link-theme-map` | Fully expanded property map used to generate themed links. | `()` |
|
|
115
|
+
//
|
|
116
|
+
// ## Using `$link-theme-mappings`
|
|
117
|
+
//
|
|
118
|
+
// `$link-theme-mappings` is a single-level map of properties and shade values.
|
|
119
|
+
//
|
|
120
|
+
// e.g.
|
|
121
|
+
// ```scss
|
|
122
|
+
// $link-theme-mappings: (
|
|
123
|
+
// color: 700,
|
|
124
|
+
// hover-color: 400,
|
|
125
|
+
// disabled-color: 200,
|
|
126
|
+
// );
|
|
127
|
+
// ```
|
|
128
|
+
//
|
|
129
|
+
// This directly[1] informs all link variants what shade to use for each property key.
|
|
130
|
+
// Based on the example above:
|
|
131
|
+
// - Primary links expose `--graupl-link-color`, `--graupl-link-hover-color`, and `--graupl-link-disabled-color` as `var(--graupl-theme-active--primary--700/400/200)`,
|
|
132
|
+
// - Secondary links expose those properties via the secondary palette, and
|
|
133
|
+
// - Tertiary links expose those properties via the tertiary palette.
|
|
134
|
+
//
|
|
135
|
+
// You can tailor the behaviour by specifying additional properties (e.g. `text-decoration-color`, `background`) to keep variants in sync.
|
|
136
|
+
//
|
|
137
|
+
// [1] `$link-theme-mappings` gets parsed into a larger, more explicit map: `$link-theme-map`.
|
|
138
|
+
//
|
|
139
|
+
// ## Using `$link-theme-map`
|
|
140
|
+
//
|
|
141
|
+
// `$link-theme-map` is a multi-level map of properties, colours, and shade values, allowing you to override individual variants without affecting the others.
|
|
142
|
+
//
|
|
143
|
+
// e.g.
|
|
144
|
+
// ```scss
|
|
145
|
+
// $link-theme-map: (
|
|
146
|
+
// primary: (
|
|
147
|
+
// color: (
|
|
148
|
+
// color: primary,
|
|
149
|
+
// shade: 900,
|
|
150
|
+
// ),
|
|
151
|
+
// ),
|
|
152
|
+
// secondary: (
|
|
153
|
+
// hover-color: (
|
|
154
|
+
// color: secondary,
|
|
155
|
+
// shade: 300,
|
|
156
|
+
// ),
|
|
157
|
+
// ),
|
|
158
|
+
// );
|
|
159
|
+
// ```
|
|
160
|
+
//
|
|
161
|
+
// This example deepens the primary link colour while lightening the secondary hover colour, leaving other variants untouched.
|
|
105
162
|
//
|
|
106
163
|
// @example
|
|
107
164
|
// <a href="#">Link</a>
|
|
@@ -112,6 +169,8 @@
|
|
|
112
169
|
@use "../../defaults" as root-defaults;
|
|
113
170
|
@use "../../mixins/animation";
|
|
114
171
|
@use "../../mixins/layer" as *;
|
|
172
|
+
@use "../../mixins/state";
|
|
173
|
+
@use "../../mixins/theme";
|
|
115
174
|
@use "defaults";
|
|
116
175
|
@use "sass:map";
|
|
117
176
|
@use "variables" as *;
|
|
@@ -131,51 +190,14 @@
|
|
|
131
190
|
text-decoration-style: $link-text-decoration-style;
|
|
132
191
|
text-decoration-thickness: $link-text-decoration-thickness;
|
|
133
192
|
|
|
134
|
-
@
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
$state
|
|
143
|
-
);
|
|
144
|
-
text-decoration-thickness: map.get(
|
|
145
|
-
$link-text-decoration-thickness-states,
|
|
146
|
-
$state
|
|
147
|
-
);
|
|
148
|
-
|
|
149
|
-
// If the state is disabled, we want that to supersede all other states.
|
|
150
|
-
@if $state == "disabled" {
|
|
151
|
-
cursor: not-allowed;
|
|
152
|
-
|
|
153
|
-
@each $sub-state, $sub-selectors in root-defaults.$state-selectors {
|
|
154
|
-
@if $sub-state != $state {
|
|
155
|
-
@each $sub-selector in $sub-selectors {
|
|
156
|
-
// e.g &:visited, &:focus-visible, &:hover, &:active
|
|
157
|
-
&#{$sub-selector} {
|
|
158
|
-
transform: map.get($link-transform-states, $state);
|
|
159
|
-
text-decoration: map.get(
|
|
160
|
-
$link-text-decoration-states,
|
|
161
|
-
$state
|
|
162
|
-
);
|
|
163
|
-
text-decoration-style: map.get(
|
|
164
|
-
$link-text-decoration-style-states,
|
|
165
|
-
$state
|
|
166
|
-
);
|
|
167
|
-
text-decoration-thickness: map.get(
|
|
168
|
-
$link-text-decoration-thickness-states,
|
|
169
|
-
$state
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
193
|
+
@include state.generate-modifiers(
|
|
194
|
+
(
|
|
195
|
+
transform: $link-transform-states,
|
|
196
|
+
text-decoration: $link-text-decoration-states,
|
|
197
|
+
text-decoration-style: $link-text-decoration-style-states,
|
|
198
|
+
text-decoration-thickness: $link-text-decoration-thickness-states,
|
|
199
|
+
)
|
|
200
|
+
);
|
|
179
201
|
|
|
180
202
|
// &.stretched
|
|
181
203
|
&#{defaults.$stretched-link-selector-base}#{defaults.$stretched-link-selector} {
|
|
@@ -207,39 +229,22 @@
|
|
|
207
229
|
color: $link-color;
|
|
208
230
|
text-decoration-color: $link-text-decoration-color;
|
|
209
231
|
|
|
210
|
-
@
|
|
211
|
-
@
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
text-decoration-color: map.get(
|
|
218
|
-
$link-text-decoration-color-states,
|
|
219
|
-
$state
|
|
220
|
-
);
|
|
221
|
-
|
|
222
|
-
// If the state is disabled, we want that to supersede all other states.
|
|
223
|
-
@if $state == "disabled" {
|
|
224
|
-
@each $sub-state, $sub-selectors in root-defaults.$state-selectors {
|
|
225
|
-
@if $sub-state != $state {
|
|
226
|
-
@each $sub-selector in $sub-selectors {
|
|
227
|
-
// e.g &:visited, &:focus-visible, &:hover, &:active
|
|
228
|
-
&#{$sub-selector} {
|
|
229
|
-
border-color: map.get($link-border-color-states, $state);
|
|
230
|
-
background: map.get($link-background-states, $state);
|
|
231
|
-
color: map.get($link-color-states, $state);
|
|
232
|
-
text-decoration-color: map.get(
|
|
233
|
-
$link-text-decoration-color-states,
|
|
234
|
-
$state
|
|
235
|
-
);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
232
|
+
@if root-defaults.$themeable-components and defaults.$themeable {
|
|
233
|
+
@include theme.generate-modifiers(
|
|
234
|
+
defaults.$link-theme-map,
|
|
235
|
+
defaults.$link-theme-prefix-selector-base,
|
|
236
|
+
defaults.$link-theme-prefix-selector,
|
|
237
|
+
"link-"
|
|
238
|
+
);
|
|
243
239
|
}
|
|
240
|
+
|
|
241
|
+
@include state.generate-modifiers(
|
|
242
|
+
(
|
|
243
|
+
border-color: $link-border-color-states,
|
|
244
|
+
background: $link-background-states,
|
|
245
|
+
color: $link-color-states,
|
|
246
|
+
text-decoration-color: $link-text-decoration-color-states,
|
|
247
|
+
)
|
|
248
|
+
);
|
|
244
249
|
}
|
|
245
250
|
}
|