@inspirare/design-system 0.0.21 → 0.0.22
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/components/ui/accordion.js +44 -0
- package/dist/components/ui/alert-dialog.js +61 -0
- package/dist/{src/components → components}/ui/alert.js +10 -10
- package/dist/components/ui/aspect-ratio.js +6 -0
- package/dist/components/ui/avatar.js +29 -0
- package/dist/{src/components → components}/ui/badge.js +6 -6
- package/dist/components/ui/breadcrumb.js +60 -0
- package/dist/components/ui/button-group.js +38 -0
- package/dist/{src/components → components}/ui/button.js +6 -6
- package/dist/{src/components → components}/ui/calendar.js +16 -16
- package/dist/{src/components → components}/ui/carousel.js +29 -29
- package/dist/{src/components → components}/ui/checkbox.js +10 -10
- package/dist/components/ui/collapsible.js +26 -0
- package/dist/{src/components → components}/ui/combobox.js +10 -10
- package/dist/{src/components → components}/ui/command.js +17 -17
- package/dist/{src/components → components}/ui/context-menu.js +37 -37
- package/dist/{src/components → components}/ui/dialog.js +36 -36
- package/dist/{src/components → components}/ui/dropdown-menu.js +46 -46
- package/dist/{src/components → components}/ui/empty.js +21 -21
- package/dist/{src/components → components}/ui/field.js +27 -27
- package/dist/components/ui/form.js +77 -0
- package/dist/{src/components → components}/ui/hover-card.js +14 -14
- package/dist/{src/components → components}/ui/input-group.js +18 -18
- package/dist/{src/components → components}/ui/input-otp.js +13 -13
- package/dist/components/ui/item.js +116 -0
- package/dist/{src/components → components}/ui/label.js +3 -3
- package/dist/components/ui/menubar.js +105 -0
- package/dist/components/ui/navigation-menu.js +58 -0
- package/dist/{src/components → components}/ui/pagination.js +18 -18
- package/dist/components/ui/popover.js +36 -0
- package/dist/components/ui/progress.js +20 -0
- package/dist/{src/components → components}/ui/radio-group.js +14 -14
- package/dist/{src/components → components}/ui/resizable.js +7 -7
- package/dist/{src/components → components}/ui/select.js +44 -44
- package/dist/{src/components → components}/ui/separator.js +3 -3
- package/dist/{src/components → components}/ui/sheet.js +35 -35
- package/dist/{src/components → components}/ui/sidebar.js +124 -124
- package/dist/{src/components → components}/ui/slider.js +20 -20
- package/dist/{src/components → components}/ui/spinner.js +3 -3
- package/dist/{src/components → components}/ui/switch.js +9 -9
- package/dist/{src/components → components}/ui/tabs.js +19 -19
- package/dist/{src/components → components}/ui/theme-toggle.js +10 -10
- package/dist/components/ui/toggle-group.js +44 -0
- package/dist/{src/components → components}/ui/toggle.js +7 -7
- package/dist/components/ui/tooltip.js +37 -0
- package/package.json +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -359
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -328
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1._f1bed12861163fa290e602839f1ebdb9/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -212
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -97
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -106
- package/dist/node_modules/.pnpm/@radix-ui_number@1.1.2/node_modules/@radix-ui/number/dist/index.js +0 -6
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.4/node_modules/@radix-ui/primitive/dist/index.js +0 -8
- package/dist/node_modules/.pnpm/@radix-ui_react-accordion@1_90771884ca9639bf31e5f01b1faf83e4/node_modules/@radix-ui/react-accordion/dist/index.js +0 -195
- package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialo_0211f1deb04a7e512244dbbc3e4765ed/node_modules/@radix-ui/react-alert-dialog/dist/index.js +0 -119
- package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.1.9_b34b7156178de4198a23e93f83c57da5/node_modules/@radix-ui/react-arrow/dist/index.js +0 -20
- package/dist/node_modules/.pnpm/@radix-ui_react-aspect-rati_62430dda2e5090a076c492dea1ecc5d8/node_modules/@radix-ui/react-aspect-ratio/dist/index.js +0 -31
- package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.1._d460f1c45278b86e7424fb8ae25577de/node_modules/@radix-ui/react-avatar/dist/index.js +0 -73
- package/dist/node_modules/.pnpm/@radix-ui_react-checkbox@1._e21be6412c310c083d6755285c4c1ad9/node_modules/@radix-ui/react-checkbox/dist/index.js +0 -158
- package/dist/node_modules/.pnpm/@radix-ui_react-collapsible_d381d44d4b8a6d58d9dfaae3a0126ca3/node_modules/@radix-ui/react-collapsible/dist/index.js +0 -97
- package/dist/node_modules/.pnpm/@radix-ui_react-collection@_9d7b7379fb7a1e56af9d4a8d107ecba8/node_modules/@radix-ui/react-collection/dist/index.js +0 -62
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-ref_1124f78b370d43bfeceaaa9b791be73d/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -25
- package/dist/node_modules/.pnpm/@radix-ui_react-context-men_f76d1e5eaec57e990fe72d3c41a037df/node_modules/@radix-ui/react-context-menu/dist/index.js +0 -240
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1_796eddd33de3050019fa09b10c68d7ca/node_modules/@radix-ui/react-context/dist/index.js +0 -80
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1._ef5419b1d5914b6ed85fc377af02cd8c/node_modules/@radix-ui/react-dialog/dist/index.js +0 -225
- package/dist/node_modules/.pnpm/@radix-ui_react-direction@1_2157d1ab8e201288009ff536bb11c468/node_modules/@radix-ui/react-direction/dist/index.js +0 -11
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable_1202449cfd75d4d3d4e876187986c0d8/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -108
- package/dist/node_modules/.pnpm/@radix-ui_react-dropdown-me_9dd0889a66ea847559fd572aaa20379b/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +0 -225
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guard_6b3d65e71789b2986a17d5efdb8859bf/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -22
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope_c97f9e7487f0abcea30d185973e4d237/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -146
- package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@_8a3f4d1399bacc84c908e03b45229f87/node_modules/@radix-ui/react-hover-card/dist/index.js +0 -161
- 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 +0 -12
- package/dist/node_modules/.pnpm/@radix-ui_react-label@2.1.9_386dd2eabe41e70ee233c5790da58dd5/node_modules/@radix-ui/react-label/dist/index.js +0 -16
- package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.17_cc73edd868dbfc82392e3731b66f2e59/node_modules/@radix-ui/react-menu/dist/index.js +0 -563
- package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1_52e1207bf5981387ca85fb7a6f7b2195/node_modules/@radix-ui/react-menubar/dist/index.js +0 -312
- package/dist/node_modules/.pnpm/@radix-ui_react-navigation-_ce246f1abffb4c1bd00bc4d15b1887f5/node_modules/@radix-ui/react-navigation-menu/dist/index.js +0 -553
- package/dist/node_modules/.pnpm/@radix-ui_react-popover@1.1_0f96f9f03b66af70568af721c965c5cd/node_modules/@radix-ui/react-popover/dist/index.js +0 -199
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3._bd7668c1d3a757f9e8c97f0d7e635b5d/node_modules/@radix-ui/react-popper/dist/index.js +0 -203
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1._32b1caf40ac61f8d30d412d28d60b4ca/node_modules/@radix-ui/react-portal/dist/index.js +0 -19
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1._dc6e30df35507eb8a116c12c3da26e18/node_modules/@radix-ui/react-presence/dist/index.js +0 -85
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2_9b6ae4cdaf3918ddbf0b21069e38e2ef/node_modules/@radix-ui/react-primitive/dist/index.js +0 -41
- package/dist/node_modules/.pnpm/@radix-ui_react-progress@1._4cd7f31ebaa5416f0f0f54265ec22793/node_modules/@radix-ui/react-progress/dist/index.js +0 -71
- package/dist/node_modules/.pnpm/@radix-ui_react-radio-group_385226f717d657e4aea3688d6214f1c0/node_modules/@radix-ui/react-radio-group/dist/index.js +0 -249
- package/dist/node_modules/.pnpm/@radix-ui_react-roving-focu_d783d3abe701a7f2fb2c68867b8f1f65/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -154
- package/dist/node_modules/.pnpm/@radix-ui_react-select@2.3._b9232b5aa23e604443839e7a081b7527/node_modules/@radix-ui/react-select/dist/index.js +0 -727
- package/dist/node_modules/.pnpm/@radix-ui_react-separator@1_f5efb6a4d38fd7cb82808cb6f7a6326a/node_modules/@radix-ui/react-separator/dist/index.js +0 -23
- package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4._cfb70bb4d45c3eedb16b2d4d4cf80f46/node_modules/@radix-ui/react-slider/dist/index.js +0 -404
- 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 +0 -71
- package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3._d2f9574497ecbe08e0e7c2298fb35dc1/node_modules/@radix-ui/react-switch/dist/index.js +0 -138
- package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.14_769bbb0130198553b196f258bd99ab92/node_modules/@radix-ui/react-tabs/dist/index.js +0 -120
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle-grou_9d4cd233d31c4687b287c174e894620a/node_modules/@radix-ui/react-toggle-group/dist/index.js +0 -125
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1._afb5f705be3deb4ba78b89b6c70d5cf9/node_modules/@radix-ui/react-toggle/dist/index.js +0 -30
- package/dist/node_modules/.pnpm/@radix-ui_react-tooltip@1.2_02a5bba0cb45f3ddbe548efab47eabcc/node_modules/@radix-ui/react-tooltip/dist/index.js +0 -351
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callbac_5106d65c013fadfe178f87486239c7af/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -10
- package/dist/node_modules/.pnpm/@radix-ui_react-use-control_e3b0d353471f209a120bf58c8d35c552/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -45
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-_c83bcf92add652965a36806e6d79891c/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -14
- package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydr_d8b55bd05f5d50f7ea21f52744760552/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +0 -19
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-_ad41f999ca2019252b887df955038ce1/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -5
- package/dist/node_modules/.pnpm/@radix-ui_react-use-previou_58b78c95af3b98dc4c1bc8bce73c779d/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -11
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1._4b75a7cfb879b922004e7a6caa492077/node_modules/@radix-ui/react-use-size/dist/index.js +0 -29
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hi_fbf0dd0d68bb58b2410fc7a153ed1d9c/node_modules/@radix-ui/react-visually-hidden/dist/index.js +0 -27
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +0 -46
- package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js +0 -33
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +0 -7
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -70
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -4
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/index.js +0 -3
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -27
- 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 +0 -14
- 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 +0 -116
- 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 +0 -52
- 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 +0 -13
- 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 +0 -52
- 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 +0 -5
- 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 +0 -7
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/component.js +0 -11
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/hook.js +0 -15
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/index.js +0 -3
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -28
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +0 -19
- 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 +0 -6
- 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 +0 -26
- 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 +0 -22
- 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 +0 -16
- 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 +0 -69
- package/dist/src/components/ui/accordion.js +0 -44
- package/dist/src/components/ui/alert-dialog.js +0 -61
- package/dist/src/components/ui/aspect-ratio.js +0 -6
- package/dist/src/components/ui/avatar.js +0 -29
- package/dist/src/components/ui/breadcrumb.js +0 -60
- package/dist/src/components/ui/button-group.js +0 -38
- package/dist/src/components/ui/collapsible.js +0 -26
- package/dist/src/components/ui/form.js +0 -76
- package/dist/src/components/ui/item.js +0 -116
- package/dist/src/components/ui/menubar.js +0 -105
- package/dist/src/components/ui/navigation-menu.js +0 -58
- package/dist/src/components/ui/popover.js +0 -36
- package/dist/src/components/ui/progress.js +0 -20
- package/dist/src/components/ui/toggle-group.js +0 -44
- package/dist/src/components/ui/tooltip.js +0 -37
- /package/dist/{src/components → components}/ui/accessibility-improvements.js +0 -0
- /package/dist/{src/components → components}/ui/card.js +0 -0
- /package/dist/{src/components → components}/ui/chart.js +0 -0
- /package/dist/{src/components → components}/ui/color-picker.js +0 -0
- /package/dist/{src/components → components}/ui/drawer.js +0 -0
- /package/dist/{src/components → components}/ui/input.js +0 -0
- /package/dist/{src/components → components}/ui/kbd.js +0 -0
- /package/dist/{src/components → components}/ui/scroll-area.js +0 -0
- /package/dist/{src/components → components}/ui/skeleton.js +0 -0
- /package/dist/{src/components → components}/ui/sonner.js +0 -0
- /package/dist/{src/components → components}/ui/table.js +0 -0
- /package/dist/{src/components → components}/ui/textarea.js +0 -0
- /package/dist/{src/hooks → hooks}/use-mobile.js +0 -0
- /package/dist/{src/index.js → index.js} +0 -0
- /package/dist/{src/lib → lib}/utils.js +0 -0
|
@@ -1,84 +1,84 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import { Close as t, Content as n, Description as r, Overlay as i, Portal as a, Root as o, Title as s, Trigger as c } from "../../../node_modules/.pnpm/@radix-ui_react-dialog@1.1._ef5419b1d5914b6ed85fc377af02cd8c/node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
4
3
|
import "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { XIcon as t } from "lucide-react";
|
|
5
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
6
|
+
import * as i from "@radix-ui/react-dialog";
|
|
7
7
|
//#region src/components/ui/sheet.tsx
|
|
8
|
-
function
|
|
9
|
-
return /* @__PURE__ */
|
|
8
|
+
function a({ ...e }) {
|
|
9
|
+
return /* @__PURE__ */ n(i.Root, {
|
|
10
10
|
"data-slot": "sheet",
|
|
11
11
|
...e
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
return /* @__PURE__ */
|
|
14
|
+
function o({ className: t, ...r }) {
|
|
15
|
+
return /* @__PURE__ */ n(i.Trigger, {
|
|
16
16
|
"data-slot": "sheet-trigger",
|
|
17
17
|
className: e("cursor-pointer", t),
|
|
18
|
-
...
|
|
18
|
+
...r
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
21
|
+
function s({ className: t, ...r }) {
|
|
22
|
+
return /* @__PURE__ */ n(i.Close, {
|
|
23
23
|
"data-slot": "sheet-close",
|
|
24
|
-
className: e("cursor-pointer",
|
|
24
|
+
className: e("cursor-pointer", t),
|
|
25
25
|
...r
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return /* @__PURE__ */
|
|
28
|
+
function c({ ...e }) {
|
|
29
|
+
return /* @__PURE__ */ n(i.Portal, {
|
|
30
30
|
"data-slot": "sheet-portal",
|
|
31
31
|
...e
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return /* @__PURE__ */
|
|
34
|
+
function l({ className: t, ...r }) {
|
|
35
|
+
return /* @__PURE__ */ n(i.Overlay, {
|
|
36
36
|
"data-slot": "sheet-overlay",
|
|
37
37
|
className: e("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", t),
|
|
38
|
-
...
|
|
38
|
+
...r
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return /* @__PURE__ */
|
|
41
|
+
function u({ className: a, children: o, side: s = "right", ...u }) {
|
|
42
|
+
return /* @__PURE__ */ r(c, { children: [/* @__PURE__ */ n(l, {}), /* @__PURE__ */ r(i.Content, {
|
|
43
43
|
"data-slot": "sheet-content",
|
|
44
|
-
className: e("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
45
|
-
...
|
|
46
|
-
children: [
|
|
44
|
+
className: e("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", s === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", s === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", s === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", s === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", a),
|
|
45
|
+
...u,
|
|
46
|
+
children: [o, /* @__PURE__ */ r(i.Close, {
|
|
47
47
|
className: "ring-offset-background cursor-pointer focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
|
|
48
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ n(t, { className: "size-4" }), /* @__PURE__ */ n("span", {
|
|
49
49
|
className: "sr-only",
|
|
50
50
|
children: "Close"
|
|
51
51
|
})]
|
|
52
52
|
})]
|
|
53
53
|
})] });
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
return /* @__PURE__ */
|
|
55
|
+
function d({ className: t, ...r }) {
|
|
56
|
+
return /* @__PURE__ */ n("div", {
|
|
57
57
|
"data-slot": "sheet-header",
|
|
58
58
|
className: e("flex flex-col gap-1.5 p-4", t),
|
|
59
|
-
...
|
|
59
|
+
...r
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
return /* @__PURE__ */
|
|
62
|
+
function f({ className: t, ...r }) {
|
|
63
|
+
return /* @__PURE__ */ n("div", {
|
|
64
64
|
"data-slot": "sheet-footer",
|
|
65
65
|
className: e("mt-auto flex flex-col gap-2 p-4", t),
|
|
66
|
-
...
|
|
66
|
+
...r
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
return /* @__PURE__ */
|
|
69
|
+
function p({ className: t, ...r }) {
|
|
70
|
+
return /* @__PURE__ */ n(i.Title, {
|
|
71
71
|
"data-slot": "sheet-title",
|
|
72
72
|
className: e("text-foreground font-semibold", t),
|
|
73
|
-
...
|
|
73
|
+
...r
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
return /* @__PURE__ */
|
|
76
|
+
function m({ className: t, ...r }) {
|
|
77
|
+
return /* @__PURE__ */ n(i.Description, {
|
|
78
78
|
"data-slot": "sheet-description",
|
|
79
79
|
className: e("text-muted-foreground text-sm", t),
|
|
80
|
-
...
|
|
80
|
+
...r
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
//#endregion
|
|
84
|
-
export {
|
|
84
|
+
export { a as Sheet, s as SheetClose, u as SheetContent, m as SheetDescription, f as SheetFooter, d as SheetHeader, p as SheetTitle, o as SheetTrigger };
|
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import { Separator as n } from "./separator.js";
|
|
5
|
+
import { Input as r } from "./input.js";
|
|
6
|
+
import { Sheet as i, SheetContent as a, SheetDescription as o, SheetHeader as s, SheetTitle as c } from "./sheet.js";
|
|
7
|
+
import { useIsMobile as l } from "../../hooks/use-mobile.js";
|
|
8
|
+
import { Skeleton as u } from "./skeleton.js";
|
|
9
|
+
import { Tooltip as d, TooltipContent as f, TooltipProvider as p, TooltipTrigger as m } from "./tooltip.js";
|
|
10
|
+
import * as h from "react";
|
|
11
|
+
import { PanelLeft as g } from "lucide-react";
|
|
12
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
13
|
+
import { cva as y } from "class-variance-authority";
|
|
14
|
+
import { Slot as b } from "@radix-ui/react-slot";
|
|
15
15
|
//#region src/components/ui/sidebar.tsx
|
|
16
|
-
var x = "sidebar_state", S = 3600 * 24 * 7, C = "16rem", w = "18rem", T = "3rem", E = "b", D =
|
|
16
|
+
var x = "sidebar_state", S = 3600 * 24 * 7, C = "16rem", w = "18rem", T = "3rem", E = "b", D = h.createContext(null);
|
|
17
17
|
function O() {
|
|
18
|
-
let e =
|
|
18
|
+
let e = h.useContext(D);
|
|
19
19
|
if (!e) throw Error("useSidebar must be used within a SidebarProvider.");
|
|
20
20
|
return e;
|
|
21
21
|
}
|
|
22
|
-
var k =
|
|
23
|
-
let
|
|
24
|
-
let t = typeof e == "function" ? e(
|
|
25
|
-
r ? r(t) :
|
|
26
|
-
}, [r,
|
|
27
|
-
|
|
22
|
+
var k = h.forwardRef(({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style: a, children: o, ...s }, c) => {
|
|
23
|
+
let u = l(), [d, f] = h.useState(!1), [m, g] = h.useState(t), v = n ?? m, y = h.useCallback((e) => {
|
|
24
|
+
let t = typeof e == "function" ? e(v) : e;
|
|
25
|
+
r ? r(t) : g(t), document.cookie = `${x}=${t}; path=/; max-age=${S}`;
|
|
26
|
+
}, [r, v]), b = h.useCallback(() => u ? f((e) => !e) : y((e) => !e), [
|
|
27
|
+
u,
|
|
28
28
|
y,
|
|
29
29
|
f
|
|
30
30
|
]);
|
|
31
|
-
|
|
31
|
+
h.useEffect(() => {
|
|
32
32
|
let e = (e) => {
|
|
33
33
|
e.key === E && (e.metaKey || e.ctrlKey) && (e.preventDefault(), b());
|
|
34
34
|
};
|
|
35
35
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
36
36
|
}, [b]);
|
|
37
|
-
let w =
|
|
37
|
+
let w = v ? "expanded" : "collapsed", O = h.useMemo(() => ({
|
|
38
38
|
state: w,
|
|
39
|
-
open:
|
|
39
|
+
open: v,
|
|
40
40
|
setOpen: y,
|
|
41
|
-
isMobile:
|
|
42
|
-
openMobile:
|
|
41
|
+
isMobile: u,
|
|
42
|
+
openMobile: d,
|
|
43
43
|
setOpenMobile: f,
|
|
44
44
|
toggleSidebar: b
|
|
45
45
|
}), [
|
|
46
46
|
w,
|
|
47
|
-
|
|
47
|
+
v,
|
|
48
48
|
y,
|
|
49
|
-
l,
|
|
50
49
|
u,
|
|
50
|
+
d,
|
|
51
51
|
f,
|
|
52
52
|
b
|
|
53
53
|
]);
|
|
54
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ _(D.Provider, {
|
|
55
55
|
value: O,
|
|
56
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ _(p, {
|
|
57
57
|
delayDuration: 0,
|
|
58
|
-
children: /* @__PURE__ */
|
|
58
|
+
children: /* @__PURE__ */ _("div", {
|
|
59
59
|
style: {
|
|
60
60
|
"--sidebar-width": C,
|
|
61
61
|
"--sidebar-width-icon": T,
|
|
62
62
|
...a
|
|
63
63
|
},
|
|
64
|
-
className:
|
|
64
|
+
className: e("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar", i),
|
|
65
65
|
ref: c,
|
|
66
66
|
...s,
|
|
67
67
|
children: o
|
|
@@ -70,167 +70,167 @@ var k = _.forwardRef(({ defaultOpen: e = !0, open: n, onOpenChange: r, className
|
|
|
70
70
|
});
|
|
71
71
|
});
|
|
72
72
|
k.displayName = "SidebarProvider";
|
|
73
|
-
var A =
|
|
73
|
+
var A = h.forwardRef(({ side: t = "left", variant: n = "sidebar", collapsible: r = "offcanvas", className: l, children: u, ...d }, f) => {
|
|
74
74
|
let { isMobile: p, state: m, openMobile: h, setOpenMobile: g } = O();
|
|
75
|
-
return r === "none" ? /* @__PURE__ */
|
|
76
|
-
className:
|
|
75
|
+
return r === "none" ? /* @__PURE__ */ _("div", {
|
|
76
|
+
className: e("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground", l),
|
|
77
77
|
ref: f,
|
|
78
78
|
...d,
|
|
79
|
-
children:
|
|
80
|
-
}) : p ? /* @__PURE__ */
|
|
79
|
+
children: u
|
|
80
|
+
}) : p ? /* @__PURE__ */ _(i, {
|
|
81
81
|
open: h,
|
|
82
82
|
onOpenChange: g,
|
|
83
83
|
...d,
|
|
84
|
-
children: /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ v(a, {
|
|
85
85
|
"data-sidebar": "sidebar",
|
|
86
86
|
"data-mobile": "true",
|
|
87
87
|
className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
88
88
|
style: { "--sidebar-width": w },
|
|
89
|
-
side:
|
|
90
|
-
children: [/* @__PURE__ */
|
|
89
|
+
side: t,
|
|
90
|
+
children: [/* @__PURE__ */ v(s, {
|
|
91
91
|
className: "sr-only",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
93
|
-
}), /* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ _(c, { children: "Sidebar" }), /* @__PURE__ */ _(o, { children: "Displays the mobile sidebar." })]
|
|
93
|
+
}), /* @__PURE__ */ _("div", {
|
|
94
94
|
className: "flex h-full w-full flex-col",
|
|
95
|
-
children:
|
|
95
|
+
children: u
|
|
96
96
|
})]
|
|
97
97
|
})
|
|
98
|
-
}) : /* @__PURE__ */
|
|
98
|
+
}) : /* @__PURE__ */ v("div", {
|
|
99
99
|
ref: f,
|
|
100
100
|
className: "group peer hidden text-sidebar-foreground md:block",
|
|
101
101
|
"data-state": m,
|
|
102
102
|
"data-collapsible": m === "collapsed" ? r : "",
|
|
103
103
|
"data-variant": n,
|
|
104
|
-
"data-side":
|
|
105
|
-
children: [/* @__PURE__ */
|
|
106
|
-
className:
|
|
104
|
+
"data-side": t,
|
|
105
|
+
children: [/* @__PURE__ */ _("div", { className: e("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", n === "floating" || n === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]") }), /* @__PURE__ */ _("div", {
|
|
106
|
+
className: e("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex", t === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", n === "floating" || n === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l", l),
|
|
107
107
|
...d,
|
|
108
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ _("div", {
|
|
109
109
|
"data-sidebar": "sidebar",
|
|
110
110
|
className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
|
|
111
|
-
children:
|
|
111
|
+
children: u
|
|
112
112
|
})
|
|
113
113
|
})]
|
|
114
114
|
});
|
|
115
115
|
});
|
|
116
116
|
A.displayName = "Sidebar";
|
|
117
|
-
var j =
|
|
117
|
+
var j = h.forwardRef(({ className: n, onClick: r, ...i }, a) => {
|
|
118
118
|
let { toggleSidebar: o } = O();
|
|
119
|
-
return /* @__PURE__ */
|
|
119
|
+
return /* @__PURE__ */ v(t, {
|
|
120
120
|
ref: a,
|
|
121
121
|
"data-sidebar": "trigger",
|
|
122
122
|
variant: "ghost",
|
|
123
123
|
size: "icon",
|
|
124
|
-
className:
|
|
124
|
+
className: e("h-7 w-7", n),
|
|
125
125
|
onClick: (e) => {
|
|
126
|
-
|
|
126
|
+
r?.(e), o();
|
|
127
127
|
},
|
|
128
128
|
...i,
|
|
129
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ _(g, {}), /* @__PURE__ */ _("span", {
|
|
130
130
|
className: "sr-only",
|
|
131
131
|
children: "Toggle Sidebar"
|
|
132
132
|
})]
|
|
133
133
|
});
|
|
134
134
|
});
|
|
135
135
|
j.displayName = "SidebarTrigger";
|
|
136
|
-
var M =
|
|
136
|
+
var M = h.forwardRef(({ className: t, ...n }, r) => {
|
|
137
137
|
let { toggleSidebar: i } = O();
|
|
138
|
-
return /* @__PURE__ */
|
|
138
|
+
return /* @__PURE__ */ _("button", {
|
|
139
139
|
ref: r,
|
|
140
140
|
"data-sidebar": "rail",
|
|
141
141
|
"aria-label": "Toggle Sidebar",
|
|
142
142
|
tabIndex: -1,
|
|
143
143
|
onClick: i,
|
|
144
144
|
title: "Toggle Sidebar",
|
|
145
|
-
className:
|
|
145
|
+
className: e("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex", "[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", t),
|
|
146
146
|
...n
|
|
147
147
|
});
|
|
148
148
|
});
|
|
149
149
|
M.displayName = "SidebarRail";
|
|
150
|
-
var N =
|
|
150
|
+
var N = h.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ _("main", {
|
|
151
151
|
ref: r,
|
|
152
|
-
className:
|
|
152
|
+
className: e("relative flex w-full flex-1 flex-col bg-background", "md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow", t),
|
|
153
153
|
...n
|
|
154
154
|
}));
|
|
155
155
|
N.displayName = "SidebarInset";
|
|
156
|
-
var P =
|
|
157
|
-
ref:
|
|
156
|
+
var P = h.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ _(r, {
|
|
157
|
+
ref: i,
|
|
158
158
|
"data-sidebar": "input",
|
|
159
|
-
className:
|
|
159
|
+
className: e("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring", t),
|
|
160
160
|
...n
|
|
161
161
|
}));
|
|
162
162
|
P.displayName = "SidebarInput";
|
|
163
|
-
var F =
|
|
163
|
+
var F = h.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ _("div", {
|
|
164
164
|
ref: r,
|
|
165
165
|
"data-sidebar": "header",
|
|
166
|
-
className:
|
|
166
|
+
className: e("flex flex-col gap-2 p-2", t),
|
|
167
167
|
...n
|
|
168
168
|
}));
|
|
169
169
|
F.displayName = "SidebarHeader";
|
|
170
|
-
var I =
|
|
170
|
+
var I = h.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ _("div", {
|
|
171
171
|
ref: r,
|
|
172
172
|
"data-sidebar": "footer",
|
|
173
|
-
className:
|
|
173
|
+
className: e("flex flex-col gap-2 p-2", t),
|
|
174
174
|
...n
|
|
175
175
|
}));
|
|
176
176
|
I.displayName = "SidebarFooter";
|
|
177
|
-
var L =
|
|
178
|
-
ref:
|
|
177
|
+
var L = h.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ _(n, {
|
|
178
|
+
ref: i,
|
|
179
179
|
"data-sidebar": "separator",
|
|
180
|
-
className:
|
|
181
|
-
...
|
|
180
|
+
className: e("mx-2 w-auto bg-sidebar-border", t),
|
|
181
|
+
...r
|
|
182
182
|
}));
|
|
183
183
|
L.displayName = "SidebarSeparator";
|
|
184
|
-
var R =
|
|
184
|
+
var R = h.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ _("div", {
|
|
185
185
|
ref: r,
|
|
186
186
|
"data-sidebar": "content",
|
|
187
|
-
className:
|
|
187
|
+
className: e("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", t),
|
|
188
188
|
...n
|
|
189
189
|
}));
|
|
190
190
|
R.displayName = "SidebarContent";
|
|
191
|
-
var z =
|
|
191
|
+
var z = h.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ _("div", {
|
|
192
192
|
ref: r,
|
|
193
193
|
"data-sidebar": "group",
|
|
194
|
-
className:
|
|
194
|
+
className: e("relative flex w-full min-w-0 flex-col p-2", t),
|
|
195
195
|
...n
|
|
196
196
|
}));
|
|
197
197
|
z.displayName = "SidebarGroup";
|
|
198
|
-
var B =
|
|
199
|
-
ref:
|
|
198
|
+
var B = h.forwardRef(({ className: t, asChild: n = !1, ...r }, i) => /* @__PURE__ */ _(n ? b : "div", {
|
|
199
|
+
ref: i,
|
|
200
200
|
"data-sidebar": "group-label",
|
|
201
|
-
className:
|
|
202
|
-
...
|
|
201
|
+
className: e("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", t),
|
|
202
|
+
...r
|
|
203
203
|
}));
|
|
204
204
|
B.displayName = "SidebarGroupLabel";
|
|
205
|
-
var V =
|
|
206
|
-
ref:
|
|
205
|
+
var V = h.forwardRef(({ className: t, asChild: n = !1, ...r }, i) => /* @__PURE__ */ _(n ? b : "button", {
|
|
206
|
+
ref: i,
|
|
207
207
|
"data-sidebar": "group-action",
|
|
208
|
-
className:
|
|
209
|
-
...
|
|
208
|
+
className: e("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 after:md:hidden", "group-data-[collapsible=icon]:hidden", t),
|
|
209
|
+
...r
|
|
210
210
|
}));
|
|
211
211
|
V.displayName = "SidebarGroupAction";
|
|
212
|
-
var H =
|
|
212
|
+
var H = h.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ _("div", {
|
|
213
213
|
ref: r,
|
|
214
214
|
"data-sidebar": "group-content",
|
|
215
|
-
className:
|
|
215
|
+
className: e("w-full text-sm", t),
|
|
216
216
|
...n
|
|
217
217
|
}));
|
|
218
218
|
H.displayName = "SidebarGroupContent";
|
|
219
|
-
var U =
|
|
219
|
+
var U = h.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ _("ul", {
|
|
220
220
|
ref: r,
|
|
221
221
|
"data-sidebar": "menu",
|
|
222
|
-
className:
|
|
222
|
+
className: e("flex w-full min-w-0 flex-col gap-1", t),
|
|
223
223
|
...n
|
|
224
224
|
}));
|
|
225
225
|
U.displayName = "SidebarMenu";
|
|
226
|
-
var W =
|
|
226
|
+
var W = h.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ _("li", {
|
|
227
227
|
ref: r,
|
|
228
228
|
"data-sidebar": "menu-item",
|
|
229
|
-
className:
|
|
229
|
+
className: e("group/menu-item relative", t),
|
|
230
230
|
...n
|
|
231
231
|
}));
|
|
232
232
|
W.displayName = "SidebarMenuItem";
|
|
233
|
-
var G =
|
|
233
|
+
var G = y("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", {
|
|
234
234
|
variants: {
|
|
235
235
|
variant: {
|
|
236
236
|
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
@@ -246,54 +246,54 @@ var G = n("peer/menu-button flex w-full items-center gap-2 overflow-hidden round
|
|
|
246
246
|
variant: "default",
|
|
247
247
|
size: "default"
|
|
248
248
|
}
|
|
249
|
-
}), K =
|
|
250
|
-
let
|
|
251
|
-
ref:
|
|
249
|
+
}), K = h.forwardRef(({ asChild: t = !1, isActive: n = !1, variant: r = "default", size: i = "default", tooltip: a, className: o, ...s }, c) => {
|
|
250
|
+
let l = t ? b : "button", { isMobile: u, state: p } = O(), h = /* @__PURE__ */ _(l, {
|
|
251
|
+
ref: c,
|
|
252
252
|
"data-sidebar": "menu-button",
|
|
253
|
-
"data-size":
|
|
254
|
-
"data-active":
|
|
255
|
-
className:
|
|
256
|
-
variant:
|
|
257
|
-
size:
|
|
258
|
-
}),
|
|
259
|
-
...
|
|
253
|
+
"data-size": i,
|
|
254
|
+
"data-active": n,
|
|
255
|
+
className: e(G({
|
|
256
|
+
variant: r,
|
|
257
|
+
size: i
|
|
258
|
+
}), o),
|
|
259
|
+
...s
|
|
260
260
|
});
|
|
261
|
-
return
|
|
261
|
+
return a ? (typeof a == "string" && (a = { children: a }), /* @__PURE__ */ v(d, { children: [/* @__PURE__ */ _(m, {
|
|
262
262
|
asChild: !0,
|
|
263
263
|
children: h
|
|
264
|
-
}), /* @__PURE__ */
|
|
264
|
+
}), /* @__PURE__ */ _(f, {
|
|
265
265
|
side: "right",
|
|
266
266
|
align: "center",
|
|
267
|
-
hidden:
|
|
268
|
-
...
|
|
267
|
+
hidden: p !== "collapsed" || u,
|
|
268
|
+
...a
|
|
269
269
|
})] })) : h;
|
|
270
270
|
});
|
|
271
271
|
K.displayName = "SidebarMenuButton";
|
|
272
|
-
var q =
|
|
273
|
-
ref:
|
|
272
|
+
var q = h.forwardRef(({ className: t, asChild: n = !1, showOnHover: r = !1, ...i }, a) => /* @__PURE__ */ _(n ? b : "button", {
|
|
273
|
+
ref: a,
|
|
274
274
|
"data-sidebar": "menu-action",
|
|
275
|
-
className:
|
|
276
|
-
...
|
|
275
|
+
className: e("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 after:md:hidden", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", r && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0", t),
|
|
276
|
+
...i
|
|
277
277
|
}));
|
|
278
278
|
q.displayName = "SidebarMenuAction";
|
|
279
|
-
var J =
|
|
279
|
+
var J = h.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ _("div", {
|
|
280
280
|
ref: r,
|
|
281
281
|
"data-sidebar": "menu-badge",
|
|
282
|
-
className:
|
|
282
|
+
className: e("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground", "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", t),
|
|
283
283
|
...n
|
|
284
284
|
}));
|
|
285
285
|
J.displayName = "SidebarMenuBadge";
|
|
286
|
-
var Y =
|
|
287
|
-
let a =
|
|
288
|
-
return /* @__PURE__ */
|
|
286
|
+
var Y = h.forwardRef(({ className: t, showIcon: n = !1, ...r }, i) => {
|
|
287
|
+
let a = h.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
288
|
+
return /* @__PURE__ */ v("div", {
|
|
289
289
|
ref: i,
|
|
290
290
|
"data-sidebar": "menu-skeleton",
|
|
291
|
-
className:
|
|
291
|
+
className: e("flex h-8 items-center gap-2 rounded-md px-2", t),
|
|
292
292
|
...r,
|
|
293
|
-
children: [n && /* @__PURE__ */
|
|
293
|
+
children: [n && /* @__PURE__ */ _(u, {
|
|
294
294
|
className: "size-4 rounded-md",
|
|
295
295
|
"data-sidebar": "menu-skeleton-icon"
|
|
296
|
-
}), /* @__PURE__ */
|
|
296
|
+
}), /* @__PURE__ */ _(u, {
|
|
297
297
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
298
298
|
"data-sidebar": "menu-skeleton-text",
|
|
299
299
|
style: { "--skeleton-width": a }
|
|
@@ -301,25 +301,25 @@ var Y = _.forwardRef(({ className: e, showIcon: n = !1, ...r }, i) => {
|
|
|
301
301
|
});
|
|
302
302
|
});
|
|
303
303
|
Y.displayName = "SidebarMenuSkeleton";
|
|
304
|
-
var X =
|
|
304
|
+
var X = h.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ _("ul", {
|
|
305
305
|
ref: r,
|
|
306
306
|
"data-sidebar": "menu-sub",
|
|
307
|
-
className:
|
|
307
|
+
className: e("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5", "group-data-[collapsible=icon]:hidden", t),
|
|
308
308
|
...n
|
|
309
309
|
}));
|
|
310
310
|
X.displayName = "SidebarMenuSub";
|
|
311
|
-
var Z =
|
|
311
|
+
var Z = h.forwardRef(({ ...e }, t) => /* @__PURE__ */ _("li", {
|
|
312
312
|
ref: t,
|
|
313
313
|
...e
|
|
314
314
|
}));
|
|
315
315
|
Z.displayName = "SidebarMenuSubItem";
|
|
316
|
-
var Q =
|
|
317
|
-
ref:
|
|
316
|
+
var Q = h.forwardRef(({ asChild: t = !1, size: n = "md", isActive: r, className: i, ...a }, o) => /* @__PURE__ */ _(t ? b : "a", {
|
|
317
|
+
ref: o,
|
|
318
318
|
"data-sidebar": "menu-sub-button",
|
|
319
|
-
"data-size":
|
|
320
|
-
"data-active":
|
|
321
|
-
className:
|
|
322
|
-
...
|
|
319
|
+
"data-size": n,
|
|
320
|
+
"data-active": r,
|
|
321
|
+
className: e("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground", n === "sm" && "text-xs", n === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", i),
|
|
322
|
+
...a
|
|
323
323
|
}));
|
|
324
324
|
Q.displayName = "SidebarMenuSubButton";
|
|
325
325
|
//#endregion
|