@udixio/ui-react 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (347) hide show
  1. package/.eslintrc.mjs +22 -0
  2. package/.storybook/main.ts +20 -0
  3. package/.storybook/preview.ts +1 -0
  4. package/CHANGELOG.md +141 -0
  5. package/dist/index.cjs +5 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +2820 -0
  8. package/dist/lib/components/Button.d.ts.map +1 -0
  9. package/dist/lib/components/Card.d.ts.map +1 -0
  10. package/dist/lib/components/Carousel.d.ts.map +1 -0
  11. package/dist/lib/components/CarouselItem.d.ts.map +1 -0
  12. package/{lib → dist/lib}/components/Divided.d.ts +1 -1
  13. package/dist/lib/components/Divided.d.ts.map +1 -0
  14. package/dist/lib/components/Fab.d.ts.map +1 -0
  15. package/dist/lib/components/IconButton.d.ts.map +1 -0
  16. package/dist/lib/components/NavigationRail.d.ts.map +1 -0
  17. package/dist/lib/components/NavigationRailItem.d.ts.map +1 -0
  18. package/dist/lib/components/ProgressIndicator.d.ts.map +1 -0
  19. package/dist/lib/components/Slider.d.ts.map +1 -0
  20. package/dist/lib/components/Snackbar.d.ts.map +1 -0
  21. package/dist/lib/components/Switch.d.ts.map +1 -0
  22. package/dist/lib/components/Tab.d.ts.map +1 -0
  23. package/dist/lib/components/Tabs.d.ts.map +1 -0
  24. package/dist/lib/components/TextField.d.ts.map +1 -0
  25. package/dist/lib/components/ToolTip.d.ts.map +1 -0
  26. package/dist/lib/components/index.d.ts.map +1 -0
  27. package/dist/lib/effects/SyncedFixedWrapper.d.ts.map +1 -0
  28. package/dist/lib/effects/custom-scroll/custom-scroll.effect.d.ts.map +1 -0
  29. package/dist/lib/effects/custom-scroll/custom-scroll.interface.d.ts.map +1 -0
  30. package/dist/lib/effects/custom-scroll/custom-scroll.style.d.ts.map +1 -0
  31. package/dist/lib/effects/custom-scroll/index.d.ts.map +1 -0
  32. package/dist/lib/effects/index.d.ts.map +1 -0
  33. package/dist/lib/effects/ripple/RippleEffect.d.ts.map +1 -0
  34. package/dist/lib/effects/ripple/index.d.ts.map +1 -0
  35. package/dist/lib/effects/smooth-scroll.effect.d.ts.map +1 -0
  36. package/dist/lib/icon/icon.d.ts.map +1 -0
  37. package/dist/lib/icon/index.d.ts.map +1 -0
  38. package/dist/lib/index.d.ts.map +1 -0
  39. package/dist/lib/interfaces/button.interface.d.ts.map +1 -0
  40. package/dist/lib/interfaces/card.interface.d.ts.map +1 -0
  41. package/dist/lib/interfaces/carousel-item.interface.d.ts.map +1 -0
  42. package/dist/lib/interfaces/carousel.interface.d.ts.map +1 -0
  43. package/dist/lib/interfaces/divider.interface.d.ts.map +1 -0
  44. package/dist/lib/interfaces/fab.interface.d.ts.map +1 -0
  45. package/dist/lib/interfaces/icon-button.interface.d.ts.map +1 -0
  46. package/dist/lib/interfaces/index.d.ts.map +1 -0
  47. package/dist/lib/interfaces/navigation-rail-item.interface.d.ts.map +1 -0
  48. package/dist/lib/interfaces/navigation-rail.interface.d.ts.map +1 -0
  49. package/dist/lib/interfaces/progress-indicator.interface.d.ts.map +1 -0
  50. package/dist/lib/interfaces/slider.interface.d.ts.map +1 -0
  51. package/dist/lib/interfaces/snackbar.interface.d.ts.map +1 -0
  52. package/dist/lib/interfaces/switch.interface.d.ts.map +1 -0
  53. package/dist/lib/interfaces/tab.interface.d.ts.map +1 -0
  54. package/{lib → dist/lib}/interfaces/tabs.interface.d.ts +1 -1
  55. package/dist/lib/interfaces/tabs.interface.d.ts.map +1 -0
  56. package/dist/lib/interfaces/text-field.interface.d.ts.map +1 -0
  57. package/dist/lib/interfaces/tooltip.interface.d.ts.map +1 -0
  58. package/dist/lib/styles/button.style.d.ts.map +1 -0
  59. package/dist/lib/styles/card.style.d.ts.map +1 -0
  60. package/dist/lib/styles/carousel-item.style.d.ts.map +1 -0
  61. package/dist/lib/styles/carousel.style.d.ts.map +1 -0
  62. package/dist/lib/styles/divider.style.d.ts.map +1 -0
  63. package/dist/lib/styles/fab.style.d.ts.map +1 -0
  64. package/dist/lib/styles/icon-button.style.d.ts.map +1 -0
  65. package/dist/lib/styles/index.d.ts.map +1 -0
  66. package/dist/lib/styles/navigation-rail-item.style.d.ts.map +1 -0
  67. package/dist/lib/styles/navigation-rail.style.d.ts.map +1 -0
  68. package/dist/lib/styles/progress-indicator.style.d.ts.map +1 -0
  69. package/dist/lib/styles/slider.style.d.ts.map +1 -0
  70. package/dist/lib/styles/snackbar.style.d.ts.map +1 -0
  71. package/dist/lib/styles/switch.style.d.ts.map +1 -0
  72. package/dist/lib/styles/tab.style.d.ts.map +1 -0
  73. package/{lib → dist/lib}/styles/tabs.style.d.ts +1 -1
  74. package/dist/lib/styles/tabs.style.d.ts.map +1 -0
  75. package/dist/lib/styles/text-field.style.d.ts.map +1 -0
  76. package/dist/lib/styles/tooltip.style.d.ts.map +1 -0
  77. package/dist/lib/utils/component-helper.d.ts.map +1 -0
  78. package/dist/lib/utils/component.d.ts.map +1 -0
  79. package/dist/lib/utils/index.d.ts.map +1 -0
  80. package/dist/lib/utils/string.d.ts.map +1 -0
  81. package/dist/lib/utils/styles/classnames.d.ts.map +1 -0
  82. package/dist/lib/utils/styles/get-classname.d.ts.map +1 -0
  83. package/dist/lib/utils/styles/index.d.ts.map +1 -0
  84. package/package.json +12 -7
  85. package/postcss.config.mjs +5 -0
  86. package/src/index.css +4 -0
  87. package/src/index.ts +1 -0
  88. package/src/lib/components/Button.tsx +140 -0
  89. package/src/lib/components/Card.tsx +31 -0
  90. package/src/lib/components/Carousel.tsx +190 -0
  91. package/src/lib/components/CarouselItem.tsx +53 -0
  92. package/src/lib/components/Divided.tsx +13 -0
  93. package/src/lib/components/Fab.tsx +109 -0
  94. package/src/lib/components/IconButton.tsx +141 -0
  95. package/src/lib/components/NavigationRail.tsx +178 -0
  96. package/src/lib/components/NavigationRailItem.tsx +199 -0
  97. package/src/lib/components/ProgressIndicator.tsx +157 -0
  98. package/src/lib/components/Slider.tsx +361 -0
  99. package/src/lib/components/Snackbar.tsx +66 -0
  100. package/src/lib/components/Switch.tsx +94 -0
  101. package/src/lib/components/Tab.tsx +110 -0
  102. package/src/lib/components/Tabs.tsx +85 -0
  103. package/src/lib/components/TextField.tsx +269 -0
  104. package/src/lib/components/ToolTip.tsx +232 -0
  105. package/src/lib/components/index.ts +19 -0
  106. package/src/lib/effects/SyncedFixedWrapper.tsx +64 -0
  107. package/src/lib/effects/custom-scroll/custom-scroll.effect.tsx +287 -0
  108. package/src/lib/effects/custom-scroll/custom-scroll.interface.ts +25 -0
  109. package/src/lib/effects/custom-scroll/custom-scroll.style.ts +32 -0
  110. package/src/lib/effects/custom-scroll/index.ts +3 -0
  111. package/src/lib/effects/index.ts +4 -0
  112. package/src/lib/effects/ripple/RippleEffect.tsx +103 -0
  113. package/src/lib/effects/ripple/index.tsx +1 -0
  114. package/src/lib/effects/smooth-scroll.effect.tsx +91 -0
  115. package/src/lib/icon/icon.tsx +47 -0
  116. package/src/lib/icon/index.ts +1 -0
  117. package/src/lib/index.ts +6 -0
  118. package/src/lib/interfaces/button.interface.ts +46 -0
  119. package/src/lib/interfaces/card.interface.ts +8 -0
  120. package/src/lib/interfaces/carousel-item.interface.ts +11 -0
  121. package/src/lib/interfaces/carousel.interface.ts +21 -0
  122. package/src/lib/interfaces/divider.interface.ts +7 -0
  123. package/src/lib/interfaces/fab.interface.ts +19 -0
  124. package/src/lib/interfaces/icon-button.interface.ts +35 -0
  125. package/src/lib/interfaces/index.ts +16 -0
  126. package/src/lib/interfaces/navigation-rail-item.interface.ts +38 -0
  127. package/src/lib/interfaces/navigation-rail.interface.ts +39 -0
  128. package/src/lib/interfaces/progress-indicator.interface.ts +35 -0
  129. package/src/lib/interfaces/slider.interface.ts +29 -0
  130. package/src/lib/interfaces/snackbar.interface.ts +13 -0
  131. package/src/lib/interfaces/switch.interface.ts +14 -0
  132. package/src/lib/interfaces/tab.interface.ts +30 -0
  133. package/src/lib/interfaces/tabs.interface.ts +22 -0
  134. package/src/lib/interfaces/text-field.interface.ts +48 -0
  135. package/src/lib/interfaces/tooltip.interface.ts +35 -0
  136. package/src/lib/styles/button.style.ts +155 -0
  137. package/src/lib/styles/card.style.ts +22 -0
  138. package/src/lib/styles/carousel-item.style.ts +11 -0
  139. package/src/lib/styles/carousel.style.ts +12 -0
  140. package/src/lib/styles/divider.style.ts +17 -0
  141. package/src/lib/styles/fab.style.ts +55 -0
  142. package/src/lib/styles/icon-button.style.ts +140 -0
  143. package/src/lib/styles/index.ts +15 -0
  144. package/src/lib/styles/navigation-rail-item.style.ts +44 -0
  145. package/src/lib/styles/navigation-rail.style.ts +20 -0
  146. package/src/lib/styles/progress-indicator.style.ts +30 -0
  147. package/src/lib/styles/slider.style.ts +27 -0
  148. package/src/lib/styles/snackbar.style.ts +14 -0
  149. package/src/lib/styles/switch.style.ts +51 -0
  150. package/src/lib/styles/tab.style.ts +68 -0
  151. package/src/lib/styles/tabs.style.ts +13 -0
  152. package/src/lib/styles/text-field.style.ts +104 -0
  153. package/src/lib/styles/tooltip.style.ts +37 -0
  154. package/src/lib/utils/component-helper.ts +134 -0
  155. package/src/lib/utils/component.ts +34 -0
  156. package/src/lib/utils/index.ts +7 -0
  157. package/src/lib/utils/string.ts +9 -0
  158. package/src/lib/utils/styles/classnames.ts +49 -0
  159. package/src/lib/utils/styles/get-classname.ts +73 -0
  160. package/src/lib/utils/styles/index.ts +3 -0
  161. package/src/stories/action/button.stories.tsx +86 -0
  162. package/src/stories/action/fab.stories.tsx +54 -0
  163. package/src/stories/action/icon-button.stories.tsx +134 -0
  164. package/src/stories/assets/accessibility.png +0 -0
  165. package/src/stories/assets/accessibility.svg +5 -0
  166. package/src/stories/assets/addon-library.png +0 -0
  167. package/src/stories/assets/assets.png +0 -0
  168. package/src/stories/assets/context.png +0 -0
  169. package/src/stories/assets/discord.svg +15 -0
  170. package/src/stories/assets/docs.png +0 -0
  171. package/src/stories/assets/figma-plugin.png +0 -0
  172. package/src/stories/assets/github.svg +3 -0
  173. package/src/stories/assets/share.png +0 -0
  174. package/src/stories/assets/styling.png +0 -0
  175. package/src/stories/assets/testing.png +0 -0
  176. package/src/stories/assets/theming.png +0 -0
  177. package/src/stories/assets/tutorials.svg +12 -0
  178. package/src/stories/assets/youtube.svg +4 -0
  179. package/src/stories/communication/ProgressIndicator.stories.tsx +57 -0
  180. package/src/stories/communication/SnackBar.stories.tsx +32 -0
  181. package/src/stories/communication/tool-tip.stories.tsx +133 -0
  182. package/src/stories/containment/card.stories.tsx +42 -0
  183. package/src/stories/containment/carousel.stories.tsx +65 -0
  184. package/src/stories/containment/divider.stories.tsx +35 -0
  185. package/src/stories/effect/smooth-scroll.stories.tsx +45 -0
  186. package/src/stories/navigation/navigation-rail/navigation-rail-item.stories.tsx +65 -0
  187. package/src/stories/navigation/navigation-rail/navigation-rail.stories.tsx +122 -0
  188. package/src/stories/navigation/tabs/tab.stories.tsx +57 -0
  189. package/src/stories/navigation/tabs/tabs.stories.tsx +102 -0
  190. package/src/stories/selection/slider.stories.tsx +85 -0
  191. package/src/stories/selection/switch.stories.tsx +46 -0
  192. package/src/stories/text-inputs/text-field.stories.tsx +135 -0
  193. package/src/tests/Button.spec.tsx +67 -0
  194. package/src/udixio.css +120 -0
  195. package/theme.config.ts +7 -0
  196. package/tsconfig.json +22 -0
  197. package/tsconfig.lib.json +51 -0
  198. package/tsconfig.spec.json +37 -0
  199. package/tsconfig.storybook.json +38 -0
  200. package/vite.config.ts +75 -0
  201. package/index.d.ts.map +0 -1
  202. package/index.js +0 -10841
  203. package/lib/components/Button.d.ts.map +0 -1
  204. package/lib/components/Card.d.ts.map +0 -1
  205. package/lib/components/Carousel.d.ts.map +0 -1
  206. package/lib/components/CarouselItem.d.ts.map +0 -1
  207. package/lib/components/Divided.d.ts.map +0 -1
  208. package/lib/components/Fab.d.ts.map +0 -1
  209. package/lib/components/IconButton.d.ts.map +0 -1
  210. package/lib/components/NavigationRail.d.ts.map +0 -1
  211. package/lib/components/NavigationRailItem.d.ts.map +0 -1
  212. package/lib/components/ProgressIndicator.d.ts.map +0 -1
  213. package/lib/components/Slider.d.ts.map +0 -1
  214. package/lib/components/Snackbar.d.ts.map +0 -1
  215. package/lib/components/Switch.d.ts.map +0 -1
  216. package/lib/components/Tab.d.ts.map +0 -1
  217. package/lib/components/Tabs.d.ts.map +0 -1
  218. package/lib/components/TextField.d.ts.map +0 -1
  219. package/lib/components/ToolTip.d.ts.map +0 -1
  220. package/lib/components/index.d.ts.map +0 -1
  221. package/lib/effects/SyncedFixedWrapper.d.ts.map +0 -1
  222. package/lib/effects/custom-scroll/custom-scroll.effect.d.ts.map +0 -1
  223. package/lib/effects/custom-scroll/custom-scroll.interface.d.ts.map +0 -1
  224. package/lib/effects/custom-scroll/custom-scroll.style.d.ts.map +0 -1
  225. package/lib/effects/custom-scroll/index.d.ts.map +0 -1
  226. package/lib/effects/index.d.ts.map +0 -1
  227. package/lib/effects/ripple/RippleEffect.d.ts.map +0 -1
  228. package/lib/effects/ripple/index.d.ts.map +0 -1
  229. package/lib/effects/smooth-scroll.effect.d.ts.map +0 -1
  230. package/lib/icon/icon.d.ts.map +0 -1
  231. package/lib/icon/index.d.ts.map +0 -1
  232. package/lib/index.d.ts.map +0 -1
  233. package/lib/interfaces/button.interface.d.ts.map +0 -1
  234. package/lib/interfaces/card.interface.d.ts.map +0 -1
  235. package/lib/interfaces/carousel-item.interface.d.ts.map +0 -1
  236. package/lib/interfaces/carousel.interface.d.ts.map +0 -1
  237. package/lib/interfaces/divider.interface.d.ts.map +0 -1
  238. package/lib/interfaces/fab.interface.d.ts.map +0 -1
  239. package/lib/interfaces/icon-button.interface.d.ts.map +0 -1
  240. package/lib/interfaces/index.d.ts.map +0 -1
  241. package/lib/interfaces/navigation-rail-item.interface.d.ts.map +0 -1
  242. package/lib/interfaces/navigation-rail.interface.d.ts.map +0 -1
  243. package/lib/interfaces/progress-indicator.interface.d.ts.map +0 -1
  244. package/lib/interfaces/slider.interface.d.ts.map +0 -1
  245. package/lib/interfaces/snackbar.interface.d.ts.map +0 -1
  246. package/lib/interfaces/switch.interface.d.ts.map +0 -1
  247. package/lib/interfaces/tab.interface.d.ts.map +0 -1
  248. package/lib/interfaces/tabs.interface.d.ts.map +0 -1
  249. package/lib/interfaces/text-field.interface.d.ts.map +0 -1
  250. package/lib/interfaces/tooltip.interface.d.ts.map +0 -1
  251. package/lib/styles/button.style.d.ts.map +0 -1
  252. package/lib/styles/card.style.d.ts.map +0 -1
  253. package/lib/styles/carousel-item.style.d.ts.map +0 -1
  254. package/lib/styles/carousel.style.d.ts.map +0 -1
  255. package/lib/styles/divider.style.d.ts.map +0 -1
  256. package/lib/styles/fab.style.d.ts.map +0 -1
  257. package/lib/styles/icon-button.style.d.ts.map +0 -1
  258. package/lib/styles/index.d.ts.map +0 -1
  259. package/lib/styles/navigation-rail-item.style.d.ts.map +0 -1
  260. package/lib/styles/navigation-rail.style.d.ts.map +0 -1
  261. package/lib/styles/progress-indicator.style.d.ts.map +0 -1
  262. package/lib/styles/slider.style.d.ts.map +0 -1
  263. package/lib/styles/snackbar.style.d.ts.map +0 -1
  264. package/lib/styles/switch.style.d.ts.map +0 -1
  265. package/lib/styles/tab.style.d.ts.map +0 -1
  266. package/lib/styles/tabs.style.d.ts.map +0 -1
  267. package/lib/styles/text-field.style.d.ts.map +0 -1
  268. package/lib/styles/tooltip.style.d.ts.map +0 -1
  269. package/lib/utils/component-helper.d.ts.map +0 -1
  270. package/lib/utils/component.d.ts.map +0 -1
  271. package/lib/utils/index.d.ts.map +0 -1
  272. package/lib/utils/string.d.ts.map +0 -1
  273. package/lib/utils/styles/classnames.d.ts.map +0 -1
  274. package/lib/utils/styles/get-classname.d.ts.map +0 -1
  275. package/lib/utils/styles/index.d.ts.map +0 -1
  276. /package/{LICENSE → dist/LICENSE} +0 -0
  277. /package/{index.d.ts → dist/index.d.ts} +0 -0
  278. /package/{lib → dist/lib}/components/Button.d.ts +0 -0
  279. /package/{lib → dist/lib}/components/Card.d.ts +0 -0
  280. /package/{lib → dist/lib}/components/Carousel.d.ts +0 -0
  281. /package/{lib → dist/lib}/components/CarouselItem.d.ts +0 -0
  282. /package/{lib → dist/lib}/components/Fab.d.ts +0 -0
  283. /package/{lib → dist/lib}/components/IconButton.d.ts +0 -0
  284. /package/{lib → dist/lib}/components/NavigationRail.d.ts +0 -0
  285. /package/{lib → dist/lib}/components/NavigationRailItem.d.ts +0 -0
  286. /package/{lib → dist/lib}/components/ProgressIndicator.d.ts +0 -0
  287. /package/{lib → dist/lib}/components/Slider.d.ts +0 -0
  288. /package/{lib → dist/lib}/components/Snackbar.d.ts +0 -0
  289. /package/{lib → dist/lib}/components/Switch.d.ts +0 -0
  290. /package/{lib → dist/lib}/components/Tab.d.ts +0 -0
  291. /package/{lib → dist/lib}/components/Tabs.d.ts +0 -0
  292. /package/{lib → dist/lib}/components/TextField.d.ts +0 -0
  293. /package/{lib → dist/lib}/components/ToolTip.d.ts +0 -0
  294. /package/{lib → dist/lib}/components/index.d.ts +0 -0
  295. /package/{lib → dist/lib}/effects/SyncedFixedWrapper.d.ts +0 -0
  296. /package/{lib → dist/lib}/effects/custom-scroll/custom-scroll.effect.d.ts +0 -0
  297. /package/{lib → dist/lib}/effects/custom-scroll/custom-scroll.interface.d.ts +0 -0
  298. /package/{lib → dist/lib}/effects/custom-scroll/custom-scroll.style.d.ts +0 -0
  299. /package/{lib → dist/lib}/effects/custom-scroll/index.d.ts +0 -0
  300. /package/{lib → dist/lib}/effects/index.d.ts +0 -0
  301. /package/{lib → dist/lib}/effects/ripple/RippleEffect.d.ts +0 -0
  302. /package/{lib → dist/lib}/effects/ripple/index.d.ts +0 -0
  303. /package/{lib → dist/lib}/effects/smooth-scroll.effect.d.ts +0 -0
  304. /package/{lib → dist/lib}/icon/icon.d.ts +0 -0
  305. /package/{lib → dist/lib}/icon/index.d.ts +0 -0
  306. /package/{lib → dist/lib}/index.d.ts +0 -0
  307. /package/{lib → dist/lib}/interfaces/button.interface.d.ts +0 -0
  308. /package/{lib → dist/lib}/interfaces/card.interface.d.ts +0 -0
  309. /package/{lib → dist/lib}/interfaces/carousel-item.interface.d.ts +0 -0
  310. /package/{lib → dist/lib}/interfaces/carousel.interface.d.ts +0 -0
  311. /package/{lib → dist/lib}/interfaces/divider.interface.d.ts +0 -0
  312. /package/{lib → dist/lib}/interfaces/fab.interface.d.ts +0 -0
  313. /package/{lib → dist/lib}/interfaces/icon-button.interface.d.ts +0 -0
  314. /package/{lib → dist/lib}/interfaces/index.d.ts +0 -0
  315. /package/{lib → dist/lib}/interfaces/navigation-rail-item.interface.d.ts +0 -0
  316. /package/{lib → dist/lib}/interfaces/navigation-rail.interface.d.ts +0 -0
  317. /package/{lib → dist/lib}/interfaces/progress-indicator.interface.d.ts +0 -0
  318. /package/{lib → dist/lib}/interfaces/slider.interface.d.ts +0 -0
  319. /package/{lib → dist/lib}/interfaces/snackbar.interface.d.ts +0 -0
  320. /package/{lib → dist/lib}/interfaces/switch.interface.d.ts +0 -0
  321. /package/{lib → dist/lib}/interfaces/tab.interface.d.ts +0 -0
  322. /package/{lib → dist/lib}/interfaces/text-field.interface.d.ts +0 -0
  323. /package/{lib → dist/lib}/interfaces/tooltip.interface.d.ts +0 -0
  324. /package/{lib → dist/lib}/styles/button.style.d.ts +0 -0
  325. /package/{lib → dist/lib}/styles/card.style.d.ts +0 -0
  326. /package/{lib → dist/lib}/styles/carousel-item.style.d.ts +0 -0
  327. /package/{lib → dist/lib}/styles/carousel.style.d.ts +0 -0
  328. /package/{lib → dist/lib}/styles/divider.style.d.ts +0 -0
  329. /package/{lib → dist/lib}/styles/fab.style.d.ts +0 -0
  330. /package/{lib → dist/lib}/styles/icon-button.style.d.ts +0 -0
  331. /package/{lib → dist/lib}/styles/index.d.ts +0 -0
  332. /package/{lib → dist/lib}/styles/navigation-rail-item.style.d.ts +0 -0
  333. /package/{lib → dist/lib}/styles/navigation-rail.style.d.ts +0 -0
  334. /package/{lib → dist/lib}/styles/progress-indicator.style.d.ts +0 -0
  335. /package/{lib → dist/lib}/styles/slider.style.d.ts +0 -0
  336. /package/{lib → dist/lib}/styles/snackbar.style.d.ts +0 -0
  337. /package/{lib → dist/lib}/styles/switch.style.d.ts +0 -0
  338. /package/{lib → dist/lib}/styles/tab.style.d.ts +0 -0
  339. /package/{lib → dist/lib}/styles/text-field.style.d.ts +0 -0
  340. /package/{lib → dist/lib}/styles/tooltip.style.d.ts +0 -0
  341. /package/{lib → dist/lib}/utils/component-helper.d.ts +0 -0
  342. /package/{lib → dist/lib}/utils/component.d.ts +0 -0
  343. /package/{lib → dist/lib}/utils/index.d.ts +0 -0
  344. /package/{lib → dist/lib}/utils/string.d.ts +0 -0
  345. /package/{lib → dist/lib}/utils/styles/classnames.d.ts +0 -0
  346. /package/{lib → dist/lib}/utils/styles/get-classname.d.ts +0 -0
  347. /package/{lib → dist/lib}/utils/styles/index.d.ts +0 -0
