@vkzstudio/muza-ui 1.0.27 → 1.0.28

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.
@@ -1,49 +1,54 @@
1
1
  import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
- import { forwardRef as w } from "react";
2
+ import { forwardRef as E } from "react";
3
3
  import { motion as n } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
4
- import { ReorderableGroup as A, ReorderableItem as C, ReorderableHandle as H } from "../Reorderable/Reorderable.js";
5
- import { Reorder as O } from "../Icons/CustomIcons.js";
4
+ import { ReorderableGroup as D, ReorderableItem as R, ReorderableHandle as j } from "../Reorderable/Reorderable.js";
5
+ import { Reorder as P } from "../Icons/CustomIcons.js";
6
6
  import { cn as i } from "../../utils/cn.js";
7
- import { typographyVariants as k, Typography as E } from "../Typography/Typography.js";
8
- const p = 72, u = 20, D = 24, R = 4, j = ({
9
- data: b,
10
- onReorder: y,
7
+ import { typographyVariants as S, Typography as z } from "../Typography/Typography.js";
8
+ const p = 72, u = 20, G = 24, W = 4, K = ({
9
+ data: y,
10
+ onReorder: N,
11
+ onSync: g,
12
+ syncDelay: x,
13
+ onSyncPendingChange: L,
14
+ onDragStart: _,
15
+ onDragEnd: v,
11
16
  columns: o,
12
- showHeader: N = !1,
13
- disabled: h = !1,
17
+ showHeader: I = !1,
18
+ disabled: b = !1,
14
19
  isRowDisabled: l,
15
- className: g,
20
+ className: T,
16
21
  isMovable: s = !0,
17
- animateItems: x = !1,
18
- layout: L,
19
- ..._
20
- }, v) => /* @__PURE__ */ e("div", { className: "w-full", children: /* @__PURE__ */ m(
22
+ animateItems: w = !1,
23
+ layout: A,
24
+ ...C
25
+ }, H) => /* @__PURE__ */ e("div", { className: "w-full", children: /* @__PURE__ */ m(
21
26
  "table",
22
27
  {
23
- ref: v,
28
+ ref: H,
24
29
  className: i(
25
30
  "-my-sm w-full border-separate border-spacing-y-sm",
26
- g
31
+ T
27
32
  ),
28
- ..._,
33
+ ...C,
29
34
  children: [
30
- N && /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ m("tr", { children: [
31
- o.map((r, d) => /* @__PURE__ */ e(
35
+ I && /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ m("tr", { children: [
36
+ o.map((d, r) => /* @__PURE__ */ e(
32
37
  "th",
33
38
  {
34
39
  className: i(
35
- k({
40
+ S({
36
41
  size: "sm",
37
42
  uppercase: !0,
38
43
  variant: "body",
39
44
  weight: "medium"
40
45
  }),
41
46
  "px-comp-table-p text-left text-text-dark-secondary",
42
- r.className
47
+ d.className
43
48
  ),
44
- children: r.title
49
+ children: d.title
45
50
  },
46
- d
51
+ r
47
52
  )),
48
53
  /* @__PURE__ */ e(
49
54
  n.th,
@@ -58,42 +63,47 @@ const p = 72, u = 20, D = 24, R = 4, j = ({
58
63
  )
59
64
  ] }) }),
60
65
  /* @__PURE__ */ e(
61
- A,
66
+ D,
62
67
  {
63
- values: b,
64
- onReorder: y,
65
- disabled: h,
66
- animatePresence: x,
68
+ values: y,
69
+ onReorder: N,
70
+ onSync: g,
71
+ syncDelay: x,
72
+ onSyncPendingChange: L,
73
+ onDragStart: _,
74
+ onDragEnd: v,
75
+ disabled: b,
76
+ animatePresence: w,
67
77
  as: "tbody",
68
78
  className: "contents",
69
- children: b.map((r, d) => {
70
- const I = (l == null ? void 0 : l(r, d)) ?? !1, t = h || I;
79
+ children: (d) => d.map((r, h) => {
80
+ const O = (l == null ? void 0 : l(r, h)) ?? !1, t = b || O;
71
81
  return /* @__PURE__ */ m(
72
- C,
82
+ R,
73
83
  {
74
84
  value: r,
75
85
  as: "tr",
76
- layout: L,
86
+ layout: A,
77
87
  disabled: t,
78
88
  dragListenerDisabled: !0,
79
89
  whileDrag: t ? void 0 : { boxShadow: "0 8px 32px 0 rgba(59, 18, 107, 0.2)" },
80
90
  className: "group rounded-2xl",
81
91
  children: [
82
92
  o.map((a, c) => {
83
- const T = c === 0, f = c === o.length - 1;
93
+ const k = c === 0, f = c === o.length - 1;
84
94
  return /* @__PURE__ */ e(
85
95
  n.td,
86
96
  {
87
97
  initial: !1,
88
98
  animate: f ? {
89
- paddingRight: s ? D : R
99
+ paddingRight: s ? G : W
90
100
  } : void 0,
91
101
  transition: { duration: 0.3, ease: "easeInOut" },
92
102
  className: i(
93
103
  "h-comp-table-h border-y border-stroke-base-secondary bg-surface-base-secondary align-middle",
94
104
  f ? "pl-comp-table-p" : "px-comp-table-p",
95
105
  {
96
- "rounded-l-xl border-l": T,
106
+ "rounded-l-xl border-l": k,
97
107
  "group-focus-within:border-icon-brand-focus group-hover:border-icon-brand-hover": !t
98
108
  },
99
109
  a.className
@@ -101,9 +111,9 @@ const p = 72, u = 20, D = 24, R = 4, j = ({
101
111
  children: a.render ? a.render(
102
112
  r[a.dataKey],
103
113
  r,
104
- d
114
+ h
105
115
  ) : /* @__PURE__ */ e(
106
- E,
116
+ z,
107
117
  {
108
118
  variant: "body",
109
119
  size: "base",
@@ -148,14 +158,14 @@ const p = 72, u = 20, D = 24, R = 4, j = ({
148
158
  transition: { duration: 0.3, ease: "easeInOut" },
149
159
  className: "flex h-full items-center justify-center overflow-hidden border-l border-stroke-base-secondary",
150
160
  children: /* @__PURE__ */ e(
151
- H,
161
+ j,
152
162
  {
153
163
  disabled: !s || t,
154
164
  className: i(
155
165
  "flex h-comp-button-h-sm w-comp-button-w-sm items-center justify-center focus-visible-default",
156
166
  t ? "text-text-dark-disabled" : "text-text-brand-def"
157
167
  ),
158
- children: /* @__PURE__ */ e(O, { className: "size-icon-default" })
168
+ children: /* @__PURE__ */ e(P, { className: "size-icon-default" })
159
169
  }
160
170
  )
161
171
  }
@@ -171,8 +181,8 @@ const p = 72, u = 20, D = 24, R = 4, j = ({
171
181
  )
172
182
  ]
173
183
  }
174
- ) }), P = w(j);
175
- P.displayName = "ReorderableTable";
184
+ ) }), U = E(K);
185
+ U.displayName = "ReorderableTable";
176
186
  export {
177
- P as ReorderableTable
187
+ U as ReorderableTable
178
188
  };
@@ -16,4 +16,5 @@ export declare const WithoutHeader: Story;
16
16
  export declare const WithDisabledRow: Story;
17
17
  export declare const AnimatedRows: Story;
18
18
  export declare const FullyDisabled: Story;
19
+ export declare const SyncMode: Story;
19
20
  //# sourceMappingURL=ReorderableTable.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ReorderableTable.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ReorderableTable/ReorderableTable.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAM3D,OAAO,EACL,gBAAgB,EAEjB,MAAM,oBAAoB,CAAA;AAE3B,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAA;CAC9B;AAyCD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAkDvC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAA;AAExD,eAAO,MAAM,OAAO,EAAE,KAkHrB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAsG3B,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KA2G7B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KA0H1B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAkG3B,CAAA"}
1
+ {"version":3,"file":"ReorderableTable.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ReorderableTable/ReorderableTable.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAM3D,OAAO,EACL,gBAAgB,EAEjB,MAAM,oBAAoB,CAAA;AAE3B,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAA;CAC9B;AAyCD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAiEvC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAA;AAExD,eAAO,MAAM,OAAO,EAAE,KAkHrB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAsG3B,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KA2G7B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KA0H1B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAkG3B,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KA4FtB,CAAA"}