srcdev-nuxt-components 6.1.4 → 6.1.5
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/README.md +3 -3
- package/app/components/deep-expanding-menu/DeepExpandingMenu.vue +14 -14
- package/app/components/deep-expanding-menu/DeepExpandingMenuOld.vue +21 -21
- package/app/components/display-prompt/DisplayPromptCore.vue +14 -19
- package/app/components/responsive-header/ResponsiveHeader.vue +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,8 +12,8 @@ npm install --save srcdev-nuxt-components
|
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
14
|
defineNuxtConfig({
|
|
15
|
-
extends:
|
|
16
|
-
})
|
|
15
|
+
extends: "srcdev-nuxt-components",
|
|
16
|
+
})
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Styles Architecture
|
|
@@ -49,7 +49,7 @@ The setup layer provides the foundational styles and utilities:
|
|
|
49
49
|
- **Responsive Font Sizes** - Fluid typography using clamp() functions:
|
|
50
50
|
- `--step-8` to `--step-1` providing 8 responsive font size steps
|
|
51
51
|
- **Utility Classes** - Pre-built typography classes:
|
|
52
|
-
- `.heading-1` through `.heading-5` - Semantic heading styles
|
|
52
|
+
- `.page-heading-1` through `.page-heading-5` - Semantic heading styles
|
|
53
53
|
- Generic font weight and variation settings
|
|
54
54
|
- **Font Variation Settings** - Advanced typography controls
|
|
55
55
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</button>
|
|
12
12
|
|
|
13
13
|
<div class="navigation-group-panel" popover role="menu" :id="`popovertarget-nav-1-${key}`">
|
|
14
|
-
<h4 class="heading-4 mb-6">{{ link.childLinksTitle }}</h4>
|
|
14
|
+
<h4 class="page-heading-4 mb-6">{{ link.childLinksTitle }}</h4>
|
|
15
15
|
<ul class="navigation-group-list">
|
|
16
16
|
<li class="navigation-group-item" v-for="childLink in link.childLinks" :key="childLink.name">
|
|
17
17
|
<NuxtLink :to="childLink.path" class="navigation-group-link">{{ childLink.name }}</NuxtLink>
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<script lang="ts">
|
|
28
|
-
const TAGS_ALLOWED = <string[]>[
|
|
28
|
+
const TAGS_ALLOWED = <string[]>["div", "section", "nav", "ul", "ol"]
|
|
29
29
|
|
|
30
30
|
interface ResponsiveHeaderNavItem {
|
|
31
|
-
name: string
|
|
32
|
-
path?: string
|
|
33
|
-
isExternal?: boolean
|
|
34
|
-
childLinks?: ResponsiveHeaderNavItem[]
|
|
35
|
-
childLinksTitle?: string
|
|
31
|
+
name: string
|
|
32
|
+
path?: string
|
|
33
|
+
isExternal?: boolean
|
|
34
|
+
childLinks?: ResponsiveHeaderNavItem[]
|
|
35
|
+
childLinksTitle?: string
|
|
36
36
|
}
|
|
37
37
|
</script>
|
|
38
38
|
|
|
@@ -40,9 +40,9 @@ interface ResponsiveHeaderNavItem {
|
|
|
40
40
|
const props = defineProps({
|
|
41
41
|
tag: {
|
|
42
42
|
type: String,
|
|
43
|
-
default:
|
|
43
|
+
default: "nav",
|
|
44
44
|
validator(value: string) {
|
|
45
|
-
return TAGS_ALLOWED.includes(value)
|
|
45
|
+
return TAGS_ALLOWED.includes(value)
|
|
46
46
|
},
|
|
47
47
|
},
|
|
48
48
|
navLinks: {
|
|
@@ -53,17 +53,17 @@ const props = defineProps({
|
|
|
53
53
|
type: Array as PropType<string[]>,
|
|
54
54
|
default: () => [],
|
|
55
55
|
},
|
|
56
|
-
})
|
|
56
|
+
})
|
|
57
57
|
|
|
58
|
-
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
58
|
+
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
59
59
|
// const detailsRef = useTemplateRef('detailsRef');
|
|
60
60
|
|
|
61
61
|
watch(
|
|
62
62
|
() => props.styleClassPassthrough,
|
|
63
63
|
() => {
|
|
64
|
-
resetElementClasses(props.styleClassPassthrough)
|
|
64
|
+
resetElementClasses(props.styleClassPassthrough)
|
|
65
65
|
}
|
|
66
|
-
)
|
|
66
|
+
)
|
|
67
67
|
</script>
|
|
68
68
|
|
|
69
69
|
<style lang="css">
|
|
@@ -85,7 +85,7 @@ watch(
|
|
|
85
85
|
|
|
86
86
|
container-type: inline-size;
|
|
87
87
|
display: grid;
|
|
88
|
-
grid-template-areas:
|
|
88
|
+
grid-template-areas: "element-stack";
|
|
89
89
|
|
|
90
90
|
.inner {
|
|
91
91
|
grid-area: element-stack;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<Icon name="bi:caret-down-fill" class="icon" />
|
|
10
10
|
</summary>
|
|
11
11
|
<div class="navigation-group-panel" :id="`popovertarget-nav-1-${key}`">
|
|
12
|
-
<h4 class="heading-4 mb-6">{{ link.childLinksTitle }}</h4>
|
|
12
|
+
<h4 class="page-heading-4 mb-6">{{ link.childLinksTitle }}</h4>
|
|
13
13
|
<ul class="navigation-group-list">
|
|
14
14
|
<li class="navigation-group-item" v-for="childLink in link.childLinks" :key="childLink.name">
|
|
15
15
|
<NuxtLink :to="childLink.path" class="navigation-group-link">{{ childLink.name }}</NuxtLink>
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
</template>
|
|
24
24
|
|
|
25
25
|
<script setup lang="ts">
|
|
26
|
-
import { onClickOutside } from
|
|
26
|
+
import { onClickOutside } from "@vueuse/core"
|
|
27
27
|
|
|
28
28
|
const props = defineProps({
|
|
29
29
|
tag: {
|
|
30
30
|
type: String,
|
|
31
|
-
default:
|
|
31
|
+
default: "nav",
|
|
32
32
|
validator(value: string) {
|
|
33
|
-
return TAGS_ALLOWED.includes(value)
|
|
33
|
+
return TAGS_ALLOWED.includes(value)
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
36
|
navLinks: {
|
|
@@ -41,37 +41,37 @@ const props = defineProps({
|
|
|
41
41
|
type: Array as PropType<string[]>,
|
|
42
42
|
default: () => [],
|
|
43
43
|
},
|
|
44
|
-
})
|
|
44
|
+
})
|
|
45
45
|
|
|
46
|
-
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
46
|
+
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
47
47
|
|
|
48
|
-
const navigationGroupRef = useTemplateRef<HTMLElement[]>(
|
|
48
|
+
const navigationGroupRef = useTemplateRef<HTMLElement[]>("navigationGroupRef")
|
|
49
49
|
|
|
50
50
|
watch(
|
|
51
51
|
() => props.styleClassPassthrough,
|
|
52
52
|
() => {
|
|
53
|
-
resetElementClasses(props.styleClassPassthrough)
|
|
53
|
+
resetElementClasses(props.styleClassPassthrough)
|
|
54
54
|
}
|
|
55
|
-
)
|
|
55
|
+
)
|
|
56
56
|
|
|
57
57
|
onMounted(() => {
|
|
58
58
|
navigationGroupRef.value?.forEach((element, index) => {
|
|
59
59
|
onClickOutside(element, () => {
|
|
60
|
-
navigationGroupRef.value?.[index]?.removeAttribute(
|
|
61
|
-
})
|
|
62
|
-
})
|
|
63
|
-
})
|
|
60
|
+
navigationGroupRef.value?.[index]?.removeAttribute("open")
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
64
|
</script>
|
|
65
65
|
|
|
66
66
|
<script lang="ts">
|
|
67
|
-
const TAGS_ALLOWED = <string[]>[
|
|
67
|
+
const TAGS_ALLOWED = <string[]>["div", "section", "nav", "ul", "ol"]
|
|
68
68
|
|
|
69
69
|
interface ResponsiveHeaderNavItem {
|
|
70
|
-
name: string
|
|
71
|
-
path?: string
|
|
72
|
-
isExternal?: boolean
|
|
73
|
-
childLinksTitle?: string
|
|
74
|
-
childLinks?: ResponsiveHeaderNavItem[]
|
|
70
|
+
name: string
|
|
71
|
+
path?: string
|
|
72
|
+
isExternal?: boolean
|
|
73
|
+
childLinksTitle?: string
|
|
74
|
+
childLinks?: ResponsiveHeaderNavItem[]
|
|
75
75
|
}
|
|
76
76
|
</script>
|
|
77
77
|
|
|
@@ -80,7 +80,7 @@ interface ResponsiveHeaderNavItem {
|
|
|
80
80
|
.deep-expanding-menu-old {
|
|
81
81
|
container-type: inline-size;
|
|
82
82
|
display: grid;
|
|
83
|
-
grid-template-areas:
|
|
83
|
+
grid-template-areas: "element-stack";
|
|
84
84
|
align-items: center;
|
|
85
85
|
gap: 12px;
|
|
86
86
|
|
|
@@ -117,7 +117,7 @@ interface ResponsiveHeaderNavItem {
|
|
|
117
117
|
--_icon-transform: scaleY(1);
|
|
118
118
|
|
|
119
119
|
display: grid;
|
|
120
|
-
grid-template-areas:
|
|
120
|
+
grid-template-areas: "details-stack";
|
|
121
121
|
z-index: 1;
|
|
122
122
|
position: relative;
|
|
123
123
|
|
|
@@ -4,12 +4,7 @@
|
|
|
4
4
|
:class="[{ dismissed: hide }, { 'use-local-style-overrides': useLocalStyleOverrides }]"
|
|
5
5
|
:data-test-id="`display-prompt-core-${theme}`"
|
|
6
6
|
>
|
|
7
|
-
<div
|
|
8
|
-
class="display-prompt-wrapper"
|
|
9
|
-
:data-component-theme="theme"
|
|
10
|
-
:class="[elementClasses]"
|
|
11
|
-
data-test-id="display-prompt"
|
|
12
|
-
>
|
|
7
|
+
<div class="display-prompt-wrapper" :data-theme="theme" :class="[elementClasses]" data-test-id="display-prompt">
|
|
13
8
|
<div class="display-prompt-inner">
|
|
14
9
|
<div class="display-prompt-icon" data-test-id="prompt-icon">
|
|
15
10
|
<slot name="customDecoratorIcon">
|
|
@@ -106,11 +101,11 @@ const dismissPrompt = () => {
|
|
|
106
101
|
}
|
|
107
102
|
|
|
108
103
|
.display-prompt-wrapper {
|
|
109
|
-
background-color: var(--
|
|
110
|
-
border: 1px solid var(--
|
|
104
|
+
background-color: var(--colour-theme-0);
|
|
105
|
+
border: 1px solid var(--colour-theme-8);
|
|
111
106
|
border-radius: 4px;
|
|
112
107
|
|
|
113
|
-
border-inline-start: 8px solid var(--
|
|
108
|
+
border-inline-start: 8px solid var(--colour-theme-8);
|
|
114
109
|
border-start-start-radius: 8px;
|
|
115
110
|
border-end-start-radius: 8px;
|
|
116
111
|
|
|
@@ -127,7 +122,7 @@ const dismissPrompt = () => {
|
|
|
127
122
|
.display-prompt-icon {
|
|
128
123
|
display: inline-flex;
|
|
129
124
|
.icon {
|
|
130
|
-
color: var(--
|
|
125
|
+
color: var(--colour-theme-8);
|
|
131
126
|
display: inline-block;
|
|
132
127
|
font-size: 3rem;
|
|
133
128
|
font-style: normal;
|
|
@@ -148,7 +143,7 @@ const dismissPrompt = () => {
|
|
|
148
143
|
font-size: var(--step-5);
|
|
149
144
|
font-weight: bold;
|
|
150
145
|
line-height: 1.3;
|
|
151
|
-
color: var(--
|
|
146
|
+
color: var(--colour-theme-8);
|
|
152
147
|
margin: 0;
|
|
153
148
|
padding: 0;
|
|
154
149
|
}
|
|
@@ -157,7 +152,7 @@ const dismissPrompt = () => {
|
|
|
157
152
|
font-size: var(--step-5);
|
|
158
153
|
font-weight: normal;
|
|
159
154
|
line-height: 1.3;
|
|
160
|
-
color: var(--
|
|
155
|
+
color: var(--colour-theme-8);
|
|
161
156
|
margin: 0;
|
|
162
157
|
padding: 0;
|
|
163
158
|
}
|
|
@@ -169,26 +164,26 @@ const dismissPrompt = () => {
|
|
|
169
164
|
justify-content: center;
|
|
170
165
|
margin: 1rem;
|
|
171
166
|
padding: 0.5rem;
|
|
172
|
-
border: 0.1rem solid var(--
|
|
167
|
+
border: 0.1rem solid var(--colour-theme-8);
|
|
173
168
|
border-radius: 50%;
|
|
174
|
-
outline: 1px solid var(--
|
|
169
|
+
outline: 1px solid var(--colour-theme-3);
|
|
175
170
|
|
|
176
171
|
transition: border 200ms ease-in-out, outline 200ms ease-in-out;
|
|
177
172
|
|
|
178
173
|
&:hover {
|
|
179
174
|
cursor: pointer;
|
|
180
|
-
border: 0.1rem solid var(--
|
|
181
|
-
outline: 2px solid var(--
|
|
175
|
+
border: 0.1rem solid var(--colour-theme-12);
|
|
176
|
+
outline: 2px solid var(--colour-theme-6);
|
|
182
177
|
}
|
|
183
178
|
|
|
184
179
|
&:focus-visible {
|
|
185
180
|
box-shadow: var(--focus-box-shadow-colour-on);
|
|
186
|
-
border: 0.1rem solid var(--
|
|
187
|
-
outline: 2px solid var(--
|
|
181
|
+
border: 0.1rem solid var(--colour-theme-12);
|
|
182
|
+
outline: 2px solid var(--colour-theme-6);
|
|
188
183
|
}
|
|
189
184
|
|
|
190
185
|
.icon {
|
|
191
|
-
color: var(--
|
|
186
|
+
color: var(--colour-theme-8);
|
|
192
187
|
display: block;
|
|
193
188
|
font-size: var(--step-5);
|
|
194
189
|
padding: 1rem;
|
|
@@ -101,14 +101,14 @@
|
|
|
101
101
|
<LayoutRow tag="div" variant="full" :style-class-passthrough="['mb-20', 'debug-grid']">
|
|
102
102
|
<ClientOnly>
|
|
103
103
|
<div>
|
|
104
|
-
<h2 class="heading-4">navigationWrapperRects</h2>
|
|
104
|
+
<h2 class="page-heading-4">navigationWrapperRects</h2>
|
|
105
105
|
<pre>{{ navigationWrapperRects }}</pre>
|
|
106
106
|
<hr />
|
|
107
|
-
<h2 class="heading-4">secondaryNavRects</h2>
|
|
107
|
+
<h2 class="page-heading-4">secondaryNavRects</h2>
|
|
108
108
|
<pre>{{ secondaryNavRects }}</pre>
|
|
109
109
|
</div>
|
|
110
110
|
<div>
|
|
111
|
-
<h2 class="heading-4">mainNavigationState</h2>
|
|
111
|
+
<h2 class="page-heading-4">mainNavigationState</h2>
|
|
112
112
|
<pre>{{ mainNavigationState }}</pre>
|
|
113
113
|
</div>
|
|
114
114
|
</ClientOnly>
|
package/package.json
CHANGED