@resee-movies/nuxt-ux 0.13.0 → 0.13.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/runtime/components/Button.vue +11 -13
- package/dist/runtime/components/Icon.vue +7 -33
- package/dist/runtime/components/Icon.vue.d.ts +8 -6
- package/dist/runtime/components/IconTextPair.vue +32 -24
- package/dist/runtime/components/IconTextPair.vue.d.ts +16 -4
- package/dist/runtime/components/IconTransition.vue +33 -0
- package/dist/runtime/components/IconTransition.vue.d.ts +9 -0
- package/dist/runtime/components/form/FormSubmitButton.vue +5 -6
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
@click = "handleButtonClick"
|
|
22
22
|
>
|
|
23
23
|
<IconTextPair
|
|
24
|
-
:text
|
|
25
|
-
:icon
|
|
26
|
-
:icon-size
|
|
27
|
-
:trailing-icon
|
|
28
|
-
:spacing
|
|
29
|
-
:loading = "showLoading"
|
|
30
|
-
:icon-transition-name = "props.iconTransitionName"
|
|
31
|
-
:icon-transition-mode = "props.iconTransitionMode"
|
|
32
|
-
:icon-transition-on-appear = "props.iconTransitionOnAppear"
|
|
24
|
+
:text = "props.text"
|
|
25
|
+
:icon = "props.icon"
|
|
26
|
+
:icon-size = "props.iconSize ?? props.size"
|
|
27
|
+
:trailing-icon = "props.trailingIcon"
|
|
28
|
+
:spacing = "props.spacing ?? (iconOnly ? 'none' : 'wide')"
|
|
33
29
|
>
|
|
30
|
+
<template #leading="{ slotProps }">
|
|
31
|
+
<IconTransition v-bind="slotProps" :loading="showLoading" />
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
34
|
<template #default v-if="slots.default">
|
|
35
35
|
<slot />
|
|
36
36
|
</template>
|
|
@@ -47,6 +47,7 @@ import { computed, ref, useSlots } from "vue";
|
|
|
47
47
|
<script setup>
|
|
48
48
|
import vPrimeTooltip from "primevue/tooltip";
|
|
49
49
|
import IconTextPair from "./IconTextPair.vue";
|
|
50
|
+
import IconTransition from "./IconTransition.vue";
|
|
50
51
|
defineEmits(["click"]);
|
|
51
52
|
const props = defineProps({
|
|
52
53
|
is: { type: null, required: false, default: "button" },
|
|
@@ -66,10 +67,7 @@ const props = defineProps({
|
|
|
66
67
|
trailingIcon: { type: String, required: false },
|
|
67
68
|
iconSize: { type: String, required: false },
|
|
68
69
|
trailingIconSize: { type: String, required: false },
|
|
69
|
-
spacing: { type: String, required: false }
|
|
70
|
-
iconTransitionName: { type: String, required: false },
|
|
71
|
-
iconTransitionMode: { type: String, required: false },
|
|
72
|
-
iconTransitionOnAppear: { type: Boolean, required: false }
|
|
70
|
+
spacing: { type: String, required: false }
|
|
73
71
|
});
|
|
74
72
|
const slots = useSlots();
|
|
75
73
|
const shrink = computed(
|
|
@@ -1,26 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
>
|
|
7
|
-
<span
|
|
8
|
-
v-if = "props.loading"
|
|
9
|
-
v-bind = "$attrs"
|
|
10
|
-
class = "icon"
|
|
11
|
-
>
|
|
12
|
-
<ProgressSpinner :size="props.size" />
|
|
13
|
-
</span>
|
|
14
|
-
|
|
15
|
-
<span
|
|
16
|
-
v-else-if = "props.name"
|
|
17
|
-
v-bind = "$attrs"
|
|
18
|
-
role = "presentation"
|
|
19
|
-
:class = "['icon', props.size]"
|
|
20
|
-
>
|
|
21
|
-
<span :class="[props.name, { 'color-cycle': props.colorCycle }]" />
|
|
22
|
-
</span>
|
|
23
|
-
</Transition>
|
|
2
|
+
<span role="presentation" :class="['icon', props.size]">
|
|
3
|
+
<slot>
|
|
4
|
+
<span :class="props.name" />
|
|
5
|
+
</slot>
|
|
6
|
+
</span>
|
|
24
7
|
</template>
|
|
25
8
|
|
|
26
9
|
<script>
|
|
@@ -28,21 +11,12 @@
|
|
|
28
11
|
</script>
|
|
29
12
|
|
|
30
13
|
<script setup>
|
|
31
|
-
import ProgressSpinner from "./ProgressSpinner.vue";
|
|
32
|
-
defineOptions({
|
|
33
|
-
inheritAttrs: false
|
|
34
|
-
});
|
|
35
14
|
const props = defineProps({
|
|
36
15
|
name: { type: String, required: false, default: void 0 },
|
|
37
|
-
|
|
38
|
-
size: { type: String, required: false, default: void 0 },
|
|
39
|
-
colorCycle: { type: Boolean, required: false, default: false },
|
|
40
|
-
transitionName: { type: String, required: false, default: "fade" },
|
|
41
|
-
transitionMode: { type: String, required: false, default: "out-in" },
|
|
42
|
-
transitionOnAppear: { type: Boolean, required: false, default: false }
|
|
16
|
+
size: { type: String, required: false, default: void 0 }
|
|
43
17
|
});
|
|
44
18
|
</script>
|
|
45
19
|
|
|
46
20
|
<style scoped>
|
|
47
|
-
@layer components{.icon{align-items:center;display:inline-flex}.icon:before{content:var(--zero-width-space)}.icon
|
|
21
|
+
@layer components{.icon{align-items:center;display:inline-flex}.icon:before{content:var(--zero-width-space)}.icon>span{display:inline-block;height:1em;width:1em}.icon.sm>span{height:var(--icon-size-small)!important;width:var(--icon-size-small)!important}.icon.md>span{height:var(--icon-size-medium)!important;width:var(--icon-size-medium)!important}.icon.lg>span{height:var(--icon-size-large)!important;width:var(--icon-size-large)!important}.icon.xl>span{height:var(--icon-size-jumbo)!important;width:var(--icon-size-jumbo)!important}}
|
|
48
22
|
</style>
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export interface IconProps {
|
|
2
2
|
name?: string;
|
|
3
|
-
loading?: boolean;
|
|
4
3
|
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
-
colorCycle?: boolean;
|
|
6
|
-
transitionName?: string;
|
|
7
|
-
transitionMode?: 'out-in' | 'in-out';
|
|
8
|
-
transitionOnAppear?: boolean;
|
|
9
4
|
}
|
|
10
|
-
declare const __VLS_export: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any
|
|
5
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
6
|
+
default?: (props: {}) => any;
|
|
7
|
+
}>;
|
|
11
8
|
declare const _default: typeof __VLS_export;
|
|
12
9
|
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -1,30 +1,42 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span :class="['pair', props.spacing ? `spacing-${props.spacing}` : void 0]">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
<slot
|
|
4
|
+
name = "leading"
|
|
5
|
+
:slot-props = "{
|
|
6
|
+
class: 'leading-icon',
|
|
7
|
+
name: props.icon,
|
|
8
|
+
size: props.iconSize
|
|
9
|
+
}"
|
|
10
|
+
>
|
|
11
|
+
<Icon
|
|
12
|
+
v-if = "props.icon"
|
|
13
|
+
class = "leading-icon"
|
|
14
|
+
:name = "props.icon"
|
|
15
|
+
:size = "props.iconSize"
|
|
16
|
+
/>
|
|
17
|
+
</slot>
|
|
12
18
|
|
|
13
19
|
<span v-if="props.text || slots.default" class="label">
|
|
14
|
-
<slot>
|
|
20
|
+
<slot name="default">
|
|
15
21
|
{{ props.text }}
|
|
16
22
|
</slot>
|
|
17
23
|
</span>
|
|
18
24
|
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
<slot
|
|
26
|
+
name = "trailing"
|
|
27
|
+
:slot-props = "{
|
|
28
|
+
class: 'trailing-icon',
|
|
29
|
+
name: props.trailingIcon,
|
|
30
|
+
size: props.iconSize
|
|
31
|
+
}"
|
|
32
|
+
>
|
|
33
|
+
<Icon
|
|
34
|
+
v-if = "props.trailingIcon"
|
|
35
|
+
class = "trailing-icon"
|
|
36
|
+
:name = "props.trailingIcon"
|
|
37
|
+
:size = "props.iconSize"
|
|
38
|
+
/>
|
|
39
|
+
</slot>
|
|
28
40
|
</span>
|
|
29
41
|
</template>
|
|
30
42
|
|
|
@@ -40,11 +52,7 @@ const props = defineProps({
|
|
|
40
52
|
trailingIcon: { type: String, required: false, default: void 0 },
|
|
41
53
|
iconSize: { type: String, required: false, default: void 0 },
|
|
42
54
|
trailingIconSize: { type: String, required: false, default: void 0 },
|
|
43
|
-
spacing: { type: String, required: false, default: void 0 }
|
|
44
|
-
loading: { type: Boolean, required: false, default: false },
|
|
45
|
-
iconTransitionName: { type: String, required: false, default: void 0 },
|
|
46
|
-
iconTransitionMode: { type: String, required: false, default: void 0 },
|
|
47
|
-
iconTransitionOnAppear: { type: Boolean, required: false, default: false }
|
|
55
|
+
spacing: { type: String, required: false, default: void 0 }
|
|
48
56
|
});
|
|
49
57
|
const slots = useSlots();
|
|
50
58
|
</script>
|
|
@@ -6,13 +6,25 @@ export interface IconTextPairProps {
|
|
|
6
6
|
iconSize?: IconProps['size'];
|
|
7
7
|
trailingIconSize?: IconProps['size'];
|
|
8
8
|
spacing?: 'wide' | 'normal' | 'none';
|
|
9
|
-
loading?: boolean;
|
|
10
|
-
iconTransitionName?: IconProps['transitionName'];
|
|
11
|
-
iconTransitionMode?: IconProps['transitionMode'];
|
|
12
|
-
iconTransitionOnAppear?: IconProps['transitionOnAppear'];
|
|
13
9
|
}
|
|
14
10
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<IconTextPairProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconTextPairProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
11
|
+
leading?: (props: {
|
|
12
|
+
slotProps: {
|
|
13
|
+
class: string;
|
|
14
|
+
name: string | undefined;
|
|
15
|
+
size: "sm" | "md" | "lg" | "xl" | undefined;
|
|
16
|
+
};
|
|
17
|
+
}) => any;
|
|
18
|
+
} & {
|
|
15
19
|
default?: (props: {}) => any;
|
|
20
|
+
} & {
|
|
21
|
+
trailing?: (props: {
|
|
22
|
+
slotProps: {
|
|
23
|
+
class: string;
|
|
24
|
+
name: string | undefined;
|
|
25
|
+
size: "sm" | "md" | "lg" | "xl" | undefined;
|
|
26
|
+
};
|
|
27
|
+
}) => any;
|
|
16
28
|
}>;
|
|
17
29
|
declare const _default: typeof __VLS_export;
|
|
18
30
|
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Transition :name="props.transitionName" mode="out-in">
|
|
3
|
+
<Icon
|
|
4
|
+
v-if = "props.loading || props.name"
|
|
5
|
+
v-bind = "$attrs"
|
|
6
|
+
:name = "props.name"
|
|
7
|
+
:key = "props.loading ? 'loading' : props.name"
|
|
8
|
+
:size = "props.size"
|
|
9
|
+
>
|
|
10
|
+
<template #default v-if="props.loading">
|
|
11
|
+
<ProgressSpinner :size="props.size" />
|
|
12
|
+
</template>
|
|
13
|
+
</Icon>
|
|
14
|
+
</Transition>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script setup>
|
|
22
|
+
import Icon from "./Icon.vue";
|
|
23
|
+
import ProgressSpinner from "./ProgressSpinner.vue";
|
|
24
|
+
defineOptions({
|
|
25
|
+
inheritAttrs: false
|
|
26
|
+
});
|
|
27
|
+
const props = defineProps({
|
|
28
|
+
loading: { type: Boolean, required: false, default: false },
|
|
29
|
+
transitionName: { type: String, required: false, default: "grow-x" },
|
|
30
|
+
name: { type: String, required: false },
|
|
31
|
+
size: { type: String, required: false }
|
|
32
|
+
});
|
|
33
|
+
</script>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HintedString } from '../types/index.js';
|
|
2
|
+
import type { IconProps } from './Icon.vue.js';
|
|
3
|
+
export interface IconTransitionProps extends IconProps {
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
transitionName?: HintedString<'fade' | 'grow-x' | 'grow-y'>;
|
|
6
|
+
}
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<IconTransitionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconTransitionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Button
|
|
3
|
-
type
|
|
4
|
-
:text
|
|
5
|
-
:loading
|
|
6
|
-
:disabled
|
|
7
|
-
:bordered
|
|
8
|
-
icon-transition-name = "grow-x"
|
|
3
|
+
type = "submit"
|
|
4
|
+
:text = "props.text ?? locale.form.submitButtonLabel"
|
|
5
|
+
:loading = "formState.isSubmitting.value"
|
|
6
|
+
:disabled = "formState.isDisabled.value"
|
|
7
|
+
:bordered = "props.bordered"
|
|
9
8
|
/>
|
|
10
9
|
</template>
|
|
11
10
|
|
package/package.json
CHANGED