@byyuurin/ui 0.0.6 → 0.0.8

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 (198) hide show
  1. package/README.md +4 -5
  2. package/dist/module.cjs +5 -0
  3. package/dist/module.json +12 -0
  4. package/dist/{nuxt.mjs → module.mjs} +8 -8
  5. package/dist/module.mjs.map +1 -0
  6. package/dist/runtime/app/injections.d.ts +16 -0
  7. package/dist/runtime/app/injections.js +31 -0
  8. package/dist/runtime/components/Accordion.vue +27 -38
  9. package/dist/runtime/components/Alert.vue +23 -16
  10. package/dist/runtime/components/App.vue +15 -15
  11. package/dist/runtime/components/Avatar.vue +73 -0
  12. package/dist/runtime/components/AvatarGroup.vue +90 -0
  13. package/dist/runtime/components/Badge.vue +15 -10
  14. package/dist/runtime/components/Breadcrumb.vue +105 -0
  15. package/dist/runtime/components/Button.vue +22 -23
  16. package/dist/runtime/components/ButtonGroup.vue +12 -10
  17. package/dist/runtime/components/Card.vue +16 -8
  18. package/dist/runtime/components/Carousel.vue +19 -12
  19. package/dist/runtime/components/Checkbox.vue +16 -12
  20. package/dist/runtime/components/Chip.vue +17 -12
  21. package/dist/runtime/components/Collapsible.vue +56 -0
  22. package/dist/runtime/components/Drawer.vue +18 -17
  23. package/dist/runtime/components/Input.vue +28 -28
  24. package/dist/runtime/components/InputNumber.vue +169 -0
  25. package/dist/runtime/components/Kbd.vue +51 -0
  26. package/dist/runtime/components/Link.vue +301 -72
  27. package/dist/runtime/components/LinkBase.vue +88 -0
  28. package/dist/runtime/components/Modal.vue +11 -9
  29. package/dist/runtime/components/ModalProvider.vue +2 -1
  30. package/dist/runtime/components/Pagination.vue +30 -30
  31. package/dist/runtime/components/PinInput.vue +7 -7
  32. package/dist/runtime/components/Popover.vue +7 -7
  33. package/dist/runtime/components/Progress.vue +165 -0
  34. package/dist/runtime/components/RadioGroup.vue +33 -29
  35. package/dist/runtime/components/Select.vue +40 -40
  36. package/dist/runtime/components/Separator.vue +63 -0
  37. package/dist/runtime/components/Skeleton.vue +33 -0
  38. package/dist/runtime/components/Slider.vue +6 -6
  39. package/dist/runtime/components/Switch.vue +14 -15
  40. package/dist/runtime/components/Table.vue +300 -0
  41. package/dist/runtime/components/Tabs.vue +25 -21
  42. package/dist/runtime/components/Textarea.vue +11 -11
  43. package/dist/runtime/components/Toast.vue +15 -14
  44. package/dist/runtime/components/Toaster.vue +5 -39
  45. package/dist/runtime/components/Tooltip.vue +7 -7
  46. package/dist/runtime/composables/useAvatarGroup.d.ts +4 -0
  47. package/dist/runtime/composables/useAvatarGroup.js +8 -0
  48. package/dist/runtime/composables/useButtonGroup.d.ts +4 -12
  49. package/dist/runtime/composables/{useButtonGroup.mjs → useButtonGroup.js} +1 -6
  50. package/dist/runtime/composables/useComponentIcons.d.ts +9 -9
  51. package/dist/runtime/composables/useComponentIcons.js +24 -0
  52. package/dist/runtime/composables/useKbd.d.ts +35 -0
  53. package/dist/runtime/composables/useKbd.js +49 -0
  54. package/dist/runtime/composables/useLocale.d.ts +8 -0
  55. package/dist/runtime/composables/useLocale.js +22 -0
  56. package/dist/runtime/composables/useModal.d.ts +2 -7
  57. package/dist/runtime/composables/{useModal.mjs → useModal.js} +1 -6
  58. package/dist/runtime/composables/useTheme.d.ts +2 -6
  59. package/dist/runtime/composables/useTheme.js +16 -0
  60. package/dist/runtime/composables/useToast.d.ts +1 -1
  61. package/dist/runtime/index.d.ts +40 -0
  62. package/dist/runtime/index.js +40 -0
  63. package/dist/runtime/locale/en.d.ts +2 -0
  64. package/dist/runtime/locale/en.js +28 -0
  65. package/dist/runtime/locale/index.d.ts +2 -0
  66. package/dist/runtime/locale/index.js +2 -0
  67. package/dist/runtime/locale/zh-tw.d.ts +2 -0
  68. package/dist/runtime/locale/zh-tw.js +28 -0
  69. package/dist/runtime/theme/accordion.d.ts +5 -5
  70. package/dist/runtime/theme/{accordion.mjs → accordion.js} +2 -2
  71. package/dist/runtime/theme/alert.d.ts +2 -2
  72. package/dist/runtime/theme/{alert.mjs → alert.js} +4 -4
  73. package/dist/runtime/theme/app.d.ts +8 -5
  74. package/dist/runtime/theme/app.js +18 -0
  75. package/dist/runtime/theme/avatar-group.d.ts +52 -0
  76. package/dist/runtime/theme/avatar-group.js +32 -0
  77. package/dist/runtime/theme/avatar.d.ts +56 -0
  78. package/dist/runtime/theme/avatar.js +34 -0
  79. package/dist/runtime/theme/badge.d.ts +45 -21
  80. package/dist/runtime/theme/{badge.mjs → badge.js} +2 -2
  81. package/dist/runtime/theme/breadcrumb.d.ts +67 -0
  82. package/dist/runtime/theme/breadcrumb.js +44 -0
  83. package/dist/runtime/theme/button-group.d.ts +2 -2
  84. package/dist/runtime/theme/button.d.ts +61 -115
  85. package/dist/runtime/theme/button.js +164 -0
  86. package/dist/runtime/theme/card.d.ts +38 -38
  87. package/dist/runtime/theme/card.js +37 -0
  88. package/dist/runtime/theme/carousel.d.ts +2 -2
  89. package/dist/runtime/theme/{carousel.mjs → carousel.js} +2 -2
  90. package/dist/runtime/theme/checkbox.d.ts +1 -1
  91. package/dist/runtime/theme/{checkbox.mjs → checkbox.js} +3 -3
  92. package/dist/runtime/theme/chip.d.ts +47 -14
  93. package/dist/runtime/theme/{chip.mjs → chip.js} +7 -9
  94. package/dist/runtime/theme/collapsible.d.ts +38 -0
  95. package/dist/runtime/theme/collapsible.js +10 -0
  96. package/dist/runtime/theme/drawer.d.ts +43 -43
  97. package/dist/runtime/theme/{drawer.mjs → drawer.js} +33 -22
  98. package/dist/runtime/theme/index.d.ts +37 -27
  99. package/dist/runtime/theme/index.js +37 -0
  100. package/dist/runtime/theme/input-number.d.ts +141 -0
  101. package/dist/runtime/theme/input-number.js +95 -0
  102. package/dist/runtime/theme/input.d.ts +77 -105
  103. package/dist/runtime/theme/{input.mjs → input.js} +25 -25
  104. package/dist/runtime/theme/kbd.d.ts +39 -0
  105. package/dist/runtime/theme/kbd.js +26 -0
  106. package/dist/runtime/theme/link.d.ts +2 -2
  107. package/dist/runtime/theme/{link.mjs → link.js} +1 -1
  108. package/dist/runtime/theme/modal.d.ts +31 -8
  109. package/dist/runtime/theme/{modal.mjs → modal.js} +4 -9
  110. package/dist/runtime/theme/pagination.d.ts +17 -17
  111. package/dist/runtime/theme/pinInput.d.ts +42 -42
  112. package/dist/runtime/theme/{pinInput.mjs → pinInput.js} +10 -10
  113. package/dist/runtime/theme/popover.d.ts +8 -8
  114. package/dist/runtime/theme/{popover.mjs → popover.js} +1 -1
  115. package/dist/runtime/theme/progress.d.ts +122 -0
  116. package/dist/runtime/theme/progress.js +95 -0
  117. package/dist/runtime/theme/radio-group.d.ts +1 -1
  118. package/dist/runtime/theme/{radio-group.mjs → radio-group.js} +1 -1
  119. package/dist/runtime/theme/scroll-area.d.ts +17 -17
  120. package/dist/runtime/theme/{scroll-area.mjs → scroll-area.js} +2 -2
  121. package/dist/runtime/theme/select.d.ts +93 -108
  122. package/dist/runtime/theme/{select.mjs → select.js} +31 -31
  123. package/dist/runtime/theme/separator.d.ts +95 -0
  124. package/dist/runtime/theme/separator.js +53 -0
  125. package/dist/runtime/theme/skeleton.d.ts +8 -0
  126. package/dist/runtime/theme/skeleton.js +7 -0
  127. package/dist/runtime/theme/slider.d.ts +1 -1
  128. package/dist/runtime/theme/{slider.mjs → slider.js} +3 -3
  129. package/dist/runtime/theme/switch.d.ts +1 -1
  130. package/dist/runtime/theme/{switch.mjs → switch.js} +3 -3
  131. package/dist/runtime/theme/table.d.ts +89 -0
  132. package/dist/runtime/theme/table.js +35 -0
  133. package/dist/runtime/theme/tabs.d.ts +70 -53
  134. package/dist/runtime/theme/{tabs.mjs → tabs.js} +12 -12
  135. package/dist/runtime/theme/textarea.d.ts +43 -37
  136. package/dist/runtime/theme/{textarea.mjs → textarea.js} +10 -10
  137. package/dist/runtime/theme/toast.d.ts +2 -2
  138. package/dist/runtime/theme/{toast.mjs → toast.js} +3 -3
  139. package/dist/runtime/theme/toaster.d.ts +42 -27
  140. package/dist/runtime/theme/tooltip.d.ts +11 -11
  141. package/dist/runtime/theme/tooltip.js +11 -0
  142. package/dist/runtime/types/components.d.ts +37 -27
  143. package/dist/runtime/types/index.d.ts +5 -4
  144. package/dist/runtime/types/index.js +3 -0
  145. package/dist/runtime/types/locale.d.ts +23 -0
  146. package/dist/runtime/types/locale.js +0 -0
  147. package/dist/runtime/types/utils.d.ts +1 -1
  148. package/dist/runtime/types/utils.js +0 -0
  149. package/dist/runtime/utils/index.d.ts +9 -4
  150. package/dist/runtime/utils/{index.mjs → index.js} +9 -7
  151. package/dist/runtime/utils/link.d.ts +22 -7
  152. package/dist/runtime/utils/link.js +30 -0
  153. package/dist/runtime/utils/styler.d.ts +1 -1
  154. package/dist/runtime/utils/translator.d.ts +18 -0
  155. package/dist/runtime/utils/translator.js +8 -0
  156. package/dist/runtime/vue/stubs.d.ts +9 -0
  157. package/dist/runtime/vue/stubs.js +16 -0
  158. package/dist/shared/ui.ba24b380.mjs +4 -0
  159. package/dist/shared/ui.ba24b380.mjs.map +1 -0
  160. package/dist/types.d.mts +1 -0
  161. package/dist/types.d.ts +1 -0
  162. package/dist/unocss.d.mts +6 -11
  163. package/dist/unocss.d.ts +6 -11
  164. package/dist/unocss.mjs +40 -21
  165. package/dist/unocss.mjs.map +1 -1
  166. package/dist/unplugin.mjs +35 -8
  167. package/dist/unplugin.mjs.map +1 -1
  168. package/dist/vite.d.mts +0 -1
  169. package/dist/vite.d.ts +0 -1
  170. package/dist/vite.mjs +3 -1
  171. package/dist/vite.mjs.map +1 -1
  172. package/package.json +50 -38
  173. package/dist/index.d.ts +0 -29
  174. package/dist/index.mjs +0 -29
  175. package/dist/nuxt.mjs.map +0 -1
  176. package/dist/runtime/composables/useComponentIcons.mjs +0 -24
  177. package/dist/runtime/composables/useTheme.mjs +0 -26
  178. package/dist/runtime/theme/app.mjs +0 -15
  179. package/dist/runtime/theme/button.mjs +0 -148
  180. package/dist/runtime/theme/card.mjs +0 -14
  181. package/dist/runtime/theme/index.mjs +0 -27
  182. package/dist/runtime/theme/tooltip.mjs +0 -11
  183. package/dist/runtime/types/components.mjs +0 -27
  184. package/dist/runtime/types/index.mjs +0 -2
  185. package/dist/runtime/utils/link.mjs +0 -4
  186. package/dist/shared/ui.D4zm1r0C.mjs +0 -4
  187. package/dist/shared/ui.D4zm1r0C.mjs.map +0 -1
  188. /package/dist/{nuxt.d.mts → module.d.mts} +0 -0
  189. /package/dist/{nuxt.d.ts → module.d.ts} +0 -0
  190. /package/dist/runtime/composables/{useToast.mjs → useToast.js} +0 -0
  191. /package/dist/runtime/theme/{button-group.mjs → button-group.js} +0 -0
  192. /package/dist/runtime/theme/{pagination.mjs → pagination.js} +0 -0
  193. /package/dist/runtime/theme/{toaster.mjs → toaster.js} +0 -0
  194. /package/dist/runtime/types/{utils.mjs → components.js} +0 -0
  195. /package/dist/runtime/utils/{extend-theme.mjs → extend-theme.js} +0 -0
  196. /package/dist/runtime/utils/{styler.mjs → styler.js} +0 -0
  197. /package/dist/runtime/{composables/defineInjection.d.ts → utils/vue.d.ts} +0 -0
  198. /package/dist/runtime/{composables/defineInjection.mjs → utils/vue.js} +0 -0
