@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.
@@ -0,0 +1,97 @@
1
+ import { jsx as a, jsxs as s } from "react/jsx-runtime";
2
+ import { Slot as i } from "@radix-ui/react-slot";
3
+ import { MoreHorizontal as o } from "lucide-react";
4
+ import "react";
5
+ import { cn as t } from "../../lib/utils.js";
6
+ import l from "../assets/icons/z2-slash.js";
7
+ function x({ ...r }) {
8
+ return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...r });
9
+ }
10
+ function h({ className: r, ...e }) {
11
+ return /* @__PURE__ */ a(
12
+ "ol",
13
+ {
14
+ "data-slot": "breadcrumb-list",
15
+ className: t("flex flex-wrap items-center gap-1 break-words", r),
16
+ ...e
17
+ }
18
+ );
19
+ }
20
+ function g({ className: r, ...e }) {
21
+ return /* @__PURE__ */ a(
22
+ "li",
23
+ {
24
+ "data-slot": "breadcrumb-item",
25
+ className: t(
26
+ "inline-flex items-center gap-1.5 text-neutral-secondary hover:text-neutral-primary cursor-pointer leading-none-medium-sm",
27
+ r
28
+ ),
29
+ ...e
30
+ }
31
+ );
32
+ }
33
+ function N({
34
+ asChild: r,
35
+ className: e,
36
+ ...n
37
+ }) {
38
+ return /* @__PURE__ */ a(
39
+ r ? i : "a",
40
+ {
41
+ "data-slot": "breadcrumb-link",
42
+ className: t("hover:text-foreground transition-colors", e),
43
+ ...n
44
+ }
45
+ );
46
+ }
47
+ function Z({ className: r, ...e }) {
48
+ return /* @__PURE__ */ a(
49
+ "span",
50
+ {
51
+ "data-slot": "breadcrumb-page",
52
+ role: "link",
53
+ "aria-disabled": "true",
54
+ "aria-current": "page",
55
+ className: t("text-neutral-primary", r),
56
+ ...e
57
+ }
58
+ );
59
+ }
60
+ function B({ children: r, className: e, ...n }) {
61
+ return /* @__PURE__ */ a(
62
+ "li",
63
+ {
64
+ "data-slot": "breadcrumb-separator",
65
+ role: "presentation",
66
+ "aria-hidden": "true",
67
+ className: t("[&>svg]:size-3.5 text-stroke-solid-high", e),
68
+ ...n,
69
+ children: r ?? /* @__PURE__ */ a(l, {})
70
+ }
71
+ );
72
+ }
73
+ function k({ className: r, ...e }) {
74
+ return /* @__PURE__ */ s(
75
+ "span",
76
+ {
77
+ "data-slot": "breadcrumb-ellipsis",
78
+ role: "presentation",
79
+ "aria-hidden": "true",
80
+ className: t("flex size-9 items-center justify-center", r),
81
+ ...e,
82
+ children: [
83
+ /* @__PURE__ */ a(o, { className: "size-4" }),
84
+ /* @__PURE__ */ a("span", { className: "sr-only", children: "More" })
85
+ ]
86
+ }
87
+ );
88
+ }
89
+ export {
90
+ x as Z2Breadcrumb,
91
+ k as Z2BreadcrumbEllipsis,
92
+ g as Z2BreadcrumbItem,
93
+ N as Z2BreadcrumbLink,
94
+ h as Z2BreadcrumbList,
95
+ Z as Z2BreadcrumbPage,
96
+ B as Z2BreadcrumbSeparator
97
+ };
@@ -54,6 +54,8 @@ import "../../z2map/components/map-pin-content.js";
54
54
  import "../../z2map/components/map-controls.js";
55
55
  import "../../z2map/components/map-zoom-control.js";
56
56
  import "../../z2map/components/map-style-control.js";
57
+ import "@radix-ui/react-slot";
58
+ import "../../badge/badge.js";
57
59
  import "../../../v2/atoms/inputs/input.js";
58
60
  import "../../../v2/atoms/inputs/label.js";
59
61
  import "../../../v2/atoms/indicators/badge.js";
@@ -63,7 +65,7 @@ import "../../../v2/atoms/indicators/stepper.js";
63
65
  import "../../../v2/atoms/actions/button.js";
64
66
  import "../../../v2/atoms/actions/breadcrumb-link.js";
65
67
  import "../../table/table.context.js";
