@ztwoint/z-ui 0.1.61 → 0.1.62

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.
Files changed (72) hide show
  1. package/dist/_virtual/bind-all.js +4 -0
  2. package/dist/_virtual/bind.js +4 -0
  3. package/dist/_virtual/index.js +5 -0
  4. package/dist/_virtual/index2.js +4 -0
  5. package/dist/components/assets/icons/drag-handle.js +18 -0
  6. package/dist/components/assets/icons/minus.js +28 -0
  7. package/dist/components/column-reorder/column-reorder.hook.js +47 -0
  8. package/dist/components/column-reorder/column-reorder.js +26 -0
  9. package/dist/components/column-reorder/components/column-item/column-item.hook.js +78 -0
  10. package/dist/components/column-reorder/components/column-item/column-item.js +79 -0
  11. package/dist/components/column-reorder/components/column-item/column-item.util.js +12 -0
  12. package/dist/components/table/components/cell/avatar-cell.js +9 -6
  13. package/dist/components/table/table-provider.js +3 -0
  14. package/dist/components/table-card/table-card.js +32 -29
  15. package/dist/index.d.ts +1 -0
  16. package/dist/index.js +37 -35
  17. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter-native-data-key.js +4 -0
  18. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter.js +127 -0
  19. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/get-element-from-point-without-honey-pot.js +9 -0
  20. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/honey-pot-data-attribute.js +4 -0
  21. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/is-honey-pot-element.js +7 -0
  22. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/make-honey-pot-fix.js +226 -0
  23. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js +107 -0
  24. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/lifecycle-manager.js +195 -0
  25. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/usage-ledger.js +21 -0
  26. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-adapter.js +43 -0
  27. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-drop-target.js +253 -0
  28. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-monitor.js +121 -0
  29. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/combine.js +12 -0
  30. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/element/custom-native-drag-preview/center-under-pointer.js +10 -0
  31. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/element/custom-native-drag-preview/pointer-outside-of-preview.js +31 -0
  32. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/element/custom-native-drag-preview/set-custom-native-drag-preview.js +66 -0
  33. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/once.js +17 -0
  34. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/reorder.js +11 -0
  35. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/add-attribute.js +9 -0
  36. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/android.js +8 -0
  37. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js +57 -0
  38. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-from-another-window.js +9 -0
  39. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-leaving-window.js +13 -0
  40. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/detect-broken-drag.js +47 -0
  41. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/get-input.js +17 -0
  42. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-firefox.js +7 -0
  43. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-safari-on-ios.js +8 -0
  44. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-safari.js +10 -0
  45. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/max-z-index.js +4 -0
  46. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/text-media-type.js +4 -0
  47. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/url-media-type.js +4 -0
  48. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-flourish/dist/esm/trigger-post-move-flash.js +20 -0
  49. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-flourish/node_modules/@atlaskit/motion/dist/esm/utils/durations.js +6 -0
  50. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/closest-edge.js +58 -0
  51. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/get-reorder-destination-index.js +12 -0
  52. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/reorder-with-edge.js +18 -0
  53. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +8 -0
  54. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +6 -0
  55. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +7 -0
  56. package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js +12 -0
  57. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +6 -0
  58. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +24 -0
  59. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +7 -0
  60. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +7 -0
  61. package/dist/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +10 -0
  62. package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +10 -0
  63. package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +14 -0
  64. package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +9 -0
  65. package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js +11 -0
  66. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +11 -0
  67. package/dist/node_modules/bind-event-listener/dist/bind-all.js +45 -0
  68. package/dist/node_modules/bind-event-listener/dist/bind.js +16 -0
  69. package/dist/node_modules/bind-event-listener/dist/index.js +20 -0
  70. package/dist/node_modules/raf-schd/dist/raf-schd.esm.js +15 -0
  71. package/dist/types/index.d.ts +1 -0
  72. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
