@erst-vg/vg-design-wrapper 1.0.7 → 1.0.9

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/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.7",
4
+ "version": "1.0.9",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -17,7 +17,8 @@
17
17
  "dist",
18
18
  "src/assets",
19
19
  "src/styles",
20
- "src/components"
20
+ "src/components",
21
+ "CHANGELOG.md"
21
22
  ],
22
23
  "main": "./dist/vg-design-wrapper.umd.cjs",
23
24
  "module": "./dist/vg-design-wrapper.js",
@@ -45,7 +46,7 @@
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.62.1",
49
+ "sass": "1.78.0",
49
50
  "vue": "^3.3.0",
50
51
  "vue-inline-svg": "3.1.2"
51
52
  },
@@ -1,14 +1,13 @@
1
1
  <template>
2
2
  <div class="udvidet-card-container">
3
3
  <a
4
- role="button"
5
- tabindex="0"
4
+ :href="link.href"
5
+ :target="link.external ? '_blank' : undefined"
6
+ :title="link.title"
6
7
  class="udvidet-cardgruppe-card udvidet-card"
7
- :class="{ 'udvidet-card without-image': !billede?.url }"
8
- :title="titel"
9
- :aria-label="titel"
8
+ :class="{ 'without-image': !billede?.url }"
10
9
  >
11
- <div class="picture-container">
10
+ <div v-if="showBilleder" class="picture-container">
12
11
  <div class="picture-wrapper">
13
12
  <div
14
13
  v-if="billede?.url"
@@ -30,7 +29,7 @@
30
29
  <p class="h6 m-0 show-spaces break-word" data-testid="label">{{ label }}</p>
31
30
  </div>
32
31
  <div class="card-titel">
33
- <h3 class="h4 mt-0 mb-3 break-word" data-testid="header">{{ header }}</h3>
32
+ <h3 class="h4 mt-0 mb-3 break-word" data-testid="overskrift">{{ overskrift }}</h3>
34
33
  </div>
35
34
  <pre class="mt-0 mb-3 break-word">
36
35
  <slot name="text"/>
@@ -41,15 +40,16 @@
41
40
  <div class="fremhaevet-link" :class="{ 'line-limit': true }" data-testid="link">
42
41
  <span class="mr-3" data-testid="link-text">{{ linkText }}</span>
43
42
  <VgIcon
44
- :icon="external ? 'openInNew' : 'highlightArrow'"
43
+ :icon="link.external ? 'openInNew' : 'highlightArrow'"
45
44
  :class="{
46
- 'external-link-icon': external,
45
+ 'external-link-icon': link.external,
47
46
  'link-icon': true
48
47
  }"
49
48
  />
50
49
  </div>
51
- </div></div
52
- ></a>
50
+ </div>
51
+ </div>
52
+ </a>
53
53
  </div>
54
54
  </template>
55
55
 
@@ -57,14 +57,6 @@
57
57
  import VgIcon from '@/components/VgIcon.vue';
58
58
  import { PropType } from 'vue';
59
59
  defineProps({
60
- titel: {
61
- type: String,
62
- required: true
63
- },
64
- header: {
65
- type: String,
66
- required: true
67
- },
68
60
  billede: {
69
61
  type: Object as PropType<{
70
62
  url: string;
@@ -72,17 +64,29 @@ defineProps({
72
64
  }>,
73
65
  default: undefined
74
66
  },
67
+ showBilleder: {
68
+ type: Boolean,
69
+ default: true
70
+ },
75
71
  label: {
76
72
  type: String,
77
73
  default: undefined
78
74
  },
75
+ overskrift: {
76
+ type: String,
77
+ required: true
78
+ },
79
79
  linkText: {
80
80
  type: String,
81
81
  default: undefined
82
82
  },
83
- external: {
84
- type: Boolean,
85
- defalut: false
83
+ link: {
84
+ type: Object as PropType<{
85
+ href: string;
86
+ title: string;
87
+ external: boolean;
88
+ }>,
89
+ required: true
86
90
  }
87
91
  });
88
92
  </script>
@@ -11,6 +11,17 @@
11
11
  }
12
12
  }
13
13
  }
14
+
15
+ .top-wrapper {
16
+ h1,
17
+ h2,
18
+ h3,
19
+ h4,
20
+ h5,
21
+ h6 {
22
+ max-width: 100%;
23
+ }
24
+ }
14
25
  }
15
26
 
16
27
  .accordion-bulk-button {
@@ -178,11 +178,12 @@ $color-grey-1: #4f4f4f;
178
178
  // Call to action colors
179
179
  --button-color: #{$color-white};
180
180
  --button-bg-color: #{$primary-color};
181
- --button-hover-bg-color: #{$primary-dark};
182
- --button-active-bg-color: #{$primary-darker};
181
+ --button-hover-bg-color: hsl(from var(--button-bg-color) h s calc(l - 10));
182
+ --button-active-bg-color: hsl(from var(--button-bg-color) h s calc(l - 20));
183
183
 
184
184
  // Link colors
185
185
  --link-color: #{$color-link};
186
+ --link-color-hover: #{$color-link};
186
187
  --link-color-visited: #{$color-darkPurple};
187
188
 
188
189
  // Faktaboks colors
@@ -48,10 +48,12 @@
48
48
 
49
49
  &:hover {
50
50
  background-color: var(--button-hover-bg-color) !important;
51
+ border-color: var(--button-hover-bg-color) !important;
51
52
  }
52
53
 
53
54
  &:active {
54
55
  background-color: var(--button-active-bg-color) !important;
56
+ border-color: var(--button-active-bg-color) !important;
55
57
  }
56
58
 
57
59
  &.warning {
@@ -213,6 +215,10 @@
213
215
  opacity: 0.3;
214
216
  cursor: not-allowed;
215
217
  }
218
+
219
+ &:focus {
220
+ color: $font-color;
221
+ }
216
222
  }
217
223
 
218
224
  .button-link {