srcdev-nuxt-components 9.0.18 → 9.1.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 (41) hide show
  1. package/.claude/settings.json +4 -2
  2. package/.claude/skills/component-inline-action-button.md +79 -0
  3. package/.claude/skills/components/input-copy-core.md +66 -0
  4. package/.claude/skills/components/page-hero-highlights.md +60 -0
  5. package/.claude/skills/components/site-navigation.md +120 -0
  6. package/.claude/skills/icon-sets.md +45 -0
  7. package/.claude/skills/index.md +7 -1
  8. package/.claude/skills/performance-review.md +105 -0
  9. package/.claude/skills/robots-env-aware.md +69 -0
  10. package/app/assets/styles/extends-layer/srcdev-forms/setup/themes/_error.css +1 -1
  11. package/app/assets/styles/setup/02.colours/_amber.css +2 -2
  12. package/app/assets/styles/setup/03.theming/default/_dark.css +20 -2
  13. package/app/assets/styles/setup/03.theming/default/_light.css +11 -1
  14. package/app/assets/styles/setup/03.theming/error/_dark.css +1 -1
  15. package/app/components/01.atoms/text-blocks/eyebrow-text/EyebrowText.vue +15 -12
  16. package/app/components/01.atoms/text-blocks/hero-text/HeroText.vue +3 -1
  17. package/app/components/02.molecules/navigation/site-navigation/SiteNavigation.vue +780 -0
  18. package/app/components/02.molecules/navigation/site-navigation/stories/SiteNavigation.stories.ts +335 -0
  19. package/app/components/02.molecules/navigation/site-navigation/tests/SiteNavigation.spec.ts +328 -0
  20. package/app/components/02.molecules/navigation/site-navigation/tests/__snapshots__/SiteNavigation.spec.ts.snap +30 -0
  21. package/app/components/04.templates/page-hero-highlights/PageHeroHighlights.vue +36 -21
  22. package/app/components/04.templates/page-hero-highlights/PageHeroHighlightsHeader.vue +66 -0
  23. package/app/components/04.templates/page-hero-highlights/stories/PageHeroHighlights.stories.ts +50 -3
  24. package/app/components/04.templates/page-hero-highlights/stories/PageHeroHighlightsHeader.stories.ts +77 -0
  25. package/app/components/04.templates/page-hero-highlights/tests/PageHeroHighlights.spec.ts +15 -7
  26. package/app/components/04.templates/page-hero-highlights/tests/PageHeroHighlightsHeader.spec.ts +51 -0
  27. package/app/components/04.templates/page-hero-highlights/tests/__snapshots__/PageHeroHighlights.spec.ts.snap +1 -1
  28. package/app/components/forms/form-errors/InputError.vue +104 -103
  29. package/app/components/forms/input-copy/InputCopyCore.vue +132 -0
  30. package/app/components/forms/input-copy/stories/InputCopyCore.stories.ts +89 -0
  31. package/app/components/forms/input-copy/tests/InputCopyCore.spec.ts +212 -0
  32. package/app/components/forms/input-copy/tests/__snapshots__/InputCopyCore.spec.ts.snap +28 -0
  33. package/app/layouts/default.vue +1 -0
  34. package/app/pages/index.vue +0 -5
  35. package/app/pages/page-hero-highlights.vue +15 -11
  36. package/modules/icon-sets.ts +53 -0
  37. package/nuxt.config.ts +8 -0
  38. package/package.json +49 -6
  39. package/app/components/03.organisms/treatment-consultant/TreatmentConsultant.vue +0 -2204
  40. package/app/components/03.organisms/treatment-consultant/stories/TreatmentConsultant.stories.ts +0 -38
  41. package/app/pages/ui/services/treatment-consultant.vue +0 -39
