@edu-tosel/design 1.0.20 → 1.0.21
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/board/template/CanvasBoard.d.ts +2 -2
- package/board/template/CanvasBoard.js +9 -4
- package/board/template/ManageBoard.d.ts +1 -1
- package/board/template/ManageBoard.js +1 -2
- package/board/widget/Header.d.ts +1 -1
- package/board/widget/Header.js +3 -3
- package/card/template/InfoCard.js +1 -3
- package/card/template/TableCard.js +1 -1
- package/card/widget/TableCard.design.d.ts +1 -1
- package/card/widget/TableCard.design.js +8 -3
- package/html/template/Label.d.ts +2 -4
- package/html/template/Label.js +1 -1
- package/html/widget/Input.d.ts +1 -1
- package/html/widget/Input.js +3 -3
- package/interaction/template/NoData.d.ts +3 -1
- package/interaction/template/NoData.js +2 -2
- package/interaction/widget/Script.design.d.ts +1 -1
- package/interaction/widget/Script.design.js +7 -1
- package/interface/Board.d.ts +16 -21
- package/interface/Card.d.ts +5 -1
- package/interface/HTMLElement.d.ts +1 -0
- package/interface/Widget.d.ts +2 -2
- package/layout/template/Row.d.ts +2 -2
- package/layout/template/Row.js +4 -4
- package/layout/widget/Row.design.d.ts +1 -1
- package/layout/widget/Row.design.js +3 -3
- package/package.json +1 -1
- package/tailwind.config.ts +2 -0
- package/version.txt +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function CanvasBoard({ children, options, widgets, }:
|
|
1
|
+
import { CanvasBoardProps } from "../../interface/Board";
|
|
2
|
+
export default function CanvasBoard({ header, children, options, widgets, buttons, }: CanvasBoardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Events } from "../..";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Events, Label } from "../..";
|
|
3
3
|
import { cn } from "../../util";
|
|
4
4
|
import { Board } from "../widget/Board.design";
|
|
5
|
-
|
|
5
|
+
import BoardHeader from "../widget/Header";
|
|
6
|
+
export default function CanvasBoard({ header, children, options, widgets, buttons, }) {
|
|
6
7
|
const layouts = "flex flex-col lg:flex-row lg:flex-wrap gap-7.5 ";
|
|
7
8
|
const sizes = "h-full ";
|
|
8
9
|
const paddings = "pb-36 xl:pb-6 px-2 xs:px-4 xl:pl-7.5 xl:pr-2 pt-2 xs:pt-4 xl:pt-7.5";
|
|
9
10
|
const styles = "overflow-y-scroll ";
|
|
10
|
-
return (
|
|
11
|
+
return (_jsxs("div", { className: "relative w-full", children: [_jsxs(Board, { widgets: widgets, options: { ...options, isRounded: true }, children: [header && _jsx(BoardHeader, { ...header }), _jsx(Events.Replace, { widgets: widgets?.replaces, children: _jsx("div", { className: cn(layouts, sizes, paddings, styles), children: children }) })] }), _jsx("div", { className: "absolute -bottom-18.5 right-0", children: buttons?.map(({ title, onClick, options }) => (_jsx(Label.Button, { title: title, onClick: onClick, options: {
|
|
12
|
+
...options,
|
|
13
|
+
text: "text-white",
|
|
14
|
+
background: "bg-crimson-burgundy",
|
|
15
|
+
} }))) })] }));
|
|
11
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ManageBoardProps } from "../../interface/Board";
|
|
2
2
|
export default function ManageBoard<K extends string, T extends {
|
|
3
3
|
[p in K]: any;
|
|
4
|
-
}>({ header,
|
|
4
|
+
}>({ header, dataSets, dataField, widgets, options }: ManageBoardProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,9 +5,8 @@ import BoardHeader from "../widget/Header";
|
|
|
5
5
|
import { cn, sortByOrder } from "../../util";
|
|
6
6
|
import { useWidgetStore } from "../../store";
|
|
7
7
|
import { useId } from "react";
|
|
8
|
-
export default function ManageBoard({ header,
|
|
8
|
+
export default function ManageBoard({ header, dataSets, dataField, widgets, options }) {
|
|
9
9
|
const { classNames, noPadding } = options ?? {};
|
|
10
|
-
const { dataSets, dataField } = data;
|
|
11
10
|
const { order } = useWidgetStore();
|
|
12
11
|
const id = useId();
|
|
13
12
|
const orders = order[id] ?? [];
|
package/board/widget/Header.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BoardHeaderProps } from "./../../interface/Board";
|
|
2
|
-
export default function BoardHeader({ titles,
|
|
2
|
+
export default function BoardHeader({ titles, tag, options, }: BoardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
package/board/widget/Header.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../util";
|
|
3
3
|
import { Input, Select } from "../../html";
|
|
4
|
-
export default function BoardHeader({ titles,
|
|
4
|
+
export default function BoardHeader({ titles, tag, options, }) {
|
|
5
5
|
const { title, icon } = titles ?? {};
|
|
6
|
-
const { selects, inputs } =
|
|
6
|
+
const { selects, inputs } = tag ?? {};
|
|
7
7
|
const { colors } = options ?? {};
|
|
8
8
|
const { bgColor, textColor } = colors ?? {
|
|
9
9
|
bgColor: "white",
|
|
@@ -20,5 +20,5 @@ export default function BoardHeader({ titles, tags, options, }) {
|
|
|
20
20
|
displays: "xl:hidden block ",
|
|
21
21
|
sizes: "w-full h-22",
|
|
22
22
|
};
|
|
23
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [icon && _jsx("img", { src: icon, className: "fill-blue-500" }), _jsx("div", { className: "text-2xl font-bold text-green-dark", children: title })] }), _jsxs("div", { className: "flex items-center ml-auto gap-4", children: [selects?.map(({ width, title, options, state }, index) => (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { children: title }), _jsx(Select, { options: { width }, selectOptions: options, state: state }, title)] }, index))), inputs?.map((
|
|
23
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [icon && _jsx("img", { src: icon, className: "fill-blue-500" }), _jsx("div", { className: "text-2xl font-bold text-green-dark", children: title })] }), _jsxs("div", { className: "flex items-center ml-auto gap-4", children: [selects?.map(({ width, title, options, state }, index) => (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { children: title }), _jsx(Select, { options: { width }, selectOptions: options, state: state }, title)] }, index))), inputs?.map((prop, index) => (_jsx(Input, { ...prop }, index)))] })] }), _jsx("div", { className: cn(block) })] }));
|
|
24
24
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useNavigate } from "react-router-dom";
|
|
3
2
|
import { InfoCardDesign } from "../widget/InfoCard.design";
|
|
4
3
|
import { Events, Label, NoData } from "../..";
|
|
5
4
|
import { cn, gradient } from "../../util";
|
|
@@ -37,12 +36,11 @@ function Exam({ titles, data }) {
|
|
|
37
36
|
displays: "flex flex-col justify-between mt-2.5",
|
|
38
37
|
sizes: "h-19.25 w-full",
|
|
39
38
|
};
|
|
40
|
-
const navigate = useNavigate();
|
|
41
39
|
return (_jsx(InfoCardDesign, { titles: titles, options: {
|
|
42
40
|
titleBorder: "border-red-crimson",
|
|
43
41
|
width: "sm",
|
|
44
42
|
height: "xs",
|
|
45
|
-
}, children: _jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex gap-4 font-bold ", children: [manager, " / ", isPublic ? "공개시험" : "비공개시험"] }), _jsxs("div", { children: [_jsxs("div", { className: "text-xs", children: ["\uC811\uC218\uB9C8\uAC10: ", endDate] }), _jsxs("div", { className: "text-xs", children: ["\uC2DC\uD5D8\uC77C: ", examDate] })] })] }), _jsx(Label.Button, { title: status, onClick: () =>
|
|
43
|
+
}, children: _jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex gap-4 font-bold ", children: [manager, " / ", isPublic ? "공개시험" : "비공개시험"] }), _jsxs("div", { children: [_jsxs("div", { className: "text-xs", children: ["\uC811\uC218\uB9C8\uAC10: ", endDate] }), _jsxs("div", { className: "text-xs", children: ["\uC2DC\uD5D8\uC77C: ", examDate] })] })] }), _jsx(Label.Button, { title: status, onClick: () => { }, options: { width: "sm", height: "xs", className: cn(label) } })] }) }));
|
|
46
44
|
}
|
|
47
45
|
function ExamDataREG({ titles, data }) {
|
|
48
46
|
const container = {
|
|
@@ -4,7 +4,7 @@ function TableCard(props) {
|
|
|
4
4
|
return _jsx(TableCardDesign, { ...props });
|
|
5
5
|
}
|
|
6
6
|
function Log(props) {
|
|
7
|
-
return (_jsx(TableCardDesign, { dataField: props.dataField,
|
|
7
|
+
return (_jsx(TableCardDesign, { dataField: props.dataField, dataSet: props.dataSet, options: {
|
|
8
8
|
...props.options,
|
|
9
9
|
rowHeight: "h-5",
|
|
10
10
|
onClick: props.options?.onClick,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TableCardProps } from "../../interface";
|
|
2
2
|
export default function TableCardDesign<K extends string, T extends {
|
|
3
3
|
[p in K]: any;
|
|
4
|
-
}>({
|
|
4
|
+
}>({ dataSet, dataField, options }: TableCardProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,8 +3,8 @@ import { useId } from "react";
|
|
|
3
3
|
import { useWidgetStore } from "../../store";
|
|
4
4
|
import { cn, sortByOrder } from "../../util";
|
|
5
5
|
import Card from "../widget/Card.design";
|
|
6
|
-
import { DataField, Row } from "
|
|
7
|
-
export default function TableCardDesign({
|
|
6
|
+
import { DataField, Events, NoData, Row } from "../..";
|
|
7
|
+
export default function TableCardDesign({ dataSet, dataField, options }) {
|
|
8
8
|
const { width, height } = options ?? {};
|
|
9
9
|
const { order } = useWidgetStore();
|
|
10
10
|
const id = useId();
|
|
@@ -19,5 +19,10 @@ export default function TableCardDesign({ dataSets, dataField, options }) {
|
|
|
19
19
|
height: height ?? "lg",
|
|
20
20
|
overflow: "y-scroll",
|
|
21
21
|
noPadding: true,
|
|
22
|
-
}, children:
|
|
22
|
+
}, children: _jsx(Events.Replace, { widgets: [
|
|
23
|
+
[
|
|
24
|
+
dataSet.items.length === 0,
|
|
25
|
+
dataSet.noData ?? _jsx(NoData.Script, { script: "No Data" }),
|
|
26
|
+
],
|
|
27
|
+
], children: sortByOrder(dataSet.items, orders).map((item, index) => (_jsx(Row.Card, { item: item, onClick: () => dataSet.onClick?.(item), dataField: dataField, height: options?.rowHeight, noHover: options?.noHover, noPadding: options?.noRowPadding }, id + index))) }) }));
|
|
23
28
|
}
|
package/html/template/Label.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { HTMLLabelElement
|
|
1
|
+
import { HTMLLabelElement } from "../../interface";
|
|
2
2
|
declare function Label({ title, options }: Omit<HTMLLabelElement, "onClick">): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace Label {
|
|
4
|
-
var Button: ({ title, onClick, options
|
|
5
|
-
onClick: OnClick;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
var Button: ({ title, onClick, options }: HTMLLabelElement) => import("react/jsx-runtime").JSX.Element;
|
|
7
5
|
}
|
|
8
6
|
export default Label;
|
package/html/template/Label.js
CHANGED
|
@@ -3,7 +3,7 @@ import LabelDesign from "./../widget/Label.design";
|
|
|
3
3
|
function Label({ title, options }) {
|
|
4
4
|
return (_jsx(LabelDesign, { title: title, options: { ...options, width: "sm", height: "xs" } }));
|
|
5
5
|
}
|
|
6
|
-
function Button({ title, onClick, options
|
|
6
|
+
function Button({ title, onClick, options }) {
|
|
7
7
|
return (_jsx(LabelDesign, { title: title, onClick: onClick, options: {
|
|
8
8
|
...options,
|
|
9
9
|
width: options?.width ?? "md",
|
package/html/widget/Input.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { HTMLInputElement } from "../../interface";
|
|
2
|
-
export default function Input({ state, placeholder, options, }: HTMLInputElement): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function Input({ state, onKeyDown, placeholder, options, }: HTMLInputElement): import("react/jsx-runtime").JSX.Element;
|
package/html/widget/Input.js
CHANGED
|
@@ -10,15 +10,15 @@ const widthSize = {
|
|
|
10
10
|
"2xl": "w-144",
|
|
11
11
|
full: "w-full",
|
|
12
12
|
};
|
|
13
|
-
export default function Input({ state, placeholder, options, }) {
|
|
13
|
+
export default function Input({ state, onKeyDown, placeholder, options, }) {
|
|
14
14
|
const { width } = options ?? {};
|
|
15
15
|
const id = useId();
|
|
16
16
|
const [value, setValue] = state;
|
|
17
17
|
const container = {
|
|
18
|
-
width: `${widthSize[width ?? "
|
|
18
|
+
width: `${widthSize[width ?? "xs"]} h-8`,
|
|
19
19
|
styles: "rounded-md pl-4 pr-4 pt-2 pb-2 bg-slate-200 text-xs",
|
|
20
20
|
pseudo: "focus:outline-none focus:bg-white focus:text-black box-shadow-focus",
|
|
21
21
|
effect: `transition-all`,
|
|
22
22
|
};
|
|
23
|
-
return (_jsx("input", { className: cn(container), id: id, type: "text", placeholder: placeholder ?? "
|
|
23
|
+
return (_jsx("input", { className: cn(container), id: id, type: "text", placeholder: placeholder ?? "입력해주세요", onKeyDown: onKeyDown, onChange: (e) => setValue(e.target.value) }));
|
|
24
24
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import ScriptDesign from "../widget/Script.design";
|
|
3
3
|
import SignDesign from "../widget/Sign.design";
|
|
4
|
-
function Script() {
|
|
5
|
-
return _jsx(ScriptDesign, {
|
|
4
|
+
function Script(props) {
|
|
5
|
+
return _jsx(ScriptDesign, { ...props });
|
|
6
6
|
}
|
|
7
7
|
function Sign(props) {
|
|
8
8
|
return _jsx(SignDesign, { ...props });
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../util";
|
|
2
3
|
export default function Script({ script }) {
|
|
3
|
-
|
|
4
|
+
const container = {
|
|
5
|
+
displays: "flex items-center justify-center",
|
|
6
|
+
sizes: "w-full h-full",
|
|
7
|
+
fonts: "text-xl",
|
|
8
|
+
};
|
|
9
|
+
return _jsx("div", { className: cn(container), children: script ?? "No Data" });
|
|
4
10
|
}
|
package/interface/Board.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { DataField, Size, State, Titles } from "./Property";
|
|
3
2
|
import { EventsProps } from "./Widget";
|
|
3
|
+
import { HTMLInputElement, HTMLLabelElement } from "./HTMLElement";
|
|
4
4
|
interface OptionsProps {
|
|
5
5
|
classNames?: string;
|
|
6
6
|
width?: Size;
|
|
@@ -10,28 +10,25 @@ interface OptionsProps {
|
|
|
10
10
|
noPadding?: boolean;
|
|
11
11
|
}
|
|
12
12
|
export interface BoardProps {
|
|
13
|
+
header?: BoardHeaderProps;
|
|
13
14
|
children?: React.ReactNode;
|
|
14
15
|
widgets?: EventsProps;
|
|
15
16
|
options?: OptionsProps;
|
|
16
17
|
debug?: string;
|
|
18
|
+
buttons?: HTMLLabelElement[];
|
|
17
19
|
}
|
|
18
20
|
export interface BoardHeaderProps {
|
|
19
|
-
titles?: Titles & {
|
|
21
|
+
titles?: Omit<Titles, "subtitle"> & {
|
|
20
22
|
icon?: string;
|
|
21
23
|
};
|
|
22
|
-
|
|
24
|
+
tag?: {
|
|
23
25
|
selects?: {
|
|
24
26
|
title: string;
|
|
25
27
|
state: State<string>;
|
|
26
28
|
options: [string | number, string][];
|
|
27
29
|
width?: Size;
|
|
28
30
|
}[];
|
|
29
|
-
inputs?:
|
|
30
|
-
state: State<string>;
|
|
31
|
-
placeholder?: string;
|
|
32
|
-
title?: string;
|
|
33
|
-
width?: Size;
|
|
34
|
-
}[];
|
|
31
|
+
inputs?: HTMLInputElement[];
|
|
35
32
|
};
|
|
36
33
|
options?: {
|
|
37
34
|
colors?: {
|
|
@@ -40,20 +37,18 @@ export interface BoardHeaderProps {
|
|
|
40
37
|
};
|
|
41
38
|
};
|
|
42
39
|
}
|
|
40
|
+
export interface CanvasBoardProps extends BoardProps {
|
|
41
|
+
}
|
|
43
42
|
export interface ManageBoardProps<T> extends BoardProps {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
[p in keyof T]?: Partial<DataField>;
|
|
53
|
-
};
|
|
54
|
-
gap?: number;
|
|
43
|
+
dataSets: {
|
|
44
|
+
items: T[] | undefined;
|
|
45
|
+
renderItem: (item: T) => React.ReactNode;
|
|
46
|
+
titles?: Titles;
|
|
47
|
+
interaction?: React.ReactNode;
|
|
48
|
+
}[];
|
|
49
|
+
dataField?: {
|
|
50
|
+
[p in keyof T]?: Partial<DataField>;
|
|
55
51
|
};
|
|
56
|
-
header?: BoardHeaderProps;
|
|
57
52
|
}
|
|
58
53
|
export interface PaperBoardProps extends BoardProps {
|
|
59
54
|
}
|
package/interface/Card.d.ts
CHANGED
|
@@ -135,7 +135,11 @@ export interface AddCardProps extends Omit<CardProps, "children"> {
|
|
|
135
135
|
onClick: OnClick;
|
|
136
136
|
}
|
|
137
137
|
export interface TableCardProps<T> extends Omit<CardProps, "children"> {
|
|
138
|
-
|
|
138
|
+
dataSet: {
|
|
139
|
+
items: T[];
|
|
140
|
+
onClick?: OnClick<T>;
|
|
141
|
+
noData?: React.ReactNode;
|
|
142
|
+
};
|
|
139
143
|
dataField: {
|
|
140
144
|
[p in keyof T]?: Partial<DataField>;
|
|
141
145
|
};
|
|
@@ -27,6 +27,7 @@ export interface HTMLSelectElement extends HTMLElement {
|
|
|
27
27
|
}
|
|
28
28
|
export interface HTMLInputElement extends HTMLElement {
|
|
29
29
|
state: State<string>;
|
|
30
|
+
onKeyDown?: (e: React.KeyboardEvent) => void;
|
|
30
31
|
placeholder?: string;
|
|
31
32
|
}
|
|
32
33
|
export interface HTMLToggleElement extends HTMLElement {
|
package/interface/Widget.d.ts
CHANGED
package/layout/template/Row.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RowProps } from "../../interface";
|
|
2
|
-
declare function Board<T extends Record<string, any>>({
|
|
3
|
-
declare function Card<T extends Record<string, any>>({
|
|
2
|
+
declare function Board<T extends Record<string, any>>({ item, dataField, onClick, }: RowProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function Card<T extends Record<string, any>>({ item, dataField, onClick, height, noPadding, noHover, }: Omit<RowProps<T>, "options"> & {
|
|
4
4
|
height?: string;
|
|
5
5
|
noPadding?: boolean;
|
|
6
6
|
noHover?: boolean;
|
package/layout/template/Row.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useId } from "react";
|
|
3
3
|
import RowDesign from "../widget/Row.design";
|
|
4
|
-
function Board({
|
|
4
|
+
function Board({ item, dataField, onClick, }) {
|
|
5
5
|
const id = useId();
|
|
6
|
-
return (_jsx(RowDesign, { onClick: onClick,
|
|
6
|
+
return (_jsx(RowDesign, { onClick: onClick, item: item, dataField: dataField, options: {
|
|
7
7
|
size: "w-full h-12",
|
|
8
8
|
padding: "px-2 xs:px-4 xl:px-7.5",
|
|
9
9
|
text: "text-xl",
|
|
10
10
|
} }, id));
|
|
11
11
|
}
|
|
12
|
-
function Card({
|
|
12
|
+
function Card({ item, dataField, onClick, height, noPadding, noHover, }) {
|
|
13
13
|
const id = useId();
|
|
14
|
-
return (_jsx(RowDesign, { onClick: onClick,
|
|
14
|
+
return (_jsx(RowDesign, { onClick: onClick, item: item, dataField: dataField, options: {
|
|
15
15
|
size: `w-full ${height ?? "h-12"}`,
|
|
16
16
|
padding: !noPadding ? "px-2 xs:px-4 xl:px-7.5" : "",
|
|
17
17
|
text: "text-base",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RowProps } from "../../interface";
|
|
2
|
-
export default function RowDesign<T extends Record<string, any>>({
|
|
2
|
+
export default function RowDesign<T extends Record<string, any>>({ item, dataField, options, onClick, }: RowProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useId } from "react";
|
|
3
3
|
import { cn } from "../../util";
|
|
4
|
-
export default function RowDesign({
|
|
4
|
+
export default function RowDesign({ item, dataField, options, onClick, }) {
|
|
5
5
|
const { size, padding, text, noHover } = options ?? {};
|
|
6
6
|
const id = useId();
|
|
7
7
|
const container = {
|
|
@@ -11,6 +11,6 @@ export default function RowDesign({ dataSet, dataField, options, onClick, }) {
|
|
|
11
11
|
text: text,
|
|
12
12
|
styles: !noHover && "hover:bg-gray-100 duration-100",
|
|
13
13
|
};
|
|
14
|
-
return (_jsx("div", { className: cn(container), onClick: onClick, children: dataField &&
|
|
15
|
-
Object.keys(dataField).map((key) => (_jsx("div", { className: `w-${dataField[key]?.size}/100 truncate`, children:
|
|
14
|
+
return (_jsx("div", { className: cn(container), onClick: () => onClick?.(), children: dataField &&
|
|
15
|
+
Object.keys(dataField).map((key) => (_jsx("div", { className: `w-${dataField[key]?.size}/100 truncate`, children: item[key] }, id + key))) }));
|
|
16
16
|
}
|
package/package.json
CHANGED
package/tailwind.config.ts
CHANGED
|
@@ -114,6 +114,7 @@ export default {
|
|
|
114
114
|
15: "3.75rem",
|
|
115
115
|
16: "4rem",
|
|
116
116
|
18: "4.5rem",
|
|
117
|
+
18.5: "4.625rem",
|
|
117
118
|
18.75: "4.6875rem",
|
|
118
119
|
19: "4.75rem",
|
|
119
120
|
19.25: "4.8125rem",
|
|
@@ -179,6 +180,7 @@ export default {
|
|
|
179
180
|
120: "30rem",
|
|
180
181
|
122: "30.5rem",
|
|
181
182
|
124: "31rem",
|
|
183
|
+
125: "31.25rem",
|
|
182
184
|
126: "31.5rem",
|
|
183
185
|
127.5: "31.875rem",
|
|
184
186
|
128: "32rem",
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.21
|