@yselimcan/ui 0.0.1 → 0.0.3

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 (267) hide show
  1. package/dist/index.d.ts +231 -1
  2. package/dist/index.js +100 -15331
  3. package/dist/index10.js +137 -0
  4. package/dist/index100.js +7 -0
  5. package/dist/index101.js +69 -0
  6. package/dist/index102.js +11 -0
  7. package/dist/index103.js +16 -0
  8. package/dist/index104.js +6 -0
  9. package/dist/index105.js +6 -0
  10. package/dist/index106.js +8 -0
  11. package/dist/index107.js +10 -0
  12. package/dist/index108.js +90 -0
  13. package/dist/index109.js +15 -0
  14. package/dist/index11.js +21 -0
  15. package/dist/index110.js +65 -0
  16. package/dist/index111.js +40 -0
  17. package/dist/index112.js +16 -0
  18. package/dist/index113.js +35 -0
  19. package/dist/index114.js +21 -0
  20. package/dist/index115.js +8 -0
  21. package/dist/index116.js +6 -0
  22. package/dist/index117.js +7 -0
  23. package/dist/index118.js +14 -0
  24. package/dist/index119.js +21 -0
  25. package/dist/index12.js +20 -0
  26. package/dist/index120.js +15 -0
  27. package/dist/index121.js +299 -0
  28. package/dist/index122.js +7 -0
  29. package/dist/index123.js +41 -0
  30. package/dist/index124.js +128 -0
  31. package/dist/index125.js +23 -0
  32. package/dist/index126.js +79 -0
  33. package/dist/index127.js +67 -0
  34. package/dist/index128.js +48 -0
  35. package/dist/index129.js +32 -0
  36. package/dist/index13.js +206 -0
  37. package/dist/index130.js +14 -0
  38. package/dist/index131.js +69 -0
  39. package/dist/index132.js +56 -0
  40. package/dist/index133.js +15 -0
  41. package/dist/index134.js +15 -0
  42. package/dist/index135.js +15 -0
  43. package/dist/index136.js +43 -0
  44. package/dist/index137.js +14 -0
  45. package/dist/index138.js +11 -0
  46. package/dist/index139.js +8 -0
  47. package/dist/index14.js +24 -0
  48. package/dist/index140.js +90 -0
  49. package/dist/index141.js +14 -0
  50. package/dist/index142.js +266 -0
  51. package/dist/index143.js +82 -0
  52. package/dist/index144.js +14 -0
  53. package/dist/index145.js +59 -0
  54. package/dist/index146.js +14 -0
  55. package/dist/index147.js +14 -0
  56. package/dist/index148.js +33 -0
  57. package/dist/index149.js +21 -0
  58. package/dist/index15.js +19 -0
  59. package/dist/index150.js +69 -0
  60. package/dist/index151.js +107 -0
  61. package/dist/index152.js +11 -0
  62. package/dist/index153.js +11 -0
  63. package/dist/index154.js +25 -0
  64. package/dist/index155.js +106 -0
  65. package/dist/index156.js +10 -0
  66. package/dist/index157.js +35 -0
  67. package/dist/index158.js +233 -0
  68. package/dist/index159.js +77 -0
  69. package/dist/index16.js +8 -0
  70. package/dist/index160.js +286 -0
  71. package/dist/index161.js +56 -0
  72. package/dist/index162.js +6 -0
  73. package/dist/index163.js +17 -0
  74. package/dist/index164.js +18 -0
  75. package/dist/index165.js +31 -0
  76. package/dist/index166.js +10 -0
  77. package/dist/index167.js +25 -0
  78. package/dist/index168.js +27 -0
  79. package/dist/index169.js +163 -0
  80. package/dist/index17.js +46 -0
  81. package/dist/index170.js +116 -0
  82. package/dist/index171.js +78 -0
  83. package/dist/index172.js +67 -0
  84. package/dist/index173.js +72 -0
  85. package/dist/index174.js +16 -0
  86. package/dist/index175.js +8 -0
  87. package/dist/index176.js +20 -0
  88. package/dist/index177.js +24 -0
  89. package/dist/index178.js +61 -0
  90. package/dist/index179.js +20 -0
  91. package/dist/index18.js +41 -0
  92. package/dist/index180.js +30 -0
  93. package/dist/index181.js +45 -0
  94. package/dist/index182.js +24 -0
  95. package/dist/index183.js +51 -0
  96. package/dist/index184.js +54 -0
  97. package/dist/index185.js +20 -0
  98. package/dist/index186.js +14 -0
  99. package/dist/index187.js +38 -0
  100. package/dist/index188.js +18 -0
  101. package/dist/index189.js +82 -0
  102. package/dist/index19.js +80 -0
  103. package/dist/index190.js +26 -0
  104. package/dist/index191.js +6 -0
  105. package/dist/index192.js +14 -0
  106. package/dist/index193.js +13 -0
  107. package/dist/index194.js +43 -0
  108. package/dist/index195.js +7 -0
  109. package/dist/index196.js +12 -0
  110. package/dist/index197.js +14 -0
  111. package/dist/index198.js +120 -0
  112. package/dist/index199.js +14 -0
  113. package/dist/index20.js +25 -0
  114. package/dist/index200.js +8 -0
  115. package/dist/index201.js +50 -0
  116. package/dist/index202.js +202 -0
  117. package/dist/index203.js +50 -0
  118. package/dist/index204.js +22 -0
  119. package/dist/index205.js +29 -0
  120. package/dist/index206.js +6 -0
  121. package/dist/index207.js +24 -0
  122. package/dist/index208.js +130 -0
  123. package/dist/index209.js +47 -0
  124. package/dist/index21.js +40 -0
  125. package/dist/index210.js +20 -0
  126. package/dist/index211.js +7 -0
  127. package/dist/index212.js +183 -0
  128. package/dist/index213.js +78 -0
  129. package/dist/index214.js +401 -0
  130. package/dist/index215.js +9 -0
  131. package/dist/index216.js +7 -0
  132. package/dist/index217.js +19 -0
  133. package/dist/index218.js +17 -0
  134. package/dist/index219.js +35 -0
  135. package/dist/index22.js +31 -0
  136. package/dist/index220.js +41 -0
  137. package/dist/index221.js +59 -0
  138. package/dist/index222.js +30 -0
  139. package/dist/index223.js +10 -0
  140. package/dist/index224.js +15 -0
  141. package/dist/index225.js +14 -0
  142. package/dist/index226.js +14 -0
  143. package/dist/index227.js +24 -0
  144. package/dist/index228.js +14 -0
  145. package/dist/index229.js +10 -0
  146. package/dist/index23.js +25 -0
  147. package/dist/index230.js +45 -0
  148. package/dist/index231.js +599 -0
  149. package/dist/index232.js +14 -0
  150. package/dist/index233.js +6 -0
  151. package/dist/index234.js +12 -0
  152. package/dist/index235.js +14 -0
  153. package/dist/index236.js +17 -0
  154. package/dist/index237.js +211 -0
  155. package/dist/index238.js +6 -0
  156. package/dist/index239.js +16 -0
  157. package/dist/index24.js +56 -0
  158. package/dist/index240.js +50 -0
  159. package/dist/index241.js +6 -0
  160. package/dist/index242.js +15 -0
  161. package/dist/index243.js +60 -0
  162. package/dist/index244.js +32 -0
  163. package/dist/index245.js +16 -0
  164. package/dist/index246.js +11 -0
  165. package/dist/index247.js +209 -0
  166. package/dist/index248.js +23 -0
  167. package/dist/index249.js +8 -0
  168. package/dist/index25.js +35 -0
  169. package/dist/index250.js +324 -0
  170. package/dist/index251.js +5 -0
  171. package/dist/index252.js +5 -0
  172. package/dist/index253.js +489 -0
  173. package/dist/index254.js +10 -0
  174. package/dist/index255.js +4 -0
  175. package/dist/index256.js +46 -0
  176. package/dist/index257.js +58 -0
  177. package/dist/index258.js +10 -0
  178. package/dist/index259.js +4 -0
  179. package/dist/index26.js +7 -0
  180. package/dist/index260.js +57 -0
  181. package/dist/index261.js +58 -0
  182. package/dist/index262.js +4 -0
  183. package/dist/index263.js +4 -0
  184. package/dist/index264.js +4 -0
  185. package/dist/index265.js +4 -0
  186. package/dist/index27.js +82 -0
  187. package/dist/index28.js +32 -0
  188. package/dist/index29.js +6 -0
  189. package/dist/index3.js +181 -0
  190. package/dist/index30.js +9 -0
  191. package/dist/index31.js +6 -0
  192. package/dist/index32.js +23 -0
  193. package/dist/index33.js +207 -0
  194. package/dist/index34.js +25 -0
  195. package/dist/index35.js +102 -0
  196. package/dist/index36.js +69 -0
  197. package/dist/index37.js +66 -0
  198. package/dist/index38.js +113 -0
  199. package/dist/index39.js +53 -0
  200. package/dist/index4.js +47 -0
  201. package/dist/index40.js +35 -0
  202. package/dist/index41.js +28 -0
  203. package/dist/index42.js +18 -0
  204. package/dist/index43.js +27 -0
  205. package/dist/index44.js +25 -0
  206. package/dist/index45.js +36 -0
  207. package/dist/index46.js +78 -0
  208. package/dist/index47.js +65 -0
  209. package/dist/index48.js +128 -0
  210. package/dist/index49.js +19 -0
  211. package/dist/index5.js +52 -0
  212. package/dist/index50.js +86 -0
  213. package/dist/index51.js +6 -0
  214. package/dist/index52.js +268 -0
  215. package/dist/index53.js +25 -0
  216. package/dist/index54.js +207 -0
  217. package/dist/index55.js +146 -0
  218. package/dist/index56.js +88 -0
  219. package/dist/index57.js +29 -0
  220. package/dist/index58.js +30 -0
  221. package/dist/index59.js +48 -0
  222. package/dist/index6.js +93 -0
  223. package/dist/index60.js +79 -0
  224. package/dist/index61.js +45 -0
  225. package/dist/index62.js +46 -0
  226. package/dist/index63.js +76 -0
  227. package/dist/index64.js +45 -0
  228. package/dist/index65.js +22 -0
  229. package/dist/index66.js +101 -0
  230. package/dist/index67.js +14 -0
  231. package/dist/index68.js +6 -0
  232. package/dist/index69.js +321 -0
  233. package/dist/index7.js +294 -0
  234. package/dist/index70.js +24 -0
  235. package/dist/index71.js +143 -0
  236. package/dist/index72.js +200 -0
  237. package/dist/index73.js +43 -0
  238. package/dist/index74.js +29 -0
  239. package/dist/index75.js +148 -0
  240. package/dist/index76.js +32 -0
  241. package/dist/index77.js +53 -0
  242. package/dist/index78.js +28 -0
  243. package/dist/index79.js +15 -0
  244. package/dist/index8.js +264 -0
  245. package/dist/index80.js +15 -0
  246. package/dist/index81.js +135 -0
  247. package/dist/index82.js +31 -0
  248. package/dist/index83.js +35 -0
  249. package/dist/index84.js +17 -0
  250. package/dist/index85.js +2765 -0
  251. package/dist/index86.js +57 -0
  252. package/dist/index87.js +14 -0
  253. package/dist/index88.js +98 -0
  254. package/dist/index89.js +92 -0
  255. package/dist/index9.js +197 -0
  256. package/dist/index90.js +21 -0
  257. package/dist/index91.js +18 -0
  258. package/dist/index92.js +35 -0
  259. package/dist/index93.js +14 -0
  260. package/dist/index94.js +136 -0
  261. package/dist/index95.js +30 -0
  262. package/dist/index96.js +11 -0
  263. package/dist/index97.js +7 -0
  264. package/dist/index98.js +15 -0
  265. package/dist/index99.js +25 -0
  266. package/dist/styles.css +1 -1
  267. package/package.json +3 -2
