@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.
@@ -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%] z-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",
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 z-1"), children: /* @__PURE__ */ r("tr", { children: o.map((e) => {
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 { jsx as e, jsxs as h } from "react/jsx-runtime";
2
- import * as T from "react";
3
- import { DEFAULT_EMPTY_MESSAGE as g, TABLE_CSS_CLASSES as m } from "./table.const.js";
4
- import { TableHeader as E } from "./components/table-header/table-header.js";
5
- import { TableRow as y } from "./components/table-row.js";
6
- import { TableEmptyState as x } from "./components/table-empty-state.js";
7
- import { TableLoadingState as B } from "./components/table-loading-state.js";
8
- import { TableContext as C } from "./table.context.js";
9
- import { cn as s } from "../../lib/utils.js";
10
- const R = ({ cell: o = { hasBorder: !0 }, sort: n, className: f, stickyHeader: d = !1, ...i }) => {
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: r = [],
14
- loading: a = !1,
15
- emptyMessage: p = g,
16
- customCells: u
17
- } = c || i, S = () => a ? /* @__PURE__ */ e(B, { colSpan: r.length }) : !t || t.length === 0 ? /* @__PURE__ */ e(x, { colSpan: r.length, message: p }) : /* @__PURE__ */ e("tbody", { children: t.map((b, l) => /* @__PURE__ */ e(
18
- y,
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: b,
21
- index: l,
22
- schema: r,
23
- customCells: u,
24
- cell: o
19
+ record: x,
20
+ index: s,
21
+ schema: o,
22
+ customCells: h,
23
+ cell: a
25
24
  },
26
- l
25
+ s
27
26
  )) });
28
- return /* @__PURE__ */ e(
27
+ return /* @__PURE__ */ l(
29
28
  "div",
30
29
  {
31
- className: s(
32
- "overflow-y-auto",
33
- m.bordered[o.hasBorder && !a && t.length > 0 ? "true" : "false"],
34
- f
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: /* @__PURE__ */ h("table", { className: s(m.table, "w-full"), children: [
37
- /* @__PURE__ */ e(E, { schema: r, sort: n, cell: o, stickyHeader: d }),
38
- S()
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
- R as TableBody,
45
- R as default
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
- --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);
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
- --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);
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
- --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);
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
- --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);
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
- /* 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);
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
- /* 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
- }
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: #1414141A;
30
+ --background-inverted-elevated: #1414141a;
31
31
 
32
32
  /* Overlay - Dark Mode */
33
33
  --overlay-default: var(--neutral-50);