@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
|
@@ -100,7 +100,7 @@ export const useCheckbox = (props) => {
|
|
|
100
100
|
}
|
|
101
101
|
else {
|
|
102
102
|
const { onChange, 'onUpdate:checked': _onUpdateCheck, onUpdateChecked } = props;
|
|
103
|
-
const {
|
|
103
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
104
104
|
const nextChecked = renderedCheckedRef.value
|
|
105
105
|
? props.uncheckedValue
|
|
106
106
|
: props.checkedValue;
|
|
@@ -112,8 +112,8 @@ export const useCheckbox = (props) => {
|
|
|
112
112
|
}
|
|
113
113
|
if (onChange)
|
|
114
114
|
call(onChange, nextChecked, e); // deprecated
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
triggerFormInput();
|
|
116
|
+
triggerFormChange();
|
|
117
117
|
uncontrolledCheckedRef.value = nextChecked;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -84,15 +84,15 @@ function useRadio(props) {
|
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
86
86
|
const { onUpdateChecked, 'onUpdate:checked': _onUpdateChecked, onChange } = props;
|
|
87
|
-
const {
|
|
87
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
88
88
|
if (onUpdateChecked)
|
|
89
89
|
call(onUpdateChecked, true);
|
|
90
90
|
if (_onUpdateChecked)
|
|
91
91
|
call(_onUpdateChecked, true);
|
|
92
92
|
if (onChange)
|
|
93
93
|
onChange(e);
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
triggerFormInput();
|
|
95
|
+
triggerFormChange();
|
|
96
96
|
uncontrolledCheckedRef.value = true;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
@@ -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 {};
|
|
@@ -45,22 +45,22 @@ export default function useFormItem(props, { defaultSize = 'medium', mergedSize,
|
|
|
45
45
|
mergedSizeRef,
|
|
46
46
|
mergedDisabledRef,
|
|
47
47
|
mergedStatusRef,
|
|
48
|
-
|
|
48
|
+
triggerFormBlur() {
|
|
49
49
|
if (UFormItem) {
|
|
50
50
|
UFormItem.handleContentBlur();
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
|
|
53
|
+
triggerFormChange() {
|
|
54
54
|
if (UFormItem) {
|
|
55
55
|
UFormItem.handleContentChange();
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
|
|
58
|
+
triggerFormFocus() {
|
|
59
59
|
if (UFormItem) {
|
|
60
60
|
UFormItem.handleContentFocus();
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
|
|
63
|
+
triggerFormInput() {
|
|
64
64
|
if (UFormItem) {
|
|
65
65
|
UFormItem.handleContentInput();
|
|
66
66
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import commonVariables from './_common';
|
|
2
|
-
const derived = Object.assign(Object.assign({ name: 'common' }, commonVariables), { 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
|
|
2
|
+
const derived = Object.assign(Object.assign({ name: 'common' }, commonVariables), { 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
|
|
3
3
|
});
|
|
4
4
|
export default derived;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import commonVariables from './_common';
|
|
2
|
-
const derived = Object.assign(Object.assign({ name: 'common' }, commonVariables), { 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)' });
|
|
2
|
+
const derived = Object.assign(Object.assign({ name: 'common' }, commonVariables), { 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)' });
|
|
3
3
|
export 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,40 @@
|
|
|
1
|
+
import { useBreakpoint, useMemo } from 'vooks';
|
|
2
|
+
import { inject, provide, reactive, toRef, watchEffect } from 'vue';
|
|
3
|
+
export function useIsMobile() {
|
|
4
|
+
const breakpointRef = useBreakpoint();
|
|
5
|
+
return useMemo(() => {
|
|
6
|
+
return breakpointRef.value === 'xs';
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
export function useIsTablet() {
|
|
10
|
+
const breakpointRef = useBreakpoint();
|
|
11
|
+
return useMemo(() => {
|
|
12
|
+
return breakpointRef.value === 's';
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export function useIsSmallDesktop() {
|
|
16
|
+
const breakpointRef = useBreakpoint();
|
|
17
|
+
return useMemo(() => {
|
|
18
|
+
return breakpointRef.value === 'm';
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export const i18n = function (data) {
|
|
22
|
+
const localeReactive = inject('i18n', null);
|
|
23
|
+
if (!localeReactive) {
|
|
24
|
+
throw new Error('i18n context not provided');
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
locale: toRef(localeReactive, 'locale'),
|
|
28
|
+
t(key) {
|
|
29
|
+
const { locale } = localeReactive;
|
|
30
|
+
return data[locale][key];
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
i18n.provide = function (localeRef) {
|
|
35
|
+
const localeReactive = reactive({ locale: '' });
|
|
36
|
+
watchEffect(() => {
|
|
37
|
+
localeReactive.locale = localeRef.value;
|
|
38
|
+
});
|
|
39
|
+
provide('i18n', localeReactive);
|
|
40
|
+
};
|
package/es/_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/es/_utils/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
-
export { warn, warnOnce, throwError, smallerSize, largerSize, getTitleAttribute } from './uzum';
|
|
2
|
+
export { warn, warnOnce, throwError, smallerSize, largerSize, getTitleAttribute, isArrayShallowEqual } from './uzum';
|
|
3
3
|
export { formatLength, color2Class } from './css';
|
|
4
4
|
export { createKey } from './cssr';
|
|
5
5
|
export { isJsdom } from './env/is-jsdom';
|
|
@@ -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/es/_utils/uzum/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isArrayShallowEqual<T extends readonly unknown[]>(left: T | null, right: T | null): boolean;
|
|
@@ -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
|
*/
|
package/es/alert/styles/light.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { commonLight } from '../../_styles/common';
|
|
2
2
|
import commonVars from './_common';
|
|
3
3
|
export const self = (vars) => {
|
|
4
|
-
const { iconMedium, closeMedium, fontTitleSmall, lineHeightTitleSmall, fontWeightStrong, fontWeightBold, fontBodyLarge, lineHeightBodyLarge, fontWeight,
|
|
5
|
-
return Object.assign(Object.assign({}, commonVars), { iconSize: iconMedium, closeIconSize:
|
|
4
|
+
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;
|
|
5
|
+
return Object.assign(Object.assign({}, commonVars), { 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,
|
|
6
6
|
// Default
|
|
7
7
|
color: staticBlack, titleTextColor: staticWhite, iconColor: staticWhite, contentTextColor: staticWhite, closeColorHover: transparencyTertiary, closeColorPressed: transparencyQuinary, closeIconColor: staticWhite, closeIconColorHover: staticWhite, closeIconColorPressed: staticWhite,
|
|
8
8
|
// Info
|
|
9
9
|
colorInfo: elementsTertiary, titleTextColorInfo: textPrimary, iconColorInfo: textPrimary, contentTextColorInfo: textPrimary, closeColorHoverInfo: transparencySecondary, closeColorPressedInfo: transparencyPrimary, closeIconColorInfo: textPrimary, closeIconColorHoverInfo: textPrimary, closeIconColorPressedInfo: textPrimary,
|
|
10
10
|
// Success
|
|
11
|
-
colorSuccess:
|
|
11
|
+
colorSuccess: brand350, titleTextColorSuccess: staticBlack, iconColorSuccess: staticBlack, contentTextColorSuccess: staticBlack, closeColorHoverSuccess: transparencyTertiary, closeColorPressedSuccess: transparencyQuinary, closeIconColorSuccess: staticBlack, closeIconColorHoverSuccess: staticBlack, closeIconColorPressedSuccess: staticBlack,
|
|
12
12
|
// Warning
|
|
13
|
-
colorWarning:
|
|
13
|
+
colorWarning: brand150, titleTextColorWarning: staticBlack, iconColorWarning: staticBlack, contentTextColorWarning: staticBlack, closeColorHoverWarning: transparencyTertiary, closeColorPressedWarning: transparencyQuinary, closeIconColorWarning: staticBlack, closeIconColorHoverWarning: staticBlack, closeIconColorPressedWarning: staticBlack,
|
|
14
14
|
// Error
|
|
15
|
-
colorError:
|
|
15
|
+
colorError: brand550, titleTextColorError: staticBlack, iconColorError: staticRed, contentTextColorError: staticBlack, closeColorHoverError: transparencyTertiary, closeColorPressedError: transparencyQuinary, closeIconColorError: staticBlack, closeIconColorHoverError: staticBlack, closeIconColorPressedError: staticBlack,
|
|
16
16
|
// Primary
|
|
17
|
-
colorPrimary:
|
|
17
|
+
colorPrimary: brandPrimary50, titleTextColorPrimary: staticBlack, iconColorPrimary: staticBlack, contentTextColorPrimary: staticBlack, closeColorHoverPrimary: transparencyTertiary, closeColorPressedPrimary: transparencyQuinary, closeIconColorPrimary: staticBlack, closeIconColorHoverPrimary: staticBlack, closeIconColorPressedPrimary: staticBlack });
|
|
18
18
|
};
|
|
19
19
|
const alertLight = {
|
|
20
20
|
name: 'Alert',
|
|
@@ -79,7 +79,7 @@ export default defineComponent({
|
|
|
79
79
|
const treeMateRef = computed(() => createTreeMate(selectOptionsRef.value, createTmOptions('value', 'children')));
|
|
80
80
|
function doUpdateValue(value) {
|
|
81
81
|
const { 'onUpdate:value': _onUpdateValue, onUpdateValue, onInput } = props;
|
|
82
|
-
const {
|
|
82
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
83
83
|
if (onUpdateValue)
|
|
84
84
|
call(onUpdateValue, value);
|
|
85
85
|
if (_onUpdateValue)
|
|
@@ -87,30 +87,30 @@ export default defineComponent({
|
|
|
87
87
|
if (onInput)
|
|
88
88
|
call(onInput, value);
|
|
89
89
|
uncontrolledValueRef.value = value;
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
triggerFormInput();
|
|
91
|
+
triggerFormChange();
|
|
92
92
|
}
|
|
93
93
|
function doSelect(value) {
|
|
94
94
|
const { onSelect } = props;
|
|
95
|
-
const {
|
|
95
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
96
96
|
if (onSelect)
|
|
97
97
|
call(onSelect, value);
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
triggerFormInput();
|
|
99
|
+
triggerFormChange();
|
|
100
100
|
}
|
|
101
101
|
function doBlur(e) {
|
|
102
102
|
const { onBlur } = props;
|
|
103
|
-
const {
|
|
103
|
+
const { triggerFormBlur } = formItem;
|
|
104
104
|
if (onBlur)
|
|
105
105
|
call(onBlur, e);
|
|
106
|
-
|
|
106
|
+
triggerFormBlur();
|
|
107
107
|
}
|
|
108
108
|
function doFocus(e) {
|
|
109
109
|
const { onFocus } = props;
|
|
110
|
-
const {
|
|
110
|
+
const { triggerFormFocus } = formItem;
|
|
111
111
|
if (onFocus)
|
|
112
112
|
call(onFocus, e);
|
|
113
|
-
|
|
113
|
+
triggerFormFocus();
|
|
114
114
|
}
|
|
115
115
|
function doScroll(e) {
|
|
116
116
|
const { onScroll } = props;
|
|
@@ -28,6 +28,8 @@ export declare const avatarProps: {
|
|
|
28
28
|
readonly imgProps: PropType<ImgHTMLAttributes>;
|
|
29
29
|
readonly disabled: BooleanConstructor;
|
|
30
30
|
readonly loading: BooleanConstructor;
|
|
31
|
+
readonly iconColor: StringConstructor;
|
|
32
|
+
readonly iconSize: PropType<string | number>;
|
|
31
33
|
readonly theme: PropType<import("../../_mixins").Theme<"Avatar", {
|
|
32
34
|
borderRadius: string;
|
|
33
35
|
fontSize: string;
|
|
@@ -98,6 +100,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
98
100
|
readonly imgProps: PropType<ImgHTMLAttributes>;
|
|
99
101
|
readonly disabled: BooleanConstructor;
|
|
100
102
|
readonly loading: BooleanConstructor;
|
|
103
|
+
readonly iconColor: StringConstructor;
|
|
104
|
+
readonly iconSize: PropType<string | number>;
|
|
101
105
|
readonly theme: PropType<import("../../_mixins").Theme<"Avatar", {
|
|
102
106
|
borderRadius: string;
|
|
103
107
|
fontSize: string;
|
|
@@ -191,6 +195,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
191
195
|
readonly imgProps: PropType<ImgHTMLAttributes>;
|
|
192
196
|
readonly disabled: BooleanConstructor;
|
|
193
197
|
readonly loading: BooleanConstructor;
|
|
198
|
+
readonly iconColor: StringConstructor;
|
|
199
|
+
readonly iconSize: PropType<string | number>;
|
|
194
200
|
readonly theme: PropType<import("../../_mixins").Theme<"Avatar", {
|
|
195
201
|
borderRadius: string;
|
|
196
202
|
fontSize: string;
|
package/es/avatar/src/Avatar.js
CHANGED
|
@@ -18,7 +18,7 @@ export const avatarProps = Object.assign(Object.assign({}, useTheme.props), { si
|
|
|
18
18
|
}, bordered: {
|
|
19
19
|
type: Boolean,
|
|
20
20
|
default: undefined
|
|
21
|
-
}, onError: Function, fallbackSrc: String, intersectionObserverOptions: Object, lazy: Boolean, onLoad: Function, renderPlaceholder: Function, renderFallback: Function, imgProps: Object, disabled: Boolean, loading: Boolean });
|
|
21
|
+
}, onError: Function, fallbackSrc: String, intersectionObserverOptions: Object, lazy: Boolean, onLoad: Function, renderPlaceholder: Function, renderFallback: Function, imgProps: Object, disabled: Boolean, loading: Boolean, iconColor: String, iconSize: [String, Number] });
|
|
22
22
|
export default defineComponent({
|
|
23
23
|
name: 'Avatar',
|
|
24
24
|
props: avatarProps,
|
|
@@ -103,6 +103,12 @@ export default defineComponent({
|
|
|
103
103
|
const getBackgroundColor = (color) => {
|
|
104
104
|
return props.disabled || size === 'small' ? 'rgba(0,0,0,0)' : color;
|
|
105
105
|
};
|
|
106
|
+
const resolveSize = (value, fallback) => {
|
|
107
|
+
if (value === undefined)
|
|
108
|
+
return fallback;
|
|
109
|
+
value = String(value);
|
|
110
|
+
return /^\d+$/.test(value) ? `${value}px` : value;
|
|
111
|
+
};
|
|
106
112
|
return {
|
|
107
113
|
'--u-font-size': fontSize,
|
|
108
114
|
'--u-font-weight': fontWeight,
|
|
@@ -110,10 +116,10 @@ export default defineComponent({
|
|
|
110
116
|
'--u-border-radius': round ? '50%' : borderRadius,
|
|
111
117
|
'--u-color': getBackgroundColor(color),
|
|
112
118
|
'--u-text-color': textColor,
|
|
113
|
-
'--u-icon-color': iconColor,
|
|
119
|
+
'--u-icon-color': props.iconColor || iconColor,
|
|
114
120
|
'--u-bezier': cubicBezierEaseInOut,
|
|
115
121
|
'--u-merged-size': `var(--u-avatar-size-override, ${height})`,
|
|
116
|
-
'--u-icon-size': iconSize
|
|
122
|
+
'--u-icon-size': resolveSize(props.iconSize, iconSize)
|
|
117
123
|
};
|
|
118
124
|
});
|
|
119
125
|
const themeClassHandle = inlineThemeDisabled
|
|
@@ -63,7 +63,7 @@ export default defineComponent({
|
|
|
63
63
|
return h(Grid, Object.assign({ class: [`${mergedClsPrefix}-card-list`, themeClass], style: cssVars, cols,
|
|
64
64
|
xGap,
|
|
65
65
|
yGap }, gridProps), () => items.map((card, idx) => h(GridItem, { key: idx, span: card.span || 1 }, () => [
|
|
66
|
-
h(UCardListItem, Object.assign(Object.assign({ title: card.title, subtitle: card.subtitle, items: card.items, direction: card.direction, dropdown: card.dropdown }, cardProps), { renderDivider: showDivider ? renderDivider : () => null }))
|
|
66
|
+
h(UCardListItem, Object.assign(Object.assign({ title: card.title, subtitle: card.subtitle, items: card.items, direction: card.direction, embedded: card.embedded, dropdown: card.dropdown }, cardProps), { renderDivider: showDivider ? renderDivider : () => null }))
|
|
67
67
|
])));
|
|
68
68
|
}
|
|
69
69
|
});
|
|
@@ -13,6 +13,10 @@ declare const cardListItemProps: {
|
|
|
13
13
|
readonly default: "horizontal";
|
|
14
14
|
};
|
|
15
15
|
readonly dropdown: BooleanConstructor;
|
|
16
|
+
readonly embedded: {
|
|
17
|
+
readonly type: BooleanConstructor;
|
|
18
|
+
readonly default: false;
|
|
19
|
+
};
|
|
16
20
|
readonly renderDivider: PropType<({ index, count, direction }: {
|
|
17
21
|
index: number;
|
|
18
22
|
count: number;
|
|
@@ -32,6 +36,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
36
|
readonly default: "horizontal";
|
|
33
37
|
};
|
|
34
38
|
readonly dropdown: BooleanConstructor;
|
|
39
|
+
readonly embedded: {
|
|
40
|
+
readonly type: BooleanConstructor;
|
|
41
|
+
readonly default: false;
|
|
42
|
+
};
|
|
35
43
|
readonly renderDivider: PropType<({ index, count, direction }: {
|
|
36
44
|
index: number;
|
|
37
45
|
count: number;
|
|
@@ -58,6 +66,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
66
|
readonly default: "horizontal";
|
|
59
67
|
};
|
|
60
68
|
readonly dropdown: BooleanConstructor;
|
|
69
|
+
readonly embedded: {
|
|
70
|
+
readonly type: BooleanConstructor;
|
|
71
|
+
readonly default: false;
|
|
72
|
+
};
|
|
61
73
|
readonly renderDivider: PropType<({ index, count, direction }: {
|
|
62
74
|
index: number;
|
|
63
75
|
count: number;
|
|
@@ -66,5 +78,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
66
78
|
}>>, {
|
|
67
79
|
readonly direction: "vertical" | "horizontal";
|
|
68
80
|
readonly dropdown: boolean;
|
|
81
|
+
readonly embedded: boolean;
|
|
69
82
|
}, {}>;
|
|
70
83
|
export default _default;
|
|
@@ -12,6 +12,10 @@ const cardListItemProps = {
|
|
|
12
12
|
default: 'horizontal'
|
|
13
13
|
},
|
|
14
14
|
dropdown: Boolean,
|
|
15
|
+
embedded: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false
|
|
18
|
+
},
|
|
15
19
|
renderDivider: Function
|
|
16
20
|
};
|
|
17
21
|
export default defineComponent({
|
|
@@ -58,7 +62,10 @@ export default defineComponent({
|
|
|
58
62
|
const isGrouped = !this.dropdown &&
|
|
59
63
|
(this.direction === 'horizontal' || this.direction === 'vertical');
|
|
60
64
|
const isDropdown = this.dropdown;
|
|
61
|
-
return (h("div", { class:
|
|
65
|
+
return (h("div", { class: [
|
|
66
|
+
`${mergedClsPrefix}-card-list-item`,
|
|
67
|
+
this.embedded && `${mergedClsPrefix}-card-list-item--embedded`
|
|
68
|
+
], onClick: isDropdown && items.length ? this.toggle : undefined, ref: "selfRef" },
|
|
62
69
|
isDropdown && (h("div", { class: `${mergedClsPrefix}-card-list-item__wrapper` },
|
|
63
70
|
h("div", { class: `${mergedClsPrefix}-card-list-item__wrapper-content` },
|
|
64
71
|
this.title && (h("div", { class: `${mergedClsPrefix}-card-list-item__title` }, this.title)),
|
|
@@ -74,7 +81,7 @@ export default defineComponent({
|
|
|
74
81
|
isGrouped && items.length > 0 && (h("div", { class: [
|
|
75
82
|
`${mergedClsPrefix}-card-list-item__items`,
|
|
76
83
|
this.direction,
|
|
77
|
-
this.direction === '
|
|
84
|
+
this.direction === 'horizontal' &&
|
|
78
85
|
`${mergedClsPrefix}-card-list-item__items--grid`
|
|
79
86
|
] }, items.map((item, idx) => [
|
|
80
87
|
h("div", { class: `${mergedClsPrefix}-card-list-item__item`, key: idx },
|
|
@@ -90,10 +97,10 @@ export default defineComponent({
|
|
|
90
97
|
: h('div', {
|
|
91
98
|
class: [
|
|
92
99
|
`${mergedClsPrefix}-card-list-item__divider`,
|
|
93
|
-
this.direction === '
|
|
100
|
+
this.direction === 'horizontal'
|
|
94
101
|
? `${mergedClsPrefix}-card-list-item__divider--vertical`
|
|
95
102
|
: `${mergedClsPrefix}-card-list-item__divider--horizontal`,
|
|
96
|
-
this.direction === '
|
|
103
|
+
this.direction === 'horizontal' &&
|
|
97
104
|
`${mergedClsPrefix}-card-list-item__divider--grid`
|
|
98
105
|
]
|
|
99
106
|
}))
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { c, cB } from '../../../_utils/cssr';
|
|
1
|
+
import { c, cB, cM } from '../../../_utils/cssr';
|
|
2
2
|
export default cB('card-list-item', [c('&', {
|
|
3
3
|
padding: '16px',
|
|
4
|
-
backgroundColor: 'var(--u-color-embedded)',
|
|
5
4
|
borderRadius: 'var(--u-border-radius)',
|
|
6
|
-
boxShadow: 'var(--u-box-shadow)',
|
|
7
5
|
display: 'flex',
|
|
8
6
|
flexDirection: 'column',
|
|
9
7
|
gap: '8px',
|
|
10
8
|
position: 'relative'
|
|
11
|
-
}
|
|
9
|
+
}, [cM('embedded', {
|
|
10
|
+
backgroundColor: 'var(--u-color-embedded)'
|
|
11
|
+
})]), cB('card-list-item__title', {
|
|
12
12
|
fontSize: 'var(--u-title-font-size)',
|
|
13
13
|
lineHeight: 'var(--u-title-line-height)',
|
|
14
14
|
fontWeight: 'var(--u-title-font-weight)',
|
|
@@ -22,10 +22,10 @@ export default cB('card-list-item', [c('&', {
|
|
|
22
22
|
display: 'flex',
|
|
23
23
|
gap: '0'
|
|
24
24
|
}, [c('&.horizontal', {
|
|
25
|
-
flexDirection: 'column'
|
|
26
|
-
}), c('&.vertical', {
|
|
27
25
|
flexDirection: 'row',
|
|
28
26
|
alignItems: 'stretch'
|
|
27
|
+
}), c('&.vertical', {
|
|
28
|
+
flexDirection: 'column'
|
|
29
29
|
})]), cB('card-list-item__items--grid', {
|
|
30
30
|
display: 'grid',
|
|
31
31
|
gridAutoFlow: 'column',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { commonLight } from '../../_styles/common';
|
|
2
2
|
export const self = (vars) => {
|
|
3
|
-
const { textSecondary, textPrimary, fontWeight, fontWeightBold, fontBodyLarge, fontBodyMedium, lineHeightBodyMedium, borderRadiusLarge, containerSecondary, shadowDepth2,
|
|
3
|
+
const { textSecondary, textPrimary, fontWeight, fontWeightBold, fontBodyLarge, fontBodyMedium, lineHeightBodyMedium, borderRadiusLarge, containerSecondary, shadowDepth2, elementsQuaternary, elementsSecondary } = vars;
|
|
4
4
|
return {
|
|
5
5
|
textColor: textSecondary,
|
|
6
6
|
textLineHeight: lineHeightBodyMedium,
|
|
@@ -14,7 +14,7 @@ export const self = (vars) => {
|
|
|
14
14
|
borderRadius: borderRadiusLarge,
|
|
15
15
|
boxShadow: shadowDepth2,
|
|
16
16
|
colorEmbedded: containerSecondary,
|
|
17
|
-
dividerColor:
|
|
17
|
+
dividerColor: elementsQuaternary,
|
|
18
18
|
dropDownBgColor: elementsSecondary
|
|
19
19
|
};
|
|
20
20
|
};
|
|
@@ -182,7 +182,7 @@ export default defineComponent({
|
|
|
182
182
|
}
|
|
183
183
|
function doUpdateValue(value, option, optionPath) {
|
|
184
184
|
const { onUpdateValue, 'onUpdate:value': _onUpdateValue, onChange } = props;
|
|
185
|
-
const {
|
|
185
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
186
186
|
if (onUpdateValue) {
|
|
187
187
|
call(onUpdateValue, value, option, optionPath);
|
|
188
188
|
}
|
|
@@ -193,8 +193,8 @@ export default defineComponent({
|
|
|
193
193
|
call(onChange, value, option, optionPath);
|
|
194
194
|
}
|
|
195
195
|
uncontrolledValueRef.value = value;
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
triggerFormInput();
|
|
197
|
+
triggerFormChange();
|
|
198
198
|
}
|
|
199
199
|
function updateKeyboardKey(key) {
|
|
200
200
|
keyboardKeyRef.value = key;
|
|
@@ -371,17 +371,17 @@ export default defineComponent({
|
|
|
371
371
|
// --- methods
|
|
372
372
|
function doBlur(e) {
|
|
373
373
|
const { onBlur } = props;
|
|
374
|
-
const {
|
|
374
|
+
const { triggerFormBlur } = formItem;
|
|
375
375
|
if (onBlur)
|
|
376
376
|
call(onBlur, e);
|
|
377
|
-
|
|
377
|
+
triggerFormBlur();
|
|
378
378
|
}
|
|
379
379
|
function doFocus(e) {
|
|
380
380
|
const { onFocus } = props;
|
|
381
|
-
const {
|
|
381
|
+
const { triggerFormFocus } = formItem;
|
|
382
382
|
if (onFocus)
|
|
383
383
|
call(onFocus, e);
|
|
384
|
-
|
|
384
|
+
triggerFormFocus();
|
|
385
385
|
}
|
|
386
386
|
function focusSelectionInput() {
|
|
387
387
|
var _a;
|
|
@@ -49,7 +49,7 @@ export default defineComponent({
|
|
|
49
49
|
return new Set();
|
|
50
50
|
});
|
|
51
51
|
function toggleCheckbox(checked, checkboxValue) {
|
|
52
|
-
const {
|
|
52
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
53
53
|
const { onChange, 'onUpdate:value': _onUpdateValue, onUpdateValue } = props;
|
|
54
54
|
if (Array.isArray(mergedValueRef.value)) {
|
|
55
55
|
const groupValue = Array.from(mergedValueRef.value);
|
|
@@ -69,8 +69,8 @@ export default defineComponent({
|
|
|
69
69
|
value: checkboxValue
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
triggerFormInput();
|
|
73
|
+
triggerFormChange();
|
|
74
74
|
uncontrolledValueRef.value = groupValue;
|
|
75
75
|
// deprecated
|
|
76
76
|
if (onChange)
|
|
@@ -95,8 +95,8 @@ export default defineComponent({
|
|
|
95
95
|
if (onChange)
|
|
96
96
|
call(onChange, groupValue); // deprecated
|
|
97
97
|
uncontrolledValueRef.value = groupValue;
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
triggerFormInput();
|
|
99
|
+
triggerFormChange();
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
}
|
|
@@ -117,8 +117,8 @@ export default defineComponent({
|
|
|
117
117
|
if (onChange)
|
|
118
118
|
call(onChange, [checkboxValue]); // deprecated
|
|
119
119
|
uncontrolledValueRef.value = [checkboxValue];
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
triggerFormInput();
|
|
121
|
+
triggerFormChange();
|
|
122
122
|
}
|
|
123
123
|
else {
|
|
124
124
|
if (onUpdateValue) {
|
|
@@ -136,8 +136,8 @@ export default defineComponent({
|
|
|
136
136
|
if (onChange)
|
|
137
137
|
call(onChange, []); // deprecated
|
|
138
138
|
uncontrolledValueRef.value = [];
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
triggerFormInput();
|
|
140
|
+
triggerFormChange();
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|