@algorithm-shift/design-system 1.2.15 → 1.2.17
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 +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1701,11 +1701,11 @@ function DataTable({
|
|
|
1701
1701
|
|
|
1702
1702
|
// src/components/DataDisplay/Table/Table.tsx
|
|
1703
1703
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1704
|
-
var Table2 = ({ columns, data, rowActions }) => {
|
|
1704
|
+
var Table2 = ({ columns, data, rowActions, className, style }) => {
|
|
1705
1705
|
const rawColumns = Array.isArray(columns) ? columns : [];
|
|
1706
1706
|
const rawData = Array.isArray(data) ? data : [];
|
|
1707
1707
|
const rawRowActions = Array.isArray(rowActions) ? rowActions : [];
|
|
1708
|
-
return /* @__PURE__ */ jsx36(DataTable, { columns: rawColumns, data: rawData, rowActions: rawRowActions });
|
|
1708
|
+
return /* @__PURE__ */ jsx36("div", { className, style, children: /* @__PURE__ */ jsx36(DataTable, { columns: rawColumns, data: rawData, rowActions: rawRowActions }) });
|
|
1709
1709
|
};
|
|
1710
1710
|
var Table_default = Table2;
|
|
1711
1711
|
|
|
@@ -1769,15 +1769,19 @@ function DropdownMenuItem({
|
|
|
1769
1769
|
|
|
1770
1770
|
// src/components/Navigation/Tabs/Tabs.tsx
|
|
1771
1771
|
import { jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1772
|
-
var Tabs = ({ tabs, className, style }) => {
|
|
1772
|
+
var Tabs = ({ tabs, className, style, pathname, LinkComponent }) => {
|
|
1773
1773
|
const rawTabs = Array.isArray(tabs) ? tabs : [];
|
|
1774
1774
|
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 ";
|
|
1775
1775
|
const activeClasses = "bg-white/10 text-white";
|
|
1776
1776
|
const hoverClasses = "hover:bg-white/5";
|
|
1777
|
+
const isActive = (path) => {
|
|
1778
|
+
if (!path) return false;
|
|
1779
|
+
return pathname === path || path !== "/" && pathname.startsWith(path);
|
|
1780
|
+
};
|
|
1777
1781
|
return /* @__PURE__ */ jsx38("div", { className, style, children: rawTabs.map((tab, index) => {
|
|
1778
1782
|
const finalClasses = [
|
|
1779
1783
|
baseClasses,
|
|
1780
|
-
tab.
|
|
1784
|
+
isActive(tab.href) ? activeClasses : hoverClasses,
|
|
1781
1785
|
tab.className || ""
|
|
1782
1786
|
].join(" ");
|
|
1783
1787
|
const hasDropdown = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
|
|
@@ -1804,7 +1808,7 @@ var Tabs = ({ tabs, className, style }) => {
|
|
|
1804
1808
|
{
|
|
1805
1809
|
asChild: true,
|
|
1806
1810
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
|
|
1807
|
-
children: item.header
|
|
1811
|
+
children: LinkComponent ? /* @__PURE__ */ jsx38(LinkComponent, { href: item.href || "#", children: item.header }) : item.header
|
|
1808
1812
|
},
|
|
1809
1813
|
item.id
|
|
1810
1814
|
))
|
|
@@ -1812,7 +1816,7 @@ var Tabs = ({ tabs, className, style }) => {
|
|
|
1812
1816
|
)
|
|
1813
1817
|
] }, index);
|
|
1814
1818
|
}
|
|
1815
|
-
return /* @__PURE__ */ jsx38(
|
|
1819
|
+
return tab.url && LinkComponent ? /* @__PURE__ */ jsx38(LinkComponent, { href: tab.url, className: finalClasses, style, children: tab.header }, index) : /* @__PURE__ */ jsx38("div", { className: finalClasses, style, role: "button", tabIndex: 0, children: tab.header }, index);
|
|
1816
1820
|
}) });
|
|
1817
1821
|
};
|
|
1818
1822
|
var Tabs_default = Tabs;
|
|
@@ -1899,7 +1903,7 @@ var Logo = ({
|
|
|
1899
1903
|
"p-0"
|
|
1900
1904
|
),
|
|
1901
1905
|
style,
|
|
1902
|
-
children: /* @__PURE__ */ jsx43("img", { src: "
|
|
1906
|
+
children: /* @__PURE__ */ jsx43("img", { src: "./logo_placeholder.png", alt: altText, className: "opacity-50", width: 150, height: 80 })
|
|
1903
1907
|
}
|
|
1904
1908
|
);
|
|
1905
1909
|
}
|