@uzum-tech/ui 2.0.0-beta.9 → 2.0.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.
Files changed (36) hide show
  1. package/dist/index.js +240 -197
  2. package/dist/index.mjs +240 -197
  3. package/dist/index.prod.js +2 -2
  4. package/dist/index.prod.mjs +2 -2
  5. package/es/_internal/icon/index.d.ts +2 -0
  6. package/es/_internal/icon/index.mjs +2 -1
  7. package/es/_internal/icon/src/UIcon.d.ts +126 -0
  8. package/es/_internal/icon/src/UIcon.mjs +131 -0
  9. package/es/_mixins/use-config.d.ts +2 -1
  10. package/es/_mixins/use-config.mjs +1 -0
  11. package/es/components.d.ts +113 -34
  12. package/es/config-provider/src/ConfigProvider.d.ts +4 -1
  13. package/es/config-provider/src/ConfigProvider.mjs +8 -0
  14. package/es/config-provider/src/interface.d.ts +1 -1
  15. package/es/config-provider/src/internal-interface.d.ts +8 -0
  16. package/es/icon/src/Icon.d.ts +2 -109
  17. package/es/icon/src/Icon.mjs +1 -93
  18. package/es/version.d.ts +1 -1
  19. package/es/version.mjs +1 -1
  20. package/lib/_internal/icon/index.d.ts +2 -0
  21. package/lib/_internal/icon/index.js +4 -1
  22. package/lib/_internal/icon/src/UIcon.d.ts +126 -0
  23. package/lib/_internal/icon/src/UIcon.js +108 -0
  24. package/lib/_mixins/use-config.d.ts +2 -1
  25. package/lib/_mixins/use-config.js +1 -0
  26. package/lib/components.d.ts +113 -34
  27. package/lib/config-provider/src/ConfigProvider.d.ts +4 -1
  28. package/lib/config-provider/src/ConfigProvider.js +8 -0
  29. package/lib/config-provider/src/interface.d.ts +1 -1
  30. package/lib/config-provider/src/internal-interface.d.ts +8 -0
  31. package/lib/icon/src/Icon.d.ts +2 -109
  32. package/lib/icon/src/Icon.js +3 -73
  33. package/lib/version.d.ts +1 -1
  34. package/lib/version.js +1 -1
  35. package/package.json +8 -1
  36. package/web-types.json +11 -1
@@ -1 +1,3 @@
1
1
  export { default as UBaseIcon } from './src/Icon';
