@algorithm-shift/design-system 1.2.53 → 1.2.55
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 +25 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +5 -10
- package/dist/index.d.ts +5 -10
- package/dist/index.js +20 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -1
package/dist/index.d.mts
CHANGED
|
@@ -21,7 +21,7 @@ interface ImageProps extends ElementProps {
|
|
|
21
21
|
|
|
22
22
|
type InputProperties = {
|
|
23
23
|
name?: string;
|
|
24
|
-
value?: string | undefined;
|
|
24
|
+
value?: string | undefined | any;
|
|
25
25
|
placeholder?: string | undefined;
|
|
26
26
|
errorMessage?: string | undefined;
|
|
27
27
|
isEditable?: boolean | undefined;
|
|
@@ -107,7 +107,6 @@ interface TableProps extends ElementProps {
|
|
|
107
107
|
interface TabsProps extends ElementProps {
|
|
108
108
|
tabs?: Record<string, any>;
|
|
109
109
|
pathname?: string;
|
|
110
|
-
LinkComponent?: React.ComponentType<any>;
|
|
111
110
|
verticalMenu?: boolean;
|
|
112
111
|
canvasMode?: 'desktop' | 'tablet' | 'mobile';
|
|
113
112
|
}
|
|
@@ -170,21 +169,17 @@ interface NavbarProps extends ElementProps {
|
|
|
170
169
|
imageUrl?: string;
|
|
171
170
|
altText?: string;
|
|
172
171
|
canvasMode?: 'desktop' | 'tablet' | 'mobile';
|
|
173
|
-
LinkComponent?: React.ComponentType<any>;
|
|
174
|
-
ImageComponent?: React.ComponentType<any>;
|
|
175
172
|
list?: Record<string, any>;
|
|
176
173
|
userName?: string;
|
|
177
174
|
}
|
|
178
175
|
|
|
179
176
|
interface BreadcrumbProps extends ElementProps {
|
|
180
177
|
list?: Record<string, any>;
|
|
181
|
-
LinkComponent?: React.ComponentType<any>;
|
|
182
178
|
}
|
|
183
179
|
|
|
184
180
|
interface ButtonGroupProps extends ElementProps {
|
|
185
181
|
textContent?: string;
|
|
186
182
|
list?: Record<string, any>;
|
|
187
|
-
LinkComponent?: React.ComponentType<any>;
|
|
188
183
|
}
|
|
189
184
|
|
|
190
185
|
interface IconProps extends ElementProps {
|
|
@@ -217,9 +212,9 @@ declare const Typography: ({ className, style, tagName, textContent, }: Typograp
|
|
|
217
212
|
className: string;
|
|
218
213
|
}, HTMLElement>;
|
|
219
214
|
|
|
220
|
-
declare const Breadcrumb: ({ list, className, style
|
|
215
|
+
declare const Breadcrumb: ({ list, className, style }: BreadcrumbProps) => react_jsx_runtime.JSX.Element;
|
|
221
216
|
|
|
222
|
-
declare function SplitButton({ style, textContent, className, list
|
|
217
|
+
declare function SplitButton({ style, textContent, className, list }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
|
|
223
218
|
|
|
224
219
|
declare const Icon: ({ iconType, name, className, fontSize, style }: IconProps) => react_jsx_runtime.JSX.Element | null;
|
|
225
220
|
|
|
@@ -285,13 +280,13 @@ declare const Table: ({ columns, data, rowActions, className, style, pagination,
|
|
|
285
280
|
|
|
286
281
|
declare const CustomPagination: ({ totalPages, currentPage, onPageChange, maxVisiblePages, perPage, }: CustomPaginationProps) => react_jsx_runtime.JSX.Element;
|
|
287
282
|
|
|
288
|
-
declare const Tabs: ({ className, style, tabs, verticalMenu,
|
|
283
|
+
declare const Tabs: ({ className, style, tabs, verticalMenu, pathname, canvasMode }: TabsProps) => react_jsx_runtime.JSX.Element;
|
|
289
284
|
|
|
290
285
|
declare const StagesComponent: ({ stages, isShowBtn, buttonText, className, style }: StagesProps) => react_jsx_runtime.JSX.Element;
|
|
291
286
|
|
|
292
287
|
declare const Spacer: ({ className, style }: ElementProps) => react_jsx_runtime.JSX.Element;
|
|
293
288
|
|
|
294
|
-
declare function Navbar({ style, badgeType, badgeCount, hideBadgeWhenZero, profileType, showName, imageUrl, altText, canvasMode,
|
|
289
|
+
declare function Navbar({ style, badgeType, badgeCount, hideBadgeWhenZero, profileType, showName, imageUrl, altText, canvasMode, list, userName }: NavbarProps): react_jsx_runtime.JSX.Element;
|
|
295
290
|
|
|
296
291
|
declare const ChartComponent: ({ className, style, ...props }: BarChartProps) => react_jsx_runtime.JSX.Element;
|
|
297
292
|
|
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ interface ImageProps extends ElementProps {
|
|
|
21
21
|
|
|
22
22
|
type InputProperties = {
|
|
23
23
|
name?: string;
|
|
24
|
-
value?: string | undefined;
|
|
24
|
+
value?: string | undefined | any;
|
|
25
25
|
placeholder?: string | undefined;
|
|
26
26
|
errorMessage?: string | undefined;
|
|
27
27
|
isEditable?: boolean | undefined;
|
|
@@ -107,7 +107,6 @@ interface TableProps extends ElementProps {
|
|
|
107
107
|
interface TabsProps extends ElementProps {
|
|
108
108
|
tabs?: Record<string, any>;
|
|
109
109
|
pathname?: string;
|
|
110
|
-
LinkComponent?: React.ComponentType<any>;
|
|
111
110
|
verticalMenu?: boolean;
|
|
112
111
|
canvasMode?: 'desktop' | 'tablet' | 'mobile';
|
|
113
112
|
}
|
|
@@ -170,21 +169,17 @@ interface NavbarProps extends ElementProps {
|
|
|
170
169
|
imageUrl?: string;
|
|
171
170
|
altText?: string;
|
|
172
171
|
canvasMode?: 'desktop' | 'tablet' | 'mobile';
|
|
173
|
-
LinkComponent?: React.ComponentType<any>;
|
|
174
|
-
ImageComponent?: React.ComponentType<any>;
|
|
175
172
|
list?: Record<string, any>;
|
|
176
173
|
userName?: string;
|
|
177
174
|
}
|
|
178
175
|
|
|
179
176
|
interface BreadcrumbProps extends ElementProps {
|
|
180
177
|
list?: Record<string, any>;
|
|
181
|
-
LinkComponent?: React.ComponentType<any>;
|
|
182
178
|
}
|
|
183
179
|
|
|
184
180
|
interface ButtonGroupProps extends ElementProps {
|
|
185
181
|
textContent?: string;
|
|
186
182
|
list?: Record<string, any>;
|
|
187
|
-
LinkComponent?: React.ComponentType<any>;
|
|
188
183
|
}
|
|
189
184
|
|
|
190
185
|
interface IconProps extends ElementProps {
|
|
@@ -217,9 +212,9 @@ declare const Typography: ({ className, style, tagName, textContent, }: Typograp
|
|
|
217
212
|
className: string;
|
|
218
213
|
}, HTMLElement>;
|
|
219
214
|
|
|
220
|
-
declare const Breadcrumb: ({ list, className, style
|
|
215
|
+
declare const Breadcrumb: ({ list, className, style }: BreadcrumbProps) => react_jsx_runtime.JSX.Element;
|
|
221
216
|
|
|
222
|
-
declare function SplitButton({ style, textContent, className, list
|
|
217
|
+
declare function SplitButton({ style, textContent, className, list }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
|
|
223
218
|
|
|
224
219
|
declare const Icon: ({ iconType, name, className, fontSize, style }: IconProps) => react_jsx_runtime.JSX.Element | null;
|
|
225
220
|
|
|
@@ -285,13 +280,13 @@ declare const Table: ({ columns, data, rowActions, className, style, pagination,
|
|
|
285
280
|
|
|
286
281
|
declare const CustomPagination: ({ totalPages, currentPage, onPageChange, maxVisiblePages, perPage, }: CustomPaginationProps) => react_jsx_runtime.JSX.Element;
|
|
287
282
|
|
|
288
|
-
declare const Tabs: ({ className, style, tabs, verticalMenu,
|
|
283
|
+
declare const Tabs: ({ className, style, tabs, verticalMenu, pathname, canvasMode }: TabsProps) => react_jsx_runtime.JSX.Element;
|
|
289
284
|
|
|
290
285
|
declare const StagesComponent: ({ stages, isShowBtn, buttonText, className, style }: StagesProps) => react_jsx_runtime.JSX.Element;
|
|
291
286
|
|
|
292
287
|
declare const Spacer: ({ className, style }: ElementProps) => react_jsx_runtime.JSX.Element;
|
|
293
288
|
|
|
294
|
-
declare function Navbar({ style, badgeType, badgeCount, hideBadgeWhenZero, profileType, showName, imageUrl, altText, canvasMode,
|
|
289
|
+
declare function Navbar({ style, badgeType, badgeCount, hideBadgeWhenZero, profileType, showName, imageUrl, altText, canvasMode, list, userName }: NavbarProps): react_jsx_runtime.JSX.Element;
|
|
295
290
|
|
|
296
291
|
declare const ChartComponent: ({ className, style, ...props }: BarChartProps) => react_jsx_runtime.JSX.Element;
|
|
297
292
|
|
package/dist/index.js
CHANGED
|
@@ -26635,8 +26635,9 @@ var __iconNode1634 = [
|
|
|
26635
26635
|
var ZoomOut = createLucideIcon("zoom-out", __iconNode1634);
|
|
26636
26636
|
|
|
26637
26637
|
// src/components/Basic/Breadcrumb/Breadcrumb.tsx
|
|
26638
|
+
var import_link3 = __toESM(require("next/link"));
|
|
26638
26639
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
26639
|
-
var Breadcrumb = ({ list = [], className, style
|
|
26640
|
+
var Breadcrumb = ({ list = [], className, style }) => {
|
|
26640
26641
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
26641
26642
|
"nav",
|
|
26642
26643
|
{
|
|
@@ -26646,8 +26647,8 @@ var Breadcrumb = ({ list = [], className, style, LinkComponent }) => {
|
|
|
26646
26647
|
children: list.map((item, index) => {
|
|
26647
26648
|
const isLast = index === list.length - 1;
|
|
26648
26649
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center", children: [
|
|
26649
|
-
item.url && !isLast
|
|
26650
|
-
|
|
26650
|
+
item.url && !isLast ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
26651
|
+
import_link3.default,
|
|
26651
26652
|
{
|
|
26652
26653
|
href: item.url,
|
|
26653
26654
|
className: "hover:text-foreground transition-colors",
|
|
@@ -26765,8 +26766,9 @@ function DropdownMenuSubContent({
|
|
|
26765
26766
|
}
|
|
26766
26767
|
|
|
26767
26768
|
// src/components/Basic/ButtonGroup/ButtonGroup.tsx
|
|
26769
|
+
var import_link4 = __toESM(require("next/link"));
|
|
26768
26770
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
26769
|
-
function SplitButton({ style, textContent, className, list = []
|
|
26771
|
+
function SplitButton({ style, textContent, className, list = [] }) {
|
|
26770
26772
|
const bgColor = style?.backgroundColor || "";
|
|
26771
26773
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "inline-flex rounded-md overflow-hidden border border-teal-200 bg-teal-700 items-center focus:ring-0", style: { backgroundColor: bgColor }, children: [
|
|
26772
26774
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
@@ -26787,7 +26789,7 @@ function SplitButton({ style, textContent, className, list = [], LinkComponent }
|
|
|
26787
26789
|
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ChevronDown, { className: "w-4 h-4" })
|
|
26788
26790
|
}
|
|
26789
26791
|
) }),
|
|
26790
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownMenuContent, { align: "end", className: "bg-white min-w-[120px]", children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownMenuItem, { className: "text-black", children:
|
|
26792
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownMenuContent, { align: "end", className: "bg-white min-w-[120px]", children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownMenuItem, { className: "text-black", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link4.default, { href: item.url || "#", children: item.header }) }, item.id)) })
|
|
26791
26793
|
] })
|
|
26792
26794
|
] });
|
|
26793
26795
|
}
|
|
@@ -28013,7 +28015,7 @@ var DateRange = ({ className, style, ...props }) => {
|
|
|
28013
28015
|
id: "date",
|
|
28014
28016
|
variant: "outline",
|
|
28015
28017
|
className: cn(
|
|
28016
|
-
"w-
|
|
28018
|
+
"w-full justify-start text-left font-normal text-[11px] border-[#BDBDBD]",
|
|
28017
28019
|
!date && "text-muted-foreground"
|
|
28018
28020
|
),
|
|
28019
28021
|
children: date?.from ? date.to ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
@@ -28530,8 +28532,9 @@ var Table4 = ({
|
|
|
28530
28532
|
var Table_default = Table4;
|
|
28531
28533
|
|
|
28532
28534
|
// src/components/Navigation/Tabs/Tabs.tsx
|
|
28535
|
+
var import_link5 = __toESM(require("next/link"));
|
|
28533
28536
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
28534
|
-
var Tabs = ({ className, style, tabs, verticalMenu,
|
|
28537
|
+
var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
|
|
28535
28538
|
const rawTabs = Array.isArray(tabs) ? tabs : [];
|
|
28536
28539
|
const baseClasses = "text-[12px] text-foreground p-2 text-center rounded-md transition-colors";
|
|
28537
28540
|
const activeClasses = "bg-white/10 text-white";
|
|
@@ -28559,7 +28562,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, LinkComponent, pathname, can
|
|
|
28559
28562
|
{
|
|
28560
28563
|
asChild: true,
|
|
28561
28564
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
|
|
28562
|
-
children:
|
|
28565
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_link5.default, { href: item.url || "#", children: item.header })
|
|
28563
28566
|
},
|
|
28564
28567
|
item.id
|
|
28565
28568
|
))
|
|
@@ -28567,7 +28570,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, LinkComponent, pathname, can
|
|
|
28567
28570
|
)
|
|
28568
28571
|
] }, index);
|
|
28569
28572
|
}
|
|
28570
|
-
return tab.url
|
|
28573
|
+
return tab.url ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_link5.default, { href: tab.url, className: finalClasses, style: tab.style, children: tab.header }, index) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
|
|
28571
28574
|
};
|
|
28572
28575
|
const renderMobileMenu = () => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(DropdownMenu, { children: [
|
|
28573
28576
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
|
|
@@ -28590,7 +28593,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, LinkComponent, pathname, can
|
|
|
28590
28593
|
{
|
|
28591
28594
|
asChild: true,
|
|
28592
28595
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100",
|
|
28593
|
-
children:
|
|
28596
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_link5.default, { href: item.url || "#", children: item.header })
|
|
28594
28597
|
},
|
|
28595
28598
|
item.id
|
|
28596
28599
|
)) })
|
|
@@ -28601,7 +28604,7 @@ var Tabs = ({ className, style, tabs, verticalMenu, LinkComponent, pathname, can
|
|
|
28601
28604
|
{
|
|
28602
28605
|
asChild: true,
|
|
28603
28606
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[13px] text-gray-800 hover:bg-gray-100",
|
|
28604
|
-
children:
|
|
28607
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_link5.default, { href: tab.url || "#", children: tab.header })
|
|
28605
28608
|
},
|
|
28606
28609
|
i
|
|
28607
28610
|
);
|
|
@@ -28696,6 +28699,8 @@ var AvatarFallback = React6.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
28696
28699
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
28697
28700
|
|
|
28698
28701
|
// src/components/Navigation/Navbar/Navbar.tsx
|
|
28702
|
+
var import_link6 = __toESM(require("next/link"));
|
|
28703
|
+
var import_image3 = __toESM(require("next/image"));
|
|
28699
28704
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
28700
28705
|
function Navbar({
|
|
28701
28706
|
style,
|
|
@@ -28707,16 +28712,14 @@ function Navbar({
|
|
|
28707
28712
|
imageUrl,
|
|
28708
28713
|
altText = "Logo",
|
|
28709
28714
|
canvasMode = "desktop",
|
|
28710
|
-
LinkComponent,
|
|
28711
|
-
ImageComponent,
|
|
28712
28715
|
list = [],
|
|
28713
28716
|
userName = "Guest User"
|
|
28714
28717
|
}) {
|
|
28715
28718
|
const isMobileView = canvasMode === "mobile" || canvasMode === "tablet";
|
|
28716
28719
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("nav", { className: "w-full border-b bg-white shadow-sm", style, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "mx-auto flex max-w-7xl items-center justify-between px-4 py-2", children: [
|
|
28717
|
-
|
|
28718
|
-
!isMobileView &&
|
|
28719
|
-
|
|
28720
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_link6.default, { href: "/", className: "flex items-center space-x-2", children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_image3.default, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "font-semibold text-blue-700", children: "Logo" }) }),
|
|
28721
|
+
!isMobileView && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
28722
|
+
import_link6.default,
|
|
28720
28723
|
{
|
|
28721
28724
|
href: item.url || "#",
|
|
28722
28725
|
className: "text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors",
|
|
@@ -28771,7 +28774,7 @@ function Navbar({
|
|
|
28771
28774
|
}
|
|
28772
28775
|
)
|
|
28773
28776
|
] }) }),
|
|
28774
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DropdownMenuContent, { align: "end", className: "bg-white", children:
|
|
28777
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DropdownMenuContent, { align: "end", className: "bg-white", children: list && list.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, { children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DropdownMenuItem, { className: "text-black", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_link6.default, { href: item.url || "#", children: item.header }) }, item.id)) }) })
|
|
28775
28778
|
] })
|
|
28776
28779
|
] })
|
|
28777
28780
|
] }) });
|