@@ -0,0 +1,5 @@
1
+ import { __require as r } from "../node_modules/bind-event-listener/dist/index.js";
2
+ var i = /* @__PURE__ */ r();
3
+ export {
4
+ i as d
5
+ };
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
@@ -0,0 +1,18 @@
1
+ import { jsxs as e, jsx as t } from "react/jsx-runtime";
2
+ const x = () => /* @__PURE__ */ e(
3
+ "svg",
4
+ {
5
+ className: "w-5 h-5 text-text-neutral-muted",
6
+ viewBox: "0 0 20 20",
7
+ fill: "currentColor",
8
+ xmlns: "http://www.w3.org/2000/svg",
9
+ children: [
10
+ /* @__PURE__ */ t("rect", { x: "3", y: "5", width: "14", height: "1.6", rx: "0.8" }),
11
+ /* @__PURE__ */ t("rect", { x: "3", y: "9.2", width: "14", height: "1.6", rx: "0.8" }),
12
+ /* @__PURE__ */ t("rect", { x: "3", y: "13.4", width: "14", height: "1.6", rx: "0.8" })
13
+ ]
14
+ }
15
+ );
16
+ export {
17
+ x as default
18
+ };
@@ -0,0 +1,28 @@
1
+ import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
+ function l({ title: i = "minus", ...n }) {
3
+ return /* @__PURE__ */ r(
4
+ "svg",
5
+ {
6
+ width: "14",
7
+ height: "14",
8
+ viewBox: "0 0 14 14",
9
+ fill: "none",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ ...n,
12
+ children: [
13
+ /* @__PURE__ */ t("title", { children: i }),
14
+ /* @__PURE__ */ t(
15
+ "path",
16
+ {
17
+ d: "M11.6394 6.12927C12.0808 6.17395 12.4255 6.54686 12.4255 7C12.4255 7.45314 12.0808 7.82605 11.6394 7.87073L11.5505 7.875H2.4502C1.96702 7.87491 1.5752 7.4832 1.5752 7C1.5752 6.5168 1.96702 6.12509 2.4502 6.125H11.5505L11.6394 6.12927Z",
18
+ fill: "currentColor"
19
+ }
20
+ )
21
+ ]
22
+ }
23
+ );
24
+ }
25
+ export {
26
+ l as Minus,
27
+ l as default
28
+ };
@@ -0,0 +1,47 @@
1
+ import { useState as I, useEffect as p } from "react";
2
+ import { monitorForElements as C } from "../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter.js";
3
+ import { extractClosestEdge as E } from "../../node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/closest-edge.js";
4
+ import { reorderWithEdge as D } from "../../node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/reorder-with-edge.js";
5
+ import { triggerPostMoveFlash as S } from "../../node_modules/@atlaskit/pragmatic-drag-and-drop-flourish/dist/esm/trigger-post-move-flash.js";
6
+ import { flushSync as T } from "react-dom";
7
+ import "react/jsx-runtime";
8
+ import "clsx";
9
+ import "tailwind-merge";
10
+ import { isColumnData as s } from "./components/column-item/column-item.util.js";
11
+ import "../button/button.js";
12
+ const $ = ({ columns: e, onReorder: r }) => {
13
+ const [t, a] = I(e);
14
+ return p(() => {
15
+ a(e);
16
+ }, [e]), p(() => C({
17
+ canMonitor({ source: o }) {
18
+ return s(o.data);
19
+ },
20
+ onDrop({ location: o, source: g }) {
21
+ const c = o.current.dropTargets[0];
22
+ if (!c)
23
+ return;
24
+ const n = g.data, i = c.data;
25
+ if (!s(n) || !s(i))
26
+ return;
27
+ const u = t.findIndex((m) => m.id === n.columnId), d = t.findIndex((m) => m.id === i.columnId);
28
+ if (d < 0 || u < 0)
29
+ return;
30
+ const x = E(i), f = D({
31
+ list: t,
32
+ startIndex: u,
33
+ indexOfTarget: d,
34
+ closestEdgeOfTarget: x,
35
+ axis: "vertical"
36
+ });
37
+ T(() => {
38
+ a(f), r == null || r(f);
39
+ });
40
+ const l = document.querySelector(`[data-column-id="${n.columnId}"]`);
41
+ l instanceof HTMLElement && S(l);
42
+ }
43
+ }), [t, r]), { internalColumns: t };
44
+ };
45
+ export {
46
+ $ as useColumnReorder
47
+ };
@@ -0,0 +1,26 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cn as n } from "../../lib/utils.js";
4
+ import { ColumnItem as s } from "./components/column-item/column-item.js";
5
+ import { useColumnReorder as a } from "./column-reorder.hook.js";
6
+ const b = ({
7
+ columns: e,
8
+ onReorder: d,
9
+ onRemove: i,
10
+ className: m
11
+ }) => {
12
+ const { internalColumns: t } = a({ columns: e, onReorder: d });
13
+ return /* @__PURE__ */ r(
14
+ "div",
15
+ {
16
+ className: n(
17
+ "rounded-2xl border-[0.5px] border-stroke-solid-light bg-background-neutral-default overflow-hidden box-shadow-medium-10",
18
+ m
19
+ ),
20
+ children: /* @__PURE__ */ r("div", { className: "divide-y divide-stroke-solid-light", children: t.map((o, l) => /* @__PURE__ */ r(s, { column: o, index: l, onRemove: i }, o.id)) })
21
+ }
22
+ );
23
+ };
24
+ export {
25
+ b as ColumnReOrder
26
+ };
@@ -0,0 +1,78 @@
1
+ import { useRef as f, useState as l, useEffect as u } from "react";
2
+ import { dropTargetForElements as D, draggable as c } from "../../../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter.js";
3
+ import { setCustomNativeDragPreview as v } from "../../../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/element/custom-native-drag-preview/set-custom-native-drag-preview.js";
4
+ import { pointerOutsideOfPreview as E } from "../../../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/element/custom-native-drag-preview/pointer-outside-of-preview.js";
5
+ import { combine as y } from "../../../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/combine.js";
6
+ import { extractClosestEdge as p, attachClosestEdge as C } from "../../../../node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/closest-edge.js";
7
+ import { getColumnData as m, isColumnData as w } from "./column-item.util.js";
8
+ const a = { type: "idle" }, k = (n, s) => {
9
+ const i = f(null), [d, r] = l(a);
10
+ return u(() => {
11
+ const o = i.current;
12
+ if (o)
13
+ return y(
14
+ c({
15
+ element: o,
16
+ getInitialData() {
17
+ return m(n, s);
18
+ },
19
+ onGenerateDragPreview({ nativeSetDragImage: e }) {
20
+ v({
21
+ nativeSetDragImage: e,
22
+ getOffset: E({
23
+ x: "16px",
24
+ y: "0px"
25
+ }),
26
+ render({ container: t }) {
27
+ r({ type: "preview", container: t });
28
+ }
29
+ });
30
+ },
31
+ onDragStart() {
32
+ r({ type: "is-dragging" });
33
+ },
34
+ onDrop() {
35
+ r(a);
36
+ }
37
+ }),
38
+ D({
39
+ element: o,
40
+ canDrop({ source: e }) {
41
+ return e.element === o ? !1 : w(e.data);
42
+ },
43
+ getData({ input: e }) {
44
+ const t = m(n, s);
45
+ return C(t, {
46
+ element: o,
47
+ input: e,
48
+ allowedEdges: ["top", "bottom"]
49
+ });
50
+ },
51
+ getIsSticky() {
52
+ return !0;
53
+ },
54
+ onDragEnter({ self: e }) {
55
+ const t = p(e.data);
56
+ r({ type: "is-dragging-over", closestEdge: t });
57
+ },
58
+ onDrag({ self: e }) {
59
+ const t = p(e.data);
60
+ r((g) => g.type === "is-dragging-over" && g.closestEdge === t ? g : { type: "is-dragging-over", closestEdge: t });
61
+ },
62
+ onDragLeave() {
63
+ r(a);
64
+ },
65
+ onDrop() {
66
+ r(a);
67
+ }
68
+ })
69
+ );
70
+ }, [n, s]), {
71
+ ref: i,
72
+ state: d
73
+ };
74
+ };
75
+ export {
76
+ a as idle,
77
+ k as useColumnItemDragAndDrop
78
+ };
@@ -0,0 +1,79 @@
1
+ import { jsxs as s, Fragment as u, jsx as e } from "react/jsx-runtime";
2
+ import { createPortal as g } from "react-dom";
3
+ import "react";
4
+ import { cn as i } from "../../../../lib/utils.js";
5
+ import { useColumnItemDragAndDrop as p } from "./column-item.hook.js";
6
+ import { Button as f } from "../../../button/button.js";
7
+ import { Minus as h } from "../../../assets/icons/minus.js";
8
+ import { parseColumnLabel as l } from "./column-item.util.js";
9
+ import c from "../../../assets/icons/drag-handle.js";
10
+ const x = {
11
+ "is-dragging": "opacity-40",
12
+ "is-dragging-over": "bg-background-neutral-medium"
13
+ }, b = ({
14
+ edge: t,
15
+ isFirstElement: r = !1
16
+ }) => /* @__PURE__ */ e(
17
+ "div",
18
+ {
19
+ className: i(
20
+ "absolute left-0 right-0 h-0.5 bg-blue-500",
21
+ t === "top" ? r ? "top-0" : "top-[-3px]" : "bottom-0"
22
+ )
23
+ }
24
+ );
25
+ function N({ column: t }) {
26
+ const { groupLabel: r, fieldLabel: n } = l(t);
27
+ return /* @__PURE__ */ s("div", { className: "flex items-center gap-3 p-1 bg-background-neutral-default border border-stroke-solid-light rounded-xl ", children: [
28
+ /* @__PURE__ */ e(c, {}),
29
+ /* @__PURE__ */ e("div", { className: "shrink-0 flex items-center justify-center w-3.5 h-3.5 ", children: t.icon }),
30
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-0.5 min-w-0 leading-none-regular-sm", children: [
31
+ /* @__PURE__ */ e("span", { className: "text-text-neutral-secondary truncate", children: r }),
32
+ /* @__PURE__ */ e("span", { className: "text-text-neutral-muted", children: "/" }),
33
+ /* @__PURE__ */ e("span", { className: "text-text-neutral-primary truncate", children: n })
34
+ ] })
35
+ ] });
36
+ }
37
+ const E = ({ column: t, index: r, onRemove: n }) => {
38
+ const { ref: d, state: a } = p(t, r), { groupLabel: o, fieldLabel: m } = l(t);
39
+ return /* @__PURE__ */ s(u, { children: [
40
+ /* @__PURE__ */ s("div", { className: "relative border-b-0.5", children: [
41
+ /* @__PURE__ */ s(
42
+ "div",
43
+ {
44
+ "data-column-id": t.id,
45
+ ref: d,
46
+ className: i(
47
+ "flex items-center gap-2 p-1 pl-3 bg-background-neutral-default cursor-grab hover:bg-background-neutral-medium transition-colors",
48
+ x[a.type] ?? ""
49
+ ),
50
+ children: [
51
+ /* @__PURE__ */ e(c, {}),
52
+ /* @__PURE__ */ e("div", { className: "shrink-0 flex items-center justify-center w-3.5 h-3.5", children: t.icon }),
53
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-0.5 min-w-0 leading-none-regular-sm", children: [
54
+ /* @__PURE__ */ e("span", { className: "text-text-neutral-secondary truncate", children: o }),
55
+ /* @__PURE__ */ e("span", { className: "text-text-neutral-muted", children: "/" }),
56
+ /* @__PURE__ */ e("span", { className: "text-text-neutral-primary truncate", children: m })
57
+ ] }),
58
+ /* @__PURE__ */ e("div", { className: "ml-auto flex items-center gap-3", children: /* @__PURE__ */ e(
59
+ f,
60
+ {
61
+ onClick: () => n == null ? void 0 : n(t.id),
62
+ variant: "ghost",
63
+ shade: "neutral",
64
+ size: "medium",
65
+ leftIcon: /* @__PURE__ */ e(h, { className: "w-4 h-4" })
66
+ }
67
+ ) })
68
+ ]
69
+ }
70
+ ),
71
+ a.type === "is-dragging-over" && a.closestEdge && /* @__PURE__ */ e(b, { edge: a.closestEdge, isFirstElement: r === 0 })
72
+ ] }),
73
+ a.type === "preview" && g(/* @__PURE__ */ e(N, { column: t }), a.container)
74
+ ] });
75
+ };
76
+ export {
77
+ E as ColumnItem,
78
+ E as default
79
+ };
@@ -0,0 +1,12 @@
1
+ const t = (e, n) => ({
2
+ columnId: e.id,
3
+ index: n
4
+ }), l = (e) => typeof e.columnId == "string" && typeof e.index == "number", r = (e) => {
5
+ const [n, o] = e.label;
6
+ return { groupLabel: n, fieldLabel: o };
7
+ };
8
+ export {
9
+ t as getColumnData,
10
+ l as isColumnData,
11
+ r as parseColumnLabel
12
+ };
@@ -34,12 +34,15 @@ import "../../table.context.js";
34
34
  import "../../../tooltip/tooltip.js";
