@hyddenlabs/hydn-ui 0.3.0-alpha.185 → 0.3.0-alpha.187
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 +15 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -2
- package/dist/index.d.ts +37 -2
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2838,15 +2838,21 @@ var PageTransition = ({
|
|
|
2838
2838
|
};
|
|
2839
2839
|
PageTransition.displayName = "PageTransition";
|
|
2840
2840
|
var page_transition_default = PageTransition;
|
|
2841
|
-
function Breadcrumbs({ items, separator = "/", className = "" }) {
|
|
2841
|
+
function Breadcrumbs({ items, separator = "/", className = "", linkComponent }) {
|
|
2842
|
+
const LinkComponent = linkComponent || "a";
|
|
2842
2843
|
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Breadcrumb", className, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex items-center space-x-2 text-sm", children: items.map((item, index) => {
|
|
2843
2844
|
const isLast = index === items.length - 1;
|
|
2844
2845
|
const key = item.href || item.label;
|
|
2846
|
+
const { label: _label, onClick, href, ...linkProps } = item;
|
|
2847
|
+
const hasLinkProps = href || onClick || Object.keys(linkProps).length > 0;
|
|
2848
|
+
const shouldRenderLink = hasLinkProps && !isLast;
|
|
2845
2849
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center", children: [
|
|
2846
|
-
|
|
2847
|
-
|
|
2850
|
+
shouldRenderLink ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2851
|
+
LinkComponent,
|
|
2848
2852
|
{
|
|
2849
|
-
href:
|
|
2853
|
+
...href ? { href } : {},
|
|
2854
|
+
...linkProps,
|
|
2855
|
+
onClick,
|
|
2850
2856
|
className: "text-primary hover:text-primary/80 hover:underline cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-ring rounded px-1 -mx-1",
|
|
2851
2857
|
children: item.label
|
|
2852
2858
|
}
|
|
@@ -4206,6 +4212,10 @@ function DataTable({
|
|
|
4206
4212
|
}
|
|
4207
4213
|
};
|
|
4208
4214
|
const renderCellContent = (value, column, row, rowIndex) => {
|
|
4215
|
+
const isEmpty = value == null || value === "";
|
|
4216
|
+
if (isEmpty && column.fallback !== void 0) {
|
|
4217
|
+
return column.fallback;
|
|
4218
|
+
}
|
|
4209
4219
|
if (column.render) {
|
|
4210
4220
|
return column.render(value, row, rowIndex);
|
|
4211
4221
|
}
|
|
@@ -5425,7 +5435,7 @@ function EditableText({
|
|
|
5425
5435
|
disabled,
|
|
5426
5436
|
className: `group ${sizeConfig} ${className} relative inline-flex items-center gap-2 cursor-text border-b border-transparent py-1 text-left transition-all hover:border-b-foreground/30 focus:outline-none focus:ring-2 focus:ring-ring/20 focus:rounded disabled:cursor-not-allowed disabled:opacity-50 ${isPlaceholder ? "text-muted-foreground" : "text-foreground"} w-fit max-w-full`,
|
|
5427
5437
|
children: [
|
|
5428
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1
|
|
5438
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1", children: displayText }),
|
|
5429
5439
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5430
5440
|
Icon,
|
|
5431
5441
|
{
|