@dpa-id-components/dpa-shared-components 22.0.0-next.13 → 22.0.0-next.14

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 (82) hide show
  1. package/dist/components/UiCheckbox/UiCheckbox.vue.d.ts +1 -1
  2. package/dist/components/UiFilterButton/UiFilterButton.vue.d.ts +1 -1
  3. package/dist/components/UiInput/UiInput.vue.d.ts +1 -1
  4. package/dist/components/UiMenu/UiMenu.vue.d.ts +2 -2
  5. package/dist/components/UiMenu/UiMenuItem.vue.d.ts +1 -1
  6. package/dist/components/index.d.ts +1 -9
  7. package/dist/dpa-shared-components.js +1955 -2222
  8. package/dist/src/components/UiButtonGroup/UiButtonGroup.vue +1 -1
  9. package/dist/src/components/UiDatePicker/UiDatePicker.vue +1 -4
  10. package/dist/src/components/UiDialog/UiDialog.vue +7 -4
  11. package/dist/src/components/UiIconButton/UiIconButton.vue +1 -2
  12. package/dist/src/components/UiListItem/README.md +13 -12
  13. package/dist/src/components/UiListItem/UiListItem.stories.ts +0 -26
  14. package/dist/src/components/UiListItem/UiListItem.vue +1 -1
  15. package/dist/src/components/UiMenu/UiMenu.stories.ts +0 -1
  16. package/dist/src/components/UiMenu/UiMenu.vue +3 -4
  17. package/dist/src/components/index.ts +0 -16
  18. package/dist/style.css +2 -2
  19. package/package.json +11 -11
  20. package/src/components/UiButtonGroup/UiButtonGroup.vue +1 -1
  21. package/src/components/UiDatePicker/UiDatePicker.vue +1 -4
  22. package/src/components/UiDialog/UiDialog.vue +7 -4
  23. package/src/components/UiIconButton/UiIconButton.vue +1 -2
  24. package/src/components/UiListItem/README.md +13 -12
  25. package/src/components/UiListItem/UiListItem.vue +1 -1
  26. package/src/components/UiMenu/UiMenu.vue +3 -4
  27. package/dist/components/DpaMediaItem/DpaMediaItem.vue.d.ts +0 -43
  28. package/dist/components/UiCard/UiCard.vue.d.ts +0 -7
  29. package/dist/components/UiCheckBoxGroup/UiCheckBoxGroup.vue.d.ts +0 -33
  30. package/dist/components/UiCollapseNavigation/UiCollapseNavigation.vue.d.ts +0 -28
  31. package/dist/components/UiOverlay/UiOverlay.vue.d.ts +0 -18
  32. package/dist/components/UiOverlayMenu/UiOverlayMenu.vue.d.ts +0 -24
  33. package/dist/components/UiSection/UiSection.vue.d.ts +0 -29
  34. package/dist/components/UiSectionDivider/UiSectionDivider.vue.d.ts +0 -16
  35. package/dist/src/components/DpaMediaItem/DpaMediaItem.spec.ts +0 -123
  36. package/dist/src/components/DpaMediaItem/DpaMediaItem.stories.ts +0 -140
  37. package/dist/src/components/DpaMediaItem/DpaMediaItem.vue +0 -146
  38. package/dist/src/components/DpaMediaItem/README.md +0 -42
  39. package/dist/src/components/UiCard/README.md +0 -32
  40. package/dist/src/components/UiCard/UiCard.spec.ts +0 -16
  41. package/dist/src/components/UiCard/UiCard.stories.ts +0 -30
  42. package/dist/src/components/UiCard/UiCard.vue +0 -28
  43. package/dist/src/components/UiCheckBoxGroup/README.md +0 -35
  44. package/dist/src/components/UiCheckBoxGroup/UiCheckBoxGroup.spec.ts +0 -70
  45. package/dist/src/components/UiCheckBoxGroup/UiCheckBoxGroup.stories.ts +0 -59
  46. package/dist/src/components/UiCheckBoxGroup/UiCheckBoxGroup.vue +0 -106
  47. package/dist/src/components/UiCollapseNavigation/README.md +0 -37
  48. package/dist/src/components/UiCollapseNavigation/UiCollapseNavigation.spec.ts +0 -21
  49. package/dist/src/components/UiCollapseNavigation/UiCollapseNavigation.stories.ts +0 -67
  50. package/dist/src/components/UiCollapseNavigation/UiCollapseNavigation.vue +0 -79
  51. package/dist/src/components/UiOverlay/README.md +0 -38
  52. package/dist/src/components/UiOverlay/UiOverlay.spec.ts +0 -16
  53. package/dist/src/components/UiOverlay/UiOverlay.stories.ts +0 -22
  54. package/dist/src/components/UiOverlay/UiOverlay.vue +0 -36
  55. package/dist/src/components/UiOverlayMenu/README.md +0 -40
  56. package/dist/src/components/UiOverlayMenu/UiOverlayMenu.spec.ts +0 -33
  57. package/dist/src/components/UiOverlayMenu/UiOverlayMenu.stories.ts +0 -40
  58. package/dist/src/components/UiOverlayMenu/UiOverlayMenu.vue +0 -51
  59. package/dist/src/components/UiSection/README.md +0 -33
  60. package/dist/src/components/UiSection/UiSection.spec.ts +0 -49
  61. package/dist/src/components/UiSection/UiSection.stories.ts +0 -61
  62. package/dist/src/components/UiSection/UiSection.vue +0 -63
  63. package/dist/src/components/UiSectionDivider/README.md +0 -29
  64. package/dist/src/components/UiSectionDivider/UiSectionDivider.spec.ts +0 -19
  65. package/dist/src/components/UiSectionDivider/UiSectionDivider.stories.ts +0 -49
  66. package/dist/src/components/UiSectionDivider/UiSectionDivider.vue +0 -44
  67. package/src/components/DpaMediaItem/DpaMediaItem.vue +0 -146
  68. package/src/components/DpaMediaItem/README.md +0 -42
  69. package/src/components/UiCard/README.md +0 -32
  70. package/src/components/UiCard/UiCard.vue +0 -28
  71. package/src/components/UiCheckBoxGroup/README.md +0 -35
  72. package/src/components/UiCheckBoxGroup/UiCheckBoxGroup.vue +0 -106
  73. package/src/components/UiCollapseNavigation/README.md +0 -37
  74. package/src/components/UiCollapseNavigation/UiCollapseNavigation.vue +0 -79
  75. package/src/components/UiOverlay/README.md +0 -38
  76. package/src/components/UiOverlay/UiOverlay.vue +0 -36
  77. package/src/components/UiOverlayMenu/README.md +0 -40
  78. package/src/components/UiOverlayMenu/UiOverlayMenu.vue +0 -51
  79. package/src/components/UiSection/README.md +0 -33
  80. package/src/components/UiSection/UiSection.vue +0 -63
  81. package/src/components/UiSectionDivider/README.md +0 -29
  82. package/src/components/UiSectionDivider/UiSectionDivider.vue +0 -44
