@bbki.ng/components 2.6.16 → 3.0.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 (149) hide show
  1. package/dist/Button.d.ts +1 -0
  2. package/dist/_virtual/_commonjsHelpers.mjs +6 -0
  3. package/dist/_virtual/index.mjs +4 -0
  4. package/dist/_virtual/jsx-runtime.mjs +7 -0
  5. package/dist/_virtual/jsx-runtime2.mjs +4 -0
  6. package/dist/_virtual/react-jsx-runtime.development.mjs +4 -0
  7. package/dist/_virtual/react-jsx-runtime.production.min.mjs +4 -0
  8. package/dist/article/Article.d.ts +11 -0
  9. package/dist/article/Article.mjs +43 -0
  10. package/dist/blink-dot/BlinkDot.d.ts +5 -0
  11. package/dist/blink-dot/BlinkDot.mjs +20 -0
  12. package/dist/blur-cover/BlurCover.d.ts +6 -0
  13. package/dist/blur-cover/BlurCover.mjs +28 -0
  14. package/dist/breadcrumb/Breadcrumb.d.ts +9 -0
  15. package/dist/breadcrumb/Breadcrumb.mjs +35 -0
  16. package/dist/button/Button.d.ts +18 -0
  17. package/dist/button/Button.mjs +35 -0
  18. package/dist/canvas/Canvas.d.ts +23 -0
  19. package/dist/canvas/Canvas.mjs +85 -0
  20. package/dist/canvas/useRenderer.d.ts +10 -0
  21. package/dist/canvas/useRenderer.mjs +31 -0
  22. package/dist/context-menu/index.d.ts +27 -0
  23. package/dist/context-menu/index.mjs +131 -0
  24. package/dist/drop-image/DropImage.d.ts +25 -0
  25. package/dist/drop-image/DropImage.mjs +151 -0
  26. package/dist/drop-image/useDropImage.d.ts +19 -0
  27. package/dist/drop-image/useDropImage.mjs +67 -0
  28. package/dist/drop-image/utils.d.ts +2 -0
  29. package/dist/drop-image/utils.mjs +4 -0
  30. package/dist/drop-zone/DropZone.d.ts +9 -0
  31. package/dist/drop-zone/DropZone.mjs +44 -0
  32. package/dist/img/Gallery.d.ts +11 -0
  33. package/dist/img/Gallery.mjs +37 -0
  34. package/dist/img/Img.d.ts +3 -0
  35. package/dist/img/Img.mjs +80 -0
  36. package/dist/img/RandomRowsLayout.d.ts +9 -0
  37. package/dist/img/RandomRowsLayout.mjs +49 -0
  38. package/dist/img/types.d.ts +21 -0
  39. package/dist/img/types.mjs +4 -0
  40. package/dist/img/utils.d.ts +7 -0
  41. package/dist/img/utils.mjs +15 -0
  42. package/dist/index.d.ts +25 -380
  43. package/dist/index.mjs +79 -0
  44. package/dist/input/index.d.ts +3 -0
  45. package/dist/input/index.mjs +17 -0
  46. package/dist/label/index.d.ts +5 -0
  47. package/dist/label/index.mjs +17 -0
  48. package/dist/layout/layout.d.ts +7 -0
  49. package/dist/layout/layout.mjs +27 -0
  50. package/dist/link/Link.d.ts +17 -0
  51. package/dist/link/Link.mjs +83 -0
  52. package/dist/list/list.d.ts +23 -0
  53. package/dist/list/list.mjs +76 -0
  54. package/dist/loading-spiral/LoadingSpiral.d.ts +5 -0
  55. package/dist/loading-spiral/LoadingSpiral.mjs +37 -0
  56. package/dist/loading-spiral/constants.d.ts +6 -0
  57. package/dist/loading-spiral/constants.mjs +61 -0
  58. package/dist/loading-spiral/createOptions.d.ts +17 -0
  59. package/dist/loading-spiral/createOptions.mjs +30 -0
  60. package/dist/loading-spiral/createSettings.d.ts +16 -0
  61. package/dist/loading-spiral/createSettings.mjs +21 -0
  62. package/dist/loading-spiral/useCanvasRef.d.ts +4 -0
  63. package/dist/loading-spiral/utils.d.ts +1 -0
  64. package/dist/logo/Logo.d.ts +6 -0
  65. package/dist/logo/Logo.mjs +36 -0
  66. package/dist/nav/Nav.d.ts +10 -0
  67. package/dist/nav/Nav.mjs +27 -0
  68. package/dist/node_modules/.pnpm/@babel_runtime@7.18.9/node_modules/@babel/runtime/helpers/esm/extends.mjs +13 -0
  69. package/dist/node_modules/.pnpm/@floating-ui_core@1.6.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +519 -0
  70. package/dist/node_modules/.pnpm/@floating-ui_dom@1.6.3/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +373 -0
  71. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.0.8_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +182 -0
  72. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +108 -0
  73. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +120 -0
  74. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.0.1/node_modules/@radix-ui/primitive/dist/index.mjs +9 -0
  75. package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.0.3_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-arrow/dist/index.mjs +19 -0
  76. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.0.3_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom_04e7d2b59cf7ec97f40d26a998d7601d/node_modules/@radix-ui/react-collection/dist/index.mjs +60 -0
  77. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +16 -0
  78. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +25 -0
  79. package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.1.5_@types_react-dom@18.0.6_@types_react@18.0.15_react-d_1ce4db5e792f73d797e22c043cc3d326/node_modules/@radix-ui/react-context-menu/dist/index.mjs +213 -0
  80. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.mjs +88 -0
  81. package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-direction/dist/index.mjs +9 -0
  82. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.5_@types_react-dom@18.0.6_@types_react@18.0.15_re_0263a24376d55e4c2bb8fa2f75f1db3c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +136 -0
  83. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +20 -0
  84. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.4_@types_react-dom@18.0.6_@types_react@18.0.15_react-do_a79d961df31bbecb3b2c94878dbb0724/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +188 -0
  85. package/dist/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.mjs +61 -0
  86. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.mjs +18 -0
  87. package/dist/node_modules/.pnpm/@radix-ui_react-label@2.1.1_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-label/dist/index.mjs +20 -0
  88. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.0.6_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-menu/dist/index.mjs +657 -0
  89. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.1.3_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-popper/dist/index.mjs +218 -0
  90. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.0.4_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.mjs +14 -0
  91. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.0.1_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.mjs +81 -0
  92. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@1.0.3_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs +44 -0
  93. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.1_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs +31 -0
  94. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.0.4_@types_react-dom@18.0.6_@types_react@18.0.15_react-d_69cf2e3e4b4e2c2fefdb8ea262543b5e/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +199 -0
  95. package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.0.2_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs +53 -0
  96. package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.1.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs +48 -0
  97. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +16 -0
  98. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +37 -0
  99. package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.3_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs +17 -0
  100. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +6 -0
  101. package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-size/dist/index.mjs +37 -0
  102. package/dist/node_modules/.pnpm/aria-hidden@1.2.3/node_modules/aria-hidden/dist/es2015/index.mjs +49 -0
  103. package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs +6 -0
  104. package/dist/node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.mjs +40 -0
  105. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs +23 -0
  106. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.mjs +7 -0
  107. package/dist/node_modules/.pnpm/phenomenon@1.6.0/node_modules/phenomenon/dist/phenomenon.mjs +109 -0
  108. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll-bar/dist/es2015/component.mjs +61 -0
  109. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.mjs +7 -0
  110. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.mjs +25 -0
  111. package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.mjs +17 -0
  112. package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.mjs +116 -0
  113. package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.mjs +46 -0
  114. package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.mjs +16 -0
  115. package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.mjs +62 -0
  116. package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.mjs +5 -0
  117. package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.mjs +7 -0
  118. package/dist/node_modules/.pnpm/react-style-singleton@2.2.1_@types_react@18.0.15_react@18.2.0/node_modules/react-style-singleton/dist/es2015/component.mjs +11 -0
  119. package/dist/node_modules/.pnpm/react-style-singleton@2.2.1_@types_react@18.0.15_react@18.2.0/node_modules/react-style-singleton/dist/es2015/hook.mjs +15 -0
  120. package/dist/node_modules/.pnpm/react-style-singleton@2.2.1_@types_react@18.0.15_react@18.2.0/node_modules/react-style-singleton/dist/es2015/singleton.mjs +30 -0
  121. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.mjs +589 -0
  122. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.mjs +32 -0
  123. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.mjs +8 -0
  124. package/dist/node_modules/.pnpm/tslib@2.4.1/node_modules/tslib/tslib.es6.mjs +29 -0
  125. package/dist/node_modules/.pnpm/use-callback-ref@1.3.1_@types_react@18.0.15_react@18.2.0/node_modules/use-callback-ref/dist/es2015/assignRef.mjs +6 -0
  126. package/dist/node_modules/.pnpm/use-callback-ref@1.3.1_@types_react@18.0.15_react@18.2.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.mjs +26 -0
  127. package/dist/node_modules/.pnpm/use-callback-ref@1.3.1_@types_react@18.0.15_react@18.2.0/node_modules/use-callback-ref/dist/es2015/useRef.mjs +25 -0
  128. package/dist/node_modules/.pnpm/use-sidecar@1.1.2_@types_react@18.0.15_react@18.2.0/node_modules/use-sidecar/dist/es2015/exports.mjs +21 -0
  129. package/dist/node_modules/.pnpm/use-sidecar@1.1.2_@types_react@18.0.15_react@18.2.0/node_modules/use-sidecar/dist/es2015/medium.mjs +67 -0
  130. package/dist/page/Page.d.ts +28 -0
  131. package/dist/page/Page.mjs +67 -0
  132. package/dist/panel/Panel.d.ts +6 -0
  133. package/dist/panel/Panel.mjs +17 -0
  134. package/dist/pop-confirm/PopConfirm.d.ts +10 -0
  135. package/dist/pop-confirm/PopConfirm.mjs +40 -0
  136. package/dist/skeleton/Seleton.d.ts +23 -0
  137. package/dist/skeleton/Seleton.mjs +69 -0
  138. package/dist/spinner/Spinner.d.ts +7 -0
  139. package/dist/table/Table.d.ts +18 -0
  140. package/dist/table/Table.mjs +34 -0
  141. package/dist/tag/Tag.d.ts +10 -0
  142. package/dist/tag/Tag.mjs +33 -0
  143. package/package.json +22 -13
  144. package/dist/index.cjs +0 -1816
  145. package/dist/index.cjs.map +0 -1
  146. package/dist/index.css +0 -1821
  147. package/dist/index.css.map +0 -1
  148. package/dist/index.js +0 -1738
  149. package/dist/index.js.map +0 -1
