@x-plat/design-system 0.5.6 → 0.5.7
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/DatePicker/index.cjs +38 -22
- package/dist/components/DatePicker/index.css +14 -1
- package/dist/components/DatePicker/index.d.cts +2 -1
- package/dist/components/DatePicker/index.d.ts +2 -1
- package/dist/components/DatePicker/index.js +38 -22
- package/dist/components/Video/index.cjs +1 -1
- package/dist/components/Video/index.css +7 -0
- package/dist/components/Video/index.js +1 -1
- package/dist/components/index.cjs +39 -23
- package/dist/components/index.css +21 -1
- package/dist/components/index.js +39 -23
- package/dist/index.cjs +39 -23
- package/dist/index.css +21 -1
- package/dist/index.js +39 -23
- package/package.json +1 -1
|
@@ -1624,13 +1624,14 @@ var SingleDatePicker_default = SingleDatePicker;
|
|
|
1624
1624
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
1625
1625
|
var import_jsx_runtime299 = require("react/jsx-runtime");
|
|
1626
1626
|
var formatDate = (date) => {
|
|
1627
|
+
if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
|
|
1627
1628
|
const y = date.getFullYear();
|
|
1628
1629
|
const m = String(date.getMonth() + 1).padStart(2, "0");
|
|
1629
1630
|
const d = String(date.getDate()).padStart(2, "0");
|
|
1630
1631
|
return `${y}/${m}/${d}`;
|
|
1631
1632
|
};
|
|
1632
1633
|
var InputDatePicker = (props) => {
|
|
1633
|
-
const { value, onChange, minDate, maxDate, disabled, locale } = props;
|
|
1634
|
+
const { value, onChange, minDate, maxDate, disabled, locale, placeholder } = props;
|
|
1634
1635
|
const [isOpen, setIsOpen] = import_react7.default.useState(false);
|
|
1635
1636
|
const containerRef = import_react7.default.useRef(null);
|
|
1636
1637
|
const calendarRef = import_react7.default.useRef(null);
|
|
@@ -1640,27 +1641,42 @@ var InputDatePicker = (props) => {
|
|
|
1640
1641
|
onChange?.(date);
|
|
1641
1642
|
setIsOpen(false);
|
|
1642
1643
|
};
|
|
1643
|
-
return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(
|
|
1645
|
+
"div",
|
|
1646
|
+
{
|
|
1647
|
+
className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"),
|
|
1648
|
+
ref: containerRef,
|
|
1649
|
+
children: [
|
|
1650
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
1651
|
+
"div",
|
|
1652
|
+
{
|
|
1653
|
+
className: "input-datepicker-trigger",
|
|
1654
|
+
onClick: () => !disabled && setIsOpen((o) => !o),
|
|
1655
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
1656
|
+
Input_default,
|
|
1657
|
+
{
|
|
1658
|
+
value: formatDate(value),
|
|
1659
|
+
placeholder,
|
|
1660
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(CalenderIcon_default, {}),
|
|
1661
|
+
disabled,
|
|
1662
|
+
readOnly: true
|
|
1663
|
+
}
|
|
1664
|
+
)
|
|
1665
|
+
}
|
|
1666
|
+
),
|
|
1667
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("div", { className: "input-datepicker-dropdown", ref: calendarRef, children: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
1668
|
+
SingleDatePicker_default,
|
|
1669
|
+
{
|
|
1670
|
+
value: value ?? /* @__PURE__ */ new Date(),
|
|
1671
|
+
onChange: handleSelect,
|
|
1672
|
+
minDate,
|
|
1673
|
+
maxDate,
|
|
1674
|
+
locale
|
|
1675
|
+
}
|
|
1676
|
+
) })
|
|
1677
|
+
]
|
|
1678
|
+
}
|
|
1679
|
+
);
|
|
1664
1680
|
};
|
|
1665
1681
|
InputDatePicker.displayName = "InputDatePicker";
|
|
1666
1682
|
var InputDatePicker_default = InputDatePicker;
|
|
@@ -261,6 +261,7 @@
|
|
|
261
261
|
.lib-xplat-datepicker.range {
|
|
262
262
|
display: flex;
|
|
263
263
|
flex-direction: column;
|
|
264
|
+
container-type: inline-size;
|
|
264
265
|
}
|
|
265
266
|
.lib-xplat-datepicker .datepicker-range-tabs {
|
|
266
267
|
display: none;
|
|
@@ -303,7 +304,7 @@
|
|
|
303
304
|
color: var(--semantic-text-muted);
|
|
304
305
|
margin-bottom: var(--spacing-space-2);
|
|
305
306
|
}
|
|
306
|
-
@
|
|
307
|
+
@container (max-width: 600px) {
|
|
307
308
|
.lib-xplat-datepicker .datepicker-range-tabs {
|
|
308
309
|
display: flex;
|
|
309
310
|
}
|
|
@@ -320,6 +321,18 @@
|
|
|
320
321
|
.lib-xplat-datepicker.input-datepicker {
|
|
321
322
|
position: relative;
|
|
322
323
|
}
|
|
324
|
+
.lib-xplat-datepicker.input-datepicker .input-datepicker-trigger {
|
|
325
|
+
cursor: pointer;
|
|
326
|
+
}
|
|
327
|
+
.lib-xplat-datepicker.input-datepicker .input-datepicker-trigger input {
|
|
328
|
+
cursor: pointer;
|
|
329
|
+
}
|
|
330
|
+
.lib-xplat-datepicker.input-datepicker.disabled .input-datepicker-trigger {
|
|
331
|
+
cursor: not-allowed;
|
|
332
|
+
}
|
|
333
|
+
.lib-xplat-datepicker.input-datepicker.disabled .input-datepicker-trigger input {
|
|
334
|
+
cursor: not-allowed;
|
|
335
|
+
}
|
|
323
336
|
.lib-xplat-datepicker.input-datepicker .input-datepicker-dropdown {
|
|
324
337
|
position: absolute;
|
|
325
338
|
top: 100%;
|
|
@@ -2,12 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
interface InputDatePickerProps {
|
|
5
|
-
value
|
|
5
|
+
value?: Date | null;
|
|
6
6
|
onChange?: (date: Date) => void;
|
|
7
7
|
minDate?: Date;
|
|
8
8
|
maxDate?: Date;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
locale?: "ko" | "en";
|
|
11
|
+
placeholder?: string;
|
|
11
12
|
}
|
|
12
13
|
declare const InputDatePicker: React.FC<InputDatePickerProps>;
|
|
13
14
|
|
|
@@ -2,12 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
interface InputDatePickerProps {
|
|
5
|
-
value
|
|
5
|
+
value?: Date | null;
|
|
6
6
|
onChange?: (date: Date) => void;
|
|
7
7
|
minDate?: Date;
|
|
8
8
|
maxDate?: Date;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
locale?: "ko" | "en";
|
|
11
|
+
placeholder?: string;
|
|
11
12
|
}
|
|
12
13
|
declare const InputDatePicker: React.FC<InputDatePickerProps>;
|
|
13
14
|
|
|
@@ -1585,13 +1585,14 @@ var SingleDatePicker_default = SingleDatePicker;
|
|
|
1585
1585
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
1586
1586
|
import { jsx as jsx299, jsxs as jsxs192 } from "react/jsx-runtime";
|
|
1587
1587
|
var formatDate = (date) => {
|
|
1588
|
+
if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
|
|
1588
1589
|
const y = date.getFullYear();
|
|
1589
1590
|
const m = String(date.getMonth() + 1).padStart(2, "0");
|
|
1590
1591
|
const d = String(date.getDate()).padStart(2, "0");
|
|
1591
1592
|
return `${y}/${m}/${d}`;
|
|
1592
1593
|
};
|
|
1593
1594
|
var InputDatePicker = (props) => {
|
|
1594
|
-
const { value, onChange, minDate, maxDate, disabled, locale } = props;
|
|
1595
|
+
const { value, onChange, minDate, maxDate, disabled, locale, placeholder } = props;
|
|
1595
1596
|
const [isOpen, setIsOpen] = React6.useState(false);
|
|
1596
1597
|
const containerRef = React6.useRef(null);
|
|
1597
1598
|
const calendarRef = React6.useRef(null);
|
|
@@ -1601,27 +1602,42 @@ var InputDatePicker = (props) => {
|
|
|
1601
1602
|
onChange?.(date);
|
|
1602
1603
|
setIsOpen(false);
|
|
1603
1604
|
};
|
|
1604
|
-
return /* @__PURE__ */ jsxs192(
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1605
|
+
return /* @__PURE__ */ jsxs192(
|
|
1606
|
+
"div",
|
|
1607
|
+
{
|
|
1608
|
+
className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"),
|
|
1609
|
+
ref: containerRef,
|
|
1610
|
+
children: [
|
|
1611
|
+
/* @__PURE__ */ jsx299(
|
|
1612
|
+
"div",
|
|
1613
|
+
{
|
|
1614
|
+
className: "input-datepicker-trigger",
|
|
1615
|
+
onClick: () => !disabled && setIsOpen((o) => !o),
|
|
1616
|
+
children: /* @__PURE__ */ jsx299(
|
|
1617
|
+
Input_default,
|
|
1618
|
+
{
|
|
1619
|
+
value: formatDate(value),
|
|
1620
|
+
placeholder,
|
|
1621
|
+
suffix: /* @__PURE__ */ jsx299(CalenderIcon_default, {}),
|
|
1622
|
+
disabled,
|
|
1623
|
+
readOnly: true
|
|
1624
|
+
}
|
|
1625
|
+
)
|
|
1626
|
+
}
|
|
1627
|
+
),
|
|
1628
|
+
isOpen && /* @__PURE__ */ jsx299("div", { className: "input-datepicker-dropdown", ref: calendarRef, children: /* @__PURE__ */ jsx299(
|
|
1629
|
+
SingleDatePicker_default,
|
|
1630
|
+
{
|
|
1631
|
+
value: value ?? /* @__PURE__ */ new Date(),
|
|
1632
|
+
onChange: handleSelect,
|
|
1633
|
+
minDate,
|
|
1634
|
+
maxDate,
|
|
1635
|
+
locale
|
|
1636
|
+
}
|
|
1637
|
+
) })
|
|
1638
|
+
]
|
|
1639
|
+
}
|
|
1640
|
+
);
|
|
1625
1641
|
};
|
|
1626
1642
|
InputDatePicker.displayName = "InputDatePicker";
|
|
1627
1643
|
var InputDatePicker_default = InputDatePicker;
|
|
@@ -634,7 +634,7 @@ var Video = import_react.default.forwardRef((props, ref) => {
|
|
|
634
634
|
onTimeUpdate: handleTimeUpdate,
|
|
635
635
|
onVolumeChange: handleVolumeChange,
|
|
636
636
|
onRateChange: handleRateChange,
|
|
637
|
-
onClick: togglePlay,
|
|
637
|
+
onClick: showControls || showCenterPlay ? togglePlay : void 0,
|
|
638
638
|
...rest,
|
|
639
639
|
children
|
|
640
640
|
}
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
max-height: 100%;
|
|
15
15
|
object-fit: contain;
|
|
16
16
|
vertical-align: middle;
|
|
17
|
+
}
|
|
18
|
+
.lib-xplat-video.has-controls > video,
|
|
19
|
+
.lib-xplat-video:has(> .center-play) > video {
|
|
17
20
|
cursor: pointer;
|
|
18
21
|
}
|
|
19
22
|
.lib-xplat-video > .center-play {
|
|
@@ -176,6 +179,9 @@
|
|
|
176
179
|
appearance: none;
|
|
177
180
|
background: transparent;
|
|
178
181
|
cursor: pointer;
|
|
182
|
+
margin: 0;
|
|
183
|
+
padding: 0;
|
|
184
|
+
align-self: center;
|
|
179
185
|
}
|
|
180
186
|
.lib-xplat-video .seekbar:focus,
|
|
181
187
|
.lib-xplat-video .volume-slider:focus {
|
|
@@ -187,6 +193,7 @@
|
|
|
187
193
|
appearance: none;
|
|
188
194
|
width: 12px;
|
|
189
195
|
height: 12px;
|
|
196
|
+
margin-top: -4px;
|
|
190
197
|
border-radius: 50%;
|
|
191
198
|
background: #fff;
|
|
192
199
|
border: none;
|
|
@@ -598,7 +598,7 @@ var Video = React.forwardRef((props, ref) => {
|
|
|
598
598
|
onTimeUpdate: handleTimeUpdate,
|
|
599
599
|
onVolumeChange: handleVolumeChange,
|
|
600
600
|
onRateChange: handleRateChange,
|
|
601
|
-
onClick: togglePlay,
|
|
601
|
+
onClick: showControls || showCenterPlay ? togglePlay : void 0,
|
|
602
602
|
...rest,
|
|
603
603
|
children
|
|
604
604
|
}
|
|
@@ -2802,13 +2802,14 @@ var SingleDatePicker_default = SingleDatePicker;
|
|
|
2802
2802
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
2803
2803
|
var import_jsx_runtime312 = require("react/jsx-runtime");
|
|
2804
2804
|
var formatDate = (date) => {
|
|
2805
|
+
if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
|
|
2805
2806
|
const y = date.getFullYear();
|
|
2806
2807
|
const m = String(date.getMonth() + 1).padStart(2, "0");
|
|
2807
2808
|
const d = String(date.getDate()).padStart(2, "0");
|
|
2808
2809
|
return `${y}/${m}/${d}`;
|
|
2809
2810
|
};
|
|
2810
2811
|
var InputDatePicker = (props) => {
|
|
2811
|
-
const { value, onChange, minDate, maxDate, disabled, locale } = props;
|
|
2812
|
+
const { value, onChange, minDate, maxDate, disabled, locale, placeholder } = props;
|
|
2812
2813
|
const [isOpen, setIsOpen] = import_react11.default.useState(false);
|
|
2813
2814
|
const containerRef = import_react11.default.useRef(null);
|
|
2814
2815
|
const calendarRef = import_react11.default.useRef(null);
|
|
@@ -2818,27 +2819,42 @@ var InputDatePicker = (props) => {
|
|
|
2818
2819
|
onChange?.(date);
|
|
2819
2820
|
setIsOpen(false);
|
|
2820
2821
|
};
|
|
2821
|
-
return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
|
|
2823
|
+
"div",
|
|
2824
|
+
{
|
|
2825
|
+
className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"),
|
|
2826
|
+
ref: containerRef,
|
|
2827
|
+
children: [
|
|
2828
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
2829
|
+
"div",
|
|
2830
|
+
{
|
|
2831
|
+
className: "input-datepicker-trigger",
|
|
2832
|
+
onClick: () => !disabled && setIsOpen((o) => !o),
|
|
2833
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
2834
|
+
Input_default,
|
|
2835
|
+
{
|
|
2836
|
+
value: formatDate(value),
|
|
2837
|
+
placeholder,
|
|
2838
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(CalenderIcon_default, {}),
|
|
2839
|
+
disabled,
|
|
2840
|
+
readOnly: true
|
|
2841
|
+
}
|
|
2842
|
+
)
|
|
2843
|
+
}
|
|
2844
|
+
),
|
|
2845
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "input-datepicker-dropdown", ref: calendarRef, children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
2846
|
+
SingleDatePicker_default,
|
|
2847
|
+
{
|
|
2848
|
+
value: value ?? /* @__PURE__ */ new Date(),
|
|
2849
|
+
onChange: handleSelect,
|
|
2850
|
+
minDate,
|
|
2851
|
+
maxDate,
|
|
2852
|
+
locale
|
|
2853
|
+
}
|
|
2854
|
+
) })
|
|
2855
|
+
]
|
|
2856
|
+
}
|
|
2857
|
+
);
|
|
2842
2858
|
};
|
|
2843
2859
|
InputDatePicker.displayName = "InputDatePicker";
|
|
2844
2860
|
var InputDatePicker_default = InputDatePicker;
|
|
@@ -5056,7 +5072,7 @@ var Video = import_react39.default.forwardRef((props, ref) => {
|
|
|
5056
5072
|
onTimeUpdate: handleTimeUpdate,
|
|
5057
5073
|
onVolumeChange: handleVolumeChange,
|
|
5058
5074
|
onRateChange: handleRateChange,
|
|
5059
|
-
onClick: togglePlay,
|
|
5075
|
+
onClick: showControls || showCenterPlay ? togglePlay : void 0,
|
|
5060
5076
|
...rest,
|
|
5061
5077
|
children
|
|
5062
5078
|
}
|
|
@@ -2244,6 +2244,7 @@
|
|
|
2244
2244
|
.lib-xplat-datepicker.range {
|
|
2245
2245
|
display: flex;
|
|
2246
2246
|
flex-direction: column;
|
|
2247
|
+
container-type: inline-size;
|
|
2247
2248
|
}
|
|
2248
2249
|
.lib-xplat-datepicker .datepicker-range-tabs {
|
|
2249
2250
|
display: none;
|
|
@@ -2286,7 +2287,7 @@
|
|
|
2286
2287
|
color: var(--semantic-text-muted);
|
|
2287
2288
|
margin-bottom: var(--spacing-space-2);
|
|
2288
2289
|
}
|
|
2289
|
-
@
|
|
2290
|
+
@container (max-width: 600px) {
|
|
2290
2291
|
.lib-xplat-datepicker .datepicker-range-tabs {
|
|
2291
2292
|
display: flex;
|
|
2292
2293
|
}
|
|
@@ -2303,6 +2304,18 @@
|
|
|
2303
2304
|
.lib-xplat-datepicker.input-datepicker {
|
|
2304
2305
|
position: relative;
|
|
2305
2306
|
}
|
|
2307
|
+
.lib-xplat-datepicker.input-datepicker .input-datepicker-trigger {
|
|
2308
|
+
cursor: pointer;
|
|
2309
|
+
}
|
|
2310
|
+
.lib-xplat-datepicker.input-datepicker .input-datepicker-trigger input {
|
|
2311
|
+
cursor: pointer;
|
|
2312
|
+
}
|
|
2313
|
+
.lib-xplat-datepicker.input-datepicker.disabled .input-datepicker-trigger {
|
|
2314
|
+
cursor: not-allowed;
|
|
2315
|
+
}
|
|
2316
|
+
.lib-xplat-datepicker.input-datepicker.disabled .input-datepicker-trigger input {
|
|
2317
|
+
cursor: not-allowed;
|
|
2318
|
+
}
|
|
2306
2319
|
.lib-xplat-datepicker.input-datepicker .input-datepicker-dropdown {
|
|
2307
2320
|
position: absolute;
|
|
2308
2321
|
top: 100%;
|
|
@@ -4079,6 +4092,9 @@
|
|
|
4079
4092
|
max-height: 100%;
|
|
4080
4093
|
object-fit: contain;
|
|
4081
4094
|
vertical-align: middle;
|
|
4095
|
+
}
|
|
4096
|
+
.lib-xplat-video.has-controls > video,
|
|
4097
|
+
.lib-xplat-video:has(> .center-play) > video {
|
|
4082
4098
|
cursor: pointer;
|
|
4083
4099
|
}
|
|
4084
4100
|
.lib-xplat-video > .center-play {
|
|
@@ -4241,6 +4257,9 @@
|
|
|
4241
4257
|
appearance: none;
|
|
4242
4258
|
background: transparent;
|
|
4243
4259
|
cursor: pointer;
|
|
4260
|
+
margin: 0;
|
|
4261
|
+
padding: 0;
|
|
4262
|
+
align-self: center;
|
|
4244
4263
|
}
|
|
4245
4264
|
.lib-xplat-video .seekbar:focus,
|
|
4246
4265
|
.lib-xplat-video .volume-slider:focus {
|
|
@@ -4252,6 +4271,7 @@
|
|
|
4252
4271
|
appearance: none;
|
|
4253
4272
|
width: 12px;
|
|
4254
4273
|
height: 12px;
|
|
4274
|
+
margin-top: -4px;
|
|
4255
4275
|
border-radius: 50%;
|
|
4256
4276
|
background: #fff;
|
|
4257
4277
|
border: none;
|
package/dist/components/index.js
CHANGED
|
@@ -2714,13 +2714,14 @@ var SingleDatePicker_default = SingleDatePicker;
|
|
|
2714
2714
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
2715
2715
|
import { jsx as jsx312, jsxs as jsxs201 } from "react/jsx-runtime";
|
|
2716
2716
|
var formatDate = (date) => {
|
|
2717
|
+
if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
|
|
2717
2718
|
const y = date.getFullYear();
|
|
2718
2719
|
const m = String(date.getMonth() + 1).padStart(2, "0");
|
|
2719
2720
|
const d = String(date.getDate()).padStart(2, "0");
|
|
2720
2721
|
return `${y}/${m}/${d}`;
|
|
2721
2722
|
};
|
|
2722
2723
|
var InputDatePicker = (props) => {
|
|
2723
|
-
const { value, onChange, minDate, maxDate, disabled, locale } = props;
|
|
2724
|
+
const { value, onChange, minDate, maxDate, disabled, locale, placeholder } = props;
|
|
2724
2725
|
const [isOpen, setIsOpen] = React10.useState(false);
|
|
2725
2726
|
const containerRef = React10.useRef(null);
|
|
2726
2727
|
const calendarRef = React10.useRef(null);
|
|
@@ -2730,27 +2731,42 @@ var InputDatePicker = (props) => {
|
|
|
2730
2731
|
onChange?.(date);
|
|
2731
2732
|
setIsOpen(false);
|
|
2732
2733
|
};
|
|
2733
|
-
return /* @__PURE__ */ jsxs201(
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2734
|
+
return /* @__PURE__ */ jsxs201(
|
|
2735
|
+
"div",
|
|
2736
|
+
{
|
|
2737
|
+
className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"),
|
|
2738
|
+
ref: containerRef,
|
|
2739
|
+
children: [
|
|
2740
|
+
/* @__PURE__ */ jsx312(
|
|
2741
|
+
"div",
|
|
2742
|
+
{
|
|
2743
|
+
className: "input-datepicker-trigger",
|
|
2744
|
+
onClick: () => !disabled && setIsOpen((o) => !o),
|
|
2745
|
+
children: /* @__PURE__ */ jsx312(
|
|
2746
|
+
Input_default,
|
|
2747
|
+
{
|
|
2748
|
+
value: formatDate(value),
|
|
2749
|
+
placeholder,
|
|
2750
|
+
suffix: /* @__PURE__ */ jsx312(CalenderIcon_default, {}),
|
|
2751
|
+
disabled,
|
|
2752
|
+
readOnly: true
|
|
2753
|
+
}
|
|
2754
|
+
)
|
|
2755
|
+
}
|
|
2756
|
+
),
|
|
2757
|
+
isOpen && /* @__PURE__ */ jsx312("div", { className: "input-datepicker-dropdown", ref: calendarRef, children: /* @__PURE__ */ jsx312(
|
|
2758
|
+
SingleDatePicker_default,
|
|
2759
|
+
{
|
|
2760
|
+
value: value ?? /* @__PURE__ */ new Date(),
|
|
2761
|
+
onChange: handleSelect,
|
|
2762
|
+
minDate,
|
|
2763
|
+
maxDate,
|
|
2764
|
+
locale
|
|
2765
|
+
}
|
|
2766
|
+
) })
|
|
2767
|
+
]
|
|
2768
|
+
}
|
|
2769
|
+
);
|
|
2754
2770
|
};
|
|
2755
2771
|
InputDatePicker.displayName = "InputDatePicker";
|
|
2756
2772
|
var InputDatePicker_default = InputDatePicker;
|
|
@@ -4968,7 +4984,7 @@ var Video = React38.forwardRef((props, ref) => {
|
|
|
4968
4984
|
onTimeUpdate: handleTimeUpdate,
|
|
4969
4985
|
onVolumeChange: handleVolumeChange,
|
|
4970
4986
|
onRateChange: handleRateChange,
|
|
4971
|
-
onClick: togglePlay,
|
|
4987
|
+
onClick: showControls || showCenterPlay ? togglePlay : void 0,
|
|
4972
4988
|
...rest,
|
|
4973
4989
|
children
|
|
4974
4990
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -7226,13 +7226,14 @@ var SingleDatePicker_default = SingleDatePicker;
|
|
|
7226
7226
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
7227
7227
|
var import_jsx_runtime312 = require("react/jsx-runtime");
|
|
7228
7228
|
var formatDate = (date) => {
|
|
7229
|
+
if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
|
|
7229
7230
|
const y = date.getFullYear();
|
|
7230
7231
|
const m = String(date.getMonth() + 1).padStart(2, "0");
|
|
7231
7232
|
const d = String(date.getDate()).padStart(2, "0");
|
|
7232
7233
|
return `${y}/${m}/${d}`;
|
|
7233
7234
|
};
|
|
7234
7235
|
var InputDatePicker = (props) => {
|
|
7235
|
-
const { value, onChange, minDate, maxDate, disabled, locale } = props;
|
|
7236
|
+
const { value, onChange, minDate, maxDate, disabled, locale, placeholder } = props;
|
|
7236
7237
|
const [isOpen, setIsOpen] = import_react11.default.useState(false);
|
|
7237
7238
|
const containerRef = import_react11.default.useRef(null);
|
|
7238
7239
|
const calendarRef = import_react11.default.useRef(null);
|
|
@@ -7242,27 +7243,42 @@ var InputDatePicker = (props) => {
|
|
|
7242
7243
|
onChange?.(date);
|
|
7243
7244
|
setIsOpen(false);
|
|
7244
7245
|
};
|
|
7245
|
-
return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
|
|
7247
|
+
"div",
|
|
7248
|
+
{
|
|
7249
|
+
className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"),
|
|
7250
|
+
ref: containerRef,
|
|
7251
|
+
children: [
|
|
7252
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
7253
|
+
"div",
|
|
7254
|
+
{
|
|
7255
|
+
className: "input-datepicker-trigger",
|
|
7256
|
+
onClick: () => !disabled && setIsOpen((o) => !o),
|
|
7257
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
7258
|
+
Input_default,
|
|
7259
|
+
{
|
|
7260
|
+
value: formatDate(value),
|
|
7261
|
+
placeholder,
|
|
7262
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(CalenderIcon_default, {}),
|
|
7263
|
+
disabled,
|
|
7264
|
+
readOnly: true
|
|
7265
|
+
}
|
|
7266
|
+
)
|
|
7267
|
+
}
|
|
7268
|
+
),
|
|
7269
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "input-datepicker-dropdown", ref: calendarRef, children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
7270
|
+
SingleDatePicker_default,
|
|
7271
|
+
{
|
|
7272
|
+
value: value ?? /* @__PURE__ */ new Date(),
|
|
7273
|
+
onChange: handleSelect,
|
|
7274
|
+
minDate,
|
|
7275
|
+
maxDate,
|
|
7276
|
+
locale
|
|
7277
|
+
}
|
|
7278
|
+
) })
|
|
7279
|
+
]
|
|
7280
|
+
}
|
|
7281
|
+
);
|
|
7266
7282
|
};
|
|
7267
7283
|
InputDatePicker.displayName = "InputDatePicker";
|
|
7268
7284
|
var InputDatePicker_default = InputDatePicker;
|
|
@@ -9480,7 +9496,7 @@ var Video = import_react39.default.forwardRef((props, ref) => {
|
|
|
9480
9496
|
onTimeUpdate: handleTimeUpdate,
|
|
9481
9497
|
onVolumeChange: handleVolumeChange,
|
|
9482
9498
|
onRateChange: handleRateChange,
|
|
9483
|
-
onClick: togglePlay,
|
|
9499
|
+
onClick: showControls || showCenterPlay ? togglePlay : void 0,
|
|
9484
9500
|
...rest,
|
|
9485
9501
|
children
|
|
9486
9502
|
}
|
package/dist/index.css
CHANGED
|
@@ -2244,6 +2244,7 @@
|
|
|
2244
2244
|
.lib-xplat-datepicker.range {
|
|
2245
2245
|
display: flex;
|
|
2246
2246
|
flex-direction: column;
|
|
2247
|
+
container-type: inline-size;
|
|
2247
2248
|
}
|
|
2248
2249
|
.lib-xplat-datepicker .datepicker-range-tabs {
|
|
2249
2250
|
display: none;
|
|
@@ -2286,7 +2287,7 @@
|
|
|
2286
2287
|
color: var(--semantic-text-muted);
|
|
2287
2288
|
margin-bottom: var(--spacing-space-2);
|
|
2288
2289
|
}
|
|
2289
|
-
@
|
|
2290
|
+
@container (max-width: 600px) {
|
|
2290
2291
|
.lib-xplat-datepicker .datepicker-range-tabs {
|
|
2291
2292
|
display: flex;
|
|
2292
2293
|
}
|
|
@@ -2303,6 +2304,18 @@
|
|
|
2303
2304
|
.lib-xplat-datepicker.input-datepicker {
|
|
2304
2305
|
position: relative;
|
|
2305
2306
|
}
|
|
2307
|
+
.lib-xplat-datepicker.input-datepicker .input-datepicker-trigger {
|
|
2308
|
+
cursor: pointer;
|
|
2309
|
+
}
|
|
2310
|
+
.lib-xplat-datepicker.input-datepicker .input-datepicker-trigger input {
|
|
2311
|
+
cursor: pointer;
|
|
2312
|
+
}
|
|
2313
|
+
.lib-xplat-datepicker.input-datepicker.disabled .input-datepicker-trigger {
|
|
2314
|
+
cursor: not-allowed;
|
|
2315
|
+
}
|
|
2316
|
+
.lib-xplat-datepicker.input-datepicker.disabled .input-datepicker-trigger input {
|
|
2317
|
+
cursor: not-allowed;
|
|
2318
|
+
}
|
|
2306
2319
|
.lib-xplat-datepicker.input-datepicker .input-datepicker-dropdown {
|
|
2307
2320
|
position: absolute;
|
|
2308
2321
|
top: 100%;
|
|
@@ -4079,6 +4092,9 @@
|
|
|
4079
4092
|
max-height: 100%;
|
|
4080
4093
|
object-fit: contain;
|
|
4081
4094
|
vertical-align: middle;
|
|
4095
|
+
}
|
|
4096
|
+
.lib-xplat-video.has-controls > video,
|
|
4097
|
+
.lib-xplat-video:has(> .center-play) > video {
|
|
4082
4098
|
cursor: pointer;
|
|
4083
4099
|
}
|
|
4084
4100
|
.lib-xplat-video > .center-play {
|
|
@@ -4241,6 +4257,9 @@
|
|
|
4241
4257
|
appearance: none;
|
|
4242
4258
|
background: transparent;
|
|
4243
4259
|
cursor: pointer;
|
|
4260
|
+
margin: 0;
|
|
4261
|
+
padding: 0;
|
|
4262
|
+
align-self: center;
|
|
4244
4263
|
}
|
|
4245
4264
|
.lib-xplat-video .seekbar:focus,
|
|
4246
4265
|
.lib-xplat-video .volume-slider:focus {
|
|
@@ -4252,6 +4271,7 @@
|
|
|
4252
4271
|
appearance: none;
|
|
4253
4272
|
width: 12px;
|
|
4254
4273
|
height: 12px;
|
|
4274
|
+
margin-top: -4px;
|
|
4255
4275
|
border-radius: 50%;
|
|
4256
4276
|
background: #fff;
|
|
4257
4277
|
border: none;
|
package/dist/index.js
CHANGED
|
@@ -6829,13 +6829,14 @@ var SingleDatePicker_default = SingleDatePicker;
|
|
|
6829
6829
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
6830
6830
|
import { jsx as jsx312, jsxs as jsxs201 } from "react/jsx-runtime";
|
|
6831
6831
|
var formatDate = (date) => {
|
|
6832
|
+
if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
|
|
6832
6833
|
const y = date.getFullYear();
|
|
6833
6834
|
const m = String(date.getMonth() + 1).padStart(2, "0");
|
|
6834
6835
|
const d = String(date.getDate()).padStart(2, "0");
|
|
6835
6836
|
return `${y}/${m}/${d}`;
|
|
6836
6837
|
};
|
|
6837
6838
|
var InputDatePicker = (props) => {
|
|
6838
|
-
const { value, onChange, minDate, maxDate, disabled, locale } = props;
|
|
6839
|
+
const { value, onChange, minDate, maxDate, disabled, locale, placeholder } = props;
|
|
6839
6840
|
const [isOpen, setIsOpen] = React10.useState(false);
|
|
6840
6841
|
const containerRef = React10.useRef(null);
|
|
6841
6842
|
const calendarRef = React10.useRef(null);
|
|
@@ -6845,27 +6846,42 @@ var InputDatePicker = (props) => {
|
|
|
6845
6846
|
onChange?.(date);
|
|
6846
6847
|
setIsOpen(false);
|
|
6847
6848
|
};
|
|
6848
|
-
return /* @__PURE__ */ jsxs201(
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6849
|
+
return /* @__PURE__ */ jsxs201(
|
|
6850
|
+
"div",
|
|
6851
|
+
{
|
|
6852
|
+
className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"),
|
|
6853
|
+
ref: containerRef,
|
|
6854
|
+
children: [
|
|
6855
|
+
/* @__PURE__ */ jsx312(
|
|
6856
|
+
"div",
|
|
6857
|
+
{
|
|
6858
|
+
className: "input-datepicker-trigger",
|
|
6859
|
+
onClick: () => !disabled && setIsOpen((o) => !o),
|
|
6860
|
+
children: /* @__PURE__ */ jsx312(
|
|
6861
|
+
Input_default,
|
|
6862
|
+
{
|
|
6863
|
+
value: formatDate(value),
|
|
6864
|
+
placeholder,
|
|
6865
|
+
suffix: /* @__PURE__ */ jsx312(CalenderIcon_default, {}),
|
|
6866
|
+
disabled,
|
|
6867
|
+
readOnly: true
|
|
6868
|
+
}
|
|
6869
|
+
)
|
|
6870
|
+
}
|
|
6871
|
+
),
|
|
6872
|
+
isOpen && /* @__PURE__ */ jsx312("div", { className: "input-datepicker-dropdown", ref: calendarRef, children: /* @__PURE__ */ jsx312(
|
|
6873
|
+
SingleDatePicker_default,
|
|
6874
|
+
{
|
|
6875
|
+
value: value ?? /* @__PURE__ */ new Date(),
|
|
6876
|
+
onChange: handleSelect,
|
|
6877
|
+
minDate,
|
|
6878
|
+
maxDate,
|
|
6879
|
+
locale
|
|
6880
|
+
}
|
|
6881
|
+
) })
|
|
6882
|
+
]
|
|
6883
|
+
}
|
|
6884
|
+
);
|
|
6869
6885
|
};
|
|
6870
6886
|
InputDatePicker.displayName = "InputDatePicker";
|
|
6871
6887
|
var InputDatePicker_default = InputDatePicker;
|
|
@@ -9083,7 +9099,7 @@ var Video = React38.forwardRef((props, ref) => {
|
|
|
9083
9099
|
onTimeUpdate: handleTimeUpdate,
|
|
9084
9100
|
onVolumeChange: handleVolumeChange,
|
|
9085
9101
|
onRateChange: handleRateChange,
|
|
9086
|
-
onClick: togglePlay,
|
|
9102
|
+
onClick: showControls || showCenterPlay ? togglePlay : void 0,
|
|
9087
9103
|
...rest,
|
|
9088
9104
|
children
|
|
9089
9105
|
}
|