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
|
@@ -9685,6 +9685,73 @@ const Button = React$2.forwardRef((p, ref2) => {
|
|
|
9685
9685
|
className: `${classPrefix$1h}-loading-wrapper`
|
|
9686
9686
|
}, props.loadingIcon, props.loadingText) : React$2.createElement("span", null, props.children)));
|
|
9687
9687
|
});
|
|
9688
|
+
var isoWeek$1 = { exports: {} };
|
|
9689
|
+
(function(module2, exports2) {
|
|
9690
|
+
!function(e2, t) {
|
|
9691
|
+
module2.exports = t();
|
|
9692
|
+
}(commonjsGlobal, function() {
|
|
9693
|
+
var e2 = "day";
|
|
9694
|
+
return function(t, i2, s) {
|
|
9695
|
+
var a = function(t2) {
|
|
9696
|
+
return t2.add(4 - t2.isoWeekday(), e2);
|
|
9697
|
+
}, d = i2.prototype;
|
|
9698
|
+
d.isoWeekYear = function() {
|
|
9699
|
+
return a(this).year();
|
|
9700
|
+
}, d.isoWeek = function(t2) {
|
|
9701
|
+
if (!this.$utils().u(t2))
|
|
9702
|
+
return this.add(7 * (t2 - this.isoWeek()), e2);
|
|
9703
|
+
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));
|
|
9704
|
+
return r.diff(u, "week") + 1;
|
|
9705
|
+
}, d.isoWeekday = function(e3) {
|
|
9706
|
+
return this.$utils().u(e3) ? this.day() || 7 : this.day(this.day() % 7 ? e3 : e3 - 7);
|
|
9707
|
+
};
|
|
9708
|
+
var n2 = d.startOf;
|
|
9709
|
+
d.startOf = function(e3, t2) {
|
|
9710
|
+
var i3 = this.$utils(), s2 = !!i3.u(t2) || t2;
|
|
9711
|
+
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);
|
|
9712
|
+
};
|
|
9713
|
+
};
|
|
9714
|
+
});
|
|
9715
|
+
})(isoWeek$1);
|
|
9716
|
+
var isoWeekExports = isoWeek$1.exports;
|
|
9717
|
+
const isoWeek = /* @__PURE__ */ getDefaultExportFromCjs(isoWeekExports);
|
|
9718
|
+
function devWarning(component, message) {
|
|
9719
|
+
{
|
|
9720
|
+
console.warn(`[antd-mobile: ${component}] ${message}`);
|
|
9721
|
+
}
|
|
9722
|
+
}
|
|
9723
|
+
function devError(component, message) {
|
|
9724
|
+
{
|
|
9725
|
+
console.error(`[antd-mobile: ${component}] ${message}`);
|
|
9726
|
+
}
|
|
9727
|
+
}
|
|
9728
|
+
function replaceMessage$1(template, kv) {
|
|
9729
|
+
return template.replace(/\$\{\w+\}/g, (str) => {
|
|
9730
|
+
const key = str.slice(2, -1);
|
|
9731
|
+
return kv[key];
|
|
9732
|
+
});
|
|
9733
|
+
}
|
|
9734
|
+
function usePropsValue(options) {
|
|
9735
|
+
const {
|
|
9736
|
+
value,
|
|
9737
|
+
defaultValue,
|
|
9738
|
+
onChange
|
|
9739
|
+
} = options;
|
|
9740
|
+
const update2 = useUpdate$1();
|
|
9741
|
+
const stateRef = React$2.useRef(value !== void 0 ? value : defaultValue);
|
|
9742
|
+
if (value !== void 0) {
|
|
9743
|
+
stateRef.current = value;
|
|
9744
|
+
}
|
|
9745
|
+
const setState = useMemoizedFn((v, forceTrigger = false) => {
|
|
9746
|
+
const nextValue = typeof v === "function" ? v(stateRef.current) : v;
|
|
9747
|
+
if (!forceTrigger && nextValue === stateRef.current)
|
|
9748
|
+
return;
|
|
9749
|
+
stateRef.current = nextValue;
|
|
9750
|
+
update2();
|
|
9751
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange(nextValue);
|
|
9752
|
+
});
|
|
9753
|
+
return [stateRef.current, setState];
|
|
9754
|
+
}
|
|
9688
9755
|
const ArrowLeft = () => {
|
|
9689
9756
|
return React$2.createElement("svg", {
|
|
9690
9757
|
height: "1em",
|
|
@@ -9739,73 +9806,6 @@ const ArrowLeftDouble = () => {
|
|
|
9739
9806
|
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"
|
|
9740
9807
|
}))))));
|
|
9741
9808
|
};
|
|
9742
|
-
var isoWeek$1 = { exports: {} };
|
|
9743
|
-
(function(module2, exports2) {
|
|
9744
|
-
!function(e2, t) {
|
|
9745
|
-
module2.exports = t();
|
|
9746
|
-
}(commonjsGlobal, function() {
|
|
9747
|
-
var e2 = "day";
|
|
9748
|
-
return function(t, i2, s) {
|
|
9749
|
-
var a = function(t2) {
|
|
9750
|
-
return t2.add(4 - t2.isoWeekday(), e2);
|
|
9751
|
-
}, d = i2.prototype;
|
|
9752
|
-
d.isoWeekYear = function() {
|
|
9753
|
-
return a(this).year();
|
|
9754
|
-
}, d.isoWeek = function(t2) {
|
|
9755
|
-
if (!this.$utils().u(t2))
|
|
9756
|
-
return this.add(7 * (t2 - this.isoWeek()), e2);
|
|
9757
|
-
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));
|
|
9758
|
-
return r.diff(u, "week") + 1;
|
|
9759
|
-
}, d.isoWeekday = function(e3) {
|
|
9760
|
-
return this.$utils().u(e3) ? this.day() || 7 : this.day(this.day() % 7 ? e3 : e3 - 7);
|
|
9761
|
-
};
|
|
9762
|
-
var n2 = d.startOf;
|
|
9763
|
-
d.startOf = function(e3, t2) {
|
|
9764
|
-
var i3 = this.$utils(), s2 = !!i3.u(t2) || t2;
|
|
9765
|
-
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);
|
|
9766
|
-
};
|
|
9767
|
-
};
|
|
9768
|
-
});
|
|
9769
|
-
})(isoWeek$1);
|
|
9770
|
-
var isoWeekExports = isoWeek$1.exports;
|
|
9771
|
-
const isoWeek = /* @__PURE__ */ getDefaultExportFromCjs(isoWeekExports);
|
|
9772
|
-
function usePropsValue(options) {
|
|
9773
|
-
const {
|
|
9774
|
-
value,
|
|
9775
|
-
defaultValue,
|
|
9776
|
-
onChange
|
|
9777
|
-
} = options;
|
|
9778
|
-
const update2 = useUpdate$1();
|
|
9779
|
-
const stateRef = React$2.useRef(value !== void 0 ? value : defaultValue);
|
|
9780
|
-
if (value !== void 0) {
|
|
9781
|
-
stateRef.current = value;
|
|
9782
|
-
}
|
|
9783
|
-
const setState = useMemoizedFn((v, forceTrigger = false) => {
|
|
9784
|
-
const nextValue = typeof v === "function" ? v(stateRef.current) : v;
|
|
9785
|
-
if (!forceTrigger && nextValue === stateRef.current)
|
|
9786
|
-
return;
|
|
9787
|
-
stateRef.current = nextValue;
|
|
9788
|
-
update2();
|
|
9789
|
-
return onChange === null || onChange === void 0 ? void 0 : onChange(nextValue);
|
|
9790
|
-
});
|
|
9791
|
-
return [stateRef.current, setState];
|
|
9792
|
-
}
|
|
9793
|
-
function replaceMessage$1(template, kv) {
|
|
9794
|
-
return template.replace(/\$\{\w+\}/g, (str) => {
|
|
9795
|
-
const key = str.slice(2, -1);
|
|
9796
|
-
return kv[key];
|
|
9797
|
-
});
|
|
9798
|
-
}
|
|
9799
|
-
function devWarning(component, message) {
|
|
9800
|
-
{
|
|
9801
|
-
console.warn(`[antd-mobile: ${component}] ${message}`);
|
|
9802
|
-
}
|
|
9803
|
-
}
|
|
9804
|
-
function devError(component, message) {
|
|
9805
|
-
{
|
|
9806
|
-
console.error(`[antd-mobile: ${component}] ${message}`);
|
|
9807
|
-
}
|
|
9808
|
-
}
|
|
9809
9809
|
function convertValueToRange$1(selectionMode, value) {
|
|
9810
9810
|
if (selectionMode === void 0 || value === null)
|
|
9811
9811
|
return null;
|
|
@@ -9947,7 +9947,7 @@ const Calendar = React$2.forwardRef((p, ref2) => {
|
|
|
9947
9947
|
}
|
|
9948
9948
|
const inThisMonth = d.month() === current.month();
|
|
9949
9949
|
const disabled = props.shouldDisableDate ? props.shouldDisableDate(d.toDate()) : maxDay && d.isAfter(maxDay, "day") || minDay && d.isBefore(minDay, "day");
|
|
9950
|
-
|
|
9950
|
+
const originalCell = React$2.createElement("div", {
|
|
9951
9951
|
key: d.valueOf(),
|
|
9952
9952
|
className: classNames(`${classPrefix$1g}-cell`, (disabled || !inThisMonth) && `${classPrefix$1g}-cell-disabled`, inThisMonth && {
|
|
9953
9953
|
[`${classPrefix$1g}-cell-today`]: d.isSame(today, "day"),
|
|
@@ -10005,7 +10005,13 @@ const Calendar = React$2.forwardRef((p, ref2) => {
|
|
|
10005
10005
|
className: `${classPrefix$1g}-cell-top`
|
|
10006
10006
|
}, props.renderDate ? props.renderDate(d.toDate()) : d.date()), React$2.createElement("div", {
|
|
10007
10007
|
className: `${classPrefix$1g}-cell-bottom`
|
|
10008
|
-
}, (_a = props.renderLabel) === null || _a === void 0 ? void 0 : _a.call(props, d.toDate())))
|
|
10008
|
+
}, (_a = props.renderLabel) === null || _a === void 0 ? void 0 : _a.call(props, d.toDate())));
|
|
10009
|
+
const cellWithKey = props.cellRender ? React$2.createElement(React$2.Fragment, {
|
|
10010
|
+
key: d.valueOf()
|
|
10011
|
+
}, props.cellRender(originalCell, {
|
|
10012
|
+
date: d.toDate()
|
|
10013
|
+
})) : originalCell;
|
|
10014
|
+
cells.push(cellWithKey);
|
|
10009
10015
|
iterator = iterator.add(1, "day");
|
|
10010
10016
|
}
|
|
10011
10017
|
return cells;
|