@@ -0,0 +1,27 @@
1
+ import { Breadcrumb as m } from "../breadcrumb/Breadcrumb.mjs";
2
+ import { Logo as i } from "../logo/Logo.mjs";
3
+ import { useNavigate as s } from "react-router-dom";
4
+ import { jsx as e, jsxs as l } from "../_virtual/jsx-runtime.mjs";
5
+ const f = (a) => {
6
+ const t = s();
7
+ return a.mini ? /* @__PURE__ */ e("div", {
8
+ className: `p-8 w-full flex items-center ${a.className}`,
9
+ children: /* @__PURE__ */ e(m, {
10
+ paths: a.paths
11
+ })
12
+ }) : /* @__PURE__ */ l("div", {
13
+ className: `p-8 w-full flex items-center ${a.className}`,
14
+ children: [a.customLogo || /* @__PURE__ */ e(i, {
15
+ className: "mr-8",
16
+ onClick: () => {
17
+ t("/");
18
+ }
19
+ }), /* @__PURE__ */ e(m, {
20
+ paths: a.paths,
21
+ loading: a.loading
22
+ })]
23
+ });
24
+ };
25
+ export {
26
+ f as Nav
27
+ };
@@ -0,0 +1,13 @@
1
+ function e() {
2
+ return e = Object.assign ? Object.assign.bind() : function(a) {
3
+ for (var n = 1; n < arguments.length; n++) {
4
+ var t = arguments[n];
5
+ for (var r in t)
6
+ Object.prototype.hasOwnProperty.call(t, r) && (a[r] = t[r]);
7
+ }
8
+ return a;
9
+ }, e.apply(this, arguments);
10
+ }
11
+ export {
12
+ e as default
13
+ };
@@ -0,0 +1,519 @@
1
+ import { evaluate as M, getSideAxis as j, getSide as T, clamp as z, getOppositePlacement as U, getExpandedPlacements as Z, getOppositeAxisPlacements as _, getAlignmentSides as ee, getAlignment as Y, max as L, getPaddingObject as G, rectToClientRect as X, getOppositeAxis as J, getAlignmentAxis as K, sides as te, getAxisLength as N, min as W } from "../../../../../@floating-ui_utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs";
2
+ function I(t, e, d) {
3
+ let {
4
+ reference: s,
5
+ floating: r
6
+ } = t;
7
+ const n = j(e), c = K(e), m = N(c), l = T(e), u = n === "y", g = s.x + s.width / 2 - r.width / 2, a = s.y + s.height / 2 - r.height / 2, f = s[m] / 2 - r[m] / 2;
8
+ let i;
9
+ switch (l) {
10
+ case "top":
11
+ i = {
12
+ x: g,
13
+ y: s.y - r.height
14
+ };
15
+ break;
16
+ case "bottom":
17
+ i = {
18
+ x: g,
19
+ y: s.y + s.height
20
+ };
21
+ break;
22
+ case "right":
23
+ i = {
24
+ x: s.x + s.width,
25
+ y: a
26
+ };
27
+ break;
28
+ case "left":
29
+ i = {
30
+ x: s.x - r.width,
31
+ y: a
32
+ };
33
+ break;
34
+ default:
35
+ i = {
36
+ x: s.x,
37
+ y: s.y
38
+ };
39
+ }
40
+ switch (Y(e)) {
41
+ case "start":
42
+ i[c] -= f * (d && u ? -1 : 1);
43
+ break;
44
+ case "end":
45
+ i[c] += f * (d && u ? -1 : 1);
46
+ break;
47
+ }
48
+ return i;
49
+ }
50
+ const se = async (t, e, d) => {
51
+ const {
52
+ placement: s = "bottom",
53
+ strategy: r = "absolute",
54
+ middleware: n = [],
55
+ platform: c
56
+ } = d, m = n.filter(Boolean), l = await (c.isRTL == null ? void 0 : c.isRTL(e));
57
+ let u = await c.getElementRects({
58
+ reference: t,
59
+ floating: e,
60
+ strategy: r
61
+ }), {
62
+ x: g,
63
+ y: a
64
+ } = I(u, s, l), f = s, i = {}, o = 0;
65
+ for (let w = 0; w < m.length; w++) {
66
+ const {
67
+ name: x,
68
+ fn: v
69
+ } = m[w], {
70
+ x: A,
71
+ y: h,
72
+ data: y,
73
+ reset: p
74
+ } = await v({
75
+ x: g,
76
+ y: a,
77
+ initialPlacement: s,
78
+ placement: f,
79
+ strategy: r,
80
+ middlewareData: i,
81
+ rects: u,
82
+ platform: c,
83
+ elements: {
84
+ reference: t,
85
+ floating: e
86
+ }
87
+ });
88
+ g = A ?? g, a = h ?? a, i = {
89
+ ...i,
90
+ [x]: {
91
+ ...i[x],
92
+ ...y
93
+ }
94
+ }, p && o <= 50 && (o++, typeof p == "object" && (p.placement && (f = p.placement), p.rects && (u = p.rects === !0 ? await c.getElementRects({
95
+ reference: t,
96
+ floating: e,
97
+ strategy: r
98
+ }) : p.rects), {
99
+ x: g,
100
+ y: a
101
+ } = I(u, f, l)), w = -1);
102
+ }
103
+ return {
104
+ x: g,
105
+ y: a,
106
+ placement: f,
107
+ strategy: r,
108
+ middlewareData: i
109
+ };
110
+ };
111
+ async function F(t, e) {
112
+ var d;
113
+ e === void 0 && (e = {});
114
+ const {
115
+ x: s,
116
+ y: r,
117
+ platform: n,
118
+ rects: c,
119
+ elements: m,
120
+ strategy: l
121
+ } = t, {
122
+ boundary: u = "clippingAncestors",
123
+ rootBoundary: g = "viewport",
124
+ elementContext: a = "floating",
125
+ altBoundary: f = !1,
126
+ padding: i = 0
127
+ } = M(e, t), o = G(i), x = m[f ? a === "floating" ? "reference" : "floating" : a], v = X(await n.getClippingRect({
128
+ element: (d = await (n.isElement == null ? void 0 : n.isElement(x))) == null || d ? x : x.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(m.floating)),
129
+ boundary: u,
130
+ rootBoundary: g,
131
+ strategy: l
132
+ })), A = a === "floating" ? {
133
+ ...c.floating,
134
+ x: s,
135
+ y: r
136
+ } : c.reference, h = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(m.floating)), y = await (n.isElement == null ? void 0 : n.isElement(h)) ? await (n.getScale == null ? void 0 : n.getScale(h)) || {
137
+ x: 1,
138
+ y: 1
139
+ } : {
140
+ x: 1,
141
+ y: 1
142
+ }, p = X(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({
143
+ elements: m,
144
+ rect: A,
145
+ offsetParent: h,
146
+ strategy: l
147
+ }) : A);
148
+ return {
149
+ top: (v.top - p.top + o.top) / y.y,
150
+ bottom: (p.bottom - v.bottom + o.bottom) / y.y,
151
+ left: (v.left - p.left + o.left) / y.x,
152
+ right: (p.right - v.right + o.right) / y.x
153
+ };
154
+ }
155
+ const oe = (t) => ({
156
+ name: "arrow",
157
+ options: t,
158
+ async fn(e) {
159
+ const {
160
+ x: d,
161
+ y: s,
162
+ placement: r,
163
+ rects: n,
164
+ platform: c,
165
+ elements: m,
166
+ middlewareData: l
167
+ } = e, {
168
+ element: u,
169
+ padding: g = 0
170
+ } = M(t, e) || {};
171
+ if (u == null)
172
+ return {};
173
+ const a = G(g), f = {
174
+ x: d,
175
+ y: s
176
+ }, i = K(r), o = N(i), w = await c.getDimensions(u), x = i === "y", v = x ? "top" : "left", A = x ? "bottom" : "right", h = x ? "clientHeight" : "clientWidth", y = n.reference[o] + n.reference[i] - f[i] - n.floating[o], p = f[i] - n.reference[i], b = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(u));
177
+ let O = b ? b[h] : 0;
178
+ (!O || !await (c.isElement == null ? void 0 : c.isElement(b))) && (O = m.floating[h] || n.floating[o]);
179
+ const R = y / 2 - p / 2, E = O / 2 - w[o] / 2 - 1, H = W(a[v], E), V = W(a[A], E), C = H, B = O - w[o] - V, P = O / 2 - w[o] / 2 + R, S = z(C, P, B), k = !l.arrow && Y(r) != null && P !== S && n.reference[o] / 2 - (P < C ? H : V) - w[o] / 2 < 0, D = k ? P < C ? P - C : P - B : 0;
180
+ return {
181
+ [i]: f[i] + D,
182
+ data: {
183
+ [i]: S,
184
+ centerOffset: P - S - D,
185
+ ...k && {
186
+ alignmentOffset: D
187
+ }
188
+ },
189
+ reset: k
190
+ };
191
+ }
192
+ }), ce = function(t) {
193
+ return t === void 0 && (t = {}), {
194
+ name: "flip",
195
+ options: t,
196
+ async fn(e) {
197
+ var d, s;
198
+ const {
199
+ placement: r,
200
+ middlewareData: n,
201
+ rects: c,
202
+ initialPlacement: m,
203
+ platform: l,
204
+ elements: u
205
+ } = e, {
206
+ mainAxis: g = !0,
207
+ crossAxis: a = !0,
208
+ fallbackPlacements: f,
209
+ fallbackStrategy: i = "bestFit",
210
+ fallbackAxisSideDirection: o = "none",
211
+ flipAlignment: w = !0,
212
+ ...x
213
+ } = M(t, e);
214
+ if ((d = n.arrow) != null && d.alignmentOffset)
215
+ return {};
216
+ const v = T(r), A = T(m) === m, h = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), y = f || (A || !w ? [U(m)] : Z(m));
217
+ !f && o !== "none" && y.push(..._(m, w, o, h));
218
+ const p = [m, ...y], b = await F(e, x), O = [];
219
+ let R = ((s = n.flip) == null ? void 0 : s.overflows) || [];
220
+ if (g && O.push(b[v]), a) {
221
+ const C = ee(r, c, h);
222
+ O.push(b[C[0]], b[C[1]]);
223
+ }
224
+ if (R = [...R, {
225
+ placement: r,
226
+ overflows: O
227
+ }], !O.every((C) => C <= 0)) {
228
+ var E, H;
229
+ const C = (((E = n.flip) == null ? void 0 : E.index) || 0) + 1, B = p[C];
230
+ if (B)
231
+ return {
232
+ data: {
233
+ index: C,
234
+ overflows: R
235
+ },
236
+ reset: {
237
+ placement: B
238
+ }
239
+ };
240
+ let P = (H = R.filter((S) => S.overflows[0] <= 0).sort((S, k) => S.overflows[1] - k.overflows[1])[0]) == null ? void 0 : H.placement;
241
+ if (!P)
242
+ switch (i) {
243
+ case "bestFit": {
244
+ var V;
245
+ const S = (V = R.map((k) => [k.placement, k.overflows.filter((D) => D > 0).reduce((D, Q) => D + Q, 0)]).sort((k, D) => k[1] - D[1])[0]) == null ? void 0 : V[0];
246
+ S && (P = S);
247
+ break;
248
+ }
249
+ case "initialPlacement":
250
+ P = m;
251
+ break;
252
+ }
253
+ if (r !== P)
254
+ return {
255
+ reset: {
256
+ placement: P
257
+ }
258
+ };
259
+ }
260
+ return {};
261
+ }
262
+ };
263
+ };
264
+ function $(t, e) {
265
+ return {
266
+ top: t.top - e.height,
267
+ right: t.right - e.width,
268
+ bottom: t.bottom - e.height,
269
+ left: t.left - e.width
270
+ };
271
+ }
272
+ function q(t) {
273
+ return te.some((e) => t[e] >= 0);
274
+ }
275
+ const le = function(t) {
276
+ return t === void 0 && (t = {}), {
277
+ name: "hide",
278
+ options: t,
279
+ async fn(e) {
280
+ const {
281
+ rects: d
282
+ } = e, {
283
+ strategy: s = "referenceHidden",
284
+ ...r
285
+ } = M(t, e);
286
+ switch (s) {
287
+ case "referenceHidden": {
288
+ const n = await F(e, {
289
+ ...r,
290
+ elementContext: "reference"
291
+ }), c = $(n, d.reference);
292
+ return {
293
+ data: {
294
+ referenceHiddenOffsets: c,
295
+ referenceHidden: q(c)
296
+ }
297
+ };
298
+ }
299
+ case "escaped": {
300
+ const n = await F(e, {
301
+ ...r,
302
+ altBoundary: !0
303
+ }), c = $(n, d.floating);
304
+ return {
305
+ data: {
306
+ escapedOffsets: c,
307
+ escaped: q(c)
308
+ }
309
+ };
310
+ }
311
+ default:
312
+ return {};
313
+ }
314
+ }
315
+ };
316
+ };
317
+ async function ne(t, e) {
318
+ const {
319
+ placement: d,
320
+ platform: s,
321
+ elements: r
322
+ } = t, n = await (s.isRTL == null ? void 0 : s.isRTL(r.floating)), c = T(d), m = Y(d), l = j(d) === "y", u = ["left", "top"].includes(c) ? -1 : 1, g = n && l ? -1 : 1, a = M(e, t);
323
+ let {
324
+ mainAxis: f,
325
+ crossAxis: i,
326
+ alignmentAxis: o
327
+ } = typeof a == "number" ? {
328
+ mainAxis: a,
329
+ crossAxis: 0,
330
+ alignmentAxis: null
331
+ } : {
332
+ mainAxis: 0,
333
+ crossAxis: 0,
334
+ alignmentAxis: null,
335
+ ...a
336
+ };
337
+ return m && typeof o == "number" && (i = m === "end" ? o * -1 : o), l ? {
338
+ x: i * g,
339
+ y: f * u
340
+ } : {
341
+ x: f * u,
342
+ y: i * g
343
+ };
344
+ }
345
+ const ae = function(t) {
346
+ return t === void 0 && (t = 0), {
347
+ name: "offset",
348
+ options: t,
349
+ async fn(e) {
350
+ var d, s;
351
+ const {
352
+ x: r,
353
+ y: n,
354
+ placement: c,
355
+ middlewareData: m
356
+ } = e, l = await ne(e, t);
357
+ return c === ((d = m.offset) == null ? void 0 : d.placement) && (s = m.arrow) != null && s.alignmentOffset ? {} : {
358
+ x: r + l.x,
359
+ y: n + l.y,
360
+ data: {
361
+ ...l,
362
+ placement: c
363
+ }
364
+ };
365
+ }
366
+ };
367
+ }, re = function(t) {
368
+ return t === void 0 && (t = {}), {
369
+ name: "shift",
370
+ options: t,
371
+ async fn(e) {
372
+ const {
373
+ x: d,
374
+ y: s,
375
+ placement: r
376
+ } = e, {
377
+ mainAxis: n = !0,
378
+ crossAxis: c = !1,
379
+ limiter: m = {
380
+ fn: (x) => {
381
+ let {
382
+ x: v,
383
+ y: A
384
+ } = x;
385
+ return {
386
+ x: v,
387
+ y: A
388
+ };
389
+ }
390
+ },
391
+ ...l
392
+ } = M(t, e), u = {
393
+ x: d,
394
+ y: s
395
+ }, g = await F(e, l), a = j(T(r)), f = J(a);
396
+ let i = u[f], o = u[a];
397
+ if (n) {
398
+ const x = f === "y" ? "top" : "left", v = f === "y" ? "bottom" : "right", A = i + g[x], h = i - g[v];
399
+ i = z(A, i, h);
400
+ }
401
+ if (c) {
402
+ const x = a === "y" ? "top" : "left", v = a === "y" ? "bottom" : "right", A = o + g[x], h = o - g[v];
403
+ o = z(A, o, h);
404
+ }
405
+ const w = m.fn({
406
+ ...e,
407
+ [f]: i,
408
+ [a]: o
409
+ });
410
+ return {
411
+ ...w,
412
+ data: {
413
+ x: w.x - d,
414
+ y: w.y - s
415
+ }
416
+ };
417
+ }
418
+ };
419
+ }, fe = function(t) {
420
+ return t === void 0 && (t = {}), {
421
+ options: t,
422
+ fn(e) {
423
+ const {
424
+ x: d,
425
+ y: s,
426
+ placement: r,
427
+ rects: n,
428
+ middlewareData: c
429
+ } = e, {
430
+ offset: m = 0,
431
+ mainAxis: l = !0,
432
+ crossAxis: u = !0
433
+ } = M(t, e), g = {
434
+ x: d,
435
+ y: s
436
+ }, a = j(r), f = J(a);
437
+ let i = g[f], o = g[a];
438
+ const w = M(m, e), x = typeof w == "number" ? {
439
+ mainAxis: w,
440
+ crossAxis: 0
441
+ } : {
442
+ mainAxis: 0,
443
+ crossAxis: 0,
444
+ ...w
445
+ };
446
+ if (l) {
447
+ const h = f === "y" ? "height" : "width", y = n.reference[f] - n.floating[h] + x.mainAxis, p = n.reference[f] + n.reference[h] - x.mainAxis;
448
+ i < y ? i = y : i > p && (i = p);
449
+ }
450
+ if (u) {
451
+ var v, A;
452
+ const h = f === "y" ? "width" : "height", y = ["top", "left"].includes(T(r)), p = n.reference[a] - n.floating[h] + (y && ((v = c.offset) == null ? void 0 : v[a]) || 0) + (y ? 0 : x.crossAxis), b = n.reference[a] + n.reference[h] + (y ? 0 : ((A = c.offset) == null ? void 0 : A[a]) || 0) - (y ? x.crossAxis : 0);
453
+ o < p ? o = p : o > b && (o = b);
454
+ }
455
+ return {
456
+ [f]: i,
457
+ [a]: o
458
+ };
459
+ }
460
+ };
461
+ }, me = function(t) {
462
+ return t === void 0 && (t = {}), {
463
+ name: "size",
464
+ options: t,
465
+ async fn(e) {
466
+ const {
467
+ placement: d,
468
+ rects: s,
469
+ platform: r,
470
+ elements: n
471
+ } = e, {
472
+ apply: c = () => {
473
+ },
474
+ ...m
475
+ } = M(t, e), l = await F(e, m), u = T(d), g = Y(d), a = j(d) === "y", {
476
+ width: f,
477
+ height: i
478
+ } = s.floating;
479
+ let o, w;
480
+ u === "top" || u === "bottom" ? (o = u, w = g === (await (r.isRTL == null ? void 0 : r.isRTL(n.floating)) ? "start" : "end") ? "left" : "right") : (w = u, o = g === "end" ? "top" : "bottom");
481
+ const x = i - l[o], v = f - l[w], A = !e.middlewareData.shift;
482
+ let h = x, y = v;
483
+ if (a) {
484
+ const b = f - l.left - l.right;
485
+ y = g || A ? W(v, b) : b;
486
+ } else {
487
+ const b = i - l.top - l.bottom;
488
+ h = g || A ? W(x, b) : b;
489
+ }
490
+ if (A && !g) {
491
+ const b = L(l.left, 0), O = L(l.right, 0), R = L(l.top, 0), E = L(l.bottom, 0);
492
+ a ? y = f - 2 * (b !== 0 || O !== 0 ? b + O : L(l.left, l.right)) : h = i - 2 * (R !== 0 || E !== 0 ? R + E : L(l.top, l.bottom));
493
+ }
494
+ await c({
495
+ ...e,
496
+ availableWidth: y,
497
+ availableHeight: h
498
+ });
499
+ const p = await r.getDimensions(n.floating);
500
+ return f !== p.width || i !== p.height ? {
501
+ reset: {
502
+ rects: !0
503
+ }
504
+ } : {};
505
+ }
506
+ };
507
+ };
508
+ export {
509
+ oe as arrow,
510
+ se as computePosition,
511
+ F as detectOverflow,
512
+ ce as flip,
513
+ le as hide,
514
+ fe as limitShift,
515
+ ae as offset,
516
+ X as rectToClientRect,
517
+ re as shift,
518
+ me as size
519
+ };