@byyuurin/ui 0.0.4 → 0.0.5

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 (94) hide show
  1. package/README.md +11 -22
  2. package/dist/index.d.ts +25 -2
  3. package/dist/index.mjs +25 -2
  4. package/dist/nuxt.d.mts +1 -1
  5. package/dist/nuxt.d.ts +1 -1
  6. package/dist/nuxt.mjs +14 -10
  7. package/dist/nuxt.mjs.map +1 -0
  8. package/dist/runtime/components/Accordion.vue +1 -1
  9. package/dist/runtime/components/Alert.vue +120 -0
  10. package/dist/runtime/components/Badge.vue +71 -0
  11. package/dist/runtime/components/Button.vue +3 -2
  12. package/dist/runtime/components/Card.vue +4 -4
  13. package/dist/runtime/components/Checkbox.vue +1 -1
  14. package/dist/runtime/components/Chip.vue +59 -0
  15. package/dist/runtime/components/Drawer.vue +2 -2
  16. package/dist/runtime/components/Input.vue +2 -1
  17. package/dist/runtime/components/Link.vue +1 -1
  18. package/dist/runtime/components/Modal.vue +2 -2
  19. package/dist/runtime/components/PinInput.vue +86 -0
  20. package/dist/runtime/components/Popover.vue +1 -1
  21. package/dist/runtime/components/RadioGroup.vue +1 -1
  22. package/dist/runtime/components/ScrollArea.vue +1 -1
  23. package/dist/runtime/components/Select.vue +2 -1
  24. package/dist/runtime/components/Slider.vue +97 -0
  25. package/dist/runtime/components/Switch.vue +1 -1
  26. package/dist/runtime/components/Tabs.vue +1 -1
  27. package/dist/runtime/components/Textarea.vue +2 -3
  28. package/dist/runtime/components/Toast.vue +1 -1
  29. package/dist/runtime/components/Toaster.vue +2 -1
  30. package/dist/runtime/components/Tooltip.vue +1 -1
  31. package/dist/runtime/theme/accordion.mjs +24 -21
  32. package/dist/runtime/theme/alert.d.ts +85 -0
  33. package/dist/runtime/theme/alert.mjs +47 -0
  34. package/dist/runtime/theme/app.mjs +1 -0
  35. package/dist/runtime/theme/badge.d.ts +79 -0
  36. package/dist/runtime/theme/badge.mjs +89 -0
  37. package/dist/runtime/theme/button.d.ts +4 -1
  38. package/dist/runtime/theme/button.mjs +131 -120
  39. package/dist/runtime/theme/card.d.ts +2 -2
  40. package/dist/runtime/theme/card.mjs +12 -9
  41. package/dist/runtime/theme/checkbox.mjs +45 -42
  42. package/dist/runtime/theme/chip.d.ts +56 -0
  43. package/dist/runtime/theme/chip.mjs +63 -0
  44. package/dist/runtime/theme/drawer.mjs +69 -66
  45. package/dist/runtime/theme/index.d.ts +5 -0
  46. package/dist/runtime/theme/index.mjs +5 -0
  47. package/dist/runtime/theme/input.d.ts +13 -5
  48. package/dist/runtime/theme/input.mjs +135 -122
  49. package/dist/runtime/theme/link.d.ts +1 -1
  50. package/dist/runtime/theme/link.mjs +23 -20
  51. package/dist/runtime/theme/modal.mjs +51 -48
  52. package/dist/runtime/theme/pinInput.d.ts +97 -0
  53. package/dist/runtime/theme/pinInput.mjs +108 -0
  54. package/dist/runtime/theme/popover.mjs +11 -8
  55. package/dist/runtime/theme/radioGroup.mjs +50 -47
  56. package/dist/runtime/theme/scrollArea.mjs +24 -21
  57. package/dist/runtime/theme/select.d.ts +5 -2
  58. package/dist/runtime/theme/select.mjs +156 -143
  59. package/dist/runtime/theme/slider.d.ts +73 -0
  60. package/dist/runtime/theme/slider.mjs +49 -0
  61. package/dist/runtime/theme/switch.mjs +66 -63
  62. package/dist/runtime/theme/tabs.d.ts +12 -2
  63. package/dist/runtime/theme/tabs.mjs +132 -113
  64. package/dist/runtime/theme/textarea.d.ts +5 -2
  65. package/dist/runtime/theme/textarea.mjs +103 -90
  66. package/dist/runtime/theme/toast.mjs +26 -23
  67. package/dist/runtime/theme/toaster.d.ts +2 -2
  68. package/dist/runtime/theme/toaster.mjs +84 -81
  69. package/dist/runtime/theme/tooltip.mjs +9 -6
  70. package/dist/runtime/types/components.d.ts +5 -0
  71. package/dist/runtime/types/index.d.ts +1 -3
  72. package/dist/runtime/utils/extend-theme.mjs +1 -1
  73. package/dist/runtime/utils/link.d.ts +1 -1
  74. package/dist/shared/ui.CzDyI29e.mjs +8 -0
  75. package/dist/shared/ui.CzDyI29e.mjs.map +1 -0
  76. package/dist/unocss-preset.mjs +44 -35
  77. package/dist/unocss-preset.mjs.map +1 -0
  78. package/dist/unplugin.d.mts +25 -0
  79. package/dist/unplugin.d.ts +25 -0
  80. package/dist/unplugin.mjs +64 -0
  81. package/dist/unplugin.mjs.map +1 -0
  82. package/dist/vite.d.mts +9 -0
  83. package/dist/vite.d.ts +9 -0
  84. package/dist/vite.mjs +14 -0
  85. package/dist/vite.mjs.map +1 -0
  86. package/package.json +17 -10
  87. package/dist/resolver.d.mts +0 -13
  88. package/dist/resolver.d.ts +0 -13
  89. package/dist/resolver.mjs +0 -21
  90. package/dist/runtime/components/index.d.ts +0 -20
  91. package/dist/runtime/components/index.mjs +0 -20
  92. package/dist/runtime/composables/index.d.ts +0 -5
  93. package/dist/runtime/composables/index.mjs +0 -5
  94. package/dist/shared/ui.Cmq14xN9.mjs +0 -25
