@houssemdi2000/design-system 1.2.0 → 1.3.1
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/components/Accordion/Accordion.d.ts +16 -0
- package/dist/components/Accordion/Accordion.stories.d.ts +6 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Avatar/Avatar.d.ts +18 -0
- package/dist/components/Avatar/Avatar.stories.d.ts +9 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +6 -0
- package/dist/components/Button/Button.stories.d.ts +1 -0
- package/dist/components/Carousel/SmartCarousel.d.ts +17 -0
- package/dist/components/Carousel/SmartCarousel.stories.d.ts +6 -0
- package/dist/components/Carousel/index.d.ts +1 -0
- package/dist/components/Colors/Colors.d.ts +182 -0
- package/dist/components/Colors/index.d.ts +1 -0
- package/dist/components/DragDrop/DragDrop.d.ts +16 -0
- package/dist/components/DragDrop/DragDrop.stories.d.ts +7 -0
- package/dist/components/DragDrop/index.d.ts +1 -0
- package/dist/components/Footer/Footer.d.ts +21 -0
- package/dist/components/Footer/Footer.stories.d.ts +6 -0
- package/dist/components/Footer/index.d.ts +1 -0
- package/dist/components/Form/Form.d.ts +35 -0
- package/dist/components/Form/Form.stories.d.ts +6 -0
- package/dist/components/Form/index.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +18 -0
- package/dist/components/Input/Input.stories.d.ts +9 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Layout/Layout.d.ts +14 -0
- package/dist/components/Layout/Layout.stories.d.ts +7 -0
- package/dist/components/Layout/index.d.ts +1 -0
- package/dist/components/Loading/Loading.d.ts +14 -0
- package/dist/components/Loading/Loading.stories.d.ts +10 -0
- package/dist/components/Loading/index.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +12 -0
- package/dist/components/Modal/Modal.stories.d.ts +7 -0
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/Navbar/Navbar.d.ts +25 -0
- package/dist/components/Navbar/Navbar.stories.d.ts +6 -0
- package/dist/components/Navbar/index.d.ts +1 -0
- package/dist/components/Pagination/Pagination.d.ts +12 -0
- package/dist/components/Pagination/Pagination.stories.d.ts +8 -0
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/ProfileMenu/ProfileMenu.d.ts +20 -0
- package/dist/components/ProfileMenu/ProfileMenu.stories.d.ts +6 -0
- package/dist/components/ProfileMenu/index.d.ts +1 -0
- package/dist/components/QuicklyLogin/QuicklyLogin.d.ts +17 -0
- package/dist/components/QuicklyLogin/QuicklyLogin.stories.d.ts +6 -0
- package/dist/components/SecureText/SecureText.d.ts +14 -0
- package/dist/components/SecureText/SecureText.stories.d.ts +8 -0
- package/dist/components/SecureText/index.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +2 -0
- package/dist/components/Sidebar/Sidebar.d.ts +22 -0
- package/dist/components/Sidebar/Sidebar.stories.d.ts +6 -0
- package/dist/components/Sidebar/index.d.ts +1 -0
- package/dist/components/Slider/SmartSlider.d.ts +17 -0
- package/dist/components/Slider/SmartSlider.stories.d.ts +7 -0
- package/dist/components/Table/SmartTable.d.ts +23 -0
- package/dist/components/Table/SmartTable.stories.d.ts +10 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/TableFilterBar/TableFilterBar.d.ts +42 -0
- package/dist/components/TableFilterBar/TableFilterBar.stories.d.ts +7 -0
- package/dist/components/TableFilterBar/index.d.ts +1 -0
- package/dist/components/Tag/Tag.d.ts +13 -0
- package/dist/components/Tag/Tag.stories.d.ts +7 -0
- package/dist/components/Tag/index.d.ts +1 -0
- package/dist/components/Text/Text.d.ts +18 -0
- package/dist/components/Text/Text.stories.d.ts +8 -0
- package/dist/components/Text/index.d.ts +1 -0
- package/dist/components/Theme/ThemeContext.d.ts +12 -0
- package/dist/components/Theme/index.d.ts +2 -0
- package/dist/components/Theme/types.d.ts +7 -0
- package/dist/components/TimeLine/SmartTimeLine.d.ts +22 -0
- package/dist/components/TimeLine/SmartTimeLine.stories.d.ts +6 -0
- package/dist/components/TimeLine/index.d.ts +1 -0
- package/dist/components/Toast/ToastContext.d.ts +2 -1
- package/dist/components/index.d.ts +18 -0
- package/dist/index.esm.js +513 -43
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +534 -45
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./SecureText.css";
|
|
3
|
+
export interface SecureTextProps {
|
|
4
|
+
value: string;
|
|
5
|
+
masked?: boolean;
|
|
6
|
+
copyable?: boolean;
|
|
7
|
+
maskChar?: string;
|
|
8
|
+
revealLabel?: string;
|
|
9
|
+
copyLabel?: string;
|
|
10
|
+
onCopy?: () => void;
|
|
11
|
+
isDarkMode?: boolean;
|
|
12
|
+
width?: number | string;
|
|
13
|
+
}
|
|
14
|
+
export declare const SecureText: React.FC<SecureTextProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: import("react").FC<import("./SecureText").SecureTextProps>;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const DarkMode: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const NoMask: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SecureText';
|
|
@@ -8,6 +8,7 @@ export interface SelectOption {
|
|
|
8
8
|
}
|
|
9
9
|
export interface SelectProps {
|
|
10
10
|
label?: string;
|
|
11
|
+
goal?: string;
|
|
11
12
|
value: string | number;
|
|
12
13
|
onChange: (value: string | number) => void;
|
|
13
14
|
options: SelectOption[];
|
|
@@ -18,5 +19,6 @@ export interface SelectProps {
|
|
|
18
19
|
focusShadow?: string;
|
|
19
20
|
errorColor?: string;
|
|
20
21
|
style?: React.CSSProperties;
|
|
22
|
+
isDarkMode?: boolean;
|
|
21
23
|
}
|
|
22
24
|
export declare const Select: React.FC<SelectProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Sidebar.css";
|
|
3
|
+
export interface SidebarItem {
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
href?: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface SidebarProps {
|
|
11
|
+
logo?: React.ReactNode;
|
|
12
|
+
items?: SidebarItem[];
|
|
13
|
+
footer?: React.ReactNode;
|
|
14
|
+
collapsed?: boolean;
|
|
15
|
+
onToggle?: (collapsed: boolean) => void;
|
|
16
|
+
width?: number;
|
|
17
|
+
collapsedWidth?: number;
|
|
18
|
+
isDarkMode?: boolean;
|
|
19
|
+
sticky?: boolean;
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
}
|
|
22
|
+
export declare const Sidebar: React.FC<SidebarProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Sidebar';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./SmartSlider.css";
|
|
3
|
+
export type SliderValue = number | [number, number];
|
|
4
|
+
export interface SmartSliderProps {
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
value?: SliderValue;
|
|
9
|
+
defaultValue?: SliderValue;
|
|
10
|
+
range?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
showTooltip?: boolean;
|
|
13
|
+
showLabels?: boolean;
|
|
14
|
+
isDarkMode?: boolean;
|
|
15
|
+
onChange?: (value: SliderValue) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const SmartSlider: React.FC<SmartSliderProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: import("react").FC<import("./SmartSlider").SmartSliderProps>;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const Range: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./SmartTable.css";
|
|
3
|
+
export interface TableColumn<T> {
|
|
4
|
+
key: keyof T;
|
|
5
|
+
label: string;
|
|
6
|
+
width?: string;
|
|
7
|
+
align?: "left" | "center" | "right";
|
|
8
|
+
render?: (value: T[keyof T], row: T) => React.ReactNode;
|
|
9
|
+
sortable?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface SmartTableProps<T> {
|
|
12
|
+
data: T[];
|
|
13
|
+
columns: TableColumn<T>[];
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
clickable?: boolean;
|
|
16
|
+
onRowClick?: (row: T) => void;
|
|
17
|
+
striped?: boolean;
|
|
18
|
+
bordered?: boolean;
|
|
19
|
+
emptyText?: string;
|
|
20
|
+
isDarkMode?: boolean;
|
|
21
|
+
enableSorting?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function SmartTable<T>({ data, columns, loading, clickable, onRowClick, striped, bordered, emptyText, isDarkMode, enableSorting, }: SmartTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SmartTable } from "./SmartTable";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: typeof SmartTable;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const FullTable: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const WithFilterBar: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const WithPagination: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const WithSorting: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SmartTable';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./TableFilterBar.css";
|
|
3
|
+
export type FilterType = "text" | "select" | "checkbox" | "radio";
|
|
4
|
+
export interface BaseFilter {
|
|
5
|
+
key: string;
|
|
6
|
+
label: string;
|
|
7
|
+
width?: "large" | "medium" | "small";
|
|
8
|
+
}
|
|
9
|
+
export interface TextFilter extends BaseFilter {
|
|
10
|
+
type: "text";
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface SelectFilter extends BaseFilter {
|
|
14
|
+
type: "select";
|
|
15
|
+
options: {
|
|
16
|
+
label: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}[];
|
|
19
|
+
}
|
|
20
|
+
export interface CheckboxFilter extends BaseFilter {
|
|
21
|
+
type: "checkbox";
|
|
22
|
+
}
|
|
23
|
+
export interface RadioFilter extends BaseFilter {
|
|
24
|
+
type: "radio";
|
|
25
|
+
options: {
|
|
26
|
+
label: string;
|
|
27
|
+
value: string;
|
|
28
|
+
}[];
|
|
29
|
+
}
|
|
30
|
+
export type TableFilter = TextFilter | SelectFilter | CheckboxFilter | RadioFilter;
|
|
31
|
+
export interface TableFilterBarProps {
|
|
32
|
+
filters: TableFilter[];
|
|
33
|
+
values: Record<string, any>;
|
|
34
|
+
position?: "left" | "center" | "right";
|
|
35
|
+
onChange: (key: string, value: any) => void;
|
|
36
|
+
onReset?: () => void;
|
|
37
|
+
isDarkMode?: boolean;
|
|
38
|
+
gap?: number;
|
|
39
|
+
collapsible?: boolean;
|
|
40
|
+
resetButton?: React.ReactNode;
|
|
41
|
+
}
|
|
42
|
+
export declare const TableFilterBar: React.FC<TableFilterBarProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableFilterBar';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Tag.css";
|
|
3
|
+
export interface TagProps {
|
|
4
|
+
label: string;
|
|
5
|
+
variant?: "filled" | "outline" | "soft";
|
|
6
|
+
color?: string;
|
|
7
|
+
background?: string;
|
|
8
|
+
borderColor?: string;
|
|
9
|
+
closable?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
export declare const Tag: React.FC<TagProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: import("react").FC<import("./Tag").TagProps>;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Closable: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const Outline: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Tag";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Text.css";
|
|
3
|
+
type TextAs = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "label" | "small" | "div";
|
|
4
|
+
type TextVariant = "title" | "subtitle" | "body" | "caption" | "overline" | "error" | "success" | "muted";
|
|
5
|
+
type TextWeight = "regular" | "medium" | "bold";
|
|
6
|
+
type TextAlign = "left" | "center" | "right";
|
|
7
|
+
export interface TextProps {
|
|
8
|
+
as?: TextAs;
|
|
9
|
+
variant?: TextVariant;
|
|
10
|
+
weight?: TextWeight;
|
|
11
|
+
align?: TextAlign;
|
|
12
|
+
color?: string;
|
|
13
|
+
isDarkMode?: boolean;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const Text: React.FC<TextProps>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: import("react").FC<import("./Text").TextProps>;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Title: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const paragraph: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Bloc: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Text';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Theme } from "./types";
|
|
3
|
+
interface ThemeContextType {
|
|
4
|
+
theme: Theme;
|
|
5
|
+
toggleDarkMode: () => void;
|
|
6
|
+
setCustomTheme: (t: Partial<Theme>) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const useTheme: () => ThemeContextType;
|
|
9
|
+
export declare const ThemeProvider: React.FC<{
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./SmartTimeLine.css";
|
|
3
|
+
export type TimelineOrientation = "vertical" | "horizontal";
|
|
4
|
+
export type TimelineStatus = "default" | "success" | "warning" | "error" | "info";
|
|
5
|
+
export interface TimelineItem {
|
|
6
|
+
id: string | number;
|
|
7
|
+
title: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
date?: string;
|
|
10
|
+
status?: TimelineStatus;
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
content?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export interface SmartTimelineProps {
|
|
15
|
+
items: TimelineItem[];
|
|
16
|
+
orientation?: TimelineOrientation;
|
|
17
|
+
showLine?: boolean;
|
|
18
|
+
clickable?: boolean;
|
|
19
|
+
isDarkMode?: boolean;
|
|
20
|
+
onItemClick?: (item: TimelineItem) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const SmartTimeline: React.FC<SmartTimelineProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SmartTimeLine";
|
|
@@ -6,9 +6,10 @@ export interface Toast {
|
|
|
6
6
|
message: string;
|
|
7
7
|
variant?: ToastVariant;
|
|
8
8
|
duration?: number;
|
|
9
|
+
position?: "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
9
10
|
}
|
|
10
11
|
interface ToastContextType {
|
|
11
|
-
addToast: (msg: string, variant?: ToastVariant, duration?: number) => void;
|
|
12
|
+
addToast: (msg: string, variant?: ToastVariant, duration?: number, position?: "top-right" | "top-left" | "bottom-right" | "bottom-left") => void;
|
|
12
13
|
}
|
|
13
14
|
export declare const useToast: () => ToastContextType;
|
|
14
15
|
export declare const ToastProvider: React.FC<{
|
|
@@ -13,3 +13,21 @@ export * from './TextField';
|
|
|
13
13
|
export * from './Radio';
|
|
14
14
|
export * from './Select';
|
|
15
15
|
export * from './Toast';
|
|
16
|
+
export * from './Modal';
|
|
17
|
+
export * from './Tag';
|
|
18
|
+
export * from './Theme';
|
|
19
|
+
export * from './Table';
|
|
20
|
+
export * from './Pagination';
|
|
21
|
+
export * from './TableFilterBar';
|
|
22
|
+
export * from './Text';
|
|
23
|
+
export * from './TimeLine';
|
|
24
|
+
export * from './Carousel';
|
|
25
|
+
export * from './Navbar';
|
|
26
|
+
export * from './Sidebar';
|
|
27
|
+
export * from './Footer';
|
|
28
|
+
export * from './Layout';
|
|
29
|
+
export * from './DragDrop';
|
|
30
|
+
export * from './SecureText';
|
|
31
|
+
export * from './Loading';
|
|
32
|
+
export * from './Avatar';
|
|
33
|
+
export * from './ProfileMenu';
|