@simpli-route/apollo-ds 0.1.42 → 0.1.43

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 (329) hide show
  1. package/dist/components/FilterButton/FilterButton.d.ts +3 -0
  2. package/dist/components/FilterButton/index.d.ts +1 -0
  3. package/dist/components/FilterButton/types.d.ts +60 -0
  4. package/dist/components/FilterButton/variants.d.ts +12 -0
  5. package/dist/components/SelectInput/PopoverContent.d.ts +12 -0
  6. package/dist/components/SelectInput/SelectContent.d.ts +16 -0
  7. package/dist/components/SelectInput/SelectInput.d.ts +6 -0
  8. package/dist/components/SelectInput/index.d.ts +2 -0
  9. package/dist/components/SelectInput/types.d.ts +112 -0
  10. package/dist/components/{Select → SelectInput}/variants.d.ts +6 -7
  11. package/dist/components/index.d.ts +2 -1
  12. package/dist/index.cjs.js +1 -1
  13. package/dist/index.cjs10.js +1 -1
  14. package/dist/index.cjs100.js +1 -1
  15. package/dist/index.cjs101.js +1 -1
  16. package/dist/index.cjs102.js +1 -1
  17. package/dist/index.cjs103.js +1 -1
  18. package/dist/index.cjs104.js +1 -1
  19. package/dist/index.cjs105.js +1 -1
  20. package/dist/index.cjs106.js +1 -1
  21. package/dist/index.cjs107.js +1 -1
  22. package/dist/index.cjs108.js +1 -1
  23. package/dist/index.cjs109.js +1 -1
  24. package/dist/index.cjs11.js +1 -1
  25. package/dist/index.cjs110.js +1 -1
  26. package/dist/index.cjs112.js +1 -1
  27. package/dist/index.cjs113.js +1 -1
  28. package/dist/index.cjs114.js +1 -1
  29. package/dist/index.cjs115.js +1 -1
  30. package/dist/index.cjs116.js +1 -1
  31. package/dist/index.cjs117.js +1 -1
  32. package/dist/index.cjs118.js +1 -1
  33. package/dist/index.cjs119.js +1 -1
  34. package/dist/index.cjs12.js +1 -1
  35. package/dist/index.cjs120.js +1 -1
  36. package/dist/index.cjs121.js +1 -1
  37. package/dist/index.cjs122.js +1 -1
  38. package/dist/index.cjs123.js +1 -1
  39. package/dist/index.cjs124.js +1 -1
  40. package/dist/index.cjs125.js +1 -1
  41. package/dist/index.cjs126.js +1 -1
  42. package/dist/index.cjs127.js +1 -1
  43. package/dist/index.cjs128.js +1 -1
  44. package/dist/index.cjs129.js +1 -1
  45. package/dist/index.cjs13.js +1 -1
  46. package/dist/index.cjs138.js +1 -1
  47. package/dist/index.cjs139.js +1 -1
  48. package/dist/index.cjs14.js +1 -1
  49. package/dist/index.cjs140.js +1 -1
  50. package/dist/index.cjs141.js +1 -1
  51. package/dist/index.cjs142.js +1 -1
  52. package/dist/index.cjs143.js +1 -1
  53. package/dist/index.cjs144.js +1 -1
  54. package/dist/index.cjs145.js +1 -1
  55. package/dist/index.cjs146.js +1 -1
  56. package/dist/index.cjs147.js +1 -1
  57. package/dist/index.cjs148.js +1 -1
  58. package/dist/index.cjs149.js +1 -1
  59. package/dist/index.cjs15.js +1 -1
  60. package/dist/index.cjs150.js +1 -1
  61. package/dist/index.cjs151.js +1 -1
  62. package/dist/index.cjs152.js +1 -1
  63. package/dist/index.cjs153.js +1 -1
  64. package/dist/index.cjs155.js +1 -1
  65. package/dist/index.cjs156.js +1 -1
  66. package/dist/index.cjs158.js +1 -1
  67. package/dist/index.cjs159.js +1 -1
  68. package/dist/index.cjs16.js +1 -1
  69. package/dist/index.cjs161.js +1 -1
  70. package/dist/index.cjs162.js +1 -1
  71. package/dist/index.cjs164.js +1 -1
  72. package/dist/index.cjs165.js +1 -0
  73. package/dist/index.cjs166.js +1 -0
  74. package/dist/index.cjs167.js +1 -0
  75. package/dist/index.cjs17.js +1 -1
  76. package/dist/index.cjs18.js +1 -1
  77. package/dist/index.cjs19.js +1 -1
  78. package/dist/index.cjs2.js +1 -1
  79. package/dist/index.cjs20.js +1 -1
  80. package/dist/index.cjs21.js +1 -1
  81. package/dist/index.cjs22.js +1 -1
  82. package/dist/index.cjs23.js +1 -1
  83. package/dist/index.cjs24.js +1 -1
  84. package/dist/index.cjs25.js +1 -1
  85. package/dist/index.cjs26.js +1 -1
  86. package/dist/index.cjs27.js +1 -1
  87. package/dist/index.cjs28.js +1 -1
  88. package/dist/index.cjs3.js +1 -1
  89. package/dist/index.cjs31.js +1 -1
  90. package/dist/index.cjs32.js +1 -1
  91. package/dist/index.cjs33.js +1 -1
  92. package/dist/index.cjs34.js +1 -1
  93. package/dist/index.cjs35.js +1 -1
  94. package/dist/index.cjs36.js +1 -1
  95. package/dist/index.cjs37.js +1 -1
  96. package/dist/index.cjs38.js +1 -1
  97. package/dist/index.cjs39.js +1 -1
  98. package/dist/index.cjs4.js +1 -1
  99. package/dist/index.cjs40.js +1 -1
  100. package/dist/index.cjs42.js +1 -1
  101. package/dist/index.cjs43.js +1 -1
  102. package/dist/index.cjs44.js +1 -1
  103. package/dist/index.cjs45.js +1 -1
  104. package/dist/index.cjs46.js +1 -1
  105. package/dist/index.cjs47.js +1 -1
  106. package/dist/index.cjs48.js +1 -1
  107. package/dist/index.cjs49.js +1 -1
  108. package/dist/index.cjs5.js +1 -1
  109. package/dist/index.cjs50.js +1 -1
  110. package/dist/index.cjs51.js +1 -1
  111. package/dist/index.cjs52.js +1 -1
  112. package/dist/index.cjs53.js +1 -1
  113. package/dist/index.cjs54.js +1 -1
  114. package/dist/index.cjs55.js +1 -1
  115. package/dist/index.cjs56.js +1 -1
  116. package/dist/index.cjs57.js +1 -1
  117. package/dist/index.cjs58.js +1 -1
  118. package/dist/index.cjs59.js +1 -1
  119. package/dist/index.cjs6.js +1 -1
  120. package/dist/index.cjs60.js +1 -1
  121. package/dist/index.cjs61.js +1 -1
  122. package/dist/index.cjs62.js +1 -1
  123. package/dist/index.cjs63.js +1 -1
  124. package/dist/index.cjs64.js +1 -1
  125. package/dist/index.cjs65.js +1 -1
  126. package/dist/index.cjs66.js +1 -1
  127. package/dist/index.cjs67.js +1 -1
  128. package/dist/index.cjs68.js +1 -1
  129. package/dist/index.cjs69.js +1 -1
  130. package/dist/index.cjs7.js +1 -1
  131. package/dist/index.cjs70.js +1 -1
  132. package/dist/index.cjs72.js +1 -1
  133. package/dist/index.cjs73.js +1 -1
  134. package/dist/index.cjs75.js +1 -1
  135. package/dist/index.cjs76.js +1 -1
  136. package/dist/index.cjs77.js +1 -1
  137. package/dist/index.cjs78.js +1 -1
  138. package/dist/index.cjs79.js +1 -1
  139. package/dist/index.cjs8.js +1 -1
  140. package/dist/index.cjs80.js +1 -1
  141. package/dist/index.cjs81.js +1 -9
  142. package/dist/index.cjs82.js +3 -13
  143. package/dist/index.cjs83.js +19 -1
  144. package/dist/index.cjs84.js +1 -1
  145. package/dist/index.cjs85.js +1 -1
  146. package/dist/index.cjs86.js +1 -1
  147. package/dist/index.cjs87.js +1 -1
  148. package/dist/index.cjs88.js +1 -1
  149. package/dist/index.cjs89.js +1 -1
  150. package/dist/index.cjs9.js +1 -1
  151. package/dist/index.cjs90.js +1 -1
  152. package/dist/index.cjs91.js +1 -1
  153. package/dist/index.cjs92.js +1 -1
  154. package/dist/index.cjs93.js +1 -1
  155. package/dist/index.cjs94.js +1 -1
  156. package/dist/index.cjs95.js +1 -1
  157. package/dist/index.cjs96.js +1 -1
  158. package/dist/index.cjs97.js +1 -1
  159. package/dist/index.cjs98.js +1 -1
  160. package/dist/index.cjs99.js +1 -1
  161. package/dist/index.es.js +50 -50
  162. package/dist/index.es10.js +45 -33
  163. package/dist/index.es100.js +2 -4
  164. package/dist/index.es101.js +30 -26
  165. package/dist/index.es102.js +57 -2
  166. package/dist/index.es103.js +4 -8
  167. package/dist/index.es104.js +27 -341
  168. package/dist/index.es105.js +2 -166
  169. package/dist/index.es106.js +10 -190
  170. package/dist/index.es107.js +339 -48
  171. package/dist/index.es108.js +166 -2
  172. package/dist/index.es109.js +190 -4
  173. package/dist/index.es11.js +38 -76
  174. package/dist/index.es110.js +42 -12
  175. package/dist/index.es112.js +2 -43
  176. package/dist/index.es113.js +21 -7
  177. package/dist/index.es114.js +2 -5
  178. package/dist/index.es115.js +44 -26
  179. package/dist/index.es116.js +7 -192
  180. package/dist/index.es117.js +7 -16
  181. package/dist/index.es118.js +21 -347
  182. package/dist/index.es119.js +187 -19
  183. package/dist/index.es12.js +77 -32
  184. package/dist/index.es120.js +8 -11
  185. package/dist/index.es121.js +345 -146
  186. package/dist/index.es122.js +18 -11
  187. package/dist/index.es123.js +11 -9
  188. package/dist/index.es124.js +144 -201
  189. package/dist/index.es125.js +13 -64
  190. package/dist/index.es126.js +9 -6
  191. package/dist/index.es127.js +211 -4
  192. package/dist/index.es128.js +68 -4
  193. package/dist/index.es129.js +14 -4
  194. package/dist/index.es13.js +32 -113
  195. package/dist/index.es130.js +2 -2
  196. package/dist/index.es131.js +2 -2
  197. package/dist/index.es132.js +2 -2
  198. package/dist/index.es133.js +2 -2
  199. package/dist/index.es134.js +2 -2
  200. package/dist/index.es135.js +2 -2
  201. package/dist/index.es137.js +2 -2
  202. package/dist/index.es138.js +2 -2
  203. package/dist/index.es139.js +2 -1063
  204. package/dist/index.es14.js +88 -94
  205. package/dist/index.es140.js +4 -77
  206. package/dist/index.es141.js +2 -2
  207. package/dist/index.es142.js +1064 -19
  208. package/dist/index.es143.js +77 -4
  209. package/dist/index.es144.js +2 -57
  210. package/dist/index.es145.js +59 -61
  211. package/dist/index.es146.js +20 -4
  212. package/dist/index.es147.js +4 -14
  213. package/dist/index.es148.js +53 -303
  214. package/dist/index.es149.js +4 -26
  215. package/dist/index.es15.js +111 -35
  216. package/dist/index.es150.js +14 -4
  217. package/dist/index.es151.js +311 -4
  218. package/dist/index.es152.js +26 -4
  219. package/dist/index.es153.js +4 -94
  220. package/dist/index.es154.js +2 -2
  221. package/dist/index.es155.js +2 -8
  222. package/dist/index.es156.js +86 -20
  223. package/dist/index.es157.js +2 -2
  224. package/dist/index.es158.js +10 -51
  225. package/dist/index.es159.js +21 -12
  226. package/dist/index.es16.js +41 -138
  227. package/dist/index.es160.js +2 -2
  228. package/dist/index.es161.js +51 -4
  229. package/dist/index.es162.js +14 -748
  230. package/dist/index.es163.js +2 -2
  231. package/dist/index.es164.js +2 -2
  232. package/dist/index.es165.js +753 -0
  233. package/dist/index.es166.js +4 -0
  234. package/dist/index.es167.js +4 -0
  235. package/dist/index.es17.js +136 -154
  236. package/dist/index.es18.js +149 -30
  237. package/dist/index.es19.js +38 -49
  238. package/dist/index.es2.js +1 -1
  239. package/dist/index.es20.js +48 -36
  240. package/dist/index.es21.js +37 -104
  241. package/dist/index.es22.js +102 -89
  242. package/dist/index.es23.js +82 -101
  243. package/dist/index.es24.js +107 -72
  244. package/dist/index.es25.js +74 -142
  245. package/dist/index.es26.js +93 -39
  246. package/dist/index.es27.js +1 -1
  247. package/dist/index.es28.js +3 -3
  248. package/dist/index.es3.js +2 -2
  249. package/dist/index.es31.js +2 -2
  250. package/dist/index.es32.js +4 -4
  251. package/dist/index.es33.js +4 -4
  252. package/dist/index.es34.js +3 -3
  253. package/dist/index.es35.js +2 -2
  254. package/dist/index.es36.js +2 -2
  255. package/dist/index.es37.js +2 -2
  256. package/dist/index.es38.js +3 -3
  257. package/dist/index.es39.js +6 -27
  258. package/dist/index.es4.js +2 -2
  259. package/dist/index.es40.js +31 -6
  260. package/dist/index.es42.js +171 -10
  261. package/dist/index.es43.js +40 -31
  262. package/dist/index.es44.js +33 -17
  263. package/dist/index.es45.js +122 -16
  264. package/dist/index.es46.js +83 -15
  265. package/dist/index.es47.js +128 -154
  266. package/dist/index.es48.js +116 -23
  267. package/dist/index.es49.js +90 -59
  268. package/dist/index.es5.js +21 -21
  269. package/dist/index.es50.js +84 -115
  270. package/dist/index.es51.js +24 -126
  271. package/dist/index.es52.js +74 -72
  272. package/dist/index.es53.js +24 -98
  273. package/dist/index.es54.js +3 -34
  274. package/dist/index.es55.js +137 -94
  275. package/dist/index.es56.js +75 -23
  276. package/dist/index.es57.js +16 -49
  277. package/dist/index.es58.js +30 -40
  278. package/dist/index.es59.js +18 -3
  279. package/dist/index.es6.js +3 -3
  280. package/dist/index.es60.js +16 -159
  281. package/dist/index.es61.js +14 -90
  282. package/dist/index.es62.js +161 -20
  283. package/dist/index.es63.js +10 -30
  284. package/dist/index.es64.js +1 -1
  285. package/dist/index.es65.js +2 -2
  286. package/dist/index.es66.js +13 -137
  287. package/dist/index.es67.js +64 -19
  288. package/dist/index.es68.js +88 -13
  289. package/dist/index.es69.js +66 -149
  290. package/dist/index.es7.js +2 -2
  291. package/dist/index.es70.js +2 -2
  292. package/dist/index.es72.js +3 -3
  293. package/dist/index.es73.js +3 -3
  294. package/dist/index.es75.js +10 -19
  295. package/dist/index.es76.js +10 -20
  296. package/dist/index.es77.js +45 -10
  297. package/dist/index.es78.js +19 -10
  298. package/dist/index.es79.js +17 -42
  299. package/dist/index.es8.js +4 -4
  300. package/dist/index.es80.js +40 -2
  301. package/dist/index.es81.js +2 -30
  302. package/dist/index.es82.js +21 -590
  303. package/dist/index.es83.js +599 -21
  304. package/dist/index.es84.js +17 -17
  305. package/dist/index.es85.js +14 -18
  306. package/dist/index.es86.js +19 -15
  307. package/dist/index.es87.js +14 -10
  308. package/dist/index.es88.js +12 -10
  309. package/dist/index.es89.js +8 -8
  310. package/dist/index.es9.js +74 -40
  311. package/dist/index.es90.js +6 -6
  312. package/dist/index.es91.js +11 -13
  313. package/dist/index.es92.js +8 -10
  314. package/dist/index.es93.js +12 -10
  315. package/dist/index.es94.js +13 -13
  316. package/dist/index.es95.js +11 -9
  317. package/dist/index.es96.js +19 -30
  318. package/dist/index.es97.js +19 -2
  319. package/dist/index.es98.js +19 -2
  320. package/dist/index.es99.js +2 -57
  321. package/dist/stories/SelectInput.stories.d.ts +50 -0
  322. package/dist/style.css +63 -63
  323. package/package.json +1 -1
  324. package/dist/components/Select/Select.d.ts +0 -12
  325. package/dist/components/Select/SelectContent.d.ts +0 -24
  326. package/dist/components/Select/SelectItem.d.ts +0 -13
  327. package/dist/components/Select/TooltipSelect.d.ts +0 -3
  328. package/dist/components/Select/index.d.ts +0 -3
  329. package/dist/components/Select/types.d.ts +0 -76
