@ztwoint/z-ui 0.1.56 → 0.1.58

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.
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
+ declare function Z2Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Z2Checkbox };
@@ -0,0 +1,78 @@
1
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
+ import * as t from "@radix-ui/react-checkbox";
3
+ import { cn as i } from "../../lib/utils.js";
4
+ function s({ className: r, ...a }) {
5
+ return /* @__PURE__ */ e(
6
+ t.Root,
7
+ {
8
+ "data-slot": "checkbox",
9
+ className: i(
10
+ [
11
+ "group border-box size-3.5 rounded-[5px] border-[2px] border-stroke-solid-high",
12
+ "hover:border-stroke-solid-hover",
13
+ "disabled:border-none bg-surface-neutral-disabled",
14
+ "data-[state=checked]:border-none data-[state=checked]:bg-surface-accent-default",
15
+ "data-[state=checked]:text-text-inverted-primary",
16
+ "data-[state=checked]:hover:bg-surface-accent-hover",
17
+ "data-[state=indeterminate]:border-none data-[state=indeterminate]:bg-surface-accent-default",
18
+ "data-[state=indeterminate]:hover:bg-accent-hover",
19
+ "data-[state=indeterminate]:text-text-inverted-primary",
20
+ "focus-visible:border-ring",
21
+ "shrink-0",
22
+ "transition-all duration-100 ease-in-out",
23
+ "flex items-center justify-center"
24
+ ],
25
+ r
26
+ ),
27
+ ...a,
28
+ children: /* @__PURE__ */ o(
29
+ t.Indicator,
30
+ {
31
+ "data-slot": "checkbox-indicator",
32
+ className: "flex items-center justify-center text-current transition-none",
33
+ children: [
34
+ /* @__PURE__ */ e(
35
+ "svg",
36
+ {
37
+ className: "hidden group-data-[state=checked]:block",
38
+ xmlns: "http://www.w3.org/2000/svg",
39
+ width: "14",
40
+ height: "14",
41
+ viewBox: "0 0 16 17",
42
+ fill: "none",
43
+ children: /* @__PURE__ */ e(
44
+ "path",
45
+ {
46
+ d: "M10.0166 5.34313C10.3595 4.91054 10.988 4.83742 11.4209 5.18004C11.8536 5.52291 11.9267 6.15241 11.584 6.58531L7.78417 11.3851C7.60149 11.6157 7.3262 11.7546 7.03222 11.764C6.73801 11.7733 6.45383 11.6516 6.25683 11.433L4.45702 9.43297C4.08766 9.0225 4.12088 8.39032 4.53124 8.02086C4.9417 7.65149 5.57388 7.68474 5.94335 8.09508L6.95116 9.21422L10.0166 5.34313Z",
47
+ fill: "currentColor"
48
+ }
49
+ )
50
+ }
51
+ ),
52
+ /* @__PURE__ */ e(
53
+ "svg",
54
+ {
55
+ className: "hidden group-data-[state=indeterminate]:block",
56
+ xmlns: "http://www.w3.org/2000/svg",
57
+ width: "14",
58
+ height: "14",
59
+ viewBox: "0 0 16 17",
60
+ fill: "none",
61
+ children: /* @__PURE__ */ e(
62
+ "path",
63
+ {
64
+ d: "M11.3018 7.36852C11.8062 7.41958 12.2002 7.84576 12.2002 8.36363C12.2002 8.88151 11.8062 9.30769 11.3018 9.35875L11.2002 9.36363H4.7998C4.2476 9.36353 3.7998 8.91586 3.7998 8.36363C3.7998 7.81141 4.2476 7.36373 4.7998 7.36363H11.2002L11.3018 7.36852Z",
65
+ fill: "currentColor"
66
+ }
67
+ )
68
+ }
69
+ )
70
+ ]
71
+ }
72
+ )
73
+ }
74
+ );
75
+ }
76
+ export {
77
+ s as Z2Checkbox
78
+ };
@@ -16,6 +16,7 @@ import "../../../collapsible-side-nav-bar/context.js";
16
16
  import "../../../collapsible-side-nav-bar/popover/popover.js";
