@universal-material/web 3.0.136 → 3.0.137

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.
@@ -0,0 +1,18 @@
1
+ import { TemplateResult } from 'lit';
2
+ import { UmTextFieldBase } from '../shared/text-field-base/text-field-base.js';
3
+ export declare class UmButtonField extends UmTextFieldBase {
4
+ static styles: import("lit").CSSResultGroup[];
5
+ protected _value: string;
6
+ get value(): string;
7
+ set value(value: string);
8
+ _button: HTMLButtonElement;
9
+ _input: HTMLElement;
10
+ protected renderControl(): TemplateResult;
11
+ protected renderAfterContent(): TemplateResult;
12
+ }
13
+ declare global {
14
+ interface HTMLElementTagNameMap {
15
+ 'u-button-field': UmButtonField;
16
+ }
17
+ }
18
+ //# sourceMappingURL=button-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-field.d.ts","sourceRoot":"","sources":["../../src/button-field/button-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAI3C,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAG/E,qBACa,aAAc,SAAQ,eAAe;IAChD,OAAgB,MAAM,iCAAoC;IAE1D,SAAS,CAAC,MAAM,EAAE,MAAM,CAAM;IAC9B,IACI,KAAK,IAGQ,MAAM,CADtB;IACD,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAItB;IAEuB,OAAO,EAAG,iBAAiB,CAAC;IAC7B,MAAM,EAAG,WAAW,CAAC;cAEzB,aAAa,IAAI,cAAc;cAa/B,kBAAkB,IAAI,cAAc;CAOxD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAC;KACjC;CACF"}
@@ -0,0 +1,59 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { html } from 'lit';
8
+ import { customElement, property, query } from 'lit/decorators.js';
9
+ import { html as staticHtml } from 'lit/static-html.js';
10
+ import { UmTextFieldBase } from '../shared/text-field-base/text-field-base.js';
11
+ import { styles } from './button-field.styles';
12
+ let UmButtonField = class UmButtonField extends UmTextFieldBase {
13
+ constructor() {
14
+ super(...arguments);
15
+ this._value = '';
16
+ }
17
+ static { this.styles = [UmTextFieldBase.styles, styles]; }
18
+ get value() {
19
+ return this._value;
20
+ }
21
+ set value(value) {
22
+ this._value = value;
23
+ this.empty = !value;
24
+ this.elementInternals.setFormValue(value);
25
+ }
26
+ renderControl() {
27
+ return staticHtml `
28
+ <button
29
+ class="button"
30
+ aria-expanded="false"
31
+ aria-owns="select"
32
+ ?disabled=${this.disabled}></button>
33
+ <div class="input">
34
+ <slot>${this.value}</slot>
35
+ </div>
36
+ <u-ripple ?disabled=${this.disabled}></u-ripple>`;
37
+ }
38
+ renderAfterContent() {
39
+ return html `
40
+ <u-menu>
41
+ <slot></slot>
42
+ </u-menu>
43
+ `;
44
+ }
45
+ };
46
+ __decorate([
47
+ property()
48
+ ], UmButtonField.prototype, "value", null);
49
+ __decorate([
50
+ query('.button', true)
51
+ ], UmButtonField.prototype, "_button", void 0);
52
+ __decorate([
53
+ query('.input', true)
54
+ ], UmButtonField.prototype, "_input", void 0);
55
+ UmButtonField = __decorate([
56
+ customElement('u-button-field')
57
+ ], UmButtonField);
58
+ export { UmButtonField };
59
+ //# sourceMappingURL=button-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-field.js","sourceRoot":"","sources":["../../src/button-field/button-field.ts"],"names":[],"mapp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.js';\nimport { html as staticHtml } from 'lit/static-html.js';\n\nimport { UmTextFieldBase } from '../shared/text-field-base/text-field-base.js';\nimport { styles } from './button-field.styles';\n\n@customElement('u-button-field')\nexport class UmButtonField extends UmTextFieldBase {\n static override styles = [UmTextFieldBase.styles, styles];\n\n protected _value: string = '';\n @property()\n get value() {\n return this._value;\n }\n set value(value: string) {\n this._value = value;\n this.empty = !value;\n this.elementInternals.setFormValue(value);\n }\n\n @query('.button', true) _button!: HTMLButtonElement;\n @query('.input', true) _input!: HTMLElement;\n\n protected override renderControl(): TemplateResult {\n return staticHtml`\n <button \n class=\"button\"\n aria-expanded=\"false\"\n aria-owns=\"select\"\n ?disabled=${this.disabled}></button>\n <div class=\"input\">\n <slot>${this.value}</slot>\n </div>\n <u-ripple ?disabled=${this.disabled}></u-ripple>`;\n }\n\n protected override renderAfterContent(): TemplateResult {\n return html`\n <u-menu>\n <slot></slot>\n </u-menu>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-button-field': UmButtonField;\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const styles: import("lit").CSSResult;
2
+ //# sourceMappingURL=button-field.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-field.styles.d.ts","sourceRoot":"","sources":["../../src/button-field/button-field.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAclB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { css } from 'lit';
2
+ export const styles = css `
3
+ :host(:not([disabled])) .container {
4
+ cursor: pointer;
5
+ }
6
+
7
+ .button {
8
+ position: absolute;
9
+ inset: 0;
10
+ margin: 0;
11
+ padding: 0;
12
+ background: transparent;
13
+ border: none;
14
+ appearance: none;
15
+ }
16
+ `;
17
+ //# sourceMappingURL=button-field.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-field.styles.js","sourceRoot":"","sources":["../../src/button-field/button-field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;;;;;CAczB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host(:not([disabled])) .container {\n cursor: pointer;\n }\n\n .button {\n position: absolute;\n inset: 0;\n margin: 0;\n padding: 0;\n background: transparent;\n border: none;\n appearance: none;\n }\n`;\n"]}