@ztwoint/z-ui 0.2.0-beta.1 → 0.2.0-beta.2
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/breadcrumb/z2-breadcrumb.js +97 -0
- package/dist/components/primitives/table-card/table-card.js +17 -15
- package/dist/components/table/components/cell/avatar-cell.js +4 -2
- package/dist/components/table/table-provider.js +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +361 -346
- package/dist/types/index.d.ts +4 -0
- package/dist/types/v2/atoms/actions/breadcrumb-link.d.ts +4 -7
- package/dist/types/v2/atoms/actions/button.d.ts +4 -4
- package/dist/types/v2/atoms/inputs/input.d.ts +7 -8
- package/dist/types/v2/molecules/actions/breadcrumb-group.d.ts +2 -2
- package/dist/types/v2/molecules/kpi-card/kpi-card.type.d.ts +3 -3
- package/dist/types/v2/organisms/topbar.d.ts +2 -2
- package/dist/v2/atoms/actions/breadcrumb-link.d.ts +4 -7
- package/dist/v2/atoms/actions/breadcrumb-link.js +6 -9
- package/dist/v2/atoms/actions/button.d.ts +4 -4
- package/dist/v2/atoms/actions/button.js +6 -6
- package/dist/v2/atoms/inputs/input.d.ts +7 -8
- package/dist/v2/atoms/inputs/input.js +1 -1
- package/dist/v2/molecules/actions/breadcrumb-group.d.ts +2 -2
- package/dist/v2/molecules/actions/breadcrumb-group.js +1 -1
- package/dist/v2/molecules/kpi-card/kpi-card.js +3 -3
- package/dist/v2/molecules/kpi-card/kpi-card.type.d.ts +3 -3
- package/dist/v2/organisms/topbar.d.ts +2 -2
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -34,4 +34,8 @@ export * from './components/radio-card/radio-card';
|
|
|
34
34
|
export * from './components/z2map';
|
|
35
35
|
export * from './lib/theme.hook';
|
|
36
36
|
export * from './lib/utils';
|
|
37
|
+
export * from './components/breadcrumb/z2-breadcrumb';
|
|
38
|
+
export * from './components/badge/badge';
|
|
39
|
+
export * from './components/input/input';
|
|
40
|
+
export * from './components/button/button';
|
|
37
41
|
export * from './v2';
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
declare const breadcrumbLinkVariants: (props?: ({
|
|
3
|
-
type?: "previous" | "current" | null | undefined;
|
|
4
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
5
|
-
interface Z2BreadcrumbLinkProps extends Omit<React.ComponentProps<'a'>, 'type' | 'children'>, VariantProps<typeof breadcrumbLinkVariants> {
|
|
1
|
+
interface BreadcrumbLinkProps extends Omit<React.ComponentProps<'a'>, 'type' | 'children'> {
|
|
6
2
|
label: string;
|
|
3
|
+
type: 'previous' | 'current';
|
|
7
4
|
}
|
|
8
|
-
declare function
|
|
9
|
-
export {
|
|
5
|
+
declare function BreadcrumbLink({ className, type, label, ...props }: BreadcrumbLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { BreadcrumbLink, type BreadcrumbLinkProps };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
declare const
|
|
2
|
+
declare const z2ButtonVariants: (props?: ({
|
|
3
3
|
variant?: "danger" | "ghost" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
4
4
|
size?: "small" | "large" | "medium" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
-
interface
|
|
6
|
+
interface Z2ButtonProps extends Omit<React.ComponentProps<'button'>, 'children'>, VariantProps<typeof z2ButtonVariants> {
|
|
7
7
|
asChild?: boolean;
|
|
8
8
|
leadingIcon?: React.ReactNode;
|
|
9
9
|
trailingIcon?: React.ReactNode;
|
|
10
10
|
label?: string;
|
|
11
11
|
}
|
|
12
|
-
declare function
|
|
13
|
-
export {
|
|
12
|
+
declare function Z2Button({ className, variant, size, asChild, leadingIcon, trailingIcon, label, ...props }: Z2ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { Z2Button, z2ButtonVariants, type Z2ButtonProps };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
type
|
|
2
|
-
type
|
|
3
|
-
interface
|
|
1
|
+
type Z2InputRoundness = 'FULL' | 'NONE' | 'LEFT' | 'RIGHT';
|
|
2
|
+
type Z2Semantic = 'info' | 'warning' | 'success' | 'danger';
|
|
3
|
+
interface Z2InputProps extends React.ComponentProps<'input'> {
|
|
4
4
|
leadingIcon?: React.ReactNode;
|
|
5
5
|
trailingIcon?: React.ReactNode;
|
|
6
|
-
roundness?:
|
|
7
|
-
|
|
8
|
-
semantic?: Semantic;
|
|
6
|
+
roundness?: Z2InputRoundness;
|
|
7
|
+
semantic?: Z2Semantic;
|
|
9
8
|
dimension?: 'small' | 'medium' | 'large';
|
|
10
9
|
}
|
|
11
10
|
declare const inputContainerVariants: (props?: ({
|
|
@@ -13,5 +12,5 @@ declare const inputContainerVariants: (props?: ({
|
|
|
13
12
|
roundness?: "LEFT" | "RIGHT" | "FULL" | "NONE" | null | undefined;
|
|
14
13
|
semantic?: "success" | "warning" | "danger" | "info" | null | undefined;
|
|
15
14
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
16
|
-
declare function
|
|
17
|
-
export {
|
|
15
|
+
declare function Z2Input({ className, type, leadingIcon, trailingIcon, dimension, roundness, semantic, ...props }: Z2InputProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { Z2Input, type Z2InputProps, type Z2InputRoundness, type Z2Semantic, inputContainerVariants, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BreadcrumbLinkProps } from '../../atoms/actions/breadcrumb-link';
|
|
2
2
|
interface Z2BreadcrumbGroupProps {
|
|
3
|
-
links:
|
|
3
|
+
links: BreadcrumbLinkProps[];
|
|
4
4
|
}
|
|
5
5
|
declare const Z2BreadcrumbGroup: ({ links }: Z2BreadcrumbGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export { Z2BreadcrumbGroup, type Z2BreadcrumbGroupProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Z2FeaturedIconProps } from '../../atoms/indicators/featured-icon';
|
|
3
|
-
import {
|
|
3
|
+
import { Z2ButtonProps } from '../../atoms/actions/button';
|
|
4
4
|
export interface Z2KpiCardProps extends React.ComponentProps<'div'> {
|
|
5
5
|
header: Z2KpiCardHeaderProps;
|
|
6
6
|
footer: Z2KpiCardFooterProps;
|
|
@@ -15,6 +15,6 @@ export interface Z2KpiCardFooterProps extends React.ComponentProps<'div'> {
|
|
|
15
15
|
export interface Z2KpiCardHeaderProps extends React.ComponentProps<'div'> {
|
|
16
16
|
title: string;
|
|
17
17
|
description?: string;
|
|
18
|
-
infoButton?:
|
|
19
|
-
moreActions?:
|
|
18
|
+
infoButton?: Z2ButtonProps;
|
|
19
|
+
moreActions?: Z2ButtonProps;
|
|
20
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BreadcrumbLinkProps } from '../atoms/actions/breadcrumb-link';
|
|
2
2
|
interface TopbarProps extends React.ComponentProps<'div'> {
|
|
3
|
-
breadcrumbLinks:
|
|
3
|
+
breadcrumbLinks: BreadcrumbLinkProps[];
|
|
4
4
|
}
|
|
5
5
|
declare const Topbar: ({ breadcrumbLinks, className, children, ...props }: TopbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export { Topbar };
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
declare const breadcrumbLinkVariants: (props?: ({
|
|
3
|
-
type?: "previous" | "current" | null | undefined;
|
|
4
|
-
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
5
|
-
interface Z2BreadcrumbLinkProps extends Omit<React.ComponentProps<'a'>, 'type' | 'children'>, VariantProps<typeof breadcrumbLinkVariants> {
|
|
1
|
+
interface BreadcrumbLinkProps extends Omit<React.ComponentProps<'a'>, 'type' | 'children'> {
|
|
6
2
|
label: string;
|
|
3
|
+
type: 'previous' | 'current';
|
|
7
4
|
}
|
|
8
|
-
declare function
|
|
9
|
-
export {
|
|
5
|
+
declare function BreadcrumbLink({ className, type, label, ...props }: BreadcrumbLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { BreadcrumbLink, type BreadcrumbLinkProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { cn as t } from "../../../lib/utils.js";
|
|
3
|
-
import { cva as
|
|
4
|
-
const
|
|
3
|
+
import { cva as l } from "class-variance-authority";
|
|
4
|
+
const a = l(
|
|
5
5
|
"py-1 pr-1 inline-flex items-center gap-0.5 cursor-pointer transition-colors relative",
|
|
6
6
|
{
|
|
7
7
|
variants: {
|
|
@@ -27,18 +27,15 @@ const l = a(
|
|
|
27
27
|
"active:text-neutral-700"
|
|
28
28
|
]
|
|
29
29
|
}
|
|
30
|
-
},
|
|
31
|
-
defaultVariants: {
|
|
32
|
-
type: "previous"
|
|
33
30
|
}
|
|
34
31
|
}
|
|
35
32
|
);
|
|
36
|
-
function
|
|
33
|
+
function x({ className: i, type: e, label: o, ...s }) {
|
|
37
34
|
return /* @__PURE__ */ n(
|
|
38
35
|
"a",
|
|
39
36
|
{
|
|
40
|
-
"data-slot": "
|
|
41
|
-
className: t(
|
|
37
|
+
"data-slot": "breadcrumb-link",
|
|
38
|
+
className: t(a({ type: e }), i),
|
|
42
39
|
...s,
|
|
43
40
|
children: [
|
|
44
41
|
/* @__PURE__ */ r(
|
|
@@ -57,5 +54,5 @@ function p({ className: i, type: e, label: o, ...s }) {
|
|
|
57
54
|
);
|
|
58
55
|
}
|
|
59
56
|
export {
|
|
60
|
-
|
|
57
|
+
x as BreadcrumbLink
|
|
61
58
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
declare const
|
|
2
|
+
declare const z2ButtonVariants: (props?: ({
|
|
3
3
|
variant?: "danger" | "ghost" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
4
4
|
size?: "small" | "large" | "medium" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
6
|
-
interface
|
|
6
|
+
interface Z2ButtonProps extends Omit<React.ComponentProps<'button'>, 'children'>, VariantProps<typeof z2ButtonVariants> {
|
|
7
7
|
asChild?: boolean;
|
|
8
8
|
leadingIcon?: React.ReactNode;
|
|
9
9
|
trailingIcon?: React.ReactNode;
|
|
10
10
|
label?: string;
|
|
11
11
|
}
|
|
12
|
-
declare function
|
|
13
|
-
export {
|
|
12
|
+
declare function Z2Button({ className, variant, size, asChild, leadingIcon, trailingIcon, label, ...props }: Z2ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { Z2Button, z2ButtonVariants, type Z2ButtonProps };
|
|
@@ -2,8 +2,8 @@ import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { Slot as u } from "@radix-ui/react-slot";
|
|
3
3
|
import "react";
|
|
4
4
|
import { cn as m } from "../../../lib/utils.js";
|
|
5
|
-
import { cva as
|
|
6
|
-
const
|
|
5
|
+
import { cva as p } from "class-variance-authority";
|
|
6
|
+
const b = p(
|
|
7
7
|
"cursor-pointer disabled:cursor-not-allowed not-italic font-medium tracking-normal inline-flex items-center justify-center transition-all disabled:text-neutral-400 disabled:pointer-events-none outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
@@ -39,10 +39,10 @@ function y({
|
|
|
39
39
|
return /* @__PURE__ */ d(
|
|
40
40
|
o ? u : "button",
|
|
41
41
|
{
|
|
42
|
-
"data-slot": "button",
|
|
42
|
+
"data-slot": "z2-button",
|
|
43
43
|
"data-variant": r,
|
|
44
44
|
"data-size": t,
|
|
45
|
-
className: m(
|
|
45
|
+
className: m(b({ variant: r, size: t, className: s })),
|
|
46
46
|
...l,
|
|
47
47
|
children: [
|
|
48
48
|
a && /* @__PURE__ */ e("span", { className: "py-0.5 [&_svg]:pointer-events-none [&_svg]:!max-w-3 [&_svg]:!max-h-3 [&_svg]:!aspect-square [&_svg]:shrink-0 ", children: a }),
|
|
@@ -53,6 +53,6 @@ function y({
|
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
export {
|
|
56
|
-
y as
|
|
57
|
-
|
|
56
|
+
y as Z2Button,
|
|
57
|
+
b as z2ButtonVariants
|
|
58
58
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
type
|
|
2
|
-
type
|
|
3
|
-
interface
|
|
1
|
+
type Z2InputRoundness = 'FULL' | 'NONE' | 'LEFT' | 'RIGHT';
|
|
2
|
+
type Z2Semantic = 'info' | 'warning' | 'success' | 'danger';
|
|
3
|
+
interface Z2InputProps extends React.ComponentProps<'input'> {
|
|
4
4
|
leadingIcon?: React.ReactNode;
|
|
5
5
|
trailingIcon?: React.ReactNode;
|
|
6
|
-
roundness?:
|
|
7
|
-
|
|
8
|
-
semantic?: Semantic;
|
|
6
|
+
roundness?: Z2InputRoundness;
|
|
7
|
+
semantic?: Z2Semantic;
|
|
9
8
|
dimension?: 'small' | 'medium' | 'large';
|
|
10
9
|
}
|
|
11
10
|
declare const inputContainerVariants: (props?: ({
|
|
@@ -13,5 +12,5 @@ declare const inputContainerVariants: (props?: ({
|
|
|
13
12
|
roundness?: "LEFT" | "RIGHT" | "FULL" | "NONE" | null | undefined;
|
|
14
13
|
semantic?: "success" | "warning" | "danger" | "info" | null | undefined;
|
|
15
14
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
16
|
-
declare function
|
|
17
|
-
export {
|
|
15
|
+
declare function Z2Input({ className, type, leadingIcon, trailingIcon, dimension, roundness, semantic, ...props }: Z2InputProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { Z2Input, type Z2InputProps, type Z2InputRoundness, type Z2Semantic, inputContainerVariants, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BreadcrumbLinkProps } from '../../atoms/actions/breadcrumb-link';
|
|
2
2
|
interface Z2BreadcrumbGroupProps {
|
|
3
|
-
links:
|
|
3
|
+
links: BreadcrumbLinkProps[];
|
|
4
4
|
}
|
|
5
5
|
declare const Z2BreadcrumbGroup: ({ links }: Z2BreadcrumbGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export { Z2BreadcrumbGroup, type Z2BreadcrumbGroupProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { BreadcrumbLink as i } from "../../atoms/actions/breadcrumb-link.js";
|
|
3
3
|
const n = ({ links: a }) => /* @__PURE__ */ r("nav", { role: "navigation", "aria-label": "Breadcrumb", children: /* @__PURE__ */ r("ol", { className: "inline-flex items-center", children: a.map((e) => /* @__PURE__ */ r(i, { ...e }, e.label)) }) });
|
|
4
4
|
export {
|
|
5
5
|
n as Z2BreadcrumbGroup
|
|
@@ -2,7 +2,7 @@ import { jsxs as s, jsx as e, Fragment as o } from "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { cn as d } from "../../../lib/utils.js";
|
|
4
4
|
import c from "../../assets/icon.js";
|
|
5
|
-
import {
|
|
5
|
+
import { Z2Button as m } from "../../atoms/actions/button.js";
|
|
6
6
|
import { Z2FeaturedIcon as f } from "../../atoms/indicators/featured-icon.js";
|
|
7
7
|
const x = ({
|
|
8
8
|
className: r,
|
|
@@ -73,10 +73,10 @@ function h({
|
|
|
73
73
|
t && /* @__PURE__ */ e(f, { ...t })
|
|
74
74
|
] });
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const Z = ({ header: r, footer: l, ...a }) => /* @__PURE__ */ s(x, { ...a, children: [
|
|
77
77
|
/* @__PURE__ */ e(p, { ...r }),
|
|
78
78
|
/* @__PURE__ */ e(h, { ...l })
|
|
79
79
|
] });
|
|
80
80
|
export {
|
|
81
|
-
|
|
81
|
+
Z as Z2KpiCard
|
|
82
82
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Z2FeaturedIconProps } from '../../atoms/indicators/featured-icon';
|
|
3
|
-
import {
|
|
3
|
+
import { Z2ButtonProps } from '../../atoms/actions/button';
|
|
4
4
|
export interface Z2KpiCardProps extends React.ComponentProps<'div'> {
|
|
5
5
|
header: Z2KpiCardHeaderProps;
|
|
6
6
|
footer: Z2KpiCardFooterProps;
|
|
@@ -15,6 +15,6 @@ export interface Z2KpiCardFooterProps extends React.ComponentProps<'div'> {
|
|
|
15
15
|
export interface Z2KpiCardHeaderProps extends React.ComponentProps<'div'> {
|
|
16
16
|
title: string;
|
|
17
17
|
description?: string;
|
|
18
|
-
infoButton?:
|
|
19
|
-
moreActions?:
|
|
18
|
+
infoButton?: Z2ButtonProps;
|
|
19
|
+
moreActions?: Z2ButtonProps;
|
|
20
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BreadcrumbLinkProps } from '../atoms/actions/breadcrumb-link';
|
|
2
2
|
interface TopbarProps extends React.ComponentProps<'div'> {
|
|
3
|
-
breadcrumbLinks:
|
|
3
|
+
breadcrumbLinks: BreadcrumbLinkProps[];
|
|
4
4
|
}
|
|
5
5
|
declare const Topbar: ({ breadcrumbLinks, className, children, ...props }: TopbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export { Topbar };
|