@yselimcan/ui 0.0.2 → 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 (265) hide show
  1. package/dist/index.js +100 -15331
  2. package/dist/index10.js +137 -0
  3. package/dist/index100.js +7 -0
  4. package/dist/index101.js +69 -0
  5. package/dist/index102.js +11 -0
  6. package/dist/index103.js +16 -0
  7. package/dist/index104.js +6 -0
  8. package/dist/index105.js +6 -0
  9. package/dist/index106.js +8 -0
  10. package/dist/index107.js +10 -0
  11. package/dist/index108.js +90 -0
  12. package/dist/index109.js +15 -0
  13. package/dist/index11.js +21 -0
  14. package/dist/index110.js +65 -0
  15. package/dist/index111.js +40 -0
  16. package/dist/index112.js +16 -0
  17. package/dist/index113.js +35 -0
  18. package/dist/index114.js +21 -0
  19. package/dist/index115.js +8 -0
  20. package/dist/index116.js +6 -0
  21. package/dist/index117.js +7 -0
  22. package/dist/index118.js +14 -0
  23. package/dist/index119.js +21 -0
  24. package/dist/index12.js +20 -0
  25. package/dist/index120.js +15 -0
  26. package/dist/index121.js +299 -0
  27. package/dist/index122.js +7 -0
  28. package/dist/index123.js +41 -0
  29. package/dist/index124.js +128 -0
  30. package/dist/index125.js +23 -0
  31. package/dist/index126.js +79 -0
  32. package/dist/index127.js +67 -0
  33. package/dist/index128.js +48 -0
  34. package/dist/index129.js +32 -0
  35. package/dist/index13.js +206 -0
  36. package/dist/index130.js +14 -0
  37. package/dist/index131.js +69 -0
  38. package/dist/index132.js +56 -0
  39. package/dist/index133.js +15 -0
  40. package/dist/index134.js +15 -0
  41. package/dist/index135.js +15 -0
  42. package/dist/index136.js +43 -0
  43. package/dist/index137.js +14 -0
  44. package/dist/index138.js +11 -0
  45. package/dist/index139.js +8 -0
  46. package/dist/index14.js +24 -0
  47. package/dist/index140.js +90 -0
  48. package/dist/index141.js +14 -0
  49. package/dist/index142.js +266 -0
  50. package/dist/index143.js +82 -0
  51. package/dist/index144.js +14 -0
  52. package/dist/index145.js +59 -0
  53. package/dist/index146.js +14 -0
  54. package/dist/index147.js +14 -0
  55. package/dist/index148.js +33 -0
  56. package/dist/index149.js +21 -0
  57. package/dist/index15.js +19 -0
  58. package/dist/index150.js +69 -0
  59. package/dist/index151.js +107 -0
  60. package/dist/index152.js +11 -0
  61. package/dist/index153.js +11 -0
  62. package/dist/index154.js +25 -0
  63. package/dist/index155.js +106 -0
  64. package/dist/index156.js +10 -0
  65. package/dist/index157.js +35 -0
  66. package/dist/index158.js +233 -0
  67. package/dist/index159.js +77 -0
  68. package/dist/index16.js +8 -0
  69. package/dist/index160.js +286 -0
  70. package/dist/index161.js +56 -0
  71. package/dist/index162.js +6 -0
  72. package/dist/index163.js +17 -0
  73. package/dist/index164.js +18 -0
  74. package/dist/index165.js +31 -0
  75. package/dist/index166.js +10 -0
  76. package/dist/index167.js +25 -0
  77. package/dist/index168.js +27 -0
  78. package/dist/index169.js +163 -0
  79. package/dist/index17.js +46 -0
  80. package/dist/index170.js +116 -0
  81. package/dist/index171.js +78 -0
  82. package/dist/index172.js +67 -0
  83. package/dist/index173.js +72 -0
  84. package/dist/index174.js +16 -0
  85. package/dist/index175.js +8 -0
  86. package/dist/index176.js +20 -0
  87. package/dist/index177.js +24 -0
  88. package/dist/index178.js +61 -0
  89. package/dist/index179.js +20 -0
  90. package/dist/index18.js +41 -0
  91. package/dist/index180.js +30 -0
  92. package/dist/index181.js +45 -0
  93. package/dist/index182.js +24 -0
  94. package/dist/index183.js +51 -0
  95. package/dist/index184.js +54 -0
  96. package/dist/index185.js +20 -0
  97. package/dist/index186.js +14 -0
  98. package/dist/index187.js +38 -0
  99. package/dist/index188.js +18 -0
  100. package/dist/index189.js +82 -0
  101. package/dist/index19.js +80 -0
  102. package/dist/index190.js +26 -0
  103. package/dist/index191.js +6 -0
  104. package/dist/index192.js +14 -0
  105. package/dist/index193.js +13 -0
  106. package/dist/index194.js +43 -0
  107. package/dist/index195.js +7 -0
  108. package/dist/index196.js +12 -0
  109. package/dist/index197.js +14 -0
  110. package/dist/index198.js +120 -0
  111. package/dist/index199.js +14 -0
  112. package/dist/index20.js +25 -0
  113. package/dist/index200.js +8 -0
  114. package/dist/index201.js +50 -0
  115. package/dist/index202.js +202 -0
  116. package/dist/index203.js +50 -0
  117. package/dist/index204.js +22 -0
  118. package/dist/index205.js +29 -0
  119. package/dist/index206.js +6 -0
  120. package/dist/index207.js +24 -0
  121. package/dist/index208.js +130 -0
  122. package/dist/index209.js +47 -0
  123. package/dist/index21.js +40 -0
  124. package/dist/index210.js +20 -0
  125. package/dist/index211.js +7 -0
  126. package/dist/index212.js +183 -0
  127. package/dist/index213.js +78 -0
  128. package/dist/index214.js +401 -0
  129. package/dist/index215.js +9 -0
  130. package/dist/index216.js +7 -0
  131. package/dist/index217.js +19 -0
  132. package/dist/index218.js +17 -0
  133. package/dist/index219.js +35 -0
  134. package/dist/index22.js +31 -0
  135. package/dist/index220.js +41 -0
  136. package/dist/index221.js +59 -0
  137. package/dist/index222.js +30 -0
  138. package/dist/index223.js +10 -0
  139. package/dist/index224.js +15 -0
  140. package/dist/index225.js +14 -0
  141. package/dist/index226.js +14 -0
  142. package/dist/index227.js +24 -0
  143. package/dist/index228.js +14 -0
  144. package/dist/index229.js +10 -0
  145. package/dist/index23.js +25 -0
  146. package/dist/index230.js +45 -0
  147. package/dist/index231.js +599 -0
  148. package/dist/index232.js +14 -0
  149. package/dist/index233.js +6 -0
  150. package/dist/index234.js +12 -0
  151. package/dist/index235.js +14 -0
  152. package/dist/index236.js +17 -0
  153. package/dist/index237.js +211 -0
  154. package/dist/index238.js +6 -0
  155. package/dist/index239.js +16 -0
  156. package/dist/index24.js +56 -0
  157. package/dist/index240.js +50 -0
  158. package/dist/index241.js +6 -0
  159. package/dist/index242.js +15 -0
  160. package/dist/index243.js +60 -0
  161. package/dist/index244.js +32 -0
  162. package/dist/index245.js +16 -0
  163. package/dist/index246.js +11 -0
  164. package/dist/index247.js +209 -0
  165. package/dist/index248.js +23 -0
  166. package/dist/index249.js +8 -0
  167. package/dist/index25.js +35 -0
  168. package/dist/index250.js +324 -0
  169. package/dist/index251.js +5 -0
  170. package/dist/index252.js +5 -0
  171. package/dist/index253.js +489 -0
  172. package/dist/index254.js +10 -0
  173. package/dist/index255.js +4 -0
  174. package/dist/index256.js +46 -0
  175. package/dist/index257.js +58 -0
  176. package/dist/index258.js +10 -0
  177. package/dist/index259.js +4 -0
  178. package/dist/index26.js +7 -0
  179. package/dist/index260.js +57 -0
  180. package/dist/index261.js +58 -0
  181. package/dist/index262.js +4 -0
  182. package/dist/index263.js +4 -0
  183. package/dist/index264.js +4 -0
  184. package/dist/index265.js +4 -0
  185. package/dist/index27.js +82 -0
  186. package/dist/index28.js +32 -0
  187. package/dist/index29.js +6 -0
  188. package/dist/index3.js +181 -0
  189. package/dist/index30.js +9 -0
  190. package/dist/index31.js +6 -0
  191. package/dist/index32.js +23 -0
  192. package/dist/index33.js +207 -0
  193. package/dist/index34.js +25 -0
  194. package/dist/index35.js +102 -0
  195. package/dist/index36.js +69 -0
  196. package/dist/index37.js +66 -0
  197. package/dist/index38.js +113 -0
  198. package/dist/index39.js +53 -0
  199. package/dist/index4.js +47 -0
  200. package/dist/index40.js +35 -0
  201. package/dist/index41.js +28 -0
  202. package/dist/index42.js +18 -0
  203. package/dist/index43.js +27 -0
  204. package/dist/index44.js +25 -0
  205. package/dist/index45.js +36 -0
  206. package/dist/index46.js +78 -0
  207. package/dist/index47.js +65 -0
  208. package/dist/index48.js +128 -0
  209. package/dist/index49.js +19 -0
  210. package/dist/index5.js +52 -0
  211. package/dist/index50.js +86 -0
  212. package/dist/index51.js +6 -0
  213. package/dist/index52.js +268 -0
  214. package/dist/index53.js +25 -0
  215. package/dist/index54.js +207 -0
  216. package/dist/index55.js +146 -0
  217. package/dist/index56.js +88 -0
  218. package/dist/index57.js +29 -0
  219. package/dist/index58.js +30 -0
  220. package/dist/index59.js +48 -0
  221. package/dist/index6.js +93 -0
  222. package/dist/index60.js +79 -0
  223. package/dist/index61.js +45 -0
  224. package/dist/index62.js +46 -0
  225. package/dist/index63.js +76 -0
  226. package/dist/index64.js +45 -0
  227. package/dist/index65.js +22 -0
  228. package/dist/index66.js +101 -0
  229. package/dist/index67.js +14 -0
  230. package/dist/index68.js +6 -0
  231. package/dist/index69.js +321 -0
  232. package/dist/index7.js +294 -0
  233. package/dist/index70.js +24 -0
  234. package/dist/index71.js +143 -0
  235. package/dist/index72.js +200 -0
  236. package/dist/index73.js +43 -0
  237. package/dist/index74.js +29 -0
  238. package/dist/index75.js +148 -0
  239. package/dist/index76.js +32 -0
  240. package/dist/index77.js +53 -0
  241. package/dist/index78.js +28 -0
  242. package/dist/index79.js +15 -0
  243. package/dist/index8.js +264 -0
  244. package/dist/index80.js +15 -0
  245. package/dist/index81.js +135 -0
  246. package/dist/index82.js +31 -0
  247. package/dist/index83.js +35 -0
  248. package/dist/index84.js +17 -0
  249. package/dist/index85.js +2765 -0
  250. package/dist/index86.js +57 -0
  251. package/dist/index87.js +14 -0
  252. package/dist/index88.js +98 -0
  253. package/dist/index89.js +92 -0
  254. package/dist/index9.js +197 -0
  255. package/dist/index90.js +21 -0
  256. package/dist/index91.js +18 -0
  257. package/dist/index92.js +35 -0
  258. package/dist/index93.js +14 -0
  259. package/dist/index94.js +136 -0
  260. package/dist/index95.js +30 -0
  261. package/dist/index96.js +11 -0
  262. package/dist/index97.js +7 -0
  263. package/dist/index98.js +15 -0
  264. package/dist/index99.js +25 -0
  265. package/package.json +3 -2
