@bbl-digital/snorre 3.1.38 → 4.0.0-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. package/dist/bundle.js +5228 -5312
  2. package/esm/app-shell/index.js +19 -9
  3. package/esm/app-shell/theme.js +2 -60
  4. package/esm/core/Alert/index.js +0 -2
  5. package/esm/core/Box/styles.js +7 -7
  6. package/esm/core/Card/index.js +2 -6
  7. package/esm/core/Card/styles.js +11 -19
  8. package/esm/core/Datepicker/styles.js +9 -9
  9. package/esm/core/SearchFilter/index.js +6 -15
  10. package/esm/core/SearchFilter/styles.js +24 -34
  11. package/esm/core/Timepicker/index.js +5 -4
  12. package/esm/index.d.js +2 -0
  13. package/esm/index.js +11 -12
  14. package/esm/layout/Menu/MenuBottom/index.js +37 -0
  15. package/esm/layout/Menu/MenuBottom/styles.js +15 -0
  16. package/esm/layout/Menu/MenuItem/index.js +1 -1
  17. package/esm/layout/Menu/MenuItem/styles.js +2 -2
  18. package/esm/layout/Menu/SecondaryMenuItem/index.js +1 -1
  19. package/esm/layout/Menu/styles.js +1 -1
  20. package/esm/layout/Submenu/styles.js +14 -14
  21. package/esm/utils/format.js +2 -10
  22. package/esm/utils/time.js +0 -17
  23. package/esm/utils/useSnorreTheme.js +33 -0
  24. package/lib/app-shell/index.d.ts +1 -1
  25. package/lib/app-shell/index.d.ts.map +1 -1
  26. package/lib/app-shell/index.js +19 -9
  27. package/lib/app-shell/theme.d.ts +33 -64
  28. package/lib/app-shell/theme.d.ts.map +1 -1
  29. package/lib/app-shell/theme.js +2 -60
  30. package/lib/core/Alert/index.d.ts +0 -2
  31. package/lib/core/Alert/index.d.ts.map +1 -1
  32. package/lib/core/Alert/index.js +0 -2
  33. package/lib/core/Box/styles.js +7 -7
  34. package/lib/core/Card/index.d.ts +0 -2
  35. package/lib/core/Card/index.d.ts.map +1 -1
  36. package/lib/core/Card/index.js +2 -6
  37. package/lib/core/Card/styles.d.ts +1 -1
  38. package/lib/core/Card/styles.d.ts.map +1 -1
  39. package/lib/core/Card/styles.js +11 -19
  40. package/lib/core/Datepicker/styles.d.ts.map +1 -1
  41. package/lib/core/Datepicker/styles.js +9 -9
  42. package/lib/core/Datepicker/yearMonthForm.d.ts.map +1 -1
  43. package/lib/core/Input/index.d.ts +4 -4
  44. package/lib/core/Input/index.d.ts.map +1 -1
  45. package/lib/core/SearchFilter/index.d.ts +0 -7
  46. package/lib/core/SearchFilter/index.d.ts.map +1 -1
  47. package/lib/core/SearchFilter/index.js +6 -15
  48. package/lib/core/SearchFilter/styles.d.ts +1 -4
  49. package/lib/core/SearchFilter/styles.d.ts.map +1 -1
  50. package/lib/core/SearchFilter/styles.js +24 -34
  51. package/lib/core/Timepicker/index.d.ts +1 -1
  52. package/lib/core/Timepicker/index.d.ts.map +1 -1
  53. package/lib/core/Timepicker/index.js +5 -4
  54. package/lib/index.d.js +2 -0
  55. package/lib/index.d.ts +11 -12
  56. package/lib/index.d.ts.map +1 -1
  57. package/lib/index.js +11 -12
  58. package/lib/layout/Menu/MenuBottom/index.d.ts +14 -0
  59. package/lib/layout/Menu/MenuBottom/index.d.ts.map +1 -0
  60. package/lib/layout/Menu/MenuBottom/index.js +37 -0
  61. package/lib/layout/Menu/MenuBottom/styles.d.ts +4 -0
  62. package/lib/layout/Menu/MenuBottom/styles.d.ts.map +1 -0
  63. package/lib/layout/Menu/MenuBottom/styles.js +15 -0
  64. package/lib/layout/Menu/MenuItem/index.d.ts.map +1 -1
  65. package/lib/layout/Menu/MenuItem/index.js +1 -1
  66. package/lib/layout/Menu/MenuItem/styles.d.ts.map +1 -1
  67. package/lib/layout/Menu/MenuItem/styles.js +2 -2
  68. package/lib/layout/Menu/SecondaryMenuItem/index.d.ts.map +1 -1
  69. package/lib/layout/Menu/SecondaryMenuItem/index.js +1 -1
  70. package/lib/layout/Menu/styles.d.ts.map +1 -1
  71. package/lib/layout/Menu/styles.js +1 -1
  72. package/lib/layout/Submenu/styles.d.ts.map +1 -1
  73. package/lib/layout/Submenu/styles.js +14 -14
  74. package/lib/utils/format.d.ts +1 -2
  75. package/lib/utils/format.d.ts.map +1 -1
  76. package/lib/utils/format.js +2 -10
  77. package/lib/utils/time.d.ts +0 -5
  78. package/lib/utils/time.d.ts.map +1 -1
  79. package/lib/utils/time.js +0 -17
  80. package/lib/utils/useSnorreTheme.d.ts +11 -0
  81. package/lib/utils/useSnorreTheme.d.ts.map +1 -0
  82. package/lib/utils/useSnorreTheme.js +33 -0
  83. package/package.json +1 -1
  84. package/theme-bbls.js +412 -0
  85. package/theme-generator.js +299 -489
  86. package/theme-helpers.js +62 -0
  87. package/esm/enums/ModifierKey.js +0 -13
  88. package/lib/enums/ModifierKey.d.ts +0 -12
  89. package/lib/enums/ModifierKey.d.ts.map +0 -1
  90. package/lib/enums/ModifierKey.js +0 -13
