@helvetia-design/styles 0.0.0-stage → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ @use './foundation';
2
+ // component styles are only shipped pre-bundled — use
3
+ // @helvetia-design/styles/css/design-system directly, there is no standalone Sass source for them
@@ -0,0 +1,4 @@
1
+ @use '@helvetia-design/assets/src/fonts/scss/fonts.scss' with (
2
+ $font-path: '/assets/fonts'
3
+ );
4
+ @use './foundation';
@@ -0,0 +1,2 @@
1
+ @use './normalize';
2
+ @use './structure';
@@ -0,0 +1,6 @@
1
+ @forward '@helvetia-design/tokens/dist/sass/base.tokens.scss';
2
+
3
+ @forward './svg.mixin';
4
+ @forward './general.mixin';
5
+ @forward './breakpoint.mixin';
6
+ @forward './extends';
@@ -0,0 +1,132 @@
1
+ @use '@helvetia-design/tokens/dist/sass/base.tokens.scss' as *;
2
+
3
+ @mixin from($device) {
4
+ @media screen and (min-width: $device) {
5
+ @content;
6
+ }
7
+ }
8
+ @mixin until($device) {
9
+ @media screen and (max-width: $device - 1px) {
10
+ @content;
11
+ }
12
+ }
13
+ @mixin between($min-device, $max-device) {
14
+ @media screen and (min-width: $min-device) and (max-width: $max-device - 1px) {
15
+ @content;
16
+ }
17
+ }
18
+ @mixin mobile {
19
+ @media screen and (max-width: $ds-alias-breakpoint-tablet - 1px) {
20
+ @content;
21
+ }
22
+ }
23
+ @mixin tablet {
24
+ @media screen and (min-width: $ds-alias-breakpoint-tablet) {
25
+ @content;
26
+ }
27
+ }
28
+ @mixin tablet-only {
29
+ @media screen and (min-width: $ds-alias-breakpoint-tablet) and (max-width: $ds-alias-breakpoint-desktop - 1px) {
30
+ @content;
31
+ }
32
+ }
33
+ @mixin touch {
34
+ @media screen and (max-width: $ds-alias-breakpoint-desktop - 1px) {
35
+ @content;
36
+ }
37
+ }
38
+ @mixin desktop {
39
+ @media screen and (min-width: $ds-alias-breakpoint-desktop) {
40
+ @content;
41
+ }
42
+ }
43
+ @mixin desktop-only {
44
+ @media screen and (min-width: $ds-alias-breakpoint-desktop) and (max-width: $ds-alias-breakpoint-desktop-lg - 1px) {
45
+ @content;
46
+ }
47
+ }
48
+ @mixin desktop-lg {
49
+ @media screen and (min-width: $ds-alias-breakpoint-desktop-lg) {
50
+ @content;
51
+ }
52
+ }
53
+ @mixin desktop-lg-only {
54
+ @media screen and (min-width: $ds-alias-breakpoint-desktop-lg) and (max-width: $ds-alias-breakpoint-desktop-xl - 1px) {
55
+ @content;
56
+ }
57
+ }
58
+ @mixin until-desktop-lg {
59
+ @media screen and (max-width: $ds-alias-breakpoint-desktop-lg - 1px) {
60
+ @content;
61
+ }
62
+ }
63
+ @mixin until-desktop-xl {
64
+ @media screen and (max-width: $ds-alias-breakpoint-desktop-xl - 1px) {
65
+ @content;
66
+ }
67
+ }
68
+ @mixin desktop-xl {
69
+ @media screen and (min-width: $ds-alias-breakpoint-desktop-xl) {
70
+ @content;
71
+ }
72
+ }
73
+ @mixin desktop-xl-only {
74
+ @media screen and (min-width: $ds-alias-breakpoint-desktop-xl) and (max-width: $ds-alias-breakpoint-desktop-2xl - 1px) {
75
+ @content;
76
+ }
77
+ }
78
+ @mixin until-desktop-2xl {
79
+ @media screen and (max-width: $ds-alias-breakpoint-desktop-2xl - 1px) {
80
+ @content;
81
+ }
82
+ }
83
+ @mixin desktop-2xl {
84
+ @media screen and (min-width: $ds-alias-breakpoint-desktop-2xl) {
85
+ @content;
86
+ }
87
+ }
88
+
89
+ /**
90
+ * @deprecated Use desktop with t-shirt size breakpoints instead
91
+ */
92
+
93
+ @mixin high-definition {
94
+ @media screen and (min-width: $ds-alias-breakpoint-desktop-lg) {
95
+ @content;
96
+ }
97
+ }
98
+ @mixin high-definition-only {
99
+ @media screen and (min-width: $ds-alias-breakpoint-desktop-lg) and (max-width: $ds-alias-breakpoint-desktop-xl - 1px) {
100
+ @content;
101
+ }
102
+ }
103
+ @mixin until-high-definition {
104
+ @media screen and (max-width: $ds-alias-breakpoint-desktop-lg - 1px) {
105
+ @content;
106
+ }
107
+ }
108
+ @mixin until-widescreen {
109
+ @media screen and (max-width: $ds-alias-breakpoint-desktop-xl - 1px) {
110
+ @content;
111
+ }
112
+ }
113
+ @mixin widescreen {
114
+ @media screen and (min-width: $ds-alias-breakpoint-desktop-xl) {
115
+ @content;
116
+ }
117
+ }
118
+ @mixin widescreen-only {
119
+ @media screen and (min-width: $ds-alias-breakpoint-desktop-xl) and (max-width: $ds-alias-breakpoint-desktop-2xl - 1px) {
120
+ @content;
121
+ }
122
+ }
123
+ @mixin until-fullhd {
124
+ @media screen and (max-width: $ds-alias-breakpoint-desktop-2xl - 1px) {
125
+ @content;
126
+ }
127
+ }
128
+ @mixin fullhd {
129
+ @media screen and (min-width: $ds-alias-breakpoint-desktop-2xl) {
130
+ @content;
131
+ }
132
+ }
@@ -0,0 +1,35 @@
1
+ @use 'general.mixin' as *;
2
+
3
+ %bottomSpacing {
4
+ @include bottomSpacing;
5
+ }
6
+ %hidden-input {
7
+ @include visually-hidden;
8
+ }
9
+ %focus-shadow {
10
+ @include focus-shadow;
11
+ }
12
+ %focus-inverted-shadow {
13
+ @include focus-inverted-shadow;
14
+ }
15
+ %focus-inset-shadow {
16
+ @include focus-inset-shadow;
17
+ }
18
+ %focus-inverted-inset-shadow {
19
+ @include focus-inverted-inset-shadow;
20
+ }
21
+ %disabled {
22
+ @include disabled;
23
+ }
24
+ %unselectable {
25
+ @include unselectable;
26
+ }
27
+ %font-smoothing {
28
+ @include font-smoothing;
29
+ }
30
+ %reset {
31
+ @include reset;
32
+ }
33
+ %overlay {
34
+ @include overlay;
35
+ }
@@ -0,0 +1,198 @@
1
+ @use 'sass:map';
2
+ @use 'sass:string';
3
+ @use 'sass:math';
4
+
5
+ @mixin sr-only {
6
+ border: none !important;
7
+ clip: rect(0, 0, 0, 0) !important;
8
+ height: 0.01em !important;
9
+ overflow: hidden !important;
10
+ padding: 0 !important;
11
+ position: absolute !important;
12
+ white-space: nowrap !important;
13
+ width: 0.01em !important;
14
+ }
15
+
16
+ @mixin backdrop {
17
+ background-color: rgb(0, 7, 57, 0.5);
18
+ backdrop-filter: blur(4px);
19
+ }
20
+
21
+ @mixin print-hidden {
22
+ @media print {
23
+ display: none !important;
24
+ }
25
+ }
26
+
27
+ @mixin hover {
28
+ @media (hover: hover) and (pointer: fine) {
29
+ @content;
30
+ }
31
+ }
32
+
33
+ @mixin overflow-touch {
34
+ -webkit-overflow-scrolling: touch;
35
+ }
36
+
37
+ @mixin focus-shadow($color: var(--ds-alias-interaction-focus-color-base)) {
38
+ @include hover {
39
+ box-shadow:
40
+ var(--ds-alias-interaction-focus-color-border) 0 0 0 2px,
41
+ #{$color} 0 0 0 5px !important;
42
+ }
43
+ }
44
+
45
+ @mixin focus-inset-shadow {
46
+ @include hover {
47
+ box-shadow:
48
+ inset var(--ds-alias-interaction-focus-color-end) 0 0 0 3px,
49
+ inset var(--ds-alias-interaction-focus-color-start) 0 0 0 5px !important;
50
+ }
51
+ }
52
+
53
+ @mixin focus-inverted-shadow {
54
+ @include hover {
55
+ box-shadow:
56
+ var(--ds-alias-interaction-focus-color-inverted-start) 0 0 0 2px,
57
+ var(--ds-alias-interaction-focus-color-inverted-end) 0 0 0 5px !important;
58
+ }
59
+ }
60
+
61
+ @mixin focus-inverted-inset-shadow {
62
+ @include hover {
63
+ box-shadow:
64
+ inset var(--ds-alias-interaction-focus-color-inverted-end) 0 0 0 3px,
65
+ inset var(--ds-alias-interaction-focus-color-inverted-start) 0 0 0 5px !important;
66
+ }
67
+ }
68
+
69
+ // --------------------------------------------
70
+
71
+ @mixin font-smoothing {
72
+ -moz-osx-font-smoothing: grayscale;
73
+ -webkit-font-smoothing: antialiased;
74
+ }
75
+
76
+ @mixin unselectable {
77
+ -webkit-touch-callout: none;
78
+ -webkit-user-select: none;
79
+ -moz-user-select: none;
80
+ -ms-user-select: none;
81
+ user-select: none;
82
+
83
+ -webkit-user-drag: none; /* Chrome, Safari */
84
+ user-drag: none; /* Non-standard, limited support */
85
+ }
86
+
87
+ @mixin disabled {
88
+ cursor: default !important;
89
+ pointer-events: none !important;
90
+ }
91
+
92
+ @mixin reset {
93
+ -moz-appearance: none;
94
+ -webkit-appearance: none;
95
+ appearance: none;
96
+ background: none;
97
+ border: none;
98
+ color: currentColor;
99
+ font-family: inherit;
100
+ font-size: 1em;
101
+ margin: 0;
102
+ padding: 0;
103
+ }
104
+
105
+ @mixin overlay($offset: 0) {
106
+ bottom: $offset;
107
+ left: $offset;
108
+ position: absolute;
109
+ right: $offset;
110
+ top: $offset;
111
+ }
112
+
113
+ @mixin input-cover() {
114
+ @include position(0, null, null, 0);
115
+ @include margin(0);
116
+
117
+ position: absolute;
118
+
119
+ width: 100%;
120
+ height: 100%;
121
+
122
+ border: 0;
123
+ background: transparent;
124
+ cursor: pointer;
125
+
126
+ appearance: none;
127
+ outline: none;
128
+
129
+ &::-moz-focus-inner {
130
+ border: 0;
131
+ }
132
+ }
133
+
134
+ @mixin visually-hidden() {
135
+ position: absolute;
136
+
137
+ top: 0;
138
+ left: 0;
139
+ right: 0;
140
+ bottom: 0;
141
+
142
+ width: 100%;
143
+ height: 100%;
144
+
145
+ margin: 0;
146
+ padding: 0;
147
+
148
+ border: 0;
149
+ outline: 0;
150
+ clip: rect(0 0 0 0);
151
+
152
+ opacity: 0;
153
+ overflow: hidden;
154
+
155
+ -webkit-appearance: none;
156
+ -moz-appearance: none;
157
+ }
158
+
159
+ @mixin text-inherit() {
160
+ font-family: inherit;
161
+ font-size: inherit;
162
+ font-style: inherit;
163
+ font-weight: inherit;
164
+ letter-spacing: inherit;
165
+ text-decoration: inherit;
166
+ text-indent: inherit;
167
+ text-overflow: inherit;
168
+ text-transform: inherit;
169
+ text-align: inherit;
170
+ white-space: inherit;
171
+ color: inherit;
172
+ }
173
+
174
+ // Blumer mixins
175
+ // --------------------------------------------
176
+
177
+ $block-spacing: 0.25rem !default;
178
+ @mixin bottomSpacing($spacing: $block-spacing) {
179
+ &:not(:last-child) {
180
+ margin-bottom: $spacing;
181
+ }
182
+ }
183
+
184
+ @mixin ltr-position($spacing, $right: true) {
185
+ $normal: 'right';
186
+ @if not $right {
187
+ $normal: 'left';
188
+ }
189
+ #{$normal}: $spacing;
190
+ }
191
+
192
+ @mixin ltr-property($property, $spacing, $right: true) {
193
+ $normal: 'right';
194
+ @if not $right {
195
+ $normal: 'left';
196
+ }
197
+ #{$property}-#{$normal}: $spacing;
198
+ }
@@ -0,0 +1,17 @@
1
+ @mixin fillSvg($color) {
2
+ svg,
3
+ g,
4
+ path,
5
+ circle {
6
+ fill: $color;
7
+ }
8
+ }
9
+
10
+ @mixin fillSvgImportant($color) {
11
+ svg,
12
+ g,
13
+ path,
14
+ circle {
15
+ fill: $color !important;
16
+ }
17
+ }
@@ -0,0 +1 @@
1
+ @forward './mixins/_all';