@uzum-tech/ui 1.12.4 → 1.12.6
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/index.js +961 -213
- package/dist/index.prod.js +4 -4
- package/es/_internal/typography/index.d.ts +5 -1
- package/es/_internal/typography/src/text.d.ts +9 -0
- package/es/_internal/typography/src/text.js +7 -4
- package/es/_internal/typography/src/variants.d.ts +14 -14
- package/es/_internal/typography/src/variants.js +40 -48
- package/es/chat/src/ChatParts/MainArea.js +1 -1
- package/es/locales/common/ruRU.d.ts +3 -0
- package/es/locales/common/ruRU.js +152 -0
- package/es/locales/date/ruRU.d.ts +3 -0
- package/es/locales/date/ruRU.js +6 -0
- package/es/locales/index.d.ts +2 -0
- package/es/locales/index.js +2 -0
- package/es/typography/index.d.ts +5 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/typography/index.d.ts +5 -1
- package/lib/_internal/typography/src/text.d.ts +9 -0
- package/lib/_internal/typography/src/text.js +7 -4
- package/lib/_internal/typography/src/variants.d.ts +14 -14
- package/lib/_internal/typography/src/variants.js +40 -49
- package/lib/chat/src/ChatParts/MainArea.js +1 -1
- package/lib/locales/common/ruRU.d.ts +3 -0
- package/lib/locales/common/ruRU.js +154 -0
- package/lib/locales/date/ruRU.d.ts +3 -0
- package/lib/locales/date/ruRU.js +11 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/index.js +5 -1
- package/lib/typography/index.d.ts +5 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +3 -3
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export { default as InternalUText, internalTextProps } from './src/text';
|
|
2
2
|
export type { InternalTextProps } from './src/text';
|
|
3
|
-
export type { TypographyVariant, TypographyVariantOptions,
|
|
3
|
+
export type { TypographyVariant, TypographyVariantOptions,
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Weight options are fixed; override via `variantOptions` instead.
|
|
6
|
+
*/
|
|
7
|
+
TypographyVariantWeightsOptions } from './src/variants';
|
|
@@ -25,6 +25,9 @@ export declare const internalTextProps: {
|
|
|
25
25
|
readonly type: PropType<TypographyVariantOptions>;
|
|
26
26
|
readonly default: () => {};
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Weight options are fixed internally; kept for backwards compatibility.
|
|
30
|
+
*/
|
|
28
31
|
readonly variantWeightsOptions: {
|
|
29
32
|
readonly type: PropType<TypographyVariantWeightsOptions>;
|
|
30
33
|
readonly default: () => {};
|
|
@@ -114,6 +117,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
114
117
|
readonly type: PropType<TypographyVariantOptions>;
|
|
115
118
|
readonly default: () => {};
|
|
116
119
|
};
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated Weight options are fixed internally; kept for backwards compatibility.
|
|
122
|
+
*/
|
|
117
123
|
readonly variantWeightsOptions: {
|
|
118
124
|
readonly type: PropType<TypographyVariantWeightsOptions>;
|
|
119
125
|
readonly default: () => {};
|
|
@@ -207,6 +213,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
207
213
|
readonly type: PropType<TypographyVariantOptions>;
|
|
208
214
|
readonly default: () => {};
|
|
209
215
|
};
|
|
216
|
+
/**
|
|
217
|
+
* @deprecated Weight options are fixed internally; kept for backwards compatibility.
|
|
218
|
+
*/
|
|
210
219
|
readonly variantWeightsOptions: {
|
|
211
220
|
readonly type: PropType<TypographyVariantWeightsOptions>;
|
|
212
221
|
readonly default: () => {};
|
|
@@ -22,7 +22,11 @@ export const internalTextProps = Object.assign(Object.assign({}, useTheme.props)
|
|
|
22
22
|
}, variantOptions: {
|
|
23
23
|
type: Object,
|
|
24
24
|
default: () => ({})
|
|
25
|
-
},
|
|
25
|
+
},
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Weight options are fixed internally; kept for backwards compatibility.
|
|
28
|
+
*/
|
|
29
|
+
variantWeightsOptions: {
|
|
26
30
|
type: Object,
|
|
27
31
|
default: () => ({})
|
|
28
32
|
}, strong: Boolean, italic: Boolean, underline: Boolean, strikethrough: Boolean });
|
|
@@ -54,14 +58,13 @@ export default defineComponent({
|
|
|
54
58
|
'--u-margin': margin,
|
|
55
59
|
'--u-prefix-color': blockquotePrefixColor
|
|
56
60
|
};
|
|
57
|
-
return getVariantCssVars(variant, baseVars, fontFamilyWixMadeforDisplay, props.variantOptions
|
|
61
|
+
return getVariantCssVars(variant, baseVars, fontFamilyWixMadeforDisplay, props.variantOptions);
|
|
58
62
|
});
|
|
59
63
|
const themeClassHandle = inlineThemeDisabled
|
|
60
64
|
? useThemeClass('text', computed(() => `${(props === null || props === void 0 ? void 0 : props.variant) || ''}${(props === null || props === void 0 ? void 0 : props.tag) || ''}`), cssVarsRef, props)
|
|
61
65
|
: undefined;
|
|
62
66
|
const tagToRender = props.tag ||
|
|
63
|
-
(props.variant &&
|
|
64
|
-
getVariantTag(props.variant, props.variantOptions, props.variantWeightsOptions)) ||
|
|
67
|
+
(props.variant && getVariantTag(props.variant, props.variantOptions)) ||
|
|
65
68
|
'span';
|
|
66
69
|
return {
|
|
67
70
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
@@ -2,9 +2,13 @@ export interface TypographyVariantBase {
|
|
|
2
2
|
fontSize: string;
|
|
3
3
|
lineHeight: string;
|
|
4
4
|
letterSpacing: string;
|
|
5
|
+
fontStyle?: string;
|
|
6
|
+
fontFamily?: string;
|
|
7
|
+
defaultFontWeight?: TypographyFontWeight;
|
|
5
8
|
tag: keyof HTMLElementTagNameMap;
|
|
6
9
|
}
|
|
7
10
|
export type TypographyVariantOptions = Record<PropertyKey, Record<PropertyKey, TypographyVariantBase>>;
|
|
11
|
+
/** @deprecated Weight options are now fixed; this is kept for type compatibility. */
|
|
8
12
|
export type TypographyVariantWeightsOptions = Record<PropertyKey, readonly string[]>;
|
|
9
13
|
export interface TypographyVariantConfig {
|
|
10
14
|
fontFamily: string;
|
|
@@ -91,24 +95,20 @@ export declare const defaultVariantOptions: {
|
|
|
91
95
|
};
|
|
92
96
|
};
|
|
93
97
|
};
|
|
94
|
-
declare const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
readonly title: readonly ["medium", "semi-bold", "bold"];
|
|
98
|
-
readonly body: readonly ["medium", "semi-bold", "bold"];
|
|
99
|
-
};
|
|
100
|
-
type VariantWeights = typeof variantWeights;
|
|
98
|
+
declare const weightOrder: readonly ["", "thin", "extra-light", "light", "normal", "medium", "semi-bold", "bold", "extra-bold", "black"];
|
|
99
|
+
export type TypographyFontWeight = (typeof weightOrder)[number];
|
|
100
|
+
type VariantWeights = typeof weightOrder;
|
|
101
101
|
type WeightSuffix<W> = W extends string ? (W extends '' ? '' : `-${W}`) : '';
|
|
102
|
+
type VariantCategories<Options> = Options;
|
|
102
103
|
export type TypographyVariantFromOptions<Options extends TypographyVariantOptions> = {
|
|
103
|
-
[Category in keyof Options
|
|
104
|
-
[Size in keyof Options[Category]]: `${string & Category}-${string & Size}${WeightSuffix<VariantWeights[
|
|
105
|
-
}[keyof Options[Category]];
|
|
106
|
-
}[keyof Options
|
|
104
|
+
[Category in keyof VariantCategories<Options>]: {
|
|
105
|
+
[Size in keyof VariantCategories<Options>[Category]]: `${string & Category}-${string & Size}${WeightSuffix<VariantWeights[number]>}`;
|
|
106
|
+
}[keyof VariantCategories<Options>[Category]];
|
|
107
|
+
}[keyof VariantCategories<Options>];
|
|
107
108
|
export type TypographyDefaultVariant = TypographyVariantFromOptions<typeof defaultVariantOptions>;
|
|
108
109
|
export type TypographyVariant = TypographyDefaultVariant | (string & {});
|
|
109
110
|
export declare function mergeVariantOptions(variantOptions?: TypographyVariantOptions): TypographyVariantOptions;
|
|
110
|
-
export declare function
|
|
111
|
-
export declare function
|
|
112
|
-
export declare function getVariantTag(variant: TypographyVariant, variantOptions?: TypographyVariantOptions, variantWeightsOptions?: Partial<Record<PropertyKey, readonly string[]>>): keyof HTMLElementTagNameMap;
|
|
111
|
+
export declare function getVariantCssVars(variant: TypographyVariant | undefined, baseVars: Record<string, string>, fontFamilyVariant: string, variantOptions?: TypographyVariantOptions): Record<string, string>;
|
|
112
|
+
export declare function getVariantTag(variant: TypographyVariant, variantOptions?: TypographyVariantOptions): keyof HTMLElementTagNameMap;
|
|
113
113
|
export declare const variantToCssVars: Record<string, TypographyVariantConfig>;
|
|
114
114
|
export {};
|
|
@@ -75,27 +75,42 @@ export const defaultVariantOptions = {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
const weightOrder = [
|
|
79
|
+
'',
|
|
80
|
+
'thin',
|
|
81
|
+
'extra-light',
|
|
82
|
+
'light',
|
|
83
|
+
'normal',
|
|
84
|
+
'medium',
|
|
85
|
+
'semi-bold',
|
|
86
|
+
'bold',
|
|
87
|
+
'extra-bold',
|
|
88
|
+
'black'
|
|
89
|
+
];
|
|
84
90
|
const fontWeights = {
|
|
85
|
-
|
|
86
|
-
'
|
|
87
|
-
|
|
88
|
-
|
|
91
|
+
thin: { weight: '100', style: 'normal' },
|
|
92
|
+
'extra-light': { weight: '200', style: 'normal' },
|
|
93
|
+
light: { weight: '300', style: 'normal' },
|
|
94
|
+
normal: { weight: '400', style: 'normal' },
|
|
95
|
+
medium: { weight: '500', style: 'normal' },
|
|
96
|
+
'semi-bold': { weight: '600', style: 'normal' },
|
|
97
|
+
bold: { weight: '700', style: 'normal' },
|
|
98
|
+
'extra-bold': { weight: '800', style: 'normal' },
|
|
99
|
+
black: { weight: '900', style: 'normal' },
|
|
100
|
+
'': { weight: '700', style: 'normal' }
|
|
89
101
|
};
|
|
90
102
|
function createVariant(options, category, size, weight) {
|
|
91
|
-
var _a, _b, _c;
|
|
103
|
+
var _a, _b, _c, _d, _e, _f;
|
|
92
104
|
const base = (_b = (_a = options === null || options === void 0 ? void 0 : options[category]) === null || _a === void 0 ? void 0 : _a[size]) !== null && _b !== void 0 ? _b : (_c = defaultVariantOptions[category]) === null || _c === void 0 ? void 0 : _c[size];
|
|
93
|
-
const
|
|
105
|
+
const effectiveWeight = weight === '' ? (_d = base === null || base === void 0 ? void 0 : base.defaultFontWeight) !== null && _d !== void 0 ? _d : '' : weight;
|
|
106
|
+
const { weight: fontWeight, style: fontStyle } = fontWeights[effectiveWeight] || fontWeights[''];
|
|
107
|
+
const resolvedFontFamily = (_e = base.fontFamily) !== null && _e !== void 0 ? _e : fontFamily;
|
|
108
|
+
const resolvedFontStyle = (_f = base.fontStyle) !== null && _f !== void 0 ? _f : fontStyle;
|
|
94
109
|
return {
|
|
95
|
-
fontFamily,
|
|
110
|
+
fontFamily: resolvedFontFamily,
|
|
96
111
|
fontSize: base.fontSize,
|
|
97
112
|
fontWeight,
|
|
98
|
-
fontStyle,
|
|
113
|
+
fontStyle: resolvedFontStyle,
|
|
99
114
|
lineHeight: base.lineHeight,
|
|
100
115
|
letterSpacing: base.letterSpacing,
|
|
101
116
|
tag: base.tag
|
|
@@ -115,34 +130,11 @@ export function mergeVariantOptions(variantOptions) {
|
|
|
115
130
|
});
|
|
116
131
|
return mergedOptions;
|
|
117
132
|
}
|
|
118
|
-
|
|
119
|
-
if (!variantWeightsOptions)
|
|
120
|
-
return variantWeights;
|
|
121
|
-
const mergedWeights = {};
|
|
122
|
-
const categories = new Set([
|
|
123
|
-
...Object.keys(variantWeights),
|
|
124
|
-
...Object.keys(variantWeightsOptions)
|
|
125
|
-
]);
|
|
126
|
-
categories.forEach((category) => {
|
|
127
|
-
const defaultWeights = variantWeights[category] || [];
|
|
128
|
-
const customWeights = variantWeightsOptions[category] || [];
|
|
129
|
-
const combined = [...defaultWeights];
|
|
130
|
-
customWeights.forEach((weight) => {
|
|
131
|
-
if (!combined.includes(weight)) {
|
|
132
|
-
combined.push(weight);
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
mergedWeights[category] = combined;
|
|
136
|
-
});
|
|
137
|
-
return mergedWeights;
|
|
138
|
-
}
|
|
139
|
-
function createVariantToCssVars(variantOptions, variantWeightsOptions) {
|
|
133
|
+
function createVariantToCssVars(variantOptions) {
|
|
140
134
|
const configs = {};
|
|
141
|
-
const mergedWeights = mergeVariantWeights(variantWeightsOptions);
|
|
142
135
|
Object.entries(variantOptions).forEach(([category, sizes]) => {
|
|
143
|
-
const weights = mergedWeights[category] || [];
|
|
144
136
|
Object.keys(sizes).forEach((size) => {
|
|
145
|
-
|
|
137
|
+
weightOrder.forEach((weight) => {
|
|
146
138
|
const variantKey = `${category}-${size}${weight ? `-${weight}` : ''}`;
|
|
147
139
|
configs[variantKey] = createVariant(variantOptions, category, size, weight);
|
|
148
140
|
});
|
|
@@ -150,25 +142,25 @@ function createVariantToCssVars(variantOptions, variantWeightsOptions) {
|
|
|
150
142
|
});
|
|
151
143
|
return configs;
|
|
152
144
|
}
|
|
153
|
-
function resolveVariantConfigs(variantOptions
|
|
145
|
+
function resolveVariantConfigs(variantOptions) {
|
|
154
146
|
const hasCustomOptions = variantOptions && Object.keys(variantOptions).length > 0;
|
|
155
|
-
|
|
156
|
-
if (!hasCustomOptions && !hasCustomWeights) {
|
|
147
|
+
if (!hasCustomOptions) {
|
|
157
148
|
return variantToCssVars;
|
|
158
149
|
}
|
|
159
|
-
|
|
150
|
+
const mergedOptions = mergeVariantOptions(variantOptions);
|
|
151
|
+
return createVariantToCssVars(mergedOptions);
|
|
160
152
|
}
|
|
161
|
-
export function getVariantCssVars(variant, baseVars, fontFamilyVariant, variantOptions
|
|
153
|
+
export function getVariantCssVars(variant, baseVars, fontFamilyVariant, variantOptions) {
|
|
162
154
|
const variantStyles = variant
|
|
163
|
-
? resolveVariantConfigs(variantOptions
|
|
155
|
+
? resolveVariantConfigs(variantOptions)[variant]
|
|
164
156
|
: undefined;
|
|
165
157
|
if (!variantStyles) {
|
|
166
158
|
return baseVars;
|
|
167
159
|
}
|
|
168
160
|
return Object.assign(Object.assign({}, baseVars), { '--u-font-famliy-variant': fontFamilyVariant, '--u-variant-font-size': variantStyles.fontSize, '--u-variant-font-weight': variantStyles.fontWeight, '--u-variant-line-height': variantStyles.lineHeight, '--u-variant-font-family': variantStyles.fontFamily, '--u-variant-font-style': variantStyles.fontStyle, '--u-variant-letter-spacing': variantStyles.letterSpacing });
|
|
169
161
|
}
|
|
170
|
-
export function getVariantTag(variant, variantOptions
|
|
162
|
+
export function getVariantTag(variant, variantOptions) {
|
|
171
163
|
var _a;
|
|
172
|
-
return (_a = resolveVariantConfigs(variantOptions
|
|
164
|
+
return (_a = resolveVariantConfigs(variantOptions)[variant]) === null || _a === void 0 ? void 0 : _a.tag;
|
|
173
165
|
}
|
|
174
|
-
export const variantToCssVars = createVariantToCssVars(defaultVariantOptions
|
|
166
|
+
export const variantToCssVars = createVariantToCssVars(defaultVariantOptions);
|
|
@@ -384,7 +384,7 @@ export default defineComponent({
|
|
|
384
384
|
};
|
|
385
385
|
const renderFooter = () => {
|
|
386
386
|
return (h("div", { class: `${mergedClsPrefixRef.value}-chat-main__footer` },
|
|
387
|
-
h(UUpload, Object.assign({ abstract: true, multiple: true, defaultUpload: false, fileList: attachmentFileList.value, onUpdateFileList: handleFileListUpdate }, footerUploadPropsRef.value, { onChange: handleOnChange() }), {
|
|
387
|
+
h(UUpload, Object.assign({ abstract: true, multiple: true, defaultUpload: false, fileList: attachmentFileList.value, onUpdateFileList: !handleOnChange() ? handleFileListUpdate : undefined }, footerUploadPropsRef.value, { onChange: handleOnChange() }), {
|
|
388
388
|
default: () => (h(UFlex, { align: "end", size: "small", wrap: false, class: `${mergedClsPrefixRef.value}-chat-main__input-container` }, {
|
|
389
389
|
default: () => (h(Fragment, null,
|
|
390
390
|
h(UUploadTrigger, { abstract: true }, {
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
const ruRu = {
|
|
2
|
+
name: 'ru-RU',
|
|
3
|
+
global: {
|
|
4
|
+
undo: 'Отменить',
|
|
5
|
+
redo: 'Вернуть',
|
|
6
|
+
confirm: 'Подтвердить',
|
|
7
|
+
clear: 'Очистить'
|
|
8
|
+
},
|
|
9
|
+
Popconfirm: {
|
|
10
|
+
positiveText: 'Подтвердить',
|
|
11
|
+
negativeText: 'Отмена'
|
|
12
|
+
},
|
|
13
|
+
Cascader: {
|
|
14
|
+
placeholder: 'Выбрать',
|
|
15
|
+
loading: 'Загрузка',
|
|
16
|
+
loadingRequiredMessage: (label) => `Загрузите все дочерние узлы ${label} прежде чем они станут необязательными`
|
|
17
|
+
},
|
|
18
|
+
Time: {
|
|
19
|
+
dateFormat: 'yyyy-MM-dd',
|
|
20
|
+
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss'
|
|
21
|
+
},
|
|
22
|
+
DatePicker: {
|
|
23
|
+
yearFormat: 'yyyy',
|
|
24
|
+
monthFormat: 'MMM',
|
|
25
|
+
dayFormat: 'eeeeee',
|
|
26
|
+
yearTypeFormat: 'yyyy',
|
|
27
|
+
monthTypeFormat: 'yyyy-MM',
|
|
28
|
+
dateFormat: 'yyyy-MM-dd',
|
|
29
|
+
dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
|
|
30
|
+
quarterFormat: 'yyyy-qqq',
|
|
31
|
+
clear: 'Очистить',
|
|
32
|
+
now: 'Сейчас',
|
|
33
|
+
confirm: 'Подтвердить',
|
|
34
|
+
selectTime: 'Выбрать время',
|
|
35
|
+
selectDate: 'Выбрать дату',
|
|
36
|
+
datePlaceholder: 'Выбрать дату',
|
|
37
|
+
datetimePlaceholder: 'Выбрать дату и время',
|
|
38
|
+
monthPlaceholder: 'Выберите месяц',
|
|
39
|
+
// FIXME: translation needed
|
|
40
|
+
yearPlaceholder: 'Select Year',
|
|
41
|
+
quarterPlaceholder: 'Select Quarter',
|
|
42
|
+
startDatePlaceholder: 'Дата начала',
|
|
43
|
+
endDatePlaceholder: 'Дата окончания',
|
|
44
|
+
startDatetimePlaceholder: 'Дата и время начала',
|
|
45
|
+
endDatetimePlaceholder: 'Дата и время окончания',
|
|
46
|
+
// FIXME: translation needed
|
|
47
|
+
startMonthPlaceholder: 'Start Month',
|
|
48
|
+
endMonthPlaceholder: 'End Month',
|
|
49
|
+
monthBeforeYear: true,
|
|
50
|
+
firstDayOfWeek: 0,
|
|
51
|
+
today: 'Сегодня'
|
|
52
|
+
},
|
|
53
|
+
DataTable: {
|
|
54
|
+
checkTableAll: 'Выбрать все в таблице',
|
|
55
|
+
uncheckTableAll: 'Отменить все в таблице',
|
|
56
|
+
confirm: 'Подтвердить',
|
|
57
|
+
clear: 'Очистить'
|
|
58
|
+
},
|
|
59
|
+
LegacyTransfer: {
|
|
60
|
+
sourceTitle: 'Источник',
|
|
61
|
+
targetTitle: 'Назначение'
|
|
62
|
+
},
|
|
63
|
+
// TODO: translation
|
|
64
|
+
Transfer: {
|
|
65
|
+
selectAll: 'Select all',
|
|
66
|
+
unselectAll: 'Unselect all',
|
|
67
|
+
clearAll: 'Clear',
|
|
68
|
+
total: (num) => `Total ${num} items`,
|
|
69
|
+
selected: (num) => `${num} items selected`
|
|
70
|
+
},
|
|
71
|
+
Empty: {
|
|
72
|
+
title: 'Нет совпадений',
|
|
73
|
+
description: 'Попробуйте изменить поисковый запрос'
|
|
74
|
+
},
|
|
75
|
+
Select: {
|
|
76
|
+
placeholder: 'Выбрать'
|
|
77
|
+
},
|
|
78
|
+
TimePicker: {
|
|
79
|
+
placeholder: 'Выбрать время',
|
|
80
|
+
positiveText: 'OK',
|
|
81
|
+
negativeText: 'Отменить',
|
|
82
|
+
now: 'Сейчас'
|
|
83
|
+
},
|
|
84
|
+
Pagination: {
|
|
85
|
+
goto: 'Перейти',
|
|
86
|
+
selectionSuffix: 'страница'
|
|
87
|
+
},
|
|
88
|
+
DynamicTags: {
|
|
89
|
+
add: 'Добавить'
|
|
90
|
+
},
|
|
91
|
+
Log: {
|
|
92
|
+
loading: 'Загрузка'
|
|
93
|
+
},
|
|
94
|
+
Input: {
|
|
95
|
+
placeholder: 'Ввести',
|
|
96
|
+
copied: 'Скопировано'
|
|
97
|
+
},
|
|
98
|
+
InputNumber: {
|
|
99
|
+
placeholder: 'Ввести'
|
|
100
|
+
},
|
|
101
|
+
DynamicInput: {
|
|
102
|
+
create: 'Создать'
|
|
103
|
+
},
|
|
104
|
+
ThemeEditor: {
|
|
105
|
+
title: 'Редактор темы',
|
|
106
|
+
clearAllVars: 'Очистить все',
|
|
107
|
+
clearSearch: 'Очистить поиск',
|
|
108
|
+
filterCompName: 'Фильтровать по имени компонента',
|
|
109
|
+
filterVarName: 'Фильтровать имена переменных',
|
|
110
|
+
import: 'Импорт',
|
|
111
|
+
export: 'Экспорт',
|
|
112
|
+
restore: 'Сбросить'
|
|
113
|
+
},
|
|
114
|
+
// TODO: translation
|
|
115
|
+
Image: {
|
|
116
|
+
tipPrevious: 'Previous picture (←)',
|
|
117
|
+
tipNext: 'Next picture (→)',
|
|
118
|
+
tipCounterclockwise: 'Counterclockwise',
|
|
119
|
+
tipClockwise: 'Clockwise',
|
|
120
|
+
tipZoomOut: 'Zoom out',
|
|
121
|
+
tipZoomIn: 'Zoom in',
|
|
122
|
+
tipDownload: 'Download',
|
|
123
|
+
tipClose: 'Close (Esc)',
|
|
124
|
+
// TODO: translation
|
|
125
|
+
tipOriginalSize: 'Zoom to original size'
|
|
126
|
+
},
|
|
127
|
+
Upload: {
|
|
128
|
+
title: 'Выберите файл или перетащите сюда',
|
|
129
|
+
subtitle: 'PDF, PNG, JPEG не более 100 MB',
|
|
130
|
+
uploading: 'Загружается'
|
|
131
|
+
},
|
|
132
|
+
Chat: {
|
|
133
|
+
inputPlaceholder: 'Написать сообщение...',
|
|
134
|
+
typingText: 'Печатает...',
|
|
135
|
+
retryText: 'Повторно отправить',
|
|
136
|
+
closeButtonText: 'Завершить чат',
|
|
137
|
+
shareButtonTooltip: 'Поделиться чатом',
|
|
138
|
+
profileButtonTooltip: 'Просмотреть профиль',
|
|
139
|
+
unreadNotificationText: 'новых сообщений',
|
|
140
|
+
editText: 'Редактировать',
|
|
141
|
+
copyText: 'Скопировать',
|
|
142
|
+
deleteText: 'Удалить',
|
|
143
|
+
editingTitle: 'Редактирование'
|
|
144
|
+
},
|
|
145
|
+
Header: {
|
|
146
|
+
desktopSearchTitle: 'Поиск',
|
|
147
|
+
searchPlaceholder: 'Поиск по сайту',
|
|
148
|
+
primaryActionText: 'Стать клиентом',
|
|
149
|
+
secondaryActionText: 'Перейти в приложение'
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
export default ruRu;
|
package/es/locales/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { default as enUS } from './common/enUS';
|
|
2
|
+
export { default as ruRU } from './common/ruRU';
|
|
2
3
|
export { default as dateEnUS } from './date/enUS';
|
|
4
|
+
export { default as dateRuRU } from './date/ruRU';
|
|
3
5
|
export type { ULocale } from './common/enUS';
|
|
4
6
|
export type { UDateLocale } from './date/enUS';
|
|
5
7
|
export type { UPartialLocale } from './utils/index';
|
package/es/locales/index.js
CHANGED
package/es/typography/index.d.ts
CHANGED
|
@@ -20,4 +20,8 @@ export type { OlProps } from './src/ol';
|
|
|
20
20
|
export { default as ULi } from './src/li';
|
|
21
21
|
export { default as UText, textProps } from './src/text';
|
|
22
22
|
export type { TextProps } from './src/text';
|
|
23
|
-
export type { TypographyVariant, TypographyVariantOptions,
|
|
23
|
+
export type { TypographyVariant, TypographyVariantOptions,
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Weight options are fixed; kept for backwards compatibility.
|
|
26
|
+
*/
|
|
27
|
+
TypographyVariantWeightsOptions } from '../_internal/typography';
|
package/es/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.12.
|
|
1
|
+
declare const _default: "1.12.6";
|
|
2
2
|
export default _default;
|
package/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.12.
|
|
1
|
+
export default '1.12.6';
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export { default as InternalUText, internalTextProps } from './src/text';
|
|
2
2
|
export type { InternalTextProps } from './src/text';
|
|
3
|
-
export type { TypographyVariant, TypographyVariantOptions,
|
|
3
|
+
export type { TypographyVariant, TypographyVariantOptions,
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Weight options are fixed; override via `variantOptions` instead.
|
|
6
|
+
*/
|
|
7
|
+
TypographyVariantWeightsOptions } from './src/variants';
|
|
@@ -25,6 +25,9 @@ export declare const internalTextProps: {
|
|
|
25
25
|
readonly type: PropType<TypographyVariantOptions>;
|
|
26
26
|
readonly default: () => {};
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Weight options are fixed internally; kept for backwards compatibility.
|
|
30
|
+
*/
|
|
28
31
|
readonly variantWeightsOptions: {
|
|
29
32
|
readonly type: PropType<TypographyVariantWeightsOptions>;
|
|
30
33
|
readonly default: () => {};
|
|
@@ -114,6 +117,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
114
117
|
readonly type: PropType<TypographyVariantOptions>;
|
|
115
118
|
readonly default: () => {};
|
|
116
119
|
};
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated Weight options are fixed internally; kept for backwards compatibility.
|
|
122
|
+
*/
|
|
117
123
|
readonly variantWeightsOptions: {
|
|
118
124
|
readonly type: PropType<TypographyVariantWeightsOptions>;
|
|
119
125
|
readonly default: () => {};
|
|
@@ -207,6 +213,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
207
213
|
readonly type: PropType<TypographyVariantOptions>;
|
|
208
214
|
readonly default: () => {};
|
|
209
215
|
};
|
|
216
|
+
/**
|
|
217
|
+
* @deprecated Weight options are fixed internally; kept for backwards compatibility.
|
|
218
|
+
*/
|
|
210
219
|
readonly variantWeightsOptions: {
|
|
211
220
|
readonly type: PropType<TypographyVariantWeightsOptions>;
|
|
212
221
|
readonly default: () => {};
|
|
@@ -28,7 +28,11 @@ exports.internalTextProps = Object.assign(Object.assign({}, _mixins_1.useTheme.p
|
|
|
28
28
|
}, variantOptions: {
|
|
29
29
|
type: Object,
|
|
30
30
|
default: () => ({})
|
|
31
|
-
},
|
|
31
|
+
},
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Weight options are fixed internally; kept for backwards compatibility.
|
|
34
|
+
*/
|
|
35
|
+
variantWeightsOptions: {
|
|
32
36
|
type: Object,
|
|
33
37
|
default: () => ({})
|
|
34
38
|
}, strong: Boolean, italic: Boolean, underline: Boolean, strikethrough: Boolean });
|
|
@@ -60,14 +64,13 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
60
64
|
'--u-margin': margin,
|
|
61
65
|
'--u-prefix-color': blockquotePrefixColor
|
|
62
66
|
};
|
|
63
|
-
return (0, variants_1.getVariantCssVars)(variant, baseVars, fontFamilyWixMadeforDisplay, props.variantOptions
|
|
67
|
+
return (0, variants_1.getVariantCssVars)(variant, baseVars, fontFamilyWixMadeforDisplay, props.variantOptions);
|
|
64
68
|
});
|
|
65
69
|
const themeClassHandle = inlineThemeDisabled
|
|
66
70
|
? (0, _mixins_1.useThemeClass)('text', (0, vue_1.computed)(() => `${(props === null || props === void 0 ? void 0 : props.variant) || ''}${(props === null || props === void 0 ? void 0 : props.tag) || ''}`), cssVarsRef, props)
|
|
67
71
|
: undefined;
|
|
68
72
|
const tagToRender = props.tag ||
|
|
69
|
-
(props.variant &&
|
|
70
|
-
(0, variants_1.getVariantTag)(props.variant, props.variantOptions, props.variantWeightsOptions)) ||
|
|
73
|
+
(props.variant && (0, variants_1.getVariantTag)(props.variant, props.variantOptions)) ||
|
|
71
74
|
'span';
|
|
72
75
|
return {
|
|
73
76
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
@@ -2,9 +2,13 @@ export interface TypographyVariantBase {
|
|
|
2
2
|
fontSize: string;
|
|
3
3
|
lineHeight: string;
|
|
4
4
|
letterSpacing: string;
|
|
5
|
+
fontStyle?: string;
|
|
6
|
+
fontFamily?: string;
|
|
7
|
+
defaultFontWeight?: TypographyFontWeight;
|
|
5
8
|
tag: keyof HTMLElementTagNameMap;
|
|
6
9
|
}
|
|
7
10
|
export type TypographyVariantOptions = Record<PropertyKey, Record<PropertyKey, TypographyVariantBase>>;
|
|
11
|
+
/** @deprecated Weight options are now fixed; this is kept for type compatibility. */
|
|
8
12
|
export type TypographyVariantWeightsOptions = Record<PropertyKey, readonly string[]>;
|
|
9
13
|
export interface TypographyVariantConfig {
|
|
10
14
|
fontFamily: string;
|
|
@@ -91,24 +95,20 @@ export declare const defaultVariantOptions: {
|
|
|
91
95
|
};
|
|
92
96
|
};
|
|
93
97
|
};
|
|
94
|
-
declare const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
readonly title: readonly ["medium", "semi-bold", "bold"];
|
|
98
|
-
readonly body: readonly ["medium", "semi-bold", "bold"];
|
|
99
|
-
};
|
|
100
|
-
type VariantWeights = typeof variantWeights;
|
|
98
|
+
declare const weightOrder: readonly ["", "thin", "extra-light", "light", "normal", "medium", "semi-bold", "bold", "extra-bold", "black"];
|
|
99
|
+
export type TypographyFontWeight = (typeof weightOrder)[number];
|
|
100
|
+
type VariantWeights = typeof weightOrder;
|
|
101
101
|
type WeightSuffix<W> = W extends string ? (W extends '' ? '' : `-${W}`) : '';
|
|
102
|
+
type VariantCategories<Options> = Options;
|
|
102
103
|
export type TypographyVariantFromOptions<Options extends TypographyVariantOptions> = {
|
|
103
|
-
[Category in keyof Options
|
|
104
|
-
[Size in keyof Options[Category]]: `${string & Category}-${string & Size}${WeightSuffix<VariantWeights[
|
|
105
|
-
}[keyof Options[Category]];
|
|
106
|
-
}[keyof Options
|
|
104
|
+
[Category in keyof VariantCategories<Options>]: {
|
|
105
|
+
[Size in keyof VariantCategories<Options>[Category]]: `${string & Category}-${string & Size}${WeightSuffix<VariantWeights[number]>}`;
|
|
106
|
+
}[keyof VariantCategories<Options>[Category]];
|
|
107
|
+
}[keyof VariantCategories<Options>];
|
|
107
108
|
export type TypographyDefaultVariant = TypographyVariantFromOptions<typeof defaultVariantOptions>;
|
|
108
109
|
export type TypographyVariant = TypographyDefaultVariant | (string & {});
|
|
109
110
|
export declare function mergeVariantOptions(variantOptions?: TypographyVariantOptions): TypographyVariantOptions;
|
|
110
|
-
export declare function
|
|
111
|
-
export declare function
|
|
112
|
-
export declare function getVariantTag(variant: TypographyVariant, variantOptions?: TypographyVariantOptions, variantWeightsOptions?: Partial<Record<PropertyKey, readonly string[]>>): keyof HTMLElementTagNameMap;
|
|
111
|
+
export declare function getVariantCssVars(variant: TypographyVariant | undefined, baseVars: Record<string, string>, fontFamilyVariant: string, variantOptions?: TypographyVariantOptions): Record<string, string>;
|
|
112
|
+
export declare function getVariantTag(variant: TypographyVariant, variantOptions?: TypographyVariantOptions): keyof HTMLElementTagNameMap;
|
|
113
113
|
export declare const variantToCssVars: Record<string, TypographyVariantConfig>;
|
|
114
114
|
export {};
|