@byyuurin/ui 0.2.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.
Files changed (137) hide show
  1. package/README.md +5 -3
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +2 -2
  4. package/dist/runtime/components/Accordion.vue +2 -2
  5. package/dist/runtime/components/Accordion.vue.d.ts +11 -7
  6. package/dist/runtime/components/Alert.vue +2 -1
  7. package/dist/runtime/components/Alert.vue.d.ts +4 -4
  8. package/dist/runtime/components/App.vue +2 -1
  9. package/dist/runtime/components/App.vue.d.ts +11 -7
  10. package/dist/runtime/components/Avatar.vue +2 -1
  11. package/dist/runtime/components/Avatar.vue.d.ts +4 -3
  12. package/dist/runtime/components/AvatarGroup.vue +2 -1
  13. package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
  14. package/dist/runtime/components/Badge.vue +4 -3
  15. package/dist/runtime/components/Badge.vue.d.ts +2 -2
  16. package/dist/runtime/components/Breadcrumb.vue +2 -2
  17. package/dist/runtime/components/Breadcrumb.vue.d.ts +10 -6
  18. package/dist/runtime/components/Button.vue +8 -8
  19. package/dist/runtime/components/Button.vue.d.ts +1 -1
  20. package/dist/runtime/components/Calendar.vue +2 -1
  21. package/dist/runtime/components/Calendar.vue.d.ts +16 -12
  22. package/dist/runtime/components/Card.vue +2 -1
  23. package/dist/runtime/components/Card.vue.d.ts +1 -1
  24. package/dist/runtime/components/Carousel.vue +2 -1
  25. package/dist/runtime/components/Carousel.vue.d.ts +14 -10
  26. package/dist/runtime/components/Checkbox.vue +4 -2
  27. package/dist/runtime/components/Checkbox.vue.d.ts +4 -3
  28. package/dist/runtime/components/CheckboxGroup.vue +4 -3
  29. package/dist/runtime/components/CheckboxGroup.vue.d.ts +11 -7
  30. package/dist/runtime/components/Chip.vue +5 -1
  31. package/dist/runtime/components/Chip.vue.d.ts +2 -2
  32. package/dist/runtime/components/Collapsible.vue +2 -1
  33. package/dist/runtime/components/Collapsible.vue.d.ts +2 -2
  34. package/dist/runtime/components/Drawer.vue +2 -1
  35. package/dist/runtime/components/Drawer.vue.d.ts +6 -6
  36. package/dist/runtime/components/DropdownMenu.vue +3 -3
  37. package/dist/runtime/components/DropdownMenu.vue.d.ts +17 -9
  38. package/dist/runtime/components/DropdownMenuContent.vue +11 -12
  39. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +11 -7
  40. package/dist/runtime/components/FieldGroup.vue +2 -1
  41. package/dist/runtime/components/FieldGroup.vue.d.ts +2 -2
  42. package/dist/runtime/components/FileUpload.vue +267 -0
  43. package/dist/runtime/components/FileUpload.vue.d.ts +178 -0
  44. package/dist/runtime/components/Form.vue +2 -1
  45. package/dist/runtime/components/Form.vue.d.ts +13 -8
  46. package/dist/runtime/components/FormField.vue +6 -4
  47. package/dist/runtime/components/FormField.vue.d.ts +7 -2
  48. package/dist/runtime/components/Icon.vue.d.ts +1 -1
  49. package/dist/runtime/components/Input.vue +4 -4
  50. package/dist/runtime/components/Input.vue.d.ts +16 -12
  51. package/dist/runtime/components/InputNumber.vue +3 -2
  52. package/dist/runtime/components/InputNumber.vue.d.ts +128 -124
  53. package/dist/runtime/components/InputTags.vue +2 -1
  54. package/dist/runtime/components/InputTags.vue.d.ts +16 -11
  55. package/dist/runtime/components/Kbd.vue +2 -1
  56. package/dist/runtime/components/Kbd.vue.d.ts +2 -2
  57. package/dist/runtime/components/Link.vue +5 -3
  58. package/dist/runtime/components/Link.vue.d.ts +16 -6
  59. package/dist/runtime/components/LinkBase.vue.d.ts +2 -2
  60. package/dist/runtime/components/Marquee.vue +2 -1
  61. package/dist/runtime/components/Marquee.vue.d.ts +3 -3
  62. package/dist/runtime/components/Modal.vue +3 -2
  63. package/dist/runtime/components/Modal.vue.d.ts +6 -6
  64. package/dist/runtime/components/NavigationMenu.vue +2 -2
  65. package/dist/runtime/components/NavigationMenu.vue.d.ts +11 -7
  66. package/dist/runtime/components/Pagination.vue +2 -1
  67. package/dist/runtime/components/Pagination.vue.d.ts +4 -4
  68. package/dist/runtime/components/PinInput.vue +4 -4
  69. package/dist/runtime/components/PinInput.vue.d.ts +14 -10
  70. package/dist/runtime/components/Popover.vue +1 -1
  71. package/dist/runtime/components/Popover.vue.d.ts +11 -7
  72. package/dist/runtime/components/Progress.vue +2 -1
  73. package/dist/runtime/components/Progress.vue.d.ts +2 -2
  74. package/dist/runtime/components/RadioGroup.vue +3 -3
  75. package/dist/runtime/components/RadioGroup.vue.d.ts +11 -7
  76. package/dist/runtime/components/ScrollArea.vue +2 -1
  77. package/dist/runtime/components/ScrollArea.vue.d.ts +2 -2
  78. package/dist/runtime/components/Select.vue +282 -131
  79. package/dist/runtime/components/Select.vue.d.ts +103 -123
  80. package/dist/runtime/components/Separator.vue +2 -1
  81. package/dist/runtime/components/Separator.vue.d.ts +2 -2
  82. package/dist/runtime/components/Skeleton.vue +2 -1
  83. package/dist/runtime/components/Skeleton.vue.d.ts +2 -2
  84. package/dist/runtime/components/Slider.vue +2 -1
  85. package/dist/runtime/components/Slider.vue.d.ts +11 -7
  86. package/dist/runtime/components/Stepper.vue +117 -0
  87. package/dist/runtime/components/Stepper.vue.d.ts +83 -0
  88. package/dist/runtime/components/Switch.vue +3 -4
  89. package/dist/runtime/components/Switch.vue.d.ts +4 -3
  90. package/dist/runtime/components/Table.vue +2 -1
  91. package/dist/runtime/components/Table.vue.d.ts +13 -8
  92. package/dist/runtime/components/Tabs.vue +2 -2
  93. package/dist/runtime/components/Tabs.vue.d.ts +12 -8
  94. package/dist/runtime/components/Textarea.vue +3 -3
  95. package/dist/runtime/components/Textarea.vue.d.ts +16 -11
  96. package/dist/runtime/components/Timeline.vue +2 -1
  97. package/dist/runtime/components/Timeline.vue.d.ts +11 -7
  98. package/dist/runtime/components/Toast.vue +2 -1
  99. package/dist/runtime/components/Toast.vue.d.ts +5 -5
  100. package/dist/runtime/components/ToastProvider.vue +2 -2
  101. package/dist/runtime/components/ToastProvider.vue.d.ts +3 -3
  102. package/dist/runtime/components/Tooltip.vue +4 -4
  103. package/dist/runtime/components/Tooltip.vue.d.ts +2 -2
  104. package/dist/runtime/components/Tree.vue +241 -0
  105. package/dist/runtime/components/Tree.vue.d.ts +121 -0
  106. package/dist/runtime/composables/defineShortcuts.d.ts +1 -0
  107. package/dist/runtime/composables/defineShortcuts.js +44 -8
  108. package/dist/runtime/composables/useFileUpload.d.ts +19 -0
  109. package/dist/runtime/composables/useFileUpload.js +79 -0
  110. package/dist/runtime/composables/useLocale.d.ts +18 -0
  111. package/dist/runtime/locale/en.d.ts +9 -0
  112. package/dist/runtime/locale/en.js +9 -0
  113. package/dist/runtime/locale/zh_tw.d.ts +9 -0
  114. package/dist/runtime/locale/zh_tw.js +9 -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 +3 -0
  118. package/dist/runtime/types/index.js +3 -0
  119. package/dist/runtime/types/input.d.ts +5 -5
  120. package/dist/runtime/types/locale.d.ts +9 -0
  121. package/dist/runtime/types/utils.d.ts +4 -4
  122. package/dist/runtime/utils/index.d.ts +3 -3
  123. package/dist/runtime/utils/link.d.ts +2 -1
  124. package/dist/runtime/utils/link.js +40 -29
  125. package/dist/runtime/vue/components/Icon.vue.d.ts +1 -1
  126. package/dist/runtime/vue/components/Link.vue +7 -12
  127. package/dist/runtime/vue/components/Link.vue.d.ts +11 -40
  128. package/dist/setup.d.mts +1 -1
  129. package/dist/shared/{ui.DpbffTXs.d.mts → ui.CGCKYv7g.d.mts} +6 -2
  130. package/dist/shared/{ui.CzIlLITK.mjs → ui.DYMXCXO6.mjs} +9 -5
  131. package/dist/shared/{ui.DLOxhmP0.mjs → ui.DcEKQd0n.mjs} +490 -20
  132. package/dist/unocss.mjs +1 -1
  133. package/dist/unplugin.d.mts +1 -1
  134. package/dist/unplugin.mjs +2 -2
  135. package/dist/vite.d.mts +1 -1
  136. package/dist/vite.mjs +2 -2
  137. package/package.json +31 -31