35
35
  import "../../../badge/badge.js";
36
36
  import "../../../text-preset/text-preset.js";
37
- const X = ({
37
+ import "react-dom";
38
+ import "../../../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js";
39
+ import "../../../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js";
40
+ const _ = ({
38
41
  avatar: m,
39
42
  value: a,
40
- rightIcon: e,
43
+ rightIcon: o,
41
44
  className: s,
42
- helperText: o,
45
+ helperText: e,
43
46
  description: l
44
47
  }) => /* @__PURE__ */ i(
45
48
  "div",
@@ -61,8 +64,8 @@ const X = ({
61
64
  a
62
65
  ] }),
63
66
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2.5", children: [
64
- o && /* @__PURE__ */ t("span", { className: "text-text-neutral-secondary", children: o }),
65
- e && /* @__PURE__ */ t("span", { className: r("min-h-max min-w-max"), children: e })
67
+ e && /* @__PURE__ */ t("span", { className: "text-text-neutral-secondary", children: e }),
68
+ o && /* @__PURE__ */ t("span", { className: r("min-h-max min-w-max"), children: o })
66
69
  ] })
67
70
  ]
68
71
  }
@@ -72,5 +75,5 @@ const X = ({
72
75
  }
73
76
  );
74
77
  export {
75
- X as AvatarCell
78
+ _ as AvatarCell
76
79
  };
