sard-uniapp 1.14.0 → 1.14.2
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/CHANGELOG.md +18 -0
- package/components/accordion/variables.scss +2 -1
- package/components/action-sheet/variables.scss +2 -1
- package/components/alert/variables.scss +2 -1
- package/components/avatar/variables.scss +2 -1
- package/components/back-top/variables.scss +2 -1
- package/components/badge/variables.scss +2 -1
- package/components/button/variables.scss +2 -1
- package/components/calendar/calendar.vue +16 -17
- package/components/calendar/variables.scss +2 -1
- package/components/calendar-input/calendar-input.vue +35 -31
- package/components/calendar-input/common.d.ts +3 -0
- package/components/card/variables.scss +2 -1
- package/components/cascader/variables.scss +2 -1
- package/components/cascader-input/cascader-input.vue +32 -28
- package/components/cascader-input/common.d.ts +3 -0
- package/components/check-icon/variables.scss +2 -1
- package/components/checkbox/variables.scss +2 -1
- package/components/checkbox-input/checkbox-input.vue +60 -56
- package/components/checkbox-input/common.d.ts +3 -0
- package/components/checkbox-input/variables.scss +2 -1
- package/components/collapse/variables.scss +2 -1
- package/components/datetime-picker-input/common.d.ts +3 -0
- package/components/datetime-picker-input/datetime-picker-input.vue +29 -25
- package/components/datetime-range-picker/variables.scss +2 -1
- package/components/datetime-range-picker-input/common.d.ts +3 -0
- package/components/datetime-range-picker-input/datetime-range-picker-input.vue +30 -26
- package/components/dialog/common.d.ts +2 -0
- package/components/dialog/dialog.vue +11 -2
- package/components/dialog/variables.scss +2 -1
- package/components/dialog-agent/dialog-agent.vue +2 -0
- package/components/divider/variables.scss +2 -1
- package/components/dropdown/variables.scss +2 -1
- package/components/empty/variables.scss +2 -1
- package/components/fab/variables.scss +2 -1
- package/components/floating-bubble/variables.scss +2 -1
- package/components/floating-panel/variables.scss +2 -1
- package/components/form/variables.scss +2 -1
- package/components/grid/variables.scss +2 -1
- package/components/indexes/variables.scss +2 -1
- package/components/input/common.d.ts +1 -0
- package/components/input/index.scss +1 -0
- package/components/input/input.vue +6 -3
- package/components/input/variables.scss +2 -1
- package/components/keyboard/variables.scss +2 -1
- package/components/list/variables.scss +2 -1
- package/components/load-more/variables.scss +2 -1
- package/components/loading/variables.scss +2 -1
- package/components/menu/variables.scss +2 -1
- package/components/navbar/variables.scss +2 -1
- package/components/notice-bar/variables.scss +2 -1
- package/components/notify/variables.scss +2 -1
- package/components/overlay/variables.scss +2 -1
- package/components/pagination/variables.scss +2 -1
- package/components/password-input/variables.scss +2 -1
- package/components/picker/variables.scss +2 -1
- package/components/picker-input/common.d.ts +3 -0
- package/components/picker-input/picker-input.vue +26 -22
- package/components/popout/variables.scss +2 -1
- package/components/popout-input/popout-input.d.ts +10 -1
- package/components/popout-input/popout-input.vue +5 -3
- package/components/popout-input/variables.scss +2 -1
- package/components/popover/variables.scss +2 -1
- package/components/popup/popup.vue +32 -18
- package/components/popup/variables.scss +2 -1
- package/components/progress-bar/variables.scss +2 -1
- package/components/progress-circle/variables.scss +2 -1
- package/components/pull-down-refresh/variables.scss +2 -1
- package/components/qrcode/variables.scss +1 -1
- package/components/radio/variables.scss +2 -1
- package/components/radio-input/common.d.ts +3 -0
- package/components/radio-input/radio-input.vue +59 -58
- package/components/radio-input/variables.scss +2 -1
- package/components/rate/variables.scss +2 -1
- package/components/result/variables.scss +2 -1
- package/components/search/variables.scss +2 -1
- package/components/share-sheet/variables.scss +2 -1
- package/components/sidebar/variables.scss +2 -1
- package/components/signature/variables.scss +2 -1
- package/components/skeleton/variables.scss +2 -1
- package/components/slider/variables.scss +2 -1
- package/components/space/common.d.ts +3 -0
- package/components/space/common.js +7 -0
- package/components/space/space.vue +4 -1
- package/components/space/variables.scss +2 -1
- package/components/stepper/variables.scss +2 -1
- package/components/steps/variables.scss +2 -1
- package/components/style/mixins/theme-dark.scss +4 -2
- package/components/style/variables.scss +2 -1
- package/components/swiper-dot/variables.scss +2 -1
- package/components/switch/variables.scss +2 -1
- package/components/tabbar/variables.scss +2 -1
- package/components/table/variables.scss +2 -1
- package/components/tabs/variables.scss +2 -1
- package/components/tag/variables.scss +2 -1
- package/components/timeline/variables.scss +2 -1
- package/components/toast/variables.scss +2 -1
- package/components/tree/variables.scss +2 -1
- package/components/upload/variables.scss +2 -1
- package/package.json +1 -1
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { type RadioGroupOption, type RadioGroupProps } from '../radio/common';
|
|
2
2
|
import { type PopoutInputProps } from '../popout-input/common';
|
|
3
|
+
import { type StyleValue } from 'vue';
|
|
3
4
|
export type RadioInputOption = RadioGroupOption;
|
|
4
5
|
export interface RadioInputProps extends RadioGroupProps, Omit<PopoutInputProps, 'modelValue'> {
|
|
5
6
|
visible?: boolean;
|
|
6
7
|
title?: string;
|
|
8
|
+
popoutClass?: string;
|
|
9
|
+
popoutStyle?: StyleValue;
|
|
7
10
|
}
|
|
8
11
|
export declare const defaultRadioInputProps: () => {
|
|
9
12
|
options: () => never[];
|
|
@@ -5,66 +5,67 @@
|
|
|
5
5
|
:readonly="readonly"
|
|
6
6
|
:disabled="disabled"
|
|
7
7
|
:clearable="clearable"
|
|
8
|
-
@clear="onClear"
|
|
9
|
-
@click="onInputClick"
|
|
10
|
-
/>
|
|
11
|
-
|
|
12
|
-
<sar-popout
|
|
13
8
|
:root-class="rootClass"
|
|
14
9
|
:root-style="rootStyle"
|
|
15
|
-
|
|
16
|
-
@
|
|
17
|
-
:title="title ?? placeholder"
|
|
18
|
-
:show-footer="false"
|
|
19
|
-
@confirm="onConfirm"
|
|
10
|
+
@clear="onClear"
|
|
11
|
+
@click="onInputClick"
|
|
20
12
|
>
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
:
|
|
36
|
-
:
|
|
37
|
-
:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
@change="onChange"
|
|
13
|
+
<sar-popout
|
|
14
|
+
:visible="innerVisible"
|
|
15
|
+
:title="title ?? placeholder"
|
|
16
|
+
:root-class="popoutClass"
|
|
17
|
+
:root-style="popoutStyle"
|
|
18
|
+
@update:visible="onVisible"
|
|
19
|
+
@confirm="onConfirm"
|
|
20
|
+
>
|
|
21
|
+
<template #visible="{ already }">
|
|
22
|
+
<view v-if="already" :class="containerClass">
|
|
23
|
+
<scroll-view
|
|
24
|
+
:class="bem.e('scroll')"
|
|
25
|
+
scroll-y
|
|
26
|
+
trap-scroll
|
|
27
|
+
:upper-threshold="0"
|
|
28
|
+
:lower-threshold="0"
|
|
29
|
+
:throttle="false"
|
|
30
|
+
@scroll="onScroll"
|
|
31
|
+
@scrolltoupper="onScrolltoupper"
|
|
32
|
+
@scrolltolower="onScrolltolower"
|
|
42
33
|
>
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
>
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
34
|
+
<sar-radio-group
|
|
35
|
+
:size="size"
|
|
36
|
+
:type="type"
|
|
37
|
+
:checkedColor="checkedColor"
|
|
38
|
+
:direction="direction"
|
|
39
|
+
:validate-event="false"
|
|
40
|
+
:model-value="popoutValue"
|
|
41
|
+
@change="onChange"
|
|
42
|
+
>
|
|
43
|
+
<template #custom="{ toggle }">
|
|
44
|
+
<sar-list inlaid>
|
|
45
|
+
<sar-list-item
|
|
46
|
+
v-for="option in options"
|
|
47
|
+
:key="getMayPrimitiveOption(option, fieldKeys.value)"
|
|
48
|
+
:title="getMayPrimitiveOption(option, fieldKeys.label)"
|
|
49
|
+
hover
|
|
50
|
+
@click="
|
|
51
|
+
toggle(getMayPrimitiveOption(option, fieldKeys.value))
|
|
52
|
+
"
|
|
53
|
+
>
|
|
54
|
+
<template #value>
|
|
55
|
+
<sar-radio
|
|
56
|
+
readonly
|
|
57
|
+
:value="getMayPrimitiveOption(option, fieldKeys.value)"
|
|
58
|
+
/>
|
|
59
|
+
</template>
|
|
60
|
+
</sar-list-item>
|
|
61
|
+
</sar-list>
|
|
62
|
+
</template>
|
|
63
|
+
</sar-radio-group>
|
|
64
|
+
</scroll-view>
|
|
65
|
+
</view>
|
|
66
|
+
</template>
|
|
67
|
+
</sar-popout>
|
|
68
|
+
</sar-popout-input>
|
|
68
69
|
</template>
|
|
69
70
|
|
|
70
71
|
<script>
|
|
@@ -107,6 +108,8 @@ export default _defineComponent({
|
|
|
107
108
|
props: _mergeDefaults({
|
|
108
109
|
visible: { type: Boolean, required: false },
|
|
109
110
|
title: { type: String, required: false },
|
|
111
|
+
popoutClass: { type: String, required: false },
|
|
112
|
+
popoutStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
110
113
|
rootStyle: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
|
|
111
114
|
rootClass: { type: String, required: false },
|
|
112
115
|
modelValue: { type: null, required: false },
|
|
@@ -150,8 +153,6 @@ export default _defineComponent({
|
|
|
150
153
|
});
|
|
151
154
|
const onChange = (value) => {
|
|
152
155
|
popoutValue.value = value;
|
|
153
|
-
onConfirm();
|
|
154
|
-
innerVisible.value = false;
|
|
155
156
|
};
|
|
156
157
|
const onConfirm = () => {
|
|
157
158
|
innerValue.value = popoutValue.value;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { type StyleValue } from 'vue';
|
|
2
2
|
export type SpaceSize = 'small' | 'middle' | 'large';
|
|
3
3
|
export type SpaceAlign = 'start' | 'end' | 'center' | 'baseline';
|
|
4
|
+
export type SpaceJustify = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
|
|
4
5
|
export interface SpaceProps {
|
|
5
6
|
rootStyle?: StyleValue;
|
|
6
7
|
rootClass?: string;
|
|
7
8
|
direction?: 'vertical' | 'horizontal';
|
|
8
9
|
size?: SpaceSize | (string & {});
|
|
9
10
|
align?: SpaceAlign | (string & {});
|
|
11
|
+
justify?: SpaceJustify | (string & {});
|
|
10
12
|
wrap?: boolean;
|
|
11
13
|
}
|
|
12
14
|
export declare const spaceSizes: string[];
|
|
13
15
|
export declare const spaceMapAlign: Record<string, string>;
|
|
16
|
+
export declare const spaceMapJustify: Record<string, string>;
|
|
14
17
|
export declare const defaultSpaceProps: {
|
|
15
18
|
direction: SpaceProps["direction"];
|
|
16
19
|
size: SpaceProps["size"];
|
|
@@ -4,4 +4,11 @@ export const spaceMapAlign = {
|
|
|
4
4
|
start: 'flex-start',
|
|
5
5
|
end: 'flex-end',
|
|
6
6
|
};
|
|
7
|
+
export const spaceMapJustify = {
|
|
8
|
+
start: 'flex-start',
|
|
9
|
+
end: 'flex-end',
|
|
10
|
+
between: 'space-between',
|
|
11
|
+
around: 'space-around',
|
|
12
|
+
evenly: 'space-evenly',
|
|
13
|
+
};
|
|
7
14
|
export const defaultSpaceProps = defaultConfig.space;
|
|
@@ -11,6 +11,7 @@ import { classNames, stringifyStyle, createBem } from "../../utils";
|
|
|
11
11
|
import {
|
|
12
12
|
defaultSpaceProps,
|
|
13
13
|
spaceMapAlign,
|
|
14
|
+
spaceMapJustify,
|
|
14
15
|
spaceSizes
|
|
15
16
|
} from "./common";
|
|
16
17
|
export default _defineComponent({
|
|
@@ -27,6 +28,7 @@ export default _defineComponent({
|
|
|
27
28
|
direction: { type: String, required: false },
|
|
28
29
|
size: { type: [String, Object], required: false },
|
|
29
30
|
align: { type: [String, Object], required: false },
|
|
31
|
+
justify: { type: [String, Object], required: false },
|
|
30
32
|
wrap: { type: Boolean, required: false }
|
|
31
33
|
}, defaultSpaceProps),
|
|
32
34
|
setup(__props, { expose: __expose }) {
|
|
@@ -49,7 +51,8 @@ export default _defineComponent({
|
|
|
49
51
|
return stringifyStyle(
|
|
50
52
|
{
|
|
51
53
|
gap: presetSize.value ? null : props.size,
|
|
52
|
-
alignItems: (props.align && spaceMapAlign[props.align]) ?? props.align
|
|
54
|
+
alignItems: (props.align && spaceMapAlign[props.align]) ?? props.align,
|
|
55
|
+
justifyContent: (props.justify && spaceMapJustify[props.justify]) ?? props.justify
|
|
53
56
|
},
|
|
54
57
|
props.rootStyle
|
|
55
58
|
);
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
@mixin theme-dark {
|
|
2
2
|
@media (prefers-color-scheme: dark) {
|
|
3
|
-
page
|
|
3
|
+
page,
|
|
4
|
+
.sar-portal {
|
|
4
5
|
@content;
|
|
5
6
|
}
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
/* #ifdef WEB */
|
|
9
|
-
:root[data-sard-theme='dark'] page
|
|
10
|
+
:root[data-sard-theme='dark'] page,
|
|
11
|
+
:root[data-sard-theme='dark'] .sar-portal {
|
|
10
12
|
@content;
|
|
11
13
|
}
|
|
12
14
|
/* #endif */
|