@stackshift-ui/dropdown-menu 1.0.0-beta.4 → 1.0.0-beta.6
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/package.json +6 -6
- package/dist/chunk-3EYN2AKU.mjs +0 -1
- package/dist/chunk-6DZX6EAA.mjs +0 -37
- package/dist/chunk-QJPK6AEC.mjs +0 -1
- package/dist/chunk-R7IXLJKK.mjs +0 -263
- package/dist/dropdown-menu.d.ts +0 -25
- package/dist/dropdown-menu.js +0 -2
- package/dist/dropdown-menu.mjs +0 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -2
- package/dist/index.mjs +0 -2
- package/dist/setupTests.d.ts +0 -2
- package/dist/setupTests.js +0 -47
- package/dist/setupTests.mjs +0 -47
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/dropdown-menu",
|
|
3
3
|
"description": "Displays a menu to the user — such as a set of actions or functions — triggered by a button.",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.6",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"typescript": "^5.6.2",
|
|
32
32
|
"vite-tsconfig-paths": "^5.0.1",
|
|
33
33
|
"vitest": "^2.1.1",
|
|
34
|
-
"@stackshift-ui/
|
|
35
|
-
"@stackshift-ui/
|
|
34
|
+
"@stackshift-ui/eslint-config": "6.0.10",
|
|
35
|
+
"@stackshift-ui/typescript-config": "6.0.10"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
39
39
|
"classnames": "^2.5.1",
|
|
40
40
|
"lucide-react": "^0.468.0",
|
|
41
|
-
"@stackshift-ui/
|
|
42
|
-
"@stackshift-ui/
|
|
41
|
+
"@stackshift-ui/system": "7.0.0-beta.5",
|
|
42
|
+
"@stackshift-ui/scripts": "7.0.0-beta.4"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@stackshift-ui/system": ">=
|
|
45
|
+
"@stackshift-ui/system": ">=7.0.0-beta.5",
|
|
46
46
|
"@types/react": "16.8 - 19",
|
|
47
47
|
"next": "10 - 14",
|
|
48
48
|
"react": "16.8 - 19",
|
package/dist/chunk-3EYN2AKU.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var g=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(b,c)=>(typeof require!="undefined"?require:b)[c]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var l=(a,b,c,e)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&f(a,d,{get:()=>b[d],enumerable:!(e=h(b,d))||e.enumerable});return a};var o=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c};
|
package/dist/chunk-6DZX6EAA.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
-
}) : x)(function(x) {
|
|
10
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
|
-
});
|
|
13
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
14
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
15
|
-
};
|
|
16
|
-
var __copyProps = (to, from, except, desc) => {
|
|
17
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
-
for (let key of __getOwnPropNames(from))
|
|
19
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
20
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
21
|
-
}
|
|
22
|
-
return to;
|
|
23
|
-
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
30
|
-
mod
|
|
31
|
-
));
|
|
32
|
-
|
|
33
|
-
export {
|
|
34
|
-
__require,
|
|
35
|
-
__commonJS,
|
|
36
|
-
__toESM
|
|
37
|
-
};
|
package/dist/chunk-QJPK6AEC.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"@radix-ui/react-dropdown-menu";import{CheckIcon as S,ChevronRightIcon as z,CircleIcon as k}from"lucide-react";import*as i from"react";import{cn as m,DefaultComponent as d,useStackShiftUIComponents as s}from"@stackshift-ui/system";import{jsx as r,jsxs as c}from"react/jsx-runtime";var f="DropdownMenu",l="DropdownMenuPortal",w="DropdownMenuTrigger",R="DropdownMenuContent",v="DropdownMenuGroup",D="DropdownMenuItem",M="DropdownMenuCheckboxItem",g="DropdownMenuRadioGroup",y="DropdownMenuRadioItem",P="DropdownMenuLabel",b="DropdownMenuSeparator",C="DropdownMenuShortcut",h="DropdownMenuSub",N="DropdownMenuSubTrigger",x="DropdownMenuSubContent",E=i.forwardRef(({...t},o)=>{let{[f]:n=d}=s();return r(n,{as:e.Root,"data-slot":"dropdown-menu",ref:o,...t})});E.displayName=f;var I=i.forwardRef(({...t},o)=>{let{[l]:n=d}=s();return r(n,{as:e.Portal,"data-slot":"dropdown-menu-portal",ref:o,...t})});I.displayName=l;var W=i.forwardRef(({...t},o)=>{let{[w]:n=d}=s();return r(n,{as:e.Trigger,"data-slot":"dropdown-menu-trigger",ref:o,...t})});W.displayName=w;var G=i.forwardRef(({className:t,sideOffset:o=4,...n},a)=>{let{[R]:p=d}=s();return r(I,{children:r(p,{as:e.Content,"data-slot":"dropdown-menu-content",sideOffset:o,className:m("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),ref:a,...n})})});G.displayName=R;var T=i.forwardRef(({...t},o)=>{let{[v]:n=d}=s();return r(n,{as:e.Group,"data-slot":"dropdown-menu-group",ref:o,...t})});T.displayName=v;var _=i.forwardRef(({className:t,inset:o,variant:n="default",...a},p)=>{let{[D]:u=d}=s();return r(u,{as:e.Item,"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":n,className:m("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),ref:p,...a})});_.displayName=D;var L=i.forwardRef(({className:t,children:o,checked:n,...a},p)=>{let{[M]:u=d}=s();return c(u,{as:e.CheckboxItem,"data-slot":"dropdown-menu-checkbox-item",className:m("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),checked:n,ref:p,...a,children:[r("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:r(e.ItemIndicator,{children:r(S,{className:"size-4"})})}),o]})});L.displayName=M;var j=i.forwardRef(({...t},o)=>{let{[g]:n=d}=s();return r(n,{as:e.RadioGroup,"data-slot":"dropdown-menu-radio-group",ref:o,...t})});j.displayName=g;var O=i.forwardRef(({className:t,children:o,...n},a)=>{let{[y]:p=d}=s();return c(p,{as:e.RadioItem,"data-slot":"dropdown-menu-radio-item",className:m("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),ref:a,...n,children:[r("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:r(e.ItemIndicator,{children:r(k,{className:"size-2 fill-current"})})}),o]})});O.displayName=y;var U=i.forwardRef(({className:t,inset:o,...n},a)=>{let{[P]:p=d}=s();return r(p,{as:e.Label,"data-slot":"dropdown-menu-label","data-inset":o,className:m("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),ref:a,...n})});U.displayName=P;var q=i.forwardRef(({className:t,...o},n)=>{let{[b]:a=d}=s();return r(a,{as:e.Separator,ref:n,"data-slot":"dropdown-menu-separator",className:m("bg-border -mx-1 my-1 h-px",t),...o})});q.displayName=b;var A=i.forwardRef(({className:t,...o},n)=>{let{[C]:a=d}=s();return r(a,{as:"span",ref:n,"data-slot":"dropdown-menu-shortcut",className:m("text-muted-foreground ml-auto text-xs tracking-widest",t),...o})});A.displayName=C;var B=i.forwardRef(({...t},o)=>{let{[h]:n=d}=s();return r(n,{as:e.Sub,ref:o,"data-slot":"dropdown-menu-sub",...t})});B.displayName=h;var F=i.forwardRef(({className:t,inset:o,children:n,...a},p)=>{let{[N]:u=d}=s();return c(u,{as:e.SubTrigger,ref:p,"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:m("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",t),...a,children:[n,r(z,{className:"ml-auto size-4"})]})});F.displayName=N;var H=i.forwardRef(({className:t,...o},n)=>{let{[x]:a=d}=s();return r(a,{as:e.SubContent,ref:n,"data-slot":"dropdown-menu-sub-content",className:m("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),...o})});H.displayName=x;export{E as a,I as b,W as c,G as d,T as e,_ as f,L as g,j as h,O as i,U as j,q as k,A as l,B as m,F as n,H as o};
|
package/dist/chunk-R7IXLJKK.mjs
DELETED
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
// src/dropdown-menu.tsx
|
|
2
|
-
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
-
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import { cn, DefaultComponent, useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
var displayName = "DropdownMenu";
|
|
8
|
-
var displayNamePortal = "DropdownMenuPortal";
|
|
9
|
-
var displayNameTrigger = "DropdownMenuTrigger";
|
|
10
|
-
var displayNameContent = "DropdownMenuContent";
|
|
11
|
-
var displayNameGroup = "DropdownMenuGroup";
|
|
12
|
-
var displayNameItem = "DropdownMenuItem";
|
|
13
|
-
var displayNameCheckboxItem = "DropdownMenuCheckboxItem";
|
|
14
|
-
var displayNameRadioGroup = "DropdownMenuRadioGroup";
|
|
15
|
-
var displayNameRadioItem = "DropdownMenuRadioItem";
|
|
16
|
-
var displayNameLabel = "DropdownMenuLabel";
|
|
17
|
-
var displayNameSeparator = "DropdownMenuSeparator";
|
|
18
|
-
var displayNameShortcut = "DropdownMenuShortcut";
|
|
19
|
-
var displayNameSub = "DropdownMenuSub";
|
|
20
|
-
var displayNameSubTrigger = "DropdownMenuSubTrigger";
|
|
21
|
-
var displayNameSubContent = "DropdownMenuSubContent";
|
|
22
|
-
var DropdownMenu = React.forwardRef(({ ...props }, ref) => {
|
|
23
|
-
const { [displayName]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
24
|
-
return /* @__PURE__ */ jsx(Component, { as: DropdownMenuPrimitive.Root, "data-slot": "dropdown-menu", ref, ...props });
|
|
25
|
-
});
|
|
26
|
-
DropdownMenu.displayName = displayName;
|
|
27
|
-
var DropdownMenuPortal = React.forwardRef(({ ...props }, ref) => {
|
|
28
|
-
const { [displayNamePortal]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
29
|
-
return /* @__PURE__ */ jsx(
|
|
30
|
-
Component,
|
|
31
|
-
{
|
|
32
|
-
as: DropdownMenuPrimitive.Portal,
|
|
33
|
-
"data-slot": "dropdown-menu-portal",
|
|
34
|
-
ref,
|
|
35
|
-
...props
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
});
|
|
39
|
-
DropdownMenuPortal.displayName = displayNamePortal;
|
|
40
|
-
var DropdownMenuTrigger = React.forwardRef(({ ...props }, ref) => {
|
|
41
|
-
const { [displayNameTrigger]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
42
|
-
return /* @__PURE__ */ jsx(
|
|
43
|
-
Component,
|
|
44
|
-
{
|
|
45
|
-
as: DropdownMenuPrimitive.Trigger,
|
|
46
|
-
"data-slot": "dropdown-menu-trigger",
|
|
47
|
-
ref,
|
|
48
|
-
...props
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
});
|
|
52
|
-
DropdownMenuTrigger.displayName = displayNameTrigger;
|
|
53
|
-
var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
|
|
54
|
-
const { [displayNameContent]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
55
|
-
return /* @__PURE__ */ jsx(DropdownMenuPortal, { children: /* @__PURE__ */ jsx(
|
|
56
|
-
Component,
|
|
57
|
-
{
|
|
58
|
-
as: DropdownMenuPrimitive.Content,
|
|
59
|
-
"data-slot": "dropdown-menu-content",
|
|
60
|
-
sideOffset,
|
|
61
|
-
className: cn(
|
|
62
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
63
|
-
className
|
|
64
|
-
),
|
|
65
|
-
ref,
|
|
66
|
-
...props
|
|
67
|
-
}
|
|
68
|
-
) });
|
|
69
|
-
});
|
|
70
|
-
DropdownMenuContent.displayName = displayNameContent;
|
|
71
|
-
var DropdownMenuGroup = React.forwardRef(({ ...props }, ref) => {
|
|
72
|
-
const { [displayNameGroup]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
73
|
-
return /* @__PURE__ */ jsx(
|
|
74
|
-
Component,
|
|
75
|
-
{
|
|
76
|
-
as: DropdownMenuPrimitive.Group,
|
|
77
|
-
"data-slot": "dropdown-menu-group",
|
|
78
|
-
ref,
|
|
79
|
-
...props
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
});
|
|
83
|
-
DropdownMenuGroup.displayName = displayNameGroup;
|
|
84
|
-
var DropdownMenuItem = React.forwardRef(({ className, inset, variant = "default", ...props }, ref) => {
|
|
85
|
-
const { [displayNameItem]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
86
|
-
return /* @__PURE__ */ jsx(
|
|
87
|
-
Component,
|
|
88
|
-
{
|
|
89
|
-
as: DropdownMenuPrimitive.Item,
|
|
90
|
-
"data-slot": "dropdown-menu-item",
|
|
91
|
-
"data-inset": inset,
|
|
92
|
-
"data-variant": variant,
|
|
93
|
-
className: cn(
|
|
94
|
-
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
95
|
-
className
|
|
96
|
-
),
|
|
97
|
-
ref,
|
|
98
|
-
...props
|
|
99
|
-
}
|
|
100
|
-
);
|
|
101
|
-
});
|
|
102
|
-
DropdownMenuItem.displayName = displayNameItem;
|
|
103
|
-
var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => {
|
|
104
|
-
const { [displayNameCheckboxItem]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
105
|
-
return /* @__PURE__ */ jsxs(
|
|
106
|
-
Component,
|
|
107
|
-
{
|
|
108
|
-
as: DropdownMenuPrimitive.CheckboxItem,
|
|
109
|
-
"data-slot": "dropdown-menu-checkbox-item",
|
|
110
|
-
className: cn(
|
|
111
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
112
|
-
className
|
|
113
|
-
),
|
|
114
|
-
checked,
|
|
115
|
-
ref,
|
|
116
|
-
...props,
|
|
117
|
-
children: [
|
|
118
|
-
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
119
|
-
children
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
);
|
|
123
|
-
});
|
|
124
|
-
DropdownMenuCheckboxItem.displayName = displayNameCheckboxItem;
|
|
125
|
-
var DropdownMenuRadioGroup = React.forwardRef(({ ...props }, ref) => {
|
|
126
|
-
const { [displayNameRadioGroup]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
127
|
-
return /* @__PURE__ */ jsx(
|
|
128
|
-
Component,
|
|
129
|
-
{
|
|
130
|
-
as: DropdownMenuPrimitive.RadioGroup,
|
|
131
|
-
"data-slot": "dropdown-menu-radio-group",
|
|
132
|
-
ref,
|
|
133
|
-
...props
|
|
134
|
-
}
|
|
135
|
-
);
|
|
136
|
-
});
|
|
137
|
-
DropdownMenuRadioGroup.displayName = displayNameRadioGroup;
|
|
138
|
-
var DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => {
|
|
139
|
-
const { [displayNameRadioItem]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
140
|
-
return /* @__PURE__ */ jsxs(
|
|
141
|
-
Component,
|
|
142
|
-
{
|
|
143
|
-
as: DropdownMenuPrimitive.RadioItem,
|
|
144
|
-
"data-slot": "dropdown-menu-radio-item",
|
|
145
|
-
className: cn(
|
|
146
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
147
|
-
className
|
|
148
|
-
),
|
|
149
|
-
ref,
|
|
150
|
-
...props,
|
|
151
|
-
children: [
|
|
152
|
-
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
153
|
-
children
|
|
154
|
-
]
|
|
155
|
-
}
|
|
156
|
-
);
|
|
157
|
-
});
|
|
158
|
-
DropdownMenuRadioItem.displayName = displayNameRadioItem;
|
|
159
|
-
var DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => {
|
|
160
|
-
const { [displayNameLabel]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
161
|
-
return /* @__PURE__ */ jsx(
|
|
162
|
-
Component,
|
|
163
|
-
{
|
|
164
|
-
as: DropdownMenuPrimitive.Label,
|
|
165
|
-
"data-slot": "dropdown-menu-label",
|
|
166
|
-
"data-inset": inset,
|
|
167
|
-
className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
|
|
168
|
-
ref,
|
|
169
|
-
...props
|
|
170
|
-
}
|
|
171
|
-
);
|
|
172
|
-
});
|
|
173
|
-
DropdownMenuLabel.displayName = displayNameLabel;
|
|
174
|
-
var DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => {
|
|
175
|
-
const { [displayNameSeparator]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
176
|
-
return /* @__PURE__ */ jsx(
|
|
177
|
-
Component,
|
|
178
|
-
{
|
|
179
|
-
as: DropdownMenuPrimitive.Separator,
|
|
180
|
-
ref,
|
|
181
|
-
"data-slot": "dropdown-menu-separator",
|
|
182
|
-
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
183
|
-
...props
|
|
184
|
-
}
|
|
185
|
-
);
|
|
186
|
-
});
|
|
187
|
-
DropdownMenuSeparator.displayName = displayNameSeparator;
|
|
188
|
-
var DropdownMenuShortcut = React.forwardRef(({ className, ...props }, ref) => {
|
|
189
|
-
const { [displayNameShortcut]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
190
|
-
return /* @__PURE__ */ jsx(
|
|
191
|
-
Component,
|
|
192
|
-
{
|
|
193
|
-
as: "span",
|
|
194
|
-
ref,
|
|
195
|
-
"data-slot": "dropdown-menu-shortcut",
|
|
196
|
-
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
197
|
-
...props
|
|
198
|
-
}
|
|
199
|
-
);
|
|
200
|
-
});
|
|
201
|
-
DropdownMenuShortcut.displayName = displayNameShortcut;
|
|
202
|
-
var DropdownMenuSub = React.forwardRef(({ ...props }, ref) => {
|
|
203
|
-
const { [displayNameSub]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
204
|
-
return /* @__PURE__ */ jsx(Component, { as: DropdownMenuPrimitive.Sub, ref, "data-slot": "dropdown-menu-sub", ...props });
|
|
205
|
-
});
|
|
206
|
-
DropdownMenuSub.displayName = displayNameSub;
|
|
207
|
-
var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => {
|
|
208
|
-
const { [displayNameSubTrigger]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
209
|
-
return /* @__PURE__ */ jsxs(
|
|
210
|
-
Component,
|
|
211
|
-
{
|
|
212
|
-
as: DropdownMenuPrimitive.SubTrigger,
|
|
213
|
-
ref,
|
|
214
|
-
"data-slot": "dropdown-menu-sub-trigger",
|
|
215
|
-
"data-inset": inset,
|
|
216
|
-
className: cn(
|
|
217
|
-
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",
|
|
218
|
-
className
|
|
219
|
-
),
|
|
220
|
-
...props,
|
|
221
|
-
children: [
|
|
222
|
-
children,
|
|
223
|
-
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
|
|
224
|
-
]
|
|
225
|
-
}
|
|
226
|
-
);
|
|
227
|
-
});
|
|
228
|
-
DropdownMenuSubTrigger.displayName = displayNameSubTrigger;
|
|
229
|
-
var DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => {
|
|
230
|
-
const { [displayNameSubContent]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
231
|
-
return /* @__PURE__ */ jsx(
|
|
232
|
-
Component,
|
|
233
|
-
{
|
|
234
|
-
as: DropdownMenuPrimitive.SubContent,
|
|
235
|
-
ref,
|
|
236
|
-
"data-slot": "dropdown-menu-sub-content",
|
|
237
|
-
className: cn(
|
|
238
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
239
|
-
className
|
|
240
|
-
),
|
|
241
|
-
...props
|
|
242
|
-
}
|
|
243
|
-
);
|
|
244
|
-
});
|
|
245
|
-
DropdownMenuSubContent.displayName = displayNameSubContent;
|
|
246
|
-
|
|
247
|
-
export {
|
|
248
|
-
DropdownMenu,
|
|
249
|
-
DropdownMenuPortal,
|
|
250
|
-
DropdownMenuTrigger,
|
|
251
|
-
DropdownMenuContent,
|
|
252
|
-
DropdownMenuGroup,
|
|
253
|
-
DropdownMenuItem,
|
|
254
|
-
DropdownMenuCheckboxItem,
|
|
255
|
-
DropdownMenuRadioGroup,
|
|
256
|
-
DropdownMenuRadioItem,
|
|
257
|
-
DropdownMenuLabel,
|
|
258
|
-
DropdownMenuSeparator,
|
|
259
|
-
DropdownMenuShortcut,
|
|
260
|
-
DropdownMenuSub,
|
|
261
|
-
DropdownMenuSubTrigger,
|
|
262
|
-
DropdownMenuSubContent
|
|
263
|
-
};
|
package/dist/dropdown-menu.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
declare const DropdownMenu: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuProps & React.RefAttributes<never>>;
|
|
4
|
-
declare const DropdownMenuPortal: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuPortalProps & React.RefAttributes<never>>;
|
|
5
|
-
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
9
|
-
inset?: boolean;
|
|
10
|
-
variant?: "default" | "destructive";
|
|
11
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
-
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
-
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
16
|
-
inset?: boolean;
|
|
17
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
declare const DropdownMenuShortcut: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
20
|
-
declare const DropdownMenuSub: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSubProps & React.RefAttributes<never>>;
|
|
21
|
-
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
22
|
-
inset?: boolean;
|
|
23
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
-
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
-
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
|
package/dist/dropdown-menu.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";var F=Object.create;var u=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty;var V=(e,o)=>{for(var n in o)u(e,n,{get:o[n],enumerable:!0})},f=(e,o,n,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let d of J(o))!Q.call(e,d)&&d!==n&&u(e,d,{get:()=>o[d],enumerable:!(i=H(o,d))||i.enumerable});return e};var l=(e,o,n)=>(n=e!=null?F(K(e)):{},f(o||!e||!e.__esModule?u(n,"default",{value:e,enumerable:!0}):n,e)),X=e=>f(u({},"__esModule",{value:!0}),e);var Y={};V(Y,{DropdownMenu:()=>z,DropdownMenuCheckboxItem:()=>T,DropdownMenuContent:()=>E,DropdownMenuGroup:()=>W,DropdownMenuItem:()=>G,DropdownMenuLabel:()=>j,DropdownMenuPortal:()=>c,DropdownMenuRadioGroup:()=>_,DropdownMenuRadioItem:()=>L,DropdownMenuSeparator:()=>O,DropdownMenuShortcut:()=>U,DropdownMenuSub:()=>q,DropdownMenuSubContent:()=>B,DropdownMenuSubTrigger:()=>A,DropdownMenuTrigger:()=>k});module.exports=X(Y);var r=l(require("@radix-ui/react-dropdown-menu")),p=require("lucide-react"),s=l(require("react")),t=require("@stackshift-ui/system"),a=require("react/jsx-runtime"),w="DropdownMenu",R="DropdownMenuPortal",v="DropdownMenuTrigger",D="DropdownMenuContent",M="DropdownMenuGroup",g="DropdownMenuItem",y="DropdownMenuCheckboxItem",P="DropdownMenuRadioGroup",b="DropdownMenuRadioItem",C="DropdownMenuLabel",h="DropdownMenuSeparator",N="DropdownMenuShortcut",x="DropdownMenuSub",I="DropdownMenuSubTrigger",S="DropdownMenuSubContent",z=s.forwardRef(({...e},o)=>{let{[w]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(n,{as:r.Root,"data-slot":"dropdown-menu",ref:o,...e})});z.displayName=w;var c=s.forwardRef(({...e},o)=>{let{[R]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(n,{as:r.Portal,"data-slot":"dropdown-menu-portal",ref:o,...e})});c.displayName=R;var k=s.forwardRef(({...e},o)=>{let{[v]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(n,{as:r.Trigger,"data-slot":"dropdown-menu-trigger",ref:o,...e})});k.displayName=v;var E=s.forwardRef(({className:e,sideOffset:o=4,...n},i)=>{let{[D]:d=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(c,{children:(0,a.jsx)(d,{as:r.Content,"data-slot":"dropdown-menu-content",sideOffset:o,className:(0,t.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),ref:i,...n})})});E.displayName=D;var W=s.forwardRef(({...e},o)=>{let{[M]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(n,{as:r.Group,"data-slot":"dropdown-menu-group",ref:o,...e})});W.displayName=M;var G=s.forwardRef(({className:e,inset:o,variant:n="default",...i},d)=>{let{[g]:m=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(m,{as:r.Item,"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":n,className:(0,t.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),ref:d,...i})});G.displayName=g;var T=s.forwardRef(({className:e,children:o,checked:n,...i},d)=>{let{[y]:m=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsxs)(m,{as:r.CheckboxItem,"data-slot":"dropdown-menu-checkbox-item",className:(0,t.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,ref:d,...i,children:[(0,a.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(r.ItemIndicator,{children:(0,a.jsx)(p.CheckIcon,{className:"size-4"})})}),o]})});T.displayName=y;var _=s.forwardRef(({...e},o)=>{let{[P]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(n,{as:r.RadioGroup,"data-slot":"dropdown-menu-radio-group",ref:o,...e})});_.displayName=P;var L=s.forwardRef(({className:e,children:o,...n},i)=>{let{[b]:d=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsxs)(d,{as:r.RadioItem,"data-slot":"dropdown-menu-radio-item",className:(0,t.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),ref:i,...n,children:[(0,a.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(r.ItemIndicator,{children:(0,a.jsx)(p.CircleIcon,{className:"size-2 fill-current"})})}),o]})});L.displayName=b;var j=s.forwardRef(({className:e,inset:o,...n},i)=>{let{[C]:d=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(d,{as:r.Label,"data-slot":"dropdown-menu-label","data-inset":o,className:(0,t.cn)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),ref:i,...n})});j.displayName=C;var O=s.forwardRef(({className:e,...o},n)=>{let{[h]:i=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(i,{as:r.Separator,ref:n,"data-slot":"dropdown-menu-separator",className:(0,t.cn)("bg-border -mx-1 my-1 h-px",e),...o})});O.displayName=h;var U=s.forwardRef(({className:e,...o},n)=>{let{[N]:i=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(i,{as:"span",ref:n,"data-slot":"dropdown-menu-shortcut",className:(0,t.cn)("text-muted-foreground ml-auto text-xs tracking-widest",e),...o})});U.displayName=N;var q=s.forwardRef(({...e},o)=>{let{[x]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(n,{as:r.Sub,ref:o,"data-slot":"dropdown-menu-sub",...e})});q.displayName=x;var A=s.forwardRef(({className:e,inset:o,children:n,...i},d)=>{let{[I]:m=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsxs)(m,{as:r.SubTrigger,ref:d,"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:(0,t.cn)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...i,children:[n,(0,a.jsx)(p.ChevronRightIcon,{className:"ml-auto size-4"})]})});A.displayName=I;var B=s.forwardRef(({className:e,...o},n)=>{let{[S]:i=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(i,{as:r.SubContent,ref:n,"data-slot":"dropdown-menu-sub-content",className:(0,t.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...o})});B.displayName=S;0&&(module.exports={DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger});
|
package/dist/dropdown-menu.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-QJPK6AEC.mjs";import"./chunk-3EYN2AKU.mjs";export{a as DropdownMenu,g as DropdownMenuCheckboxItem,d as DropdownMenuContent,e as DropdownMenuGroup,f as DropdownMenuItem,j as DropdownMenuLabel,b as DropdownMenuPortal,h as DropdownMenuRadioGroup,i as DropdownMenuRadioItem,k as DropdownMenuSeparator,l as DropdownMenuShortcut,m as DropdownMenuSub,o as DropdownMenuSubContent,n as DropdownMenuSubTrigger,c as DropdownMenuTrigger};
|
package/dist/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./dropdown-menu";
|
package/dist/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";var F=Object.create;var u=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty;var V=(e,o)=>{for(var n in o)u(e,n,{get:o[n],enumerable:!0})},f=(e,o,n,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let d of J(o))!Q.call(e,d)&&d!==n&&u(e,d,{get:()=>o[d],enumerable:!(i=H(o,d))||i.enumerable});return e};var l=(e,o,n)=>(n=e!=null?F(K(e)):{},f(o||!e||!e.__esModule?u(n,"default",{value:e,enumerable:!0}):n,e)),X=e=>f(u({},"__esModule",{value:!0}),e);var Y={};V(Y,{DropdownMenu:()=>z,DropdownMenuCheckboxItem:()=>T,DropdownMenuContent:()=>E,DropdownMenuGroup:()=>W,DropdownMenuItem:()=>G,DropdownMenuLabel:()=>j,DropdownMenuPortal:()=>c,DropdownMenuRadioGroup:()=>_,DropdownMenuRadioItem:()=>L,DropdownMenuSeparator:()=>O,DropdownMenuShortcut:()=>U,DropdownMenuSub:()=>q,DropdownMenuSubContent:()=>B,DropdownMenuSubTrigger:()=>A,DropdownMenuTrigger:()=>k});module.exports=X(Y);var r=l(require("@radix-ui/react-dropdown-menu")),p=require("lucide-react"),s=l(require("react")),t=require("@stackshift-ui/system"),a=require("react/jsx-runtime"),w="DropdownMenu",R="DropdownMenuPortal",v="DropdownMenuTrigger",D="DropdownMenuContent",M="DropdownMenuGroup",g="DropdownMenuItem",y="DropdownMenuCheckboxItem",P="DropdownMenuRadioGroup",b="DropdownMenuRadioItem",C="DropdownMenuLabel",h="DropdownMenuSeparator",x="DropdownMenuShortcut",N="DropdownMenuSub",I="DropdownMenuSubTrigger",S="DropdownMenuSubContent",z=s.forwardRef(({...e},o)=>{let{[w]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(n,{as:r.Root,"data-slot":"dropdown-menu",ref:o,...e})});z.displayName=w;var c=s.forwardRef(({...e},o)=>{let{[R]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(n,{as:r.Portal,"data-slot":"dropdown-menu-portal",ref:o,...e})});c.displayName=R;var k=s.forwardRef(({...e},o)=>{let{[v]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(n,{as:r.Trigger,"data-slot":"dropdown-menu-trigger",ref:o,...e})});k.displayName=v;var E=s.forwardRef(({className:e,sideOffset:o=4,...n},i)=>{let{[D]:d=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(c,{children:(0,a.jsx)(d,{as:r.Content,"data-slot":"dropdown-menu-content",sideOffset:o,className:(0,t.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),ref:i,...n})})});E.displayName=D;var W=s.forwardRef(({...e},o)=>{let{[M]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(n,{as:r.Group,"data-slot":"dropdown-menu-group",ref:o,...e})});W.displayName=M;var G=s.forwardRef(({className:e,inset:o,variant:n="default",...i},d)=>{let{[g]:m=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(m,{as:r.Item,"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":n,className:(0,t.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),ref:d,...i})});G.displayName=g;var T=s.forwardRef(({className:e,children:o,checked:n,...i},d)=>{let{[y]:m=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsxs)(m,{as:r.CheckboxItem,"data-slot":"dropdown-menu-checkbox-item",className:(0,t.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,ref:d,...i,children:[(0,a.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(r.ItemIndicator,{children:(0,a.jsx)(p.CheckIcon,{className:"size-4"})})}),o]})});T.displayName=y;var _=s.forwardRef(({...e},o)=>{let{[P]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(n,{as:r.RadioGroup,"data-slot":"dropdown-menu-radio-group",ref:o,...e})});_.displayName=P;var L=s.forwardRef(({className:e,children:o,...n},i)=>{let{[b]:d=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsxs)(d,{as:r.RadioItem,"data-slot":"dropdown-menu-radio-item",className:(0,t.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),ref:i,...n,children:[(0,a.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(r.ItemIndicator,{children:(0,a.jsx)(p.CircleIcon,{className:"size-2 fill-current"})})}),o]})});L.displayName=b;var j=s.forwardRef(({className:e,inset:o,...n},i)=>{let{[C]:d=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(d,{as:r.Label,"data-slot":"dropdown-menu-label","data-inset":o,className:(0,t.cn)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),ref:i,...n})});j.displayName=C;var O=s.forwardRef(({className:e,...o},n)=>{let{[h]:i=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(i,{as:r.Separator,ref:n,"data-slot":"dropdown-menu-separator",className:(0,t.cn)("bg-border -mx-1 my-1 h-px",e),...o})});O.displayName=h;var U=s.forwardRef(({className:e,...o},n)=>{let{[x]:i=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(i,{as:"span",ref:n,"data-slot":"dropdown-menu-shortcut",className:(0,t.cn)("text-muted-foreground ml-auto text-xs tracking-widest",e),...o})});U.displayName=x;var q=s.forwardRef(({...e},o)=>{let{[N]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(n,{as:r.Sub,ref:o,"data-slot":"dropdown-menu-sub",...e})});q.displayName=N;var A=s.forwardRef(({className:e,inset:o,children:n,...i},d)=>{let{[I]:m=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsxs)(m,{as:r.SubTrigger,ref:d,"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:(0,t.cn)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...i,children:[n,(0,a.jsx)(p.ChevronRightIcon,{className:"ml-auto size-4"})]})});A.displayName=I;var B=s.forwardRef(({className:e,...o},n)=>{let{[S]:i=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,a.jsx)(i,{as:r.SubContent,ref:n,"data-slot":"dropdown-menu-sub-content",className:(0,t.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...o})});B.displayName=S;0&&(module.exports={DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger});
|
package/dist/index.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";import{a as e,b as o,c as r,d as t,e as c,f,g as i,h as l,i as m,j as n,k as p,l as s,m as u,n as x,o as a}from"./chunk-QJPK6AEC.mjs";import"./chunk-3EYN2AKU.mjs";export{e as DropdownMenu,i as DropdownMenuCheckboxItem,t as DropdownMenuContent,c as DropdownMenuGroup,f as DropdownMenuItem,n as DropdownMenuLabel,o as DropdownMenuPortal,l as DropdownMenuRadioGroup,m as DropdownMenuRadioItem,p as DropdownMenuSeparator,s as DropdownMenuShortcut,u as DropdownMenuSub,a as DropdownMenuSubContent,x as DropdownMenuSubTrigger,r as DropdownMenuTrigger};
|
package/dist/setupTests.d.ts
DELETED