srcdev-nuxt-components 6.1.4 → 6.1.6

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 CHANGED
@@ -12,8 +12,8 @@ npm install --save srcdev-nuxt-components
12
12
 
13
13
  ```ts
14
14
  defineNuxtConfig({
15
- extends: 'srcdev-nuxt-components',
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[]>['div', 'section', 'nav', 'ul', 'ol'];
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: 'nav',
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: 'element-stack';
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 '@vueuse/core';
26
+ import { onClickOutside } from "@vueuse/core"
27
27
 
28
28
  const props = defineProps({
29
29
  tag: {
30
30
  type: String,
31
- default: 'nav',
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[]>('navigationGroupRef');
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('open');
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[]>['div', 'section', 'nav', 'ul', 'ol'];
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: 'element-stack';
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: 'details-stack';
120
+ grid-template-areas: "details-stack";
121
121
  z-index: 1;
122
122
  position: relative;
123
123
 
@@ -1,15 +1,6 @@
1
1
  <template>
2
- <div
3
- class="display-prompt-core"
4
- :class="[{ dismissed: hide }, { 'use-local-style-overrides': useLocalStyleOverrides }]"
5
- :data-test-id="`display-prompt-core-${theme}`"
6
- >
7
- <div
8
- class="display-prompt-wrapper"
9
- :data-component-theme="theme"
10
- :class="[elementClasses]"
11
- data-test-id="display-prompt"
12
- >
2
+ <div class="display-prompt-core" :class="[{ dismissed: hide }]" :data-test-id="`display-prompt-core-${theme}`">
3
+ <div class="display-prompt-wrapper" :data-theme="theme" :class="[elementClasses]" data-test-id="display-prompt">
13
4
  <div class="display-prompt-inner">
14
5
  <div class="display-prompt-icon" data-test-id="prompt-icon">
15
6
  <slot name="customDecoratorIcon">
@@ -52,7 +43,7 @@ const props = defineProps({
52
43
  type: String,
53
44
  default: "error",
54
45
  validator(value: string) {
55
- return ["error", "info", "success", "warning", "secondary"].includes(value)
46
+ return ["primary", "secondary", "tertiary", "ghost", "error", "info", "success", "warning"].includes(value)
56
47
  },
57
48
  },
58
49
  styleClassPassthrough: {
@@ -66,10 +57,6 @@ const props = defineProps({
66
57
  return ["dark-grey", "white"].includes(value)
67
58
  },
68
59
  },
69
- useLocalStyleOverrides: {
70
- type: Boolean,
71
- default: false,
72
- },
73
60
  displayPromptIcons: {
74
61
  type: Object as PropType<Record<string, string>>,
75
62
  default: () => ({
@@ -106,11 +93,11 @@ const dismissPrompt = () => {
106
93
  }
107
94
 
108
95
  .display-prompt-wrapper {
109
- background-color: var(--component-theme-0);
110
- border: 1px solid var(--component-theme-8);
96
+ background-color: var(--colour-theme-0);
97
+ border: 1px solid var(--colour-theme-8);
111
98
  border-radius: 4px;
112
99
 
113
- border-inline-start: 8px solid var(--component-theme-8);
100
+ border-inline-start: 8px solid var(--colour-theme-8);
114
101
  border-start-start-radius: 8px;
115
102
  border-end-start-radius: 8px;
116
103
 
@@ -127,7 +114,7 @@ const dismissPrompt = () => {
127
114
  .display-prompt-icon {
128
115
  display: inline-flex;
129
116
  .icon {
130
- color: var(--component-theme-8);
117
+ color: var(--colour-theme-8);
131
118
  display: inline-block;
132
119
  font-size: 3rem;
133
120
  font-style: normal;
@@ -148,7 +135,7 @@ const dismissPrompt = () => {
148
135
  font-size: var(--step-5);
149
136
  font-weight: bold;
150
137
  line-height: 1.3;
151
- color: var(--component-theme-8);
138
+ color: var(--colour-theme-8);
152
139
  margin: 0;
153
140
  padding: 0;
154
141
  }
@@ -157,7 +144,7 @@ const dismissPrompt = () => {
157
144
  font-size: var(--step-5);
158
145
  font-weight: normal;
159
146
  line-height: 1.3;
160
- color: var(--component-theme-8);
147
+ color: var(--colour-theme-8);
161
148
  margin: 0;
162
149
  padding: 0;
163
150
  }
@@ -169,26 +156,26 @@ const dismissPrompt = () => {
169
156
  justify-content: center;
170
157
  margin: 1rem;
171
158
  padding: 0.5rem;
172
- border: 0.1rem solid var(--component-theme-8);
159
+ border: 0.1rem solid var(--colour-theme-8);
173
160
  border-radius: 50%;
174
- outline: 1px solid var(--component-theme-3);
161
+ outline: 1px solid var(--colour-theme-3);
175
162
 
176
163
  transition: border 200ms ease-in-out, outline 200ms ease-in-out;
177
164
 
178
165
  &:hover {
179
166
  cursor: pointer;
180
- border: 0.1rem solid var(--component-theme-12);
181
- outline: 2px solid var(--component-theme-6);
167
+ border: 0.1rem solid var(--colour-theme-12);
168
+ outline: 2px solid var(--colour-theme-6);
182
169
  }
183
170
 
184
171
  &:focus-visible {
185
172
  box-shadow: var(--focus-box-shadow-colour-on);
186
- border: 0.1rem solid var(--component-theme-12);
187
- outline: 2px solid var(--component-theme-6);
173
+ border: 0.1rem solid var(--colour-theme-12);
174
+ outline: 2px solid var(--colour-theme-6);
188
175
  }
189
176
 
190
177
  .icon {
191
- color: var(--component-theme-8);
178
+ color: var(--colour-theme-8);
192
179
  display: block;
193
180
  font-size: var(--step-5);
194
181
  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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-components",
3
3
  "type": "module",
4
- "version": "6.1.4",
4
+ "version": "6.1.6",
5
5
  "main": "nuxt.config.ts",
6
6
  "scripts": {
7
7
  "clean": "rm -rf .nuxt && rm -rf .output && rm -rf .playground/.nuxt && rm -rf .playground/.output",