@sb1/ffe-core 100.12.4 → 101.0.1

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/css/ffe.css CHANGED
@@ -12,7 +12,7 @@ html,
12
12
  :host {
13
13
  line-height: 1.15; /* 1 */
14
14
  -webkit-text-size-adjust: 100%;
15
- -ms-text-size-adjust: 100%;
15
+ -moz-text-size-adjust: 100%;
16
16
  text-size-adjust: 100%; /* 2 */
17
17
  }
18
18
 
@@ -88,7 +88,8 @@ a {
88
88
  abbr[title] {
89
89
  border-bottom: none; /* 1 */
90
90
  text-decoration: underline; /* 2 */
91
- text-decoration: underline dotted; /* 2 */
91
+ -webkit-text-decoration: underline dotted;
92
+ text-decoration: underline dotted; /* 2 */
92
93
  }
93
94
 
94
95
  /**
@@ -201,7 +202,8 @@ button,
201
202
  [type='button'],
202
203
  [type='reset'],
203
204
  [type='submit'] {
204
- appearance: button;
205
+ -webkit-appearance: button;
206
+ appearance: button;
205
207
  }
206
208
 
207
209
  /**
@@ -293,7 +295,8 @@ textarea {
293
295
  */
294
296
 
295
297
  [type='search'] {
296
- appearance: textfield; /* 1 */
298
+ -webkit-appearance: textfield;
299
+ appearance: textfield; /* 1 */
297
300
  outline-offset: -2px; /* 2 */
298
301
  }
299
302
 
@@ -302,7 +305,8 @@ textarea {
302
305
  */
303
306
 
304
307
  [type='search']::-webkit-search-decoration {
305
- appearance: none;
308
+ -webkit-appearance: none;
309
+ appearance: none;
306
310
  }
307
311
 
308
312
  /**
@@ -311,7 +315,8 @@ textarea {
311
315
  */
312
316
 
313
317
  ::-webkit-file-upload-button {
314
- appearance: button; /* 1 */
318
+ -webkit-appearance: button;
319
+ appearance: button; /* 1 */
315
320
  font: inherit; /* 2 */
316
321
  }
317
322
 
@@ -1634,7 +1639,6 @@ html,
1634
1639
  }
1635
1640
  .ffe-link-icon {
1636
1641
  color: var(--ffe-color-foreground-interactive-link);
1637
- display: -ms-inline-flexbox;
1638
1642
  display: inline-flex;
1639
1643
  border-radius: 1.5rem;
1640
1644
  border: 2px solid transparent;
@@ -1821,23 +1825,30 @@ html,
1821
1825
  width: 100%;
1822
1826
  }
1823
1827
  .ffe-wave__wave {
1824
- mask-repeat: repeat-x;
1828
+ -webkit-mask-repeat: repeat-x;
1829
+ mask-repeat: repeat-x;
1825
1830
  min-height: 60px;
1826
- mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 479.9 60' style='enable-background:new 0 0 479.9 148' xml:space='preserve'%3E%3Cpath d='M0 530V0c60.7 0 91.6 13.8 121.4 27.1 30.4 13.6 59.1 26.4 118.1 26.4s87.7-12.8 118.1-26.4C387.4 13.8 418.2 0 478.9 0s91.6 13.8 121.4 27.1c30.4 13.6 59.1 26.4 118.1 26.4s87.7-12.8 118.1-26.4C866.3 13.8 897.1 0 957.8 0s91.6 13.8 121.4 27.1c30.4 13.6 59.1 26.4 118.1 26.4s87.7-12.8 118.1-26.4C1345.2 13.8 1376 0 1436.7 0c60.7 0 91.6 13.8 121.4 27.1 30.4 13.6 59.1 26.4 118.1 26.4s87.7-12.8 118.1-26.4C1824.1 13.8 1854.9 0 1915.7 0v530'/%3E%3C/svg%3E");
1827
- mask-size: 480px;
1831
+ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 479.9 60' style='enable-background:new 0 0 479.9 148' xml:space='preserve'%3E%3Cpath d='M0 530V0c60.7 0 91.6 13.8 121.4 27.1 30.4 13.6 59.1 26.4 118.1 26.4s87.7-12.8 118.1-26.4C387.4 13.8 418.2 0 478.9 0s91.6 13.8 121.4 27.1c30.4 13.6 59.1 26.4 118.1 26.4s87.7-12.8 118.1-26.4C866.3 13.8 897.1 0 957.8 0s91.6 13.8 121.4 27.1c30.4 13.6 59.1 26.4 118.1 26.4s87.7-12.8 118.1-26.4C1345.2 13.8 1376 0 1436.7 0c60.7 0 91.6 13.8 121.4 27.1 30.4 13.6 59.1 26.4 118.1 26.4s87.7-12.8 118.1-26.4C1824.1 13.8 1854.9 0 1915.7 0v530'/%3E%3C/svg%3E");
1832
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 479.9 60' style='enable-background:new 0 0 479.9 148' xml:space='preserve'%3E%3Cpath d='M0 530V0c60.7 0 91.6 13.8 121.4 27.1 30.4 13.6 59.1 26.4 118.1 26.4s87.7-12.8 118.1-26.4C387.4 13.8 418.2 0 478.9 0s91.6 13.8 121.4 27.1c30.4 13.6 59.1 26.4 118.1 26.4s87.7-12.8 118.1-26.4C866.3 13.8 897.1 0 957.8 0s91.6 13.8 121.4 27.1c30.4 13.6 59.1 26.4 118.1 26.4s87.7-12.8 118.1-26.4C1345.2 13.8 1376 0 1436.7 0c60.7 0 91.6 13.8 121.4 27.1 30.4 13.6 59.1 26.4 118.1 26.4s87.7-12.8 118.1-26.4C1824.1 13.8 1854.9 0 1915.7 0v530'/%3E%3C/svg%3E");
1833
+ -webkit-mask-size: 480px;
1834
+ mask-size: 480px;
1828
1835
  }
1829
1836
  @media (min-width: 480px) {
1830
1837
  .ffe-wave__wave {
1831
1838
  min-height: 119px;
1832
- mask-position: 812px;
1833
- mask-size: 950px;
1839
+ -webkit-mask-position: 812px;
1840
+ mask-position: 812px;
1841
+ -webkit-mask-size: 950px;
1842
+ mask-size: 950px;
1834
1843
  }
1835
1844
  }
1836
1845
  @media (min-width: 1024px) {
1837
1846
  .ffe-wave__wave {
1838
1847
  min-height: 250px;
1839
- mask-position: 1931px;
1840
- mask-size: 2004px;
1848
+ -webkit-mask-position: 1931px;
1849
+ mask-position: 1931px;
1850
+ -webkit-mask-size: 2004px;
1851
+ mask-size: 2004px;
1841
1852
  }
1842
1853
  }
1843
1854
  .ffe-wave__wave--flip {
package/es/breakpoints.js CHANGED
@@ -1,4 +1,4 @@
1
- export var breakpointSm = '480px';
2
- export var breakpointMd = '768px';
3
- export var breakpointLg = '1024px';
4
- export var breakpointXl = '1280px';
1
+ export const breakpointSm = '480px';
2
+ export const breakpointMd = '768px';
3
+ export const breakpointLg = '1024px';
4
+ export const breakpointXl = '1280px';
package/es/colors.js CHANGED
@@ -1,49 +1,49 @@
1
- export var fargeFjell = '#002776';
2
- export var fargeFjell70 = '#4d689f';
3
- export var fargeFjell30 = '#b3bed6';
4
- export var fargeVann = '#005aa4';
5
- export var fargeVann70 = '#4d8cbf';
6
- export var fargeVann30 = '#b3cee4';
7
- export var fargeSand = '#f8e9dd';
8
- export var fargeSand70 = '#faf0e7';
9
- export var fargeSand30 = '#fdf8f5';
10
- export var fargeFrost = '#7eb5d2';
11
- export var fargeFrost70 = '#a5cbe0';
12
- export var fargeFrost30 = '#d8e9f2';
13
- export var fargeSyrin = '#d3d3ea';
14
- export var fargeSyrin70 = '#e0e0f0';
15
- export var fargeSyrin30 = '#f2f2f9';
16
- export var fargeMyrull = '#fae4e0';
17
- export var fargeMyrull70 = '#fcece9';
18
- export var fargeMyrull30 = '#fef7f6';
19
- export var fargeVillblomst = '#ee8d9c';
20
- export var fargeVillblomst70 = '#f3afba';
21
- export var fargeVillblomst30 = '#fadde1';
22
- export var fargeNordlys = '#33af85';
23
- export var fargeNordlys70 = '#70c7aa';
24
- export var fargeNordlys30 = '#c2e7da';
25
- export var fargeLyng = '#873953';
26
- export var fargeLyng70 = '#ab7487';
27
- export var fargeLyng30 = '#dbc4cb';
28
- export var fargeBaer = '#db3335';
29
- export var fargeBaer70 = '#e67072';
30
- export var fargeBaer30 = '#f4c2c2';
31
- export var fargeSkog = '#00754e';
32
- export var fargeSkog70 = '#4d9e83';
33
- export var fargeSkog30 = '#b3d6ca';
34
- export var fargeMulte = '#f8b181';
35
- export var fargeMulte70 = '#fac8a7';
36
- export var fargeMulte30 = '#fde8d9';
37
- export var fargeSol = '#dc8000';
38
- export var fargeSol70 = '#e7a64d';
39
- export var fargeSol30 = '#f5d9b3';
40
- export var fargeNatt = '#001032';
41
- export var fargeSvart = '#020a0a';
42
- export var fargeKoksgraa = '#323232';
43
- export var fargeMoerkgraa = '#676767';
44
- export var fargeGraa = '#adadad';
45
- export var fargeLysgraa = '#d8d8d8';
46
- export var fargeMoerkvarmgraa = '#848383';
47
- export var fargeVarmgraa = '#9b9797';
48
- export var fargeLysvarmgraa = '#d7d2cb';
49
- export var fargeHvit = '#fff';
1
+ export const fargeFjell = '#002776';
2
+ export const fargeFjell70 = '#4d689f';
3
+ export const fargeFjell30 = '#b3bed6';
4
+ export const fargeVann = '#005aa4';
5
+ export const fargeVann70 = '#4d8cbf';
6
+ export const fargeVann30 = '#b3cee4';
7
+ export const fargeSand = '#f8e9dd';
8
+ export const fargeSand70 = '#faf0e7';
9
+ export const fargeSand30 = '#fdf8f5';
10
+ export const fargeFrost = '#7eb5d2';
11
+ export const fargeFrost70 = '#a5cbe0';
12
+ export const fargeFrost30 = '#d8e9f2';
13
+ export const fargeSyrin = '#d3d3ea';
14
+ export const fargeSyrin70 = '#e0e0f0';
15
+ export const fargeSyrin30 = '#f2f2f9';
16
+ export const fargeMyrull = '#fae4e0';
17
+ export const fargeMyrull70 = '#fcece9';
18
+ export const fargeMyrull30 = '#fef7f6';
19
+ export const fargeVillblomst = '#ee8d9c';
20
+ export const fargeVillblomst70 = '#f3afba';
21
+ export const fargeVillblomst30 = '#fadde1';
22
+ export const fargeNordlys = '#33af85';
23
+ export const fargeNordlys70 = '#70c7aa';
24
+ export const fargeNordlys30 = '#c2e7da';
25
+ export const fargeLyng = '#873953';
26
+ export const fargeLyng70 = '#ab7487';
27
+ export const fargeLyng30 = '#dbc4cb';
28
+ export const fargeBaer = '#db3335';
29
+ export const fargeBaer70 = '#e67072';
30
+ export const fargeBaer30 = '#f4c2c2';
31
+ export const fargeSkog = '#00754e';
32
+ export const fargeSkog70 = '#4d9e83';
33
+ export const fargeSkog30 = '#b3d6ca';
34
+ export const fargeMulte = '#f8b181';
35
+ export const fargeMulte70 = '#fac8a7';
36
+ export const fargeMulte30 = '#fde8d9';
37
+ export const fargeSol = '#dc8000';
38
+ export const fargeSol70 = '#e7a64d';
39
+ export const fargeSol30 = '#f5d9b3';
40
+ export const fargeNatt = '#001032';
41
+ export const fargeSvart = '#020a0a';
42
+ export const fargeKoksgraa = '#323232';
43
+ export const fargeMoerkgraa = '#676767';
44
+ export const fargeGraa = '#adadad';
45
+ export const fargeLysgraa = '#d8d8d8';
46
+ export const fargeMoerkvarmgraa = '#848383';
47
+ export const fargeVarmgraa = '#9b9797';
48
+ export const fargeLysvarmgraa = '#d7d2cb';
49
+ export const fargeHvit = '#fff';
package/es/dimensions.js CHANGED
@@ -1,3 +1,3 @@
1
- export var appWidth = '1280px';
2
- export var appWidthMin = '320px';
3
- export var appMargin = '20px';
1
+ export const appWidth = '1280px';
2
+ export const appWidthMin = '320px';
3
+ export const appMargin = '20px';
package/es/motion.js CHANGED
@@ -1,3 +1,3 @@
1
- export var easeInOutBack = 'cubic-bezier(0.46, -0.265, 0.48, 1.38)';
2
- export var ease = 'cubic-bezier(0.25, 0.1, 0.25, 1)';
3
- export var transitionDuration = '0.2s';
1
+ export const easeInOutBack = 'cubic-bezier(0.46, -0.265, 0.48, 1.38)';
2
+ export const ease = 'cubic-bezier(0.25, 0.1, 0.25, 1)';
3
+ export const transitionDuration = '0.2s';
package/es/spacing.js CHANGED
@@ -1,11 +1,11 @@
1
- export var spacing = '8px';
2
- export var spacing2xs = '4px';
3
- export var spacingXs = '8px';
4
- export var spacingSm = '16px';
5
- export var spacingMd = '24px';
6
- export var spacingLg = '32px';
7
- export var spacingXl = '40px';
8
- export var spacing2xl = '48px';
9
- export var spacing3xl = '64px';
10
- export var spacing4xl = '80px';
11
- export var spacing5xl = '160px';
1
+ export const spacing = '8px';
2
+ export const spacing2xs = '4px';
3
+ export const spacingXs = '8px';
4
+ export const spacingSm = '16px';
5
+ export const spacingMd = '24px';
6
+ export const spacingLg = '32px';
7
+ export const spacingXl = '40px';
8
+ export const spacing2xl = '48px';
9
+ export const spacing3xl = '64px';
10
+ export const spacing4xl = '80px';
11
+ export const spacing5xl = '160px';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-core",
3
- "version": "100.12.4",
3
+ "version": "101.0.1",
4
4
  "description": "Rammeverk for Felles Front End",
5
5
  "license": "MIT",
6
6
  "author": "SpareBank 1",
@@ -37,13 +37,13 @@
37
37
  "build-colors": "./scripts/build-colors.cjs"
38
38
  },
39
39
  "devDependencies": {
40
- "@sb1/ffe-buildtool": "^100.12.4",
41
- "case": "^1.5.5",
42
- "less": "^4.1.2",
43
- "postcss": "^8.3.6"
40
+ "@sb1/ffe-buildtool": "^101.0.1",
41
+ "case": "^1.6.3",
42
+ "less": "^4.6.4",
43
+ "postcss": "^8.5.8"
44
44
  },
45
45
  "publishConfig": {
46
46
  "access": "public"
47
47
  },
48
- "gitHead": "499c82bdc3f2680cf36cfd7cb77c550c623951f7"
48
+ "gitHead": "2f1f2f2f93e52a5fc5429cbe29538f6016702cf3"
49
49
  }
