@revotech-group/revotech-ui-kit 0.2.0 → 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 -5481
- 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 -135
- 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
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import { ButtonProps, ButtonVariant, ButtonSize, ButtonType, ButtonTarget } from './button.defs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The `<rtg-button>` component is a wrapper around the `button` element that
|
|
6
|
+
* adds a variety of styles and functionality.
|
|
7
|
+
*
|
|
8
|
+
* @element rtg-button
|
|
9
|
+
* @slot button
|
|
10
|
+
*/
|
|
11
|
+
export declare class Button extends LitElement implements ButtonProps {
|
|
12
|
+
/**
|
|
13
|
+
* The visual style of the button.
|
|
14
|
+
*/
|
|
15
|
+
variant: ButtonVariant;
|
|
16
|
+
/**
|
|
17
|
+
* The size of the button.
|
|
18
|
+
*/
|
|
19
|
+
size: ButtonSize;
|
|
20
|
+
/**
|
|
21
|
+
* The type of the button.
|
|
22
|
+
*/
|
|
23
|
+
type: ButtonType;
|
|
24
|
+
/**
|
|
25
|
+
* When `true`, prevents the user from interacting with the button.
|
|
26
|
+
*/
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* When `true`, sets the `aria-invalid` attribute and styles the button
|
|
30
|
+
* accordingly.
|
|
31
|
+
*/
|
|
32
|
+
invalid?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The URL that the button link points to. When provided, an anchor tag
|
|
35
|
+
* (`<a>`) is rendered instead of a button.
|
|
36
|
+
*/
|
|
37
|
+
href?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Where to display the linked URL, as the name for a browsing context.
|
|
40
|
+
* Optionally provided in conjunction with `href`.
|
|
41
|
+
*/
|
|
42
|
+
target?: ButtonTarget;
|
|
43
|
+
/**
|
|
44
|
+
* The user-defined "on click" handler for the button.
|
|
45
|
+
*/
|
|
46
|
+
onClick?: (event: MouseEvent) => void;
|
|
47
|
+
/**
|
|
48
|
+
* The slot of the button root.
|
|
49
|
+
*/
|
|
50
|
+
private get _rootSlot();
|
|
51
|
+
/**
|
|
52
|
+
* Handles the click event of the inner button (or link), invoking the
|
|
53
|
+
* user-defined `onClick` handler if provided.
|
|
54
|
+
*/
|
|
55
|
+
private _handleClick;
|
|
56
|
+
/**
|
|
57
|
+
* Handles the first updated callback, appending the children to the root
|
|
58
|
+
* slot.
|
|
59
|
+
*/
|
|
60
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
61
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
62
|
+
render(): import('lit').TemplateResult<1>;
|
|
63
|
+
}
|
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BaseElement } from '../../../helpers';
|
|
1
|
+
import { Button } from './_button';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
type: buttonType.ButtonType;
|
|
13
|
-
variant: buttonType.ButtonVariant;
|
|
14
|
-
size: buttonType.ButtonSize;
|
|
15
|
-
buttonElement: HTMLButtonElement;
|
|
16
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
17
|
-
protected getAttributesToExclude(): string[];
|
|
18
|
-
protected getAttributesToRemoveFromParent(): string[];
|
|
19
|
-
protected firstUpdated(): void;
|
|
20
|
-
protected updated(_changedProperties: PropertyValues): void;
|
|
21
|
-
render(): import('lit').TemplateResult<1>;
|
|
3
|
+
export { Button };
|
|
4
|
+
/**
|
|
5
|
+
* Displays a button or a component that looks like a button.
|
|
6
|
+
*/
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'rtg-button': Button;
|
|
10
|
+
}
|
|
22
11
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ButtonVariant = 'default' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'link';
|
|
2
|
+
export type ButtonSize = 'default' | 'xs' | 'sm' | 'lg' | 'icon' | 'icon-xs' | 'icon-sm' | 'icon-lg';
|
|
3
|
+
export type ButtonType = 'button' | 'submit' | 'reset';
|
|
4
|
+
export type ButtonTarget = '_blank' | '_parent' | '_self' | '_top' | '_unfencedTop';
|
|
5
|
+
export interface ButtonProps {
|
|
6
|
+
variant: ButtonVariant;
|
|
7
|
+
size: ButtonSize;
|
|
8
|
+
type: ButtonType;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
invalid?: boolean;
|
|
11
|
+
href?: string;
|
|
12
|
+
target?: ButtonTarget;
|
|
13
|
+
onClick?: (event: MouseEvent) => void;
|
|
14
|
+
}
|
|
@@ -3,4 +3,12 @@ import { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
|
3
3
|
declare const meta: Meta;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const Demo: Story;
|
|
7
|
+
export declare const Size: Story;
|
|
8
|
+
export declare const Variants: Story;
|
|
9
|
+
export declare const Icon: Story;
|
|
10
|
+
export declare const WithIcon: Story;
|
|
11
|
+
export declare const Rounded: Story;
|
|
12
|
+
export declare const Loading: Story;
|
|
13
|
+
export declare const Invalid: Story;
|
|
14
|
+
export declare const Link: Story;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const buttonStyle: (props?: ({
|
|
2
2
|
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
3
|
-
size?: "
|
|
3
|
+
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
4
4
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The `<rtg-card-action>` component places content in the top-right of the
|
|
5
|
+
* header (for example, a button or a badge).
|
|
6
|
+
*
|
|
7
|
+
* @element rtg-card-action
|
|
8
|
+
* @slot card-action
|
|
9
|
+
*/
|
|
10
|
+
export declare class CardAction extends LitElement {
|
|
11
|
+
/**
|
|
12
|
+
* The slot of the card 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,21 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The `<rtg-card-content>` component is used for the main card body.
|
|
5
|
+
*
|
|
6
|
+
* @element rtg-card-content
|
|
7
|
+
* @slot card-content
|
|
8
|
+
*/
|
|
9
|
+
export declare class CardContent extends LitElement {
|
|
10
|
+
/**
|
|
11
|
+
* The slot of the card content.
|
|
12
|
+
*/
|
|
13
|
+
private get _contentSlot();
|
|
14
|
+
/**
|
|
15
|
+
* Handles the first updated callback, appending the children to the content
|
|
16
|
+
* slot.
|
|
17
|
+
*/
|
|
18
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
19
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
20
|
+
render(): import('lit').TemplateResult<1>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The `<rtg-card-description>` component is used for helper text under the
|
|
5
|
+
* title.
|
|
6
|
+
*
|
|
7
|
+
* @element rtg-card-description
|
|
8
|
+
* @slot card-description
|
|
9
|
+
*/
|
|
10
|
+
export declare class CardDescription extends LitElement {
|
|
11
|
+
/**
|
|
12
|
+
* The slot of the card 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,27 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import { CardFooterProps } from './card.defs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The `<rtg-card-footer>` component is used for actions and secondary content
|
|
6
|
+
* at the bottom of the card.
|
|
7
|
+
*
|
|
8
|
+
* @element rtg-card-footer
|
|
9
|
+
* @slot card-footer
|
|
10
|
+
*/
|
|
11
|
+
export declare class CardFooter extends LitElement implements CardFooterProps {
|
|
12
|
+
/**
|
|
13
|
+
* When `true`, the card footer is styled with a top border and padding.
|
|
14
|
+
*/
|
|
15
|
+
bordered?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The slot of the card footer.
|
|
18
|
+
*/
|
|
19
|
+
private get _footerSlot();
|
|
20
|
+
/**
|
|
21
|
+
* Handles the first updated callback, appending the children to the footer
|
|
22
|
+
* slot.
|
|
23
|
+
*/
|
|
24
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
25
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
26
|
+
render(): import('lit').TemplateResult<1>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import { CardHeaderProps } from './card.defs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The `<rtg-card-header>` component is used for a title, description, and
|
|
6
|
+
* optional action.
|
|
7
|
+
*
|
|
8
|
+
* @element rtg-card-header
|
|
9
|
+
* @slot card-header
|
|
10
|
+
*/
|
|
11
|
+
export declare class CardHeader extends LitElement implements CardHeaderProps {
|
|
12
|
+
/**
|
|
13
|
+
* When `true`, the card header is styled with a bottom border and padding.
|
|
14
|
+
*/
|
|
15
|
+
bordered?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The slot of the card header.
|
|
18
|
+
*/
|
|
19
|
+
private get _headerSlot();
|
|
20
|
+
/**
|
|
21
|
+
* Handles the first updated callback, appending the children to the header
|
|
22
|
+
* slot.
|
|
23
|
+
*/
|
|
24
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
25
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
26
|
+
render(): import('lit').TemplateResult<1>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The `<rtg-card-title>` component is used for the card title.
|
|
5
|
+
*
|
|
6
|
+
* @element rtg-card-title
|
|
7
|
+
* @slot card-title
|
|
8
|
+
*/
|
|
9
|
+
export declare class CardTitle extends LitElement {
|
|
10
|
+
/**
|
|
11
|
+
* The slot of the card 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 { CardProps, CardSize } from './card.defs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The `<rtg-card>` component is the root container for card content.
|
|
6
|
+
*
|
|
7
|
+
* @element rtg-card
|
|
8
|
+
* @slot card
|
|
9
|
+
*/
|
|
10
|
+
export declare class Card extends LitElement implements CardProps {
|
|
11
|
+
/**
|
|
12
|
+
* The size of the card.
|
|
13
|
+
*/
|
|
14
|
+
size: CardSize;
|
|
15
|
+
/**
|
|
16
|
+
* The slot of the card 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,27 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { CardDescription } from './
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { Card } from './_card';
|
|
2
|
+
import { CardHeader } from './_card-header';
|
|
3
|
+
import { CardTitle } from './_card-title';
|
|
4
|
+
import { CardDescription } from './_card-description';
|
|
5
|
+
import { CardAction } from './_card-action';
|
|
6
|
+
import { CardContent } from './_card-content';
|
|
7
|
+
import { CardFooter } from './_card-footer';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
protected getAttributesToRemoveFromParent(): string[];
|
|
14
|
-
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
15
|
-
render(): import('lit').TemplateResult<1>;
|
|
16
|
-
}
|
|
17
|
-
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, };
|
|
9
|
+
export { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter, };
|
|
10
|
+
/**
|
|
11
|
+
* Displays a card with header, content, and footer.
|
|
12
|
+
*/
|
|
18
13
|
declare global {
|
|
19
14
|
interface HTMLElementTagNameMap {
|
|
20
15
|
'rtg-card': Card;
|
|
21
|
-
'rtg-card-title': CardTitle;
|
|
22
16
|
'rtg-card-header': CardHeader;
|
|
23
|
-
'rtg-card-
|
|
17
|
+
'rtg-card-title': CardTitle;
|
|
24
18
|
'rtg-card-description': CardDescription;
|
|
19
|
+
'rtg-card-action': CardAction;
|
|
25
20
|
'rtg-card-content': CardContent;
|
|
21
|
+
'rtg-card-footer': CardFooter;
|
|
26
22
|
}
|
|
27
23
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
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
|
|
6
|
+
export declare const Demo: Story;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Small: Story;
|
|
9
|
+
export declare const BorderedHeader: Story;
|
|
10
|
+
export declare const BorderedFooter: Story;
|
|
11
|
+
export declare const Image: Story;
|
|
12
|
+
export declare const MeetingNotes: Story;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import { CheckboxProps } from './checkbox.defs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The `<rtg-checkbox>` component is a control that allows the user to toggle
|
|
6
|
+
* between checked and not checked.
|
|
7
|
+
*
|
|
8
|
+
* @element rtg-checkbox
|
|
9
|
+
* @slot checkbox
|
|
10
|
+
* @slot checkbox-indicator
|
|
11
|
+
* @slot checkbox-input
|
|
12
|
+
*/
|
|
13
|
+
export declare class Checkbox extends LitElement implements CheckboxProps {
|
|
14
|
+
/**
|
|
15
|
+
* The checked state of the checkbox when it is initially rendered. Use when
|
|
16
|
+
* you do not need to control its checked state.
|
|
17
|
+
*/
|
|
18
|
+
defaultChecked?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The controlled checked state of the checkbox. Must be used in conjunction
|
|
21
|
+
* with `onCheckedChange`.
|
|
22
|
+
*/
|
|
23
|
+
checked?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Event handler called when the checked state of the checkbox changes.
|
|
26
|
+
*/
|
|
27
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
28
|
+
/**
|
|
29
|
+
* When `true`, prevents the user from interacting with the checkbox.
|
|
30
|
+
*/
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* When `true`, indicates that the user must check the checkbox before the
|
|
34
|
+
* owning form can be submitted.
|
|
35
|
+
*/
|
|
36
|
+
required?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* When `true`, sets the `aria-invalid` attribute and styles the checkbox
|
|
39
|
+
* accordingly.
|
|
40
|
+
*/
|
|
41
|
+
invalid?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The name of the checkbox. Submitted with its owning form as part of a
|
|
44
|
+
* name/value pair.
|
|
45
|
+
*/
|
|
46
|
+
name?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The value given as data when submitted with a `name`.
|
|
49
|
+
*/
|
|
50
|
+
value: string;
|
|
51
|
+
/**
|
|
52
|
+
* The internal state of the checkbox, initialised according to the
|
|
53
|
+
* `defaultChecked` and `checked` props.
|
|
54
|
+
*/
|
|
55
|
+
private _checked?;
|
|
56
|
+
private _getState;
|
|
57
|
+
private _handleClick;
|
|
58
|
+
private _renderIndicator;
|
|
59
|
+
private _renderInput;
|
|
60
|
+
/**
|
|
61
|
+
* Handles the first updated callback, initialising the `_checked` state.
|
|
62
|
+
*/
|
|
63
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
64
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
65
|
+
render(): import('lit').TemplateResult<1>;
|
|
66
|
+
}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CheckboxProperties } from './checkbox.type';
|
|
1
|
+
import { Checkbox } from './_checkbox';
|
|
3
2
|
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
value: string;
|
|
9
|
-
required: boolean;
|
|
10
|
-
private _onClick;
|
|
11
|
-
click(): void;
|
|
12
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
13
|
-
render(): import('lit').TemplateResult<1>;
|
|
14
|
-
}
|
|
3
|
+
export { Checkbox };
|
|
4
|
+
/**
|
|
5
|
+
* A control that allows the user to toggle between checked and not checked.
|
|
6
|
+
*/
|
|
15
7
|
declare global {
|
|
16
8
|
interface HTMLElementTagNameMap {
|
|
17
9
|
'rtg-checkbox': Checkbox;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type CheckboxState = 'checked' | 'unchecked';
|
|
2
|
+
export interface CheckboxProps {
|
|
3
|
+
defaultChecked?: boolean;
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
invalid?: boolean;
|
|
9
|
+
name?: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
2
|
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
5
|
-
export declare const CheckboxWithRequired: StoryFn;
|
|
6
|
-
export declare const Checkbox: StoryFn;
|
|
7
|
-
export declare const CheckboxWithValue: StoryFn;
|
|
3
|
+
declare const meta: Meta;
|
|
4
|
+
export default meta;
|
|
8
5
|
type Story = StoryObj;
|
|
9
|
-
export declare const
|
|
6
|
+
export declare const Demo: Story;
|
|
7
|
+
export declare const Basic: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
9
|
+
export declare const Invalid: Story;
|
|
10
|
+
export declare const Description: Story;
|
|
@@ -28,7 +28,7 @@ export * from './pagination/pagination';
|
|
|
28
28
|
export * from './drawer/drawer';
|
|
29
29
|
export * from './select/select';
|
|
30
30
|
export * from './toast/toast';
|
|
31
|
-
export * from './tabs/
|
|
31
|
+
export * from './tabs/tabs';
|
|
32
32
|
export * from './toggle/toggle';
|
|
33
33
|
export * from './toggle-group/toggle-group';
|
|
34
34
|
export * from './input-otp/input-otp';
|