@erst-vg/vg-design-wrapper 1.0.12 → 2.0.0

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/src/App.vue.d.ts +1 -1
  3. package/dist/src/VgDesign.vue.d.ts +2 -2
  4. package/dist/src/components/VgAccordion.vue.d.ts +6 -6
  5. package/dist/src/components/VgButton.vue.d.ts +4 -4
  6. package/dist/src/components/VgButtons.vue.d.ts +1 -1
  7. package/dist/src/components/VgCard.vue.d.ts +4 -4
  8. package/dist/src/components/VgCardGroup.vue.d.ts +4 -4
  9. package/dist/src/components/VgDesignWrapper.vue.d.ts +1 -1
  10. package/dist/src/components/VgIcon.vue.d.ts +4 -4
  11. package/dist/src/components/VgListe.vue.d.ts +6 -6
  12. package/dist/src/components/VgListeCard.vue.d.ts +4 -4
  13. package/dist/src/components/VgLoginButton.vue.d.ts +1 -1
  14. package/dist/src/components/VgPagination.vue.d.ts +5 -5
  15. package/dist/vg-design-wrapper.js +1770 -1766
  16. package/dist/vg-design-wrapper.umd.cjs +38 -38
  17. package/package.json +26 -30
  18. package/src/assets/icons/agenda.svg +3 -0
  19. package/src/assets/icons/breadcrumbArrow.svg +1 -1
  20. package/src/components/VgAccordion.vue +1 -1
  21. package/src/components/VgCard.vue +1 -1
  22. package/src/components/VgDesignWrapper.vue +6 -10
  23. package/src/components/VgIcon.vue +1 -1
  24. package/src/components/VgListe.vue +1 -1
  25. package/src/components/VgListeCard.vue +1 -1
  26. package/src/styles/utility.scss +2 -0
  27. package/src/styles/vg/_vg-colors.scss +3 -0
  28. package/src/styles/vg/accordion/_vg-accordion.scss +31 -0
  29. package/src/styles/vg/buttons/_vg-buttons.scss +5 -2
  30. package/src/styles/vg/card/_vg-cardText.scss +3 -0
  31. package/src/styles/vg/card/_vg-udvidedecardgrupper.scss +51 -5
  32. package/src/styles/vg/mixins/_vg-mediaquery-helpers.scss +16 -9
  33. package/src/styles/vg/pagination/_vg-pagination.scss +2 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@erst-vg/vg-design-wrapper",
3
3
  "private": false,
4
- "version": "1.0.12",
4
+ "version": "2.0.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -27,7 +27,8 @@
27
27
  "types": "./dist/src/index.d.ts",
28
28
  "import": "./dist/vg-design-wrapper.js",
29
29
  "require": "./dist/vg-design-wrapper.umd.cjs"
30
- }
30
+ },
31
+ "./styles/utility": "./src/styles/utility.scss"
31
32
  },
32
33
  "scripts": {
33
34
  "dev": "vite",
@@ -45,43 +46,38 @@
45
46
  "@types/node": "^22.5.3",
46
47
  "dkfds": "npm:@erst-vg/dkfds-vite@8.0.1",
47
48
  "lodash": "4.17.21",
48
- "sass": "1.78.0",
49
- "vue": "^3.3.0",
50
- "vue-inline-svg": "3.1.2"
49
+ "sass": "1.93.2",
50
+ "vue": "3.5.22",
51
+ "vue-inline-svg": "4.0.1"
51
52
  },
52
53
  "peerDependencies": {
53
- "vue": "^3.3.0"
54
+ "vue": "3.5.22"
54
55
  },
