@gv-tech/ui-web 2.15.2 → 2.17.0
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/README.md +1 -1
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.mjs +3 -3
- package/dist/alert-dialog.cjs +2 -2
- package/dist/alert-dialog.mjs +16 -16
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +1 -1
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +34 -34
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +1 -1
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +1 -1
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +1 -1
- package/dist/chart.cjs +1 -1
- package/dist/chart.mjs +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +2 -2
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +114 -114
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +68 -68
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +21 -21
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +16 -16
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +43 -43
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +1 -1
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +52 -0
- package/dist/index.mjs +101 -95
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +1 -1
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +2 -2
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +77 -77
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +57 -57
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +1 -1
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +62 -62
- package/dist/progress.cjs +2 -2
- package/dist/progress.mjs +2 -2
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +36 -36
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +1 -1
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +88 -88
- package/dist/scroll-to-top.cjs +1 -0
- package/dist/scroll-to-top.d.ts +12 -0
- package/dist/scroll-to-top.mjs +86 -0
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +74 -74
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +9 -9
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +12 -12
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +2 -2
- package/dist/support-fab.cjs +1 -0
- package/dist/support-fab.d.ts +20 -0
- package/dist/support-fab.mjs +120 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +12 -12
- package/dist/table-of-contents.cjs +1 -0
- package/dist/table-of-contents.d.ts +35 -0
- package/dist/table-of-contents.mjs +160 -0
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +41 -41
- package/dist/text.cjs +1 -1
- package/dist/text.mjs +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +1 -1
- package/dist/{theme-toggle-B4VZTDpe.js → theme-toggle-DXQGNfCe.js} +1 -1
- package/dist/{theme-toggle-WtPW9UZi.mjs → theme-toggle-tHXIbr8W.mjs} +1 -1
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +2 -2
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +35 -35
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +15 -15
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +4 -4
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +3 -3
- package/dist/utils-DY6fhrgS.mjs +12 -0
- package/dist/utils-cdbZV8DZ.js +1 -0
- package/package.json +1 -1
- package/src/accordion.tsx +2 -2
- package/src/alert-dialog.tsx +6 -6
- package/src/avatar.tsx +3 -3
- package/src/checkbox.tsx +1 -1
- package/src/command.tsx +7 -7
- package/src/context-menu.tsx +8 -8
- package/src/dialog.tsx +4 -4
- package/src/drawer.tsx +3 -3
- package/src/dropdown-menu.tsx +8 -8
- package/src/hover-card.tsx +1 -1
- package/src/index.ts +12 -1
- package/src/label.tsx +1 -1
- package/src/lib/utils.ts +10 -0
- package/src/menubar.tsx +10 -10
- package/src/navigation-menu.tsx +6 -6
- package/src/popover.tsx +1 -1
- package/src/progress.tsx +1 -1
- package/src/radio-group.tsx +2 -2
- package/src/scroll-area.tsx +2 -2
- package/src/scroll-to-top.tsx +134 -0
- package/src/select.tsx +7 -7
- package/src/separator.tsx +1 -1
- package/src/setupTests.ts +1 -1
- package/src/sheet.tsx +4 -4
- package/src/slider.tsx +1 -1
- package/src/support-fab.tsx +190 -0
- package/src/switch.tsx +1 -1
- package/src/table-of-contents.tsx +285 -0
- package/src/tabs.tsx +3 -3
- package/src/toast.tsx +6 -6
- package/src/toggle-group.tsx +2 -2
- package/src/toggle.tsx +1 -1
- package/src/tooltip.tsx +2 -2
- package/dist/utils-B6yFEsav.mjs +0 -8
- package/dist/utils-IjLH3w2e.js +0 -1
package/dist/toggle-group.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./jsx-runtime-nZSsnGb7.js"),i=require("react"),$=require("./index-D2HnlO3y.js"),G=require("./index-BtZvtDmp.js"),v=require("./index-DIsg7zU7.js"),w=require("./index-kaM0u2Q1.js"),T=require("./index-Ce5TOFAK.js"),O=require("./index-Dko2XdTk.js"),D=require("@gv-tech/ui-core"),P=require("./utils-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./jsx-runtime-nZSsnGb7.js"),i=require("react"),$=require("./index-D2HnlO3y.js"),G=require("./index-BtZvtDmp.js"),v=require("./index-DIsg7zU7.js"),w=require("./index-kaM0u2Q1.js"),T=require("./index-Ce5TOFAK.js"),O=require("./index-Dko2XdTk.js"),D=require("@gv-tech/ui-core"),P=require("./utils-cdbZV8DZ.js");function F(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const d=F(i);var c="ToggleGroup",[C]=$.createContextScope(c,[v.createRovingFocusGroupScope]),E=v.createRovingFocusGroupScope(),j=i.forwardRef((e,o)=>{const{type:t,...r}=e;if(t==="single"){const s=r;return n.jsxRuntimeExports.jsx(A,{...s,ref:o})}if(t==="multiple"){const s=r;return n.jsxRuntimeExports.jsx(k,{...s,ref:o})}throw new Error(`Missing prop \`type\` expected on \`${c}\``)});j.displayName=c;var[_,y]=C(c),A=i.forwardRef((e,o)=>{const{value:t,defaultValue:r,onValueChange:s=()=>{},...u}=e,[l,a]=T.useControllableState({prop:t,defaultProp:r??"",onChange:s,caller:c});return n.jsxRuntimeExports.jsx(_,{scope:e.__scopeToggleGroup,type:"single",value:i.useMemo(()=>l?[l]:[],[l]),onItemActivate:a,onItemDeactivate:i.useCallback(()=>a(""),[a]),children:n.jsxRuntimeExports.jsx(I,{...u,ref:o})})}),k=i.forwardRef((e,o)=>{const{value:t,defaultValue:r,onValueChange:s=()=>{},...u}=e,[l,a]=T.useControllableState({prop:t,defaultProp:r??[],onChange:s,caller:c}),p=i.useCallback(g=>a((x=[])=>[...x,g]),[a]),f=i.useCallback(g=>a((x=[])=>x.filter(V=>V!==g)),[a]);return n.jsxRuntimeExports.jsx(_,{scope:e.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:p,onItemDeactivate:f,children:n.jsxRuntimeExports.jsx(I,{...u,ref:o})})});j.displayName=c;var[z,B]=C(c),I=i.forwardRef((e,o)=>{const{__scopeToggleGroup:t,disabled:r=!1,rovingFocus:s=!0,orientation:u,dir:l,loop:a=!0,...p}=e,f=E(t),g=O.useDirection(l),x={role:"group",dir:g,...p};return n.jsxRuntimeExports.jsx(z,{scope:t,rovingFocus:s,disabled:r,children:s?n.jsxRuntimeExports.jsx(v.Root,{asChild:!0,...f,orientation:u,dir:g,loop:a,children:n.jsxRuntimeExports.jsx(G.Primitive.div,{...x,ref:o})}):n.jsxRuntimeExports.jsx(G.Primitive.div,{...x,ref:o})})}),m="ToggleGroupItem",b=i.forwardRef((e,o)=>{const t=y(m,e.__scopeToggleGroup),r=B(m,e.__scopeToggleGroup),s=E(e.__scopeToggleGroup),u=t.value.includes(e.value),l=r.disabled||e.disabled,a={...e,pressed:u,disabled:l},p=i.useRef(null);return r.rovingFocus?n.jsxRuntimeExports.jsx(v.Item,{asChild:!0,...s,focusable:!l,active:u,ref:p,children:n.jsxRuntimeExports.jsx(R,{...a,ref:o})}):n.jsxRuntimeExports.jsx(R,{...a,ref:o})});b.displayName=m;var R=i.forwardRef((e,o)=>{const{__scopeToggleGroup:t,value:r,...s}=e,u=y(m,t),l={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},a=u.type==="single"?l:void 0;return n.jsxRuntimeExports.jsx(w.Toggle,{...a,...s,ref:o,onPressedChange:p=>{p?u.onItemActivate(r):u.onItemDeactivate(r)}})}),h=j,S=b;const N=d.createContext({size:"default",variant:"default"}),q=d.forwardRef(({className:e,variant:o,size:t,children:r,...s},u)=>n.jsxRuntimeExports.jsx(h,{ref:u,className:P.cn("flex items-center justify-center gap-1",e),...s,children:n.jsxRuntimeExports.jsx(N.Provider,{value:{variant:o,size:t},children:r})}));q.displayName=h?.displayName||"ToggleGroup";const M=d.forwardRef(({className:e,children:o,variant:t,size:r,...s},u)=>{const l=d.useContext(N);return n.jsxRuntimeExports.jsx(S,{ref:u,className:P.cn(D.toggleVariants({variant:l.variant||t,size:l.size||r}),e),...s,children:o})});M.displayName=S?.displayName||"ToggleGroupItem";exports.ToggleGroup=q;exports.ToggleGroupItem=M;
|
package/dist/toggle-group.mjs
CHANGED
|
@@ -3,16 +3,16 @@ import { j as s } from "./jsx-runtime-tc70JA_2.mjs";
|
|
|
3
3
|
import * as d from "react";
|
|
4
4
|
import i from "react";
|
|
5
5
|
import { c as M } from "./index-IZ2gq03c.mjs";
|
|
6
|
-
import { P as
|
|
6
|
+
import { P as x } from "./index-K9FzbxYw.mjs";
|
|
7
7
|
import { I as A, c as C, R as E } from "./index-Bv7qrYW6.mjs";
|
|
8
8
|
import { T as F } from "./index-CeSLNJ60.mjs";
|
|
9
9
|
import { u as P } from "./index-p6xVFRb4.mjs";
|
|
10
10
|
import { u as D } from "./index-CD6_IrA-.mjs";
|
|
11
11
|
import { toggleVariants as k } from "@gv-tech/ui-core";
|
|
12
|
-
import { c as j } from "./utils-
|
|
13
|
-
var c = "ToggleGroup", [
|
|
12
|
+
import { c as j } from "./utils-DY6fhrgS.mjs";
|
|
13
|
+
var c = "ToggleGroup", [I] = M(c, [
|
|
14
14
|
C
|
|
15
|
-
]),
|
|
15
|
+
]), _ = C(), G = i.forwardRef((e, o) => {
|
|
16
16
|
const { type: a, ...r } = e;
|
|
17
17
|
if (a === "single") {
|
|
18
18
|
const t = r;
|
|
@@ -24,8 +24,8 @@ var c = "ToggleGroup", [_] = M(c, [
|
|
|
24
24
|
}
|
|
25
25
|
throw new Error(`Missing prop \`type\` expected on \`${c}\``);
|
|
26
26
|
});
|
|
27
|
-
|
|
28
|
-
var [h, R] =
|
|
27
|
+
G.displayName = c;
|
|
28
|
+
var [h, R] = I(c), $ = i.forwardRef((e, o) => {
|
|
29
29
|
const {
|
|
30
30
|
value: a,
|
|
31
31
|
defaultValue: r,
|
|
@@ -80,8 +80,8 @@ var [h, R] = _(c), $ = i.forwardRef((e, o) => {
|
|
|
80
80
|
}
|
|
81
81
|
);
|
|
82
82
|
});
|
|
83
|
-
|
|
84
|
-
var [B, O] =
|
|
83
|
+
G.displayName = c;
|
|
84
|
+
var [B, O] = I(c), y = i.forwardRef(
|
|
85
85
|
(e, o) => {
|
|
86
86
|
const {
|
|
87
87
|
__scopeToggleGroup: a,
|
|
@@ -91,7 +91,7 @@ var [B, O] = _(c), y = i.forwardRef(
|
|
|
91
91
|
dir: n,
|
|
92
92
|
loop: u = !0,
|
|
93
93
|
...p
|
|
94
|
-
} = e, f =
|
|
94
|
+
} = e, f = _(a), g = D(n), m = { role: "group", dir: g, ...p };
|
|
95
95
|
return /* @__PURE__ */ s.jsx(B, { scope: a, rovingFocus: t, disabled: r, children: t ? /* @__PURE__ */ s.jsx(
|
|
96
96
|
E,
|
|
97
97
|
{
|
|
@@ -100,13 +100,13 @@ var [B, O] = _(c), y = i.forwardRef(
|
|
|
100
100
|
orientation: l,
|
|
101
101
|
dir: g,
|
|
102
102
|
loop: u,
|
|
103
|
-
children: /* @__PURE__ */ s.jsx(
|
|
103
|
+
children: /* @__PURE__ */ s.jsx(x.div, { ...m, ref: o })
|
|
104
104
|
}
|
|
105
|
-
) : /* @__PURE__ */ s.jsx(
|
|
105
|
+
) : /* @__PURE__ */ s.jsx(x.div, { ...m, ref: o }) });
|
|
106
106
|
}
|
|
107
107
|
), v = "ToggleGroupItem", N = i.forwardRef(
|
|
108
108
|
(e, o) => {
|
|
109
|
-
const a = R(v, e.__scopeToggleGroup), r = O(v, e.__scopeToggleGroup), t =
|
|
109
|
+
const a = R(v, e.__scopeToggleGroup), r = O(v, e.__scopeToggleGroup), t = _(e.__scopeToggleGroup), l = a.value.includes(e.value), n = r.disabled || e.disabled, u = { ...e, pressed: l, disabled: n }, p = i.useRef(null);
|
|
110
110
|
return r.rovingFocus ? /* @__PURE__ */ s.jsx(
|
|
111
111
|
A,
|
|
112
112
|
{
|
|
@@ -136,14 +136,14 @@ var T = i.forwardRef(
|
|
|
136
136
|
}
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
|
-
), b =
|
|
139
|
+
), b = G, V = N;
|
|
140
140
|
const S = d.createContext({
|
|
141
141
|
size: "default",
|
|
142
142
|
variant: "default"
|
|
143
143
|
}), L = d.forwardRef(
|
|
144
144
|
({ className: e, variant: o, size: a, children: r, ...t }, l) => /* @__PURE__ */ s.jsx(b, { ref: l, className: j("flex items-center justify-center gap-1", e), ...t, children: /* @__PURE__ */ s.jsx(S.Provider, { value: { variant: o, size: a }, children: r }) })
|
|
145
145
|
);
|
|
146
|
-
L.displayName = b
|
|
146
|
+
L.displayName = b?.displayName || "ToggleGroup";
|
|
147
147
|
const U = d.forwardRef(
|
|
148
148
|
({ className: e, children: o, variant: a, size: r, ...t }, l) => {
|
|
149
149
|
const n = d.useContext(S);
|
|
@@ -164,7 +164,7 @@ const U = d.forwardRef(
|
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
166
|
);
|
|
167
|
-
U.displayName = V
|
|
167
|
+
U.displayName = V?.displayName || "ToggleGroupItem";
|
|
168
168
|
export {
|
|
169
169
|
L as ToggleGroup,
|
|
170
170
|
U as ToggleGroupItem
|
package/dist/toggle.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./jsx-runtime-nZSsnGb7.js"),n=require("./index-kaM0u2Q1.js"),u=require("react"),a=require("@gv-tech/ui-core"),l=require("./utils-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./jsx-runtime-nZSsnGb7.js"),n=require("./index-kaM0u2Q1.js"),u=require("react"),a=require("@gv-tech/ui-core"),l=require("./utils-cdbZV8DZ.js");function g(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const f=g(u),i=f.forwardRef(({className:e,variant:r,size:t,...o},s)=>c.jsxRuntimeExports.jsx(n.Root,{ref:s,className:l.cn(a.toggleVariants({variant:r,size:t,className:e})),...o}));i.displayName=n.Root?.displayName||"Toggle";Object.defineProperty(exports,"toggleVariants",{enumerable:!0,get:()=>a.toggleVariants});exports.Toggle=i;
|
package/dist/toggle.mjs
CHANGED
|
@@ -4,12 +4,12 @@ import { R as o } from "./index-CeSLNJ60.mjs";
|
|
|
4
4
|
import * as i from "react";
|
|
5
5
|
import { toggleVariants as p } from "@gv-tech/ui-core";
|
|
6
6
|
import { toggleVariants as j } from "@gv-tech/ui-core";
|
|
7
|
-
import { c as f } from "./utils-
|
|
8
|
-
const
|
|
7
|
+
import { c as f } from "./utils-DY6fhrgS.mjs";
|
|
8
|
+
const g = i.forwardRef(
|
|
9
9
|
({ className: r, variant: t, size: a, ...m }, s) => /* @__PURE__ */ e.jsx(o, { ref: s, className: f(p({ variant: t, size: a, className: r })), ...m })
|
|
10
10
|
);
|
|
11
|
-
|
|
11
|
+
g.displayName = o?.displayName || "Toggle";
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
g as Toggle,
|
|
14
14
|
j as toggleVariants
|
|
15
15
|
};
|
package/dist/tooltip.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./jsx-runtime-nZSsnGb7.js"),X=require("react"),C=require("./index-BtZvtDmp.js"),M=require("./index-_XxjJPRD.js"),K=require("./index-D2HnlO3y.js"),W=require("./index-BoNjHhm4.js"),J=require("./index-CefEQe_4.js"),R=require("./index-jv3B4mTd.js"),Q=require("./index-B2XtpfGY.js"),Z=require("./index-Ce5TOFAK.js"),ee=require("./index-Cl3G0jzM.js"),te=require("./utils-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./jsx-runtime-nZSsnGb7.js"),X=require("react"),C=require("./index-BtZvtDmp.js"),M=require("./index-_XxjJPRD.js"),K=require("./index-D2HnlO3y.js"),W=require("./index-BoNjHhm4.js"),J=require("./index-CefEQe_4.js"),R=require("./index-jv3B4mTd.js"),Q=require("./index-B2XtpfGY.js"),Z=require("./index-Ce5TOFAK.js"),ee=require("./index-Cl3G0jzM.js"),te=require("./utils-cdbZV8DZ.js");function oe(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const s=oe(X);var[O]=K.createContextScope("Tooltip",[R.createPopperScope]),_=R.createPopperScope(),S="TooltipProvider",re=700,L="tooltip.open",[ne,A]=O(S),I=e=>{const{__scopeTooltip:o,delayDuration:t=re,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:c}=e,a=s.useRef(!0),x=s.useRef(!1),i=s.useRef(0);return s.useEffect(()=>{const d=i.current;return()=>window.clearTimeout(d)},[]),u.jsxRuntimeExports.jsx(ne,{scope:o,isOpenDelayedRef:a,delayDuration:t,onOpen:s.useCallback(()=>{window.clearTimeout(i.current),a.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:x,onPointerInTransitChange:s.useCallback(d=>{x.current=d},[]),disableHoverableContent:n,children:c})};I.displayName=S;var j="Tooltip",[se,D]=O(j),q=e=>{const{__scopeTooltip:o,children:t,open:r,defaultOpen:n,onOpenChange:c,disableHoverableContent:a,delayDuration:x}=e,i=A(j,e.__scopeTooltip),d=_(o),[l,f]=s.useState(null),v=J.useId(),p=s.useRef(0),m=a??i.disableHoverableContent,g=x??i.delayDuration,T=s.useRef(!1),[y,h]=Z.useControllableState({prop:r,defaultProp:n??!1,onChange:N=>{N?(i.onOpen(),document.dispatchEvent(new CustomEvent(L))):i.onClose(),c?.(N)},caller:j}),b=s.useMemo(()=>y?T.current?"delayed-open":"instant-open":"closed",[y]),w=s.useCallback(()=>{window.clearTimeout(p.current),p.current=0,T.current=!1,h(!0)},[h]),P=s.useCallback(()=>{window.clearTimeout(p.current),p.current=0,h(!1)},[h]),H=s.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{T.current=!0,h(!0),p.current=0},g)},[g,h]);return s.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),u.jsxRuntimeExports.jsx(R.Root2,{...d,children:u.jsxRuntimeExports.jsx(se,{scope:o,contentId:v,open:y,stateAttribute:b,trigger:l,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{i.isOpenDelayedRef.current?H():w()},[i.isOpenDelayedRef,H,w]),onTriggerLeave:s.useCallback(()=>{m?P():(window.clearTimeout(p.current),p.current=0)},[P,m]),onOpen:w,onClose:P,disableHoverableContent:m,children:t})})};q.displayName=j;var k="TooltipTrigger",$=s.forwardRef((e,o)=>{const{__scopeTooltip:t,...r}=e,n=D(k,t),c=A(k,t),a=_(t),x=s.useRef(null),i=M.useComposedRefs(o,x,n.onTriggerChange),d=s.useRef(!1),l=s.useRef(!1),f=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsxRuntimeExports.jsx(R.Anchor,{asChild:!0,...a,children:u.jsxRuntimeExports.jsx(C.Primitive.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C.composeEventHandlers(e.onPointerMove,v=>{v.pointerType!=="touch"&&!l.current&&!c.isPointerInTransitRef.current&&(n.onTriggerEnter(),l.current=!0)}),onPointerLeave:C.composeEventHandlers(e.onPointerLeave,()=>{n.onTriggerLeave(),l.current=!1}),onPointerDown:C.composeEventHandlers(e.onPointerDown,()=>{n.open&&n.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:C.composeEventHandlers(e.onFocus,()=>{d.current||n.onOpen()}),onBlur:C.composeEventHandlers(e.onBlur,n.onClose),onClick:C.composeEventHandlers(e.onClick,n.onClose)})})});$.displayName=k;var ie="TooltipPortal",[Re,ae]=O(ie,{forceMount:void 0}),E="TooltipContent",G=s.forwardRef((e,o)=>{const t=ae(E,e.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...c}=e,a=D(E,e.__scopeTooltip);return u.jsxRuntimeExports.jsx(Q.Presence,{present:r||a.open,children:a.disableHoverableContent?u.jsxRuntimeExports.jsx(F,{side:n,...c,ref:o}):u.jsxRuntimeExports.jsx(ce,{side:n,...c,ref:o})})}),ce=s.forwardRef((e,o)=>{const t=D(E,e.__scopeTooltip),r=A(E,e.__scopeTooltip),n=s.useRef(null),c=M.useComposedRefs(o,n),[a,x]=s.useState(null),{trigger:i,onClose:d}=t,l=n.current,{onPointerInTransitChange:f}=r,v=s.useCallback(()=>{x(null),f(!1)},[f]),p=s.useCallback((m,g)=>{const T=m.currentTarget,y={x:m.clientX,y:m.clientY},h=fe(y,T.getBoundingClientRect()),b=xe(y,h),w=ve(g.getBoundingClientRect()),P=Te([...b,...w]);x(P),f(!0)},[f]);return s.useEffect(()=>()=>v(),[v]),s.useEffect(()=>{if(i&&l){const m=T=>p(T,l),g=T=>p(T,i);return i.addEventListener("pointerleave",m),l.addEventListener("pointerleave",g),()=>{i.removeEventListener("pointerleave",m),l.removeEventListener("pointerleave",g)}}},[i,l,p,v]),s.useEffect(()=>{if(a){const m=g=>{const T=g.target,y={x:g.clientX,y:g.clientY},h=i?.contains(T)||l?.contains(T),b=!me(y,a);h?v():b&&(v(),d())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[i,l,a,d,v]),u.jsxRuntimeExports.jsx(F,{...e,ref:c})}),[le,ue]=O(j,{isInside:!1}),pe=C.createSlottable("TooltipContent"),F=s.forwardRef((e,o)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:c,onPointerDownOutside:a,...x}=e,i=D(E,t),d=_(t),{onClose:l}=i;return s.useEffect(()=>(document.addEventListener(L,l),()=>document.removeEventListener(L,l)),[l]),s.useEffect(()=>{if(i.trigger){const f=v=>{v.target?.contains(i.trigger)&&l()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[i.trigger,l]),u.jsxRuntimeExports.jsx(W.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:l,children:u.jsxRuntimeExports.jsxs(R.Content,{"data-state":i.stateAttribute,...d,...x,ref:o,style:{...x.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsxRuntimeExports.jsx(pe,{children:r}),u.jsxRuntimeExports.jsx(le,{scope:t,isInside:!0,children:u.jsxRuntimeExports.jsx(ee.Root,{id:i.contentId,role:"tooltip",children:n||r})})]})})});G.displayName=E;var z="TooltipArrow",de=s.forwardRef((e,o)=>{const{__scopeTooltip:t,...r}=e,n=_(t);return ue(z,t).isInside?null:u.jsxRuntimeExports.jsx(R.Arrow,{...n,...r,ref:o})});de.displayName=z;function fe(e,o){const t=Math.abs(o.top-e.y),r=Math.abs(o.bottom-e.y),n=Math.abs(o.right-e.x),c=Math.abs(o.left-e.x);switch(Math.min(t,r,n,c)){case c:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function xe(e,o,t=5){const r=[];switch(o){case"top":r.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":r.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":r.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":r.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return r}function ve(e){const{top:o,right:t,bottom:r,left:n}=e;return[{x:n,y:o},{x:t,y:o},{x:t,y:r},{x:n,y:r}]}function me(e,o){const{x:t,y:r}=e;let n=!1;for(let c=0,a=o.length-1;c<o.length;a=c++){const x=o[c],i=o[a],d=x.x,l=x.y,f=i.x,v=i.y;l>r!=v>r&&t<(f-d)*(r-l)/(v-l)+d&&(n=!n)}return n}function Te(e){const o=e.slice();return o.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),ge(o)}function ge(e){if(e.length<=1)return e.slice();const o=[];for(let r=0;r<e.length;r++){const n=e[r];for(;o.length>=2;){const c=o[o.length-1],a=o[o.length-2];if((c.x-a.x)*(n.y-a.y)>=(c.y-a.y)*(n.x-a.x))o.pop();else break}o.push(n)}o.pop();const t=[];for(let r=e.length-1;r>=0;r--){const n=e[r];for(;t.length>=2;){const c=t[t.length-1],a=t[t.length-2];if((c.x-a.x)*(n.y-a.y)>=(c.y-a.y)*(n.x-a.x))t.pop();else break}t.push(n)}return t.pop(),o.length===1&&t.length===1&&o[0].x===t[0].x&&o[0].y===t[0].y?o:o.concat(t)}var he=I,ye=q,B=$,U=G;const Ce=({delayDuration:e=0,...o})=>u.jsxRuntimeExports.jsx(he,{delayDuration:e,...o}),Ee=({...e})=>u.jsxRuntimeExports.jsx(ye,{...e}),V=s.forwardRef(({className:e,...o},t)=>u.jsxRuntimeExports.jsx(B,{ref:t,className:e,...o}));V.displayName=B?.displayName||"TooltipTrigger";const Y=s.forwardRef(({className:e,sideOffset:o=4,...t},r)=>u.jsxRuntimeExports.jsx(U,{ref:r,sideOffset:o,className:te.cn("bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md",e),...t}));Y.displayName=U?.displayName||"TooltipContent";exports.Tooltip=Ee;exports.TooltipContent=Y;exports.TooltipProvider=Ce;exports.TooltipTrigger=V;
|
package/dist/tooltip.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { A as J, c as M, C as Q, R as Z, a as ee } from "./index-CwfE56Ep.mjs";
|
|
|
10
10
|
import { P as te } from "./index-vuPgkS0V.mjs";
|
|
11
11
|
import { u as oe } from "./index-p6xVFRb4.mjs";
|
|
12
12
|
import { R as re } from "./index-DKN_vhyX.mjs";
|
|
13
|
-
import { c as ne } from "./utils-
|
|
13
|
+
import { c as ne } from "./utils-DY6fhrgS.mjs";
|
|
14
14
|
var [_] = X("Tooltip", [
|
|
15
15
|
M
|
|
16
16
|
]), O = M(), H = "TooltipProvider", se = 700, j = "tooltip.open", [ae, L] = _(H), S = (e) => {
|
|
@@ -319,7 +319,7 @@ var Ce = S, be = G, U = F, V = B;
|
|
|
319
319
|
const He = ({ delayDuration: e = 0, ...o }) => /* @__PURE__ */ u.jsx(Ce, { delayDuration: e, ...o }), Se = ({ ...e }) => /* @__PURE__ */ u.jsx(be, { ...e }), we = s.forwardRef(
|
|
320
320
|
({ className: e, ...o }, t) => /* @__PURE__ */ u.jsx(U, { ref: t, className: e, ...o })
|
|
321
321
|
);
|
|
322
|
-
we.displayName = U
|
|
322
|
+
we.displayName = U?.displayName || "TooltipTrigger";
|
|
323
323
|
const Re = s.forwardRef(
|
|
324
324
|
({ className: e, sideOffset: o = 4, ...t }, r) => /* @__PURE__ */ u.jsx(
|
|
325
325
|
V,
|
|
@@ -334,7 +334,7 @@ const Re = s.forwardRef(
|
|
|
334
334
|
}
|
|
335
335
|
)
|
|
336
336
|
);
|
|
337
|
-
Re.displayName = V
|
|
337
|
+
Re.displayName = V?.displayName || "TooltipContent";
|
|
338
338
|
export {
|
|
339
339
|
Se as Tooltip,
|
|
340
340
|
Re as TooltipContent,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { clsx as e } from "clsx";
|
|
2
|
+
import { twMerge as t } from "tailwind-merge";
|
|
3
|
+
function n(...r) {
|
|
4
|
+
return t(e(r));
|
|
5
|
+
}
|
|
6
|
+
function i(r) {
|
|
7
|
+
return r.toString().toLowerCase().trim().replace(/\s+/g, "-").replace(/[^\w-]+/g, "").replace(/--+/g, "-");
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
n as c,
|
|
11
|
+
i as s
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("clsx"),t=require("tailwind-merge");function c(...e){return t.twMerge(r.clsx(e))}function n(e){return e.toString().toLowerCase().trim().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-")}exports.cn=c;exports.slugify=n;
|
package/package.json
CHANGED
package/src/accordion.tsx
CHANGED
|
@@ -39,7 +39,7 @@ const AccordionTrigger = React.forwardRef<
|
|
|
39
39
|
</AccordionPrimitive.Trigger>
|
|
40
40
|
</AccordionPrimitive.Header>
|
|
41
41
|
));
|
|
42
|
-
AccordionTrigger.displayName = AccordionPrimitive.Trigger
|
|
42
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger?.displayName || 'AccordionTrigger';
|
|
43
43
|
|
|
44
44
|
const AccordionContent = React.forwardRef<
|
|
45
45
|
React.ElementRef<typeof AccordionPrimitive.Content>,
|
|
@@ -53,7 +53,7 @@ const AccordionContent = React.forwardRef<
|
|
|
53
53
|
<div className={cn('pt-0 pb-4', className)}>{children}</div>
|
|
54
54
|
</AccordionPrimitive.Content>
|
|
55
55
|
));
|
|
56
|
-
AccordionContent.displayName = AccordionPrimitive.Content
|
|
56
|
+
AccordionContent.displayName = AccordionPrimitive.Content?.displayName || 'AccordionContent';
|
|
57
57
|
|
|
58
58
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
59
59
|
export type { AccordionBaseProps as AccordionProps };
|
package/src/alert-dialog.tsx
CHANGED
|
@@ -34,7 +34,7 @@ const AlertDialogOverlay = React.forwardRef<
|
|
|
34
34
|
ref={ref}
|
|
35
35
|
/>
|
|
36
36
|
));
|
|
37
|
-
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay
|
|
37
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay?.displayName || 'AlertDialogOverlay';
|
|
38
38
|
|
|
39
39
|
const AlertDialogContent = React.forwardRef<
|
|
40
40
|
React.ElementRef<typeof AlertDialogPrimitive.Content>,
|
|
@@ -52,7 +52,7 @@ const AlertDialogContent = React.forwardRef<
|
|
|
52
52
|
/>
|
|
53
53
|
</AlertDialogPortal>
|
|
54
54
|
));
|
|
55
|
-
AlertDialogContent.displayName = AlertDialogPrimitive.Content
|
|
55
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content?.displayName || 'AlertDialogContent';
|
|
56
56
|
|
|
57
57
|
const AlertDialogHeader = ({
|
|
58
58
|
className,
|
|
@@ -76,7 +76,7 @@ const AlertDialogTitle = React.forwardRef<
|
|
|
76
76
|
>(({ className, ...props }, ref) => (
|
|
77
77
|
<AlertDialogPrimitive.Title ref={ref} className={cn('text-lg font-semibold', className)} {...props} />
|
|
78
78
|
));
|
|
79
|
-
AlertDialogTitle.displayName = AlertDialogPrimitive.Title
|
|
79
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title?.displayName || 'AlertDialogTitle';
|
|
80
80
|
|
|
81
81
|
const AlertDialogDescription = React.forwardRef<
|
|
82
82
|
React.ElementRef<typeof AlertDialogPrimitive.Description>,
|
|
@@ -84,7 +84,7 @@ const AlertDialogDescription = React.forwardRef<
|
|
|
84
84
|
>(({ className, ...props }, ref) => (
|
|
85
85
|
<AlertDialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />
|
|
86
86
|
));
|
|
87
|
-
AlertDialogDescription.displayName = AlertDialogPrimitive.Description
|
|
87
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description?.displayName || 'AlertDialogDescription';
|
|
88
88
|
|
|
89
89
|
const AlertDialogAction = React.forwardRef<
|
|
90
90
|
React.ElementRef<typeof AlertDialogPrimitive.Action>,
|
|
@@ -92,7 +92,7 @@ const AlertDialogAction = React.forwardRef<
|
|
|
92
92
|
>(({ className, ...props }, ref) => (
|
|
93
93
|
<AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props} />
|
|
94
94
|
));
|
|
95
|
-
AlertDialogAction.displayName = AlertDialogPrimitive.Action
|
|
95
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action?.displayName || 'AlertDialogAction';
|
|
96
96
|
|
|
97
97
|
const AlertDialogCancel = React.forwardRef<
|
|
98
98
|
React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
|
|
@@ -104,7 +104,7 @@ const AlertDialogCancel = React.forwardRef<
|
|
|
104
104
|
{...props}
|
|
105
105
|
/>
|
|
106
106
|
));
|
|
107
|
-
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel
|
|
107
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel?.displayName || 'AlertDialogCancel';
|
|
108
108
|
|
|
109
109
|
export {
|
|
110
110
|
AlertDialog,
|
package/src/avatar.tsx
CHANGED
|
@@ -15,7 +15,7 @@ const Avatar = React.forwardRef<
|
|
|
15
15
|
{...props}
|
|
16
16
|
/>
|
|
17
17
|
));
|
|
18
|
-
Avatar.displayName = AvatarPrimitive.Root
|
|
18
|
+
Avatar.displayName = AvatarPrimitive.Root?.displayName || 'Avatar';
|
|
19
19
|
|
|
20
20
|
const AvatarImage = React.forwardRef<
|
|
21
21
|
React.ElementRef<typeof AvatarPrimitive.Image>,
|
|
@@ -23,7 +23,7 @@ const AvatarImage = React.forwardRef<
|
|
|
23
23
|
>(({ className, ...props }, ref) => (
|
|
24
24
|
<AvatarPrimitive.Image ref={ref} className={cn('aspect-square h-full w-full', className)} {...props} />
|
|
25
25
|
));
|
|
26
|
-
AvatarImage.displayName = AvatarPrimitive.Image
|
|
26
|
+
AvatarImage.displayName = AvatarPrimitive.Image?.displayName || 'AvatarImage';
|
|
27
27
|
|
|
28
28
|
const AvatarFallback = React.forwardRef<
|
|
29
29
|
React.ElementRef<typeof AvatarPrimitive.Fallback>,
|
|
@@ -35,7 +35,7 @@ const AvatarFallback = React.forwardRef<
|
|
|
35
35
|
{...props}
|
|
36
36
|
/>
|
|
37
37
|
));
|
|
38
|
-
AvatarFallback.displayName = AvatarPrimitive.Fallback
|
|
38
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback?.displayName || 'AvatarFallback';
|
|
39
39
|
|
|
40
40
|
export { Avatar, AvatarFallback, AvatarImage };
|
|
41
41
|
export type { AvatarBaseProps as AvatarProps };
|
package/src/checkbox.tsx
CHANGED
|
@@ -27,6 +27,6 @@ const Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root
|
|
|
27
27
|
</CheckboxPrimitive.Root>
|
|
28
28
|
),
|
|
29
29
|
);
|
|
30
|
-
Checkbox.displayName = CheckboxPrimitive.Root
|
|
30
|
+
Checkbox.displayName = CheckboxPrimitive.Root?.displayName || 'Checkbox';
|
|
31
31
|
|
|
32
32
|
export { Checkbox };
|
package/src/command.tsx
CHANGED
|
@@ -31,7 +31,7 @@ const Command = React.forwardRef<
|
|
|
31
31
|
{...props}
|
|
32
32
|
/>
|
|
33
33
|
));
|
|
34
|
-
Command.displayName = CommandPrimitive
|
|
34
|
+
Command.displayName = CommandPrimitive?.displayName || 'Command';
|
|
35
35
|
|
|
36
36
|
const CommandDialog = ({ children, ...props }: DialogProps) => {
|
|
37
37
|
return (
|
|
@@ -64,7 +64,7 @@ const CommandInput = React.forwardRef<
|
|
|
64
64
|
</div>
|
|
65
65
|
));
|
|
66
66
|
|
|
67
|
-
CommandInput.displayName = CommandPrimitive.Input
|
|
67
|
+
CommandInput.displayName = CommandPrimitive.Input?.displayName || 'CommandInput';
|
|
68
68
|
|
|
69
69
|
const CommandList = React.forwardRef<
|
|
70
70
|
React.ElementRef<typeof CommandPrimitive.List>,
|
|
@@ -77,14 +77,14 @@ const CommandList = React.forwardRef<
|
|
|
77
77
|
/>
|
|
78
78
|
));
|
|
79
79
|
|
|
80
|
-
CommandList.displayName = CommandPrimitive.List
|
|
80
|
+
CommandList.displayName = CommandPrimitive.List?.displayName || 'CommandList';
|
|
81
81
|
|
|
82
82
|
const CommandEmpty = React.forwardRef<
|
|
83
83
|
React.ElementRef<typeof CommandPrimitive.Empty>,
|
|
84
84
|
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> & CommandEmptyBaseProps
|
|
85
85
|
>((props, ref) => <CommandPrimitive.Empty ref={ref} className="py-6 text-center text-sm" {...props} />);
|
|
86
86
|
|
|
87
|
-
CommandEmpty.displayName = CommandPrimitive.Empty
|
|
87
|
+
CommandEmpty.displayName = CommandPrimitive.Empty?.displayName || 'CommandEmpty';
|
|
88
88
|
|
|
89
89
|
const CommandGroup = React.forwardRef<
|
|
90
90
|
React.ElementRef<typeof CommandPrimitive.Group>,
|
|
@@ -100,7 +100,7 @@ const CommandGroup = React.forwardRef<
|
|
|
100
100
|
/>
|
|
101
101
|
));
|
|
102
102
|
|
|
103
|
-
CommandGroup.displayName = CommandPrimitive.Group
|
|
103
|
+
CommandGroup.displayName = CommandPrimitive.Group?.displayName || 'CommandGroup';
|
|
104
104
|
|
|
105
105
|
const CommandSeparator = React.forwardRef<
|
|
106
106
|
React.ElementRef<typeof CommandPrimitive.Separator>,
|
|
@@ -108,7 +108,7 @@ const CommandSeparator = React.forwardRef<
|
|
|
108
108
|
>(({ className, ...props }, ref) => (
|
|
109
109
|
<CommandPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 h-px', className)} {...props} />
|
|
110
110
|
));
|
|
111
|
-
CommandSeparator.displayName = CommandPrimitive.Separator
|
|
111
|
+
CommandSeparator.displayName = CommandPrimitive.Separator?.displayName || 'CommandSeparator';
|
|
112
112
|
|
|
113
113
|
const CommandItem = React.forwardRef<
|
|
114
114
|
React.ElementRef<typeof CommandPrimitive.Item>,
|
|
@@ -124,7 +124,7 @@ const CommandItem = React.forwardRef<
|
|
|
124
124
|
/>
|
|
125
125
|
));
|
|
126
126
|
|
|
127
|
-
CommandItem.displayName = CommandPrimitive.Item
|
|
127
|
+
CommandItem.displayName = CommandPrimitive.Item?.displayName || 'CommandItem';
|
|
128
128
|
|
|
129
129
|
const CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement> & CommandShortcutBaseProps) => {
|
|
130
130
|
return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;
|
package/src/context-menu.tsx
CHANGED
|
@@ -50,7 +50,7 @@ const ContextMenuSubTrigger = React.forwardRef<
|
|
|
50
50
|
<ChevronRight className="ml-auto h-4 w-4" />
|
|
51
51
|
</ContextMenuPrimitive.SubTrigger>
|
|
52
52
|
));
|
|
53
|
-
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger
|
|
53
|
+
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger?.displayName || 'ContextMenuSubTrigger';
|
|
54
54
|
|
|
55
55
|
const ContextMenuSubContent = React.forwardRef<
|
|
56
56
|
React.ElementRef<typeof ContextMenuPrimitive.SubContent>,
|
|
@@ -65,7 +65,7 @@ const ContextMenuSubContent = React.forwardRef<
|
|
|
65
65
|
{...props}
|
|
66
66
|
/>
|
|
67
67
|
));
|
|
68
|
-
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent
|
|
68
|
+
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent?.displayName || 'ContextMenuSubContent';
|
|
69
69
|
|
|
70
70
|
const ContextMenuContent = React.forwardRef<
|
|
71
71
|
React.ElementRef<typeof ContextMenuPrimitive.Content>,
|
|
@@ -82,7 +82,7 @@ const ContextMenuContent = React.forwardRef<
|
|
|
82
82
|
/>
|
|
83
83
|
</ContextMenuPrimitive.Portal>
|
|
84
84
|
));
|
|
85
|
-
ContextMenuContent.displayName = ContextMenuPrimitive.Content
|
|
85
|
+
ContextMenuContent.displayName = ContextMenuPrimitive.Content?.displayName || 'ContextMenuContent';
|
|
86
86
|
|
|
87
87
|
const ContextMenuItem = React.forwardRef<
|
|
88
88
|
React.ElementRef<typeof ContextMenuPrimitive.Item>,
|
|
@@ -98,7 +98,7 @@ const ContextMenuItem = React.forwardRef<
|
|
|
98
98
|
{...props}
|
|
99
99
|
/>
|
|
100
100
|
));
|
|
101
|
-
ContextMenuItem.displayName = ContextMenuPrimitive.Item
|
|
101
|
+
ContextMenuItem.displayName = ContextMenuPrimitive.Item?.displayName || 'ContextMenuItem';
|
|
102
102
|
|
|
103
103
|
const ContextMenuCheckboxItem = React.forwardRef<
|
|
104
104
|
React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,
|
|
@@ -121,7 +121,7 @@ const ContextMenuCheckboxItem = React.forwardRef<
|
|
|
121
121
|
{children}
|
|
122
122
|
</ContextMenuPrimitive.CheckboxItem>
|
|
123
123
|
));
|
|
124
|
-
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem
|
|
124
|
+
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem?.displayName || 'ContextMenuCheckboxItem';
|
|
125
125
|
|
|
126
126
|
const ContextMenuRadioItem = React.forwardRef<
|
|
127
127
|
React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,
|
|
@@ -143,7 +143,7 @@ const ContextMenuRadioItem = React.forwardRef<
|
|
|
143
143
|
{children}
|
|
144
144
|
</ContextMenuPrimitive.RadioItem>
|
|
145
145
|
));
|
|
146
|
-
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem
|
|
146
|
+
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem?.displayName || 'ContextMenuRadioItem';
|
|
147
147
|
|
|
148
148
|
const ContextMenuLabel = React.forwardRef<
|
|
149
149
|
React.ElementRef<typeof ContextMenuPrimitive.Label>,
|
|
@@ -155,7 +155,7 @@ const ContextMenuLabel = React.forwardRef<
|
|
|
155
155
|
{...props}
|
|
156
156
|
/>
|
|
157
157
|
));
|
|
158
|
-
ContextMenuLabel.displayName = ContextMenuPrimitive.Label
|
|
158
|
+
ContextMenuLabel.displayName = ContextMenuPrimitive.Label?.displayName || 'ContextMenuLabel';
|
|
159
159
|
|
|
160
160
|
const ContextMenuSeparator = React.forwardRef<
|
|
161
161
|
React.ElementRef<typeof ContextMenuPrimitive.Separator>,
|
|
@@ -163,7 +163,7 @@ const ContextMenuSeparator = React.forwardRef<
|
|
|
163
163
|
>(({ className, ...props }, ref) => (
|
|
164
164
|
<ContextMenuPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 my-1 h-px', className)} {...props} />
|
|
165
165
|
));
|
|
166
|
-
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator
|
|
166
|
+
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator?.displayName || 'ContextMenuSeparator';
|
|
167
167
|
|
|
168
168
|
const ContextMenuShortcut = ({
|
|
169
169
|
className,
|
package/src/dialog.tsx
CHANGED
|
@@ -26,7 +26,7 @@ const DialogOverlay = React.forwardRef<
|
|
|
26
26
|
{...props}
|
|
27
27
|
/>
|
|
28
28
|
));
|
|
29
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay
|
|
29
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay?.displayName || 'DialogOverlay';
|
|
30
30
|
|
|
31
31
|
const DialogContent = React.forwardRef<
|
|
32
32
|
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
@@ -50,7 +50,7 @@ const DialogContent = React.forwardRef<
|
|
|
50
50
|
</DialogPrimitive.Content>
|
|
51
51
|
</DialogPortal>
|
|
52
52
|
));
|
|
53
|
-
DialogContent.displayName = DialogPrimitive.Content
|
|
53
|
+
DialogContent.displayName = DialogPrimitive.Content?.displayName || 'DialogContent';
|
|
54
54
|
|
|
55
55
|
const DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
56
56
|
<div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />
|
|
@@ -72,7 +72,7 @@ const DialogTitle = React.forwardRef<
|
|
|
72
72
|
{...props}
|
|
73
73
|
/>
|
|
74
74
|
));
|
|
75
|
-
DialogTitle.displayName = DialogPrimitive.Title
|
|
75
|
+
DialogTitle.displayName = DialogPrimitive.Title?.displayName || 'DialogTitle';
|
|
76
76
|
|
|
77
77
|
const DialogDescription = React.forwardRef<
|
|
78
78
|
React.ElementRef<typeof DialogPrimitive.Description>,
|
|
@@ -80,7 +80,7 @@ const DialogDescription = React.forwardRef<
|
|
|
80
80
|
>(({ className, ...props }, ref) => (
|
|
81
81
|
<DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />
|
|
82
82
|
));
|
|
83
|
-
DialogDescription.displayName = DialogPrimitive.Description
|
|
83
|
+
DialogDescription.displayName = DialogPrimitive.Description?.displayName || 'DialogDescription';
|
|
84
84
|
|
|
85
85
|
export {
|
|
86
86
|
Dialog,
|
package/src/drawer.tsx
CHANGED
|
@@ -32,7 +32,7 @@ const DrawerOverlay = React.forwardRef<
|
|
|
32
32
|
>(({ className, ...props }, ref) => (
|
|
33
33
|
<DrawerPrimitive.Overlay ref={ref} className={cn('fixed inset-0 z-50 bg-black/80', className)} {...props} />
|
|
34
34
|
));
|
|
35
|
-
DrawerOverlay.displayName = DrawerPrimitive.Overlay
|
|
35
|
+
DrawerOverlay.displayName = DrawerPrimitive.Overlay?.displayName || 'DrawerOverlay';
|
|
36
36
|
|
|
37
37
|
const DrawerContent = React.forwardRef<
|
|
38
38
|
React.ElementRef<typeof DrawerPrimitive.Content>,
|
|
@@ -75,7 +75,7 @@ const DrawerTitle = React.forwardRef<
|
|
|
75
75
|
{...props}
|
|
76
76
|
/>
|
|
77
77
|
));
|
|
78
|
-
DrawerTitle.displayName = DrawerPrimitive.Title
|
|
78
|
+
DrawerTitle.displayName = DrawerPrimitive.Title?.displayName || 'DrawerTitle';
|
|
79
79
|
|
|
80
80
|
const DrawerDescription = React.forwardRef<
|
|
81
81
|
React.ElementRef<typeof DrawerPrimitive.Description>,
|
|
@@ -83,7 +83,7 @@ const DrawerDescription = React.forwardRef<
|
|
|
83
83
|
>(({ className, ...props }, ref) => (
|
|
84
84
|
<DrawerPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />
|
|
85
85
|
));
|
|
86
|
-
DrawerDescription.displayName = DrawerPrimitive.Description
|
|
86
|
+
DrawerDescription.displayName = DrawerPrimitive.Description?.displayName || 'DrawerDescription';
|
|
87
87
|
|
|
88
88
|
export {
|
|
89
89
|
Drawer,
|
package/src/dropdown-menu.tsx
CHANGED
|
@@ -51,7 +51,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
|
|
|
51
51
|
<ChevronRight className="ml-auto" />
|
|
52
52
|
</DropdownMenuPrimitive.SubTrigger>
|
|
53
53
|
));
|
|
54
|
-
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger
|
|
54
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger?.displayName || 'DropdownMenuSubTrigger';
|
|
55
55
|
|
|
56
56
|
const DropdownMenuSubContent = React.forwardRef<
|
|
57
57
|
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
|
|
@@ -66,7 +66,7 @@ const DropdownMenuSubContent = React.forwardRef<
|
|
|
66
66
|
{...props}
|
|
67
67
|
/>
|
|
68
68
|
));
|
|
69
|
-
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent
|
|
69
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent?.displayName || 'DropdownMenuSubContent';
|
|
70
70
|
|
|
71
71
|
const DropdownMenuContent = React.forwardRef<
|
|
72
72
|
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
|
@@ -85,7 +85,7 @@ const DropdownMenuContent = React.forwardRef<
|
|
|
85
85
|
/>
|
|
86
86
|
</DropdownMenuPrimitive.Portal>
|
|
87
87
|
));
|
|
88
|
-
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content
|
|
88
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content?.displayName || 'DropdownMenuContent';
|
|
89
89
|
|
|
90
90
|
const DropdownMenuItem = React.forwardRef<
|
|
91
91
|
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
@@ -101,7 +101,7 @@ const DropdownMenuItem = React.forwardRef<
|
|
|
101
101
|
{...props}
|
|
102
102
|
/>
|
|
103
103
|
));
|
|
104
|
-
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item
|
|
104
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item?.displayName || 'DropdownMenuItem';
|
|
105
105
|
|
|
106
106
|
const DropdownMenuCheckboxItem = React.forwardRef<
|
|
107
107
|
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
|
|
@@ -124,7 +124,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
|
|
|
124
124
|
{children}
|
|
125
125
|
</DropdownMenuPrimitive.CheckboxItem>
|
|
126
126
|
));
|
|
127
|
-
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem
|
|
127
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem?.displayName || 'DropdownMenuCheckboxItem';
|
|
128
128
|
|
|
129
129
|
const DropdownMenuRadioItem = React.forwardRef<
|
|
130
130
|
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
|
|
@@ -146,7 +146,7 @@ const DropdownMenuRadioItem = React.forwardRef<
|
|
|
146
146
|
{children}
|
|
147
147
|
</DropdownMenuPrimitive.RadioItem>
|
|
148
148
|
));
|
|
149
|
-
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem
|
|
149
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem?.displayName || 'DropdownMenuRadioItem';
|
|
150
150
|
|
|
151
151
|
const DropdownMenuLabel = React.forwardRef<
|
|
152
152
|
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
|
|
@@ -158,7 +158,7 @@ const DropdownMenuLabel = React.forwardRef<
|
|
|
158
158
|
{...props}
|
|
159
159
|
/>
|
|
160
160
|
));
|
|
161
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label
|
|
161
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label?.displayName || 'DropdownMenuLabel';
|
|
162
162
|
|
|
163
163
|
const DropdownMenuSeparator = React.forwardRef<
|
|
164
164
|
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
|
|
@@ -166,7 +166,7 @@ const DropdownMenuSeparator = React.forwardRef<
|
|
|
166
166
|
>(({ className, ...props }, ref) => (
|
|
167
167
|
<DropdownMenuPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />
|
|
168
168
|
));
|
|
169
|
-
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator
|
|
169
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator?.displayName || 'DropdownMenuSeparator';
|
|
170
170
|
|
|
171
171
|
const DropdownMenuShortcut = ({
|
|
172
172
|
className,
|
package/src/hover-card.tsx
CHANGED
|
@@ -25,7 +25,7 @@ const HoverCardContent = React.forwardRef<
|
|
|
25
25
|
{...props}
|
|
26
26
|
/>
|
|
27
27
|
));
|
|
28
|
-
HoverCardContent.displayName = HoverCardPrimitive.Content
|
|
28
|
+
HoverCardContent.displayName = HoverCardPrimitive.Content?.displayName || 'HoverCardContent';
|
|
29
29
|
|
|
30
30
|
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
31
31
|
export type {
|