@universal-material/web 3.0.135 → 3.0.136
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/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 +3127 -2724
- 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
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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AxC0E;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"]}
|