@inspirare/design-system 0.0.18 → 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/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/dist/index.js +0 -22051
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContextScope as e } from "../../../../../@radix-ui_react-context@1.1_796eddd33de3050019fa09b10c68d7ca/node_modules/@radix-ui/react-context/dist/index.js";
|
|
3
|
+
import { composeEventHandlers as t } from "../../../../../@radix-ui_primitive@1.1.4/node_modules/@radix-ui/primitive/dist/index.js";
|
|
4
|
+
import { useControllableState as n } from "../../../../../@radix-ui_react-use-control_e3b0d353471f209a120bf58c8d35c552/node_modules/@radix-ui/react-use-controllable-state/dist/index.js";
|
|
5
|
+
import { Primitive as r } from "../../../../../@radix-ui_react-primitive@2_9b6ae4cdaf3918ddbf0b21069e38e2ef/node_modules/@radix-ui/react-primitive/dist/index.js";
|
|
6
|
+
import { Presence as i } from "../../../../../@radix-ui_react-presence@1._dc6e30df35507eb8a116c12c3da26e18/node_modules/@radix-ui/react-presence/dist/index.js";
|
|
7
|
+
import { useId as a } from "../../../../../@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";
|
|
8
|
+
import { useDirection as o } from "../../../../../@radix-ui_react-direction@1_2157d1ab8e201288009ff536bb11c468/node_modules/@radix-ui/react-direction/dist/index.js";
|
|
9
|
+
import { Item as s, Root as c, createRovingFocusGroupScope as l } from "../../../../../@radix-ui_react-roving-focu_d783d3abe701a7f2fb2c68867b8f1f65/node_modules/@radix-ui/react-roving-focus/dist/index.js";
|
|
10
|
+
import * as u from "react";
|
|
11
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
12
|
+
//#region node_modules/.pnpm/@radix-ui+react-tabs@1.1.14_769bbb0130198553b196f258bd99ab92/node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
13
|
+
var f = "Tabs", [p, m] = e(f, [l]), h = l(), [g, _] = p(f), v = u.forwardRef((e, t) => {
|
|
14
|
+
let { __scopeTabs: i, value: s, onValueChange: c, defaultValue: l, orientation: u = "horizontal", dir: p, activationMode: m = "automatic", ...h } = e, _ = o(p), [v, y] = n({
|
|
15
|
+
prop: s,
|
|
16
|
+
onChange: c,
|
|
17
|
+
defaultProp: l ?? "",
|
|
18
|
+
caller: f
|
|
19
|
+
});
|
|
20
|
+
return /* @__PURE__ */ d(g, {
|
|
21
|
+
scope: i,
|
|
22
|
+
baseId: a(),
|
|
23
|
+
value: v,
|
|
24
|
+
onValueChange: y,
|
|
25
|
+
orientation: u,
|
|
26
|
+
dir: _,
|
|
27
|
+
activationMode: m,
|
|
28
|
+
children: /* @__PURE__ */ d(r.div, {
|
|
29
|
+
dir: _,
|
|
30
|
+
"data-orientation": u,
|
|
31
|
+
...h,
|
|
32
|
+
ref: t
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
v.displayName = f;
|
|
37
|
+
var y = "TabsList", b = u.forwardRef((e, t) => {
|
|
38
|
+
let { __scopeTabs: n, loop: i = !0, ...a } = e, o = _(y, n);
|
|
39
|
+
return /* @__PURE__ */ d(c, {
|
|
40
|
+
asChild: !0,
|
|
41
|
+
...h(n),
|
|
42
|
+
orientation: o.orientation,
|
|
43
|
+
dir: o.dir,
|
|
44
|
+
loop: i,
|
|
45
|
+
children: /* @__PURE__ */ d(r.div, {
|
|
46
|
+
role: "tablist",
|
|
47
|
+
"aria-orientation": o.orientation,
|
|
48
|
+
...a,
|
|
49
|
+
ref: t
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
b.displayName = y;
|
|
54
|
+
var x = "TabsTrigger", S = u.forwardRef((e, n) => {
|
|
55
|
+
let { __scopeTabs: i, value: a, disabled: o = !1, ...c } = e, l = _(x, i), u = h(i), f = T(l.baseId, a), p = E(l.baseId, a), m = a === l.value;
|
|
56
|
+
return /* @__PURE__ */ d(s, {
|
|
57
|
+
asChild: !0,
|
|
58
|
+
...u,
|
|
59
|
+
focusable: !o,
|
|
60
|
+
active: m,
|
|
61
|
+
children: /* @__PURE__ */ d(r.button, {
|
|
62
|
+
type: "button",
|
|
63
|
+
role: "tab",
|
|
64
|
+
"aria-selected": m,
|
|
65
|
+
"aria-controls": p,
|
|
66
|
+
"data-state": m ? "active" : "inactive",
|
|
67
|
+
"data-disabled": o ? "" : void 0,
|
|
68
|
+
disabled: o,
|
|
69
|
+
id: f,
|
|
70
|
+
...c,
|
|
71
|
+
ref: n,
|
|
72
|
+
onMouseDown: t(e.onMouseDown, (e) => {
|
|
73
|
+
!o && e.button === 0 && e.ctrlKey === !1 ? l.onValueChange(a) : e.preventDefault();
|
|
74
|
+
}),
|
|
75
|
+
onKeyDown: t(e.onKeyDown, (e) => {
|
|
76
|
+
[" ", "Enter"].includes(e.key) && l.onValueChange(a);
|
|
77
|
+
}),
|
|
78
|
+
onFocus: t(e.onFocus, () => {
|
|
79
|
+
let e = l.activationMode !== "manual";
|
|
80
|
+
!m && !o && e && l.onValueChange(a);
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
S.displayName = x;
|
|
86
|
+
var C = "TabsContent", w = u.forwardRef((e, t) => {
|
|
87
|
+
let { __scopeTabs: n, value: a, forceMount: o, children: s, ...c } = e, l = _(C, n), f = T(l.baseId, a), p = E(l.baseId, a), m = a === l.value, h = u.useRef(m);
|
|
88
|
+
return u.useEffect(() => {
|
|
89
|
+
let e = requestAnimationFrame(() => h.current = !1);
|
|
90
|
+
return () => cancelAnimationFrame(e);
|
|
91
|
+
}, []), /* @__PURE__ */ d(i, {
|
|
92
|
+
present: o || m,
|
|
93
|
+
children: ({ present: n }) => /* @__PURE__ */ d(r.div, {
|
|
94
|
+
"data-state": m ? "active" : "inactive",
|
|
95
|
+
"data-orientation": l.orientation,
|
|
96
|
+
role: "tabpanel",
|
|
97
|
+
"aria-labelledby": f,
|
|
98
|
+
hidden: !n,
|
|
99
|
+
id: p,
|
|
100
|
+
tabIndex: 0,
|
|
101
|
+
...c,
|
|
102
|
+
ref: t,
|
|
103
|
+
style: {
|
|
104
|
+
...e.style,
|
|
105
|
+
animationDuration: h.current ? "0s" : void 0
|
|
106
|
+
},
|
|
107
|
+
children: n && s
|
|
108
|
+
})
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
w.displayName = C;
|
|
112
|
+
function T(e, t) {
|
|
113
|
+
return `${e}-trigger-${t}`;
|
|
114
|
+
}
|
|
115
|
+
function E(e, t) {
|
|
116
|
+
return `${e}-content-${t}`;
|
|
117
|
+
}
|
|
118
|
+
var D = v, O = b, k = S, A = w;
|
|
119
|
+
//#endregion
|
|
120
|
+
export { A as Content, O as List, D as Root2, k as Trigger };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContextScope as e } from "../../../../../@radix-ui_react-context@1.1_796eddd33de3050019fa09b10c68d7ca/node_modules/@radix-ui/react-context/dist/index.js";
|
|
3
|
+
import { useControllableState as t } from "../../../../../@radix-ui_react-use-control_e3b0d353471f209a120bf58c8d35c552/node_modules/@radix-ui/react-use-controllable-state/dist/index.js";
|
|
4
|
+
import { Primitive as n } from "../../../../../@radix-ui_react-primitive@2_9b6ae4cdaf3918ddbf0b21069e38e2ef/node_modules/@radix-ui/react-primitive/dist/index.js";
|
|
5
|
+
import { useDirection as r } from "../../../../../@radix-ui_react-direction@1_2157d1ab8e201288009ff536bb11c468/node_modules/@radix-ui/react-direction/dist/index.js";
|
|
6
|
+
import { Item as i, Root as a, createRovingFocusGroupScope as o } from "../../../../../@radix-ui_react-roving-focu_d783d3abe701a7f2fb2c68867b8f1f65/node_modules/@radix-ui/react-roving-focus/dist/index.js";
|
|
7
|
+
import { Toggle as s } from "../../../../../@radix-ui_react-toggle@1.1._afb5f705be3deb4ba78b89b6c70d5cf9/node_modules/@radix-ui/react-toggle/dist/index.js";
|
|
8
|
+
import * as c from "react";
|
|
9
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
10
|
+
//#region node_modules/.pnpm/@radix-ui+react-toggle-grou_9d4cd233d31c4687b287c174e894620a/node_modules/@radix-ui/react-toggle-group/dist/index.mjs
|
|
11
|
+
var u = "ToggleGroup", [d, f] = e(u, [o]), p = o(), m = c.forwardRef((e, t) => {
|
|
12
|
+
let { type: n, ...r } = e;
|
|
13
|
+
if (n === "single") return /* @__PURE__ */ l(_, {
|
|
14
|
+
...r,
|
|
15
|
+
ref: t
|
|
16
|
+
});
|
|
17
|
+
if (n === "multiple") return /* @__PURE__ */ l(v, {
|
|
18
|
+
...r,
|
|
19
|
+
ref: t
|
|
20
|
+
});
|
|
21
|
+
throw Error(`Missing prop \`type\` expected on \`${u}\``);
|
|
22
|
+
});
|
|
23
|
+
m.displayName = u;
|
|
24
|
+
var [h, g] = d(u), _ = c.forwardRef((e, n) => {
|
|
25
|
+
let { value: r, defaultValue: i, onValueChange: a = () => {}, ...o } = e, [s, d] = t({
|
|
26
|
+
prop: r,
|
|
27
|
+
defaultProp: i ?? "",
|
|
28
|
+
onChange: a,
|
|
29
|
+
caller: u
|
|
30
|
+
});
|
|
31
|
+
return /* @__PURE__ */ l(h, {
|
|
32
|
+
scope: e.__scopeToggleGroup,
|
|
33
|
+
type: "single",
|
|
34
|
+
value: c.useMemo(() => s ? [s] : [], [s]),
|
|
35
|
+
onItemActivate: d,
|
|
36
|
+
onItemDeactivate: c.useCallback(() => d(""), [d]),
|
|
37
|
+
children: /* @__PURE__ */ l(x, {
|
|
38
|
+
...o,
|
|
39
|
+
ref: n
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}), v = c.forwardRef((e, n) => {
|
|
43
|
+
let { value: r, defaultValue: i, onValueChange: a = () => {}, ...o } = e, [s, d] = t({
|
|
44
|
+
prop: r,
|
|
45
|
+
defaultProp: i ?? [],
|
|
46
|
+
onChange: a,
|
|
47
|
+
caller: u
|
|
48
|
+
}), f = c.useCallback((e) => d((t = []) => [...t, e]), [d]), p = c.useCallback((e) => d((t = []) => t.filter((t) => t !== e)), [d]);
|
|
49
|
+
return /* @__PURE__ */ l(h, {
|
|
50
|
+
scope: e.__scopeToggleGroup,
|
|
51
|
+
type: "multiple",
|
|
52
|
+
value: s,
|
|
53
|
+
onItemActivate: f,
|
|
54
|
+
onItemDeactivate: p,
|
|
55
|
+
children: /* @__PURE__ */ l(x, {
|
|
56
|
+
...o,
|
|
57
|
+
ref: n
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
m.displayName = u;
|
|
62
|
+
var [y, b] = d(u), x = c.forwardRef((e, t) => {
|
|
63
|
+
let { __scopeToggleGroup: i, disabled: o = !1, rovingFocus: s = !0, orientation: c, dir: u, loop: d = !0, ...f } = e, m = p(i), h = r(u), g = {
|
|
64
|
+
role: "group",
|
|
65
|
+
dir: h,
|
|
66
|
+
...f
|
|
67
|
+
};
|
|
68
|
+
return /* @__PURE__ */ l(y, {
|
|
69
|
+
scope: i,
|
|
70
|
+
rovingFocus: s,
|
|
71
|
+
disabled: o,
|
|
72
|
+
children: s ? /* @__PURE__ */ l(a, {
|
|
73
|
+
asChild: !0,
|
|
74
|
+
...m,
|
|
75
|
+
orientation: c,
|
|
76
|
+
dir: h,
|
|
77
|
+
loop: d,
|
|
78
|
+
children: /* @__PURE__ */ l(n.div, {
|
|
79
|
+
...g,
|
|
80
|
+
ref: t
|
|
81
|
+
})
|
|
82
|
+
}) : /* @__PURE__ */ l(n.div, {
|
|
83
|
+
...g,
|
|
84
|
+
ref: t
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
}), S = "ToggleGroupItem", C = c.forwardRef((e, t) => {
|
|
88
|
+
let n = g(S, e.__scopeToggleGroup), r = b(S, e.__scopeToggleGroup), a = p(e.__scopeToggleGroup), o = n.value.includes(e.value), s = r.disabled || e.disabled, u = {
|
|
89
|
+
...e,
|
|
90
|
+
pressed: o,
|
|
91
|
+
disabled: s
|
|
92
|
+
}, d = c.useRef(null);
|
|
93
|
+
return r.rovingFocus ? /* @__PURE__ */ l(i, {
|
|
94
|
+
asChild: !0,
|
|
95
|
+
...a,
|
|
96
|
+
focusable: !s,
|
|
97
|
+
active: o,
|
|
98
|
+
ref: d,
|
|
99
|
+
children: /* @__PURE__ */ l(w, {
|
|
100
|
+
...u,
|
|
101
|
+
ref: t
|
|
102
|
+
})
|
|
103
|
+
}) : /* @__PURE__ */ l(w, {
|
|
104
|
+
...u,
|
|
105
|
+
ref: t
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
C.displayName = S;
|
|
109
|
+
var w = c.forwardRef((e, t) => {
|
|
110
|
+
let { __scopeToggleGroup: n, value: r, ...i } = e, a = g(S, n), o = {
|
|
111
|
+
role: "radio",
|
|
112
|
+
"aria-checked": e.pressed,
|
|
113
|
+
"aria-pressed": void 0
|
|
114
|
+
};
|
|
115
|
+
return /* @__PURE__ */ l(s, {
|
|
116
|
+
...a.type === "single" ? o : void 0,
|
|
117
|
+
...i,
|
|
118
|
+
ref: t,
|
|
119
|
+
onPressedChange: (e) => {
|
|
120
|
+
e ? a.onItemActivate(r) : a.onItemDeactivate(r);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}), T = m, E = C;
|
|
124
|
+
//#endregion
|
|
125
|
+
export { E as Item2, T as Root2 };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { composeEventHandlers as e } from "../../../../../@radix-ui_primitive@1.1.4/node_modules/@radix-ui/primitive/dist/index.js";
|
|
3
|
+
import { useControllableState as t } from "../../../../../@radix-ui_react-use-control_e3b0d353471f209a120bf58c8d35c552/node_modules/@radix-ui/react-use-controllable-state/dist/index.js";
|
|
4
|
+
import { Primitive as n } from "../../../../../@radix-ui_react-primitive@2_9b6ae4cdaf3918ddbf0b21069e38e2ef/node_modules/@radix-ui/react-primitive/dist/index.js";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
7
|
+
//#region node_modules/.pnpm/@radix-ui+react-toggle@1.1._afb5f705be3deb4ba78b89b6c70d5cf9/node_modules/@radix-ui/react-toggle/dist/index.mjs
|
|
8
|
+
var a = "Toggle", o = r.forwardRef((r, o) => {
|
|
9
|
+
let { pressed: s, defaultPressed: c, onPressedChange: l, ...u } = r, [d, f] = t({
|
|
10
|
+
prop: s,
|
|
11
|
+
onChange: l,
|
|
12
|
+
defaultProp: c ?? !1,
|
|
13
|
+
caller: a
|
|
14
|
+
});
|
|
15
|
+
return /* @__PURE__ */ i(n.button, {
|
|
16
|
+
type: "button",
|
|
17
|
+
"aria-pressed": d,
|
|
18
|
+
"data-state": d ? "on" : "off",
|
|
19
|
+
"data-disabled": r.disabled ? "" : void 0,
|
|
20
|
+
...u,
|
|
21
|
+
ref: o,
|
|
22
|
+
onClick: e(r.onClick, () => {
|
|
23
|
+
r.disabled || f(!d);
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
o.displayName = a;
|
|
28
|
+
var s = o;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { s as Root, o as Toggle };
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContextScope as e } from "../../../../../@radix-ui_react-context@1.1_796eddd33de3050019fa09b10c68d7ca/node_modules/@radix-ui/react-context/dist/index.js";
|
|
3
|
+
import { useComposedRefs as t } from "../../../../../@radix-ui_react-compose-ref_1124f78b370d43bfeceaaa9b791be73d/node_modules/@radix-ui/react-compose-refs/dist/index.js";
|
|
4
|
+
import { createSlottable as n } from "../../../../../@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";
|
|
5
|
+
import { composeEventHandlers as r } from "../../../../../@radix-ui_primitive@1.1.4/node_modules/@radix-ui/primitive/dist/index.js";
|
|
6
|
+
import { useControllableState as i } from "../../../../../@radix-ui_react-use-control_e3b0d353471f209a120bf58c8d35c552/node_modules/@radix-ui/react-use-controllable-state/dist/index.js";
|
|
7
|
+
import { Primitive as a } from "../../../../../@radix-ui_react-primitive@2_9b6ae4cdaf3918ddbf0b21069e38e2ef/node_modules/@radix-ui/react-primitive/dist/index.js";
|
|
8
|
+
import { Presence as o } from "../../../../../@radix-ui_react-presence@1._dc6e30df35507eb8a116c12c3da26e18/node_modules/@radix-ui/react-presence/dist/index.js";
|
|
9
|
+
import { useId as s } from "../../../../../@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";
|
|
10
|
+
import { DismissableLayer as c } from "../../../../../@radix-ui_react-dismissable_1202449cfd75d4d3d4e876187986c0d8/node_modules/@radix-ui/react-dismissable-layer/dist/index.js";
|
|
11
|
+
import { Portal as l } from "../../../../../@radix-ui_react-portal@1.1._32b1caf40ac61f8d30d412d28d60b4ca/node_modules/@radix-ui/react-portal/dist/index.js";
|
|
12
|
+
import { Root as u } from "../../../../../@radix-ui_react-visually-hi_fbf0dd0d68bb58b2410fc7a153ed1d9c/node_modules/@radix-ui/react-visually-hidden/dist/index.js";
|
|
13
|
+
import { Anchor as d, Arrow as f, Content as p, Root2 as m, createPopperScope as h } from "../../../../../@radix-ui_react-popper@1.3._bd7668c1d3a757f9e8c97f0d7e635b5d/node_modules/@radix-ui/react-popper/dist/index.js";
|
|
14
|
+
import * as g from "react";
|
|
15
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
16
|
+
//#region node_modules/.pnpm/@radix-ui+react-tooltip@1.2_02a5bba0cb45f3ddbe548efab47eabcc/node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
|
17
|
+
var [y, b] = e("Tooltip", [h]), x = h(), S = "TooltipProvider", C = 700, w = "tooltip.open", [T, E] = y(S), D = (e) => {
|
|
18
|
+
let { __scopeTooltip: t, delayDuration: n = C, skipDelayDuration: r = 300, disableHoverableContent: i = !1, children: a } = e, o = g.useRef(!0), s = g.useRef(!1), c = g.useRef(0);
|
|
19
|
+
return g.useEffect(() => {
|
|
20
|
+
let e = c.current;
|
|
21
|
+
return () => window.clearTimeout(e);
|
|
22
|
+
}, []), /* @__PURE__ */ _(T, {
|
|
23
|
+
scope: t,
|
|
24
|
+
isOpenDelayedRef: o,
|
|
25
|
+
delayDuration: n,
|
|
26
|
+
onOpen: g.useCallback(() => {
|
|
27
|
+
r <= 0 || (window.clearTimeout(c.current), o.current = !1);
|
|
28
|
+
}, [r]),
|
|
29
|
+
onClose: g.useCallback(() => {
|
|
30
|
+
r <= 0 || (window.clearTimeout(c.current), c.current = window.setTimeout(() => o.current = !0, r));
|
|
31
|
+
}, [r]),
|
|
32
|
+
isPointerInTransitRef: s,
|
|
33
|
+
onPointerInTransitChange: g.useCallback((e) => {
|
|
34
|
+
s.current = e;
|
|
35
|
+
}, []),
|
|
36
|
+
disableHoverableContent: i,
|
|
37
|
+
children: a
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
D.displayName = S;
|
|
41
|
+
var O = "Tooltip", [k, A] = y(O), j = (e) => {
|
|
42
|
+
let { __scopeTooltip: t, children: n, open: r, defaultOpen: a, onOpenChange: o, disableHoverableContent: c, delayDuration: l } = e, u = E(O, e.__scopeTooltip), d = x(t), [f, p] = g.useState(null), h = s(), v = g.useRef(0), y = c ?? u.disableHoverableContent, b = l ?? u.delayDuration, S = g.useRef(!1), [C, T] = i({
|
|
43
|
+
prop: r,
|
|
44
|
+
defaultProp: a ?? !1,
|
|
45
|
+
onChange: (e) => {
|
|
46
|
+
e ? (u.onOpen(), document.dispatchEvent(new CustomEvent(w))) : u.onClose(), o?.(e);
|
|
47
|
+
},
|
|
48
|
+
caller: O
|
|
49
|
+
}), D = g.useMemo(() => C ? S.current ? "delayed-open" : "instant-open" : "closed", [C]), A = g.useCallback(() => {
|
|
50
|
+
window.clearTimeout(v.current), v.current = 0, S.current = !1, T(!0);
|
|
51
|
+
}, [T]), j = g.useCallback(() => {
|
|
52
|
+
window.clearTimeout(v.current), v.current = 0, T(!1);
|
|
53
|
+
}, [T]), M = g.useCallback(() => {
|
|
54
|
+
window.clearTimeout(v.current), v.current = window.setTimeout(() => {
|
|
55
|
+
S.current = !0, T(!0), v.current = 0;
|
|
56
|
+
}, b);
|
|
57
|
+
}, [b, T]);
|
|
58
|
+
return g.useEffect(() => () => {
|
|
59
|
+
v.current &&= (window.clearTimeout(v.current), 0);
|
|
60
|
+
}, []), /* @__PURE__ */ _(m, {
|
|
61
|
+
...d,
|
|
62
|
+
children: /* @__PURE__ */ _(k, {
|
|
63
|
+
scope: t,
|
|
64
|
+
contentId: h,
|
|
65
|
+
open: C,
|
|
66
|
+
stateAttribute: D,
|
|
67
|
+
trigger: f,
|
|
68
|
+
onTriggerChange: p,
|
|
69
|
+
onTriggerEnter: g.useCallback(() => {
|
|
70
|
+
u.isOpenDelayedRef.current ? M() : A();
|
|
71
|
+
}, [
|
|
72
|
+
u.isOpenDelayedRef,
|
|
73
|
+
M,
|
|
74
|
+
A
|
|
75
|
+
]),
|
|
76
|
+
onTriggerLeave: g.useCallback(() => {
|
|
77
|
+
y ? j() : (window.clearTimeout(v.current), v.current = 0);
|
|
78
|
+
}, [j, y]),
|
|
79
|
+
onOpen: A,
|
|
80
|
+
onClose: j,
|
|
81
|
+
disableHoverableContent: y,
|
|
82
|
+
children: n
|
|
83
|
+
})
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
j.displayName = O;
|
|
87
|
+
var M = "TooltipTrigger", N = g.forwardRef((e, n) => {
|
|
88
|
+
let { __scopeTooltip: i, ...o } = e, s = A(M, i), c = E(M, i), l = x(i), u = t(n, g.useRef(null), s.onTriggerChange), f = g.useRef(!1), p = g.useRef(!1), m = g.useCallback(() => f.current = !1, []);
|
|
89
|
+
return g.useEffect(() => () => document.removeEventListener("pointerup", m), [m]), /* @__PURE__ */ _(d, {
|
|
90
|
+
asChild: !0,
|
|
91
|
+
...l,
|
|
92
|
+
children: /* @__PURE__ */ _(a.button, {
|
|
93
|
+
"aria-describedby": s.open ? s.contentId : void 0,
|
|
94
|
+
"data-state": s.stateAttribute,
|
|
95
|
+
...o,
|
|
96
|
+
ref: u,
|
|
97
|
+
onPointerMove: r(e.onPointerMove, (e) => {
|
|
98
|
+
e.pointerType !== "touch" && !p.current && !c.isPointerInTransitRef.current && (s.onTriggerEnter(), p.current = !0);
|
|
99
|
+
}),
|
|
100
|
+
onPointerLeave: r(e.onPointerLeave, () => {
|
|
101
|
+
s.onTriggerLeave(), p.current = !1;
|
|
102
|
+
}),
|
|
103
|
+
onPointerDown: r(e.onPointerDown, () => {
|
|
104
|
+
s.open && s.onClose(), f.current = !0, document.addEventListener("pointerup", m, { once: !0 });
|
|
105
|
+
}),
|
|
106
|
+
onFocus: r(e.onFocus, () => {
|
|
107
|
+
f.current || s.onOpen();
|
|
108
|
+
}),
|
|
109
|
+
onBlur: r(e.onBlur, s.onClose),
|
|
110
|
+
onClick: r(e.onClick, s.onClose)
|
|
111
|
+
})
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
N.displayName = M;
|
|
115
|
+
var P = "TooltipPortal", [F, I] = y(P, { forceMount: void 0 }), L = (e) => {
|
|
116
|
+
let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, a = A(P, t);
|
|
117
|
+
return /* @__PURE__ */ _(F, {
|
|
118
|
+
scope: t,
|
|
119
|
+
forceMount: n,
|
|
120
|
+
children: /* @__PURE__ */ _(o, {
|
|
121
|
+
present: n || a.open,
|
|
122
|
+
children: /* @__PURE__ */ _(l, {
|
|
123
|
+
asChild: !0,
|
|
124
|
+
container: i,
|
|
125
|
+
children: r
|
|
126
|
+
})
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
L.displayName = P;
|
|
131
|
+
var R = "TooltipContent", z = g.forwardRef((e, t) => {
|
|
132
|
+
let n = I(R, e.__scopeTooltip), { forceMount: r = n.forceMount, side: i = "top", ...a } = e, s = A(R, e.__scopeTooltip);
|
|
133
|
+
return /* @__PURE__ */ _(o, {
|
|
134
|
+
present: r || s.open,
|
|
135
|
+
children: s.disableHoverableContent ? /* @__PURE__ */ _(W, {
|
|
136
|
+
side: i,
|
|
137
|
+
...a,
|
|
138
|
+
ref: t
|
|
139
|
+
}) : /* @__PURE__ */ _(B, {
|
|
140
|
+
side: i,
|
|
141
|
+
...a,
|
|
142
|
+
ref: t
|
|
143
|
+
})
|
|
144
|
+
});
|
|
145
|
+
}), B = g.forwardRef((e, n) => {
|
|
146
|
+
let r = A(R, e.__scopeTooltip), i = E(R, e.__scopeTooltip), a = g.useRef(null), o = t(n, a), [s, c] = g.useState(null), { trigger: l, onClose: u } = r, d = a.current, { onPointerInTransitChange: f } = i, p = g.useCallback(() => {
|
|
147
|
+
c(null), f(!1);
|
|
148
|
+
}, [f]), m = g.useCallback((e, t) => {
|
|
149
|
+
let n = e.currentTarget, r = {
|
|
150
|
+
x: e.clientX,
|
|
151
|
+
y: e.clientY
|
|
152
|
+
}, i = J(r, q(r, n.getBoundingClientRect())), a = Y(t.getBoundingClientRect());
|
|
153
|
+
c(Z([...i, ...a])), f(!0);
|
|
154
|
+
}, [f]);
|
|
155
|
+
return g.useEffect(() => () => p(), [p]), g.useEffect(() => {
|
|
156
|
+
if (l && d) {
|
|
157
|
+
let e = (e) => m(e, d), t = (e) => m(e, l);
|
|
158
|
+
return l.addEventListener("pointerleave", e), d.addEventListener("pointerleave", t), () => {
|
|
159
|
+
l.removeEventListener("pointerleave", e), d.removeEventListener("pointerleave", t);
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
}, [
|
|
163
|
+
l,
|
|
164
|
+
d,
|
|
165
|
+
m,
|
|
166
|
+
p
|
|
167
|
+
]), g.useEffect(() => {
|
|
168
|
+
if (s) {
|
|
169
|
+
let e = (e) => {
|
|
170
|
+
let t = e.target, n = {
|
|
171
|
+
x: e.clientX,
|
|
172
|
+
y: e.clientY
|
|
173
|
+
}, r = l?.contains(t) || d?.contains(t), i = !X(n, s);
|
|
174
|
+
r ? p() : i && (p(), u());
|
|
175
|
+
};
|
|
176
|
+
return document.addEventListener("pointermove", e), () => document.removeEventListener("pointermove", e);
|
|
177
|
+
}
|
|
178
|
+
}, [
|
|
179
|
+
l,
|
|
180
|
+
d,
|
|
181
|
+
s,
|
|
182
|
+
u,
|
|
183
|
+
p
|
|
184
|
+
]), /* @__PURE__ */ _(W, {
|
|
185
|
+
...e,
|
|
186
|
+
ref: o
|
|
187
|
+
});
|
|
188
|
+
}), [V, H] = y(O, { isInside: !1 }), U = n("TooltipContent"), W = g.forwardRef((e, t) => {
|
|
189
|
+
let { __scopeTooltip: n, children: r, "aria-label": i, onEscapeKeyDown: a, onPointerDownOutside: o, ...s } = e, l = A(R, n), d = x(n), { onClose: f } = l;
|
|
190
|
+
return g.useEffect(() => (document.addEventListener(w, f), () => document.removeEventListener(w, f)), [f]), g.useEffect(() => {
|
|
191
|
+
if (l.trigger) {
|
|
192
|
+
let e = (e) => {
|
|
193
|
+
e.target instanceof Node && e.target.contains(l.trigger) && f();
|
|
194
|
+
};
|
|
195
|
+
return window.addEventListener("scroll", e, { capture: !0 }), () => window.removeEventListener("scroll", e, { capture: !0 });
|
|
196
|
+
}
|
|
197
|
+
}, [l.trigger, f]), /* @__PURE__ */ _(c, {
|
|
198
|
+
asChild: !0,
|
|
199
|
+
disableOutsidePointerEvents: !1,
|
|
200
|
+
onEscapeKeyDown: a,
|
|
201
|
+
onPointerDownOutside: o,
|
|
202
|
+
onFocusOutside: (e) => e.preventDefault(),
|
|
203
|
+
onDismiss: f,
|
|
204
|
+
children: /* @__PURE__ */ v(p, {
|
|
205
|
+
"data-state": l.stateAttribute,
|
|
206
|
+
...d,
|
|
207
|
+
...s,
|
|
208
|
+
ref: t,
|
|
209
|
+
style: {
|
|
210
|
+
...s.style,
|
|
211
|
+
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
212
|
+
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
|
213
|
+
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
|
214
|
+
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
215
|
+
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
216
|
+
},
|
|
217
|
+
children: [/* @__PURE__ */ _(U, { children: r }), /* @__PURE__ */ _(V, {
|
|
218
|
+
scope: n,
|
|
219
|
+
isInside: !0,
|
|
220
|
+
children: /* @__PURE__ */ _(u, {
|
|
221
|
+
id: l.contentId,
|
|
222
|
+
role: "tooltip",
|
|
223
|
+
children: i || r
|
|
224
|
+
})
|
|
225
|
+
})]
|
|
226
|
+
})
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
z.displayName = R;
|
|
230
|
+
var G = "TooltipArrow", K = g.forwardRef((e, t) => {
|
|
231
|
+
let { __scopeTooltip: n, ...r } = e, i = x(n);
|
|
232
|
+
return H(G, n).isInside ? null : /* @__PURE__ */ _(f, {
|
|
233
|
+
...i,
|
|
234
|
+
...r,
|
|
235
|
+
ref: t
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
K.displayName = G;
|
|
239
|
+
function q(e, t) {
|
|
240
|
+
let n = Math.abs(t.top - e.y), r = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), a = Math.abs(t.left - e.x);
|
|
241
|
+
switch (Math.min(n, r, i, a)) {
|
|
242
|
+
case a: return "left";
|
|
243
|
+
case i: return "right";
|
|
244
|
+
case n: return "top";
|
|
245
|
+
case r: return "bottom";
|
|
246
|
+
default: throw Error("unreachable");
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
function J(e, t, n = 5) {
|
|
250
|
+
let r = [];
|
|
251
|
+
switch (t) {
|
|
252
|
+
case "top":
|
|
253
|
+
r.push({
|
|
254
|
+
x: e.x - n,
|
|
255
|
+
y: e.y + n
|
|
256
|
+
}, {
|
|
257
|
+
x: e.x + n,
|
|
258
|
+
y: e.y + n
|
|
259
|
+
});
|
|
260
|
+
break;
|
|
261
|
+
case "bottom":
|
|
262
|
+
r.push({
|
|
263
|
+
x: e.x - n,
|
|
264
|
+
y: e.y - n
|
|
265
|
+
}, {
|
|
266
|
+
x: e.x + n,
|
|
267
|
+
y: e.y - n
|
|
268
|
+
});
|
|
269
|
+
break;
|
|
270
|
+
case "left":
|
|
271
|
+
r.push({
|
|
272
|
+
x: e.x + n,
|
|
273
|
+
y: e.y - n
|
|
274
|
+
}, {
|
|
275
|
+
x: e.x + n,
|
|
276
|
+
y: e.y + n
|
|
277
|
+
});
|
|
278
|
+
break;
|
|
279
|
+
case "right":
|
|
280
|
+
r.push({
|
|
281
|
+
x: e.x - n,
|
|
282
|
+
y: e.y - n
|
|
283
|
+
}, {
|
|
284
|
+
x: e.x - n,
|
|
285
|
+
y: e.y + n
|
|
286
|
+
});
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
return r;
|
|
290
|
+
}
|
|
291
|
+
function Y(e) {
|
|
292
|
+
let { top: t, right: n, bottom: r, left: i } = e;
|
|
293
|
+
return [
|
|
294
|
+
{
|
|
295
|
+
x: i,
|
|
296
|
+
y: t
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
x: n,
|
|
300
|
+
y: t
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
x: n,
|
|
304
|
+
y: r
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
x: i,
|
|
308
|
+
y: r
|
|
309
|
+
}
|
|
310
|
+
];
|
|
311
|
+
}
|
|
312
|
+
function X(e, t) {
|
|
313
|
+
let { x: n, y: r } = e, i = !1;
|
|
314
|
+
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
|
|
315
|
+
let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
|
|
316
|
+
l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
|
|
317
|
+
}
|
|
318
|
+
return i;
|
|
319
|
+
}
|
|
320
|
+
function Z(e) {
|
|
321
|
+
let t = e.slice();
|
|
322
|
+
return t.sort((e, t) => e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : +(e.y > t.y)), Q(t);
|
|
323
|
+
}
|
|
324
|
+
function Q(e) {
|
|
325
|
+
if (e.length <= 1) return e.slice();
|
|
326
|
+
let t = [];
|
|
327
|
+
for (let n = 0; n < e.length; n++) {
|
|
328
|
+
let r = e[n];
|
|
329
|
+
for (; t.length >= 2;) {
|
|
330
|
+
let e = t[t.length - 1], n = t[t.length - 2];
|
|
331
|
+
if ((e.x - n.x) * (r.y - n.y) >= (e.y - n.y) * (r.x - n.x)) t.pop();
|
|
332
|
+
else break;
|
|
333
|
+
}
|
|
334
|
+
t.push(r);
|
|
335
|
+
}
|
|
336
|
+
t.pop();
|
|
337
|
+
let n = [];
|
|
338
|
+
for (let t = e.length - 1; t >= 0; t--) {
|
|
339
|
+
let r = e[t];
|
|
340
|
+
for (; n.length >= 2;) {
|
|
341
|
+
let e = n[n.length - 1], t = n[n.length - 2];
|
|
342
|
+
if ((e.x - t.x) * (r.y - t.y) >= (e.y - t.y) * (r.x - t.x)) n.pop();
|
|
343
|
+
else break;
|
|
344
|
+
}
|
|
345
|
+
n.push(r);
|
|
346
|
+
}
|
|
347
|
+
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
348
|
+
}
|
|
349
|
+
var $ = D, ee = j, te = N, ne = L, re = z, ie = K;
|
|
350
|
+
//#endregion
|
|
351
|
+
export { ie as Arrow2, re as Content2, ne as Portal, $ as Provider, ee as Root3, te as Trigger };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
//#region node_modules/.pnpm/@radix-ui+react-use-callbac_5106d65c013fadfe178f87486239c7af/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
3
|
+
function t(t) {
|
|
4
|
+
let n = e.useRef(t);
|
|
5
|
+
return e.useEffect(() => {
|
|
6
|
+
n.current = t;
|
|
7
|
+
}), e.useMemo(() => ((...e) => n.current?.(...e)), []);
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { t as useCallbackRef };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useLayoutEffect2 as e } from "../../../../../@radix-ui_react-use-layout-_ad41f999ca2019252b887df955038ce1/node_modules/@radix-ui/react-use-layout-effect/dist/index.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
//#region node_modules/.pnpm/@radix-ui+react-use-control_e3b0d353471f209a120bf58c8d35c552/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
4
|
+
var n = t.useInsertionEffect || e;
|
|
5
|
+
function r({ prop: e, defaultProp: n, onChange: r = () => {}, caller: o }) {
|
|
6
|
+
let [s, c, l] = i({
|
|
7
|
+
defaultProp: n,
|
|
8
|
+
onChange: r
|
|
9
|
+
}), u = e !== void 0, d = u ? e : s;
|
|
10
|
+
{
|
|
11
|
+
let n = t.useRef(e !== void 0);
|
|
12
|
+
t.useEffect(() => {
|
|
13
|
+
let e = n.current;
|
|
14
|
+
e !== u && console.warn(`${o} is changing from ${e ? "controlled" : "uncontrolled"} to ${u ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`), n.current = u;
|
|
15
|
+
}, [u, o]);
|
|
16
|
+
}
|
|
17
|
+
return [d, t.useCallback((t) => {
|
|
18
|
+
if (u) {
|
|
19
|
+
let n = a(t) ? t(e) : t;
|
|
20
|
+
n !== e && l.current?.(n);
|
|
21
|
+
} else c(t);
|
|
22
|
+
}, [
|
|
23
|
+
u,
|
|
24
|
+
e,
|
|
25
|
+
c,
|
|
26
|
+
l
|
|
27
|
+
])];
|
|
28
|
+
}
|
|
29
|
+
function i({ defaultProp: e, onChange: r }) {
|
|
30
|
+
let [i, a] = t.useState(e), o = t.useRef(i), s = t.useRef(r);
|
|
31
|
+
return n(() => {
|
|
32
|
+
s.current = r;
|
|
33
|
+
}, [r]), t.useEffect(() => {
|
|
34
|
+
o.current !== i && (s.current?.(i), o.current = i);
|
|
35
|
+
}, [i, o]), [
|
|
36
|
+
i,
|
|
37
|
+
a,
|
|
38
|
+
s
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
function a(e) {
|
|
42
|
+
return typeof e == "function";
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { r as useControllableState };
|