nuance-ui 0.1.9 → 0.1.10

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 (32) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/action-icon/action-icon-section.d.vue.ts +2 -2
  3. package/dist/runtime/components/action-icon/action-icon-section.vue.d.ts +2 -2
  4. package/dist/runtime/components/action-icon/action-icon.d.vue.ts +2 -2
  5. package/dist/runtime/components/action-icon/action-icon.vue.d.ts +2 -2
  6. package/dist/runtime/components/alert.vue +1 -1
  7. package/dist/runtime/components/avatar/_lib/context.d.ts +6 -0
  8. package/dist/runtime/components/avatar/_lib/context.js +4 -0
  9. package/dist/runtime/components/avatar/_lib/get-initials-color.d.ts +2 -0
  10. package/dist/runtime/components/avatar/_lib/get-initials-color.js +27 -0
  11. package/dist/runtime/components/avatar/_lib/get-initials.d.ts +1 -0
  12. package/dist/runtime/components/avatar/_lib/get-initials.js +6 -0
  13. package/dist/runtime/components/avatar/avatar-group.d.vue.ts +19 -0
  14. package/dist/runtime/components/avatar/avatar-group.vue +22 -0
  15. package/dist/runtime/components/avatar/avatar-group.vue.d.ts +19 -0
  16. package/dist/runtime/components/avatar/avatar.d.vue.ts +36 -0
  17. package/dist/runtime/components/avatar/avatar.module.css +1 -0
  18. package/dist/runtime/components/avatar/avatar.vue +71 -0
  19. package/dist/runtime/components/avatar/avatar.vue.d.ts +36 -0
  20. package/dist/runtime/components/avatar/index.d.ts +1 -0
  21. package/dist/runtime/components/avatar/index.js +0 -0
  22. package/dist/runtime/components/button/button.d.vue.ts +2 -2
  23. package/dist/runtime/components/button/button.vue.d.ts +2 -2
  24. package/dist/runtime/components/index.d.ts +1 -0
  25. package/dist/runtime/components/index.js +1 -0
  26. package/dist/runtime/components/text.d.vue.ts +2 -2
  27. package/dist/runtime/components/text.vue.d.ts +2 -2
  28. package/dist/runtime/const/index.d.ts +2 -2
  29. package/dist/runtime/types/theme.d.ts +1 -1
  30. package/dist/runtime/utils/color-functions/get-gradient.d.ts +3 -3
  31. package/dist/runtime/utils/vars-resolver/create-variant-color-resolver.d.ts +2 -2
  32. package/package.json +1 -1
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^4.0.0"
6
6
  },
7
- "version": "0.1.9",
7
+ "version": "0.1.10",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -1,9 +1,9 @@
1
- import type { NuanceColor, NuanceRadius, NuanceSize, UiKitGradient } from '@nui/types';
1
+ import type { NuanceColor, NuanceGradient, NuanceRadius, NuanceSize } from '@nui/types';
2
2
  import type { BoxProps } from '../box.vue.js';
