@vkzstudio/muza-ui 1.0.26 → 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.
Files changed (24) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +3 -1
  2. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  3. package/dist/components/Accordion/Accordion.js +99 -67
  4. package/dist/components/Accordion/Accordion.stories.d.ts +1 -0
  5. package/dist/components/Accordion/Accordion.stories.d.ts.map +1 -1
  6. package/dist/components/MuzaUIProvider/index.d.ts +1 -1
  7. package/dist/components/MuzaUIProvider/index.d.ts.map +1 -1
  8. package/dist/components/MuzaUIProvider/theme/ThemeProvider.d.ts +12 -2
  9. package/dist/components/MuzaUIProvider/theme/ThemeProvider.d.ts.map +1 -1
  10. package/dist/components/MuzaUIProvider/theme/ThemeProvider.js +29 -29
  11. package/dist/components/MuzaUIProvider/theme/index.d.ts +1 -1
  12. package/dist/components/MuzaUIProvider/theme/index.d.ts.map +1 -1
  13. package/dist/components/Reorderable/Reorderable.d.ts +48 -5
  14. package/dist/components/Reorderable/Reorderable.d.ts.map +1 -1
  15. package/dist/components/Reorderable/Reorderable.js +197 -153
  16. package/dist/components/Reorderable/Reorderable.stories.d.ts +2 -0
  17. package/dist/components/Reorderable/Reorderable.stories.d.ts.map +1 -1
  18. package/dist/components/ReorderableTable/ReorderableTable.d.ts +27 -2
  19. package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -1
  20. package/dist/components/ReorderableTable/ReorderableTable.js +52 -40
  21. package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts +1 -0
  22. package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -1
  23. package/dist/muza-ui.css +1 -1
  24. package/package.json +2 -1
@@ -1,48 +1,54 @@
1
1
  import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
- import { forwardRef as T } 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 w, ReorderableItem as A, ReorderableHandle as C } from "../Reorderable/Reorderable.js";
5
- import { Reorder as H } 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 O, Typography as k } from "../Typography/Typography.js";
8
- const p = 72, u = 20, E = 24, D = 4, R = ({
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
- ...L
19
- }, _) => /* @__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(
20
26
  "table",
21
27
  {
22
- ref: _,
28
+ ref: H,
23
29
  className: i(
24
30
  "-my-sm w-full border-separate border-spacing-y-sm",
25
- g
31
+ T
26
32
  ),
27
- ...L,
33
+ ...C,
28
34
  children: [
29
- N && /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ m("tr", { children: [
30
- o.map((r, d) => /* @__PURE__ */ e(
35
+ I && /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ m("tr", { children: [
36
+ o.map((d, r) => /* @__PURE__ */ e(
31
37
  "th",
32
38
  {
33
39
  className: i(
34
- O({
40
+ S({
35
41
  size: "sm",
36
42
  uppercase: !0,
37
43
  variant: "body",
38
44
  weight: "medium"
39
45
  }),
40
46
  "px-comp-table-p text-left text-text-dark-secondary",
41
- r.className
47
+ d.className
42
48
  ),
43
- children: r.title
49
+ children: d.title
44
50
  },
45
- d
51
+ r
46
52
  )),
47
53
  /* @__PURE__ */ e(
48
54
  n.th,
@@ -57,41 +63,47 @@ const p = 72, u = 20, E = 24, D = 4, R = ({
57
63
  )
58
64
  ] }) }),
59
65
  /* @__PURE__ */ e(
60
- w,
66
+ D,
61
67
  {
62
- values: b,
63
- onReorder: y,
64
- disabled: h,
65
- 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,
66
77
  as: "tbody",
67
78
  className: "contents",
68
- children: b.map((r, d) => {
69
- const v = (l == null ? void 0 : l(r, d)) ?? !1, t = h || v;
79
+ children: (d) => d.map((r, h) => {
80
+ const O = (l == null ? void 0 : l(r, h)) ?? !1, t = b || O;
70
81
  return /* @__PURE__ */ m(
71
- A,
82
+ R,
72
83
  {
73
84
  value: r,
74
85
  as: "tr",
86
+ layout: A,
75
87
  disabled: t,
76
88
  dragListenerDisabled: !0,
77
89
  whileDrag: t ? void 0 : { boxShadow: "0 8px 32px 0 rgba(59, 18, 107, 0.2)" },
78
90
  className: "group rounded-2xl",
79
91
  children: [
80
92
  o.map((a, c) => {
81
- const I = c === 0, f = c === o.length - 1;
93
+ const k = c === 0, f = c === o.length - 1;
82
94
  return /* @__PURE__ */ e(
83
95
  n.td,
84
96
  {
85
97
  initial: !1,
86
98
  animate: f ? {
87
- paddingRight: s ? E : D
99
+ paddingRight: s ? G : W
88
100
  } : void 0,
89
101
  transition: { duration: 0.3, ease: "easeInOut" },
90
102
  className: i(
91
103
  "h-comp-table-h border-y border-stroke-base-secondary bg-surface-base-secondary align-middle",
92
104
  f ? "pl-comp-table-p" : "px-comp-table-p",
93
105
  {
94
- "rounded-l-xl border-l": I,
106
+ "rounded-l-xl border-l": k,
95
107
  "group-focus-within:border-icon-brand-focus group-hover:border-icon-brand-hover": !t
96
108
  },
97
109
  a.className
@@ -99,9 +111,9 @@ const p = 72, u = 20, E = 24, D = 4, R = ({
99
111
  children: a.render ? a.render(
100
112
  r[a.dataKey],
101
113
  r,
102
- d
114
+ h
103
115
  ) : /* @__PURE__ */ e(
104
- k,
116
+ z,
105
117
  {
106
118
  variant: "body",
107
119
  size: "base",
@@ -146,14 +158,14 @@ const p = 72, u = 20, E = 24, D = 4, R = ({
146
158
  transition: { duration: 0.3, ease: "easeInOut" },
147
159
  className: "flex h-full items-center justify-center overflow-hidden border-l border-stroke-base-secondary",
148
160
  children: /* @__PURE__ */ e(
149
- C,
161
+ j,
150
162
  {
151
163
  disabled: !s || t,
152
164
  className: i(
153
165
  "flex h-comp-button-h-sm w-comp-button-w-sm items-center justify-center focus-visible-default",
154
166
  t ? "text-text-dark-disabled" : "text-text-brand-def"
155
167
  ),
156
- children: /* @__PURE__ */ e(H, { className: "size-icon-default" })
168
+ children: /* @__PURE__ */ e(P, { className: "size-icon-default" })
157
169
  }
158
170
  )
159
171
  }
@@ -169,8 +181,8 @@ const p = 72, u = 20, E = 24, D = 4, R = ({
169
181
  )
170
182
  ]
171
183
  }
172
- ) }), j = T(R);
173
- j.displayName = "ReorderableTable";
184
+ ) }), U = E(K);
185
+ U.displayName = "ReorderableTable";
174
186
  export {
175
- j as ReorderableTable
187
+ U as ReorderableTable
176
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"}