@una-ui/nuxt 0.4.0-beta.5 → 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.
Files changed (76) hide show
  1. package/dist/module.json +5 -1
  2. package/dist/module.mjs +2 -1
  3. package/dist/runtime/components/elements/Accordion.vue +3 -2
  4. package/dist/runtime/components/elements/Alert.vue +1 -1
  5. package/dist/runtime/components/elements/Avatar.vue +2 -0
  6. package/dist/runtime/components/elements/Badge.vue +1 -1
  7. package/dist/runtime/components/elements/Link.vue.d.ts +1 -1
  8. package/dist/runtime/components/elements/Progress.vue +45 -0
  9. package/dist/runtime/components/forms/Input.vue +1 -1
  10. package/dist/runtime/components/forms/Slider.vue +63 -0
  11. package/dist/runtime/components/misc/ThemeSwitcher.vue +3 -3
  12. package/dist/runtime/components/navigation/NavLink.vue +2 -0
  13. package/dist/runtime/components/slots/AvatarGroupDefault.d.ts +2 -2
  14. package/dist/runtime/components/slots/FormGroupDefault.d.ts +1 -1
  15. package/dist/runtime/components/slots/FormGroupLabel.d.ts +6 -5
  16. package/dist/runtime/composables/{useUnaSettings.mjs → useUnaSettings.js} +1 -1
  17. package/dist/runtime/composables/useUnaThemes.d.ts +1 -1
  18. package/dist/runtime/composables/{useUnaThemes.mjs → useUnaThemes.js} +1 -1
  19. package/dist/runtime/plugins/{theme.client.mjs → theme.client.js} +1 -1
  20. package/dist/runtime/plugins/{theme.server.mjs → theme.server.js} +1 -1
  21. package/dist/runtime/types/accordion.d.ts +6 -1
  22. package/dist/runtime/types/avatar-group.d.ts +1 -1
  23. package/dist/runtime/types/avatar.d.ts +4 -0
  24. package/dist/runtime/types/form-group.d.ts +3 -3
  25. package/dist/runtime/types/index.d.ts +19 -17
  26. package/dist/runtime/types/index.js +19 -0
  27. package/dist/runtime/types/nav-link-group.d.ts +1 -1
  28. package/dist/runtime/types/nav-link.d.ts +2 -2
  29. package/dist/runtime/types/progress.d.ts +35 -0
  30. package/dist/runtime/types/slider.d.ts +37 -0
  31. package/dist/runtime/types/slider.js +0 -0
  32. package/dist/runtime/types/switch.js +0 -0
  33. package/dist/runtime/utils/cn.d.ts +2 -0
  34. package/dist/runtime/utils/cn.js +5 -0
  35. package/dist/runtime/utils/index.d.ts +1 -0
  36. package/dist/runtime/utils/{index.mjs → index.js} +1 -0
  37. package/dist/types.d.mts +1 -16
  38. package/dist/types.d.ts +1 -16
  39. package/package.json +25 -19
  40. package/playground/.nuxt/components.d.ts +134 -94
  41. package/playground/.nuxt/imports.d.ts +12 -5
  42. package/playground/.nuxt/nuxt.d.ts +5 -4
  43. package/playground/.nuxt/types/app-defaults.d.ts +7 -0
  44. package/playground/.nuxt/types/app.config.d.ts +2 -4
  45. package/playground/.nuxt/types/build.d.ts +22 -0
  46. package/playground/.nuxt/types/imports.d.ts +1142 -1042
  47. package/playground/.nuxt/types/middleware.d.ts +6 -0
  48. package/playground/.nuxt/types/nitro-config.d.ts +1 -1
  49. package/playground/.nuxt/types/nitro-imports.d.ts +128 -119
  50. package/playground/.nuxt/types/nitro-nuxt.d.ts +4 -1
  51. package/playground/.nuxt/types/nitro-routes.d.ts +1 -1
  52. package/playground/.nuxt/types/plugins.d.ts +19 -11
  53. package/playground/.nuxt/types/schema.d.ts +13 -8
  54. package/playground/.nuxt/types/vue-shim.d.ts +0 -5
  55. package/dist/runtime/types/index.mjs +0 -17
  56. package/playground/.nuxt/vue-router-stub.d.ts +0 -1
  57. /package/dist/runtime/components/slots/{AvatarGroupDefault.mjs → AvatarGroupDefault.js} +0 -0
  58. /package/dist/runtime/components/slots/{FormGroupDefault.mjs → FormGroupDefault.js} +0 -0
  59. /package/dist/runtime/components/slots/{FormGroupLabel.mjs → FormGroupLabel.js} +0 -0
  60. /package/dist/runtime/types/{accordion.mjs → accordion.js} +0 -0
  61. /package/dist/runtime/types/{alert.mjs → alert.js} +0 -0
  62. /package/dist/runtime/types/{avatar-group.mjs → avatar-group.js} +0 -0
  63. /package/dist/runtime/types/{avatar.mjs → avatar.js} +0 -0
  64. /package/dist/runtime/types/{badge.mjs → badge.js} +0 -0
  65. /package/dist/runtime/types/{button.mjs → button.js} +0 -0
  66. /package/dist/runtime/types/{checkbox.mjs → checkbox.js} +0 -0
  67. /package/dist/runtime/types/{form-group.mjs → form-group.js} +0 -0
  68. /package/dist/runtime/types/{icon.mjs → icon.js} +0 -0
  69. /package/dist/runtime/types/{indicator.mjs → indicator.js} +0 -0
  70. /package/dist/runtime/types/{input.mjs → input.js} +0 -0
  71. /package/dist/runtime/types/{kbd.mjs → kbd.js} +0 -0
  72. /package/dist/runtime/types/{link.mjs → link.js} +0 -0
  73. /package/dist/runtime/types/{nav-link-group.mjs → nav-link-group.js} +0 -0
  74. /package/dist/runtime/types/{nav-link.mjs → nav-link.js} +0 -0
  75. /package/dist/runtime/types/{radio.mjs → progress.js} +0 -0
  76. /package/dist/runtime/types/{switch.mjs → radio.js} +0 -0
