@sesamehr/react-design-system 3.8.0 → 3.9.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/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  React components and design tokens for the Sesame HR design system.
4
4
 
5
- 📖 **[Component documentation](https://reactds.sesametime.com)**
5
+ 📖 **[Component documentation](https://storybook.sesametime.com)** — this package's
6
+ Storybook. The Vue source of truth has its own at
7
+ [vue-storybook.sesametime.com](https://vue-storybook.sesametime.com).
6
8
 
7
9
  ## Install
8
10
 
@@ -97,7 +99,6 @@ to retheme, not `--color-brand-500`. Unprefixed, those are the names Tailwind
97
99
  itself uses, and declaring them at `:root` would change what every `rounded-2xl`
98
100
  in your application means.
99
101
 
100
-
101
102
  ## License
102
103
 
103
104
  MIT © Sesame HR
@@ -15,6 +15,12 @@ export interface AvatarRoundedProps extends React.HTMLAttributes<HTMLSpanElement
15
15
  action?: React.ReactNode;
16
16
  /** Rendered centred on the bottom edge */
17
17
  label?: React.ReactNode;
18
+ /**
19
+ * Who the avatar is, shown in a tooltip on hover and on focus. Passing it
20
+ * is what turns the tooltip on, which keeps the switch out of the prop
21
+ * budget and lets the tooltip carry more than a name.
22
+ */
23
+ tooltip?: React.ReactNode;
18
24
  dataTestid: string;
19
25
  }
20
26
  /**
@@ -15,6 +15,12 @@ export interface AvatarSquareProps extends React.HTMLAttributes<HTMLSpanElement>
15
15
  action?: React.ReactNode;
16
16
  /** Rendered centred on the bottom edge */
17
17
  label?: React.ReactNode;
18
+ /**
19
+ * Who the avatar is, shown in a tooltip on hover and on focus. Passing it
20
+ * is what turns the tooltip on, which keeps the switch out of the prop
21
+ * budget and lets the tooltip carry more than a name.
22
+ */
23
+ tooltip?: React.ReactNode;
18
24
  dataTestid: string;
19
25
  }
20
26
  /**
@@ -16,6 +16,20 @@ export interface AvatarGroupProps extends Omit<React.ButtonHTMLAttributes<HTMLBu
16
16
  avatars: AvatarItem[];
17
17
  /** Maximum number of avatars to show before collapsing */
18
18
  max?: number;
19
+ /**
20
+ * How many people the stack stands for, when that is not the length of
21
+ * `avatars`. Three faces and a `total` of 25 draw three avatars and `+22`,
22
+ * so a caller holding one page of a long list no longer has to pad it with
23
+ * empty items to make the counter read right.
24
+ *
25
+ * The counter is `total` minus what is *shown*, never minus `max`: the two
26
+ * differ whenever there are fewer faces than `max`, and `shown + counter`
27
+ * has to come to `total` for the number to mean anything. A `total` under
28
+ * the number of faces is an ordinary race — the list refreshed and the
29
+ * count did not — so it drops the counter and never a face; `max` stays the
30
+ * only thing that caps the pile.
31
+ */
32
+ total?: number;
19
33
  /** Whether the group is interactive (clickable) */
20
34
  interactive?: boolean;
21
35
  /** The size every avatar in the stack is drawn at. */