srcdev-nuxt-components 3.0.0 → 4.0.1

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 (90) hide show
  1. package/assets/styles/a11y/_utils.css +20 -0
  2. package/assets/styles/a11y/_variables.css +8 -0
  3. package/assets/styles/a11y/index.css +2 -0
  4. package/assets/styles/forms/index.css +2 -0
  5. package/assets/styles/forms/themes/_error.css +77 -0
  6. package/assets/styles/forms/themes/_ghost.css +77 -0
  7. package/assets/styles/forms/themes/_input-action.css +20 -0
  8. package/assets/styles/forms/themes/_primary.css +82 -0
  9. package/assets/styles/forms/themes/_secondary.css +77 -0
  10. package/assets/styles/forms/themes/_success.css +77 -0
  11. package/assets/styles/forms/themes/_tertiary.css +77 -0
  12. package/assets/styles/forms/themes/_warning.css +77 -0
  13. package/assets/styles/forms/themes/index.css +8 -0
  14. package/assets/styles/forms/variables/_sizes.css +82 -0
  15. package/assets/styles/forms/variables/_theme.css +11 -0
  16. package/assets/styles/forms/variables/index.css +2 -0
  17. package/assets/styles/main.css +5 -0
  18. package/assets/styles/typography/index.css +2 -0
  19. package/assets/styles/typography/utils/_font-classes.css +160 -0
  20. package/assets/styles/typography/utils/_weights.css +69 -0
  21. package/assets/styles/typography/utils/index.css +2 -0
  22. package/assets/styles/typography/variables/_colors.css +14 -0
  23. package/assets/styles/typography/variables/_reponsive-font-size.css +10 -0
  24. package/assets/styles/typography/variables/index.css +2 -0
  25. package/assets/styles/utils/_animations.css +42 -0
  26. package/assets/styles/utils/_canvasWidths.css +18 -0
  27. package/assets/styles/utils/_display.css +7 -0
  28. package/assets/styles/utils/_margin-helpers.css +334 -0
  29. package/assets/styles/utils/_padding-helpers.css +308 -0
  30. package/assets/styles/utils/_page.css +24 -0
  31. package/assets/styles/utils/_placement.css +73 -0
  32. package/assets/styles/utils/index.css +7 -0
  33. package/assets/styles/variables/colors/_blue.css +15 -0
  34. package/assets/styles/variables/colors/_gray.css +16 -0
  35. package/assets/styles/variables/colors/_green.css +15 -0
  36. package/assets/styles/variables/colors/_orange.css +15 -0
  37. package/assets/styles/variables/colors/_red.css +15 -0
  38. package/assets/styles/variables/colors/_yellow.css +15 -0
  39. package/assets/styles/variables/colors/colors.css +6 -0
  40. package/assets/styles/variables/components/_accordian.css +7 -0
  41. package/assets/styles/variables/components/_container-glow-core.css +16 -0
  42. package/assets/styles/variables/components/_display-dialog-core.css +35 -0
  43. package/assets/styles/variables/components/_tabs.css +18 -0
  44. package/assets/styles/variables/components/display-prompt-core/_scaffolding.css +57 -0
  45. package/assets/styles/variables/components/display-prompt-core/index.css +2 -0
  46. package/assets/styles/variables/components/display-prompt-core/themes/_error.css +39 -0
  47. package/assets/styles/variables/components/display-prompt-core/themes/_info.css +39 -0
  48. package/assets/styles/variables/components/display-prompt-core/themes/_success.css +39 -0
  49. package/assets/styles/variables/components/display-prompt-core/themes/_warning.css +39 -0
  50. package/assets/styles/variables/components/display-prompt-core/themes/index.css +4 -0
  51. package/assets/styles/variables/components/index.css +5 -0
  52. package/assets/styles/variables/index.css +2 -0
  53. package/components/animated-svg-text/AnimatedSvgText.vue +87 -0
  54. package/components/canvas-switcher/CanvasSwitcher.vue +77 -0
  55. package/components/carousel-basic/CarouselBasic.vue +241 -0
  56. package/components/carousel-basic/CarouselFlip.vue +378 -0
  57. package/components/clip-element/ClipElement.vue +73 -0
  58. package/components/clipped-panels/ClippedPanel.vue +73 -0
  59. package/components/deep-expanding-menu/DeepExpandingMenu.vue +214 -0
  60. package/components/deep-expanding-menu/DeepExpandingMenuOld.vue +218 -0
  61. package/components/display-banner/DisplayBanner.vue +63 -0
  62. package/components/display-details/DisplayDetailsCore.vue +312 -0
  63. package/components/functional/accordian/AccordianCore.vue +138 -0
  64. package/components/functional/display-dialog/DisplayDialogCore.vue +244 -0
  65. package/components/functional/display-dialog/variants/DisplayDialogConfirm.vue +45 -0
  66. package/components/functional/display-dialog/variants/DisplayDialogScrollableContent.vue +49 -0
  67. package/components/functional/pop-over/PopOver.vue +88 -0
  68. package/components/image-galleries/SliderGallery.vue +784 -0
  69. package/components/masonry-grid-ordered/MasonryGridOrdered.vue +158 -0
  70. package/components/presentation/container-glow/ContainerGlowCore.vue +211 -0
  71. package/components/presentation/display-grid/DisplayGridCore.vue +22 -0
  72. package/components/presentation/display-prompt/DisplayPromptCore.vue +150 -0
  73. package/components/presentation/display-prompt/variants/DisplayPromptError.vue +53 -0
  74. package/components/presentation/layout-grids/LayoutGridA.vue +103 -0
  75. package/components/presentation/layout-grids/LayoutGridB.vue +132 -0
  76. package/components/presentation/layout-row/LayoutRow.vue +157 -0
  77. package/components/presentation/masonry-grid/MasonryGrid.vue +62 -0
  78. package/components/presentation/masonry-grid-sorted/MasonryGridSorted.vue +115 -0
  79. package/components/presentation/tabs/TabsCore.vue +308 -0
  80. package/components/responsive-header/NavigationItems.vue +164 -0
  81. package/components/responsive-header/ResponsiveHeader.vue +586 -0
  82. package/components/rotating-carousel/RotatingCarouselImage.vue +200 -0
  83. package/composables/useDialogControls.ts +23 -0
  84. package/composables/useStyleClassPassthrough.ts +35 -0
  85. package/composables/useTabs.ts +201 -0
  86. package/nuxt.config.ts +0 -3
  87. package/package.json +7 -7
  88. package/types/gallery-data.ts +13 -0
  89. package/types/responsiveHeader.ts +38 -0
  90. package/types/types.carousel-basic.ts +19 -0
