@team-monolith/cds 0.3.0 → 0.3.2

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.
Files changed (144) hide show
  1. package/dist/CodleDesignSystemProvider.d.ts +69 -0
  2. package/dist/CodleDesignSystemProvider.js +96 -0
  3. package/dist/components/AlertDialog/AlertDialog.d.ts +14 -0
  4. package/dist/components/AlertDialog/AlertDialog.js +45 -0
  5. package/dist/components/AlertDialog/AlertDialogActions.d.ts +8 -0
  6. package/dist/components/AlertDialog/AlertDialogActions.js +35 -0
  7. package/dist/components/AlertDialog/AlertDialogContent.d.ts +8 -0
  8. package/dist/components/AlertDialog/AlertDialogContent.js +36 -0
  9. package/dist/components/AlertDialog/AlertDialogTitle.d.ts +13 -0
  10. package/dist/components/AlertDialog/AlertDialogTitle.js +38 -0
  11. package/dist/components/AlertDialog/index.d.ts +4 -0
  12. package/dist/components/AlertDialog/index.js +4 -0
  13. package/dist/components/Banner.d.ts +29 -0
  14. package/dist/components/Banner.js +65 -0
  15. package/dist/components/Button.d.ts +31 -0
  16. package/dist/components/Button.js +72 -0
  17. package/dist/components/CheckboxInput.d.ts +27 -0
  18. package/dist/components/CheckboxInput.js +77 -0
  19. package/dist/components/Input.d.ts +17 -0
  20. package/dist/components/Input.js +73 -0
  21. package/dist/components/InputBase.d.ts +42 -0
  22. package/dist/components/InputBase.js +52 -0
  23. package/dist/components/Pagination.d.ts +27 -0
  24. package/dist/components/Pagination.js +32 -0
  25. package/dist/components/PinInput.d.ts +36 -0
  26. package/dist/components/PinInput.js +154 -0
  27. package/dist/components/RadioInput.d.ts +23 -0
  28. package/dist/components/RadioInput.js +78 -0
  29. package/dist/components/SquareButton.d.ts +26 -0
  30. package/dist/components/SquareButton.js +80 -0
  31. package/dist/components/Switch.d.ts +19 -0
  32. package/dist/components/Switch.js +59 -0
  33. package/dist/components/Tag.d.ts +21 -0
  34. package/dist/components/Tag.js +61 -0
  35. package/dist/components/Tooltip.d.ts +26 -0
  36. package/dist/components/Tooltip.js +50 -0
  37. package/dist/foundation/color.d.ts +75 -0
  38. package/dist/foundation/color.js +75 -0
  39. package/dist/foundation/shadows.d.ts +9 -0
  40. package/dist/foundation/shadows.js +10 -0
  41. package/dist/icons/Arrows/index.d.ts +2 -0
  42. package/dist/icons/Arrows/index.js +2 -0
  43. package/dist/icons/Media/index.d.ts +2 -0
  44. package/dist/icons/Media/index.js +2 -0
  45. package/dist/icons/System/index.d.ts +2 -0
  46. package/dist/icons/System/index.js +2 -0
  47. package/dist/icons/arrows.d.ts +28 -0
  48. package/dist/icons/arrows.js +21 -0
  49. package/dist/icons/brand.d.ts +4 -0
  50. package/dist/icons/brand.js +13 -0
  51. package/dist/icons/design.d.ts +4 -0
  52. package/dist/icons/design.js +13 -0
  53. package/dist/icons/map.d.ts +4 -0
  54. package/dist/icons/map.js +13 -0
  55. package/dist/icons/system.d.ts +31 -0
  56. package/dist/icons/system.js +22 -0
  57. package/dist/index.d.ts +44 -0
  58. package/dist/index.js +44 -0
  59. package/dist/patterns/Card/Card.d.ts +39 -0
  60. package/dist/patterns/Card/Card.js +68 -0
  61. package/dist/patterns/Card/class-icon.svg +28 -0
  62. package/dist/patterns/Card/index.d.ts +2 -0
  63. package/dist/patterns/Card/index.js +2 -0
  64. package/dist/patterns/Card/material-icon.svg +25 -0
  65. package/dist/patterns/Card/problem-icon.svg +25 -0
  66. package/dist/patterns/Card/thumbnail/sample.png +0 -0
  67. package/dist/patterns/Dialog/Dialog.d.ts +12 -0
  68. package/dist/patterns/Dialog/Dialog.js +26 -0
  69. package/dist/patterns/Dialog/DialogContent.d.ts +8 -0
  70. package/dist/patterns/Dialog/DialogContent.js +23 -0
  71. package/dist/patterns/Dialog/DialogNavigation.d.ts +12 -0
  72. package/dist/patterns/Dialog/DialogNavigation.js +25 -0
  73. package/dist/patterns/Dialog/DialogNavigationContext.d.ts +5 -0
  74. package/dist/patterns/Dialog/DialogNavigationContext.js +5 -0
  75. package/dist/patterns/Dialog/DialogNavigationItem.d.ts +10 -0
  76. package/dist/patterns/Dialog/DialogNavigationItem.js +25 -0
  77. package/dist/patterns/Dialog/DialogPanel.d.ts +10 -0
  78. package/dist/patterns/Dialog/DialogPanel.js +31 -0
  79. package/dist/patterns/Dialog/DialogPanels.d.ts +13 -0
  80. package/dist/patterns/Dialog/DialogPanels.js +17 -0
  81. package/dist/patterns/Dialog/DialogPanelsContext.d.ts +5 -0
  82. package/dist/patterns/Dialog/DialogPanelsContext.js +5 -0
  83. package/dist/patterns/Dialog/DialogTitle.d.ts +13 -0
  84. package/dist/patterns/Dialog/DialogTitle.js +26 -0
  85. package/dist/patterns/Dialog/index.d.ts +7 -0
  86. package/dist/patterns/Dialog/index.js +7 -0
  87. package/dist/patterns/Dropdown/Dropdown.d.ts +27 -0
  88. package/dist/patterns/Dropdown/Dropdown.js +41 -0
  89. package/dist/patterns/Dropdown/DropdownItem.d.ts +42 -0
  90. package/dist/patterns/Dropdown/DropdownItem.js +89 -0
  91. package/dist/patterns/Dropdown/DropdownMenu.d.ts +30 -0
  92. package/dist/patterns/Dropdown/DropdownMenu.js +85 -0
  93. package/dist/patterns/Dropdown/index.d.ts +2 -0
  94. package/dist/patterns/Dropdown/index.js +2 -0
  95. package/dist/patterns/EmptyState/EmptyState.d.ts +16 -0
  96. package/dist/patterns/EmptyState/EmptyState.js +36 -0
  97. package/dist/patterns/EmptyState/empty-state-icon.svg +36 -0
  98. package/dist/patterns/EmptyState/index.d.ts +2 -0
  99. package/dist/patterns/EmptyState/index.js +2 -0
  100. package/dist/patterns/Navigation/NavigationContext.d.ts +5 -0
  101. package/dist/patterns/Navigation/NavigationContext.js +5 -0
  102. package/dist/patterns/Navigation/NavigationHorizontal.d.ts +11 -0
  103. package/dist/patterns/Navigation/NavigationHorizontal.js +27 -0
  104. package/dist/patterns/Navigation/NavigationItem.d.ts +9 -0
  105. package/dist/patterns/Navigation/NavigationItem.js +33 -0
  106. package/dist/patterns/Navigation/NavigationVertical.d.ts +14 -0
  107. package/dist/patterns/Navigation/NavigationVertical.js +27 -0
  108. package/dist/patterns/Navigation/index.d.ts +3 -0
  109. package/dist/patterns/Navigation/index.js +3 -0
  110. package/dist/patterns/SegmentedControl/SegmentedControlButton.d.ts +8 -0
  111. package/dist/patterns/SegmentedControl/SegmentedControlButton.js +57 -0
  112. package/dist/patterns/SegmentedControl/SegmentedControlGroup.d.ts +26 -0
  113. package/dist/patterns/SegmentedControl/SegmentedControlGroup.js +50 -0
  114. package/dist/patterns/SegmentedControl/SegmentedControlGroupPropsContext.d.ts +5 -0
  115. package/dist/patterns/SegmentedControl/SegmentedControlGroupPropsContext.js +5 -0
  116. package/dist/patterns/SegmentedControl/SegmentedControlSquareButton.d.ts +8 -0
  117. package/dist/patterns/SegmentedControl/SegmentedControlSquareButton.js +45 -0
  118. package/dist/patterns/SegmentedControl/index.d.ts +3 -0
  119. package/dist/patterns/SegmentedControl/index.js +3 -0
  120. package/dist/patterns/Table/Table.d.ts +18 -0
  121. package/dist/patterns/Table/Table.js +33 -0
  122. package/dist/patterns/Table/TableBody.d.ts +8 -0
  123. package/dist/patterns/Table/TableBody.js +26 -0
  124. package/dist/patterns/Table/TableCell.d.ts +15 -0
  125. package/dist/patterns/Table/TableCell.js +78 -0
  126. package/dist/patterns/Table/TableHead.d.ts +8 -0
  127. package/dist/patterns/Table/TableHead.js +26 -0
  128. package/dist/patterns/Table/TablePropsContext.d.ts +7 -0
  129. package/dist/patterns/Table/TablePropsContext.js +3 -0
  130. package/dist/patterns/Table/TableRow.d.ts +14 -0
  131. package/dist/patterns/Table/TableRow.js +34 -0
  132. package/dist/patterns/Table/TableVariantContext.d.ts +6 -0
  133. package/dist/patterns/Table/TableVariantContext.js +3 -0
  134. package/dist/patterns/Table/index.d.ts +7 -0
  135. package/dist/patterns/Table/index.js +6 -0
  136. package/dist/utils/hover.d.ts +3 -0
  137. package/dist/utils/hover.js +14 -0
  138. package/dist/utils/reset.d.ts +2 -0
  139. package/dist/utils/reset.js +8 -0
  140. package/dist/utils/zIndex.d.ts +3 -0
  141. package/dist/utils/zIndex.js +3 -0
  142. package/package.json +3 -2
  143. package/src/cds/index.ts +1 -1
  144. package/src/cds/patterns/SegmentedControl/SegmentedControlButton.tsx +22 -8
