@team-monolith/cds 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +46 -0
  2. package/dist/CodleDesignSystemProvider.d.ts +5 -0
  3. package/dist/CodleDesignSystemProvider.js +96 -0
  4. package/dist/components/AlertDialog/AlertDialog.d.ts +14 -0
  5. package/dist/components/AlertDialog/AlertDialog.js +45 -0
  6. package/dist/components/AlertDialog/AlertDialogActions.d.ts +8 -0
  7. package/dist/components/AlertDialog/AlertDialogActions.js +35 -0
  8. package/dist/components/AlertDialog/AlertDialogContent.d.ts +8 -0
  9. package/dist/components/AlertDialog/AlertDialogContent.js +36 -0
  10. package/dist/components/AlertDialog/AlertDialogTitle.d.ts +13 -0
  11. package/dist/components/AlertDialog/AlertDialogTitle.js +38 -0
  12. package/dist/components/AlertDialog/index.d.ts +4 -0
  13. package/dist/components/AlertDialog/index.js +4 -0
  14. package/dist/components/Banner.d.ts +29 -0
  15. package/dist/components/Banner.js +65 -0
  16. package/dist/components/Button.d.ts +26 -0
  17. package/dist/components/Button.js +72 -0
  18. package/dist/components/CheckboxInput.d.ts +27 -0
  19. package/dist/components/CheckboxInput.js +77 -0
  20. package/dist/components/Input.d.ts +17 -0
  21. package/dist/components/Input.js +72 -0
  22. package/dist/components/InputBase.d.ts +42 -0
  23. package/dist/components/InputBase.js +52 -0
  24. package/dist/components/Pagination.d.ts +27 -0
  25. package/dist/components/Pagination.js +32 -0
  26. package/dist/components/PinInput.d.ts +36 -0
  27. package/dist/components/PinInput.js +154 -0
  28. package/dist/components/RadioInput.d.ts +23 -0
  29. package/dist/components/RadioInput.js +78 -0
  30. package/dist/components/SquareButton.d.ts +26 -0
  31. package/dist/components/SquareButton.js +80 -0
  32. package/dist/components/Switch.d.ts +19 -0
  33. package/dist/components/Switch.js +59 -0
  34. package/dist/components/Tag.d.ts +21 -0
  35. package/dist/components/Tag.js +61 -0
  36. package/dist/components/Tooltip.d.ts +26 -0
  37. package/dist/components/Tooltip.js +50 -0
  38. package/dist/foundation/color.d.ts +75 -0
  39. package/dist/foundation/color.js +75 -0
  40. package/dist/foundation/shadows.d.ts +9 -0
  41. package/dist/foundation/shadows.js +10 -0
  42. package/dist/icons/arrows.d.ts +16 -0
  43. package/dist/icons/arrows.js +17 -0
  44. package/dist/icons/brand.d.ts +4 -0
  45. package/dist/icons/brand.js +13 -0
  46. package/dist/icons/map.d.ts +4 -0
  47. package/dist/icons/map.js +13 -0
  48. package/dist/icons/system.d.ts +25 -0
  49. package/dist/icons/system.js +20 -0
  50. package/dist/index.d.ts +2 -0
  51. package/dist/index.js +2 -0
  52. package/dist/patterns/Dropdown/Dropdown.d.ts +27 -0
  53. package/dist/patterns/Dropdown/Dropdown.js +41 -0
  54. package/dist/patterns/Dropdown/DropdownItem.d.ts +42 -0
  55. package/dist/patterns/Dropdown/DropdownItem.js +89 -0
  56. package/dist/patterns/Dropdown/DropdownMenu.d.ts +30 -0
  57. package/dist/patterns/Dropdown/DropdownMenu.js +85 -0
  58. package/dist/patterns/Dropdown/index.d.ts +2 -0
  59. package/dist/patterns/Dropdown/index.js +2 -0
  60. package/dist/patterns/EmptyState/EmptyState.d.ts +16 -0
  61. package/dist/patterns/EmptyState/EmptyState.js +36 -0
  62. package/dist/patterns/EmptyState/index.d.ts +2 -0
  63. package/dist/patterns/EmptyState/index.js +2 -0
  64. package/dist/patterns/Grid/EnhancedTableCell.d.ts +9 -0
  65. package/dist/patterns/Grid/EnhancedTableCell.js +122 -0
  66. package/dist/patterns/Grid/Grid.d.ts +51 -0
  67. package/dist/patterns/Grid/Grid.js +140 -0
  68. package/dist/patterns/Grid/index.d.ts +3 -0
  69. package/dist/patterns/Grid/index.js +2 -0
  70. package/dist/patterns/SegmentedControl/SegmentedControlButton.d.ts +8 -0
  71. package/dist/patterns/SegmentedControl/SegmentedControlButton.js +41 -0
  72. package/dist/patterns/SegmentedControl/SegmentedControlGroup.d.ts +26 -0
  73. package/dist/patterns/SegmentedControl/SegmentedControlGroup.js +50 -0
  74. package/dist/patterns/SegmentedControl/SegmentedControlGroupPropsContext.d.ts +5 -0
  75. package/dist/patterns/SegmentedControl/SegmentedControlGroupPropsContext.js +5 -0
  76. package/dist/patterns/SegmentedControl/SegmentedControlSquareButton.d.ts +8 -0
  77. package/dist/patterns/SegmentedControl/SegmentedControlSquareButton.js +45 -0
  78. package/dist/patterns/SegmentedControl/index.d.ts +3 -0
  79. package/dist/patterns/SegmentedControl/index.js +3 -0
  80. package/dist/patterns/Table/Table.d.ts +16 -0
  81. package/dist/patterns/Table/Table.js +33 -0
  82. package/dist/patterns/Table/TableBody.d.ts +8 -0
  83. package/dist/patterns/Table/TableBody.js +26 -0
  84. package/dist/patterns/Table/TableCell.d.ts +15 -0
  85. package/dist/patterns/Table/TableCell.js +78 -0
  86. package/dist/patterns/Table/TableHead.d.ts +8 -0
  87. package/dist/patterns/Table/TableHead.js +26 -0
  88. package/dist/patterns/Table/TableRow.d.ts +12 -0
  89. package/dist/patterns/Table/TableRow.js +29 -0
  90. package/dist/patterns/Table/TableSizeContext.d.ts +7 -0
  91. package/dist/patterns/Table/TableSizeContext.js +3 -0
  92. package/dist/patterns/Table/TableVariantContext.d.ts +6 -0
  93. package/dist/patterns/Table/TableVariantContext.js +3 -0
  94. package/dist/patterns/Table/index.d.ts +7 -0
  95. package/dist/patterns/Table/index.js +6 -0
  96. package/dist/utils/hover.d.ts +3 -0
  97. package/dist/utils/hover.js +14 -0
  98. package/dist/utils/reset.d.ts +2 -0
  99. package/dist/utils/reset.js +8 -0
  100. package/dist/utils/zIndex.d.ts +3 -0
  101. package/dist/utils/zIndex.js +3 -0
  102. package/package.json +52 -0
  103. package/public/favicon.ico +0 -0
  104. package/public/index.html +43 -0
  105. package/public/logo192.png +0 -0
  106. package/public/logo512.png +0 -0
  107. package/public/manifest.json +25 -0
  108. package/public/robots.txt +3 -0
  109. package/src/App.tsx +7 -0
  110. package/src/cds/CodleDesignSystemProvider.tsx +93 -0
  111. package/src/cds/README.md +23 -0
  112. package/src/cds/components/AlertDialog/AlertDialog.tsx +101 -0
  113. package/src/cds/components/AlertDialog/AlertDialogActions.tsx +34 -0
  114. package/src/cds/components/AlertDialog/AlertDialogContent.tsx +38 -0
  115. package/src/cds/components/AlertDialog/AlertDialogTitle.tsx +63 -0
  116. package/src/cds/components/AlertDialog/index.tsx +4 -0
  117. package/src/cds/components/Banner.tsx +176 -0
  118. package/src/cds/components/Button.tsx +239 -0
  119. package/src/cds/components/CheckboxInput.tsx +270 -0
  120. package/src/cds/components/Input.tsx +166 -0
  121. package/src/cds/components/InputBase.tsx +226 -0
  122. package/src/cds/components/Pagination.tsx +99 -0
  123. package/src/cds/components/PinInput.tsx +322 -0
  124. package/src/cds/components/RadioInput.tsx +226 -0
  125. package/src/cds/components/SquareButton.tsx +229 -0
  126. package/src/cds/components/Switch.tsx +129 -0
  127. package/src/cds/components/Tag.tsx +155 -0
  128. package/src/cds/components/Tooltip.tsx +104 -0
  129. package/src/cds/emotion.d.ts +70 -0
  130. package/src/cds/foundation/color.ts +83 -0
  131. package/src/cds/foundation/shadows.ts +17 -0
  132. package/src/cds/icons/arrows.tsx +61 -0
  133. package/src/cds/icons/brand.tsx +13 -0
  134. package/src/cds/icons/map.tsx +14 -0
  135. package/src/cds/icons/system.tsx +113 -0
  136. package/src/cds/index.ts +3 -0
  137. package/src/cds/patterns/Dropdown/Dropdown.tsx +111 -0
  138. package/src/cds/patterns/Dropdown/DropdownItem.tsx +203 -0
  139. package/src/cds/patterns/Dropdown/DropdownMenu.tsx +176 -0
  140. package/src/cds/patterns/Dropdown/index.tsx +2 -0
  141. package/src/cds/patterns/EmptyState/EmptyState.tsx +91 -0
  142. package/src/cds/patterns/EmptyState/empty-state-icon.svg +36 -0
  143. package/src/cds/patterns/EmptyState/index.tsx +2 -0
  144. package/src/cds/patterns/Grid/EnhancedTableCell.tsx +180 -0
  145. package/src/cds/patterns/Grid/Grid.tsx +360 -0
  146. package/src/cds/patterns/Grid/index.tsx +4 -0
  147. package/src/cds/patterns/SegmentedControl/SegmentedControlButton.tsx +41 -0
  148. package/src/cds/patterns/SegmentedControl/SegmentedControlGroup.tsx +81 -0
  149. package/src/cds/patterns/SegmentedControl/SegmentedControlGroupPropsContext.tsx +9 -0
  150. package/src/cds/patterns/SegmentedControl/SegmentedControlSquareButton.tsx +51 -0
  151. package/src/cds/patterns/SegmentedControl/index.ts +3 -0
  152. package/src/cds/patterns/Table/Table.tsx +56 -0
  153. package/src/cds/patterns/Table/TableBody.tsx +30 -0
  154. package/src/cds/patterns/Table/TableCell.tsx +242 -0
  155. package/src/cds/patterns/Table/TableHead.tsx +30 -0
  156. package/src/cds/patterns/Table/TableRow.tsx +54 -0
  157. package/src/cds/patterns/Table/TableSizeContext.tsx +10 -0
  158. package/src/cds/patterns/Table/TableVariantContext.tsx +9 -0
  159. package/src/cds/patterns/Table/index.tsx +15 -0
  160. package/src/cds/utils/hover.tsx +24 -0
  161. package/src/cds/utils/reset.tsx +19 -0
  162. package/src/cds/utils/zIndex.tsx +3 -0
  163. package/src/index.tsx +10 -0
  164. package/src/react-app-env.d.ts +1 -0
  165. package/tsconfig.json +22 -0