@@ -83,16 +83,16 @@ describe('parseColor', () => {
83
83
  });
84
84
 
85
85
  it('handles invalid hex values', () => {
86
- expect(() => parseColor('#')).toThrowError('Invalid color format');
87
- expect(() => parseColor('#0')).toThrowError('Invalid color format');
88
- expect(() => parseColor('#00')).toThrowError('Invalid color format');
89
- expect(() => parseColor('#0000000')).toThrowError(
86
+ expect(() => parseColor('#')).toThrow('Invalid color format');
87
+ expect(() => parseColor('#0')).toThrow('Invalid color format');
88
+ expect(() => parseColor('#00')).toThrow('Invalid color format');
89
+ expect(() => parseColor('#0000000')).toThrow(
90
90
  'Invalid color format',
91
91
  );
92
- expect(() => parseColor('#000000000')).toThrowError(
92
+ expect(() => parseColor('#000000000')).toThrow(
93
93
  'Invalid color format',
94
94
  );
95
- expect(() => parseColor('#hhh')).toThrowError('Invalid color format');
95
+ expect(() => parseColor('#hhh')).toThrow('Invalid color format');
96
96
  });
97
97
  });
98
98
 
@@ -112,7 +112,7 @@ describe('readJsonFiles', () => {
112
112
  'tokens/collection1.mode1.2.json',
113
113
  'tokens/collection1.mode1.3.json',
114
114
  ]);
