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

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 (186) hide show
  1. package/CHANGELOG.md +29 -21
  2. package/README.md +2 -2
  3. package/dist/src/components/VgLoginButton.vue.d.ts +2 -0
  4. package/dist/src/index.d.ts +2 -1
  5. package/dist/tests/unit/components/VgLoginButton.spec.d.ts +1 -0
  6. package/dist/vg-design-wrapper.js +1290 -1273
  7. package/dist/vg-design-wrapper.umd.cjs +50 -50
  8. package/package.json +92 -93
  9. package/src/assets/icons/abonnementFilled.svg +4 -4
  10. package/src/assets/icons/abonnementOutline.svg +4 -4
  11. package/src/assets/icons/accordion.svg +2 -2
  12. package/src/assets/icons/accordionClose.svg +2 -2
  13. package/src/assets/icons/accordionCloseOld.svg +6 -6
  14. package/src/assets/icons/accordionOpen.svg +3 -3
  15. package/src/assets/icons/accordionOpenOld.svg +6 -6
  16. package/src/assets/icons/accountCircle.svg +2 -2
  17. package/src/assets/icons/add.svg +5 -5
  18. package/src/assets/icons/addBig.svg +5 -5
  19. package/src/assets/icons/afpublicer.svg +2 -2
  20. package/src/assets/icons/anchorlink.svg +3 -3
  21. package/src/assets/icons/anchormenuer.svg +3 -3
  22. package/src/assets/icons/anden.svg +3 -0
  23. package/src/assets/icons/angleArrowDown.svg +2 -2
  24. package/src/assets/icons/angleArrowUp.svg +2 -2
  25. package/src/assets/icons/ansoegninger.svg +6 -6
  26. package/src/assets/icons/antal-gange.svg +6 -6
  27. package/src/assets/icons/applikationer.svg +2 -2
  28. package/src/assets/icons/arrowLeft.svg +2 -2
  29. package/src/assets/icons/arrowRight.svg +2 -2
  30. package/src/assets/icons/bell.svg +2 -2
  31. package/src/assets/icons/bellAlarmFilled.svg +2 -2
  32. package/src/assets/icons/bellAlarmOutline.svg +2 -2
  33. package/src/assets/icons/bellOvercrossed.svg +2 -2
  34. package/src/assets/icons/beskedcenter.svg +2 -2
  35. package/src/assets/icons/billede.svg +2 -2
  36. package/src/assets/icons/bogmaerker.svg +2 -2
  37. package/src/assets/icons/bookmarkFilled.svg +2 -2
  38. package/src/assets/icons/bookmarkOutline.svg +2 -2
  39. package/src/assets/icons/breadcrumbArrow.svg +3 -3
  40. package/src/assets/icons/bred_smal.svg +3 -0
  41. package/src/assets/icons/cSRDAddDatapunkt.svg +5 -0
  42. package/src/assets/icons/cSRDAddMultipleDatapunkter.svg +7 -0
  43. package/src/assets/icons/cSRDLockedDatapunkt.svg +4 -0
  44. package/src/assets/icons/cSRDRemoveDatapunkt.svg +5 -0
  45. package/src/assets/icons/cSRDRemoveDatapunktOversigt.svg +4 -0
  46. package/src/assets/icons/calendar.svg +2 -2
  47. package/src/assets/icons/calendarOutline.svg +2 -2
  48. package/src/assets/icons/callToAction.svg +2 -2
  49. package/src/assets/icons/card.svg +2 -2
  50. package/src/assets/icons/carouselArrowLeft.svg +2 -2
  51. package/src/assets/icons/carouselArrowRight.svg +2 -2
  52. package/src/assets/icons/category.svg +2 -2
  53. package/src/assets/icons/center.svg +3 -0
  54. package/src/assets/icons/check.svg +2 -2
  55. package/src/assets/icons/chevronLeft.svg +2 -2
  56. package/src/assets/icons/circularArrow.svg +3 -3
  57. package/src/assets/icons/close.svg +2 -2
  58. package/src/assets/icons/closeCircleOutline.svg +2 -2
  59. package/src/assets/icons/closeCirleFilled.svg +2 -2
  60. package/src/assets/icons/copyLink.svg +2 -2
  61. package/src/assets/icons/datahub.svg +2 -2
  62. package/src/assets/icons/deleteOutline.svg +3 -3
  63. package/src/assets/icons/deltagelsesgange.svg +2 -2
  64. package/src/assets/icons/dots.svg +4 -4
  65. package/src/assets/icons/dotsHorizontal.svg +2 -2
  66. package/src/assets/icons/doubleArrow.svg +2 -2
  67. package/src/assets/icons/downRightArrow.svg +2 -2
  68. package/src/assets/icons/download.svg +2 -2
  69. package/src/assets/icons/draggable.svg +5 -5
  70. package/src/assets/icons/email.svg +5 -5
  71. package/src/assets/icons/emner.svg +2 -2
  72. package/src/assets/icons/en_spalte.svg +3 -0
  73. package/src/assets/icons/envelopeFilled.svg +2 -2
  74. package/src/assets/icons/envelopeOutline.svg +4 -4
  75. package/src/assets/icons/error.svg +2 -2
  76. package/src/assets/icons/excel.svg +4 -0
  77. package/src/assets/icons/expandCircleRight.svg +3 -0
  78. package/src/assets/icons/eyeHide.svg +2 -2
  79. package/src/assets/icons/file.svg +5 -5
  80. package/src/assets/icons/filter.svg +2 -2
  81. package/src/assets/icons/filter2.svg +20 -20
  82. package/src/assets/icons/fire_spalter.svg +3 -0
  83. package/src/assets/icons/graph.svg +2 -2
  84. package/src/assets/icons/helpCircleOutline.svg +5 -5
  85. package/src/assets/icons/hero.svg +2 -2
  86. package/src/assets/icons/highlightArrow.svg +3 -3
  87. package/src/assets/icons/history.svg +2 -2
  88. package/src/assets/icons/home.svg +5 -5
  89. package/src/assets/icons/image.svg +5 -5
  90. package/src/assets/icons/indsaet.svg +2 -2
  91. package/src/assets/icons/indstillinger.svg +2 -2
  92. package/src/assets/icons/info.svg +4 -4
  93. package/src/assets/icons/infobox.svg +2 -2
  94. package/src/assets/icons/knap.svg +2 -2
  95. package/src/assets/icons/kontaktformular.svg +2 -2
  96. package/src/assets/icons/kopi.svg +2 -2
  97. package/src/assets/icons/leftUpCurvedArrow.svg +2 -2
  98. package/src/assets/icons/letter.svg +2 -2
  99. package/src/assets/icons/link.svg +2 -2
  100. package/src/assets/icons/linkboks.svg +4 -4
  101. package/src/assets/icons/linkedin.svg +5 -5
  102. package/src/assets/icons/liste.svg +2 -2
  103. package/src/assets/icons/listecard.svg +2 -2
  104. package/src/assets/icons/loading.svg +2 -2
  105. package/src/assets/icons/location.svg +2 -2
  106. package/src/assets/icons/lock.svg +6 -6
  107. package/src/assets/icons/loginbanner.svg +2 -2
  108. package/src/assets/icons/magnify.svg +2 -2
  109. package/src/assets/icons/magnifyBig.svg +2 -2
  110. package/src/assets/icons/map.svg +2 -2
  111. package/src/assets/icons/menu.svg +2 -2
  112. package/src/assets/icons/menuDown.svg +2 -2
  113. package/src/assets/icons/menuUp.svg +2 -2
  114. package/src/assets/icons/minus.svg +2 -2
  115. package/src/assets/icons/mitId.svg +3 -0
  116. package/src/assets/icons/notVerified.svg +2 -2
  117. package/src/assets/icons/notes.svg +5 -5
  118. package/src/assets/icons/online.svg +2 -2
  119. package/src/assets/icons/openInNew.svg +2 -2
  120. package/src/assets/icons/paere.svg +7 -7
  121. package/src/assets/icons/paginationChevronLeft.svg +4 -4
  122. package/src/assets/icons/paginationChevronRight.svg +4 -4
  123. package/src/assets/icons/paginationFirstPage.svg +4 -4
  124. package/src/assets/icons/paginationLastPage.svg +4 -4
  125. package/src/assets/icons/partnergruppe.svg +5 -5
  126. package/src/assets/icons/pause.svg +2 -2
  127. package/src/assets/icons/pdf.svg +4 -0
  128. package/src/assets/icons/pdfDownload.svg +2 -2
  129. package/src/assets/icons/pencil.svg +2 -2
  130. package/src/assets/icons/pencilOutline.svg +2 -2
  131. package/src/assets/icons/people.svg +4 -4
  132. package/src/assets/icons/phone.svg +5 -5
  133. package/src/assets/icons/play.svg +4 -4
  134. package/src/assets/icons/playVideo.svg +4 -4
  135. package/src/assets/icons/plus.svg +2 -2
  136. package/src/assets/icons/powerpoint.svg +4 -0
  137. package/src/assets/icons/praedefineretSoegning.svg +2 -2
  138. package/src/assets/icons/questionmark.svg +3 -0
  139. package/src/assets/icons/quote.svg +2 -2
  140. package/src/assets/icons/redaktion.svg +2 -2
  141. package/src/assets/icons/remove.svg +2 -2
  142. package/src/assets/icons/removeRedEyeOutline.svg +2 -2
  143. package/src/assets/icons/revert.svg +3 -0
  144. package/src/assets/icons/richtext.svg +2 -2
  145. package/src/assets/icons/roundCheckmark.svg +2 -2
  146. package/src/assets/icons/save.svg +2 -2
  147. package/src/assets/icons/sektionsoverskrift.svg +5 -5
  148. package/src/assets/icons/smal_bred.svg +3 -0
  149. package/src/assets/icons/starFilled.svg +2 -2
  150. package/src/assets/icons/starOutline.svg +2 -2
  151. package/src/assets/icons/tag.svg +2 -2
  152. package/src/assets/icons/teaser.svg +3 -3
  153. package/src/assets/icons/teaserbillede.svg +2 -2
  154. package/src/assets/icons/tekstgruppe.svg +2 -2
  155. package/src/assets/icons/time.svg +6 -6
  156. package/src/assets/icons/to_spalter.svg +3 -0
  157. package/src/assets/icons/top.svg +3 -0
  158. package/src/assets/icons/trashCan.svg +2 -2
  159. package/src/assets/icons/tre_spalter.svg +3 -0
  160. package/src/assets/icons/udvidedeCardgruppe.svg +2 -2
  161. package/src/assets/icons/unlock.svg +2 -2
  162. package/src/assets/icons/verified.svg +2 -2
  163. package/src/assets/icons/video.svg +2 -2
  164. package/src/assets/icons/word.svg +10 -0
  165. package/src/assets/icons/zoom.svg +2 -2
  166. package/src/components/VgAccordion.vue +97 -97
  167. package/src/components/VgButton.vue +18 -18
  168. package/src/components/VgButtons.vue +27 -27
  169. package/src/components/VgCard.vue +96 -96
  170. package/src/components/VgCardGroup.vue +18 -18
  171. package/src/components/VgDesignWrapper.vue +48 -48
  172. package/src/components/VgIcon.vue +54 -54
  173. package/src/components/VgListe.vue +73 -73
  174. package/src/components/VgListeCard.vue +41 -41
  175. package/src/components/VgLoginButton.vue +7 -0
  176. package/src/components/VgPagination.vue +207 -207
  177. package/src/styles/custom/_vgAccordion.scss +38 -38
  178. package/src/styles/custom/_vgCard.scss +15 -15
  179. package/src/styles/custom/_vgIcon.scss +3 -3
  180. package/src/styles/custom/_vgListe.scss +3 -3
  181. package/src/styles/vg/_vg-colors.scss +206 -203
  182. package/src/styles/vg/accordion/_vg-accordion.scss +111 -111
  183. package/src/styles/vg/buttons/_vg-buttons.scss +358 -338
  184. package/src/styles/vg/card/_vg-udvidedecardgrupper.scss +20 -2
  185. package/src/styles/vg/mixins/_vg-mediaquery-helpers.scss +152 -152
  186. package/src/styles/vg/pagination/_vg-pagination.scss +67 -67
