@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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Primitive as e } from "../../../../../@radix-ui_react-primitive@2_9b6ae4cdaf3918ddbf0b21069e38e2ef/node_modules/@radix-ui/react-primitive/dist/index.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region node_modules/.pnpm/@radix-ui+react-separator@1_f5efb6a4d38fd7cb82808cb6f7a6326a/node_modules/@radix-ui/react-separator/dist/index.mjs
|
|
5
|
+
var r = "Separator", i = "horizontal", a = ["horizontal", "vertical"], o = t.forwardRef((t, r) => {
|
|
6
|
+
let { decorative: a, orientation: o = i, ...c } = t, l = s(o) ? o : i, u = a ? { role: "none" } : {
|
|
7
|
+
"aria-orientation": l === "vertical" ? l : void 0,
|
|
8
|
+
role: "separator"
|
|
9
|
+
};
|
|
10
|
+
return /* @__PURE__ */ n(e.div, {
|
|
11
|
+
"data-orientation": l,
|
|
12
|
+
...u,
|
|
13
|
+
...c,
|
|
14
|
+
ref: r
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
o.displayName = r;
|
|
18
|
+
function s(e) {
|
|
19
|
+
return a.includes(e);
|
|
20
|
+
}
|
|
21
|
+
var c = o;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { c as Root };
|
|
@@ -0,0 +1,404 @@
|
|
|
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 { createCollection as n } from "../../../../../@radix-ui_react-collection@_9d7b7379fb7a1e56af9d4a8d107ecba8/node_modules/@radix-ui/react-collection/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 { useDirection as o } from "../../../../../@radix-ui_react-direction@1_2157d1ab8e201288009ff536bb11c468/node_modules/@radix-ui/react-direction/dist/index.js";
|
|
9
|
+
import { usePrevious as s } from "../../../../../@radix-ui_react-use-previou_58b78c95af3b98dc4c1bc8bce73c779d/node_modules/@radix-ui/react-use-previous/dist/index.js";
|
|
10
|
+
import { useSize as c } from "../../../../../@radix-ui_react-use-size@1._4b75a7cfb879b922004e7a6caa492077/node_modules/@radix-ui/react-use-size/dist/index.js";
|
|
11
|
+
import { clamp as l } from "../../../../../@radix-ui_number@1.1.2/node_modules/@radix-ui/number/dist/index.js";
|
|
12
|
+
import * as u from "react";
|
|
13
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
14
|
+
//#region node_modules/.pnpm/@radix-ui+react-slider@1.4._cfb70bb4d45c3eedb16b2d4d4cf80f46/node_modules/@radix-ui/react-slider/dist/index.mjs
|
|
15
|
+
var m = ["PageUp", "PageDown"], h = [
|
|
16
|
+
"ArrowUp",
|
|
17
|
+
"ArrowDown",
|
|
18
|
+
"ArrowLeft",
|
|
19
|
+
"ArrowRight"
|
|
20
|
+
], g = {
|
|
21
|
+
"from-left": [
|
|
22
|
+
"Home",
|
|
23
|
+
"PageDown",
|
|
24
|
+
"ArrowDown",
|
|
25
|
+
"ArrowLeft"
|
|
26
|
+
],
|
|
27
|
+
"from-right": [
|
|
28
|
+
"Home",
|
|
29
|
+
"PageDown",
|
|
30
|
+
"ArrowDown",
|
|
31
|
+
"ArrowRight"
|
|
32
|
+
],
|
|
33
|
+
"from-bottom": [
|
|
34
|
+
"Home",
|
|
35
|
+
"PageDown",
|
|
36
|
+
"ArrowDown",
|
|
37
|
+
"ArrowLeft"
|
|
38
|
+
],
|
|
39
|
+
"from-top": [
|
|
40
|
+
"Home",
|
|
41
|
+
"PageDown",
|
|
42
|
+
"ArrowUp",
|
|
43
|
+
"ArrowLeft"
|
|
44
|
+
]
|
|
45
|
+
}, _ = "Slider", [v, y, b] = n(_), [x, S] = e(_, [b]), [C, w] = x(_), T = u.forwardRef((e, t) => {
|
|
46
|
+
let { name: n, min: a = 0, max: o = 100, step: s = 1, orientation: c = "horizontal", disabled: d = !1, minStepsBetweenThumbs: p = 0, defaultValue: g = [a], value: _, onValueChange: y = () => {}, onValueCommit: b = () => {}, inverted: x = !1, form: S, ...w } = e, T = u.useRef(/* @__PURE__ */ new Set()), E = u.useRef(0), D = u.useRef(!1), A = c === "horizontal" ? O : k, [j = [], M] = i({
|
|
47
|
+
prop: _,
|
|
48
|
+
defaultProp: g,
|
|
49
|
+
onChange: (e) => {
|
|
50
|
+
[...T.current][E.current]?.focus({
|
|
51
|
+
preventScroll: !0,
|
|
52
|
+
focusVisible: D.current
|
|
53
|
+
}), D.current = !1, y(e);
|
|
54
|
+
}
|
|
55
|
+
}), N = u.useRef(j);
|
|
56
|
+
function P(e) {
|
|
57
|
+
L(e, J(j, e));
|
|
58
|
+
}
|
|
59
|
+
function F(e) {
|
|
60
|
+
L(e, E.current);
|
|
61
|
+
}
|
|
62
|
+
function I() {
|
|
63
|
+
let e = N.current[E.current];
|
|
64
|
+
j[E.current] !== e && b(j);
|
|
65
|
+
}
|
|
66
|
+
function L(e, t, { commit: n } = { commit: !1 }) {
|
|
67
|
+
let r = $(s), i = l(ee(Math.round((e - a) / s) * s + a, r), [a, o]);
|
|
68
|
+
M((e = []) => {
|
|
69
|
+
let r = G(e, i, t);
|
|
70
|
+
if (Z(r, p * s)) {
|
|
71
|
+
E.current = r.indexOf(i);
|
|
72
|
+
let t = String(r) !== String(e);
|
|
73
|
+
return t && n && b(r), t ? r : e;
|
|
74
|
+
} else return e;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return /* @__PURE__ */ f(C, {
|
|
78
|
+
scope: e.__scopeSlider,
|
|
79
|
+
name: n,
|
|
80
|
+
disabled: d,
|
|
81
|
+
min: a,
|
|
82
|
+
max: o,
|
|
83
|
+
valueIndexToChangeRef: E,
|
|
84
|
+
thumbs: T.current,
|
|
85
|
+
values: j,
|
|
86
|
+
orientation: c,
|
|
87
|
+
form: S,
|
|
88
|
+
children: /* @__PURE__ */ f(v.Provider, {
|
|
89
|
+
scope: e.__scopeSlider,
|
|
90
|
+
children: /* @__PURE__ */ f(v.Slot, {
|
|
91
|
+
scope: e.__scopeSlider,
|
|
92
|
+
children: /* @__PURE__ */ f(A, {
|
|
93
|
+
"aria-disabled": d,
|
|
94
|
+
"data-disabled": d ? "" : void 0,
|
|
95
|
+
...w,
|
|
96
|
+
ref: t,
|
|
97
|
+
onPointerDown: r(w.onPointerDown, () => {
|
|
98
|
+
d || (N.current = j, D.current = !1);
|
|
99
|
+
}),
|
|
100
|
+
min: a,
|
|
101
|
+
max: o,
|
|
102
|
+
inverted: x,
|
|
103
|
+
onSlideStart: d ? void 0 : P,
|
|
104
|
+
onSlideMove: d ? void 0 : F,
|
|
105
|
+
onSlideEnd: d ? void 0 : I,
|
|
106
|
+
onHomeKeyDown: () => {
|
|
107
|
+
d || (D.current = !0, L(a, 0, { commit: !0 }));
|
|
108
|
+
},
|
|
109
|
+
onEndKeyDown: () => {
|
|
110
|
+
d || (D.current = !0, L(o, j.length - 1, { commit: !0 }));
|
|
111
|
+
},
|
|
112
|
+
onStepKeyDown: ({ event: e, direction: t }) => {
|
|
113
|
+
if (!d) {
|
|
114
|
+
D.current = !0;
|
|
115
|
+
let n = m.includes(e.key) || e.shiftKey && h.includes(e.key) ? 10 : 1, r = E.current, i = j[r];
|
|
116
|
+
L(i + s * n * t, r, { commit: !0 });
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
})
|
|
121
|
+
})
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
T.displayName = _;
|
|
125
|
+
var [E, D] = x(_, {
|
|
126
|
+
startEdge: "left",
|
|
127
|
+
endEdge: "right",
|
|
128
|
+
size: "width",
|
|
129
|
+
direction: 1
|
|
130
|
+
}), O = u.forwardRef((e, n) => {
|
|
131
|
+
let { min: r, max: i, dir: a, inverted: s, onSlideStart: c, onSlideMove: l, onSlideEnd: d, onStepKeyDown: p, ...m } = e, [h, _] = u.useState(null), v = t(n, (e) => _(e)), y = u.useRef(void 0), b = o(a), x = b === "ltr", S = x && !s || !x && s;
|
|
132
|
+
function C(e) {
|
|
133
|
+
let t = y.current || h.getBoundingClientRect(), n = Q([0, t.width], S ? [r, i] : [i, r]);
|
|
134
|
+
return y.current = t, n(e - t.left);
|
|
135
|
+
}
|
|
136
|
+
return /* @__PURE__ */ f(E, {
|
|
137
|
+
scope: e.__scopeSlider,
|
|
138
|
+
startEdge: S ? "left" : "right",
|
|
139
|
+
endEdge: S ? "right" : "left",
|
|
140
|
+
direction: S ? 1 : -1,
|
|
141
|
+
size: "width",
|
|
142
|
+
children: /* @__PURE__ */ f(A, {
|
|
143
|
+
dir: b,
|
|
144
|
+
"data-orientation": "horizontal",
|
|
145
|
+
...m,
|
|
146
|
+
ref: v,
|
|
147
|
+
style: {
|
|
148
|
+
...m.style,
|
|
149
|
+
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
150
|
+
},
|
|
151
|
+
onSlideStart: (e) => {
|
|
152
|
+
let t = C(e.clientX);
|
|
153
|
+
c?.(t);
|
|
154
|
+
},
|
|
155
|
+
onSlideMove: (e) => {
|
|
156
|
+
let t = C(e.clientX);
|
|
157
|
+
l?.(t);
|
|
158
|
+
},
|
|
159
|
+
onSlideEnd: () => {
|
|
160
|
+
y.current = void 0, d?.();
|
|
161
|
+
},
|
|
162
|
+
onStepKeyDown: (e) => {
|
|
163
|
+
let t = g[S ? "from-left" : "from-right"].includes(e.key);
|
|
164
|
+
p?.({
|
|
165
|
+
event: e,
|
|
166
|
+
direction: t ? -1 : 1
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
})
|
|
170
|
+
});
|
|
171
|
+
}), k = u.forwardRef((e, n) => {
|
|
172
|
+
let { min: r, max: i, inverted: a, onSlideStart: o, onSlideMove: s, onSlideEnd: c, onStepKeyDown: l, ...d } = e, p = u.useRef(null), m = t(n, p), h = u.useRef(void 0), _ = !a;
|
|
173
|
+
function v(e) {
|
|
174
|
+
let t = h.current || p.current.getBoundingClientRect(), n = Q([0, t.height], _ ? [i, r] : [r, i]);
|
|
175
|
+
return h.current = t, n(e - t.top);
|
|
176
|
+
}
|
|
177
|
+
return /* @__PURE__ */ f(E, {
|
|
178
|
+
scope: e.__scopeSlider,
|
|
179
|
+
startEdge: _ ? "bottom" : "top",
|
|
180
|
+
endEdge: _ ? "top" : "bottom",
|
|
181
|
+
size: "height",
|
|
182
|
+
direction: _ ? 1 : -1,
|
|
183
|
+
children: /* @__PURE__ */ f(A, {
|
|
184
|
+
"data-orientation": "vertical",
|
|
185
|
+
...d,
|
|
186
|
+
ref: m,
|
|
187
|
+
style: {
|
|
188
|
+
...d.style,
|
|
189
|
+
"--radix-slider-thumb-transform": "translateY(50%)"
|
|
190
|
+
},
|
|
191
|
+
onSlideStart: (e) => {
|
|
192
|
+
let t = v(e.clientY);
|
|
193
|
+
o?.(t);
|
|
194
|
+
},
|
|
195
|
+
onSlideMove: (e) => {
|
|
196
|
+
let t = v(e.clientY);
|
|
197
|
+
s?.(t);
|
|
198
|
+
},
|
|
199
|
+
onSlideEnd: () => {
|
|
200
|
+
h.current = void 0, c?.();
|
|
201
|
+
},
|
|
202
|
+
onStepKeyDown: (e) => {
|
|
203
|
+
let t = g[_ ? "from-bottom" : "from-top"].includes(e.key);
|
|
204
|
+
l?.({
|
|
205
|
+
event: e,
|
|
206
|
+
direction: t ? -1 : 1
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
})
|
|
210
|
+
});
|
|
211
|
+
}), A = u.forwardRef((e, t) => {
|
|
212
|
+
let { __scopeSlider: n, onSlideStart: i, onSlideMove: o, onSlideEnd: s, onHomeKeyDown: c, onEndKeyDown: l, onStepKeyDown: u, ...d } = e, p = w(_, n);
|
|
213
|
+
return /* @__PURE__ */ f(a.span, {
|
|
214
|
+
...d,
|
|
215
|
+
ref: t,
|
|
216
|
+
onKeyDown: r(e.onKeyDown, (e) => {
|
|
217
|
+
e.key === "Home" ? (c(e), e.preventDefault()) : e.key === "End" ? (l(e), e.preventDefault()) : m.concat(h).includes(e.key) && (u(e), e.preventDefault());
|
|
218
|
+
}),
|
|
219
|
+
onPointerDown: r(e.onPointerDown, (e) => {
|
|
220
|
+
let t = e.target;
|
|
221
|
+
t.setPointerCapture(e.pointerId), e.preventDefault(), p.thumbs.has(t) ? t.focus({
|
|
222
|
+
preventScroll: !0,
|
|
223
|
+
focusVisible: !1
|
|
224
|
+
}) : i(e);
|
|
225
|
+
}),
|
|
226
|
+
onPointerMove: r(e.onPointerMove, (e) => {
|
|
227
|
+
e.target.hasPointerCapture(e.pointerId) && o(e);
|
|
228
|
+
}),
|
|
229
|
+
onPointerUp: r(e.onPointerUp, (e) => {
|
|
230
|
+
let t = e.target;
|
|
231
|
+
t.hasPointerCapture(e.pointerId) && (t.releasePointerCapture(e.pointerId), s(e));
|
|
232
|
+
})
|
|
233
|
+
});
|
|
234
|
+
}), j = "SliderTrack", M = u.forwardRef((e, t) => {
|
|
235
|
+
let { __scopeSlider: n, ...r } = e, i = w(j, n);
|
|
236
|
+
return /* @__PURE__ */ f(a.span, {
|
|
237
|
+
"data-disabled": i.disabled ? "" : void 0,
|
|
238
|
+
"data-orientation": i.orientation,
|
|
239
|
+
...r,
|
|
240
|
+
ref: t
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
M.displayName = j;
|
|
244
|
+
var N = "SliderRange", P = u.forwardRef((e, n) => {
|
|
245
|
+
let { __scopeSlider: r, ...i } = e, o = w(N, r), s = D(N, r), c = t(n, u.useRef(null)), l = o.values.length, d = o.values.map((e) => K(e, o.min, o.max)), p = l > 1 ? Math.min(...d) : 0, m = 100 - Math.max(...d);
|
|
246
|
+
return /* @__PURE__ */ f(a.span, {
|
|
247
|
+
"data-orientation": o.orientation,
|
|
248
|
+
"data-disabled": o.disabled ? "" : void 0,
|
|
249
|
+
...i,
|
|
250
|
+
ref: c,
|
|
251
|
+
style: {
|
|
252
|
+
...e.style,
|
|
253
|
+
[s.startEdge]: p + "%",
|
|
254
|
+
[s.endEdge]: m + "%"
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
P.displayName = N;
|
|
259
|
+
var F = "SliderThumb", [I, L] = x(F), R = "SliderThumbProvider";
|
|
260
|
+
function z(e) {
|
|
261
|
+
let { __scopeSlider: t, name: n, children: r, internal_do_not_use_render: i } = e, a = w(R, t), o = y(t), [s, l] = u.useState(null), d = u.useMemo(() => s ? o().findIndex((e) => e.ref.current === s) : -1, [o, s]), p = c(s), m = s ? !!a.form || !!s.closest("form") : !0, h = a.values[d], g = n ?? (a.name ? a.name + (a.values.length > 1 ? "[]" : "") : void 0), _ = h === void 0 ? 0 : K(h, a.min, a.max);
|
|
262
|
+
u.useEffect(() => {
|
|
263
|
+
if (s) return a.thumbs.add(s), () => {
|
|
264
|
+
a.thumbs.delete(s);
|
|
265
|
+
};
|
|
266
|
+
}, [s, a.thumbs]);
|
|
267
|
+
let v = {
|
|
268
|
+
value: h,
|
|
269
|
+
name: g,
|
|
270
|
+
form: a.form,
|
|
271
|
+
isFormControl: m,
|
|
272
|
+
index: d,
|
|
273
|
+
thumb: s,
|
|
274
|
+
onThumbChange: l,
|
|
275
|
+
percent: _,
|
|
276
|
+
size: p
|
|
277
|
+
};
|
|
278
|
+
return /* @__PURE__ */ f(I, {
|
|
279
|
+
scope: t,
|
|
280
|
+
...v,
|
|
281
|
+
children: te(i) ? i(v) : r
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
z.displayName = R;
|
|
285
|
+
var B = "SliderThumbTrigger", V = u.forwardRef((e, n) => {
|
|
286
|
+
let { __scopeSlider: i, ...o } = e, s = w(B, i), c = D(B, i), { index: l, value: u, percent: d, size: p, onThumbChange: m } = L(B, i), h = t(n, (e) => m(e)), g = q(l, s.values.length), _ = p?.[c.size], y = _ ? Y(_, d, c.direction) : 0;
|
|
287
|
+
return /* @__PURE__ */ f("span", {
|
|
288
|
+
style: {
|
|
289
|
+
transform: "var(--radix-slider-thumb-transform)",
|
|
290
|
+
position: "absolute",
|
|
291
|
+
[c.startEdge]: `calc(${d}% + ${y}px)`
|
|
292
|
+
},
|
|
293
|
+
children: /* @__PURE__ */ f(v.ItemSlot, {
|
|
294
|
+
scope: i,
|
|
295
|
+
children: /* @__PURE__ */ f(a.span, {
|
|
296
|
+
role: "slider",
|
|
297
|
+
"aria-label": e["aria-label"] || g,
|
|
298
|
+
"aria-valuemin": s.min,
|
|
299
|
+
"aria-valuenow": u,
|
|
300
|
+
"aria-valuemax": s.max,
|
|
301
|
+
"aria-orientation": s.orientation,
|
|
302
|
+
"data-orientation": s.orientation,
|
|
303
|
+
"data-disabled": s.disabled ? "" : void 0,
|
|
304
|
+
tabIndex: s.disabled ? void 0 : 0,
|
|
305
|
+
...o,
|
|
306
|
+
ref: h,
|
|
307
|
+
style: u === void 0 ? { display: "none" } : e.style,
|
|
308
|
+
onFocus: r(e.onFocus, () => {
|
|
309
|
+
s.valueIndexToChangeRef.current = l;
|
|
310
|
+
})
|
|
311
|
+
})
|
|
312
|
+
})
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
V.displayName = B;
|
|
316
|
+
var H = u.forwardRef((e, t) => {
|
|
317
|
+
let { __scopeSlider: n, name: r, ...i } = e;
|
|
318
|
+
return /* @__PURE__ */ f(z, {
|
|
319
|
+
__scopeSlider: n,
|
|
320
|
+
name: r,
|
|
321
|
+
internal_do_not_use_render: ({ index: e, isFormControl: r }) => /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(V, {
|
|
322
|
+
...i,
|
|
323
|
+
ref: t,
|
|
324
|
+
__scopeSlider: n
|
|
325
|
+
}), r ? /* @__PURE__ */ f(W, { __scopeSlider: n }, e) : null] })
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
H.displayName = F;
|
|
329
|
+
var U = "SliderBubbleInput", W = u.forwardRef(({ __scopeSlider: e, ...n }, r) => {
|
|
330
|
+
let { value: i, name: o, form: c } = L(U, e), l = u.useRef(null), d = t(l, r), p = s(i);
|
|
331
|
+
return u.useEffect(() => {
|
|
332
|
+
let e = l.current;
|
|
333
|
+
if (!e) return;
|
|
334
|
+
let t = window.HTMLInputElement.prototype, n = Object.getOwnPropertyDescriptor(t, "value").set;
|
|
335
|
+
if (p !== i && n) {
|
|
336
|
+
let t = new Event("input", { bubbles: !0 });
|
|
337
|
+
n.call(e, i), e.dispatchEvent(t);
|
|
338
|
+
}
|
|
339
|
+
}, [p, i]), /* @__PURE__ */ f(a.input, {
|
|
340
|
+
style: { display: "none" },
|
|
341
|
+
name: o,
|
|
342
|
+
form: c,
|
|
343
|
+
...n,
|
|
344
|
+
ref: d,
|
|
345
|
+
defaultValue: i
|
|
346
|
+
});
|
|
347
|
+
});
|
|
348
|
+
W.displayName = U;
|
|
349
|
+
function G(e = [], t, n) {
|
|
350
|
+
let r = [...e];
|
|
351
|
+
return r[n] = t, r.sort((e, t) => e - t);
|
|
352
|
+
}
|
|
353
|
+
function K(e, t, n) {
|
|
354
|
+
return l(100 / (n - t) * (e - t), [0, 100]);
|
|
355
|
+
}
|
|
356
|
+
function q(e, t) {
|
|
357
|
+
if (t > 2) return `Value ${e + 1} of ${t}`;
|
|
358
|
+
if (t === 2) return ["Minimum", "Maximum"][e];
|
|
359
|
+
}
|
|
360
|
+
function J(e, t) {
|
|
361
|
+
if (e.length === 1) return 0;
|
|
362
|
+
let n = e.map((e) => Math.abs(e - t)), r = Math.min(...n);
|
|
363
|
+
return n.indexOf(r);
|
|
364
|
+
}
|
|
365
|
+
function Y(e, t, n) {
|
|
366
|
+
let r = e / 2;
|
|
367
|
+
return (r - Q([0, 50], [0, r])(t) * n) * n;
|
|
368
|
+
}
|
|
369
|
+
function X(e) {
|
|
370
|
+
return e.slice(0, -1).map((t, n) => e[n + 1] - t);
|
|
371
|
+
}
|
|
372
|
+
function Z(e, t) {
|
|
373
|
+
if (t > 0) {
|
|
374
|
+
let n = X(e);
|
|
375
|
+
return Math.min(...n) >= t;
|
|
376
|
+
}
|
|
377
|
+
return !0;
|
|
378
|
+
}
|
|
379
|
+
function Q(e, t) {
|
|
380
|
+
return (n) => {
|
|
381
|
+
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
382
|
+
let r = (t[1] - t[0]) / (e[1] - e[0]);
|
|
383
|
+
return t[0] + r * (n - e[0]);
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
function $(e) {
|
|
387
|
+
if (!Number.isFinite(e)) return 0;
|
|
388
|
+
let t = e.toString();
|
|
389
|
+
if (t.includes("e")) {
|
|
390
|
+
let [e, n] = t.split("e"), r = e.split(".")[1] || "", i = Number(n);
|
|
391
|
+
return Math.max(0, r.length - i);
|
|
392
|
+
}
|
|
393
|
+
let n = t.split(".")[1];
|
|
394
|
+
return n ? n.length : 0;
|
|
395
|
+
}
|
|
396
|
+
function ee(e, t) {
|
|
397
|
+
let n = 10 ** t;
|
|
398
|
+
return Math.round(e * n) / n;
|
|
399
|
+
}
|
|
400
|
+
function te(e) {
|
|
401
|
+
return typeof e == "function";
|
|
402
|
+
}
|
|
403
|
+
//#endregion
|
|
404
|
+
export { T as Slider, P as SliderRange, H as SliderThumb, M as SliderTrack };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { useComposedRefs as e } from "../../../../../@radix-ui_react-compose-ref_1124f78b370d43bfeceaaa9b791be73d/node_modules/@radix-ui/react-compose-refs/dist/index.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
//#region 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.mjs
|
|
4
|
+
// @__NO_SIDE_EFFECTS__
|
|
5
|
+
function n(n) {
|
|
6
|
+
let r = t.forwardRef((r, i) => {
|
|
7
|
+
let { children: a, ...u } = r, f = null, g = !1, _ = [];
|
|
8
|
+
d(a) && typeof h == "function" && (a = h(a._payload)), t.Children.forEach(a, (e) => {
|
|
9
|
+
if (l(e)) {
|
|
10
|
+
g = !0;
|
|
11
|
+
let t = e, n = "child" in t.props ? t.props.child : t.props.children;
|
|
12
|
+
d(n) && typeof h == "function" && (n = h(n._payload)), f = o(t, n), _.push(f?.props?.children);
|
|
13
|
+
} else _.push(e);
|
|
14
|
+
}), f ? f = t.cloneElement(f, void 0, _) : !g && t.Children.count(a) === 1 && t.isValidElement(a) && (f = a);
|
|
15
|
+
let v = f ? c(f) : void 0, y = e(i, v);
|
|
16
|
+
if (!f) {
|
|
17
|
+
if (a || a === 0) throw Error(g ? m(n) : p(n));
|
|
18
|
+
return a;
|
|
19
|
+
}
|
|
20
|
+
let b = s(u, f.props ?? {});
|
|
21
|
+
return f.type !== t.Fragment && (b.ref = i ? y : v), t.cloneElement(f, b);
|
|
22
|
+
});
|
|
23
|
+
return r.displayName = `${n}.Slot`, r;
|
|
24
|
+
}
|
|
25
|
+
var r = /* @__PURE__ */ n("Slot"), i = Symbol.for("radix.slottable");
|
|
26
|
+
// @__NO_SIDE_EFFECTS__
|
|
27
|
+
function a(e) {
|
|
28
|
+
let t = (e) => "child" in e ? e.children(e.child) : e.children;
|
|
29
|
+
return t.displayName = `${e}.Slottable`, t.__radixId = i, t;
|
|
30
|
+
}
|
|
31
|
+
var o = (e, n) => {
|
|
32
|
+
if ("child" in e.props) {
|
|
33
|
+
let n = e.props.child;
|
|
34
|
+
return t.isValidElement(n) ? t.cloneElement(n, void 0, e.props.children(n.props.children)) : null;
|
|
35
|
+
}
|
|
36
|
+
return t.isValidElement(n) ? n : null;
|
|
37
|
+
};
|
|
38
|
+
function s(e, t) {
|
|
39
|
+
let n = { ...t };
|
|
40
|
+
for (let r in t) {
|
|
41
|
+
let i = e[r], a = t[r];
|
|
42
|
+
/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
|
|
43
|
+
let t = a(...e);
|
|
44
|
+
return i(...e), t;
|
|
45
|
+
} : i && (n[r] = i) : r === "style" ? n[r] = {
|
|
46
|
+
...i,
|
|
47
|
+
...a
|
|
48
|
+
} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
...e,
|
|
52
|
+
...n
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function c(e) {
|
|
56
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
57
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
58
|
+
}
|
|
59
|
+
function l(e) {
|
|
60
|
+
return t.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === i;
|
|
61
|
+
}
|
|
62
|
+
var u = Symbol.for("react.lazy");
|
|
63
|
+
function d(e) {
|
|
64
|
+
return typeof e == "object" && !!e && "$$typeof" in e && e.$$typeof === u && "_payload" in e && f(e._payload);
|
|
65
|
+
}
|
|
66
|
+
function f(e) {
|
|
67
|
+
return typeof e == "object" && !!e && "then" in e;
|
|
68
|
+
}
|
|
69
|
+
var p = (e) => `${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`, m = (e) => `${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`, h = t.use;
|
|
70
|
+
//#endregion
|
|
71
|
+
export { r as Slot, n as createSlot, a as createSlottable };
|
|
@@ -0,0 +1,138 @@
|
|
|
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 { composeEventHandlers as n } from "../../../../../@radix-ui_primitive@1.1.4/node_modules/@radix-ui/primitive/dist/index.js";
|
|
5
|
+
import { useControllableState as r } from "../../../../../@radix-ui_react-use-control_e3b0d353471f209a120bf58c8d35c552/node_modules/@radix-ui/react-use-controllable-state/dist/index.js";
|
|
6
|
+
import { Primitive as i } from "../../../../../@radix-ui_react-primitive@2_9b6ae4cdaf3918ddbf0b21069e38e2ef/node_modules/@radix-ui/react-primitive/dist/index.js";
|
|
7
|
+
import { usePrevious as a } from "../../../../../@radix-ui_react-use-previou_58b78c95af3b98dc4c1bc8bce73c779d/node_modules/@radix-ui/react-use-previous/dist/index.js";
|
|
8
|
+
import { useSize as o } from "../../../../../@radix-ui_react-use-size@1._4b75a7cfb879b922004e7a6caa492077/node_modules/@radix-ui/react-use-size/dist/index.js";
|
|
9
|
+
import * as s from "react";
|
|
10
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
11
|
+
//#region node_modules/.pnpm/@radix-ui+react-switch@1.3._d2f9574497ecbe08e0e7c2298fb35dc1/node_modules/@radix-ui/react-switch/dist/index.mjs
|
|
12
|
+
var d = "Switch", [f, p] = e(d), [m, h] = f(d);
|
|
13
|
+
function g(e) {
|
|
14
|
+
let { __scopeSwitch: t, checked: n, children: i, defaultChecked: a, disabled: o, form: c, name: u, onCheckedChange: f, required: p, value: h = "on", internal_do_not_use_render: g } = e, [_, v] = r({
|
|
15
|
+
prop: n,
|
|
16
|
+
defaultProp: a ?? !1,
|
|
17
|
+
onChange: f,
|
|
18
|
+
caller: d
|
|
19
|
+
}), [y, b] = s.useState(null), [x, S] = s.useState(null), C = {
|
|
20
|
+
checked: _,
|
|
21
|
+
setChecked: v,
|
|
22
|
+
disabled: o,
|
|
23
|
+
control: y,
|
|
24
|
+
setControl: b,
|
|
25
|
+
name: u,
|
|
26
|
+
form: c,
|
|
27
|
+
value: h,
|
|
28
|
+
hasConsumerStoppedPropagationRef: s.useRef(!1),
|
|
29
|
+
required: p,
|
|
30
|
+
defaultChecked: a,
|
|
31
|
+
isFormControl: y ? !!c || !!y.closest("form") : !0,
|
|
32
|
+
bubbleInput: x,
|
|
33
|
+
setBubbleInput: S
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ l(m, {
|
|
36
|
+
scope: t,
|
|
37
|
+
...C,
|
|
38
|
+
children: w(g) ? g(C) : i
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
var _ = "SwitchTrigger", v = s.forwardRef(({ __scopeSwitch: e, onClick: r, ...a }, o) => {
|
|
42
|
+
let { value: s, disabled: c, checked: u, required: d, setControl: f, setChecked: p, hasConsumerStoppedPropagationRef: m, isFormControl: g, bubbleInput: v } = h(_, e), y = t(o, f);
|
|
43
|
+
return /* @__PURE__ */ l(i.button, {
|
|
44
|
+
type: "button",
|
|
45
|
+
role: "switch",
|
|
46
|
+
"aria-checked": u,
|
|
47
|
+
"aria-required": d,
|
|
48
|
+
"data-state": T(u),
|
|
49
|
+
"data-disabled": c ? "" : void 0,
|
|
50
|
+
disabled: c,
|
|
51
|
+
value: s,
|
|
52
|
+
...a,
|
|
53
|
+
ref: y,
|
|
54
|
+
onClick: n(r, (e) => {
|
|
55
|
+
p((e) => !e), v && g && (m.current = e.isPropagationStopped(), m.current || e.stopPropagation());
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
v.displayName = _;
|
|
60
|
+
var y = s.forwardRef((e, t) => {
|
|
61
|
+
let { __scopeSwitch: n, name: r, checked: i, defaultChecked: a, required: o, disabled: s, value: d, onCheckedChange: f, form: p, ...m } = e;
|
|
62
|
+
return /* @__PURE__ */ l(g, {
|
|
63
|
+
__scopeSwitch: n,
|
|
64
|
+
checked: i,
|
|
65
|
+
defaultChecked: a,
|
|
66
|
+
disabled: s,
|
|
67
|
+
required: o,
|
|
68
|
+
onCheckedChange: f,
|
|
69
|
+
name: r,
|
|
70
|
+
form: p,
|
|
71
|
+
value: d,
|
|
72
|
+
internal_do_not_use_render: ({ isFormControl: e }) => /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(v, {
|
|
73
|
+
...m,
|
|
74
|
+
ref: t,
|
|
75
|
+
__scopeSwitch: n
|
|
76
|
+
}), e && /* @__PURE__ */ l(C, { __scopeSwitch: n })] })
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
y.displayName = d;
|
|
80
|
+
var b = "SwitchThumb", x = s.forwardRef((e, t) => {
|
|
81
|
+
let { __scopeSwitch: n, ...r } = e, a = h(b, n);
|
|
82
|
+
return /* @__PURE__ */ l(i.span, {
|
|
83
|
+
"data-state": T(a.checked),
|
|
84
|
+
"data-disabled": a.disabled ? "" : void 0,
|
|
85
|
+
...r,
|
|
86
|
+
ref: t
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
x.displayName = b;
|
|
90
|
+
var S = "SwitchBubbleInput", C = s.forwardRef(({ __scopeSwitch: e, ...n }, r) => {
|
|
91
|
+
let { control: c, hasConsumerStoppedPropagationRef: u, checked: d, defaultChecked: f, required: p, disabled: m, name: g, value: _, form: v, bubbleInput: y, setBubbleInput: b } = h(S, e), x = t(r, b), C = a(d), w = o(c);
|
|
92
|
+
s.useEffect(() => {
|
|
93
|
+
let e = y;
|
|
94
|
+
if (!e) return;
|
|
95
|
+
let t = window.HTMLInputElement.prototype, n = Object.getOwnPropertyDescriptor(t, "checked").set, r = !u.current;
|
|
96
|
+
if (C !== d && n) {
|
|
97
|
+
let t = new Event("click", { bubbles: r });
|
|
98
|
+
n.call(e, d), e.dispatchEvent(t);
|
|
99
|
+
}
|
|
100
|
+
}, [
|
|
101
|
+
y,
|
|
102
|
+
C,
|
|
103
|
+
d,
|
|
104
|
+
u
|
|
105
|
+
]);
|
|
106
|
+
let T = s.useRef(d);
|
|
107
|
+
return /* @__PURE__ */ l(i.input, {
|
|
108
|
+
type: "checkbox",
|
|
109
|
+
"aria-hidden": !0,
|
|
110
|
+
defaultChecked: f ?? T.current,
|
|
111
|
+
required: p,
|
|
112
|
+
disabled: m,
|
|
113
|
+
name: g,
|
|
114
|
+
value: _,
|
|
115
|
+
form: v,
|
|
116
|
+
...n,
|
|
117
|
+
tabIndex: -1,
|
|
118
|
+
ref: x,
|
|
119
|
+
style: {
|
|
120
|
+
...n.style,
|
|
121
|
+
...w,
|
|
122
|
+
position: "absolute",
|
|
123
|
+
pointerEvents: "none",
|
|
124
|
+
opacity: 0,
|
|
125
|
+
margin: 0,
|
|
126
|
+
transform: "translateX(-100%)"
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
C.displayName = S;
|
|
131
|
+
function w(e) {
|
|
132
|
+
return typeof e == "function";
|
|
133
|
+
}
|
|
134
|
+
function T(e) {
|
|
135
|
+
return e ? "checked" : "unchecked";
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
export { y as Switch, x as SwitchThumb };
|