66
- const Xt = ({
68
+ const Zt = ({
67
69
  dataSource: w,
68
70
  schema: B,
69
71
  loading: b,
@@ -73,7 +75,7 @@ const Xt = ({
73
75
  bordered: n = !0,
74
76
  showHeader: g = !0,
75
77
  headerClassName: j,
76
- search: s,
78
+ search: i,
77
79
  filter: e,
78
80
  headerLeftContent: p,
79
81
  headerActions: h,
@@ -85,7 +87,7 @@ const Xt = ({
85
87
  showFooter: P = !0,
86
88
  footerClassName: T,
87
89
  pagination: l,
88
- paginationInfo: i,
90
+ paginationInfo: s,
89
91
  paginationQuickJumper: a,
90
92
  error: u = !1,
91
93
  dataSourceError: _ = !1
@@ -100,7 +102,7 @@ const Xt = ({
100
102
  typeof u == "string" && /* @__PURE__ */ t("div", { className: "text-text-warning-secondary text-sm", children: u })
101
103
  ] })
102
104
  ] }) });
103
- const N = a && a.totalPage && a.totalPage >= 2, C = l && l.totalPage && l.totalPage >= 2 || !!i || N, v = s || e || p || h, R = typeof (e == null ? void 0 : e.showFilterButton) > "u" ? !0 : e == null ? void 0 : e.showFilterButton;
105
+ const N = a && a.totalPage && a.totalPage >= 2, C = l && l.totalPage && l.totalPage >= 2 || !!s || N, v = i || e || p || h, R = typeof (e == null ? void 0 : e.showFilterButton) > "u" ? !0 : e == null ? void 0 : e.showFilterButton;
104
106
  return /* @__PURE__ */ m("div", { className: d("flex flex-col overflow-hidden relative", H), children: [
105
107
  /* @__PURE__ */ m(r, { dataSource: w, schema: B, emptyMessage: k, children: [
106
108
  g && v && /* @__PURE__ */ m(
@@ -115,16 +117,16 @@ const Xt = ({
115
117
  children: [
116
118
  /* @__PURE__ */ m(r.HeaderContent, { className: "overflow-x-auto p-[1px]", children: [
117
119
  p && p,
118
- s && /* @__PURE__ */ t(
120
+ i && /* @__PURE__ */ t(
119
121
  r.Search,
120
122
  {
121
123
  search: {
122
- value: s.value || "",
123
- onChange: s.onChange || (() => {
124
+ value: i.value || "",
125
+ onChange: i.onChange || (() => {
124
126
  }),
125
- placeholder: s.placeholder
127
+ placeholder: i.placeholder
126
128
  },
127
- className: s.className
129
+ className: i.className
128
130
  }
129
131
  ),
130
132
  e && /* @__PURE__ */ m(
@@ -177,13 +179,13 @@ const Xt = ({
177
179
  T
178
180
  ),
179
181
  children: [
180
- i ? /* @__PURE__ */ t(r.FooterContent, { children: /* @__PURE__ */ t(
182
+ s ? /* @__PURE__ */ t(r.FooterContent, { children: /* @__PURE__ */ t(
181
183
  r.PaginationInfo,
182
184
  {
183
- showTotal: i.showTotal,
184
- totalItems: i.totalItems,
185
- currentPage: i.currentPage,
186
- itemsPerPage: i.itemsPerPage
185
+ showTotal: s.showTotal,
186
+ totalItems: s.totalItems,
187
+ currentPage: s.currentPage,
188
+ itemsPerPage: s.itemsPerPage
187
189
  }
188
190
  ) }) : a || l ? /* @__PURE__ */ t(r.FooterContent, { children: null }) : null,
189
191
  (a || l) && /* @__PURE__ */ m(r.FooterContent, { children: [
@@ -219,5 +221,5 @@ const Xt = ({
219
221
  ] });
220
222
  };
221
223
  export {
222
- Xt as default
224
+ Zt as default
223
225
  };
@@ -54,6 +54,8 @@ import "../../../z2map/components/map-pin-content.js";
54
54
  import "../../../z2map/components/map-controls.js";
55
55
  import "../../../z2map/components/map-zoom-control.js";
56
56
  import "../../../z2map/components/map-style-control.js";
57
+ import "@radix-ui/react-slot";
58
+ import "../../../badge/badge.js";
57
59
  import "../../../../v2/atoms/inputs/input.js";
58
60
  import "../../../../v2/atoms/inputs/label.js";
59
61
  import "../../../../v2/atoms/indicators/badge.js";
@@ -62,7 +64,7 @@ import "../../../../v2/atoms/indicators/featured-icon.js";
62
64
  import "../../../../v2/atoms/indicators/stepper.js";
63
65
  import "../../../../v2/atoms/actions/button.js";
64
66
  import "../../../../v2/atoms/actions/breadcrumb-link.js";
65
- const gt = ({
67
+ const jt = ({
66
68
  avatar: m,
67
69
  value: a,
68
70
  rightIcon: o,
@@ -100,5 +102,5 @@ const gt = ({
100
102
  }
101
103
  );
102
104
  export {
103
- gt as AvatarCell
105
+ jt as AvatarCell
104
106
  };
@@ -59,6 +59,8 @@ import "../z2map/components/map-pin-content.js";
59
59
  import "../z2map/components/map-controls.js";
60
60
  import "../z2map/components/map-zoom-control.js";
61
61
  import "../z2map/components/map-style-control.js";
62
+ import "@radix-ui/react-slot";
63
+ import "../badge/badge.js";
62
64
  import "../../v2/atoms/inputs/input.js";
63
65
  import "../../v2/atoms/inputs/label.js";
64
66
  import "../../v2/atoms/indicators/badge.js";
package/dist/index.d.ts CHANGED
@@ -33,4 +33,8 @@ export * from './components/radio-card/radio-card';
33
33
  export * from './components/z2map';
34
34
  export * from './lib/theme.hook';
35
35
  export * from './lib/utils';
36
+ export * from './components/breadcrumb/z2-breadcrumb';
37
+ export * from './components/badge/badge';
38
+ export * from './components/input/input';
39
+ export * from './components/button/button';
36
40
  export * from './v2';