@tribepad/themis 1.0.1 → 1.0.2

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 (301) hide show
  1. package/dist/elements/Accordion/index.js +1 -335
  2. package/dist/elements/Accordion/index.js.map +1 -1
  3. package/dist/elements/Accordion/index.mjs +1 -317
  4. package/dist/elements/Accordion/index.mjs.map +1 -1
  5. package/dist/elements/AlertDialog/AlertDialog.d.ts +43 -0
  6. package/dist/elements/AlertDialog/AlertDialog.d.ts.map +1 -0
  7. package/dist/elements/AlertDialog/AlertDialog.styles.d.ts +15 -0
  8. package/dist/elements/AlertDialog/AlertDialog.styles.d.ts.map +1 -0
  9. package/dist/elements/AlertDialog/AlertDialog.types.d.ts +72 -0
  10. package/dist/elements/AlertDialog/AlertDialog.types.d.ts.map +1 -0
  11. package/dist/elements/AlertDialog/index.d.ts +25 -0
  12. package/dist/elements/AlertDialog/index.d.ts.map +1 -0
  13. package/dist/elements/AlertDialog/index.js +3 -0
  14. package/dist/elements/AlertDialog/index.js.map +1 -0
  15. package/dist/elements/AlertDialog/index.mjs +3 -0
  16. package/dist/elements/AlertDialog/index.mjs.map +1 -0
  17. package/dist/elements/Avatar/index.js +1 -468
  18. package/dist/elements/Avatar/index.js.map +1 -1
  19. package/dist/elements/Avatar/index.mjs +1 -456
  20. package/dist/elements/Avatar/index.mjs.map +1 -1
  21. package/dist/elements/Badge/index.js +1 -243
  22. package/dist/elements/Badge/index.js.map +1 -1
  23. package/dist/elements/Badge/index.mjs +1 -234
  24. package/dist/elements/Badge/index.mjs.map +1 -1
  25. package/dist/elements/Breadcrumbs/index.js +1 -821
  26. package/dist/elements/Breadcrumbs/index.js.map +1 -1
  27. package/dist/elements/Breadcrumbs/index.mjs +1 -810
  28. package/dist/elements/Breadcrumbs/index.mjs.map +1 -1
  29. package/dist/elements/Button/Button.d.ts +26 -81
  30. package/dist/elements/Button/Button.d.ts.map +1 -1
  31. package/dist/elements/Button/Button.styles.d.ts +35 -0
  32. package/dist/elements/Button/Button.styles.d.ts.map +1 -0
  33. package/dist/elements/Button/Button.types.d.ts +20 -8
  34. package/dist/elements/Button/Button.types.d.ts.map +1 -1
  35. package/dist/elements/Button/index.js +1 -288
  36. package/dist/elements/Button/index.js.map +1 -1
  37. package/dist/elements/Button/index.mjs +1 -283
  38. package/dist/elements/Button/index.mjs.map +1 -1
  39. package/dist/elements/ButtonGroup/index.js +1 -237
  40. package/dist/elements/ButtonGroup/index.js.map +1 -1
  41. package/dist/elements/ButtonGroup/index.mjs +1 -222
  42. package/dist/elements/ButtonGroup/index.mjs.map +1 -1
  43. package/dist/elements/Card/index.js +1 -579
  44. package/dist/elements/Card/index.js.map +1 -1
  45. package/dist/elements/Card/index.mjs +1 -560
  46. package/dist/elements/Card/index.mjs.map +1 -1
  47. package/dist/elements/Carousel/Carousel.d.ts +1 -11
  48. package/dist/elements/Carousel/Carousel.d.ts.map +1 -1
  49. package/dist/elements/Carousel/LazyCarousel.d.ts +1 -1
  50. package/dist/elements/Carousel/LazyCarousel.d.ts.map +1 -1
  51. package/dist/elements/Carousel/index.js +1 -789
  52. package/dist/elements/Carousel/index.js.map +1 -1
  53. package/dist/elements/Carousel/index.mjs +1 -786
  54. package/dist/elements/Carousel/index.mjs.map +1 -1
  55. package/dist/elements/Chart/ChartContext.d.ts.map +1 -1
  56. package/dist/elements/Chart/index.js +1 -1842
  57. package/dist/elements/Chart/index.js.map +1 -1
  58. package/dist/elements/Chart/index.mjs +1 -1832
  59. package/dist/elements/Chart/index.mjs.map +1 -1
  60. package/dist/elements/Checkbox/index.js +1 -316
  61. package/dist/elements/Checkbox/index.js.map +1 -1
  62. package/dist/elements/Checkbox/index.mjs +1 -306
  63. package/dist/elements/Checkbox/index.mjs.map +1 -1
  64. package/dist/elements/CheckboxGroup/index.js +1 -455
  65. package/dist/elements/CheckboxGroup/index.js.map +1 -1
  66. package/dist/elements/CheckboxGroup/index.mjs +1 -439
  67. package/dist/elements/CheckboxGroup/index.mjs.map +1 -1
  68. package/dist/elements/Combobox/Combobox.d.ts +56 -0
  69. package/dist/elements/Combobox/Combobox.d.ts.map +1 -0
  70. package/dist/elements/Combobox/Combobox.styles.d.ts +29 -0
  71. package/dist/elements/Combobox/Combobox.styles.d.ts.map +1 -0
  72. package/dist/elements/Combobox/Combobox.types.d.ts +67 -0
  73. package/dist/elements/Combobox/Combobox.types.d.ts.map +1 -0
  74. package/dist/elements/Combobox/index.d.ts +20 -0
  75. package/dist/elements/Combobox/index.d.ts.map +1 -0
  76. package/dist/elements/Combobox/index.js +3 -0
  77. package/dist/elements/Combobox/index.js.map +1 -0
  78. package/dist/elements/Combobox/index.mjs +3 -0
  79. package/dist/elements/Combobox/index.mjs.map +1 -0
  80. package/dist/elements/DatePicker/DatePicker.d.ts +1 -1
  81. package/dist/elements/DatePicker/DatePicker.d.ts.map +1 -1
  82. package/dist/elements/DatePicker/index.js +1 -903
  83. package/dist/elements/DatePicker/index.js.map +1 -1
  84. package/dist/elements/DatePicker/index.mjs +1 -853
  85. package/dist/elements/DatePicker/index.mjs.map +1 -1
  86. package/dist/elements/Dropdown/Dropdown.d.ts +7 -15
  87. package/dist/elements/Dropdown/Dropdown.d.ts.map +1 -1
  88. package/dist/elements/Dropdown/Dropdown.styles.d.ts +22 -0
  89. package/dist/elements/Dropdown/Dropdown.styles.d.ts.map +1 -0
  90. package/dist/elements/Dropdown/index.d.ts +1 -0
  91. package/dist/elements/Dropdown/index.d.ts.map +1 -1
  92. package/dist/elements/Dropdown/index.js +1 -193
  93. package/dist/elements/Dropdown/index.js.map +1 -1
  94. package/dist/elements/Dropdown/index.mjs +1 -184
  95. package/dist/elements/Dropdown/index.mjs.map +1 -1
  96. package/dist/elements/FileField/index.js +1 -1539
  97. package/dist/elements/FileField/index.js.map +1 -1
  98. package/dist/elements/FileField/index.mjs +1 -1507
  99. package/dist/elements/FileField/index.mjs.map +1 -1
  100. package/dist/elements/FormLayout/index.js +1 -170
  101. package/dist/elements/FormLayout/index.js.map +1 -1
  102. package/dist/elements/FormLayout/index.mjs +1 -167
  103. package/dist/elements/FormLayout/index.mjs.map +1 -1
  104. package/dist/elements/Modal/Modal.d.ts +9 -14
  105. package/dist/elements/Modal/Modal.d.ts.map +1 -1
  106. package/dist/elements/Modal/Modal.styles.d.ts +29 -0
  107. package/dist/elements/Modal/Modal.styles.d.ts.map +1 -0
  108. package/dist/elements/Modal/index.d.ts +1 -0
  109. package/dist/elements/Modal/index.d.ts.map +1 -1
  110. package/dist/elements/Modal/index.js +1 -232
  111. package/dist/elements/Modal/index.js.map +1 -1
  112. package/dist/elements/Modal/index.mjs +1 -220
  113. package/dist/elements/Modal/index.mjs.map +1 -1
  114. package/dist/elements/NumberField/index.js +1 -666
  115. package/dist/elements/NumberField/index.js.map +1 -1
  116. package/dist/elements/NumberField/index.mjs +1 -654
  117. package/dist/elements/NumberField/index.mjs.map +1 -1
  118. package/dist/elements/OTPInput/OTPInput.d.ts.map +1 -1
  119. package/dist/elements/OTPInput/index.js +1 -734
  120. package/dist/elements/OTPInput/index.js.map +1 -1
  121. package/dist/elements/OTPInput/index.mjs +1 -732
  122. package/dist/elements/OTPInput/index.mjs.map +1 -1
  123. package/dist/elements/Pagination/Pagination.d.ts +45 -0
  124. package/dist/elements/Pagination/Pagination.d.ts.map +1 -0
  125. package/dist/elements/Pagination/Pagination.styles.d.ts +10 -0
  126. package/dist/elements/Pagination/Pagination.styles.d.ts.map +1 -0
  127. package/dist/elements/Pagination/Pagination.types.d.ts +55 -0
  128. package/dist/elements/Pagination/Pagination.types.d.ts.map +1 -0
  129. package/dist/elements/Pagination/index.d.ts +21 -0
  130. package/dist/elements/Pagination/index.d.ts.map +1 -0
  131. package/dist/elements/Pagination/index.js +3 -0
  132. package/dist/elements/Pagination/index.js.map +1 -0
  133. package/dist/elements/Pagination/index.mjs +3 -0
  134. package/dist/elements/Pagination/index.mjs.map +1 -0
  135. package/dist/elements/Panel/index.js +1 -330
  136. package/dist/elements/Panel/index.js.map +1 -1
  137. package/dist/elements/Panel/index.mjs +1 -323
  138. package/dist/elements/Panel/index.mjs.map +1 -1
  139. package/dist/elements/PasswordField/PasswordField.d.ts +27 -0
  140. package/dist/elements/PasswordField/PasswordField.d.ts.map +1 -0
  141. package/dist/elements/PasswordField/PasswordField.styles.d.ts +32 -0
  142. package/dist/elements/PasswordField/PasswordField.styles.d.ts.map +1 -0
  143. package/dist/elements/PasswordField/PasswordField.types.d.ts +100 -0
  144. package/dist/elements/PasswordField/PasswordField.types.d.ts.map +1 -0
  145. package/dist/elements/PasswordField/index.css +2 -0
  146. package/dist/elements/PasswordField/index.css.map +1 -0
  147. package/dist/elements/PasswordField/index.d.ts +20 -0
  148. package/dist/elements/PasswordField/index.d.ts.map +1 -0
  149. package/dist/elements/PasswordField/index.js +3 -0
  150. package/dist/elements/PasswordField/index.js.map +1 -0
  151. package/dist/elements/PasswordField/index.mjs +3 -0
  152. package/dist/elements/PasswordField/index.mjs.map +1 -0
  153. package/dist/elements/Progress/index.js +1 -187
  154. package/dist/elements/Progress/index.js.map +1 -1
  155. package/dist/elements/Progress/index.mjs +1 -181
  156. package/dist/elements/Progress/index.mjs.map +1 -1
  157. package/dist/elements/RadioGroup/index.js +1 -369
  158. package/dist/elements/RadioGroup/index.js.map +1 -1
  159. package/dist/elements/RadioGroup/index.mjs +1 -359
  160. package/dist/elements/RadioGroup/index.mjs.map +1 -1
  161. package/dist/elements/Resizable/index.js +1 -1580
  162. package/dist/elements/Resizable/index.js.map +1 -1
  163. package/dist/elements/Resizable/index.mjs +1 -1566
  164. package/dist/elements/Resizable/index.mjs.map +1 -1
  165. package/dist/elements/SearchField/SearchField.d.ts +27 -0
  166. package/dist/elements/SearchField/SearchField.d.ts.map +1 -0
  167. package/dist/elements/SearchField/SearchField.styles.d.ts +32 -0
  168. package/dist/elements/SearchField/SearchField.styles.d.ts.map +1 -0
  169. package/dist/elements/SearchField/SearchField.types.d.ts +45 -0
  170. package/dist/elements/SearchField/SearchField.types.d.ts.map +1 -0
  171. package/dist/elements/SearchField/index.css +2 -0
  172. package/dist/elements/SearchField/index.css.map +1 -0
  173. package/dist/elements/SearchField/index.d.ts +21 -0
  174. package/dist/elements/SearchField/index.d.ts.map +1 -0
  175. package/dist/elements/SearchField/index.js +3 -0
  176. package/dist/elements/SearchField/index.js.map +1 -0
  177. package/dist/elements/SearchField/index.mjs +3 -0
  178. package/dist/elements/SearchField/index.mjs.map +1 -0
  179. package/dist/elements/Select/Select.d.ts +19 -48
  180. package/dist/elements/Select/Select.d.ts.map +1 -1
  181. package/dist/elements/Select/Select.styles.d.ts +55 -0
  182. package/dist/elements/Select/Select.styles.d.ts.map +1 -0
  183. package/dist/elements/Select/index.js +1 -589
  184. package/dist/elements/Select/index.js.map +1 -1
  185. package/dist/elements/Select/index.mjs +1 -582
  186. package/dist/elements/Select/index.mjs.map +1 -1
  187. package/dist/elements/Skeleton/index.js +1 -82
  188. package/dist/elements/Skeleton/index.js.map +1 -1
  189. package/dist/elements/Skeleton/index.mjs +1 -78
  190. package/dist/elements/Skeleton/index.mjs.map +1 -1
  191. package/dist/elements/Switch/index.js +1 -179
  192. package/dist/elements/Switch/index.js.map +1 -1
  193. package/dist/elements/Switch/index.mjs +1 -173
  194. package/dist/elements/Switch/index.mjs.map +1 -1
  195. package/dist/elements/Table/Table.d.ts +3 -24
  196. package/dist/elements/Table/Table.d.ts.map +1 -1
  197. package/dist/elements/Table/Table.styles.d.ts +24 -0
  198. package/dist/elements/Table/Table.styles.d.ts.map +1 -0
  199. package/dist/elements/Table/index.js +1 -595
  200. package/dist/elements/Table/index.js.map +1 -1
  201. package/dist/elements/Table/index.mjs +1 -578
  202. package/dist/elements/Table/index.mjs.map +1 -1
  203. package/dist/elements/Tabs/index.js +1 -337
  204. package/dist/elements/Tabs/index.js.map +1 -1
  205. package/dist/elements/Tabs/index.mjs +1 -320
  206. package/dist/elements/Tabs/index.mjs.map +1 -1
  207. package/dist/elements/TextField/TextField.d.ts +6 -42
  208. package/dist/elements/TextField/TextField.d.ts.map +1 -1
  209. package/dist/elements/TextField/TextField.hooks.d.ts +63 -0
  210. package/dist/elements/TextField/TextField.hooks.d.ts.map +1 -0
  211. package/dist/elements/TextField/TextField.icons.d.ts +19 -0
  212. package/dist/elements/TextField/TextField.icons.d.ts.map +1 -0
  213. package/dist/elements/TextField/TextField.styles.d.ts +37 -0
  214. package/dist/elements/TextField/TextField.styles.d.ts.map +1 -0
  215. package/dist/elements/TextField/TextField.types.d.ts +3 -0
  216. package/dist/elements/TextField/TextField.types.d.ts.map +1 -1
  217. package/dist/elements/TextField/index.css +1 -22
  218. package/dist/elements/TextField/index.css.map +1 -1
  219. package/dist/elements/TextField/index.js +1 -902
  220. package/dist/elements/TextField/index.js.map +1 -1
  221. package/dist/elements/TextField/index.mjs +1 -882
  222. package/dist/elements/TextField/index.mjs.map +1 -1
  223. package/dist/elements/TimeField/index.js +1 -254
  224. package/dist/elements/TimeField/index.js.map +1 -1
  225. package/dist/elements/TimeField/index.mjs +1 -238
  226. package/dist/elements/TimeField/index.mjs.map +1 -1
  227. package/dist/elements/Toast/Toast.d.ts +0 -22
  228. package/dist/elements/Toast/Toast.d.ts.map +1 -1
  229. package/dist/elements/Toast/index.js +1 -737
  230. package/dist/elements/Toast/index.js.map +1 -1
  231. package/dist/elements/Toast/index.mjs +1 -724
  232. package/dist/elements/Toast/index.mjs.map +1 -1
  233. package/dist/elements/Tooltip/index.js +1 -323
  234. package/dist/elements/Tooltip/index.js.map +1 -1
  235. package/dist/elements/Tooltip/index.mjs +1 -310
  236. package/dist/elements/Tooltip/index.mjs.map +1 -1
  237. package/dist/elements/index.css +1 -22
  238. package/dist/elements/index.css.map +1 -1
  239. package/dist/elements/index.d.ts +13 -1
  240. package/dist/elements/index.d.ts.map +1 -1
  241. package/dist/elements/index.js +1 -12455
  242. package/dist/elements/index.js.map +1 -1
  243. package/dist/elements/index.mjs +1 -12233
  244. package/dist/elements/index.mjs.map +1 -1
  245. package/dist/index.css +1 -22
  246. package/dist/index.css.map +1 -1
  247. package/dist/index.js +2 -12490
  248. package/dist/index.js.map +1 -1
  249. package/dist/index.mjs +2 -12262
  250. package/dist/index.mjs.map +1 -1
  251. package/dist/schemas/index.js +2 -54
  252. package/dist/schemas/index.js.map +1 -1
  253. package/dist/schemas/index.mjs +2 -48
  254. package/dist/schemas/index.mjs.map +1 -1
  255. package/dist/styles/defaults.css +151 -0
  256. package/dist/styles/index.js +1 -166
  257. package/dist/styles/index.js.map +1 -1
  258. package/dist/styles/index.mjs +1 -129
  259. package/dist/styles/index.mjs.map +1 -1
  260. package/dist/utils/index.js +1 -12
  261. package/dist/utils/index.js.map +1 -1
  262. package/dist/utils/index.mjs +1 -10
  263. package/dist/utils/index.mjs.map +1 -1
  264. package/package.json +9 -7
  265. package/src/elements/Accordion/Accordion.stories.tsx +1 -1
  266. package/src/elements/AlertDialog/AlertDialog.stories.tsx +124 -0
  267. package/src/elements/Avatar/Avatar.stories.tsx +1 -1
  268. package/src/elements/Badge/Badge.stories.tsx +1 -1
  269. package/src/elements/Breadcrumbs/Breadcrumbs.stories.tsx +1 -1
  270. package/src/elements/Button/Button.stories.tsx +1 -1
  271. package/src/elements/ButtonGroup/ButtonGroup.stories.tsx +1 -1
  272. package/src/elements/Card/Card.stories.tsx +1 -1
  273. package/src/elements/Carousel/Carousel.stories.tsx +1 -1
  274. package/src/elements/Chart/Chart.stories.tsx +1 -1
  275. package/src/elements/Checkbox/Checkbox.stories.tsx +1 -1
  276. package/src/elements/CheckboxGroup/CheckboxGroup.stories.tsx +1 -1
  277. package/src/elements/Combobox/Combobox.stories.tsx +133 -0
  278. package/src/elements/DatePicker/DatePicker.stories.tsx +1 -1
  279. package/src/elements/Dropdown/Dropdown.stories.tsx +1 -1
  280. package/src/elements/FileField/FileField.stories.tsx +1 -1
  281. package/src/elements/FileField/FileProgress.stories.tsx +1 -1
  282. package/src/elements/FormLayout/FormLayout.stories.tsx +1 -1
  283. package/src/elements/Modal/Modal.stories.tsx +1 -1
  284. package/src/elements/NumberField/NumberField.stories.tsx +1 -1
  285. package/src/elements/OTPInput/OTPInput.stories.tsx +1 -1
  286. package/src/elements/Pagination/Pagination.stories.tsx +203 -0
  287. package/src/elements/Panel/Panel.stories.tsx +1 -1
  288. package/src/elements/PasswordField/PasswordField.stories.tsx +167 -0
  289. package/src/elements/Progress/Progress.stories.tsx +1 -1
  290. package/src/elements/RadioGroup/RadioGroup.stories.tsx +1 -1
  291. package/src/elements/Resizable/Resizable.stories.tsx +1 -1
  292. package/src/elements/SearchField/SearchField.stories.tsx +146 -0
  293. package/src/elements/Select/Select.stories.tsx +1 -1
  294. package/src/elements/Skeleton/Skeleton.stories.tsx +1 -1
  295. package/src/elements/Switch/Switch.stories.tsx +1 -1
  296. package/src/elements/Table/Table.stories.tsx +1 -1
  297. package/src/elements/Tabs/Tabs.stories.tsx +1 -1
  298. package/src/elements/TextField/TextField.stories.tsx +1 -1
  299. package/src/elements/TimeField/TimeField.stories.tsx +1 -1
  300. package/src/elements/Toast/Toast.stories.tsx +1 -1
  301. package/src/elements/Tooltip/Tooltip.stories.tsx +1 -1