@@ -2,9 +2,10 @@ import type { VariantProps } from '@byyuurin/ui-kit';
2
2
  import type { SwitchRootProps } from 'reka-ui';
3
3
  import theme from '#build/ui/switch';
4
4
  import type { ComponentBaseProps, ComponentUIProps, IconProps } from '../types';
5
+ import type { ButtonHTMLAttributes } from '../types/html';
5
6
  import type { StaticSlot } from '../types/utils';
6
7
  type ThemeVariants = VariantProps<typeof theme>;
7
- export interface SwitchProps extends ComponentBaseProps, Pick<SwitchRootProps, 'disabled' | 'id' | 'name' | 'required' | 'value' | 'defaultValue'> {
8
+ export interface SwitchProps extends ComponentBaseProps, Pick<SwitchRootProps, 'disabled' | 'id' | 'name' | 'required' | 'value' | 'defaultValue'>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled' | 'value' | 'name'> {
8
9
  /**
9
10
  * The element or component this component should render as.
10
11
  * @default "div"
@@ -42,6 +43,8 @@ export interface SwitchSlots {
42
43
  description?: string;
43
44
  }>;
44
45
  }
46
+ declare const _default: typeof __VLS_export;
47
+ export default _default;
45
48
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<SwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
46
49
  change: (event: Event) => any;
47
50
  "update:modelValue": (value: boolean) => any;
@@ -49,8 +52,6 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Switch
49
52
  onChange?: ((event: Event) => any) | undefined;
50
53
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
51
54
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, SwitchSlots>;
52
- declare const _default: typeof __VLS_export;
53
- export default _default;
54
55
  type __VLS_WithSlots<T, S> = T & {
55
56
  new (): {
56
57
  $slots: S;
@@ -12,6 +12,7 @@ import { upperFirst } from "scule";
12
12
  import { computed, ref, shallowRef, toRef, watch } from "vue";
13
13
  import { useAppConfig } from "#imports";
14
14
  import { useLocale } from "../composables/useLocale";
15
+ import { pick } from "../utils";
15
16
  import { cv, merge } from "../utils/style";
16
17
  defineOptions({ inheritAttrs: false });
17
18
  const props = defineProps({
@@ -282,7 +283,7 @@ const appConfig = useAppConfig();
282
283
  const ui = computed(() => {
283
284
  const styler = cv(merge(theme, appConfig.ui.table));
284
285
  return styler({
285
- ...props,
286
+ ...pick(props, ["loading", "loadingColor", "loadingAnimation"]),
286
287
  sticky: props.virtualize ? false : props.sticky,
287
288
  virtualize: !!props.virtualize
288
289
  });
@@ -6,6 +6,7 @@ import type { PrimitiveProps } from 'reka-ui';
6
6
  import type { WatchOptions } from 'vue';
7
7
  import theme from '#build/ui/table';
8
8
  import type { ComponentBaseProps, ComponentUIProps } from '../types';
9
+ import type { TableHTMLAttributes } from '../types/html';
9
10
  import type { MaybeNull, StaticSlot } from '../types/utils';
10
11
  declare module '@tanstack/table-core' {
11
12
  interface ColumnMeta<TData extends RowData, TValue> {
@@ -42,7 +43,7 @@ export interface TableOptions<T extends TableData = TableData> extends Omit<Core
42
43
  renderFallbackValue?: CoreOptions<T>['renderFallbackValue'];
43
44
  }
44
45
  type ThemeVariants = VariantProps<typeof theme>;
45
- export interface TableProps<T extends TableData = TableData> extends ComponentBaseProps, TableOptions<T> {
46
+ export interface TableProps<T extends TableData = TableData> extends ComponentBaseProps, TableOptions<T>, /** @vue-ignore */ TableHTMLAttributes {
46
47
  /**
47
48
  * The element or component this component should render as.
48
49
  * @default "div"
@@ -186,8 +187,10 @@ export type TableSlots<T> = {
186
187
  'body-top': StaticSlot;
187
188
  'body-bottom': StaticSlot;
188
189
  } & DynamicHeaderSlots<T> & DynamicFooterSlots<T> & DynamicCellSlots<T>;
189
- declare const __VLS_export: <T extends TableData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
190
- props: __VLS_PrettifyLocal<(TableProps<T> & {
190
+ declare const _default: typeof __VLS_export;
191
+ export default _default;
192
+ declare const __VLS_export: <T extends TableData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
193
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(TableProps<T> & {
191
194
  globalFilter?: string;
192
195
  columnFilters?: ColumnFiltersState;
193
196
  columnOrder?: ColumnOrderState;
@@ -215,7 +218,9 @@ declare const __VLS_export: <T extends TableData>(__VLS_props: NonNullable<Await
215
218
  "onUpdate:grouping"?: ((value: GroupingState | undefined) => any) | undefined;
216
219
  "onUpdate:expanded"?: ((value: ExpandedState | undefined) => any) | undefined;
217
220
  "onUpdate:pagination"?: ((value: PaginationState | undefined) => any) | undefined;
218
- }> & import("vue").PublicProps;
221
+ }> & (typeof globalThis extends {
222
+ __VLS_PROPS_FALLBACK: infer P;
223
+ } ? P : {});
219
224
  expose: (exposed: import("vue").ShallowUnwrapRef<{
220
225
  readonly $el: any;
221
226
  tableRef: import("vue").ShallowRef<MaybeNull<HTMLTableElement>, MaybeNull<HTMLTableElement>>;
@@ -227,8 +232,8 @@ declare const __VLS_export: <T extends TableData>(__VLS_props: NonNullable<Await
227
232
  }>) => import("vue").VNode & {
228
233
  __ctx?: Awaited<typeof __VLS_setup>;
229
234
  };
230
- declare const _default: typeof __VLS_export;
231
- export default _default;
232
- type __VLS_PrettifyLocal<T> = {
235
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
236
+ [K in keyof T]: T[K];
237
+ } : {
233
238
  [K in keyof T as K]: T[K];
234
- } & {};
239
+ }) & {};
@@ -7,7 +7,7 @@ import { reactivePick } from "@vueuse/core";
7
7
  import { TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger, useForwardPropsEmits } from "reka-ui";
8
8
  import { computed, ref } from "vue";
9
9
  import { useAppConfig } from "#imports";
10
- import { get } from "../utils";
10
+ import { get, pick } from "../utils";
11
11
  import { cv, merge } from "../utils/style";
12
12
  import Avatar from "./Avatar.vue";
13
13
  import Badge from "./Badge.vue";
@@ -34,7 +34,7 @@ const rootProps = useForwardPropsEmits(reactivePick(props, "as", "unmountOnHide"
34
34
  const appConfig = useAppConfig();
35
35
  const ui = computed(() => {
36
36
  const styler = cv(merge(theme, appConfig.ui.tabs));
37
- return styler(props);
37
+ return styler(pick(props, ["color", "variant", "size", "orientation"]));
38
38
  });
39
39
  const triggersRef = ref([]);
40
40
  defineExpose({
@@ -1,6 +1,6 @@
1
- import type { ComponentPublicInstance } from 'vue';
2
1
  import type { VariantProps } from '@byyuurin/ui-kit';
3
2
  import type { TabsRootEmits, TabsRootProps } from 'reka-ui';
3
+ import type { ComponentPublicInstance } from 'vue';
4
4
  import theme from '#build/ui/tabs';
5
5
  import type { AvatarProps, BadgeProps, ComponentBaseProps, ComponentStyler, ComponentUIProps, IconProps } from '../types';
6
6
  import type { DynamicSlots, GetItemKeys, StaticSlot } from '../types/utils';
@@ -77,10 +77,14 @@ export type TabsSlots<T extends TabsItem = TabsItem> = {
77
77
  index: number;
78
78
  ui: ComponentStyler<typeof theme>;
79
79
  }>;
80
- declare const __VLS_export: <T extends TabsItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
81
- props: __VLS_PrettifyLocal<TabsProps<T> & {
80
+ declare const _default: typeof __VLS_export;
81
+ export default _default;
82
+ declare const __VLS_export: <T extends TabsItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
83
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<TabsProps<T> & {
82
84
  "onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
83
- }> & import("vue").PublicProps;
85
+ }> & (typeof globalThis extends {
86
+ __VLS_PROPS_FALLBACK: infer P;
87
+ } ? P : {});
84
88
  expose: (exposed: import("vue").ShallowUnwrapRef<{
85
89
  triggersRef: import("vue").Ref<ComponentPublicInstance[], ComponentPublicInstance[]>;
86
90
  }>) => void;
@@ -90,8 +94,8 @@ declare const __VLS_export: <T extends TabsItem>(__VLS_props: NonNullable<Awaite
90
94
  }>) => import("vue").VNode & {
91
95
  __ctx?: Awaited<typeof __VLS_setup>;
92
96
  };
93
- declare const _default: typeof __VLS_export;
94
- export default _default;
95
- type __VLS_PrettifyLocal<T> = {
97
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
98
+ [K in keyof T]: T[K];
99
+ } : {
96
100
  [K in keyof T as K]: T[K];
97
- } & {};
101
+ }) & {};
@@ -9,7 +9,7 @@ import { computed, nextTick, onMounted, shallowRef, watch } from "vue";
9
9
  import { useAppConfig } from "#imports";
10
10
  import { useComponentIcons } from "../composables/useComponentIcons";
11
11
  import { useFormField } from "../composables/useFormField";
12
- import { looseToNumber } from "../utils";
12
+ import { looseToNumber, pick } from "../utils";
13
13
  import { cv, merge } from "../utils/style";
14
14
  import Avatar from "./Avatar.vue";
15
15
  import Icon from "./Icon.vue";
@@ -54,9 +54,9 @@ const appConfig = useAppConfig();
54
54
  const ui = computed(() => {
55
55
  const styler = cv(merge(theme, appConfig.ui.textarea));
56
56
  return styler({
57
- ...props,
58
- size: size.value,
57
+ ...pick(props, ["variant", "loading", "autoresize"]),
59
58
  color: color.value,
59
+ size: size.value,
60
60
  highlight: highlight.value,
61
61
  leading: isLeading.value || !!props.avatar || !!slots.leading,
62
62
  trailing: isTrailing.value || !!slots.trailing
@@ -3,11 +3,12 @@ import type { PrimitiveProps } from 'reka-ui';
3
3
  import theme from '#build/ui/textarea';
4
4
  import type { UseComponentIconsProps } from '../composables/useComponentIcons';
5
5
  import type { ComponentBaseProps, ComponentStyler, ComponentUIProps } from '../types';
6
+ import type { TextareaHTMLAttributes } from '../types/html';
6
7
  import type { ModelModifiers } from '../types/input';
7
8
  import type { MaybeNull, StaticSlot } from '../types/utils';
8
9
  type TextareaValue = MaybeNull<string | number>;
9
10
  type ThemeVariants = VariantProps<typeof theme>;
10
- export interface TextareaProps<T extends TextareaValue = TextareaValue> extends ComponentBaseProps, UseComponentIconsProps {
11
+ export interface TextareaProps<T extends TextareaValue = TextareaValue> extends ComponentBaseProps, UseComponentIconsProps, /** @vue-ignore */ Omit<TextareaHTMLAttributes, 'name' | 'placeholder' | 'required' | 'autofocus' | 'disabled' | 'rows'> {
11
12
  /**
12
13
  * The element or component this component should render as.
13
14
  * @default "div"
@@ -35,7 +36,7 @@ export interface TextareaProps<T extends TextareaValue = TextareaValue> extends
35
36
  autoresizeDelay?: number;
36
37
  modelValue?: T;
37
38
  defaultValue?: T;
38
- modelModifiers?: ModelModifiers;
39
+ modelModifiers?: ModelModifiers<T>;
39
40
  ui?: ComponentUIProps<typeof theme>;
40
41
  }
41
42
  export interface TextareaEmits<T extends TextareaValue = TextareaValue> {
@@ -54,23 +55,27 @@ export interface TextareaSlots {
54
55
  ui: ComponentStyler<typeof theme>;
55
56
  }>;
56
57
  }
57
- declare const __VLS_export: <T extends TextareaValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
58
- props: __VLS_PrettifyLocal<TextareaProps<T> & {
59
- onChange?: ((event: Event) => any) | undefined;
58
+ declare const _default: typeof __VLS_export;
59
+ export default _default;
60
+ declare const __VLS_export: <T extends TextareaValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
61
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<TextareaProps<T> & {
60
62
  onBlur?: ((event: FocusEvent) => any) | undefined;
63
+ onChange?: ((event: Event) => any) | undefined;
61
64
  "onUpdate:modelValue"?: ((payload: TextareaValue) => any) | undefined;
62
- }> & import("vue").PublicProps;
65
+ }> & (typeof globalThis extends {
66
+ __VLS_PROPS_FALLBACK: infer P;
67
+ } ? P : {});
63
68
  expose: (exposed: import("vue").ShallowUnwrapRef<{
64
69
  textareaRef: import("vue").ShallowRef<MaybeNull<HTMLTextAreaElement>, MaybeNull<HTMLTextAreaElement>>;
65
70
  }>) => void;
66
71
  attrs: any;
67
72
  slots: TextareaSlots;
68
- emit: ((evt: "change", event: Event) => void) & ((evt: "blur", event: FocusEvent) => void) & ((evt: "update:modelValue", payload: TextareaValue) => void);
73
+ emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", payload: TextareaValue) => void);
69
74
  }>) => import("vue").VNode & {
70
75
  __ctx?: Awaited<typeof __VLS_setup>;
71
76
  };
72
- declare const _default: typeof __VLS_export;
73
- export default _default;
74
- type __VLS_PrettifyLocal<T> = {
77
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
78
+ [K in keyof T]: T[K];
79
+ } : {
75
80
  [K in keyof T as K]: T[K];
76
- } & {};
81
+ }) & {};
@@ -7,6 +7,7 @@ import { useVModel } from "@vueuse/core";
7
7
  import { Primitive, Separator } from "reka-ui";
8
8
  import { computed } from "vue";
9
9
  import { useAppConfig } from "#imports";
10
+ import { pick } from "../utils";
10
11
  import { cv, merge } from "../utils/style";
11
12
  import Avatar from "./Avatar.vue";
12
13
  const props = defineProps({
@@ -44,7 +45,7 @@ function getItemState(index) {
44
45
  const appConfig = useAppConfig();
45
46
  const ui = computed(() => {
46
47
  const styler = cv(merge(theme, appConfig.ui.timeline));
47
- return styler(props);
48
+ return styler(pick(props, ["orientation", "size", "color", "reverse"]));
48
49
  });
49
50
  </script>
50
51
 
@@ -56,10 +56,14 @@ export type TimelineSlots<T extends TimelineItem = TimelineItem> = {
56
56
  } & DynamicSlots<T, 'indicator' | 'date' | 'title' | 'description', {
57
57
  item: T;
58
58
  }, false>;
59
- declare const __VLS_export: <T extends TimelineItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
60
- props: __VLS_PrettifyLocal<TimelineProps<T> & {
59
+ declare const _default: typeof __VLS_export;
60
+ export default _default;
61
+ declare const __VLS_export: <T extends TimelineItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
62
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<TimelineProps<T> & {
61
63
  "onUpdate:model-value"?: ((value: string | number) => any) | undefined;
62
- }> & import("vue").PublicProps;
64
+ }> & (typeof globalThis extends {
65
+ __VLS_PROPS_FALLBACK: infer P;
66
+ } ? P : {});
63
67
  expose: (exposed: {}) => void;
64
68
  attrs: any;
65
69
  slots: TimelineSlots<T>;
@@ -67,8 +71,8 @@ declare const __VLS_export: <T extends TimelineItem>(__VLS_props: NonNullable<Aw
67
71
  }>) => import("vue").VNode & {
68
72
  __ctx?: Awaited<typeof __VLS_setup>;
69
73
  };
70
- declare const _default: typeof __VLS_export;
71
- export default _default;
72
- type __VLS_PrettifyLocal<T> = {
74
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
75
+ [K in keyof T]: T[K];
76
+ } : {
73
77
  [K in keyof T as K]: T[K];
74
- } & {};
78
+ }) & {};
@@ -8,6 +8,7 @@ import { ToastAction, ToastClose, ToastDescription, ToastRoot, ToastTitle, useFo
8
8
  import { computed, nextTick, onMounted, shallowRef } from "vue";
9
9
  import { useAppConfig } from "#imports";
10
10
  import { useLocale } from "../composables/useLocale";
11
+ import { pick } from "../utils";
11
12
  import { cv, merge } from "../utils/style";
12
13
  import Avatar from "./Avatar.vue";
13
14
  import Button from "./Button.vue";
@@ -40,7 +41,7 @@ const appConfig = useAppConfig();
40
41
  const ui = computed(() => {
41
42
  const styler = cv(merge(theme, appConfig.ui.toast));
42
43
  return styler({
43
- ...props,
44
+ ...pick(props, ["color", "orientation"]),
44
45
  title: !!props.title || !!slots.title
45
46
  });
46
47
  });
@@ -1,7 +1,7 @@
1
1
  import type { VariantProps } from '@byyuurin/ui-kit';
2
2
  import type { PrimitiveProps, ToastRootEmits, ToastRootProps } from 'reka-ui';
3
3
  import theme from '#build/ui/toast';
4
- import type { AvatarProps, ButtonProps, ComponentBaseProps, ComponentStyler, ComponentUIProps, IconProps, ProgressProps } from '../types';
4
+ import type { AvatarProps, ButtonProps, ComponentBaseProps, ComponentStyler, ComponentUIProps, IconProps, LinkPropsKeys, ProgressProps } from '../types';
5
5
  import type { StaticSlot, StringOrVNode } from '../types/utils';
6
6
  type ThemeVariants = VariantProps<typeof theme>;
7
7
  export interface ToastProps extends ComponentBaseProps, Pick<ToastRootProps, 'defaultOpen' | 'open' | 'type' | 'duration'> {
@@ -28,7 +28,7 @@ export interface ToastProps extends ComponentBaseProps, Pick<ToastRootProps, 'de
28
28
  * Display a close button to dismiss the toast.
29
29
  * @default true
30
30
  */
31
- close?: boolean | Partial<ButtonProps>;
31
+ close?: boolean | Omit<ButtonProps, LinkPropsKeys>;
32
32
  /**
33
33
  * The icon displayed in the close button.
34
34
  * @default app.icons.close
@@ -54,6 +54,8 @@ export interface ToastSlots {
54
54
  ui: ComponentStyler<typeof theme>;
55
55
  }>;
56
56
  }
57
+ declare const _default: typeof __VLS_export;
58
+ export default _default;
57
59
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ToastProps, {
58
60
  height: import("vue").ShallowRef<number, number>;
59
61
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -139,12 +141,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ToastP
139
141
  };
140
142
  }>, "currentTarget">) => any) | undefined;
141
143
  }>, {
142
- close: boolean | Partial<ButtonProps>;
144
+ close: boolean | Omit<ButtonProps, LinkPropsKeys>;
143
145
  progress: boolean | Pick<ProgressProps, "color" | "ui">;
144
146
  orientation: "horizontal" | "vertical";
145
147
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ToastSlots>;
146
- declare const _default: typeof __VLS_export;
147
- export default _default;
148
148
  type __VLS_WithSlots<T, S> = T & {
149
149
  new (): {
150
150
  $slots: S;
@@ -9,7 +9,7 @@ import { computed, ref, toRef } from "vue";
9
9
  import { useAppConfig } from "#imports";
10
10
  import { usePortal } from "../composables/usePortal";
11
11
  import { provideToastMax, useToast } from "../composables/useToast";
12
- import { omit } from "../utils";
12
+ import { omit, pick } from "../utils";
13
13
  import { cv, merge } from "../utils/style";
14
14
  import Toast from "./Toast.vue";
15
15
  const props = defineProps({
@@ -49,7 +49,7 @@ const appConfig = useAppConfig();
49
49
  const ui = computed(() => {
50
50
  const styler = cv(merge(theme, appConfig.ui.toastProvider));
51
51
  return styler({
52
- ...props,
52
+ ...pick(props, ["position"]),
53
53
  swipeDirection: swipeDirection.value
54
54
  });
55
55
  });
@@ -35,15 +35,15 @@ export interface ToastProviderProps extends ComponentBaseProps, Omit<RekaToastPr
35
35
  export interface ToasterSlots {
36
36
  default: StaticSlot;
37
37
  }
38
+ declare const _default: typeof __VLS_export;
39
+ export default _default;
38
40
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ToastProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ToastProviderProps> & Readonly<{}>, {
39
41
  progress: boolean;
42
+ max: number;
40
43
  portal: boolean | string | HTMLElement;
41
44
  duration: number;
42
- max: number;
43
45
  expand: boolean;
44
46
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ToasterSlots>;
45
- declare const _default: typeof __VLS_export;
46
- export default _default;
47
47
  type __VLS_WithSlots<T, S> = T & {
48
48
  new (): {
49
49
  $slots: S;
@@ -8,6 +8,7 @@ import { TooltipArrow, TooltipContent, TooltipPortal, TooltipRoot, TooltipTrigge
8
8
  import { computed, toRef } from "vue";
9
9
  import { useAppConfig } from "#imports";
10
10
  import { usePortal } from "../composables/usePortal";
11
+ import { pick } from "../utils";
11
12
  import { cv, merge } from "../utils/style";
12
13
  import Kbd from "./Kbd.vue";
13
14
  const props = defineProps({
@@ -36,15 +37,14 @@ const arrowProps = toRef(() => props.arrow);
36
37
  const appConfig = useAppConfig();
37
38
  const ui = computed(() => {
38
39
  const styler = cv(merge(theme, appConfig.ui.tooltip));
39
- return styler(props);
40
+ return styler(pick(props, []));
40
41
  });
41
42
  </script>
42
43
 
43
44
  <template>
44
45
  <TooltipRoot v-slot="{ open }" v-bind="rootProps" :disabled="!(props.text || props.kbds?.length || !!slots.content) || props.disabled">
45
- <TooltipTrigger v-if="!!slots.default" as-child :class="props.class">
46
- <slot :open="open">
47
- </slot>
46
+ <TooltipTrigger v-if="!!slots.default || props.reference" v-bind="$attrs" as-child :reference="props.reference" :class="props.class">
47
+ <slot :open="open"></slot>
48
48
  </TooltipTrigger>
49
49
 
50
50
  <TooltipPortal v-bind="portalProps">
@@ -37,6 +37,8 @@ export interface TooltipSlots {
37
37
  ui: ComponentStyler<typeof theme>;
38
38
  }>;
39
39
  }
40
+ declare const _default: typeof __VLS_export;
41
+ export default _default;
40
42
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<TooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
41
43
  "update:open": (value: boolean) => any;
42
44
  }, string, import("vue").PublicProps, Readonly<TooltipProps> & Readonly<{
@@ -44,8 +46,6 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Toolti
44
46
  }>, {
45
47
  portal: boolean | string | HTMLElement;
46
48
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, TooltipSlots>;
47
- declare const _default: typeof __VLS_export;
48
- export default _default;
49
49
  type __VLS_WithSlots<T, S> = T & {
50
50
  new (): {
51
51
  $slots: S;