@moises.ai/design-system 4.17.10 → 4.17.11
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/index.js
CHANGED
|
@@ -8429,33 +8429,34 @@ const nI = ({
|
|
|
8429
8429
|
loading: l = !1,
|
|
8430
8430
|
failed: c = !1,
|
|
8431
8431
|
children: d,
|
|
8432
|
-
|
|
8432
|
+
labels: u = {},
|
|
8433
|
+
...p
|
|
8433
8434
|
}) => {
|
|
8434
8435
|
const {
|
|
8435
|
-
projects:
|
|
8436
|
-
onInsertAllTracks:
|
|
8437
|
-
onProjectClick:
|
|
8438
|
-
openedItem:
|
|
8439
|
-
setOpenedItem:
|
|
8440
|
-
} = gt(ts), [
|
|
8436
|
+
projects: h,
|
|
8437
|
+
onInsertAllTracks: g,
|
|
8438
|
+
onProjectClick: C,
|
|
8439
|
+
openedItem: m,
|
|
8440
|
+
setOpenedItem: f
|
|
8441
|
+
} = gt(ts), [k, y] = V(!1), w = se(() => k ? i : i.slice(0, 6), [i, k]), I = D(() => {
|
|
8441
8442
|
if (c) return;
|
|
8442
|
-
|
|
8443
|
-
const
|
|
8444
|
-
|
|
8445
|
-
}, [n,
|
|
8446
|
-
|
|
8447
|
-
}, [
|
|
8448
|
-
|
|
8449
|
-
}, [
|
|
8443
|
+
y(!1);
|
|
8444
|
+
const R = h.find((B) => B.id === n);
|
|
8445
|
+
m === n ? (f(null), C == null || C(R, !1)) : (f(n), C == null || C(R, !0));
|
|
8446
|
+
}, [n, m, f, C, h, c]), N = D((R) => {
|
|
8447
|
+
R.preventDefault(), R.stopPropagation(), y(!k);
|
|
8448
|
+
}, [k]), E = D((R) => {
|
|
8449
|
+
R.stopPropagation(), g == null || g(i);
|
|
8450
|
+
}, [g, i]);
|
|
8450
8451
|
return /* @__PURE__ */ v(
|
|
8451
8452
|
S,
|
|
8452
8453
|
{
|
|
8453
8454
|
direction: "column",
|
|
8454
8455
|
gap: "2",
|
|
8455
8456
|
p: "1",
|
|
8456
|
-
className: `${Gt.item} ${
|
|
8457
|
-
onClick:
|
|
8458
|
-
...
|
|
8457
|
+
className: `${Gt.item} ${m === n ? Gt.opened : ""} ${c ? Gt.failed : ""}`,
|
|
8458
|
+
onClick: I,
|
|
8459
|
+
...p,
|
|
8459
8460
|
children: [
|
|
8460
8461
|
/* @__PURE__ */ v(S, { direction: "row", gap: "3", children: [
|
|
8461
8462
|
/* @__PURE__ */ a(S, { className: Gt.projectCover, children: /* @__PURE__ */ a(es, { type: o, cover: s, title: t, size: "48px" }) }),
|
|
@@ -8477,7 +8478,7 @@ const nI = ({
|
|
|
8477
8478
|
}
|
|
8478
8479
|
)
|
|
8479
8480
|
] }),
|
|
8480
|
-
|
|
8481
|
+
m === n && /* @__PURE__ */ v(S, { direction: "column", children: [
|
|
8481
8482
|
i.length === 0 && !l && /* @__PURE__ */ v(S, { direction: "row", gap: "3", p: "5", pt: "2", align: "center", justify: "center", children: [
|
|
8482
8483
|
/* @__PURE__ */ a(Bd, { width: 16, height: 16, style: { color: "var(--neutral-alpha-10)" } }),
|
|
8483
8484
|
/* @__PURE__ */ a(W, { size: "2", style: { color: "var(--neutral-alpha-10)" }, children: "This file has no tracks" })
|
|
@@ -8487,7 +8488,7 @@ const nI = ({
|
|
|
8487
8488
|
/* @__PURE__ */ a(W, { size: "2", style: { color: "var(--neutral-alpha-10)" }, children: "Loading tracks..." })
|
|
8488
8489
|
] }),
|
|
8489
8490
|
i.length > 0 && /* @__PURE__ */ v(S, { direction: "column", gap: "1", children: [
|
|
8490
|
-
typeof d == "function" ? d({ projectId: n, tracks:
|
|
8491
|
+
typeof d == "function" ? d({ projectId: n, tracks: w }) : d,
|
|
8491
8492
|
/* @__PURE__ */ v(S, { direction: "row", gap: "3", p: "2", align: "center", justify: "center", children: [
|
|
8492
8493
|
/* @__PURE__ */ v(
|
|
8493
8494
|
Ir,
|
|
@@ -8495,18 +8496,19 @@ const nI = ({
|
|
|
8495
8496
|
variant: "ghost",
|
|
8496
8497
|
color: "gray",
|
|
8497
8498
|
style: { flex: "1" },
|
|
8498
|
-
onClick:
|
|
8499
|
+
onClick: E,
|
|
8499
8500
|
children: [
|
|
8500
8501
|
/* @__PURE__ */ a(Dr, { width: 16, height: 16 }),
|
|
8501
|
-
"
|
|
8502
|
+
" ",
|
|
8503
|
+
u.insertAll || "Insert all"
|
|
8502
8504
|
]
|
|
8503
8505
|
}
|
|
8504
8506
|
),
|
|
8505
8507
|
i.length > 6 && /* @__PURE__ */ v(be, { children: [
|
|
8506
8508
|
/* @__PURE__ */ a(ot, { orientation: "vertical" }),
|
|
8507
|
-
/* @__PURE__ */ v(Ir, { variant: "ghost", color: "gray", style: { flex: "1" }, onClick:
|
|
8508
|
-
|
|
8509
|
-
|
|
8509
|
+
/* @__PURE__ */ v(Ir, { variant: "ghost", color: "gray", style: { flex: "1" }, onClick: N, children: [
|
|
8510
|
+
k ? u.showLess || "Show less" : u.showMore || "Show more",
|
|
8511
|
+
k ? /* @__PURE__ */ a(xd, { width: 16, height: 16 }) : /* @__PURE__ */ a(Xs, { width: 16, height: 16 })
|
|
8510
8512
|
] })
|
|
8511
8513
|
] })
|
|
8512
8514
|
] })
|
|
@@ -8738,9 +8740,10 @@ const nI = ({
|
|
|
8738
8740
|
projects: t = [],
|
|
8739
8741
|
onClickTrack: r,
|
|
8740
8742
|
onInsertAllTracks: s,
|
|
8741
|
-
onProjectClick: o
|
|
8743
|
+
onProjectClick: o,
|
|
8744
|
+
labels: i = {}
|
|
8742
8745
|
}) => {
|
|
8743
|
-
const [
|
|
8746
|
+
const [l, c] = V(null);
|
|
8744
8747
|
return /* @__PURE__ */ a(
|
|
8745
8748
|
ts.Provider,
|
|
8746
8749
|
{
|
|
@@ -8749,10 +8752,10 @@ const nI = ({
|
|
|
8749
8752
|
onClickTrack: r,
|
|
8750
8753
|
onInsertAllTracks: s,
|
|
8751
8754
|
onProjectClick: o,
|
|
8752
|
-
openedItem:
|
|
8753
|
-
setOpenedItem:
|
|
8755
|
+
openedItem: l,
|
|
8756
|
+
setOpenedItem: c
|
|
8754
8757
|
},
|
|
8755
|
-
children: /* @__PURE__ */ a(S, { direction: "column", width: "100%", children: t.map((
|
|
8758
|
+
children: /* @__PURE__ */ a(S, { direction: "column", width: "100%", children: t.map((d) => /* @__PURE__ */ a(dI, { ...d, labels: i, children: n }, d.id)) })
|
|
8756
8759
|
}
|
|
8757
8760
|
);
|
|
8758
8761
|
};
|
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@ const ProjectItem = ({
|
|
|
15
15
|
loading = false,
|
|
16
16
|
failed = false,
|
|
17
17
|
children,
|
|
18
|
+
labels = {},
|
|
18
19
|
...props
|
|
19
20
|
}) => {
|
|
20
21
|
const {
|
|
@@ -121,7 +122,7 @@ const ProjectItem = ({
|
|
|
121
122
|
<Button variant="ghost" color="gray" style={{ flex: '1' }}
|
|
122
123
|
onClick={handleInsertAllTracks}
|
|
123
124
|
>
|
|
124
|
-
<ArrowLeftIcon width={16} height={16} /> Insert all
|
|
125
|
+
<ArrowLeftIcon width={16} height={16} /> {labels.insertAll || 'Insert all'}
|
|
125
126
|
</Button>
|
|
126
127
|
|
|
127
128
|
{allTracks.length > 6 && (
|
|
@@ -129,7 +130,7 @@ const ProjectItem = ({
|
|
|
129
130
|
<Separator orientation="vertical" />
|
|
130
131
|
|
|
131
132
|
<Button variant="ghost" color="gray" style={{ flex: '1' }} onClick={handleClickShowAllTracks}>
|
|
132
|
-
{showAllTracks ? 'Show less' : 'Show more'}
|
|
133
|
+
{showAllTracks ? labels.showLess || 'Show less' : labels.showMore || 'Show more'}
|
|
133
134
|
{showAllTracks ? <ChevronUpIcon width={16} height={16} /> : <ChevronDownIcon width={16} height={16} />}
|
|
134
135
|
</Button>
|
|
135
136
|
</>
|
|
@@ -10,7 +10,8 @@ export const ProjectsList = ({
|
|
|
10
10
|
projects = [],
|
|
11
11
|
onClickTrack,
|
|
12
12
|
onInsertAllTracks,
|
|
13
|
-
onProjectClick
|
|
13
|
+
onProjectClick,
|
|
14
|
+
labels = {}
|
|
14
15
|
}) => {
|
|
15
16
|
const [openedItem, setOpenedItem] = useState(null)
|
|
16
17
|
|
|
@@ -27,7 +28,7 @@ export const ProjectsList = ({
|
|
|
27
28
|
>
|
|
28
29
|
<Flex direction="column" width="100%">
|
|
29
30
|
{projects.map((project) => (
|
|
30
|
-
<ProjectItem key={project.id} {...project}>
|
|
31
|
+
<ProjectItem key={project.id} {...project} labels={labels}>
|
|
31
32
|
{children}
|
|
32
33
|
</ProjectItem>
|
|
33
34
|
))}
|