@byyuurin/ui 0.1.0 → 0.3.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.
Files changed (140) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +5 -3
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +2 -2
  5. package/dist/runtime/components/Accordion.vue +41 -41
  6. package/dist/runtime/components/Accordion.vue.d.ts +11 -7
  7. package/dist/runtime/components/Alert.vue +63 -63
  8. package/dist/runtime/components/Alert.vue.d.ts +4 -4
  9. package/dist/runtime/components/App.vue +11 -10
  10. package/dist/runtime/components/App.vue.d.ts +11 -7
  11. package/dist/runtime/components/Avatar.vue +29 -29
  12. package/dist/runtime/components/Avatar.vue.d.ts +4 -3
  13. package/dist/runtime/components/AvatarGroup.vue +4 -4
  14. package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
  15. package/dist/runtime/components/Badge.vue +32 -32
  16. package/dist/runtime/components/Badge.vue.d.ts +2 -2
  17. package/dist/runtime/components/Breadcrumb.vue +49 -49
  18. package/dist/runtime/components/Breadcrumb.vue.d.ts +10 -6
  19. package/dist/runtime/components/Button.vue +52 -51
  20. package/dist/runtime/components/Button.vue.d.ts +1 -1
  21. package/dist/runtime/components/Calendar.vue +75 -77
  22. package/dist/runtime/components/Calendar.vue.d.ts +16 -12
  23. package/dist/runtime/components/Card.vue +41 -41
  24. package/dist/runtime/components/Card.vue.d.ts +1 -1
  25. package/dist/runtime/components/Carousel.vue +85 -66
  26. package/dist/runtime/components/Carousel.vue.d.ts +14 -10
  27. package/dist/runtime/components/Checkbox.vue +46 -46
  28. package/dist/runtime/components/Checkbox.vue.d.ts +4 -3
  29. package/dist/runtime/components/CheckboxGroup.vue +131 -0
  30. package/dist/runtime/components/CheckboxGroup.vue.d.ts +93 -0
  31. package/dist/runtime/components/Chip.vue +15 -15
  32. package/dist/runtime/components/Chip.vue.d.ts +2 -2
  33. package/dist/runtime/components/Collapsible.vue +14 -14
  34. package/dist/runtime/components/Collapsible.vue.d.ts +2 -2
  35. package/dist/runtime/components/Drawer.vue +76 -76
  36. package/dist/runtime/components/Drawer.vue.d.ts +6 -6
  37. package/dist/runtime/components/DropdownMenu.vue +28 -28
  38. package/dist/runtime/components/DropdownMenu.vue.d.ts +17 -9
  39. package/dist/runtime/components/DropdownMenuContent.vue +152 -153
  40. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +11 -7
  41. package/dist/runtime/components/FieldGroup.vue +3 -3
  42. package/dist/runtime/components/FieldGroup.vue.d.ts +2 -2
  43. package/dist/runtime/components/Form.vue +9 -9
  44. package/dist/runtime/components/Form.vue.d.ts +13 -8
  45. package/dist/runtime/components/FormField.vue +39 -38
  46. package/dist/runtime/components/FormField.vue.d.ts +7 -2
  47. package/dist/runtime/components/Icon.vue +2 -2
  48. package/dist/runtime/components/Icon.vue.d.ts +1 -1
  49. package/dist/runtime/components/Input.vue +48 -48
  50. package/dist/runtime/components/Input.vue.d.ts +16 -12
  51. package/dist/runtime/components/InputNumber.vue +48 -50
  52. package/dist/runtime/components/InputNumber.vue.d.ts +128 -129
  53. package/dist/runtime/components/InputTags.vue +156 -0
  54. package/dist/runtime/components/InputTags.vue.d.ts +90 -0
  55. package/dist/runtime/components/Kbd.vue +3 -3
  56. package/dist/runtime/components/Kbd.vue.d.ts +2 -2
  57. package/dist/runtime/components/Link.vue +26 -25
  58. package/dist/runtime/components/Link.vue.d.ts +16 -6
  59. package/dist/runtime/components/LinkBase.vue +3 -3
  60. package/dist/runtime/components/LinkBase.vue.d.ts +2 -2
  61. package/dist/runtime/components/Marquee.vue +38 -0
  62. package/dist/runtime/components/Marquee.vue.d.ts +54 -0
  63. package/dist/runtime/components/Modal.vue +74 -74
  64. package/dist/runtime/components/Modal.vue.d.ts +6 -6
  65. package/dist/runtime/components/NavigationMenu.vue +243 -234
  66. package/dist/runtime/components/NavigationMenu.vue.d.ts +53 -14
  67. package/dist/runtime/components/OverlayProvider.vue +9 -9
  68. package/dist/runtime/components/Pagination.vue +47 -47
  69. package/dist/runtime/components/Pagination.vue.d.ts +4 -4
  70. package/dist/runtime/components/PinInput.vue +23 -23
  71. package/dist/runtime/components/PinInput.vue.d.ts +14 -10
  72. package/dist/runtime/components/Popover.vue +22 -22
  73. package/dist/runtime/components/Popover.vue.d.ts +11 -7
  74. package/dist/runtime/components/Progress.vue +25 -25
  75. package/dist/runtime/components/Progress.vue.d.ts +2 -2
  76. package/dist/runtime/components/RadioGroup.vue +50 -50
  77. package/dist/runtime/components/RadioGroup.vue.d.ts +13 -9
  78. package/dist/runtime/components/ScrollArea.vue +32 -32
  79. package/dist/runtime/components/ScrollArea.vue.d.ts +2 -2
  80. package/dist/runtime/components/Select.vue +299 -148
  81. package/dist/runtime/components/Select.vue.d.ts +103 -123
  82. package/dist/runtime/components/Separator.vue +30 -30
  83. package/dist/runtime/components/Separator.vue.d.ts +2 -2
  84. package/dist/runtime/components/Skeleton.vue +11 -11
  85. package/dist/runtime/components/Skeleton.vue.d.ts +2 -2
  86. package/dist/runtime/components/Slider.vue +25 -25
  87. package/dist/runtime/components/Slider.vue.d.ts +11 -7
  88. package/dist/runtime/components/Stepper.vue +116 -0
  89. package/dist/runtime/components/Stepper.vue.d.ts +83 -0
  90. package/dist/runtime/components/Switch.vue +30 -30
  91. package/dist/runtime/components/Switch.vue.d.ts +4 -3
  92. package/dist/runtime/components/Table.vue +188 -166
  93. package/dist/runtime/components/Table.vue.d.ts +27 -22
  94. package/dist/runtime/components/Tabs.vue +74 -74
  95. package/dist/runtime/components/Tabs.vue.d.ts +12 -8
  96. package/dist/runtime/components/Textarea.vue +47 -47
  97. package/dist/runtime/components/Textarea.vue.d.ts +16 -11
  98. package/dist/runtime/components/Timeline.vue +102 -0
  99. package/dist/runtime/components/Timeline.vue.d.ts +78 -0
  100. package/dist/runtime/components/Toast.vue +93 -93
  101. package/dist/runtime/components/Toast.vue.d.ts +5 -5
  102. package/dist/runtime/components/ToastProvider.vue +29 -29
  103. package/dist/runtime/components/ToastProvider.vue.d.ts +3 -3
  104. package/dist/runtime/components/Tooltip.vue +24 -25
  105. package/dist/runtime/components/Tooltip.vue.d.ts +2 -2
  106. package/dist/runtime/components/Tree.vue +241 -0
  107. package/dist/runtime/components/Tree.vue.d.ts +121 -0
  108. package/dist/runtime/composables/defineShortcuts.d.ts +1 -0
  109. package/dist/runtime/composables/defineShortcuts.js +44 -8
  110. package/dist/runtime/composables/useLocale.d.ts +12 -0
  111. package/dist/runtime/locale/en.d.ts +6 -0
  112. package/dist/runtime/locale/en.js +6 -0
  113. package/dist/runtime/locale/zh_tw.d.ts +6 -0
  114. package/dist/runtime/locale/zh_tw.js +6 -0
  115. package/dist/runtime/types/html.d.ts +8 -0
  116. package/dist/runtime/types/html.js +0 -0
  117. package/dist/runtime/types/index.d.ts +7 -0
  118. package/dist/runtime/types/index.js +7 -0
  119. package/dist/runtime/types/input.d.ts +5 -5
  120. package/dist/runtime/types/locale.d.ts +6 -0
  121. package/dist/runtime/types/unocss.d.ts +4 -4
  122. package/dist/runtime/types/utils.d.ts +9 -6
  123. package/dist/runtime/utils/index.d.ts +3 -3
  124. package/dist/runtime/utils/link.d.ts +2 -1
  125. package/dist/runtime/utils/link.js +40 -29
  126. package/dist/runtime/vue/components/Icon.vue +2 -2
  127. package/dist/runtime/vue/components/Icon.vue.d.ts +1 -1
  128. package/dist/runtime/vue/components/Link.vue +7 -12
  129. package/dist/runtime/vue/components/Link.vue.d.ts +11 -40
  130. package/dist/setup.d.mts +1 -1
  131. package/dist/shared/{ui.CzIlLITK.mjs → ui.9kQouwss.mjs} +5 -3
  132. package/dist/shared/{ui.DpbffTXs.d.mts → ui.D8Bg1HWt.d.mts} +2 -0
  133. package/dist/shared/{ui.DSyJHSTk.mjs → ui.DpkP12cX.mjs} +784 -84
  134. package/dist/unocss.mjs +1 -1
  135. package/dist/unplugin.d.mts +1 -1
  136. package/dist/unplugin.mjs +2 -2
  137. package/dist/vite.d.mts +1 -1
  138. package/dist/vite.mjs +2 -2
  139. package/package.json +29 -29
  140. package/vue-plugin.d.ts +5 -5
