@vkzstudio/muza-ui 1.0.27 → 1.0.29
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/Calendar/Calendar.d.ts +3 -1
- package/dist/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +129 -120
- package/dist/components/DatePicker/DatePicker.d.ts +2 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +51 -49
- package/dist/components/DatePicker/DatePicker.stories.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.js +79 -55
- package/dist/components/Reorderable/Reorderable.d.ts +43 -5
- package/dist/components/Reorderable/Reorderable.d.ts.map +1 -1
- package/dist/components/Reorderable/Reorderable.js +203 -161
- package/dist/components/Reorderable/Reorderable.stories.d.ts +1 -0
- package/dist/components/Reorderable/Reorderable.stories.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.d.ts +22 -2
- package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.js +52 -42
- 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 +1 -1
|
@@ -1,49 +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
|
-
layout:
|
|
19
|
-
...
|
|
20
|
-
},
|
|
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:
|
|
28
|
+
ref: H,
|
|
24
29
|
className: i(
|
|
25
30
|
"-my-sm w-full border-separate border-spacing-y-sm",
|
|
26
|
-
|
|
31
|
+
T
|
|
27
32
|
),
|
|
28
|
-
...
|
|
33
|
+
...C,
|
|
29
34
|
children: [
|
|
30
|
-
|
|
31
|
-
o.map((
|
|
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
|
-
|
|
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
|
-
|
|
47
|
+
d.className
|
|
43
48
|
),
|
|
44
|
-
children:
|
|
49
|
+
children: d.title
|
|
45
50
|
},
|
|
46
|
-
|
|
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
|
-
|
|
66
|
+
D,
|
|
62
67
|
{
|
|
63
|
-
values:
|
|
64
|
-
onReorder:
|
|
65
|
-
|
|
66
|
-
|
|
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:
|
|
70
|
-
const
|
|
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
|
-
|
|
82
|
+
R,
|
|
73
83
|
{
|
|
74
84
|
value: r,
|
|
75
85
|
as: "tr",
|
|
76
|
-
layout:
|
|
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
|
|
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 ?
|
|
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":
|
|
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
|
-
|
|
114
|
+
h
|
|
105
115
|
) : /* @__PURE__ */ e(
|
|
106
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
) }),
|
|
175
|
-
|
|
184
|
+
) }), U = E(K);
|
|
185
|
+
U.displayName = "ReorderableTable";
|
|
176
186
|
export {
|
|
177
|
-
|
|
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,
|
|
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"}
|