115
- }).toThrowError(
115
+ }).toThrow(
116
116
  'Duplicate collection and mode in file: tokens/collection1.mode1.2.json',
117
117
  );
118
118
  });
@@ -124,7 +124,7 @@ describe('readJsonFiles', () => {
124
124
  'tokens/collection2.mode1.json',
125
125
  'foo.json',
126
126
  ]);
127
- }).toThrowError(
127
+ }).toThrow(
128
128
  'Invalid tokens file name: foo.json. File names must be in the format: {collectionName}.{modeName}.json',
129
129
  );
130
130
  });
@@ -141,7 +141,7 @@ describe('readJsonFiles', () => {
141
141
  it('handles empty files', () => {
142
142
  expect(() => {
143
143
  readJsonFiles(['empty_file.mode1.json']);
144
- }).toThrowError(
144
+ }).toThrow(
145
145
  'Invalid tokens file: empty_file.mode1.json. File is empty.',
146
146
  );
147
147
  });
@@ -907,7 +907,7 @@ describe('generatePostVariablesPayload', () => {
907
907
 
908
908
  expect(() => {
909
909
  generatePostVariablesPayload(tokensByFile, localVariablesResponse);
910
- }).toThrowError(
910
+ }).toThrow(
911
911
  `Cannot update remote variable "var1" in collection "collection"`,
912
912
  );
913
913
  });
