@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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@resee-movies/nuxt-ux",
3
3
  "configKey": "ux",
4
- "version": "0.13.0",
4
+ "version": "0.13.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.0"
@@ -21,16 +21,16 @@
21
21
  @click = "handleButtonClick"
22
22
  >
23
23
  <IconTextPair
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')"
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
- <Transition
3
- :name = "props.transitionName"
4
- :mode = "props.transitionMode"
5
- :appear = "props.transitionOnAppear"
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
- loading: { type: Boolean, required: false, default: false },
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.sm{font-size:var(--icon-size-small)}.icon.md{font-size:var(--icon-size-medium)}.icon.lg{font-size:var(--icon-size-large)}.icon.xl{font-size:var(--icon-size-jumbo)}.icon.color-cycle{--resee-color-cycle-timing:cubic-bezier(0,.5,1,.5);animation-duration:8s;animation-iteration-count:infinite;animation-name:resee-color-cycle}@keyframes resee-color-cycle{0%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-red)}6.25%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-orange)}18.75%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-yellow)}31.25%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-green)}43.75%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-seaweed)}56.25%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-aqua)}68.75%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-blue)}81.25%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-indigo)}93.75%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-violet)}to{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-red)}}}
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
- <Icon
4
- class = "leading-icon"
5
- :name = "props.icon"
6
- :size = "props.iconSize"
7
- :loading = "props.loading"
8
- :transition-name = "props.iconTransitionName"
9
- :transition-mode = "props.iconTransitionMode"
10
- :transition-on-appear = "props.iconTransitionOnAppear"
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
- <Icon
20
- v-if = "props.trailingIcon"
21
- class = "trailing-icon"
22
- :name = "props.trailingIcon"
23
- :size = "props.iconSize"
24
- :transition-name = "props.iconTransitionName"
25
- :transition-mode = "props.iconTransitionMode"
26
- :transition-on-appear = "props.iconTransitionOnAppear"
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 = "submit"
4
- :text = "props.text ?? locale.form.submitButtonLabel"
5
- :loading = "formState.isSubmitting.value"
6
- :disabled = "formState.isDisabled.value"
7
- :bordered = "props.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resee-movies/nuxt-ux",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "The next-gen user experience library for ReSee Movies - currently in development. ",
5
5
  "repository": {
6
6
  "url": "https://github.com/ReSee-Movies/nuxt-ux.git"