@tipp/ui 0.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 (266) hide show
  1. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  2. package/dist/alert-dialog-D1kwc80j.js +143 -0
  3. package/dist/as-child.prop-Dmk_dqBI.js +4 -0
  4. package/dist/assets/index.css +1 -0
  5. package/dist/assets/theme-provider.css +1 -0
  6. package/dist/atoms/alert-dialog.d.ts +2 -0
  7. package/dist/atoms/alert-dialog.d.ts.map +1 -0
  8. package/dist/atoms/alert-dialog.js +4 -0
  9. package/dist/atoms/aspect-ratio.d.ts +2 -0
  10. package/dist/atoms/aspect-ratio.d.ts.map +1 -0
  11. package/dist/atoms/aspect-ratio.js +4 -0
  12. package/dist/atoms/avatar.d.ts +2 -0
  13. package/dist/atoms/avatar.d.ts.map +1 -0
  14. package/dist/atoms/avatar.js +4 -0
  15. package/dist/atoms/badge.d.ts +2 -0
  16. package/dist/atoms/badge.d.ts.map +1 -0
  17. package/dist/atoms/badge.js +4 -0
  18. package/dist/atoms/blockquote.d.ts +2 -0
  19. package/dist/atoms/blockquote.d.ts.map +1 -0
  20. package/dist/atoms/blockquote.js +4 -0
  21. package/dist/atoms/box.d.ts +2 -0
  22. package/dist/atoms/box.d.ts.map +1 -0
  23. package/dist/atoms/box.js +4 -0
  24. package/dist/atoms/button.d.ts +2 -0
  25. package/dist/atoms/button.d.ts.map +1 -0
  26. package/dist/atoms/button.js +4 -0
  27. package/dist/atoms/call-out.d.ts +2 -0
  28. package/dist/atoms/call-out.d.ts.map +1 -0
  29. package/dist/atoms/call-out.js +4 -0
  30. package/dist/atoms/card.d.ts +2 -0
  31. package/dist/atoms/card.d.ts.map +1 -0
  32. package/dist/atoms/card.js +4 -0
  33. package/dist/atoms/check-box-card.d.ts +2 -0
  34. package/dist/atoms/check-box-card.d.ts.map +1 -0
  35. package/dist/atoms/check-box-card.js +4 -0
  36. package/dist/atoms/check-box-group.d.ts +2 -0
  37. package/dist/atoms/check-box-group.d.ts.map +1 -0
  38. package/dist/atoms/check-box-group.js +4 -0
  39. package/dist/atoms/check-box.d.ts +2 -0
  40. package/dist/atoms/check-box.d.ts.map +1 -0
  41. package/dist/atoms/check-box.js +4 -0
  42. package/dist/atoms/code.d.ts +2 -0
  43. package/dist/atoms/code.d.ts.map +1 -0
  44. package/dist/atoms/code.js +4 -0
  45. package/dist/atoms/container.d.ts +2 -0
  46. package/dist/atoms/container.d.ts.map +1 -0
  47. package/dist/atoms/container.js +4 -0
  48. package/dist/atoms/data-list.d.ts +2 -0
  49. package/dist/atoms/data-list.d.ts.map +1 -0
  50. package/dist/atoms/data-list.js +4 -0
  51. package/dist/atoms/date-picker/index.d.ts +7 -0
  52. package/dist/atoms/date-picker/index.d.ts.map +1 -0
  53. package/dist/atoms/date-picker/index.js +6252 -0
  54. package/dist/atoms/dialog.d.ts +2 -0
  55. package/dist/atoms/dialog.d.ts.map +1 -0
  56. package/dist/atoms/dialog.js +4 -0
  57. package/dist/atoms/dropdown-menu.d.ts +2 -0
  58. package/dist/atoms/dropdown-menu.d.ts.map +1 -0
  59. package/dist/atoms/dropdown-menu.js +4 -0
  60. package/dist/atoms/em.d.ts +2 -0
  61. package/dist/atoms/em.d.ts.map +1 -0
  62. package/dist/atoms/em.js +4 -0
  63. package/dist/atoms/flex.d.ts +2 -0
  64. package/dist/atoms/flex.d.ts.map +1 -0
  65. package/dist/atoms/flex.js +4 -0
  66. package/dist/atoms/grid.d.ts +2 -0
  67. package/dist/atoms/grid.d.ts.map +1 -0
  68. package/dist/atoms/grid.js +4 -0
  69. package/dist/atoms/heading.d.ts +2 -0
  70. package/dist/atoms/heading.d.ts.map +1 -0
  71. package/dist/atoms/heading.js +4 -0
  72. package/dist/atoms/hover-card.d.ts +2 -0
  73. package/dist/atoms/hover-card.d.ts.map +1 -0
  74. package/dist/atoms/hover-card.js +4 -0
  75. package/dist/atoms/icon-button.d.ts +2 -0
  76. package/dist/atoms/icon-button.d.ts.map +1 -0
  77. package/dist/atoms/icon-button.js +4 -0
  78. package/dist/atoms/inset.d.ts +2 -0
  79. package/dist/atoms/inset.d.ts.map +1 -0
  80. package/dist/atoms/inset.js +4 -0
  81. package/dist/atoms/kbd.d.ts +2 -0
  82. package/dist/atoms/kbd.d.ts.map +1 -0
  83. package/dist/atoms/kbd.js +4 -0
  84. package/dist/atoms/link.d.ts +2 -0
  85. package/dist/atoms/link.d.ts.map +1 -0
  86. package/dist/atoms/link.js +4 -0
  87. package/dist/atoms/popover.d.ts +2 -0
  88. package/dist/atoms/popover.d.ts.map +1 -0
  89. package/dist/atoms/popover.js +4 -0
  90. package/dist/atoms/progress.d.ts +2 -0
  91. package/dist/atoms/progress.d.ts.map +1 -0
  92. package/dist/atoms/progress.js +4 -0
  93. package/dist/atoms/quote.d.ts +2 -0
  94. package/dist/atoms/quote.d.ts.map +1 -0
  95. package/dist/atoms/quote.js +4 -0
  96. package/dist/atoms/radio-cards.d.ts +2 -0
  97. package/dist/atoms/radio-cards.d.ts.map +1 -0
  98. package/dist/atoms/radio-cards.js +4 -0
  99. package/dist/atoms/radio-group.d.ts +2 -0
  100. package/dist/atoms/radio-group.d.ts.map +1 -0
  101. package/dist/atoms/radio-group.js +4 -0
  102. package/dist/atoms/radio.d.ts +2 -0
  103. package/dist/atoms/radio.d.ts.map +1 -0
  104. package/dist/atoms/radio.js +4 -0
  105. package/dist/atoms/scroll-area.d.ts +2 -0
  106. package/dist/atoms/scroll-area.d.ts.map +1 -0
  107. package/dist/atoms/scroll-area.js +4 -0
  108. package/dist/atoms/section.d.ts +2 -0
  109. package/dist/atoms/section.d.ts.map +1 -0
  110. package/dist/atoms/section.js +4 -0
  111. package/dist/atoms/segmented-control.d.ts +2 -0
  112. package/dist/atoms/segmented-control.d.ts.map +1 -0
  113. package/dist/atoms/segmented-control.js +4 -0
  114. package/dist/atoms/select.d.ts +2 -0
  115. package/dist/atoms/select.d.ts.map +1 -0
  116. package/dist/atoms/select.js +4 -0
  117. package/dist/atoms/separator.d.ts +2 -0
  118. package/dist/atoms/separator.d.ts.map +1 -0
  119. package/dist/atoms/separator.js +4 -0
  120. package/dist/atoms/skeleton.d.ts +2 -0
  121. package/dist/atoms/skeleton.d.ts.map +1 -0
  122. package/dist/atoms/skeleton.js +4 -0
  123. package/dist/atoms/strong.d.ts +2 -0
  124. package/dist/atoms/strong.d.ts.map +1 -0
  125. package/dist/atoms/strong.js +4 -0
  126. package/dist/atoms/switch.d.ts +2 -0
  127. package/dist/atoms/switch.d.ts.map +1 -0
  128. package/dist/atoms/switch.js +4 -0
  129. package/dist/atoms/tab-nav.d.ts +2 -0
  130. package/dist/atoms/tab-nav.d.ts.map +1 -0
  131. package/dist/atoms/tab-nav.js +4 -0
  132. package/dist/atoms/tabs.d.ts +2 -0
  133. package/dist/atoms/tabs.d.ts.map +1 -0
  134. package/dist/atoms/tabs.js +4 -0
  135. package/dist/atoms/text-area.d.ts +2 -0
  136. package/dist/atoms/text-area.d.ts.map +1 -0
  137. package/dist/atoms/text-area.js +4 -0
  138. package/dist/atoms/text-field.d.ts +2 -0
  139. package/dist/atoms/text-field.d.ts.map +1 -0
  140. package/dist/atoms/text-field.js +4 -0
  141. package/dist/atoms/text.d.ts +2 -0
  142. package/dist/atoms/text.d.ts.map +1 -0
  143. package/dist/atoms/text.js +4 -0
  144. package/dist/atoms/tooltip.d.ts +2 -0
  145. package/dist/atoms/tooltip.d.ts.map +1 -0
  146. package/dist/atoms/tooltip.js +4 -0
  147. package/dist/avatar-CzjF7NU3.js +85 -0
  148. package/dist/badge-CyCKR1Mg.js +17 -0
  149. package/dist/base-button-i6PPsCdc.js +27 -0
  150. package/dist/base-checkbox.props-Bk4tRAY3.js +132 -0
  151. package/dist/base-tab-list.props-hSCtMjn2.js +6 -0
  152. package/dist/blockquote-7gbFi2zf.js +12 -0
  153. package/dist/box-C071drmz.js +15 -0
  154. package/dist/button-DpVTjBrm.js +8 -0
  155. package/dist/callout-K8Sm-FQT.js +31 -0
  156. package/dist/card-BX55hIZ3.js +14 -0
  157. package/dist/chart-BkQy6rli.js +14554 -0
  158. package/dist/charts/chart.d.ts +5 -0
  159. package/dist/charts/chart.d.ts.map +1 -0
  160. package/dist/charts/chart.js +5 -0
  161. package/dist/charts-DLVAfnBm.js +10821 -0
  162. package/dist/checkbox-DhyOlPGH.js +14 -0
  163. package/dist/checkbox-cards-C9ZL84Ml.js +30 -0
  164. package/dist/checkbox-group-CoGGFZk-.js +33 -0
  165. package/dist/checkbox-group.primitive-DuerVc21.js +33 -0
  166. package/dist/code-BJLnPPB0.js +18 -0
  167. package/dist/color.prop-C1QiQO-6.js +7 -0
  168. package/dist/components-MfAfNvnv.js +9496 -0
  169. package/dist/container-DBjG5yxq.js +25 -0
  170. package/dist/customGraphicKeyframeAnimation-BL_3uxsi.js +7247 -0
  171. package/dist/data-list-DXP5-QCf.js +36 -0
  172. package/dist/dialog-BYhSvWm4.js +35 -0
  173. package/dist/dialog.props-DOLpgre6.js +255 -0
  174. package/dist/dropdown-menu-B34afpui.js +870 -0
  175. package/dist/em-CxdNq9zL.js +14 -0
  176. package/dist/extract-props-CujC3IXc.js +36 -0
  177. package/dist/features-Dezrf84n.js +1221 -0
  178. package/dist/flex-BY0BY2TI.js +15 -0
  179. package/dist/flex.props-DNysJgUY.js +9 -0
  180. package/dist/floating-ui.dom-Pi62VK_7.js +1084 -0
  181. package/dist/gap.props-DSJMAfZN.js +4 -0
  182. package/dist/get-subtree-DW8zSv8E.js +10 -0
  183. package/dist/grid-BcK4nkHz.js +24 -0
  184. package/dist/heading-BNO0Ttlj.js +19 -0
  185. package/dist/height.props-COFNk7EY.js +4 -0
  186. package/dist/high-contrast.prop-BGHYAKb9.js +4 -0
  187. package/dist/hover-card-C86JJDjR.js +198 -0
  188. package/dist/icon-button-BiYGmnT9.js +8 -0
  189. package/dist/icon.d.ts +2 -0
  190. package/dist/icon.d.ts.map +1 -0
  191. package/dist/icon.js +11 -0
  192. package/dist/icons-B-Giprot.js +12 -0
  193. package/dist/index--Kmch3aI.js +19069 -0
  194. package/dist/index-BGHne2on.js +66 -0
  195. package/dist/index-BGU-u5wR.js +48 -0
  196. package/dist/index-BLlMKB6v.js +35 -0
  197. package/dist/index-BQ0fI5eo.js +14 -0
  198. package/dist/index-BUzFfodu.js +134 -0
  199. package/dist/index-BZPx6jYI.js +8 -0
  200. package/dist/index-CBWtNqYj.js +218 -0
  201. package/dist/index-CMas7-m1.js +32 -0
  202. package/dist/index-CWqnkG-p.js +67 -0
  203. package/dist/index-Chf_UJBH.js +27 -0
  204. package/dist/index-DIx1pnae.js +14 -0
  205. package/dist/index-DLeNytVF.js +9 -0
  206. package/dist/index-DQu1RzkN.js +41 -0
  207. package/dist/index-DbtrAyPY.js +48 -0
  208. package/dist/index-Dei2uCbS.js +16 -0
  209. package/dist/index-DgaYqXVD.js +178 -0
  210. package/dist/index-DoIe4nVR.js +42 -0
  211. package/dist/index-DxFjXziY.js +32 -0
  212. package/dist/index-J-pu07YR.js +13 -0
  213. package/dist/index-KdR831JA.js +669 -0
  214. package/dist/index-W3PwLn5U.js +531 -0
  215. package/dist/inset-B8urCQ4C.js +18 -0
  216. package/dist/kbd-D56CgGV_.js +14 -0
  217. package/dist/labelGuideHelper-CcngZb4a.js +224 -0
  218. package/dist/labelLayoutHelper-ZwNI-nB_.js +211 -0
  219. package/dist/layout.props-CKENeFj3.js +7 -0
  220. package/dist/link-C49WMJKQ.js +18 -0
  221. package/dist/main.d.ts +53 -0
  222. package/dist/main.d.ts.map +1 -0
  223. package/dist/main.js +113 -0
  224. package/dist/map-prop-values-pmPyYjFd.js +22 -0
  225. package/dist/margin.props-ClY9lUrP.js +4 -0
  226. package/dist/merge-styles-B1pWeU8q.js +68 -0
  227. package/dist/padding.props-DHz7-7K8.js +4 -0
  228. package/dist/popover-pOSzBkqq.js +251 -0
  229. package/dist/progress-WApo2WEO.js +93 -0
  230. package/dist/quote-BSvwdJNj.js +14 -0
  231. package/dist/radio-DAyHCNZG.js +16 -0
  232. package/dist/radio-cards-z3X1kLpc.js +24 -0
  233. package/dist/radio-group-B9V-hq03.js +33 -0
  234. package/dist/radius.prop-CH9lMann.js +5 -0
  235. package/dist/react-icons.esm-D7QiCqNB.js +147 -0
  236. package/dist/renderers-Bb3odh12.js +1250 -0
  237. package/dist/require-react-element-D_SFiikK.js +8 -0
  238. package/dist/scroll-area-eDccU6Jg.js +26 -0
  239. package/dist/section-DMnSE0_D.js +19 -0
  240. package/dist/segmented-control-kJXQrfMF.js +173 -0
  241. package/dist/select-BEBm0Xc8.js +832 -0
  242. package/dist/separator-Ba0Kgvyq.js +13 -0
  243. package/dist/skeleton-CUQFQIjD.js +17 -0
  244. package/dist/strong-ejFErGyG.js +14 -0
  245. package/dist/switch-BhvdoZJT.js +123 -0
  246. package/dist/tab-nav-B-m2dwou.js +608 -0
  247. package/dist/tabs-33tSzanC.js +186 -0
  248. package/dist/text-YN9kC4kc.js +19 -0
  249. package/dist/text-align.prop-BXpq--l6.js +5 -0
  250. package/dist/text-area-DBR9oL6S.js +14 -0
  251. package/dist/text-field-CgtdAE3v.js +43 -0
  252. package/dist/theme/theme-provider.d.ts +10 -0
  253. package/dist/theme/theme-provider.d.ts.map +1 -0
  254. package/dist/theme/theme-provider.js +8 -0
  255. package/dist/theme/use-theme.d.ts +2 -0
  256. package/dist/theme/use-theme.d.ts.map +1 -0
  257. package/dist/theme/use-theme.js +4 -0
  258. package/dist/theme-7Cjo8_Y6.js +795 -0
  259. package/dist/tooltip-jaEtV9Zg.js +14 -0
  260. package/dist/truncate.prop-BeER2hSO.js +5 -0
  261. package/dist/ui-props/index.d.ts +3 -0
  262. package/dist/ui-props/index.d.ts.map +1 -0
  263. package/dist/ui-props/index.js +686 -0
  264. package/dist/weight.prop-DBiHURhF.js +4 -0
  265. package/dist/width.props-BFC_4RNX.js +4 -0
  266. package/package.json +48 -0
