windly-ui 1.0.0 → 1.0.2

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 (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +57 -33
  3. package/package.json +49 -11
  4. package/ui-library/dist/module.d.mts +3 -0
  5. package/ui-library/dist/module.json +8 -0
  6. package/ui-library/dist/module.mjs +22 -0
  7. package/ui-library/dist/types.d.mts +7 -0
  8. package/app/app.vue +0 -10
  9. package/app/assets/css/tailwind.css +0 -3
  10. package/app/components/doc/component.vue +0 -34
  11. package/app/components/doc/megaSection.vue +0 -56
  12. package/app/components/doc/section.vue +0 -56
  13. package/app/pages/_docs.vue +0 -2420
  14. package/app/pages/index.vue +0 -137
  15. package/nuxt.config.ts +0 -19
  16. package/public/doc/avatar.avif +0 -0
  17. package/public/favicon.ico +0 -0
  18. package/public/robots.txt +0 -2
  19. package/tailwind.config.ts +0 -28
  20. package/tsconfig.json +0 -18
  21. package/ui-library/components/Accordion.vue +0 -118
  22. package/ui-library/components/Avatar.vue +0 -121
  23. package/ui-library/components/Badge.vue +0 -116
  24. package/ui-library/components/Breadcrumbs.vue +0 -138
  25. package/ui-library/components/Button.vue +0 -154
  26. package/ui-library/components/Card.vue +0 -84
  27. package/ui-library/components/Checkbox.vue +0 -148
  28. package/ui-library/components/CodeBlock.vue +0 -99
  29. package/ui-library/components/ColorPicker.vue +0 -302
  30. package/ui-library/components/Date.vue +0 -240
  31. package/ui-library/components/Dialog.vue +0 -187
  32. package/ui-library/components/Divider.vue +0 -78
  33. package/ui-library/components/Drawer.vue +0 -67
  34. package/ui-library/components/Dropdown.vue +0 -248
  35. package/ui-library/components/FileUploader.vue +0 -330
  36. package/ui-library/components/Icon.vue +0 -82
  37. package/ui-library/components/Image.vue +0 -78
  38. package/ui-library/components/Input.vue +0 -531
  39. package/ui-library/components/Radio.vue +0 -356
  40. package/ui-library/components/ScrollArea.vue +0 -43
  41. package/ui-library/components/Select.vue +0 -309
  42. package/ui-library/components/Stepper.vue +0 -361
  43. package/ui-library/components/TabPanel.vue +0 -25
  44. package/ui-library/components/Table.vue +0 -152
  45. package/ui-library/components/Tabs.vue +0 -71
  46. package/ui-library/components/Textarea.vue +0 -233
  47. package/ui-library/components/Toggle.vue +0 -319
  48. package/ui-library/components/Tooltip.vue +0 -200
  49. package/ui-library/components/plugin.ts +0 -8
  50. package/ui-library/components/uiProps.ts +0 -11
  51. package/ui-library/components/useUiClasses.ts +0 -159
  52. package/ui-library/module.ts +0 -20
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Your Name
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -142,6 +142,30 @@ No unnecessary abstractions or overhead.
142
142
 
143
143
  ## Example Usage
144
144
 
145
+ ```vue
146
+ <template>
147
+ <UICard bordered>
148
+ <template #header>
149
+ <h3 class="text-lg font-semibold">Welcome</h3>
150
+ </template>
151
+
152
+ <p>This is a simple card using the UI library.</p>
153
+ # Tailwind-Based UI Library for Nuxt 4
154
+
155
+ A lightweight, modular UI component library built specifically for Nuxt 4 applications, powered by Tailwind CSS.
156
+
157
+ ## Overview
158
+
159
+ This UI library is designed to accelerate frontend development by providing reusable, customizable, and auto-imported components.
160
+
161
+ ## Key Features
162
+
163
+ - Tailwind-first design: components accept Tailwind utility classes directly.
164
+ - Auto-imported components via Nuxt 4's component system.
165
+ - Lightweight, framework-native Vue 3 components.
166
+
167
+ ## Example Usage
168
+
145
169
  ```vue
146
170
  <template>
147
171
  <UICard bordered>
@@ -158,51 +182,51 @@ No unnecessary abstractions or overhead.
158
182
  </template>
159
183
  ```
160
184
 
161
- ---
185
+ ## Local test and packaging
162
186
 
163
- ## Advanced Example
187
+ 1. Build the module (the `prepare` script runs this automatically on `npm pack` and `npm publish`):
164
188
 
165
- ```vue
166
- <UITabs v-model="activeTab">
167
- <UITabPanel name="first" label="Overview">
168
- <p>Overview content</p>
169
- </UITabPanel>
170
-
171
- <UITabPanel name="second" label="Details">
172
- <p>Details content</p>
173
- </UITabPanel>
174
- </UITabs>
189
+ ```bash
190
+ npm run build
175
191
  ```
176
192
 
177
- ---
193
+ 2. Create a local tarball for testing:
178
194
 
179
- ## Goals
195
+ ```bash
196
+ npm pack
197
+ ```
180
198
 
181
- * Provide a clean alternative to heavy UI frameworks
182
- * Showcase advanced Vue patterns in a simple way
183
- * Enable rapid prototyping with Tailwind
184
- * Keep the system small, composable, and extensible
199
+ 3. In another project, install the generated tarball (replace the filename with the one produced by `npm pack`):
185
200
 
186
- ---
201
+ ```bash
202
+ npm install /path/to/windly-ui-1.0.2.tgz
203
+ ```
187
204
 
188
- ## Future Improvements
205
+ 4. Add the module to `nuxt.config` in the consuming project:
189
206
 
190
- * Theme system (dark mode, tokens)
191
- * Component playground with live prop editing
192
- * Accessibility improvements (ARIA support)
193
- * Animation utilities
194
- * Plugin system for extending components
207
+ ```ts
208
+ export default defineNuxtConfig({
209
+ modules: [
210
+ 'windly-ui'
211
+ ]
212
+ })
213
+ ```
195
214
 
196
- ---
215
+ ## Publish
216
+
217
+ 1. Bump the version in `package.json`.
218
+ 2. Ensure you are logged into npm: `npm login`.
219
+ 3. Publish:
197
220
 
198
- ## Summary
221
+ ```bash
222
+ npm publish --access public
223
+ ```
199
224
 
200
- This UI library is a developer-focused toolkit for building modern Nuxt applications quickly without sacrificing flexibility or control.
225
+ ## Notes
201
226
 
202
- It combines:
227
+ - The package auto-registers components under the `UI` prefix (for example `UIButton`, `UICard`).
228
+ - The `plugin.ts` also registers the most common components explicitly.
203
229
 
204
- * Vue 3 reactivity
205
- * Tailwind CSS flexibility
206
- * Clean and consistent component design
230
+ ## License
207
231
 
208
- Build fast, customize freely, and stay in control.
232
+ MIT
package/package.json CHANGED
@@ -1,21 +1,59 @@
1
1
  {
2
2
  "name": "windly-ui",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
+ "description": "A Nuxt 4 module providing a small Tailwind-based UI component library",
4
5
  "type": "module",
5
- "private": false,
6
+ "main": "./ui-library/dist/module.mjs",
7
+ "exports": {
8
+ ".": "./ui-library/dist/module.mjs"
9
+ },
10
+ "files": [
11
+ "ui-library/dist",
12
+ "README.md",
13
+ "LICENSE"
14
+ ],
6
15
  "scripts": {
7
- "build": "nuxt build",
8
- "dev": "nuxt dev",
9
- "generate": "nuxt generate",
10
- "preview": "nuxt preview",
11
- "postinstall": "nuxt prepare"
16
+ "build": "nuxt-module-build ui-library",
17
+ "prepare": "npm run build",
18
+ "prepublishOnly": "npm run build",
19
+ "pack": "npm pack",
20
+ "pack:local": "npm run build && npm pack --pack-destination ./pack",
21
+ "lint": "echo \"no lint configured\" && exit 0"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/your-username/windly-ui.git"
26
+ },
27
+ "keywords": [
28
+ "nuxt-module",
29
+ "nuxt",
30
+ "vue",
31
+ "tailwind",
32
+ "ui-library"
33
+ ],
34
+ "author": "Your Name <you@example.com>",
35
+ "license": "MIT",
36
+ "bugs": {
37
+ "url": "https://github.com/your-username/windly-ui/issues"
12
38
  },
13
- "dependencies": {
39
+ "homepage": "https://github.com/your-username/windly-ui#readme",
40
+ "peerDependencies": {
14
41
  "nuxt": "^4.2.2",
15
- "vue": "^3.5.26",
16
- "vue-router": "^4.6.4"
42
+ "vue": "^3.5.26"
17
43
  },
18
44
  "devDependencies": {
45
+ "@nuxt/module-builder": "^latest",
19
46
  "@nuxtjs/tailwindcss": "^6.14.0"
47
+ },
48
+ "typesVersions": {
49
+ "*": {
50
+ "*": ["./ui-library/dist/*"]
51
+ }
52
+ },
53
+ "engines": {
54
+ "node": ">=16"
55
+ },
56
+ "publishConfig": {
57
+ "access": "public"
20
58
  }
21
- }
59
+ }
@@ -0,0 +1,3 @@
1
+ declare const _default: any;
2
+
3
+ export { _default as default };
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "ui-library",
3
+ "configKey": "uiLibrary",
4
+ "builder": {
5
+ "@nuxt/module-builder": "1.0.2",
6
+ "unbuild": "3.6.1"
7
+ }
8
+ }
@@ -0,0 +1,22 @@
1
+ import { defineNuxtModule, createResolver, addComponentsDir } from '@nuxt/kit';
2
+
3
+ const module$1 = defineNuxtModule({
4
+ meta: {
5
+ name: "ui-library",
6
+ configKey: "uiLibrary"
7
+ },
8
+ setup(_, nuxt) {
9
+ const resolver = createResolver(import.meta.url);
10
+ addComponentsDir({
11
+ path: resolver.resolve("./components"),
12
+ prefix: "UI",
13
+ // This will prefix components with <UIButton />, <UICard /> etc.
14
+ pathPrefix: false,
15
+ // Don't include folder names as prefix
16
+ extensions: ["vue"],
17
+ watch: nuxt.options.dev
18
+ });
19
+ }
20
+ });
21
+
22
+ export { module$1 as default };
@@ -0,0 +1,7 @@
1
+ import type { NuxtModule } from '@nuxt/schema'
2
+
3
+ import type { default as Module } from './module.mjs'
4
+
5
+ export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
+
7
+ export { default } from './module.mjs'
package/app/app.vue DELETED
@@ -1,10 +0,0 @@
1
- <template>
2
- <NuxtLayout>
3
- <NuxtPage/>
4
- </NuxtLayout>
5
- </template>
6
- <style>
7
- body {
8
- font-family: "Poppins", sans-serif;
9
- }
10
- </style>
@@ -1,3 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
@@ -1,34 +0,0 @@
1
- <script setup>
2
- const props = defineProps({
3
- title: {
4
- type: String
5
- },
6
- caption: {
7
- type: String,
8
- default: ""
9
- }
10
- })
11
- const sectionId = props.title.split(' ').join('-').toLocaleLowerCase()
12
- const copySectionLink = async () => {
13
- const url = `${window.location.origin}${window.location.pathname}#${sectionId}`
14
-
15
- try {
16
- await navigator.clipboard.writeText(url)
17
- console.log('Link copied:', url)
18
- } catch (err) {
19
- console.error('Failed to copy link', err)
20
- }
21
- }
22
- </script>
23
- <template>
24
- <div :id="sectionId" class="flex flex-col my-10">
25
- <h4 class="text-3xl font-semibold text-gray-700 cursor-pointer" @click="copySectionLink"># {{title}}</h4>
26
- <div v-if="caption" class="text-md font-light mt-2 text-gray-800 pl-7">{{caption}}</div>
27
- <div class="my-6">
28
- <UICodeBlock :title="title">
29
- <slot />
30
- </UICodeBlock>
31
- </div>
32
- <hr/>
33
- </div>
34
- </template>
@@ -1,56 +0,0 @@
1
- <script setup>
2
- import { ref, computed } from 'vue'
3
-
4
- const props = defineProps({
5
- title: {
6
- type: String,
7
- required: true
8
- },
9
- subTitle: {
10
- type: String,
11
- default: ""
12
- },
13
- caption: {
14
- type: String,
15
- default: ""
16
- },
17
- })
18
-
19
- const sectionId = computed(() =>
20
- props.title.split(' ').join('-').toLowerCase()
21
- )
22
-
23
- const copySectionLink = async (e) => {
24
- e.stopPropagation()
25
-
26
- const url = `${window.location.origin}${window.location.pathname}#${sectionId.value}`
27
-
28
- try {
29
- await navigator.clipboard.writeText(url)
30
- console.log('Link copied:', url)
31
- } catch (err) {
32
- console.error('Failed to copy link', err)
33
- }
34
- }
35
- </script>
36
- <template>
37
- <section :id="sectionId">
38
- <div class="flex flex-col my-10">
39
- <UIAccordion class="!border-0" :default-open="true" :margin="false">
40
- <template #header>
41
- <h3 class="flex items-center gap-2 text-5xl font-semibold text-sky-500 group select-none">
42
- {{ title }}
43
- <span class="hidden group-hover:block text-xl hover:opacity-100" @click="copySectionLink">
44
- #
45
- </span>
46
- </h3>
47
- <div class="font-light text-gray-700">{{ subTitle }}</div>
48
- </template>
49
- <p v-if="caption" class="text-md font-light mt-2 text-gray-800 pl-7">
50
- {{ caption }}
51
- </p>
52
- <slot />
53
- </UIAccordion>
54
- </div>
55
- </section>
56
- </template>
@@ -1,56 +0,0 @@
1
- <script setup>
2
- import { ref, computed } from 'vue'
3
-
4
- const props = defineProps({
5
- title: {
6
- type: String,
7
- required: true
8
- },
9
- subTitle: {
10
- type: String,
11
- default: ""
12
- },
13
- caption: {
14
- type: String,
15
- default: ""
16
- },
17
- })
18
-
19
- const sectionId = computed(() =>
20
- props.title.split(' ').join('-').toLowerCase()
21
- )
22
-
23
- const copySectionLink = async (e) => {
24
- e.stopPropagation()
25
-
26
- const url = `${window.location.origin}${window.location.pathname}#${sectionId.value}`
27
-
28
- try {
29
- await navigator.clipboard.writeText(url)
30
- console.log('Link copied:', url)
31
- } catch (err) {
32
- console.error('Failed to copy link', err)
33
- }
34
- }
35
- </script>
36
- <template>
37
- <section :id="sectionId">
38
- <div class="flex flex-col my-10">
39
- <UIAccordion :default-open="true">
40
- <template #header>
41
- <h3 class="flex items-center gap-2 text-5xl font-semibold text-sky-500 group select-none">
42
- {{ title }}
43
- <span class="hidden group-hover:block text-xl hover:opacity-100" @click="copySectionLink">
44
- #
45
- </span>
46
- </h3>
47
- <div class="font-light text-gray-700">{{ subTitle }}</div>
48
- </template>
49
- <p v-if="caption" class="text-md font-light mt-2 text-gray-800 pl-7">
50
- {{ caption }}
51
- </p>
52
- <slot />
53
- </UIAccordion>
54
- </div>
55
- </section>
56
- </template>