dgz-ui 1.4.13 → 1.4.15
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/calendar/index.cjs.js +1 -1
- package/dist/calendar/index.es.js +1 -1
- package/dist/chunks/check-B6UTraXT.cjs.js +7 -0
- package/dist/chunks/check-B6UTraXT.cjs.js.map +1 -0
- package/dist/chunks/check-DFKaRaBZ.es.js +12 -0
- package/dist/chunks/check-DFKaRaBZ.es.js.map +1 -0
- package/dist/chunks/circle--GxygOe5.es.js +12 -0
- package/dist/chunks/circle--GxygOe5.es.js.map +1 -0
- package/dist/chunks/circle-DjcntFbc.cjs.js +7 -0
- package/dist/chunks/circle-DjcntFbc.cjs.js.map +1 -0
- package/dist/chunks/dropdown-menu-Bu9wADja.cjs.js +2 -0
- package/dist/chunks/{dropdown-menu-D52NH0Di.cjs.js.map → dropdown-menu-Bu9wADja.cjs.js.map} +1 -1
- package/dist/chunks/{dropdown-menu-BUaCITEG.es.js → dropdown-menu-CcnxQ7Zj.es.js} +10 -9
- package/dist/chunks/{dropdown-menu-BUaCITEG.es.js.map → dropdown-menu-CcnxQ7Zj.es.js.map} +1 -1
- package/dist/chunks/select-BTgKkicD.es.js +1404 -0
- package/dist/chunks/select-BTgKkicD.es.js.map +1 -0
- package/dist/chunks/select-D703Xctn.cjs.js +7 -0
- package/dist/chunks/select-D703Xctn.cjs.js.map +1 -0
- package/dist/chunks/textarea-4zXXFdLZ.cjs.js +187 -0
- package/dist/chunks/textarea-4zXXFdLZ.cjs.js.map +1 -0
- package/dist/chunks/textarea-CBSWNU0D.es.js +17234 -0
- package/dist/chunks/textarea-CBSWNU0D.es.js.map +1 -0
- package/dist/chunks/{timepicker-Ca0gLbqn.es.js → timepicker-CVkum2UK.es.js} +747 -738
- package/dist/chunks/{timepicker-Ca0gLbqn.es.js.map → timepicker-CVkum2UK.es.js.map} +1 -1
- package/dist/chunks/{timepicker-CuuVE0le.cjs.js → timepicker-nlKbDl_W.cjs.js} +3 -3
- package/dist/chunks/{timepicker-CuuVE0le.cjs.js.map → timepicker-nlKbDl_W.cjs.js.map} +1 -1
- package/dist/dropdown/index.cjs.js +1 -1
- package/dist/dropdown/index.es.js +1 -1
- package/dist/form/index.cjs.js +1 -1
- package/dist/form/index.es.js +22 -22
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +50 -50
- package/dist/styles.css +1 -1
- package/dist/types/App.d.ts.map +1 -1
- package/dist/types/stories/RadioGroup.stories.d.ts +2 -1
- package/dist/types/stories/RadioGroup.stories.d.ts.map +1 -1
- package/dist/types/ui/calendar/timepicker.d.ts.map +1 -1
- package/dist/types/ui/form/radio-group.d.ts +8 -2
- package/dist/types/ui/form/radio-group.d.ts.map +1 -1
- package/dist/types/ui/form/select.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/circle-BOF8KzMM.es.js +0 -20
- package/dist/chunks/circle-BOF8KzMM.es.js.map +0 -1
- package/dist/chunks/circle-CKMW6wiB.cjs.js +0 -12
- package/dist/chunks/circle-CKMW6wiB.cjs.js.map +0 -1
- package/dist/chunks/dropdown-menu-D52NH0Di.cjs.js +0 -2
- package/dist/chunks/react-select-BDoLUa8t.es.js +0 -4176
- package/dist/chunks/react-select-BDoLUa8t.es.js.map +0 -1
- package/dist/chunks/react-select-DvBVNVXL.cjs.js +0 -21
- package/dist/chunks/react-select-DvBVNVXL.cjs.js.map +0 -1
- package/dist/chunks/textarea-BnUWlaPx.es.js +0 -14440
- package/dist/chunks/textarea-BnUWlaPx.es.js.map +0 -1
- package/dist/chunks/textarea-EPWY09og.cjs.js +0 -173
- package/dist/chunks/textarea-EPWY09og.cjs.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/timepicker-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/timepicker-nlKbDl_W.cjs.js");exports.Calendar=e.Calendar;exports.DATE=e.DATE;exports.DatePicker=e.DatePicker;exports.HOUR=e.HOUR;exports.MINUTE=e.MINUTE;exports.TIME=e.TIME;exports.TimePicker=e.TimePicker;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";const c=require("./createLucideIcon-HtK0p34L.cjs.js");/**
|
|
2
|
+
* @license lucide-react v0.563.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],t=c.createLucideIcon("check",e);exports.Check=t;
|
|
7
|
+
//# sourceMappingURL=check-B6UTraXT.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-B6UTraXT.cjs.js","sources":["../../node_modules/lucide-react/dist/esm/icons/check.js"],"sourcesContent":["/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"M20 6 9 17l-5-5\", key: \"1gmf2c\" }]];\nconst Check = createLucideIcon(\"check\", __iconNode);\n\nexport { __iconNode, Check as default };\n//# sourceMappingURL=check.js.map\n"],"names":["__iconNode","Check","createLucideIcon"],"mappings":"mEAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMA,EAAa,CAAC,CAAC,OAAQ,CAAE,EAAG,kBAAmB,IAAK,QAAQ,CAAE,CAAC,EAC/DC,EAAQC,EAAAA,iBAAiB,QAASF,CAAU","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { c } from "./createLucideIcon-CyFYF6Ug.es.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.563.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const e = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], t = c("check", e);
|
|
9
|
+
export {
|
|
10
|
+
t as C
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=check-DFKaRaBZ.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-DFKaRaBZ.es.js","sources":["../../node_modules/lucide-react/dist/esm/icons/check.js"],"sourcesContent":["/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"M20 6 9 17l-5-5\", key: \"1gmf2c\" }]];\nconst Check = createLucideIcon(\"check\", __iconNode);\n\nexport { __iconNode, Check as default };\n//# sourceMappingURL=check.js.map\n"],"names":["__iconNode","Check","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAG,mBAAmB,KAAK,SAAQ,CAAE,CAAC,GAC/DC,IAAQC,EAAiB,SAASF,CAAU;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { c } from "./createLucideIcon-CyFYF6Ug.es.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.563.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const e = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], r = c("circle", e);
|
|
9
|
+
export {
|
|
10
|
+
r as C
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=circle--GxygOe5.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circle--GxygOe5.es.js","sources":["../../node_modules/lucide-react/dist/esm/icons/circle.js"],"sourcesContent":["/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }]];\nconst Circle = createLucideIcon(\"circle\", __iconNode);\n\nexport { __iconNode, Circle as default };\n//# sourceMappingURL=circle.js.map\n"],"names":["__iconNode","Circle","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,MAAM,KAAK,SAAQ,CAAE,CAAC,GACxEC,IAASC,EAAiB,UAAUF,CAAU;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";const c=require("./createLucideIcon-HtK0p34L.cjs.js");/**
|
|
2
|
+
* @license lucide-react v0.563.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],r=c.createLucideIcon("circle",e);exports.Circle=r;
|
|
7
|
+
//# sourceMappingURL=circle-DjcntFbc.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circle-DjcntFbc.cjs.js","sources":["../../node_modules/lucide-react/dist/esm/icons/circle.js"],"sourcesContent":["/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }]];\nconst Circle = createLucideIcon(\"circle\", __iconNode);\n\nexport { __iconNode, Circle as default };\n//# sourceMappingURL=circle.js.map\n"],"names":["__iconNode","Circle","createLucideIcon"],"mappings":"mEAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMA,EAAa,CAAC,CAAC,SAAU,CAAE,GAAI,KAAM,GAAI,KAAM,EAAG,KAAM,IAAK,QAAQ,CAAE,CAAC,EACxEC,EAASC,EAAAA,iBAAiB,SAAUF,CAAU","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),An=require("react"),m=require("./index-D9zW9Tk7.cjs.js"),D=require("./index-jFOWwfD3.cjs.js"),O=require("./index-BruMW80s.cjs.js"),kn=require("./index-pF_O2Ico.cjs.js"),Ln=require("./index-DnRKXUWD.cjs.js"),Gn=require("./index-CItoM52t.cjs.js"),G=require("./index-DG15yxNP.cjs.js"),P=require("./index-CGLGXpw0.cjs.js"),Z=require("./index-DGEvZwN5.cjs.js"),ae=require("./index-CN4RxFxN.cjs.js"),b=require("./utils-C4d7Ql9-.cjs.js"),Fn=require("./check-B6UTraXT.cjs.js"),$n=require("./circle-DjcntFbc.cjs.js"),Kn=require("./chevron-right-BxyusM7v.cjs.js");function Hn(e){if(e&&e.__esModule)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,t.get?t:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const a=Hn(An);function Un(e){const o=Bn(e),n=a.forwardRef((t,r)=>{const{children:c,...u}=t,d=a.Children.toArray(c),f=d.find(qn);if(f){const g=f.props.children,l=d.map(i=>i===f?a.Children.count(g)>1?a.Children.only(null):a.isValidElement(g)?g.props.children:null:i);return s.jsx(o,{...u,ref:r,children:a.isValidElement(g)?a.cloneElement(g,void 0,l):null})}return s.jsx(o,{...u,ref:r,children:c})});return n.displayName=`${e}.Slot`,n}function Bn(e){const o=a.forwardRef((n,t)=>{const{children:r,...c}=n;if(a.isValidElement(r)){const u=Wn(r),d=zn(c,r.props);return r.type!==a.Fragment&&(d.ref=t?D.composeRefs(t,u):u),a.cloneElement(r,d)}return a.Children.count(r)>1?a.Children.only(null):null});return o.displayName=`${e}.SlotClone`,o}var Vn=Symbol("radix.slottable");function qn(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vn}function zn(e,o){const n={...o};for(const t in o){const r=e[t],c=o[t];/^on[A-Z]/.test(t)?r&&c?n[t]=(...d)=>{const f=c(...d);return r(...d),f}:r&&(n[t]=r):t==="style"?n[t]={...r,...c}:t==="className"&&(n[t]=[r,c].filter(Boolean).join(" "))}return{...e,...n}}function Wn(e){var t,r;let o=(t=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:t.get,n=o&&"isReactWarning"in o&&o.isReactWarning;return n?e.ref:(o=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=o&&"isReactWarning"in o&&o.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var re=["Enter"," "],Xn=["ArrowDown","PageUp","Home"],Ce=["ArrowUp","PageDown","End"],Yn=[...Xn,...Ce],Zn={ltr:[...re,"ArrowRight"],rtl:[...re,"ArrowLeft"]},Jn={ltr:["ArrowLeft"],rtl:["ArrowRight"]},K="Menu",[F,Qn,eo]=kn.createCollection(K),[I,_e]=m.createContextScope(K,[eo,P.createPopperScope,Z.createRovingFocusGroupScope]),H=P.createPopperScope(),Re=Z.createRovingFocusGroupScope(),[be,E]=I(K),[no,U]=I(K),ye=e=>{const{__scopeMenu:o,open:n=!1,children:t,dir:r,onOpenChange:c,modal:u=!0}=e,d=H(o),[f,g]=a.useState(null),l=a.useRef(!1),i=ae.useCallbackRef(c),v=Ln.useDirection(r);return a.useEffect(()=>{const w=()=>{l.current=!0,document.addEventListener("pointerdown",M,{capture:!0,once:!0}),document.addEventListener("pointermove",M,{capture:!0,once:!0})},M=()=>l.current=!1;return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",M,{capture:!0}),document.removeEventListener("pointermove",M,{capture:!0})}},[]),s.jsx(P.Root2,{...d,children:s.jsx(be,{scope:o,open:n,onOpenChange:i,content:f,onContentChange:g,children:s.jsx(no,{scope:o,onClose:a.useCallback(()=>i(!1),[i]),isUsingKeyboardRef:l,dir:v,modal:u,children:t})})})};ye.displayName=K;var oo="MenuAnchor",se=a.forwardRef((e,o)=>{const{__scopeMenu:n,...t}=e,r=H(n);return s.jsx(P.Anchor,{...r,...t,ref:o})});se.displayName=oo;var ce="MenuPortal",[to,De]=I(ce,{forceMount:void 0}),Ee=e=>{const{__scopeMenu:o,forceMount:n,children:t,container:r}=e,c=E(ce,o);return s.jsx(to,{scope:o,forceMount:n,children:s.jsx(m.Presence,{present:n||c.open,children:s.jsx(G.Portal,{asChild:!0,container:r,children:t})})})};Ee.displayName=ce;var C="MenuContent",[ro,ie]=I(C),Se=a.forwardRef((e,o)=>{const n=De(C,e.__scopeMenu),{forceMount:t=n.forceMount,...r}=e,c=E(C,e.__scopeMenu),u=U(C,e.__scopeMenu);return s.jsx(F.Provider,{scope:e.__scopeMenu,children:s.jsx(m.Presence,{present:t||c.open,children:s.jsx(F.Slot,{scope:e.__scopeMenu,children:u.modal?s.jsx(ao,{...r,ref:o}):s.jsx(so,{...r,ref:o})})})})}),ao=a.forwardRef((e,o)=>{const n=E(C,e.__scopeMenu),t=a.useRef(null),r=D.useComposedRefs(o,t);return a.useEffect(()=>{const c=t.current;if(c)return G.hideOthers(c)},[]),s.jsx(ue,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:m.composeEventHandlers(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),so=a.forwardRef((e,o)=>{const n=E(C,e.__scopeMenu);return s.jsx(ue,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),co=Un("MenuContent.ScrollLock"),ue=a.forwardRef((e,o)=>{const{__scopeMenu:n,loop:t=!1,trapFocus:r,onOpenAutoFocus:c,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:g,onPointerDownOutside:l,onFocusOutside:i,onInteractOutside:v,onDismiss:w,disableOutsideScroll:M,...S}=e,N=E(C,n),A=U(C,n),B=H(n),V=Re(n),me=Qn(n),[Pn,ve]=a.useState(null),q=a.useRef(null),In=D.useComposedRefs(o,q,N.onContentChange),z=a.useRef(0),W=a.useRef(""),Nn=a.useRef(0),ee=a.useRef(null),ge=a.useRef("right"),ne=a.useRef(0),jn=M?G.ReactRemoveScroll:a.Fragment,Tn=M?{as:co,allowPinchZoom:!0}:void 0,On=p=>{var T,we;const x=W.current+p,_=me().filter(R=>!R.disabled),y=document.activeElement,oe=(T=_.find(R=>R.ref.current===y))==null?void 0:T.textValue,te=_.map(R=>R.textValue),Me=xo(te,x,oe),k=(we=_.find(R=>R.textValue===Me))==null?void 0:we.ref.current;(function R(he){W.current=he,window.clearTimeout(z.current),he!==""&&(z.current=window.setTimeout(()=>R(""),1e3))})(x),k&&setTimeout(()=>k.focus())};a.useEffect(()=>()=>window.clearTimeout(z.current),[]),G.useFocusGuards();const j=a.useCallback(p=>{var _,y;return ge.current===((_=ee.current)==null?void 0:_.side)&&_o(p,(y=ee.current)==null?void 0:y.area)},[]);return s.jsx(ro,{scope:n,searchRef:W,onItemEnter:a.useCallback(p=>{j(p)&&p.preventDefault()},[j]),onItemLeave:a.useCallback(p=>{var x;j(p)||((x=q.current)==null||x.focus(),ve(null))},[j]),onTriggerLeave:a.useCallback(p=>{j(p)&&p.preventDefault()},[j]),pointerGraceTimerRef:Nn,onPointerGraceIntentChange:a.useCallback(p=>{ee.current=p},[]),children:s.jsx(jn,{...Tn,children:s.jsx(G.FocusScope,{asChild:!0,trapped:r,onMountAutoFocus:m.composeEventHandlers(c,p=>{var x;p.preventDefault(),(x=q.current)==null||x.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:s.jsx(Gn.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:g,onPointerDownOutside:l,onFocusOutside:i,onInteractOutside:v,onDismiss:w,children:s.jsx(Z.Root,{asChild:!0,...V,dir:A.dir,orientation:"vertical",loop:t,currentTabStopId:Pn,onCurrentTabStopIdChange:ve,onEntryFocus:m.composeEventHandlers(f,p=>{A.isUsingKeyboardRef.current||p.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(P.Content,{role:"menu","aria-orientation":"vertical","data-state":Ve(N.open),"data-radix-menu-content":"",dir:A.dir,...B,...S,ref:In,style:{outline:"none",...S.style},onKeyDown:m.composeEventHandlers(S.onKeyDown,p=>{const _=p.target.closest("[data-radix-menu-content]")===p.currentTarget,y=p.ctrlKey||p.altKey||p.metaKey,oe=p.key.length===1;_&&(p.key==="Tab"&&p.preventDefault(),!y&&oe&&On(p.key));const te=q.current;if(p.target!==te||!Yn.includes(p.key))return;p.preventDefault();const k=me().filter(T=>!T.disabled).map(T=>T.ref.current);Ce.includes(p.key)&&k.reverse(),wo(k)}),onBlur:m.composeEventHandlers(e.onBlur,p=>{p.currentTarget.contains(p.target)||(window.clearTimeout(z.current),W.current="")}),onPointerMove:m.composeEventHandlers(e.onPointerMove,$(p=>{const x=p.target,_=ne.current!==p.clientX;if(p.currentTarget.contains(x)&&_){const y=p.clientX>ne.current?"right":"left";ge.current=y,ne.current=p.clientX}}))})})})})})})});Se.displayName=C;var io="MenuGroup",de=a.forwardRef((e,o)=>{const{__scopeMenu:n,...t}=e;return s.jsx(m.Primitive.div,{role:"group",...t,ref:o})});de.displayName=io;var uo="MenuLabel",Pe=a.forwardRef((e,o)=>{const{__scopeMenu:n,...t}=e;return s.jsx(m.Primitive.div,{...t,ref:o})});Pe.displayName=uo;var X="MenuItem",xe="menu.itemSelect",J=a.forwardRef((e,o)=>{const{disabled:n=!1,onSelect:t,...r}=e,c=a.useRef(null),u=U(X,e.__scopeMenu),d=ie(X,e.__scopeMenu),f=D.useComposedRefs(o,c),g=a.useRef(!1),l=()=>{const i=c.current;if(!n&&i){const v=new CustomEvent(xe,{bubbles:!0,cancelable:!0});i.addEventListener(xe,w=>t==null?void 0:t(w),{once:!0}),m.dispatchDiscreteCustomEvent(i,v),v.defaultPrevented?g.current=!1:u.onClose()}};return s.jsx(Ie,{...r,ref:f,disabled:n,onClick:m.composeEventHandlers(e.onClick,l),onPointerDown:i=>{var v;(v=e.onPointerDown)==null||v.call(e,i),g.current=!0},onPointerUp:m.composeEventHandlers(e.onPointerUp,i=>{var v;g.current||(v=i.currentTarget)==null||v.click()}),onKeyDown:m.composeEventHandlers(e.onKeyDown,i=>{const v=d.searchRef.current!=="";n||v&&i.key===" "||re.includes(i.key)&&(i.currentTarget.click(),i.preventDefault())})})});J.displayName=X;var Ie=a.forwardRef((e,o)=>{const{__scopeMenu:n,disabled:t=!1,textValue:r,...c}=e,u=ie(X,n),d=Re(n),f=a.useRef(null),g=D.useComposedRefs(o,f),[l,i]=a.useState(!1),[v,w]=a.useState("");return a.useEffect(()=>{const M=f.current;M&&w((M.textContent??"").trim())},[c.children]),s.jsx(F.ItemSlot,{scope:n,disabled:t,textValue:r??v,children:s.jsx(Z.Item,{asChild:!0,...d,focusable:!t,children:s.jsx(m.Primitive.div,{role:"menuitem","data-highlighted":l?"":void 0,"aria-disabled":t||void 0,"data-disabled":t?"":void 0,...c,ref:g,onPointerMove:m.composeEventHandlers(e.onPointerMove,$(M=>{t?u.onItemLeave(M):(u.onItemEnter(M),M.defaultPrevented||M.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:m.composeEventHandlers(e.onPointerLeave,$(M=>u.onItemLeave(M))),onFocus:m.composeEventHandlers(e.onFocus,()=>i(!0)),onBlur:m.composeEventHandlers(e.onBlur,()=>i(!1))})})})}),lo="MenuCheckboxItem",Ne=a.forwardRef((e,o)=>{const{checked:n=!1,onCheckedChange:t,...r}=e;return s.jsx(ke,{scope:e.__scopeMenu,checked:n,children:s.jsx(J,{role:"menuitemcheckbox","aria-checked":Y(n)?"mixed":n,...r,ref:o,"data-state":fe(n),onSelect:m.composeEventHandlers(r.onSelect,()=>t==null?void 0:t(Y(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ne.displayName=lo;var je="MenuRadioGroup",[po,fo]=I(je,{value:void 0,onValueChange:()=>{}}),Te=a.forwardRef((e,o)=>{const{value:n,onValueChange:t,...r}=e,c=ae.useCallbackRef(t);return s.jsx(po,{scope:e.__scopeMenu,value:n,onValueChange:c,children:s.jsx(de,{...r,ref:o})})});Te.displayName=je;var Oe="MenuRadioItem",Ae=a.forwardRef((e,o)=>{const{value:n,...t}=e,r=fo(Oe,e.__scopeMenu),c=n===r.value;return s.jsx(ke,{scope:e.__scopeMenu,checked:c,children:s.jsx(J,{role:"menuitemradio","aria-checked":c,...t,ref:o,"data-state":fe(c),onSelect:m.composeEventHandlers(t.onSelect,()=>{var u;return(u=r.onValueChange)==null?void 0:u.call(r,n)},{checkForDefaultPrevented:!1})})})});Ae.displayName=Oe;var le="MenuItemIndicator",[ke,mo]=I(le,{checked:!1}),Le=a.forwardRef((e,o)=>{const{__scopeMenu:n,forceMount:t,...r}=e,c=mo(le,n);return s.jsx(m.Presence,{present:t||Y(c.checked)||c.checked===!0,children:s.jsx(m.Primitive.span,{...r,ref:o,"data-state":fe(c.checked)})})});Le.displayName=le;var vo="MenuSeparator",Ge=a.forwardRef((e,o)=>{const{__scopeMenu:n,...t}=e;return s.jsx(m.Primitive.div,{role:"separator","aria-orientation":"horizontal",...t,ref:o})});Ge.displayName=vo;var go="MenuArrow",Fe=a.forwardRef((e,o)=>{const{__scopeMenu:n,...t}=e,r=H(n);return s.jsx(P.Arrow,{...r,...t,ref:o})});Fe.displayName=go;var pe="MenuSub",[Mo,$e]=I(pe),Ke=e=>{const{__scopeMenu:o,children:n,open:t=!1,onOpenChange:r}=e,c=E(pe,o),u=H(o),[d,f]=a.useState(null),[g,l]=a.useState(null),i=ae.useCallbackRef(r);return a.useEffect(()=>(c.open===!1&&i(!1),()=>i(!1)),[c.open,i]),s.jsx(P.Root2,{...u,children:s.jsx(be,{scope:o,open:t,onOpenChange:i,content:g,onContentChange:l,children:s.jsx(Mo,{scope:o,contentId:O.useId(),triggerId:O.useId(),trigger:d,onTriggerChange:f,children:n})})})};Ke.displayName=pe;var L="MenuSubTrigger",He=a.forwardRef((e,o)=>{const n=E(L,e.__scopeMenu),t=U(L,e.__scopeMenu),r=$e(L,e.__scopeMenu),c=ie(L,e.__scopeMenu),u=a.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=c,g={__scopeMenu:e.__scopeMenu},l=a.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return a.useEffect(()=>l,[l]),a.useEffect(()=>{const i=d.current;return()=>{window.clearTimeout(i),f(null)}},[d,f]),s.jsx(se,{asChild:!0,...g,children:s.jsx(Ie,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Ve(n.open),...e,ref:D.composeRefs(o,r.onTriggerChange),onClick:i=>{var v;(v=e.onClick)==null||v.call(e,i),!(e.disabled||i.defaultPrevented)&&(i.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:m.composeEventHandlers(e.onPointerMove,$(i=>{c.onItemEnter(i),!i.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(c.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),l()},100))})),onPointerLeave:m.composeEventHandlers(e.onPointerLeave,$(i=>{var w,M;l();const v=(w=n.content)==null?void 0:w.getBoundingClientRect();if(v){const S=(M=n.content)==null?void 0:M.dataset.side,N=S==="right",A=N?-5:5,B=v[N?"left":"right"],V=v[N?"right":"left"];c.onPointerGraceIntentChange({area:[{x:i.clientX+A,y:i.clientY},{x:B,y:v.top},{x:V,y:v.top},{x:V,y:v.bottom},{x:B,y:v.bottom}],side:S}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(i),i.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:m.composeEventHandlers(e.onKeyDown,i=>{var w;const v=c.searchRef.current!=="";e.disabled||v&&i.key===" "||Zn[t.dir].includes(i.key)&&(n.onOpenChange(!0),(w=n.content)==null||w.focus(),i.preventDefault())})})})});He.displayName=L;var Ue="MenuSubContent",Be=a.forwardRef((e,o)=>{const n=De(C,e.__scopeMenu),{forceMount:t=n.forceMount,...r}=e,c=E(C,e.__scopeMenu),u=U(C,e.__scopeMenu),d=$e(Ue,e.__scopeMenu),f=a.useRef(null),g=D.useComposedRefs(o,f);return s.jsx(F.Provider,{scope:e.__scopeMenu,children:s.jsx(m.Presence,{present:t||c.open,children:s.jsx(F.Slot,{scope:e.__scopeMenu,children:s.jsx(ue,{id:d.contentId,"aria-labelledby":d.triggerId,...r,ref:g,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:l=>{var i;u.isUsingKeyboardRef.current&&((i=f.current)==null||i.focus()),l.preventDefault()},onCloseAutoFocus:l=>l.preventDefault(),onFocusOutside:m.composeEventHandlers(e.onFocusOutside,l=>{l.target!==d.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:m.composeEventHandlers(e.onEscapeKeyDown,l=>{u.onClose(),l.preventDefault()}),onKeyDown:m.composeEventHandlers(e.onKeyDown,l=>{var w;const i=l.currentTarget.contains(l.target),v=Jn[u.dir].includes(l.key);i&&v&&(c.onOpenChange(!1),(w=d.trigger)==null||w.focus(),l.preventDefault())})})})})})});Be.displayName=Ue;function Ve(e){return e?"open":"closed"}function Y(e){return e==="indeterminate"}function fe(e){return Y(e)?"indeterminate":e?"checked":"unchecked"}function wo(e){const o=document.activeElement;for(const n of e)if(n===o||(n.focus(),document.activeElement!==o))return}function ho(e,o){return e.map((n,t)=>e[(o+t)%e.length])}function xo(e,o,n){const r=o.length>1&&Array.from(o).every(g=>g===o[0])?o[0]:o,c=n?e.indexOf(n):-1;let u=ho(e,Math.max(c,0));r.length===1&&(u=u.filter(g=>g!==n));const f=u.find(g=>g.toLowerCase().startsWith(r.toLowerCase()));return f!==n?f:void 0}function Co(e,o){const{x:n,y:t}=e;let r=!1;for(let c=0,u=o.length-1;c<o.length;u=c++){const d=o[c],f=o[u],g=d.x,l=d.y,i=f.x,v=f.y;l>t!=v>t&&n<(i-g)*(t-l)/(v-l)+g&&(r=!r)}return r}function _o(e,o){if(!o)return!1;const n={x:e.clientX,y:e.clientY};return Co(n,o)}function $(e){return o=>o.pointerType==="mouse"?e(o):void 0}var Ro=ye,bo=se,yo=Ee,Do=Se,Eo=de,So=Pe,Po=J,Io=Ne,No=Te,jo=Ae,To=Le,Oo=Ge,Ao=Fe,ko=Ke,Lo=He,Go=Be,Q="DropdownMenu",[Fo]=m.createContextScope(Q,[_e]),h=_e(),[$o,qe]=Fo(Q),ze=e=>{const{__scopeDropdownMenu:o,children:n,dir:t,open:r,defaultOpen:c,onOpenChange:u,modal:d=!0}=e,f=h(o),g=a.useRef(null),[l,i]=O.useControllableState({prop:r,defaultProp:c??!1,onChange:u,caller:Q});return s.jsx($o,{scope:o,triggerId:O.useId(),triggerRef:g,contentId:O.useId(),open:l,onOpenChange:i,onOpenToggle:a.useCallback(()=>i(v=>!v),[i]),modal:d,children:s.jsx(Ro,{...f,open:l,onOpenChange:i,dir:t,modal:d,children:n})})};ze.displayName=Q;var We="DropdownMenuTrigger",Xe=a.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,disabled:t=!1,...r}=e,c=qe(We,n),u=h(n);return s.jsx(bo,{asChild:!0,...u,children:s.jsx(m.Primitive.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":t?"":void 0,disabled:t,...r,ref:D.composeRefs(o,c.triggerRef),onPointerDown:m.composeEventHandlers(e.onPointerDown,d=>{!t&&d.button===0&&d.ctrlKey===!1&&(c.onOpenToggle(),c.open||d.preventDefault())}),onKeyDown:m.composeEventHandlers(e.onKeyDown,d=>{t||(["Enter"," "].includes(d.key)&&c.onOpenToggle(),d.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});Xe.displayName=We;var Ko="DropdownMenuPortal",Ye=e=>{const{__scopeDropdownMenu:o,...n}=e,t=h(o);return s.jsx(yo,{...t,...n})};Ye.displayName=Ko;var Ze="DropdownMenuContent",Je=a.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=qe(Ze,n),c=h(n),u=a.useRef(!1);return s.jsx(Do,{id:r.contentId,"aria-labelledby":r.triggerId,...c,...t,ref:o,onCloseAutoFocus:m.composeEventHandlers(e.onCloseAutoFocus,d=>{var f;u.current||(f=r.triggerRef.current)==null||f.focus(),u.current=!1,d.preventDefault()}),onInteractOutside:m.composeEventHandlers(e.onInteractOutside,d=>{const f=d.detail.originalEvent,g=f.button===0&&f.ctrlKey===!0,l=f.button===2||g;(!r.modal||l)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Je.displayName=Ze;var Ho="DropdownMenuGroup",Qe=a.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=h(n);return s.jsx(Eo,{...r,...t,ref:o})});Qe.displayName=Ho;var Uo="DropdownMenuLabel",en=a.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=h(n);return s.jsx(So,{...r,...t,ref:o})});en.displayName=Uo;var Bo="DropdownMenuItem",nn=a.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=h(n);return s.jsx(Po,{...r,...t,ref:o})});nn.displayName=Bo;var Vo="DropdownMenuCheckboxItem",on=a.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=h(n);return s.jsx(Io,{...r,...t,ref:o})});on.displayName=Vo;var qo="DropdownMenuRadioGroup",tn=a.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=h(n);return s.jsx(No,{...r,...t,ref:o})});tn.displayName=qo;var zo="DropdownMenuRadioItem",rn=a.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=h(n);return s.jsx(jo,{...r,...t,ref:o})});rn.displayName=zo;var Wo="DropdownMenuItemIndicator",an=a.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=h(n);return s.jsx(To,{...r,...t,ref:o})});an.displayName=Wo;var Xo="DropdownMenuSeparator",sn=a.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=h(n);return s.jsx(Oo,{...r,...t,ref:o})});sn.displayName=Xo;var Yo="DropdownMenuArrow",Zo=a.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=h(n);return s.jsx(Ao,{...r,...t,ref:o})});Zo.displayName=Yo;var Jo=e=>{const{__scopeDropdownMenu:o,children:n,open:t,onOpenChange:r,defaultOpen:c}=e,u=h(o),[d,f]=O.useControllableState({prop:t,defaultProp:c??!1,onChange:r,caller:"DropdownMenuSub"});return s.jsx(ko,{...u,open:d,onOpenChange:f,children:n})},Qo="DropdownMenuSubTrigger",cn=a.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=h(n);return s.jsx(Lo,{...r,...t,ref:o})});cn.displayName=Qo;var et="DropdownMenuSubContent",un=a.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,r=h(n);return s.jsx(Go,{...r,...t,ref:o,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});un.displayName=et;var nt=ze,ot=Xe,dn=Ye,ln=Je,tt=Qe,pn=en,fn=nn,mn=on,rt=tn,vn=rn,gn=an,Mn=sn,at=Jo,wn=cn,hn=un;const st=nt,ct=ot,it=tt,ut=dn,dt=at,lt=rt,xn=a.forwardRef(({className:e,inset:o,children:n,...t},r)=>s.jsxs(wn,{ref:r,className:b.cn("focus:bg-accent data-[state=open]:bg-accent flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",o&&"pl-8",e),...t,children:[n,s.jsx(Kn.ChevronRight,{className:"ml-auto"})]}));xn.displayName=wn.displayName;const Cn=a.forwardRef(({className:e,...o},n)=>s.jsx(hn,{ref:n,className:b.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] overflow-hidden rounded-md border p-1 shadow-lg",e),...o}));Cn.displayName=hn.displayName;const _n=a.forwardRef(({className:e,sideOffset:o=4,...n},t)=>s.jsx(dn,{children:s.jsx(ln,{ref:t,sideOffset:o,className:b.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] overflow-hidden rounded-md border p-1 shadow-md",e),...n})}));_n.displayName=ln.displayName;const Rn=a.forwardRef(({className:e,inset:o,...n},t)=>s.jsx(fn,{ref:t,className:b.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",o&&"pl-8",e),...n}));Rn.displayName=fn.displayName;const bn=a.forwardRef(({className:e,children:o,checked:n,...t},r)=>s.jsxs(mn,{ref:r,className:b.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...t,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(gn,{children:s.jsx(Fn.Check,{className:"h-4 w-4"})})}),o]}));bn.displayName=mn.displayName;const yn=a.forwardRef(({className:e,children:o,...n},t)=>s.jsxs(vn,{ref:t,className:b.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(gn,{children:s.jsx($n.Circle,{className:"h-2 w-2 fill-current"})})}),o]}));yn.displayName=vn.displayName;const Dn=a.forwardRef(({className:e,inset:o,...n},t)=>s.jsx(pn,{ref:t,className:b.cn("px-2 py-1.5 text-sm font-semibold",o&&"pl-8",e),...n}));Dn.displayName=pn.displayName;const En=a.forwardRef(({className:e,...o},n)=>s.jsx(Mn,{ref:n,className:b.cn("bg-muted -mx-1 my-1 h-px",e),...o}));En.displayName=Mn.displayName;const Sn=({className:e,...o})=>s.jsx("span",{className:b.cn("ml-auto text-xs tracking-widest opacity-60",e),...o});Sn.displayName="DropdownMenuShortcut";exports.DropdownMenu=st;exports.DropdownMenuCheckboxItem=bn;exports.DropdownMenuContent=_n;exports.DropdownMenuGroup=it;exports.DropdownMenuItem=Rn;exports.DropdownMenuLabel=Dn;exports.DropdownMenuPortal=ut;exports.DropdownMenuRadioGroup=lt;exports.DropdownMenuRadioItem=yn;exports.DropdownMenuSeparator=En;exports.DropdownMenuShortcut=Sn;exports.DropdownMenuSub=dt;exports.DropdownMenuSubContent=Cn;exports.DropdownMenuSubTrigger=xn;exports.DropdownMenuTrigger=ct;
|
|
2
|
+
//# sourceMappingURL=dropdown-menu-Bu9wADja.cjs.js.map
|