@@ -1,581 +1,3 @@
1
1
  "use client";
2
- 'use strict';
3
-
4
- var react = require('react');
5
- var lucideReact = require('lucide-react');
6
- var clsx = require('clsx');
7
- var tailwindMerge = require('tailwind-merge');
8
- var reactAriaComponents = require('react-aria-components');
9
- var classVarianceAuthority = require('class-variance-authority');
10
- var jsxRuntime = require('react/jsx-runtime');
11
- var zod = require('zod');
12
-
13
- // src/elements/Card/Card.tsx
14
- function cn(...inputs) {
15
- return tailwindMerge.twMerge(clsx.clsx(inputs));
16
- }
17
- var PRESSED_STYLES = "data-[pressed]:scale-[0.97]";
18
- var HOVER_STYLES = "data-[hovered]:shadow-md";
19
- var HIGH_CONTRAST_HOVER = "hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground";
20
- var HIGH_CONTRAST_PRESSED = "hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground";
21
- var ButtonGroupContext = react.createContext(null);
22
- ButtonGroupContext.displayName = "ButtonGroupContext";
23
- function useButtonGroupContext() {
24
- return react.useContext(ButtonGroupContext);
25
- }
26
- var ButtonGroupItemContext = react.createContext(null);
27
- ButtonGroupItemContext.displayName = "ButtonGroupItemContext";
28
- function useButtonGroupItemContext() {
29
- return react.useContext(ButtonGroupItemContext);
30
- }
31
- classVarianceAuthority.cva("inline-flex items-center gap-0", {
32
- variants: {
33
- orientation: {
34
- horizontal: "flex-row",
35
- vertical: "flex-col w-full"
36
- }
37
- },
38
- defaultVariants: {
39
- orientation: "horizontal"
40
- }
41
- });
42
- var buttonGroupItemVariants = classVarianceAuthority.cva("", {
43
- variants: {
44
- orientation: {
45
- // min-w-[44px] ensures visual layer fills touch target width (for icon buttons)
46
- horizontal: "min-w-[44px]",
47
- // flex (overrides inline-flex) + min-h-[44px] makes visual layer fill touch target,
48
- // eliminating gaps between stacked buttons in vertical orientation
49
- vertical: "flex min-h-[44px]"
50
- },
51
- position: {
52
- first: "",
53
- middle: "",
54
- last: "",
55
- only: ""
56
- // Single button - no modifications needed
57
- }
58
- },
59
- compoundVariants: [
60
- // ==========================================================================
61
- // Horizontal Orientation
62
- // ==========================================================================
63
- {
64
- orientation: "horizontal",
65
- position: "first",
66
- className: "rounded-r-none border-r-0"
67
- },
68
- {
69
- orientation: "horizontal",
70
- position: "middle",
71
- className: "rounded-none border-r-0"
72
- },
73
- {
74
- orientation: "horizontal",
75
- position: "last",
76
- className: "rounded-l-none"
77
- },
78
- // ==========================================================================
79
- // Vertical Orientation
80
- // Note: w-full is handled by Button's effectiveFullWidth for both layers
81
- // ==========================================================================
82
- {
83
- orientation: "vertical",
84
- position: "first",
85
- className: "rounded-b-none border-b-0"
86
- },
87
- {
88
- orientation: "vertical",
89
- position: "middle",
90
- className: "rounded-none border-b-0"
91
- },
92
- {
93
- orientation: "vertical",
94
- position: "last",
95
- className: "rounded-t-none"
96
- }
97
- ],
98
- defaultVariants: {
99
- orientation: "horizontal",
100
- position: "only"
101
- }
102
- });
103
- classVarianceAuthority.cva("bg-[var(--border)]", {
104
- variants: {
105
- orientation: {
106
- horizontal: "w-px h-6 mx-1",
107
- vertical: "h-px w-full my-1"
108
- }
109
- },
110
- defaultVariants: {
111
- orientation: "horizontal"
112
- }
113
- });
114
- var buttonOuterVariants = classVarianceAuthority.cva(
115
- "inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",
116
- {
117
- variants: {
118
- fullWidth: {
119
- true: "w-full",
120
- false: ""
121
- },
122
- inVerticalGroup: {
123
- true: "items-stretch",
124
- false: "items-center"
125
- }
126
- },
127
- defaultVariants: {
128
- fullWidth: false,
129
- inVerticalGroup: false
130
- }
131
- }
132
- );
133
- var buttonVisualVariants = classVarianceAuthority.cva(
134
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer",
135
- {
136
- variants: {
137
- variant: {
138
- default: "bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] data-[pressed]:bg-[var(--primary-action)]/80",
139
- destructive: "bg-[var(--destructive-background)] text-[var(--destructive-foreground)] shadow-md hover:bg-[var(--destructive-background)]/90 data-[pressed]:bg-[var(--destructive-background)]/80",
140
- outline: "border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)] data-[pressed]:bg-[var(--input-border)]",
141
- secondary: "bg-[var(--secondary)] text-[var(--secondary-foreground)] shadow-md hover:bg-[var(--secondary)]/80 data-[pressed]:bg-[var(--secondary)]/70",
142
- ghost: "hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)] data-[pressed]:bg-[var(--accent)]",
143
- link: "text-[var(--text-link)] underline-offset-4 hover:underline data-[pressed]:text-[var(--text-link-hover)]"
144
- },
145
- fullWidth: {
146
- true: "w-full",
147
- false: ""
148
- },
149
- visualSize: {
150
- default: "h-10 px-4 py-2",
151
- sm: "h-9 rounded-md px-3 text-xs",
152
- lg: "h-11 rounded-md px-8",
153
- icon: "h-10 w-10",
154
- dot: "h-5 w-5 rounded-full p-0 min-h-0 min-w-0"
155
- },
156
- paywall: {
157
- true: "!bg-[var(--paywall)] !text-[var(--paywall-foreground)] !shadow-md hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",
158
- false: ""
159
- }
160
- },
161
- defaultVariants: {
162
- variant: "default",
163
- visualSize: "default",
164
- paywall: false
165
- }
166
- }
167
- );
168
- var Button = react.memo(react.forwardRef(
169
- ({
170
- className,
171
- buttonVisualClassName,
172
- variant,
173
- size,
174
- visualSize,
175
- fullWidth,
176
- loading = false,
177
- loadingText = "Loading...",
178
- shortcut,
179
- children,
180
- isDisabled,
181
- paywall = false,
182
- paywallRedirect,
183
- paywallDescription,
184
- onPress,
185
- ...props
186
- }, ref) => {
187
- const paywallDescriptionId = react.useId();
188
- const groupContext = useButtonGroupContext();
189
- const itemContext = useButtonGroupItemContext();
190
- const effectiveVariant = variant ?? groupContext?.variant ?? "default";
191
- const effectiveSize = size ?? groupContext?.size;
192
- const effectiveIsDisabled = isDisabled ?? groupContext?.isDisabled ?? false;
193
- const isInVerticalGroup = groupContext?.orientation === "vertical";
194
- const effectiveFullWidth = fullWidth || isInVerticalGroup;
195
- const positionClassName = itemContext ? buttonGroupItemVariants({
196
- orientation: groupContext?.orientation ?? "horizontal",
197
- position: itemContext.position
198
- }) : "";
199
- const effectiveVisualSize = visualSize ?? effectiveSize ?? "default";
200
- if (process.env.NODE_ENV !== "production") {
201
- if ((effectiveVisualSize === "dot" || effectiveVisualSize === "icon") && !props["aria-label"] && !children) {
202
- console.warn(
203
- '[Button] visualSize="dot" or "icon" requires aria-label when no visible text is provided (WCAG 1.1.1)'
204
- );
205
- }
206
- }
207
- const handlePress = (e) => {
208
- if (paywall) {
209
- if (paywallRedirect) {
210
- window.open(paywallRedirect, "_blank", "noopener,noreferrer");
211
- }
212
- return;
213
- }
214
- onPress?.(e);
215
- };
216
- const computedIsDisabled = effectiveIsDisabled || loading || void 0;
217
- return /* @__PURE__ */ jsxRuntime.jsx(
218
- reactAriaComponents.Button,
219
- {
220
- ref,
221
- isDisabled: computedIsDisabled,
222
- "aria-disabled": paywall ? true : void 0,
223
- "aria-describedby": paywall ? paywallDescriptionId : void 0,
224
- onPress: handlePress,
225
- className: cn(buttonOuterVariants({ fullWidth: effectiveFullWidth, inVerticalGroup: isInVerticalGroup }), className),
226
- ...props,
227
- children: (renderProps) => (
228
- /* Layer 2: Visual Button */
229
- /* @__PURE__ */ jsxRuntime.jsxs(
230
- "span",
231
- {
232
- className: cn(
233
- buttonVisualVariants({
234
- variant: effectiveVariant,
235
- visualSize: effectiveVisualSize,
236
- paywall,
237
- fullWidth: effectiveFullWidth
238
- }),
239
- // Position styling from ButtonGroup context (border-radius adjustments)
240
- positionClassName,
241
- buttonVisualClassName,
242
- // Layer 2 interaction styles (no focus - focus ring is on Layer 1)
243
- PRESSED_STYLES,
244
- HOVER_STYLES,
245
- HIGH_CONTRAST_HOVER,
246
- HIGH_CONTRAST_PRESSED
247
- ),
248
- "data-pressed": renderProps.isPressed || void 0,
249
- children: [
250
- loading && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
251
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "motion-safe:animate-spin", "aria-hidden": "true" }),
252
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", "aria-live": "polite", children: loadingText })
253
- ] }),
254
- !loading && children,
255
- paywall && /* @__PURE__ */ jsxRuntime.jsx(
256
- lucideReact.Zap,
257
- {
258
- "data-testid": "zap-icon",
259
- "aria-hidden": "true",
260
- className: "ml-1"
261
- }
262
- ),
263
- paywall && /* @__PURE__ */ jsxRuntime.jsxs("span", { id: paywallDescriptionId, className: "sr-only", children: [
264
- "Premium feature: ",
265
- paywallDescription || "Upgrade required to access this feature"
266
- ] }),
267
- renderProps.isFocusVisible && shortcut && /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "ml-auto hidden text-xs opacity-60 lg:inline", children: shortcut }),
268
- renderProps.isPressed && /* @__PURE__ */ jsxRuntime.jsx(
269
- "span",
270
- {
271
- className: "absolute inset-0 rounded-[inherit] bg-current opacity-10 motion-safe:animate-in motion-safe:zoom-in-95",
272
- "aria-hidden": "true"
273
- }
274
- )
275
- ]
276
- }
277
- )
278
- )
279
- }
280
- );
281
- }
282
- ));
283
- Button.displayName = "Button";
284
- var BaseComponentPropsSchema = zod.z.object({
285
- // Styling
286
- className: zod.z.string().optional(),
287
- // React
288
- children: zod.z.any().optional(),
289
- // ReactNode not directly supported by Zod
290
- id: zod.z.string().optional(),
291
- // Accessibility (WCAG 2.2 AA requirements)
292
- "aria-label": zod.z.string().optional(),
293
- "aria-labelledby": zod.z.string().optional(),
294
- "aria-describedby": zod.z.string().optional(),
295
- "aria-live": zod.z.enum(["off", "polite", "assertive"]).optional(),
296
- "aria-hidden": zod.z.boolean().optional(),
297
- // Testing & Development
298
- "data-testid": zod.z.string().optional()
299
- });
300
-
301
- // src/elements/Card/Card.types.ts
302
- var FlipButtonPositionSchema = zod.z.enum([
303
- "top-right",
304
- "top-left",
305
- "bottom-right",
306
- "bottom-left"
307
- ]);
308
- var FlipButtonLabelSchema = zod.z.object({
309
- show: zod.z.string().optional(),
310
- hide: zod.z.string().optional()
311
- });
312
- var FlipButtonIconSchema = zod.z.object({
313
- /** Icon to show on front side button (default: RotateCcw) */
314
- front: zod.z.custom().optional(),
315
- /** Icon to show on back side button (default: same as front or RotateCcw) */
316
- back: zod.z.custom().optional()
317
- });
318
- var CardPropsSchema = BaseComponentPropsSchema.extend({
319
- // Flip functionality
320
- /** Enable flip animation feature */
321
- flippable: zod.z.boolean().optional().default(false),
322
- /** Content to display on the back side of the card */
323
- backContent: zod.z.custom().optional(),
324
- /** Controlled mode: current flip state */
325
- isFlipped: zod.z.boolean().optional(),
326
- /** Uncontrolled mode: initial flip state */
327
- defaultFlipped: zod.z.boolean().optional().default(false),
328
- /** Callback fired when flip state changes */
329
- onFlipChange: zod.z.custom().optional(),
330
- // Flip button configuration
331
- /** Position of the flip button on the card */
332
- flipButtonPosition: FlipButtonPositionSchema.optional().default("top-right"),
333
- /** Custom labels for the flip button title attribute */
334
- flipButtonLabel: FlipButtonLabelSchema.optional(),
335
- /** Custom icons for the flip button (default: RotateCcw) */
336
- flipButtonIcon: FlipButtonIconSchema.optional(),
337
- /** Duration of flip animation in milliseconds */
338
- flipDuration: zod.z.number().optional().default(600)
339
- });
340
- var CardHeaderPropsSchema = BaseComponentPropsSchema.extend({
341
- children: zod.z.custom()
342
- });
343
- var CardTitlePropsSchema = BaseComponentPropsSchema.extend({
344
- /** Heading level (h1-h6) - defaults to h3 */
345
- as: zod.z.enum(["h1", "h2", "h3", "h4", "h5", "h6"]).optional().default("h3"),
346
- children: zod.z.custom()
347
- });
348
- var CardDescriptionPropsSchema = BaseComponentPropsSchema.extend({
349
- children: zod.z.custom()
350
- });
351
- var CardContentPropsSchema = BaseComponentPropsSchema.extend({
352
- children: zod.z.custom()
353
- });
354
- var CardFooterPropsSchema = BaseComponentPropsSchema.extend({
355
- children: zod.z.custom()
356
- });
357
- var CardActionPropsSchema = BaseComponentPropsSchema.extend({
358
- children: zod.z.custom()
359
- });
360
- var flipButtonPositionVariants = classVarianceAuthority.cva(
361
- [
362
- "absolute z-10 min-h-[44px] min-w-[44px] p-2",
363
- "flex items-center justify-center",
364
- "rounded-full bg-[var(--accent-background)]",
365
- "text-[var(--primary-action)] hover:text-[var(--primary-action-hover)]",
366
- "transition-colors duration-200",
367
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]"
368
- ],
369
- {
370
- variants: {
371
- position: {
372
- "top-right": "top-2 right-2",
373
- "top-left": "top-2 left-2",
374
- "bottom-right": "bottom-2 right-2",
375
- "bottom-left": "bottom-2 left-2"
376
- }
377
- },
378
- defaultVariants: {
379
- position: "top-right"
380
- }
381
- }
382
- );
383
- var Card = react.forwardRef(
384
- (props, ref) => {
385
- const {
386
- children,
387
- className,
388
- flippable = false,
389
- backContent,
390
- isFlipped: controlledFlipped,
391
- defaultFlipped = false,
392
- onFlipChange,
393
- flipButtonPosition = "top-right",
394
- flipButtonLabel,
395
- flipButtonIcon,
396
- flipDuration = 600,
397
- ...rest
398
- } = props;
399
- const [internalFlipped, setInternalFlipped] = react.useState(defaultFlipped);
400
- const isControlled = controlledFlipped !== void 0;
401
- const flipped = isControlled ? controlledFlipped : internalFlipped;
402
- const handleFlip = react.useCallback(() => {
403
- const newState = !flipped;
404
- if (!isControlled) {
405
- setInternalFlipped(newState);
406
- }
407
- onFlipChange?.(newState);
408
- }, [flipped, isControlled, onFlipChange]);
409
- if (!flippable) {
410
- return /* @__PURE__ */ jsxRuntime.jsx(
411
- "article",
412
- {
413
- ref,
414
- className: cn(
415
- "rounded-lg border border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)] shadow-sm",
416
- className
417
- ),
418
- ...rest,
419
- children
420
- }
421
- );
422
- }
423
- const showLabel = flipButtonLabel?.show ?? "Show more details";
424
- const hideLabel = flipButtonLabel?.hide ?? "Show less details";
425
- const defaultIcon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RotateCcw, { className: "h-5 w-5", "aria-hidden": "true" });
426
- const frontIcon = flipButtonIcon?.front ?? defaultIcon;
427
- const backIcon = flipButtonIcon?.back ?? flipButtonIcon?.front ?? defaultIcon;
428
- const FlipButton = ({ label, icon }) => /* @__PURE__ */ jsxRuntime.jsx(
429
- Button,
430
- {
431
- variant: "ghost",
432
- visualSize: "icon",
433
- "aria-hidden": "true",
434
- excludeFromTabOrder: true,
435
- onPress: handleFlip,
436
- className: flipButtonPositionVariants({ position: flipButtonPosition }),
437
- "aria-label": label,
438
- children: icon
439
- }
440
- );
441
- return /* @__PURE__ */ jsxRuntime.jsx(
442
- "article",
443
- {
444
- ref,
445
- className: cn("relative", className),
446
- style: { perspective: "1000px" },
447
- ...rest,
448
- children: /* @__PURE__ */ jsxRuntime.jsxs(
449
- "div",
450
- {
451
- className: cn(
452
- "relative transition-transform",
453
- "motion-reduce:transition-none"
454
- ),
455
- style: {
456
- transformStyle: "preserve-3d",
457
- transitionDuration: `${flipDuration}ms`,
458
- transform: flipped ? "rotateY(180deg)" : "rotateY(0deg)"
459
- },
460
- "data-flipped": flipped,
461
- children: [
462
- /* @__PURE__ */ jsxRuntime.jsxs(
463
- "div",
464
- {
465
- className: "relative rounded-lg border border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)] shadow-sm",
466
- style: { backfaceVisibility: "hidden" },
467
- "data-side": "front",
468
- children: [
469
- children,
470
- /* @__PURE__ */ jsxRuntime.jsx(FlipButton, { label: showLabel, icon: frontIcon })
471
- ]
472
- }
473
- ),
474
- /* @__PURE__ */ jsxRuntime.jsxs(
475
- "div",
476
- {
477
- className: "absolute inset-0 overflow-y-auto rounded-lg border border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)] shadow-sm",
478
- style: {
479
- backfaceVisibility: "hidden",
480
- transform: "rotateY(180deg)"
481
- },
482
- "data-side": "back",
483
- children: [
484
- backContent,
485
- /* @__PURE__ */ jsxRuntime.jsx(FlipButton, { label: hideLabel, icon: backIcon })
486
- ]
487
- }
488
- )
489
- ]
490
- }
491
- )
492
- }
493
- );
494
- }
495
- );
496
- Card.displayName = "Card";
497
- var CardHeader = react.forwardRef(
498
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
499
- "header",
500
- {
501
- ref,
502
- className: cn("flex flex-col space-y-1.5 p-6", className),
503
- ...props,
504
- children
505
- }
506
- )
507
- );
508
- CardHeader.displayName = "CardHeader";
509
- var CardTitle = react.forwardRef(
510
- ({ className, as: Comp = "h3", children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
511
- Comp,
512
- {
513
- ref,
514
- className: cn("text-2xl font-semibold leading-none tracking-tight", className),
515
- ...props,
516
- children
517
- }
518
- )
519
- );
520
- CardTitle.displayName = "CardTitle";
521
- var CardDescription = react.forwardRef(
522
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
523
- "p",
524
- {
525
- ref,
526
- className: cn("text-sm text-[var(--content-foreground-muted)]", className),
527
- ...props,
528
- children
529
- }
530
- )
531
- );
532
- CardDescription.displayName = "CardDescription";
533
- var CardContent = react.forwardRef(
534
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-6 pt-0", className), ...props, children })
535
- );
536
- CardContent.displayName = "CardContent";
537
- var CardFooter = react.forwardRef(
538
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
539
- "footer",
540
- {
541
- ref,
542
- className: cn("flex items-center p-6 pt-0", className),
543
- ...props,
544
- children
545
- }
546
- )
547
- );
548
- CardFooter.displayName = "CardFooter";
549
- var CardAction = react.forwardRef(
550
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
551
- "div",
552
- {
553
- ref,
554
- className: cn("ml-auto", className),
555
- ...props,
556
- children
557
- }
558
- )
559
- );
560
- CardAction.displayName = "CardAction";
561
-
562
- exports.Card = Card;
563
- exports.CardAction = CardAction;
564
- exports.CardActionPropsSchema = CardActionPropsSchema;
565
- exports.CardContent = CardContent;
566
- exports.CardContentPropsSchema = CardContentPropsSchema;
567
- exports.CardDescription = CardDescription;
568
- exports.CardDescriptionPropsSchema = CardDescriptionPropsSchema;
569
- exports.CardFooter = CardFooter;
570
- exports.CardFooterPropsSchema = CardFooterPropsSchema;
571
- exports.CardHeader = CardHeader;
572
- exports.CardHeaderPropsSchema = CardHeaderPropsSchema;
573
- exports.CardPropsSchema = CardPropsSchema;
574
- exports.CardTitle = CardTitle;
575
- exports.CardTitlePropsSchema = CardTitlePropsSchema;
576
- exports.FlipButtonIconSchema = FlipButtonIconSchema;
577
- exports.FlipButtonLabelSchema = FlipButtonLabelSchema;
578
- exports.FlipButtonPositionSchema = FlipButtonPositionSchema;
579
- exports.flipButtonPositionVariants = flipButtonPositionVariants;
580
- //# sourceMappingURL=index.js.map
2
+ 'use strict';var react=require('react'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),reactAriaComponents=require('react-aria-components'),classVarianceAuthority=require('class-variance-authority'),jsxRuntime=require('react/jsx-runtime'),zod=require('zod');function n(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var G=classVarianceAuthority.cva("inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",{variants:{fullWidth:{true:"w-full",false:""},inVerticalGroup:{true:"items-stretch",false:"items-center"}},defaultVariants:{fullWidth:false,inVerticalGroup:false}}),_=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer",{variants:{variant:{default:"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] data-[pressed]:bg-[var(--primary-action)]/80",destructive:"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] shadow-md hover:bg-[var(--destructive-background)]/90 data-[pressed]:bg-[var(--destructive-background)]/80",outline:"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)] data-[pressed]:bg-[var(--input-border)]",secondary:"bg-[var(--secondary)] text-[var(--secondary-foreground)] shadow-md hover:bg-[var(--secondary)]/80 data-[pressed]:bg-[var(--secondary)]/70",ghost:"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)] data-[pressed]:bg-[var(--accent)]",link:"text-[var(--text-link)] underline-offset-4 hover:underline data-[pressed]:text-[var(--text-link-hover)]"},fullWidth:{true:"w-full",false:""},visualSize:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3 text-xs",lg:"h-11 rounded-md px-8",icon:"h-10 w-10",dot:"h-5 w-5 rounded-full p-0 min-h-0 min-w-0"},paywall:{true:"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] !shadow-md hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",false:""}},defaultVariants:{variant:"default",visualSize:"default",paywall:false}});var k="data-[pressed]:scale-[0.97]";var M="data-[hovered]:shadow-md";var L="hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground",F="hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground";var K=react.createContext(null);K.displayName="ButtonGroupContext";function Q(){return react.useContext(K)}var X=react.createContext(null);X.displayName="ButtonGroupItemContext";function tt(){return react.useContext(X)}classVarianceAuthority.cva("inline-flex items-center gap-0",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col w-full"}},defaultVariants:{orientation:"horizontal"}});var et=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"min-w-[44px]",vertical:"flex min-h-[44px]"},position:{first:"",middle:"",last:"",only:""}},compoundVariants:[{orientation:"horizontal",position:"first",className:"rounded-r-none border-r-0"},{orientation:"horizontal",position:"middle",className:"rounded-none border-r-0"},{orientation:"horizontal",position:"last",className:"rounded-l-none"},{orientation:"vertical",position:"first",className:"rounded-b-none border-b-0"},{orientation:"vertical",position:"middle",className:"rounded-none border-b-0"},{orientation:"vertical",position:"last",className:"rounded-t-none"}],defaultVariants:{orientation:"horizontal",position:"only"}});classVarianceAuthority.cva("bg-[var(--border)]",{variants:{orientation:{horizontal:"w-px h-6 mx-1",vertical:"h-px w-full my-1"}},defaultVariants:{orientation:"horizontal"}});var I=react.memo(react.forwardRef(({className:e,buttonVisualClassName:o,variant:r,size:a,visualSize:h,fullWidth:w,loading:m=false,loadingText:A="Loading...",shortcut:v,children:S,isDisabled:P,paywall:s=false,paywallRedirect:N,paywallDescription:B,onPress:z,...T},x)=>{let p=react.useId(),c=Q(),H=tt(),R=r??c?.variant??"default",E=a??c?.size,D=P??c?.isDisabled??false,V=c?.orientation==="vertical",C=w||V,f=H?et({orientation:c?.orientation??"horizontal",position:H.position}):"",g=h??E??"default";return process.env.NODE_ENV!=="production"&&(g==="dot"||g==="icon")&&!T["aria-label"]&&!S&&console.warn('[Button] visualSize="dot" or "icon" requires aria-label when no visible text is provided (WCAG 1.1.1)'),jsxRuntime.jsx(reactAriaComponents.Button,{ref:x,isDisabled:D||m||void 0,"aria-disabled":s?true:void 0,"aria-describedby":s?p:void 0,onPress:y=>{if(s){N&&window.open(N,"_blank","noopener,noreferrer");return}z?.(y);},className:n(G({fullWidth:C,inVerticalGroup:V}),e),...T,children:y=>jsxRuntime.jsxs("span",{className:n(_({variant:R,visualSize:g,paywall:s,fullWidth:C}),f,o,k,M,L,F),"data-pressed":y.isPressed||void 0,children:[m&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"motion-safe:animate-spin","aria-hidden":"true"}),jsxRuntime.jsx("span",{className:"sr-only","aria-live":"polite",children:A})]}),!m&&S,s&&jsxRuntime.jsx(lucideReact.Zap,{"data-testid":"zap-icon","aria-hidden":"true",className:"ml-1"}),s&&jsxRuntime.jsxs("span",{id:p,className:"sr-only",children:["Premium feature: ",B||"Upgrade required to access this feature"]}),y.isFocusVisible&&v&&jsxRuntime.jsx("kbd",{className:"ml-auto hidden text-xs opacity-60 lg:inline",children:v}),y.isPressed&&jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-[inherit] bg-current opacity-10 motion-safe:animate-in motion-safe:zoom-in-95","aria-hidden":"true"})]})})}));I.displayName="Button";var l=zod.z.object({className:zod.z.string().optional(),children:zod.z.any().optional(),id:zod.z.string().optional(),"aria-label":zod.z.string().optional(),"aria-labelledby":zod.z.string().optional(),"aria-describedby":zod.z.string().optional(),"aria-live":zod.z.enum(["off","polite","assertive"]).optional(),"aria-hidden":zod.z.boolean().optional(),"data-testid":zod.z.string().optional()});var ot=zod.z.enum(["top-right","top-left","bottom-right","bottom-left"]),rt=zod.z.object({show:zod.z.string().optional(),hide:zod.z.string().optional()}),at=zod.z.object({front:zod.z.custom().optional(),back:zod.z.custom().optional()}),Pt=l.extend({flippable:zod.z.boolean().optional().default(false),backContent:zod.z.custom().optional(),isFlipped:zod.z.boolean().optional(),defaultFlipped:zod.z.boolean().optional().default(false),onFlipChange:zod.z.custom().optional(),flipButtonPosition:ot.optional().default("top-right"),flipButtonLabel:rt.optional(),flipButtonIcon:at.optional(),flipDuration:zod.z.number().optional().default(600)}),Nt=l.extend({children:zod.z.custom()}),Bt=l.extend({as:zod.z.enum(["h1","h2","h3","h4","h5","h6"]).optional().default("h3"),children:zod.z.custom()}),Tt=l.extend({children:zod.z.custom()}),Ht=l.extend({children:zod.z.custom()}),Et=l.extend({children:zod.z.custom()}),Vt=l.extend({children:zod.z.custom()}),W=classVarianceAuthority.cva(["absolute z-10 min-h-[44px] min-w-[44px] p-2","flex items-center justify-center","rounded-full bg-[var(--accent-background)]","text-[var(--primary-action)] hover:text-[var(--primary-action-hover)]","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]"],{variants:{position:{"top-right":"top-2 right-2","top-left":"top-2 left-2","bottom-right":"bottom-2 right-2","bottom-left":"bottom-2 left-2"}},defaultVariants:{position:"top-right"}});var nt=react.forwardRef((e,o)=>{let{children:r,className:a,flippable:h=false,backContent:w,isFlipped:m,defaultFlipped:A=false,onFlipChange:v,flipButtonPosition:S="top-right",flipButtonLabel:P,flipButtonIcon:s,flipDuration:N=600,...B}=e,[z,T]=react.useState(A),x=m!==void 0,p=x?m:z,c=react.useCallback(()=>{let f=!p;x||T(f),v?.(f);},[p,x,v]);if(!h)return jsxRuntime.jsx("article",{ref:o,className:n("rounded-lg border border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)] shadow-sm",a),...B,children:r});let H=P?.show??"Show more details",R=P?.hide??"Show less details",E=jsxRuntime.jsx(lucideReact.RotateCcw,{className:"h-5 w-5","aria-hidden":"true"}),D=s?.front??E,V=s?.back??s?.front??E,C=({label:f,icon:g})=>jsxRuntime.jsx(I,{variant:"ghost",visualSize:"icon","aria-hidden":true,excludeFromTabOrder:true,onPress:c,className:W({position:S}),"aria-label":f,children:g});return jsxRuntime.jsx("article",{ref:o,className:n("relative",a),style:{perspective:"1000px"},...B,children:jsxRuntime.jsxs("div",{className:n("relative transition-transform","motion-reduce:transition-none"),style:{transformStyle:"preserve-3d",transitionDuration:`${N}ms`,transform:p?"rotateY(180deg)":"rotateY(0deg)"},"data-flipped":p,children:[jsxRuntime.jsxs("div",{className:"relative rounded-lg border border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)] shadow-sm",style:{backfaceVisibility:"hidden"},"data-side":"front",children:[r,jsxRuntime.jsx(C,{label:H,icon:D})]}),jsxRuntime.jsxs("div",{className:"absolute inset-0 overflow-y-auto rounded-lg border border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)] shadow-sm",style:{backfaceVisibility:"hidden",transform:"rotateY(180deg)"},"data-side":"back",children:[w,jsxRuntime.jsx(C,{label:R,icon:V})]})]})})});nt.displayName="Card";var it=react.forwardRef(({className:e,children:o,...r},a)=>jsxRuntime.jsx("header",{ref:a,className:n("flex flex-col space-y-1.5 p-6",e),...r,children:o}));it.displayName="CardHeader";var st=react.forwardRef(({className:e,as:o="h3",children:r,...a},h)=>jsxRuntime.jsx(o,{ref:h,className:n("text-2xl font-semibold leading-none tracking-tight",e),...a,children:r}));st.displayName="CardTitle";var dt=react.forwardRef(({className:e,children:o,...r},a)=>jsxRuntime.jsx("p",{ref:a,className:n("text-sm text-[var(--content-foreground-muted)]",e),...r,children:o}));dt.displayName="CardDescription";var lt=react.forwardRef(({className:e,children:o,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:n("p-6 pt-0",e),...r,children:o}));lt.displayName="CardContent";var pt=react.forwardRef(({className:e,children:o,...r},a)=>jsxRuntime.jsx("footer",{ref:a,className:n("flex items-center p-6 pt-0",e),...r,children:o}));pt.displayName="CardFooter";var ct=react.forwardRef(({className:e,children:o,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:n("ml-auto",e),...r,children:o}));ct.displayName="CardAction";exports.Card=nt;exports.CardAction=ct;exports.CardActionPropsSchema=Vt;exports.CardContent=lt;exports.CardContentPropsSchema=Ht;exports.CardDescription=dt;exports.CardDescriptionPropsSchema=Tt;exports.CardFooter=pt;exports.CardFooterPropsSchema=Et;exports.CardHeader=it;exports.CardHeaderPropsSchema=Nt;exports.CardPropsSchema=Pt;exports.CardTitle=st;exports.CardTitlePropsSchema=Bt;exports.FlipButtonIconSchema=at;exports.FlipButtonLabelSchema=rt;exports.FlipButtonPositionSchema=ot;exports.flipButtonPositionVariants=W;//# sourceMappingURL=index.js.map
581
3
  //# sourceMappingURL=index.js.map