@sdata/web-vue 3.6.0 → 3.7.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/dist/sd.css +34 -9
- package/dist/sd.min.css +1 -1
- package/es/_components/select-view/style/index.css +17 -1
- package/es/cascader/cascader-panel.vue.d.ts +0 -2
- package/es/cascader/cascader-panel.vue_vue_type_script_setup_true_lang.js +6 -13
- package/es/cascader/cascader.vue.d.ts +0 -2
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +5 -9
- package/es/cascader/types.d.ts +0 -4
- package/es/color-picker/color-picker.d.ts +0 -34
- package/es/color-picker/color-picker.js +6 -48
- package/es/color-picker/index.d.ts +0 -59
- package/es/color-picker/style/index.css +0 -7
- package/es/color-picker/style/index.scss +0 -11
- package/es/color-picker/style/token.scss +0 -2
- package/es/index.css +34 -9
- package/es/input-tag/input-tag.js +7 -2
- package/es/input-tag/style/index.css +17 -1
- package/es/input-tag/style/input-tag.scss +17 -1
- package/es/progress/circle.vue.d.ts +1 -1
- package/es/progress/index.d.ts +3 -3
- package/es/progress/line.vue.d.ts +1 -1
- package/es/progress/progress.vue.d.ts +1 -1
- package/es/progress/steps.vue.d.ts +1 -1
- package/es/select/index.d.ts +0 -20
- package/es/select/select.d.ts +0 -11
- package/es/select/select.js +5 -18
- package/es/tree-select/tree-select.vue.d.ts +0 -8
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +2 -17
- package/json/vetur-attributes.json +1 -29
- package/json/vetur-tags.json +2 -10
- package/json/web-types.json +2 -66
- package/package.json +1 -1
- package/es/color-picker/input-alpha.d.ts +0 -19
- package/es/color-picker/input-hex.d.ts +0 -33
- package/es/color-picker/input-rgb.d.ts +0 -33
|
@@ -785,6 +785,12 @@
|
|
|
785
785
|
.sd-select-view-multiple:not(.sd-select-view-focus) .sd-select-view-icon-hover:hover::before {
|
|
786
786
|
background-color: var(--sd-color-fill-4);
|
|
787
787
|
}
|
|
788
|
+
.sd-select-view-multiple {
|
|
789
|
+
position: relative;
|
|
790
|
+
min-width: 0;
|
|
791
|
+
max-width: 100%;
|
|
792
|
+
overflow: hidden;
|
|
793
|
+
}
|
|
788
794
|
.sd-select-view-multiple.sd-select-view-has-tag {
|
|
789
795
|
padding-right: 4px;
|
|
790
796
|
padding-left: 4px;
|
|
@@ -884,6 +890,9 @@
|
|
|
884
890
|
.sd-select-view-multiple .sd-select-view-resize-observer {
|
|
885
891
|
position: absolute;
|
|
886
892
|
inset: 0;
|
|
893
|
+
display: block;
|
|
894
|
+
width: 100%;
|
|
895
|
+
height: 100%;
|
|
887
896
|
visibility: hidden;
|
|
888
897
|
pointer-events: none;
|
|
889
898
|
}
|
|
@@ -891,11 +900,18 @@
|
|
|
891
900
|
position: absolute;
|
|
892
901
|
top: 0;
|
|
893
902
|
left: 0;
|
|
894
|
-
display:
|
|
903
|
+
display: block;
|
|
904
|
+
width: 100%;
|
|
905
|
+
max-width: 100%;
|
|
906
|
+
overflow: hidden;
|
|
895
907
|
white-space: nowrap;
|
|
896
908
|
visibility: hidden;
|
|
897
909
|
pointer-events: none;
|
|
898
910
|
}
|
|
911
|
+
.sd-select-view-multiple .sd-select-view-measure .sd-select-view-tag {
|
|
912
|
+
display: inline-flex;
|
|
913
|
+
flex-shrink: 0;
|
|
914
|
+
}
|
|
899
915
|
.sd-select-view-multiple .sd-select-view-tag-ellipsis {
|
|
900
916
|
display: block;
|
|
901
917
|
min-width: 0;
|
|
@@ -7,11 +7,9 @@ type __VLS_Slots = {} & {
|
|
|
7
7
|
declare const __VLS_base: import("vue").DefineComponent<CascaderPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
8
|
change: (value: CascaderModelValue) => any;
|
|
9
9
|
"update:modelValue": (value: CascaderModelValue) => any;
|
|
10
|
-
"update:value": (value: CascaderModelValue) => any;
|
|
11
10
|
}, string, import("vue").PublicProps, Readonly<CascaderPanelProps> & Readonly<{
|
|
12
11
|
onChange?: ((value: CascaderModelValue) => any) | undefined;
|
|
13
12
|
"onUpdate:modelValue"?: ((value: CascaderModelValue) => any) | undefined;
|
|
14
|
-
"onUpdate:value"?: ((value: CascaderModelValue) => any) | undefined;
|
|
15
13
|
}>, {
|
|
16
14
|
options: CascaderOption[];
|
|
17
15
|
valueKey: string;
|
|
@@ -19,7 +19,6 @@ var cascader_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
19
19
|
default: false
|
|
20
20
|
},
|
|
21
21
|
modelValue: {},
|
|
22
|
-
value: {},
|
|
23
22
|
defaultValue: {},
|
|
24
23
|
options: { default: () => [] },
|
|
25
24
|
expandTrigger: { default: "click" },
|
|
@@ -35,11 +34,7 @@ var cascader_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
35
34
|
default: false
|
|
36
35
|
}
|
|
37
36
|
},
|
|
38
|
-
emits: [
|
|
39
|
-
"update:modelValue",
|
|
40
|
-
"update:value",
|
|
41
|
-
"change"
|
|
42
|
-
],
|
|
37
|
+
emits: ["update:modelValue", "change"],
|
|
43
38
|
setup(__props, { emit: __emit }) {
|
|
44
39
|
var _props$defaultValue;
|
|
45
40
|
const props = __props;
|
|
@@ -50,11 +45,10 @@ var cascader_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
50
45
|
if (pathMode) return;
|
|
51
46
|
return "";
|
|
52
47
|
};
|
|
53
|
-
const { options, checkStrictly, loadMore, modelValue,
|
|
48
|
+
const { options, checkStrictly, loadMore, modelValue, valueKey, expandChild, expandTrigger, multiple, pathMode } = toRefs(props);
|
|
54
49
|
const _value = ref((_props$defaultValue = props.defaultValue) !== null && _props$defaultValue !== void 0 ? _props$defaultValue : getDefaultValue(props.multiple, props.pathMode));
|
|
55
|
-
watch(
|
|
56
|
-
|
|
57
|
-
if (isUndefined(mergedValue) || isNull(mergedValue)) _value.value = getDefaultValue(props.multiple, props.pathMode);
|
|
50
|
+
watch(modelValue, (nextModelValue) => {
|
|
51
|
+
if (isUndefined(nextModelValue) || isNull(nextModelValue)) _value.value = getDefaultValue(props.multiple, props.pathMode);
|
|
58
52
|
});
|
|
59
53
|
const optionInfos = ref([]);
|
|
60
54
|
const totalLevel = ref(1);
|
|
@@ -97,8 +91,8 @@ var cascader_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
97
91
|
});
|
|
98
92
|
}, { immediate: true });
|
|
99
93
|
const computedValueMap = computed(() => {
|
|
100
|
-
var
|
|
101
|
-
const values = getValidValues((
|
|
94
|
+
var _props$modelValue;
|
|
95
|
+
const values = getValidValues((_props$modelValue = props.modelValue) !== null && _props$modelValue !== void 0 ? _props$modelValue : _value.value, {
|
|
102
96
|
multiple: props.multiple,
|
|
103
97
|
pathMode: props.pathMode
|
|
104
98
|
});
|
|
@@ -117,7 +111,6 @@ var cascader_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
117
111
|
}
|
|
118
112
|
_value.value = value;
|
|
119
113
|
emit("update:modelValue", value);
|
|
120
|
-
emit("update:value", value);
|
|
121
114
|
emit("change", value);
|
|
122
115
|
};
|
|
123
116
|
const selectSingle = (option) => {
|
|
@@ -25,7 +25,6 @@ declare const __VLS_base: import("vue").DefineComponent<CascaderProps, {}, {}, {
|
|
|
25
25
|
"update:popupVisible": (visible: boolean) => any;
|
|
26
26
|
popupVisibleChange: (visible: boolean) => any;
|
|
27
27
|
"update:modelValue": (value: CascaderModelValue) => any;
|
|
28
|
-
"update:value": (value: CascaderModelValue) => any;
|
|
29
28
|
inputValueChange: (value: string) => any;
|
|
30
29
|
"update:show": (visible: boolean) => any;
|
|
31
30
|
showChange: (visible: boolean) => any;
|
|
@@ -38,7 +37,6 @@ declare const __VLS_base: import("vue").DefineComponent<CascaderProps, {}, {}, {
|
|
|
38
37
|
"onUpdate:popupVisible"?: ((visible: boolean) => any) | undefined;
|
|
39
38
|
onPopupVisibleChange?: ((visible: boolean) => any) | undefined;
|
|
40
39
|
"onUpdate:modelValue"?: ((value: CascaderModelValue) => any) | undefined;
|
|
41
|
-
"onUpdate:value"?: ((value: CascaderModelValue) => any) | undefined;
|
|
42
40
|
onInputValueChange?: ((value: string) => any) | undefined;
|
|
43
41
|
"onUpdate:show"?: ((visible: boolean) => any) | undefined;
|
|
44
42
|
onShowChange?: ((visible: boolean) => any) | undefined;
|
|
@@ -33,7 +33,6 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
33
33
|
default: false
|
|
34
34
|
},
|
|
35
35
|
modelValue: {},
|
|
36
|
-
value: {},
|
|
37
36
|
defaultValue: {},
|
|
38
37
|
options: { default: () => [] },
|
|
39
38
|
disabled: {
|
|
@@ -105,7 +104,6 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
105
104
|
},
|
|
106
105
|
emits: [
|
|
107
106
|
"update:modelValue",
|
|
108
|
-
"update:value",
|
|
109
107
|
"update:popupVisible",
|
|
110
108
|
"update:show",
|
|
111
109
|
"change",
|
|
@@ -128,7 +126,7 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
128
126
|
if (pathMode) return;
|
|
129
127
|
return "";
|
|
130
128
|
};
|
|
131
|
-
const { options, checkStrictly, loadMore, formatLabel, modelValue,
|
|
129
|
+
const { options, checkStrictly, loadMore, formatLabel, modelValue, disabled, valueKey, expandTrigger, expandChild, pathMode, multiple, popupVisible, show, defaultPopupVisible, defaultShow, error, size, placeholder, loading, maxTagCount, tagNowrap, popupContainer, searchOptionOnlyLabel } = toRefs(props);
|
|
132
130
|
const _value = ref((_props$defaultValue = props.defaultValue) !== null && _props$defaultValue !== void 0 ? _props$defaultValue : getDefaultValue(props.multiple, props.pathMode));
|
|
133
131
|
const _inputValue = ref(props.defaultInputValue);
|
|
134
132
|
const instance = getCurrentInstance();
|
|
@@ -172,9 +170,8 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
172
170
|
var _props$triggerProps;
|
|
173
171
|
return (_props$triggerProps = props.triggerProps) !== null && _props$triggerProps !== void 0 ? _props$triggerProps : {};
|
|
174
172
|
});
|
|
175
|
-
watch(
|
|
176
|
-
|
|
177
|
-
if (isUndefined(mergedValue) || isNull(mergedValue)) _value.value = getDefaultValue(props.multiple, props.pathMode);
|
|
173
|
+
watch(modelValue, (nextModelValue) => {
|
|
174
|
+
if (isUndefined(nextModelValue) || isNull(nextModelValue)) _value.value = getDefaultValue(props.multiple, props.pathMode);
|
|
178
175
|
});
|
|
179
176
|
const optionInfos = ref([]);
|
|
180
177
|
const totalLevel = ref(1);
|
|
@@ -220,8 +217,8 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
220
217
|
deep: true
|
|
221
218
|
});
|
|
222
219
|
const computedValueMap = computed(() => {
|
|
223
|
-
var
|
|
224
|
-
const values = getValidValues((
|
|
220
|
+
var _props$modelValue;
|
|
221
|
+
const values = getValidValues((_props$modelValue = props.modelValue) !== null && _props$modelValue !== void 0 ? _props$modelValue : _value.value, {
|
|
225
222
|
multiple: props.multiple,
|
|
226
223
|
pathMode: props.pathMode
|
|
227
224
|
});
|
|
@@ -259,7 +256,6 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
259
256
|
}
|
|
260
257
|
_value.value = value;
|
|
261
258
|
emit("update:modelValue", value);
|
|
262
|
-
emit("update:value", value);
|
|
263
259
|
emit("change", value);
|
|
264
260
|
(_eventHandlers$value = eventHandlers.value) === null || _eventHandlers$value === void 0 || (_eventHandlers$value$ = _eventHandlers$value.onChange) === null || _eventHandlers$value$ === void 0 || _eventHandlers$value$.call(_eventHandlers$value);
|
|
265
261
|
};
|
package/es/cascader/types.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export interface CascaderProps {
|
|
|
7
7
|
pathMode?: boolean;
|
|
8
8
|
multiple?: boolean;
|
|
9
9
|
modelValue?: CascaderModelValue;
|
|
10
|
-
value?: CascaderModelValue;
|
|
11
10
|
defaultValue?: CascaderModelValue;
|
|
12
11
|
options?: CascaderOption[];
|
|
13
12
|
disabled?: boolean;
|
|
@@ -46,7 +45,6 @@ export interface CascaderProps {
|
|
|
46
45
|
}
|
|
47
46
|
export type CascaderEmits = {
|
|
48
47
|
'update:modelValue': [value: CascaderModelValue];
|
|
49
|
-
'update:value': [value: CascaderModelValue];
|
|
50
48
|
'update:popupVisible': [visible: boolean];
|
|
51
49
|
'update:show': [visible: boolean];
|
|
52
50
|
'change': [value: CascaderModelValue];
|
|
@@ -62,7 +60,6 @@ export interface CascaderPanelProps {
|
|
|
62
60
|
pathMode?: boolean;
|
|
63
61
|
multiple?: boolean;
|
|
64
62
|
modelValue?: CascaderModelValue;
|
|
65
|
-
value?: CascaderModelValue;
|
|
66
63
|
defaultValue?: CascaderModelValue;
|
|
67
64
|
options?: CascaderOption[];
|
|
68
65
|
expandTrigger?: CascaderExpandTrigger;
|
|
@@ -74,6 +71,5 @@ export interface CascaderPanelProps {
|
|
|
74
71
|
}
|
|
75
72
|
export type CascaderPanelEmits = {
|
|
76
73
|
'update:modelValue': [value: CascaderModelValue];
|
|
77
|
-
'update:value': [value: CascaderModelValue];
|
|
78
74
|
'change': [value: CascaderModelValue];
|
|
79
75
|
};
|
|
@@ -13,7 +13,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
13
13
|
type: BooleanConstructor;
|
|
14
14
|
default: boolean;
|
|
15
15
|
};
|
|
16
|
-
value: StringConstructor;
|
|
17
16
|
modelValue: StringConstructor;
|
|
18
17
|
defaultValue: {
|
|
19
18
|
type: StringConstructor;
|
|
@@ -55,22 +54,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
55
54
|
triggerProps: {
|
|
56
55
|
type: PropType<Partial<TriggerProps>>;
|
|
57
56
|
};
|
|
58
|
-
historyColors: {
|
|
59
|
-
type: PropType<string[]>;
|
|
60
|
-
};
|
|
61
|
-
presetColors: {
|
|
62
|
-
type: PropType<string[]>;
|
|
63
|
-
};
|
|
64
|
-
showText: BooleanConstructor;
|
|
65
|
-
showHistory: BooleanConstructor;
|
|
66
|
-
showPreset: BooleanConstructor;
|
|
67
|
-
disabledAlpha: BooleanConstructor;
|
|
68
|
-
selectInputProps: {
|
|
69
|
-
type: PropType<Record<string, unknown>>;
|
|
70
|
-
};
|
|
71
57
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
72
58
|
'update:modelValue': (_value: string) => true;
|
|
73
|
-
'update:value': (_value: string) => true;
|
|
74
59
|
change: (_value: string, _context: {
|
|
75
60
|
color: ColorObject;
|
|
76
61
|
trigger: ColorPickerChangeTrigger;
|
|
@@ -94,7 +79,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
94
79
|
type: BooleanConstructor;
|
|
95
80
|
default: boolean;
|
|
96
81
|
};
|
|
97
|
-
value: StringConstructor;
|
|
98
82
|
modelValue: StringConstructor;
|
|
99
83
|
defaultValue: {
|
|
100
84
|
type: StringConstructor;
|
|
@@ -136,19 +120,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
136
120
|
triggerProps: {
|
|
137
121
|
type: PropType<Partial<TriggerProps>>;
|
|
138
122
|
};
|
|
139
|
-
historyColors: {
|
|
140
|
-
type: PropType<string[]>;
|
|
141
|
-
};
|
|
142
|
-
presetColors: {
|
|
143
|
-
type: PropType<string[]>;
|
|
144
|
-
};
|
|
145
|
-
showText: BooleanConstructor;
|
|
146
|
-
showHistory: BooleanConstructor;
|
|
147
|
-
showPreset: BooleanConstructor;
|
|
148
|
-
disabledAlpha: BooleanConstructor;
|
|
149
|
-
selectInputProps: {
|
|
150
|
-
type: PropType<Record<string, unknown>>;
|
|
151
|
-
};
|
|
152
123
|
}>> & Readonly<{
|
|
153
124
|
onClear?: ((_context: {
|
|
154
125
|
e: MouseEvent;
|
|
@@ -158,7 +129,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
158
129
|
trigger: ColorPickerChangeTrigger;
|
|
159
130
|
}) => any) | undefined;
|
|
160
131
|
"onUpdate:modelValue"?: ((_value: string) => any) | undefined;
|
|
161
|
-
"onUpdate:value"?: ((_value: string) => any) | undefined;
|
|
162
132
|
"onPopup-visible-change"?: ((_visible: boolean, _value: string) => any) | undefined;
|
|
163
133
|
"onPalette-bar-change"?: ((_context: {
|
|
164
134
|
color: ColorObject;
|
|
@@ -178,10 +148,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
178
148
|
recentColors: RecentColorsValue;
|
|
179
149
|
swatchColors: string[] | null;
|
|
180
150
|
borderless: boolean;
|
|
181
|
-
showText: boolean;
|
|
182
|
-
showHistory: boolean;
|
|
183
|
-
showPreset: boolean;
|
|
184
|
-
disabledAlpha: boolean;
|
|
185
151
|
defaultRecentColors: RecentColorsValue;
|
|
186
152
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
187
153
|
export default _default;
|
|
@@ -24,7 +24,6 @@ var color_picker_default = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
* @zh 色值
|
|
25
25
|
* @en Value
|
|
26
26
|
*/
|
|
27
|
-
value: String,
|
|
28
27
|
modelValue: String,
|
|
29
28
|
/**
|
|
30
29
|
* @zh 默认色值
|
|
@@ -102,7 +101,7 @@ var color_picker_default = /* @__PURE__ */ defineComponent({
|
|
|
102
101
|
default: false
|
|
103
102
|
},
|
|
104
103
|
/**
|
|
105
|
-
* @zh
|
|
104
|
+
* @zh 是否内联面板
|
|
106
105
|
* @en Render panel inline
|
|
107
106
|
*/
|
|
108
107
|
hideTrigger: Boolean,
|
|
@@ -110,46 +109,10 @@ var color_picker_default = /* @__PURE__ */ defineComponent({
|
|
|
110
109
|
* @zh 透传 Trigger 组件属性
|
|
111
110
|
* @en Trigger props
|
|
112
111
|
*/
|
|
113
|
-
triggerProps: { type: Object }
|
|
114
|
-
/**
|
|
115
|
-
* @zh 兼容旧版历史颜色
|
|
116
|
-
* @en Legacy history colors
|
|
117
|
-
*/
|
|
118
|
-
historyColors: { type: Array },
|
|
119
|
-
/**
|
|
120
|
-
* @zh 兼容旧版预设颜色
|
|
121
|
-
* @en Legacy preset colors
|
|
122
|
-
*/
|
|
123
|
-
presetColors: { type: Array },
|
|
124
|
-
/**
|
|
125
|
-
* @zh 兼容旧版显示文字
|
|
126
|
-
* @en Legacy show text
|
|
127
|
-
*/
|
|
128
|
-
showText: Boolean,
|
|
129
|
-
/**
|
|
130
|
-
* @zh 兼容旧版显示历史色
|
|
131
|
-
* @en Legacy show history
|
|
132
|
-
*/
|
|
133
|
-
showHistory: Boolean,
|
|
134
|
-
/**
|
|
135
|
-
* @zh 兼容旧版显示预设色
|
|
136
|
-
* @en Legacy show preset
|
|
137
|
-
*/
|
|
138
|
-
showPreset: Boolean,
|
|
139
|
-
/**
|
|
140
|
-
* @zh 兼容旧版禁用透明通道
|
|
141
|
-
* @en Legacy disable alpha
|
|
142
|
-
*/
|
|
143
|
-
disabledAlpha: Boolean,
|
|
144
|
-
/**
|
|
145
|
-
* @zh 兼容 tdesign 的选择输入框透传属性,当前版本未使用
|
|
146
|
-
* @en Select input props
|
|
147
|
-
*/
|
|
148
|
-
selectInputProps: { type: Object }
|
|
112
|
+
triggerProps: { type: Object }
|
|
149
113
|
},
|
|
150
114
|
emits: {
|
|
151
115
|
"update:modelValue": (_value) => true,
|
|
152
|
-
"update:value": (_value) => true,
|
|
153
116
|
/**
|
|
154
117
|
* @zh 颜色值改变时触发
|
|
155
118
|
* @en Triggered when the color value changes
|
|
@@ -169,23 +132,19 @@ var color_picker_default = /* @__PURE__ */ defineComponent({
|
|
|
169
132
|
const innerValue = ref(props.defaultValue);
|
|
170
133
|
const innerRecentColors = ref(Array.isArray(props.defaultRecentColors) ? props.defaultRecentColors : []);
|
|
171
134
|
const mergedValue = computed(() => {
|
|
172
|
-
var
|
|
173
|
-
return (
|
|
135
|
+
var _props$modelValue;
|
|
136
|
+
return (_props$modelValue = props.modelValue) !== null && _props$modelValue !== void 0 ? _props$modelValue : innerValue.value;
|
|
174
137
|
});
|
|
175
|
-
const mergedEnableAlpha = computed(() => props.enableAlpha
|
|
138
|
+
const mergedEnableAlpha = computed(() => props.enableAlpha);
|
|
176
139
|
const normalizedFormat = computed(() => normalizeFormat(props.format, mergedEnableAlpha.value));
|
|
177
140
|
const mergedRecentColors = computed(() => {
|
|
178
|
-
if (props.showHistory && props.historyColors) return props.historyColors;
|
|
179
141
|
if (props.recentColors === null || props.recentColors === false) return props.recentColors;
|
|
180
142
|
if (Array.isArray(props.recentColors)) return props.recentColors;
|
|
181
143
|
return innerRecentColors.value;
|
|
182
144
|
});
|
|
183
145
|
const mergedSwatchColors = computed(() => {
|
|
184
|
-
var _props$presetColors;
|
|
185
|
-
if (props.showPreset) return (_props$presetColors = props.presetColors) !== null && _props$presetColors !== void 0 ? _props$presetColors : colors;
|
|
186
146
|
if (props.swatchColors === null) return null;
|
|
187
147
|
if (Array.isArray(props.swatchColors)) return props.swatchColors;
|
|
188
|
-
if (props.swatchColors === void 0 && props.showPreset === false) return null;
|
|
189
148
|
return colors;
|
|
190
149
|
});
|
|
191
150
|
const colorState = computed(() => parseColorState(mergedValue.value, props.colorModes));
|
|
@@ -198,9 +157,8 @@ var color_picker_default = /* @__PURE__ */ defineComponent({
|
|
|
198
157
|
return colorState.value.mode === "linear-gradient" ? { backgroundImage: background } : { backgroundColor: background };
|
|
199
158
|
});
|
|
200
159
|
const syncValue = (value) => {
|
|
201
|
-
if (props.modelValue === void 0
|
|
160
|
+
if (props.modelValue === void 0) innerValue.value = value;
|
|
202
161
|
emit("update:modelValue", value);
|
|
203
|
-
emit("update:value", value);
|
|
204
162
|
};
|
|
205
163
|
const syncRecentColors = (value) => {
|
|
206
164
|
if (props.recentColors === void 0) innerRecentColors.value = value;
|
|
@@ -13,7 +13,6 @@ declare const ColorPicker: {
|
|
|
13
13
|
type: BooleanConstructor;
|
|
14
14
|
default: boolean;
|
|
15
15
|
};
|
|
16
|
-
value: StringConstructor;
|
|
17
16
|
modelValue: StringConstructor;
|
|
18
17
|
defaultValue: {
|
|
19
18
|
type: StringConstructor;
|
|
@@ -55,19 +54,6 @@ declare const ColorPicker: {
|
|
|
55
54
|
triggerProps: {
|
|
56
55
|
type: import("vue").PropType<Partial<import("..").TriggerProps>>;
|
|
57
56
|
};
|
|
58
|
-
historyColors: {
|
|
59
|
-
type: import("vue").PropType<string[]>;
|
|
60
|
-
};
|
|
61
|
-
presetColors: {
|
|
62
|
-
type: import("vue").PropType<string[]>;
|
|
63
|
-
};
|
|
64
|
-
showText: BooleanConstructor;
|
|
65
|
-
showHistory: BooleanConstructor;
|
|
66
|
-
showPreset: BooleanConstructor;
|
|
67
|
-
disabledAlpha: BooleanConstructor;
|
|
68
|
-
selectInputProps: {
|
|
69
|
-
type: import("vue").PropType<Record<string, unknown>>;
|
|
70
|
-
};
|
|
71
57
|
}>> & Readonly<{
|
|
72
58
|
onClear?: ((_context: {
|
|
73
59
|
e: MouseEvent;
|
|
@@ -77,7 +63,6 @@ declare const ColorPicker: {
|
|
|
77
63
|
trigger: import("./interface").ColorPickerChangeTrigger;
|
|
78
64
|
}) => any) | undefined;
|
|
79
65
|
"onUpdate:modelValue"?: ((_value: string) => any) | undefined;
|
|
80
|
-
"onUpdate:value"?: ((_value: string) => any) | undefined;
|
|
81
66
|
"onPopup-visible-change"?: ((_visible: boolean, _value: string) => any) | undefined;
|
|
82
67
|
"onPalette-bar-change"?: ((_context: {
|
|
83
68
|
color: import("./interface").ColorObject;
|
|
@@ -85,7 +70,6 @@ declare const ColorPicker: {
|
|
|
85
70
|
"onRecent-colors-change"?: ((_value: string[]) => any) | undefined;
|
|
86
71
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
87
72
|
'update:modelValue': (_value: string) => true;
|
|
88
|
-
'update:value': (_value: string) => true;
|
|
89
73
|
change: (_value: string, _context: {
|
|
90
74
|
color: import("./interface").ColorObject;
|
|
91
75
|
trigger: import("./interface").ColorPickerChangeTrigger;
|
|
@@ -112,10 +96,6 @@ declare const ColorPicker: {
|
|
|
112
96
|
recentColors: import("./interface").RecentColorsValue;
|
|
113
97
|
swatchColors: string[] | null;
|
|
114
98
|
borderless: boolean;
|
|
115
|
-
showText: boolean;
|
|
116
|
-
showHistory: boolean;
|
|
117
|
-
showPreset: boolean;
|
|
118
|
-
disabledAlpha: boolean;
|
|
119
99
|
defaultRecentColors: import("./interface").RecentColorsValue;
|
|
120
100
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
121
101
|
P: {};
|
|
@@ -135,7 +115,6 @@ declare const ColorPicker: {
|
|
|
135
115
|
type: BooleanConstructor;
|
|
136
116
|
default: boolean;
|
|
137
117
|
};
|
|
138
|
-
value: StringConstructor;
|
|
139
118
|
modelValue: StringConstructor;
|
|
140
119
|
defaultValue: {
|
|
141
120
|
type: StringConstructor;
|
|
@@ -177,19 +156,6 @@ declare const ColorPicker: {
|
|
|
177
156
|
triggerProps: {
|
|
178
157
|
type: import("vue").PropType<Partial<import("..").TriggerProps>>;
|
|
179
158
|
};
|
|
180
|
-
historyColors: {
|
|
181
|
-
type: import("vue").PropType<string[]>;
|
|
182
|
-
};
|
|
183
|
-
presetColors: {
|
|
184
|
-
type: import("vue").PropType<string[]>;
|
|
185
|
-
};
|
|
186
|
-
showText: BooleanConstructor;
|
|
187
|
-
showHistory: BooleanConstructor;
|
|
188
|
-
showPreset: BooleanConstructor;
|
|
189
|
-
disabledAlpha: BooleanConstructor;
|
|
190
|
-
selectInputProps: {
|
|
191
|
-
type: import("vue").PropType<Record<string, unknown>>;
|
|
192
|
-
};
|
|
193
159
|
}>> & Readonly<{
|
|
194
160
|
onClear?: ((_context: {
|
|
195
161
|
e: MouseEvent;
|
|
@@ -199,7 +165,6 @@ declare const ColorPicker: {
|
|
|
199
165
|
trigger: import("./interface").ColorPickerChangeTrigger;
|
|
200
166
|
}) => any) | undefined;
|
|
201
167
|
"onUpdate:modelValue"?: ((_value: string) => any) | undefined;
|
|
202
|
-
"onUpdate:value"?: ((_value: string) => any) | undefined;
|
|
203
168
|
"onPopup-visible-change"?: ((_visible: boolean, _value: string) => any) | undefined;
|
|
204
169
|
"onPalette-bar-change"?: ((_context: {
|
|
205
170
|
color: import("./interface").ColorObject;
|
|
@@ -219,10 +184,6 @@ declare const ColorPicker: {
|
|
|
219
184
|
recentColors: import("./interface").RecentColorsValue;
|
|
220
185
|
swatchColors: string[] | null;
|
|
221
186
|
borderless: boolean;
|
|
222
|
-
showText: boolean;
|
|
223
|
-
showHistory: boolean;
|
|
224
|
-
showPreset: boolean;
|
|
225
|
-
disabledAlpha: boolean;
|
|
226
187
|
defaultRecentColors: import("./interface").RecentColorsValue;
|
|
227
188
|
}>;
|
|
228
189
|
__isFragment?: never;
|
|
@@ -239,7 +200,6 @@ declare const ColorPicker: {
|
|
|
239
200
|
type: BooleanConstructor;
|
|
240
201
|
default: boolean;
|
|
241
202
|
};
|
|
242
|
-
value: StringConstructor;
|
|
243
203
|
modelValue: StringConstructor;
|
|
244
204
|
defaultValue: {
|
|
245
205
|
type: StringConstructor;
|
|
@@ -281,19 +241,6 @@ declare const ColorPicker: {
|
|
|
281
241
|
triggerProps: {
|
|
282
242
|
type: import("vue").PropType<Partial<import("..").TriggerProps>>;
|
|
283
243
|
};
|
|
284
|
-
historyColors: {
|
|
285
|
-
type: import("vue").PropType<string[]>;
|
|
286
|
-
};
|
|
287
|
-
presetColors: {
|
|
288
|
-
type: import("vue").PropType<string[]>;
|
|
289
|
-
};
|
|
290
|
-
showText: BooleanConstructor;
|
|
291
|
-
showHistory: BooleanConstructor;
|
|
292
|
-
showPreset: BooleanConstructor;
|
|
293
|
-
disabledAlpha: BooleanConstructor;
|
|
294
|
-
selectInputProps: {
|
|
295
|
-
type: import("vue").PropType<Record<string, unknown>>;
|
|
296
|
-
};
|
|
297
244
|
}>> & Readonly<{
|
|
298
245
|
onClear?: ((_context: {
|
|
299
246
|
e: MouseEvent;
|
|
@@ -303,7 +250,6 @@ declare const ColorPicker: {
|
|
|
303
250
|
trigger: import("./interface").ColorPickerChangeTrigger;
|
|
304
251
|
}) => any) | undefined;
|
|
305
252
|
"onUpdate:modelValue"?: ((_value: string) => any) | undefined;
|
|
306
|
-
"onUpdate:value"?: ((_value: string) => any) | undefined;
|
|
307
253
|
"onPopup-visible-change"?: ((_visible: boolean, _value: string) => any) | undefined;
|
|
308
254
|
"onPalette-bar-change"?: ((_context: {
|
|
309
255
|
color: import("./interface").ColorObject;
|
|
@@ -311,7 +257,6 @@ declare const ColorPicker: {
|
|
|
311
257
|
"onRecent-colors-change"?: ((_value: string[]) => any) | undefined;
|
|
312
258
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
313
259
|
'update:modelValue': (_value: string) => true;
|
|
314
|
-
'update:value': (_value: string) => true;
|
|
315
260
|
change: (_value: string, _context: {
|
|
316
261
|
color: import("./interface").ColorObject;
|
|
317
262
|
trigger: import("./interface").ColorPickerChangeTrigger;
|
|
@@ -338,10 +283,6 @@ declare const ColorPicker: {
|
|
|
338
283
|
recentColors: import("./interface").RecentColorsValue;
|
|
339
284
|
swatchColors: string[] | null;
|
|
340
285
|
borderless: boolean;
|
|
341
|
-
showText: boolean;
|
|
342
|
-
showHistory: boolean;
|
|
343
|
-
showPreset: boolean;
|
|
344
|
-
disabledAlpha: boolean;
|
|
345
286
|
defaultRecentColors: import("./interface").RecentColorsValue;
|
|
346
287
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
347
288
|
install: (app: App, options?: SDOptions) => void;
|
|
@@ -342,19 +342,12 @@
|
|
|
342
342
|
.sd-color-picker-panel .sd-color-picker-select {
|
|
343
343
|
width: 58px;
|
|
344
344
|
}
|
|
345
|
-
.sd-color-picker-panel .sd-color-picker-input-alpha {
|
|
346
|
-
flex: 0 0 auto;
|
|
347
|
-
width: 52px;
|
|
348
|
-
}
|
|
349
345
|
.sd-color-picker-panel .sd-color-picker-input-group {
|
|
350
346
|
width: 100%;
|
|
351
347
|
}
|
|
352
348
|
.sd-color-picker-panel .sd-color-picker-format-input {
|
|
353
349
|
min-width: 0;
|
|
354
350
|
}
|
|
355
|
-
.sd-color-picker-panel .sd-color-picker-input-hex .sd-input {
|
|
356
|
-
padding-left: 4px;
|
|
357
|
-
}
|
|
358
351
|
.sd-color-picker-panel.sd-color-picker-panel-disabled .sd-color-picker-palette,
|
|
359
352
|
.sd-color-picker-panel.sd-color-picker-panel-disabled .sd-color-picker-control-bar,
|
|
360
353
|
.sd-color-picker-panel.sd-color-picker-panel-disabled .sd-color-picker-color-block,
|
|
@@ -396,11 +396,6 @@ $token-vars: map.merge(meta.module-variables('inputToken'), meta.module-variable
|
|
|
396
396
|
width: $color-panel-format-select-width;
|
|
397
397
|
}
|
|
398
398
|
|
|
399
|
-
.#{$color-picker-prefix-cls}-input-alpha {
|
|
400
|
-
flex: 0 0 auto;
|
|
401
|
-
width: $color-panel-alpha-input-width;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
399
|
.#{$color-picker-prefix-cls}-input-group {
|
|
405
400
|
width: 100%;
|
|
406
401
|
}
|
|
@@ -409,12 +404,6 @@ $token-vars: map.merge(meta.module-variables('inputToken'), meta.module-variable
|
|
|
409
404
|
min-width: 0;
|
|
410
405
|
}
|
|
411
406
|
|
|
412
|
-
.#{$color-picker-prefix-cls}-input-hex {
|
|
413
|
-
.#{theme.$prefix}-input {
|
|
414
|
-
padding-left: global.$spacing-2;
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
|
|
418
407
|
&#{&}-disabled {
|
|
419
408
|
.#{$color-picker-prefix-cls}-palette,
|
|
420
409
|
.#{$color-picker-prefix-cls}-control-bar,
|