@@ -1,146 +0,0 @@
1
- <template>
2
- <div
3
- class="mb-px w-full bg-neutral pt-2 pr-4 pb-3 pl-3 md:pt-3"
4
- :class="classObject"
5
- data-testid="rootDiv"
6
- >
7
- <div
8
- class="flex"
9
- :class="{
10
- 'flex-col-reverse': $slots.timePublished,
11
- 'flex-col': !$slots.timePublished,
12
- 'px-1': isFulfilled,
13
- }"
14
- >
15
- <!-- Meta description -->
16
- <div class="flex items-center justify-between py-1">
17
- <div class="flex items-center pr-2">
18
- <UiIcon
19
- size="sm"
20
- :name="genreIcon"
21
- class="mr-2 shrink-0 fill-current text-neutral-subtle"
22
- />
23
- <span class="text-xs font-medium text-neutral-primary">
24
- <slot name="description" />
25
- </span>
26
- </div>
27
- <span
28
- v-if="$slots.planning"
29
- class="w-16 shrink-0 text-right text-xs text-neutral-subtle"
30
- ><slot name="planning"
31
- /></span>
32
- </div>
33
-
34
- <div class="flex flex-col">
35
- <!-- Image and headline -->
36
- <div v-if="imgSrc || $slots.default" class="flex py-1">
37
- <div v-if="imgSrc" class="relative mr-2 flex-none">
38
- <img
39
- :src="imgSrc"
40
- class="h-14 object-cover"
41
- :alt="`Thumbnail${imgAlt ? ` :${imgAlt}` : ''}`"
42
- />
43
- <span
44
- v-if="imgCount > 1"
45
- class="absolute right-1 bottom-1 inline-block h-4 rounded-full bg-neutral-primary px-1 align-middle text-xs/4 font-semibold text-neutral"
46
- data-testid="imageCount"
47
- >{{ imgCount }}</span
48
- >
49
- </div>
50
- <h3
51
- v-if="$slots.default"
52
- class="text-sm/5 font-medium group-hover:underline"
53
- :class="{
54
- 'ml-6': !isFulfilled,
55
- 'mr-1': $slots.planning,
56
- 'pr-16': $slots.planning,
57
- }"
58
- >
59
- <slot />
60
- </h3>
61
- </div>
62
-
63
- <!-- Text length -->
64
- <span
65
- v-if="$slots.textLength"
66
- class="text-xs text-neutral-subtle"
67
- :class="!isFulfilled ? 'ml-6' : ''"
68
- ><slot name="textLength"
69
- /></span>
70
- </div>
71
-
72
- <!-- Time published -->
73
- <span
74
- v-if="$slots.timePublished"
75
- class="pt-1 text-xs font-medium text-neutral-subtle"
76
- ><slot name="timePublished"
77
- /></span>
78
- </div>
79
- </div>
80
- </template>
81
- <script lang="ts">
82
- /**
83
- * @deprecated
84
- * Please replace with your own component
85
- */
86
- export default {
87
- name: "DpaMediaItem",
88
- };
89
- </script>
90
- <script setup lang="ts">
91
- import { computed, onMounted } from "vue";
92
-
93
- import UiIcon, { type UiIconName } from "../UiIcon/UiIcon.vue";
94
-
95
- type Genre = "audio" | "video" | "text" | "picture" | "graphic";
96
-
97
- const props = withDefaults(
98
- defineProps<{
99
- genre?: Genre;
100
- isFulfilled?: boolean;
101
- imgSrc?: string;
102
- imgAlt?: string;
103
- imgCount?: number;
104
- disabled?: boolean;
105
- }>(),
106
- {
107
- genre: "text",
108
- isFulfilled: false,
109
- imgSrc: "",
110
- imgAlt: "",
111
- imgCount: 0,
112
- disabled: false,
113
- },
114
- );
115
-
116
- const genreIcon = computed<UiIconName>(() => {
117
- const icons: Record<Genre, UiIconName> = {
118
- audio: props.isFulfilled ? "audio" : "audio",
119
- video: props.isFulfilled ? "video" : "video",
120
- text: props.isFulfilled ? "text" : "text",
121
- picture: props.isFulfilled ? "picture" : "picture",
122
- graphic: props.isFulfilled ? "graphic" : "graphic",
123
- };
124
-
125
- return icons[props.genre];
126
- });
127
-
128
- const classObject = computed(() => {
129
- const { isFulfilled } = props;
130
- if (!isFulfilled) {
131
- return "cursor-auto";
132
- }
133
- return props.disabled
134
- ? "cursor-not-allowed transition shadow-sm border border-neutral-faint"
135
- : "cursor-pointer transition shadow-sm hover:shadow-md group border border-neutral-faint hover:border-neutral-muted";
136
- });
137
-
138
- onMounted(() => {
139
- if (window.location.origin.includes("local")) {
140
- // eslint-disable-next-line no-console
141
- console.warn(
142
- "Component is deprecated. It will be removed in a future update.",
143
- );
144
- }
145
- });
146
- </script>
@@ -1,42 +0,0 @@
1
- # @deprecated
2
- Component will be removed in a future update
3
- # @dpa-shared-components/dpa-media-item
4
-
5
-
6
- ## Usage
7
-
8
- ```html
9
- <!-- SomeComponent.vue using DpaMediaItem -->
10
- <template>
11
- <dpa-media-item genre="text" is-fulfilled auto-size style="cursor: pointer;">
12
- <template #timePublished>15.11.2021 16:41</template>
13
- <tempate #description>News Feature im Basisdienst</tempate>
14
- <span>BKA-Chef: Cannabis bleibt beliebteste Droge in Deutschland</span>
15
- <template #textLength>104 dpa-Zeilen / 7176 Zeichen</template>
16
- </dpa-media-item>
17
- </template>
18
-
19
- <script setup>
20
- import DpaMediaItem from "@dpa-id-components/dpa-shared-components";
21
- </script>
22
- ```
23
-
24
- ## API
25
-
26
- ### Props
27
- | Name | Type | Default | Description |
28
- |---------------|--------------------------------------------------------------------------|----------|------------------------------------------------------------------------------------|
29
- | `genre` | `"audio" &#124; "video" &#124; "text" &#124; "picture" &#124; "graphic"` | `"text"` | Genre variant; either `"text"`, `"picture"` , `"graphic"`, `"video"` or `"audio"` |
30
- | `isFulfilled` | `Boolean` | `false` | Whether the media item has been fulfilled/delivered (`true`), or planned (`false`) |
31
- | `imgSrc` | `String` | `""` | The `src` attribute of the `img` tag used for the thumbnail of pictures |
32
- | `imgAlt` | `String` | `""` | The `alt` attribute of the `img` tag used for the thumbnail of pictures |
33
- | `imgCount` | `Number` | `0` | The number of pictures published in this media coverage item |
34
- | `disabled` | `Boolean` | `false` | Sets the cursor and hover state of the DpaMediaItem |
35
- ### Slots
36
- | Name | Description |
37
- |-----------------|-------------------------------------------------------------------------------------------------|
38
- | `default` | slot for the media item's headline/title |
39
- | `timePublished` | slot for the media item's time of publishing for fulfilled items |
40
- | `description` | slot for the media item's description placed above the headline |
41
- | `planning` | slot for the media item's planning notes (e.g. schedule) placed to the right of the description |
42
- | `textLength` | slot for the media item's text length (e.g. schedule) placed below the description/headline |
@@ -1,32 +0,0 @@
1
- # @deprecated
2
- Component will be removed in a future update
3
- # @dpa-shared-components/UiCard
4
-
5
- ## Usage
6
-
7
- ```html
8
- <!-- SomeComponent.vue using UiCard -->
9
- <template>
10
- <UiCard>Autor: Max Mustermann (Berlin), +49 30 1234-56478, max.mustermann@dpa.com</UiCard>
11
- </template>
12
-
13
- <script setup lang="ts">
14
- import { UiCard } from "@dpa-id-components/dpa-shared-components";
15
- </script>
16
- ```
17
-
18
- ## API
19
-
20
- ### Props
21
-
22
- This component has no properties
23
-
24
- ### Events
25
-
26
- This component emits no events
27
-
28
- ### Slots
29
-
30
- | Name | Description |
31
- |-----------|--------------------------------------------|
32
- | `default` | Slot for the rendering the cards's content |
@@ -1,28 +0,0 @@
1
- <template>
2
- <li
3
- class="mb-4 rounded-2xl bg-neutral-whisper px-8 py-4 text-sm font-medium sm:w-full md:mr-7 md:w-[45.5%] lg:mr-8 lg:w-[46.5%]"
4
- >
5
- <slot></slot>
6
- </li>
7
- </template>
8
- <script lang="ts">
9
- import { onMounted } from "vue";
10
-
11
- /**
12
- * @deprecated
13
- * Please replace with your own component
14
- */
15
- export default {
16
- name: "UiCard",
17
- setup() {
18
- onMounted(() => {
19
- if (window.location.origin.includes("local")) {
20
- // eslint-disable-next-line no-console
21
- console.warn(
22
- "Component is deprecated. It will be removed in a future update.",
23
- );
24
- }
25
- });
26
- },
27
- };
28
- </script>
@@ -1,35 +0,0 @@
1
- # @deprecated
2
- Component will be removed in a future update
3
- # @dpa-shared-components/UiCheckBoxGroup
4
-
5
- ## Usage
6
-
7
- ```html
8
- <!-- SomeComponent.vue using UiCheckBoxGroup -->
9
-
10
- <template>
11
- <UiCheckBoxGroup :item="checkboxes" :first-entry-checks-all="true" @item-checked="handleEvent"
12
- @checked-all="handleEvent" />
13
- </template>
14
-
15
- <script setup lang="ts">
16
- import { UiCheckBoxGroup } from "@dpa-id-components/dpa-shared-components";
17
- </script>
18
-
19
- ```
20
- ### Props
21
-
22
- The "CheckboxItem"-Type is used. Consisting of "name", "isChecked" and "iconName"
23
-
24
- | Name | Type | Default | Description |
25
- |-----------------------|----------------|---------|--------------------------------------------------------------------------------------------------|
26
- | `item` | `CheckboxItem` | `` | Adds the value to the checkbox, consiting of name, isChecked and iconName ("CheckboxItem"-Type) |
27
- | `firstEntryChecksAll` | `Boolean` | `false` | Wether the first item checks all the boxes |
28
-
29
- ### Events
30
-
31
- | Name | Type | Description |
32
- |----------------|------|----------------------------------------------|
33
- | `checked-all` | `boolean` | Emitted when all items are selected |
34
- | `input` | `CheckboxItem[]` | |
35
- | `item-checked` | `CheckboxItem` | Emitted when each individual item is checked |
@@ -1,106 +0,0 @@
1
- <template>
2
- <UiList class="grid grid-cols-2 flex-wrap border-none pt-2 lg:flex lg:pt-0">
3
- <UiListItem
4
- v-for="(entry, index) in checkboxItems"
5
- :key="entry.name"
6
- :is-checked="entry.isChecked"
7
- class="flex h-8 items-center border-none py-2 text-sm shadow-none lg:py-3"
8
- check-box-menu
9
- :disabled="disabled"
10
- :icon-name="entry.iconName"
11
- @list-item-click="toggle(index)"
12
- >{{ entry.name }}
13
- </UiListItem>
14
- </UiList>
15
- </template>
16
- <script lang="ts">
17
- /**
18
- * @deprecated
19
- * Please replace with your own component
20
- */
21
- export default {
22
- name: "UiCheckBoxGroup",
23
- };
24
-
25
- export type CheckboxItem = {
26
- name: string;
27
- isChecked: boolean;
28
- iconName?: UiIconName;
29
- };
30
- </script>
31
- <script setup lang="ts">
32
- import { computed, onMounted, ref, watchEffect } from "vue";
33
-
34
- import type { UiIconName } from "../UiIcon/UiIcon.vue";
35
- import UiList from "../UiList/UiList.vue";
36
- import UiListItem from "../UiListItem/UiListItem.vue";
37
-
38
- const emit = defineEmits<{
39
- "checked-all": [boolean];
40
- input: [CheckboxItem[]];
41
- "item-checked": [CheckboxItem];
42
- }>();
43
-
44
- const props = withDefaults(
45
- defineProps<{
46
- item?: CheckboxItem[];
47
- firstEntryChecksAll?: boolean;
48
- disabled?: boolean;
49
- }>(),
50
- {
51
- item: () => [],
52
- firstEntryChecksAll: false,
53
- disabled: false,
54
- },
55
- );
56
-
57
- const checkboxItems = ref<CheckboxItem[]>(props.item);
58
-
59
- watchEffect(() => {
60
- checkboxItems.value = props.item;
61
- });
62
-
63
- const areAllChecked = computed(() => {
64
- const checkboxEntries = checkboxItems.value.slice(1);
65
- return checkboxEntries.every((entry: CheckboxItem) => entry.isChecked);
66
- });
67
-
68
- const toggleAll = () => {
69
- checkboxItems.value = checkboxItems.value.map((entry: CheckboxItem) => {
70
- const isChecked = !checkboxItems.value[0].isChecked;
71
- return {
72
- ...entry,
73
- isChecked,
74
- };
75
- });
76
- emit("checked-all", checkboxItems.value[0].isChecked);
77
- emit("input", checkboxItems.value);
78
- };
79
-
80
- const toggle = (index: number) => {
81
- // With List Item Click we are overriding the normal checkbox `input` event, hence the disabled attribute has no effect
82
- if (props.disabled) {
83
- return;
84
- }
85
- if (index === 0 && props.firstEntryChecksAll) {
86
- toggleAll();
87
- } else {
88
- checkboxItems.value[index].isChecked =
89
- !checkboxItems.value[index].isChecked;
90
- if (props.firstEntryChecksAll) {
91
- checkboxItems.value[0].isChecked = areAllChecked.value;
92
- }
93
- }
94
- emit("item-checked", checkboxItems.value[index]);
95
- emit("input", checkboxItems.value);
96
- };
97
-
98
- onMounted(() => {
99
- if (window.location.origin.includes("local")) {
100
- // eslint-disable-next-line no-console
101
- console.warn(
102
- "Component is deprecated. It will be removed in a future update.",
103
- );
104
- }
105
- });
106
- </script>
@@ -1,37 +0,0 @@
1
- # @deprecated
2
- Component will be removed in a future update
3
- # @dpa-shared-components/UiCollapseNavigation
4
-
5
- ## Usage
6
-
7
- ```html
8
- <!-- SomeComponent.vue using UiCollapseNavigation -->
9
- <template>
10
- <UiCollapseNavigation headline="Menu eins">
11
- <UiButton> test eins </UiButton>
12
- <UiButton> test zwei </UiButton>
13
- <UiButton> test drei </UiButton>
14
- </UiCollapseNavigation>
15
- </template>
16
-
17
- <script>
18
- import UiCollapseNavigation from "./UiCollapseNavigation.vue";
19
- </script>
20
- ```
21
-
22
- ## API
23
-
24
- ### Props
25
-
26
- | Name | Type | Default | Description |
27
- |-----------------|---------|---------|-----------------------------------|
28
- | `headline` | string | '' | Headline of the menu |
29
- | `borderTop` | boolean | true | Has top border |
30
- | `openAsDefault` | boolean | true | defines default state of the menu |
31
-
32
-
33
- ### Slots
34
-
35
- | Name | Description |
36
- |-----------|----------------------------|
37
- | `default` | slot for the menus content |
@@ -1,79 +0,0 @@
1
- <template>
2
- <div :class="hasBorderTop ? 'border-t border-t-neutral-faint' : ''" />
3
- <UiButton
4
- appearance="outline-emphasis"
5
- class="flex w-full justify-between border-none"
6
- @click="toggleMenuHandler"
7
- >
8
- <h3
9
- class="text-xs font-semibold tracking-widest text-neutral-subtle uppercase"
10
- >
11
- {{ headline }}
12
- </h3>
13
- <UiIcon
14
- name="chevron-down"
15
- class="rounded-full text-neutral-subtle transition-transform duration-500 hover:bg-neutral-faint"
16
- :class="{ 'rotate-180': openMenu }"
17
- />
18
- </UiButton>
19
- <transition
20
- enter-active-class="duration-200"
21
- enter-from-class="transform -translate-y-[20px] opacity-0"
22
- enter-to-class="transform translate-y-0 opacity-1"
23
- leave-active-class="duration-200"
24
- leave-from-class="transform translate-y-0 opacity-1"
25
- leave-to-class="transform -translate-y-[20px] opacity-0"
26
- >
27
- <div v-if="openMenu">
28
- <slot />
29
- </div>
30
- </transition>
31
- </template>
32
- <script lang="ts">
33
- /**
34
- * @deprecated
35
- * Please replace with your own component
36
- */
37
- export default {
38
- name: "UiCollapseNavigation",
39
- };
40
- </script>
41
- <script setup lang="ts">
42
- import { onMounted, ref, watchEffect } from "vue";
43
-
44
- import UiButton from "../UiButton/UiButton.vue";
45
- import UiIcon from "../UiIcon/UiIcon.vue";
46
-
47
- const props = withDefaults(
48
- defineProps<{
49
- headline?: string;
50
- hasBorderTop?: boolean;
51
- openAsDefault?: boolean;
52
- }>(),
53
- {
54
- headline: "",
55
- hasBorderTop: true,
56
- openAsDefault: true,
57
- },
58
- );
59
-
60
- const openMenu = ref();
61
-
62
- watchEffect(() => {
63
- openMenu.value = props.openAsDefault;
64
- });
65
-
66
- const toggleMenuHandler = () => {
67
- openMenu.value = !openMenu.value;
68
- };
69
-
70
- onMounted(() => {
71
- if (window.location.origin.includes("local")) {
72
- // eslint-disable-next-line no-console
73
- console.warn(
74
- "Component is deprecated. It will be removed in a future update.",
75
- );
76
- }
77
- });
78
- defineExpose({ openMenu });
79
- </script>
@@ -1,38 +0,0 @@
1
- # @deprecated
2
- Component will be removed in a future update
3
- # @dpa-shared-components/UiOverlay
4
-
5
- ## Usage
6
-
7
- ```html
8
- <!-- SomeComponent.vue using UiOverlay -->
9
- <template>
10
- <UiOverlay>
11
- <div class='grid place-items-center'>
12
- <span class='text-neutral'>Here is a Overlay</span>
13
- </div>
14
- </UiOverlay>
15
- </template>
16
-
17
- <script setup lang="ts">
18
- import {UiOverlay} from "@dpa-id-components/dpa-shared-components";
19
- </script>
20
- ```
21
-
22
- ## API
23
-
24
- ### Props
25
-
26
- This component has no properties
27
-
28
- ### Events
29
-
30
- | Name | Type | Description |
31
- |---------|--------------|------------------------------------|
32
- | `close` | none | Emitted when the Overlay is closed |
33
-
34
- ### Slots
35
-
36
- | Name | Description |
37
- |-----------|----------------------------------------------|
38
- | `default` | slot for the rendering the overlay's content |
@@ -1,36 +0,0 @@
1
- <template>
2
- <div class="fixed inset-0 z-50 max-h-screen" role="dialog">
3
- <div
4
- class="fixed inset-0 h-screen bg-black opacity-60"
5
- data-testid="background"
6
- style="z-index: -1"
7
- @click="emit('close')"
8
- />
9
- <slot />
10
- </div>
11
- </template>
12
- <script lang="ts">
13
- /**
14
- * @deprecated
15
- * Please replace with your own component
16
- */
17
- export default {
18
- name: "UiOverlay",
19
- };
20
- </script>
21
- <script setup lang="ts">
22
- import { onMounted } from "vue";
23
-
24
- const emit = defineEmits<{
25
- close: [];
26
- }>();
27
-
28
- onMounted(() => {
29
- if (window.location.origin.includes("local")) {
30
- // eslint-disable-next-line no-console
31
- console.warn(
32
- "Component is deprecated. It will be removed in a future update.",
33
- );
34
- }
35
- });
36
- </script>
@@ -1,40 +0,0 @@
1
- # @deprecated
2
- Component will be removed in a future update
3
- # @dpa-shared-components/UiOverlayMenu
4
-
5
- ## Usage
6
-
7
- ```html
8
- <!-- SomeComponent.vue using UiOverlay -->
9
- <template>
10
- <UiOverlayMenu :is-open="true">
11
- <div class='grid place-items-center'>
12
- <span class='text-neutral'>Here is Content</span>
13
- </div>
14
- </UiOverlayMenu>
15
- </template>
16
-
17
- <script setup lang="ts">
18
- import {UiOverlay} from "@dpa-id-components/dpa-shared-components";
19
- </script>
20
- ```
21
-
22
- ## API
23
-
24
- ### Props
25
-
26
- | Name | Type | Default | Description |
27
- |----------|-----------|---------|--------------------------------------------|
28
- | `isOpen` | `boolean` | `false` | controls if Overlay Menu is open or closed |
29
-
30
- ### Events
31
-
32
- | Name | Type | Description |
33
- |---------|--------------|---------------------------------------------------|
34
- | `close` | none | Emitted when the clicked outside the Overlay Menu |
35
-
36
- ### Slots
37
-
38
- | Name | Description |
39
- |-----------|---------------------------------------------------|
40
- | `default` | slot for the rendering the overlay menu's content |
@@ -1,51 +0,0 @@
1
- <template>
2
- <div
3
- v-show="isOpen"
4
- v-click-away="close"
5
- class="relative size-full border-none"
6
- >
7
- <div
8
- class="absolute top-12 right-3 z-10 block border-t bg-neutral px-4 py-3 shadow-lg"
9
- >
10
- <slot />
11
- </div>
12
- </div>
13
- </template>
14
- <script lang="ts">
15
- /**
16
- * @deprecated
17
- * Please replace with your own component
18
- */
19
- export default {
20
- name: "UiOverlayMenu",
21
- };
22
- </script>
23
- <script setup lang="ts">
24
- import { onMounted } from "vue";
25
-
26
- import { vClickAway } from "../../directives/vClickAway.ts";
27
-
28
- withDefaults(
29
- defineProps<{
30
- isOpen?: boolean;
31
- }>(),
32
- {
33
- isOpen: false,
34
- },
35
- );
36
- const emit = defineEmits<{
37
- close: [];
38
- }>();
39
- const close = (): void => {
40
- emit("close");
41
- };
42
-
43
- onMounted(() => {
44
- if (window.location.origin.includes("local")) {
45
- // eslint-disable-next-line no-console
46
- console.warn(
47
- "Component is deprecated. It will be removed in a future update.",
48
- );
49
- }
50
- });
51
- </script>