@hivcd-printshop/design-system 1.3.2 → 1.3.3
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 +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +117 -70
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +110 -64
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -424,6 +424,31 @@ interface SideRadioAccordionProps {
|
|
|
424
424
|
}
|
|
425
425
|
declare const SideRadioAccordion: react.ForwardRefExoticComponent<SideRadioAccordionProps & react.RefAttributes<HTMLDivElement>>;
|
|
426
426
|
|
|
427
|
+
type TabSwitchItem = {
|
|
428
|
+
label: string;
|
|
429
|
+
/**
|
|
430
|
+
* 선택 상태를 식별할 값. 표시 텍스트(label)와 분리하고 싶을 때 사용한다.
|
|
431
|
+
* 생략하면 label이 식별자로 쓰인다.
|
|
432
|
+
*/
|
|
433
|
+
value?: string;
|
|
434
|
+
};
|
|
435
|
+
interface TabSwitchProps {
|
|
436
|
+
items: TabSwitchItem[];
|
|
437
|
+
/** controlled: 현재 선택된 항목의 value(없으면 label). */
|
|
438
|
+
selected?: string;
|
|
439
|
+
/** uncontrolled 초기 선택값. `selected`를 함께 주면 무시된다. 기본은 첫 항목. */
|
|
440
|
+
defaultSelected?: string;
|
|
441
|
+
/** 선택이 바뀔 때 호출. 인자는 항목의 value(없으면 label). */
|
|
442
|
+
onSelect?: (value: string) => void;
|
|
443
|
+
className?: string;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* 두 개 이상의 항목을 가로로 나열하고 선택된 항목 아래에 밑줄을 그리는 탭 전환 UI.
|
|
447
|
+
* 예: "나의 예약"의 "진행중인 예약" / "완료된 예약" 전환.
|
|
448
|
+
* (Figma "카테고리" 컴포넌트 — CategorySegmentedControl과는 별개의, 필터가 아닌 탭 전환용 컴포넌트.)
|
|
449
|
+
*/
|
|
450
|
+
declare const TabSwitch: react.ForwardRefExoticComponent<TabSwitchProps & react.RefAttributes<HTMLDivElement>>;
|
|
451
|
+
|
|
427
452
|
type Week = "thisWeek" | "nextWeek" | "twoWeeksLater";
|
|
428
453
|
interface WeekNavigationProps {
|
|
429
454
|
/** 표시 중인 주의 월요일(ISO "YYYY-MM-DD"). 범위 라벨(~금요일)을 여기서 계산한다. */
|
|
@@ -577,4 +602,4 @@ interface ToastProps {
|
|
|
577
602
|
}
|
|
578
603
|
declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<HTMLDivElement>>;
|
|
579
604
|
|
|
580
|
-
export { Accordion, type AccordionProps, BackButton, type BackButtonProps, BasicFormField, type BasicFormFieldProps, CTA, type CTAProps, CategorySegment, type CategorySegmentProps, CategorySegmentedControl, type CategorySegmentedControlProps, Column, ColumnContentContainer, type ColumnContentContainerProps, ColumnDescription, ColumnDescriptionList, type ColumnDescriptionListProps, type ColumnDescriptionProps, ColumnLabel, type ColumnLabelProps, type ColumnProps, ColumnSubTitle, type ColumnSubTitleProps, ColumnText, type ColumnTextProps, ColumnTextStyle, type DayColumn, Dropdown, type DropdownProps, FormCheckBox, type FormCheckBoxProps, FormColor, type FormColorProps, FormFile, type FormFileProps, FormNumber, type FormNumberProps, FormPassword, type FormPasswordProps, FormSelectBox, type FormSelectBoxProps, FormTel, type FormTelProps, FormText, FormTextArea, type FormTextAreaProps, type FormTextProps, IconCheck, IconChevronDownXS, IconClose, IconCompass, IconExclamation, IconInfo, IconRadioSelected, IconRadioUnselected, type LinkComponent, List, type ListProps, type LowerPartItem, Modal, type ModalProps, ModalText, type ModalTextProps, ModalTextStyle, MultiColumn, type NavIcon, NoticeBadge, type NoticeBadgeProps, type NoticeBadgeVariable, NoticeBar, type NoticeBarBadgeVariable, type NoticeBarProps, type NoticeBarVariable, type RadioToggle, SearchBar, type SearchBarProps, SelectBoxOption, type SelectBoxOptionProps, SideRadioAccordion, type PrintColor$1 as SideRadioAccordionPrintColor, type SideRadioAccordionProps, TNB, type TNBProps, Tag, type TagProps, TextButton, type TextButtonProps, type TimeSlot, type TimeSlotState, Timetable, type PrintColor as TimetablePrintColor, type TimetableProps, TitleInput, type TitleInputProps, Toast, type ToastProps, type UpperPartItem, type Week, WeekNavigation, type WeekNavigationProps, getInputStyles };
|
|
605
|
+
export { Accordion, type AccordionProps, BackButton, type BackButtonProps, BasicFormField, type BasicFormFieldProps, CTA, type CTAProps, CategorySegment, type CategorySegmentProps, CategorySegmentedControl, type CategorySegmentedControlProps, Column, ColumnContentContainer, type ColumnContentContainerProps, ColumnDescription, ColumnDescriptionList, type ColumnDescriptionListProps, type ColumnDescriptionProps, ColumnLabel, type ColumnLabelProps, type ColumnProps, ColumnSubTitle, type ColumnSubTitleProps, ColumnText, type ColumnTextProps, ColumnTextStyle, type DayColumn, Dropdown, type DropdownProps, FormCheckBox, type FormCheckBoxProps, FormColor, type FormColorProps, FormFile, type FormFileProps, FormNumber, type FormNumberProps, FormPassword, type FormPasswordProps, FormSelectBox, type FormSelectBoxProps, FormTel, type FormTelProps, FormText, FormTextArea, type FormTextAreaProps, type FormTextProps, IconCheck, IconChevronDownXS, IconClose, IconCompass, IconExclamation, IconInfo, IconRadioSelected, IconRadioUnselected, type LinkComponent, List, type ListProps, type LowerPartItem, Modal, type ModalProps, ModalText, type ModalTextProps, ModalTextStyle, MultiColumn, type NavIcon, NoticeBadge, type NoticeBadgeProps, type NoticeBadgeVariable, NoticeBar, type NoticeBarBadgeVariable, type NoticeBarProps, type NoticeBarVariable, type RadioToggle, SearchBar, type SearchBarProps, SelectBoxOption, type SelectBoxOptionProps, SideRadioAccordion, type PrintColor$1 as SideRadioAccordionPrintColor, type SideRadioAccordionProps, TNB, type TNBProps, TabSwitch, type TabSwitchItem, type TabSwitchProps, Tag, type TagProps, TextButton, type TextButtonProps, type TimeSlot, type TimeSlotState, Timetable, type PrintColor as TimetablePrintColor, type TimetableProps, TitleInput, type TitleInputProps, Toast, type ToastProps, type UpperPartItem, type Week, WeekNavigation, type WeekNavigationProps, getInputStyles };
|
package/dist/index.d.ts
CHANGED
|
@@ -424,6 +424,31 @@ interface SideRadioAccordionProps {
|
|
|
424
424
|
}
|
|
425
425
|
declare const SideRadioAccordion: react.ForwardRefExoticComponent<SideRadioAccordionProps & react.RefAttributes<HTMLDivElement>>;
|
|
426
426
|
|
|
427
|
+
type TabSwitchItem = {
|
|
428
|
+
label: string;
|
|
429
|
+
/**
|
|
430
|
+
* 선택 상태를 식별할 값. 표시 텍스트(label)와 분리하고 싶을 때 사용한다.
|
|
431
|
+
* 생략하면 label이 식별자로 쓰인다.
|
|
432
|
+
*/
|
|
433
|
+
value?: string;
|
|
434
|
+
};
|
|
435
|
+
interface TabSwitchProps {
|
|
436
|
+
items: TabSwitchItem[];
|
|
437
|
+
/** controlled: 현재 선택된 항목의 value(없으면 label). */
|
|
438
|
+
selected?: string;
|
|
439
|
+
/** uncontrolled 초기 선택값. `selected`를 함께 주면 무시된다. 기본은 첫 항목. */
|
|
440
|
+
defaultSelected?: string;
|
|
441
|
+
/** 선택이 바뀔 때 호출. 인자는 항목의 value(없으면 label). */
|
|
442
|
+
onSelect?: (value: string) => void;
|
|
443
|
+
className?: string;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* 두 개 이상의 항목을 가로로 나열하고 선택된 항목 아래에 밑줄을 그리는 탭 전환 UI.
|
|
447
|
+
* 예: "나의 예약"의 "진행중인 예약" / "완료된 예약" 전환.
|
|
448
|
+
* (Figma "카테고리" 컴포넌트 — CategorySegmentedControl과는 별개의, 필터가 아닌 탭 전환용 컴포넌트.)
|
|
449
|
+
*/
|
|
450
|
+
declare const TabSwitch: react.ForwardRefExoticComponent<TabSwitchProps & react.RefAttributes<HTMLDivElement>>;
|
|
451
|
+
|
|
427
452
|
type Week = "thisWeek" | "nextWeek" | "twoWeeksLater";
|
|
428
453
|
interface WeekNavigationProps {
|
|
429
454
|
/** 표시 중인 주의 월요일(ISO "YYYY-MM-DD"). 범위 라벨(~금요일)을 여기서 계산한다. */
|
|
@@ -577,4 +602,4 @@ interface ToastProps {
|
|
|
577
602
|
}
|
|
578
603
|
declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<HTMLDivElement>>;
|
|
579
604
|
|
|
580
|
-
export { Accordion, type AccordionProps, BackButton, type BackButtonProps, BasicFormField, type BasicFormFieldProps, CTA, type CTAProps, CategorySegment, type CategorySegmentProps, CategorySegmentedControl, type CategorySegmentedControlProps, Column, ColumnContentContainer, type ColumnContentContainerProps, ColumnDescription, ColumnDescriptionList, type ColumnDescriptionListProps, type ColumnDescriptionProps, ColumnLabel, type ColumnLabelProps, type ColumnProps, ColumnSubTitle, type ColumnSubTitleProps, ColumnText, type ColumnTextProps, ColumnTextStyle, type DayColumn, Dropdown, type DropdownProps, FormCheckBox, type FormCheckBoxProps, FormColor, type FormColorProps, FormFile, type FormFileProps, FormNumber, type FormNumberProps, FormPassword, type FormPasswordProps, FormSelectBox, type FormSelectBoxProps, FormTel, type FormTelProps, FormText, FormTextArea, type FormTextAreaProps, type FormTextProps, IconCheck, IconChevronDownXS, IconClose, IconCompass, IconExclamation, IconInfo, IconRadioSelected, IconRadioUnselected, type LinkComponent, List, type ListProps, type LowerPartItem, Modal, type ModalProps, ModalText, type ModalTextProps, ModalTextStyle, MultiColumn, type NavIcon, NoticeBadge, type NoticeBadgeProps, type NoticeBadgeVariable, NoticeBar, type NoticeBarBadgeVariable, type NoticeBarProps, type NoticeBarVariable, type RadioToggle, SearchBar, type SearchBarProps, SelectBoxOption, type SelectBoxOptionProps, SideRadioAccordion, type PrintColor$1 as SideRadioAccordionPrintColor, type SideRadioAccordionProps, TNB, type TNBProps, Tag, type TagProps, TextButton, type TextButtonProps, type TimeSlot, type TimeSlotState, Timetable, type PrintColor as TimetablePrintColor, type TimetableProps, TitleInput, type TitleInputProps, Toast, type ToastProps, type UpperPartItem, type Week, WeekNavigation, type WeekNavigationProps, getInputStyles };
|
|
605
|
+
export { Accordion, type AccordionProps, BackButton, type BackButtonProps, BasicFormField, type BasicFormFieldProps, CTA, type CTAProps, CategorySegment, type CategorySegmentProps, CategorySegmentedControl, type CategorySegmentedControlProps, Column, ColumnContentContainer, type ColumnContentContainerProps, ColumnDescription, ColumnDescriptionList, type ColumnDescriptionListProps, type ColumnDescriptionProps, ColumnLabel, type ColumnLabelProps, type ColumnProps, ColumnSubTitle, type ColumnSubTitleProps, ColumnText, type ColumnTextProps, ColumnTextStyle, type DayColumn, Dropdown, type DropdownProps, FormCheckBox, type FormCheckBoxProps, FormColor, type FormColorProps, FormFile, type FormFileProps, FormNumber, type FormNumberProps, FormPassword, type FormPasswordProps, FormSelectBox, type FormSelectBoxProps, FormTel, type FormTelProps, FormText, FormTextArea, type FormTextAreaProps, type FormTextProps, IconCheck, IconChevronDownXS, IconClose, IconCompass, IconExclamation, IconInfo, IconRadioSelected, IconRadioUnselected, type LinkComponent, List, type ListProps, type LowerPartItem, Modal, type ModalProps, ModalText, type ModalTextProps, ModalTextStyle, MultiColumn, type NavIcon, NoticeBadge, type NoticeBadgeProps, type NoticeBadgeVariable, NoticeBar, type NoticeBarBadgeVariable, type NoticeBarProps, type NoticeBarVariable, type RadioToggle, SearchBar, type SearchBarProps, SelectBoxOption, type SelectBoxOptionProps, SideRadioAccordion, type PrintColor$1 as SideRadioAccordionPrintColor, type SideRadioAccordionProps, TNB, type TNBProps, TabSwitch, type TabSwitchItem, type TabSwitchProps, Tag, type TagProps, TextButton, type TextButtonProps, type TimeSlot, type TimeSlotState, Timetable, type PrintColor as TimetablePrintColor, type TimetableProps, TitleInput, type TitleInputProps, Toast, type ToastProps, type UpperPartItem, type Week, WeekNavigation, type WeekNavigationProps, getInputStyles };
|
package/dist/index.js
CHANGED
|
@@ -64,6 +64,7 @@ __export(index_exports, {
|
|
|
64
64
|
SelectBoxOption: () => SelectBoxOption,
|
|
65
65
|
SideRadioAccordion: () => SideRadioAccordion,
|
|
66
66
|
TNB: () => TNB,
|
|
67
|
+
TabSwitch: () => TabSwitch,
|
|
67
68
|
Tag: () => Tag,
|
|
68
69
|
TextButton: () => TextButton,
|
|
69
70
|
Timetable: () => Timetable,
|
|
@@ -1625,11 +1626,56 @@ var Tag = ({
|
|
|
1625
1626
|
);
|
|
1626
1627
|
};
|
|
1627
1628
|
|
|
1629
|
+
// src/components/TabSwitch/TabSwitch.tsx
|
|
1630
|
+
var import_react8 = require("react");
|
|
1631
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1632
|
+
var itemKey2 = (item) => item.value ?? item.label;
|
|
1633
|
+
var TabSwitch = (0, import_react8.forwardRef)(function TabSwitch2({ items, selected, defaultSelected, onSelect, className }, ref) {
|
|
1634
|
+
const [selectedValue, setSelectedValue] = useControllableState(
|
|
1635
|
+
selected,
|
|
1636
|
+
defaultSelected ?? itemKey2(items[0])
|
|
1637
|
+
);
|
|
1638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { ref, className: cn("w-full border-b border-gray02", className), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex items-stretch", children: items.map((item) => {
|
|
1639
|
+
const key = itemKey2(item);
|
|
1640
|
+
const isSelected = key === selectedValue;
|
|
1641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-stretch", children: [
|
|
1642
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
1643
|
+
"button",
|
|
1644
|
+
{
|
|
1645
|
+
type: "button",
|
|
1646
|
+
onClick: () => {
|
|
1647
|
+
setSelectedValue(key);
|
|
1648
|
+
onSelect?.(key);
|
|
1649
|
+
},
|
|
1650
|
+
className: cn(
|
|
1651
|
+
"flex flex-col items-center pt-2.5 cursor-pointer",
|
|
1652
|
+
isSelected ? "gap-2" : "pb-2.5"
|
|
1653
|
+
),
|
|
1654
|
+
children: [
|
|
1655
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1656
|
+
"span",
|
|
1657
|
+
{
|
|
1658
|
+
className: cn(
|
|
1659
|
+
"px-4 whitespace-nowrap",
|
|
1660
|
+
isSelected ? "text-body1-medium text-strong" : "text-body1-regular text-quaternary"
|
|
1661
|
+
),
|
|
1662
|
+
children: item.label
|
|
1663
|
+
}
|
|
1664
|
+
),
|
|
1665
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "h-0.5 w-full bg-black" })
|
|
1666
|
+
]
|
|
1667
|
+
}
|
|
1668
|
+
),
|
|
1669
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" })
|
|
1670
|
+
] }, key);
|
|
1671
|
+
}) }) });
|
|
1672
|
+
});
|
|
1673
|
+
|
|
1628
1674
|
// src/components/Timetable/Timetable.tsx
|
|
1629
|
-
var
|
|
1675
|
+
var import_react10 = require("react");
|
|
1630
1676
|
|
|
1631
1677
|
// src/components/Timetable/WeekNavigation.tsx
|
|
1632
|
-
var
|
|
1678
|
+
var import_react9 = require("react");
|
|
1633
1679
|
|
|
1634
1680
|
// src/components/Timetable/dateUtils.ts
|
|
1635
1681
|
var KOREAN_WEEKDAYS = ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"];
|
|
@@ -1662,18 +1708,18 @@ var formatWeekRange = (weekStart) => {
|
|
|
1662
1708
|
};
|
|
1663
1709
|
|
|
1664
1710
|
// src/components/Timetable/WeekNavigation.tsx
|
|
1665
|
-
var
|
|
1711
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1666
1712
|
var weekLabel = {
|
|
1667
1713
|
thisWeek: "\uC774\uBC88 \uC8FC",
|
|
1668
1714
|
nextWeek: "\uB2E4\uC74C \uC8FC",
|
|
1669
1715
|
twoWeeksLater: "\uB2E4\uB2E4\uC74C \uC8FC"
|
|
1670
1716
|
};
|
|
1671
|
-
var WeekNavigation = (0,
|
|
1717
|
+
var WeekNavigation = (0, import_react9.forwardRef)(
|
|
1672
1718
|
function WeekNavigation2({ date, week, label, canPrev, canNext, onPrevWeek, onNextWeek, className }, ref) {
|
|
1673
1719
|
const showPrev = canPrev ?? (week ? week !== "thisWeek" : true);
|
|
1674
1720
|
const showNext = canNext ?? (week ? week !== "twoWeeksLater" : true);
|
|
1675
1721
|
const text = label ?? (week ? `${weekLabel[week]} (${formatWeekRange(date)})` : formatWeekRange(date));
|
|
1676
|
-
return /* @__PURE__ */ (0,
|
|
1722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
1677
1723
|
"div",
|
|
1678
1724
|
{
|
|
1679
1725
|
ref,
|
|
@@ -1685,22 +1731,22 @@ var WeekNavigation = (0, import_react8.forwardRef)(
|
|
|
1685
1731
|
className
|
|
1686
1732
|
),
|
|
1687
1733
|
children: [
|
|
1688
|
-
/* @__PURE__ */ (0,
|
|
1689
|
-
/* @__PURE__ */ (0,
|
|
1690
|
-
/* @__PURE__ */ (0,
|
|
1734
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ArrowButton, { direction: "left", visible: showPrev, onClick: onPrevWeek }),
|
|
1735
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "flex flex-1 items-center justify-center text-center", children: text }),
|
|
1736
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ArrowButton, { direction: "right", visible: showNext, onClick: onNextWeek })
|
|
1691
1737
|
]
|
|
1692
1738
|
}
|
|
1693
1739
|
);
|
|
1694
1740
|
}
|
|
1695
1741
|
);
|
|
1696
1742
|
var ArrowButton = ({ direction, visible, onClick }) => {
|
|
1697
|
-
const divider = /* @__PURE__ */ (0,
|
|
1743
|
+
const divider = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" });
|
|
1698
1744
|
if (!visible) {
|
|
1699
|
-
return /* @__PURE__ */ (0,
|
|
1745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { "aria-hidden": true, className: "w-[43px]" });
|
|
1700
1746
|
}
|
|
1701
|
-
return /* @__PURE__ */ (0,
|
|
1747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-stretch", children: [
|
|
1702
1748
|
direction === "right" && divider,
|
|
1703
|
-
/* @__PURE__ */ (0,
|
|
1749
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1704
1750
|
"button",
|
|
1705
1751
|
{
|
|
1706
1752
|
type: "button",
|
|
@@ -1710,7 +1756,7 @@ var ArrowButton = ({ direction, visible, onClick }) => {
|
|
|
1710
1756
|
"text-gray06 cursor-pointer transition-colors",
|
|
1711
1757
|
"hover:bg-gray00 active:bg-gray01"
|
|
1712
1758
|
),
|
|
1713
|
-
children: /* @__PURE__ */ (0,
|
|
1759
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1714
1760
|
IconChevronDownXS,
|
|
1715
1761
|
{
|
|
1716
1762
|
className: direction === "left" ? "rotate-90" : "-rotate-90",
|
|
@@ -1724,7 +1770,7 @@ var ArrowButton = ({ direction, visible, onClick }) => {
|
|
|
1724
1770
|
};
|
|
1725
1771
|
|
|
1726
1772
|
// src/components/Timetable/Timetable.tsx
|
|
1727
|
-
var
|
|
1773
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1728
1774
|
var printColorHoverClass = {
|
|
1729
1775
|
Plotter: "hover:bg-print-plotter",
|
|
1730
1776
|
Printer: "hover:bg-print-printer",
|
|
@@ -1734,7 +1780,7 @@ var printColorHoverClass = {
|
|
|
1734
1780
|
"Seet Cutting": "hover:bg-print-seet-cutting",
|
|
1735
1781
|
"Laser Cutting": "hover:bg-print-laser-cutting"
|
|
1736
1782
|
};
|
|
1737
|
-
var Timetable = (0,
|
|
1783
|
+
var Timetable = (0, import_react10.forwardRef)(function Timetable2({
|
|
1738
1784
|
weekStart,
|
|
1739
1785
|
week,
|
|
1740
1786
|
days,
|
|
@@ -1747,8 +1793,8 @@ var Timetable = (0, import_react9.forwardRef)(function Timetable2({
|
|
|
1747
1793
|
canNextWeek,
|
|
1748
1794
|
className
|
|
1749
1795
|
}, ref) {
|
|
1750
|
-
return /* @__PURE__ */ (0,
|
|
1751
|
-
!hideWeekNavigation && /* @__PURE__ */ (0,
|
|
1796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { ref, className: cn(fluid && "w-full", className), children: [
|
|
1797
|
+
!hideWeekNavigation && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1752
1798
|
WeekNavigation,
|
|
1753
1799
|
{
|
|
1754
1800
|
date: weekStart,
|
|
@@ -1759,7 +1805,7 @@ var Timetable = (0, import_react9.forwardRef)(function Timetable2({
|
|
|
1759
1805
|
onNextWeek
|
|
1760
1806
|
}
|
|
1761
1807
|
),
|
|
1762
|
-
/* @__PURE__ */ (0,
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: cn("flex divide-x divide-gray02", fluid && "w-full"), children: days.map((day) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1763
1809
|
DailyTimetable,
|
|
1764
1810
|
{
|
|
1765
1811
|
date: day.date,
|
|
@@ -1772,12 +1818,12 @@ var Timetable = (0, import_react9.forwardRef)(function Timetable2({
|
|
|
1772
1818
|
] });
|
|
1773
1819
|
});
|
|
1774
1820
|
var DailyTimetable = ({ date, slots, fluid, onSelectTime, className }) => {
|
|
1775
|
-
return /* @__PURE__ */ (0,
|
|
1776
|
-
/* @__PURE__ */ (0,
|
|
1821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("flex flex-col", fluid ? "flex-1 min-w-0" : "w-18", className), children: [
|
|
1822
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-12 flex items-center justify-center border-b border-gray02 text-body1-regular text-secondary", children: formatDayLabel(date) }),
|
|
1777
1823
|
slots.map((slot, index) => {
|
|
1778
1824
|
const prevState = index > 0 ? slots[index - 1].state : void 0;
|
|
1779
1825
|
const withTopBorder = slot.state !== "none" && prevState === "none";
|
|
1780
|
-
return /* @__PURE__ */ (0,
|
|
1826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1781
1827
|
TimeItem,
|
|
1782
1828
|
{
|
|
1783
1829
|
state: slot.state,
|
|
@@ -1806,7 +1852,7 @@ var TimeItem = ({
|
|
|
1806
1852
|
}) => {
|
|
1807
1853
|
const clickable = (state === "default" || state === "selected") && !!onClick;
|
|
1808
1854
|
const style = state === "default" && color ? { "--tt-hover": color } : void 0;
|
|
1809
|
-
return /* @__PURE__ */ (0,
|
|
1855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1810
1856
|
"div",
|
|
1811
1857
|
{
|
|
1812
1858
|
onClick: clickable ? onClick : void 0,
|
|
@@ -1832,13 +1878,13 @@ var TimeItem = ({
|
|
|
1832
1878
|
};
|
|
1833
1879
|
|
|
1834
1880
|
// src/components/TNB/TNB.tsx
|
|
1835
|
-
var
|
|
1836
|
-
var
|
|
1881
|
+
var import_react11 = require("react");
|
|
1882
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1837
1883
|
function useControllableState2(controlled, defaultValue) {
|
|
1838
1884
|
const isControlled = controlled !== void 0;
|
|
1839
|
-
const [uncontrolled, setUncontrolled] = (0,
|
|
1885
|
+
const [uncontrolled, setUncontrolled] = (0, import_react11.useState)(defaultValue);
|
|
1840
1886
|
const value = isControlled ? controlled : uncontrolled;
|
|
1841
|
-
const setValue = (0,
|
|
1887
|
+
const setValue = (0, import_react11.useCallback)(
|
|
1842
1888
|
(next) => {
|
|
1843
1889
|
if (!isControlled) setUncontrolled(next);
|
|
1844
1890
|
},
|
|
@@ -1846,7 +1892,7 @@ function useControllableState2(controlled, defaultValue) {
|
|
|
1846
1892
|
);
|
|
1847
1893
|
return [value, setValue, isControlled];
|
|
1848
1894
|
}
|
|
1849
|
-
var TNB = (0,
|
|
1895
|
+
var TNB = (0, import_react11.forwardRef)(function TNB2({
|
|
1850
1896
|
logo,
|
|
1851
1897
|
upperPartItemList,
|
|
1852
1898
|
upperPartIconList,
|
|
@@ -1885,8 +1931,8 @@ var TNB = (0, import_react10.forwardRef)(function TNB2({
|
|
|
1885
1931
|
setLowerValue(label);
|
|
1886
1932
|
onSelectedLowerChange?.(label);
|
|
1887
1933
|
};
|
|
1888
|
-
return /* @__PURE__ */ (0,
|
|
1889
|
-
/* @__PURE__ */ (0,
|
|
1934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("nav", { ref, "aria-label": ariaLabel, className: cn("w-full bg-white", className), children: [
|
|
1935
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1890
1936
|
UpperPart,
|
|
1891
1937
|
{
|
|
1892
1938
|
logo,
|
|
@@ -1897,7 +1943,7 @@ var TNB = (0, import_react10.forwardRef)(function TNB2({
|
|
|
1897
1943
|
linkComponent
|
|
1898
1944
|
}
|
|
1899
1945
|
),
|
|
1900
|
-
/* @__PURE__ */ (0,
|
|
1946
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1901
1947
|
LowerPart,
|
|
1902
1948
|
{
|
|
1903
1949
|
lowerPartItemList: currentLowerItemList,
|
|
@@ -1908,11 +1954,11 @@ var TNB = (0, import_react10.forwardRef)(function TNB2({
|
|
|
1908
1954
|
)
|
|
1909
1955
|
] });
|
|
1910
1956
|
});
|
|
1911
|
-
var NavClickable = (0,
|
|
1957
|
+
var NavClickable = (0, import_react11.forwardRef)(function NavClickable2({ href, onClick, linkComponent: Link, current, disabled, className, children }, ref) {
|
|
1912
1958
|
const ariaCurrent = current ? "page" : void 0;
|
|
1913
1959
|
if (href && !disabled) {
|
|
1914
1960
|
if (Link) {
|
|
1915
|
-
return /* @__PURE__ */ (0,
|
|
1961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1916
1962
|
Link,
|
|
1917
1963
|
{
|
|
1918
1964
|
href,
|
|
@@ -1924,7 +1970,7 @@ var NavClickable = (0, import_react10.forwardRef)(function NavClickable2({ href,
|
|
|
1924
1970
|
}
|
|
1925
1971
|
);
|
|
1926
1972
|
}
|
|
1927
|
-
return /* @__PURE__ */ (0,
|
|
1973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1928
1974
|
"a",
|
|
1929
1975
|
{
|
|
1930
1976
|
href,
|
|
@@ -1936,7 +1982,7 @@ var NavClickable = (0, import_react10.forwardRef)(function NavClickable2({ href,
|
|
|
1936
1982
|
}
|
|
1937
1983
|
);
|
|
1938
1984
|
}
|
|
1939
|
-
return /* @__PURE__ */ (0,
|
|
1985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1940
1986
|
"button",
|
|
1941
1987
|
{
|
|
1942
1988
|
type: "button",
|
|
@@ -1958,7 +2004,7 @@ var UpperPart = ({
|
|
|
1958
2004
|
linkComponent,
|
|
1959
2005
|
className
|
|
1960
2006
|
}) => {
|
|
1961
|
-
return /* @__PURE__ */ (0,
|
|
2007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
1962
2008
|
"div",
|
|
1963
2009
|
{
|
|
1964
2010
|
className: cn(
|
|
@@ -1966,12 +2012,12 @@ var UpperPart = ({
|
|
|
1966
2012
|
className
|
|
1967
2013
|
),
|
|
1968
2014
|
children: [
|
|
1969
|
-
/* @__PURE__ */ (0,
|
|
1970
|
-
/* @__PURE__ */ (0,
|
|
1971
|
-
/* @__PURE__ */ (0,
|
|
1972
|
-
/* @__PURE__ */ (0,
|
|
1973
|
-
upperPartItemList.map((item) => /* @__PURE__ */ (0,
|
|
1974
|
-
/* @__PURE__ */ (0,
|
|
2015
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-stretch", children: [
|
|
2016
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex w-14 shrink-0 items-center justify-center px-3", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(NavIconButton, { ...logo, linkComponent }) }),
|
|
2017
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-stretch", children: [
|
|
2018
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" }),
|
|
2019
|
+
upperPartItemList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react11.Fragment, { children: [
|
|
2020
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1975
2021
|
UpperPartTab,
|
|
1976
2022
|
{
|
|
1977
2023
|
label: item.label,
|
|
@@ -1984,15 +2030,15 @@ var UpperPart = ({
|
|
|
1984
2030
|
}
|
|
1985
2031
|
}
|
|
1986
2032
|
),
|
|
1987
|
-
/* @__PURE__ */ (0,
|
|
2033
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" })
|
|
1988
2034
|
] }, item.id ?? item.label))
|
|
1989
2035
|
] })
|
|
1990
2036
|
] }),
|
|
1991
|
-
/* @__PURE__ */ (0,
|
|
1992
|
-
/* @__PURE__ */ (0,
|
|
1993
|
-
upperPartIconList.map((icon, index) => /* @__PURE__ */ (0,
|
|
1994
|
-
/* @__PURE__ */ (0,
|
|
1995
|
-
/* @__PURE__ */ (0,
|
|
2037
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-stretch", children: [
|
|
2038
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" }),
|
|
2039
|
+
upperPartIconList.map((icon, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react11.Fragment, { children: [
|
|
2040
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(NavIconButton, { ...icon, linkComponent }),
|
|
2041
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" })
|
|
1996
2042
|
] }, icon.id ?? icon.src ?? icon.label ?? index))
|
|
1997
2043
|
] })
|
|
1998
2044
|
]
|
|
@@ -2007,7 +2053,7 @@ var UpperPartTab = ({
|
|
|
2007
2053
|
linkComponent,
|
|
2008
2054
|
className
|
|
2009
2055
|
}) => {
|
|
2010
|
-
return /* @__PURE__ */ (0,
|
|
2056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2011
2057
|
NavClickable,
|
|
2012
2058
|
{
|
|
2013
2059
|
href,
|
|
@@ -2022,17 +2068,17 @@ var UpperPartTab = ({
|
|
|
2022
2068
|
className
|
|
2023
2069
|
),
|
|
2024
2070
|
children: [
|
|
2025
|
-
/* @__PURE__ */ (0,
|
|
2026
|
-
/* @__PURE__ */ (0,
|
|
2071
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn("px-5 text-head1-medium", selected ? "text-strong" : "text-quaternary"), children: label }),
|
|
2072
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn("h-0.5 w-full", selected ? "bg-black" : "bg-transparent") })
|
|
2027
2073
|
]
|
|
2028
2074
|
}
|
|
2029
2075
|
);
|
|
2030
2076
|
};
|
|
2031
|
-
var NavIconButton = (0,
|
|
2077
|
+
var NavIconButton = (0, import_react11.forwardRef)(
|
|
2032
2078
|
function NavIconButton2({ src, icon, alt, label, href, onClick, selected, badge, className, linkComponent }, forwardedRef) {
|
|
2033
2079
|
const interactive = Boolean(onClick || href);
|
|
2034
2080
|
const showBadge = badge !== void 0 && badge !== null && badge !== false;
|
|
2035
|
-
return /* @__PURE__ */ (0,
|
|
2081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2036
2082
|
NavClickable,
|
|
2037
2083
|
{
|
|
2038
2084
|
ref: forwardedRef,
|
|
@@ -2048,9 +2094,9 @@ var NavIconButton = (0, import_react10.forwardRef)(
|
|
|
2048
2094
|
className
|
|
2049
2095
|
),
|
|
2050
2096
|
children: [
|
|
2051
|
-
icon ? /* @__PURE__ */ (0,
|
|
2052
|
-
label ? /* @__PURE__ */ (0,
|
|
2053
|
-
showBadge ? /* @__PURE__ */ (0,
|
|
2097
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "inline-flex h-6 w-6 items-center justify-center", children: icon }) : src ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("img", { src, alt: alt ?? label ?? "", className: "h-6 w-6" }) : null,
|
|
2098
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn("text-body2-regular", selected ? "text-white" : "text-secondary"), children: label }) : null,
|
|
2099
|
+
showBadge ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2054
2100
|
"span",
|
|
2055
2101
|
{
|
|
2056
2102
|
"aria-hidden": badge === true,
|
|
@@ -2076,14 +2122,14 @@ var LowerPart = ({
|
|
|
2076
2122
|
if (lowerPartItemList.length === 0) {
|
|
2077
2123
|
return null;
|
|
2078
2124
|
}
|
|
2079
|
-
return /* @__PURE__ */ (0,
|
|
2125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2080
2126
|
"div",
|
|
2081
2127
|
{
|
|
2082
2128
|
className: cn("w-full h-[42px] pl-14 flex items-stretch border-b border-gray02", className),
|
|
2083
2129
|
children: [
|
|
2084
|
-
/* @__PURE__ */ (0,
|
|
2085
|
-
lowerPartItemList.map((item) => /* @__PURE__ */ (0,
|
|
2086
|
-
/* @__PURE__ */ (0,
|
|
2130
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" }),
|
|
2131
|
+
lowerPartItemList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react11.Fragment, { children: [
|
|
2132
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2087
2133
|
LowerPartItemButton,
|
|
2088
2134
|
{
|
|
2089
2135
|
label: item.label,
|
|
@@ -2096,7 +2142,7 @@ var LowerPart = ({
|
|
|
2096
2142
|
}
|
|
2097
2143
|
}
|
|
2098
2144
|
),
|
|
2099
|
-
/* @__PURE__ */ (0,
|
|
2145
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" })
|
|
2100
2146
|
] }, item.id ?? item.label))
|
|
2101
2147
|
]
|
|
2102
2148
|
}
|
|
@@ -2110,7 +2156,7 @@ var LowerPartItemButton = ({
|
|
|
2110
2156
|
linkComponent,
|
|
2111
2157
|
className
|
|
2112
2158
|
}) => {
|
|
2113
|
-
return /* @__PURE__ */ (0,
|
|
2159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2114
2160
|
NavClickable,
|
|
2115
2161
|
{
|
|
2116
2162
|
href,
|
|
@@ -2129,14 +2175,14 @@ var LowerPartItemButton = ({
|
|
|
2129
2175
|
};
|
|
2130
2176
|
|
|
2131
2177
|
// src/components/Toast/Toast.tsx
|
|
2132
|
-
var
|
|
2133
|
-
var
|
|
2178
|
+
var import_react12 = require("react");
|
|
2179
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2134
2180
|
var EXIT_MS = 300;
|
|
2135
|
-
var Toast = (0,
|
|
2181
|
+
var Toast = (0, import_react12.forwardRef)(function Toast2({ message, open, duration = 3e3, onClose, position = "none", className }, ref) {
|
|
2136
2182
|
const controlled = open !== void 0;
|
|
2137
|
-
const [mounted, setMounted] = (0,
|
|
2138
|
-
const [visible, setVisible] = (0,
|
|
2139
|
-
(0,
|
|
2183
|
+
const [mounted, setMounted] = (0, import_react12.useState)(!controlled || open);
|
|
2184
|
+
const [visible, setVisible] = (0, import_react12.useState)(!controlled || open);
|
|
2185
|
+
(0, import_react12.useEffect)(() => {
|
|
2140
2186
|
if (!controlled) return;
|
|
2141
2187
|
if (open) {
|
|
2142
2188
|
setMounted(true);
|
|
@@ -2147,13 +2193,13 @@ var Toast = (0, import_react11.forwardRef)(function Toast2({ message, open, dura
|
|
|
2147
2193
|
const timer = setTimeout(() => setMounted(false), EXIT_MS);
|
|
2148
2194
|
return () => clearTimeout(timer);
|
|
2149
2195
|
}, [controlled, open]);
|
|
2150
|
-
(0,
|
|
2196
|
+
(0, import_react12.useEffect)(() => {
|
|
2151
2197
|
if (!controlled || !open || !duration) return;
|
|
2152
2198
|
const timer = setTimeout(() => onClose?.(), duration);
|
|
2153
2199
|
return () => clearTimeout(timer);
|
|
2154
2200
|
}, [controlled, open, duration, onClose]);
|
|
2155
2201
|
if (!mounted) return null;
|
|
2156
|
-
const banner = /* @__PURE__ */ (0,
|
|
2202
|
+
const banner = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2157
2203
|
"div",
|
|
2158
2204
|
{
|
|
2159
2205
|
ref,
|
|
@@ -2171,7 +2217,7 @@ var Toast = (0, import_react11.forwardRef)(function Toast2({ message, open, dura
|
|
|
2171
2217
|
}
|
|
2172
2218
|
);
|
|
2173
2219
|
if (position === "none") return banner;
|
|
2174
|
-
return /* @__PURE__ */ (0,
|
|
2220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2175
2221
|
"div",
|
|
2176
2222
|
{
|
|
2177
2223
|
className: cn(
|
|
@@ -2227,6 +2273,7 @@ var Toast = (0, import_react11.forwardRef)(function Toast2({ message, open, dura
|
|
|
2227
2273
|
SelectBoxOption,
|
|
2228
2274
|
SideRadioAccordion,
|
|
2229
2275
|
TNB,
|
|
2276
|
+
TabSwitch,
|
|
2230
2277
|
Tag,
|
|
2231
2278
|
TextButton,
|
|
2232
2279
|
Timetable,
|