tinkiet 0.7.6 → 0.8.2
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 +18 -0
- package/accordion/accordion.js +94 -0
- package/accordion/accordion.scss.js +4 -0
- package/accordion/index.d.ts +1 -0
- package/accordion/index.js +1 -0
- package/badge/badge.d.ts +15 -0
- package/badge/badge.js +27 -0
- package/badge/badge.scss.js +4 -0
- package/badge/index.d.ts +1 -0
- package/badge/index.js +1 -0
- package/box/box.d.ts +56 -0
- package/box/box.js +182 -0
- package/box/box.scss.js +4 -0
- package/box/focusable-box.d.ts +13 -0
- package/box/focusable-box.js +30 -0
- package/box/index.d.ts +1 -0
- package/box/index.js +1 -0
- package/button/button.d.ts +39 -0
- package/button/button.js +125 -0
- package/button/button.scss.js +4 -0
- package/button/index.d.ts +1 -0
- package/button/index.js +1 -0
- package/checkbox/checkbox.d.ts +21 -0
- package/checkbox/checkbox.js +83 -0
- package/checkbox/checkbox.scss.js +4 -0
- package/checkbox/index.d.ts +1 -0
- package/checkbox/index.js +1 -0
- package/dialog/dialog.d.ts +18 -0
- package/dialog/dialog.js +58 -0
- package/dialog/dialog.scss.js +4 -0
- package/dialog/index.d.ts +1 -0
- package/dialog/index.js +1 -0
- package/form/form.d.ts +15 -0
- package/form/form.js +57 -0
- package/form/index.d.ts +1 -0
- package/form/index.js +1 -0
- package/icon/icon.d.ts +17 -0
- package/icon/icon.js +77 -0
- package/icon/icon.scss.js +4 -0
- package/icon/icons.d.ts +7 -0
- package/icon/icons.js +24 -0
- package/icon/index.d.ts +2 -0
- package/icon/index.js +2 -0
- package/index.d.ts +23 -0
- package/index.d.ts.map +1 -0
- package/index.js +45 -0
- package/list-item/index.d.ts +1 -0
- package/list-item/index.js +1 -0
- package/list-item/list-item.d.ts +20 -0
- package/list-item/list-item.js +72 -0
- package/list-item/list-item.scss.js +4 -0
- package/loading/index.d.ts +1 -0
- package/loading/index.js +1 -0
- package/loading/loading.d.ts +14 -0
- package/loading/loading.js +61 -0
- package/loading/loading.scss.js +4 -0
- package/navbar/index.d.ts +1 -0
- package/navbar/index.js +1 -0
- package/navbar/navbar.d.ts +11 -0
- package/navbar/navbar.js +33 -0
- package/navbar/navbar.scss.js +4 -0
- package/notie/index.d.ts +1 -0
- package/notie/index.js +1 -0
- package/notie/notie.d.ts +69 -0
- package/notie/notie.js +193 -0
- package/notie/notie.scss.js +4 -0
- package/package.json +4 -9
- package/pages/index.d.ts +1 -0
- package/pages/index.js +1 -0
- package/pages/pages.d.ts +18 -0
- package/pages/pages.js +75 -0
- package/pages/pages.scss.js +4 -0
- package/radio/index.d.ts +1 -0
- package/radio/index.js +1 -0
- package/radio/radio.d.ts +24 -0
- package/radio/radio.js +98 -0
- package/radio/radio.scss.js +4 -0
- package/select/index.d.ts +1 -0
- package/select/index.js +1 -0
- package/select/select.d.ts +32 -0
- package/select/select.js +132 -0
- package/select/select.scss.js +4 -0
- package/slider/index.d.ts +1 -0
- package/slider/index.js +1 -0
- package/slider/slider.d.ts +30 -0
- package/slider/slider.js +135 -0
- package/slider/slider.scss.js +4 -0
- package/switch/index.d.ts +1 -0
- package/switch/index.js +1 -0
- package/switch/switch.d.ts +24 -0
- package/switch/switch.js +99 -0
- package/switch/switch.scss.js +4 -0
- package/tab-group/index.d.ts +1 -0
- package/tab-group/index.js +1 -0
- package/tab-group/tab-group.d.ts +21 -0
- package/tab-group/tab-group.js +97 -0
- package/tab-group/tab-group.scss.js +4 -0
- package/tag/index.d.ts +1 -0
- package/tag/index.js +1 -0
- package/tag/tag.d.ts +11 -0
- package/tag/tag.js +20 -0
- package/tag/tag.scss.js +4 -0
- package/textarea/index.d.ts +1 -0
- package/textarea/index.js +1 -0
- package/textarea/textarea.d.ts +33 -0
- package/textarea/textarea.js +133 -0
- package/textarea/textarea.scss.js +4 -0
- package/textfield/index.d.ts +1 -0
- package/textfield/index.js +1 -0
- package/textfield/textfield.d.ts +34 -0
- package/textfield/textfield.js +136 -0
- package/textfield/textfield.scss.js +4 -0
- package/theme/index.d.ts +1 -0
- package/theme/index.js +1 -0
- package/theme/theme.d.ts +33 -0
- package/theme/theme.js +187 -0
- package/theme/theme.scss.js +4 -0
- package/umd/tinkiet.min.d.ts +3 -30
- package/umd/tinkiet.min.d.ts.map +1 -1
- package/umd/tinkiet.min.js +1 -1
- package/utils/unique.d.ts +7 -0
- package/utils/unique.js +12 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
declare class TkSwitch extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult;
|
|
4
|
+
private _id;
|
|
5
|
+
name: string;
|
|
6
|
+
checked: boolean;
|
|
7
|
+
required: boolean;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
readonly: boolean;
|
|
10
|
+
value: string;
|
|
11
|
+
private $input;
|
|
12
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
13
|
+
connectedCallback(): void;
|
|
14
|
+
disconnectedCallback(): void;
|
|
15
|
+
firstUpdated(): void;
|
|
16
|
+
protected onKeyDown(e: KeyboardEvent): void;
|
|
17
|
+
protected handleClick(): void;
|
|
18
|
+
}
|
|
19
|
+
declare global {
|
|
20
|
+
interface HTMLElementTagNameMap {
|
|
21
|
+
"tk-switch": TkSwitch;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export { TkSwitch };
|
package/switch/switch.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } 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 './switch.scss.js';
|
|
8
|
+
|
|
9
|
+
let TkSwitch = class TkSwitch extends LitElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this._id = uniqueID();
|
|
13
|
+
this.checked = false;
|
|
14
|
+
this.required = false;
|
|
15
|
+
this.disabled = false;
|
|
16
|
+
this.readonly = false;
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return html `
|
|
20
|
+
<tk-box direction="row" align-items="center">
|
|
21
|
+
<span class="switch">
|
|
22
|
+
<span id="knob"></span>
|
|
23
|
+
</span>
|
|
24
|
+
<span class="label"><slot></slot></span>
|
|
25
|
+
</tk-box>
|
|
26
|
+
<input
|
|
27
|
+
id=${this._id}
|
|
28
|
+
slot="none"
|
|
29
|
+
style="display: none;"
|
|
30
|
+
type="radio"
|
|
31
|
+
?checked="${this.checked}"
|
|
32
|
+
?required="${this.required}"
|
|
33
|
+
?disabled="${this.disabled}"
|
|
34
|
+
?readonly="${this.readonly}"
|
|
35
|
+
value="${ifDefined(this.value)}"
|
|
36
|
+
name="${ifDefined(this.name)}"
|
|
37
|
+
aria-hidden="true"
|
|
38
|
+
tabindex="-1"
|
|
39
|
+
/>
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
connectedCallback() {
|
|
43
|
+
super.connectedCallback();
|
|
44
|
+
this.addEventListener("click", this.handleClick.bind(this));
|
|
45
|
+
this.addEventListener("keydown", this.onKeyDown.bind(this));
|
|
46
|
+
}
|
|
47
|
+
disconnectedCallback() {
|
|
48
|
+
super.disconnectedCallback();
|
|
49
|
+
this.removeEventListener("click", this.handleClick);
|
|
50
|
+
this.removeEventListener("keydown", this.onKeyDown);
|
|
51
|
+
}
|
|
52
|
+
firstUpdated() {
|
|
53
|
+
this.appendChild(this.$input);
|
|
54
|
+
}
|
|
55
|
+
onKeyDown(e) {
|
|
56
|
+
if (e.code === "Space" || e.code === "Enter") {
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
e.stopPropagation();
|
|
59
|
+
this.click();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
handleClick() {
|
|
63
|
+
this.checked = !this.checked;
|
|
64
|
+
if (this.checked && this.name)
|
|
65
|
+
this.getRootNode()
|
|
66
|
+
.querySelectorAll(`tk-radio[name="${this.name}"]`)
|
|
67
|
+
.forEach(el => (el != this ? (el.checked = false) : null));
|
|
68
|
+
setTimeout(() => this.dispatchEvent(new Event("change", { bubbles: true, composed: true })));
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
TkSwitch.styles = css `
|
|
72
|
+
${unsafeCSS(css_248z)}
|
|
73
|
+
`;
|
|
74
|
+
__decorate([
|
|
75
|
+
property({ attribute: true, type: String })
|
|
76
|
+
], TkSwitch.prototype, "name", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
property({ attribute: true, type: Boolean, reflect: true })
|
|
79
|
+
], TkSwitch.prototype, "checked", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
property({ type: Boolean })
|
|
82
|
+
], TkSwitch.prototype, "required", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
property({ type: Boolean })
|
|
85
|
+
], TkSwitch.prototype, "disabled", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
property({ type: Boolean })
|
|
88
|
+
], TkSwitch.prototype, "readonly", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
property({ type: String, reflect: true })
|
|
91
|
+
], TkSwitch.prototype, "value", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
query("input")
|
|
94
|
+
], TkSwitch.prototype, "$input", void 0);
|
|
95
|
+
TkSwitch = __decorate([
|
|
96
|
+
customElement("tk-switch")
|
|
97
|
+
], TkSwitch);
|
|
98
|
+
|
|
99
|
+
export { TkSwitch };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--_switch-bg:var(--switch-bg,var(--shade-light,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.15))));--_switch-color:var(--switch-color,var(--background,#f7f7f7))}:host .switch{align-items:center;background:var(--_switch-bg);border-radius:var(--switch-border-radius,.75rem);color:var(--_switch-color);display:inline-flex;height:var(--switch-height,.875rem);outline:none;position:relative;transition:var(--switch-transition,background var(--transition-duration-fast,.12s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)));-webkit-user-select:none;user-select:none;width:var(--switch-width,2.125rem)}:host .switch #knob{background:currentColor;border-radius:var(--switch-knob-border-radius,100%);box-shadow:var(--switch-knob-elevation,var(--elevation-3,0 4px 8px var(--shadow)));height:var(--switch-knob-size,1.25rem);position:absolute;transition:var(--switch-knob-transition,background var(--transition-duration-fast,.12s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)),transform var(--transition-duration-fast,.12s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)));width:var(--switch-knob-size,1.25rem)}:host .label{font-size:1.1em;margin-left:10px}:host(:not([disabled])){cursor:pointer}:host([checked]){--_switch-bg:var(--switch-bg-checked,var(--primary-lighter,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),calc(var(--primary-l, 59.4118%)*1.3))));--_switch-color:var(--switch-color-checked,var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%))))}:host([checked]) .switch #knob{transform:translateX(calc(var(--switch-width, 2.125rem) - 100%))}:host(:focus),:host(:hover){will-change:background-color}:host([disabled]){--_switch-bg:var(--switch-bg-disabled,hsl(var(--shade-200,var(--shade-hue,200),var(--shade-saturation,4%),var(--shade-lightness,85%))));--_switch-color:var(\n \t--switch-color-disabled,hsl(var(--shade-300,var(--shade-hue,200),var(--shade-saturation,4%),var(--shade-lightness,75%)))\n );pointer-events:none}:host([disabled][checked]){--_switch-bg:var(\n \t--switch-bg-disabled-checked,hsla(var(--primary-400,var(--primary-hue,224),var(--primary-saturation,42%),var(--primary-lightness,52%)),0.1)\n );--_switch-color:var(\n \t--switch-color-disabled-checked,hsla(var(--primary-400,var(--primary-hue,224),var(--primary-saturation,42%),var(--primary-lightness,52%)),0.4)\n )}";
|
|
2
|
+
var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--_switch-bg:var(--switch-bg,var(--shade-light,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.15))));--_switch-color:var(--switch-color,var(--background,#f7f7f7))}:host .switch{align-items:center;background:var(--_switch-bg);border-radius:var(--switch-border-radius,.75rem);color:var(--_switch-color);display:inline-flex;height:var(--switch-height,.875rem);outline:none;position:relative;transition:var(--switch-transition,background var(--transition-duration-fast,.12s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)));-webkit-user-select:none;user-select:none;width:var(--switch-width,2.125rem)}:host .switch #knob{background:currentColor;border-radius:var(--switch-knob-border-radius,100%);box-shadow:var(--switch-knob-elevation,var(--elevation-3,0 4px 8px var(--shadow)));height:var(--switch-knob-size,1.25rem);position:absolute;transition:var(--switch-knob-transition,background var(--transition-duration-fast,.12s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)),transform var(--transition-duration-fast,.12s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)));width:var(--switch-knob-size,1.25rem)}:host .label{font-size:1.1em;margin-left:10px}:host(:not([disabled])){cursor:pointer}:host([checked]){--_switch-bg:var(--switch-bg-checked,var(--primary-lighter,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),calc(var(--primary-l, 59.4118%)*1.3))));--_switch-color:var(--switch-color-checked,var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%))))}:host([checked]) .switch #knob{transform:translateX(calc(var(--switch-width, 2.125rem) - 100%))}:host(:focus),:host(:hover){will-change:background-color}:host([disabled]){--_switch-bg:var(--switch-bg-disabled,hsl(var(--shade-200,var(--shade-hue,200),var(--shade-saturation,4%),var(--shade-lightness,85%))));--_switch-color:var(\n \t--switch-color-disabled,hsl(var(--shade-300,var(--shade-hue,200),var(--shade-saturation,4%),var(--shade-lightness,75%)))\n );pointer-events:none}:host([disabled][checked]){--_switch-bg:var(\n \t--switch-bg-disabled-checked,hsla(var(--primary-400,var(--primary-hue,224),var(--primary-saturation,42%),var(--primary-lightness,52%)),0.1)\n );--_switch-color:var(\n \t--switch-color-disabled-checked,hsla(var(--primary-400,var(--primary-hue,224),var(--primary-saturation,42%),var(--primary-lightness,52%)),0.4)\n )}";
|
|
3
|
+
|
|
4
|
+
export { css_248z as default, stylesheet };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./tab-group";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TkTabGroup } from './tab-group.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
declare class TkTabGroup extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult;
|
|
4
|
+
circle: boolean;
|
|
5
|
+
observe: string;
|
|
6
|
+
selected: string;
|
|
7
|
+
private $underline;
|
|
8
|
+
private $circle;
|
|
9
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
10
|
+
constructor();
|
|
11
|
+
firstUpdated(): void;
|
|
12
|
+
updated(props: any): void;
|
|
13
|
+
protected clickOnTab(tab: HTMLElement): void;
|
|
14
|
+
protected updateUnderline(): void;
|
|
15
|
+
}
|
|
16
|
+
declare global {
|
|
17
|
+
interface HTMLElementTagNameMap {
|
|
18
|
+
"tk-tab-group": TkTabGroup;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export { TkTabGroup };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
|
+
import { property, query, customElement } from 'lit/decorators.js';
|
|
4
|
+
import css_248z from './tab-group.scss.js';
|
|
5
|
+
|
|
6
|
+
let TkTabGroup = class TkTabGroup extends LitElement {
|
|
7
|
+
render() {
|
|
8
|
+
return html `
|
|
9
|
+
<div class="tabs">
|
|
10
|
+
<slot @click=${(e) => this.clickOnTab(e.target)} @slotchange=${() => this.updateUnderline()}></slot>
|
|
11
|
+
</div>
|
|
12
|
+
${this.circle
|
|
13
|
+
? html `
|
|
14
|
+
<div class="circle"></div>
|
|
15
|
+
`
|
|
16
|
+
: html `
|
|
17
|
+
<div class="underline"></div>
|
|
18
|
+
`}
|
|
19
|
+
`;
|
|
20
|
+
}
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
this.circle = false;
|
|
24
|
+
this.observe = "";
|
|
25
|
+
this.selected = "";
|
|
26
|
+
}
|
|
27
|
+
firstUpdated() {
|
|
28
|
+
if (IntersectionObserver) {
|
|
29
|
+
const observer = new IntersectionObserver(this.updateUnderline.bind(this));
|
|
30
|
+
observer.observe(this);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this.updateUnderline.bind(this);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
updated(props) {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
if (props.has("selected")) {
|
|
39
|
+
this.querySelectorAll("*").forEach(node => node.removeAttribute("selected"));
|
|
40
|
+
(_a = this.querySelector(`[tab="${this.selected}"]`)) === null || _a === void 0 ? void 0 : _a.setAttribute("selected", "");
|
|
41
|
+
}
|
|
42
|
+
if (props.has("observe")) {
|
|
43
|
+
(_b = this.querySelector(`[tab="${this.selected}"]`)) === null || _b === void 0 ? void 0 : _b.focus();
|
|
44
|
+
this.updateUnderline();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
clickOnTab(tab) {
|
|
48
|
+
this.querySelectorAll("*").forEach(node => node.removeAttribute("selected"));
|
|
49
|
+
tab.setAttribute("selected", "");
|
|
50
|
+
this.updateUnderline();
|
|
51
|
+
this.dispatchEvent(new CustomEvent("change", { detail: tab.getAttribute("tab"), composed: true, bubbles: true }));
|
|
52
|
+
}
|
|
53
|
+
updateUnderline() {
|
|
54
|
+
const selected = this.querySelector("[selected]");
|
|
55
|
+
if (selected) {
|
|
56
|
+
setTimeout(() => {
|
|
57
|
+
if (this.circle) {
|
|
58
|
+
this.$circle.style.transform = `translate(${selected.offsetLeft + selected.clientWidth / 2 - this.$circle.clientWidth / 2}px, -${this.$circle.clientWidth / 2}px)`;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
this.$underline.style.width = selected.clientWidth + "px";
|
|
62
|
+
this.$underline.style.transform = `translateX(${selected.offsetLeft}px)`;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
// else {
|
|
67
|
+
// if (this.circle) {
|
|
68
|
+
// this.$circle.style.transform = `translate(-100px, -${this.$circle.clientWidth / 2}px)`;
|
|
69
|
+
// } else {
|
|
70
|
+
// this.$underline.style.width = "0";
|
|
71
|
+
// }
|
|
72
|
+
// }
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
TkTabGroup.styles = css `
|
|
76
|
+
${unsafeCSS(css_248z)}
|
|
77
|
+
`;
|
|
78
|
+
__decorate([
|
|
79
|
+
property({ attribute: true, type: Boolean })
|
|
80
|
+
], TkTabGroup.prototype, "circle", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
property({ attribute: true, type: String })
|
|
83
|
+
], TkTabGroup.prototype, "observe", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
property({ attribute: true, type: String })
|
|
86
|
+
], TkTabGroup.prototype, "selected", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
query(".underline")
|
|
89
|
+
], TkTabGroup.prototype, "$underline", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
query(".circle")
|
|
92
|
+
], TkTabGroup.prototype, "$circle", void 0);
|
|
93
|
+
TkTabGroup = __decorate([
|
|
94
|
+
customElement("tk-tab-group")
|
|
95
|
+
], TkTabGroup);
|
|
96
|
+
|
|
97
|
+
export { TkTabGroup };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--color:var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%)));display:inline-block;overflow:hidden;overflow-x:scroll;position:relative}:host([accent]){--color:var(--accent,hsl(var(--accent-h,8.76404),var(--accent-s,64.0288%),var(--accent-l,72.7451%)))}.tabs{display:flex}:host(:not([circle])) .tabs{border-bottom:2px solid var(--shade-lighter)}.underline{height:2px;margin-top:-2px;transition:transform .2s ease;width:0}.circle,.underline{background-color:var(--color)}.circle{border-radius:var(--border-radius-circle,50%);height:8px;transition:transform .3s ease;width:8px}";
|
|
2
|
+
var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--color:var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%)));display:inline-block;overflow:hidden;overflow-x:scroll;position:relative}:host([accent]){--color:var(--accent,hsl(var(--accent-h,8.76404),var(--accent-s,64.0288%),var(--accent-l,72.7451%)))}.tabs{display:flex}:host(:not([circle])) .tabs{border-bottom:2px solid var(--shade-lighter)}.underline{height:2px;margin-top:-2px;transition:transform .2s ease;width:0}.circle,.underline{background-color:var(--color)}.circle{border-radius:var(--border-radius-circle,50%);height:8px;transition:transform .3s ease;width:8px}";
|
|
3
|
+
|
|
4
|
+
export { css_248z as default, stylesheet };
|
package/tag/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./tag";
|
package/tag/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TkTag } from './tag.js';
|
package/tag/tag.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
declare class TkTag extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult;
|
|
4
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
5
|
+
}
|
|
6
|
+
declare global {
|
|
7
|
+
interface HTMLElementTagNameMap {
|
|
8
|
+
"tk-tag": TkTag;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export { TkTag };
|
package/tag/tag.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import css_248z from './tag.scss.js';
|
|
5
|
+
|
|
6
|
+
let TkTag = class TkTag extends LitElement {
|
|
7
|
+
render() {
|
|
8
|
+
return html `
|
|
9
|
+
<div class="tag"><slot></slot></div>
|
|
10
|
+
`;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
TkTag.styles = css `
|
|
14
|
+
${unsafeCSS(css_248z)}
|
|
15
|
+
`;
|
|
16
|
+
TkTag = __decorate([
|
|
17
|
+
customElement("tk-tag")
|
|
18
|
+
], TkTag);
|
|
19
|
+
|
|
20
|
+
export { TkTag };
|
package/tag/tag.scss.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--color:var(--primary);--text:var(--on-primary);background:var(--color);box-sizing:border-box;color:var(--text);display:flex;flex-grow:1;height:var(--navbar-height,48px);justify-content:space-between;padding:var(--navbar-padding,var(--spacing-s,.5rem));position:relative;transition:var(--nav-transition,background var(--transition-duration-fast,.12s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)),transform var(--transition-duration-medium,.18s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)),box-shadow var(--transition-duration-medium,.18s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)));z-index:var(--navbar-z-index,100)}:host([inverted]){--color:var(--on-primary);--text:var(--primary)}:host([fixed]){left:0;position:fixed;top:0;width:100%}:host([shadow]){box-shadow:var(--nav-elevation,var(--elevation-5,0 12px 24px var(--shadow)))}#left,#right,#title,::slotted([slot=left]),::slotted([slot=right]),::slotted([slot=title]){align-items:center;display:flex;height:100%}#title,::slotted([slot=title]){font-size:var(--nav-title-font-size,var(--font-size-l,1.25rem));font-weight:var(--nav-title-font-weight,var(--font-weight-regular,500));margin:var(--nav-title-margin,0 0 0 var(--spacing-l,1.25rem))}";
|
|
2
|
+
var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--color:var(--primary);--text:var(--on-primary);background:var(--color);box-sizing:border-box;color:var(--text);display:flex;flex-grow:1;height:var(--navbar-height,48px);justify-content:space-between;padding:var(--navbar-padding,var(--spacing-s,.5rem));position:relative;transition:var(--nav-transition,background var(--transition-duration-fast,.12s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)),transform var(--transition-duration-medium,.18s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)),box-shadow var(--transition-duration-medium,.18s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)));z-index:var(--navbar-z-index,100)}:host([inverted]){--color:var(--on-primary);--text:var(--primary)}:host([fixed]){left:0;position:fixed;top:0;width:100%}:host([shadow]){box-shadow:var(--nav-elevation,var(--elevation-5,0 12px 24px var(--shadow)))}#left,#right,#title,::slotted([slot=left]),::slotted([slot=right]),::slotted([slot=title]){align-items:center;display:flex;height:100%}#title,::slotted([slot=title]){font-size:var(--nav-title-font-size,var(--font-size-l,1.25rem));font-weight:var(--nav-title-font-weight,var(--font-weight-regular,500));margin:var(--nav-title-margin,0 0 0 var(--spacing-l,1.25rem))}";
|
|
3
|
+
|
|
4
|
+
export { css_248z as default, stylesheet };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./textarea";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TkTextarea } from './textarea.js';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
declare class TkTextarea extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult;
|
|
4
|
+
private _id;
|
|
5
|
+
set value(value: string);
|
|
6
|
+
get value(): string;
|
|
7
|
+
name: string;
|
|
8
|
+
list: string;
|
|
9
|
+
type: "email" | "number" | "password" | "text";
|
|
10
|
+
required: boolean;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
readonly: boolean;
|
|
13
|
+
autocomplete: "on" | "off";
|
|
14
|
+
autocapitalize: "off" | "none" | "on" | "sentences" | "words" | "characters";
|
|
15
|
+
pattern: string;
|
|
16
|
+
initialValue: string;
|
|
17
|
+
label: string;
|
|
18
|
+
minLength: number;
|
|
19
|
+
maxLength: number;
|
|
20
|
+
rows: number;
|
|
21
|
+
private $input;
|
|
22
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
23
|
+
private handleChange;
|
|
24
|
+
firstUpdated(): void;
|
|
25
|
+
private refreshAttributes;
|
|
26
|
+
focus(): void;
|
|
27
|
+
}
|
|
28
|
+
declare global {
|
|
29
|
+
interface HTMLElementTagNameMap {
|
|
30
|
+
"tk-textarea": TkTextarea;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export { TkTextarea };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { LitElement, html, css, unsafeCSS } from 'lit';
|
|
3
|
+
import { property, state, eventOptions, customElement } from 'lit/decorators.js';
|
|
4
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
+
import { uniqueID } from '../utils/unique.js';
|
|
6
|
+
import css_248z from './textarea.scss.js';
|
|
7
|
+
|
|
8
|
+
let TkTextarea = class TkTextarea extends LitElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this._id = uniqueID();
|
|
12
|
+
this.type = "text";
|
|
13
|
+
this.required = false;
|
|
14
|
+
this.disabled = false;
|
|
15
|
+
this.readonly = false;
|
|
16
|
+
this.rows = 1;
|
|
17
|
+
}
|
|
18
|
+
set value(value) {
|
|
19
|
+
if (!this.$input) {
|
|
20
|
+
this.initialValue = value;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
this.$input.value = value;
|
|
24
|
+
this.refreshAttributes();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
get value() {
|
|
28
|
+
return this.$input != null ? this.$input.value : this.initialValue || "";
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return html `
|
|
32
|
+
<div id="container">
|
|
33
|
+
<slot id="before" name="before"></slot>
|
|
34
|
+
<div id="wrapper">
|
|
35
|
+
<div id="label">${this.label}</div>
|
|
36
|
+
<slot id="slot"></slot>
|
|
37
|
+
<textarea
|
|
38
|
+
id=${this._id}
|
|
39
|
+
@keydown=${this.handleChange.bind(this)}
|
|
40
|
+
@input=${this.handleChange.bind(this)}
|
|
41
|
+
@focusout=${this.handleChange.bind(this)}
|
|
42
|
+
?required="${this.required}"
|
|
43
|
+
?disabled="${this.disabled}"
|
|
44
|
+
?readonly="${this.readonly}"
|
|
45
|
+
aria-label="${ifDefined(this.label)}"
|
|
46
|
+
name="${ifDefined(this.name)}"
|
|
47
|
+
pattern="${ifDefined(this.pattern)}"
|
|
48
|
+
autocomplete="${ifDefined(this.autocomplete)}"
|
|
49
|
+
autocapitalize="${ifDefined(this.autocapitalize)}"
|
|
50
|
+
minlength="${ifDefined(this.minLength)}"
|
|
51
|
+
maxlength="${ifDefined(this.maxLength)}"
|
|
52
|
+
rows="${this.rows}"
|
|
53
|
+
tabindex="${this.disabled ? -1 : 0}"
|
|
54
|
+
></textarea>
|
|
55
|
+
</div>
|
|
56
|
+
<slot id="after" name="after"></slot>
|
|
57
|
+
</div>
|
|
58
|
+
`;
|
|
59
|
+
}
|
|
60
|
+
handleChange() {
|
|
61
|
+
this.refreshAttributes();
|
|
62
|
+
}
|
|
63
|
+
firstUpdated() {
|
|
64
|
+
var _a;
|
|
65
|
+
this.$input = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("textarea");
|
|
66
|
+
this.appendChild(this.$input);
|
|
67
|
+
if (this.initialValue)
|
|
68
|
+
this.value = this.initialValue;
|
|
69
|
+
}
|
|
70
|
+
refreshAttributes() {
|
|
71
|
+
this.$input.value ? this.setAttribute("dirty", "") : this.removeAttribute("dirty");
|
|
72
|
+
this.$input.checkValidity() ? this.removeAttribute("invalid") : this.setAttribute("invalid", "");
|
|
73
|
+
}
|
|
74
|
+
focus() {
|
|
75
|
+
this.$input.focus();
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
TkTextarea.styles = css `
|
|
79
|
+
${unsafeCSS(css_248z)}
|
|
80
|
+
`;
|
|
81
|
+
__decorate([
|
|
82
|
+
property({ type: String })
|
|
83
|
+
], TkTextarea.prototype, "value", null);
|
|
84
|
+
__decorate([
|
|
85
|
+
property({ attribute: true, type: String })
|
|
86
|
+
], TkTextarea.prototype, "name", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
property({ type: String })
|
|
89
|
+
], TkTextarea.prototype, "list", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
property({ type: String })
|
|
92
|
+
], TkTextarea.prototype, "type", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
property({ type: Boolean })
|
|
95
|
+
], TkTextarea.prototype, "required", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
property({ type: Boolean })
|
|
98
|
+
], TkTextarea.prototype, "disabled", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
property({ type: Boolean })
|
|
101
|
+
], TkTextarea.prototype, "readonly", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
property({ type: String })
|
|
104
|
+
], TkTextarea.prototype, "autocomplete", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
property({ type: String })
|
|
107
|
+
], TkTextarea.prototype, "autocapitalize", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
property({ type: String })
|
|
110
|
+
], TkTextarea.prototype, "pattern", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
state()
|
|
113
|
+
], TkTextarea.prototype, "initialValue", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
property({ type: String })
|
|
116
|
+
], TkTextarea.prototype, "label", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
property({ type: Number })
|
|
119
|
+
], TkTextarea.prototype, "minLength", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
property({ type: Number })
|
|
122
|
+
], TkTextarea.prototype, "maxLength", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
property({ type: Number })
|
|
125
|
+
], TkTextarea.prototype, "rows", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
eventOptions({ passive: true })
|
|
128
|
+
], TkTextarea.prototype, "handleChange", null);
|
|
129
|
+
TkTextarea = __decorate([
|
|
130
|
+
customElement("tk-textarea")
|
|
131
|
+
], TkTextarea);
|
|
132
|
+
|
|
133
|
+
export { TkTextarea };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--_input-state-color:var(--input-state-color-inactive,var(--shade,hsl(var(--shade-h,0),var(--shade-s,0%),var(--shade-l,66.6667%))));--_input-padding-left-right:var(--input-padding-left-right,0);--_input-bg:var(--input-bg,#0000);--_input-border-radius:0;--_input-color:var(--input-color,var(--foreground,#454545));--_input-label-color:var(--input-label-color,var(--shade,hsl(var(--shade-h,0),var(--shade-s,0%),var(--shade-l,66.6667%))));--_input-border-style:var(--input-border-style,solid);display:block;outline:none;transform:translateZ(0)}:host([disabled]){--_input-state-color:var(--input-state-color-disabled,var(--shade-light,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.15))));--_input-label-color:var(--input-label-color-disabled,var(--shade,hsl(var(--shade-h,0),var(--shade-s,0%),var(--shade-l,66.6667%))));--_input-color:var(--input-color-disabled,var(--shade-lighter,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.3))));--_input-border-style:var(--input-border-style-disabled,dashed);pointer-events:none}#container{align-items:center;background:var(--_input-bg);border-bottom:var(--input-border-width,.0625rem) var(--_input-border-style) var(--_input-state-color);border-radius:var(--_input-border-radius);color:var(--_input-color);display:flex;font-size:var(--input-font-size,1rem);overflow:hidden;position:relative;transition:var(--input-transition,border-color var(--transition-duration-medium,.18s) var(--transition-timing-function-ease,ease),background var(--transition-duration-medium,.18s) var(--transition-timing-function-ease,ease))}#wrapper{flex-grow:1;position:relative}#label{color:var(--_input-label-color);font-size:inherit;left:var(--_input-padding-left-right);line-height:1;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%);transition:var(--input-label-transition,top var(--transition-duration-fast,.12s) var(--transition-timing-function-linear,linear),font-size var(--transition-duration-fast,.12s) var(--transition-timing-function-linear,linear),transform var(--transition-duration-fast,.12s) var(--transition-timing-function-linear,linear));-webkit-user-select:none;user-select:none;white-space:nowrap;z-index:1}:host(:hover){--_input-state-color:var(--input-state-color-hover,var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%))))}:host([filled]),:host([outlined]){--_input-padding-left-right:var(--input-padding-left-right-outlined,0.75rem)}:host([filled]){--_input-border-radius:var(--input-border-radius-outlined,0.5rem 0.5rem 0 0);--_input-bg:var(--input-bg,var(--shade-lighter,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.3))))}:host([filled]:hover){--_input-bg:var(--input-bg-filled-hover,var(--shade-light,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.15))))}:host([outlined]){--_input-border-radius:var(--input-border-radius-outlined,0.5rem)}:host([outlined]) #container{border:var(--input-border-width,.0625rem) var(--_input-border-style) var(--_input-state-color)}:host(:focus-within){--_input-state-color:var(--input-state-color-active,var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%))))}:host(:focus-within) #label,:host([dirty]) #label,:host([type=color]) #label,:host([type=date]) #label,:host([type=file]) #label,:host([type=range]) #label{font-size:var(--input-label-font-size,.75rem);top:var(--input-padding-top-bottom,.5rem);transform:translateY(0)}#slot-wrapper,::slotted(input),::slotted(select),::slotted(textarea){-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;-webkit-text-fill-color:var(--_input-color);-webkit-overflow-scrolling:touch;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#0000;border:none;box-sizing:border-box;caret-color:var(--_input-color-state);color:inherit;display:block;font-size:var(--input-font-size,1rem);margin:0;outline:none;padding:var(--input-padding-top-bottom,.5rem) var(--_input-padding-left-right);position:relative;text-align:var(--input-text-align,inherit);width:100%}:host([label]) #slot-wrapper,:host([label]) ::slotted(input),:host([label]) ::slotted(select),:host([label]) ::slotted(textarea){padding-top:calc(var(--input-label-space, .875rem) + var(--input-padding-top-bottom, .5rem))}:host([invalid]){--_input-state-color:var(--input-state-color-invalid,var(--error,hsl(var(--error-h,4.10526),var(--error-s,89.6226%),var(--error-l,58.4314%))))}::slotted(input[type=color]){cursor:pointer;height:3.75rem}::slotted([slot=after]),::slotted([slot=before]){color:var(--input-before-after-color,var(--shade,hsl(var(--shade-h,0),var(--shade-s,0%),var(--shade-l,66.6667%))))}:host(:not([outlined]):not([filled])) ::slotted([slot=before]){margin-right:var(--input-padding-left-right-outlined,.75rem)}:host(:not([outlined]):not([filled])) ::slotted([slot=after]),:host([filled]) ::slotted([slot=before]),:host([outlined]) ::slotted([slot=before]){margin-left:var(--input-padding-left-right-outlined,.75rem)}:host([filled]) ::slotted([slot=after]),:host([outlined]) ::slotted([slot=after]){margin-right:var(--input-padding-left-right-outlined,.75rem)}#wrapper ::slotted(textarea){font-family:inherit;height:var(--textarea-height,var(--_textarea-height));max-height:var(--textarea-max-height);min-height:var(--textarea-min-height,var(--textarea-height,var(--_textarea-height)));resize:var(--textarea-resize,none)}:host(:focus) ::slotted(textarea),:host(:hover) ::slotted(textarea){will-change:height}";
|
|
2
|
+
var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--_input-state-color:var(--input-state-color-inactive,var(--shade,hsl(var(--shade-h,0),var(--shade-s,0%),var(--shade-l,66.6667%))));--_input-padding-left-right:var(--input-padding-left-right,0);--_input-bg:var(--input-bg,#0000);--_input-border-radius:0;--_input-color:var(--input-color,var(--foreground,#454545));--_input-label-color:var(--input-label-color,var(--shade,hsl(var(--shade-h,0),var(--shade-s,0%),var(--shade-l,66.6667%))));--_input-border-style:var(--input-border-style,solid);display:block;outline:none;transform:translateZ(0)}:host([disabled]){--_input-state-color:var(--input-state-color-disabled,var(--shade-light,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.15))));--_input-label-color:var(--input-label-color-disabled,var(--shade,hsl(var(--shade-h,0),var(--shade-s,0%),var(--shade-l,66.6667%))));--_input-color:var(--input-color-disabled,var(--shade-lighter,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.3))));--_input-border-style:var(--input-border-style-disabled,dashed);pointer-events:none}#container{align-items:center;background:var(--_input-bg);border-bottom:var(--input-border-width,.0625rem) var(--_input-border-style) var(--_input-state-color);border-radius:var(--_input-border-radius);color:var(--_input-color);display:flex;font-size:var(--input-font-size,1rem);overflow:hidden;position:relative;transition:var(--input-transition,border-color var(--transition-duration-medium,.18s) var(--transition-timing-function-ease,ease),background var(--transition-duration-medium,.18s) var(--transition-timing-function-ease,ease))}#wrapper{flex-grow:1;position:relative}#label{color:var(--_input-label-color);font-size:inherit;left:var(--_input-padding-left-right);line-height:1;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%);transition:var(--input-label-transition,top var(--transition-duration-fast,.12s) var(--transition-timing-function-linear,linear),font-size var(--transition-duration-fast,.12s) var(--transition-timing-function-linear,linear),transform var(--transition-duration-fast,.12s) var(--transition-timing-function-linear,linear));-webkit-user-select:none;user-select:none;white-space:nowrap;z-index:1}:host(:hover){--_input-state-color:var(--input-state-color-hover,var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%))))}:host([filled]),:host([outlined]){--_input-padding-left-right:var(--input-padding-left-right-outlined,0.75rem)}:host([filled]){--_input-border-radius:var(--input-border-radius-outlined,0.5rem 0.5rem 0 0);--_input-bg:var(--input-bg,var(--shade-lighter,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.3))))}:host([filled]:hover){--_input-bg:var(--input-bg-filled-hover,var(--shade-light,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.15))))}:host([outlined]){--_input-border-radius:var(--input-border-radius-outlined,0.5rem)}:host([outlined]) #container{border:var(--input-border-width,.0625rem) var(--_input-border-style) var(--_input-state-color)}:host(:focus-within){--_input-state-color:var(--input-state-color-active,var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%))))}:host(:focus-within) #label,:host([dirty]) #label,:host([type=color]) #label,:host([type=date]) #label,:host([type=file]) #label,:host([type=range]) #label{font-size:var(--input-label-font-size,.75rem);top:var(--input-padding-top-bottom,.5rem);transform:translateY(0)}#slot-wrapper,::slotted(input),::slotted(select),::slotted(textarea){-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;-webkit-text-fill-color:var(--_input-color);-webkit-overflow-scrolling:touch;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#0000;border:none;box-sizing:border-box;caret-color:var(--_input-color-state);color:inherit;display:block;font-size:var(--input-font-size,1rem);margin:0;outline:none;padding:var(--input-padding-top-bottom,.5rem) var(--_input-padding-left-right);position:relative;text-align:var(--input-text-align,inherit);width:100%}:host([label]) #slot-wrapper,:host([label]) ::slotted(input),:host([label]) ::slotted(select),:host([label]) ::slotted(textarea){padding-top:calc(var(--input-label-space, .875rem) + var(--input-padding-top-bottom, .5rem))}:host([invalid]){--_input-state-color:var(--input-state-color-invalid,var(--error,hsl(var(--error-h,4.10526),var(--error-s,89.6226%),var(--error-l,58.4314%))))}::slotted(input[type=color]){cursor:pointer;height:3.75rem}::slotted([slot=after]),::slotted([slot=before]){color:var(--input-before-after-color,var(--shade,hsl(var(--shade-h,0),var(--shade-s,0%),var(--shade-l,66.6667%))))}:host(:not([outlined]):not([filled])) ::slotted([slot=before]){margin-right:var(--input-padding-left-right-outlined,.75rem)}:host(:not([outlined]):not([filled])) ::slotted([slot=after]),:host([filled]) ::slotted([slot=before]),:host([outlined]) ::slotted([slot=before]){margin-left:var(--input-padding-left-right-outlined,.75rem)}:host([filled]) ::slotted([slot=after]),:host([outlined]) ::slotted([slot=after]){margin-right:var(--input-padding-left-right-outlined,.75rem)}#wrapper ::slotted(textarea){font-family:inherit;height:var(--textarea-height,var(--_textarea-height));max-height:var(--textarea-max-height);min-height:var(--textarea-min-height,var(--textarea-height,var(--_textarea-height)));resize:var(--textarea-resize,none)}:host(:focus) ::slotted(textarea),:host(:hover) ::slotted(textarea){will-change:height}";
|
|
3
|
+
|
|
4
|
+
export { css_248z as default, stylesheet };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./textfield";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TkTextfield } from './textfield.js';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
declare class TkTextfield extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult;
|
|
4
|
+
private _id;
|
|
5
|
+
set value(value: string);
|
|
6
|
+
get value(): string;
|
|
7
|
+
name: string;
|
|
8
|
+
list: string;
|
|
9
|
+
type: "email" | "number" | "password" | "text" | "search";
|
|
10
|
+
required: boolean;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
readonly: boolean;
|
|
13
|
+
autocomplete: "on" | "off";
|
|
14
|
+
autocapitalize: "off" | "none" | "on" | "sentences" | "words" | "characters";
|
|
15
|
+
pattern: string;
|
|
16
|
+
initialValue: string;
|
|
17
|
+
label: string;
|
|
18
|
+
min: number;
|
|
19
|
+
max: number;
|
|
20
|
+
minLength: number;
|
|
21
|
+
maxLength: number;
|
|
22
|
+
private $input;
|
|
23
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
24
|
+
private handleChange;
|
|
25
|
+
firstUpdated(): void;
|
|
26
|
+
private refreshAttributes;
|
|
27
|
+
focus(): void;
|
|
28
|
+
}
|
|
29
|
+
declare global {
|
|
30
|
+
interface HTMLElementTagNameMap {
|
|
31
|
+
"tk-textfield": TkTextfield;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export { TkTextfield };
|