@auronui/styles 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/DATA_ATTRIBUTES.md +163 -0
  2. package/LICENSE +21 -0
  3. package/README.md +54 -0
  4. package/base/base.css +40 -0
  5. package/components/accordion.css +201 -0
  6. package/components/alert-dialog.css +307 -0
  7. package/components/alert.css +143 -0
  8. package/components/aspect-ratio.css +8 -0
  9. package/components/autocomplete.css +685 -0
  10. package/components/avatar.css +78 -0
  11. package/components/badge.css +186 -0
  12. package/components/breadcrumbs.css +76 -0
  13. package/components/button-group.css +126 -0
  14. package/components/button.css +282 -0
  15. package/components/calendar-year-picker.css +193 -0
  16. package/components/calendar.css +332 -0
  17. package/components/card.css +225 -0
  18. package/components/checkbox-group.css +7 -0
  19. package/components/checkbox.css +268 -0
  20. package/components/chip.css +227 -0
  21. package/components/close-button.css +65 -0
  22. package/components/collapsible-group.css +7 -0
  23. package/components/collapsible.css +74 -0
  24. package/components/color-area.css +81 -0
  25. package/components/color-field.css +99 -0
  26. package/components/color-input-group.css +153 -0
  27. package/components/color-picker.css +121 -0
  28. package/components/color-slider.css +266 -0
  29. package/components/color-swatch-picker.css +247 -0
  30. package/components/color-swatch.css +42 -0
  31. package/components/combo-box.css +203 -0
  32. package/components/date-input-group.css +125 -0
  33. package/components/date-input.css +529 -0
  34. package/components/date-picker.css +86 -0
  35. package/components/date-range-field.css +538 -0
  36. package/components/date-range-picker.css +93 -0
  37. package/components/description.css +4 -0
  38. package/components/drawer.css +222 -0
  39. package/components/dropdown.css +67 -0
  40. package/components/empty-state.css +4 -0
  41. package/components/error-message.css +13 -0
  42. package/components/field-error.css +19 -0
  43. package/components/fieldset.css +39 -0
  44. package/components/header.css +7 -0
  45. package/components/index.css +164 -0
  46. package/components/input-otp.css +124 -0
  47. package/components/input.css +603 -0
  48. package/components/kbd.css +27 -0
  49. package/components/label.css +28 -0
  50. package/components/link.css +144 -0
  51. package/components/list-box-item.css +29 -0
  52. package/components/list-box-section.css +13 -0
  53. package/components/list-box.css +11 -0
  54. package/components/menu-item.css +68 -0
  55. package/components/menu-section.css +18 -0
  56. package/components/menu.css +7 -0
  57. package/components/meter.css +104 -0
  58. package/components/modal.css +335 -0
  59. package/components/number-field.css +395 -0
  60. package/components/pagination.css +157 -0
  61. package/components/popover.css +96 -0
  62. package/components/progress-bar.css +126 -0
  63. package/components/progress-circle.css +82 -0
  64. package/components/radio-group.css +47 -0
  65. package/components/radio.css +157 -0
  66. package/components/range-calendar.css +402 -0
  67. package/components/scroll-area.css +70 -0
  68. package/components/scroll-shadow.css +77 -0
  69. package/components/select.css +649 -0
  70. package/components/separator.css +59 -0
  71. package/components/skeleton.css +48 -0
  72. package/components/slider.css +155 -0
  73. package/components/spinner.css +42 -0
  74. package/components/splitter.css +74 -0
  75. package/components/stepper.css +160 -0
  76. package/components/surface.css +23 -0
  77. package/components/switch-group.css +17 -0
  78. package/components/switch.css +194 -0
  79. package/components/table.css +341 -0
  80. package/components/tabs.css +262 -0
  81. package/components/tag-group.css +66 -0
  82. package/components/tag.css +99 -0
  83. package/components/textarea.css +536 -0
  84. package/components/time-field.css +530 -0
  85. package/components/toast.css +267 -0
  86. package/components/toggle-button-group.css +174 -0
  87. package/components/toggle-button.css +149 -0
  88. package/components/toolbar.css +32 -0
  89. package/components/tooltip.css +47 -0
  90. package/components/tree.css +81 -0
  91. package/index.css +29 -0
  92. package/package.json +415 -0
  93. package/src/components/accordion/accordion.styles.ts +46 -0
  94. package/src/components/accordion/index.ts +1 -0
  95. package/src/components/alert/alert.styles.ts +37 -0
  96. package/src/components/alert/index.ts +1 -0
  97. package/src/components/alert-dialog/alert-dialog.styles.ts +72 -0
  98. package/src/components/alert-dialog/index.ts +1 -0
  99. package/src/components/aspect-ratio/aspect-ratio.styles.ts +10 -0
  100. package/src/components/aspect-ratio/index.ts +1 -0
  101. package/src/components/autocomplete/autocomplete.styles.ts +86 -0
  102. package/src/components/autocomplete/index.ts +1 -0
  103. package/src/components/avatar/avatar.styles.ts +53 -0
  104. package/src/components/avatar/index.ts +1 -0
  105. package/src/components/badge/badge.styles.ts +77 -0
  106. package/src/components/badge/index.ts +1 -0
  107. package/src/components/breadcrumbs/breadcrumbs.styles.ts +14 -0
  108. package/src/components/breadcrumbs/index.ts +1 -0
  109. package/src/components/button/__tests__/button.styles.test.ts +79 -0
  110. package/src/components/button/button.styles.ts +65 -0
  111. package/src/components/button/index.ts +1 -0
  112. package/src/components/button-group/button-group.styles.ts +32 -0
  113. package/src/components/button-group/index.ts +1 -0
  114. package/src/components/calendar/calendar.styles.ts +60 -0
  115. package/src/components/calendar/index.ts +1 -0
  116. package/src/components/calendar-year-picker/calendar-year-picker.styles.ts +15 -0
  117. package/src/components/calendar-year-picker/index.ts +1 -0
  118. package/src/components/card/card.styles.ts +65 -0
  119. package/src/components/card/index.ts +1 -0
  120. package/src/components/checkbox/checkbox.styles.ts +27 -0
  121. package/src/components/checkbox/index.ts +1 -0
  122. package/src/components/checkbox-group/checkbox-group.styles.ts +18 -0
  123. package/src/components/checkbox-group/index.ts +1 -0
  124. package/src/components/chip/chip.styles.ts +65 -0
  125. package/src/components/chip/index.ts +1 -0
  126. package/src/components/close-button/close-button.styles.ts +17 -0
  127. package/src/components/close-button/index.ts +1 -0
  128. package/src/components/collapsible/collapsible.styles.ts +25 -0
  129. package/src/components/collapsible/index.ts +1 -0
  130. package/src/components/collapsible-group/collapsible-group.styles.ts +13 -0
  131. package/src/components/collapsible-group/index.ts +1 -0
  132. package/src/components/color-area/color-area.styles.ts +23 -0
  133. package/src/components/color-area/index.ts +1 -0
  134. package/src/components/color-field/color-field.styles.ts +18 -0
  135. package/src/components/color-field/index.ts +1 -0
  136. package/src/components/color-input-group/color-input-group.styles.ts +34 -0
  137. package/src/components/color-input-group/index.ts +1 -0
  138. package/src/components/color-picker/color-picker.styles.ts +13 -0
  139. package/src/components/color-picker/index.ts +1 -0
  140. package/src/components/color-slider/color-slider.styles.ts +14 -0
  141. package/src/components/color-slider/index.ts +1 -0
  142. package/src/components/color-swatch/color-swatch.styles.ts +26 -0
  143. package/src/components/color-swatch/index.ts +1 -0
  144. package/src/components/color-swatch-picker/color-swatch-picker.styles.ts +54 -0
  145. package/src/components/color-swatch-picker/index.ts +1 -0
  146. package/src/components/combo-box/combo-box.styles.ts +26 -0
  147. package/src/components/combo-box/index.ts +1 -0
  148. package/src/components/date-input/date-input.styles.ts +86 -0
  149. package/src/components/date-input/index.ts +1 -0
  150. package/src/components/date-picker/date-picker.styles.ts +14 -0
  151. package/src/components/date-picker/index.ts +1 -0
  152. package/src/components/date-range-field/date-range-field.styles.ts +87 -0
  153. package/src/components/date-range-field/index.ts +1 -0
  154. package/src/components/date-range-picker/date-range-picker.styles.ts +14 -0
  155. package/src/components/date-range-picker/index.ts +1 -0
  156. package/src/components/description/description.styles.ts +9 -0
  157. package/src/components/description/index.ts +1 -0
  158. package/src/components/drawer/drawer.styles.ts +55 -0
  159. package/src/components/drawer/index.ts +1 -0
  160. package/src/components/dropdown/dropdown.styles.ts +14 -0
  161. package/src/components/dropdown/index.ts +1 -0
  162. package/src/components/empty-state/empty-state.styles.ts +9 -0
  163. package/src/components/empty-state/index.ts +1 -0
  164. package/src/components/error-message/error-message.styles.ts +9 -0
  165. package/src/components/error-message/index.ts +1 -0
  166. package/src/components/fieldset/fieldset.styles.ts +29 -0
  167. package/src/components/fieldset/index.ts +1 -0
  168. package/src/components/header/header.styles.ts +5 -0
  169. package/src/components/header/index.ts +1 -0
  170. package/src/components/index.ts +84 -0
  171. package/src/components/input/index.ts +1 -0
  172. package/src/components/input/input.styles.ts +87 -0
  173. package/src/components/input-otp/index.ts +1 -0
  174. package/src/components/input-otp/input-otp.styles.ts +30 -0
  175. package/src/components/kbd/index.ts +1 -0
  176. package/src/components/kbd/kbd.styles.ts +20 -0
  177. package/src/components/label/index.ts +1 -0
  178. package/src/components/label/label.styles.ts +25 -0
  179. package/src/components/link/index.ts +1 -0
  180. package/src/components/link/link.styles.ts +38 -0
  181. package/src/components/list-box/index.ts +1 -0
  182. package/src/components/list-box/list-box.styles.ts +18 -0
  183. package/src/components/list-box-item/index.ts +1 -0
  184. package/src/components/list-box-item/list-box-item.styles.ts +25 -0
  185. package/src/components/list-box-section/index.ts +1 -0
  186. package/src/components/list-box-section/list-box-section.styles.ts +13 -0
  187. package/src/components/menu/index.ts +1 -0
  188. package/src/components/menu/menu.styles.ts +9 -0
  189. package/src/components/menu-item/index.ts +1 -0
  190. package/src/components/menu-item/menu-item.styles.ts +26 -0
  191. package/src/components/menu-section/index.ts +1 -0
  192. package/src/components/menu-section/menu-section.styles.ts +14 -0
  193. package/src/components/meter/index.ts +1 -0
  194. package/src/components/meter/meter.styles.ts +48 -0
  195. package/src/components/modal/index.ts +1 -0
  196. package/src/components/modal/modal.styles.ts +70 -0
  197. package/src/components/number-field/index.ts +1 -0
  198. package/src/components/number-field/number-field.styles.ts +80 -0
  199. package/src/components/pagination/index.ts +1 -0
  200. package/src/components/pagination/pagination.styles.ts +32 -0
  201. package/src/components/popover/index.ts +1 -0
  202. package/src/components/popover/popover.styles.ts +14 -0
  203. package/src/components/progress-bar/index.ts +1 -0
  204. package/src/components/progress-bar/progress-bar.styles.ts +97 -0
  205. package/src/components/progress-circle/index.ts +1 -0
  206. package/src/components/progress-circle/progress-circle.styles.ts +74 -0
  207. package/src/components/radio/index.ts +1 -0
  208. package/src/components/radio/radio.styles.ts +14 -0
  209. package/src/components/radio-group/index.ts +1 -0
  210. package/src/components/radio-group/radio-group.styles.ts +18 -0
  211. package/src/components/range-calendar/index.ts +1 -0
  212. package/src/components/range-calendar/range-calendar.styles.ts +60 -0
  213. package/src/components/scroll-shadow/index.ts +1 -0
  214. package/src/components/scroll-shadow/scroll-shadow.styles.ts +37 -0
  215. package/src/components/select/index.ts +1 -0
  216. package/src/components/select/select.styles.ts +86 -0
  217. package/src/components/separator/index.ts +1 -0
  218. package/src/components/separator/separator.styles.ts +25 -0
  219. package/src/components/skeleton/index.ts +1 -0
  220. package/src/components/skeleton/skeleton.styles.ts +21 -0
  221. package/src/components/slider/index.ts +1 -0
  222. package/src/components/slider/slider.styles.ts +40 -0
  223. package/src/components/spinner/index.ts +1 -0
  224. package/src/components/spinner/spinner.styles.ts +28 -0
  225. package/src/components/splitter/index.ts +1 -0
  226. package/src/components/splitter/splitter.styles.ts +28 -0
  227. package/src/components/stepper/index.ts +1 -0
  228. package/src/components/stepper/stepper.styles.ts +57 -0
  229. package/src/components/surface/index.ts +1 -0
  230. package/src/components/surface/surface.styles.ts +20 -0
  231. package/src/components/switch/index.ts +1 -0
  232. package/src/components/switch/switch.styles.ts +31 -0
  233. package/src/components/switch-group/index.ts +1 -0
  234. package/src/components/switch-group/switch-group.styles.ts +25 -0
  235. package/src/components/table/index.ts +1 -0
  236. package/src/components/table/table.styles.ts +47 -0
  237. package/src/components/tabs/index.ts +1 -0
  238. package/src/components/tabs/tabs.styles.ts +31 -0
  239. package/src/components/tag/index.ts +1 -0
  240. package/src/components/tag/tag.styles.ts +37 -0
  241. package/src/components/tag-group/index.ts +1 -0
  242. package/src/components/tag-group/tag-group.styles.ts +12 -0
  243. package/src/components/text/index.ts +1 -0
  244. package/src/components/text/text.styles.ts +29 -0
  245. package/src/components/textarea/index.ts +1 -0
  246. package/src/components/textarea/textarea.styles.ts +86 -0
  247. package/src/components/time-field/index.ts +1 -0
  248. package/src/components/time-field/time-field.styles.ts +86 -0
  249. package/src/components/toast/index.ts +1 -0
  250. package/src/components/toast/toast.styles.ts +67 -0
  251. package/src/components/toggle-button/index.ts +1 -0
  252. package/src/components/toggle-button/toggle-button.styles.ts +28 -0
  253. package/src/components/toggle-button-group/index.ts +1 -0
  254. package/src/components/toggle-button-group/toggle-button-group.styles.ts +39 -0
  255. package/src/components/toolbar/index.ts +1 -0
  256. package/src/components/toolbar/toolbar.styles.ts +23 -0
  257. package/src/components/tooltip/index.ts +1 -0
  258. package/src/components/tooltip/tooltip.styles.ts +12 -0
  259. package/src/components/tree/index.ts +1 -0
  260. package/src/components/tree/tree.styles.ts +33 -0
  261. package/src/index.ts +5 -0
  262. package/src/utils/index.ts +15 -0
  263. package/themes/default/components/index.css +6 -0
  264. package/themes/default/index.css +8 -0
  265. package/themes/default/variables.css +168 -0
  266. package/themes/shared/theme.css +196 -0
  267. package/utilities/index.css +244 -0
  268. package/variants/index.css +106 -0
