@universal-material/web 3.0.135 → 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.
- package/button-field/button-field.d.ts +18 -0
- package/button-field/button-field.d.ts.map +1 -0
- package/button-field/button-field.js +59 -0
- package/button-field/button-field.js.map +1 -0
- package/button-field/button-field.styles.d.ts +2 -0
- package/button-field/button-field.styles.d.ts.map +1 -0
- package/button-field/button-field.styles.js +17 -0
- package/button-field/button-field.styles.js.map +1 -0
- package/checkbox/checkbox.d.ts +1 -1
- package/checkbox/checkbox.d.ts.map +1 -1
- package/checkbox/checkbox.js +4 -6
- package/checkbox/checkbox.js.map +1 -1
- package/checkbox/checkbox.styles.d.ts.map +1 -1
- package/checkbox/checkbox.styles.js +0 -65
- package/checkbox/checkbox.styles.js.map +1 -1
- package/custom-elements.json +4803 -3727
- package/field/field-base.styles.d.ts.map +1 -1
- package/field/field-base.styles.js +1 -0
- package/field/field-base.styles.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/radio/radio.d.ts +1 -1
- package/radio/radio.d.ts.map +1 -1
- package/radio/radio.js +1 -2
- package/radio/radio.js.map +1 -1
- package/radio/radio.styles.d.ts.map +1 -1
- package/radio/radio.styles.js +0 -65
- package/radio/radio.styles.js.map +1 -1
- package/shared/menu-field/menu-field-navigation-controller.d.ts.map +1 -1
- package/shared/menu-field/menu-field-navigation-controller.js +0 -1
- package/shared/menu-field/menu-field-navigation-controller.js.map +1 -1
- package/shared/selection-control/checkbox-base.d.ts +1 -0
- package/shared/selection-control/checkbox-base.d.ts.map +1 -0
- package/shared/selection-control/checkbox-base.js +7 -0
- package/shared/selection-control/checkbox-base.js.map +1 -0
- package/shared/selection-control/selection-control-list-item.d.ts.map +1 -1
- package/shared/selection-control/selection-control-list-item.js +9 -5
- package/shared/selection-control/selection-control-list-item.js.map +1 -1
- package/shared/selection-control/selection-control.d.ts +6 -0
- package/shared/selection-control/selection-control.d.ts.map +1 -1
- package/shared/selection-control/selection-control.js +67 -10
- package/shared/selection-control/selection-control.js.map +1 -1
- package/shared/selection-control/selection-control.styles.d.ts.map +1 -1
- package/shared/selection-control/selection-control.styles.js +0 -1
- package/shared/selection-control/selection-control.styles.js.map +1 -1
- package/switch/switch.d.ts +1 -1
- package/switch/switch.d.ts.map +1 -1
- package/switch/switch.js +7 -9
- package/switch/switch.js.map +1 -1
- package/switch/switch.styles.d.ts.map +1 -1
- package/switch/switch.styles.js +0 -65
- package/switch/switch.styles.js.map +1 -1
|
@@ -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":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGxC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,eAAe;IAA3C;;QAGK,WAAM,GAAW,EAAE,CAAC;IAkChC,CAAC;aApCiB,WAAM,GAAG,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,AAAnC,CAAoC;IAI1D,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD,IAAI,KAAK,CAAC,KAAa;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC;QACpB,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAKkB,aAAa;QAC9B,OAAO,UAAU,CAAA;;;;;qBAKA,IAAI,CAAC,QAAQ;;gBAElB,IAAI,CAAC,KAAK;;4BAEE,IAAI,CAAC,QAAQ,cAAc,CAAC;IACtD,CAAC;IAEkB,kBAAkB;QACnC,OAAO,IAAI,CAAA;;;;KAIV,CAAC;IACJ,CAAC;;AA/BD;IADC,QAAQ,EAAE;0CAGV;AAOuB;IAAvB,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC;8CAA6B;AAC7B;IAAtB,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC;6CAAsB;AAfjC,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CAqCzB","sourcesContent":["import { html, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.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 @@
|
|
|
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"]}
|
package/checkbox/checkbox.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { HTMLTemplateResult } from 'lit';
|
|
|
3
3
|
import { UmSelectionControl } from '../shared/selection-control/selection-control.js';
|
|
4
4
|
export declare class UmCheckbox extends UmSelectionControl {
|
|
5
5
|
#private;
|
|
6
|
-
static styles: import("lit").
|
|
6
|
+
static styles: import("lit").CSSResultGroup[];
|
|
7
7
|
hideStateLayer: boolean;
|
|
8
8
|
get indeterminate(): boolean;
|
|
9
9
|
set indeterminate(indeterminate: boolean);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/checkbox/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAQ,kBAAkB,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/checkbox/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAQ,kBAAkB,EAAE,MAAM,KAAK,CAAC;AAK/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAEtF,qBACa,UAAW,SAAQ,kBAAkB;;IAChD,OAAgB,MAAM,iCAAuC;IAIc,cAAc,UAAS;IAElG,IACI,aAAa,IAAI,OAAO,CAE3B;IACD,IAAI,aAAa,CAAC,aAAa,EAAE,OAAO,EAUvC;IAED,IAAa,OAAO,IAAI,OAAO,CAE9B;IACD,IAAa,OAAO,CAAC,OAAO,EAAE,OAAO,EAGpC;;IAMQ,YAAY,CAAC,iBAAiB,EAAE,cAAc;cAMpC,eAAe,IAAI,kBAAkB;CAKzD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,UAAU,CAAC;KAC1B;CACF"}
|
package/checkbox/checkbox.js
CHANGED
|
@@ -6,14 +6,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { html } from 'lit';
|
|
8
8
|
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
-
import { styles as baseStyles } from '../shared/base.styles.js';
|
|
10
9
|
import { styles } from './checkbox.styles.js';
|
|
11
10
|
import { UmSelectionControl } from '../shared/selection-control/selection-control.js';
|
|
12
11
|
let UmCheckbox = class UmCheckbox extends UmSelectionControl {
|
|
13
|
-
static { this.styles = [
|
|
14
|
-
baseStyles,
|
|
15
|
-
styles
|
|
16
|
-
]; }
|
|
12
|
+
static { this.styles = [UmSelectionControl.styles, styles]; }
|
|
17
13
|
#indeterminate;
|
|
18
14
|
get indeterminate() {
|
|
19
15
|
return this.#indeterminate;
|
|
@@ -45,7 +41,9 @@ let UmCheckbox = class UmCheckbox extends UmSelectionControl {
|
|
|
45
41
|
this.indeterminate = this.indeterminate;
|
|
46
42
|
}
|
|
47
43
|
renderIndicator() {
|
|
48
|
-
return html
|
|
44
|
+
return html `
|
|
45
|
+
<div class="border"><div class="indicator"></div></div>
|
|
46
|
+
`;
|
|
49
47
|
}
|
|
50
48
|
};
|
|
51
49
|
__decorate([
|
package/checkbox/checkbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/checkbox/checkbox.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,IAAI,EAAsB,MAAM,KAAK,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/checkbox/checkbox.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,IAAI,EAAsB,MAAM,KAAK,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAG/E,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,kBAAkB;aAChC,WAAM,GAAG,CAAC,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,AAAtC,CAAuC;IAE7D,cAAc,CAAS;IAKvB,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IACD,IAAI,aAAa,CAAC,aAAsB;QACtC,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QAEpC,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;YAC9C,OAAO;QACT,CAAC;QAED,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QAC3C,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,IAAa,OAAO;QAClB,OAAO,KAAK,CAAC,OAAO,CAAC;IACvB,CAAC;IACD,IAAa,OAAO,CAAC,OAAgB;QACnC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED;QACE,KAAK,EAAE,CAAC;QA7BV,mBAAc,GAAG,KAAK,CAAC;QAEoD,mBAAc,GAAG,KAAK,CAAC;IA4BlG,CAAC;IAEQ,YAAY,CAAC,iBAAiC;QACrD,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;QACtC,0CAA0C;QAC1C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;IAC1C,CAAC;IAEkB,eAAe;QAChC,OAAO,IAAI,CAAA;;KAEV,CAAC;IACJ,CAAC;;AAxC0E;IAA1E,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAAwB;AAGlG;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CAG3B;AAVU,UAAU;IADtB,aAAa,CAAC,YAAY,CAAC;GACf,UAAU,CA8CtB","sourcesContent":["import { PropertyValues } from '@lit/reactive-element';\nimport { html, HTMLTemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { styles } from './checkbox.styles.js';\n\nimport { UmSelectionControl } from '../shared/selection-control/selection-control.js';\n\n@customElement('u-checkbox')\nexport class UmCheckbox extends UmSelectionControl {\n static override styles = [UmSelectionControl.styles, styles];\n\n #indeterminate = false;\n\n @property({ type: Boolean, attribute: 'hide-state-layer', reflect: true }) hideStateLayer = false;\n\n @property({ type: Boolean })\n get indeterminate(): boolean {\n return this.#indeterminate;\n }\n set indeterminate(indeterminate: boolean) {\n this.#indeterminate = indeterminate;\n\n if (!indeterminate) {\n this.input?.classList.remove('indeterminate');\n return;\n }\n\n this.input?.classList.add('indeterminate');\n this.elementInternals.setFormValue(null);\n }\n\n override get checked(): boolean {\n return super.checked;\n }\n override set checked(checked: boolean) {\n super.checked = checked;\n this.indeterminate = false;\n }\n\n constructor() {\n super();\n }\n\n override firstUpdated(changedProperties: PropertyValues) {\n super.firstUpdated(changedProperties);\n // eslint-disable-next-line no-self-assign\n this.indeterminate = this.indeterminate;\n }\n\n protected override renderIndicator(): HTMLTemplateResult {\n return html`\n <div class=\"border\"><div class=\"indicator\"></div></div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-checkbox': UmCheckbox;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.styles.d.ts","sourceRoot":"","sources":["../../src/checkbox/checkbox.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"checkbox.styles.d.ts","sourceRoot":"","sources":["../../src/checkbox/checkbox.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBA2DlB,CAAC"}
|
|
@@ -1,70 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
export const styles = css `
|
|
3
|
-
:host {
|
|
4
|
-
--_state-layer-padding: var(--u-checkbox-state-layer-padding, 4px);
|
|
5
|
-
--_input-size: calc(var(--_width) - var(--_state-layer-padding) * 2);
|
|
6
|
-
--_indicator-color: var(--u-checkbox-indicator-unselected-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));
|
|
7
|
-
display: inline-block;
|
|
8
|
-
vertical-align: middle;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.container {
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
position: relative;
|
|
14
|
-
width: var(--_width);
|
|
15
|
-
height: var(--_height);
|
|
16
|
-
padding: var(--_state-layer-padding);
|
|
17
|
-
border-radius: var(--u-shape-corner-full, 9999px);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
:host([hide-state-layer]) .container {
|
|
21
|
-
width: var(--_indicator-size);
|
|
22
|
-
height: var(--_indicator-size);
|
|
23
|
-
padding: 0;
|
|
24
|
-
}
|
|
25
|
-
:host([hide-state-layer]) u-ripple {
|
|
26
|
-
display: none;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
input {
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
padding: 0;
|
|
34
|
-
margin: 0;
|
|
35
|
-
border-radius: inherit;
|
|
36
|
-
appearance: none;
|
|
37
|
-
pointer-events: none;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
u-ripple {
|
|
41
|
-
padding: var(--_state-layer-padding);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.indicator-container {
|
|
45
|
-
position: absolute;
|
|
46
|
-
display: flex;
|
|
47
|
-
align-items: center;
|
|
48
|
-
justify-content: center;
|
|
49
|
-
inset: 0;
|
|
50
|
-
pointer-events: none;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
input:checked ~ .indicator-container {
|
|
54
|
-
--_indicator-color: var(--u-checkbox-indicator-selected-color, var(--u-color-primary, rgb(103, 80, 164)));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
:host([disabled]) {
|
|
58
|
-
opacity: var(--u-checkbox-disabled-state-opacity, 0.38);
|
|
59
|
-
}
|
|
60
|
-
:host([disabled]) input,
|
|
61
|
-
:host([disabled]) .container {
|
|
62
|
-
cursor: default;
|
|
63
|
-
}
|
|
64
|
-
:host([disabled]) .indicator-container {
|
|
65
|
-
--_indicator-color: var(--u-checkbox-indicator-disabled-color, var(--u-color-on-surface, rgb(29, 27, 32)));
|
|
66
|
-
}
|
|
67
|
-
|
|
68
3
|
:host {
|
|
69
4
|
--_indicator-size: var(--u-checkbox-indicator-size, 1.125rem);
|
|
70
5
|
--_width: var(--u-checkbox-size, 3rem);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.styles.js","sourceRoot":"","sources":["../../src/checkbox/checkbox.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC
|
|
1
|
+
{"version":3,"file":"checkbox.styles.js","sourceRoot":"","sources":["../../src/checkbox/checkbox.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host {\n --_indicator-size: var(--u-checkbox-indicator-size, 1.125rem);\n --_width: var(--u-checkbox-size, 3rem);\n --_height: var(--_width);\n }\n\n .border {\n width: var(--_indicator-size);\n height: var(--_indicator-size);\n box-shadow: 0 0 0 var(--u-checkbox-indicator-border-width, 0.125rem) var(--_indicator-color) inset;\n border-radius: var(--u-checkbox-indicator-shaper-coner, 2px);\n transition: box-shadow 175ms 175ms;\n }\n\n .indicator {\n position: absolute;\n display: flex;\n justify-content: center;\n width: var(--_indicator-size);\n height: var(--_indicator-size);\n overflow: hidden;\n clip: rect(0, 0, var(--_indicator-size), 0);\n transition: clip 275ms;\n }\n .indicator::before {\n position: relative;\n top: 25%;\n box-sizing: border-box;\n display: block;\n width: 0.75rem;\n height: 0.35rem;\n content: \"\";\n border: var(--u-checkbox-indicator-border-width, 0.125rem) solid var(--u-color-on-primary, rgb(255, 255, 255));\n border-top-style: none;\n border-right-style: none;\n transform: rotate(-45deg);\n transition: border 175ms, transform 175ms;\n }\n\n input.indeterminate ~ .indicator-container .border,\n input:checked ~ .indicator-container .border {\n box-shadow: 0 0 0 calc(var(--_indicator-size) / 2) var(--_indicator-color) inset;\n transition: box-shadow 175ms;\n }\n input.indeterminate ~ .indicator-container .indicator,\n input:checked ~ .indicator-container .indicator {\n clip: rect(0, var(--_indicator-size), var(--_indicator-size), 0);\n transition: clip 175ms 175ms;\n }\n\n input.indeterminate ~ .indicator-container {\n --_indicator-color: var(--u-checkbox-indicator-indeterminate-color, var(--u-color-primary, rgb(103, 80, 164)));\n }\n input.indeterminate ~ .indicator-container .indicator::before {\n border-left-style: none;\n transform: rotate(0);\n width: 0.6rem;\n }\n`;\n"]}
|