@@ -1,78 +1,113 @@
1
- import { j as s } from "./index.es38.js";
2
- import { SearchIcon as P, CrossIcon as y } from "./index.es39.js";
3
- import { useMemo as z } from "react";
4
- import { ComboBox as D, Input as H, Text as R, FieldError as E, Popover as O, ListBox as F, ListBoxItem as M } from "react-aria-components";
5
- import { cn as S } from "./index.es40.js";
6
- import { useDebouncedValue as _ } from "./index.es68.js";
7
- import { IconButton as T } from "./index.es10.js";
1
+ import { j as t } from "./index.es38.js";
2
+ import { motion as D } from "framer-motion";
3
+ import { ProgressBar as I } from "react-aria-components";
4
+ import "react";
5
+ import { cn as s } from "./index.es39.js";
6
+ import "./index.es41.js";
7
+ import "./index.es42.js";
8
+ import "./index.es43.js";
9
+ import "react-aria";
10
+ import "./index.es44.js";
11
+ import "@react-stately/color";
12
+ import "./index.es45.js";
13
+ import "./index.es46.js";
8
14
  import "./index.es11.js";
9
- import { Label as $ } from "./index.es12.js";
10
- import { inputVariants as k } from "./index.es55.js";
11
- import { popoverVariants as q, searchOptionVariants as A } from "./index.es56.js";
12
- const te = (i) => {
15
+ import "./index.es12.js";
16
+ import { Label as M } from "./index.es13.js";
17
+ import "@internationalized/date";
18
+ import "./index.es47.js";
19
+ import "./index.es15.js";
20
+ import "./index.es48.js";
21
+ import "./index.es17.js";
22
+ import "./index.es49.js";
23
+ import "./index.es21.js";
24
+ import "./index.es22.js";
25
+ import "./index.es50.js";
26
+ import { progressBarVariants as S, progressFillVariants as $ } from "./index.es51.js";
27
+ import "./index.es52.js";
28
+ import "./index.es53.js";
29
+ import "./index.es26.js";
30
+ import { Tooltip as k } from "./index.es34.js";
31
+ import { TooltipTrigger as z } from "./index.es35.js";
32
+ import "./index.es55.js";
33
+ import "./index.es29.js";
34
+ import "./index.es30.js";
35
+ import "./index.es31.js";
36
+ import "./index.es56.js";
37
+ import "./index.es33.js";
38
+ import { Text as d } from "./index.es36.js";
39
+ import "./index.es57.js";
40
+ const yt = (f) => {
13
41
  const {
14
- label: n,
15
- onReset: c,
16
- placeholder: f,
17
- isDisabled: l,
18
- delay: b = 300,
19
- searchIcon: j,
20
- clearIcon: I,
21
- size: N = "md",
22
- description: d,
23
- inputValue: h,
24
- isInvalid: m,
25
- errorMessage: x,
26
- items: r,
42
+ className: h,
43
+ classNameLabel: N,
44
+ label: o,
45
+ variant: p = "primary",
46
+ barClassName: u,
47
+ fillClassName: g,
48
+ valueTextClassName: n,
49
+ isLoading: e = !1,
50
+ showPercentage: x = !0,
51
+ percentageDisplayMode: i = "text",
52
+ positionTooltip: j = "top",
53
+ modeTooltip: b = "dark",
54
+ maxValue: w = 100,
55
+ minValue: y = 0,
56
+ valueCustomLabel: r,
57
+ valuePosition: c = "right",
58
+ classNameTooltip: v,
59
+ tooltipMessage: a,
60
+ barStyle: C = {},
61
+ fillStyle: T = {},
27
62
  ...L
28
- } = i, w = j ?? /* @__PURE__ */ s.jsx(P, { className: "size-6 text-neutral-700", "data-testid": "search-icon" }), C = /* @__PURE__ */ s.jsx(T, { intent: "minimal", size: "md", className: "p-0", "data-testid": "clear-icon-button", onPress: c, children: I ?? /* @__PURE__ */ s.jsx(y, { className: "size-5 text-neutral-700", "data-testid": "clear-icon" }) }), a = _(h, b), u = a && c, V = u ? C : w, v = (e, t) => {
29
- if (!t.trim())
30
- return [{ text: e, highlight: !1 }];
31
- const o = new RegExp(`(${t})`, "gi");
32
- return e.split(o).filter(Boolean).map((g) => ({
33
- text: g,
34
- highlight: g.toLowerCase() === t.toLowerCase()
35
- }));
36
- }, B = z(
37
- () => a ? r.filter((e) => e.label.toLowerCase().includes(a.toLowerCase())).map((e) => {
38
- const t = a && e.label.toLowerCase().includes(a.toLowerCase()), o = v(e.label, a ?? "");
39
- return { ...e, shouldHighlight: t, highlightedParts: o };
40
- }) : r.map((e) => ({
41
- ...e,
42
- shouldHighlight: !1,
43
- highlightedParts: [{ text: e.label, highlight: !1 }]
44
- })),
45
- [a, r]
46
- );
47
- return /* @__PURE__ */ s.jsxs(D, { inputValue: h, isDisabled: l, ...L, children: [
48
- n && /* @__PURE__ */ s.jsx($, { children: n }),
49
- /* @__PURE__ */ s.jsxs("div", { className: "relative flex items-center", children: [
50
- /* @__PURE__ */ s.jsx(
51
- H,
52
- {
53
- placeholder: f,
54
- className: k({ size: N, isDisabled: l, hasIcon: !0 }),
55
- disabled: l,
56
- readOnly: i.isReadOnly
57
- }
58
- ),
59
- /* @__PURE__ */ s.jsx("span", { className: S("absolute right-2 top-1/2 -translate-y-1/2", u && "top-[53%]"), children: V })
60
- ] }),
61
- d && !m && /* @__PURE__ */ s.jsx(R, { slot: "description", className: "text-xs leading-5 text-neutral-700", children: d }),
62
- x && m && /* @__PURE__ */ s.jsx(E, { className: "text-sm leading-6 text-error-500", children: x }),
63
- /* @__PURE__ */ s.jsx(O, { className: q(), children: /* @__PURE__ */ s.jsx(F, { items: B, className: "max-h-60 overflow-auto outline-none", children: (e) => /* @__PURE__ */ s.jsx(
64
- M,
65
- {
66
- id: e.id,
67
- textValue: e.label,
68
- className: ({ isDisabled: t, isSelected: o, isFocused: p }) => A({ isFocused: p, isSelected: o, isDisabled: t }),
69
- children: e.shouldHighlight ? /* @__PURE__ */ s.jsx("span", { children: e.highlightedParts.map(
70
- (t, o) => t.highlight ? /* @__PURE__ */ s.jsx("span", { className: "font-bold text-neutral-900", children: t.text }, t.text + o) : t.text
71
- ) }) : e.label
72
- }
73
- ) }) })
74
- ] });
63
+ } = f, P = s("flex w-full flex-col gap-2 text-neutral-900", h), B = s(S({ variant: p }), u), V = s($({ variant: p }), g);
64
+ return /* @__PURE__ */ t.jsx(I, { className: P, maxValue: w, minValue: y, ...L, children: ({ percentage: l, valueText: m }) => /* @__PURE__ */ t.jsxs(
65
+ "div",
66
+ {
67
+ className: s("flex w-full items-center gap-2", {
68
+ "items-end": o
69
+ }),
70
+ children: [
71
+ /* @__PURE__ */ t.jsxs("div", { className: "flex w-full flex-col gap-1", children: [
72
+ o ? /* @__PURE__ */ t.jsx(M, { labelClassName: s("leading-[19.07px] text-left", N), children: o }) : null,
73
+ /* @__PURE__ */ t.jsxs(
74
+ z,
75
+ {
76
+ isDisabled: i === "text" && !a || e,
77
+ className: "items-start",
78
+ delay: 90,
79
+ closeDelay: 200,
80
+ children: [
81
+ /* @__PURE__ */ t.jsx("div", { className: B, style: C, children: /* @__PURE__ */ t.jsx(
82
+ D.div,
83
+ {
84
+ className: V,
85
+ style: { width: e ? "100%" : `${l}%`, ...T },
86
+ animate: e ? { x: ["-100%", "100%"] } : { width: l + "%", x: [0, 0] },
87
+ transition: e ? { repeat: 1 / 0, duration: 1, ease: "easeInOut" } : {}
88
+ }
89
+ ) }),
90
+ /* @__PURE__ */ t.jsx(
91
+ k,
92
+ {
93
+ className: s("text-xs", v),
94
+ style: i === "tooltip" ? { left: l + "%" } : {},
95
+ mode: b,
96
+ size: "sm",
97
+ placement: j,
98
+ children: a && i === "text" ? a : r || m
99
+ }
100
+ )
101
+ ]
102
+ }
103
+ ),
104
+ !e && x && i === "text" && c === "bottom" && /* @__PURE__ */ t.jsx("div", { className: "mt-0.5 self-end", children: /* @__PURE__ */ t.jsx(d, { className: s("whitespace-nowrap text-xs text-neutral-900", n), children: r || m }) })
105
+ ] }),
106
+ !e && x && i === "text" && c === "right" && /* @__PURE__ */ t.jsx("div", { className: o ? "-mb-0.5" : "", children: /* @__PURE__ */ t.jsx(d, { className: s("whitespace-nowrap text-xs text-neutral-900", n), children: r || m }) })
107
+ ]
108
+ }
109
+ ) });
75
110
  };
