@x-plat/design-system 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{breakpoints-DsXkJgdl.d.cts → breakpoints-CKkNxA-y.d.cts} +1 -1
- package/dist/{breakpoints-DsXkJgdl.d.ts → breakpoints-CKkNxA-y.d.ts} +1 -1
- package/dist/components/AutoResizeTextArea/index.cjs +2 -2
- package/dist/components/AutoResizeTextArea/index.js +2 -2
- package/dist/components/Badge/index.d.cts +1 -1
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/ChatInput/index.cjs +2 -2
- package/dist/components/ChatInput/index.js +2 -2
- package/dist/components/CheckBox/index.cjs +2 -2
- package/dist/components/CheckBox/index.js +2 -2
- package/dist/components/DatePicker/index.cjs +109 -75
- package/dist/components/DatePicker/index.d.cts +19 -0
- package/dist/components/DatePicker/index.d.ts +19 -0
- package/dist/components/DatePicker/index.js +109 -75
- package/dist/components/Editor/index.css +3 -0
- package/dist/components/FieldMessage/index.cjs +2 -2
- package/dist/components/FieldMessage/index.d.cts +8 -0
- package/dist/components/FieldMessage/index.d.ts +8 -0
- package/dist/components/FieldMessage/index.js +2 -2
- package/dist/components/FileUpload/index.cjs +10 -6
- package/dist/components/FileUpload/index.d.cts +15 -2
- package/dist/components/FileUpload/index.d.ts +15 -2
- package/dist/components/FileUpload/index.js +10 -6
- package/dist/components/ImageSelector/index.cjs +7 -6
- package/dist/components/ImageSelector/index.d.cts +15 -2
- package/dist/components/ImageSelector/index.d.ts +15 -2
- package/dist/components/ImageSelector/index.js +7 -6
- package/dist/components/Input/index.cjs +2 -2
- package/dist/components/Input/index.d.cts +4 -0
- package/dist/components/Input/index.d.ts +4 -0
- package/dist/components/Input/index.js +2 -2
- package/dist/components/Radio/index.cjs +2 -2
- package/dist/components/Radio/index.js +2 -2
- package/dist/components/Select/index.cjs +2 -2
- package/dist/components/Select/index.d.cts +1 -2
- package/dist/components/Select/index.d.ts +1 -2
- package/dist/components/Select/index.js +2 -2
- package/dist/components/Switch/index.cjs +2 -2
- package/dist/components/Switch/index.js +2 -2
- package/dist/components/TextArea/index.cjs +2 -2
- package/dist/components/TextArea/index.js +2 -2
- package/dist/components/TimePicker/index.cjs +2 -2
- package/dist/components/TimePicker/index.js +2 -2
- package/dist/components/ToggleChip/index.cjs +69 -0
- package/dist/components/ToggleChip/index.css +102 -0
- package/dist/components/ToggleChip/index.d.cts +37 -0
- package/dist/components/ToggleChip/index.d.ts +37 -0
- package/dist/components/ToggleChip/index.js +42 -0
- package/dist/components/index.cjs +184 -119
- package/dist/components/index.css +40 -0
- package/dist/components/index.d.cts +2 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +174 -110
- package/dist/index.cjs +203 -138
- package/dist/index.css +40 -0
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +191 -127
- package/dist/layout/Grid/Item/index.d.cts +1 -1
- package/dist/layout/Grid/Item/index.d.ts +1 -1
- package/dist/layout/Grid/index.d.cts +1 -1
- package/dist/layout/Grid/index.d.ts +1 -1
- package/dist/layout/index.d.cts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/tokens/index.d.cts +1 -1
- package/dist/tokens/index.d.ts +1 -1
- package/guidelines/Guidelines.md +13 -1
- package/guidelines/MIGRATION.md +297 -0
- package/guidelines/components/chip-tag.md +75 -2
- package/guidelines/components/datepicker.md +26 -0
- package/guidelines/components/file-media.md +21 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5622,11 +5622,11 @@ var FieldMessage = (props) => {
|
|
|
5622
5622
|
FieldMessage.displayName = "FieldMessage";
|
|
5623
5623
|
var FieldMessage_default = FieldMessage;
|
|
5624
5624
|
var Field = (props) => {
|
|
5625
|
-
const { label, required = false, htmlFor, validations, children } = props;
|
|
5625
|
+
const { label, required = false, htmlFor, labelId, validations, children } = props;
|
|
5626
5626
|
const hasMessages = !!validations && validations.length > 0;
|
|
5627
5627
|
if (!label && !hasMessages) return /* @__PURE__ */ jsx297(Fragment, { children });
|
|
5628
5628
|
return /* @__PURE__ */ jsxs191("div", { className: "lib-xplat-field", children: [
|
|
5629
|
-
label && /* @__PURE__ */ jsxs191("label", { className: "lib-xplat-field-label", htmlFor, children: [
|
|
5629
|
+
label && /* @__PURE__ */ jsxs191("label", { className: "lib-xplat-field-label", id: labelId, htmlFor, children: [
|
|
5630
5630
|
label,
|
|
5631
5631
|
required && /* @__PURE__ */ jsx297("span", { className: "required", "aria-hidden": "true", children: "*" })
|
|
5632
5632
|
] }),
|
|
@@ -7406,8 +7406,12 @@ var SingleDatePicker = (props) => {
|
|
|
7406
7406
|
highlightDates = [],
|
|
7407
7407
|
locale = "ko",
|
|
7408
7408
|
rangeStart,
|
|
7409
|
-
rangeEnd
|
|
7409
|
+
rangeEnd,
|
|
7410
|
+
label,
|
|
7411
|
+
required,
|
|
7412
|
+
validations
|
|
7410
7413
|
} = props;
|
|
7414
|
+
const labelId = React12.useId();
|
|
7411
7415
|
const initialYear = value?.getFullYear();
|
|
7412
7416
|
const initialMonth = value?.getMonth();
|
|
7413
7417
|
const { year, month, days, goToPrevMonth, goToNextMonth, setYear, setMonth } = useCalendar(
|
|
@@ -7470,10 +7474,12 @@ var SingleDatePicker = (props) => {
|
|
|
7470
7474
|
const monthLabels = MONTH_LABELS[locale];
|
|
7471
7475
|
const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
|
|
7472
7476
|
const hasRange = rangeStart != null && rangeEnd != null;
|
|
7473
|
-
|
|
7477
|
+
const calendar = /* @__PURE__ */ jsxs200(
|
|
7474
7478
|
"div",
|
|
7475
7479
|
{
|
|
7476
7480
|
className: clsx_default("lib-xplat-datepicker", "single"),
|
|
7481
|
+
role: "group",
|
|
7482
|
+
"aria-labelledby": label ? labelId : void 0,
|
|
7477
7483
|
children: [
|
|
7478
7484
|
/* @__PURE__ */ jsxs200("div", { className: "datepicker-header", children: [
|
|
7479
7485
|
/* @__PURE__ */ jsx314("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ jsx314(ChevronLeftIcon_default, {}) }),
|
|
@@ -7494,18 +7500,18 @@ var SingleDatePicker = (props) => {
|
|
|
7494
7500
|
y
|
|
7495
7501
|
);
|
|
7496
7502
|
}) }),
|
|
7497
|
-
pickerMode === "months" && /* @__PURE__ */ jsx314("div", { className: "datepicker-picker-grid", children: monthLabels.map((
|
|
7503
|
+
pickerMode === "months" && /* @__PURE__ */ jsx314("div", { className: "datepicker-picker-grid", children: monthLabels.map((label2, i) => /* @__PURE__ */ jsx314(
|
|
7498
7504
|
"button",
|
|
7499
7505
|
{
|
|
7500
7506
|
type: "button",
|
|
7501
7507
|
className: clsx_default("datepicker-picker-cell", i === month && "active"),
|
|
7502
7508
|
onClick: () => handleMonthSelect(i),
|
|
7503
|
-
children:
|
|
7509
|
+
children: label2
|
|
7504
7510
|
},
|
|
7505
7511
|
i
|
|
7506
7512
|
)) }),
|
|
7507
7513
|
pickerMode === "days" && /* @__PURE__ */ jsxs200(Fragment4, { children: [
|
|
7508
|
-
/* @__PURE__ */ jsx314("div", { className: "datepicker-weekdays", children: weekdays.map((
|
|
7514
|
+
/* @__PURE__ */ jsx314("div", { className: "datepicker-weekdays", children: weekdays.map((label2, i) => /* @__PURE__ */ jsx314(
|
|
7509
7515
|
"div",
|
|
7510
7516
|
{
|
|
7511
7517
|
className: clsx_default(
|
|
@@ -7513,9 +7519,9 @@ var SingleDatePicker = (props) => {
|
|
|
7513
7519
|
i === 0 && "sunday",
|
|
7514
7520
|
i === 6 && "saturday"
|
|
7515
7521
|
),
|
|
7516
|
-
children:
|
|
7522
|
+
children: label2
|
|
7517
7523
|
},
|
|
7518
|
-
|
|
7524
|
+
label2
|
|
7519
7525
|
)) }),
|
|
7520
7526
|
/* @__PURE__ */ jsx314("div", { className: "datepicker-grid", children: days.map((day, idx) => {
|
|
7521
7527
|
const t = day.date.getTime();
|
|
@@ -7547,6 +7553,7 @@ var SingleDatePicker = (props) => {
|
|
|
7547
7553
|
]
|
|
7548
7554
|
}
|
|
7549
7555
|
);
|
|
7556
|
+
return /* @__PURE__ */ jsx314(Field, { label, required, labelId, validations, children: calendar });
|
|
7550
7557
|
};
|
|
7551
7558
|
SingleDatePicker.displayName = "SingleDatePicker";
|
|
7552
7559
|
var SingleDatePicker_default = SingleDatePicker;
|
|
@@ -7561,7 +7568,18 @@ var formatDate = (date) => {
|
|
|
7561
7568
|
return `${y}/${m}/${d}`;
|
|
7562
7569
|
};
|
|
7563
7570
|
var InputDatePicker = (props) => {
|
|
7564
|
-
const {
|
|
7571
|
+
const {
|
|
7572
|
+
value,
|
|
7573
|
+
onChange,
|
|
7574
|
+
minDate,
|
|
7575
|
+
maxDate,
|
|
7576
|
+
disabled,
|
|
7577
|
+
locale = "ko",
|
|
7578
|
+
placeholder,
|
|
7579
|
+
label,
|
|
7580
|
+
required,
|
|
7581
|
+
validations
|
|
7582
|
+
} = props;
|
|
7565
7583
|
const [isOpen, setIsOpen] = React13.useState(false);
|
|
7566
7584
|
const [tempDate, setTempDate] = React13.useState(value ?? /* @__PURE__ */ new Date());
|
|
7567
7585
|
const handleOpen = () => {
|
|
@@ -7587,6 +7605,9 @@ var InputDatePicker = (props) => {
|
|
|
7587
7605
|
placeholder,
|
|
7588
7606
|
suffix: /* @__PURE__ */ jsx315(CalenderIcon_default, {}),
|
|
7589
7607
|
disabled,
|
|
7608
|
+
label,
|
|
7609
|
+
required,
|
|
7610
|
+
validations,
|
|
7590
7611
|
readOnly: true
|
|
7591
7612
|
}
|
|
7592
7613
|
) }),
|
|
@@ -7718,8 +7739,12 @@ var RangePicker = (props) => {
|
|
|
7718
7739
|
onChange,
|
|
7719
7740
|
minDate,
|
|
7720
7741
|
maxDate,
|
|
7721
|
-
locale = "ko"
|
|
7742
|
+
locale = "ko",
|
|
7743
|
+
label,
|
|
7744
|
+
required,
|
|
7745
|
+
validations
|
|
7722
7746
|
} = props;
|
|
7747
|
+
const labelId = React16.useId();
|
|
7723
7748
|
const [activeTab, setActiveTab] = React16.useState("start");
|
|
7724
7749
|
const handleStartChange = (date) => {
|
|
7725
7750
|
if (!date) return;
|
|
@@ -7733,70 +7758,79 @@ var RangePicker = (props) => {
|
|
|
7733
7758
|
};
|
|
7734
7759
|
const startMaxDate = maxDate && endDate < maxDate ? endDate : endDate;
|
|
7735
7760
|
const endMinDate = minDate && startDate > minDate ? startDate : startDate;
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7761
|
+
const calendar = /* @__PURE__ */ jsxs203(
|
|
7762
|
+
"div",
|
|
7763
|
+
{
|
|
7764
|
+
className: clsx_default("lib-xplat-datepicker", "range"),
|
|
7765
|
+
role: "group",
|
|
7766
|
+
"aria-labelledby": label ? labelId : void 0,
|
|
7767
|
+
children: [
|
|
7768
|
+
/* @__PURE__ */ jsx318("div", { className: "datepicker-range-tabs", children: /* @__PURE__ */ jsx318(
|
|
7769
|
+
Tab_default,
|
|
7770
|
+
{
|
|
7771
|
+
activeIndex: activeTab === "start" ? 0 : 1,
|
|
7772
|
+
tabs: [
|
|
7773
|
+
{ value: "start", title: locale === "ko" ? "\uC2DC\uC791\uC77C" : "Start" },
|
|
7774
|
+
{ value: "end", title: locale === "ko" ? "\uC885\uB8CC\uC77C" : "End" }
|
|
7775
|
+
],
|
|
7776
|
+
onChange: (tab) => setActiveTab(tab.value),
|
|
7777
|
+
type: "toggle",
|
|
7778
|
+
size: "sm"
|
|
7779
|
+
}
|
|
7780
|
+
) }),
|
|
7781
|
+
/* @__PURE__ */ jsxs203("div", { className: "datepicker-range-panels", children: [
|
|
7782
|
+
/* @__PURE__ */ jsx318(
|
|
7783
|
+
SingleDatePicker_default,
|
|
7784
|
+
{
|
|
7785
|
+
value: startDate,
|
|
7786
|
+
onChange: handleStartChange,
|
|
7787
|
+
minDate,
|
|
7788
|
+
maxDate: startMaxDate,
|
|
7789
|
+
rangeStart: startDate,
|
|
7790
|
+
rangeEnd: endDate,
|
|
7791
|
+
locale
|
|
7792
|
+
}
|
|
7793
|
+
),
|
|
7794
|
+
/* @__PURE__ */ jsx318(
|
|
7795
|
+
SingleDatePicker_default,
|
|
7796
|
+
{
|
|
7797
|
+
value: endDate,
|
|
7798
|
+
onChange: handleEndChange,
|
|
7799
|
+
minDate: endMinDate,
|
|
7800
|
+
maxDate,
|
|
7801
|
+
rangeStart: startDate,
|
|
7802
|
+
rangeEnd: endDate,
|
|
7803
|
+
locale
|
|
7804
|
+
}
|
|
7805
|
+
)
|
|
7806
|
+
] }),
|
|
7807
|
+
/* @__PURE__ */ jsx318("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? /* @__PURE__ */ jsx318(
|
|
7808
|
+
SingleDatePicker_default,
|
|
7809
|
+
{
|
|
7810
|
+
value: startDate,
|
|
7811
|
+
onChange: handleStartChange,
|
|
7812
|
+
minDate,
|
|
7813
|
+
maxDate: startMaxDate,
|
|
7814
|
+
rangeStart: startDate,
|
|
7815
|
+
rangeEnd: endDate,
|
|
7816
|
+
locale
|
|
7817
|
+
}
|
|
7818
|
+
) : /* @__PURE__ */ jsx318(
|
|
7819
|
+
SingleDatePicker_default,
|
|
7820
|
+
{
|
|
7821
|
+
value: endDate,
|
|
7822
|
+
onChange: handleEndChange,
|
|
7823
|
+
minDate: endMinDate,
|
|
7824
|
+
maxDate,
|
|
7825
|
+
rangeStart: startDate,
|
|
7826
|
+
rangeEnd: endDate,
|
|
7827
|
+
locale
|
|
7828
|
+
}
|
|
7829
|
+
) })
|
|
7830
|
+
]
|
|
7831
|
+
}
|
|
7832
|
+
);
|
|
7833
|
+
return /* @__PURE__ */ jsx318(Field, { label, required, labelId, validations, children: calendar });
|
|
7800
7834
|
};
|
|
7801
7835
|
RangePicker.displayName = "RangePicker";
|
|
7802
7836
|
var RangePicker_default = RangePicker;
|
|
@@ -9569,10 +9603,13 @@ var FileUpload = (props) => {
|
|
|
9569
9603
|
multiple = false,
|
|
9570
9604
|
maxSize,
|
|
9571
9605
|
onChange,
|
|
9572
|
-
|
|
9606
|
+
placeholder = "\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8\uD558\uAC70\uB098 \uD074\uB9AD\uD558\uC5EC \uC5C5\uB85C\uB4DC",
|
|
9573
9607
|
description,
|
|
9574
|
-
validations
|
|
9608
|
+
validations,
|
|
9609
|
+
label,
|
|
9610
|
+
required
|
|
9575
9611
|
} = props;
|
|
9612
|
+
const fieldId = React23.useId();
|
|
9576
9613
|
const [isDragOver, setIsDragOver] = React23.useState(false);
|
|
9577
9614
|
const inputRef = React23.useRef(null);
|
|
9578
9615
|
const handleFiles = (fileList) => {
|
|
@@ -9617,6 +9654,7 @@ var FileUpload = (props) => {
|
|
|
9617
9654
|
"input",
|
|
9618
9655
|
{
|
|
9619
9656
|
ref: inputRef,
|
|
9657
|
+
id: fieldId,
|
|
9620
9658
|
type: "file",
|
|
9621
9659
|
accept,
|
|
9622
9660
|
multiple,
|
|
@@ -9625,12 +9663,12 @@ var FileUpload = (props) => {
|
|
|
9625
9663
|
}
|
|
9626
9664
|
),
|
|
9627
9665
|
/* @__PURE__ */ jsx325("div", { className: "upload-icon", children: /* @__PURE__ */ jsx325(UploadIcon_default, {}) }),
|
|
9628
|
-
/* @__PURE__ */ jsx325("p", { className: "upload-label", children:
|
|
9666
|
+
/* @__PURE__ */ jsx325("p", { className: "upload-label", children: placeholder }),
|
|
9629
9667
|
description && /* @__PURE__ */ jsx325("p", { className: "upload-description", children: description })
|
|
9630
9668
|
]
|
|
9631
9669
|
}
|
|
9632
9670
|
);
|
|
9633
|
-
return /* @__PURE__ */ jsx325(Field, { validations, children: control });
|
|
9671
|
+
return /* @__PURE__ */ jsx325(Field, { label, required, htmlFor: fieldId, validations, children: control });
|
|
9634
9672
|
};
|
|
9635
9673
|
FileUpload.displayName = "FileUpload";
|
|
9636
9674
|
var FileUpload_default = FileUpload;
|
|
@@ -9773,7 +9811,8 @@ var HtmlTypeWriter_default = HtmlTypeWriter;
|
|
|
9773
9811
|
import React26 from "react";
|
|
9774
9812
|
import { jsx as jsx327, jsxs as jsxs210 } from "react/jsx-runtime";
|
|
9775
9813
|
var ImageSelector = (props) => {
|
|
9776
|
-
const { value,
|
|
9814
|
+
const { value, placeholder, onChange, validations, label, required } = props;
|
|
9815
|
+
const fieldId = React26.useId();
|
|
9777
9816
|
const [previewUrl, setPreviewUrl] = React26.useState();
|
|
9778
9817
|
React26.useEffect(() => {
|
|
9779
9818
|
if (!value) {
|
|
@@ -9803,7 +9842,7 @@ var ImageSelector = (props) => {
|
|
|
9803
9842
|
{
|
|
9804
9843
|
type: "file",
|
|
9805
9844
|
accept: "image/*",
|
|
9806
|
-
id:
|
|
9845
|
+
id: fieldId,
|
|
9807
9846
|
onChange: handleFileChange,
|
|
9808
9847
|
ref: inputRef,
|
|
9809
9848
|
"aria-invalid": hasError(validations) || void 0
|
|
@@ -9815,10 +9854,10 @@ var ImageSelector = (props) => {
|
|
|
9815
9854
|
] }),
|
|
9816
9855
|
/* @__PURE__ */ jsx327("div", { className: "content", children: previewUrl ? /* @__PURE__ */ jsx327("img", { src: previewUrl, alt: "preview" }) : /* @__PURE__ */ jsxs210("div", { className: "skeleton", onClick: handleOpenFileDialog, children: [
|
|
9817
9856
|
/* @__PURE__ */ jsx327("div", { className: "icon-wrapper", children: /* @__PURE__ */ jsx327(ImageIcon_default, {}) }),
|
|
9818
|
-
/* @__PURE__ */ jsx327("div", { className: "label", children:
|
|
9857
|
+
/* @__PURE__ */ jsx327("div", { className: "label", children: placeholder || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
|
|
9819
9858
|
] }) })
|
|
9820
9859
|
] });
|
|
9821
|
-
return /* @__PURE__ */ jsx327(Field, { validations, children: control });
|
|
9860
|
+
return /* @__PURE__ */ jsx327(Field, { label, required, htmlFor: fieldId, validations, children: control });
|
|
9822
9861
|
};
|
|
9823
9862
|
ImageSelector.displayName = "ImageSelector";
|
|
9824
9863
|
var ImageSelector_default = ImageSelector;
|
|
@@ -11370,9 +11409,33 @@ var ToastProvider = ({
|
|
|
11370
11409
|
};
|
|
11371
11410
|
ToastProvider.displayName = "ToastProvider";
|
|
11372
11411
|
|
|
11412
|
+
// src/components/ToggleChip/ToggleChip.tsx
|
|
11413
|
+
import { jsx as jsx353 } from "react/jsx-runtime";
|
|
11414
|
+
var ToggleChip = (props) => {
|
|
11415
|
+
const { children, selected = false, onClick, disabled = false, size = "md" } = props;
|
|
11416
|
+
return /* @__PURE__ */ jsx353(
|
|
11417
|
+
"button",
|
|
11418
|
+
{
|
|
11419
|
+
type: "button",
|
|
11420
|
+
className: clsx_default(
|
|
11421
|
+
"lib-xplat-chip",
|
|
11422
|
+
"lib-xplat-toggle-chip",
|
|
11423
|
+
size,
|
|
11424
|
+
selected ? "selected" : "unselected"
|
|
11425
|
+
),
|
|
11426
|
+
"aria-pressed": selected,
|
|
11427
|
+
disabled,
|
|
11428
|
+
onClick,
|
|
11429
|
+
children
|
|
11430
|
+
}
|
|
11431
|
+
);
|
|
11432
|
+
};
|
|
11433
|
+
ToggleChip.displayName = "ToggleChip";
|
|
11434
|
+
var ToggleChip_default = ToggleChip;
|
|
11435
|
+
|
|
11373
11436
|
// src/components/Tooltip/Tooltip.tsx
|
|
11374
11437
|
import React42 from "react";
|
|
11375
|
-
import { Fragment as Fragment6, jsx as
|
|
11438
|
+
import { Fragment as Fragment6, jsx as jsx354, jsxs as jsxs224 } from "react/jsx-runtime";
|
|
11376
11439
|
var OFFSET = 12;
|
|
11377
11440
|
var GAP = 8;
|
|
11378
11441
|
var SHOW_DELAY = 300;
|
|
@@ -11477,7 +11540,7 @@ var Tooltip = (props) => {
|
|
|
11477
11540
|
window.clearTimeout(delayTimer.current);
|
|
11478
11541
|
cancelAnimationFrame(rafRef.current);
|
|
11479
11542
|
}, []);
|
|
11480
|
-
if (!title && !description) return /* @__PURE__ */
|
|
11543
|
+
if (!title && !description) return /* @__PURE__ */ jsx354(Fragment6, { children });
|
|
11481
11544
|
return /* @__PURE__ */ jsxs224(
|
|
11482
11545
|
"div",
|
|
11483
11546
|
{
|
|
@@ -11491,7 +11554,7 @@ var Tooltip = (props) => {
|
|
|
11491
11554
|
onBlur: close,
|
|
11492
11555
|
children: [
|
|
11493
11556
|
children,
|
|
11494
|
-
visible && /* @__PURE__ */
|
|
11557
|
+
visible && /* @__PURE__ */ jsx354(Portal_default, { children: /* @__PURE__ */ jsxs224(
|
|
11495
11558
|
"div",
|
|
11496
11559
|
{
|
|
11497
11560
|
ref: tooltipRef,
|
|
@@ -11499,8 +11562,8 @@ var Tooltip = (props) => {
|
|
|
11499
11562
|
className: clsx_default("lib-xplat-tooltip", shape),
|
|
11500
11563
|
style: { position: "fixed", left: pos.left, top: pos.top },
|
|
11501
11564
|
children: [
|
|
11502
|
-
title && /* @__PURE__ */
|
|
11503
|
-
description && /* @__PURE__ */
|
|
11565
|
+
title && /* @__PURE__ */ jsx354("div", { className: "tooltip-title", children: title }),
|
|
11566
|
+
description && /* @__PURE__ */ jsx354("div", { className: "tooltip-desc", children: description })
|
|
11504
11567
|
]
|
|
11505
11568
|
}
|
|
11506
11569
|
) })
|
|
@@ -11513,10 +11576,10 @@ var Tooltip_default = Tooltip;
|
|
|
11513
11576
|
|
|
11514
11577
|
// src/components/Video/Video.tsx
|
|
11515
11578
|
import React43 from "react";
|
|
11516
|
-
import { jsx as
|
|
11579
|
+
import { jsx as jsx355, jsxs as jsxs225 } from "react/jsx-runtime";
|
|
11517
11580
|
var PipIcon = () => /* @__PURE__ */ jsxs225("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
11518
|
-
/* @__PURE__ */
|
|
11519
|
-
/* @__PURE__ */
|
|
11581
|
+
/* @__PURE__ */ jsx355("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
11582
|
+
/* @__PURE__ */ jsx355("rect", { x: "12", y: "11", width: "7", height: "6", rx: "1", fill: "currentColor" })
|
|
11520
11583
|
] });
|
|
11521
11584
|
var formatTime = (sec) => {
|
|
11522
11585
|
if (!Number.isFinite(sec) || sec < 0) return "0:00";
|
|
@@ -11697,7 +11760,7 @@ var Video = React43.forwardRef((props, ref) => {
|
|
|
11697
11760
|
ref: containerRef,
|
|
11698
11761
|
className: clsx_default("lib-xplat-video", showControls && "has-controls"),
|
|
11699
11762
|
children: [
|
|
11700
|
-
/* @__PURE__ */
|
|
11763
|
+
/* @__PURE__ */ jsx355(
|
|
11701
11764
|
"video",
|
|
11702
11765
|
{
|
|
11703
11766
|
ref: setRefs,
|
|
@@ -11718,7 +11781,7 @@ var Video = React43.forwardRef((props, ref) => {
|
|
|
11718
11781
|
children
|
|
11719
11782
|
}
|
|
11720
11783
|
),
|
|
11721
|
-
showCenterPlay && /* @__PURE__ */
|
|
11784
|
+
showCenterPlay && /* @__PURE__ */ jsx355(
|
|
11722
11785
|
"button",
|
|
11723
11786
|
{
|
|
11724
11787
|
type: "button",
|
|
@@ -11730,11 +11793,11 @@ var Video = React43.forwardRef((props, ref) => {
|
|
|
11730
11793
|
onClick: togglePlay,
|
|
11731
11794
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
11732
11795
|
tabIndex: -1,
|
|
11733
|
-
children: /* @__PURE__ */
|
|
11796
|
+
children: /* @__PURE__ */ jsx355("span", { className: "center-play-icon", children: /* @__PURE__ */ jsx355(PlayCircleIcon_default, {}) })
|
|
11734
11797
|
}
|
|
11735
11798
|
),
|
|
11736
11799
|
showControls && /* @__PURE__ */ jsxs225("div", { className: "controls", onClick: (e) => e.stopPropagation(), children: [
|
|
11737
|
-
/* @__PURE__ */
|
|
11800
|
+
/* @__PURE__ */ jsx355(
|
|
11738
11801
|
"input",
|
|
11739
11802
|
{
|
|
11740
11803
|
type: "range",
|
|
@@ -11752,28 +11815,28 @@ var Video = React43.forwardRef((props, ref) => {
|
|
|
11752
11815
|
}
|
|
11753
11816
|
),
|
|
11754
11817
|
/* @__PURE__ */ jsxs225("div", { className: "controls-row", children: [
|
|
11755
|
-
/* @__PURE__ */
|
|
11818
|
+
/* @__PURE__ */ jsx355(
|
|
11756
11819
|
"button",
|
|
11757
11820
|
{
|
|
11758
11821
|
type: "button",
|
|
11759
11822
|
className: "control-btn",
|
|
11760
11823
|
onClick: togglePlay,
|
|
11761
11824
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
11762
|
-
children: isPlaying ? /* @__PURE__ */
|
|
11825
|
+
children: isPlaying ? /* @__PURE__ */ jsx355(PauseIcon_default, {}) : /* @__PURE__ */ jsx355(PlayIcon_default, {})
|
|
11763
11826
|
}
|
|
11764
11827
|
),
|
|
11765
11828
|
/* @__PURE__ */ jsxs225("div", { className: "volume-group", children: [
|
|
11766
|
-
/* @__PURE__ */
|
|
11829
|
+
/* @__PURE__ */ jsx355(
|
|
11767
11830
|
"button",
|
|
11768
11831
|
{
|
|
11769
11832
|
type: "button",
|
|
11770
11833
|
className: "control-btn",
|
|
11771
11834
|
onClick: toggleMute,
|
|
11772
11835
|
"aria-label": isMuted ? "\uC74C\uC18C\uAC70 \uD574\uC81C" : "\uC74C\uC18C\uAC70",
|
|
11773
|
-
children: /* @__PURE__ */
|
|
11836
|
+
children: /* @__PURE__ */ jsx355(VolumeGlyph, {})
|
|
11774
11837
|
}
|
|
11775
11838
|
),
|
|
11776
|
-
/* @__PURE__ */
|
|
11839
|
+
/* @__PURE__ */ jsx355(
|
|
11777
11840
|
"input",
|
|
11778
11841
|
{
|
|
11779
11842
|
type: "range",
|
|
@@ -11793,7 +11856,7 @@ var Video = React43.forwardRef((props, ref) => {
|
|
|
11793
11856
|
" / ",
|
|
11794
11857
|
formatTime(duration)
|
|
11795
11858
|
] }),
|
|
11796
|
-
/* @__PURE__ */
|
|
11859
|
+
/* @__PURE__ */ jsx355("div", { className: "controls-spacer" }),
|
|
11797
11860
|
playbackRates && playbackRates.length > 0 && /* @__PURE__ */ jsxs225("div", { className: clsx_default("rate-group", rateMenuOpen && "is-open"), children: [
|
|
11798
11861
|
/* @__PURE__ */ jsxs225(
|
|
11799
11862
|
"button",
|
|
@@ -11809,7 +11872,7 @@ var Video = React43.forwardRef((props, ref) => {
|
|
|
11809
11872
|
]
|
|
11810
11873
|
}
|
|
11811
11874
|
),
|
|
11812
|
-
rateMenuOpen && /* @__PURE__ */
|
|
11875
|
+
rateMenuOpen && /* @__PURE__ */ jsx355("ul", { className: "rate-menu", role: "menu", children: playbackRates.map((r2) => /* @__PURE__ */ jsx355("li", { children: /* @__PURE__ */ jsxs225(
|
|
11813
11876
|
"button",
|
|
11814
11877
|
{
|
|
11815
11878
|
type: "button",
|
|
@@ -11823,7 +11886,7 @@ var Video = React43.forwardRef((props, ref) => {
|
|
|
11823
11886
|
}
|
|
11824
11887
|
) }, r2)) })
|
|
11825
11888
|
] }),
|
|
11826
|
-
showCaptions && /* @__PURE__ */
|
|
11889
|
+
showCaptions && /* @__PURE__ */ jsx355(
|
|
11827
11890
|
"button",
|
|
11828
11891
|
{
|
|
11829
11892
|
type: "button",
|
|
@@ -11831,37 +11894,37 @@ var Video = React43.forwardRef((props, ref) => {
|
|
|
11831
11894
|
onClick: toggleCaptions,
|
|
11832
11895
|
"aria-label": captionsOn ? "\uC790\uB9C9 \uB044\uAE30" : "\uC790\uB9C9 \uCF1C\uAE30",
|
|
11833
11896
|
"aria-pressed": captionsOn,
|
|
11834
|
-
children: /* @__PURE__ */
|
|
11897
|
+
children: /* @__PURE__ */ jsx355(TypeIcon_default, {})
|
|
11835
11898
|
}
|
|
11836
11899
|
),
|
|
11837
|
-
showPip && pipSupported && /* @__PURE__ */
|
|
11900
|
+
showPip && pipSupported && /* @__PURE__ */ jsx355(
|
|
11838
11901
|
"button",
|
|
11839
11902
|
{
|
|
11840
11903
|
type: "button",
|
|
11841
11904
|
className: clsx_default("control-btn", isPip && "is-active"),
|
|
11842
11905
|
onClick: togglePip,
|
|
11843
11906
|
"aria-label": isPip ? "PIP \uC885\uB8CC" : "PIP",
|
|
11844
|
-
children: /* @__PURE__ */
|
|
11907
|
+
children: /* @__PURE__ */ jsx355(PipIcon, {})
|
|
11845
11908
|
}
|
|
11846
11909
|
),
|
|
11847
|
-
showDownload && /* @__PURE__ */
|
|
11910
|
+
showDownload && /* @__PURE__ */ jsx355(
|
|
11848
11911
|
"a",
|
|
11849
11912
|
{
|
|
11850
11913
|
className: "control-btn",
|
|
11851
11914
|
href: src,
|
|
11852
11915
|
download: downloadFileName ?? true,
|
|
11853
11916
|
"aria-label": "\uB2E4\uC6B4\uB85C\uB4DC",
|
|
11854
|
-
children: /* @__PURE__ */
|
|
11917
|
+
children: /* @__PURE__ */ jsx355(DownloadIcon_default, {})
|
|
11855
11918
|
}
|
|
11856
11919
|
),
|
|
11857
|
-
/* @__PURE__ */
|
|
11920
|
+
/* @__PURE__ */ jsx355(
|
|
11858
11921
|
"button",
|
|
11859
11922
|
{
|
|
11860
11923
|
type: "button",
|
|
11861
11924
|
className: "control-btn",
|
|
11862
11925
|
onClick: toggleFullscreen,
|
|
11863
11926
|
"aria-label": isFullscreen ? "\uC804\uCCB4\uD654\uBA74 \uC885\uB8CC" : "\uC804\uCCB4\uD654\uBA74",
|
|
11864
|
-
children: isFullscreen ? /* @__PURE__ */
|
|
11927
|
+
children: isFullscreen ? /* @__PURE__ */ jsx355(MinimizeIcon_default, {}) : /* @__PURE__ */ jsx355(MaximizeIcon_default, {})
|
|
11865
11928
|
}
|
|
11866
11929
|
)
|
|
11867
11930
|
] })
|
|
@@ -11874,7 +11937,7 @@ Video.displayName = "Video";
|
|
|
11874
11937
|
var Video_default = Video;
|
|
11875
11938
|
|
|
11876
11939
|
// src/layout/Grid/FullGrid/FullGrid.tsx
|
|
11877
|
-
import { jsx as
|
|
11940
|
+
import { jsx as jsx356 } from "react/jsx-runtime";
|
|
11878
11941
|
var GAP_MAP = {
|
|
11879
11942
|
none: "var(--spacing-space-none)",
|
|
11880
11943
|
xs: "var(--spacing-space-1)",
|
|
@@ -11887,13 +11950,13 @@ var GAP_MAP = {
|
|
|
11887
11950
|
var FullGrid = (props) => {
|
|
11888
11951
|
const { children, gap } = props;
|
|
11889
11952
|
const style = gap != null ? { gap: GAP_MAP[gap] } : void 0;
|
|
11890
|
-
return /* @__PURE__ */
|
|
11953
|
+
return /* @__PURE__ */ jsx356("div", { className: "lib-xplat-full-grid", style, children });
|
|
11891
11954
|
};
|
|
11892
11955
|
FullGrid.displayName = "FullGrid";
|
|
11893
11956
|
var FullGrid_default = FullGrid;
|
|
11894
11957
|
|
|
11895
11958
|
// src/layout/Grid/FullScreen/FullScreen.tsx
|
|
11896
|
-
import { jsx as
|
|
11959
|
+
import { jsx as jsx357 } from "react/jsx-runtime";
|
|
11897
11960
|
var GAP_MAP2 = {
|
|
11898
11961
|
none: "var(--spacing-space-none)",
|
|
11899
11962
|
xs: "var(--spacing-space-1)",
|
|
@@ -11906,13 +11969,13 @@ var GAP_MAP2 = {
|
|
|
11906
11969
|
var FullScreen = (props) => {
|
|
11907
11970
|
const { children, gap } = props;
|
|
11908
11971
|
const style = gap != null ? { gap: GAP_MAP2[gap] } : void 0;
|
|
11909
|
-
return /* @__PURE__ */
|
|
11972
|
+
return /* @__PURE__ */ jsx357("div", { className: "lib-xplat-full-screen", style, children });
|
|
11910
11973
|
};
|
|
11911
11974
|
FullScreen.displayName = "FullScreen";
|
|
11912
11975
|
var FullScreen_default = FullScreen;
|
|
11913
11976
|
|
|
11914
11977
|
// src/layout/Grid/Item/Item.tsx
|
|
11915
|
-
import { jsx as
|
|
11978
|
+
import { jsx as jsx358 } from "react/jsx-runtime";
|
|
11916
11979
|
var calculateSpans = (column) => {
|
|
11917
11980
|
const spans = {};
|
|
11918
11981
|
let inherited = column.default;
|
|
@@ -11929,35 +11992,35 @@ var GridItem = ({ column, children, className }) => {
|
|
|
11929
11992
|
Object.entries(spans).forEach(([key, value]) => {
|
|
11930
11993
|
style[`--column-${key}`] = value;
|
|
11931
11994
|
});
|
|
11932
|
-
return /* @__PURE__ */
|
|
11995
|
+
return /* @__PURE__ */ jsx358("div", { className: clsx_default("lib-xplat-grid-item", className), style, children });
|
|
11933
11996
|
};
|
|
11934
11997
|
GridItem.displayName = "GridItem";
|
|
11935
11998
|
var Item_default = GridItem;
|
|
11936
11999
|
|
|
11937
12000
|
// src/layout/Header/Header.tsx
|
|
11938
|
-
import { jsx as
|
|
12001
|
+
import { jsx as jsx359, jsxs as jsxs226 } from "react/jsx-runtime";
|
|
11939
12002
|
var Header = ({
|
|
11940
12003
|
logo,
|
|
11941
12004
|
centerContent,
|
|
11942
12005
|
rightContent
|
|
11943
12006
|
}) => {
|
|
11944
12007
|
return /* @__PURE__ */ jsxs226("div", { className: "lib-xplat-layout-header", children: [
|
|
11945
|
-
/* @__PURE__ */
|
|
11946
|
-
/* @__PURE__ */
|
|
11947
|
-
/* @__PURE__ */
|
|
12008
|
+
/* @__PURE__ */ jsx359("div", { children: logo }),
|
|
12009
|
+
/* @__PURE__ */ jsx359("div", { children: centerContent }),
|
|
12010
|
+
/* @__PURE__ */ jsx359("div", { children: rightContent })
|
|
11948
12011
|
] });
|
|
11949
12012
|
};
|
|
11950
12013
|
Header.displayName = "Header";
|
|
11951
12014
|
var Header_default = Header;
|
|
11952
12015
|
|
|
11953
12016
|
// src/layout/Layout/Layout.tsx
|
|
11954
|
-
import { Fragment as Fragment7, jsx as
|
|
12017
|
+
import { Fragment as Fragment7, jsx as jsx360, jsxs as jsxs227 } from "react/jsx-runtime";
|
|
11955
12018
|
var Layout = (props) => {
|
|
11956
12019
|
const { header, sideBar, children } = props;
|
|
11957
|
-
return /* @__PURE__ */
|
|
11958
|
-
sideBar && /* @__PURE__ */
|
|
12020
|
+
return /* @__PURE__ */ jsx360("div", { className: "lib-xplat-layout", children: /* @__PURE__ */ jsxs227("div", { className: "lib-xplat-layout-content-wrapper", children: [
|
|
12021
|
+
sideBar && /* @__PURE__ */ jsx360(Fragment7, { children: sideBar }),
|
|
11959
12022
|
/* @__PURE__ */ jsxs227("div", { className: "lib-xplat-layout-content", children: [
|
|
11960
|
-
header && /* @__PURE__ */
|
|
12023
|
+
header && /* @__PURE__ */ jsx360("div", { className: "lib-xplat-layout-conent-header", children: header }),
|
|
11961
12024
|
children
|
|
11962
12025
|
] })
|
|
11963
12026
|
] }) });
|
|
@@ -11979,18 +12042,18 @@ var useSideBarContext = () => {
|
|
|
11979
12042
|
var SideBarContext_default = SideBarContext;
|
|
11980
12043
|
|
|
11981
12044
|
// src/layout/SideBar/SideBar.tsx
|
|
11982
|
-
import { jsx as
|
|
12045
|
+
import { jsx as jsx361 } from "react/jsx-runtime";
|
|
11983
12046
|
var SideBar = (props) => {
|
|
11984
12047
|
const { children, className } = props;
|
|
11985
12048
|
const [isOpen, setIsOpen] = React45.useState(true);
|
|
11986
12049
|
const handleSwitchSideBar = () => {
|
|
11987
12050
|
setIsOpen((prev) => !prev);
|
|
11988
12051
|
};
|
|
11989
|
-
return /* @__PURE__ */
|
|
12052
|
+
return /* @__PURE__ */ jsx361(
|
|
11990
12053
|
SideBarContext_default.Provider,
|
|
11991
12054
|
{
|
|
11992
12055
|
value: { isSidebarOpen: isOpen, handleSwitchSideBar },
|
|
11993
|
-
children: /* @__PURE__ */
|
|
12056
|
+
children: /* @__PURE__ */ jsx361(
|
|
11994
12057
|
"div",
|
|
11995
12058
|
{
|
|
11996
12059
|
className: clsx_default(
|
|
@@ -12324,6 +12387,7 @@ export {
|
|
|
12324
12387
|
ThumbsUpIcon_default as ThumbsUpIcon,
|
|
12325
12388
|
TimePicker_default as TimePicker,
|
|
12326
12389
|
ToastProvider,
|
|
12390
|
+
ToggleChip_default as ToggleChip,
|
|
12327
12391
|
ToggleLeftIcon_default as ToggleLeftIcon,
|
|
12328
12392
|
ToggleRightIcon_default as ToggleRightIcon,
|
|
12329
12393
|
ToolIcon_default as ToolIcon,
|