17
17
  import "react-country-flag";
18
18
  import "classnames";
19
+ import "@radix-ui/react-checkbox";
19
20
  import "@radix-ui/react-dialog";
20
21
  import "../../../dropdown/z2-dropdown.js";
21
22
  import "@radix-ui/react-dropdown-menu";
@@ -33,7 +34,7 @@ import "../../table.context.js";
33
34
  import "../../../tooltip/tooltip.js";
34
35
  import "../../../badge/badge.js";
35
36
  import "../../../text-preset/text-preset.js";
36
- const W = ({
37
+ const X = ({
37
38
  avatar: m,
38
39
  value: a,
39
40
  rightIcon: e,
@@ -71,5 +72,5 @@ const W = ({
71
72
  }
72
73
  );
73
74
  export {
74
- W as AvatarCell
75
+ X as AvatarCell
75
76
  };
@@ -24,6 +24,7 @@ import "../collapsible-side-nav-bar/context.js";
24
24
  import "../collapsible-side-nav-bar/popover/popover.js";
25
25
  import "react-country-flag";
26
26
  import "classnames";
27
+ import "@radix-ui/react-checkbox";
27
28
  import "@radix-ui/react-dialog";
28
29
  import "../dropdown/z2-dropdown.js";
29
30
  import "@radix-ui/react-dropdown-menu";
@@ -17,6 +17,7 @@ import "../collapsible-side-nav-bar/context.js";
17
17
  import "../collapsible-side-nav-bar/popover/popover.js";
18
18
  import "react-country-flag";
19
19
  import "classnames";
20
+ import "@radix-ui/react-checkbox";
20
21
  import "@radix-ui/react-dialog";
21
22
  import "../dropdown/z2-dropdown.js";
22
23
  import "@radix-ui/react-dropdown-menu";
@@ -33,7 +34,7 @@ import "../badge/badge.js";
33
34
  import "../avatar/avatar.js";
34
35
  import "../text-preset/text-preset.js";
35
36
  import "../table/table.context.js";
36
- const nt = ({
37
+ const Pt = ({
37
38
  dataSource: v,
38
39
  schema: u,
39
40
  loading: H,
@@ -52,14 +53,14 @@ const nt = ({
52
53
  className: "",
53
54
  stickyHeader: !0
54
55
  },
55
- showFooter: x = !0,
56
+ showFooter: p = !0,
56
57
  footerClassName: k,
57
58
  pagination: l,
58
59
  paginationInfo: a,
59
60
  paginationQuickJumper: s
60
61
  }) => {
61
62
  var B;
62
- const p = s && s.totalPage && s.totalPage >= 2, F = l && l.totalPage && l.totalPage >= 2 || !!a || p, g = m || e || P || i, R = typeof (e == null ? void 0 : e.showFilterButton) > "u" ? !0 : e == null ? void 0 : e.showFilterButton;
63
+ const x = s && s.totalPage && s.totalPage >= 2, F = l && l.totalPage && l.totalPage >= 2 || !!a || x, g = m || e || P || i, R = typeof (e == null ? void 0 : e.showFilterButton) > "u" ? !0 : e == null ? void 0 : e.showFilterButton;
63
64
  return /* @__PURE__ */ o("div", { className: n("flex flex-col overflow-hidden", T), children: /* @__PURE__ */ c(t, { dataSource: v, schema: u, loading: H, emptyMessage: w, children: [
64
65
  C && g && /* @__PURE__ */ c(
65
66
  t.Header,
@@ -114,7 +115,7 @@ const nt = ({
114
115
  "flex-1 min-h-0",
115
116
  h && "border-stroke-solid-light border-1",
116
117
  d && !(C && g) && "rounded-t-xl",
117
- d && !(x && F) && "rounded-b-xl",
118
+ d && !(p && F) && "rounded-b-xl",
118
119
  h && "[&_td:first-child]:border-l-0 [&_td:last-child]:border-r-0",
119
120
  h && "[&_th:first-child]:border-l-0 [&_th:last-child]:border-r-0",
120
121
  r == null ? void 0 : r.className
@@ -122,7 +123,7 @@ const nt = ({
122
123
  stickyHeader: r == null ? void 0 : r.stickyHeader
123
124
  }
124
125
  ),
125
- x && F && /* @__PURE__ */ c(
126
+ p && F && /* @__PURE__ */ c(
126
127
  t.Footer,
127
128
  {
128
129
  className: n(
@@ -142,7 +143,7 @@ const nt = ({
142
143
  }
143
144
  ) }) : s || l ? /* @__PURE__ */ o(t.FooterContent, { children: null }) : null,
144
145
  (s || l) && /* @__PURE__ */ c(t.FooterContent, { children: [
145
- p && /* @__PURE__ */ o(
146
+ x && /* @__PURE__ */ o(
146
147
  t.PaginationQuickJumper,
147
148
  {
148
149
  currentPage: s.currentPage,
@@ -169,5 +170,5 @@ const nt = ({
169
170
  ] }) });
170
171
  };
171
172
  export {
172
- nt as default
173
+ Pt as default
173
174
  };
@@ -1,7 +1,7 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import { cva as c } from "class-variance-authority";
3
- import { cn as d } from "../../lib/utils.js";
4
- const o = c("flex flex-col", {
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { cva as d } from "class-variance-authority";
3
+ import { cn as c } from "../../lib/utils.js";
4
+ const o = d("flex flex-col", {
5
5
  variants: {
6
6
  type: {
7
7
  L: "text-left",
@@ -19,27 +19,34 @@ const o = c("flex flex-col", {
19
19
  }
20
20
  });
21
21
  function x({
22
- type: l = "L",
22
+ type: s = "L",
23
23
  multiline: n = !1,
24
24
  primaryFirst: i = !0,
25
25
  primaryText: a,
26
26
  supportText: t,
27
27
  className: m
28
28
  }) {
29
- const r = d(o({ type: l, multiline: n }), m);
30
- return i ? /* @__PURE__ */ s("div", { className: r, children: [
29
+ const r = c(o({ type: s, multiline: n }), m);
30
+ return i ? /* @__PURE__ */ l("div", { className: r, children: [
31
31
  /* @__PURE__ */ e("span", { "data-slot": "primary-text", className: "text-text-neutral-primary leading-none-medium-sm", children: a }),
32
- t && /* @__PURE__ */ e("span", { "data-slot": "support-text", className: "text-text-neutral-secondary leading-none-regular-sm", children: t })
33
- ] }) : /* @__PURE__ */ s("div", { className: r, children: [
32
+ t && /* @__PURE__ */ e(
33
+ "span",
34
+ {
35
+ "data-slot": "support-text",
36
+ className: "text-text-neutral-secondary leading-normal-regular-sm",
37
+ children: t
38
+ }
39
+ )
40
+ ] }) : /* @__PURE__ */ l("div", { className: r, children: [
34
41
  t && /* @__PURE__ */ e(
35
42
  "p",
36
43
  {
37
44
  "data-slot": "support-text",
38
- className: "text-text-neutral-secondary leading-none-regular-sm",
45
+ className: "text-text-neutral-secondary leading-normal-regular-sm",
39
46
  children: t
40
47
  }
41
48
  ),
42
- /* @__PURE__ */ e("p", { "data-slot": "primary-text", className: "text-text-neutral-primary", children: a })
49
+ /* @__PURE__ */ e("p", { "data-slot": "primary-text", className: "text-text-neutral-primary leading-none-medium-sm", children: a })
43
50
  ] });
44
51
  }
45
52
  x.displayName = "Z2TextPreset";