srcdev-nuxt-components 9.5.7 → 9.6.0

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 (73) hide show
  1. package/.claude/skills/components/breadcrumb.md +5 -0
  2. package/.claude/skills/components/display-pill.md +2 -0
  3. package/.claude/skills/components/input-button.md +3 -0
  4. package/.claude/skills/components/responsive-header.md +49 -0
  5. package/.claude/skills/components/service-detail.md +32 -0
  6. package/.claude/skills/components/service-summary.md +8 -0
  7. package/.claude/skills/components/services-card-grid.md +5 -3
  8. package/.claude/skills/components/services-card.md +22 -12
  9. package/.claude/skills/components/slider-gallery.md +10 -4
  10. package/.claude/skills/components/tab-navigation.md +25 -9
  11. package/.claude/skills/index.md +1 -2
  12. package/.vscode/srcdev-component-responsive-header.code-snippets +10 -0
  13. package/.vscode/srcdev-component-service-detail.code-snippets +1 -0
  14. package/.vscode/srcdev-component-service-summary.code-snippets +3 -1
  15. package/.vscode/srcdev-component-services-card.code-snippets +38 -36
  16. package/.vscode/srcdev-component-services-grids.code-snippets +2 -1
  17. package/.vscode/srcdev-component-tab-navigation.code-snippets +1 -1
  18. package/app/components/01.atoms/display-pill/CONSUMER-STYLING.md +3 -0
  19. package/app/components/01.atoms/display-pill/DisplayPill.vue +5 -2
  20. package/app/components/01.atoms/navigation/breadcrumb/Breadcrumb.vue +16 -4
  21. package/app/components/01.atoms/navigation/breadcrumb/CONSUMER-STYLING.md +28 -5
  22. package/app/components/01.atoms/navigation/breadcrumb/stories/Breadcrumb.stories.ts +94 -0
  23. package/app/components/01.atoms/navigation/breadcrumb/tests/Breadcrumb.spec.ts +27 -0
  24. package/app/components/02.molecules/navigation/tab-navigation/CONSUMER-STYLING.md +52 -11
  25. package/app/components/02.molecules/navigation/tab-navigation/TabNavigation.vue +55 -23
  26. package/app/components/02.molecules/navigation/tab-navigation/stories/TabNavigation.stories.ts +176 -257
  27. package/app/components/02.molecules/navigation/tab-navigation/tests/TabNavigation.spec.ts +42 -2
  28. package/app/components/03.organisms/image-galleries/slider-gallery/CONSUMER-STYLING.md +19 -1
  29. package/app/components/03.organisms/image-galleries/slider-gallery/SliderGallery.vue +65 -7
  30. package/app/components/03.organisms/image-galleries/slider-gallery/stories/SliderGallery.stories.ts +201 -63
  31. package/app/components/03.organisms/image-galleries/slider-gallery/tests/SliderGallery.spec.ts +41 -2
  32. package/app/components/03.organisms/image-galleries/slider-gallery/tests/__snapshots__/SliderGallery.spec.ts.snap +6 -6
  33. package/app/components/03.organisms/responsive-header/CONSUMER-STYLING.md +4 -0
  34. package/app/components/03.organisms/responsive-header/NavigationItems.vue +33 -4
  35. package/app/components/03.organisms/responsive-header/ResponsiveHeader.vue +51 -4
  36. package/app/components/03.organisms/responsive-header/stories/ResponsiveHeader.stories.ts +52 -0
  37. package/app/components/03.organisms/responsive-header/tests/NavigationItems.spec.ts +20 -0
  38. package/app/components/03.organisms/responsive-header/tests/ResponsiveHeader.spec.ts +40 -0
  39. package/app/components/03.organisms/services/service-detail/CONSUMER-STYLING.md +92 -41
  40. package/app/components/03.organisms/services/service-detail/ServiceDetail.vue +198 -73
  41. package/app/components/03.organisms/services/service-detail/stories/ServiceDetail.stories.ts +157 -9
  42. package/app/components/03.organisms/services/service-detail/tests/ServiceDetail.spec.ts +58 -0
  43. package/app/components/03.organisms/services/service-detail/tests/__snapshots__/ServiceDetail.spec.ts.snap +4 -3
  44. package/app/components/03.organisms/services/service-summary/CONSUMER-STYLING.md +30 -0
  45. package/app/components/03.organisms/services/service-summary/ServiceSummary.vue +32 -8
  46. package/app/components/03.organisms/services/service-summary/stories/ServiceSummary.stories.ts +147 -0
  47. package/app/components/03.organisms/services/service-summary/tests/ServiceSummary.spec.ts +26 -0
  48. package/app/components/03.organisms/services/service-summary/tests/__snapshots__/ServiceSummary.spec.ts.snap +1 -1
  49. package/app/components/03.organisms/services/services-card/CONSUMER-STYLING.md +104 -63
  50. package/app/components/03.organisms/services/services-card/ServicesCard.vue +92 -66
  51. package/app/components/03.organisms/services/services-card/stories/ServicesCard.stories.ts +194 -27
  52. package/app/components/03.organisms/services/services-card/tests/ServicesCard.spec.ts +34 -8
  53. package/app/components/03.organisms/services/services-card/tests/__snapshots__/ServicesCard.spec.ts.snap +8 -8
  54. package/app/components/03.organisms/services/services-grids/CONSUMER-STYLING.md +9 -0
  55. package/app/components/03.organisms/services/services-grids/ServicesCardGrid.vue +2 -1
  56. package/app/components/03.organisms/services/services-grids/stories/ServiceSummaryGrid.stories.ts +46 -6
  57. package/app/components/03.organisms/services/services-grids/stories/ServicesCardGrid.stories.ts +89 -11
  58. package/app/components/03.organisms/services/services-grids/tests/ServicesCardGrid.spec.ts +8 -0
  59. package/app/components/03.organisms/services/services-grids/tests/__snapshots__/ServiceSummaryGrid.spec.ts.snap +3 -3
  60. package/app/components/03.organisms/services/services-grids/tests/__snapshots__/ServicesCardGrid.spec.ts.snap +24 -24
  61. package/app/components/05.forms/input-button/CONSUMER-STYLING.md +8 -0
  62. package/app/components/05.forms/input-button/InputButton.vue +3 -1
  63. package/app/composables/tests/useAnchorScroll.spec.ts +8 -0
  64. package/app/composables/useAnchorScroll.ts +1 -1
  65. package/nuxt.config.ts +1 -1
  66. package/package.json +1 -1
  67. package/.claude/skills/components/site-navigation.md +0 -145
  68. package/.vscode/srcdev-component-site-navigation.code-snippets +0 -38
  69. package/app/components/02.molecules/navigation/site-navigation/CONSUMER-STYLING.md +0 -109
  70. package/app/components/02.molecules/navigation/site-navigation/SiteNavigation.vue +0 -751
  71. package/app/components/02.molecules/navigation/site-navigation/stories/SiteNavigation.stories.ts +0 -356
  72. package/app/components/02.molecules/navigation/site-navigation/tests/SiteNavigation.spec.ts +0 -367
  73. package/app/components/02.molecules/navigation/site-navigation/tests/__snapshots__/SiteNavigation.spec.ts.snap +0 -30
