@team-monolith/cds 0.2.11 → 0.3.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/package.json +1 -1
- package/src/cds/components/Button.tsx +0 -5
- package/src/cds/components/Input.tsx +7 -2
- package/src/cds/foundation/shadows.ts +1 -1
- package/src/cds/index.ts +1 -1
- package/dist/CodleDesignSystemProvider.d.ts +0 -69
- package/dist/CodleDesignSystemProvider.js +0 -96
- package/dist/components/AlertDialog/AlertDialog.d.ts +0 -14
- package/dist/components/AlertDialog/AlertDialog.js +0 -45
- package/dist/components/AlertDialog/AlertDialogActions.d.ts +0 -8
- package/dist/components/AlertDialog/AlertDialogActions.js +0 -35
- package/dist/components/AlertDialog/AlertDialogContent.d.ts +0 -8
- package/dist/components/AlertDialog/AlertDialogContent.js +0 -36
- package/dist/components/AlertDialog/AlertDialogTitle.d.ts +0 -13
- package/dist/components/AlertDialog/AlertDialogTitle.js +0 -38
- package/dist/components/AlertDialog/index.d.ts +0 -4
- package/dist/components/AlertDialog/index.js +0 -4
- package/dist/components/Banner.d.ts +0 -29
- package/dist/components/Banner.js +0 -65
- package/dist/components/Button.d.ts +0 -33
- package/dist/components/Button.js +0 -72
- package/dist/components/CheckboxInput.d.ts +0 -27
- package/dist/components/CheckboxInput.js +0 -77
- package/dist/components/Input.d.ts +0 -17
- package/dist/components/Input.js +0 -72
- package/dist/components/InputBase.d.ts +0 -42
- package/dist/components/InputBase.js +0 -52
- package/dist/components/Pagination.d.ts +0 -27
- package/dist/components/Pagination.js +0 -32
- package/dist/components/PinInput.d.ts +0 -36
- package/dist/components/PinInput.js +0 -154
- package/dist/components/RadioInput.d.ts +0 -23
- package/dist/components/RadioInput.js +0 -78
- package/dist/components/SquareButton.d.ts +0 -26
- package/dist/components/SquareButton.js +0 -80
- package/dist/components/Switch.d.ts +0 -19
- package/dist/components/Switch.js +0 -59
- package/dist/components/Tag.d.ts +0 -21
- package/dist/components/Tag.js +0 -61
- package/dist/components/Tooltip.d.ts +0 -26
- package/dist/components/Tooltip.js +0 -50
- package/dist/foundation/color.d.ts +0 -75
- package/dist/foundation/color.js +0 -75
- package/dist/foundation/shadows.d.ts +0 -9
- package/dist/foundation/shadows.js +0 -10
- package/dist/icons/Arrows/index.d.ts +0 -2
- package/dist/icons/Arrows/index.js +0 -2
- package/dist/icons/Media/index.d.ts +0 -2
- package/dist/icons/Media/index.js +0 -2
- package/dist/icons/System/index.d.ts +0 -2
- package/dist/icons/System/index.js +0 -2
- package/dist/icons/arrows.d.ts +0 -28
- package/dist/icons/arrows.js +0 -21
- package/dist/icons/brand.d.ts +0 -4
- package/dist/icons/brand.js +0 -13
- package/dist/icons/design.d.ts +0 -4
- package/dist/icons/design.js +0 -13
- package/dist/icons/map.d.ts +0 -4
- package/dist/icons/map.js +0 -13
- package/dist/icons/system.d.ts +0 -31
- package/dist/icons/system.js +0 -22
- package/dist/index.d.ts +0 -44
- package/dist/index.js +0 -44
- package/dist/patterns/Card/Card.d.ts +0 -39
- package/dist/patterns/Card/Card.js +0 -68
- package/dist/patterns/Card/class-icon.svg +0 -28
- package/dist/patterns/Card/index.d.ts +0 -2
- package/dist/patterns/Card/index.js +0 -2
- package/dist/patterns/Card/material-icon.svg +0 -25
- package/dist/patterns/Card/problem-icon.svg +0 -25
- package/dist/patterns/Card/thumbnail/sample.png +0 -0
- package/dist/patterns/Dialog/Dialog.d.ts +0 -12
- package/dist/patterns/Dialog/Dialog.js +0 -26
- package/dist/patterns/Dialog/DialogContent.d.ts +0 -8
- package/dist/patterns/Dialog/DialogContent.js +0 -23
- package/dist/patterns/Dialog/DialogNavigation.d.ts +0 -12
- package/dist/patterns/Dialog/DialogNavigation.js +0 -25
- package/dist/patterns/Dialog/DialogNavigationContext.d.ts +0 -5
- package/dist/patterns/Dialog/DialogNavigationContext.js +0 -5
- package/dist/patterns/Dialog/DialogNavigationItem.d.ts +0 -10
- package/dist/patterns/Dialog/DialogNavigationItem.js +0 -25
- package/dist/patterns/Dialog/DialogPanel.d.ts +0 -10
- package/dist/patterns/Dialog/DialogPanel.js +0 -31
- package/dist/patterns/Dialog/DialogPanels.d.ts +0 -13
- package/dist/patterns/Dialog/DialogPanels.js +0 -17
- package/dist/patterns/Dialog/DialogPanelsContext.d.ts +0 -5
- package/dist/patterns/Dialog/DialogPanelsContext.js +0 -5
- package/dist/patterns/Dialog/DialogTitle.d.ts +0 -13
- package/dist/patterns/Dialog/DialogTitle.js +0 -26
- package/dist/patterns/Dialog/index.d.ts +0 -7
- package/dist/patterns/Dialog/index.js +0 -7
- package/dist/patterns/Dropdown/Dropdown.d.ts +0 -27
- package/dist/patterns/Dropdown/Dropdown.js +0 -41
- package/dist/patterns/Dropdown/DropdownItem.d.ts +0 -42
- package/dist/patterns/Dropdown/DropdownItem.js +0 -89
- package/dist/patterns/Dropdown/DropdownMenu.d.ts +0 -30
- package/dist/patterns/Dropdown/DropdownMenu.js +0 -85
- package/dist/patterns/Dropdown/index.d.ts +0 -2
- package/dist/patterns/Dropdown/index.js +0 -2
- package/dist/patterns/EmptyState/EmptyState.d.ts +0 -16
- package/dist/patterns/EmptyState/EmptyState.js +0 -36
- package/dist/patterns/EmptyState/empty-state-icon.svg +0 -36
- package/dist/patterns/EmptyState/index.d.ts +0 -2
- package/dist/patterns/EmptyState/index.js +0 -2
- package/dist/patterns/Navigation/NavigationContext.d.ts +0 -5
- package/dist/patterns/Navigation/NavigationContext.js +0 -5
- package/dist/patterns/Navigation/NavigationHorizontal.d.ts +0 -11
- package/dist/patterns/Navigation/NavigationHorizontal.js +0 -27
- package/dist/patterns/Navigation/NavigationItem.d.ts +0 -9
- package/dist/patterns/Navigation/NavigationItem.js +0 -33
- package/dist/patterns/Navigation/NavigationVertical.d.ts +0 -14
- package/dist/patterns/Navigation/NavigationVertical.js +0 -27
- package/dist/patterns/Navigation/index.d.ts +0 -3
- package/dist/patterns/Navigation/index.js +0 -3
- package/dist/patterns/SegmentedControl/SegmentedControlButton.d.ts +0 -8
- package/dist/patterns/SegmentedControl/SegmentedControlButton.js +0 -41
- package/dist/patterns/SegmentedControl/SegmentedControlGroup.d.ts +0 -26
- package/dist/patterns/SegmentedControl/SegmentedControlGroup.js +0 -50
- package/dist/patterns/SegmentedControl/SegmentedControlGroupPropsContext.d.ts +0 -5
- package/dist/patterns/SegmentedControl/SegmentedControlGroupPropsContext.js +0 -5
- package/dist/patterns/SegmentedControl/SegmentedControlSquareButton.d.ts +0 -8
- package/dist/patterns/SegmentedControl/SegmentedControlSquareButton.js +0 -45
- package/dist/patterns/SegmentedControl/index.d.ts +0 -3
- package/dist/patterns/SegmentedControl/index.js +0 -3
- package/dist/patterns/Table/Table.d.ts +0 -18
- package/dist/patterns/Table/Table.js +0 -33
- package/dist/patterns/Table/TableBody.d.ts +0 -8
- package/dist/patterns/Table/TableBody.js +0 -26
- package/dist/patterns/Table/TableCell.d.ts +0 -15
- package/dist/patterns/Table/TableCell.js +0 -78
- package/dist/patterns/Table/TableHead.d.ts +0 -8
- package/dist/patterns/Table/TableHead.js +0 -26
- package/dist/patterns/Table/TablePropsContext.d.ts +0 -7
- package/dist/patterns/Table/TablePropsContext.js +0 -3
- package/dist/patterns/Table/TableRow.d.ts +0 -14
- package/dist/patterns/Table/TableRow.js +0 -34
- package/dist/patterns/Table/TableVariantContext.d.ts +0 -6
- package/dist/patterns/Table/TableVariantContext.js +0 -3
- package/dist/patterns/Table/index.d.ts +0 -7
- package/dist/patterns/Table/index.js +0 -6
- package/dist/svg.d.ts +0 -10
- package/dist/utils/hover.d.ts +0 -3
- package/dist/utils/hover.js +0 -14
- package/dist/utils/reset.d.ts +0 -2
- package/dist/utils/reset.js +0 -8
- package/dist/utils/zIndex.d.ts +0 -3
- package/dist/utils/zIndex.js +0 -3
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SquareButtonProps } from "../../components/SquareButton";
|
|
2
|
-
export interface SegmentedControlSquareButtonProps extends Omit<SquareButtonProps, "color" | "size"> {
|
|
3
|
-
value: string;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* [피그마](https://www.figma.com/file/PnQp3tPxiCjgsPZfLUaUL1/Codle-PD-Kit---Patterns?node-id=181%3A89883)
|
|
7
|
-
*/
|
|
8
|
-
export declare function SegmentedControlSquareButton(props: SegmentedControlSquareButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,45 +0,0 @@
|
|
|
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 styled from "@emotion/styled";
|
|
19
|
-
import { useContext } from "react";
|
|
20
|
-
import SquareButton from "../../components/SquareButton";
|
|
21
|
-
import shadows from "../../foundation/shadows";
|
|
22
|
-
import { SegmentedControlGroupPropsContext } from "./SegmentedControlGroupPropsContext";
|
|
23
|
-
/**
|
|
24
|
-
* [피그마](https://www.figma.com/file/PnQp3tPxiCjgsPZfLUaUL1/Codle-PD-Kit---Patterns?node-id=181%3A89883)
|
|
25
|
-
*/
|
|
26
|
-
export function SegmentedControlSquareButton(props) {
|
|
27
|
-
var context = useContext(SegmentedControlGroupPropsContext);
|
|
28
|
-
var isActive = context.multiSelect
|
|
29
|
-
? context.value.includes(props.value)
|
|
30
|
-
: context.value === props.value;
|
|
31
|
-
return (_jsx(StyledSquareButton, __assign({}, props, { isActive: isActive, color: isActive ? "primary" : "icon", size: context.size, fullWidth: context.fullWidth, onClick: function () {
|
|
32
|
-
var _a;
|
|
33
|
-
if (context.onClick) {
|
|
34
|
-
context.onClick(props.value);
|
|
35
|
-
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
36
|
-
}
|
|
37
|
-
} })));
|
|
38
|
-
}
|
|
39
|
-
var StyledSquareButton = styled(SquareButton, {
|
|
40
|
-
shouldForwardProp: function (prop) { return prop !== "isActive"; },
|
|
41
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n flex-grow: 1;\n button {\n ", "\n }\n"], ["\n display: flex;\n justify-content: center;\n flex-grow: 1;\n button {\n ", "\n }\n"])), function (_a) {
|
|
42
|
-
var isActive = _a.isActive;
|
|
43
|
-
return isActive && "box-shadow: ".concat(shadows.shadow04, ";");
|
|
44
|
-
});
|
|
45
|
-
var templateObject_1;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export type TableSize = "large" | "medium" | "small";
|
|
3
|
-
export interface TableProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
component?: React.ElementType;
|
|
6
|
-
/** Table의 내용입니다. 일반적으로 `TableHead`와 `TableBody`로 구성됩니다. */
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
/** Table Row 사이즈 */
|
|
9
|
-
size: TableSize;
|
|
10
|
-
/** fullWidth 여부 */
|
|
11
|
-
fullWidth?: boolean;
|
|
12
|
-
/** `true`일 때 상호작용이 불가하며, 글자가 회색 처리됩니다. */
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* [피그마](https://www.figma.com/file/PnQp3tPxiCjgsPZfLUaUL1/Codle-PD-Kit---Patterns?type=design&node-id=181-91732&t=07ngLzGHuU3xxg4S-0)
|
|
17
|
-
*/
|
|
18
|
-
export default function Table(props: TableProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,33 +0,0 @@
|
|
|
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, useTheme } from "@emotion/react";
|
|
19
|
-
import { RESET_TABLE } from "../../utils/reset";
|
|
20
|
-
import TablePropsContext from "./TablePropsContext";
|
|
21
|
-
/**
|
|
22
|
-
* [피그마](https://www.figma.com/file/PnQp3tPxiCjgsPZfLUaUL1/Codle-PD-Kit---Patterns?type=design&node-id=181-91732&t=07ngLzGHuU3xxg4S-0)
|
|
23
|
-
*/
|
|
24
|
-
export default function Table(props) {
|
|
25
|
-
var className = props.className, _a = props.component, Component = _a === void 0 ? "table" : _a, children = props.children, size = props.size, disabled = props.disabled, fullWidth = props.fullWidth;
|
|
26
|
-
var theme = useTheme();
|
|
27
|
-
return (_jsx(Component, __assign({ className: className, css: [
|
|
28
|
-
RESET_TABLE,
|
|
29
|
-
css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-collapse: separate;\n\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n border-radius: 4px;\n "], ["\n border-collapse: separate;\n\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n border-radius: 4px;\n "])), theme.color.background.neutralBase, theme.color.background.neutralAlt, theme.color.foreground.neutralBase),
|
|
30
|
-
fullWidth && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n "], ["\n width: 100%;\n "]))),
|
|
31
|
-
] }, { children: _jsx(TablePropsContext.Provider, __assign({ value: { size: size, disabled: disabled } }, { children: children })) })));
|
|
32
|
-
}
|
|
33
|
-
var templateObject_1, templateObject_2;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface TableBodyProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
component?: React.ElementType;
|
|
5
|
-
/** Table의 내용입니다. 일반적으로 TableRow로 구성됩니다. */
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export default function TableBody(props: TableBodyProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
import TableVariantContext from "./TableVariantContext";
|
|
20
|
-
export default function TableBody(props) {
|
|
21
|
-
var className = props.className, _a = props.component, Component = _a === void 0 ? "tbody" : _a, children = props.children;
|
|
22
|
-
return (_jsx(Component, __assign({ className: className, css: [
|
|
23
|
-
css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: table-row-group;\n "], ["\n display: table-row-group;\n "]))),
|
|
24
|
-
] }, { children: _jsx(TableVariantContext.Provider, __assign({ value: { variant: "body" } }, { children: children })) })));
|
|
25
|
-
}
|
|
26
|
-
var templateObject_1;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface TableCellProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
component?: React.ElementType;
|
|
5
|
-
colSpan?: number;
|
|
6
|
-
sort?: "asc" | "desc" | "none";
|
|
7
|
-
isFilterActive?: boolean;
|
|
8
|
-
onClick?: () => void;
|
|
9
|
-
onSortClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
10
|
-
onFilterClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
11
|
-
filterButttonRef?: React.MutableRefObject<HTMLButtonElement | null>;
|
|
12
|
-
/** Cell의 내용입니다. */
|
|
13
|
-
children?: React.ReactNode;
|
|
14
|
-
}
|
|
15
|
-
export default function TableCell(props: TableCellProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,78 +0,0 @@
|
|
|
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 React, { useContext } from "react";
|
|
20
|
-
import TableVariantContext from "./TableVariantContext";
|
|
21
|
-
import TablePropsContext from "./TablePropsContext";
|
|
22
|
-
import { ArrowDownFillIcon, ArrowUpFillIcon, ExpandUpDownIcon, } from "../../icons/arrows";
|
|
23
|
-
import styled from "@emotion/styled";
|
|
24
|
-
import { RESET_BUTTON } from "../../utils/reset";
|
|
25
|
-
import { FilterFillIcon } from "../../icons/system";
|
|
26
|
-
var SIZE_TO_STYLES = function (size) {
|
|
27
|
-
return ({
|
|
28
|
-
small: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 8px 8px;\n "], ["\n padding: 8px 8px;\n "]))),
|
|
29
|
-
medium: css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 12px 8px;\n "], ["\n padding: 12px 8px;\n "]))),
|
|
30
|
-
large: css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding: 16px 8px;\n "], ["\n padding: 16px 8px;\n "]))),
|
|
31
|
-
}[size]);
|
|
32
|
-
};
|
|
33
|
-
export default function TableCell(props) {
|
|
34
|
-
var className = props.className, Component = props.component, children = props.children, sort = props.sort, colSpan = props.colSpan, isFilterActive = props.isFilterActive, onFilterClick = props.onFilterClick, onClick = props.onClick, onSortClick = props.onSortClick, filterButttonRef = props.filterButttonRef;
|
|
35
|
-
// variant 값에 따라 th 태그로 그릴지, td 태그로 그릴지를 결정합니다.
|
|
36
|
-
var variant = useContext(TableVariantContext).variant;
|
|
37
|
-
var Element = (Component !== null && Component !== void 0 ? Component : variant === "head") ? "th" : "td";
|
|
38
|
-
var _a = useContext(TablePropsContext), size = _a.size, disabled = _a.disabled;
|
|
39
|
-
var theme = useTheme();
|
|
40
|
-
if (variant === "body") {
|
|
41
|
-
return (_jsx(Element, __assign({ colSpan: colSpan, className: className, onClick: onClick, css: [
|
|
42
|
-
SIZE_TO_STYLES(size !== null && size !== void 0 ? size : "medium"),
|
|
43
|
-
css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 24px;\n "], ["\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 24px;\n "]))),
|
|
44
|
-
css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: table-cell;\n text-align: initial;\n\n &:first-of-type {\n padding-left: 16px;\n }\n\n &:last-of-type {\n padding-right: 16px;\n }\n "], ["\n display: table-cell;\n text-align: initial;\n\n &:first-of-type {\n padding-left: 16px;\n }\n\n &:last-of-type {\n padding-right: 16px;\n }\n "]))),
|
|
45
|
-
] }, { children: children })));
|
|
46
|
-
}
|
|
47
|
-
return (_jsx(Element, __assign({ colSpan: colSpan, className: className, onClick: onClick, css: [
|
|
48
|
-
SIZE_TO_STYLES(size !== null && size !== void 0 ? size : "medium"),
|
|
49
|
-
Element === "th"
|
|
50
|
-
? css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background: ", ";\n font-style: normal;\n font-weight: 500;\n font-size: 14px;\n line-height: 16px;\n "], ["\n background: ", ";\n font-style: normal;\n font-weight: 500;\n font-size: 14px;\n line-height: 16px;\n "])), theme.color.background.neutralAlt) : css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 24px;\n "], ["\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 24px;\n "]))),
|
|
51
|
-
css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: table-cell;\n text-align: initial;\n\n &:first-of-type {\n padding-left: 16px;\n }\n\n &:last-of-type {\n padding-right: 16px;\n }\n "], ["\n display: table-cell;\n text-align: initial;\n\n &:first-of-type {\n padding-left: 16px;\n }\n\n &:last-of-type {\n padding-right: 16px;\n }\n "]))),
|
|
52
|
-
] }, { children: _jsxs(Cell, { children: [children, _jsxs(Buttons, { children: [sort && (_jsx(SortButton, { sort: sort, onSortClick: onSortClick, disabled: disabled })), isFilterActive !== undefined && (_jsx(FilterButton, { isFilterActive: isFilterActive !== null && isFilterActive !== void 0 ? isFilterActive : false, onFilterClick: onFilterClick, ref: filterButttonRef, disabled: disabled }))] })] }) })));
|
|
53
|
-
}
|
|
54
|
-
var Cell = styled.span(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"], ["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
55
|
-
var Buttons = styled.span(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n display: flex;\n gap: 4px;\n"], ["\n display: flex;\n gap: 4px;\n"])));
|
|
56
|
-
var SortButton = function (props) {
|
|
57
|
-
var sortIcon = _jsx(_Fragment, {});
|
|
58
|
-
switch (props.sort) {
|
|
59
|
-
case "asc":
|
|
60
|
-
sortIcon = _jsx(ArrowDownFillIcon, {});
|
|
61
|
-
break;
|
|
62
|
-
case "desc":
|
|
63
|
-
sortIcon = _jsx(ArrowUpFillIcon, {});
|
|
64
|
-
break;
|
|
65
|
-
case "none":
|
|
66
|
-
sortIcon = _jsx(ExpandUpDownIcon, {});
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
return (_jsx("button", __assign({ disabled: props.disabled, onClick: props.onSortClick, css: css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n ", "\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 6px;\n\n cursor: pointer;\n\n svg {\n width: 12px;\n height: 12px;\n }\n "], ["\n ", "\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 6px;\n\n cursor: pointer;\n\n svg {\n width: 12px;\n height: 12px;\n }\n "])), RESET_BUTTON) }, { children: sortIcon })));
|
|
70
|
-
};
|
|
71
|
-
var FilterButton = React.forwardRef(function (props, ref) {
|
|
72
|
-
var theme = useTheme();
|
|
73
|
-
return (_jsx("button", __assign({ ref: ref, disabled: props.disabled, onClick: props.onFilterClick, css: [
|
|
74
|
-
css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n ", "\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 6px;\n\n cursor: pointer;\n\n svg {\n width: 12px;\n height: 12px;\n }\n "], ["\n ", "\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 6px;\n\n cursor: pointer;\n\n svg {\n width: 12px;\n height: 12px;\n }\n "])), RESET_BUTTON),
|
|
75
|
-
props.isFilterActive && css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), theme.color.foreground.primary),
|
|
76
|
-
] }, { children: _jsx(FilterFillIcon, {}) })));
|
|
77
|
-
});
|
|
78
|
-
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;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface TableHeadProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
component?: React.ElementType;
|
|
5
|
-
/** Table의 내용입니다. 일반적으로 TableRow로 구성됩니다. */
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export default function TableHead(props: TableHeadProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
import TableVariantContext from "./TableVariantContext";
|
|
20
|
-
export default function TableHead(props) {
|
|
21
|
-
var className = props.className, _a = props.component, Component = _a === void 0 ? "thead" : _a, children = props.children;
|
|
22
|
-
return (_jsx(Component, __assign({ className: className, css: [
|
|
23
|
-
css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: table-header-group;\n "], ["\n display: table-header-group;\n "]))),
|
|
24
|
-
] }, { children: _jsx(TableVariantContext.Provider, __assign({ value: { variant: "head" } }, { children: children })) })));
|
|
25
|
-
}
|
|
26
|
-
var templateObject_1;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface TableRowProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
component?: React.ElementType;
|
|
5
|
-
/** Table의 내용입니다. 일반적으로 TableCell로 구성됩니다. */
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
/** `true`일 때 기본적으로 적용되는 hover 배경색이 비활성화됩니다. */
|
|
8
|
-
disableHover?: boolean;
|
|
9
|
-
/** 이 행이 선택되었음을 결정하는 속성. `true`일때 배경색이 활성화됩니다. */
|
|
10
|
-
isSelected?: boolean;
|
|
11
|
-
/** 행을 클릭할 때 호출되는 함수 */
|
|
12
|
-
onClick?: (event: any) => void;
|
|
13
|
-
}
|
|
14
|
-
export default function TableRow(props: TableRowProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,34 +0,0 @@
|
|
|
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, useTheme } from "@emotion/react";
|
|
19
|
-
import { useContext } from "react";
|
|
20
|
-
import { HOVER } from "../../utils/hover";
|
|
21
|
-
import TablePropsContext from "./TablePropsContext";
|
|
22
|
-
export default function TableRow(props) {
|
|
23
|
-
var className = props.className, _a = props.component, Component = _a === void 0 ? "tr" : _a, isSelected = props.isSelected, disableHover = props.disableHover, children = props.children, onClick = props.onClick;
|
|
24
|
-
var theme = useTheme();
|
|
25
|
-
var disabled = useContext(TablePropsContext).disabled;
|
|
26
|
-
return (_jsx(Component, __assign({ className: className, onClick: disabled ? undefined : onClick, css: [
|
|
27
|
-
css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: table-row;\n &:not(:first-of-type) {\n td {\n border-top: 1px solid ", ";\n }\n }\n "], ["\n display: table-row;\n &:not(:first-of-type) {\n td {\n border-top: 1px solid ", ";\n }\n }\n "])), theme.color.background.neutralAlt),
|
|
28
|
-
isSelected && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), theme.color.container.primaryContainer),
|
|
29
|
-
disabled
|
|
30
|
-
? css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), theme.color.foreground.neutralBaseDisabled) : css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", "\n ", "\n "], ["\n ", "\n ", "\n "])), !disableHover &&
|
|
31
|
-
HOVER(css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), theme.color.container.primaryContainer)), onClick && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n cursor: pointer;\n "], ["\n cursor: pointer;\n "])))),
|
|
32
|
-
] }, { children: children })));
|
|
33
|
-
}
|
|
34
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import Table, { TableSize, TableProps } from "./Table";
|
|
2
|
-
import TableHead, { TableHeadProps } from "./TableHead";
|
|
3
|
-
import TableBody, { TableBodyProps } from "./TableBody";
|
|
4
|
-
import TableRow, { TableRowProps } from "./TableRow";
|
|
5
|
-
import TableCell, { TableCellProps } from "./TableCell";
|
|
6
|
-
export { Table, TableHead, TableBody, TableRow, TableCell };
|
|
7
|
-
export type { TableSize, TableProps, TableHeadProps, TableBodyProps, TableRowProps, TableCellProps, };
|
package/dist/svg.d.ts
DELETED
package/dist/utils/hover.d.ts
DELETED
package/dist/utils/hover.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
import { css } from "@emotion/react";
|
|
6
|
-
// https://choi-jinwoo.github.io/post/development/css-media-hover/
|
|
7
|
-
export function HOVER(style) {
|
|
8
|
-
// -ms-high-contrast: none is for IE11 support.
|
|
9
|
-
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n @media (hover: hover), (-ms-high-contrast: none) {\n &:hover {\n ", "\n }\n }\n "], ["\n @media (hover: hover), (-ms-high-contrast: none) {\n &:hover {\n ", "\n }\n }\n "])), style);
|
|
10
|
-
}
|
|
11
|
-
export function FOCUS(style) {
|
|
12
|
-
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n @media (hover: hover), (-ms-high-contrast: none) {\n &:focus {\n ", "\n }\n }\n "], ["\n @media (hover: hover), (-ms-high-contrast: none) {\n &:focus {\n ", "\n }\n }\n "])), style);
|
|
13
|
-
}
|
|
14
|
-
var templateObject_1, templateObject_2;
|
package/dist/utils/reset.d.ts
DELETED
package/dist/utils/reset.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
import { css } from "@emotion/react";
|
|
6
|
-
export var RESET_BUTTON = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-block;\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n border: none;\n background: none;\n font: inherit;\n text-align: inherit;\n"], ["\n display: inline-block;\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n border: none;\n background: none;\n font: inherit;\n text-align: inherit;\n"])));
|
|
7
|
-
export var RESET_TABLE = css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 0;\n border: 0;\n border-spacing: 0px;\n border-collapse: collapse;\n"], ["\n padding: 0;\n border: 0;\n border-spacing: 0px;\n border-collapse: collapse;\n"])));
|
|
8
|
-
var templateObject_1, templateObject_2;
|
package/dist/utils/zIndex.d.ts
DELETED
package/dist/utils/zIndex.js
DELETED