@@ -0,0 +1,108 @@
1
+ import { ct } from "@byyuurin/ui-kit";
2
+ export default ct(
3
+ /* @unocss-include */
4
+ {
5
+ slots: {
6
+ root: "inline-flex items-center gap-x-2",
7
+ container: "rounded-ui-base border-0 transition-colors aria-disabled:opacity-50",
8
+ base: "w-full color-inherit bg-transparent text-center placeholder:color-ui-cb/50 focus:outline-none disabled:cursor-not-allowed"
9
+ },
10
+ variants: {
11
+ size: {
12
+ xs: {
13
+ container: "text-xs size-7"
14
+ },
15
+ sm: {
16
+ container: "text-sm size-8"
17
+ },
18
+ md: {
19
+ container: "text-base size-9"
20
+ },
21
+ lg: {
22
+ container: "text-lg size-12.5"
23
+ },
24
+ xl: {
25
+ container: "text-xl size-12.5"
26
+ }
27
+ },
28
+ variant: {
29
+ "outline": {
30
+ container: [
31
+ "color-ui-cb/80 bg-ui-c1 ring ring-inset ring-ui-cb/50",
32
+ "focus-within:ring-2 focus-within:ring-ui-cb/50",
33
+ "aria-disabled:ring-ui-cb/80 hover:aria-disabled:ring-ui-cb/80"
34
+ ]
35
+ },
36
+ "soft": {
37
+ container: [
38
+ "color-ui-cb/80 bg-ui-cb/4",
39
+ "hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
40
+ "aria-disabled:color-ui-content/80 aria-disabled:bg-ui-fill/5 hover:aria-disabled:color-ui-content/80 hover:aria-disabled:bg-ui-fill/5"
41
+ ]
42
+ },
43
+ "soft-outline": {
44
+ container: [
45
+ "color-ui-cb/80 bg-ui-cb/4 ring ring-inset ring-ui-cb/10",
46
+ "hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
47
+ "aria-disabled:color-ui-content/80 aria-disabled:bg-ui-fill/5 hover:aria-disabled:color-ui-content/80 hover:aria-disabled:bg-ui-fill/5"
48
+ ]
49
+ },
50
+ "ghost": {
51
+ container: [
52
+ "color-ui-cb/80 bg-transparent",
53
+ "hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
54
+ "aria-disabled:color-ui-fill/80 aria-disabled:bg-transparent hover:aria-disabled:color-ui-fill/80 hover:aria-disabled:bg-transparent"
55
+ ]
56
+ },
57
+ "none": {
58
+ container: "color-ui-cb bg-transparent"
59
+ }
60
+ },
61
+ underline: {
62
+ true: ""
63
+ },
64
+ highlight: {
65
+ true: ""
66
+ }
67
+ },
68
+ compoundVariants: [
69
+ {
70
+ variant: ["soft", "ghost", "none"],
71
+ highlight: false,
72
+ underline: true,
73
+ class: {
74
+ container: [
75
+ "relative after:content-empty after:absolute after:inset-x-0 after:bottom-0 after:h-1px after:bg-ui-cb/40",
76
+ "focus-within:after:h-2px focus-within:after:bg-ui-fill/60"
77
+ ]
78
+ }
79
+ },
80
+ {
81
+ size: ["xs", "sm", "md"],
82
+ class: {
83
+ base: "p-1.5"
84
+ }
85
+ },
86
+ {
87
+ size: ["lg", "xl"],
88
+ class: {
89
+ base: "p-2.5"
90
+ }
91
+ },
92
+ {
93
+ variant: ["soft", "soft-outline", "ghost", "none"],
94
+ highlight: true,
95
+ class: {
96
+ container: "ring ring-inset ring-ui-fill/80"
97
+ }
98
+ },
99
+ {
100
+ variant: ["outline"],
101
+ highlight: true,
102
+ class: {
103
+ container: "ring-2 ring-ui-fill/80 focus-within:ring-ui-fill/80"
104
+ }
105
+ }
106
+ ]
107
+ }
108
+ );
@@ -1,10 +1,13 @@
1
1
  import { ct } from "@byyuurin/ui-kit";
