@uzum-tech/ui 1.5.2 → 1.5.3
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/README.md +0 -1
- package/dist/index.js +1030 -564
- package/dist/index.prod.js +3 -3
- package/es/_internal/checkbox/src/use-checkbox.js +3 -3
- package/es/_internal/radio/src/use-radio.js +3 -3
- package/es/_mixins/use-form-item.d.ts +4 -4
- package/es/_mixins/use-form-item.js +4 -4
- package/es/_styles/common/dark.js +1 -1
- package/es/_styles/common/light.d.ts +3 -0
- package/es/_styles/common/light.js +1 -1
- package/es/_utils/composable/composables.d.ts +11 -0
- package/es/_utils/composable/composables.js +40 -0
- package/es/_utils/index.d.ts +1 -1
- package/es/_utils/index.js +1 -1
- package/es/_utils/uzum/index.d.ts +1 -0
- package/es/_utils/uzum/index.js +1 -0
- package/es/_utils/uzum/value.d.ts +1 -0
- package/es/_utils/uzum/value.js +9 -0
- package/es/_utils/vue/resolve-slot.d.ts +1 -1
- package/es/alert/styles/light.js +6 -6
- package/es/auto-complete/src/AutoComplete.js +10 -10
- package/es/avatar/src/Avatar.d.ts +6 -0
- package/es/avatar/src/Avatar.js +9 -3
- package/es/card-list/src/CardList.js +1 -1
- package/es/card-list/src/CardListItem.d.ts +13 -0
- package/es/card-list/src/CardListItem.js +11 -4
- package/es/card-list/src/interface.d.ts +1 -0
- package/es/card-list/src/styles/index.cssr.js +6 -6
- package/es/card-list/styles/light.js +2 -2
- package/es/cascader/src/Cascader.js +7 -7
- package/es/checkbox/src/CheckboxGroup.js +9 -9
- package/es/color-picker/src/ColorPicker.js +6 -6
- package/es/components.d.ts +1 -0
- package/es/components.js +1 -0
- package/es/config-provider/src/internal-interface.d.ts +2 -0
- package/es/data-table/src/DataTable.d.ts +5 -0
- package/es/data-table/src/DataTable.js +20 -10
- package/es/data-table/src/TableParts/Body.js +3 -2
- package/es/data-table/src/TableParts/Cell.js +85 -23
- package/es/data-table/src/interface.d.ts +11 -6
- package/es/data-table/src/styles/index.cssr.js +5 -3
- package/es/data-table/src/use-mask.d.ts +3 -6
- package/es/data-table/src/utils.d.ts +2 -1
- package/es/data-table/src/utils.js +13 -0
- package/es/date-picker/src/DatePicker.js +7 -7
- package/es/dialog/src/DialogProvider.d.ts +6 -0
- package/es/dynamic-tags/src/DynamicTags.js +3 -3
- package/es/input/src/Input.js +8 -8
- package/es/input-number/src/InputNumber.js +7 -7
- package/es/input-otp/index.d.ts +3 -0
- package/es/input-otp/index.js +1 -0
- package/es/input-otp/src/InputOtp.d.ts +871 -0
- package/es/input-otp/src/InputOtp.js +250 -0
- package/es/input-otp/src/public-types.d.ts +25 -0
- package/es/input-otp/src/public-types.js +1 -0
- package/es/input-otp/src/styles/index.cssr.d.ts +2 -0
- package/es/input-otp/src/styles/index.cssr.js +20 -0
- package/es/input-otp/src/styles/input-otp-rtl.cssr.d.ts +2 -0
- package/es/input-otp/src/styles/input-otp-rtl.cssr.js +5 -0
- package/es/input-otp/styles/dark.d.ts +3 -0
- package/es/input-otp/styles/dark.js +12 -0
- package/es/input-otp/styles/index.d.ts +4 -0
- package/es/input-otp/styles/index.js +3 -0
- package/es/input-otp/styles/light.d.ts +83 -0
- package/es/input-otp/styles/light.js +22 -0
- package/es/input-otp/styles/rtl.d.ts +2 -0
- package/es/input-otp/styles/rtl.js +5 -0
- package/es/legacy-transfer/src/Transfer.js +3 -3
- package/es/list/src/ListItem.js +8 -4
- package/es/mention/src/Mention.js +7 -7
- package/es/radio/src/RadioGroup.js +5 -5
- package/es/rate/src/Rate.js +3 -3
- package/es/select/src/Select.js +7 -7
- package/es/slider/src/Slider.js +3 -3
- package/es/styles.d.ts +1 -0
- package/es/styles.js +1 -0
- package/es/switch/src/Switch.js +7 -7
- package/es/theme-editor/src/ThemeEditor.d.ts +3 -0
- package/es/themes/dark.js +2 -0
- package/es/themes/light.js +2 -0
- package/es/time-picker/src/TimePicker.js +7 -7
- package/es/transfer/src/Transfer.js +3 -3
- package/es/tree-select/src/TreeSelect.js +5 -5
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/checkbox/src/use-checkbox.js +3 -3
- package/lib/_internal/radio/src/use-radio.js +3 -3
- package/lib/_mixins/use-form-item.d.ts +4 -4
- package/lib/_mixins/use-form-item.js +4 -4
- package/lib/_styles/common/dark.js +1 -1
- package/lib/_styles/common/light.d.ts +3 -0
- package/lib/_styles/common/light.js +1 -1
- package/lib/_utils/composable/composables.d.ts +11 -0
- package/lib/_utils/composable/composables.js +47 -0
- package/lib/_utils/index.d.ts +1 -1
- package/lib/_utils/index.js +2 -1
- package/lib/_utils/uzum/index.d.ts +1 -0
- package/lib/_utils/uzum/index.js +3 -1
- package/lib/_utils/uzum/value.d.ts +1 -0
- package/lib/_utils/uzum/value.js +12 -0
- package/lib/_utils/vue/resolve-slot.d.ts +1 -1
- package/lib/alert/styles/light.js +6 -6
- package/lib/auto-complete/src/AutoComplete.js +10 -10
- package/lib/avatar/src/Avatar.d.ts +6 -0
- package/lib/avatar/src/Avatar.js +9 -3
- package/lib/card-list/src/CardList.js +1 -1
- package/lib/card-list/src/CardListItem.d.ts +13 -0
- package/lib/card-list/src/CardListItem.js +11 -4
- package/lib/card-list/src/interface.d.ts +1 -0
- package/lib/card-list/src/styles/index.cssr.js +5 -5
- package/lib/card-list/styles/light.js +2 -2
- package/lib/cascader/src/Cascader.js +7 -7
- package/lib/checkbox/src/CheckboxGroup.js +9 -9
- package/lib/color-picker/src/ColorPicker.js +6 -6
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -0
- package/lib/config-provider/src/internal-interface.d.ts +2 -0
- package/lib/data-table/src/DataTable.d.ts +5 -0
- package/lib/data-table/src/DataTable.js +20 -10
- package/lib/data-table/src/TableParts/Body.js +3 -2
- package/lib/data-table/src/TableParts/Cell.js +84 -22
- package/lib/data-table/src/interface.d.ts +11 -6
- package/lib/data-table/src/styles/index.cssr.js +5 -3
- package/lib/data-table/src/use-mask.d.ts +3 -6
- package/lib/data-table/src/utils.d.ts +2 -1
- package/lib/data-table/src/utils.js +14 -1
- package/lib/date-picker/src/DatePicker.js +7 -7
- package/lib/dialog/src/DialogProvider.d.ts +6 -0
- package/lib/dynamic-tags/src/DynamicTags.js +3 -3
- package/lib/input/src/Input.js +8 -8
- package/lib/input-number/src/InputNumber.js +7 -7
- package/lib/input-otp/index.d.ts +3 -0
- package/lib/input-otp/index.js +9 -0
- package/lib/input-otp/src/InputOtp.d.ts +871 -0
- package/lib/input-otp/src/InputOtp.js +256 -0
- package/lib/input-otp/src/public-types.d.ts +25 -0
- package/lib/input-otp/src/public-types.js +2 -0
- package/lib/input-otp/src/styles/index.cssr.d.ts +2 -0
- package/lib/input-otp/src/styles/index.cssr.js +25 -0
- package/lib/input-otp/src/styles/input-otp-rtl.cssr.d.ts +2 -0
- package/lib/input-otp/src/styles/input-otp-rtl.cssr.js +10 -0
- package/lib/input-otp/styles/dark.d.ts +3 -0
- package/lib/input-otp/styles/dark.js +14 -0
- package/lib/input-otp/styles/index.d.ts +4 -0
- package/lib/input-otp/styles/index.js +12 -0
- package/lib/input-otp/styles/light.d.ts +83 -0
- package/lib/input-otp/styles/light.js +25 -0
- package/lib/input-otp/styles/rtl.d.ts +2 -0
- package/lib/input-otp/styles/rtl.js +11 -0
- package/lib/legacy-transfer/src/Transfer.js +3 -3
- package/lib/list/src/ListItem.js +8 -4
- package/lib/mention/src/Mention.js +7 -7
- package/lib/radio/src/RadioGroup.js +5 -5
- package/lib/rate/src/Rate.js +3 -3
- package/lib/select/src/Select.js +7 -7
- package/lib/slider/src/Slider.js +3 -3
- package/lib/styles.d.ts +1 -0
- package/lib/styles.js +106 -103
- package/lib/switch/src/Switch.js +7 -7
- package/lib/theme-editor/src/ThemeEditor.d.ts +3 -0
- package/lib/themes/dark.js +2 -0
- package/lib/themes/light.js +2 -0
- package/lib/time-picker/src/TimePicker.js +7 -7
- package/lib/transfer/src/Transfer.js +3 -3
- package/lib/tree-select/src/TreeSelect.js +5 -5
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/volar.d.ts +1 -0
- package/web-types.json +119 -4
package/es/select/src/Select.js
CHANGED
|
@@ -223,7 +223,7 @@ export default defineComponent({
|
|
|
223
223
|
const { mergedDisabledRef, mergedStatusRef } = formItem;
|
|
224
224
|
function doUpdateValue(value, option) {
|
|
225
225
|
const { onChange, 'onUpdate:value': _onUpdateValue, onUpdateValue } = props;
|
|
226
|
-
const {
|
|
226
|
+
const { triggerFormChange, triggerFormInput } = formItem;
|
|
227
227
|
if (onChange)
|
|
228
228
|
call(onChange, value, option);
|
|
229
229
|
if (onUpdateValue)
|
|
@@ -232,15 +232,15 @@ export default defineComponent({
|
|
|
232
232
|
call(_onUpdateValue, value, option);
|
|
233
233
|
}
|
|
234
234
|
uncontrolledValueRef.value = value;
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
triggerFormChange();
|
|
236
|
+
triggerFormInput();
|
|
237
237
|
}
|
|
238
238
|
function doBlur(e) {
|
|
239
239
|
const { onBlur } = props;
|
|
240
|
-
const {
|
|
240
|
+
const { triggerFormBlur } = formItem;
|
|
241
241
|
if (onBlur)
|
|
242
242
|
call(onBlur, e);
|
|
243
|
-
|
|
243
|
+
triggerFormBlur();
|
|
244
244
|
}
|
|
245
245
|
function doClear() {
|
|
246
246
|
const { onClear } = props;
|
|
@@ -249,10 +249,10 @@ export default defineComponent({
|
|
|
249
249
|
}
|
|
250
250
|
function doFocus(e) {
|
|
251
251
|
const { onFocus, showOnFocus } = props;
|
|
252
|
-
const {
|
|
252
|
+
const { triggerFormFocus } = formItem;
|
|
253
253
|
if (onFocus)
|
|
254
254
|
call(onFocus, e);
|
|
255
|
-
|
|
255
|
+
triggerFormFocus();
|
|
256
256
|
if (showOnFocus) {
|
|
257
257
|
openMenu();
|
|
258
258
|
}
|
package/es/slider/src/Slider.js
CHANGED
|
@@ -169,14 +169,14 @@ export default defineComponent({
|
|
|
169
169
|
}
|
|
170
170
|
function doUpdateValue(value) {
|
|
171
171
|
const { 'onUpdate:value': _onUpdateValue, onUpdateValue } = props;
|
|
172
|
-
const {
|
|
172
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
173
173
|
if (onUpdateValue)
|
|
174
174
|
call(onUpdateValue, value);
|
|
175
175
|
if (_onUpdateValue)
|
|
176
176
|
call(_onUpdateValue, value);
|
|
177
177
|
uncontrolledValueRef.value = value;
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
triggerFormInput();
|
|
179
|
+
triggerFormChange();
|
|
180
180
|
}
|
|
181
181
|
function dispatchValueUpdate(value) {
|
|
182
182
|
const { range } = props;
|
package/es/styles.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export { gradientTextDark } from './gradient-text/styles';
|
|
|
34
34
|
export { iconDark } from './icon/styles';
|
|
35
35
|
export { inputDark, inputRtl as unstableInputRtl } from './input/styles';
|
|
36
36
|
export { inputNumberDark, inputNumberRtl as unstableInputNumberRtl } from './input-number/styles';
|
|
37
|
+
export { inputOtpDark, inputOtpRtl as unstableInputOtpRtl } from './input-otp/styles';
|
|
37
38
|
export { layoutDark } from './layout/styles';
|
|
38
39
|
export { listDark, listRtl as unstableListRtl } from './list/styles';
|
|
39
40
|
export { loadingBarDark } from './loading-bar/styles';
|
package/es/styles.js
CHANGED
|
@@ -34,6 +34,7 @@ export { gradientTextDark } from './gradient-text/styles';
|
|
|
34
34
|
export { iconDark } from './icon/styles';
|
|
35
35
|
export { inputDark, inputRtl as unstableInputRtl } from './input/styles';
|
|
36
36
|
export { inputNumberDark, inputNumberRtl as unstableInputNumberRtl } from './input-number/styles';
|
|
37
|
+
export { inputOtpDark, inputOtpRtl as unstableInputOtpRtl } from './input-otp/styles';
|
|
37
38
|
export { layoutDark } from './layout/styles';
|
|
38
39
|
export { listDark, listRtl as unstableListRtl } from './list/styles';
|
|
39
40
|
export { loadingBarDark } from './loading-bar/styles';
|
package/es/switch/src/Switch.js
CHANGED
|
@@ -80,7 +80,7 @@ export default defineComponent({
|
|
|
80
80
|
});
|
|
81
81
|
function doUpdateValue(value) {
|
|
82
82
|
const { 'onUpdate:value': _onUpdateValue, onChange, onUpdateValue } = props;
|
|
83
|
-
const {
|
|
83
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
84
84
|
if (_onUpdateValue)
|
|
85
85
|
call(_onUpdateValue, value);
|
|
86
86
|
if (onUpdateValue)
|
|
@@ -88,16 +88,16 @@ export default defineComponent({
|
|
|
88
88
|
if (onChange)
|
|
89
89
|
call(onChange, value);
|
|
90
90
|
uncontrolledValueRef.value = value;
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
triggerFormInput();
|
|
92
|
+
triggerFormChange();
|
|
93
93
|
}
|
|
94
94
|
function doFocus() {
|
|
95
|
-
const {
|
|
96
|
-
|
|
95
|
+
const { triggerFormFocus } = formItem;
|
|
96
|
+
triggerFormFocus();
|
|
97
97
|
}
|
|
98
98
|
function doBlur() {
|
|
99
|
-
const {
|
|
100
|
-
|
|
99
|
+
const { triggerFormBlur } = formItem;
|
|
100
|
+
triggerFormBlur();
|
|
101
101
|
}
|
|
102
102
|
function handleClick() {
|
|
103
103
|
if (props.loading || mergedDisabledRef.value)
|
|
@@ -17,6 +17,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
17
17
|
scrollbarHeight: string;
|
|
18
18
|
scrollbarBorderRadius: string;
|
|
19
19
|
opacityDisabled: string;
|
|
20
|
+
brand150: string;
|
|
21
|
+
brand350: string;
|
|
22
|
+
brand550: string;
|
|
20
23
|
brandPrimary50: string;
|
|
21
24
|
brandPrimary100: string;
|
|
22
25
|
brandPrimary200: string;
|
package/es/themes/dark.js
CHANGED
|
@@ -86,6 +86,7 @@ import { toggleButtonDark } from '../toggle-button/styles';
|
|
|
86
86
|
import { accountOptionDark } from '../_internal/account-option/styles';
|
|
87
87
|
import { flexDark } from '../flex/styles';
|
|
88
88
|
import { actionCardDark } from '../action-card/styles';
|
|
89
|
+
import { inputOtpDark } from '../styles';
|
|
89
90
|
export const darkTheme = {
|
|
90
91
|
name: 'dark',
|
|
91
92
|
common: commonDark,
|
|
@@ -130,6 +131,7 @@ export const darkTheme = {
|
|
|
130
131
|
IconWrapper: iconWrapperDark,
|
|
131
132
|
Image: imageDark,
|
|
132
133
|
Input: inputDark,
|
|
134
|
+
InputOtp: inputOtpDark,
|
|
133
135
|
InputNumber: inputNumberDark,
|
|
134
136
|
LegacyTransfer: legacyTransferDark,
|
|
135
137
|
Layout: layoutDark,
|
package/es/themes/light.js
CHANGED
|
@@ -88,6 +88,7 @@ import { toggleButtonLight } from '../toggle-button/styles';
|
|
|
88
88
|
import { accountOptionLight } from '../_internal/account-option/styles';
|
|
89
89
|
import { flexLight } from '../flex/styles';
|
|
90
90
|
import { actionCardLight } from '../action-card/styles';
|
|
91
|
+
import { inputOtpLight } from '../input-otp/styles';
|
|
91
92
|
export const lightTheme = {
|
|
92
93
|
name: 'light',
|
|
93
94
|
common: commonLight,
|
|
@@ -132,6 +133,7 @@ export const lightTheme = {
|
|
|
132
133
|
IconWrapper: iconWrapperLight,
|
|
133
134
|
Image: imageLight,
|
|
134
135
|
Input: inputLight,
|
|
136
|
+
InputOtp: inputOtpLight,
|
|
135
137
|
InputNumber: inputNumberLight,
|
|
136
138
|
Layout: layoutLight,
|
|
137
139
|
LegacyTransfer: legacyTransferLight,
|
|
@@ -247,7 +247,7 @@ export default defineComponent({
|
|
|
247
247
|
}
|
|
248
248
|
function doUpdateValue(value) {
|
|
249
249
|
const { onUpdateValue, 'onUpdate:value': _onUpdateValue, onChange } = props;
|
|
250
|
-
const {
|
|
250
|
+
const { triggerFormChange, triggerFormInput } = formItem;
|
|
251
251
|
const formattedValue = createFormattedValue(value);
|
|
252
252
|
if (onUpdateValue) {
|
|
253
253
|
call(onUpdateValue, value, formattedValue);
|
|
@@ -259,22 +259,22 @@ export default defineComponent({
|
|
|
259
259
|
call(onChange, value, formattedValue);
|
|
260
260
|
doUpdateFormattedValue(formattedValue, value);
|
|
261
261
|
uncontrolledValueRef.value = value;
|
|
262
|
-
|
|
263
|
-
|
|
262
|
+
triggerFormChange();
|
|
263
|
+
triggerFormInput();
|
|
264
264
|
}
|
|
265
265
|
function doFocus(e) {
|
|
266
266
|
const { onFocus } = props;
|
|
267
|
-
const {
|
|
267
|
+
const { triggerFormFocus } = formItem;
|
|
268
268
|
if (onFocus)
|
|
269
269
|
call(onFocus, e);
|
|
270
|
-
|
|
270
|
+
triggerFormFocus();
|
|
271
271
|
}
|
|
272
272
|
function doBlur(e) {
|
|
273
273
|
const { onBlur } = props;
|
|
274
|
-
const {
|
|
274
|
+
const { triggerFormBlur } = formItem;
|
|
275
275
|
if (onBlur)
|
|
276
276
|
call(onBlur, e);
|
|
277
|
-
|
|
277
|
+
triggerFormBlur();
|
|
278
278
|
}
|
|
279
279
|
function doConfirm() {
|
|
280
280
|
const { onConfirm } = props;
|
|
@@ -63,7 +63,7 @@ export default defineComponent({
|
|
|
63
63
|
const { uncontrolledValueRef, mergedValueRef, targetValueSetRef, valueSetForCheckAllRef, valueSetForUncheckAllRef, valueSetForClearRef, filteredTgtOptionsRef, filteredSrcOptionsRef, targetOptionsRef, canNotSelectAnythingRef, canBeClearedRef, allCheckedRef, srcPatternRef, tgtPatternRef, mergedSrcFilterableRef, handleSrcFilterUpdateValue, handleTgtFilterUpdateValue } = useTransferData(props);
|
|
64
64
|
function doUpdateValue(value) {
|
|
65
65
|
const { onUpdateValue, 'onUpdate:value': _onUpdateValue, onChange } = props;
|
|
66
|
-
const {
|
|
66
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
67
67
|
if (onUpdateValue)
|
|
68
68
|
call(onUpdateValue, value);
|
|
69
69
|
if (_onUpdateValue)
|
|
@@ -71,8 +71,8 @@ export default defineComponent({
|
|
|
71
71
|
if (onChange)
|
|
72
72
|
call(onChange, value);
|
|
73
73
|
uncontrolledValueRef.value = value;
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
triggerFormInput();
|
|
75
|
+
triggerFormChange();
|
|
76
76
|
}
|
|
77
77
|
function handleSourceCheckAll() {
|
|
78
78
|
doUpdateValue([...valueSetForCheckAllRef.value]);
|
|
@@ -70,7 +70,7 @@ export default defineComponent({
|
|
|
70
70
|
const menuElRef = ref(null);
|
|
71
71
|
const { mergedClsPrefixRef, namespaceRef, inlineThemeDisabled } = useConfig(props);
|
|
72
72
|
const { localeRef } = useLocale('Select');
|
|
73
|
-
const { mergedSizeRef, mergedDisabledRef, mergedStatusRef,
|
|
73
|
+
const { mergedSizeRef, mergedDisabledRef, mergedStatusRef, triggerFormBlur, triggerFormChange, triggerFormFocus, triggerFormInput } = useFormItem(props);
|
|
74
74
|
const uncontrolledValueRef = ref(props.defaultValue);
|
|
75
75
|
const controlledValueRef = toRef(props, 'value');
|
|
76
76
|
const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef);
|
|
@@ -207,8 +207,8 @@ export default defineComponent({
|
|
|
207
207
|
call(_onUpdateValue, value, option, meta);
|
|
208
208
|
}
|
|
209
209
|
uncontrolledValueRef.value = value;
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
triggerFormInput();
|
|
211
|
+
triggerFormChange();
|
|
212
212
|
}
|
|
213
213
|
function doUpdateIndeterminateKeys(value, option) {
|
|
214
214
|
const { onUpdateIndeterminateKeys, 'onUpdate:indeterminateKeys': _onUpdateIndeterminateKeys } = props;
|
|
@@ -233,14 +233,14 @@ export default defineComponent({
|
|
|
233
233
|
const { onFocus } = props;
|
|
234
234
|
if (onFocus)
|
|
235
235
|
onFocus(e);
|
|
236
|
-
|
|
236
|
+
triggerFormFocus();
|
|
237
237
|
}
|
|
238
238
|
function doBlur(e) {
|
|
239
239
|
closeMenu();
|
|
240
240
|
const { onBlur } = props;
|
|
241
241
|
if (onBlur)
|
|
242
242
|
onBlur(e);
|
|
243
|
-
|
|
243
|
+
triggerFormBlur();
|
|
244
244
|
}
|
|
245
245
|
function closeMenu() {
|
|
246
246
|
doUpdateShow(false);
|
package/es/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.5.
|
|
1
|
+
declare const _default: "1.5.3";
|
|
2
2
|
export default _default;
|
package/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.5.
|
|
1
|
+
export default '1.5.3';
|
|
@@ -103,7 +103,7 @@ const useCheckbox = (props) => {
|
|
|
103
103
|
}
|
|
104
104
|
else {
|
|
105
105
|
const { onChange, 'onUpdate:checked': _onUpdateCheck, onUpdateChecked } = props;
|
|
106
|
-
const {
|
|
106
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
107
107
|
const nextChecked = renderedCheckedRef.value
|
|
108
108
|
? props.uncheckedValue
|
|
109
109
|
: props.checkedValue;
|
|
@@ -115,8 +115,8 @@ const useCheckbox = (props) => {
|
|
|
115
115
|
}
|
|
116
116
|
if (onChange)
|
|
117
117
|
(0, _utils_1.call)(onChange, nextChecked, e); // deprecated
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
triggerFormInput();
|
|
119
|
+
triggerFormChange();
|
|
120
120
|
uncontrolledCheckedRef.value = nextChecked;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
@@ -88,15 +88,15 @@ function useRadio(props) {
|
|
|
88
88
|
}
|
|
89
89
|
else {
|
|
90
90
|
const { onUpdateChecked, 'onUpdate:checked': _onUpdateChecked, onChange } = props;
|
|
91
|
-
const {
|
|
91
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
92
92
|
if (onUpdateChecked)
|
|
93
93
|
(0, _utils_1.call)(onUpdateChecked, true);
|
|
94
94
|
if (_onUpdateChecked)
|
|
95
95
|
(0, _utils_1.call)(_onUpdateChecked, true);
|
|
96
96
|
if (onChange)
|
|
97
97
|
onChange(e);
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
triggerFormInput();
|
|
99
|
+
triggerFormChange();
|
|
100
100
|
uncontrolledCheckedRef.value = true;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
@@ -28,10 +28,10 @@ export interface UseFormItem<T> {
|
|
|
28
28
|
mergedSizeRef: ComputedRef<T>;
|
|
29
29
|
mergedDisabledRef: ComputedRef<boolean>;
|
|
30
30
|
mergedStatusRef: ComputedRef<FormValidationStatus | undefined>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
triggerFormBlur: () => void;
|
|
32
|
+
triggerFormChange: () => void;
|
|
33
|
+
triggerFormFocus: () => void;
|
|
34
|
+
triggerFormInput: () => void;
|
|
35
35
|
}
|
|
36
36
|
export default function useFormItem<T extends AllowedSize = FormItemSize>(props: UseFormItemProps<T>, { defaultSize, mergedSize, mergedDisabled }?: UseFormItemOptions<T>): UseFormItem<T>;
|
|
37
37
|
export {};
|
|
@@ -49,22 +49,22 @@ function useFormItem(props, { defaultSize = 'medium', mergedSize, mergedDisabled
|
|
|
49
49
|
mergedSizeRef,
|
|
50
50
|
mergedDisabledRef,
|
|
51
51
|
mergedStatusRef,
|
|
52
|
-
|
|
52
|
+
triggerFormBlur() {
|
|
53
53
|
if (UFormItem) {
|
|
54
54
|
UFormItem.handleContentBlur();
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
|
|
57
|
+
triggerFormChange() {
|
|
58
58
|
if (UFormItem) {
|
|
59
59
|
UFormItem.handleContentChange();
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
|
|
62
|
+
triggerFormFocus() {
|
|
63
63
|
if (UFormItem) {
|
|
64
64
|
UFormItem.handleContentFocus();
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
-
|
|
67
|
+
triggerFormInput() {
|
|
68
68
|
if (UFormItem) {
|
|
69
69
|
UFormItem.handleContentInput();
|
|
70
70
|
}
|
|
@@ -4,6 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const _common_1 = __importDefault(require("./_common"));
|
|
7
|
-
const derived = Object.assign(Object.assign({ name: 'common' }, _common_1.default), { scrollbarColor: 'rgba(255, 255, 255, 0.25)', scrollbarColorHover: 'rgba(255, 255, 255, 0.4)', scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', opacityDisabled: '0.5', brandPrimary50: '#2B204E', brandPrimary100: '#412A89', brandPrimary200: '#6A40ED', brandPrimary300: '#BBA2FD', brandPrimary400: '#7748F1', brandPrimary500: '#8967F1', brandPrimary550: '#6607DF', brandPrimary600: '#5D46A6', brandSecondary500: '#FFFF54', brandSecondary300: '#FDF5A6', brandSecondary600: '#F9DE6D', brandTertiary500: '#C4ED70', brandTertiary300: '#DCF0AF', brandTertiary600: '#9DED70', brandQuaternary500: '#90DDFB', brandQuaternary300: '#C5ECFD', brandQuaternary600: '#54B8F9', brandQuinary500: '#EC616A', brandQuinary300: '#F19EDA', brandQuinary600: '#EA3E68', brandQuinary100: '#FAD6D9', surfacePrimary: '#101010', surfaceSecondary: '#1D1D1D', containerPrimary: '#1D1D1D', containerSecondary: '#313135', textPrimary: '#F3F4F6', textSecondary: '#808080', textTertiary: '#999999', textQuaternary: '#101010', textBrand: '#F3F4F6', elementsPrimary: '#F3F4F6', elementsSecondary: '#101010', elementsTertiary: '#222222', elementsQuaternary: '#424247', elementsQuinary: '#707479', elementsDarkQuinary: '#919396', elementsSenary: '#DFDFDF', elementsOnContainer: '#101010', transparencyPrimary: 'rgba(255, 255, 255, 0.1)', transparencySecondary: 'rgba(255, 255, 255, 0.07)', transparencyTertiary: 'rgba(255, 255, 255, 0.16)', transparencyQuinary: 'rgba(255, 255, 255, 0.32)', transparencyModal: 'rgba(0, 0, 0, 0.75)', staticBlack: '#101010', staticDarkGrey: '#2C2C2D', staticWhite: '#FFFFFF', staticRed: '#F24835', staticOrange: '#F48C2C', staticGreen: '#09B849', staticDeepBlue: '#2F53CD', staticErrorAccent: '#CB0000', shadowDepth2: '0 0 0 1px #424247', shadowDepth: '0px 8px 8px 0px rgba(255, 255, 255, 0.25)' // В дизайне тень вообще отсутствует, пока что пусть побудет визуально как border
|
|
7
|
+
const derived = Object.assign(Object.assign({ name: 'common' }, _common_1.default), { scrollbarColor: 'rgba(255, 255, 255, 0.25)', scrollbarColorHover: 'rgba(255, 255, 255, 0.4)', scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', opacityDisabled: '0.5', brand150: '#FFF3D3', brand350: '#F1F9DF', brand550: '#FFF3F4', brandPrimary50: '#2B204E', brandPrimary100: '#412A89', brandPrimary200: '#6A40ED', brandPrimary300: '#BBA2FD', brandPrimary400: '#7748F1', brandPrimary500: '#8967F1', brandPrimary550: '#6607DF', brandPrimary600: '#5D46A6', brandSecondary500: '#FFFF54', brandSecondary300: '#FDF5A6', brandSecondary600: '#F9DE6D', brandTertiary500: '#C4ED70', brandTertiary300: '#DCF0AF', brandTertiary600: '#9DED70', brandQuaternary500: '#90DDFB', brandQuaternary300: '#C5ECFD', brandQuaternary600: '#54B8F9', brandQuinary500: '#EC616A', brandQuinary300: '#F19EDA', brandQuinary600: '#EA3E68', brandQuinary100: '#FAD6D9', surfacePrimary: '#101010', surfaceSecondary: '#1D1D1D', containerPrimary: '#1D1D1D', containerSecondary: '#313135', textPrimary: '#F3F4F6', textSecondary: '#808080', textTertiary: '#999999', textQuaternary: '#101010', textBrand: '#F3F4F6', elementsPrimary: '#F3F4F6', elementsSecondary: '#101010', elementsTertiary: '#222222', elementsQuaternary: '#424247', elementsQuinary: '#707479', elementsDarkQuinary: '#919396', elementsSenary: '#DFDFDF', elementsOnContainer: '#101010', transparencyPrimary: 'rgba(255, 255, 255, 0.1)', transparencySecondary: 'rgba(255, 255, 255, 0.07)', transparencyTertiary: 'rgba(255, 255, 255, 0.16)', transparencyQuinary: 'rgba(255, 255, 255, 0.32)', transparencyModal: 'rgba(0, 0, 0, 0.75)', staticBlack: '#101010', staticDarkGrey: '#2C2C2D', staticWhite: '#FFFFFF', staticRed: '#F24835', staticOrange: '#F48C2C', staticGreen: '#09B849', staticDeepBlue: '#2F53CD', staticErrorAccent: '#CB0000', shadowDepth2: '0 0 0 1px #424247', shadowDepth: '0px 8px 8px 0px rgba(255, 255, 255, 0.25)' // В дизайне тень вообще отсутствует, пока что пусть побудет визуально как border
|
|
8
8
|
});
|
|
9
9
|
exports.default = derived;
|
|
@@ -4,5 +4,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const _common_1 = __importDefault(require("./_common"));
|
|
7
|
-
const derived = Object.assign(Object.assign({ name: 'common' }, _common_1.default), { scrollbarColor: 'rgba(0, 0, 0, 0.25)', scrollbarColorHover: 'rgba(0, 0, 0, 0.4)', scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', opacityDisabled: '0.5', brandPrimary50: '#F8F2FF', brandPrimary100: '#EAE2FF', brandPrimary200: '#DACCFF', brandPrimary300: '#BBA2FD', brandPrimary400: '#7748F1', brandPrimary500: '#7000FF', brandPrimary550: '#6607DF', brandPrimary600: '#5B34C1', brandSecondary500: '#FFFF54', brandSecondary300: '#FDF5A6', brandSecondary600: '#F9DE6D', brandTertiary500: '#C4ED70', brandTertiary300: '#DCF0AF', brandTertiary600: '#9DED70', brandQuaternary500: '#90DDFB', brandQuaternary300: '#C5ECFD', brandQuaternary600: '#54B8F9', brandQuinary500: '#EC616A', brandQuinary300: '#F19EDA', brandQuinary600: '#EA3E68', brandQuinary100: '#FAD6D9', surfacePrimary: '#fff', surfaceSecondary: '#1d1d1d', containerPrimary: '#fff', containerSecondary: '#F3F4F6', textPrimary: '#101010', textSecondary: '#808080', textTertiary: '#999999', textQuaternary: '#FFFFFF', textBrand: '#7000FF', elementsPrimary: '#101010', elementsSecondary: '#fff', elementsTertiary: '#F3F4F6', elementsQuaternary: '#E7E8EA', elementsQuinary: '#C5C7CA', elementsDarkQuinary: '#919396', elementsSenary: '#4E4D4D', elementsOnContainer: '#fff', transparencyPrimary: 'rgba(0, 0, 0, 0.35)', transparencySecondary: 'rgba(0, 0, 0, 0.07)', transparencyTertiary: 'rgba(255, 255, 255, 0.16)', transparencyQuinary: 'rgba(255, 255, 255, 0.32)', transparencyModal: 'rgba(0, 0, 0, 0.40)', staticBlack: '#101010', staticDarkGrey: '#2C2C2D', staticWhite: '#FFFFFF', staticRed: '#F24835', staticOrange: '#F48C2C', staticGreen: '#09B849', staticDeepBlue: '#2F53CD', staticErrorAccent: '#CB0000', shadowDepth2: '0px 20px 80px 0px rgba(0, 0, 0, 0.07)', shadowDepth: '0px 8px 8px 0px rgba(0, 0, 0, 0.25)' });
|
|
7
|
+
const derived = Object.assign(Object.assign({ name: 'common' }, _common_1.default), { scrollbarColor: 'rgba(0, 0, 0, 0.25)', scrollbarColorHover: 'rgba(0, 0, 0, 0.4)', scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', opacityDisabled: '0.5', brand150: '#FFF3D3', brand350: '#F1F9DF', brand550: '#FFF3F4', brandPrimary50: '#F8F2FF', brandPrimary100: '#EAE2FF', brandPrimary200: '#DACCFF', brandPrimary300: '#BBA2FD', brandPrimary400: '#7748F1', brandPrimary500: '#7000FF', brandPrimary550: '#6607DF', brandPrimary600: '#5B34C1', brandSecondary500: '#FFFF54', brandSecondary300: '#FDF5A6', brandSecondary600: '#F9DE6D', brandTertiary500: '#C4ED70', brandTertiary300: '#DCF0AF', brandTertiary600: '#9DED70', brandQuaternary500: '#90DDFB', brandQuaternary300: '#C5ECFD', brandQuaternary600: '#54B8F9', brandQuinary500: '#EC616A', brandQuinary300: '#F19EDA', brandQuinary600: '#EA3E68', brandQuinary100: '#FAD6D9', surfacePrimary: '#fff', surfaceSecondary: '#1d1d1d', containerPrimary: '#fff', containerSecondary: '#F3F4F6', textPrimary: '#101010', textSecondary: '#808080', textTertiary: '#999999', textQuaternary: '#FFFFFF', textBrand: '#7000FF', elementsPrimary: '#101010', elementsSecondary: '#fff', elementsTertiary: '#F3F4F6', elementsQuaternary: '#E7E8EA', elementsQuinary: '#C5C7CA', elementsDarkQuinary: '#919396', elementsSenary: '#4E4D4D', elementsOnContainer: '#fff', transparencyPrimary: 'rgba(0, 0, 0, 0.35)', transparencySecondary: 'rgba(0, 0, 0, 0.07)', transparencyTertiary: 'rgba(255, 255, 255, 0.16)', transparencyQuinary: 'rgba(255, 255, 255, 0.32)', transparencyModal: 'rgba(0, 0, 0, 0.40)', staticBlack: '#101010', staticDarkGrey: '#2C2C2D', staticWhite: '#FFFFFF', staticRed: '#F24835', staticOrange: '#F48C2C', staticGreen: '#09B849', staticDeepBlue: '#2F53CD', staticErrorAccent: '#CB0000', shadowDepth2: '0px 20px 80px 0px rgba(0, 0, 0, 0.07)', shadowDepth: '0px 8px 8px 0px rgba(0, 0, 0, 0.25)' });
|
|
8
8
|
exports.default = derived;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export declare function useIsMobile(): import("vue").ComputedRef<boolean>;
|
|
3
|
+
export declare function useIsTablet(): import("vue").ComputedRef<boolean>;
|
|
4
|
+
export declare function useIsSmallDesktop(): import("vue").ComputedRef<boolean>;
|
|
5
|
+
export declare const i18n: {
|
|
6
|
+
(data: Record<string, Record<string, string>>): {
|
|
7
|
+
locale: Ref<string>;
|
|
8
|
+
t(key: string): string;
|
|
9
|
+
};
|
|
10
|
+
provide(localeRef: Ref): void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.i18n = void 0;
|
|
4
|
+
exports.useIsMobile = useIsMobile;
|
|
5
|
+
exports.useIsTablet = useIsTablet;
|
|
6
|
+
exports.useIsSmallDesktop = useIsSmallDesktop;
|
|
7
|
+
const vooks_1 = require("vooks");
|
|
8
|
+
const vue_1 = require("vue");
|
|
9
|
+
function useIsMobile() {
|
|
10
|
+
const breakpointRef = (0, vooks_1.useBreakpoint)();
|
|
11
|
+
return (0, vooks_1.useMemo)(() => {
|
|
12
|
+
return breakpointRef.value === 'xs';
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function useIsTablet() {
|
|
16
|
+
const breakpointRef = (0, vooks_1.useBreakpoint)();
|
|
17
|
+
return (0, vooks_1.useMemo)(() => {
|
|
18
|
+
return breakpointRef.value === 's';
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function useIsSmallDesktop() {
|
|
22
|
+
const breakpointRef = (0, vooks_1.useBreakpoint)();
|
|
23
|
+
return (0, vooks_1.useMemo)(() => {
|
|
24
|
+
return breakpointRef.value === 'm';
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
const i18n = function (data) {
|
|
28
|
+
const localeReactive = (0, vue_1.inject)('i18n', null);
|
|
29
|
+
if (!localeReactive) {
|
|
30
|
+
throw new Error('i18n context not provided');
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
locale: (0, vue_1.toRef)(localeReactive, 'locale'),
|
|
34
|
+
t(key) {
|
|
35
|
+
const { locale } = localeReactive;
|
|
36
|
+
return data[locale][key];
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
exports.i18n = i18n;
|
|
41
|
+
exports.i18n.provide = function (localeRef) {
|
|
42
|
+
const localeReactive = (0, vue_1.reactive)({ locale: '' });
|
|
43
|
+
(0, vue_1.watchEffect)(() => {
|
|
44
|
+
localeReactive.locale = localeRef.value;
|
|
45
|
+
});
|
|
46
|
+
(0, vue_1.provide)('i18n', localeReactive);
|
|
47
|
+
};
|
package/lib/_utils/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { call, keep, omit, flatten, getSlot, getVNodeChildren, keysOf, render, getFirstSlotVNode, createDataKey, createRefSetter, createInjectionKey, resolveSlot, resolveSlotWithProps, resolveWrappedSlot, isSlotEmpty, mergeEventHandlers, isNodeVShowFalse, resolveWrappedSlotWithProps, Wrapper } from './vue';
|
|
2
2
|
export type { MaybeArray } from './vue';
|
|
3
|
-
export { warn, warnOnce, throwError, smallerSize, largerSize, getTitleAttribute } from './uzum';
|
|
3
|
+
export { warn, warnOnce, throwError, smallerSize, largerSize, getTitleAttribute, isArrayShallowEqual } from './uzum';
|
|
4
4
|
export type { ExtractPublicPropTypes, ExtractInternalPropTypes, Mutable } from './uzum';
|
|
5
5
|
export { formatLength, color2Class } from './css';
|
|
6
6
|
export { createKey } from './cssr';
|
package/lib/_utils/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.createStylesWithSingleColor = exports.markEventEffectPerformed = exports.eventEffectNotPerformed = exports.isBrowser = exports.isJsdom = exports.createKey = exports.color2Class = exports.formatLength = exports.getTitleAttribute = exports.largerSize = exports.smallerSize = exports.throwError = exports.warnOnce = exports.warn = exports.Wrapper = exports.resolveWrappedSlotWithProps = exports.isNodeVShowFalse = exports.mergeEventHandlers = exports.isSlotEmpty = exports.resolveWrappedSlot = exports.resolveSlotWithProps = exports.resolveSlot = exports.createInjectionKey = exports.createRefSetter = exports.createDataKey = exports.getFirstSlotVNode = exports.render = exports.keysOf = exports.getVNodeChildren = exports.getSlot = exports.flatten = exports.omit = exports.keep = exports.call = void 0;
|
|
17
|
+
exports.createStylesWithSingleColor = exports.markEventEffectPerformed = exports.eventEffectNotPerformed = exports.isBrowser = exports.isJsdom = exports.createKey = exports.color2Class = exports.formatLength = exports.isArrayShallowEqual = exports.getTitleAttribute = exports.largerSize = exports.smallerSize = exports.throwError = exports.warnOnce = exports.warn = exports.Wrapper = exports.resolveWrappedSlotWithProps = exports.isNodeVShowFalse = exports.mergeEventHandlers = exports.isSlotEmpty = exports.resolveWrappedSlot = exports.resolveSlotWithProps = exports.resolveSlot = exports.createInjectionKey = exports.createRefSetter = exports.createDataKey = exports.getFirstSlotVNode = exports.render = exports.keysOf = exports.getVNodeChildren = exports.getSlot = exports.flatten = exports.omit = exports.keep = exports.call = void 0;
|
|
18
18
|
var vue_1 = require("./vue");
|
|
19
19
|
Object.defineProperty(exports, "call", { enumerable: true, get: function () { return vue_1.call; } });
|
|
20
20
|
Object.defineProperty(exports, "keep", { enumerable: true, get: function () { return vue_1.keep; } });
|
|
@@ -43,6 +43,7 @@ Object.defineProperty(exports, "throwError", { enumerable: true, get: function (
|
|
|
43
43
|
Object.defineProperty(exports, "smallerSize", { enumerable: true, get: function () { return uzum_1.smallerSize; } });
|
|
44
44
|
Object.defineProperty(exports, "largerSize", { enumerable: true, get: function () { return uzum_1.largerSize; } });
|
|
45
45
|
Object.defineProperty(exports, "getTitleAttribute", { enumerable: true, get: function () { return uzum_1.getTitleAttribute; } });
|
|
46
|
+
Object.defineProperty(exports, "isArrayShallowEqual", { enumerable: true, get: function () { return uzum_1.isArrayShallowEqual; } });
|
|
46
47
|
var css_1 = require("./css");
|
|
47
48
|
Object.defineProperty(exports, "formatLength", { enumerable: true, get: function () { return css_1.formatLength; } });
|
|
48
49
|
Object.defineProperty(exports, "color2Class", { enumerable: true, get: function () { return css_1.color2Class; } });
|
|
@@ -3,3 +3,4 @@ export { smallerSize, largerSize } from './prop';
|
|
|
3
3
|
export { getTitleAttribute } from './attribute';
|
|
4
4
|
export type { ExtractPublicPropTypes, ExtractInternalPropTypes } from './extract-public-props';
|
|
5
5
|
export type { Mutable } from './mutable';
|
|
6
|
+
export { isArrayShallowEqual } from './value';
|
package/lib/_utils/uzum/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTitleAttribute = exports.largerSize = exports.smallerSize = exports.throwError = exports.warnOnce = exports.warn = void 0;
|
|
3
|
+
exports.isArrayShallowEqual = exports.getTitleAttribute = exports.largerSize = exports.smallerSize = exports.throwError = exports.warnOnce = exports.warn = void 0;
|
|
4
4
|
var warn_1 = require("./warn");
|
|
5
5
|
Object.defineProperty(exports, "warn", { enumerable: true, get: function () { return warn_1.warn; } });
|
|
6
6
|
Object.defineProperty(exports, "warnOnce", { enumerable: true, get: function () { return warn_1.warnOnce; } });
|
|
@@ -10,3 +10,5 @@ Object.defineProperty(exports, "smallerSize", { enumerable: true, get: function
|
|
|
10
10
|
Object.defineProperty(exports, "largerSize", { enumerable: true, get: function () { return prop_1.largerSize; } });
|
|
11
11
|
var attribute_1 = require("./attribute");
|
|
12
12
|
Object.defineProperty(exports, "getTitleAttribute", { enumerable: true, get: function () { return attribute_1.getTitleAttribute; } });
|
|
13
|
+
var value_1 = require("./value");
|
|
14
|
+
Object.defineProperty(exports, "isArrayShallowEqual", { enumerable: true, get: function () { return value_1.isArrayShallowEqual; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isArrayShallowEqual<T extends readonly unknown[]>(left: T | null, right: T | null): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isArrayShallowEqual = isArrayShallowEqual;
|
|
4
|
+
function isArrayShallowEqual(left, right) {
|
|
5
|
+
if (left === right)
|
|
6
|
+
return true;
|
|
7
|
+
if (left === null || right === null)
|
|
8
|
+
return false;
|
|
9
|
+
if (left.length !== right.length)
|
|
10
|
+
return false;
|
|
11
|
+
return left.every((item, index) => item === right[index]);
|
|
12
|
+
}
|
|
@@ -3,7 +3,7 @@ import { type Slot, type VNodeArrayChildren, type VNodeChild } from 'vue';
|
|
|
3
3
|
* We shouldn't use the following functions with slot flags `_: 1, 2, 3`
|
|
4
4
|
*/
|
|
5
5
|
export declare function resolveSlot(slot: Slot | undefined, fallback: () => VNodeArrayChildren): VNodeArrayChildren;
|
|
6
|
-
export declare function resolveSlotWithProps<T>(slot: Slot | undefined, props: T, fallback: (props: T) => VNodeArrayChildren): VNodeArrayChildren;
|
|
6
|
+
export declare function resolveSlotWithProps<T>(slot: Slot<T> | undefined, props: T, fallback: (props: T) => VNodeArrayChildren): VNodeArrayChildren;
|
|
7
7
|
/**
|
|
8
8
|
* Resolve slot with wrapper if content exists, no fallback
|
|
9
9
|
*/
|
|
@@ -7,20 +7,20 @@ exports.alertSelf = exports.self = void 0;
|
|
|
7
7
|
const common_1 = require("../../_styles/common");
|
|
8
8
|
const _common_1 = __importDefault(require("./_common"));
|
|
9
9
|
const self = (vars) => {
|
|
10
|
-
const { iconMedium, closeMedium, fontTitleSmall, lineHeightTitleSmall, fontWeightStrong, fontWeightBold, fontBodyLarge, lineHeightBodyLarge, fontWeight,
|
|
11
|
-
return Object.assign(Object.assign({}, _common_1.default), { iconSize: iconMedium, closeIconSize:
|
|
10
|
+
const { iconMedium, closeMedium, fontTitleSmall, lineHeightTitleSmall, fontWeightStrong, fontWeightBold, fontBodyLarge, lineHeightBodyLarge, fontWeight, borderRadius, staticBlack, staticWhite, transparencyTertiary, transparencyQuinary, transparencySecondary, transparencyPrimary, elementsTertiary, textPrimary, brand150, brand350, brand550, brandPrimary50, staticRed } = vars;
|
|
11
|
+
return Object.assign(Object.assign({}, _common_1.default), { iconSize: iconMedium, closeIconSize: '18px', closeSize: closeMedium, titleFontSizeAlert: fontTitleSmall, titleLineHeightAlert: lineHeightTitleSmall, titleFontWeightAlert: fontWeightStrong, descriptionFontSizeAlert: fontBodyLarge, descriptionLineHeightAlert: lineHeightBodyLarge, descriptionFontWeightAlert: fontWeight, titleFontSizeBanner: fontBodyLarge, titleLineHeightBanner: lineHeightBodyLarge, titleFontWeightBanner: fontWeightBold, descriptionFontSizeBanner: fontBodyLarge, descriptionLineHeightBanner: lineHeightBodyLarge, descriptionFontWeightBanner: fontWeight, borderRadius,
|
|
12
12
|
// Default
|
|
13
13
|
color: staticBlack, titleTextColor: staticWhite, iconColor: staticWhite, contentTextColor: staticWhite, closeColorHover: transparencyTertiary, closeColorPressed: transparencyQuinary, closeIconColor: staticWhite, closeIconColorHover: staticWhite, closeIconColorPressed: staticWhite,
|
|
14
14
|
// Info
|
|
15
15
|
colorInfo: elementsTertiary, titleTextColorInfo: textPrimary, iconColorInfo: textPrimary, contentTextColorInfo: textPrimary, closeColorHoverInfo: transparencySecondary, closeColorPressedInfo: transparencyPrimary, closeIconColorInfo: textPrimary, closeIconColorHoverInfo: textPrimary, closeIconColorPressedInfo: textPrimary,
|
|
16
16
|
// Success
|
|
17
|
-
colorSuccess:
|
|
17
|
+
colorSuccess: brand350, titleTextColorSuccess: staticBlack, iconColorSuccess: staticBlack, contentTextColorSuccess: staticBlack, closeColorHoverSuccess: transparencyTertiary, closeColorPressedSuccess: transparencyQuinary, closeIconColorSuccess: staticBlack, closeIconColorHoverSuccess: staticBlack, closeIconColorPressedSuccess: staticBlack,
|
|
18
18
|
// Warning
|
|
19
|
-
colorWarning:
|
|
19
|
+
colorWarning: brand150, titleTextColorWarning: staticBlack, iconColorWarning: staticBlack, contentTextColorWarning: staticBlack, closeColorHoverWarning: transparencyTertiary, closeColorPressedWarning: transparencyQuinary, closeIconColorWarning: staticBlack, closeIconColorHoverWarning: staticBlack, closeIconColorPressedWarning: staticBlack,
|
|
20
20
|
// Error
|
|
21
|
-
colorError:
|
|
21
|
+
colorError: brand550, titleTextColorError: staticBlack, iconColorError: staticRed, contentTextColorError: staticBlack, closeColorHoverError: transparencyTertiary, closeColorPressedError: transparencyQuinary, closeIconColorError: staticBlack, closeIconColorHoverError: staticBlack, closeIconColorPressedError: staticBlack,
|
|
22
22
|
// Primary
|
|
23
|
-
colorPrimary:
|
|
23
|
+
colorPrimary: brandPrimary50, titleTextColorPrimary: staticBlack, iconColorPrimary: staticBlack, contentTextColorPrimary: staticBlack, closeColorHoverPrimary: transparencyTertiary, closeColorPressedPrimary: transparencyQuinary, closeIconColorPrimary: staticBlack, closeIconColorHoverPrimary: staticBlack, closeIconColorPressedPrimary: staticBlack });
|
|
24
24
|
};
|
|
25
25
|
exports.self = self;
|
|
26
26
|
exports.alertSelf = exports.self;
|
|
@@ -85,7 +85,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
85
85
|
const treeMateRef = (0, vue_1.computed)(() => (0, treemate_1.createTreeMate)(selectOptionsRef.value, (0, utils_1.createTmOptions)('value', 'children')));
|
|
86
86
|
function doUpdateValue(value) {
|
|
87
87
|
const { 'onUpdate:value': _onUpdateValue, onUpdateValue, onInput } = props;
|
|
88
|
-
const {
|
|
88
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
89
89
|
if (onUpdateValue)
|
|
90
90
|
(0, _utils_1.call)(onUpdateValue, value);
|
|
91
91
|
if (_onUpdateValue)
|
|
@@ -93,30 +93,30 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
93
93
|
if (onInput)
|
|
94
94
|
(0, _utils_1.call)(onInput, value);
|
|
95
95
|
uncontrolledValueRef.value = value;
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
triggerFormInput();
|
|
97
|
+
triggerFormChange();
|
|
98
98
|
}
|
|
99
99
|
function doSelect(value) {
|
|
100
100
|
const { onSelect } = props;
|
|
101
|
-
const {
|
|
101
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
102
102
|
if (onSelect)
|
|
103
103
|
(0, _utils_1.call)(onSelect, value);
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
triggerFormInput();
|
|
105
|
+
triggerFormChange();
|
|
106
106
|
}
|
|
107
107
|
function doBlur(e) {
|
|
108
108
|
const { onBlur } = props;
|
|
109
|
-
const {
|
|
109
|
+
const { triggerFormBlur } = formItem;
|
|
110
110
|
if (onBlur)
|
|
111
111
|
(0, _utils_1.call)(onBlur, e);
|
|
112
|
-
|
|
112
|
+
triggerFormBlur();
|
|
113
113
|
}
|
|
114
114
|
function doFocus(e) {
|
|
115
115
|
const { onFocus } = props;
|
|
116
|
-
const {
|
|
116
|
+
const { triggerFormFocus } = formItem;
|
|
117
117
|
if (onFocus)
|
|
118
118
|
(0, _utils_1.call)(onFocus, e);
|
|
119
|
-
|
|
119
|
+
triggerFormFocus();
|
|
120
120
|
}
|
|
121
121
|
function doScroll(e) {
|
|
122
122
|
const { onScroll } = props;
|