@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.
- package/dist/components/Accordion/Accordion.d.ts +3 -1
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.js +99 -67
- package/dist/components/Accordion/Accordion.stories.d.ts +1 -0
- package/dist/components/Accordion/Accordion.stories.d.ts.map +1 -1
- package/dist/components/MuzaUIProvider/index.d.ts +1 -1
- package/dist/components/MuzaUIProvider/index.d.ts.map +1 -1
- package/dist/components/MuzaUIProvider/theme/ThemeProvider.d.ts +12 -2
- package/dist/components/MuzaUIProvider/theme/ThemeProvider.d.ts.map +1 -1
- package/dist/components/MuzaUIProvider/theme/ThemeProvider.js +29 -29
- package/dist/components/MuzaUIProvider/theme/index.d.ts +1 -1
- package/dist/components/MuzaUIProvider/theme/index.d.ts.map +1 -1
- package/dist/components/Reorderable/Reorderable.d.ts +48 -5
- package/dist/components/Reorderable/Reorderable.d.ts.map +1 -1
- package/dist/components/Reorderable/Reorderable.js +197 -153
- package/dist/components/Reorderable/Reorderable.stories.d.ts +2 -0
- package/dist/components/Reorderable/Reorderable.stories.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.d.ts +27 -2
- package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.js +52 -40
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts +1 -0
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -1
- package/dist/muza-ui.css +1 -1
- 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
|
|
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
|
|
5
|
-
import { Reorder as
|
|
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
|
|
8
|
-
const p = 72, u = 20,
|
|
9
|
-
data:
|
|
10
|
-
onReorder:
|
|
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:
|
|
13
|
-
disabled:
|
|
17
|
+
showHeader: I = !1,
|
|
18
|
+
disabled: b = !1,
|
|
14
19
|
isRowDisabled: l,
|
|
15
|
-
className:
|
|
20
|
+
className: T,
|
|
16
21
|
isMovable: s = !0,
|
|
17
|
-
animateItems:
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
31
|
+
T
|
|
26
32
|
),
|
|
27
|
-
...
|
|
33
|
+
...C,
|
|
28
34
|
children: [
|
|
29
|
-
|
|
30
|
-
o.map((
|
|
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
|
-
|
|
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
|
-
|
|
47
|
+
d.className
|
|
42
48
|
),
|
|
43
|
-
children:
|
|
49
|
+
children: d.title
|
|
44
50
|
},
|
|
45
|
-
|
|
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
|
-
|
|
66
|
+
D,
|
|
61
67
|
{
|
|
62
|
-
values:
|
|
63
|
-
onReorder:
|
|
64
|
-
|
|
65
|
-
|
|
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:
|
|
69
|
-
const
|
|
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
|
-
|
|
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
|
|
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 ?
|
|
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":
|
|
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
|
-
|
|
114
|
+
h
|
|
103
115
|
) : /* @__PURE__ */ e(
|
|
104
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
) }),
|
|
173
|
-
|
|
184
|
+
) }), U = E(K);
|
|
185
|
+
U.displayName = "ReorderableTable";
|
|
174
186
|
export {
|
|
175
|
-
|
|
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,
|
|
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"}
|