stp-ui-kit 0.0.8 → 0.0.9
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/Message/Message.d.ts +19 -0
- package/dist/components/Message/Message.stories.d.ts +5 -0
- package/dist/components/Modal/ModalApi.d.ts +18 -0
- package/dist/components/Table/Table.d.ts +17 -0
- package/dist/components/index.d.ts +4 -1
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/stp-ui-kit.cjs.js +262 -13
- package/dist/stp-ui-kit.es.js +26209 -958
- package/dist/style.css +1 -1
- package/package.json +5 -1
- package/src/styles/_variables.scss +11 -9
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type MessageType = "default" | "warning" | "error";
|
|
2
|
+
interface MessageItem {
|
|
3
|
+
id: number;
|
|
4
|
+
type: MessageType;
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Message: ({ id, type, text, onClose, }: MessageItem & {
|
|
8
|
+
onClose: (id: number) => void;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const MessageContainer: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const message: {
|
|
12
|
+
_id: number;
|
|
13
|
+
show(text: string, type?: MessageType): number | undefined;
|
|
14
|
+
default(text: string): number | undefined;
|
|
15
|
+
warning(text: string): number | undefined;
|
|
16
|
+
error(text: string): number | undefined;
|
|
17
|
+
close(id: number): void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ModalShowOptions {
|
|
3
|
+
title: string;
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
onOk?: () => void;
|
|
6
|
+
onCancel?: () => void;
|
|
7
|
+
okText?: string;
|
|
8
|
+
cancelText?: string;
|
|
9
|
+
tone?: "default" | "critical" | "warning";
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
centered?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function showModal(options: ModalShowOptions): void;
|
|
14
|
+
export declare const ModalAPI: {
|
|
15
|
+
error: (opts: Omit<ModalShowOptions, "tone">) => void;
|
|
16
|
+
warning: (opts: Omit<ModalShowOptions, "tone">) => void;
|
|
17
|
+
info: (opts: Omit<ModalShowOptions, "tone">) => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Table as ShadcnTable, TableBody as ShadcnTableBody, TableCaption as ShadcnTableCaption, TableCell as ShadcnTableCell, TableHead as ShadcnTableHead, TableHeader as ShadcnTableHeader, TableRow as ShadcnTableRow } from '../ui/table';
|
|
2
|
+
export declare const Table: React.FC<React.ComponentProps<typeof ShadcnTable>>;
|
|
3
|
+
export declare const TableBody: React.FC<React.ComponentProps<typeof ShadcnTableBody>>;
|
|
4
|
+
export declare const TableCaption: React.FC<React.ComponentProps<typeof ShadcnTableCaption>>;
|
|
5
|
+
export type CellType = "label" | "input" | "button" | "icon-button" | "checkbox" | "empty" | "icon-label";
|
|
6
|
+
export interface CustomTableCellProps extends React.ComponentProps<typeof ShadcnTableCell> {
|
|
7
|
+
cellType?: CellType;
|
|
8
|
+
hasBottomBorder?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const TableCell: ({ cellType, hasBottomBorder, className, children, ...props }: CustomTableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const TableHeader: React.FC<React.ComponentProps<typeof ShadcnTableHeader>>;
|
|
12
|
+
interface CustomTableHeadProps extends React.ComponentProps<typeof ShadcnTableHead> {
|
|
13
|
+
variant?: "primary" | "secondary";
|
|
14
|
+
}
|
|
15
|
+
export declare const TableHead: React.FC<CustomTableHeadProps>;
|
|
16
|
+
export declare const TableRow: React.FC<React.ComponentProps<typeof ShadcnTableRow>>;
|
|
17
|
+
export {};
|
|
@@ -5,12 +5,15 @@ import { CourseCollapse } from './CourseCollapse/CourseCollapse';
|
|
|
5
5
|
import { Empty } from './Empty/Empty';
|
|
6
6
|
import { FormItem } from './FormItem/FormItem';
|
|
7
7
|
import { IconButton } from './IconButton/IconButton';
|
|
8
|
+
import { message, Message } from './Message/Message';
|
|
8
9
|
import { Modal } from './Modal/Modal';
|
|
10
|
+
import { ModalAPI } from './Modal/ModalApi';
|
|
9
11
|
import { NavigationItem } from './NavigationItem/NavigationItem';
|
|
10
12
|
import { PageHeader } from './PageHeader/PageHeader';
|
|
11
13
|
import { ProgressLine } from './ProgressLine/ProgressLine';
|
|
12
14
|
import { SectionHeader } from './SectionHeader/SectionHeader';
|
|
15
|
+
import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow } from './Table/Table';
|
|
13
16
|
import { Tooltip } from './Tooltip/Tooltip';
|
|
14
17
|
import { TopBar } from './TopBar/TopBar';
|
|
15
18
|
import { Typography } from './Typography/Typography';
|
|
16
|
-
export { Banner, Button, Collapse, CourseCollapse, Empty, FormItem, IconButton, Modal, Tooltip, NavigationItem, PageHeader, ProgressLine, SectionHeader, TopBar, Typography, };
|
|
19
|
+
export { Banner, Button, Collapse, CourseCollapse, Empty, FormItem, IconButton, Modal, Tooltip, NavigationItem, PageHeader, ProgressLine, SectionHeader, TopBar, Typography, message, Message, ModalAPI, Table, TableBody, TableHead, TableHeader, TableCaption, TableCell, TableRow, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Table({ className, ...props }: React.ComponentProps<"table">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function TableHead({ className, ...props }: React.ComponentProps<"th">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function TableCell({ className, ...props }: React.ComponentProps<"td">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|