55
56
  "devDependencies": {
56
57
  "@stylistic/eslint-plugin": "2.6.2",
57
- "@types/lodash": "^4.17.7",
58
- "@typescript-eslint/eslint-plugin": "8.1.0",
59
- "@vitejs/plugin-vue": "5.1.2",
60
- "@vitest/coverage-v8": "2.0.5",
58
+ "@types/lodash": "4.17.7",
59
+ "@typescript-eslint/eslint-plugin": "8.45.0",
60
+ "@vitejs/plugin-vue": "5.2.3",
61
+ "@vitest/coverage-v8": "3.2.4",
61
62
  "cross-env": "7.0.3",
62
- "eslint": "8.57.0",
63
- "eslint-config-prettier": "8.0.0",
64
- "eslint-formatter-pretty": "^5.0.0",
65
- "eslint-import-resolver-typescript": "3.6.1",
66
- "eslint-plugin-import": "2.29.1",
67
- "eslint-plugin-vue": "9.27.0",
68
- "husky": "4.3.8",
69
- "jsdom": "^25.0.0",
70
- "lint-staged": "10.5.4",
71
- "path": "^0.12.7",
72
- "prettier": "2.7.1",
73
- "typescript": "5.5.4",
74
- "vite": "5.4.0",
63
+ "eslint": "9.37.0",
64
+ "eslint-config-prettier": "10.1.8",
65
+ "eslint-formatter-pretty": "7.0.0",
66
+ "eslint-import-resolver-typescript": "4.4.4",
67
+ "eslint-plugin-import": "2.32.0",
68
+ "eslint-plugin-vue": "10.5.0",
69
+ "husky": "9.1.7",
70
+ "jsdom": "25.0.1",
71
+ "lint-staged": "16.2.3",
72
+ "path": "0.12.7",
73
+ "prettier": "3.6.2",
74
+ "typescript": "5.9.3",
75
+ "vite": "5.4.20",
75
76
  "vite-plugin-css-injected-by-js": "3.5.1",
76
77
  "vite-plugin-dts": "4.1.0",
77
- "vitest": "2.0.5",
78
+ "vitest": "3.2.4",
78
79
  "vue-tsc": "2.0.29",
79
- "@vue/test-utils": "2.4.0"
80
- },
81
- "husky": {
82
- "hooks": {
83
- "pre-commit": "lint-staged --allow-empty"
84
- }
80
+ "@vue/test-utils": "2.4.6"
85
81
  },