76
111
  export {
77
- te as SearchField
112
+ yt as ProgressBar
78
113
  };
@@ -1,146 +1,78 @@
1
- import { j as r } from "./index.es38.js";
2
- import { useState as f, useRef as C, useEffect as I } from "react";
3
- import { Select as S, Popover as tt, ListBox as st } from "react-aria-components";
4
- import { cn as P } from "./index.es40.js";
5
- import "./index.es11.js";
6
- import { Label as it } from "./index.es12.js";
7
- import { SelectContent as rt } from "./index.es66.js";
8
- import { SelectItem as lt } from "./index.es26.js";
9
- import { TooltipSelect as ot } from "./index.es67.js";
10
- const b = "all-select-option", bt = ({
11
- mode: e = "single",
12
- keyLabelName: V,
13
- keyIdName: j,
14
- className: _,
15
- selectButtonClassName: k,
16
- placeholder: O = "Select an option",
17
- isDisabled: x = !1,
18
- size: q = "md",
19
- items: l = [],
20
- renderItem: N,
21
- value: s = [],
22
- onSelectChange: t,
23
- classNameLabel: B,
24
- isRequired: $ = !1,
25
- label: L,
26
- tooltipText: F,
27
- tooltipSupportText: H,
28
- tooltipProps: g,
29
- hiddenDiscardButton: z = !1,
30
- tooltipMode: G = "dark",
31
- textAllOption: J = "Select all"
32
- }) => {
33
- const [y, K] = f(e), [M, d] = f(!1), [R, Q] = f(""), [U, u] = f(0), [X, T] = f(!1), [Y, A] = f(!1), m = C(null);
34
- I(() => {
35
- e !== y && (t == null || t([]), K(e));
36
- }, [e, t, y]), I(() => {
37
- if (!m.current || s.length === 0)
38
- return;
39
- const i = () => {
40
- const n = m.current;
41
- n && (A(!0), u(s.length), requestAnimationFrame(() => {
42
- let c = 0;
43
- const a = n.querySelectorAll("[data-chip]");
44
- let h = 0;
45
- const p = document.createElement("div");
46
- p.innerText = `+${s.length}`, p.style.visibility = "hidden", p.style.position = "absolute", n.appendChild(p);
47
- const v = p.offsetWidth;
48
- n.removeChild(p);
49
- for (let w = 0; w < a.length; w++) {
50
- const E = a[w].getBoundingClientRect().width, W = 8;
51
- if (c + E + W > n.offsetWidth - v)
52
- break;
53
- c += E + W, h++;
54
- }
55
- h < s.length ? (u(Math.max(1, h)), T(!0)) : (u(s.length), T(!1)), A(!1);
56
- }));
57
- };
58
- i();
59
- const o = new ResizeObserver(i);
60
- return o.observe(m.current), () => {
61
- o == null || o.disconnect();
62
- };
63
- }, [s]);
64
- const Z = P("flex w-full flex-col gap-1 !min-w-[150px]", _), D = (i) => {
65
- t == null || t((s == null ? void 0 : s.filter((o) => o !== i)) ?? []);
66
- };
67
- return /* @__PURE__ */ r.jsxs(
68
- S,
69
- {
70
- isDisabled: x,
71
- className: Z,
72
- placeholder: O,
73
- onSelectionChange: (i) => {
74
- if (i === b && e === "multiple") {
75
- if (s.length === l.length)
76
- t == null || t([]);
77
- else {
78
- const c = l.map((a) => a[j]);
79
- t == null || t(c);
80
- }
81
- return;
82
- }
83
- const o = s != null && s.includes(i) ? s.filter((c) => c !== i) : [...s, i], n = [i];
84
- e === "multiple" ? t == null || t(o) : (d(!1), t == null || t(n));
85
- },
86
- children: [
87
- /* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-between", children: [
88
- L ? /* @__PURE__ */ r.jsx(
89
- it,
90
- {
91
- labelClassName: P("leading-[19.07px] text-left mb-[1px]", {
92
- "text-neutral-700": x,
93
- classNameLabel: B
94
- }),
95
- isRequired: $,
96
- tooltipText: F,
97
- tooltipSupportText: H,
98
- tooltipProps: g,
99
- children: L
100
- }
101
- ) : /* @__PURE__ */ r.jsx("div", {}),
102
- R && /* @__PURE__ */ r.jsx("div", { className: "relative -mb-2 mr-20 flex self-end", children: /* @__PURE__ */ r.jsx(ot, { mode: G, className: "mr-2", placement: "none", children: /* @__PURE__ */ r.jsx("p", { className: "whitespace-nowrap text-xs", children: R }) }) })
103
- ] }),
104
- /* @__PURE__ */ r.jsx(
105
- rt,
106
- {
107
- isDisabled: x,
108
- size: q,
109
- selectButtonClassName: k,
110
- setIsOpen: d,
111
- isOpen: M,
112
- value: s,
113
- placeholder: O,
114
- items: l,
115
- keyIdName: j,
116
- keyLabelName: V,
117
- visibleItems: U,
118
- handleDeleteOptionSelected: D,
119
- maxLengthTextOption: 12,
120
- hiddenDiscardButton: z,
121
- containerRef: m,
122
- setTooltipMessage: Q,
123
- hasOverflow: X,
124
- isCalculatingChips: Y
125
- }
126
- ),
127
- /* @__PURE__ */ r.jsx(
128
- tt,
129
- {
130
- isOpen: M,
131
- placement: "bottom start",
132
- className: "custom-scrollbar !max-h-[185px] w-[--trigger-width] overflow-y-auto rounded-md bg-white shadow-lg ring-1 ring-black/5",
133
- onOpenChange: d,
134
- children: /* @__PURE__ */ r.jsxs(st, { items: l, className: "p-1 outline-none", children: [
135
- e === "multiple" && /* @__PURE__ */ r.jsx(lt, { id: b, children: J }, b),
136
- Array.isArray(l) && (l == null ? void 0 : l.map((i) => N ? N(i) : null))
137
- ] })
138
- }
139
- )
140
- ]
141
- }
1
+ import { j as s } from "./index.es38.js";
2
+ import { SearchIcon as P, CrossIcon as y } from "./index.es40.js";
3
+ import { useMemo as z } from "react";
4
+ import { ComboBox as D, Input as H, Text as R, FieldError as E, Popover as O, ListBox as F, ListBoxItem as M } from "react-aria-components";
5
+ import { cn as S } from "./index.es39.js";
6
+ import { useDebouncedValue as _ } from "./index.es66.js";
7
+ import { IconButton as T } from "./index.es11.js";
8
+ import "./index.es12.js";
9
+ import { Label as $ } from "./index.es13.js";
10
+ import { inputVariants as k } from "./index.es52.js";
11
+ import { popoverVariants as q, searchOptionVariants as A } from "./index.es53.js";
12
+ const te = (i) => {
13
+ const {
14
+ label: n,
15
+ onReset: c,
16
+ placeholder: f,
17
+ isDisabled: l,
18
+ delay: b = 300,
19
+ searchIcon: j,
20
+ clearIcon: I,
21
+ size: N = "md",
22
+ description: d,
23
+ inputValue: h,
24
+ isInvalid: m,
25
+ errorMessage: x,
26
+ items: r,
27
+ ...L
28
+ } = i, w = j ?? /* @__PURE__ */ s.jsx(P, { className: "size-6 text-neutral-700", "data-testid": "search-icon" }), C = /* @__PURE__ */ s.jsx(T, { intent: "minimal", size: "md", className: "p-0", "data-testid": "clear-icon-button", onPress: c, children: I ?? /* @__PURE__ */ s.jsx(y, { className: "size-5 text-neutral-700", "data-testid": "clear-icon" }) }), a = _(h, b), u = a && c, V = u ? C : w, v = (e, t) => {
29
+ if (!t.trim())
30
+ return [{ text: e, highlight: !1 }];
31
+ const o = new RegExp(`(${t})`, "gi");
32
+ return e.split(o).filter(Boolean).map((g) => ({
33
+ text: g,
34
+ highlight: g.toLowerCase() === t.toLowerCase()
35
+ }));
36
+ }, B = z(
37
+ () => a ? r.filter((e) => e.label.toLowerCase().includes(a.toLowerCase())).map((e) => {
38
+ const t = a && e.label.toLowerCase().includes(a.toLowerCase()), o = v(e.label, a ?? "");
39
+ return { ...e, shouldHighlight: t, highlightedParts: o };
40
+ }) : r.map((e) => ({
41
+ ...e,
42
+ shouldHighlight: !1,
43
+ highlightedParts: [{ text: e.label, highlight: !1 }]
44
+ })),
45
+ [a, r]
142
46
  );
47
+ return /* @__PURE__ */ s.jsxs(D, { inputValue: h, isDisabled: l, ...L, children: [
48
+ n && /* @__PURE__ */ s.jsx($, { children: n }),
49
+ /* @__PURE__ */ s.jsxs("div", { className: "relative flex items-center", children: [
50
+ /* @__PURE__ */ s.jsx(
51
+ H,
52
+ {
53
+ placeholder: f,
54
+ className: k({ size: N, isDisabled: l, hasIcon: !0 }),
55
+ disabled: l,
56
+ readOnly: i.isReadOnly
57
+ }
58
+ ),
59
+ /* @__PURE__ */ s.jsx("span", { className: S("absolute right-2 top-1/2 -translate-y-1/2", u && "top-[53%]"), children: V })
60
+ ] }),
61
+ d && !m && /* @__PURE__ */ s.jsx(R, { slot: "description", className: "text-xs leading-5 text-neutral-700", children: d }),
62
+ x && m && /* @__PURE__ */ s.jsx(E, { className: "text-sm leading-6 text-error-500", children: x }),
63
+ /* @__PURE__ */ s.jsx(O, { className: q(), children: /* @__PURE__ */ s.jsx(F, { items: B, className: "max-h-60 overflow-auto outline-none", children: (e) => /* @__PURE__ */ s.jsx(
64
+ M,
65
+ {
66
+ id: e.id,
67
+ textValue: e.label,
68
+ className: ({ isDisabled: t, isSelected: o, isFocused: p }) => A({ isFocused: p, isSelected: o, isDisabled: t }),
69
+ children: e.shouldHighlight ? /* @__PURE__ */ s.jsx("span", { children: e.highlightedParts.map(
70
+ (t, o) => t.highlight ? /* @__PURE__ */ s.jsx("span", { className: "font-bold text-neutral-900", children: t.text }, t.text + o) : t.text
71
+ ) }) : e.label
72
+ }
73
+ ) }) })
74
+ ] });
143
75
  };