@@ -0,0 +1,88 @@
1
+ "use client";
2
+ import * as a from "react";
3
+ import { useMenuRootContext as O } from "./index133.js";
4
+ import { useMenuPositionerContext as D } from "./index135.js";
5
+ import { useRenderElement as I } from "./index86.js";
6
+ import { popupStateMapping as N } from "./index111.js";
7
+ import { transitionStatusMapping as w } from "./index112.js";
8
+ import { useOpenChangeComplete as G } from "./index119.js";
9
+ import { createChangeEventDetails as K } from "./index113.js";
10
+ import { useToolbarRootContext as _ } from "./index138.js";
11
+ import { COMPOSITE_KEYS as j } from "./index120.js";
12
+ import { getDisabledMountTransitionStyles as k } from "./index139.js";
13
+ import { jsx as A } from "react/jsx-runtime";
14
+ import { useHoverFloatingInteraction as H } from "./index140.js";
15
+ import { FloatingFocusManager as V } from "./index121.js";
16
+ import { outsidePress as Y } from "./index114.js";
17
+ const q = {
18
+ ...N,
19
+ ...w
20
+ }, z = /* @__PURE__ */ a.forwardRef(function(u, g) {
21
+ const {
22
+ render: J,
23
+ className: L,
24
+ finalFocus: i,
25
+ ...S
26
+ } = u, {
27
+ store: e
28
+ } = O(), {
29
+ side: p,
30
+ align: c
31
+ } = D(), y = _() != null, n = e.useState("open"), r = e.useState("transitionStatus"), b = e.useState("popupProps"), x = e.useState("mounted"), l = e.useState("instantType"), C = e.useState("activeTriggerElement"), t = e.useState("parent"), E = e.useState("lastOpenChangeReason"), R = e.useState("rootId"), m = e.useState("floatingRootContext"), s = e.useState("floatingTreeRoot"), F = e.useState("closeDelay"), T = e.useState("activeTriggerElement");
32
+ G({
33
+ open: n,
34
+ ref: e.context.popupRef,
35
+ onComplete() {
36
+ n && e.context.onOpenChangeComplete?.(!0);
37
+ }
38
+ }), a.useEffect(() => {
39
+ function o(d) {
40
+ e.setOpen(!1, K(d.reason, d.domEvent));
41
+ }
42
+ return s.events.on("close", o), () => {
43
+ s.events.off("close", o);
44
+ };
45
+ }, [s.events, e]);
46
+ const v = e.useState("hoverEnabled"), M = e.useState("disabled");
47
+ H(m, {
48
+ enabled: v && !M && t.type !== "context-menu" && t.type !== "menubar",
49
+ closeDelay: F
50
+ });
51
+ const h = a.useMemo(() => ({
52
+ transitionStatus: r,
53
+ side: p,
54
+ align: c,
55
+ open: n,
56
+ nested: t.type === "menu",
57
+ instant: l
58
+ }), [r, p, c, n, t.type, l]), P = I("div", u, {
59
+ state: h,
60
+ ref: [g, e.context.popupRef],
61
+ stateAttributesMapping: q,
62
+ props: [b, {
63
+ onKeyDown(o) {
64
+ y && j.has(o.key) && o.stopPropagation();
65
+ }
66
+ }, k(r), S, {
67
+ "data-rootownerid": R
68
+ }]
69
+ });
70
+ let f = t.type === void 0 || t.type === "context-menu";
71
+ return (C || t.type === "menubar" && E !== Y) && (f = !0), /* @__PURE__ */ A(V, {
72
+ context: m,
73
+ modal: !1,
74
+ disabled: !x,
75
+ returnFocus: i === void 0 ? f : i,
76
+ initialFocus: t.type !== "menu",
77
+ restoreFocus: !0,
78
+ externalTree: t.type !== "menubar" ? s : void 0,
79
+ previousFocusableElement: T,
80
+ nextFocusableElement: t.type === void 0 ? e.context.triggerFocusTargetRef : void 0,
81
+ beforeContentFocusGuardRef: t.type === void 0 ? e.context.beforeContentFocusGuardRef : void 0,
82
+ children: P
83
+ });
84
+ });
85
+ process.env.NODE_ENV !== "production" && (z.displayName = "MenuPopup");
86
+ export {
87
+ z as MenuPopup
88
+ };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import * as e from "react";
3
+ import { useRenderElement as a } from "./index86.js";
4
+ import { MenuGroupContext as i } from "./index137.js";
5
+ import { jsx as p } from "react/jsx-runtime";
6
+ const d = /* @__PURE__ */ e.forwardRef(function(r, t) {
7
+ const {
8
+ render: c,
9
+ className: f,
10
+ ...n
11
+ } = r, [s, o] = e.useState(void 0), u = e.useMemo(() => ({
12
+ setLabelId: o
13
+ }), [o]), l = a("div", r, {
14
+ ref: t,
15
+ props: {
16
+ role: "group",
17
+ "aria-labelledby": s,
18
+ ...n
19
+ }
20
+ });
21
+ return /* @__PURE__ */ p(i.Provider, {
22
+ value: u,
23
+ children: l
24
+ });
25
+ });
26
+ process.env.NODE_ENV !== "production" && (d.displayName = "MenuGroup");
27
+ export {
28
+ d as MenuGroup
29
+ };
@@ -0,0 +1,30 @@
1
+ "use client";
2
+ import * as u from "react";
3
+ import { useIsoLayoutEffect as i } from "./index97.js";
4
+ import { useRenderElement as p } from "./index86.js";
5
+ import { useBaseUiId as a } from "./index115.js";
6
+ import { useMenuGroupRootContext as m } from "./index137.js";
7
+ const d = /* @__PURE__ */ u.forwardRef(function(r, t) {
8
+ const {
9
+ className: c,
10
+ render: l,
11
+ id: n,
12
+ ...s
13
+ } = r, e = a(n), {
14
+ setLabelId: o
15
+ } = m();
16
+ return i(() => (o(e), () => {
17
+ o(void 0);
18
+ }), [o, e]), p("div", r, {
19
+ ref: t,
20
+ props: {
21
+ id: e,
22
+ role: "presentation",
23
+ ...s
24
+ }
25
+ });
26
+ });
27
+ process.env.NODE_ENV !== "production" && (d.displayName = "MenuGroupLabel");
28
+ export {
29
+ d as MenuGroupLabel
30
+ };
@@ -0,0 +1,48 @@
1
+ "use client";
2
+ import * as n from "react";
3
+ import { useMenuItem as P, REGULAR_ITEM as x } from "./index131.js";
4
+ import { useMenuRootContext as C } from "./index133.js";
5
+ import { useRenderElement as E } from "./index86.js";
6
+ import { useBaseUiId as v } from "./index115.js";
7
+ import { useCompositeListItem as N } from "./index132.js";
8
+ import { useMenuPositionerContext as g } from "./index135.js";
9
+ const h = /* @__PURE__ */ n.forwardRef(function(s, r) {
10
+ const {
11
+ render: A,
12
+ className: B,
13
+ id: m,
14
+ label: u,
15
+ nativeButton: a = !1,
16
+ disabled: e = !1,
17
+ closeOnClick: d = !0,
18
+ ...c
19
+ } = s, i = N({
20
+ label: u
21
+ }), p = g(!0), f = v(m), {
22
+ store: t
23
+ } = C(), o = t.useState("isActive", i.index), l = t.useState("itemProps"), {
24
+ getItemProps: I,
25
+ itemRef: M
26
+ } = P({
27
+ closeOnClick: d,
28
+ disabled: e,
29
+ highlighted: o,
30
+ id: f,
31
+ store: t,
32
+ nativeButton: a,
33
+ nodeId: p?.nodeId,
34
+ itemMetadata: x
35
+ }), R = n.useMemo(() => ({
36
+ disabled: e,
37
+ highlighted: o
38
+ }), [e, o]);
39
+ return E("div", s, {
40
+ state: R,
41
+ props: [l, c, I],
42
+ ref: [M, r, i.ref]
43
+ });
44
+ });
45
+ process.env.NODE_ENV !== "production" && (h.displayName = "MenuItem");
46
+ export {
47
+ h as MenuItem
48
+ };
package/dist/index6.js ADDED
@@ -0,0 +1,93 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cn as d } from "./index16.js";
4
+ function n({
5
+ className: a,
6
+ size: t = "default",
7
+ ...e
8
+ }) {
9
+ return /* @__PURE__ */ r(
10
+ "div",
11
+ {
12
+ "data-slot": "card",
13
+ "data-size": t,
14
+ className: d("ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col", a),
15
+ ...e
16
+ }
17
+ );
18
+ }
19
+ function c({ className: a, ...t }) {
20
+ return /* @__PURE__ */ r(
21
+ "div",
22
+ {
23
+ "data-slot": "card-header",
24
+ className: d(
25
+ "gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",
26
+ a
27
+ ),
28
+ ...t
29
+ }
30
+ );
31
+ }
32
+ function l({ className: a, ...t }) {
33
+ return /* @__PURE__ */ r(
34
+ "div",
35
+ {
36
+ "data-slot": "card-title",
37
+ className: d("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", a),
38
+ ...t
39
+ }
40
+ );
41
+ }
42
+ function u({ className: a, ...t }) {
43
+ return /* @__PURE__ */ r(
44
+ "div",
45
+ {
46
+ "data-slot": "card-description",
47
+ className: d("text-muted-foreground text-sm", a),
48
+ ...t
49
+ }
50
+ );
51
+ }
52
+ function m({ className: a, ...t }) {
53
+ return /* @__PURE__ */ r(
54
+ "div",
55
+ {
56
+ "data-slot": "card-action",
57
+ className: d(
58
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
59
+ a
60
+ ),
61
+ ...t
62
+ }
63
+ );
64
+ }
65
+ function p({ className: a, ...t }) {
66
+ return /* @__PURE__ */ r(
67
+ "div",
68
+ {
69
+ "data-slot": "card-content",
70
+ className: d("px-4 group-data-[size=sm]/card:px-3", a),
71
+ ...t
72
+ }
73
+ );
74
+ }
75
+ function f({ className: a, ...t }) {
76
+ return /* @__PURE__ */ r(
77
+ "div",
78
+ {
79
+ "data-slot": "card-footer",
80
+ className: d("bg-muted/50 rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3 flex items-center", a),
81
+ ...t
82
+ }
83
+ );
84
+ }
85
+ export {
86
+ n as Card,
87
+ m as CardAction,
88
+ p as CardContent,
89
+ u as CardDescription,
90
+ f as CardFooter,
91
+ c as CardHeader,
92
+ l as CardTitle
93
+ };
@@ -0,0 +1,79 @@
1
+ "use client";
2
+ import * as c from "react";
3
+ import { useStableCallback as A } from "./index95.js";
4
+ import { useControlled as O } from "./index129.js";
5
+ import { MenuCheckboxItemContext as S } from "./index130.js";
6
+ import { useMenuItem as U, REGULAR_ITEM as B } from "./index131.js";
7
+ import { useCompositeListItem as D } from "./index132.js";
8
+ import { useMenuRootContext as L } from "./index133.js";
9
+ import { useRenderElement as _ } from "./index86.js";
10
+ import { useBaseUiId as j } from "./index115.js";
11
+ import { itemMapping as w } from "./index134.js";
12
+ import { useMenuPositionerContext as y } from "./index135.js";
13
+ import { createChangeEventDetails as G } from "./index113.js";
14
+ import { jsx as T } from "react/jsx-runtime";
15
+ import { itemPress as V } from "./index114.js";
16
+ const q = /* @__PURE__ */ c.forwardRef(function(r, a) {
17
+ const {
18
+ render: F,
19
+ className: H,
20
+ id: d,
21
+ label: l,
22
+ nativeButton: u = !1,
23
+ disabled: t = !1,
24
+ closeOnClick: p = !1,
25
+ checked: f,
26
+ defaultChecked: C,
27
+ onCheckedChange: h,
28
+ ...k
29
+ } = r, s = D({
30
+ label: l
31
+ }), x = y(!0), I = j(d), {
32
+ store: o
33
+ } = L(), n = o.useState("isActive", s.index), M = o.useState("itemProps"), [e, b] = O({
34
+ controlled: f,
35
+ default: C ?? !1,
36
+ name: "MenuCheckboxItem",
37
+ state: "checked"
38
+ }), {
39
+ getItemProps: v,
40
+ itemRef: P
41
+ } = U({
42
+ closeOnClick: p,
43
+ disabled: t,
44
+ highlighted: n,
45
+ id: I,
46
+ store: o,
47
+ nativeButton: u,
48
+ nodeId: x?.nodeId,
49
+ itemMetadata: B
50
+ }), i = c.useMemo(() => ({
51
+ disabled: t,
52
+ highlighted: n,
53
+ checked: e
54
+ }), [t, n, e]), g = A((R) => {
55
+ const m = {
56
+ ...G(V, R.nativeEvent),
57
+ preventUnmountOnClose: () => {
58
+ }
59
+ };
60
+ h?.(!e, m), !m.isCanceled && b((N) => !N);
61
+ }), E = _("div", r, {
62
+ state: i,
63
+ stateAttributesMapping: w,
64
+ props: [M, {
65
+ role: "menuitemcheckbox",
66
+ "aria-checked": e,
67
+ onClick: g
68
+ }, k, v],
69
+ ref: [P, a, s.ref]
70
+ });
71
+ return /* @__PURE__ */ T(S.Provider, {
72
+ value: i,
73
+ children: E
74
+ });
75
+ });
76
+ process.env.NODE_ENV !== "production" && (q.displayName = "MenuCheckboxItem");
77
+ export {
78
+ q as MenuCheckboxItem
79
+ };
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ import * as t from "react";
3
+ import { useMenuCheckboxItemContext as m } from "./index130.js";
4
+ import { useRenderElement as h } from "./index86.js";
5
+ import { itemMapping as p } from "./index134.js";
6
+ import { useTransitionStatus as u } from "./index136.js";
7
+ import { useOpenChangeComplete as l } from "./index119.js";
8
+ const f = /* @__PURE__ */ t.forwardRef(function(n, s) {
9
+ const {
10
+ render: b,
11
+ className: g,
12
+ keepMounted: c = !1,
13
+ ...r
14
+ } = n, e = m(), o = t.useRef(null), {
15
+ transitionStatus: i,
16
+ setMounted: d
17
+ } = u(e.checked);
18
+ l({
19
+ open: e.checked,
20
+ ref: o,
21
+ onComplete() {
22
+ e.checked || d(!1);
23
+ }
24
+ });
25
+ const a = t.useMemo(() => ({
26
+ checked: e.checked,
27
+ disabled: e.disabled,
28
+ highlighted: e.highlighted,
29
+ transitionStatus: i
30
+ }), [e.checked, e.disabled, e.highlighted, i]);
31
+ return h("span", n, {
32
+ state: a,
33
+ ref: [s, o],
34
+ stateAttributesMapping: p,
35
+ props: {
36
+ "aria-hidden": !0,
37
+ ...r
38
+ },
39
+ enabled: c || e.checked
40
+ });
41
+ });
42
+ process.env.NODE_ENV !== "production" && (f.displayName = "MenuCheckboxItemIndicator");
43
+ export {
44
+ f as MenuCheckboxItemIndicator
45
+ };
@@ -0,0 +1,46 @@
1
+ "use client";
2
+ import * as o from "react";
3
+ import { useControlled as v } from "./index129.js";
4
+ import { useStableCallback as l } from "./index95.js";
5
+ import { MenuRadioGroupContext as V } from "./index146.js";
6
+ import { useRenderElement as G } from "./index86.js";
7
+ import { jsx as b } from "react/jsx-runtime";
8
+ const g = /* @__PURE__ */ o.memo(/* @__PURE__ */ o.forwardRef(function(r, s) {
9
+ const {
10
+ render: x,
11
+ className: N,
12
+ value: d,
13
+ defaultValue: i,
14
+ onValueChange: m,
15
+ disabled: e = !1,
16
+ ...p
17
+ } = r, [a, c] = v({
18
+ controlled: d,
19
+ default: i,
20
+ name: "MenuRadioGroup"
21
+ }), f = l(m), n = l((t, u) => {
22
+ f?.(t, u), !u.isCanceled && c(t);
23
+ }), R = o.useMemo(() => ({
24
+ disabled: e
25
+ }), [e]), C = G("div", r, {
26
+ state: R,
27
+ ref: s,
28
+ props: {
29
+ role: "group",
30
+ "aria-disabled": e || void 0,
31
+ ...p
32
+ }
33
+ }), M = o.useMemo(() => ({
34
+ value: a,
35
+ setValue: n,
36
+ disabled: e
37
+ }), [a, n, e]);
38
+ return /* @__PURE__ */ b(V.Provider, {
39
+ value: M,
40
+ children: C
41
+ });
42
+ }));
43
+ process.env.NODE_ENV !== "production" && (g.displayName = "MenuRadioGroup");
44
+ export {
45
+ g as MenuRadioGroup
46
+ };
@@ -0,0 +1,76 @@
1
+ "use client";
2
+ import * as a from "react";
3
+ import { useStableCallback as S } from "./index95.js";
4
+ import { useMenuRootContext as V } from "./index133.js";
5
+ import { useRenderElement as A } from "./index86.js";
6
+ import { useBaseUiId as D } from "./index115.js";
7
+ import { useMenuRadioGroupContext as O } from "./index146.js";
8
+ import { MenuRadioItemContext as U } from "./index147.js";
9
+ import { itemMapping as B } from "./index134.js";
10
+ import { useCompositeListItem as G } from "./index132.js";
11
+ import { useMenuItem as L, REGULAR_ITEM as _ } from "./index131.js";
12
+ import { useMenuPositionerContext as j } from "./index135.js";
13
+ import { createChangeEventDetails as w } from "./index113.js";
14
+ import { jsx as y } from "react/jsx-runtime";
15
+ import { itemPress as T } from "./index114.js";
16
+ const q = /* @__PURE__ */ a.forwardRef(function(s, d) {
17
+ const {
18
+ render: F,
19
+ className: H,
20
+ id: l,
21
+ label: u,
22
+ nativeButton: c = !1,
23
+ disabled: p = !1,
24
+ closeOnClick: f = !1,
25
+ value: r,
26
+ ...M
27
+ } = s, n = G({
28
+ label: u
29
+ }), v = j(!0), C = D(l), {
30
+ store: e
31
+ } = V(), t = e.useState("isActive", n.index), I = e.useState("itemProps"), {
32
+ value: R,
33
+ setValue: b,
34
+ disabled: P
35
+ } = O(), o = P || p, i = R === r, {
36
+ getItemProps: h,
37
+ itemRef: x
38
+ } = L({
39
+ closeOnClick: f,
40
+ disabled: o,
41
+ highlighted: t,
42
+ id: C,
43
+ store: e,
44
+ nativeButton: c,
45
+ nodeId: v?.nodeId,
46
+ itemMetadata: _
47
+ }), m = a.useMemo(() => ({
48
+ disabled: o,
49
+ highlighted: t,
50
+ checked: i
51
+ }), [o, t, i]), g = S((k) => {
52
+ const N = {
53
+ ...w(T, k.nativeEvent),
54
+ preventUnmountOnClose: () => {
55
+ }
56
+ };
57
+ b(r, N);
58
+ }), E = A("div", s, {
59
+ state: m,
60
+ stateAttributesMapping: B,
61
+ props: [I, {
62
+ role: "menuitemradio",
63
+ "aria-checked": i,
64
+ onClick: g
65
+ }, M, h],
66
+ ref: [x, d, n.ref]
67
+ });
68
+ return /* @__PURE__ */ y(U.Provider, {
69
+ value: m,
70
+ children: E
71
+ });
72
+ });
73
+ process.env.NODE_ENV !== "production" && (q.displayName = "MenuRadioItem");
74
+ export {
75
+ q as MenuRadioItem
76
+ };
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ import * as t from "react";
3
+ import { useMenuRadioItemContext as m } from "./index147.js";
4
+ import { useRenderElement as p } from "./index86.js";
5
+ import { itemMapping as u } from "./index134.js";
6
+ import { useTransitionStatus as l } from "./index136.js";
7
+ import { useOpenChangeComplete as h } from "./index119.js";
8
+ const f = /* @__PURE__ */ t.forwardRef(function(n, s) {
9
+ const {
10
+ render: M,
11
+ className: R,
12
+ keepMounted: d = !1,
13
+ ...r
14
+ } = n, e = m(), o = t.useRef(null), {
15
+ transitionStatus: i,
16
+ setMounted: a
17
+ } = l(e.checked);
18
+ h({
19
+ open: e.checked,
20
+ ref: o,
21
+ onComplete() {
22
+ e.checked || a(!1);
23
+ }
24
+ });
25
+ const c = t.useMemo(() => ({
26
+ checked: e.checked,
27
+ disabled: e.disabled,
28
+ highlighted: e.highlighted,
29
+ transitionStatus: i
30
+ }), [e.checked, e.disabled, e.highlighted, i]);
31
+ return p("span", n, {
32
+ state: c,
33
+ stateAttributesMapping: u,
34
+ ref: [s, o],
35
+ props: {
36
+ "aria-hidden": !0,
37
+ ...r
38
+ },
39
+ enabled: d || e.checked
40
+ });
41
+ });
42
+ process.env.NODE_ENV !== "production" && (f.displayName = "MenuRadioItemIndicator");
43
+ export {
44
+ f as MenuRadioItemIndicator
45
+ };
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import * as r from "react";
3
+ import { MenuRoot as u } from "./index52.js";
4
+ import { useMenuRootContext as m } from "./index133.js";
5
+ import { MenuSubmenuRootContext as i } from "./index156.js";
6
+ import { useMenuSubmenuRootContext as a } from "./index156.js";
7
+ import { jsx as e } from "react/jsx-runtime";
8
+ function x(t) {
9
+ const o = m().store, n = r.useMemo(() => ({
10
+ parentMenu: o
11
+ }), [o]);
12
+ return /* @__PURE__ */ e(i.Provider, {
13
+ value: n,
14
+ children: /* @__PURE__ */ e(u, {
15
+ ...t
16
+ })
17
+ });
18
+ }
19
+ export {
20
+ x as MenuSubmenuRoot,
21
+ a as useMenuSubmenuRootContext
22
+ };