@una-ui/nuxt 0.5.0-beta.1 → 0.6.0-beta.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.
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/elements/Progress.vue +45 -0
- package/dist/runtime/components/misc/ThemeSwitcher.vue +3 -3
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/progress.d.ts +35 -0
- package/dist/runtime/types/progress.js +0 -0
- package/package.json +5 -3
- package/playground/.nuxt/components.d.ts +8 -0
- package/playground/.nuxt/types/schema.d.ts +2 -2
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import {
|
|
4
|
+
ProgressIndicator,
|
|
5
|
+
ProgressRoot,
|
|
6
|
+
} from 'radix-vue'
|
|
7
|
+
import { cn } from '../../utils'
|
|
8
|
+
import type { NProgressProps } from '../../types'
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(
|
|
11
|
+
defineProps<NProgressProps>(),
|
|
12
|
+
{
|
|
13
|
+
modelValue: 0,
|
|
14
|
+
},
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
const delegatedProps = computed(() => {
|
|
18
|
+
const { class: _, ...delegated } = props
|
|
19
|
+
|
|
20
|
+
return delegated
|
|
21
|
+
})
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<ProgressRoot
|
|
26
|
+
v-bind="delegatedProps"
|
|
27
|
+
:class="
|
|
28
|
+
cn(
|
|
29
|
+
'progress-root',
|
|
30
|
+
props.una?.progressRoot,
|
|
31
|
+
props.class,
|
|
32
|
+
)
|
|
33
|
+
"
|
|
34
|
+
>
|
|
35
|
+
<slot>
|
|
36
|
+
<ProgressIndicator
|
|
37
|
+
:class="cn(
|
|
38
|
+
'progress-indicator',
|
|
39
|
+
props.una?.progressIndicator,
|
|
40
|
+
)"
|
|
41
|
+
:style="`transform: translateX(-${100 - (props.modelValue ?? 0)}%);`"
|
|
42
|
+
/>
|
|
43
|
+
</slot>
|
|
44
|
+
</ProgressRoot>
|
|
45
|
+
</template>
|
|
@@ -51,7 +51,7 @@ function shuffleTheme() {
|
|
|
51
51
|
class="rounded-lg"
|
|
52
52
|
aria-label="Theme"
|
|
53
53
|
>
|
|
54
|
-
<span i-
|
|
54
|
+
<span i-lucide-paintbrush text-md />
|
|
55
55
|
</PopoverButton>
|
|
56
56
|
|
|
57
57
|
<transition enter-active-class="transition ease-out duration-200" enter-from-class="opacity-0 translate-y-1" enter-to-class="opacity-100 translate-y-0" leave-active-class="transition ease-in duration-150" leave-from-class="opacity-100 translate-y-0" leave-to-class="opacity-0 translate-y-1">
|
|
@@ -91,7 +91,7 @@ function shuffleTheme() {
|
|
|
91
91
|
btn="~ solid block"
|
|
92
92
|
class="transition"
|
|
93
93
|
label="Shuffle"
|
|
94
|
-
leading="i-
|
|
94
|
+
leading="i-lucide-paintbrush-vertical"
|
|
95
95
|
:una="{
|
|
96
96
|
btnLeading: value ? 'rotate-180 transform' : 'rotate-0',
|
|
97
97
|
}"
|
|
@@ -102,7 +102,7 @@ function shuffleTheme() {
|
|
|
102
102
|
btn="~ solid-gray"
|
|
103
103
|
size="xs"
|
|
104
104
|
icon
|
|
105
|
-
label="i-
|
|
105
|
+
label="i-lucide-delete"
|
|
106
106
|
@click="reset"
|
|
107
107
|
/>
|
|
108
108
|
</div>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ProgressRootProps } from 'radix-vue';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type Extensions = ProgressRootProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
6
|
+
export interface NProgressProps extends Extensions {
|
|
7
|
+
/**
|
|
8
|
+
* Allows you to add `UnaUI` progress preset properties,
|
|
9
|
+
* Think of it as a shortcut for adding options or variants to the preset if available.
|
|
10
|
+
*
|
|
11
|
+
* @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/progress.ts
|
|
12
|
+
* @example
|
|
13
|
+
* progress="red""
|
|
14
|
+
*/
|
|
15
|
+
progress?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Allows you to change the size of the progress.
|
|
18
|
+
*
|
|
19
|
+
* @default base|md
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* size="sm" | size="2cm" | size="2rem" | size="2px"
|
|
23
|
+
*/
|
|
24
|
+
size?: string;
|
|
25
|
+
/**
|
|
26
|
+
* `UnaUI` preset configuration
|
|
27
|
+
*
|
|
28
|
+
* @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/progress.ts
|
|
29
|
+
*/
|
|
30
|
+
una?: {
|
|
31
|
+
progressRoot?: HTMLAttributes['class'];
|
|
32
|
+
progressIndicator?: HTMLAttributes['class'];
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@una-ui/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0-beta.1",
|
|
5
5
|
"description": "Nuxt module for @una-ui",
|
|
6
6
|
"author": "Phojie Rengel <phojrengel@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@headlessui/vue": "^1.7.22",
|
|
31
31
|
"@iconify-json/heroicons": "^1.1.22",
|
|
32
|
+
"@iconify-json/lucide": "^1.1.200",
|
|
33
|
+
"@iconify-json/radix-icons": "^1.1.14",
|
|
32
34
|
"@iconify-json/tabler": "^1.1.117",
|
|
33
35
|
"@nuxt/kit": "^3.12.3",
|
|
34
36
|
"@nuxtjs/color-mode": "^3.4.2",
|
|
@@ -45,8 +47,8 @@
|
|
|
45
47
|
"tailwind-merge": "^2.4.0",
|
|
46
48
|
"typescript": "^5.5.3",
|
|
47
49
|
"unocss": "^0.61.5",
|
|
48
|
-
"@una-ui/extractor-vue-script": "^0.
|
|
49
|
-
"@una-ui/preset": "^0.
|
|
50
|
+
"@una-ui/extractor-vue-script": "^0.6.0-beta.1",
|
|
51
|
+
"@una-ui/preset": "^0.6.0-beta.1"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
52
54
|
"@nuxt/module-builder": "^0.8.1",
|
|
@@ -6,6 +6,7 @@ interface _GlobalComponents {
|
|
|
6
6
|
'ColorMode': typeof import("../components/ColorMode.vue")['default']
|
|
7
7
|
'Extractor': typeof import("../components/Extractor.vue")['default']
|
|
8
8
|
'Form': typeof import("../components/Form.vue")['default']
|
|
9
|
+
'Progress': typeof import("../components/Progress.vue")['default']
|
|
9
10
|
'Radio': typeof import("../components/Radio.vue")['default']
|
|
10
11
|
'Slider': typeof import("../components/Slider.vue")['default']
|
|
11
12
|
'Switch': typeof import("../components/Switch.vue")['default']
|
|
@@ -20,6 +21,7 @@ interface _GlobalComponents {
|
|
|
20
21
|
'NIndicator': typeof import("../../src/runtime/components/elements/Indicator.vue")['default']
|
|
21
22
|
'NKbd': typeof import("../../src/runtime/components/elements/Kbd.vue")['default']
|
|
22
23
|
'NLink': typeof import("../../src/runtime/components/elements/Link.vue")['default']
|
|
24
|
+
'NProgress': typeof import("../../src/runtime/components/elements/Progress.vue")['default']
|
|
23
25
|
'NCheckbox': typeof import("../../src/runtime/components/forms/Checkbox.vue")['default']
|
|
24
26
|
'NFormGroup': typeof import("../../src/runtime/components/forms/FormGroup.vue")['default']
|
|
25
27
|
'NInput': typeof import("../../src/runtime/components/forms/Input.vue")['default']
|
|
@@ -58,6 +60,7 @@ interface _GlobalComponents {
|
|
|
58
60
|
'LazyColorMode': typeof import("../components/ColorMode.vue")['default']
|
|
59
61
|
'LazyExtractor': typeof import("../components/Extractor.vue")['default']
|
|
60
62
|
'LazyForm': typeof import("../components/Form.vue")['default']
|
|
63
|
+
'LazyProgress': typeof import("../components/Progress.vue")['default']
|
|
61
64
|
'LazyRadio': typeof import("../components/Radio.vue")['default']
|
|
62
65
|
'LazySlider': typeof import("../components/Slider.vue")['default']
|
|
63
66
|
'LazySwitch': typeof import("../components/Switch.vue")['default']
|
|
@@ -72,6 +75,7 @@ interface _GlobalComponents {
|
|
|
72
75
|
'LazyNIndicator': typeof import("../../src/runtime/components/elements/Indicator.vue")['default']
|
|
73
76
|
'LazyNKbd': typeof import("../../src/runtime/components/elements/Kbd.vue")['default']
|
|
74
77
|
'LazyNLink': typeof import("../../src/runtime/components/elements/Link.vue")['default']
|
|
78
|
+
'LazyNProgress': typeof import("../../src/runtime/components/elements/Progress.vue")['default']
|
|
75
79
|
'LazyNCheckbox': typeof import("../../src/runtime/components/forms/Checkbox.vue")['default']
|
|
76
80
|
'LazyNFormGroup': typeof import("../../src/runtime/components/forms/FormGroup.vue")['default']
|
|
77
81
|
'LazyNInput': typeof import("../../src/runtime/components/forms/Input.vue")['default']
|
|
@@ -124,6 +128,7 @@ export const Accordion: typeof import("../components/Accordion.vue")['default']
|
|
|
124
128
|
export const ColorMode: typeof import("../components/ColorMode.vue")['default']
|
|
125
129
|
export const Extractor: typeof import("../components/Extractor.vue")['default']
|
|
126
130
|
export const Form: typeof import("../components/Form.vue")['default']
|
|
131
|
+
export const Progress: typeof import("../components/Progress.vue")['default']
|
|
127
132
|
export const Radio: typeof import("../components/Radio.vue")['default']
|
|
128
133
|
export const Slider: typeof import("../components/Slider.vue")['default']
|
|
129
134
|
export const Switch: typeof import("../components/Switch.vue")['default']
|
|
@@ -138,6 +143,7 @@ export const NIcon: typeof import("../../src/runtime/components/elements/Icon.vu
|
|
|
138
143
|
export const NIndicator: typeof import("../../src/runtime/components/elements/Indicator.vue")['default']
|
|
139
144
|
export const NKbd: typeof import("../../src/runtime/components/elements/Kbd.vue")['default']
|
|
140
145
|
export const NLink: typeof import("../../src/runtime/components/elements/Link.vue")['default']
|
|
146
|
+
export const NProgress: typeof import("../../src/runtime/components/elements/Progress.vue")['default']
|
|
141
147
|
export const NCheckbox: typeof import("../../src/runtime/components/forms/Checkbox.vue")['default']
|
|
142
148
|
export const NFormGroup: typeof import("../../src/runtime/components/forms/FormGroup.vue")['default']
|
|
143
149
|
export const NInput: typeof import("../../src/runtime/components/forms/Input.vue")['default']
|
|
@@ -176,6 +182,7 @@ export const LazyAccordion: typeof import("../components/Accordion.vue")['defaul
|
|
|
176
182
|
export const LazyColorMode: typeof import("../components/ColorMode.vue")['default']
|
|
177
183
|
export const LazyExtractor: typeof import("../components/Extractor.vue")['default']
|
|
178
184
|
export const LazyForm: typeof import("../components/Form.vue")['default']
|
|
185
|
+
export const LazyProgress: typeof import("../components/Progress.vue")['default']
|
|
179
186
|
export const LazyRadio: typeof import("../components/Radio.vue")['default']
|
|
180
187
|
export const LazySlider: typeof import("../components/Slider.vue")['default']
|
|
181
188
|
export const LazySwitch: typeof import("../components/Switch.vue")['default']
|
|
@@ -190,6 +197,7 @@ export const LazyNIcon: typeof import("../../src/runtime/components/elements/Ico
|
|
|
190
197
|
export const LazyNIndicator: typeof import("../../src/runtime/components/elements/Indicator.vue")['default']
|
|
191
198
|
export const LazyNKbd: typeof import("../../src/runtime/components/elements/Kbd.vue")['default']
|
|
192
199
|
export const LazyNLink: typeof import("../../src/runtime/components/elements/Link.vue")['default']
|
|
200
|
+
export const LazyNProgress: typeof import("../../src/runtime/components/elements/Progress.vue")['default']
|
|
193
201
|
export const LazyNCheckbox: typeof import("../../src/runtime/components/forms/Checkbox.vue")['default']
|
|
194
202
|
export const LazyNFormGroup: typeof import("../../src/runtime/components/forms/FormGroup.vue")['default']
|
|
195
203
|
export const LazyNInput: typeof import("../../src/runtime/components/forms/Input.vue")['default']
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { NuxtModule, RuntimeConfig } from '@nuxt/schema'
|
|
2
2
|
declare module '@nuxt/schema' {
|
|
3
3
|
interface NuxtConfig {
|
|
4
|
-
["unocss"]?: typeof import("@unocss/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["colorMode"]?: typeof import("@nuxtjs/color-mode").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["vueuse"]?: typeof import("@vueuse/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["una"]?: typeof import("./../../../src/module").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["devtools"]?: typeof import("@nuxt/devtools").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["telemetry"]?: typeof import("@nuxt/telemetry").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, modules?: (undefined | null | false | NuxtModule | string | [NuxtModule | string, Record<string, any>] | ["@unocss/nuxt", Exclude<NuxtConfig["unocss"], boolean>] | ["@nuxtjs/color-mode", Exclude<NuxtConfig["colorMode"], boolean>] | ["@vueuse/nuxt", Exclude<NuxtConfig["vueuse"], boolean>] | ["./../../../src/module", Exclude<NuxtConfig["una"], boolean>] | ["@nuxt/devtools", Exclude<NuxtConfig["devtools"], boolean>] | ["@nuxt/telemetry", Exclude<NuxtConfig["telemetry"], boolean>])[],
|
|
4
|
+
["radix"]?: typeof import("radix-vue/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["unocss"]?: typeof import("@unocss/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["colorMode"]?: typeof import("@nuxtjs/color-mode").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["vueuse"]?: typeof import("@vueuse/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["una"]?: typeof import("./../../../src/module").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["devtools"]?: typeof import("@nuxt/devtools").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["telemetry"]?: typeof import("@nuxt/telemetry").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, modules?: (undefined | null | false | NuxtModule | string | [NuxtModule | string, Record<string, any>] | ["radix-vue/nuxt", Exclude<NuxtConfig["radix"], boolean>] | ["@unocss/nuxt", Exclude<NuxtConfig["unocss"], boolean>] | ["@nuxtjs/color-mode", Exclude<NuxtConfig["colorMode"], boolean>] | ["@vueuse/nuxt", Exclude<NuxtConfig["vueuse"], boolean>] | ["./../../../src/module", Exclude<NuxtConfig["una"], boolean>] | ["@nuxt/devtools", Exclude<NuxtConfig["devtools"], boolean>] | ["@nuxt/telemetry", Exclude<NuxtConfig["telemetry"], boolean>])[],
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
declare module 'nuxt/schema' {
|
|
8
8
|
interface NuxtConfig {
|
|
9
|
-
["unocss"]?: typeof import("@unocss/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["colorMode"]?: typeof import("@nuxtjs/color-mode").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["vueuse"]?: typeof import("@vueuse/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["una"]?: typeof import("./../../../src/module").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["devtools"]?: typeof import("@nuxt/devtools").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["telemetry"]?: typeof import("@nuxt/telemetry").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, modules?: (undefined | null | false | NuxtModule | string | [NuxtModule | string, Record<string, any>] | ["@unocss/nuxt", Exclude<NuxtConfig["unocss"], boolean>] | ["@nuxtjs/color-mode", Exclude<NuxtConfig["colorMode"], boolean>] | ["@vueuse/nuxt", Exclude<NuxtConfig["vueuse"], boolean>] | ["./../../../src/module", Exclude<NuxtConfig["una"], boolean>] | ["@nuxt/devtools", Exclude<NuxtConfig["devtools"], boolean>] | ["@nuxt/telemetry", Exclude<NuxtConfig["telemetry"], boolean>])[],
|
|
9
|
+
["radix"]?: typeof import("radix-vue/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["unocss"]?: typeof import("@unocss/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["colorMode"]?: typeof import("@nuxtjs/color-mode").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["vueuse"]?: typeof import("@vueuse/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["una"]?: typeof import("./../../../src/module").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["devtools"]?: typeof import("@nuxt/devtools").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, ["telemetry"]?: typeof import("@nuxt/telemetry").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>, modules?: (undefined | null | false | NuxtModule | string | [NuxtModule | string, Record<string, any>] | ["radix-vue/nuxt", Exclude<NuxtConfig["radix"], boolean>] | ["@unocss/nuxt", Exclude<NuxtConfig["unocss"], boolean>] | ["@nuxtjs/color-mode", Exclude<NuxtConfig["colorMode"], boolean>] | ["@vueuse/nuxt", Exclude<NuxtConfig["vueuse"], boolean>] | ["./../../../src/module", Exclude<NuxtConfig["una"], boolean>] | ["@nuxt/devtools", Exclude<NuxtConfig["devtools"], boolean>] | ["@nuxt/telemetry", Exclude<NuxtConfig["telemetry"], boolean>])[],
|
|
10
10
|
}
|
|
11
11
|
interface RuntimeConfig {
|
|
12
12
|
app: {
|