@profiq/ui 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 (237) hide show
  1. package/README.md +36 -0
  2. package/dist/components/custom/basic/accordion.d.ts +31 -0
  3. package/dist/components/custom/basic/accordion.d.ts.map +1 -0
  4. package/dist/components/custom/basic/accordion.js +68 -0
  5. package/dist/components/custom/basic/button.d.ts +16 -0
  6. package/dist/components/custom/basic/button.d.ts.map +1 -0
  7. package/dist/components/custom/basic/button.js +46 -0
  8. package/dist/components/custom/basic/input.d.ts +22 -0
  9. package/dist/components/custom/basic/input.d.ts.map +1 -0
  10. package/dist/components/custom/basic/input.js +106 -0
  11. package/dist/components/custom/basic/select.d.ts +18 -0
  12. package/dist/components/custom/basic/select.d.ts.map +1 -0
  13. package/dist/components/custom/basic/select.js +67 -0
  14. package/dist/components/custom/basic/slider.d.ts +24 -0
  15. package/dist/components/custom/basic/slider.d.ts.map +1 -0
  16. package/dist/components/custom/basic/slider.js +54 -0
  17. package/dist/components/custom/basic/switch.d.ts +17 -0
  18. package/dist/components/custom/basic/switch.d.ts.map +1 -0
  19. package/dist/components/custom/basic/switch.js +105 -0
  20. package/dist/components/custom/basic/table.d.ts +9 -0
  21. package/dist/components/custom/basic/table.d.ts.map +1 -0
  22. package/dist/components/custom/basic/table.js +74 -0
  23. package/dist/components/custom/basic/text.d.ts +10 -0
  24. package/dist/components/custom/basic/text.d.ts.map +1 -0
  25. package/dist/components/custom/basic/text.js +26 -0
  26. package/dist/components/custom/basic/textarea.d.ts +7 -0
  27. package/dist/components/custom/basic/textarea.d.ts.map +1 -0
  28. package/dist/components/custom/basic/textarea.js +24 -0
  29. package/dist/components/custom/icons/Backpack.d.ts +3 -0
  30. package/dist/components/custom/icons/Backpack.d.ts.map +1 -0
  31. package/dist/components/custom/icons/Backpack.js +28 -0
  32. package/dist/components/custom/icons/CaretDown.d.ts +3 -0
  33. package/dist/components/custom/icons/CaretDown.d.ts.map +1 -0
  34. package/dist/components/custom/icons/CaretDown.js +20 -0
  35. package/dist/components/custom/icons/CaretUp.d.ts +3 -0
  36. package/dist/components/custom/icons/CaretUp.d.ts.map +1 -0
  37. package/dist/components/custom/icons/CaretUp.js +20 -0
  38. package/dist/components/custom/icons/DotsVertical.d.ts +3 -0
  39. package/dist/components/custom/icons/DotsVertical.d.ts.map +1 -0
  40. package/dist/components/custom/icons/DotsVertical.js +28 -0
  41. package/dist/components/custom/icons/HamburgerMenu.d.ts +3 -0
  42. package/dist/components/custom/icons/HamburgerMenu.d.ts.map +1 -0
  43. package/dist/components/custom/icons/HamburgerMenu.js +28 -0
  44. package/dist/components/custom/icons/Home.d.ts +3 -0
  45. package/dist/components/custom/icons/Home.d.ts.map +1 -0
  46. package/dist/components/custom/icons/Home.js +28 -0
  47. package/dist/components/custom/icons/Icons.d.ts +27 -0
  48. package/dist/components/custom/icons/Icons.d.ts.map +1 -0
  49. package/dist/components/custom/icons/Icons.js +23 -0
  50. package/dist/components/custom/icons/MagnifyingGlass.d.ts +3 -0
  51. package/dist/components/custom/icons/MagnifyingGlass.d.ts.map +1 -0
  52. package/dist/components/custom/icons/MagnifyingGlass.js +24 -0
  53. package/dist/components/custom/icons/Moon.d.ts +3 -0
  54. package/dist/components/custom/icons/Moon.d.ts.map +1 -0
  55. package/dist/components/custom/icons/Moon.js +28 -0
  56. package/dist/components/custom/icons/Sun.d.ts +3 -0
  57. package/dist/components/custom/icons/Sun.d.ts.map +1 -0
  58. package/dist/components/custom/icons/Sun.js +28 -0
  59. package/dist/components/custom/icons/logo/Profiq.d.ts +6 -0
  60. package/dist/components/custom/icons/logo/Profiq.d.ts.map +1 -0
  61. package/dist/components/custom/icons/logo/Profiq.js +92 -0
  62. package/dist/components/custom/icons/logo/logoVariations.d.ts +10 -0
  63. package/dist/components/custom/icons/logo/logoVariations.d.ts.map +1 -0
  64. package/dist/components/custom/icons/logo/logoVariations.js +65 -0
  65. package/dist/components/ui/accordion.d.ts +8 -0
  66. package/dist/components/ui/accordion.d.ts.map +1 -0
  67. package/dist/components/ui/accordion.js +65 -0
  68. package/dist/components/ui/button.d.ts +8 -0
  69. package/dist/components/ui/button.d.ts.map +1 -0
  70. package/dist/components/ui/button.js +29 -0
  71. package/dist/components/ui/buttonVariants.d.ts +5 -0
  72. package/dist/components/ui/buttonVariants.d.ts.map +1 -0
  73. package/dist/components/ui/buttonVariants.js +33 -0
  74. package/dist/components/ui/field.d.ts +25 -0
  75. package/dist/components/ui/field.d.ts.map +1 -0
  76. package/dist/components/ui/field.js +221 -0
  77. package/dist/components/ui/input.d.ts +4 -0
  78. package/dist/components/ui/input.d.ts.map +1 -0
  79. package/dist/components/ui/input.js +22 -0
  80. package/dist/components/ui/label.d.ts +5 -0
  81. package/dist/components/ui/label.d.ts.map +1 -0
  82. package/dist/components/ui/label.js +23 -0
  83. package/dist/components/ui/select.d.ts +16 -0
  84. package/dist/components/ui/select.d.ts.map +1 -0
  85. package/dist/components/ui/select.js +181 -0
  86. package/dist/components/ui/separator.d.ts +5 -0
  87. package/dist/components/ui/separator.d.ts.map +1 -0
  88. package/dist/components/ui/separator.js +27 -0
  89. package/dist/components/ui/slider.d.ts +13 -0
  90. package/dist/components/ui/slider.d.ts.map +1 -0
  91. package/dist/components/ui/slider.js +101 -0
  92. package/dist/components/ui/switch.d.ts +8 -0
  93. package/dist/components/ui/switch.d.ts.map +1 -0
  94. package/dist/components/ui/switch.js +36 -0
  95. package/dist/components/ui/table.d.ts +11 -0
  96. package/dist/components/ui/table.d.ts.map +1 -0
  97. package/dist/components/ui/table.js +115 -0
  98. package/dist/components/ui/textarea.d.ts +4 -0
  99. package/dist/components/ui/textarea.d.ts.map +1 -0
  100. package/dist/components/ui/textarea.js +19 -0
  101. package/dist/components/ui/tooltip.d.ts +10 -0
  102. package/dist/components/ui/tooltip.d.ts.map +1 -0
  103. package/dist/components/ui/tooltip.js +66 -0
  104. package/dist/fonts/Franklin_Gothic/FRANKGO.ttf +0 -0
  105. package/dist/fonts/Franklin_Gothic/Franklin Gothic Condensed.ttf +0 -0
  106. package/dist/fonts/Franklin_Gothic/FranklinGothic.ttf +0 -0
  107. package/dist/fonts/Franklin_Gothic/FranklinGothicITALIC.ttf +0 -0
  108. package/dist/fonts/Franklin_Gothic/fgwo____.ttf +0 -0
  109. package/dist/fonts/Roboto_Slab/LICENSE.txt +202 -0
  110. package/dist/fonts/Roboto_Slab/README.txt +71 -0
  111. package/dist/fonts/Roboto_Slab/RobotoSlab-VariableFont_wght.ttf +0 -0
  112. package/dist/fonts/Roboto_Slab/static/RobotoSlab-Black.ttf +0 -0
  113. package/dist/fonts/Roboto_Slab/static/RobotoSlab-Bold.ttf +0 -0
  114. package/dist/fonts/Roboto_Slab/static/RobotoSlab-ExtraBold.ttf +0 -0
  115. package/dist/fonts/Roboto_Slab/static/RobotoSlab-ExtraLight.ttf +0 -0
  116. package/dist/fonts/Roboto_Slab/static/RobotoSlab-Light.ttf +0 -0
  117. package/dist/fonts/Roboto_Slab/static/RobotoSlab-Medium.ttf +0 -0
  118. package/dist/fonts/Roboto_Slab/static/RobotoSlab-Regular.ttf +0 -0
  119. package/dist/fonts/Roboto_Slab/static/RobotoSlab-SemiBold.ttf +0 -0
  120. package/dist/fonts/Roboto_Slab/static/RobotoSlab-Thin.ttf +0 -0
  121. package/dist/index.css +571 -0
  122. package/dist/index.js +11 -0
  123. package/dist/lib/baseProps.d.ts +9 -0
  124. package/dist/lib/baseProps.d.ts.map +1 -0
  125. package/dist/lib/baseProps.js +13 -0
  126. package/dist/lib/buttonVariants.d.ts +3 -0
  127. package/dist/lib/buttonVariants.d.ts.map +1 -0
  128. package/dist/lib/hooks/useMakeTestId.d.ts +34 -0
  129. package/dist/lib/hooks/useMakeTestId.d.ts.map +1 -0
  130. package/dist/lib/hooks/useMakeTestId.js +26 -0
  131. package/dist/lib/index.d.ts +6 -0
  132. package/dist/lib/index.d.ts.map +1 -0
  133. package/dist/lib/text.types.d.ts +6 -0
  134. package/dist/lib/text.types.d.ts.map +1 -0
  135. package/dist/lib/text.types.js +17 -0
  136. package/dist/lib/utils.d.ts +3 -0
  137. package/dist/lib/utils.d.ts.map +1 -0
  138. package/dist/lib/utils.js +8 -0
  139. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +532 -0
  140. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +402 -0
  141. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +208 -0
  142. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +136 -0
  143. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +130 -0
  144. package/dist/node_modules/@radix-ui/number/dist/index.js +6 -0
  145. package/dist/node_modules/@radix-ui/primitive/dist/index.js +9 -0
  146. package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +235 -0
  147. package/dist/node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
  148. package/dist/node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  149. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
  150. package/dist/node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
  151. package/dist/node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  152. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +120 -0
  153. package/dist/node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
  154. package/dist/node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  155. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +50 -0
  156. package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  157. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -0
  158. package/dist/node_modules/@radix-ui/react-context/dist/index.js +53 -0
  159. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +10 -0
  160. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
  161. package/dist/node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
  162. package/dist/node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  163. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +17 -0
  164. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +136 -0
  165. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
  166. package/dist/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  167. package/dist/node_modules/@radix-ui/react-id/dist/index.js +13 -0
  168. package/dist/node_modules/@radix-ui/react-label/dist/index.js +19 -0
  169. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +219 -0
  170. package/dist/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
  171. package/dist/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  172. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
  173. package/dist/node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
  174. package/dist/node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  175. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
  176. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
  177. package/dist/node_modules/@radix-ui/react-select/dist/index.js +848 -0
  178. package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
  179. package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  180. package/dist/node_modules/@radix-ui/react-separator/dist/index.js +24 -0
  181. package/dist/node_modules/@radix-ui/react-slider/dist/index.js +436 -0
  182. package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
  183. package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  184. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +61 -0
  185. package/dist/node_modules/@radix-ui/react-switch/dist/index.js +132 -0
  186. package/dist/node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
  187. package/dist/node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  188. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +338 -0
  189. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
  190. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.js +55 -0
  191. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
  192. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
  193. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
  194. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
  195. package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +8 -0
  196. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +27 -0
  197. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +32 -0
  198. package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
  199. package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  200. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +88 -0
  201. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1667 -0
  202. package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
  203. package/dist/node_modules/class-variance-authority/dist/index.js +35 -0
  204. package/dist/node_modules/clsx/dist/clsx.js +16 -0
  205. package/dist/node_modules/get-nonce/dist/es2015/index.js +7 -0
  206. package/dist/node_modules/lucide-react/dist/esm/Icon.js +36 -0
  207. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +23 -0
  208. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +14 -0
  209. package/dist/node_modules/lucide-react/dist/esm/icons/check.js +6 -0
  210. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +6 -0
  211. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +6 -0
  212. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.js +9 -0
  213. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js +4 -0
  214. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js +7 -0
  215. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js +4 -0
  216. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js +8 -0
  217. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
  218. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +115 -0
  219. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -0
  220. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +16 -0
  221. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +68 -0
  222. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
  223. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
  224. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +71 -0
  225. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +7 -0
  226. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -0
  227. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
  228. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
  229. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +30 -0
  230. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2924 -0
  231. package/dist/node_modules/tslib/tslib.es6.js +27 -0
  232. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
  233. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
  234. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +25 -0
  235. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
  236. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +67 -0
  237. package/package.json +124 -0
