nuxt-leap-mds 0.1.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.
@@ -0,0 +1,26 @@
1
+ import * as nuxt_schema from 'nuxt/schema';
2
+
3
+ interface ModuleOptions {
4
+ /**
5
+ * Register bundled CSS from `leap-mds-storybook/style.css` (foundation SCSS +
6
+ * Tailwind theme + component styles).
7
+ * @default true
8
+ */
9
+ importCss?: boolean;
10
+ /**
11
+ * Register Suisse Intl `@font-face` rules from `leap-mds-storybook/fonts/suisse-font-face.css`
12
+ * (loads before `style.css` when both are enabled).
13
+ * @default true
14
+ */
15
+ importFonts?: boolean;
16
+ /**
17
+ * Register LEAP MDS components for Nuxt auto-import with this prefix (e.g. `Mds` → `MdsButton`).
18
+ * Set to `''` to use unprefixed names matching the library exports (`Button`, etc.).
19
+ * @default 'Mds'
20
+ */
21
+ componentPrefix?: string;
22
+ }
23
+ declare const _default: nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
24
+
25
+ export { _default as default };
26
+ export type { ModuleOptions };
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "nuxt-leap-mds",
3
+ "configKey": "leapMds",
4
+ "compatibility": {
5
+ "nuxt": ">=3.14.0"
6
+ },
7
+ "version": "0.1.0",
8
+ "builder": {
9
+ "@nuxt/module-builder": "1.0.2",
10
+ "unbuild": "unknown"
11
+ }
12
+ }
@@ -0,0 +1,108 @@
1
+ import { defineNuxtModule, addComponent, addImports } from '@nuxt/kit';
2
+
3
+ const LIB = "leap-mds-storybook";
4
+ const LEAP_MDS_COMPONENT_EXPORTS = [
5
+ "Accordion",
6
+ "AccordionItem",
7
+ "AccordionSplitFeature",
8
+ "ArticleItem",
9
+ "BlogCardContainer",
10
+ "BlogCardItem",
11
+ "Card",
12
+ "CardLeadership",
13
+ "CardLeadershipModal",
14
+ "CardV2",
15
+ "Carousel",
16
+ "CarouselAnimated",
17
+ "CarouselIconItem",
18
+ "Cta",
19
+ "Page",
20
+ "EventPageItem",
21
+ "EventsPastContainer",
22
+ "EventsPastItem",
23
+ "EventsUpcomingContainer",
24
+ "EventsUpcomingItem",
25
+ "FooterDefault",
26
+ "FooterLinkGroup",
27
+ "HeaderDefault",
28
+ "HeaderMenuFeature",
29
+ "HeaderMenuItem",
30
+ "ImageFullWidth",
31
+ "LayoutGrid",
32
+ "LayoutGridAudioItem",
33
+ "LayoutGridHighlightItem",
34
+ "LayoutGridIconItem",
35
+ "LayoutGridImageItem",
36
+ "LayoutGridVideoItem",
37
+ "LayoutLogoDisplay",
38
+ "LayoutSplitFeature",
39
+ "LayoutSplitFeatureText",
40
+ "LayoutSplitHeading",
41
+ "LayoutTabs",
42
+ "LayoutTabsV2",
43
+ "LayoutTimelineCard",
44
+ "LayoutTimelineContainer",
45
+ "ModalRegion",
46
+ "RichTextRenderer",
47
+ "Button",
48
+ "Pill",
49
+ "PillSelect",
50
+ "HeroCarousel",
51
+ "HeroCarouselSlide",
52
+ "HeroSlider",
53
+ "HeroSliderItem",
54
+ "HeroLocation",
55
+ "HeroLifestyleSplitAngle",
56
+ "HeroText",
57
+ "HeroRoundBottomImage",
58
+ "HeroLifestyleSplit",
59
+ "HeroProductSplit",
60
+ "HeroProductCentered",
61
+ "UtilityComponentGroup",
62
+ "UtilityNestedPage",
63
+ "UtilitySearchBar",
64
+ "UtilitySitemap"
65
+ ];
66
+ const module$1 = defineNuxtModule({
67
+ meta: {
68
+ name: "nuxt-leap-mds",
69
+ configKey: "leapMds",
70
+ compatibility: {
71
+ nuxt: ">=3.14.0"
72
+ }
73
+ },
74
+ defaults: {
75
+ importCss: true,
76
+ importFonts: true,
77
+ componentPrefix: "Mds"
78
+ },
79
+ setup(options, nuxt) {
80
+ nuxt.options.build.transpile ??= [];
81
+ if (!nuxt.options.build.transpile.includes(LIB)) {
82
+ nuxt.options.build.transpile.push(LIB);
83
+ }
84
+ if (options.importCss) {
85
+ nuxt.options.css.push(`${LIB}/style.css`);
86
+ }
87
+ if (options.importFonts) {
88
+ nuxt.options.css.unshift(`${LIB}/fonts/suisse-font-face.css`);
89
+ }
90
+ const prefix = options.componentPrefix ?? "";
91
+ for (const exportName of LEAP_MDS_COMPONENT_EXPORTS) {
92
+ addComponent({
93
+ name: `${prefix}${exportName}`,
94
+ export: exportName,
95
+ filePath: LIB,
96
+ // Required for StoryblokComponent: it uses resolveDynamicComponent(), which only
97
+ // sees app-wide (global) registrations—not plain Nuxt auto-imports.
98
+ global: true
99
+ });
100
+ }
101
+ addImports([
102
+ { name: "getValidRegionCode", from: LIB },
103
+ { name: "registerLeapMdsFontAwesome", from: LIB }
104
+ ]);
105
+ }
106
+ });
107
+
108
+ export { module$1 as default };
@@ -0,0 +1,3 @@
1
+ export { default } from './module.mjs'
2
+
3
+ export { type ModuleOptions } from './module.mjs'
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "nuxt-leap-mds",
3
+ "version": "0.1.0",
4
+ "description": "Nuxt module for leap-mds-storybook (LEAP design system components)",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/types.d.mts",
10
+ "import": "./dist/module.mjs",
11
+ "default": "./dist/module.mjs"
12
+ }
13
+ },
14
+ "main": "./dist/module.mjs",
15
+ "typesVersions": {
16
+ "*": {
17
+ ".": [
18
+ "./dist/types.d.mts"
19
+ ]
20
+ }
21
+ },
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "scripts": {
26
+ "build": "nuxt-module-build build",
27
+ "prepack": "nuxt-module-build build"
28
+ },
29
+ "dependencies": {
30
+ "@nuxt/kit": "^4.4.2"
31
+ },
32
+ "devDependencies": {
33
+ "@nuxt/module-builder": "^1.0.2",
34
+ "leap-mds-storybook": "workspace:*",
35
+ "nuxt": "^4.4.2"
36
+ },
37
+ "peerDependencies": {
38
+ "@storyblok/vue": "^10.0.0",
39
+ "leap-mds-storybook": "^0.1.0",
40
+ "nuxt": "^3.14.0 || ^4.0.0",
41
+ "vue": "^3.5.0"
42
+ },
43
+ "engines": {
44
+ "node": "^20.19.0 || >=22.12.0"
45
+ }
46
+ }