@@ -1,15 +1,15 @@
1
1
  import { type MaybeRefOrGetter } from 'vue';
2
2
  export interface UseComponentIconsProps {
3
- /** Display an icon based on the `prefix` and `suffix` props. */
3
+ /** Display an icon based on the `leading` and `trailing` props. */
4
4
  icon?: string;
5
5
  /** When `true`, the icon will be displayed on the left side. */
6
- prefix?: boolean;
6
+ leading?: boolean;
7
7
  /** Display an icon on the left side. */
8
- prefixIcon?: string;
8
+ leadingIcon?: string;
9
9
  /** When `true`, the icon will be displayed on the right side. */
10
- suffix?: boolean;
10
+ trailing?: boolean;
11
11
  /** Display an icon on the right side. */
12
- suffixIcon?: string;
12
+ trailingIcon?: string;
13
13
  /** When `true`, the loading icon will be displayed. */
14
14
  loading?: boolean;
15
15
  /**
@@ -19,8 +19,8 @@ export interface UseComponentIconsProps {
19
19
  loadingIcon?: string;
20
20
  }
21
21
  export declare function useComponentIcons(componentProps: MaybeRefOrGetter<UseComponentIconsProps>): {
22
- isPrefix: import("vue").ComputedRef<boolean>;
23
- isSuffix: import("vue").ComputedRef<boolean>;
24
- prefixIconName: import("vue").ComputedRef<string | undefined>;
25
- suffixIconName: import("vue").ComputedRef<string | undefined>;
22
+ isLeading: import("vue").ComputedRef<boolean>;
23
+ isTrailing: import("vue").ComputedRef<boolean>;
24
+ leadingIconName: import("vue").ComputedRef<string | undefined>;
25
+ trailingIconName: import("vue").ComputedRef<string | undefined>;
26
26
  };
@@ -0,0 +1,24 @@
1
+ import { computed, toValue } from "vue";
2
+ import { useTheme } from "./useTheme.js";
3
+ export function useComponentIcons(componentProps) {
4
+ const { theme } = useTheme();
5
+ const props = computed(() => toValue(componentProps));
6
+ const isLeading = computed(() => props.value.icon && props.value.leading || props.value.icon && !props.value.trailing || props.value.loading && !props.value.trailing || !!props.value.leadingIcon);
7
+ const isTrailing = computed(() => props.value.icon && props.value.trailing || props.value.loading && props.value.trailing || !!props.value.trailingIcon);
8
+ const leadingIconName = computed(() => {
9
+ if (props.value.loading)
10
+ return props.value.loadingIcon || theme.value.app.icons.loading;
11
+ return props.value.leadingIcon || props.value.icon;
12
+ });
13
+ const trailingIconName = computed(() => {
14
+ if (props.value.loading && !isLeading.value)
15
+ return props.value.loadingIcon || theme.value.app.icons.loading;
16
+ return props.value.trailingIcon || props.value.icon;
17
+ });
18
+ return {
19
+ isLeading,
20
+ isTrailing,
21
+ leadingIconName,
22
+ trailingIconName
23
+ };
24
+ }
@@ -0,0 +1,35 @@
1
+ interface KbdKeysSpecificMap {
2
+ meta: string;
3
+ alt: string;
4
+ ctrl: string;
5
+ }
6
+ export declare const kbdKeysMap: {
7
+ meta: string;
8
+ ctrl: string;
9
+ alt: string;
10
+ win: string;
11
+ command: string;
12
+ shift: string;
13
+ option: string;
14
+ enter: string;
15
+ delete: string;
16
+ backspace: string;
17
+ escape: string;
18
+ tab: string;
19
+ capslock: string;
20
+ arrowup: string;
21
+ arrowright: string;
22
+ arrowdown: string;
23
+ arrowleft: string;
24
+ pageup: string;
25
+ pagedown: string;
26
+ home: string;
27
+ end: string;
28
+ };
29
+ export type KbdKey = keyof typeof kbdKeysMap;
30
+ export type KbdKeySpecific = keyof KbdKeysSpecificMap;
31
+ export declare const useKbd: () => {
32
+ macOS: import("vue").ComputedRef<any>;
33
+ getKbdKey: (value?: KbdKey | (string & {})) => string | undefined;
34
+ };
35
+ export {};
@@ -0,0 +1,49 @@
1
+ import { createSharedComposable } from "@vueuse/core";
2
+ import { computed, onMounted, reactive } from "vue";
3
+ export const kbdKeysMap = {
4
+ meta: "",
5
+ ctrl: "",
6
+ alt: "",
7
+ win: "\u229E",
8
+ command: "\u2318",
9
+ shift: "\u21E7",
10
+ option: "\u2325",
11
+ enter: "\u21B5",
12
+ delete: "\u2326",
13
+ backspace: "\u232B",
14
+ escape: "\u238B",
15
+ tab: "\u21E5",
16
+ capslock: "\u21EA",
17
+ arrowup: "\u2191",
18
+ arrowright: "\u2192",
19
+ arrowdown: "\u2193",
20
+ arrowleft: "\u2190",
21
+ pageup: "\u21DE",
22
+ pagedown: "\u21DF",
23
+ home: "\u2196",
24
+ end: "\u2198"
25
+ };
26
+ export const useKbd = createSharedComposable(() => {
27
+ const macOS = computed(() => import.meta.client && navigator && navigator.userAgent && navigator.userAgent.match(/Macintosh;/));
28
+ const kbdKeysSpecificMap = reactive({
29
+ meta: " ",
30
+ alt: " ",
31
+ ctrl: " "
32
+ });
33
+ onMounted(() => {
34
+ kbdKeysSpecificMap.meta = macOS.value ? kbdKeysMap.command : kbdKeysMap.win;
35
+ kbdKeysSpecificMap.alt = macOS.value ? kbdKeysMap.option : "alt";
36
+ kbdKeysSpecificMap.ctrl = macOS.value ? "\u2303" : "ctrl";
37
+ });
38
+ function getKbdKey(value) {
39
+ if (!value)
40
+ return;
41
+ if (["meta", "alt", "ctrl"].includes(value))
42
+ return kbdKeysSpecificMap[value];
43
+ return kbdKeysMap[value] || value.toUpperCase();
44
+ }
45
+ return {
46
+ macOS,
47
+ getKbdKey
48
+ };
49
+ });
@@ -0,0 +1,8 @@
1
+ import type { Translator } from '../utils/translator.js';
2
+ export declare const useLocale: () => {
3
+ locale: import("vue").ComputedRef<import("../utils").Locale<import("..").Messages>>;
4
+ lang: import("vue").ComputedRef<string>;
5
+ code: import("vue").ComputedRef<string>;
6
+ dir: import("vue").ComputedRef<import("../utils").Direction>;
7
+ t: Translator<import("..").Messages>;
8
+ };
@@ -0,0 +1,22 @@
1
+ import { createSharedComposable } from "@vueuse/core";
2
+ import { computed, toValue } from "vue";
3
+ import { injectLocaleContext } from "../app/injections.js";
4
+ import localeDefault from "../locale/en.js";
5
+ import { createTranslator } from "../utils/index.js";
6
+ export const useLocale = createSharedComposable(() => {
7
+ const _locale = injectLocaleContext();
8
+ const locale = computed(() => toValue(_locale) ?? localeDefault);
9
+ const lang = computed(() => locale.value.name);
10
+ const code = computed(() => locale.value.code);
11
+ const dir = computed(() => locale.value.dir ?? "ltr");
12
+ const t = (path, options) => {
13
+ return createTranslator(toValue(locale))(path, options);
14
+ };
15
+ return {
16
+ locale,
17
+ lang,
18
+ code,
19
+ dir,
20
+ t
21
+ };
22
+ });
@@ -1,11 +1,6 @@
1
- import type { Component, ShallowRef } from 'vue';
1
+ import type { Component } from 'vue';
2
2
  import type { ComponentProps } from 'vue-component-type-helpers';
3
- import type { ModalProps } from '../types';
4
- export interface ModalState {
5
- component: Component | string;
6
- props: ModalProps;
7
- }
8
- export declare const InjectionKeyModalState: import("vue").InjectionKey<ShallowRef<ModalState>>, injectModalState: () => ShallowRef<ModalState> | undefined, provideModalState: (value: ShallowRef<ModalState>) => void;
3
+ import type { ModalProps } from '../types/index.js';
9
4
  export declare const useModal: () => {
10
5
  open: <T extends Component>(component: T, props?: ModalProps & ComponentProps<T>) => void;
11
6
  close: () => void;
@@ -1,11 +1,6 @@
1
1
  import { createSharedComposable } from "@vueuse/core";
2
2
  import { ref } from "vue";
3
- import { defineInjection } from "./defineInjection.mjs";
4
- export const {
5
- InjectionKey: InjectionKeyModalState,
6
- inject: injectModalState,
7
- provide: provideModalState
8
- } = defineInjection("ui.modal");
3
+ import { injectModalState } from "../app/injections.js";
9
4
  export const useModal = createSharedComposable(() => {
10
5
  const modalState = injectModalState();
11
6
  const isOpen = ref(false);
@@ -1,9 +1,5 @@
1
- import type { UserConfig } from '@unocss/core';
2
- import type { MaybeRefOrGetter } from 'vue';
3
- import * as theme from '../theme';
4
- export declare const InjectionKeyThemeExtension: import("vue").InjectionKey<MaybeRefOrGetter<import("../types").PartialTheme<typeof theme>>>, provideThemeExtension: (value: MaybeRefOrGetter<import("../types").PartialTheme<typeof theme>>) => void, injectThemeExtension: () => MaybeRefOrGetter<import("../types").PartialTheme<typeof theme>>;
5
- export declare const InjectionKeyUnoConfig: import("vue").InjectionKey<UserConfig<object>>, provideUnoConfig: (value: UserConfig<object>) => void, injectUnoConfig: () => UserConfig<object>;
1
+ import * as theme from '../theme/index.js';
6
2
  export declare const useTheme: () => {
7
3
  theme: import("vue").ComputedRef<typeof theme>;
8
- createStyler: <V extends import("@byyuurin/ui-kit/index").CVVariants<S, B>, CV extends import("@byyuurin/ui-kit/index").CVCompoundVariants<V, S, B>, DV extends import("@byyuurin/ui-kit/index").CVDefaultVariants<V, S>, B extends import("@byyuurin/ui-kit/index").ClassValue = undefined, S extends import("@byyuurin/ui-kit/index").CVSlots = undefined>(theme: import("@byyuurin/ui-kit/index").CVMeta<V, CV, DV, B, S>) => [keyof V] extends string[] ? (props: import("@byyuurin/ui-kit/index").VariantProps<import("@byyuurin/ui-kit/index").CVReturnType<V, S, B>> & import("../types").StylerBaseProps) => S extends undefined ? string : { [K in keyof S | (B extends undefined ? never : "base")]: import("@byyuurin/ui-kit/index").CVHandler<V, S, string>; } : (props?: import("../types").StylerBaseProps) => S extends undefined ? string : { [K in keyof S | (B extends undefined ? never : "base")]: import("@byyuurin/ui-kit/index").CVHandler<V, S, string>; };
4
+ createStyler: <V extends import("@byyuurin/ui-kit").CVVariants<S, B>, CV extends import("@byyuurin/ui-kit").CVCompoundVariants<V, S, B>, DV extends import("@byyuurin/ui-kit").CVDefaultVariants<V, S>, B extends import("@byyuurin/ui-kit").ClassValue = undefined, S extends import("@byyuurin/ui-kit").CVSlots = undefined>(theme: import("@byyuurin/ui-kit").CVMeta<V, CV, DV, B, S>) => [keyof V] extends string[] ? (props: import("@byyuurin/ui-kit").VariantProps<import("@byyuurin/ui-kit").CVReturnType<V, S, B>> & import("..").StylerBaseProps) => S extends undefined ? string : { [K in keyof S | (B extends undefined ? never : "base")]: import("@byyuurin/ui-kit").CVHandler<V, S, string>; } : (props?: import("..").StylerBaseProps) => S extends undefined ? string : { [K in keyof S | (B extends undefined ? never : "base")]: import("@byyuurin/ui-kit").CVHandler<V, S, string>; };
9
5
  };
@@ -0,0 +1,16 @@
1
+ import { transformUnoRules } from "@byyuurin/ui/unocss";
2
+ import { createSharedComposable } from "@vueuse/core";
3
+ import { computed, toValue } from "vue";
4
+ import { injectThemeExtension, injectUnoConfig } from "../app/injections.js";
5
+ import * as theme from "../theme/index.js";
6
+ import { extendTheme, prepareStyler } from "../utils/index.js";
7
+ export const useTheme = createSharedComposable(() => {
8
+ const themeExtension = injectThemeExtension();
9
+ const unoConfig = injectUnoConfig();
10
+ const mergeRules = transformUnoRules(toValue(unoConfig));
11
+ const { createStyler } = prepareStyler(mergeRules);
12
+ return {
13
+ theme: computed(() => extendTheme(toValue(themeExtension), theme)),
14
+ createStyler
15
+ };
16
+ });
@@ -1,4 +1,4 @@
1
- import type { ToastProps } from '../types';
1
+ import type { ToastProps } from '../types/index.js';
2
2
  export interface Toast extends Omit<ToastProps, 'defaultOpen'> {
3
3
  id: string | number;
4
4
  onClick?: (toast: Toast) => void;
@@ -0,0 +1,40 @@
1
+ export { default as Accordion } from './components/Accordion.vue.js';
2
+ export { default as Alert } from './components/Alert.vue.js';
3
+ export { default as App } from './components/App.vue.js';
4
+ export { default as Avatar } from './components/Avatar.vue.js';
5
+ export { default as AvatarGroup } from './components/AvatarGroup.vue.js';
6
+ export { default as Badge } from './components/Badge.vue.js';
7
+ export { default as Breadcrumb } from './components/Breadcrumb.vue.js';
8
+ export { default as Button } from './components/Button.vue.js';
9
+ export { default as ButtonGroup } from './components/ButtonGroup.vue.js';
10
+ export { default as Card } from './components/Card.vue.js';
11
+ export { default as Carousel } from './components/Carousel.vue.js';
12
+ export { default as Checkbox } from './components/Checkbox.vue.js';
13
+ export { default as Chip } from './components/Chip.vue.js';
14
+ export { default as Collapsible } from './components/Collapsible.vue.js';
15
+ export { default as Drawer } from './components/Drawer.vue.js';
16
+ export { default as Input } from './components/Input.vue.js';
17
+ export { default as InputNumber } from './components/InputNumber.vue.js';
18
+ export { default as Kbd } from './components/Kbd.vue.js';
19
+ export { default as Link } from './components/Link.vue.js';
20
+ export { default as LinkBase } from './components/LinkBase.vue.js';
21
+ export { default as Modal } from './components/Modal.vue.js';
22
+ export { default as ModalProvider } from './components/ModalProvider.vue.js';
23
+ export { default as Pagination } from './components/Pagination.vue.js';
24
+ export { default as PinInput } from './components/PinInput.vue.js';
25
+ export { default as Popover } from './components/Popover.vue.js';
26
+ export { default as Progress } from './components/Progress.vue.js';
27
+ export { default as RadioGroup } from './components/RadioGroup.vue.js';
28
+ export { default as ScrollArea } from './components/ScrollArea.vue.js';
29
+ export { default as Select } from './components/Select.vue.js';
30
+ export { default as Separator } from './components/Separator.vue.js';
31
+ export { default as Skeleton } from './components/Skeleton.vue.js';
32
+ export { default as Slider } from './components/Slider.vue.js';
33
+ export { default as Switch } from './components/Switch.vue.js';
34
+ export { default as Table } from './components/Table.vue.js';
35
+ export { default as Tabs } from './components/Tabs.vue.js';
36
+ export { default as Textarea } from './components/Textarea.vue.js';
37
+ export { default as Toast } from './components/Toast.vue.js';
38
+ export { default as Toaster } from './components/Toaster.vue.js';
39
+ export { default as Tooltip } from './components/Tooltip.vue.js';
40
+ export * from './types/index.js';
@@ -0,0 +1,40 @@
1
+ export { default as Accordion } from "./components/Accordion.vue";
2
+ export { default as Alert } from "./components/Alert.vue";
3
+ export { default as App } from "./components/App.vue";
4
+ export { default as Avatar } from "./components/Avatar.vue";
5
+ export { default as AvatarGroup } from "./components/AvatarGroup.vue";
6
+ export { default as Badge } from "./components/Badge.vue";
7
+ export { default as Breadcrumb } from "./components/Breadcrumb.vue";
8
+ export { default as Button } from "./components/Button.vue";
9
+ export { default as ButtonGroup } from "./components/ButtonGroup.vue";
10
+ export { default as Card } from "./components/Card.vue";
11
+ export { default as Carousel } from "./components/Carousel.vue";
12
+ export { default as Checkbox } from "./components/Checkbox.vue";
13
+ export { default as Chip } from "./components/Chip.vue";
14
+ export { default as Collapsible } from "./components/Collapsible.vue";
15
+ export { default as Drawer } from "./components/Drawer.vue";
16
+ export { default as Input } from "./components/Input.vue";
17
+ export { default as InputNumber } from "./components/InputNumber.vue";
18
+ export { default as Kbd } from "./components/Kbd.vue";
19
+ export { default as Link } from "./components/Link.vue";
20
+ export { default as LinkBase } from "./components/LinkBase.vue";
21
+ export { default as Modal } from "./components/Modal.vue";
22
+ export { default as ModalProvider } from "./components/ModalProvider.vue";
23
+ export { default as Pagination } from "./components/Pagination.vue";
24
+ export { default as PinInput } from "./components/PinInput.vue";
25
+ export { default as Popover } from "./components/Popover.vue";
26
+ export { default as Progress } from "./components/Progress.vue";
27
+ export { default as RadioGroup } from "./components/RadioGroup.vue";
28
+ export { default as ScrollArea } from "./components/ScrollArea.vue";
29
+ export { default as Select } from "./components/Select.vue";
30
+ export { default as Separator } from "./components/Separator.vue";
31
+ export { default as Skeleton } from "./components/Skeleton.vue";
32
+ export { default as Slider } from "./components/Slider.vue";
33
+ export { default as Switch } from "./components/Switch.vue";
34
+ export { default as Table } from "./components/Table.vue";
35
+ export { default as Tabs } from "./components/Tabs.vue";
36
+ export { default as Textarea } from "./components/Textarea.vue";
37
+ export { default as Toast } from "./components/Toast.vue";
38
+ export { default as Toaster } from "./components/Toaster.vue";
39
+ export { default as Tooltip } from "./components/Tooltip.vue";
40
+ export * from "./types/index.js";
@@ -0,0 +1,2 @@
1
+ declare const _default: import("../utils").Locale<import("..").Messages>;
2
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import { defineLocale } from "../utils/index.js";
2
+ export default defineLocale({
3
+ name: "English",
4
+ code: "en",
5
+ messages: {
6
+ alert: {
7
+ close: "Close"
8
+ },
9
+ carousel: {
10
+ prev: "Prev",
11
+ next: "Next",
12
+ goto: "Go to slide {page}"
13
+ },
14
+ inputNumber: {
15
+ increment: "Increment",
16
+ decrement: "Decrement"
17
+ },
18
+ modal: {
19
+ close: "Close"
20
+ },
21
+ table: {
22
+ noData: "No data"
23
+ },
24
+ toast: {
25
+ close: "Close"
26
+ }
27
+ }
28
+ });
@@ -0,0 +1,2 @@
1
+ export { default as en } from './en.js';
2
+ export { default as zhTW } from './zh-tw.js';
@@ -0,0 +1,2 @@
1
+ export { default as en } from "./en.js";
2
+ export { default as zhTW } from "./zh-tw.js";
@@ -0,0 +1,2 @@
1
+ declare const _default: import("../utils").Locale<import("..").Messages>;
2
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import { defineLocale } from "../utils/index.js";
2
+ export default defineLocale({
3
+ name: "\u7E41\u9AD4\u4E2D\u6587",
4
+ code: "zh-TW",
5
+ messages: {
6
+ alert: {
7
+ close: "\u95DC\u9589"
8
+ },
9
+ carousel: {
10
+ prev: "\u4E0A\u4E00\u9801",
11
+ next: "\u4E0B\u4E00\u9801",
12
+ goto: "\u8DF3\u8F49\u5230\u7B2C {page} \u9801"
13
+ },
14
+ inputNumber: {
15
+ increment: "\u589E\u52A0",
16
+ decrement: "\u6E1B\u5C11"
17
+ },
18
+ modal: {
19
+ close: "\u95DC\u9589"
20
+ },
21
+ table: {
22
+ noData: "\u6C92\u6709\u8CC7\u6599"
23
+ },
24
+ toast: {
25
+ close: "\u95DC\u9589"
26
+ }
27
+ }
28
+ });
@@ -7,7 +7,7 @@ declare const _default: {
7
7
  trigger: string;
8
8
  content: string[];
9
9
  body: string;
10
- icon: string;
10
+ leadingIcon: string;
11
11
  trailingIcon: string;
12
12
  label: string;
13
13
  };
@@ -18,7 +18,7 @@ declare const _default: {
18
18
  };
19
19
  };
20
20
  };
21
- compoundVariants: import("@byyuurin/ui-kit/index").CVCompoundVariants<{
21
+ compoundVariants: import("@byyuurin/ui-kit").CVCompoundVariants<{
22
22
  disabled: {
23
23
  true: {
24
24
  trigger: string;
@@ -31,11 +31,11 @@ declare const _default: {
31
31
  trigger: string;
32
32
  content: string[];
33
33
  body: string;
34
- icon: string;
34
+ leadingIcon: string;
35
35
  trailingIcon: string;
36
36
  label: string;
37
37
  }, undefined>;
38
- defaultVariants: import("@byyuurin/ui-kit/index").CVDefaultVariants<{
38
+ defaultVariants: import("@byyuurin/ui-kit").CVDefaultVariants<{
39
39
  disabled: {
40
40
  true: {
41
41
  trigger: string;
@@ -48,7 +48,7 @@ declare const _default: {
48
48
  trigger: string;
49
49
  content: string[];
50
50
  body: string;
51
- icon: string;
51
+ leadingIcon: string;
52
52
  trailingIcon: string;
53
53
  label: string;
54
54
  }>;
@@ -13,8 +13,8 @@ export default ct(
13
13
  "data-[state=closed]:animate-[accordion-up_200ms_ease-out]"
14
14
  ],
15
15
  body: "text-sm pb-4 color-ui-cb/80",
16
- icon: "shrink-0 size-5",
17
- trailingIcon: "shrink-0 size-5 ms-auto group-data-[state=open]:rotate-180 transition-transform duration-200",
16
+ leadingIcon: "shrink-0 size-5",
17
+ trailingIcon: "shrink-0 size-5 ms-auto group-data-[state=open]:rotate-180 transition-all duration-200",
18
18
  label: "text-start break-words"
19
19
  },
20
20
  variants: {
@@ -41,7 +41,7 @@ declare const _default: {
41
41
  };
42
42
  };
43
43
  };
44
- compoundVariants: import("@byyuurin/ui-kit/index").CVCompoundVariants<{
44
+ compoundVariants: import("@byyuurin/ui-kit").CVCompoundVariants<{
45
45
  variant: {
46
46
  solid: {
47
47
  root: string;
@@ -81,7 +81,7 @@ declare const _default: {
81
81
  actions: string;
82
82
  close: string;
83
83
  }, undefined>;
84
- defaultVariants: import("@byyuurin/ui-kit/index").CVDefaultVariants<{
84
+ defaultVariants: import("@byyuurin/ui-kit").CVDefaultVariants<{
85
85
  variant: {
86
86
  solid: {
87
87
  root: string;
@@ -14,17 +14,17 @@ export default ct(
14
14
  variants: {
15
15
  variant: {
16
16
  "solid": {
17
- root: "color-ui-c1 bg-solid-ui-fill",
17
+ root: "color-ui-cx bg-ui-fill",
18
18
  close: "ui-base-inverted"
19
19
  },
20
20
  "outline": {
21
- root: "color-ui-content bg-solid-ui-c1 ring ring-inset ring-ui-fill"
21
+ root: "color-ui-content bg-ui-cx ring ring-inset ring-ui-fill/30"
22
22
  },
23
23
  "soft": {
24
- root: "color-ui-content bg-solid-ui-fill/10"
24
+ root: "color-ui-content bg-soft-ui-fill/10"
25
25
  },
26
26
  "soft-outline": {
27
- root: "color-ui-content bg-solid-ui-fill/10 ring ring-inset ring-ui-fill/40"
27
+ root: "color-ui-content bg-soft-ui-fill/10 ring ring-inset ring-ui-fill/30"
28
28
  }
29
29
  },
30
30
  orientation: {
@@ -4,12 +4,15 @@ declare const _default: {
4
4
  loading: string;
5
5
  check: string;
6
6
  indeterminate: string;
7
- down: string;
8
- arrowLeft: string;
9
- arrowRight: string;
10
- doubleLeft: string;
11
- doubleRight: string;
7
+ chevronUp: string;
8
+ chevronDown: string;
9
+ chevronLeft: string;
10
+ chevronRight: string;
11
+ chevronDoubleLeft: string;
12
+ chevronDoubleRight: string;
12
13
  ellipsis: string;
14
+ plus: string;
15
+ minus: string;
13
16
  };
14
17
  };
15
18
  export default _default;
@@ -0,0 +1,18 @@
1
+ export default {
2
+ /* @unocss-include */
3
+ icons: {
4
+ close: "i-mdi-close",
5
+ loading: "i-mdi-loading",
6
+ check: "i-mdi-check-bold",
7
+ indeterminate: "i-mdi-minus-thick",
8
+ chevronUp: "i-mdi-chevron-up",
9
+ chevronDown: "i-mdi-chevron-down",
10
+ chevronLeft: "i-mdi-chevron-left",
11
+ chevronRight: "i-mdi-chevron-right",
12
+ chevronDoubleLeft: "i-mdi-chevron-double-left",
13
+ chevronDoubleRight: "i-mdi-chevron-double-right",
14
+ ellipsis: "i-mdi-dots-horizontal",
15
+ plus: "i-mdi-plus",
16
+ minus: "i-mdi-minus"
17
+ }
18
+ };
@@ -0,0 +1,52 @@
1
+ declare const _default: {
2
+ base: undefined;
3
+ slots: {
4
+ root: string;
5
+ base: string;
6
+ };
7
+ variants: {
8
+ size: {
9
+ xs: {
10
+ base: string;
11
+ };
12
+ sm: {
13
+ base: string;
14
+ };
15
+ md: {
16
+ base: string;
17
+ };
18
+ lg: {
19
+ base: string;
20
+ };
21
+ xl: {
22
+ base: string;
23
+ };
24
+ };
25
+ };
26
+ compoundVariants: import("@byyuurin/ui-kit").CVCompoundVariants<{
27
+ size: {
28
+ xs: {
29
+ base: string;
30
+ };
31
+ sm: {
32
+ base: string;
33
+ };
34
+ md: {
35
+ base: string;
36
+ };
37
+ lg: {
38
+ base: string;
39
+ };
40
+ xl: {
41
+ base: string;
42
+ };
43
+ };
44
+ }, {
45
+ root: string;
46
+ base: string;
47
+ }, undefined>;
48
+ defaultVariants: {
49
+ size: "md";
50
+ };
51
+ };
52
+ export default _default;
@@ -0,0 +1,32 @@
1
+ import { ct } from "@byyuurin/ui-kit";
2
+ export default ct(
3
+ /* @unocss-include */
4
+ {
5
+ slots: {
6
+ root: "inline-flex flex-row-reverse justify-end",
7
+ base: "relative rounded-full ring-ui-cx first:me-0"
8
+ },
9
+ variants: {
10
+ size: {
11
+ xs: {
12
+ base: "ring-1 -me-0.125em"
13
+ },
14
+ sm: {
15
+ base: "ring-2 -me-0.125em"
16
+ },
17
+ md: {
18
+ base: "ring-2 -me-0.25em"
19
+ },
20
+ lg: {
21
+ base: "ring-3 -me-0.5em"
22
+ },
23
+ xl: {
24
+ base: "ring-3 -me-0.5em"
25
+ }
26
+ }
27
+ },
28
+ defaultVariants: {
29
+ size: "md"
30
+ }
31
+ }
32
+ );