antd-mobile 5.41.0-alpha.0 → 5.41.0-alpha.1
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/2x/bundle/antd-mobile.cjs.development.js +75 -69
- package/2x/bundle/antd-mobile.cjs.js +4 -4
- package/2x/bundle/antd-mobile.es.development.js +75 -69
- package/2x/bundle/antd-mobile.es.js +2763 -2758
- package/2x/bundle/antd-mobile.umd.development.js +75 -69
- package/2x/bundle/antd-mobile.umd.js +4 -4
- package/2x/cjs/components/calendar/calendar.d.ts +4 -1
- package/2x/cjs/components/calendar/calendar.js +18 -11
- package/2x/es/components/calendar/calendar.d.ts +4 -1
- package/2x/es/components/calendar/calendar.js +19 -12
- package/2x/package.json +1 -1
- package/bundle/antd-mobile.cjs.development.js +75 -69
- package/bundle/antd-mobile.cjs.js +4 -4
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +75 -69
- package/bundle/antd-mobile.es.js +2763 -2758
- package/bundle/antd-mobile.umd.development.js +75 -69
- package/bundle/antd-mobile.umd.js +4 -4
- package/cjs/components/calendar/calendar.d.ts +4 -1
- package/cjs/components/calendar/calendar.js +18 -11
- package/es/components/calendar/calendar.d.ts +4 -1
- package/es/components/calendar/calendar.js +19 -12
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -9667,6 +9667,73 @@ const Button = forwardRef((p, ref2) => {
|
|
|
9667
9667
|
className: `${classPrefix$1h}-loading-wrapper`
|
|
9668
9668
|
}, props.loadingIcon, props.loadingText) : React__default.createElement("span", null, props.children)));
|
|
9669
9669
|
});
|
|
9670
|
+
var isoWeek$1 = { exports: {} };
|
|
9671
|
+
(function(module, exports) {
|
|
9672
|
+
!function(e2, t) {
|
|
9673
|
+
module.exports = t();
|
|
9674
|
+
}(commonjsGlobal, function() {
|
|
9675
|
+
var e2 = "day";
|
|
9676
|
+
return function(t, i2, s) {
|
|
9677
|
+
var a = function(t2) {
|
|
9678
|
+
return t2.add(4 - t2.isoWeekday(), e2);
|
|
9679
|
+
}, d = i2.prototype;
|
|
9680
|
+
d.isoWeekYear = function() {
|
|
9681
|
+
return a(this).year();
|
|
9682
|
+
}, d.isoWeek = function(t2) {
|
|
9683
|
+
if (!this.$utils().u(t2))
|
|
9684
|
+
return this.add(7 * (t2 - this.isoWeek()), e2);
|
|
9685
|
+
var i3, d2, n3, o, r = a(this), u = (i3 = this.isoWeekYear(), d2 = this.$u, n3 = (d2 ? s.utc : s)().year(i3).startOf("year"), o = 4 - n3.isoWeekday(), n3.isoWeekday() > 4 && (o += 7), n3.add(o, e2));
|
|
9686
|
+
return r.diff(u, "week") + 1;
|
|
9687
|
+
}, d.isoWeekday = function(e3) {
|
|
9688
|
+
return this.$utils().u(e3) ? this.day() || 7 : this.day(this.day() % 7 ? e3 : e3 - 7);
|
|
9689
|
+
};
|
|
9690
|
+
var n2 = d.startOf;
|
|
9691
|
+
d.startOf = function(e3, t2) {
|
|
9692
|
+
var i3 = this.$utils(), s2 = !!i3.u(t2) || t2;
|
|
9693
|
+
return "isoweek" === i3.p(e3) ? s2 ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : n2.bind(this)(e3, t2);
|
|
9694
|
+
};
|
|
9695
|
+
};
|
|
9696
|
+
});
|
|
9697
|
+
})(isoWeek$1);
|
|
9698
|
+
var isoWeekExports = isoWeek$1.exports;
|
|
9699
|
+
const isoWeek = /* @__PURE__ */ getDefaultExportFromCjs(isoWeekExports);
|
|
9700
|
+
function devWarning(component, message) {
|
|
9701
|
+
{
|
|
9702
|
+
console.warn(`[antd-mobile: ${component}] ${message}`);
|
|
9703
|
+
}
|
|
9704
|
+
}
|
|
9705
|
+
function devError(component, message) {
|
|
9706
|
+
{
|
|
9707
|
+
console.error(`[antd-mobile: ${component}] ${message}`);
|
|
9708
|
+
}
|
|
9709
|
+
}
|
|
9710
|
+
function replaceMessage$1(template, kv) {
|
|
9711
|
+
return template.replace(/\$\{\w+\}/g, (str) => {
|
|
9712
|
+
const key = str.slice(2, -1);
|
|
9713
|
+
return kv[key];
|
|
9714
|
+
});
|
|
9715
|
+
}
|
|
9716
|
+
function usePropsValue(options) {
|
|
9717
|
+
const {
|
|
9718
|
+
value,
|
|
9719
|
+
defaultValue,
|
|
9720
|
+
onChange
|
|
9721
|
+
} = options;
|
|
9722
|
+
const update2 = useUpdate$1();
|
|
9723
|
+
const stateRef = useRef(value !== void 0 ? value : defaultValue);
|
|
9724
|
+
if (value !== void 0) {
|
|
9725
|
+
stateRef.current = value;
|
|
9726
|
+
}
|
|
9727
|
+
const setState = useMemoizedFn((v, forceTrigger = false) => {
|
|
9728
|
+
const nextValue = typeof v === "function" ? v(stateRef.current) : v;
|
|
9729
|
+
if (!forceTrigger && nextValue === stateRef.current)
|
|
9730
|
+
return;
|
|
9731
|
+
stateRef.current = nextValue;
|
|
9732
|
+
update2();
|
|
9733
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange(nextValue);
|
|
9734
|
+
});
|
|
9735
|
+
return [stateRef.current, setState];
|
|
9736
|
+
}
|
|
9670
9737
|
const ArrowLeft = () => {
|
|
9671
9738
|
return React__default.createElement("svg", {
|
|
9672
9739
|
height: "1em",
|
|
@@ -9721,73 +9788,6 @@ const ArrowLeftDouble = () => {
|
|
|
9721
9788
|
d: "M19.5305114,17.0699744 C19.0173831,17.5315665 18.9752295,18.3220903 19.436308,18.8357433 C19.4660129,18.8688164 19.4974585,18.9002801 19.5305113,18.9300007 L29.4833057,27.2801611 C30.1234001,27.8559077 30.1759552,28.8420707 29.6007967,29.4827774 C29.0256382,30.1235263 28.0404824,30.1761351 27.400388,29.6003885 L17.4475937,21.2502703 C17.3320874,21.1463692 17.2222026,21.036372 17.1184079,20.920748 C15.5069703,19.1256817 15.6543605,16.3628317 17.4475933,14.7497465 L27.4003877,6.39962828 C28.0404821,5.82383957 29.0256378,5.87649058 29.6007963,6.51723942 C30.1759548,7.1579461 30.1233997,8.14410915 29.4833053,8.7198557 L19.5305114,17.0699744 Z"
|
|
9722
9789
|
}))))));
|
|
9723
9790
|
};
|
|
9724
|
-
var isoWeek$1 = { exports: {} };
|
|
9725
|
-
(function(module, exports) {
|
|
9726
|
-
!function(e2, t) {
|
|
9727
|
-
module.exports = t();
|
|
9728
|
-
}(commonjsGlobal, function() {
|
|
9729
|
-
var e2 = "day";
|
|
9730
|
-
return function(t, i2, s) {
|
|
9731
|
-
var a = function(t2) {
|
|
9732
|
-
return t2.add(4 - t2.isoWeekday(), e2);
|
|
9733
|
-
}, d = i2.prototype;
|
|
9734
|
-
d.isoWeekYear = function() {
|
|
9735
|
-
return a(this).year();
|
|
9736
|
-
}, d.isoWeek = function(t2) {
|
|
9737
|
-
if (!this.$utils().u(t2))
|
|
9738
|
-
return this.add(7 * (t2 - this.isoWeek()), e2);
|
|
9739
|
-
var i3, d2, n3, o, r = a(this), u = (i3 = this.isoWeekYear(), d2 = this.$u, n3 = (d2 ? s.utc : s)().year(i3).startOf("year"), o = 4 - n3.isoWeekday(), n3.isoWeekday() > 4 && (o += 7), n3.add(o, e2));
|
|
9740
|
-
return r.diff(u, "week") + 1;
|
|
9741
|
-
}, d.isoWeekday = function(e3) {
|
|
9742
|
-
return this.$utils().u(e3) ? this.day() || 7 : this.day(this.day() % 7 ? e3 : e3 - 7);
|
|
9743
|
-
};
|
|
9744
|
-
var n2 = d.startOf;
|
|
9745
|
-
d.startOf = function(e3, t2) {
|
|
9746
|
-
var i3 = this.$utils(), s2 = !!i3.u(t2) || t2;
|
|
9747
|
-
return "isoweek" === i3.p(e3) ? s2 ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : n2.bind(this)(e3, t2);
|
|
9748
|
-
};
|
|
9749
|
-
};
|
|
9750
|
-
});
|
|
9751
|
-
})(isoWeek$1);
|
|
9752
|
-
var isoWeekExports = isoWeek$1.exports;
|
|
9753
|
-
const isoWeek = /* @__PURE__ */ getDefaultExportFromCjs(isoWeekExports);
|
|
9754
|
-
function usePropsValue(options) {
|
|
9755
|
-
const {
|
|
9756
|
-
value,
|
|
9757
|
-
defaultValue,
|
|
9758
|
-
onChange
|
|
9759
|
-
} = options;
|
|
9760
|
-
const update2 = useUpdate$1();
|
|
9761
|
-
const stateRef = useRef(value !== void 0 ? value : defaultValue);
|
|
9762
|
-
if (value !== void 0) {
|
|
9763
|
-
stateRef.current = value;
|
|
9764
|
-
}
|
|
9765
|
-
const setState = useMemoizedFn((v, forceTrigger = false) => {
|
|
9766
|
-
const nextValue = typeof v === "function" ? v(stateRef.current) : v;
|
|
9767
|
-
if (!forceTrigger && nextValue === stateRef.current)
|
|
9768
|
-
return;
|
|
9769
|
-
stateRef.current = nextValue;
|
|
9770
|
-
update2();
|
|
9771
|
-
return onChange === null || onChange === void 0 ? void 0 : onChange(nextValue);
|
|
9772
|
-
});
|
|
9773
|
-
return [stateRef.current, setState];
|
|
9774
|
-
}
|
|
9775
|
-
function replaceMessage$1(template, kv) {
|
|
9776
|
-
return template.replace(/\$\{\w+\}/g, (str) => {
|
|
9777
|
-
const key = str.slice(2, -1);
|
|
9778
|
-
return kv[key];
|
|
9779
|
-
});
|
|
9780
|
-
}
|
|
9781
|
-
function devWarning(component, message) {
|
|
9782
|
-
{
|
|
9783
|
-
console.warn(`[antd-mobile: ${component}] ${message}`);
|
|
9784
|
-
}
|
|
9785
|
-
}
|
|
9786
|
-
function devError(component, message) {
|
|
9787
|
-
{
|
|
9788
|
-
console.error(`[antd-mobile: ${component}] ${message}`);
|
|
9789
|
-
}
|
|
9790
|
-
}
|
|
9791
9791
|
function convertValueToRange$1(selectionMode, value) {
|
|
9792
9792
|
if (selectionMode === void 0 || value === null)
|
|
9793
9793
|
return null;
|
|
@@ -9929,7 +9929,7 @@ const Calendar = forwardRef((p, ref2) => {
|
|
|
9929
9929
|
}
|
|
9930
9930
|
const inThisMonth = d.month() === current.month();
|
|
9931
9931
|
const disabled = props.shouldDisableDate ? props.shouldDisableDate(d.toDate()) : maxDay && d.isAfter(maxDay, "day") || minDay && d.isBefore(minDay, "day");
|
|
9932
|
-
|
|
9932
|
+
const originalCell = React__default.createElement("div", {
|
|
9933
9933
|
key: d.valueOf(),
|
|
9934
9934
|
className: classNames(`${classPrefix$1g}-cell`, (disabled || !inThisMonth) && `${classPrefix$1g}-cell-disabled`, inThisMonth && {
|
|
9935
9935
|
[`${classPrefix$1g}-cell-today`]: d.isSame(today, "day"),
|
|
@@ -9987,7 +9987,13 @@ const Calendar = forwardRef((p, ref2) => {
|
|
|
9987
9987
|
className: `${classPrefix$1g}-cell-top`
|
|
9988
9988
|
}, props.renderDate ? props.renderDate(d.toDate()) : d.date()), React__default.createElement("div", {
|
|
9989
9989
|
className: `${classPrefix$1g}-cell-bottom`
|
|
9990
|
-
}, (_a = props.renderLabel) === null || _a === void 0 ? void 0 : _a.call(props, d.toDate())))
|
|
9990
|
+
}, (_a = props.renderLabel) === null || _a === void 0 ? void 0 : _a.call(props, d.toDate())));
|
|
9991
|
+
const cellWithKey = props.cellRender ? React__default.createElement(React__default.Fragment, {
|
|
9992
|
+
key: d.valueOf()
|
|
9993
|
+
}, props.cellRender(originalCell, {
|
|
9994
|
+
date: d.toDate()
|
|
9995
|
+
})) : originalCell;
|
|
9996
|
+
cells.push(cellWithKey);
|
|
9991
9997
|
iterator = iterator.add(1, "day");
|
|
9992
9998
|
}
|
|
9993
9999
|
return cells;
|