@@ -0,0 +1,795 @@
1
+ import * as o from "react";
2
+ import { useLayoutEffect as Qe, useEffect as et } from "react";
3
+ import { y as tt } from "./index-DoIe4nVR.js";
4
+ import { c as L } from "./index-DLeNytVF.js";
5
+ import { u as z } from "./index-DIx1pnae.js";
6
+ import { c as ve } from "./index-CWqnkG-p.js";
7
+ import { D as rt } from "./index-BUzFfodu.js";
8
+ import { u as nt } from "./index-J-pu07YR.js";
9
+ import { a as ge, c as ot, b as at, o as st, s as it, f as ct, d as lt, h as ut, l as dt } from "./floating-ui.dom-Pi62VK_7.js";
10
+ import { R as ft, r as pt } from "./index--Kmch3aI.js";
11
+ import { P as F } from "./index-BLlMKB6v.js";
12
+ import { jsx as h, jsxs as mt } from "react/jsx-runtime";
13
+ import { a as ee, u as gt } from "./index-Dei2uCbS.js";
14
+ import { u as ht } from "./index-Chf_UJBH.js";
15
+ import { P as Ce } from "./index-BGHne2on.js";
16
+ import { a as yt, S as vt } from "./index-BGU-u5wR.js";
17
+ import { u as Ct } from "./index-CMas7-m1.js";
18
+ import { R as wt } from "./index-DxFjXziY.js";
19
+ import { D as xt } from "./index-BQ0fI5eo.js";
20
+ import { o as Pt } from "./as-child.prop-Dmk_dqBI.js";
21
+ import { o as Tt, e as Rt } from "./color.prop-C1QiQO-6.js";
22
+ import { e as bt } from "./radius.prop-CH9lMann.js";
23
+ var Et = "Portal", we = o.forwardRef((t, r) => {
24
+ var u;
25
+ const { container: e, ...n } = t, [a, s] = o.useState(!1);
26
+ ee(() => s(!0), []);
27
+ const i = e || a && ((u = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : u.body);
28
+ return i ? ft.createPortal(/* @__PURE__ */ h(F.div, { ...n, ref: r }), i) : null;
29
+ });
30
+ we.displayName = Et;
31
+ const At = (t) => {
32
+ function r(e) {
33
+ return {}.hasOwnProperty.call(e, "current");
34
+ }
35
+ return {
36
+ name: "arrow",
37
+ options: t,
38
+ fn(e) {
39
+ const {
40
+ element: n,
41
+ padding: a
42
+ } = typeof t == "function" ? t(e) : t;
43
+ return n && r(n) ? n.current != null ? ge({
44
+ element: n.current,
45
+ padding: a
46
+ }).fn(e) : {} : n ? ge({
47
+ element: n,
48
+ padding: a
49
+ }).fn(e) : {};
50
+ }
51
+ };
52
+ };
53
+ var U = typeof document < "u" ? Qe : et;
54
+ function V(t, r) {
55
+ if (t === r)
56
+ return !0;
57
+ if (typeof t != typeof r)
58
+ return !1;
59
+ if (typeof t == "function" && t.toString() === r.toString())
60
+ return !0;
61
+ let e, n, a;
62
+ if (t && r && typeof t == "object") {
63
+ if (Array.isArray(t)) {
64
+ if (e = t.length, e !== r.length) return !1;
65
+ for (n = e; n-- !== 0; )
66
+ if (!V(t[n], r[n]))
67
+ return !1;
68
+ return !0;
69
+ }
70
+ if (a = Object.keys(t), e = a.length, e !== Object.keys(r).length)
71
+ return !1;
72
+ for (n = e; n-- !== 0; )
73
+ if (!{}.hasOwnProperty.call(r, a[n]))
74
+ return !1;
75
+ for (n = e; n-- !== 0; ) {
76
+ const s = a[n];
77
+ if (!(s === "_owner" && t.$$typeof) && !V(t[s], r[s]))
78
+ return !1;
79
+ }
80
+ return !0;
81
+ }
82
+ return t !== t && r !== r;
83
+ }
84
+ function xe(t) {
85
+ return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
86
+ }
87
+ function he(t, r) {
88
+ const e = xe(t);
89
+ return Math.round(r * e) / e;
90
+ }
91
+ function ye(t) {
92
+ const r = o.useRef(t);
93
+ return U(() => {
94
+ r.current = t;
95
+ }), r;
96
+ }
97
+ function kt(t) {
98
+ t === void 0 && (t = {});
99
+ const {
100
+ placement: r = "bottom",
101
+ strategy: e = "absolute",
102
+ middleware: n = [],
103
+ platform: a,
104
+ elements: {
105
+ reference: s,
106
+ floating: i
107
+ } = {},
108
+ transform: u = !0,
109
+ whileElementsMounted: c,
110
+ open: d
111
+ } = t, [l, f] = o.useState({
112
+ x: 0,
113
+ y: 0,
114
+ strategy: e,
115
+ placement: r,
116
+ middlewareData: {},
117
+ isPositioned: !1
118
+ }), [y, g] = o.useState(n);
119
+ V(y, n) || g(n);
120
+ const [p, m] = o.useState(null), [v, C] = o.useState(null), w = o.useCallback((T) => {
121
+ T !== R.current && (R.current = T, m(T));
122
+ }, []), b = o.useCallback((T) => {
123
+ T !== A.current && (A.current = T, C(T));
124
+ }, []), x = s || p, P = i || v, R = o.useRef(null), A = o.useRef(null), D = o.useRef(l), Q = c != null, I = ye(c), N = ye(a), M = o.useCallback(() => {
125
+ if (!R.current || !A.current)
126
+ return;
127
+ const T = {
128
+ placement: r,
129
+ strategy: e,
130
+ middleware: y
131
+ };
132
+ N.current && (T.platform = N.current), ot(R.current, A.current, T).then((k) => {
133
+ const O = {
134
+ ...k,
135
+ isPositioned: !0
136
+ };
137
+ _.current && !V(D.current, O) && (D.current = O, pt.flushSync(() => {
138
+ f(O);
139
+ }));
140
+ });
141
+ }, [y, r, e, N]);
142
+ U(() => {
143
+ d === !1 && D.current.isPositioned && (D.current.isPositioned = !1, f((T) => ({
144
+ ...T,
145
+ isPositioned: !1
146
+ })));
147
+ }, [d]);
148
+ const _ = o.useRef(!1);
149
+ U(() => (_.current = !0, () => {
150
+ _.current = !1;
151
+ }), []), U(() => {
152
+ if (x && (R.current = x), P && (A.current = P), x && P) {
153
+ if (I.current)
154
+ return I.current(x, P, M);
155
+ M();
156
+ }
157
+ }, [x, P, M, I, Q]);
158
+ const j = o.useMemo(() => ({
159
+ reference: R,
160
+ floating: A,
161
+ setReference: w,
162
+ setFloating: b
163
+ }), [w, b]), S = o.useMemo(() => ({
164
+ reference: x,
165
+ floating: P
166
+ }), [x, P]), W = o.useMemo(() => {
167
+ const T = {
168
+ position: e,
169
+ left: 0,
170
+ top: 0
171
+ };
172
+ if (!S.floating)
173
+ return T;
174
+ const k = he(S.floating, l.x), O = he(S.floating, l.y);
175
+ return u ? {
176
+ ...T,
177
+ transform: "translate(" + k + "px, " + O + "px)",
178
+ ...xe(S.floating) >= 1.5 && {
179
+ willChange: "transform"
180
+ }
181
+ } : {
182
+ position: e,
183
+ left: k,
184
+ top: O
185
+ };
186
+ }, [e, u, S.floating, l.x, l.y]);
187
+ return o.useMemo(() => ({
188
+ ...l,
189
+ update: M,
190
+ refs: j,
191
+ elements: S,
192
+ floatingStyles: W
193
+ }), [l, M, j, S, W]);
194
+ }
195
+ var St = "Arrow", Pe = o.forwardRef((t, r) => {
196
+ const { children: e, width: n = 10, height: a = 5, ...s } = t;
197
+ return /* @__PURE__ */ h(
198
+ F.svg,
199
+ {
200
+ ...s,
201
+ ref: r,
202
+ width: n,
203
+ height: a,
204
+ viewBox: "0 0 30 10",
205
+ preserveAspectRatio: "none",
206
+ children: t.asChild ? e : /* @__PURE__ */ h("polygon", { points: "0,0 30,0 15,10" })
207
+ }
208
+ );
209
+ });
210
+ Pe.displayName = St;
211
+ var Ot = Pe, ne = "Popper", [Te, Re] = ve(ne), [_t, be] = Te(ne), Ee = (t) => {
212
+ const { __scopePopper: r, children: e } = t, [n, a] = o.useState(null);
213
+ return /* @__PURE__ */ h(_t, { scope: r, anchor: n, onAnchorChange: a, children: e });
214
+ };
215
+ Ee.displayName = ne;
216
+ var Ae = "PopperAnchor", ke = o.forwardRef(
217
+ (t, r) => {
218
+ const { __scopePopper: e, virtualRef: n, ...a } = t, s = be(Ae, e), i = o.useRef(null), u = z(r, i);
219
+ return o.useEffect(() => {
220
+ s.onAnchorChange((n == null ? void 0 : n.current) || i.current);
221
+ }), n ? null : /* @__PURE__ */ h(F.div, { ...a, ref: u });
222
+ }
223
+ );
224
+ ke.displayName = Ae;
225
+ var oe = "PopperContent", [Dt, Mt] = Te(oe), Se = o.forwardRef(
226
+ (t, r) => {
227
+ var ce, le, ue, de, fe, pe;
228
+ const {
229
+ __scopePopper: e,
230
+ side: n = "bottom",
231
+ sideOffset: a = 0,
232
+ align: s = "center",
233
+ alignOffset: i = 0,
234
+ arrowPadding: u = 0,
235
+ avoidCollisions: c = !0,
236
+ collisionBoundary: d = [],
237
+ collisionPadding: l = 0,
238
+ sticky: f = "partial",
239
+ hideWhenDetached: y = !1,
240
+ updatePositionStrategy: g = "optimized",
241
+ onPlaced: p,
242
+ ...m
243
+ } = t, v = be(oe, e), [C, w] = o.useState(null), b = z(r, ($) => w($)), [x, P] = o.useState(null), R = ht(x), A = (R == null ? void 0 : R.width) ?? 0, D = (R == null ? void 0 : R.height) ?? 0, Q = n + (s !== "center" ? "-" + s : ""), I = typeof l == "number" ? l : { top: 0, right: 0, bottom: 0, left: 0, ...l }, N = Array.isArray(d) ? d : [d], M = N.length > 0, _ = {
244
+ padding: I,
245
+ boundary: N.filter(Lt),
246
+ // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
247
+ altBoundary: M
248
+ }, { refs: j, floatingStyles: S, placement: W, isPositioned: T, middlewareData: k } = kt({
249
+ // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
250
+ strategy: "fixed",
251
+ placement: Q,
252
+ whileElementsMounted: (...$) => at(...$, {
253
+ animationFrame: g === "always"
254
+ }),
255
+ elements: {
256
+ reference: v.anchor
257
+ },
258
+ middleware: [
259
+ st({ mainAxis: a + D, alignmentAxis: i }),
260
+ c && it({
261
+ mainAxis: !0,
262
+ crossAxis: !1,
263
+ limiter: f === "partial" ? dt() : void 0,
264
+ ..._
265
+ }),
266
+ c && ct({ ..._ }),
267
+ lt({
268
+ ..._,
269
+ apply: ({ elements: $, rects: me, availableWidth: ze, availableHeight: Ze }) => {
270
+ const { width: Ke, height: Je } = me.reference, X = $.floating.style;
271
+ X.setProperty("--radix-popper-available-width", `${ze}px`), X.setProperty("--radix-popper-available-height", `${Ze}px`), X.setProperty("--radix-popper-anchor-width", `${Ke}px`), X.setProperty("--radix-popper-anchor-height", `${Je}px`);
272
+ }
273
+ }),
274
+ x && At({ element: x, padding: u }),
275
+ Bt({ arrowWidth: A, arrowHeight: D }),
276
+ y && ut({ strategy: "referenceHidden", ..._ })
277
+ ]
278
+ }), [O, We] = De(W), Y = gt(p);
279
+ ee(() => {
280
+ T && (Y == null || Y());
281
+ }, [T, Y]);
282
+ const Ye = (ce = k.arrow) == null ? void 0 : ce.x, Xe = (le = k.arrow) == null ? void 0 : le.y, Ue = ((ue = k.arrow) == null ? void 0 : ue.centerOffset) !== 0, [Ve, qe] = o.useState();
283
+ return ee(() => {
284
+ C && qe(window.getComputedStyle(C).zIndex);
285
+ }, [C]), /* @__PURE__ */ h(
286
+ "div",
287
+ {
288
+ ref: j.setFloating,
289
+ "data-radix-popper-content-wrapper": "",
290
+ style: {
291
+ ...S,
292
+ transform: T ? S.transform : "translate(0, -200%)",
293
+ // keep off the page when measuring
294
+ minWidth: "max-content",
295
+ zIndex: Ve,
296
+ "--radix-popper-transform-origin": [
297
+ (de = k.transformOrigin) == null ? void 0 : de.x,
298
+ (fe = k.transformOrigin) == null ? void 0 : fe.y
299
+ ].join(" "),
300
+ // hide the content if using the hide middleware and should be hidden
301
+ // set visibility to hidden and disable pointer events so the UI behaves
302
+ // as if the PopperContent isn't there at all
303
+ ...((pe = k.hide) == null ? void 0 : pe.referenceHidden) && {
304
+ visibility: "hidden",
305
+ pointerEvents: "none"
306
+ }
307
+ },
308
+ dir: t.dir,
309
+ children: /* @__PURE__ */ h(
310
+ Dt,
311
+ {
312
+ scope: e,
313
+ placedSide: O,
314
+ onArrowChange: P,
315
+ arrowX: Ye,
316
+ arrowY: Xe,
317
+ shouldHideArrow: Ue,
318
+ children: /* @__PURE__ */ h(
319
+ F.div,
320
+ {
321
+ "data-side": O,
322
+ "data-align": We,
323
+ ...m,
324
+ ref: b,
325
+ style: {
326
+ ...m.style,
327
+ // if the PopperContent hasn't been placed yet (not all measurements done)
328
+ // we prevent animations so that users's animation don't kick in too early referring wrong sides
329
+ animation: T ? void 0 : "none"
330
+ }
331
+ }
332
+ )
333
+ }
334
+ )
335
+ }
336
+ );
337
+ }
338
+ );
339
+ Se.displayName = oe;
340
+ var Oe = "PopperArrow", Nt = {
341
+ top: "bottom",
342
+ right: "left",
343
+ bottom: "top",
344
+ left: "right"
345
+ }, _e = o.forwardRef(function(r, e) {
346
+ const { __scopePopper: n, ...a } = r, s = Mt(Oe, n), i = Nt[s.placedSide];
347
+ return (
348
+ // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
349
+ // doesn't report size as we'd expect on SVG elements.
350
+ // it reports their bounding box which is effectively the largest path inside the SVG.
351
+ /* @__PURE__ */ h(
352
+ "span",
353
+ {
354
+ ref: s.onArrowChange,
355
+ style: {
356
+ position: "absolute",
357
+ left: s.arrowX,
358
+ top: s.arrowY,
359
+ [i]: 0,
360
+ transformOrigin: {
361
+ top: "",
362
+ right: "0 0",
363
+ bottom: "center 0",
364
+ left: "100% 0"
365
+ }[s.placedSide],
366
+ transform: {
367
+ top: "translateY(100%)",
368
+ right: "translateY(50%) rotate(90deg) translateX(-50%)",
369
+ bottom: "rotate(180deg)",
370
+ left: "translateY(50%) rotate(-90deg) translateX(50%)"
371
+ }[s.placedSide],
372
+ visibility: s.shouldHideArrow ? "hidden" : void 0
373
+ },
374
+ children: /* @__PURE__ */ h(
375
+ Ot,
376
+ {
377
+ ...a,
378
+ ref: e,
379
+ style: {
380
+ ...a.style,
381
+ // ensures the element can be measured correctly (mostly for if SVG)
382
+ display: "block"
383
+ }
384
+ }
385
+ )
386
+ }
387
+ )
388
+ );
389
+ });
390
+ _e.displayName = Oe;
391
+ function Lt(t) {
392
+ return t !== null;
393
+ }
394
+ var Bt = (t) => ({
395
+ name: "transformOrigin",
396
+ options: t,
397
+ fn(r) {
398
+ var v, C, w;
399
+ const { placement: e, rects: n, middlewareData: a } = r, i = ((v = a.arrow) == null ? void 0 : v.centerOffset) !== 0, u = i ? 0 : t.arrowWidth, c = i ? 0 : t.arrowHeight, [d, l] = De(e), f = { start: "0%", center: "50%", end: "100%" }[l], y = (((C = a.arrow) == null ? void 0 : C.x) ?? 0) + u / 2, g = (((w = a.arrow) == null ? void 0 : w.y) ?? 0) + c / 2;
400
+ let p = "", m = "";
401
+ return d === "bottom" ? (p = i ? f : `${y}px`, m = `${-c}px`) : d === "top" ? (p = i ? f : `${y}px`, m = `${n.floating.height + c}px`) : d === "right" ? (p = `${-c}px`, m = i ? f : `${g}px`) : d === "left" && (p = `${n.floating.width + c}px`, m = i ? f : `${g}px`), { data: { x: p, y: m } };
402
+ }
403
+ });
404
+ function De(t) {
405
+ const [r, e = "center"] = t.split("-");
406
+ return [r, e];
407
+ }
408
+ var Ht = Ee, It = ke, $t = Se, Ft = _e, [Z, kr] = ve("Tooltip", [
409
+ Re
410
+ ]), K = Re(), Me = "TooltipProvider", Gt = 700, te = "tooltip.open", [jt, ae] = Z(Me), Ne = (t) => {
411
+ const {
412
+ __scopeTooltip: r,
413
+ delayDuration: e = Gt,
414
+ skipDelayDuration: n = 300,
415
+ disableHoverableContent: a = !1,
416
+ children: s
417
+ } = t, [i, u] = o.useState(!0), c = o.useRef(!1), d = o.useRef(0);
418
+ return o.useEffect(() => {
419
+ const l = d.current;
420
+ return () => window.clearTimeout(l);
421
+ }, []), /* @__PURE__ */ h(
422
+ jt,
423
+ {
424
+ scope: r,
425
+ isOpenDelayed: i,
426
+ delayDuration: e,
427
+ onOpen: o.useCallback(() => {
428
+ window.clearTimeout(d.current), u(!1);
429
+ }, []),
430
+ onClose: o.useCallback(() => {
431
+ window.clearTimeout(d.current), d.current = window.setTimeout(
432
+ () => u(!0),
433
+ n
434
+ );
435
+ }, [n]),
436
+ isPointerInTransitRef: c,
437
+ onPointerInTransitChange: o.useCallback((l) => {
438
+ c.current = l;
439
+ }, []),
440
+ disableHoverableContent: a,
441
+ children: s
442
+ }
443
+ );
444
+ };
445
+ Ne.displayName = Me;
446
+ var J = "Tooltip", [Wt, G] = Z(J), Le = (t) => {
447
+ const {
448
+ __scopeTooltip: r,
449
+ children: e,
450
+ open: n,
451
+ defaultOpen: a = !1,
452
+ onOpenChange: s,
453
+ disableHoverableContent: i,
454
+ delayDuration: u
455
+ } = t, c = ae(J, t.__scopeTooltip), d = K(r), [l, f] = o.useState(null), y = nt(), g = o.useRef(0), p = i ?? c.disableHoverableContent, m = u ?? c.delayDuration, v = o.useRef(!1), [C = !1, w] = Ct({
456
+ prop: n,
457
+ defaultProp: a,
458
+ onChange: (A) => {
459
+ A ? (c.onOpen(), document.dispatchEvent(new CustomEvent(te))) : c.onClose(), s == null || s(A);
460
+ }
461
+ }), b = o.useMemo(() => C ? v.current ? "delayed-open" : "instant-open" : "closed", [C]), x = o.useCallback(() => {
462
+ window.clearTimeout(g.current), v.current = !1, w(!0);
463
+ }, [w]), P = o.useCallback(() => {
464
+ window.clearTimeout(g.current), w(!1);
465
+ }, [w]), R = o.useCallback(() => {
466
+ window.clearTimeout(g.current), g.current = window.setTimeout(() => {
467
+ v.current = !0, w(!0);
468
+ }, m);
469
+ }, [m, w]);
470
+ return o.useEffect(() => () => window.clearTimeout(g.current), []), /* @__PURE__ */ h(Ht, { ...d, children: /* @__PURE__ */ h(
471
+ Wt,
472
+ {
473
+ scope: r,
474
+ contentId: y,
475
+ open: C,
476
+ stateAttribute: b,
477
+ trigger: l,
478
+ onTriggerChange: f,
479
+ onTriggerEnter: o.useCallback(() => {
480
+ c.isOpenDelayed ? R() : x();
481
+ }, [c.isOpenDelayed, R, x]),
482
+ onTriggerLeave: o.useCallback(() => {
483
+ p ? P() : window.clearTimeout(g.current);
484
+ }, [P, p]),
485
+ onOpen: x,
486
+ onClose: P,
487
+ disableHoverableContent: p,
488
+ children: e
489
+ }
490
+ ) });
491
+ };
492
+ Le.displayName = J;
493
+ var re = "TooltipTrigger", Be = o.forwardRef(
494
+ (t, r) => {
495
+ const { __scopeTooltip: e, ...n } = t, a = G(re, e), s = ae(re, e), i = K(e), u = o.useRef(null), c = z(r, u, a.onTriggerChange), d = o.useRef(!1), l = o.useRef(!1), f = o.useCallback(() => d.current = !1, []);
496
+ return o.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ h(It, { asChild: !0, ...i, children: /* @__PURE__ */ h(
497
+ F.button,
498
+ {
499
+ "aria-describedby": a.open ? a.contentId : void 0,
500
+ "data-state": a.stateAttribute,
501
+ ...n,
502
+ ref: c,
503
+ onPointerMove: L(t.onPointerMove, (y) => {
504
+ y.pointerType !== "touch" && !l.current && !s.isPointerInTransitRef.current && (a.onTriggerEnter(), l.current = !0);
505
+ }),
506
+ onPointerLeave: L(t.onPointerLeave, () => {
507
+ a.onTriggerLeave(), l.current = !1;
508
+ }),
509
+ onPointerDown: L(t.onPointerDown, () => {
510
+ d.current = !0, document.addEventListener("pointerup", f, { once: !0 });
511
+ }),
512
+ onFocus: L(t.onFocus, () => {
513
+ d.current || a.onOpen();
514
+ }),
515
+ onBlur: L(t.onBlur, a.onClose),
516
+ onClick: L(t.onClick, a.onClose)
517
+ }
518
+ ) });
519
+ }
520
+ );
521
+ Be.displayName = re;
522
+ var se = "TooltipPortal", [Yt, Xt] = Z(se, {
523
+ forceMount: void 0
524
+ }), He = (t) => {
525
+ const { __scopeTooltip: r, forceMount: e, children: n, container: a } = t, s = G(se, r);
526
+ return /* @__PURE__ */ h(Yt, { scope: r, forceMount: e, children: /* @__PURE__ */ h(Ce, { present: e || s.open, children: /* @__PURE__ */ h(we, { asChild: !0, container: a, children: n }) }) });
527
+ };
528
+ He.displayName = se;
529
+ var H = "TooltipContent", Ie = o.forwardRef(
530
+ (t, r) => {
531
+ const e = Xt(H, t.__scopeTooltip), { forceMount: n = e.forceMount, side: a = "top", ...s } = t, i = G(H, t.__scopeTooltip);
532
+ return /* @__PURE__ */ h(Ce, { present: n || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ h($e, { side: a, ...s, ref: r }) : /* @__PURE__ */ h(Ut, { side: a, ...s, ref: r }) });
533
+ }
534
+ ), Ut = o.forwardRef((t, r) => {
535
+ const e = G(H, t.__scopeTooltip), n = ae(H, t.__scopeTooltip), a = o.useRef(null), s = z(r, a), [i, u] = o.useState(null), { trigger: c, onClose: d } = e, l = a.current, { onPointerInTransitChange: f } = n, y = o.useCallback(() => {
536
+ u(null), f(!1);
537
+ }, [f]), g = o.useCallback(
538
+ (p, m) => {
539
+ const v = p.currentTarget, C = { x: p.clientX, y: p.clientY }, w = zt(C, v.getBoundingClientRect()), b = Zt(C, w), x = Kt(m.getBoundingClientRect()), P = Qt([...b, ...x]);
540
+ u(P), f(!0);
541
+ },
542
+ [f]
543
+ );
544
+ return o.useEffect(() => () => y(), [y]), o.useEffect(() => {
545
+ if (c && l) {
546
+ const p = (v) => g(v, l), m = (v) => g(v, c);
547
+ return c.addEventListener("pointerleave", p), l.addEventListener("pointerleave", m), () => {
548
+ c.removeEventListener("pointerleave", p), l.removeEventListener("pointerleave", m);
549
+ };
550
+ }
551
+ }, [c, l, g, y]), o.useEffect(() => {
552
+ if (i) {
553
+ const p = (m) => {
554
+ const v = m.target, C = { x: m.clientX, y: m.clientY }, w = (c == null ? void 0 : c.contains(v)) || (l == null ? void 0 : l.contains(v)), b = !Jt(C, i);
555
+ w ? y() : b && (y(), d());
556
+ };
557
+ return document.addEventListener("pointermove", p), () => document.removeEventListener("pointermove", p);
558
+ }
559
+ }, [c, l, i, d, y]), /* @__PURE__ */ h($e, { ...t, ref: s });
560
+ }), [Vt, qt] = Z(J, { isInside: !1 }), $e = o.forwardRef(
561
+ (t, r) => {
562
+ const {
563
+ __scopeTooltip: e,
564
+ children: n,
565
+ "aria-label": a,
566
+ onEscapeKeyDown: s,
567
+ onPointerDownOutside: i,
568
+ ...u
569
+ } = t, c = G(H, e), d = K(e), { onClose: l } = c;
570
+ return o.useEffect(() => (document.addEventListener(te, l), () => document.removeEventListener(te, l)), [l]), o.useEffect(() => {
571
+ if (c.trigger) {
572
+ const f = (y) => {
573
+ const g = y.target;
574
+ g != null && g.contains(c.trigger) && l();
575
+ };
576
+ return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
577
+ }
578
+ }, [c.trigger, l]), /* @__PURE__ */ h(
579
+ rt,
580
+ {
581
+ asChild: !0,
582
+ disableOutsidePointerEvents: !1,
583
+ onEscapeKeyDown: s,
584
+ onPointerDownOutside: i,
585
+ onFocusOutside: (f) => f.preventDefault(),
586
+ onDismiss: l,
587
+ children: /* @__PURE__ */ mt(
588
+ $t,
589
+ {
590
+ "data-state": c.stateAttribute,
591
+ ...d,
592
+ ...u,
593
+ ref: r,
594
+ style: {
595
+ ...u.style,
596
+ "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
597
+ "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
598
+ "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
599
+ "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
600
+ "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
601
+ },
602
+ children: [
603
+ /* @__PURE__ */ h(yt, { children: n }),
604
+ /* @__PURE__ */ h(Vt, { scope: e, isInside: !0, children: /* @__PURE__ */ h(wt, { id: c.contentId, role: "tooltip", children: a || n }) })
605
+ ]
606
+ }
607
+ )
608
+ }
609
+ );
610
+ }
611
+ );
612
+ Ie.displayName = H;
613
+ var Fe = "TooltipArrow", Ge = o.forwardRef(
614
+ (t, r) => {
615
+ const { __scopeTooltip: e, ...n } = t, a = K(e);
616
+ return qt(
617
+ Fe,
618
+ e
619
+ ).isInside ? null : /* @__PURE__ */ h(Ft, { ...a, ...n, ref: r });
620
+ }
621
+ );
622
+ Ge.displayName = Fe;
623
+ function zt(t, r) {
624
+ const e = Math.abs(r.top - t.y), n = Math.abs(r.bottom - t.y), a = Math.abs(r.right - t.x), s = Math.abs(r.left - t.x);
625
+ switch (Math.min(e, n, a, s)) {
626
+ case s:
627
+ return "left";
628
+ case a:
629
+ return "right";
630
+ case e:
631
+ return "top";
632
+ case n:
633
+ return "bottom";
634
+ default:
635
+ throw new Error("unreachable");
636
+ }
637
+ }
638
+ function Zt(t, r, e = 5) {
639
+ const n = [];
640
+ switch (r) {
641
+ case "top":
642
+ n.push(
643
+ { x: t.x - e, y: t.y + e },
644
+ { x: t.x + e, y: t.y + e }
645
+ );
646
+ break;
647
+ case "bottom":
648
+ n.push(
649
+ { x: t.x - e, y: t.y - e },
650
+ { x: t.x + e, y: t.y - e }
651
+ );
652
+ break;
653
+ case "left":
654
+ n.push(
655
+ { x: t.x + e, y: t.y - e },
656
+ { x: t.x + e, y: t.y + e }
657
+ );
658
+ break;
659
+ case "right":
660
+ n.push(
661
+ { x: t.x - e, y: t.y - e },
662
+ { x: t.x - e, y: t.y + e }
663
+ );
664
+ break;
665
+ }
666
+ return n;
667
+ }
668
+ function Kt(t) {
669
+ const { top: r, right: e, bottom: n, left: a } = t;
670
+ return [
671
+ { x: a, y: r },
672
+ { x: e, y: r },
673
+ { x: e, y: n },
674
+ { x: a, y: n }
675
+ ];
676
+ }
677
+ function Jt(t, r) {
678
+ const { x: e, y: n } = t;
679
+ let a = !1;
680
+ for (let s = 0, i = r.length - 1; s < r.length; i = s++) {
681
+ const u = r[s].x, c = r[s].y, d = r[i].x, l = r[i].y;
682
+ c > n != l > n && e < (d - u) * (n - c) / (l - c) + u && (a = !a);
683
+ }
684
+ return a;
685
+ }
686
+ function Qt(t) {
687
+ const r = t.slice();
688
+ return r.sort((e, n) => e.x < n.x ? -1 : e.x > n.x ? 1 : e.y < n.y ? -1 : e.y > n.y ? 1 : 0), er(r);
689
+ }
690
+ function er(t) {
691
+ if (t.length <= 1) return t.slice();
692
+ const r = [];
693
+ for (let n = 0; n < t.length; n++) {
694
+ const a = t[n];
695
+ for (; r.length >= 2; ) {
696
+ const s = r[r.length - 1], i = r[r.length - 2];
697
+ if ((s.x - i.x) * (a.y - i.y) >= (s.y - i.y) * (a.x - i.x)) r.pop();
698
+ else break;
699
+ }
700
+ r.push(a);
701
+ }
702
+ r.pop();
703
+ const e = [];
704
+ for (let n = t.length - 1; n >= 0; n--) {
705
+ const a = t[n];
706
+ for (; e.length >= 2; ) {
707
+ const s = e[e.length - 1], i = e[e.length - 2];
708
+ if ((s.x - i.x) * (a.y - i.y) >= (s.y - i.y) * (a.x - i.x)) e.pop();
709
+ else break;
710
+ }
711
+ e.push(a);
712
+ }
713
+ return e.pop(), r.length === 1 && e.length === 1 && r[0].x === e[0].x && r[0].y === e[0].y ? r : r.concat(e);
714
+ }
715
+ var tr = Ne, Sr = Le, Or = Be, _r = He, Dr = Ie, Mr = Ge;
716
+ function rr(t) {
717
+ switch (t) {
718
+ case "tomato":
719
+ case "red":
720
+ case "ruby":
721
+ case "crimson":
722
+ case "pink":
723
+ case "plum":
724
+ case "purple":
725
+ case "violet":
726
+ return "mauve";
727
+ case "iris":
728
+ case "indigo":
729
+ case "blue":
730
+ case "sky":
731
+ case "cyan":
732
+ return "slate";
733
+ case "teal":
734
+ case "jade":
735
+ case "mint":
736
+ case "green":
737
+ return "sage";
738
+ case "grass":
739
+ case "lime":
740
+ return "olive";
741
+ case "yellow":
742
+ case "amber":
743
+ case "orange":
744
+ case "brown":
745
+ case "gold":
746
+ case "bronze":
747
+ return "sand";
748
+ case "gray":
749
+ return "gray";
750
+ }
751
+ }
752
+ const nr = ["inherit", "light", "dark"], or = ["solid", "translucent"], ar = ["90%", "95%", "100%", "105%", "110%"], E = { ...Pt, hasBackground: { type: "boolean", default: !0 }, appearance: { type: "enum", values: nr, default: "inherit" }, accentColor: { type: "enum", values: Tt, default: "indigo" }, grayColor: { type: "enum", values: Rt, default: "auto" }, panelBackground: { type: "enum", values: or, default: "translucent" }, radius: { type: "enum", values: bt, default: "medium" }, scaling: { type: "enum", values: ar, default: "100%" } }, B = () => {
753
+ }, q = o.createContext(void 0);
754
+ function Nr() {
755
+ const t = o.useContext(q);
756
+ if (t === void 0) throw new Error("`useThemeContext` must be used within a `Theme`");
757
+ return t;
758
+ }
759
+ const sr = o.forwardRef((t, r) => o.useContext(q) === void 0 ? o.createElement(tr, { delayDuration: 200 }, o.createElement(xt, { dir: "ltr" }, o.createElement(je, { ...t, ref: r }))) : o.createElement(ie, { ...t, ref: r }));
760
+ sr.displayName = "Theme";
761
+ const je = o.forwardRef((t, r) => {
762
+ const { appearance: e = E.appearance.default, accentColor: n = E.accentColor.default, grayColor: a = E.grayColor.default, panelBackground: s = E.panelBackground.default, radius: i = E.radius.default, scaling: u = E.scaling.default, hasBackground: c = E.hasBackground.default, ...d } = t, [l, f] = o.useState(e);
763
+ o.useEffect(() => f(e), [e]);
764
+ const [y, g] = o.useState(n);
765
+ o.useEffect(() => g(n), [n]);
766
+ const [p, m] = o.useState(a);
767
+ o.useEffect(() => m(a), [a]);
768
+ const [v, C] = o.useState(s);
769
+ o.useEffect(() => C(s), [s]);
770
+ const [w, b] = o.useState(i);
771
+ o.useEffect(() => b(i), [i]);
772
+ const [x, P] = o.useState(u);
773
+ return o.useEffect(() => P(u), [u]), o.createElement(ie, { ...d, ref: r, isRoot: !0, hasBackground: c, appearance: l, accentColor: y, grayColor: p, panelBackground: v, radius: w, scaling: x, onAppearanceChange: f, onAccentColorChange: g, onGrayColorChange: m, onPanelBackgroundChange: C, onRadiusChange: b, onScalingChange: P });
774
+ });
775
+ je.displayName = "ThemeRoot";
776
+ const ie = o.forwardRef((t, r) => {
777
+ const e = o.useContext(q), { asChild: n, isRoot: a, hasBackground: s, appearance: i = (e == null ? void 0 : e.appearance) ?? E.appearance.default, accentColor: u = (e == null ? void 0 : e.accentColor) ?? E.accentColor.default, grayColor: c = (e == null ? void 0 : e.resolvedGrayColor) ?? E.grayColor.default, panelBackground: d = (e == null ? void 0 : e.panelBackground) ?? E.panelBackground.default, radius: l = (e == null ? void 0 : e.radius) ?? E.radius.default, scaling: f = (e == null ? void 0 : e.scaling) ?? E.scaling.default, onAppearanceChange: y = B, onAccentColorChange: g = B, onGrayColorChange: p = B, onPanelBackgroundChange: m = B, onRadiusChange: v = B, onScalingChange: C = B, ...w } = t, b = n ? vt : "div", x = c === "auto" ? rr(u) : c, P = t.appearance === "light" || t.appearance === "dark", R = s === void 0 ? a || P : s;
778
+ return o.createElement(q.Provider, { value: o.useMemo(() => ({ appearance: i, accentColor: u, grayColor: c, resolvedGrayColor: x, panelBackground: d, radius: l, scaling: f, onAppearanceChange: y, onAccentColorChange: g, onGrayColorChange: p, onPanelBackgroundChange: m, onRadiusChange: v, onScalingChange: C }), [i, u, c, x, d, l, f, y, g, p, m, v, C]) }, o.createElement(b, { "data-is-root-theme": a ? "true" : "false", "data-accent-color": u, "data-gray-color": x, "data-has-background": R ? "true" : "false", "data-panel-background": d, "data-radius": l, "data-scaling": f, ref: r, ...w, className: tt("radix-themes", { light: i === "light", dark: i === "dark" }, w.className) }));
779
+ });
780
+ ie.displayName = "ThemeImpl";
781
+ export {
782
+ Mr as A,
783
+ Dr as C,
784
+ Nr as H,
785
+ sr as I,
786
+ _r as P,
787
+ Sr as R,
788
+ Or as T,
789
+ we as a,
790
+ It as b,
791
+ Re as c,
792
+ $t as d,
793
+ Ft as e,
794
+ Ht as f
795
+ };