@@ -1039,7 +1039,7 @@ describe('generatePostVariablesPayload', () => {
1039
1039
 
1040
1040
  expect(() => {
1041
1041
  generatePostVariablesPayload(tokensByFile, localVariablesResponse);
1042
- }).toThrowError('Invalid token $type: fontWeight');
1042
+ }).toThrow('Invalid token $type: fontWeight');
1043
1043
  });
1044
1044
 
1045
1045
  it('throws on duplicate variable collections in the Figma file', () => {
@@ -1092,6 +1092,6 @@ describe('generatePostVariablesPayload', () => {
1092
1092
 
1093
1093
  expect(() => {
1094
1094
  generatePostVariablesPayload(tokensByFile, localVariablesResponse);
1095
- }).toThrowError('Duplicate variable collection in file: collection');
1095
+ }).toThrow('Duplicate variable collection in file: collection');
1096
1096
  });
1097
1097
  });
@@ -166,7 +166,7 @@ function variableValueFromToken(
166
166
  }
167
167
 
168
168
  function compareVariableValues(a: VariableValue, b: VariableValue) {
169
- if (typeof a === 'object' && typeof b === 'object') {
169
+ if (a !== null && b !== null && typeof a === 'object' && typeof b === 'object') {
170
170
  if (
171
171
  'type' in a &&
172
172
  'type' in b &&