@uniai-fe/uds-primitives 0.0.18 → 0.0.20
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/README.md +9 -5
- package/dist/styles.css +55 -1017
- package/package.json +1 -6
- package/src/components/alternate/styles/index.scss +0 -2
- package/src/components/badge/styles/index.scss +1 -3
- package/src/components/button/styles/button.scss +0 -1
- package/src/components/button/styles/round-button.scss +0 -2
- package/src/components/button/styles/text-button.scss +0 -2
- package/src/components/calendar/styles/index.scss +0 -2
- package/src/components/checkbox/styles/index.scss +1 -3
- package/src/components/chip/styles/index.scss +1 -3
- package/src/components/drawer/styles/index.scss +1 -3
- package/src/components/dropdown/styles/index.scss +0 -2
- package/src/components/input/styles/index.scss +2 -3
- package/src/components/label/styles/index.scss +0 -2
- package/src/components/navigation/styles/index.scss +1 -3
- package/src/components/pagination/styles/index.scss +0 -2
- package/src/components/radio/styles/index.scss +1 -3
- package/src/components/scrollbar/styles/index.scss +0 -2
- package/src/components/segmented-control/markup/Container.tsx +255 -0
- package/src/components/segmented-control/markup/Indicator.tsx +31 -0
- package/src/components/segmented-control/markup/List.tsx +125 -0
- package/src/components/segmented-control/markup/index.ts +1 -1
- package/src/components/segmented-control/styles/index.scss +51 -50
- package/src/components/segmented-control/types/index.ts +48 -10
- package/src/components/select/styles/index.scss +0 -2
- package/src/components/spinner/styles/index.scss +0 -2
- package/src/components/tab/styles/index.scss +0 -2
- package/src/components/table/styles/index.scss +0 -2
- package/src/index.scss +2 -4
- package/src/index.tsx +1 -2
- package/src/components/dialog/hooks/index.ts +0 -4
- package/src/components/dialog/img/.gitkeep +0 -0
- package/src/components/dialog/index.scss +0 -1
- package/src/components/dialog/index.tsx +0 -6
- package/src/components/dialog/markup/ConfirmDialog.tsx +0 -339
- package/src/components/dialog/markup/NoticeDialog.tsx +0 -209
- package/src/components/dialog/markup/index.tsx +0 -4
- package/src/components/dialog/styles/base.scss +0 -153
- package/src/components/dialog/styles/confirm.scss +0 -58
- package/src/components/dialog/styles/index.scss +0 -3
- package/src/components/dialog/styles/notice.scss +0 -65
- package/src/components/dialog/types/index.ts +0 -113
- package/src/components/dialog/utils/index.ts +0 -4
- package/src/components/segmented-control/markup/SegmentedControl.tsx +0 -129
- package/src/theme/ThemeProvider.tsx +0 -25
- package/src/theme/config.ts +0 -29
- package/src/theme/index.ts +0 -3
- package/src/theme/overrides.scss +0 -215
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
|
-
import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
|
|
3
|
-
import clsx from "clsx";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
|
-
import type {
|
|
6
|
-
NoticeDialogSectionProps,
|
|
7
|
-
NoticeDialogTitleProps,
|
|
8
|
-
NoticeDialogDescriptionProps,
|
|
9
|
-
NoticeDialogContentProps,
|
|
10
|
-
NoticeDialogOverlayProps,
|
|
11
|
-
} from "../types";
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* NoticeDialogRoot; 공통 Dialog 상태 제어 루트
|
|
15
|
-
* @component
|
|
16
|
-
* @param {NoticeDialogRootProps} props
|
|
17
|
-
* @param {boolean} [props.open] 제어형 open 상태.
|
|
18
|
-
* @param {boolean} [props.defaultOpen] 비제어 초기 open 상태.
|
|
19
|
-
* @param {(open: boolean) => void} [props.onOpenChange] open 변경 콜백.
|
|
20
|
-
*/
|
|
21
|
-
const NoticeDialogRoot = DialogPrimitive.Root;
|
|
22
|
-
const NoticeDialogTrigger = DialogPrimitive.Trigger;
|
|
23
|
-
const NoticeDialogPortal = DialogPrimitive.Portal;
|
|
24
|
-
const NoticeDialogClose = DialogPrimitive.Close;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* NoticeDialogOverlay; dim 영역
|
|
28
|
-
* @component
|
|
29
|
-
* @param {NoticeDialogOverlayProps} props
|
|
30
|
-
* @param {string} [props.className] overlay className.
|
|
31
|
-
*/
|
|
32
|
-
const NoticeDialogOverlay = forwardRef<
|
|
33
|
-
HTMLDivElement,
|
|
34
|
-
NoticeDialogOverlayProps
|
|
35
|
-
>(({ className, ...props }, forwardedRef) => (
|
|
36
|
-
<DialogPrimitive.Overlay
|
|
37
|
-
{...props}
|
|
38
|
-
ref={forwardedRef}
|
|
39
|
-
className={clsx("dialog-overlay notice-dialog-overlay", className)}
|
|
40
|
-
data-variant="notice"
|
|
41
|
-
/>
|
|
42
|
-
));
|
|
43
|
-
|
|
44
|
-
NoticeDialogOverlay.displayName = "NoticeDialogOverlay";
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* NoticeDialogContent; 콘텐츠 패널
|
|
48
|
-
* @component
|
|
49
|
-
* @param {NoticeDialogContentProps} props
|
|
50
|
-
* @param {string} [props.className] content className.
|
|
51
|
-
* @param {React.ReactNode} [props.children] panel 내용.
|
|
52
|
-
*/
|
|
53
|
-
const NoticeDialogContent = forwardRef<
|
|
54
|
-
HTMLDivElement,
|
|
55
|
-
NoticeDialogContentProps
|
|
56
|
-
>(({ className, children, ...props }, forwardedRef) => (
|
|
57
|
-
<DialogPrimitive.Content
|
|
58
|
-
{...props}
|
|
59
|
-
ref={forwardedRef}
|
|
60
|
-
className={clsx("dialog-content notice-dialog-content", className)}
|
|
61
|
-
data-variant="notice"
|
|
62
|
-
>
|
|
63
|
-
{children}
|
|
64
|
-
</DialogPrimitive.Content>
|
|
65
|
-
));
|
|
66
|
-
|
|
67
|
-
NoticeDialogContent.displayName = "NoticeDialogContent";
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* NoticeDialogTitle; Dialog 제목
|
|
71
|
-
* @component
|
|
72
|
-
* @param {NoticeDialogTitleProps} props
|
|
73
|
-
* @param {string} [props.className] title className.
|
|
74
|
-
* @param {boolean} [props.visuallyHidden=false] 제목을 시각적으로 숨길지 여부.
|
|
75
|
-
* @param {React.ReactNode} [props.children] 제목 텍스트.
|
|
76
|
-
*/
|
|
77
|
-
const NoticeDialogTitle = forwardRef<
|
|
78
|
-
HTMLHeadingElement,
|
|
79
|
-
NoticeDialogTitleProps
|
|
80
|
-
>(({ className, visuallyHidden = false, children, ...props }, forwardedRef) => {
|
|
81
|
-
const titleNode = (
|
|
82
|
-
<DialogPrimitive.Title
|
|
83
|
-
{...props}
|
|
84
|
-
ref={forwardedRef}
|
|
85
|
-
className={clsx("dialog-title notice-dialog-title", className)}
|
|
86
|
-
data-variant="notice"
|
|
87
|
-
>
|
|
88
|
-
{children}
|
|
89
|
-
</DialogPrimitive.Title>
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
if (visuallyHidden) {
|
|
93
|
-
return <VisuallyHidden asChild>{titleNode}</VisuallyHidden>;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return titleNode;
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
NoticeDialogTitle.displayName = "NoticeDialogTitle";
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* NoticeDialogDescription; Dialog 설명
|
|
103
|
-
* @component
|
|
104
|
-
* @param {NoticeDialogDescriptionProps} props
|
|
105
|
-
* @param {string} [props.className] description className.
|
|
106
|
-
* @param {boolean} [props.visuallyHidden=false] 설명을 시각적으로 숨길지 여부.
|
|
107
|
-
* @param {React.ReactNode} [props.children] 설명 텍스트.
|
|
108
|
-
*/
|
|
109
|
-
const NoticeDialogDescription = forwardRef<
|
|
110
|
-
HTMLParagraphElement,
|
|
111
|
-
NoticeDialogDescriptionProps
|
|
112
|
-
>(({ className, visuallyHidden = false, children, ...props }, forwardedRef) => {
|
|
113
|
-
const descriptionNode = (
|
|
114
|
-
<DialogPrimitive.Description
|
|
115
|
-
{...props}
|
|
116
|
-
ref={forwardedRef}
|
|
117
|
-
className={clsx(
|
|
118
|
-
"dialog-description notice-dialog-description",
|
|
119
|
-
className,
|
|
120
|
-
)}
|
|
121
|
-
data-variant="notice"
|
|
122
|
-
>
|
|
123
|
-
{children}
|
|
124
|
-
</DialogPrimitive.Description>
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
if (visuallyHidden) {
|
|
128
|
-
return <VisuallyHidden asChild>{descriptionNode}</VisuallyHidden>;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return descriptionNode;
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
NoticeDialogDescription.displayName = "NoticeDialogDescription";
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* NoticeDialogHeader; 헤더 레이아웃
|
|
138
|
-
* @component
|
|
139
|
-
* @param {NoticeDialogSectionProps} props
|
|
140
|
-
* @param {string} [props.className] 섹션 className.
|
|
141
|
-
* @param {React.HTMLAttributes<HTMLDivElement>["children"]} [props.children] 헤더 콘텐츠.
|
|
142
|
-
*/
|
|
143
|
-
const NoticeDialogHeader = forwardRef<HTMLDivElement, NoticeDialogSectionProps>(
|
|
144
|
-
({ className, ...props }, forwardedRef) => (
|
|
145
|
-
<div
|
|
146
|
-
{...props}
|
|
147
|
-
ref={forwardedRef}
|
|
148
|
-
className={clsx("dialog-section notice-dialog-header", className)}
|
|
149
|
-
data-section="header"
|
|
150
|
-
/>
|
|
151
|
-
),
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
NoticeDialogHeader.displayName = "NoticeDialogHeader";
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* NoticeDialogBody; 본문 영역
|
|
158
|
-
* @component
|
|
159
|
-
* @param {NoticeDialogSectionProps} props
|
|
160
|
-
* @param {string} [props.className] 섹션 className.
|
|
161
|
-
* @param {React.ReactNode} [props.children] 본문 콘텐츠.
|
|
162
|
-
*/
|
|
163
|
-
const NoticeDialogBody = forwardRef<HTMLDivElement, NoticeDialogSectionProps>(
|
|
164
|
-
({ className, ...props }, forwardedRef) => (
|
|
165
|
-
<div
|
|
166
|
-
{...props}
|
|
167
|
-
ref={forwardedRef}
|
|
168
|
-
className={clsx("dialog-section notice-dialog-body", className)}
|
|
169
|
-
data-section="body"
|
|
170
|
-
/>
|
|
171
|
-
),
|
|
172
|
-
);
|
|
173
|
-
|
|
174
|
-
NoticeDialogBody.displayName = "NoticeDialogBody";
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* NoticeDialogActions; 버튼 영역
|
|
178
|
-
* @component
|
|
179
|
-
* @param {NoticeDialogSectionProps} props
|
|
180
|
-
* @param {string} [props.className] 섹션 className.
|
|
181
|
-
* @param {React.ReactNode} [props.children] 버튼 콘텐츠.
|
|
182
|
-
*/
|
|
183
|
-
const NoticeDialogActions = forwardRef<
|
|
184
|
-
HTMLDivElement,
|
|
185
|
-
NoticeDialogSectionProps
|
|
186
|
-
>(({ className, ...props }, forwardedRef) => (
|
|
187
|
-
<div
|
|
188
|
-
{...props}
|
|
189
|
-
ref={forwardedRef}
|
|
190
|
-
className={clsx("dialog-section notice-dialog-actions", className)}
|
|
191
|
-
data-section="actions"
|
|
192
|
-
/>
|
|
193
|
-
));
|
|
194
|
-
|
|
195
|
-
NoticeDialogActions.displayName = "NoticeDialogActions";
|
|
196
|
-
|
|
197
|
-
export {
|
|
198
|
-
NoticeDialogRoot,
|
|
199
|
-
NoticeDialogTrigger,
|
|
200
|
-
NoticeDialogPortal,
|
|
201
|
-
NoticeDialogOverlay,
|
|
202
|
-
NoticeDialogContent,
|
|
203
|
-
NoticeDialogTitle,
|
|
204
|
-
NoticeDialogDescription,
|
|
205
|
-
NoticeDialogHeader,
|
|
206
|
-
NoticeDialogBody,
|
|
207
|
-
NoticeDialogActions,
|
|
208
|
-
NoticeDialogClose,
|
|
209
|
-
};
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
@use "@uniai-fe/uds-foundation/css";
|
|
2
|
-
|
|
3
|
-
:where(.radix-themes, .theme-root, :root) {
|
|
4
|
-
/* dialog essentials */
|
|
5
|
-
--dialog-overlay-bg: rgba(5, 6, 12, 0.55);
|
|
6
|
-
--dialog-panel-width: 360px;
|
|
7
|
-
--dialog-panel-max-width: calc(100vw - var(--spacing-padding-10) * 2);
|
|
8
|
-
--dialog-panel-bg: var(--color-bg-surface-static-white);
|
|
9
|
-
--dialog-panel-radius: var(--theme-radius-large-1);
|
|
10
|
-
--dialog-panel-shadow: 0px 18px 40px rgba(8, 11, 30, 0.18);
|
|
11
|
-
--dialog-border-color: var(--color-border-standard-cool-gray);
|
|
12
|
-
--dialog-title-color: var(--color-label-strong);
|
|
13
|
-
--dialog-title-font-size: var(--font-heading-xsmall-size);
|
|
14
|
-
--dialog-title-line-height: var(--font-heading-xsmall-line-height);
|
|
15
|
-
--dialog-title-weight: var(--font-heading-xsmall-weight);
|
|
16
|
-
--dialog-body-color: var(--color-label-standard);
|
|
17
|
-
--dialog-body-font-size: var(--font-body-small-size);
|
|
18
|
-
--dialog-body-line-height: var(--font-body-small-line-height);
|
|
19
|
-
--dialog-description-color: var(--color-label-standard);
|
|
20
|
-
--dialog-description-font-size: var(--font-body-small-size);
|
|
21
|
-
--dialog-description-line-height: var(--font-body-small-line-height);
|
|
22
|
-
|
|
23
|
-
/* alert(notice) defaults */
|
|
24
|
-
--notice-dialog-section-padding-x: var(--spacing-padding-8);
|
|
25
|
-
--notice-dialog-section-padding-y: var(--spacing-padding-10);
|
|
26
|
-
--notice-dialog-action-height: 52px;
|
|
27
|
-
|
|
28
|
-
/* confirm defaults */
|
|
29
|
-
--confirm-dialog-header-padding-x: var(--spacing-padding-6);
|
|
30
|
-
--confirm-dialog-header-padding-y: var(--spacing-padding-7);
|
|
31
|
-
--confirm-dialog-body-padding-x: var(--spacing-padding-6);
|
|
32
|
-
--confirm-dialog-body-padding-y: var(--spacing-padding-7);
|
|
33
|
-
--confirm-dialog-footer-padding-x: var(--spacing-padding-6);
|
|
34
|
-
--confirm-dialog-footer-padding-y: var(--spacing-padding-7);
|
|
35
|
-
--confirm-dialog-actions-gap: var(--spacing-gap-5);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.dialog-overlay {
|
|
39
|
-
position: fixed;
|
|
40
|
-
inset: 0;
|
|
41
|
-
background-color: var(--dialog-overlay-bg);
|
|
42
|
-
opacity: 0;
|
|
43
|
-
transition: opacity 0.2s ease;
|
|
44
|
-
will-change: opacity;
|
|
45
|
-
|
|
46
|
-
&[data-state="open"] {
|
|
47
|
-
opacity: 1;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&[data-state="closed"] {
|
|
51
|
-
opacity: 0;
|
|
52
|
-
pointer-events: none;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
@media (prefers-reduced-motion: reduce) {
|
|
57
|
-
.dialog-overlay {
|
|
58
|
-
transition: none;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.dialog-content {
|
|
63
|
-
position: fixed;
|
|
64
|
-
top: 50%;
|
|
65
|
-
left: 50%;
|
|
66
|
-
transform: translate(-50%, -50%);
|
|
67
|
-
width: min(var(--dialog-panel-width), var(--dialog-panel-max-width));
|
|
68
|
-
max-width: var(--dialog-panel-max-width);
|
|
69
|
-
max-height: calc(100vh - var(--spacing-padding-10) * 2);
|
|
70
|
-
background-color: var(--dialog-panel-bg);
|
|
71
|
-
border-radius: var(--dialog-panel-radius);
|
|
72
|
-
box-shadow: var(--dialog-panel-shadow);
|
|
73
|
-
display: flex;
|
|
74
|
-
flex-direction: column;
|
|
75
|
-
overflow: hidden;
|
|
76
|
-
overflow-y: auto;
|
|
77
|
-
overscroll-behavior: contain;
|
|
78
|
-
outline: none;
|
|
79
|
-
border: none;
|
|
80
|
-
gap: 0;
|
|
81
|
-
opacity: 0;
|
|
82
|
-
transition:
|
|
83
|
-
opacity 0.2s ease,
|
|
84
|
-
transform 0.2s ease;
|
|
85
|
-
|
|
86
|
-
&[data-state="open"] {
|
|
87
|
-
opacity: 1;
|
|
88
|
-
transform: translate(-50%, -50%);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&[data-state="closed"] {
|
|
92
|
-
opacity: 0;
|
|
93
|
-
transform: translate(-50%, calc(-50% + 12px));
|
|
94
|
-
pointer-events: none;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
@media (prefers-reduced-motion: reduce) {
|
|
99
|
-
.dialog-content {
|
|
100
|
-
transition: none;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.dialog-section {
|
|
105
|
-
padding: 0;
|
|
106
|
-
|
|
107
|
-
&[data-section="actions"] {
|
|
108
|
-
flex-shrink: 0;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.dialog-title {
|
|
113
|
-
margin: 0;
|
|
114
|
-
color: var(--dialog-title-color);
|
|
115
|
-
font-size: var(--dialog-title-font-size);
|
|
116
|
-
line-height: var(--dialog-title-line-height);
|
|
117
|
-
font-weight: var(--dialog-title-weight);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.dialog-description {
|
|
121
|
-
margin: 0;
|
|
122
|
-
color: var(--dialog-description-color);
|
|
123
|
-
font-size: var(--dialog-description-font-size);
|
|
124
|
-
line-height: var(--dialog-description-line-height);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@mixin dialog-action-button-reset {
|
|
128
|
-
display: flex;
|
|
129
|
-
align-items: center;
|
|
130
|
-
justify-content: center;
|
|
131
|
-
width: 100%;
|
|
132
|
-
border: none;
|
|
133
|
-
border-radius: 0;
|
|
134
|
-
margin: 0;
|
|
135
|
-
padding: 0;
|
|
136
|
-
font-size: var(--font-body-medium-size);
|
|
137
|
-
line-height: var(--font-body-medium-line-height);
|
|
138
|
-
font-weight: var(--font-body-medium-weight);
|
|
139
|
-
cursor: pointer;
|
|
140
|
-
background: transparent;
|
|
141
|
-
color: var(--color-label-strong);
|
|
142
|
-
transition:
|
|
143
|
-
background-color 0.15s ease,
|
|
144
|
-
color 0.15s ease;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.dialog-button {
|
|
148
|
-
@include dialog-action-button-reset;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.dialog-button[data-native-element="true"] {
|
|
152
|
-
appearance: none;
|
|
153
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
@use "./base" as dialogBase;
|
|
2
|
-
|
|
3
|
-
.confirm-dialog-header {
|
|
4
|
-
padding: var(--confirm-dialog-header-padding-y)
|
|
5
|
-
var(--confirm-dialog-header-padding-x);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.confirm-dialog-body {
|
|
9
|
-
padding: var(--confirm-dialog-body-padding-y)
|
|
10
|
-
var(--confirm-dialog-body-padding-x);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.confirm-dialog-header {
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
gap: var(--spacing-gap-2);
|
|
17
|
-
text-align: center;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.confirm-dialog-body {
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
gap: var(--spacing-gap-2);
|
|
25
|
-
text-align: center;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.confirm-dialog-body p {
|
|
29
|
-
margin: 0;
|
|
30
|
-
color: var(--dialog-body-color);
|
|
31
|
-
font-size: var(--dialog-body-font-size);
|
|
32
|
-
line-height: 1.5em;
|
|
33
|
-
font-weight: var(--font-body-small-weight);
|
|
34
|
-
word-break: keep-all;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.confirm-dialog-description {
|
|
38
|
-
margin: 0;
|
|
39
|
-
color: var(--dialog-body-color);
|
|
40
|
-
font-size: var(--dialog-body-font-size);
|
|
41
|
-
line-height: 1.5em;
|
|
42
|
-
font-weight: var(--font-body-small-weight);
|
|
43
|
-
word-break: keep-all;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.confirm-dialog-actions {
|
|
47
|
-
display: flex;
|
|
48
|
-
align-items: stretch;
|
|
49
|
-
flex-direction: row;
|
|
50
|
-
padding: var(--confirm-dialog-footer-padding-y)
|
|
51
|
-
var(--confirm-dialog-footer-padding-x);
|
|
52
|
-
gap: var(--confirm-dialog-actions-gap);
|
|
53
|
-
justify-content: center;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.confirm-dialog-actions > * {
|
|
57
|
-
flex: 1;
|
|
58
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
@use "./base" as dialogBase;
|
|
2
|
-
|
|
3
|
-
.notice-dialog-header,
|
|
4
|
-
.notice-dialog-body {
|
|
5
|
-
padding: var(--notice-dialog-section-padding-y)
|
|
6
|
-
var(--notice-dialog-section-padding-x);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.notice-dialog-header {
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
gap: var(--spacing-gap-3);
|
|
13
|
-
text-align: center;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.notice-dialog-body {
|
|
17
|
-
text-align: center;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.notice-dialog-body p {
|
|
21
|
-
margin: 0 0 var(--spacing-gap-2);
|
|
22
|
-
color: var(--dialog-body-color);
|
|
23
|
-
font-size: var(--dialog-body-font-size);
|
|
24
|
-
line-height: 1.5em;
|
|
25
|
-
font-weight: var(--font-body-small-weight);
|
|
26
|
-
word-break: keep-all;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.notice-dialog-body p:last-child {
|
|
30
|
-
margin-bottom: 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.notice-dialog-actions {
|
|
34
|
-
border-top: 1px solid var(--dialog-border-color);
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: stretch;
|
|
37
|
-
flex-direction: row;
|
|
38
|
-
padding: 0;
|
|
39
|
-
gap: 0;
|
|
40
|
-
justify-content: center;
|
|
41
|
-
overflow: hidden;
|
|
42
|
-
--button-min-height: var(--notice-dialog-action-height);
|
|
43
|
-
--button-padding-inline: 0;
|
|
44
|
-
--button-padding-block: 0;
|
|
45
|
-
--button-border-radius: 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.notice-dialog-actions > * {
|
|
49
|
-
flex: 1;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.notice-dialog-actions .button {
|
|
53
|
-
@include dialogBase.dialog-action-button-reset;
|
|
54
|
-
background-color: var(--color-common-100);
|
|
55
|
-
color: var(--color-primary-default);
|
|
56
|
-
|
|
57
|
-
&:hover {
|
|
58
|
-
background-color: var(--color-bg-surface-static-cool-gray);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.notice-dialog-actions .button:not(:first-child),
|
|
63
|
-
.notice-dialog-actions [data-native-element="true"]:not(:first-child) {
|
|
64
|
-
border-left: 1px solid var(--dialog-border-color);
|
|
65
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef } from "react";
|
|
2
|
-
import type * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
3
|
-
import type * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* NoticeDialog Root props. Radix Dialog Root 계약을 그대로 사용한다.
|
|
7
|
-
*/
|
|
8
|
-
type NoticeDialogRootProps = ComponentPropsWithoutRef<
|
|
9
|
-
typeof DialogPrimitive.Root
|
|
10
|
-
>;
|
|
11
|
-
/**
|
|
12
|
-
* NoticeDialog Overlay props. className/data attr만 확장한다.
|
|
13
|
-
*/
|
|
14
|
-
type NoticeDialogOverlayProps = ComponentPropsWithoutRef<
|
|
15
|
-
typeof DialogPrimitive.Overlay
|
|
16
|
-
>;
|
|
17
|
-
/**
|
|
18
|
-
* NoticeDialog Content props.
|
|
19
|
-
*/
|
|
20
|
-
type NoticeDialogContentProps = ComponentPropsWithoutRef<
|
|
21
|
-
typeof DialogPrimitive.Content
|
|
22
|
-
>;
|
|
23
|
-
/**
|
|
24
|
-
* NoticeDialog section(div) props.
|
|
25
|
-
*/
|
|
26
|
-
type NoticeDialogSectionProps = ComponentPropsWithoutRef<"div">;
|
|
27
|
-
/**
|
|
28
|
-
* NoticeDialog Title props. visuallyHidden 옵션으로 시각적 숨김 지원.
|
|
29
|
-
*/
|
|
30
|
-
type NoticeDialogTitleProps = ComponentPropsWithoutRef<
|
|
31
|
-
typeof DialogPrimitive.Title
|
|
32
|
-
> & {
|
|
33
|
-
visuallyHidden?: boolean;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* NoticeDialog Description props. visuallyHidden 옵션 포함.
|
|
37
|
-
*/
|
|
38
|
-
type NoticeDialogDescriptionProps = ComponentPropsWithoutRef<
|
|
39
|
-
typeof DialogPrimitive.Description
|
|
40
|
-
> & {
|
|
41
|
-
visuallyHidden?: boolean;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* ConfirmDialog Root props. Radix AlertDialog Root 계약.
|
|
46
|
-
*/
|
|
47
|
-
type ConfirmDialogRootProps = ComponentPropsWithoutRef<
|
|
48
|
-
typeof AlertDialogPrimitive.Root
|
|
49
|
-
>;
|
|
50
|
-
/**
|
|
51
|
-
* ConfirmDialog Overlay props. disableOutsideClose 확장 포함.
|
|
52
|
-
* @property {boolean} [disableOutsideClose=false] dim 클릭 시 닫힘 방지 여부.
|
|
53
|
-
*/
|
|
54
|
-
type ConfirmDialogOverlayProps = ComponentPropsWithoutRef<
|
|
55
|
-
typeof AlertDialogPrimitive.Overlay
|
|
56
|
-
> & {
|
|
57
|
-
disableOutsideClose?: boolean;
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* ConfirmDialog Content props.
|
|
61
|
-
*/
|
|
62
|
-
type ConfirmDialogContentProps = ComponentPropsWithoutRef<
|
|
63
|
-
typeof AlertDialogPrimitive.Content
|
|
64
|
-
>;
|
|
65
|
-
/**
|
|
66
|
-
* ConfirmDialog section props.
|
|
67
|
-
*/
|
|
68
|
-
type ConfirmDialogSectionProps = ComponentPropsWithoutRef<"div">;
|
|
69
|
-
/**
|
|
70
|
-
* ConfirmDialog Title props. visuallyHidden 옵션 포함.
|
|
71
|
-
*/
|
|
72
|
-
type ConfirmDialogTitleProps = ComponentPropsWithoutRef<
|
|
73
|
-
typeof AlertDialogPrimitive.Title
|
|
74
|
-
> & {
|
|
75
|
-
visuallyHidden?: boolean;
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* ConfirmDialog Description props. visuallyHidden 옵션 포함.
|
|
79
|
-
*/
|
|
80
|
-
type ConfirmDialogDescriptionProps = ComponentPropsWithoutRef<
|
|
81
|
-
typeof AlertDialogPrimitive.Description
|
|
82
|
-
> & {
|
|
83
|
-
visuallyHidden?: boolean;
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* ConfirmDialog Action button props.
|
|
87
|
-
*/
|
|
88
|
-
type ConfirmDialogActionProps = ComponentPropsWithoutRef<
|
|
89
|
-
typeof AlertDialogPrimitive.Action
|
|
90
|
-
>;
|
|
91
|
-
/**
|
|
92
|
-
* ConfirmDialog Cancel button props.
|
|
93
|
-
*/
|
|
94
|
-
type ConfirmDialogCancelProps = ComponentPropsWithoutRef<
|
|
95
|
-
typeof AlertDialogPrimitive.Cancel
|
|
96
|
-
>;
|
|
97
|
-
|
|
98
|
-
export type {
|
|
99
|
-
NoticeDialogRootProps,
|
|
100
|
-
NoticeDialogOverlayProps,
|
|
101
|
-
NoticeDialogContentProps,
|
|
102
|
-
NoticeDialogSectionProps,
|
|
103
|
-
NoticeDialogTitleProps,
|
|
104
|
-
NoticeDialogDescriptionProps,
|
|
105
|
-
ConfirmDialogRootProps,
|
|
106
|
-
ConfirmDialogOverlayProps,
|
|
107
|
-
ConfirmDialogContentProps,
|
|
108
|
-
ConfirmDialogSectionProps,
|
|
109
|
-
ConfirmDialogTitleProps,
|
|
110
|
-
ConfirmDialogDescriptionProps,
|
|
111
|
-
ConfirmDialogActionProps,
|
|
112
|
-
ConfirmDialogCancelProps,
|
|
113
|
-
};
|