sit-onyx 1.0.0-beta.134 → 1.0.0-beta.136

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.
@@ -1,28 +1,5 @@
1
1
  import type { OnyxAvatarProps } from "./types";
2
- declare function __VLS_template(): {
3
- attrs: Partial<{}>;
4
- slots: Readonly<{
5
- /**
6
- * Optional slot to override the default initials. Will only be used if `type` is `initials`.
7
- */
8
- default?(): unknown;
9
- }> & {
10
- /**
11
- * Optional slot to override the default initials. Will only be used if `type` is `initials`.
12
- */
13
- default?(): unknown;
14
- };
15
- refs: {};
16
- rootEl: HTMLElement;
17
- };
18
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
- declare const __VLS_component: import("vue").DefineComponent<OnyxAvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxAvatarProps> & Readonly<{}>, {
2
+ declare const _default: import("vue").DefineComponent<OnyxAvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxAvatarProps> & Readonly<{}>, {
20
3
  size: "16px" | "24px" | "32px" | "48px" | "64px" | "96px";
21
4
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLElement>;
22
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
5
  export default _default;
24
- type __VLS_WithTemplateSlots<T, S> = T & {
25
- new (): {
26
- $slots: S;
27
- };
28
- };
@@ -1,13 +1,25 @@
1
1
  import type { IconSize, IconSizeProp } from "../OnyxIcon/types";
2
2
  export type OnyxAvatarProps = IconSizeProp<Exclude<IconSize, "12px">> & {
3
3
  /**
4
- * Label (e.g. the user name), required for accessibility.
5
- * Will also determine the displayed initials.
4
+ * Full user name. Will determine the displayed initials.
5
+ *
6
+ * @example "John Doe"
6
7
  */
7
- label: string;
8
+ fullName: DisplayName;
8
9
  /**
9
10
  * Image URL to show. If unset or an error occurs while loading, a fallback will be displayed
10
11
  * with the initials.
11
12
  */
12
13
  src?: string;
14
+ /**
15
+ * Initials to use. If unset, they will be inferred automatically from the `fullName` property.
16
+ */
17
+ initials?: string;
18
+ };
19
+ export type DisplayName = string | {
20
+ name: string;
21
+ /**
22
+ * Locale of the given name. Will be used for formatting.
23
+ */
24
+ locale: string;
13
25
  };
@@ -1,12 +1,15 @@
1
+ import type { OnyxAvatarProps } from "../../../OnyxAvatar/types";
1
2
  export type OnyxUserMenuProps = {
2
3
  /**
3
- * User name.
4
+ * Full user name.
5
+ *
6
+ * @example "John Doe"
4
7
  */
5
- username: string;
8
+ fullName: string;
6
9
  /**
7
10
  * User avatar. If unset or an error occurs while loading, a fallback will be displayed with the username initials.
8
11
  */
9
- avatar?: string;
12
+ avatar?: string | Omit<OnyxAvatarProps, "size">;
10
13
  /**
11
14
  * Optional user description that is displayed when the menu is opened.
12
15
  */
@@ -151,5 +151,8 @@
151
151
  "headline": {
152
152
  "copyLink": "Link zu dieser Überschrift kopieren",
153
153
  "copyLinkTo": "Link kopieren zu Überschrift:"
154
+ },
155
+ "avatar": {
156
+ "ariaLabel": "Avatar von {fullName}"
154
157
  }
155
158
  }
@@ -151,5 +151,8 @@
151
151
  "headline": {
152
152
  "copyLink": "Copy link to this headline",
153
153
  "copyLinkTo": "Copy link to headline:"
154
+ },
155
+ "avatar": {
156
+ "ariaLabel": "Avatar of {fullName}"
154
157
  }
155
158
  }