@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
|
@@ -5,15 +5,15 @@ import styles from './accordion-item.scss';
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @label Accordion Item
|
|
8
|
-
* @tag accordion-item
|
|
9
|
-
* @rawTag accordion
|
|
8
|
+
* @tag wc-accordion-item
|
|
9
|
+
* @rawTag accordion-item
|
|
10
10
|
* @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.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```html
|
|
14
|
-
* <
|
|
14
|
+
* <wc-accordion-item>
|
|
15
15
|
* Testing
|
|
16
|
-
* </accordion-item>
|
|
16
|
+
* </wc-accordion-item>
|
|
17
17
|
* ```
|
|
18
18
|
* @tags display
|
|
19
19
|
*/
|
|
@@ -80,7 +80,7 @@ export class AccordionItem extends LitElement {
|
|
|
80
80
|
@click=${this.__handleToggle}
|
|
81
81
|
aria-expanded=${this.open}
|
|
82
82
|
>
|
|
83
|
-
<
|
|
83
|
+
<wc-icon class="accordion-icon" name="keyboard_arrow_down"></wc-icon>
|
|
84
84
|
<div part="title" class="accordion-title">
|
|
85
85
|
<slot name="heading">${this.heading}</slot>
|
|
86
86
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '
|
|
1
|
+
@use '../../scss/mixin';
|
|
2
2
|
|
|
3
3
|
@include mixin.base-styles;
|
|
4
4
|
|
|
@@ -11,5 +11,6 @@ slot::slotted(:not(:last-child)) {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
slot::slotted(:last-child) {
|
|
14
|
+
border-block-start: 1px solid var(--color-outline);
|
|
14
15
|
border-block-end: 1px solid var(--color-outline);
|
|
15
16
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { html, LitElement } from 'lit';
|
|
2
2
|
import { property, queryAssignedElements } from 'lit/decorators.js';
|
|
3
3
|
import styles from './accordion.scss';
|
|
4
|
-
import { AccordionItem } from '
|
|
4
|
+
import { AccordionItem } from './accordion-item.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @label Accordion
|
|
8
|
-
* @tag
|
|
8
|
+
* @tag wc-accordion
|
|
9
9
|
* @rawTag accordion
|
|
10
10
|
* @summary An accordion is a vertically stacked list of headers that reveal or hide associated sections of content.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```html
|
|
14
|
-
* <
|
|
15
|
-
* <accordion-item heading="Accordion">
|
|
14
|
+
* <wc-accordion>
|
|
15
|
+
* <wc-accordion-item heading="Accordion">
|
|
16
16
|
* Content
|
|
17
|
-
* </accordion-item>
|
|
18
|
-
* </
|
|
17
|
+
* </wc-accordion-item>
|
|
18
|
+
* </wc-accordion>
|
|
19
19
|
* ```
|
|
20
20
|
* @tags display
|
|
21
21
|
*/
|
package/src/avatar/avatar.ts
CHANGED
|
@@ -5,7 +5,7 @@ import styles from './avatar.scss';
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @label Avatar
|
|
8
|
-
* @tag
|
|
8
|
+
* @tag wc-avatar
|
|
9
9
|
* @rawTag avatar
|
|
10
10
|
* @summary The Avatar component is used to represent user, and displays the profile picture, initials or fallback icon.
|
|
11
11
|
*
|
|
@@ -17,7 +17,7 @@ import styles from './avatar.scss';
|
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* ```html
|
|
20
|
-
* <
|
|
20
|
+
* <wc-avatar name="Shivaji Varma" src="https://peacock.redvars.com/assets/img/avatar.xs.webp" style='--avatar-size: 4rem'></wc-avatar>
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
23
23
|
* @tags display
|
package/src/badge/badge.ts
CHANGED
|
@@ -5,7 +5,7 @@ import styles from './badge.scss';
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @label Badge
|
|
8
|
-
* @tag
|
|
8
|
+
* @tag wc-badge
|
|
9
9
|
* @rawTag badge
|
|
10
10
|
* @summary The badge component is used to display a small amount of information to the user.
|
|
11
11
|
*
|
|
@@ -13,7 +13,7 @@ import styles from './badge.scss';
|
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```html
|
|
16
|
-
* <
|
|
16
|
+
* <wc-badge value="1"></wc-badge>
|
|
17
17
|
* ```
|
|
18
18
|
* @tags display
|
|
19
19
|
*/
|
|
@@ -4,24 +4,23 @@ import styles from './breadcrumb.scss';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @label Breadcrumb
|
|
7
|
-
* @tag
|
|
7
|
+
* @tag wc-breadcrumb
|
|
8
8
|
* @rawTag breadcrumb
|
|
9
|
-
*
|
|
10
9
|
* @summary A breadcrumb is a secondary navigation scheme that reveals the user's location in a website or web application.
|
|
11
10
|
* @overview
|
|
12
11
|
* - Breadcrumbs provide a trail for users to follow back to the starting or entry point.
|
|
13
12
|
* - They help users understand their current location within the site hierarchy.
|
|
14
13
|
* - Follows WCAG 2.1 guidelines for accessible navigation landmarks.
|
|
14
|
+
* @tags navigation
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```html
|
|
18
|
-
* <
|
|
19
|
-
* <breadcrumb-item href="#">Home</breadcrumb-item>
|
|
20
|
-
* <breadcrumb-item href="#">Category</breadcrumb-item>
|
|
21
|
-
* <breadcrumb-item active>Current Page</breadcrumb-item>
|
|
22
|
-
* </
|
|
18
|
+
* <wc-breadcrumb label="Breadcrumb">
|
|
19
|
+
* <wc-breadcrumb-item href="#">Home</wc-breadcrumb-item>
|
|
20
|
+
* <wc-breadcrumb-item href="#">Category</wc-breadcrumb-item>
|
|
21
|
+
* <wc-breadcrumb-item active>Current Page</wc-breadcrumb-item>
|
|
22
|
+
* </wc-breadcrumb>
|
|
23
23
|
* ```
|
|
24
|
-
* @tags navigation
|
|
25
24
|
*/
|
|
26
25
|
export class Breadcrumb extends LitElement {
|
|
27
26
|
static styles = [styles];
|
|
@@ -6,15 +6,15 @@ import styles from './breadcrumb-item.scss';
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @label Breadcrumb Item
|
|
9
|
-
* @tag breadcrumb-item
|
|
9
|
+
* @tag wc-breadcrumb-item
|
|
10
10
|
* @rawTag breadcrumb-item
|
|
11
11
|
* @summary A breadcrumb item component that represents a single item in a breadcrumb navigation.
|
|
12
|
+
* @tags navigation
|
|
12
13
|
*
|
|
13
14
|
* @example
|
|
14
15
|
* ```html
|
|
15
|
-
* <breadcrumb-item href="#">Home</breadcrumb-item>
|
|
16
|
+
* <wc-breadcrumb-item href="#">Home</wc-breadcrumb-item>
|
|
16
17
|
* ```
|
|
17
|
-
* @tags navigation
|
|
18
18
|
*/
|
|
19
19
|
export class BreadcrumbItem extends LitElement {
|
|
20
20
|
static styles = [styles];
|
package/src/button/BaseButton.ts
CHANGED
|
@@ -199,7 +199,7 @@ export class BaseButton extends LitElement {
|
|
|
199
199
|
|
|
200
200
|
__renderTooltip() {
|
|
201
201
|
if (this.tooltip) {
|
|
202
|
-
return html`<
|
|
202
|
+
return html`<wc-tooltip for="button">${this.tooltip}</wc-tooltip>`;
|
|
203
203
|
}
|
|
204
204
|
return nothing;
|
|
205
205
|
}
|
|
@@ -30,7 +30,7 @@ slot::slotted(*) {
|
|
|
30
30
|
/*
|
|
31
31
|
* Reset native button/link styles
|
|
32
32
|
*/
|
|
33
|
-
.button
|
|
33
|
+
.button-element {
|
|
34
34
|
background: transparent;
|
|
35
35
|
border: none;
|
|
36
36
|
appearance: none;
|
|
@@ -41,7 +41,7 @@ slot::slotted(*) {
|
|
|
41
41
|
|
|
42
42
|
.button {
|
|
43
43
|
position: relative;
|
|
44
|
-
display:
|
|
44
|
+
display: flex;
|
|
45
45
|
flex-direction: column;
|
|
46
46
|
align-items: center;
|
|
47
47
|
justify-content: center;
|
|
@@ -64,7 +64,8 @@ slot::slotted(*) {
|
|
|
64
64
|
justify-content: center;
|
|
65
65
|
gap: var(--_button-icon-label-spacing);
|
|
66
66
|
width: 100%;
|
|
67
|
-
|
|
67
|
+
height: 100%;
|
|
68
|
+
z-index: 0;
|
|
68
69
|
|
|
69
70
|
color: var(--_label-text-color);
|
|
70
71
|
opacity: var(--_label-text-opacity, 1);
|
|
@@ -158,23 +159,6 @@ slot::slotted(*) {
|
|
|
158
159
|
height: 100%;
|
|
159
160
|
pointer-events: none;
|
|
160
161
|
transform: translateX(0.25rem) translateY(0.25rem);
|
|
161
|
-
|
|
162
|
-
&:before {
|
|
163
|
-
z-index: 0;
|
|
164
|
-
content: "";
|
|
165
|
-
position: absolute;
|
|
166
|
-
pointer-events: none;
|
|
167
|
-
border-start-start-radius: var(--_container-shape-start-start);
|
|
168
|
-
border-start-end-radius: var(--_container-shape-start-end);
|
|
169
|
-
border-end-start-radius: var(--_container-shape-end-start);
|
|
170
|
-
border-end-end-radius: var(--_container-shape-end-end);
|
|
171
|
-
corner-shape: var(--_container-corner-shape-variant);
|
|
172
|
-
width: 100%;
|
|
173
|
-
height: 100%;
|
|
174
|
-
background: white;
|
|
175
|
-
left: 0;
|
|
176
|
-
transform: translateX(-0.25rem) translateY(-0.25rem);
|
|
177
|
-
}
|
|
178
162
|
}
|
|
179
163
|
|
|
180
164
|
.outline {
|
|
@@ -395,17 +379,19 @@ slot::slotted(*) {
|
|
|
395
379
|
display: block;
|
|
396
380
|
}
|
|
397
381
|
|
|
382
|
+
.focus-ring {
|
|
383
|
+
--focus-ring-color: var(--color-primary-container);
|
|
384
|
+
--focus-ring-inset: -2px;
|
|
385
|
+
}
|
|
386
|
+
|
|
398
387
|
.ripple {
|
|
399
388
|
display: none;
|
|
400
389
|
}
|
|
401
390
|
|
|
402
391
|
&.pressed:not(:where(.disabled, .soft-disabled, .show-skeleton)) {
|
|
403
|
-
.background, .button-content, .outline {
|
|
392
|
+
.background, .button-content, .outline, .focus-ring {
|
|
404
393
|
transform: translateX(0.25rem) translateY(0.25rem);
|
|
405
394
|
}
|
|
406
|
-
.neo-background:before {
|
|
407
|
-
transform: translateX(0) translateY(0);
|
|
408
|
-
}
|
|
409
395
|
}
|
|
410
396
|
|
|
411
397
|
&.disabled {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
2
|
import { property, state } from 'lit/decorators.js';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
-
import
|
|
4
|
+
import IndividualComponent from 'src/IndividualComponent.js';
|
|
5
5
|
import styles from './button.scss';
|
|
6
6
|
import colorStyles from './button-colors.scss';
|
|
7
7
|
import sizeStyles from './button-sizes.scss';
|
|
@@ -11,7 +11,7 @@ import { BaseButton } from '../BaseButton.js';
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @label Button
|
|
14
|
-
* @tag
|
|
14
|
+
* @tag wc-button
|
|
15
15
|
* @rawTag button
|
|
16
16
|
*
|
|
17
17
|
* @summary Buttons help people initiate actions, from sending an email, to sharing a document, to liking a post.
|
|
@@ -47,11 +47,11 @@ import { BaseButton } from '../BaseButton.js';
|
|
|
47
47
|
*
|
|
48
48
|
* @example
|
|
49
49
|
* ```html
|
|
50
|
-
* <
|
|
50
|
+
* <wc-button>Button</wc-button>
|
|
51
51
|
* ```
|
|
52
52
|
* @tags display
|
|
53
53
|
*/
|
|
54
|
-
@
|
|
54
|
+
@IndividualComponent
|
|
55
55
|
export class Button extends BaseButton {
|
|
56
56
|
static override styles = [styles, colorStyles, sizeStyles];
|
|
57
57
|
|
|
@@ -138,13 +138,13 @@ export class Button extends BaseButton {
|
|
|
138
138
|
|
|
139
139
|
renderButtonContent() {
|
|
140
140
|
return html`
|
|
141
|
-
<focus-ring class="focus-ring" .control=${this} element="buttonElement"></focus-ring>
|
|
142
|
-
<
|
|
141
|
+
<wc-focus-ring class="focus-ring" .control=${this} element="buttonElement"></wc-focus-ring>
|
|
142
|
+
<wc-elevation class="elevation"></wc-elevation>
|
|
143
143
|
<div class="neo-background"></div>
|
|
144
144
|
<div class="background"></div>
|
|
145
145
|
<div class="outline"></div>
|
|
146
|
-
<
|
|
147
|
-
<
|
|
146
|
+
<wc-ripple class="ripple"></wc-ripple>
|
|
147
|
+
<wc-skeleton class="skeleton"></wc-skeleton>
|
|
148
148
|
|
|
149
149
|
<div class="button-content">
|
|
150
150
|
<div class="slot-container">
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { html, LitElement } from 'lit';
|
|
2
2
|
import { property } from 'lit/decorators.js';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
-
import
|
|
4
|
+
import IndividualComponent from 'src/IndividualComponent.js';
|
|
5
5
|
import styles from './button-group.scss';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @label Button Group
|
|
9
|
-
* @tag button-group
|
|
9
|
+
* @tag wc-button-group
|
|
10
10
|
* @rawTag button-group
|
|
11
11
|
*
|
|
12
12
|
* @summary Group a series of buttons together on a single line with the button group, and super-power.
|
|
13
13
|
|
|
14
14
|
* @example
|
|
15
15
|
* ```html
|
|
16
|
-
* <button-group>
|
|
17
|
-
* <icon-button name="home"></icon-button>
|
|
18
|
-
* <icon-button name="alarm"></icon-button>
|
|
19
|
-
* </button-group>
|
|
16
|
+
* <wc-button-group>
|
|
17
|
+
* <wc-icon-button name="home"></wc-icon-button>
|
|
18
|
+
* <wc-icon-button name="alarm"></wc-icon-button>
|
|
19
|
+
* </wc-button-group>
|
|
20
20
|
* ```
|
|
21
21
|
*
|
|
22
22
|
* @tags controls
|
|
23
23
|
*/
|
|
24
|
-
@
|
|
24
|
+
@IndividualComponent
|
|
25
25
|
export class ButtonGroup extends LitElement {
|
|
26
26
|
// Lit prefers CSS-in-JS for better performance and scoping.
|
|
27
27
|
// If you prefer keeping the SCSS file, you'll need a build tool (like Vite or Webpack)
|
|
@@ -11,7 +11,7 @@ import { throttle } from '../../utils.js';
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @label Icon Button
|
|
14
|
-
* @tag icon-button
|
|
14
|
+
* @tag wc-icon-button
|
|
15
15
|
* @rawTag icon-button
|
|
16
16
|
*
|
|
17
17
|
* @summary Icon buttons allow users to take actions, and make choices, with a single tap.
|
|
@@ -48,7 +48,7 @@ import { throttle } from '../../utils.js';
|
|
|
48
48
|
*
|
|
49
49
|
* @example
|
|
50
50
|
* ```html
|
|
51
|
-
* <icon-button name="home"></icon-button>
|
|
51
|
+
* <wc-icon-button name="home"></wc-icon-button>
|
|
52
52
|
* ```
|
|
53
53
|
* @tags display
|
|
54
54
|
*/
|
|
@@ -133,20 +133,20 @@ export class IconButton extends BaseButton {
|
|
|
133
133
|
|
|
134
134
|
renderButtonContent() {
|
|
135
135
|
return html`
|
|
136
|
-
<focus-ring class="focus-ring" .control=${this} element="buttonElement"></focus-ring>
|
|
137
|
-
<
|
|
136
|
+
<wc-focus-ring class="focus-ring" .control=${this} element="buttonElement"></wc-focus-ring>
|
|
137
|
+
<wc-elevation class="elevation"></wc-elevation>
|
|
138
138
|
<div class="neo-background"></div>
|
|
139
139
|
<div class="background"></div>
|
|
140
140
|
<div class="outline"></div>
|
|
141
|
-
<
|
|
142
|
-
<
|
|
141
|
+
<wc-ripple class="ripple"></wc-ripple>
|
|
142
|
+
<wc-skeleton class="skeleton"></wc-skeleton>
|
|
143
143
|
|
|
144
144
|
<div class="button-content">
|
|
145
|
-
<
|
|
145
|
+
<wc-icon
|
|
146
146
|
name=${this.name}
|
|
147
147
|
src=${this.src}
|
|
148
148
|
provider=${this.provider}
|
|
149
|
-
></
|
|
149
|
+
></wc-icon>
|
|
150
150
|
</div>
|
|
151
151
|
|
|
152
152
|
${this.__renderDisabledReason()}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@use '../../scss/mixin';
|
|
2
|
+
|
|
3
|
+
@include mixin.base-styles;
|
|
4
|
+
|
|
5
|
+
:host {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.title {
|
|
10
|
+
@include mixin.get-typography('title-large-emphasized');
|
|
11
|
+
fill: var(--color-on-surface);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.label {
|
|
15
|
+
@include mixin.get-typography('title-medium');
|
|
16
|
+
fill: var(--color-on-surface);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.arc {
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
transition: filter 150ms ease;
|
|
22
|
+
|
|
23
|
+
&:hover {
|
|
24
|
+
filter: brightness(1.2);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.item-polyline {
|
|
29
|
+
fill: none;
|
|
30
|
+
stroke-width: 1;
|
|
31
|
+
stroke: var(--color-on-surface);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.item-label {
|
|
35
|
+
fill: var(--color-on-surface);
|
|
36
|
+
@include mixin.get-typography('label-medium');
|
|
37
|
+
}
|