@simple-reporting/base 1.0.23 → 1.0.25
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/cli.js +5 -1
- package/dev/index.html +1 -1
- package/dev/livingdocs.config.json +6 -6
- package/dev/package.json +6 -1
- package/dev/src/Dialog.vue +3 -0
- package/dev/src/assets/scss/word.scss +44 -1
- package/livingdocs/010.Titles/010.title-h1/scss/word.scss +3 -0
- package/livingdocs/010.Titles/020.title-h2/scss/word.scss +10 -0
- package/livingdocs/010.Titles/030.title-h3/scss/word.scss +10 -0
- package/livingdocs/010.Titles/040.title-h4/scss/word.scss +10 -0
- package/livingdocs/010.Titles/050.title-h5/scss/word.scss +5 -0
- package/livingdocs/010.Titles/060.title-h6/scss/word.scss +5 -0
- package/livingdocs/020.Text/010.lead/scss/word.scss +5 -0
- package/livingdocs/020.Text/020.paragraph/scss/word.scss +5 -0
- package/livingdocs/020.Text/030.paragraph-strong/scss/word.scss +6 -0
- package/livingdocs/020.Text/040.link/scss/word.scss +5 -0
- package/livingdocs/020.Text/050.quote/scss/word.scss +7 -0
- package/livingdocs/020.Text/060.quote-with-portrait/scss/word.scss +7 -0
- package/livingdocs/020.Text/080.footnote-item/scss/word.scss +6 -0
- package/livingdocs/030.Lists/010.unordered-list/scss/general.scss +0 -5
- package/livingdocs/030.Lists/010.unordered-list/scss/word.scss +6 -0
- package/livingdocs/030.Lists/020.ordered-list/scss/word.scss +9 -0
- package/livingdocs/030.Lists/030.alphanumeric-list/scss/word.scss +9 -0
- package/livingdocs/030.Lists/040.list-item/scss/pdf.scss +2 -2
- package/livingdocs/030.Lists/040.list-item/scss/word.scss +19 -0
- package/livingdocs/040.Media/010.table/scss/general.scss +22 -17
- package/livingdocs/040.Media/010.table/scss/word.scss +21 -0
- package/livingdocs/040.Media/020.image/scss/word.scss +5 -0
- package/livingdocs/040.Media/030.video/scss/word.scss +5 -0
- package/livingdocs/040.Media/030.video/video.html +2 -2
- package/livingdocs/060.Buttons/020.button/scss/word.scss +6 -1
- package/livingdocs/080.CV/010.cv/cv.html +7 -7
- package/livingdocs/090.Signatures/010.signature-container/scss/word.scss +5 -0
- package/livingdocs/090.Signatures/020.signature-item/scss/word.scss +6 -0
- package/livingdocs/100.Misc/010.anchor/anchor.html +2 -1
- package/livingdocs/110.PDF/010.pdf-pagebreak/pdf-pagebreak.html +1 -1
- package/livingdocs/110.PDF/010.pdf-pagebreak/scss/word.scss +5 -0
- package/livingdocs/110.PDF/030.pdf-publication-title/pdf-publication-title.html +1 -0
- package/livingdocs/110.PDF/040.pdf-chapter-title/pdf-chapter-title.html +1 -0
- package/livingdocs/110.PDF/050.pdf-chapter-navigation-container/pdf-chapter-navigation.html +1 -0
- package/livingdocs/110.PDF/070.pdf-cover/pdf-cover.html +1 -1
- package/livingdocs/110.PDF/080.pdf-toc-page/pdf-toc-page.html +2 -2
- package/livingdocs/110.PDF/080.pdf-toc-page/scss/editor.scss +2 -2
- package/livingdocs/110.PDF/100.pdf-toc-item/pdf-toc-item.html +3 -3
- package/package.json +2 -1
- package/scripts/beaver.js +14 -18
- package/scripts/build/variables.d.ts +6 -0
- package/scripts/build/variables.js +6 -0
- package/scripts/build.d.ts +1 -1
- package/scripts/build.js +227 -99
- package/scripts/dotenv.d.ts +1 -0
- package/scripts/dotenv.js +8 -0
- package/scripts/init.js +1 -1
- package/scripts/ldd/mapLdd.js +2 -2
- package/scripts/utils.d.ts +1 -0
- package/scripts/utils.js +22 -0
- package/scss/colors/functions.scss +2 -10
- package/scss/colors/mixins.scss +0 -18
- package/scss/colors/root.scss +10 -0
- package/scss/core-styles.scss +4 -1
- package/scss/fonts/root.scss +4 -0
- package/scss/grid/functions.scss +8 -6
- package/scss/grid/mixins.scss +0 -77
- package/scss/grid/root.scss +80 -0
- package/scss/helpers/root.scss +4 -0
- package/scss/init-root.scss +12 -0
- package/scss/meta/root.scss +4 -0
- package/scss/spacer/functions.scss +2 -1
- package/scss/spacer/mixins.scss +0 -52
- package/scss/spacer/root.scss +55 -0
- package/scss/system/functions.scss +70 -5
- package/scss/system/root.scss +0 -3
- package/scss/system/variables.scss +1 -0
- package/scss/typography/functions.scss +12 -12
- package/scss/typography/mixins.scss +0 -221
- package/scss/typography/root.scss +226 -0
- package/srl/.srl/components/Srl/Article/Dialog/Button.vue +18 -20
- package/srl/.srl/components/Srl/Article/Root.vue +4 -3
- package/srl/.srl/components/Srl/Page/Dialog.vue +17 -19
- package/srl/.srl/types/nswow.d.ts +3 -0
- package/srl/.srl/utils/pageState.ts +2 -2
- package/srl/srl/pdf.scss +0 -2
|
@@ -6,51 +6,51 @@
|
|
|
6
6
|
@if not map.has-key(variables.$typography, $typo) {
|
|
7
7
|
@error "Invalid typo for typography specified! Choose one of #{map.keys(variables.$typography)}";
|
|
8
8
|
}
|
|
9
|
-
@return
|
|
9
|
+
@return system.root-style(#{variables.$variable-prefix}typo-#{$typo}-font-family, unset);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
@function get-font-size($typo) {
|
|
13
13
|
@if not map.has-key(variables.$typography, $typo) {
|
|
14
14
|
@error "Invalid typo for typo specified! Choose one of #{map.keys(variables.$typography)}";
|
|
15
15
|
}
|
|
16
|
-
@return
|
|
16
|
+
@return system.root-style(#{variables.$variable-prefix}typo-#{$typo}-font-size, unset);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
@function get-line-height($typo) {
|
|
20
20
|
@if not map.has-key(variables.$typography, $typo) {
|
|
21
21
|
@error "Invalid typo for typography specified! Choose one of #{map.keys(variables.$typography)}";
|
|
22
22
|
}
|
|
23
|
-
@return
|
|
23
|
+
@return system.root-style(#{variables.$variable-prefix}typo-#{$typo}-line-height, unset);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
@function get-font-style($typo) {
|
|
27
27
|
@if not map.has-key(variables.$typography, $typo) {
|
|
28
28
|
@error "Invalid typo for typography specified! Choose one of #{map.keys(variables.$typography)}";
|
|
29
29
|
}
|
|
30
|
-
@return
|
|
30
|
+
@return system.root-style(#{variables.$variable-prefix}typo-#{$typo}-font-style, normal);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
@function get-font-weight($typo) {
|
|
34
|
-
@return
|
|
34
|
+
@return system.root-style(#{variables.$variable-prefix}typo-#{$typo}-font-weight, unset);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
@function get-font-color($typo) {
|
|
38
38
|
@if not map.has-key(variables.$typography, $typo) {
|
|
39
39
|
@error "Invalid typo for typography specified! Choose one of #{map.keys(variables.$typography)}";
|
|
40
40
|
}
|
|
41
|
-
@return
|
|
41
|
+
@return system.root-style(#{variables.$variable-prefix}typo-#{$typo}-font-color, unset);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
@function get-letter-spacing($typo) {
|
|
45
|
-
@return
|
|
46
|
-
|
|
45
|
+
@return system.root-style(
|
|
46
|
+
#{variables.$variable-prefix}typo-#{$typo}-letter-spacing,
|
|
47
47
|
unset
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
@function get-text-transform($typo) {
|
|
52
|
-
@return
|
|
53
|
-
|
|
52
|
+
@return system.root-style(
|
|
53
|
+
#{variables.$variable-prefix}typo-#{$typo}-text-transform,
|
|
54
54
|
unset
|
|
55
55
|
);
|
|
56
56
|
}
|
|
@@ -59,12 +59,12 @@
|
|
|
59
59
|
@if not map.has-key(variables.$typography, $typo) {
|
|
60
60
|
@error "Invalid typo for typography specified! Choose one of #{map.keys(variables.$typography)}";
|
|
61
61
|
}
|
|
62
|
-
@return
|
|
62
|
+
@return system.root-style(#{variables.$variable-prefix}typo-#{$typo}-margin-top, 0);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
@function get-margin-bottom($typo) {
|
|
66
66
|
@if not map.has-key(variables.$typography, $typo) {
|
|
67
67
|
@error "Invalid typo for typography specified! Choose one of #{map.keys(variables.$typography)}";
|
|
68
68
|
}
|
|
69
|
-
@return
|
|
69
|
+
@return system.root-style(#{variables.$variable-prefix}typo-#{$typo}-margin-bottom, 0);
|
|
70
70
|
}
|
|
@@ -44,223 +44,6 @@
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
@mixin _register-typo-variables(
|
|
48
|
-
$typo,
|
|
49
|
-
$map,
|
|
50
|
-
$media: false,
|
|
51
|
-
$mediaBehavior: false
|
|
52
|
-
) {
|
|
53
|
-
@if not $media {
|
|
54
|
-
$defaults: map.merge(
|
|
55
|
-
(
|
|
56
|
-
font-family: unset,
|
|
57
|
-
font-size: unset,
|
|
58
|
-
line-height: unset,
|
|
59
|
-
font-style: normal,
|
|
60
|
-
font-weight: unset,
|
|
61
|
-
letter-spacing: unset,
|
|
62
|
-
margin-top: 0,
|
|
63
|
-
margin-bottom: 0,
|
|
64
|
-
),
|
|
65
|
-
$map
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
@if (map.has-key($map, font-family)) {
|
|
69
|
-
@include system.add-root-style(
|
|
70
|
-
#{variables.$variable-prefix}typo-#{$typo}-font-family,
|
|
71
|
-
string.unquote(map.get($defaults, font-family))
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@include system.add-root-style(
|
|
76
|
-
#{variables.$variable-prefix}typo-#{$typo}-font-size,
|
|
77
|
-
system.size-unit(map.get($defaults, font-size))
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
@include system.add-root-style(
|
|
81
|
-
#{variables.$variable-prefix}typo-#{$typo}-line-height,
|
|
82
|
-
system.size-unit(map.get($defaults, line-height), em)
|
|
83
|
-
);
|
|
84
|
-
|
|
85
|
-
@include system.add-root-style(
|
|
86
|
-
#{variables.$variable-prefix}typo-#{$typo}-font-style,
|
|
87
|
-
string.unquote(map.get($defaults, font-style))
|
|
88
|
-
);
|
|
89
|
-
|
|
90
|
-
@include system.add-root-style(
|
|
91
|
-
#{variables.$variable-prefix}typo-#{$typo}-font-weight,
|
|
92
|
-
map.get($defaults, font-weight)
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
@if (map.has-key($map, color)) {
|
|
96
|
-
@include system.add-root-style(
|
|
97
|
-
#{variables.$variable-prefix}typo-#{$typo}-font-color,
|
|
98
|
-
colors.get(map.get($defaults, color))
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
@if (map.has-key($map, letter-spacing)) {
|
|
103
|
-
@include system.add-root-style(
|
|
104
|
-
#{variables.$variable-prefix}typo-#{$typo}-letter-spacing,
|
|
105
|
-
system.size-unit(map.get($defaults, letter-spacing))
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
@if (map.has-key($map, text-transform)) {
|
|
110
|
-
@include system.add-root-style(
|
|
111
|
-
#{variables.$variable-prefix}typo-#{$typo}-text-transform,
|
|
112
|
-
map.get($defaults, text-transform)
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
@include system.add-root-style(
|
|
117
|
-
#{variables.$variable-prefix}typo-#{$typo}-margin-top,
|
|
118
|
-
system.size-unit(map.get($defaults, margin-top))
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
@include system.add-root-style(
|
|
122
|
-
#{variables.$variable-prefix}typo-#{$typo}-margin-bottom,
|
|
123
|
-
system.size-unit(map.get($defaults, margin-bottom))
|
|
124
|
-
);
|
|
125
|
-
|
|
126
|
-
@if map.has-key($map, media) {
|
|
127
|
-
@each $breakpoint, $breakpointValue in map.get($map, media) {
|
|
128
|
-
@if $breakpoint == up {
|
|
129
|
-
@each $upBreakpoint, $upBreakpointValue in $breakpointValue {
|
|
130
|
-
@include _register-typo-variables(
|
|
131
|
-
$typo,
|
|
132
|
-
$upBreakpointValue,
|
|
133
|
-
$upBreakpoint,
|
|
134
|
-
up
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
} @else if $breakpoint == down {
|
|
138
|
-
@each $downBreakpoint, $downBreakpointValue in $breakpointValue {
|
|
139
|
-
@include _register-typo-variables(
|
|
140
|
-
$typo,
|
|
141
|
-
$downBreakpointValue,
|
|
142
|
-
$downBreakpoint,
|
|
143
|
-
down
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
} @else {
|
|
147
|
-
@include _register-typo-variables(
|
|
148
|
-
$typo,
|
|
149
|
-
$breakpointValue,
|
|
150
|
-
$breakpoint
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
} @else {
|
|
156
|
-
@if (map.has-key($map, font-family)) {
|
|
157
|
-
@include system.add-root-style(
|
|
158
|
-
#{variables.$variable-prefix}typo-#{$typo}-font-family,
|
|
159
|
-
string.unquote(map.get($map, font-family)),
|
|
160
|
-
$media,
|
|
161
|
-
$mediaBehavior
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
@if (map.has-key($map, font-size)) {
|
|
166
|
-
@include system.add-root-style(
|
|
167
|
-
#{variables.$variable-prefix}typo-#{$typo}-font-size,
|
|
168
|
-
system.size-unit(map.get($map, font-size)),
|
|
169
|
-
$media,
|
|
170
|
-
$mediaBehavior
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
@if map.has-key($map, line-height) {
|
|
175
|
-
@include system.add-root-style(
|
|
176
|
-
#{variables.$variable-prefix}typo-#{$typo}-line-height,
|
|
177
|
-
system.size-unit(map.get($map, line-height), em),
|
|
178
|
-
$media,
|
|
179
|
-
$mediaBehavior
|
|
180
|
-
);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
@if map.has-key($map, font-style) {
|
|
184
|
-
@include system.add-root-style(
|
|
185
|
-
#{variables.$variable-prefix}typo-#{$typo}-font-style,
|
|
186
|
-
string.unquote(map.get($map, font-style)),
|
|
187
|
-
$media,
|
|
188
|
-
$mediaBehavior
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
@if map.has-key($map, font-weight) {
|
|
193
|
-
@include system.add-root-style(
|
|
194
|
-
#{variables.$variable-prefix}typo-#{$typo}-font-weight,
|
|
195
|
-
map.get($map, font-weight),
|
|
196
|
-
$media,
|
|
197
|
-
$mediaBehavior
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
@if (map.has-key($map, color)) {
|
|
202
|
-
@include system.add-root-style(
|
|
203
|
-
#{variables.$variable-prefix}typo-#{$typo}-font-color,
|
|
204
|
-
colors.get(map.get($defaults, color))
|
|
205
|
-
);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
@if (map.has-key($map, letter-spacing)) {
|
|
209
|
-
@include system.add-root-style(
|
|
210
|
-
#{variables.$variable-prefix}typo-#{$typo}-letter-spacing,
|
|
211
|
-
system.size-unit(map.get($defaults, letter-spacing)),
|
|
212
|
-
$media,
|
|
213
|
-
$mediaBehavior
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
@if (map.has-key($map, text-transform)) {
|
|
218
|
-
@include system.add-root-style(
|
|
219
|
-
#{variables.$variable-prefix}typo-#{$typo}-text-transform,
|
|
220
|
-
map.get($defaults, text-transform),
|
|
221
|
-
$media,
|
|
222
|
-
$mediaBehavior
|
|
223
|
-
);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
@if map.has-key($map, margin-top) {
|
|
227
|
-
@if $media == print {
|
|
228
|
-
@include system.add-root-style(
|
|
229
|
-
#{variables.$variable-prefix}typo-#{$typo}-margin-top,
|
|
230
|
-
system.size-unit(map.get($map, margin-top), in),
|
|
231
|
-
$media,
|
|
232
|
-
$mediaBehavior
|
|
233
|
-
);
|
|
234
|
-
} @else {
|
|
235
|
-
@include system.add-root-style(
|
|
236
|
-
#{variables.$variable-prefix}typo-#{$typo}-margin-top,
|
|
237
|
-
system.size-unit(map.get($map, margin-top)),
|
|
238
|
-
$media,
|
|
239
|
-
$mediaBehavior
|
|
240
|
-
);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
@if map.has-key($map, margin-bottom) {
|
|
245
|
-
@if $media == print {
|
|
246
|
-
@include system.add-root-style(
|
|
247
|
-
#{variables.$variable-prefix}typo-#{$typo}-margin-bottom,
|
|
248
|
-
system.size-unit(map.get($map, margin-bottom), in),
|
|
249
|
-
$media,
|
|
250
|
-
$mediaBehavior
|
|
251
|
-
);
|
|
252
|
-
} @else {
|
|
253
|
-
@include system.add-root-style(
|
|
254
|
-
#{variables.$variable-prefix}typo-#{$typo}-margin-bottom,
|
|
255
|
-
system.size-unit(map.get($map, margin-bottom)),
|
|
256
|
-
$media,
|
|
257
|
-
$mediaBehavior
|
|
258
|
-
);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
47
|
@mixin set-font-family($typo, $value) {
|
|
265
48
|
--#{variables.$variable-prefix}typo-#{$typo}-font-family: #{string.unquote(
|
|
266
49
|
$value
|
|
@@ -312,10 +95,6 @@
|
|
|
312
95
|
)};
|
|
313
96
|
}
|
|
314
97
|
|
|
315
|
-
@each $typo, $values in variables.$typography {
|
|
316
|
-
@include _register-typo-variables($typo, $values);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
98
|
@mixin core-styles {
|
|
320
99
|
@each $typo, $values in variables.$typography {
|
|
321
100
|
.#{variables.$class-prefix}typo-#{'' + $typo} {
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "sass:string";
|
|
3
|
+
@use "variables";
|
|
4
|
+
@use "../colors";
|
|
5
|
+
@use "../system";
|
|
6
|
+
|
|
7
|
+
@mixin _register-typo-variables(
|
|
8
|
+
$typo,
|
|
9
|
+
$map,
|
|
10
|
+
$media: false,
|
|
11
|
+
$mediaBehavior: false
|
|
12
|
+
) {
|
|
13
|
+
@if not $media {
|
|
14
|
+
$defaults: map.merge(
|
|
15
|
+
(
|
|
16
|
+
font-family: unset,
|
|
17
|
+
font-size: unset,
|
|
18
|
+
line-height: unset,
|
|
19
|
+
font-style: normal,
|
|
20
|
+
font-weight: unset,
|
|
21
|
+
letter-spacing: unset,
|
|
22
|
+
margin-top: 0,
|
|
23
|
+
margin-bottom: 0,
|
|
24
|
+
),
|
|
25
|
+
$map
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
@if (map.has-key($map, font-family)) {
|
|
29
|
+
@include system.add-root-style(
|
|
30
|
+
#{variables.$variable-prefix}typo-#{$typo}-font-family,
|
|
31
|
+
string.unquote(map.get($defaults, font-family))
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@include system.add-root-style(
|
|
36
|
+
#{variables.$variable-prefix}typo-#{$typo}-font-size,
|
|
37
|
+
system.size-unit(map.get($defaults, font-size))
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
@include system.add-root-style(
|
|
41
|
+
#{variables.$variable-prefix}typo-#{$typo}-line-height,
|
|
42
|
+
system.size-unit(map.get($defaults, line-height), em)
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
@include system.add-root-style(
|
|
46
|
+
#{variables.$variable-prefix}typo-#{$typo}-font-style,
|
|
47
|
+
string.unquote(map.get($defaults, font-style))
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
@include system.add-root-style(
|
|
51
|
+
#{variables.$variable-prefix}typo-#{$typo}-font-weight,
|
|
52
|
+
map.get($defaults, font-weight)
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
@if (map.has-key($map, color)) {
|
|
56
|
+
@include system.add-root-style(
|
|
57
|
+
#{variables.$variable-prefix}typo-#{$typo}-font-color,
|
|
58
|
+
colors.get(map.get($defaults, color))
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@if (map.has-key($map, letter-spacing)) {
|
|
63
|
+
@include system.add-root-style(
|
|
64
|
+
#{variables.$variable-prefix}typo-#{$typo}-letter-spacing,
|
|
65
|
+
system.size-unit(map.get($defaults, letter-spacing))
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@if (map.has-key($map, text-transform)) {
|
|
70
|
+
@include system.add-root-style(
|
|
71
|
+
#{variables.$variable-prefix}typo-#{$typo}-text-transform,
|
|
72
|
+
map.get($defaults, text-transform)
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@include system.add-root-style(
|
|
77
|
+
#{variables.$variable-prefix}typo-#{$typo}-margin-top,
|
|
78
|
+
system.size-unit(map.get($defaults, margin-top))
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
@include system.add-root-style(
|
|
82
|
+
#{variables.$variable-prefix}typo-#{$typo}-margin-bottom,
|
|
83
|
+
system.size-unit(map.get($defaults, margin-bottom))
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
@if map.has-key($map, media) {
|
|
87
|
+
@each $breakpoint, $breakpointValue in map.get($map, media) {
|
|
88
|
+
@if $breakpoint == up {
|
|
89
|
+
@each $upBreakpoint, $upBreakpointValue in $breakpointValue {
|
|
90
|
+
@include _register-typo-variables(
|
|
91
|
+
$typo,
|
|
92
|
+
$upBreakpointValue,
|
|
93
|
+
$upBreakpoint,
|
|
94
|
+
up
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
} @else if $breakpoint == down {
|
|
98
|
+
@each $downBreakpoint, $downBreakpointValue in $breakpointValue {
|
|
99
|
+
@include _register-typo-variables(
|
|
100
|
+
$typo,
|
|
101
|
+
$downBreakpointValue,
|
|
102
|
+
$downBreakpoint,
|
|
103
|
+
down
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
} @else {
|
|
107
|
+
@include _register-typo-variables(
|
|
108
|
+
$typo,
|
|
109
|
+
$breakpointValue,
|
|
110
|
+
$breakpoint
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
} @else {
|
|
116
|
+
@if (map.has-key($map, font-family)) {
|
|
117
|
+
@include system.add-root-style(
|
|
118
|
+
#{variables.$variable-prefix}typo-#{$typo}-font-family,
|
|
119
|
+
string.unquote(map.get($map, font-family)),
|
|
120
|
+
$media,
|
|
121
|
+
$mediaBehavior
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@if (map.has-key($map, font-size)) {
|
|
126
|
+
@include system.add-root-style(
|
|
127
|
+
#{variables.$variable-prefix}typo-#{$typo}-font-size,
|
|
128
|
+
system.size-unit(map.get($map, font-size)),
|
|
129
|
+
$media,
|
|
130
|
+
$mediaBehavior
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@if map.has-key($map, line-height) {
|
|
135
|
+
@include system.add-root-style(
|
|
136
|
+
#{variables.$variable-prefix}typo-#{$typo}-line-height,
|
|
137
|
+
system.size-unit(map.get($map, line-height), em),
|
|
138
|
+
$media,
|
|
139
|
+
$mediaBehavior
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@if map.has-key($map, font-style) {
|
|
144
|
+
@include system.add-root-style(
|
|
145
|
+
#{variables.$variable-prefix}typo-#{$typo}-font-style,
|
|
146
|
+
string.unquote(map.get($map, font-style)),
|
|
147
|
+
$media,
|
|
148
|
+
$mediaBehavior
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@if map.has-key($map, font-weight) {
|
|
153
|
+
@include system.add-root-style(
|
|
154
|
+
#{variables.$variable-prefix}typo-#{$typo}-font-weight,
|
|
155
|
+
map.get($map, font-weight),
|
|
156
|
+
$media,
|
|
157
|
+
$mediaBehavior
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@if (map.has-key($map, color)) {
|
|
162
|
+
@include system.add-root-style(
|
|
163
|
+
#{variables.$variable-prefix}typo-#{$typo}-font-color,
|
|
164
|
+
colors.get(map.get($defaults, color))
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@if (map.has-key($map, letter-spacing)) {
|
|
169
|
+
@include system.add-root-style(
|
|
170
|
+
#{variables.$variable-prefix}typo-#{$typo}-letter-spacing,
|
|
171
|
+
system.size-unit(map.get($defaults, letter-spacing)),
|
|
172
|
+
$media,
|
|
173
|
+
$mediaBehavior
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@if (map.has-key($map, text-transform)) {
|
|
178
|
+
@include system.add-root-style(
|
|
179
|
+
#{variables.$variable-prefix}typo-#{$typo}-text-transform,
|
|
180
|
+
map.get($defaults, text-transform),
|
|
181
|
+
$media,
|
|
182
|
+
$mediaBehavior
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@if map.has-key($map, margin-top) {
|
|
187
|
+
@if $media == print {
|
|
188
|
+
@include system.add-root-style(
|
|
189
|
+
#{variables.$variable-prefix}typo-#{$typo}-margin-top,
|
|
190
|
+
system.size-unit(map.get($map, margin-top), in),
|
|
191
|
+
$media,
|
|
192
|
+
$mediaBehavior
|
|
193
|
+
);
|
|
194
|
+
} @else {
|
|
195
|
+
@include system.add-root-style(
|
|
196
|
+
#{variables.$variable-prefix}typo-#{$typo}-margin-top,
|
|
197
|
+
system.size-unit(map.get($map, margin-top)),
|
|
198
|
+
$media,
|
|
199
|
+
$mediaBehavior
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@if map.has-key($map, margin-bottom) {
|
|
205
|
+
@if $media == print {
|
|
206
|
+
@include system.add-root-style(
|
|
207
|
+
#{variables.$variable-prefix}typo-#{$typo}-margin-bottom,
|
|
208
|
+
system.size-unit(map.get($map, margin-bottom), in),
|
|
209
|
+
$media,
|
|
210
|
+
$mediaBehavior
|
|
211
|
+
);
|
|
212
|
+
} @else {
|
|
213
|
+
@include system.add-root-style(
|
|
214
|
+
#{variables.$variable-prefix}typo-#{$typo}-margin-bottom,
|
|
215
|
+
system.size-unit(map.get($map, margin-bottom)),
|
|
216
|
+
$media,
|
|
217
|
+
$mediaBehavior
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@each $typo, $values in variables.$typography {
|
|
225
|
+
@include _register-typo-variables($typo, $values);
|
|
226
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { computed, ref } from 'vue'
|
|
3
3
|
import { useArticles, useConfig } from '#composables';
|
|
4
4
|
import { prepareHtmlContent, isDialogStored, addDialogToStorage, getDialogFromStorage } from '#utils';
|
|
5
5
|
|
|
@@ -10,10 +10,22 @@ const props = defineProps<{
|
|
|
10
10
|
|
|
11
11
|
const config = useConfig();
|
|
12
12
|
const articles = useArticles();
|
|
13
|
-
const id = ref<string>(`srl-page__dialog-${
|
|
13
|
+
const id = ref<string>(`srl-page__dialog-${props.uuid.replaceAll(' ', '_')}`);
|
|
14
14
|
const content = ref<string>('');
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
|
|
16
|
+
const dialog = isDialogStored(props.uuid)?
|
|
17
|
+
getDialogFromStorage(props.uuid):
|
|
18
|
+
ref<SrlPageDialog | null>(null);
|
|
19
|
+
|
|
20
|
+
if (!isDialogStored(props.uuid)) {
|
|
21
|
+
addDialogToStorage(props.uuid, dialog);
|
|
22
|
+
loadContent();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const state = computed<boolean>(() => {
|
|
26
|
+
return dialog.value ?
|
|
27
|
+
dialog.value.dialogState : false
|
|
28
|
+
});
|
|
17
29
|
|
|
18
30
|
async function loadContent() {
|
|
19
31
|
const article = articles.value.find((article) => article.uuid === props.uuid);
|
|
@@ -37,22 +49,8 @@ async function loadContent() {
|
|
|
37
49
|
}
|
|
38
50
|
}
|
|
39
51
|
|
|
40
|
-
if (isDialogStored(props.uuid)) {
|
|
41
|
-
dialogStored = true;
|
|
42
|
-
} else {
|
|
43
|
-
addDialogToStorage(props.uuid, dialog);
|
|
44
|
-
loadContent();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
52
|
async function open() {
|
|
48
|
-
|
|
49
|
-
dialog.value.open();
|
|
50
|
-
} else {
|
|
51
|
-
const storage = getDialogFromStorage(props.uuid);
|
|
52
|
-
storage ?
|
|
53
|
-
storage.open():
|
|
54
|
-
console.warn(`Dialog with uuid ${props.uuid} not found in storage.`);
|
|
55
|
-
}
|
|
53
|
+
dialog.value?.open();
|
|
56
54
|
}
|
|
57
55
|
</script>
|
|
58
56
|
|
|
@@ -62,7 +60,7 @@ async function open() {
|
|
|
62
60
|
type="button"
|
|
63
61
|
:aria-controls="id"
|
|
64
62
|
aria-haspopup="dialog"
|
|
65
|
-
:aria-expanded="
|
|
63
|
+
:aria-expanded="state"
|
|
66
64
|
@click="open"
|
|
67
65
|
>
|
|
68
66
|
<slot />
|
|
@@ -32,24 +32,25 @@ import { nextTick, ref, onMounted } from 'vue';
|
|
|
32
32
|
import VRuntimeTemplate from 'vue3-runtime-template';
|
|
33
33
|
import Autoload from '@/Autoload.ts';
|
|
34
34
|
import { useRoute } from 'vue-router';
|
|
35
|
-
import { useArticle,
|
|
35
|
+
import { useArticle, useConfig } from '#composables';
|
|
36
36
|
import { prepareHtmlContent } from '#utils';
|
|
37
37
|
|
|
38
38
|
const articleRoot = ref<HTMLDivElement | null>(null);
|
|
39
39
|
const config = useConfig();
|
|
40
40
|
const route = useRoute();
|
|
41
|
-
const articles = useArticles();
|
|
42
41
|
const content = ref<string>('');
|
|
43
42
|
const locale = route.params.locale as string;
|
|
44
43
|
const article = useArticle();
|
|
45
44
|
|
|
46
45
|
if (article.value) {
|
|
47
46
|
const file = `./html/${locale}/${article.value.name}.html`;
|
|
47
|
+
const publicationTitle = config.value.settings.publicationName[locale];
|
|
48
|
+
|
|
48
49
|
try {
|
|
49
50
|
const req = await fetch(file);
|
|
50
51
|
let text = await req.text();
|
|
51
52
|
|
|
52
|
-
document.title = article.value.translatedTitle
|
|
53
|
+
document.title = `${article.value.translatedTitle} - ${publicationTitle}`;
|
|
53
54
|
content.value = prepareHtmlContent(text);
|
|
54
55
|
} catch (error) {
|
|
55
56
|
console.error(`Failed to load article content from ${file}:`, error);
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { ref } from 'vue'
|
|
2
|
+
import { computed, ref } from 'vue'
|
|
3
3
|
import SrlPageCustomDialog from '@/Dialog.vue';
|
|
4
4
|
import Autoload from '@/Autoload.ts';
|
|
5
5
|
|
|
6
6
|
const props = withDefaults(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
defineProps<{
|
|
8
|
+
header?: string;
|
|
9
|
+
content?: string;
|
|
10
|
+
}>(),
|
|
11
|
+
{
|
|
12
|
+
header: '',
|
|
13
|
+
content: '',
|
|
14
|
+
},
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
const $el = ref<HTMLDialogElement | null>(null);
|
|
18
|
-
const dialogState = ref<boolean>(false);
|
|
19
|
-
|
|
20
18
|
const header = ref<string>(props.header);
|
|
21
19
|
const content = ref<string>(props.content);
|
|
22
|
-
|
|
20
|
+
const dialogState = ref<boolean>(false);
|
|
23
21
|
function setDialogContent(template: string) {
|
|
24
22
|
content.value = template;
|
|
25
23
|
}
|
|
@@ -30,15 +28,15 @@ function setDialogContentAndOpen(template: string) {
|
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
function open() {
|
|
33
|
-
$el.value?.showModal();
|
|
34
31
|
dialogState.value = true;
|
|
32
|
+
$el.value?.showModal();
|
|
35
33
|
$el.value?.querySelector('.srl-dialog__main')?.focus();
|
|
36
34
|
Autoload.init($el.value);
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
function close() {
|
|
40
|
-
$el.value?.close();
|
|
41
38
|
dialogState.value = false;
|
|
39
|
+
$el.value?.close();
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
function clearContent() {
|
|
@@ -58,11 +56,11 @@ defineExpose({
|
|
|
58
56
|
|
|
59
57
|
<template>
|
|
60
58
|
<dialog
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
ref="$el"
|
|
60
|
+
id="srl-page__dialog"
|
|
61
|
+
class="srl-page__dialog"
|
|
62
|
+
aria-modal="true"
|
|
63
|
+
@click.stop="close"
|
|
66
64
|
>
|
|
67
65
|
<SrlAriaTabChain @click.stop>
|
|
68
66
|
<SrlPageCustomDialog :header="header" :content="content" @close="close" />
|