@x-plat/design-system 0.4.4 → 0.4.5
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/components/Card/index.css +1 -2
- package/dist/components/DatePicker/index.cjs +30 -5
- package/dist/components/DatePicker/index.css +43 -0
- package/dist/components/DatePicker/index.js +30 -5
- package/dist/components/PopOver/index.css +3 -0
- package/dist/components/index.cjs +166 -141
- package/dist/components/index.css +47 -2
- package/dist/components/index.js +166 -141
- package/dist/index.cjs +171 -146
- package/dist/index.css +73 -2
- package/dist/index.js +171 -146
- package/dist/layout/Header/index.css +11 -0
- package/dist/layout/Layout/index.css +15 -0
- package/dist/layout/index.css +26 -0
- package/package.json +1 -1
|
@@ -1669,7 +1669,7 @@ InputDatePicker.displayName = "InputDatePicker";
|
|
|
1669
1669
|
var InputDatePicker_default = InputDatePicker;
|
|
1670
1670
|
|
|
1671
1671
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
1672
|
-
var
|
|
1672
|
+
var import_react10 = __toESM(require("react"), 1);
|
|
1673
1673
|
|
|
1674
1674
|
// src/components/Button/Button.tsx
|
|
1675
1675
|
var import_jsx_runtime300 = require("react/jsx-runtime");
|
|
@@ -1744,6 +1744,7 @@ Modal.displayName = "Modal";
|
|
|
1744
1744
|
var Modal_default = Modal;
|
|
1745
1745
|
|
|
1746
1746
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
1747
|
+
var import_react9 = __toESM(require("react"), 1);
|
|
1747
1748
|
var import_jsx_runtime302 = require("react/jsx-runtime");
|
|
1748
1749
|
var RangePicker = (props) => {
|
|
1749
1750
|
const {
|
|
@@ -1755,6 +1756,7 @@ var RangePicker = (props) => {
|
|
|
1755
1756
|
maxDate,
|
|
1756
1757
|
locale = "ko"
|
|
1757
1758
|
} = props;
|
|
1759
|
+
const [activeTab, setActiveTab] = import_react9.default.useState("start");
|
|
1758
1760
|
const startCal = useCalendar(startDate.getFullYear(), startDate.getMonth());
|
|
1759
1761
|
const endCal = useCalendar(endDate.getFullYear(), endDate.getMonth());
|
|
1760
1762
|
const isDisabled = (date, type) => {
|
|
@@ -1861,8 +1863,31 @@ var RangePicker = (props) => {
|
|
|
1861
1863
|
"--datepicker-active-color": `var(--${color})`
|
|
1862
1864
|
},
|
|
1863
1865
|
children: [
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsxs)("div", { className: "datepicker-range-tabs", children: [
|
|
1867
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
1868
|
+
"button",
|
|
1869
|
+
{
|
|
1870
|
+
type: "button",
|
|
1871
|
+
className: clsx_default("datepicker-range-tab", activeTab === "start" && "active"),
|
|
1872
|
+
onClick: () => setActiveTab("start"),
|
|
1873
|
+
children: locale === "ko" ? "\uC2DC\uC791\uC77C" : "Start"
|
|
1874
|
+
}
|
|
1875
|
+
),
|
|
1876
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
1877
|
+
"button",
|
|
1878
|
+
{
|
|
1879
|
+
type: "button",
|
|
1880
|
+
className: clsx_default("datepicker-range-tab", activeTab === "end" && "active"),
|
|
1881
|
+
onClick: () => setActiveTab("end"),
|
|
1882
|
+
children: locale === "ko" ? "\uC885\uB8CC\uC77C" : "End"
|
|
1883
|
+
}
|
|
1884
|
+
)
|
|
1885
|
+
] }),
|
|
1886
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsxs)("div", { className: "datepicker-range-panels", children: [
|
|
1887
|
+
renderCalendar(startCal, "start"),
|
|
1888
|
+
renderCalendar(endCal, "end")
|
|
1889
|
+
] }),
|
|
1890
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? renderCalendar(startCal, "start") : renderCalendar(endCal, "end") })
|
|
1866
1891
|
]
|
|
1867
1892
|
}
|
|
1868
1893
|
);
|
|
@@ -1874,7 +1899,7 @@ var RangePicker_default = RangePicker;
|
|
|
1874
1899
|
var import_jsx_runtime303 = require("react/jsx-runtime");
|
|
1875
1900
|
var PopupPicker = (props) => {
|
|
1876
1901
|
const { component, type, locale } = props;
|
|
1877
|
-
const [isOpen, setIsOpen] =
|
|
1902
|
+
const [isOpen, setIsOpen] = import_react10.default.useState(false);
|
|
1878
1903
|
const handleClick = () => setIsOpen(true);
|
|
1879
1904
|
const handleClose = () => setIsOpen(false);
|
|
1880
1905
|
const handleSingleChange = (date) => {
|
|
@@ -1883,7 +1908,7 @@ var PopupPicker = (props) => {
|
|
|
1883
1908
|
handleClose();
|
|
1884
1909
|
};
|
|
1885
1910
|
return /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "lib-xplat-popup-datepicker", children: [
|
|
1886
|
-
|
|
1911
|
+
import_react10.default.cloneElement(component, { onClick: handleClick }),
|
|
1887
1912
|
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
|
|
1888
1913
|
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "popup-datepicker-content", children: [
|
|
1889
1914
|
type === "single" && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
@@ -249,9 +249,38 @@
|
|
|
249
249
|
color: color-mix(in srgb, var(--xplat-blue-500) 35%, transparent);
|
|
250
250
|
}
|
|
251
251
|
.lib-xplat-datepicker.range {
|
|
252
|
+
display: flex;
|
|
253
|
+
flex-direction: column;
|
|
254
|
+
}
|
|
255
|
+
.lib-xplat-datepicker .datepicker-range-tabs {
|
|
256
|
+
display: none;
|
|
257
|
+
margin-bottom: 0.75rem;
|
|
258
|
+
border-bottom: 1px solid var(--xplat-neutral-200);
|
|
259
|
+
}
|
|
260
|
+
.lib-xplat-datepicker .datepicker-range-tab {
|
|
261
|
+
flex: 1;
|
|
262
|
+
padding: 0.5rem;
|
|
263
|
+
border: none;
|
|
264
|
+
background: none;
|
|
265
|
+
font-size: 0.8125rem;
|
|
266
|
+
font-weight: 500;
|
|
267
|
+
color: var(--xplat-neutral-400);
|
|
268
|
+
cursor: pointer;
|
|
269
|
+
border-bottom: 2px solid transparent;
|
|
270
|
+
transition: color 0.15s, border-color 0.15s;
|
|
271
|
+
}
|
|
272
|
+
.lib-xplat-datepicker .datepicker-range-tab.active {
|
|
273
|
+
color: var(--datepicker-active-color, var(--xplat-blue-500));
|
|
274
|
+
border-bottom-color: var(--datepicker-active-color, var(--xplat-blue-500));
|
|
275
|
+
font-weight: 600;
|
|
276
|
+
}
|
|
277
|
+
.lib-xplat-datepicker .datepicker-range-panels {
|
|
252
278
|
display: flex;
|
|
253
279
|
gap: 1.5rem;
|
|
254
280
|
}
|
|
281
|
+
.lib-xplat-datepicker .datepicker-range-mobile {
|
|
282
|
+
display: none;
|
|
283
|
+
}
|
|
255
284
|
.lib-xplat-datepicker .datepicker-range-panel {
|
|
256
285
|
flex: 1;
|
|
257
286
|
min-width: 200px;
|
|
@@ -264,6 +293,20 @@
|
|
|
264
293
|
color: var(--xplat-neutral-500);
|
|
265
294
|
margin-bottom: 0.5rem;
|
|
266
295
|
}
|
|
296
|
+
@media (max-width: 600px) {
|
|
297
|
+
.lib-xplat-datepicker .datepicker-range-tabs {
|
|
298
|
+
display: flex;
|
|
299
|
+
}
|
|
300
|
+
.lib-xplat-datepicker .datepicker-range-panels {
|
|
301
|
+
display: none;
|
|
302
|
+
}
|
|
303
|
+
.lib-xplat-datepicker .datepicker-range-mobile {
|
|
304
|
+
display: block;
|
|
305
|
+
}
|
|
306
|
+
.lib-xplat-datepicker .datepicker-range-panel {
|
|
307
|
+
min-width: unset;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
267
310
|
.lib-xplat-datepicker.input-datepicker {
|
|
268
311
|
position: relative;
|
|
269
312
|
}
|
|
@@ -1630,7 +1630,7 @@ InputDatePicker.displayName = "InputDatePicker";
|
|
|
1630
1630
|
var InputDatePicker_default = InputDatePicker;
|
|
1631
1631
|
|
|
1632
1632
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
1633
|
-
import
|
|
1633
|
+
import React9 from "react";
|
|
1634
1634
|
|
|
1635
1635
|
// src/components/Button/Button.tsx
|
|
1636
1636
|
import { jsx as jsx300 } from "react/jsx-runtime";
|
|
@@ -1705,6 +1705,7 @@ Modal.displayName = "Modal";
|
|
|
1705
1705
|
var Modal_default = Modal;
|
|
1706
1706
|
|
|
1707
1707
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
1708
|
+
import React8 from "react";
|
|
1708
1709
|
import { jsx as jsx302, jsxs as jsxs193 } from "react/jsx-runtime";
|
|
1709
1710
|
var RangePicker = (props) => {
|
|
1710
1711
|
const {
|
|
@@ -1716,6 +1717,7 @@ var RangePicker = (props) => {
|
|
|
1716
1717
|
maxDate,
|
|
1717
1718
|
locale = "ko"
|
|
1718
1719
|
} = props;
|
|
1720
|
+
const [activeTab, setActiveTab] = React8.useState("start");
|
|
1719
1721
|
const startCal = useCalendar(startDate.getFullYear(), startDate.getMonth());
|
|
1720
1722
|
const endCal = useCalendar(endDate.getFullYear(), endDate.getMonth());
|
|
1721
1723
|
const isDisabled = (date, type) => {
|
|
@@ -1822,8 +1824,31 @@ var RangePicker = (props) => {
|
|
|
1822
1824
|
"--datepicker-active-color": `var(--${color})`
|
|
1823
1825
|
},
|
|
1824
1826
|
children: [
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
+
/* @__PURE__ */ jsxs193("div", { className: "datepicker-range-tabs", children: [
|
|
1828
|
+
/* @__PURE__ */ jsx302(
|
|
1829
|
+
"button",
|
|
1830
|
+
{
|
|
1831
|
+
type: "button",
|
|
1832
|
+
className: clsx_default("datepicker-range-tab", activeTab === "start" && "active"),
|
|
1833
|
+
onClick: () => setActiveTab("start"),
|
|
1834
|
+
children: locale === "ko" ? "\uC2DC\uC791\uC77C" : "Start"
|
|
1835
|
+
}
|
|
1836
|
+
),
|
|
1837
|
+
/* @__PURE__ */ jsx302(
|
|
1838
|
+
"button",
|
|
1839
|
+
{
|
|
1840
|
+
type: "button",
|
|
1841
|
+
className: clsx_default("datepicker-range-tab", activeTab === "end" && "active"),
|
|
1842
|
+
onClick: () => setActiveTab("end"),
|
|
1843
|
+
children: locale === "ko" ? "\uC885\uB8CC\uC77C" : "End"
|
|
1844
|
+
}
|
|
1845
|
+
)
|
|
1846
|
+
] }),
|
|
1847
|
+
/* @__PURE__ */ jsxs193("div", { className: "datepicker-range-panels", children: [
|
|
1848
|
+
renderCalendar(startCal, "start"),
|
|
1849
|
+
renderCalendar(endCal, "end")
|
|
1850
|
+
] }),
|
|
1851
|
+
/* @__PURE__ */ jsx302("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? renderCalendar(startCal, "start") : renderCalendar(endCal, "end") })
|
|
1827
1852
|
]
|
|
1828
1853
|
}
|
|
1829
1854
|
);
|
|
@@ -1835,7 +1860,7 @@ var RangePicker_default = RangePicker;
|
|
|
1835
1860
|
import { jsx as jsx303, jsxs as jsxs194 } from "react/jsx-runtime";
|
|
1836
1861
|
var PopupPicker = (props) => {
|
|
1837
1862
|
const { component, type, locale } = props;
|
|
1838
|
-
const [isOpen, setIsOpen] =
|
|
1863
|
+
const [isOpen, setIsOpen] = React9.useState(false);
|
|
1839
1864
|
const handleClick = () => setIsOpen(true);
|
|
1840
1865
|
const handleClose = () => setIsOpen(false);
|
|
1841
1866
|
const handleSingleChange = (date) => {
|
|
@@ -1844,7 +1869,7 @@ var PopupPicker = (props) => {
|
|
|
1844
1869
|
handleClose();
|
|
1845
1870
|
};
|
|
1846
1871
|
return /* @__PURE__ */ jsxs194("div", { className: "lib-xplat-popup-datepicker", children: [
|
|
1847
|
-
|
|
1872
|
+
React9.cloneElement(component, { onClick: handleClick }),
|
|
1848
1873
|
/* @__PURE__ */ jsx303(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsxs194("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
|
|
1849
1874
|
/* @__PURE__ */ jsxs194("div", { className: "popup-datepicker-content", children: [
|
|
1850
1875
|
type === "single" && /* @__PURE__ */ jsx303(
|