@byyuurin/ui 0.0.7 → 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 (121) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +5 -5
  3. package/dist/module.mjs.map +1 -1
  4. package/dist/runtime/app/injections.d.ts +16 -0
  5. package/dist/runtime/app/injections.js +31 -0
  6. package/dist/runtime/components/Accordion.vue +20 -20
  7. package/dist/runtime/components/Alert.vue +22 -15
  8. package/dist/runtime/components/App.vue +15 -15
  9. package/dist/runtime/components/Avatar.vue +73 -0
  10. package/dist/runtime/components/AvatarGroup.vue +90 -0
  11. package/dist/runtime/components/Badge.vue +15 -10
  12. package/dist/runtime/components/Breadcrumb.vue +105 -0
  13. package/dist/runtime/components/Button.vue +13 -13
  14. package/dist/runtime/components/ButtonGroup.vue +12 -10
  15. package/dist/runtime/components/Card.vue +7 -2
  16. package/dist/runtime/components/Carousel.vue +19 -12
  17. package/dist/runtime/components/Checkbox.vue +13 -9
  18. package/dist/runtime/components/Chip.vue +17 -12
  19. package/dist/runtime/components/Collapsible.vue +3 -3
  20. package/dist/runtime/components/Drawer.vue +14 -15
  21. package/dist/runtime/components/Input.vue +24 -24
  22. package/dist/runtime/components/InputNumber.vue +7 -5
  23. package/dist/runtime/components/Kbd.vue +51 -0
  24. package/dist/runtime/components/Link.vue +10 -10
  25. package/dist/runtime/components/LinkBase.vue +1 -1
  26. package/dist/runtime/components/Modal.vue +11 -8
  27. package/dist/runtime/components/ModalProvider.vue +2 -1
  28. package/dist/runtime/components/Pagination.vue +30 -30
  29. package/dist/runtime/components/PinInput.vue +7 -7
  30. package/dist/runtime/components/Popover.vue +7 -7
  31. package/dist/runtime/components/Progress.vue +165 -0
  32. package/dist/runtime/components/RadioGroup.vue +33 -29
  33. package/dist/runtime/components/Select.vue +40 -40
  34. package/dist/runtime/components/Skeleton.vue +33 -0
  35. package/dist/runtime/components/Slider.vue +6 -6
  36. package/dist/runtime/components/Switch.vue +11 -12
  37. package/dist/runtime/components/Table.vue +19 -11
  38. package/dist/runtime/components/Tabs.vue +22 -18
  39. package/dist/runtime/components/Textarea.vue +11 -11
  40. package/dist/runtime/components/Toast.vue +14 -13
  41. package/dist/runtime/components/Toaster.vue +4 -4
  42. package/dist/runtime/components/Tooltip.vue +7 -7
  43. package/dist/runtime/composables/useAvatarGroup.d.ts +4 -0
  44. package/dist/runtime/composables/useAvatarGroup.js +8 -0
  45. package/dist/runtime/composables/useButtonGroup.d.ts +4 -12
  46. package/dist/runtime/composables/useButtonGroup.js +1 -6
  47. package/dist/runtime/composables/useComponentIcons.d.ts +9 -9
  48. package/dist/runtime/composables/useComponentIcons.js +11 -11
  49. package/dist/runtime/composables/useKbd.d.ts +35 -0
  50. package/dist/runtime/composables/useKbd.js +49 -0
  51. package/dist/runtime/composables/useLocale.d.ts +8 -0
  52. package/dist/runtime/composables/useLocale.js +22 -0
  53. package/dist/runtime/composables/useModal.d.ts +1 -6
  54. package/dist/runtime/composables/useModal.js +1 -6
  55. package/dist/runtime/composables/useTheme.d.ts +0 -4
  56. package/dist/runtime/composables/useTheme.js +2 -12
  57. package/dist/runtime/index.d.ts +6 -0
  58. package/dist/runtime/index.js +6 -0
  59. package/dist/runtime/locale/en.d.ts +2 -0
  60. package/dist/runtime/locale/en.js +28 -0
  61. package/dist/runtime/locale/index.d.ts +2 -0
  62. package/dist/runtime/locale/index.js +2 -0
  63. package/dist/runtime/locale/zh-tw.d.ts +2 -0
  64. package/dist/runtime/locale/zh-tw.js +28 -0
  65. package/dist/runtime/theme/accordion.d.ts +6 -6
  66. package/dist/runtime/theme/accordion.js +2 -2
  67. package/dist/runtime/theme/app.d.ts +6 -6
  68. package/dist/runtime/theme/app.js +7 -7
  69. package/dist/runtime/theme/avatar-group.d.ts +52 -0
  70. package/dist/runtime/theme/avatar-group.js +32 -0
  71. package/dist/runtime/theme/avatar.d.ts +56 -0
  72. package/dist/runtime/theme/avatar.js +34 -0
  73. package/dist/runtime/theme/breadcrumb.d.ts +67 -0
  74. package/dist/runtime/theme/breadcrumb.js +44 -0
  75. package/dist/runtime/theme/button.d.ts +8 -8
  76. package/dist/runtime/theme/button.js +9 -9
  77. package/dist/runtime/theme/chip.d.ts +4 -4
  78. package/dist/runtime/theme/chip.js +2 -2
  79. package/dist/runtime/theme/drawer.js +2 -2
  80. package/dist/runtime/theme/index.d.ts +6 -0
  81. package/dist/runtime/theme/index.js +6 -0
  82. package/dist/runtime/theme/input-number.d.ts +6 -0
  83. package/dist/runtime/theme/input-number.js +5 -2
  84. package/dist/runtime/theme/input.d.ts +12 -12
  85. package/dist/runtime/theme/input.js +12 -12
  86. package/dist/runtime/theme/kbd.d.ts +39 -0
  87. package/dist/runtime/theme/kbd.js +26 -0
  88. package/dist/runtime/theme/modal.js +2 -2
  89. package/dist/runtime/theme/popover.js +1 -1
  90. package/dist/runtime/theme/progress.d.ts +122 -0
  91. package/dist/runtime/theme/progress.js +95 -0
  92. package/dist/runtime/theme/select.d.ts +18 -18
  93. package/dist/runtime/theme/select.js +16 -16
  94. package/dist/runtime/theme/skeleton.d.ts +8 -0
  95. package/dist/runtime/theme/skeleton.js +7 -0
  96. package/dist/runtime/theme/switch.js +1 -1
  97. package/dist/runtime/theme/tabs.d.ts +2 -2
  98. package/dist/runtime/theme/tabs.js +1 -1
  99. package/dist/runtime/theme/toast.js +2 -2
  100. package/dist/runtime/theme/tooltip.js +1 -1
  101. package/dist/runtime/types/components.d.ts +6 -0
  102. package/dist/runtime/types/index.d.ts +1 -0
  103. package/dist/runtime/types/index.js +1 -0
  104. package/dist/runtime/types/locale.d.ts +23 -0
  105. package/dist/runtime/types/locale.js +0 -0
  106. package/dist/runtime/types/utils.d.ts +1 -1
  107. package/dist/runtime/utils/index.d.ts +6 -1
  108. package/dist/runtime/utils/index.js +6 -4
  109. package/dist/runtime/utils/link.d.ts +1 -1
  110. package/dist/runtime/utils/translator.d.ts +18 -0
  111. package/dist/runtime/utils/translator.js +8 -0
  112. package/dist/shared/ui.ba24b380.mjs +4 -0
  113. package/dist/shared/ui.ba24b380.mjs.map +1 -0
  114. package/dist/unplugin.mjs +3 -12
  115. package/dist/unplugin.mjs.map +1 -1
  116. package/dist/vite.mjs +1 -1
  117. package/package.json +24 -13
  118. package/dist/shared/ui.d1728164.mjs +0 -4
  119. package/dist/shared/ui.d1728164.mjs.map +0 -1
  120. /package/dist/runtime/{composables/defineInjection.d.ts → utils/vue.d.ts} +0 -0
  121. /package/dist/runtime/{composables/defineInjection.js → utils/vue.js} +0 -0