@@ -16,6 +16,10 @@ import { cv, merge } from "../../utils/style";
16
16
  defineOptions({ inheritAttrs: false });
17
17
  const props = defineProps({
18
18
  as: { type: null, required: false, default: "button" },
19
+ href: { type: null, required: false },
20
+ external: { type: Boolean, required: false },
21
+ target: { type: [String, Object, null], required: false },
22
+ rel: { type: [String, Object, null], required: false },
19
23
  type: { type: null, required: false, default: "button" },
20
24
  label: { type: String, required: false },
21
25
  disabled: { type: Boolean, required: false },
@@ -27,20 +31,11 @@ const props = defineProps({
27
31
  custom: { type: Boolean, required: false },
28
32
  raw: { type: Boolean, required: false },
29
33
  class: { type: [Object, String, Number, Boolean, null, Array], required: false, skipCheck: true },
30
- to: { type: null, required: false },
31
- href: { type: null, required: false },
32
- external: { type: Boolean, required: false },
33
- target: { type: [String, Object], required: false },
34
- rel: { type: [String, Object], required: false },
35
- noRel: { type: Boolean, required: false },
36
- prefetchedClass: { type: String, required: false },
37
- prefetch: { type: Boolean, required: false },
38
- prefetchOn: { type: [String, Object], required: false },
39
- noPrefetch: { type: Boolean, required: false },
40
34
  activeClass: { type: String, required: false },
41
35
  exactActiveClass: { type: String, required: false },
42
36
  ariaCurrentValue: { type: String, required: false, default: "page" },
43
37
  viewTransition: { type: Boolean, required: false },
38
+ to: { type: null, required: true },
44
39
  replace: { type: Boolean, required: false }
45
40
  });
46
41
  defineSlots();
@@ -137,7 +132,7 @@ function resolveLinkClass({ route: route2, isActive, isExactActive } = {}) {
137
132
  ...inheritProps,
138
133
  href: to,
139
134
  target: isExternal ? '_blank' : void 0,
140
- active,
135
+ active: active ?? false,
141
136
  isExternal
142
137
  }"
143
138
  >
@@ -155,7 +150,7 @@ function resolveLinkClass({ route: route2, isActive, isExactActive } = {}) {
155
150
  }"
156
151
  :class="resolveLinkClass()"
157
152
  >
158
- <slot :active="active">
153
+ <slot :active="active ?? false">
159
154
  {{ props.label }}
160
155
  </slot>
161
156
  </LinkBase>
@@ -1,22 +1,23 @@
1
1
  import type { PrimitiveProps } from 'reka-ui';
2
- import type { ButtonHTMLAttributes } from 'vue';
3
- import type { RouteLocationRaw, RouterLinkProps } from 'vue-router';
2
+ import type { RouterLinkProps } from 'vue-router';
4
3
  import type { ComponentBaseProps } from '../../types';
4
+ import type { AnchorHTMLAttributes, ButtonHTMLAttributes } from '../../types/html';
5
5
  import type { StaticSlot } from '../../types/utils';
6
6
  export interface LinkSlots {
7
7
  default: StaticSlot<{
8
8
  active: boolean;
9
9
  }>;
10
10
  }
11
- interface NuxtLinkProps extends Omit<RouterLinkProps, 'to'> {
11
+ export interface LinkProps extends ComponentBaseProps, Omit<RouterLinkProps, 'custom'>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled'>, /** @vue-ignore */ Omit<AnchorHTMLAttributes, 'href' | 'target' | 'rel' | 'type'> {
12
12
  /**
13
- * Route Location the link should navigate to when clicked on.
13
+ * The element or component this component should render as when not a link.
14
+ * @default "button"
14
15
  */
15
- to?: RouteLocationRaw;
16
+ as?: PrimitiveProps['as'];
16
17
  /**
17
18
  * An alias for `to`. If used with `to`, `href` will be ignored
18
19
  */
19
- href?: NuxtLinkProps['to'];
20
+ href?: LinkProps['to'];
20
21
  /**
21
22
  * Forces the link to be considered as external (true) or internal (false). This is helpful to handle edge-cases
22
23
  */
@@ -24,41 +25,11 @@ interface NuxtLinkProps extends Omit<RouterLinkProps, 'to'> {
24
25
  /**
25
26
  * Where to display the linked URL, as the name for a browsing context.
26
27
  */
27
- target?: '_blank' | '_parent' | '_self' | '_top' | (string & {});
28
+ target?: '_blank' | '_parent' | '_self' | '_top' | (string & {}) | null;
28
29
  /**
29
30
  * A rel attribute value to apply on the link. Defaults to "noopener noreferrer" for external links.
30
31
  */
31
- rel?: 'noopener' | 'noreferrer' | 'nofollow' | 'sponsored' | 'ugc' | (string & {});
32
- /**
33
- * If set to true, no rel attribute will be added to the link
34
- */
35
- noRel?: boolean;
36
- /**
37
- * A class to apply to links that have been prefetched.
38
- */
39
- prefetchedClass?: string;
40
- /**
41
- * When enabled will prefetch middleware, layouts and payloads of links in the viewport.
42
- */
43
- prefetch?: boolean;
44
- /**
45
- * Allows controlling when to prefetch links. By default, prefetch is triggered only on visibility.
46
- */
47
- prefetchOn?: 'visibility' | 'interaction' | Partial<{
48
- visibility: boolean;
49
- interaction: boolean;
50
- }>;
51
- /**
52
- * Escape hatch to disable `prefetch` attribute.
53
- */
54
- noPrefetch?: boolean;
55
- }
56
- export interface LinkProps extends ComponentBaseProps, NuxtLinkProps {
57
- /**
58
- * The element or component this component should render as when not a link.
59
- * @default "button"
60
- */
61
- as?: PrimitiveProps['as'];
32
+ rel?: 'noopener' | 'noreferrer' | 'nofollow' | 'sponsored' | 'ugc' | (string & {}) | null;
62
33
  /**
63
34
  * The type of the button when not a link.
64
35
  * @default "button"
@@ -80,14 +51,14 @@ export interface LinkProps extends ComponentBaseProps, NuxtLinkProps {
80
51
  /** When `true`, only styles from `class`, `activeClass`, and `inactiveClass` will be applied. */
81
52
  raw?: boolean;
82
53
  }
54
+ declare const _default: typeof __VLS_export;
55
+ export default _default;
83
56
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
84
57
  active: boolean;
85
58
  type: "reset" | "submit" | "button";
86
59
  ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
87
60
  as: import("reka-ui").AsTag | import("vue").Component;
88
61
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
89
- declare const _default: typeof __VLS_export;
90
- export default _default;
91
62
  type __VLS_WithSlots<T, S> = T & {
92
63
  new (): {
93
64
  $slots: S;
package/dist/setup.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import '#build/ui';
2
2
  import './shared/ui.IulR-OYx.mjs';
3
3
  import '../dist/runtime/types/style.js';
4
- export { A as AppConfigIcons, a as AppConfigUI, s as setup } from './shared/ui.DpbffTXs.mjs';
4
+ export { A as AppConfigIcons, a as AppConfigUI, s as setup } from './shared/ui.D8Bg1HWt.mjs';
5
5
  import './unocss.mjs';
6
6
  import '@nuxt/schema';
7
7
  import '@unocss/preset-wind4/colors';
@@ -11,6 +11,8 @@ const icons = {
11
11
  chevronDoubleLeft: "i-lucide-chevrons-left",
12
12
  chevronDoubleRight: "i-lucide-chevrons-right",
13
13
  ellipsis: "i-lucide-ellipsis",
14
+ folder: "i-lucide-folder",
15
+ folderOpen: "i-lucide-folder-open",
14
16
  plus: "i-lucide-plus",
15
17
  minus: "i-lucide-minus",
16
18
  external: "i-lucide-arrow-up-right"
@@ -19,13 +21,13 @@ const icons = {
19
21
  function getDefaultUIConfig(colors) {
20
22
  return {
21
23
  colors: pick({
22
- primary: "green",
23
- secondary: "blue",
24
+ primary: "orange",
25
+ secondary: "teal",
24
26
  success: "green",
25
27
  info: "blue",
26
28
  warning: "yellow",
27
29
  error: "red",
28
- neutral: "slate"
30
+ neutral: "stone"
29
31
  }, [...colors || [], "neutral"]),
30
32
  icons
31
33
  };
@@ -17,6 +17,8 @@ declare const icons: {
17
17
  chevronDoubleLeft: string;
18
18
  chevronDoubleRight: string;
19
19
  ellipsis: string;
20
+ folder: string;
21
+ folderOpen: string;
20
22
  plus: string;
21
23
  minus: string;
22
24
  external: string;