@resee-movies/nuxt-ux 0.3.0 → 0.4.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/dist/module.json +1 -1
- package/dist/runtime/components/Image.vue +1 -1
- package/dist/runtime/components/Menu.vue +9 -1
- package/dist/runtime/components/Menu.vue.d.ts +4 -0
- package/dist/runtime/components/Message.vue +11 -4
- package/dist/runtime/components/Message.vue.d.ts +3 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -145,5 +145,5 @@ const altText = computed(() => {
|
|
|
145
145
|
</script>
|
|
146
146
|
|
|
147
147
|
<style scoped>
|
|
148
|
-
@reference "tailwindcss";.image{background-color:#fff;overflow:clip;position:relative;width:-moz-
|
|
148
|
+
@reference "tailwindcss";.image{background-color:#fff;overflow:clip;position:relative;width:-moz-fit-content;width:fit-content;@variant dark{background-color:#000}}.image.bordered{border:2px solid var(--color-global-background-accent)}.image.beveled{border-bottom-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.image.raised{box-shadow:var(--shadow-heavy)}.image.glass:after{background-image:linear-gradient(110deg,transparent 25%,hsla(0,0%,100%,.15) 80%,transparent);content:var(--zero-width-space);inset:0;position:absolute}.image .icon{color:var(--color-global-background-accent);left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%)}
|
|
149
149
|
</style>
|
|
@@ -25,7 +25,15 @@
|
|
|
25
25
|
|
|
26
26
|
<template #item="{ item }">
|
|
27
27
|
<slot name="item">
|
|
28
|
+
<a v-if="item.url" :href="item.url" :target="item.target">
|
|
29
|
+
<IconTextPair
|
|
30
|
+
:text = "isString(item.label) ? item.label : item.label?.()"
|
|
31
|
+
:icon = "item.icon"
|
|
32
|
+
/>
|
|
33
|
+
</a>
|
|
34
|
+
|
|
28
35
|
<IconTextPair
|
|
36
|
+
v-else
|
|
29
37
|
:text = "isString(item.label) ? item.label : item.label?.()"
|
|
30
38
|
:icon = "item.icon"
|
|
31
39
|
/>
|
|
@@ -83,5 +91,5 @@ const passthroughProps = computed(() => {
|
|
|
83
91
|
</script>
|
|
84
92
|
|
|
85
93
|
<style>
|
|
86
|
-
@reference "tailwindcss";.menu{background-color:var(--color-global-background);border:1px solid var(--color-global-background-accent);border-radius:var(--radius-md);box-shadow:var(--shadow-heavy);margin-block:--spacing(1);max-width:--spacing(80);padding:--spacing(1)}.menu li[role=separator]{border-bottom:1px solid var(--color-global-background-accent);margin-block:--spacing(1)}.menu li[role=none]{font-weight:var(--font-weight-semibold)}.menu li[role=menuitem],.menu li[role=none]{
|
|
94
|
+
@reference "tailwindcss";.menu{background-color:var(--color-global-background);border:1px solid var(--color-global-background-accent);border-radius:var(--radius-md);box-shadow:var(--shadow-heavy);margin-block:--spacing(1);max-width:--spacing(80);padding:--spacing(1)}.menu li[role=separator]{border-bottom:1px solid var(--color-global-background-accent);margin-block:--spacing(1)}.menu li[role=none]{font-weight:var(--font-weight-semibold);padding:--spacing(1) --spacing(2)}.menu li[role=menuitem],.menu li[role=none]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.menu li[role=menuitem]{border-radius:var(--radius-md);cursor:pointer;transition:background-color;transition-duration:var(--default-transition-duration)}.menu li[role=menuitem]>:only-child:not(:has(>a:only-child)){padding:--spacing(1) --spacing(2)}.menu li[role=menuitem]>:only-child:has(>a:only-child)>a{display:block;padding:--spacing(1) --spacing(2)}.menu li[role=menuitem][aria-disabled=true]{color:var(--color-global-foreground-accent);cursor:not-allowed}.menu li[role=menuitem][data-p-focused=true]:not([aria-disabled=true]),.menu ul:not(:focus) li[role=menuitem]:not([aria-disabled=true]):hover{background-color:var(--color-background-scale-c)}.menu .menu-prefix{border-bottom:1px solid var(--color-global-background-accent);margin-bottom:--spacing(1);padding:0 --spacing(2) --spacing(1)}.menu .menu-suffix{border-top:1px solid var(--color-global-background-accent);margin-top:--spacing(1);padding:--spacing(1) --spacing(2) 0}
|
|
87
95
|
</style>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComputedGetter } from 'vue';
|
|
2
|
+
import type { MenuItem as PrimeMenuItem } from 'primevue/menuitem';
|
|
2
3
|
export interface MenuProps {
|
|
3
4
|
model: MenuItem[];
|
|
4
5
|
prefixText?: string;
|
|
@@ -9,6 +10,9 @@ export interface MenuItem {
|
|
|
9
10
|
icon?: string;
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
separator?: boolean;
|
|
13
|
+
command?: PrimeMenuItem['command'];
|
|
14
|
+
url?: PrimeMenuItem['url'];
|
|
15
|
+
target?: PrimeMenuItem['target'];
|
|
12
16
|
items?: MenuItem[];
|
|
13
17
|
}
|
|
14
18
|
export interface MenuExposes {
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<PrimeMessage :severity="props.severity" class="message" :pt="passthroughProps">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
</
|
|
3
|
+
<template #icon>
|
|
4
|
+
<Icon :name="props.icon" :size="props.iconSize" />
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<template #default>
|
|
8
|
+
<slot>{{ props.text }}</slot>
|
|
9
|
+
</template>
|
|
6
10
|
</PrimeMessage>
|
|
7
11
|
</template>
|
|
8
12
|
|
|
@@ -12,12 +16,15 @@ import { computed } from "vue";
|
|
|
12
16
|
|
|
13
17
|
<script setup>
|
|
14
18
|
import PrimeMessage from "primevue/message";
|
|
19
|
+
import Icon from "./Icon.vue";
|
|
15
20
|
const props = defineProps({
|
|
16
21
|
severity: { type: String, required: false },
|
|
17
22
|
text: { type: String, required: false },
|
|
18
23
|
class: { type: String, required: false },
|
|
19
24
|
style: { type: String, required: false },
|
|
20
|
-
accented: { type: Boolean, required: false }
|
|
25
|
+
accented: { type: Boolean, required: false },
|
|
26
|
+
icon: { type: String, required: false },
|
|
27
|
+
iconSize: { type: String, required: false }
|
|
21
28
|
});
|
|
22
29
|
const passthroughProps = computed(() => {
|
|
23
30
|
return {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { StatusLevel } from '../types/index.js';
|
|
2
|
+
import type { IconProps } from './Icon.vue.js';
|
|
2
3
|
export interface MessageProps {
|
|
3
4
|
severity?: StatusLevel;
|
|
4
5
|
text?: string;
|
|
5
6
|
class?: string;
|
|
6
7
|
style?: string;
|
|
7
8
|
accented?: boolean;
|
|
9
|
+
icon?: IconProps['name'];
|
|
10
|
+
iconSize?: IconProps['size'];
|
|
8
11
|
}
|
|
9
12
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<MessageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MessageProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
10
13
|
default?: (props: {}) => any;
|
package/package.json
CHANGED