@@ -0,0 +1,10 @@
1
+ import type {VariantProps} from "../../utils";
2
+ import { tv } from "tailwind-variants";
3
+
4
+ export const aspectRatioVariants = tv({
5
+ slots: {
6
+ base: "aspect-ratio",
7
+ },
8
+ });
9
+
10
+ export type AspectRatioVariants = VariantProps<typeof aspectRatioVariants>;
@@ -0,0 +1 @@
1
+ export * from "./aspect-ratio.styles";
@@ -0,0 +1,86 @@
1
+ import type {VariantProps} from "../../utils";
2
+
3
+ import {tv} from "tailwind-variants";
4
+
5
+ export const autocompleteVariants = tv({
6
+ slots: {
7
+ base: "autocomplete-root",
8
+ mainWrapper: "autocomplete__main-wrapper",
9
+ trigger: "autocomplete__trigger",
10
+ input: "autocomplete__input",
11
+ startContent: "autocomplete__start-content",
12
+ indicator: "autocomplete__indicator",
13
+ clearButton: "autocomplete__clear-button",
14
+ label: "autocomplete__label",
15
+ helperWrapper: "autocomplete__helper-wrapper",
16
+ description: "autocomplete__description",
17
+ errorMessage: "autocomplete__error-message",
18
+ },
19
+ defaultVariants: {
20
+ variant: "flat",
21
+ size: "md",
22
+ color: "default",
23
+ fullWidth: false,
24
+ isInvalid: false,
25
+ isDisabled: false,
26
+ isReadonly: false,
27
+ hasLabel: false,
28
+ labelPlacement: "inside",
29
+ },
30
+ variants: {
31
+ variant: {
32
+ flat: { trigger: "autocomplete__trigger--flat" },
33
+ bordered: { trigger: "autocomplete__trigger--bordered" },
34
+ faded: { trigger: "autocomplete__trigger--faded" },
35
+ underlined: { trigger: "autocomplete__trigger--underlined" },
36
+ raised: { trigger: "autocomplete__trigger--raised" },
37
+ },
38
+ size: {
39
+ sm: { trigger: "autocomplete__trigger--sm" },
40
+ md: {},
41
+ lg: { trigger: "autocomplete__trigger--lg" },
42
+ },
43
+ color: {
44
+ default: { trigger: "autocomplete__trigger--default" },
45
+ primary: { trigger: "autocomplete__trigger--primary" },
46
+ secondary: { trigger: "autocomplete__trigger--secondary" },
47
+ success: { trigger: "autocomplete__trigger--success" },
48
+ warning: { trigger: "autocomplete__trigger--warning" },
49
+ danger: { trigger: "autocomplete__trigger--danger" },
50
+ },
51
+ fullWidth: {
52
+ false: {},
53
+ true: { base: "autocomplete-root--full-width", trigger: "autocomplete__trigger--full-width" },
54
+ },
55
+ isInvalid: {
56
+ false: {},
57
+ true: { base: "autocomplete-root--invalid", trigger: "autocomplete__trigger--invalid" },
58
+ },
59
+ isDisabled: {
60
+ false: {},
61
+ true: { base: "autocomplete-root--disabled", trigger: "autocomplete__trigger--disabled" },
62
+ },
63
+ isReadonly: {
64
+ false: {},
65
+ true: { trigger: "autocomplete__trigger--readonly" },
66
+ },
67
+ hasLabel: {
68
+ false: {},
69
+ true: {},
70
+ },
71
+ labelPlacement: {
72
+ inside: { base: "autocomplete-root--label-inside" },
73
+ outside: { base: "autocomplete-root--label-outside" },
74
+ "outside-left": { base: "autocomplete-root--label-outside-left" },
75
+ },
76
+ },
77
+ compoundVariants: [
78
+ {
79
+ hasLabel: true,
80
+ labelPlacement: "inside",
81
+ class: { trigger: "autocomplete__trigger--label-inside" },
82
+ },
83
+ ],
84
+ });
85
+
86
+ export type AutocompleteVariants = VariantProps<typeof autocompleteVariants>;
@@ -0,0 +1 @@
1
+ export * from "./autocomplete.styles";
@@ -0,0 +1,53 @@
1
+ import type {VariantProps} from "../../utils";
2
+
3
+ import {tv} from "tailwind-variants";
4
+
5
+ export const avatarVariants = tv({
6
+ defaultVariants: {
7
+ color: "default",
8
+ size: "md",
9
+ },
10
+ slots: {
11
+ base: "avatar",
12
+ fallback: "avatar__fallback",
13
+ image: "avatar__image",
14
+ },
15
+ variants: {
16
+ color: {
17
+ accent: {
18
+ fallback: "avatar__fallback--accent",
19
+ },
20
+ danger: {
21
+ fallback: "avatar__fallback--danger",
22
+ },
23
+ default: {
24
+ fallback: "avatar__fallback--default",
25
+ },
26
+ success: {
27
+ fallback: "avatar__fallback--success",
28
+ },
29
+ warning: {
30
+ fallback: "avatar__fallback--warning",
31
+ },
32
+ },
33
+ size: {
34
+ lg: {
35
+ base: "avatar--lg",
36
+ },
37
+ md: {
38
+ base: "avatar--md",
39
+ },
40
+ sm: {
41
+ base: "avatar--sm",
42
+ },
43
+ },
44
+ variant: {
45
+ default: {},
46
+ soft: {
47
+ base: "avatar--soft",
48
+ },
49
+ },
50
+ },
51
+ });
52
+
53
+ export type AvatarVariants = VariantProps<typeof avatarVariants>;
@@ -0,0 +1 @@
1
+ export * from "./avatar.styles";
@@ -0,0 +1,77 @@
1
+ import type {VariantProps} from "../../utils";
2
+
3
+ import {tv} from "tailwind-variants";
4
+
5
+ export const badgeVariants = tv({
6
+ defaultVariants: {
7
+ color: "default",
8
+ placement: "top-right",
9
+ size: "md",
10
+ variant: "primary",
11
+ },
12
+ slots: {
13
+ anchor: "badge-anchor",
14
+ base: "badge",
15
+ label: "badge__label",
16
+ },
17
+ variants: {
18
+ color: {
19
+ accent: {
20
+ base: "badge--accent",
21
+ },
22
+ danger: {
23
+ base: "badge--danger",
24
+ },
25
+ default: {
26
+ base: "badge--default",
27
+ },
28
+ success: {
29
+ base: "badge--success",
30
+ },
31
+ warning: {
32
+ base: "badge--warning",
33
+ },
34
+ },
35
+ placement: {
36
+ "bottom-left": {
37
+ base: "badge--bottom-left",
38
+ },
39
+ "bottom-right": {
40
+ base: "badge--bottom-right",
41
+ },
42
+ "top-left": {
43
+ base: "badge--top-left",
44
+ },
45
+ "top-right": {
46
+ base: "badge--top-right",
47
+ },
48
+ },
49
+ size: {
50
+ lg: {
51
+ base: "badge--lg",
52
+ },
53
+ md: {
54
+ base: "badge--md",
55
+ },
56
+ sm: {
57
+ base: "badge--sm",
58
+ },
59
+ xs: {
60
+ base: "badge--xs",
61
+ },
62
+ },
63
+ variant: {
64
+ primary: {
65
+ base: "badge--primary",
66
+ },
67
+ secondary: {
68
+ base: "badge--secondary",
69
+ },
70
+ soft: {
71
+ base: "badge--soft",
72
+ },
73
+ },
74
+ },
75
+ });
76
+
77
+ export type BadgeVariants = VariantProps<typeof badgeVariants>;
@@ -0,0 +1 @@
1
+ export * from "./badge.styles";
@@ -0,0 +1,14 @@
1
+ import type {VariantProps} from "../../utils";
2
+
3
+ import {tv} from "tailwind-variants";
4
+
5
+ export const breadcrumbsVariants = tv({
6
+ slots: {
7
+ base: "breadcrumbs",
8
+ item: "breadcrumbs__item",
9
+ link: "breadcrumbs__link",
10
+ separator: "breadcrumbs__separator",
11
+ },
12
+ });
13
+
14
+ export type BreadcrumbsVariants = VariantProps<typeof breadcrumbsVariants>;
@@ -0,0 +1 @@
1
+ export * from "./breadcrumbs.styles";
@@ -0,0 +1,79 @@
1
+ import { describe, it, expect } from 'vitest'
2
+ import { buttonVariants } from '../button.styles'
3
+
4
+ describe('buttonVariants (slots)', () => {
5
+ it('returns slot functions for base, startContent, label, endContent, spinner', () => {
6
+ const slots = buttonVariants({})
7
+ expect(typeof slots.base).toBe('function')
8
+ expect(typeof slots.startContent).toBe('function')
9
+ expect(typeof slots.label).toBe('function')
10
+ expect(typeof slots.endContent).toBe('function')
11
+ expect(typeof slots.spinner).toBe('function')
12
+ })
13
+
14
+ it('base slot includes "button" class always', () => {
15
+ expect(buttonVariants({}).base()).toContain('button')
16
+ })
17
+
18
+ it('primary variant (default)', () => {
19
+ expect(buttonVariants({ variant: 'primary' }).base()).toContain('button--primary')
20
+ })
21
+
22
+ it('success variant', () => {
23
+ expect(buttonVariants({ variant: 'success' }).base()).toContain('button--success')
24
+ })
25
+
26
+ it('success-soft variant', () => {
27
+ expect(buttonVariants({ variant: 'success-soft' }).base()).toContain('button--success-soft')
28
+ })
29
+
30
+ it('warning variant', () => {
31
+ expect(buttonVariants({ variant: 'warning' }).base()).toContain('button--warning')
32
+ })
33
+
34
+ it('warning-soft variant', () => {
35
+ expect(buttonVariants({ variant: 'warning-soft' }).base()).toContain('button--warning-soft')
36
+ })
37
+
38
+ it('danger variant', () => {
39
+ expect(buttonVariants({ variant: 'danger' }).base()).toContain('button--danger')
40
+ })
41
+
42
+ it('danger-soft variant', () => {
43
+ expect(buttonVariants({ variant: 'danger-soft' }).base()).toContain('button--danger-soft')
44
+ })
45
+
46
+ it('isLoading=true adds button--loading to base', () => {
47
+ expect(buttonVariants({ isLoading: true }).base()).toContain('button--loading')
48
+ })
49
+
50
+ it('isLoading=true adds button__label--loading to label', () => {
51
+ expect(buttonVariants({ isLoading: true }).label()).toContain('button__label--loading')
52
+ })
53
+
54
+ it('isLoading=false (default) does not add loading classes', () => {
55
+ const slots = buttonVariants({ isLoading: false })
56
+ expect(slots.base()).not.toContain('button--loading')
57
+ expect(slots.label()).not.toContain('button__label--loading')
58
+ })
59
+
60
+ it('startContent slot', () => {
61
+ expect(buttonVariants({}).startContent()).toContain('button__start-content')
62
+ })
63
+
64
+ it('endContent slot', () => {
65
+ expect(buttonVariants({}).endContent()).toContain('button__end-content')
66
+ })
67
+
68
+ it('spinner slot', () => {
69
+ expect(buttonVariants({}).spinner()).toContain('button__spinner')
70
+ })
71
+
72
+ it('fullWidth=true adds button--full-width', () => {
73
+ expect(buttonVariants({ fullWidth: true }).base()).toContain('button--full-width')
74
+ })
75
+
76
+ it('isIconOnly=true adds button--icon-only', () => {
77
+ expect(buttonVariants({ isIconOnly: true }).base()).toContain('button--icon-only')
78
+ })
79
+ })
@@ -0,0 +1,65 @@
1
+ import type {VariantProps} from "../../utils";
2
+ import { tv } from "tailwind-variants";
3
+
4
+ export const buttonVariants = tv({
5
+ slots: {
6
+ base: "button",
7
+ startContent: "button__start-content",
8
+ label: "button__label",
9
+ endContent: "button__end-content",
10
+ spinner: "button__spinner",
11
+ },
12
+ defaultVariants: {
13
+ fullWidth: false,
14
+ isIconOnly: false,
15
+ isLoading: false,
16
+ size: "md",
17
+ variant: "primary",
18
+ },
19
+ variants: {
20
+ fullWidth: {
21
+ false: { base: "" },
22
+ true: { base: "button--full-width" },
23
+ },
24
+ isIconOnly: {
25
+ false: {},
26
+ true: { base: "button--icon-only" },
27
+ },
28
+ isLoading: {
29
+ false: {},
30
+ true: {
31
+ base: "button--loading",
32
+ label: "button__label--loading",
33
+ },
34
+ },
35
+ radius: {
36
+ none: { base: "button--radius-none" },
37
+ sm: { base: "button--radius-sm" },
38
+ md: { base: "button--radius-md" },
39
+ lg: { base: "button--radius-lg" },
40
+ full: { base: "button--radius-full" },
41
+ },
42
+ size: {
43
+ xl: { base: "button--xl" },
44
+ lg: { base: "button--lg" },
45
+ md: { base: "button--md" },
46
+ sm: { base: "button--sm" },
47
+ xs: { base: "button--xs" },
48
+ },
49
+ variant: {
50
+ danger: { base: "button--danger" },
51
+ "danger-soft": { base: "button--danger-soft" },
52
+ ghost: { base: "button--ghost" },
53
+ outline: { base: "button--outline" },
54
+ primary: { base: "button--primary" },
55
+ secondary: { base: "button--secondary" },
56
+ success: { base: "button--success" },
57
+ "success-soft": { base: "button--success-soft" },
58
+ tertiary: { base: "button--tertiary" },
59
+ warning: { base: "button--warning" },
60
+ "warning-soft": { base: "button--warning-soft" },
61
+ },
62
+ },
63
+ });
64
+
65
+ export type ButtonVariants = VariantProps<typeof buttonVariants>;
@@ -0,0 +1 @@
1
+ export * from "./button.styles";
@@ -0,0 +1,32 @@
1
+ import type {VariantProps} from "../../utils";
2
+
3
+ import {tv} from "tailwind-variants";
4
+
5
+ export const buttonGroupVariants = tv({
6
+ defaultVariants: {
7
+ fullWidth: false,
8
+ orientation: "horizontal",
9
+ },
10
+ slots: {
11
+ base: "button-group",
12
+ separator: "button-group__separator",
13
+ },
14
+ variants: {
15
+ fullWidth: {
16
+ false: {},
17
+ true: {
18
+ base: "button-group--full-width",
19
+ },
20
+ },
21
+ orientation: {
22
+ horizontal: {
23
+ base: "button-group--horizontal",
24
+ },
25
+ vertical: {
26
+ base: "button-group--vertical",
27
+ },
28
+ },
29
+ },
30
+ });
31
+
32
+ export type ButtonGroupVariants = VariantProps<typeof buttonGroupVariants>;
@@ -0,0 +1 @@
1
+ export * from "./button-group.styles";
@@ -0,0 +1,60 @@
1
+ import type {VariantProps} from "../../utils";
2
+
3
+ import {tv} from "tailwind-variants";
4
+
5
+ export const calendarVariants = tv({
6
+ defaultVariants: {},
7
+ slots: {
8
+ /** Root calendar container */
9
+ base: "calendar",
10
+ /** Calendar cell (td) */
11
+ cell: "calendar__cell",
12
+ /** Inner cell trigger button (full-cell hit target over the TD's circle) */
13
+ cellButton: "calendar__cell-button",
14
+ /** Cell indicator (small dot at bottom of cell) */
15
+ cellIndicator: "calendar__cell-indicator",
16
+ /** Calendar grid (table) */
17
+ grid: "calendar__grid",
18
+ /** Grid body (tbody) */
19
+ gridBody: "calendar__grid-body",
20
+ /** Grid header (thead) */
21
+ gridHeader: "calendar__grid-header",
22
+ /** Grid row (tr) */
23
+ gridRow: "calendar__grid-row",
24
+ /** Calendar header containing heading and navigation */
25
+ header: "calendar__header",
26
+ /** Header cell (th - day names) */
27
+ headerCell: "calendar__header-cell",
28
+ /** Month/year heading text */
29
+ heading: "calendar__heading",
30
+ /** Clickable heading button that cycles date/month/year views */
31
+ headingButton: "calendar__heading-button px-4 py-2",
32
+ /** Month-view grid (3 cols x 4 rows of month cells) */
33
+ monthGrid: "calendar__month-grid",
34
+ /** Month-view grid body (tbody) */
35
+ monthGridBody: "calendar__month-grid-body",
36
+ /** Month-view grid row (tr) */
37
+ monthGridRow: "calendar__month-grid-row",
38
+ /** Month cell (button per month) */
39
+ monthCell: "calendar__month-cell px-4 py-2",
40
+ /** Month cell label */
41
+ monthCellLabel: "calendar__month-cell-label",
42
+ /** Year-view grid (3 cols x 4 rows of year cells) */
43
+ yearGrid: "calendar__year-grid",
44
+ /** Year-view grid body (tbody) */
45
+ yearGridBody: "calendar__year-grid-body",
46
+ /** Year-view grid row (tr) */
47
+ yearGridRow: "calendar__year-grid-row",
48
+ /** Year cell (button per year) */
49
+ yearCell: "calendar__year-cell px-4 py-2",
50
+ /** Year cell label */
51
+ yearCellLabel: "calendar__year-cell-label",
52
+ /** Previous/Next navigation button */
53
+ navButton: "calendar__nav-button",
54
+ /** Navigation button icon */
55
+ navButtonIcon: "calendar__nav-button-icon",
56
+ },
57
+ variants: {},
58
+ });
59
+
60
+ export type CalendarVariants = VariantProps<typeof calendarVariants>;
@@ -0,0 +1 @@
1
+ export * from "./calendar.styles";
@@ -0,0 +1,15 @@
1
+ import type {VariantProps} from "../../utils";
2
+
3
+ import {tv} from "tailwind-variants";
4
+
5
+ export const calendarYearPickerVariants = tv({
6
+ slots: {
7
+ trigger: "calendar-year-picker__trigger",
8
+ triggerHeading: "calendar-year-picker__trigger-heading",
9
+ triggerIndicator: "calendar-year-picker__trigger-indicator",
10
+ yearCell: "calendar-year-picker__year-cell",
11
+ yearGrid: "calendar-year-picker__year-grid",
12
+ },
13
+ });
14
+
15
+ export type CalendarYearPickerVariants = VariantProps<typeof calendarYearPickerVariants>;
@@ -0,0 +1 @@
1
+ export * from "./calendar-year-picker.styles";
@@ -0,0 +1,65 @@
1
+ import type {VariantProps} from "../../utils";
2
+
3
+ import {tv} from "tailwind-variants";
4
+
5
+ const cardVariants = tv({
6
+ defaultVariants: {
7
+ variant: "default",
8
+ shadow: "sm",
9
+ radius: "lg",
10
+ isHoverable: false,
11
+ isPressable: false,
12
+ isDisabled: false,
13
+ fullWidth: false,
14
+ },
15
+ slots: {
16
+ base: "card",
17
+ content: "card__content",
18
+ description: "card__description",
19
+ footer: "card__footer",
20
+ header: "card__header",
21
+ title: "card__title",
22
+ },
23
+ variants: {
24
+ variant: {
25
+ default: {base: "card--default"},
26
+ secondary: {base: "card--secondary"},
27
+ tertiary: {base: "card--tertiary"},
28
+ transparent: {base: "card--transparent"},
29
+ bordered: {base: "card--bordered"},
30
+ blurred: {base: "card--blurred"},
31
+ },
32
+ shadow: {
33
+ none: {base: "card--shadow-none"},
34
+ sm: {base: "card--shadow-sm"},
35
+ md: {base: "card--shadow-md"},
36
+ lg: {base: "card--shadow-lg"},
37
+ },
38
+ radius: {
39
+ none: {base: "card--radius-none"},
40
+ sm: {base: "card--radius-sm"},
41
+ md: {base: "card--radius-md"},
42
+ lg: {base: "card--radius-lg"},
43
+ xl: {base: ""},
44
+ },
45
+ isHoverable: {
46
+ true: {base: "card--hoverable"},
47
+ false: {},
48
+ },
49
+ isPressable: {
50
+ true: {base: "card--pressable"},
51
+ false: {},
52
+ },
53
+ isDisabled: {
54
+ true: {base: "card--disabled"},
55
+ false: {},
56
+ },
57
+ fullWidth: {
58
+ true: {base: "card--full-width"},
59
+ false: {},
60
+ },
61
+ },
62
+ });
63
+
64
+ export {cardVariants};
65
+ export type CardVariants = VariantProps<typeof cardVariants>;
@@ -0,0 +1 @@
1
+ export * from "./card.styles";
@@ -0,0 +1,27 @@
1
+ import type {VariantProps} from "../../utils";
2
+
3
+ import {tv} from "tailwind-variants";
4
+
5
+ export const checkboxVariants = tv({
6
+ defaultVariants: {
7
+ variant: "primary",
8
+ },
9
+ slots: {
10
+ base: "checkbox",
11
+ content: "checkbox__content",
12
+ control: "checkbox__control",
13
+ indicator: "checkbox__indicator",
14
+ },
15
+ variants: {
16
+ variant: {
17
+ primary: {
18
+ base: "checkbox--primary",
19
+ },
20
+ secondary: {
21
+ base: "checkbox--secondary",
22
+ },
23
+ },
24
+ },
25
+ });
26
+
27
+ export type CheckboxVariants = VariantProps<typeof checkboxVariants>;
@@ -0,0 +1 @@
1
+ export * from "./checkbox.styles";
@@ -0,0 +1,18 @@
1
+ import type {VariantProps} from "../../utils";
2
+
3
+ import {tv} from "tailwind-variants";
4
+
5
+ export const checkboxGroupVariants = tv({
6
+ base: "checkbox-group",
7
+ defaultVariants: {
8
+ variant: "primary",
9
+ },
10
+ variants: {
11
+ variant: {
12
+ primary: "checkbox-group--primary",
13
+ secondary: "checkbox-group--secondary",
14
+ },
15
+ },
16
+ });
17
+
18
+ export type CheckboxGroupVariants = VariantProps<typeof checkboxGroupVariants>;
@@ -0,0 +1 @@
1
+ export * from "./checkbox-group.styles";