@@ -40,6 +40,9 @@ import "../tooltip/tooltip.js";
40
40
  import "../badge/badge.js";
41
41
  import "../avatar/avatar.js";
42
42
  import "../text-preset/text-preset.js";
43
+ import "react-dom";
44
+ import "../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js";
45
+ import "../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js";
43
46
  import { TableHeaderWrapper as c } from "./components/table-header-wrapper.js";
44
47
  import { TableHeaderContent as d } from "./components/table-header-content.js";
45
48
  import { TableFooter as u } from "./components/table-footer.js";
@@ -1,5 +1,5 @@
1
- import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
- import { Table as t } from "../table/table-provider.js";
1
+ import { jsx as t, jsxs as a } from "react/jsx-runtime";
2
+ import { Table as e } from "../table/table-provider.js";
3
3
  import "react";
4
4
  import { cn as i } from "../../lib/utils.js";
5
5
  /* empty css */
@@ -34,8 +34,11 @@ import f from "../assets/icons/octagon-warning-Copy.js";
34
34
  import "../badge/badge.js";
35
35
  import "../avatar/avatar.js";
36
36
  import "../text-preset/text-preset.js";
37
+ import "react-dom";
38
+ import "../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js";
39
+ import "../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js";
37
40
  import "../table/table.context.js";
