@ztwoint/z-ui 0.1.38 → 0.1.40
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/assets/icons/chevron-up-icon.d.ts +1 -1
- package/dist/components/assets/icons/chevron-up-icon.js +6 -5
- package/dist/components/assets/icons/info-icon.d.ts +1 -1
- package/dist/components/assets/icons/info-icon.js +5 -4
- package/dist/components/badge/badge.d.ts +11 -0
- package/dist/components/badge/badge.js +121 -0
- package/dist/components/icon-showcase/icon-showcase.d.ts +2 -0
- package/dist/components/icon-showcase/icon-showcase.hook.d.ts +8 -0
- package/dist/components/icon-showcase/icon-showcase.type.d.ts +11 -0
- package/dist/components/icon-showcase/icons-list.d.ts +1 -0
- package/dist/css/config/colors/surfaces.css +54 -0
- package/dist/css/styles/tailwind.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +48 -45
- package/dist/types/components/assets/icons/chevron-up-icon.d.ts +1 -1
- package/dist/types/components/assets/icons/info-icon.d.ts +1 -1
- package/dist/types/components/badge/badge.d.ts +11 -0
- package/dist/types/components/icon-showcase/icon-showcase.d.ts +2 -0
- package/dist/types/components/icon-showcase/icon-showcase.hook.d.ts +8 -0
- package/dist/types/components/icon-showcase/icon-showcase.type.d.ts +11 -0
- package/dist/types/components/icon-showcase/icons-list.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
const s = ({ fill:
|
|
3
|
-
/* @__PURE__ */ r("title", { children:
|
|
4
|
-
/* @__PURE__ */ r("g", { fill:
|
|
2
|
+
const s = ({ fill: e = "currentColor", title: o = "", ...t }) => /* @__PURE__ */ n("svg", { height: "14", width: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", ...t, children: [
|
|
3
|
+
/* @__PURE__ */ r("title", { children: o }),
|
|
4
|
+
/* @__PURE__ */ r("g", { fill: e, children: /* @__PURE__ */ r(
|
|
5
5
|
"path",
|
|
6
6
|
{
|
|
7
7
|
d: "M11.55 8.75l-4.55-4.55-4.55 4.55",
|
|
8
8
|
fill: "none",
|
|
9
|
-
stroke:
|
|
9
|
+
stroke: e,
|
|
10
10
|
strokeLinecap: "round",
|
|
11
11
|
strokeLinejoin: "round",
|
|
12
12
|
strokeWidth: "2"
|
|
@@ -14,5 +14,6 @@ const s = ({ fill: o = "currentColor", title: e = "", ...t }) => /* @__PURE__ */
|
|
|
14
14
|
) })
|
|
15
15
|
] });
|
|
16
16
|
export {
|
|
17
|
-
s as ChevronUpIcon
|
|
17
|
+
s as ChevronUpIcon,
|
|
18
|
+
s as default
|
|
18
19
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
const
|
|
3
|
-
/* @__PURE__ */ e("title", { children:
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
const r = ({ fill: o = "currentColor", title: t = "Info", ...C }) => /* @__PURE__ */ l("svg", { height: "14", width: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", ...C, children: [
|
|
3
|
+
/* @__PURE__ */ e("title", { children: t }),
|
|
4
4
|
/* @__PURE__ */ e(
|
|
5
5
|
"path",
|
|
6
6
|
{
|
|
@@ -12,5 +12,6 @@ const l = ({ fill: o = "currentColor", title: C = "Info", ...t }) => /* @__PURE_
|
|
|
12
12
|
)
|
|
13
13
|
] });
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
r as InfoIcon,
|
|
16
|
+
r as default
|
|
16
17
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "xs" | "lg" | null | undefined;
|
|
6
|
+
color?: "default" | "success" | "warning" | "destructive" | "primary" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
8
|
+
declare function Badge({ className, variant, size, color, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Slot as n } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva as c } from "class-variance-authority";
|
|
4
|
+
import "react";
|
|
5
|
+
import { cn as u } from "../../lib/utils.js";
|
|
6
|
+
const l = c(
|
|
7
|
+
"inline-flex rounded-lg items-center justify-center border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-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 transition-[color,box-shadow] overflow-hidden",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "border-transparent",
|
|
12
|
+
destructive: "border-transparent",
|
|
13
|
+
outline: ""
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
default: "px-[8px] py-[3px] text-sm",
|
|
17
|
+
xs: "px-[4px] py-[1px] text-[10px]",
|
|
18
|
+
sm: "px-[6px] py-[2px] text-xs",
|
|
19
|
+
lg: "px-[10px] py-[4px] text-base"
|
|
20
|
+
},
|
|
21
|
+
color: {
|
|
22
|
+
default: "",
|
|
23
|
+
primary: "surface-neutral-default text-default-brand [a&]:hover:surface-neutral-hover",
|
|
24
|
+
destructive: "surface-danger-default text-inverted-primary [a&]:hover:surface-danger-hover",
|
|
25
|
+
success: "surface-success-default text-inverted-primary [a&]:hover:surface-success-hover",
|
|
26
|
+
warning: "surface-warning-default text-inverted-primary [a&]:hover:surface-warning-hover"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
compoundVariants: [
|
|
30
|
+
// Default variant with different colors
|
|
31
|
+
{
|
|
32
|
+
variant: "default",
|
|
33
|
+
color: "default",
|
|
34
|
+
class: "surface-neutral-hover [a&]:hover:surface-neutral-hover"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
variant: "default",
|
|
38
|
+
color: "primary",
|
|
39
|
+
class: "surface-primary-light text-default-brand [a&]:hover:surface-neutral-hover"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
variant: "default",
|
|
43
|
+
color: "destructive",
|
|
44
|
+
class: "surface-danger-light text-danger-secondary [a&]:hover:surface-danger-hover"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
variant: "default",
|
|
48
|
+
color: "success",
|
|
49
|
+
class: "surface-success-light text-success-secondary [a&]:hover:surface-success-hover"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
variant: "default",
|
|
53
|
+
color: "warning",
|
|
54
|
+
class: "surface-warning-light text-warning-secondary [a&]:hover:surface-warning-hover"
|
|
55
|
+
},
|
|
56
|
+
// Destructive variant with different colors
|
|
57
|
+
{
|
|
58
|
+
variant: "destructive",
|
|
59
|
+
color: "default",
|
|
60
|
+
class: "surface-neutral-primary text-inverted-primary [a&]:hover:surface-neutral-hover"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
variant: "destructive",
|
|
64
|
+
color: "primary",
|
|
65
|
+
class: "surface-primary-default text-inverted-primary [a&]:hover:surface-primary-hover"
|
|
66
|
+
},
|
|
67
|
+
// Outline variant with different colors
|
|
68
|
+
{
|
|
69
|
+
variant: "outline",
|
|
70
|
+
color: "default",
|
|
71
|
+
class: "surface-neutral-default text-neutral-primary border-stroke-solid-high [a&]:hover:surface-neutral-hover"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
variant: "outline",
|
|
75
|
+
color: "primary",
|
|
76
|
+
class: "surface-primary-light text-default-brand border-stroke-inverted-active [a&]:hover:surface-neutral-hover"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
variant: "outline",
|
|
80
|
+
color: "destructive",
|
|
81
|
+
class: "surface-danger-light text-danger-secondary border border-red-200 [a&]:hover:surface-danger-light-hover"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
variant: "outline",
|
|
85
|
+
color: "success",
|
|
86
|
+
class: "surface-success-light text-success-secondary border border-green-200 [a&]:hover:surface-success-light-hover"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
variant: "outline",
|
|
90
|
+
color: "warning",
|
|
91
|
+
class: "surface-warning-light text-warning-secondary border border-amber-200 [a&]:hover:surface-warning-light-hover"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
defaultVariants: {
|
|
95
|
+
variant: "default",
|
|
96
|
+
size: "default",
|
|
97
|
+
color: "default"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
function x({
|
|
102
|
+
className: r,
|
|
103
|
+
variant: e,
|
|
104
|
+
size: a,
|
|
105
|
+
color: t,
|
|
106
|
+
asChild: s = !1,
|
|
107
|
+
...o
|
|
108
|
+
}) {
|
|
109
|
+
return /* @__PURE__ */ i(
|
|
110
|
+
s ? n : "span",
|
|
111
|
+
{
|
|
112
|
+
"data-slot": "badge",
|
|
113
|
+
className: u(l({ variant: e, size: a, color: t }), r),
|
|
114
|
+
...o
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
export {
|
|
119
|
+
x as Badge,
|
|
120
|
+
l as badgeVariants
|
|
121
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IconInfo } from './icon-showcase.type';
|
|
2
|
+
export declare function useIconShowcase(icons: IconInfo[], controlledSearchValue?: string): {
|
|
3
|
+
searchValue: string;
|
|
4
|
+
setSearchValue: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
5
|
+
filteredIcons: IconInfo[];
|
|
6
|
+
totalCount: number;
|
|
7
|
+
filteredCount: number;
|
|
8
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface IconInfo {
|
|
2
|
+
name: string;
|
|
3
|
+
component: React.ComponentType<React.SVGProps<SVGSVGElement>>;
|
|
4
|
+
fileName: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IconShowcaseProps {
|
|
7
|
+
searchValue?: string;
|
|
8
|
+
onSearchChange?: (value: string) => void;
|
|
9
|
+
iconSize?: number;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const iconFilenames: string[];
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
background-color: var(--color-neutral-00);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
@utility surface-neutral-primary {
|
|
9
|
+
background-color: var(--color-neutral-950);
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
@utility surface-neutral-hover {
|
|
9
13
|
background-color: var(--color-neutral-50);
|
|
10
14
|
}
|
|
@@ -72,6 +76,14 @@
|
|
|
72
76
|
background-color: var(--color-neutral-100);
|
|
73
77
|
}
|
|
74
78
|
|
|
79
|
+
@utility surface-danger-light {
|
|
80
|
+
background-color: var(--color-red-50);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@utility surface-danger-light-hover {
|
|
84
|
+
background-color: var(--color-red-100);
|
|
85
|
+
}
|
|
86
|
+
|
|
75
87
|
/* Success surfaces */
|
|
76
88
|
@utility surface-success-default {
|
|
77
89
|
background-color: var(--color-green-600);
|
|
@@ -89,6 +101,13 @@
|
|
|
89
101
|
background-color: var(--color-neutral-100);
|
|
90
102
|
}
|
|
91
103
|
|
|
104
|
+
@utility surface-success-light {
|
|
105
|
+
background-color: var(--color-green-50);
|
|
106
|
+
}
|
|
107
|
+
@utility surface-success-light-hover {
|
|
108
|
+
background-color: var(--color-green-100);
|
|
109
|
+
}
|
|
110
|
+
|
|
92
111
|
/* Warning surfaces */
|
|
93
112
|
@utility surface-warning-default {
|
|
94
113
|
background-color: var(--color-amber-600);
|
|
@@ -106,6 +125,41 @@
|
|
|
106
125
|
background-color: var(--color-neutral-100);
|
|
107
126
|
}
|
|
108
127
|
|
|
128
|
+
@utility surface-warning-light {
|
|
129
|
+
background-color: var(--color-amber-50);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@utility surface-warning-light-hover {
|
|
133
|
+
background-color: var(--color-amber-100);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Primary surfaces */
|
|
137
|
+
|
|
138
|
+
/* Warning surfaces */
|
|
139
|
+
@utility surface-primary-default {
|
|
140
|
+
background-color: var(--color-blue-600);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@utility surface-primary-hover {
|
|
144
|
+
background-color: var(--color-blue-700);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@utility surface-primary-pressed {
|
|
148
|
+
background-color: var(--color-blue-400);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@utility surface-primary-disabled {
|
|
152
|
+
background-color: var(--color-neutral-100);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@utility surface-primary-light-hover {
|
|
156
|
+
background-color: var(--color-blue-100);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@utility surface-primary-light {
|
|
160
|
+
background-color: var(--color-blue-50);
|
|
161
|
+
}
|
|
162
|
+
|
|
109
163
|
/* Purple surfaces */
|
|
110
164
|
@utility surface-purple-default {
|
|
111
165
|
background-color: var(--color-violet-600);
|