@hivcd-printshop/design-system 1.1.1 → 1.2.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.d.mts +227 -11
- package/dist/index.d.ts +227 -11
- package/dist/index.js +887 -110
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +846 -97
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22,19 +22,47 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
var index_exports = {};
|
|
23
23
|
__export(index_exports, {
|
|
24
24
|
BackButton: () => BackButton,
|
|
25
|
+
BasicFormField: () => BasicFormField,
|
|
25
26
|
CTA: () => CTA,
|
|
26
27
|
CategorySegment: () => CategorySegment,
|
|
27
28
|
CategorySegmentedControl: () => CategorySegmentedControl,
|
|
29
|
+
Column: () => Column,
|
|
30
|
+
ColumnContentContainer: () => ColumnContentContainer,
|
|
31
|
+
ColumnLabel: () => ColumnLabel,
|
|
32
|
+
ColumnSubTitle: () => ColumnSubTitle,
|
|
33
|
+
ColumnText: () => ColumnText,
|
|
34
|
+
ColumnTextStyle: () => ColumnTextStyle,
|
|
35
|
+
Dropdown: () => Dropdown,
|
|
36
|
+
FormCheckBox: () => FormCheckBox,
|
|
37
|
+
FormColor: () => FormColor,
|
|
38
|
+
FormFile: () => FormFile,
|
|
39
|
+
FormNumber: () => FormNumber,
|
|
40
|
+
FormPassword: () => FormPassword,
|
|
41
|
+
FormSelectBox: () => FormSelectBox,
|
|
42
|
+
FormTel: () => FormTel,
|
|
43
|
+
FormText: () => FormText,
|
|
44
|
+
FormTextArea: () => FormTextArea,
|
|
45
|
+
IconCheck: () => IconCheck,
|
|
46
|
+
IconChevronDownXS: () => IconChevronDownXS,
|
|
47
|
+
IconInfo: () => IconInfo,
|
|
48
|
+
List: () => List,
|
|
49
|
+
Modal: () => Modal,
|
|
50
|
+
ModalText: () => ModalText,
|
|
51
|
+
ModalTextStyle: () => ModalTextStyle,
|
|
52
|
+
MultiColumn: () => MultiColumn,
|
|
28
53
|
NoticeBadge: () => NoticeBadge,
|
|
29
54
|
NoticeBar: () => NoticeBar,
|
|
30
55
|
SearchBar: () => SearchBar,
|
|
56
|
+
SelectBoxOption: () => SelectBoxOption,
|
|
31
57
|
SideRadioAccordion: () => SideRadioAccordion,
|
|
32
58
|
TNB: () => TNB,
|
|
33
59
|
Tag: () => Tag,
|
|
60
|
+
TextButton: () => TextButton,
|
|
34
61
|
Timetable: () => Timetable,
|
|
35
62
|
TitleInput: () => TitleInput,
|
|
36
63
|
Toast: () => Toast,
|
|
37
|
-
WeekNavigation: () => WeekNavigation
|
|
64
|
+
WeekNavigation: () => WeekNavigation,
|
|
65
|
+
getInputStyles: () => getInputStyles
|
|
38
66
|
});
|
|
39
67
|
module.exports = __toCommonJS(index_exports);
|
|
40
68
|
|
|
@@ -92,6 +120,20 @@ var IconChevronDownXS = ({
|
|
|
92
120
|
}
|
|
93
121
|
);
|
|
94
122
|
};
|
|
123
|
+
var IconCheck = ({ className, stroke }) => {
|
|
124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
125
|
+
"svg",
|
|
126
|
+
{
|
|
127
|
+
className,
|
|
128
|
+
width: "13",
|
|
129
|
+
height: "13",
|
|
130
|
+
viewBox: "0 0 13 13",
|
|
131
|
+
fill: "none",
|
|
132
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
133
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M2.05566 7.0555L4.83344 9.8333L10.9446 3.72217", stroke: stroke || "#121212" })
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
};
|
|
95
137
|
var IconSearch = ({ className, stroke }) => {
|
|
96
138
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
97
139
|
"svg",
|
|
@@ -126,6 +168,32 @@ var IconSearch = ({ className, stroke }) => {
|
|
|
126
168
|
}
|
|
127
169
|
);
|
|
128
170
|
};
|
|
171
|
+
var IconInfo = ({ className, stroke }) => {
|
|
172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
173
|
+
"svg",
|
|
174
|
+
{
|
|
175
|
+
className,
|
|
176
|
+
width: "16",
|
|
177
|
+
height: "16",
|
|
178
|
+
viewBox: "0 0 16 16",
|
|
179
|
+
fill: "none",
|
|
180
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
181
|
+
children: [
|
|
182
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "8", cy: "8", r: "6.25", stroke: stroke || "#8b94a1", strokeWidth: "1.5" }),
|
|
183
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
184
|
+
"path",
|
|
185
|
+
{
|
|
186
|
+
d: "M8 7.25V11.25",
|
|
187
|
+
stroke: stroke || "#8b94a1",
|
|
188
|
+
strokeWidth: "1.5",
|
|
189
|
+
strokeLinecap: "round"
|
|
190
|
+
}
|
|
191
|
+
),
|
|
192
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "8", cy: "5", r: "0.9", fill: stroke || "#8b94a1" })
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
};
|
|
129
197
|
var IconGoBack = ({ className, stroke }) => {
|
|
130
198
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
131
199
|
"svg",
|
|
@@ -212,15 +280,696 @@ var CTA = ({
|
|
|
212
280
|
);
|
|
213
281
|
};
|
|
214
282
|
|
|
215
|
-
// src/components/
|
|
283
|
+
// src/components/Column/MultiColumn.tsx
|
|
216
284
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
285
|
+
var MultiColumnMain = ({ children, className }) => {
|
|
286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cn("flex flex-col w-full h-full", className), children });
|
|
287
|
+
};
|
|
288
|
+
var Columns = ({ children, className }) => {
|
|
289
|
+
return (
|
|
290
|
+
// flex 래퍼를 사용하고 하위 Column들이 flex-1을 가지게 하거나,
|
|
291
|
+
// grid를 사용하여 열을 나눌 수 있어. 여기서는 flex를 활용한 균등 분할 예시야.
|
|
292
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cn("flex w-full h-full divide-x divide-gray02", className), children })
|
|
293
|
+
);
|
|
294
|
+
};
|
|
295
|
+
var CTAs = ({ children, className }) => {
|
|
296
|
+
if (!children) return null;
|
|
297
|
+
return (
|
|
298
|
+
// CTA 버튼들을 중앙에 배치하는 예시 (우측 정렬이 필요하면 justify-end 사용)
|
|
299
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cn("flex flex-col w-full h-fit", className), children })
|
|
300
|
+
);
|
|
301
|
+
};
|
|
302
|
+
var MultiColumn = Object.assign(MultiColumnMain, {
|
|
303
|
+
Columns,
|
|
304
|
+
CTAs
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
// src/components/Column/Column.tsx
|
|
308
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
309
|
+
var Column = ({ className, children, header }) => {
|
|
310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: cn("flex flex-col gap-5", "h-full w-full px-5 pt-3 pb-8", className), children: [
|
|
311
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h1", { className: cn("text-head3-medium text-primary font-bold"), children: header }),
|
|
312
|
+
children
|
|
313
|
+
] });
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
// src/components/Column/ColumnContentContainer.tsx
|
|
317
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
318
|
+
var ColumnContentContainer = ({ className, children }) => {
|
|
319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cn("flex flex-col gap-1.5 w-full h-fit", className), children });
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
// src/components/Column/ColumnLabel.tsx
|
|
323
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
324
|
+
var ColumnLabel = ({ className, children, subLabel, htmlFor }) => {
|
|
325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { htmlFor, className: cn("flex gap-1.5 items-end", className), children: [
|
|
326
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cn("text-body2-regular text-tertiary"), children }),
|
|
327
|
+
subLabel && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cn("text-caption-book text-quaternary"), children: subLabel })
|
|
328
|
+
] });
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
// src/components/Column/ColumnText.tsx
|
|
332
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
333
|
+
var ColumnTextStyle = "text-body3-book text-strong";
|
|
334
|
+
var ModalTextStyle = "text-body1-regular text-primary";
|
|
335
|
+
var ColumnText = ({ className, alert = false, children, onClick }) => {
|
|
336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: cn(ColumnTextStyle, alert && "text-danger", className), onClick, children: children ? children : "-" });
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
// src/components/Column/ColumnSubTitle.tsx
|
|
340
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
341
|
+
var ColumnSubTitle = ({
|
|
342
|
+
className,
|
|
343
|
+
children,
|
|
344
|
+
action,
|
|
345
|
+
as: Tag2 = "h2"
|
|
346
|
+
}) => {
|
|
347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Tag2, { className: cn("flex items-center justify-between gap-1.5", "w-full", className), children: [
|
|
348
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn("text-head3-medium text-strong"), children }),
|
|
349
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "flex shrink-0 items-center", children: action })
|
|
350
|
+
] });
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
// src/components/Form/BasicFormField.tsx
|
|
354
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
355
|
+
var BasicFormField = ({
|
|
356
|
+
children,
|
|
357
|
+
isDanger,
|
|
358
|
+
dangerText,
|
|
359
|
+
className
|
|
360
|
+
}) => {
|
|
361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: cn("flex flex-col gap-1.5", className), children: [
|
|
362
|
+
children,
|
|
363
|
+
isDanger && dangerText && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-caption-book text-danger", children: dangerText })
|
|
364
|
+
] });
|
|
365
|
+
};
|
|
366
|
+
var getInputStyles = (isDanger, additionalClass) => {
|
|
367
|
+
return cn(
|
|
368
|
+
"w-full h-10 px-3",
|
|
369
|
+
"box-border border border-gray02 focus:outline-none focus:border-black",
|
|
370
|
+
"bg-white hover:bg-gray00 transition-colors focus:hover:bg-white",
|
|
371
|
+
ColumnTextStyle,
|
|
372
|
+
"text-primary placeholder:text-quaternary",
|
|
373
|
+
isDanger && "border-danger",
|
|
374
|
+
// 에러 시 빨간 테두리
|
|
375
|
+
additionalClass
|
|
376
|
+
// 각 인풋별 추가 스타일 (예: textarea의 h-30)
|
|
377
|
+
);
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
// src/components/Form/FormText.tsx
|
|
381
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
382
|
+
var FormText = ({ className, isDanger, dangerText, ...props }) => {
|
|
383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("input", { type: "text", className: getInputStyles(isDanger, className), ...props }) });
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
// src/components/Form/FormTextArea.tsx
|
|
387
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
388
|
+
var FormTextArea = ({ className, isDanger, dangerText, ...props }) => {
|
|
389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
390
|
+
"textarea",
|
|
391
|
+
{
|
|
392
|
+
className: getInputStyles(isDanger, "resize-none h-30 py-2.5 " + (className || "")),
|
|
393
|
+
...props
|
|
394
|
+
}
|
|
395
|
+
) });
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
// src/components/Form/FormNumber.tsx
|
|
399
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
400
|
+
var FormNumber = ({ className, isDanger, dangerText, ...props }) => {
|
|
401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", { type: "number", className: getInputStyles(isDanger, className), ...props }) });
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
// src/components/Form/FormPassword.tsx
|
|
405
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
406
|
+
var FormPassword = ({ className, isDanger, dangerText, ...props }) => {
|
|
407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { type: "password", className: getInputStyles(isDanger, className), ...props }) });
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
// src/components/Form/FormTel.tsx
|
|
411
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
412
|
+
var FormTel = ({ className, isDanger, dangerText, onChange, ...props }) => {
|
|
413
|
+
const handlePhoneChange = (e) => {
|
|
414
|
+
const rawValue = e.target.value.replace(/[^0-9]/g, "");
|
|
415
|
+
let formattedValue = "";
|
|
416
|
+
if (rawValue.length < 4) formattedValue = rawValue;
|
|
417
|
+
else if (rawValue.length < 8) formattedValue = `${rawValue.slice(0, 3)}-${rawValue.slice(3)}`;
|
|
418
|
+
else
|
|
419
|
+
formattedValue = `${rawValue.slice(0, 3)}-${rawValue.slice(3, 7)}-${rawValue.slice(7, 11)}`;
|
|
420
|
+
e.target.value = formattedValue;
|
|
421
|
+
if (onChange) onChange(e);
|
|
422
|
+
};
|
|
423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
424
|
+
"input",
|
|
425
|
+
{
|
|
426
|
+
type: "tel",
|
|
427
|
+
className: getInputStyles(isDanger, className),
|
|
428
|
+
onChange: handlePhoneChange,
|
|
429
|
+
maxLength: 13,
|
|
430
|
+
...props
|
|
431
|
+
}
|
|
432
|
+
) });
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
// src/components/Form/FormColor.tsx
|
|
436
|
+
var import_react = require("react");
|
|
437
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
438
|
+
var FormColor = ({
|
|
439
|
+
className,
|
|
440
|
+
isDanger,
|
|
441
|
+
dangerText,
|
|
442
|
+
value,
|
|
443
|
+
defaultValue = "#000000",
|
|
444
|
+
onChange,
|
|
445
|
+
...props
|
|
446
|
+
}) => {
|
|
447
|
+
const [internalColor, setInternalColor] = (0, import_react.useState)(
|
|
448
|
+
value || defaultValue || "#000000"
|
|
449
|
+
);
|
|
450
|
+
const color = value !== void 0 ? value : internalColor;
|
|
451
|
+
const handleColorChange = (e) => {
|
|
452
|
+
setInternalColor(e.target.value);
|
|
453
|
+
onChange?.(e);
|
|
454
|
+
};
|
|
455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
456
|
+
"label",
|
|
457
|
+
{
|
|
458
|
+
className: getInputStyles(
|
|
459
|
+
isDanger,
|
|
460
|
+
// 💡 focus-within을 통해 내부 <input>이 포커스될 때 부모(label)의 테두리와 배경 변경!
|
|
461
|
+
"flex items-center gap-2 relative focus-within:border-black focus-within:hover:bg-white" + (className || "")
|
|
462
|
+
),
|
|
463
|
+
children: [
|
|
464
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "w-6 h-6 shrink-0 overflow-hidden", style: { backgroundColor: color }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
465
|
+
"input",
|
|
466
|
+
{
|
|
467
|
+
type: "color",
|
|
468
|
+
value: color,
|
|
469
|
+
onChange: handleColorChange,
|
|
470
|
+
className: "absolute inset-0 w-full h-full opacity-0",
|
|
471
|
+
...props
|
|
472
|
+
}
|
|
473
|
+
) }),
|
|
474
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-primary text-body3-regular uppercase flex-1 select-none", children: color })
|
|
475
|
+
]
|
|
476
|
+
}
|
|
477
|
+
) });
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
// src/components/Form/FormFile.tsx
|
|
481
|
+
var import_react2 = require("react");
|
|
482
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
483
|
+
var FormFile = ({
|
|
484
|
+
className,
|
|
485
|
+
isDanger,
|
|
486
|
+
dangerText,
|
|
487
|
+
placeholder = "\uD30C\uC77C\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694",
|
|
488
|
+
fileUrl,
|
|
489
|
+
filename,
|
|
490
|
+
onChange,
|
|
491
|
+
...props
|
|
492
|
+
}) => {
|
|
493
|
+
const [selectedFile, setSelectedFile] = (0, import_react2.useState)(null);
|
|
494
|
+
const handleFileChange = (e) => {
|
|
495
|
+
const originalFile = e.target.files?.[0];
|
|
496
|
+
if (!originalFile) {
|
|
497
|
+
setSelectedFile(null);
|
|
498
|
+
onChange?.(e);
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
let finalFile = originalFile;
|
|
502
|
+
if (filename) {
|
|
503
|
+
const lastDotIndex = originalFile.name.lastIndexOf(".");
|
|
504
|
+
const extension = lastDotIndex !== -1 ? originalFile.name.slice(lastDotIndex) : "";
|
|
505
|
+
const newFileName = filename.endsWith(extension) ? filename : `${filename}${extension}`;
|
|
506
|
+
finalFile = new File([originalFile], newFileName, {
|
|
507
|
+
type: originalFile.type,
|
|
508
|
+
lastModified: originalFile.lastModified
|
|
509
|
+
});
|
|
510
|
+
try {
|
|
511
|
+
const dataTransfer = new DataTransfer();
|
|
512
|
+
dataTransfer.items.add(finalFile);
|
|
513
|
+
e.target.files = dataTransfer.files;
|
|
514
|
+
} catch (err) {
|
|
515
|
+
console.warn("DataTransfer\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uBE0C\uB77C\uC6B0\uC800\uC785\uB2C8\uB2E4.", err);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
setSelectedFile(finalFile);
|
|
519
|
+
onChange?.(e);
|
|
520
|
+
};
|
|
521
|
+
const handleDownload = (e) => {
|
|
522
|
+
e.preventDefault();
|
|
523
|
+
e.stopPropagation();
|
|
524
|
+
if (selectedFile) {
|
|
525
|
+
const url = URL.createObjectURL(selectedFile);
|
|
526
|
+
const a = document.createElement("a");
|
|
527
|
+
a.href = url;
|
|
528
|
+
a.download = selectedFile.name;
|
|
529
|
+
document.body.appendChild(a);
|
|
530
|
+
a.click();
|
|
531
|
+
document.body.removeChild(a);
|
|
532
|
+
URL.revokeObjectURL(url);
|
|
533
|
+
} else if (fileUrl) {
|
|
534
|
+
const a = document.createElement("a");
|
|
535
|
+
a.href = fileUrl;
|
|
536
|
+
a.download = fileUrl.split("/").pop() || "download";
|
|
537
|
+
a.target = "_blank";
|
|
538
|
+
document.body.appendChild(a);
|
|
539
|
+
a.click();
|
|
540
|
+
document.body.removeChild(a);
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
const displayFileName = selectedFile?.name || (fileUrl ? fileUrl.split("/").pop() : null);
|
|
544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
545
|
+
"div",
|
|
546
|
+
{
|
|
547
|
+
className: getInputStyles(
|
|
548
|
+
isDanger,
|
|
549
|
+
"active:bg-gray00 flex items-center gap-2 justify-between " + (className || "")
|
|
550
|
+
),
|
|
551
|
+
children: [
|
|
552
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
553
|
+
"div",
|
|
554
|
+
{
|
|
555
|
+
className: `truncate flex-1 max-w-50 w-full ${displayFileName ? "text-primary" : "text-quaternary"}`,
|
|
556
|
+
children: displayFileName ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
557
|
+
"span",
|
|
558
|
+
{
|
|
559
|
+
onClick: handleDownload,
|
|
560
|
+
className: "w-full underline text-primary cursor-pointer hover:text-black transition-colors",
|
|
561
|
+
title: `${displayFileName} \uB2E4\uC6B4\uB85C\uB4DC`,
|
|
562
|
+
children: displayFileName
|
|
563
|
+
}
|
|
564
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "w-full", children: placeholder })
|
|
565
|
+
}
|
|
566
|
+
),
|
|
567
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "px-1 -mx-1 cursor-pointer", children: [
|
|
568
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "text-primary text-caption-regular underline", children: "\uD30C\uC77C \uCCA8\uBD80" }),
|
|
569
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("input", { type: "file", className: "hidden", onChange: handleFileChange, ...props })
|
|
570
|
+
] })
|
|
571
|
+
]
|
|
572
|
+
}
|
|
573
|
+
) });
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
// src/components/Form/FormCheckBox.tsx
|
|
577
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
578
|
+
var FormCheckBox = ({
|
|
579
|
+
isChecked,
|
|
580
|
+
setIsChecked,
|
|
581
|
+
children,
|
|
582
|
+
className,
|
|
583
|
+
textStyle,
|
|
584
|
+
...props
|
|
585
|
+
}) => {
|
|
586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
587
|
+
"label",
|
|
588
|
+
{
|
|
589
|
+
className: cn(
|
|
590
|
+
"w-fit h-fit pr-1",
|
|
591
|
+
"flex items-center gap-1",
|
|
592
|
+
"hover:bg-gray00 active:bg-gray01 transition-colors",
|
|
593
|
+
"cursor-pointer select-none",
|
|
594
|
+
// 💡 1. 텍스트 드래그 방지 추가
|
|
595
|
+
className
|
|
596
|
+
),
|
|
597
|
+
children: [
|
|
598
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
599
|
+
"input",
|
|
600
|
+
{
|
|
601
|
+
type: "checkbox",
|
|
602
|
+
checked: isChecked,
|
|
603
|
+
onChange: (e) => setIsChecked(e.target.checked),
|
|
604
|
+
className: "sr-only peer",
|
|
605
|
+
...props
|
|
606
|
+
}
|
|
607
|
+
),
|
|
608
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex items-center justify-center w-5 h-5 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
609
|
+
"div",
|
|
610
|
+
{
|
|
611
|
+
className: cn(
|
|
612
|
+
"w-[15px] h-[15px]",
|
|
613
|
+
"box-border border",
|
|
614
|
+
"flex items-center justify-center transition-colors duration-200",
|
|
615
|
+
// 💡 3. 키보드 Tab 이동 시 접근성 향상 (포커스 링 표시)
|
|
616
|
+
"peer-focus-visible:ring-2 peer-focus-visible:ring-black peer-focus-visible:ring-offset-1"
|
|
617
|
+
),
|
|
618
|
+
children: isChecked && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconCheck, {})
|
|
619
|
+
}
|
|
620
|
+
) }),
|
|
621
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: cn(ColumnTextStyle, textStyle), children })
|
|
622
|
+
]
|
|
623
|
+
}
|
|
624
|
+
);
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
// src/components/Form/FormSelectBox.tsx
|
|
628
|
+
var import_react3 = require("react");
|
|
629
|
+
|
|
630
|
+
// src/components/Form/SelectBoxOption.tsx
|
|
631
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
632
|
+
var SelectBoxOption = ({
|
|
633
|
+
label,
|
|
634
|
+
onClick,
|
|
635
|
+
// selectedLabel,
|
|
636
|
+
className
|
|
637
|
+
}) => {
|
|
638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
639
|
+
"li",
|
|
640
|
+
{
|
|
641
|
+
onClick,
|
|
642
|
+
className: cn(
|
|
643
|
+
"w-full h-11 px-3 shrink-0",
|
|
644
|
+
"flex items-center justify-start",
|
|
645
|
+
// "box-border border-b border-gray02",
|
|
646
|
+
"text-body3-book text-primary",
|
|
647
|
+
"bg-white hover:bg-gray00 active:bg-gray01",
|
|
648
|
+
// isSelected
|
|
649
|
+
// ? "bg-black text-white"
|
|
650
|
+
// : "",
|
|
651
|
+
className
|
|
652
|
+
),
|
|
653
|
+
children: label
|
|
654
|
+
}
|
|
655
|
+
);
|
|
656
|
+
};
|
|
657
|
+
|
|
658
|
+
// src/components/Form/FormSelectBox.tsx
|
|
659
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
660
|
+
var FormSelectBox = ({
|
|
661
|
+
options,
|
|
662
|
+
value,
|
|
663
|
+
onChange,
|
|
664
|
+
placeholder = "\uC120\uD0DD\uD574\uC8FC\uC138\uC694",
|
|
665
|
+
isDanger,
|
|
666
|
+
dangerText,
|
|
667
|
+
className
|
|
668
|
+
}) => {
|
|
669
|
+
const [isOpen, setIsOpen] = (0, import_react3.useState)(false);
|
|
670
|
+
const containerRef = (0, import_react3.useRef)(null);
|
|
671
|
+
(0, import_react3.useEffect)(() => {
|
|
672
|
+
const handleClickOutside = (event) => {
|
|
673
|
+
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
674
|
+
setIsOpen(false);
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
678
|
+
return () => {
|
|
679
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
680
|
+
};
|
|
681
|
+
}, []);
|
|
682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { ref: containerRef, className: "relative w-full", children: [
|
|
683
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
684
|
+
"div",
|
|
685
|
+
{
|
|
686
|
+
tabIndex: 0,
|
|
687
|
+
className: getInputStyles(
|
|
688
|
+
isDanger,
|
|
689
|
+
cn(
|
|
690
|
+
"flex items-center justify-between cursor-pointer select-none",
|
|
691
|
+
isOpen && "border-black",
|
|
692
|
+
// 💡 열려있을 때는 테두리를 검은색으로 고정 (포커스 효과)
|
|
693
|
+
className
|
|
694
|
+
)
|
|
695
|
+
),
|
|
696
|
+
onClick: (e) => {
|
|
697
|
+
if (isOpen) {
|
|
698
|
+
e.currentTarget.blur();
|
|
699
|
+
}
|
|
700
|
+
setIsOpen((prev) => !prev);
|
|
701
|
+
},
|
|
702
|
+
children: [
|
|
703
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: value ? "text-primary" : "text-quaternary", children: value || placeholder }),
|
|
704
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
705
|
+
IconChevronDownXS,
|
|
706
|
+
{
|
|
707
|
+
className: cn("text-gray06 transition-transform", isOpen && "rotate-180"),
|
|
708
|
+
stroke: "currentColor"
|
|
709
|
+
}
|
|
710
|
+
)
|
|
711
|
+
]
|
|
712
|
+
}
|
|
713
|
+
),
|
|
714
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
715
|
+
"ul",
|
|
716
|
+
{
|
|
717
|
+
className: cn(
|
|
718
|
+
"absolute top-full left-0 right-0 z-10",
|
|
719
|
+
// 💡 Input 바로 아래에 띄움
|
|
720
|
+
"box-border border border-gray02 bg-white flex flex-col",
|
|
721
|
+
"max-h-50 overflow-y-auto shadow-sm"
|
|
722
|
+
// 💡 항목이 너무 많으면 스크롤 생성
|
|
723
|
+
),
|
|
724
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
725
|
+
SelectBoxOption,
|
|
726
|
+
{
|
|
727
|
+
label: option,
|
|
728
|
+
onClick: () => {
|
|
729
|
+
onChange(option);
|
|
730
|
+
setIsOpen(false);
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
option
|
|
734
|
+
))
|
|
735
|
+
}
|
|
736
|
+
)
|
|
737
|
+
] }) });
|
|
738
|
+
};
|
|
739
|
+
|
|
740
|
+
// src/components/TextButton/TextButton.tsx
|
|
741
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
742
|
+
var TextButton = ({
|
|
743
|
+
children,
|
|
744
|
+
icon,
|
|
745
|
+
iconPosition = "left",
|
|
746
|
+
alert = false,
|
|
747
|
+
underline = true,
|
|
748
|
+
className,
|
|
749
|
+
...props
|
|
750
|
+
}) => {
|
|
751
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
752
|
+
icon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "flex shrink-0 items-center", children: icon }),
|
|
753
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: cn(underline && "underline underline-offset-2"), children }),
|
|
754
|
+
icon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "flex shrink-0 items-center", children: icon })
|
|
755
|
+
] });
|
|
756
|
+
const classes = cn(
|
|
757
|
+
"inline-flex w-fit items-center gap-1 px-1 -mx-1",
|
|
758
|
+
"text-caption-book",
|
|
759
|
+
alert ? "text-danger" : "text-tertiary",
|
|
760
|
+
"hover:bg-gray00 active:bg-gray01 transition-colors",
|
|
761
|
+
alert ? "hover:text-danger" : "hover:text-primary",
|
|
762
|
+
"cursor-pointer select-none",
|
|
763
|
+
"disabled:cursor-default disabled:text-quaternary disabled:hover:bg-transparent",
|
|
764
|
+
"aria-disabled:cursor-default aria-disabled:text-quaternary aria-disabled:hover:bg-transparent",
|
|
765
|
+
className
|
|
766
|
+
);
|
|
767
|
+
if (props.href !== void 0) {
|
|
768
|
+
const { href, ...rest } = props;
|
|
769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("a", { href, className: classes, ...rest, children: content });
|
|
770
|
+
}
|
|
771
|
+
const buttonProps = props;
|
|
772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { type: "button", className: classes, ...buttonProps, children: content });
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
// src/components/Dropdown/Dropdown.tsx
|
|
776
|
+
var import_react4 = require("react");
|
|
777
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
778
|
+
var Dropdown = ({ selectedLabel, setSelectedLabel, labels, className }) => {
|
|
779
|
+
const [isOpen, setIsOpen] = (0, import_react4.useState)(false);
|
|
780
|
+
const containerRef = (0, import_react4.useRef)(null);
|
|
781
|
+
(0, import_react4.useEffect)(() => {
|
|
782
|
+
const handleClickOutside = (event) => {
|
|
783
|
+
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
784
|
+
setIsOpen(false);
|
|
785
|
+
}
|
|
786
|
+
};
|
|
787
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
788
|
+
return () => {
|
|
789
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
790
|
+
};
|
|
791
|
+
}, []);
|
|
792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { ref: containerRef, className: "relative", children: [
|
|
793
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
794
|
+
"div",
|
|
795
|
+
{
|
|
796
|
+
className: cn(
|
|
797
|
+
"w-fit h-fit px-2 py-1",
|
|
798
|
+
"flex items-center justify-center gap-1.5",
|
|
799
|
+
"text-body3-book text-strong",
|
|
800
|
+
"bg-white hover:bg-gray00 active:bg-gray01",
|
|
801
|
+
"cursor-pointer",
|
|
802
|
+
className
|
|
803
|
+
),
|
|
804
|
+
onClick: () => setIsOpen((prev) => !prev),
|
|
805
|
+
children: [
|
|
806
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { children: selectedLabel }),
|
|
807
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
808
|
+
IconChevronDownXS,
|
|
809
|
+
{
|
|
810
|
+
className: cn("text-gray06 transition-transform", isOpen && "rotate-180"),
|
|
811
|
+
stroke: "currentColor"
|
|
812
|
+
}
|
|
813
|
+
)
|
|
814
|
+
]
|
|
815
|
+
}
|
|
816
|
+
),
|
|
817
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cn("absolute top-full right-0 z-10", "box-border border border-gray02"), children: labels.map((label) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
818
|
+
SelectBoxOption,
|
|
819
|
+
{
|
|
820
|
+
label,
|
|
821
|
+
onClick: () => {
|
|
822
|
+
setSelectedLabel(label);
|
|
823
|
+
setIsOpen(false);
|
|
824
|
+
},
|
|
825
|
+
className: "w-44 h-11 justify-center"
|
|
826
|
+
},
|
|
827
|
+
label
|
|
828
|
+
)) })
|
|
829
|
+
] });
|
|
830
|
+
};
|
|
831
|
+
|
|
832
|
+
// src/components/ListView/List.tsx
|
|
833
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
834
|
+
function List({
|
|
835
|
+
className,
|
|
836
|
+
label1,
|
|
837
|
+
label2,
|
|
838
|
+
label2OnClick,
|
|
839
|
+
label3,
|
|
840
|
+
disabled = false,
|
|
841
|
+
selected = false,
|
|
842
|
+
onClick,
|
|
843
|
+
children,
|
|
844
|
+
...props
|
|
845
|
+
}) {
|
|
846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
847
|
+
"li",
|
|
848
|
+
{
|
|
849
|
+
className: cn(
|
|
850
|
+
"w-full min-w-fit h-13 pl-4 pr-6",
|
|
851
|
+
"grid grid-cols-[4fr_1fr_1fr] items-center gap-4",
|
|
852
|
+
"bg-white hover:bg-gray00 hover:has-[.has-clickable:hover]:bg-white active:bg-gray01",
|
|
853
|
+
"text-primary select-none [&_*]:cursor-pointer cursor-pointer",
|
|
854
|
+
disabled && "opacity-40 [&_*]:cursor-pointer cursor-pointer",
|
|
855
|
+
selected && "bg-black text-white hover:bg-black active:bg-black hover:has-[.has-clickable:hover]:bg-black",
|
|
856
|
+
className
|
|
857
|
+
),
|
|
858
|
+
...props,
|
|
859
|
+
onClick,
|
|
860
|
+
children: [
|
|
861
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("section", { className: cn("flex items-center gap-4"), children: [
|
|
862
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { className: cn("text-body2-regular"), children: label1 ? label1 : "-" }),
|
|
863
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("flex items-center gap-2"), children })
|
|
864
|
+
] }),
|
|
865
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
866
|
+
"label",
|
|
867
|
+
{
|
|
868
|
+
className: cn(
|
|
869
|
+
"text-body3-book truncate p-1 w-fit",
|
|
870
|
+
label2OnClick && "underline has-clickable",
|
|
871
|
+
label2OnClick && !selected && "hover:bg-gray00"
|
|
872
|
+
),
|
|
873
|
+
onClick: label2OnClick,
|
|
874
|
+
children: label2 ? label2 : "-"
|
|
875
|
+
}
|
|
876
|
+
),
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { className: cn("text-body3-regular text-right"), children: label3 ? label3 : "-" })
|
|
878
|
+
]
|
|
879
|
+
}
|
|
880
|
+
);
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
// src/components/Modal/Modal.tsx
|
|
884
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
885
|
+
var ModalBase = ({ isVisible, header, children, className }) => {
|
|
886
|
+
if (!isVisible) return null;
|
|
887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: cn("fixed inset-0 z-50 pointer-events-auto"), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
888
|
+
"div",
|
|
889
|
+
{
|
|
890
|
+
className: cn("fixed inset-0 z-1001 flex items-center justify-center pointer-events-auto"),
|
|
891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
892
|
+
"main",
|
|
893
|
+
{
|
|
894
|
+
className: cn(
|
|
895
|
+
"w-110 pt-8 h-fit",
|
|
896
|
+
"flex flex-col items-center",
|
|
897
|
+
"border border-gray02",
|
|
898
|
+
"bg-white shadow-[0 0 30px 0 rgba(0, 0, 0, 0.08);]",
|
|
899
|
+
className
|
|
900
|
+
),
|
|
901
|
+
children: [
|
|
902
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h1", { className: cn("text-strong font-[500] text-[24px] leading-[32px]"), children: header }),
|
|
903
|
+
children
|
|
904
|
+
]
|
|
905
|
+
}
|
|
906
|
+
)
|
|
907
|
+
}
|
|
908
|
+
) });
|
|
909
|
+
};
|
|
910
|
+
var Contents = ({ children, className }) => {
|
|
911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
912
|
+
"div",
|
|
913
|
+
{
|
|
914
|
+
className: cn(
|
|
915
|
+
"flex flex-col items-center gap-8",
|
|
916
|
+
"w-full h-fit",
|
|
917
|
+
"px-14 pt-8 pb-9",
|
|
918
|
+
className
|
|
919
|
+
),
|
|
920
|
+
children
|
|
921
|
+
}
|
|
922
|
+
);
|
|
923
|
+
};
|
|
924
|
+
var CTAs2 = ({ children, className, row = false }) => {
|
|
925
|
+
if (!children) return null;
|
|
926
|
+
return (
|
|
927
|
+
// CTA 버튼들을 중앙에 배치하는 예시 (우측 정렬이 필요하면 justify-end 사용)
|
|
928
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
929
|
+
"div",
|
|
930
|
+
{
|
|
931
|
+
className: cn(
|
|
932
|
+
"flex flex-col w-full h-fit",
|
|
933
|
+
row && "flex-row divide-x divide-gray02",
|
|
934
|
+
className
|
|
935
|
+
),
|
|
936
|
+
children
|
|
937
|
+
}
|
|
938
|
+
)
|
|
939
|
+
);
|
|
940
|
+
};
|
|
941
|
+
var Modal = Object.assign(ModalBase, {
|
|
942
|
+
Contents,
|
|
943
|
+
CTAs: CTAs2
|
|
944
|
+
});
|
|
945
|
+
|
|
946
|
+
// src/components/Modal/ModalText.tsx
|
|
947
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
948
|
+
var ModalText = ({ children, className }) => {
|
|
949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
950
|
+
"div",
|
|
951
|
+
{
|
|
952
|
+
className: cn(
|
|
953
|
+
"flex flex-col items-center",
|
|
954
|
+
"mt-[-20px] mb-[-4px]",
|
|
955
|
+
ModalTextStyle,
|
|
956
|
+
"text-tertiary text-center",
|
|
957
|
+
className
|
|
958
|
+
),
|
|
959
|
+
children
|
|
960
|
+
}
|
|
961
|
+
);
|
|
962
|
+
};
|
|
963
|
+
|
|
964
|
+
// src/components/createPost/CategorySegment.tsx
|
|
965
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
217
966
|
var CategorySegment = ({
|
|
218
967
|
selected = false,
|
|
219
968
|
label,
|
|
220
969
|
className,
|
|
221
970
|
onClick
|
|
222
971
|
}) => {
|
|
223
|
-
return /* @__PURE__ */ (0,
|
|
972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
224
973
|
"div",
|
|
225
974
|
{
|
|
226
975
|
className: cn(
|
|
@@ -240,7 +989,7 @@ var CategorySegment = ({
|
|
|
240
989
|
};
|
|
241
990
|
|
|
242
991
|
// src/components/createPost/CategorySegmentedControl.tsx
|
|
243
|
-
var
|
|
992
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
244
993
|
var categorySegments = {
|
|
245
994
|
info: ["\uACF5\uC6A9 \uBB3C\uD488", "\uC77C\uBC18 \uAE30\uC790\uC7AC", "\uD2B9\uC218 \uAE30\uC790\uC7AC"],
|
|
246
995
|
archive: ["\uD504\uB9B0\uD2B8\uC2E4", "\uD64D\uC775\uC2DC\uB514"],
|
|
@@ -254,8 +1003,8 @@ var CategorySegmentedControl = ({
|
|
|
254
1003
|
className
|
|
255
1004
|
}) => {
|
|
256
1005
|
const segments = categorySegments[variable];
|
|
257
|
-
return /* @__PURE__ */ (0,
|
|
258
|
-
/* @__PURE__ */ (0,
|
|
1006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: cn("w-full h-fit flex items-center justify-start", className), children: [
|
|
1007
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
259
1008
|
"div",
|
|
260
1009
|
{
|
|
261
1010
|
className: cn(
|
|
@@ -268,7 +1017,7 @@ var CategorySegmentedControl = ({
|
|
|
268
1017
|
children: variable === "infoTag" ? "\uD0DC\uADF8 \uC120\uD0DD" : "\uCE74\uD14C\uACE0\uB9AC \uC120\uD0DD"
|
|
269
1018
|
}
|
|
270
1019
|
),
|
|
271
|
-
segments.map((label) => /* @__PURE__ */ (0,
|
|
1020
|
+
segments.map((label) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
272
1021
|
CategorySegment,
|
|
273
1022
|
{
|
|
274
1023
|
label,
|
|
@@ -281,9 +1030,9 @@ var CategorySegmentedControl = ({
|
|
|
281
1030
|
};
|
|
282
1031
|
|
|
283
1032
|
// src/components/createPost/TitleInput.tsx
|
|
284
|
-
var
|
|
1033
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
285
1034
|
var TitleInput = ({ title, onChange, className }) => {
|
|
286
|
-
return /* @__PURE__ */ (0,
|
|
1035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
287
1036
|
"input",
|
|
288
1037
|
{
|
|
289
1038
|
type: "text",
|
|
@@ -303,9 +1052,9 @@ var TitleInput = ({ title, onChange, className }) => {
|
|
|
303
1052
|
};
|
|
304
1053
|
|
|
305
1054
|
// src/components/notice/NoticeBadge.tsx
|
|
306
|
-
var
|
|
1055
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
307
1056
|
var NoticeBadge = ({ variable, className, onClick }) => {
|
|
308
|
-
return /* @__PURE__ */ (0,
|
|
1057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
309
1058
|
"button",
|
|
310
1059
|
{
|
|
311
1060
|
type: "button",
|
|
@@ -326,7 +1075,7 @@ var NoticeBadge = ({ variable, className, onClick }) => {
|
|
|
326
1075
|
};
|
|
327
1076
|
|
|
328
1077
|
// src/components/notice/NoticeBar.tsx
|
|
329
|
-
var
|
|
1078
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
330
1079
|
var NoticeBar = ({
|
|
331
1080
|
variable = "default",
|
|
332
1081
|
badgeVariable,
|
|
@@ -335,7 +1084,7 @@ var NoticeBar = ({
|
|
|
335
1084
|
className,
|
|
336
1085
|
onClick
|
|
337
1086
|
}) => {
|
|
338
|
-
return /* @__PURE__ */ (0,
|
|
1087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
339
1088
|
"div",
|
|
340
1089
|
{
|
|
341
1090
|
className: cn(
|
|
@@ -347,20 +1096,20 @@ var NoticeBar = ({
|
|
|
347
1096
|
),
|
|
348
1097
|
onClick,
|
|
349
1098
|
children: [
|
|
350
|
-
/* @__PURE__ */ (0,
|
|
351
|
-
/* @__PURE__ */ (0,
|
|
352
|
-
/* @__PURE__ */ (0,
|
|
1099
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("section", { className: "flex items-center gap-3", children: [
|
|
1100
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(NoticeBadge, { variable: badgeVariable }),
|
|
1101
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h1", { className: "text-head1-medium text-strong", children: title })
|
|
353
1102
|
] }),
|
|
354
|
-
/* @__PURE__ */ (0,
|
|
1103
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-body3-book text-tertiary", children: date })
|
|
355
1104
|
]
|
|
356
1105
|
}
|
|
357
1106
|
);
|
|
358
1107
|
};
|
|
359
1108
|
|
|
360
1109
|
// src/components/SearchBar/SearchBar.tsx
|
|
361
|
-
var
|
|
1110
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
362
1111
|
var SearchBar = ({ value, onChange, className }) => {
|
|
363
|
-
return /* @__PURE__ */ (0,
|
|
1112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
364
1113
|
"label",
|
|
365
1114
|
{
|
|
366
1115
|
className: cn(
|
|
@@ -371,8 +1120,8 @@ var SearchBar = ({ value, onChange, className }) => {
|
|
|
371
1120
|
className
|
|
372
1121
|
),
|
|
373
1122
|
children: [
|
|
374
|
-
/* @__PURE__ */ (0,
|
|
375
|
-
/* @__PURE__ */ (0,
|
|
1123
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(IconSearch, {}),
|
|
1124
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
376
1125
|
"input",
|
|
377
1126
|
{
|
|
378
1127
|
type: "text",
|
|
@@ -391,15 +1140,15 @@ var SearchBar = ({ value, onChange, className }) => {
|
|
|
391
1140
|
};
|
|
392
1141
|
|
|
393
1142
|
// src/components/SideRadioAccordion/SideRadioAccordion.tsx
|
|
394
|
-
var
|
|
1143
|
+
var import_react6 = require("react");
|
|
395
1144
|
|
|
396
1145
|
// src/lib/useControllableState.ts
|
|
397
|
-
var
|
|
1146
|
+
var import_react5 = require("react");
|
|
398
1147
|
function useControllableState(controlled, defaultValue) {
|
|
399
1148
|
const isControlled = controlled !== void 0;
|
|
400
|
-
const [uncontrolled, setUncontrolled] = (0,
|
|
1149
|
+
const [uncontrolled, setUncontrolled] = (0, import_react5.useState)(defaultValue);
|
|
401
1150
|
const value = isControlled ? controlled : uncontrolled;
|
|
402
|
-
const setValue = (0,
|
|
1151
|
+
const setValue = (0, import_react5.useCallback)(
|
|
403
1152
|
(next) => {
|
|
404
1153
|
if (!isControlled) setUncontrolled(next);
|
|
405
1154
|
},
|
|
@@ -421,7 +1170,7 @@ var RadioSelected_default = "./RadioSelected-DOLVV7ZM.svg";
|
|
|
421
1170
|
var RadioUnselected_default = "./RadioUnselected-QN74EU46.svg";
|
|
422
1171
|
|
|
423
1172
|
// src/components/SideRadioAccordion/SideRadioAccordion.tsx
|
|
424
|
-
var
|
|
1173
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
425
1174
|
var printColorBgClass = {
|
|
426
1175
|
Plotter: "bg-print-plotter",
|
|
427
1176
|
Printer: "bg-print-printer",
|
|
@@ -432,7 +1181,7 @@ var printColorBgClass = {
|
|
|
432
1181
|
"Laser Cutting": "bg-print-laser-cutting"
|
|
433
1182
|
};
|
|
434
1183
|
var itemKey = (item) => item.value ?? item.title;
|
|
435
|
-
var SideRadioAccordion = (0,
|
|
1184
|
+
var SideRadioAccordion = (0, import_react6.forwardRef)(
|
|
436
1185
|
function SideRadioAccordion2({
|
|
437
1186
|
step,
|
|
438
1187
|
title,
|
|
@@ -465,8 +1214,8 @@ var SideRadioAccordion = (0, import_react2.forwardRef)(
|
|
|
465
1214
|
setIsOpen(next);
|
|
466
1215
|
onOpenChange?.(next);
|
|
467
1216
|
};
|
|
468
|
-
return /* @__PURE__ */ (0,
|
|
469
|
-
/* @__PURE__ */ (0,
|
|
1217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { ref, className: cn("w-full", className), children: [
|
|
1218
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
470
1219
|
Stepper,
|
|
471
1220
|
{
|
|
472
1221
|
step,
|
|
@@ -477,8 +1226,8 @@ var SideRadioAccordion = (0, import_react2.forwardRef)(
|
|
|
477
1226
|
className: cn(stickyHeader && "sticky top-0 z-10")
|
|
478
1227
|
}
|
|
479
1228
|
),
|
|
480
|
-
expanded && /* @__PURE__ */ (0,
|
|
481
|
-
radioToggleList.map((item) => /* @__PURE__ */ (0,
|
|
1229
|
+
expanded && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col", children: [
|
|
1230
|
+
radioToggleList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
482
1231
|
RadioToggleItem,
|
|
483
1232
|
{
|
|
484
1233
|
...item,
|
|
@@ -487,8 +1236,8 @@ var SideRadioAccordion = (0, import_react2.forwardRef)(
|
|
|
487
1236
|
},
|
|
488
1237
|
itemKey(item)
|
|
489
1238
|
)),
|
|
490
|
-
quantityLimitLabel && /* @__PURE__ */ (0,
|
|
491
|
-
|
|
1239
|
+
quantityLimitLabel && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1240
|
+
TextButton2,
|
|
492
1241
|
{
|
|
493
1242
|
label: quantityLimitLabel,
|
|
494
1243
|
onClick: onClickQuantityLimit,
|
|
@@ -500,16 +1249,16 @@ var SideRadioAccordion = (0, import_react2.forwardRef)(
|
|
|
500
1249
|
}
|
|
501
1250
|
);
|
|
502
1251
|
var Stepper = ({ step, title, isOpen, collapsible, onClick, className }) => {
|
|
503
|
-
const label = /* @__PURE__ */ (0,
|
|
1252
|
+
const label = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { children: [
|
|
504
1253
|
step,
|
|
505
1254
|
" | ",
|
|
506
1255
|
title
|
|
507
1256
|
] });
|
|
508
1257
|
const base = "w-full flex items-center justify-between px-3 py-2.5 text-body1-medium text-strong text-left bg-white";
|
|
509
1258
|
if (!collapsible) {
|
|
510
|
-
return /* @__PURE__ */ (0,
|
|
1259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: cn(base, className), children: label });
|
|
511
1260
|
}
|
|
512
|
-
return /* @__PURE__ */ (0,
|
|
1261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
513
1262
|
"button",
|
|
514
1263
|
{
|
|
515
1264
|
type: "button",
|
|
@@ -517,7 +1266,7 @@ var Stepper = ({ step, title, isOpen, collapsible, onClick, className }) => {
|
|
|
517
1266
|
className: cn(base, "cursor-pointer hover:bg-gray00 active:bg-gray01", className),
|
|
518
1267
|
children: [
|
|
519
1268
|
label,
|
|
520
|
-
/* @__PURE__ */ (0,
|
|
1269
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
521
1270
|
"img",
|
|
522
1271
|
{
|
|
523
1272
|
src: ChevronDown_default,
|
|
@@ -543,8 +1292,8 @@ var RadioToggleItem = ({
|
|
|
543
1292
|
}) => {
|
|
544
1293
|
const rowBg = !open ? "bg-white hover:bg-gray00" : color ? void 0 : printColor ? printColorBgClass[printColor] : "bg-gray00";
|
|
545
1294
|
const style = open && color ? { backgroundColor: color } : void 0;
|
|
546
|
-
return /* @__PURE__ */ (0,
|
|
547
|
-
/* @__PURE__ */ (0,
|
|
1295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "w-full", children: [
|
|
1296
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
548
1297
|
"button",
|
|
549
1298
|
{
|
|
550
1299
|
type: "button",
|
|
@@ -557,16 +1306,16 @@ var RadioToggleItem = ({
|
|
|
557
1306
|
className
|
|
558
1307
|
),
|
|
559
1308
|
children: [
|
|
560
|
-
/* @__PURE__ */ (0,
|
|
561
|
-
/* @__PURE__ */ (0,
|
|
1309
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Radio, { selected: open }),
|
|
1310
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: title })
|
|
562
1311
|
]
|
|
563
1312
|
}
|
|
564
1313
|
),
|
|
565
|
-
open && /* @__PURE__ */ (0,
|
|
566
|
-
/* @__PURE__ */ (0,
|
|
567
|
-
badges && badges.length > 0 && /* @__PURE__ */ (0,
|
|
568
|
-
labelTextButton && /* @__PURE__ */ (0,
|
|
569
|
-
|
|
1314
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col gap-2 px-3 py-3 bg-white", children: [
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-caption-regular text-secondary", children: content }),
|
|
1316
|
+
badges && badges.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex gap-1", children: badges.map((badge) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Badge, { label: badge }, badge)) }),
|
|
1317
|
+
labelTextButton && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1318
|
+
TextButton2,
|
|
570
1319
|
{
|
|
571
1320
|
label: labelTextButton,
|
|
572
1321
|
onClick: onClickTextButton,
|
|
@@ -578,7 +1327,7 @@ var RadioToggleItem = ({
|
|
|
578
1327
|
] });
|
|
579
1328
|
};
|
|
580
1329
|
var Radio = ({ selected = false, className }) => {
|
|
581
|
-
return /* @__PURE__ */ (0,
|
|
1330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
582
1331
|
"img",
|
|
583
1332
|
{
|
|
584
1333
|
src: selected ? RadioSelected_default : RadioUnselected_default,
|
|
@@ -587,8 +1336,8 @@ var Radio = ({ selected = false, className }) => {
|
|
|
587
1336
|
}
|
|
588
1337
|
);
|
|
589
1338
|
};
|
|
590
|
-
var
|
|
591
|
-
return /* @__PURE__ */ (0,
|
|
1339
|
+
var TextButton2 = ({ label, onClick, showIcon = false, className }) => {
|
|
1340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
592
1341
|
"button",
|
|
593
1342
|
{
|
|
594
1343
|
type: "button",
|
|
@@ -601,14 +1350,14 @@ var TextButton = ({ label, onClick, showIcon = false, className }) => {
|
|
|
601
1350
|
className
|
|
602
1351
|
),
|
|
603
1352
|
children: [
|
|
604
|
-
showIcon && /* @__PURE__ */ (0,
|
|
1353
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("img", { src: Exclamation_default, alt: "" }),
|
|
605
1354
|
label
|
|
606
1355
|
]
|
|
607
1356
|
}
|
|
608
1357
|
);
|
|
609
1358
|
};
|
|
610
1359
|
var Badge = ({ label, className }) => {
|
|
611
|
-
return /* @__PURE__ */ (0,
|
|
1360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
612
1361
|
"div",
|
|
613
1362
|
{
|
|
614
1363
|
className: cn(
|
|
@@ -622,7 +1371,7 @@ var Badge = ({ label, className }) => {
|
|
|
622
1371
|
};
|
|
623
1372
|
|
|
624
1373
|
// src/components/Tag/Tag.tsx
|
|
625
|
-
var
|
|
1374
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
626
1375
|
var Tag = ({
|
|
627
1376
|
className,
|
|
628
1377
|
children,
|
|
@@ -632,7 +1381,7 @@ var Tag = ({
|
|
|
632
1381
|
onClick,
|
|
633
1382
|
...props
|
|
634
1383
|
}) => {
|
|
635
|
-
return /* @__PURE__ */ (0,
|
|
1384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
636
1385
|
"button",
|
|
637
1386
|
{
|
|
638
1387
|
className: cn(
|
|
@@ -651,16 +1400,16 @@ var Tag = ({
|
|
|
651
1400
|
disabled,
|
|
652
1401
|
style: bgColor ? { backgroundColor: bgColor, border: "none" } : void 0,
|
|
653
1402
|
...props,
|
|
654
|
-
children: /* @__PURE__ */ (0,
|
|
1403
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children })
|
|
655
1404
|
}
|
|
656
1405
|
);
|
|
657
1406
|
};
|
|
658
1407
|
|
|
659
1408
|
// src/components/Timetable/Timetable.tsx
|
|
660
|
-
var
|
|
1409
|
+
var import_react8 = require("react");
|
|
661
1410
|
|
|
662
1411
|
// src/components/Timetable/WeekNavigation.tsx
|
|
663
|
-
var
|
|
1412
|
+
var import_react7 = require("react");
|
|
664
1413
|
|
|
665
1414
|
// src/components/Timetable/dateUtils.ts
|
|
666
1415
|
var KOREAN_WEEKDAYS = ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"];
|
|
@@ -693,18 +1442,18 @@ var formatWeekRange = (weekStart) => {
|
|
|
693
1442
|
};
|
|
694
1443
|
|
|
695
1444
|
// src/components/Timetable/WeekNavigation.tsx
|
|
696
|
-
var
|
|
1445
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
697
1446
|
var weekLabel = {
|
|
698
1447
|
thisWeek: "\uC774\uBC88 \uC8FC",
|
|
699
1448
|
nextWeek: "\uB2E4\uC74C \uC8FC",
|
|
700
1449
|
twoWeeksLater: "\uB2E4\uB2E4\uC74C \uC8FC"
|
|
701
1450
|
};
|
|
702
|
-
var WeekNavigation = (0,
|
|
1451
|
+
var WeekNavigation = (0, import_react7.forwardRef)(
|
|
703
1452
|
function WeekNavigation2({ date, week, label, canPrev, canNext, onPrevWeek, onNextWeek, className }, ref) {
|
|
704
1453
|
const showPrev = canPrev ?? (week ? week !== "thisWeek" : true);
|
|
705
1454
|
const showNext = canNext ?? (week ? week !== "twoWeeksLater" : true);
|
|
706
1455
|
const text = label ?? (week ? `${weekLabel[week]} (${formatWeekRange(date)})` : formatWeekRange(date));
|
|
707
|
-
return /* @__PURE__ */ (0,
|
|
1456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
708
1457
|
"div",
|
|
709
1458
|
{
|
|
710
1459
|
ref,
|
|
@@ -716,9 +1465,9 @@ var WeekNavigation = (0, import_react3.forwardRef)(
|
|
|
716
1465
|
className
|
|
717
1466
|
),
|
|
718
1467
|
children: [
|
|
719
|
-
/* @__PURE__ */ (0,
|
|
720
|
-
/* @__PURE__ */ (0,
|
|
721
|
-
/* @__PURE__ */ (0,
|
|
1468
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ArrowButton, { direction: "left", visible: showPrev, onClick: onPrevWeek }),
|
|
1469
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: text }),
|
|
1470
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ArrowButton, { direction: "right", visible: showNext, onClick: onNextWeek })
|
|
722
1471
|
]
|
|
723
1472
|
}
|
|
724
1473
|
);
|
|
@@ -726,9 +1475,9 @@ var WeekNavigation = (0, import_react3.forwardRef)(
|
|
|
726
1475
|
);
|
|
727
1476
|
var ArrowButton = ({ direction, visible, onClick }) => {
|
|
728
1477
|
if (!visible) {
|
|
729
|
-
return /* @__PURE__ */ (0,
|
|
1478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "w-6 h-6" });
|
|
730
1479
|
}
|
|
731
|
-
return /* @__PURE__ */ (0,
|
|
1480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
732
1481
|
"button",
|
|
733
1482
|
{
|
|
734
1483
|
type: "button",
|
|
@@ -738,7 +1487,7 @@ var ArrowButton = ({ direction, visible, onClick }) => {
|
|
|
738
1487
|
"text-gray06 cursor-pointer",
|
|
739
1488
|
"hover:bg-gray00 active:bg-gray01"
|
|
740
1489
|
),
|
|
741
|
-
children: /* @__PURE__ */ (0,
|
|
1490
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
742
1491
|
IconChevronDownXS,
|
|
743
1492
|
{
|
|
744
1493
|
className: direction === "left" ? "rotate-90" : "-rotate-90",
|
|
@@ -750,7 +1499,7 @@ var ArrowButton = ({ direction, visible, onClick }) => {
|
|
|
750
1499
|
};
|
|
751
1500
|
|
|
752
1501
|
// src/components/Timetable/Timetable.tsx
|
|
753
|
-
var
|
|
1502
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
754
1503
|
var printColorHoverClass = {
|
|
755
1504
|
Plotter: "hover:bg-print-plotter",
|
|
756
1505
|
Printer: "hover:bg-print-printer",
|
|
@@ -760,7 +1509,7 @@ var printColorHoverClass = {
|
|
|
760
1509
|
"Seet Cutting": "hover:bg-print-seet-cutting",
|
|
761
1510
|
"Laser Cutting": "hover:bg-print-laser-cutting"
|
|
762
1511
|
};
|
|
763
|
-
var Timetable = (0,
|
|
1512
|
+
var Timetable = (0, import_react8.forwardRef)(function Timetable2({
|
|
764
1513
|
weekStart,
|
|
765
1514
|
week,
|
|
766
1515
|
days,
|
|
@@ -773,8 +1522,8 @@ var Timetable = (0, import_react4.forwardRef)(function Timetable2({
|
|
|
773
1522
|
canNextWeek,
|
|
774
1523
|
className
|
|
775
1524
|
}, ref) {
|
|
776
|
-
return /* @__PURE__ */ (0,
|
|
777
|
-
!hideWeekNavigation && /* @__PURE__ */ (0,
|
|
1525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { ref, className: cn(fluid && "w-full", className), children: [
|
|
1526
|
+
!hideWeekNavigation && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
778
1527
|
WeekNavigation,
|
|
779
1528
|
{
|
|
780
1529
|
date: weekStart,
|
|
@@ -785,7 +1534,7 @@ var Timetable = (0, import_react4.forwardRef)(function Timetable2({
|
|
|
785
1534
|
onNextWeek
|
|
786
1535
|
}
|
|
787
1536
|
),
|
|
788
|
-
/* @__PURE__ */ (0,
|
|
1537
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("flex", fluid && "w-full"), children: days.map((day) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
789
1538
|
DailyTimetable,
|
|
790
1539
|
{
|
|
791
1540
|
date: day.date,
|
|
@@ -798,9 +1547,9 @@ var Timetable = (0, import_react4.forwardRef)(function Timetable2({
|
|
|
798
1547
|
] });
|
|
799
1548
|
});
|
|
800
1549
|
var DailyTimetable = ({ date, slots, fluid, onSelectTime, className }) => {
|
|
801
|
-
return /* @__PURE__ */ (0,
|
|
802
|
-
/* @__PURE__ */ (0,
|
|
803
|
-
slots.map((slot) => /* @__PURE__ */ (0,
|
|
1550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: cn("flex flex-col", fluid ? "flex-1 min-w-0" : "w-18", className), children: [
|
|
1551
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "h-13 flex items-center justify-center text-body3-medium text-secondary", children: formatDayLabel(date) }),
|
|
1552
|
+
slots.map((slot) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
804
1553
|
TimeItem,
|
|
805
1554
|
{
|
|
806
1555
|
state: slot.state,
|
|
@@ -826,7 +1575,7 @@ var TimeItem = ({
|
|
|
826
1575
|
}) => {
|
|
827
1576
|
const clickable = (state === "default" || state === "selected") && !!onClick;
|
|
828
1577
|
const style = state === "default" && color ? { "--tt-hover": color } : void 0;
|
|
829
|
-
return /* @__PURE__ */ (0,
|
|
1578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
830
1579
|
"div",
|
|
831
1580
|
{
|
|
832
1581
|
onClick: clickable ? onClick : void 0,
|
|
@@ -850,13 +1599,13 @@ var TimeItem = ({
|
|
|
850
1599
|
};
|
|
851
1600
|
|
|
852
1601
|
// src/components/TNB/TNB.tsx
|
|
853
|
-
var
|
|
854
|
-
var
|
|
1602
|
+
var import_react9 = require("react");
|
|
1603
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
855
1604
|
function useControllableState2(controlled, defaultValue) {
|
|
856
1605
|
const isControlled = controlled !== void 0;
|
|
857
|
-
const [uncontrolled, setUncontrolled] = (0,
|
|
1606
|
+
const [uncontrolled, setUncontrolled] = (0, import_react9.useState)(defaultValue);
|
|
858
1607
|
const value = isControlled ? controlled : uncontrolled;
|
|
859
|
-
const setValue = (0,
|
|
1608
|
+
const setValue = (0, import_react9.useCallback)(
|
|
860
1609
|
(next) => {
|
|
861
1610
|
if (!isControlled) setUncontrolled(next);
|
|
862
1611
|
},
|
|
@@ -864,7 +1613,7 @@ function useControllableState2(controlled, defaultValue) {
|
|
|
864
1613
|
);
|
|
865
1614
|
return [value, setValue, isControlled];
|
|
866
1615
|
}
|
|
867
|
-
var TNB = (0,
|
|
1616
|
+
var TNB = (0, import_react9.forwardRef)(function TNB2({
|
|
868
1617
|
logo,
|
|
869
1618
|
upperPartItemList,
|
|
870
1619
|
upperPartIconList,
|
|
@@ -903,8 +1652,8 @@ var TNB = (0, import_react5.forwardRef)(function TNB2({
|
|
|
903
1652
|
setLowerValue(label);
|
|
904
1653
|
onSelectedLowerChange?.(label);
|
|
905
1654
|
};
|
|
906
|
-
return /* @__PURE__ */ (0,
|
|
907
|
-
/* @__PURE__ */ (0,
|
|
1655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("nav", { ref, "aria-label": ariaLabel, className: cn("w-full bg-white", className), children: [
|
|
1656
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
908
1657
|
UpperPart,
|
|
909
1658
|
{
|
|
910
1659
|
logo,
|
|
@@ -915,7 +1664,7 @@ var TNB = (0, import_react5.forwardRef)(function TNB2({
|
|
|
915
1664
|
linkComponent
|
|
916
1665
|
}
|
|
917
1666
|
),
|
|
918
|
-
/* @__PURE__ */ (0,
|
|
1667
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
919
1668
|
LowerPart,
|
|
920
1669
|
{
|
|
921
1670
|
lowerPartItemList: currentLowerItemList,
|
|
@@ -926,11 +1675,11 @@ var TNB = (0, import_react5.forwardRef)(function TNB2({
|
|
|
926
1675
|
)
|
|
927
1676
|
] });
|
|
928
1677
|
});
|
|
929
|
-
var NavClickable = (0,
|
|
1678
|
+
var NavClickable = (0, import_react9.forwardRef)(function NavClickable2({ href, onClick, linkComponent: Link, current, disabled, className, children }, ref) {
|
|
930
1679
|
const ariaCurrent = current ? "page" : void 0;
|
|
931
1680
|
if (href && !disabled) {
|
|
932
1681
|
if (Link) {
|
|
933
|
-
return /* @__PURE__ */ (0,
|
|
1682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
934
1683
|
Link,
|
|
935
1684
|
{
|
|
936
1685
|
href,
|
|
@@ -942,7 +1691,7 @@ var NavClickable = (0, import_react5.forwardRef)(function NavClickable2({ href,
|
|
|
942
1691
|
}
|
|
943
1692
|
);
|
|
944
1693
|
}
|
|
945
|
-
return /* @__PURE__ */ (0,
|
|
1694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
946
1695
|
"a",
|
|
947
1696
|
{
|
|
948
1697
|
href,
|
|
@@ -954,7 +1703,7 @@ var NavClickable = (0, import_react5.forwardRef)(function NavClickable2({ href,
|
|
|
954
1703
|
}
|
|
955
1704
|
);
|
|
956
1705
|
}
|
|
957
|
-
return /* @__PURE__ */ (0,
|
|
1706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
958
1707
|
"button",
|
|
959
1708
|
{
|
|
960
1709
|
type: "button",
|
|
@@ -976,10 +1725,10 @@ var UpperPart = ({
|
|
|
976
1725
|
linkComponent,
|
|
977
1726
|
className
|
|
978
1727
|
}) => {
|
|
979
|
-
return /* @__PURE__ */ (0,
|
|
980
|
-
/* @__PURE__ */ (0,
|
|
981
|
-
/* @__PURE__ */ (0,
|
|
982
|
-
/* @__PURE__ */ (0,
|
|
1728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: cn("w-full h-13 px-4 flex items-center justify-between", className), children: [
|
|
1729
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-6", children: [
|
|
1730
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(NavIconButton, { ...logo, linkComponent }),
|
|
1731
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex items-center gap-4", children: upperPartItemList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
983
1732
|
UpperPartTab,
|
|
984
1733
|
{
|
|
985
1734
|
label: item.label,
|
|
@@ -994,7 +1743,7 @@ var UpperPart = ({
|
|
|
994
1743
|
item.id ?? item.label
|
|
995
1744
|
)) })
|
|
996
1745
|
] }),
|
|
997
|
-
/* @__PURE__ */ (0,
|
|
1746
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex items-center gap-2", children: upperPartIconList.map((icon, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
998
1747
|
NavIconButton,
|
|
999
1748
|
{
|
|
1000
1749
|
...icon,
|
|
@@ -1012,7 +1761,7 @@ var UpperPartTab = ({
|
|
|
1012
1761
|
linkComponent,
|
|
1013
1762
|
className
|
|
1014
1763
|
}) => {
|
|
1015
|
-
return /* @__PURE__ */ (0,
|
|
1764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1016
1765
|
NavClickable,
|
|
1017
1766
|
{
|
|
1018
1767
|
href,
|
|
@@ -1028,11 +1777,11 @@ var UpperPartTab = ({
|
|
|
1028
1777
|
}
|
|
1029
1778
|
);
|
|
1030
1779
|
};
|
|
1031
|
-
var NavIconButton = (0,
|
|
1780
|
+
var NavIconButton = (0, import_react9.forwardRef)(
|
|
1032
1781
|
function NavIconButton2({ src, icon, alt, label, href, onClick, selected, badge, className, linkComponent }, forwardedRef) {
|
|
1033
1782
|
const interactive = Boolean(onClick || href);
|
|
1034
1783
|
const showBadge = badge !== void 0 && badge !== null && badge !== false;
|
|
1035
|
-
return /* @__PURE__ */ (0,
|
|
1784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
1036
1785
|
NavClickable,
|
|
1037
1786
|
{
|
|
1038
1787
|
ref: forwardedRef,
|
|
@@ -1048,9 +1797,9 @@ var NavIconButton = (0, import_react5.forwardRef)(
|
|
|
1048
1797
|
className
|
|
1049
1798
|
),
|
|
1050
1799
|
children: [
|
|
1051
|
-
icon ? /* @__PURE__ */ (0,
|
|
1052
|
-
label ? /* @__PURE__ */ (0,
|
|
1053
|
-
showBadge ? /* @__PURE__ */ (0,
|
|
1800
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "inline-flex h-5 w-5 items-center justify-center", children: icon }) : src ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("img", { src, alt: alt ?? label ?? "", className: "h-5 w-5" }) : null,
|
|
1801
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: cn("text-body2-regular", selected ? "text-white" : "text-secondary"), children: label }) : null,
|
|
1802
|
+
showBadge ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1054
1803
|
"span",
|
|
1055
1804
|
{
|
|
1056
1805
|
"aria-hidden": badge === true,
|
|
@@ -1076,11 +1825,11 @@ var LowerPart = ({
|
|
|
1076
1825
|
if (lowerPartItemList.length === 0) {
|
|
1077
1826
|
return null;
|
|
1078
1827
|
}
|
|
1079
|
-
return /* @__PURE__ */ (0,
|
|
1828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1080
1829
|
"div",
|
|
1081
1830
|
{
|
|
1082
1831
|
className: cn("w-full h-9 px-4 flex items-center gap-4 border-t border-gray02", className),
|
|
1083
|
-
children: lowerPartItemList.map((item) => /* @__PURE__ */ (0,
|
|
1832
|
+
children: lowerPartItemList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1084
1833
|
LowerPartItemButton,
|
|
1085
1834
|
{
|
|
1086
1835
|
label: item.label,
|
|
@@ -1105,7 +1854,7 @@ var LowerPartItemButton = ({
|
|
|
1105
1854
|
linkComponent,
|
|
1106
1855
|
className
|
|
1107
1856
|
}) => {
|
|
1108
|
-
return /* @__PURE__ */ (0,
|
|
1857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1109
1858
|
NavClickable,
|
|
1110
1859
|
{
|
|
1111
1860
|
href,
|
|
@@ -1124,14 +1873,14 @@ var LowerPartItemButton = ({
|
|
|
1124
1873
|
};
|
|
1125
1874
|
|
|
1126
1875
|
// src/components/Toast/Toast.tsx
|
|
1127
|
-
var
|
|
1128
|
-
var
|
|
1876
|
+
var import_react10 = require("react");
|
|
1877
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1129
1878
|
var EXIT_MS = 300;
|
|
1130
|
-
var Toast = (0,
|
|
1879
|
+
var Toast = (0, import_react10.forwardRef)(function Toast2({ message, open, duration = 3e3, onClose, position = "none", className }, ref) {
|
|
1131
1880
|
const controlled = open !== void 0;
|
|
1132
|
-
const [mounted, setMounted] = (0,
|
|
1133
|
-
const [visible, setVisible] = (0,
|
|
1134
|
-
(0,
|
|
1881
|
+
const [mounted, setMounted] = (0, import_react10.useState)(!controlled || open);
|
|
1882
|
+
const [visible, setVisible] = (0, import_react10.useState)(!controlled || open);
|
|
1883
|
+
(0, import_react10.useEffect)(() => {
|
|
1135
1884
|
if (!controlled) return;
|
|
1136
1885
|
if (open) {
|
|
1137
1886
|
setMounted(true);
|
|
@@ -1142,13 +1891,13 @@ var Toast = (0, import_react6.forwardRef)(function Toast2({ message, open, durat
|
|
|
1142
1891
|
const timer = setTimeout(() => setMounted(false), EXIT_MS);
|
|
1143
1892
|
return () => clearTimeout(timer);
|
|
1144
1893
|
}, [controlled, open]);
|
|
1145
|
-
(0,
|
|
1894
|
+
(0, import_react10.useEffect)(() => {
|
|
1146
1895
|
if (!controlled || !open || !duration) return;
|
|
1147
1896
|
const timer = setTimeout(() => onClose?.(), duration);
|
|
1148
1897
|
return () => clearTimeout(timer);
|
|
1149
1898
|
}, [controlled, open, duration, onClose]);
|
|
1150
1899
|
if (!mounted) return null;
|
|
1151
|
-
const banner = /* @__PURE__ */ (0,
|
|
1900
|
+
const banner = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1152
1901
|
"div",
|
|
1153
1902
|
{
|
|
1154
1903
|
ref,
|
|
@@ -1166,7 +1915,7 @@ var Toast = (0, import_react6.forwardRef)(function Toast2({ message, open, durat
|
|
|
1166
1915
|
}
|
|
1167
1916
|
);
|
|
1168
1917
|
if (position === "none") return banner;
|
|
1169
|
-
return /* @__PURE__ */ (0,
|
|
1918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1170
1919
|
"div",
|
|
1171
1920
|
{
|
|
1172
1921
|
className: cn(
|
|
@@ -1180,18 +1929,46 @@ var Toast = (0, import_react6.forwardRef)(function Toast2({ message, open, durat
|
|
|
1180
1929
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1181
1930
|
0 && (module.exports = {
|
|
1182
1931
|
BackButton,
|
|
1932
|
+
BasicFormField,
|
|
1183
1933
|
CTA,
|
|
1184
1934
|
CategorySegment,
|
|
1185
1935
|
CategorySegmentedControl,
|
|
1936
|
+
Column,
|
|
1937
|
+
ColumnContentContainer,
|
|
1938
|
+
ColumnLabel,
|
|
1939
|
+
ColumnSubTitle,
|
|
1940
|
+
ColumnText,
|
|
1941
|
+
ColumnTextStyle,
|
|
1942
|
+
Dropdown,
|
|
1943
|
+
FormCheckBox,
|
|
1944
|
+
FormColor,
|
|
1945
|
+
FormFile,
|
|
1946
|
+
FormNumber,
|
|
1947
|
+
FormPassword,
|
|
1948
|
+
FormSelectBox,
|
|
1949
|
+
FormTel,
|
|
1950
|
+
FormText,
|
|
1951
|
+
FormTextArea,
|
|
1952
|
+
IconCheck,
|
|
1953
|
+
IconChevronDownXS,
|
|
1954
|
+
IconInfo,
|
|
1955
|
+
List,
|
|
1956
|
+
Modal,
|
|
1957
|
+
ModalText,
|
|
1958
|
+
ModalTextStyle,
|
|
1959
|
+
MultiColumn,
|
|
1186
1960
|
NoticeBadge,
|
|
1187
1961
|
NoticeBar,
|
|
1188
1962
|
SearchBar,
|
|
1963
|
+
SelectBoxOption,
|
|
1189
1964
|
SideRadioAccordion,
|
|
1190
1965
|
TNB,
|
|
1191
1966
|
Tag,
|
|
1967
|
+
TextButton,
|
|
1192
1968
|
Timetable,
|
|
1193
1969
|
TitleInput,
|
|
1194
1970
|
Toast,
|
|
1195
|
-
WeekNavigation
|
|
1971
|
+
WeekNavigation,
|
|
1972
|
+
getInputStyles
|
|
1196
1973
|
});
|
|
1197
1974
|
//# sourceMappingURL=index.js.map
|