@uipath/apollo-wind 2.64.0 → 2.65.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/components/ui/index.cjs +101 -90
  2. package/dist/components/ui/index.d.ts +1 -0
  3. package/dist/components/ui/index.js +1 -0
  4. package/dist/components/ui/json-tree-view/JsonTree.cjs +1 -1
  5. package/dist/components/ui/json-tree-view/JsonTree.d.ts +2 -2
  6. package/dist/components/ui/json-tree-view/JsonTree.js +1 -1
  7. package/dist/components/ui/json-tree-view/JsonTree.types.d.ts +6 -0
  8. package/dist/components/ui/json-tree-view/JsonTreeRow.cjs +1 -1
  9. package/dist/components/ui/json-tree-view/JsonTreeRow.d.ts +2 -2
  10. package/dist/components/ui/json-tree-view/JsonTreeRow.js +1 -1
  11. package/dist/components/ui/sidebar/index.cjs +113 -0
  12. package/dist/components/ui/sidebar/index.d.ts +10 -0
  13. package/dist/components/ui/sidebar/index.js +7 -0
  14. package/dist/components/ui/sidebar/sidebar-context.cjs +151 -0
  15. package/dist/components/ui/sidebar/sidebar-context.d.ts +39 -0
  16. package/dist/components/ui/sidebar/sidebar-context.js +108 -0
  17. package/dist/components/ui/sidebar/sidebar-group.cjs +87 -0
  18. package/dist/components/ui/sidebar/sidebar-group.d.ts +10 -0
  19. package/dist/components/ui/sidebar/sidebar-group.js +44 -0
  20. package/dist/components/ui/sidebar/sidebar-layout.cjs +92 -0
  21. package/dist/components/ui/sidebar/sidebar-layout.d.ts +7 -0
  22. package/dist/components/ui/sidebar/sidebar-layout.js +46 -0
  23. package/dist/components/ui/sidebar/sidebar-menu-sub.cjs +79 -0
  24. package/dist/components/ui/sidebar/sidebar-menu-sub.d.ts +11 -0
  25. package/dist/components/ui/sidebar/sidebar-menu-sub.js +39 -0
  26. package/dist/components/ui/sidebar/sidebar-menu.cjs +185 -0
  27. package/dist/components/ui/sidebar/sidebar-menu.d.ts +26 -0
  28. package/dist/components/ui/sidebar/sidebar-menu.js +133 -0
  29. package/dist/components/ui/sidebar/sidebar.cjs +220 -0
  30. package/dist/components/ui/sidebar/sidebar.d.ts +22 -0
  31. package/dist/components/ui/sidebar/sidebar.js +177 -0
  32. package/dist/index.cjs +94 -18
  33. package/dist/index.d.ts +3 -1
  34. package/dist/index.js +2 -1
  35. package/dist/styles.css +626 -0
  36. package/package.json +1 -1
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ SidebarInput: ()=>SidebarInput,
28
+ SidebarContent: ()=>SidebarContent,
29
+ SidebarSeparator: ()=>SidebarSeparator,
30
+ SidebarHeader: ()=>SidebarHeader,
31
+ SidebarFooter: ()=>SidebarFooter
32
+ });
33
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
34
+ const external_react_namespaceObject = require("react");
35
+ const external_input_cjs_namespaceObject = require("../input.cjs");
36
+ const external_separator_cjs_namespaceObject = require("../separator.cjs");
37
+ const index_cjs_namespaceObject = require("../../../lib/index.cjs");
38
+ const SidebarInput = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_cjs_namespaceObject.Input, {
39
+ ref: ref,
40
+ "data-slot": "sidebar-input",
41
+ "data-sidebar": "input",
42
+ className: (0, index_cjs_namespaceObject.cn)('h-8 w-full bg-background shadow-none', className),
43
+ ...props
44
+ }));
45
+ SidebarInput.displayName = 'SidebarInput';
46
+ const SidebarHeader = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
47
+ ref: ref,
48
+ "data-slot": "sidebar-header",
49
+ "data-sidebar": "header",
50
+ className: (0, index_cjs_namespaceObject.cn)('flex flex-col gap-2 p-2', className),
51
+ ...props
52
+ }));
53
+ SidebarHeader.displayName = 'SidebarHeader';
54
+ const SidebarFooter = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
55
+ ref: ref,
56
+ "data-slot": "sidebar-footer",
57
+ "data-sidebar": "footer",
58
+ className: (0, index_cjs_namespaceObject.cn)('flex flex-col gap-2 p-2', className),
59
+ ...props
60
+ }));
61
+ SidebarFooter.displayName = 'SidebarFooter';
62
+ const SidebarSeparator = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_separator_cjs_namespaceObject.Separator, {
63
+ ref: ref,
64
+ "data-slot": "sidebar-separator",
65
+ "data-sidebar": "separator",
66
+ className: (0, index_cjs_namespaceObject.cn)('mx-2 w-auto bg-border-subtle', className),
67
+ ...props
68
+ }));
69
+ SidebarSeparator.displayName = 'SidebarSeparator';
70
+ const SidebarContent = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
71
+ ref: ref,
72
+ "data-slot": "sidebar-content",
73
+ "data-sidebar": "content",
74
+ className: (0, index_cjs_namespaceObject.cn)('flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden', className),
75
+ ...props
76
+ }));
77
+ SidebarContent.displayName = 'SidebarContent';
78
+ exports.SidebarContent = __webpack_exports__.SidebarContent;
79
+ exports.SidebarFooter = __webpack_exports__.SidebarFooter;
80
+ exports.SidebarHeader = __webpack_exports__.SidebarHeader;
81
+ exports.SidebarInput = __webpack_exports__.SidebarInput;
82
+ exports.SidebarSeparator = __webpack_exports__.SidebarSeparator;
83
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
84
+ "SidebarContent",
85
+ "SidebarFooter",
86
+ "SidebarHeader",
87
+ "SidebarInput",
88
+ "SidebarSeparator"
89
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
90
+ Object.defineProperty(exports, '__esModule', {
91
+ value: true
92
+ });
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ declare const SidebarInput: React.ForwardRefExoticComponent<Omit<import("../input").InputProps & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
3
+ declare const SidebarHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const SidebarFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const SidebarSeparator: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-separator").SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const SidebarContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export { SidebarContent, SidebarFooter, SidebarHeader, SidebarInput, SidebarSeparator };
@@ -0,0 +1,46 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { Input } from "../input.js";
4
+ import { Separator } from "../separator.js";
5
+ import { cn } from "../../../lib/index.js";
6
+ const SidebarInput = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Input, {
7
+ ref: ref,
8
+ "data-slot": "sidebar-input",
9
+ "data-sidebar": "input",
10
+ className: cn('h-8 w-full bg-background shadow-none', className),
11
+ ...props
12
+ }));
13
+ SidebarInput.displayName = 'SidebarInput';
14
+ const SidebarHeader = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
15
+ ref: ref,
16
+ "data-slot": "sidebar-header",
17
+ "data-sidebar": "header",
18
+ className: cn('flex flex-col gap-2 p-2', className),
19
+ ...props
20
+ }));
21
+ SidebarHeader.displayName = 'SidebarHeader';
22
+ const SidebarFooter = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
23
+ ref: ref,
24
+ "data-slot": "sidebar-footer",
25
+ "data-sidebar": "footer",
26
+ className: cn('flex flex-col gap-2 p-2', className),
27
+ ...props
28
+ }));
29
+ SidebarFooter.displayName = 'SidebarFooter';
30
+ const SidebarSeparator = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Separator, {
31
+ ref: ref,
32
+ "data-slot": "sidebar-separator",
33
+ "data-sidebar": "separator",
34
+ className: cn('mx-2 w-auto bg-border-subtle', className),
35
+ ...props
36
+ }));
37
+ SidebarSeparator.displayName = 'SidebarSeparator';
38
+ const SidebarContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
39
+ ref: ref,
40
+ "data-slot": "sidebar-content",
41
+ "data-sidebar": "content",
42
+ className: cn('flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden', className),
43
+ ...props
44
+ }));
45
+ SidebarContent.displayName = 'SidebarContent';
46
+ export { SidebarContent, SidebarFooter, SidebarHeader, SidebarInput, SidebarSeparator };
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ "use client";
3
+ var __webpack_require__ = {};
4
+ (()=>{
5
+ __webpack_require__.d = (exports1, definition)=>{
6
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ get: definition[key]
9
+ });
10
+ };
11
+ })();
12
+ (()=>{
13
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.r = (exports1)=>{
17
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
18
+ value: 'Module'
19
+ });
20
+ Object.defineProperty(exports1, '__esModule', {
21
+ value: true
22
+ });
23
+ };
24
+ })();
25
+ var __webpack_exports__ = {};
26
+ __webpack_require__.r(__webpack_exports__);
27
+ __webpack_require__.d(__webpack_exports__, {
28
+ SidebarMenuSub: ()=>SidebarMenuSub,
29
+ SidebarMenuSubButton: ()=>SidebarMenuSubButton,
30
+ SidebarMenuSubItem: ()=>SidebarMenuSubItem
31
+ });
32
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
33
+ const react_slot_namespaceObject = require("@radix-ui/react-slot");
34
+ const external_react_namespaceObject = require("react");
35
+ const index_cjs_namespaceObject = require("../../../lib/index.cjs");
36
+ const external_sidebar_context_cjs_namespaceObject = require("./sidebar-context.cjs");
37
+ const SidebarMenuSub = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ul", {
38
+ ref: ref,
39
+ "data-slot": "sidebar-menu-sub",
40
+ "data-sidebar": "menu-sub",
41
+ className: (0, index_cjs_namespaceObject.cn)('mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-border-subtle px-2.5 py-0.5', 'group-data-[collapsible=icon]:hidden', className),
42
+ ...props
43
+ }));
44
+ SidebarMenuSub.displayName = 'SidebarMenuSub';
45
+ const SidebarMenuSubItem = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", {
46
+ ref: ref,
47
+ "data-slot": "sidebar-menu-sub-item",
48
+ "data-sidebar": "menu-sub-item",
49
+ className: (0, index_cjs_namespaceObject.cn)('group/menu-sub-item relative', className),
50
+ ...props
51
+ }));
52
+ SidebarMenuSubItem.displayName = 'SidebarMenuSubItem';
53
+ const SidebarMenuSubButton = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ asChild = false, size = 'md', isActive = false, className, onClick, onClickCapture, ...props }, ref)=>{
54
+ const Comp = asChild ? react_slot_namespaceObject.Slot : 'a';
55
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Comp, {
56
+ ref: ref,
57
+ "data-slot": "sidebar-menu-sub-button",
58
+ "data-sidebar": "menu-sub-button",
59
+ "data-size": size,
60
+ "data-active": isActive,
61
+ "aria-current": isActive ? 'true' : void 0,
62
+ className: (0, index_cjs_namespaceObject.cn)('flex h-7 min-w-0 -translate-x-px cursor-pointer items-center gap-2 overflow-hidden rounded-md px-2 text-foreground ring-ring outline-hidden hover:bg-background-hover focus-visible:ring-2 active:bg-background-hover 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-foreground-muted', 'data-[active=true]:bg-surface-selected data-[active=true]:hover:bg-surface-selected data-[active=true]:text-foreground', 'sm' === size && 'text-xs', 'md' === size && 'text-sm', 'group-data-[collapsible=icon]:hidden', className),
63
+ ...props,
64
+ onClick: onClick,
65
+ onClickCapture: (0, external_sidebar_context_cjs_namespaceObject.guardDisabledClick)(props['aria-disabled'], onClickCapture)
66
+ });
67
+ });
68
+ SidebarMenuSubButton.displayName = 'SidebarMenuSubButton';
69
+ exports.SidebarMenuSub = __webpack_exports__.SidebarMenuSub;
70
+ exports.SidebarMenuSubButton = __webpack_exports__.SidebarMenuSubButton;
71
+ exports.SidebarMenuSubItem = __webpack_exports__.SidebarMenuSubItem;
72
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
73
+ "SidebarMenuSub",
74
+ "SidebarMenuSubButton",
75
+ "SidebarMenuSubItem"
76
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
77
+ Object.defineProperty(exports, '__esModule', {
78
+ value: true
79
+ });
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ declare const SidebarMenuSub: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
3
+ declare const SidebarMenuSubItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
4
+ export interface SidebarMenuSubButtonProps extends React.ComponentProps<'a'> {
5
+ asChild?: boolean;
6
+ size?: 'sm' | 'md';
7
+ /** Marks the item as the current selection. Sets `data-active` and `aria-current="true"` (pass `aria-current="page"` for route links). */
8
+ isActive?: boolean;
9
+ }
10
+ declare const SidebarMenuSubButton: React.ForwardRefExoticComponent<Omit<SidebarMenuSubButtonProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
11
+ export { SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem };
@@ -0,0 +1,39 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { forwardRef } from "react";
5
+ import { cn } from "../../../lib/index.js";
6
+ import { guardDisabledClick } from "./sidebar-context.js";
7
+ const SidebarMenuSub = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("ul", {
8
+ ref: ref,
9
+ "data-slot": "sidebar-menu-sub",
10
+ "data-sidebar": "menu-sub",
11
+ className: cn('mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-border-subtle px-2.5 py-0.5', 'group-data-[collapsible=icon]:hidden', className),
12
+ ...props
13
+ }));
14
+ SidebarMenuSub.displayName = 'SidebarMenuSub';
15
+ const SidebarMenuSubItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("li", {
16
+ ref: ref,
17
+ "data-slot": "sidebar-menu-sub-item",
18
+ "data-sidebar": "menu-sub-item",
19
+ className: cn('group/menu-sub-item relative', className),
20
+ ...props
21
+ }));
22
+ SidebarMenuSubItem.displayName = 'SidebarMenuSubItem';
23
+ const SidebarMenuSubButton = /*#__PURE__*/ forwardRef(({ asChild = false, size = 'md', isActive = false, className, onClick, onClickCapture, ...props }, ref)=>{
24
+ const Comp = asChild ? Slot : 'a';
25
+ return /*#__PURE__*/ jsx(Comp, {
26
+ ref: ref,
27
+ "data-slot": "sidebar-menu-sub-button",
28
+ "data-sidebar": "menu-sub-button",
29
+ "data-size": size,
30
+ "data-active": isActive,
31
+ "aria-current": isActive ? 'true' : void 0,
32
+ className: cn('flex h-7 min-w-0 -translate-x-px cursor-pointer items-center gap-2 overflow-hidden rounded-md px-2 text-foreground ring-ring outline-hidden hover:bg-background-hover focus-visible:ring-2 active:bg-background-hover 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-foreground-muted', 'data-[active=true]:bg-surface-selected data-[active=true]:hover:bg-surface-selected data-[active=true]:text-foreground', 'sm' === size && 'text-xs', 'md' === size && 'text-sm', 'group-data-[collapsible=icon]:hidden', className),
33
+ ...props,
34
+ onClick: onClick,
35
+ onClickCapture: guardDisabledClick(props['aria-disabled'], onClickCapture)
36
+ });
37
+ });
38
+ SidebarMenuSubButton.displayName = 'SidebarMenuSubButton';
39
+ export { SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem };
@@ -0,0 +1,185 @@
1
+ "use strict";
2
+ "use client";
3
+ var __webpack_require__ = {};
4
+ (()=>{
5
+ __webpack_require__.d = (exports1, definition)=>{
6
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ get: definition[key]
9
+ });
10
+ };
11
+ })();
12
+ (()=>{
13
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.r = (exports1)=>{
17
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
18
+ value: 'Module'
19
+ });
20
+ Object.defineProperty(exports1, '__esModule', {
21
+ value: true
22
+ });
23
+ };
24
+ })();
25
+ var __webpack_exports__ = {};
26
+ __webpack_require__.r(__webpack_exports__);
27
+ __webpack_require__.d(__webpack_exports__, {
28
+ SidebarMenuButton: ()=>SidebarMenuButton,
29
+ SidebarMenuAction: ()=>SidebarMenuAction,
30
+ SidebarMenuItem: ()=>SidebarMenuItem,
31
+ SidebarMenuBadge: ()=>SidebarMenuBadge,
32
+ SidebarMenuSkeleton: ()=>SidebarMenuSkeleton,
33
+ SidebarMenu: ()=>SidebarMenu,
34
+ sidebarMenuButtonVariants: ()=>sidebarMenuButtonVariants
35
+ });
36
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
37
+ const react_slot_namespaceObject = require("@radix-ui/react-slot");
38
+ const external_class_variance_authority_namespaceObject = require("class-variance-authority");
39
+ const external_react_namespaceObject = require("react");
40
+ const external_skeleton_cjs_namespaceObject = require("../skeleton.cjs");
41
+ const external_tooltip_cjs_namespaceObject = require("../tooltip.cjs");
42
+ const index_cjs_namespaceObject = require("../../../lib/index.cjs");
43
+ const external_sidebar_context_cjs_namespaceObject = require("./sidebar-context.cjs");
44
+ const SidebarMenu = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ul", {
45
+ ref: ref,
46
+ "data-slot": "sidebar-menu",
47
+ "data-sidebar": "menu",
48
+ className: (0, index_cjs_namespaceObject.cn)('flex w-full min-w-0 flex-col gap-1', className),
49
+ ...props
50
+ }));
51
+ SidebarMenu.displayName = 'SidebarMenu';
52
+ const SidebarMenuItem = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", {
53
+ ref: ref,
54
+ "data-slot": "sidebar-menu-item",
55
+ "data-sidebar": "menu-item",
56
+ className: (0, index_cjs_namespaceObject.cn)('group/menu-item relative', className),
57
+ ...props
58
+ }));
59
+ SidebarMenuItem.displayName = 'SidebarMenuItem';
60
+ const sidebarMenuButtonVariants = (0, external_class_variance_authority_namespaceObject.cva)('peer/menu-button flex w-full cursor-pointer items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm text-foreground ring-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-has-data-[sidebar=menu-badge]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-background-hover focus-visible:ring-2 active:bg-background-hover disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-surface-selected data-[active=true]:hover:bg-surface-selected data-[active=true]:text-foreground data-[state=open]:hover:bg-background-hover [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', {
61
+ variants: {
62
+ variant: {
63
+ default: '',
64
+ outline: 'bg-background inset-ring inset-ring-border-subtle hover:inset-ring-border'
65
+ },
66
+ size: {
67
+ default: 'h-8 text-sm',
68
+ sm: 'h-7 text-xs',
69
+ lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!'
70
+ }
71
+ },
72
+ defaultVariants: {
73
+ variant: 'default',
74
+ size: 'default'
75
+ }
76
+ });
77
+ const SidebarMenuButton = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ asChild = false, isActive = false, variant = 'default', size = 'default', tooltip, className, onClick, onClickCapture, ...props }, ref)=>{
78
+ const Comp = asChild ? react_slot_namespaceObject.Slot : 'button';
79
+ const { isMobile, state } = (0, external_sidebar_context_cjs_namespaceObject.useSidebar)();
80
+ const button = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Comp, {
81
+ ref: ref,
82
+ type: asChild ? void 0 : 'button',
83
+ "data-slot": "sidebar-menu-button",
84
+ "data-sidebar": "menu-button",
85
+ "data-size": size,
86
+ "data-active": isActive,
87
+ "aria-current": isActive ? 'true' : void 0,
88
+ className: (0, index_cjs_namespaceObject.cn)(sidebarMenuButtonVariants({
89
+ variant,
90
+ size
91
+ }), className),
92
+ ...props,
93
+ onClick: onClick,
94
+ onClickCapture: (0, external_sidebar_context_cjs_namespaceObject.guardDisabledClick)(props['aria-disabled'], onClickCapture)
95
+ });
96
+ if (!tooltip) return button;
97
+ const tooltipProps = 'string' == typeof tooltip ? {
98
+ children: tooltip
99
+ } : tooltip;
100
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_tooltip_cjs_namespaceObject.Tooltip, {
101
+ children: [
102
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipTrigger, {
103
+ asChild: true,
104
+ children: button
105
+ }),
106
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipContent, {
107
+ side: "right",
108
+ align: "center",
109
+ hidden: 'collapsed' !== state || isMobile,
110
+ ...tooltipProps
111
+ })
112
+ ]
113
+ });
114
+ });
115
+ SidebarMenuButton.displayName = 'SidebarMenuButton';
116
+ const SidebarMenuAction = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref)=>{
117
+ const Comp = asChild ? react_slot_namespaceObject.Slot : 'button';
118
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Comp, {
119
+ ref: ref,
120
+ type: asChild ? void 0 : 'button',
121
+ "data-slot": "sidebar-menu-action",
122
+ "data-sidebar": "menu-action",
123
+ className: (0, index_cjs_namespaceObject.cn)('absolute top-1.5 right-1 flex aspect-square w-5 cursor-pointer items-center justify-center rounded-md p-0 text-foreground-muted ring-ring outline-hidden transition-transform peer-hover/menu-button:text-foreground hover:bg-background-hover hover:text-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0', 'after:absolute after:-inset-2 md:after: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-3.5', 'group-data-[collapsible=icon]:hidden', showOnHover && 'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-[active=true]/menu-button:text-foreground data-[state=open]:opacity-100 md:opacity-0', className),
124
+ ...props
125
+ });
126
+ });
127
+ SidebarMenuAction.displayName = 'SidebarMenuAction';
128
+ const SidebarMenuBadge = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
129
+ ref: ref,
130
+ "data-slot": "sidebar-menu-badge",
131
+ "data-sidebar": "menu-badge",
132
+ className: (0, index_cjs_namespaceObject.cn)('pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-foreground-muted tabular-nums select-none', 'peer-data-[active=true]/menu-button:text-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-3.5', 'group-data-[collapsible=icon]:hidden', className),
133
+ ...props
134
+ }));
135
+ SidebarMenuBadge.displayName = 'SidebarMenuBadge';
136
+ const SidebarMenuSkeleton = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, showIcon = false, ...props }, ref)=>{
137
+ const id = external_react_namespaceObject.useId();
138
+ const width = external_react_namespaceObject.useMemo(()=>{
139
+ let hash = 0;
140
+ for(let i = 0; i < id.length; i++)hash = 31 * hash + id.charCodeAt(i) >>> 0;
141
+ return `${hash % 41 + 50}%`;
142
+ }, [
143
+ id
144
+ ]);
145
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
146
+ ref: ref,
147
+ "data-slot": "sidebar-menu-skeleton",
148
+ "data-sidebar": "menu-skeleton",
149
+ className: (0, index_cjs_namespaceObject.cn)('flex h-8 items-center gap-2 rounded-md px-2', className),
150
+ ...props,
151
+ children: [
152
+ showIcon && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_skeleton_cjs_namespaceObject.Skeleton, {
153
+ className: "size-4 rounded-md",
154
+ "data-sidebar": "menu-skeleton-icon"
155
+ }),
156
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_skeleton_cjs_namespaceObject.Skeleton, {
157
+ className: "h-4 max-w-(--skeleton-width) flex-1",
158
+ "data-sidebar": "menu-skeleton-text",
159
+ style: {
160
+ '--skeleton-width': width
161
+ }
162
+ })
163
+ ]
164
+ });
165
+ });
166
+ SidebarMenuSkeleton.displayName = 'SidebarMenuSkeleton';
167
+ exports.SidebarMenu = __webpack_exports__.SidebarMenu;
168
+ exports.SidebarMenuAction = __webpack_exports__.SidebarMenuAction;
169
+ exports.SidebarMenuBadge = __webpack_exports__.SidebarMenuBadge;
170
+ exports.SidebarMenuButton = __webpack_exports__.SidebarMenuButton;
171
+ exports.SidebarMenuItem = __webpack_exports__.SidebarMenuItem;
172
+ exports.SidebarMenuSkeleton = __webpack_exports__.SidebarMenuSkeleton;
173
+ exports.sidebarMenuButtonVariants = __webpack_exports__.sidebarMenuButtonVariants;
174
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
175
+ "SidebarMenu",
176
+ "SidebarMenuAction",
177
+ "SidebarMenuBadge",
178
+ "SidebarMenuButton",
179
+ "SidebarMenuItem",
180
+ "SidebarMenuSkeleton",
181
+ "sidebarMenuButtonVariants"
182
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
183
+ Object.defineProperty(exports, '__esModule', {
184
+ value: true
185
+ });
@@ -0,0 +1,26 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ import { TooltipContent } from '../tooltip';
4
+ declare const SidebarMenu: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
5
+ declare const SidebarMenuItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
6
+ declare const sidebarMenuButtonVariants: (props?: ({
7
+ variant?: "default" | "outline" | null | undefined;
8
+ size?: "default" | "lg" | "sm" | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ export interface SidebarMenuButtonProps extends React.ComponentProps<'button'>, VariantProps<typeof sidebarMenuButtonVariants> {
11
+ asChild?: boolean;
12
+ /** Marks the item as the current selection. Sets `data-active` and `aria-current="true"` (pass `aria-current="page"` for route links). */
13
+ isActive?: boolean;
14
+ /** Shown beside the button when the sidebar is collapsed to icons. */
15
+ tooltip?: string | React.ComponentProps<typeof TooltipContent>;
16
+ }
17
+ declare const SidebarMenuButton: React.ForwardRefExoticComponent<Omit<SidebarMenuButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
18
+ declare const SidebarMenuAction: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
19
+ asChild?: boolean;
20
+ showOnHover?: boolean;
21
+ }, "ref"> & React.RefAttributes<HTMLButtonElement>>;
22
+ declare const SidebarMenuBadge: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const SidebarMenuSkeleton: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
24
+ showIcon?: boolean;
25
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
26
+ export { SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, sidebarMenuButtonVariants, };
@@ -0,0 +1,133 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { cva } from "class-variance-authority";
5
+ import { forwardRef, useId, useMemo } from "react";
6
+ import { Skeleton } from "../skeleton.js";
7
+ import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip.js";
8
+ import { cn } from "../../../lib/index.js";
9
+ import { guardDisabledClick, useSidebar } from "./sidebar-context.js";
10
+ const SidebarMenu = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("ul", {
11
+ ref: ref,
12
+ "data-slot": "sidebar-menu",
13
+ "data-sidebar": "menu",
14
+ className: cn('flex w-full min-w-0 flex-col gap-1', className),
15
+ ...props
16
+ }));
17
+ SidebarMenu.displayName = 'SidebarMenu';
18
+ const SidebarMenuItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("li", {
19
+ ref: ref,
20
+ "data-slot": "sidebar-menu-item",
21
+ "data-sidebar": "menu-item",
22
+ className: cn('group/menu-item relative', className),
23
+ ...props
24
+ }));
25
+ SidebarMenuItem.displayName = 'SidebarMenuItem';
26
+ const sidebarMenuButtonVariants = cva('peer/menu-button flex w-full cursor-pointer items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm text-foreground ring-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-has-data-[sidebar=menu-badge]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-background-hover focus-visible:ring-2 active:bg-background-hover disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-surface-selected data-[active=true]:hover:bg-surface-selected data-[active=true]:text-foreground data-[state=open]:hover:bg-background-hover [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', {
27
+ variants: {
28
+ variant: {
29
+ default: '',
30
+ outline: 'bg-background inset-ring inset-ring-border-subtle hover:inset-ring-border'
31
+ },
32
+ size: {
33
+ default: 'h-8 text-sm',
34
+ sm: 'h-7 text-xs',
35
+ lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!'
36
+ }
37
+ },
38
+ defaultVariants: {
39
+ variant: 'default',
40
+ size: 'default'
41
+ }
42
+ });
43
+ const SidebarMenuButton = /*#__PURE__*/ forwardRef(({ asChild = false, isActive = false, variant = 'default', size = 'default', tooltip, className, onClick, onClickCapture, ...props }, ref)=>{
44
+ const Comp = asChild ? Slot : 'button';
45
+ const { isMobile, state } = useSidebar();
46
+ const button = /*#__PURE__*/ jsx(Comp, {
47
+ ref: ref,
48
+ type: asChild ? void 0 : 'button',
49
+ "data-slot": "sidebar-menu-button",
50
+ "data-sidebar": "menu-button",
51
+ "data-size": size,
52
+ "data-active": isActive,
53
+ "aria-current": isActive ? 'true' : void 0,
54
+ className: cn(sidebarMenuButtonVariants({
55
+ variant,
56
+ size
57
+ }), className),
58
+ ...props,
59
+ onClick: onClick,
60
+ onClickCapture: guardDisabledClick(props['aria-disabled'], onClickCapture)
61
+ });
62
+ if (!tooltip) return button;
63
+ const tooltipProps = 'string' == typeof tooltip ? {
64
+ children: tooltip
65
+ } : tooltip;
66
+ return /*#__PURE__*/ jsxs(Tooltip, {
67
+ children: [
68
+ /*#__PURE__*/ jsx(TooltipTrigger, {
69
+ asChild: true,
70
+ children: button
71
+ }),
72
+ /*#__PURE__*/ jsx(TooltipContent, {
73
+ side: "right",
74
+ align: "center",
75
+ hidden: 'collapsed' !== state || isMobile,
76
+ ...tooltipProps
77
+ })
78
+ ]
79
+ });
80
+ });
81
+ SidebarMenuButton.displayName = 'SidebarMenuButton';
82
+ const SidebarMenuAction = /*#__PURE__*/ forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref)=>{
83
+ const Comp = asChild ? Slot : 'button';
84
+ return /*#__PURE__*/ jsx(Comp, {
85
+ ref: ref,
86
+ type: asChild ? void 0 : 'button',
87
+ "data-slot": "sidebar-menu-action",
88
+ "data-sidebar": "menu-action",
89
+ className: cn('absolute top-1.5 right-1 flex aspect-square w-5 cursor-pointer items-center justify-center rounded-md p-0 text-foreground-muted ring-ring outline-hidden transition-transform peer-hover/menu-button:text-foreground hover:bg-background-hover hover:text-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0', 'after:absolute after:-inset-2 md:after: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-3.5', 'group-data-[collapsible=icon]:hidden', showOnHover && 'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-[active=true]/menu-button:text-foreground data-[state=open]:opacity-100 md:opacity-0', className),
90
+ ...props
91
+ });
92
+ });
93
+ SidebarMenuAction.displayName = 'SidebarMenuAction';
94
+ const SidebarMenuBadge = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
95
+ ref: ref,
96
+ "data-slot": "sidebar-menu-badge",
97
+ "data-sidebar": "menu-badge",
98
+ className: cn('pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-foreground-muted tabular-nums select-none', 'peer-data-[active=true]/menu-button:text-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-3.5', 'group-data-[collapsible=icon]:hidden', className),
99
+ ...props
100
+ }));
101
+ SidebarMenuBadge.displayName = 'SidebarMenuBadge';
102
+ const SidebarMenuSkeleton = /*#__PURE__*/ forwardRef(({ className, showIcon = false, ...props }, ref)=>{
103
+ const id = useId();
104
+ const width = useMemo(()=>{
105
+ let hash = 0;
106
+ for(let i = 0; i < id.length; i++)hash = 31 * hash + id.charCodeAt(i) >>> 0;
107
+ return `${hash % 41 + 50}%`;
108
+ }, [
109
+ id
110
+ ]);
111
+ return /*#__PURE__*/ jsxs("div", {
112
+ ref: ref,
113
+ "data-slot": "sidebar-menu-skeleton",
114
+ "data-sidebar": "menu-skeleton",
115
+ className: cn('flex h-8 items-center gap-2 rounded-md px-2', className),
116
+ ...props,
117
+ children: [
118
+ showIcon && /*#__PURE__*/ jsx(Skeleton, {
119
+ className: "size-4 rounded-md",
120
+ "data-sidebar": "menu-skeleton-icon"
121
+ }),
122
+ /*#__PURE__*/ jsx(Skeleton, {
123
+ className: "h-4 max-w-(--skeleton-width) flex-1",
124
+ "data-sidebar": "menu-skeleton-text",
125
+ style: {
126
+ '--skeleton-width': width
127
+ }
128
+ })
129
+ ]
130
+ });
131
+ });
132
+ SidebarMenuSkeleton.displayName = 'SidebarMenuSkeleton';
133
+ export { SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, sidebarMenuButtonVariants };