144
76
  export {
145
- bt as Select
77
+ te as SearchField
146
78
  };
@@ -1,42 +1,96 @@
1
- import { j as e } from "./index.es38.js";
2
- import { ListBoxItem as m } from "react-aria-components";
3
- import { cn as i } from "./index.es40.js";
4
- const c = (t) => {
5
- const { isSelected: r } = t;
6
- return /* @__PURE__ */ e.jsx(
7
- m,
8
- {
9
- ...t,
10
- className: ({ isHovered: n, isFocusVisible: l }) => i(
11
- "group flex cursor-pointer select-none items-center gap-2 rounded-sm px-4 py-2 text-primary-500 outline-none",
12
- r && "bg-primary-100",
13
- (n || l) && !r && "bg-primary-50",
14
- (n || l) && r && "bg-primary-200"
15
- ),
16
- children: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
17
- /* @__PURE__ */ e.jsx(
18
- "span",
19
- {
20
- className: i(
21
- "flex flex-1 items-center gap-2 text-sm font-normal text-primary-900",
22
- r && "text-primary-500"
23
- ),
24
- children: t == null ? void 0 : t.children
25
- }
26
- ),
27
- /* @__PURE__ */ e.jsx("span", { className: "flex w-5 items-center", children: r && /* @__PURE__ */ e.jsx("svg", { width: "14", height: "13", viewBox: "0 0 14 13", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e.jsx(
28
- "path",
29
- {
30
- fillRule: "evenodd",
31
- clipRule: "evenodd",
32
- d: "M13.2241 0.601824C13.4808 0.780773 13.5439 1.13398 13.365 1.39073L5.69829 12.3907C5.59653 12.5367 5.43209 12.6264 5.25425 12.633C5.07641 12.6395 4.90582 12.5622 4.79359 12.4241L0.460261 7.09072C0.26291 6.84783 0.299829 6.49094 0.542723 6.29358C0.785617 6.09623 1.14251 6.13315 1.33986 6.37605L5.19872 11.1254L12.4352 0.7427C12.6141 0.485948 12.9673 0.422875 13.2241 0.601824Z",
33
- fill: "#4C3BEF"
34
- }
35
- ) }) })
36
- ] })
1
+ import { j as l } from "./index.es38.js";
2
+ import { forwardRef as k, useState as h } from "react";
3
+ import { useFilter as w, Select as G, Popover as H } from "react-aria-components";
4
+ import { cn as c } from "./index.es39.js";
5
+ import "./index.es12.js";
6
+ import { Label as J } from "./index.es13.js";
7
+ import { PopoverContent as K } from "./index.es67.js";
8
+ import { SelectContent as Q } from "./index.es68.js";
9
+ import { selectInputPopoverVariants as U } from "./index.es69.js";
10
+ const W = (S, v) => {
11
+ const {
12
+ label: p,
13
+ items: b,
14
+ selectionMode: s = "single",
15
+ value: m,
16
+ defaultValue: f,
17
+ placeholder: N = "Select",
18
+ isDisabled: r = !1,
19
+ isRequired: g = !1,
20
+ size: j = "xs",
21
+ className: C,
22
+ classNameLabel: u,
23
+ classNameButton: I,
24
+ classNamePopover: P,
25
+ tooltipText: O,
26
+ tooltipSupportText: y,
27
+ tooltipProps: A,
28
+ onChange: o,
29
+ maxLengthTextOption: L = 18,
30
+ placeholderSearch: V = "Search",
31
+ enableSearch: F = !1,
32
+ classNameSearchField: R,
33
+ classNameSearchFieldInput: T,
34
+ ...D
35
+ } = S, { contains: q } = w({ sensitivity: "base" }), [d, n] = h(!1), [z, x] = h(() => f !== void 0 ? f : s === "multiple" ? [] : null), i = m !== void 0, a = i ? m : z, B = (t) => {
36
+ if (s === "multiple" && a && Array.isArray(a)) {
37
+ const e = a.filter((_) => _ !== t);
38
+ i || x(e), o && o(e);
37
39
  }
38
- );
39
- };
40
+ }, E = (t) => {
41
+ let e;
42
+ s === "multiple" ? e = t instanceof Set ? Array.from(t) : t : (e = t, n(!1)), i || x(e), o && o(e);
43
+ }, M = {
44
+ className: c("flex w-full flex-col gap-1", C),
45
+ selectionMode: s,
46
+ isDisabled: r,
47
+ value: a,
48
+ onChange: E,
49
+ ...D
50
+ };
51
+ return /* @__PURE__ */ l.jsxs(G, { ...M, children: [
52
+ p ? /* @__PURE__ */ l.jsx(
53
+ J,
54
+ {
55
+ labelClassName: c("mb-[1px] text-left leading-[19.07px]", {
56
+ "text-neutral-700": r,
57
+ [u || ""]: !!u
58
+ }),
59
+ isRequired: g,
60
+ tooltipText: O,
61
+ tooltipSupportText: y,
62
+ tooltipProps: A,
63
+ children: p
64
+ }
65
+ ) : /* @__PURE__ */ l.jsx("div", {}),
66
+ /* @__PURE__ */ l.jsx(
67
+ Q,
68
+ {
69
+ ref: v,
70
+ isOpen: d,
71
+ setIsOpen: n,
72
+ size: j,
73
+ isDisabled: r,
74
+ classNameButton: I,
75
+ selectionMode: s,
76
+ maxLengthTextOption: L,
77
+ handleDeleteOptionSelected: B,
78
+ placeholder: N
79
+ }
80
+ ),
81
+ /* @__PURE__ */ l.jsx(H, { className: c(U(), P), isOpen: d, onOpenChange: n, children: /* @__PURE__ */ l.jsx(
82
+ K,
83
+ {
84
+ enableSearch: F,
85
+ contains: q,
86
+ classNameSearchField: R,
87
+ classNameSearchFieldInput: T,
88
+ placeholderSearch: V,
89
+ items: b
90
+ }
91
+ ) })
92
+ ] });
93
+ }, ae = k(W);
40
94
  export {
41
- c as SelectItem
95
+ ae as SelectInput
42
96
  };
