tinkiet 0.9.12 → 0.10.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/accordion/accordion.d.ts +3 -4
- package/accordion/index.d.ts +1 -1
- package/accordion/index.js +491 -1
- package/badge/badge.d.ts +2 -3
- package/badge/index.d.ts +1 -1
- package/badge/index.js +134 -1
- package/box/box.d.ts +3 -3
- package/box/focusable-box.d.ts +2 -3
- package/box/index.d.ts +1 -1
- package/box/index.js +289 -1
- package/button/button.d.ts +3 -4
- package/button/index.d.ts +1 -1
- package/button/index.js +502 -1
- package/checkbox/checkbox.d.ts +3 -3
- package/checkbox/index.d.ts +1 -1
- package/checkbox/index.js +450 -1
- package/chip/chip.d.ts +2 -3
- package/chip/index.d.ts +1 -1
- package/chip/index.js +123 -1
- package/dialog/dialog.d.ts +2 -3
- package/dialog/index.d.ts +1 -1
- package/dialog/index.js +162 -1
- package/drawer/drawer.d.ts +2 -3
- package/drawer/index.d.ts +1 -1
- package/drawer/index.js +272 -1
- package/form/form.d.ts +1 -2
- package/form/index.d.ts +1 -1
- package/form/index.js +149 -1
- package/icon/icon.d.ts +3 -4
- package/icon/icons.d.ts +1 -2
- package/icon/index.d.ts +2 -2
- package/icon/index.js +457 -2
- package/index.d.ts +52 -26
- package/index.js +3682 -52
- package/list-item/index.d.ts +1 -1
- package/list-item/index.js +414 -1
- package/list-item/list-item.d.ts +3 -4
- package/loading/index.d.ts +1 -1
- package/loading/index.js +389 -1
- package/loading/loading.d.ts +3 -4
- package/navigation/index.d.ts +2 -2
- package/navigation/index.js +201 -2
- package/navigation/navigation-bar.d.ts +2 -3
- package/navigation/navigation-item.d.ts +2 -3
- package/notie/index.d.ts +1 -1
- package/notie/index.js +744 -1
- package/notie/notie.d.ts +12 -11
- package/package.json +8 -5
- package/pages/index.d.ts +1 -1
- package/pages/index.js +178 -1
- package/pages/pages.d.ts +2 -3
- package/radio/index.d.ts +1 -1
- package/radio/index.js +466 -1
- package/radio/radio.d.ts +3 -3
- package/select/index.d.ts +1 -1
- package/select/index.js +493 -1
- package/select/select.d.ts +3 -3
- package/slider/index.d.ts +1 -1
- package/slider/index.js +274 -1
- package/slider/slider.d.ts +2 -3
- package/snackbar/index.d.ts +1 -0
- package/snackbar/snackbar.d.ts +34 -0
- package/switch/index.d.ts +1 -1
- package/switch/index.js +462 -1
- package/switch/switch.d.ts +3 -3
- package/tab-group/index.d.ts +1 -1
- package/tab-group/index.js +182 -1
- package/tab-group/tab-group.d.ts +2 -3
- package/tab-group/tab-item.d.ts +7 -0
- package/textarea/index.d.ts +1 -1
- package/textarea/index.js +272 -1
- package/textarea/textarea.d.ts +2 -3
- package/textfield/index.d.ts +1 -1
- package/textfield/index.js +278 -1
- package/textfield/textfield.d.ts +2 -3
- package/theme/index.d.ts +1 -1
- package/theme/index.js +240 -1
- package/theme/theme.d.ts +2 -3
- package/tooltip/index.d.ts +1 -1
- package/tooltip/index.js +136 -1
- package/tooltip/tooltip.d.ts +2 -3
- package/topbar/index.d.ts +1 -1
- package/topbar/index.js +358 -1
- package/topbar/topbar.d.ts +3 -4
- package/umd/tinkiet.min.js +420 -1
- package/utils/aria.d.ts +11 -0
- package/utils/unique.d.ts +1 -2
- package/accordion/accordion.js +0 -94
- package/accordion/accordion.scss.js +0 -4
- package/badge/badge.js +0 -31
- package/badge/badge.scss.js +0 -4
- package/box/box.js +0 -186
- package/box/box.scss.js +0 -4
- package/box/focusable-box.js +0 -30
- package/button/button.js +0 -141
- package/button/button.scss.js +0 -4
- package/checkbox/checkbox.js +0 -89
- package/checkbox/checkbox.scss.js +0 -4
- package/chip/chip.js +0 -20
- package/chip/chip.scss.js +0 -4
- package/dialog/dialog.js +0 -59
- package/dialog/dialog.scss.js +0 -4
- package/drawer/drawer.js +0 -168
- package/drawer/drawer.scss.js +0 -4
- package/form/form.js +0 -54
- package/icon/icon.js +0 -77
- package/icon/icon.scss.js +0 -4
- package/icon/icons.js +0 -24
- package/index.d.ts.map +0 -1
- package/list-item/list-item.js +0 -86
- package/list-item/list-item.scss.js +0 -4
- package/loading/loading.js +0 -61
- package/loading/loading.scss.js +0 -4
- package/navigation/navigation-bar.js +0 -20
- package/navigation/navigation-bar.scss.js +0 -4
- package/navigation/navigation-item.js +0 -51
- package/navigation/navigation-item.scss.js +0 -4
- package/notie/notie.js +0 -201
- package/notie/notie.scss.js +0 -4
- package/pages/pages.js +0 -75
- package/pages/pages.scss.js +0 -4
- package/radio/radio.js +0 -105
- package/radio/radio.scss.js +0 -4
- package/select/select.js +0 -132
- package/select/select.scss.js +0 -4
- package/slider/slider.js +0 -135
- package/slider/slider.scss.js +0 -4
- package/switch/switch.js +0 -101
- package/switch/switch.scss.js +0 -4
- package/tab-group/tab-group.js +0 -79
- package/tab-group/tab-group.scss.js +0 -4
- package/textarea/textarea.js +0 -133
- package/textarea/textarea.scss.js +0 -4
- package/textfield/textfield.js +0 -138
- package/textfield/textfield.scss.js +0 -4
- package/theme/theme.js +0 -137
- package/theme/theme.scss.js +0 -4
- package/tooltip/tooltip.js +0 -33
- package/tooltip/tooltip.scss.js +0 -4
- package/topbar/topbar.js +0 -33
- package/topbar/topbar.scss.js +0 -4
- package/umd/tinkiet.min.d.ts +0 -660
- package/umd/tinkiet.min.d.ts.map +0 -1
- package/utils/unique.js +0 -12
package/utils/aria.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Updates the tabindex and respects tab index set by the page author.
|
|
3
|
+
* @param $elem
|
|
4
|
+
* @param disabled
|
|
5
|
+
*/
|
|
6
|
+
export declare function updateTabindex($elem: HTMLElement, disabled: boolean): void;
|
|
7
|
+
/**
|
|
8
|
+
* All possible aria roles.
|
|
9
|
+
* Compiled from https://www.w3.org/WAI/PF/aria/roles
|
|
10
|
+
*/
|
|
11
|
+
export type AriaRole = "alert" | "alertdialog" | "application" | "article" | "banner" | "button" | "checkbox" | "columnheader" | "combobox" | "command" | "complementary" | "composite" | "contentinfo" | "definition" | "dialog" | "directory" | "document" | "form" | "grid" | "gridcell" | "group" | "heading" | "img" | "input" | "landmark" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "range" | "region" | "roletype" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "section" | "sectionhead" | "select" | "separator" | "slider" | "spinbutton" | "status" | "structure" | "tab" | "tablist" | "tabpanel" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | "widget" | "window";
|
package/utils/unique.d.ts
CHANGED
package/accordion/accordion.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
|
-
import { css, unsafeCSS, html } from 'lit';
|
|
3
|
-
import { property, query, customElement } from 'lit/decorators.js';
|
|
4
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
-
import '../box/index.js';
|
|
6
|
-
import { TkFocusableBox } from '../box/focusable-box.js';
|
|
7
|
-
import css_248z from './accordion.scss.js';
|
|
8
|
-
import { TkBox } from '../box/box.js';
|
|
9
|
-
|
|
10
|
-
let TkAccordion = class TkAccordion extends TkFocusableBox {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.checked = false;
|
|
14
|
-
this.rippleHeader = false;
|
|
15
|
-
}
|
|
16
|
-
static get styles() {
|
|
17
|
-
return [
|
|
18
|
-
...TkBox.styles,
|
|
19
|
-
css `
|
|
20
|
-
${unsafeCSS(css_248z)}
|
|
21
|
-
`
|
|
22
|
-
];
|
|
23
|
-
}
|
|
24
|
-
render() {
|
|
25
|
-
return html `
|
|
26
|
-
<tk-box margin="small">
|
|
27
|
-
<tk-box
|
|
28
|
-
@click=${this.handleClick.bind(this)}
|
|
29
|
-
?ripple=${this.rippleHeader}
|
|
30
|
-
class="header"
|
|
31
|
-
direction="row"
|
|
32
|
-
align-items="center"
|
|
33
|
-
>
|
|
34
|
-
<tk-box class="before">
|
|
35
|
-
<slot name="before"></slot>
|
|
36
|
-
</tk-box>
|
|
37
|
-
<tk-box class="header-content">
|
|
38
|
-
<h3 class="title"><slot name="title"></slot></h3>
|
|
39
|
-
<h5><slot name="description"></slot></h5>
|
|
40
|
-
</tk-box>
|
|
41
|
-
</tk-box>
|
|
42
|
-
<tk-box class="content">
|
|
43
|
-
<slot></slot>
|
|
44
|
-
</tk-box>
|
|
45
|
-
</tk-box>
|
|
46
|
-
<input
|
|
47
|
-
id=${this.id}
|
|
48
|
-
slot="none"
|
|
49
|
-
style="display: none;"
|
|
50
|
-
type="radio"
|
|
51
|
-
?checked="${this.checked}"
|
|
52
|
-
?disabled="${this.disabled}"
|
|
53
|
-
name="${ifDefined(this.name)}"
|
|
54
|
-
aria-hidden="true"
|
|
55
|
-
tabindex="-1"
|
|
56
|
-
/>
|
|
57
|
-
`;
|
|
58
|
-
}
|
|
59
|
-
firstUpdated() {
|
|
60
|
-
this.appendChild(this.$input);
|
|
61
|
-
}
|
|
62
|
-
onKeyDown(e) {
|
|
63
|
-
if (e.code === "Space" || e.code === "Enter") {
|
|
64
|
-
e.preventDefault();
|
|
65
|
-
e.stopPropagation();
|
|
66
|
-
this.click();
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
handleClick() {
|
|
70
|
-
this.checked = !this.checked;
|
|
71
|
-
if (this.checked && this.name)
|
|
72
|
-
this.getRootNode()
|
|
73
|
-
.querySelectorAll(`tk-accordion[name="${this.name}"]`)
|
|
74
|
-
.forEach(el => (el != this ? (el.checked = false) : null));
|
|
75
|
-
this.dispatchEvent(new Event("change"));
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
__decorate([
|
|
79
|
-
property({ attribute: true, type: String })
|
|
80
|
-
], TkAccordion.prototype, "name", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
property({ attribute: true, type: Boolean, reflect: true })
|
|
83
|
-
], TkAccordion.prototype, "checked", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
property({ attribute: "ripple-header", type: Boolean })
|
|
86
|
-
], TkAccordion.prototype, "rippleHeader", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
query("input")
|
|
89
|
-
], TkAccordion.prototype, "$input", void 0);
|
|
90
|
-
TkAccordion = __decorate([
|
|
91
|
-
customElement("tk-accordion")
|
|
92
|
-
], TkAccordion);
|
|
93
|
-
|
|
94
|
-
export { TkAccordion };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var css_248z = "@charset \"UTF-8\";*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host .header{background-color:hsl(var(--surface-container-lowest));border:2px solid hsl(var(--outline));color:hsl(var(--on-surface));cursor:pointer;padding:16px}:host .header>*{margin:0 10px}:host .header:after{content:\"▼\";display:inline-block;font-size:12px;transition:transform .3s}:host .header .before{width:fit-content}:host .header .header-content{flex:1}:host .content{height:0;margin:0 auto;opacity:0;transition:all .2s;visibility:hidden;width:95%}:host h3,:host h5{margin:0}:host([checked]) .header{background-color:hsl(var(--primary));color:hsl(var(--on-primary))}:host([checked]) .header:after{transform:rotate(180deg)}:host([checked]) .content{height:auto;opacity:1;transition:all .3s,opacity .7s;visibility:visible}:host([pill]) .header{border-radius:9999px}";
|
|
2
|
-
var stylesheet="@charset \"UTF-8\";*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host .header{background-color:hsl(var(--surface-container-lowest));border:2px solid hsl(var(--outline));color:hsl(var(--on-surface));cursor:pointer;padding:16px}:host .header>*{margin:0 10px}:host .header:after{content:\"▼\";display:inline-block;font-size:12px;transition:transform .3s}:host .header .before{width:fit-content}:host .header .header-content{flex:1}:host .content{height:0;margin:0 auto;opacity:0;transition:all .2s;visibility:hidden;width:95%}:host h3,:host h5{margin:0}:host([checked]) .header{background-color:hsl(var(--primary));color:hsl(var(--on-primary))}:host([checked]) .header:after{transform:rotate(180deg)}:host([checked]) .content{height:auto;opacity:1;transition:all .3s,opacity .7s;visibility:visible}:host([pill]) .header{border-radius:9999px}";
|
|
3
|
-
|
|
4
|
-
export { css_248z as default, stylesheet };
|
package/badge/badge.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
|
-
import { LitElement, css, unsafeCSS, html } from 'lit';
|
|
3
|
-
import { property, customElement } from 'lit/decorators.js';
|
|
4
|
-
import css_248z from './badge.scss.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A badge WebComponent
|
|
8
|
-
* @cssprop --tk-badge-color - Color of widget default to --primary
|
|
9
|
-
* @cssprop --tk-badge-text-color - Text color of widget to --on-primary
|
|
10
|
-
*/
|
|
11
|
-
let TkBadge = class TkBadge extends LitElement {
|
|
12
|
-
static get styles() {
|
|
13
|
-
return css `
|
|
14
|
-
${unsafeCSS(css_248z)}
|
|
15
|
-
`;
|
|
16
|
-
}
|
|
17
|
-
render() {
|
|
18
|
-
return html `
|
|
19
|
-
<slot></slot>
|
|
20
|
-
<div class="badge ${this.label ? "" : "empty"}">${this.label}</div>
|
|
21
|
-
`;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
__decorate([
|
|
25
|
-
property()
|
|
26
|
-
], TkBadge.prototype, "label", void 0);
|
|
27
|
-
TkBadge = __decorate([
|
|
28
|
-
customElement("tk-badge")
|
|
29
|
-
], TkBadge);
|
|
30
|
-
|
|
31
|
-
export { TkBadge };
|
package/badge/badge.scss.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{display:inline-flex}:host .badge{background-color:hsl(var(--error));border-radius:8px;color:hsl(var(--on-error));cursor:inherit;font-family:Trebuchet MS,Lucida Sans Unicode,Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:10px;height:16px;line-height:8px;max-width:34px;min-width:16px;padding:4px;text-align:center;user-select:none;white-space:nowrap}:host .badge.empty{border-radius:100%;height:6px;min-width:6px;width:6px}";
|
|
2
|
-
var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{display:inline-flex}:host .badge{background-color:hsl(var(--error));border-radius:8px;color:hsl(var(--on-error));cursor:inherit;font-family:Trebuchet MS,Lucida Sans Unicode,Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:10px;height:16px;line-height:8px;max-width:34px;min-width:16px;padding:4px;text-align:center;user-select:none;white-space:nowrap}:host .badge.empty{border-radius:100%;height:6px;min-width:6px;width:6px}";
|
|
3
|
-
|
|
4
|
-
export { css_248z as default, stylesheet };
|
package/box/box.js
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
|
-
import { LitElement, css, unsafeCSS, html } from 'lit';
|
|
3
|
-
import { property, customElement } from 'lit/decorators.js';
|
|
4
|
-
import css_248z from './box.scss.js';
|
|
5
|
-
|
|
6
|
-
const colors = [
|
|
7
|
-
"primary-lighter",
|
|
8
|
-
"primary-light",
|
|
9
|
-
"primary",
|
|
10
|
-
"primary-dark",
|
|
11
|
-
"primary-darker",
|
|
12
|
-
"on-primary-lighter",
|
|
13
|
-
"on-primary-light",
|
|
14
|
-
"on-primary",
|
|
15
|
-
"on-primary-dark",
|
|
16
|
-
"on-primary-darker",
|
|
17
|
-
"accent-lighter",
|
|
18
|
-
"accent-light",
|
|
19
|
-
"accent",
|
|
20
|
-
"accent-dark",
|
|
21
|
-
"accent-darker",
|
|
22
|
-
"on-accent-lighter",
|
|
23
|
-
"on-accent-light",
|
|
24
|
-
"on-accent",
|
|
25
|
-
"on-accent-dark",
|
|
26
|
-
"on-accent-darker",
|
|
27
|
-
"error-lighter",
|
|
28
|
-
"error-light",
|
|
29
|
-
"error",
|
|
30
|
-
"error-dark",
|
|
31
|
-
"error-darker",
|
|
32
|
-
"on-error-lighter",
|
|
33
|
-
"on-error-light",
|
|
34
|
-
"on-error",
|
|
35
|
-
"on-error-dark",
|
|
36
|
-
"on-error-darker",
|
|
37
|
-
"shade-lighter",
|
|
38
|
-
"shade-light",
|
|
39
|
-
"shade",
|
|
40
|
-
"shade-dark",
|
|
41
|
-
"shade-darker",
|
|
42
|
-
"on-shade-lighter",
|
|
43
|
-
"on-shade-light",
|
|
44
|
-
"on-shade",
|
|
45
|
-
"on-shade-dark",
|
|
46
|
-
"on-shade-darker"
|
|
47
|
-
];
|
|
48
|
-
/**
|
|
49
|
-
* A container that lays out its contents in one direction
|
|
50
|
-
*
|
|
51
|
-
* @attr {"none" | "small" | "medium" | "large" | "xlarge" | "circle" | "pill" } radius - border radius
|
|
52
|
-
* @attr {"around" | "between" | "center" | "end" | "start" | "stretch"} align-content - How to align the contents when there is extra space in the cross axis.
|
|
53
|
-
* @attr [align-content="stretch"]
|
|
54
|
-
* @attr {"baseline" | "center" | "end" | "start" | "stretch"} align-items - How to align the contents along the cross axis.
|
|
55
|
-
* @attr {"center" | "end" | "start" | "stretch"} align-self - How to align along the cross axis when contained in a Box or along the column axis when contained in a Grid.
|
|
56
|
-
* @attr {"row" | "column"} direction - The orientation to layout the child components in.
|
|
57
|
-
* @attr [direction="column"]
|
|
58
|
-
* @attr {1|2|3} elevation - Elevated height above the underlying context, indicated via a drop shadow.
|
|
59
|
-
* @attr {"horizontal" | "vertical" | "true" | "false"} fill - Whether the width and/or height should fill the container.
|
|
60
|
-
* @attr {"grow" | "shrink" | "true" | "false"} flex - flex-grow and/or flex-shrink
|
|
61
|
-
* @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} gap - The amount of spacing between child elements. This should not be used in conjunction with 'wrap' as the gap elements will not wrap gracefully. If a child is a Fragment, Box will not add a gap between the children of the Fragment.
|
|
62
|
-
* @attr {"around" | "between" | "center" | "end" | "evenly" | "start" | "stretch"} justify - How to align the contents along the main axis.
|
|
63
|
-
* @attr [justify="stretch"]
|
|
64
|
-
* @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} margin - The amount of margin around the component. An object can be specified to distinguish horizontal margin, vertical margin, and margin on a particular side.
|
|
65
|
-
* @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} vmargin - The amount of vertical margin around the component. An object can be specified to distinguish horizontal margin, vertical margin, and margin on a particular side.
|
|
66
|
-
* @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} hmargin - The amount of horizontal margin around the component. An object can be specified to distinguish horizontal margin, vertical margin, and margin on a particular side.
|
|
67
|
-
* @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} padding - The amount of padding around the box contents. An object can be specified to distinguish horizontal padding, vertical padding, and padding on a particular side of the box.
|
|
68
|
-
* @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} vpadding - The amount of vertical padding around the box contents. An object can be specified to distinguish horizontal padding, vertical padding, and padding on a particular side of the box.
|
|
69
|
-
* @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} hpadding - The amount of horizontal padding around the box contents. An object can be specified to distinguish horizontal padding, vertical padding, and padding on a particular side of the box.
|
|
70
|
-
* @attr {"center" | "justify" | "left" | "right"} text - Text align
|
|
71
|
-
* @attr {"xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge"} width - A fixed width.
|
|
72
|
-
* @attr {"xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge"} height - A fixed height.
|
|
73
|
-
* @attr {"auto" | "hidden" | "scroll" | "visible"} overflow - box overflow.
|
|
74
|
-
* @attr { "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | "lighter" | "bold" | "bolder"} weight - Font weight.
|
|
75
|
-
* @attr {"true" | "false" | "reverse"} wrap - Whether children can wrap if they can't all fit.
|
|
76
|
-
* @attr [wrap="false"]
|
|
77
|
-
*/
|
|
78
|
-
let TkBox = class TkBox extends LitElement {
|
|
79
|
-
constructor() {
|
|
80
|
-
super(...arguments);
|
|
81
|
-
/**
|
|
82
|
-
* Activate ripple
|
|
83
|
-
*/
|
|
84
|
-
this.ripple = false;
|
|
85
|
-
}
|
|
86
|
-
static get styles() {
|
|
87
|
-
return [
|
|
88
|
-
css `
|
|
89
|
-
${unsafeCSS(css_248z)}
|
|
90
|
-
`
|
|
91
|
-
];
|
|
92
|
-
}
|
|
93
|
-
render() {
|
|
94
|
-
return html `
|
|
95
|
-
<slot></slot>
|
|
96
|
-
`;
|
|
97
|
-
}
|
|
98
|
-
connectedCallback() {
|
|
99
|
-
if (this.ripple) {
|
|
100
|
-
this.addEventListener("mousedown", this.showRipple.bind(this), { passive: true });
|
|
101
|
-
this.addEventListener("mouseup", this.hideRipple.bind(this), { passive: true });
|
|
102
|
-
}
|
|
103
|
-
super.connectedCallback();
|
|
104
|
-
}
|
|
105
|
-
disconnectedCallback() {
|
|
106
|
-
this.removeEventListener("mousedown", this.showRipple);
|
|
107
|
-
this.addEventListener("mouseup", this.hideRipple);
|
|
108
|
-
super.disconnectedCallback();
|
|
109
|
-
}
|
|
110
|
-
updated(props) {
|
|
111
|
-
// if (props.has("background") && ![...colors, "background", "foreground"].includes(this.background as string))
|
|
112
|
-
// this.style.setProperty("background-color", this.background.toString());
|
|
113
|
-
// if (props.has("color") && ![...colors, "background", "foreground"].includes(this.color as string))
|
|
114
|
-
// this.style.setProperty("color", this.color.toString());
|
|
115
|
-
super.updated(props);
|
|
116
|
-
}
|
|
117
|
-
showRipple(event) {
|
|
118
|
-
const x = event.clientX;
|
|
119
|
-
const y = event.clientY;
|
|
120
|
-
const { offsetWidth, offsetHeight } = this;
|
|
121
|
-
const container = document.createElement("span");
|
|
122
|
-
container.classList.add("ripple", "open");
|
|
123
|
-
const element = document.createElement("span");
|
|
124
|
-
container.appendChild(element);
|
|
125
|
-
this.shadowRoot.appendChild(container);
|
|
126
|
-
const rect = this.getBoundingClientRect();
|
|
127
|
-
const diameter = Math.max(offsetWidth, offsetWidth) * 2;
|
|
128
|
-
element.style.width = element.style.height = diameter + "px";
|
|
129
|
-
element.style.left = x - rect.left - diameter / 2 + "px";
|
|
130
|
-
element.style.top = y - rect.top - diameter / 2 + "px";
|
|
131
|
-
const inAnimation = element.animate({
|
|
132
|
-
transform: [`scale(0)`, `scale(1)`]
|
|
133
|
-
}, {
|
|
134
|
-
easing: "ease-out",
|
|
135
|
-
fill: "both",
|
|
136
|
-
duration: 500
|
|
137
|
-
});
|
|
138
|
-
inAnimation.onfinish = () => {
|
|
139
|
-
container.classList.remove("open");
|
|
140
|
-
const outAnimation = element.animate({
|
|
141
|
-
opacity: ["0.5", "0"]
|
|
142
|
-
}, {
|
|
143
|
-
easing: "ease-in",
|
|
144
|
-
fill: "both",
|
|
145
|
-
duration: 300
|
|
146
|
-
});
|
|
147
|
-
outAnimation.onfinish = () => {
|
|
148
|
-
requestAnimationFrame(() => {
|
|
149
|
-
container.remove();
|
|
150
|
-
});
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
hideRipple(event) {
|
|
155
|
-
var _a;
|
|
156
|
-
(_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".ripple:not([open])").forEach(container => {
|
|
157
|
-
const element = container.querySelector("span");
|
|
158
|
-
const outAnimation = element.animate({
|
|
159
|
-
opacity: ["0.5", "0"]
|
|
160
|
-
}, {
|
|
161
|
-
easing: "ease-out",
|
|
162
|
-
fill: "both",
|
|
163
|
-
duration: 300
|
|
164
|
-
});
|
|
165
|
-
outAnimation.onfinish = () => {
|
|
166
|
-
requestAnimationFrame(() => {
|
|
167
|
-
container.remove();
|
|
168
|
-
});
|
|
169
|
-
};
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
__decorate([
|
|
174
|
-
property({ type: Boolean })
|
|
175
|
-
], TkBox.prototype, "ripple", void 0);
|
|
176
|
-
__decorate([
|
|
177
|
-
property()
|
|
178
|
-
], TkBox.prototype, "background", void 0);
|
|
179
|
-
__decorate([
|
|
180
|
-
property()
|
|
181
|
-
], TkBox.prototype, "color", void 0);
|
|
182
|
-
TkBox = __decorate([
|
|
183
|
-
customElement("tk-box")
|
|
184
|
-
], TkBox);
|
|
185
|
-
|
|
186
|
-
export { TkBox };
|
package/box/box.scss.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{box-sizing:border-box;display:flex;flex-direction:column;position:relative}:host([hidden]){display:none}.ripple{bottom:0;left:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0}.ripple span{background-color:hsla(var(--on-primary),.5);border-radius:50%;position:absolute}:host([align-content=start]){align-content:flex-start}:host([align-content=end]){align-content:flex-end}:host([align-content=stretch]){align-content:stretch}:host([align-content=center]){align-content:center}:host([align-content=around]){align-content:space-around}:host([align-content=between]){align-content:space-between}:host([align-items=start]){align-items:flex-start}:host([align-items=end]){align-items:flex-end}:host([align-items=stretch]){align-items:stretch}:host([align-items=center]){align-items:center}:host([align-items=baseline]){align-items:baseline}:host([align-self=start]){align-self:flex-start}:host([align-self=end]){align-self:flex-end}:host([align-self=stretch]){align-self:stretch}:host([align-self=center]){align-self:center}:host([background=primary]){background-color:hsl(var(--primary))}:host([color=primary]){color:hsl(var(--primary))}:host([background=on-primary]){background-color:hsl(var(--on-primary))}:host([color=on-primary]){color:hsl(var(--on-primary))}:host([background=secondary]){background-color:hsl(var(--secondary))}:host([color=secondary]){color:hsl(var(--secondary))}:host([background=on-secondary]){background-color:hsl(var(--on-secondary))}:host([color=on-secondary]){color:hsl(var(--on-secondary))}:host([background=tertiary]){background-color:hsl(var(--tertiary))}:host([color=tertiary]){color:hsl(var(--tertiary))}:host([background=on-tertiary]){background-color:hsl(var(--on-tertiary))}:host([color=on-tertiary]){color:hsl(var(--on-tertiary))}:host([background=neutral]){background-color:hsl(var(--neutral))}:host([color=neutral]){color:hsl(var(--neutral))}:host([background=on-neutral]){background-color:hsl(var(--on-neutral))}:host([color=on-neutral]){color:hsl(var(--on-neutral))}:host([background=neutral-variant]){background-color:hsl(var(--neutral-variant))}:host([color=neutral-variant]){color:hsl(var(--neutral-variant))}:host([background=on-neutral-variant]){background-color:hsl(var(--on-neutral-variant))}:host([color=on-neutral-variant]){color:hsl(var(--on-neutral-variant))}:host([background=error]){background-color:hsl(var(--error))}:host([color=error]){color:hsl(var(--error))}:host([background=on-error]){background-color:hsl(var(--on-error))}:host([color=on-error]){color:hsl(var(--on-error))}:host([background=primary-container]){background-color:hsl(var(--primary-container))}:host([color=primary-container]){color:hsl(var(--primary-container))}:host([background=on-primary-container]){background-color:hsl(var(--on-primary-container))}:host([color=on-primary-container]){color:hsl(var(--on-primary-container))}:host([background=secondary-container]){background-color:hsl(var(--secondary-container))}:host([color=secondary-container]){color:hsl(var(--secondary-container))}:host([background=on-secondary-container]){background-color:hsl(var(--on-secondary-container))}:host([color=on-secondary-container]){color:hsl(var(--on-secondary-container))}:host([background=tertiary-container]){background-color:hsl(var(--tertiary-container))}:host([color=tertiary-container]){color:hsl(var(--tertiary-container))}:host([background=on-tertiary-container]){background-color:hsl(var(--on-tertiary-container))}:host([color=on-tertiary-container]){color:hsl(var(--on-tertiary-container))}:host([background=neutral-container]){background-color:hsl(var(--neutral-container))}:host([color=neutral-container]){color:hsl(var(--neutral-container))}:host([background=on-neutral-container]){background-color:hsl(var(--on-neutral-container))}:host([color=on-neutral-container]){color:hsl(var(--on-neutral-container))}:host([background=neutral-variant-container]){background-color:hsl(var(--neutral-variant-container))}:host([color=neutral-variant-container]){color:hsl(var(--neutral-variant-container))}:host([background=on-neutral-variant-container]){background-color:hsl(var(--on-neutral-variant-container))}:host([color=on-neutral-variant-container]){color:hsl(var(--on-neutral-variant-container))}:host([background=error-container]){background-color:hsl(var(--error-container))}:host([color=error-container]){color:hsl(var(--error-container))}:host([background=on-error-container]){background-color:hsl(var(--on-error-container))}:host([color=on-error-container]){color:hsl(var(--on-error-container))}:host([background=primary-0]){background-color:hsl(var(--primary-0))}:host([color=primary-0]){color:hsl(var(--primary-0))}:host([background=surface]){background-color:hsl(var(--surface))}:host([color=surface]){color:hsl(var(--surface))}:host([background=on-surface]){background-color:hsl(var(--on-surface))}:host([color=on-surface]){color:hsl(var(--on-surface))}:host([background=surface-dim]){background-color:hsl(var(--surface-dim))}:host([color=surface-dim]){color:hsl(var(--surface-dim))}:host([background=surface-bright]){background-color:hsl(var(--surface-bright))}:host([color=surface-bright]){color:hsl(var(--surface-bright))}:host([background=surface-container-lowest]){background-color:hsl(var(--surface-container-lowest))}:host([color=surface-container-lowest]){color:hsl(var(--surface-container-lowest))}:host([background=surface-container-low]){background-color:hsl(var(--surface-container-low))}:host([color=surface-container-low]){color:hsl(var(--surface-container-low))}:host([background=surface-container]){background-color:hsl(var(--surface-container))}:host([color=surface-container]){color:hsl(var(--surface-container))}:host([background=surface-container-high]){background-color:hsl(var(--surface-container-high))}:host([color=surface-container-high]){color:hsl(var(--surface-container-high))}:host([background=surface-container-highest]){background-color:hsl(var(--surface-container-highest))}:host([color=surface-container-highest]){color:hsl(var(--surface-container-highest))}:host([background=surface-variant]){background-color:hsl(var(--surface-variant))}:host([color=surface-variant]){color:hsl(var(--surface-variant))}:host([background=on-surface-variant]){background-color:hsl(var(--on-surface-variant))}:host([color=on-surface-variant]){color:hsl(var(--on-surface-variant))}:host([background=outline]){background-color:hsl(var(--outline))}:host([color=outline]){color:hsl(var(--outline))}:host([background=outline-variant]){background-color:hsl(var(--outline-variant))}:host([color=outline-variant]){color:hsl(var(--outline-variant))}:host([background=inverse-surface]){background-color:hsl(var(--inverse-surface))}:host([color=inverse-surface]){color:hsl(var(--inverse-surface))}:host([background=inverse-on-surface]){background-color:hsl(var(--inverse-on-surface))}:host([color=inverse-on-surface]){color:hsl(var(--inverse-on-surface))}:host([background=background]){background-color:hsl(var(--background))}:host([color=background]){color:hsl(var(--background))}:host([background=on-background]){background-color:hsl(var(--on-background))}:host([color=on-background]){color:hsl(var(--on-background))}:host([background=shadow]){background-color:hsl(var(--shadow))}:host([color=shadow]){color:hsl(var(--shadow))}:host([background=primary-10]){background-color:hsl(var(--primary-10))}:host([color=primary-10]){color:hsl(var(--primary-10))}:host([background=primary-20]){background-color:hsl(var(--primary-20))}:host([color=primary-20]){color:hsl(var(--primary-20))}:host([background=primary-30]){background-color:hsl(var(--primary-30))}:host([color=primary-30]){color:hsl(var(--primary-30))}:host([background=primary-40]){background-color:hsl(var(--primary-40))}:host([color=primary-40]){color:hsl(var(--primary-40))}:host([background=primary-50]){background-color:hsl(var(--primary-50))}:host([color=primary-50]){color:hsl(var(--primary-50))}:host([background=primary-60]){background-color:hsl(var(--primary-60))}:host([color=primary-60]){color:hsl(var(--primary-60))}:host([background=primary-70]){background-color:hsl(var(--primary-70))}:host([color=primary-70]){color:hsl(var(--primary-70))}:host([background=primary-80]){background-color:hsl(var(--primary-80))}:host([color=primary-80]){color:hsl(var(--primary-80))}:host([background=primary-90]){background-color:hsl(var(--primary-90))}:host([color=primary-90]){color:hsl(var(--primary-90))}:host([background=primary-95]){background-color:hsl(var(--primary-95))}:host([color=primary-95]){color:hsl(var(--primary-95))}:host([background=primary-99]){background-color:hsl(var(--primary-99))}:host([color=primary-99]){color:hsl(var(--primary-99))}:host([background=primary-100]){background-color:hsl(var(--primary-100))}:host([color=primary-100]){color:hsl(var(--primary-100))}:host([background=secondary-0]){background-color:hsl(var(--secondary-0))}:host([color=secondary-0]){color:hsl(var(--secondary-0))}:host([background=secondary-10]){background-color:hsl(var(--secondary-10))}:host([color=secondary-10]){color:hsl(var(--secondary-10))}:host([background=secondary-20]){background-color:hsl(var(--secondary-20))}:host([color=secondary-20]){color:hsl(var(--secondary-20))}:host([background=secondary-30]){background-color:hsl(var(--secondary-30))}:host([color=secondary-30]){color:hsl(var(--secondary-30))}:host([background=secondary-40]){background-color:hsl(var(--secondary-40))}:host([color=secondary-40]){color:hsl(var(--secondary-40))}:host([background=secondary-50]){background-color:hsl(var(--secondary-50))}:host([color=secondary-50]){color:hsl(var(--secondary-50))}:host([background=secondary-60]){background-color:hsl(var(--secondary-60))}:host([color=secondary-60]){color:hsl(var(--secondary-60))}:host([background=secondary-70]){background-color:hsl(var(--secondary-70))}:host([color=secondary-70]){color:hsl(var(--secondary-70))}:host([background=secondary-80]){background-color:hsl(var(--secondary-80))}:host([color=secondary-80]){color:hsl(var(--secondary-80))}:host([background=secondary-90]){background-color:hsl(var(--secondary-90))}:host([color=secondary-90]){color:hsl(var(--secondary-90))}:host([background=secondary-100]){background-color:hsl(var(--secondary-100))}:host([color=secondary-100]){color:hsl(var(--secondary-100))}:host([background=tertiary-0]){background-color:hsl(var(--tertiary-0))}:host([color=tertiary-0]){color:hsl(var(--tertiary-0))}:host([background=tertiary-10]){background-color:hsl(var(--tertiary-10))}:host([color=tertiary-10]){color:hsl(var(--tertiary-10))}:host([background=tertiary-20]){background-color:hsl(var(--tertiary-20))}:host([color=tertiary-20]){color:hsl(var(--tertiary-20))}:host([background=tertiary-30]){background-color:hsl(var(--tertiary-30))}:host([color=tertiary-30]){color:hsl(var(--tertiary-30))}:host([background=tertiary-40]){background-color:hsl(var(--tertiary-40))}:host([color=tertiary-40]){color:hsl(var(--tertiary-40))}:host([background=tertiary-50]){background-color:hsl(var(--tertiary-50))}:host([color=tertiary-50]){color:hsl(var(--tertiary-50))}:host([background=tertiary-60]){background-color:hsl(var(--tertiary-60))}:host([color=tertiary-60]){color:hsl(var(--tertiary-60))}:host([background=tertiary-70]){background-color:hsl(var(--tertiary-70))}:host([color=tertiary-70]){color:hsl(var(--tertiary-70))}:host([background=tertiary-80]){background-color:hsl(var(--tertiary-80))}:host([color=tertiary-80]){color:hsl(var(--tertiary-80))}:host([background=tertiary-90]){background-color:hsl(var(--tertiary-90))}:host([color=tertiary-90]){color:hsl(var(--tertiary-90))}:host([background=tertiary-100]){background-color:hsl(var(--tertiary-100))}:host([color=tertiary-100]){color:hsl(var(--tertiary-100))}:host([background=neutral-0]){background-color:hsl(var(--neutral-0))}:host([color=neutral-0]){color:hsl(var(--neutral-0))}:host([background=neutral-10]){background-color:hsl(var(--neutral-10))}:host([color=neutral-10]){color:hsl(var(--neutral-10))}:host([background=neutral-20]){background-color:hsl(var(--neutral-20))}:host([color=neutral-20]){color:hsl(var(--neutral-20))}:host([background=neutral-30]){background-color:hsl(var(--neutral-30))}:host([color=neutral-30]){color:hsl(var(--neutral-30))}:host([background=neutral-40]){background-color:hsl(var(--neutral-40))}:host([color=neutral-40]){color:hsl(var(--neutral-40))}:host([background=neutral-50]){background-color:hsl(var(--neutral-50))}:host([color=neutral-50]){color:hsl(var(--neutral-50))}:host([background=neutral-60]){background-color:hsl(var(--neutral-60))}:host([color=neutral-60]){color:hsl(var(--neutral-60))}:host([background=neutral-70]){background-color:hsl(var(--neutral-70))}:host([color=neutral-70]){color:hsl(var(--neutral-70))}:host([background=neutral-80]){background-color:hsl(var(--neutral-80))}:host([color=neutral-80]){color:hsl(var(--neutral-80))}:host([background=neutral-90]){background-color:hsl(var(--neutral-90))}:host([color=neutral-90]){color:hsl(var(--neutral-90))}:host([background=neutral-100]){background-color:hsl(var(--neutral-100))}:host([color=neutral-100]){color:hsl(var(--neutral-100))}:host([background=error-0]){background-color:hsl(var(--error-0))}:host([color=error-0]){color:hsl(var(--error-0))}:host([background=error-10]){background-color:hsl(var(--error-10))}:host([color=error-10]){color:hsl(var(--error-10))}:host([background=error-20]){background-color:hsl(var(--error-20))}:host([color=error-20]){color:hsl(var(--error-20))}:host([background=error-30]){background-color:hsl(var(--error-30))}:host([color=error-30]){color:hsl(var(--error-30))}:host([background=error-40]){background-color:hsl(var(--error-40))}:host([color=error-40]){color:hsl(var(--error-40))}:host([background=error-50]){background-color:hsl(var(--error-50))}:host([color=error-50]){color:hsl(var(--error-50))}:host([background=error-60]){background-color:hsl(var(--error-60))}:host([color=error-60]){color:hsl(var(--error-60))}:host([background=error-70]){background-color:hsl(var(--error-70))}:host([color=error-70]){color:hsl(var(--error-70))}:host([background=error-80]){background-color:hsl(var(--error-80))}:host([color=error-80]){color:hsl(var(--error-80))}:host([background=error-90]){background-color:hsl(var(--error-90))}:host([color=error-90]){color:hsl(var(--error-90))}:host([background=error-100]){background-color:hsl(var(--error-100))}:host([color=error-100]){color:hsl(var(--error-100))}:host([direction=column]){flex-direction:column}:host([direction=row-reverse]){flex-direction:row-reverse}:host([direction=column-reverse]){flex-direction:column-reverse}:host([text=center]){text-align:center}:host([text=justify]){text-align:justify}:host([text=left]){text-align:left}:host([text=right]){text-align:right}:host([weight=\"100\"]){font-weight:100}:host([weight=\"200\"]){font-weight:200}:host([weight=\"300\"]){font-weight:300}:host([weight=\"400\"]){font-weight:400}:host([weight=\"500\"]){font-weight:500}:host([weight=\"600\"]){font-weight:600}:host([weight=\"700\"]){font-weight:700}:host([weight=\"800\"]){font-weight:800}:host([weight=\"900\"]){font-weight:900}:host([weight=lighter]){font-weight:lighter}:host([weight=bold]){font-weight:700}:host([weight=bolder]){font-weight:bolder}:host([direction=row]){flex-direction:row}:host([direction=row-reverse]){flex-direction:row}:host([elevation=\"1\"]){box-shadow:var(--box-elevation,0 1px 2px 0 #0000004d,0 1px 3px 1px #00000026)}:host([elevation=\"2\"]){box-shadow:var(--box-elevation,0 1px 2px 0 #0000004d,0 2px 6px 2px #00000026)}:host([elevation=\"3\"]){box-shadow:var(--box-elevation,0 1px 3px 0 #0000004d,0 4px 8px 3px #00000026)}:host([fill=horizontal]){width:100%}:host([fill=vertical]){height:100%}:host([fill=true]){height:100%;width:100%}:host([flex=grow]){flex:1 0}:host([flex=shrink]){flex:0 1}:host([flex=true]){flex:1 1}:host([flex=false]){flex:0 0}:host([gap=xsmall]) ::slotted(*),:host([gap=xsmall][direction=column]) ::slotted(*){margin:var(--spacing-xs,.25rem) 0}:host([gap=xsmall][direction=row]) ::slotted(*){margin:0 var(--spacing-xs,.25rem)}:host([margin=xsmall]){margin:var(--box-margin,var(--spacing-xs,.25rem))}:host([vmargin=xsmall]){margin-bottom:var(--box-margin,var(--spacing-xs,.25rem));margin-top:var(--box-margin,var(--spacing-xs,.25rem))}:host([hmargin=xsmall]){margin-left:var(--box-margin,var(--spacing-xs,.25rem));margin-right:var(--box-margin,var(--spacing-xs,.25rem))}:host([margin=\"xsmall auto\"]){margin:var(--box-margin,var(--spacing-xs,.25rem)) auto}:host([margin=\"auto xsmall\"]){margin:auto var(--box-margin,var(--spacing-xs,.25rem))}:host([padding=xsmall]){padding:var(--box-padding,var(--spacing-xs,.25rem))}:host([vpadding=xsmall]){padding-bottom:var(--box-padding,var(--spacing-xs,.25rem));padding-top:var(--box-padding,var(--spacing-xs,.25rem))}:host([hpadding=xsmall]){padding-left:var(--box-padding,var(--spacing-xs,.25rem));padding-right:var(--box-padding,var(--spacing-xs,.25rem))}:host([gap=small]) ::slotted(*),:host([gap=small][direction=column]) ::slotted(*){margin:var(--spacing-s,.5rem) 0}:host([gap=small][direction=row]) ::slotted(*){margin:0 var(--spacing-s,.5rem)}:host([margin=small]){margin:var(--box-margin,var(--spacing-s,.5rem))}:host([vmargin=small]){margin-bottom:var(--box-margin,var(--spacing-s,.5rem));margin-top:var(--box-margin,var(--spacing-s,.5rem))}:host([hmargin=small]){margin-left:var(--box-margin,var(--spacing-s,.5rem));margin-right:var(--box-margin,var(--spacing-s,.5rem))}:host([margin=\"small auto\"]){margin:var(--box-margin,var(--spacing-s,.5rem)) auto}:host([margin=\"auto small\"]){margin:auto var(--box-margin,var(--spacing-s,.5rem))}:host([padding=small]){padding:var(--box-padding,var(--spacing-s,.5rem))}:host([vpadding=small]){padding-bottom:var(--box-padding,var(--spacing-s,.5rem));padding-top:var(--box-padding,var(--spacing-s,.5rem))}:host([hpadding=small]){padding-left:var(--box-padding,var(--spacing-s,.5rem));padding-right:var(--box-padding,var(--spacing-s,.5rem))}:host([gap=medium]) ::slotted(*),:host([gap=medium][direction=column]) ::slotted(*){margin:var(--spacing-m,1rem) 0}:host([gap=medium][direction=row]) ::slotted(*){margin:0 var(--spacing-m,1rem)}:host([margin=medium]){margin:var(--box-margin,var(--spacing-m,1rem))}:host([vmargin=medium]){margin-bottom:var(--box-margin,var(--spacing-m,1rem));margin-top:var(--box-margin,var(--spacing-m,1rem))}:host([hmargin=medium]){margin-left:var(--box-margin,var(--spacing-m,1rem));margin-right:var(--box-margin,var(--spacing-m,1rem))}:host([margin=\"medium auto\"]){margin:var(--box-margin,var(--spacing-m,1rem)) auto}:host([margin=\"auto medium\"]){margin:auto var(--box-margin,var(--spacing-m,1rem))}:host([padding=medium]){padding:var(--box-padding,var(--spacing-m,1rem))}:host([vpadding=medium]){padding-bottom:var(--box-padding,var(--spacing-m,1rem));padding-top:var(--box-padding,var(--spacing-m,1rem))}:host([hpadding=medium]){padding-left:var(--box-padding,var(--spacing-m,1rem));padding-right:var(--box-padding,var(--spacing-m,1rem))}:host([gap=large]) ::slotted(*),:host([gap=large][direction=column]) ::slotted(*){margin:var(--spacing-l,1.25rem) 0}:host([gap=large][direction=row]) ::slotted(*){margin:0 var(--spacing-l,1.25rem)}:host([margin=large]){margin:var(--box-margin,var(--spacing-l,1.25rem))}:host([vmargin=large]){margin-bottom:var(--box-margin,var(--spacing-l,1.25rem));margin-top:var(--box-margin,var(--spacing-l,1.25rem))}:host([hmargin=large]){margin-left:var(--box-margin,var(--spacing-l,1.25rem));margin-right:var(--box-margin,var(--spacing-l,1.25rem))}:host([margin=\"large auto\"]){margin:var(--box-margin,var(--spacing-l,1.25rem)) auto}:host([margin=\"auto large\"]){margin:auto var(--box-margin,var(--spacing-l,1.25rem))}:host([padding=large]){padding:var(--box-padding,var(--spacing-l,1.25rem))}:host([vpadding=large]){padding-bottom:var(--box-padding,var(--spacing-l,1.25rem));padding-top:var(--box-padding,var(--spacing-l,1.25rem))}:host([hpadding=large]){padding-left:var(--box-padding,var(--spacing-l,1.25rem));padding-right:var(--box-padding,var(--spacing-l,1.25rem))}:host([gap=xlarge]) ::slotted(*),:host([gap=xlarge][direction=column]) ::slotted(*){margin:var(--spacing-xl,2rem) 0}:host([gap=xlarge][direction=row]) ::slotted(*){margin:0 var(--spacing-xl,2rem)}:host([margin=xlarge]){margin:var(--box-margin,var(--spacing-xl,2rem))}:host([vmargin=xlarge]){margin-bottom:var(--box-margin,var(--spacing-xl,2rem));margin-top:var(--box-margin,var(--spacing-xl,2rem))}:host([hmargin=xlarge]){margin-left:var(--box-margin,var(--spacing-xl,2rem));margin-right:var(--box-margin,var(--spacing-xl,2rem))}:host([margin=\"xlarge auto\"]){margin:var(--box-margin,var(--spacing-xl,2rem)) auto}:host([margin=\"auto xlarge\"]){margin:auto var(--box-margin,var(--spacing-xl,2rem))}:host([padding=xlarge]){padding:var(--box-padding,var(--spacing-xl,2rem))}:host([vpadding=xlarge]){padding-bottom:var(--box-padding,var(--spacing-xl,2rem));padding-top:var(--box-padding,var(--spacing-xl,2rem))}:host([hpadding=xlarge]){padding-left:var(--box-padding,var(--spacing-xl,2rem));padding-right:var(--box-padding,var(--spacing-xl,2rem))}:host([font=xsmall]),:host([size=xsmall]){font-size:var(--box-font-size,var(--font-size-xs,.625rem))}:host([font=small]),:host([size=small]){font-size:var(--box-font-size,var(--font-size-s,.875rem))}:host([font=medium]),:host([size=medium]){font-size:var(--box-font-size,var(--font-size-m,1rem))}:host([font=large]),:host([size=large]){font-size:var(--box-font-size,var(--font-size-l,1.25rem))}:host([font=xlarge]),:host([size=xlarge]){font-size:var(--box-font-size,var(--font-size-xl,1.5rem))}:host([font=xxlarge]),:host([size=xxlarge]){font-size:var(--box-font-size,var(--font-size-xxl,2.25rem))}:host([justify=start]){justify-content:flex-start}:host([justify=end]){justify-content:flex-end}:host([justify=stretch]){justify-content:stretch}:host([justify=baseline]){justify-content:baseline}:host([justify=center]){justify-content:center}:host([justify=around]){justify-content:space-around}:host([justify=between]){justify-content:space-between}:host([justify=evenly]){justify-content:space-evenly}:host([overflow=auto]){overflow:auto}:host([overflow=hidden]){overflow:hidden}:host([overflow=scroll]){overflow:scroll}:host([overflow=visible]){overflow:visible}:host([radius=none]){border-radius:var(--box-border-radius,0)}:host([radius=small]){border-radius:var(--box-border-radius,var(--border-radius-small,.125rem))}:host([radius=medium]){border-radius:var(--box-border-radius,var(--border-radius-medium,.25rem))}:host([radius=large]){border-radius:var(--box-border-radius,var(--border-radius-large,.5rem))}:host([radius=xlarge]){border-radius:var(--box-border-radius,var(--border-radius-x-large,1rem))}:host([radius=circle]){border-radius:var(--box-border-radius,var(--border-radius-circle,50%))}:host([radius=pill]){border-radius:var(--box-border-radius,var(--border-radius-pill,9999px))}:host([max-width=xxsmall]){max-width:var(--box-max-width,var(--size-xxs,2rem))}:host([width=xxsmall]){width:var(--box-width,var(--size-xxs,2rem))}:host([max-height=xxsmall]){max-height:var(--box-max-height,var(--size-xxs,2rem))}:host([height=xxsmall]){height:var(--box-height,var(--size-xxs,2rem))}:host([max-width=xsmall]){max-width:var(--box-max-width,var(--size-xs,4rem))}:host([width=xsmall]){width:var(--box-width,var(--size-xs,4rem))}:host([max-height=xsmall]){max-height:var(--box-max-height,var(--size-xs,4rem))}:host([height=xsmall]){height:var(--box-height,var(--size-xs,4rem))}:host([max-width=small]){max-width:var(--box-max-width,var(--size-s,8rem))}:host([width=small]){width:var(--box-width,var(--size-s,8rem))}:host([max-height=small]){max-height:var(--box-max-height,var(--size-s,8rem))}:host([height=small]){height:var(--box-height,var(--size-s,8rem))}:host([max-width=medium]){max-width:var(--box-max-width,var(--size-m,16rem))}:host([width=medium]){width:var(--box-width,var(--size-m,16rem))}:host([max-height=medium]){max-height:var(--box-max-height,var(--size-m,16rem))}:host([height=medium]){height:var(--box-height,var(--size-m,16rem))}:host([max-width=large]){max-width:var(--box-max-width,var(--size-l,32rem))}:host([width=large]){width:var(--box-width,var(--size-l,32rem))}:host([max-height=large]){max-height:var(--box-max-height,var(--size-l,32rem))}:host([height=large]){height:var(--box-height,var(--size-l,32rem))}:host([max-width=xlarge]){max-width:var(--box-max-width,var(--size-xl,48rem))}:host([width=xlarge]){width:var(--box-width,var(--size-xl,48rem))}:host([max-height=xlarge]){max-height:var(--box-max-height,var(--size-xl,48rem))}:host([height=xlarge]){height:var(--box-height,var(--size-xl,48rem))}:host([max-width=xxlarge]){max-width:var(--box-max-width,var(--size-xxl,64rem))}:host([width=xxlarge]){width:var(--box-width,var(--size-xxl,64rem))}:host([max-height=xxlarge]){max-height:var(--box-max-height,var(--size-xxl,64rem))}:host([height=xxlarge]){height:var(--box-height,var(--size-xxl,64rem))}:host([wrap=true]){flex-wrap:wrap}:host([wrap=reverse]){flex-wrap:wrap-reverse}";
|
|
2
|
-
var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{box-sizing:border-box;display:flex;flex-direction:column;position:relative}:host([hidden]){display:none}.ripple{bottom:0;left:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0}.ripple span{background-color:hsla(var(--on-primary),.5);border-radius:50%;position:absolute}:host([align-content=start]){align-content:flex-start}:host([align-content=end]){align-content:flex-end}:host([align-content=stretch]){align-content:stretch}:host([align-content=center]){align-content:center}:host([align-content=around]){align-content:space-around}:host([align-content=between]){align-content:space-between}:host([align-items=start]){align-items:flex-start}:host([align-items=end]){align-items:flex-end}:host([align-items=stretch]){align-items:stretch}:host([align-items=center]){align-items:center}:host([align-items=baseline]){align-items:baseline}:host([align-self=start]){align-self:flex-start}:host([align-self=end]){align-self:flex-end}:host([align-self=stretch]){align-self:stretch}:host([align-self=center]){align-self:center}:host([background=primary]){background-color:hsl(var(--primary))}:host([color=primary]){color:hsl(var(--primary))}:host([background=on-primary]){background-color:hsl(var(--on-primary))}:host([color=on-primary]){color:hsl(var(--on-primary))}:host([background=secondary]){background-color:hsl(var(--secondary))}:host([color=secondary]){color:hsl(var(--secondary))}:host([background=on-secondary]){background-color:hsl(var(--on-secondary))}:host([color=on-secondary]){color:hsl(var(--on-secondary))}:host([background=tertiary]){background-color:hsl(var(--tertiary))}:host([color=tertiary]){color:hsl(var(--tertiary))}:host([background=on-tertiary]){background-color:hsl(var(--on-tertiary))}:host([color=on-tertiary]){color:hsl(var(--on-tertiary))}:host([background=neutral]){background-color:hsl(var(--neutral))}:host([color=neutral]){color:hsl(var(--neutral))}:host([background=on-neutral]){background-color:hsl(var(--on-neutral))}:host([color=on-neutral]){color:hsl(var(--on-neutral))}:host([background=neutral-variant]){background-color:hsl(var(--neutral-variant))}:host([color=neutral-variant]){color:hsl(var(--neutral-variant))}:host([background=on-neutral-variant]){background-color:hsl(var(--on-neutral-variant))}:host([color=on-neutral-variant]){color:hsl(var(--on-neutral-variant))}:host([background=error]){background-color:hsl(var(--error))}:host([color=error]){color:hsl(var(--error))}:host([background=on-error]){background-color:hsl(var(--on-error))}:host([color=on-error]){color:hsl(var(--on-error))}:host([background=primary-container]){background-color:hsl(var(--primary-container))}:host([color=primary-container]){color:hsl(var(--primary-container))}:host([background=on-primary-container]){background-color:hsl(var(--on-primary-container))}:host([color=on-primary-container]){color:hsl(var(--on-primary-container))}:host([background=secondary-container]){background-color:hsl(var(--secondary-container))}:host([color=secondary-container]){color:hsl(var(--secondary-container))}:host([background=on-secondary-container]){background-color:hsl(var(--on-secondary-container))}:host([color=on-secondary-container]){color:hsl(var(--on-secondary-container))}:host([background=tertiary-container]){background-color:hsl(var(--tertiary-container))}:host([color=tertiary-container]){color:hsl(var(--tertiary-container))}:host([background=on-tertiary-container]){background-color:hsl(var(--on-tertiary-container))}:host([color=on-tertiary-container]){color:hsl(var(--on-tertiary-container))}:host([background=neutral-container]){background-color:hsl(var(--neutral-container))}:host([color=neutral-container]){color:hsl(var(--neutral-container))}:host([background=on-neutral-container]){background-color:hsl(var(--on-neutral-container))}:host([color=on-neutral-container]){color:hsl(var(--on-neutral-container))}:host([background=neutral-variant-container]){background-color:hsl(var(--neutral-variant-container))}:host([color=neutral-variant-container]){color:hsl(var(--neutral-variant-container))}:host([background=on-neutral-variant-container]){background-color:hsl(var(--on-neutral-variant-container))}:host([color=on-neutral-variant-container]){color:hsl(var(--on-neutral-variant-container))}:host([background=error-container]){background-color:hsl(var(--error-container))}:host([color=error-container]){color:hsl(var(--error-container))}:host([background=on-error-container]){background-color:hsl(var(--on-error-container))}:host([color=on-error-container]){color:hsl(var(--on-error-container))}:host([background=primary-0]){background-color:hsl(var(--primary-0))}:host([color=primary-0]){color:hsl(var(--primary-0))}:host([background=surface]){background-color:hsl(var(--surface))}:host([color=surface]){color:hsl(var(--surface))}:host([background=on-surface]){background-color:hsl(var(--on-surface))}:host([color=on-surface]){color:hsl(var(--on-surface))}:host([background=surface-dim]){background-color:hsl(var(--surface-dim))}:host([color=surface-dim]){color:hsl(var(--surface-dim))}:host([background=surface-bright]){background-color:hsl(var(--surface-bright))}:host([color=surface-bright]){color:hsl(var(--surface-bright))}:host([background=surface-container-lowest]){background-color:hsl(var(--surface-container-lowest))}:host([color=surface-container-lowest]){color:hsl(var(--surface-container-lowest))}:host([background=surface-container-low]){background-color:hsl(var(--surface-container-low))}:host([color=surface-container-low]){color:hsl(var(--surface-container-low))}:host([background=surface-container]){background-color:hsl(var(--surface-container))}:host([color=surface-container]){color:hsl(var(--surface-container))}:host([background=surface-container-high]){background-color:hsl(var(--surface-container-high))}:host([color=surface-container-high]){color:hsl(var(--surface-container-high))}:host([background=surface-container-highest]){background-color:hsl(var(--surface-container-highest))}:host([color=surface-container-highest]){color:hsl(var(--surface-container-highest))}:host([background=surface-variant]){background-color:hsl(var(--surface-variant))}:host([color=surface-variant]){color:hsl(var(--surface-variant))}:host([background=on-surface-variant]){background-color:hsl(var(--on-surface-variant))}:host([color=on-surface-variant]){color:hsl(var(--on-surface-variant))}:host([background=outline]){background-color:hsl(var(--outline))}:host([color=outline]){color:hsl(var(--outline))}:host([background=outline-variant]){background-color:hsl(var(--outline-variant))}:host([color=outline-variant]){color:hsl(var(--outline-variant))}:host([background=inverse-surface]){background-color:hsl(var(--inverse-surface))}:host([color=inverse-surface]){color:hsl(var(--inverse-surface))}:host([background=inverse-on-surface]){background-color:hsl(var(--inverse-on-surface))}:host([color=inverse-on-surface]){color:hsl(var(--inverse-on-surface))}:host([background=background]){background-color:hsl(var(--background))}:host([color=background]){color:hsl(var(--background))}:host([background=on-background]){background-color:hsl(var(--on-background))}:host([color=on-background]){color:hsl(var(--on-background))}:host([background=shadow]){background-color:hsl(var(--shadow))}:host([color=shadow]){color:hsl(var(--shadow))}:host([background=primary-10]){background-color:hsl(var(--primary-10))}:host([color=primary-10]){color:hsl(var(--primary-10))}:host([background=primary-20]){background-color:hsl(var(--primary-20))}:host([color=primary-20]){color:hsl(var(--primary-20))}:host([background=primary-30]){background-color:hsl(var(--primary-30))}:host([color=primary-30]){color:hsl(var(--primary-30))}:host([background=primary-40]){background-color:hsl(var(--primary-40))}:host([color=primary-40]){color:hsl(var(--primary-40))}:host([background=primary-50]){background-color:hsl(var(--primary-50))}:host([color=primary-50]){color:hsl(var(--primary-50))}:host([background=primary-60]){background-color:hsl(var(--primary-60))}:host([color=primary-60]){color:hsl(var(--primary-60))}:host([background=primary-70]){background-color:hsl(var(--primary-70))}:host([color=primary-70]){color:hsl(var(--primary-70))}:host([background=primary-80]){background-color:hsl(var(--primary-80))}:host([color=primary-80]){color:hsl(var(--primary-80))}:host([background=primary-90]){background-color:hsl(var(--primary-90))}:host([color=primary-90]){color:hsl(var(--primary-90))}:host([background=primary-95]){background-color:hsl(var(--primary-95))}:host([color=primary-95]){color:hsl(var(--primary-95))}:host([background=primary-99]){background-color:hsl(var(--primary-99))}:host([color=primary-99]){color:hsl(var(--primary-99))}:host([background=primary-100]){background-color:hsl(var(--primary-100))}:host([color=primary-100]){color:hsl(var(--primary-100))}:host([background=secondary-0]){background-color:hsl(var(--secondary-0))}:host([color=secondary-0]){color:hsl(var(--secondary-0))}:host([background=secondary-10]){background-color:hsl(var(--secondary-10))}:host([color=secondary-10]){color:hsl(var(--secondary-10))}:host([background=secondary-20]){background-color:hsl(var(--secondary-20))}:host([color=secondary-20]){color:hsl(var(--secondary-20))}:host([background=secondary-30]){background-color:hsl(var(--secondary-30))}:host([color=secondary-30]){color:hsl(var(--secondary-30))}:host([background=secondary-40]){background-color:hsl(var(--secondary-40))}:host([color=secondary-40]){color:hsl(var(--secondary-40))}:host([background=secondary-50]){background-color:hsl(var(--secondary-50))}:host([color=secondary-50]){color:hsl(var(--secondary-50))}:host([background=secondary-60]){background-color:hsl(var(--secondary-60))}:host([color=secondary-60]){color:hsl(var(--secondary-60))}:host([background=secondary-70]){background-color:hsl(var(--secondary-70))}:host([color=secondary-70]){color:hsl(var(--secondary-70))}:host([background=secondary-80]){background-color:hsl(var(--secondary-80))}:host([color=secondary-80]){color:hsl(var(--secondary-80))}:host([background=secondary-90]){background-color:hsl(var(--secondary-90))}:host([color=secondary-90]){color:hsl(var(--secondary-90))}:host([background=secondary-100]){background-color:hsl(var(--secondary-100))}:host([color=secondary-100]){color:hsl(var(--secondary-100))}:host([background=tertiary-0]){background-color:hsl(var(--tertiary-0))}:host([color=tertiary-0]){color:hsl(var(--tertiary-0))}:host([background=tertiary-10]){background-color:hsl(var(--tertiary-10))}:host([color=tertiary-10]){color:hsl(var(--tertiary-10))}:host([background=tertiary-20]){background-color:hsl(var(--tertiary-20))}:host([color=tertiary-20]){color:hsl(var(--tertiary-20))}:host([background=tertiary-30]){background-color:hsl(var(--tertiary-30))}:host([color=tertiary-30]){color:hsl(var(--tertiary-30))}:host([background=tertiary-40]){background-color:hsl(var(--tertiary-40))}:host([color=tertiary-40]){color:hsl(var(--tertiary-40))}:host([background=tertiary-50]){background-color:hsl(var(--tertiary-50))}:host([color=tertiary-50]){color:hsl(var(--tertiary-50))}:host([background=tertiary-60]){background-color:hsl(var(--tertiary-60))}:host([color=tertiary-60]){color:hsl(var(--tertiary-60))}:host([background=tertiary-70]){background-color:hsl(var(--tertiary-70))}:host([color=tertiary-70]){color:hsl(var(--tertiary-70))}:host([background=tertiary-80]){background-color:hsl(var(--tertiary-80))}:host([color=tertiary-80]){color:hsl(var(--tertiary-80))}:host([background=tertiary-90]){background-color:hsl(var(--tertiary-90))}:host([color=tertiary-90]){color:hsl(var(--tertiary-90))}:host([background=tertiary-100]){background-color:hsl(var(--tertiary-100))}:host([color=tertiary-100]){color:hsl(var(--tertiary-100))}:host([background=neutral-0]){background-color:hsl(var(--neutral-0))}:host([color=neutral-0]){color:hsl(var(--neutral-0))}:host([background=neutral-10]){background-color:hsl(var(--neutral-10))}:host([color=neutral-10]){color:hsl(var(--neutral-10))}:host([background=neutral-20]){background-color:hsl(var(--neutral-20))}:host([color=neutral-20]){color:hsl(var(--neutral-20))}:host([background=neutral-30]){background-color:hsl(var(--neutral-30))}:host([color=neutral-30]){color:hsl(var(--neutral-30))}:host([background=neutral-40]){background-color:hsl(var(--neutral-40))}:host([color=neutral-40]){color:hsl(var(--neutral-40))}:host([background=neutral-50]){background-color:hsl(var(--neutral-50))}:host([color=neutral-50]){color:hsl(var(--neutral-50))}:host([background=neutral-60]){background-color:hsl(var(--neutral-60))}:host([color=neutral-60]){color:hsl(var(--neutral-60))}:host([background=neutral-70]){background-color:hsl(var(--neutral-70))}:host([color=neutral-70]){color:hsl(var(--neutral-70))}:host([background=neutral-80]){background-color:hsl(var(--neutral-80))}:host([color=neutral-80]){color:hsl(var(--neutral-80))}:host([background=neutral-90]){background-color:hsl(var(--neutral-90))}:host([color=neutral-90]){color:hsl(var(--neutral-90))}:host([background=neutral-100]){background-color:hsl(var(--neutral-100))}:host([color=neutral-100]){color:hsl(var(--neutral-100))}:host([background=error-0]){background-color:hsl(var(--error-0))}:host([color=error-0]){color:hsl(var(--error-0))}:host([background=error-10]){background-color:hsl(var(--error-10))}:host([color=error-10]){color:hsl(var(--error-10))}:host([background=error-20]){background-color:hsl(var(--error-20))}:host([color=error-20]){color:hsl(var(--error-20))}:host([background=error-30]){background-color:hsl(var(--error-30))}:host([color=error-30]){color:hsl(var(--error-30))}:host([background=error-40]){background-color:hsl(var(--error-40))}:host([color=error-40]){color:hsl(var(--error-40))}:host([background=error-50]){background-color:hsl(var(--error-50))}:host([color=error-50]){color:hsl(var(--error-50))}:host([background=error-60]){background-color:hsl(var(--error-60))}:host([color=error-60]){color:hsl(var(--error-60))}:host([background=error-70]){background-color:hsl(var(--error-70))}:host([color=error-70]){color:hsl(var(--error-70))}:host([background=error-80]){background-color:hsl(var(--error-80))}:host([color=error-80]){color:hsl(var(--error-80))}:host([background=error-90]){background-color:hsl(var(--error-90))}:host([color=error-90]){color:hsl(var(--error-90))}:host([background=error-100]){background-color:hsl(var(--error-100))}:host([color=error-100]){color:hsl(var(--error-100))}:host([direction=column]){flex-direction:column}:host([direction=row-reverse]){flex-direction:row-reverse}:host([direction=column-reverse]){flex-direction:column-reverse}:host([text=center]){text-align:center}:host([text=justify]){text-align:justify}:host([text=left]){text-align:left}:host([text=right]){text-align:right}:host([weight=\"100\"]){font-weight:100}:host([weight=\"200\"]){font-weight:200}:host([weight=\"300\"]){font-weight:300}:host([weight=\"400\"]){font-weight:400}:host([weight=\"500\"]){font-weight:500}:host([weight=\"600\"]){font-weight:600}:host([weight=\"700\"]){font-weight:700}:host([weight=\"800\"]){font-weight:800}:host([weight=\"900\"]){font-weight:900}:host([weight=lighter]){font-weight:lighter}:host([weight=bold]){font-weight:700}:host([weight=bolder]){font-weight:bolder}:host([direction=row]){flex-direction:row}:host([direction=row-reverse]){flex-direction:row}:host([elevation=\"1\"]){box-shadow:var(--box-elevation,0 1px 2px 0 #0000004d,0 1px 3px 1px #00000026)}:host([elevation=\"2\"]){box-shadow:var(--box-elevation,0 1px 2px 0 #0000004d,0 2px 6px 2px #00000026)}:host([elevation=\"3\"]){box-shadow:var(--box-elevation,0 1px 3px 0 #0000004d,0 4px 8px 3px #00000026)}:host([fill=horizontal]){width:100%}:host([fill=vertical]){height:100%}:host([fill=true]){height:100%;width:100%}:host([flex=grow]){flex:1 0}:host([flex=shrink]){flex:0 1}:host([flex=true]){flex:1 1}:host([flex=false]){flex:0 0}:host([gap=xsmall]) ::slotted(*),:host([gap=xsmall][direction=column]) ::slotted(*){margin:var(--spacing-xs,.25rem) 0}:host([gap=xsmall][direction=row]) ::slotted(*){margin:0 var(--spacing-xs,.25rem)}:host([margin=xsmall]){margin:var(--box-margin,var(--spacing-xs,.25rem))}:host([vmargin=xsmall]){margin-bottom:var(--box-margin,var(--spacing-xs,.25rem));margin-top:var(--box-margin,var(--spacing-xs,.25rem))}:host([hmargin=xsmall]){margin-left:var(--box-margin,var(--spacing-xs,.25rem));margin-right:var(--box-margin,var(--spacing-xs,.25rem))}:host([margin=\"xsmall auto\"]){margin:var(--box-margin,var(--spacing-xs,.25rem)) auto}:host([margin=\"auto xsmall\"]){margin:auto var(--box-margin,var(--spacing-xs,.25rem))}:host([padding=xsmall]){padding:var(--box-padding,var(--spacing-xs,.25rem))}:host([vpadding=xsmall]){padding-bottom:var(--box-padding,var(--spacing-xs,.25rem));padding-top:var(--box-padding,var(--spacing-xs,.25rem))}:host([hpadding=xsmall]){padding-left:var(--box-padding,var(--spacing-xs,.25rem));padding-right:var(--box-padding,var(--spacing-xs,.25rem))}:host([gap=small]) ::slotted(*),:host([gap=small][direction=column]) ::slotted(*){margin:var(--spacing-s,.5rem) 0}:host([gap=small][direction=row]) ::slotted(*){margin:0 var(--spacing-s,.5rem)}:host([margin=small]){margin:var(--box-margin,var(--spacing-s,.5rem))}:host([vmargin=small]){margin-bottom:var(--box-margin,var(--spacing-s,.5rem));margin-top:var(--box-margin,var(--spacing-s,.5rem))}:host([hmargin=small]){margin-left:var(--box-margin,var(--spacing-s,.5rem));margin-right:var(--box-margin,var(--spacing-s,.5rem))}:host([margin=\"small auto\"]){margin:var(--box-margin,var(--spacing-s,.5rem)) auto}:host([margin=\"auto small\"]){margin:auto var(--box-margin,var(--spacing-s,.5rem))}:host([padding=small]){padding:var(--box-padding,var(--spacing-s,.5rem))}:host([vpadding=small]){padding-bottom:var(--box-padding,var(--spacing-s,.5rem));padding-top:var(--box-padding,var(--spacing-s,.5rem))}:host([hpadding=small]){padding-left:var(--box-padding,var(--spacing-s,.5rem));padding-right:var(--box-padding,var(--spacing-s,.5rem))}:host([gap=medium]) ::slotted(*),:host([gap=medium][direction=column]) ::slotted(*){margin:var(--spacing-m,1rem) 0}:host([gap=medium][direction=row]) ::slotted(*){margin:0 var(--spacing-m,1rem)}:host([margin=medium]){margin:var(--box-margin,var(--spacing-m,1rem))}:host([vmargin=medium]){margin-bottom:var(--box-margin,var(--spacing-m,1rem));margin-top:var(--box-margin,var(--spacing-m,1rem))}:host([hmargin=medium]){margin-left:var(--box-margin,var(--spacing-m,1rem));margin-right:var(--box-margin,var(--spacing-m,1rem))}:host([margin=\"medium auto\"]){margin:var(--box-margin,var(--spacing-m,1rem)) auto}:host([margin=\"auto medium\"]){margin:auto var(--box-margin,var(--spacing-m,1rem))}:host([padding=medium]){padding:var(--box-padding,var(--spacing-m,1rem))}:host([vpadding=medium]){padding-bottom:var(--box-padding,var(--spacing-m,1rem));padding-top:var(--box-padding,var(--spacing-m,1rem))}:host([hpadding=medium]){padding-left:var(--box-padding,var(--spacing-m,1rem));padding-right:var(--box-padding,var(--spacing-m,1rem))}:host([gap=large]) ::slotted(*),:host([gap=large][direction=column]) ::slotted(*){margin:var(--spacing-l,1.25rem) 0}:host([gap=large][direction=row]) ::slotted(*){margin:0 var(--spacing-l,1.25rem)}:host([margin=large]){margin:var(--box-margin,var(--spacing-l,1.25rem))}:host([vmargin=large]){margin-bottom:var(--box-margin,var(--spacing-l,1.25rem));margin-top:var(--box-margin,var(--spacing-l,1.25rem))}:host([hmargin=large]){margin-left:var(--box-margin,var(--spacing-l,1.25rem));margin-right:var(--box-margin,var(--spacing-l,1.25rem))}:host([margin=\"large auto\"]){margin:var(--box-margin,var(--spacing-l,1.25rem)) auto}:host([margin=\"auto large\"]){margin:auto var(--box-margin,var(--spacing-l,1.25rem))}:host([padding=large]){padding:var(--box-padding,var(--spacing-l,1.25rem))}:host([vpadding=large]){padding-bottom:var(--box-padding,var(--spacing-l,1.25rem));padding-top:var(--box-padding,var(--spacing-l,1.25rem))}:host([hpadding=large]){padding-left:var(--box-padding,var(--spacing-l,1.25rem));padding-right:var(--box-padding,var(--spacing-l,1.25rem))}:host([gap=xlarge]) ::slotted(*),:host([gap=xlarge][direction=column]) ::slotted(*){margin:var(--spacing-xl,2rem) 0}:host([gap=xlarge][direction=row]) ::slotted(*){margin:0 var(--spacing-xl,2rem)}:host([margin=xlarge]){margin:var(--box-margin,var(--spacing-xl,2rem))}:host([vmargin=xlarge]){margin-bottom:var(--box-margin,var(--spacing-xl,2rem));margin-top:var(--box-margin,var(--spacing-xl,2rem))}:host([hmargin=xlarge]){margin-left:var(--box-margin,var(--spacing-xl,2rem));margin-right:var(--box-margin,var(--spacing-xl,2rem))}:host([margin=\"xlarge auto\"]){margin:var(--box-margin,var(--spacing-xl,2rem)) auto}:host([margin=\"auto xlarge\"]){margin:auto var(--box-margin,var(--spacing-xl,2rem))}:host([padding=xlarge]){padding:var(--box-padding,var(--spacing-xl,2rem))}:host([vpadding=xlarge]){padding-bottom:var(--box-padding,var(--spacing-xl,2rem));padding-top:var(--box-padding,var(--spacing-xl,2rem))}:host([hpadding=xlarge]){padding-left:var(--box-padding,var(--spacing-xl,2rem));padding-right:var(--box-padding,var(--spacing-xl,2rem))}:host([font=xsmall]),:host([size=xsmall]){font-size:var(--box-font-size,var(--font-size-xs,.625rem))}:host([font=small]),:host([size=small]){font-size:var(--box-font-size,var(--font-size-s,.875rem))}:host([font=medium]),:host([size=medium]){font-size:var(--box-font-size,var(--font-size-m,1rem))}:host([font=large]),:host([size=large]){font-size:var(--box-font-size,var(--font-size-l,1.25rem))}:host([font=xlarge]),:host([size=xlarge]){font-size:var(--box-font-size,var(--font-size-xl,1.5rem))}:host([font=xxlarge]),:host([size=xxlarge]){font-size:var(--box-font-size,var(--font-size-xxl,2.25rem))}:host([justify=start]){justify-content:flex-start}:host([justify=end]){justify-content:flex-end}:host([justify=stretch]){justify-content:stretch}:host([justify=baseline]){justify-content:baseline}:host([justify=center]){justify-content:center}:host([justify=around]){justify-content:space-around}:host([justify=between]){justify-content:space-between}:host([justify=evenly]){justify-content:space-evenly}:host([overflow=auto]){overflow:auto}:host([overflow=hidden]){overflow:hidden}:host([overflow=scroll]){overflow:scroll}:host([overflow=visible]){overflow:visible}:host([radius=none]){border-radius:var(--box-border-radius,0)}:host([radius=small]){border-radius:var(--box-border-radius,var(--border-radius-small,.125rem))}:host([radius=medium]){border-radius:var(--box-border-radius,var(--border-radius-medium,.25rem))}:host([radius=large]){border-radius:var(--box-border-radius,var(--border-radius-large,.5rem))}:host([radius=xlarge]){border-radius:var(--box-border-radius,var(--border-radius-x-large,1rem))}:host([radius=circle]){border-radius:var(--box-border-radius,var(--border-radius-circle,50%))}:host([radius=pill]){border-radius:var(--box-border-radius,var(--border-radius-pill,9999px))}:host([max-width=xxsmall]){max-width:var(--box-max-width,var(--size-xxs,2rem))}:host([width=xxsmall]){width:var(--box-width,var(--size-xxs,2rem))}:host([max-height=xxsmall]){max-height:var(--box-max-height,var(--size-xxs,2rem))}:host([height=xxsmall]){height:var(--box-height,var(--size-xxs,2rem))}:host([max-width=xsmall]){max-width:var(--box-max-width,var(--size-xs,4rem))}:host([width=xsmall]){width:var(--box-width,var(--size-xs,4rem))}:host([max-height=xsmall]){max-height:var(--box-max-height,var(--size-xs,4rem))}:host([height=xsmall]){height:var(--box-height,var(--size-xs,4rem))}:host([max-width=small]){max-width:var(--box-max-width,var(--size-s,8rem))}:host([width=small]){width:var(--box-width,var(--size-s,8rem))}:host([max-height=small]){max-height:var(--box-max-height,var(--size-s,8rem))}:host([height=small]){height:var(--box-height,var(--size-s,8rem))}:host([max-width=medium]){max-width:var(--box-max-width,var(--size-m,16rem))}:host([width=medium]){width:var(--box-width,var(--size-m,16rem))}:host([max-height=medium]){max-height:var(--box-max-height,var(--size-m,16rem))}:host([height=medium]){height:var(--box-height,var(--size-m,16rem))}:host([max-width=large]){max-width:var(--box-max-width,var(--size-l,32rem))}:host([width=large]){width:var(--box-width,var(--size-l,32rem))}:host([max-height=large]){max-height:var(--box-max-height,var(--size-l,32rem))}:host([height=large]){height:var(--box-height,var(--size-l,32rem))}:host([max-width=xlarge]){max-width:var(--box-max-width,var(--size-xl,48rem))}:host([width=xlarge]){width:var(--box-width,var(--size-xl,48rem))}:host([max-height=xlarge]){max-height:var(--box-max-height,var(--size-xl,48rem))}:host([height=xlarge]){height:var(--box-height,var(--size-xl,48rem))}:host([max-width=xxlarge]){max-width:var(--box-max-width,var(--size-xxl,64rem))}:host([width=xxlarge]){width:var(--box-width,var(--size-xxl,64rem))}:host([max-height=xxlarge]){max-height:var(--box-max-height,var(--size-xxl,64rem))}:host([height=xxlarge]){height:var(--box-height,var(--size-xxl,64rem))}:host([wrap=true]){flex-wrap:wrap}:host([wrap=reverse]){flex-wrap:wrap-reverse}";
|
|
3
|
-
|
|
4
|
-
export { css_248z as default, stylesheet };
|
package/box/focusable-box.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
|
-
import { property } from 'lit/decorators.js';
|
|
3
|
-
import { uniqueID } from '../utils/unique.js';
|
|
4
|
-
import { TkBox } from './box.js';
|
|
5
|
-
|
|
6
|
-
class TkFocusableBox extends TkBox {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
/**
|
|
10
|
-
* Element random id
|
|
11
|
-
*/
|
|
12
|
-
this._id = uniqueID();
|
|
13
|
-
/**
|
|
14
|
-
* disabled atribute
|
|
15
|
-
*/
|
|
16
|
-
this.disabled = false;
|
|
17
|
-
}
|
|
18
|
-
updated(props) {
|
|
19
|
-
this.tabIndex = this.disabled ? -1 : 0;
|
|
20
|
-
super.updated(props);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
__decorate([
|
|
24
|
-
property({ type: Boolean })
|
|
25
|
-
], TkFocusableBox.prototype, "_id", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
property({ type: Boolean })
|
|
28
|
-
], TkFocusableBox.prototype, "disabled", void 0);
|
|
29
|
-
|
|
30
|
-
export { TkFocusableBox };
|
package/button/button.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
|
-
import { css, unsafeCSS, html } from 'lit';
|
|
3
|
-
import { property, query, customElement } from 'lit/decorators.js';
|
|
4
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
-
import '../box/index.js';
|
|
6
|
-
import { uniqueID } from '../utils/unique.js';
|
|
7
|
-
import css_248z from './button.scss.js';
|
|
8
|
-
import { TkBox } from '../box/box.js';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* A button web component
|
|
12
|
-
*
|
|
13
|
-
* @cssprop --tk-badge-color - Color of widget
|
|
14
|
-
* @cssprop [--tk-badge-color=--primary]
|
|
15
|
-
* @cssprop --tk-badge-text-color - Text color of widget to --on-primary-color
|
|
16
|
-
*
|
|
17
|
-
* @attr {Boolean} accent - accent colors
|
|
18
|
-
* @attr {Boolean} disabled - Disable this element
|
|
19
|
-
* @attr {Boolean} inverted - color and text-color are inverted
|
|
20
|
-
* @attr {Boolean} outlined - outlined
|
|
21
|
-
* @attr {Boolean} pill - rounded corner
|
|
22
|
-
* @attr {Boolean} ripple - display ripple when active
|
|
23
|
-
* @attr {Boolean} small - mini button
|
|
24
|
-
*/
|
|
25
|
-
let TkButton = class TkButton extends TkBox {
|
|
26
|
-
constructor() {
|
|
27
|
-
super(...arguments);
|
|
28
|
-
this._id = uniqueID();
|
|
29
|
-
this.href = null;
|
|
30
|
-
this.type = "button";
|
|
31
|
-
this.disabled = false;
|
|
32
|
-
this.fab = false;
|
|
33
|
-
this.ripple = true;
|
|
34
|
-
}
|
|
35
|
-
static get styles() {
|
|
36
|
-
return [
|
|
37
|
-
...TkBox.styles,
|
|
38
|
-
css `
|
|
39
|
-
${unsafeCSS(css_248z)}
|
|
40
|
-
`
|
|
41
|
-
];
|
|
42
|
-
}
|
|
43
|
-
render() {
|
|
44
|
-
return html `
|
|
45
|
-
${this.iconPath
|
|
46
|
-
? html `
|
|
47
|
-
<tk-icon path="${this.iconPath}"></tk-icon>
|
|
48
|
-
`
|
|
49
|
-
: ""}
|
|
50
|
-
|
|
51
|
-
<div class="content ${this.iconPath ? "has-icon" : ""}" @slotchange=${this.slotChanged}>
|
|
52
|
-
<slot></slot>
|
|
53
|
-
</div>
|
|
54
|
-
|
|
55
|
-
${this.href
|
|
56
|
-
? html `
|
|
57
|
-
<a tabindex="-1" hidden id="ahref" href="${this.href}" target="${ifDefined(this.target)}" rel="noreferrer"></a>
|
|
58
|
-
`
|
|
59
|
-
: ""}
|
|
60
|
-
<button id=${this._id} hidden type="${ifDefined(this.type)}"></button>
|
|
61
|
-
`;
|
|
62
|
-
}
|
|
63
|
-
connectedCallback() {
|
|
64
|
-
super.connectedCallback();
|
|
65
|
-
this.addEventListener("click", this.handleClick.bind(this));
|
|
66
|
-
}
|
|
67
|
-
disconnectedCallback() {
|
|
68
|
-
super.disconnectedCallback();
|
|
69
|
-
this.removeEventListener("click", this.handleClick);
|
|
70
|
-
this.removeEventListener("keydown", this.onKeyDown);
|
|
71
|
-
}
|
|
72
|
-
updated(props) {
|
|
73
|
-
this.tabIndex = this.disabled ? -1 : 0;
|
|
74
|
-
super.updated(props);
|
|
75
|
-
}
|
|
76
|
-
onKeyDown(e) {
|
|
77
|
-
if (e.code === "Space" || e.code === "Enter") {
|
|
78
|
-
e.preventDefault();
|
|
79
|
-
e.stopPropagation();
|
|
80
|
-
this.click();
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
firstUpdated() {
|
|
84
|
-
if (this.type == "submit" || this.type == "reset")
|
|
85
|
-
this.appendChild(this.$button);
|
|
86
|
-
}
|
|
87
|
-
handleClick(e) {
|
|
88
|
-
var _a;
|
|
89
|
-
if (this.href && e.isTrusted) {
|
|
90
|
-
e.stopPropagation();
|
|
91
|
-
e.preventDefault();
|
|
92
|
-
this.$ahref.click();
|
|
93
|
-
}
|
|
94
|
-
else if ((e.isTrusted && this.type == "submit") || this.type == "reset") {
|
|
95
|
-
(_a = this.querySelector("button")) === null || _a === void 0 ? void 0 : _a.click();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
slotChanged() {
|
|
99
|
-
var _a;
|
|
100
|
-
const slot = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot');
|
|
101
|
-
const elements = slot === null || slot === void 0 ? void 0 : slot.assignedNodes({ flatten: true });
|
|
102
|
-
if (elements && elements.length > 0) {
|
|
103
|
-
this.setAttribute('extended', '');
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
this.removeAttribute('extended');
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
__decorate([
|
|
111
|
-
property()
|
|
112
|
-
], TkButton.prototype, "href", void 0);
|
|
113
|
-
__decorate([
|
|
114
|
-
property()
|
|
115
|
-
], TkButton.prototype, "target", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
property()
|
|
118
|
-
], TkButton.prototype, "type", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
property({ type: Boolean })
|
|
121
|
-
], TkButton.prototype, "disabled", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
property({ type: Boolean })
|
|
124
|
-
], TkButton.prototype, "fab", void 0);
|
|
125
|
-
__decorate([
|
|
126
|
-
property({ type: String })
|
|
127
|
-
], TkButton.prototype, "iconPath", void 0);
|
|
128
|
-
__decorate([
|
|
129
|
-
property()
|
|
130
|
-
], TkButton.prototype, "ripple", void 0);
|
|
131
|
-
__decorate([
|
|
132
|
-
query("#ahref")
|
|
133
|
-
], TkButton.prototype, "$ahref", void 0);
|
|
134
|
-
__decorate([
|
|
135
|
-
query("button")
|
|
136
|
-
], TkButton.prototype, "$button", void 0);
|
|
137
|
-
TkButton = __decorate([
|
|
138
|
-
customElement("tk-button")
|
|
139
|
-
], TkButton);
|
|
140
|
-
|
|
141
|
-
export { TkButton };
|