@x-plat/design-system 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AutoResizeTextArea/index.cjs +14 -5
- package/dist/components/AutoResizeTextArea/index.css +15 -0
- package/dist/components/AutoResizeTextArea/index.d.cts +5 -0
- package/dist/components/AutoResizeTextArea/index.d.ts +5 -0
- package/dist/components/AutoResizeTextArea/index.js +14 -5
- package/dist/components/Badge/index.cjs +5 -1
- package/dist/components/Badge/index.css +1 -0
- package/dist/components/Badge/index.d.cts +1 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Badge/index.js +5 -1
- package/dist/components/Box/index.d.cts +3 -0
- package/dist/components/Box/index.d.ts +3 -0
- package/dist/components/Chart/index.cjs +7 -6
- package/dist/components/Chart/index.d.cts +12 -1
- package/dist/components/Chart/index.d.ts +12 -1
- package/dist/components/Chart/index.js +7 -6
- package/dist/components/ChatInput/index.cjs +20 -7
- package/dist/components/ChatInput/index.css +15 -0
- package/dist/components/ChatInput/index.d.cts +10 -0
- package/dist/components/ChatInput/index.d.ts +10 -0
- package/dist/components/ChatInput/index.js +20 -7
- package/dist/components/CheckBox/index.cjs +14 -5
- package/dist/components/CheckBox/index.css +17 -0
- package/dist/components/CheckBox/index.d.cts +10 -2
- package/dist/components/CheckBox/index.d.ts +10 -2
- package/dist/components/CheckBox/index.js +14 -5
- package/dist/components/Chip/index.d.cts +2 -0
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/DatePicker/index.cjs +181 -65
- package/dist/components/DatePicker/index.css +19 -0
- package/dist/components/DatePicker/index.js +181 -65
- package/dist/components/Drawer/index.cjs +83 -4
- package/dist/components/Drawer/index.d.cts +1 -0
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/Drawer/index.js +83 -4
- package/dist/components/Dropdown/index.cjs +35 -7
- package/dist/components/Dropdown/index.js +35 -7
- package/dist/components/Editor/index.cjs +178 -21
- package/dist/components/Editor/index.js +178 -21
- package/dist/components/FieldMessage/index.cjs +8 -3
- package/dist/components/FieldMessage/index.css +15 -0
- package/dist/components/FieldMessage/index.d.cts +11 -4
- package/dist/components/FieldMessage/index.d.ts +11 -4
- package/dist/components/FieldMessage/index.js +8 -3
- package/dist/components/FileUpload/index.cjs +8 -3
- package/dist/components/FileUpload/index.css +15 -0
- package/dist/components/FileUpload/index.d.cts +6 -0
- package/dist/components/FileUpload/index.d.ts +6 -0
- package/dist/components/FileUpload/index.js +8 -3
- package/dist/components/ImageSelector/index.cjs +8 -3
- package/dist/components/ImageSelector/index.css +15 -0
- package/dist/components/ImageSelector/index.d.cts +3 -0
- package/dist/components/ImageSelector/index.d.ts +3 -0
- package/dist/components/ImageSelector/index.js +8 -3
- package/dist/components/Input/index.cjs +15 -5
- package/dist/components/Input/index.css +15 -0
- package/dist/components/Input/index.d.cts +8 -0
- package/dist/components/Input/index.d.ts +8 -0
- package/dist/components/Input/index.js +15 -5
- package/dist/components/Modal/index.cjs +84 -5
- package/dist/components/Modal/index.js +84 -5
- package/dist/components/NotificationBadge/index.cjs +5 -1
- package/dist/components/NotificationBadge/index.css +1 -0
- package/dist/components/NotificationBadge/index.d.cts +6 -2
- package/dist/components/NotificationBadge/index.d.ts +6 -2
- package/dist/components/NotificationBadge/index.js +5 -1
- package/dist/components/Pagination/index.cjs +6 -2
- package/dist/components/Pagination/index.css +1 -0
- package/dist/components/Pagination/index.d.cts +13 -2
- package/dist/components/Pagination/index.d.ts +13 -2
- package/dist/components/Pagination/index.js +6 -2
- package/dist/components/PopOver/index.cjs +34 -6
- package/dist/components/PopOver/index.js +34 -6
- package/dist/components/Progress/index.cjs +6 -2
- package/dist/components/Progress/index.css +1 -0
- package/dist/components/Progress/index.d.cts +11 -2
- package/dist/components/Progress/index.d.ts +11 -2
- package/dist/components/Progress/index.js +6 -2
- package/dist/components/Radio/index.cjs +14 -5
- package/dist/components/Radio/index.css +17 -0
- package/dist/components/Radio/index.d.cts +11 -2
- package/dist/components/Radio/index.d.ts +11 -2
- package/dist/components/Radio/index.js +14 -5
- package/dist/components/Select/index.cjs +99 -31
- package/dist/components/Select/index.css +54 -0
- package/dist/components/Select/index.d.cts +16 -1
- package/dist/components/Select/index.d.ts +16 -1
- package/dist/components/Select/index.js +99 -31
- package/dist/components/Skeleton/index.d.cts +3 -0
- package/dist/components/Skeleton/index.d.ts +3 -0
- package/dist/components/Spinner/index.cjs +6 -2
- package/dist/components/Spinner/index.css +1 -0
- package/dist/components/Spinner/index.d.cts +8 -2
- package/dist/components/Spinner/index.d.ts +8 -2
- package/dist/components/Spinner/index.js +6 -2
- package/dist/components/Stat/index.cjs +84 -0
- package/dist/components/Stat/index.css +96 -0
- package/dist/components/Stat/index.d.cts +37 -0
- package/dist/components/Stat/index.d.ts +37 -0
- package/dist/components/Stat/index.js +57 -0
- package/dist/components/Steps/index.cjs +6 -2
- package/dist/components/Steps/index.css +11 -0
- package/dist/components/Steps/index.d.cts +9 -2
- package/dist/components/Steps/index.d.ts +9 -2
- package/dist/components/Steps/index.js +6 -2
- package/dist/components/Switch/index.cjs +20 -7
- package/dist/components/Switch/index.css +17 -0
- package/dist/components/Switch/index.d.cts +15 -2
- package/dist/components/Switch/index.d.ts +15 -2
- package/dist/components/Switch/index.js +20 -7
- package/dist/components/Tab/index.cjs +51 -26
- package/dist/components/Tab/index.css +4 -0
- package/dist/components/Tab/index.d.cts +12 -1
- package/dist/components/Tab/index.d.ts +12 -1
- package/dist/components/Tab/index.js +51 -26
- package/dist/components/Tag/index.cjs +5 -3
- package/dist/components/Tag/index.d.cts +12 -2
- package/dist/components/Tag/index.d.ts +12 -2
- package/dist/components/Tag/index.js +5 -3
- package/dist/components/TextArea/index.cjs +14 -4
- package/dist/components/TextArea/index.css +15 -0
- package/dist/components/TextArea/index.d.cts +7 -0
- package/dist/components/TextArea/index.d.ts +7 -0
- package/dist/components/TextArea/index.js +14 -4
- package/dist/components/TimePicker/index.cjs +448 -0
- package/dist/components/TimePicker/index.css +172 -0
- package/dist/components/TimePicker/index.d.cts +42 -0
- package/dist/components/TimePicker/index.d.ts +42 -0
- package/dist/components/TimePicker/index.js +411 -0
- package/dist/components/Tooltip/index.cjs +4 -2
- package/dist/components/Tooltip/index.d.cts +11 -1
- package/dist/components/Tooltip/index.d.ts +11 -1
- package/dist/components/Tooltip/index.js +4 -2
- package/dist/components/index.cjs +916 -385
- package/dist/components/index.css +296 -0
- package/dist/components/index.d.cts +3 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +914 -385
- package/dist/index.cjs +940 -409
- package/dist/index.css +296 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +938 -409
- package/dist/status-njWqQWFV.d.cts +20 -0
- package/dist/status-njWqQWFV.d.ts +20 -0
- package/guidelines/AGENT_PROMPT.md +18 -3
- package/guidelines/Guidelines.md +3 -0
- package/guidelines/components/card.md +3 -3
- package/guidelines/components/editor.md +86 -0
- package/guidelines/components/feedback.md +1 -1
- package/guidelines/components/form.md +19 -0
- package/guidelines/components/navigation.md +16 -15
- package/guidelines/components/overlay.md +43 -4
- package/guidelines/components/stat.md +31 -0
- package/guidelines/components/time-picker.md +49 -0
- package/package.json +1 -1
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { L as LegacyStatusType } from '../../status-njWqQWFV.cjs';
|
|
2
3
|
|
|
3
4
|
type SpinnerSize = "sm" | "md" | "lg";
|
|
4
|
-
|
|
5
|
+
/** Spinner 의 상태 색 */
|
|
6
|
+
type SpinnerType = "primary" | "success" | "error" | "warning" | "info";
|
|
7
|
+
/** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
|
|
8
|
+
type SpinnerTypeInput = SpinnerType | LegacyStatusType;
|
|
5
9
|
interface SpinnerProps {
|
|
10
|
+
/** 스피너 지름 */
|
|
6
11
|
size?: SpinnerSize;
|
|
7
|
-
|
|
12
|
+
/** 스피너 색 */
|
|
13
|
+
type?: SpinnerTypeInput;
|
|
8
14
|
}
|
|
9
15
|
declare const Spinner: {
|
|
10
16
|
(props: SpinnerProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { L as LegacyStatusType } from '../../status-njWqQWFV.js';
|
|
2
3
|
|
|
3
4
|
type SpinnerSize = "sm" | "md" | "lg";
|
|
4
|
-
|
|
5
|
+
/** Spinner 의 상태 색 */
|
|
6
|
+
type SpinnerType = "primary" | "success" | "error" | "warning" | "info";
|
|
7
|
+
/** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
|
|
8
|
+
type SpinnerTypeInput = SpinnerType | LegacyStatusType;
|
|
5
9
|
interface SpinnerProps {
|
|
10
|
+
/** 스피너 지름 */
|
|
6
11
|
size?: SpinnerSize;
|
|
7
|
-
|
|
12
|
+
/** 스피너 색 */
|
|
13
|
+
type?: SpinnerTypeInput;
|
|
8
14
|
}
|
|
9
15
|
declare const Spinner: {
|
|
10
16
|
(props: SpinnerProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/tokens/interface/status.ts
|
|
2
|
+
var normalizeStatus = (value) => value === "brand" ? "primary" : value;
|
|
3
|
+
|
|
1
4
|
// ../../node_modules/clsx/dist/clsx.mjs
|
|
2
5
|
function r(e) {
|
|
3
6
|
var t, f, n = "";
|
|
@@ -19,12 +22,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
19
22
|
var Spinner = (props) => {
|
|
20
23
|
const {
|
|
21
24
|
size = "md",
|
|
22
|
-
type = "
|
|
25
|
+
type = "primary"
|
|
23
26
|
} = props;
|
|
27
|
+
const statusType = normalizeStatus(type);
|
|
24
28
|
return /* @__PURE__ */ jsx(
|
|
25
29
|
"div",
|
|
26
30
|
{
|
|
27
|
-
className: clsx_default("lib-xplat-spinner", size,
|
|
31
|
+
className: clsx_default("lib-xplat-spinner", size, statusType),
|
|
28
32
|
role: "status",
|
|
29
33
|
"aria-label": "\uB85C\uB529 \uC911",
|
|
30
34
|
children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/components/Stat/index.ts
|
|
21
|
+
var Stat_exports = {};
|
|
22
|
+
__export(Stat_exports, {
|
|
23
|
+
Stat: () => Stat_default
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(Stat_exports);
|
|
26
|
+
|
|
27
|
+
// src/tokens/interface/status.ts
|
|
28
|
+
var normalizeStatus = (value) => value === "brand" ? "primary" : value;
|
|
29
|
+
|
|
30
|
+
// ../../node_modules/clsx/dist/clsx.mjs
|
|
31
|
+
function r(e) {
|
|
32
|
+
var t, f, n = "";
|
|
33
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
34
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
35
|
+
var o = e.length;
|
|
36
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
37
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
38
|
+
return n;
|
|
39
|
+
}
|
|
40
|
+
function clsx() {
|
|
41
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
42
|
+
return n;
|
|
43
|
+
}
|
|
44
|
+
var clsx_default = clsx;
|
|
45
|
+
|
|
46
|
+
// src/components/Stat/Stat.tsx
|
|
47
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
48
|
+
var ARROW = {
|
|
49
|
+
up: "\u25B2",
|
|
50
|
+
down: "\u25BC",
|
|
51
|
+
flat: "\u2014"
|
|
52
|
+
};
|
|
53
|
+
var Stat = (props) => {
|
|
54
|
+
const {
|
|
55
|
+
label,
|
|
56
|
+
value,
|
|
57
|
+
unit,
|
|
58
|
+
description,
|
|
59
|
+
trend,
|
|
60
|
+
icon,
|
|
61
|
+
size = "md",
|
|
62
|
+
type = "primary"
|
|
63
|
+
} = props;
|
|
64
|
+
const statusType = normalizeStatus(type);
|
|
65
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: clsx_default("lib-xplat-stat", size, statusType), children: [
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "stat-label", children: label }),
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "stat-value-row", children: [
|
|
68
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "stat-icon", children: icon }),
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "stat-value", children: value }),
|
|
70
|
+
unit && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "stat-unit", children: unit }),
|
|
71
|
+
trend && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: clsx_default("stat-trend", trend.direction), children: [
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": "true", children: ARROW[trend.direction] }),
|
|
73
|
+
trend.value
|
|
74
|
+
] })
|
|
75
|
+
] }),
|
|
76
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "stat-description", children: description })
|
|
77
|
+
] });
|
|
78
|
+
};
|
|
79
|
+
Stat.displayName = "Stat";
|
|
80
|
+
var Stat_default = Stat;
|
|
81
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
82
|
+
0 && (module.exports = {
|
|
83
|
+
Stat
|
|
84
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/* src/components/Stat/stat.scss */
|
|
2
|
+
.lib-xplat-stat {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: var(--spacing-space-1);
|
|
6
|
+
}
|
|
7
|
+
.lib-xplat-stat .stat-label {
|
|
8
|
+
font-family: var(--semantic-typo-caption-1-r-font);
|
|
9
|
+
font-size: var(--semantic-typo-caption-1-r-size);
|
|
10
|
+
line-height: var(--semantic-typo-caption-1-r-lh);
|
|
11
|
+
font-weight: var(--semantic-typo-caption-1-r-weight);
|
|
12
|
+
letter-spacing: var(--semantic-typo-caption-1-r-ls);
|
|
13
|
+
color: var(--semantic-text-tertiary);
|
|
14
|
+
}
|
|
15
|
+
.lib-xplat-stat .stat-value-row {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: baseline;
|
|
18
|
+
gap: var(--spacing-space-2);
|
|
19
|
+
}
|
|
20
|
+
.lib-xplat-stat .stat-icon {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
align-self: center;
|
|
24
|
+
color: var(--semantic-icon-secondary);
|
|
25
|
+
}
|
|
26
|
+
.lib-xplat-stat .stat-value {
|
|
27
|
+
font-family: var(--semantic-typo-title-1-sb-font);
|
|
28
|
+
font-size: var(--semantic-typo-title-1-sb-size);
|
|
29
|
+
line-height: var(--semantic-typo-title-1-sb-lh);
|
|
30
|
+
font-weight: var(--semantic-typo-title-1-sb-weight);
|
|
31
|
+
letter-spacing: var(--semantic-typo-title-1-sb-ls);
|
|
32
|
+
color: var(--semantic-text-primary);
|
|
33
|
+
font-variant-numeric: tabular-nums;
|
|
34
|
+
}
|
|
35
|
+
.lib-xplat-stat .stat-unit {
|
|
36
|
+
font-family: var(--semantic-typo-label-2-m-font);
|
|
37
|
+
font-size: var(--semantic-typo-label-2-m-size);
|
|
38
|
+
line-height: var(--semantic-typo-label-2-m-lh);
|
|
39
|
+
font-weight: var(--semantic-typo-label-2-m-weight);
|
|
40
|
+
letter-spacing: var(--semantic-typo-label-2-m-ls);
|
|
41
|
+
color: var(--semantic-text-tertiary);
|
|
42
|
+
}
|
|
43
|
+
.lib-xplat-stat .stat-trend {
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: var(--spacing-space-1);
|
|
47
|
+
font-family: var(--semantic-typo-caption-1-m-font);
|
|
48
|
+
font-size: var(--semantic-typo-caption-1-m-size);
|
|
49
|
+
line-height: var(--semantic-typo-caption-1-m-lh);
|
|
50
|
+
font-weight: var(--semantic-typo-caption-1-m-weight);
|
|
51
|
+
letter-spacing: var(--semantic-typo-caption-1-m-ls);
|
|
52
|
+
font-variant-numeric: tabular-nums;
|
|
53
|
+
}
|
|
54
|
+
.lib-xplat-stat .stat-trend.up {
|
|
55
|
+
color: var(--semantic-text-success);
|
|
56
|
+
}
|
|
57
|
+
.lib-xplat-stat .stat-trend.down {
|
|
58
|
+
color: var(--semantic-text-error);
|
|
59
|
+
}
|
|
60
|
+
.lib-xplat-stat .stat-trend.flat {
|
|
61
|
+
color: var(--semantic-text-tertiary);
|
|
62
|
+
}
|
|
63
|
+
.lib-xplat-stat .stat-description {
|
|
64
|
+
font-family: var(--semantic-typo-caption-2-r-font);
|
|
65
|
+
font-size: var(--semantic-typo-caption-2-r-size);
|
|
66
|
+
line-height: var(--semantic-typo-caption-2-r-lh);
|
|
67
|
+
font-weight: var(--semantic-typo-caption-2-r-weight);
|
|
68
|
+
letter-spacing: var(--semantic-typo-caption-2-r-ls);
|
|
69
|
+
color: var(--semantic-text-tertiary);
|
|
70
|
+
}
|
|
71
|
+
.lib-xplat-stat.sm .stat-value {
|
|
72
|
+
font-family: var(--semantic-typo-heading-1-sb-font);
|
|
73
|
+
font-size: var(--semantic-typo-heading-1-sb-size);
|
|
74
|
+
line-height: var(--semantic-typo-heading-1-sb-lh);
|
|
75
|
+
font-weight: var(--semantic-typo-heading-1-sb-weight);
|
|
76
|
+
letter-spacing: var(--semantic-typo-heading-1-sb-ls);
|
|
77
|
+
}
|
|
78
|
+
.lib-xplat-stat.lg .stat-value {
|
|
79
|
+
font-family: var(--semantic-typo-display-2-sb-font);
|
|
80
|
+
font-size: var(--semantic-typo-display-2-sb-size);
|
|
81
|
+
line-height: var(--semantic-typo-display-2-sb-lh);
|
|
82
|
+
font-weight: var(--semantic-typo-display-2-sb-weight);
|
|
83
|
+
letter-spacing: var(--semantic-typo-display-2-sb-ls);
|
|
84
|
+
}
|
|
85
|
+
.lib-xplat-stat.success .stat-value {
|
|
86
|
+
color: var(--semantic-text-success);
|
|
87
|
+
}
|
|
88
|
+
.lib-xplat-stat.error .stat-value {
|
|
89
|
+
color: var(--semantic-text-error);
|
|
90
|
+
}
|
|
91
|
+
.lib-xplat-stat.warning .stat-value {
|
|
92
|
+
color: var(--semantic-text-warning);
|
|
93
|
+
}
|
|
94
|
+
.lib-xplat-stat.info .stat-value {
|
|
95
|
+
color: var(--semantic-text-info);
|
|
96
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { S as StatusTypeInput } from '../../status-njWqQWFV.cjs';
|
|
4
|
+
|
|
5
|
+
type StatSize = "sm" | "md" | "lg";
|
|
6
|
+
type TrendDirection = "up" | "down" | "flat";
|
|
7
|
+
/** 큰 숫자 하나를 강조해 보여주는 칸. 대시보드의 지표 타일에 쓴다 */
|
|
8
|
+
interface StatProps {
|
|
9
|
+
/** 지표 이름 (예: "총 호출 수") */
|
|
10
|
+
label: React.ReactNode;
|
|
11
|
+
/** 강조할 값. 포맷은 호출부가 정한다 (천 단위 구분·통화 기호 등) */
|
|
12
|
+
value: React.ReactNode;
|
|
13
|
+
/** 값 뒤에 붙는 단위 (예: "원", "회"). 값보다 작게 표시된다 */
|
|
14
|
+
unit?: React.ReactNode;
|
|
15
|
+
/** 값 아래 보조 설명 */
|
|
16
|
+
description?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* 증감 표시. `value` 는 이미 포맷된 문자열을 그대로 쓴다 (예: "+12.4%").
|
|
19
|
+
* `direction` 이 색과 화살표를 정한다
|
|
20
|
+
*/
|
|
21
|
+
trend?: {
|
|
22
|
+
direction: TrendDirection;
|
|
23
|
+
value: React.ReactNode;
|
|
24
|
+
};
|
|
25
|
+
/** 값 왼쪽에 놓을 아이콘 */
|
|
26
|
+
icon?: React.ReactNode;
|
|
27
|
+
/** 타일 크기 */
|
|
28
|
+
size?: StatSize;
|
|
29
|
+
/** 값 색. 상태를 나타낼 때 쓴다 */
|
|
30
|
+
type?: StatusTypeInput;
|
|
31
|
+
}
|
|
32
|
+
declare const Stat: {
|
|
33
|
+
(props: StatProps): react_jsx_runtime.JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { Stat };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { S as StatusTypeInput } from '../../status-njWqQWFV.js';
|
|
4
|
+
|
|
5
|
+
type StatSize = "sm" | "md" | "lg";
|
|
6
|
+
type TrendDirection = "up" | "down" | "flat";
|
|
7
|
+
/** 큰 숫자 하나를 강조해 보여주는 칸. 대시보드의 지표 타일에 쓴다 */
|
|
8
|
+
interface StatProps {
|
|
9
|
+
/** 지표 이름 (예: "총 호출 수") */
|
|
10
|
+
label: React.ReactNode;
|
|
11
|
+
/** 강조할 값. 포맷은 호출부가 정한다 (천 단위 구분·통화 기호 등) */
|
|
12
|
+
value: React.ReactNode;
|
|
13
|
+
/** 값 뒤에 붙는 단위 (예: "원", "회"). 값보다 작게 표시된다 */
|
|
14
|
+
unit?: React.ReactNode;
|
|
15
|
+
/** 값 아래 보조 설명 */
|
|
16
|
+
description?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* 증감 표시. `value` 는 이미 포맷된 문자열을 그대로 쓴다 (예: "+12.4%").
|
|
19
|
+
* `direction` 이 색과 화살표를 정한다
|
|
20
|
+
*/
|
|
21
|
+
trend?: {
|
|
22
|
+
direction: TrendDirection;
|
|
23
|
+
value: React.ReactNode;
|
|
24
|
+
};
|
|
25
|
+
/** 값 왼쪽에 놓을 아이콘 */
|
|
26
|
+
icon?: React.ReactNode;
|
|
27
|
+
/** 타일 크기 */
|
|
28
|
+
size?: StatSize;
|
|
29
|
+
/** 값 색. 상태를 나타낼 때 쓴다 */
|
|
30
|
+
type?: StatusTypeInput;
|
|
31
|
+
}
|
|
32
|
+
declare const Stat: {
|
|
33
|
+
(props: StatProps): react_jsx_runtime.JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { Stat };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// src/tokens/interface/status.ts
|
|
2
|
+
var normalizeStatus = (value) => value === "brand" ? "primary" : value;
|
|
3
|
+
|
|
4
|
+
// ../../node_modules/clsx/dist/clsx.mjs
|
|
5
|
+
function r(e) {
|
|
6
|
+
var t, f, n = "";
|
|
7
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
8
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
9
|
+
var o = e.length;
|
|
10
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
11
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
12
|
+
return n;
|
|
13
|
+
}
|
|
14
|
+
function clsx() {
|
|
15
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
16
|
+
return n;
|
|
17
|
+
}
|
|
18
|
+
var clsx_default = clsx;
|
|
19
|
+
|
|
20
|
+
// src/components/Stat/Stat.tsx
|
|
21
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
+
var ARROW = {
|
|
23
|
+
up: "\u25B2",
|
|
24
|
+
down: "\u25BC",
|
|
25
|
+
flat: "\u2014"
|
|
26
|
+
};
|
|
27
|
+
var Stat = (props) => {
|
|
28
|
+
const {
|
|
29
|
+
label,
|
|
30
|
+
value,
|
|
31
|
+
unit,
|
|
32
|
+
description,
|
|
33
|
+
trend,
|
|
34
|
+
icon,
|
|
35
|
+
size = "md",
|
|
36
|
+
type = "primary"
|
|
37
|
+
} = props;
|
|
38
|
+
const statusType = normalizeStatus(type);
|
|
39
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx_default("lib-xplat-stat", size, statusType), children: [
|
|
40
|
+
/* @__PURE__ */ jsx("div", { className: "stat-label", children: label }),
|
|
41
|
+
/* @__PURE__ */ jsxs("div", { className: "stat-value-row", children: [
|
|
42
|
+
icon && /* @__PURE__ */ jsx("span", { className: "stat-icon", children: icon }),
|
|
43
|
+
/* @__PURE__ */ jsx("span", { className: "stat-value", children: value }),
|
|
44
|
+
unit && /* @__PURE__ */ jsx("span", { className: "stat-unit", children: unit }),
|
|
45
|
+
trend && /* @__PURE__ */ jsxs("span", { className: clsx_default("stat-trend", trend.direction), children: [
|
|
46
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: ARROW[trend.direction] }),
|
|
47
|
+
trend.value
|
|
48
|
+
] })
|
|
49
|
+
] }),
|
|
50
|
+
description && /* @__PURE__ */ jsx("div", { className: "stat-description", children: description })
|
|
51
|
+
] });
|
|
52
|
+
};
|
|
53
|
+
Stat.displayName = "Stat";
|
|
54
|
+
var Stat_default = Stat;
|
|
55
|
+
export {
|
|
56
|
+
Stat_default as Stat
|
|
57
|
+
};
|
|
@@ -24,6 +24,9 @@ __export(Steps_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(Steps_exports);
|
|
26
26
|
|
|
27
|
+
// src/tokens/interface/status.ts
|
|
28
|
+
var normalizeStatus = (value) => value === "brand" ? "primary" : value;
|
|
29
|
+
|
|
27
30
|
// src/tokens/svg/action/CopyIcon.tsx
|
|
28
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
32
|
|
|
@@ -946,9 +949,10 @@ var Steps = (props) => {
|
|
|
946
949
|
const {
|
|
947
950
|
items,
|
|
948
951
|
current,
|
|
949
|
-
type = "
|
|
952
|
+
type = "primary"
|
|
950
953
|
} = props;
|
|
951
|
-
|
|
954
|
+
const statusType = normalizeStatus(type);
|
|
955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", { className: clsx_default("lib-xplat-steps", statusType), children: items.map((item, index) => {
|
|
952
956
|
const status = index < current ? "completed" : index === current ? "active" : "pending";
|
|
953
957
|
return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { className: clsx_default("step-item", status), children: [
|
|
954
958
|
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", { className: "step-circle", children: status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(CheckIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("span", { children: index + 1 }) }),
|
|
@@ -63,6 +63,17 @@
|
|
|
63
63
|
color: var(--semantic-text-tertiary);
|
|
64
64
|
margin-top: 2px;
|
|
65
65
|
}
|
|
66
|
+
.lib-xplat-steps.primary .step-item.completed .step-circle {
|
|
67
|
+
color: var(--semantic-text-inverse);
|
|
68
|
+
background-color: var(--semantic-surface-primary-default);
|
|
69
|
+
}
|
|
70
|
+
.lib-xplat-steps.primary .step-item.completed::after {
|
|
71
|
+
background-color: var(--semantic-surface-primary-default);
|
|
72
|
+
}
|
|
73
|
+
.lib-xplat-steps.primary .step-item.active .step-circle {
|
|
74
|
+
color: var(--semantic-text-inverse);
|
|
75
|
+
background-color: var(--semantic-surface-primary-default);
|
|
76
|
+
}
|
|
66
77
|
.lib-xplat-steps.brand .step-item.completed .step-circle {
|
|
67
78
|
color: var(--semantic-text-inverse);
|
|
68
79
|
background-color: var(--semantic-surface-brand-default);
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { L as LegacyStatusType } from '../../status-njWqQWFV.cjs';
|
|
2
3
|
|
|
3
4
|
interface StepItem {
|
|
4
5
|
title: string;
|
|
5
6
|
description?: string;
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
+
/** Steps 의 상태 색 */
|
|
9
|
+
type StepsType = "primary" | "success" | "error" | "warning" | "info";
|
|
10
|
+
/** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
|
|
11
|
+
type StepsTypeInput = StepsType | LegacyStatusType;
|
|
8
12
|
interface StepsProps {
|
|
13
|
+
/** 단계 목록. 순서대로 그려진다 */
|
|
9
14
|
items: StepItem[];
|
|
15
|
+
/** 진행 중인 단계 인덱스 (0부터). 앞은 완료, 뒤는 대기로 표시된다 */
|
|
10
16
|
current: number;
|
|
11
|
-
|
|
17
|
+
/** 완료·진행 단계의 색 */
|
|
18
|
+
type?: StepsTypeInput;
|
|
12
19
|
}
|
|
13
20
|
declare const Steps: {
|
|
14
21
|
(props: StepsProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { L as LegacyStatusType } from '../../status-njWqQWFV.js';
|
|
2
3
|
|
|
3
4
|
interface StepItem {
|
|
4
5
|
title: string;
|
|
5
6
|
description?: string;
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
+
/** Steps 의 상태 색 */
|
|
9
|
+
type StepsType = "primary" | "success" | "error" | "warning" | "info";
|
|
10
|
+
/** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
|
|
11
|
+
type StepsTypeInput = StepsType | LegacyStatusType;
|
|
8
12
|
interface StepsProps {
|
|
13
|
+
/** 단계 목록. 순서대로 그려진다 */
|
|
9
14
|
items: StepItem[];
|
|
15
|
+
/** 진행 중인 단계 인덱스 (0부터). 앞은 완료, 뒤는 대기로 표시된다 */
|
|
10
16
|
current: number;
|
|
11
|
-
|
|
17
|
+
/** 완료·진행 단계의 색 */
|
|
18
|
+
type?: StepsTypeInput;
|
|
12
19
|
}
|
|
13
20
|
declare const Steps: {
|
|
14
21
|
(props: StepsProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/tokens/interface/status.ts
|
|
2
|
+
var normalizeStatus = (value) => value === "brand" ? "primary" : value;
|
|
3
|
+
|
|
1
4
|
// src/tokens/svg/action/CopyIcon.tsx
|
|
2
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
6
|
|
|
@@ -920,9 +923,10 @@ var Steps = (props) => {
|
|
|
920
923
|
const {
|
|
921
924
|
items,
|
|
922
925
|
current,
|
|
923
|
-
type = "
|
|
926
|
+
type = "primary"
|
|
924
927
|
} = props;
|
|
925
|
-
|
|
928
|
+
const statusType = normalizeStatus(type);
|
|
929
|
+
return /* @__PURE__ */ jsx295("div", { className: clsx_default("lib-xplat-steps", statusType), children: items.map((item, index) => {
|
|
926
930
|
const status = index < current ? "completed" : index === current ? "active" : "pending";
|
|
927
931
|
return /* @__PURE__ */ jsxs189("div", { className: clsx_default("step-item", status), children: [
|
|
928
932
|
/* @__PURE__ */ jsx295("div", { className: "step-circle", children: status === "completed" ? /* @__PURE__ */ jsx295(CheckIcon_default, {}) : /* @__PURE__ */ jsx295("span", { children: index + 1 }) }),
|
|
@@ -37,6 +37,9 @@ module.exports = __toCommonJS(Switch_exports);
|
|
|
37
37
|
// src/components/Switch/Switch.tsx
|
|
38
38
|
var import_react = __toESM(require("react"), 1);
|
|
39
39
|
|
|
40
|
+
// src/tokens/interface/status.ts
|
|
41
|
+
var normalizeStatus = (value) => value === "brand" ? "primary" : value;
|
|
42
|
+
|
|
40
43
|
// ../../node_modules/clsx/dist/clsx.mjs
|
|
41
44
|
function r(e) {
|
|
42
45
|
var t, f, n = "";
|
|
@@ -176,11 +179,16 @@ var FieldMessage = (props) => {
|
|
|
176
179
|
};
|
|
177
180
|
FieldMessage.displayName = "FieldMessage";
|
|
178
181
|
var Field = (props) => {
|
|
179
|
-
const { validations, children } = props;
|
|
180
|
-
|
|
182
|
+
const { label, required = false, htmlFor, validations, children } = props;
|
|
183
|
+
const hasMessages = !!validations && validations.length > 0;
|
|
184
|
+
if (!label && !hasMessages) return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children });
|
|
181
185
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "lib-xplat-field", children: [
|
|
186
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("label", { className: "lib-xplat-field-label", htmlFor, children: [
|
|
187
|
+
label,
|
|
188
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "required", "aria-hidden": "true", children: "*" })
|
|
189
|
+
] }),
|
|
182
190
|
children,
|
|
183
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FieldMessage, { validations })
|
|
191
|
+
hasMessages && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FieldMessage, { validations })
|
|
184
192
|
] });
|
|
185
193
|
};
|
|
186
194
|
Field.displayName = "Field";
|
|
@@ -193,11 +201,15 @@ var Switch = (props) => {
|
|
|
193
201
|
const {
|
|
194
202
|
value,
|
|
195
203
|
size = "md",
|
|
196
|
-
type = "
|
|
204
|
+
type = "primary",
|
|
197
205
|
disabled,
|
|
198
206
|
onChange,
|
|
199
|
-
validations
|
|
207
|
+
validations,
|
|
208
|
+
label,
|
|
209
|
+
required
|
|
200
210
|
} = props;
|
|
211
|
+
const fieldId = import_react.default.useId();
|
|
212
|
+
const statusType = normalizeStatus(type);
|
|
201
213
|
const [isAnimating, setIsAnimating] = import_react.default.useState(false);
|
|
202
214
|
const timeoutRef = import_react.default.useRef(null);
|
|
203
215
|
import_react.default.useEffect(() => {
|
|
@@ -218,10 +230,11 @@ var Switch = (props) => {
|
|
|
218
230
|
const control = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
219
231
|
"div",
|
|
220
232
|
{
|
|
233
|
+
id: fieldId,
|
|
221
234
|
className: clsx_default(
|
|
222
235
|
"lib-xplat-switch",
|
|
223
236
|
size,
|
|
224
|
-
|
|
237
|
+
statusType,
|
|
225
238
|
value ? "checked" : void 0,
|
|
226
239
|
disabled && "disabled",
|
|
227
240
|
isAnimating && "animating"
|
|
@@ -232,7 +245,7 @@ var Switch = (props) => {
|
|
|
232
245
|
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: clsx_default("knob", value ? "checked" : void 0) })
|
|
233
246
|
}
|
|
234
247
|
);
|
|
235
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Field, { validations, children: control });
|
|
248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Field, { validations, label, required, htmlFor: fieldId, children: control });
|
|
236
249
|
};
|
|
237
250
|
Switch.displayName = "Switch";
|
|
238
251
|
var Switch_default = Switch;
|
|
@@ -4,6 +4,21 @@
|
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
gap: var(--spacing-space-2);
|
|
6
6
|
}
|
|
7
|
+
.lib-xplat-field-label {
|
|
8
|
+
font-family: var(--semantic-typo-label-2-m-font);
|
|
9
|
+
font-size: var(--semantic-typo-label-2-m-size);
|
|
10
|
+
line-height: var(--semantic-typo-label-2-m-lh);
|
|
11
|
+
font-weight: var(--semantic-typo-label-2-m-weight);
|
|
12
|
+
letter-spacing: var(--semantic-typo-label-2-m-ls);
|
|
13
|
+
color: var(--semantic-text-secondary);
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
gap: var(--spacing-space-1);
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
}
|
|
19
|
+
.lib-xplat-field-label > .required {
|
|
20
|
+
color: var(--semantic-text-error);
|
|
21
|
+
}
|
|
7
22
|
.lib-xplat-field-message-wrap {
|
|
8
23
|
display: flex;
|
|
9
24
|
gap: var(--spacing-space-2);
|
|
@@ -89,10 +104,12 @@
|
|
|
89
104
|
pointer-events: none;
|
|
90
105
|
cursor: wait;
|
|
91
106
|
}
|
|
107
|
+
.lib-xplat-switch.primary.checked,
|
|
92
108
|
.lib-xplat-switch.brand.checked {
|
|
93
109
|
background-color: var(--semantic-surface-brand-default);
|
|
94
110
|
border-color: var(--semantic-surface-brand-default);
|
|
95
111
|
}
|
|
112
|
+
.lib-xplat-switch.primary.checked:hover:not(.disabled):not(.animating),
|
|
96
113
|
.lib-xplat-switch.brand.checked:hover:not(.disabled):not(.animating) {
|
|
97
114
|
background-color: var(--semantic-surface-brand-strong);
|
|
98
115
|
border-color: var(--semantic-surface-brand-strong);
|
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { L as LegacyStatusType } from '../../status-njWqQWFV.cjs';
|
|
2
4
|
import { V as Validation } from '../../validation-Dqo1zqhT.cjs';
|
|
3
5
|
|
|
4
6
|
type SwitchSize = "sm" | "md" | "lg";
|
|
5
|
-
|
|
7
|
+
/** Switch 의 상태 색 */
|
|
8
|
+
type SwitchType = "primary" | "success" | "error" | "warning" | "info";
|
|
9
|
+
/** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
|
|
10
|
+
type SwitchTypeInput = SwitchType | LegacyStatusType;
|
|
6
11
|
interface SwitchProps {
|
|
12
|
+
/** 켜짐 여부. controlled 전용이라 onChange 와 함께 쓴다 */
|
|
7
13
|
value: boolean;
|
|
8
14
|
/** 컨트롤 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
|
|
9
15
|
validations?: Validation[];
|
|
16
|
+
/** 스위치 크기 */
|
|
17
|
+
/** 컨트롤 위에 붙는 라벨. 클릭하면 컨트롤에 포커스가 간다 */
|
|
18
|
+
label?: React.ReactNode;
|
|
19
|
+
/** 라벨 뒤에 필수 표시(*)를 붙인다 */
|
|
20
|
+
required?: boolean;
|
|
10
21
|
size?: SwitchSize;
|
|
11
|
-
|
|
22
|
+
/** 켜졌을 때의 색 */
|
|
23
|
+
type?: SwitchTypeInput;
|
|
12
24
|
disabled?: boolean;
|
|
25
|
+
/** 토글될 때 바뀐 값을 준다 */
|
|
13
26
|
onChange?: (value: boolean) => void;
|
|
14
27
|
}
|
|
15
28
|
declare const Switch: {
|
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { L as LegacyStatusType } from '../../status-njWqQWFV.js';
|
|
2
4
|
import { V as Validation } from '../../validation-Dqo1zqhT.js';
|
|
3
5
|
|
|
4
6
|
type SwitchSize = "sm" | "md" | "lg";
|
|
5
|
-
|
|
7
|
+
/** Switch 의 상태 색 */
|
|
8
|
+
type SwitchType = "primary" | "success" | "error" | "warning" | "info";
|
|
9
|
+
/** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
|
|
10
|
+
type SwitchTypeInput = SwitchType | LegacyStatusType;
|
|
6
11
|
interface SwitchProps {
|
|
12
|
+
/** 켜짐 여부. controlled 전용이라 onChange 와 함께 쓴다 */
|
|
7
13
|
value: boolean;
|
|
8
14
|
/** 컨트롤 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
|
|
9
15
|
validations?: Validation[];
|
|
16
|
+
/** 스위치 크기 */
|
|
17
|
+
/** 컨트롤 위에 붙는 라벨. 클릭하면 컨트롤에 포커스가 간다 */
|
|
18
|
+
label?: React.ReactNode;
|
|
19
|
+
/** 라벨 뒤에 필수 표시(*)를 붙인다 */
|
|
20
|
+
required?: boolean;
|
|
10
21
|
size?: SwitchSize;
|
|
11
|
-
|
|
22
|
+
/** 켜졌을 때의 색 */
|
|
23
|
+
type?: SwitchTypeInput;
|
|
12
24
|
disabled?: boolean;
|
|
25
|
+
/** 토글될 때 바뀐 값을 준다 */
|
|
13
26
|
onChange?: (value: boolean) => void;
|
|
14
27
|
}
|
|
15
28
|
declare const Switch: {
|