@sia.soul/sia-react-ui 0.1.162 → 0.1.163
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/chart.cjs +1 -1
- package/dist/chart.js +5 -5
- package/dist/{chunk-ZNPNZD6O.js → chunk-23FQ5ARA.js} +4 -4
- package/dist/{chunk-33WX54AU.js → chunk-2EC653G5.js} +5 -5
- package/dist/{chunk-WMZYYPIW.js → chunk-CUAXJCSH.js} +1 -1
- package/dist/{chunk-Q3LEK2TL.js → chunk-DKQ5UCN6.js} +58 -42
- package/dist/{chunk-KA3M4TE4.js → chunk-G5EJJFUI.js} +2 -2
- package/dist/{chunk-UL54A2YN.js → chunk-J6BPKBEL.js} +2 -2
- package/dist/{chunk-M4IASLGB.js → chunk-NHGCGOF2.js} +3 -3
- package/dist/{chunk-CRA7VNOA.js → chunk-OHAESA5R.js} +1 -1
- package/dist/{chunk-4B7ATL6J.js → chunk-PAWEP65C.js} +1 -1
- package/dist/{chunk-MXK6TKMO.js → chunk-SX4LLT3H.js} +5 -5
- package/dist/{chunk-5WZR2RHA.js → chunk-V4I32DPL.js} +2 -2
- package/dist/{chunk-UPXL2QLJ.js → chunk-WR5YBY2A.js} +6 -6
- package/dist/core.cjs +1 -1
- package/dist/core.css +81 -7
- package/dist/core.js +8 -8
- package/dist/game.cjs +1 -1
- package/dist/game.js +3 -3
- package/dist/index.cjs +55 -39
- package/dist/index.css +81 -7
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -12
- package/dist/markdown-editor.cjs +1 -1
- package/dist/markdown-editor.js +3 -3
- package/dist/rich-text-editor.cjs +1 -1
- package/dist/rich-text-editor.js +7 -7
- package/dist/{select-date-range-Cbh37zmU.d.cts → select-date-range-C9lTBQFX.d.cts} +4 -4
- package/dist/{select-date-range-CIXBuoef.d.ts → select-date-range-CQCGGkkt.d.ts} +4 -4
- package/dist/select-date-range.cjs +55 -39
- package/dist/select-date-range.d.cts +1 -1
- package/dist/select-date-range.d.ts +1 -1
- package/dist/select-date-range.js +8 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -982,7 +982,7 @@ var PopupPortal = (0, import_react4.forwardRef)(function PopupPortal2({
|
|
|
982
982
|
cancelAnimationFrame(frame);
|
|
983
983
|
observer.disconnect();
|
|
984
984
|
};
|
|
985
|
-
}, [anchorRef, offset, motion.present, placement, viewportPadding]);
|
|
985
|
+
}, [anchorRef, offset, motion.present, placement, viewportPadding, position?.availableHeight, position?.placement]);
|
|
986
986
|
if (!motion.present || typeof document === "undefined") return null;
|
|
987
987
|
return (0, import_react_dom.createPortal)(
|
|
988
988
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -9835,10 +9835,12 @@ function CalendarMonth({
|
|
|
9835
9835
|
const rangeStart = Boolean(start && key === start);
|
|
9836
9836
|
const rangeEnd = Boolean(range[1] && key === range[1]);
|
|
9837
9837
|
const inRange = Boolean(low && high && key >= low && key <= high);
|
|
9838
|
+
const segmentStart = inRange && (index % 7 === 0 || key === low);
|
|
9839
|
+
const segmentEnd = inRange && (index % 7 === 6 || key === high);
|
|
9838
9840
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
9839
9841
|
"span",
|
|
9840
9842
|
{
|
|
9841
|
-
className: `sia-date-panel__cell${outside ? " is-outside" : ""}${selected ? " is-selected" : ""}${rangeStart ? " is-range-start" : ""}${rangeEnd ? " is-range-end" : ""}${inRange ? " is-in-range" : ""}${key === today ? " is-today" : ""}`,
|
|
9843
|
+
className: `sia-date-panel__cell${outside ? " is-outside" : ""}${selected ? " is-selected" : ""}${rangeStart ? " is-range-start" : ""}${rangeEnd ? " is-range-end" : ""}${inRange ? " is-in-range" : ""}${segmentStart ? " is-range-segment-start" : ""}${segmentEnd ? " is-range-segment-end" : ""}${key === today ? " is-today" : ""}`,
|
|
9842
9844
|
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
9843
9845
|
"button",
|
|
9844
9846
|
{
|
|
@@ -10539,10 +10541,10 @@ function DateRangePicker({
|
|
|
10539
10541
|
}
|
|
10540
10542
|
return () => observer.disconnect();
|
|
10541
10543
|
});
|
|
10542
|
-
const [
|
|
10544
|
+
const [dateTimeViews, setDateTimeViews] = (0, import_react46.useState)(["date", "date"]);
|
|
10543
10545
|
const [hoverDate, setHoverDate] = (0, import_react46.useState)("");
|
|
10544
10546
|
const [viewMonth, setViewMonth] = (0, import_react46.useState)(() => startOfMonth(parseDate2(dayFromValue(currentValue[0] || currentValue[1])) ?? /* @__PURE__ */ new Date()));
|
|
10545
|
-
const [endViewMonth, setEndViewMonth] = (0, import_react46.useState)(() => startOfMonth(parseDate2(dayFromValue(currentValue[1])) ?? addMonths(parseDate2(dayFromValue(currentValue[0])) ?? /* @__PURE__ */ new Date(), 1)));
|
|
10547
|
+
const [endViewMonth, setEndViewMonth] = (0, import_react46.useState)(() => startOfMonth(parseDate2(dayFromValue(currentValue[1])) ?? (showTime ? parseDate2(dayFromValue(currentValue[0])) ?? /* @__PURE__ */ new Date() : addMonths(parseDate2(dayFromValue(currentValue[0])) ?? /* @__PURE__ */ new Date(), 1))));
|
|
10546
10548
|
const showSecond = showSecondFrom(showTime);
|
|
10547
10549
|
const defaultTime = defaultTimeFrom(showTime);
|
|
10548
10550
|
const defaultEndTime = defaultTimeFrom(showTime, 1);
|
|
@@ -10570,10 +10572,10 @@ function DateRangePicker({
|
|
|
10570
10572
|
setDraftValue(currentValue);
|
|
10571
10573
|
setTimes([timePart(currentValue[0], defaultTime), timePart(currentValue[1], defaultEndTime)]);
|
|
10572
10574
|
setActiveIndex(endpointDisabled[0] ? 1 : endpointDisabled[1] ? 0 : endpoint ?? (currentValue[0] && !currentValue[1] ? 1 : 0));
|
|
10573
|
-
|
|
10575
|
+
setDateTimeViews(["date", "date"]);
|
|
10574
10576
|
const nextStartMonth = startOfMonth(parseDate2(dayFromValue(currentValue[0] || currentValue[1])) ?? /* @__PURE__ */ new Date());
|
|
10575
10577
|
setViewMonth(nextStartMonth);
|
|
10576
|
-
setEndViewMonth(startOfMonth(parseDate2(dayFromValue(currentValue[1])) ?? addMonths(nextStartMonth, 1)));
|
|
10578
|
+
setEndViewMonth(startOfMonth(parseDate2(dayFromValue(currentValue[1])) ?? (showTime ? nextStartMonth : addMonths(nextStartMonth, 1))));
|
|
10577
10579
|
}
|
|
10578
10580
|
if (next && endpoint !== void 0 && !endpointDisabled[endpoint]) setActiveIndex(endpoint);
|
|
10579
10581
|
setVisible(next);
|
|
@@ -10642,13 +10644,6 @@ function DateRangePicker({
|
|
|
10642
10644
|
nextValue[index] = withTime(day, time, showSecond);
|
|
10643
10645
|
updateDraft(nextValue);
|
|
10644
10646
|
setHoverDate("");
|
|
10645
|
-
const otherIndex = index === 0 ? 1 : 0;
|
|
10646
|
-
if (!nextValue[otherIndex]) {
|
|
10647
|
-
setActiveIndex(otherIndex);
|
|
10648
|
-
const month = startOfMonth(parseDate2(day) ?? /* @__PURE__ */ new Date());
|
|
10649
|
-
(otherIndex === 0 ? setViewMonth : setEndViewMonth)(month);
|
|
10650
|
-
return;
|
|
10651
|
-
}
|
|
10652
10647
|
setActiveIndex(index);
|
|
10653
10648
|
}
|
|
10654
10649
|
function changeTime(index, nextTime) {
|
|
@@ -10701,7 +10696,7 @@ function DateRangePicker({
|
|
|
10701
10696
|
setTimes([timePart(next[0], defaultTime), timePart(next[1], defaultEndTime)]);
|
|
10702
10697
|
const nextStartMonth = startOfMonth(parseDate2(dayFromValue(next[0] || next[1])) ?? /* @__PURE__ */ new Date());
|
|
10703
10698
|
setViewMonth(nextStartMonth);
|
|
10704
|
-
setEndViewMonth(startOfMonth(parseDate2(dayFromValue(next[1])) ?? addMonths(nextStartMonth, 1)));
|
|
10699
|
+
setEndViewMonth(startOfMonth(parseDate2(dayFromValue(next[1])) ?? (showTime ? nextStartMonth : addMonths(nextStartMonth, 1))));
|
|
10705
10700
|
if (!resolvedNeedConfirm) {
|
|
10706
10701
|
changeOpen(false);
|
|
10707
10702
|
}
|
|
@@ -10741,6 +10736,43 @@ function DateRangePicker({
|
|
|
10741
10736
|
)
|
|
10742
10737
|
] });
|
|
10743
10738
|
}
|
|
10739
|
+
function switchDateTimeView(index, view) {
|
|
10740
|
+
if (endpointDisabled[index]) return;
|
|
10741
|
+
setActiveIndex(index);
|
|
10742
|
+
setDateTimeViews((previous) => index === 0 ? [view, previous[1]] : [previous[0], view]);
|
|
10743
|
+
}
|
|
10744
|
+
function renderDateTimeEndpoint(index) {
|
|
10745
|
+
const label = index === 0 ? "\u5F00\u59CB" : "\u7ED3\u675F";
|
|
10746
|
+
const view = dateTimeViews[index];
|
|
10747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("section", { className: "sia-date-panel__endpoint", "aria-label": `${label}\u65E5\u671F\u65F6\u95F4`, children: [
|
|
10748
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "sia-date-panel__views", children: [
|
|
10749
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("section", { className: `sia-date-panel__view sia-date-panel__view--date${view === "date" ? " is-active" : ""}`, "aria-hidden": view !== "date", ...view !== "date" ? { inert: "" } : {}, "aria-label": `${label}\u65E5\u671F`, children: renderDateTimeGroup(index) }),
|
|
10750
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `sia-date-panel__view sia-date-panel__view--time${view === "time" ? " is-active" : ""}`, "aria-hidden": view !== "time", ...view !== "time" ? { inert: "" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10751
|
+
TimePanel,
|
|
10752
|
+
{
|
|
10753
|
+
value: times[index],
|
|
10754
|
+
showSecond,
|
|
10755
|
+
title: `\u9009\u62E9${label}\u65F6\u95F4`,
|
|
10756
|
+
unitLabels: true,
|
|
10757
|
+
ariaLabel: `\u9009\u62E9${label}\u65F6\u95F4`,
|
|
10758
|
+
disabledTime: endpointDisabled[index] ? () => true : void 0,
|
|
10759
|
+
onChange: (nextTime) => changeTime(index, nextTime)
|
|
10760
|
+
}
|
|
10761
|
+
) })
|
|
10762
|
+
] }),
|
|
10763
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10764
|
+
DateTimePanelFooter,
|
|
10765
|
+
{
|
|
10766
|
+
date: rangeDates[index] || dateKey(/* @__PURE__ */ new Date()),
|
|
10767
|
+
time: showSecond ? times[index] : times[index].slice(0, 5),
|
|
10768
|
+
view,
|
|
10769
|
+
disabled: endpointDisabled[index],
|
|
10770
|
+
onSwitchDate: () => switchDateTimeView(index, "date"),
|
|
10771
|
+
onSwitchTime: () => switchDateTimeView(index, "time")
|
|
10772
|
+
}
|
|
10773
|
+
)
|
|
10774
|
+
] }, index);
|
|
10775
|
+
}
|
|
10744
10776
|
const displayValue = visible && allowEmpty.some(Boolean) ? draftValue : currentValue;
|
|
10745
10777
|
const startFloating = useFloatingPlaceholder({ mode: placeholderMode, placeholder: placeholder[0], filled: Boolean(displayValue[0]), active: visible });
|
|
10746
10778
|
const endFloating = useFloatingPlaceholder({ mode: placeholderMode, placeholder: placeholder[1], filled: Boolean(displayValue[1]), active: visible });
|
|
@@ -10790,7 +10822,7 @@ function DateRangePicker({
|
|
|
10790
10822
|
ref: popupRef,
|
|
10791
10823
|
anchorRef: rootRef,
|
|
10792
10824
|
open: visible,
|
|
10793
|
-
className: `sia-date-panel${showTime ? " sia-date-panel--datetime" : " sia-date-panel--range"}${presets?.length ? " sia-date-panel--with-presets" : ""}`,
|
|
10825
|
+
className: `sia-date-panel${showTime ? " sia-date-panel--datetime-range" : " sia-date-panel--range"}${presets?.length ? " sia-date-panel--with-presets" : ""}`,
|
|
10794
10826
|
role: "dialog",
|
|
10795
10827
|
"aria-label": "\u65E5\u671F\u8303\u56F4\u9009\u62E9\u9762\u677F",
|
|
10796
10828
|
onKeyDown: (event) => {
|
|
@@ -10802,20 +10834,9 @@ function DateRangePicker({
|
|
|
10802
10834
|
children: [
|
|
10803
10835
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "sia-date-panel__body", children: [
|
|
10804
10836
|
presets?.length ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("aside", { className: "sia-date-panel__presets", "aria-label": "\u5FEB\u6377\u65E5\u671F\u8303\u56F4", children: presets.map((preset2, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("button", { type: "button", onClick: () => applyPreset(preset2), children: preset2.label }, index)) }) : null,
|
|
10805
|
-
showTime ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "sia-date-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
TimePanel,
|
|
10809
|
-
{
|
|
10810
|
-
value: times[activeIndex],
|
|
10811
|
-
showSecond,
|
|
10812
|
-
title: `\u9009\u62E9${activeIndex === 0 ? "\u5F00\u59CB" : "\u7ED3\u675F"}\u65F6\u95F4`,
|
|
10813
|
-
unitLabels: true,
|
|
10814
|
-
ariaLabel: `\u9009\u62E9${activeIndex === 0 ? "\u5F00\u59CB" : "\u7ED3\u675F"}\u65F6\u95F4`,
|
|
10815
|
-
disabledTime: endpointDisabled[activeIndex] ? () => true : void 0,
|
|
10816
|
-
onChange: (nextTime) => changeTime(activeIndex, nextTime)
|
|
10817
|
-
}
|
|
10818
|
-
) })
|
|
10837
|
+
showTime ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "sia-date-panel__datetime-endpoints", children: [
|
|
10838
|
+
renderDateTimeEndpoint(0),
|
|
10839
|
+
renderDateTimeEndpoint(1)
|
|
10819
10840
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "sia-date-panel__range-calendars", children: [
|
|
10820
10841
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("section", { className: "sia-date-panel__calendar", children: [
|
|
10821
10842
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
@@ -10843,13 +10864,10 @@ function DateRangePicker({
|
|
|
10843
10864
|
] })
|
|
10844
10865
|
] })
|
|
10845
10866
|
] }),
|
|
10846
|
-
showTime ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10847
|
-
|
|
10867
|
+
showTime ? renderExtraFooter || invalidDateTimeRange || maxRangeDays ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10868
|
+
DatePanelFooter,
|
|
10848
10869
|
{
|
|
10849
|
-
|
|
10850
|
-
time: showSecond ? times[activeIndex] : times[activeIndex].slice(0, 5),
|
|
10851
|
-
view: dateTimeView,
|
|
10852
|
-
disabled: endpointDisabled[activeIndex],
|
|
10870
|
+
showToday: false,
|
|
10853
10871
|
extra: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
10854
10872
|
renderExtraFooter?.(),
|
|
10855
10873
|
invalidDateTimeRange ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("small", { className: "sia-date-panel__range-error", children: "\u7ED3\u675F\u65F6\u95F4\u4E0D\u80FD\u65E9\u4E8E\u5F00\u59CB\u65F6\u95F4" }) : maxRangeDays ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("small", { children: [
|
|
@@ -10857,11 +10875,9 @@ function DateRangePicker({
|
|
|
10857
10875
|
maxRangeDays,
|
|
10858
10876
|
" \u5929"
|
|
10859
10877
|
] }) : null
|
|
10860
|
-
] })
|
|
10861
|
-
onSwitchDate: () => setDateTimeView("date"),
|
|
10862
|
-
onSwitchTime: () => setDateTimeView("time")
|
|
10878
|
+
] })
|
|
10863
10879
|
}
|
|
10864
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10880
|
+
) : null : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10865
10881
|
DatePanelFooter,
|
|
10866
10882
|
{
|
|
10867
10883
|
showToday: showToday && !presets?.length,
|
package/dist/index.css
CHANGED
|
@@ -7545,14 +7545,25 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
|
|
|
7545
7545
|
.sia-date-panel__cell.is-in-range {
|
|
7546
7546
|
background: var(--sia-color-primary);
|
|
7547
7547
|
}
|
|
7548
|
-
.sia-date-panel__cell.is-range-
|
|
7549
|
-
|
|
7550
|
-
|
|
7548
|
+
.sia-date-panel__cell.is-in-range:not(.is-range-segment-end)::after {
|
|
7549
|
+
position: absolute;
|
|
7550
|
+
inset-block: 0;
|
|
7551
|
+
inset-inline-end: -4px;
|
|
7552
|
+
width: 4px;
|
|
7553
|
+
content: "";
|
|
7554
|
+
pointer-events: none;
|
|
7555
|
+
background: var(--sia-color-primary);
|
|
7551
7556
|
}
|
|
7552
|
-
.sia-date-panel__cell.is-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7557
|
+
.sia-date-panel__cell.is-range-segment-start {
|
|
7558
|
+
border-start-start-radius: 12px;
|
|
7559
|
+
border-end-start-radius: 12px;
|
|
7560
|
+
}
|
|
7561
|
+
.sia-date-panel__cell.is-range-segment-end {
|
|
7562
|
+
border-start-end-radius: 12px;
|
|
7563
|
+
border-end-end-radius: 12px;
|
|
7564
|
+
}
|
|
7565
|
+
.sia-date-panel__cell.is-in-range button {
|
|
7566
|
+
border-radius: inherit;
|
|
7556
7567
|
}
|
|
7557
7568
|
.sia-date-panel__cell button {
|
|
7558
7569
|
position: relative;
|
|
@@ -7599,6 +7610,11 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
|
|
|
7599
7610
|
background: var(--sia-color-control-hover);
|
|
7600
7611
|
border-color: transparent;
|
|
7601
7612
|
}
|
|
7613
|
+
.sia-date-panel__cell.is-in-range button:disabled {
|
|
7614
|
+
color: rgb(255 255 255 / 55%);
|
|
7615
|
+
background: transparent;
|
|
7616
|
+
border-color: transparent;
|
|
7617
|
+
}
|
|
7602
7618
|
.sia-date-panel__time {
|
|
7603
7619
|
display: grid;
|
|
7604
7620
|
grid-template-rows: 52px minmax(0, 1fr);
|
|
@@ -7665,6 +7681,64 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
|
|
|
7665
7681
|
transition: none;
|
|
7666
7682
|
}
|
|
7667
7683
|
}
|
|
7684
|
+
.sia-date-panel--datetime-range {
|
|
7685
|
+
width: max-content;
|
|
7686
|
+
}
|
|
7687
|
+
.sia-date-panel__datetime-endpoints {
|
|
7688
|
+
display: grid;
|
|
7689
|
+
grid-template-columns: repeat(2, 280px);
|
|
7690
|
+
min-width: 0;
|
|
7691
|
+
}
|
|
7692
|
+
.sia-date-panel__endpoint {
|
|
7693
|
+
display: flex;
|
|
7694
|
+
flex-direction: column;
|
|
7695
|
+
min-width: 0;
|
|
7696
|
+
}
|
|
7697
|
+
.sia-date-panel__endpoint + .sia-date-panel__endpoint {
|
|
7698
|
+
border-inline-start: 1px solid var(--sia-color-border);
|
|
7699
|
+
}
|
|
7700
|
+
.sia-date-panel__endpoint > .sia-date-panel__views {
|
|
7701
|
+
flex: none;
|
|
7702
|
+
}
|
|
7703
|
+
.sia-date-panel__endpoint > .sia-date-panel__footer {
|
|
7704
|
+
position: static;
|
|
7705
|
+
}
|
|
7706
|
+
.sia-date-panel--datetime-range.sia-date-panel--with-presets {
|
|
7707
|
+
display: grid;
|
|
7708
|
+
grid-template-columns: 145px minmax(0, 1fr);
|
|
7709
|
+
}
|
|
7710
|
+
.sia-date-panel--datetime-range.sia-date-panel--with-presets > .sia-date-panel__body {
|
|
7711
|
+
display: contents;
|
|
7712
|
+
}
|
|
7713
|
+
.sia-date-panel--datetime-range.sia-date-panel--with-presets .sia-date-panel__presets {
|
|
7714
|
+
grid-row: 1 / span 2;
|
|
7715
|
+
}
|
|
7716
|
+
.sia-date-panel--datetime-range.sia-date-panel--with-presets > .sia-date-panel__footer {
|
|
7717
|
+
grid-column: 2;
|
|
7718
|
+
}
|
|
7719
|
+
@media (max-width: 600px) {
|
|
7720
|
+
.sia-date-panel--datetime-range,
|
|
7721
|
+
.sia-date-panel--datetime-range.sia-date-panel--with-presets {
|
|
7722
|
+
width: 282px;
|
|
7723
|
+
}
|
|
7724
|
+
.sia-date-panel__datetime-endpoints {
|
|
7725
|
+
grid-template-columns: minmax(0, 1fr);
|
|
7726
|
+
}
|
|
7727
|
+
.sia-date-panel__endpoint + .sia-date-panel__endpoint {
|
|
7728
|
+
border-inline-start: 0;
|
|
7729
|
+
border-top: 1px solid var(--sia-color-border);
|
|
7730
|
+
}
|
|
7731
|
+
.sia-date-panel--datetime-range.sia-date-panel--with-presets {
|
|
7732
|
+
display: block;
|
|
7733
|
+
}
|
|
7734
|
+
.sia-date-panel--datetime-range.sia-date-panel--with-presets > .sia-date-panel__body {
|
|
7735
|
+
display: block;
|
|
7736
|
+
}
|
|
7737
|
+
.sia-date-panel--datetime-range .sia-date-panel__presets {
|
|
7738
|
+
border-inline-end: 0;
|
|
7739
|
+
border-bottom: 1px solid var(--sia-color-border);
|
|
7740
|
+
}
|
|
7741
|
+
}
|
|
7668
7742
|
.sia-date-panel__time-columns > div {
|
|
7669
7743
|
height: 100%;
|
|
7670
7744
|
overflow: auto;
|
package/dist/index.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ import { B as ButtonProps, a as ButtonSize } from './Button-xLR4Yt57.cjs';
|
|
|
7
7
|
export { b as Button, c as ButtonVariant } from './Button-xLR4Yt57.cjs';
|
|
8
8
|
import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult } from './Select-Dxevc0f6.cjs';
|
|
9
9
|
export { e as Modal, f as ModalProps, g as ModalType, h as Select, i as SelectMode, j as SelectValue } from './Select-Dxevc0f6.cjs';
|
|
10
|
-
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
10
|
+
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-C9lTBQFX.cjs';
|
|
11
11
|
export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.cjs';
|
|
12
12
|
export { MarkdownEditor, MarkdownEditorMode, MarkdownEditorProps } from './markdown-editor.cjs';
|
|
13
13
|
import * as Monaco from 'monaco-editor';
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { B as ButtonProps, a as ButtonSize } from './Button-B59TIes7.js';
|
|
|
7
7
|
export { b as Button, c as ButtonVariant } from './Button-B59TIes7.js';
|
|
8
8
|
import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult } from './Select-tsENCXQI.js';
|
|
9
9
|
export { e as Modal, f as ModalProps, g as ModalType, h as Select, i as SelectMode, j as SelectValue } from './Select-tsENCXQI.js';
|
|
10
|
-
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
10
|
+
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-CQCGGkkt.js';
|
|
11
11
|
export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.js';
|
|
12
12
|
export { MarkdownEditor, MarkdownEditorMode, MarkdownEditorProps } from './markdown-editor.js';
|
|
13
13
|
import * as Monaco from 'monaco-editor';
|
package/dist/index.js
CHANGED
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
smoothSvgPath,
|
|
57
57
|
svgArcPath,
|
|
58
58
|
transferCompositeValue
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-NHGCGOF2.js";
|
|
60
60
|
import {
|
|
61
61
|
Badge,
|
|
62
62
|
Breadcrumb,
|
|
@@ -82,20 +82,20 @@ import {
|
|
|
82
82
|
Watermark,
|
|
83
83
|
message,
|
|
84
84
|
notification
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-WR5YBY2A.js";
|
|
86
86
|
import "./chunk-RX242MUO.js";
|
|
87
87
|
import {
|
|
88
88
|
MarkdownEditor
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-V4I32DPL.js";
|
|
90
90
|
import {
|
|
91
91
|
RichTextContent,
|
|
92
92
|
RichTextEditor
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-2EC653G5.js";
|
|
94
94
|
import {
|
|
95
95
|
DatePicker,
|
|
96
96
|
SelectDateRange,
|
|
97
97
|
TimePanel
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-DKQ5UCN6.js";
|
|
99
99
|
import {
|
|
100
100
|
Checkbox,
|
|
101
101
|
OverflowTags,
|
|
@@ -107,17 +107,17 @@ import {
|
|
|
107
107
|
Tree,
|
|
108
108
|
normalizeSelectionValues,
|
|
109
109
|
usePressFeedback
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-SX4LLT3H.js";
|
|
111
111
|
import {
|
|
112
112
|
Dropdown,
|
|
113
113
|
Input,
|
|
114
114
|
Menu,
|
|
115
115
|
Segmented,
|
|
116
116
|
Steps
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-23FQ5ARA.js";
|
|
118
118
|
import {
|
|
119
119
|
TextArea
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-J6BPKBEL.js";
|
|
121
121
|
import {
|
|
122
122
|
FILLED_ICON_NAMES,
|
|
123
123
|
ICON_NAMES,
|
|
@@ -128,13 +128,13 @@ import {
|
|
|
128
128
|
Skeleton,
|
|
129
129
|
useOverlayExitPlaceholder,
|
|
130
130
|
useOverlayLifecycle
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-G5EJJFUI.js";
|
|
132
132
|
import {
|
|
133
133
|
Button
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-PAWEP65C.js";
|
|
135
135
|
import {
|
|
136
136
|
useFloatingPlaceholder
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-OHAESA5R.js";
|
|
138
138
|
import {
|
|
139
139
|
ControlSizeContext,
|
|
140
140
|
FloatingScrollbarProvider,
|
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
usePlaceholderMode,
|
|
148
148
|
useScrollbarProximity,
|
|
149
149
|
withTitleTooltip
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-CUAXJCSH.js";
|
|
151
151
|
|
|
152
152
|
// src/components/CursorPreview.tsx
|
|
153
153
|
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
package/dist/markdown-editor.cjs
CHANGED
|
@@ -787,7 +787,7 @@ var PopupPortal = (0, import_react4.forwardRef)(function PopupPortal2({
|
|
|
787
787
|
cancelAnimationFrame(frame);
|
|
788
788
|
observer.disconnect();
|
|
789
789
|
};
|
|
790
|
-
}, [anchorRef, offset, motion.present, placement, viewportPadding]);
|
|
790
|
+
}, [anchorRef, offset, motion.present, placement, viewportPadding, position?.availableHeight, position?.placement]);
|
|
791
791
|
if (!motion.present || typeof document === "undefined") return null;
|
|
792
792
|
return (0, import_react_dom.createPortal)(
|
|
793
793
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
package/dist/markdown-editor.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MarkdownEditor
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-V4I32DPL.js";
|
|
4
|
+
import "./chunk-OHAESA5R.js";
|
|
5
5
|
import {
|
|
6
6
|
initializeDefaultScrollbars
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CUAXJCSH.js";
|
|
8
8
|
|
|
9
9
|
// src/markdown-editor.ts
|
|
10
10
|
initializeDefaultScrollbars();
|
|
@@ -809,7 +809,7 @@ var PopupPortal = (0, import_react4.forwardRef)(function PopupPortal2({
|
|
|
809
809
|
cancelAnimationFrame(frame);
|
|
810
810
|
observer.disconnect();
|
|
811
811
|
};
|
|
812
|
-
}, [anchorRef, offset, motion.present, placement, viewportPadding]);
|
|
812
|
+
}, [anchorRef, offset, motion.present, placement, viewportPadding, position?.availableHeight, position?.placement]);
|
|
813
813
|
if (!motion.present || typeof document === "undefined") return null;
|
|
814
814
|
return (0, import_react_dom.createPortal)(
|
|
815
815
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
package/dist/rich-text-editor.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RichTextContent,
|
|
3
3
|
RichTextEditor
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-2EC653G5.js";
|
|
5
|
+
import "./chunk-23FQ5ARA.js";
|
|
6
|
+
import "./chunk-J6BPKBEL.js";
|
|
7
|
+
import "./chunk-G5EJJFUI.js";
|
|
8
|
+
import "./chunk-PAWEP65C.js";
|
|
9
|
+
import "./chunk-OHAESA5R.js";
|
|
10
10
|
import {
|
|
11
11
|
initializeDefaultScrollbars
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CUAXJCSH.js";
|
|
13
13
|
|
|
14
14
|
// src/rich-text-editor.ts
|
|
15
15
|
initializeDefaultScrollbars();
|
|
@@ -71,7 +71,7 @@ interface DatePickerProps extends SharedDatePickerProps {
|
|
|
71
71
|
/** 纯日期选择后需要点击确定才提交;开启 showTime 的面板选择即时生效且不显示确定按钮,此属性不再参与。纯日期范围点选后立即保存合法值,此属性仅控制是否保留面板供确认关闭。 */
|
|
72
72
|
needConfirm?: boolean;
|
|
73
73
|
/**
|
|
74
|
-
* 组合时间选择:面板页脚显示日期、时间两个入口,点击时间入口在日历与“选择时间”滚轮视图(showSecond 为 true 时含秒列,选中行带时/分/秒单位)间切换;日期与时间点选均即时提交并同步输入框,面板保持打开供继续调整,点击外部或 Escape 收起。时间入口悬停显示清空图标,点击重置为 00:00:00 的未显式状态。值与显示按显式设定切换:defaultValue / value 携带时间、配置 showTime.defaultValue 或在时间视图点选(含 00:00:00)视为显式设定,值始终为 YYYY-MM-DD HH:mm[:ss];未显式设定且时间为零时值退为纯日期 YYYY-MM-DD
|
|
74
|
+
* 组合时间选择:面板页脚显示日期、时间两个入口,点击时间入口在日历与“选择时间”滚轮视图(showSecond 为 true 时含秒列,选中行带时/分/秒单位)间切换;日期与时间点选均即时提交并同步输入框,面板保持打开供继续调整,点击外部或 Escape 收起。时间入口悬停显示清空图标,点击重置为 00:00:00 的未显式状态。值与显示按显式设定切换:defaultValue / value 携带时间、配置 showTime.defaultValue 或在时间视图点选(含 00:00:00)视为显式设定,值始终为 YYYY-MM-DD HH:mm[:ss];未显式设定且时间为零时值退为纯日期 YYYY-MM-DD。范围选择固定左侧开始、右侧结束双面板,各自独立切换日期和时间视图,结束日期默认取 23:59(showSecond 为 true 时为 23:59:59)并可经时间入口调整,两端齐全且合法时即时提交;defaultValue 可用字符串或 [开始, 结束] 指定初始时间。
|
|
75
75
|
* @defaultValue false
|
|
76
76
|
*/
|
|
77
77
|
showTime?: DatePickerShowTime;
|
|
@@ -106,7 +106,7 @@ interface DatePickerProps extends SharedDatePickerProps {
|
|
|
106
106
|
/** 渲染面板底部的自定义扩展区域。 */
|
|
107
107
|
renderExtraFooter?: () => ReactNode;
|
|
108
108
|
}
|
|
109
|
-
/**
|
|
109
|
+
/** 日期区间选择的属性配置;已选范围和悬停预览按周行显示连续蓝色圆角背景。 */
|
|
110
110
|
interface DateRangePickerProps extends Omit<DatePickerProps, "value" | "defaultValue" | "onChange" | "placeholder" | "multiple" | "presets"> {
|
|
111
111
|
/** 当前值;作为受控属性时,需要在变更回调中同步更新。 */
|
|
112
112
|
value?: readonly [string, string];
|
|
@@ -141,12 +141,12 @@ interface DateRangePickerProps extends Omit<DatePickerProps, "value" | "defaultV
|
|
|
141
141
|
/** 值发生变化时调用;参数为新值及类型声明中列出的关联信息。 */
|
|
142
142
|
onChange?: (value: readonly [string, string]) => void;
|
|
143
143
|
}
|
|
144
|
-
/**
|
|
144
|
+
/** 日期范围选择;纯日期按两次点击组成范围,带时间时固定左右双面板编辑开始与结束,合法值即时提交,活动底线随编辑端点平滑移动。 */
|
|
145
145
|
declare function DateRangePicker({ value, defaultValue, placeholder, placeholderMode, separator, presets, maxRangeDays, allowEmpty, endpointDisabled, size: sizeProp, status, allowClear, needConfirm, showTime, showToday, open, defaultOpen, suffixIcon, minDate, maxDate, disabledDate, disabled, className, onCalendarChange, onChange, onOpenChange, formatValue, renderExtraFooter, ...props }: DateRangePickerProps): react.JSX.Element;
|
|
146
146
|
/** 日期选择组件。 */
|
|
147
147
|
declare function DatePicker({ value, defaultValue, picker, size: sizeProp, status, allowClear, multiple, needConfirm, showTime, showToday, open, defaultOpen, suffixIcon, minDate, maxDate, presets, disabledDate, disabled, className, onChange, onOpenChange, placeholder, placeholderMode, formatValue, renderExtraFooter, ...props }: DatePickerProps): react.JSX.Element;
|
|
148
148
|
declare namespace DatePicker {
|
|
149
|
-
/**
|
|
149
|
+
/** 日期区间选择器;带时间时固定左侧开始、右侧结束双面板,各侧页脚独立切换日期/时间视图,合法范围即时提交且保留面板供调整;纯日期支持在任一日历连续点选起止日期。 */
|
|
150
150
|
const RangePicker: typeof DateRangePicker;
|
|
151
151
|
}
|
|
152
152
|
|
|
@@ -71,7 +71,7 @@ interface DatePickerProps extends SharedDatePickerProps {
|
|
|
71
71
|
/** 纯日期选择后需要点击确定才提交;开启 showTime 的面板选择即时生效且不显示确定按钮,此属性不再参与。纯日期范围点选后立即保存合法值,此属性仅控制是否保留面板供确认关闭。 */
|
|
72
72
|
needConfirm?: boolean;
|
|
73
73
|
/**
|
|
74
|
-
* 组合时间选择:面板页脚显示日期、时间两个入口,点击时间入口在日历与“选择时间”滚轮视图(showSecond 为 true 时含秒列,选中行带时/分/秒单位)间切换;日期与时间点选均即时提交并同步输入框,面板保持打开供继续调整,点击外部或 Escape 收起。时间入口悬停显示清空图标,点击重置为 00:00:00 的未显式状态。值与显示按显式设定切换:defaultValue / value 携带时间、配置 showTime.defaultValue 或在时间视图点选(含 00:00:00)视为显式设定,值始终为 YYYY-MM-DD HH:mm[:ss];未显式设定且时间为零时值退为纯日期 YYYY-MM-DD
|
|
74
|
+
* 组合时间选择:面板页脚显示日期、时间两个入口,点击时间入口在日历与“选择时间”滚轮视图(showSecond 为 true 时含秒列,选中行带时/分/秒单位)间切换;日期与时间点选均即时提交并同步输入框,面板保持打开供继续调整,点击外部或 Escape 收起。时间入口悬停显示清空图标,点击重置为 00:00:00 的未显式状态。值与显示按显式设定切换:defaultValue / value 携带时间、配置 showTime.defaultValue 或在时间视图点选(含 00:00:00)视为显式设定,值始终为 YYYY-MM-DD HH:mm[:ss];未显式设定且时间为零时值退为纯日期 YYYY-MM-DD。范围选择固定左侧开始、右侧结束双面板,各自独立切换日期和时间视图,结束日期默认取 23:59(showSecond 为 true 时为 23:59:59)并可经时间入口调整,两端齐全且合法时即时提交;defaultValue 可用字符串或 [开始, 结束] 指定初始时间。
|
|
75
75
|
* @defaultValue false
|
|
76
76
|
*/
|
|
77
77
|
showTime?: DatePickerShowTime;
|
|
@@ -106,7 +106,7 @@ interface DatePickerProps extends SharedDatePickerProps {
|
|
|
106
106
|
/** 渲染面板底部的自定义扩展区域。 */
|
|
107
107
|
renderExtraFooter?: () => ReactNode;
|
|
108
108
|
}
|
|
109
|
-
/**
|
|
109
|
+
/** 日期区间选择的属性配置;已选范围和悬停预览按周行显示连续蓝色圆角背景。 */
|
|
110
110
|
interface DateRangePickerProps extends Omit<DatePickerProps, "value" | "defaultValue" | "onChange" | "placeholder" | "multiple" | "presets"> {
|
|
111
111
|
/** 当前值;作为受控属性时,需要在变更回调中同步更新。 */
|
|
112
112
|
value?: readonly [string, string];
|
|
@@ -141,12 +141,12 @@ interface DateRangePickerProps extends Omit<DatePickerProps, "value" | "defaultV
|
|
|
141
141
|
/** 值发生变化时调用;参数为新值及类型声明中列出的关联信息。 */
|
|
142
142
|
onChange?: (value: readonly [string, string]) => void;
|
|
143
143
|
}
|
|
144
|
-
/**
|
|
144
|
+
/** 日期范围选择;纯日期按两次点击组成范围,带时间时固定左右双面板编辑开始与结束,合法值即时提交,活动底线随编辑端点平滑移动。 */
|
|
145
145
|
declare function DateRangePicker({ value, defaultValue, placeholder, placeholderMode, separator, presets, maxRangeDays, allowEmpty, endpointDisabled, size: sizeProp, status, allowClear, needConfirm, showTime, showToday, open, defaultOpen, suffixIcon, minDate, maxDate, disabledDate, disabled, className, onCalendarChange, onChange, onOpenChange, formatValue, renderExtraFooter, ...props }: DateRangePickerProps): react.JSX.Element;
|
|
146
146
|
/** 日期选择组件。 */
|
|
147
147
|
declare function DatePicker({ value, defaultValue, picker, size: sizeProp, status, allowClear, multiple, needConfirm, showTime, showToday, open, defaultOpen, suffixIcon, minDate, maxDate, presets, disabledDate, disabled, className, onChange, onOpenChange, placeholder, placeholderMode, formatValue, renderExtraFooter, ...props }: DatePickerProps): react.JSX.Element;
|
|
148
148
|
declare namespace DatePicker {
|
|
149
|
-
/**
|
|
149
|
+
/** 日期区间选择器;带时间时固定左侧开始、右侧结束双面板,各侧页脚独立切换日期/时间视图,合法范围即时提交且保留面板供调整;纯日期支持在任一日历连续点选起止日期。 */
|
|
150
150
|
const RangePicker: typeof DateRangePicker;
|
|
151
151
|
}
|
|
152
152
|
|