@@ -1,7 +1,7 @@
1
1
  import { j as m } from "./index.es38.js";
2
2
  import { useState as q, useEffect as x } from "react";
3
3
  import { Slider as z, SliderTrack as B } from "react-aria-components";
4
- import { cn as F } from "./index.es40.js";
4
+ import { cn as F } from "./index.es39.js";
5
5
  import { SliderContainerTrack as G } from "./index.es70.js";
6
6
  import { validateMinDistance as H } from "./index.es71.js";
7
7
  const U = ({
@@ -1,9 +1,9 @@
1
1
  import { j as c } from "./index.es38.js";
2
- import { CheckIcon as h } from "./index.es39.js";
2
+ import { CheckIcon as h } from "./index.es40.js";
3
3
  import { useState as j } from "react";
4
4
  import { Button as S } from "react-aria-components";
5
- import { cn as k } from "./index.es40.js";
6
- import { statusChipVariants as I } from "./index.es60.js";
5
+ import { cn as k } from "./index.es39.js";
6
+ import { statusChipVariants as I } from "./index.es55.js";
7
7
  const F = ({
8
8
  size: m = "sm",
9
9
  label: n,
package/dist/index.es3.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { j as r } from "./index.es38.js";
2
- import { MinusIcon as p, PlusIcon as x } from "./index.es39.js";
3
- import { cn as e } from "./index.es40.js";
2
+ import { MinusIcon as p, PlusIcon as x } from "./index.es40.js";
3
+ import { cn as e } from "./index.es39.js";
4
4
  const h = ({
5
5
  label: t,
6
6
  section: n,
@@ -1,11 +1,11 @@
1
1
  import { j as n } from "./index.es38.js";
2
- import { CheckIcon as I } from "./index.es39.js";
2
+ import { CheckIcon as I } from "./index.es40.js";
3
3
  import { motion as f } from "framer-motion";
4
4
  import { useRef as k } from "react";
5
5
  import { useButton as D, useHover as V } from "react-aria";
6
6
  import z from "./index.es72.js";
7
7
  import B from "./index.es73.js";
8
- import { cn as H } from "./index.es40.js";
8
+ import { cn as H } from "./index.es39.js";
9
9
  import { stepVariants as R, iconVariants as $, labelVariants as E } from "./index.es74.js";
10
10
  const c = z(B), x = (s, e) => typeof s == "function" ? /* @__PURE__ */ n.jsx(s, { step: e || 0 }) : s, C = (s) => {
11
11
  var t, r, o, a, i;
@@ -1,9 +1,9 @@
1
1
  import { j as o } from "./index.es38.js";
2
2
  import { Switch as u } from "react-aria-components";
3
- import { cn as c } from "./index.es40.js";
4
- import { ContentSwitch as L } from "./index.es75.js";
5
- import { SwitchIndicator as v } from "./index.es76.js";
6
- import { switchVariants as b } from "./index.es61.js";
3
+ import { cn as c } from "./index.es39.js";
4
+ import { ContentSwitch as L } from "./index.es78.js";
5
+ import { SwitchIndicator as v } from "./index.es79.js";
6
+ import { switchVariants as b } from "./index.es56.js";
7
7
  const E = ({
8
8
  children: f,
9
9
  label: m,
@@ -2,10 +2,10 @@ import { j as s } from "./index.es38.js";
2
2
  import { useRef as b } from "react";
3
3
  import { useTabList as d } from "react-aria";
4
4
  import { useTabListState as u, Item as N } from "react-stately";
5
- import { cn as e } from "./index.es40.js";
6
- import { Tab as j } from "./index.es77.js";
7
- import { TabPanel as h } from "./index.es78.js";
8
- import { tabsVariants as T } from "./index.es79.js";
5
+ import { cn as e } from "./index.es39.js";
6
+ import { Tab as j } from "./index.es75.js";
7
+ import { TabPanel as h } from "./index.es76.js";
8
+ import { tabsVariants as T } from "./index.es77.js";
9
9
  const v = (a) => {
10
10
  var l;
11
11
  const {
@@ -1,9 +1,9 @@
1
1
  import { j as s } from "./index.es38.js";
2
2
  import { forwardRef as f, useContext as u } from "react";
3
3
  import { useTooltip as T, mergeProps as h } from "react-aria";
4
- import { cn as e } from "./index.es40.js";
5
- import { TooltipContext as j } from "./index.es59.js";
6
- import { tooltipVariants as N } from "./index.es58.js";
4
+ import { cn as e } from "./index.es39.js";
5
+ import { TooltipContext as j } from "./index.es54.js";
6
+ import { tooltipVariants as N } from "./index.es80.js";
7
7
  const P = f((p, i) => {
8
8
  const { placement: l = "bottom", className: m, mode: o = "dark", supportText: t, children: a, ...r } = p, { state: n, ...c } = u(j), { tooltipProps: x } = T(r, n), d = e(N({ placement: l, mode: o, hasSupportText: !!t }), m);
9
9
  return /* @__PURE__ */ s.jsxs("span", { className: d, ...h(r, x, c), ref: i, children: [