@algorithm-shift/design-system 1.2.14 → 1.2.16
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.css +3 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +8 -5
- package/dist/index.d.ts +8 -5
- package/dist/index.js +27 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/public/logo_placeholder.png +0 -0
package/dist/index.js
CHANGED
|
@@ -1764,11 +1764,11 @@ function DataTable({
|
|
|
1764
1764
|
|
|
1765
1765
|
// src/components/DataDisplay/Table/Table.tsx
|
|
1766
1766
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1767
|
-
var Table2 = ({ columns, data, rowActions }) => {
|
|
1767
|
+
var Table2 = ({ columns, data, rowActions, className, style }) => {
|
|
1768
1768
|
const rawColumns = Array.isArray(columns) ? columns : [];
|
|
1769
1769
|
const rawData = Array.isArray(data) ? data : [];
|
|
1770
1770
|
const rawRowActions = Array.isArray(rowActions) ? rowActions : [];
|
|
1771
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DataTable, { columns: rawColumns, data: rawData, rowActions: rawRowActions });
|
|
1771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DataTable, { columns: rawColumns, data: rawData, rowActions: rawRowActions }) });
|
|
1772
1772
|
};
|
|
1773
1773
|
var Table_default = Table2;
|
|
1774
1774
|
|
|
@@ -1832,15 +1832,19 @@ function DropdownMenuItem({
|
|
|
1832
1832
|
|
|
1833
1833
|
// src/components/Navigation/Tabs/Tabs.tsx
|
|
1834
1834
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1835
|
-
var Tabs = ({ tabs, className, style }) => {
|
|
1835
|
+
var Tabs = ({ tabs, className, style, pathname, LinkComponent }) => {
|
|
1836
1836
|
const rawTabs = Array.isArray(tabs) ? tabs : [];
|
|
1837
1837
|
const baseClasses = "text-[12px] text-[#E9E9E9] p-2 text-center rounded-md transition-colors border-none outline-none focus:outline-none focus:ring-0 focus:ring-offset-0 cursor-pointer select-none ";
|
|
1838
1838
|
const activeClasses = "bg-white/10 text-white";
|
|
1839
1839
|
const hoverClasses = "hover:bg-white/5";
|
|
1840
|
+
const isActive = (path) => {
|
|
1841
|
+
if (!path) return false;
|
|
1842
|
+
return pathname === path || path !== "/" && pathname.startsWith(path);
|
|
1843
|
+
};
|
|
1840
1844
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className, style, children: rawTabs.map((tab, index) => {
|
|
1841
1845
|
const finalClasses = [
|
|
1842
1846
|
baseClasses,
|
|
1843
|
-
tab.
|
|
1847
|
+
isActive(tab.href) ? activeClasses : hoverClasses,
|
|
1844
1848
|
tab.className || ""
|
|
1845
1849
|
].join(" ");
|
|
1846
1850
|
const hasDropdown = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
|
|
@@ -1867,7 +1871,7 @@ var Tabs = ({ tabs, className, style }) => {
|
|
|
1867
1871
|
{
|
|
1868
1872
|
asChild: true,
|
|
1869
1873
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
|
|
1870
|
-
children: item.header
|
|
1874
|
+
children: LinkComponent ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LinkComponent, { href: item.href || "#", children: item.header }) : item.header
|
|
1871
1875
|
},
|
|
1872
1876
|
item.id
|
|
1873
1877
|
))
|
|
@@ -1875,7 +1879,7 @@ var Tabs = ({ tabs, className, style }) => {
|
|
|
1875
1879
|
)
|
|
1876
1880
|
] }, index);
|
|
1877
1881
|
}
|
|
1878
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1882
|
+
return tab.url && LinkComponent ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LinkComponent, { href: tab.url, className: finalClasses, style, children: tab.header }, index) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: finalClasses, style, role: "button", tabIndex: 0, children: tab.header }, index);
|
|
1879
1883
|
}) });
|
|
1880
1884
|
};
|
|
1881
1885
|
var Tabs_default = Tabs;
|
|
@@ -1947,29 +1951,28 @@ var Notification_default = Notification;
|
|
|
1947
1951
|
|
|
1948
1952
|
// src/components/Navigation/Logo/Logo.tsx
|
|
1949
1953
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1950
|
-
var
|
|
1954
|
+
var Logo = ({
|
|
1951
1955
|
className,
|
|
1952
1956
|
style,
|
|
1953
|
-
imageUrl
|
|
1957
|
+
imageUrl,
|
|
1958
|
+
altText = "Preview"
|
|
1954
1959
|
}) => {
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
className: "opacity-50"
|
|
1968
|
-
};
|
|
1960
|
+
if (!imageUrl) {
|
|
1961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1962
|
+
"div",
|
|
1963
|
+
{
|
|
1964
|
+
className: cn(
|
|
1965
|
+
className,
|
|
1966
|
+
"p-0"
|
|
1967
|
+
),
|
|
1968
|
+
style,
|
|
1969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("img", { src: "/logo_placeholder.png", alt: altText, className: "opacity-50", width: 150, height: 80 })
|
|
1970
|
+
}
|
|
1971
|
+
);
|
|
1969
1972
|
}
|
|
1970
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("
|
|
1973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("img", { src: imageUrl, alt: altText, className, style });
|
|
1971
1974
|
};
|
|
1972
|
-
var Logo_default =
|
|
1975
|
+
var Logo_default = Logo;
|
|
1973
1976
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1974
1977
|
0 && (module.exports = {
|
|
1975
1978
|
Button,
|