@@ -0,0 +1,28 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`InputCopyCore > Snapshots > custom labels 1`] = `
4
+ "<div class="input-copy-core" data-testid="input-copy-core"><input id="copy-input" type="text" readonly="" aria-readonly="true" class="input-copy-field" value="sk_live_abc123def456"><button type="button" aria-disabled="false" data-testid="input-button-core" data-theme="default" class="input-button-core inline input-copy-button" aria-label="Copy key">
5
+ <!--v-if-->
6
+ <!--v-if--><span class="button-text">Copy key</span>
7
+ <!--v-if-->
8
+ <!--v-if-->
9
+ </button></div>"
10
+ `;
11
+
12
+ exports[`InputCopyCore > Snapshots > default 1`] = `
13
+ "<div class="input-copy-core" data-testid="input-copy-core"><input id="copy-input" type="text" readonly="" aria-readonly="true" class="input-copy-field" value="sk_live_abc123def456"><button type="button" aria-disabled="false" data-testid="input-button-core" data-theme="default" class="input-button-core inline input-copy-button" aria-label="Copy">
14
+ <!--v-if-->
15
+ <!--v-if--><span class="button-text">Copy</span>
16
+ <!--v-if-->
17
+ <!--v-if-->
18
+ </button></div>"
19
+ `;
20
+
21
+ exports[`InputCopyCore > Snapshots > with styleClassPassthrough 1`] = `
22
+ "<div class="input-copy-core my-copy-input" data-testid="input-copy-core"><input id="copy-input" type="text" readonly="" aria-readonly="true" class="input-copy-field" value="sk_live_abc123def456"><button type="button" aria-disabled="false" data-testid="input-button-core" data-theme="default" class="input-button-core inline input-copy-button" aria-label="Copy">
23
+ <!--v-if-->
24
+ <!--v-if--><span class="button-text">Copy</span>
25
+ <!--v-if-->
26
+ <!--v-if-->
27
+ </button></div>"
28
+ `;
@@ -106,6 +106,7 @@ const responsiveNavLinks = {
106
106
  { name: "Masonry Grid Sorted", path: "/ui/masonry-grid-sorted" },
107
107
  { name: "Masonry Grid Ordered", path: "/ui/masonry-grid-ordered" },
108
108
  { name: "Masonry Columns", path: "/ui/masonry-columns" },
109
+ { name: "Page Hero Highlights", path: "/page-hero-highlights" },
109
110
  ],
110
111
  },
