@platned/ui 0.9.0 → 0.9.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/dist/index.cjs +43 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -3
- package/dist/index.d.ts +25 -3
- package/dist/index.js +43 -8
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4104,13 +4104,14 @@ function RoleBadge({ role, size: size2 = "sm", tone, color }) {
|
|
|
4104
4104
|
"span",
|
|
4105
4105
|
{
|
|
4106
4106
|
"data-tone": tone,
|
|
4107
|
+
title: role,
|
|
4107
4108
|
className: (0, import_clsx28.default)(
|
|
4108
|
-
"inline-flex items-center rounded-full font-medium whitespace-nowrap",
|
|
4109
|
+
"inline-flex max-w-full items-center rounded-full font-medium whitespace-nowrap align-middle",
|
|
4109
4110
|
size2 === "sm" ? "px-2 py-0.5 text-body-tiny" : "px-3 py-1 text-body-xs",
|
|
4110
4111
|
!rawColor && TONE_STYLES[resolved]
|
|
4111
4112
|
),
|
|
4112
4113
|
style: rawColor ? { backgroundColor: `${rawColor}1F`, color: rawColor } : void 0,
|
|
4113
|
-
children: role
|
|
4114
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "min-w-0 truncate", children: role })
|
|
4114
4115
|
}
|
|
4115
4116
|
);
|
|
4116
4117
|
}
|
|
@@ -8163,12 +8164,33 @@ var SIZE7 = {
|
|
|
8163
8164
|
};
|
|
8164
8165
|
function PageToolbar({
|
|
8165
8166
|
children,
|
|
8167
|
+
actions,
|
|
8166
8168
|
onBack,
|
|
8167
8169
|
backLabel = "Go back",
|
|
8168
8170
|
wrap,
|
|
8169
8171
|
size: size2 = "md",
|
|
8170
8172
|
className
|
|
8171
8173
|
}) {
|
|
8174
|
+
if (actions !== void 0) {
|
|
8175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
8176
|
+
"div",
|
|
8177
|
+
{
|
|
8178
|
+
"data-slot": "page-toolbar",
|
|
8179
|
+
className: (0, import_clsx53.default)(
|
|
8180
|
+
"flex shrink-0 flex-wrap items-center gap-x-4 gap-y-3 border-b border-default bg-default",
|
|
8181
|
+
SIZE7[size2],
|
|
8182
|
+
className
|
|
8183
|
+
),
|
|
8184
|
+
children: [
|
|
8185
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex min-w-[min(100%,12rem)] flex-1 basis-48 items-center gap-4", children: [
|
|
8186
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(IconButton, { variant: "neutral", size: "md", "aria-label": backLabel, onClick: onBack, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react23.ArrowLeftIcon, { "aria-hidden": true }) }),
|
|
8187
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "min-w-0 flex-1", children })
|
|
8188
|
+
] }),
|
|
8189
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { "data-slot": "page-toolbar-actions", className: "ml-auto flex max-w-full flex-wrap items-center justify-end gap-2", children: actions })
|
|
8190
|
+
]
|
|
8191
|
+
}
|
|
8192
|
+
);
|
|
8193
|
+
}
|
|
8172
8194
|
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
8173
8195
|
"div",
|
|
8174
8196
|
{
|
|
@@ -10525,9 +10547,9 @@ function EmailText({ email, className }) {
|
|
|
10525
10547
|
const at = email.lastIndexOf("@");
|
|
10526
10548
|
const local = at > 0 ? email.slice(0, at) : email;
|
|
10527
10549
|
const domain = at > 0 ? email.slice(at) : "";
|
|
10528
|
-
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("span", { title: email, className: (0, import_clsx88.default)("flex min-w-0 max-w-full", className), children: [
|
|
10529
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "min-w-0
|
|
10530
|
-
domain && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "min-w-0
|
|
10550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("span", { title: email, "data-slot": "email-text", className: (0, import_clsx88.default)("flex min-w-0 max-w-full", className), children: [
|
|
10551
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap", children: local }),
|
|
10552
|
+
domain && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap [flex-shrink:0.001]", children: domain })
|
|
10531
10553
|
] });
|
|
10532
10554
|
}
|
|
10533
10555
|
|
|
@@ -11147,17 +11169,30 @@ function TableCellLeadText({ primary, secondary, size: size2 = "md", className }
|
|
|
11147
11169
|
children: primary
|
|
11148
11170
|
}
|
|
11149
11171
|
),
|
|
11150
|
-
secondary && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
11172
|
+
secondary && (typeof secondary === "string" || typeof secondary === "number" ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
11151
11173
|
"span",
|
|
11152
11174
|
{
|
|
11153
|
-
title: secondary,
|
|
11175
|
+
title: String(secondary),
|
|
11154
11176
|
className: (0, import_clsx94.default)(
|
|
11155
11177
|
"block truncate font-normal leading-tight text-default-secondary",
|
|
11156
11178
|
size2 === "sm" ? "text-body-tiny" : "text-body-xs"
|
|
11157
11179
|
),
|
|
11158
11180
|
children: secondary
|
|
11159
11181
|
}
|
|
11160
|
-
)
|
|
11182
|
+
) : (
|
|
11183
|
+
// An element brings its own overflow handling, so it gets no `truncate` here,
|
|
11184
|
+
// which a card layout's touch un-truncation would otherwise turn into wrapping.
|
|
11185
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
11186
|
+
"span",
|
|
11187
|
+
{
|
|
11188
|
+
className: (0, import_clsx94.default)(
|
|
11189
|
+
"block min-w-0 font-normal leading-tight text-default-secondary",
|
|
11190
|
+
size2 === "sm" ? "text-body-tiny" : "text-body-xs"
|
|
11191
|
+
),
|
|
11192
|
+
children: secondary
|
|
11193
|
+
}
|
|
11194
|
+
)
|
|
11195
|
+
))
|
|
11161
11196
|
] });
|
|
11162
11197
|
}
|
|
11163
11198
|
function TableCellText({
|