@uzum-tech/ui 2.1.3 → 2.2.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/index.js +1236 -530
- package/dist/index.mjs +1232 -531
- package/dist/index.prod.js +2 -2
- package/dist/index.prod.mjs +2 -2
- package/es/_internal/icon/index.d.ts +1 -1
- package/es/_internal/icon/index.mjs +1 -1
- package/es/_internal/icon/src/UIcon.d.ts +11 -1
- package/es/_internal/icon/src/UIcon.mjs +20 -8
- package/es/_internal/icon/src/interface.d.ts +11 -4
- package/es/_internal/icon/src/interface.mjs +4 -0
- package/es/_internal/icon/src/render-icon.d.ts +1 -0
- package/es/_internal/icon/src/render-icon.mjs +5 -0
- package/es/_internal/icons/SearchOutline.d.ts +2 -0
- package/es/_internal/icons/SearchOutline.mjs +18 -0
- package/es/_internal/icons/index.d.ts +1 -0
- package/es/_internal/icons/index.mjs +1 -0
- package/es/_mixins/use-form-item.mjs +5 -0
- package/es/_utils/dom/copy-to-clipboard.d.ts +1 -0
- package/es/_utils/dom/copy-to-clipboard.mjs +8 -0
- package/es/_utils/dom/index.d.ts +1 -0
- package/es/_utils/dom/index.mjs +1 -0
- package/es/components.d.ts +1169 -76
- package/es/components.mjs +4 -1
- package/es/config-provider/src/internal-interface.d.ts +4 -0
- package/es/data-table/src/use-table-data.d.ts +1 -1
- package/es/date-picker/src/DatePicker.mjs +7 -4
- package/es/icon/index.d.ts +1 -1
- package/es/icon/index.mjs +1 -1
- package/es/icon/src/Icon.d.ts +1 -1
- package/es/icon/src/Icon.mjs +1 -1
- package/es/icon-pack/index.d.ts +5 -0
- package/es/icon-pack/index.mjs +3 -0
- package/es/icon-pack/src/IconPack.d.ts +1047 -0
- package/es/icon-pack/src/IconPack.mjs +300 -0
- package/es/icon-pack/src/interface.d.ts +465 -0
- package/es/icon-pack/src/interface.mjs +75 -0
- package/es/icon-pack/src/styles/index.cssr.d.ts +2 -0
- package/es/icon-pack/src/styles/index.cssr.mjs +131 -0
- package/es/icon-pack/styles/dark.d.ts +123 -0
- package/es/icon-pack/styles/dark.mjs +20 -0
- package/es/icon-pack/styles/index.d.ts +3 -0
- package/es/icon-pack/styles/index.mjs +2 -0
- package/es/icon-pack/styles/light.d.ts +143 -0
- package/es/icon-pack/styles/light.mjs +64 -0
- package/es/icon-wrapper/src/IconWrapper.d.ts +1 -1
- package/es/input/src/Input.mjs +3 -1
- package/es/pagination/index.d.ts +3 -3
- package/es/pagination/index.mjs +2 -1
- package/es/pagination/src/Pagination.d.ts +74 -1379
- package/es/pagination/src/Pagination.mjs +28 -63
- package/es/pagination/src/interface.d.ts +1345 -1
- package/es/pagination/src/interface.mjs +68 -1
- package/es/themes/dark.mjs +2 -0
- package/es/themes/light.mjs +2 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/_internal/icon/index.d.ts +1 -1
- package/lib/_internal/icon/index.js +2 -1
- package/lib/_internal/icon/src/UIcon.d.ts +11 -1
- package/lib/_internal/icon/src/UIcon.js +17 -6
- package/lib/_internal/icon/src/interface.d.ts +11 -4
- package/lib/_internal/icon/src/interface.js +1 -1
- package/lib/_internal/icon/src/render-icon.d.ts +1 -0
- package/lib/_internal/icon/src/render-icon.js +4 -0
- package/lib/_internal/icons/SearchOutline.d.ts +2 -0
- package/lib/_internal/icons/SearchOutline.js +10 -0
- package/lib/_internal/icons/index.d.ts +1 -0
- package/lib/_internal/icons/index.js +3 -1
- package/lib/_mixins/use-form-item.js +5 -0
- package/lib/_utils/dom/copy-to-clipboard.d.ts +1 -0
- package/lib/_utils/dom/copy-to-clipboard.js +11 -0
- package/lib/_utils/dom/index.d.ts +1 -0
- package/lib/_utils/dom/index.js +3 -1
- package/lib/components.d.ts +1169 -76
- package/lib/components.js +12 -5
- package/lib/config-provider/src/internal-interface.d.ts +4 -0
- package/lib/data-table/src/use-table-data.d.ts +1 -1
- package/lib/date-picker/src/DatePicker.js +5 -4
- package/lib/icon/index.d.ts +1 -1
- package/lib/icon/index.js +2 -1
- package/lib/icon/src/Icon.d.ts +1 -1
- package/lib/icon/src/Icon.js +2 -1
- package/lib/icon-pack/index.d.ts +5 -0
- package/lib/icon-pack/index.js +13 -0
- package/lib/icon-pack/src/IconPack.d.ts +1047 -0
- package/lib/icon-pack/src/IconPack.js +240 -0
- package/lib/icon-pack/src/interface.d.ts +465 -0
- package/lib/icon-pack/src/interface.js +49 -0
- package/lib/icon-pack/src/styles/index.cssr.d.ts +2 -0
- package/lib/icon-pack/src/styles/index.cssr.js +136 -0
- package/lib/icon-pack/styles/dark.d.ts +123 -0
- package/lib/icon-pack/styles/dark.js +22 -0
- package/lib/icon-pack/styles/index.d.ts +3 -0
- package/lib/icon-pack/styles/index.js +10 -0
- package/lib/icon-pack/styles/light.d.ts +143 -0
- package/lib/icon-pack/styles/light.js +46 -0
- package/lib/icon-wrapper/src/IconWrapper.d.ts +1 -1
- package/lib/input/src/Input.js +3 -1
- package/lib/pagination/index.d.ts +3 -3
- package/lib/pagination/index.js +2 -1
- package/lib/pagination/src/Pagination.d.ts +74 -1379
- package/lib/pagination/src/Pagination.js +27 -40
- package/lib/pagination/src/interface.d.ts +1345 -1
- package/lib/pagination/src/interface.js +37 -0
- package/lib/themes/dark.js +110 -108
- package/lib/themes/light.js +110 -108
- 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 +263 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as UBaseIcon } from './src/Icon';
|
|
2
2
|
export { iconProps } from './src/interface';
|
|
3
3
|
export type { Depth, GenericUIcon, IconNameOf, IconProps, RenderIconProps } from './src/interface';
|
|
4
|
-
export { renderIcon } from './src/render-icon';
|
|
4
|
+
export { renderAsyncIcon, renderIcon } from './src/render-icon';
|
|
5
5
|
export { UIcon } from './src/UIcon';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as UBaseIcon } from "./src/Icon.mjs";
|
|
2
2
|
export { iconProps } from "./src/interface.mjs";
|
|
3
|
-
export { renderIcon } from "./src/render-icon.mjs";
|
|
3
|
+
export { renderAsyncIcon, renderIcon } from "./src/render-icon.mjs";
|
|
4
4
|
export { UIcon } from "./src/UIcon.mjs";
|
|
@@ -7,6 +7,10 @@ declare const UIconImpl: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
7
7
|
readonly component: import("vue").PropType<import("vue").Component>;
|
|
8
8
|
readonly name: import("vue").PropType<string>;
|
|
9
9
|
readonly pack: import("vue").PropType<import("../../..").IconPackName>;
|
|
10
|
+
readonly async: {
|
|
11
|
+
readonly type: BooleanConstructor;
|
|
12
|
+
readonly default: undefined;
|
|
13
|
+
};
|
|
10
14
|
readonly onClick: import("vue").PropType<(e: MouseEvent) => void>;
|
|
11
15
|
readonly theme: import("vue").PropType<import("../../../_mixins").Theme<"Icon", {
|
|
12
16
|
color: string;
|
|
@@ -53,6 +57,10 @@ declare const UIconImpl: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
53
57
|
readonly component: import("vue").PropType<import("vue").Component>;
|
|
54
58
|
readonly name: import("vue").PropType<string>;
|
|
55
59
|
readonly pack: import("vue").PropType<import("../../..").IconPackName>;
|
|
60
|
+
readonly async: {
|
|
61
|
+
readonly type: BooleanConstructor;
|
|
62
|
+
readonly default: undefined;
|
|
63
|
+
};
|
|
56
64
|
readonly onClick: import("vue").PropType<(e: MouseEvent) => void>;
|
|
57
65
|
readonly theme: import("vue").PropType<import("../../../_mixins").Theme<"Icon", {
|
|
58
66
|
color: string;
|
|
@@ -78,6 +86,8 @@ declare const UIconImpl: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
78
86
|
opacity4Depth: string;
|
|
79
87
|
opacity5Depth: string;
|
|
80
88
|
}, any>>>;
|
|
81
|
-
}>> & Readonly<{}>, {
|
|
89
|
+
}>> & Readonly<{}>, {
|
|
90
|
+
readonly async: boolean;
|
|
91
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
82
92
|
export declare const UIcon: typeof UIconImpl & GenericUIcon;
|
|
83
93
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { computed, defineComponent, h } from 'vue';
|
|
2
2
|
import { useConfig, useTheme, useThemeClass } from "../../../_mixins/index.mjs";
|
|
3
|
-
import { formatLength, warn } from "../../../_utils/index.mjs";
|
|
3
|
+
import { formatLength, warn, warnOnce } from "../../../_utils/index.mjs";
|
|
4
4
|
import style from "../../../icon/src/styles/index.cssr.mjs";
|
|
5
5
|
import { iconLight } from "../../../icon/styles/index.mjs";
|
|
6
6
|
import UBaseIcon from "./Icon.mjs";
|
|
7
7
|
import { iconProps } from "./interface.mjs";
|
|
8
|
+
const FALLBACK_ICON = '�';
|
|
8
9
|
const UIconImpl = defineComponent({
|
|
9
10
|
_n_icon__: true,
|
|
10
11
|
name: 'Icon',
|
|
@@ -45,6 +46,7 @@ const UIconImpl = defineComponent({
|
|
|
45
46
|
});
|
|
46
47
|
const themeClassHandle = inlineThemeDisabled ? useThemeClass('icon', computed(() => `${props.depth || 'd'}`), cssVarsRef, props) : undefined;
|
|
47
48
|
const resolvedPackedIconRef = computed(() => {
|
|
49
|
+
var _a;
|
|
48
50
|
const {
|
|
49
51
|
name,
|
|
50
52
|
pack
|
|
@@ -61,14 +63,24 @@ const UIconImpl = defineComponent({
|
|
|
61
63
|
warn('icon', `icon pack "${targetName}" not found`);
|
|
62
64
|
return null;
|
|
63
65
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
try {
|
|
67
|
+
if ((_a = props.async) !== null && _a !== void 0 ? _a : config.async) {
|
|
68
|
+
if ('renderIcon' in target) {
|
|
69
|
+
warnOnce('icon', `pack "${target.name}" is a sync pack rendered in async mode — its icons are already bundled, so async loads them again at runtime. Register the async pack ("${target.name}Async") or drop \`async\`.`);
|
|
70
|
+
}
|
|
71
|
+
return target.renderAsyncIcon(name);
|
|
72
|
+
}
|
|
73
|
+
if (!('renderIcon' in target)) {
|
|
74
|
+
warn('icon', `pack "${target.name}" is async-only, set \`async: true\` on \`u-config-provider :icon-packs\``);
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return target.renderIcon(name);
|
|
78
|
+
} catch (err) {
|
|
79
|
+
warnOnce('icon', `icon "${name}" not found in pack "${target.name}", rendering fallback (${err.message})`);
|
|
80
|
+
return h('span', {
|
|
81
|
+
innerHTML: FALLBACK_ICON
|
|
82
|
+
});
|
|
66
83
|
}
|
|
67
|
-
if (!('renderIcon' in target)) {
|
|
68
|
-
warn('icon', `pack "${target.name}" is async-only, set \`async: true\` on \`u-config-provider :icon-packs\``);
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
return target.renderIcon(name);
|
|
72
84
|
});
|
|
73
85
|
return {
|
|
74
86
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
@@ -2,8 +2,6 @@ import type { IconPackBase, IconPackRegistry } from '@uzum-tech/icons';
|
|
|
2
2
|
import type { Component, PropType, VNodeChild } from 'vue';
|
|
3
3
|
import type { ExtractPublicPropTypes } from '../../../_utils';
|
|
4
4
|
import type { IconPackName } from '../../../config-provider/src/internal-interface';
|
|
5
|
-
export type Depth = 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5' | undefined;
|
|
6
|
-
export type IconNameOf<P extends IconPackName> = IconPackRegistry extends Record<P, infer Pack> ? Pack extends IconPackBase<infer Name> ? Name : string : string;
|
|
7
5
|
export declare const iconProps: {
|
|
8
6
|
readonly depth: PropType<Depth>;
|
|
9
7
|
readonly size: PropType<number | string>;
|
|
@@ -11,6 +9,10 @@ export declare const iconProps: {
|
|
|
11
9
|
readonly component: PropType<Component>;
|
|
12
10
|
readonly name: PropType<string>;
|
|
13
11
|
readonly pack: PropType<IconPackName>;
|
|
12
|
+
readonly async: {
|
|
13
|
+
readonly type: BooleanConstructor;
|
|
14
|
+
readonly default: undefined;
|
|
15
|
+
};
|
|
14
16
|
readonly onClick: PropType<(e: MouseEvent) => void>;
|
|
15
17
|
readonly theme: PropType<import("../../../_mixins").Theme<"Icon", {
|
|
16
18
|
color: string;
|
|
@@ -37,8 +39,14 @@ export declare const iconProps: {
|
|
|
37
39
|
opacity5Depth: string;
|
|
38
40
|
}, any>>>;
|
|
39
41
|
};
|
|
42
|
+
export interface IconNameResolver<P extends IconPackName> {
|
|
43
|
+
name: IconPackRegistry extends Record<P, IconPackBase<infer Name>> ? Name : string;
|
|
44
|
+
}
|
|
45
|
+
export type DepthBase = 1 | 2 | 3 | 4 | 5;
|
|
46
|
+
export type Depth = DepthBase | `${DepthBase}` | undefined;
|
|
47
|
+
export type IconNameOf<P extends IconPackName> = IconNameResolver<P>['name'];
|
|
40
48
|
export type IconProps = ExtractPublicPropTypes<typeof iconProps>;
|
|
41
|
-
type IconBaseProps = Omit<IconProps, 'name' | 'pack'>;
|
|
49
|
+
export type IconBaseProps = Omit<IconProps, 'name' | 'pack'>;
|
|
42
50
|
export type GenericUIcon = <P extends IconPackName = IconPackName>(props: IconBaseProps & {
|
|
43
51
|
pack?: P;
|
|
44
52
|
name?: IconNameOf<P>;
|
|
@@ -47,4 +55,3 @@ export type RenderIconProps<P extends IconPackName = IconPackName> = IconBasePro
|
|
|
47
55
|
pack?: P;
|
|
48
56
|
};
|
|
49
57
|
export type RenderIconChildren = VNodeChild | (() => VNodeChild);
|
|
50
|
-
export {};
|
|
@@ -2,3 +2,4 @@ import type { VNode } from 'vue';
|
|
|
2
2
|
import type { IconPackName } from '../../../config-provider/src/internal-interface';
|
|
3
3
|
import type { IconNameOf, RenderIconChildren, RenderIconProps } from './interface';
|
|
4
4
|
export declare function renderIcon<P extends IconPackName = IconPackName>(name: IconNameOf<P>, props?: RenderIconProps<P> | null, children?: RenderIconChildren): VNode;
|
|
5
|
+
export declare function renderAsyncIcon<P extends IconPackName = IconPackName>(name: IconNameOf<P>, props?: RenderIconProps<P> | null, children?: RenderIconChildren): VNode;
|
|
@@ -7,4 +7,9 @@ export function renderIcon(name, props, children) {
|
|
|
7
7
|
return h(UIcon, Object.assign(Object.assign({}, props), {
|
|
8
8
|
name
|
|
9
9
|
}), slots);
|
|
10
|
+
}
|
|
11
|
+
export function renderAsyncIcon(name, props, children) {
|
|
12
|
+
return renderIcon(name, Object.assign(Object.assign({}, props), {
|
|
13
|
+
async: true
|
|
14
|
+
}), children);
|
|
10
15
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineComponent, h } from 'vue';
|
|
2
|
+
export default defineComponent({
|
|
3
|
+
name: 'SearchOutline',
|
|
4
|
+
render() {
|
|
5
|
+
return h("svg", {
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
"aria-hidden": true
|
|
10
|
+
}, h("path", {
|
|
11
|
+
d: "M21 21l-4.35-4.35M19 11a8 8 0 1 1-16 0 8 8 0 0 1 16 0z",
|
|
12
|
+
stroke: "currentColor",
|
|
13
|
+
"stroke-width": "2",
|
|
14
|
+
"stroke-linecap": "round",
|
|
15
|
+
"stroke-linejoin": "round"
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -52,6 +52,7 @@ export { default as RotateClockwiseIcon } from './RotateClockwise';
|
|
|
52
52
|
export { default as RotateCounterclockwiseIcon } from './RotateCounterclockwise';
|
|
53
53
|
export { default as RussiaFlag } from './RussiaFlag';
|
|
54
54
|
export { default as SearchIcon } from './Search';
|
|
55
|
+
export { default as SearchOutlineIcon } from './SearchOutline';
|
|
55
56
|
export { default as SendFilled } from './SendFilled';
|
|
56
57
|
export { default as SiderUnionBorder } from './SiderUnionBorder';
|
|
57
58
|
export { default as SuccessIcon } from './Success';
|
|
@@ -52,6 +52,7 @@ export { default as RotateClockwiseIcon } from "./RotateClockwise.mjs";
|
|
|
52
52
|
export { default as RotateCounterclockwiseIcon } from "./RotateCounterclockwise.mjs";
|
|
53
53
|
export { default as RussiaFlag } from "./RussiaFlag.mjs";
|
|
54
54
|
export { default as SearchIcon } from "./Search.mjs";
|
|
55
|
+
export { default as SearchOutlineIcon } from "./SearchOutline.mjs";
|
|
55
56
|
export { default as SendFilled } from "./SendFilled.mjs";
|
|
56
57
|
export { default as SiderUnionBorder } from "./SiderUnionBorder.mjs";
|
|
57
58
|
export { default as SuccessIcon } from "./Success.mjs";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { computed, inject, onBeforeUnmount, provide } from 'vue';
|
|
2
2
|
import { createInjectionKey } from "../_utils/index.mjs";
|
|
3
|
+
import { formInjectionKey } from "../form/src/context.mjs";
|
|
3
4
|
export const formItemInjectionKey = createInjectionKey('u-form-item');
|
|
4
5
|
export default function useFormItem(props, {
|
|
5
6
|
defaultSize = 'medium',
|
|
@@ -7,6 +8,7 @@ export default function useFormItem(props, {
|
|
|
7
8
|
mergedDisabled
|
|
8
9
|
} = {}) {
|
|
9
10
|
const UFormItem = inject(formItemInjectionKey, null);
|
|
11
|
+
const UForm = inject(formInjectionKey, null);
|
|
10
12
|
provide(formItemInjectionKey, null);
|
|
11
13
|
const mergedSizeRef = computed(mergedSize ? () => mergedSize(UFormItem) : () => {
|
|
12
14
|
const {
|
|
@@ -33,6 +35,9 @@ export default function useFormItem(props, {
|
|
|
33
35
|
if (UFormItem) {
|
|
34
36
|
return UFormItem.disabled.value;
|
|
35
37
|
}
|
|
38
|
+
if (UForm) {
|
|
39
|
+
return UForm.props.disabled;
|
|
40
|
+
}
|
|
36
41
|
return false;
|
|
37
42
|
});
|
|
38
43
|
const mergedStatusRef = computed(() => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function copyToClipboard(text: string): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function copyToClipboard(text) {
|
|
2
|
+
var _a;
|
|
3
|
+
const clipboard = (_a = globalThis.navigator) === null || _a === void 0 ? void 0 : _a.clipboard;
|
|
4
|
+
if (!(clipboard === null || clipboard === void 0 ? void 0 : clipboard.writeText)) {
|
|
5
|
+
return Promise.reject(new Error('Clipboard API is unavailable'));
|
|
6
|
+
}
|
|
7
|
+
return clipboard.writeText(text);
|
|
8
|
+
}
|
package/es/_utils/dom/index.d.ts
CHANGED
package/es/_utils/dom/index.mjs
CHANGED