antd-mobile 5.23.0 → 5.24.0
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 +167 -15
- package/2x/bundle/antd-mobile.cjs.js +8 -8
- package/2x/bundle/antd-mobile.compatible.umd.js +5364 -5241
- package/2x/bundle/antd-mobile.es.development.js +167 -15
- package/2x/bundle/antd-mobile.es.js +4345 -4242
- package/2x/bundle/antd-mobile.umd.development.js +167 -15
- package/2x/bundle/antd-mobile.umd.js +8 -8
- package/2x/bundle/style.css +9 -4
- package/2x/cjs/components/calendar/calendar.d.ts +3 -5
- package/2x/cjs/components/calendar/calendar.js +27 -5
- package/2x/cjs/components/calendar/convert.d.ts +6 -0
- package/2x/cjs/components/calendar/convert.js +9 -0
- package/2x/cjs/components/ellipsis/ellipsis.js +16 -7
- package/2x/cjs/components/form/form-item.css +0 -1
- package/2x/cjs/components/form/form.css +9 -3
- package/2x/cjs/components/form/form.d.ts +2 -2
- package/2x/cjs/components/form/index.css +9 -4
- package/2x/cjs/components/form/index.d.ts +1 -1
- package/2x/cjs/components/popover/popover.js +2 -2
- package/2x/cjs/components/stepper/stepper.js +2 -1
- package/2x/cjs/components/swiper/swiper.js +9 -0
- package/2x/es/components/calendar/calendar.d.ts +3 -5
- package/2x/es/components/calendar/calendar.js +29 -6
- package/2x/es/components/calendar/convert.d.ts +6 -0
- package/2x/es/components/calendar/convert.js +4 -0
- package/2x/es/components/ellipsis/ellipsis.js +14 -8
- package/2x/es/components/form/form-item.css +0 -1
- package/2x/es/components/form/form.css +9 -3
- package/2x/es/components/form/form.d.ts +2 -2
- package/2x/es/components/form/index.css +9 -4
- package/2x/es/components/form/index.d.ts +1 -1
- package/2x/es/components/popover/popover.js +2 -2
- package/2x/es/components/stepper/stepper.js +2 -1
- package/2x/es/components/swiper/swiper.js +9 -0
- package/2x/package.json +2 -1
- package/2x/umd/antd-mobile.js +5364 -5241
- package/bundle/antd-mobile.cjs.development.js +167 -15
- package/bundle/antd-mobile.cjs.js +8 -8
- package/bundle/antd-mobile.compatible.umd.js +5364 -5241
- package/bundle/antd-mobile.es.development.js +167 -15
- package/bundle/antd-mobile.es.js +4345 -4242
- package/bundle/antd-mobile.umd.development.js +167 -15
- package/bundle/antd-mobile.umd.js +8 -8
- package/bundle/style.css +1 -1
- package/cjs/components/calendar/calendar.d.ts +3 -5
- package/cjs/components/calendar/calendar.js +27 -5
- package/cjs/components/calendar/convert.d.ts +6 -0
- package/cjs/components/calendar/convert.js +9 -0
- package/cjs/components/ellipsis/ellipsis.js +16 -7
- package/cjs/components/form/form-item.css +0 -1
- package/cjs/components/form/form.css +8 -3
- package/cjs/components/form/form.d.ts +2 -2
- package/cjs/components/form/index.css +8 -4
- package/cjs/components/form/index.d.ts +1 -1
- package/cjs/components/popover/popover.js +2 -2
- package/cjs/components/stepper/stepper.js +2 -1
- package/cjs/components/swiper/swiper.js +9 -0
- package/es/components/calendar/calendar.d.ts +3 -5
- package/es/components/calendar/calendar.js +29 -6
- package/es/components/calendar/convert.d.ts +6 -0
- package/es/components/calendar/convert.js +4 -0
- package/es/components/ellipsis/ellipsis.js +14 -8
- package/es/components/form/form-item.css +0 -1
- package/es/components/form/form.css +8 -3
- package/es/components/form/form.d.ts +2 -2
- package/es/components/form/index.css +8 -4
- package/es/components/form/index.d.ts +1 -1
- package/es/components/popover/popover.js +2 -2
- package/es/components/stepper/stepper.js +2 -1
- package/es/components/swiper/swiper.js +9 -0
- package/package.json +2 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
.adm-form {
|
|
2
|
-
--border-inner: solid 2px var(--adm-color
|
|
3
|
-
--border-top: solid 2px var(--adm-color
|
|
4
|
-
--border-bottom: solid 2px var(--adm-color
|
|
2
|
+
--border-inner: solid 2px var(--adm-border-color);
|
|
3
|
+
--border-top: solid 2px var(--adm-border-color);
|
|
4
|
+
--border-bottom: solid 2px var(--adm-border-color);
|
|
5
|
+
--prefix-width: 6.8em;
|
|
5
6
|
---border-inner: var(--border-inner);
|
|
6
7
|
---border-top: var(--border-top);
|
|
7
8
|
---border-bottom: var(--border-bottom);
|
|
9
|
+
---prefix-width: var(--prefix-width);
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
.adm-form .adm-list.adm-list {
|
|
@@ -19,6 +21,10 @@
|
|
|
19
21
|
padding: 40px 24px;
|
|
20
22
|
}
|
|
21
23
|
|
|
24
|
+
.adm-form .adm-form-item-horizontal.adm-list-item {
|
|
25
|
+
--prefix-width: var(---prefix-width);
|
|
26
|
+
}
|
|
27
|
+
|
|
22
28
|
.adm-form-list-operation {
|
|
23
29
|
text-align: center;
|
|
24
30
|
color: #1677ff;
|
|
@@ -93,7 +99,6 @@
|
|
|
93
99
|
|
|
94
100
|
.adm-form-item.adm-form-item-horizontal.adm-list-item {
|
|
95
101
|
--align-items: stretch;
|
|
96
|
-
--prefix-width: 6.8em;
|
|
97
102
|
}
|
|
98
103
|
|
|
99
104
|
.adm-form-item.adm-form-item-horizontal .adm-list-item-content-prefix {
|
|
@@ -9,7 +9,7 @@ export type { ValidateMessages, FieldData, NamePath, } from 'rc-field-form/es/in
|
|
|
9
9
|
export type { FormArrayField, FormArrayOperation, FormArrayProps, } from './form-array';
|
|
10
10
|
declare const _default: import("react").ForwardRefExoticComponent<Pick<import("rc-field-form").FormProps<any>, "children" | "form" | "name" | "initialValues" | "preserve" | "validateMessages" | "validateTrigger" | "onFieldsChange" | "onFinish" | "onFinishFailed" | "onValuesChange"> & {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
style?: (import("react").CSSProperties & Partial<Record<"--border-bottom" | "--border-inner" | "--border-top", string>>) | undefined;
|
|
12
|
+
style?: (import("react").CSSProperties & Partial<Record<"--border-bottom" | "--border-inner" | "--border-top" | "--prefix-width", string>>) | undefined;
|
|
13
13
|
tabIndex?: number | undefined;
|
|
14
14
|
} & import("react").AriaAttributes & Partial<import("./context").FormContextType> & {
|
|
15
15
|
footer?: import("react").ReactNode;
|
|
@@ -139,11 +139,11 @@ export const Popover = forwardRef((p, ref) => {
|
|
|
139
139
|
useClickAway(() => {
|
|
140
140
|
if (!props.trigger) return;
|
|
141
141
|
setVisible(false);
|
|
142
|
-
}, () => {
|
|
142
|
+
}, [() => {
|
|
143
143
|
var _a;
|
|
144
144
|
|
|
145
145
|
return (_a = targetRef.current) === null || _a === void 0 ? void 0 : _a.element;
|
|
146
|
-
});
|
|
146
|
+
}, floatingRef], ['click', 'touchmove']);
|
|
147
147
|
const shouldRender = useShouldRender(visible, false, props.destroyOnHide);
|
|
148
148
|
return React.createElement(React.Fragment, null, React.createElement(Wrapper, {
|
|
149
149
|
ref: targetRef
|
|
@@ -136,7 +136,8 @@ export const Stepper = p => {
|
|
|
136
136
|
role: 'spinbutton',
|
|
137
137
|
"aria-valuenow": Number(inputValue),
|
|
138
138
|
"aria-valuemax": max,
|
|
139
|
-
"aria-valuemin": min
|
|
139
|
+
"aria-valuemin": min,
|
|
140
|
+
inputMode: 'decimal'
|
|
140
141
|
})), React.createElement(Button, {
|
|
141
142
|
className: `${classPrefix}-plus`,
|
|
142
143
|
onClick: handlePlus,
|
|
@@ -24,8 +24,10 @@ const defaultProps = {
|
|
|
24
24
|
stuckAtBoundary: true,
|
|
25
25
|
rubberband: true
|
|
26
26
|
};
|
|
27
|
+
let currentUid;
|
|
27
28
|
export const Swiper = forwardRef(staged((p, ref) => {
|
|
28
29
|
const props = mergeProps(defaultProps, p);
|
|
30
|
+
const [uid] = useState({});
|
|
29
31
|
const isVertical = props.direction === 'vertical';
|
|
30
32
|
const slideRatio = props.slideSize / 100;
|
|
31
33
|
const offsetRatio = props.trackOffset / 100;
|
|
@@ -125,6 +127,13 @@ export const Swiper = forwardRef(staged((p, ref) => {
|
|
|
125
127
|
const bind = useDrag(state => {
|
|
126
128
|
dragCancelRef.current = state.cancel;
|
|
127
129
|
if (!state.intentional) return;
|
|
130
|
+
|
|
131
|
+
if (state.first && !currentUid) {
|
|
132
|
+
currentUid = uid;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (currentUid !== uid) return;
|
|
136
|
+
currentUid = state.last ? undefined : uid;
|
|
128
137
|
const slidePixels = getSlidePixels();
|
|
129
138
|
if (!slidePixels) return;
|
|
130
139
|
const paramIndex = isVertical ? 1 : 0;
|
package/2x/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-mobile",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.24.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@floating-ui/dom": "^1.0.0",
|
|
6
6
|
"@react-spring/web": "^9.4.5",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"lodash": "^4.17.21",
|
|
15
15
|
"rc-field-form": "~1.27.0",
|
|
16
16
|
"react-is": "^17.0.2",
|
|
17
|
+
"runes": "^0.4.3",
|
|
17
18
|
"staged-components": "^1.1.3",
|
|
18
19
|
"tslib": "^2.4.0",
|
|
19
20
|
"use-sync-external-store": "^1.1.0"
|