111
112
  {
@@ -31,11 +31,6 @@
31
31
  <NuxtLink class="page-body-normal" to="/ui/contact-section">Contact Section</NuxtLink>
32
32
  </LayoutRow>
33
33
 
34
- <LayoutRow tag="div" variant="full-width" :style-class-passthrough="['mbe-20']">
35
- <h1 class="page-heading-1">Treatment Consultant</h1>
36
- <NuxtLink class="page-body-normal" to="/ui/services/treatment-consultant">Treatment Consultant</NuxtLink>
37
- </LayoutRow>
38
-
39
34
  <LayoutRow tag="div" variant="inset-content" :style-class-passthrough="['mbe-20']">
40
35
  <h2 class="page-heading-2">PopOver component 1</h2>
41
36
  <ClientOnly>
@@ -3,18 +3,26 @@
3
3
  <NuxtLayout name="default">
4
4
  <template #layout-content>
5
5
  <PageHeroHighlights
6
+ tag="section"
6
7
  max-width="1064px"
7
8
  content-align="start"
9
+ :content-panel="true"
8
10
  :highlights-equal-widths="false"
9
11
  highlights-justify="start"
10
12
  :highlight-title-baseline="true"
11
13
  :style-class-passthrough="['mbe-32']"
12
14
  >
13
- <template #header>
14
- <div class="some-header-content">
15
- <p class="page-heading-1">Dashboard</p>
16
- <p class="page-body-normal">Overview of your account activity and key metrics.</p>
17
- </div>
15
+ <template #header="{ headingId }">
16
+ <PageHeroHighlightsHeader>
17
+ <template #start>
18
+ <h1 :id="headingId" class="page-heading-1">Dashboard</h1>
19
+ <p class="page-body-normal">Overview of your account activity and key metrics.</p>
20
+ </template>
21
+ <template #end>
22
+ <h1 :id="headingId" class="page-heading-1">Dashboard</h1>
23
+ <p class="page-body-normal">Overview of your account activity and key metrics.</p>
24
+ </template>
25
+ </PageHeroHighlightsHeader>
18
26
  </template>
19
27
  <template #highlights>
20
28
  <div class="highlight">
@@ -59,12 +67,8 @@ useHead({
59
67
  <style lang="css">
60
68
  .page-hero-highlights-page {
61
69
  .page-hero-highlights {
62
- .header-row {
63
- .header-slot {
64
- .some-header-content {
65
- padding-block: 4rem 3rem;
66
- }
67
- }
70
+ .page-hero-highlights-header {
71
+ padding-block: 4rem 3rem;
68
72
  }
69
73
 
70
74
  .content-row {
@@ -0,0 +1,53 @@
1
+ import { defineNuxtModule, logger } from "@nuxt/kit";
2
+ import { createRequire } from "node:module";
3
+ import { pathToFileURL } from "node:url";
4
+
5
+ /**
6
+ * Icon sets used by srcdev-nuxt-components components.
7
+ * These must be installed in the consumer app to avoid runtime CDN fetches (FOUC).
8
+ */
9
+ const ICON_SETS = [
10
+ "@iconify-json/akar-icons",
11
+ "@iconify-json/bi",
12
+ "@iconify-json/bitcoin-icons",
13
+ "@iconify-json/gravity-ui",
14
+ "@iconify-json/ic",
15
+ "@iconify-json/lucide",
16
+ "@iconify-json/material-symbols",
17
+ "@iconify-json/mdi",
18
+ "@iconify-json/radix-icons",
19
+ ] as const;
20
+
21
+ export default defineNuxtModule({
22
+ meta: {
23
+ name: "srcdev-icon-sets",
24
+ },
25
+ setup(_, nuxt) {
26
+ // Skip when running as the layer's own standalone dev/build
27
+ if (process.env.SRCDEV_STANDALONE) return;
28
+
29
+ // Resolve packages from the consumer's project root, not the layer's own node_modules
30
+ const consumerRequire = createRequire(pathToFileURL(nuxt.options.rootDir + "/").href);
31
+
32
+ const missing = ICON_SETS.filter((pkg) => {
33
+ try {
34
+ consumerRequire.resolve(pkg);
35
+ return false;
36
+ } catch {
37
+ return true;
38
+ }
39
+ });
40
+
41
+ if (missing.length > 0) {
42
+ logger.info(
43
+ `[srcdev-nuxt-components] Some icon set packages used by layer components are not installed in this project.\n` +
44
+ `If you use those components and see icons flashing in on page load, install the relevant packages.\n\n` +
45
+ `Not installed: ${missing.join(", ")}\n\n` +
46
+ `Install all at once:\n\n` +
47
+ ` npm install ${missing.join(" ")}\n\n` +
48
+ `Your own app's icon sets are unaffected — this only covers sets used by layer components.\n` +
49
+ `See .claude/skills/srcdev-nuxt-components/skills/icon-sets.md for the component→package mapping.`
50
+ );
51
+ }
52
+ },
53
+ });
package/nuxt.config.ts CHANGED
@@ -5,6 +5,8 @@ const { resolve } = createResolver(import.meta.url);
5
5
  const isStandalone = !!process.env.SRCDEV_STANDALONE;
6
6
 
7
7
  export default defineNuxtConfig({
8
+ // debug: !isProduction,
9
+ debug: false,
8
10
  devtools: { enabled: true },
9
11
 
10
12
  // Server-only secrets — Nuxt reads matching NUXT_* env vars automatically.
@@ -26,6 +28,7 @@ export default defineNuxtConfig({
26
28
  modules: [
27
29
  // Required by consumers — always included
28
30
  resolve("./modules/colour-scheme"),
31
+ resolve("./modules/icon-sets"),
29
32
  "@nuxt/icon",
30
33
  ...(process.env.STORYBOOK ? [] : ["@nuxt/fonts"]),
31
34
  "@nuxt/image",
@@ -103,6 +106,11 @@ export default defineNuxtConfig({
103
106
  // (avoids /_vercel/image which has no source images in storybook-static/)
104
107
  provider: process.env.STORYBOOK ? "none" : undefined,
105
108
  },
109
+ vite: {
110
+ optimizeDeps: {
111
+ include: ["@oddbird/css-anchor-positioning"],
112
+ },
113
+ },
106
114
  vue: {
107
115
  runtimeCompiler: true,
108
116
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-components",
3
3
  "type": "module",
4
- "version": "9.0.18",
4
+ "version": "9.1.1",
5
5
  "main": "nuxt.config.ts",
6
6
  "types": "types.d.ts",
7
7
  "license": "MIT",
@@ -39,14 +39,57 @@
39
39
  "nuxt.config.ts",
40
40
  "types.d.ts"
41
41
  ],
42
+ "peerDependencies": {
43
+ "@iconify-json/akar-icons": "*",
44
+ "@iconify-json/bi": "*",
45
+ "@iconify-json/bitcoin-icons": "*",
46
+ "@iconify-json/gravity-ui": "*",
47
+ "@iconify-json/ic": "*",
48
+ "@iconify-json/lucide": "*",
49
+ "@iconify-json/material-symbols": "*",
50
+ "@iconify-json/mdi": "*",
51
+ "@iconify-json/radix-icons": "*"
52
+ },
53
+ "peerDependenciesMeta": {
54
+ "@iconify-json/akar-icons": {
55
+ "optional": true
56
+ },
57
+ "@iconify-json/bi": {
58
+ "optional": true
59
+ },
60
+ "@iconify-json/bitcoin-icons": {
61
+ "optional": true
62
+ },
63
+ "@iconify-json/gravity-ui": {
64
+ "optional": true
65
+ },
66
+ "@iconify-json/ic": {
67
+ "optional": true
68
+ },
69
+ "@iconify-json/lucide": {
70
+ "optional": true
71
+ },
72
+ "@iconify-json/material-symbols": {
73
+ "optional": true
74
+ },
75
+ "@iconify-json/mdi": {
76
+ "optional": true
77
+ },
78
+ "@iconify-json/radix-icons": {
79
+ "optional": true
80
+ }
81
+ },
42
82
  "devDependencies": {
43
83
  "@chromatic-com/storybook": "4.1.2",
44
84
  "@iconify-json/akar-icons": "1.2.7",
45
85
  "@iconify-json/bi": "1.2.7",
46
86
  "@iconify-json/bitcoin-icons": "1.2.4",
47
- "@iconify-json/gravity-ui": "1.2.11",
48
- "@iconify-json/material-symbols": "1.2.53",
87
+ "@iconify-json/gravity-ui": "1.2.12",
88
+ "@iconify-json/ic": "*",
89
+ "@iconify-json/lucide": "*",
90
+ "@iconify-json/material-symbols": "1.2.64",
49
91
  "@iconify-json/mdi": "1.2.3",
92
+ "@iconify-json/radix-icons": "*",
50
93
  "@nuxt/eslint": "1.13.0",
51
94
  "@nuxt/test-utils": "3.23.0",
52
95
  "@nuxtjs/storybook": "9.1.0-29374011.dab79ae",
@@ -55,6 +98,7 @@
55
98
  "@storybook/addon-docs": "10.0.7",
56
99
  "@storybook/builder-vite": "10.0.7",
57
100
  "@vue/test-utils": "2.4.6",
101
+ "@vueuse/core": "14.2.1",
58
102
  "eslint": "9.39.2",
59
103
  "eslint-plugin-storybook": "10.0.7",
60
104
  "happy-dom": "20.5.0",
@@ -82,10 +126,9 @@
82
126
  "@nuxt/image": "2.0.0",
83
127
  "@oddbird/css-anchor-positioning": "0.9.0",
84
128
  "@pinia/nuxt": "0.11.3",
85
- "@vueuse/core": "14.2.0",
86
- "@vueuse/motion": "^3.0.3",
129
+ "@vueuse/motion": "3.0.3",
87
130
  "focus-trap-vue": "4.1.0",
88
- "nuxt": "4.3.0",
131
+ "nuxt": "4.4.2",
89
132
  "pinia": "3.0.4",
90
133
  "pinia-plugin-persistedstate": "4.7.1",
91
134
  "zod": "4.3.6"