@20minutes/hela 2.18.13 → 2.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,137 @@
1
+ @use 'sass:map';
2
+ @use '../functions' as *;
3
+ @use '../variables' as *;
4
+
5
+ // ── Button color schemes ────────────────────────────────────────────
6
+ // Shared mixins consumed by both _button.scss and _icon-button.scss.
7
+ // --button-scheme-color is the dominant color of the scheme.
8
+ // Used by the ghost variant as text color (bg → text remapping).
9
+
10
+ @mixin button-color-primary {
11
+ --button-scheme-color: #{map.get($token-variables, 'color', 'primary', 'ultramarine')};
12
+ --button-base-background-color: #{map.get($token-variables, 'color', 'primary', 'ultramarine')};
13
+ --button-base-color: #{map.get($token-variables, 'color', 'greyscale', 'white')};
14
+ --button-base-border-color: #{map.get($token-variables, 'color', 'primary', 'ultramarine')};
15
+ --button-hover-background-color: #{map.get($token-variables, 'color', 'primary', 'ultramarine')};
16
+ --button-hover-background-opacity: 0.8;
17
+ }
18
+
19
+ @mixin button-color-secondary {
20
+ --button-scheme-color: #{map.get($token-variables, 'color', 'greyscale', 'black')};
21
+ --button-base-background-color: #{map.get($token-variables, 'color', 'greyscale', 'black')};
22
+ --button-base-color: #{map.get($token-variables, 'color', 'greyscale', 'white')};
23
+ --button-base-border-color: #{map.get($token-variables, 'color', 'greyscale', 'black')};
24
+ --button-hover-background-color: #{map.get($token-variables, 'color', 'greyscale', 'black')};
25
+ --button-hover-background-opacity: 0.8;
26
+ }
27
+
28
+ @mixin button-color-tertiary {
29
+ --button-scheme-color: #{rgba(map.get($variables, 'color', 'greyscale', 'grey-900'), 0.6)};
30
+ --button-base-background-color: #{rgba(
31
+ map.get($variables, 'color', 'greyscale', 'grey-900'),
32
+ 0.6
33
+ )};
34
+ --button-base-color: #{map.get($token-variables, 'color', 'greyscale', 'white')};
35
+ --button-hover-background-color: #{rgba(
36
+ map.get($variables, 'color', 'greyscale', 'grey-900'),
37
+ 0.8
38
+ )};
39
+ --button-base-border-width: 0;
40
+ }
41
+
42
+ @mixin button-color-translucent {
43
+ --button-scheme-color: #{map.get($token-variables, 'color', 'greyscale', 'white')};
44
+ --button-base-background-color: transparent;
45
+ --button-base-color: #{map.get($token-variables, 'color', 'greyscale', 'white')};
46
+ --button-base-border-width: 1px;
47
+ --button-hover-background-color: #{rgba(map.get($variables, 'color', 'greyscale', 'white'), 0.1)};
48
+ --button-hover-background-opacity: 0.8;
49
+ }
50
+
51
+ @mixin button-color-dark {
52
+ --button-scheme-color: #{map.get($token-variables, 'color', 'greyscale', 'grey-900')};
53
+ --button-base-background-color: #{map.get($token-variables, 'color', 'greyscale', 'grey-900')};
54
+ --button-base-color: #{map.get($token-variables, 'color', 'greyscale', 'white')};
55
+ --button-base-border-color: #{map.get($token-variables, 'color', 'greyscale', 'grey-500')};
56
+ --button-hover-background-color: #{map.get($token-variables, 'color', 'greyscale', 'grey-500')};
57
+ --button-hover-background-opacity: 1;
58
+ }
59
+
60
+ @mixin button-color-white {
61
+ --button-scheme-color: #{map.get($token-variables, 'color', 'greyscale', 'white')};
62
+ --button-base-background-color: #{map.get($token-variables, 'color', 'greyscale', 'white')};
63
+ --button-base-color: #{map.get($token-variables, 'color', 'greyscale', 'grey-900')};
64
+ --button-base-border-color: #{map.get($token-variables, 'color', 'greyscale', 'white')};
65
+ --button-hover-background-color: #{map.get($token-variables, 'color', 'greyscale', 'white')};
66
+ --button-hover-background-opacity: 0.8;
67
+ }
68
+
69
+ // ── IconButton-specific color schemes ───────────────────────────────
70
+
71
+ @mixin icon-button-color-default {
72
+ --button-scheme-color: var(--color-base);
73
+ --button-base-background-color: var(--color-background-1);
74
+ --button-base-color: var(--color-base);
75
+ --button-hover-background-color: #{map.get($token-variables, 'color', 'greyscale', 'grey-100')};
76
+ --button-hover-background-opacity: 0.8;
77
+ }
78
+
79
+ @mixin button-color-blue-dark {
80
+ --button-scheme-color: #{map.get($token-variables, 'color', 'secondary', 'blue-grey')};
81
+ --button-base-background-color: #{map.get($token-variables, 'color', 'secondary', 'blue-grey')};
82
+ --button-base-color: #{map.get($token-variables, 'color', 'greyscale', 'white')};
83
+ --button-hover-background-color: #{map.get($token-variables, 'color', 'secondary', 'blue-grey')};
84
+ --button-hover-background-opacity: 1;
85
+ }
86
+
87
+ // ── Variant mixins ──────────────────────────────────────────────────
88
+ // Shared structural overrides consumed by both _button.scss and _icon-button.scss.
89
+
90
+ @mixin button-variant-ghost {
91
+ --button-base-background-color: none;
92
+ --button-base-color: var(--button-scheme-color, inherit);
93
+ --button-base-border-width: 0;
94
+ --button-hover-background-color: transparent;
95
+ --button-hover-background-opacity: 0.6;
96
+ }
97
+
98
+ @mixin button-variant-outlined {
99
+ --button-base-background-color: #{map.get($token-variables, 'color', 'greyscale', 'grey-50')};
100
+ --button-base-color: var(--button-scheme-color, inherit);
101
+ --button-base-border-color: #{map.get($token-variables, 'color', 'greyscale', 'grey-200')};
102
+ --button-hover-background-color: #{map.get($token-variables, 'color', 'greyscale', 'grey-100')};
103
+ --button-base-border-width: 1px;
104
+ --button-hover-background-opacity: 1;
105
+ }
106
+
107
+ // ── State mixins ─────────────────────────────────────────────────────
108
+
109
+ // we want to hide the text without adding a span around it, can't find a better solution
110
+ // we want to keep the hover state
111
+ // we want to keep the original button size
112
+ @mixin button-is-loading($spinner-size: 24px) {
113
+ position: relative;
114
+ color: transparent;
115
+ background-color: var(--button-hover-background-color);
116
+ opacity: var(--button-hover-background-opacity);
117
+ pointer-events: none;
118
+
119
+ .c-icon,
120
+ .c-btn__counter { /* stylelint-disable-line -- kebab-case */
121
+ opacity: 0;
122
+ }
123
+
124
+ &::after {
125
+ content: '';
126
+ position: absolute;
127
+ right: calc(50% - #{rem($spinner-size * 0.5)});
128
+ top: calc(50% - #{rem($spinner-size * 0.5)});
129
+ width: #{rem($spinner-size)};
130
+ height: #{rem($spinner-size)};
131
+ border: 2px solid var(--button-base-color);
132
+ border-bottom-color: var(--button-hover-background-color);
133
+ border-radius: 50%;
134
+ box-sizing: border-box;
135
+ animation: rotation 1s linear infinite;
136
+ }
137
+ }
@@ -1,2 +1,3 @@
1
+ @forward 'buttons';
1
2
  @forward 'create-media-queries';
2
3
  @forward 'slider';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 24 Apr 2026 09:32:52 GMT
3
+ * Generated on Wed, 06 May 2026 07:45:38 GMT
4
4
  */
5
5
 
6
6
  $token-variables: (