@studiolxd/brand 49.2.0 → 49.3.1
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/CHANGELOG.md +50 -0
- package/dist/_types/molecules/ConversationList/ConversationList.d.ts +8 -0
- package/dist/_types/molecules/EmptyState/EmptyState.d.ts +5 -1
- package/dist/_types/organisms/DataTable/DataTable.d.ts +9 -1
- package/dist/brand.css +13 -1
- package/dist/conversation-list.js +21 -20
- package/dist/data-table.js +151 -150
- package/dist/link.css +1 -1
- package/package.json +1 -1
|
@@ -13,41 +13,42 @@ import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
|
13
13
|
function d(e) {
|
|
14
14
|
return e.scrollWidth > e.clientWidth + 1;
|
|
15
15
|
}
|
|
16
|
-
var f = s(function({ conversations: s, activeId: f, onNew: p, onSelect: m, onDelete: h, newLabel: g, navLabel: _, deleteLabel: v, isLoading: y = !1, loadingCount: b = 4, error: x, emptyMessage: S,
|
|
17
|
-
let [
|
|
16
|
+
var f = s(function({ conversations: s, activeId: f, onNew: p, onSelect: m, onDelete: h, newLabel: g, navLabel: _, deleteLabel: v, isLoading: y = !1, loadingCount: b = 4, error: x, emptyMessage: S, emptyDescription: C, errorTitle: w, className: T, ...E }, D) {
|
|
17
|
+
let [O, k] = c(null), A = e("conversationList"), j = x === void 0 ? y ? "loading" : s.length === 0 ? "empty" : "list" : "error";
|
|
18
18
|
return /* @__PURE__ */ u("div", {
|
|
19
|
-
ref:
|
|
20
|
-
className: `conversation-list${
|
|
21
|
-
...
|
|
19
|
+
ref: D,
|
|
20
|
+
className: `conversation-list${T ? ` ${T}` : ""}`,
|
|
21
|
+
...E,
|
|
22
22
|
children: [/* @__PURE__ */ l("div", {
|
|
23
23
|
className: "conversation-list__header",
|
|
24
24
|
children: /* @__PURE__ */ l(n, {
|
|
25
25
|
variant: "outline",
|
|
26
26
|
block: !0,
|
|
27
27
|
onClick: p,
|
|
28
|
-
children:
|
|
28
|
+
children: A("new", g)
|
|
29
29
|
})
|
|
30
30
|
}), /* @__PURE__ */ u("nav", {
|
|
31
|
-
"aria-label":
|
|
31
|
+
"aria-label": A("nav", _),
|
|
32
32
|
className: "conversation-list__nav",
|
|
33
33
|
"aria-busy": y || void 0,
|
|
34
34
|
children: [
|
|
35
|
-
|
|
35
|
+
j === "error" && /* @__PURE__ */ l(a, {
|
|
36
36
|
variant: "error",
|
|
37
|
-
title:
|
|
37
|
+
title: A("error", w),
|
|
38
38
|
description: x,
|
|
39
39
|
className: "conversation-list__state"
|
|
40
40
|
}),
|
|
41
|
-
|
|
41
|
+
j === "loading" && /* @__PURE__ */ l("div", {
|
|
42
42
|
className: "conversation-list__loading",
|
|
43
43
|
children: Array.from({ length: b }, (e, t) => /* @__PURE__ */ l(r, {}, t))
|
|
44
44
|
}),
|
|
45
|
-
|
|
45
|
+
j === "empty" && /* @__PURE__ */ l(o, {
|
|
46
46
|
size: "sm",
|
|
47
|
-
title:
|
|
47
|
+
title: A("empty", S),
|
|
48
|
+
description: C,
|
|
48
49
|
className: "conversation-list__state"
|
|
49
50
|
}),
|
|
50
|
-
|
|
51
|
+
j === "list" && /* @__PURE__ */ l("ul", {
|
|
51
52
|
className: "conversation-list__items",
|
|
52
53
|
role: "list",
|
|
53
54
|
children: s.map((e) => {
|
|
@@ -57,18 +58,18 @@ var f = s(function({ conversations: s, activeId: f, onNew: p, onSelect: m, onDel
|
|
|
57
58
|
children: [/* @__PURE__ */ l(i, {
|
|
58
59
|
label: e.label,
|
|
59
60
|
describe: !1,
|
|
60
|
-
open:
|
|
61
|
+
open: O === e.id,
|
|
61
62
|
onOpenChange: (e) => {
|
|
62
|
-
e ||
|
|
63
|
+
e || k(null);
|
|
63
64
|
},
|
|
64
65
|
onPointerEnter: (t) => {
|
|
65
|
-
d(t.currentTarget) &&
|
|
66
|
+
d(t.currentTarget) && k(e.id);
|
|
66
67
|
},
|
|
67
|
-
onPointerLeave: () =>
|
|
68
|
+
onPointerLeave: () => k(null),
|
|
68
69
|
onFocus: (t) => {
|
|
69
|
-
d(t.currentTarget) &&
|
|
70
|
+
d(t.currentTarget) && k(e.id);
|
|
70
71
|
},
|
|
71
|
-
onBlur: () =>
|
|
72
|
+
onBlur: () => k(null),
|
|
72
73
|
children: /* @__PURE__ */ l("button", {
|
|
73
74
|
type: "button",
|
|
74
75
|
className: `conversation-list__label${r ? " conversation-list__label--active" : ""}`,
|
|
@@ -80,7 +81,7 @@ var f = s(function({ conversations: s, activeId: f, onNew: p, onSelect: m, onDel
|
|
|
80
81
|
variant: "ghost",
|
|
81
82
|
size: "sm",
|
|
82
83
|
iconOnly: !0,
|
|
83
|
-
"aria-label":
|
|
84
|
+
"aria-label": A("delete", v)(e.label),
|
|
84
85
|
className: "conversation-list__delete",
|
|
85
86
|
onClick: (t) => {
|
|
86
87
|
t.stopPropagation(), h(e.id);
|