38
- const Pe = ({
41
+ const Ct = ({
39
42
  dataSource: w,
40
43
  schema: P,
41
44
  loading: H,
@@ -63,18 +66,18 @@ const Pe = ({
63
66
  }) => {
64
67
  var v;
65
68
  if (x)
66
- return /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center h-64 bg-background-error-subtle rounded-lg text-text-warning-secondary", children: /* @__PURE__ */ a("div", { className: "flex gap-2", children: [
67
- /* @__PURE__ */ e(f, { className: "mt-1.5" }),
69
+ return /* @__PURE__ */ t("div", { className: "flex flex-col items-center justify-center h-64 bg-background-error-subtle rounded-lg text-text-warning-secondary", children: /* @__PURE__ */ a("div", { className: "flex gap-2", children: [
70
+ /* @__PURE__ */ t(f, { className: "mt-1.5" }),
68
71
  /* @__PURE__ */ a("div", { className: "flex flex-col gap-2", children: [
69
- /* @__PURE__ */ e("div", { className: "text-text-error-primary text-lg font-medium", children: "Error loading data" }),
70
- /* @__PURE__ */ e("div", { className: "text-sm", children: "Please try again later" }),
71
- typeof x == "string" && /* @__PURE__ */ e("div", { className: "text-text-warning-secondary text-sm", children: x })
72
+ /* @__PURE__ */ t("div", { className: "text-text-error-primary text-lg font-medium", children: "Error loading data" }),
73
+ /* @__PURE__ */ t("div", { className: "text-sm", children: "Please try again later" }),
74
+ typeof x == "string" && /* @__PURE__ */ t("div", { className: "text-text-warning-secondary text-sm", children: x })
72
75
  ] })
73
76
  ] }) });
74
77
  const C = s && s.totalPage && s.totalPage >= 2, N = o && o.totalPage && o.totalPage >= 2 || !!c || C, F = m || r || h || u, R = typeof (r == null ? void 0 : r.showFilterButton) > "u" ? !0 : r == null ? void 0 : r.showFilterButton;
75
- return /* @__PURE__ */ e("div", { className: i("flex flex-col overflow-hidden", T), children: /* @__PURE__ */ a(t, { dataSource: w, schema: P, loading: H, emptyMessage: k, children: [
78
+ return /* @__PURE__ */ t("div", { className: i("flex flex-col overflow-hidden", T), children: /* @__PURE__ */ a(e, { dataSource: w, schema: P, loading: H, emptyMessage: k, children: [
76
79
  g && F && /* @__PURE__ */ a(
77
- t.Header,
80
+ e.Header,
78
81
  {
79
82
  className: i(
80
83
  "flex-shrink-0",
@@ -83,10 +86,10 @@ const Pe = ({
83
86
  _
84
87
  ),
85
88
  children: [
86
- /* @__PURE__ */ a(t.HeaderContent, { children: [
89
+ /* @__PURE__ */ a(e.HeaderContent, { children: [
87
90
  h && h,
88
- m && /* @__PURE__ */ e(
89
- t.Search,
91
+ m && /* @__PURE__ */ t(
92
+ e.Search,
90
93
  {
91
94
  search: {
92
95
  value: m.value || "",
@@ -98,7 +101,7 @@ const Pe = ({
98
101
  }
99
102
  ),
100
103
  r && /* @__PURE__ */ a(
101
- t.Filter,
104
+ e.Filter,
102
105
  {
103
106
  schema: P,
104
107
  filter: {
@@ -107,18 +110,18 @@ const Pe = ({
107
110
  })
108
111
  },
109
112
  children: [
110
- R && /* @__PURE__ */ e(t.Filter.FilterButton, {}),
111
- (v = r == null ? void 0 : r.quickFilters) == null ? void 0 : v.map((B) => /* @__PURE__ */ e(t.Filter.FilterColumnButton, { filterName: B }, B))
113
+ R && /* @__PURE__ */ t(e.Filter.FilterButton, {}),
114
+ (v = r == null ? void 0 : r.quickFilters) == null ? void 0 : v.map((B) => /* @__PURE__ */ t(e.Filter.FilterColumnButton, { filterName: B }, B))
112
115
  ]
113
116
  }
114
117
  )
115
118
  ] }),
116
- u && /* @__PURE__ */ e(t.HeaderContent, { children: u })
119
+ u && /* @__PURE__ */ t(e.HeaderContent, { children: u })
117
120
  ]
118
121
  }
119
122
  ),
120
- /* @__PURE__ */ e(
121
- t.Body,
123
+ /* @__PURE__ */ t(
124
+ e.Body,
122
125
  {
123
126
  cell: l == null ? void 0 : l.cell,
124
127
  sort: l == null ? void 0 : l.sort,
@@ -135,7 +138,7 @@ const Pe = ({
135
138
  }
136
139
  ),
137
140
  p && N && /* @__PURE__ */ a(
138
- t.Footer,
141
+ e.Footer,
139
142
  {
140
143
  className: i(
141
144
  "flex-shrink-0 border-stroke-solid-light border-t-[0.5px] mt-[-2px]",
@@ -144,18 +147,18 @@ const Pe = ({
144
147
  j
145
148
  ),
146
149
  children: [
147
- c ? /* @__PURE__ */ e(t.FooterContent, { children: /* @__PURE__ */ e(
148
- t.PaginationInfo,
150
+ c ? /* @__PURE__ */ t(e.FooterContent, { children: /* @__PURE__ */ t(
151
+ e.PaginationInfo,
149
152
  {
150
153
  showTotal: c.showTotal,
151
154
  totalItems: c.totalItems,
152
155
  currentPage: c.currentPage,
153
156
  itemsPerPage: c.itemsPerPage
154
157
  }
155
- ) }) : s || o ? /* @__PURE__ */ e(t.FooterContent, { children: null }) : null,
156
- (s || o) && /* @__PURE__ */ a(t.FooterContent, { children: [
157
- C && /* @__PURE__ */ e(
158
- t.PaginationQuickJumper,
158
+ ) }) : s || o ? /* @__PURE__ */ t(e.FooterContent, { children: null }) : null,
159
+ (s || o) && /* @__PURE__ */ a(e.FooterContent, { children: [
160
+ C && /* @__PURE__ */ t(
161
+ e.PaginationQuickJumper,
159
162
  {
160
163
  currentPage: s.currentPage,
161
164
  totalPage: s.totalPage,
@@ -164,8 +167,8 @@ const Pe = ({
164
167
  disabled: s.disabled
165
168
  }
166
169
  ),
167
- o && /* @__PURE__ */ e(
168
- t.Pagination,
170
+ o && /* @__PURE__ */ t(
171
+ e.Pagination,
169
172
  {
170
173
  currentPage: o.currentPage,
171
174
  totalPage: o.totalPage,
@@ -181,5 +184,5 @@ const Pe = ({
181
184
  ] }) });
182
185
  };
183
186
  export {
184
- Pe as default
187
+ Ct as default
185
188
  };
package/dist/index.d.ts CHANGED
@@ -19,6 +19,7 @@ export * from './components/table-card';
19
19
  export * from './components/badge/badge';
20
20
  export * from './components/avatar/avatar';
21
21
  export * from './components/text-preset/text-preset';
22
+ export * from './components/column-reorder';
22
23
  export * from './components/assets/icons/apartment-building';
23
24
  export * from './components/assets/icons/chevron-down';
24
25
  export * from './components/assets/icons/chevron-left';