@gv-tech/ui-web 2.10.0 → 2.12.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/dist/accordion.cjs.js +1 -0
- package/dist/accordion.d.ts +18 -0
- package/dist/accordion.es.js +259 -0
- package/dist/alert-dialog.cjs.js +7 -0
- package/dist/alert-dialog.d.ts +43 -0
- package/dist/alert-dialog.es.js +171 -0
- package/dist/alert.cjs.js +1 -0
- package/dist/alert.d.ts +18 -0
- package/dist/alert.es.js +32 -0
- package/dist/aspect-ratio.cjs.js +1 -0
- package/dist/aspect-ratio.d.ts +10 -0
- package/dist/aspect-ratio.es.js +43 -0
- package/dist/avatar.cjs.js +1 -0
- package/dist/avatar.d.ts +15 -0
- package/dist/avatar.es.js +205 -0
- package/dist/badge.cjs.js +1 -0
- package/dist/badge.d.ts +16 -0
- package/dist/badge.es.js +26 -0
- package/dist/breadcrumb.cjs.js +1 -0
- package/dist/breadcrumb.d.ts +35 -0
- package/dist/breadcrumb.es.js +69 -0
- package/dist/button.cjs.js +1 -0
- package/dist/button.d.ts +17 -0
- package/dist/button.es.js +40 -0
- package/dist/calendar.cjs.js +1 -0
- package/dist/calendar.d.ts +29 -0
- package/dist/calendar.es.js +2976 -0
- package/dist/card.cjs.js +1 -0
- package/dist/card.d.ts +19 -0
- package/dist/card.es.js +33 -0
- package/dist/carousel.cjs.js +1 -0
- package/dist/carousel.d.ts +50 -0
- package/dist/carousel.es.js +1403 -0
- package/dist/chart.cjs.js +16 -0
- package/dist/chart.d.ts +60 -0
- package/dist/chart.es.js +4402 -0
- package/dist/checkbox.cjs.js +1 -0
- package/dist/checkbox.d.ts +10 -0
- package/dist/checkbox.es.js +258 -0
- package/dist/collapsible.cjs.js +1 -0
- package/dist/collapsible.d.ts +20 -0
- package/dist/collapsible.es.js +7 -0
- package/dist/command.cjs.js +1 -0
- package/dist/command.d.ts +115 -0
- package/dist/command.es.js +396 -0
- package/dist/context-menu.cjs.js +1 -0
- package/dist/context-menu.d.ts +80 -0
- package/dist/context-menu.es.js +328 -0
- package/dist/dialog.cjs.js +1 -0
- package/dist/dialog.d.ts +31 -0
- package/dist/dialog.es.js +66 -0
- package/dist/drawer.cjs.js +3 -0
- package/dist/drawer.d.ts +65 -0
- package/dist/drawer.es.js +1085 -0
- package/dist/dropdown-menu.cjs.js +1 -0
- package/dist/dropdown-menu.d.ts +80 -0
- package/dist/dropdown-menu.es.js +316 -0
- package/dist/form.cjs.js +1 -0
- package/dist/form.d.ts +53 -0
- package/dist/form.es.js +355 -0
- package/dist/hover-card.cjs.js +1 -0
- package/dist/hover-card.d.ts +19 -0
- package/dist/hover-card.es.js +188 -0
- package/dist/index-0ioNhtNM.mjs +10 -0
- package/dist/index-3j-XAIXT.mjs +55 -0
- package/dist/index-B2XtpfGY.js +1 -0
- package/dist/index-B39Lzq0v.js +1 -0
- package/dist/index-B7n6fy75.js +1 -0
- package/dist/index-B8dxbSWX.js +41 -0
- package/dist/index-BGIK9FQF.js +1 -0
- package/dist/index-BZPx6jYI.mjs +8 -0
- package/dist/index-BoNjHhm4.js +1 -0
- package/dist/index-BtZvtDmp.js +1 -0
- package/dist/index-Bv7qrYW6.mjs +180 -0
- package/dist/index-ByiPJW53.js +5 -0
- package/dist/index-C0dlIQIi.js +1 -0
- package/dist/index-C1qb0595.mjs +27 -0
- package/dist/index-C7HEunrh.mjs +15 -0
- package/dist/index-C8ni3LLa.js +1 -0
- package/dist/index-CCKe-Mpx.mjs +6 -0
- package/dist/index-CD6_IrA-.mjs +10 -0
- package/dist/index-CRyCZJLa.mjs +677 -0
- package/dist/index-CVx1AgNG.mjs +615 -0
- package/dist/index-Ce5TOFAK.js +1 -0
- package/dist/index-CeSLNJ60.mjs +32 -0
- package/dist/index-CefEQe_4.js +1 -0
- package/dist/index-Cj5hzyBi.js +1 -0
- package/dist/index-Cjj_rUPu.js +1 -0
- package/dist/index-Cl3G0jzM.js +1 -0
- package/dist/index-CsjrqSSN.js +1 -0
- package/dist/index-CwfE56Ep.mjs +1545 -0
- package/dist/index-CwyAfCwY.js +1 -0
- package/dist/index-CzY-WZXL.js +1 -0
- package/dist/index-D2HnlO3y.js +1 -0
- package/dist/index-DAWHN3cH.mjs +85 -0
- package/dist/index-DFdF7K7v.mjs +50 -0
- package/dist/index-DIsg7zU7.js +1 -0
- package/dist/index-DKN_vhyX.mjs +32 -0
- package/dist/index-DLcqcWxM.mjs +29 -0
- package/dist/index-DSxf1gN6.mjs +118 -0
- package/dist/index-DYxWvftI.js +1 -0
- package/dist/index-DaILh3TV.mjs +32 -0
- package/dist/index-Dfzl8TxY.mjs +136 -0
- package/dist/index-Dko2XdTk.js +1 -0
- package/dist/index-DlY82G31.mjs +245 -0
- package/dist/index-DnFcfnA9.mjs +13 -0
- package/dist/index-IZ2gq03c.mjs +68 -0
- package/dist/index-K9FzbxYw.mjs +93 -0
- package/dist/index-Le8p9oP4.mjs +60 -0
- package/dist/index-MQ0c3ZX_.js +1 -0
- package/dist/index-_XxjJPRD.js +1 -0
- package/dist/index-_wdrnYim.js +1 -0
- package/dist/index-jv3B4mTd.js +1 -0
- package/dist/index-kaM0u2Q1.js +1 -0
- package/dist/index-p6xVFRb4.mjs +52 -0
- package/dist/index-rKs9bXHr.mjs +6 -0
- package/dist/index-vuPgkS0V.mjs +70 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.d.ts +1288 -0
- package/dist/index.es.js +289 -0
- package/dist/input.cjs.js +1 -0
- package/dist/input.d.ts +9 -0
- package/dist/input.es.js +19 -0
- package/dist/jsx-runtime-nZSsnGb7.js +6 -0
- package/dist/jsx-runtime-tc70JA_2.mjs +264 -0
- package/dist/label.cjs.js +1 -0
- package/dist/label.d.ts +11 -0
- package/dist/label.es.js +22 -0
- package/dist/menubar.cjs.js +1 -0
- package/dist/menubar.d.ts +79 -0
- package/dist/menubar.es.js +473 -0
- package/dist/navigation-menu.cjs.js +1 -0
- package/dist/navigation-menu.d.ts +47 -0
- package/dist/navigation-menu.es.js +673 -0
- package/dist/pagination.cjs.js +1 -0
- package/dist/pagination.d.ts +68 -0
- package/dist/pagination.es.js +68 -0
- package/dist/popover.cjs.js +1 -0
- package/dist/popover.d.ts +24 -0
- package/dist/popover.es.js +242 -0
- package/dist/progress.cjs.js +6 -0
- package/dist/progress.d.ts +9 -0
- package/dist/progress.es.js +99 -0
- package/dist/radio-group.cjs.js +1 -0
- package/dist/radio-group.d.ts +16 -0
- package/dist/radio-group.es.js +253 -0
- package/dist/resizable.cjs.js +1 -0
- package/dist/resizable.d.ts +22 -0
- package/dist/resizable.es.js +1990 -0
- package/dist/scroll-area.cjs.js +1 -0
- package/dist/scroll-area.d.ts +14 -0
- package/dist/scroll-area.es.js +546 -0
- package/dist/search.cjs.js +1 -0
- package/dist/search.d.ts +15 -0
- package/dist/search.es.js +51 -0
- package/dist/select.cjs.js +1 -0
- package/dist/select.d.ts +54 -0
- package/dist/select.es.js +908 -0
- package/dist/separator.cjs.js +1 -0
- package/dist/separator.d.ts +9 -0
- package/dist/separator.es.js +35 -0
- package/dist/sheet.cjs.js +1 -0
- package/dist/sheet.d.ts +68 -0
- package/dist/sheet.es.js +66 -0
- package/dist/skeleton.cjs.js +1 -0
- package/dist/skeleton.d.ts +9 -0
- package/dist/skeleton.es.js +8 -0
- package/dist/slider.cjs.js +1 -0
- package/dist/slider.d.ts +9 -0
- package/dist/slider.es.js +442 -0
- package/dist/sonner.cjs.js +1 -0
- package/dist/sonner.d.ts +10 -0
- package/dist/sonner.es.js +764 -0
- package/dist/switch.cjs.js +1 -0
- package/dist/switch.d.ts +9 -0
- package/dist/switch.es.js +149 -0
- package/dist/table.cjs.js +1 -0
- package/dist/table.d.ts +43 -0
- package/dist/table.es.js +57 -0
- package/dist/tabs.cjs.js +1 -0
- package/dist/tabs.d.ts +24 -0
- package/dist/tabs.es.js +195 -0
- package/dist/text.cjs.js +1 -0
- package/dist/text.d.ts +17 -0
- package/dist/text.es.js +42 -0
- package/dist/textarea.cjs.js +1 -0
- package/dist/textarea.d.ts +9 -0
- package/dist/textarea.es.js +18 -0
- package/dist/theme-provider.cjs.js +1 -0
- package/dist/theme-provider.d.ts +9 -0
- package/dist/theme-provider.es.js +8 -0
- package/dist/theme-toggle.cjs.js +1 -0
- package/dist/theme-toggle.d.ts +8 -0
- package/dist/theme-toggle.es.js +78 -0
- package/dist/toast.cjs.js +1 -0
- package/dist/toast.d.ts +26 -0
- package/dist/toast.es.js +494 -0
- package/dist/toaster-CIpfms4W.js +1 -0
- package/dist/toaster-jBYXAPRk.mjs +118 -0
- package/dist/toaster.cjs.js +1 -0
- package/dist/toaster.d.ts +6 -0
- package/dist/toaster.es.js +6 -0
- package/dist/toggle-group.cjs.js +1 -0
- package/dist/toggle-group.d.ts +18 -0
- package/dist/toggle-group.es.js +170 -0
- package/dist/toggle.cjs.js +1 -0
- package/dist/toggle.d.ts +14 -0
- package/dist/toggle.es.js +14 -0
- package/dist/tooltip.cjs.js +1 -0
- package/dist/tooltip.d.ts +25 -0
- package/dist/tooltip.es.js +342 -0
- package/dist/utils-B6yFEsav.mjs +8 -0
- package/dist/utils-IjLH3w2e.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./jsx-runtime-nZSsnGb7.js"),B=require("react"),S=require("./index-BtZvtDmp.js"),j=require("./index-_XxjJPRD.js"),M=require("./index-D2HnlO3y.js"),I=require("./index-Ce5TOFAK.js"),$=require("./index-DYxWvftI.js"),H=require("./index-Cjj_rUPu.js"),R=require("./utils-IjLH3w2e.js");function z(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const n=z(B);var b="Switch",[A]=M.createContextScope(b),[D,U]=A(b),y=n.forwardRef((t,r)=>{const{__scopeSwitch:e,name:o,checked:s,defaultChecked:m,required:u,disabled:c,value:d="on",onCheckedChange:x,form:a,...v}=t,[l,p]=n.useState(null),w=j.useComposedRefs(r,h=>p(h)),g=n.useRef(!1),k=l?a||!!l.closest("form"):!0,[f,T]=I.useControllableState({prop:s,defaultProp:m??!1,onChange:x,caller:b});return i.jsxRuntimeExports.jsxs(D,{scope:e,checked:f,disabled:c,children:[i.jsxRuntimeExports.jsx(S.Primitive.button,{type:"button",role:"switch","aria-checked":f,"aria-required":u,"data-state":_(f),"data-disabled":c?"":void 0,disabled:c,value:d,...v,ref:w,onClick:S.composeEventHandlers(t.onClick,h=>{T(O=>!O),k&&(g.current=h.isPropagationStopped(),g.current||h.stopPropagation())})}),k&&i.jsxRuntimeExports.jsx(P,{control:l,bubbles:!g.current,name:o,value:d,checked:f,required:u,disabled:c,form:a,style:{transform:"translateX(-100%)"}})]})});y.displayName=b;var C="SwitchThumb",E=n.forwardRef((t,r)=>{const{__scopeSwitch:e,...o}=t,s=U(C,e);return i.jsxRuntimeExports.jsx(S.Primitive.span,{"data-state":_(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:r})});E.displayName=C;var L="SwitchBubbleInput",P=n.forwardRef(({__scopeSwitch:t,control:r,checked:e,bubbles:o=!0,...s},m)=>{const u=n.useRef(null),c=j.useComposedRefs(u,m),d=$.usePrevious(e),x=H.useSize(r);return n.useEffect(()=>{const a=u.current;if(!a)return;const v=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(v,"checked").set;if(d!==e&&p){const w=new Event("click",{bubbles:o});p.call(a,e),a.dispatchEvent(w)}},[d,e,o]),i.jsxRuntimeExports.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...s,tabIndex:-1,ref:c,style:{...s.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});P.displayName=L;function _(t){return t?"checked":"unchecked"}var N=y,F=E;const q=n.forwardRef(({className:t,...r},e)=>i.jsxRuntimeExports.jsx(N,{className:R.cn("peer focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",t),...r,ref:e,children:i.jsxRuntimeExports.jsx(F,{className:R.cn("bg-background pointer-events-none block h-4 w-4 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));q.displayName=N.displayName;exports.Switch=q;
|
package/dist/switch.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React_2 from 'react';
|
|
2
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
3
|
+
import { SwitchBaseProps as SwitchProps } from '../../ui-core/src';
|
|
4
|
+
|
|
5
|
+
export declare const Switch: React_2.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & SwitchProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
|
|
7
|
+
export { SwitchProps }
|
|
8
|
+
|
|
9
|
+
export { }
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { j as a } from "./jsx-runtime-tc70JA_2.mjs";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { P as C, c as I } from "./index-K9FzbxYw.mjs";
|
|
4
|
+
import { u as y } from "./index-DLcqcWxM.mjs";
|
|
5
|
+
import { c as M } from "./index-IZ2gq03c.mjs";
|
|
6
|
+
import { u as H } from "./index-p6xVFRb4.mjs";
|
|
7
|
+
import { u as A } from "./index-BZPx6jYI.mjs";
|
|
8
|
+
import { u as U } from "./index-C1qb0595.mjs";
|
|
9
|
+
import { c as x } from "./utils-B6yFEsav.mjs";
|
|
10
|
+
var h = "Switch", [q] = M(h), [z, L] = q(h), P = o.forwardRef(
|
|
11
|
+
(t, r) => {
|
|
12
|
+
const {
|
|
13
|
+
__scopeSwitch: e,
|
|
14
|
+
name: n,
|
|
15
|
+
checked: s,
|
|
16
|
+
defaultChecked: b,
|
|
17
|
+
required: d,
|
|
18
|
+
disabled: c,
|
|
19
|
+
value: u = "on",
|
|
20
|
+
onCheckedChange: w,
|
|
21
|
+
form: i,
|
|
22
|
+
...v
|
|
23
|
+
} = t, [l, p] = o.useState(null), k = y(r, (m) => p(m)), S = o.useRef(!1), g = l ? i || !!l.closest("form") : !0, [f, B] = H({
|
|
24
|
+
prop: s,
|
|
25
|
+
defaultProp: b ?? !1,
|
|
26
|
+
onChange: w,
|
|
27
|
+
caller: h
|
|
28
|
+
});
|
|
29
|
+
return /* @__PURE__ */ a.jsxs(z, { scope: e, checked: f, disabled: c, children: [
|
|
30
|
+
/* @__PURE__ */ a.jsx(
|
|
31
|
+
C.button,
|
|
32
|
+
{
|
|
33
|
+
type: "button",
|
|
34
|
+
role: "switch",
|
|
35
|
+
"aria-checked": f,
|
|
36
|
+
"aria-required": d,
|
|
37
|
+
"data-state": j(f),
|
|
38
|
+
"data-disabled": c ? "" : void 0,
|
|
39
|
+
disabled: c,
|
|
40
|
+
value: u,
|
|
41
|
+
...v,
|
|
42
|
+
ref: k,
|
|
43
|
+
onClick: I(t.onClick, (m) => {
|
|
44
|
+
B((T) => !T), g && (S.current = m.isPropagationStopped(), S.current || m.stopPropagation());
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
g && /* @__PURE__ */ a.jsx(
|
|
49
|
+
N,
|
|
50
|
+
{
|
|
51
|
+
control: l,
|
|
52
|
+
bubbles: !S.current,
|
|
53
|
+
name: n,
|
|
54
|
+
value: u,
|
|
55
|
+
checked: f,
|
|
56
|
+
required: d,
|
|
57
|
+
disabled: c,
|
|
58
|
+
form: i,
|
|
59
|
+
style: { transform: "translateX(-100%)" }
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] });
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
P.displayName = h;
|
|
66
|
+
var R = "SwitchThumb", E = o.forwardRef(
|
|
67
|
+
(t, r) => {
|
|
68
|
+
const { __scopeSwitch: e, ...n } = t, s = L(R, e);
|
|
69
|
+
return /* @__PURE__ */ a.jsx(
|
|
70
|
+
C.span,
|
|
71
|
+
{
|
|
72
|
+
"data-state": j(s.checked),
|
|
73
|
+
"data-disabled": s.disabled ? "" : void 0,
|
|
74
|
+
...n,
|
|
75
|
+
ref: r
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
E.displayName = R;
|
|
81
|
+
var O = "SwitchBubbleInput", N = o.forwardRef(
|
|
82
|
+
({
|
|
83
|
+
__scopeSwitch: t,
|
|
84
|
+
control: r,
|
|
85
|
+
checked: e,
|
|
86
|
+
bubbles: n = !0,
|
|
87
|
+
...s
|
|
88
|
+
}, b) => {
|
|
89
|
+
const d = o.useRef(null), c = y(d, b), u = A(e), w = U(r);
|
|
90
|
+
return o.useEffect(() => {
|
|
91
|
+
const i = d.current;
|
|
92
|
+
if (!i) return;
|
|
93
|
+
const v = window.HTMLInputElement.prototype, p = Object.getOwnPropertyDescriptor(
|
|
94
|
+
v,
|
|
95
|
+
"checked"
|
|
96
|
+
).set;
|
|
97
|
+
if (u !== e && p) {
|
|
98
|
+
const k = new Event("click", { bubbles: n });
|
|
99
|
+
p.call(i, e), i.dispatchEvent(k);
|
|
100
|
+
}
|
|
101
|
+
}, [u, e, n]), /* @__PURE__ */ a.jsx(
|
|
102
|
+
"input",
|
|
103
|
+
{
|
|
104
|
+
type: "checkbox",
|
|
105
|
+
"aria-hidden": !0,
|
|
106
|
+
defaultChecked: e,
|
|
107
|
+
...s,
|
|
108
|
+
tabIndex: -1,
|
|
109
|
+
ref: c,
|
|
110
|
+
style: {
|
|
111
|
+
...s.style,
|
|
112
|
+
...w,
|
|
113
|
+
position: "absolute",
|
|
114
|
+
pointerEvents: "none",
|
|
115
|
+
opacity: 0,
|
|
116
|
+
margin: 0
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
N.displayName = O;
|
|
123
|
+
function j(t) {
|
|
124
|
+
return t ? "checked" : "unchecked";
|
|
125
|
+
}
|
|
126
|
+
var _ = P, D = E;
|
|
127
|
+
const F = o.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ a.jsx(
|
|
128
|
+
_,
|
|
129
|
+
{
|
|
130
|
+
className: x(
|
|
131
|
+
"peer focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
132
|
+
t
|
|
133
|
+
),
|
|
134
|
+
...r,
|
|
135
|
+
ref: e,
|
|
136
|
+
children: /* @__PURE__ */ a.jsx(
|
|
137
|
+
D,
|
|
138
|
+
{
|
|
139
|
+
className: x(
|
|
140
|
+
"bg-background pointer-events-none block h-4 w-4 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
));
|
|
146
|
+
F.displayName = _.displayName;
|
|
147
|
+
export {
|
|
148
|
+
F as Switch
|
|
149
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./jsx-runtime-nZSsnGb7.js"),f=require("react"),r=require("./utils-IjLH3w2e.js");function p(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const s=p(f),n=s.forwardRef(({className:e,...a},t)=>o.jsxRuntimeExports.jsx("div",{className:"relative w-full overflow-auto",children:o.jsxRuntimeExports.jsx("table",{ref:t,className:r.cn("w-full caption-bottom text-sm",e),...a})}));n.displayName="Table";const c=s.forwardRef(({className:e,...a},t)=>o.jsxRuntimeExports.jsx("thead",{ref:t,className:r.cn("[&_tr]:border-b",e),...a}));c.displayName="TableHeader";const d=s.forwardRef(({className:e,...a},t)=>o.jsxRuntimeExports.jsx("tbody",{ref:t,className:r.cn("[&_tr:last-child]:border-0",e),...a}));d.displayName="TableBody";const b=s.forwardRef(({className:e,...a},t)=>o.jsxRuntimeExports.jsx("tfoot",{ref:t,className:r.cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...a}));b.displayName="TableFooter";const i=s.forwardRef(({className:e,...a},t)=>o.jsxRuntimeExports.jsx("tr",{ref:t,className:r.cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...a}));i.displayName="TableRow";const m=s.forwardRef(({className:e,...a},t)=>o.jsxRuntimeExports.jsx("th",{ref:t,className:r.cn("text-muted-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));m.displayName="TableHead";const x=s.forwardRef(({className:e,...a},t)=>o.jsxRuntimeExports.jsx("td",{ref:t,className:r.cn("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));x.displayName="TableCell";const u=s.forwardRef(({className:e,...a},t)=>o.jsxRuntimeExports.jsx("caption",{ref:t,className:r.cn("text-muted-foreground mt-4 text-sm",e),...a}));u.displayName="TableCaption";exports.Table=n;exports.TableBody=d;exports.TableCaption=u;exports.TableCell=x;exports.TableFooter=b;exports.TableHead=m;exports.TableHeader=c;exports.TableRow=i;
|
package/dist/table.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React_2 from 'react';
|
|
2
|
+
import { TableBodyBaseProps as TableBodyProps } from '../../ui-core/src';
|
|
3
|
+
import { TableCaptionBaseProps as TableCaptionProps } from '../../ui-core/src';
|
|
4
|
+
import { TableCellBaseProps as TableCellProps } from '../../ui-core/src';
|
|
5
|
+
import { TableFooterBaseProps as TableFooterProps } from '../../ui-core/src';
|
|
6
|
+
import { TableHeaderBaseProps as TableHeaderProps } from '../../ui-core/src';
|
|
7
|
+
import { TableHeadBaseProps as TableHeadProps } from '../../ui-core/src';
|
|
8
|
+
import { TableBaseProps as TableProps } from '../../ui-core/src';
|
|
9
|
+
import { TableRowBaseProps as TableRowProps } from '../../ui-core/src';
|
|
10
|
+
|
|
11
|
+
export declare const Table: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableElement> & TableProps & React_2.RefAttributes<HTMLTableElement>>;
|
|
12
|
+
|
|
13
|
+
export declare const TableBody: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & TableBodyProps & React_2.RefAttributes<HTMLTableSectionElement>>;
|
|
14
|
+
|
|
15
|
+
export { TableBodyProps }
|
|
16
|
+
|
|
17
|
+
export declare const TableCaption: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableCaptionElement> & TableCaptionProps & React_2.RefAttributes<HTMLTableCaptionElement>>;
|
|
18
|
+
|
|
19
|
+
export { TableCaptionProps }
|
|
20
|
+
|
|
21
|
+
export declare const TableCell: React_2.ForwardRefExoticComponent<React_2.TdHTMLAttributes<HTMLTableCellElement> & TableCellProps & React_2.RefAttributes<HTMLTableCellElement>>;
|
|
22
|
+
|
|
23
|
+
export { TableCellProps }
|
|
24
|
+
|
|
25
|
+
export declare const TableFooter: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & TableFooterProps & React_2.RefAttributes<HTMLTableSectionElement>>;
|
|
26
|
+
|
|
27
|
+
export { TableFooterProps }
|
|
28
|
+
|
|
29
|
+
export declare const TableHead: React_2.ForwardRefExoticComponent<React_2.ThHTMLAttributes<HTMLTableCellElement> & TableHeadProps & React_2.RefAttributes<HTMLTableCellElement>>;
|
|
30
|
+
|
|
31
|
+
export declare const TableHeader: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & TableHeaderProps & React_2.RefAttributes<HTMLTableSectionElement>>;
|
|
32
|
+
|
|
33
|
+
export { TableHeaderProps }
|
|
34
|
+
|
|
35
|
+
export { TableHeadProps }
|
|
36
|
+
|
|
37
|
+
export { TableProps }
|
|
38
|
+
|
|
39
|
+
export declare const TableRow: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableRowElement> & TableRowProps & React_2.RefAttributes<HTMLTableRowElement>>;
|
|
40
|
+
|
|
41
|
+
export { TableRowProps }
|
|
42
|
+
|
|
43
|
+
export { }
|
package/dist/table.es.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { j as o } from "./jsx-runtime-tc70JA_2.mjs";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { c as r } from "./utils-B6yFEsav.mjs";
|
|
4
|
+
const s = l.forwardRef(
|
|
5
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ o.jsx("table", { ref: t, className: r("w-full caption-bottom text-sm", e), ...a }) })
|
|
6
|
+
);
|
|
7
|
+
s.displayName = "Table";
|
|
8
|
+
const d = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx("thead", { ref: t, className: r("[&_tr]:border-b", e), ...a }));
|
|
9
|
+
d.displayName = "TableHeader";
|
|
10
|
+
const m = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx("tbody", { ref: t, className: r("[&_tr:last-child]:border-0", e), ...a }));
|
|
11
|
+
m.displayName = "TableBody";
|
|
12
|
+
const b = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx("tfoot", { ref: t, className: r("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", e), ...a }));
|
|
13
|
+
b.displayName = "TableFooter";
|
|
14
|
+
const c = l.forwardRef(
|
|
15
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx(
|
|
16
|
+
"tr",
|
|
17
|
+
{
|
|
18
|
+
ref: t,
|
|
19
|
+
className: r("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", e),
|
|
20
|
+
...a
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
c.displayName = "TableRow";
|
|
25
|
+
const f = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx(
|
|
26
|
+
"th",
|
|
27
|
+
{
|
|
28
|
+
ref: t,
|
|
29
|
+
className: r(
|
|
30
|
+
"text-muted-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
31
|
+
e
|
|
32
|
+
),
|
|
33
|
+
...a
|
|
34
|
+
}
|
|
35
|
+
));
|
|
36
|
+
f.displayName = "TableHead";
|
|
37
|
+
const i = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx(
|
|
38
|
+
"td",
|
|
39
|
+
{
|
|
40
|
+
ref: t,
|
|
41
|
+
className: r("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", e),
|
|
42
|
+
...a
|
|
43
|
+
}
|
|
44
|
+
));
|
|
45
|
+
i.displayName = "TableCell";
|
|
46
|
+
const n = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx("caption", { ref: t, className: r("text-muted-foreground mt-4 text-sm", e), ...a }));
|
|
47
|
+
n.displayName = "TableCaption";
|
|
48
|
+
export {
|
|
49
|
+
s as Table,
|
|
50
|
+
m as TableBody,
|
|
51
|
+
n as TableCaption,
|
|
52
|
+
i as TableCell,
|
|
53
|
+
b as TableFooter,
|
|
54
|
+
f as TableHead,
|
|
55
|
+
d as TableHeader,
|
|
56
|
+
c as TableRow
|
|
57
|
+
};
|
package/dist/tabs.cjs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./jsx-runtime-nZSsnGb7.js"),F=require("react"),f=require("./index-BtZvtDmp.js"),D=require("./index-D2HnlO3y.js"),p=require("./index-DIsg7zU7.js"),k=require("./index-B2XtpfGY.js"),G=require("./index-Dko2XdTk.js"),O=require("./index-Ce5TOFAK.js"),V=require("./index-CefEQe_4.js"),x=require("./utils-IjLH3w2e.js");function L(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const d=L(F);var g="Tabs",[H]=D.createContextScope(g,[p.createRovingFocusGroupScope]),j=p.createRovingFocusGroupScope(),[K,T]=H(g),R=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:i,defaultValue:u,orientation:a="horizontal",dir:l,activationMode:v="automatic",...m}=e,s=G.useDirection(l),[r,b]=O.useControllableState({prop:o,onChange:i,defaultProp:u??"",caller:g});return c.jsxRuntimeExports.jsx(K,{scope:n,baseId:V.useId(),value:r,onValueChange:b,orientation:a,dir:s,activationMode:v,children:c.jsxRuntimeExports.jsx(f.Primitive.div,{dir:s,"data-orientation":a,...m,ref:t})})});R.displayName=g;var y="TabsList",E=d.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...i}=e,u=T(y,n),a=j(n);return c.jsxRuntimeExports.jsx(p.Root,{asChild:!0,...a,orientation:u.orientation,dir:u.dir,loop:o,children:c.jsxRuntimeExports.jsx(f.Primitive.div,{role:"tablist","aria-orientation":u.orientation,...i,ref:t})})});E.displayName=y;var N="TabsTrigger",h=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:i=!1,...u}=e,a=T(N,n),l=j(n),v=P(a.baseId,o),m=_(a.baseId,o),s=o===a.value;return c.jsxRuntimeExports.jsx(p.Item,{asChild:!0,...l,focusable:!i,active:s,children:c.jsxRuntimeExports.jsx(f.Primitive.button,{type:"button",role:"tab","aria-selected":s,"aria-controls":m,"data-state":s?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:v,...u,ref:t,onMouseDown:f.composeEventHandlers(e.onMouseDown,r=>{!i&&r.button===0&&r.ctrlKey===!1?a.onValueChange(o):r.preventDefault()}),onKeyDown:f.composeEventHandlers(e.onKeyDown,r=>{[" ","Enter"].includes(r.key)&&a.onValueChange(o)}),onFocus:f.composeEventHandlers(e.onFocus,()=>{const r=a.activationMode!=="manual";!s&&!i&&r&&a.onValueChange(o)})})})});h.displayName=N;var C="TabsContent",I=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:i,children:u,...a}=e,l=T(C,n),v=P(l.baseId,o),m=_(l.baseId,o),s=o===l.value,r=d.useRef(s);return d.useEffect(()=>{const b=requestAnimationFrame(()=>r.current=!1);return()=>cancelAnimationFrame(b)},[]),c.jsxRuntimeExports.jsx(k.Presence,{present:i||s,children:({present:b})=>c.jsxRuntimeExports.jsx(f.Primitive.div,{"data-state":s?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":v,hidden:!b,id:m,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:r.current?"0s":void 0},children:b&&u})})});I.displayName=C;function P(e,t){return`${e}-trigger-${t}`}function _(e,t){return`${e}-content-${t}`}var z=R,w=E,S=h,$=I;const B=z,A=d.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(w,{ref:n,className:x.cn("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...t}));A.displayName=w.displayName;const M=d.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(S,{ref:n,className:x.cn("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...t}));M.displayName=S.displayName;const q=d.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx($,{ref:n,className:x.cn("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...t}));q.displayName=$.displayName;exports.Tabs=B;exports.TabsContent=q;exports.TabsList=A;exports.TabsTrigger=M;
|
package/dist/tabs.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React_2 from 'react';
|
|
2
|
+
import { TabsContentBaseProps as TabsContentProps } from '../../ui-core/src';
|
|
3
|
+
import { TabsListBaseProps as TabsListProps } from '../../ui-core/src';
|
|
4
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
5
|
+
import { TabsBaseProps as TabsProps } from '../../ui-core/src';
|
|
6
|
+
import { TabsTriggerBaseProps as TabsTriggerProps } from '../../ui-core/src';
|
|
7
|
+
|
|
8
|
+
export declare const Tabs: React_2.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
|
|
10
|
+
export declare const TabsContent: React_2.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & TabsContentProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
|
|
12
|
+
export { TabsContentProps }
|
|
13
|
+
|
|
14
|
+
export declare const TabsList: React_2.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & TabsListProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
|
|
16
|
+
export { TabsListProps }
|
|
17
|
+
|
|
18
|
+
export { TabsProps }
|
|
19
|
+
|
|
20
|
+
export declare const TabsTrigger: React_2.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & TabsTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
|
|
22
|
+
export { TabsTriggerProps }
|
|
23
|
+
|
|
24
|
+
export { }
|
package/dist/tabs.es.js
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { j as c } from "./jsx-runtime-tc70JA_2.mjs";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { P as b, c as g } from "./index-K9FzbxYw.mjs";
|
|
4
|
+
import { c as F } from "./index-IZ2gq03c.mjs";
|
|
5
|
+
import { R as $, I as D, c as y } from "./index-Bv7qrYW6.mjs";
|
|
6
|
+
import { P as V } from "./index-vuPgkS0V.mjs";
|
|
7
|
+
import { u as k } from "./index-CD6_IrA-.mjs";
|
|
8
|
+
import { u as G } from "./index-p6xVFRb4.mjs";
|
|
9
|
+
import { u as L } from "./index-DnFcfnA9.mjs";
|
|
10
|
+
import { c as T } from "./utils-B6yFEsav.mjs";
|
|
11
|
+
var p = "Tabs", [K] = F(p, [
|
|
12
|
+
y
|
|
13
|
+
]), h = y(), [B, x] = K(p), N = l.forwardRef(
|
|
14
|
+
(e, t) => {
|
|
15
|
+
const {
|
|
16
|
+
__scopeTabs: a,
|
|
17
|
+
value: o,
|
|
18
|
+
onValueChange: s,
|
|
19
|
+
defaultValue: d,
|
|
20
|
+
orientation: n = "horizontal",
|
|
21
|
+
dir: u,
|
|
22
|
+
activationMode: m = "automatic",
|
|
23
|
+
...v
|
|
24
|
+
} = e, i = k(u), [r, f] = G({
|
|
25
|
+
prop: o,
|
|
26
|
+
onChange: s,
|
|
27
|
+
defaultProp: d ?? "",
|
|
28
|
+
caller: p
|
|
29
|
+
});
|
|
30
|
+
return /* @__PURE__ */ c.jsx(
|
|
31
|
+
B,
|
|
32
|
+
{
|
|
33
|
+
scope: a,
|
|
34
|
+
baseId: L(),
|
|
35
|
+
value: r,
|
|
36
|
+
onValueChange: f,
|
|
37
|
+
orientation: n,
|
|
38
|
+
dir: i,
|
|
39
|
+
activationMode: m,
|
|
40
|
+
children: /* @__PURE__ */ c.jsx(
|
|
41
|
+
b.div,
|
|
42
|
+
{
|
|
43
|
+
dir: i,
|
|
44
|
+
"data-orientation": n,
|
|
45
|
+
...v,
|
|
46
|
+
ref: t
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
N.displayName = p;
|
|
54
|
+
var C = "TabsList", R = l.forwardRef(
|
|
55
|
+
(e, t) => {
|
|
56
|
+
const { __scopeTabs: a, loop: o = !0, ...s } = e, d = x(C, a), n = h(a);
|
|
57
|
+
return /* @__PURE__ */ c.jsx(
|
|
58
|
+
$,
|
|
59
|
+
{
|
|
60
|
+
asChild: !0,
|
|
61
|
+
...n,
|
|
62
|
+
orientation: d.orientation,
|
|
63
|
+
dir: d.dir,
|
|
64
|
+
loop: o,
|
|
65
|
+
children: /* @__PURE__ */ c.jsx(
|
|
66
|
+
b.div,
|
|
67
|
+
{
|
|
68
|
+
role: "tablist",
|
|
69
|
+
"aria-orientation": d.orientation,
|
|
70
|
+
...s,
|
|
71
|
+
ref: t
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
R.displayName = C;
|
|
79
|
+
var I = "TabsTrigger", j = l.forwardRef(
|
|
80
|
+
(e, t) => {
|
|
81
|
+
const { __scopeTabs: a, value: o, disabled: s = !1, ...d } = e, n = x(I, a), u = h(a), m = A(n.baseId, o), v = P(n.baseId, o), i = o === n.value;
|
|
82
|
+
return /* @__PURE__ */ c.jsx(
|
|
83
|
+
D,
|
|
84
|
+
{
|
|
85
|
+
asChild: !0,
|
|
86
|
+
...u,
|
|
87
|
+
focusable: !s,
|
|
88
|
+
active: i,
|
|
89
|
+
children: /* @__PURE__ */ c.jsx(
|
|
90
|
+
b.button,
|
|
91
|
+
{
|
|
92
|
+
type: "button",
|
|
93
|
+
role: "tab",
|
|
94
|
+
"aria-selected": i,
|
|
95
|
+
"aria-controls": v,
|
|
96
|
+
"data-state": i ? "active" : "inactive",
|
|
97
|
+
"data-disabled": s ? "" : void 0,
|
|
98
|
+
disabled: s,
|
|
99
|
+
id: m,
|
|
100
|
+
...d,
|
|
101
|
+
ref: t,
|
|
102
|
+
onMouseDown: g(e.onMouseDown, (r) => {
|
|
103
|
+
!s && r.button === 0 && r.ctrlKey === !1 ? n.onValueChange(o) : r.preventDefault();
|
|
104
|
+
}),
|
|
105
|
+
onKeyDown: g(e.onKeyDown, (r) => {
|
|
106
|
+
[" ", "Enter"].includes(r.key) && n.onValueChange(o);
|
|
107
|
+
}),
|
|
108
|
+
onFocus: g(e.onFocus, () => {
|
|
109
|
+
const r = n.activationMode !== "manual";
|
|
110
|
+
!i && !s && r && n.onValueChange(o);
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
j.displayName = I;
|
|
119
|
+
var w = "TabsContent", _ = l.forwardRef(
|
|
120
|
+
(e, t) => {
|
|
121
|
+
const { __scopeTabs: a, value: o, forceMount: s, children: d, ...n } = e, u = x(w, a), m = A(u.baseId, o), v = P(u.baseId, o), i = o === u.value, r = l.useRef(i);
|
|
122
|
+
return l.useEffect(() => {
|
|
123
|
+
const f = requestAnimationFrame(() => r.current = !1);
|
|
124
|
+
return () => cancelAnimationFrame(f);
|
|
125
|
+
}, []), /* @__PURE__ */ c.jsx(V, { present: s || i, children: ({ present: f }) => /* @__PURE__ */ c.jsx(
|
|
126
|
+
b.div,
|
|
127
|
+
{
|
|
128
|
+
"data-state": i ? "active" : "inactive",
|
|
129
|
+
"data-orientation": u.orientation,
|
|
130
|
+
role: "tabpanel",
|
|
131
|
+
"aria-labelledby": m,
|
|
132
|
+
hidden: !f,
|
|
133
|
+
id: v,
|
|
134
|
+
tabIndex: 0,
|
|
135
|
+
...n,
|
|
136
|
+
ref: t,
|
|
137
|
+
style: {
|
|
138
|
+
...e.style,
|
|
139
|
+
animationDuration: r.current ? "0s" : void 0
|
|
140
|
+
},
|
|
141
|
+
children: f && d
|
|
142
|
+
}
|
|
143
|
+
) });
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
_.displayName = w;
|
|
147
|
+
function A(e, t) {
|
|
148
|
+
return `${e}-trigger-${t}`;
|
|
149
|
+
}
|
|
150
|
+
function P(e, t) {
|
|
151
|
+
return `${e}-content-${t}`;
|
|
152
|
+
}
|
|
153
|
+
var q = N, E = R, M = j, S = _;
|
|
154
|
+
const ae = q, z = l.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ c.jsx(
|
|
155
|
+
E,
|
|
156
|
+
{
|
|
157
|
+
ref: a,
|
|
158
|
+
className: T(
|
|
159
|
+
"bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",
|
|
160
|
+
e
|
|
161
|
+
),
|
|
162
|
+
...t
|
|
163
|
+
}
|
|
164
|
+
));
|
|
165
|
+
z.displayName = E.displayName;
|
|
166
|
+
const H = l.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ c.jsx(
|
|
167
|
+
M,
|
|
168
|
+
{
|
|
169
|
+
ref: a,
|
|
170
|
+
className: T(
|
|
171
|
+
"ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",
|
|
172
|
+
e
|
|
173
|
+
),
|
|
174
|
+
...t
|
|
175
|
+
}
|
|
176
|
+
));
|
|
177
|
+
H.displayName = M.displayName;
|
|
178
|
+
const O = l.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ c.jsx(
|
|
179
|
+
S,
|
|
180
|
+
{
|
|
181
|
+
ref: a,
|
|
182
|
+
className: T(
|
|
183
|
+
"ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
|
|
184
|
+
e
|
|
185
|
+
),
|
|
186
|
+
...t
|
|
187
|
+
}
|
|
188
|
+
));
|
|
189
|
+
O.displayName = S.displayName;
|
|
190
|
+
export {
|
|
191
|
+
ae as Tabs,
|
|
192
|
+
O as TabsContent,
|
|
193
|
+
z as TabsList,
|
|
194
|
+
H as TabsTrigger
|
|
195
|
+
};
|
package/dist/text.cjs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./jsx-runtime-nZSsnGb7.js"),d=require("class-variance-authority"),u=require("react"),x=require("./utils-IjLH3w2e.js");function m(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const b=m(u),a=d.cva("",{variants:{variant:{h1:"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl font-semibold tracking-tight",h3:"scroll-m-20 text-2xl font-semibold tracking-tight",h4:"scroll-m-20 text-xl font-semibold tracking-tight",body:"leading-7",bodySmall:"text-sm leading-6",caption:"text-xs text-muted-foreground",label:"text-sm font-medium leading-none",overline:"text-xs font-semibold uppercase tracking-widest text-muted-foreground"}},defaultVariants:{variant:"body"}}),g={h1:"h1",h2:"h2",h3:"h3",h4:"h4",body:"p",bodySmall:"p",caption:"span",label:"label",overline:"span"},r=b.forwardRef(({className:t,variant:e="body",as:n,children:o,...l},i)=>{const s=n||g[e??"body"]||"p";return c.jsxRuntimeExports.jsx(s,{ref:i,className:x.cn(a({variant:e,className:t})),...l,children:o})});r.displayName="Text";exports.Text=r;exports.textVariants=a;
|
package/dist/text.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import { TextBaseProps } from '../../ui-core/src';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const Text_2: React_2.ForwardRefExoticComponent<TextProps & React_2.RefAttributes<HTMLElement>>;
|
|
7
|
+
export { Text_2 as Text }
|
|
8
|
+
|
|
9
|
+
export declare interface TextProps extends React_2.HTMLAttributes<HTMLElement>, VariantProps<typeof textVariants>, TextBaseProps {
|
|
10
|
+
as?: keyof React_2.JSX.IntrinsicElements;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export declare const textVariants: (props?: ({
|
|
14
|
+
variant?: "h1" | "h2" | "h3" | "h4" | "body" | "bodySmall" | "caption" | "label" | "overline" | null | undefined;
|
|
15
|
+
} & ClassProp) | undefined) => string;
|
|
16
|
+
|
|
17
|
+
export { }
|
package/dist/text.es.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { j as i } from "./jsx-runtime-tc70JA_2.mjs";
|
|
2
|
+
import { cva as s } from "class-variance-authority";
|
|
3
|
+
import * as m from "react";
|
|
4
|
+
import { c as x } from "./utils-B6yFEsav.mjs";
|
|
5
|
+
const d = s("", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
h1: "scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",
|
|
9
|
+
h2: "scroll-m-20 text-3xl font-semibold tracking-tight",
|
|
10
|
+
h3: "scroll-m-20 text-2xl font-semibold tracking-tight",
|
|
11
|
+
h4: "scroll-m-20 text-xl font-semibold tracking-tight",
|
|
12
|
+
body: "leading-7",
|
|
13
|
+
bodySmall: "text-sm leading-6",
|
|
14
|
+
caption: "text-xs text-muted-foreground",
|
|
15
|
+
label: "text-sm font-medium leading-none",
|
|
16
|
+
overline: "text-xs font-semibold uppercase tracking-widest text-muted-foreground"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "body"
|
|
21
|
+
}
|
|
22
|
+
}), c = {
|
|
23
|
+
h1: "h1",
|
|
24
|
+
h2: "h2",
|
|
25
|
+
h3: "h3",
|
|
26
|
+
h4: "h4",
|
|
27
|
+
body: "p",
|
|
28
|
+
bodySmall: "p",
|
|
29
|
+
caption: "span",
|
|
30
|
+
label: "label",
|
|
31
|
+
overline: "span"
|
|
32
|
+
}, p = m.forwardRef(
|
|
33
|
+
({ className: e, variant: t = "body", as: o, children: a, ...l }, n) => {
|
|
34
|
+
const r = o || c[t ?? "body"] || "p";
|
|
35
|
+
return /* @__PURE__ */ i.jsx(r, { ref: n, className: x(d({ variant: t, className: e })), ...l, children: a });
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
p.displayName = "Text";
|
|
39
|
+
export {
|
|
40
|
+
p as Text,
|
|
41
|
+
d as textVariants
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./jsx-runtime-nZSsnGb7.js"),s=require("react"),i=require("./utils-IjLH3w2e.js");function u(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const c=u(s),o=c.forwardRef(({className:e,...r},t)=>a.jsxRuntimeExports.jsx("textarea",{className:i.cn("border-input placeholder:text-muted-foreground focus-visible:ring-ring flex min-h-[60px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-sm focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:t,...r}));o.displayName="Textarea";exports.Textarea=o;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React_2 from 'react';
|
|
2
|
+
import { TextareaBaseProps } from '../../ui-core/src';
|
|
3
|
+
|
|
4
|
+
export declare const Textarea: React_2.ForwardRefExoticComponent<TextareaProps & React_2.RefAttributes<HTMLTextAreaElement>>;
|
|
5
|
+
|
|
6
|
+
export declare interface TextareaProps extends Omit<React_2.TextareaHTMLAttributes<HTMLTextAreaElement>, keyof TextareaBaseProps>, TextareaBaseProps {
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-tc70JA_2.mjs";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { c as s } from "./utils-B6yFEsav.mjs";
|
|
4
|
+
const i = a.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t.jsx(
|
|
5
|
+
"textarea",
|
|
6
|
+
{
|
|
7
|
+
className: s(
|
|
8
|
+
"border-input placeholder:text-muted-foreground focus-visible:ring-ring flex min-h-[60px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-sm focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
9
|
+
e
|
|
10
|
+
),
|
|
11
|
+
ref: o,
|
|
12
|
+
...r
|
|
13
|
+
}
|
|
14
|
+
));
|
|
15
|
+
i.displayName = "Textarea";
|
|
16
|
+
export {
|
|
17
|
+
i as Textarea
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-nZSsnGb7.js"),s=require("./index-CsjrqSSN.js");function i({children:e,...t}){return r.jsxRuntimeExports.jsx(s.J,{attribute:"class",defaultTheme:"system",enableSystem:!0,...t,children:e})}exports.ThemeProvider=i;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { ThemeProviderBaseProps } from '../../ui-core/src';
|
|
3
|
+
import { ThemeProviderProps as ThemeProviderProps_2 } from 'next-themes';
|
|
4
|
+
|
|
5
|
+
export declare function ThemeProvider({ children, ...props }: ThemeProviderProps): JSX.Element;
|
|
6
|
+
|
|
7
|
+
export declare type ThemeProviderProps = ThemeProviderProps_2 & ThemeProviderBaseProps;
|
|
8
|
+
|
|
9
|
+
export { }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { j as r } from "./jsx-runtime-tc70JA_2.mjs";
|
|
2
|
+
import { J as m } from "./index-DAWHN3cH.mjs";
|
|
3
|
+
function i({ children: e, ...t }) {
|
|
4
|
+
return /* @__PURE__ */ r.jsx(m, { attribute: "class", defaultTheme: "system", enableSystem: !0, ...t, children: e });
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
i as ThemeProvider
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-nZSsnGb7.js"),s=require("lucide-react"),h=require("./button.cjs.js"),t=require("./dropdown-menu.cjs.js"),d=require("@gv-tech/design-tokens"),E=require("./index-CsjrqSSN.js"),r=require("./utils-IjLH3w2e.js");function T(){const o=E.z(),{resolvedTheme:i}=o,n=i==="dark"?d.theme.dark:d.theme.light;return{...o,tokens:n}}function k({variant:o="binary",onThemeChange:i,customTheme:n,className:c}){const{theme:p,setTheme:R,resolvedTheme:g}=T(),l=n??p,m=(n||g)==="dark",a=l==="system",x=j=>{i?i(j):R(j)},u=()=>e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(s.Sun,{className:r.cn("h-[1.2rem] w-[1.2rem] transition-all",!a&&!m?"scale-100 rotate-0":"scale-0 -rotate-90")}),e.jsxRuntimeExports.jsx(s.Moon,{className:r.cn("absolute h-[1.2rem] w-[1.2rem] transition-all",!a&&m?"scale-100 rotate-0":"scale-0 rotate-90")}),e.jsxRuntimeExports.jsx(s.SunMoon,{className:r.cn("absolute h-[1.2rem] w-[1.2rem] transition-all",a?"scale-100 rotate-0":"scale-0 rotate-90")}),e.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Toggle theme"})]});return o==="ternary"?e.jsxRuntimeExports.jsxs(t.DropdownMenu,{children:[e.jsxRuntimeExports.jsx(t.DropdownMenuTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx(h.Button,{variant:"ghost",size:"icon",className:r.cn("relative h-9 w-9",c),children:e.jsxRuntimeExports.jsx(u,{})})}),e.jsxRuntimeExports.jsxs(t.DropdownMenuContent,{align:"end",children:[e.jsxRuntimeExports.jsxs(t.DropdownMenuItem,{onClick:()=>x("light"),children:[e.jsxRuntimeExports.jsx(s.Sun,{className:"mr-2 h-4 w-4"}),e.jsxRuntimeExports.jsx("span",{children:"Light"})]}),e.jsxRuntimeExports.jsxs(t.DropdownMenuItem,{onClick:()=>x("dark"),children:[e.jsxRuntimeExports.jsx(s.Moon,{className:"mr-2 h-4 w-4"}),e.jsxRuntimeExports.jsx("span",{children:"Dark"})]}),e.jsxRuntimeExports.jsxs(t.DropdownMenuItem,{onClick:()=>x("system"),children:[e.jsxRuntimeExports.jsx(s.SunMoon,{className:"mr-2 h-4 w-4"}),e.jsxRuntimeExports.jsx("span",{children:"System"})]})]})]}):e.jsxRuntimeExports.jsx(h.Button,{variant:"ghost",size:"icon",className:r.cn("relative h-9 w-9",c),onClick:()=>x(l==="dark"?"light":"dark"),"aria-label":"Toggle theme",children:e.jsxRuntimeExports.jsx(u,{})})}exports.ThemeToggle=k;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { ThemeToggleBaseProps } from '../../ui-core/src';
|
|
3
|
+
|
|
4
|
+
export declare function ThemeToggle({ variant, onThemeChange, customTheme, className }: ThemeToggleProps): JSX.Element;
|
|
5
|
+
|
|
6
|
+
export declare type ThemeToggleProps = ThemeToggleBaseProps;
|
|
7
|
+
|
|
8
|
+
export { }
|