86
82
  "lint-staged": {
87
83
  "*.{ts,vue}": [
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="m19.675 20.375.7-.7L18.5 17.8V15h-1v3.2l2.175 2.175zM5 21c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 0 1 3 19V5c0-.55.196-1.02.587-1.413A1.926 1.926 0 0 1 5 3h14c.55 0 1.02.196 1.413.587C20.803 3.98 21 4.45 21 5v6.7a8.184 8.184 0 0 0-.975-.387A6.104 6.104 0 0 0 19 11.075V5H5v14h6.05c.05.367.13.717.237 1.05.109.333.238.65.388.95H5zm0-3v1V5v6.075V11v7zm2-1h4.075c.05-.35.13-.692.238-1.025.108-.333.229-.658.362-.975H7v2zm0-4h6.1c.533-.5 1.13-.917 1.787-1.25A7.043 7.043 0 0 1 17 11.075V11H7v2zm0-4h10V7H7v2zm11 14c-1.383 0-2.563-.488-3.537-1.462C13.488 20.562 13 19.383 13 18s.488-2.563 1.463-3.537C15.438 13.488 16.617 13 18 13s2.563.488 3.538 1.463C22.512 15.438 23 16.617 23 18s-.488 2.563-1.462 3.538C20.562 22.512 19.383 23 18 23z" fill="currentColor"/>
3
+ </svg>
@@ -1,3 +1,3 @@
1
1
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M8.59 16.59 10 18l6-6-6-6-1.41 1.41L13.17 12l-4.58 4.59z" fill="#currentColor"/>
2
+ <path d="M8.59 16.59 10 18l6-6-6-6-1.41 1.41L13.17 12l-4.58 4.59z" fill="currentColor"/>
3
3
  </svg>
@@ -93,5 +93,5 @@ const toggle = (event: Event, index: number) => {
93
93
  </script>
94
94
 
95
95
  <style lang="scss" scoped>
96
- @import '@/styles/custom/_vgAccordion.scss';
96
+ @use '@/styles/custom/_vgAccordion.scss';
97
97
  </style>
@@ -92,5 +92,5 @@ defineProps({
92
92
  </script>
93
93
 
94
94
  <style lang="scss" scoped>
95
- @import '@/styles/custom/_vgCard.scss';
95
+ @use '@/styles/custom/_vgCard.scss';
96
96
  </style>
@@ -35,14 +35,10 @@ onMounted(() => {
35
35
  </script>
36
36
 
37
37
  <style lang="scss">
38
- @import '@/styles/vg/_vg-colors.scss';
39
- .applikation-container {
40
- // Importer de forskellige komponenter, så leverandør af 3parts applikation ikke selv skal gøre det.
41
- @import '@/styles/vg/mixins/_vg-mediaquery-helpers.scss';
42
- @import '@/styles/vg/pagination/_vg-pagination.scss';
43
- @import '@/styles/vg/accordion/_vg-accordion.scss';
44
- @import '@/styles/vg/buttons/_vg-buttons.scss';
45
- @import '@/styles/vg/card/_vg-cardText.scss';
46
- @import '@/styles/vg/card/_vg-udvidedecardgrupper.scss';
47
- }
38
+ // Importer de forskellige komponenter, så leverandør af 3parts applikation ikke selv skal gøre det.
39
+ @use '@/styles/vg/pagination/_vg-pagination.scss';
40
+ @use '@/styles/vg/accordion/_vg-accordion.scss';
41
+ @use '@/styles/vg/buttons/_vg-buttons.scss';
42
+ @use '@/styles/vg/card/_vg-cardText.scss';
43
+ @use '@/styles/vg/card/_vg-udvidedecardgrupper.scss';
48
44
  </style>
@@ -50,5 +50,5 @@ const iconSrc = computed(() => {
50
50
  </script>
51
51
 
52
52
  <style lang="scss" scoped>
53
- @import '@/styles/custom/_vgIcon.scss';
53
+ @use '@/styles/custom/_vgIcon.scss';
54
54
  </style>
@@ -69,5 +69,5 @@ watch(
69
69
  </script>
70
70
 
71
71
  <style lang="scss" scoped>
72
- @import '@/styles/custom/_vgListe.scss';
72
+ @use '@/styles/custom/_vgListe.scss';
73
73
  </style>
@@ -37,5 +37,5 @@ defineProps({
37
37
  </script>
38
38
 
39
39
  <style lang="scss" scoped>
40
- @import '@/styles/custom/_vgCard.scss';
40
+ @use '@/styles/custom/_vgCard.scss';
41
41
  </style>
@@ -0,0 +1,2 @@
1
+ @forward './vg/vg-colors';
2
+ @forward './vg/mixins/vg-mediaquery-helpers';
@@ -155,6 +155,9 @@ $color-darkbg-disabled: #758a9f;
155
155
  $color-mint-green: #eeffe2;
156
156
  $color-grey-1: #4f4f4f;
157
157
 
158
+ // Masterbrand colors
159
+ $virksomhedsudvikling-danmark-color: #D2D0BB;
160
+
158
161
  /* CSS variables used for site design which can be overridden on site level
159
162
  Remember to override in siteDesign.service.ts. Only variables added to
160
163
  /api/content/sites/, for component specific colors, should be added here. */
@@ -1,3 +1,6 @@
1
+ @use './../vg-colors' as *;
2
+ @use './../mixins/vg-mediaquery-helpers' as *;
3
+
1
4
  .accordion-wrapper.ydelse {
2
5
  & > :last-child {
3
6
  margin-bottom: 32px;
@@ -109,3 +112,31 @@
109
112
  }
110
113
  }
111
114
  }
115
+
116
+ .wide-accordion {
117
+ .accordion {
118
+ li {
119
+ margin-bottom: 0;
120
+ border-top: 1px solid $color-light-gray;
121
+
122
+ &:last-child {
123
+ border-bottom: 1px solid $color-light-gray;
124
+ }
125
+
126
+ .accordion-button {
127
+ padding: 16px 16px 16px 0;
128
+ background-color: transparent;
129
+ }
130
+
131
+ .accordion-content {
132
+ padding: 8px 16px 8px 0;
133
+ }
134
+ }
135
+ }
136
+
137
+ &.white-text {
138
+ button.accordion-bulk-button {
139
+ color: $color-white;
140
+ }
141
+ }
142
+ }
@@ -1,3 +1,6 @@
1
+ @use './../vg-colors' as *;
2
+ @use './../mixins/vg-mediaquery-helpers' as *;
3
+
1
4
  .button {
2
5
  font-size: 16px;
3
6
  font-weight: 400 !important;
@@ -20,7 +23,7 @@
20
23
 
21
24
  &:disabled,
22
25
  &.disabled {
23
- opacity: 0.3;
26
+ opacity: 0.6 !important;
24
27
  cursor: not-allowed;
25
28
  }
26
29
 
@@ -234,7 +237,7 @@
234
237
 
235
238
  &:disabled {
236
239
  text-decoration: none;
237
- opacity: 0.3;
240
+ opacity: 0.6;
238
241
  cursor: not-allowed;
239
242
  }
240
243
  }
@@ -1,3 +1,6 @@
1
+ @use './../vg-colors' as *;
2
+ @use './../mixins/vg-mediaquery-helpers' as *;
3
+
1
4
  .padding-between-children > div:not(:last-child) {
2
5
  margin-bottom: 8px;
3
6
  }
@@ -1,3 +1,6 @@
1
+ @use './../vg-colors' as *;
2
+ @use './../mixins/vg-mediaquery-helpers' as *;
3
+
1
4
  .udvidet-cardgruppe {
2
5
  &.white-text {
3
6
  .udvidet-cardgruppe__titel {
@@ -31,7 +34,8 @@
31
34
  background-position: center;
32
35
  background-repeat: no-repeat;
33
36
  background-size: cover;
34
- padding-top: 66.66%;
37
+ aspect-ratio: 3 / 2;
38
+ object-fit: cover;
35
39
  width: 100%;
36
40
 
37
41
  &.logo-picture {
@@ -102,20 +106,21 @@
102
106
 
103
107
  .card-picture {
104
108
  background-size: contain;
105
- padding-top: 50%;
109
+ aspect-ratio: 2/1;
110
+ object-fit: contain;
106
111
  }
107
112
  }
108
113
 
109
114
  .udbyder-card {
110
115
  border: 1px solid $color-light-gray;
111
116
  border-bottom: none;
112
- padding: 32px;
113
- aspect-ratio: 3/2;
114
117
 
115
118
  .card-picture {
116
119
  background-size: contain;
117
- padding-top: unset;
120
+ padding: 32px;
118
121
  height: 100%;
122
+ aspect-ratio: 3/2;
123
+ object-fit: contain;
119
124
  }
120
125
  }
121
126
 
@@ -182,6 +187,7 @@
182
187
  span {
183
188
  line-height: 1.5;
184
189
  vertical-align: middle;
190
+ word-break: break-word;
185
191
  }
186
192
 
187
193
  &.line-limit {
@@ -346,6 +352,40 @@
346
352
  }
347
353
  }
348
354
  }
355
+
356
+ .medarbejder-card {
357
+ margin-bottom: 0 !important;
358
+ padding-bottom: 24px;
359
+
360
+ @include media-breakpoint-up(sm) {
361
+ padding-bottom: 56px;
362
+
363
+ .udvidet-cardgruppe-card {
364
+ display: flex;
365
+ flex-direction: row;
366
+
367
+ .picture-container {
368
+ width: calc(50% - 16px);
369
+ height: 100%;
370
+
371
+ .card-picture {
372
+ width: 100%;
373
+ height: 100%;
374
+ }
375
+ }
376
+
377
+ .text-wrapper {
378
+ width: calc(50% - 16px);
379
+ height: auto;
380
+ margin-left: 32px;
381
+ border-top: none;
382
+ padding-top: 0;
383
+ padding-bottom: 0;
384
+ justify-content: normal;
385
+ }
386
+ }
387
+ }
388
+ }
349
389
  }
350
390
  }
351
391
 
@@ -457,3 +497,9 @@
457
497
  }
458
498
  }
459
499
  }
500
+
501
+ .picture-container {
502
+ .card-picture {
503
+ display: block;
504
+ }
505
+ }
@@ -1,3 +1,6 @@
1
+ @use 'sass:map';
2
+ @use 'sass:list';
3
+
1
4
  // Grid breakpoints.. copied directly from FDS
2
5
  $grid-xs: 0;
3
6
  $grid-sm: 576px;
@@ -28,9 +31,9 @@ $grid-breakpoints: (
28
31
  // md
29
32
  // >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))
30
33
  // md
31
- @function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
32
- $n: index($breakpoint-names, $name);
33
- @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
34
+ @function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map.keys($breakpoints)) {
35
+ $n: list.index($breakpoint-names, $name);
36
+ @return if($n < list.length($breakpoint-names), list.nth($breakpoint-names, $n + 1), null);
34
37
  }
35
38
 
36
39
  // Minimum breakpoint width. Null for the smallest (first) breakpoint.
@@ -38,7 +41,7 @@ $grid-breakpoints: (
38
41
  // >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
39
42
  // 576px
40
43
  @function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
41
- $min: map-get($breakpoints, $name);
44
+ $min: map.get($breakpoints, $name);
42
45
  @return if($min != 0, $min, null);
43
46
  }
44
47
 
@@ -49,7 +52,14 @@ $grid-breakpoints: (
49
52
  // 767px
50
53
  @function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
51
54
  $next: breakpoint-next($name, $breakpoints);
52
- @return if($next, breakpoint-min($next, $breakpoints) - 1px, null);
55
+ @if $next {
56
+ @return breakpoint-min($next, $breakpoints) - 1px;
57
+ } @else {
58
+ // For det største breakpoint (xl), returner breakpoint værdien minus 1px
59
+ // Dette gør at media-breakpoint-down(xl) matcher skærme under 1200px
60
+ $current: map.get($breakpoints, $name);
61
+ @return if($current and $current > 0, $current - 1px, null);
62
+ }
53
63
  }
54
64
 
55
65
  // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash infront.
@@ -131,9 +141,6 @@ $grid-breakpoints: (
131
141
  }
132
142
  }
133
143
  }
134
- @mixin testmixin() {
135
- background-color: yellow !important;
136
- }
137
144
 
138
145
  // Breakpoints specificeret til zoom og kigger derfor på em
139
146
  // Bruges særlig til mindre skærme, så koden kan opfylde tilgængelighedskrav
@@ -145,7 +152,7 @@ $zoom-breakpoints: (
145
152
  );
146
153
 
147
154
  @mixin media-breakpoint-down-em($name, $breakpoints: $zoom-breakpoints) {
148
- $max: map-get($breakpoints, $name);
155
+ $max: map.get($breakpoints, $name);
149
156
  @media all and (max-width: $max) {
150
157
  @content;
151
158
  }
@@ -1,3 +1,5 @@
1
+ @use './../vg-colors' as *;
2
+
1
3
  .pagination {
2
4
  padding-top: 16px;
3
5
  padding-bottom: 16px;