@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.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;
|
|
@@ -1884,29 +1888,28 @@ var Notification_default = Notification;
|
|
|
1884
1888
|
|
|
1885
1889
|
// src/components/Navigation/Logo/Logo.tsx
|
|
1886
1890
|
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1887
|
-
var
|
|
1891
|
+
var Logo = ({
|
|
1888
1892
|
className,
|
|
1889
1893
|
style,
|
|
1890
|
-
imageUrl
|
|
1894
|
+
imageUrl,
|
|
1895
|
+
altText = "Preview"
|
|
1891
1896
|
}) => {
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
className: "opacity-50"
|
|
1905
|
-
};
|
|
1897
|
+
if (!imageUrl) {
|
|
1898
|
+
return /* @__PURE__ */ jsx43(
|
|
1899
|
+
"div",
|
|
1900
|
+
{
|
|
1901
|
+
className: cn(
|
|
1902
|
+
className,
|
|
1903
|
+
"p-0"
|
|
1904
|
+
),
|
|
1905
|
+
style,
|
|
1906
|
+
children: /* @__PURE__ */ jsx43("img", { src: "/logo_placeholder.png", alt: altText, className: "opacity-50", width: 150, height: 80 })
|
|
1907
|
+
}
|
|
1908
|
+
);
|
|
1906
1909
|
}
|
|
1907
|
-
return /* @__PURE__ */ jsx43("
|
|
1910
|
+
return /* @__PURE__ */ jsx43("img", { src: imageUrl, alt: altText, className, style });
|
|
1908
1911
|
};
|
|
1909
|
-
var Logo_default =
|
|
1912
|
+
var Logo_default = Logo;
|
|
1910
1913
|
export {
|
|
1911
1914
|
Button,
|
|
1912
1915
|
CheckboxInput,
|