@forte-ui/react 1.0.0-alpha.1

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 (304) hide show
  1. package/README.md +240 -0
  2. package/dist/Accordion-9JunkjgY.js +111 -0
  3. package/dist/Alert-Cn_WUF3L.js +183 -0
  4. package/dist/AspectRatio-gSjpTVk-.js +39 -0
  5. package/dist/Avatar-BuitDluH.js +87 -0
  6. package/dist/Badge-sArNWMre.js +33 -0
  7. package/dist/Breadcrumb-Cq7tFtMX.js +170 -0
  8. package/dist/Button-AiyKnx5I.js +42 -0
  9. package/dist/ButtonGroup-C-CrwPXP.js +54 -0
  10. package/dist/Calendar-D7Q-QJ_e.js +503 -0
  11. package/dist/Checkbox-DfNbmOed.js +56 -0
  12. package/dist/Collapsible-D8UKiGip.js +86 -0
  13. package/dist/ColorPicker-B-eCI31W.js +612 -0
  14. package/dist/Combobox-D-BN-Tvp.js +302 -0
  15. package/dist/ContextMenu-D81uDaMG.js +44 -0
  16. package/dist/DatePicker-CfkMsaI-.js +192 -0
  17. package/dist/Dialog-_n8FpFs5.js +432 -0
  18. package/dist/Drawer-DKQF3OO7.js +158 -0
  19. package/dist/Field-FLFEO70D.js +58 -0
  20. package/dist/Fieldset-CYhh71Qt.js +28 -0
  21. package/dist/Form-DVPmW9XV.js +17 -0
  22. package/dist/Input-BgGWhO2q.js +18 -0
  23. package/dist/InputGroup-DsZyDXNn.js +89 -0
  24. package/dist/Menu-CKu9xE2h.js +261 -0
  25. package/dist/Menubar-Dax027Db.js +19 -0
  26. package/dist/NavList-DGvcIoJm.js +176 -0
  27. package/dist/NavigationMenu-BayQkUUb.js +209 -0
  28. package/dist/NumberField-P55SA8T7.js +191 -0
  29. package/dist/OTPField-CjHvBNSN.js +55 -0
  30. package/dist/Popover-BXhn2Wwt.js +142 -0
  31. package/dist/PreviewCard-Dnitrky0.js +99 -0
  32. package/dist/Progress-BlomDp-X.js +81 -0
  33. package/dist/ProgressCircle-j6XBl0fk.js +112 -0
  34. package/dist/Radio-BIcX4INJ.js +37 -0
  35. package/dist/Resizable-7nJJM97e.js +609 -0
  36. package/dist/ScrollArea-CBMGJ6hh.js +83 -0
  37. package/dist/Select-BP-zvdXm.js +237 -0
  38. package/dist/Separator-DewJBzaJ.js +21 -0
  39. package/dist/Skeleton-zr6ObCCq.js +79 -0
  40. package/dist/Slider-Bh8_cti1.js +104 -0
  41. package/dist/Spinner-BF0uD4hR.js +53 -0
  42. package/dist/Switch-OBewMMvM.js +39 -0
  43. package/dist/Tabs-LgkSbPSF.js +132 -0
  44. package/dist/Textarea-CqZJL41e.js +51 -0
  45. package/dist/Toast-BWayxAcd.js +304 -0
  46. package/dist/Toggle-BrhMnkF5.js +45 -0
  47. package/dist/Toolbar-OmOVCk3i.js +88 -0
  48. package/dist/Tooltip-CI4chsRw.js +101 -0
  49. package/dist/clsx-By2n9mTe.js +16 -0
  50. package/dist/cn.d.ts +8 -0
  51. package/dist/cn.js +11 -0
  52. package/dist/components/accordion/Accordion.d.ts +117 -0
  53. package/dist/components/accordion/Accordion.js +3 -0
  54. package/dist/components/accordion/index.d.ts +2 -0
  55. package/dist/components/accordion/index.js +2 -0
  56. package/dist/components/alert/Alert.d.ts +167 -0
  57. package/dist/components/alert/Alert.js +3 -0
  58. package/dist/components/alert/index.d.ts +2 -0
  59. package/dist/components/alert/index.js +2 -0
  60. package/dist/components/aspect-ratio/AspectRatio.d.ts +128 -0
  61. package/dist/components/aspect-ratio/AspectRatio.js +3 -0
  62. package/dist/components/aspect-ratio/index.d.ts +2 -0
  63. package/dist/components/aspect-ratio/index.js +2 -0
  64. package/dist/components/avatar/Avatar.d.ts +176 -0
  65. package/dist/components/avatar/Avatar.js +3 -0
  66. package/dist/components/avatar/index.d.ts +2 -0
  67. package/dist/components/avatar/index.js +2 -0
  68. package/dist/components/badge/Badge.d.ts +117 -0
  69. package/dist/components/badge/Badge.js +3 -0
  70. package/dist/components/badge/index.d.ts +2 -0
  71. package/dist/components/badge/index.js +2 -0
  72. package/dist/components/breadcrumb/Breadcrumb.d.ts +244 -0
  73. package/dist/components/breadcrumb/Breadcrumb.js +3 -0
  74. package/dist/components/breadcrumb/index.d.ts +2 -0
  75. package/dist/components/breadcrumb/index.js +2 -0
  76. package/dist/components/button/Button.d.ts +73 -0
  77. package/dist/components/button/Button.js +3 -0
  78. package/dist/components/button/index.d.ts +2 -0
  79. package/dist/components/button/index.js +2 -0
  80. package/dist/components/button-group/ButtonGroup.d.ts +113 -0
  81. package/dist/components/button-group/ButtonGroup.js +3 -0
  82. package/dist/components/button-group/index.d.ts +2 -0
  83. package/dist/components/button-group/index.js +2 -0
  84. package/dist/components/calendar/Calendar.d.ts +201 -0
  85. package/dist/components/calendar/Calendar.js +3 -0
  86. package/dist/components/calendar/index.d.ts +2 -0
  87. package/dist/components/calendar/index.js +2 -0
  88. package/dist/components/checkbox/Checkbox.d.ts +130 -0
  89. package/dist/components/checkbox/Checkbox.js +3 -0
  90. package/dist/components/checkbox/index.d.ts +2 -0
  91. package/dist/components/checkbox/index.js +2 -0
  92. package/dist/components/collapsible/Collapsible.d.ts +91 -0
  93. package/dist/components/collapsible/Collapsible.js +3 -0
  94. package/dist/components/collapsible/index.d.ts +2 -0
  95. package/dist/components/collapsible/index.js +2 -0
  96. package/dist/components/color-picker/ColorPicker.d.ts +553 -0
  97. package/dist/components/color-picker/ColorPicker.js +4 -0
  98. package/dist/components/color-picker/color.d.ts +102 -0
  99. package/dist/components/color-picker/color.js +249 -0
  100. package/dist/components/color-picker/index.d.ts +2 -0
  101. package/dist/components/color-picker/index.js +3 -0
  102. package/dist/components/combobox/Combobox.d.ts +553 -0
  103. package/dist/components/combobox/Combobox.js +3 -0
  104. package/dist/components/combobox/index.d.ts +2 -0
  105. package/dist/components/combobox/index.js +2 -0
  106. package/dist/components/context-menu/ContextMenu.d.ts +103 -0
  107. package/dist/components/context-menu/ContextMenu.js +3 -0
  108. package/dist/components/context-menu/index.d.ts +3 -0
  109. package/dist/components/context-menu/index.js +2 -0
  110. package/dist/components/date-picker/DatePicker.d.ts +268 -0
  111. package/dist/components/date-picker/DatePicker.js +3 -0
  112. package/dist/components/date-picker/index.d.ts +2 -0
  113. package/dist/components/date-picker/index.js +2 -0
  114. package/dist/components/dialog/Dialog.d.ts +567 -0
  115. package/dist/components/dialog/Dialog.js +3 -0
  116. package/dist/components/dialog/index.d.ts +2 -0
  117. package/dist/components/dialog/index.js +2 -0
  118. package/dist/components/drawer/Drawer.d.ts +351 -0
  119. package/dist/components/drawer/Drawer.js +3 -0
  120. package/dist/components/drawer/index.d.ts +2 -0
  121. package/dist/components/drawer/index.js +2 -0
  122. package/dist/components/field/Field.d.ts +170 -0
  123. package/dist/components/field/Field.js +3 -0
  124. package/dist/components/field/index.d.ts +2 -0
  125. package/dist/components/field/index.js +2 -0
  126. package/dist/components/fieldset/Fieldset.d.ts +60 -0
  127. package/dist/components/fieldset/Fieldset.js +3 -0
  128. package/dist/components/fieldset/index.d.ts +2 -0
  129. package/dist/components/fieldset/index.js +2 -0
  130. package/dist/components/form/Form.d.ts +76 -0
  131. package/dist/components/form/Form.js +3 -0
  132. package/dist/components/form/index.d.ts +2 -0
  133. package/dist/components/form/index.js +2 -0
  134. package/dist/components/input/Input.d.ts +67 -0
  135. package/dist/components/input/Input.js +3 -0
  136. package/dist/components/input/index.d.ts +2 -0
  137. package/dist/components/input/index.js +2 -0
  138. package/dist/components/input-group/InputGroup.d.ts +214 -0
  139. package/dist/components/input-group/InputGroup.js +3 -0
  140. package/dist/components/input-group/index.d.ts +2 -0
  141. package/dist/components/input-group/index.js +2 -0
  142. package/dist/components/menu/Menu.d.ts +587 -0
  143. package/dist/components/menu/Menu.js +3 -0
  144. package/dist/components/menu/index.d.ts +2 -0
  145. package/dist/components/menu/index.js +2 -0
  146. package/dist/components/menubar/Menubar.d.ts +104 -0
  147. package/dist/components/menubar/Menubar.js +3 -0
  148. package/dist/components/menubar/index.d.ts +2 -0
  149. package/dist/components/menubar/index.js +2 -0
  150. package/dist/components/nav-list/NavList.d.ts +290 -0
  151. package/dist/components/nav-list/NavList.js +3 -0
  152. package/dist/components/nav-list/index.d.ts +2 -0
  153. package/dist/components/nav-list/index.js +2 -0
  154. package/dist/components/navigation-menu/NavigationMenu.d.ts +483 -0
  155. package/dist/components/navigation-menu/NavigationMenu.js +3 -0
  156. package/dist/components/navigation-menu/index.d.ts +2 -0
  157. package/dist/components/navigation-menu/index.js +2 -0
  158. package/dist/components/number-field/NumberField.d.ts +303 -0
  159. package/dist/components/number-field/NumberField.js +3 -0
  160. package/dist/components/number-field/index.d.ts +2 -0
  161. package/dist/components/number-field/index.js +2 -0
  162. package/dist/components/otp-field/OTPField.d.ts +206 -0
  163. package/dist/components/otp-field/OTPField.js +3 -0
  164. package/dist/components/otp-field/index.d.ts +2 -0
  165. package/dist/components/otp-field/index.js +2 -0
  166. package/dist/components/popover/Popover.d.ts +394 -0
  167. package/dist/components/popover/Popover.js +3 -0
  168. package/dist/components/popover/index.d.ts +2 -0
  169. package/dist/components/popover/index.js +2 -0
  170. package/dist/components/preview-card/PreviewCard.d.ts +307 -0
  171. package/dist/components/preview-card/PreviewCard.js +3 -0
  172. package/dist/components/preview-card/index.d.ts +2 -0
  173. package/dist/components/preview-card/index.js +2 -0
  174. package/dist/components/progress/Progress.d.ts +156 -0
  175. package/dist/components/progress/Progress.js +3 -0
  176. package/dist/components/progress/ProgressCircle.d.ts +166 -0
  177. package/dist/components/progress/ProgressCircle.js +3 -0
  178. package/dist/components/progress/index.d.ts +4 -0
  179. package/dist/components/progress/index.js +3 -0
  180. package/dist/components/radio/Radio.d.ts +144 -0
  181. package/dist/components/radio/Radio.js +3 -0
  182. package/dist/components/radio/index.d.ts +2 -0
  183. package/dist/components/radio/index.js +2 -0
  184. package/dist/components/resizable/Resizable.d.ts +211 -0
  185. package/dist/components/resizable/Resizable.js +3 -0
  186. package/dist/components/resizable/index.d.ts +2 -0
  187. package/dist/components/resizable/index.js +2 -0
  188. package/dist/components/scroll-area/ScrollArea.d.ts +113 -0
  189. package/dist/components/scroll-area/ScrollArea.js +3 -0
  190. package/dist/components/scroll-area/index.d.ts +2 -0
  191. package/dist/components/scroll-area/index.js +2 -0
  192. package/dist/components/select/Select.d.ts +345 -0
  193. package/dist/components/select/Select.js +3 -0
  194. package/dist/components/select/index.d.ts +2 -0
  195. package/dist/components/select/index.js +2 -0
  196. package/dist/components/separator/Separator.d.ts +75 -0
  197. package/dist/components/separator/Separator.js +3 -0
  198. package/dist/components/separator/index.d.ts +2 -0
  199. package/dist/components/separator/index.js +2 -0
  200. package/dist/components/skeleton/Skeleton.d.ts +169 -0
  201. package/dist/components/skeleton/Skeleton.js +3 -0
  202. package/dist/components/skeleton/index.d.ts +2 -0
  203. package/dist/components/skeleton/index.js +2 -0
  204. package/dist/components/slider/Slider.d.ts +208 -0
  205. package/dist/components/slider/Slider.js +3 -0
  206. package/dist/components/slider/index.d.ts +2 -0
  207. package/dist/components/slider/index.js +2 -0
  208. package/dist/components/spinner/Spinner.d.ts +92 -0
  209. package/dist/components/spinner/Spinner.js +3 -0
  210. package/dist/components/spinner/index.d.ts +2 -0
  211. package/dist/components/spinner/index.js +2 -0
  212. package/dist/components/switch/Switch.d.ts +80 -0
  213. package/dist/components/switch/Switch.js +3 -0
  214. package/dist/components/switch/index.d.ts +2 -0
  215. package/dist/components/switch/index.js +2 -0
  216. package/dist/components/tabs/Tabs.d.ts +125 -0
  217. package/dist/components/tabs/Tabs.js +3 -0
  218. package/dist/components/tabs/index.d.ts +2 -0
  219. package/dist/components/tabs/index.js +2 -0
  220. package/dist/components/textarea/Textarea.d.ts +119 -0
  221. package/dist/components/textarea/Textarea.js +3 -0
  222. package/dist/components/textarea/index.d.ts +2 -0
  223. package/dist/components/textarea/index.js +2 -0
  224. package/dist/components/toast/Toast.d.ts +517 -0
  225. package/dist/components/toast/Toast.js +3 -0
  226. package/dist/components/toast/index.d.ts +2 -0
  227. package/dist/components/toast/index.js +2 -0
  228. package/dist/components/toggle/Toggle.d.ts +171 -0
  229. package/dist/components/toggle/Toggle.js +3 -0
  230. package/dist/components/toggle/index.d.ts +2 -0
  231. package/dist/components/toggle/index.js +2 -0
  232. package/dist/components/toolbar/Toolbar.d.ts +318 -0
  233. package/dist/components/toolbar/Toolbar.js +3 -0
  234. package/dist/components/toolbar/index.d.ts +2 -0
  235. package/dist/components/toolbar/index.js +2 -0
  236. package/dist/components/tooltip/Tooltip.d.ts +361 -0
  237. package/dist/components/tooltip/Tooltip.js +3 -0
  238. package/dist/components/tooltip/index.d.ts +2 -0
  239. package/dist/components/tooltip/index.js +2 -0
  240. package/dist/index.d.ts +92 -0
  241. package/dist/index.js +86 -0
  242. package/dist/styles/Accordion.css +1 -0
  243. package/dist/styles/Alert.css +1 -0
  244. package/dist/styles/AspectRatio.css +1 -0
  245. package/dist/styles/Avatar.css +1 -0
  246. package/dist/styles/Badge.css +1 -0
  247. package/dist/styles/Breadcrumb.css +1 -0
  248. package/dist/styles/Button.css +1 -0
  249. package/dist/styles/ButtonGroup.css +1 -0
  250. package/dist/styles/Calendar.css +1 -0
  251. package/dist/styles/Checkbox.css +1 -0
  252. package/dist/styles/Collapsible.css +1 -0
  253. package/dist/styles/ColorPicker.css +1 -0
  254. package/dist/styles/Combobox.css +1 -0
  255. package/dist/styles/ContextMenu.css +1 -0
  256. package/dist/styles/DatePicker.css +1 -0
  257. package/dist/styles/Dialog.css +1 -0
  258. package/dist/styles/Drawer.css +1 -0
  259. package/dist/styles/Field.css +1 -0
  260. package/dist/styles/Fieldset.css +1 -0
  261. package/dist/styles/Form.css +1 -0
  262. package/dist/styles/Input.css +1 -0
  263. package/dist/styles/InputGroup.css +1 -0
  264. package/dist/styles/Menu.css +1 -0
  265. package/dist/styles/Menubar.css +1 -0
  266. package/dist/styles/NavList.css +1 -0
  267. package/dist/styles/NavigationMenu.css +1 -0
  268. package/dist/styles/NumberField.css +1 -0
  269. package/dist/styles/OTPField.css +1 -0
  270. package/dist/styles/Popover.css +1 -0
  271. package/dist/styles/PreviewCard.css +1 -0
  272. package/dist/styles/Progress.css +1 -0
  273. package/dist/styles/ProgressCircle.css +1 -0
  274. package/dist/styles/Radio.css +1 -0
  275. package/dist/styles/Resizable.css +1 -0
  276. package/dist/styles/ScrollArea.css +1 -0
  277. package/dist/styles/Select.css +1 -0
  278. package/dist/styles/Separator.css +1 -0
  279. package/dist/styles/Skeleton.css +1 -0
  280. package/dist/styles/Slider.css +1 -0
  281. package/dist/styles/Spinner.css +1 -0
  282. package/dist/styles/Switch.css +1 -0
  283. package/dist/styles/Tabs.css +1 -0
  284. package/dist/styles/Textarea.css +1 -0
  285. package/dist/styles/Toast.css +1 -0
  286. package/dist/styles/Toggle.css +1 -0
  287. package/dist/styles/Toolbar.css +1 -0
  288. package/dist/styles/Tooltip.css +1 -0
  289. package/dist/styles/a11y.css +119 -0
  290. package/dist/styles/layers.css +39 -0
  291. package/dist/styles/motion.css +194 -0
  292. package/dist/styles/patterns.css +236 -0
  293. package/dist/styles/properties.css +62 -0
  294. package/dist/styles/reset.css +11 -0
  295. package/dist/styles/tailwind.css +281 -0
  296. package/dist/styles/theme.css +57 -0
  297. package/dist/styles/tokens.color.css +223 -0
  298. package/dist/styles/tokens.css +460 -0
  299. package/dist/tailwind-merge.d.ts +52 -0
  300. package/dist/tailwind-merge.js +52 -0
  301. package/docs-data/props.json +8047 -0
  302. package/docs-data/theming.json +9600 -0
  303. package/docs-data/tokens.json +4070 -0
  304. package/package.json +78 -0