3
3
  export interface ActionIconSectionProps extends BoxProps {
4
4
  size?: NuanceSize | `compact-${NuanceSize}`;
5
5
  variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient';
6
- gradient?: UiKitGradient;
6
+ gradient?: NuanceGradient;
7
7
  loading?: boolean;
8
8
  color?: NuanceColor;
9
9
  radius?: NuanceRadius;
@@ -1,9 +1,9 @@
1
- import type { NuanceColor, NuanceRadius, NuanceSize, UiKitGradient } from '@nui/types';
1
+ import type { NuanceColor, NuanceGradient, NuanceRadius, NuanceSize } from '@nui/types';
2
2
  import type { BoxProps } from '../box.vue.js';
3
3
  export interface ActionIconSectionProps extends BoxProps {
4
4
  size?: NuanceSize | `compact-${NuanceSize}`;
5
5
  variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient';
6
- gradient?: UiKitGradient;
6
+ gradient?: NuanceGradient;
7
7
  loading?: boolean;
8
8
  color?: NuanceColor;
9
9
  radius?: NuanceRadius;
@@ -1,9 +1,9 @@
1
- import type { NuanceColor, NuanceRadius, NuanceSize, UiKitGradient } from '@nui/types';
1
+ import type { NuanceColor, NuanceGradient, NuanceRadius, NuanceSize } from '@nui/types';
2
2
  import type { BoxProps } from '../box.vue.js';
3
3
  export interface ActionIconProps {
4
4
  size?: NuanceSize | `compact-${NuanceSize}` | string;
5
5
  variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient';
6
- gradient?: UiKitGradient;
6
+ gradient?: NuanceGradient;
7
7
  loading?: boolean;
8
8
  color?: NuanceColor;
9
9
  radius?: NuanceRadius;
@@ -1,9 +1,9 @@
1
- import type { NuanceColor, NuanceRadius, NuanceSize, UiKitGradient } from '@nui/types';
1
+ import type { NuanceColor, NuanceGradient, NuanceRadius, NuanceSize } from '@nui/types';
2
2
  import type { BoxProps } from '../box.vue.js';
3
3
  export interface ActionIconProps {
4
4
  size?: NuanceSize | `compact-${NuanceSize}` | string;
5
5
  variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient';
6
- gradient?: UiKitGradient;
6
+ gradient?: NuanceGradient;
7
7
  loading?: boolean;
8
8
  color?: NuanceColor;
9
9
  radius?: NuanceRadius;
@@ -1,8 +1,8 @@
1
1
  <script setup>
2
- import ActionIcon from "@nui/components/action-icon/action-icon.vue";
3
2
  import { useStyleResolver } from "@nui/composals";
4
3
  import { createVariantColorResolver, getRadius } from "@nui/utils";
5
4
  import { computed, useId } from "vue";
5
+ import ActionIcon from "./action-icon/action-icon.vue";
6
6
  import Box from "./box.vue";
7
7
  const {
8
8
  mod,
@@ -0,0 +1,6 @@
1
+ export declare const useProvideAvatarGroup: () => {
2
+ withinGroup: boolean;
3
+ };
4
+ export declare const useAvatarGroupState: () => {
5
+ withinGroup: boolean;
6
+ } | undefined;
@@ -0,0 +1,4 @@
1
+ import { createInjectionState } from "@vueuse/core";
2
+ const [useProvide, useState] = createInjectionState(() => ({ withinGroup: true }));
3
+ export const useProvideAvatarGroup = useProvide;
4
+ export const useAvatarGroupState = useState;
@@ -0,0 +1,2 @@
1
+ import type { NuanceColor } from '@nui/types';
2
+ export declare function getInitialsColor(name: string, colors?: NuanceColor[]): NuanceColor | undefined;
@@ -0,0 +1,27 @@
1
+ function hashCode(input) {
2
+ let hash = 0;
3
+ for (let i = 0; i < input.length; i += 1) {
4
+ const char = input.charCodeAt(i);
5
+ hash = (hash << 5) - hash + char;
6
+ hash |= 0;
7
+ }
8
+ return hash;
9
+ }
10
+ const defaultColors = [
11
+ "blue",
12
+ "cyan",
13
+ "grape",
14
+ "green",
15
+ "indigo",
16
+ "lime",
17
+ "orange",
18
+ "pink",
19
+ "red",
20
+ "teal",
21
+ "violet"
22
+ ];
23
+ export function getInitialsColor(name, colors = defaultColors) {
24
+ const hash = hashCode(name);
25
+ const index = Math.abs(hash) % colors.length;
26
+ return colors[index];
27
+ }
@@ -0,0 +1 @@
1
+ export declare function getInitials(name: string, limit?: number): string;
@@ -0,0 +1,6 @@
1
+ export function getInitials(name, limit = 2) {
2
+ const split = name.split(" ");
3
+ if (split.length === 1)
4
+ return name.slice(0, limit).toUpperCase();
5
+ return split.map((word) => word[0]).slice(0, limit).join("").toUpperCase();
6
+ }
@@ -0,0 +1,19 @@
1
+ import type { BoxProps } from '@nui/components';
2
+ import type { NuanceSpacing } from '@nui/types';
3
+ export interface AvatarGroupProps extends BoxProps {
4
+ /** Negative space between Avatar components @default `'sm'` */
5
+ spacing?: NuanceSpacing | string;
6
+ }
7
+ declare var __VLS_6: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_6) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<AvatarGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,22 @@
1
+ <script setup>
2
+ import { getSpacing } from "@nui/utils";
3
+ import { computed } from "vue";
4
+ import Box from "../box.vue";
5
+ import { useProvideAvatarGroup } from "./_lib/context";
6
+ import css from "./avatar.module.css";
7
+ const { mod, is, spacing } = defineProps({
8
+ spacing: { type: [String, Number], required: false },
9
+ is: { type: null, required: false },
10
+ mod: { type: [Object, Array, null], required: false }
11
+ });
12
+ const style = computed(() => ({
13
+ "--ag-spacing": getSpacing(spacing)
14
+ }));
15
+ useProvideAvatarGroup();
16
+ </script>
17
+
18
+ <template>
19
+ <Box :is :style :mod :class='css.group'>
20
+ <slot />
21
+ </Box>
22
+ </template>
@@ -0,0 +1,19 @@
1
+ import type { BoxProps } from '@nui/components';
2
+ import type { NuanceSpacing } from '@nui/types';
3
+ export interface AvatarGroupProps extends BoxProps {
4
+ /** Negative space between Avatar components @default `'sm'` */
5
+ spacing?: NuanceSpacing | string;
6
+ }
7
+ declare var __VLS_6: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_6) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<AvatarGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,36 @@
1
+ import type { BoxProps } from '@nui/components';
2
+ import type { NuanceColor, NuanceGradient, NuanceRadius, NuanceSize } from '@nui/types';
3
+ export interface AvatarProps extends BoxProps {
4
+ /** Width and height of the avatar, numbers are converted to rem @default `'md'` */
5
+ size?: NuanceSize | string;
6
+ /** Key of `theme.radius` or any valid CSS value to set border-radius @default `'1000px'` */
7
+ radius?: NuanceRadius;
8
+ /** Key of `theme.colors` or any valid CSS color @default `'gray'` */
9
+ color?: NuanceColor | 'initials';
10
+ /** Gradient configuration for `variant="gradient"` @default `theme.defaultGradient` */
11
+ gradient?: NuanceGradient;
12
+ /** Image url, if the image cannot be loaded or `src={null}`, then placeholder is displayed instead */
13
+ src?: string | null;
14
+ /** Image `alt` attribute, also used as `title` attribute for placeholder */
15
+ alt?: string;
16
+ /** Name of the user. When `src` is not set, used to display initials and to generate color when `color="initials"` is set. */
17
+ name?: string;
18
+ /** A list of colors that is used for autogenerated initials. By default, all default colors can be used except gray and dark. */
19
+ allowedInitialsColors?: NuanceColor[];
20
+ /** Placeholder icon */
21
+ placeholder?: string;
22
+ variant?: 'filled' | 'light' | 'gradient' | 'outline' | 'default';
23
+ }
24
+ declare var __VLS_6: {};
25
+ type __VLS_Slots = {} & {
26
+ default?: (props: typeof __VLS_6) => any;
27
+ };
28
+ declare const __VLS_base: import("vue").DefineComponent<AvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
29
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -0,0 +1 @@
1
+ .group{--ag-spacing:var(--spacing-sm);--ag-offset:calc(var(--ag-spacing)*-1);display:flex;padding-inline-start:var(--ag-spacing)}.root{--avatar-size-xs:rem(16px);--avatar-size-sm:rem(26px);--avatar-size-md:rem(38px);--avatar-size-lg:rem(56px);--avatar-size-xl:rem(84px);--avatar-size:var(--avatar-size-md);--avatar-radius:1000px;--avatar-bg:var(--color-gray-light);--avatar-bd:1px solid transparent;--avatar-color:var(--color-gray-light-color);--avatar-placeholder-fz:calc(var(--avatar-size)/2.5);-webkit-tap-highlight-color:transparent;border-radius:var(--avatar-radius);display:block;height:var(--avatar-size);min-width:var(--avatar-size);overflow:hidden;padding:0;position:relative;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--avatar-size)}.root:where([data-within-group]){background:var(--color-body);border:2px solid var(--color-body);margin-inline-start:var(--ag-offset)}.image{display:block;-o-object-fit:cover;object-fit:cover}.image,.placeholder{height:100%;width:100%}.placeholder{align-items:center;background:var(--avatar-bg);border:var(--avatar-bd);border-radius:var(--avatar-radius);color:var(--avatar-color);display:flex;font-size:var(--avatar-placeholder-fz);font-weight:700;justify-content:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.placeholder>[data-avatar-placeholder-icon]{height:70%;width:70%}
@@ -0,0 +1,71 @@
1
+ <script setup>
2
+ import { getInitialsColor } from "@nui/components/avatar/_lib/get-initials-color";
3
+ import { useStyleResolver } from "@nui/composals";
4
+ import { createVariantColorResolver, getRadius, getSize } from "@nui/utils";
5
+ import { computed } from "vue";
6
+ import Box from "../box.vue";
7
+ import { useAvatarGroupState } from "./_lib/context";
8
+ import { getInitials } from "./_lib/get-initials";
9
+ import css from "./avatar.module.css";
10
+ const {
11
+ alt,
12
+ src,
13
+ mod,
14
+ name,
15
+ color,
16
+ allowedInitialsColors,
17
+ gradient,
18
+ variant,
19
+ size,
20
+ radius,
21
+ placeholder = "gravity-ui:person"
22
+ } = defineProps({
23
+ size: { type: String, required: false },
24
+ radius: { type: [String, Number], required: false },
25
+ color: { type: null, required: false },
26
+ gradient: { type: Object, required: false },
27
+ src: { type: [String, null], required: false },
28
+ alt: { type: String, required: false },
29
+ name: { type: String, required: false },
30
+ allowedInitialsColors: { type: Array, required: false },
31
+ placeholder: { type: String, required: false },
32
+ variant: { type: String, required: false },
33
+ is: { type: null, required: false },
34
+ mod: { type: [Object, Array, null], required: false }
35
+ });
36
+ const initials = computed(() => name && getInitials(name));
37
+ const ctx = useAvatarGroupState();
38
+ const style = computed(() => useStyleResolver((theme) => {
39
+ const _color = color === "initials" && typeof name === "string" ? getInitialsColor(name, allowedInitialsColors) : color;
40
+ const { background, text, border } = createVariantColorResolver({
41
+ color: _color || "gray",
42
+ theme,
43
+ gradient,
44
+ variant: variant || "light"
45
+ });
46
+ return {
47
+ "--avatar-size": getSize(size, "avatar-size"),
48
+ "--avatar-radius": radius === void 0 ? void 0 : getRadius(radius),
49
+ "--avatar-bg": _color || variant ? background : void 0,
50
+ "--avatar-color": _color || variant ? text : void 0,
51
+ "--avatar-bd": _color || variant ? border : void 0
52
+ };
53
+ }));
54
+ </script>
55
+
56
+ <template>
57
+ <Box :style :class='css.root' :mod='[{ "within-group": ctx?.withinGroup }, mod]'>
58
+ <span v-if='!src' :class='css.placeholder' :title='alt'>
59
+ <slot>
60
+ <Icon v-if='!src && !name' :name='placeholder' />
61
+ {{ initials }}
62
+ </slot>
63
+ </span>
64
+ <NuxtImg
65
+ v-else
66
+ :src
67
+ :alt
68
+ :class='css.image'
69
+ />
70
+ </Box>
71
+ </template>
@@ -0,0 +1,36 @@
1
+ import type { BoxProps } from '@nui/components';
2
+ import type { NuanceColor, NuanceGradient, NuanceRadius, NuanceSize } from '@nui/types';
3
+ export interface AvatarProps extends BoxProps {
4
+ /** Width and height of the avatar, numbers are converted to rem @default `'md'` */
5
+ size?: NuanceSize | string;
6
+ /** Key of `theme.radius` or any valid CSS value to set border-radius @default `'1000px'` */
7
+ radius?: NuanceRadius;
8
+ /** Key of `theme.colors` or any valid CSS color @default `'gray'` */
9
+ color?: NuanceColor | 'initials';
10
+ /** Gradient configuration for `variant="gradient"` @default `theme.defaultGradient` */
11
+ gradient?: NuanceGradient;
12
+ /** Image url, if the image cannot be loaded or `src={null}`, then placeholder is displayed instead */
13
+ src?: string | null;
14
+ /** Image `alt` attribute, also used as `title` attribute for placeholder */
15
+ alt?: string;
16
+ /** Name of the user. When `src` is not set, used to display initials and to generate color when `color="initials"` is set. */
17
+ name?: string;
18
+ /** A list of colors that is used for autogenerated initials. By default, all default colors can be used except gray and dark. */
19
+ allowedInitialsColors?: NuanceColor[];
20
+ /** Placeholder icon */
21
+ placeholder?: string;
22
+ variant?: 'filled' | 'light' | 'gradient' | 'outline' | 'default';
23
+ }
24
+ declare var __VLS_6: {};
25
+ type __VLS_Slots = {} & {
26
+ default?: (props: typeof __VLS_6) => any;
27
+ };
28
+ declare const __VLS_base: import("vue").DefineComponent<AvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
29
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -0,0 +1 @@
1
+ export type * from './avatar.vue';
File without changes
@@ -1,10 +1,10 @@
1
- import type { NuanceColor, NuanceRadius, NuanceSize, UiKitGradient } from '@nui/types';
1
+ import type { NuanceColor, NuanceGradient, NuanceRadius, NuanceSize } from '@nui/types';
2
2
  import type { HTMLAttributes } from 'vue';
3
3
  import type { BoxProps } from '../box.vue.js';
4
4
  export interface ButtonProps extends BoxProps {
5
5
  size?: NuanceSize | `compact-${NuanceSize}`;
6
6
  variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient' | 'gradient-outline';
7
- gradient?: UiKitGradient;
7
+ gradient?: NuanceGradient;
8
8
  loading?: boolean;
9
9
  color?: NuanceColor;
10
10
  radius?: NuanceRadius;
@@ -1,10 +1,10 @@
1
- import type { NuanceColor, NuanceRadius, NuanceSize, UiKitGradient } from '@nui/types';
1
+ import type { NuanceColor, NuanceGradient, NuanceRadius, NuanceSize } from '@nui/types';
2
2
  import type { HTMLAttributes } from 'vue';
3
3
  import type { BoxProps } from '../box.vue.js';
4
4
  export interface ButtonProps extends BoxProps {
5
5
  size?: NuanceSize | `compact-${NuanceSize}`;
6
6
  variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient' | 'gradient-outline';
7
- gradient?: UiKitGradient;
7
+ gradient?: NuanceGradient;
8
8
  loading?: boolean;
9
9
  color?: NuanceColor;
10
10
  radius?: NuanceRadius;
@@ -1,5 +1,6 @@
1
1
  export * from './action-icon/index.js';
2
2
  export * from './app-shell/index.js';
3
+ export * from './avatar/index.js';
3
4
  export * from './background-image.vue.js';
4
5
  export * from './box.vue.js';
5
6
  export * from './button/index.js';
@@ -1,5 +1,6 @@
1
1
  export * from "./action-icon/index.js";
2
2
  export * from "./app-shell/index.js";
3
+ export * from "./avatar/index.js";
3
4
  export * from "./background-image.vue";
4
5
  export * from "./box.vue";
5
6
  export * from "./button/index.js";
@@ -1,4 +1,4 @@
1
- import type { NuanceColor, NuanceSize, UiKitGradient } from '@nui/types';
1
+ import type { NuanceColor, NuanceGradient, NuanceSize } from '@nui/types';
2
2
  import type { CSSProperties } from 'vue';
3
3
  import type { BoxProps } from './box.vue.js';
4
4
  type TitleOrder = 1 | 2 | 3 | 4 | 5 | 6;
@@ -15,7 +15,7 @@ export interface TextProps extends BoxProps {
15
15
  /** Determines whether font properties should be inherited from the parent, `false` by default */
16
16
  inherit?: boolean;
17
17
  /** Gradient configuration, ignored when `variant` is not `gradient`, `theme.defaultGradient` by default */
18
- gradient?: UiKitGradient;
18
+ gradient?: NuanceGradient;
19
19
  variant?: 'text' | 'gradient';
20
20
  fz?: NuanceSize | `h${TitleOrder}` | string;
21
21
  lh?: NuanceSize | string;
@@ -1,4 +1,4 @@
1
- import type { NuanceColor, NuanceSize, UiKitGradient } from '@nui/types';
1
+ import type { NuanceColor, NuanceGradient, NuanceSize } from '@nui/types';
2
2
  import type { CSSProperties } from 'vue';
3
3
  import type { BoxProps } from './box.vue.js';
4
4
  type TitleOrder = 1 | 2 | 3 | 4 | 5 | 6;
@@ -15,7 +15,7 @@ export interface TextProps extends BoxProps {
15
15
  /** Determines whether font properties should be inherited from the parent, `false` by default */
16
16
  inherit?: boolean;
17
17
  /** Gradient configuration, ignored when `variant` is not `gradient`, `theme.defaultGradient` by default */
18
- gradient?: UiKitGradient;
18
+ gradient?: NuanceGradient;
19
19
  variant?: 'text' | 'gradient';
20
20
  fz?: NuanceSize | `h${TitleOrder}` | string;
21
21
  lh?: NuanceSize | string;
@@ -1,2 +1,2 @@
1
- import type { UiKitGradient } from '@nui/types';
2
- export declare const DEFAULT_GRADIENT: UiKitGradient;
1
+ import type { NuanceGradient } from '@nui/types';
2
+ export declare const DEFAULT_GRADIENT: NuanceGradient;
@@ -16,7 +16,7 @@ type ShadedColor = `dark.${NuanceColorShade}` | `slate.${NuanceColorShade}` | `g
16
16
  export type NuanceDefaultThemeColor = 'dark' | 'slate' | 'gray' | 'red' | 'pink' | 'grape' | 'violet' | 'indigo' | 'blue' | 'cyan' | 'green' | 'lime' | 'yellow' | 'orange' | 'teal' | 'black' | 'white';
17
17
  export type NuanceColor = NuanceDefaultThemeColor | ShadedColor;
18
18
  export type NuanceTheme = 'light' | 'dark';
19
- export interface UiKitGradient {
19
+ export interface NuanceGradient {
20
20
  bg?: NuanceColor | string;
21
21
  from: NuanceColor | string;
22
22
  to: NuanceColor | string;
@@ -1,3 +1,3 @@
1
- import type { NuanceTheme, UiKitGradient } from '@nui/types';
2
- export declare function getGradient(gradient: UiKitGradient | undefined, theme: NuanceTheme): string;
3
- export declare function getGradientOutline(gradient: UiKitGradient | undefined, theme: NuanceTheme): string;
1
+ import type { NuanceGradient, NuanceTheme } from '@nui/types';
2
+ export declare function getGradient(gradient: NuanceGradient | undefined, theme: NuanceTheme): string;
3
+ export declare function getGradientOutline(gradient: NuanceGradient | undefined, theme: NuanceTheme): string;
@@ -1,4 +1,4 @@
1
- import type { NuanceColor, NuanceTheme, UiKitGradient } from '@nui/types';
1
+ import type { NuanceColor, NuanceGradient, NuanceTheme } from '@nui/types';
2
2
  interface VariantColorResolverResult {
3
3
  background: string;
4
4
  hover: string;
@@ -8,7 +8,7 @@ interface VariantColorResolverResult {
8
8
  export declare function createVariantColorResolver({ color, variant, gradient, theme, }: {
9
9
  color: NuanceColor | string | undefined;
10
10
  variant: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient' | 'gradient-outline';
11
- gradient?: UiKitGradient;
11
+ gradient?: NuanceGradient;
12
12
  theme: NuanceTheme;
13
13
  }): VariantColorResolverResult;
14
14
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuance-ui",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "A UI Library for Modern Web Apps, powered by Vue.",
5
5
  "repository": {
6
6
  "type": "git",