antd-mobile 5.0.0-rc.22 → 5.0.0-rc.26
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/README.md +7 -6
- package/2x/cjs/components/badge/badge.css +18 -10
- package/2x/cjs/components/badge/badge.d.ts +1 -0
- package/2x/cjs/components/badge/badge.js +4 -5
- package/2x/cjs/components/button/button.css +3 -3
- package/2x/cjs/components/calendar/calendar.js +3 -1
- package/2x/cjs/components/cascade-picker-view/cascade-picker-view.d.ts +1 -2
- package/2x/cjs/components/checkbox/check-icon.js +4 -13
- package/2x/cjs/components/checkbox/checkbox.css +5 -14
- package/2x/cjs/components/checkbox/checkbox.js +3 -5
- package/2x/cjs/components/checkbox/indeterminate-icon.d.ts +3 -0
- package/2x/cjs/components/checkbox/indeterminate-icon.js +24 -0
- package/2x/cjs/components/date-picker/date-picker.d.ts +1 -1
- package/2x/cjs/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/2x/cjs/components/ellipsis/ellipsis.js +3 -1
- package/2x/cjs/components/floating-bubble/floating-bubble.css +1 -0
- package/2x/cjs/components/floating-panel/floating-panel.d.ts +7 -5
- package/2x/cjs/components/floating-panel/floating-panel.js +11 -1
- package/2x/cjs/components/form/form-item.css +3 -2
- package/2x/cjs/components/form/form-item.d.ts +2 -2
- package/2x/cjs/components/form/form-item.js +9 -5
- package/2x/cjs/components/form/form.css +3 -3
- package/2x/cjs/components/form/form.d.ts +5 -4
- package/2x/cjs/components/form/index.css +6 -5
- package/2x/cjs/components/form/index.d.ts +5 -4
- package/2x/cjs/components/image-uploader/image-uploader.js +1 -1
- package/2x/cjs/components/image-viewer/image-viewer.d.ts +8 -2
- package/2x/cjs/components/image-viewer/image-viewer.js +19 -6
- package/2x/cjs/components/image-viewer/index.d.ts +6 -2
- package/2x/cjs/components/image-viewer/slide.js +2 -1
- package/2x/cjs/components/image-viewer/slides.d.ts +7 -3
- package/2x/cjs/components/image-viewer/slides.js +18 -11
- package/2x/cjs/components/input/input.d.ts +2 -2
- package/2x/cjs/components/input/input.js +7 -3
- package/2x/cjs/components/list/list.css +2 -6
- package/2x/cjs/components/modal/modal.css +25 -20
- package/2x/cjs/components/modal/modal.js +8 -12
- package/2x/cjs/components/passcode-input/passcode-input.d.ts +2 -2
- package/2x/cjs/components/picker/picker.css +10 -2
- package/2x/cjs/components/picker/picker.d.ts +1 -1
- package/2x/cjs/components/picker-view/picker-view.css +4 -2
- package/2x/cjs/components/picker-view/picker-view.d.ts +1 -1
- package/2x/cjs/components/picker-view/wheel.js +5 -3
- package/2x/cjs/components/popover/arrow.d.ts +3 -0
- package/2x/cjs/components/popover/arrow.js +26 -0
- package/2x/cjs/components/popover/index.d.ts +7 -15
- package/2x/cjs/components/popover/index.js +4 -2
- package/2x/cjs/components/popover/popover-menu.css +63 -0
- package/2x/cjs/components/popover/popover-menu.d.ts +20 -0
- package/{cjs/components/popover/pop-menu.js → 2x/cjs/components/popover/popover-menu.js} +23 -26
- package/2x/cjs/components/popover/popover.css +90 -318
- package/2x/cjs/components/popover/popover.d.ts +9 -8
- package/2x/cjs/components/popover/popover.js +11 -17
- package/2x/cjs/components/radio/radio.css +4 -7
- package/2x/cjs/components/radio/radio.js +1 -3
- package/2x/cjs/components/search-bar/search-bar.css +1 -1
- package/2x/cjs/components/selector/selector.css +14 -6
- package/2x/cjs/components/selector/selector.d.ts +2 -1
- package/2x/cjs/components/selector/selector.js +3 -2
- package/2x/cjs/components/swiper/swiper.js +1 -1
- package/2x/cjs/components/switch/switch.css +8 -3
- package/2x/cjs/components/tabs/tabs.js +2 -2
- package/2x/cjs/components/text-area/text-area.css +9 -9
- package/2x/cjs/components/text-area/text-area.d.ts +2 -2
- package/2x/cjs/components/text-area/text-area.js +41 -32
- package/2x/cjs/components/virtual-input/virtual-input.js +3 -1
- package/2x/cjs/utils/get-scroll-parent.js +1 -1
- package/2x/cjs/utils/use-ref-state.js +1 -1
- package/2x/cjs/utils/use-resize-effect.js +1 -3
- package/2x/cjs/utils/use-tab-list-scroll.js +1 -3
- package/2x/es/components/badge/badge.css +18 -10
- package/2x/es/components/badge/badge.d.ts +1 -0
- package/2x/es/components/badge/badge.js +4 -5
- package/2x/es/components/button/button.css +3 -3
- package/2x/es/components/calendar/calendar.js +3 -2
- package/2x/es/components/cascade-picker-view/cascade-picker-view.d.ts +1 -2
- package/2x/es/components/checkbox/check-icon.js +4 -13
- package/2x/es/components/checkbox/checkbox.css +5 -14
- package/2x/es/components/checkbox/checkbox.js +2 -5
- package/2x/es/components/checkbox/indeterminate-icon.d.ts +3 -0
- package/2x/es/components/checkbox/indeterminate-icon.js +10 -0
- package/2x/es/components/date-picker/date-picker.d.ts +1 -1
- package/2x/es/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/2x/es/components/ellipsis/ellipsis.js +3 -2
- package/2x/es/components/floating-bubble/floating-bubble.css +1 -0
- package/2x/es/components/floating-panel/floating-panel.d.ts +7 -5
- package/2x/es/components/floating-panel/floating-panel.js +9 -1
- package/2x/es/components/form/form-item.css +3 -2
- package/2x/es/components/form/form-item.d.ts +2 -2
- package/2x/es/components/form/form-item.js +9 -5
- package/2x/es/components/form/form.css +3 -3
- package/2x/es/components/form/form.d.ts +5 -4
- package/2x/es/components/form/index.css +6 -5
- package/2x/es/components/form/index.d.ts +5 -4
- package/2x/es/components/image-uploader/image-uploader.js +3 -3
- package/2x/es/components/image-viewer/image-viewer.d.ts +8 -2
- package/2x/es/components/image-viewer/image-viewer.js +15 -4
- package/2x/es/components/image-viewer/index.d.ts +6 -2
- package/2x/es/components/image-viewer/slide.js +2 -1
- package/2x/es/components/image-viewer/slides.d.ts +7 -3
- package/2x/es/components/image-viewer/slides.js +19 -10
- package/2x/es/components/input/input.d.ts +2 -2
- package/2x/es/components/input/input.js +7 -4
- package/2x/es/components/list/list.css +2 -6
- package/2x/es/components/modal/modal.css +25 -20
- package/2x/es/components/modal/modal.js +8 -12
- package/2x/es/components/passcode-input/passcode-input.d.ts +2 -2
- package/2x/es/components/picker/picker.css +10 -2
- package/2x/es/components/picker/picker.d.ts +1 -1
- package/2x/es/components/picker-view/picker-view.css +4 -2
- package/2x/es/components/picker-view/picker-view.d.ts +1 -1
- package/2x/es/components/picker-view/wheel.js +5 -4
- package/2x/es/components/popover/arrow.d.ts +3 -0
- package/2x/es/components/popover/arrow.js +12 -0
- package/2x/es/components/popover/index.d.ts +7 -15
- package/2x/es/components/popover/index.js +3 -2
- package/2x/es/components/popover/popover-menu.css +63 -0
- package/2x/es/components/popover/popover-menu.d.ts +20 -0
- package/2x/es/components/popover/popover-menu.js +52 -0
- package/2x/es/components/popover/popover.css +90 -318
- package/2x/es/components/popover/popover.d.ts +9 -8
- package/2x/es/components/popover/popover.js +10 -17
- package/2x/es/components/radio/radio.css +4 -7
- package/2x/es/components/radio/radio.js +1 -3
- package/2x/es/components/search-bar/search-bar.css +1 -1
- package/2x/es/components/selector/selector.css +14 -6
- package/2x/es/components/selector/selector.d.ts +2 -1
- package/2x/es/components/selector/selector.js +3 -2
- package/2x/es/components/swiper/swiper.js +3 -3
- package/2x/es/components/switch/switch.css +8 -3
- package/2x/es/components/tabs/tabs.js +4 -4
- package/2x/es/components/text-area/text-area.css +9 -9
- package/2x/es/components/text-area/text-area.d.ts +2 -2
- package/2x/es/components/text-area/text-area.js +41 -31
- package/2x/es/components/virtual-input/virtual-input.js +3 -2
- package/2x/es/utils/get-scroll-parent.js +1 -1
- package/2x/es/utils/use-ref-state.js +2 -2
- package/2x/es/utils/use-resize-effect.js +2 -3
- package/2x/es/utils/use-tab-list-scroll.js +2 -3
- package/2x/package.json +4 -4
- package/README.md +7 -6
- package/cjs/components/badge/badge.css +16 -10
- package/cjs/components/badge/badge.d.ts +1 -0
- package/cjs/components/badge/badge.js +4 -5
- package/cjs/components/button/button.css +3 -3
- package/cjs/components/calendar/calendar.js +3 -1
- package/cjs/components/cascade-picker-view/cascade-picker-view.d.ts +1 -2
- package/cjs/components/checkbox/check-icon.js +4 -13
- package/cjs/components/checkbox/checkbox.css +5 -13
- package/cjs/components/checkbox/checkbox.js +3 -5
- package/cjs/components/checkbox/indeterminate-icon.d.ts +3 -0
- package/cjs/components/checkbox/indeterminate-icon.js +24 -0
- package/cjs/components/date-picker/date-picker.d.ts +1 -1
- package/cjs/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/cjs/components/ellipsis/ellipsis.js +3 -1
- package/cjs/components/floating-bubble/floating-bubble.css +1 -0
- package/cjs/components/floating-panel/floating-panel.d.ts +7 -5
- package/cjs/components/floating-panel/floating-panel.js +11 -1
- package/cjs/components/form/form-item.css +3 -2
- package/cjs/components/form/form-item.d.ts +2 -2
- package/cjs/components/form/form-item.js +9 -5
- package/cjs/components/form/form.css +3 -3
- package/cjs/components/form/form.d.ts +5 -4
- package/cjs/components/form/index.css +6 -5
- package/cjs/components/form/index.d.ts +5 -4
- package/cjs/components/image-uploader/image-uploader.js +1 -1
- package/cjs/components/image-viewer/image-viewer.d.ts +8 -2
- package/cjs/components/image-viewer/image-viewer.js +19 -6
- package/cjs/components/image-viewer/index.d.ts +6 -2
- package/cjs/components/image-viewer/slide.js +2 -1
- package/cjs/components/image-viewer/slides.d.ts +7 -3
- package/cjs/components/image-viewer/slides.js +18 -11
- package/cjs/components/input/input.d.ts +2 -2
- package/cjs/components/input/input.js +7 -3
- package/cjs/components/list/list.css +2 -5
- package/cjs/components/modal/modal.css +23 -19
- package/cjs/components/modal/modal.js +8 -12
- package/cjs/components/passcode-input/passcode-input.d.ts +2 -2
- package/cjs/components/picker/picker.css +9 -2
- package/cjs/components/picker/picker.d.ts +1 -1
- package/cjs/components/picker-view/picker-view.css +4 -2
- package/cjs/components/picker-view/picker-view.d.ts +1 -1
- package/cjs/components/picker-view/wheel.js +5 -3
- package/cjs/components/popover/arrow.d.ts +3 -0
- package/cjs/components/popover/arrow.js +26 -0
- package/cjs/components/popover/index.d.ts +7 -15
- package/cjs/components/popover/index.js +4 -2
- package/cjs/components/popover/popover-menu.css +52 -0
- package/cjs/components/popover/popover-menu.d.ts +20 -0
- package/{2x/cjs/components/popover/pop-menu.js → cjs/components/popover/popover-menu.js} +23 -26
- package/cjs/components/popover/popover.css +83 -276
- package/cjs/components/popover/popover.d.ts +9 -8
- package/cjs/components/popover/popover.js +11 -17
- package/cjs/components/radio/radio.css +4 -7
- package/cjs/components/radio/radio.js +1 -3
- package/cjs/components/search-bar/search-bar.css +1 -1
- package/cjs/components/selector/selector.css +14 -6
- package/cjs/components/selector/selector.d.ts +2 -1
- package/cjs/components/selector/selector.js +3 -2
- package/cjs/components/swiper/swiper.js +1 -1
- package/cjs/components/switch/switch.css +8 -3
- package/cjs/components/tabs/tabs.js +2 -2
- package/cjs/components/text-area/text-area.css +9 -9
- package/cjs/components/text-area/text-area.d.ts +2 -2
- package/cjs/components/text-area/text-area.js +41 -32
- package/cjs/components/virtual-input/virtual-input.js +3 -1
- package/cjs/utils/get-scroll-parent.js +1 -1
- package/cjs/utils/use-ref-state.js +1 -1
- package/cjs/utils/use-resize-effect.js +1 -3
- package/cjs/utils/use-tab-list-scroll.js +1 -3
- package/es/components/badge/badge.css +16 -10
- package/es/components/badge/badge.d.ts +1 -0
- package/es/components/badge/badge.js +4 -5
- package/es/components/button/button.css +3 -3
- package/es/components/calendar/calendar.js +3 -2
- package/es/components/cascade-picker-view/cascade-picker-view.d.ts +1 -2
- package/es/components/checkbox/check-icon.js +4 -13
- package/es/components/checkbox/checkbox.css +5 -13
- package/es/components/checkbox/checkbox.js +2 -5
- package/es/components/checkbox/indeterminate-icon.d.ts +3 -0
- package/es/components/checkbox/indeterminate-icon.js +10 -0
- package/es/components/date-picker/date-picker.d.ts +1 -1
- package/es/components/date-picker-view/date-picker-view.d.ts +3 -2
- package/es/components/ellipsis/ellipsis.js +3 -2
- package/es/components/floating-bubble/floating-bubble.css +1 -0
- package/es/components/floating-panel/floating-panel.d.ts +7 -5
- package/es/components/floating-panel/floating-panel.js +9 -1
- package/es/components/form/form-item.css +3 -2
- package/es/components/form/form-item.d.ts +2 -2
- package/es/components/form/form-item.js +9 -5
- package/es/components/form/form.css +3 -3
- package/es/components/form/form.d.ts +5 -4
- package/es/components/form/index.css +6 -5
- package/es/components/form/index.d.ts +5 -4
- package/es/components/image-uploader/image-uploader.js +3 -3
- package/es/components/image-viewer/image-viewer.d.ts +8 -2
- package/es/components/image-viewer/image-viewer.js +15 -4
- package/es/components/image-viewer/index.d.ts +6 -2
- package/es/components/image-viewer/slide.js +2 -1
- package/es/components/image-viewer/slides.d.ts +7 -3
- package/es/components/image-viewer/slides.js +19 -10
- package/es/components/input/input.d.ts +2 -2
- package/es/components/input/input.js +7 -4
- package/es/components/list/list.css +2 -5
- package/es/components/modal/modal.css +23 -19
- package/es/components/modal/modal.js +8 -12
- package/es/components/passcode-input/passcode-input.d.ts +2 -2
- package/es/components/picker/picker.css +9 -2
- package/es/components/picker/picker.d.ts +1 -1
- package/es/components/picker-view/picker-view.css +4 -2
- package/es/components/picker-view/picker-view.d.ts +1 -1
- package/es/components/picker-view/wheel.js +5 -4
- package/es/components/popover/arrow.d.ts +3 -0
- package/es/components/popover/arrow.js +12 -0
- package/es/components/popover/index.d.ts +7 -15
- package/es/components/popover/index.js +3 -2
- package/es/components/popover/popover-menu.css +52 -0
- package/es/components/popover/popover-menu.d.ts +20 -0
- package/es/components/popover/popover-menu.js +52 -0
- package/es/components/popover/popover.css +83 -276
- package/es/components/popover/popover.d.ts +9 -8
- package/es/components/popover/popover.js +10 -17
- package/es/components/radio/radio.css +4 -7
- package/es/components/radio/radio.js +1 -3
- package/es/components/search-bar/search-bar.css +1 -1
- package/es/components/selector/selector.css +14 -6
- package/es/components/selector/selector.d.ts +2 -1
- package/es/components/selector/selector.js +3 -2
- package/es/components/swiper/swiper.js +3 -3
- package/es/components/switch/switch.css +8 -3
- package/es/components/tabs/tabs.js +4 -4
- package/es/components/text-area/text-area.css +9 -9
- package/es/components/text-area/text-area.d.ts +2 -2
- package/es/components/text-area/text-area.js +41 -31
- package/es/components/virtual-input/virtual-input.js +3 -2
- package/es/utils/get-scroll-parent.js +1 -1
- package/es/utils/use-ref-state.js +2 -2
- package/es/utils/use-resize-effect.js +2 -3
- package/es/utils/use-tab-list-scroll.js +2 -3
- package/package.json +4 -4
- package/umd/antd-mobile.js +1 -1
- package/2x/cjs/components/popover/animation.css +0 -111
- package/2x/cjs/components/popover/pop-menu.d.ts +0 -28
- package/2x/es/components/popover/animation.css +0 -111
- package/2x/es/components/popover/pop-menu.d.ts +0 -28
- package/2x/es/components/popover/pop-menu.js +0 -54
- package/cjs/components/popover/animation.css +0 -96
- package/cjs/components/popover/pop-menu.d.ts +0 -28
- package/es/components/popover/animation.css +0 -96
- package/es/components/popover/pop-menu.d.ts +0 -28
- package/es/components/popover/pop-menu.js +0 -54
|
@@ -7,7 +7,7 @@ import type { FormLayout } from './index';
|
|
|
7
7
|
declare type RenderChildren<Values = any> = (form: FormInstance<Values>) => React.ReactNode;
|
|
8
8
|
declare type ChildrenType<Values = any> = RenderChildren<Values> | React.ReactNode;
|
|
9
9
|
declare type RcFieldProps = Omit<FieldProps, 'children'>;
|
|
10
|
-
export declare type FormItemProps = RcFieldProps
|
|
10
|
+
export declare type FormItemProps = Pick<RcFieldProps, 'dependencies' | 'valuePropName' | 'name' | 'rules' | 'messageVariables' | 'trigger' | 'validateTrigger' | 'shouldUpdate' | 'initialValue'> & Pick<ListItemProps, 'style' | 'onClick' | 'extra' | 'arrow'> & {
|
|
11
11
|
label?: React.ReactNode;
|
|
12
12
|
help?: React.ReactNode;
|
|
13
13
|
hasFeedback?: boolean;
|
|
@@ -17,6 +17,6 @@ export declare type FormItemProps = RcFieldProps & NativeProps & Pick<ListItemPr
|
|
|
17
17
|
hidden?: boolean;
|
|
18
18
|
layout?: FormLayout;
|
|
19
19
|
children: ChildrenType;
|
|
20
|
-
};
|
|
20
|
+
} & NativeProps;
|
|
21
21
|
export declare const FormItem: FC<FormItemProps>;
|
|
22
22
|
export {};
|
|
@@ -25,7 +25,8 @@ const FormItemLayout = props => {
|
|
|
25
25
|
children,
|
|
26
26
|
htmlFor,
|
|
27
27
|
hidden,
|
|
28
|
-
errors
|
|
28
|
+
errors,
|
|
29
|
+
arrow
|
|
29
30
|
} = props;
|
|
30
31
|
const context = useContext(FormContext);
|
|
31
32
|
const hasFeedback = props.hasFeedback !== undefined ? props.hasFeedback : context.hasFeedback;
|
|
@@ -52,7 +53,8 @@ const FormItemLayout = props => {
|
|
|
52
53
|
[`${classPrefix}-hidden`]: hidden
|
|
53
54
|
}),
|
|
54
55
|
disabled: disabled,
|
|
55
|
-
onClick: props.onClick
|
|
56
|
+
onClick: props.onClick,
|
|
57
|
+
arrow: arrow
|
|
56
58
|
}, children);
|
|
57
59
|
};
|
|
58
60
|
|
|
@@ -80,9 +82,10 @@ export const FormItem = props => {
|
|
|
80
82
|
validateTrigger,
|
|
81
83
|
onClick,
|
|
82
84
|
shouldUpdate,
|
|
83
|
-
dependencies
|
|
85
|
+
dependencies,
|
|
86
|
+
arrow
|
|
84
87
|
} = props,
|
|
85
|
-
fieldProps = __rest(props, ["className", "style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies"]);
|
|
88
|
+
fieldProps = __rest(props, ["className", "style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "arrow"]);
|
|
86
89
|
|
|
87
90
|
const {
|
|
88
91
|
validateTrigger: contextValidateTrigger
|
|
@@ -138,7 +141,8 @@ export const FormItem = props => {
|
|
|
138
141
|
errors: errors,
|
|
139
142
|
onClick: onClick,
|
|
140
143
|
hidden: hidden,
|
|
141
|
-
layout: layout
|
|
144
|
+
layout: layout,
|
|
145
|
+
arrow: arrow
|
|
142
146
|
}, React.createElement(NoStyleItemContext.Provider, {
|
|
143
147
|
value: onSubMetaChange
|
|
144
148
|
}, baseChildren));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.adm-form .adm-list.adm-list {
|
|
2
|
-
--padding-left:
|
|
3
|
-
--padding-right:
|
|
2
|
+
--padding-left: 16px;
|
|
3
|
+
--padding-right: 12px;
|
|
4
4
|
}
|
|
5
5
|
.adm-form-horizontal .adm-list.adm-list {
|
|
6
6
|
--prefix-width: 6em;
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
align-self: center;
|
|
11
11
|
}
|
|
12
12
|
.adm-form .adm-form-footer {
|
|
13
|
-
padding: 12px;
|
|
13
|
+
padding: 20px 12px;
|
|
14
14
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
import { ListProps } from '../list';
|
|
4
|
-
import type { FormProps as RcFormProps, FormInstance } from 'rc-field-form';
|
|
4
|
+
import type { FormProps as RcFormProps, FormInstance as RCFormInstance } from 'rc-field-form';
|
|
5
5
|
import { FormContextType } from './context';
|
|
6
6
|
import type { FormLayout } from '.';
|
|
7
|
-
export declare type
|
|
7
|
+
export declare type FormInstance = Pick<RCFormInstance, 'getFieldValue' | 'getFieldsValue' | 'getFieldError' | 'getFieldsError' | 'isFieldTouched' | 'isFieldsTouched' | 'resetFields' | 'setFields' | 'setFieldsValue' | 'submit' | 'validateFields'>;
|
|
8
|
+
export declare type FormProps = Pick<RcFormProps, 'form' | 'initialValues' | 'name' | 'preserve' | 'validateMessages' | 'validateTrigger' | 'onFieldsChange' | 'onFinish' | 'onFinishFailed' | 'onValuesChange' | 'children'> & NativeProps & Partial<FormContextType> & {
|
|
8
9
|
footer?: ReactNode;
|
|
9
10
|
layout?: FormLayout;
|
|
10
11
|
mode?: ListProps['mode'];
|
|
11
12
|
};
|
|
12
|
-
export declare const Form: React.ForwardRefExoticComponent<RcFormProps<any> & NativeProps<never> & Partial<FormContextType> & {
|
|
13
|
+
export declare const Form: React.ForwardRefExoticComponent<Pick<RcFormProps<any>, "children" | "form" | "name" | "initialValues" | "preserve" | "validateMessages" | "validateTrigger" | "onFieldsChange" | "onFinish" | "onFinishFailed" | "onValuesChange"> & NativeProps<never> & Partial<FormContextType> & {
|
|
13
14
|
footer?: ReactNode;
|
|
14
15
|
layout?: "horizontal" | "vertical" | undefined;
|
|
15
16
|
mode?: ListProps['mode'];
|
|
16
|
-
} & React.RefAttributes<
|
|
17
|
+
} & React.RefAttributes<Pick<RCFormInstance<any>, "submit" | "getFieldValue" | "getFieldsValue" | "getFieldError" | "getFieldsError" | "isFieldTouched" | "isFieldsTouched" | "resetFields" | "setFields" | "setFieldsValue" | "validateFields">>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.adm-form .adm-list.adm-list {
|
|
2
|
-
--padding-left:
|
|
3
|
-
--padding-right:
|
|
2
|
+
--padding-left: 16px;
|
|
3
|
+
--padding-right: 12px;
|
|
4
4
|
}
|
|
5
5
|
.adm-form-horizontal .adm-list.adm-list {
|
|
6
6
|
--prefix-width: 6em;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
align-self: center;
|
|
11
11
|
}
|
|
12
12
|
.adm-form .adm-form-footer {
|
|
13
|
-
padding: 12px;
|
|
13
|
+
padding: 20px 12px;
|
|
14
14
|
}
|
|
15
15
|
.adm-form-item + .adm-form-item {
|
|
16
16
|
border-top: none;
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
.adm-form-item-label-required {
|
|
26
26
|
position: absolute;
|
|
27
27
|
left: -0.6em;
|
|
28
|
-
top: 0
|
|
28
|
+
top: 0;
|
|
29
|
+
font-family: SimSun, sans-serif;
|
|
29
30
|
color: var(--adm-color-danger);
|
|
30
31
|
user-select: none;
|
|
31
32
|
}
|
|
@@ -36,8 +37,8 @@
|
|
|
36
37
|
display: none;
|
|
37
38
|
}
|
|
38
39
|
.adm-form-vertical .adm-form-item-label {
|
|
39
|
-
margin-bottom: 4px;
|
|
40
40
|
font-size: 15px;
|
|
41
|
+
margin-bottom: 4px;
|
|
41
42
|
}
|
|
42
43
|
.adm-form-vertical .adm-form-item-footer {
|
|
43
44
|
margin-top: 4px;
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
import './index.less';
|
|
3
3
|
import { useForm } from 'rc-field-form';
|
|
4
4
|
export declare type FormLayout = 'vertical' | 'horizontal';
|
|
5
|
-
export type { FormProps } from './form';
|
|
6
|
-
export type {
|
|
7
|
-
|
|
5
|
+
export type { FormProps, FormInstance } from './form';
|
|
6
|
+
export type { FormItemProps } from './form-item';
|
|
7
|
+
export type { ValidateMessages, FieldData, NamePath, } from 'rc-field-form/es/interface';
|
|
8
|
+
declare const _default: import("react").ForwardRefExoticComponent<Pick<import("rc-field-form").FormProps<any>, "children" | "form" | "name" | "initialValues" | "preserve" | "validateMessages" | "validateTrigger" | "onFieldsChange" | "onFinish" | "onFinishFailed" | "onValuesChange"> & import("../../utils/native-props").NativeProps<never> & Partial<import("./context").FormContextType> & {
|
|
8
9
|
footer?: import("react").ReactNode;
|
|
9
10
|
layout?: "horizontal" | "vertical" | undefined;
|
|
10
11
|
mode?: "default" | "card" | undefined;
|
|
11
|
-
} & import("react").RefAttributes<import("rc-field-form").FormInstance<any>>> & {
|
|
12
|
+
} & import("react").RefAttributes<Pick<import("rc-field-form").FormInstance<any>, "submit" | "getFieldValue" | "getFieldsValue" | "getFieldError" | "getFieldsError" | "isFieldTouched" | "isFieldsTouched" | "resetFields" | "setFields" | "setFieldsValue" | "validateFields">>> & {
|
|
12
13
|
Item: import("react").FC<import("./form-item").FormItemProps>;
|
|
13
14
|
Header: import("react").FC<{}>;
|
|
14
15
|
useForm: typeof useForm;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { useRef, useState } from 'react';
|
|
3
3
|
import { AddOutline } from 'antd-mobile-icons';
|
|
4
4
|
import { mergeProps } from '../../utils/with-default-props';
|
|
5
5
|
import ImageViewer from '../image-viewer';
|
|
6
6
|
import PreviewItem from './preview-item';
|
|
7
7
|
import { usePropsValue } from '../../utils/use-props-value';
|
|
8
|
-
import { useMemoizedFn, useUnmount } from 'ahooks';
|
|
8
|
+
import { useIsomorphicLayoutEffect, useMemoizedFn, useUnmount } from 'ahooks';
|
|
9
9
|
import Space from '../space';
|
|
10
10
|
import { withNativeProps } from '../../utils/native-props';
|
|
11
11
|
const classPrefix = `adm-image-uploader`;
|
|
@@ -26,7 +26,7 @@ export const ImageUploader = p => {
|
|
|
26
26
|
setValue(updater(value));
|
|
27
27
|
});
|
|
28
28
|
const [tasks, setTasks] = useState([]);
|
|
29
|
-
|
|
29
|
+
useIsomorphicLayoutEffect(() => {
|
|
30
30
|
setTasks(prev => prev.filter(task => {
|
|
31
31
|
if (task.url === undefined) return true;
|
|
32
32
|
return !value.some(fileItem => fileItem.url === task.url);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
2
|
import { GetContainer } from '../../utils/render-to-container';
|
|
3
|
+
import { SlidesRef } from './slides';
|
|
3
4
|
export declare type ImageViewerProps = {
|
|
4
5
|
image?: string;
|
|
5
6
|
maxZoom?: number;
|
|
@@ -9,9 +10,14 @@ export declare type ImageViewerProps = {
|
|
|
9
10
|
afterClose?: () => void;
|
|
10
11
|
};
|
|
11
12
|
export declare const ImageViewer: FC<ImageViewerProps>;
|
|
13
|
+
export declare type MultiImageViewerRef = SlidesRef;
|
|
12
14
|
export declare type MultiImageViewerProps = Omit<ImageViewerProps, 'image'> & {
|
|
13
15
|
images?: string[];
|
|
14
16
|
defaultIndex?: number;
|
|
15
17
|
onIndexChange?: (index: number) => void;
|
|
16
18
|
};
|
|
17
|
-
export declare const MultiImageViewer:
|
|
19
|
+
export declare const MultiImageViewer: React.ForwardRefExoticComponent<Pick<ImageViewerProps, "visible" | "onClose" | "afterClose" | "getContainer" | "maxZoom"> & {
|
|
20
|
+
images?: string[] | undefined;
|
|
21
|
+
defaultIndex?: number | undefined;
|
|
22
|
+
onIndexChange?: ((index: number) => void) | undefined;
|
|
23
|
+
} & React.RefAttributes<SlidesRef>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
|
2
2
|
import { mergeProps } from '../../utils/with-default-props';
|
|
3
3
|
import { renderToContainer } from '../../utils/render-to-container';
|
|
4
4
|
import Mask from '../mask';
|
|
@@ -33,8 +33,18 @@ export const ImageViewer = p => {
|
|
|
33
33
|
const multiDefaultProps = Object.assign(Object.assign({}, defaultProps), {
|
|
34
34
|
defaultIndex: 0
|
|
35
35
|
});
|
|
36
|
-
export const MultiImageViewer = p => {
|
|
36
|
+
export const MultiImageViewer = forwardRef((p, ref) => {
|
|
37
37
|
const props = mergeProps(multiDefaultProps, p);
|
|
38
|
+
const [defaultIndex, setDefaultIndex] = useState(props.defaultIndex);
|
|
39
|
+
const slidesRef = useRef(null);
|
|
40
|
+
useImperativeHandle(ref, () => ({
|
|
41
|
+
swipeTo: (index, immediate) => {
|
|
42
|
+
var _a;
|
|
43
|
+
|
|
44
|
+
setDefaultIndex(index);
|
|
45
|
+
(_a = slidesRef.current) === null || _a === void 0 ? void 0 : _a.swipeTo(index, immediate);
|
|
46
|
+
}
|
|
47
|
+
}));
|
|
38
48
|
const node = React.createElement(Mask, {
|
|
39
49
|
visible: props.visible,
|
|
40
50
|
disableBodyScroll: false,
|
|
@@ -43,7 +53,8 @@ export const MultiImageViewer = p => {
|
|
|
43
53
|
}, React.createElement("div", {
|
|
44
54
|
className: `${classPrefix}-content`
|
|
45
55
|
}, props.images && React.createElement(Slides, {
|
|
46
|
-
|
|
56
|
+
ref: slidesRef,
|
|
57
|
+
defaultIndex: defaultIndex,
|
|
47
58
|
onIndexChange: props.onIndexChange,
|
|
48
59
|
images: props.images,
|
|
49
60
|
onTap: () => {
|
|
@@ -54,4 +65,4 @@ export const MultiImageViewer = p => {
|
|
|
54
65
|
maxZoom: props.maxZoom
|
|
55
66
|
})));
|
|
56
67
|
return renderToContainer(props.getContainer, node);
|
|
57
|
-
};
|
|
68
|
+
});
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import './image-viewer.less';
|
|
3
3
|
import { showMultiImageViewer, showImageViewer, clearImageViewer } from './methods';
|
|
4
|
-
export type { ImageViewerProps, MultiImageViewerProps } from './image-viewer';
|
|
4
|
+
export type { ImageViewerProps, MultiImageViewerProps, MultiImageViewerRef, } from './image-viewer';
|
|
5
5
|
export type { ImageViewerHandler } from './methods';
|
|
6
6
|
declare const _default: import("react").FC<import("./image-viewer").ImageViewerProps> & {
|
|
7
|
-
Multi: import("react").
|
|
7
|
+
Multi: import("react").ForwardRefExoticComponent<Pick<import("./image-viewer").ImageViewerProps, "visible" | "onClose" | "afterClose" | "getContainer" | "maxZoom"> & {
|
|
8
|
+
images?: string[] | undefined;
|
|
9
|
+
defaultIndex?: number | undefined;
|
|
10
|
+
onIndexChange?: ((index: number) => void) | undefined;
|
|
11
|
+
} & import("react").RefAttributes<import("./slides").SlidesRef>> & {
|
|
8
12
|
show: typeof showMultiImageViewer;
|
|
9
13
|
};
|
|
10
14
|
show: typeof showImageViewer;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type SlidesType = {
|
|
3
3
|
images: string[];
|
|
4
4
|
onTap: () => void;
|
|
5
5
|
maxZoom: number;
|
|
6
6
|
defaultIndex: number;
|
|
7
7
|
onIndexChange?: (index: number) => void;
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
|
+
export declare type SlidesRef = {
|
|
10
|
+
swipeTo: (index: number, immediate?: boolean) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const Slides: React.ForwardRefExoticComponent<SlidesType & React.RefAttributes<SlidesRef>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React, { useRef } from 'react';
|
|
1
|
+
import React, { forwardRef, useImperativeHandle, useRef } from 'react';
|
|
2
2
|
import { useDrag } from '@use-gesture/react';
|
|
3
3
|
import { useSpring, animated } from '@react-spring/web';
|
|
4
4
|
import { Slide } from './slide';
|
|
5
5
|
import { convertPx } from '../../utils/convert-px';
|
|
6
6
|
import { bound } from '../../utils/bound';
|
|
7
7
|
const classPrefix = `adm-image-viewer`;
|
|
8
|
-
export const Slides = props => {
|
|
8
|
+
export const Slides = forwardRef((props, ref) => {
|
|
9
9
|
const slideWidth = window.innerWidth + convertPx(16);
|
|
10
10
|
const [{
|
|
11
11
|
x
|
|
@@ -17,10 +17,23 @@ export const Slides = props => {
|
|
|
17
17
|
}
|
|
18
18
|
}));
|
|
19
19
|
const count = props.images.length;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
|
|
21
|
+
function swipeTo(index, immediate = false) {
|
|
22
22
|
var _a;
|
|
23
23
|
|
|
24
|
+
const i = bound(index, 0, count - 1);
|
|
25
|
+
(_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, i);
|
|
26
|
+
api.start({
|
|
27
|
+
x: i * slideWidth,
|
|
28
|
+
immediate
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
useImperativeHandle(ref, () => ({
|
|
33
|
+
swipeTo
|
|
34
|
+
}));
|
|
35
|
+
const dragLockRef = useRef(false);
|
|
36
|
+
const bind = useDrag(state => {
|
|
24
37
|
if (dragLockRef.current) return;
|
|
25
38
|
const [offsetX] = state.offset;
|
|
26
39
|
|
|
@@ -28,11 +41,7 @@ export const Slides = props => {
|
|
|
28
41
|
const minIndex = Math.floor(offsetX / slideWidth);
|
|
29
42
|
const maxIndex = minIndex + 1;
|
|
30
43
|
const velocityOffset = Math.min(state.velocity[0] * 2000, slideWidth) * state.direction[0];
|
|
31
|
-
|
|
32
|
-
(_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, index);
|
|
33
|
-
api.start({
|
|
34
|
-
x: index * slideWidth
|
|
35
|
-
});
|
|
44
|
+
swipeTo(bound(Math.round((offsetX + velocityOffset) / slideWidth), minIndex, maxIndex));
|
|
36
45
|
} else {
|
|
37
46
|
api.start({
|
|
38
47
|
x: offsetX,
|
|
@@ -81,4 +90,4 @@ export const Slides = props => {
|
|
|
81
90
|
},
|
|
82
91
|
dragLockRef: dragLockRef
|
|
83
92
|
}))));
|
|
84
|
-
};
|
|
93
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
declare type NativeInputProps = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
4
|
-
export declare type InputProps = Pick<NativeInputProps, 'maxLength' | 'minLength' | 'max' | 'min' | 'autoComplete' | 'pattern' | 'inputMode' | 'type' | 'onFocus' | 'onBlur' | 'autoCapitalize' | 'autoCorrect' | 'onKeyDown' | 'onKeyUp'> & {
|
|
4
|
+
export declare type InputProps = Pick<NativeInputProps, 'maxLength' | 'minLength' | 'max' | 'min' | 'autoComplete' | 'pattern' | 'inputMode' | 'type' | 'onFocus' | 'onBlur' | 'autoCapitalize' | 'autoCorrect' | 'onKeyDown' | 'onKeyUp' | 'onCompositionStart' | 'onCompositionEnd'> & {
|
|
5
5
|
value?: string;
|
|
6
6
|
defaultValue?: string;
|
|
7
7
|
onChange?: (val: string) => void;
|
|
@@ -19,7 +19,7 @@ export declare type InputRef = {
|
|
|
19
19
|
focus: () => void;
|
|
20
20
|
blur: () => void;
|
|
21
21
|
};
|
|
22
|
-
export declare const Input: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "pattern" | "max" | "min" | "type" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "autoCapitalize" | "autoCorrect" | "inputMode" | "autoComplete" | "maxLength" | "minLength"> & {
|
|
22
|
+
export declare const Input: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "pattern" | "max" | "min" | "type" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "autoCapitalize" | "autoCorrect" | "inputMode" | "autoComplete" | "maxLength" | "minLength"> & {
|
|
23
23
|
value?: string | undefined;
|
|
24
24
|
defaultValue?: string | undefined;
|
|
25
25
|
onChange?: ((val: string) => void) | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React, { useState, forwardRef, useImperativeHandle, useRef
|
|
1
|
+
import React, { useState, forwardRef, useImperativeHandle, useRef } from 'react';
|
|
2
2
|
import { usePropsValue } from '../../utils/use-props-value';
|
|
3
3
|
import { CloseCircleFill } from 'antd-mobile-icons';
|
|
4
4
|
import { withNativeProps } from '../../utils/native-props';
|
|
5
5
|
import { mergeProps } from '../../utils/with-default-props';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
|
+
import { useIsomorphicLayoutEffect } from 'ahooks';
|
|
7
8
|
const classPrefix = `adm-input`;
|
|
8
9
|
const defaultProps = {
|
|
9
10
|
defaultValue: ''
|
|
@@ -39,7 +40,7 @@ export const Input = forwardRef((p, ref) => {
|
|
|
39
40
|
(_a = props.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
40
41
|
};
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
useIsomorphicLayoutEffect(() => {
|
|
43
44
|
var _a;
|
|
44
45
|
|
|
45
46
|
if (!props.enterKeyHint) return;
|
|
@@ -86,8 +87,10 @@ export const Input = forwardRef((p, ref) => {
|
|
|
86
87
|
autoCapitalize: props.autoCapitalize,
|
|
87
88
|
autoCorrect: props.autoCorrect,
|
|
88
89
|
onKeyDown: handleKeydown,
|
|
89
|
-
onKeyUp: props.onKeyUp
|
|
90
|
-
|
|
90
|
+
onKeyUp: props.onKeyUp,
|
|
91
|
+
onCompositionStart: props.onCompositionStart,
|
|
92
|
+
onCompositionEnd: props.onCompositionEnd
|
|
93
|
+
}), props.clearable && !!value && !props.readOnly && React.createElement("div", {
|
|
91
94
|
className: `${classPrefix}-clear`,
|
|
92
95
|
onMouseDown: e => {
|
|
93
96
|
e.preventDefault();
|
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
opacity: 0.4;
|
|
84
84
|
pointer-events: none;
|
|
85
85
|
}
|
|
86
|
-
a.adm-list-item:active {
|
|
86
|
+
a.adm-list-item:active:not(.adm-list-item-disabled) {
|
|
87
87
|
background-color: var(--active-background-color);
|
|
88
88
|
}
|
|
89
|
-
a.adm-list-item:active::after {
|
|
89
|
+
a.adm-list-item:active:not(.adm-list-item-disabled)::after {
|
|
90
90
|
content: ' ';
|
|
91
91
|
display: block;
|
|
92
92
|
position: absolute;
|
|
@@ -95,6 +95,3 @@ a.adm-list-item:active::after {
|
|
|
95
95
|
left: 0;
|
|
96
96
|
border-bottom: var(--border-inner);
|
|
97
97
|
}
|
|
98
|
-
a.adm-list-item.adm-list-item-disabled:active {
|
|
99
|
-
background-color: unset;
|
|
100
|
-
}
|
|
@@ -19,10 +19,12 @@
|
|
|
19
19
|
.adm-modal-main {
|
|
20
20
|
width: 100%;
|
|
21
21
|
max-height: 70vh;
|
|
22
|
+
box-sizing: border-box;
|
|
22
23
|
font-size: 14px;
|
|
23
24
|
background-color: white;
|
|
24
25
|
border-radius: 8px;
|
|
25
|
-
overflow: hidden;
|
|
26
|
+
overflow-x: hidden;
|
|
27
|
+
overflow-y: auto;
|
|
26
28
|
display: flex;
|
|
27
29
|
flex-direction: column;
|
|
28
30
|
}
|
|
@@ -34,13 +36,11 @@
|
|
|
34
36
|
}
|
|
35
37
|
.adm-modal-main .adm-modal-body {
|
|
36
38
|
padding: 20px 12px 12px;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
37
41
|
}
|
|
38
|
-
.adm-modal-main .adm-modal-body
|
|
39
|
-
|
|
40
|
-
right: 12px;
|
|
41
|
-
top: 12px;
|
|
42
|
-
color: var(--adm-color-weak);
|
|
43
|
-
padding: 2px;
|
|
42
|
+
.adm-modal-main .adm-modal-body > * + * {
|
|
43
|
+
margin-top: 8px;
|
|
44
44
|
}
|
|
45
45
|
.adm-modal-main .adm-modal-body-header-wrapper {
|
|
46
46
|
display: flex;
|
|
@@ -53,33 +53,37 @@
|
|
|
53
53
|
text-align: center;
|
|
54
54
|
}
|
|
55
55
|
.adm-modal-main .adm-modal-body-content {
|
|
56
|
-
max-height: 70vh;
|
|
57
|
-
overflow-x: hidden;
|
|
58
|
-
overflow-y: auto;
|
|
59
56
|
font-size: 15px;
|
|
60
57
|
line-height: 1.4;
|
|
61
58
|
color: #333;
|
|
62
59
|
}
|
|
63
|
-
.adm-modal-main .adm-modal-
|
|
60
|
+
.adm-modal-main .adm-modal-close {
|
|
61
|
+
position: absolute;
|
|
62
|
+
right: 8px;
|
|
63
|
+
top: 8px;
|
|
64
|
+
color: var(--adm-color-weak);
|
|
65
|
+
padding: 4px;
|
|
66
|
+
font-size: 18px;
|
|
67
|
+
}
|
|
68
|
+
.adm-modal-footer {
|
|
64
69
|
user-select: none;
|
|
65
70
|
padding: 8px 12px 12px;
|
|
66
71
|
}
|
|
67
|
-
.adm-modal-
|
|
72
|
+
.adm-modal-footer.adm-space {
|
|
73
|
+
--gap-vertical: 20px;
|
|
74
|
+
}
|
|
75
|
+
.adm-modal-footer .adm-modal-button {
|
|
68
76
|
font-size: 18px;
|
|
69
77
|
line-height: 25px;
|
|
70
|
-
border-right: solid 0.5px var(--adm-border-color);
|
|
71
|
-
}
|
|
72
|
-
.adm-modal-main .adm-modal-footer .adm-modal-button:last-child {
|
|
73
|
-
border-right: none;
|
|
74
78
|
}
|
|
75
|
-
.adm-modal-
|
|
79
|
+
.adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary) {
|
|
76
80
|
padding-top: 0;
|
|
77
81
|
padding-bottom: 0;
|
|
78
82
|
}
|
|
79
|
-
.adm-modal-
|
|
83
|
+
.adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary)::before {
|
|
80
84
|
display: none;
|
|
81
85
|
}
|
|
82
|
-
.adm-modal-
|
|
86
|
+
.adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary):active {
|
|
83
87
|
opacity: 0.7;
|
|
84
88
|
}
|
|
85
89
|
.adm-modal-image-container {
|
|
@@ -71,7 +71,10 @@ export const Modal = p => {
|
|
|
71
71
|
style: Object.assign({}, style),
|
|
72
72
|
onClick: e => e.stopPropagation(),
|
|
73
73
|
className: `${classPrefix}-main`
|
|
74
|
-
},
|
|
74
|
+
}, props.showCloseButton && React.createElement("a", {
|
|
75
|
+
className: classNames(`${classPrefix}-close`, 'adm-plain-anchor'),
|
|
76
|
+
onClick: props.onClose
|
|
77
|
+
}, React.createElement(CloseOutline, null)), !!props.image && React.createElement("div", {
|
|
75
78
|
className: `${classPrefix}-image-container`
|
|
76
79
|
}, React.createElement(Image, {
|
|
77
80
|
src: props.image,
|
|
@@ -80,12 +83,6 @@ export const Modal = p => {
|
|
|
80
83
|
})), React.createElement("div", {
|
|
81
84
|
style: props.bodyStyle,
|
|
82
85
|
className: classNames(`${classPrefix}-body`, props.bodyClassName)
|
|
83
|
-
}, props.showCloseButton && React.createElement("a", {
|
|
84
|
-
className: classNames(`${classPrefix}-close`, 'adm-plain-anchor'),
|
|
85
|
-
onClick: props.onClose
|
|
86
|
-
}, React.createElement(CloseOutline, null)), React.createElement(Space, {
|
|
87
|
-
direction: 'vertical',
|
|
88
|
-
block: true
|
|
89
86
|
}, !!props.header && React.createElement("div", {
|
|
90
87
|
className: `${classPrefix}-body-header-wrapper`
|
|
91
88
|
}, React.createElement("div", {
|
|
@@ -94,11 +91,10 @@ export const Modal = p => {
|
|
|
94
91
|
className: `${classPrefix}-body-title`
|
|
95
92
|
}, props.title), !!props.content && React.createElement("div", {
|
|
96
93
|
className: `${classPrefix}-body-content`
|
|
97
|
-
}, typeof props.content === 'string' ? React.createElement(AutoCenter, null, props.content) : props.content))
|
|
98
|
-
className: `${classPrefix}-footer`
|
|
99
|
-
}, React.createElement(Space, {
|
|
94
|
+
}, typeof props.content === 'string' ? React.createElement(AutoCenter, null, props.content) : props.content)), React.createElement(Space, {
|
|
100
95
|
direction: 'vertical',
|
|
101
|
-
block: true
|
|
96
|
+
block: true,
|
|
97
|
+
className: `${classPrefix}-footer`
|
|
102
98
|
}, props.actions.map((action, index) => {
|
|
103
99
|
return React.createElement(ModalActionButton, {
|
|
104
100
|
key: action.key,
|
|
@@ -113,6 +109,6 @@ export const Modal = p => {
|
|
|
113
109
|
}
|
|
114
110
|
})
|
|
115
111
|
});
|
|
116
|
-
})))))))
|
|
112
|
+
})))))));
|
|
117
113
|
return renderToContainer(props.getContainer, node);
|
|
118
114
|
};
|
|
@@ -14,7 +14,7 @@ export declare type PasscodeInputProps = {
|
|
|
14
14
|
onFocus?: () => void;
|
|
15
15
|
keyboard?: ReactElement<NumberKeyboardProps>;
|
|
16
16
|
onFill?: (val: string) => void;
|
|
17
|
-
} & NativeProps<'--cell-gap' | '--cell-size'>;
|
|
17
|
+
} & NativeProps<'--cell-gap' | '--cell-size' | '--dot-size' | '--border-color' | '--border-radius'>;
|
|
18
18
|
export declare type PasscodeInputRef = {
|
|
19
19
|
focus: () => void;
|
|
20
20
|
blur: () => void;
|
|
@@ -32,4 +32,4 @@ export declare const PasscodeInput: React.ForwardRefExoticComponent<{
|
|
|
32
32
|
onFocus?: (() => void) | undefined;
|
|
33
33
|
keyboard?: React.ReactElement<NumberKeyboardProps, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | undefined;
|
|
34
34
|
onFill?: ((val: string) => void) | undefined;
|
|
35
|
-
} & NativeProps<"--cell-size" | "--cell-gap"> & React.RefAttributes<PasscodeInputRef>>;
|
|
35
|
+
} & NativeProps<"--border-radius" | "--border-color" | "--cell-size" | "--dot-size" | "--cell-gap"> & React.RefAttributes<PasscodeInputRef>>;
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
.adm-picker {
|
|
2
|
+
--header-button-font-size: 15px;
|
|
3
|
+
--title-font-size: 15px;
|
|
4
|
+
--item-font-size: 16px;
|
|
2
5
|
width: 100%;
|
|
3
6
|
height: 300px;
|
|
4
7
|
overflow: hidden;
|
|
5
8
|
position: relative;
|
|
6
9
|
display: flex;
|
|
7
10
|
flex-direction: column;
|
|
11
|
+
---item-font-size: var(--item-font-size);
|
|
12
|
+
}
|
|
13
|
+
.adm-picker .adm-picker-view.adm-picker-view {
|
|
14
|
+
--item-font-size: var(---item-font-size);
|
|
8
15
|
}
|
|
9
16
|
.adm-picker-header {
|
|
10
17
|
flex: none;
|
|
@@ -15,13 +22,13 @@
|
|
|
15
22
|
padding: 4px 4px;
|
|
16
23
|
}
|
|
17
24
|
.adm-picker-header-button {
|
|
18
|
-
font-size:
|
|
25
|
+
font-size: var(--header-button-font-size);
|
|
19
26
|
display: inline-block;
|
|
20
27
|
padding: 8px 8px;
|
|
21
28
|
}
|
|
22
29
|
.adm-picker-header-title {
|
|
23
30
|
padding: 4px 4px;
|
|
24
|
-
font-size:
|
|
31
|
+
font-size: var(--title-font-size);
|
|
25
32
|
color: var(--adm-color-text);
|
|
26
33
|
text-align: center;
|
|
27
34
|
flex: 1;
|
|
@@ -15,5 +15,5 @@ export declare type PickerProps = {
|
|
|
15
15
|
confirmText?: ReactNode;
|
|
16
16
|
cancelText?: ReactNode;
|
|
17
17
|
children?: (items: (PickerColumnItem | null)[]) => ReactNode;
|
|
18
|
-
} & Pick<PopupProps, 'getContainer' | 'afterShow' | 'afterClose' | 'onClick' | 'stopPropagation'> & NativeProps
|
|
18
|
+
} & Pick<PopupProps, 'getContainer' | 'afterShow' | 'afterClose' | 'onClick' | 'stopPropagation'> & NativeProps<'--header-button-font-size' | '--title-font-size' | '--item-font-size'>;
|
|
19
19
|
export declare const Picker: React.NamedExoticComponent<PickerProps>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.adm-picker-view {
|
|
2
2
|
--height: 240px;
|
|
3
|
+
--item-font-size: 16px;
|
|
3
4
|
height: var(--height);
|
|
4
5
|
width: 100%;
|
|
5
6
|
display: flex;
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
bottom: -100vh;
|
|
40
41
|
}
|
|
41
42
|
.adm-picker-view-column-item {
|
|
42
|
-
font-size:
|
|
43
|
+
font-size: var(--item-font-size);
|
|
43
44
|
padding: 0 6px;
|
|
44
45
|
height: 34px;
|
|
45
46
|
display: flex;
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
display: flex;
|
|
60
61
|
flex-direction: column;
|
|
61
62
|
position: relative;
|
|
63
|
+
z-index: 0;
|
|
62
64
|
}
|
|
63
65
|
.adm-picker-view-column-accessible > * {
|
|
64
66
|
flex: 1;
|
|
@@ -75,7 +77,7 @@
|
|
|
75
77
|
}
|
|
76
78
|
.adm-picker-view-mask {
|
|
77
79
|
position: absolute;
|
|
78
|
-
z-index:
|
|
80
|
+
z-index: 10000;
|
|
79
81
|
left: 0;
|
|
80
82
|
top: 0;
|
|
81
83
|
width: 100%;
|
|
@@ -14,5 +14,5 @@ export declare type PickerViewProps = {
|
|
|
14
14
|
value?: PickerValue[];
|
|
15
15
|
defaultValue?: PickerValue[];
|
|
16
16
|
onChange?: (value: PickerValue[], extend: PickerValueExtend) => void;
|
|
17
|
-
} & NativeProps<'--height'>;
|
|
17
|
+
} & NativeProps<'--height' | '--item-font-size'>;
|
|
18
18
|
export declare const PickerView: React.NamedExoticComponent<PickerViewProps>;
|