@dskripchenko/ui 1.6.1 → 1.7.0
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/components/Cascader/UidCascader.vue.d.ts +5 -0
- package/dist/components/Checkbox/UidCheckbox.vue.d.ts +1 -1
- package/dist/components/Checkbox/UidCheckboxGroup.vue.d.ts +1 -1
- package/dist/components/Code/UidCode.vue.d.ts +2 -2
- package/dist/components/ColorPicker/UidColorPicker.vue.d.ts +8 -0
- package/dist/components/Combobox/UidCombobox.vue.d.ts +1 -0
- package/dist/components/DatePicker/UidDatePicker.vue.d.ts +5 -0
- package/dist/components/DateRangePicker/UidDateRangePicker.vue.d.ts +8 -3
- package/dist/components/FormField/UidFormField.vue.d.ts +1 -1
- package/dist/components/Gauge/UidGauge.vue.d.ts +3 -0
- package/dist/components/Image/UidImage.vue.d.ts +1 -1
- package/dist/components/Mention/UidMention.vue.d.ts +1 -0
- package/dist/components/Radio/UidRadioGroup.vue.d.ts +1 -1
- package/dist/components/Rating/UidRating.vue.d.ts +3 -0
- package/dist/components/Switch/UidSwitch.vue.d.ts +1 -1
- package/dist/components/Table/UidTable.vue.d.ts +2 -2
- package/dist/components/Textarea/UidTextarea.vue.d.ts +1 -1
- package/dist/components/TimePicker/UidTimePicker.vue.d.ts +5 -0
- package/dist/components/TreeSelect/UidTreeSelect.vue.d.ts +5 -0
- package/dist/composables/useFloatingPanel.d.ts +31 -0
- package/dist/composables/useOverlayStack.d.ts +5 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2830 -2459
- package/dist/locales/types.d.ts +103 -0
- package/dist/styles/all.css +32 -3
- package/dist/styles/global.css +10 -0
- package/dist/styles/index.css +1 -1
- package/dist/styles/themes.css +4 -0
- package/dist/styles/tokens.css +17 -2
- package/dist/utils/formatNumber.d.ts +14 -0
- package/dist/utils/validation/index.d.ts +1 -1
- package/dist/utils/validation/messages.d.ts +3 -0
- package/package.json +1 -1
package/dist/styles/themes.css
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
--uid-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
|
|
35
35
|
--uid-shadow-md: 0 4px 12px rgb(0 0 0 / 0.08);
|
|
36
36
|
--uid-shadow-lg: 0 8px 24px rgb(0 0 0 / 0.12);
|
|
37
|
+
--uid-shadow-xl: 0 20px 60px rgb(0 0 0 / 0.3);
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
:root[data-theme='dark'] {
|
|
@@ -71,6 +72,7 @@
|
|
|
71
72
|
--uid-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.2);
|
|
72
73
|
--uid-shadow-md: 0 4px 12px rgb(0 0 0 / 0.4);
|
|
73
74
|
--uid-shadow-lg: 0 8px 24px rgb(0 0 0 / 0.6);
|
|
75
|
+
--uid-shadow-xl: 0 20px 60px rgb(0 0 0 / 0.6);
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
/* Aliases: компоненты используют --uid-color-* → маппинг на семантические токены */
|
|
@@ -95,6 +97,8 @@
|
|
|
95
97
|
--uid-color-primary: var(--uid-accent);
|
|
96
98
|
--uid-color-primary-hover: var(--uid-accent-hover);
|
|
97
99
|
--uid-color-primary-subtle: var(--uid-accent-subtle);
|
|
100
|
+
/* The halo of a focused field (box-shadow). */
|
|
101
|
+
--uid-focus-ring: 0 0 0 3px var(--uid-color-primary-subtle);
|
|
98
102
|
--uid-color-focus-ring: var(--uid-accent);
|
|
99
103
|
|
|
100
104
|
--uid-color-danger: var(--uid-danger);
|
package/dist/styles/tokens.css
CHANGED
|
@@ -53,6 +53,8 @@
|
|
|
53
53
|
--uid-font-size-xs: 12px;
|
|
54
54
|
--uid-font-size-sm: 14px;
|
|
55
55
|
--uid-font-size-md: 16px;
|
|
56
|
+
/* The body size; components that follow the running text use it. */
|
|
57
|
+
--uid-font-size-base: var(--uid-font-size-md);
|
|
56
58
|
--uid-font-size-lg: 18px;
|
|
57
59
|
--uid-font-size-xl: 20px;
|
|
58
60
|
--uid-font-size-2xl: 24px;
|
|
@@ -106,13 +108,26 @@
|
|
|
106
108
|
--uid-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
107
109
|
}
|
|
108
110
|
|
|
111
|
+
/*
|
|
112
|
+
* The stacking scale, low to high:
|
|
113
|
+
* base < sticky = affix < fixed < dropdown < overlay < drawer = modal < popover < toast < tooltip
|
|
114
|
+
*
|
|
115
|
+
* Every floating layer (select, menu, pickers, popover) is teleported to the
|
|
116
|
+
* body and stacks at --uid-z-popover, so it opens above a modal or a drawer —
|
|
117
|
+
* and above their footers — rather than under them. Tooltips sit above all.
|
|
118
|
+
*/
|
|
109
119
|
:root {
|
|
110
120
|
--uid-z-base: 0;
|
|
111
121
|
--uid-z-raised: 1;
|
|
112
|
-
--uid-z-
|
|
113
|
-
--uid-z-
|
|
122
|
+
--uid-z-sticky: 100;
|
|
123
|
+
--uid-z-affix: 100;
|
|
124
|
+
/* Fixed page furniture (back-to-top): above content, below overlays. */
|
|
125
|
+
--uid-z-fixed: 150;
|
|
126
|
+
--uid-z-dropdown: 200;
|
|
114
127
|
--uid-z-overlay: 300;
|
|
128
|
+
--uid-z-drawer: 400;
|
|
115
129
|
--uid-z-modal: 400;
|
|
130
|
+
--uid-z-popover: 450;
|
|
116
131
|
--uid-z-toast: 500;
|
|
117
132
|
--uid-z-tooltip: 600;
|
|
118
133
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locale-aware number formatting shared by the components that print numbers
|
|
3
|
+
* (gauge, rating, file sizes). The locale is a BCP 47 tag, normally the active
|
|
4
|
+
* kit locale's `code`; an unknown tag falls back to the runtime default rather
|
|
5
|
+
* than throwing.
|
|
6
|
+
*/
|
|
7
|
+
export declare function formatNumber(value: number, locale: string | undefined, options?: Intl.NumberFormatOptions): string;
|
|
8
|
+
/** A number with exactly `digits` fraction digits, in the given locale. */
|
|
9
|
+
export declare function formatFixed(value: number, locale: string | undefined, digits: number): string;
|
|
10
|
+
/**
|
|
11
|
+
* A file size with a short unit in the given locale: "512 B", "1.5 kB",
|
|
12
|
+
* "2,3 МБ". Falls back to plain English units where Intl has no unit style.
|
|
13
|
+
*/
|
|
14
|
+
export declare function formatFileSize(bytes: number, locale: string | undefined): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { FieldContext, RuleFn, RuleInput, MessageFn, MessageInput, ValidationMessages } from './types';
|
|
2
|
-
export { setMessages, getMessage } from './messages';
|
|
2
|
+
export { setMessages, getMessage, setValidationLocale } from './messages';
|
|
3
3
|
export { required, nullable, email, url, numeric, integer, min, max, minValue, maxValue, regex, inList, sameAs, requiredIf, requiredUnless, } from './rules';
|
|
4
4
|
export { parseRules, runRules } from './parseRules';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { FieldContext, ValidationMessages } from './types';
|
|
2
|
+
import { UidLocale } from '../../locales/types.js';
|
|
3
|
+
/** Switches the default messages to a locale's bag; called by provideLocale(). */
|
|
4
|
+
export declare function setValidationLocale(locale: Pick<UidLocale, 'validation'>): void;
|
|
2
5
|
export declare function setMessages(messages: ValidationMessages): void;
|
|
3
6
|
export declare function getMessage(ruleName: string, ctx: FieldContext): string;
|