@@ -1,356 +0,0 @@
1
- import { ref, reactive, computed } from "vue";
2
- import type { Meta, StoryFn } from "@nuxtjs/storybook";
3
- import SiteNavigationComponent from "../SiteNavigation.vue";
4
- import type { NavItemData } from "~/types/components/nav-item.d";
5
-
6
- const meta: Meta<typeof SiteNavigationComponent> = {
7
- title: "Molecules/SiteNavigation",
8
- component: SiteNavigationComponent,
9
- argTypes: {
10
- navAlign: {
11
- control: { type: "select" },
12
- options: ["left", "center", "right"],
13
- description: "Horizontal alignment of the nav list",
14
- },
15
- ariaLabel: {
16
- control: { type: "text" },
17
- description: "aria-label on the nav landmark",
18
- table: { category: "Accessibility" },
19
- },
20
- openMenuLabel: {
21
- control: { type: "text" },
22
- description: "Burger button label while the menu is closed",
23
- table: { category: "Accessibility" },
24
- },
25
- closeMenuLabel: {
26
- control: { type: "text" },
27
- description: "Burger button label while the menu is open",
28
- table: { category: "Accessibility" },
29
- },
30
- navItemData: { table: { disable: true } },
31
- styleClassPassthrough: { table: { disable: true } },
32
- },
33
- args: {
34
- navAlign: "left",
35
- ariaLabel: "Site navigation",
36
- openMenuLabel: "Open navigation menu",
37
- closeMenuLabel: "Close navigation menu",
38
- },
39
- };
40
-
41
- export default meta;
42
-
43
- const navItemData: NavItemData = {
44
- main: [
45
- { text: "Home", href: "#" },
46
- { text: "About", href: "#" },
47
- { text: "Services", href: "#" },
48
- { text: "Work", href: "#" },
49
- { text: "Contact", href: "#" },
50
- ],
51
- };
52
-
53
- type Theme = "light" | "dark";
54
-
55
- const themeDefaults: Record<
56
- Theme,
57
- {
58
- indicatorColor: string;
59
- linkColor: string;
60
- linkHoverColor: string;
61
- linkActiveColor: string;
62
- panelBg: string;
63
- panelLinkColor: string;
64
- burgerColor: string;
65
- pageBg: string;
66
- }
67
- > = {
68
- dark: {
69
- indicatorColor: "#c0847a",
70
- linkColor: "#f0ece8",
71
- linkHoverColor: "#e09890",
72
- linkActiveColor: "#c0847a",
73
- panelBg: "#1a1614",
74
- panelLinkColor: "#f0ece8",
75
- burgerColor: "#f0ece8",
76
- pageBg: "#1a1614",
77
- },
78
- light: {
79
- indicatorColor: "#b05a50",
80
- linkColor: "#1a1614",
81
- linkHoverColor: "#b05a50",
82
- linkActiveColor: "#8c3a30",
83
- panelBg: "#f5f2f0",
84
- panelLinkColor: "#1a1614",
85
- burgerColor: "#1a1614",
86
- pageBg: "#f5f2f0",
87
- },
88
- };
89
-
90
- const DefaultTemplate: StoryFn<typeof SiteNavigationComponent> = (args) => ({
91
- components: { SiteNavigationComponent },
92
- setup() {
93
- const theme = ref<Theme>("dark");
94
-
95
- const controls = reactive({ ...themeDefaults.dark });
96
-
97
- const setTheme = (newTheme: Theme) => {
98
- theme.value = newTheme;
99
- Object.assign(controls, themeDefaults[newTheme]);
100
- };
101
-
102
- const navStyle = computed(() => ({
103
- "--site-nav-decorator-indicator-color": controls.indicatorColor,
104
- "--site-nav-link-color": controls.linkColor,
105
- "--site-nav-link-hover-color": controls.linkHoverColor,
106
- "--site-nav-link-active-color": controls.linkActiveColor,
107
- "--site-nav-panel-bg": controls.panelBg,
108
- "--site-nav-panel-link-color": controls.panelLinkColor,
109
- "--site-nav-panel-decorator-indicator-color": controls.indicatorColor,
110
- "--site-nav-burger-color": controls.burgerColor,
111
- "--page-bg": controls.pageBg,
112
- "margin-block": "3.6rem",
113
- }));
114
-
115
- const cssSnippet = computed(
116
- () => `.your-selector {
117
- /* Indicator */
118
- --site-nav-decorator-indicator-color: ${controls.indicatorColor};
119
-
120
- /* Horizontal nav links */
121
- --site-nav-link-color: ${controls.linkColor};
122
- --site-nav-link-hover-color: ${controls.linkHoverColor};
123
- --site-nav-link-active-color: ${controls.linkActiveColor};
124
-
125
- /* Mobile panel */
126
- --site-nav-panel-bg: ${controls.panelBg};
127
- --site-nav-panel-link-color: ${controls.panelLinkColor};
128
- --site-nav-panel-decorator-indicator-color: ${controls.indicatorColor};
129
-
130
- /* Burger */
131
- --site-nav-burger-color: ${controls.burgerColor};
132
- }`
133
- );
134
-
135
- const copied = ref(false);
136
- const copySnippet = async () => {
137
- await navigator.clipboard.writeText(cssSnippet.value);
138
- copied.value = true;
139
- setTimeout(() => {
140
- copied.value = false;
141
- }, 2000);
142
- };
143
-
144
- return { args, navItemData, theme, controls, setTheme, navStyle, cssSnippet, copied, copySnippet };
145
- },
146
- template: `
147
- <div class="sb-sitenav-story">
148
-
149
- <!-- Preview: simulated header bar -->
150
- <div class="sb-sitenav-note">
151
- Resize the browser window to see the navigation collapse into a burger menu.
152
- </div>
153
- <div class="sb-sitenav-header" :class="'theme-' + theme" :style="navStyle">
154
- <div class="sb-sitenav-logo">LOGO</div>
155
- <SiteNavigationComponent
156
- :nav-item-data="navItemData"
157
- :nav-align="args.navAlign"
158
- :aria-label="args.ariaLabel"
159
- :open-menu-label="args.openMenuLabel"
160
- :close-menu-label="args.closeMenuLabel"
161
- />
162
- </div>
163
-
164
- <!-- Controls -->
165
- <div class="sb-sitenav-playground">
166
-
167
- <fieldset>
168
- <legend>Theme</legend>
169
- <div class="sb-control-row">
170
- <label>Light / Dark</label>
171
- <div class="sb-theme-toggle">
172
- <button :class="{ active: theme === 'light' }" @click="setTheme('light')">Light</button>
173
- <button :class="{ active: theme === 'dark' }" @click="setTheme('dark')">Dark</button>
174
- </div>
175
- </div>
176
- </fieldset>
177
-
178
- <fieldset>
179
- <legend>Indicator</legend>
180
- <div class="sb-control-row">
181
- <label for="sb-indicator-color">Indicator colour</label>
182
- <input id="sb-indicator-color" v-model="controls.indicatorColor" type="color" />
183
- </div>
184
- </fieldset>
185
-
186
- <fieldset>
187
- <legend>Horizontal nav links</legend>
188
- <div class="sb-control-row">
189
- <label for="sb-link-color">Link colour</label>
190
- <input id="sb-link-color" v-model="controls.linkColor" type="color" />
191
- </div>
192
- <div class="sb-control-row">
193
- <label for="sb-link-hover-color">Hover colour</label>
194
- <input id="sb-link-hover-color" v-model="controls.linkHoverColor" type="color" />
195
- </div>
196
- <div class="sb-control-row">
197
- <label for="sb-link-active-color">Active colour</label>
198
- <input id="sb-link-active-color" v-model="controls.linkActiveColor" type="color" />
199
- </div>
200
- </fieldset>
201
-
202
- <fieldset>
203
- <legend>Mobile panel</legend>
204
- <div class="sb-control-row">
205
- <label for="sb-panel-bg">Panel background</label>
206
- <input id="sb-panel-bg" v-model="controls.panelBg" type="color" />
207
- </div>
208
- <div class="sb-control-row">
209
- <label for="sb-panel-link-color">Panel link colour</label>
210
- <input id="sb-panel-link-color" v-model="controls.panelLinkColor" type="color" />
211
- </div>
212
- </fieldset>
213
-
214
- <fieldset>
215
- <legend>Burger</legend>
216
- <div class="sb-control-row">
217
- <label for="sb-burger-color">Burger colour</label>
218
- <input id="sb-burger-color" v-model="controls.burgerColor" type="color" />
219
- </div>
220
- </fieldset>
221
-
222
- </div>
223
-
224
- <!-- CSS snippet -->
225
- <div class="sb-css-snippet">
226
- <div class="sb-css-snippet-header">
227
- <strong>CSS Token Snippet</strong>
228
- <button class="sb-copy-btn" @click="copySnippet">{{ copied ? 'Copied!' : 'Copy' }}</button>
229
- </div>
230
- <pre class="sb-css-snippet-code">{{ cssSnippet }}</pre>
231
- </div>
232
-
233
- </div>
234
-
235
- <style>
236
- .sb-sitenav-story {
237
- font-size: 1.4rem;
238
- display: grid;
239
- gap: 2.4rem;
240
- padding: 2.4rem;
241
- }
242
- .sb-sitenav-note {
243
- font-size: 1.3rem;
244
- color: #888;
245
- font-style: italic;
246
- }
247
- .sb-sitenav-header {
248
- display: flex;
249
- align-items: center;
250
- gap: 3.2rem;
251
- padding: 1.2rem 2.4rem;
252
- transition: background 300ms;
253
- position: relative;
254
- min-height: 6rem;
255
- border-radius: 0.4rem;
256
- }
257
- .sb-sitenav-header.theme-dark {
258
- background: var(--page-bg, #1a1614);
259
- color-scheme: dark;
260
- }
261
- .sb-sitenav-header.theme-light {
262
- background: var(--page-bg, #f5f2f0);
263
- color-scheme: light;
264
- }
265
- .sb-sitenav-logo {
266
- font-size: 1.8rem;
267
- font-weight: 700;
268
- letter-spacing: 0.1em;
269
- flex-shrink: 0;
270
- opacity: 0.5;
271
- }
272
- .sb-sitenav-header .site-navigation {
273
- flex: 1;
274
- min-width: 0;
275
- }
276
- .sb-sitenav-playground {
277
- display: grid;
278
- grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
279
- gap: 1.6rem;
280
- }
281
- .sb-sitenav-playground fieldset {
282
- border: 1px solid #ccc;
283
- border-radius: 0.4rem;
284
- padding: 1.6rem;
285
- }
286
- .sb-sitenav-playground legend {
287
- font-weight: bold;
288
- padding: 0 0.8rem;
289
- font-size: 1.4rem;
290
- }
291
- .sb-control-row {
292
- display: grid;
293
- grid-template-columns: 1fr 14rem;
294
- gap: 1rem;
295
- align-items: center;
296
- padding: 0.5rem 0;
297
- font-size: 1.3rem;
298
- }
299
- .sb-control-row input[type="color"] {
300
- height: 3.2rem;
301
- width: 100%;
302
- padding: 0.2rem;
303
- border: 1px solid #ccc;
304
- border-radius: 0.2rem;
305
- cursor: pointer;
306
- background: transparent;
307
- }
308
- .sb-theme-toggle { display: flex; gap: 0.4rem; }
309
- .sb-theme-toggle button {
310
- padding: 0.4rem 1.6rem;
311
- border: 1px solid #ccc;
312
- border-radius: 0.2rem;
313
- cursor: pointer;
314
- background: transparent;
315
- font-size: 1.3rem;
316
- color: inherit;
317
- }
318
- .sb-theme-toggle button.active { background: #e0e0e0; font-weight: bold; }
319
- .sb-css-snippet {
320
- border: 1px solid #ccc;
321
- border-radius: 0.4rem;
322
- overflow: hidden;
323
- }
324
- .sb-css-snippet-header {
325
- display: flex;
326
- justify-content: space-between;
327
- align-items: center;
328
- padding: 1rem 1.6rem;
329
- border-bottom: 1px solid #ccc;
330
- font-size: 1.4rem;
331
- }
332
- .sb-css-snippet-code {
333
- margin: 0;
334
- padding: 1.6rem;
335
- font-family: monospace;
336
- font-size: 1.3rem;
337
- line-height: 1.6;
338
- overflow-x: auto;
339
- white-space: pre;
340
- }
341
- .sb-copy-btn {
342
- padding: 0.4rem 1.2rem;
343
- border: 1px solid #ccc;
344
- border-radius: 0.2rem;
345
- cursor: pointer;
346
- background: transparent;
347
- font-size: 1.3rem;
348
- color: inherit;
349
- }
350
- .sb-copy-btn:hover { background: #e0e0e0; }
351
- </style>
352
- `,
353
- });
354
-
355
- export const Default = DefaultTemplate.bind({});
356
- Default.args = { navAlign: "left" };