@byyuurin/ui 0.0.3 → 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 (142) hide show
  1. package/README.md +15 -24
  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/App.vue +5 -1
  11. package/dist/runtime/components/Badge.vue +71 -0
  12. package/dist/runtime/components/Button.vue +3 -3
  13. package/dist/runtime/components/Card.vue +4 -4
  14. package/dist/runtime/components/Checkbox.vue +3 -6
  15. package/dist/runtime/components/Chip.vue +59 -0
  16. package/dist/runtime/components/Drawer.vue +2 -2
  17. package/dist/runtime/components/Input.vue +7 -2
  18. package/dist/runtime/components/Link.vue +1 -1
  19. package/dist/runtime/components/Modal.vue +2 -2
  20. package/dist/runtime/components/ModalProvider.vue +1 -1
  21. package/dist/runtime/components/PinInput.vue +86 -0
  22. package/dist/runtime/components/Popover.vue +1 -1
  23. package/dist/runtime/components/RadioGroup.vue +2 -8
  24. package/dist/runtime/components/ScrollArea.vue +72 -0
  25. package/dist/runtime/components/Select.vue +2 -1
  26. package/dist/runtime/components/Slider.vue +97 -0
  27. package/dist/runtime/components/Switch.vue +1 -2
  28. package/dist/runtime/components/Tabs.vue +6 -6
  29. package/dist/runtime/components/Textarea.vue +172 -0
  30. package/dist/runtime/components/Toast.vue +2 -2
  31. package/dist/runtime/components/Toaster.vue +2 -1
  32. package/dist/runtime/components/Tooltip.vue +1 -1
  33. package/dist/runtime/composables/defineInjection.d.ts +11 -0
  34. package/dist/runtime/composables/defineInjection.mjs +9 -0
  35. package/dist/runtime/composables/useModal.d.ts +1 -1
  36. package/dist/runtime/composables/useModal.mjs +3 -2
  37. package/dist/runtime/composables/useTheme.d.ts +3 -1
  38. package/dist/runtime/composables/useTheme.mjs +14 -6
  39. package/dist/runtime/theme/accordion.mjs +24 -21
  40. package/dist/runtime/theme/alert.d.ts +85 -0
  41. package/dist/runtime/theme/alert.mjs +47 -0
  42. package/dist/runtime/theme/app.mjs +1 -0
  43. package/dist/runtime/theme/badge.d.ts +79 -0
  44. package/dist/runtime/theme/badge.mjs +89 -0
  45. package/dist/runtime/theme/button.d.ts +4 -9
  46. package/dist/runtime/theme/button.mjs +130 -127
  47. package/dist/runtime/theme/card.d.ts +2 -2
  48. package/dist/runtime/theme/card.mjs +12 -9
  49. package/dist/runtime/theme/checkbox.d.ts +0 -12
  50. package/dist/runtime/theme/checkbox.mjs +45 -47
  51. package/dist/runtime/theme/chip.d.ts +56 -0
  52. package/dist/runtime/theme/chip.mjs +63 -0
  53. package/dist/runtime/theme/drawer.mjs +69 -66
  54. package/dist/runtime/theme/index.d.ts +7 -0
  55. package/dist/runtime/theme/index.mjs +7 -0
  56. package/dist/runtime/theme/input.d.ts +13 -5
  57. package/dist/runtime/theme/input.mjs +135 -122
  58. package/dist/runtime/theme/link.d.ts +1 -1
  59. package/dist/runtime/theme/link.mjs +23 -20
  60. package/dist/runtime/theme/modal.mjs +51 -48
  61. package/dist/runtime/theme/pinInput.d.ts +97 -0
  62. package/dist/runtime/theme/pinInput.mjs +108 -0
  63. package/dist/runtime/theme/popover.mjs +11 -8
  64. package/dist/runtime/theme/radioGroup.d.ts +0 -24
  65. package/dist/runtime/theme/radioGroup.mjs +50 -59
  66. package/dist/runtime/theme/scrollArea.d.ts +51 -0
  67. package/dist/runtime/theme/scrollArea.mjs +33 -0
  68. package/dist/runtime/theme/select.d.ts +5 -2
  69. package/dist/runtime/theme/select.mjs +156 -143
  70. package/dist/runtime/theme/slider.d.ts +73 -0
  71. package/dist/runtime/theme/slider.mjs +49 -0
  72. package/dist/runtime/theme/switch.d.ts +0 -12
  73. package/dist/runtime/theme/switch.mjs +66 -69
  74. package/dist/runtime/theme/tabs.d.ts +44 -13
  75. package/dist/runtime/theme/tabs.mjs +132 -106
  76. package/dist/runtime/theme/textarea.d.ts +93 -0
  77. package/dist/runtime/theme/textarea.mjs +113 -0
  78. package/dist/runtime/theme/toast.mjs +26 -23
  79. package/dist/runtime/theme/toaster.d.ts +2 -2
  80. package/dist/runtime/theme/toaster.mjs +84 -81
  81. package/dist/runtime/theme/tooltip.mjs +9 -6
  82. package/dist/runtime/types/components.d.ts +7 -0
  83. package/dist/runtime/types/index.d.ts +1 -3
  84. package/dist/runtime/utils/extend-theme.mjs +1 -1
  85. package/dist/runtime/utils/index.d.ts +0 -11
  86. package/dist/runtime/utils/index.mjs +0 -11
  87. package/dist/runtime/utils/link.d.ts +1 -1
  88. package/dist/shared/ui.CzDyI29e.mjs +8 -0
  89. package/dist/shared/ui.CzDyI29e.mjs.map +1 -0
  90. package/dist/unocss-preset.d.mts +15 -7
  91. package/dist/unocss-preset.d.ts +15 -7
  92. package/dist/unocss-preset.mjs +97 -384
  93. package/dist/unocss-preset.mjs.map +1 -0
  94. package/dist/unplugin.d.mts +25 -0
  95. package/dist/unplugin.d.ts +25 -0
  96. package/dist/unplugin.mjs +64 -0
  97. package/dist/unplugin.mjs.map +1 -0
  98. package/dist/vite.d.mts +9 -0
  99. package/dist/vite.d.ts +9 -0
  100. package/dist/vite.mjs +14 -0
  101. package/dist/vite.mjs.map +1 -0
  102. package/package.json +22 -14
  103. package/dist/index.cjs +0 -38
  104. package/dist/resolver.d.mts +0 -13
  105. package/dist/resolver.d.ts +0 -13
  106. package/dist/resolver.mjs +0 -21
  107. package/dist/runtime/components/index.cjs +0 -132
  108. package/dist/runtime/components/index.d.ts +0 -18
  109. package/dist/runtime/components/index.mjs +0 -18
  110. package/dist/runtime/composables/index.cjs +0 -33
  111. package/dist/runtime/composables/index.d.ts +0 -4
  112. package/dist/runtime/composables/index.mjs +0 -4
  113. package/dist/runtime/composables/useComponentIcons.cjs +0 -30
  114. package/dist/runtime/composables/useModal.cjs +0 -55
  115. package/dist/runtime/composables/useTheme.cjs +0 -30
  116. package/dist/runtime/composables/useToast.cjs +0 -51
  117. package/dist/runtime/theme/accordion.cjs +0 -27
  118. package/dist/runtime/theme/app.cjs +0 -15
  119. package/dist/runtime/theme/button.cjs +0 -127
  120. package/dist/runtime/theme/card.cjs +0 -17
  121. package/dist/runtime/theme/checkbox.cjs +0 -56
  122. package/dist/runtime/theme/drawer.cjs +0 -73
  123. package/dist/runtime/theme/index.cjs +0 -125
  124. package/dist/runtime/theme/input.cjs +0 -115
  125. package/dist/runtime/theme/link.cjs +0 -23
  126. package/dist/runtime/theme/modal.cjs +0 -55
  127. package/dist/runtime/theme/popover.cjs +0 -13
  128. package/dist/runtime/theme/radioGroup.cjs +0 -73
  129. package/dist/runtime/theme/select.cjs +0 -128
  130. package/dist/runtime/theme/switch.cjs +0 -73
  131. package/dist/runtime/theme/tabs.cjs +0 -105
  132. package/dist/runtime/theme/toast.cjs +0 -33
  133. package/dist/runtime/theme/toaster.cjs +0 -72
  134. package/dist/runtime/theme/tooltip.cjs +0 -14
  135. package/dist/runtime/types/components.cjs +0 -1
  136. package/dist/runtime/types/index.cjs +0 -27
  137. package/dist/runtime/types/utils.cjs +0 -1
  138. package/dist/runtime/utils/extend-theme.cjs +0 -24
  139. package/dist/runtime/utils/index.cjs +0 -119
  140. package/dist/runtime/utils/link.cjs +0 -10
  141. package/dist/runtime/utils/styler.cjs +0 -18
  142. package/dist/shared/ui.CPXA9QoM.mjs +0 -23