@@ -0,0 +1,78 @@
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 * as React from "react";
31
+ import styled from "@emotion/styled";
32
+ import { ZINDEX } from "../utils/zIndex";
33
+ var TYPE_TO_ICON_STYLE = function (theme, type, disabled) {
34
+ return {
35
+ default: css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n path {\n stroke: ", ";\n fill: ", ";\n }\n ", "\n "], ["\n path {\n stroke: ", ";\n fill: ", ";\n }\n ", "\n "])), theme.color.background.neutralAltActive, theme.color.background.neutralBase, disabled
36
+ ? css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: default;\n path {\n stroke: ", ";\n fill: ", ";\n }\n "], ["\n cursor: default;\n path {\n stroke: ", ";\n fill: ", ";\n }\n "])), theme.color.background.primaryDisabled, theme.color.background.neutralAlt) : css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n input[type=\"radio\"]:hover + & {\n path {\n stroke: ", ";\n }\n }\n "], ["\n input[type=\"radio\"]:hover + & {\n path {\n stroke: ", ";\n }\n }\n "])), theme.color.background.primary)),
37
+ selected: css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n path {\n stroke: ", ";\n fill: ", ";\n }\n rect {\n fill: ", ";\n }\n ", "\n "], ["\n path {\n stroke: ", ";\n fill: ", ";\n }\n rect {\n fill: ", ";\n }\n ", "\n "])), theme.color.background.primary, theme.color.background.neutralBase, theme.color.background.primary, disabled
38
+ ? css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n cursor: default;\n path {\n stroke: ", ";\n fill: ", ";\n }\n rect {\n fill: ", ";\n }\n "], ["\n cursor: default;\n path {\n stroke: ", ";\n fill: ", ";\n }\n rect {\n fill: ", ";\n }\n "])), theme.color.background.primaryDisabled, theme.color.background.neutralAlt, theme.color.background.primaryDisabled) : css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n input[type=\"radio\"]:hover + & {\n path {\n stroke: ", ";\n }\n rect {\n fill: ", ";\n }\n }\n "], ["\n input[type=\"radio\"]:hover + & {\n path {\n stroke: ", ";\n }\n rect {\n fill: ", ";\n }\n }\n "])), theme.color.background.primaryActive, theme.color.background.primaryActive)),
39
+ }[type];
40
+ };
41
+ /**
42
+ * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=420-3704&t=lvpbJKdtz7Lb8wIQ-0)
43
+ */
44
+ var RadioInput = React.forwardRef(function (props, ref) {
45
+ var className = props.className, checked = props.checked, label = props.label, spacer = props.spacer, disabled = props.disabled, onChange = props.onChange, inputProps = props.inputProps, other = __rest(props, ["className", "checked", "label", "spacer", "disabled", "onChange", "inputProps"]);
46
+ if (!label) {
47
+ return _jsx(RadioButton, __assign({}, props, { ref: ref }));
48
+ }
49
+ var radioProps = {
50
+ checked: checked,
51
+ spacer: spacer,
52
+ disabled: disabled,
53
+ onChange: onChange,
54
+ inputProps: inputProps,
55
+ };
56
+ return (_jsxs(Label, __assign({ className: className, ref: ref }, other, { children: [_jsx(RadioButton, __assign({}, radioProps)), _jsx("span", __assign({ css: css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n margin-left: 8px;\n "], ["\n margin-left: 8px;\n "]))) }, { children: label }))] })));
57
+ });
58
+ var RadioButton = React.forwardRef(function (props, ref) {
59
+ var className = props.className, checked = props.checked, label = props.label, _a = props.spacer, spacer = _a === void 0 ? false : _a, _b = props.disabled, disabled = _b === void 0 ? false : _b, onChange = props.onChange, inputProps = props.inputProps, other = __rest(props, ["className", "checked", "label", "spacer", "disabled", "onChange", "inputProps"]);
60
+ var type = props.checked ? "selected" : "default";
61
+ return (_jsxs(RadioButtonContainer, __assign({ className: className, spacer: spacer, ref: ref }, other, { children: [_jsx(StyledInput, __assign({ type: "radio" }, inputProps, { checked: checked, disabled: disabled, onChange: onChange })), _jsx(RadioButtonIcon, { type: type, disabled: disabled })] })));
62
+ });
63
+ var Label = styled.label(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n position: relative;\n width: fit-content;\n font-size: 14px;\n font-weight: 500;\n line-height: 16px;\n color: ", ";\n align-self: center;\n"], ["\n display: flex;\n position: relative;\n width: fit-content;\n font-size: 14px;\n font-weight: 500;\n line-height: 16px;\n color: ", ";\n align-self: center;\n"])), function (_a) {
64
+ var theme = _a.theme;
65
+ return theme.color.foreground.neutralBase;
66
+ });
67
+ var RadioButtonContainer = styled.span(function (_a) {
68
+ var spacer = _a.spacer;
69
+ return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: inline-flex;\n position: relative;\n width: 16px;\n height: 16px;\n cursor: pointer;\n margin-bottom: ", ";\n "], ["\n display: inline-flex;\n position: relative;\n width: 16px;\n height: 16px;\n cursor: pointer;\n margin-bottom: ", ";\n "])), spacer ? "8px" : "0");
70
+ });
71
+ var StyledInput = styled.input(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n cursor: inherit;\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n width: 16px;\n height: 16px;\n margin: 0;\n padding: 0;\n // input \uCEF4\uD3EC\uB10C\uD2B8\uB294 \uBCF4\uC774\uC9C0 \uC54A\uC9C0\uB9CC, \uD074\uB9AD\uC774 \uAC00\uB2A5\uD558\uAC8C z-index\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n z-index: ", ";\n"], ["\n cursor: inherit;\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n width: 16px;\n height: 16px;\n margin: 0;\n padding: 0;\n // input \uCEF4\uD3EC\uB10C\uD2B8\uB294 \uBCF4\uC774\uC9C0 \uC54A\uC9C0\uB9CC, \uD074\uB9AD\uC774 \uAC00\uB2A5\uD558\uAC8C z-index\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n z-index: ", ";\n"])), ZINDEX.inputBase);
72
+ // default와 selected 구조가 유사하여 하나의 컴포넌트로 표현합니다.
73
+ var RadioButtonIcon = function (props) {
74
+ var theme = useTheme();
75
+ return (_jsxs("svg", __assign({ width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", css: TYPE_TO_ICON_STYLE(theme, props.type, props.disabled) }, { children: [_jsx("path", { d: "M0.5 8C0.5 3.85786 3.85786 0.5 8 0.5C12.1421 0.5 15.5 3.85786 15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8Z", fill: "currentColor", stroke: "currentColor" }), props.type === "selected" && (_jsx("rect", { x: "4", y: "4", width: "8", height: "8", rx: "4", fill: "currentColor" }))] })));
76
+ };
77
+ export default RadioInput;
78
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10;
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+ export type SquareButtonColor = "danger" | "primary" | "secondary" | "icon";
3
+ export type SquareButtonSize = "large" | "medium" | "small" | "xsmall";
4
+ export interface SquareButtonProps {
5
+ className?: string;
6
+ component?: React.ElementType;
7
+ /** 비활성화 여부 */
8
+ disabled?: boolean;
9
+ /** 컴포넌트 색상 */
10
+ color: SquareButtonColor;
11
+ /** 컴포넌트 크기 */
12
+ size: SquareButtonSize;
13
+ /** 컴포넌트 내 표기될 아이콘 */
14
+ icon: React.ReactNode;
15
+ /** 컴포넌트 하단에 표기될 문자열 */
16
+ label?: string;
17
+ /** 전체 너비 유무 */
18
+ fullWidth?: boolean;
19
+ /** 버튼 클릭 시 호출될 콜백 함수 */
20
+ onClick?: () => void;
21
+ }
22
+ /**
23
+ * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=22-374&t=kTLv3t86qtGalHSS-0)
24
+ */
25
+ declare const SquareButton: React.ForwardRefExoticComponent<SquareButtonProps & React.RefAttributes<any>>;
26
+ export default SquareButton;
@@ -0,0 +1,80 @@
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 } 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
+ danger: css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border: none;\n background: ", ";\n color: ", ";\n\n ", "\n &:disabled {\n background: ", ";\n }\n "], ["\n border: none;\n background: ", ";\n color: ", ";\n\n ", "\n &:disabled {\n background: ", ";\n }\n "])), theme.color.background.danger, theme.color.foreground.neutralAlt, HOVER(css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), theme.color.background.dangerActive)), theme.color.background.dangerDisabled),
36
+ secondary: css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background: ", ";\n border: none;\n color: ", ";\n\n ", "\n &:disabled {\n background: ", ";\n color: ", ";\n }\n "], ["\n background: ", ";\n border: none;\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
+ primary: css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background: ", ";\n border: none;\n color: ", ";\n\n ", "\n &:disabled {\n background: ", ";\n }\n "], ["\n background: ", ";\n border: none;\n color: ", ";\n\n ", "\n &:disabled {\n background: ", ";\n }\n "])), theme.color.background.primary, theme.color.foreground.neutralAlt, HOVER(css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), theme.color.background.primaryActive)), theme.color.background.primaryDisabled),
38
+ icon: css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background: none;\n border: none;\n color: ", ";\n\n ", "\n &:disabled {\n background: none;\n color: ", ";\n }\n "], ["\n background: none;\n border: 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
+ }[color]);
40
+ };
41
+ var SIZE_TO_BUTTON_STYLE = {
42
+ large: css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n width: 56px;\n height: 56px;\n padding: 16px;\n\n svg {\n width: 24px;\n height: 24px;\n }\n "], ["\n width: 56px;\n height: 56px;\n padding: 16px;\n\n svg {\n width: 24px;\n height: 24px;\n }\n "]))),
43
+ medium: css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n width: 48px;\n height: 48px;\n padding: 14px;\n\n svg {\n width: 20px;\n height: 20px;\n }\n "], ["\n width: 48px;\n height: 48px;\n padding: 14px;\n\n svg {\n width: 20px;\n height: 20px;\n }\n "]))),
44
+ small: css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n width: 36px;\n height: 36px;\n padding: 10px;\n\n svg {\n width: 16px;\n height: 16px;\n }\n "], ["\n width: 36px;\n height: 36px;\n padding: 10px;\n\n svg {\n width: 16px;\n height: 16px;\n }\n "]))),
45
+ xsmall: css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n width: 24px;\n height: 24px;\n padding: 6px;\n\n svg {\n width: 12px;\n height: 12px;\n }\n "], ["\n width: 24px;\n height: 24px;\n padding: 6px;\n\n svg {\n width: 12px;\n height: 12px;\n }\n "]))),
46
+ };
47
+ var SIZE_TO_LABEL_STYLE = {
48
+ large: css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n font-size: 18px;\n line-height: 28px;\n "], ["\n font-size: 18px;\n line-height: 28px;\n "]))),
49
+ medium: css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n font-size: 18px;\n line-height: 28px;\n "], ["\n font-size: 18px;\n line-height: 28px;\n "]))),
50
+ small: css(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n font-size: 18px;\n line-height: 28px;\n "], ["\n font-size: 18px;\n line-height: 28px;\n "]))),
51
+ xsmall: css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n font-size: 14px;\n line-height: 22px;\n "], ["\n font-size: 14px;\n line-height: 22px;\n "]))),
52
+ };
53
+ /**
54
+ * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=22-374&t=kTLv3t86qtGalHSS-0)
55
+ */
56
+ var SquareButton = React.forwardRef(function (props, ref) {
57
+ var className = props.className, _a = props.component, Component = _a === void 0 ? "span" : _a, disabled = props.disabled, color = props.color, size = props.size, icon = props.icon, label = props.label, fullWidth = props.fullWidth, onClick = props.onClick, other = __rest(props, ["className", "component", "disabled", "color", "size", "icon", "label", "fullWidth", "onClick"]);
58
+ return (_jsxs(Component, __assign({}, other, { ref: ref, className: className, css: css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n\n width: ", ";\n "], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n\n width: ", ";\n "])), fullWidth ? "100%" : "fit-content") }, { children: [_jsx(Button, __assign({ color: color, size: size, disabled: disabled, fullWidth: fullWidth, onClick: onClick }, { children: icon })), label && (_jsx(Label, __assign({ disabled: disabled, size: size }, { children: label })))] })));
59
+ });
60
+ var Button = styled.button(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n border-radius: 8px;\n cursor: pointer;\n &:disabled {\n cursor: default;\n }\n ", "\n ", "\n ", "\n"], ["\n border-radius: 8px;\n cursor: pointer;\n &:disabled {\n cursor: default;\n }\n ", "\n ", "\n ", "\n"])), function (_a) {
61
+ var theme = _a.theme, color = _a.color;
62
+ return COLOR_TO_BUTTON_STYLE(theme, color);
63
+ }, function (_a) {
64
+ var size = _a.size;
65
+ return SIZE_TO_BUTTON_STYLE[size];
66
+ }, function (_a) {
67
+ var fullWidth = _a.fullWidth;
68
+ return fullWidth && "width: 100%;";
69
+ });
70
+ var Label = styled.span(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n font-weight: 400;\n color: ", ";\n ", "\n"], ["\n font-weight: 400;\n color: ", ";\n ", "\n"])), function (_a) {
71
+ var theme = _a.theme, disabled = _a.disabled;
72
+ return disabled
73
+ ? theme.color.foreground.neutralBaseDisabled
74
+ : theme.color.foreground.neutralBase;
75
+ }, function (_a) {
76
+ var size = _a.size;
77
+ return SIZE_TO_LABEL_STYLE[size];
78
+ });
79
+ export default SquareButton;
80
+ 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;
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ export type SwitchSize = "small" | "large";
3
+ export interface SwitchProps {
4
+ className?: string;
5
+ /** 스위치 체크 상태 여부 */
6
+ checked: boolean;
7
+ /** 스위치 활성화 여부
8
+ * @default false */
9
+ disabled?: boolean;
10
+ /** 스위치 크기 */
11
+ size: SwitchSize;
12
+ /** 스위치 상태 변경 시 호출될 콜백 함수 */
13
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
14
+ }
15
+ /**
16
+ * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=36-1577&t=9sDLb4XIOdmF2VMc-0)
17
+ */
18
+ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<any>>;
19
+ export default Switch;
@@ -0,0 +1,59 @@
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 styled from "@emotion/styled";
30
+ import React from "react";
31
+ import { Switch as MuiSwitch } from "@mui/material";
32
+ import { css } from "@emotion/react";
33
+ /**
34
+ * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=36-1577&t=9sDLb4XIOdmF2VMc-0)
35
+ */
36
+ var Switch = React.forwardRef(function (props, ref) {
37
+ var className = props.className, checked = props.checked, _a = props.disabled, disabled = _a === void 0 ? false : _a, size = props.size, onChange = props.onChange, other = __rest(props, ["className", "checked", "disabled", "size", "onChange"]);
38
+ return (_jsx(StyledSwitch, __assign({}, other, { ref: ref, className: className, checked: checked, disabled: disabled, onChange: onChange, switchSize: size })));
39
+ });
40
+ var SIZE_TO_SWTICH_SIZE = {
41
+ large: {
42
+ width: "44px",
43
+ height: "22px",
44
+ translateX: "22px",
45
+ thumbSize: "18px",
46
+ },
47
+ small: {
48
+ width: "28px",
49
+ height: "16px",
50
+ translateX: "12px",
51
+ thumbSize: "12px",
52
+ },
53
+ };
54
+ var StyledSwitch = styled(MuiSwitch)(function (_a) {
55
+ var theme = _a.theme, switchSize = _a.switchSize;
56
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n padding: 0; // \uAE30\uC874 Mui padding \uC18D\uC131 override\n & .MuiSwitch-switchBase {\n padding: 2px;\n &.Mui-checked {\n transform: translateX(", ");\n color: ", ";\n & + .MuiSwitch-track {\n opacity: 1;\n background-color: ", ";\n }\n &.Mui-disabled + .MuiSwitch-track {\n opacity: 1;\n background-color: ", ";\n }\n }\n &.Mui-disabled + .MuiSwitch-track {\n opacity: 1;\n background-color: ", ";\n }\n &:hover {\n background-color: inherit; // \uAE30\uC874 Mui hover \uC18D\uC131 override\n }\n }\n .Mui-disabled .MuiSwitch-thumb {\n filter: none;\n box-shadow: none;\n background-color: ", ";\n }\n\n .MuiSwitch-thumb {\n box-shadow: none;\n filter: drop-shadow(0px 2px 4px rgba(0, 35, 11, 0.2));\n width: ", ";\n height: ", ";\n border-radius: 77px;\n transition: width 300ms;\n }\n .MuiSwitch-track {\n border-radius: 16px;\n opacity: 1;\n background-color: ", ";\n box-sizing: border-box;\n }\n "], ["\n width: ", ";\n height: ", ";\n padding: 0; // \uAE30\uC874 Mui padding \uC18D\uC131 override\n & .MuiSwitch-switchBase {\n padding: 2px;\n &.Mui-checked {\n transform: translateX(", ");\n color: ", ";\n & + .MuiSwitch-track {\n opacity: 1;\n background-color: ", ";\n }\n &.Mui-disabled + .MuiSwitch-track {\n opacity: 1;\n background-color: ", ";\n }\n }\n &.Mui-disabled + .MuiSwitch-track {\n opacity: 1;\n background-color: ", ";\n }\n &:hover {\n background-color: inherit; // \uAE30\uC874 Mui hover \uC18D\uC131 override\n }\n }\n .Mui-disabled .MuiSwitch-thumb {\n filter: none;\n box-shadow: none;\n background-color: ", ";\n }\n\n .MuiSwitch-thumb {\n box-shadow: none;\n filter: drop-shadow(0px 2px 4px rgba(0, 35, 11, 0.2));\n width: ", ";\n height: ", ";\n border-radius: 77px;\n transition: width 300ms;\n }\n .MuiSwitch-track {\n border-radius: 16px;\n opacity: 1;\n background-color: ", ";\n box-sizing: border-box;\n }\n "])), SIZE_TO_SWTICH_SIZE[switchSize].width, SIZE_TO_SWTICH_SIZE[switchSize].height, SIZE_TO_SWTICH_SIZE[switchSize].translateX, theme.color.foreground.neutralAlt, theme.color.background.primary, theme.color.background.primaryDisabled, theme.color.background.neutralAltDisabled, theme.color.foreground.neutralAltDisabled, SIZE_TO_SWTICH_SIZE[switchSize].thumbSize, SIZE_TO_SWTICH_SIZE[switchSize].thumbSize, theme.color.background.neutralAltActive);
57
+ });
58
+ export default Switch;
59
+ var templateObject_1;
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ export type TagColor = "default" | "red" | "teal" | "orange" | "blue" | "green" | "yellow" | "black";
3
+ export interface TagProps {
4
+ className?: string;
5
+ component?: React.ElementType;
6
+ /** 컴포넌트 내 표기될 문자열 */
7
+ label: string;
8
+ /** 컴포넌트 좌측에 표기될 아이콘 */
9
+ icon?: React.ReactNode;
10
+ /** 컴포넌트의 색상 */
11
+ color?: TagColor;
12
+ /** 컴포넌트 우측에 표기될 닫기 버튼 유무 */
13
+ close: boolean;
14
+ /** 닫기 버튼 클릭 시 호출될 콜백 함수 */
15
+ onClick?: () => void;
16
+ }
17
+ /**
18
+ * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=42-869&t=HZXCHP0r0tbvMA6v-0)
19
+ */
20
+ declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<any>>;
21
+ export default Tag;
@@ -0,0 +1,61 @@
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 } from "@emotion/react";
30
+ import styled from "@emotion/styled";
31
+ import React from "react";
32
+ import { CloseFillIcon } from "../icons/system";
33
+ import { useTheme } from "@emotion/react";
34
+ var COLOR_TO_STYLE = function (theme, color) {
35
+ return ({
36
+ default: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n box-sizing: border-box;\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n "], ["\n box-sizing: border-box;\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n "])), theme.color.container.marbleContainer, theme.color.container.marbleOnContainer, theme.color.container.marbleOnContainer),
37
+ red: css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n box-sizing: border-box;\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n "], ["\n box-sizing: border-box;\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n "])), theme.color.container.dangerContainer, theme.color.container.dangerOnContainer, theme.color.container.dangerOnContainer),
38
+ teal: css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n box-sizing: border-box;\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n "], ["\n box-sizing: border-box;\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n "])), theme.color.container.infoContainer, theme.color.container.infoOnContainer, theme.color.container.infoOnContainer),
39
+ orange: css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n box-sizing: border-box;\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n "], ["\n box-sizing: border-box;\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n "])), theme.color.container.secondaryContainer, theme.color.container.secondaryOnContainer, theme.color.container.secondaryOnContainer),
40
+ blue: css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n box-sizing: border-box;\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n "], ["\n box-sizing: border-box;\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n "])), theme.color.container.primaryContainer, theme.color.container.primaryOnContainer, theme.color.container.primaryOnContainer),
41
+ green: css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n box-sizing: border-box;\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n "], ["\n box-sizing: border-box;\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n "])), theme.color.container.successContainer, theme.color.container.successOnContainer, theme.color.container.successOnContainer),
42
+ yellow: css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n box-sizing: border-box;\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n "], ["\n box-sizing: border-box;\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n "])), theme.color.container.warningContainer, theme.color.container.warningOnContainer, theme.color.container.warningOnContainer),
43
+ black: css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n "], ["\n background: ", ";\n color: ", ";\n "])), theme.color.container.obsidianContainer, theme.color.container.obsidianOnContainer),
44
+ }[color]);
45
+ };
46
+ /**
47
+ * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=42-869&t=HZXCHP0r0tbvMA6v-0)
48
+ */
49
+ var Tag = React.forwardRef(function (props, ref) {
50
+ var className = props.className, _a = props.component, Component = _a === void 0 ? "span" : _a, label = props.label, icon = props.icon, _b = props.color, color = _b === void 0 ? "default" : _b, close = props.close, onClick = props.onClick, other = __rest(props, ["className", "component", "label", "icon", "color", "close", "onClick"]);
51
+ var theme = useTheme();
52
+ return (_jsxs(Component, __assign({}, other, { ref: ref, className: className, css: [
53
+ css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n // flex\uAC00 \uD654\uBA74 \uC804\uCCB4\uB85C \uD655\uC7A5\uB418\uC9C0 \uC54A\uACE0 \uB0B4\uBD80\uC758 \uC544\uC774\uCF58\uACFC \uD14D\uC2A4\uD2B8\uB9CC \uD3EC\uD568\uD55C\uB2E4.\n padding: 1px 8px;\n align-items: center;\n gap: 3px;\n width: fit-content;\n border-radius: 8px;\n\n svg {\n width: 14px;\n height: 14px;\n }\n "], ["\n box-sizing: border-box;\n display: flex;\n // flex\uAC00 \uD654\uBA74 \uC804\uCCB4\uB85C \uD655\uC7A5\uB418\uC9C0 \uC54A\uACE0 \uB0B4\uBD80\uC758 \uC544\uC774\uCF58\uACFC \uD14D\uC2A4\uD2B8\uB9CC \uD3EC\uD568\uD55C\uB2E4.\n padding: 1px 8px;\n align-items: center;\n gap: 3px;\n width: fit-content;\n border-radius: 8px;\n\n svg {\n width: 14px;\n height: 14px;\n }\n "]))),
54
+ COLOR_TO_STYLE(theme, color),
55
+ close
56
+ ? css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n cursor: pointer;\n "], ["\n cursor: pointer;\n "]))) : undefined,
57
+ ], onClick: onClick }, { children: [icon, _jsx("span", __assign({ css: css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n font-weight: 400;\n font-size: 12px;\n line-height: 20px;\n "], ["\n font-weight: 400;\n font-size: 12px;\n line-height: 20px;\n "]))) }, { children: label })), close && _jsx(StyledCloseFillIcon, {})] })));
58
+ });
59
+ var StyledCloseFillIcon = styled(CloseFillIcon)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n width: 10px;\n height: 10px;\n"], ["\n width: 10px;\n height: 10px;\n"])));
60
+ export default Tag;
61
+ 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;
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+ export interface TooltipProps {
3
+ className?: string;
4
+ /** 툴팁에 표시될 제목 텍스트 */
5
+ title?: string;
6
+ /** 툴팁에 표시될 text 영역 값 */
7
+ text: React.ReactNode;
8
+ /** `true` 값일때 Tooltip을 오픈합니다. */
9
+ open?: boolean;
10
+ /** Tooltip이 오픈될 때 호출되는 함수. */
11
+ onOpen?: (event: React.SyntheticEvent) => void;
12
+ /** Tooltip이 닫힐 때 호출되는 함수. */
13
+ onClose?: (event: React.SyntheticEvent | Event) => void;
14
+ /**
15
+ * Tooltip placement.
16
+ * @default bottom
17
+ */
18
+ placement?: "bottom-end" | "bottom-start" | "bottom" | "left-end" | "left-start" | "left" | "right-end" | "right-start" | "right" | "top-end" | "top-start" | "top";
19
+ /** 툴팁을 표시할 객체입니다. ref를 props로 받을 수 있어야합니다. */
20
+ children: React.ReactElement<any, any>;
21
+ }
22
+ /**
23
+ * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=172-626&t=aFkKTFgWq2xFFGC5-0)
24
+ */
25
+ declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<any>>;
26
+ export default Tooltip;
@@ -0,0 +1,50 @@
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 { css } from "@emotion/react";
30
+ import styled from "@emotion/styled";
31
+ import React from "react";
32
+ import { Tooltip as MuiTooltip, } from "@mui/material";
33
+ /**
34
+ * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=172-626&t=aFkKTFgWq2xFFGC5-0)
35
+ */
36
+ var Tooltip = React.forwardRef(function (props, ref) {
37
+ var title = props.title, text = props.text, children = props.children, restProps = __rest(props, ["title", "text", "children"]);
38
+ return (_jsx(StyledTooltip, __assign({ ref: ref, title: _jsxs(_Fragment, { children: [title && _jsx(TitleDiv, { children: title }), text] }) }, restProps, { children: children })));
39
+ });
40
+ // https://mui.com/material-ui/react-tooltip/#customization
41
+ var StyledTooltip = styled(function (_a) {
42
+ var className = _a.className, props = __rest(_a, ["className"]);
43
+ return (_jsx(MuiTooltip, __assign({}, props, { classes: { popper: className } })));
44
+ })(function (_a) {
45
+ var theme = _a.theme;
46
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .MuiTooltip-tooltip {\n background: ", ";\n border-radius: 8px;\n padding: 6px 10px;\n\n display: flex;\n flex-direction: column;\n gap: 2px;\n\n color: ", ";\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n }\n "], ["\n .MuiTooltip-tooltip {\n background: ", ";\n border-radius: 8px;\n padding: 6px 10px;\n\n display: flex;\n flex-direction: column;\n gap: 2px;\n\n color: ", ";\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n }\n "])), theme.color.foreground.neutralBase, theme.color.background.neutralBase);
47
+ });
48
+ var TitleDiv = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-weight: 700;\n"], ["\n font-weight: 700;\n"])));
49
+ export default Tooltip;
50
+ var templateObject_1, templateObject_2;
@@ -0,0 +1,75 @@
1
+ declare const _default: {
2
+ blue10: string;
3
+ priamry09: string;
4
+ blue08: string;
5
+ blue07: string;
6
+ blue06: string;
7
+ blue05: string;
8
+ blue04: string;
9
+ blue03: string;
10
+ blue02: string;
11
+ blue01: string;
12
+ orange10: string;
13
+ orange09: string;
14
+ orange08: string;
15
+ orange07: string;
16
+ orange06: string;
17
+ orange05: string;
18
+ orange04: string;
19
+ orange03: string;
20
+ orange02: string;
21
+ orange01: string;
22
+ teal10: string;
23
+ teal09: string;
24
+ teal08: string;
25
+ teal07: string;
26
+ teal06: string;
27
+ teal05: string;
28
+ teal04: string;
29
+ teal03: string;
30
+ teal02: string;
31
+ teal01: string;
32
+ yellow10: string;
33
+ yellow09: string;
34
+ yellow08: string;
35
+ yellow07: string;
36
+ yellow06: string;
37
+ yellow05: string;
38
+ yellow04: string;
39
+ yellow03: string;
40
+ yellow02: string;
41
+ yellow01: string;
42
+ green10: string;
43
+ green09: string;
44
+ green08: string;
45
+ green07: string;
46
+ green06: string;
47
+ green05: string;
48
+ green04: string;
49
+ green03: string;
50
+ green02: string;
51
+ green01: string;
52
+ red10: string;
53
+ red09: string;
54
+ red08: string;
55
+ red07: string;
56
+ red06: string;
57
+ red05: string;
58
+ red04: string;
59
+ red03: string;
60
+ red02: string;
61
+ red01: string;
62
+ black: string;
63
+ grey10: string;
64
+ grey09: string;
65
+ grey08: string;
66
+ grey07: string;
67
+ grey06: string;
68
+ grey05: string;
69
+ grey04: string;
70
+ grey03: string;
71
+ grey02: string;
72
+ grey01: string;
73
+ white: string;
74
+ };
75
+ export default _default;
@@ -0,0 +1,75 @@
1
+ // eslint-disable-next-line import/no-anonymous-default-export
2
+ export default {
3
+ blue10: "#1C3D73",
4
+ priamry09: "#234E91",
5
+ blue08: "#2C61B5",
6
+ blue07: "#3574D9",
7
+ blue06: "#3E88FF",
8
+ blue05: "#619DFF",
9
+ blue04: "#85B4FF",
10
+ blue03: "#ACCCFF",
11
+ blue02: "#D1E2FF",
12
+ blue01: "#ECF3FF",
13
+ orange10: "#6B421A",
14
+ orange09: "#8C5622",
15
+ orange08: "#B56F2C",
16
+ orange07: "#E88F38",
17
+ orange06: "#FF9D3E",
18
+ orange05: "#FFB165",
19
+ orange04: "#FFBD7E",
20
+ orange03: "#FFD2A6",
21
+ orange02: "#FFE1C3",
22
+ orange01: "#FFF5EC",
23
+ teal10: "#1C6069",
24
+ teal09: "#257D89",
25
+ teal08: "#30A2B1",
26
+ teal07: "#3DCFE3",
27
+ teal06: "#43E4F9",
28
+ teal05: "#69E9FA",
29
+ teal04: "#81EDFB",
30
+ teal03: "#A9F3FC",
31
+ teal02: "#C5F7FD",
32
+ teal01: "#ECFCFE",
33
+ yellow10: "#6B5402",
34
+ yellow09: "#8C6F03",
35
+ yellow08: "#B58F04",
36
+ yellow07: "#E8B705",
37
+ yellow06: "#FFC905",
38
+ yellow05: "#FFD437",
39
+ yellow04: "#FFDB58",
40
+ yellow03: "#FFE68C",
41
+ yellow02: "#FFEEB2",
42
+ yellow01: "#FFFAE6",
43
+ green10: "#3F580C",
44
+ green09: "#527310",
45
+ green08: "#6A9415",
46
+ green07: "#88BE1A",
47
+ green06: "#95D11D",
48
+ green05: "#AADA4A",
49
+ green04: "#B8E068",
50
+ green03: "#CEEA97",
51
+ green02: "#DEF1B9",
52
+ green01: "#F4FAE8",
53
+ red10: "#6B2013",
54
+ red09: "#8C2A19",
55
+ red08: "#B53720",
56
+ red07: "#E84629",
57
+ red06: "#FF4D2D",
58
+ red05: "#FF7157",
59
+ red04: "#FF8872",
60
+ red03: "#FFAD9E",
61
+ red02: "#FFC8BE",
62
+ red01: "#FFEDEA",
63
+ black: "#363636",
64
+ grey10: "#3E3E3E",
65
+ grey09: "#454545",
66
+ grey08: "#5F5F5F",
67
+ grey07: "#717171",
68
+ grey06: "#9C9C9C",
69
+ grey05: "#C8C8C8",
70
+ grey04: "#DEDEDE",
71
+ grey03: "#F2F2F2",
72
+ grey02: "#F6F6F6",
73
+ grey01: "#FDFDFD",
74
+ white: "#FFFFFF",
75
+ };
@@ -0,0 +1,9 @@
1
+ declare const shadows: {
2
+ shadow02: string;
3
+ shadow04: string;
4
+ shadow08: string;
5
+ shadow16: string;
6
+ shadow32: string;
7
+ shadow64: string;
8
+ };
9
+ export default shadows;
@@ -0,0 +1,10 @@
1
+ // https://www.figma.com/file/wefLB6cN0oM2VZjwYmBA6B/Codle-PD-Kit---Foundation?type=design&node-id=1-14238&t=Jg9tQ0vSRG6mw1RZ-0
2
+ var shadows = {
3
+ shadow02: "0px 0.15px 0.45px rgba(0, 0, 0, 0.11), \n 0px 0.8px 1.8px rgba(0, 0, 0, 0.13)",
4
+ shadow04: "0px 0.3px 0.9px rgba(0, 0, 0, 0.07),\n 0px 1.6px 3.6px rgba(0, 0, 0, 0.11);",
5
+ shadow08: "0px 0.6px 1.8px rgba(0, 0, 0, 0.11),\n 0px 3.2px 7.2px rgba(0, 0, 0, 0.13)",
6
+ shadow16: "0px 1.2px 3.6px rgba(0, 0, 0, 0.11),\n 0px 6.4px 14.4px rgba(0, 0, 0, 0.13)",
7
+ shadow32: "0px 2.4px 7.4px rgba(0, 0, 0, 0.18),\n 0px 12.8px 28.8px rgba(0, 0, 0, 0.22)",
8
+ shadow64: "0px 4.8px 14.4px rgba(0, 0, 0, 0.18),\n 0px 25.6px 57.6px rgba(0, 0, 0, 0.22)",
9
+ };
10
+ export default shadows;