@revotech-group/revotech-ui-kit 0.2.1 → 0.2.2
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/LICENSE +20 -20
- package/README.md +30 -30
- package/dist/library.css +10598 -9715
- package/dist/rtg-ui-kit.js +8189 -8673
- package/dist/rtg-ui-kit.umd.cjs +654 -804
- package/dist/src/assets/icons/anchor.icon.d.ts +3 -0
- package/dist/src/assets/icons/app-window.icon.d.ts +3 -0
- package/dist/src/assets/icons/arrow-right.icon.d.ts +3 -0
- package/dist/src/assets/icons/arrow-up-right.icon.d.ts +3 -0
- package/dist/src/assets/icons/arrow-up.icon.d.ts +3 -0
- package/dist/src/assets/icons/asterisk.icon.d.ts +3 -0
- package/dist/src/assets/icons/badge-alert.icon.d.ts +3 -0
- package/dist/src/assets/icons/badge-check.icon.d.ts +3 -0
- package/dist/src/assets/icons/badge-info.icon.d.ts +3 -0
- package/dist/src/assets/icons/badge-x.icon.d.ts +3 -0
- package/dist/src/assets/icons/captions.icon.d.ts +3 -0
- package/dist/src/assets/icons/check.icon.d.ts +3 -0
- package/dist/src/assets/icons/circle-alert.icon.d.ts +3 -0
- package/dist/src/assets/icons/circle-check.icon.d.ts +3 -1
- package/dist/src/assets/icons/circle-fading-arrow-up.icon.d.ts +3 -0
- package/dist/src/assets/icons/code.icon.d.ts +3 -0
- package/dist/src/assets/icons/external-link.icon.d.ts +3 -0
- package/dist/src/assets/icons/git-branch-minus.icon.d.ts +3 -0
- package/dist/src/assets/icons/git-branch-plus.icon.d.ts +3 -0
- package/dist/src/assets/icons/house.icon.d.ts +3 -0
- package/dist/src/assets/icons/index.d.ts +41 -14
- package/dist/src/assets/icons/info.icon.d.ts +3 -0
- package/dist/src/assets/icons/loader-circle.icon.d.ts +3 -0
- package/dist/src/assets/icons/mail-warning.icon.d.ts +3 -0
- package/dist/src/assets/icons/minus.icon.d.ts +3 -1
- package/dist/src/assets/icons/plus.icon.d.ts +1 -1
- package/dist/src/assets/icons/rabbit.icon.d.ts +3 -0
- package/dist/src/assets/icons/refresh-cw.icon.d.ts +3 -0
- package/dist/src/assets/icons/search.icon.d.ts +3 -1
- package/dist/src/assets/icons/settings.icon.d.ts +3 -0
- package/dist/src/assets/icons/shopping-bag.icon.d.ts +3 -0
- package/dist/src/assets/icons/wand.icon.d.ts +3 -0
- package/dist/src/components/ui/alert/_alert-action.d.ts +22 -0
- package/dist/src/components/ui/alert/_alert-description.d.ts +22 -0
- package/dist/src/components/ui/alert/_alert-title.d.ts +21 -0
- package/dist/src/components/ui/alert/_alert.d.ts +26 -0
- package/dist/src/components/ui/alert/alert.d.ts +11 -19
- package/dist/src/components/ui/alert/alert.defs.d.ts +4 -0
- package/dist/src/components/ui/alert/alert.stories.d.ts +10 -6
- package/dist/src/components/ui/avatar/_avatar-badge.d.ts +22 -0
- package/dist/src/components/ui/avatar/_avatar-fallback.d.ts +22 -0
- package/dist/src/components/ui/avatar/_avatar-group-count.d.ts +22 -0
- package/dist/src/components/ui/avatar/_avatar-group.d.ts +22 -0
- package/dist/src/components/ui/avatar/_avatar-image.d.ts +29 -0
- package/dist/src/components/ui/avatar/_avatar.d.ts +66 -0
- package/dist/src/components/ui/avatar/avatar.d.ts +14 -13
- package/dist/src/components/ui/avatar/avatar.defs.d.ts +8 -0
- package/dist/src/components/ui/avatar/avatar.stories.d.ts +13 -4
- package/dist/src/components/ui/button/_button.d.ts +63 -0
- package/dist/src/components/ui/button/button.d.ts +9 -20
- package/dist/src/components/ui/button/button.defs.d.ts +14 -0
- package/dist/src/components/ui/button/button.stories.d.ts +9 -1
- package/dist/src/components/ui/button/button.style.d.ts +1 -1
- package/dist/src/components/ui/card/_card-action.d.ts +22 -0
- package/dist/src/components/ui/card/_card-content.d.ts +21 -0
- package/dist/src/components/ui/card/_card-description.d.ts +22 -0
- package/dist/src/components/ui/card/_card-footer.d.ts +27 -0
- package/dist/src/components/ui/card/_card-header.d.ts +27 -0
- package/dist/src/components/ui/card/_card-title.d.ts +21 -0
- package/dist/src/components/ui/card/_card.d.ts +26 -0
- package/dist/src/components/ui/card/card.d.ts +14 -18
- package/dist/src/components/ui/card/card.defs.d.ts +10 -0
- package/dist/src/components/ui/card/card.stories.d.ts +9 -3
- package/dist/src/components/ui/checkbox/_checkbox.d.ts +66 -0
- package/dist/src/components/ui/checkbox/checkbox.d.ts +5 -13
- package/dist/src/components/ui/checkbox/checkbox.defs.d.ts +11 -0
- package/dist/src/components/ui/checkbox/checkbox.stories.d.ts +8 -7
- package/dist/src/components/ui/index.d.ts +1 -1
- package/dist/src/components/ui/input/_input.d.ts +164 -0
- package/dist/src/components/ui/input/input.d.ts +7 -29
- package/dist/src/components/ui/input/input.defs.d.ts +28 -0
- package/dist/src/components/ui/input/input.stories.d.ts +16 -6
- package/dist/src/components/ui/input-otp/_input-otp-group.d.ts +26 -0
- package/dist/src/components/ui/input-otp/_input-otp-separator.d.ts +16 -0
- package/dist/src/components/ui/input-otp/_input-otp-slot.d.ts +35 -0
- package/dist/src/components/ui/input-otp/_input-otp.d.ts +213 -0
- package/dist/src/components/ui/input-otp/input-otp.d.ts +12 -28
- package/dist/src/components/ui/input-otp/input-otp.defs.d.ts +28 -0
- package/dist/src/components/ui/input-otp/input-otp.stories.d.ts +10 -7
- package/dist/src/components/ui/label/_label.d.ts +27 -0
- package/dist/src/components/ui/label/label.d.ts +5 -7
- package/dist/src/components/ui/label/label.defs.d.ts +3 -0
- package/dist/src/components/ui/label/label.stories.d.ts +10 -5
- package/dist/src/components/ui/pagination/pagination-link.d.ts +2 -2
- package/dist/src/components/ui/pagination/pagination.styles.d.ts +1 -1
- package/dist/src/components/ui/sample-demo/sample-demo.d.ts +1 -1
- package/dist/src/components/ui/sample-demo/sample.style.d.ts +1 -1
- package/dist/src/components/ui/separator/_separator.d.ts +22 -0
- package/dist/src/components/ui/separator/separator.d.ts +5 -10
- package/dist/src/components/ui/separator/separator.defs.d.ts +4 -9
- package/dist/src/components/ui/separator/separator.stories.d.ts +3 -1
- package/dist/src/components/ui/tabs/_tabs-content.d.ts +30 -0
- package/dist/src/components/ui/tabs/_tabs-list.d.ts +30 -0
- package/dist/src/components/ui/tabs/_tabs-trigger.d.ts +47 -0
- package/dist/src/components/ui/tabs/_tabs.d.ts +99 -0
- package/dist/src/components/ui/tabs/tabs.d.ts +18 -0
- package/dist/src/components/ui/tabs/tabs.defs.d.ts +22 -0
- package/dist/src/components/ui/tabs/tabs.helpers.d.ts +24 -0
- package/dist/src/components/ui/tabs/tabs.stories.d.ts +13 -0
- package/dist/src/{components/ui/input/countryOptions.d.ts → helpers/country-codes.d.ts} +1 -1
- package/dist/src/helpers/index.d.ts +3 -2
- package/dist/src/tokens/tailwind/border-radius.d.ts +0 -9
- package/dist/src/tokens/tailwind/border-width.d.ts +0 -4
- package/dist/src/tokens/tailwind/box-shadow.d.ts +0 -6
- package/dist/src/tokens/tailwind/color.d.ts +0 -78
- package/dist/src/tokens/tailwind/font-size.d.ts +1 -37
- package/dist/src/tokens/tailwind/font-weight.d.ts +0 -8
- package/dist/src/tokens/tailwind/index.d.ts +1 -202
- package/dist/src/tokens/tailwind/opacity.d.ts +0 -5
- package/dist/src/tokens/tailwind/ring-offset-width.d.ts +0 -1
- package/dist/src/tokens/tailwind/ring-width.d.ts +0 -5
- package/dist/src/tokens/tailwind/spacing.d.ts +0 -45
- package/package.json +136 -136
- package/dist/src/components/ui/alert/alert.styles.d.ts +0 -10
- package/dist/src/components/ui/alert/alert.types.d.ts +0 -1
- package/dist/src/components/ui/alert/helpers.d.ts +0 -10
- package/dist/src/components/ui/avatar/avatar-fallback.d.ts +0 -15
- package/dist/src/components/ui/avatar/avatar-image.d.ts +0 -17
- package/dist/src/components/ui/avatar/avatar.style.d.ts +0 -4
- package/dist/src/components/ui/button/button.type.d.ts +0 -3
- package/dist/src/components/ui/card/card-content.d.ts +0 -11
- package/dist/src/components/ui/card/card-description.d.ts +0 -11
- package/dist/src/components/ui/card/card-footer.d.ts +0 -11
- package/dist/src/components/ui/card/card-header.d.ts +0 -11
- package/dist/src/components/ui/card/card-title.d.ts +0 -11
- package/dist/src/components/ui/card/card.styles.d.ts +0 -4
- package/dist/src/components/ui/checkbox/checkbox.style.d.ts +0 -4
- package/dist/src/components/ui/checkbox/checkbox.type.d.ts +0 -21
- package/dist/src/components/ui/input/input.styles.d.ts +0 -7
- package/dist/src/components/ui/input/input.type.d.ts +0 -21
- package/dist/src/components/ui/input-otp/input-otp-group.d.ts +0 -18
- package/dist/src/components/ui/input-otp/input-otp-separator.d.ts +0 -12
- package/dist/src/components/ui/input-otp/input-otp-slot.d.ts +0 -26
- package/dist/src/components/ui/input-otp/input-otp.styles.d.ts +0 -10
- package/dist/src/components/ui/label/label.style.d.ts +0 -1
- package/dist/src/components/ui/separator/separator.styles.d.ts +0 -5
- package/dist/src/components/ui/tabs/tab-contents.d.ts +0 -24
- package/dist/src/components/ui/tabs/tab-list.d.ts +0 -25
- package/dist/src/components/ui/tabs/tab-trigger.d.ts +0 -26
- package/dist/src/components/ui/tabs/tab.d.ts +0 -27
- package/dist/src/components/ui/tabs/tab.stories.d.ts +0 -16
- package/dist/src/components/ui/tabs/tabs.style.d.ts +0 -12
- package/dist/src/tokens/tailwind/grid-template-columns.d.ts +0 -4
|
@@ -1,21 +1,48 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './help-circle.icon';
|
|
5
|
-
export * from './circle.icon';
|
|
1
|
+
export * from './anchor.icon';
|
|
2
|
+
export * from './app-window.icon';
|
|
3
|
+
export * from './arrow-right.icon';
|
|
6
4
|
export * from './arrow-up-circle.icon';
|
|
5
|
+
export * from './arrow-up-right.icon';
|
|
6
|
+
export * from './arrow-up.icon';
|
|
7
|
+
export * from './arrows.icon';
|
|
8
|
+
export * from './asterisk.icon';
|
|
9
|
+
export * from './badge-alert.icon';
|
|
10
|
+
export * from './badge-check.icon';
|
|
11
|
+
export * from './badge-info.icon';
|
|
12
|
+
export * from './badge-x.icon';
|
|
13
|
+
export * from './captions.icon';
|
|
14
|
+
export * from './carousel-arrow-left';
|
|
15
|
+
export * from './carousel-arrow-right';
|
|
16
|
+
export * from './chart.icon';
|
|
17
|
+
export * from './check.icon';
|
|
18
|
+
export * from './chorven-down.icon';
|
|
19
|
+
export * from './circle-alert.icon';
|
|
7
20
|
export * from './circle-check.icon';
|
|
21
|
+
export * from './circle-fading-arrow-up.icon';
|
|
8
22
|
export * from './circle-x.icon';
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './chorven-down.icon';
|
|
11
|
-
export * from './radio-group.icon';
|
|
23
|
+
export * from './circle.icon';
|
|
12
24
|
export * from './close.icon';
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './plus.icon';
|
|
25
|
+
export * from './code.icon';
|
|
15
26
|
export * from './decrease.icon';
|
|
16
|
-
export * from './
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './carousel-arrow-right';
|
|
19
|
-
export * from './minus.icon';
|
|
27
|
+
export * from './dot.icon';
|
|
28
|
+
export * from './external-link.icon';
|
|
20
29
|
export * from './eye-off';
|
|
21
30
|
export * from './eye-on';
|
|
31
|
+
export * from './git-branch-minus.icon';
|
|
32
|
+
export * from './git-branch-plus.icon';
|
|
33
|
+
export * from './help-circle.icon';
|
|
34
|
+
export * from './house.icon';
|
|
35
|
+
export * from './info.icon';
|
|
36
|
+
export * from './loader-circle.icon';
|
|
37
|
+
export * from './mail-warning.icon';
|
|
38
|
+
export * from './minus.icon';
|
|
39
|
+
export * from './plus.icon';
|
|
40
|
+
export * from './rabbit.icon';
|
|
41
|
+
export * from './radio-group.icon';
|
|
42
|
+
export * from './radio.icon';
|
|
43
|
+
export * from './refresh-cw.icon';
|
|
44
|
+
export * from './search.icon';
|
|
45
|
+
export * from './settings.icon';
|
|
46
|
+
export * from './shopping-bag.icon';
|
|
47
|
+
export * from './tick.icon';
|
|
48
|
+
export * from './wand.icon';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function plusIcon(): import('lit').TemplateResult<
|
|
1
|
+
export declare function plusIcon(className?: string): import('lit').TemplateResult<1>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The `<rtg-alert-action>` component displays an action element (like a button)
|
|
5
|
+
* positioned absolutely in the top-right corner of the alert.
|
|
6
|
+
*
|
|
7
|
+
* @element rtg-alert-action
|
|
8
|
+
* @slot alert-action
|
|
9
|
+
*/
|
|
10
|
+
export declare class AlertAction extends LitElement {
|
|
11
|
+
/**
|
|
12
|
+
* The slot of the alert action.
|
|
13
|
+
*/
|
|
14
|
+
private get _actionSlot();
|
|
15
|
+
/**
|
|
16
|
+
* Handles the first updated callback, appending the children to the action
|
|
17
|
+
* slot.
|
|
18
|
+
*/
|
|
19
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
20
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
21
|
+
render(): import('lit').TemplateResult<1>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The `<rtg-alert-description>` component displays the description or content
|
|
5
|
+
* of the alert.
|
|
6
|
+
*
|
|
7
|
+
* @element rtg-alert-description
|
|
8
|
+
* @slot alert-description
|
|
9
|
+
*/
|
|
10
|
+
export declare class AlertDescription extends LitElement {
|
|
11
|
+
/**
|
|
12
|
+
* The slot of the alert description.
|
|
13
|
+
*/
|
|
14
|
+
private get _descriptionSlot();
|
|
15
|
+
/**
|
|
16
|
+
* Handles the first updated callback, appending the children to the
|
|
17
|
+
* description slot.
|
|
18
|
+
*/
|
|
19
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
20
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
21
|
+
render(): import('lit').TemplateResult<1>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The `<rtg-alert-title>` component displays the title of the alert.
|
|
5
|
+
*
|
|
6
|
+
* @element rtg-alert-title
|
|
7
|
+
* @slot alert-title
|
|
8
|
+
*/
|
|
9
|
+
export declare class AlertTitle extends LitElement {
|
|
10
|
+
/**
|
|
11
|
+
* The slot of the alert title.
|
|
12
|
+
*/
|
|
13
|
+
private get _titleSlot();
|
|
14
|
+
/**
|
|
15
|
+
* Handles the first updated callback, appending the children to the title
|
|
16
|
+
* slot.
|
|
17
|
+
*/
|
|
18
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
19
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
20
|
+
render(): import('lit').TemplateResult<1>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import { AlertProps, AlertVariant } from './alert.defs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The `<rtg-alert>` component displays a callout for user attention.
|
|
6
|
+
*
|
|
7
|
+
* @element rtg-alert
|
|
8
|
+
* @slot alert
|
|
9
|
+
*/
|
|
10
|
+
export declare class Alert extends LitElement implements AlertProps {
|
|
11
|
+
/**
|
|
12
|
+
* The visual style of the alert.
|
|
13
|
+
*/
|
|
14
|
+
variant: AlertVariant;
|
|
15
|
+
/**
|
|
16
|
+
* The slot of the alert root.
|
|
17
|
+
*/
|
|
18
|
+
private get _rootSlot();
|
|
19
|
+
/**
|
|
20
|
+
* Handles the first updated callback, appending the children to the root
|
|
21
|
+
* slot.
|
|
22
|
+
*/
|
|
23
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
24
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
25
|
+
render(): import('lit').TemplateResult<1>;
|
|
26
|
+
}
|
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Alert } from './_alert';
|
|
2
|
+
import { AlertTitle } from './_alert-title';
|
|
3
|
+
import { AlertDescription } from './_alert-description';
|
|
4
|
+
import { AlertAction } from './_alert-action';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
message: string;
|
|
10
|
-
icon: string;
|
|
11
|
-
static alertVariants: (props?: ({
|
|
12
|
-
variant?: "default" | "destructive" | "brand" | "success" | "warning" | "info" | "brand-tonal" | "destructive-tonal" | "success-tonal" | "warning-tonal" | "info-tonal" | null | undefined;
|
|
13
|
-
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
14
|
-
variant: TAlertVariant;
|
|
15
|
-
private get alertClasses();
|
|
16
|
-
protected getAttributesToRemoveFromParent(): string[];
|
|
17
|
-
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
18
|
-
render(): import('lit').TemplateResult<1>;
|
|
19
|
-
}
|
|
20
|
-
export { Alert };
|
|
6
|
+
export { Alert, AlertTitle, AlertDescription, AlertAction, };
|
|
7
|
+
/**
|
|
8
|
+
* Displays a callout for user attention.
|
|
9
|
+
*/
|
|
21
10
|
declare global {
|
|
22
11
|
interface HTMLElementTagNameMap {
|
|
23
12
|
'rtg-alert': Alert;
|
|
13
|
+
'rtg-alert-title': AlertTitle;
|
|
14
|
+
'rtg-alert-description': AlertDescription;
|
|
15
|
+
'rtg-alert-action': AlertAction;
|
|
24
16
|
}
|
|
25
17
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
2
|
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const meta: Meta;
|
|
4
|
+
export default meta;
|
|
5
5
|
type Story = StoryObj;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
6
|
+
export declare const Demo: Story;
|
|
7
|
+
export declare const Basic: Story;
|
|
8
|
+
export declare const Icons: Story;
|
|
9
|
+
export declare const Links: Story;
|
|
10
|
+
export declare const Destructive: Story;
|
|
11
|
+
export declare const Variants: Story;
|
|
12
|
+
export declare const Action: Story;
|
|
13
|
+
export declare const CustomColors: Story;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The `<rtg-avatar-badge>` component displays a badge indicator on the avatar,
|
|
5
|
+
* typically positioned at the bottom right.
|
|
6
|
+
*
|
|
7
|
+
* @element rtg-avatar-badge
|
|
8
|
+
* @slot avatar-badge
|
|
9
|
+
*/
|
|
10
|
+
export declare class AvatarBadge extends LitElement {
|
|
11
|
+
/**
|
|
12
|
+
* The slot of the avatar badge.
|
|
13
|
+
*/
|
|
14
|
+
private get _badgeSlot();
|
|
15
|
+
/**
|
|
16
|
+
* Handles the first updated callback, appending the children to the badge
|
|
17
|
+
* slot.
|
|
18
|
+
*/
|
|
19
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
20
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
21
|
+
render(): import('lit').TemplateResult<1>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The `<rtg-avatar-fallback>` component displays a fallback when the image
|
|
5
|
+
* fails to load.
|
|
6
|
+
*
|
|
7
|
+
* @element rtg-avatar-fallback
|
|
8
|
+
* @slot avatar-fallback
|
|
9
|
+
*/
|
|
10
|
+
export declare class AvatarFallback extends LitElement {
|
|
11
|
+
/**
|
|
12
|
+
* The slot of the avatar fallback.
|
|
13
|
+
*/
|
|
14
|
+
private get _fallbackSlot();
|
|
15
|
+
/**
|
|
16
|
+
* Handles the first updated callback, appending the children to the fallback
|
|
17
|
+
* slot.
|
|
18
|
+
*/
|
|
19
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
20
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
21
|
+
render(): import('lit').TemplateResult<1>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The `<rtg-avatar-group-count>` component displays a count indicator in an
|
|
5
|
+
* avatar group, typically showing the number of additional avatars.
|
|
6
|
+
*
|
|
7
|
+
* @element rtg-avatar-group-count
|
|
8
|
+
* @slot avatar-group-count
|
|
9
|
+
*/
|
|
10
|
+
export declare class AvatarGroupCount extends LitElement {
|
|
11
|
+
/**
|
|
12
|
+
* The slot of the avatar group count.
|
|
13
|
+
*/
|
|
14
|
+
private get _groupCountSlot();
|
|
15
|
+
/**
|
|
16
|
+
* Handles the first updated callback, appending the children to the group
|
|
17
|
+
* count slot.
|
|
18
|
+
*/
|
|
19
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
20
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
21
|
+
render(): import('lit').TemplateResult<1>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The `<rtg-avatar-group>` component displays a group of avatars with
|
|
5
|
+
* overlapping styling.
|
|
6
|
+
*
|
|
7
|
+
* @element rtg-avatar-group
|
|
8
|
+
* @slot avatar-group
|
|
9
|
+
*/
|
|
10
|
+
export declare class AvatarGroup extends LitElement {
|
|
11
|
+
/**
|
|
12
|
+
* The slot of the avatar group.
|
|
13
|
+
*/
|
|
14
|
+
private get _groupSlot();
|
|
15
|
+
/**
|
|
16
|
+
* Handles the first updated callback, appending the children to the group
|
|
17
|
+
* slot.
|
|
18
|
+
*/
|
|
19
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
20
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
21
|
+
render(): import('lit').TemplateResult<1>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { AvatarImageProps } from './avatar.defs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The `<rtg-avatar-image>` component displays the avatar image.
|
|
6
|
+
*
|
|
7
|
+
* @element rtg-avatar-image
|
|
8
|
+
* @slot avatar-image
|
|
9
|
+
*/
|
|
10
|
+
export declare class AvatarImage extends LitElement implements AvatarImageProps {
|
|
11
|
+
/**
|
|
12
|
+
* The source of the avatar image.
|
|
13
|
+
*/
|
|
14
|
+
src?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The alt text of the avatar image.
|
|
17
|
+
*/
|
|
18
|
+
alt?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Handles the image load event.
|
|
21
|
+
*/
|
|
22
|
+
private _onLoad;
|
|
23
|
+
/**
|
|
24
|
+
* Handles the image error event.
|
|
25
|
+
*/
|
|
26
|
+
private _onError;
|
|
27
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
28
|
+
render(): import('lit').TemplateResult<1>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import { AvatarSize, AvatarProps } from './avatar.defs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The `<rtg-avatar>` component is the root component that wraps the avatar
|
|
6
|
+
* image and fallback.
|
|
7
|
+
*
|
|
8
|
+
* @element rtg-avatar
|
|
9
|
+
* @slot avatar
|
|
10
|
+
*/
|
|
11
|
+
export declare class Avatar extends LitElement implements AvatarProps {
|
|
12
|
+
/**
|
|
13
|
+
* The size of the avatar.
|
|
14
|
+
*/
|
|
15
|
+
size: AvatarSize;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the image has loaded.
|
|
18
|
+
*/
|
|
19
|
+
private _imageLoaded;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the image has errored.
|
|
22
|
+
*/
|
|
23
|
+
private _imageError;
|
|
24
|
+
/**
|
|
25
|
+
* The slot of the avatar root.
|
|
26
|
+
*/
|
|
27
|
+
private get _rootSlot();
|
|
28
|
+
/**
|
|
29
|
+
* The avatar image child.
|
|
30
|
+
*/
|
|
31
|
+
private get _avatarImageChild();
|
|
32
|
+
/**
|
|
33
|
+
* The avatar fallback child.
|
|
34
|
+
*/
|
|
35
|
+
private get _avatarFallbackChild();
|
|
36
|
+
/**
|
|
37
|
+
* Shows or hides the avatar image and avatar fallback children based on the
|
|
38
|
+
* image error and loaded state.
|
|
39
|
+
*/
|
|
40
|
+
private _syncChildren;
|
|
41
|
+
/**
|
|
42
|
+
* Handles the image load event.
|
|
43
|
+
*/
|
|
44
|
+
private _onImageLoad;
|
|
45
|
+
/**
|
|
46
|
+
* Handles the image error event.
|
|
47
|
+
*/
|
|
48
|
+
private _onImageError;
|
|
49
|
+
/**
|
|
50
|
+
* Handles the connected callback, adding the image load and image error event
|
|
51
|
+
* listeners.
|
|
52
|
+
*/
|
|
53
|
+
connectedCallback(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Handles the disconnected callback, removing the image load and image error
|
|
56
|
+
* event listeners.
|
|
57
|
+
*/
|
|
58
|
+
disconnectedCallback(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Handles the first updated callback, appending the children to the root
|
|
61
|
+
* slot.
|
|
62
|
+
*/
|
|
63
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
64
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
65
|
+
render(): import('lit').TemplateResult<1>;
|
|
66
|
+
}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { AvatarFallback } from './
|
|
4
|
-
import {
|
|
1
|
+
import { Avatar } from './_avatar';
|
|
2
|
+
import { AvatarImage } from './_avatar-image';
|
|
3
|
+
import { AvatarFallback } from './_avatar-fallback';
|
|
4
|
+
import { AvatarBadge } from './_avatar-badge';
|
|
5
|
+
import { AvatarGroup } from './_avatar-group';
|
|
6
|
+
import { AvatarGroupCount } from './_avatar-group-count';
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
11
|
-
render(): import('lit').TemplateResult<1>;
|
|
12
|
-
}
|
|
13
|
-
export { Avatar, AvatarFallback, AvatarImage };
|
|
8
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount, };
|
|
9
|
+
/**
|
|
10
|
+
* An image element with a fallback for representing the user.
|
|
11
|
+
*/
|
|
14
12
|
declare global {
|
|
15
13
|
interface HTMLElementTagNameMap {
|
|
16
14
|
'rtg-avatar': Avatar;
|
|
17
|
-
'rtg-avatar-fallback': AvatarFallback;
|
|
18
15
|
'rtg-avatar-image': AvatarImage;
|
|
16
|
+
'rtg-avatar-fallback': AvatarFallback;
|
|
17
|
+
'rtg-avatar-badge': AvatarBadge;
|
|
18
|
+
'rtg-avatar-group': AvatarGroup;
|
|
19
|
+
'rtg-avatar-group-count': AvatarGroupCount;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
2
|
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
5
|
-
|
|
3
|
+
declare const meta: Meta;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj;
|
|
6
|
+
export declare const Demo: Story;
|
|
7
|
+
export declare const Basic: Story;
|
|
8
|
+
export declare const Fallback: Story;
|
|
9
|
+
export declare const Sizes: Story;
|
|
10
|
+
export declare const Badge: Story;
|
|
11
|
+
export declare const BadgeWithIcon: Story;
|
|
12
|
+
export declare const AvatarGroup: Story;
|
|
13
|
+
export declare const AvatarGroupCount: Story;
|
|
14
|
+
export declare const AvatarGroupWithIcon: Story;
|