2
+ export { iconProps, UIcon } from './src/UIcon';
3
+ export type { Depth, GenericUIcon, IconNameOf, IconProps } from './src/UIcon';
@@ -1 +1,2 @@
1
- export { default as UBaseIcon } from "./src/Icon.mjs";
1
+ export { default as UBaseIcon } from "./src/Icon.mjs";
2
+ export { iconProps, UIcon } from "./src/UIcon.mjs";
@@ -0,0 +1,126 @@
1
+ import type { IconPackBase, IconPackRegistry } from '@uzum-tech/icons';
2
+ import type { Component, PropType, VNodeChild } from 'vue';
3
+ import type { ExtractPublicPropTypes } from '../../../_utils';
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
+ export declare const iconProps: {
8
+ readonly depth: PropType<Depth>;
9
+ readonly size: PropType<number | string>;
10
+ readonly color: StringConstructor;
11
+ readonly component: PropType<Component>;
12
+ readonly name: PropType<string>;
13
+ readonly pack: PropType<IconPackName>;
14
+ readonly onClick: PropType<(e: MouseEvent) => void>;
15
+ readonly theme: PropType<import("../../../_mixins").Theme<"Icon", {
16
+ color: string;
17
+ opacity1Depth: string;
18
+ opacity2Depth: string;
19
+ opacity3Depth: string;
20
+ opacity4Depth: string;
21
+ opacity5Depth: string;
22
+ }, any>>;
23
+ readonly themeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Icon", {
24
+ color: string;
25
+ opacity1Depth: string;
26
+ opacity2Depth: string;
27
+ opacity3Depth: string;
28
+ opacity4Depth: string;
29
+ opacity5Depth: string;
30
+ }, any>>>;
31
+ readonly builtinThemeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Icon", {
32
+ color: string;
33
+ opacity1Depth: string;
34
+ opacity2Depth: string;
35
+ opacity3Depth: string;
36
+ opacity4Depth: string;
37
+ opacity5Depth: string;
38
+ }, any>>>;
39
+ };
40
+ export type IconProps = ExtractPublicPropTypes<typeof iconProps>;
41
+ declare const UIconImpl: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
42
+ readonly depth: PropType<Depth>;
43
+ readonly size: PropType<number | string>;
44
+ readonly color: StringConstructor;
45
+ readonly component: PropType<Component>;
46
+ readonly name: PropType<string>;
47
+ readonly pack: PropType<IconPackName>;
48
+ readonly onClick: PropType<(e: MouseEvent) => void>;
49
+ readonly theme: PropType<import("../../../_mixins").Theme<"Icon", {
50
+ color: string;
51
+ opacity1Depth: string;
52
+ opacity2Depth: string;
53
+ opacity3Depth: string;
54
+ opacity4Depth: string;
55
+ opacity5Depth: string;
56
+ }, any>>;
57
+ readonly themeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Icon", {
58
+ color: string;
59
+ opacity1Depth: string;
60
+ opacity2Depth: string;
61
+ opacity3Depth: string;
62
+ opacity4Depth: string;
63
+ opacity5Depth: string;
64
+ }, any>>>;
65
+ readonly builtinThemeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Icon", {
66
+ color: string;
67
+ opacity1Depth: string;
68
+ opacity2Depth: string;
69
+ opacity3Depth: string;
70
+ opacity4Depth: string;
71
+ opacity5Depth: string;
72
+ }, any>>>;
73
+ }>, {
74
+ mergedClsPrefix: import("vue").Ref<string, string>;
75
+ resolvedPackedIcon: import("vue").ComputedRef<VNodeChild>;
76
+ mergedStyle: import("vue").ComputedRef<{
77
+ fontSize: string | undefined;
78
+ color: string | undefined;
79
+ }>;
80
+ cssVars: import("vue").ComputedRef<{
81
+ '--u-bezier': string;
82
+ '--u-color': string;
83
+ '--u-opacity': string;
84
+ }> | undefined;
85
+ themeClass: import("vue").Ref<string, string> | undefined;
86
+ onRender: (() => void) | undefined;
87
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
88
+ readonly depth: PropType<Depth>;
89
+ readonly size: PropType<number | string>;
90
+ readonly color: StringConstructor;
91
+ readonly component: PropType<Component>;
92
+ readonly name: PropType<string>;
93
+ readonly pack: PropType<IconPackName>;
94
+ readonly onClick: PropType<(e: MouseEvent) => void>;
95
+ readonly theme: PropType<import("../../../_mixins").Theme<"Icon", {
96
+ color: string;
97
+ opacity1Depth: string;
98
+ opacity2Depth: string;
99
+ opacity3Depth: string;
100
+ opacity4Depth: string;
101
+ opacity5Depth: string;
102
+ }, any>>;
103
+ readonly themeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Icon", {
104
+ color: string;
105
+ opacity1Depth: string;
106
+ opacity2Depth: string;
107
+ opacity3Depth: string;
108
+ opacity4Depth: string;
109
+ opacity5Depth: string;
110
+ }, any>>>;
111
+ readonly builtinThemeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"Icon", {
112
+ color: string;
113
+ opacity1Depth: string;
114
+ opacity2Depth: string;
115
+ opacity3Depth: string;
116
+ opacity4Depth: string;
117
+ opacity5Depth: string;
118
+ }, any>>>;
119
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
120
+ type IconBaseProps = Omit<IconProps, 'name' | 'pack'>;
121
+ export type GenericUIcon = <P extends IconPackName = IconPackName>(props: IconBaseProps & {
122
+ pack?: P;
123
+ name?: IconNameOf<P>;
124
+ }) => any;
125
+ export declare const UIcon: typeof UIconImpl & GenericUIcon;
126
+ export {};
@@ -0,0 +1,131 @@
1
+ import { computed, defineComponent, h } from 'vue';
2
+ import { useConfig, useTheme, useThemeClass } from "../../../_mixins/index.mjs";
3
+ import { formatLength, warn } from "../../../_utils/index.mjs";
4
+ import style from "../../../icon/src/styles/index.cssr.mjs";
5
+ import { iconLight } from "../../../icon/styles/index.mjs";
6
+ import UBaseIcon from "./Icon.mjs";
7
+ export const iconProps = Object.assign(Object.assign({}, useTheme.props), {
8
+ depth: [String, Number],
9
+ size: [Number, String],
10
+ color: String,
11
+ component: Object,
12
+ name: String,
13
+ pack: String,
14
+ onClick: Function
15
+ });
16
+ const UIconImpl = defineComponent({
17
+ _n_icon__: true,
18
+ name: 'Icon',
19
+ props: iconProps,
20
+ setup(props) {
21
+ const {
22
+ mergedClsPrefixRef,
23
+ mergedIconPacksRef,
24
+ inlineThemeDisabled
25
+ } = useConfig(props);
26
+ const themeRef = useTheme('Icon', '-icon', style, iconLight, props, mergedClsPrefixRef);
27
+ const cssVarsRef = computed(() => {
28
+ const {
29
+ depth
30
+ } = props;
31
+ const {
32
+ common: {
33
+ cubicBezierEaseInOut
34
+ },
35
+ self
36
+ } = themeRef.value;
37
+ if (depth !== undefined) {
38
+ const {
39
+ color,
40
+ [`opacity${depth}Depth`]: opacity
41
+ } = self;
42
+ return {
43
+ '--u-bezier': cubicBezierEaseInOut,
44
+ '--u-color': color,
45
+ '--u-opacity': opacity
46
+ };
47
+ }
48
+ return {
49
+ '--u-bezier': cubicBezierEaseInOut,
50
+ '--u-color': '',
51
+ '--u-opacity': ''
52
+ };
53
+ });
54
+ const themeClassHandle = inlineThemeDisabled ? useThemeClass('icon', computed(() => `${props.depth || 'd'}`), cssVarsRef, props) : undefined;
55
+ const resolvedPackedIconRef = computed(() => {
56
+ const {
57
+ name,
58
+ pack
59
+ } = props;
60
+ if (!name) return null;
61
+ const config = mergedIconPacksRef === null || mergedIconPacksRef === void 0 ? void 0 : mergedIconPacksRef.value;
62
+ if (!config) {
63
+ warn('icon', 'no icon packs configured on `u-config-provider`');
64
+ return null;
65
+ }
66
+ const targetName = pack !== null && pack !== void 0 ? pack : config.defaultPackName;
67
+ const target = config.packs.find(p => p.name === targetName);
68
+ if (!target) {
69
+ warn('icon', `icon pack "${targetName}" not found`);
70
+ return null;
71
+ }
72
+ if (config.async) {
73
+ return target.renderAsyncIcon(name);
74
+ }
75
+ if (!('renderIcon' in target)) {
76
+ warn('icon', `pack "${target.name}" is async-only, set \`async: true\` on \`u-config-provider :icon-packs\``);
77
+ return null;
78
+ }
79
+ return target.renderIcon(name);
80
+ });
81
+ return {
82
+ mergedClsPrefix: mergedClsPrefixRef,
83
+ resolvedPackedIcon: resolvedPackedIconRef,
84
+ mergedStyle: computed(() => {
85
+ const {
86
+ size,
87
+ color
88
+ } = props;
89
+ return {
90
+ fontSize: formatLength(size),
91
+ color
92
+ };
93
+ }),
94
+ cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
95
+ themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
96
+ onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
97
+ };
98
+ },
99
+ render() {
100
+ var _a;
101
+ const {
102
+ $parent,
103
+ depth,
104
+ mergedClsPrefix,
105
+ component,
106
+ onRender,
107
+ themeClass,
108
+ resolvedPackedIcon
109
+ } = this;
110
+ if ((_a = $parent === null || $parent === void 0 ? void 0 : $parent.$options) === null || _a === void 0 ? void 0 : _a._n_icon__) {
111
+ warn('icon', 'don\'t wrap `u-icon` inside `u-icon`');
112
+ }
113
+ onRender === null || onRender === void 0 ? void 0 : onRender();
114
+ return h(UBaseIcon, {
115
+ clsPrefix: mergedClsPrefix,
116
+ role: 'img',
117
+ class: [`${mergedClsPrefix}-icon`, themeClass, {
118
+ [`${mergedClsPrefix}-icon--depth`]: depth,
119
+ [`${mergedClsPrefix}-icon--color-transition`]: depth !== undefined
120
+ }],
121
+ style: [this.cssVars, this.mergedStyle],
122
+ onClick: this.onClick
123
+ }, {
124
+ default: () => {
125
+ var _a, _b;
126
+ return resolvedPackedIcon !== null && resolvedPackedIcon !== void 0 ? resolvedPackedIcon : component ? h(component) : (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a);
127
+ }
128
+ });
129
+ }
130
+ });
131
+ export const UIcon = UIconImpl;
@@ -1,5 +1,5 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
- import type { Breakpoints, GlobalComponentConfig, RtlEnabledState } from '../config-provider/src/internal-interface';
2
+ import type { Breakpoints, GlobalComponentConfig, IconPacksConfig, RtlEnabledState } from '../config-provider/src/internal-interface';
3
3
  type UseConfigProps = Readonly<{
4
4
  bordered?: boolean;
5
5
  [key: string]: unknown;
@@ -14,6 +14,7 @@ export default function useConfig(props?: UseConfigProps, options?: {
14
14
  mergedClsPrefixRef: Ref<string>;
15
15
  mergedBreakpointsRef: Ref<Breakpoints> | undefined;
16
16
  mergedComponentPropsRef: Ref<GlobalComponentConfig | undefined> | undefined;
17
+ mergedIconPacksRef: Ref<IconPacksConfig | undefined> | undefined;
17
18
  namespaceRef: ComputedRef<string | undefined>;
18
19
  };
19
20
  export declare function useMergedClsPrefix(): Ref<string>;
@@ -10,6 +10,7 @@ export default function useConfig(props = {}, options = {
10
10
  inlineThemeDisabled: UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.inlineThemeDisabled,
11
11
  mergedRtlRef: UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedRtlRef,
12
12
  mergedComponentPropsRef: UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedComponentPropsRef,
13
+ mergedIconPacksRef: UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedIconPacksRef,
13
14
  mergedBreakpointsRef: UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedBreakpointsRef,
14
15
  mergedBorderedRef: computed(() => {
15
16
  var _a, _b;
@@ -34211,6 +34211,7 @@ export declare const UConfigProvider: import("vue").DefineComponent<import("vue"
34211
34211
  readonly themeOverrides: import("vue").PropType<import("./config-provider").GlobalThemeOverrides | null>;
34212
34212
  readonly componentOptions: import("vue").PropType<import("./config-provider").GlobalComponentConfig>;
34213
34213
  readonly icons: import("vue").PropType<import("./config-provider").GlobalIconConfig>;
34214
+ readonly iconPacks: import("vue").PropType<import("./config-provider").IconPacksConfig>;
34214
34215
  readonly breakpoints: import("vue").PropType<import("./config-provider/src/internal-interface").Breakpoints>;
34215
34216
  readonly breakpointProps: import("vue").PropType<import("./config-provider").BreakpointProps>;
34216
34217
  readonly breakpointThemeOverrides: import("vue").PropType<import("./config-provider").BreakpointThemeOverrides>;
@@ -34260,6 +34261,7 @@ export declare const UConfigProvider: import("vue").DefineComponent<import("vue"
34260
34261
  readonly themeOverrides: import("vue").PropType<import("./config-provider").GlobalThemeOverrides | null>;
34261
34262
  readonly componentOptions: import("vue").PropType<import("./config-provider").GlobalComponentConfig>;
34262
34263
  readonly icons: import("vue").PropType<import("./config-provider").GlobalIconConfig>;
34264
+ readonly iconPacks: import("vue").PropType<import("./config-provider").IconPacksConfig>;
34263
34265
  readonly breakpoints: import("vue").PropType<import("./config-provider/src/internal-interface").Breakpoints>;
34264
34266
  readonly breakpointProps: import("vue").PropType<import("./config-provider").BreakpointProps>;
34265
34267
  readonly breakpointThemeOverrides: import("vue").PropType<import("./config-provider").BreakpointThemeOverrides>;
@@ -65458,11 +65460,117 @@ export declare const UHighlight: import("vue").DefineComponent<import("vue").Ext
65458
65460
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
65459
65461
  export type * from './icon';
65460
65462
  export { iconProps } from './icon';
65461
- export declare const UIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
65462
- readonly depth: import("vue").PropType<import("./icon/src/Icon").Depth>;
65463
+ export declare const UIcon: {
65464
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
65465
+ readonly depth: import("vue").PropType<import("./_internal/icon").Depth>;
65466
+ readonly size: import("vue").PropType<number | string>;
65467
+ readonly color: StringConstructor;
65468
+ readonly component: import("vue").PropType<import("vue").Component>;
65469
+ readonly name: import("vue").PropType<string>;
65470
+ readonly pack: import("vue").PropType<import("./config-provider").IconPackName>;
65471
+ readonly onClick: import("vue").PropType<(e: MouseEvent) => void>;
65472
+ readonly theme: import("vue").PropType<import("./_mixins").Theme<"Icon", {
65473
+ color: string;
65474
+ opacity1Depth: string;
65475
+ opacity2Depth: string;
65476
+ opacity3Depth: string;
65477
+ opacity4Depth: string;
65478
+ opacity5Depth: string;
65479
+ }, any>>;
65480
+ readonly themeOverrides: import("vue").PropType<import("./_mixins/use-theme").ExtractThemeOverrides<import("./_mixins").Theme<"Icon", {
65481
+ color: string;
65482
+ opacity1Depth: string;
65483
+ opacity2Depth: string;
65484
+ opacity3Depth: string;
65485
+ opacity4Depth: string;
65486
+ opacity5Depth: string;
65487
+ }, any>>>;
65488
+ readonly builtinThemeOverrides: import("vue").PropType<import("./_mixins/use-theme").ExtractThemeOverrides<import("./_mixins").Theme<"Icon", {
65489
+ color: string;
65490
+ opacity1Depth: string;
65491
+ opacity2Depth: string;
65492
+ opacity3Depth: string;
65493
+ opacity4Depth: string;
65494
+ opacity5Depth: string;
65495
+ }, any>>>;
65496
+ }>> & Readonly<{}>, {
65497
+ mergedClsPrefix: import("vue").Ref<string, string>;
65498
+ resolvedPackedIcon: import("vue").ComputedRef<import("vue").VNodeChild>;
65499
+ mergedStyle: import("vue").ComputedRef<{
65500
+ fontSize: string | undefined;
65501
+ color: string | undefined;
65502
+ }>;
65503
+ cssVars: import("vue").ComputedRef<{
65504
+ '--u-bezier': string;
65505
+ '--u-color': string;
65506
+ '--u-opacity': string;
65507
+ }> | undefined;
65508
+ themeClass: import("vue").Ref<string, string> | undefined;
65509
+ onRender: (() => void) | undefined;
65510
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
65511
+ P: {};
65512
+ B: {};
65513
+ D: {};
65514
+ C: {};
65515
+ M: {};
65516
+ Defaults: {};
65517
+ }, Readonly<import("vue").ExtractPropTypes<{
65518
+ readonly depth: import("vue").PropType<import("./_internal/icon").Depth>;
65519
+ readonly size: import("vue").PropType<number | string>;
65520
+ readonly color: StringConstructor;
65521
+ readonly component: import("vue").PropType<import("vue").Component>;
65522
+ readonly name: import("vue").PropType<string>;
65523
+ readonly pack: import("vue").PropType<import("./config-provider").IconPackName>;
65524
+ readonly onClick: import("vue").PropType<(e: MouseEvent) => void>;
65525
+ readonly theme: import("vue").PropType<import("./_mixins").Theme<"Icon", {
65526
+ color: string;
65527
+ opacity1Depth: string;
65528
+ opacity2Depth: string;
65529
+ opacity3Depth: string;
65530
+ opacity4Depth: string;
65531
+ opacity5Depth: string;
65532
+ }, any>>;
65533
+ readonly themeOverrides: import("vue").PropType<import("./_mixins/use-theme").ExtractThemeOverrides<import("./_mixins").Theme<"Icon", {
65534
+ color: string;
65535
+ opacity1Depth: string;
65536
+ opacity2Depth: string;
65537
+ opacity3Depth: string;
65538
+ opacity4Depth: string;
65539
+ opacity5Depth: string;
65540
+ }, any>>>;
65541
+ readonly builtinThemeOverrides: import("vue").PropType<import("./_mixins/use-theme").ExtractThemeOverrides<import("./_mixins").Theme<"Icon", {
65542
+ color: string;
65543
+ opacity1Depth: string;
65544
+ opacity2Depth: string;
65545
+ opacity3Depth: string;
65546
+ opacity4Depth: string;
65547
+ opacity5Depth: string;
65548
+ }, any>>>;
65549
+ }>> & Readonly<{}>, {
65550
+ mergedClsPrefix: import("vue").Ref<string, string>;
65551
+ resolvedPackedIcon: import("vue").ComputedRef<import("vue").VNodeChild>;
65552
+ mergedStyle: import("vue").ComputedRef<{
65553
+ fontSize: string | undefined;
65554
+ color: string | undefined;
65555
+ }>;
65556
+ cssVars: import("vue").ComputedRef<{
65557
+ '--u-bezier': string;
65558
+ '--u-color': string;
65559
+ '--u-opacity': string;
65560
+ }> | undefined;
65561
+ themeClass: import("vue").Ref<string, string> | undefined;
65562
+ onRender: (() => void) | undefined;
65563
+ }, {}, {}, {}, {}>;
65564
+ __isFragment?: never;
65565
+ __isTeleport?: never;
65566
+ __isSuspense?: never;
65567
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
65568
+ readonly depth: import("vue").PropType<import("./_internal/icon").Depth>;
65463
65569
  readonly size: import("vue").PropType<number | string>;
65464
65570
  readonly color: StringConstructor;
65465
65571
  readonly component: import("vue").PropType<import("vue").Component>;
65572
+ readonly name: import("vue").PropType<string>;
65573
+ readonly pack: import("vue").PropType<import("./config-provider").IconPackName>;
65466
65574
  readonly onClick: import("vue").PropType<(e: MouseEvent) => void>;
65467
65575
  readonly theme: import("vue").PropType<import("./_mixins").Theme<"Icon", {
65468
65576
  color: string;
@@ -65488,8 +65596,9 @@ export declare const UIcon: import("vue").DefineComponent<import("vue").ExtractP
65488
65596
  opacity4Depth: string;
65489
65597
  opacity5Depth: string;
65490
65598
  }, any>>>;
65491
- }>, {
65599
+ }>> & Readonly<{}>, {
65492
65600
  mergedClsPrefix: import("vue").Ref<string, string>;
65601
+ resolvedPackedIcon: import("vue").ComputedRef<import("vue").VNodeChild>;
65493
65602
  mergedStyle: import("vue").ComputedRef<{
65494
65603
  fontSize: string | undefined;
65495
65604
  color: string | undefined;
@@ -65501,37 +65610,7 @@ export declare const UIcon: import("vue").DefineComponent<import("vue").ExtractP
65501
65610
  }> | undefined;
65502
65611
  themeClass: import("vue").Ref<string, string> | undefined;
65503
65612
  onRender: (() => void) | undefined;
65504
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
65505
- readonly depth: import("vue").PropType<import("./icon/src/Icon").Depth>;
65506
- readonly size: import("vue").PropType<number | string>;
65507
- readonly color: StringConstructor;
65508
- readonly component: import("vue").PropType<import("vue").Component>;
65509
- readonly onClick: import("vue").PropType<(e: MouseEvent) => void>;
65510
- readonly theme: import("vue").PropType<import("./_mixins").Theme<"Icon", {
65511
- color: string;
65512
- opacity1Depth: string;
65513
- opacity2Depth: string;
65514
- opacity3Depth: string;
65515
- opacity4Depth: string;
65516
- opacity5Depth: string;
65517
- }, any>>;
65518
- readonly themeOverrides: import("vue").PropType<import("./_mixins/use-theme").ExtractThemeOverrides<import("./_mixins").Theme<"Icon", {
65519
- color: string;
65520
- opacity1Depth: string;
65521
- opacity2Depth: string;
65522
- opacity3Depth: string;
65523
- opacity4Depth: string;
65524
- opacity5Depth: string;
65525
- }, any>>>;
65526
- readonly builtinThemeOverrides: import("vue").PropType<import("./_mixins/use-theme").ExtractThemeOverrides<import("./_mixins").Theme<"Icon", {
65527
- color: string;
65528
- opacity1Depth: string;
65529
- opacity2Depth: string;
65530
- opacity3Depth: string;
65531
- opacity4Depth: string;
65532
- opacity5Depth: string;
65533
- }, any>>>;
65534
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
65613
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("./_internal/icon").GenericUIcon;
65535
65614
  export type * from './icon-bar';
65536
65615
  export { iconBarItemProps, iconBarProps } from './icon-bar';
65537
65616
  export declare const UIconBar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -1,7 +1,7 @@
1
1
  import type { ExtractPropTypes, PropType } from 'vue';
2
2
  import type { Hljs } from '../../_mixins';
3
3
  import type { UDateLocale, ULocale } from '../../locales';
4
- import type { GlobalComponentConfig, GlobalIconConfig, GlobalTheme, GlobalThemeOverrides } from './interface';
4
+ import type { GlobalComponentConfig, GlobalIconConfig, GlobalTheme, GlobalThemeOverrides, IconPacksConfig } from './interface';
5
5
  import type { BreakpointMode, BreakpointProps, Breakpoints, BreakpointThemeOverrides, RtlProp } from './internal-interface';
6
6
  import type { Katex } from './katex';
7
7
  export declare const configProviderProps: {
@@ -28,6 +28,7 @@ export declare const configProviderProps: {
28
28
  readonly themeOverrides: PropType<GlobalThemeOverrides | null>;
29
29
  readonly componentOptions: PropType<GlobalComponentConfig>;
30
30
  readonly icons: PropType<GlobalIconConfig>;
31
+ readonly iconPacks: PropType<IconPacksConfig>;
31
32
  readonly breakpoints: PropType<Breakpoints>;
32
33
  readonly breakpointProps: PropType<BreakpointProps>;
33
34
  readonly breakpointThemeOverrides: PropType<BreakpointThemeOverrides>;
@@ -73,6 +74,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
73
74
  readonly themeOverrides: PropType<GlobalThemeOverrides | null>;
74
75
  readonly componentOptions: PropType<GlobalComponentConfig>;
75
76
  readonly icons: PropType<GlobalIconConfig>;
77
+ readonly iconPacks: PropType<IconPacksConfig>;
76
78
  readonly breakpoints: PropType<Breakpoints>;
77
79
  readonly breakpointProps: PropType<BreakpointProps>;
78
80
  readonly breakpointThemeOverrides: PropType<BreakpointThemeOverrides>;
@@ -122,6 +124,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
122
124
  readonly themeOverrides: PropType<GlobalThemeOverrides | null>;
123
125
  readonly componentOptions: PropType<GlobalComponentConfig>;
124
126
  readonly icons: PropType<GlobalIconConfig>;
127
+ readonly iconPacks: PropType<IconPacksConfig>;
125
128
  readonly breakpoints: PropType<Breakpoints>;
126
129
  readonly breakpointProps: PropType<BreakpointProps>;
127
130
  readonly breakpointThemeOverrides: PropType<BreakpointThemeOverrides>;
@@ -29,6 +29,7 @@ export const configProviderProps = {
29
29
  themeOverrides: Object,
30
30
  componentOptions: Object,
31
31
  icons: Object,
32
+ iconPacks: Object,
32
33
  breakpoints: Object,
33
34
  breakpointProps: Object,
34
35
  breakpointThemeOverrides: Object,
@@ -172,6 +173,12 @@ export default defineComponent({
172
173
  } = props;
173
174
  return icons === undefined ? UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedIconsRef.value : icons;
174
175
  });
176
+ const mergedIconPacksRef = computed(() => {
177
+ const {
178
+ iconPacks
179
+ } = props;
180
+ return iconPacks === undefined ? UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedIconPacksRef.value : iconPacks;
181
+ });
175
182
  const updateWindowWidth = () => {
176
183
  if (isBrowser) {
177
184
  windowWidthRef.value = window.innerWidth;
@@ -281,6 +288,7 @@ export default defineComponent({
281
288
  mergedSsrBreakpointWidthRef,
282
289
  mergedRtlRef,
283
290
  mergedIconsRef,
291
+ mergedIconPacksRef,
284
292
  mergedComponentPropsRef,
285
293
  mergedBreakpointPropsRef,
286
294
  mergedBreakpointThemeOverridesRef,
@@ -13,4 +13,4 @@ export type GlobalThemeOverrides = {
13
13
  } & {
14
14
  [key in keyof GlobalThemeWithoutCommon]?: ExtractThemeOverrides<GlobalThemeWithoutCommon[key]>;
15
15
  };
16
- export type { BreakpointMode, BreakpointProps, BreakpointThemeOverrides, GlobalComponentConfig, GlobalIconConfig } from './internal-interface';
16
+ export type { BreakpointMode, BreakpointProps, BreakpointThemeOverrides, GlobalComponentConfig, GlobalIconConfig, IconPackName, IconPacksConfig } from './internal-interface';
@@ -1,3 +1,4 @@
1
+ import type { AnyIconPack, IconPackRegistry } from '@uzum-tech/icons';
1
2
  import type { CNode } from 'css-render';
2
3
  import type { Ref, VNodeChild } from 'vue';
3
4
  import type { AccountOptionTheme } from '../../_internal/account-option/styles';
@@ -406,6 +407,12 @@ export interface GlobalComponentConfig {
406
407
  Header?: HeaderProps;
407
408
  InputOtp?: InputOtpProps;
408
409
  }
410
+ export type IconPackName = keyof IconPackRegistry extends never ? string : keyof IconPackRegistry & string;
411
+ export interface IconPacksConfig {
412
+ packs: AnyIconPack[];
413
+ defaultPackName: IconPackName;
414
+ async?: boolean;
415
+ }
409
416
  export interface GlobalIconConfig {
410
417
  attach?: () => VNodeChild;
411
418
  cancel?: () => VNodeChild;
@@ -461,6 +468,7 @@ export interface ConfigProviderInjection {
461
468
  mergedKatexRef: Ref<Katex | undefined>;
462
469
  mergedComponentPropsRef: Ref<GlobalComponentConfig | undefined>;
463
470
  mergedIconsRef: Ref<GlobalIconConfig | undefined>;
471
+ mergedIconPacksRef: Ref<IconPacksConfig | undefined>;
464
472
  mergedThemeRef: Ref<GlobalTheme | undefined>;
465
473
  mergedThemeOverridesRef: Ref<GlobalThemeOverrides | undefined>;
466
474
  mergedRtlRef: Ref<RtlEnabledState | undefined>;