@@ -1,140 +1,143 @@
1
1
  import { ct } from "@byyuurin/ui-kit";
2
- export default ct({
3
- slots: {
4
- base: [
5
- "inline-flex items-center leading-normal transition-colors",
6
- "disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:opacity-50"
7
- ],
8
- label: "color-inherit",
9
- prefixIcon: "shrink-0 size-1.5em",
10
- suffixIcon: "shrink-0 size-1.5em"
11
- },
12
- variants: {
13
- variant: {
14
- solid: {
15
- base: [
16
- "color-ui-c1 bg-ui-fill/90",
17
- "hover:bg-ui-fill/80 active:bg-ui-fill",
18
- "disabled:bg-ui-fill/90 aria-disabled:bg-ui-fill/90"
19
- ]
2
+ export default ct(
3
+ /* @unocss-include */
4
+ {
5
+ slots: {
6
+ base: [
7
+ "inline-flex items-center rounded-ui-button leading-normal transition-colors",
8
+ "outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ui-cb/80",
9
+ "disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:opacity-50"
10
+ ],
11
+ label: "color-inherit",
12
+ prefixIcon: "shrink-0 size-1.5em not-only-child:ml-0.5",
13
+ suffixIcon: "shrink-0 size-1.5em not-only-child:mr-0.5"
14
+ },
15
+ variants: {
16
+ variant: {
17
+ "solid": {
18
+ base: [
19
+ "color-ui-c1 bg-ui-fill/90",
20
+ "hover:bg-ui-fill/80 active:bg-ui-fill",
21
+ "disabled:bg-ui-fill/90 aria-disabled:bg-ui-fill/90"
22
+ ]
23
+ },
24
+ "outline": {
25
+ base: [
26
+ "color-ui-fill bg-ui-c1 ring ring-inset ring-ui-fill",
27
+ "hover:bg-ui-fill/5 active:bg-ui-fill/10",
28
+ "disabled:bg-ui-c1 aria-disabled:bg-ui-c1"
29
+ ]
30
+ },
31
+ "soft": {
32
+ base: [
33
+ "color-ui-content/80 bg-ui-fill/10",
34
+ "hover:bg-ui-fill/15 hover:color-ui-content/80 active:bg-ui-fill/20 active:color-ui-content/90",
35
+ "disabled:bg-ui-fill/10 aria-disabled:bg-ui-fill/10 disabled:color-ui-content/80 aria-disabled:color-ui-content/80"
36
+ ]
37
+ },
38
+ "soft-outline": {
39
+ base: [
40
+ "color-ui-content/80 bg-ui-fill/10 ring ring-inset ring-ui-fill/40",
41
+ "hover:bg-ui-fill/15 hover:color-ui-content/80 active:bg-ui-fill/20 active:color-ui-content/90",
42
+ "disabled:bg-ui-fill/10 aria-disabled:bg-ui-fill/10 disabled:color-ui-content/80 aria-disabled:color-ui-content/80"
43
+ ]
44
+ },
45
+ "ghost": {
46
+ base: [
47
+ "color-ui-fill/80 bg-transparent",
48
+ "hover:bg-ui-fill/10 hover:color-ui-fill/80 active:bg-ui-fill/20 active:color-ui-fill/90",
49
+ "disabled:bg-transparent aria-disabled:bg-transparent disabled:color-ui-fill/80 aria-disabled:color-ui-fill/80"
50
+ ]
51
+ },
52
+ "link": {
53
+ base: [
54
+ "color-ui-fill/80 bg-transparent",
55
+ "hover:color-ui-fill/60 active:color-ui-fill",
56
+ "disabled:color-ui-fill aria-disabled:color-ui-fill"
57
+ ]
58
+ }
59
+ },
60
+ size: {
61
+ xs: {
62
+ base: "text-xs"
63
+ },
64
+ sm: {
65
+ base: "text-sm"
66
+ },
67
+ md: {
68
+ base: "text-base"
69
+ },
70
+ lg: {
71
+ base: "text-lg"
72
+ },
73
+ xl: {
74
+ base: "text-xl"
75
+ }
20
76
  },
21
- outline: {
22
- base: [
23
- "color-ui-fill bg-ui-c1 ring ring-inset ring-ui-fill",
24
- "hover:bg-ui-fill/10 active:bg-ui-fill/25",
25
- "disabled:bg-ui-c1 aria-disabled:bg-ui-c1"
26
- ]
77
+ active: {
78
+ true: ""
27
79
  },
28
- soft: {
29
- base: [
30
- "color-ui-content/80 bg-ui-fill/10",
31
- "hover:bg-ui-fill/15 hover:color-ui-content/80 active:bg-ui-fill/20 active:color-ui-content/90",
32
- "disabled:bg-ui-fill/10 aria-disabled:bg-ui-fill/10 disabled:color-ui-content/80 aria-disabled:color-ui-content/80"
33
- ]
80
+ prefix: {
81
+ true: ""
34
82
  },
35
- ghost: {
36
- base: [
37
- "color-ui-fill/80 bg-transparent",
38
- "hover:bg-ui-fill/10 hover:color-ui-fill/80 active:bg-ui-fill/20 active:color-ui-fill/90",
39
- "disabled:bg-transparent aria-disabled:bg-transparent disabled:color-ui-fill/80 aria-disabled:color-ui-fill/80"
40
- ]
83
+ suffix: {
84
+ true: ""
41
85
  },
42
- link: {
43
- base: [
44
- "color-ui-fill bg-transparent",
45
- "hover:color-ui-fill/80 active:color-ui-fill/90",
46
- "disabled:color-ui-fill aria-disabled:color-ui-fill"
47
- ]
86
+ loading: {
87
+ true: ""
48
88
  }
49
89
  },
50
- size: {
51
- xs: {
52
- base: "text-xs"
90
+ compoundVariants: [
91
+ {
92
+ size: ["xs", "sm", "md"],
93
+ class: {
94
+ base: "p-1.5",
95
+ label: "px-1"
96
+ }
53
97
  },
54
- sm: {
55
- base: "text-sm"
98
+ {
99
+ size: ["lg", "xl"],
100
+ class: {
101
+ base: "p-2.5",
102
+ label: "px-2"
103
+ }
56
104
  },
57
- md: {
58
- base: "text-base"
105
+ {
106
+ active: true,
107
+ variant: "solid",
108
+ class: { base: "bg-ui-fill hover:bg-ui-fill" }
59
109
  },
60
- lg: {
61
- base: "text-lg"
110
+ {
111
+ active: true,
112
+ variant: "outline",
113
+ class: { base: "bg-ui-fill/10 hover:bg-ui-fill/10" }
62
114
  },
63
- xl: {
64
- base: "text-xl"
65
- }
66
- },
67
- round: {
68
- true: {
69
- base: "rounded-full"
115
+ {
116
+ active: true,
117
+ variant: ["soft", "soft-outline"],
118
+ class: { base: "color-ui-content/90 bg-ui-fill/20 hover:color-ui-content/90 hover:bg-ui-fill/20" }
70
119
  },
71
- false: {
72
- base: "rounded-ui-button"
73
- }
74
- },
75
- active: {
76
- true: ""
77
- },
78
- prefix: {
79
- true: ""
80
- },
81
- suffix: {
82
- true: ""
83
- },
84
- loading: {
85
- true: ""
86
- }
87
- },
88
- compoundVariants: [
89
- {
90
- size: ["xs", "sm", "md"],
91
- class: {
92
- base: "p-1.5",
93
- label: "px-1"
94
- }
95
- },
96
- {
97
- size: ["lg", "xl"],
98
- class: {
99
- base: "p-2.5",
100
- label: "px-2"
120
+ {
121
+ active: true,
122
+ variant: "ghost",
123
+ class: { base: "color-ui-fill/90 bg-ui-fill/20 hover:color-ui-fill/90 hover:bg-ui-fill/20" }
124
+ },
125
+ {
126
+ active: true,
127
+ variant: "link",
128
+ class: { base: "color-ui-fill/90 hover:color-ui-fill/90" }
129
+ },
130
+ {
131
+ loading: true,
132
+ prefix: true,
133
+ class: { prefixIcon: "animate-spin" }
134
+ },
135
+ {
136
+ loading: true,
137
+ prefix: false,
138
+ suffix: true,
139
+ class: { suffixIcon: "animate-spin" }
101
140
  }
102
- },
103
- {
104
- active: true,
105
- variant: "solid",
106
- class: { base: "bg-ui-fill hover:bg-ui-fill" }
107
- },
108
- {
109
- active: true,
110
- variant: "outline",
111
- class: { base: "bg-ui-fill/25 hover:bg-ui-fill/25" }
112
- },
113
- {
114
- active: true,
115
- variant: "soft",
116
- class: { base: "color-ui-content/90 bg-ui-fill/20 hover:color-ui-content/90 hover:bg-ui-fill/20" }
117
- },
118
- {
119
- active: true,
120
- variant: "ghost",
121
- class: { base: "color-ui-fill/90 bg-ui-fill/20 hover:color-ui-fill/90 hover:bg-ui-fill/20" }
122
- },
123
- {
124
- active: true,
125
- variant: "link",
126
- class: { base: "color-ui-fill/90 hover:color-ui-fill/90" }
127
- },
128
- {
129
- loading: true,
130
- prefix: true,
131
- class: { prefixIcon: "animate-spin" }
132
- },
133
- {
134
- loading: true,
135
- prefix: false,
136
- suffix: true,
137
- class: { suffixIcon: "animate-spin" }
138
- }
139
- ]
140
- });
141
+ ]
142
+ }
143
+ );
@@ -14,9 +14,9 @@ declare const _default: {
14
14
  root?: import("@byyuurin/ui-kit/index").ClassValue;
15
15
  header?: import("@byyuurin/ui-kit/index").ClassValue;
16
16
  body?: import("@byyuurin/ui-kit/index").ClassValue;
17
- footer?: import("@byyuurin/ui-kit/index").ClassValue;
18
17
  title?: import("@byyuurin/ui-kit/index").ClassValue;
19
18
  description?: import("@byyuurin/ui-kit/index").ClassValue;
19
+ footer?: import("@byyuurin/ui-kit/index").ClassValue;
20
20
  } | null;
21
21
  };
22
22
  };
@@ -26,9 +26,9 @@ declare const _default: {
26
26
  root?: import("@byyuurin/ui-kit/index").ClassValue;
27
27
  header?: import("@byyuurin/ui-kit/index").ClassValue;
28
28
  body?: import("@byyuurin/ui-kit/index").ClassValue;
29
- footer?: import("@byyuurin/ui-kit/index").ClassValue;
30
29
  title?: import("@byyuurin/ui-kit/index").ClassValue;
31
30
  description?: import("@byyuurin/ui-kit/index").ClassValue;
31
+ footer?: import("@byyuurin/ui-kit/index").ClassValue;
32
32
  } | null;
33
33
  };
34
34
  }, {
@@ -1,11 +1,14 @@
1
1
  import { ct } from "@byyuurin/ui-kit";
2
- export default ct({
3
- slots: {
4
- root: "color-ui-cb bg-ui-c1 ring ring-ui-cb/10 divide-y divide-ui-cb/10 rounded-ui-box shadow-sm shadow-ui-cb/10",
5
- header: "flex flex-wrap items-center gap-1 px-4 py-5 sm:px-6",
6
- body: "flex-1 overflow-y-auto p-4 sm:p-6 empty:hidden",
7
- footer: "flex items-center gap-1.5 p-4 sm:px-6",
8
- title: "flex-grow color-ui-cb text-xl font-semibold",
9
- description: "w-full color-ui-cb/80"
2
+ export default ct(
3
+ /* @unocss-include */
4
+ {
5
+ slots: {
6
+ root: "color-ui-cb bg-ui-c1 ring ring-ui-cb/10 divide-y divide-ui-cb/10 rounded-ui-box shadow-sm shadow-ui-cb/10",
7
+ header: "flex flex-wrap items-center gap-1 px-4 py-5 sm:px-6",
8
+ body: "flex-1 overflow-y-auto p-4 sm:p-6 empty:hidden",
9
+ footer: "flex items-center gap-1.5 p-4 sm:px-6",
10
+ title: "flex-grow color-ui-cb text-xl font-semibold",
11
+ description: "w-full color-ui-cb/80"
12
+ }
10
13
  }
11
- });
14
+ );
@@ -40,12 +40,6 @@ declare const _default: {
40
40
  label: string;
41
41
  };
42
42
  };
43
- checked: {
44
- true: {
45
- base: string;
46
- icon: string;
47
- };
48
- };
49
43
  };
50
44
  compoundVariants: import("@byyuurin/ui-kit/index").CVCompoundVariants<{
51
45
  size: {
@@ -78,12 +72,6 @@ declare const _default: {
78
72
  label: string;
79
73
  };
80
74
  };
81
- checked: {
82
- true: {
83
- base: string;
84
- icon: string;
85
- };
86
- };
87
75
  }, {
88
76
  root: string;
89
77
  base: string[];
@@ -1,53 +1,51 @@
1
1
  import { ct } from "@byyuurin/ui-kit";
2
- export default ct({
3
- slots: {
4
- root: "relative flex items-start",
5
- base: [
6
- "size-1.25em shrink-0 flex items-center justify-center rounded-ui-base color-ui-c1 ring ring-inset ring-ui-cb",
7
- "focus-visible:outline-ui-cb focus-visible:outline-2 focus-visible:outline-offset-2"
8
- ],
9
- container: "flex items-center h-1.25em",
10
- wrapper: "text-inherit ms-2",
11
- icon: "shrink-0 size-1em data-[state=checked]:animate-[scale-in_200ms_ease-out]",
12
- label: "flex color-ui-cb after:content-empty",
13
- description: "color-ui-cb/60"
14
- },
15
- variants: {
16
- size: {
17
- xs: {
18
- root: "text-xs"
19
- },
20
- sm: {
21
- root: "text-sm"
22
- },
23
- md: {
24
- root: "text-base"
25
- },
26
- lg: {
27
- root: "text-lg"
28
- },
29
- xl: {
30
- root: "text-xl"
31
- }
2
+ export default ct(
3
+ /* @unocss-include */
4
+ {
5
+ slots: {
6
+ root: "relative flex items-start",
7
+ base: [
8
+ "size-1.25em shrink-0 flex items-center justify-center rounded-ui-checkbox color-ui-c1 ring-2 ring-ui-content ring-inset bg-ui-content",
9
+ "outline-none focus-visible:outline-ui-cb/80 focus-visible:outline-2 focus-visible:outline-offset-2",
10
+ "aria-[checked=false]:ring-1 aria-[checked=false]:ring-ui-cb aria-[checked=false]:bg-ui-c1"
11
+ ],
12
+ container: "flex items-center h-1.25em",
13
+ wrapper: "text-inherit ms-2",
14
+ icon: "color-ui-c1 shrink-0 size-1em transition data-[state=unchecked]:translate-y-full",
15
+ label: "flex color-ui-cb after:content-empty",
16
+ description: "color-ui-cb/60"
32
17
  },
33
- required: {
34
- true: {
35
- label: `after:content-['*'] after:ms-0.5`
36
- }
37
- },
38
- disabled: {
39
- true: {
40
- root: "opacity-50 after:content-empty after:absolute after:inset-0 after:cursor-not-allowed"
18
+ variants: {
19
+ size: {
20
+ xs: {
21
+ root: "text-xs"
22
+ },
23
+ sm: {
24
+ root: "text-sm"
25
+ },
26
+ md: {
27
+ root: "text-base"
28
+ },
29
+ lg: {
30
+ root: "text-lg"
31
+ },
32
+ xl: {
33
+ root: "text-xl"
34
+ }
41
35
  },
42
- false: {
43
- label: "cursor-pointer"
44
- }
45
- },
46
- checked: {
47
- true: {
48
- base: "ring-2 ring-ui-content bg-ui-content",
49
- icon: "color-ui-c1"
36
+ required: {
37
+ true: {
38
+ label: `after:content-['*'] after:ms-0.5`
39
+ }
40
+ },
41
+ disabled: {
42
+ true: {
43
+ root: "opacity-50 after:content-empty after:absolute after:inset-0 after:cursor-not-allowed"
44
+ },
45
+ false: {
46
+ label: "cursor-pointer"
47
+ }
50
48
  }
51
49
  }
52
50
  }
53
- });
51
+ );
@@ -0,0 +1,56 @@
1
+ declare const _default: {
2
+ base: undefined;
3
+ slots: {
4
+ base: string;
5
+ label: string;
6
+ prefixIcon: string;
7
+ suffixIcon: string;
8
+ };
9
+ variants: {
10
+ variant: {
11
+ solid: {
12
+ base: string[];
13
+ };
14
+ outline: {
15
+ base: string;
16
+ };
17
+ soft: {
18
+ base: string;
19
+ };
20
+ 'soft-outline': {
21
+ base: string;
22
+ };
23
+ };
24
+ size: {
25
+ xs: {
26
+ base: string;
27
+ };
28
+ sm: {
29
+ base: string;
30
+ };
31
+ md: {
32
+ base: string;
33
+ };
34
+ lg: {
35
+ base: string;
36
+ };
37
+ xl: {
38
+ base: string;
39
+ };
40
+ };
41
+ };
42
+ compoundVariants: ({
43
+ size: ("xs" | "sm" | "md")[];
44
+ class: {
45
+ base: string;
46
+ label: string;
47
+ };
48
+ } | {
49
+ size: ("lg" | "xl")[];
50
+ class: {
51
+ base: string;
52
+ label: string;
53
+ };
54
+ })[];
55
+ };
56
+ export default _default;
@@ -0,0 +1,63 @@
1
+ import { ct } from "@byyuurin/ui-kit";
2
+ export default ct(
3
+ /* @unocss-include */
4
+ {
5
+ slots: {
6
+ base: "inline-flex items-center rounded-ui-base leading-normal transition-colors",
7
+ label: "",
8
+ prefixIcon: "shrink-0 size-1.5em not-only-child:ml-1.5",
9
+ suffixIcon: "shrink-0 size-1.5em not-only-child:mr-1.5"
10
+ },
11
+ variants: {
12
+ variant: {
13
+ "solid": {
14
+ base: [
15
+ "color-ui-c1 bg-ui-fill/90"
16
+ ]
17
+ },
18
+ "outline": {
19
+ base: "color-ui-fill bg-ui-c1 ring ring-inset ring-ui-fill"
20
+ },
21
+ "soft": {
22
+ base: "color-ui-content/80 bg-ui-fill/10"
23
+ },
24
+ "soft-outline": {
25
+ base: "color-ui-content/80 bg-ui-fill/10 ring ring-inset ring-ui-fill/40"
26
+ }
27
+ },
28
+ size: {
29
+ xs: {
30
+ base: "text-xs"
31
+ },
32
+ sm: {
33
+ base: "text-sm"
34
+ },
35
+ md: {
36
+ base: "text-base"
37
+ },
38
+ lg: {
39
+ base: "text-lg"
40
+ },
41
+ xl: {
42
+ base: "text-xl"
43
+ }
44
+ }
45
+ },
46
+ compoundVariants: [
47
+ {
48
+ size: ["xs", "sm", "md"],
49
+ class: {
50
+ base: "p-0.5",
51
+ label: "px-1"
52
+ }
53
+ },
54
+ {
55
+ size: ["lg", "xl"],
56
+ class: {
57
+ base: "p-1",
58
+ label: "px-2"
59
+ }
60
+ }
61
+ ]
62
+ }
63
+ );