@kyle-test/zto-react-kit 0.0.0-alpha.3 → 0.0.0-alpha.4
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/components/Button/index.d.ts +1 -1
- package/dist/components/Form/NumberInput/index.d.ts +1 -1
- package/dist/components/Form/Textarea/index.d.ts +1 -1
- package/dist/components/shadcn/button.d.ts +1 -1
- package/dist/components/shadcn/sidebar.d.ts +2 -2
- package/dist/index.js +37 -37
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonProps as ShadcnButtonProps, buttonVariants } from '
|
|
1
|
+
import { ButtonProps as ShadcnButtonProps, buttonVariants } from '../shadcn/button';
|
|
2
2
|
import { TooltipContent, TooltipPortal } from '../shadcn/tooltip';
|
|
3
3
|
export type ButtonProps = Omit<ShadcnButtonProps, 'onClick'> & {
|
|
4
4
|
tooltip?: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { TextareaAutosize as ShadcnTextareaAutosize } from '
|
|
3
|
+
import { TextareaAutosize as ShadcnTextareaAutosize } from '../../shadcn/textarea';
|
|
4
4
|
declare const inputVariants: (props?: ({
|
|
5
5
|
style?: "default" | "error" | null | undefined;
|
|
6
6
|
size?: "default" | "sm" | "md" | "lg" | null | undefined;
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "success" | "link" | "secondary" | "secondaryColor" | "tertiary" | "tertiaryColor" | "linkColor" | "destructive" | "destructiveSecondary" | "destructiveTertiary" | "destructiveLink" | "ghost" | null | undefined;
|
|
5
5
|
width?: "default" | "min" | null | undefined;
|
|
6
|
-
size?: "default" | "sm" | "md" | "icon" | "
|
|
6
|
+
size?: "default" | "sm" | "md" | "icon" | "lg" | "xs" | "iconMd" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
9
9
|
asChild?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { TooltipContent } from '
|
|
3
|
+
import { TooltipContent } from './tooltip';
|
|
4
4
|
type SidebarContext = {
|
|
5
5
|
state: 'expanded' | 'collapsed';
|
|
6
6
|
open: boolean;
|
|
@@ -23,7 +23,7 @@ declare const Sidebar: React.ForwardRefExoticComponent<Omit<React.ClassAttribute
|
|
|
23
23
|
collapsible?: "offcanvas" | "icon" | "none";
|
|
24
24
|
handleClassName?: string;
|
|
25
25
|
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
-
declare const SidebarTrigger: React.ForwardRefExoticComponent<Omit<import("
|
|
26
|
+
declare const SidebarTrigger: React.ForwardRefExoticComponent<Omit<import("./button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
27
27
|
declare const SidebarRail: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
28
28
|
declare const SidebarInset: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
29
29
|
declare const SidebarInput: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
package/dist/index.js
CHANGED
|
@@ -6744,7 +6744,23 @@ const Rp = "96px", kp = (e) => e === void 0 ? Rp : typeof e == "number" ? `${e}p
|
|
|
6744
6744
|
},
|
|
6745
6745
|
void 0
|
|
6746
6746
|
);
|
|
6747
|
-
},
|
|
6747
|
+
}, ou = Ed(void 0);
|
|
6748
|
+
function Pp() {
|
|
6749
|
+
return Al(ou);
|
|
6750
|
+
}
|
|
6751
|
+
function Uy({ children: e, size: t = "md", required: n = !1, ...r }) {
|
|
6752
|
+
const o = { size: t, required: n };
|
|
6753
|
+
return /* @__PURE__ */ U.jsxDEV(ou.Provider, { value: o, children: /* @__PURE__ */ U.jsxDEV("div", { ...r, children: e }, void 0, !1, {
|
|
6754
|
+
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Form/Group/index.tsx",
|
|
6755
|
+
lineNumber: 24,
|
|
6756
|
+
columnNumber: 7
|
|
6757
|
+
}, this) }, void 0, !1, {
|
|
6758
|
+
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Form/Group/index.tsx",
|
|
6759
|
+
lineNumber: 23,
|
|
6760
|
+
columnNumber: 5
|
|
6761
|
+
}, this);
|
|
6762
|
+
}
|
|
6763
|
+
const _p = Qn(
|
|
6748
6764
|
"inline-flex items-center justify-center [gap:var(--zto-button-gap,0.25rem)] whitespace-nowrap [border-radius:var(--zto-button-border-radius,0.5rem)] border border-solid text-sm font-semibold ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-600 focus-visible:ring-offset-2 hover:shadow-sm disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-5 [&_svg]:size-5 [&_svg]:shrink-0 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300 disabled:!cursor-not-allowed",
|
|
6749
6765
|
{
|
|
6750
6766
|
variants: {
|
|
@@ -6785,7 +6801,7 @@ const Rp = "96px", kp = (e) => e === void 0 ? Rp : typeof e == "number" ? `${e}p
|
|
|
6785
6801
|
}
|
|
6786
6802
|
), Li = l.forwardRef(
|
|
6787
6803
|
({ className: e, variant: t, size: n, width: r, asChild: o = !1, ...i }, a) => {
|
|
6788
|
-
const s = o ? Uo : "button", c = Fe(
|
|
6804
|
+
const s = o ? Uo : "button", c = Fe(_p({ variant: t, size: n, width: r, className: e })), u = c.replace(/\sh-\d+/, "");
|
|
6789
6805
|
return /* @__PURE__ */ U.jsxDEV(
|
|
6790
6806
|
s,
|
|
6791
6807
|
{
|
|
@@ -6805,22 +6821,6 @@ const Rp = "96px", kp = (e) => e === void 0 ? Rp : typeof e == "number" ? `${e}p
|
|
|
6805
6821
|
}
|
|
6806
6822
|
);
|
|
6807
6823
|
Li.displayName = "Button";
|
|
6808
|
-
const ou = Ed(void 0);
|
|
6809
|
-
function _p() {
|
|
6810
|
-
return Al(ou);
|
|
6811
|
-
}
|
|
6812
|
-
function Uy({ children: e, size: t = "md", required: n = !1, ...r }) {
|
|
6813
|
-
const o = { size: t, required: n };
|
|
6814
|
-
return /* @__PURE__ */ U.jsxDEV(ou.Provider, { value: o, children: /* @__PURE__ */ U.jsxDEV("div", { ...r, children: e }, void 0, !1, {
|
|
6815
|
-
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Form/Group/index.tsx",
|
|
6816
|
-
lineNumber: 24,
|
|
6817
|
-
columnNumber: 7
|
|
6818
|
-
}, this) }, void 0, !1, {
|
|
6819
|
-
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Form/Group/index.tsx",
|
|
6820
|
-
lineNumber: 23,
|
|
6821
|
-
columnNumber: 5
|
|
6822
|
-
}, this);
|
|
6823
|
-
}
|
|
6824
6824
|
function Tp({
|
|
6825
6825
|
tooltip: e,
|
|
6826
6826
|
tooltipContentProps: t,
|
|
@@ -6828,7 +6828,7 @@ function Tp({
|
|
|
6828
6828
|
tooltipPortalProps: r,
|
|
6829
6829
|
...o
|
|
6830
6830
|
}) {
|
|
6831
|
-
const { size: i } = o, a =
|
|
6831
|
+
const { size: i } = o, a = Pp();
|
|
6832
6832
|
return e ? /* @__PURE__ */ U.jsxDEV(Ra, { children: /* @__PURE__ */ U.jsxDEV(ka, { children: [
|
|
6833
6833
|
/* @__PURE__ */ U.jsxDEV(Pa, { asChild: !0, children: /* @__PURE__ */ U.jsxDEV("div", { className: Fe("w-fit h-fit", n, o.disabled && "!cursor-not-allowed"), children: /* @__PURE__ */ U.jsxDEV(
|
|
6834
6834
|
Li,
|
|
@@ -6840,42 +6840,42 @@ function Tp({
|
|
|
6840
6840
|
!1,
|
|
6841
6841
|
{
|
|
6842
6842
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Button/index.tsx",
|
|
6843
|
-
lineNumber:
|
|
6843
|
+
lineNumber: 37,
|
|
6844
6844
|
columnNumber: 15
|
|
6845
6845
|
},
|
|
6846
6846
|
this
|
|
6847
6847
|
) }, void 0, !1, {
|
|
6848
6848
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Button/index.tsx",
|
|
6849
|
-
lineNumber:
|
|
6849
|
+
lineNumber: 36,
|
|
6850
6850
|
columnNumber: 13
|
|
6851
6851
|
}, this) }, void 0, !1, {
|
|
6852
6852
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Button/index.tsx",
|
|
6853
|
-
lineNumber:
|
|
6853
|
+
lineNumber: 35,
|
|
6854
6854
|
columnNumber: 11
|
|
6855
6855
|
}, this),
|
|
6856
6856
|
/* @__PURE__ */ U.jsxDEV(_a, { ...r, children: /* @__PURE__ */ U.jsxDEV(jo, { ...t, children: [
|
|
6857
6857
|
/* @__PURE__ */ U.jsxDEV(Ta, {}, void 0, !1, {
|
|
6858
6858
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Button/index.tsx",
|
|
6859
|
-
lineNumber:
|
|
6859
|
+
lineNumber: 46,
|
|
6860
6860
|
columnNumber: 15
|
|
6861
6861
|
}, this),
|
|
6862
6862
|
e
|
|
6863
6863
|
] }, void 0, !0, {
|
|
6864
6864
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Button/index.tsx",
|
|
6865
|
-
lineNumber:
|
|
6865
|
+
lineNumber: 45,
|
|
6866
6866
|
columnNumber: 13
|
|
6867
6867
|
}, this) }, void 0, !1, {
|
|
6868
6868
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Button/index.tsx",
|
|
6869
|
-
lineNumber:
|
|
6869
|
+
lineNumber: 44,
|
|
6870
6870
|
columnNumber: 11
|
|
6871
6871
|
}, this)
|
|
6872
6872
|
] }, void 0, !0, {
|
|
6873
6873
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Button/index.tsx",
|
|
6874
|
-
lineNumber:
|
|
6874
|
+
lineNumber: 34,
|
|
6875
6875
|
columnNumber: 9
|
|
6876
6876
|
}, this) }, void 0, !1, {
|
|
6877
6877
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Button/index.tsx",
|
|
6878
|
-
lineNumber:
|
|
6878
|
+
lineNumber: 33,
|
|
6879
6879
|
columnNumber: 7
|
|
6880
6880
|
}, this) : /* @__PURE__ */ U.jsxDEV(
|
|
6881
6881
|
Li,
|
|
@@ -6887,7 +6887,7 @@ function Tp({
|
|
|
6887
6887
|
!1,
|
|
6888
6888
|
{
|
|
6889
6889
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Button/index.tsx",
|
|
6890
|
-
lineNumber:
|
|
6890
|
+
lineNumber: 56,
|
|
6891
6891
|
columnNumber: 5
|
|
6892
6892
|
},
|
|
6893
6893
|
this
|
|
@@ -7486,22 +7486,22 @@ const Fs = Qn("placeholder:text-gray-500", {
|
|
|
7486
7486
|
!1,
|
|
7487
7487
|
{
|
|
7488
7488
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Form/Input/index.tsx",
|
|
7489
|
-
lineNumber:
|
|
7489
|
+
lineNumber: 44,
|
|
7490
7490
|
columnNumber: 11
|
|
7491
7491
|
},
|
|
7492
7492
|
void 0
|
|
7493
7493
|
) }, void 0, !1, {
|
|
7494
7494
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Form/Input/index.tsx",
|
|
7495
|
-
lineNumber:
|
|
7495
|
+
lineNumber: 43,
|
|
7496
7496
|
columnNumber: 9
|
|
7497
7497
|
}, void 0);
|
|
7498
7498
|
const u = "flex items-center justify-center [&_svg]:size-5", d = n ? /* @__PURE__ */ U.jsxDEV("div", { className: Fe(u, "pr-1"), children: n }, void 0, !1, {
|
|
7499
7499
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Form/Input/index.tsx",
|
|
7500
|
-
lineNumber:
|
|
7500
|
+
lineNumber: 55,
|
|
7501
7501
|
columnNumber: 46
|
|
7502
7502
|
}, void 0) : null, f = r ? /* @__PURE__ */ U.jsxDEV("div", { className: Fe(u, "pl-1"), children: r }, void 0, !1, {
|
|
7503
7503
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Form/Input/index.tsx",
|
|
7504
|
-
lineNumber:
|
|
7504
|
+
lineNumber: 56,
|
|
7505
7505
|
columnNumber: 42
|
|
7506
7506
|
}, void 0) : null, m = Fe(
|
|
7507
7507
|
mu,
|
|
@@ -7525,7 +7525,7 @@ const Fs = Qn("placeholder:text-gray-500", {
|
|
|
7525
7525
|
!1,
|
|
7526
7526
|
{
|
|
7527
7527
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Form/Input/index.tsx",
|
|
7528
|
-
lineNumber:
|
|
7528
|
+
lineNumber: 67,
|
|
7529
7529
|
columnNumber: 9
|
|
7530
7530
|
},
|
|
7531
7531
|
void 0
|
|
@@ -7533,7 +7533,7 @@ const Fs = Qn("placeholder:text-gray-500", {
|
|
|
7533
7533
|
f
|
|
7534
7534
|
] }, void 0, !0, {
|
|
7535
7535
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Form/Input/index.tsx",
|
|
7536
|
-
lineNumber:
|
|
7536
|
+
lineNumber: 65,
|
|
7537
7537
|
columnNumber: 7
|
|
7538
7538
|
}, void 0);
|
|
7539
7539
|
}
|
|
@@ -13310,7 +13310,7 @@ const Ly = Qn("", {
|
|
|
13310
13310
|
!1,
|
|
13311
13311
|
{
|
|
13312
13312
|
fileName: "/Users/kyle/Workspace/SourceCode/zto-react-kit/src/components/Form/Textarea/index.tsx",
|
|
13313
|
-
lineNumber:
|
|
13313
|
+
lineNumber: 35,
|
|
13314
13314
|
columnNumber: 7
|
|
13315
13315
|
},
|
|
13316
13316
|
void 0
|
|
@@ -13533,8 +13533,8 @@ export {
|
|
|
13533
13533
|
Xy as WithLabel,
|
|
13534
13534
|
Qy as WithTooltip,
|
|
13535
13535
|
df as badgeVariants,
|
|
13536
|
-
|
|
13536
|
+
_p as buttonVariants,
|
|
13537
13537
|
Zy as createContext,
|
|
13538
13538
|
Ho as useFormField,
|
|
13539
|
-
|
|
13539
|
+
Pp as useFormGroup
|
|
13540
13540
|
};
|