@@ -0,0 +1,6 @@
1
+ export type TextAs = "p" | "div" | "label" | "span" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
2
+ export type TextSize = "xs" | "sm" | "base" | "lg" | "xl" | "2xl";
3
+ export type TextWeight = "normal" | "medium" | "semibold" | "bold";
4
+ export declare const sizeClasses: Record<NonNullable<TextSize>, string>;
5
+ export declare const weightClasses: Record<NonNullable<TextWeight>, string>;
6
+ //# sourceMappingURL=text.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.types.d.ts","sourceRoot":"","sources":["../../src/lib/text.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GACd,GAAG,GACH,KAAK,GACL,OAAO,GACP,MAAM,GACN,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC;AAET,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAClE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAEnE,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,CAO7D,CAAC;AACF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,MAAM,CAKjE,CAAC"}
@@ -0,0 +1,17 @@
1
+ const t = {
2
+ xs: "text-xs",
3
+ sm: "text-sm",
4
+ base: "text-base",
5
+ lg: "text-lg",
6
+ xl: "text-xl",
7
+ "2xl": "text-2xl"
8
+ }, e = {
9
+ normal: "font-normal",
10
+ medium: "font-medium",
11
+ semibold: "font-semibold",
12
+ bold: "font-bold"
13
+ };
14
+ export {
15
+ t as sizeClasses,
16
+ e as weightClasses
17
+ };
@@ -0,0 +1,3 @@
1
+ import { ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
3
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
@@ -0,0 +1,8 @@
1
+ import { clsx as o } from "../node_modules/clsx/dist/clsx.js";
2
+ import { twMerge as t } from "../node_modules/tailwind-merge/dist/bundle-mjs.js";
3
+ function n(...r) {
4
+ return t(o(r));
5
+ }
6
+ export {
7
+ n as cn
8
+ };
@@ -0,0 +1,532 @@
1
+ import { getSideAxis as T, getAlignmentAxis as G, getSide as j, getAlignment as z, evaluate as L, getPaddingObject as J, rectToClientRect as X, clamp as $, getOppositePlacement as Z, getExpandedPlacements as ee, getOppositeAxisPlacements as te, getAlignmentSides as ne, min as Y, max as W, getAxisLength as K, getOppositeAxis as N, sides as ie } from "../../utils/dist/floating-ui.utils.js";
2
+ function I(t, e, d) {
3
+ let {
4
+ reference: a,
5
+ floating: m
6
+ } = t;
7
+ const n = T(e), s = G(e), l = K(s), g = j(e), p = n === "y", r = a.x + a.width / 2 - m.width / 2, o = a.y + a.height / 2 - m.height / 2, f = a[l] / 2 - m[l] / 2;
8
+ let i;
9
+ switch (g) {
10
+ case "top":
11
+ i = {
12
+ x: r,
13
+ y: a.y - m.height
14
+ };
15
+ break;
16
+ case "bottom":
17
+ i = {
18
+ x: r,
19
+ y: a.y + a.height
20
+ };
21
+ break;
22
+ case "right":
23
+ i = {
24
+ x: a.x + a.width,
25
+ y: o
26
+ };
27
+ break;
28
+ case "left":
29
+ i = {
30
+ x: a.x - m.width,
31
+ y: o
32
+ };
33
+ break;
34
+ default:
35
+ i = {
36
+ x: a.x,
37
+ y: a.y
38
+ };
39
+ }
40
+ switch (z(e)) {
41
+ case "start":
42
+ i[s] -= f * (d && p ? -1 : 1);
43
+ break;
44
+ case "end":
45
+ i[s] += f * (d && p ? -1 : 1);
46
+ break;
47
+ }
48
+ return i;
49
+ }
50
+ async function se(t, e) {
51
+ var d;
52
+ e === void 0 && (e = {});
53
+ const {
54
+ x: a,
55
+ y: m,
56
+ platform: n,
57
+ rects: s,
58
+ elements: l,
59
+ strategy: g
60
+ } = t, {
61
+ boundary: p = "clippingAncestors",
62
+ rootBoundary: r = "viewport",
63
+ elementContext: o = "floating",
64
+ altBoundary: f = !1,
65
+ padding: i = 0
66
+ } = L(e, t), c = J(i), x = l[f ? o === "floating" ? "reference" : "floating" : o], v = X(await n.getClippingRect({
67
+ element: (d = await (n.isElement == null ? void 0 : n.isElement(x))) == null || d ? x : x.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(l.floating)),
68
+ boundary: p,
69
+ rootBoundary: r,
70
+ strategy: g
71
+ })), y = o === "floating" ? {
72
+ x: a,
73
+ y: m,
74
+ width: s.floating.width,
75
+ height: s.floating.height
76
+ } : s.reference, w = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(l.floating)), h = await (n.isElement == null ? void 0 : n.isElement(w)) ? await (n.getScale == null ? void 0 : n.getScale(w)) || {
77
+ x: 1,
78
+ y: 1
79
+ } : {
80
+ x: 1,
81
+ y: 1
82
+ }, A = X(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({
83
+ elements: l,
84
+ rect: y,
85
+ offsetParent: w,
86
+ strategy: g
87
+ }) : y);
88
+ return {
89
+ top: (v.top - A.top + c.top) / h.y,
90
+ bottom: (A.bottom - v.bottom + c.bottom) / h.y,
91
+ left: (v.left - A.left + c.left) / h.x,
92
+ right: (A.right - v.right + c.right) / h.x
93
+ };
94
+ }
95
+ const le = async (t, e, d) => {
96
+ const {
97
+ placement: a = "bottom",
98
+ strategy: m = "absolute",
99
+ middleware: n = [],
100
+ platform: s
101
+ } = d, l = n.filter(Boolean), g = await (s.isRTL == null ? void 0 : s.isRTL(e));
102
+ let p = await s.getElementRects({
103
+ reference: t,
104
+ floating: e,
105
+ strategy: m
106
+ }), {
107
+ x: r,
108
+ y: o
109
+ } = I(p, a, g), f = a, i = {}, c = 0;
110
+ for (let x = 0; x < l.length; x++) {
111
+ var u;
112
+ const {
113
+ name: v,
114
+ fn: y
115
+ } = l[x], {
116
+ x: w,
117
+ y: h,
118
+ data: A,
119
+ reset: b
120
+ } = await y({
121
+ x: r,
122
+ y: o,
123
+ initialPlacement: a,
124
+ placement: f,
125
+ strategy: m,
126
+ middlewareData: i,
127
+ rects: p,
128
+ platform: {
129
+ ...s,
130
+ detectOverflow: (u = s.detectOverflow) != null ? u : se
131
+ },
132
+ elements: {
133
+ reference: t,
134
+ floating: e
135
+ }
136
+ });
137
+ r = w ?? r, o = h ?? o, i = {
138
+ ...i,
139
+ [v]: {
140
+ ...i[v],
141
+ ...A
142
+ }
143
+ }, b && c <= 50 && (c++, typeof b == "object" && (b.placement && (f = b.placement), b.rects && (p = b.rects === !0 ? await s.getElementRects({
144
+ reference: t,
145
+ floating: e,
146
+ strategy: m
147
+ }) : b.rects), {
148
+ x: r,
149
+ y: o
150
+ } = I(p, f, g)), x = -1);
151
+ }
152
+ return {
153
+ x: r,
154
+ y: o,
155
+ placement: f,
156
+ strategy: m,
157
+ middlewareData: i
158
+ };
159
+ }, ce = (t) => ({
160
+ name: "arrow",
161
+ options: t,
162
+ async fn(e) {
163
+ const {
164
+ x: d,
165
+ y: a,
166
+ placement: m,
167
+ rects: n,
168
+ platform: s,
169
+ elements: l,
170
+ middlewareData: g
171
+ } = e, {
172
+ element: p,
173
+ padding: r = 0
174
+ } = L(t, e) || {};
175
+ if (p == null)
176
+ return {};
177
+ const o = J(r), f = {
178
+ x: d,
179
+ y: a
180
+ }, i = G(m), c = K(i), u = await s.getDimensions(p), x = i === "y", v = x ? "top" : "left", y = x ? "bottom" : "right", w = x ? "clientHeight" : "clientWidth", h = n.reference[c] + n.reference[i] - f[i] - n.floating[c], A = f[i] - n.reference[i], b = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(p));
181
+ let C = b ? b[w] : 0;
182
+ (!C || !await (s.isElement == null ? void 0 : s.isElement(b))) && (C = l.floating[w] || n.floating[c]);
183
+ const M = h / 2 - A / 2, k = C / 2 - u[c] / 2 - 1, P = Y(o[v], k), H = Y(o[y], k), D = P, F = C - u[c] - H, O = C / 2 - u[c] / 2 + M, B = $(D, O, F), E = !g.arrow && z(m) != null && O !== B && n.reference[c] / 2 - (O < D ? P : H) - u[c] / 2 < 0, S = E ? O < D ? O - D : O - F : 0;
184
+ return {
185
+ [i]: f[i] + S,
186
+ data: {
187
+ [i]: B,
188
+ centerOffset: O - B - S,
189
+ ...E && {
190
+ alignmentOffset: S
191
+ }
192
+ },
193
+ reset: E
194
+ };
195
+ }
196
+ }), re = function(t) {
197
+ return t === void 0 && (t = {}), {
198
+ name: "flip",
199
+ options: t,
200
+ async fn(e) {
201
+ var d, a;
202
+ const {
203
+ placement: m,
204
+ middlewareData: n,
205
+ rects: s,
206
+ initialPlacement: l,
207
+ platform: g,
208
+ elements: p
209
+ } = e, {
210
+ mainAxis: r = !0,
211
+ crossAxis: o = !0,
212
+ fallbackPlacements: f,
213
+ fallbackStrategy: i = "bestFit",
214
+ fallbackAxisSideDirection: c = "none",
215
+ flipAlignment: u = !0,
216
+ ...x
217
+ } = L(t, e);
218
+ if ((d = n.arrow) != null && d.alignmentOffset)
219
+ return {};
220
+ const v = j(m), y = T(l), w = j(l) === l, h = await (g.isRTL == null ? void 0 : g.isRTL(p.floating)), A = f || (w || !u ? [Z(l)] : ee(l)), b = c !== "none";
221
+ !f && b && A.push(...te(l, u, c, h));
222
+ const C = [l, ...A], M = await g.detectOverflow(e, x), k = [];
223
+ let P = ((a = n.flip) == null ? void 0 : a.overflows) || [];
224
+ if (r && k.push(M[v]), o) {
225
+ const O = ne(m, s, h);
226
+ k.push(M[O[0]], M[O[1]]);
227
+ }
228
+ if (P = [...P, {
229
+ placement: m,
230
+ overflows: k
231
+ }], !k.every((O) => O <= 0)) {
232
+ var H, D;
233
+ const O = (((H = n.flip) == null ? void 0 : H.index) || 0) + 1, B = C[O];
234
+ if (B && (!(o === "alignment" ? y !== T(B) : !1) || // We leave the current main axis only if every placement on that axis
235
+ // overflows the main axis.
236
+ P.every((R) => T(R.placement) === y ? R.overflows[0] > 0 : !0)))
237
+ return {
238
+ data: {
239
+ index: O,
240
+ overflows: P
241
+ },
242
+ reset: {
243
+ placement: B
244
+ }
245
+ };
246
+ let E = (D = P.filter((S) => S.overflows[0] <= 0).sort((S, R) => S.overflows[1] - R.overflows[1])[0]) == null ? void 0 : D.placement;
247
+ if (!E)
248
+ switch (i) {
249
+ case "bestFit": {
250
+ var F;
251
+ const S = (F = P.filter((R) => {
252
+ if (b) {
253
+ const V = T(R.placement);
254
+ return V === y || // Create a bias to the `y` side axis due to horizontal
255
+ // reading directions favoring greater width.
256
+ V === "y";
257
+ }
258
+ return !0;
259
+ }).map((R) => [R.placement, R.overflows.filter((V) => V > 0).reduce((V, U) => V + U, 0)]).sort((R, V) => R[1] - V[1])[0]) == null ? void 0 : F[0];
260
+ S && (E = S);
261
+ break;
262
+ }
263
+ case "initialPlacement":
264
+ E = l;
265
+ break;
266
+ }
267
+ if (m !== E)
268
+ return {
269
+ reset: {
270
+ placement: E
271
+ }
272
+ };
273
+ }
274
+ return {};
275
+ }
276
+ };
277
+ };
278
+ function _(t, e) {
279
+ return {
280
+ top: t.top - e.height,
281
+ right: t.right - e.width,
282
+ bottom: t.bottom - e.height,
283
+ left: t.left - e.width
284
+ };
285
+ }
286
+ function q(t) {
287
+ return ie.some((e) => t[e] >= 0);
288
+ }
289
+ const fe = function(t) {
290
+ return t === void 0 && (t = {}), {
291
+ name: "hide",
292
+ options: t,
293
+ async fn(e) {
294
+ const {
295
+ rects: d,
296
+ platform: a
297
+ } = e, {
298
+ strategy: m = "referenceHidden",
299
+ ...n
300
+ } = L(t, e);
301
+ switch (m) {
302
+ case "referenceHidden": {
303
+ const s = await a.detectOverflow(e, {
304
+ ...n,
305
+ elementContext: "reference"
306
+ }), l = _(s, d.reference);
307
+ return {
308
+ data: {
309
+ referenceHiddenOffsets: l,
310
+ referenceHidden: q(l)
311
+ }
312
+ };
313
+ }
314
+ case "escaped": {
315
+ const s = await a.detectOverflow(e, {
316
+ ...n,
317
+ altBoundary: !0
318
+ }), l = _(s, d.floating);
319
+ return {
320
+ data: {
321
+ escapedOffsets: l,
322
+ escaped: q(l)
323
+ }
324
+ };
325
+ }
326
+ default:
327
+ return {};
328
+ }
329
+ }
330
+ };
331
+ }, Q = /* @__PURE__ */ new Set(["left", "top"]);
332
+ async function oe(t, e) {
333
+ const {
334
+ placement: d,
335
+ platform: a,
336
+ elements: m
337
+ } = t, n = await (a.isRTL == null ? void 0 : a.isRTL(m.floating)), s = j(d), l = z(d), g = T(d) === "y", p = Q.has(s) ? -1 : 1, r = n && g ? -1 : 1, o = L(e, t);
338
+ let {
339
+ mainAxis: f,
340
+ crossAxis: i,
341
+ alignmentAxis: c
342
+ } = typeof o == "number" ? {
343
+ mainAxis: o,
344
+ crossAxis: 0,
345
+ alignmentAxis: null
346
+ } : {
347
+ mainAxis: o.mainAxis || 0,
348
+ crossAxis: o.crossAxis || 0,
349
+ alignmentAxis: o.alignmentAxis
350
+ };
351
+ return l && typeof c == "number" && (i = l === "end" ? c * -1 : c), g ? {
352
+ x: i * r,
353
+ y: f * p
354
+ } : {
355
+ x: f * p,
356
+ y: i * r
357
+ };
358
+ }
359
+ const me = function(t) {
360
+ return t === void 0 && (t = 0), {
361
+ name: "offset",
362
+ options: t,
363
+ async fn(e) {
364
+ var d, a;
365
+ const {
366
+ x: m,
367
+ y: n,
368
+ placement: s,
369
+ middlewareData: l
370
+ } = e, g = await oe(e, t);
371
+ return s === ((d = l.offset) == null ? void 0 : d.placement) && (a = l.arrow) != null && a.alignmentOffset ? {} : {
372
+ x: m + g.x,
373
+ y: n + g.y,
374
+ data: {
375
+ ...g,
376
+ placement: s
377
+ }
378
+ };
379
+ }
380
+ };
381
+ }, de = function(t) {
382
+ return t === void 0 && (t = {}), {
383
+ name: "shift",
384
+ options: t,
385
+ async fn(e) {
386
+ const {
387
+ x: d,
388
+ y: a,
389
+ placement: m,
390
+ platform: n
391
+ } = e, {
392
+ mainAxis: s = !0,
393
+ crossAxis: l = !1,
394
+ limiter: g = {
395
+ fn: (v) => {
396
+ let {
397
+ x: y,
398
+ y: w
399
+ } = v;
400
+ return {
401
+ x: y,
402
+ y: w
403
+ };
404
+ }
405
+ },
406
+ ...p
407
+ } = L(t, e), r = {
408
+ x: d,
409
+ y: a
410
+ }, o = await n.detectOverflow(e, p), f = T(j(m)), i = N(f);
411
+ let c = r[i], u = r[f];
412
+ if (s) {
413
+ const v = i === "y" ? "top" : "left", y = i === "y" ? "bottom" : "right", w = c + o[v], h = c - o[y];
414
+ c = $(w, c, h);
415
+ }
416
+ if (l) {
417
+ const v = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", w = u + o[v], h = u - o[y];
418
+ u = $(w, u, h);
419
+ }
420
+ const x = g.fn({
421
+ ...e,
422
+ [i]: c,
423
+ [f]: u
424
+ });
425
+ return {
426
+ ...x,
427
+ data: {
428
+ x: x.x - d,
429
+ y: x.y - a,
430
+ enabled: {
431
+ [i]: s,
432
+ [f]: l
433
+ }
434
+ }
435
+ };
436
+ }
437
+ };
438
+ }, xe = function(t) {
439
+ return t === void 0 && (t = {}), {
440
+ options: t,
441
+ fn(e) {
442
+ const {
443
+ x: d,
444
+ y: a,
445
+ placement: m,
446
+ rects: n,
447
+ middlewareData: s
448
+ } = e, {
449
+ offset: l = 0,
450
+ mainAxis: g = !0,
451
+ crossAxis: p = !0
452
+ } = L(t, e), r = {
453
+ x: d,
454
+ y: a
455
+ }, o = T(m), f = N(o);
456
+ let i = r[f], c = r[o];
457
+ const u = L(l, e), x = typeof u == "number" ? {
458
+ mainAxis: u,
459
+ crossAxis: 0
460
+ } : {
461
+ mainAxis: 0,
462
+ crossAxis: 0,
463
+ ...u
464
+ };
465
+ if (g) {
466
+ const w = f === "y" ? "height" : "width", h = n.reference[f] - n.floating[w] + x.mainAxis, A = n.reference[f] + n.reference[w] - x.mainAxis;
467
+ i < h ? i = h : i > A && (i = A);
468
+ }
469
+ if (p) {
470
+ var v, y;
471
+ const w = f === "y" ? "width" : "height", h = Q.has(j(m)), A = n.reference[o] - n.floating[w] + (h && ((v = s.offset) == null ? void 0 : v[o]) || 0) + (h ? 0 : x.crossAxis), b = n.reference[o] + n.reference[w] + (h ? 0 : ((y = s.offset) == null ? void 0 : y[o]) || 0) - (h ? x.crossAxis : 0);
472
+ c < A ? c = A : c > b && (c = b);
473
+ }
474
+ return {
475
+ [f]: i,
476
+ [o]: c
477
+ };
478
+ }
479
+ };
480
+ }, ge = function(t) {
481
+ return t === void 0 && (t = {}), {
482
+ name: "size",
483
+ options: t,
484
+ async fn(e) {
485
+ var d, a;
486
+ const {
487
+ placement: m,
488
+ rects: n,
489
+ platform: s,
490
+ elements: l
491
+ } = e, {
492
+ apply: g = () => {
493
+ },
494
+ ...p
495
+ } = L(t, e), r = await s.detectOverflow(e, p), o = j(m), f = z(m), i = T(m) === "y", {
496
+ width: c,
497
+ height: u
498
+ } = n.floating;
499
+ let x, v;
500
+ o === "top" || o === "bottom" ? (x = o, v = f === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (v = o, x = f === "end" ? "top" : "bottom");
501
+ const y = u - r.top - r.bottom, w = c - r.left - r.right, h = Y(u - r[x], y), A = Y(c - r[v], w), b = !e.middlewareData.shift;
502
+ let C = h, M = A;
503
+ if ((d = e.middlewareData.shift) != null && d.enabled.x && (M = w), (a = e.middlewareData.shift) != null && a.enabled.y && (C = y), b && !f) {
504
+ const P = W(r.left, 0), H = W(r.right, 0), D = W(r.top, 0), F = W(r.bottom, 0);
505
+ i ? M = c - 2 * (P !== 0 || H !== 0 ? P + H : W(r.left, r.right)) : C = u - 2 * (D !== 0 || F !== 0 ? D + F : W(r.top, r.bottom));
506
+ }
507
+ await g({
508
+ ...e,
509
+ availableWidth: M,
510
+ availableHeight: C
511
+ });
512
+ const k = await s.getDimensions(l.floating);
513
+ return c !== k.width || u !== k.height ? {
514
+ reset: {
515
+ rects: !0
516
+ }
517
+ } : {};
518
+ }
519
+ };
520
+ };
521
+ export {
522
+ ce as arrow,
523
+ le as computePosition,
524
+ se as detectOverflow,
525
+ re as flip,
526
+ fe as hide,
527
+ xe as limitShift,
528
+ me as offset,
529
+ X as rectToClientRect,
530
+ de as shift,
531
+ ge as size
532
+ };