@@ -1,54 +1,54 @@
1
- <template>
2
- <svg v-if="custom" class="icon-svg" :focusable="focusable" :aria-hidden="titleTekst === ''">
3
- <title v-if="title" xmlns="http://www.w3.org/2000/svg">{{ title }}</title>
4
- <use :xlink:href="`#${icon}`"></use>
5
- </svg>
6
- <InlineSvg v-else-if="iconSrc" :src="iconSrc" class="icon icon-svg" :title="titleTekst" :focusable="focusable" :aria-hidden="titleTekst === ''" />
7
- </template>
8
-
9
- <script setup lang="ts">
10
- import { computed, inject } from 'vue';
11
- import InlineSvg from 'vue-inline-svg';
12
-
13
- const props = defineProps({
14
- icon: {
15
- type: String,
16
- required: true
17
- },
18
- focusable: {
19
- type: String,
20
- default: 'false'
21
- },
22
- title: {
23
- type: String,
24
- default: undefined
25
- }
26
- });
27
-
28
- const siteIkoner = inject('siteIkoner');
29
-
30
- const titleTekst = computed(() => props.title || '');
31
-
32
- const custom = computed((): boolean => !!iconSrc.value?.includes('<symbol'));
33
-
34
- const iconSrc = computed(() => {
35
- let resolved = siteIkoner ? (siteIkoner as { [key: string]: string })[props.icon] : null;
36
- if (props.icon && !resolved) {
37
- try {
38
- const path = new URL(`../assets/icons/${props.icon}.svg`, import.meta.url).href;
39
- if (path.endsWith('undefined')) {
40
- throw Error('invalid URL');
41
- }
42
- resolved = path;
43
- } catch {
44
- // eslint-disable-next-line no-console
45
- console.warn(`Unable to resolve path for icon: ${props.icon}.svg`);
46
- }
47
- }
48
- return resolved;
49
- });
50
- </script>
51
-
52
- <style lang="scss" scoped>
53
- @import '@/styles/custom/_vgIcon.scss';
54
- </style>
1
+ <template>
2
+ <svg v-if="custom" class="icon-svg" :focusable="focusable" :aria-hidden="titleTekst === ''">
3
+ <title v-if="title" xmlns="http://www.w3.org/2000/svg">{{ title }}</title>
4
+ <use :xlink:href="`#${icon}`"></use>
5
+ </svg>
6
+ <InlineSvg v-else-if="iconSrc" :src="iconSrc" class="icon icon-svg" :title="titleTekst" :focusable="focusable" :aria-hidden="titleTekst === ''" />
7
+ </template>
8
+
9
+ <script setup lang="ts">
10
+ import { computed, inject } from 'vue';
11
+ import InlineSvg from 'vue-inline-svg';
12
+
13
+ const props = defineProps({
14
+ icon: {
15
+ type: String,
16
+ required: true
17
+ },
18
+ focusable: {
19
+ type: String,
20
+ default: 'false'
21
+ },
22
+ title: {
23
+ type: String,
24
+ default: undefined
25
+ }
26
+ });
27
+
28
+ const siteIkoner = inject('siteIkoner');
29
+
30
+ const titleTekst = computed(() => props.title || '');
31
+
32
+ const custom = computed((): boolean => !!iconSrc.value?.includes('<symbol'));
33
+
34
+ const iconSrc = computed(() => {
35
+ let resolved = siteIkoner ? (siteIkoner as { [key: string]: string })[props.icon] : null;
36
+ if (props.icon && !resolved) {
37
+ try {
38
+ const path = new URL(`../assets/icons/${props.icon}.svg`, import.meta.url).href;
39
+ if (path.endsWith('undefined')) {
40
+ throw Error('invalid URL');
41
+ }
42
+ resolved = path;
43
+ } catch {
44
+ // eslint-disable-next-line no-console
45
+ console.warn(`Unable to resolve path for icon: ${props.icon}.svg`);
46
+ }
47
+ }
48
+ return resolved;
49
+ });
50
+ </script>
51
+
52
+ <style lang="scss" scoped>
53
+ @import '@/styles/custom/_vgIcon.scss';
54
+ </style>
@@ -1,73 +1,73 @@
1
- <template>
2
- <div>
3
- <div class="udvidet-cardgruppe udvidet-cardgruppe-liste px-0">
4
- <p>{{ resultsText }}</p>
5
- <div class="row cardrow">
6
- <slot />
7
- </div>
8
- </div>
9
- <div v-if="antal > dataSlice.length" class="d-flex justify-content-center">
10
- <div v-if="useSpinner && pending">
11
- <slot name="spinner">
12
- <div class="spinner" />
13
- </slot>
14
- </div>
15
- <button v-else class="button centered-button button-secondary" type="button" data-testid="button-load" @click="onClick">
16
- {{ $t('content.application.emnelandningside.button.visflere') }}
17
- </button>
18
- </div>
19
- </div>
20
- </template>
21
-
22
- <script setup lang="ts">
23
- import { ParamType } from '@/utils/tekstnoegle-util';
24
- import { computed, inject, nextTick, PropType, ref, watch } from 'vue';
25
-
26
- const emits = defineEmits(['load-slice']);
27
- const props = defineProps({
28
- titel: {
29
- type: String,
30
- required: false,
31
- default: undefined
32
- },
33
- antal: {
34
- type: Number,
35
- required: true
36
- },
37
- useSpinner: {
38
- type: Boolean,
39
- default: true
40
- },
41
- dataSlice: {
42
- type: Array as PropType<any>,
43
- required: true
44
- }
45
- });
46
-
47
- const $t: (tekstnoegle: string, params?: ParamType) => string = inject('$t')!;
48
-
49
- const pending = ref(false);
50
-
51
- const resultsText = computed(() => $t('content.applikation.cardliste.results.text', [props.dataSlice.length, props.antal ?? 0]));
52
-
53
- const onClick = () => {
54
- pending.value = true;
55
- emits('load-slice');
56
- };
57
-
58
- watch(
59
- () => props.dataSlice,
60
- async (newDataSlice, oldDataSlice) => {
61
- if (newDataSlice > oldDataSlice) {
62
- pending.value = false;
63
- await nextTick();
64
- const containerElement = document.querySelector('.applikation-container .udvidet-cardgruppe-liste');
65
- containerElement?.querySelectorAll<HTMLElement>('.udvidet-cardgruppe-card')[oldDataSlice.length].focus();
66
- }
67
- }
68
- );
69
- </script>
70
-
71
- <style lang="scss" scoped>
72
- @import '@/styles/custom/_vgListe.scss';
73
- </style>
1
+ <template>
2
+ <div>
3
+ <div class="udvidet-cardgruppe udvidet-cardgruppe-liste px-0">
4
+ <p>{{ resultsText }}</p>
5
+ <div class="row cardrow">
6
+ <slot />
7
+ </div>
8
+ </div>
9
+ <div v-if="antal > dataSlice.length" class="d-flex justify-content-center">
10
+ <div v-if="useSpinner && pending">
11
+ <slot name="spinner">
12
+ <div class="spinner" />
13
+ </slot>
14
+ </div>
15
+ <button v-else class="button centered-button button-secondary" type="button" data-testid="button-load" @click="onClick">
16
+ {{ $t('content.application.emnelandningside.button.visflere') }}
17
+ </button>
18
+ </div>
19
+ </div>
20
+ </template>
21
+
22
+ <script setup lang="ts">
23
+ import { ParamType } from '@/utils/tekstnoegle-util';
24
+ import { computed, inject, nextTick, PropType, ref, watch } from 'vue';
25
+
26
+ const emits = defineEmits(['load-slice']);
27
+ const props = defineProps({
28
+ titel: {
29
+ type: String,
30
+ required: false,
31
+ default: undefined
32
+ },
33
+ antal: {
34
+ type: Number,
35
+ required: true
36
+ },
37
+ useSpinner: {
38
+ type: Boolean,
39
+ default: true
40
+ },
41
+ dataSlice: {
42
+ type: Array as PropType<any>,
43
+ required: true
44
+ }
45
+ });
46
+
47
+ const $t: (tekstnoegle: string, params?: ParamType) => string = inject('$t')!;
48
+
49
+ const pending = ref(false);
50
+
51
+ const resultsText = computed(() => $t('content.applikation.cardliste.results.text', [props.dataSlice.length, props.antal ?? 0]));
52
+
53
+ const onClick = () => {
54
+ pending.value = true;
55
+ emits('load-slice');
56
+ };
57
+
58
+ watch(
59
+ () => props.dataSlice,
60
+ async (newDataSlice, oldDataSlice) => {
61
+ if (newDataSlice > oldDataSlice) {
62
+ pending.value = false;
63
+ await nextTick();
64
+ const containerElement = document.querySelector('.applikation-container .udvidet-cardgruppe-liste');
65
+ containerElement?.querySelectorAll<HTMLElement>('.udvidet-cardgruppe-card')[oldDataSlice.length].focus();
66
+ }
67
+ }
68
+ );
69
+ </script>
70
+
71
+ <style lang="scss" scoped>
72
+ @import '@/styles/custom/_vgListe.scss';
73
+ </style>
@@ -1,41 +1,41 @@
1
- <template>
2
- <div class="card-container">
3
- <div class="udvidet-card-container">
4
- <a role="button" tabindex="0" class="udvidet-cardgruppe-card liste-layout" data-testid="link" :title="titel" :aria-label="titel">
5
- <div class="text-wrapper">
6
- <div>
7
- <div class="text">
8
- <div v-if="label" class="label-container">
9
- <p class="h6 m-0 show-spaces break-word" data-testid="label">{{ label }}</p>
10
- </div>
11
- <div class="card-titel">
12
- <h3 class="h4 line-limit mt-0 mb-3 break-word" data-testid="titel">{{ titel }}</h3>
13
- </div>
14
- <pre class="mt-0 mb-3 break-word line-limit">
15
- <slot/>
16
- </pre>
17
- </div>
18
- </div>
19
- </div>
20
- </a>
21
- </div>
22
- </div>
23
- </template>
24
-
25
- <script setup lang="ts">
26
- defineProps({
27
- label: {
28
- type: String,
29
- required: false,
30
- default: undefined
31
- },
32
- titel: {
33
- type: String,
34
- required: true
35
- }
36
- });
37
- </script>
38
-
39
- <style lang="scss" scoped>
40
- @import '@/styles/custom/_vgCard.scss';
41
- </style>
1
+ <template>
2
+ <div class="card-container">
3
+ <div class="udvidet-card-container">
4
+ <a role="button" tabindex="0" class="udvidet-cardgruppe-card liste-layout" data-testid="link" :title="titel" :aria-label="titel">
5
+ <div class="text-wrapper">
6
+ <div>
7
+ <div class="text">
8
+ <div v-if="label" class="label-container">
9
+ <p class="h6 m-0 show-spaces break-word" data-testid="label">{{ label }}</p>
10
+ </div>
11
+ <div class="card-titel">
12
+ <h3 class="h4 line-limit mt-0 mb-3 break-word" data-testid="titel">{{ titel }}</h3>
13
+ </div>
14
+ <pre class="mt-0 mb-3 break-word line-limit">
15
+ <slot/>
16
+ </pre>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </a>
21
+ </div>
22
+ </div>
23
+ </template>
24
+
25
+ <script setup lang="ts">
26
+ defineProps({
27
+ label: {
28
+ type: String,
29
+ required: false,
30
+ default: undefined
31
+ },
32
+ titel: {
33
+ type: String,
34
+ required: true
35
+ }
36
+ });
37
+ </script>
38
+
39
+ <style lang="scss" scoped>
40
+ @import '@/styles/custom/_vgCard.scss';
41
+ </style>
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <button type="button" class="button mitid-button d-inline-flex align-items-center"><VgIcon icon="mitId" class="mr-4" />Log på med MitID</button>
3
+ </template>
4
+
5
+ <script setup lang="ts">
6
+ import VgIcon from '@/components/VgIcon.vue';
7
+ </script>