package/dist/index.js ADDED
@@ -0,0 +1,2820 @@
1
+ import { jsx as i, jsxs as P, Fragment as te } from "react/jsx-runtime";
2
+ import { extendTailwindMerge as xe } from "tailwind-merge";
3
+ import W, { useState as S, useEffect as $, useRef as O, useLayoutEffect as ie, isValidElement as we, cloneElement as ve, useMemo as be } from "react";
4
+ import { motion as U, AnimatePresence as z, useScroll as Ne, useMotionValueEvent as oe, motionValue as ue, useTransform as re } from "motion/react";
5
+ import { createPortal as Le } from "react-dom";
6
+ import Ee from "react-textarea-autosize";
7
+ function fe(e) {
8
+ var t, r, n = "";
9
+ if (typeof e == "string" || typeof e == "number") n += e;
10
+ else if (typeof e == "object") if (Array.isArray(e)) {
11
+ var l = e.length;
12
+ for (t = 0; t < l; t++) e[t] && (r = fe(e[t])) && (n && (n += " "), n += r);
13
+ } else for (r in e) e[r] && (n && (n += " "), n += r);
14
+ return n;
15
+ }
16
+ function de() {
17
+ for (var e, t, r = 0, n = "", l = arguments.length; r < l; r++) (e = arguments[r]) && (t = fe(e)) && (n && (n += " "), n += t);
18
+ return n;
19
+ }
20
+ const me = xe({
21
+ override: {
22
+ classGroups: {
23
+ "text-color": [
24
+ {
25
+ text: [
26
+ (e) => !e.startsWith("display-") && !e.startsWith("headline-") && !e.startsWith("title-") && !e.startsWith("body-") && !e.startsWith("label-")
27
+ ]
28
+ }
29
+ ]
30
+ }
31
+ },
32
+ extend: {
33
+ classGroups: {
34
+ font: [
35
+ {
36
+ text: [
37
+ (e) => e.startsWith("display-") || e.startsWith("headline-") || e.startsWith("title-") || e.startsWith("body-") || e.startsWith("label-")
38
+ ]
39
+ }
40
+ ]
41
+ },
42
+ conflictingClassGroups: {
43
+ font: ["font"]
44
+ }
45
+ }
46
+ }), f = (...e) => me(de(e)), Ie = (...e) => me(de(e));
47
+ function ke(e) {
48
+ return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
49
+ }
50
+ const Me = (e) => {
51
+ const t = {};
52
+ e.classNameList.forEach((n) => {
53
+ var l;
54
+ if (n)
55
+ if (typeof n == "string")
56
+ (t[l = e.default] ?? (t[l] = [])).push(n);
57
+ else {
58
+ const c = n(e.states);
59
+ Object.entries(c).map((o) => {
60
+ const [s, d] = o;
61
+ (t[s] ?? (t[s] = [])).push(d);
62
+ });
63
+ }
64
+ });
65
+ const r = t;
66
+ return Object.entries(t).map((n) => {
67
+ let [l, c] = n;
68
+ c = c.reverse(), l == e.default && c.unshift("relative"), c.unshift(ke(l)), r[l] = Ie(...c);
69
+ }), r;
70
+ }, H = (e, t) => (r) => Me({
71
+ classNameList: [r.className, t],
72
+ default: e,
73
+ states: r
74
+ }), Re = H(
75
+ "button",
76
+ ({
77
+ variant: e,
78
+ disabled: t,
79
+ iconPosition: r,
80
+ icon: n,
81
+ loading: l,
82
+ shape: c,
83
+ size: o,
84
+ allowShapeTransformation: s
85
+ }) => ({
86
+ button: f(
87
+ "group flex items-center cursor-pointer",
88
+ o === "xSmall" && "py-2",
89
+ o === "small" && "py-1",
90
+ e === "text" && [
91
+ o === "xSmall" && "-my-2",
92
+ o === "small" && "-my-1"
93
+ ]
94
+ ),
95
+ container: f(
96
+ " relative outline-none overflow-hidden inline-block flex justify-center items-center ",
97
+ o === "xSmall" && "text-label-large px-3 py-1.5 gap-1",
98
+ o === "small" && "text-label-large px-4 py-2.5 gap-2",
99
+ o === "medium" && "text-title-medium px-6 py-4 gap-2",
100
+ o === "large" && "text-headline-small px-12 py-8 gap-3",
101
+ o === "xLarge" && "text-headline-large px-16 py-12 gap-4",
102
+ c === "rounded" && {
103
+ "rounded-[30px]": o === "xSmall" || o == "small",
104
+ "rounded-[40px]": o === "medium",
105
+ "rounded-[70px]": o === "large" || o == "xLarge"
106
+ },
107
+ c === "squared" && {
108
+ "rounded-[12px]": o === "xSmall" || o == "small",
109
+ "rounded-[16px]": o === "medium",
110
+ "rounded-[28px]": o === "large" || o == "xLarge"
111
+ },
112
+ s && !t && {
113
+ "group-active:rounded-[12px]": o === "xSmall" || o == "small",
114
+ "group-active:rounded-[16px]": o === "medium",
115
+ "group-active:rounded-[28px]": o === "large" || o == "xLarge"
116
+ },
117
+ e === "elevated" && {
118
+ "bg-surface-container-low shadow-1 hover:shadow-2": !t
119
+ },
120
+ e === "filled" && {
121
+ "bg-primary hover:shadow-1": !t
122
+ },
123
+ e === "filledTonal" && {
124
+ "bg-secondary-container hover:shadow-1": !t
125
+ },
126
+ e === "outlined" && [
127
+ " border",
128
+ {
129
+ "border-on-surface/[0.12]": t,
130
+ " border-outline focus:border-primary": !t
131
+ }
132
+ ],
133
+ e === "text" && [
134
+ "w-fit",
135
+ {
136
+ "text-primary": !t,
137
+ "text-on-surface/[0.38]": t
138
+ },
139
+ o === "xSmall" && "-mx-3 ",
140
+ o === "small" && "-mx-4 ",
141
+ o === "medium" && "-mx-6 ",
142
+ o === "large" && "-mx-12",
143
+ o === "xLarge" && "-mx-16 "
144
+ // size === 'small' && ' -my-2.5',
145
+ // size === 'medium' && ' -my-4',
146
+ // size === 'large' && '-my-8',
147
+ // size === 'xLarge' && ' -my-12',
148
+ ],
149
+ t && "cursor-default"
150
+ ),
151
+ stateLayer: f(
152
+ "state-layer min-h-full min-w-full absolute top-0 left-0 ",
153
+ e === "elevated" && {
154
+ "bg-on-surface/[0.12]": t,
155
+ "group-state-primary": !t
156
+ },
157
+ e === "filled" && {
158
+ "bg-on-surface/[0.12]": t,
159
+ "group-state-on-primary": !t
160
+ },
161
+ e === "filledTonal" && {
162
+ "bg-on-surface/[0.12]": t,
163
+ "group-state-on-secondary-container ": !t
164
+ },
165
+ e === "outlined" && {
166
+ "group-state-primary group-state-primary": !t
167
+ },
168
+ e === "text" && {
169
+ "group-state-primary": !t
170
+ }
171
+ ),
172
+ label: f(
173
+ { invisible: l },
174
+ e === "elevated" && {
175
+ "text-primary": !t,
176
+ "text-on-surface/[38%]": t
177
+ },
178
+ e === "filled" && {
179
+ "text-on-primary": !t,
180
+ "text-on-surface/[38%]": t
181
+ },
182
+ e === "filledTonal" && {
183
+ "text-on-secondary-container": !t,
184
+ "text-on-surface/[0.38]": t
185
+ },
186
+ e === "outlined" && {
187
+ "text-primary": !t,
188
+ "text-on-surface/[0.38]": t
189
+ },
190
+ e === "text" && {
191
+ "text-primary": !t,
192
+ "text-on-surface/[0.38]": t
193
+ }
194
+ ),
195
+ icon: f(
196
+ { invisible: l },
197
+ o === "xSmall" && "size-5",
198
+ o === "small" && "size-5",
199
+ o === "medium" && "size-6",
200
+ o === "large" && "size-8",
201
+ o === "xLarge" && "size-10",
202
+ e === "elevated" && {
203
+ "text-primary": !t,
204
+ "text-on-surface/[38%]": t
205
+ },
206
+ e === "filled" && {
207
+ "text-on-primary": !t,
208
+ "text-on-surface/[38%]": t
209
+ },
210
+ e === "filledTonal" && {
211
+ "text-on-secondary-container": !t,
212
+ "text-on-surface/[0.38]": t
213
+ },
214
+ e === "outlined" && {
215
+ "text-primary": !t,
216
+ "text-on-surface/[0.38]": t
217
+ },
218
+ e === "text" && {
219
+ "text-primary": !t,
220
+ "text-on-surface/[0.38]": t
221
+ }
222
+ )
223
+ })
224
+ ), Se = H(
225
+ "card",
226
+ ({ variant: e, isInteractive: t }) => ({
227
+ card: f(
228
+ "card group/card rounded-xl overflow-hidden z-10",
229
+ e === "outlined" && "bg-surface",
230
+ e === "elevated" && "bg-surface-container-low shadow-1",
231
+ e === "filled" && "bg-surface-container-highest",
232
+ e !== "filled" && "border border-outline-variant"
233
+ ),
234
+ stateLayer: f([
235
+ "w-full top-0 left-0 h-full absolute -z-10",
236
+ {
237
+ " group-hover/card:hover-state-on-surface group-focus-visible/card:focus-state-on-surface": t
238
+ }
239
+ ])
240
+ })
241
+ ), Ce = H(
242
+ "carouselItem",
243
+ () => ({
244
+ carouselItem: f("rounded-[28px] overflow-hidden flex-none")
245
+ })
246
+ ), Ve = H(
247
+ "carousel",
248
+ () => ({
249
+ carousel: f(["w-full h-[400px]"]),
250
+ track: f(
251
+ "grid grid-flow-col h-full transition-transform ease-out w-fit"
252
+ )
253
+ })
254
+ ), Be = H(
255
+ "divider",
256
+ ({ orientation: e }) => ({
257
+ divider: f(
258
+ "border-outline-variant ",
259
+ {
260
+ "h-fit w-full border-t": e === "horizontal"
261
+ },
262
+ {
263
+ "h-auto self-stretch w-fit border-l": e === "vertical"
264
+ }
265
+ )
266
+ })
267
+ ), De = H(
268
+ "fab",
269
+ ({ size: e, variant: t, isExtended: r }) => ({
270
+ fab: f(
271
+ "flex shadow-3 hover:shadow-4 group overflow-hidden outline-none items-center cursor-pointer",
272
+ {
273
+ "rounded-[12px]": e == "small" && !r,
274
+ "rounded-[16px]": e == "medium" || r,
275
+ "rounded-[28px]": e == "large" && !r
276
+ },
277
+ {
278
+ "p-2": e == "small" && !r,
279
+ "p-4": e == "medium" || r,
280
+ "p-[30px]": e == "large" && !r
281
+ },
282
+ t === "surface" && "bg-surface-container",
283
+ t === "primary" && "bg-primary-container",
284
+ t === "secondary" && "bg-secondary-container",
285
+ t === "tertiary" && "bg-tertiary-container"
286
+ ),
287
+ stateLayer: f(
288
+ "absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",
289
+ t === "surface" && "group-hover:hover-state-primary group-focus:focus-state-primary",
290
+ t === "primary" && "group-hover:hover-state-on-primary-container group-focus-visible:focus-state-on-primary-container",
291
+ t === "secondary" && "group-hover:hover-state-on-secondary-container group-focus-visible:focus-state-on-secondary-container",
292
+ t === "tertiary" && "group-hover:hover-state-on-tertiary-container group-focus-visible:focus-state-on-tertiary-container"
293
+ ),
294
+ icon: f(
295
+ {
296
+ "size-6": e == "small" || e == "medium" || r,
297
+ "size-9": e == "large" && !r
298
+ },
299
+ t === "surface" && "text-primary",
300
+ t === "primary" && "text-on-primary-container",
301
+ t === "secondary" && "text-on-secondary-container",
302
+ t === "tertiary" && "text-on-tertiary-container"
303
+ ),
304
+ label: f(
305
+ "text-title-medium text-nowrap",
306
+ t === "surface" && "text-primary",
307
+ t === "primary" && "text-on-primary-container",
308
+ t === "secondary" && "text-on-secondary-container",
309
+ t === "tertiary" && "text-on-tertiary-container"
310
+ )
311
+ })
312
+ ), $e = H(
313
+ "iconButton",
314
+ ({
315
+ variant: e,
316
+ disabled: t,
317
+ onToggle: r,
318
+ isActive: n,
319
+ size: l,
320
+ width: c,
321
+ shape: o,
322
+ allowShapeTransformation: s
323
+ }) => ({
324
+ iconButton: f(
325
+ "group min-h-12 flex items-center cursor-pointer",
326
+ {
327
+ "cursor-default": t
328
+ }
329
+ ),
330
+ container: f(
331
+ "rounded-full relative flex overflow-hidden transition-all duration-300",
332
+ (o === "rounded" || o === "squared" && r && !t && n && s) && {
333
+ "rounded-[30px]": l === "xSmall" || l == "small",
334
+ "rounded-[40px]": l === "medium",
335
+ "rounded-[70px]": l === "large" || l == "xLarge"
336
+ },
337
+ (o === "squared" || o === "rounded" && r && !t && n && s) && {
338
+ "rounded-[12px]": l === "xSmall" || l == "small",
339
+ "rounded-[16px]": l === "medium",
340
+ "rounded-[28px]": l === "large" || l == "xLarge"
341
+ },
342
+ s && !t && {
343
+ "group-active:rounded-[12px]": l === "xSmall" || l == "small",
344
+ "group-active:rounded-[16px]": l === "medium",
345
+ "group-active:rounded-[28px]": l === "large" || l == "xLarge"
346
+ },
347
+ e === "filled" && [
348
+ !t && {
349
+ "bg-surface-container": !n && !!r,
350
+ "bg-primary": n || !r
351
+ },
352
+ !!t && "bg-on-surface/[0.12]"
353
+ ],
354
+ e === "tonal" && [
355
+ !t && {
356
+ "bg-surface-container": !n && !!r,
357
+ "bg-secondary-container": n || !r
358
+ },
359
+ !!t && "bg-on-surface/[0.12]"
360
+ ],
361
+ e === "outlined" && [
362
+ !t && {
363
+ "border border-outline": !n,
364
+ "border border-transparent bg-inverse-surface": n
365
+ },
366
+ !!t && {
367
+ "border border-on-surface/[0.12]": !n,
368
+ "border border-transparent bg-on-surface/[0.12]": n
369
+ }
370
+ ]
371
+ ),
372
+ stateLayer: f(
373
+ "absolute top-0 left-0 h-full w-full ",
374
+ !t && [
375
+ e === "standard" && {
376
+ "state-on-surface-variant": !n,
377
+ "state-primary": n
378
+ },
379
+ e === "filled" && {
380
+ "state-primary": !n && !!r,
381
+ "state-inverse-on-surface": n || !r
382
+ },
383
+ e === "tonal" && {
384
+ "state-on-surface-variant": !n && !!r,
385
+ "state-on-secondary-container": n || !r
386
+ },
387
+ e === "outlined" && {
388
+ "state-on-surface-variant": !n,
389
+ "state-on-primary": n
390
+ }
391
+ ]
392
+ ),
393
+ icon: f(
394
+ " transition-all duration-300",
395
+ { "size-5 p-1.5": l === "xSmall" },
396
+ { "size-6 p-2": l === "small" },
397
+ { "size-6 p-4": l === "medium" },
398
+ { "size-8 p-8": l === "large" },
399
+ { "size-10 p-12": l === "xLarge" },
400
+ c == "narrow" && [
401
+ { "px-1": l === "xSmall" },
402
+ { "px-1": l === "small" },
403
+ { "px-3": l === "medium" },
404
+ { "px-4": l === "large" },
405
+ { "px-8": l === "xLarge" }
406
+ ],
407
+ c == "wide" && [
408
+ { "px-2.5": l === "xSmall" },
409
+ { "px-3.5": l === "small" },
410
+ { "px-6": l === "medium" },
411
+ { "px-12": l === "large" },
412
+ { "px-[72px]": l === "xLarge" }
413
+ ],
414
+ !t && [
415
+ e === "standard" && {
416
+ "text-on-surface-variant": !n,
417
+ "text-primary": n
418
+ },
419
+ e === "filled" && {
420
+ "text-primary": !n && !!r,
421
+ "text-on-primary": n || !r
422
+ },
423
+ e === "tonal" && {
424
+ "text-on-surface-variant": !n && !!r,
425
+ "text-on-secondary-container": n || !r
426
+ },
427
+ e === "outlined" && {
428
+ "text-on-surface-variant": !n,
429
+ "text-inverse-on-surface": n
430
+ }
431
+ ],
432
+ !!t && "text-on-surface/[0.38]"
433
+ )
434
+ })
435
+ ), We = H(
436
+ "progressIndicator",
437
+ ({ variant: e, isVisible: t }) => ({
438
+ progressIndicator: f(
439
+ (e === "linear-determinate" || e == "linear-indeterminate") && "flex w-full"
440
+ ),
441
+ track: "h-full rounded-full bg-primary rounded-l-full",
442
+ activeIndicator: f(
443
+ (e === "linear-determinate" || e == "linear-indeterminate") && "h-full flex-1 rounded-full bg-primary-container",
444
+ (e === "circular-determinate" || e == "circular-indeterminate") && [
445
+ "stroke-primary fill-transparent ",
446
+ {
447
+ "stroke-[4px]": t,
448
+ "stroke-[0px]": !t
449
+ }
450
+ ]
451
+ ),
452
+ stop: "absolute right-0 bg-primary rounded-full"
453
+ })
454
+ ), Pe = H(
455
+ "slider",
456
+ ({ isChanging: e }) => ({
457
+ slider: f([
458
+ "relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer"
459
+ ]),
460
+ activeTrack: f([
461
+ "h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "
462
+ ]),
463
+ inactiveTrack: f([
464
+ "h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"
465
+ ]),
466
+ handle: f([
467
+ "transform transition-all duration-100 bg-primary h-full rounded-full ",
468
+ { "w-0.5": e, "w-1": !e }
469
+ ]),
470
+ valueIndicator: f([
471
+ "absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"
472
+ ]),
473
+ dot: f([
474
+ "h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"
475
+ ])
476
+ })
477
+ ), Ue = H(
478
+ "snackbar",
479
+ () => ({
480
+ snackbar: f(" rounded bg-inverse-surface "),
481
+ container: f(
482
+ "pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"
483
+ ),
484
+ supportingText: f("text-body-medium text-inverse-on-surface "),
485
+ icon: f(" ml-auto mr-0 text-inverse-on-surface block dark")
486
+ })
487
+ ), je = H(
488
+ "switch",
489
+ ({ isSelected: e, disabled: t, inactiveIcon: r }) => ({
490
+ switch: f(
491
+ "group w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",
492
+ { "bg-on-surface/[0.12] border-transparent": t },
493
+ !t && [
494
+ "cursor-pointer ",
495
+ { "bg-primary border-primary": e },
496
+ { "bg-surface-container border-outline": !e }
497
+ ]
498
+ // { 'justify-start': !isSelected },
499
+ // { 'justify-end': isSelected },
500
+ ),
501
+ handleContainer: f(
502
+ "flex items-center justify-center absolute",
503
+ { "left-[14px]": !e },
504
+ { "right-[14px]": e }
505
+ ),
506
+ handle: f(
507
+ "transition-all duration-100 z-10 rounded-full flex items-center justify-center",
508
+ { "w-[16px] h-[16px]": !e && !r },
509
+ { "w-[24px] h-[24px]": !(!e && !r) },
510
+ !t && [
511
+ "cursor-pointer group-active:h-[28px] group-active:w-[28px]",
512
+ { "bg-on-primary group-hover:bg-primary-container": e },
513
+ { "bg-outline group-hover:bg-on-surface-variant": !e }
514
+ ],
515
+ { "bg-surface": t }
516
+ ),
517
+ handleStateLayer: f(
518
+ "w-[40px] h-[40px] -z-10 rounded-full absolute",
519
+ { "group-state-primary": !t }
520
+ ),
521
+ icon: f(
522
+ "w-[16px] h-[16px]",
523
+ !t && [
524
+ { "text-on-primary-container": e },
525
+ { "text-on-primary": !e }
526
+ ],
527
+ { "text-on-surface/[0.38]": t }
528
+ )
529
+ })
530
+ ), Oe = H(
531
+ "tab",
532
+ ({ isSelected: e, icon: t, label: r, variant: n }) => ({
533
+ tab: f(
534
+ "bg-surface flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",
535
+ { "z-10": e },
536
+ !!(t && r) && n === "primary" && "h-16",
537
+ !(t && r && n === "primary") && "h-12"
538
+ ),
539
+ stateLayer: f(
540
+ "absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",
541
+ n === "primary" && {
542
+ "group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface": !e,
543
+ "group-hover:hover-state-primary group-focus-visible:focus-state-primary": e
544
+ },
545
+ n === "secondary" && "group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface"
546
+ ),
547
+ content: f(
548
+ "flex gap-0.5 h-full justify-center",
549
+ {
550
+ relative: n == "primary"
551
+ },
552
+ {
553
+ "": !!(r && !t)
554
+ },
555
+ n === "primary" && "flex-col items-center",
556
+ n === "secondary" && {
557
+ "flex-col items-center": !(r && t),
558
+ "flex-row items-center gap-2": !!(r && t)
559
+ }
560
+ ),
561
+ icon: f(
562
+ "h-6 w-6 p-0.5 !box-border",
563
+ n === "primary" && {
564
+ "text-on-surface-variant": !e,
565
+ "text-primary": e
566
+ },
567
+ n === "secondary" && {
568
+ "text-on-surface-variant": !e,
569
+ "text-on-surface": e
570
+ }
571
+ ),
572
+ label: f(
573
+ "text-title-small text-nowrap",
574
+ n === "primary" && {
575
+ "text-on-surface-variant": !e,
576
+ "text-primary": e
577
+ },
578
+ n === "secondary" && {
579
+ "text-on-surface-variant": !e,
580
+ "text-on-surface": e
581
+ }
582
+ ),
583
+ underline: f(
584
+ "bg-primary absolute w-full left-0 bottom-0",
585
+ n === "primary" && "h-[3px] rounded-t",
586
+ n === "secondary" && "h-0.5"
587
+ )
588
+ })
589
+ ), Xe = H(
590
+ "tabs",
591
+ ({ scrollable: e }) => ({
592
+ tabs: f(
593
+ "border-b border-surface-container-highest",
594
+ "flex relative ",
595
+ { "overflow-x-auto": e }
596
+ )
597
+ })
598
+ ), Fe = H(
599
+ "textField",
600
+ ({
601
+ disabled: e,
602
+ leadingIcon: t,
603
+ trailingIcon: r,
604
+ variant: n,
605
+ errorText: l,
606
+ isFocused: c,
607
+ value: o,
608
+ suffix: s,
609
+ textLine: d
610
+ }) => ({
611
+ textField: f({
612
+ "opacity-[.38]": e
613
+ }),
614
+ content: f(
615
+ "group transition-border duration-200 relative flex items-center ",
616
+ { "h-14": d == "singleLine" },
617
+ {
618
+ "border-on-surface-variant": !(l != null && l.length) && !c && n == "filled",
619
+ "border-outline": !(l != null && l.length) && !c && n == "outlined",
620
+ "border-primary": !(l != null && l.length) && c,
621
+ "border-error": !!(l != null && l.length)
622
+ },
623
+ { "bg-on-surface/[0.04]": e },
624
+ n == "filled" && [
625
+ "rounded-t overflow-hidden border-b",
626
+ { "bg-surface-container-highest": !e }
627
+ ],
628
+ n == "outlined" && [
629
+ "border rounded box-border",
630
+ {
631
+ "border-[3px]": c
632
+ }
633
+ ]
634
+ ),
635
+ stateLayer: f(
636
+ "absolute -z-10 w-full h-full top-0 left-0",
637
+ {
638
+ hidden: n == "outlined"
639
+ },
640
+ {
641
+ "group-state-on-surface": !e,
642
+ "focus-state-on-surface": c
643
+ }
644
+ ),
645
+ label: f(
646
+ "inline-flex outline-none whitespace-nowrap",
647
+ { "text-on-surface-variant": !e && !(l != null && l.length) },
648
+ { "text-on-surface": e },
649
+ { "text-error": !!(l != null && l.length) },
650
+ { "text-primary": !(l != null && l.length) && c }
651
+ ),
652
+ input: f(
653
+ "w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",
654
+ {
655
+ " text-on-surface placeholder:text-on-surface-variant": !e,
656
+ "placeholder:text-on-surface text-on-surface": e
657
+ },
658
+ {
659
+ "pr-0": !!s
660
+ },
661
+ n == "filled" && " pb-2 pt-6",
662
+ n == "outlined" && "py-4 relative z-10"
663
+ ),
664
+ activeIndicator: f(
665
+ "absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",
666
+ n == "filled" && [
667
+ "h-[2px] transition-all duration-300",
668
+ { "bg-primary": !(l != null && l.length) },
669
+ { "bg-error": !!(l != null && l.length) },
670
+ { "!w-full": c }
671
+ ]
672
+ ),
673
+ supportingText: f(
674
+ " text-body-small px-4 pt-1",
675
+ { "text-on-surface-variant": !e && !(l != null && l.length) },
676
+ { "text-on-surface": e },
677
+ { "!w-full": c },
678
+ { "text-error": !!(l != null && l.length) }
679
+ ),
680
+ leadingIcon: f([
681
+ "h-12 ml-3 flex items-center justify-center",
682
+ { "cursor-text": !W.isValidElement(t) }
683
+ ]),
684
+ trailingIcon: f("h-12 w-12 flex items-center justify-center", {
685
+ "cursor-text": !W.isValidElement(r)
686
+ }),
687
+ suffix: f(
688
+ "text-on-surface-variant pl-0 pr-4",
689
+ n == "filled" && " pb-2 pt-6",
690
+ n == "outlined" && "py-4 relative z-10"
691
+ )
692
+ })
693
+ ), Ke = H(
694
+ "toolTip",
695
+ ({ position: e, variant: t }) => ({
696
+ toolTip: f(
697
+ " pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",
698
+ {
699
+ "bottom-full left-1/2 -translate-x-1/2": e == "top",
700
+ "top-full left-1/2 -translate-x-1/2": e == "bottom",
701
+ "right-full top-1/2 -translate-y-1/2": e == "left",
702
+ "left-full top-1/2 -translate-y-1/2": e == "right",
703
+ "bottom-full right-full": e == "top-left",
704
+ "bottom-full left-full": e == "top-right",
705
+ "top-full right-full": e == "bottom-left",
706
+ "top-full left-full": e == "bottom-right"
707
+ }
708
+ ),
709
+ container: f(
710
+ "pb-2",
711
+ t == "rich" && "bg-surface-container rounded-2xl text-on-surface-container px-4 pt-3 shadow-2",
712
+ t == "plain" && "bg-inverse-surface rounded text-inverse-on-surface px-2 py-1"
713
+ ),
714
+ actions: f(
715
+ "flex gap-10 px-1 mt-2",
716
+ t == "plain" && "hidden"
717
+ ),
718
+ subHead: f(
719
+ "text-title-small mb-1",
720
+ t == "plain" && "hidden"
721
+ ),
722
+ supportingText: f("")
723
+ })
724
+ ), J = ({ icon: e, colors: t = [], className: r }) => {
725
+ const { icon: n } = e, [l, c, , , o] = n || [], s = (d) => {
726
+ switch (d.length) {
727
+ case 2:
728
+ return {
729
+ "--fa-primary-color": d[0] || "inherit",
730
+ "--fa-secondary-color": d[1] || "inherit"
731
+ };
732
+ case 1:
733
+ return { color: d[0] };
734
+ default:
735
+ return {};
736
+ }
737
+ };
738
+ return /* @__PURE__ */ i(
739
+ "svg",
740
+ {
741
+ className: f("size-5 box-content", r),
742
+ style: {
743
+ ...s(t)
744
+ },
745
+ xmlns: "http://www.w3.org/2000/svg",
746
+ viewBox: `0 0 ${l} ${c}`,
747
+ role: "img",
748
+ "aria-hidden": "true",
749
+ children: typeof o == "string" ? /* @__PURE__ */ i("path", { className: "fill-current", d: o }) : o.map((d, u) => /* @__PURE__ */ i("path", { d }, u))
750
+ }
751
+ );
752
+ }, Ge = ({
753
+ variant: e = "linear-determinate",
754
+ minHeight: t = 4,
755
+ value: r = 0,
756
+ transitionDuration: n = 1e3,
757
+ className: l,
758
+ ...c
759
+ }) => {
760
+ const [o, s] = S(r), [d, u] = S(1.5);
761
+ $(() => {
762
+ r > 100 && (r = 100), r < 0 && (r = 0), s(r);
763
+ }, [r]);
764
+ const [p, w] = S(!0), a = () => p ? d : d * 0.5;
765
+ $(() => {
766
+ if ((e === "circular-indeterminate" || e === "linear-indeterminate") && o !== 100) {
767
+ const L = setInterval(() => {
768
+ s(p ? 10 : 90), w(!p);
769
+ }, a() * 1e3);
770
+ return () => clearInterval(L);
771
+ }
772
+ }, [e, p, o]);
773
+ const [y, v] = S(!1);
774
+ $(() => {
775
+ if (o >= 100) {
776
+ const L = setTimeout(() => {
777
+ v(!1);
778
+ }, n);
779
+ return () => {
780
+ clearTimeout(L);
781
+ };
782
+ } else
783
+ v(!0);
784
+ }, [o, n]);
785
+ const b = We({
786
+ className: l,
787
+ variant: e,
788
+ value: r,
789
+ transitionDuration: n,
790
+ isVisible: y,
791
+ minHeight: t
792
+ });
793
+ return /* @__PURE__ */ P(te, { children: [
794
+ (e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ P(
795
+ "div",
796
+ {
797
+ style: { height: `${t}px` },
798
+ className: b.progressIndicator,
799
+ ...c,
800
+ children: [
801
+ /* @__PURE__ */ i(
802
+ "div",
803
+ {
804
+ style: {
805
+ height: y ? `${t}px` : "0px",
806
+ width: `${o}%`,
807
+ transition: `width 1ms ease-in-out ${o == 100 ? ", height 200ms 0.5s ease-in-out" : ""}`
808
+ },
809
+ className: b.track
810
+ }
811
+ ),
812
+ /* @__PURE__ */ i(
813
+ "div",
814
+ {
815
+ style: {
816
+ height: y ? `${t}px` : "0px",
817
+ marginLeft: o != 100 ? "6px" : "0px",
818
+ transition: `width ${n}ms ease-in-out ${o == 100 ? `, height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n / 1.5}ms` : ""}`
819
+ },
820
+ className: b.activeIndicator
821
+ }
822
+ ),
823
+ /* @__PURE__ */ i(
824
+ "div",
825
+ {
826
+ style: {
827
+ height: y ? `${t}px` : "0px",
828
+ width: `${t}px`,
829
+ transition: `width ${n}ms ease-in-out, height 200ms 0.5s ease-in-out`
830
+ },
831
+ className: b.stop
832
+ }
833
+ )
834
+ ]
835
+ }
836
+ ),
837
+ (e === "circular-determinate" || e == "circular-indeterminate") && /* @__PURE__ */ i(
838
+ U.svg,
839
+ {
840
+ width: "48",
841
+ height: "48",
842
+ viewBox: "0 0 48 48",
843
+ initial: { rotate: -90 },
844
+ animate: { rotate: 270 },
845
+ transition: {
846
+ repeat: 1 / 0,
847
+ duration: a(),
848
+ ease: "linear"
849
+ },
850
+ className: b.progressIndicator,
851
+ ...c,
852
+ children: /* @__PURE__ */ i(
853
+ U.circle,
854
+ {
855
+ cx: "50%",
856
+ cy: "50%",
857
+ r: y ? "calc(50% - 2px)" : "50%",
858
+ style: {
859
+ strokeLinecap: "round"
860
+ },
861
+ initial: "hidden",
862
+ animate: "visible",
863
+ className: b.activeIndicator,
864
+ variants: {
865
+ hidden: {
866
+ pathLength: p ? 10 / 100 : 90 / 100
867
+ },
868
+ visible: {
869
+ pathLength: p ? 90 / 100 : 10 / 100
870
+ }
871
+ },
872
+ transition: {
873
+ pathLength: {
874
+ type: "tween",
875
+ ease: "linear",
876
+ duration: a(),
877
+ bounce: 0
878
+ }
879
+ }
880
+ }
881
+ )
882
+ },
883
+ p + ""
884
+ )
885
+ ] });
886
+ }, ne = ({
887
+ colorName: e = "on-surface",
888
+ triggerRef: t
889
+ }) => {
890
+ const r = {
891
+ initial: {
892
+ opacity: 0,
893
+ borderRadius: "50%",
894
+ width: "25%",
895
+ height: "25%"
896
+ },
897
+ animate: {
898
+ opacity: 1,
899
+ borderRadius: 0,
900
+ width: "200%",
901
+ height: "200%",
902
+ transition: {
903
+ duration: 0.3,
904
+ borderRadius: { duration: 0.3, delay: 0.3 }
905
+ }
906
+ }
907
+ }, [n, l] = S(!0), [c, o] = S(!1), [s, d] = S({ x: 0, y: 0 });
908
+ $(() => {
909
+ c && (l(!0), l(!1));
910
+ }, [c]), $(() => {
911
+ const a = t == null ? void 0 : t.current;
912
+ if (a)
913
+ return a.addEventListener("mousedown", u), a.addEventListener("mouseup", w), a.addEventListener("mouseleave", p), () => {
914
+ a.removeEventListener("mousedown", u), a.removeEventListener("mouseup", w), a.removeEventListener("mouseleave", p);
915
+ };
916
+ }, [t]);
917
+ const u = (a) => {
918
+ const y = t == null ? void 0 : t.current, v = y.getBoundingClientRect();
919
+ o(!0), d({
920
+ x: (a.clientX - v.left) / y.clientWidth * 100,
921
+ y: (a.clientY - v.top) / y.clientHeight * 100
922
+ });
923
+ }, p = (a) => {
924
+ o(!1);
925
+ }, w = (a) => {
926
+ o(!1);
927
+ };
928
+ return /* @__PURE__ */ i(z, { mode: "wait", children: (c || !c && !n) && /* @__PURE__ */ i(
929
+ U.div,
930
+ {
931
+ style: {
932
+ position: "absolute",
933
+ width: "100%",
934
+ height: "100%",
935
+ top: s.y + "%",
936
+ left: s.x + "%",
937
+ background: `color-mix(in srgb, var(--color-${e}) 12%, transparent)`,
938
+ pointerEvents: "none"
939
+ },
940
+ variants: r,
941
+ initial: "initial",
942
+ animate: "animate",
943
+ exit: { opacity: 0, transition: { duration: 0 } },
944
+ onAnimationComplete: () => l(!0),
945
+ className: "transform -translate-x-1/2 -translate-y-1/2"
946
+ }
947
+ ) });
948
+ };
949
+ function qe(e, t, r) {
950
+ var n = {}, l = n.noTrailing, c = l === void 0 ? !1 : l, o = n.noLeading, s = o === void 0 ? !1 : o, d = n.debounceMode, u = d === void 0 ? void 0 : d, p, w = !1, a = 0;
951
+ function y() {
952
+ p && clearTimeout(p);
953
+ }
954
+ function v(L) {
955
+ var E = L || {}, m = E.upcomingOnly, N = m === void 0 ? !1 : m;
956
+ y(), w = !N;
957
+ }
958
+ function b() {
959
+ for (var L = arguments.length, E = new Array(L), m = 0; m < L; m++)
960
+ E[m] = arguments[m];
961
+ var N = this, I = Date.now() - a;
962
+ if (w)
963
+ return;
964
+ function k() {
965
+ a = Date.now(), t.apply(N, E);
966
+ }
967
+ function C() {
968
+ p = void 0;
969
+ }
970
+ !s && u && !p && k(), y(), u === void 0 && I > e ? s ? (a = Date.now(), c || (p = setTimeout(u ? C : k, e))) : k() : c !== !0 && (p = setTimeout(u ? C : k, u === void 0 ? e - I : e));
971
+ }
972
+ return b.cancel = v, b;
973
+ }
974
+ const He = H(
975
+ "customScroll",
976
+ ({ orientation: e, draggable: t, isDragging: r }) => ({
977
+ customScroll: f(
978
+ "flex h-full w-full",
979
+ t && [
980
+ "[&::-webkit-scrollbar-track]:rounded-full",
981
+ "[&::-webkit-scrollbar-track]:bg-transparent",
982
+ "[&::-webkit-scrollbar-thumb]:rounded-full",
983
+ {
984
+ "[&::-webkit-scrollbar-thumb]:bg-outline": r,
985
+ "[&::-webkit-scrollbar-thumb]:bg-transparent": !r
986
+ },
987
+ { "[&::-webkit-scrollbar]:h-2": e === "horizontal" },
988
+ { "[&::-webkit-scrollbar]:w-2": e === "vertical" }
989
+ ],
990
+ {
991
+ "overflow-y-scroll flex-col": e === "vertical",
992
+ "overflow-x-scroll flex-row": e === "horizontal",
993
+ "cursor-grab": t && !r,
994
+ "cursor-grabbing": t && r
995
+ }
996
+ ),
997
+ track: f("overflow-hidden flex-none sticky", {
998
+ "left-0 h-full": e === "horizontal",
999
+ "top-0 w-full": e === "vertical"
1000
+ })
1001
+ })
1002
+ ), pe = ({
1003
+ children: e,
1004
+ orientation: t = "vertical",
1005
+ scrollSize: r,
1006
+ onScroll: n,
1007
+ className: l,
1008
+ draggable: c = !1,
1009
+ throttleDuration: o = 75
1010
+ }) => {
1011
+ var V, X;
1012
+ const s = O(null), d = O(null), [u, p] = S({
1013
+ width: null,
1014
+ height: null
1015
+ });
1016
+ $(() => {
1017
+ if (!s.current) return;
1018
+ const M = new ResizeObserver((F) => {
1019
+ for (const K of F)
1020
+ K.target === s.current && p({
1021
+ width: K.contentRect.width,
1022
+ height: K.contentRect.height
1023
+ // On observe aussi la hauteur maintenant
1024
+ });
1025
+ });
1026
+ return M.observe(s.current), () => {
1027
+ M.disconnect();
1028
+ };
1029
+ }, [s]);
1030
+ const w = O(null), a = O(null), y = () => {
1031
+ const M = d.current;
1032
+ return M ? {
1033
+ width: r ?? M.scrollWidth,
1034
+ height: r ?? M.scrollHeight
1035
+ } : null;
1036
+ }, v = () => {
1037
+ const M = s.current;
1038
+ return M ? {
1039
+ width: M.clientWidth,
1040
+ height: M.clientHeight
1041
+ // Correction ici pour retourner la bonne hauteur
1042
+ } : null;
1043
+ }, { scrollYProgress: b, scrollXProgress: L } = Ne({
1044
+ container: s
1045
+ }), E = O(null);
1046
+ E.current || (E.current = qe(
1047
+ o,
1048
+ (M, F) => {
1049
+ !a.current || !w.current || n && (t === "horizontal" && F === "x" && n({
1050
+ scrollProgress: M,
1051
+ scroll: M * w.current.width,
1052
+ scrollTotal: w.current.width,
1053
+ scrollVisible: a.current.width
1054
+ }), t === "vertical" && F === "y" && n({
1055
+ scrollProgress: M,
1056
+ scroll: M * w.current.height,
1057
+ scrollTotal: w.current.height,
1058
+ scrollVisible: a.current.height
1059
+ }));
1060
+ }
1061
+ ));
1062
+ const m = (M, F) => {
1063
+ E.current && E.current(M, F);
1064
+ };
1065
+ $(() => {
1066
+ u.width && m(L.get(), "x"), u.height && m(b.get(), "y");
1067
+ }, [u]), oe(L, "change", (M) => {
1068
+ m(M, "x");
1069
+ }), oe(b, "change", (M) => {
1070
+ m(M, "y");
1071
+ });
1072
+ const [N, I] = S(!1);
1073
+ ie(() => {
1074
+ N || !a.current || !w.current || !n || (n({
1075
+ scrollProgress: 0,
1076
+ scroll: 0,
1077
+ scrollTotal: t == "vertical" ? w.current.height : w.current.width,
1078
+ scrollVisible: t == "vertical" ? a.current.height : a.current.width
1079
+ }), I(!0));
1080
+ }, [a, w, n]), w.current = y(), a.current = v();
1081
+ const [k, C] = S(!1), B = He({
1082
+ isDragging: k,
1083
+ children: e,
1084
+ className: l,
1085
+ onScroll: n,
1086
+ orientation: t,
1087
+ scrollSize: r,
1088
+ draggable: c,
1089
+ throttleDuration: o
1090
+ }), [D, R] = S(0), [h, j] = S(0), A = (M) => {
1091
+ if (!c) return;
1092
+ const F = s.current;
1093
+ if (!F || D == null) return;
1094
+ const Z = (M.pageX - F.offsetLeft - D) * 1.5;
1095
+ F.scrollLeft = h - Z;
1096
+ }, q = (M) => {
1097
+ const F = s.current;
1098
+ F && (C(!0), R(M.pageX - F.offsetLeft), j(F.scrollLeft));
1099
+ }, Y = (M) => {
1100
+ k && (M.preventDefault(), A(M));
1101
+ }, G = () => {
1102
+ C(!1);
1103
+ }, Q = () => {
1104
+ C(!1);
1105
+ }, x = (M) => {
1106
+ M.preventDefault();
1107
+ }, g = O(null);
1108
+ return $(() => () => {
1109
+ g.current && clearTimeout(g.current);
1110
+ }, []), /* @__PURE__ */ P(
1111
+ "div",
1112
+ {
1113
+ className: B.customScroll,
1114
+ ref: s,
1115
+ onMouseDown: q,
1116
+ onMouseMove: Y,
1117
+ onMouseUp: G,
1118
+ onMouseLeave: Q,
1119
+ onDragStart: x,
1120
+ onScroll: (M) => {
1121
+ k || (R(null), C(!0), g.current && clearTimeout(g.current), g.current = setTimeout(() => {
1122
+ C(!1);
1123
+ }, 1e3));
1124
+ },
1125
+ children: [
1126
+ /* @__PURE__ */ i(
1127
+ "div",
1128
+ {
1129
+ ref: d,
1130
+ style: t === "vertical" ? { height: ((V = a == null ? void 0 : a.current) == null ? void 0 : V.height) ?? "100%" } : { width: ((X = a == null ? void 0 : a.current) == null ? void 0 : X.width) ?? "100%" },
1131
+ className: B.track,
1132
+ children: e
1133
+ }
1134
+ ),
1135
+ a.current && w.current && /* @__PURE__ */ P(te, { children: [
1136
+ t === "vertical" && w.current.height > a.current.height && /* @__PURE__ */ i(
1137
+ U.div,
1138
+ {
1139
+ className: "flex-none",
1140
+ style: {
1141
+ height: w.current.height - a.current.height
1142
+ }
1143
+ }
1144
+ ),
1145
+ t === "horizontal" && w.current.width > a.current.width && /* @__PURE__ */ i(
1146
+ U.div,
1147
+ {
1148
+ className: "flex-none",
1149
+ style: {
1150
+ width: w.current.width - a.current.width
1151
+ }
1152
+ }
1153
+ )
1154
+ ] })
1155
+ ]
1156
+ }
1157
+ );
1158
+ }, mt = ({
1159
+ children: e,
1160
+ transition: t = ".5s",
1161
+ orientation: r = "vertical",
1162
+ throttleDuration: n = 25,
1163
+ ...l
1164
+ }) => {
1165
+ const [c, o] = S(null), s = ue((c == null ? void 0 : c.scrollProgress) ?? 0), d = re(
1166
+ s,
1167
+ [0, 1],
1168
+ [0, 1 - ((c == null ? void 0 : c.scrollVisible) ?? 0) / ((c == null ? void 0 : c.scrollTotal) ?? 0)]
1169
+ ), u = re(
1170
+ d,
1171
+ (a) => `${-a * 100}%`
1172
+ ), p = (a) => {
1173
+ s.set(a.scrollProgress), a.scrollTotal > 0 && o(a);
1174
+ }, w = O(null);
1175
+ return oe(u, "change", (a) => {
1176
+ const y = performance.now();
1177
+ if (w.current !== null) {
1178
+ const v = y - w.current;
1179
+ console.log(`Delta temps : ${v} ms`);
1180
+ }
1181
+ w.current = y, console.log(a);
1182
+ }), /* @__PURE__ */ i(
1183
+ pe,
1184
+ {
1185
+ onScroll: p,
1186
+ throttleDuration: n,
1187
+ ...l,
1188
+ children: /* @__PURE__ */ i(
1189
+ U.div,
1190
+ {
1191
+ className: f("transition-transform ease-out", {
1192
+ "w-fit h-full": r === "horizontal",
1193
+ "h-fit w-full": r === "vertical"
1194
+ }),
1195
+ style: {
1196
+ transitionDuration: t,
1197
+ ...r == "vertical" ? { y: u } : { x: u }
1198
+ },
1199
+ children: e
1200
+ }
1201
+ )
1202
+ }
1203
+ );
1204
+ }, _e = ({
1205
+ targetRef: e,
1206
+ children: t
1207
+ }) => {
1208
+ const [r, n] = S(null), l = O(null), c = () => {
1209
+ const o = e.current;
1210
+ if (!o) return;
1211
+ const s = o.getBoundingClientRect();
1212
+ console.log(o), n({
1213
+ position: "fixed",
1214
+ top: s.top,
1215
+ left: s.left,
1216
+ width: s.width,
1217
+ height: s.height,
1218
+ pointerEvents: "none",
1219
+ // si le wrapper ne doit pas capter les events
1220
+ zIndex: 999
1221
+ // personnalise si besoin
1222
+ });
1223
+ };
1224
+ return $(() => {
1225
+ const o = e.current;
1226
+ if (o)
1227
+ return c(), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), l.current = new ResizeObserver(c), l.current.observe(o), () => {
1228
+ var s;
1229
+ window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c), (s = l.current) == null || s.disconnect();
1230
+ };
1231
+ }, [e]), r ? Le(/* @__PURE__ */ i("div", { style: r, children: t }), document.body) : null;
1232
+ }, Ae = ({
1233
+ variant: e = "filled",
1234
+ disabled: t = !1,
1235
+ icon: r,
1236
+ href: n,
1237
+ label: l,
1238
+ className: c,
1239
+ iconPosition: o = "left",
1240
+ loading: s = !1,
1241
+ shape: d = "rounded",
1242
+ onClick: u,
1243
+ ref: p,
1244
+ size: w = "medium",
1245
+ allowShapeTransformation: a = !0,
1246
+ transition: y,
1247
+ ...v
1248
+ }) => {
1249
+ const b = n ? "a" : "button", L = O(null), E = p || L, m = Re({
1250
+ allowShapeTransformation: a,
1251
+ size: w,
1252
+ shape: d,
1253
+ href: n,
1254
+ disabled: t,
1255
+ icon: r,
1256
+ iconPosition: o,
1257
+ label: l,
1258
+ loading: s,
1259
+ variant: e,
1260
+ transition: y,
1261
+ className: c
1262
+ }), N = r ? /* @__PURE__ */ i(J, { icon: r, className: m.icon }) : /* @__PURE__ */ i(te, {});
1263
+ return y = { duration: 0.3, ...y }, /* @__PURE__ */ i(
1264
+ b,
1265
+ {
1266
+ ref: E,
1267
+ href: n,
1268
+ className: m.button,
1269
+ ...v,
1270
+ onClick: (I) => {
1271
+ t ? I.preventDefault() : u && u(I);
1272
+ },
1273
+ disabled: t,
1274
+ children: /* @__PURE__ */ P(
1275
+ "div",
1276
+ {
1277
+ className: m.container,
1278
+ style: { transition: y.duration + "s" },
1279
+ children: [
1280
+ /* @__PURE__ */ i("div", { className: m.stateLayer, children: !t && /* @__PURE__ */ i(
1281
+ ne,
1282
+ {
1283
+ colorName: e === "elevated" && "primary" || e === "filled" && "on-primary" || e === "filledTonal" && "on-secondary-container" || e === "outlined" && "primary" || e === "text" && "primary" || "",
1284
+ triggerRef: E
1285
+ }
1286
+ ) }),
1287
+ o === "left" && N,
1288
+ s && /* @__PURE__ */ i(
1289
+ "div",
1290
+ {
1291
+ className: "!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",
1292
+ children: /* @__PURE__ */ i(
1293
+ Ge,
1294
+ {
1295
+ className: () => ({
1296
+ progressIndicator: "h-6 w-6",
1297
+ activeIndicator: f(
1298
+ {
1299
+ "!stroke-primary": e === "elevated" && !t,
1300
+ "!stroke-on-surface/[38%]": e === "elevated" && t
1301
+ },
1302
+ {
1303
+ "!stroke-on-primary": e === "filled" && !t,
1304
+ "!stroke-on-surface/[38%]": e === "filled" && t
1305
+ },
1306
+ {
1307
+ "!stroke-on-secondary-container": e === "filledTonal" && !t,
1308
+ "!stroke-on-surface/[38%]": e === "filledTonal" && t
1309
+ },
1310
+ {
1311
+ "!stroke-primary": e === "outlined" && !t,
1312
+ "!stroke-on-surface/[38%]": e === "outlined" && t
1313
+ },
1314
+ {
1315
+ "!stroke-primary": e === "text" && !t,
1316
+ "!stroke-on-surface/[38%]": e === "text" && t
1317
+ }
1318
+ )
1319
+ }),
1320
+ variant: "circular-indeterminate"
1321
+ }
1322
+ )
1323
+ }
1324
+ ),
1325
+ /* @__PURE__ */ i("span", { className: m.label, children: l }),
1326
+ o === "right" && N
1327
+ ]
1328
+ }
1329
+ )
1330
+ }
1331
+ );
1332
+ }, pt = ({
1333
+ variant: e = "outlined",
1334
+ className: t,
1335
+ children: r,
1336
+ isInteractive: n = !1,
1337
+ ref: l,
1338
+ ...c
1339
+ }) => {
1340
+ const o = Se({ className: t, isInteractive: n, variant: e }), s = O(null), d = l || s;
1341
+ return /* @__PURE__ */ P("div", { ...c, ref: d, className: o.card, children: [
1342
+ /* @__PURE__ */ i("div", { className: o.stateLayer, children: n && /* @__PURE__ */ i(ne, { colorName: "on-surface", triggerRef: d }) }),
1343
+ r
1344
+ ] });
1345
+ }, Ye = (e, t, r = [0, 1]) => {
1346
+ const [n, l] = t, [c, o] = r, d = (Math.max(n, Math.min(e, l)) - n) / (l - n);
1347
+ return c + d * (o - c);
1348
+ }, Ze = ({
1349
+ className: e,
1350
+ children: t,
1351
+ width: r = 1,
1352
+ index: n = 0,
1353
+ ref: l,
1354
+ ...c
1355
+ }) => {
1356
+ const o = O(null), s = l || o, d = Ce({
1357
+ className: e,
1358
+ index: n,
1359
+ width: r,
1360
+ children: t
1361
+ });
1362
+ return /* @__PURE__ */ i(
1363
+ U.div,
1364
+ {
1365
+ ref: s,
1366
+ animate: { width: r + "px" },
1367
+ transition: {
1368
+ duration: 0.5,
1369
+ ease: "linear"
1370
+ },
1371
+ className: d.carouselItem,
1372
+ ...c,
1373
+ children: t
1374
+ }
1375
+ );
1376
+ }, ht = ({
1377
+ variant: e = "hero",
1378
+ className: t,
1379
+ children: r,
1380
+ ref: n,
1381
+ marginPourcent: l = 0,
1382
+ inputRange: c = [0.21, 0.65],
1383
+ outputRange: o = [42, 300],
1384
+ gap: s = 8,
1385
+ onChange: d,
1386
+ scrollSensitivity: u = 1.25,
1387
+ ...p
1388
+ }) => {
1389
+ var G, Q;
1390
+ const w = O(null), a = n || w, y = Ve({
1391
+ className: t,
1392
+ children: r,
1393
+ variant: e,
1394
+ inputRange: c,
1395
+ outputRange: o,
1396
+ marginPourcent: l,
1397
+ onChange: d,
1398
+ gap: s,
1399
+ scrollSensitivity: u
1400
+ }), v = W.Children.toArray(r).filter(
1401
+ (x) => W.isValidElement(x) && x.type === Ze
1402
+ ), b = O(null), [L, E] = S([]), [m, N] = S(null), I = () => {
1403
+ var F;
1404
+ if (!b.current || !a.current || !m) return [];
1405
+ const { scrollVisible: x, scrollProgress: g } = m;
1406
+ function V(K, Z) {
1407
+ return K.map(
1408
+ (T) => (T - Z) / Math.abs(K[1] - K[0])
1409
+ );
1410
+ }
1411
+ let X = v.map((K, Z) => {
1412
+ if (!k[Z].current || !b.current) return 0;
1413
+ let ee = Z / (v.length - 1);
1414
+ return ee > 1 && (ee = 1), ee < 0 && (ee = 0), ee;
1415
+ });
1416
+ X = V(X, g);
1417
+ let M = ((((F = a.current) == null ? void 0 : F.clientWidth) ?? x) - (o[0] + s)) / (o[1] + s);
1418
+ return X.map((K, Z) => ({ value: Math.abs(K), originalIndex: Z })).sort((K, Z) => K.value - Z.value).forEach((K, Z) => {
1419
+ Z === 0 && B(K.originalIndex);
1420
+ let T = Ye(M, [0, 1], [0, o[1]]);
1421
+ T < o[0] && (T = o[0]), M--, X[K.originalIndex] = T;
1422
+ }), X;
1423
+ }, k = O([]).current, [C, B] = S(0);
1424
+ $(() => {
1425
+ d && d(C);
1426
+ }, [C]), k.length !== v.length && v.forEach((x, g) => {
1427
+ k[g] || (k[g] = W.createRef());
1428
+ });
1429
+ const D = v.map((x, g) => W.cloneElement(
1430
+ x,
1431
+ {
1432
+ width: L[g],
1433
+ ref: k[g],
1434
+ key: g,
1435
+ index: g
1436
+ }
1437
+ )), R = ue((m == null ? void 0 : m.scrollProgress) ?? 0), h = re(
1438
+ R,
1439
+ [0, 1],
1440
+ [
1441
+ 0,
1442
+ 1 - (((G = a.current) == null ? void 0 : G.clientWidth) ?? 0) / (((Q = b == null ? void 0 : b.current) == null ? void 0 : Q.clientWidth) ?? 0)
1443
+ ]
1444
+ ), j = re(
1445
+ h,
1446
+ (x) => `${-x * 100}%`
1447
+ ), A = (x) => {
1448
+ x.scrollTotal > 0 && N(x);
1449
+ };
1450
+ $(() => {
1451
+ const x = I();
1452
+ E(x);
1453
+ }, [m]);
1454
+ const [q, Y] = S(0);
1455
+ return ie(() => {
1456
+ let x = o[1];
1457
+ m && x > m.scrollVisible && (x = m.scrollVisible);
1458
+ const g = (x + s) * D.length / u;
1459
+ Y(g);
1460
+ }, [a, k, m]), /* @__PURE__ */ i("div", { className: y.carousel, ref: a, ...p, children: /* @__PURE__ */ i(
1461
+ pe,
1462
+ {
1463
+ draggable: !0,
1464
+ orientation: "horizontal",
1465
+ onScroll: A,
1466
+ scrollSize: q,
1467
+ children: /* @__PURE__ */ i(
1468
+ U.div,
1469
+ {
1470
+ className: y.track,
1471
+ ref: b,
1472
+ style: {
1473
+ transitionDuration: "0.5s",
1474
+ transitionTimingFunction: "ease-out",
1475
+ gap: `${s}px`,
1476
+ x: j
1477
+ },
1478
+ children: D
1479
+ }
1480
+ )
1481
+ }
1482
+ ) });
1483
+ }, yt = ({
1484
+ orientation: e = "horizontal",
1485
+ className: t,
1486
+ ...r
1487
+ }) => {
1488
+ const n = Be({ orientation: e, className: t });
1489
+ return /* @__PURE__ */ i("hr", { className: n.divider, ...r });
1490
+ }, _ = [];
1491
+ for (let e = 0; e < 256; ++e)
1492
+ _.push((e + 256).toString(16).slice(1));
1493
+ function Je(e, t = 0) {
1494
+ return (_[e[t + 0]] + _[e[t + 1]] + _[e[t + 2]] + _[e[t + 3]] + "-" + _[e[t + 4]] + _[e[t + 5]] + "-" + _[e[t + 6]] + _[e[t + 7]] + "-" + _[e[t + 8]] + _[e[t + 9]] + "-" + _[e[t + 10]] + _[e[t + 11]] + _[e[t + 12]] + _[e[t + 13]] + _[e[t + 14]] + _[e[t + 15]]).toLowerCase();
1495
+ }
1496
+ let le;
1497
+ const Qe = new Uint8Array(16);
1498
+ function ze() {
1499
+ if (!le) {
1500
+ if (typeof crypto > "u" || !crypto.getRandomValues)
1501
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1502
+ le = crypto.getRandomValues.bind(crypto);
1503
+ }
1504
+ return le(Qe);
1505
+ }
1506
+ const Te = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = { randomUUID: Te };
1507
+ function ae(e, t, r) {
1508
+ var l;
1509
+ if (se.randomUUID && !e)
1510
+ return se.randomUUID();
1511
+ e = e || {};
1512
+ const n = e.random ?? ((l = e.rng) == null ? void 0 : l.call(e)) ?? ze();
1513
+ if (n.length < 16)
1514
+ throw new Error("Random bytes length must be >= 16");
1515
+ return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Je(n);
1516
+ }
1517
+ const he = ({
1518
+ variant: e = "plain",
1519
+ buttons: t,
1520
+ className: r,
1521
+ children: n,
1522
+ title: l,
1523
+ text: c,
1524
+ position: o,
1525
+ targetRef: s,
1526
+ ref: d,
1527
+ trigger: u = ["hover", "focus"],
1528
+ ...p
1529
+ }) => {
1530
+ if (!n && !s)
1531
+ throw new Error("ToolTip must have a child or a targetRef");
1532
+ Array.isArray(u) || (u = [u]), t && !Array.isArray(t) && (t = [t]);
1533
+ const w = O(null), a = s || w, [y, v] = S(null), [b] = S(ae()), [L, E] = S(!1), m = O(null);
1534
+ $(() => {
1535
+ const h = (j) => {
1536
+ v(j.detail);
1537
+ };
1538
+ return document.addEventListener("tooltip-update", h), () => {
1539
+ document.removeEventListener(
1540
+ "tooltip-update",
1541
+ h
1542
+ );
1543
+ };
1544
+ }, []), $(() => {
1545
+ m.current && clearTimeout(m.current), y ? E(y === b) : m.current = setTimeout(() => {
1546
+ E(!1);
1547
+ }, 1200);
1548
+ }, [y, b]);
1549
+ const N = () => {
1550
+ if (u.includes("hover")) {
1551
+ const h = new CustomEvent("tooltip-update", { detail: b });
1552
+ document.dispatchEvent(h);
1553
+ }
1554
+ }, I = () => {
1555
+ if (u.includes("hover")) {
1556
+ const h = new CustomEvent("tooltip-update", { detail: null });
1557
+ document.dispatchEvent(h);
1558
+ }
1559
+ }, k = () => {
1560
+ if (u.includes("click")) {
1561
+ const h = new CustomEvent("tooltip-update", {
1562
+ detail: L ? null : b
1563
+ });
1564
+ document.dispatchEvent(h);
1565
+ }
1566
+ }, C = () => {
1567
+ if (u.includes("focus")) {
1568
+ const h = new CustomEvent("tooltip-update", { detail: b });
1569
+ document.dispatchEvent(h);
1570
+ }
1571
+ }, B = () => {
1572
+ if (u.includes("focus")) {
1573
+ const h = new CustomEvent("tooltip-update", { detail: null });
1574
+ document.dispatchEvent(h);
1575
+ }
1576
+ };
1577
+ $(() => {
1578
+ if (a != null && a.current) {
1579
+ const h = a.current;
1580
+ return h.addEventListener("mouseenter", N), h.addEventListener("mouseleave", I), h.addEventListener("click", k), h.addEventListener("focus", C), h.addEventListener("blur", B), () => {
1581
+ h.removeEventListener("mouseenter", N), h.removeEventListener("mouseleave", I), h.removeEventListener("click", k), h.removeEventListener("focus", C), h.removeEventListener("blur", B);
1582
+ };
1583
+ }
1584
+ }, [a, u, b, L]);
1585
+ const D = !s && we(n) ? ve(n, { ref: w }) : n;
1586
+ if (!o && typeof window < "u" && a != null && a.current && !o) {
1587
+ const h = a.current.getBoundingClientRect(), j = window.innerWidth, A = window.innerHeight, q = h.left / j, Y = h.top / A;
1588
+ e === "plain" ? q < 1 / 3 ? o = "right" : q > 2 / 3 ? o = "left" : o = Y > 0.5 ? "top" : "bottom" : q < 1 / 2 && Y < 1 / 2 ? o = "bottom-right" : q > 1 / 2 && Y < 1 / 2 ? o = "bottom-left" : q > 1 / 2 && Y > 1 / 2 ? o = "top-left" : q < 1 / 2 && Y > 1 / 2 && (o = "top-right");
1589
+ }
1590
+ const R = Ke({
1591
+ variant: e,
1592
+ buttons: t,
1593
+ className: r,
1594
+ title: l,
1595
+ text: c,
1596
+ position: o,
1597
+ trigger: u,
1598
+ targetRef: s,
1599
+ children: n
1600
+ });
1601
+ return /* @__PURE__ */ P(te, { children: [
1602
+ D,
1603
+ /* @__PURE__ */ i(z, { children: L && /* @__PURE__ */ i(_e, { targetRef: a, children: /* @__PURE__ */ i(
1604
+ U.div,
1605
+ {
1606
+ initial: { opacity: y ? 1 : 0 },
1607
+ animate: { opacity: 1 },
1608
+ transition: { duration: y ? 0 : 0.3 },
1609
+ exit: { opacity: y ? 1 : 0 },
1610
+ className: R.toolTip,
1611
+ ...p,
1612
+ onMouseEnter: N,
1613
+ onMouseLeave: I,
1614
+ children: /* @__PURE__ */ P(
1615
+ U.div,
1616
+ {
1617
+ className: R.container,
1618
+ layoutId: "tool-tip",
1619
+ transition: {
1620
+ type: "spring",
1621
+ stiffness: 200,
1622
+ damping: 20
1623
+ },
1624
+ children: [
1625
+ l && /* @__PURE__ */ i("div", { className: R.subHead, children: l }),
1626
+ /* @__PURE__ */ i("div", { className: R.supportingText, children: c }),
1627
+ t && /* @__PURE__ */ i("div", { className: R.actions, children: Array.isArray(t) && t.map((h, j) => /* @__PURE__ */ i(
1628
+ Ae,
1629
+ {
1630
+ size: "small",
1631
+ variant: "text",
1632
+ ...h
1633
+ },
1634
+ j
1635
+ )) })
1636
+ ]
1637
+ }
1638
+ )
1639
+ }
1640
+ ) }) })
1641
+ ] });
1642
+ }, ce = ({
1643
+ className: e,
1644
+ label: t,
1645
+ variant: r = "primary",
1646
+ size: n = "medium",
1647
+ href: l,
1648
+ type: c,
1649
+ icon: o,
1650
+ isExtended: s = !1,
1651
+ ref: d,
1652
+ transition: u,
1653
+ ...p
1654
+ }) => {
1655
+ const w = l ? "a" : "button", a = De({
1656
+ href: l,
1657
+ icon: o,
1658
+ isExtended: s,
1659
+ label: t,
1660
+ size: n,
1661
+ variant: r,
1662
+ className: e,
1663
+ transition: u
1664
+ });
1665
+ u = { duration: 0.3, ...u };
1666
+ const y = O(null), v = d || y, b = {
1667
+ visible: {
1668
+ width: "auto",
1669
+ marginLeft: 12,
1670
+ opacity: 1,
1671
+ transition: {
1672
+ ...u,
1673
+ opacity: {
1674
+ duration: u.duration / 2,
1675
+ delay: u.duration - u.duration / 2
1676
+ }
1677
+ }
1678
+ },
1679
+ hidden: {
1680
+ width: 0,
1681
+ marginLeft: 0,
1682
+ opacity: 0,
1683
+ transition: {
1684
+ ...u,
1685
+ marginLeft: {
1686
+ duration: u.duration / 2,
1687
+ delay: u.duration - u.duration / 2
1688
+ }
1689
+ }
1690
+ }
1691
+ };
1692
+ return /* @__PURE__ */ P(
1693
+ w,
1694
+ {
1695
+ ...p,
1696
+ ref: v,
1697
+ href: l,
1698
+ "aria-label": s ? void 0 : t,
1699
+ className: a.fab,
1700
+ children: [
1701
+ /* @__PURE__ */ i(
1702
+ he,
1703
+ {
1704
+ trigger: s ? null : void 0,
1705
+ text: t,
1706
+ targetRef: v
1707
+ }
1708
+ ),
1709
+ /* @__PURE__ */ i("span", { className: a.stateLayer, children: /* @__PURE__ */ i(
1710
+ ne,
1711
+ {
1712
+ colorName: f({
1713
+ primary: r == "surface",
1714
+ "on-primary-container": r == "primary",
1715
+ "on-secondary-container": r == "secondary",
1716
+ "on-tertiary-container": r == "tertiary"
1717
+ }),
1718
+ triggerRef: v
1719
+ }
1720
+ ) }),
1721
+ /* @__PURE__ */ i(J, { icon: o, className: a.icon }),
1722
+ /* @__PURE__ */ i(z, { children: s && /* @__PURE__ */ i(
1723
+ U.span,
1724
+ {
1725
+ variants: b,
1726
+ initial: "hidden",
1727
+ animate: "visible",
1728
+ exit: "hidden",
1729
+ className: a.label,
1730
+ children: t
1731
+ }
1732
+ ) })
1733
+ ]
1734
+ }
1735
+ );
1736
+ }, ye = ({
1737
+ variant: e = "standard",
1738
+ href: t,
1739
+ disabled: r = !1,
1740
+ type: n = "button",
1741
+ title: l,
1742
+ arialLabel: c,
1743
+ onToggle: o,
1744
+ activated: s = !1,
1745
+ onClick: d,
1746
+ icon: u,
1747
+ size: p = "medium",
1748
+ iconSelected: w,
1749
+ className: a,
1750
+ ref: y,
1751
+ width: v = "default",
1752
+ shape: b = "rounded",
1753
+ allowShapeTransformation: L = !0,
1754
+ transition: E,
1755
+ ...m
1756
+ }) => {
1757
+ l || (l = c);
1758
+ const [N, I] = W.useState(s);
1759
+ let k;
1760
+ o ? o && (k = (h) => {
1761
+ r && h.preventDefault(), I(!N), o(!!N);
1762
+ }, u = N && w || u) : k = (h) => {
1763
+ r && h.preventDefault(), d && d(h);
1764
+ }, $(() => {
1765
+ I(s);
1766
+ }, [s]);
1767
+ const C = t ? "a" : "button", B = $e({
1768
+ transition: E,
1769
+ shape: b,
1770
+ allowShapeTransformation: L,
1771
+ width: v,
1772
+ href: t,
1773
+ activated: s,
1774
+ arialLabel: c,
1775
+ iconSelected: w,
1776
+ isActive: N,
1777
+ onToggle: o,
1778
+ disabled: r,
1779
+ icon: u,
1780
+ variant: e,
1781
+ className: a,
1782
+ size: p,
1783
+ ...m
1784
+ }), D = O(null), R = y || D;
1785
+ return E = { duration: 0.3, ...E }, /* @__PURE__ */ P(
1786
+ C,
1787
+ {
1788
+ disabled: r,
1789
+ href: t,
1790
+ className: B.iconButton,
1791
+ "aria-label": c,
1792
+ ...m,
1793
+ title: void 0,
1794
+ onClick: k,
1795
+ ref: R,
1796
+ children: [
1797
+ /* @__PURE__ */ i(
1798
+ he,
1799
+ {
1800
+ targetRef: R,
1801
+ trigger: r ? null : void 0,
1802
+ text: l
1803
+ }
1804
+ ),
1805
+ /* @__PURE__ */ P(
1806
+ "div",
1807
+ {
1808
+ style: { transition: E.duration + "s" },
1809
+ className: B.container,
1810
+ children: [
1811
+ /* @__PURE__ */ i("div", { className: B.stateLayer, children: !r && /* @__PURE__ */ i(
1812
+ ne,
1813
+ {
1814
+ colorName: f(
1815
+ e === "standard" && {
1816
+ "on-surface-variant": !N,
1817
+ primary: N
1818
+ },
1819
+ e === "filled" && {
1820
+ primary: !N && !!o,
1821
+ "inverse-on-surface": N || !o
1822
+ },
1823
+ e === "tonal" && {
1824
+ "on-surface-variant": !N && !!o,
1825
+ "on-secondary-container": N || !o
1826
+ },
1827
+ e === "outlined" && {
1828
+ "on-surface-variant": !N,
1829
+ "on-primary": N
1830
+ }
1831
+ ),
1832
+ triggerRef: R
1833
+ }
1834
+ ) }),
1835
+ u && /* @__PURE__ */ i(J, { icon: u, className: B.icon })
1836
+ ]
1837
+ }
1838
+ )
1839
+ ]
1840
+ }
1841
+ );
1842
+ }, gt = ({
1843
+ className: e,
1844
+ valueFormatter: t,
1845
+ step: r = 10,
1846
+ name: n,
1847
+ value: l = 0,
1848
+ min: c = 0,
1849
+ max: o = 100,
1850
+ marks: s = [
1851
+ {
1852
+ value: 0,
1853
+ label: "0"
1854
+ },
1855
+ {
1856
+ value: 100,
1857
+ label: "100"
1858
+ }
1859
+ ],
1860
+ ref: d,
1861
+ onChange: u,
1862
+ ...p
1863
+ }) => {
1864
+ const w = (x) => {
1865
+ const g = y(), V = a();
1866
+ return x === 1 / 0 ? 100 : x === -1 / 0 ? 0 : (x - g) / (V - g) * 100;
1867
+ }, a = (x = !1) => x ? o : o == 1 / 0 ? s[(s == null ? void 0 : s.length) - 1].value : o, y = (x = !1) => x ? c : c == -1 / 0 ? s[0].value : c, v = (x) => {
1868
+ const g = y(!1);
1869
+ return (a(!1) - g) * x / 100 + g;
1870
+ }, [b, L] = S(!1), E = O(null), m = d || E, [N, I] = S(l), [k, C] = S(w(l)), [B, D] = S(!1), R = (x) => {
1871
+ D(!0), L(!0), A(x);
1872
+ }, h = () => {
1873
+ D(!1), L(!1);
1874
+ };
1875
+ $(() => (B ? (window.addEventListener("mouseup", h), window.addEventListener("mousemove", A), window.addEventListener("touchend", h), window.addEventListener("touchmove", A)) : (window.removeEventListener("mouseup", h), window.removeEventListener("mousemove", A), window.removeEventListener("touchend", h), window.removeEventListener("touchmove", A)), () => {
1876
+ window.removeEventListener("mouseup", h), window.removeEventListener("mousemove", A), window.removeEventListener("touchend", h), window.removeEventListener("touchmove", A);
1877
+ }), [B]);
1878
+ const j = Pe({
1879
+ className: e,
1880
+ isChanging: b,
1881
+ marks: s,
1882
+ max: o,
1883
+ min: c,
1884
+ name: n,
1885
+ step: r,
1886
+ value: N,
1887
+ valueFormatter: t,
1888
+ onChange: u
1889
+ }), A = (x) => {
1890
+ const g = m == null ? void 0 : m.current;
1891
+ if (g) {
1892
+ const V = g.getBoundingClientRect().left, M = ((x.type === "touchmove" || x.type === "touchstart" ? x.touches[0].clientX : x.clientX) - V) / g.offsetWidth * 100;
1893
+ q({ pourcent: M });
1894
+ }
1895
+ }, q = ({
1896
+ pourcent: x,
1897
+ value: g
1898
+ }) => {
1899
+ if (x) {
1900
+ if (x >= 100) {
1901
+ I(a(!0)), C(100);
1902
+ return;
1903
+ }
1904
+ if (x <= 0) {
1905
+ I(y(!0)), C(0);
1906
+ return;
1907
+ }
1908
+ g = v(x), g == y() && (g = y(!0)), g == a() && (g = a(!0));
1909
+ } else if (g != null) {
1910
+ if (g >= a()) {
1911
+ I(a(!0)), C(100);
1912
+ return;
1913
+ }
1914
+ if (g <= y()) {
1915
+ I(y(!0)), C(0);
1916
+ return;
1917
+ }
1918
+ x = w(g);
1919
+ } else
1920
+ return;
1921
+ r != null ? g = Math.round((g - y()) / r) * r + y() : s && (g = s.reduce((V, X, M) => {
1922
+ let F = X.value === 1 / 0 ? a() : X.value === -1 / 0 ? y() : X.value, K = V.value === 1 / 0 ? a() : V.value === -1 / 0 ? y() : V.value;
1923
+ return F = Math.abs(F - g), K = Math.abs(K - g), F < K ? X : V;
1924
+ }).value), g >= a() && (g = a(!0)), g <= y() && (g = y(!0)), x = w(g), I(g), C(x), u && u(g);
1925
+ }, [Y, G] = S(0);
1926
+ return $(() => {
1927
+ const x = () => {
1928
+ m.current && G(m.current.offsetWidth);
1929
+ };
1930
+ return x(), window.addEventListener("resize", x), () => {
1931
+ window.removeEventListener("resize", x);
1932
+ };
1933
+ }, []), /* @__PURE__ */ P(
1934
+ "div",
1935
+ {
1936
+ tabIndex: 0,
1937
+ onKeyDown: (x) => {
1938
+ switch (x.key) {
1939
+ case "ArrowRight":
1940
+ if (r)
1941
+ q({ value: N + r });
1942
+ else if (s) {
1943
+ const g = s.find((V) => V.value > N);
1944
+ g && q({ value: g.value });
1945
+ }
1946
+ break;
1947
+ case "ArrowLeft":
1948
+ if (r)
1949
+ q({ value: N - r });
1950
+ else if (s) {
1951
+ const g = s.slice(0).reverse().find((V, X, M) => N === 1 / 0 ? X === 1 : V.value < N);
1952
+ g && q({ value: g.value });
1953
+ }
1954
+ break;
1955
+ default:
1956
+ return;
1957
+ }
1958
+ },
1959
+ role: "slider",
1960
+ "aria-valuemin": y(!0),
1961
+ "aria-valuemax": a(!0),
1962
+ "aria-valuenow": N,
1963
+ "aria-valuetext": N.toString(),
1964
+ className: j.slider,
1965
+ onMouseDown: R,
1966
+ onClick: A,
1967
+ ref: m,
1968
+ onTouchStart: R,
1969
+ onDragStart: (x) => x.preventDefault(),
1970
+ ...p,
1971
+ children: [
1972
+ /* @__PURE__ */ i("input", { type: "hidden", name: n, value: N }),
1973
+ /* @__PURE__ */ i(
1974
+ "div",
1975
+ {
1976
+ className: j.activeTrack,
1977
+ style: { flex: k / 100 }
1978
+ }
1979
+ ),
1980
+ /* @__PURE__ */ i("div", { className: j.handle, children: /* @__PURE__ */ i(z, { children: b && /* @__PURE__ */ i(
1981
+ U.div,
1982
+ {
1983
+ className: j.valueIndicator,
1984
+ initial: "hidden",
1985
+ animate: "visible",
1986
+ exit: "hidden",
1987
+ style: {
1988
+ translate: "-50%",
1989
+ transformOrigin: "center bottom",
1990
+ textWrap: "nowrap"
1991
+ },
1992
+ variants: {
1993
+ visible: { opacity: 1, scale: 1 },
1994
+ hidden: { opacity: 1, scale: 0 }
1995
+ },
1996
+ transition: { duration: 0.1 },
1997
+ children: t ? t(N) : N
1998
+ }
1999
+ ) }) }),
2000
+ /* @__PURE__ */ i(
2001
+ "div",
2002
+ {
2003
+ className: j.inactiveTrack,
2004
+ style: { flex: 1 - k / 100 }
2005
+ }
2006
+ ),
2007
+ /* @__PURE__ */ i(
2008
+ "div",
2009
+ {
2010
+ className: "w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",
2011
+ children: s && s.map((x, g) => {
2012
+ let V = null;
2013
+ const X = (b ? 9 : 10) / Y * 100, M = w(x.value);
2014
+ return M <= k - X ? V = !0 : M >= k + X && (V = !1), /* @__PURE__ */ i(
2015
+ "div",
2016
+ {
2017
+ className: f(j.dot, {
2018
+ "bg-primary-container": V != null && V,
2019
+ "bg-primary": V != null && !V
2020
+ }),
2021
+ style: {
2022
+ left: `${w(x.value)}%`
2023
+ }
2024
+ },
2025
+ g
2026
+ );
2027
+ })
2028
+ }
2029
+ )
2030
+ ]
2031
+ }
2032
+ );
2033
+ };
2034
+ /*!
2035
+ * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
2036
+ * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
2037
+ * Copyright 2024 Fonticons, Inc.
2038
+ */
2039
+ const et = {
2040
+ prefix: "fas",
2041
+ iconName: "bars",
2042
+ icon: [448, 512, ["navicon"], "f0c9", "M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]
2043
+ }, tt = {
2044
+ prefix: "fas",
2045
+ iconName: "circle-exclamation",
2046
+ icon: [512, 512, ["exclamation-circle"], "f06a", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]
2047
+ }, ge = {
2048
+ prefix: "fas",
2049
+ iconName: "xmark",
2050
+ icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]
2051
+ }, xt = ({
2052
+ supportingText: e,
2053
+ className: t,
2054
+ duration: r,
2055
+ closeIcon: n = ge,
2056
+ onClose: l,
2057
+ ...c
2058
+ }) => {
2059
+ const [o, s] = S(!0), d = Ue({
2060
+ className: t,
2061
+ closeIcon: n,
2062
+ duration: r,
2063
+ isVisible: o,
2064
+ onClose: l,
2065
+ supportingText: e
2066
+ });
2067
+ $(() => {
2068
+ r && setTimeout(() => {
2069
+ u();
2070
+ }, r);
2071
+ }, [r]);
2072
+ const u = () => {
2073
+ s(!1), l == null || l();
2074
+ };
2075
+ return /* @__PURE__ */ i(z, { children: o && /* @__PURE__ */ i(
2076
+ U.div,
2077
+ {
2078
+ initial: { height: 0 },
2079
+ animate: { height: "auto" },
2080
+ exit: { height: 0 },
2081
+ transition: { duration: 0.1 },
2082
+ className: d.snackbar,
2083
+ ...c,
2084
+ children: /* @__PURE__ */ P("div", { className: d.container, children: [
2085
+ /* @__PURE__ */ i("p", { className: d.supportingText, children: e }),
2086
+ /* @__PURE__ */ i(
2087
+ ye,
2088
+ {
2089
+ onClick: () => u(),
2090
+ className: d.icon,
2091
+ icon: n,
2092
+ arialLabel: "close the snackbar"
2093
+ }
2094
+ )
2095
+ ] })
2096
+ }
2097
+ ) });
2098
+ }, wt = ({
2099
+ selected: e = !1,
2100
+ className: t,
2101
+ activeIcon: r,
2102
+ disabled: n = !1,
2103
+ inactiveIcon: l,
2104
+ onChange: c,
2105
+ onClick: o,
2106
+ onKeyDown: s,
2107
+ ref: d,
2108
+ ...u
2109
+ }) => {
2110
+ const [p, w] = S(e), a = (m) => {
2111
+ n || (v(), o && o(m));
2112
+ }, y = (m) => {
2113
+ n || ((m.key === " " || m.key === "Enter") && (m.preventDefault(), v()), s && s(m));
2114
+ }, v = () => {
2115
+ w(!p), c == null || c(!p);
2116
+ }, b = je({
2117
+ className: t,
2118
+ isSelected: p,
2119
+ activeIcon: r,
2120
+ inactiveIcon: l,
2121
+ disabled: n,
2122
+ selected: p,
2123
+ onChange: c
2124
+ }), L = O(null), E = d || L;
2125
+ return /* @__PURE__ */ P(
2126
+ U.div,
2127
+ {
2128
+ role: "switch",
2129
+ "aria-checked": p,
2130
+ tabIndex: n ? -1 : 0,
2131
+ onKeyDown: y,
2132
+ onClick: a,
2133
+ ref: E,
2134
+ className: b.switch,
2135
+ ...u,
2136
+ children: [
2137
+ /* @__PURE__ */ i("input", { type: "hidden", value: p ? "1" : "0" }),
2138
+ /* @__PURE__ */ P(
2139
+ U.div,
2140
+ {
2141
+ layout: !0,
2142
+ style: { translate: p ? "50%" : "-50%" },
2143
+ transition: {
2144
+ type: "spring",
2145
+ stiffness: 700,
2146
+ damping: 30
2147
+ },
2148
+ className: b.handleContainer,
2149
+ children: [
2150
+ /* @__PURE__ */ i("div", { className: b.handle, children: (p ? r : l) && /* @__PURE__ */ i(
2151
+ J,
2152
+ {
2153
+ className: b.icon,
2154
+ icon: p ? r : l
2155
+ }
2156
+ ) }),
2157
+ /* @__PURE__ */ i("div", { className: b.handleStateLayer })
2158
+ ]
2159
+ }
2160
+ )
2161
+ ]
2162
+ }
2163
+ );
2164
+ }, nt = ({
2165
+ className: e,
2166
+ onClick: t,
2167
+ label: r,
2168
+ variant: n = "primary",
2169
+ href: l,
2170
+ icon: c,
2171
+ selectedTab: o,
2172
+ setSelectedTab: s,
2173
+ tabsId: d,
2174
+ index: u,
2175
+ onTabSelected: p,
2176
+ scrollable: w = !1,
2177
+ selected: a = !1,
2178
+ ref: y,
2179
+ ...v
2180
+ }) => {
2181
+ const b = O(null), L = y || b, [E, m] = S(a);
2182
+ $(() => {
2183
+ a && o == null ? m(!0) : m(o == u && u != null);
2184
+ }, [o]), $(() => {
2185
+ o == u && p && p({
2186
+ ref: L,
2187
+ index: u || 0,
2188
+ label: r,
2189
+ icon: c
2190
+ });
2191
+ }, [o]);
2192
+ const N = l ? "a" : "button", I = (C) => {
2193
+ s && s(u ?? null), t && t(C);
2194
+ }, k = Oe({
2195
+ className: e,
2196
+ onTabSelected: p,
2197
+ scrollable: w,
2198
+ selectedTab: o,
2199
+ index: u,
2200
+ tabsId: d,
2201
+ selected: E,
2202
+ variant: n,
2203
+ icon: c,
2204
+ label: r,
2205
+ isSelected: E,
2206
+ setSelectedTab: s,
2207
+ href: l
2208
+ });
2209
+ return /* @__PURE__ */ P(
2210
+ N,
2211
+ {
2212
+ ...v,
2213
+ role: "tab",
2214
+ "aria-selected": E,
2215
+ ref: L,
2216
+ href: l,
2217
+ className: k.tab,
2218
+ onClick: I,
2219
+ ...v,
2220
+ children: [
2221
+ /* @__PURE__ */ i("span", { className: k.stateLayer, children: /* @__PURE__ */ i(
2222
+ ne,
2223
+ {
2224
+ colorName: n === "primary" && E ? "primary" : "on-surface",
2225
+ triggerRef: L
2226
+ }
2227
+ ) }),
2228
+ /* @__PURE__ */ P("span", { className: k.content, children: [
2229
+ c && /* @__PURE__ */ i(J, { icon: c, className: k.icon }),
2230
+ /* @__PURE__ */ i("span", { className: k.label, children: r }),
2231
+ E && /* @__PURE__ */ i(
2232
+ U.span,
2233
+ {
2234
+ layoutId: `underline-${d}`,
2235
+ className: k.underline,
2236
+ transition: { duration: 0.3 }
2237
+ }
2238
+ )
2239
+ ] })
2240
+ ]
2241
+ }
2242
+ );
2243
+ }, vt = ({
2244
+ variant: e = "primary",
2245
+ onTabSelected: t,
2246
+ children: r,
2247
+ className: n,
2248
+ selectedTab: l,
2249
+ setSelectedTab: c,
2250
+ scrollable: o = !1
2251
+ }) => {
2252
+ const [s, d] = S(
2253
+ null
2254
+ );
2255
+ let u;
2256
+ l == 0 || l != null ? u = l : u = s;
2257
+ const p = c || d, w = W.Children.toArray(r).filter(
2258
+ (L) => W.isValidElement(L) && L.type === nt
2259
+ ), a = W.useRef(null), y = (L) => {
2260
+ if (t == null || t(L), o) {
2261
+ const E = a.current, m = L.ref.current;
2262
+ if (E && m) {
2263
+ const N = m.offsetLeft + m.offsetWidth / 2 - E.offsetWidth / 2;
2264
+ E.scrollTo({ left: N, behavior: "smooth" });
2265
+ }
2266
+ }
2267
+ }, v = be(() => ae(), []), b = Xe({
2268
+ children: r,
2269
+ onTabSelected: t,
2270
+ scrollable: o,
2271
+ selectedTab: u,
2272
+ setSelectedTab: p,
2273
+ className: n,
2274
+ variant: e
2275
+ });
2276
+ return /* @__PURE__ */ i("div", { ref: a, role: "tablist", className: b.tabs, children: w.map((L, E) => W.cloneElement(L, {
2277
+ key: E,
2278
+ index: E,
2279
+ variant: e,
2280
+ selectedTab: u,
2281
+ setSelectedTab: p,
2282
+ tabsId: v,
2283
+ onTabSelected: y,
2284
+ scrollable: o
2285
+ })) });
2286
+ }, bt = ({
2287
+ variant: e = "filled",
2288
+ disabled: t = !1,
2289
+ errorText: r,
2290
+ placeholder: n,
2291
+ suffix: l,
2292
+ name: c,
2293
+ label: o,
2294
+ className: s,
2295
+ supportingText: d,
2296
+ trailingIcon: u,
2297
+ leadingIcon: p,
2298
+ type: w = "text",
2299
+ textLine: a = "singleLine",
2300
+ autoComplete: y = "on",
2301
+ onChange: v,
2302
+ value: b,
2303
+ showSupportingText: L = !1,
2304
+ ...E
2305
+ }) => {
2306
+ const [m, N] = S(b ?? ""), [I, k] = S(!1), [C, B] = S(!1), [D, R] = S(
2307
+ L
2308
+ );
2309
+ $(() => {
2310
+ N(b ?? "");
2311
+ }, [b]), $(() => {
2312
+ r != null && r.length ? B(!0) : B(!1);
2313
+ }, [r]), $(() => {
2314
+ L ? R(L) : d != null && d.length ? R(!0) : R(!1);
2315
+ }, [D, d]), $(() => {
2316
+ I && B(!1);
2317
+ }, [I]);
2318
+ const h = W.useRef(null), j = () => {
2319
+ h.current && !I && h.current.focus();
2320
+ }, A = () => {
2321
+ k(!0);
2322
+ }, q = (V) => {
2323
+ const X = V.target.value;
2324
+ N(X), B(!1), typeof v == "function" && v(X);
2325
+ }, Y = () => {
2326
+ k(!1);
2327
+ }, G = Fe({
2328
+ showSupportingText: D,
2329
+ isFocused: I,
2330
+ showErrorIcon: C,
2331
+ disabled: t,
2332
+ name: c,
2333
+ label: o,
2334
+ autoComplete: y,
2335
+ className: s,
2336
+ onChange: v,
2337
+ placeholder: n,
2338
+ supportingText: d,
2339
+ type: w,
2340
+ leadingIcon: p,
2341
+ trailingIcon: u,
2342
+ variant: e,
2343
+ errorText: r,
2344
+ value: m,
2345
+ suffix: l,
2346
+ textLine: a
2347
+ }), [Q] = S(ae());
2348
+ let x, g;
2349
+ switch (a) {
2350
+ case "multiLine":
2351
+ g = Ee, x = {};
2352
+ break;
2353
+ case "textAreas":
2354
+ g = "textarea", x = {};
2355
+ break;
2356
+ case "singleLine":
2357
+ default:
2358
+ g = "input", x = { type: w };
2359
+ break;
2360
+ }
2361
+ return /* @__PURE__ */ P("div", { className: G.textField, ...E, children: [
2362
+ /* @__PURE__ */ P("fieldset", { onClick: j, className: G.content, children: [
2363
+ /* @__PURE__ */ i("div", { className: G.stateLayer }),
2364
+ p && /* @__PURE__ */ i("div", { className: G.leadingIcon, children: W.isValidElement(p) ? p : /* @__PURE__ */ i(J, { className: "w-5 h-5", icon: p }) }),
2365
+ !(!I && !m.length || e == "filled") && /* @__PURE__ */ i(
2366
+ U.legend,
2367
+ {
2368
+ variants: {
2369
+ hidden: { width: 0, padding: 0 },
2370
+ visible: { width: "auto", padding: "0 8px" }
2371
+ },
2372
+ initial: "hidden",
2373
+ animate: !I && !m.length ? "hidden" : "visible",
2374
+ className: "max-w-full ml-2 px-2 text-body-small h-0",
2375
+ transition: { duration: 0.2 },
2376
+ children: /* @__PURE__ */ i("span", { className: "transform inline-flex -translate-y-1/2", children: /* @__PURE__ */ i(
2377
+ U.span,
2378
+ {
2379
+ className: G.label,
2380
+ transition: { duration: 0.3 },
2381
+ layoutId: Q,
2382
+ children: o
2383
+ }
2384
+ ) })
2385
+ }
2386
+ ),
2387
+ /* @__PURE__ */ P("div", { className: "flex-1 relative", children: [
2388
+ (!I && !m.length || e == "filled") && /* @__PURE__ */ i(
2389
+ U.label,
2390
+ {
2391
+ htmlFor: c,
2392
+ className: f(
2393
+ "absolute left-4 transition-all duration-300",
2394
+ {
2395
+ "text-body-small top-2": e == "filled" && !(!I && !m.length),
2396
+ "text-body-large top-1/2 transform -translate-y-1/2": !(e == "filled" && !(!I && !m.length))
2397
+ }
2398
+ ),
2399
+ transition: { duration: 0.3 },
2400
+ children: /* @__PURE__ */ i(
2401
+ U.span,
2402
+ {
2403
+ className: G.label,
2404
+ transition: { duration: 0.3 },
2405
+ layoutId: e == "outlined" ? Q : void 0,
2406
+ children: o
2407
+ }
2408
+ )
2409
+ }
2410
+ ),
2411
+ /* @__PURE__ */ i(
2412
+ g,
2413
+ {
2414
+ ref: h,
2415
+ value: m,
2416
+ onChange: q,
2417
+ className: G.input,
2418
+ id: c,
2419
+ name: c,
2420
+ placeholder: I ? n ?? void 0 : "",
2421
+ onFocus: A,
2422
+ onBlur: Y,
2423
+ disabled: t,
2424
+ autoComplete: y,
2425
+ "aria-invalid": !!(r != null && r.length),
2426
+ "aria-label": o,
2427
+ ...x
2428
+ }
2429
+ )
2430
+ ] }),
2431
+ /* @__PURE__ */ i("div", { className: G.activeIndicator }),
2432
+ !C && /* @__PURE__ */ P(te, { children: [
2433
+ u && /* @__PURE__ */ i(
2434
+ "div",
2435
+ {
2436
+ onClick: (V) => {
2437
+ V.stopPropagation();
2438
+ },
2439
+ className: G.trailingIcon,
2440
+ children: W.isValidElement(u) ? u : /* @__PURE__ */ i(J, { className: "h-5", icon: u })
2441
+ }
2442
+ ),
2443
+ !u && l && /* @__PURE__ */ i("span", { className: G.suffix, children: l })
2444
+ ] }),
2445
+ C && /* @__PURE__ */ i(
2446
+ "div",
2447
+ {
2448
+ className: f(G.trailingIcon, {
2449
+ " absolute right-0": !u
2450
+ }),
2451
+ children: /* @__PURE__ */ i(
2452
+ J,
2453
+ {
2454
+ className: "h-5 text-error",
2455
+ icon: tt
2456
+ }
2457
+ )
2458
+ }
2459
+ )
2460
+ ] }),
2461
+ D && /* @__PURE__ */ i("p", { className: G.supportingText, children: r != null && r.length ? r : d != null && d.length ? d : " " })
2462
+ ] });
2463
+ }, rt = H(
2464
+ "navigationRailItem",
2465
+ ({ isSelected: e, icon: t, label: r, variant: n }) => ({
2466
+ navigationRailItem: f(" group flex flex-col pt-1 pb-1.5 cursor-pointer", {
2467
+ "text-on-surface-variant": !e,
2468
+ "text-on-secondary-container": e,
2469
+ "gap-2 h-[68px]": n == "vertical",
2470
+ "gap-0 h-[66px]": n == "horizontal"
2471
+ }),
2472
+ container: f(
2473
+ " w-fit flex justify-center relative rounded-full items-center mx-5",
2474
+ {
2475
+ "bg-secondary-container overflow-hidden": e,
2476
+ "gap-2 ": n == "horizontal",
2477
+ "gap-0 ": n == "vertical",
2478
+ "p-4": !r
2479
+ },
2480
+ r && [
2481
+ "px-4",
2482
+ {
2483
+ "py-1 ": n == "vertical",
2484
+ "py-4 ": n == "horizontal"
2485
+ }
2486
+ ]
2487
+ ),
2488
+ stateLayer: f(
2489
+ " absolute w-full rounded-full h-full left-0 top-0 ",
2490
+ {
2491
+ "group-state-on-surface": !e,
2492
+ "group-state-on-secondary-container": e
2493
+ }
2494
+ ),
2495
+ icon: f("size-6 flex"),
2496
+ label: f("w-fit mx-auto", {
2497
+ "text-label-large ": n == "horizontal",
2498
+ "text-label-medium": n == "vertical"
2499
+ })
2500
+ })
2501
+ ), lt = ({ label: e }) => /* @__PURE__ */ i("div", { className: " h-9 flex items-center mx-9 mt-3", children: /* @__PURE__ */ i("p", { className: "text-label-large text-on-surface-variant", children: e }) }), ot = ({
2502
+ className: e,
2503
+ onClick: t,
2504
+ label: r,
2505
+ variant: n = "vertical",
2506
+ href: l,
2507
+ icon: c,
2508
+ selectedItem: o,
2509
+ setSelectedItem: s,
2510
+ index: d,
2511
+ onItemSelected: u,
2512
+ selected: p = !1,
2513
+ ref: w,
2514
+ transition: a,
2515
+ isExtended: y,
2516
+ iconSelected: v,
2517
+ style: b,
2518
+ extendedOnly: L,
2519
+ ...E
2520
+ }) => {
2521
+ const m = O(null), N = w || m, [I, k] = S(p);
2522
+ $(() => {
2523
+ p && o == null ? k(!0) : k(o == d && d != null);
2524
+ }, [o]), $(() => {
2525
+ o == d && u && u({
2526
+ ref: N,
2527
+ index: d || 0,
2528
+ label: r,
2529
+ icon: c
2530
+ });
2531
+ }, [o]);
2532
+ const C = l ? "a" : "button", B = (R) => {
2533
+ s && s(d ?? null), t && t(R);
2534
+ }, D = rt({
2535
+ isExtended: y,
2536
+ extendedOnly: L,
2537
+ className: e,
2538
+ onItemSelected: u,
2539
+ selectedItem: o,
2540
+ index: d,
2541
+ transition: a,
2542
+ selected: I,
2543
+ variant: n,
2544
+ icon: c,
2545
+ label: r,
2546
+ isSelected: I,
2547
+ setSelectedItem: s,
2548
+ href: l,
2549
+ iconSelected: v
2550
+ });
2551
+ return a = { duration: 0.3, ...a }, L && !y ? null : (
2552
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2553
+ // @ts-expect-error
2554
+ /* @__PURE__ */ P(
2555
+ C,
2556
+ {
2557
+ ...E,
2558
+ role: "tab",
2559
+ "aria-selected": I,
2560
+ ref: N,
2561
+ href: l,
2562
+ className: D.navigationRailItem,
2563
+ onClick: B,
2564
+ style: { transition: a.duration + "s", ...b },
2565
+ children: [
2566
+ /* @__PURE__ */ P(
2567
+ U.div,
2568
+ {
2569
+ style: {
2570
+ transition: n == "horizontal" ? a.duration + `s, gap ${a.duration / 2}s ${a.duration - a.duration / 2}s` : a.duration + `s, gap ${a.duration / 3}s ${a.duration - a.duration / 3}s`
2571
+ },
2572
+ transition: a,
2573
+ className: D.container,
2574
+ children: [
2575
+ /* @__PURE__ */ i(U.div, { layout: !0, className: D.stateLayer }),
2576
+ c && /* @__PURE__ */ i(
2577
+ J,
2578
+ {
2579
+ icon: I ? v : c,
2580
+ className: D.icon
2581
+ }
2582
+ ),
2583
+ /* @__PURE__ */ i(z, { children: n == "horizontal" && (() => {
2584
+ const R = {
2585
+ width: 0,
2586
+ opacity: 0,
2587
+ transition: {
2588
+ ...a
2589
+ }
2590
+ }, h = {
2591
+ width: "auto",
2592
+ opacity: 1,
2593
+ transition: {
2594
+ ...a,
2595
+ opacity: {
2596
+ duration: a.duration / 2,
2597
+ delay: a.duration - a.duration / 2
2598
+ }
2599
+ }
2600
+ };
2601
+ return /* @__PURE__ */ i(
2602
+ U.span,
2603
+ {
2604
+ initial: R,
2605
+ animate: h,
2606
+ exit: R,
2607
+ className: D.label,
2608
+ children: r
2609
+ }
2610
+ );
2611
+ })() })
2612
+ ]
2613
+ }
2614
+ ),
2615
+ /* @__PURE__ */ i(z, { children: n == "vertical" && (() => {
2616
+ const R = {
2617
+ height: 0,
2618
+ opacity: 0,
2619
+ transition: {
2620
+ ...a,
2621
+ opacity: {
2622
+ duration: 0
2623
+ }
2624
+ }
2625
+ }, h = {
2626
+ height: "auto",
2627
+ opacity: 1,
2628
+ transition: {
2629
+ ...a,
2630
+ opacity: {
2631
+ duration: a.duration / 3,
2632
+ delay: a.duration - a.duration / 3
2633
+ }
2634
+ }
2635
+ };
2636
+ return /* @__PURE__ */ i(
2637
+ U.span,
2638
+ {
2639
+ initial: R,
2640
+ animate: h,
2641
+ exit: R,
2642
+ className: D.label,
2643
+ transition: a,
2644
+ children: r
2645
+ }
2646
+ );
2647
+ })() })
2648
+ ]
2649
+ }
2650
+ )
2651
+ );
2652
+ }, at = H(
2653
+ "navigationRail",
2654
+ ({ isExtended: e, alignment: t }) => ({
2655
+ navigationRail: f("flex flex-col left-0 h-full top-0 pt-11", {
2656
+ "w-fit max-w-24": !e,
2657
+ "w-fit min-w-[220px] max-w-[360px]": e,
2658
+ "justify-between": t == "middle",
2659
+ "justify-start": t == "top"
2660
+ }),
2661
+ header: f("flex flex-col gap-1 items-start"),
2662
+ menuIcon: "mx-5",
2663
+ segments: f(" flex flex-col overflow-auto min-w-full mt-10", {
2664
+ "w-full": !e,
2665
+ "w-fit items-start": e
2666
+ })
2667
+ })
2668
+ ), Nt = ({
2669
+ variant: e = "standard",
2670
+ onItemSelected: t,
2671
+ children: r,
2672
+ className: n,
2673
+ selectedItem: l,
2674
+ extended: c,
2675
+ alignment: o = "top",
2676
+ menu: s = {
2677
+ closed: {
2678
+ icon: et,
2679
+ label: "Open menu"
2680
+ },
2681
+ opened: {
2682
+ icon: ge,
2683
+ label: "Close menu"
2684
+ }
2685
+ },
2686
+ style: d,
2687
+ onExtendedChange: u,
2688
+ transition: p,
2689
+ setSelectedItem: w
2690
+ }) => {
2691
+ const [a, y] = S(null), [v, b] = S(c);
2692
+ let L;
2693
+ l == 0 || l != null ? L = l : L = a;
2694
+ const E = w || y, m = W.useRef(null), N = (R) => {
2695
+ t == null || t(R);
2696
+ };
2697
+ function I(R) {
2698
+ const h = [];
2699
+ return W.Children.forEach(R, (j) => {
2700
+ W.isValidElement(j) && j.type === W.Fragment ? h.push(...I(j.props.children)) : h.push(j);
2701
+ }), h;
2702
+ }
2703
+ const k = I(r), C = k.filter(
2704
+ (R) => W.isValidElement(R) && R.type === ce
2705
+ ), B = at({
2706
+ children: r,
2707
+ onItemSelected: t,
2708
+ selectedItem: L,
2709
+ setSelectedItem: E,
2710
+ className: n,
2711
+ variant: e,
2712
+ extended: v,
2713
+ isExtended: v,
2714
+ alignment: o,
2715
+ menu: s,
2716
+ transition: p,
2717
+ onExtendedChange: u
2718
+ });
2719
+ p = { duration: 0.3, ...p };
2720
+ const D = O(!1);
2721
+ return D.current = !1, $(() => {
2722
+ u == null || u(v ?? !1);
2723
+ }, [v]), /* @__PURE__ */ P(
2724
+ "div",
2725
+ {
2726
+ style: { transition: p.duration + "s", ...d },
2727
+ ref: m,
2728
+ className: B.navigationRail,
2729
+ children: [
2730
+ /* @__PURE__ */ P("div", { className: B.header, children: [
2731
+ /* @__PURE__ */ i(
2732
+ ye,
2733
+ {
2734
+ onClick: () => b(!v),
2735
+ arialLabel: v ? s == null ? void 0 : s.opened.label : s == null ? void 0 : s.closed.label,
2736
+ className: B.menuIcon,
2737
+ icon: v ? s.opened.icon : s == null ? void 0 : s.closed.icon
2738
+ }
2739
+ ),
2740
+ C.length > 0 && W.cloneElement(
2741
+ C[0],
2742
+ {
2743
+ transition: p,
2744
+ isExtended: v,
2745
+ className: "!shadow-none mx-5 " + C[0].props.className
2746
+ }
2747
+ )
2748
+ ] }),
2749
+ /* @__PURE__ */ i("div", { className: B.segments, children: (() => {
2750
+ let R = 0;
2751
+ return k.map((h) => W.isValidElement(h) && h.type === ot ? W.cloneElement(
2752
+ h,
2753
+ {
2754
+ key: R,
2755
+ index: R++,
2756
+ // Utilise et incrémente le compteur dédié
2757
+ variant: v ? "horizontal" : "vertical",
2758
+ selectedItem: L,
2759
+ setSelectedItem: E,
2760
+ onItemSelected: N,
2761
+ transition: p,
2762
+ extendedOnly: D.current,
2763
+ isExtended: v
2764
+ }
2765
+ ) : W.isValidElement(h) && h.type === ce ? null : W.isValidElement(h) && h.type === lt ? (D.current = !0, v ? W.cloneElement(
2766
+ h,
2767
+ {}
2768
+ ) : null) : h);
2769
+ })() }),
2770
+ /* @__PURE__ */ i("div", { className: "flex-1 max-h-[160px]" })
2771
+ ]
2772
+ }
2773
+ );
2774
+ };
2775
+ export {
2776
+ Ae as Button,
2777
+ pt as Card,
2778
+ ht as Carousel,
2779
+ Ze as CarouselItem,
2780
+ pe as CustomScroll,
2781
+ yt as Divider,
2782
+ ce as Fab,
2783
+ J as Icon,
2784
+ ye as IconButton,
2785
+ Nt as NavigationRail,
2786
+ ot as NavigationRailItem,
2787
+ lt as NavigationRailSection,
2788
+ Ge as ProgressIndicator,
2789
+ ne as RippleEffect,
2790
+ gt as Slider,
2791
+ mt as SmoothScroll,
2792
+ xt as Snackbar,
2793
+ wt as Switch,
2794
+ _e as SyncedFixedWrapper,
2795
+ nt as Tab,
2796
+ vt as Tabs,
2797
+ bt as TextField,
2798
+ he as ToolTip,
2799
+ Re as buttonStyle,
2800
+ Se as cardStyle,
2801
+ Ce as carouselItemStyle,
2802
+ Ve as carouselStyle,
2803
+ f as classNames,
2804
+ Ie as classnames,
2805
+ He as customScrollStyle,
2806
+ H as defaultClassNames,
2807
+ Be as dividerStyle,
2808
+ De as fabStyle,
2809
+ Me as getClassNames,
2810
+ $e as iconButtonStyle,
2811
+ Ye as normalize,
2812
+ We as progressIndicatorStyle,
2813
+ Pe as sliderStyle,
2814
+ Ue as snackbarStyle,
2815
+ je as switchStyle,
2816
+ Oe as tabStyle,
2817
+ Xe as tabsStyle,
2818
+ Fe as textFieldStyle,
2819
+ Ke as toolStyle
2820
+ };