@redvars/peacock 3.2.9 → 3.3.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/dist/{PeacockComponent-CxJc63xj.js → IndividualComponent-tDnXrOLV.js} +3 -3
- package/dist/IndividualComponent-tDnXrOLV.js.map +1 -0
- package/dist/assets/tokens.css +2 -0
- package/dist/assets/tokens.css.map +1 -0
- package/dist/{button-2MeDq0Yy.js → button-BGFJfbT2.js} +23 -36
- package/dist/button-BGFJfbT2.js.map +1 -0
- package/dist/button-group.js +8 -8
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +6 -5
- package/dist/button.js.map +1 -1
- package/dist/chart-donut.js +307 -0
- package/dist/chart-donut.js.map +1 -0
- package/dist/chart-doughnut.js +307 -0
- package/dist/chart-doughnut.js.map +1 -0
- package/dist/chart-pie.js +259 -0
- package/dist/chart-pie.js.map +1 -0
- package/dist/{class-map-BvQRv7eW.js → class-map-DpeNtqCn.js} +2 -2
- package/dist/{class-map-BvQRv7eW.js.map → class-map-DpeNtqCn.js.map} +1 -1
- package/dist/clock.js +5 -6
- package/dist/clock.js.map +1 -1
- package/dist/code-editor.js +37 -24
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +21 -7
- package/dist/code-highlighter.js.map +1 -1
- package/dist/custom-elements-jsdocs.json +5377 -3122
- package/dist/custom-elements.json +5527 -3940
- package/dist/{dispatch-event-utils-vbdiOSeC.js → dispatch-event-utils-B4odODQf.js} +2 -15
- package/dist/dispatch-event-utils-B4odODQf.js.map +1 -0
- package/dist/index.js +13 -9
- package/dist/index.js.map +1 -1
- package/dist/number-counter.js +12 -10
- package/dist/number-counter.js.map +1 -1
- package/dist/{observe-theme-change-NneLARW8.js → observe-theme-change-BISF-Gl5.js} +2 -2
- package/dist/{observe-theme-change-NneLARW8.js.map → observe-theme-change-BISF-Gl5.js.map} +1 -1
- package/dist/peacock-loader.js +124 -62
- package/dist/peacock-loader.js.map +1 -1
- package/dist/query-QBcUV-L_.js +15 -0
- package/dist/query-QBcUV-L_.js.map +1 -0
- package/dist/{image-DK6VQW7N.js → slider-Dk9CFWTG.js} +1616 -331
- package/dist/slider-Dk9CFWTG.js.map +1 -0
- package/dist/src/IndividualComponent.d.ts +1 -0
- package/dist/src/accordion/{accordion-item/accordion-item.d.ts → accordion-item.d.ts} +4 -4
- package/dist/src/accordion/{accordion/accordion.d.ts → accordion.d.ts} +6 -6
- package/dist/src/accordion/{accordion-item/index.d.ts → index.d.ts} +1 -0
- package/dist/src/avatar/avatar.d.ts +2 -2
- package/dist/src/badge/badge.d.ts +2 -2
- package/dist/src/breadcrumb/breadcrumb/breadcrumb.d.ts +7 -8
- package/dist/src/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +3 -3
- package/dist/src/button/button/button.d.ts +2 -2
- package/dist/src/button/button-group/button-group.d.ts +5 -5
- package/dist/src/button/icon-button/icon-button.d.ts +2 -2
- package/dist/src/chart-donut/chart-donut.d.ts +53 -0
- package/dist/src/chart-donut/index.d.ts +1 -0
- package/dist/src/chart-doughnut/chart-doughnut.d.ts +53 -0
- package/dist/src/chart-doughnut/index.d.ts +1 -0
- package/dist/src/chart-pie/chart-pie.d.ts +50 -0
- package/dist/src/chart-pie/index.d.ts +1 -0
- package/dist/src/checkbox/checkbox.d.ts +3 -6
- package/dist/src/chip/chip/chip.d.ts +4 -4
- package/dist/src/chip/tag/tag.d.ts +3 -3
- package/dist/src/clock/clock.d.ts +3 -4
- package/dist/src/code-editor/code-editor.d.ts +11 -9
- package/dist/src/container/container.d.ts +6 -11
- package/dist/src/date-picker/date-picker.d.ts +3 -3
- package/dist/src/divider/divider.d.ts +2 -2
- package/dist/src/elevation/elevation.d.ts +2 -2
- package/dist/src/empty-state/empty-state.d.ts +9 -2
- package/dist/src/field/field.d.ts +17 -0
- package/dist/src/focus-ring/focus-ring.d.ts +1 -1
- package/dist/src/icon/icon.d.ts +2 -2
- package/dist/src/image/image.d.ts +4 -12
- package/dist/src/index.d.ts +5 -1
- package/dist/src/input/input.d.ts +2 -2
- package/dist/src/link/link.d.ts +4 -5
- package/dist/src/menu/menu/menu.d.ts +16 -0
- package/dist/src/menu/menu-item/menu-item.d.ts +12 -0
- package/dist/src/menu/menu-list/menu-list.d.ts +15 -0
- package/dist/src/number-counter/number-counter.d.ts +9 -7
- package/dist/src/number-field/number-field.d.ts +1 -1
- package/dist/src/popover/index.d.ts +1 -1
- package/dist/src/progress/circular-progress/circular-progress.d.ts +3 -3
- package/dist/src/progress/linear-progress/linear-progress.d.ts +3 -3
- package/dist/src/ripple/ripple.d.ts +60 -4
- package/dist/src/skeleton/skeleton.d.ts +6 -5
- package/dist/src/slider/index.d.ts +1 -0
- package/dist/src/slider/slider.d.ts +52 -0
- package/dist/src/spinner/spinner.d.ts +2 -2
- package/dist/src/switch/switch.d.ts +2 -2
- package/dist/src/tabs/index.d.ts +4 -0
- package/dist/src/tabs/tab-group.d.ts +41 -0
- package/dist/src/tabs/tab-panel.d.ts +21 -0
- package/dist/src/tabs/tab.d.ts +58 -0
- package/dist/src/tabs/tabs.d.ts +27 -0
- package/dist/src/textarea/textarea.d.ts +3 -3
- package/dist/src/time-picker/time-picker.d.ts +3 -3
- package/dist/src/{popover/tooltip → tooltip}/tooltip.d.ts +6 -3
- package/dist/{state-B09bP3XH.js → state-8v48Exzh.js} +2 -2
- package/dist/{state-B09bP3XH.js.map → state-8v48Exzh.js.map} +1 -1
- package/dist/{style-map-B8xgVEc9.js → style-map-CfNHEkQp.js} +2 -2
- package/dist/{style-map-B8xgVEc9.js.map → style-map-CfNHEkQp.js.map} +1 -1
- package/dist/transform-DRuHEvar.js +3312 -0
- package/dist/transform-DRuHEvar.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{unsafe-html-B-dV3Jps.js → unsafe-html-CV6Je6HL.js} +2 -2
- package/dist/{unsafe-html-B-dV3Jps.js.map → unsafe-html-CV6Je6HL.js.map} +1 -1
- package/package.json +3 -1
- package/readme.md +2 -2
- package/scss/tokens.scss +1 -0
- package/src/{PeacockComponent.ts → IndividualComponent.ts} +1 -1
- package/src/accordion/{accordion-item/accordion-item.scss → accordion-item.scss} +1 -1
- package/src/accordion/{accordion-item/accordion-item.ts → accordion-item.ts} +5 -5
- package/src/accordion/{accordion/accordion.scss → accordion.scss} +2 -1
- package/src/accordion/{accordion/accordion.ts → accordion.ts} +6 -6
- package/src/accordion/{accordion-item/index.ts → index.ts} +2 -0
- package/src/avatar/avatar.ts +2 -2
- package/src/badge/badge.ts +2 -2
- package/src/breadcrumb/breadcrumb/breadcrumb.ts +7 -8
- package/src/breadcrumb/breadcrumb-item/breadcrumb-item.ts +3 -3
- package/src/button/BaseButton.ts +1 -1
- package/src/button/button/button.scss +10 -24
- package/src/button/button/button.ts +8 -8
- package/src/button/button-group/button-group.ts +7 -7
- package/src/button/icon-button/icon-button.ts +8 -8
- package/src/chart-donut/chart-donut.scss +37 -0
- package/src/chart-donut/chart-donut.ts +287 -0
- package/src/chart-donut/demo/index.html +51 -0
- package/src/chart-donut/index.ts +1 -0
- package/src/chart-doughnut/chart-donut.scss +37 -0
- package/src/chart-doughnut/chart-doughnut.ts +287 -0
- package/src/chart-doughnut/demo/index.html +51 -0
- package/src/chart-doughnut/index.ts +1 -0
- package/src/chart-pie/chart-pie.scss +27 -0
- package/src/chart-pie/chart-pie.ts +256 -0
- package/src/chart-pie/demo/index.html +51 -0
- package/src/chart-pie/index.ts +1 -0
- package/src/checkbox/checkbox.ts +3 -6
- package/src/chip/chip/chip.ts +6 -6
- package/src/chip/tag/tag.ts +6 -6
- package/src/clock/clock.ts +5 -6
- package/src/code-editor/code-editor.scss +3 -5
- package/src/code-editor/code-editor.ts +30 -15
- package/src/code-highlighter/code-highlighter.ts +19 -4
- package/src/container/container.ts +6 -11
- package/src/date-picker/date-picker.ts +7 -7
- package/src/divider/divider.ts +2 -2
- package/src/elevation/elevation.ts +2 -2
- package/src/empty-state/empty-state.ts +10 -3
- package/src/field/field.scss +4 -4
- package/src/field/field.ts +19 -2
- package/src/focus-ring/focus-ring.scss +2 -1
- package/src/focus-ring/focus-ring.ts +1 -1
- package/src/icon/icon.ts +2 -2
- package/src/icon/p-icon.ts +1 -1
- package/src/image/image.scss +55 -48
- package/src/image/image.ts +4 -12
- package/src/index.ts +6 -2
- package/src/input/input.ts +6 -6
- package/src/link/link.ts +4 -5
- package/src/menu/menu/menu.ts +16 -0
- package/src/menu/menu-item/menu-item-colors.scss +2 -2
- package/src/menu/menu-item/menu-item.ts +14 -2
- package/src/menu/menu-list/menu-list.ts +16 -1
- package/src/number-counter/demo/index.html +1 -1
- package/src/number-counter/number-counter.ts +11 -9
- package/src/number-field/number-field.ts +7 -7
- package/src/peacock-loader.ts +71 -44
- package/src/popover/index.ts +1 -1
- package/src/progress/circular-progress/circular-progress.scss +1 -1
- package/src/progress/circular-progress/circular-progress.ts +3 -3
- package/src/progress/linear-progress/linear-progress.ts +3 -3
- package/src/ripple/ripple.ts +478 -94
- package/src/skeleton/skeleton.ts +6 -5
- package/src/slider/index.ts +1 -0
- package/src/slider/slider.scss +130 -0
- package/src/slider/slider.ts +178 -0
- package/src/spinner/spinner.ts +2 -2
- package/src/switch/switch.ts +4 -4
- package/src/tabs/index.ts +4 -0
- package/src/tabs/tab-group.scss +10 -0
- package/src/tabs/tab-group.ts +137 -0
- package/src/tabs/tab-panel.scss +12 -0
- package/src/tabs/tab-panel.ts +28 -0
- package/src/tabs/tab.scss +157 -0
- package/src/tabs/tab.ts +242 -0
- package/src/tabs/tabs.scss +18 -0
- package/src/tabs/tabs.ts +64 -0
- package/src/textarea/textarea.ts +5 -5
- package/src/time-picker/time-picker.ts +7 -7
- package/src/{popover/tooltip → tooltip}/tooltip.scss +1 -1
- package/src/{popover/tooltip → tooltip}/tooltip.ts +10 -6
- package/dist/PeacockComponent-CxJc63xj.js.map +0 -1
- package/dist/button-2MeDq0Yy.js.map +0 -1
- package/dist/dispatch-event-utils-vbdiOSeC.js.map +0 -1
- package/dist/image-DK6VQW7N.js.map +0 -1
- package/dist/src/PeacockComponent.d.ts +0 -1
- package/dist/src/accordion/accordion/index.d.ts +0 -1
- package/dist/src/avatar/p-avatar.d.ts +0 -3
- package/dist/src/badge/p-badge.d.ts +0 -3
- package/src/accordion/accordion/index.ts +0 -1
- package/src/avatar/p-avatar.ts +0 -5
- package/src/badge/p-badge.ts +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function IndividualComponent(constructor: Function): void;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* @label Accordion Item
|
|
4
|
-
* @tag accordion-item
|
|
5
|
-
* @rawTag accordion
|
|
4
|
+
* @tag wc-accordion-item
|
|
5
|
+
* @rawTag accordion-item
|
|
6
6
|
* @summary An accordion item is single item in an accordion list. It contains a header and a content section that can be expanded or collapsed by the user.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```html
|
|
10
|
-
* <
|
|
10
|
+
* <wc-accordion-item>
|
|
11
11
|
* Testing
|
|
12
|
-
* </accordion-item>
|
|
12
|
+
* </wc-accordion-item>
|
|
13
13
|
* ```
|
|
14
14
|
* @tags display
|
|
15
15
|
*/
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { AccordionItem } from '
|
|
2
|
+
import { AccordionItem } from './accordion-item.js';
|
|
3
3
|
/**
|
|
4
4
|
* @label Accordion
|
|
5
|
-
* @tag
|
|
5
|
+
* @tag wc-accordion
|
|
6
6
|
* @rawTag accordion
|
|
7
7
|
* @summary An accordion is a vertically stacked list of headers that reveal or hide associated sections of content.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```html
|
|
11
|
-
* <
|
|
12
|
-
* <accordion-item heading="Accordion">
|
|
11
|
+
* <wc-accordion>
|
|
12
|
+
* <wc-accordion-item heading="Accordion">
|
|
13
13
|
* Content
|
|
14
|
-
* </accordion-item>
|
|
15
|
-
* </
|
|
14
|
+
* </wc-accordion-item>
|
|
15
|
+
* </wc-accordion>
|
|
16
16
|
* ```
|
|
17
17
|
* @tags display
|
|
18
18
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* @label Avatar
|
|
4
|
-
* @tag
|
|
4
|
+
* @tag wc-avatar
|
|
5
5
|
* @rawTag avatar
|
|
6
6
|
* @summary The Avatar component is used to represent user, and displays the profile picture, initials or fallback icon.
|
|
7
7
|
*
|
|
@@ -13,7 +13,7 @@ import { LitElement } from 'lit';
|
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```html
|
|
16
|
-
* <
|
|
16
|
+
* <wc-avatar name="Shivaji Varma" src="https://peacock.redvars.com/assets/img/avatar.xs.webp" style='--avatar-size: 4rem'></wc-avatar>
|
|
17
17
|
* ```
|
|
18
18
|
*
|
|
19
19
|
* @tags display
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* @label Badge
|
|
4
|
-
* @tag
|
|
4
|
+
* @tag wc-badge
|
|
5
5
|
* @rawTag badge
|
|
6
6
|
* @summary The badge component is used to display a small amount of information to the user.
|
|
7
7
|
*
|
|
@@ -9,7 +9,7 @@ import { LitElement } from 'lit';
|
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* ```html
|
|
12
|
-
* <
|
|
12
|
+
* <wc-badge value="1"></wc-badge>
|
|
13
13
|
* ```
|
|
14
14
|
* @tags display
|
|
15
15
|
*/
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* @label Breadcrumb
|
|
4
|
-
* @tag
|
|
4
|
+
* @tag wc-breadcrumb
|
|
5
5
|
* @rawTag breadcrumb
|
|
6
|
-
*
|
|
7
6
|
* @summary A breadcrumb is a secondary navigation scheme that reveals the user's location in a website or web application.
|
|
8
7
|
* @overview
|
|
9
8
|
* - Breadcrumbs provide a trail for users to follow back to the starting or entry point.
|
|
10
9
|
* - They help users understand their current location within the site hierarchy.
|
|
11
10
|
* - Follows WCAG 2.1 guidelines for accessible navigation landmarks.
|
|
11
|
+
* @tags navigation
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```html
|
|
15
|
-
* <
|
|
16
|
-
* <breadcrumb-item href="#">Home</breadcrumb-item>
|
|
17
|
-
* <breadcrumb-item href="#">Category</breadcrumb-item>
|
|
18
|
-
* <breadcrumb-item active>Current Page</breadcrumb-item>
|
|
19
|
-
* </
|
|
15
|
+
* <wc-breadcrumb label="Breadcrumb">
|
|
16
|
+
* <wc-breadcrumb-item href="#">Home</wc-breadcrumb-item>
|
|
17
|
+
* <wc-breadcrumb-item href="#">Category</wc-breadcrumb-item>
|
|
18
|
+
* <wc-breadcrumb-item active>Current Page</wc-breadcrumb-item>
|
|
19
|
+
* </wc-breadcrumb>
|
|
20
20
|
* ```
|
|
21
|
-
* @tags navigation
|
|
22
21
|
*/
|
|
23
22
|
export declare class Breadcrumb extends LitElement {
|
|
24
23
|
static styles: import("lit").CSSResultGroup[];
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* @label Breadcrumb Item
|
|
4
|
-
* @tag breadcrumb-item
|
|
4
|
+
* @tag wc-breadcrumb-item
|
|
5
5
|
* @rawTag breadcrumb-item
|
|
6
6
|
* @summary A breadcrumb item component that represents a single item in a breadcrumb navigation.
|
|
7
|
+
* @tags navigation
|
|
7
8
|
*
|
|
8
9
|
* @example
|
|
9
10
|
* ```html
|
|
10
|
-
* <breadcrumb-item href="#">Home</breadcrumb-item>
|
|
11
|
+
* <wc-breadcrumb-item href="#">Home</wc-breadcrumb-item>
|
|
11
12
|
* ```
|
|
12
|
-
* @tags navigation
|
|
13
13
|
*/
|
|
14
14
|
export declare class BreadcrumbItem extends LitElement {
|
|
15
15
|
static styles: import("lit").CSSResultGroup[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseButton } from '../BaseButton.js';
|
|
2
2
|
/**
|
|
3
3
|
* @label Button
|
|
4
|
-
* @tag
|
|
4
|
+
* @tag wc-button
|
|
5
5
|
* @rawTag button
|
|
6
6
|
*
|
|
7
7
|
* @summary Buttons help people initiate actions, from sending an email, to sharing a document, to liking a post.
|
|
@@ -37,7 +37,7 @@ import { BaseButton } from '../BaseButton.js';
|
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```html
|
|
40
|
-
* <
|
|
40
|
+
* <wc-button>Button</wc-button>
|
|
41
41
|
* ```
|
|
42
42
|
* @tags display
|
|
43
43
|
*/
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* @label Button Group
|
|
4
|
-
* @tag button-group
|
|
4
|
+
* @tag wc-button-group
|
|
5
5
|
* @rawTag button-group
|
|
6
6
|
*
|
|
7
7
|
* @summary Group a series of buttons together on a single line with the button group, and super-power.
|
|
8
8
|
|
|
9
9
|
* @example
|
|
10
10
|
* ```html
|
|
11
|
-
* <button-group>
|
|
12
|
-
* <icon-button name="home"></icon-button>
|
|
13
|
-
* <icon-button name="alarm"></icon-button>
|
|
14
|
-
* </button-group>
|
|
11
|
+
* <wc-button-group>
|
|
12
|
+
* <wc-icon-button name="home"></wc-icon-button>
|
|
13
|
+
* <wc-icon-button name="alarm"></wc-icon-button>
|
|
14
|
+
* </wc-button-group>
|
|
15
15
|
* ```
|
|
16
16
|
*
|
|
17
17
|
* @tags controls
|
|
@@ -2,7 +2,7 @@ import { BaseButton } from '../BaseButton.js';
|
|
|
2
2
|
import { IconProvider } from '../../icon/icon.js';
|
|
3
3
|
/**
|
|
4
4
|
* @label Icon Button
|
|
5
|
-
* @tag icon-button
|
|
5
|
+
* @tag wc-icon-button
|
|
6
6
|
* @rawTag icon-button
|
|
7
7
|
*
|
|
8
8
|
* @summary Icon buttons allow users to take actions, and make choices, with a single tap.
|
|
@@ -39,7 +39,7 @@ import { IconProvider } from '../../icon/icon.js';
|
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
41
|
* ```html
|
|
42
|
-
* <icon-button name="home"></icon-button>
|
|
42
|
+
* <wc-icon-button name="home"></wc-icon-button>
|
|
43
43
|
* ```
|
|
44
44
|
* @tags display
|
|
45
45
|
*/
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
export type ChartDonutColor = {
|
|
3
|
+
color: string;
|
|
4
|
+
};
|
|
5
|
+
export type ChartDonutItem = {
|
|
6
|
+
name: string;
|
|
7
|
+
value: number;
|
|
8
|
+
label?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @label Chart Donut
|
|
13
|
+
* @tag wc-chart-donut
|
|
14
|
+
* @rawTag chart-donut
|
|
15
|
+
* @summary A donut chart is a circular chart with a blank center. The area in the center can be used to display information.
|
|
16
|
+
* @tags charts
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <wc-chart-donut width="400" label="Total"></wc-chart-donut>
|
|
21
|
+
* <script>
|
|
22
|
+
* document.querySelector('wc-chart-donut').data = [
|
|
23
|
+
* { name: 'A', value: 30, label: 'Category A' },
|
|
24
|
+
* { name: 'B', value: 50, label: 'Category B' },
|
|
25
|
+
* { name: 'C', value: 20, label: 'Category C' },
|
|
26
|
+
* ];
|
|
27
|
+
* </script>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare class ChartDonut extends LitElement {
|
|
31
|
+
static styles: import("lit").CSSResultGroup[];
|
|
32
|
+
private svgElement?;
|
|
33
|
+
/** Width (and height) of the chart in pixels. */
|
|
34
|
+
width: number;
|
|
35
|
+
/** Margin around the chart. */
|
|
36
|
+
margin: number;
|
|
37
|
+
/** Whether to show labels outside the chart. */
|
|
38
|
+
showLabels: boolean;
|
|
39
|
+
/** Chart data array. Each item should have name, value, and optional label and color. */
|
|
40
|
+
data: ChartDonutItem[];
|
|
41
|
+
/** Label displayed in the center of the donut. */
|
|
42
|
+
label?: string;
|
|
43
|
+
private _initialized;
|
|
44
|
+
private _debouncedRenderChart;
|
|
45
|
+
firstUpdated(): void;
|
|
46
|
+
updated(changedProperties: PropertyValues): void;
|
|
47
|
+
private _getRadius;
|
|
48
|
+
private _getTotal;
|
|
49
|
+
private _getPieData;
|
|
50
|
+
private _getColorScale;
|
|
51
|
+
private _renderChart;
|
|
52
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChartDonut } from './chart-donut.js';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
export type ChartDoughnutColor = {
|
|
3
|
+
color: string;
|
|
4
|
+
};
|
|
5
|
+
export type ChartDoughnutItem = {
|
|
6
|
+
name: string;
|
|
7
|
+
value: number;
|
|
8
|
+
label?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @label Chart Doughnut
|
|
13
|
+
* @tag wc-chart-doughnut
|
|
14
|
+
* @rawTag chart-doughnut
|
|
15
|
+
* @summary A doughnut chart is a circular chart with a blank center. The area in the center can be used to display information.
|
|
16
|
+
* @tags charts
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <wc-chart-doughnut width="400" label="Total"></wc-chart-doughnut>
|
|
21
|
+
* <script>
|
|
22
|
+
* document.querySelector('wc-chart-doughnut').data = [
|
|
23
|
+
* { name: 'A', value: 30, label: 'Category A' },
|
|
24
|
+
* { name: 'B', value: 50, label: 'Category B' },
|
|
25
|
+
* { name: 'C', value: 20, label: 'Category C' },
|
|
26
|
+
* ];
|
|
27
|
+
* </script>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare class ChartDoughnut extends LitElement {
|
|
31
|
+
static styles: import("lit").CSSResultGroup[];
|
|
32
|
+
private svgElement?;
|
|
33
|
+
/** Width (and height) of the chart in pixels. */
|
|
34
|
+
width: number;
|
|
35
|
+
/** Margin around the chart. */
|
|
36
|
+
margin: number;
|
|
37
|
+
/** Whether to show labels outside the chart. */
|
|
38
|
+
showLabels: boolean;
|
|
39
|
+
/** Chart data array. Each item should have name, value, and optional label and color. */
|
|
40
|
+
data: ChartDoughnutItem[];
|
|
41
|
+
/** Label displayed in the center of the doughnut. */
|
|
42
|
+
label?: string;
|
|
43
|
+
private _initialized;
|
|
44
|
+
private _debouncedRenderChart;
|
|
45
|
+
firstUpdated(): void;
|
|
46
|
+
updated(changedProperties: PropertyValues): void;
|
|
47
|
+
private _getRadius;
|
|
48
|
+
private _getTotal;
|
|
49
|
+
private _getPieData;
|
|
50
|
+
private _getColorScale;
|
|
51
|
+
private _renderChart;
|
|
52
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChartDoughnut } from './chart-doughnut.js';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
export type ChartPieColor = {
|
|
3
|
+
color: string;
|
|
4
|
+
};
|
|
5
|
+
export type ChartPieItem = {
|
|
6
|
+
name: string;
|
|
7
|
+
value: number;
|
|
8
|
+
label?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @label Chart Pie
|
|
13
|
+
* @tag wc-chart-pie
|
|
14
|
+
* @rawTag chart-pie
|
|
15
|
+
* @summary A pie chart is a circular statistical graphic that visually represents numerical proportions.
|
|
16
|
+
* @tags charts
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <wc-chart-pie width="400"></wc-chart-pie>
|
|
21
|
+
* <script>
|
|
22
|
+
* document.querySelector('wc-chart-pie').data = [
|
|
23
|
+
* { name: 'A', value: 30, label: 'Category A' },
|
|
24
|
+
* { name: 'B', value: 50, label: 'Category B' },
|
|
25
|
+
* { name: 'C', value: 20, label: 'Category C' },
|
|
26
|
+
* ];
|
|
27
|
+
* </script>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare class ChartPie extends LitElement {
|
|
31
|
+
static styles: import("lit").CSSResultGroup[];
|
|
32
|
+
private svgElement?;
|
|
33
|
+
/** Width (and height) of the chart in pixels. */
|
|
34
|
+
width: number;
|
|
35
|
+
/** Margin around the chart. */
|
|
36
|
+
margin: number;
|
|
37
|
+
/** Whether to show labels outside the chart. */
|
|
38
|
+
showLabels: boolean;
|
|
39
|
+
/** Chart data array. Each item should have name, value, and optional label and color. */
|
|
40
|
+
data: ChartPieItem[];
|
|
41
|
+
private _initialized;
|
|
42
|
+
private _debouncedRenderChart;
|
|
43
|
+
firstUpdated(): void;
|
|
44
|
+
updated(changedProperties: PropertyValues): void;
|
|
45
|
+
private _getRadius;
|
|
46
|
+
private _getPieData;
|
|
47
|
+
private _getColorScale;
|
|
48
|
+
private _renderChart;
|
|
49
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChartPie } from './chart-pie.js';
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* @label Checkbox
|
|
4
|
-
* @tag
|
|
4
|
+
* @tag wc-checkbox
|
|
5
5
|
* @rawTag checkbox
|
|
6
|
-
*
|
|
7
6
|
* @summary Captures boolean input with an optional indeterminate mode.
|
|
8
7
|
* @overview
|
|
9
8
|
* <p>Checkboxes allow users to select one or more items from a set. Checkboxes can turn an option on or off.</p>
|
|
10
9
|
* <p>Material Design 3 checkboxes feature a smooth animation and clear visual states for checked, unchecked, and indeterminate.</p>
|
|
11
|
-
*
|
|
12
10
|
* @cssprop --checkbox-size: Size of the checkbox container.
|
|
13
11
|
* @cssprop --checkbox-selected-color: Color of the checkbox when selected.
|
|
14
12
|
* @cssprop --checkbox-unselected-color: Color of the checkbox border when unselected.
|
|
15
13
|
* @cssprop --checkbox-checkmark-color: Color of the checkmark icon.
|
|
16
14
|
* @cssprop --checkbox-state-layer-size: Size of the state layer for touch target.
|
|
17
|
-
*
|
|
18
15
|
* @fires {CustomEvent} change - Dispatched when the checkbox value changes.
|
|
19
16
|
* @fires {CustomEvent} blur - Dispatched when the checkbox loses focus.
|
|
20
17
|
* @fires {CustomEvent} focus - Dispatched when the checkbox receives focus.
|
|
18
|
+
* @tags input, form
|
|
21
19
|
*
|
|
22
20
|
* @example
|
|
23
21
|
* ```html
|
|
24
|
-
* <
|
|
22
|
+
* <wc-checkbox label="Accept terms"></wc-checkbox>
|
|
25
23
|
* ```
|
|
26
|
-
* @tags input, form
|
|
27
24
|
*/
|
|
28
25
|
export declare class Checkbox extends LitElement {
|
|
29
26
|
static styles: import("lit").CSSResultGroup[];
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* @label Chip
|
|
4
|
-
* @tag
|
|
4
|
+
* @tag wc-chip
|
|
5
5
|
* @rawTag chip
|
|
6
|
-
* @summary
|
|
6
|
+
* @summary Chip component for displaying compact information with optional actions.
|
|
7
|
+
* @tags display
|
|
7
8
|
*
|
|
8
9
|
* @example
|
|
9
10
|
* ```html
|
|
10
|
-
* <
|
|
11
|
+
* <wc-chip>Chip content</wc-chip>
|
|
11
12
|
* ```
|
|
12
|
-
* @tags display
|
|
13
13
|
*/
|
|
14
14
|
export declare class Chip extends LitElement {
|
|
15
15
|
static styles: import("lit").CSSResultGroup[];
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* @label Tag
|
|
4
|
-
* @tag
|
|
4
|
+
* @tag wc-tag
|
|
5
5
|
* @rawTag tag
|
|
6
6
|
* @summary Tag component for displaying labels or values with optional dismiss functionality.
|
|
7
|
+
* @tags display
|
|
7
8
|
*
|
|
8
9
|
* @example
|
|
9
10
|
* ```html
|
|
10
|
-
* <
|
|
11
|
+
* <wc-tag color="red">Tag</wc-tag>
|
|
11
12
|
* ```
|
|
12
|
-
* @tags display
|
|
13
13
|
*/
|
|
14
14
|
export declare class Tag extends LitElement {
|
|
15
15
|
static styles: import("lit").CSSResultGroup[];
|
|
@@ -2,19 +2,18 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
import { ClockController } from './ClockController.js';
|
|
3
3
|
/**
|
|
4
4
|
* @label Clock
|
|
5
|
-
* @tag
|
|
5
|
+
* @tag wc-clock
|
|
6
6
|
* @rawTag clock
|
|
7
|
-
*
|
|
8
7
|
* @summary Displays the current time in a given timezone.
|
|
9
8
|
* @overview
|
|
10
9
|
* - Clocks are used to display the current time in a specified timezone.
|
|
11
10
|
* - They can be displayed in various formats, including 12-hour and 24-hour time.
|
|
11
|
+
* @tags display
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```html
|
|
15
|
-
* <
|
|
15
|
+
* <wc-clock></wc-clock>
|
|
16
16
|
* ```
|
|
17
|
-
* @tags display
|
|
18
17
|
*/
|
|
19
18
|
export declare class Clock extends LitElement {
|
|
20
19
|
static styles: import("lit").CSSResultGroup[];
|
|
@@ -4,20 +4,22 @@ import BaseInput from '../input/BaseInput.js';
|
|
|
4
4
|
* @tag code-editor
|
|
5
5
|
* @rawTag code-editor
|
|
6
6
|
*
|
|
7
|
-
* @summary
|
|
7
|
+
* @summary A Monaco-based code editing component with syntax highlighting and theming.
|
|
8
8
|
* @overview
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
9
|
+
* - CodeEditor wraps Monaco Editor as a web component.
|
|
10
|
+
* - Supports JS/JSON/HTML languages, read-only mode, line numbers, minimap, and dark/light theme.
|
|
11
|
+
* - Emits `change` when content is edited and updates value from property changes.
|
|
11
12
|
*
|
|
12
13
|
* @example
|
|
13
14
|
* ```html
|
|
14
|
-
* <code-
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* <code-editor
|
|
16
|
+
* language="javascript"
|
|
17
|
+
* value="function hello() { console.log('Hello'); }"
|
|
18
|
+
* lineNumbers="on"
|
|
19
|
+
* minimap="false">
|
|
20
|
+
* </code-editor>
|
|
19
21
|
* ```
|
|
20
|
-
* @tags
|
|
22
|
+
* @tags input, editor
|
|
21
23
|
*/
|
|
22
24
|
export default class CodeEditor extends BaseInput {
|
|
23
25
|
static styles: import("lit").CSSResultGroup[];
|
|
@@ -2,22 +2,17 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
type ContainerSize = 'max' | 'xl' | 'lg' | 'md' | 'sm' | 'full';
|
|
3
3
|
/**
|
|
4
4
|
* @label Container
|
|
5
|
-
* @tag
|
|
5
|
+
* @tag wc-container
|
|
6
6
|
* @rawTag container
|
|
7
|
-
* @summary
|
|
8
|
-
*
|
|
9
|
-
* @cssprop --
|
|
10
|
-
* @
|
|
11
|
-
* @cssprop --avatar-size - Controls the size of the avatar.
|
|
12
|
-
* @cssprop --avatar-text-color - Controls the color of the text inside the avatar.
|
|
13
|
-
*
|
|
7
|
+
* @summary A responsive container component for layout.
|
|
8
|
+
* @cssprop --container-max-width - Controls the maximum width of the container.
|
|
9
|
+
* @cssprop --container-padding - Controls the padding of the container.
|
|
10
|
+
* @tags layout
|
|
14
11
|
*
|
|
15
12
|
* @example
|
|
16
13
|
* ```html
|
|
17
|
-
* <
|
|
14
|
+
* <wc-container size="lg">Content</wc-container>
|
|
18
15
|
* ```
|
|
19
|
-
*
|
|
20
|
-
* @tags display
|
|
21
16
|
*/
|
|
22
17
|
export declare class Container extends LitElement {
|
|
23
18
|
size: ContainerSize;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import BaseInput from '../input/BaseInput.js';
|
|
2
2
|
/**
|
|
3
3
|
* @label Date Picker
|
|
4
|
-
* @tag date-picker
|
|
4
|
+
* @tag wc-date-picker
|
|
5
5
|
* @rawTag date-picker
|
|
6
|
-
*
|
|
7
6
|
* @summary The Date Picker component is used to capture date user input.
|
|
7
|
+
* @tags input
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```html
|
|
11
|
-
* <date-picker label="
|
|
11
|
+
* <wc-date-picker label="Date" placeholder="Select a date"></wc-date-picker>
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
14
|
export declare class DatePicker extends BaseInput {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* @label Divider
|
|
4
|
-
* @tag
|
|
4
|
+
* @tag wc-divider
|
|
5
5
|
* @rawTag divider
|
|
6
6
|
*
|
|
7
7
|
* @summary The divider component is used to visually separate content.
|
|
@@ -14,7 +14,7 @@ import { LitElement } from 'lit';
|
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
16
|
* ```html
|
|
17
|
-
* <
|
|
17
|
+
* <wc-divider style="width: 12rem;">or</wc-divider>
|
|
18
18
|
* ```
|
|
19
19
|
* @tags display
|
|
20
20
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* @label Elevation
|
|
4
|
-
* @tag
|
|
4
|
+
* @tag wc-elevation
|
|
5
5
|
* @rawTag elevation
|
|
6
6
|
*
|
|
7
7
|
* @summary Adds elevation to an element.
|
|
@@ -15,7 +15,7 @@ import { LitElement } from 'lit';
|
|
|
15
15
|
* @example
|
|
16
16
|
* ```html
|
|
17
17
|
* <div style="position: relative; padding: var(--spacing-200);">
|
|
18
|
-
* <
|
|
18
|
+
* <wc-elevation style='--elevation-level: 2; --elevation-container-shape: var(--shape-corner-extra-small);'></wc-elevation>
|
|
19
19
|
* Level 2
|
|
20
20
|
* </div>
|
|
21
21
|
* ```
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { LitElement, nothing } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* @label Empty State
|
|
4
|
-
* @
|
|
5
|
-
* @
|
|
4
|
+
* @tag wc-empty-state
|
|
5
|
+
* @rawTag empty-state
|
|
6
|
+
* @summary A message that displays when there is no information to display.
|
|
7
|
+
* @tags display
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```html
|
|
11
|
+
* <wc-empty-state headline="No items found"></wc-empty-state>
|
|
12
|
+
* ```
|
|
6
13
|
*/
|
|
7
14
|
export declare class EmptyState extends LitElement {
|
|
8
15
|
static styles: import("lit").CSSResultGroup[];
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import { LitElement, nothing } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @label Field
|
|
4
|
+
* @tag wc-field
|
|
5
|
+
* @rawTag field
|
|
6
|
+
*
|
|
7
|
+
* @summary Wrapper for form fields with label and help text.
|
|
8
|
+
* @overview
|
|
9
|
+
* <p>Field provides consistent styling and behavior for form inputs.</p>
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```html
|
|
13
|
+
* <wc-field label="Name" required>
|
|
14
|
+
* some text
|
|
15
|
+
* </wc-field>
|
|
16
|
+
* ```
|
|
17
|
+
* @tags form
|
|
18
|
+
*/
|
|
2
19
|
export declare class Field extends LitElement {
|
|
3
20
|
static styles: import("lit").CSSResultGroup[];
|
|
4
21
|
label: string;
|
package/dist/src/icon/icon.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
export type IconProvider = 'material-symbols' | 'material-icons';
|
|
3
3
|
/**
|
|
4
4
|
* @label Icon
|
|
5
|
-
* @tag
|
|
5
|
+
* @tag wc-icon
|
|
6
6
|
* @rawTag icon
|
|
7
7
|
* @summary Icons are visual symbols used to represent ideas, objects, or actions.
|
|
8
8
|
* @overview Icons are visual symbols used to represent ideas, objects, or actions. They communicate messages at a glance, afford interactivity, and draw attention to important information.
|
|
@@ -12,7 +12,7 @@ export type IconProvider = 'material-symbols' | 'material-icons';
|
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```html
|
|
15
|
-
* <
|
|
15
|
+
* <wc-icon name="home" style="--icon-size: 2rem;"></wc-icon>
|
|
16
16
|
* ```
|
|
17
17
|
*
|
|
18
18
|
*/
|