package/dist/module.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "@una-ui/nuxt",
3
3
  "configKey": "una",
4
- "version": "0.4.0-beta.5",
4
+ "version": "0.6.0-beta.1",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.0.0-rc.8"
7
+ },
8
+ "builder": {
9
+ "@nuxt/module-builder": "0.8.1",
10
+ "unbuild": "2.0.0"
7
11
  }
8
12
  }
package/dist/module.mjs CHANGED
@@ -6,7 +6,7 @@ import '@una-ui/preset/prefixes';
6
6
  import '@una-ui/extractor-vue-script';
7
7
 
8
8
  const name = "@una-ui/nuxt";
9
- const version = "0.4.0-beta.5";
9
+ const version = "0.6.0-beta.1";
10
10
 
11
11
  const module = defineNuxtModule({
12
12
  meta: {
@@ -63,6 +63,7 @@ const module = defineNuxtModule({
63
63
  }
64
64
  if (!options.dev)
65
65
  nuxt.options.unocss = extendUnocssOptions(nuxt.options.unocss);
66
+ await installModule("radix-vue/nuxt");
66
67
  await installModule("@unocss/nuxt");
67
68
  await installModule("@nuxtjs/color-mode", {
68
69
  classSuffix: ""
@@ -59,9 +59,10 @@ const [DefineTemplate, ReuseTemplate] = createReusableTemplate<{
59
59
  close: () => void
60
60
  }>()
61
61
 
62
- // TODO: optimized this one
62
+ const pickedProps = pickProps(props, ['reverse', 'icon', 'btn', 'label', 'leading', 'loading', 'loadingPlacement', 'una', 'trailing', 'leading', 'to', 'type', 'disabled'])
63
+
63
64
  function mergedProps(itemProps: NAccordionItemProps) {
64
- return Object.assign(pickProps(props, ['reverse', 'icon', 'btn', 'label', 'leading', 'loading', 'loadingPlacement', 'una', 'trailing', 'leading', 'to', 'type', 'disabled']), itemProps)
65
+ return Object.assign(pickedProps, itemProps)
65
66
  }
66
67
 
67
68
  // TODO: refactor this to sync with NButton variants
@@ -12,7 +12,7 @@ const props = withDefaults(defineProps<NAlertProps>(), {
12
12
  icon: false,
13
13
  })
14
14
 
15
- const emit = defineEmits<{ (...args: any): void }>()
15
+ const emit = defineEmits(['close'])
16
16
 
17
17
  const slots = defineSlots<{
18
18
  default?: any
@@ -2,6 +2,7 @@
2
2
  import { useImage } from '@vueuse/core'
3
3
  import { computed } from 'vue'
4
4
  import type { NAvatarProps } from '../../types'
5
+ import NIcon from './Icon.vue'
5
6
 
6
7
  const props = withDefaults(defineProps<NAvatarProps>(), {
7
8
  delay: 0,
@@ -25,6 +26,7 @@ const placeholder = computed(() => {
25
26
  <template>
26
27
  <span
27
28
  :avatar="avatar"
29
+ :size="size"
28
30
  class="avatar"
29
31
  :class="[
30
32
  { 'avatar-default-variant': !hasVariant && !isBaseVariant },
@@ -10,7 +10,7 @@ const props = withDefaults(defineProps<NBadgeProps>(), {
10
10
  }),
11
11
  })
12
12
 
13
- const emit = defineEmits<{ (...args: any): void }>()
13
+ const emit = defineEmits(['close'])
14
14
 
15
15
  const badgeVariants = ['solid', 'soft', 'outline'] as const
16
16
  const hasVariant = computed(() => badgeVariants.some(badgeVariants => props.badge?.includes(badgeVariants)))
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<any, {
11
11
  isActive: boolean;
12
12
  isExactActive: boolean;
13
13
  }) => any;
14
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<any>, {} | {
14
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<any>, {} | {
15
15
  [x: string]: any;
16
16
  }, {}>;
17
17
  export default _default;
@@ -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>
@@ -14,7 +14,7 @@ const props = withDefaults(defineProps<NInputProps>(), {
14
14
  rows: 3,
15
15
  })
16
16
 
17
- const emit = defineEmits<{ (...args: any): void }>()
17
+ const emit = defineEmits(['leading', 'trailing', 'update:modelValue'])
18
18
 
19
19
  const slots = defineSlots<{
20
20
  leading?: any
@@ -0,0 +1,63 @@
1
+ <script setup lang="ts">
2
+ import { computed } from 'vue'
3
+ import type { SliderRootEmits } from 'radix-vue'
4
+ import { SliderRange, SliderRoot, SliderThumb, SliderTrack, useForwardPropsEmits } from 'radix-vue'
5
+ import type { NSliderProps } from '../../types'
6
+ import { cn } from '../../utils'
7
+
8
+ const props = defineProps<NSliderProps>()
9
+ const emits = defineEmits<SliderRootEmits>()
10
+ const delegatedProps = computed(() => {
11
+ const { class: _, ...delegated } = props
12
+
13
+ return delegated
14
+ })
15
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
16
+ const isVertical = computed(() => props.orientation === 'vertical')
17
+ </script>
18
+
19
+ <template>
20
+ <SliderRoot
21
+ :class="cn(
22
+ 'slider-root',
23
+ isVertical && 'slider-root-vertical',
24
+ props.size,
25
+ props.class,
26
+ props.una?.sliderRoot,
27
+ disabled && 'slider-disabled',
28
+ )"
29
+ v-bind="forwarded"
30
+ >
31
+ <slot name="slider-track">
32
+ <SliderTrack
33
+ :class="cn(
34
+ 'slider-track',
35
+ isVertical && 'slider-track-vertical',
36
+ props.una?.sliderTrack,
37
+ )"
38
+ >
39
+ <slot name="slider-range">
40
+ <SliderRange
41
+ :class="cn(
42
+ 'slider-range',
43
+ isVertical && 'slider-range-vertical',
44
+ props.una?.sliderRange,
45
+ )"
46
+ />
47
+ </slot>
48
+ </SliderTrack>
49
+ </slot>
50
+
51
+ <slot name="slider-thumb">
52
+ <SliderThumb
53
+ v-for="(_, key) in modelValue"
54
+ :key="key"
55
+ :class="cn(
56
+ 'slider-thumb',
57
+ isVertical && 'slider-thumb-vertical',
58
+ props.una?.sliderThumb,
59
+ )"
60
+ />
61
+ </slot>
62
+ </SliderRoot>
63
+ </template>
@@ -51,7 +51,7 @@ function shuffleTheme() {
51
51
  class="rounded-lg"
52
52
  aria-label="Theme"
53
53
  >
54
- <span i-heroicons-swatch-20-solid text-md />
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-heroicons-adjustments-horizontal-solid"
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-heroicons-arrow-uturn-left"
105
+ label="i-lucide-delete"
106
106
  @click="reset"
107
107
  />
108
108
  </div>
@@ -3,6 +3,8 @@ import { computed } from 'vue'
3
3
  import type { NNavLinkProps } from '../../types'
4
4
  import { omitProps } from '../../utils'
5
5
  import NButton from '../elements/Button.vue'
6
+ import NBadge from '../elements/Badge.vue'
7
+ import NIcon from '../elements/Icon.vue'
6
8
 
7
9
  defineOptions({
8
10
  inheritAttrs: false,
@@ -1,5 +1,5 @@
1
1
  import type { PropType, VNode } from 'vue';
2
- import type { NAvatarGroupProps } from '../../types';
2
+ import type { NAvatarGroupProps } from '../../types.js';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  max: {
5
5
  type: NumberConstructor;
@@ -10,7 +10,7 @@ declare const _default: import("vue").DefineComponent<{
10
10
  };
11
11
  }, (() => null) | (() => (VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
12
  [key: string]: any;
13
- }> | null)[]), unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
+ }> | null)[]), unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
14
14
  max: {
15
15
  type: NumberConstructor;
16
16
  required: true;
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<{
11
11
  };
12
12
  }, (() => null) | (() => VNode<unknown, unknown, {
13
13
  [key: string]: any;
14
- }>[]), unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14
+ }>[]), unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
15
  id: {
16
16
  type: StringConstructor;
17
17
  required: true;
@@ -1,22 +1,23 @@
1
1
  import type { PropType } from 'vue';
2
+ import type { NFormGroupProps } from '../../types.js';
2
3
  declare const _default: import("vue").DefineComponent<{
3
4
  for: {
4
- type: PropType<string | boolean | undefined>;
5
+ type: PropType<NFormGroupProps["for"]>;
5
6
  required: false;
6
7
  };
7
8
  id: {
8
- type: PropType<string | undefined>;
9
+ type: PropType<NFormGroupProps["id"]>;
9
10
  required: false;
10
11
  };
11
12
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
13
  [key: string]: any;
13
- }> | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14
+ }> | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
14
15
  for: {
15
- type: PropType<string | boolean | undefined>;
16
+ type: PropType<NFormGroupProps["for"]>;
16
17
  required: false;
17
18
  };
18
19
  id: {
19
- type: PropType<string | undefined>;
20
+ type: PropType<NFormGroupProps["id"]>;
20
21
  required: false;
21
22
  };
22
23
  }>>, {}, {}>;
@@ -1,6 +1,6 @@
1
1
  import { useStorage } from "@vueuse/core";
2
2
  import { watchEffect } from "vue";
3
- import { useUnaThemes } from "./useUnaThemes.mjs";
3
+ import { useUnaThemes } from "./useUnaThemes.js";
4
4
  import { useAppConfig } from "#imports";
5
5
  export function useUnaSettings() {
6
6
  const { una } = useAppConfig();
@@ -1,4 +1,4 @@
1
- import type { Colors } from '../types';
1
+ import type { Colors } from '../types.js';
2
2
  export declare function useUnaThemes(): {
3
3
  primaryThemes: [string, Colors][];
4
4
  grayThemes: [string, Colors][];
@@ -1,5 +1,5 @@
1
1
  import { colors } from "@unocss/preset-mini/colors";
2
- import { hexToRgb } from "../utils/index.mjs";
2
+ import { hexToRgb } from "../utils/index.js";
3
3
  const filteredPrimaryColors = Object.fromEntries(
4
4
  Object.entries(colors).filter(([key]) => [
5
5
  "blue",
@@ -1,5 +1,5 @@
1
1
  import { watchEffect } from "vue";
2
- import { useUnaSettings } from "../composables/useUnaSettings.mjs";
2
+ import { useUnaSettings } from "../composables/useUnaSettings.js";
3
3
  import { defineNuxtPlugin } from "#app";
4
4
  let unaUIStyle;
5
5
  export default defineNuxtPlugin(() => {
@@ -1,4 +1,4 @@
1
- import { useUnaSettings } from "../composables/useUnaSettings.mjs";
1
+ import { useUnaSettings } from "../composables/useUnaSettings.js";
2
2
  import { defineNuxtPlugin, useHead } from "#app";
3
3
  export default defineNuxtPlugin(() => {
4
4
  const { defaultSettings } = useUnaSettings();
@@ -1,4 +1,4 @@
1
- import type { NButtonProps } from './button';
1
+ import type { NButtonProps } from './button.js';
2
2
  export interface NAccordionProps extends Omit<NButtonProps, 'una'> {
3
3
  /**
4
4
  * Allows you to add `UnaUI` accordion preset properties,
@@ -109,4 +109,9 @@ export interface NAccordionItemProps extends NButtonProps {
109
109
  * @default false
110
110
  */
111
111
  mounted?: boolean;
112
+ /**
113
+ * Allow dynamic attributes to be added to the accordion item,
114
+ *
115
+ */
116
+ [key: string]: any;
112
117
  }
@@ -1,4 +1,4 @@
1
- import type { NAvatarProps } from './avatar';
1
+ import type { NAvatarProps } from './avatar.js';
2
2
  /**
3
3
  * This extends the `NAvatarProps` interface.
4
4
  *
@@ -22,6 +22,10 @@ export interface NAvatarProps {
22
22
  * label="PR"
23
23
  */
24
24
  label?: string;
25
+ /**
26
+ * Set the size of the avatar.
27
+ */
28
+ size?: string;
25
29
  /**
26
30
  * Add src of the image.
27
31
  *
@@ -45,14 +45,14 @@ export interface NFormGroupProps {
45
45
  * @example
46
46
  * hint="Enter your email address"
47
47
  */
48
- hint?: string;
48
+ hint?: any;
49
49
  /**
50
50
  * Display `Description` message for the form group.
51
51
  *
52
52
  * @example
53
53
  * description="We will never share your email with anyone else."
54
54
  */
55
- description?: string;
55
+ description?: any;
56
56
  /**
57
57
  * Display `Message` for the form group.
58
58
  * Useful for displaying validation errors.
@@ -60,7 +60,7 @@ export interface NFormGroupProps {
60
60
  * @example
61
61
  * message="Email is required"
62
62
  */
63
- message?: string;
63
+ message?: any;
64
64
  /**
65
65
  * Display `counter` for the form group.
66
66
  * Useful for displaying character count.
@@ -1,20 +1,22 @@
1
- export * from './input';
2
- export * from './button';
3
- export * from './form-group';
4
- export * from './icon';
5
- export * from './accordion';
6
- export * from './switch';
7
- export * from './alert';
8
- export * from './badge';
9
- export * from './avatar';
10
- export * from './avatar-group';
11
- export * from './indicator';
12
- export * from './kbd';
13
- export * from './nav-link';
14
- export * from './nav-link-group';
15
- export * from './link';
16
- export * from './radio';
17
- export * from './checkbox';
1
+ export * from './input.js';
2
+ export * from './button.js';
3
+ export * from './form-group.js';
4
+ export * from './icon.js';
5
+ export * from './accordion.js';
6
+ export * from './switch.js';
7
+ export * from './alert.js';
8
+ export * from './badge.js';
9
+ export * from './avatar.js';
10
+ export * from './avatar-group.js';
11
+ export * from './indicator.js';
12
+ export * from './kbd.js';
13
+ export * from './nav-link.js';
14
+ export * from './nav-link-group.js';
15
+ export * from './link.js';
16
+ export * from './radio.js';
17
+ export * from './checkbox.js';
18
+ export * from './slider.js';
19
+ export * from './progress.js';
18
20
  export interface Colors {
19
21
  [key: string]: string;
20
22
  }
@@ -0,0 +1,19 @@
1
+ export * from "./input.js";
2
+ export * from "./button.js";
3
+ export * from "./form-group.js";
4
+ export * from "./icon.js";
5
+ export * from "./accordion.js";
6
+ export * from "./switch.js";
7
+ export * from "./alert.js";
8
+ export * from "./badge.js";
9
+ export * from "./avatar.js";
10
+ export * from "./avatar-group.js";
11
+ export * from "./indicator.js";
12
+ export * from "./kbd.js";
13
+ export * from "./nav-link.js";
14
+ export * from "./nav-link-group.js";
15
+ export * from "./link.js";
16
+ export * from "./radio.js";
17
+ export * from "./checkbox.js";
18
+ export * from "./slider.js";
19
+ export * from "./progress.js";
@@ -1,4 +1,4 @@
1
- import type { NNavLinkProps } from './nav-link';
1
+ import type { NNavLinkProps } from './nav-link.js';
2
2
  export interface NNavLinkGroupLink extends NNavLinkProps {
3
3
  children?: NNavLinkProps[];
4
4
  defaultOpen?: boolean;
@@ -1,5 +1,5 @@
1
- import type { NBadgeProps } from './badge';
2
- import type { NButtonProps } from './button';
1
+ import type { NBadgeProps } from './badge.js';
2
+ import type { NButtonProps } from './button.js';
3
3
  export interface NNavLinkProps extends Omit<NButtonProps, 'una'> {
4
4
  navLink?: string;
5
5
  navLinkInactive?: string;
@@ -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 {};
@@ -0,0 +1,37 @@
1
+ import type { SliderRootProps } from 'radix-vue';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type Extensions = SliderRootProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ export interface NSliderProps extends Extensions {
7
+ /**
8
+ * Allows you to add `UnaUI` slider 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/slider.ts
12
+ * @example
13
+ * slider="green""
14
+ */
15
+ slider?: string;
16
+ /**
17
+ * Allows you to change the size of the slider.
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/slider.ts
29
+ */
30
+ una?: {
31
+ sliderRoot?: HTMLAttributes['class'];
32
+ sliderTrack?: HTMLAttributes['class'];
33
+ sliderRange?: HTMLAttributes['class'];
34
+ sliderThumb?: HTMLAttributes['class'];
35
+ };
36
+ }
37
+ export {};
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -0,0 +1,5 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ export function cn(...inputs) {
4
+ return twMerge(clsx(inputs));
5
+ }
@@ -1,3 +1,4 @@
1
+ export * from './cn.js';
1
2
  export declare function rgbToHex(r: number, g: number, b: number): string;
2
3
  export declare function hexToRgb(hex: string): [number, number, number];
3
4
  export declare function randomId(prefix: string): string;
@@ -1,3 +1,4 @@
1
+ export * from "./cn.js";
1
2
  export function rgbToHex(r, g, b) {
2
3
  return `#${[r, g, b].map((x) => {
3
4
  const hex = x.toString(16);
package/dist/types.d.mts CHANGED
@@ -1,16 +1 @@
1
-
2
- import type { ModuleOptions } from './module'
3
-
4
-
5
- declare module '@nuxt/schema' {
6
- interface NuxtConfig { ['una']?: Partial<ModuleOptions> }
7
- interface NuxtOptions { ['una']?: ModuleOptions }
8
- }
9
-
10
- declare module 'nuxt/schema' {
11
- interface NuxtConfig { ['una']?: Partial<ModuleOptions> }
12
- interface NuxtOptions { ['una']?: ModuleOptions }
13
- }
14
-
15
-
16
- export type { ModuleOptions, default } from './module'
1
+ export { type ModuleOptions, default } from './module.js'
package/dist/types.d.ts CHANGED
@@ -1,16 +1 @@
1
-
2
- import type { ModuleOptions } from './module'
3
-
4
-
5
- declare module '@nuxt/schema' {
6
- interface NuxtConfig { ['una']?: Partial<ModuleOptions> }
7
- interface NuxtOptions { ['una']?: ModuleOptions }
8
- }
9
-
10
- declare module 'nuxt/schema' {
11
- interface NuxtConfig { ['una']?: Partial<ModuleOptions> }
12
- interface NuxtOptions { ['una']?: ModuleOptions }
13
- }
14
-
15
-
16
- export type { ModuleOptions, default } from './module'
1
+ export { type ModuleOptions, default } from './module'