@x-plat/design-system 0.4.5 → 0.5.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/Accordion/index.cjs +294 -294
- package/dist/components/Accordion/index.css +11 -11
- package/dist/components/Accordion/index.d.cts +0 -1
- package/dist/components/Accordion/index.d.ts +0 -1
- package/dist/components/Accordion/index.js +491 -491
- package/dist/components/Alert/index.cjs +2 -2
- package/dist/components/Alert/index.css +19 -19
- package/dist/components/Alert/index.d.cts +0 -1
- package/dist/components/Alert/index.d.ts +0 -1
- package/dist/components/Alert/index.js +2 -2
- package/dist/components/Avatar/index.cjs +11 -6
- package/dist/components/Avatar/index.css +41 -11
- package/dist/components/Avatar/index.d.cts +1 -3
- package/dist/components/Avatar/index.d.ts +1 -3
- package/dist/components/Avatar/index.js +11 -6
- package/dist/components/Badge/index.cjs +4 -6
- package/dist/components/Badge/index.css +32 -19
- package/dist/components/Badge/index.d.cts +3 -3
- package/dist/components/Badge/index.d.ts +3 -3
- package/dist/components/Badge/index.js +4 -6
- package/dist/components/Breadcrumb/index.cjs +2 -18
- package/dist/components/Breadcrumb/index.css +6 -6
- package/dist/components/Breadcrumb/index.d.cts +0 -1
- package/dist/components/Breadcrumb/index.d.ts +0 -1
- package/dist/components/Breadcrumb/index.js +2 -18
- package/dist/components/Button/index.cjs +1 -4
- package/dist/components/Button/index.css +67 -23
- package/dist/components/Button/index.d.cts +2 -3
- package/dist/components/Button/index.d.ts +2 -3
- package/dist/components/Button/index.js +1 -4
- package/dist/components/Calendar/index.cjs +306 -307
- package/dist/components/Calendar/index.css +51 -52
- package/dist/components/Calendar/index.d.cts +3 -4
- package/dist/components/Calendar/index.d.ts +3 -4
- package/dist/components/Calendar/index.js +503 -504
- package/dist/components/Card/index.cjs +2 -18
- package/dist/components/Card/index.css +6 -6
- package/dist/components/Card/index.d.cts +0 -4
- package/dist/components/Card/index.d.ts +0 -4
- package/dist/components/Card/index.js +2 -18
- package/dist/components/CardTab/index.cjs +4 -5
- package/dist/components/CardTab/index.css +28 -28
- package/dist/components/CardTab/index.d.cts +0 -2
- package/dist/components/CardTab/index.d.ts +0 -2
- package/dist/components/CardTab/index.js +4 -5
- package/dist/components/Chart/index.cjs +228 -14548
- package/dist/components/Chart/index.css +57 -0
- package/dist/components/Chart/index.d.cts +3 -2
- package/dist/components/Chart/index.d.ts +3 -2
- package/dist/components/Chart/index.js +219 -14541
- package/dist/components/CheckBox/index.cjs +301 -297
- package/dist/components/CheckBox/index.css +50 -27
- package/dist/components/CheckBox/index.d.cts +3 -3
- package/dist/components/CheckBox/index.d.ts +3 -3
- package/dist/components/CheckBox/index.js +486 -482
- package/dist/components/Chip/index.cjs +2 -5
- package/dist/components/Chip/index.css +35 -23
- package/dist/components/Chip/index.d.cts +2 -4
- package/dist/components/Chip/index.d.ts +2 -4
- package/dist/components/Chip/index.js +2 -5
- package/dist/components/DatePicker/index.cjs +348 -359
- package/dist/components/DatePicker/index.css +175 -122
- package/dist/components/DatePicker/index.d.cts +2 -3
- package/dist/components/DatePicker/index.d.ts +2 -3
- package/dist/components/DatePicker/index.js +525 -536
- package/dist/components/Divider/index.cjs +2 -2
- package/dist/components/Divider/index.css +2 -2
- package/dist/components/Divider/index.d.cts +0 -1
- package/dist/components/Divider/index.d.ts +0 -1
- package/dist/components/Divider/index.js +2 -2
- package/dist/components/Drawer/index.css +7 -7
- package/dist/components/Dropdown/index.cjs +2 -2
- package/dist/components/Dropdown/index.css +10 -10
- package/dist/components/Dropdown/index.d.cts +0 -1
- package/dist/components/Dropdown/index.d.ts +0 -1
- package/dist/components/Dropdown/index.js +2 -2
- package/dist/components/EmptyState/index.cjs +2 -18
- package/dist/components/EmptyState/index.css +8 -9
- package/dist/components/EmptyState/index.d.cts +0 -1
- package/dist/components/EmptyState/index.d.ts +0 -1
- package/dist/components/EmptyState/index.js +2 -18
- package/dist/components/FileUpload/index.cjs +280 -281
- package/dist/components/FileUpload/index.css +13 -14
- package/dist/components/FileUpload/index.d.cts +0 -1
- package/dist/components/FileUpload/index.d.ts +0 -1
- package/dist/components/FileUpload/index.js +476 -477
- package/dist/components/HtmlTypeWriter/index.cjs +10 -10
- package/dist/components/HtmlTypeWriter/index.css +3 -3
- package/dist/components/HtmlTypeWriter/index.js +10 -10
- package/dist/components/ImageSelector/index.cjs +309 -309
- package/dist/components/ImageSelector/index.css +15 -15
- package/dist/components/ImageSelector/index.js +477 -477
- package/dist/components/Input/index.cjs +6 -7
- package/dist/components/Input/index.css +37 -26
- package/dist/components/Input/index.d.cts +2 -2
- package/dist/components/Input/index.d.ts +2 -2
- package/dist/components/Input/index.js +6 -7
- package/dist/components/Modal/index.css +5 -4
- package/dist/components/Pagination/index.cjs +303 -305
- package/dist/components/Pagination/index.css +37 -26
- package/dist/components/Pagination/index.d.cts +3 -3
- package/dist/components/Pagination/index.d.ts +3 -3
- package/dist/components/Pagination/index.js +500 -502
- package/dist/components/PopOver/index.css +3 -3
- package/dist/components/Progress/index.cjs +4 -6
- package/dist/components/Progress/index.css +23 -9
- package/dist/components/Progress/index.d.cts +3 -3
- package/dist/components/Progress/index.d.ts +3 -3
- package/dist/components/Progress/index.js +4 -6
- package/dist/components/Radio/index.cjs +4 -7
- package/dist/components/Radio/index.css +61 -29
- package/dist/components/Radio/index.d.cts +3 -3
- package/dist/components/Radio/index.d.ts +3 -3
- package/dist/components/Radio/index.js +4 -7
- package/dist/components/Select/index.cjs +294 -294
- package/dist/components/Select/index.css +46 -40
- package/dist/components/Select/index.d.cts +0 -1
- package/dist/components/Select/index.d.ts +0 -1
- package/dist/components/Select/index.js +491 -491
- package/dist/components/Skeleton/index.cjs +2 -2
- package/dist/components/Skeleton/index.css +3 -3
- package/dist/components/Skeleton/index.d.cts +0 -1
- package/dist/components/Skeleton/index.d.ts +0 -1
- package/dist/components/Skeleton/index.js +2 -2
- package/dist/components/Spinner/index.cjs +2 -4
- package/dist/components/Spinner/index.css +22 -8
- package/dist/components/Spinner/index.d.cts +3 -3
- package/dist/components/Spinner/index.d.ts +3 -3
- package/dist/components/Spinner/index.js +2 -4
- package/dist/components/Steps/index.cjs +296 -298
- package/dist/components/Steps/index.css +77 -22
- package/dist/components/Steps/index.d.cts +3 -3
- package/dist/components/Steps/index.d.ts +3 -3
- package/dist/components/Steps/index.js +481 -483
- package/dist/components/Swiper/index.cjs +2 -3
- package/dist/components/Swiper/index.css +10 -10
- package/dist/components/Swiper/index.d.cts +0 -1
- package/dist/components/Swiper/index.d.ts +0 -1
- package/dist/components/Swiper/index.js +2 -3
- package/dist/components/Switch/index.cjs +4 -7
- package/dist/components/Switch/index.css +58 -26
- package/dist/components/Switch/index.d.cts +3 -3
- package/dist/components/Switch/index.d.ts +3 -3
- package/dist/components/Switch/index.js +4 -7
- package/dist/components/Tab/index.css +15 -15
- package/dist/components/Table/index.cjs +22 -31
- package/dist/components/Table/index.css +15 -15
- package/dist/components/Table/index.d.cts +2 -8
- package/dist/components/Table/index.d.ts +2 -8
- package/dist/components/Table/index.js +22 -31
- package/dist/components/Tag/index.cjs +305 -293
- package/dist/components/Tag/index.css +58 -17
- package/dist/components/Tag/index.d.cts +5 -3
- package/dist/components/Tag/index.d.ts +5 -3
- package/dist/components/Tag/index.js +492 -480
- package/dist/components/TextArea/index.cjs +2 -2
- package/dist/components/TextArea/index.css +20 -9
- package/dist/components/TextArea/index.d.cts +2 -1
- package/dist/components/TextArea/index.d.ts +2 -1
- package/dist/components/TextArea/index.js +2 -2
- package/dist/components/Toast/index.css +22 -22
- package/dist/components/Tooltip/index.cjs +1 -3
- package/dist/components/Tooltip/index.css +6 -6
- package/dist/components/Tooltip/index.d.cts +1 -2
- package/dist/components/Tooltip/index.d.ts +1 -2
- package/dist/components/Tooltip/index.js +1 -3
- package/dist/components/Video/index.cjs +1 -3
- package/dist/components/Video/index.css +5 -5
- package/dist/components/Video/index.d.cts +0 -2
- package/dist/components/Video/index.d.ts +0 -2
- package/dist/components/Video/index.js +1 -3
- package/dist/components/index.cjs +1604 -15950
- package/dist/components/index.css +2167 -1061
- package/dist/components/index.d.cts +1 -2
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.js +1478 -15826
- package/dist/index.cjs +2941 -17269
- package/dist/index.css +2164 -1058
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2837 -17169
- package/dist/layout/Grid/FullGrid/index.cjs +9 -18
- package/dist/layout/Grid/FullGrid/index.d.cts +1 -1
- package/dist/layout/Grid/FullGrid/index.d.ts +1 -1
- package/dist/layout/Grid/FullGrid/index.js +9 -18
- package/dist/layout/Grid/FullScreen/index.cjs +9 -18
- package/dist/layout/Grid/FullScreen/index.d.cts +3 -3
- package/dist/layout/Grid/FullScreen/index.d.ts +3 -3
- package/dist/layout/Grid/FullScreen/index.js +9 -18
- package/dist/layout/Grid/index.cjs +34 -20
- package/dist/layout/Grid/index.js +34 -20
- package/dist/layout/index.cjs +34 -20
- package/dist/layout/index.css +1000 -295
- package/dist/layout/index.js +34 -20
- package/dist/tokens/index.cjs +1861 -1970
- package/dist/tokens/index.d.cts +209 -192
- package/dist/tokens/index.d.ts +209 -192
- package/dist/tokens/index.js +2048 -2159
- package/package.json +2 -4
- package/dist/colors-CY4JXVHj.d.cts +0 -137
- package/dist/colors-CY4JXVHj.d.ts +0 -137
- package/dist/layout/Grid/GapGrid/index.cjs +0 -32
- package/dist/layout/Grid/GapGrid/index.d.cts +0 -12
- package/dist/layout/Grid/GapGrid/index.d.ts +0 -12
- package/dist/layout/Grid/GapGrid/index.js +0 -11
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
cursor: default;
|
|
12
12
|
transition: transform 0.2s ease, opacity 0.2s ease;
|
|
13
13
|
background: white;
|
|
14
|
-
border-radius:
|
|
14
|
+
border-radius: var(--spacing-radius-md);
|
|
15
15
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
16
16
|
z-index: 10;
|
|
17
17
|
opacity: 0;
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
}
|
|
20
20
|
.lib-xplat-pop-over > .content-wrap.top {
|
|
21
21
|
transform-origin: bottom;
|
|
22
|
-
margin-bottom:
|
|
22
|
+
margin-bottom: var(--spacing-space-2);
|
|
23
23
|
}
|
|
24
24
|
.lib-xplat-pop-over > .content-wrap.bottom {
|
|
25
25
|
transform-origin: top;
|
|
26
|
-
margin-top:
|
|
26
|
+
margin-top: var(--spacing-space-2);
|
|
27
27
|
}
|
|
28
28
|
.lib-xplat-pop-over > .content-wrap.visible {
|
|
29
29
|
opacity: 1;
|
|
@@ -47,13 +47,11 @@ var Progress = (props) => {
|
|
|
47
47
|
value,
|
|
48
48
|
max = 100,
|
|
49
49
|
size = "md",
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
className
|
|
50
|
+
type = "brand",
|
|
51
|
+
showLabel = false
|
|
53
52
|
} = props;
|
|
54
|
-
const colorClass = color;
|
|
55
53
|
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
56
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: clsx_default("lib-xplat-progress", size,
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
|
|
57
55
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
56
|
"div",
|
|
59
57
|
{
|
|
@@ -65,7 +63,7 @@ var Progress = (props) => {
|
|
|
65
63
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
64
|
"div",
|
|
67
65
|
{
|
|
68
|
-
className:
|
|
66
|
+
className: "bar",
|
|
69
67
|
style: { width: `${percentage}%` }
|
|
70
68
|
}
|
|
71
69
|
)
|
|
@@ -2,34 +2,48 @@
|
|
|
2
2
|
.lib-xplat-progress {
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
|
-
gap:
|
|
5
|
+
gap: var(--spacing-space-2);
|
|
6
6
|
width: 100%;
|
|
7
7
|
}
|
|
8
8
|
.lib-xplat-progress .track {
|
|
9
9
|
flex: 1;
|
|
10
|
-
background-color: var(--
|
|
11
|
-
border-radius:
|
|
10
|
+
background-color: var(--semantic-surface-neutral-disabled);
|
|
11
|
+
border-radius: var(--spacing-radius-full);
|
|
12
12
|
overflow: hidden;
|
|
13
13
|
}
|
|
14
14
|
.lib-xplat-progress.sm .track {
|
|
15
|
-
height:
|
|
15
|
+
height: var(--spacing-space-1);
|
|
16
16
|
}
|
|
17
17
|
.lib-xplat-progress.md .track {
|
|
18
|
-
height:
|
|
18
|
+
height: var(--spacing-space-2);
|
|
19
19
|
}
|
|
20
20
|
.lib-xplat-progress.lg .track {
|
|
21
|
-
height:
|
|
21
|
+
height: var(--spacing-space-3);
|
|
22
22
|
}
|
|
23
23
|
.lib-xplat-progress .bar {
|
|
24
24
|
height: 100%;
|
|
25
|
-
border-radius:
|
|
25
|
+
border-radius: var(--spacing-radius-full);
|
|
26
26
|
transition: width 0.3s ease;
|
|
27
|
-
|
|
27
|
+
}
|
|
28
|
+
.lib-xplat-progress.brand .bar {
|
|
29
|
+
background-color: var(--semantic-surface-brand-default);
|
|
30
|
+
}
|
|
31
|
+
.lib-xplat-progress.success .bar {
|
|
32
|
+
background-color: var(--semantic-surface-success-default);
|
|
33
|
+
}
|
|
34
|
+
.lib-xplat-progress.error .bar {
|
|
35
|
+
background-color: var(--semantic-surface-error-default);
|
|
36
|
+
}
|
|
37
|
+
.lib-xplat-progress.warning .bar {
|
|
38
|
+
background-color: var(--semantic-surface-warning-default);
|
|
39
|
+
}
|
|
40
|
+
.lib-xplat-progress.info .bar {
|
|
41
|
+
background-color: var(--semantic-surface-info-default);
|
|
28
42
|
}
|
|
29
43
|
.lib-xplat-progress .label {
|
|
30
44
|
font-size: 12px;
|
|
31
45
|
font-weight: 500;
|
|
32
|
-
color: var(--
|
|
46
|
+
color: var(--semantic-text-subtle);
|
|
33
47
|
min-width: 36px;
|
|
34
48
|
text-align: right;
|
|
35
49
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { a as ColorProps } from '../../colors-CY4JXVHj.cjs';
|
|
3
2
|
|
|
4
3
|
type ProgressSize = "sm" | "md" | "lg";
|
|
5
|
-
|
|
4
|
+
type ProgressType = "brand" | "success" | "error" | "warning" | "info";
|
|
5
|
+
interface ProgressProps {
|
|
6
6
|
value: number;
|
|
7
7
|
max?: number;
|
|
8
8
|
size?: ProgressSize;
|
|
9
|
+
type?: ProgressType;
|
|
9
10
|
showLabel?: boolean;
|
|
10
|
-
className?: string;
|
|
11
11
|
}
|
|
12
12
|
declare const Progress: {
|
|
13
13
|
(props: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { a as ColorProps } from '../../colors-CY4JXVHj.js';
|
|
3
2
|
|
|
4
3
|
type ProgressSize = "sm" | "md" | "lg";
|
|
5
|
-
|
|
4
|
+
type ProgressType = "brand" | "success" | "error" | "warning" | "info";
|
|
5
|
+
interface ProgressProps {
|
|
6
6
|
value: number;
|
|
7
7
|
max?: number;
|
|
8
8
|
size?: ProgressSize;
|
|
9
|
+
type?: ProgressType;
|
|
9
10
|
showLabel?: boolean;
|
|
10
|
-
className?: string;
|
|
11
11
|
}
|
|
12
12
|
declare const Progress: {
|
|
13
13
|
(props: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
@@ -21,13 +21,11 @@ var Progress = (props) => {
|
|
|
21
21
|
value,
|
|
22
22
|
max = 100,
|
|
23
23
|
size = "md",
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
className
|
|
24
|
+
type = "brand",
|
|
25
|
+
showLabel = false
|
|
27
26
|
} = props;
|
|
28
|
-
const colorClass = color;
|
|
29
27
|
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
30
|
-
return /* @__PURE__ */ jsxs("div", { className: clsx_default("lib-xplat-progress", size,
|
|
28
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
|
|
31
29
|
/* @__PURE__ */ jsx(
|
|
32
30
|
"div",
|
|
33
31
|
{
|
|
@@ -39,7 +37,7 @@ var Progress = (props) => {
|
|
|
39
37
|
children: /* @__PURE__ */ jsx(
|
|
40
38
|
"div",
|
|
41
39
|
{
|
|
42
|
-
className:
|
|
40
|
+
className: "bar",
|
|
43
41
|
style: { width: `${percentage}%` }
|
|
44
42
|
}
|
|
45
43
|
)
|
|
@@ -67,9 +67,8 @@ var Radio = (props) => {
|
|
|
67
67
|
const {
|
|
68
68
|
label,
|
|
69
69
|
value,
|
|
70
|
-
className,
|
|
71
|
-
color = "xplat-blue-500",
|
|
72
70
|
size: sizeProp,
|
|
71
|
+
type = "brand",
|
|
73
72
|
...rest
|
|
74
73
|
} = props;
|
|
75
74
|
const context = useRadioGroupContext();
|
|
@@ -81,15 +80,14 @@ var Radio = (props) => {
|
|
|
81
80
|
value,
|
|
82
81
|
onChange: rest.onChange
|
|
83
82
|
};
|
|
84
|
-
const colorClass = color;
|
|
85
83
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
86
84
|
"label",
|
|
87
85
|
{
|
|
88
86
|
className: clsx_default(
|
|
89
87
|
"lib-xplat-radio",
|
|
90
88
|
size,
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
type,
|
|
90
|
+
localChecked ? "checked" : void 0
|
|
93
91
|
),
|
|
94
92
|
children: [
|
|
95
93
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
|
|
@@ -98,8 +96,7 @@ var Radio = (props) => {
|
|
|
98
96
|
{
|
|
99
97
|
className: clsx_default(
|
|
100
98
|
"circle",
|
|
101
|
-
localChecked ? "checked" : void 0
|
|
102
|
-
colorClass
|
|
99
|
+
localChecked ? "checked" : void 0
|
|
103
100
|
),
|
|
104
101
|
children: localChecked && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "inner-circle" })
|
|
105
102
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
.lib-xplat-radio {
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
|
-
gap:
|
|
5
|
+
gap: var(--spacing-space-2);
|
|
6
6
|
user-select: none;
|
|
7
7
|
cursor: pointer;
|
|
8
8
|
}
|
|
@@ -10,57 +10,89 @@
|
|
|
10
10
|
display: none;
|
|
11
11
|
}
|
|
12
12
|
.lib-xplat-radio.sm > .circle {
|
|
13
|
-
width:
|
|
14
|
-
height:
|
|
13
|
+
width: var(--spacing-space-4);
|
|
14
|
+
height: var(--spacing-space-4);
|
|
15
15
|
border-width: 1.5px;
|
|
16
16
|
}
|
|
17
17
|
.lib-xplat-radio.sm > .circle > .inner-circle {
|
|
18
|
-
width:
|
|
19
|
-
height:
|
|
18
|
+
width: var(--spacing-space-2);
|
|
19
|
+
height: var(--spacing-space-2);
|
|
20
20
|
}
|
|
21
21
|
.lib-xplat-radio.sm > span {
|
|
22
|
-
font-size:
|
|
22
|
+
font-size: 14px;
|
|
23
23
|
}
|
|
24
24
|
.lib-xplat-radio.md > .circle {
|
|
25
|
-
width:
|
|
26
|
-
height:
|
|
25
|
+
width: var(--spacing-space-5);
|
|
26
|
+
height: var(--spacing-space-5);
|
|
27
27
|
}
|
|
28
28
|
.lib-xplat-radio.lg > .circle {
|
|
29
|
-
width:
|
|
30
|
-
height:
|
|
29
|
+
width: var(--spacing-space-6);
|
|
30
|
+
height: var(--spacing-space-6);
|
|
31
31
|
}
|
|
32
32
|
.lib-xplat-radio.lg > .circle > .inner-circle {
|
|
33
|
-
width:
|
|
34
|
-
height:
|
|
33
|
+
width: var(--spacing-space-4);
|
|
34
|
+
height: var(--spacing-space-4);
|
|
35
35
|
}
|
|
36
36
|
.lib-xplat-radio.lg > span {
|
|
37
|
-
font-size:
|
|
37
|
+
font-size: 18px;
|
|
38
38
|
}
|
|
39
39
|
.lib-xplat-radio > .circle {
|
|
40
|
-
border: 2px solid var(--
|
|
40
|
+
border: 2px solid var(--semantic-border-strong);
|
|
41
41
|
border-radius: 50%;
|
|
42
42
|
display: flex;
|
|
43
43
|
align-items: center;
|
|
44
44
|
justify-content: center;
|
|
45
45
|
cursor: pointer;
|
|
46
|
-
background-color: var(--
|
|
46
|
+
background-color: var(--semantic-surface-neutral-default);
|
|
47
47
|
transition: border-color 0.12s ease-out, background-color 0.12s ease-out;
|
|
48
48
|
}
|
|
49
|
-
.lib-xplat-radio
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
.lib-xplat-radio > .circle > .inner-circle {
|
|
50
|
+
width: var(--spacing-space-3);
|
|
51
|
+
height: var(--spacing-space-3);
|
|
52
|
+
background-color: var(--semantic-surface-neutral-default);
|
|
53
|
+
border-radius: 50%;
|
|
52
54
|
}
|
|
53
|
-
.lib-xplat-radio > .circle.checked {
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
.lib-xplat-radio:hover > .circle:not(.checked) {
|
|
56
|
+
border-color: var(--semantic-icon-strong);
|
|
57
|
+
background-color: var(--semantic-surface-neutral-subtle);
|
|
56
58
|
}
|
|
57
|
-
.lib-xplat-radio > .circle.checked
|
|
58
|
-
background-color:
|
|
59
|
-
border-color:
|
|
59
|
+
.lib-xplat-radio.brand > .circle.checked {
|
|
60
|
+
background-color: var(--semantic-surface-brand-default);
|
|
61
|
+
border-color: var(--semantic-surface-brand-default);
|
|
60
62
|
}
|
|
61
|
-
.lib-xplat-radio > .circle
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
.lib-xplat-radio.success > .circle.checked {
|
|
64
|
+
background-color: var(--semantic-surface-success-default);
|
|
65
|
+
border-color: var(--semantic-surface-success-default);
|
|
66
|
+
}
|
|
67
|
+
.lib-xplat-radio.error > .circle.checked {
|
|
68
|
+
background-color: var(--semantic-surface-error-default);
|
|
69
|
+
border-color: var(--semantic-surface-error-default);
|
|
70
|
+
}
|
|
71
|
+
.lib-xplat-radio.warning > .circle.checked {
|
|
72
|
+
background-color: var(--semantic-surface-warning-default);
|
|
73
|
+
border-color: var(--semantic-surface-warning-default);
|
|
74
|
+
}
|
|
75
|
+
.lib-xplat-radio.info > .circle.checked {
|
|
76
|
+
background-color: var(--semantic-surface-info-default);
|
|
77
|
+
border-color: var(--semantic-surface-info-default);
|
|
78
|
+
}
|
|
79
|
+
.lib-xplat-radio:hover.brand > .circle.checked {
|
|
80
|
+
background-color: var(--semantic-surface-brand-strong);
|
|
81
|
+
border-color: var(--semantic-surface-brand-strong);
|
|
82
|
+
}
|
|
83
|
+
.lib-xplat-radio:hover.success > .circle.checked {
|
|
84
|
+
background-color: var(--semantic-surface-success-strong);
|
|
85
|
+
border-color: var(--semantic-surface-success-strong);
|
|
86
|
+
}
|
|
87
|
+
.lib-xplat-radio:hover.error > .circle.checked {
|
|
88
|
+
background-color: var(--semantic-surface-error-strong);
|
|
89
|
+
border-color: var(--semantic-surface-error-strong);
|
|
90
|
+
}
|
|
91
|
+
.lib-xplat-radio:hover.warning > .circle.checked {
|
|
92
|
+
background-color: var(--semantic-surface-warning-strong);
|
|
93
|
+
border-color: var(--semantic-surface-warning-strong);
|
|
94
|
+
}
|
|
95
|
+
.lib-xplat-radio:hover.info > .circle.checked {
|
|
96
|
+
background-color: var(--semantic-surface-info-strong);
|
|
97
|
+
border-color: var(--semantic-surface-info-strong);
|
|
66
98
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { I as InputAttributes } from '../../attributes-DJIWir_0.cjs';
|
|
3
|
-
import { a as ColorProps } from '../../colors-CY4JXVHj.cjs';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
|
|
6
5
|
type RadioSize = "sm" | "md" | "lg";
|
|
7
|
-
|
|
6
|
+
type RadioType = "brand" | "success" | "error" | "warning" | "info";
|
|
7
|
+
interface RadioProps extends Omit<InputAttributes, "size" | "className"> {
|
|
8
8
|
label?: string;
|
|
9
|
-
className?: string;
|
|
10
9
|
/**
|
|
11
10
|
* 단일 사용시 name 필수 작성
|
|
12
11
|
*/
|
|
13
12
|
name?: string;
|
|
14
13
|
value: string | number;
|
|
15
14
|
size?: RadioSize;
|
|
15
|
+
type?: RadioType;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* 그룹모드 check 조건 : RadioGroup value === radio value
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { I as InputAttributes } from '../../attributes-DJIWir_0.js';
|
|
3
|
-
import { a as ColorProps } from '../../colors-CY4JXVHj.js';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
|
|
6
5
|
type RadioSize = "sm" | "md" | "lg";
|
|
7
|
-
|
|
6
|
+
type RadioType = "brand" | "success" | "error" | "warning" | "info";
|
|
7
|
+
interface RadioProps extends Omit<InputAttributes, "size" | "className"> {
|
|
8
8
|
label?: string;
|
|
9
|
-
className?: string;
|
|
10
9
|
/**
|
|
11
10
|
* 단일 사용시 name 필수 작성
|
|
12
11
|
*/
|
|
13
12
|
name?: string;
|
|
14
13
|
value: string | number;
|
|
15
14
|
size?: RadioSize;
|
|
15
|
+
type?: RadioType;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* 그룹모드 check 조건 : RadioGroup value === radio value
|
|
@@ -30,9 +30,8 @@ var Radio = (props) => {
|
|
|
30
30
|
const {
|
|
31
31
|
label,
|
|
32
32
|
value,
|
|
33
|
-
className,
|
|
34
|
-
color = "xplat-blue-500",
|
|
35
33
|
size: sizeProp,
|
|
34
|
+
type = "brand",
|
|
36
35
|
...rest
|
|
37
36
|
} = props;
|
|
38
37
|
const context = useRadioGroupContext();
|
|
@@ -44,15 +43,14 @@ var Radio = (props) => {
|
|
|
44
43
|
value,
|
|
45
44
|
onChange: rest.onChange
|
|
46
45
|
};
|
|
47
|
-
const colorClass = color;
|
|
48
46
|
return /* @__PURE__ */ jsxs(
|
|
49
47
|
"label",
|
|
50
48
|
{
|
|
51
49
|
className: clsx_default(
|
|
52
50
|
"lib-xplat-radio",
|
|
53
51
|
size,
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
type,
|
|
53
|
+
localChecked ? "checked" : void 0
|
|
56
54
|
),
|
|
57
55
|
children: [
|
|
58
56
|
/* @__PURE__ */ jsx("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
|
|
@@ -61,8 +59,7 @@ var Radio = (props) => {
|
|
|
61
59
|
{
|
|
62
60
|
className: clsx_default(
|
|
63
61
|
"circle",
|
|
64
|
-
localChecked ? "checked" : void 0
|
|
65
|
-
colorClass
|
|
62
|
+
localChecked ? "checked" : void 0
|
|
66
63
|
),
|
|
67
64
|
children: localChecked && /* @__PURE__ */ jsx("div", { className: "inner-circle" })
|
|
68
65
|
}
|