2
- export default ct({
3
- slots: {
4
- content: [
5
- "color-ui-base bg-ui-base shadow-lg rounded-ui-box ring ring-ui-base/10",
6
- "data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] focus:outline-none pointer-events-auto"
7
- ],
8
- arrow: "fill-ui-base stroke-ui-cb/10"
2
+ export default ct(
3
+ /* @unocss-include */
4
+ {
5
+ slots: {
6
+ content: [
7
+ "color-ui-base bg-ui-base shadow-lg rounded-ui-box ring ring-ui-base/10",
8
+ "data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] focus:outline-none pointer-events-auto"
9
+ ],
10
+ arrow: "fill-ui-base stroke-ui-cb/10"
11
+ }
9
12
  }
10
- });
13
+ );
@@ -1,55 +1,58 @@
1
1
  import { ct } from "@byyuurin/ui-kit";
2
- export default ct({
3
- slots: {
4
- root: "relative",
5
- fieldset: "flex flex-wrap gap-2 gap-x-4",
6
- legend: "mb-2 color-ui-cb",
7
- item: "flex items-start",
8
- base: "relative size-1.25em rounded-ui-radio ring ring-inset ring-ui-cb focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ui-cb transition data-[state=checked]:ring-ui-base",
9
- indicator: "absolute inset-0 scale-0 rounded-ui-radio bg-ui-fill transition data-[state=checked]:scale-66",
10
- container: "h-1.5em flex items-center",
11
- wrapper: "",
12
- label: "block ps-2 color-ui-cb",
13
- description: "ps-2 color-ui-cb/60"
14
- },
15
- variants: {
16
- orientation: {
17
- horizontal: {
18
- fieldset: "flex-row"
19
- },
20
- vertical: {
21
- fieldset: "flex-col"
22
- }
2
+ export default ct(
3
+ /* @unocss-include */
4
+ {
5
+ slots: {
6
+ root: "relative",
7
+ fieldset: "flex flex-wrap gap-2 gap-x-4",
8
+ legend: "mb-2 color-ui-cb",
9
+ item: "flex items-start",
10
+ base: "relative size-1.25em rounded-ui-radio ring ring-inset ring-ui-cb outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ui-cb/80 transition data-[state=checked]:ring-ui-base",
11
+ indicator: "absolute inset-0 scale-0 rounded-ui-radio bg-ui-fill transition data-[state=checked]:scale-66",
12
+ container: "h-1.5em flex items-center",
13
+ wrapper: "",
14
+ label: "block ps-2 color-ui-cb",
15
+ description: "ps-2 color-ui-cb/60"
23
16
  },
24
- size: {
25
- xs: {
26
- root: "text-xs"
27
- },
28
- sm: {
29
- root: "text-sm"
30
- },
31
- md: {
32
- root: "text-base"
17
+ variants: {
18
+ orientation: {
19
+ horizontal: {
20
+ fieldset: "flex-row"
21
+ },
22
+ vertical: {
23
+ fieldset: "flex-col"
24
+ }
33
25
  },
34
- lg: {
35
- root: "text-lg"
26
+ size: {
27
+ xs: {
28
+ root: "text-xs"
29
+ },
30
+ sm: {
31
+ root: "text-sm"
32
+ },
33
+ md: {
34
+ root: "text-base"
35
+ },
36
+ lg: {
37
+ root: "text-lg"
38
+ },
39
+ xl: {
40
+ root: "text-xl"
41
+ }
36
42
  },
37
- xl: {
38
- root: "text-xl"
39
- }
40
- },
41
- disabled: {
42
- true: {
43
- root: "opacity-50 after:content-empty after:absolute after:inset-0 after:cursor-not-allowed"
43
+ disabled: {
44
+ true: {
45
+ root: "opacity-50 after:content-empty after:absolute after:inset-0 after:cursor-not-allowed"
46
+ },
47
+ false: {
48
+ label: "cursor-pointer"
49
+ }
44
50
  },
45
- false: {
46
- label: "cursor-pointer"
47
- }
48
- },
49
- required: {
50
- true: {
51
- legend: "after:content-['*'] after:ms-0.5"
51
+ required: {
52
+ true: {
53
+ legend: "after:content-['*'] after:ms-0.5"
54
+ }
52
55
  }
53
56
  }
54
57
  }
55
- });
58
+ );
@@ -6,25 +6,28 @@ export const transitionProps = {
6
6
  leaveActiveClass: "transition",
7
7
  moveClass: "transition"
8
8
  };
9
- export default ct({
10
- slots: {
11
- /** Contains all the parts of a scroll area. */
12
- root: "relative overflow-hidden shadow-sm shadow-ui-cb/10 bg-ui-c1 border border-ui-cb/10 rounded-ui-base",
13
- /** The viewport area of the scroll area. */
14
- viewport: "size-full rounded-ui-base",
15
- /** The vertical and horizontal scrollbar. */
16
- scrollbar: [
17
- "flex select-none touch-none p-0.5 duration-160 ease-out",
18
- "data-[orientation=vertical]:w-2.5 data-[orientation=vertical]:my-[calc(var(--ui-radius-box)+0.25rem)]",
19
- "data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:h-2.5 data-[orientation=horizontal]:mx-[calc(var(--ui-radius-box)+0.25rem)]"
20
- ],
21
- /** The thumb to be used in `ScrollAreaScrollbar`. */
22
- thumb: [
23
- "relative flex-1 bg-ui-cb/20 rounded-ui-base cursor-pointer transition-colors",
24
- "hover:bg-ui-cb/30 active:bg-ui-cb/40",
25
- "before:content-empty before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:w-full before:h-full before:min-w-10 before:min-h-10 "
26
- ],
27
- /** The corner where both vertical and horizontal scrollbars meet. */
28
- corner: ""
9
+ export default ct(
10
+ /* @unocss-include */
11
+ {
12
+ slots: {
13
+ /** Contains all the parts of a scroll area. */
14
+ root: "relative overflow-hidden",
15
+ /** The viewport area of the scroll area. */
16
+ viewport: "size-full rounded-ui-base outline-none",
17
+ /** The vertical and horizontal scrollbar. */
18
+ scrollbar: [
19
+ "flex select-none touch-none p-0.5 duration-160 ease-out",
20
+ "data-[orientation=vertical]:w-2.5 data-[orientation=vertical]:my-[calc(var(--ui-radius-box)+0.25rem)]",
21
+ "data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:h-2.5 data-[orientation=horizontal]:mx-[calc(var(--ui-radius-box)+0.25rem)]"
22
+ ],
23
+ /** The thumb to be used in `ScrollAreaScrollbar`. */
24
+ thumb: [
25
+ "relative flex-1 bg-ui-cb/20 rounded-ui-base cursor-pointer transition-colors",
26
+ "hover:bg-ui-cb/30 active:bg-ui-cb/40",
27
+ "before:content-empty before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:w-full before:h-full before:min-w-10 before:min-h-10 "
28
+ ],
29
+ /** The corner where both vertical and horizontal scrollbars meet. */
30
+ corner: ""
31
+ }
29
32
  }
30
- });
33
+ );
@@ -29,6 +29,9 @@ declare const _default: {
29
29
  soft: {
30
30
  base: string[];
31
31
  };
32
+ 'soft-outline': {
33
+ base: string[];
34
+ };
32
35
  ghost: {
33
36
  base: string[];
34
37
  };
@@ -79,7 +82,7 @@ declare const _default: {
79
82
  highlight: false;
80
83
  underline: true;
81
84
  class: {
82
- base: string;
85
+ base: string[];
83
86
  item?: undefined;
84
87
  prefixIcon?: undefined;
85
88
  suffixIcon?: undefined;
@@ -117,7 +120,7 @@ declare const _default: {
117
120
  prefix?: undefined;
118
121
  suffix?: undefined;
119
122
  } | {
120
- variant: ("soft" | "ghost" | "none")[];
123
+ variant: ("soft" | "soft-outline" | "ghost" | "none")[];
121
124
  highlight: true;
122
125
  class: {
123
126
  base: string;
@@ -1,154 +1,167 @@
1
1
  import { ct } from "@byyuurin/ui-kit";
2
- export default ct({
3
- slots: {
4
- base: [
5
- "bg-ui-c1 relative group rounded-ui-base inline-flex items-center gap-x-2 focus:outline-none transition-colors",
6
- "disabled:cursor-not-allowed disabled:opacity-50"
7
- ],
8
- value: "me-auto truncate pointer-events-none",
9
- placeholder: "me-auto truncate color-ui-cb/50",
10
- arrow: "fill-ui-c1 stroke-ui-cb/10",
11
- content: [
12
- "max-h-60 w-[var(--reka-popper-anchor-width)] bg-ui-c1 shadow-lg rounded-[calc(var(--ui-radius-tabs)*0.66)] ring ring-ui-cb/10 overflow-hidden pointer-events-auto",
13
- "data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]"
14
- ],
15
- viewport: "divide-y divide-ui-cb/10 scroll-py-1",
16
- group: "p-1 isolate",
17
- empty: "py-2 text-center text-sm color-ui-cb/50",
18
- label: "font-semibold color-ui-cb cursor-pointer",
19
- separator: "-mx-1 my-1 h-px bg-ui-cb/10",
20
- item: [
21
- "group relative w-full flex gap-2 items-center select-none outline-none color-ui-cb/50 transition-colors cursor-pointer",
22
- "aria-disabled:cursor-not-allowed aria-disabled:opacity-50",
23
- "before:content-empty before:absolute before:z-[-1] before:inset-px before:rounded-ui-base before:transition-colors",
24
- "data-[highlighted]:color-ui-cb data-[highlighted]:before:bg-ui-cb/3",
25
- "data-[state=checked]:color-ui-base"
26
- ],
27
- itemPrefixIcon: "shrink-0 color-ui-cb/80 group-data-[highlighted]:color-ui-cb/80 transition-colors",
28
- itemSuffix: "ms-auto inline-flex gap-1.5 items-center",
29
- itemSuffixIcon: "shrink-0",
30
- itemLabel: "truncate",
31
- prefix: "flex items-center",
32
- prefixIcon: "shrink-0 size-1.25em",
33
- suffix: "flex items-center",
34
- suffixIcon: "shrink-0 size-1.25em"
35
- },
36
- variants: {
37
- variant: {
38
- outline: {
39
- base: [
40
- "color-ui-cb/80 bg-ui-c1 ring ring-inset ring-ui-cb/50",
41
- "focus-within:ring-2 focus-within:ring-ui-cb/50",
42
- "disabled:ring-ui-cb/80 hover:disabled:ring-ui-cb/80"
43
- ]
2
+ export default ct(
3
+ /* @unocss-include */
4
+ {
5
+ slots: {
6
+ base: [
7
+ "bg-ui-c1 relative group rounded-ui-base inline-flex items-center gap-x-2 focus:outline-none transition-colors",
8
+ "disabled:cursor-not-allowed disabled:opacity-50"
9
+ ],
10
+ value: "me-auto truncate pointer-events-none",
11
+ placeholder: "me-auto truncate color-ui-cb/50",
12
+ arrow: "fill-ui-c1 stroke-ui-cb/10",
13
+ content: [
14
+ "max-h-60 w-[var(--reka-popper-anchor-width)] bg-ui-c1 shadow-lg rounded-[calc(var(--ui-radius-tabs)*0.66)] ring ring-ui-cb/10 overflow-hidden pointer-events-auto",
15
+ "data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]"
16
+ ],
17
+ viewport: "divide-y divide-ui-cb/10 scroll-py-1",
18
+ group: "p-1 isolate",
19
+ empty: "py-2 text-center text-sm color-ui-cb/50",
20
+ label: "font-semibold color-ui-cb cursor-pointer",
21
+ separator: "-mx-1 my-1 h-px bg-ui-cb/10",
22
+ item: [
23
+ "group relative w-full flex gap-2 items-center select-none outline-none color-ui-cb/50 transition-colors cursor-pointer",
24
+ "aria-disabled:cursor-not-allowed aria-disabled:opacity-50",
25
+ "before:content-empty before:absolute before:z-[-1] before:inset-px before:rounded-ui-base before:transition-colors",
26
+ "data-[highlighted]:color-ui-cb data-[highlighted]:before:bg-ui-cb/3",
27
+ "data-[state=checked]:color-ui-base"
28
+ ],
29
+ itemPrefixIcon: "shrink-0 color-ui-cb/80 group-data-[highlighted]:color-ui-cb/80 transition-colors",
30
+ itemSuffix: "ms-auto inline-flex gap-1.5 items-center",
31
+ itemSuffixIcon: "shrink-0",
32
+ itemLabel: "truncate",
33
+ prefix: "flex items-center",
34
+ prefixIcon: "shrink-0 size-1.25em",
35
+ suffix: "flex items-center",
36
+ suffixIcon: "shrink-0 size-1.25em"
37
+ },
38
+ variants: {
39
+ variant: {
40
+ "outline": {
41
+ base: [
42
+ "color-ui-cb/80 bg-ui-c1 ring ring-inset ring-ui-cb/50",
43
+ "focus-within:ring-2 focus-within:ring-ui-cb/50",
44
+ "disabled:ring-ui-cb/80 hover:disabled:ring-ui-cb/80"
45
+ ]
46
+ },
47
+ "soft": {
48
+ base: [
49
+ "color-ui-cb/80 bg-ui-cb/4",
50
+ "hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
51
+ "disabled:color-ui-content/80 disabled:bg-ui-fill/5 hover:disabled:color-ui-content/80 hover:disabled:bg-ui-fill/5"
52
+ ]
53
+ },
54
+ "soft-outline": {
55
+ base: [
56
+ "color-ui-cb/80 bg-ui-cb/4 ring ring-inset ring-ui-cb/10",
57
+ "hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
58
+ "disabled:color-ui-content/80 disabled:bg-ui-fill/5 hover:disabled:color-ui-content/80 hover:disabled:bg-ui-fill/5"
59
+ ]
60
+ },
61
+ "ghost": {
62
+ base: [
63
+ "color-ui-cb/80 bg-transparent",
64
+ "hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
65
+ "disabled:color-ui-fill/80 disabled:bg-transparent hover:disabled:color-ui-fill/80 hover:disabled:bg-transparent"
66
+ ]
67
+ },
68
+ "none": {
69
+ base: "color-ui-cb bg-transparent"
70
+ }
71
+ },
72
+ size: {
73
+ xs: {
74
+ base: "text-xs",
75
+ item: "text-xs"
76
+ },
77
+ sm: {
78
+ base: "text-sm",
79
+ item: "text-sm"
80
+ },
81
+ md: {
82
+ base: "text-base",
83
+ item: "text-base"
84
+ },
85
+ lg: {
86
+ base: "text-lg",
87
+ item: "text-lg"
88
+ },
89
+ xl: {
90
+ base: "text-xl",
91
+ item: "text-xl"
92
+ }
93
+ },
94
+ prefix: {
95
+ true: ""
44
96
  },
45
- soft: {
46
- base: [
47
- "color-ui-cb/80 bg-ui-cb/4",
48
- "hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
49
- "disabled:color-ui-content/80 disabled:bg-ui-fill/5 hover:disabled:color-ui-content/80 hover:disabled:bg-ui-fill/5"
50
- ]
97
+ suffix: {
98
+ true: ""
51
99
  },
52
- ghost: {
53
- base: [
54
- "color-ui-cb/80 bg-transparent",
55
- "hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
56
- "disabled:color-ui-fill/80 disabled:bg-transparent hover:disabled:color-ui-fill/80 hover:disabled:bg-transparent"
57
- ]
100
+ loading: {
101
+ true: ""
58
102
  },
59
- none: {
60
- base: "color-ui-cb bg-transparent"
103
+ underline: {
104
+ true: ""
105
+ },
106
+ highlight: {
107
+ true: ""
61
108
  }
62
109
  },
63
- size: {
64
- xs: {
65
- base: "text-xs",
66
- item: "text-xs"
110
+ compoundVariants: [
111
+ {
112
+ variant: ["soft", "ghost", "none"],
113
+ highlight: false,
114
+ underline: true,
115
+ class: {
116
+ base: [
117
+ "relative after:content-empty after:absolute after:inset-x-0 after:bottom-0 after:h-1px after:bg-ui-cb/40",
118
+ "data-[state=open]:after:h-2px data-[state=open]:after:bg-ui-fill/60"
119
+ ]
120
+ }
67
121
  },
68
- sm: {
69
- base: "text-sm",
70
- item: "text-sm"
122
+ {
123
+ size: ["xs", "sm", "md"],
124
+ class: {
125
+ base: "p-1.5 px-2.5",
126
+ item: "p-1.5 px-2.5"
127
+ }
71
128
  },
72
- md: {
73
- base: "text-base",
74
- item: "text-base"
129
+ {
130
+ size: ["lg", "xl"],
131
+ class: {
132
+ base: "p-2.5 px-3.5",
133
+ item: "p-2.5 px-3.5"
134
+ }
75
135
  },
76
- lg: {
77
- base: "text-lg",
78
- item: "text-lg"
136
+ {
137
+ variant: ["soft", "soft-outline", "ghost", "none"],
138
+ highlight: true,
139
+ class: {
140
+ base: "ring ring-inset ring-ui-fill/80"
141
+ }
79
142
  },
80
- xl: {
81
- base: "text-xl",
82
- item: "text-xl"
83
- }
84
- },
85
- prefix: {
86
- true: ""
87
- },
88
- suffix: {
89
- true: ""
90
- },
91
- loading: {
92
- true: ""
93
- },
94
- underline: {
95
- true: ""
96
- },
97
- highlight: {
98
- true: ""
99
- }
100
- },
101
- compoundVariants: [
102
- {
103
- variant: ["soft", "ghost", "none"],
104
- highlight: false,
105
- underline: true,
106
- class: {
107
- base: "relative after:content-empty after:absolute after:inset-x-0 after:bottom-0 after:h-1px after:bg-ui-cb/40"
108
- }
109
- },
110
- {
111
- size: ["xs", "sm", "md"],
112
- class: {
113
- base: "p-1.5 px-2.5",
114
- item: "p-1.5 px-2.5"
115
- }
116
- },
117
- {
118
- size: ["lg", "xl"],
119
- class: {
120
- base: "p-2.5 px-3.5",
121
- item: "p-2.5 px-3.5"
122
- }
123
- },
124
- {
125
- variant: ["soft", "ghost", "none"],
126
- highlight: true,
127
- class: {
128
- base: "ring ring-inset ring-ui-fill/80"
129
- }
130
- },
131
- {
132
- variant: ["outline"],
133
- highlight: true,
134
- class: {
135
- base: "ring-2 ring-ui-fill/80 focus-within:ring-ui-fill/80"
136
- }
137
- },
138
- {
139
- loading: true,
140
- prefix: true,
141
- class: {
142
- prefixIcon: "animate-spin"
143
- }
144
- },
145
- {
146
- loading: true,
147
- prefix: false,
148
- suffix: true,
149
- class: {
150
- suffixIcon: "animate-spin"
143
+ {
144
+ variant: ["outline"],
145
+ highlight: true,
146
+ class: {
147
+ base: "ring-2 ring-ui-fill/80 focus-within:ring-ui-fill/80"
148
+ }
149
+ },
150
+ {
151
+ loading: true,
152
+ prefix: true,
153
+ class: {
154
+ prefixIcon: "animate-spin"
155
+ }
156
+ },
157
+ {
158
+ loading: true,
159
+ prefix: false,
160
+ suffix: true,
161
+ class: {
162
+ suffixIcon: "animate-spin"
163
+ }
151
164
  }
152
- }
153
- ]
154
- });
165
+ ]
166
+ }
167
+ );