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.
- package/LICENSE +21 -0
- package/README.md +57 -33
- package/package.json +49 -11
- package/ui-library/dist/module.d.mts +3 -0
- package/ui-library/dist/module.json +8 -0
- package/ui-library/dist/module.mjs +22 -0
- package/ui-library/dist/types.d.mts +7 -0
- package/app/app.vue +0 -10
- package/app/assets/css/tailwind.css +0 -3
- package/app/components/doc/component.vue +0 -34
- package/app/components/doc/megaSection.vue +0 -56
- package/app/components/doc/section.vue +0 -56
- package/app/pages/_docs.vue +0 -2420
- package/app/pages/index.vue +0 -137
- package/nuxt.config.ts +0 -19
- package/public/doc/avatar.avif +0 -0
- package/public/favicon.ico +0 -0
- package/public/robots.txt +0 -2
- package/tailwind.config.ts +0 -28
- package/tsconfig.json +0 -18
- package/ui-library/components/Accordion.vue +0 -118
- package/ui-library/components/Avatar.vue +0 -121
- package/ui-library/components/Badge.vue +0 -116
- package/ui-library/components/Breadcrumbs.vue +0 -138
- package/ui-library/components/Button.vue +0 -154
- package/ui-library/components/Card.vue +0 -84
- package/ui-library/components/Checkbox.vue +0 -148
- package/ui-library/components/CodeBlock.vue +0 -99
- package/ui-library/components/ColorPicker.vue +0 -302
- package/ui-library/components/Date.vue +0 -240
- package/ui-library/components/Dialog.vue +0 -187
- package/ui-library/components/Divider.vue +0 -78
- package/ui-library/components/Drawer.vue +0 -67
- package/ui-library/components/Dropdown.vue +0 -248
- package/ui-library/components/FileUploader.vue +0 -330
- package/ui-library/components/Icon.vue +0 -82
- package/ui-library/components/Image.vue +0 -78
- package/ui-library/components/Input.vue +0 -531
- package/ui-library/components/Radio.vue +0 -356
- package/ui-library/components/ScrollArea.vue +0 -43
- package/ui-library/components/Select.vue +0 -309
- package/ui-library/components/Stepper.vue +0 -361
- package/ui-library/components/TabPanel.vue +0 -25
- package/ui-library/components/Table.vue +0 -152
- package/ui-library/components/Tabs.vue +0 -71
- package/ui-library/components/Textarea.vue +0 -233
- package/ui-library/components/Toggle.vue +0 -319
- package/ui-library/components/Tooltip.vue +0 -200
- package/ui-library/components/plugin.ts +0 -8
- package/ui-library/components/uiProps.ts +0 -11
- package/ui-library/components/useUiClasses.ts +0 -159
- 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
|
-
|
|
187
|
+
1. Build the module (the `prepare` script runs this automatically on `npm pack` and `npm publish`):
|
|
164
188
|
|
|
165
|
-
```
|
|
166
|
-
|
|
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
|
-
|
|
195
|
+
```bash
|
|
196
|
+
npm pack
|
|
197
|
+
```
|
|
180
198
|
|
|
181
|
-
|
|
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
|
-
|
|
205
|
+
4. Add the module to `nuxt.config` in the consuming project:
|
|
189
206
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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
|
-
|
|
221
|
+
```bash
|
|
222
|
+
npm publish --access public
|
|
223
|
+
```
|
|
199
224
|
|
|
200
|
-
|
|
225
|
+
## Notes
|
|
201
226
|
|
|
202
|
-
|
|
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
|
-
|
|
205
|
-
* Tailwind CSS flexibility
|
|
206
|
-
* Clean and consistent component design
|
|
230
|
+
## License
|
|
207
231
|
|
|
208
|
-
|
|
232
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,21 +1,59 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "windly-ui",
|
|
3
|
-
"version": "1.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
|
-
"
|
|
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
|
-
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
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
|
-
"
|
|
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,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 };
|
package/app/app.vue
DELETED
|
@@ -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>
|