@redvars/peacock 3.3.3 → 3.5.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/IndividualComponent-DUINtMGK.js +67 -0
- package/dist/IndividualComponent-DUINtMGK.js.map +1 -0
- package/dist/assets/images/empty-state/no-document.svg +11 -12
- package/dist/assets/images/empty-state/page.svg +15 -9
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles.css.map +1 -1
- package/dist/banner.js +202 -0
- package/dist/banner.js.map +1 -0
- package/dist/bottom-sheet.js +238 -0
- package/dist/bottom-sheet.js.map +1 -0
- package/dist/{button-ClzS8JLq.js → button-DMN1dPAg.js} +358 -218
- package/dist/button-DMN1dPAg.js.map +1 -0
- package/dist/button-group-CX9CUUXk.js +435 -0
- package/dist/button-group-CX9CUUXk.js.map +1 -0
- package/dist/button-group.js +11 -6
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +10 -5
- package/dist/button.js.map +1 -1
- package/dist/card-content.js +29 -0
- package/dist/card-content.js.map +1 -0
- package/dist/card.js +428 -44
- package/dist/card.js.map +1 -1
- package/dist/{chart-bar-DbnXQgvS.js → chart-bar-cn6rrna-.js} +2 -2
- package/dist/{chart-bar-DbnXQgvS.js.map → chart-bar-cn6rrna-.js.map} +1 -1
- package/dist/chart-bar.js +5 -4
- package/dist/chart-bar.js.map +1 -1
- package/dist/chart-doughnut.js +2 -1
- package/dist/chart-doughnut.js.map +1 -1
- package/dist/chart-pie.js +2 -1
- package/dist/chart-pie.js.map +1 -1
- package/dist/chart-stacked-bar.js +5 -4
- package/dist/chart-stacked-bar.js.map +1 -1
- package/dist/{class-map-59YGWLnx.js → class-map-YU7g0o3B.js} +4 -10
- package/dist/class-map-YU7g0o3B.js.map +1 -0
- package/dist/clock.js +2 -1
- package/dist/clock.js.map +1 -1
- package/dist/code-editor.js +8 -6
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +6 -4
- package/dist/code-highlighter.js.map +1 -1
- package/dist/custom-elements-jsdocs.json +6270 -5026
- package/dist/custom-elements.json +5763 -2049
- package/dist/directive-ZPhl09Yt.js +9 -0
- package/dist/directive-ZPhl09Yt.js.map +1 -0
- package/dist/dispatch-event-utils-CuEqjlPT.js +127 -0
- package/dist/dispatch-event-utils-CuEqjlPT.js.map +1 -0
- package/dist/fab-C5Nzxk0E.js +497 -0
- package/dist/fab-C5Nzxk0E.js.map +1 -0
- package/dist/fab.js +11 -0
- package/dist/fab.js.map +1 -0
- package/dist/index.js +24 -12
- package/dist/index.js.map +1 -1
- package/dist/{observe-theme-change-pALI5fmV.js → is-dark-mode-DicqGkCJ.js} +8 -3
- package/dist/is-dark-mode-DicqGkCJ.js.map +1 -0
- package/dist/notification.js +417 -0
- package/dist/notification.js.map +1 -0
- package/dist/number-counter.js +4 -3
- package/dist/number-counter.js.map +1 -1
- package/dist/observe-slot-change-BGJfgg2E.js +31 -0
- package/dist/observe-slot-change-BGJfgg2E.js.map +1 -0
- package/dist/peacock-loader.js +59 -10
- package/dist/peacock-loader.js.map +1 -1
- package/dist/property-1psGvXOq.js +10 -0
- package/dist/property-1psGvXOq.js.map +1 -0
- package/dist/search.js +452 -0
- package/dist/search.js.map +1 -0
- package/dist/{radio-b70_Ie9n.js → select-4pl4XBj7.js} +2439 -521
- package/dist/select-4pl4XBj7.js.map +1 -0
- package/dist/side-sheet.js +186 -0
- package/dist/side-sheet.js.map +1 -0
- package/dist/spread-B5cgadZl.js +32 -0
- package/dist/spread-B5cgadZl.js.map +1 -0
- package/dist/src/__base_element/BaseHyperlink.d.ts +20 -0
- package/dist/src/__utils/cache-fetch.d.ts +1 -0
- package/dist/src/__utils/is-dark-mode.d.ts +1 -0
- package/dist/src/__utils/is-in-viewport.d.ts +1 -0
- package/dist/src/__utils/observe-slot-change.d.ts +1 -0
- package/dist/src/__utils/sanitize-svg.d.ts +1 -0
- package/dist/src/__utils/throttle.d.ts +4 -0
- package/dist/src/accordion/accordion-item.d.ts +33 -9
- package/dist/src/accordion/accordion.d.ts +21 -5
- package/dist/src/banner/banner.d.ts +47 -0
- package/dist/src/banner/index.d.ts +1 -0
- package/dist/src/bottom-sheet/bottom-sheet.d.ts +42 -0
- package/dist/src/bottom-sheet/index.d.ts +1 -0
- package/dist/src/button/BaseButton.d.ts +7 -13
- package/dist/src/button/button/button.d.ts +4 -0
- package/dist/src/button/button-group/button-group.d.ts +32 -3
- package/dist/src/button/icon-button/icon-button.d.ts +4 -0
- package/dist/src/card/card-content.d.ts +15 -0
- package/dist/src/card/card.d.ts +37 -3
- package/dist/src/card/index.d.ts +1 -0
- package/dist/src/container/container.d.ts +1 -1
- package/dist/src/empty-state/empty-state.d.ts +1 -1
- package/dist/src/fab/fab.d.ts +111 -0
- package/dist/src/fab/index.d.ts +1 -0
- package/dist/src/focus-ring/focus-ring.d.ts +4 -1
- package/dist/src/index.d.ts +11 -1
- package/dist/src/link/link.d.ts +3 -10
- package/dist/src/menu/menu/menu.d.ts +4 -2
- package/dist/src/menu/menu-item/menu-item.d.ts +0 -1
- package/dist/src/menu/sub-menu/sub-menu.d.ts +1 -0
- package/dist/src/notification/index.d.ts +1 -0
- package/dist/src/notification/notification.d.ts +69 -0
- package/dist/src/pagination/pagination.d.ts +8 -1
- package/dist/src/ripple/ripple.d.ts +19 -3
- package/dist/src/search/index.d.ts +1 -0
- package/dist/src/search/search.d.ts +76 -0
- package/dist/src/segmented-button/index.d.ts +2 -0
- package/dist/src/segmented-button/segmented-button-group.d.ts +46 -0
- package/dist/src/segmented-button/segmented-button.d.ts +65 -0
- package/dist/src/select/index.d.ts +3 -0
- package/dist/src/select/option.d.ts +55 -0
- package/dist/src/select/select.d.ts +114 -0
- package/dist/src/side-sheet/index.d.ts +1 -0
- package/dist/src/side-sheet/side-sheet.d.ts +41 -0
- package/dist/src/slider/slider.d.ts +4 -0
- package/dist/src/snackbar/snackbar.d.ts +14 -1
- package/dist/src/tabs/tab-group.d.ts +0 -1
- package/dist/src/tabs/tab.d.ts +8 -2
- package/dist/src/tabs/tabs.d.ts +13 -1
- package/dist/src/toolbar/index.d.ts +1 -0
- package/dist/src/toolbar/toolbar.d.ts +86 -0
- package/dist/state-DwbEjqVk.js +10 -0
- package/dist/state-DwbEjqVk.js.map +1 -0
- package/dist/{style-map-DcB52w-l.js → style-map-DVmWOuYy.js} +3 -3
- package/dist/{style-map-DcB52w-l.js.map → style-map-DVmWOuYy.js.map} +1 -1
- package/dist/test/search.test.d.ts +1 -0
- package/dist/test/toolbar.test.d.ts +1 -0
- package/dist/throttle-C7ZAPqtu.js +24 -0
- package/dist/throttle-C7ZAPqtu.js.map +1 -0
- package/dist/toolbar.js +306 -0
- package/dist/toolbar.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{unsafe-html-C2r3PyzF.js → unsafe-html-BsGUjx94.js} +3 -3
- package/dist/{unsafe-html-C2r3PyzF.js.map → unsafe-html-BsGUjx94.js.map} +1 -1
- package/package.json +1 -1
- package/readme.md +2 -2
- package/scss/styles.scss +4 -0
- package/src/__base_element/BaseHyperlink.ts +42 -0
- package/src/__base_element/README.md +19 -0
- package/src/__utils/cache-fetch.ts +65 -0
- package/src/{utils → __utils}/dispatch-event-utils.ts +1 -0
- package/src/__utils/is-dark-mode.ts +3 -0
- package/src/__utils/is-in-viewport.ts +6 -0
- package/src/__utils/observe-slot-change.ts +38 -0
- package/src/__utils/sanitize-svg.ts +27 -0
- package/src/__utils/throttle.ts +27 -0
- package/src/accordion/accordion-item.scss +136 -65
- package/src/accordion/accordion-item.ts +117 -44
- package/src/accordion/accordion.scss +24 -5
- package/src/accordion/accordion.ts +29 -23
- package/src/accordion/demo/index.html +74 -35
- package/src/banner/banner.scss +87 -0
- package/src/banner/banner.ts +107 -0
- package/src/banner/index.ts +1 -0
- package/src/bottom-sheet/bottom-sheet.scss +88 -0
- package/src/bottom-sheet/bottom-sheet.ts +135 -0
- package/src/bottom-sheet/index.ts +1 -0
- package/src/button/BaseButton.ts +26 -30
- package/src/button/button/button-colors.scss +90 -19
- package/src/button/button/button-sizes.scss +39 -19
- package/src/button/button/button.scss +117 -116
- package/src/button/button/button.ts +29 -6
- package/src/button/button-group/button-group.scss +25 -22
- package/src/button/button-group/button-group.ts +122 -5
- package/src/button/icon-button/icon-button-sizes.scss +35 -15
- package/src/button/icon-button/icon-button.ts +25 -12
- package/src/card/card-colors.scss +10 -0
- package/src/card/card-content.ts +26 -0
- package/src/card/card.scss +221 -41
- package/src/card/card.ts +251 -8
- package/src/card/index.ts +1 -0
- package/src/chart-bar/chart-bar.ts +1 -1
- package/src/chart-bar/chart-stacked-bar.ts +3 -1
- package/src/chart-doughnut/chart-doughnut.ts +1 -1
- package/src/chart-pie/chart-pie.ts +1 -1
- package/src/checkbox/checkbox.ts +1 -1
- package/src/clock/clock.ts +1 -1
- package/src/code-editor/code-editor.ts +5 -5
- package/src/code-highlighter/code-highlighter.ts +2 -2
- package/src/container/container.ts +1 -1
- package/src/date-picker/date-picker.ts +5 -2
- package/src/divider/divider.ts +3 -1
- package/src/empty-state/empty-state.scss +9 -3
- package/src/empty-state/empty-state.ts +2 -2
- package/src/fab/fab-colors.scss +49 -0
- package/src/fab/fab-sizes.scss +47 -0
- package/src/fab/fab.scss +137 -0
- package/src/fab/fab.ts +285 -0
- package/src/fab/index.ts +1 -0
- package/src/field/field.ts +3 -1
- package/src/focus-ring/focus-ring.ts +37 -19
- package/src/icon/datasource.ts +1 -1
- package/src/icon/icon.ts +3 -1
- package/src/image/image.ts +3 -2
- package/src/index.ts +12 -1
- package/src/input/input.ts +5 -2
- package/src/link/link.ts +2 -15
- package/src/menu/menu/menu.scss +31 -3
- package/src/menu/menu/menu.ts +30 -6
- package/src/menu/menu-item/menu-item.scss +1 -0
- package/src/menu/menu-item/menu-item.ts +1 -9
- package/src/menu/sub-menu/sub-menu.ts +1 -0
- package/src/notification/index.ts +1 -0
- package/src/notification/notification.scss +201 -0
- package/src/notification/notification.ts +206 -0
- package/src/number-counter/number-counter.ts +3 -1
- package/src/number-field/number-field.ts +4 -2
- package/src/pagination/pagination.scss +33 -24
- package/src/pagination/pagination.ts +113 -60
- package/src/peacock-loader.ts +48 -0
- package/src/radio/radio.ts +3 -1
- package/src/ripple/ripple.ts +19 -3
- package/src/search/index.ts +1 -0
- package/src/search/search-colors.scss +14 -0
- package/src/search/search.scss +204 -0
- package/src/search/search.ts +240 -0
- package/src/segmented-button/index.ts +2 -0
- package/src/segmented-button/segmented-button-group.scss +21 -0
- package/src/segmented-button/segmented-button-group.ts +110 -0
- package/src/segmented-button/segmented-button.scss +115 -0
- package/src/segmented-button/segmented-button.ts +175 -0
- package/src/select/index.ts +3 -0
- package/src/select/option.ts +109 -0
- package/src/select/select.scss +125 -0
- package/src/select/select.ts +520 -0
- package/src/side-sheet/index.ts +1 -0
- package/src/side-sheet/side-sheet.scss +79 -0
- package/src/side-sheet/side-sheet.ts +100 -0
- package/src/slider/slider.scss +19 -1
- package/src/slider/slider.ts +30 -19
- package/src/snackbar/snackbar.scss +62 -31
- package/src/snackbar/snackbar.ts +92 -12
- package/src/switch/switch.ts +3 -1
- package/src/table/table.ts +3 -1
- package/src/tabs/demo/index.html +90 -0
- package/src/tabs/tab-group.ts +0 -3
- package/src/tabs/tab.scss +237 -25
- package/src/tabs/tab.ts +91 -14
- package/src/tabs/tabs.scss +37 -3
- package/src/tabs/tabs.ts +118 -2
- package/src/textarea/textarea.ts +4 -2
- package/src/time-picker/time-picker.ts +4 -2
- package/src/toolbar/index.ts +1 -0
- package/src/toolbar/toolbar-colors.scss +16 -0
- package/src/toolbar/toolbar.scss +165 -0
- package/src/toolbar/toolbar.ts +137 -0
- package/dist/IndividualComponent-Dt5xirYG.js +0 -73
- package/dist/IndividualComponent-Dt5xirYG.js.map +0 -1
- package/dist/button-ClzS8JLq.js.map +0 -1
- package/dist/button-group-BMS5WvaF.js +0 -292
- package/dist/button-group-BMS5WvaF.js.map +0 -1
- package/dist/chart-donut.js +0 -309
- package/dist/chart-donut.js.map +0 -1
- package/dist/class-map-59YGWLnx.js.map +0 -1
- package/dist/directive-Cuw6h7YA.js +0 -9
- package/dist/directive-Cuw6h7YA.js.map +0 -1
- package/dist/dispatch-event-utils-B4odODQf.js +0 -277
- package/dist/dispatch-event-utils-B4odODQf.js.map +0 -1
- package/dist/observe-theme-change-pALI5fmV.js.map +0 -1
- package/dist/radio-b70_Ie9n.js.map +0 -1
- package/dist/src/chart-donut/chart-donut.d.ts +0 -53
- package/dist/src/chart-donut/index.d.ts +0 -1
- package/dist/src/styleMixins.css.d.ts +0 -9
- package/dist/src/utils.d.ts +0 -9
- package/src/chart-donut/chart-donut.scss +0 -37
- package/src/chart-donut/chart-donut.ts +0 -287
- package/src/chart-donut/demo/index.html +0 -51
- package/src/chart-donut/index.ts +0 -1
- package/src/styleMixins.css.ts +0 -55
- package/src/utils.ts +0 -193
- /package/dist/src/{spread.d.ts → __directive/spread.d.ts} +0 -0
- /package/dist/src/{utils → __utils}/copy-to-clipboard.d.ts +0 -0
- /package/dist/src/{utils → __utils}/dispatch-event-utils.d.ts +0 -0
- /package/dist/src/{utils → __utils}/observe-theme-change.d.ts +0 -0
- /package/dist/test/{card.test.d.ts → banner.test.d.ts} +0 -0
- /package/src/{spread.ts → __directive/spread.ts} +0 -0
- /package/src/{utils → __utils}/copy-to-clipboard.ts +0 -0
- /package/src/{utils → __utils}/observe-theme-change.ts +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
7
|
+
|
|
8
|
+
export { e, i, t };
|
|
9
|
+
//# sourceMappingURL=directive-ZPhl09Yt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directive-ZPhl09Yt.js","sources":["../node_modules/lit-html/directive.js"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACK,MAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAS,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dispatches a click event to the given element that triggers a native action,
|
|
3
|
+
* but is not composed and therefore is not seen outside the element.
|
|
4
|
+
*
|
|
5
|
+
* This is useful for responding to an external click event on the host element
|
|
6
|
+
* that should trigger an internal action like a button click.
|
|
7
|
+
*
|
|
8
|
+
* Note, a helper is provided because setting this up correctly is a bit tricky.
|
|
9
|
+
* In particular, calling `click` on an element creates a composed event, which
|
|
10
|
+
* is not desirable, and a manually dispatched event must specifically be a
|
|
11
|
+
* `MouseEvent` to trigger a native action.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* hostClickListener = (event: MouseEvent) {
|
|
15
|
+
* if (isActivationClick(event)) {
|
|
16
|
+
* this.dispatchActivationClick(this.buttonElement);
|
|
17
|
+
* }
|
|
18
|
+
* }
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
function dispatchActivationClick(element) {
|
|
22
|
+
const event = new MouseEvent('click', { bubbles: true });
|
|
23
|
+
element.dispatchEvent(event);
|
|
24
|
+
return event;
|
|
25
|
+
}
|
|
26
|
+
// Ignore events for one microtask only.
|
|
27
|
+
let isSquelchingEvents = false;
|
|
28
|
+
async function __squelchEventsForMicrotask() {
|
|
29
|
+
isSquelchingEvents = true;
|
|
30
|
+
// Need to pause for just one microtask.
|
|
31
|
+
// tslint:disable-next-line
|
|
32
|
+
await null;
|
|
33
|
+
isSquelchingEvents = false;
|
|
34
|
+
}
|
|
35
|
+
// TODO(https://bugzilla.mozilla.org/show_bug.cgi?id=1804576)
|
|
36
|
+
// Remove when Firefox bug is addressed.
|
|
37
|
+
function __squelchEvent(event) {
|
|
38
|
+
const squelched = isSquelchingEvents;
|
|
39
|
+
if (squelched) {
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
event.stopImmediatePropagation();
|
|
42
|
+
}
|
|
43
|
+
__squelchEventsForMicrotask();
|
|
44
|
+
return squelched;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Returns true if the click event should trigger an activation behavior. The
|
|
48
|
+
* behavior is defined by the element and is whatever it should do when
|
|
49
|
+
* clicked.
|
|
50
|
+
*
|
|
51
|
+
* Typically when an element needs to handle a click, the click is generated
|
|
52
|
+
* from within the element and an event listener within the element implements
|
|
53
|
+
* the needed behavior; however, it's possible to fire a click directly
|
|
54
|
+
* at the element that the element should handle. This method helps
|
|
55
|
+
* distinguish these "external" clicks.
|
|
56
|
+
*
|
|
57
|
+
* An "external" click can be triggered in a number of ways: via a click
|
|
58
|
+
* on an associated label for a form associated element, calling
|
|
59
|
+
* `element.click()`, or calling
|
|
60
|
+
* `element.dispatchEvent(new MouseEvent('click', ...))`.
|
|
61
|
+
*
|
|
62
|
+
* Also works around Firefox issue
|
|
63
|
+
* https://bugzilla.mozilla.org/show_bug.cgi?id=1804576 by squelching
|
|
64
|
+
* events for a microtask after called.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* hostClickListener = (event: MouseEvent) {
|
|
68
|
+
* if (isActivationClick(event)) {
|
|
69
|
+
* this.dispatchActivationClick(this.buttonElement);
|
|
70
|
+
* }
|
|
71
|
+
* }
|
|
72
|
+
*
|
|
73
|
+
*/
|
|
74
|
+
function isActivationClick(event) {
|
|
75
|
+
// Event must start at the event target.
|
|
76
|
+
if (event.currentTarget !== event.target) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
// Event must not be retargeted from shadowRoot.
|
|
80
|
+
if (event.composedPath()[0] !== event.target) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
// Target must not be disabled; this should only occur for a synthetically
|
|
84
|
+
// dispatched click.
|
|
85
|
+
if (event.target.disabled) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
// This is an activation if the event should not be squelched.
|
|
89
|
+
return !__squelchEvent(event);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Re-dispatches an event from the provided element.
|
|
93
|
+
*
|
|
94
|
+
* This function is useful for forwarding non-composed events, such as `change`
|
|
95
|
+
* events.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* class MyInput extends LitElement {
|
|
99
|
+
* render() {
|
|
100
|
+
* return html`<input @change=${this.redispatchEvent}>`;
|
|
101
|
+
* }
|
|
102
|
+
*
|
|
103
|
+
* protected redispatchEvent(event: Event) {
|
|
104
|
+
* redispatchEvent(this, event);
|
|
105
|
+
* }
|
|
106
|
+
* }
|
|
107
|
+
*
|
|
108
|
+
* @param element The element to dispatch the event from.
|
|
109
|
+
* @param event The event to re-dispatch.
|
|
110
|
+
* @return Whether or not the event was dispatched (if cancelable).
|
|
111
|
+
*/
|
|
112
|
+
function redispatchEvent(element, event) {
|
|
113
|
+
// For bubbling events in SSR light DOM (or composed), stop their propagation
|
|
114
|
+
// and dispatch the copy.
|
|
115
|
+
if (event.bubbles && (!element.shadowRoot || event.composed)) {
|
|
116
|
+
event.stopPropagation();
|
|
117
|
+
}
|
|
118
|
+
const copy = Reflect.construct(event.constructor, [event.type, event]);
|
|
119
|
+
const dispatched = element.dispatchEvent(copy);
|
|
120
|
+
if (!dispatched) {
|
|
121
|
+
event.preventDefault();
|
|
122
|
+
}
|
|
123
|
+
return dispatched;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export { dispatchActivationClick as d, isActivationClick as i, redispatchEvent as r };
|
|
127
|
+
//# sourceMappingURL=dispatch-event-utils-CuEqjlPT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch-event-utils-CuEqjlPT.js","sources":["../../src/__utils/dispatch-event-utils.ts"],"sourcesContent":["\n/**\n * Dispatches a click event to the given element that triggers a native action,\n * but is not composed and therefore is not seen outside the element.\n *\n * This is useful for responding to an external click event on the host element\n * that should trigger an internal action like a button click.\n *\n * Note, a helper is provided because setting this up correctly is a bit tricky.\n * In particular, calling `click` on an element creates a composed event, which\n * is not desirable, and a manually dispatched event must specifically be a\n * `MouseEvent` to trigger a native action.\n *\n * @example\n * hostClickListener = (event: MouseEvent) {\n * if (isActivationClick(event)) {\n * this.dispatchActivationClick(this.buttonElement);\n * }\n * }\n *\n */\nexport function dispatchActivationClick(element: HTMLElement) {\n const event = new MouseEvent('click', { bubbles: true });\n element.dispatchEvent(event);\n return event;\n}\n\n// Ignore events for one microtask only.\nlet isSquelchingEvents = false;\nasync function __squelchEventsForMicrotask() {\n isSquelchingEvents = true;\n // Need to pause for just one microtask.\n // tslint:disable-next-line\n await null;\n isSquelchingEvents = false;\n}\n\n// TODO(https://bugzilla.mozilla.org/show_bug.cgi?id=1804576)\n// Remove when Firefox bug is addressed.\nfunction __squelchEvent(event: Event) {\n const squelched = isSquelchingEvents;\n if (squelched) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n __squelchEventsForMicrotask();\n return squelched;\n}\n\n/**\n * Returns true if the click event should trigger an activation behavior. The\n * behavior is defined by the element and is whatever it should do when\n * clicked.\n *\n * Typically when an element needs to handle a click, the click is generated\n * from within the element and an event listener within the element implements\n * the needed behavior; however, it's possible to fire a click directly\n * at the element that the element should handle. This method helps\n * distinguish these \"external\" clicks.\n *\n * An \"external\" click can be triggered in a number of ways: via a click\n * on an associated label for a form associated element, calling\n * `element.click()`, or calling\n * `element.dispatchEvent(new MouseEvent('click', ...))`.\n *\n * Also works around Firefox issue\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1804576 by squelching\n * events for a microtask after called.\n *\n * @example\n * hostClickListener = (event: MouseEvent) {\n * if (isActivationClick(event)) {\n * this.dispatchActivationClick(this.buttonElement);\n * }\n * }\n *\n */\nexport function isActivationClick(event: Event) {\n // Event must start at the event target.\n if (event.currentTarget !== event.target) {\n return false;\n }\n // Event must not be retargeted from shadowRoot.\n if (event.composedPath()[0] !== event.target) {\n return false;\n }\n \n // Target must not be disabled; this should only occur for a synthetically\n // dispatched click.\n if ((event.target as EventTarget & { disabled: boolean }).disabled) {\n return false;\n }\n // This is an activation if the event should not be squelched.\n return !__squelchEvent(event);\n}\n\n/**\n * Re-dispatches an event from the provided element.\n *\n * This function is useful for forwarding non-composed events, such as `change`\n * events.\n *\n * @example\n * class MyInput extends LitElement {\n * render() {\n * return html`<input @change=${this.redispatchEvent}>`;\n * }\n *\n * protected redispatchEvent(event: Event) {\n * redispatchEvent(this, event);\n * }\n * }\n *\n * @param element The element to dispatch the event from.\n * @param event The event to re-dispatch.\n * @return Whether or not the event was dispatched (if cancelable).\n */\nexport function redispatchEvent(element: Element, event: Event) {\n // For bubbling events in SSR light DOM (or composed), stop their propagation\n // and dispatch the copy.\n if (event.bubbles && (!element.shadowRoot || event.composed)) {\n event.stopPropagation();\n }\n\n const copy = Reflect.construct(event.constructor, [event.type, event]);\n const dispatched = element.dispatchEvent(copy);\n if (!dispatched) {\n event.preventDefault();\n }\n\n return dispatched;\n}\n"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;AAmBG;AACG,SAAU,uBAAuB,CAAC,OAAoB,EAAA;AAC1D,IAAA,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACxD,IAAA,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC;AAC5B,IAAA,OAAO,KAAK;AACd;AAEA;AACA,IAAI,kBAAkB,GAAG,KAAK;AAC9B,eAAe,2BAA2B,GAAA;IACxC,kBAAkB,GAAG,IAAI;;;AAGzB,IAAA,MAAM,IAAI;IACV,kBAAkB,GAAG,KAAK;AAC5B;AAEA;AACA;AACA,SAAS,cAAc,CAAC,KAAY,EAAA;IAClC,MAAM,SAAS,GAAG,kBAAkB;IACpC,IAAI,SAAS,EAAE;QACb,KAAK,CAAC,cAAc,EAAE;QACtB,KAAK,CAAC,wBAAwB,EAAE;IAClC;AACA,IAAA,2BAA2B,EAAE;AAC7B,IAAA,OAAO,SAAS;AAClB;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;AACG,SAAU,iBAAiB,CAAC,KAAY,EAAA;;IAE5C,IAAI,KAAK,CAAC,aAAa,KAAK,KAAK,CAAC,MAAM,EAAE;AACxC,QAAA,OAAO,KAAK;IACd;;AAEA,IAAA,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,MAAM,EAAE;AAC5C,QAAA,OAAO,KAAK;IACd;;;AAIA,IAAA,IAAK,KAAK,CAAC,MAA8C,CAAC,QAAQ,EAAE;AAClE,QAAA,OAAO,KAAK;IACd;;AAEA,IAAA,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC;AAC/B;AAEA;;;;;;;;;;;;;;;;;;;;AAoBG;AACG,SAAU,eAAe,CAAC,OAAgB,EAAE,KAAY,EAAA;;;AAG5D,IAAA,IAAI,KAAK,CAAC,OAAO,KAAK,CAAC,OAAO,CAAC,UAAU,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE;QAC5D,KAAK,CAAC,eAAe,EAAE;IACzB;AAEA,IAAA,MAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACtE,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC;IAC9C,IAAI,CAAC,UAAU,EAAE;QACf,KAAK,CAAC,cAAc,EAAE;IACxB;AAEA,IAAA,OAAO,UAAU;AACnB;;;;"}
|
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
import { A, a as i, _ as __decorate, I as IndividualComponent, i as i$1, c as __classPrivateFieldGet, b } from './IndividualComponent-DUINtMGK.js';
|
|
2
|
+
import { n } from './property-1psGvXOq.js';
|
|
3
|
+
import { r } from './state-DwbEjqVk.js';
|
|
4
|
+
import { e } from './query-QBcUV-L_.js';
|
|
5
|
+
import { e as e$1 } from './class-map-YU7g0o3B.js';
|
|
6
|
+
import { i as isActivationClick, d as dispatchActivationClick } from './dispatch-event-utils-CuEqjlPT.js';
|
|
7
|
+
import { t as throttle } from './throttle-C7ZAPqtu.js';
|
|
8
|
+
import { s as spread } from './spread-B5cgadZl.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @license
|
|
12
|
+
* Copyright 2018 Google LLC
|
|
13
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
14
|
+
*/const o=o=>o??A;
|
|
15
|
+
|
|
16
|
+
var css_248z$2 = i`* {
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.screen-reader-only {
|
|
21
|
+
display: none !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
--fab-container-shape: var(--shape-corner-large);
|
|
27
|
+
--fab-container-elevation-level: 3;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/*
|
|
31
|
+
* Reset native button/link styles
|
|
32
|
+
*/
|
|
33
|
+
.fab-element {
|
|
34
|
+
background: transparent;
|
|
35
|
+
border: none;
|
|
36
|
+
appearance: none;
|
|
37
|
+
margin: 0;
|
|
38
|
+
outline: none;
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.fab {
|
|
44
|
+
position: relative;
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
border-radius: var(--fab-container-shape);
|
|
49
|
+
font-family: var(--font-family-sans) !important;
|
|
50
|
+
}
|
|
51
|
+
.fab .fab-content {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
pointer-events: none;
|
|
56
|
+
z-index: 0;
|
|
57
|
+
gap: 0.75rem;
|
|
58
|
+
color: var(--_fab-label-text-color);
|
|
59
|
+
--icon-size: var(--_fab-icon-size);
|
|
60
|
+
--icon-color: var(--_fab-label-text-color);
|
|
61
|
+
}
|
|
62
|
+
.fab .fab-label {
|
|
63
|
+
font-size: 0.875rem;
|
|
64
|
+
font-weight: var(--font-weight-medium);
|
|
65
|
+
line-height: 1.25rem;
|
|
66
|
+
letter-spacing: 0.00625em;
|
|
67
|
+
white-space: nowrap;
|
|
68
|
+
}
|
|
69
|
+
.fab.disabled {
|
|
70
|
+
cursor: not-allowed;
|
|
71
|
+
}
|
|
72
|
+
.fab {
|
|
73
|
+
/*
|
|
74
|
+
Background layers
|
|
75
|
+
*/
|
|
76
|
+
}
|
|
77
|
+
.fab .focus-ring {
|
|
78
|
+
z-index: 2;
|
|
79
|
+
--focus-ring-container-shape-start-start: var(--fab-container-shape);
|
|
80
|
+
--focus-ring-container-shape-start-end: var(--fab-container-shape);
|
|
81
|
+
--focus-ring-container-shape-end-start: var(--fab-container-shape);
|
|
82
|
+
--focus-ring-container-shape-end-end: var(--fab-container-shape);
|
|
83
|
+
}
|
|
84
|
+
.fab .ripple {
|
|
85
|
+
border-radius: var(--fab-container-shape);
|
|
86
|
+
--ripple-state-opacity: var(--_fab-container-state-opacity, 0);
|
|
87
|
+
--ripple-pressed-color: var(--_fab-label-text-color);
|
|
88
|
+
}
|
|
89
|
+
.fab .background {
|
|
90
|
+
display: block;
|
|
91
|
+
position: absolute;
|
|
92
|
+
inset: 0;
|
|
93
|
+
background-color: var(--_fab-container-color);
|
|
94
|
+
opacity: var(--_fab-container-opacity, 1);
|
|
95
|
+
border-radius: var(--fab-container-shape);
|
|
96
|
+
pointer-events: none;
|
|
97
|
+
}
|
|
98
|
+
.fab .elevation {
|
|
99
|
+
--elevation-level: var(--_fab-container-elevation-level, var(--fab-container-elevation-level));
|
|
100
|
+
transition-duration: 280ms;
|
|
101
|
+
--elevation-container-shape-start-start: var(--fab-container-shape);
|
|
102
|
+
--elevation-container-shape-start-end: var(--fab-container-shape);
|
|
103
|
+
--elevation-container-shape-end-start: var(--fab-container-shape);
|
|
104
|
+
--elevation-container-shape-end-end: var(--fab-container-shape);
|
|
105
|
+
}
|
|
106
|
+
.fab:hover:not(.disabled) {
|
|
107
|
+
--_fab-container-elevation-level: 4;
|
|
108
|
+
--_fab-container-state-opacity: 0.08;
|
|
109
|
+
}
|
|
110
|
+
.fab.pressed:not(.disabled) {
|
|
111
|
+
--_fab-container-elevation-level: 3;
|
|
112
|
+
--_fab-container-state-opacity: 0.12;
|
|
113
|
+
}
|
|
114
|
+
.fab.lowered {
|
|
115
|
+
--fab-container-elevation-level: 1;
|
|
116
|
+
}
|
|
117
|
+
.fab.lowered:hover:not(.disabled) {
|
|
118
|
+
--_fab-container-elevation-level: 2;
|
|
119
|
+
}
|
|
120
|
+
.fab.lowered.pressed:not(.disabled) {
|
|
121
|
+
--_fab-container-elevation-level: 1;
|
|
122
|
+
}
|
|
123
|
+
.fab.disabled {
|
|
124
|
+
--_fab-container-color: var(--color-on-surface);
|
|
125
|
+
--_fab-container-opacity: 0.12;
|
|
126
|
+
--_fab-label-text-color: var(--color-on-surface);
|
|
127
|
+
--_fab-label-text-opacity: 0.38;
|
|
128
|
+
--_fab-container-elevation-level: 0;
|
|
129
|
+
}
|
|
130
|
+
.fab.disabled .ripple {
|
|
131
|
+
display: none;
|
|
132
|
+
}
|
|
133
|
+
.fab.disabled .fab-content {
|
|
134
|
+
opacity: 0.38;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Extended FAB */
|
|
138
|
+
.fab.extended {
|
|
139
|
+
padding: 0 1rem;
|
|
140
|
+
border-radius: var(--fab-container-shape);
|
|
141
|
+
}`;
|
|
142
|
+
|
|
143
|
+
var css_248z$1 = i`:host {
|
|
144
|
+
--tonal-fab-container-color: var(--color-surface-container-high);
|
|
145
|
+
--tonal-fab-label-text-color: var(--color-on-surface);
|
|
146
|
+
--filled-fab-container-color: var(--color-surface);
|
|
147
|
+
--filled-fab-label-text-color: var(--color-on-surface);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
:host([color=surface]) {
|
|
151
|
+
--tonal-fab-container-color: var(--color-surface-container-high);
|
|
152
|
+
--tonal-fab-label-text-color: var(--color-on-surface);
|
|
153
|
+
--filled-fab-container-color: var(--color-surface);
|
|
154
|
+
--filled-fab-label-text-color: var(--color-on-surface);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
:host([color=primary]) {
|
|
158
|
+
--tonal-fab-container-color: var(--color-primary-container);
|
|
159
|
+
--tonal-fab-label-text-color: var(--color-on-primary-container);
|
|
160
|
+
--filled-fab-container-color: var(--color-primary);
|
|
161
|
+
--filled-fab-label-text-color: var(--color-on-primary);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:host([color=secondary]) {
|
|
165
|
+
--tonal-fab-container-color: var(--color-secondary-container);
|
|
166
|
+
--tonal-fab-label-text-color: var(--color-on-secondary-container);
|
|
167
|
+
--filled-fab-container-color: var(--color-secondary);
|
|
168
|
+
--filled-fab-label-text-color: var(--color-on-secondary);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
:host([color=tertiary]) {
|
|
172
|
+
--tonal-fab-container-color: var(--color-tertiary-container);
|
|
173
|
+
--tonal-fab-label-text-color: var(--color-on-tertiary-container);
|
|
174
|
+
--filled-fab-container-color: var(--color-tertiary);
|
|
175
|
+
--filled-fab-label-text-color: var(--color-on-tertiary);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.fab.variant-tonal {
|
|
179
|
+
--_fab-container-color: var(--tonal-fab-container-color);
|
|
180
|
+
--_fab-label-text-color: var(--tonal-fab-label-text-color);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.fab.variant-filled {
|
|
184
|
+
--_fab-container-color: var(--filled-fab-container-color);
|
|
185
|
+
--_fab-label-text-color: var(--filled-fab-label-text-color);
|
|
186
|
+
}`;
|
|
187
|
+
|
|
188
|
+
var css_248z = i`/* Small FAB: 40x40dp, shape-corner-medium */
|
|
189
|
+
:host([size=sm]) {
|
|
190
|
+
--fab-container-shape: var(--shape-corner-medium);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
:host([size=sm]) .fab {
|
|
194
|
+
width: 2.5rem;
|
|
195
|
+
height: 2.5rem;
|
|
196
|
+
--_fab-icon-size: 1.5rem;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* Standard/Medium FAB: 56x56dp, shape-corner-large (default) */
|
|
200
|
+
:host([size=md]) .fab {
|
|
201
|
+
width: 3.5rem;
|
|
202
|
+
height: 3.5rem;
|
|
203
|
+
--_fab-icon-size: 1.5rem;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* Large FAB: 96x96dp, shape-corner-extra-large */
|
|
207
|
+
:host([size=lg]) {
|
|
208
|
+
--fab-container-shape: var(--shape-corner-extra-large);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
:host([size=lg]) .fab {
|
|
212
|
+
width: 6rem;
|
|
213
|
+
height: 6rem;
|
|
214
|
+
--_fab-icon-size: 2.25rem;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* Extended FAB overrides (height fixed, width auto) */
|
|
218
|
+
:host([size=sm]) .fab.extended {
|
|
219
|
+
width: auto;
|
|
220
|
+
min-width: 4rem;
|
|
221
|
+
height: 2.5rem;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
:host([size=md]) .fab.extended {
|
|
225
|
+
width: auto;
|
|
226
|
+
min-width: 5rem;
|
|
227
|
+
height: 3.5rem;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
:host([size=lg]) .fab.extended {
|
|
231
|
+
width: auto;
|
|
232
|
+
min-width: 6rem;
|
|
233
|
+
height: 6rem;
|
|
234
|
+
}`;
|
|
235
|
+
|
|
236
|
+
var _Fab_id, _Fab_tabindex;
|
|
237
|
+
/**
|
|
238
|
+
* @label FAB
|
|
239
|
+
* @tag wc-fab
|
|
240
|
+
* @rawTag fab
|
|
241
|
+
*
|
|
242
|
+
* @summary The FAB (Floating Action Button) represents the primary action on a screen.
|
|
243
|
+
* @overview
|
|
244
|
+
* <p>A Floating Action Button (FAB) is a circular button that represents the primary action on a screen. It follows the Material Design 3 specification and supports four color roles and two variants.</p>
|
|
245
|
+
*
|
|
246
|
+
* @cssprop --fab-container-color: Background color of the FAB container.
|
|
247
|
+
* @cssprop --fab-label-text-color: Text and icon color of the FAB label.
|
|
248
|
+
* @cssprop --fab-container-shape: Corner radius of the FAB. Defaults to var(--shape-corner-large).
|
|
249
|
+
* @cssprop --fab-container-elevation-level: Elevation level of the FAB. Defaults to 3.
|
|
250
|
+
*
|
|
251
|
+
* @fires {MouseEvent} click - Dispatched when the FAB is clicked.
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* ```html
|
|
255
|
+
* <wc-fab name="add"></wc-fab>
|
|
256
|
+
* ```
|
|
257
|
+
* @tags controls
|
|
258
|
+
*/
|
|
259
|
+
let Fab = class Fab extends i$1 {
|
|
260
|
+
constructor() {
|
|
261
|
+
super(...arguments);
|
|
262
|
+
_Fab_id.set(this, crypto.randomUUID());
|
|
263
|
+
_Fab_tabindex.set(this, 0);
|
|
264
|
+
/**
|
|
265
|
+
* Icon provider. Defaults to `"material-symbols"`.
|
|
266
|
+
*/
|
|
267
|
+
this.provider = 'material-symbols';
|
|
268
|
+
/**
|
|
269
|
+
* The color role of the FAB.
|
|
270
|
+
* `"surface"` uses the surface color role.
|
|
271
|
+
* `"primary"` uses the primary color role.
|
|
272
|
+
* `"secondary"` uses the secondary color role.
|
|
273
|
+
* `"tertiary"` uses the tertiary color role.
|
|
274
|
+
*/
|
|
275
|
+
this.color = 'surface';
|
|
276
|
+
/**
|
|
277
|
+
* The style variant of the FAB.
|
|
278
|
+
* `"tonal"` uses container colors.
|
|
279
|
+
* `"filled"` uses solid role colors.
|
|
280
|
+
*/
|
|
281
|
+
this.variant = 'tonal';
|
|
282
|
+
/**
|
|
283
|
+
* The size of the FAB.
|
|
284
|
+
* `"sm"` renders a small FAB (40×40dp).
|
|
285
|
+
* `"md"` renders a standard FAB (56×56dp). This is the default.
|
|
286
|
+
* `"lg"` renders a large FAB (96×96dp).
|
|
287
|
+
*/
|
|
288
|
+
this.size = 'md';
|
|
289
|
+
/**
|
|
290
|
+
* If `true`, the FAB is in a lowered (resting) state with reduced elevation.
|
|
291
|
+
*/
|
|
292
|
+
this.lowered = false;
|
|
293
|
+
/**
|
|
294
|
+
* If `true`, the user cannot interact with the FAB.
|
|
295
|
+
*/
|
|
296
|
+
this.disabled = false;
|
|
297
|
+
/**
|
|
298
|
+
* Sets or retrieves the window or frame at which to target content.
|
|
299
|
+
*/
|
|
300
|
+
this.target = '_self';
|
|
301
|
+
/**
|
|
302
|
+
* Sets the delay for throttle in milliseconds. Defaults to 200 milliseconds.
|
|
303
|
+
*/
|
|
304
|
+
this.throttleDelay = 200;
|
|
305
|
+
this.isPressed = false;
|
|
306
|
+
this.__handlePress = (event) => {
|
|
307
|
+
if (this.disabled)
|
|
308
|
+
return;
|
|
309
|
+
if (event instanceof KeyboardEvent &&
|
|
310
|
+
event.type === 'keydown' &&
|
|
311
|
+
(event.key === 'Enter' || event.key === ' ')) {
|
|
312
|
+
this.isPressed = true;
|
|
313
|
+
}
|
|
314
|
+
else if (event.type === 'mousedown') {
|
|
315
|
+
this.isPressed = true;
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
this.isPressed = false;
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
this.__dispatchClickWithThrottle = event => {
|
|
322
|
+
this.__dispatchClick(event);
|
|
323
|
+
};
|
|
324
|
+
this.__dispatchClick = (event) => {
|
|
325
|
+
if (this.disabled && this.href) {
|
|
326
|
+
event.stopImmediatePropagation();
|
|
327
|
+
event.preventDefault();
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
if (!isActivationClick(event) || !this.fabElement) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
this.focus();
|
|
334
|
+
dispatchActivationClick(this.fabElement);
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
focus() {
|
|
338
|
+
this.fabElement?.focus();
|
|
339
|
+
}
|
|
340
|
+
blur() {
|
|
341
|
+
this.fabElement?.blur();
|
|
342
|
+
}
|
|
343
|
+
connectedCallback() {
|
|
344
|
+
super.connectedCallback();
|
|
345
|
+
this.addEventListener('click', this.__dispatchClickWithThrottle);
|
|
346
|
+
window.addEventListener('mouseup', this.__handlePress);
|
|
347
|
+
}
|
|
348
|
+
disconnectedCallback() {
|
|
349
|
+
window.removeEventListener('mouseup', this.__handlePress);
|
|
350
|
+
this.removeEventListener('click', this.__dispatchClickWithThrottle);
|
|
351
|
+
super.disconnectedCallback();
|
|
352
|
+
}
|
|
353
|
+
firstUpdated() {
|
|
354
|
+
this.__dispatchClickWithThrottle = throttle(this.__dispatchClick, this.throttleDelay);
|
|
355
|
+
}
|
|
356
|
+
__isLink() {
|
|
357
|
+
return !!this.href;
|
|
358
|
+
}
|
|
359
|
+
__getDisabledReasonID() {
|
|
360
|
+
return this.disabled ? `disabled-reason-${__classPrivateFieldGet(this, _Fab_id, "f")}` : A;
|
|
361
|
+
}
|
|
362
|
+
render() {
|
|
363
|
+
const isLink = this.__isLink();
|
|
364
|
+
const isExtended = !!this.label;
|
|
365
|
+
const cssClasses = {
|
|
366
|
+
fab: true,
|
|
367
|
+
'fab-element': true,
|
|
368
|
+
[`size-${this.size}`]: true,
|
|
369
|
+
[`color-${this.color}`]: true,
|
|
370
|
+
[`variant-${this.variant}`]: true,
|
|
371
|
+
extended: isExtended,
|
|
372
|
+
lowered: this.lowered,
|
|
373
|
+
disabled: this.disabled,
|
|
374
|
+
pressed: this.isPressed,
|
|
375
|
+
};
|
|
376
|
+
if (!isLink) {
|
|
377
|
+
return b `<button
|
|
378
|
+
class=${e$1(cssClasses)}
|
|
379
|
+
id="fab"
|
|
380
|
+
tabindex=${__classPrivateFieldGet(this, _Fab_tabindex, "f")}
|
|
381
|
+
type="button"
|
|
382
|
+
@click=${this.__dispatchClickWithThrottle}
|
|
383
|
+
@mousedown=${this.__handlePress}
|
|
384
|
+
@keydown=${this.__handlePress}
|
|
385
|
+
@keyup=${this.__handlePress}
|
|
386
|
+
aria-label=${this.label ?? this.name ?? A}
|
|
387
|
+
aria-disabled=${`${this.disabled}`}
|
|
388
|
+
?disabled=${this.disabled}
|
|
389
|
+
${spread(this.configAria)}
|
|
390
|
+
>
|
|
391
|
+
${this.__renderFabContent(isExtended)}
|
|
392
|
+
</button>
|
|
393
|
+
${this.__renderTooltip()}`;
|
|
394
|
+
}
|
|
395
|
+
return b `<a
|
|
396
|
+
class=${e$1(cssClasses)}
|
|
397
|
+
id="fab"
|
|
398
|
+
tabindex=${__classPrivateFieldGet(this, _Fab_tabindex, "f")}
|
|
399
|
+
href=${o(this.href)}
|
|
400
|
+
target=${this.target}
|
|
401
|
+
@click=${this.__dispatchClickWithThrottle}
|
|
402
|
+
@mousedown=${this.__handlePress}
|
|
403
|
+
@keydown=${this.__handlePress}
|
|
404
|
+
@keyup=${this.__handlePress}
|
|
405
|
+
role="button"
|
|
406
|
+
aria-label=${this.label ?? this.name ?? A}
|
|
407
|
+
aria-disabled=${`${this.disabled}`}
|
|
408
|
+
${spread(this.configAria)}
|
|
409
|
+
>
|
|
410
|
+
${this.__renderFabContent(isExtended)}
|
|
411
|
+
</a>
|
|
412
|
+
${this.__renderTooltip()}`;
|
|
413
|
+
}
|
|
414
|
+
__renderFabContent(isExtended) {
|
|
415
|
+
return b `
|
|
416
|
+
<wc-focus-ring class="focus-ring" .control=${this} .forElement=${this.fabElement}></wc-focus-ring>
|
|
417
|
+
<wc-elevation class="elevation"></wc-elevation>
|
|
418
|
+
<div class="background"></div>
|
|
419
|
+
<wc-ripple class="ripple"></wc-ripple>
|
|
420
|
+
|
|
421
|
+
<div class="fab-content">
|
|
422
|
+
<wc-icon
|
|
423
|
+
class="fab-icon"
|
|
424
|
+
name=${o(this.name)}
|
|
425
|
+
src=${o(this.src)}
|
|
426
|
+
provider=${this.provider}
|
|
427
|
+
></wc-icon>
|
|
428
|
+
${isExtended
|
|
429
|
+
? b `<span class="fab-label">${this.label}</span>`
|
|
430
|
+
: A}
|
|
431
|
+
</div>
|
|
432
|
+
`;
|
|
433
|
+
}
|
|
434
|
+
__renderTooltip() {
|
|
435
|
+
if (this.tooltip) {
|
|
436
|
+
return b `<wc-tooltip for="fab">${this.tooltip}</wc-tooltip>`;
|
|
437
|
+
}
|
|
438
|
+
return A;
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
_Fab_id = new WeakMap();
|
|
442
|
+
_Fab_tabindex = new WeakMap();
|
|
443
|
+
Fab.styles = [css_248z$2, css_248z$1, css_248z];
|
|
444
|
+
__decorate([
|
|
445
|
+
n({ type: String, reflect: true })
|
|
446
|
+
], Fab.prototype, "name", void 0);
|
|
447
|
+
__decorate([
|
|
448
|
+
n({ type: String, reflect: true })
|
|
449
|
+
], Fab.prototype, "src", void 0);
|
|
450
|
+
__decorate([
|
|
451
|
+
n({ type: String })
|
|
452
|
+
], Fab.prototype, "provider", void 0);
|
|
453
|
+
__decorate([
|
|
454
|
+
n({ type: String })
|
|
455
|
+
], Fab.prototype, "label", void 0);
|
|
456
|
+
__decorate([
|
|
457
|
+
n({ reflect: true })
|
|
458
|
+
], Fab.prototype, "color", void 0);
|
|
459
|
+
__decorate([
|
|
460
|
+
n({ reflect: true })
|
|
461
|
+
], Fab.prototype, "variant", void 0);
|
|
462
|
+
__decorate([
|
|
463
|
+
n({ reflect: true })
|
|
464
|
+
], Fab.prototype, "size", void 0);
|
|
465
|
+
__decorate([
|
|
466
|
+
n({ type: Boolean, reflect: true })
|
|
467
|
+
], Fab.prototype, "lowered", void 0);
|
|
468
|
+
__decorate([
|
|
469
|
+
n({ type: Boolean, reflect: true })
|
|
470
|
+
], Fab.prototype, "disabled", void 0);
|
|
471
|
+
__decorate([
|
|
472
|
+
n({ reflect: true })
|
|
473
|
+
], Fab.prototype, "href", void 0);
|
|
474
|
+
__decorate([
|
|
475
|
+
n()
|
|
476
|
+
], Fab.prototype, "target", void 0);
|
|
477
|
+
__decorate([
|
|
478
|
+
n({ reflect: true })
|
|
479
|
+
], Fab.prototype, "configAria", void 0);
|
|
480
|
+
__decorate([
|
|
481
|
+
n()
|
|
482
|
+
], Fab.prototype, "throttleDelay", void 0);
|
|
483
|
+
__decorate([
|
|
484
|
+
n()
|
|
485
|
+
], Fab.prototype, "tooltip", void 0);
|
|
486
|
+
__decorate([
|
|
487
|
+
r()
|
|
488
|
+
], Fab.prototype, "isPressed", void 0);
|
|
489
|
+
__decorate([
|
|
490
|
+
e('.fab')
|
|
491
|
+
], Fab.prototype, "fabElement", void 0);
|
|
492
|
+
Fab = __decorate([
|
|
493
|
+
IndividualComponent
|
|
494
|
+
], Fab);
|
|
495
|
+
|
|
496
|
+
export { Fab as F, o };
|
|
497
|
+
//# sourceMappingURL=fab-C5Nzxk0E.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fab-C5Nzxk0E.js","sources":["../node_modules/lit-html/directives/if-defined.js","../../src/fab/fab.ts"],"sourcesContent":["import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=o=>o??t;export{o as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","import { html, LitElement, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport { dispatchActivationClick, isActivationClick } from '@/__utils/dispatch-event-utils.js';\nimport { throttle } from '@/__utils/throttle.js';\nimport { spread } from '@/__directive/spread.js';\n\nimport { IconProvider } from '../icon/icon.js';\nimport styles from './fab.scss';\nimport colorStyles from './fab-colors.scss';\nimport sizeStyles from './fab-sizes.scss';\n\n/**\n * @label FAB\n * @tag wc-fab\n * @rawTag fab\n *\n * @summary The FAB (Floating Action Button) represents the primary action on a screen.\n * @overview\n * <p>A Floating Action Button (FAB) is a circular button that represents the primary action on a screen. It follows the Material Design 3 specification and supports four color roles and two variants.</p>\n *\n * @cssprop --fab-container-color: Background color of the FAB container.\n * @cssprop --fab-label-text-color: Text and icon color of the FAB label.\n * @cssprop --fab-container-shape: Corner radius of the FAB. Defaults to var(--shape-corner-large).\n * @cssprop --fab-container-elevation-level: Elevation level of the FAB. Defaults to 3.\n *\n * @fires {MouseEvent} click - Dispatched when the FAB is clicked.\n *\n * @example\n * ```html\n * <wc-fab name=\"add\"></wc-fab>\n * ```\n * @tags controls\n */\n@IndividualComponent\nexport class Fab extends LitElement {\n static override styles = [styles, colorStyles, sizeStyles];\n\n #id = crypto.randomUUID();\n\n #tabindex?: number = 0;\n\n /**\n * Name of the icon to display inside the FAB.\n */\n @property({ type: String, reflect: true }) name?: string;\n\n /**\n * Source URL for a custom icon.\n */\n @property({ type: String, reflect: true }) src?: string;\n\n /**\n * Icon provider. Defaults to `\"material-symbols\"`.\n */\n @property({ type: String }) provider: IconProvider = 'material-symbols';\n\n /**\n * Optional label text for the extended FAB variant.\n * When set, the FAB displays both the icon and a text label.\n */\n @property({ type: String }) label?: string;\n\n /**\n * The color role of the FAB.\n * `\"surface\"` uses the surface color role.\n * `\"primary\"` uses the primary color role.\n * `\"secondary\"` uses the secondary color role.\n * `\"tertiary\"` uses the tertiary color role.\n */\n @property({ reflect: true }) color: 'surface' | 'primary' | 'secondary' | 'tertiary' = 'surface';\n\n /**\n * The style variant of the FAB.\n * `\"tonal\"` uses container colors.\n * `\"filled\"` uses solid role colors.\n */\n @property({ reflect: true }) variant: 'tonal' | 'filled' = 'tonal';\n\n /**\n * The size of the FAB.\n * `\"sm\"` renders a small FAB (40×40dp).\n * `\"md\"` renders a standard FAB (56×56dp). This is the default.\n * `\"lg\"` renders a large FAB (96×96dp).\n */\n @property({ reflect: true }) size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * If `true`, the FAB is in a lowered (resting) state with reduced elevation.\n */\n @property({ type: Boolean, reflect: true }) lowered: boolean = false;\n\n /**\n * If `true`, the user cannot interact with the FAB.\n */\n @property({ type: Boolean, reflect: true }) disabled: boolean = false;\n\n /**\n * Hyperlink to navigate to on click.\n */\n @property({ reflect: true }) href?: string;\n\n /**\n * Sets or retrieves the window or frame at which to target content.\n */\n @property() target: string = '_self';\n\n /**\n * Additional ARIA attributes to pass to the inner button/anchor element.\n */\n @property({ reflect: true })\n configAria?: { [key: string]: any };\n\n /**\n * Sets the delay for throttle in milliseconds. Defaults to 200 milliseconds.\n */\n @property() throttleDelay = 200;\n\n /**\n * Tooltip text shown on hover.\n */\n @property() tooltip?: string;\n\n @state()\n isPressed = false;\n\n @query('.fab') readonly fabElement!: HTMLElement | null;\n\n override focus() {\n this.fabElement?.focus();\n }\n\n override blur() {\n this.fabElement?.blur();\n }\n\n override connectedCallback() {\n super.connectedCallback();\n this.addEventListener('click', this.__dispatchClickWithThrottle);\n window.addEventListener('mouseup', this.__handlePress);\n }\n\n override disconnectedCallback() {\n window.removeEventListener('mouseup', this.__handlePress);\n this.removeEventListener('click', this.__dispatchClickWithThrottle);\n super.disconnectedCallback();\n }\n\n override firstUpdated() {\n this.__dispatchClickWithThrottle = throttle(\n this.__dispatchClick,\n this.throttleDelay,\n );\n }\n\n __handlePress = (event: KeyboardEvent | MouseEvent) => {\n if (this.disabled) return;\n if (\n event instanceof KeyboardEvent &&\n event.type === 'keydown' &&\n (event.key === 'Enter' || event.key === ' ')\n ) {\n this.isPressed = true;\n } else if (event.type === 'mousedown') {\n this.isPressed = true;\n } else {\n this.isPressed = false;\n }\n };\n\n __isLink() {\n return !!this.href;\n }\n\n __dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void =\n event => {\n this.__dispatchClick(event);\n };\n\n __dispatchClick = (event: MouseEvent | KeyboardEvent) => {\n if (this.disabled && this.href) {\n event.stopImmediatePropagation();\n event.preventDefault();\n return;\n }\n\n if (!isActivationClick(event) || !this.fabElement) {\n return;\n }\n\n this.focus();\n dispatchActivationClick(this.fabElement);\n };\n\n __getDisabledReasonID() {\n return this.disabled ? `disabled-reason-${this.#id}` : nothing;\n }\n\n override render() {\n const isLink = this.__isLink();\n const isExtended = !!this.label;\n\n const cssClasses = {\n fab: true,\n 'fab-element': true,\n [`size-${this.size}`]: true,\n [`color-${this.color}`]: true,\n [`variant-${this.variant}`]: true,\n extended: isExtended,\n lowered: this.lowered,\n disabled: this.disabled,\n pressed: this.isPressed,\n };\n\n if (!isLink) {\n return html`<button\n class=${classMap(cssClasses)}\n id=\"fab\"\n tabindex=${this.#tabindex}\n type=\"button\"\n @click=${this.__dispatchClickWithThrottle}\n @mousedown=${this.__handlePress}\n @keydown=${this.__handlePress}\n @keyup=${this.__handlePress}\n aria-label=${this.label ?? this.name ?? nothing}\n aria-disabled=${`${this.disabled}`}\n ?disabled=${this.disabled}\n ${spread(this.configAria)}\n >\n ${this.__renderFabContent(isExtended)}\n </button>\n ${this.__renderTooltip()}`;\n }\n\n return html`<a\n class=${classMap(cssClasses)}\n id=\"fab\"\n tabindex=${this.#tabindex}\n href=${ifDefined(this.href)}\n target=${this.target}\n @click=${this.__dispatchClickWithThrottle}\n @mousedown=${this.__handlePress}\n @keydown=${this.__handlePress}\n @keyup=${this.__handlePress}\n role=\"button\"\n aria-label=${this.label ?? this.name ?? nothing}\n aria-disabled=${`${this.disabled}`}\n ${spread(this.configAria)}\n >\n ${this.__renderFabContent(isExtended)}\n </a>\n ${this.__renderTooltip()}`;\n }\n\n __renderFabContent(isExtended: boolean) {\n return html`\n <wc-focus-ring class=\"focus-ring\" .control=${this} .forElement=${this.fabElement}></wc-focus-ring>\n <wc-elevation class=\"elevation\"></wc-elevation>\n <div class=\"background\"></div>\n <wc-ripple class=\"ripple\"></wc-ripple>\n\n <div class=\"fab-content\">\n <wc-icon\n class=\"fab-icon\"\n name=${ifDefined(this.name)}\n src=${ifDefined(this.src)}\n provider=${this.provider}\n ></wc-icon>\n ${isExtended\n ? html`<span class=\"fab-label\">${this.label}</span>`\n : nothing}\n </div>\n `;\n }\n\n __renderTooltip() {\n if (this.tooltip) {\n return html`<wc-tooltip for=\"fab\">${this.tooltip}</wc-tooltip>`;\n }\n return nothing;\n }\n}\n"],"names":["t","LitElement","nothing","html","classMap","ifDefined","styles","colorStyles","sizeStyles","property","state","query"],"mappings":";;;;;;;;;AACA;AACA;AACA;AACA;AACA,GAAQ,MAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACUjB;;;;;;;;;;;;;;;;;;;;;AAqBG;AAEI,IAAM,GAAG,GAAT,MAAM,GAAI,SAAQC,GAAU,CAAA;AAA5B,IAAA,WAAA,GAAA;;AAGL,QAAA,OAAA,CAAA,GAAA,CAAA,IAAA,EAAM,MAAM,CAAC,UAAU,EAAE,CAAA;AAEzB,QAAA,aAAA,CAAA,GAAA,CAAA,IAAA,EAAqB,CAAC,CAAA;AAYtB;;AAEG;QACyB,IAAA,CAAA,QAAQ,GAAiB,kBAAkB;AAQvE;;;;;;AAMG;QAC0B,IAAA,CAAA,KAAK,GAAqD,SAAS;AAEhG;;;;AAIG;QAC0B,IAAA,CAAA,OAAO,GAAuB,OAAO;AAElE;;;;;AAKG;QAC0B,IAAA,CAAA,IAAI,GAAuB,IAAI;AAE5D;;AAEG;QACyC,IAAA,CAAA,OAAO,GAAY,KAAK;AAEpE;;AAEG;QACyC,IAAA,CAAA,QAAQ,GAAY,KAAK;AAOrE;;AAEG;QACS,IAAA,C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