@@ -1,19 +1,55 @@
1
1
  const fs = require('fs')
2
+ const bbls = require('./theme-bbls.js')
3
+ const {
4
+ shadeColor,
5
+ hexToRGBA,
6
+ getContrastYIQ,
7
+ hexifyWithWhiteBackground,
8
+ } = require('./theme-helpers.js')
2
9
 
3
10
  const initTheme = (
4
11
  primary,
5
12
  secondary,
6
13
  bgalpha,
7
- secondaryFooter = false,
8
- sidemenuColor,
9
- sidemenuItemColor,
14
+ customBgColor,
15
+ customPortalFooterColor,
16
+ customFooter,
17
+ defaultMenuBackground,
18
+ defaultMenuTextColor,
19
+ defaultMenuItemBackground,
20
+ defaultMenuItemActiveTextColor,
21
+ defaultMenuItemActiveBackground,
22
+ defaultMenuItemIconColor,
23
+ defaultMenuExternalLinkColor,
24
+ lightMenuBackground,
25
+ lightMenuTextColor,
26
+ lightMenuItemTextColor,
27
+ lightMenuItemBackground,
28
+ lightMenuItemActiveTextColor,
29
+ lightMenuItemActiveBackground,
30
+ lightMenuItemIconColor,
31
+ lightMenuExternalLinkColor,
10
32
  submenuColor,
11
33
  submenuItemColor,
12
34
  submenuTextColor,
13
35
  submenuTextColorActive,
14
- customBgColor,
15
- customPortalFooterColor,
16
- customFooter
36
+ defaultAppPickerBackground,
37
+ defaultAppPickerIconColor,
38
+ defaultAppPickerIconBackgroundColor,
39
+ defaultAppPickerActiveTextColor,
40
+ defaultAppPickerActiveBackground,
41
+ defaultAppPickerActiveIconColor,
42
+ defaultAppPickerActiveIconBackgroundColor,
43
+ lightAppPickerBackground,
44
+ lightAppPickerIconColor,
45
+ lightAppPickerIconBackground,
46
+ lightAppPickerActiveTextColor,
47
+ lightAppPickerActiveBackground,
48
+ lightAppPickerActiveIconColor,
49
+ lightAppPickerActiveIconBackground,
50
+ mypageBoxBorderRadius,
51
+ preemptionCardBorderRadius,
52
+ secondaryFooter = false
17
53
  ) => {
18
54
  const styles = {
19
55
  primary: primary,
@@ -27,6 +63,9 @@ const initTheme = (
27
63
  defaultText: '#000',
28
64
  subtleText: hexToRGBA('#000000', 0.7),
29
65
  secondaryDarkText: shadeColor(secondary, -80),
66
+ /**
67
+ * Backgrounds
68
+ */
30
69
  bgDark: '#10105A',
31
70
  bgMedium: '#CFD9EA',
32
71
  bgLight: '#EEF4FB',
@@ -35,6 +74,9 @@ const initTheme = (
35
74
  : secondaryFooter
36
75
  ? shadeColor(secondary, -50)
37
76
  : shadeColor(primary, -50),
77
+ /**
78
+ * Buttons
79
+ */
38
80
  btnDefault: secondary,
39
81
  btnDefaultFontColor: getContrastYIQ(secondary),
40
82
  btnDefaultDarker: shadeColor(secondary, -15),
@@ -47,6 +89,9 @@ const initTheme = (
47
89
  btnDangerLighter: '#FF2740',
48
90
  btnDisabled: '#D7D7D7',
49
91
  btnHoverTextColor: getContrastYIQ(shadeColor(secondary, -15)),
92
+ /**
93
+ * Colors
94
+ */
50
95
  alert: '#EB011A',
51
96
  alertLight: '#FCD6DA',
52
97
  alertBorder: 'rgba(235,1,26,0.25)',
@@ -62,20 +107,114 @@ const initTheme = (
62
107
  gray10: '#BDBDBD',
63
108
  gray20: '#efefef',
64
109
  disabled: '#D7D7D7',
110
+ /**
111
+ * Shadows
112
+ */
65
113
  shadowSmall: '0px 2px 4px 0px rgba(0, 0, 0, 0.1)',
66
114
  shadowBig: '0px 10px 15px 0px rgba(0, 0, 0, 0.1)',
115
+ /**
116
+ * Illustrations
117
+ */
67
118
  illustrationGray: '#C3D0D8',
68
119
  illustrationPrimary50: hexifyWithWhiteBackground(hexToRGBA(primary, 0.5)),
69
120
  illustrationPrimary40: hexifyWithWhiteBackground(hexToRGBA(primary, 0.4)),
70
121
  illustrationPrimary20: hexifyWithWhiteBackground(hexToRGBA(primary, 0.2)),
71
122
  illustrationPrimary10: hexifyWithWhiteBackground(hexToRGBA(primary, 0.1)),
72
123
  illustrationPrimary5: hexifyWithWhiteBackground(hexToRGBA(primary, 0.08)),
73
- sidemenuColor: sidemenuColor
74
- ? sidemenuColor
124
+
125
+ /**
126
+ * App picker - Default
127
+ */
128
+ defaultAppPickerBackground: defaultAppPickerBackground
129
+ ? defaultAppPickerBackground
130
+ : hexToRGBA('#ffffff', 0.3),
131
+ defaultAppPickerIconColor: defaultAppPickerIconColor
132
+ ? defaultAppPickerIconColor
133
+ : hexifyWithWhiteBackground(hexToRGBA(primary, 0.5)),
134
+ defaultAppPickerIconBackgroundColor: defaultAppPickerIconBackgroundColor
135
+ ? defaultAppPickerIconBackgroundColor
136
+ : hexifyWithWhiteBackground(hexToRGBA(primary, 0.1)),
137
+ defaultAppPickerActiveTextColor: defaultAppPickerActiveTextColor
138
+ ? defaultAppPickerActiveTextColor
139
+ : '#ffffff',
140
+ defaultAppPickerActiveBackground: defaultAppPickerActiveBackground
141
+ ? defaultAppPickerActiveBackground
142
+ : '#ffffff',
143
+ defaultAppPickerActiveIconColor: defaultAppPickerActiveIconColor
144
+ ? defaultAppPickerActiveIconColor
145
+ : '#000000',
146
+ defaultAppPickerActiveIconBackgroundColor:
147
+ defaultAppPickerActiveIconBackgroundColor
148
+ ? defaultAppPickerActiveIconBackgroundColor
149
+ : '#ffffff',
150
+
151
+ /**
152
+ * App picker - Light
153
+ */
154
+ lightAppPickerBackground: lightAppPickerBackground
155
+ ? lightAppPickerBackground
156
+ : hexifyWithWhiteBackground(hexToRGBA(primary, 0.1)),
157
+ lightAppPickerIconColor: lightAppPickerIconColor
158
+ ? lightAppPickerIconColor
159
+ : hexifyWithWhiteBackground(hexToRGBA(primary, 0.5)),
160
+ lightAppPickerIconBackground: lightAppPickerIconBackground
161
+ ? lightAppPickerIconBackground
162
+ : hexifyWithWhiteBackground('rgba(255, 255, 255, 0.7)'),
163
+ lightAppPickerActiveTextColor: lightAppPickerActiveTextColor
164
+ ? lightAppPickerActiveTextColor
165
+ : 'black',
166
+ lightAppPickerActiveBackground: lightAppPickerActiveBackground
167
+ ? lightAppPickerActiveBackground
168
+ : hexifyWithWhiteBackground(hexToRGBA(primary, 0.1)),
169
+ lightAppPickerActiveIconColor: lightAppPickerActiveIconColor
170
+ ? lightAppPickerActiveIconColor
171
+ : '#000000',
172
+ lightAppPickerActiveIconBackground: lightAppPickerActiveIconBackground
173
+ ? lightAppPickerActiveIconBackground
174
+ : '#ffffff',
175
+
176
+ /**
177
+ * Sidemenu - Default
178
+ */
179
+ defaultMenuBackground: defaultMenuBackground
180
+ ? defaultMenuBackground
75
181
  : `linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), linear-gradient(${primary}, ${primary})`,
76
- sidemenuItemColor: sidemenuItemColor
77
- ? sidemenuItemColor
182
+ defaultMenuTextColor: defaultMenuTextColor || '#ffffff',
183
+ defaultMenuItemBackground: defaultMenuItemBackground || '#ffffff',
184
+ defaultMenuItemActiveTextColor: defaultMenuItemActiveTextColor || '#ffffff',
185
+ defaultMenuItemActiveBackground: defaultMenuItemActiveBackground
186
+ ? defaultMenuItemActiveBackground
78
187
  : `linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), linear-gradient(${primary}, ${primary})`,
188
+ defaultMenuItemIconColor: defaultMenuItemIconColor || '#ffffff',
189
+ defaultMenuExternalLinkColor: defaultMenuExternalLinkColor || '#ffffff',
190
+
191
+ /**
192
+ * Sidemenu - Light
193
+ */
194
+ lightMenuBackground: lightMenuBackground ? lightMenuBackground : 'white',
195
+ lightMenuTextColor: lightMenuTextColor ? lightMenuTextColor : 'black',
196
+ lightMenuItemTextColor: lightMenuItemTextColor
197
+ ? lightMenuItemTextColor
198
+ : 'black',
199
+ lightMenuItemBackground: lightMenuItemBackground
200
+ ? lightMenuItemBackground
201
+ : 'black',
202
+ lightMenuItemActiveTextColor: lightMenuItemActiveTextColor
203
+ ? lightMenuItemActiveTextColor
204
+ : 'black',
205
+ lightMenuItemActiveBackground: lightMenuItemActiveBackground
206
+ ? lightMenuItemActiveBackground
207
+ : hexifyWithWhiteBackground(hexToRGBA(primary, 0.1)),
208
+ lightMenuItemIconColor: lightMenuItemIconColor
209
+ ? lightMenuItemIconColor
210
+ : primary,
211
+ lightMenuExternalLinkColor: lightMenuExternalLinkColor
212
+ ? lightMenuExternalLinkColor
213
+ : primary,
214
+
215
+ /**
216
+ * Submenu
217
+ */
79
218
  submenuColor: submenuColor
80
219
  ? submenuColor
81
220
  : `linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), linear-gradient(${primary}, ${primary})`,
@@ -89,85 +228,68 @@ const initTheme = (
89
228
  ? submenuTextColorActive
90
229
  : `#ffffff`,
91
230
  customPortalFooterColor: customPortalFooterColor,
231
+
232
+ /**
233
+ * Boxes
234
+ */
235
+ mypageBoxBorderRadius: mypageBoxBorderRadius
236
+ ? mypageBoxBorderRadius
237
+ : '16px',
238
+ preemptionCardBorderRadius: preemptionCardBorderRadius
239
+ ? preemptionCardBorderRadius
240
+ : '30px',
92
241
  }
93
242
  return styles
94
243
  }
95
244
 
96
- // Helpers
97
- const hexToRGBA = (hex, alpha) => {
98
- var r = parseInt(hex.slice(1, 3), 16),
99
- g = parseInt(hex.slice(3, 5), 16),
100
- b = parseInt(hex.slice(5, 7), 16)
101
-
102
- return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')'
103
- }
104
-
105
- function hexifyWithWhiteBackground(color) {
106
- var values = color
107
- .replace(/rgba?\(/, '')
108
- .replace(/\)/, '')
109
- .replace(/[\s+]/g, '')
110
- .split(',')
111
- var a = parseFloat(values[3] || 1),
112
- r = Math.floor(a * parseInt(values[0]) + (1 - a) * 255),
113
- g = Math.floor(a * parseInt(values[1]) + (1 - a) * 255),
114
- b = Math.floor(a * parseInt(values[2]) + (1 - a) * 255)
115
- return (
116
- '#' +
117
- ('0' + r.toString(16)).slice(-2) +
118
- ('0' + g.toString(16)).slice(-2) +
119
- ('0' + b.toString(16)).slice(-2)
120
- )
121
- }
122
-
123
- const shadeColor = (color, percent) => {
124
- var R = parseInt(color.substring(1, 3), 16)
125
- var G = parseInt(color.substring(3, 5), 16)
126
- var B = parseInt(color.substring(5, 7), 16)
127
-
128
- R = parseInt('' + (R * (100 + percent)) / 100)
129
- G = parseInt('' + (G * (100 + percent)) / 100)
130
- B = parseInt('' + (B * (100 + percent)) / 100)
131
-
132
- R = R < 255 ? R : 255
133
- G = G < 255 ? G : 255
134
- B = B < 255 ? B : 255
135
-
136
- var RR = R.toString(16).length === 1 ? '0' + R.toString(16) : R.toString(16)
137
- var GG = G.toString(16).length === 1 ? '0' + G.toString(16) : G.toString(16)
138
- var BB = B.toString(16).length === 1 ? '0' + B.toString(16) : B.toString(16)
139
-
140
- return '#' + RR + GG + BB
141
- }
142
-
143
- const getContrastYIQ = (hexcolor) => {
144
- hexcolor = hexcolor.replace('#', '')
145
- var r = parseInt(hexcolor.substr(0, 2), 16)
146
- var g = parseInt(hexcolor.substr(2, 2), 16)
147
- var b = parseInt(hexcolor.substr(4, 2), 16)
148
- var yiq = (r * 299 + g * 587 + b * 114) / 1000
149
- return yiq >= 128 ? 'black' : 'white'
150
- }
151
-
152
245
  const updateTheme = (bbl) => {
153
246
  if (bbl) {
154
247
  const b = bbls.find((x) => x.bbl === bbl)
155
- console.log(b)
248
+
156
249
  updateBbl(
157
250
  b.bbl,
158
251
  b.theme.primary,
159
252
  b.theme.secondary,
160
253
  b.theme.alpha,
161
- b.theme.secondaryFooter,
162
- b.theme.sidemenuColor,
163
- b.theme.sidemenuItemColor,
254
+ b.theme.customBgColor,
255
+ b.theme.customPortalFooterColor,
256
+ b.theme.customFooter,
257
+ b.theme.defaultMenuBackground,
258
+ b.theme.defaultMenuTextColor,
259
+ b.theme.defaultMenuItemBackground,
260
+ b.theme.defaultMenuItemActiveTextColor,
261
+ b.theme.defaultMenuItemActiveBackground,
262
+ b.theme.defaultMenuItemIconColor,
263
+ b.theme.defaultMenuExternalLinkColor,
264
+ b.theme.lightMenuBackground,
265
+ b.theme.lightMenuTextColor,
266
+ b.theme.lightMenuItemTextColor,
267
+ b.theme.lightMenuItemBackground,
268
+ b.theme.lightMenuItemActiveTextColor,
269
+ b.theme.lightMenuItemActiveBackground,
270
+ b.theme.lightMenuItemIconColor,
271
+ b.theme.lightMenuExternalLinkColor,
164
272
  b.theme.submenuColor,
165
273
  b.theme.submenuItemColor,
166
274
  b.theme.submenuTextColor,
167
275
  b.theme.submenuTextColorActive,
168
- b.theme.customBgColor,
169
- b.theme.customPortalFooterColor,
170
- b.theme.customFooter
276
+ b.theme.defaultAppPickerBackground,
277
+ b.theme.defaultAppPickerIconColor,
278
+ b.theme.defaultAppPickerIconBackgroundColor,
279
+ b.theme.defaultAppPickerActiveTextColor,
280
+ b.theme.defaultAppPickerActiveBackground,
281
+ b.theme.defaultAppPickerActiveIconColor,
282
+ b.theme.defaultAppPickerActiveIconBackgroundColor,
283
+ b.theme.lightAppPickerBackground,
284
+ b.theme.lightAppPickerIconColor,
285
+ b.theme.lightAppPickerIconBackground,
286
+ b.theme.lightAppPickerActiveTextColor,
287
+ b.theme.lightAppPickerActiveBackground,
288
+ b.theme.lightAppPickerActiveIconColor,
289
+ b.theme.lightAppPickerActiveIconBackground,
290
+ b.theme.mypageBoxBorderRadius,
291
+ b.theme.preemptionCardBorderRadius,
292
+ b.theme.secondaryFooter
171
293
  )
172
294
  } else {
173
295
  for (const b of bbls) {
@@ -176,16 +298,44 @@ const updateTheme = (bbl) => {
176
298
  b.theme.primary,
177
299
  b.theme.secondary,
178
300
  b.theme.alpha,
179
- b.theme.secondaryFooter,
180
- b.theme.sidemenuColor,
181
- b.theme.sidemenuItemColor,
301
+ b.theme.customBgColor,
302
+ b.theme.customPortalFooterColor,
303
+ b.theme.customFooter,
304
+ b.theme.defaultMenuBackground,
305
+ b.theme.defaultMenuTextColor,
306
+ b.theme.defaultMenuItemBackground,
307
+ b.theme.defaultMenuItemActiveTextColor,
308
+ b.theme.defaultMenuItemActiveBackground,
309
+ b.theme.defaultMenuItemIconColor,
310
+ b.theme.defaultMenuExternalLinkColor,
311
+ b.theme.lightMenuBackground,
312
+ b.theme.lightMenuTextColor,
313
+ b.theme.lightMenuItemTextColor,
314
+ b.theme.lightMenuItemBackground,
315
+ b.theme.lightMenuItemActiveTextColor,
316
+ b.theme.lightMenuItemActiveBackground,
317
+ b.theme.lightMenuItemIconColor,
318
+ b.theme.lightMenuExternalLinkColor,
182
319
  b.theme.submenuColor,
183
320
  b.theme.submenuItemColor,
184
321
  b.theme.submenuTextColor,
185
322
  b.theme.submenuTextColorActive,
186
- b.theme.customBgColor,
187
- b.theme.customPortalFooterColor,
188
- b.theme.customFooter
323
+ b.theme.defaultAppPickerBackground,
324
+ b.theme.defaultAppPickerIconColor,
325
+ b.theme.defaultAppPickerIconBackgroundColor,
326
+ b.theme.defaultAppPickerActiveTextColor,
327
+ b.theme.defaultAppPickerActiveBackground,
328
+ b.theme.defaultAppPickerActiveIconColor,
329
+ b.theme.defaultAppPickerActiveIconBackgroundColor,
330
+ b.theme.lightAppPickerBackground,
331
+ b.theme.lightAppPickerIconColor,
332
+ b.theme.lightAppPickerIconBackground,
333
+ b.theme.lightAppPickerActiveTextColor,
334
+ b.theme.lightAppPickerActiveBackground,
335
+ b.theme.lightAppPickerActiveIconColor,
336
+ b.theme.lightAppPickerActiveIconBackground,
337
+ b.theme.mypageBoxBorderRadius,
338
+ b.theme.preemptionCardBorderRadius
189
339
  )
190
340
  }
191
341
  }
@@ -196,32 +346,90 @@ const updateBbl = (
196
346
  primary,
197
347
  secondary,
198
348
  bgalpha,
199
- secondaryFooter = false,
200
- sidemenuColor,
201
- sidemenuItemColor,
349
+ customBgColor,
350
+ customPortalFooterColor,
351
+ customFooter,
352
+ defaultMenuBackground,
353
+ defaultMenuTextColor,
354
+ defaultMenuItemBackground,
355
+ defaultMenuItemActiveTextColor,
356
+ defaultMenuItemActiveBackground,
357
+ defaultMenuItemIconColor,
358
+ defaultMenuExternalLinkColor,
359
+ lightMenuBackground,
360
+ lightMenuTextColor,
361
+ lightMenuItemTextColor,
362
+ lightMenuItemBackground,
363
+ lightMenuItemActiveTextColor,
364
+ lightMenuItemActiveBackground,
365
+ lightMenuItemIconColor,
366
+ lightMenuExternalLinkColor,
202
367
  submenuColor,
203
368
  submenuItemColor,
204
369
  submenuTextColor,
205
370
  submenuTextColorActive,
206
- customBgColor,
207
- customPortalFooterColor,
208
- customFooter
371
+ defaultAppPickerBackground,
372
+ defaultAppPickerIconColor,
373
+ defaultAppPickerIconBackgroundColor,
374
+ defaultAppPickerActiveTextColor,
375
+ defaultAppPickerActiveBackground,
376
+ defaultAppPickerActiveIconColor,
377
+ defaultAppPickerActiveIconBackgroundColor,
378
+ lightAppPickerBackground,
379
+ lightAppPickerIconColor,
380
+ lightAppPickerIconBackground,
381
+ lightAppPickerActiveTextColor,
382
+ lightAppPickerActiveBackground,
383
+ lightAppPickerActiveIconColor,
384
+ lightAppPickerActiveIconBackground,
385
+ mypageBoxBorderRadius,
386
+ preemptionCardBorderRadius,
387
+ secondaryFooter = false
209
388
  ) => {
210
389
  let data = JSON.stringify(
211
390
  initTheme(
212
391
  primary,
213
392
  secondary,
214
393
  bgalpha,
215
- secondaryFooter,
216
- sidemenuColor,
217
- sidemenuItemColor,
394
+ customBgColor,
395
+ customPortalFooterColor,
396
+ customFooter,
397
+ defaultMenuBackground,
398
+ defaultMenuTextColor,
399
+ defaultMenuItemBackground,
400
+ defaultMenuItemActiveTextColor,
401
+ defaultMenuItemActiveBackground,
402
+ defaultMenuItemIconColor,
403
+ defaultMenuExternalLinkColor,
404
+ lightMenuBackground,
405
+ lightMenuTextColor,
406
+ lightMenuItemTextColor,
407
+ lightMenuItemBackground,
408
+ lightMenuItemActiveTextColor,
409
+ lightMenuItemActiveBackground,
410
+ lightMenuItemIconColor,
411
+ lightMenuExternalLinkColor,
218
412
  submenuColor,
219
413
  submenuItemColor,
220
414
  submenuTextColor,
221
415
  submenuTextColorActive,
222
- customBgColor,
223
- customPortalFooterColor,
224
- customFooter
416
+ defaultAppPickerBackground,
417
+ defaultAppPickerIconColor,
418
+ defaultAppPickerIconBackgroundColor,
419
+ defaultAppPickerActiveTextColor,
420
+ defaultAppPickerActiveBackground,
421
+ defaultAppPickerActiveIconColor,
422
+ defaultAppPickerActiveIconBackgroundColor,
423
+ lightAppPickerBackground,
424
+ lightAppPickerIconColor,
425
+ lightAppPickerIconBackground,
426
+ lightAppPickerActiveTextColor,
427
+ lightAppPickerActiveBackground,
428
+ lightAppPickerActiveIconColor,
429
+ lightAppPickerActiveIconBackground,
430
+ mypageBoxBorderRadius,
431
+ preemptionCardBorderRadius,
432
+ secondaryFooter
225
433
  ),
226
434
  null,
227
435
  2
@@ -230,404 +438,6 @@ const updateBbl = (
230
438
  fs.writeFileSync('themes/' + bbl + '/styles.json', data)
231
439
  }
232
440
 
233
- const bbls = [
234
- {
235
- bbl: 'arendal',
236
- theme: {
237
- primary: '#ED088A',
238
- secondary: '#22475F',
239
- alpha: '0.02',
240
- secondaryFooter: true,
241
- },
242
- },
243
- {
244
- bbl: 'kongsberg',
245
- theme: {
246
- primary: '#ED088A',
247
- secondary: '#22475F',
248
- alpha: '0.02',
249
- secondaryFooter: true,
250
- sidemenuColor: '#760445',
251
- submenuColor: '#A50660',
252
- submenuTextColor: 'rgba(255, 255, 255, 0.8)',
253
- },
254
- },
255
- {
256
- bbl: 'labo',
257
- theme: {
258
- primary: '#ED088A',
259
- secondary: '#22475F',
260
- alpha: '0.02',
261
- secondaryFooter: true,
262
- },
263
- },
264
- {
265
- bbl: 'mobo',
266
- theme: {
267
- primary: '#ED088A',
268
- secondary: '#22475F',
269
- alpha: '0.02',
270
- secondaryFooter: true,
271
- },
272
- },
273
- {
274
- bbl: 'moborana',
275
- theme: {
276
- primary: '#ED088A',
277
- secondary: '#22475F',
278
- alpha: '0.02',
279
- secondaryFooter: true,
280
- },
281
- },
282
- {
283
- bbl: 'mosjoen',
284
- theme: {
285
- primary: '#ED088A',
286
- secondary: '#22475F',
287
- alpha: '0.02',
288
- secondaryFooter: true,
289
- },
290
- },
291
- {
292
- bbl: 'notodden',
293
- theme: {
294
- primary: '#ED088A',
295
- secondary: '#22475F',
296
- alpha: '0.02',
297
- secondaryFooter: true,
298
- },
299
- },
300
- {
301
- bbl: 'polarlys',
302
- theme: {
303
- primary: '#ED088A',
304
- secondary: '#22475F',
305
- alpha: '0.02',
306
- secondaryFooter: true,
307
- },
308
- },
309
- {
310
- bbl: 'sunnbo',
311
- theme: {
312
- primary: '#0075B2',
313
- secondary: '#00527C',
314
- alpha: '0.02',
315
- },
316
- },
317
- {
318
- bbl: 'vansjobbl',
319
- theme: {
320
- primary: '#ED088A',
321
- secondary: '#22475F',
322
- alpha: '0.02',
323
- secondaryFooter: true,
324
- sidemenuColor: '#760445',
325
- submenuColor: '#A50660',
326
- submenuTextColor: 'rgba(255, 255, 255, 0.8)',
327
- },
328
- },
329
- {
330
- bbl: 'bori',
331
- theme: {
332
- primary: '#006930',
333
- secondary: '#7AB800',
334
- alpha: '0.02',
335
- },
336
- },
337
- {
338
- bbl: 'bbld',
339
- theme: {
340
- primary: '#1657E2',
341
- secondary: '#10105A',
342
- alpha: '0.02',
343
- },
344
- },
345
- {
346
- bbl: 'sobbl',
347
- theme: {
348
- primary: '#227F48',
349
- secondary: '#213228',
350
- alpha: '0.02',
351
- },
352
- },
353
- {
354
- bbl: 'kobbl',
355
- theme: {
356
- primary: '#A71930',
357
- secondary: '#B7C9D3',
358
- alpha: '0.02',
359
- secondaryFooter: true,
360
- },
361
- },
362
- {
363
- bbl: 'ringbo',
364
- theme: {
365
- primary: '#6585AF',
366
- secondary: '#E64596',
367
- alpha: '0.02',
368
- },
369
- },
370
- {
371
- bbl: 'abbl',
372
- theme: {
373
- primary: '#de6364',
374
- secondary: '#75b474',
375
- alpha: '0.02',
376
-
377
- secondaryFooter: true,
378
- sidemenuColor: '#004933',
379
- sidemenuItemColor: '#007f59',
380
- submenuColor: '#F5F2EB',
381
- submenuItemColor: '#75b474',
382
- submenuTextColor: 'rgba(0, 0, 0, 0.7)',
383
- submenuTextColorActive: 'black',
384
- customBgColor: '#FCFBF8',
385
- },
386
- },
387
- {
388
- bbl: 'bob',
389
- theme: {
390
- primary: '#582484',
391
- secondary: '#C5E6EF',
392
- alpha: '0.02',
393
- },
394
- },
395
- {
396
- bbl: 'tobb',
397
- theme: {
398
- primary: '#477A7B',
399
- secondary: '#003865',
400
- alpha: '0.04',
401
- },
402
- },
403
- {
404
- bbl: 'bomidt',
405
- theme: {
406
- primary: '#1897B7',
407
- secondary: '#4F67AB',
408
- alpha: '0.04',
409
- },
410
- },
411
- {
412
- bbl: 'bori',
413
- theme: {
414
- primary: '#006930',
415
- secondary: '#7AB800',
416
- alpha: '0.02',
417
- },
418
- },
419
- {
420
- bbl: 'gobb',
421
- theme: {
422
- primary: '#661B39',
423
- secondary: '#273D45',
424
- alpha: '0.04',
425
- },
426
- },
427
- {
428
- bbl: 'sorbbl',
429
- theme: {
430
- primary: '#006ED2',
431
- secondary: '#001A41',
432
- alpha: '0.04',
433
- },
434
- },
435
- {
436
- bbl: 'sbbl',
437
- theme: {
438
- primary: '#006ED2',
439
- secondary: '#001A41',
440
- alpha: '0.04',
441
- },
442
- },
443
- {
444
- bbl: 'sobo',
445
- theme: {
446
- primary: '#006ED2',
447
- secondary: '#001A41',
448
- alpha: '0.04',
449
- },
450
- },
451
- {
452
- bbl: 'bate',
453
- theme: {
454
- primary: '#D31F2C',
455
- secondary: '#1D1D1B',
456
- alpha: '0.02',
457
- secondaryFooter: true,
458
- },
459
- },
460
- {
461
- bbl: 'nbbo',
462
- theme: {
463
- primary: '#009199',
464
- secondary: '#812979',
465
- alpha: '0.02',
466
- secondaryFooter: true,
467
- },
468
- },
469
- {
470
- bbl: 'haubo',
471
- theme: {
472
- primary: '#D12725',
473
- secondary: '#1C1C1C',
474
- alpha: '0.04',
475
- secondaryFooter: true,
476
- },
477
- },
478
- {
479
- bbl: 'obf',
480
- theme: {
481
- primary: '#297154',
482
- secondary: '#F9F1DF',
483
- customBgColor: '#F8F8F8',
484
- alpha: '0.04',
485
- sidemenuColor: '#14382A',
486
- sidemenuItemColor: '#184432',
487
- submenuColor: '#194432',
488
- customPortalFooterColor: 'rgb(20, 56, 42)',
489
- customFooter: '#297154',
490
- },
491
- },
492
- {
493
- bbl: 'rtbbl',
494
- theme: {
495
- primary: '#AA96ED',
496
- secondary: '#22475F',
497
- alpha: '0.02',
498
- secondaryFooter: true,
499
- },
500
- },
501
- {
502
- bbl: 'rjukantinn',
503
- theme: {
504
- primary: '#AA96ED',
505
- secondary: '#22475F',
506
- alpha: '0.02',
507
- secondaryFooter: true,
508
- },
509
- },
510
- {
511
- bbl: 'pbbl',
512
- theme: {
513
- primary: '#0088B8',
514
- secondary: '#ED088A',
515
- alpha: '0.02',
516
- },
517
- },
518
- {
519
- bbl: 'usbl',
520
- theme: {
521
- primary: '#FA8268',
522
- secondary: '#D24448',
523
- alpha: '0.04',
524
- secondaryFooter: true,
525
- sidemenuColor: '#D04547',
526
- sidemenuItemColor: '#A73A37',
527
- submenuColor: '#F5F2EB',
528
- submenuItemColor: 'white',
529
- submenuTextColor: 'rgba(0, 0, 0, 0.7)',
530
- submenuTextColorActive: 'black',
531
- customBgColor: '#FCFBF8',
532
- customPortalFooterColor: '#343E40',
533
- },
534
- },
535
- {
536
- bbl: 'bodo',
537
- theme: {
538
- primary: '#DD2C2A',
539
- secondary: '#240216',
540
- alpha: '0.02',
541
- secondaryFooter: true,
542
- },
543
- },
544
- {
545
- bbl: 'nobl',
546
- theme: {
547
- primary: '#DD2C2A',
548
- secondary: '#240216',
549
- alpha: '0.02',
550
- secondaryFooter: true,
551
- },
552
- },
553
- {
554
- bbl: 'omt',
555
- theme: {
556
- primary: '#04A2D7',
557
- secondary: '#32395A',
558
- alpha: '0.02',
559
- secondaryFooter: true,
560
- },
561
- },
562
- {
563
- bbl: 'kbbl',
564
- theme: {
565
- primary: '#7FAB93',
566
- secondary: '#BCB3A2',
567
- alpha: '0.02',
568
- secondaryFooter: true,
569
- },
570
- },
571
- {
572
- bbl: 'bonord',
573
- theme: {
574
- primary: '#3D8471',
575
- secondary: '#E5AF7C',
576
- alpha: '0.04',
577
- },
578
- },
579
- {
580
- bbl: 'vestbo',
581
- theme: {
582
- primary: '#6BC0DC',
583
- secondary: '#466091',
584
- alpha: '0.04',
585
- secondaryFooter: true,
586
- },
587
- },
588
- {
589
- bbl: 'nbbl',
590
- theme: {
591
- primary: '#ED088A',
592
- secondary: '#22475F',
593
- alpha: '0.02',
594
- secondaryFooter: true,
595
- },
596
- },
597
- {
598
- bbl: 'kragero',
599
- theme: {
600
- primary: '#6585AF',
601
- secondary: '#E64596',
602
- alpha: '0.02',
603
- },
604
- },
605
- {
606
- bbl: 'habo',
607
- theme: {
608
- primary: '#345681',
609
- secondary: '#ED088A',
610
- alpha: '0.02',
611
- },
612
- },
613
- {
614
- bbl: 'aardal',
615
- theme: {
616
- primary: '#710718',
617
- secondary: '#22475F',
618
- alpha: '0.02',
619
- },
620
- },
621
- {
622
- bbl: 'skien',
623
- theme: {
624
- primary: '#ED088A',
625
- secondary: '#ED088A',
626
- alpha: '0.02',
627
- },
628
- },
629
- ]
630
-
631
441
  // export bbls with es5
632
442
  module.exports = bbls
633
443