@duro-app/ui 5.34.0 → 5.34.1

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,20 +1,8 @@
1
- export type AvatarSize = 'sm' | 'md' | 'lg';
2
- export type AvatarShape = 'circle' | 'square';
3
- export interface AvatarProps {
4
- /** Image URL. Without it, or when it fails to load, the initials show. */
5
- src?: string;
6
- /** The accessible name: who or what this avatar stands for. Never empty. */
7
- alt: string;
8
- /** Shown when there is no image; one or two characters. */
9
- initials?: string;
10
- /** sm 28, md 40, lg 48 (the controlSm, thumbSm and iconXxl size tokens). Default md. */
11
- size?: AvatarSize;
12
- /** Default circle. */
13
- shape?: AvatarShape;
14
- }
1
+ import { AvatarProps } from './types';
2
+ export type { AvatarProps, AvatarShape, AvatarSize } from './types';
15
3
  /**
16
- * A person or entity as a picture, else their initials, else a neutral blank. The image, the
17
- * initials and the blank all carry `alt` as the accessible name.
4
+ * A person or entity as a picture, else an app-generated SVG, else their initials, else a neutral
5
+ * blank. Each carries `alt` as the accessible name.
18
6
  */
19
- export declare function Avatar({ src, alt, initials, size, shape }: AvatarProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Avatar({ src, svg, alt, initials, size, shape }: AvatarProps): import("react/jsx-runtime").JSX.Element;
20
8
  //# sourceMappingURL=Avatar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAC3C,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE7C,MAAM,WAAW,WAAW;IAC1B,0EAA0E;IAC1E,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAA;IACX,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,wFAAwF;IACxF,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,sBAAsB;IACtB,KAAK,CAAC,EAAE,WAAW,CAAA;CACpB;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,EAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAW,EAAE,KAAgB,EAAC,EAAE,WAAW,2CAiBtF"}
1
+ {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAA;AAExC,YAAY,EAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAC,MAAM,SAAS,CAAA;AAEjE;;;GAGG;AACH,wBAAgB,MAAM,CAAC,EAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAW,EAAE,KAAgB,EAAC,EAAE,WAAW,2CA4B3F"}
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.meta.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,aA4BlB,CAAA"}
1
+ {"version":3,"file":"Avatar.meta.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,aA6BlB,CAAA"}
@@ -10,4 +10,6 @@ export declare const Sizes: Story;
10
10
  export declare const Shapes: Story;
11
11
  /** An image that cannot load falls back to the initials. */
12
12
  export declare const BrokenImage: Story;
13
+ /** An app-generated SVG document fills the frame when there is no loadable src. */
14
+ export declare const GeneratedSvg: Story;
13
15
  //# sourceMappingURL=Avatar.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAEpD,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAI/B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAQ7B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAA;AAKpC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAA;AAED,oFAAoF;AACpF,eAAO,MAAM,wBAAwB,EAAE,KAoBtC,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAQnB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAOpB,CAAA;AAED,4DAA4D;AAC5D,eAAO,MAAM,WAAW,EAAE,KASzB,CAAA"}
1
+ {"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAEpD,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAI/B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAQ7B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAA;AAKpC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAA;AAED,oFAAoF;AACpF,eAAO,MAAM,wBAAwB,EAAE,KAoBtC,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAQnB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAOpB,CAAA;AAED,4DAA4D;AAC5D,eAAO,MAAM,WAAW,EAAE,KASzB,CAAA;AAKD,mFAAmF;AACnF,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAA"}
@@ -0,0 +1,21 @@
1
+ export type AvatarSize = 'sm' | 'md' | 'lg';
2
+ export type AvatarShape = 'circle' | 'square';
3
+ export interface AvatarProps {
4
+ /** Image URL. Without it, or when it fails to load, the svg, else the initials, show. */
5
+ src?: string;
6
+ /** The accessible name: who or what this avatar stands for. Never empty. */
7
+ alt: string;
8
+ /**
9
+ * A complete SVG document string generated by the app (for example id-seeded art), drawn as the
10
+ * picture, filling the frame. Never user-supplied markup. Used when there is no `src`, or `src`
11
+ * failed to load; it wins over the initials.
12
+ */
13
+ svg?: string;
14
+ /** Shown when there is no image or svg; one or two characters. */
15
+ initials?: string;
16
+ /** sm 28, md 40, lg 48 (the controlSm, thumbSm and iconXxl size tokens). Default md. */
17
+ size?: AvatarSize;
18
+ /** Default circle. */
19
+ shape?: AvatarShape;
20
+ }
21
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAC3C,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE7C,MAAM,WAAW,WAAW;IAC1B,yFAAyF;IACzF,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAA;IACX;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,wFAAwF;IACxF,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,sBAAsB;IACtB,KAAK,CAAC,EAAE,WAAW,CAAA;CACpB"}