@team-monolith/cds 0.1.9 → 0.2.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/AlertDialog/AlertDialogContent.js +2 -2
- package/dist/components/Button.d.ts +10 -3
- package/dist/components/Button.js +3 -3
- package/dist/icons/arrows.d.ts +12 -0
- package/dist/icons/arrows.js +4 -0
- package/dist/icons/system.d.ts +3 -0
- package/dist/icons/system.js +1 -0
- package/dist/patterns/Card/Card.d.ts +39 -0
- package/dist/patterns/Card/Card.js +68 -0
- package/dist/patterns/Card/index.d.ts +2 -0
- package/dist/patterns/Card/index.js +2 -0
- package/dist/patterns/Dialog/Dialog.d.ts +12 -0
- package/dist/patterns/Dialog/Dialog.js +26 -0
- package/dist/patterns/Dialog/DialogContent.d.ts +8 -0
- package/dist/patterns/Dialog/DialogContent.js +23 -0
- package/dist/patterns/Dialog/DialogNavigation.d.ts +12 -0
- package/dist/patterns/Dialog/DialogNavigation.js +25 -0
- package/dist/patterns/Dialog/DialogNavigationContext.d.ts +5 -0
- package/dist/patterns/Dialog/DialogNavigationContext.js +5 -0
- package/dist/patterns/Dialog/DialogNavigationItem.d.ts +10 -0
- package/dist/patterns/Dialog/DialogNavigationItem.js +25 -0
- package/dist/patterns/Dialog/DialogPanel.d.ts +10 -0
- package/dist/patterns/Dialog/DialogPanel.js +31 -0
- package/dist/patterns/Dialog/DialogPanels.d.ts +13 -0
- package/dist/patterns/Dialog/DialogPanels.js +17 -0
- package/dist/patterns/Dialog/DialogPanelsContext.d.ts +5 -0
- package/dist/patterns/Dialog/DialogPanelsContext.js +5 -0
- package/dist/patterns/Dialog/DialogTitle.d.ts +13 -0
- package/dist/patterns/Dialog/DialogTitle.js +26 -0
- package/dist/patterns/Dialog/index.d.ts +7 -0
- package/dist/patterns/Dialog/index.js +7 -0
- package/dist/patterns/Navigation/NavigationContext.d.ts +5 -0
- package/dist/patterns/Navigation/NavigationContext.js +5 -0
- package/dist/patterns/Navigation/NavigationHorizontal.d.ts +11 -0
- package/dist/patterns/Navigation/NavigationHorizontal.js +27 -0
- package/dist/patterns/Navigation/NavigationItem.d.ts +9 -0
- package/dist/patterns/Navigation/NavigationItem.js +33 -0
- package/dist/patterns/Navigation/NavigationVertical.d.ts +14 -0
- package/dist/patterns/Navigation/NavigationVertical.js +27 -0
- package/dist/patterns/Navigation/index.d.ts +3 -0
- package/dist/patterns/Navigation/index.js +3 -0
- package/dist/patterns/Table/Table.d.ts +2 -0
- package/dist/patterns/Table/Table.js +3 -3
- package/dist/patterns/Table/TableCell.js +5 -5
- package/dist/patterns/Table/TablePropsContext.d.ts +7 -0
- package/dist/patterns/Table/TablePropsContext.js +3 -0
- package/dist/patterns/Table/TableRow.d.ts +2 -0
- package/dist/patterns/Table/TableRow.js +9 -4
- package/package.json +1 -1
- package/src/cds/components/AlertDialog/AlertDialogContent.tsx +14 -16
- package/src/cds/components/Button.tsx +98 -77
- package/src/cds/icons/arrows.tsx +55 -0
- package/src/cds/icons/system.tsx +15 -0
- package/src/cds/patterns/Card/Card.tsx +294 -0
- package/src/cds/patterns/Card/class-icon.svg +28 -0
- package/src/cds/patterns/Card/index.tsx +2 -0
- package/src/cds/patterns/Card/material-icon.svg +25 -0
- package/src/cds/patterns/Card/problem-icon.svg +25 -0
- package/src/cds/patterns/Card/thumbnail/sample.png +0 -0
- package/src/cds/patterns/Dialog/Dialog.tsx +57 -0
- package/src/cds/patterns/Dialog/DialogContent.tsx +28 -0
- package/src/cds/patterns/Dialog/DialogNavigation.tsx +29 -0
- package/src/cds/patterns/Dialog/DialogNavigationContext.tsx +9 -0
- package/src/cds/patterns/Dialog/DialogNavigationItem.tsx +42 -0
- package/src/cds/patterns/Dialog/DialogPanel.tsx +40 -0
- package/src/cds/patterns/Dialog/DialogPanels.tsx +24 -0
- package/src/cds/patterns/Dialog/DialogPanelsContext.tsx +9 -0
- package/src/cds/patterns/Dialog/DialogTitle.tsx +55 -0
- package/src/cds/patterns/Dialog/index.tsx +7 -0
- package/src/cds/patterns/Navigation/NavigationContext.tsx +9 -0
- package/src/cds/patterns/Navigation/NavigationHorizontal.tsx +32 -0
- package/src/cds/patterns/Navigation/NavigationItem.tsx +36 -0
- package/src/cds/patterns/Navigation/NavigationVertical.tsx +39 -0
- package/src/cds/patterns/Navigation/index.tsx +3 -0
- package/src/cds/patterns/Table/Table.tsx +8 -2
- package/src/cds/patterns/Table/TableCell.tsx +14 -3
- package/src/cds/patterns/Table/TablePropsContext.tsx +9 -0
- package/src/cds/patterns/Table/TableRow.tsx +23 -7
- package/dist/patterns/EmptyState/empty-state-icon.svg +0 -36
- package/dist/patterns/Table/TableSizeContext.d.ts +0 -7
- package/dist/patterns/Table/TableSizeContext.js +0 -3
- package/src/cds/patterns/Table/TableSizeContext.tsx +0 -10
|
@@ -24,13 +24,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
24
24
|
}
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
|
-
import { jsx as _jsx
|
|
27
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
28
28
|
/** @jsxImportSource @emotion/react */
|
|
29
29
|
import { css, useTheme } from "@emotion/react";
|
|
30
30
|
import React from "react";
|
|
31
31
|
export var AlertDialogContent = React.forwardRef(function (props, ref) {
|
|
32
32
|
var className = props.className, _a = props.component, Component = _a === void 0 ? "div" : _a, children = props.children, other = __rest(props, ["className", "component", "children"]);
|
|
33
33
|
var theme = useTheme();
|
|
34
|
-
return (_jsx(
|
|
34
|
+
return (_jsx(Component, __assign({}, other, { ref: ref, className: className, css: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n grid-area: content;\n\n font-style: normal;\n font-size: 18px;\n line-height: 28px;\n color: ", ";\n "], ["\n grid-area: content;\n\n font-style: normal;\n font-size: 18px;\n line-height: 28px;\n color: ", ";\n "])), theme.color.foreground.neutralBase) }, { children: children })));
|
|
35
35
|
});
|
|
36
36
|
var templateObject_1;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { PolymorphicProps } from "@mui/base";
|
|
2
3
|
export type ButtonColor = "primary" | "secondary" | "danger" | "textNeutral" | "textDanger" | "textPrimary";
|
|
3
4
|
export type ButtonSize = "large" | "medium" | "small" | "xsmall";
|
|
4
|
-
export interface
|
|
5
|
+
export interface ButtonOwnProps<RootComponentType extends React.ElementType> {
|
|
5
6
|
className?: string;
|
|
6
|
-
component?:
|
|
7
|
+
component?: RootComponentType;
|
|
7
8
|
/** 비활성화 여부 */
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
/** 컴포넌트 색상 */
|
|
@@ -19,8 +20,14 @@ export interface ButtonProps {
|
|
|
19
20
|
/** 버튼 클릭 시 호출될 콜백 함수 */
|
|
20
21
|
onClick?: () => void;
|
|
21
22
|
}
|
|
23
|
+
export type ButtonProps<RootComponentType extends React.ElementType = ButtonTypeMap["defaultComponent"]> = PolymorphicProps<ButtonTypeMap<RootComponentType>, RootComponentType>;
|
|
24
|
+
export interface ButtonTypeMap<RootComponentType extends React.ElementType = "button"> {
|
|
25
|
+
props: ButtonOwnProps<RootComponentType>;
|
|
26
|
+
defaultComponent: RootComponentType;
|
|
27
|
+
}
|
|
28
|
+
type ButtonComponent = <RootComponentType extends React.ElementType = "button">(props: ButtonProps<RootComponentType>) => React.ReactElement | null;
|
|
22
29
|
/**
|
|
23
30
|
* [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=20-173&t=cXcCv3QijbX7MkoC-0)
|
|
24
31
|
*/
|
|
25
|
-
declare const Button:
|
|
32
|
+
declare const Button: ButtonComponent;
|
|
26
33
|
export default Button;
|
|
@@ -55,16 +55,16 @@ var SIZE_TO_LABEL_STYLE = {
|
|
|
55
55
|
/**
|
|
56
56
|
* [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=20-173&t=cXcCv3QijbX7MkoC-0)
|
|
57
57
|
*/
|
|
58
|
-
var Button = React.forwardRef(function (props, ref) {
|
|
58
|
+
var Button = React.forwardRef(function Button(props, ref) {
|
|
59
59
|
var className = props.className, _a = props.component, Component = _a === void 0 ? "button" : _a, disabled = props.disabled, color = props.color, size = props.size, startIcon = props.startIcon, endIcon = props.endIcon, label = props.label, onClick = props.onClick, other = __rest(props, ["className", "component", "disabled", "color", "size", "startIcon", "endIcon", "label", "onClick"]);
|
|
60
60
|
var theme = useTheme();
|
|
61
61
|
return (_jsxs(Component, __assign({}, other, { className: className, ref: ref, css: [
|
|
62
|
-
css(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n
|
|
62
|
+
css(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: 8px;\n\n border: none;\n border-radius: 8px;\n\n cursor: pointer;\n &:disabled {\n cursor: default;\n pointer-events: none;\n }\n\n font: inherit;\n text-decoration: none;\n "], ["\n display: inline-flex;\n align-items: center;\n gap: 8px;\n\n border: none;\n border-radius: 8px;\n\n cursor: pointer;\n &:disabled {\n cursor: default;\n pointer-events: none;\n }\n\n font: inherit;\n text-decoration: none;\n "]))),
|
|
63
63
|
COLOR_TO_BUTTON_STYLE(theme, color),
|
|
64
64
|
SIZE_TO_BUTTON_STYLE[size],
|
|
65
65
|
], disabled: disabled, onClick: onClick }, { children: [startIcon, _jsx(Label, __assign({ size: size }, { children: label })), endIcon] })));
|
|
66
66
|
});
|
|
67
|
-
var Label = styled.span(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n font-weight: 400;\n ", "\n"], ["\n font-weight: 400;\n ", "\n"])), function (_a) {
|
|
67
|
+
var Label = styled.span(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n font-weight: 400;\n white-space: nowrap;\n ", "\n"], ["\n font-weight: 400;\n white-space: nowrap;\n ", "\n"])), function (_a) {
|
|
68
68
|
var size = _a.size;
|
|
69
69
|
return SIZE_TO_LABEL_STYLE[size];
|
|
70
70
|
});
|
package/dist/icons/arrows.d.ts
CHANGED
|
@@ -11,6 +11,18 @@ export declare const ArrowDownFillIcon: (props: {
|
|
|
11
11
|
export declare const ArrowUpFillIcon: (props: {
|
|
12
12
|
className?: string;
|
|
13
13
|
}) => JSX.Element;
|
|
14
|
+
export declare const ArrowRightFillIcon: (props: {
|
|
15
|
+
className?: string;
|
|
16
|
+
}) => JSX.Element;
|
|
17
|
+
export declare const ArrowLeftFillIcon: (props: {
|
|
18
|
+
className?: string;
|
|
19
|
+
}) => JSX.Element;
|
|
14
20
|
export declare const ArrowRightSLineIcon: (props: {
|
|
15
21
|
className?: string;
|
|
16
22
|
}) => JSX.Element;
|
|
23
|
+
export declare const ArrowLeftLineIcon: (props: {
|
|
24
|
+
className?: string;
|
|
25
|
+
}) => JSX.Element;
|
|
26
|
+
export declare const ArrowRightLineIcon: (props: {
|
|
27
|
+
className?: string;
|
|
28
|
+
}) => JSX.Element;
|
package/dist/icons/arrows.js
CHANGED
|
@@ -14,4 +14,8 @@ export var ArrowDropDownFillIcon = function (props) { return (_jsx("svg", __assi
|
|
|
14
14
|
export var ExpandUpDownIcon = function (props) { return (_jsx("svg", __assign({}, props, { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M18 9L12 3L6 9H18ZM18 15L12 21L6 15H18Z", fill: "currentColor" }) }))); };
|
|
15
15
|
export var ArrowDownFillIcon = function (props) { return (_jsx("svg", __assign({}, props, { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M13 12H20L12 20L4 12H11V4H13V12Z", fill: "currentColor" }) }))); };
|
|
16
16
|
export var ArrowUpFillIcon = function (props) { return (_jsx("svg", __assign({}, props, { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M13 12V20H11V12H4L12 4L20 12H13Z", fill: "currentColor" }) }))); };
|
|
17
|
+
export var ArrowRightFillIcon = function (props) { return (_jsx("svg", __assign({}, props, { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M12 13H4V11H12V4L20 12L12 20V13Z", fill: "currentColor" }) }))); };
|
|
18
|
+
export var ArrowLeftFillIcon = function (props) { return (_jsx("svg", __assign({}, props, { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M12 13V20L4 12L12 4V11H20V13H12Z", fill: "currentColor" }) }))); };
|
|
17
19
|
export var ArrowRightSLineIcon = function (props) { return (_jsx("svg", __assign({}, props, { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }, { children: _jsx("path", { d: "M13.1714 12.0007L8.22168 7.05093L9.63589 5.63672L15.9999 12.0007L9.63589 18.3646L8.22168 16.9504L13.1714 12.0007Z", fill: "currentColor" }) }))); };
|
|
20
|
+
export var ArrowLeftLineIcon = function (props) { return (_jsx("svg", __assign({}, props, { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }, { children: _jsx("path", { fill: "currentColor", d: "M7.828 11H20v2H7.828l5.364 5.364l-1.414 1.414L4 12l7.778-7.778l1.414 1.414L7.828 11Z" }) }))); };
|
|
21
|
+
export var ArrowRightLineIcon = function (props) { return (_jsx("svg", __assign({}, props, { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }, { children: _jsx("path", { fill: "currentColor", d: "m16.172 11l-5.364-5.364l1.414-1.414L20 12l-7.778 7.778l-1.414-1.414L16.172 13H4v-2h12.172Z" }) }))); };
|
package/dist/icons/system.d.ts
CHANGED
package/dist/icons/system.js
CHANGED
|
@@ -18,3 +18,4 @@ export var CheckboxCircleFillIcon = function (props) { return (_jsx("svg", __ass
|
|
|
18
18
|
export var EyeFillIcon = function (props) { return (_jsx("svg", __assign({}, props, { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12ZM12.0003 17C14.7617 17 17.0003 14.7614 17.0003 12C17.0003 9.23858 14.7617 7 12.0003 7C9.23884 7 7.00026 9.23858 7.00026 12C7.00026 14.7614 9.23884 17 12.0003 17ZM12.0003 15C10.3434 15 9.00026 13.6569 9.00026 12C9.00026 10.3431 10.3434 9 12.0003 9C13.6571 9 15.0003 10.3431 15.0003 12C15.0003 13.6569 13.6571 15 12.0003 15Z", fill: "currentColor" }) }))); };
|
|
19
19
|
export var InformationFillIcon = function (props) { return (_jsx("svg", __assign({}, props, { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 11V17H13V11H11ZM11 7V9H13V7H11Z", fill: "currentColor" }) }))); };
|
|
20
20
|
export var FilterFillIcon = function (props) { return (_jsx("svg", __assign({}, props, { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M21 4V6H20L14 15V22H10V15L4 6H3V4H21Z", fill: "currentColor" }) }))); };
|
|
21
|
+
export var CheckboxMultipleBlankLine = function (props) { return (_jsx("svg", __assign({}, props, { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }, { children: _jsx("path", { fill: "currentColor", d: "M7 7V3a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-4v3.992C17 21.55 16.551 22 15.992 22H3.008A1.006 1.006 0 0 1 2 20.992l.003-12.985C2.003 7.451 2.452 7 3.01 7H7Zm2 0h6.993C16.549 7 17 7.449 17 8.007V15h3V4H9v3ZM4.003 9L4 20h11V9H4.003Z" }) }))); };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ButtonProps } from "../../components/Button";
|
|
3
|
+
import { CheckboxInputProps } from "../../components/CheckboxInput";
|
|
4
|
+
import { TagProps } from "../../components/Tag";
|
|
5
|
+
import { TableRowProps, TableSize } from "../Table";
|
|
6
|
+
export interface CardProps {
|
|
7
|
+
className?: string;
|
|
8
|
+
component?: React.ElementType;
|
|
9
|
+
/** 카드의 상위 요소의 width 전체 차지 여부 */
|
|
10
|
+
fullWidth?: boolean;
|
|
11
|
+
/** 썸네일 사진의 경로. 지정하지 않으면 썸네일이 없습니다. */
|
|
12
|
+
thumbnail?: string;
|
|
13
|
+
/** 썸네일의 높이 */
|
|
14
|
+
thumbnailHeight?: number;
|
|
15
|
+
/** 제목 아이콘 */
|
|
16
|
+
titleIcon?: React.ReactNode;
|
|
17
|
+
/** 제목. 미지정시 공간을 차지하지 않습니다. */
|
|
18
|
+
title?: string;
|
|
19
|
+
/** 부제목. 미지정시 공간을 차지하지 않습니다. */
|
|
20
|
+
subtitle?: string;
|
|
21
|
+
/** 제목 아이콘 row와 제목의 inline 여부 */
|
|
22
|
+
titleInline?: boolean;
|
|
23
|
+
/** 제목 아이콘 row에 들어가는 태그 props의 배열. 미지정시 태그가 없습니다. */
|
|
24
|
+
tagsProps?: TagProps[];
|
|
25
|
+
/** 제목 아이콘 row에 들어가는 체크박스 props. 미지정시 체크박스가 없습니다. */
|
|
26
|
+
checkboxProps?: CheckboxInputProps;
|
|
27
|
+
/** 카드 리스트 영역의 table cell size */
|
|
28
|
+
tableSize?: TableSize;
|
|
29
|
+
/** 카드 리스트 영역의 table row props의 배열. 미지정시 리스트가 노출되지 않습니다. */
|
|
30
|
+
tableRowsProps?: (Omit<TableRowProps, "children"> & {
|
|
31
|
+
rowData: React.ReactNode;
|
|
32
|
+
})[];
|
|
33
|
+
/** 카드 하단 버튼의 props 배열 */
|
|
34
|
+
buttonsProps?: ButtonProps[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* [피그마](https://www.figma.com/file/PnQp3tPxiCjgsPZfLUaUL1/Codle-PD-Kit---Patterns?type=design&node-id=181-93325&t=fCBWLZGGE9mwFqvg-0)
|
|
38
|
+
*/
|
|
39
|
+
export default function Card(props: CardProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
|
+
var t = {};
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
+
t[p[i]] = s[p[i]];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
};
|
|
27
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
|
|
28
|
+
/** @jsxImportSource @emotion/react */
|
|
29
|
+
import { css, useTheme } from "@emotion/react";
|
|
30
|
+
import shadows from "../../foundation/shadows";
|
|
31
|
+
import styled from "@emotion/styled";
|
|
32
|
+
import Button from "../../components/Button";
|
|
33
|
+
import CheckboxInput from "../../components/CheckboxInput";
|
|
34
|
+
import Tag from "../../components/Tag";
|
|
35
|
+
import { Table, TableBody, TableCell, TableRow, } from "../Table";
|
|
36
|
+
/**
|
|
37
|
+
* [피그마](https://www.figma.com/file/PnQp3tPxiCjgsPZfLUaUL1/Codle-PD-Kit---Patterns?type=design&node-id=181-93325&t=fCBWLZGGE9mwFqvg-0)
|
|
38
|
+
*/
|
|
39
|
+
export default function Card(props) {
|
|
40
|
+
var className = props.className, _a = props.component, Component = _a === void 0 ? "div" : _a, fullWidth = props.fullWidth, thumbnail = props.thumbnail, _b = props.thumbnailHeight, thumbnailHeight = _b === void 0 ? 150 : _b, titleIcon = props.titleIcon, title = props.title, subtitle = props.subtitle, titleInline = props.titleInline, tagsProps = props.tagsProps, checkboxProps = props.checkboxProps, tableSize = props.tableSize, tableRowsProps = props.tableRowsProps, buttonsProps = props.buttonsProps;
|
|
41
|
+
var theme = useTheme();
|
|
42
|
+
return (_jsxs(Component, __assign({ className: className, css: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n box-shadow: ", ";\n border-radius: 16px;\n width: ", ";\n "], ["\n background-color: ", ";\n border: 1px solid ", ";\n box-shadow: ", ";\n border-radius: 16px;\n width: ", ";\n "])), theme.color.background.neutralBase, theme.color.background.neutralAlt, shadows.shadow04, fullWidth ? "100%" : "380px") }, { children: [thumbnail && _jsx(StyledImg, { src: thumbnail, height: thumbnailHeight }), _jsxs(CardContainer, { children: [titleInline ? (_jsxs(_Fragment, { children: [(titleIcon || title || tagsProps || checkboxProps) && (_jsxs(CardHeader, { children: [_jsxs(CardHeaderLeftWrapper, { children: [titleIcon && _jsx(IconContainer, { children: titleIcon }), _jsx(TitleContainer, { children: title })] }), _jsxs(CardHeaderRightWrapper, { children: [_jsx(TagsWrapper, { children: tagsProps === null || tagsProps === void 0 ? void 0 : tagsProps.map(function (tagProps, index) { return (_jsx(Tag, __assign({}, tagProps), index)); }) }), checkboxProps && _jsx(StyledCheckboxInput, __assign({}, checkboxProps))] })] })), subtitle &&
|
|
43
|
+
(titleIcon ? (_jsxs(SubHeader, { children: [_jsx(Spacer, {}), _jsx(SubTitleContainer, { children: subtitle })] })) : (_jsx(SubTitleContainer, __assign({ fullwidth: true }, { children: subtitle }))))] })) : (_jsxs(_Fragment, { children: [(titleIcon || tagsProps || checkboxProps) && (_jsxs(CardHeader, { children: [_jsx(CardHeaderLeftWrapper, { children: titleIcon && _jsx(IconContainer, { children: titleIcon }) }), _jsxs(CardHeaderRightWrapper, { children: [_jsx(TagsWrapper, { children: tagsProps === null || tagsProps === void 0 ? void 0 : tagsProps.map(function (tagProps, index) { return (_jsx(Tag, __assign({}, tagProps), index)); }) }), checkboxProps && _jsx(StyledCheckboxInput, __assign({}, checkboxProps))] })] })), title && _jsx(TitleContainer, { children: title }), subtitle && (_jsx(SubTitleContainer, __assign({ fullwidth: true }, { children: subtitle })))] })), tableRowsProps && (_jsx(Table, __assign({ size: tableSize !== null && tableSize !== void 0 ? tableSize : "small", css: css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-top: 20px;\n border-right: none;\n border-left: none;\n "], ["\n margin-top: 20px;\n border-right: none;\n border-left: none;\n "]))), fullWidth: true }, { children: _jsx(TableBody, { children: tableRowsProps.map(function (rowProps, index) {
|
|
44
|
+
var rowData = rowProps.rowData, rowPropsWithoutRowData = __rest(rowProps, ["rowData"]);
|
|
45
|
+
return (_jsx(TableRow, __assign({}, rowPropsWithoutRowData, { children: _jsx(TableCell, { children: rowData }) }), index));
|
|
46
|
+
}) }) })))] }), buttonsProps && (_jsx(CardFooter, { children: _jsx(ButtonsContainer, { children: buttonsProps === null || buttonsProps === void 0 ? void 0 : buttonsProps.map(function (buttonProps, index) { return (_jsx(Button, __assign({}, buttonProps), index)); }) }) }))] })));
|
|
47
|
+
}
|
|
48
|
+
var TagsWrapper = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 4px;\n gap: 8px;\n"], ["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 4px;\n gap: 8px;\n"])));
|
|
49
|
+
var StyledCheckboxInput = styled(CheckboxInput)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin: 4px;\n"], ["\n margin: 4px;\n"])));
|
|
50
|
+
var CardFooter = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n justify-content: right;\n flex-direction: row;\n align-items: flex-start;\n padding: 0px 12px 12px;\n"], ["\n display: flex;\n justify-content: right;\n flex-direction: row;\n align-items: flex-start;\n padding: 0px 12px 12px;\n"])));
|
|
51
|
+
var ButtonsContainer = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n padding: 4px;\n gap: 8px;\n"], ["\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n padding: 4px;\n gap: 8px;\n"])));
|
|
52
|
+
var SubTitleContainer = styled.div(function (_a) {
|
|
53
|
+
var theme = _a.theme, fullwidth = _a.fullwidth;
|
|
54
|
+
return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n width: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 14px;\n font-weight: 500;\n line-height: 16px;\n gap: 8px;\n color: ", ";\n "], ["\n width: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 14px;\n font-weight: 500;\n line-height: 16px;\n gap: 8px;\n color: ", ";\n "])), fullwidth ? "100%" : "auto", theme.color.foreground.neutralBaseDisabled);
|
|
55
|
+
});
|
|
56
|
+
var SubHeader = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n width: 100%;\n height: auto;\n gap: 8px;\n"], ["\n display: flex;\n width: 100%;\n height: auto;\n gap: 8px;\n"])));
|
|
57
|
+
var TitleContainer = styled.div(function (_a) {
|
|
58
|
+
var theme = _a.theme;
|
|
59
|
+
return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 20px;\n font-weight: 900;\n line-height: 28px;\n color: ", ";\n "], ["\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 20px;\n font-weight: 900;\n line-height: 28px;\n color: ", ";\n "])), theme.color.foreground.neutralBase);
|
|
60
|
+
});
|
|
61
|
+
var Spacer = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n width: 32px;\n height: 32px;\n"], ["\n width: 32px;\n height: 32px;\n"])));
|
|
62
|
+
var IconContainer = styled.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n width: 32px;\n height: 32px;\n align-items: center;\n justify-content: center;\n"], ["\n width: 32px;\n height: 32px;\n align-items: center;\n justify-content: center;\n"])));
|
|
63
|
+
var CardHeaderLeftWrapper = styled.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 0px;\n gap: 8px;\n overflow: hidden;\n white-space: nowrap;\n"], ["\n display: flex;\n align-items: center;\n padding: 0px;\n gap: 8px;\n overflow: hidden;\n white-space: nowrap;\n"])));
|
|
64
|
+
var CardHeaderRightWrapper = styled.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0px;\n gap: 4px;\n"], ["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0px;\n gap: 4px;\n"])));
|
|
65
|
+
var CardHeader = styled.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n display: flex;\n width: 100%;\n height: auto;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 6px 0px;\n gap: 10px;\n"], ["\n display: flex;\n width: 100%;\n height: auto;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 6px 0px;\n gap: 10px;\n"])));
|
|
66
|
+
var CardContainer = styled.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 16px 24px 24px;\n gap: 4px;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 16px 24px 24px;\n gap: 4px;\n"])));
|
|
67
|
+
var StyledImg = styled.img(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n object-fit: cover;\n width: 100%;\n height: ", "px;\n border-top-left-radius: 16px;\n border-top-right-radius: 16px;\n overflow: hidden;\n"], ["\n object-fit: cover;\n width: 100%;\n height: ", "px;\n border-top-left-radius: 16px;\n border-top-right-radius: 16px;\n overflow: hidden;\n"])), function (props) { return props.height; });
|
|
68
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DialogProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
component?: React.ElementType;
|
|
5
|
+
/** `true` 값일때 모달이 노출됩니다. */
|
|
6
|
+
open: boolean;
|
|
7
|
+
/** 모달이 닫힐 때 호출되는 callback */
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
/** 모달의 내용으로 표기될 값 */
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare function Dialog(props: DialogProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
17
|
+
/** @jsxImportSource @emotion/react */
|
|
18
|
+
import { Modal as MuiModal } from "@mui/material";
|
|
19
|
+
import { css, useTheme } from "@emotion/react";
|
|
20
|
+
import shadows from "../../foundation/shadows";
|
|
21
|
+
export function Dialog(props) {
|
|
22
|
+
var className = props.className, _a = props.component, Component = _a === void 0 ? "div" : _a, open = props.open, onClose = props.onClose, children = props.children;
|
|
23
|
+
var theme = useTheme();
|
|
24
|
+
return (_jsx(MuiModal, __assign({ open: open, onClose: onClose }, { children: _jsx(Component, __assign({ className: className, css: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n box-shadow: ", ";\n border-radius: 16px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: 24px;\n box-sizing: border-box;\n\n display: flex;\n width: 800px;\n height: 600px;\n padding: 16px 0px;\n flex-direction: column;\n gap: 12px;\n "], ["\n background: ", ";\n box-shadow: ", ";\n border-radius: 16px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: 24px;\n box-sizing: border-box;\n\n display: flex;\n width: 800px;\n height: 600px;\n padding: 16px 0px;\n flex-direction: column;\n gap: 12px;\n "])), theme.color.background.neutralBase, shadows.shadow04) }, { children: children })) })));
|
|
25
|
+
}
|
|
26
|
+
var templateObject_1;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DialogContentProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
component?: React.ElementType;
|
|
5
|
+
/** Content 내용으로 표기될 값 */
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare function DialogContent(props: DialogContentProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
17
|
+
/** @jsxImportSource @emotion/react */
|
|
18
|
+
import { css } from "@emotion/react";
|
|
19
|
+
export function DialogContent(props) {
|
|
20
|
+
var className = props.className, _a = props.component, Component = _a === void 0 ? "div" : _a, children = props.children;
|
|
21
|
+
return (_jsx(Component, __assign({ className: className, css: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n padding: 0px 24px;\n align-items: flex-start;\n gap: 24px;\n "], ["\n display: flex;\n padding: 0px 24px;\n align-items: flex-start;\n gap: 24px;\n "]))) }, { children: children })));
|
|
22
|
+
}
|
|
23
|
+
var templateObject_1;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface DialogNavigationProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
component?: React.ElementType;
|
|
5
|
+
/** 현재 선택된 값 */
|
|
6
|
+
value: string;
|
|
7
|
+
/** DialogNavigationItem이 클릭될 때 호출되는 함수 */
|
|
8
|
+
onChange: (newValue: string) => void;
|
|
9
|
+
/** Content 내용으로 표기될 값 */
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare function DialogNavigation(props: DialogNavigationProps): JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
import styled from "@emotion/styled";
|
|
18
|
+
import { NavigationVertical } from "../Navigation";
|
|
19
|
+
import { DialogNavigationContext } from "./DialogNavigationContext";
|
|
20
|
+
export function DialogNavigation(props) {
|
|
21
|
+
var value = props.value, onChange = props.onChange;
|
|
22
|
+
return (_jsx(DialogNavigationContext.Provider, __assign({ value: { value: value, onChange: onChange } }, { children: _jsx(StyledNavigationVertical, __assign({}, props, { size: "small" })) })));
|
|
23
|
+
}
|
|
24
|
+
var StyledNavigationVertical = styled(NavigationVertical)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 160px;\n"], ["\n width: 160px;\n"])));
|
|
25
|
+
var templateObject_1;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface DialogNavigationItemProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
component?: React.ElementType;
|
|
5
|
+
/** 표기될 문구 */
|
|
6
|
+
label: string;
|
|
7
|
+
/** 이 아이템이 대표하는 값 */
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function DialogNavigationItem(props: DialogNavigationItemProps): JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { useContext } from "react";
|
|
14
|
+
import { NavigationItem } from "../Navigation";
|
|
15
|
+
import { DialogNavigationContext } from "./DialogNavigationContext";
|
|
16
|
+
export function DialogNavigationItem(props) {
|
|
17
|
+
return (_jsx(NavigationItem, { component: NavigationItemComponent, to: props.value, label: props.label }));
|
|
18
|
+
}
|
|
19
|
+
function NavigationItemComponent(props) {
|
|
20
|
+
var to = props.to;
|
|
21
|
+
var _a = useContext(DialogNavigationContext), value = _a.value, onChange = _a.onChange;
|
|
22
|
+
return (_jsx("span", __assign({ onClick: function () {
|
|
23
|
+
onChange(to);
|
|
24
|
+
} }, { children: props.children({ isActive: value === to }) })));
|
|
25
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface DialogPanelProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
component?: React.ElementType;
|
|
5
|
+
/** Content 내용으로 표기될 값 */
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/** 이 패널이 활성화 될 값 */
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function DialogPanel(props: DialogPanelProps): React.ReactElement;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
|
|
17
|
+
/** @jsxImportSource @emotion/react */
|
|
18
|
+
import { css } from "@emotion/react";
|
|
19
|
+
import { useContext } from "react";
|
|
20
|
+
import { DialogPanelsContext } from "./DialogPanelsContext";
|
|
21
|
+
export function DialogPanel(props) {
|
|
22
|
+
var className = props.className, _a = props.component, Component = _a === void 0 ? "div" : _a, children = props.children, value = props.value;
|
|
23
|
+
var _b = useContext(DialogPanelsContext), selectedValue = _b.value, renderStrategy = _b.renderStrategy;
|
|
24
|
+
if (renderStrategy === "hidden") {
|
|
25
|
+
return (_jsx(Component, __assign({ className: className, css: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: ", ";\n width: 100%;\n "], ["\n display: ", ";\n width: 100%;\n "])), value === selectedValue ? "block" : "none") }, { children: children })));
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return value === selectedValue ? (_jsx(Component, __assign({ className: className }, { children: children }))) : (_jsx(_Fragment, {}));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
var templateObject_1;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface DialogPanelsProps {
|
|
3
|
+
/** Content 내용으로 표기될 값 */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** 현재 선택된 값 */
|
|
6
|
+
value: string;
|
|
7
|
+
/** 활성화되지 않은 패널을 처리하는 전략
|
|
8
|
+
* hidden: display: none으로 가립니다.
|
|
9
|
+
* unmount: 컴포넌트를 unmount합니다.
|
|
10
|
+
*/
|
|
11
|
+
renderStrategy: "hidden" | "unmount";
|
|
12
|
+
}
|
|
13
|
+
export declare function DialogPanels(props: DialogPanelsProps): React.ReactElement;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { DialogPanelsContext } from "./DialogPanelsContext";
|
|
14
|
+
export function DialogPanels(props) {
|
|
15
|
+
var children = props.children, value = props.value, renderStrategy = props.renderStrategy;
|
|
16
|
+
return (_jsx(DialogPanelsContext.Provider, __assign({ value: { value: value, renderStrategy: renderStrategy } }, { children: children })));
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DialogTitleProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
component?: React.ElementType;
|
|
5
|
+
/**
|
|
6
|
+
* 제목의 X 버튼을 누르를 때 호출되는 callback.
|
|
7
|
+
* 이 속성이 전달되면 X 버튼을 Title 영역에 그립니다.
|
|
8
|
+
*/
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
/** Content 내용으로 표기될 값 */
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function DialogTitle(props: DialogTitleProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
|
|
17
|
+
/** @jsxImportSource @emotion/react */
|
|
18
|
+
import { css, useTheme } from "@emotion/react";
|
|
19
|
+
import SquareButton from "../../components/SquareButton";
|
|
20
|
+
import { CloseFillIcon } from "../../icons/system";
|
|
21
|
+
export function DialogTitle(props) {
|
|
22
|
+
var className = props.className, _a = props.component, Component = _a === void 0 ? "div" : _a, onClose = props.onClose, children = props.children;
|
|
23
|
+
var theme = useTheme();
|
|
24
|
+
return (_jsx(_Fragment, { children: _jsxs(Component, __assign({ className: className, css: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n padding: 0px 16px 0px 24px;\n justify-content: space-between;\n align-items: center;\n\n text-align: center;\n /* Alt/Paragraph/16px-Eb */\n font-size: 16px;\n font-family: NanumSquareNeo;\n font-weight: 800;\n line-height: 24px;\n color: ", ";\n "], ["\n display: flex;\n padding: 0px 16px 0px 24px;\n justify-content: space-between;\n align-items: center;\n\n text-align: center;\n /* Alt/Paragraph/16px-Eb */\n font-size: 16px;\n font-family: NanumSquareNeo;\n font-weight: 800;\n line-height: 24px;\n color: ", ";\n "])), theme.color.foreground.neutralBase) }, { children: [children, onClose && (_jsx(SquareButton, { color: "icon", size: "small", icon: _jsx(CloseFillIcon, {}), onClick: onClose }))] })) }));
|
|
25
|
+
}
|
|
26
|
+
var templateObject_1;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface NavigationHorizontalProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
component?: React.ElementType;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
size: "small" | "medium";
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* [피그마](https://www.figma.com/file/PnQp3tPxiCjgsPZfLUaUL1/Codle-PD-Kit---Patterns?node-id=181%3A92757)
|
|
10
|
+
*/
|
|
11
|
+
export declare function NavigationHorizontal(props: NavigationHorizontalProps): React.ReactElement;
|