@@ -0,0 +1,503 @@
1
+ "use client";
2
+ import { t as e } from "./clsx-By2n9mTe.js";
3
+ import { t } from "./Button-AiyKnx5I.js";
4
+ import { t as n } from "./Select-BP-zvdXm.js";
5
+ import * as r from "react";
6
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
7
+ import './styles/Calendar.css';var o = {
8
+ root: "_root_1j3xg_29",
9
+ body: "_body_1j3xg_147",
10
+ months: "_months_1j3xg_13",
11
+ nav: "_nav_1j3xg_13",
12
+ month: "_month_1j3xg_13",
13
+ navButton: "_navButton_1j3xg_182",
14
+ navIcon: "_navIcon_1j3xg_190",
15
+ caption: "_caption_1j3xg_204",
16
+ captionLabel: "_captionLabel_1j3xg_217",
17
+ grid: "_grid_1j3xg_238",
18
+ weekday: "_weekday_1j3xg_243",
19
+ weekNumber: "_weekNumber_1j3xg_256",
20
+ cell: "_cell_1j3xg_273",
21
+ day: "_day_1j3xg_317",
22
+ footer: "_footer_1j3xg_406"
23
+ }, s = {
24
+ calendar: "Calendar",
25
+ previousMonth: "Previous month",
26
+ nextMonth: "Next month",
27
+ monthDropdown: "Month",
28
+ yearDropdown: "Year",
29
+ weekNumber: "Week"
30
+ };
31
+ function c(e) {
32
+ return new Date(e.getFullYear(), e.getMonth(), e.getDate());
33
+ }
34
+ function l(e, t) {
35
+ return new Date(e.getFullYear(), e.getMonth(), e.getDate() + t);
36
+ }
37
+ function u(e) {
38
+ return new Date(e.getFullYear(), e.getMonth(), 1);
39
+ }
40
+ function d(e, t) {
41
+ return new Date(e.getFullYear(), e.getMonth() + t, 1);
42
+ }
43
+ function f(e, t) {
44
+ let n = d(e, t), r = p(n);
45
+ return new Date(n.getFullYear(), n.getMonth(), Math.min(e.getDate(), r));
46
+ }
47
+ function p(e) {
48
+ return new Date(e.getFullYear(), e.getMonth() + 1, 0).getDate();
49
+ }
50
+ function m(e, t) {
51
+ return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
52
+ }
53
+ function ee(e, t) {
54
+ return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth();
55
+ }
56
+ function h(e, t) {
57
+ return e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate();
58
+ }
59
+ function g(e) {
60
+ return e.getFullYear() * 12 + e.getMonth();
61
+ }
62
+ function te(e) {
63
+ let t = new Date(2e3, e % 12, 1);
64
+ return t.setFullYear(Math.floor(e / 12)), t;
65
+ }
66
+ function _(e) {
67
+ let t = `${e.getMonth() + 1}`.padStart(2, "0"), n = `${e.getDate()}`.padStart(2, "0");
68
+ return `${e.getFullYear()}-${t}-${n}`;
69
+ }
70
+ function ne(e) {
71
+ let t = l(e, 3 - (e.getDay() + 6) % 7), n = new Date(t.getFullYear(), 0, 4), r = l(n, 3 - (n.getDay() + 6) % 7);
72
+ return 1 + Math.round((t.getTime() - r.getTime()) / 6048e5);
73
+ }
74
+ function re(e, t, n) {
75
+ let r = u(e), i = (r.getDay() - t + 7) % 7, a = n ? 6 : Math.ceil((i + p(r)) / 7), o = l(r, -i), s = [];
76
+ for (let e = 0; e < a; e += 1) {
77
+ let t = [];
78
+ for (let n = 0; n < 7; n += 1) t.push(l(o, e * 7 + n));
79
+ s.push(t);
80
+ }
81
+ return s;
82
+ }
83
+ function v(e) {
84
+ return Array.isArray(e);
85
+ }
86
+ function ie(e, t) {
87
+ if (t === void 0 || t === !1) return !1;
88
+ if (t === !0) return !0;
89
+ if (v(t)) return t.some((t) => ie(e, t));
90
+ if (typeof t == "function") return t(e);
91
+ if (t instanceof Date) return m(e, t);
92
+ if ("from" in t) {
93
+ let { from: n, to: r } = t;
94
+ return r ? h(e, n) >= 0 && h(e, r) <= 0 : m(e, n);
95
+ }
96
+ if ("dayOfWeek" in t) return (Array.isArray(t.dayOfWeek) ? t.dayOfWeek : [t.dayOfWeek]).includes(e.getDay());
97
+ let { before: n, after: r } = t;
98
+ return n && r ? h(e, r) > 0 && h(e, n) < 0 : n ? h(e, n) < 0 : r ? h(e, r) > 0 : !1;
99
+ }
100
+ function ae(e, t, n) {
101
+ return !t?.from || t.to ? {
102
+ from: e,
103
+ to: void 0
104
+ } : m(e, t.from) ? n ? t : null : h(e, t.from) < 0 ? {
105
+ from: e,
106
+ to: t.from
107
+ } : {
108
+ from: t.from,
109
+ to: e
110
+ };
111
+ }
112
+ function oe(e, t, n) {
113
+ let r = t ?? [], i = r.filter((t) => !m(t, e));
114
+ return i.length === r.length ? [...r, e].sort(h) : n && i.length === 0 ? r : i;
115
+ }
116
+ function se(e, t) {
117
+ return t ? e === "single" ? t : e === "multiple" ? t[0] ?? null : t.from ?? null : null;
118
+ }
119
+ function ce(e) {
120
+ return /* @__PURE__ */ i("svg", {
121
+ width: "16",
122
+ height: "16",
123
+ viewBox: "0 0 16 16",
124
+ fill: "none",
125
+ stroke: "currentColor",
126
+ strokeWidth: "1.5",
127
+ strokeLinecap: "round",
128
+ strokeLinejoin: "round",
129
+ "aria-hidden": "true",
130
+ focusable: "false",
131
+ ...e,
132
+ children: /* @__PURE__ */ i("path", { d: "m6 3.5 4.5 4.5L6 12.5" })
133
+ });
134
+ }
135
+ var y = {
136
+ "--forte-button-height": "var(--forte-calendar-nav-size)",
137
+ "--forte-button-icon-padding": "0px"
138
+ }, b = r.forwardRef(function(p, v) {
139
+ let { mode: b = "single", selected: le, defaultSelected: ue = null, onSelect: de, required: x = !1, month: S, defaultMonth: fe, onMonthChange: pe, numberOfMonths: C = 1, pagedNavigation: me = !1, minDate: w, maxDate: T, disabled: he, locale: E = "en-US", weekStartsOn: D = 0, showOutsideDays: ge = !0, fixedWeeks: _e = !1, showWeekNumbers: ve = !1, captionLayout: O = "label", size: ye = "md", navVariant: k = "ghost", footer: be, autoFocus: xe = !1, today: A, labels: Se, className: Ce, ...we } = p, j = {
140
+ ...s,
141
+ ...Se
142
+ }, M = r.useRef(null), Te = r.useId(), N = r.useRef("selected" in p).current, [Ee, De] = r.useState(ue), P = N ? le ?? null : Ee, F = A ? c(A).getTime() : void 0, I = r.useMemo(() => F === void 0 ? c(/* @__PURE__ */ new Date()) : new Date(F), [F]), [Oe, ke] = r.useState(() => u(fe ?? se(b, le ?? ue) ?? I)), L = u(S ?? Oe), [R, z] = r.useState(null), [B, V] = r.useState(null), H = r.useRef(xe), U = w ? g(w) : -Infinity, W = T ? g(T) : Infinity, G = g(L), Ae = me ? C : 1, je = G > U, Me = G + C - 1 < W, K = r.useMemo(() => Array.from({ length: C }, (e, t) => d(L, t)), [G, C]), Ne = r.useMemo(() => K.map((e) => re(e, D, _e)), [
143
+ K,
144
+ D,
145
+ _e
146
+ ]), q = r.useCallback((e) => {
147
+ let t = Math.min(Math.max(g(e), U), W - C + 1), n = Number.isFinite(t) ? te(t) : u(e);
148
+ S === void 0 && ke(n), pe?.(n);
149
+ }, [
150
+ W,
151
+ U,
152
+ S,
153
+ C,
154
+ pe
155
+ ]), J = r.useMemo(() => ({
156
+ weekdayShort: new Intl.DateTimeFormat(E, { weekday: "short" }),
157
+ weekdayLong: new Intl.DateTimeFormat(E, { weekday: "long" }),
158
+ monthYear: new Intl.DateTimeFormat(E, {
159
+ month: "long",
160
+ year: "numeric"
161
+ }),
162
+ month: new Intl.DateTimeFormat(E, { month: "long" }),
163
+ year: new Intl.DateTimeFormat(E, { year: "numeric" }),
164
+ dayNumber: new Intl.DateTimeFormat(E, { day: "numeric" }),
165
+ dayLabel: new Intl.DateTimeFormat(E, {
166
+ weekday: "long",
167
+ day: "numeric",
168
+ month: "long",
169
+ year: "numeric"
170
+ })
171
+ }), [E]), Pe = Ne[0]?.[0] ?? [], Y = r.useCallback((e) => w && h(e, w) < 0 || T && h(e, T) > 0 ? !0 : ie(e, he), [
172
+ he,
173
+ T,
174
+ w
175
+ ]), Fe = r.useCallback((e) => {
176
+ if (!P) return !1;
177
+ if (b === "single") return m(e, P);
178
+ if (b === "multiple") return P.some((t) => m(t, e));
179
+ let t = P;
180
+ return !!(t.from && m(e, t.from) || t.to && m(e, t.to));
181
+ }, [b, P]), X = r.useMemo(() => {
182
+ if (b !== "range") return null;
183
+ let e = P;
184
+ return e?.from ? e.to ? {
185
+ from: e.from,
186
+ to: e.to,
187
+ preview: !1
188
+ } : !B || m(B, e.from) ? null : h(B, e.from) < 0 ? {
189
+ from: B,
190
+ to: e.from,
191
+ preview: !0
192
+ } : {
193
+ from: e.from,
194
+ to: B,
195
+ preview: !0
196
+ } : null;
197
+ }, [
198
+ b,
199
+ B,
200
+ P
201
+ ]), Z = r.useCallback((e) => K.some((t) => ee(e, t)), [K]), Ie = _(r.useMemo(() => [
202
+ R,
203
+ se(b, P),
204
+ I
205
+ ].find((e) => e && Z(e)) ?? K[0] ?? I, [
206
+ R,
207
+ Z,
208
+ b,
209
+ K,
210
+ P,
211
+ I
212
+ ])), Le = r.useCallback((e) => {
213
+ let t = w && h(e, w) < 0 ? w : T && h(e, T) > 0 ? T : e;
214
+ if (z(t), V(t), H.current = !0, !Z(t)) {
215
+ let e = u(t);
216
+ q(h(t, L) < 0 ? e : d(e, -(C - 1)));
217
+ }
218
+ }, [
219
+ q,
220
+ Z,
221
+ L,
222
+ T,
223
+ w,
224
+ C
225
+ ]);
226
+ r.useEffect(() => {
227
+ H.current && (H.current = !1, (M.current?.querySelector(`[data-forte="calendar-day"][data-day="${Ie}"]:not([data-outside])`))?.focus());
228
+ });
229
+ let Re = r.useCallback((e) => {
230
+ let t;
231
+ if (b === "single") {
232
+ let n = P;
233
+ t = n && m(n, e) ? x ? n : null : e;
234
+ } else t = b === "multiple" ? oe(e, P, x) : ae(e, P, x);
235
+ N || De(t), de?.(t, e);
236
+ }, [
237
+ N,
238
+ b,
239
+ de,
240
+ x,
241
+ P
242
+ ]), ze = (e) => {
243
+ Y(e) || (z(e), Z(e) || q(u(e)), Re(e));
244
+ }, Be = (e, t) => {
245
+ let n = getComputedStyle(e.currentTarget).direction === "rtl", r = null;
246
+ switch (e.key) {
247
+ case "ArrowLeft":
248
+ r = l(t, n ? 1 : -1);
249
+ break;
250
+ case "ArrowRight":
251
+ r = l(t, n ? -1 : 1);
252
+ break;
253
+ case "ArrowUp":
254
+ r = l(t, -7);
255
+ break;
256
+ case "ArrowDown":
257
+ r = l(t, 7);
258
+ break;
259
+ case "Home":
260
+ r = l(t, -((t.getDay() - D + 7) % 7));
261
+ break;
262
+ case "End":
263
+ r = l(t, 6 - (t.getDay() - D + 7) % 7);
264
+ break;
265
+ case "PageUp":
266
+ r = f(t, e.shiftKey ? -12 : -1);
267
+ break;
268
+ case "PageDown":
269
+ r = f(t, e.shiftKey ? 12 : 1);
270
+ break;
271
+ default: return;
272
+ }
273
+ e.preventDefault(), Le(r);
274
+ }, Ve = (e) => {
275
+ M.current = e, typeof v == "function" ? v(e) : v && (v.current = e);
276
+ }, He = O === "dropdown" || O === "dropdown-months", Ue = O === "dropdown" || O === "dropdown-years", Q = w ? w.getFullYear() : I.getFullYear() - 100, $ = T ? T.getFullYear() : I.getFullYear() + 10, We = (e, t) => {
277
+ let r = `${Te}-caption-${t}`, s = J.monthYear.format(e);
278
+ if (!He && !Ue) return /* @__PURE__ */ i("div", {
279
+ className: o.caption,
280
+ "data-forte": "calendar-caption",
281
+ children: /* @__PURE__ */ i("span", {
282
+ id: r,
283
+ role: "status",
284
+ "aria-live": "polite",
285
+ className: o.captionLabel,
286
+ "data-forte": "calendar-caption-label",
287
+ children: s
288
+ })
289
+ });
290
+ let c = e.getFullYear() === Q && w ? w.getMonth() : 0, l = e.getFullYear() === $ && T ? T.getMonth() : 11, u = {};
291
+ for (let t = c; t <= l; t += 1) u[String(t)] = J.month.format(new Date(e.getFullYear(), t, 1));
292
+ let f = {};
293
+ for (let e = Q; e <= $; e += 1) f[String(e)] = J.year.format(new Date(e, 0, 1));
294
+ let p = (e) => q(d(e, -t));
295
+ return /* @__PURE__ */ a("div", {
296
+ className: o.caption,
297
+ "data-forte": "calendar-caption",
298
+ children: [
299
+ /* @__PURE__ */ i("span", {
300
+ id: r,
301
+ role: "status",
302
+ "aria-live": "polite",
303
+ className: "forte-visually-hidden",
304
+ children: s
305
+ }),
306
+ He ? /* @__PURE__ */ a(n.Root, {
307
+ items: u,
308
+ value: String(e.getMonth()),
309
+ onValueChange: (t) => {
310
+ t !== null && p(new Date(e.getFullYear(), Number(t), 1));
311
+ },
312
+ children: [/* @__PURE__ */ a(n.Trigger, {
313
+ size: "sm",
314
+ variant: "ghost",
315
+ "aria-label": j.monthDropdown,
316
+ "data-nav": "month",
317
+ children: [/* @__PURE__ */ i(n.Value, {}), /* @__PURE__ */ i(n.Icon, {})]
318
+ }), /* @__PURE__ */ i(n.Popup, { children: Object.entries(u).map(([e, t]) => /* @__PURE__ */ i(n.Item, {
319
+ value: e,
320
+ children: t
321
+ }, e)) })]
322
+ }) : /* @__PURE__ */ i("span", {
323
+ className: o.captionLabel,
324
+ "data-forte": "calendar-caption-label",
325
+ children: J.month.format(e)
326
+ }),
327
+ Ue ? /* @__PURE__ */ a(n.Root, {
328
+ items: f,
329
+ value: String(e.getFullYear()),
330
+ onValueChange: (t) => {
331
+ if (t === null) return;
332
+ let n = Number(t), r = n === $ && T ? T.getMonth() : 11, i = n === Q && w ? w.getMonth() : 0;
333
+ p(new Date(n, Math.min(Math.max(e.getMonth(), i), r), 1));
334
+ },
335
+ children: [/* @__PURE__ */ a(n.Trigger, {
336
+ size: "sm",
337
+ variant: "ghost",
338
+ "aria-label": j.yearDropdown,
339
+ "data-nav": "year",
340
+ children: [/* @__PURE__ */ i(n.Value, {}), /* @__PURE__ */ i(n.Icon, {})]
341
+ }), /* @__PURE__ */ i(n.Popup, { children: Object.entries(f).map(([e, t]) => /* @__PURE__ */ i(n.Item, {
342
+ value: e,
343
+ children: t
344
+ }, e)) })]
345
+ }) : /* @__PURE__ */ i("span", {
346
+ className: o.captionLabel,
347
+ "data-forte": "calendar-caption-label",
348
+ children: J.year.format(e)
349
+ })
350
+ ]
351
+ });
352
+ }, Ge = (t, n) => {
353
+ let r = _(t), a = !ee(t, n);
354
+ if (a && !ge) return /* @__PURE__ */ i("td", {
355
+ role: "gridcell",
356
+ className: o.cell,
357
+ "data-forte": "calendar-cell",
358
+ "data-empty": !0
359
+ }, r);
360
+ let s = Y(t), c = Fe(t), l = m(t, I), u = !!(X && h(t, X.from) >= 0 && h(t, X.to) <= 0), d = u && m(t, X.from), f = u && m(t, X.to);
361
+ return /* @__PURE__ */ i("td", {
362
+ role: "gridcell",
363
+ "aria-selected": c || u && !X.preview || void 0,
364
+ className: o.cell,
365
+ "data-forte": "calendar-cell",
366
+ "data-in-range": u || void 0,
367
+ "data-range-start": d || void 0,
368
+ "data-range-end": f || void 0,
369
+ "data-preview": u && X.preview || void 0,
370
+ "data-outside": a || void 0,
371
+ children: /* @__PURE__ */ i("button", {
372
+ type: "button",
373
+ className: e(o.day, "forte-focus-ring"),
374
+ "data-focus-inset": !0,
375
+ "data-forte": "calendar-day",
376
+ "data-day": r,
377
+ "data-selected": c || void 0,
378
+ "data-today": l || void 0,
379
+ "data-outside": a || void 0,
380
+ "data-in-range": u || void 0,
381
+ tabIndex: !a && r === Ie ? 0 : -1,
382
+ "aria-disabled": s || void 0,
383
+ "aria-current": l ? "date" : void 0,
384
+ "aria-label": J.dayLabel.format(t),
385
+ onClick: () => ze(t),
386
+ onKeyDown: (e) => Be(e, t),
387
+ onFocus: () => {
388
+ z(t), V(t);
389
+ },
390
+ onPointerEnter: () => V(t),
391
+ children: J.dayNumber.format(t)
392
+ })
393
+ }, r);
394
+ };
395
+ return /* @__PURE__ */ a("div", {
396
+ ref: Ve,
397
+ role: "group",
398
+ "aria-label": j.calendar,
399
+ className: e(o.root, Ce),
400
+ "data-forte": "calendar",
401
+ "data-size": ye,
402
+ "data-mode": b,
403
+ onPointerLeave: () => V(R),
404
+ ...we,
405
+ children: [/* @__PURE__ */ a("div", {
406
+ className: o.body,
407
+ "data-forte": "calendar-body",
408
+ children: [/* @__PURE__ */ a("div", {
409
+ className: o.nav,
410
+ "data-forte": "calendar-nav",
411
+ children: [/* @__PURE__ */ i(t, {
412
+ variant: k,
413
+ tone: "neutral",
414
+ size: "sm",
415
+ iconOnly: !0,
416
+ className: o.navButton,
417
+ style: y,
418
+ "data-nav": "previous",
419
+ disabled: !je,
420
+ "aria-label": j.previousMonth,
421
+ onClick: () => q(d(L, -Ae)),
422
+ children: /* @__PURE__ */ i(ce, {
423
+ className: o.navIcon,
424
+ "data-nav-icon": "previous"
425
+ })
426
+ }), /* @__PURE__ */ i(t, {
427
+ variant: k,
428
+ tone: "neutral",
429
+ size: "sm",
430
+ iconOnly: !0,
431
+ className: o.navButton,
432
+ style: y,
433
+ "data-nav": "next",
434
+ disabled: !Me,
435
+ "aria-label": j.nextMonth,
436
+ onClick: () => q(d(L, Ae)),
437
+ children: /* @__PURE__ */ i(ce, {
438
+ className: o.navIcon,
439
+ "data-nav-icon": "next"
440
+ })
441
+ })]
442
+ }), /* @__PURE__ */ i("div", {
443
+ className: o.months,
444
+ "data-forte": "calendar-months",
445
+ children: K.map((e, t) => /* @__PURE__ */ a("div", {
446
+ className: o.month,
447
+ "data-forte": "calendar-month",
448
+ children: [We(e, t), /* @__PURE__ */ a("table", {
449
+ role: "grid",
450
+ "aria-labelledby": `${Te}-caption-${t}`,
451
+ className: o.grid,
452
+ "data-forte": "calendar-grid",
453
+ children: [/* @__PURE__ */ i("thead", {
454
+ "data-forte": "calendar-weekdays",
455
+ children: /* @__PURE__ */ a("tr", {
456
+ className: o.weekdayRow,
457
+ children: [ve ? /* @__PURE__ */ i("th", {
458
+ scope: "col",
459
+ className: o.weekNumber,
460
+ "data-forte": "calendar-week-number-header",
461
+ children: /* @__PURE__ */ i("span", {
462
+ className: "forte-visually-hidden",
463
+ children: j.weekNumber
464
+ })
465
+ }) : null, Pe.map((e) => /* @__PURE__ */ a("th", {
466
+ scope: "col",
467
+ className: o.weekday,
468
+ "data-forte": "calendar-weekday",
469
+ children: [/* @__PURE__ */ i("span", {
470
+ "aria-hidden": "true",
471
+ children: J.weekdayShort.format(e)
472
+ }), /* @__PURE__ */ i("span", {
473
+ className: "forte-visually-hidden",
474
+ children: J.weekdayLong.format(e)
475
+ })]
476
+ }, e.getDay()))]
477
+ })
478
+ }), /* @__PURE__ */ i("tbody", {
479
+ "data-forte": "calendar-weeks",
480
+ children: Ne[t].map((t) => /* @__PURE__ */ a("tr", {
481
+ className: o.week,
482
+ "data-forte": "calendar-week",
483
+ children: [ve ? /* @__PURE__ */ i("th", {
484
+ scope: "row",
485
+ className: o.weekNumber,
486
+ "data-forte": "calendar-week-number",
487
+ children: ne(t[0])
488
+ }) : null, t.map((t) => Ge(t, e))]
489
+ }, _(t[0])))
490
+ })]
491
+ })]
492
+ }, g(e)))
493
+ })]
494
+ }), be ? /* @__PURE__ */ i("div", {
495
+ role: "status",
496
+ className: o.footer,
497
+ "data-forte": "calendar-footer",
498
+ children: be
499
+ }) : null]
500
+ });
501
+ });
502
+ //#endregion
503
+ export { b as t };
@@ -0,0 +1,56 @@
1
+ "use client";
2
+ import { t as e } from "./clsx-By2n9mTe.js";
3
+ import * as t from "react";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import { Checkbox as i } from "@base-ui/react/checkbox";
6
+ import { CheckboxGroup as a } from "@base-ui/react/checkbox-group";
7
+ import './styles/Checkbox.css';var o = {
8
+ root: "_root_1v734_25",
9
+ indicator: "_indicator_1v734_181",
10
+ svg: "_svg_1v734_205",
11
+ mark: "_mark_1v734_217",
12
+ check: "_check_1v734_231",
13
+ dash: "_dash_1v734_241",
14
+ group: "_group_1v734_253"
15
+ }, s = t.forwardRef(function({ size: t = "md", tone: a = "primary", indicatorClassName: s, className: c, ...l }, u) {
16
+ return /* @__PURE__ */ n(i.Root, {
17
+ ref: u,
18
+ className: e(o.root, "forte-target", "forte-focus-ring", c),
19
+ "data-forte": "checkbox",
20
+ "data-size": t,
21
+ "data-tone": a,
22
+ ...l,
23
+ children: /* @__PURE__ */ n(i.Indicator, {
24
+ keepMounted: !0,
25
+ className: e(o.indicator, s),
26
+ "data-forte": "checkbox-indicator",
27
+ children: /* @__PURE__ */ r("svg", {
28
+ className: o.svg,
29
+ "data-forte": "checkbox-svg",
30
+ viewBox: "0 0 16 16",
31
+ "aria-hidden": "true",
32
+ focusable: "false",
33
+ children: [/* @__PURE__ */ n("path", {
34
+ className: e(o.mark, o.check),
35
+ d: "m3.5 8.5 3 3 6-7",
36
+ pathLength: 1
37
+ }), /* @__PURE__ */ n("path", {
38
+ className: e(o.mark, o.dash),
39
+ d: "M3.75 8h8.5",
40
+ pathLength: 1
41
+ })]
42
+ })
43
+ })
44
+ });
45
+ }), c = t.forwardRef(function({ orientation: t = "vertical", className: r, ...i }, s) {
46
+ return /* @__PURE__ */ n(a, {
47
+ ref: s,
48
+ role: "group",
49
+ className: e(o.group, r),
50
+ "data-forte": "checkbox-group",
51
+ "data-orientation": t,
52
+ ...i
53
+ });
54
+ });
55
+ //#endregion
56
+ export { c as n, s as t };
@@ -0,0 +1,86 @@
1
+ "use client";
2
+ import { t as e } from "./clsx-By2n9mTe.js";
3
+ import * as t from "react";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import { Collapsible as i } from "@base-ui/react/collapsible";
6
+ import './styles/Collapsible.css';var a = {
7
+ root: "_root_1ti3y_41",
8
+ trigger: "_trigger_1ti3y_210",
9
+ label: "_label_1ti3y_274",
10
+ icon: "_icon_1ti3y_295",
11
+ panel: "_panel_1ti3y_30",
12
+ content: "_content_1ti3y_331"
13
+ }, o = t.createContext("plain");
14
+ function s(e) {
15
+ return /* @__PURE__ */ n("svg", {
16
+ width: "16",
17
+ height: "16",
18
+ viewBox: "0 0 16 16",
19
+ fill: "none",
20
+ stroke: "currentColor",
21
+ strokeWidth: "1.5",
22
+ strokeLinecap: "round",
23
+ strokeLinejoin: "round",
24
+ "aria-hidden": "true",
25
+ focusable: "false",
26
+ ...e,
27
+ style: {
28
+ display: "block",
29
+ ...e.style
30
+ },
31
+ children: /* @__PURE__ */ n("path", { d: "m3.5 6 4.5 4.5L12.5 6" })
32
+ });
33
+ }
34
+ function c({ variant: t = "plain", className: r, children: s, ...c }) {
35
+ return /* @__PURE__ */ n(o.Provider, {
36
+ value: t,
37
+ children: /* @__PURE__ */ n(i.Root, {
38
+ className: e(a.root, r),
39
+ "data-forte": "collapsible",
40
+ "data-variant": t,
41
+ ...c,
42
+ children: s
43
+ })
44
+ });
45
+ }
46
+ var l = {
47
+ Root: c,
48
+ Trigger: t.forwardRef(function({ icon: c = /* @__PURE__ */ n(s, {}), labelClassName: l, className: u, children: d, ...f }, p) {
49
+ let m = t.useContext(o);
50
+ return /* @__PURE__ */ r(i.Trigger, {
51
+ ref: p,
52
+ className: e(a.trigger, "forte-focus-ring", u),
53
+ "data-forte": "collapsible-trigger",
54
+ "data-focus-inset": m === "contained" ? "" : void 0,
55
+ "data-variant": m,
56
+ ...f,
57
+ children: [/* @__PURE__ */ n("span", {
58
+ className: e(a.label, l),
59
+ "data-forte": "collapsible-label",
60
+ children: d
61
+ }), c === null ? null : /* @__PURE__ */ n("span", {
62
+ className: a.icon,
63
+ "data-forte": "collapsible-icon",
64
+ "aria-hidden": "true",
65
+ children: c
66
+ })]
67
+ });
68
+ }),
69
+ Panel: t.forwardRef(function({ contentClassName: r, className: s, children: c, ...l }, u) {
70
+ let d = t.useContext(o);
71
+ return /* @__PURE__ */ n(i.Panel, {
72
+ ref: u,
73
+ className: e(a.panel, s),
74
+ "data-forte": "collapsible-panel",
75
+ "data-variant": d,
76
+ ...l,
77
+ children: /* @__PURE__ */ n("div", {
78
+ className: e(a.content, r),
79
+ "data-forte": "collapsible-content",
80
+ children: c
81
+ })
82
+ });
83
+ })
84
+ };
85
+ //#endregion
86
+ export { l as t };