@inspirare/design-system 0.0.17 → 0.0.19
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.
- package/dist/index.d.ts +3 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.js +359 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +328 -0
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1._f1bed12861163fa290e602839f1ebdb9/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +212 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +97 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +106 -0
- package/dist/node_modules/.pnpm/@radix-ui_number@1.1.2/node_modules/@radix-ui/number/dist/index.js +6 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.4/node_modules/@radix-ui/primitive/dist/index.js +8 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-accordion@1_90771884ca9639bf31e5f01b1faf83e4/node_modules/@radix-ui/react-accordion/dist/index.js +195 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialo_0211f1deb04a7e512244dbbc3e4765ed/node_modules/@radix-ui/react-alert-dialog/dist/index.js +119 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.1.9_b34b7156178de4198a23e93f83c57da5/node_modules/@radix-ui/react-arrow/dist/index.js +20 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-aspect-rati_62430dda2e5090a076c492dea1ecc5d8/node_modules/@radix-ui/react-aspect-ratio/dist/index.js +31 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.1._d460f1c45278b86e7424fb8ae25577de/node_modules/@radix-ui/react-avatar/dist/index.js +73 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-checkbox@1._e21be6412c310c083d6755285c4c1ad9/node_modules/@radix-ui/react-checkbox/dist/index.js +158 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-collapsible_d381d44d4b8a6d58d9dfaae3a0126ca3/node_modules/@radix-ui/react-collapsible/dist/index.js +97 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-collection@_9d7b7379fb7a1e56af9d4a8d107ecba8/node_modules/@radix-ui/react-collection/dist/index.js +62 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-ref_1124f78b370d43bfeceaaa9b791be73d/node_modules/@radix-ui/react-compose-refs/dist/index.js +25 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context-men_f76d1e5eaec57e990fe72d3c41a037df/node_modules/@radix-ui/react-context-menu/dist/index.js +240 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1_796eddd33de3050019fa09b10c68d7ca/node_modules/@radix-ui/react-context/dist/index.js +80 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1._ef5419b1d5914b6ed85fc377af02cd8c/node_modules/@radix-ui/react-dialog/dist/index.js +225 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-direction@1_2157d1ab8e201288009ff536bb11c468/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable_1202449cfd75d4d3d4e876187986c0d8/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +108 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dropdown-me_9dd0889a66ea847559fd572aaa20379b/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +225 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guard_6b3d65e71789b2986a17d5efdb8859bf/node_modules/@radix-ui/react-focus-guards/dist/index.js +22 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope_c97f9e7487f0abcea30d185973e4d237/node_modules/@radix-ui/react-focus-scope/dist/index.js +146 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@_8a3f4d1399bacc84c908e03b45229f87/node_modules/@radix-ui/react-hover-card/dist/index.js +161 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.2_@types_react@18.3.31_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.js +12 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-label@2.1.9_386dd2eabe41e70ee233c5790da58dd5/node_modules/@radix-ui/react-label/dist/index.js +16 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.17_cc73edd868dbfc82392e3731b66f2e59/node_modules/@radix-ui/react-menu/dist/index.js +563 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1_52e1207bf5981387ca85fb7a6f7b2195/node_modules/@radix-ui/react-menubar/dist/index.js +312 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-navigation-_ce246f1abffb4c1bd00bc4d15b1887f5/node_modules/@radix-ui/react-navigation-menu/dist/index.js +553 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popover@1.1_0f96f9f03b66af70568af721c965c5cd/node_modules/@radix-ui/react-popover/dist/index.js +199 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3._bd7668c1d3a757f9e8c97f0d7e635b5d/node_modules/@radix-ui/react-popper/dist/index.js +203 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1._32b1caf40ac61f8d30d412d28d60b4ca/node_modules/@radix-ui/react-portal/dist/index.js +19 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1._dc6e30df35507eb8a116c12c3da26e18/node_modules/@radix-ui/react-presence/dist/index.js +85 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2_9b6ae4cdaf3918ddbf0b21069e38e2ef/node_modules/@radix-ui/react-primitive/dist/index.js +41 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-progress@1._4cd7f31ebaa5416f0f0f54265ec22793/node_modules/@radix-ui/react-progress/dist/index.js +71 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-radio-group_385226f717d657e4aea3688d6214f1c0/node_modules/@radix-ui/react-radio-group/dist/index.js +249 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-roving-focu_d783d3abe701a7f2fb2c68867b8f1f65/node_modules/@radix-ui/react-roving-focus/dist/index.js +154 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-select@2.3._b9232b5aa23e604443839e7a081b7527/node_modules/@radix-ui/react-select/dist/index.js +727 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-separator@1_f5efb6a4d38fd7cb82808cb6f7a6326a/node_modules/@radix-ui/react-separator/dist/index.js +23 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4._cfb70bb4d45c3eedb16b2d4d4cf80f46/node_modules/@radix-ui/react-slider/dist/index.js +404 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.5_@types_react@18.3.31_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.js +71 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3._d2f9574497ecbe08e0e7c2298fb35dc1/node_modules/@radix-ui/react-switch/dist/index.js +138 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.14_769bbb0130198553b196f258bd99ab92/node_modules/@radix-ui/react-tabs/dist/index.js +120 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle-grou_9d4cd233d31c4687b287c174e894620a/node_modules/@radix-ui/react-toggle-group/dist/index.js +125 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1._afb5f705be3deb4ba78b89b6c70d5cf9/node_modules/@radix-ui/react-toggle/dist/index.js +30 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-tooltip@1.2_02a5bba0cb45f3ddbe548efab47eabcc/node_modules/@radix-ui/react-tooltip/dist/index.js +351 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callbac_5106d65c013fadfe178f87486239c7af/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-control_e3b0d353471f209a120bf58c8d35c552/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +45 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-_c83bcf92add652965a36806e6d79891c/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydr_d8b55bd05f5d50f7ea21f52744760552/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +19 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-_ad41f999ca2019252b887df955038ce1/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +5 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-previou_58b78c95af3b98dc4c1bc8bce73c779d/node_modules/@radix-ui/react-use-previous/dist/index.js +11 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1._4b75a7cfb879b922004e7a6caa492077/node_modules/@radix-ui/react-use-size/dist/index.js +29 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hi_fbf0dd0d68bb58b2410fc7a153ed1d9c/node_modules/@radix-ui/react-visually-hidden/dist/index.js +27 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +46 -0
- package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js +33 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +7 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/component.js +70 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +4 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/index.js +3 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +27 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js +14 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +116 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js +52 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +13 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +52 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/index.js +3 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/singleton.js +28 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +19 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@18.3.31_react@18.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@18.3.31_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@18.3.31_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js +22 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@18.3.31_react@18.3.1/node_modules/use-sidecar/dist/es2015/exports.js +16 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@18.3.31_react@18.3.1/node_modules/use-sidecar/dist/es2015/medium.js +69 -0
- package/dist/src/components/ui/accessibility-improvements.js +60 -0
- package/dist/src/components/ui/accordion.js +44 -0
- package/dist/src/components/ui/alert-dialog.js +61 -0
- package/dist/src/components/ui/alert.js +32 -0
- package/dist/src/components/ui/aspect-ratio.js +6 -0
- package/dist/src/components/ui/avatar.js +29 -0
- package/dist/src/components/ui/badge.js +24 -0
- package/dist/src/components/ui/breadcrumb.js +60 -0
- package/dist/src/components/ui/button-group.js +38 -0
- package/dist/src/components/ui/button.js +41 -0
- package/dist/src/components/ui/calendar.js +89 -0
- package/dist/src/components/ui/card.js +55 -0
- package/dist/src/components/ui/carousel.js +116 -0
- package/dist/src/components/ui/chart.js +128 -0
- package/dist/src/components/ui/checkbox.js +21 -0
- package/dist/src/components/ui/collapsible.js +26 -0
- package/dist/src/components/ui/color-picker.js +133 -0
- package/dist/src/components/ui/combobox.js +42 -0
- package/dist/src/components/ui/command.js +86 -0
- package/dist/src/components/ui/context-menu.js +72 -0
- package/dist/src/components/ui/dialog.js +88 -0
- package/dist/src/components/ui/drawer.js +80 -0
- package/dist/src/components/ui/dropdown-menu.js +124 -0
- package/dist/src/components/ui/empty.js +59 -0
- package/dist/src/components/ui/field.js +111 -0
- package/dist/src/components/ui/form.js +76 -0
- package/dist/src/components/ui/hover-card.js +33 -0
- package/dist/src/components/ui/input-group.js +78 -0
- package/dist/src/components/ui/input-otp.js +42 -0
- package/dist/src/components/ui/input.js +14 -0
- package/dist/src/components/ui/item.js +116 -0
- package/dist/src/components/ui/kbd.js +19 -0
- package/dist/src/components/ui/label.js +15 -0
- package/dist/src/components/ui/menubar.js +105 -0
- package/dist/src/components/ui/navigation-menu.js +58 -0
- package/dist/src/components/ui/pagination.js +62 -0
- package/dist/src/components/ui/popover.js +36 -0
- package/dist/src/components/ui/progress.js +20 -0
- package/dist/src/components/ui/radio-group.js +27 -0
- package/dist/src/components/ui/resizable.js +19 -0
- package/dist/src/components/ui/scroll-area.js +18 -0
- package/dist/src/components/ui/select.js +96 -0
- package/dist/src/components/ui/separator.js +17 -0
- package/dist/src/components/ui/sheet.js +84 -0
- package/dist/src/components/ui/sidebar.js +326 -0
- package/dist/src/components/ui/skeleton.js +49 -0
- package/dist/src/components/ui/slider.js +36 -0
- package/dist/src/components/ui/sonner.js +20 -0
- package/dist/src/components/ui/spinner.js +14 -0
- package/dist/src/components/ui/switch.js +20 -0
- package/dist/src/components/ui/table.js +67 -0
- package/dist/src/components/ui/tabs.js +36 -0
- package/dist/src/components/ui/textarea.js +13 -0
- package/dist/src/components/ui/theme-toggle.js +56 -0
- package/dist/src/components/ui/toggle-group.js +44 -0
- package/dist/src/components/ui/toggle.js +37 -0
- package/dist/src/components/ui/tooltip.js +37 -0
- package/dist/src/hooks/use-mobile.js +14 -0
- package/dist/src/index.js +61 -0
- package/dist/src/lib/utils.js +8 -0
- package/package.json +9 -6
- package/src/components/ui/sonner.tsx +2 -2
- package/dist/index.js +0 -22051
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
|
49
49
|
import { Slot } from '@radix-ui/react-slot';
|
|
50
50
|
import { Switch as Switch_2 } from 'radix-ui';
|
|
51
51
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
52
|
+
import { toast } from 'sonner';
|
|
52
53
|
import { ToasterProps } from 'sonner';
|
|
53
54
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
54
55
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
@@ -947,6 +948,8 @@ declare interface ThemeToggleProps {
|
|
|
947
948
|
showLabel?: boolean;
|
|
948
949
|
}
|
|
949
950
|
|
|
951
|
+
export { toast }
|
|
952
|
+
|
|
950
953
|
export declare const Toaster: ({ ...props }: ToasterProps) => JSX_2.Element;
|
|
951
954
|
|
|
952
955
|
export declare function Toggle({ className, variant, size, ...props }: React_2.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): React_2.JSX.Element;
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import { clamp as e, evaluate as t, getAlignment as n, getAlignmentAxis as r, getAlignmentSides as i, getAxisLength as a, getExpandedPlacements as o, getOppositeAxis as s, getOppositeAxisPlacements as c, getOppositePlacement as l, getPaddingObject as u, getSide as d, getSideAxis as f, max as p, min as m, rectToClientRect as h, sides as g } from "../../../../../@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";
|
|
2
|
+
//#region node_modules/.pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
3
|
+
function _(e, t, i) {
|
|
4
|
+
let { reference: o, floating: s } = e, c = f(t), l = r(t), u = a(l), p = d(t), m = c === "y", h = o.x + o.width / 2 - s.width / 2, g = o.y + o.height / 2 - s.height / 2, _ = o[u] / 2 - s[u] / 2, v;
|
|
5
|
+
switch (p) {
|
|
6
|
+
case "top":
|
|
7
|
+
v = {
|
|
8
|
+
x: h,
|
|
9
|
+
y: o.y - s.height
|
|
10
|
+
};
|
|
11
|
+
break;
|
|
12
|
+
case "bottom":
|
|
13
|
+
v = {
|
|
14
|
+
x: h,
|
|
15
|
+
y: o.y + o.height
|
|
16
|
+
};
|
|
17
|
+
break;
|
|
18
|
+
case "right":
|
|
19
|
+
v = {
|
|
20
|
+
x: o.x + o.width,
|
|
21
|
+
y: g
|
|
22
|
+
};
|
|
23
|
+
break;
|
|
24
|
+
case "left":
|
|
25
|
+
v = {
|
|
26
|
+
x: o.x - s.width,
|
|
27
|
+
y: g
|
|
28
|
+
};
|
|
29
|
+
break;
|
|
30
|
+
default: v = {
|
|
31
|
+
x: o.x,
|
|
32
|
+
y: o.y
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
switch (n(t)) {
|
|
36
|
+
case "start":
|
|
37
|
+
v[l] -= _ * (i && m ? -1 : 1);
|
|
38
|
+
break;
|
|
39
|
+
case "end":
|
|
40
|
+
v[l] += _ * (i && m ? -1 : 1);
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
return v;
|
|
44
|
+
}
|
|
45
|
+
async function v(e, n) {
|
|
46
|
+
n === void 0 && (n = {});
|
|
47
|
+
let { x: r, y: i, platform: a, rects: o, elements: s, strategy: c } = e, { boundary: l = "clippingAncestors", rootBoundary: d = "viewport", elementContext: f = "floating", altBoundary: p = !1, padding: m = 0 } = t(n, e), g = u(m), _ = s[p ? f === "floating" ? "reference" : "floating" : f], v = h(await a.getClippingRect({
|
|
48
|
+
element: await (a.isElement == null ? void 0 : a.isElement(_)) ?? !0 ? _ : _.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(s.floating)),
|
|
49
|
+
boundary: l,
|
|
50
|
+
rootBoundary: d,
|
|
51
|
+
strategy: c
|
|
52
|
+
})), y = f === "floating" ? {
|
|
53
|
+
x: r,
|
|
54
|
+
y: i,
|
|
55
|
+
width: o.floating.width,
|
|
56
|
+
height: o.floating.height
|
|
57
|
+
} : o.reference, b = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(s.floating)), x = await (a.isElement == null ? void 0 : a.isElement(b)) && await (a.getScale == null ? void 0 : a.getScale(b)) || {
|
|
58
|
+
x: 1,
|
|
59
|
+
y: 1
|
|
60
|
+
}, S = h(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
61
|
+
elements: s,
|
|
62
|
+
rect: y,
|
|
63
|
+
offsetParent: b,
|
|
64
|
+
strategy: c
|
|
65
|
+
}) : y);
|
|
66
|
+
return {
|
|
67
|
+
top: (v.top - S.top + g.top) / x.y,
|
|
68
|
+
bottom: (S.bottom - v.bottom + g.bottom) / x.y,
|
|
69
|
+
left: (v.left - S.left + g.left) / x.x,
|
|
70
|
+
right: (S.right - v.right + g.right) / x.x
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
var y = 50, b = async (e, t, n) => {
|
|
74
|
+
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
75
|
+
...o,
|
|
76
|
+
detectOverflow: v
|
|
77
|
+
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
78
|
+
reference: e,
|
|
79
|
+
floating: t,
|
|
80
|
+
strategy: i
|
|
81
|
+
}), { x: u, y: d } = _(l, r, c), f = r, p = 0, m = {};
|
|
82
|
+
for (let n = 0; n < a.length; n++) {
|
|
83
|
+
let h = a[n];
|
|
84
|
+
if (!h) continue;
|
|
85
|
+
let { name: g, fn: v } = h, { x: b, y: x, data: S, reset: C } = await v({
|
|
86
|
+
x: u,
|
|
87
|
+
y: d,
|
|
88
|
+
initialPlacement: r,
|
|
89
|
+
placement: f,
|
|
90
|
+
strategy: i,
|
|
91
|
+
middlewareData: m,
|
|
92
|
+
rects: l,
|
|
93
|
+
platform: s,
|
|
94
|
+
elements: {
|
|
95
|
+
reference: e,
|
|
96
|
+
floating: t
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
u = b ?? u, d = x ?? d, m[g] = {
|
|
100
|
+
...m[g],
|
|
101
|
+
...S
|
|
102
|
+
}, C && p < y && (p++, typeof C == "object" && (C.placement && (f = C.placement), C.rects && (l = C.rects === !0 ? await o.getElementRects({
|
|
103
|
+
reference: e,
|
|
104
|
+
floating: t,
|
|
105
|
+
strategy: i
|
|
106
|
+
}) : C.rects), {x: u, y: d} = _(l, f, c)), n = -1);
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
x: u,
|
|
110
|
+
y: d,
|
|
111
|
+
placement: f,
|
|
112
|
+
strategy: i,
|
|
113
|
+
middlewareData: m
|
|
114
|
+
};
|
|
115
|
+
}, x = (i) => ({
|
|
116
|
+
name: "arrow",
|
|
117
|
+
options: i,
|
|
118
|
+
async fn(o) {
|
|
119
|
+
let { x: s, y: c, placement: l, rects: d, platform: f, elements: p, middlewareData: h } = o, { element: g, padding: _ = 0 } = t(i, o) || {};
|
|
120
|
+
if (g == null) return {};
|
|
121
|
+
let v = u(_), y = {
|
|
122
|
+
x: s,
|
|
123
|
+
y: c
|
|
124
|
+
}, b = r(l), x = a(b), S = await f.getDimensions(g), C = b === "y", w = C ? "top" : "left", T = C ? "bottom" : "right", E = C ? "clientHeight" : "clientWidth", D = d.reference[x] + d.reference[b] - y[b] - d.floating[x], O = y[b] - d.reference[b], k = await (f.getOffsetParent == null ? void 0 : f.getOffsetParent(g)), A = k ? k[E] : 0;
|
|
125
|
+
(!A || !await (f.isElement == null ? void 0 : f.isElement(k))) && (A = p.floating[E] || d.floating[x]);
|
|
126
|
+
let j = D / 2 - O / 2, M = A / 2 - S[x] / 2 - 1, N = m(v[w], M), P = m(v[T], M), F = N, I = A - S[x] - P, L = A / 2 - S[x] / 2 + j, R = e(F, L, I), z = !h.arrow && n(l) != null && L !== R && d.reference[x] / 2 - (L < F ? N : P) - S[x] / 2 < 0, B = z ? L < F ? L - F : L - I : 0;
|
|
127
|
+
return {
|
|
128
|
+
[b]: y[b] + B,
|
|
129
|
+
data: {
|
|
130
|
+
[b]: R,
|
|
131
|
+
centerOffset: L - R - B,
|
|
132
|
+
...z && { alignmentOffset: B }
|
|
133
|
+
},
|
|
134
|
+
reset: z
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
}), S = function(e) {
|
|
138
|
+
return e === void 0 && (e = {}), {
|
|
139
|
+
name: "flip",
|
|
140
|
+
options: e,
|
|
141
|
+
async fn(n) {
|
|
142
|
+
var r;
|
|
143
|
+
let { placement: a, middlewareData: s, rects: u, initialPlacement: p, platform: m, elements: h } = n, { mainAxis: g = !0, crossAxis: _ = !0, fallbackPlacements: v, fallbackStrategy: y = "bestFit", fallbackAxisSideDirection: b = "none", flipAlignment: x = !0, ...S } = t(e, n);
|
|
144
|
+
if ((r = s.arrow) != null && r.alignmentOffset) return {};
|
|
145
|
+
let C = d(a), w = f(p), T = d(p) === p, E = await (m.isRTL == null ? void 0 : m.isRTL(h.floating)), D = v || (T || !x ? [l(p)] : o(p)), O = b !== "none";
|
|
146
|
+
!v && O && D.push(...c(p, x, b, E));
|
|
147
|
+
let k = [p, ...D], A = await m.detectOverflow(n, S), j = [], M = s.flip?.overflows || [];
|
|
148
|
+
if (g && j.push(A[C]), _) {
|
|
149
|
+
let e = i(a, u, E);
|
|
150
|
+
j.push(A[e[0]], A[e[1]]);
|
|
151
|
+
}
|
|
152
|
+
if (M = [...M, {
|
|
153
|
+
placement: a,
|
|
154
|
+
overflows: j
|
|
155
|
+
}], !j.every((e) => e <= 0)) {
|
|
156
|
+
let e = (s.flip?.index || 0) + 1, t = k[e];
|
|
157
|
+
if (t && (!(_ === "alignment" && w !== f(t)) || M.every((e) => f(e.placement) === w ? e.overflows[0] > 0 : !0))) return {
|
|
158
|
+
data: {
|
|
159
|
+
index: e,
|
|
160
|
+
overflows: M
|
|
161
|
+
},
|
|
162
|
+
reset: { placement: t }
|
|
163
|
+
};
|
|
164
|
+
let n = M.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
165
|
+
if (!n) switch (y) {
|
|
166
|
+
case "bestFit": {
|
|
167
|
+
let e = M.filter((e) => {
|
|
168
|
+
if (O) {
|
|
169
|
+
let t = f(e.placement);
|
|
170
|
+
return t === w || t === "y";
|
|
171
|
+
}
|
|
172
|
+
return !0;
|
|
173
|
+
}).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
|
|
174
|
+
e && (n = e);
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
case "initialPlacement":
|
|
178
|
+
n = p;
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
if (a !== n) return { reset: { placement: n } };
|
|
182
|
+
}
|
|
183
|
+
return {};
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
function C(e, t) {
|
|
188
|
+
return {
|
|
189
|
+
top: e.top - t.height,
|
|
190
|
+
right: e.right - t.width,
|
|
191
|
+
bottom: e.bottom - t.height,
|
|
192
|
+
left: e.left - t.width
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function w(e) {
|
|
196
|
+
return g.some((t) => e[t] >= 0);
|
|
197
|
+
}
|
|
198
|
+
var T = function(e) {
|
|
199
|
+
return e === void 0 && (e = {}), {
|
|
200
|
+
name: "hide",
|
|
201
|
+
options: e,
|
|
202
|
+
async fn(n) {
|
|
203
|
+
let { rects: r, platform: i } = n, { strategy: a = "referenceHidden", ...o } = t(e, n);
|
|
204
|
+
switch (a) {
|
|
205
|
+
case "referenceHidden": {
|
|
206
|
+
let e = C(await i.detectOverflow(n, {
|
|
207
|
+
...o,
|
|
208
|
+
elementContext: "reference"
|
|
209
|
+
}), r.reference);
|
|
210
|
+
return { data: {
|
|
211
|
+
referenceHiddenOffsets: e,
|
|
212
|
+
referenceHidden: w(e)
|
|
213
|
+
} };
|
|
214
|
+
}
|
|
215
|
+
case "escaped": {
|
|
216
|
+
let e = C(await i.detectOverflow(n, {
|
|
217
|
+
...o,
|
|
218
|
+
altBoundary: !0
|
|
219
|
+
}), r.floating);
|
|
220
|
+
return { data: {
|
|
221
|
+
escapedOffsets: e,
|
|
222
|
+
escaped: w(e)
|
|
223
|
+
} };
|
|
224
|
+
}
|
|
225
|
+
default: return {};
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
}, E = /*#__PURE__*/ new Set(["left", "top"]);
|
|
230
|
+
async function D(e, r) {
|
|
231
|
+
let { placement: i, platform: a, elements: o } = e, s = await (a.isRTL == null ? void 0 : a.isRTL(o.floating)), c = d(i), l = n(i), u = f(i) === "y", p = E.has(c) ? -1 : 1, m = s && u ? -1 : 1, h = t(r, e), { mainAxis: g, crossAxis: _, alignmentAxis: v } = typeof h == "number" ? {
|
|
232
|
+
mainAxis: h,
|
|
233
|
+
crossAxis: 0,
|
|
234
|
+
alignmentAxis: null
|
|
235
|
+
} : {
|
|
236
|
+
mainAxis: h.mainAxis || 0,
|
|
237
|
+
crossAxis: h.crossAxis || 0,
|
|
238
|
+
alignmentAxis: h.alignmentAxis
|
|
239
|
+
};
|
|
240
|
+
return l && typeof v == "number" && (_ = l === "end" ? v * -1 : v), u ? {
|
|
241
|
+
x: _ * m,
|
|
242
|
+
y: g * p
|
|
243
|
+
} : {
|
|
244
|
+
x: g * p,
|
|
245
|
+
y: _ * m
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
var O = function(e) {
|
|
249
|
+
return e === void 0 && (e = 0), {
|
|
250
|
+
name: "offset",
|
|
251
|
+
options: e,
|
|
252
|
+
async fn(t) {
|
|
253
|
+
var n;
|
|
254
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await D(t, e);
|
|
255
|
+
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
256
|
+
x: r + s.x,
|
|
257
|
+
y: i + s.y,
|
|
258
|
+
data: {
|
|
259
|
+
...s,
|
|
260
|
+
placement: a
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
}, k = function(n) {
|
|
266
|
+
return n === void 0 && (n = {}), {
|
|
267
|
+
name: "shift",
|
|
268
|
+
options: n,
|
|
269
|
+
async fn(r) {
|
|
270
|
+
let { x: i, y: a, placement: o, platform: c } = r, { mainAxis: l = !0, crossAxis: u = !1, limiter: p = { fn: (e) => {
|
|
271
|
+
let { x: t, y: n } = e;
|
|
272
|
+
return {
|
|
273
|
+
x: t,
|
|
274
|
+
y: n
|
|
275
|
+
};
|
|
276
|
+
} }, ...m } = t(n, r), h = {
|
|
277
|
+
x: i,
|
|
278
|
+
y: a
|
|
279
|
+
}, g = await c.detectOverflow(r, m), _ = f(d(o)), v = s(_), y = h[v], b = h[_];
|
|
280
|
+
if (l) {
|
|
281
|
+
let t = v === "y" ? "top" : "left", n = v === "y" ? "bottom" : "right", r = y + g[t], i = y - g[n];
|
|
282
|
+
y = e(r, y, i);
|
|
283
|
+
}
|
|
284
|
+
if (u) {
|
|
285
|
+
let t = _ === "y" ? "top" : "left", n = _ === "y" ? "bottom" : "right", r = b + g[t], i = b - g[n];
|
|
286
|
+
b = e(r, b, i);
|
|
287
|
+
}
|
|
288
|
+
let x = p.fn({
|
|
289
|
+
...r,
|
|
290
|
+
[v]: y,
|
|
291
|
+
[_]: b
|
|
292
|
+
});
|
|
293
|
+
return {
|
|
294
|
+
...x,
|
|
295
|
+
data: {
|
|
296
|
+
x: x.x - i,
|
|
297
|
+
y: x.y - a,
|
|
298
|
+
enabled: {
|
|
299
|
+
[v]: l,
|
|
300
|
+
[_]: u
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
}, A = function(e) {
|
|
307
|
+
return e === void 0 && (e = {}), {
|
|
308
|
+
options: e,
|
|
309
|
+
fn(n) {
|
|
310
|
+
let { x: r, y: i, placement: a, rects: o, middlewareData: c } = n, { offset: l = 0, mainAxis: u = !0, crossAxis: p = !0 } = t(e, n), m = {
|
|
311
|
+
x: r,
|
|
312
|
+
y: i
|
|
313
|
+
}, h = f(a), g = s(h), _ = m[g], v = m[h], y = t(l, n), b = typeof y == "number" ? {
|
|
314
|
+
mainAxis: y,
|
|
315
|
+
crossAxis: 0
|
|
316
|
+
} : {
|
|
317
|
+
mainAxis: 0,
|
|
318
|
+
crossAxis: 0,
|
|
319
|
+
...y
|
|
320
|
+
};
|
|
321
|
+
if (u) {
|
|
322
|
+
let e = g === "y" ? "height" : "width", t = o.reference[g] - o.floating[e] + b.mainAxis, n = o.reference[g] + o.reference[e] - b.mainAxis;
|
|
323
|
+
_ < t ? _ = t : _ > n && (_ = n);
|
|
324
|
+
}
|
|
325
|
+
if (p) {
|
|
326
|
+
let e = g === "y" ? "width" : "height", t = E.has(d(a)), n = o.reference[h] - o.floating[e] + (t && c.offset?.[h] || 0) + (t ? 0 : b.crossAxis), r = o.reference[h] + o.reference[e] + (t ? 0 : c.offset?.[h] || 0) - (t ? b.crossAxis : 0);
|
|
327
|
+
v < n ? v = n : v > r && (v = r);
|
|
328
|
+
}
|
|
329
|
+
return {
|
|
330
|
+
[g]: _,
|
|
331
|
+
[h]: v
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
}, j = function(e) {
|
|
336
|
+
return e === void 0 && (e = {}), {
|
|
337
|
+
name: "size",
|
|
338
|
+
options: e,
|
|
339
|
+
async fn(r) {
|
|
340
|
+
var i, a;
|
|
341
|
+
let { placement: o, rects: s, platform: c, elements: l } = r, { apply: u = () => {}, ...h } = t(e, r), g = await c.detectOverflow(r, h), _ = d(o), v = n(o), y = f(o) === "y", { width: b, height: x } = s.floating, S, C;
|
|
342
|
+
_ === "top" || _ === "bottom" ? (S = _, C = v === (await (c.isRTL == null ? void 0 : c.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (C = _, S = v === "end" ? "top" : "bottom");
|
|
343
|
+
let w = x - g.top - g.bottom, T = b - g.left - g.right, E = m(x - g[S], w), D = m(b - g[C], T), O = !r.middlewareData.shift, k = E, A = D;
|
|
344
|
+
if ((i = r.middlewareData.shift) != null && i.enabled.x && (A = T), (a = r.middlewareData.shift) != null && a.enabled.y && (k = w), O && !v) {
|
|
345
|
+
let e = p(g.left, 0), t = p(g.right, 0), n = p(g.top, 0), r = p(g.bottom, 0);
|
|
346
|
+
y ? A = b - 2 * (e !== 0 || t !== 0 ? e + t : p(g.left, g.right)) : k = x - 2 * (n !== 0 || r !== 0 ? n + r : p(g.top, g.bottom));
|
|
347
|
+
}
|
|
348
|
+
await u({
|
|
349
|
+
...r,
|
|
350
|
+
availableWidth: A,
|
|
351
|
+
availableHeight: k
|
|
352
|
+
});
|
|
353
|
+
let j = await c.getDimensions(l.floating);
|
|
354
|
+
return b !== j.width || x !== j.height ? { reset: { rects: !0 } } : {};
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
//#endregion
|
|
359
|
+
export { x as arrow, b as computePosition, S as flip, T as hide, A as limitShift, O as offset, k as shift, j as size };
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { createCoords as e, floor as t, max as n, min as r, rectToClientRect as i, round as a } from "../../../../../@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";
|
|
2
|
+
import { arrow as o, computePosition as s, flip as c, hide as l, limitShift as u, offset as d, shift as f, size as p } from "../../../../../@floating-ui_core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.js";
|
|
3
|
+
import { getComputedStyle as m, getContainingBlock as h, getDocumentElement as g, getFrameElement as _, getNodeName as v, getNodeScroll as y, getOverflowAncestors as b, getParentNode as x, getWindow as S, isContainingBlock as C, isElement as w, isHTMLElement as T, isLastTraversableNode as E, isOverflowElement as D, isTableElement as ee, isTopLayer as O, isWebKit as k } from "../../../../../@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js";
|
|
4
|
+
//#region node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
5
|
+
function A(e) {
|
|
6
|
+
let t = m(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = T(e), o = i ? e.offsetWidth : n, s = i ? e.offsetHeight : r, c = a(n) !== o || a(r) !== s;
|
|
7
|
+
return c && (n = o, r = s), {
|
|
8
|
+
width: n,
|
|
9
|
+
height: r,
|
|
10
|
+
$: c
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function j(e) {
|
|
14
|
+
return w(e) ? e : e.contextElement;
|
|
15
|
+
}
|
|
16
|
+
function M(t) {
|
|
17
|
+
let n = j(t);
|
|
18
|
+
if (!T(n)) return e(1);
|
|
19
|
+
let r = n.getBoundingClientRect(), { width: i, height: o, $: s } = A(n), c = (s ? a(r.width) : r.width) / i, l = (s ? a(r.height) : r.height) / o;
|
|
20
|
+
return (!c || !Number.isFinite(c)) && (c = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
21
|
+
x: c,
|
|
22
|
+
y: l
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
var N = /*#__PURE__*/ e(0);
|
|
26
|
+
function P(e) {
|
|
27
|
+
let t = S(e);
|
|
28
|
+
return !k() || !t.visualViewport ? N : {
|
|
29
|
+
x: t.visualViewport.offsetLeft,
|
|
30
|
+
y: t.visualViewport.offsetTop
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function F(e, t, n) {
|
|
34
|
+
return t === void 0 && (t = !1), !n || t && n !== S(e) ? !1 : t;
|
|
35
|
+
}
|
|
36
|
+
function I(t, n, r, a) {
|
|
37
|
+
n === void 0 && (n = !1), r === void 0 && (r = !1);
|
|
38
|
+
let o = t.getBoundingClientRect(), s = j(t), c = e(1);
|
|
39
|
+
n && (a ? w(a) && (c = M(a)) : c = M(t));
|
|
40
|
+
let l = F(s, r, a) ? P(s) : e(0), u = (o.left + l.x) / c.x, d = (o.top + l.y) / c.y, f = o.width / c.x, p = o.height / c.y;
|
|
41
|
+
if (s) {
|
|
42
|
+
let e = S(s), t = a && w(a) ? S(a) : a, n = e, r = _(n);
|
|
43
|
+
for (; r && a && t !== n;) {
|
|
44
|
+
let e = M(r), t = r.getBoundingClientRect(), i = m(r), a = t.left + (r.clientLeft + parseFloat(i.paddingLeft)) * e.x, o = t.top + (r.clientTop + parseFloat(i.paddingTop)) * e.y;
|
|
45
|
+
u *= e.x, d *= e.y, f *= e.x, p *= e.y, u += a, d += o, n = S(r), r = _(n);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return i({
|
|
49
|
+
width: f,
|
|
50
|
+
height: p,
|
|
51
|
+
x: u,
|
|
52
|
+
y: d
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function L(e, t) {
|
|
56
|
+
let n = y(e).scrollLeft;
|
|
57
|
+
return t ? t.left + n : I(g(e)).left + n;
|
|
58
|
+
}
|
|
59
|
+
function R(e, t) {
|
|
60
|
+
let n = e.getBoundingClientRect();
|
|
61
|
+
return {
|
|
62
|
+
x: n.left + t.scrollLeft - L(e, n),
|
|
63
|
+
y: n.top + t.scrollTop
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function te(t) {
|
|
67
|
+
let { elements: n, rect: r, offsetParent: i, strategy: a } = t, o = a === "fixed", s = g(i), c = n ? O(n.floating) : !1;
|
|
68
|
+
if (i === s || c && o) return r;
|
|
69
|
+
let l = {
|
|
70
|
+
scrollLeft: 0,
|
|
71
|
+
scrollTop: 0
|
|
72
|
+
}, u = e(1), d = e(0), f = T(i);
|
|
73
|
+
if ((f || !f && !o) && ((v(i) !== "body" || D(s)) && (l = y(i)), f)) {
|
|
74
|
+
let e = I(i);
|
|
75
|
+
u = M(i), d.x = e.x + i.clientLeft, d.y = e.y + i.clientTop;
|
|
76
|
+
}
|
|
77
|
+
let p = s && !f && !o ? R(s, l) : e(0);
|
|
78
|
+
return {
|
|
79
|
+
width: r.width * u.x,
|
|
80
|
+
height: r.height * u.y,
|
|
81
|
+
x: r.x * u.x - l.scrollLeft * u.x + d.x + p.x,
|
|
82
|
+
y: r.y * u.y - l.scrollTop * u.y + d.y + p.y
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function z(e) {
|
|
86
|
+
return Array.from(e.getClientRects());
|
|
87
|
+
}
|
|
88
|
+
function B(e) {
|
|
89
|
+
let t = g(e), r = y(e), i = e.ownerDocument.body, a = n(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = n(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight), s = -r.scrollLeft + L(e), c = -r.scrollTop;
|
|
90
|
+
return m(i).direction === "rtl" && (s += n(t.clientWidth, i.clientWidth) - a), {
|
|
91
|
+
width: a,
|
|
92
|
+
height: o,
|
|
93
|
+
x: s,
|
|
94
|
+
y: c
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
var V = 25;
|
|
98
|
+
function ne(e, t) {
|
|
99
|
+
let n = S(e), r = g(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
|
|
100
|
+
if (i) {
|
|
101
|
+
a = i.width, o = i.height;
|
|
102
|
+
let e = k();
|
|
103
|
+
(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
|
|
104
|
+
}
|
|
105
|
+
let l = L(r);
|
|
106
|
+
if (l <= 0) {
|
|
107
|
+
let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
|
|
108
|
+
o <= V && (a -= o);
|
|
109
|
+
} else l <= V && (a += l);
|
|
110
|
+
return {
|
|
111
|
+
width: a,
|
|
112
|
+
height: o,
|
|
113
|
+
x: s,
|
|
114
|
+
y: c
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function re(t, n) {
|
|
118
|
+
let r = I(t, !0, n === "fixed"), i = r.top + t.clientTop, a = r.left + t.clientLeft, o = T(t) ? M(t) : e(1);
|
|
119
|
+
return {
|
|
120
|
+
width: t.clientWidth * o.x,
|
|
121
|
+
height: t.clientHeight * o.y,
|
|
122
|
+
x: a * o.x,
|
|
123
|
+
y: i * o.y
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function H(e, t, n) {
|
|
127
|
+
let r;
|
|
128
|
+
if (t === "viewport") r = ne(e, n);
|
|
129
|
+
else if (t === "document") r = B(g(e));
|
|
130
|
+
else if (w(t)) r = re(t, n);
|
|
131
|
+
else {
|
|
132
|
+
let n = P(e);
|
|
133
|
+
r = {
|
|
134
|
+
x: t.x - n.x,
|
|
135
|
+
y: t.y - n.y,
|
|
136
|
+
width: t.width,
|
|
137
|
+
height: t.height
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
return i(r);
|
|
141
|
+
}
|
|
142
|
+
function U(e, t) {
|
|
143
|
+
let n = x(e);
|
|
144
|
+
return n === t || !w(n) || E(n) ? !1 : m(n).position === "fixed" || U(n, t);
|
|
145
|
+
}
|
|
146
|
+
function W(e, t) {
|
|
147
|
+
let n = t.get(e);
|
|
148
|
+
if (n) return n;
|
|
149
|
+
let r = b(e, [], !1).filter((e) => w(e) && v(e) !== "body"), i = null, a = m(e).position === "fixed", o = a ? x(e) : e;
|
|
150
|
+
for (; w(o) && !E(o);) {
|
|
151
|
+
let t = m(o), n = C(o);
|
|
152
|
+
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || D(o) && !n && U(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = x(o);
|
|
153
|
+
}
|
|
154
|
+
return t.set(e, r), r;
|
|
155
|
+
}
|
|
156
|
+
function G(e) {
|
|
157
|
+
let { element: t, boundary: i, rootBoundary: a, strategy: o } = e, s = [...i === "clippingAncestors" ? O(t) ? [] : W(t, this._c) : [].concat(i), a], c = H(t, s[0], o), l = c.top, u = c.right, d = c.bottom, f = c.left;
|
|
158
|
+
for (let e = 1; e < s.length; e++) {
|
|
159
|
+
let i = H(t, s[e], o);
|
|
160
|
+
l = n(i.top, l), u = r(i.right, u), d = r(i.bottom, d), f = n(i.left, f);
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
width: u - f,
|
|
164
|
+
height: d - l,
|
|
165
|
+
x: f,
|
|
166
|
+
y: l
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function K(e) {
|
|
170
|
+
let { width: t, height: n } = A(e);
|
|
171
|
+
return {
|
|
172
|
+
width: t,
|
|
173
|
+
height: n
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function q(t, n, r) {
|
|
177
|
+
let i = T(n), a = g(n), o = r === "fixed", s = I(t, !0, o, n), c = {
|
|
178
|
+
scrollLeft: 0,
|
|
179
|
+
scrollTop: 0
|
|
180
|
+
}, l = e(0);
|
|
181
|
+
function u() {
|
|
182
|
+
l.x = L(a);
|
|
183
|
+
}
|
|
184
|
+
if (i || !i && !o) if ((v(n) !== "body" || D(a)) && (c = y(n)), i) {
|
|
185
|
+
let e = I(n, !0, o, n);
|
|
186
|
+
l.x = e.x + n.clientLeft, l.y = e.y + n.clientTop;
|
|
187
|
+
} else a && u();
|
|
188
|
+
o && !i && a && u();
|
|
189
|
+
let d = a && !i && !o ? R(a, c) : e(0);
|
|
190
|
+
return {
|
|
191
|
+
x: s.left + c.scrollLeft - l.x - d.x,
|
|
192
|
+
y: s.top + c.scrollTop - l.y - d.y,
|
|
193
|
+
width: s.width,
|
|
194
|
+
height: s.height
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
function J(e) {
|
|
198
|
+
return m(e).position === "static";
|
|
199
|
+
}
|
|
200
|
+
function Y(e, t) {
|
|
201
|
+
if (!T(e) || m(e).position === "fixed") return null;
|
|
202
|
+
if (t) return t(e);
|
|
203
|
+
let n = e.offsetParent;
|
|
204
|
+
return g(e) === n && (n = n.ownerDocument.body), n;
|
|
205
|
+
}
|
|
206
|
+
function X(e, t) {
|
|
207
|
+
let n = S(e);
|
|
208
|
+
if (O(e)) return n;
|
|
209
|
+
if (!T(e)) {
|
|
210
|
+
let t = x(e);
|
|
211
|
+
for (; t && !E(t);) {
|
|
212
|
+
if (w(t) && !J(t)) return t;
|
|
213
|
+
t = x(t);
|
|
214
|
+
}
|
|
215
|
+
return n;
|
|
216
|
+
}
|
|
217
|
+
let r = Y(e, t);
|
|
218
|
+
for (; r && ee(r) && J(r);) r = Y(r, t);
|
|
219
|
+
return r && E(r) && J(r) && !C(r) ? n : r || h(e) || n;
|
|
220
|
+
}
|
|
221
|
+
var ie = async function(e) {
|
|
222
|
+
let t = this.getOffsetParent || X, n = this.getDimensions, r = await n(e.floating);
|
|
223
|
+
return {
|
|
224
|
+
reference: q(e.reference, await t(e.floating), e.strategy),
|
|
225
|
+
floating: {
|
|
226
|
+
x: 0,
|
|
227
|
+
y: 0,
|
|
228
|
+
width: r.width,
|
|
229
|
+
height: r.height
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
function ae(e) {
|
|
234
|
+
return m(e).direction === "rtl";
|
|
235
|
+
}
|
|
236
|
+
var Z = {
|
|
237
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: te,
|
|
238
|
+
getDocumentElement: g,
|
|
239
|
+
getClippingRect: G,
|
|
240
|
+
getOffsetParent: X,
|
|
241
|
+
getElementRects: ie,
|
|
242
|
+
getClientRects: z,
|
|
243
|
+
getDimensions: K,
|
|
244
|
+
getScale: M,
|
|
245
|
+
isElement: w,
|
|
246
|
+
isRTL: ae
|
|
247
|
+
};
|
|
248
|
+
function Q(e, t) {
|
|
249
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
250
|
+
}
|
|
251
|
+
function oe(e, i) {
|
|
252
|
+
let a = null, o, s = g(e);
|
|
253
|
+
function c() {
|
|
254
|
+
var e;
|
|
255
|
+
clearTimeout(o), (e = a) == null || e.disconnect(), a = null;
|
|
256
|
+
}
|
|
257
|
+
function l(u, d) {
|
|
258
|
+
u === void 0 && (u = !1), d === void 0 && (d = 1), c();
|
|
259
|
+
let f = e.getBoundingClientRect(), { left: p, top: m, width: h, height: g } = f;
|
|
260
|
+
if (u || i(), !h || !g) return;
|
|
261
|
+
let _ = t(m), v = t(s.clientWidth - (p + h)), y = t(s.clientHeight - (m + g)), b = t(p), x = {
|
|
262
|
+
rootMargin: -_ + "px " + -v + "px " + -y + "px " + -b + "px",
|
|
263
|
+
threshold: n(0, r(1, d)) || 1
|
|
264
|
+
}, S = !0;
|
|
265
|
+
function C(t) {
|
|
266
|
+
let n = t[0].intersectionRatio;
|
|
267
|
+
if (n !== d) {
|
|
268
|
+
if (!S) return l();
|
|
269
|
+
n ? l(!1, n) : o = setTimeout(() => {
|
|
270
|
+
l(!1, 1e-7);
|
|
271
|
+
}, 1e3);
|
|
272
|
+
}
|
|
273
|
+
n === 1 && !Q(f, e.getBoundingClientRect()) && l(), S = !1;
|
|
274
|
+
}
|
|
275
|
+
try {
|
|
276
|
+
a = new IntersectionObserver(C, {
|
|
277
|
+
...x,
|
|
278
|
+
root: s.ownerDocument
|
|
279
|
+
});
|
|
280
|
+
} catch {
|
|
281
|
+
a = new IntersectionObserver(C, x);
|
|
282
|
+
}
|
|
283
|
+
a.observe(e);
|
|
284
|
+
}
|
|
285
|
+
return l(!0), c;
|
|
286
|
+
}
|
|
287
|
+
function se(e, t, n, r) {
|
|
288
|
+
r === void 0 && (r = {});
|
|
289
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = j(e), u = i || a ? [...l ? b(l) : [], ...t ? b(t) : []] : [];
|
|
290
|
+
u.forEach((e) => {
|
|
291
|
+
i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
|
|
292
|
+
});
|
|
293
|
+
let d = l && s ? oe(l, n) : null, f = -1, p = null;
|
|
294
|
+
o && (p = new ResizeObserver((e) => {
|
|
295
|
+
let [r] = e;
|
|
296
|
+
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
297
|
+
var e;
|
|
298
|
+
(e = p) == null || e.observe(t);
|
|
299
|
+
})), n();
|
|
300
|
+
}), l && !c && p.observe(l), t && p.observe(t));
|
|
301
|
+
let m, h = c ? I(e) : null;
|
|
302
|
+
c && g();
|
|
303
|
+
function g() {
|
|
304
|
+
let t = I(e);
|
|
305
|
+
h && !Q(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
306
|
+
}
|
|
307
|
+
return n(), () => {
|
|
308
|
+
var e;
|
|
309
|
+
u.forEach((e) => {
|
|
310
|
+
i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
|
|
311
|
+
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
var ce = d, le = f, $ = c, ue = p, de = l, fe = o, pe = u, me = (e, t, n) => {
|
|
315
|
+
let r = /* @__PURE__ */ new Map(), i = {
|
|
316
|
+
platform: Z,
|
|
317
|
+
...n
|
|
318
|
+
}, a = {
|
|
319
|
+
...i.platform,
|
|
320
|
+
_c: r
|
|
321
|
+
};
|
|
322
|
+
return s(e, t, {
|
|
323
|
+
...i,
|
|
324
|
+
platform: a
|
|
325
|
+
});
|
|
326
|
+
};
|
|
327
|
+
//#endregion
|
|
328
|
+
export { fe as arrow, se as autoUpdate, me as computePosition, $ as flip, de as hide, pe as limitShift, ce as offset, Z as platform, le as shift, ue as size };
|