@redvars/peacock 3.4.0 → 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/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 +2 -2
- package/dist/{button-COYCtuA8.js → button-DMN1dPAg.js} +58 -75
- package/dist/button-DMN1dPAg.js.map +1 -0
- package/dist/{button-group-DsXquZQn.js → button-group-CX9CUUXk.js} +9 -14
- package/dist/button-group-CX9CUUXk.js.map +1 -0
- package/dist/button-group.js +8 -5
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +7 -4
- package/dist/button.js.map +1 -1
- package/dist/card.js +15 -5
- package/dist/card.js.map +1 -1
- package/dist/chart-bar.js +2 -2
- package/dist/chart-bar.js.map +1 -1
- package/dist/chart-doughnut.js.map +1 -1
- package/dist/chart-pie.js.map +1 -1
- package/dist/chart-stacked-bar.js +2 -2
- package/dist/chart-stacked-bar.js.map +1 -1
- package/dist/{class-map-3TAnCMAX.js → class-map-YU7g0o3B.js} +2 -2
- package/dist/{class-map-3TAnCMAX.js.map → class-map-YU7g0o3B.js.map} +1 -1
- package/dist/clock.js.map +1 -1
- package/dist/code-editor.js +4 -4
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +3 -3
- package/dist/code-highlighter.js.map +1 -1
- package/dist/custom-elements-jsdocs.json +2918 -1379
- package/dist/custom-elements.json +2783 -1054
- 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 +17 -9
- package/dist/index.js.map +1 -1
- package/dist/{observe-theme-change-DKAIv5BB.js → is-dark-mode-DicqGkCJ.js} +6 -2
- 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 +2 -2
- 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 +32 -9
- package/dist/peacock-loader.js.map +1 -1
- package/dist/search.js +452 -0
- package/dist/search.js.map +1 -0
- package/dist/{select-C3XAzenC.js → select-4pl4XBj7.js} +778 -374
- package/dist/select-4pl4XBj7.js.map +1 -0
- package/dist/side-sheet.js +2 -2
- 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/button/BaseButton.d.ts +6 -13
- package/dist/src/button/button-group/button-group.d.ts +2 -2
- 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/index.d.ts +5 -0
- package/dist/src/link/link.d.ts +3 -10
- package/dist/src/menu/menu/menu.d.ts +3 -2
- 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/search/index.d.ts +1 -0
- package/dist/src/search/search.d.ts +76 -0
- package/dist/src/select/select.d.ts +3 -5
- package/dist/src/slider/slider.d.ts +4 -0
- package/dist/src/snackbar/snackbar.d.ts +14 -1
- package/dist/src/toolbar/index.d.ts +1 -0
- package/dist/src/toolbar/toolbar.d.ts +86 -0
- package/dist/{style-map-CRFEoCEg.js → style-map-DVmWOuYy.js} +2 -2
- package/dist/{style-map-CRFEoCEg.js.map → style-map-DVmWOuYy.js.map} +1 -1
- package/dist/test/banner.test.d.ts +1 -0
- 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-D3GHRaGQ.js → unsafe-html-BsGUjx94.js} +2 -2
- package/dist/{unsafe-html-D3GHRaGQ.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/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/button/BaseButton.ts +14 -27
- package/src/button/button/button-colors.scss +14 -14
- package/src/button/button/button.ts +6 -5
- package/src/button/button-group/button-group.ts +3 -3
- package/src/button/icon-button/icon-button.ts +4 -11
- package/src/card/card.ts +41 -31
- 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 +4 -4
- package/src/code-highlighter/code-highlighter.ts +2 -2
- package/src/date-picker/date-picker.ts +5 -2
- package/src/divider/divider.ts +3 -1
- package/src/empty-state/empty-state.scss +7 -9
- package/src/empty-state/empty-state.ts +1 -1
- 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/icon/datasource.ts +1 -1
- package/src/icon/icon.ts +3 -1
- package/src/image/image.ts +3 -2
- package/src/index.ts +5 -0
- package/src/input/input.ts +5 -2
- package/src/link/link.ts +2 -15
- package/src/menu/menu/menu.scss +7 -0
- package/src/menu/menu/menu.ts +7 -4
- 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 +20 -0
- package/src/radio/radio.ts +3 -1
- 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/select/option.ts +1 -1
- package/src/select/select.scss +5 -0
- package/src/select/select.ts +71 -37
- package/src/slider/slider.scss +19 -0
- 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/tab.ts +6 -3
- 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/button-COYCtuA8.js.map +0 -1
- package/dist/button-group-DsXquZQn.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-DKAIv5BB.js.map +0 -1
- package/dist/select-C3XAzenC.js.map +0 -1
- package/dist/src/styleMixins.css.d.ts +0 -9
- package/dist/src/utils.d.ts +0 -9
- 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/src/{spread.ts → __directive/spread.ts} +0 -0
- /package/src/{utils → __utils}/copy-to-clipboard.ts +0 -0
- /package/src/{utils → __utils}/dispatch-event-utils.ts +0 -0
- /package/src/{utils → __utils}/observe-theme-change.ts +0 -0
package/dist/side-sheet.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as i, _ as __decorate, I as IndividualComponent, i as i$1, A, b } from './IndividualComponent-DUINtMGK.js';
|
|
2
2
|
import { n } from './property-1psGvXOq.js';
|
|
3
|
-
import { e } from './class-map-
|
|
4
|
-
import './directive-
|
|
3
|
+
import { e } from './class-map-YU7g0o3B.js';
|
|
4
|
+
import './directive-ZPhl09Yt.js';
|
|
5
5
|
|
|
6
6
|
var css_248z = i`* {
|
|
7
7
|
box-sizing: border-box;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { e, i, t } from './directive-ZPhl09Yt.js';
|
|
2
|
+
|
|
3
|
+
class SpreadDirective extends i {
|
|
4
|
+
constructor(partInfo) {
|
|
5
|
+
super(partInfo);
|
|
6
|
+
if (partInfo.type !== t.ELEMENT) {
|
|
7
|
+
throw new Error('spread() can only be used on elements');
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11
|
+
render(_props) {
|
|
12
|
+
return '';
|
|
13
|
+
}
|
|
14
|
+
update(part, [props]) {
|
|
15
|
+
if (!props)
|
|
16
|
+
return;
|
|
17
|
+
// eslint-disable-next-line guard-for-in,no-restricted-syntax
|
|
18
|
+
for (const key in props) {
|
|
19
|
+
const value = props[key];
|
|
20
|
+
if (value === undefined || value === null) {
|
|
21
|
+
part.element.removeAttribute(key);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
part.element.setAttribute(key, value);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const spread = e(SpreadDirective);
|
|
30
|
+
|
|
31
|
+
export { spread as s };
|
|
32
|
+
//# sourceMappingURL=spread-B5cgadZl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spread-B5cgadZl.js","sources":["../../src/__directive/spread.ts"],"sourcesContent":["import {\n directive,\n Directive,\n ElementPart,\n PartInfo,\n PartType,\n} from 'lit/directive.js';\n\nclass SpreadDirective extends Directive {\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.ELEMENT) {\n throw new Error('spread() can only be used on elements');\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n render(_props: { [key: string]: any } | undefined) {\n return '';\n }\n\n update(part: ElementPart, [props]: [{ [key: string]: any } | undefined]) {\n if (!props) return;\n // eslint-disable-next-line guard-for-in,no-restricted-syntax\n for (const key in props) {\n const value = props[key];\n if (value === undefined || value === null) {\n part.element.removeAttribute(key);\n } else {\n part.element.setAttribute(key, value);\n }\n }\n }\n}\n\nexport const spread = directive(SpreadDirective);\n"],"names":["Directive","PartType","directive"],"mappings":";;AAQA,MAAM,eAAgB,SAAQA,CAAS,CAAA;AACrC,IAAA,WAAA,CAAY,QAAkB,EAAA;QAC5B,KAAK,CAAC,QAAQ,CAAC;QACf,IAAI,QAAQ,CAAC,IAAI,KAAKC,CAAQ,CAAC,OAAO,EAAE;AACtC,YAAA,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC;QAC1D;IACF;;AAGA,IAAA,MAAM,CAAC,MAA0C,EAAA;AAC/C,QAAA,OAAO,EAAE;IACX;AAEA,IAAA,MAAM,CAAC,IAAiB,EAAE,CAAC,KAAK,CAAuC,EAAA;AACrE,QAAA,IAAI,CAAC,KAAK;YAAE;;AAEZ,QAAA,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;AACvB,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC;YACxB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE;AACzC,gBAAA,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC;YACnC;iBAAO;gBACL,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC;YACvC;QACF;IACF;AACD;MAEY,MAAM,GAAGC,CAAS,CAAC,eAAe;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
type Constructor<T = {}> = new (...args: any[]) => T;
|
|
3
|
+
/**
|
|
4
|
+
* 1. Define an interface for the members the mixin adds.
|
|
5
|
+
* This makes the type annotation much cleaner.
|
|
6
|
+
*/
|
|
7
|
+
export interface BaseHyperlinkInterface {
|
|
8
|
+
href?: string;
|
|
9
|
+
target: '_self' | '_parent' | '_blank' | '_top' | string;
|
|
10
|
+
__isLink(): boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 2. Define the Mixin type separately for readability.
|
|
14
|
+
*/
|
|
15
|
+
type BaseHyperlinkMixinType = <T extends Constructor<LitElement>>(superclass: T) => T & Constructor<BaseHyperlinkInterface>;
|
|
16
|
+
/**
|
|
17
|
+
* 3. Apply the type annotation to the variable.
|
|
18
|
+
*/
|
|
19
|
+
declare const BaseHyperlink: BaseHyperlinkMixinType;
|
|
20
|
+
export default BaseHyperlink;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createCacheFetch(name: string): Promise<(url: string) => Promise<string>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isDarkMode(): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isInViewport(element: HTMLElement): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function observerSlotChangesWithCallback(slot: HTMLSlotElement | null, callback: (hasContent: boolean) => void): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function sanitizeSvg(rawSvg: string): string;
|
|
@@ -3,13 +3,27 @@ import { LitElement } from 'lit';
|
|
|
3
3
|
* @label Accordion Item
|
|
4
4
|
* @tag wc-accordion-item
|
|
5
5
|
* @rawTag accordion-item
|
|
6
|
-
* @summary An
|
|
6
|
+
* @summary An expansion panel with a header that reveals or hides associated content. Follows Material Design 3 expansion panel guidelines.
|
|
7
7
|
* @parentRawTag accordion
|
|
8
8
|
*
|
|
9
|
+
* @slot - The body content revealed when the panel is expanded.
|
|
10
|
+
* @slot heading - The panel title. Renders as `body-large` text.
|
|
11
|
+
* @slot description - Optional subtitle rendered below the title. Renders as `body-small` text.
|
|
12
|
+
* @slot header-actions - Actions (e.g. icon buttons) placed at the trailing end of the header, before the toggle icon.
|
|
13
|
+
*
|
|
14
|
+
* @part header - The header `<button>` element.
|
|
15
|
+
* @part title - The title text container.
|
|
16
|
+
* @part description - The description text container.
|
|
17
|
+
* @part content - The expandable content region wrapper.
|
|
18
|
+
*
|
|
19
|
+
* @fires {CustomEvent<{ open: boolean }>} accordion-item:toggle - Fired when the panel is expanded or collapsed.
|
|
20
|
+
*
|
|
9
21
|
* @example
|
|
10
22
|
* ```html
|
|
11
23
|
* <wc-accordion-item>
|
|
12
|
-
*
|
|
24
|
+
* <span slot="heading">Personal information</span>
|
|
25
|
+
* <span slot="description">Fill in your details</span>
|
|
26
|
+
* <p>Content goes here.</p>
|
|
13
27
|
* </wc-accordion-item>
|
|
14
28
|
* ```
|
|
15
29
|
* @tags display
|
|
@@ -18,20 +32,30 @@ export declare class AccordionItem extends LitElement {
|
|
|
18
32
|
#private;
|
|
19
33
|
static styles: import("lit").CSSResultGroup[];
|
|
20
34
|
/**
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
heading: string;
|
|
24
|
-
/**
|
|
25
|
-
* If true, the user cannot interact with the button. Defaults to `false`.
|
|
35
|
+
* Whether the user cannot interact with the panel.
|
|
26
36
|
*/
|
|
27
37
|
disabled: boolean;
|
|
28
38
|
/**
|
|
29
|
-
*
|
|
39
|
+
* Whether the panel is expanded.
|
|
30
40
|
*/
|
|
31
41
|
open: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether to hide the expand/collapse toggle indicator icon.
|
|
44
|
+
*/
|
|
45
|
+
hideToggle: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Position of the toggle icon relative to the panel title.
|
|
48
|
+
* `'after'` places it at the trailing end (default, matches M3).
|
|
49
|
+
* `'before'` places it at the leading start.
|
|
50
|
+
*/
|
|
51
|
+
togglePosition: 'before' | 'after';
|
|
52
|
+
private _hasDescriptionSlot;
|
|
53
|
+
private _hasHeadingSlot;
|
|
32
54
|
private readonly buttonElement;
|
|
33
55
|
focus(): void;
|
|
34
56
|
blur(): void;
|
|
35
|
-
private
|
|
57
|
+
private _handleToggle;
|
|
58
|
+
private static _onSlotChange;
|
|
59
|
+
private _renderToggleIcon;
|
|
36
60
|
render(): import("lit-html").TemplateResult<1>;
|
|
37
61
|
}
|
|
@@ -4,21 +4,37 @@ import { AccordionItem } from './accordion-item.js';
|
|
|
4
4
|
* @label Accordion
|
|
5
5
|
* @tag wc-accordion
|
|
6
6
|
* @rawTag accordion
|
|
7
|
-
* @summary
|
|
7
|
+
* @summary A vertically stacked set of expansion panels. Follows Material Design 3 expansion panel guidelines.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```html
|
|
11
11
|
* <wc-accordion>
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* </
|
|
12
|
+
* <wc-accordion-item>
|
|
13
|
+
* <span slot="heading">Panel 1</span>
|
|
14
|
+
* <span slot="description">Summary text</span>
|
|
15
|
+
* Content
|
|
16
|
+
* </wc-accordion-item>
|
|
17
|
+
* <wc-accordion-item>
|
|
18
|
+
* <span slot="heading">Panel 2</span>
|
|
19
|
+
* Content
|
|
20
|
+
* </wc-accordion-item>
|
|
15
21
|
* </wc-accordion>
|
|
16
22
|
* ```
|
|
17
23
|
* @tags display
|
|
18
24
|
*/
|
|
19
25
|
export declare class Accordion extends LitElement {
|
|
20
26
|
static styles: import("lit").CSSResultGroup[];
|
|
21
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Whether multiple panels can be expanded simultaneously.
|
|
29
|
+
* When `false` (default), expanding one panel collapses all others.
|
|
30
|
+
*/
|
|
31
|
+
multi: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Display mode for the accordion.
|
|
34
|
+
* `'default'` renders panels with a subtle background on expand and dividers between items.
|
|
35
|
+
* `'flat'` renders panels without borders or background changes — suitable for use inside cards.
|
|
36
|
+
*/
|
|
37
|
+
displayMode: 'default' | 'flat';
|
|
22
38
|
items: Array<AccordionItem>;
|
|
23
39
|
connectedCallback(): void;
|
|
24
40
|
disconnectedCallback(): void;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
type BannerVariant = 'note' | 'info' | 'success' | 'warning' | 'error';
|
|
3
|
+
/**
|
|
4
|
+
* @label Banner
|
|
5
|
+
* @tag wc-banner
|
|
6
|
+
* @rawTag banner
|
|
7
|
+
* @summary Banners show short, prominent contextual messages with optional icon and description.
|
|
8
|
+
*
|
|
9
|
+
* @cssprop --banner-container-color - Background color of the banner container.
|
|
10
|
+
* @cssprop --banner-label-text-color - Label text color.
|
|
11
|
+
* @cssprop --banner-description-text-color - Description text color.
|
|
12
|
+
* @cssprop --banner-icon-color - Icon color.
|
|
13
|
+
* @cssprop --banner-border-radius - Border radius of the banner surface.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <wc-banner variant="note" description="Use semantic roles that preserve a 3:1 contrast ratio."></wc-banner>
|
|
18
|
+
* ```
|
|
19
|
+
* @tags display, feedback
|
|
20
|
+
*/
|
|
21
|
+
export declare class Banner extends LitElement {
|
|
22
|
+
static styles: import("lit").CSSResultGroup[];
|
|
23
|
+
/**
|
|
24
|
+
* Visual intent of the banner.
|
|
25
|
+
*/
|
|
26
|
+
variant: BannerVariant;
|
|
27
|
+
/**
|
|
28
|
+
* Optional explicit label text. Falls back to a variant-based label.
|
|
29
|
+
*/
|
|
30
|
+
label?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Optional explicit icon name. Falls back to a variant-based icon.
|
|
33
|
+
*/
|
|
34
|
+
icon?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Optional description text when a default slot is not provided.
|
|
37
|
+
*/
|
|
38
|
+
description: string;
|
|
39
|
+
/**
|
|
40
|
+
* When true, label and description are rendered on a single line.
|
|
41
|
+
*/
|
|
42
|
+
inline: boolean;
|
|
43
|
+
private get resolvedLabel();
|
|
44
|
+
private get resolvedIcon();
|
|
45
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Banner } from './banner.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, nothing } from 'lit';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
declare const BaseButton_base: typeof LitElement & (new (...args: any[]) => import("@/__base_element/BaseHyperlink.js").BaseHyperlinkInterface);
|
|
3
|
+
export declare class BaseButton extends BaseButton_base {
|
|
4
|
+
protected static readonly DISABLED_REASON_ID = "disabled-reason";
|
|
4
5
|
htmlType: 'button' | 'submit' | 'reset';
|
|
5
6
|
/**
|
|
6
7
|
* Type is preset of color and variant. Type will be only applied.
|
|
@@ -21,7 +22,7 @@ export declare class BaseButton extends LitElement {
|
|
|
21
22
|
/**
|
|
22
23
|
* Defines the primary color of the button. This can be set to predefined color names to apply specific color themes.
|
|
23
24
|
*/
|
|
24
|
-
color: 'primary' | 'success' | 'danger' | 'warning' | '
|
|
25
|
+
color: 'primary' | 'success' | 'danger' | 'warning' | 'surface' | 'on-surface';
|
|
25
26
|
/**
|
|
26
27
|
* Button size.
|
|
27
28
|
* Possible values are `"sm"`, `"md"`, `"lg"`. Defaults to `"md"`.
|
|
@@ -40,14 +41,6 @@ export declare class BaseButton extends LitElement {
|
|
|
40
41
|
* If button is disabled, the reason why it is disabled.
|
|
41
42
|
*/
|
|
42
43
|
disabledReason: string;
|
|
43
|
-
/**
|
|
44
|
-
* Hyperlink to navigate to on click.
|
|
45
|
-
*/
|
|
46
|
-
href?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Sets or retrieves the window or frame at which to target content.
|
|
49
|
-
*/
|
|
50
|
-
target: string;
|
|
51
44
|
configAria?: {
|
|
52
45
|
[key: string]: any;
|
|
53
46
|
};
|
|
@@ -68,11 +61,11 @@ export declare class BaseButton extends LitElement {
|
|
|
68
61
|
connectedCallback(): void;
|
|
69
62
|
disconnectedCallback(): void;
|
|
70
63
|
__handlePress: (event: KeyboardEvent | MouseEvent) => void;
|
|
71
|
-
__isLink(): boolean;
|
|
72
64
|
__dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void;
|
|
73
65
|
__dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
|
|
74
66
|
__convertTypeToVariantAndColor(): void;
|
|
75
|
-
|
|
67
|
+
protected get __disabledReasonID(): string | undefined;
|
|
76
68
|
__renderDisabledReason(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
77
69
|
__renderTooltip(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
78
70
|
}
|
|
71
|
+
export {};
|
|
@@ -45,9 +45,9 @@ export declare class ButtonGroup extends LitElement {
|
|
|
45
45
|
orientation: 'horizontal' | 'vertical';
|
|
46
46
|
/**
|
|
47
47
|
* Color applied to all buttons in the group.
|
|
48
|
-
* Possible values are `"primary"`, `"success"`, `"danger"`, `"warning"`, `"
|
|
48
|
+
* Possible values are `"primary"`, `"success"`, `"danger"`, `"warning"`, `"surface"`, `"on-surface"`.
|
|
49
49
|
*/
|
|
50
|
-
color?: 'primary' | 'success' | 'danger' | 'warning' | '
|
|
50
|
+
color?: 'primary' | 'success' | 'danger' | 'warning' | 'surface' | 'on-surface';
|
|
51
51
|
/**
|
|
52
52
|
* Visual style applied to all buttons in the group.
|
|
53
53
|
* Possible values are `"filled"`, `"tonal"`, `"outlined"`.
|
|
@@ -8,7 +8,7 @@ import { LitElement, nothing } from 'lit';
|
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```html
|
|
11
|
-
* <wc-empty-state
|
|
11
|
+
* <wc-empty-state style="width:100%" headline="No items found"></wc-empty-state>
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
14
|
export declare class EmptyState extends LitElement {
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { LitElement, nothing } from 'lit';
|
|
2
|
+
import { IconProvider } from '../icon/icon.js';
|
|
3
|
+
/**
|
|
4
|
+
* @label FAB
|
|
5
|
+
* @tag wc-fab
|
|
6
|
+
* @rawTag fab
|
|
7
|
+
*
|
|
8
|
+
* @summary The FAB (Floating Action Button) represents the primary action on a screen.
|
|
9
|
+
* @overview
|
|
10
|
+
* <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>
|
|
11
|
+
*
|
|
12
|
+
* @cssprop --fab-container-color: Background color of the FAB container.
|
|
13
|
+
* @cssprop --fab-label-text-color: Text and icon color of the FAB label.
|
|
14
|
+
* @cssprop --fab-container-shape: Corner radius of the FAB. Defaults to var(--shape-corner-large).
|
|
15
|
+
* @cssprop --fab-container-elevation-level: Elevation level of the FAB. Defaults to 3.
|
|
16
|
+
*
|
|
17
|
+
* @fires {MouseEvent} click - Dispatched when the FAB is clicked.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```html
|
|
21
|
+
* <wc-fab name="add"></wc-fab>
|
|
22
|
+
* ```
|
|
23
|
+
* @tags controls
|
|
24
|
+
*/
|
|
25
|
+
export declare class Fab extends LitElement {
|
|
26
|
+
#private;
|
|
27
|
+
static styles: import("lit").CSSResultGroup[];
|
|
28
|
+
/**
|
|
29
|
+
* Name of the icon to display inside the FAB.
|
|
30
|
+
*/
|
|
31
|
+
name?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Source URL for a custom icon.
|
|
34
|
+
*/
|
|
35
|
+
src?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Icon provider. Defaults to `"material-symbols"`.
|
|
38
|
+
*/
|
|
39
|
+
provider: IconProvider;
|
|
40
|
+
/**
|
|
41
|
+
* Optional label text for the extended FAB variant.
|
|
42
|
+
* When set, the FAB displays both the icon and a text label.
|
|
43
|
+
*/
|
|
44
|
+
label?: string;
|
|
45
|
+
/**
|
|
46
|
+
* The color role of the FAB.
|
|
47
|
+
* `"surface"` uses the surface color role.
|
|
48
|
+
* `"primary"` uses the primary color role.
|
|
49
|
+
* `"secondary"` uses the secondary color role.
|
|
50
|
+
* `"tertiary"` uses the tertiary color role.
|
|
51
|
+
*/
|
|
52
|
+
color: 'surface' | 'primary' | 'secondary' | 'tertiary';
|
|
53
|
+
/**
|
|
54
|
+
* The style variant of the FAB.
|
|
55
|
+
* `"tonal"` uses container colors.
|
|
56
|
+
* `"filled"` uses solid role colors.
|
|
57
|
+
*/
|
|
58
|
+
variant: 'tonal' | 'filled';
|
|
59
|
+
/**
|
|
60
|
+
* The size of the FAB.
|
|
61
|
+
* `"sm"` renders a small FAB (40×40dp).
|
|
62
|
+
* `"md"` renders a standard FAB (56×56dp). This is the default.
|
|
63
|
+
* `"lg"` renders a large FAB (96×96dp).
|
|
64
|
+
*/
|
|
65
|
+
size: 'sm' | 'md' | 'lg';
|
|
66
|
+
/**
|
|
67
|
+
* If `true`, the FAB is in a lowered (resting) state with reduced elevation.
|
|
68
|
+
*/
|
|
69
|
+
lowered: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* If `true`, the user cannot interact with the FAB.
|
|
72
|
+
*/
|
|
73
|
+
disabled: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Hyperlink to navigate to on click.
|
|
76
|
+
*/
|
|
77
|
+
href?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Sets or retrieves the window or frame at which to target content.
|
|
80
|
+
*/
|
|
81
|
+
target: string;
|
|
82
|
+
/**
|
|
83
|
+
* Additional ARIA attributes to pass to the inner button/anchor element.
|
|
84
|
+
*/
|
|
85
|
+
configAria?: {
|
|
86
|
+
[key: string]: any;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Sets the delay for throttle in milliseconds. Defaults to 200 milliseconds.
|
|
90
|
+
*/
|
|
91
|
+
throttleDelay: number;
|
|
92
|
+
/**
|
|
93
|
+
* Tooltip text shown on hover.
|
|
94
|
+
*/
|
|
95
|
+
tooltip?: string;
|
|
96
|
+
isPressed: boolean;
|
|
97
|
+
readonly fabElement: HTMLElement | null;
|
|
98
|
+
focus(): void;
|
|
99
|
+
blur(): void;
|
|
100
|
+
connectedCallback(): void;
|
|
101
|
+
disconnectedCallback(): void;
|
|
102
|
+
firstUpdated(): void;
|
|
103
|
+
__handlePress: (event: KeyboardEvent | MouseEvent) => void;
|
|
104
|
+
__isLink(): boolean;
|
|
105
|
+
__dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void;
|
|
106
|
+
__dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
|
|
107
|
+
__getDisabledReasonID(): string | typeof nothing;
|
|
108
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
109
|
+
__renderFabContent(isExtended: boolean): import("lit-html").TemplateResult<1>;
|
|
110
|
+
__renderTooltip(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
111
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Fab } from './fab.js';
|
package/dist/src/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { Divider } from './divider/index.js';
|
|
|
5
5
|
export { Clock } from './clock/index.js';
|
|
6
6
|
export { Elevation } from './elevation/index.js';
|
|
7
7
|
export { Button, ButtonGroup, IconButton } from './button/index.js';
|
|
8
|
+
export { Fab } from './fab/index.js';
|
|
8
9
|
export { SegmentedButton, SegmentedButtonGroup } from './segmented-button/index.js';
|
|
9
10
|
export { FocusRing } from './focus-ring/index.js';
|
|
10
11
|
export { Ripple } from './ripple/index.js';
|
|
@@ -42,6 +43,8 @@ export { Table } from './table/index.js';
|
|
|
42
43
|
export { Pagination } from './pagination/index.js';
|
|
43
44
|
export { TreeView, TreeNode } from './tree-view/index.js';
|
|
44
45
|
export { Card } from './card/index.js';
|
|
46
|
+
export { Banner } from './banner/index.js';
|
|
47
|
+
export { Notification } from './notification/index.js';
|
|
45
48
|
export { Snackbar } from './snackbar/index.js';
|
|
46
49
|
export { Radio } from './radio/index.js';
|
|
47
50
|
export { BottomSheet } from './bottom-sheet/index.js';
|
|
@@ -49,3 +52,5 @@ export { SideSheet } from './side-sheet/index.js';
|
|
|
49
52
|
export { Select } from './select/index.js';
|
|
50
53
|
export type { SelectOption } from './select/index.js';
|
|
51
54
|
export { SelectOptionElement } from './select/index.js';
|
|
55
|
+
export { Search } from './search/index.js';
|
|
56
|
+
export { Toolbar } from './toolbar/index.js';
|
package/dist/src/link/link.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
declare const Link_base: typeof LitElement & (new (...args: any[]) => import("../__base_element/BaseHyperlink.js").BaseHyperlinkInterface);
|
|
2
3
|
/**
|
|
3
4
|
* @label Link
|
|
4
5
|
* @tag wc-link
|
|
@@ -12,16 +13,8 @@ import { LitElement } from 'lit';
|
|
|
12
13
|
* <wc-link href="#">Link</wc-link>
|
|
13
14
|
* ```
|
|
14
15
|
*/
|
|
15
|
-
export declare class Link extends
|
|
16
|
+
export declare class Link extends Link_base {
|
|
16
17
|
static styles: import("lit").CSSResultGroup[];
|
|
17
|
-
/**
|
|
18
|
-
* Hyperlink to navigate to on click.
|
|
19
|
-
*/
|
|
20
|
-
href?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Sets or retrieves the window or frame at which to target content.
|
|
23
|
-
*/
|
|
24
|
-
target: '_self' | '_parent' | '_blank' | '_top' | string;
|
|
25
|
-
tabIndexValue?: number;
|
|
26
18
|
render(): import("lit-html").TemplateResult<1>;
|
|
27
19
|
}
|
|
20
|
+
export {};
|
|
@@ -22,9 +22,9 @@ type CloseReason = {
|
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
24
|
* ```html
|
|
25
|
-
* <wc-menu>
|
|
25
|
+
* <wc-menu preview>
|
|
26
26
|
* <wc-menu-item>Item 1</wc-menu-item>
|
|
27
|
-
* <wc-menu-item>Item 2</wc-menu-item>
|
|
27
|
+
* <wc-menu-item selected>Item 2</wc-menu-item>
|
|
28
28
|
* </wc-menu>
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
@@ -34,6 +34,7 @@ export declare class Menu extends LitElement {
|
|
|
34
34
|
open: boolean;
|
|
35
35
|
variant: 'standard' | 'vibrant';
|
|
36
36
|
anchor: string;
|
|
37
|
+
preview: boolean;
|
|
37
38
|
stayOpenOnOutsideClick: boolean;
|
|
38
39
|
stayOpenOnFocusout: boolean;
|
|
39
40
|
isSubmenu: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Notification } from './notification.js';
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { LitElement, nothing } from 'lit';
|
|
2
|
+
type NotificationVariant = 'success' | 'error' | 'info' | 'warning';
|
|
3
|
+
/**
|
|
4
|
+
* @label Notification
|
|
5
|
+
* @tag wc-notification
|
|
6
|
+
* @rawTag notification
|
|
7
|
+
* @summary Notifications communicate contextual status, errors, warnings, and success messages.
|
|
8
|
+
*
|
|
9
|
+
* @cssprop --notification-container-color - Surface color for the notification container.
|
|
10
|
+
* @cssprop --notification-text-color - Label and supporting text color.
|
|
11
|
+
* @cssprop --notification-leading-icon-color - Leading state icon color.
|
|
12
|
+
* @cssprop --notification-accent-color - Start border color for status emphasis.
|
|
13
|
+
* @cssprop --notification-border-radius - Border radius of the notification container.
|
|
14
|
+
*
|
|
15
|
+
* @fires {CustomEvent} notification-dismiss - Fired when the notification is dismissed.
|
|
16
|
+
* @fires {CustomEvent} notification-action-click - Fired when the action button is clicked.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <wc-notification variant="success" action="Undo" dismissible>
|
|
21
|
+
* <span slot="title">Record saved</span>
|
|
22
|
+
* </wc-notification>
|
|
23
|
+
* ```
|
|
24
|
+
* @tags display, feedback
|
|
25
|
+
*/
|
|
26
|
+
export declare class Notification extends LitElement {
|
|
27
|
+
static styles: import("lit").CSSResultGroup[];
|
|
28
|
+
/**
|
|
29
|
+
* If true, content and actions are laid out in a single row.
|
|
30
|
+
*/
|
|
31
|
+
inline: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* The visual variant of the notification.
|
|
34
|
+
*/
|
|
35
|
+
variant: NotificationVariant;
|
|
36
|
+
/**
|
|
37
|
+
* Enables a high contrast appearance.
|
|
38
|
+
*/
|
|
39
|
+
highContrast: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* If true, renders a dismiss icon button.
|
|
42
|
+
*/
|
|
43
|
+
dismissible: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Action label text. When provided, an action button is shown.
|
|
46
|
+
*/
|
|
47
|
+
action: string;
|
|
48
|
+
/**
|
|
49
|
+
* If true, the host controls visibility when dismissed.
|
|
50
|
+
*/
|
|
51
|
+
managed: boolean;
|
|
52
|
+
private isHidden;
|
|
53
|
+
private hasSubtitle;
|
|
54
|
+
/**
|
|
55
|
+
* Programmatically reveals the notification.
|
|
56
|
+
*/
|
|
57
|
+
show(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Programmatically dismisses the notification.
|
|
60
|
+
*/
|
|
61
|
+
dismiss(): void;
|
|
62
|
+
private get variantIcon();
|
|
63
|
+
private get variantLabel();
|
|
64
|
+
private emitActionClick;
|
|
65
|
+
private hideAndEmitDismiss;
|
|
66
|
+
private handleSubtitleSlotChange;
|
|
67
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
68
|
+
}
|
|
69
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
import type { PropertyValues } from 'lit';
|
|
2
3
|
/**
|
|
3
4
|
* @label Pagination
|
|
4
5
|
* @tag wc-pagination
|
|
@@ -11,7 +12,7 @@ import { LitElement } from 'lit';
|
|
|
11
12
|
*
|
|
12
13
|
* @example
|
|
13
14
|
* ```html
|
|
14
|
-
* <wc-pagination page="1" page-size="10" total-items="100"></wc-pagination>
|
|
15
|
+
* <wc-pagination style="width: 100%;" page="1" page-size="10" total-items="100"></wc-pagination>
|
|
15
16
|
* ```
|
|
16
17
|
* @tags navigation, data
|
|
17
18
|
*/
|
|
@@ -33,6 +34,12 @@ export declare class Pagination extends LitElement {
|
|
|
33
34
|
* Supported page size options.
|
|
34
35
|
*/
|
|
35
36
|
pageSizes: number[];
|
|
37
|
+
protected willUpdate(changedProperties: PropertyValues<Pagination>): void;
|
|
38
|
+
private getTotalPages;
|
|
39
|
+
private setPage;
|
|
40
|
+
private handlePageSizeChange;
|
|
41
|
+
private handlePreviousPage;
|
|
42
|
+
private handleNextPage;
|
|
36
43
|
private dispatchPageEvent;
|
|
37
44
|
render(): import("lit-html").TemplateResult<1>;
|
|
38
45
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Search } from './search.js';
|