@@ -0,0 +1,69 @@
1
+ /// <reference types="react" />
2
+ export declare const light: {
3
+ color: {
4
+ background: {
5
+ neutralBase: string;
6
+ neutralAlt: string;
7
+ neutralAltActive: string;
8
+ neutralAltDisabled: string;
9
+ primary: string;
10
+ primaryActive: string;
11
+ primaryDisabled: string;
12
+ secondary: string;
13
+ secondaryActive: string;
14
+ secondaryDisabled: string;
15
+ danger: string;
16
+ dangerActive: string;
17
+ dangerDisabled: string;
18
+ success: string;
19
+ successActive: string;
20
+ successDisabled: string;
21
+ info: string;
22
+ infoActive: string;
23
+ infoDisabled: string;
24
+ warning: string;
25
+ warningActive: string;
26
+ warningDisabled: string;
27
+ };
28
+ foreground: {
29
+ neutralBase: string;
30
+ neutralBaseDisabled: string;
31
+ neutralAlt: string;
32
+ neutralAltDisabled: string;
33
+ primary: string;
34
+ primaryDisabled: string;
35
+ secondary: string;
36
+ secondaryDisabled: string;
37
+ danger: string;
38
+ dangerDisabled: string;
39
+ success: string;
40
+ successDisabled: string;
41
+ info: string;
42
+ infoDisabled: string;
43
+ warning: string;
44
+ warningDisabled: string;
45
+ };
46
+ container: {
47
+ primaryContainer: string;
48
+ primaryOnContainer: string;
49
+ secondaryContainer: string;
50
+ secondaryOnContainer: string;
51
+ dangerContainer: string;
52
+ dangerOnContainer: string;
53
+ successContainer: string;
54
+ successOnContainer: string;
55
+ infoContainer: string;
56
+ infoOnContainer: string;
57
+ warningContainer: string;
58
+ warningOnContainer: string;
59
+ obsidianContainer: string;
60
+ obsidianOnContainer: string;
61
+ marbleContainer: string;
62
+ marbleOnContainer: string;
63
+ };
64
+ };
65
+ };
66
+ export default function (props: {
67
+ children: React.ReactNode;
68
+ fontFamily?: string;
69
+ }): React.ReactElement;
@@ -0,0 +1,96 @@
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 { ThemeProvider } from "@emotion/react";
14
+ import { ThemeProvider as MuiThemeProvider } from "@mui/material";
15
+ import COLOR from "./foundation/color";
16
+ import { createTheme } from "@mui/material";
17
+ export var light = {
18
+ color: {
19
+ background: {
20
+ neutralBase: COLOR.white,
21
+ neutralAlt: COLOR.grey03,
22
+ neutralAltActive: COLOR.grey04,
23
+ neutralAltDisabled: COLOR.grey03,
24
+ primary: COLOR.blue06,
25
+ primaryActive: COLOR.blue07,
26
+ primaryDisabled: COLOR.blue03,
27
+ secondary: COLOR.orange06,
28
+ secondaryActive: COLOR.orange07,
29
+ secondaryDisabled: COLOR.orange03,
30
+ danger: COLOR.red06,
31
+ dangerActive: COLOR.red07,
32
+ dangerDisabled: COLOR.red03,
33
+ success: COLOR.green06,
34
+ successActive: COLOR.green07,
35
+ successDisabled: COLOR.green03,
36
+ info: COLOR.teal06,
37
+ infoActive: COLOR.teal07,
38
+ infoDisabled: COLOR.teal03,
39
+ warning: COLOR.yellow06,
40
+ warningActive: COLOR.yellow07,
41
+ warningDisabled: COLOR.yellow03,
42
+ },
43
+ foreground: {
44
+ neutralBase: COLOR.black,
45
+ neutralBaseDisabled: COLOR.grey06,
46
+ neutralAlt: COLOR.white,
47
+ neutralAltDisabled: COLOR.white,
48
+ primary: COLOR.blue06,
49
+ primaryDisabled: COLOR.blue02,
50
+ secondary: COLOR.orange06,
51
+ secondaryDisabled: COLOR.orange02,
52
+ danger: COLOR.red06,
53
+ dangerDisabled: COLOR.red02,
54
+ success: COLOR.green06,
55
+ successDisabled: COLOR.green02,
56
+ info: COLOR.teal06,
57
+ infoDisabled: COLOR.teal02,
58
+ warning: COLOR.yellow06,
59
+ warningDisabled: COLOR.yellow02,
60
+ },
61
+ container: {
62
+ primaryContainer: COLOR.blue01,
63
+ primaryOnContainer: COLOR.blue08,
64
+ secondaryContainer: COLOR.orange01,
65
+ secondaryOnContainer: COLOR.orange08,
66
+ dangerContainer: COLOR.red01,
67
+ dangerOnContainer: COLOR.red08,
68
+ successContainer: COLOR.green01,
69
+ successOnContainer: COLOR.green08,
70
+ infoContainer: COLOR.teal01,
71
+ infoOnContainer: COLOR.teal08,
72
+ warningContainer: COLOR.yellow01,
73
+ warningOnContainer: COLOR.yellow08,
74
+ obsidianContainer: COLOR.black,
75
+ obsidianOnContainer: COLOR.grey03,
76
+ marbleContainer: COLOR.grey03,
77
+ marbleOnContainer: COLOR.grey07,
78
+ },
79
+ },
80
+ };
81
+ // eslint-disable-next-line import/no-anonymous-default-export
82
+ export default function (props) {
83
+ var muiTheme = createTheme({
84
+ typography: {
85
+ fontFamily: props.fontFamily,
86
+ },
87
+ components: {
88
+ MuiButtonBase: {
89
+ defaultProps: {
90
+ disableRipple: true, // No more ripple, on the whole application 💣!
91
+ },
92
+ },
93
+ },
94
+ });
95
+ return (_jsx(MuiThemeProvider, __assign({ theme: muiTheme }, { children: _jsx(ThemeProvider, __assign({ theme: light }, { children: props.children })) })));
96
+ }
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ export interface AlertDialogProps {
3
+ className?: string;
4
+ component?: React.ElementType;
5
+ /** `true` 값일때 모달이 노출됩니다. */
6
+ open: boolean;
7
+ /** 모달이 닫힐 때 호출되는 callback */
8
+ onClose?: () => void;
9
+ /** 모달의 내용으로 표기될 값 */
10
+ children: React.ReactNode;
11
+ /** 모달 좌측에 표기될 아이콘 */
12
+ icon?: React.ReactNode;
13
+ }
14
+ export declare const AlertDialog: React.ForwardRefExoticComponent<AlertDialogProps & React.RefAttributes<any>>;
@@ -0,0 +1,45 @@
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, Fragment as _Fragment, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
28
+ /** @jsxImportSource @emotion/react */
29
+ import { Modal as MuiModal } from "@mui/material";
30
+ import { css, useTheme } from "@emotion/react";
31
+ import React from "react";
32
+ import shadows from "../../foundation/shadows";
33
+ import styled from "@emotion/styled";
34
+ export var AlertDialog = React.forwardRef(function (props, ref) {
35
+ var className = props.className, _a = props.component, Component = _a === void 0 ? "div" : _a, open = props.open, onClose = props.onClose, children = props.children, icon = props.icon, other = __rest(props, ["className", "component", "open", "onClose", "children", "icon"]);
36
+ var theme = useTheme();
37
+ return (_jsx(MuiModal, __assign({ open: open, onClose: onClose, ref: ref }, other, { children: _jsxs(Component, __assign({ className: className, css: css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 480px;\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: grid;\n ", "\n\n gap: 8px 16px;\n "], ["\n width: 480px;\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: grid;\n ", "\n\n gap: 8px 16px;\n "])), theme.color.background.neutralBase, shadows.shadow04, icon
38
+ ? css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n grid-template-areas:\n \"icon title\"\n \"iconPadding content\"\n \"actions actions\";\n "], ["\n grid-template-areas:\n \"icon title\"\n \"iconPadding content\"\n \"actions actions\";\n "]))) : css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n grid-template-areas:\n \"title\"\n \"content\"\n \"actions\";\n "], ["\n grid-template-areas:\n \"title\"\n \"content\"\n \"actions\";\n "])))) }, { children: [icon && (_jsxs(_Fragment, { children: [_jsx(IconDiv, { children: icon }), _jsx(IconPadding, {})] })), children] })) })));
39
+ });
40
+ var IconDiv = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n grid-area: icon;\n ", "\n svg {\n width: 32px;\n height: 32px;\n }\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n grid-area: icon;\n ", "\n svg {\n width: 32px;\n height: 32px;\n }\n"])), function (_a) {
41
+ var theme = _a.theme;
42
+ return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), theme.color.background.infoActive);
43
+ });
44
+ var IconPadding = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n grid-area: iconPadding;\n"], ["\n grid-area: iconPadding;\n"])));
45
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export interface AlertDialogActionsProps {
3
+ className?: string;
4
+ component?: React.ElementType;
5
+ /** Content 내용으로 표기될 값 */
6
+ children: React.ReactNode;
7
+ }
8
+ export declare const AlertDialogActions: React.ForwardRefExoticComponent<AlertDialogActionsProps & React.RefAttributes<any>>;
@@ -0,0 +1,35 @@
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 } from "@emotion/react/jsx-runtime";
28
+ /** @jsxImportSource @emotion/react */
29
+ import { css } from "@emotion/react";
30
+ import React from "react";
31
+ export var AlertDialogActions = React.forwardRef(function (props, ref) {
32
+ var className = props.className, _a = props.component, Component = _a === void 0 ? "div" : _a, children = props.children, other = __rest(props, ["className", "component", "children"]);
33
+ return (_jsx(Component, __assign({}, other, { ref: ref, className: className, css: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n grid-area: actions;\n\n margin-top: 8px;\n display: flex;\n gap: 16px;\n justify-content: flex-end;\n "], ["\n grid-area: actions;\n\n margin-top: 8px;\n display: flex;\n gap: 16px;\n justify-content: flex-end;\n "]))) }, { children: children })));
34
+ });
35
+ var templateObject_1;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export interface AlertDialogContentProps {
3
+ className?: string;
4
+ component?: React.ElementType;
5
+ /** Content 내용으로 표기될 값 */
6
+ children: React.ReactNode;
7
+ }
8
+ export declare const AlertDialogContent: React.ForwardRefExoticComponent<AlertDialogContentProps & React.RefAttributes<any>>;
@@ -0,0 +1,36 @@
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 } from "@emotion/react/jsx-runtime";
28
+ /** @jsxImportSource @emotion/react */
29
+ import { css, useTheme } from "@emotion/react";
30
+ import React from "react";
31
+ export var AlertDialogContent = React.forwardRef(function (props, ref) {
32
+ var className = props.className, _a = props.component, Component = _a === void 0 ? "div" : _a, children = props.children, other = __rest(props, ["className", "component", "children"]);
33
+ var theme = useTheme();
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
+ });
36
+ var templateObject_1;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ export interface AlertDialogTitleProps {
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 const AlertDialogTitle: React.ForwardRefExoticComponent<AlertDialogTitleProps & React.RefAttributes<any>>;
@@ -0,0 +1,38 @@
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 React from "react";
31
+ import SquareButton from "../SquareButton";
32
+ import { CloseFillIcon } from "../../icons/system";
33
+ export var AlertDialogTitle = React.forwardRef(function (props, ref) {
34
+ var className = props.className, _a = props.component, Component = _a === void 0 ? "div" : _a, onClose = props.onClose, children = props.children, other = __rest(props, ["className", "component", "onClose", "children"]);
35
+ var theme = useTheme();
36
+ return (_jsx(_Fragment, { children: _jsxs(Component, __assign({}, other, { ref: ref, className: className, css: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n grid-area: title;\n font-family: \"Pretendard\";\n font-style: normal;\n font-weight: 500;\n font-size: 20px;\n line-height: 36px;\n color: ", ";\n\n display: flex;\n justify-content: space-between;\n "], ["\n grid-area: title;\n font-family: \"Pretendard\";\n font-style: normal;\n font-weight: 500;\n font-size: 20px;\n line-height: 36px;\n color: ", ";\n\n display: flex;\n justify-content: space-between;\n "])), theme.color.foreground.neutralBase) }, { children: [children, onClose && (_jsx(SquareButton, { color: "icon", size: "small", icon: _jsx(CloseFillIcon, {}), onClick: onClose }))] })) }));
37
+ });
38
+ var templateObject_1;
@@ -0,0 +1,4 @@
1
+ export * from "./AlertDialog";
2
+ export * from "./AlertDialogTitle";
3
+ export * from "./AlertDialogContent";
4
+ export * from "./AlertDialogActions";
@@ -0,0 +1,4 @@
1
+ export * from "./AlertDialog";
2
+ export * from "./AlertDialogTitle";
3
+ export * from "./AlertDialogContent";
4
+ export * from "./AlertDialogActions";
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ export type BannerColor = "red" | "blue" | "green" | "yellow";
3
+ export interface BannerProps {
4
+ className?: string;
5
+ component?: React.ElementType;
6
+ /** 컴포넌트 내 헤드라인으로 표기될 문자열 */
7
+ headline?: string;
8
+ /** 컴포넌트 내용으로 표기될 값 */
9
+ content: React.ReactNode;
10
+ /** 컴포넌트 좌측에 표기될 아이콘 */
11
+ icon?: React.ReactNode;
12
+ /** 컴포넌트의 색상 */
13
+ color: BannerColor;
14
+ /** 컴포넌트 우측에 표기될 버튼의 라벨 */
15
+ buttonLabel?: string;
16
+ /** 컴포넌트 우측 버튼 클릭 시 호출될 콜백 함수 */
17
+ onButtonClick?: () => void;
18
+ /** 컴포넌트 우측에 표기될 닫기 버튼 유무 */
19
+ close?: boolean;
20
+ /** 닫기 버튼 클릭 시 호출될 콜백 함수 */
21
+ onClose?: () => void;
22
+ /** 전체 너비 유무 */
23
+ fullWidth?: boolean;
24
+ }
25
+ /**
26
+ * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=44-2847&t=bhnL1ombbddld3RQ-0)
27
+ */
28
+ declare const Banner: React.ForwardRefExoticComponent<BannerProps & React.RefAttributes<any>>;
29
+ export default Banner;
@@ -0,0 +1,65 @@
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 } from "@emotion/react/jsx-runtime";
28
+ /** @jsxImportSource @emotion/react */
29
+ import { css, useTheme } from "@emotion/react";
30
+ import styled from "@emotion/styled";
31
+ import React from "react";
32
+ import COLOR from "../foundation/color";
33
+ import { CloseFillIcon } from "../icons/system";
34
+ import { RESET_BUTTON } from "../utils/reset";
35
+ var COLOR_TO_STYLE = function (theme, color) {
36
+ return ({
37
+ red: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n "], ["\n background: ", ";\n color: ", ";\n "])), theme.color.container.dangerContainer, theme.color.container.dangerOnContainer),
38
+ blue: css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n "], ["\n background: ", ";\n color: ", ";\n "])), theme.color.container.primaryContainer, theme.color.container.primaryOnContainer),
39
+ green: css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n "], ["\n background: ", ";\n color: ", ";\n "])), theme.color.container.successContainer, theme.color.container.successOnContainer),
40
+ yellow: css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n "], ["\n background: ", ";\n color: ", ";\n "])), theme.color.container.warningContainer, theme.color.container.warningOnContainer),
41
+ }[color]);
42
+ };
43
+ /**
44
+ * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=44-2847&t=bhnL1ombbddld3RQ-0)
45
+ */
46
+ var Banner = React.forwardRef(function (props, ref) {
47
+ var className = props.className, _a = props.component, Component = _a === void 0 ? "div" : _a, headline = props.headline, content = props.content, icon = props.icon, color = props.color, buttonLabel = props.buttonLabel, onButtonClick = props.onButtonClick, close = props.close, onClose = props.onClose, fullWidth = props.fullWidth, other = __rest(props, ["className", "component", "headline", "content", "icon", "color", "buttonLabel", "onButtonClick", "close", "onClose", "fullWidth"]);
48
+ var theme = useTheme();
49
+ return (_jsxs(Component, __assign({}, other, { ref: ref, className: className, css: [
50
+ css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n color: ", ";\n line-height: 125%;\n "], ["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n color: ", ";\n line-height: 125%;\n "])), COLOR.white),
51
+ COLOR_TO_STYLE(theme, color),
52
+ fullWidth
53
+ ? css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 100%;\n "], ["\n width: 100%;\n "]))) : css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border-radius: 12px;\n width: fit-content;\n min-width: 343px;\n "], ["\n border-radius: 12px;\n width: fit-content;\n min-width: 343px;\n "]))),
54
+ ] }, { children: [icon && _jsx(IconDiv, { children: icon }), _jsxs(TextContainer, __assign({ setPaddingRight: !close && !buttonLabel }, { children: [headline && _jsx(HeadlineDiv, { children: headline }), _jsx("div", { children: content })] })), buttonLabel && (_jsx(BannerButton, __assign({ onClick: onButtonClick }, { children: buttonLabel }))), close && (_jsx(CloseButton, __assign({ onClick: onClose }, { children: _jsx(StyledCloseFillIcon, {}) })))] })));
55
+ });
56
+ var StyledCloseFillIcon = styled(CloseFillIcon)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: block;\n padding: 14px;\n width: 20px;\n height: 20px;\n\n color: currentColor;\n"], ["\n display: block;\n padding: 14px;\n width: 20px;\n height: 20px;\n\n color: currentColor;\n"])));
57
+ var IconDiv = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 16px 0px 16px 16px;\n"], ["\n display: flex;\n align-items: center;\n padding: 16px 0px 16px 16px;\n"])));
58
+ var HeadlineDiv = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n font-weight: 700;\n"], ["\n font-weight: 700;\n"])));
59
+ var TextContainer = styled.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n flex: 1;\n\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 16px 0px 16px 16px;\n gap: 4px;\n ", ";\n"], ["\n flex: 1;\n\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 16px 0px 16px 16px;\n gap: 4px;\n ", ";\n"])), function (props) {
60
+ return props.setPaddingRight && css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n padding-right: 16px;\n "], ["\n padding-right: 16px;\n "])));
61
+ });
62
+ var BannerButton = styled.button(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", "\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 10px 12px;\n cursor: pointer;\n color: currentColor;\n"], ["\n ", "\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 10px 12px;\n cursor: pointer;\n color: currentColor;\n"])), RESET_BUTTON);
63
+ var CloseButton = styled.button(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", "\n cursor: pointer;\n color: currentColor;\n"], ["\n ", "\n cursor: pointer;\n color: currentColor;\n"])), RESET_BUTTON);
64
+ export default Banner;
65
+ 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;
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ import { PolymorphicProps } from "@mui/base";
3
+ export type ButtonColor = "primary" | "secondary" | "danger" | "textNeutral" | "textDanger" | "textPrimary";
4
+ export type ButtonSize = "large" | "medium" | "small" | "xsmall";
5
+ export interface ButtonOwnProps<RootComponentType extends React.ElementType> {
6
+ className?: string;
7
+ component?: RootComponentType;
8
+ /** 비활성화 여부 */
9
+ disabled?: boolean;
10
+ /** 컴포넌트 색상 */
11
+ color: ButtonColor;
12
+ /** 컴포넌트 크기 */
13
+ size: ButtonSize;
14
+ /** 컴포넌트 좌측에 표기될 아이콘 */
15
+ startIcon?: React.ReactNode;
16
+ /** 컴포넌트 우측에 표기될 아이콘 */
17
+ endIcon?: React.ReactNode;
18
+ /** 컴포넌트 내 표기될 문자열 */
19
+ label: string;
20
+ }
21
+ export type ButtonProps<RootComponentType extends React.ElementType = ButtonTypeMap["defaultComponent"]> = PolymorphicProps<ButtonTypeMap<RootComponentType>, RootComponentType>;
22
+ export interface ButtonTypeMap<RootComponentType extends React.ElementType = "button"> {
23
+ props: ButtonOwnProps<RootComponentType>;
24
+ defaultComponent: RootComponentType;
25
+ }
26
+ type ButtonComponent = <RootComponentType extends React.ElementType = "button">(props: ButtonProps<RootComponentType>) => React.ReactElement | null;
27
+ /**
28
+ * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=20-173&t=cXcCv3QijbX7MkoC-0)
29
+ */
30
+ declare const Button: ButtonComponent;
31
+ export default Button;
@@ -0,0 +1,72 @@
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 } from "@emotion/react/jsx-runtime";
28
+ /** @jsxImportSource @emotion/react */
29
+ import { css, useTheme } from "@emotion/react";
30
+ import styled from "@emotion/styled";
31
+ import React from "react";
32
+ import { HOVER } from "../utils/hover";
33
+ var COLOR_TO_BUTTON_STYLE = function (theme, color) {
34
+ return ({
35
+ primary: css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n\n ", "\n &:disabled {\n background: ", ";\n }\n "], ["\n background: ", ";\n color: ", ";\n\n ", "\n &:disabled {\n background: ", ";\n }\n "])), theme.color.background.primary, theme.color.foreground.neutralAlt, HOVER(css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), theme.color.background.primaryActive)), theme.color.background.primaryDisabled),
36
+ secondary: css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n\n ", "\n &:disabled {\n background: ", ";\n color: ", ";\n }\n "], ["\n background: ", ";\n color: ", ";\n\n ", "\n &:disabled {\n background: ", ";\n color: ", ";\n }\n "])), theme.color.background.neutralAlt, theme.color.foreground.neutralBase, HOVER(css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n "], ["\n background: ", ";\n color: ", ";\n "])), theme.color.background.neutralAltActive, theme.color.foreground.neutralBase)), theme.color.background.neutralAlt, theme.color.foreground.neutralBaseDisabled),
37
+ danger: css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n\n ", "\n &:disabled {\n background: ", ";\n }\n "], ["\n background: ", ";\n color: ", ";\n\n ", "\n &:disabled {\n background: ", ";\n }\n "])), theme.color.background.danger, theme.color.foreground.neutralAlt, HOVER(css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), theme.color.background.dangerActive)), theme.color.background.dangerDisabled),
38
+ textNeutral: css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background: none;\n color: ", ";\n\n ", "\n &:disabled {\n background: none;\n color: ", ";\n }\n "], ["\n background: none;\n color: ", ";\n\n ", "\n &:disabled {\n background: none;\n color: ", ";\n }\n "])), theme.color.foreground.neutralBase, HOVER(css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n "], ["\n background: ", ";\n color: ", ";\n "])), theme.color.background.neutralAltActive, theme.color.foreground.neutralBase)), theme.color.foreground.neutralBaseDisabled),
39
+ textDanger: css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n background: none;\n color: ", ";\n\n ", "\n &:disabled {\n background: none;\n color: ", ";\n }\n "], ["\n background: none;\n color: ", ";\n\n ", "\n &:disabled {\n background: none;\n color: ", ";\n }\n "])), theme.color.foreground.danger, HOVER(css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n "], ["\n background: ", ";\n color: ", ";\n "])), theme.color.background.neutralAltActive, theme.color.foreground.danger)), theme.color.foreground.dangerDisabled),
40
+ textPrimary: css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n background: none;\n color: ", ";\n\n ", "\n &:disabled {\n background: none;\n color: ", ";\n }\n "], ["\n background: none;\n color: ", ";\n\n ", "\n &:disabled {\n background: none;\n color: ", ";\n }\n "])), theme.color.foreground.primary, HOVER(css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n "], ["\n background: ", ";\n color: ", ";\n "])), theme.color.background.neutralAltActive, theme.color.foreground.primary)), theme.color.foreground.primaryDisabled),
41
+ }[color]);
42
+ };
43
+ var SIZE_TO_BUTTON_STYLE = {
44
+ large: css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n padding: 16px 20px;\n gap: 10px;\n\n svg {\n width: 24px;\n height: 24px;\n }\n "], ["\n padding: 16px 20px;\n gap: 10px;\n\n svg {\n width: 24px;\n height: 24px;\n }\n "]))),
45
+ medium: css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n padding: 14px 16px;\n gap: 8px;\n\n svg {\n width: 20px;\n height: 20px;\n }\n "], ["\n padding: 14px 16px;\n gap: 8px;\n\n svg {\n width: 20px;\n height: 20px;\n }\n "]))),
46
+ small: css(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n padding: 10px 12px;\n gap: 8px;\n\n svg {\n width: 16px;\n height: 16px;\n }\n "], ["\n padding: 10px 12px;\n gap: 8px;\n\n svg {\n width: 16px;\n height: 16px;\n }\n "]))),
47
+ xsmall: css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n padding: 6px 8px;\n gap: 4px;\n\n svg {\n width: 12px;\n height: 12px;\n }\n "], ["\n padding: 6px 8px;\n gap: 4px;\n\n svg {\n width: 12px;\n height: 12px;\n }\n "]))),
48
+ };
49
+ var SIZE_TO_LABEL_STYLE = {
50
+ large: css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n font-size: 20px;\n line-height: 24px;\n "], ["\n font-size: 20px;\n line-height: 24px;\n "]))),
51
+ medium: css(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n font-size: 18px;\n line-height: 20px;\n "], ["\n font-size: 18px;\n line-height: 20px;\n "]))),
52
+ small: css(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n font-size: 14px;\n line-height: 16px;\n "], ["\n font-size: 14px;\n line-height: 16px;\n "]))),
53
+ xsmall: css(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n font-size: 14px;\n line-height: 16px;\n "], ["\n font-size: 14px;\n line-height: 16px;\n "]))),
54
+ };
55
+ /**
56
+ * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=20-173&t=cXcCv3QijbX7MkoC-0)
57
+ */
58
+ var Button = React.forwardRef(function Button(props, ref) {
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, other = __rest(props, ["className", "component", "disabled", "color", "size", "startIcon", "endIcon", "label"]);
60
+ var theme = useTheme();
61
+ return (_jsxs(Component, __assign({}, other, { className: className, ref: ref, css: [
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
+ COLOR_TO_BUTTON_STYLE(theme, color),
64
+ SIZE_TO_BUTTON_STYLE[size],
65
+ ], disabled: disabled }, { children: [startIcon, _jsx(Label, __assign({ size: size }, { children: label })), endIcon] })));
66
+ });
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
+ var size = _a.size;
69
+ return SIZE_TO_LABEL_STYLE[size];
70
+ });
71
+ export default Button;
72
+ 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, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22;
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ import { InputHTMLAttributes } from "react";
3
+ export type CheckboxInputType = "default" | "checked" | "partial";
4
+ export interface CheckboxInputProps {
5
+ className?: string;
6
+ /** 체크박스의 체크 여부(Controlled) */
7
+ checked: boolean;
8
+ /** 체크박스의 라벨 */
9
+ label?: string;
10
+ /** 체크박스의 하단 마진(8px) 여부 */
11
+ spacer?: boolean;
12
+ /** 체크박스의 비활성화 여부 */
13
+ disabled?: boolean;
14
+ /** 체크박스의 partial 여부. 체크여부가 우선합니다. */
15
+ partial?: boolean;
16
+ /** 체크박스 값 변경시 호출되는 함수 */
17
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
18
+ /** 체크박스 클릭시 호출되는 함수 */
19
+ onClick?: (event: React.MouseEvent<HTMLInputElement>) => void;
20
+ /** HTML input 태그에 전달될 props */
21
+ inputProps?: InputHTMLAttributes<HTMLInputElement>;
22
+ }
23
+ /**
24
+ * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=36-907&t=G4t39O7uXZvsGQ9u-0)
25
+ */
26
+ declare const CheckboxInput: React.ForwardRefExoticComponent<CheckboxInputProps & React.RefAttributes<any>>;
27
+ export default CheckboxInput;