@@ -1,23 +1,13 @@
1
1
  import { transformUnoRules } from "@byyuurin/ui/unocss";
2
2
  import { createSharedComposable } from "@vueuse/core";
3
3
  import { computed, toValue } from "vue";
4
+ import { injectThemeExtension, injectUnoConfig } from "../app/injections.js";
4
5
  import * as theme from "../theme/index.js";
5
6
  import { extendTheme, prepareStyler } from "../utils/index.js";
6
- import { defineInjection } from "./defineInjection.js";
7
- export const {
8
- InjectionKey: InjectionKeyThemeExtension,
9
- provide: provideThemeExtension,
10
- inject: injectThemeExtension
11
- } = defineInjection("ui.themeExtension", {});
12
- export const {
13
- InjectionKey: InjectionKeyUnoConfig,
14
- provide: provideUnoConfig,
15
- inject: injectUnoConfig
16
- } = defineInjection("ui.unoConfig", {});
17
7
  export const useTheme = createSharedComposable(() => {
18
8
  const themeExtension = injectThemeExtension();
19
9
  const unoConfig = injectUnoConfig();
20
- const mergeRules = transformUnoRules(unoConfig);
10
+ const mergeRules = transformUnoRules(toValue(unoConfig));
21
11
  const { createStyler } = prepareStyler(mergeRules);
22
12
  return {
23
13
  theme: computed(() => extendTheme(toValue(themeExtension), theme)),
@@ -1,7 +1,10 @@
1
1
  export { default as Accordion } from './components/Accordion.vue.js';
2
2
  export { default as Alert } from './components/Alert.vue.js';
3
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';
4
6
  export { default as Badge } from './components/Badge.vue.js';
7
+ export { default as Breadcrumb } from './components/Breadcrumb.vue.js';
5
8
  export { default as Button } from './components/Button.vue.js';
6
9
  export { default as ButtonGroup } from './components/ButtonGroup.vue.js';
7
10
  export { default as Card } from './components/Card.vue.js';
@@ -12,6 +15,7 @@ export { default as Collapsible } from './components/Collapsible.vue.js';
12
15
  export { default as Drawer } from './components/Drawer.vue.js';
13
16
  export { default as Input } from './components/Input.vue.js';
14
17
  export { default as InputNumber } from './components/InputNumber.vue.js';
18
+ export { default as Kbd } from './components/Kbd.vue.js';
15
19
  export { default as Link } from './components/Link.vue.js';
16
20
  export { default as LinkBase } from './components/LinkBase.vue.js';
17
21
  export { default as Modal } from './components/Modal.vue.js';
@@ -19,10 +23,12 @@ export { default as ModalProvider } from './components/ModalProvider.vue.js';
19
23
  export { default as Pagination } from './components/Pagination.vue.js';
20
24
  export { default as PinInput } from './components/PinInput.vue.js';
21
25
  export { default as Popover } from './components/Popover.vue.js';
26
+ export { default as Progress } from './components/Progress.vue.js';
22
27
  export { default as RadioGroup } from './components/RadioGroup.vue.js';
23
28
  export { default as ScrollArea } from './components/ScrollArea.vue.js';
24
29
  export { default as Select } from './components/Select.vue.js';
25
30
  export { default as Separator } from './components/Separator.vue.js';
31
+ export { default as Skeleton } from './components/Skeleton.vue.js';
26
32
  export { default as Slider } from './components/Slider.vue.js';
27
33
  export { default as Switch } from './components/Switch.vue.js';
28
34
  export { default as Table } from './components/Table.vue.js';
@@ -1,7 +1,10 @@
1
1
  export { default as Accordion } from "./components/Accordion.vue";
2
2
  export { default as Alert } from "./components/Alert.vue";
3
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";
4
6
  export { default as Badge } from "./components/Badge.vue";
7
+ export { default as Breadcrumb } from "./components/Breadcrumb.vue";
5
8
  export { default as Button } from "./components/Button.vue";
6
9
  export { default as ButtonGroup } from "./components/ButtonGroup.vue";
7
10
  export { default as Card } from "./components/Card.vue";
@@ -12,6 +15,7 @@ export { default as Collapsible } from "./components/Collapsible.vue";
12
15
  export { default as Drawer } from "./components/Drawer.vue";
13
16
  export { default as Input } from "./components/Input.vue";
14
17
  export { default as InputNumber } from "./components/InputNumber.vue";
18
+ export { default as Kbd } from "./components/Kbd.vue";
15
19
  export { default as Link } from "./components/Link.vue";
16
20
  export { default as LinkBase } from "./components/LinkBase.vue";
17
21
  export { default as Modal } from "./components/Modal.vue";
@@ -19,10 +23,12 @@ export { default as ModalProvider } from "./components/ModalProvider.vue";
19
23
  export { default as Pagination } from "./components/Pagination.vue";
20
24
  export { default as PinInput } from "./components/PinInput.vue";
21
25
  export { default as Popover } from "./components/Popover.vue";
26
+ export { default as Progress } from "./components/Progress.vue";
22
27
  export { default as RadioGroup } from "./components/RadioGroup.vue";
23
28
  export { default as ScrollArea } from "./components/ScrollArea.vue";
24
29
  export { default as Select } from "./components/Select.vue";
25
30
  export { default as Separator } from "./components/Separator.vue";
31
+ export { default as Skeleton } from "./components/Skeleton.vue";
26
32
  export { default as Slider } from "./components/Slider.vue";
27
33
  export { default as Switch } from "./components/Switch.vue";
28
34
  export { default as Table } from "./components/Table.vue";
@@ -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,8 +7,8 @@ declare const _default: {
7
7
  trigger: string;
8
8
  content: string[];
9
9
  body: string;
10
- prefixIcon: string;
11
- suffixIcon: string;
10
+ leadingIcon: string;
11
+ trailingIcon: string;
12
12
  label: string;
13
13
  };
14
14
  variants: {
@@ -31,8 +31,8 @@ declare const _default: {
31
31
  trigger: string;
32
32
  content: string[];
33
33
  body: string;
34
- prefixIcon: string;
35
- suffixIcon: string;
34
+ leadingIcon: string;
35
+ trailingIcon: string;
36
36
  label: string;
37
37
  }, undefined>;
38
38
  defaultVariants: import("@byyuurin/ui-kit").CVDefaultVariants<{
@@ -48,8 +48,8 @@ declare const _default: {
48
48
  trigger: string;
49
49
  content: string[];
50
50
  body: string;
51
- prefixIcon: string;
52
- suffixIcon: string;
51
+ leadingIcon: string;
52
+ trailingIcon: string;
53
53
  label: string;
54
54
  }>;
55
55
  };
@@ -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
- prefixIcon: "shrink-0 size-5",
17
- suffixIcon: "shrink-0 size-5 ms-auto group-data-[state=open]:rotate-180 transition-all 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: {
@@ -4,12 +4,12 @@ declare const _default: {
4
4
  loading: string;
5
5
  check: string;
6
6
  indeterminate: string;
7
- up: string;
8
- down: string;
9
- arrowLeft: string;
10
- arrowRight: string;
11
- doubleLeft: string;
12
- doubleRight: string;
7
+ chevronUp: string;
8
+ chevronDown: string;
9
+ chevronLeft: string;
10
+ chevronRight: string;
11
+ chevronDoubleLeft: string;
12
+ chevronDoubleRight: string;
13
13
  ellipsis: string;
14
14
  plus: string;
15
15
  minus: string;
@@ -1,16 +1,16 @@
1
1
  export default {
2
2
  /* @unocss-include */
3
3
  icons: {
4
- close: "i-mdi-close-thick",
4
+ close: "i-mdi-close",
5
5
  loading: "i-mdi-loading",
6
6
  check: "i-mdi-check-bold",
7
7
  indeterminate: "i-mdi-minus-thick",
8
- up: "i-mdi-chevron-up",
9
- down: "i-mdi-chevron-down",
10
- arrowLeft: "i-mdi-chevron-left",
11
- arrowRight: "i-mdi-chevron-right",
12
- doubleLeft: "i-mdi-chevron-double-left",
13
- doubleRight: "i-mdi-chevron-double-right",
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
14
  ellipsis: "i-mdi-dots-horizontal",
15
15
  plus: "i-mdi-plus",
16
16
  minus: "i-mdi-minus"
@@ -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
+ );
@@ -0,0 +1,56 @@
1
+ declare const _default: {
2
+ base: undefined;
3
+ slots: {
4
+ root: string;
5
+ image: string;
6
+ fallback: string;
7
+ icon: string;
8
+ };
9
+ variants: {
10
+ size: {
11
+ xs: {
12
+ root: string;
13
+ };
14
+ sm: {
15
+ root: string;
16
+ };
17
+ md: {
18
+ root: string;
19
+ };
20
+ lg: {
21
+ root: string;
22
+ };
23
+ xl: {
24
+ root: string;
25
+ };
26
+ };
27
+ };
28
+ compoundVariants: import("@byyuurin/ui-kit").CVCompoundVariants<{
29
+ size: {
30
+ xs: {
31
+ root: string;
32
+ };
33
+ sm: {
34
+ root: string;
35
+ };
36
+ md: {
37
+ root: string;
38
+ };
39
+ lg: {
40
+ root: string;
41
+ };
42
+ xl: {
43
+ root: string;
44
+ };
45
+ };
46
+ }, {
47
+ root: string;
48
+ image: string;
49
+ fallback: string;
50
+ icon: string;
51
+ }, undefined>;
52
+ defaultVariants: {
53
+ size: "md";
54
+ };
55
+ };
56
+ export default _default;
@@ -0,0 +1,34 @@
1
+ import { ct } from "@byyuurin/ui-kit";
2
+ export default ct(
3
+ /* @unocss-include */
4
+ {
5
+ slots: {
6
+ root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-soft-ui-cb/10",
7
+ image: "size-full rounded-inherit object-cover",
8
+ fallback: "leading-none color-ui-cb/60 truncate",
9
+ icon: "size-3/4 color-ui-cb/60 shrink-0"
10
+ },
11
+ variants: {
12
+ size: {
13
+ xs: {
14
+ root: "text-xs size-1.4em"
15
+ },
16
+ sm: {
17
+ root: "text-sm size-1.6em"
18
+ },
19
+ md: {
20
+ root: "text-base size-2em"
21
+ },
22
+ lg: {
23
+ root: "text-lg size-2.4em"
24
+ },
25
+ xl: {
26
+ root: "text-xl size-3em"
27
+ }
28
+ }
29
+ },
30
+ defaultVariants: {
31
+ size: "md"
32
+ }
33
+ }
34
+ );
@@ -0,0 +1,67 @@
1
+ declare const _default: {
2
+ base: undefined;
3
+ slots: {
4
+ root: string;
5
+ list: string;
6
+ item: string;
7
+ link: string;
8
+ linkLeadingIcon: string;
9
+ linkLabel: string;
10
+ separator: string;
11
+ separatorIcon: string;
12
+ };
13
+ variants: {
14
+ active: {
15
+ true: {
16
+ link: string;
17
+ };
18
+ false: {
19
+ link: string;
20
+ };
21
+ };
22
+ disabled: {
23
+ true: {
24
+ link: string;
25
+ };
26
+ };
27
+ to: {
28
+ true: "";
29
+ };
30
+ };
31
+ compoundVariants: {
32
+ disabled: boolean;
33
+ active: boolean;
34
+ to: boolean;
35
+ class: {
36
+ link: string;
37
+ };
38
+ }[];
39
+ defaultVariants: import("@byyuurin/ui-kit").CVDefaultVariants<{
40
+ active: {
41
+ true: {
42
+ link: string;
43
+ };
44
+ false: {
45
+ link: string;
46
+ };
47
+ };
48
+ disabled: {
49
+ true: {
50
+ link: string;
51
+ };
52
+ };
53
+ to: {
54
+ true: "";
55
+ };
56
+ }, {
57
+ root: string;
58
+ list: string;
59
+ item: string;
60
+ link: string;
61
+ linkLeadingIcon: string;
62
+ linkLabel: string;
63
+ separator: string;
64
+ separatorIcon: string;
65
+ }>;
66
+ };
67
+ export default _default;
@@ -0,0 +1,44 @@
1
+ import { ct } from "@byyuurin/ui-kit";
2
+ export default ct(
3
+ /* @unocss-include */
4
+ {
5
+ slots: {
6
+ root: "relative min-w-0",
7
+ list: "flex items-center gap-1.5",
8
+ item: "flex min-w-0",
9
+ link: "group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-ui-cp",
10
+ linkLeadingIcon: "shrink-0 size-5",
11
+ linkLabel: "truncate",
12
+ separator: "flex",
13
+ separatorIcon: "shrink-0 size-5 color-ui-cb/60"
14
+ },
15
+ variants: {
16
+ active: {
17
+ true: {
18
+ link: "text-ui-cp font-semibold"
19
+ },
20
+ false: {
21
+ link: "color-ui-cb/60 font-medium"
22
+ }
23
+ },
24
+ disabled: {
25
+ true: {
26
+ link: "cursor-not-allowed opacity-50"
27
+ }
28
+ },
29
+ to: {
30
+ true: ""
31
+ }
32
+ },
33
+ compoundVariants: [
34
+ {
35
+ disabled: false,
36
+ active: false,
37
+ to: true,
38
+ class: {
39
+ link: "hover:color-ui-cb/80 transition-colors"
40
+ }
41
+ }
42
+ ]
43
+ }
44
+ );
@@ -3,8 +3,8 @@ declare const _default: {
3
3
  slots: {
4
4
  base: string[];
5
5
  label: string;
6
- prefixIcon: string;
7
- suffixIcon: string;
6
+ leadingIcon: string;
7
+ trailingIcon: string;
8
8
  };
9
9
  variants: {
10
10
  variant: {
@@ -47,10 +47,10 @@ declare const _default: {
47
47
  active: {
48
48
  true: "";
49
49
  };
50
- prefix: {
50
+ leading: {
51
51
  true: "";
52
52
  };
53
- suffix: {
53
+ trailing: {
54
54
  true: "";
55
55
  };
56
56
  loading: {
@@ -106,10 +106,10 @@ declare const _default: {
106
106
  active: {
107
107
  true: "";
108
108
  };
109
- prefix: {
109
+ leading: {
110
110
  true: "";
111
111
  };
112
- suffix: {
112
+ trailing: {
113
113
  true: "";
114
114
  };
115
115
  loading: {
@@ -126,8 +126,8 @@ declare const _default: {
126
126
  }, {
127
127
  base: string[];
128
128
  label: string;
129
- prefixIcon: string;
130
- suffixIcon: string;
129
+ leadingIcon: string;
130
+ trailingIcon: string;
131
131
  }, undefined>;
132
132
  defaultVariants: {
133
133
  size: "md";
@@ -10,8 +10,8 @@ export default ct(
10
10
  "disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:opacity-50"
11
11
  ],
12
12
  label: "color-inherit",
13
- prefixIcon: "shrink-0 size-1.5em not-only-child:ml-0.5",
14
- suffixIcon: "shrink-0 size-1.5em not-only-child:mr-0.5"
13
+ leadingIcon: "shrink-0 size-1.5em not-only-child:ml-0.5",
14
+ trailingIcon: "shrink-0 size-1.5em not-only-child:mr-0.5"
15
15
  },
16
16
  variants: {
17
17
  ...buttonGroupVariant,
@@ -85,10 +85,10 @@ export default ct(
85
85
  active: {
86
86
  true: ""
87
87
  },
88
- prefix: {
88
+ leading: {
89
89
  true: ""
90
90
  },
91
- suffix: {
91
+ trailing: {
92
92
  true: ""
93
93
  },
94
94
  loading: {
@@ -147,14 +147,14 @@ export default ct(
147
147
  },
148
148
  {
149
149
  loading: true,
150
- prefix: true,
151
- class: { prefixIcon: "animate-spin" }
150
+ leading: true,
151
+ class: { leadingIcon: "animate-spin" }
152
152
  },
153
153
  {
154
154
  loading: true,
155
- prefix: false,
156
- suffix: true,
157
- class: { suffixIcon: "animate-spin" }
155
+ leading: false,
156
+ trailing: true,
157
+ class: { trailingIcon: "animate-spin" }
158
158
  }
159
159
  ],
160
160
  defaultVariants: {
@@ -3,8 +3,8 @@ declare const _default: {
3
3
  slots: {
4
4
  base: string;
5
5
  label: string;
6
- prefixIcon: string;
7
- suffixIcon: string;
6
+ leadingIcon: string;
7
+ trailingIcon: string;
8
8
  };
9
9
  variants: {
10
10
  variant: {
@@ -90,8 +90,8 @@ declare const _default: {
90
90
  }, {
91
91
  base: string;
92
92
  label: string;
93
- prefixIcon: string;
94
- suffixIcon: string;
93
+ leadingIcon: string;
94
+ trailingIcon: string;
95
95
  }, undefined>;
96
96
  defaultVariants: {
97
97
  size: "md";
@@ -6,8 +6,8 @@ export default ct(
6
6
  slots: {
7
7
  base: "inline-flex items-center rounded-ui-base leading-normal transition-colors",
8
8
  label: "",
9
- prefixIcon: "shrink-0 size-1.5em not-only-child:ml-1.5",
10
- suffixIcon: "shrink-0 size-1.5em not-only-child:mr-1.5"
9
+ leadingIcon: "shrink-0 size-1.5em not-only-child:ml-1.5",
10
+ trailingIcon: "shrink-0 size-1.5em not-only-child:mr-1.5"
11
11
  },
12
12
  variants: {
13
13
  ...buttonGroupVariant,