@simple-reporting/base 1.0.2 → 1.0.3

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/dev/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "postinstall": "srl prepare"
20
20
  },
21
21
  "dependencies": {
22
- "@simple-reporting/base": "^1.0.2",
22
+ "@simple-reporting/base": "^1.0.3",
23
23
  "axios": "^1.9.0",
24
24
  "chalk": "^5.4.1",
25
25
  "exceljs": "^4.4.0",
@@ -83,7 +83,7 @@ td {
83
83
  */
84
84
  &[class*="head"] {
85
85
  border-bottom: (
86
- var(--srl-table-border-regular-width)
86
+ var(--srl-table-border-bold-width)
87
87
  map.get($table-border-bold, style)
88
88
  srl.colors-get(map.get($table-border-bold, color))
89
89
  );
@@ -99,7 +99,7 @@ td {
99
99
 
100
100
  &[class*="blinetop"] {
101
101
  border-top: (
102
- var(--srl-table-border-regular-width)
102
+ var(--srl-table-border-bold-width)
103
103
  map.get($table-border-bold, style)
104
104
  srl.colors-get(map.get($table-border-bold, color))
105
105
  );
@@ -129,7 +129,7 @@ td {
129
129
 
130
130
  &[class*="blinebottom"] {
131
131
  border-bottom: (
132
- var(--srl-table-border-regular-width)
132
+ var(--srl-table-border-bold-width)
133
133
  map.get($table-border-bold, style)
134
134
  srl.colors-get(map.get($table-border-bold, color))
135
135
  );
@@ -157,7 +157,7 @@ td {
157
157
 
158
158
  &[class*="blineleft"] {
159
159
  border-left: (
160
- var(--srl-table-border-regular-width)
160
+ var(--srl-table-border-bold-width)
161
161
  map.get($table-border-bold, style)
162
162
  srl.colors-get(map.get($table-border-bold, color))
163
163
  );
@@ -181,7 +181,7 @@ td {
181
181
 
182
182
  &[class*="blineright"] {
183
183
  border-right: (
184
- var(--srl-table-border-regular-width)
184
+ var(--srl-table-border-bold-width)
185
185
  map.get($table-border-bold, style)
186
186
  srl.colors-get(map.get($table-border-bold, color))
187
187
  );
@@ -1,11 +1,12 @@
1
1
  <figure class="srl-image">
2
2
  <div
3
- class="srl-image__alt-text"
4
- doc-editable="alt-tag"
5
- doc-optional
6
- data-alt-text-source="alt"
3
+ class="srl-grid srl-image__alt-text"
4
+ doc-toggle="show-alt-text"
7
5
  >
8
- Write the alt text here (optional, but recommended)
6
+ <span class="srl-grid__inner" doc-editable="alt-tag"
7
+ data-alt-text-source="alt">
8
+ Write the alt text here (optional, but recommended)
9
+ </span>
9
10
  </div>
10
11
  <div class="srl-grid srl-grid--media">
11
12
  <div
@@ -3,6 +3,11 @@
3
3
  "label": "Image",
4
4
  "properties": ["width-all", "pdf-spacer"],
5
5
  "directives": {
6
+ "show-alt-text": {
7
+ "type": "toggle",
8
+ "label": "Show alt text",
9
+ "default": false
10
+ },
6
11
  "show-mobile-image": {
7
12
  "type": "toggle",
8
13
  "label": "Show mobile image",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simple-reporting/base",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Manage srl templates, build and publish",
5
5
  "bin": {
6
6
  "srl": "cli.js"
@@ -34,6 +34,13 @@
34
34
  @return var(--#{variables.$variable-prefix}typo-#{$typo}-font-weight, unset);
35
35
  }
36
36
 
37
+ @function get-font-color($typo) {
38
+ @if not map.has-key(variables.$typography, $typo) {
39
+ @error "Invalid typo for typography specified! Choose one of #{map.keys(variables.$typography)}";
40
+ }
41
+ @return var(--#{variables.$variable-prefix}typo-#{$typo}-font-color, unset);
42
+ }
43
+
37
44
  @function get-letter-spacing($typo) {
38
45
  @return var(
39
46
  --#{variables.$variable-prefix}typo-#{$typo}-letter-spacing,
@@ -2,6 +2,7 @@
2
2
  @use 'functions';
3
3
  @use '../system';
4
4
  @use '../grid';
5
+ @use '../colors';
5
6
  @use 'sass:map';
6
7
  @use 'sass:string';
7
8
 
@@ -25,6 +26,10 @@
25
26
  }
26
27
  font-weight: functions.get-font-weight($typo);
27
28
 
29
+ @if map.has-key($map, color) {
30
+ color: functions.get-font-color($typo);
31
+ }
32
+
28
33
  @if map.has-key($map, letter-spacing) {
29
34
  letter-spacing: functions.get-letter-spacing($typo);
30
35
  }
@@ -87,6 +92,13 @@
87
92
  map.get($defaults, font-weight)
88
93
  );
89
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
+
90
102
  @if (map.has-key($map, letter-spacing)) {
91
103
  @include system.add-root-style(
92
104
  #{variables.$variable-prefix}typo-#{$typo}-letter-spacing,
@@ -269,6 +281,10 @@
269
281
  --#{variables.$variable-prefix}typo-#{$typo}-font-weight: #{$value};
270
282
  }
271
283
 
284
+ @mixin set-font-color($typo, $value) {
285
+ --#{variables.$variable-prefix}typo-#{$typo}-font-color: #{$value};
286
+ }
287
+
272
288
  @mixin set-letter-spacing($typo, $value) {
273
289
  --#{variables.$variable-prefix}typo-#{$typo}-letter-spacing: #{$value};
274
290
  }