@ztwoint/z-ui 0.1.50 → 0.1.52
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/dialog/dialog.js +1 -1
- package/dist/components/table/components/table-header/table-header.js +1 -1
- package/dist/components/table/table.js +39 -34
- package/dist/components/text-preset/text-preset.d.ts +13 -0
- package/dist/css/config/colors/semantic/alert.css +33 -33
- package/dist/css/config/colors/semantic/background.css +1 -1
- package/dist/css/config/colors/semantic/base.css +383 -383
- package/dist/css/config/colors/semantic/drop-shadow.css +22 -22
- package/dist/css/config/colors/semantic/dropdown.css +4 -4
- package/dist/css/config/colors/semantic/index.css +0 -2
- package/dist/css/config/colors/semantic/input.css +49 -51
- package/dist/css/config/colors/semantic/overlay.css +4 -5
- package/dist/css/config/colors/semantic/stroke.css +1 -1
- package/dist/css/config/colors/semantic/surface.css +1 -1
- package/dist/css/config/colors/semantic/text.css +1 -1
- package/dist/css/config/colors/semantic/tooltip.css +4 -4
- package/dist/css/config/other-variables.css +5 -5
- package/dist/css/config/shadows.css +11 -5
- package/dist/css/styles/tailwind.css +1 -1
- package/dist/types/components/text-preset/text-preset.d.ts +13 -0
- package/package.json +1 -1
|
@@ -41,7 +41,7 @@ function m({
|
|
|
41
41
|
{
|
|
42
42
|
"data-slot": "dialog-content",
|
|
43
43
|
className: l(
|
|
44
|
-
"bg-surface-neutral-default data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%]
|
|
44
|
+
"bg-surface-neutral-default data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 shadow-lg duration-200 sm:max-w-lg",
|
|
45
45
|
t
|
|
46
46
|
),
|
|
47
47
|
...i,
|
|
@@ -9,7 +9,7 @@ const A = ({
|
|
|
9
9
|
sort: a,
|
|
10
10
|
cell: s,
|
|
11
11
|
stickyHeader: l = !1
|
|
12
|
-
}) => /* @__PURE__ */ r("thead", { className: i(t.header, l && "sticky top-0
|
|
12
|
+
}) => /* @__PURE__ */ r("thead", { className: i(t.header, l && "sticky top-0"), children: /* @__PURE__ */ r("tr", { children: o.map((e) => {
|
|
13
13
|
const d = p(e.key, a), c = C(e.key, a);
|
|
14
14
|
return /* @__PURE__ */ r(
|
|
15
15
|
"th",
|
|
@@ -1,46 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import { DEFAULT_EMPTY_MESSAGE as
|
|
4
|
-
import { TableHeader as
|
|
5
|
-
import { TableRow as
|
|
6
|
-
import { TableEmptyState as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const c = T.useContext(C), {
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as y from "react";
|
|
3
|
+
import { DEFAULT_EMPTY_MESSAGE as S, TABLE_CSS_CLASSES as n } from "./table.const.js";
|
|
4
|
+
import { TableHeader as g } from "./components/table-header/table-header.js";
|
|
5
|
+
import { TableRow as T } from "./components/table-row.js";
|
|
6
|
+
import { TableEmptyState as w } from "./components/table-empty-state.js";
|
|
7
|
+
import { TableContext as E } from "./table.context.js";
|
|
8
|
+
import { cn as m } from "../../lib/utils.js";
|
|
9
|
+
const j = ({ cell: a = { hasBorder: !0 }, sort: d, className: i, stickyHeader: c = !1, ...f }) => {
|
|
10
|
+
const p = y.useContext(E), {
|
|
12
11
|
dataSource: t = [],
|
|
13
|
-
schema:
|
|
14
|
-
loading:
|
|
15
|
-
emptyMessage:
|
|
16
|
-
customCells:
|
|
17
|
-
} =
|
|
18
|
-
|
|
12
|
+
schema: o = [],
|
|
13
|
+
loading: r = !1,
|
|
14
|
+
emptyMessage: u = S,
|
|
15
|
+
customCells: h
|
|
16
|
+
} = p || f, b = () => !t || t.length === 0 && !r ? /* @__PURE__ */ e(w, { colSpan: o.length, message: u }) : /* @__PURE__ */ e("tbody", { children: t.map((x, s) => /* @__PURE__ */ e(
|
|
17
|
+
T,
|
|
19
18
|
{
|
|
20
|
-
record:
|
|
21
|
-
index:
|
|
22
|
-
schema:
|
|
23
|
-
customCells:
|
|
24
|
-
cell:
|
|
19
|
+
record: x,
|
|
20
|
+
index: s,
|
|
21
|
+
schema: o,
|
|
22
|
+
customCells: h,
|
|
23
|
+
cell: a
|
|
25
24
|
},
|
|
26
|
-
|
|
25
|
+
s
|
|
27
26
|
)) });
|
|
28
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ l(
|
|
29
28
|
"div",
|
|
30
29
|
{
|
|
31
|
-
className:
|
|
32
|
-
"overflow-y-auto",
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
className: m(
|
|
31
|
+
r ? "overflow-y-hidden" : "overflow-y-auto",
|
|
32
|
+
n.bordered[a.hasBorder && !r && t.length > 0 ? "true" : "false"],
|
|
33
|
+
i
|
|
35
34
|
),
|
|
36
|
-
children:
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ l("table", { className: m(n.table, "w-full"), children: [
|
|
37
|
+
b(),
|
|
38
|
+
/* @__PURE__ */ e(g, { schema: o, sort: d, cell: a, stickyHeader: c })
|
|
39
|
+
] }),
|
|
40
|
+
r && /* @__PURE__ */ e("div", { className: "sticky top-0 inset-0 w-full h-full bg-white/80 flex items-center justify-center", children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center gap-3", children: [
|
|
41
|
+
/* @__PURE__ */ e("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-text-brand-secondary" }),
|
|
42
|
+
/* @__PURE__ */ e("p", { className: "text-text-neutral-primary font-medium", children: "Loading..." })
|
|
43
|
+
] }) })
|
|
44
|
+
]
|
|
40
45
|
}
|
|
41
46
|
);
|
|
42
47
|
};
|
|
43
48
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
j as TableBody,
|
|
50
|
+
j as default
|
|
46
51
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
declare const textPresetVariants: (props?: ({
|
|
3
|
+
type?: "L" | "C" | "R" | null | undefined;
|
|
4
|
+
multiline?: boolean | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface Z2TextPresetProps extends VariantProps<typeof textPresetVariants> {
|
|
7
|
+
primaryFirst?: boolean;
|
|
8
|
+
primaryText: string;
|
|
9
|
+
supportText?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export default function Z2TextPreset({ type, multiline, primaryFirst, primaryText, supportText, className, }: Z2TextPresetProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
--alert-surface-neutral: var(--color-neutral-50);
|
|
3
|
+
--alert-surface-accent: var(--color-blue-50);
|
|
4
|
+
--alert-surface-success: var(--color-green-50);
|
|
5
|
+
--alert-surface-warning: var(--color-amber-50);
|
|
6
|
+
--alert-surface-danger: var(--color-red-50);
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
--alert-stroke-neutral: var(--color-neutral-100);
|
|
9
|
+
--alert-stroke-accent: var(--color-blue-100);
|
|
10
|
+
--alert-stroke-success: var(--color-green-100);
|
|
11
|
+
--alert-stroke-warning: var(--color-amber-100);
|
|
12
|
+
--alert-stroke-danger: var(--color-red-100);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.dark {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
--alert-surface-neutral: var(--color-neutral-50);
|
|
17
|
+
--alert-surface-accent: var(--color-blue-50);
|
|
18
|
+
--alert-surface-success: var(--color-green-50);
|
|
19
|
+
--alert-surface-warning: var(--color-amber-50);
|
|
20
|
+
--alert-surface-danger: var(--color-red-50);
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
--alert-stroke-neutral: var(--color-neutral-100);
|
|
23
|
+
--alert-stroke-accent: var(--color-blue-100);
|
|
24
|
+
--alert-stroke-success: var(--color-green-100);
|
|
25
|
+
--alert-stroke-warning: var(--color-amber-100);
|
|
26
|
+
--alert-stroke-danger: var(--color-red-100);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/* Tailwind v4 Theme Integration */
|
|
30
30
|
@theme inline {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
/* Alert - Surface */
|
|
32
|
+
--color-alert-surface-neutral: var(--alert-surface-neutral);
|
|
33
|
+
--color-alert-surface-accent: var(--alert-surface-accent);
|
|
34
|
+
--color-alert-surface-success: var(--alert-surface-success);
|
|
35
|
+
--color-alert-surface-warning: var(--alert-surface-warning);
|
|
36
|
+
--color-alert-surface-danger: var(--alert-surface-danger);
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
38
|
+
/* Alert - Stroke */
|
|
39
|
+
--color-alert-stroke-neutral: var(--alert-stroke-neutral);
|
|
40
|
+
--color-alert-stroke-accent: var(--alert-stroke-accent);
|
|
41
|
+
--color-alert-stroke-success: var(--alert-stroke-success);
|
|
42
|
+
--color-alert-stroke-warning: var(--alert-stroke-warning);
|
|
43
|
+
--color-alert-stroke-danger: var(--alert-stroke-danger);
|
|
44
|
+
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
--background-neutral-hover: var(--neutral-50);
|
|
28
28
|
--background-neutral-focused: var(--neutral-25);
|
|
29
29
|
|
|
30
|
-
--background-inverted-elevated: #
|
|
30
|
+
--background-inverted-elevated: #1414141a;
|
|
31
31
|
|
|
32
32
|
/* Overlay - Dark Mode */
|
|
33
33
|
--overlay-default: var(--neutral-50);
|