@kaio-xyz/design-system 1.0.40 → 1.1.0
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/atoms/drawer/drawer.d.ts +11 -0
- package/dist/components/atoms/drawer/drawer.stories.d.ts +10 -0
- package/dist/components/atoms/drawer/index.d.ts +1 -0
- package/dist/components/atoms/list/list-item/list-item.d.ts +2 -1
- package/dist/components/atoms/stepper/step/step.d.ts +2 -1
- package/dist/components/atoms/table/index.d.ts +1 -0
- package/dist/components/atoms/table/table-custom-styles.d.ts +41 -0
- package/dist/components/atoms/table/table.d.ts +7 -0
- package/dist/components/atoms/table/table.stories.d.ts +15 -0
- package/dist/hooks/use-can-animate.d.ts +1 -0
- package/dist/index.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utils.d.ts +1 -0
- package/package.json +3 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export type DrawerProps = {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
title: string;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
isLarge?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
actions?: ReactNode;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const Drawer: ({ isOpen, title, children, className, actions, onClose, isLarge, }: DrawerProps) => import("react").ReactPortal;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Drawer } from "./drawer";
|
|
3
|
+
declare const meta: Meta<typeof Drawer>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Drawer>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Large: Story;
|
|
8
|
+
export declare const WithActions: Story;
|
|
9
|
+
export declare const WithActionsLongBody: Story;
|
|
10
|
+
export declare const LongTitle: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Drawer } from "./drawer";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
type ListItem = {
|
|
2
2
|
value: string;
|
|
3
3
|
label: string;
|
|
4
|
+
key?: string;
|
|
4
5
|
};
|
|
5
|
-
export declare const ListItem: ({ value, label }: ListItem) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const ListItem: ({ value, label, key }: ListItem) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -3,6 +3,7 @@ type StepProps = {
|
|
|
3
3
|
isCompleted?: boolean;
|
|
4
4
|
isCurrent?: boolean;
|
|
5
5
|
iconSize?: number;
|
|
6
|
+
key?: string;
|
|
6
7
|
};
|
|
7
|
-
export declare const Step: ({ label, iconSize, isCompleted, isCurrent }: StepProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Step: ({ key, label, iconSize, isCompleted, isCurrent }: StepProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Table } from "./table";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const tableCustomStyles: {
|
|
2
|
+
table: {
|
|
3
|
+
style: {
|
|
4
|
+
backgroundColor: string;
|
|
5
|
+
borderRadius: string;
|
|
6
|
+
border: string;
|
|
7
|
+
overflow: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
headRow: {
|
|
11
|
+
style: {
|
|
12
|
+
backgroundColor: string;
|
|
13
|
+
borderBottom: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
headCells: {
|
|
17
|
+
style: {
|
|
18
|
+
color: string;
|
|
19
|
+
fontWeight: number;
|
|
20
|
+
fontSize: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
rows: {
|
|
24
|
+
style: {
|
|
25
|
+
color: string;
|
|
26
|
+
backgroundColor: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
cells: {
|
|
30
|
+
style: {
|
|
31
|
+
padding: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
pagination: {
|
|
35
|
+
style: {
|
|
36
|
+
backgroundColor: string;
|
|
37
|
+
borderTop: string;
|
|
38
|
+
color: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TableProps as BaseTableProps } from 'react-data-table-component';
|
|
2
|
+
type TableProps<T> = BaseTableProps<T> & {
|
|
3
|
+
dataTest: string;
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const Table: <T>({ data, columns, dataTest, customStyles, isLoading, onRowClicked, ...rest }: TableProps<T>) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Table } from "./table";
|
|
3
|
+
type DataRow = {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
email: string;
|
|
7
|
+
age: number;
|
|
8
|
+
city: string;
|
|
9
|
+
};
|
|
10
|
+
declare const meta: Meta<typeof Table<DataRow>>;
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const WithRowClicked: Story;
|
|
15
|
+
export declare const DenseTable: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useCanAnimate: () => boolean;
|
package/dist/index.cjs.js
CHANGED
|
@@ -514,7 +514,7 @@ var Stepper = function (_a) {
|
|
|
514
514
|
var style$2 = {"root":"step-module__root__Tk1Yq","container":"step-module__container__XbQSB","label":"step-module__label__UNF3I","emptyIcon":"step-module__emptyIcon__-xNcB","checkIcon":"step-module__checkIcon__MWBUM","loadingIcon":"step-module__loadingIcon__-VoCZ"};
|
|
515
515
|
|
|
516
516
|
var Step = function (_a) {
|
|
517
|
-
var label = _a.label, _b = _a.iconSize, iconSize = _b === void 0 ? 16 : _b, _c = _a.isCompleted, isCompleted = _c === void 0 ? false : _c, _d = _a.isCurrent, isCurrent = _d === void 0 ? false : _d;
|
|
517
|
+
var key = _a.key, label = _a.label, _b = _a.iconSize, iconSize = _b === void 0 ? 16 : _b, _c = _a.isCompleted, isCompleted = _c === void 0 ? false : _c, _d = _a.isCurrent, isCurrent = _d === void 0 ? false : _d;
|
|
518
518
|
var icon = React.useMemo(function () {
|
|
519
519
|
switch (true) {
|
|
520
520
|
case isCompleted: return jsxRuntime.jsx(SvgCheck, { className: style$2.checkIcon });
|
|
@@ -522,7 +522,7 @@ var Step = function (_a) {
|
|
|
522
522
|
default: return jsxRuntime.jsx("span", { className: style$2.emptyIcon });
|
|
523
523
|
}
|
|
524
524
|
}, [isCompleted, isCurrent]);
|
|
525
|
-
return (jsxRuntime.jsx("li", { className: style$2.root, "data-is-current": isCurrent, style: { '--icon-size': "".concat(iconSize, "px") }, children: jsxRuntime.jsxs(Stack, { className: style$2.container, position: "horizontal", children: [icon, jsxRuntime.jsx("span", { className: style$2.label, children: label })] }) }));
|
|
525
|
+
return (jsxRuntime.jsx("li", { className: style$2.root, "data-is-current": isCurrent, style: { '--icon-size': "".concat(iconSize, "px") }, children: jsxRuntime.jsxs(Stack, { className: style$2.container, position: "horizontal", children: [icon, jsxRuntime.jsx("span", { className: style$2.label, children: label })] }) }, key));
|
|
526
526
|
};
|
|
527
527
|
|
|
528
528
|
var style$1 = {"root":"list-module__root__OXx93"};
|
|
@@ -535,8 +535,8 @@ var List = function (_a) {
|
|
|
535
535
|
var style = {"root":"list-item-module__root__-fOHc","label":"list-item-module__label__rMBF5","value":"list-item-module__value__A3HYb"};
|
|
536
536
|
|
|
537
537
|
var ListItem = function (_a) {
|
|
538
|
-
var value = _a.value, label = _a.label;
|
|
539
|
-
return (jsxRuntime.jsxs(Stack, { position: "horizontal-space", space: "m", className: style.root, dataAlignItems: "flex-start", children: [jsxRuntime.jsx("span", { className: style.label, children: label }), jsxRuntime.jsx("span", { className: style.value, children: value })] }));
|
|
538
|
+
var value = _a.value, label = _a.label, key = _a.key;
|
|
539
|
+
return (jsxRuntime.jsx("li", { children: jsxRuntime.jsxs(Stack, { position: "horizontal-space", space: "m", className: style.root, dataAlignItems: "flex-start", children: [jsxRuntime.jsx("span", { className: style.label, children: label }), jsxRuntime.jsx("span", { className: style.value, children: value })] }) }, key));
|
|
540
540
|
};
|
|
541
541
|
|
|
542
542
|
exports.Badge = Badge;
|