@irbags/ui-kit 1.0.1-alpha.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.
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ <!--
2
+ Get your module up and running quickly.
3
+
4
+ Find and replace all on all files (CMD+SHIFT+F):
5
+ - Name: My Module
6
+ - Package name: my-module
7
+ - Description: My new Nuxt module
8
+ -->
9
+
10
+ # My Module
11
+
12
+ [![npm version][npm-version-src]][npm-version-href]
13
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
14
+ [![License][license-src]][license-href]
15
+ [![Nuxt][nuxt-src]][nuxt-href]
16
+
17
+ My new Nuxt module for doing amazing things.
18
+
19
+ - [✨ &nbsp;Release Notes](/CHANGELOG.md)
20
+ <!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
21
+ <!-- - [📖 &nbsp;Documentation](https://example.com) -->
22
+
23
+ ## Features
24
+
25
+ <!-- Highlight some of the features your module provide here -->
26
+ - ⛰ &nbsp;Foo
27
+ - 🚠 &nbsp;Bar
28
+ - 🌲 &nbsp;Baz
29
+
30
+ ## Quick Setup
31
+
32
+ Install the module to your Nuxt application with one command:
33
+
34
+ ```bash
35
+ npx nuxi module add my-module
36
+ ```
37
+
38
+ That's it! You can now use My Module in your Nuxt app ✨
39
+
40
+
41
+ ## Contribution
42
+
43
+ <details>
44
+ <summary>Local development</summary>
45
+
46
+ ```bash
47
+ # Install dependencies
48
+ npm install
49
+
50
+ # Generate type stubs
51
+ npm run dev:prepare
52
+
53
+ # Develop with the playground
54
+ npm run dev
55
+
56
+ # Build the playground
57
+ npm run dev:build
58
+
59
+ # Run ESLint
60
+ npm run lint
61
+
62
+ # Run Vitest
63
+ npm run test
64
+ npm run test:watch
65
+
66
+ # Release new version
67
+ npm run release
68
+ ```
69
+
70
+ </details>
71
+
72
+
73
+ <!-- Badges -->
74
+ [npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=020420&colorB=00DC82
75
+ [npm-version-href]: https://npmjs.com/package/my-module
76
+
77
+ [npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=020420&colorB=00DC82
78
+ [npm-downloads-href]: https://npm.chart.dev/my-module
79
+
80
+ [license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=020420&colorB=00DC82
81
+ [license-href]: https://npmjs.com/package/my-module
82
+
83
+ [nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
84
+ [nuxt-href]: https://nuxt.com
@@ -0,0 +1,9 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+
3
+ interface ModuleOptions {
4
+ prefix?: string;
5
+ }
6
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
7
+
8
+ export { _default as default };
9
+ export type { ModuleOptions };
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "irbags-ui",
3
+ "configKey": "irbagsUi",
4
+ "compatibility": {
5
+ "nuxt": "^3.0.0"
6
+ },
7
+ "version": "1.0.1-alpha.0",
8
+ "builder": {
9
+ "@nuxt/module-builder": "1.0.2",
10
+ "unbuild": "3.6.1"
11
+ }
12
+ }
@@ -0,0 +1,186 @@
1
+ import { defineNuxtModule, createResolver, installModules, addComponent } from '@nuxt/kit';
2
+ import { existsSync, readdirSync, statSync } from 'fs';
3
+ import { join } from 'path';
4
+
5
+ const ibgAppConfig = {
6
+ ui: {
7
+ colors: {
8
+ black: "black",
9
+ white: "white",
10
+ error: "error",
11
+ secondary: "secondary"
12
+ },
13
+ button: {
14
+ compoundVariants: [
15
+ {
16
+ color: "black",
17
+ variant: "link",
18
+ class: "text-black hover:text-secondary disabled:text-secondary active:text-black cursor-pointer text-xl leading-none font-medium p-0 bg-transparent active:bg-transparent hover:bg-transparent"
19
+ }
20
+ ],
21
+ defaultVariants: {
22
+ color: "black",
23
+ variant: "link"
24
+ }
25
+ },
26
+ input: {
27
+ slots: {
28
+ base: [
29
+ "placeholder:text-secondary !text-xl !font-medium !p-0 rounded-none leading-none"
30
+ ]
31
+ },
32
+ compoundVariants: [
33
+ {
34
+ color: "black",
35
+ variant: "none",
36
+ class: "text-black"
37
+ },
38
+ {
39
+ color: "error",
40
+ variant: "none",
41
+ class: "text-error"
42
+ }
43
+ ],
44
+ defaultVariants: {
45
+ color: "black",
46
+ variant: "none"
47
+ }
48
+ },
49
+ radioGroup: {
50
+ slots: {
51
+ root: "w-max",
52
+ base: "bg-secondary-500 ring-0 cursor-pointer",
53
+ item: `flex items-center text-black not-has-[button[aria-checked="true"]]:text-secondary-500`,
54
+ label: "text-inherit font-medium text-4xl cursor-pointer",
55
+ indicator: "after:bg-transparent cursor-pointer"
56
+ },
57
+ variants: {
58
+ indicator: {
59
+ start: {
60
+ wrapper: "ml-2.5"
61
+ }
62
+ },
63
+ size: {
64
+ xl: {
65
+ base: "size-big"
66
+ }
67
+ }
68
+ },
69
+ defaultVariants: {
70
+ color: "black",
71
+ variant: "list",
72
+ size: "xl"
73
+ }
74
+ },
75
+ fileUpload: {
76
+ slots: {
77
+ root: "cursor-pointer",
78
+ base: "border-none rounded-none bg-gray-500",
79
+ avatar: "bg-transparent text-6xl",
80
+ fileLeadingAvatar: "bg-secondary-500 text-6xl"
81
+ },
82
+ variants: {
83
+ dropzone: {
84
+ true: "border-none"
85
+ },
86
+ layout: {
87
+ grid: {
88
+ fileLeadingAvatar: "rounded-none"
89
+ }
90
+ }
91
+ },
92
+ compoundVariants: [
93
+ {
94
+ interactive: true,
95
+ disabled: false,
96
+ class: "hover:!bg-gray-500 hover:opacity-70"
97
+ }
98
+ ]
99
+ },
100
+ card: {
101
+ slots: {
102
+ root: "rounded-none",
103
+ body: "p-0 sm:p-0",
104
+ footer: "p-0 sm:px-0 !pl-5 !pt-5 text-xl text-black font-medium"
105
+ },
106
+ variants: {
107
+ variant: {
108
+ outline: "ring-0"
109
+ }
110
+ }
111
+ }
112
+ }
113
+ };
114
+
115
+ const module$1 = defineNuxtModule({
116
+ meta: {
117
+ name: "irbags-ui",
118
+ configKey: "irbagsUi",
119
+ compatibility: {
120
+ nuxt: "^3.0.0"
121
+ }
122
+ },
123
+ defaults: {
124
+ prefix: "IBG"
125
+ },
126
+ async setup(_options, _nuxt) {
127
+ const resolver = createResolver(import.meta.url);
128
+ const componentsDir = resolver.resolve("./runtime/components");
129
+ const cssPath = resolver.resolve("./runtime/assets/css/main.css");
130
+ if (!_nuxt.options.css.includes(cssPath)) {
131
+ _nuxt.options.css.push(cssPath);
132
+ }
133
+ _nuxt.options.colorMode = {
134
+ ..._nuxt.options.colorMode || {},
135
+ preference: "light"
136
+ // устанавливаем светлую тему
137
+ };
138
+ _nuxt.options.icon = {
139
+ ..._nuxt.options.icon || {},
140
+ customCollections: [
141
+ {
142
+ prefix: "ibg",
143
+ dir: resolver.resolve("./runtime/assets/icons")
144
+ }
145
+ ]
146
+ };
147
+ _nuxt.options.ui = {
148
+ prefix: "IBG",
149
+ theme: {
150
+ colors: ["black", "white", "secondary", "error"]
151
+ }
152
+ };
153
+ const modulesToInstall = /* @__PURE__ */ new Map([["@nuxt/ui", {}]]);
154
+ const installed = /* @__PURE__ */ new Set([]);
155
+ await installModules(modulesToInstall, installed, _nuxt);
156
+ const { ui: { colors, button, card, fileUpload, input, radioGroup } } = ibgAppConfig;
157
+ _nuxt.options.appConfig = {
158
+ ..._nuxt.options.appConfig,
159
+ ui: {
160
+ ..._nuxt.options.appConfig.ui,
161
+ colors,
162
+ button,
163
+ card,
164
+ fileUpload,
165
+ input,
166
+ radioGroup
167
+ }
168
+ };
169
+ if (!existsSync(componentsDir)) return;
170
+ const entries = readdirSync(componentsDir);
171
+ for (const entry of entries) {
172
+ const dirPath = join(componentsDir, entry);
173
+ if (!statSync(dirPath).isDirectory()) continue;
174
+ const componentFile = join(dirPath, `${entry}.vue`);
175
+ if (!existsSync(componentFile)) continue;
176
+ const name = `${_options.prefix ?? ""}${entry}`;
177
+ addComponent({
178
+ name,
179
+ filePath: componentFile,
180
+ export: "default"
181
+ });
182
+ }
183
+ }
184
+ });
185
+
186
+ export { module$1 as default };
@@ -0,0 +1 @@
1
+ @import "tailwindcss";@import "@nuxt/ui";@source "../../../app.config.ts";@theme static{--color-secondary-500:#dadada;--color-black-500:#000;--color-white-500:#fff;--color-error-500:#ff2a2a;--color-gray-500:#d7d7d7;--text-4xl:2.1875rem;--size-big:1.5625rem;--ui-text-muted:#fff;--text-6xl:3.4375rem}
@@ -0,0 +1,4 @@
1
+ <svg width="55" height="38" viewBox="0 0 55 38" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M34.4328 22.4993L40.3696 11.9153L55 38H0L21.6275 0L34.4328 22.4993Z" fill="white"/>
3
+ <path d="M37.5764 3.48333C37.5764 5.40712 36.0461 6.96667 34.1583 6.96667C32.2706 6.96667 30.7403 5.40712 30.7403 3.48333C30.7403 1.55954 32.2706 0 34.1583 0C36.0461 0 37.5764 1.55954 37.5764 3.48333Z" fill="white"/>
4
+ </svg>
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("@vue/runtime-core").DefineComponent<{}, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <IBGFileUpload :file-delete="false" accept="image/*" icon="ibg:image">
3
+ <template #files-top="{ removeFile }">
4
+ <p
5
+ class="text-black z-10 font-medium absolute top-5 left-5"
6
+ @click="removeFile()"
7
+ >
8
+ заменить
9
+ </p>
10
+ </template>
11
+ </IBGFileUpload>
12
+ </template>
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("@vue/runtime-core").DefineComponent<{}, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _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,62 @@
1
+ {
2
+ "name": "@irbags/ui-kit",
3
+ "version": "1.0.1-alpha.0",
4
+ "description": "My new Nuxt module",
5
+ "repository": "your-org/my-module",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/types.d.mts",
11
+ "import": "./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
+ "dev": "npm run dev:prepare && nuxi dev playground",
27
+ "dev:build": "nuxi build playground",
28
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
29
+ "lint": "eslint .",
30
+ "test": "vitest run",
31
+ "test:watch": "vitest watch",
32
+ "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
33
+ "prepack": "nuxt-module-build build",
34
+ "pack": "npm pack",
35
+ "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
36
+ "release:alpha": "npm version prerelease --preid=alpha && npm publish --tag next --access public",
37
+ "release:beta": "npm version prerelease --preid=beta && npm publish --tag next --access public",
38
+ "release:rc": "npm version prerelease --preid=rc && npm publish --tag next --access public",
39
+ "release:patch": "npm version patch && npm publish --tag latest --access public",
40
+ "release:minor": "npm version minor && npm publish --tag latest --access public",
41
+ "release:major": "npm version major && npm publish --tag latest --access public"
42
+ },
43
+ "dependencies": {
44
+ "@antfu/eslint-config": "^6.2.0",
45
+ "@nuxt/kit": "^4.2.1",
46
+ "@nuxt/ui": "^3.3.7",
47
+ "@nuxtjs/tailwindcss": "^6.14.0",
48
+ "nuxt": "3.18.1"
49
+ },
50
+ "devDependencies": {
51
+ "@nuxt/devtools": "^3.1.0",
52
+ "@nuxt/eslint-config": "^1.10.0",
53
+ "@nuxt/module-builder": "^1.0.2",
54
+ "@nuxt/schema": "^4.2.1",
55
+ "@types/node": "latest",
56
+ "changelogen": "^0.6.2",
57
+ "eslint": "^9.39.1",
58
+ "typescript": "~5.9.3",
59
+ "vue-tsc": "^3.1.4"
60
+ },
61
+ "packageManager": "pnpm@10.14.0+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748"
62
+ }