package/dist/index7.js ADDED
@@ -0,0 +1,294 @@
1
+ "use client";
2
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
3
+ import * as d from "react";
4
+ import { cn as a } from "./index16.js";
5
+ import { Button as u } from "./index5.js";
6
+ import { InputGroup as x, InputGroupInput as f, InputGroupAddon as h, InputGroupButton as b } from "./index10.js";
7
+ import g from "./index29.js";
8
+ import l from "./index30.js";
9
+ import C from "./index31.js";
10
+ import { ComboboxRoot as v } from "./index32.js";
11
+ import { ComboboxInput as p } from "./index33.js";
12
+ import { ComboboxPortal as w } from "./index34.js";
13
+ import { ComboboxPositioner as y } from "./index35.js";
14
+ import { ComboboxPopup as N } from "./index36.js";
15
+ import { ComboboxList as I } from "./index37.js";
16
+ import { ComboboxItem as z } from "./index38.js";
17
+ import { ComboboxItemIndicator as $ } from "./index39.js";
18
+ import { ComboboxGroup as G } from "./index40.js";
19
+ import { ComboboxGroupLabel as j } from "./index41.js";
20
+ import { ComboboxCollection as k } from "./index42.js";
21
+ import { ComboboxEmpty as L } from "./index43.js";
22
+ import { Separator as R } from "./index44.js";
23
+ import { ComboboxChips as _ } from "./index45.js";
24
+ import { ComboboxChip as E } from "./index46.js";
25
+ import { ComboboxChipRemove as P } from "./index47.js";
26
+ import { ComboboxTrigger as T } from "./index48.js";
27
+ import { ComboboxValue as V } from "./index49.js";
28
+ import { ComboboxClear as A } from "./index50.js";
29
+ const co = v;
30
+ function uo({ ...o }) {
31
+ return /* @__PURE__ */ t(V, { "data-slot": "combobox-value", ...o });
32
+ }
33
+ function B({
34
+ className: o,
35
+ children: e,
36
+ ...r
37
+ }) {
38
+ return /* @__PURE__ */ i(
39
+ T,
40
+ {
41
+ "data-slot": "combobox-trigger",
42
+ className: a("[&_svg:not([class*='size-'])]:size-4", o),
43
+ ...r,
44
+ children: [
45
+ e,
46
+ /* @__PURE__ */ t(C, { className: "text-muted-foreground size-4 pointer-events-none" })
47
+ ]
48
+ }
49
+ );
50
+ }
51
+ function S({ className: o, ...e }) {
52
+ return /* @__PURE__ */ t(
53
+ A,
54
+ {
55
+ "data-slot": "combobox-clear",
56
+ render: /* @__PURE__ */ t(b, { variant: "ghost", size: "icon-xs" }),
57
+ className: a(o),
58
+ ...e,
59
+ children: /* @__PURE__ */ t(l, { className: "pointer-events-none" })
60
+ }
61
+ );
62
+ }
63
+ function xo({
64
+ className: o,
65
+ children: e,
66
+ disabled: r = !1,
67
+ showTrigger: n = !0,
68
+ showClear: m = !1,
69
+ ...s
70
+ }) {
71
+ return /* @__PURE__ */ i(x, { className: a("w-auto", o), children: [
72
+ /* @__PURE__ */ t(
73
+ p,
74
+ {
75
+ render: /* @__PURE__ */ t(f, { disabled: r }),
76
+ ...s
77
+ }
78
+ ),
79
+ /* @__PURE__ */ i(h, { align: "inline-end", children: [
80
+ n && /* @__PURE__ */ t(
81
+ b,
82
+ {
83
+ size: "icon-xs",
84
+ variant: "ghost",
85
+ render: /* @__PURE__ */ t(B, {}),
86
+ "data-slot": "input-group-button",
87
+ className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
88
+ disabled: r
89
+ }
90
+ ),
91
+ m && /* @__PURE__ */ t(S, { disabled: r })
92
+ ] }),
93
+ e
94
+ ] });
95
+ }
96
+ function fo({
97
+ className: o,
98
+ side: e = "bottom",
99
+ sideOffset: r = 6,
100
+ align: n = "start",
101
+ alignOffset: m = 0,
102
+ anchor: s,
103
+ ...c
104
+ }) {
105
+ return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ t(
106
+ y,
107
+ {
108
+ side: e,
109
+ sideOffset: r,
110
+ align: n,
111
+ alignOffset: m,
112
+ anchor: s,
113
+ className: "isolate z-50",
114
+ children: /* @__PURE__ */ t(
115
+ N,
116
+ {
117
+ "data-slot": "combobox-content",
118
+ "data-chips": !!s,
119
+ className: a("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:border-input/30 max-h-72 min-w-36 overflow-hidden rounded-lg shadow-md ring-1 duration-100 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) data-[chips=true]:min-w-(--anchor-width)", o),
120
+ ...c
121
+ }
122
+ )
123
+ }
124
+ ) });
125
+ }
126
+ function ho({ className: o, ...e }) {
127
+ return /* @__PURE__ */ t(
128
+ I,
129
+ {
130
+ "data-slot": "combobox-list",
131
+ className: a(
132
+ "no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0 overflow-y-auto overscroll-contain",
133
+ o
134
+ ),
135
+ ...e
136
+ }
137
+ );
138
+ }
139
+ function go({
140
+ className: o,
141
+ children: e,
142
+ ...r
143
+ }) {
144
+ return /* @__PURE__ */ i(
145
+ z,
146
+ {
147
+ "data-slot": "combobox-item",
148
+ className: a(
149
+ "data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
150
+ o
151
+ ),
152
+ ...r,
153
+ children: [
154
+ e,
155
+ /* @__PURE__ */ t(
156
+ $,
157
+ {
158
+ render: /* @__PURE__ */ t("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
159
+ children: /* @__PURE__ */ t(g, { className: "pointer-events-none" })
160
+ }
161
+ )
162
+ ]
163
+ }
164
+ );
165
+ }
166
+ function Co({ className: o, ...e }) {
167
+ return /* @__PURE__ */ t(
168
+ G,
169
+ {
170
+ "data-slot": "combobox-group",
171
+ className: a(o),
172
+ ...e
173
+ }
174
+ );
175
+ }
176
+ function vo({
177
+ className: o,
178
+ ...e
179
+ }) {
180
+ return /* @__PURE__ */ t(
181
+ j,
182
+ {
183
+ "data-slot": "combobox-label",
184
+ className: a("text-muted-foreground px-2 py-1.5 text-xs", o),
185
+ ...e
186
+ }
187
+ );
188
+ }
189
+ function wo({ ...o }) {
190
+ return /* @__PURE__ */ t(k, { "data-slot": "combobox-collection", ...o });
191
+ }
192
+ function yo({ className: o, ...e }) {
193
+ return /* @__PURE__ */ t(
194
+ L,
195
+ {
196
+ "data-slot": "combobox-empty",
197
+ className: a("text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex", o),
198
+ ...e
199
+ }
200
+ );
201
+ }
202
+ function No({
203
+ className: o,
204
+ ...e
205
+ }) {
206
+ return /* @__PURE__ */ t(
207
+ R,
208
+ {
209
+ "data-slot": "combobox-separator",
210
+ className: a("bg-border -mx-1 my-1 h-px", o),
211
+ ...e
212
+ }
213
+ );
214
+ }
215
+ function Io({
216
+ className: o,
217
+ ...e
218
+ }) {
219
+ return /* @__PURE__ */ t(
220
+ _,
221
+ {
222
+ "data-slot": "combobox-chips",
223
+ className: a("dark:bg-input/30 border-input focus-within:border-ring focus-within:ring-ring/50 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive dark:has-aria-invalid:border-destructive/50 flex min-h-8 flex-wrap items-center gap-1 rounded-lg border bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:ring-[3px] has-aria-invalid:ring-[3px] has-data-[slot=combobox-chip]:px-1", o),
224
+ ...e
225
+ }
226
+ );
227
+ }
228
+ function zo({
229
+ className: o,
230
+ children: e,
231
+ showRemove: r = !0,
232
+ ...n
233
+ }) {
234
+ return /* @__PURE__ */ i(
235
+ E,
236
+ {
237
+ "data-slot": "combobox-chip",
238
+ className: a(
239
+ "bg-muted text-foreground flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm px-1.5 text-xs font-medium whitespace-nowrap has-data-[slot=combobox-chip-remove]:pr-0 has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50",
240
+ o
241
+ ),
242
+ ...n,
243
+ children: [
244
+ e,
245
+ r && /* @__PURE__ */ t(
246
+ P,
247
+ {
248
+ render: /* @__PURE__ */ t(u, { variant: "ghost", size: "icon-xs" }),
249
+ className: "-ml-1 opacity-50 hover:opacity-100",
250
+ "data-slot": "combobox-chip-remove",
251
+ children: /* @__PURE__ */ t(l, { className: "pointer-events-none" })
252
+ }
253
+ )
254
+ ]
255
+ }
256
+ );
257
+ }
258
+ function $o({
259
+ className: o,
260
+ ...e
261
+ }) {
262
+ return /* @__PURE__ */ t(
263
+ p,
264
+ {
265
+ "data-slot": "combobox-chip-input",
266
+ className: a(
267
+ "min-w-16 flex-1 outline-none",
268
+ o
269
+ ),
270
+ ...e
271
+ }
272
+ );
273
+ }
274
+ function Go() {
275
+ return d.useRef(null);
276
+ }
277
+ export {
278
+ co as Combobox,
279
+ zo as ComboboxChip,
280
+ Io as ComboboxChips,
281
+ $o as ComboboxChipsInput,
282
+ wo as ComboboxCollection,
283
+ fo as ComboboxContent,
284
+ yo as ComboboxEmpty,
285
+ Co as ComboboxGroup,
286
+ xo as ComboboxInput,
287
+ go as ComboboxItem,
288
+ vo as ComboboxLabel,
289
+ ho as ComboboxList,
290
+ No as ComboboxSeparator,
291
+ B as ComboboxTrigger,
292
+ uo as ComboboxValue,
293
+ Go as useComboboxAnchor
294
+ };
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import * as m from "react";
3
+ import { SelectPortalContext as i } from "./index191.js";
4
+ import { useSelectRootContext as u } from "./index177.js";
5
+ import { selectors as t } from "./index181.js";
6
+ import { jsx as e } from "react/jsx-runtime";
7
+ import { FloatingPortal as f } from "./index124.js";
8
+ import { useStore as r } from "./index188.js";
9
+ const a = /* @__PURE__ */ m.forwardRef(function(n, l) {
10
+ const {
11
+ store: o
12
+ } = u(), c = r(o, t.mounted), s = r(o, t.forceMount);
13
+ return c || s ? /* @__PURE__ */ e(i.Provider, {
14
+ value: !0,
15
+ children: /* @__PURE__ */ e(f, {
16
+ ref: l,
17
+ ...n
18
+ })
19
+ }) : null;
20
+ });
21
+ process.env.NODE_ENV !== "production" && (a.displayName = "SelectPortal");
22
+ export {
23
+ a as SelectPortal
24
+ };
@@ -0,0 +1,143 @@
1
+ "use client";
2
+ import * as o from "react";
3
+ import { inertValue as ce } from "./index122.js";
4
+ import { useIsoLayoutEffect as ae } from "./index97.js";
5
+ import { useScrollLock as ue } from "./index151.js";
6
+ import { useStableCallback as D } from "./index95.js";
7
+ import { useSelectRootContext as me, useSelectFloatingContext as fe } from "./index177.js";
8
+ import { CompositeList as pe } from "./index143.js";
9
+ import { popupStateMapping as de } from "./index111.js";
10
+ import { useAnchorPositioning as ge } from "./index142.js";
11
+ import { SelectPositionerContext as he } from "./index192.js";
12
+ import { InternalBackdrop as Ie } from "./index123.js";
13
+ import { useRenderElement as Ae } from "./index86.js";
14
+ import { DROPDOWN_COLLISION_AVOIDANCE as Re } from "./index125.js";
15
+ import { clearStyles as P } from "./index193.js";
16
+ import { selectors as t } from "./index181.js";
17
+ import { createChangeEventDetails as Se } from "./index113.js";
18
+ import { findItemIndex as ve, itemIncludes as R } from "./index185.js";
19
+ import { jsx as T, jsxs as xe } from "react/jsx-runtime";
20
+ import { useStore as c } from "./index188.js";
21
+ import { none as Ee } from "./index114.js";
22
+ const Ve = {
23
+ position: "fixed"
24
+ }, be = /* @__PURE__ */ o.forwardRef(function(S, O) {
25
+ const {
26
+ anchor: k,
27
+ positionMethod: N = "absolute",
28
+ className: Ce,
29
+ render: ye,
30
+ side: W = "bottom",
31
+ align: z = "center",
32
+ sideOffset: L = 0,
33
+ alignOffset: H = 0,
34
+ collisionBoundary: U = "clipping-ancestors",
35
+ collisionPadding: _,
36
+ arrowPadding: j = 5,
37
+ sticky: q = !1,
38
+ disableAnchorTracking: B,
39
+ alignItemWithTrigger: g = !0,
40
+ collisionAvoidance: F = Re,
41
+ ...X
42
+ } = S, {
43
+ store: e,
44
+ listRef: G,
45
+ labelsRef: J,
46
+ alignItemWithTriggerActiveRef: K,
47
+ selectedItemTextRef: v,
48
+ valuesRef: f,
49
+ initialValueRef: Q,
50
+ popupRef: Y,
51
+ setValue: x
52
+ } = me(), Z = fe(), a = c(e, t.open), n = c(e, t.mounted), E = c(e, t.modal), m = c(e, t.value), V = c(e, t.openMethod), $ = c(e, t.positionerElement), b = c(e, t.triggerElement), p = c(e, t.isItemEqualToValue), ee = o.useRef(null), te = o.useRef(null), [w, h] = o.useState(g), r = n && w && V !== "touch";
53
+ !n && w !== g && h(g), ae(() => {
54
+ n || (t.scrollUpArrowVisible(e.state) && e.set("scrollUpArrowVisible", !1), t.scrollDownArrowVisible(e.state) && e.set("scrollDownArrowVisible", !1));
55
+ }, [e, n]), o.useImperativeHandle(K, () => r), ue((r || E) && a && V !== "touch", b);
56
+ const i = ge({
57
+ anchor: k,
58
+ floatingRootContext: Z,
59
+ positionMethod: N,
60
+ mounted: n,
61
+ side: W,
62
+ sideOffset: L,
63
+ align: z,
64
+ alignOffset: H,
65
+ arrowPadding: j,
66
+ collisionBoundary: U,
67
+ collisionPadding: _,
68
+ sticky: q,
69
+ disableAnchorTracking: B ?? r,
70
+ collisionAvoidance: F,
71
+ keepMounted: !0
72
+ }), d = r ? "none" : i.side, C = r ? Ve : i.positionerStyles, oe = o.useMemo(() => {
73
+ const s = {};
74
+ return a || (s.pointerEvents = "none"), {
75
+ role: "presentation",
76
+ hidden: !n,
77
+ style: {
78
+ ...C,
79
+ ...s
80
+ }
81
+ };
82
+ }, [a, n, C]), ne = o.useMemo(() => ({
83
+ open: a,
84
+ side: d,
85
+ align: i.align,
86
+ anchorHidden: i.anchorHidden
87
+ }), [a, d, i.align, i.anchorHidden]), re = D((s) => {
88
+ e.set("positionerElement", s);
89
+ }), ie = Ae("div", S, {
90
+ ref: [O, re],
91
+ state: ne,
92
+ stateAttributesMapping: de,
93
+ props: [oe, X]
94
+ }), I = o.useRef(0), se = D((s) => {
95
+ if (s.size === 0 && I.current === 0 || f.current.length === 0)
96
+ return;
97
+ const A = I.current;
98
+ if (I.current = s.size, s.size === A)
99
+ return;
100
+ const y = Se(Ee);
101
+ if (A !== 0 && !e.state.multiple && m !== null && ve(f.current, m, p) === -1) {
102
+ const u = Q.current, M = u != null && R(f.current, u, p) ? u : null;
103
+ x(M, y), M === null && (e.set("selectedIndex", null), v.current = null);
104
+ }
105
+ if (A !== 0 && e.state.multiple && Array.isArray(m)) {
106
+ const l = m.filter((u) => R(f.current, u, p));
107
+ (l.length !== m.length || l.some((u) => !R(m, u, p))) && (x(l, y), l.length === 0 && (e.set("selectedIndex", null), v.current = null));
108
+ }
109
+ if (a && r) {
110
+ e.update({
111
+ scrollUpArrowVisible: !1,
112
+ scrollDownArrowVisible: !1
113
+ });
114
+ const l = {
115
+ height: ""
116
+ };
117
+ P($, l), P(Y.current, l);
118
+ }
119
+ }), le = o.useMemo(() => ({
120
+ ...i,
121
+ side: d,
122
+ alignItemWithTriggerActive: r,
123
+ setControlledAlignItemWithTrigger: h,
124
+ scrollUpArrowRef: ee,
125
+ scrollDownArrowRef: te
126
+ }), [i, d, r, h]);
127
+ return /* @__PURE__ */ T(pe, {
128
+ elementsRef: G,
129
+ labelsRef: J,
130
+ onMapChange: se,
131
+ children: /* @__PURE__ */ xe(he.Provider, {
132
+ value: le,
133
+ children: [n && E && /* @__PURE__ */ T(Ie, {
134
+ inert: ce(!a),
135
+ cutout: b
136
+ }), ie]
137
+ })
138
+ });
139
+ });
140
+ process.env.NODE_ENV !== "production" && (be.displayName = "SelectPositioner");
141
+ export {
142
+ be as SelectPositioner
143
+ };
@@ -0,0 +1,200 @@
1
+ "use client";
2
+ import * as s from "react";
3
+ import * as Dt from "react-dom";
4
+ import { useTimeout as Nt } from "./index148.js";
5
+ import { isWebKit as Wt } from "./index194.js";
6
+ import { useStableCallback as $t } from "./index95.js";
7
+ import { ownerDocument as lt } from "./index162.js";
8
+ import { isMouseWithinBounds as kt } from "./index195.js";
9
+ import { useIsoLayoutEffect as _ } from "./index97.js";
10
+ import { useAnimationFrame as zt } from "./index150.js";
11
+ import { useSelectRootContext as _t, useSelectFloatingContext as jt } from "./index177.js";
12
+ import { popupStateMapping as Kt } from "./index111.js";
13
+ import { useSelectPositionerContext as Vt } from "./index192.js";
14
+ import { styleDisableScrollbar as ct } from "./index196.js";
15
+ import { transitionStatusMapping as Yt } from "./index112.js";
16
+ import { useOpenChangeComplete as qt } from "./index119.js";
17
+ import { useRenderElement as Ut } from "./index86.js";
18
+ import { selectors as u } from "./index181.js";
19
+ import { clearStyles as at, LIST_FUNCTIONAL_STYLES as Xt } from "./index193.js";
20
+ import { createChangeEventDetails as Zt } from "./index113.js";
21
+ import { useToolbarRootContext as Gt } from "./index138.js";
22
+ import { COMPOSITE_KEYS as Jt } from "./index120.js";
23
+ import { getDisabledMountTransitionStyles as Qt } from "./index139.js";
24
+ import { jsxs as te, jsx as ee } from "react/jsx-runtime";
25
+ import { getWindow as mt } from "./index94.js";
26
+ import { FloatingFocusManager as oe } from "./index121.js";
27
+ import { useStore as g } from "./index188.js";
28
+ import { windowResize as ne } from "./index114.js";
29
+ const re = {
30
+ ...Kt,
31
+ ...Yt
32
+ }, ie = /* @__PURE__ */ s.forwardRef(function(j, pt) {
33
+ const {
34
+ render: le,
35
+ className: ce,
36
+ ...ut
37
+ } = j, {
38
+ store: r,
39
+ popupRef: p,
40
+ onOpenChangeComplete: gt,
41
+ setOpen: K,
42
+ valueRef: V,
43
+ selectedItemTextRef: Y,
44
+ keyboardActiveRef: q,
45
+ multiple: ft,
46
+ handleScrollArrowVisibility: H,
47
+ scrollHandlerRef: U
48
+ } = _t(), {
49
+ side: X,
50
+ align: Z,
51
+ alignItemWithTriggerActive: l,
52
+ setControlledAlignItemWithTrigger: G,
53
+ scrollDownArrowRef: ht,
54
+ scrollUpArrowRef: dt
55
+ } = Vt(), xt = Gt() != null, Tt = jt(), yt = Nt(), Rt = g(r, u.id), P = g(r, u.open), f = g(r, u.mounted), St = g(r, u.popupProps), O = g(r, u.transitionStatus), w = g(r, u.triggerElement), t = g(r, u.positionerElement), R = g(r, u.listElement), F = s.useRef(0), B = s.useRef(!1), Ht = s.useRef(0), C = s.useRef(!1), L = s.useRef({}), J = zt(), Q = $t((e) => {
56
+ if (!t || !p.current || !C.current)
57
+ return;
58
+ if (B.current || !l) {
59
+ H();
60
+ return;
61
+ }
62
+ const i = t.style.top === "0px", b = t.style.bottom === "0px", M = t.getBoundingClientRect().height, I = lt(t), c = getComputedStyle(t), h = parseFloat(c.marginTop), A = parseFloat(c.marginBottom), d = I.documentElement.clientHeight - h - A, n = e.scrollTop, D = e.scrollHeight, N = e.clientHeight, x = D - N;
63
+ let a = null, m = null, E = !1;
64
+ if (i) {
65
+ const S = x - n, T = M + S, o = Math.min(T, d);
66
+ a = o, o !== d ? m = x : E = !0;
67
+ } else if (b) {
68
+ const S = n - 0, T = M + S, o = Math.min(T, d), W = T - d;
69
+ a = o, o !== d ? m = 0 : (E = !0, n < x && (m = n - (S - W)));
70
+ }
71
+ a != null && (t.style.height = `${a}px`), m != null && (e.scrollTop = m), E && (B.current = !0), H();
72
+ });
73
+ s.useImperativeHandle(U, () => Q, [Q]), qt({
74
+ open: P,
75
+ ref: p,
76
+ onComplete() {
77
+ P && gt?.(!0);
78
+ }
79
+ });
80
+ const Ct = s.useMemo(() => ({
81
+ open: P,
82
+ transitionStatus: O,
83
+ side: X,
84
+ align: Z
85
+ }), [P, O, X, Z]);
86
+ _(() => {
87
+ !t || !p.current || Object.keys(L.current).length || (L.current = {
88
+ top: t.style.top || "0",
89
+ left: t.style.left || "0",
90
+ right: t.style.right,
91
+ height: t.style.height,
92
+ bottom: t.style.bottom,
93
+ minHeight: t.style.minHeight,
94
+ maxHeight: t.style.maxHeight,
95
+ marginTop: t.style.marginTop,
96
+ marginBottom: t.style.marginBottom
97
+ });
98
+ }, [p, t]), _(() => {
99
+ f || l || (C.current = !1, B.current = !1, F.current = 0, Ht.current = 0, at(t, L.current));
100
+ }, [f, l, t, p]), _(() => {
101
+ const e = p.current;
102
+ if (!(!f || !w || !t || !e)) {
103
+ if (!l) {
104
+ C.current = !0, J.request(H);
105
+ return;
106
+ }
107
+ queueMicrotask(() => {
108
+ const i = getComputedStyle(t), b = getComputedStyle(e), M = lt(w), I = mt(t), c = w.getBoundingClientRect(), h = t.getBoundingClientRect(), A = c.left, d = c.height, n = R || e, D = n.scrollHeight, N = parseFloat(b.borderBottomWidth), x = parseFloat(i.marginTop) || 10, a = parseFloat(i.marginBottom) || 10, m = parseFloat(i.minHeight) || 100, E = 5, S = 5, T = 20, o = M.documentElement.clientHeight - x - a, W = M.documentElement.clientWidth, Et = o - c.bottom + d, tt = Y.current, et = V.current;
109
+ let ot = 0, nt = 0;
110
+ if (tt && et) {
111
+ const v = et.getBoundingClientRect(), z = tt.getBoundingClientRect(), Lt = v.left - A, At = z.left - h.left, Ot = v.top - c.top + v.height / 2, It = z.top - h.top + z.height / 2;
112
+ ot = Lt - At, nt = It - Ot;
113
+ }
114
+ const $ = Et + nt + a + N;
115
+ let y = Math.min(o, $);
116
+ const vt = o - x - a, k = $ - y, rt = Math.max(E, A + ot), Pt = W - S, wt = Math.max(0, rt + h.width - Pt);
117
+ t.style.left = `${rt - wt}px`, t.style.height = `${y}px`, t.style.maxHeight = "auto", t.style.marginTop = `${x}px`, t.style.marginBottom = `${a}px`, e.style.height = "100%";
118
+ const it = n.scrollHeight - n.clientHeight, st = k >= it;
119
+ st && (y = Math.min(o, h.height) - (k - it));
120
+ const Ft = c.top < T || c.bottom > o - T || y < Math.min(D, m), Bt = (I.visualViewport?.scale ?? 1) !== 1 && Wt;
121
+ if (Ft || Bt) {
122
+ C.current = !0, at(t, L.current), Dt.flushSync(() => G(!1));
123
+ return;
124
+ }
125
+ if (st) {
126
+ const v = Math.max(0, o - $);
127
+ t.style.top = h.height >= vt ? "0" : `${v}px`, t.style.height = `${y}px`, n.scrollTop = n.scrollHeight - n.clientHeight, F.current = Math.max(m, y);
128
+ } else
129
+ t.style.bottom = "0", F.current = Math.max(m, y), n.scrollTop = k;
130
+ F.current === o && (B.current = !0), H(), setTimeout(() => {
131
+ C.current = !0;
132
+ });
133
+ });
134
+ }
135
+ }, [r, f, t, w, V, Y, p, H, l, G, J, ht, dt, R]), s.useEffect(() => {
136
+ if (!l || !t || !f)
137
+ return;
138
+ const e = mt(t);
139
+ function i(b) {
140
+ K(!1, Zt(ne, b));
141
+ }
142
+ return e.addEventListener("resize", i), () => {
143
+ e.removeEventListener("resize", i);
144
+ };
145
+ }, [K, l, t, f]);
146
+ const bt = {
147
+ ...R ? {
148
+ role: "presentation",
149
+ "aria-orientation": void 0
150
+ } : {
151
+ role: "listbox",
152
+ "aria-multiselectable": ft || void 0,
153
+ id: `${Rt}-list`
154
+ },
155
+ onKeyDown(e) {
156
+ q.current = !0, xt && Jt.has(e.key) && e.stopPropagation();
157
+ },
158
+ onMouseMove() {
159
+ q.current = !1;
160
+ },
161
+ onPointerLeave(e) {
162
+ if (kt(e) || e.pointerType === "touch")
163
+ return;
164
+ const i = e.currentTarget;
165
+ yt.start(0, () => {
166
+ r.set("activeIndex", null), i.focus({
167
+ preventScroll: !0
168
+ });
169
+ });
170
+ },
171
+ onScroll(e) {
172
+ R || U.current?.(e.currentTarget);
173
+ },
174
+ ...l && {
175
+ style: R ? {
176
+ height: "100%"
177
+ } : Xt
178
+ }
179
+ }, Mt = Ut("div", j, {
180
+ ref: [pt, p],
181
+ state: Ct,
182
+ stateAttributesMapping: re,
183
+ props: [St, bt, Qt(O), {
184
+ className: !R && l ? ct.className : void 0
185
+ }, ut]
186
+ });
187
+ return /* @__PURE__ */ te(s.Fragment, {
188
+ children: [ct.element, /* @__PURE__ */ ee(oe, {
189
+ context: Tt,
190
+ modal: !1,
191
+ disabled: !f,
192
+ restoreFocus: !0,
193
+ children: Mt
194
+ })]
195
+ });
196
+ });
197
+ process.env.NODE_ENV !== "production" && (ie.displayName = "SelectPopup");
198
+ export {
199
+ ie as SelectPopup
200
+ };