@@ -0,0 +1,73 @@
1
+ <template>
2
+ <component :is="tag" class="clipped-panel" :class="[variant, elementClasses]">
3
+ <slot name="default"></slot>
4
+ </component>
5
+ </template>
6
+
7
+ <script lang="ts">
8
+ const TAGS_ALLOWED = <string[]>['div', 'p', 'span', 'section', 'article', 'aside', 'header', 'footer', 'main', 'nav', 'ul', 'ol'];
9
+ </script>
10
+
11
+ <script setup lang="ts">
12
+ const props = defineProps({
13
+ tag: {
14
+ type: String,
15
+ default: 'div',
16
+ validator(value: string) {
17
+ return TAGS_ALLOWED.includes(value);
18
+ },
19
+ },
20
+ variant: {
21
+ type: String,
22
+ default: 'square',
23
+ validator(value: string) {
24
+ return ['circle-cutout', 'rectangle', 'square'].includes(value);
25
+ },
26
+ },
27
+ styleClassPassthrough: {
28
+ type: Array as PropType<string[]>,
29
+ default: () => [],
30
+ },
31
+ });
32
+
33
+ const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
34
+
35
+ watch(
36
+ () => props.styleClassPassthrough,
37
+ () => {
38
+ resetElementClasses(props.styleClassPassthrough);
39
+ }
40
+ );
41
+ </script>
42
+
43
+ <style lang="css">
44
+ .clipped-panel {
45
+ --_foreground-color: light-dark(hsl(0, 29%, 3%), hsl(0, 0%, 92%));
46
+
47
+ /* Component styles */
48
+
49
+ background-color: red;
50
+ /* color: var(--_foreground-color); */
51
+ outline: 1px solid var(--_foreground-color);
52
+ /* box-shadow: 5px 5px 5px 5px white; */
53
+
54
+ aspect-ratio: 1;
55
+
56
+ &.rectangle {
57
+
58
+ --_max-x-position: 300px;
59
+ --_curve-radius: 10px;
60
+
61
+ clip-path: path('M 10, 50 L 140, 50 A 10, 10, 0, 0, 0 150, 40 L 150, 10 A 10, 10, 0, 0, 1 160, 0 L 290, 0 A 10, 10, 0, 0, 1 300, 10 L 300, 190 A 10, 10, 0, 0, 1 290, 200 L 10, 200 A 10, 10, 0, 0, 1 0, 190 L 0, 60 A 10, 10, 0, 0, 1 10, 50 Z');
62
+ width: 300px;
63
+ }
64
+ &.square {
65
+ /* clip-path: path('M 10, 50 L 90, 50 A 10, 10, 0, 0, 0 100, 40 L 100, 10 L 110, 0 L 190, 0 L 200, 10 L 200, 190 L 190, 200 L 10, 200 L 0, 190 L 0, 60 L 10, 50 Z'); */
66
+ clip-path: path('M 10, 50 L 90, 50 A 10, 10, 0, 0, 0 100, 40 L 100, 10 A 10, 10, 0, 0, 1 110, 0 L 190, 0 A 10, 10, 0, 0, 1 200, 10 L 200, 190 A 10, 10, 0, 0, 1 190, 200 L 10, 200 A 10, 10, 0, 0, 1 0, 190 L 0, 60 A 10, 10, 0, 0, 1 10, 50 Z');
67
+ width: 200px;
68
+ }
69
+ &.circle-cutout {
70
+ clip-path: path('M Z');
71
+ }
72
+ }
73
+ </style>
@@ -0,0 +1,214 @@
1
+ <template>
2
+ <component :is="tag" class="deep-expanding-menu" :class="[elementClasses]">
3
+ <div class="inner">
4
+ <template v-for="(link, key) in navLinks" :key="key">
5
+ <NuxtLink v-if="link.path" :to="link.path" class="navigation-link">{{ link.name }}</NuxtLink>
6
+
7
+ <div v-else class="navigation-group" :style="`--_anchor-name: --anchor-nav-1-${key};`" ref="detailsRef">
8
+ <button :popovertarget="`popovertarget-nav-1-${key}`" class="navigation-group-toggle">
9
+ <span>{{ link.name }}</span>
10
+ <Icon name="bi:caret-down-fill" class="icon" />
11
+ </button>
12
+
13
+ <div class="navigation-group-panel" popover role="menu" :id="`popovertarget-nav-1-${key}`">
14
+ <h4 class="heading-4 mb-6">{{ link.childLinksTitle }}</h4>
15
+ <ul class="navigation-group-list">
16
+ <li class="navigation-group-item" v-for="childLink in link.childLinks" :key="childLink.name">
17
+ <NuxtLink :to="childLink.path" class="navigation-group-link">{{ childLink.name }}</NuxtLink>
18
+ </li>
19
+ </ul>
20
+ </div>
21
+ </div>
22
+ </template>
23
+ </div>
24
+ </component>
25
+ </template>
26
+
27
+ <script lang="ts">
28
+ const TAGS_ALLOWED = <string[]>['div', 'section', 'nav', 'ul', 'ol'];
29
+
30
+ interface ResponsiveHeaderNavItem {
31
+ name: string;
32
+ path?: string;
33
+ isExternal?: boolean;
34
+ childLinks?: ResponsiveHeaderNavItem[];
35
+ childLinksTitle?: string;
36
+ }
37
+ </script>
38
+
39
+ <script setup lang="ts">
40
+ const props = defineProps({
41
+ tag: {
42
+ type: String,
43
+ default: 'nav',
44
+ validator(value: string) {
45
+ return TAGS_ALLOWED.includes(value);
46
+ },
47
+ },
48
+ navLinks: {
49
+ type: Array as PropType<ResponsiveHeaderNavItem[]>,
50
+ default: () => [],
51
+ },
52
+ styleClassPassthrough: {
53
+ type: Array as PropType<string[]>,
54
+ default: () => [],
55
+ },
56
+ });
57
+
58
+ const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
59
+ // const detailsRef = useTemplateRef('detailsRef');
60
+
61
+ watch(
62
+ () => props.styleClassPassthrough,
63
+ () => {
64
+ resetElementClasses(props.styleClassPassthrough);
65
+ }
66
+ );
67
+ </script>
68
+
69
+ <style lang="css">
70
+ @layer deep-expanding-menu-setup {
71
+ @position-try --anchor-left {
72
+ inset: auto;
73
+ top: calc(anchor(bottom) + 10px);
74
+ left: calc(anchor(left) + 10px);
75
+ }
76
+
77
+ @position-try-fallbacks --anchor-right {
78
+ inset: auto;
79
+ top: calc(anchor(bottom) + 10px);
80
+ right: calc(anchor(right) + 10px);
81
+ }
82
+
83
+ .deep-expanding-menu {
84
+ --_gap-between-top-level-items: 24px;
85
+
86
+ container-type: inline-size;
87
+ display: grid;
88
+ grid-template-areas: 'element-stack';
89
+
90
+ .inner {
91
+ grid-area: element-stack;
92
+ display: flex;
93
+ gap: var(--_gap-between-top-level-items);
94
+ align-items: center;
95
+
96
+ .navigation-link,
97
+ .navigation-group-toggle {
98
+ all: unset;
99
+ border-bottom: 2px solid transparent;
100
+ padding-block: 8px;
101
+
102
+ transition: border-color 200ms;
103
+
104
+ &:hover {
105
+ cursor: pointer;
106
+ border-color: light-dark(var(--blue-12), var(--gray-0));
107
+ }
108
+
109
+ &:focus {
110
+ border-color: light-dark(var(--blue-12), var(--gray-0));
111
+ }
112
+
113
+ &:focus-visible {
114
+ border-color: light-dark(var(--blue-12), var(--gray-0));
115
+ }
116
+ }
117
+
118
+ .navigation-group {
119
+ --_icon-transform: scaleY(1);
120
+ position: relative;
121
+
122
+ .navigation-group-toggle {
123
+ anchor-name: var(--_anchor-name);
124
+
125
+ display: flex;
126
+ align-items: center;
127
+ gap: 12px;
128
+
129
+ .icon {
130
+ display: block;
131
+ font-size: 1.2rem;
132
+
133
+ transform: var(--_icon-transform);
134
+ transition: transform 200ms;
135
+ }
136
+ }
137
+
138
+ .navigation-group-panel {
139
+ display: none;
140
+ position: absolute;
141
+ position-anchor: var(--_anchor-name);
142
+ margin: 0;
143
+ /* inset: auto; */
144
+ top: calc(anchor(bottom) + 10px);
145
+ left: calc(anchor(left) + 0px);
146
+
147
+ opacity: 0;
148
+ transition: opacity 200ms, display 200ms, overlay 200ms;
149
+ transition-behavior: allow-discrete;
150
+
151
+ width: min(100%, 50vw);
152
+
153
+ background-color: white;
154
+ border: 1px solid black;
155
+ border-radius: 12px;
156
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
157
+ padding: 12px;
158
+ overflow: clip;
159
+
160
+ &:popover-open {
161
+ display: block;
162
+ opacity: 1;
163
+
164
+ @starting-style {
165
+ display: block;
166
+ opacity: 0;
167
+ }
168
+ }
169
+
170
+ h4 {
171
+ color: var(--gray-12);
172
+ }
173
+
174
+ .navigation-group-list {
175
+ display: grid;
176
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
177
+ gap: 12px;
178
+ padding-inline-start: 0;
179
+ margin-block-end: 8px;
180
+
181
+ .navigation-group-item {
182
+ display: block;
183
+
184
+ a.navigation-group-link {
185
+ display: inline-block;
186
+ color: var(--gray-12);
187
+ text-decoration: none;
188
+ padding-block: 8px;
189
+
190
+ border-bottom: 2px solid transparent;
191
+
192
+ transition: border-color 200ms;
193
+
194
+ &:hover {
195
+ cursor: pointer;
196
+ border-color: var(--gray-12);
197
+ }
198
+
199
+ &:focus-visible {
200
+ border-color: var(--gray-12);
201
+ }
202
+ }
203
+ }
204
+ }
205
+ }
206
+
207
+ &:has(.navigation-group-panel:popover-open) {
208
+ --_icon-transform: scaleY(-1);
209
+ }
210
+ }
211
+ }
212
+ }
213
+ }
214
+ </style>
@@ -0,0 +1,218 @@
1
+ <template>
2
+ <component :is="tag" class="deep-expanding-menu-old" :class="[elementClasses]">
3
+ <div class="inner">
4
+ <template v-for="(link, key) in navLinks" :key="key">
5
+ <NuxtLink v-if="link.path" :to="link.path" class="navigation-link">{{ link.name }}</NuxtLink>
6
+ <details v-else class="navigation-group" name="navigation-group" ref="navigationGroupRef">
7
+ <summary class="navigation-group-toggle">
8
+ <span>{{ link.name }}</span>
9
+ <Icon name="bi:caret-down-fill" class="icon" />
10
+ </summary>
11
+ <div class="navigation-group-panel" :id="`popovertarget-nav-1-${key}`">
12
+ <h4 class="heading-4 mb-6">{{ link.childLinksTitle }}</h4>
13
+ <ul class="navigation-group-list">
14
+ <li class="navigation-group-item" v-for="childLink in link.childLinks" :key="childLink.name">
15
+ <NuxtLink :to="childLink.path" class="navigation-group-link">{{ childLink.name }}</NuxtLink>
16
+ </li>
17
+ </ul>
18
+ </div>
19
+ </details>
20
+ </template>
21
+ </div>
22
+ </component>
23
+ </template>
24
+
25
+ <script setup lang="ts">
26
+ import { onClickOutside } from '@vueuse/core';
27
+
28
+ const props = defineProps({
29
+ tag: {
30
+ type: String,
31
+ default: 'nav',
32
+ validator(value: string) {
33
+ return TAGS_ALLOWED.includes(value);
34
+ },
35
+ },
36
+ navLinks: {
37
+ type: Array as PropType<ResponsiveHeaderNavItem[]>,
38
+ default: () => [],
39
+ },
40
+ styleClassPassthrough: {
41
+ type: Array as PropType<string[]>,
42
+ default: () => [],
43
+ },
44
+ });
45
+
46
+ const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
47
+
48
+ const navigationGroupRef = useTemplateRef<HTMLElement[]>('navigationGroupRef');
49
+
50
+ watch(
51
+ () => props.styleClassPassthrough,
52
+ () => {
53
+ resetElementClasses(props.styleClassPassthrough);
54
+ }
55
+ );
56
+
57
+ onMounted(() => {
58
+ navigationGroupRef.value?.forEach((element, index) => {
59
+ onClickOutside(element, () => {
60
+ navigationGroupRef.value?.[index]?.removeAttribute('open');
61
+ });
62
+ });
63
+ });
64
+ </script>
65
+
66
+ <script lang="ts">
67
+ const TAGS_ALLOWED = <string[]>['div', 'section', 'nav', 'ul', 'ol'];
68
+
69
+ interface ResponsiveHeaderNavItem {
70
+ name: string;
71
+ path?: string;
72
+ isExternal?: boolean;
73
+ childLinksTitle?: string;
74
+ childLinks?: ResponsiveHeaderNavItem[];
75
+ }
76
+ </script>
77
+
78
+ <style lang="css">
79
+ @layer popover-setup {
80
+ .deep-expanding-menu-old {
81
+ container-type: inline-size;
82
+ display: grid;
83
+ grid-template-areas: 'element-stack';
84
+ align-items: center;
85
+ gap: 12px;
86
+
87
+ .inner {
88
+ grid-area: element-stack;
89
+ display: flex;
90
+ gap: 24px;
91
+ align-items: center;
92
+ z-index: 1;
93
+
94
+ .navigation-link,
95
+ .navigation-group-toggle {
96
+ all: unset;
97
+ border-bottom: 2px solid transparent;
98
+ padding-block: 8px;
99
+
100
+ transition: border-color 200ms;
101
+
102
+ &:hover {
103
+ cursor: pointer;
104
+ border-color: light-dark(var(--blue-12), var(--gray-0));
105
+ }
106
+
107
+ &:focus {
108
+ border-color: light-dark(var(--blue-12), var(--gray-0));
109
+ }
110
+
111
+ &:focus-visible {
112
+ border-color: light-dark(var(--blue-12), var(--gray-0));
113
+ }
114
+ }
115
+
116
+ .navigation-group {
117
+ --_icon-transform: scaleY(1);
118
+
119
+ display: grid;
120
+ grid-template-areas: 'details-stack';
121
+ z-index: 1;
122
+ position: relative;
123
+
124
+ summary::-webkit-details-marker,
125
+ summary::marker {
126
+ display: none;
127
+ }
128
+
129
+ &[open] {
130
+ --_icon-transform: scaleY(-1);
131
+ }
132
+
133
+ .navigation-group-toggle {
134
+ grid-area: details-stack;
135
+
136
+ display: flex !important;
137
+ align-items: center;
138
+ gap: 12px;
139
+ list-style: none;
140
+
141
+ .icon {
142
+ display: block;
143
+ font-size: 1.2rem;
144
+
145
+ transform: var(--_icon-transform);
146
+ transition: transform 200ms;
147
+ }
148
+ }
149
+
150
+ .navigation-group-panel {
151
+ background-color: black;
152
+ display: grid;
153
+ grid-area: details-stack;
154
+ z-index: 2;
155
+ position: absolute;
156
+ inset: auto;
157
+ top: 40px;
158
+ left: 0px;
159
+ gap: 12px;
160
+
161
+ width: 200px;
162
+
163
+ @media screen and (min-width: 768px) {
164
+ width: 400px;
165
+ }
166
+
167
+ @media screen and (min-width: 1024px) {
168
+ width: 600px;
169
+ }
170
+
171
+ background-color: white;
172
+ border: 1px solid black;
173
+ border-radius: 12px;
174
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
175
+ padding: 12px;
176
+ overflow: clip;
177
+
178
+ h4 {
179
+ color: var(--gray-12);
180
+ }
181
+
182
+ .navigation-group-list {
183
+ display: grid;
184
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
185
+ gap: 12px;
186
+ padding-inline-start: 0;
187
+ margin-block-end: 8px;
188
+
189
+ .navigation-group-item {
190
+ display: block;
191
+
192
+ a.navigation-group-link {
193
+ display: inline-block;
194
+ color: var(--gray-12);
195
+ text-decoration: none;
196
+ padding-block: 8px;
197
+
198
+ border-bottom: 2px solid transparent;
199
+
200
+ transition: border-color 200ms;
201
+
202
+ &:hover {
203
+ cursor: pointer;
204
+ border-color: var(--gray-12);
205
+ }
206
+
207
+ &:focus-visible {
208
+ border-color: var(--gray-12);
209
+ }
210
+ }
211
+ }
212
+ }
213
+ }
214
+ }
215
+ }
216
+ }
217
+ }
218
+ </style>
@@ -0,0 +1,63 @@
1
+ <template>
2
+ <component :is="tag" class="display-banner" :class="[elementClasses]">
3
+ <div v-if="$slots.canvas" class="canvas">
4
+ <slot name="canvas"></slot>
5
+ </div>
6
+ <div v-if="$slots.content" class="content">
7
+ <slot name="content"></slot>
8
+ </div>
9
+ </component>
10
+ </template>
11
+
12
+ <script lang="ts">
13
+ const TAGS_ALLOWED = <string[]>['div', 'p', 'span', 'section', 'article', 'aside', 'header', 'footer', 'main', 'nav', 'ul', 'ol'];
14
+ </script>
15
+
16
+ <script setup lang="ts">
17
+
18
+ const props = defineProps({
19
+ tag: {
20
+ type: String,
21
+ default: 'div',
22
+ validator(value: string) {
23
+ return TAGS_ALLOWED.includes(value);
24
+ },
25
+ },
26
+ styleClassPassthrough: {
27
+ type: Array as PropType<string[]>,
28
+ default: () => [],
29
+ },
30
+ });
31
+
32
+ const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
33
+
34
+ watch(
35
+ () => props.styleClassPassthrough,
36
+ () => {
37
+ resetElementClasses(props.styleClassPassthrough);
38
+ }
39
+ );
40
+ </script>
41
+
42
+ <style lang="css">
43
+ .display-banner {
44
+ display: grid;
45
+ grid-template-areas: 'banner';
46
+ container-type: inline-size;
47
+ overflow: hidden;
48
+
49
+ .canvas {
50
+ grid-area: banner;
51
+
52
+ .image {
53
+ object-fit: cover;
54
+ width: 100%;
55
+ height: 100%;
56
+ }
57
+ }
58
+
59
+ .content {
60
+ grid-area: banner;
61
+ }
62
+ }
63
+ </style>