@bigtablet/design-system 1.13.0 → 1.14.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/index.css +253 -222
- package/dist/index.d.ts +15 -4
- package/dist/index.js +223 -126
- package/dist/next.css +22 -22
- package/dist/next.js +62 -60
- package/package.json +11 -5
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import * as react_toastify from 'react-toastify';
|
|
4
4
|
|
|
5
|
-
/** Card UI */
|
|
6
5
|
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
6
|
heading?: React.ReactNode;
|
|
8
7
|
shadow?: "none" | "sm" | "md" | "lg";
|
|
@@ -32,10 +31,22 @@ declare const AlertProvider: React.FC<{
|
|
|
32
31
|
children: React.ReactNode;
|
|
33
32
|
}>;
|
|
34
33
|
|
|
35
|
-
interface
|
|
34
|
+
interface SpinnerProps {
|
|
36
35
|
size?: number;
|
|
37
36
|
}
|
|
38
|
-
declare const
|
|
37
|
+
declare const Spinner: ({ size }: SpinnerProps) => react_jsx_runtime.JSX.Element;
|
|
38
|
+
|
|
39
|
+
interface TopLoadingProps {
|
|
40
|
+
/** 진행률 (0-100). undefined면 indeterminate 모드 */
|
|
41
|
+
progress?: number;
|
|
42
|
+
/** 로딩바 색상 (기본: primary) */
|
|
43
|
+
color?: string;
|
|
44
|
+
/** 로딩바 높이 (기본: 3px) */
|
|
45
|
+
height?: number;
|
|
46
|
+
/** 표시 여부 */
|
|
47
|
+
isLoading?: boolean;
|
|
48
|
+
}
|
|
49
|
+
declare const TopLoading: ({ progress, color, height, isLoading, }: TopLoadingProps) => react_jsx_runtime.JSX.Element | null;
|
|
39
50
|
|
|
40
51
|
interface ToastProviderProps {
|
|
41
52
|
containerId?: string;
|
|
@@ -165,4 +176,4 @@ interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">
|
|
|
165
176
|
}
|
|
166
177
|
declare const Modal: ({ open, onClose, closeOnOverlay, width, title, children, className, ...props }: ModalProps) => react_jsx_runtime.JSX.Element | null;
|
|
167
178
|
|
|
168
|
-
export { AlertProvider, Button, Card, Checkbox, DatePicker, FileInput,
|
|
179
|
+
export { AlertProvider, Button, Card, Checkbox, DatePicker, FileInput, Modal, Pagination, Radio, Select, type SelectOption, Spinner, Switch, TextField, ToastProvider, TopLoading, useAlert, useToast };
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,8 @@ import { ToastContainer, Slide, toast } from 'react-toastify';
|
|
|
8
8
|
import 'react-toastify/dist/ReactToastify.css';
|
|
9
9
|
import { ChevronDown, Check } from 'lucide-react';
|
|
10
10
|
|
|
11
|
-
// src/ui/display/card/
|
|
11
|
+
// src/ui/display/card/style.module.scss
|
|
12
|
+
var style_module_default = {};
|
|
12
13
|
var Card = ({
|
|
13
14
|
heading,
|
|
14
15
|
shadow = "sm",
|
|
@@ -19,17 +20,20 @@ var Card = ({
|
|
|
19
20
|
...props
|
|
20
21
|
}) => {
|
|
21
22
|
const cls = [
|
|
22
|
-
|
|
23
|
-
`
|
|
24
|
-
`
|
|
25
|
-
bordered
|
|
23
|
+
style_module_default.card,
|
|
24
|
+
style_module_default[`shadow_${shadow}`],
|
|
25
|
+
style_module_default[`p_${padding}`],
|
|
26
|
+
bordered && style_module_default.bordered,
|
|
26
27
|
className ?? ""
|
|
27
28
|
].filter(Boolean).join(" ");
|
|
28
29
|
return /* @__PURE__ */ jsxs("div", { className: cls, ...props, children: [
|
|
29
|
-
heading ? /* @__PURE__ */ jsx("div", { className:
|
|
30
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
30
|
+
heading ? /* @__PURE__ */ jsx("div", { className: style_module_default.title, children: heading }) : null,
|
|
31
|
+
/* @__PURE__ */ jsx("div", { className: style_module_default.body, children })
|
|
31
32
|
] });
|
|
32
33
|
};
|
|
34
|
+
|
|
35
|
+
// src/ui/feedback/alert/style.module.scss
|
|
36
|
+
var style_module_default2 = {};
|
|
33
37
|
var AlertContext = createContext(null);
|
|
34
38
|
var useAlert = () => {
|
|
35
39
|
const context = useContext(AlertContext);
|
|
@@ -89,24 +93,32 @@ var AlertModal = ({
|
|
|
89
93
|
onCancel,
|
|
90
94
|
onClose
|
|
91
95
|
}) => {
|
|
92
|
-
|
|
96
|
+
const modalClassName = [
|
|
97
|
+
style_module_default2.modal,
|
|
98
|
+
style_module_default2[`variant_${variant}`]
|
|
99
|
+
].filter(Boolean).join(" ");
|
|
100
|
+
const actionsClassName = [
|
|
101
|
+
style_module_default2.actions,
|
|
102
|
+
style_module_default2[`actions_${actionsAlign}`]
|
|
103
|
+
].filter(Boolean).join(" ");
|
|
104
|
+
return /* @__PURE__ */ jsx("div", { className: style_module_default2.overlay, onClick: onClose, children: /* @__PURE__ */ jsxs(
|
|
93
105
|
"div",
|
|
94
106
|
{
|
|
95
|
-
className:
|
|
107
|
+
className: modalClassName,
|
|
96
108
|
onClick: (e) => e.stopPropagation(),
|
|
97
109
|
role: "alertdialog",
|
|
98
110
|
"aria-modal": "true",
|
|
99
111
|
"aria-labelledby": "alert_title",
|
|
100
112
|
"aria-describedby": "alert_message",
|
|
101
113
|
children: [
|
|
102
|
-
title && /* @__PURE__ */ jsx("div", { className:
|
|
103
|
-
message && /* @__PURE__ */ jsx("div", { className:
|
|
104
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
114
|
+
title && /* @__PURE__ */ jsx("div", { className: style_module_default2.title, id: "alert_title", children: title }),
|
|
115
|
+
message && /* @__PURE__ */ jsx("div", { className: style_module_default2.message, id: "alert_message", children: message }),
|
|
116
|
+
/* @__PURE__ */ jsxs("div", { className: actionsClassName, children: [
|
|
105
117
|
showCancel && /* @__PURE__ */ jsx(
|
|
106
118
|
"button",
|
|
107
119
|
{
|
|
108
120
|
type: "button",
|
|
109
|
-
className:
|
|
121
|
+
className: `${style_module_default2.button} ${style_module_default2.button_cancel}`,
|
|
110
122
|
onClick: onCancel,
|
|
111
123
|
children: cancelText
|
|
112
124
|
}
|
|
@@ -115,7 +127,7 @@ var AlertModal = ({
|
|
|
115
127
|
"button",
|
|
116
128
|
{
|
|
117
129
|
type: "button",
|
|
118
|
-
className:
|
|
130
|
+
className: `${style_module_default2.button} ${style_module_default2.button_confirm}`,
|
|
119
131
|
onClick: onConfirm,
|
|
120
132
|
children: confirmText
|
|
121
133
|
}
|
|
@@ -125,17 +137,57 @@ var AlertModal = ({
|
|
|
125
137
|
}
|
|
126
138
|
) });
|
|
127
139
|
};
|
|
128
|
-
|
|
140
|
+
|
|
141
|
+
// src/ui/feedback/spinner/style.module.scss
|
|
142
|
+
var style_module_default3 = {};
|
|
143
|
+
var Spinner = ({ size = 24 }) => {
|
|
129
144
|
return /* @__PURE__ */ jsx(
|
|
130
145
|
"span",
|
|
131
146
|
{
|
|
132
|
-
className:
|
|
147
|
+
className: style_module_default3.spinner,
|
|
133
148
|
style: { width: size, height: size },
|
|
134
149
|
role: "status",
|
|
135
150
|
"aria-label": "\uB85C\uB529 \uC911"
|
|
136
151
|
}
|
|
137
152
|
);
|
|
138
153
|
};
|
|
154
|
+
|
|
155
|
+
// src/ui/feedback/top-loading/style.module.scss
|
|
156
|
+
var style_module_default4 = {};
|
|
157
|
+
var TopLoading = ({
|
|
158
|
+
progress,
|
|
159
|
+
color,
|
|
160
|
+
height = 3,
|
|
161
|
+
isLoading = true
|
|
162
|
+
}) => {
|
|
163
|
+
if (!isLoading) return null;
|
|
164
|
+
const isIndeterminate = progress === void 0;
|
|
165
|
+
return /* @__PURE__ */ jsx(
|
|
166
|
+
"div",
|
|
167
|
+
{
|
|
168
|
+
className: style_module_default4.top_loading,
|
|
169
|
+
style: { height },
|
|
170
|
+
role: "progressbar",
|
|
171
|
+
"aria-valuemin": 0,
|
|
172
|
+
"aria-valuemax": 100,
|
|
173
|
+
"aria-valuenow": isIndeterminate ? void 0 : progress,
|
|
174
|
+
"aria-label": "\uD398\uC774\uC9C0 \uB85C\uB529 \uC911",
|
|
175
|
+
children: /* @__PURE__ */ jsx(
|
|
176
|
+
"div",
|
|
177
|
+
{
|
|
178
|
+
className: [
|
|
179
|
+
style_module_default4.bar,
|
|
180
|
+
isIndeterminate && style_module_default4.indeterminate
|
|
181
|
+
].filter(Boolean).join(" "),
|
|
182
|
+
style: {
|
|
183
|
+
width: isIndeterminate ? void 0 : `${progress}%`,
|
|
184
|
+
backgroundColor: color
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
};
|
|
139
191
|
var ToastProvider = ({ containerId = "default" }) => {
|
|
140
192
|
return /* @__PURE__ */ jsx(
|
|
141
193
|
ToastContainer,
|
|
@@ -165,6 +217,9 @@ var useToast = (containerId = "default") => {
|
|
|
165
217
|
message: (msg) => toast(msg, base)
|
|
166
218
|
};
|
|
167
219
|
};
|
|
220
|
+
|
|
221
|
+
// src/ui/general/button/style.module.scss
|
|
222
|
+
var style_module_default5 = {};
|
|
168
223
|
var Button = ({
|
|
169
224
|
variant = "primary",
|
|
170
225
|
size = "md",
|
|
@@ -173,13 +228,16 @@ var Button = ({
|
|
|
173
228
|
...props
|
|
174
229
|
}) => {
|
|
175
230
|
const buttonClassName = [
|
|
176
|
-
|
|
177
|
-
`
|
|
178
|
-
`
|
|
231
|
+
style_module_default5.button,
|
|
232
|
+
style_module_default5[`size_${size}`],
|
|
233
|
+
style_module_default5[`variant_${variant}`],
|
|
179
234
|
className ?? ""
|
|
180
235
|
].filter(Boolean).join(" ");
|
|
181
236
|
return /* @__PURE__ */ jsx("button", { className: buttonClassName, style: { width }, ...props });
|
|
182
237
|
};
|
|
238
|
+
|
|
239
|
+
// src/ui/form/checkbox/style.module.scss
|
|
240
|
+
var style_module_default6 = {};
|
|
183
241
|
var Checkbox = ({
|
|
184
242
|
label,
|
|
185
243
|
size = "md",
|
|
@@ -193,8 +251,8 @@ var Checkbox = ({
|
|
|
193
251
|
inputRef.current.indeterminate = Boolean(indeterminate);
|
|
194
252
|
}, [indeterminate]);
|
|
195
253
|
const rootClassName = [
|
|
196
|
-
|
|
197
|
-
`
|
|
254
|
+
style_module_default6.checkbox,
|
|
255
|
+
style_module_default6[`size_${size}`],
|
|
198
256
|
className ?? ""
|
|
199
257
|
].filter(Boolean).join(" ");
|
|
200
258
|
return /* @__PURE__ */ jsxs("label", { className: rootClassName, children: [
|
|
@@ -203,14 +261,17 @@ var Checkbox = ({
|
|
|
203
261
|
{
|
|
204
262
|
ref: inputRef,
|
|
205
263
|
type: "checkbox",
|
|
206
|
-
className:
|
|
264
|
+
className: style_module_default6.input,
|
|
207
265
|
...props
|
|
208
266
|
}
|
|
209
267
|
),
|
|
210
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
211
|
-
label ? /* @__PURE__ */ jsx("span", { className:
|
|
268
|
+
/* @__PURE__ */ jsx("span", { className: style_module_default6.box, "aria-hidden": "true" }),
|
|
269
|
+
label ? /* @__PURE__ */ jsx("span", { className: style_module_default6.label, children: label }) : null
|
|
212
270
|
] });
|
|
213
271
|
};
|
|
272
|
+
|
|
273
|
+
// src/ui/form/file/style.module.scss
|
|
274
|
+
var style_module_default7 = {};
|
|
214
275
|
var FileInput = ({
|
|
215
276
|
label = "\uD30C\uC77C \uC120\uD0DD",
|
|
216
277
|
onFiles,
|
|
@@ -219,30 +280,44 @@ var FileInput = ({
|
|
|
219
280
|
...props
|
|
220
281
|
}) => {
|
|
221
282
|
const inputId = React3.useId();
|
|
222
|
-
const rootClassName = [
|
|
283
|
+
const rootClassName = [
|
|
284
|
+
style_module_default7.file_input,
|
|
285
|
+
disabled && style_module_default7.disabled,
|
|
286
|
+
className ?? ""
|
|
287
|
+
].filter(Boolean).join(" ");
|
|
223
288
|
return /* @__PURE__ */ jsxs("div", { className: rootClassName, children: [
|
|
224
289
|
/* @__PURE__ */ jsx(
|
|
225
290
|
"input",
|
|
226
291
|
{
|
|
227
292
|
id: inputId,
|
|
228
293
|
type: "file",
|
|
229
|
-
className:
|
|
294
|
+
className: style_module_default7.control,
|
|
230
295
|
disabled,
|
|
231
296
|
onChange: (e) => onFiles?.(e.currentTarget.files),
|
|
232
297
|
...props
|
|
233
298
|
}
|
|
234
299
|
),
|
|
235
|
-
/* @__PURE__ */ jsx("label", { htmlFor: inputId, className:
|
|
300
|
+
/* @__PURE__ */ jsx("label", { htmlFor: inputId, className: style_module_default7.label, children: label })
|
|
236
301
|
] });
|
|
237
302
|
};
|
|
303
|
+
|
|
304
|
+
// src/ui/form/radio/style.module.scss
|
|
305
|
+
var style_module_default8 = {};
|
|
238
306
|
var Radio = ({ label, size = "md", className, ...props }) => {
|
|
239
|
-
const rootClassName = [
|
|
307
|
+
const rootClassName = [
|
|
308
|
+
style_module_default8.radio,
|
|
309
|
+
style_module_default8[`size_${size}`],
|
|
310
|
+
className ?? ""
|
|
311
|
+
].filter(Boolean).join(" ");
|
|
240
312
|
return /* @__PURE__ */ jsxs("label", { className: rootClassName, children: [
|
|
241
|
-
/* @__PURE__ */ jsx("input", { type: "radio", className:
|
|
242
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
243
|
-
label ? /* @__PURE__ */ jsx("span", { className:
|
|
313
|
+
/* @__PURE__ */ jsx("input", { type: "radio", className: style_module_default8.input, ...props }),
|
|
314
|
+
/* @__PURE__ */ jsx("span", { className: style_module_default8.dot, "aria-hidden": "true" }),
|
|
315
|
+
label ? /* @__PURE__ */ jsx("span", { className: style_module_default8.label, children: label }) : null
|
|
244
316
|
] });
|
|
245
317
|
};
|
|
318
|
+
|
|
319
|
+
// src/ui/general/select/style.module.scss
|
|
320
|
+
var style_module_default9 = {};
|
|
246
321
|
var Select = ({
|
|
247
322
|
id,
|
|
248
323
|
label,
|
|
@@ -363,13 +438,13 @@ var Select = ({
|
|
|
363
438
|
)
|
|
364
439
|
);
|
|
365
440
|
}, [isOpen, options, currentValue]);
|
|
366
|
-
const rootClassName = [
|
|
441
|
+
const rootClassName = [style_module_default9.select, className ?? ""].filter(Boolean).join(" ");
|
|
367
442
|
const controlClassName = [
|
|
368
|
-
|
|
369
|
-
`
|
|
370
|
-
`
|
|
371
|
-
isOpen &&
|
|
372
|
-
disabled &&
|
|
443
|
+
style_module_default9.control,
|
|
444
|
+
style_module_default9[`variant_${variant}`],
|
|
445
|
+
style_module_default9[`size_${size}`],
|
|
446
|
+
isOpen && style_module_default9.is_open,
|
|
447
|
+
disabled && style_module_default9.is_disabled
|
|
373
448
|
].filter(Boolean).join(" ");
|
|
374
449
|
return /* @__PURE__ */ jsxs(
|
|
375
450
|
"div",
|
|
@@ -382,7 +457,7 @@ var Select = ({
|
|
|
382
457
|
"label",
|
|
383
458
|
{
|
|
384
459
|
htmlFor: selectId,
|
|
385
|
-
className:
|
|
460
|
+
className: style_module_default9.label,
|
|
386
461
|
children: label
|
|
387
462
|
}
|
|
388
463
|
),
|
|
@@ -402,12 +477,12 @@ var Select = ({
|
|
|
402
477
|
/* @__PURE__ */ jsx(
|
|
403
478
|
"span",
|
|
404
479
|
{
|
|
405
|
-
className: currentOption ?
|
|
480
|
+
className: currentOption ? style_module_default9.value : style_module_default9.placeholder,
|
|
406
481
|
style: textAlign === "left" ? { textAlign: "start" } : void 0,
|
|
407
482
|
children: currentOption ? currentOption.label : placeholder
|
|
408
483
|
}
|
|
409
484
|
),
|
|
410
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
485
|
+
/* @__PURE__ */ jsx("span", { className: style_module_default9.icon, "aria-hidden": "true", children: /* @__PURE__ */ jsx(ChevronDown, { size: 16 }) })
|
|
411
486
|
]
|
|
412
487
|
}
|
|
413
488
|
),
|
|
@@ -416,15 +491,15 @@ var Select = ({
|
|
|
416
491
|
{
|
|
417
492
|
id: `${selectId}_listbox`,
|
|
418
493
|
role: "listbox",
|
|
419
|
-
className:
|
|
494
|
+
className: style_module_default9.list,
|
|
420
495
|
children: options.map((opt, i) => {
|
|
421
496
|
const selected = currentValue === opt.value;
|
|
422
497
|
const active = i === activeIndex;
|
|
423
498
|
const optionClassName = [
|
|
424
|
-
|
|
425
|
-
selected &&
|
|
426
|
-
active &&
|
|
427
|
-
opt.disabled &&
|
|
499
|
+
style_module_default9.option,
|
|
500
|
+
selected && style_module_default9.is_selected,
|
|
501
|
+
active && style_module_default9.is_active,
|
|
502
|
+
opt.disabled && style_module_default9.is_disabled
|
|
428
503
|
].filter(Boolean).join(" ");
|
|
429
504
|
return /* @__PURE__ */ jsxs(
|
|
430
505
|
"li",
|
|
@@ -458,6 +533,9 @@ var Select = ({
|
|
|
458
533
|
}
|
|
459
534
|
);
|
|
460
535
|
};
|
|
536
|
+
|
|
537
|
+
// src/ui/form/switch/style.module.scss
|
|
538
|
+
var style_module_default10 = {};
|
|
461
539
|
var Switch = ({
|
|
462
540
|
checked,
|
|
463
541
|
defaultChecked,
|
|
@@ -477,10 +555,10 @@ var Switch = ({
|
|
|
477
555
|
onChange?.(next);
|
|
478
556
|
};
|
|
479
557
|
const rootClassName = [
|
|
480
|
-
|
|
481
|
-
`
|
|
482
|
-
isOn &&
|
|
483
|
-
disabled &&
|
|
558
|
+
style_module_default10.switch,
|
|
559
|
+
style_module_default10[`size_${size}`],
|
|
560
|
+
isOn && style_module_default10.on,
|
|
561
|
+
disabled && style_module_default10.disabled,
|
|
484
562
|
className ?? ""
|
|
485
563
|
].filter(Boolean).join(" ");
|
|
486
564
|
return /* @__PURE__ */ jsx(
|
|
@@ -493,10 +571,13 @@ var Switch = ({
|
|
|
493
571
|
onClick: handleToggle,
|
|
494
572
|
className: rootClassName,
|
|
495
573
|
...props,
|
|
496
|
-
children: /* @__PURE__ */ jsx("span", { className:
|
|
574
|
+
children: /* @__PURE__ */ jsx("span", { className: style_module_default10.thumb })
|
|
497
575
|
}
|
|
498
576
|
);
|
|
499
577
|
};
|
|
578
|
+
|
|
579
|
+
// src/ui/form/textfield/style.module.scss
|
|
580
|
+
var style_module_default11 = {};
|
|
500
581
|
var TextField = React3.forwardRef(
|
|
501
582
|
({
|
|
502
583
|
id,
|
|
@@ -529,28 +610,28 @@ var TextField = React3.forwardRef(
|
|
|
529
610
|
setInnerValue(applyTransform(value ?? ""));
|
|
530
611
|
}, [isControlled, value, transformValue]);
|
|
531
612
|
const rootClassName = [
|
|
532
|
-
|
|
533
|
-
fullWidth &&
|
|
613
|
+
style_module_default11.text_field,
|
|
614
|
+
fullWidth && style_module_default11.full_width,
|
|
534
615
|
className ?? ""
|
|
535
616
|
].filter(Boolean).join(" ");
|
|
536
617
|
const inputClassName = [
|
|
537
|
-
|
|
538
|
-
`
|
|
539
|
-
`
|
|
540
|
-
leftIcon &&
|
|
541
|
-
rightIcon &&
|
|
542
|
-
error &&
|
|
543
|
-
success &&
|
|
618
|
+
style_module_default11.input,
|
|
619
|
+
style_module_default11[`variant_${variant}`],
|
|
620
|
+
style_module_default11[`size_${size}`],
|
|
621
|
+
leftIcon && style_module_default11.with_left,
|
|
622
|
+
rightIcon && style_module_default11.with_right,
|
|
623
|
+
error && style_module_default11.error,
|
|
624
|
+
success && style_module_default11.success
|
|
544
625
|
].filter(Boolean).join(" ");
|
|
545
626
|
const helperClassName = [
|
|
546
|
-
|
|
547
|
-
error &&
|
|
548
|
-
success &&
|
|
627
|
+
style_module_default11.helper,
|
|
628
|
+
error && style_module_default11.helper_error,
|
|
629
|
+
success && style_module_default11.helper_success
|
|
549
630
|
].filter(Boolean).join(" ");
|
|
550
631
|
return /* @__PURE__ */ jsxs("div", { className: rootClassName, children: [
|
|
551
|
-
label ? /* @__PURE__ */ jsx("label", { className:
|
|
552
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
553
|
-
leftIcon ? /* @__PURE__ */ jsx("span", { className:
|
|
632
|
+
label ? /* @__PURE__ */ jsx("label", { className: style_module_default11.label, htmlFor: inputId, children: label }) : null,
|
|
633
|
+
/* @__PURE__ */ jsxs("div", { className: style_module_default11.wrap, children: [
|
|
634
|
+
leftIcon ? /* @__PURE__ */ jsx("span", { className: `${style_module_default11.icon} ${style_module_default11.icon_left}`, children: leftIcon }) : null,
|
|
554
635
|
/* @__PURE__ */ jsx(
|
|
555
636
|
"input",
|
|
556
637
|
{
|
|
@@ -583,13 +664,16 @@ var TextField = React3.forwardRef(
|
|
|
583
664
|
}
|
|
584
665
|
}
|
|
585
666
|
),
|
|
586
|
-
rightIcon ? /* @__PURE__ */ jsx("span", { className:
|
|
667
|
+
rightIcon ? /* @__PURE__ */ jsx("span", { className: `${style_module_default11.icon} ${style_module_default11.icon_right}`, children: rightIcon }) : null
|
|
587
668
|
] }),
|
|
588
669
|
helperText ? /* @__PURE__ */ jsx("div", { id: helperId, className: helperClassName, children: helperText }) : null
|
|
589
670
|
] });
|
|
590
671
|
}
|
|
591
672
|
);
|
|
592
673
|
TextField.displayName = "TextField";
|
|
674
|
+
|
|
675
|
+
// src/ui/form/date-picker/style.module.scss
|
|
676
|
+
var style_module_default12 = {};
|
|
593
677
|
var pad = (n) => String(n).padStart(2, "0");
|
|
594
678
|
var getDaysInMonth = (year, month) => new Date(year, month, 0).getDate();
|
|
595
679
|
var normalizeWidth = (v) => typeof v === "number" ? `${v}px` : v;
|
|
@@ -629,57 +713,62 @@ var DatePicker = ({
|
|
|
629
713
|
const safeDay = clampDay(yy, mm, dd ?? 1);
|
|
630
714
|
onChange(`${yy}-${pad(mm)}-${pad(safeDay)}`);
|
|
631
715
|
};
|
|
632
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
633
|
-
label && /* @__PURE__ */ jsx("label", { className:
|
|
634
|
-
/* @__PURE__ */ jsxs(
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
(
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
"
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
716
|
+
return /* @__PURE__ */ jsxs("div", { className: style_module_default12.date_picker, style: { width: normalizeWidth(width?.container) }, children: [
|
|
717
|
+
label && /* @__PURE__ */ jsx("label", { className: style_module_default12.label, children: label }),
|
|
718
|
+
/* @__PURE__ */ jsxs("div", { className: style_module_default12.fields, children: [
|
|
719
|
+
/* @__PURE__ */ jsxs(
|
|
720
|
+
"select",
|
|
721
|
+
{
|
|
722
|
+
style: { width: normalizeWidth(width?.year) },
|
|
723
|
+
value: year,
|
|
724
|
+
disabled,
|
|
725
|
+
onChange: (e) => emit(Number(e.target.value), month || minMonth, day || minDay),
|
|
726
|
+
children: [
|
|
727
|
+
/* @__PURE__ */ jsx("option", { value: "", disabled: true }),
|
|
728
|
+
Array.from(
|
|
729
|
+
{ length: maxYear - startYear + 1 },
|
|
730
|
+
(_, i) => startYear + i
|
|
731
|
+
).map((y2) => /* @__PURE__ */ jsx("option", { value: y2, children: y2 }, y2))
|
|
732
|
+
]
|
|
733
|
+
}
|
|
734
|
+
),
|
|
735
|
+
/* @__PURE__ */ jsxs(
|
|
736
|
+
"select",
|
|
737
|
+
{
|
|
738
|
+
style: { width: normalizeWidth(width?.month) },
|
|
739
|
+
value: month,
|
|
740
|
+
disabled: disabled || !year,
|
|
741
|
+
onChange: (e) => emit(year, Number(e.target.value), day || minDay),
|
|
742
|
+
children: [
|
|
743
|
+
/* @__PURE__ */ jsx("option", { value: "", disabled: true }),
|
|
744
|
+
Array.from({ length: maxMonth - minMonth + 1 }, (_, i) => minMonth + i).map(
|
|
745
|
+
(m2) => /* @__PURE__ */ jsx("option", { value: m2, children: pad(m2) }, m2)
|
|
746
|
+
)
|
|
747
|
+
]
|
|
748
|
+
}
|
|
749
|
+
),
|
|
750
|
+
mode === "year-month-day" && /* @__PURE__ */ jsxs(
|
|
751
|
+
"select",
|
|
752
|
+
{
|
|
753
|
+
style: { width: normalizeWidth(width?.day) },
|
|
754
|
+
value: day,
|
|
755
|
+
disabled: disabled || !month,
|
|
756
|
+
onChange: (e) => emit(year, month, Number(e.target.value)),
|
|
757
|
+
children: [
|
|
758
|
+
/* @__PURE__ */ jsx("option", { value: "", disabled: true }),
|
|
759
|
+
Array.from(
|
|
760
|
+
{ length: days - minDay + 1 },
|
|
761
|
+
(_, i) => minDay + i
|
|
762
|
+
).map((d2) => /* @__PURE__ */ jsx("option", { value: d2, children: pad(d2) }, d2))
|
|
763
|
+
]
|
|
764
|
+
}
|
|
765
|
+
)
|
|
766
|
+
] })
|
|
681
767
|
] });
|
|
682
768
|
};
|
|
769
|
+
|
|
770
|
+
// src/ui/navigation/pagination/style.module.scss
|
|
771
|
+
var style_module_default13 = {};
|
|
683
772
|
var range = (start, end) => {
|
|
684
773
|
const out = [];
|
|
685
774
|
for (let i = start; i <= end; i += 1) out.push(i);
|
|
@@ -705,27 +794,31 @@ var Pagination = ({ page, totalPages, onChange }) => {
|
|
|
705
794
|
() => getPaginationItems(page, totalPages),
|
|
706
795
|
[page, totalPages]
|
|
707
796
|
);
|
|
708
|
-
return /* @__PURE__ */ jsxs("nav", { className:
|
|
797
|
+
return /* @__PURE__ */ jsxs("nav", { className: style_module_default13.pagination, "aria-label": "Pagination", children: [
|
|
709
798
|
/* @__PURE__ */ jsx(
|
|
710
799
|
"button",
|
|
711
800
|
{
|
|
712
|
-
className:
|
|
801
|
+
className: style_module_default13.item,
|
|
713
802
|
onClick: () => onChange(page - 1),
|
|
714
803
|
disabled: prevDisabled,
|
|
715
804
|
"aria-label": "Previous page",
|
|
716
805
|
children: "\u2039"
|
|
717
806
|
}
|
|
718
807
|
),
|
|
719
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
808
|
+
/* @__PURE__ */ jsx("div", { className: style_module_default13.pages, role: "list", children: items.map((it, idx) => {
|
|
720
809
|
if (it === "ellipsis") {
|
|
721
|
-
return /* @__PURE__ */ jsx("span", { className:
|
|
810
|
+
return /* @__PURE__ */ jsx("span", { className: style_module_default13.ellipsis, "aria-hidden": "true", children: "\u2026" }, `e-${idx}`);
|
|
722
811
|
}
|
|
723
812
|
const isActive = it === page;
|
|
813
|
+
const buttonClassName = [
|
|
814
|
+
style_module_default13.pageButton,
|
|
815
|
+
isActive && style_module_default13.active
|
|
816
|
+
].filter(Boolean).join(" ");
|
|
724
817
|
return /* @__PURE__ */ jsx(
|
|
725
818
|
"button",
|
|
726
819
|
{
|
|
727
820
|
type: "button",
|
|
728
|
-
className:
|
|
821
|
+
className: buttonClassName,
|
|
729
822
|
onClick: () => onChange(it),
|
|
730
823
|
"aria-current": isActive ? "page" : void 0,
|
|
731
824
|
children: it
|
|
@@ -736,7 +829,7 @@ var Pagination = ({ page, totalPages, onChange }) => {
|
|
|
736
829
|
/* @__PURE__ */ jsx(
|
|
737
830
|
"button",
|
|
738
831
|
{
|
|
739
|
-
className:
|
|
832
|
+
className: style_module_default13.item,
|
|
740
833
|
onClick: () => onChange(page + 1),
|
|
741
834
|
disabled: nextDisabled,
|
|
742
835
|
"aria-label": "Next page",
|
|
@@ -745,6 +838,9 @@ var Pagination = ({ page, totalPages, onChange }) => {
|
|
|
745
838
|
)
|
|
746
839
|
] });
|
|
747
840
|
};
|
|
841
|
+
|
|
842
|
+
// src/ui/overlay/modal/style.module.scss
|
|
843
|
+
var style_module_default14 = {};
|
|
748
844
|
var Modal = ({
|
|
749
845
|
open,
|
|
750
846
|
onClose,
|
|
@@ -764,23 +860,24 @@ var Modal = ({
|
|
|
764
860
|
return () => document.removeEventListener("keydown", onKeyDown);
|
|
765
861
|
}, [open, onClose]);
|
|
766
862
|
if (!open) return null;
|
|
863
|
+
const panelClassName = [style_module_default14.panel, className].filter(Boolean).join(" ");
|
|
767
864
|
return /* @__PURE__ */ jsx(
|
|
768
865
|
"div",
|
|
769
866
|
{
|
|
770
|
-
className:
|
|
867
|
+
className: style_module_default14.modal,
|
|
771
868
|
role: "dialog",
|
|
772
869
|
"aria-modal": "true",
|
|
773
870
|
onClick: () => closeOnOverlay && onClose?.(),
|
|
774
871
|
children: /* @__PURE__ */ jsxs(
|
|
775
872
|
"div",
|
|
776
873
|
{
|
|
777
|
-
className:
|
|
874
|
+
className: panelClassName,
|
|
778
875
|
style: { width },
|
|
779
876
|
onClick: (e) => e.stopPropagation(),
|
|
780
877
|
...props,
|
|
781
878
|
children: [
|
|
782
|
-
title && /* @__PURE__ */ jsx("div", { className:
|
|
783
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
879
|
+
title && /* @__PURE__ */ jsx("div", { className: style_module_default14.header, children: title }),
|
|
880
|
+
/* @__PURE__ */ jsx("div", { className: style_module_default14.body, children })
|
|
784
881
|
]
|
|
785
882
|
}
|
|
786
883
|
)
|
|
@@ -788,4 +885,4 @@ var Modal = ({
|
|
|
788
885
|
);
|
|
789
886
|
};
|
|
790
887
|
|
|
791
|
-
export { AlertProvider, Button, Card, Checkbox, DatePicker, FileInput,
|
|
888
|
+
export { AlertProvider, Button, Card, Checkbox, DatePicker, FileInput, Modal, Pagination, Radio, Select, Spinner, Switch, TextField, ToastProvider, TopLoading, useAlert, useToast };
|