@universal-material/web 3.0.0 → 3.0.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/README.md +28 -0
- package/button/button-base.d.ts +15 -9
- package/button/button-base.d.ts.map +1 -1
- package/button/button-base.js +46 -93
- package/button/button-base.js.map +1 -1
- package/button/button-base.styles.d.ts +2 -0
- package/button/button-base.styles.d.ts.map +1 -0
- package/button/button-base.styles.js +75 -0
- package/button/button-base.styles.js.map +1 -0
- package/button/button-set.d.ts +10 -2
- package/button/button-set.d.ts.map +1 -1
- package/button/button-set.js +27 -16
- package/button/button-set.js.map +1 -1
- package/button/button-set.styles.d.ts +2 -0
- package/button/button-set.styles.d.ts.map +1 -0
- package/button/button-set.styles.js +39 -0
- package/button/button-set.styles.js.map +1 -0
- package/button/button.d.ts +18 -4
- package/button/button.d.ts.map +1 -1
- package/button/button.js +29 -102
- package/button/button.js.map +1 -1
- package/button/button.styles.d.ts +2 -0
- package/button/button.styles.d.ts.map +1 -0
- package/button/button.styles.js +96 -0
- package/button/button.styles.js.map +1 -0
- package/button/fab.d.ts +14 -2
- package/button/fab.d.ts.map +1 -1
- package/button/fab.js +25 -106
- package/button/fab.js.map +1 -1
- package/button/fab.styles.d.ts +2 -0
- package/button/fab.styles.d.ts.map +1 -0
- package/button/fab.styles.js +89 -0
- package/button/fab.styles.js.map +1 -0
- package/button/icon-button.d.ts +3 -4
- package/button/icon-button.d.ts.map +1 -1
- package/button/icon-button.js +15 -89
- package/button/icon-button.js.map +1 -1
- package/button/icon-button.styles.d.ts +2 -0
- package/button/icon-button.styles.d.ts.map +1 -0
- package/button/icon-button.styles.js +70 -0
- package/button/icon-button.styles.js.map +1 -0
- package/card/card-content.d.ts +5 -3
- package/card/card-content.d.ts.map +1 -1
- package/card/card-content.js +33 -13
- package/card/card-content.js.map +1 -1
- package/card/card-content.styles.d.ts +2 -0
- package/card/card-content.styles.d.ts.map +1 -0
- package/card/card-content.styles.js +15 -0
- package/card/card-content.styles.js.map +1 -0
- package/card/card-media.d.ts +3 -3
- package/card/card-media.d.ts.map +1 -1
- package/card/card-media.js +9 -17
- package/card/card-media.js.map +1 -1
- package/card/card-media.styles.d.ts +2 -0
- package/card/card-media.styles.d.ts.map +1 -0
- package/card/card-media.styles.js +13 -0
- package/card/card-media.styles.js.map +1 -0
- package/card/card.d.ts +9 -6
- package/card/card.d.ts.map +1 -1
- package/card/card.js +22 -34
- package/card/card.js.map +1 -1
- package/card/card.styles.d.ts +2 -0
- package/card/card.styles.d.ts.map +1 -0
- package/card/card.styles.js +26 -0
- package/card/card.styles.js.map +1 -0
- package/checkbox/checkbox.d.ts +16 -0
- package/checkbox/checkbox.d.ts.map +1 -0
- package/checkbox/checkbox.js +75 -0
- package/checkbox/checkbox.js.map +1 -0
- package/container/container.d.ts +14 -0
- package/container/container.d.ts.map +1 -0
- package/container/container.js +23 -0
- package/container/container.js.map +1 -0
- package/container/container.styles.d.ts +2 -0
- package/container/container.styles.d.ts.map +1 -0
- package/container/container.styles.js +43 -0
- package/container/container.styles.js.map +1 -0
- package/custom-elements.json +3706 -0
- package/divider/divider.d.ts +5 -2
- package/divider/divider.d.ts.map +1 -1
- package/divider/divider.js +11 -19
- package/divider/divider.js.map +1 -1
- package/divider/divider.styles.d.ts +2 -0
- package/divider/divider.styles.d.ts.map +1 -0
- package/divider/divider.styles.js +15 -0
- package/divider/divider.styles.js.map +1 -0
- package/elevation/elevation.d.ts +4 -3
- package/elevation/elevation.d.ts.map +1 -1
- package/elevation/elevation.js +11 -37
- package/elevation/elevation.js.map +1 -1
- package/elevation/elevation.styles.d.ts +2 -0
- package/elevation/elevation.styles.d.ts.map +1 -0
- package/elevation/elevation.styles.js +28 -0
- package/elevation/elevation.styles.js.map +1 -0
- package/index.d.ts +24 -0
- package/index.d.ts.map +1 -0
- package/index.js +24 -0
- package/index.js.map +1 -0
- package/package.json +35 -26
- package/ripple/ripple.d.ts +11 -5
- package/ripple/ripple.d.ts.map +1 -1
- package/ripple/ripple.js +66 -120
- package/ripple/ripple.js.map +1 -1
- package/ripple/ripple.styles.d.ts +2 -0
- package/ripple/ripple.styles.d.ts.map +1 -0
- package/ripple/ripple.styles.js +74 -0
- package/ripple/ripple.styles.js.map +1 -0
- package/shared/base.styles.d.ts +2 -0
- package/shared/base.styles.d.ts.map +1 -0
- package/shared/base.styles.js +9 -0
- package/shared/base.styles.js.map +1 -0
- package/table/table-body.d.ts +11 -0
- package/table/table-body.d.ts.map +1 -0
- package/table/table-body.js +21 -0
- package/table/table-body.js.map +1 -0
- package/table/table-body.styles.d.ts +2 -0
- package/table/table-body.styles.d.ts.map +1 -0
- package/table/table-body.styles.js +11 -0
- package/table/table-body.styles.js.map +1 -0
- package/table/table-cell.d.ts +11 -0
- package/table/table-cell.d.ts.map +1 -0
- package/table/table-cell.js +21 -0
- package/table/table-cell.js.map +1 -0
- package/table/table-cell.styles.d.ts +2 -0
- package/table/table-cell.styles.d.ts.map +1 -0
- package/table/table-cell.styles.js +11 -0
- package/table/table-cell.styles.js.map +1 -0
- package/table/table-head.d.ts +11 -0
- package/table/table-head.d.ts.map +1 -0
- package/table/table-head.js +21 -0
- package/table/table-head.js.map +1 -0
- package/table/table-head.styles.d.ts +2 -0
- package/table/table-head.styles.d.ts.map +1 -0
- package/table/table-head.styles.js +11 -0
- package/table/table-head.styles.js.map +1 -0
- package/table/table-header-cell.d.ts +11 -0
- package/table/table-header-cell.d.ts.map +1 -0
- package/table/table-header-cell.js +21 -0
- package/table/table-header-cell.js.map +1 -0
- package/table/table-header-cell.styles.d.ts +2 -0
- package/table/table-header-cell.styles.d.ts.map +1 -0
- package/table/table-header-cell.styles.js +12 -0
- package/table/table-header-cell.styles.js.map +1 -0
- package/table/table-row.d.ts +11 -0
- package/table/table-row.d.ts.map +1 -0
- package/{card/button-set.js → table/table-row.js} +10 -15
- package/table/table-row.js.map +1 -0
- package/table/table-row.styles.d.ts +2 -0
- package/table/table-row.styles.d.ts.map +1 -0
- package/table/table-row.styles.js +7 -0
- package/table/table-row.styles.js.map +1 -0
- package/table/table.d.ts +16 -0
- package/table/table.d.ts.map +1 -0
- package/table/table.js +19 -0
- package/table/table.js.map +1 -0
- package/table/table.styles.d.ts +2 -0
- package/table/table.styles.d.ts.map +1 -0
- package/table/table.styles.js +16 -0
- package/table/table.styles.js.map +1 -0
- package/theme/color.d.ts +7 -0
- package/theme/color.d.ts.map +1 -0
- package/theme/color.js +2 -0
- package/theme/color.js.map +1 -0
- package/theme/css-var-builder.d.ts +9 -0
- package/theme/css-var-builder.d.ts.map +1 -0
- package/theme/css-var-builder.js +25 -0
- package/theme/css-var-builder.js.map +1 -0
- package/theme/index.d.ts +2 -0
- package/theme/index.d.ts.map +1 -0
- package/theme/index.js +2 -0
- package/theme/index.js.map +1 -0
- package/theme/neutral-colors.d.ts +4 -0
- package/theme/neutral-colors.d.ts.map +1 -0
- package/theme/neutral-colors.js +19 -0
- package/theme/neutral-colors.js.map +1 -0
- package/theme/rgb-color.d.ts +9 -0
- package/theme/rgb-color.d.ts.map +1 -0
- package/theme/rgb-color.js +13 -0
- package/theme/rgb-color.js.map +1 -0
- package/theme/theme-builder.d.ts +27 -0
- package/theme/theme-builder.d.ts.map +1 -0
- package/theme/theme-builder.js +146 -0
- package/theme/theme-builder.js.map +1 -0
- package/theme/theme-color.d.ts +6 -0
- package/theme/theme-color.d.ts.map +1 -0
- package/theme/theme-color.js +2 -0
- package/theme/theme-color.js.map +1 -0
- package/all.d.ts +0 -9
- package/all.d.ts.map +0 -1
- package/all.js +0 -9
- package/all.js.map +0 -1
- package/card/button-set.d.ts +0 -11
- package/card/button-set.d.ts.map +0 -1
- package/card/button-set.js.map +0 -1
- package/shared/area-hidden-element.d.ts +0 -5
- package/shared/area-hidden-element.d.ts.map +0 -1
- package/shared/area-hidden-element.js +0 -10
- package/shared/area-hidden-element.js.map +0 -1
package/button/icon-button.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSResult, HTMLTemplateResult, nothing } from 'lit';
|
|
2
|
-
import '../ripple/ripple';
|
|
2
|
+
import '../ripple/ripple.js';
|
|
3
3
|
import { ButtonBase } from './button-base';
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class UmIconButton extends ButtonBase {
|
|
5
5
|
static styles: CSSResult | CSSResult[];
|
|
6
6
|
variant: 'standard' | 'filled' | 'tonal' | 'outlined';
|
|
7
7
|
/**
|
|
@@ -20,7 +20,6 @@ export declare class IconButton extends ButtonBase {
|
|
|
20
20
|
* The `aria-label` of the button when the button is toggleable and selected.
|
|
21
21
|
*/
|
|
22
22
|
ariaLabelSelected: string;
|
|
23
|
-
type: 'submit' | 'button' | 'reset';
|
|
24
23
|
private readonly selectedIcons;
|
|
25
24
|
protected renderContent(): HTMLTemplateResult;
|
|
26
25
|
protected handleClick(_: UIEvent): void;
|
|
@@ -29,7 +28,7 @@ export declare class IconButton extends ButtonBase {
|
|
|
29
28
|
}
|
|
30
29
|
declare global {
|
|
31
30
|
interface HTMLElementTagNameMap {
|
|
32
|
-
'u-icon-button':
|
|
31
|
+
'u-icon-button': UmIconButton;
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
//# sourceMappingURL=icon-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../src/button/icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../src/button/icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,kBAAkB,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAGnE,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,qBACa,YAAa,SAAQ,UAAU;IAE1C,OAAgB,MAAM,EAAE,SAAS,GAAG,SAAS,EAAE,CAA8B;IAElD,OAAO,EAAE,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAc;IAE9F;;;OAGG;IACwB,MAAM,UAAS;IAEiC,gBAAgB,UAAS;IAEpG;;;;OAIG;IACuC,QAAQ,UAAS;IAE3D;;OAEG;IAC2C,iBAAiB,SAAM;IAGrE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiB;cAE5B,aAAa,IAAI,kBAAkB;cAUnC,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI;IAMvC,YAAY,IAAI,MAAM,GAAG,IAAI,GAAG,OAAO,OAAO;IAMvD,OAAO,CAAC,gBAAgB;CAGzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
|
package/button/icon-button.js
CHANGED
|
@@ -4,11 +4,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
7
|
+
import { html } from 'lit';
|
|
8
8
|
import { customElement, property, queryAssignedElements } from 'lit/decorators.js';
|
|
9
|
-
import '../ripple/ripple';
|
|
9
|
+
import '../ripple/ripple.js';
|
|
10
10
|
import { ButtonBase } from './button-base';
|
|
11
|
-
|
|
11
|
+
import { styles as buttonBaseStyles } from './button-base.styles';
|
|
12
|
+
import { styles } from './icon-button.styles';
|
|
13
|
+
let UmIconButton = class UmIconButton extends ButtonBase {
|
|
12
14
|
constructor() {
|
|
13
15
|
super(...arguments);
|
|
14
16
|
this.variant = 'standard';
|
|
@@ -28,7 +30,6 @@ let IconButton = class IconButton extends ButtonBase {
|
|
|
28
30
|
* The `aria-label` of the button when the button is toggleable and selected.
|
|
29
31
|
*/
|
|
30
32
|
this.ariaLabelSelected = '';
|
|
31
|
-
this.type = 'button';
|
|
32
33
|
}
|
|
33
34
|
renderContent() {
|
|
34
35
|
return html `
|
|
@@ -52,102 +53,27 @@ let IconButton = class IconButton extends ButtonBase {
|
|
|
52
53
|
this.hasSelectionIcon = this.selectedIcons.length > 0;
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
|
-
|
|
56
|
-
ButtonBase.styles,
|
|
57
|
-
css `
|
|
58
|
-
|
|
59
|
-
:host {
|
|
60
|
-
--_surface-container-highest-color: var(--u-surface-container-highest-color, #e6e0e9);
|
|
61
|
-
|
|
62
|
-
width: var(--u-icon-button-size, 2.5rem);
|
|
63
|
-
height: var(--u-icon-button-size, 2.5rem);
|
|
64
|
-
border-radius: var(--u-icon-button-shape, 9999px);
|
|
65
|
-
font-family: var(--u-font-family-base, system-ui);
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.icon {
|
|
70
|
-
display: inline-block;
|
|
71
|
-
width: var(--u-icon-button-icon-size, 1.5rem);
|
|
72
|
-
height: var(--u-icon-button-icon-size, 1.5rem);
|
|
73
|
-
font-size: var(--u-icon-button-icon-size, 1.5rem);
|
|
74
|
-
line-height: var(--u-icon-button-icon-size, 1.5rem);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.icon.icon-selected {
|
|
78
|
-
display: none;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
:host([selected]) .icon:not(.icon-selected) {
|
|
82
|
-
display: none;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
:host([selected]) .icon.icon-selected {
|
|
86
|
-
display: inline-block;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
:host([variant="filled"]) {
|
|
90
|
-
background-color: var(--u-filled-icon-button-unselected-background-color, var(--_surface-container-highest-color));
|
|
91
|
-
color: var(--u-filled-icon-button-unselected-text-color, var(--_primary-color));
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
:host([variant="tonal"]) {
|
|
95
|
-
background-color: var(--u-total-icon-button-unselected-background-color, var(--_surface-container-highest-color));
|
|
96
|
-
color: var(--u-tonal-icon-button-unselected-text-color, var(--u-on-surface-variant-color, #49454f));
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
:host([selected][variant="filled"]),
|
|
100
|
-
:host([variant="filled"]:not([has-selection-icon])) {
|
|
101
|
-
background-color: var(--u-filled-icon-button-background-color, var(--_primary-color));
|
|
102
|
-
color: var(--u-filled-icon-button-text-color, var(--u-on-primary-color, #fff));
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
:host([selected][variant="tonal"]),
|
|
106
|
-
:host([variant="tonal"]:not([has-selection-icon])) {
|
|
107
|
-
background-color: var(--u-tonal-icon-button-background-color, var(--u-secondary-container-color, #e8def8));
|
|
108
|
-
color: var(--u-tonal-icon-button-text-color, var(--u-on-secondary-container-color, #1d192b));
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
:host([variant="standard"]),
|
|
112
|
-
:host([variant="outlined"]) {
|
|
113
|
-
color: var(--u-on-surface-variant-color, #49454f);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
:host([variant="outlined"]) {
|
|
117
|
-
border: 1px solid var(--u-outline-color, #79747e);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
:host([selected][variant="outlined"]) {
|
|
121
|
-
border: none;
|
|
122
|
-
background-color: var(--u-outlined-icon-button-selected-background-color, var(--u-inverse-surface-color, #322f35));
|
|
123
|
-
color: var(--u-outlined-icon-button-selected-text-color, var(--u-inverse-on-surface-color, #f5eff7));
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
:host([selected][variant="standard"]) {
|
|
127
|
-
color: var(--u-standard-icon-button-selected-text-color, var(--_primary-color));
|
|
128
|
-
}
|
|
129
|
-
`
|
|
130
|
-
];
|
|
56
|
+
UmIconButton.styles = [buttonBaseStyles, styles];
|
|
131
57
|
__decorate([
|
|
132
58
|
property({ reflect: true })
|
|
133
|
-
],
|
|
59
|
+
], UmIconButton.prototype, "variant", void 0);
|
|
134
60
|
__decorate([
|
|
135
61
|
property({ type: Boolean })
|
|
136
|
-
],
|
|
62
|
+
], UmIconButton.prototype, "toggle", void 0);
|
|
137
63
|
__decorate([
|
|
138
64
|
property({ type: Boolean, attribute: 'has-selection-icon', reflect: true })
|
|
139
|
-
],
|
|
65
|
+
], UmIconButton.prototype, "hasSelectionIcon", void 0);
|
|
140
66
|
__decorate([
|
|
141
67
|
property({ type: Boolean, reflect: true })
|
|
142
|
-
],
|
|
68
|
+
], UmIconButton.prototype, "selected", void 0);
|
|
143
69
|
__decorate([
|
|
144
70
|
property({ attribute: 'aria-label-selected' })
|
|
145
|
-
],
|
|
71
|
+
], UmIconButton.prototype, "ariaLabelSelected", void 0);
|
|
146
72
|
__decorate([
|
|
147
73
|
queryAssignedElements({ slot: 'selected', flatten: true })
|
|
148
|
-
],
|
|
149
|
-
|
|
74
|
+
], UmIconButton.prototype, "selectedIcons", void 0);
|
|
75
|
+
UmIconButton = __decorate([
|
|
150
76
|
customElement('u-icon-button')
|
|
151
|
-
],
|
|
152
|
-
export {
|
|
77
|
+
], UmIconButton);
|
|
78
|
+
export { UmIconButton };
|
|
153
79
|
//# sourceMappingURL=icon-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../src/button/icon-button.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../src/button/icon-button.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAa,IAAI,EAA+B,MAAM,KAAK,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAEnF,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGvC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAArC;;QAIsB,YAAO,GAAiD,UAAU,CAAC;QAE9F;;;WAGG;QACwB,WAAM,GAAG,KAAK,CAAC;QAEiC,qBAAgB,GAAG,KAAK,CAAC;QAEpG;;;;WAIG;QACuC,aAAQ,GAAG,KAAK,CAAC;QAE3D;;WAEG;QAC2C,sBAAiB,GAAG,EAAE,CAAC;IA8BvE,CAAC;IAzBoB,aAAa;QAE9B,OAAO,IAAI,CAAA;;;6CAG8B,IAAI,CAAC,gBAAgB;;KAE7D,CAAC;IACJ,CAAC;IAEkB,WAAW,CAAC,CAAU;QACvC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACjC,CAAC;IACH,CAAC;IAEQ,YAAY;QACnB,OAAO,IAAI,CAAC,QAAQ;YAClB,CAAC,CAAC,IAAI,CAAC,iBAAiB,IAAI,KAAK,CAAC,YAAY,EAAE;YAChD,CAAC,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;IAC3B,CAAC;IAEO,gBAAgB;QACtB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IACxD,CAAC;;AAnDe,mBAAM,GAA4B,CAAC,gBAAgB,EAAE,MAAM,CAAC,AAAtD,CAAuD;AAElD;IAA1B,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;6CAAoE;AAMnE;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;4CAAgB;AAEiC;IAA1E,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;sDAA0B;AAO1D;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;8CAAkB;AAKb;IAA7C,QAAQ,CAAC,EAAC,SAAS,EAAE,qBAAqB,EAAC,CAAC;uDAAwB;AAGpD;IADhB,qBAAqB,CAAC,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;mDACV;AA3BpC,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CAsDxB","sourcesContent":["import { CSSResult, html, HTMLTemplateResult, nothing } from 'lit';\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js';\n\nimport '../ripple/ripple.js';\nimport { ButtonBase } from './button-base';\nimport { styles as buttonBaseStyles } from './button-base.styles';\nimport { styles } from './icon-button.styles';\n\n@customElement('u-icon-button')\nexport class UmIconButton extends ButtonBase {\n\n static override styles: CSSResult | CSSResult[] = [buttonBaseStyles, styles];\n\n @property({reflect: true}) variant: 'standard' | 'filled' | 'tonal' | 'outlined' = 'standard';\n\n /**\n * When true, the button will toggle between selected and unselected\n * states\n */\n @property({type: Boolean}) toggle = false;\n\n @property({type: Boolean, attribute: 'has-selection-icon', reflect: true}) hasSelectionIcon = false;\n\n /**\n * Sets the selected state. When false, displays the default icon. When true,\n * displays the selected icon, or the default icon If no `slot=\"selected\"`\n * icon is provided.\n */\n @property({type: Boolean, reflect: true}) selected = false;\n\n /**\n * The `aria-label` of the button when the button is toggleable and selected.\n */\n @property({attribute: 'aria-label-selected'}) ariaLabelSelected = '';\n\n @queryAssignedElements({slot: 'selected', flatten: true})\n private readonly selectedIcons!: HTMLElement[];\n\n protected override renderContent(): HTMLTemplateResult {\n\n return html`\n <span class=\"icon\" aria-hidden=\"true\"><slot></slot></span>\n <span class=\"icon icon-selected\" aria-hidden=\"true\">\n <slot name=\"selected\" @slotchange=\"${this.handleSlotChange}\"></slot>\n </span>\n `;\n }\n\n protected override handleClick(_: UIEvent): void {\n if (this.toggle) {\n this.selected = !this.selected;\n }\n }\n\n override getAriaLabel(): string | null | typeof nothing {\n return this.selected\n ? this.ariaLabelSelected || super.getAriaLabel()\n : super.getAriaLabel();\n }\n\n private handleSlotChange() {\n this.hasSelectionIcon = this.selectedIcons.length > 0;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-icon-button': UmIconButton;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-button.styles.d.ts","sourceRoot":"","sources":["../../src/button/icon-button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAmElB,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const styles = css `
|
|
3
|
+
:host {
|
|
4
|
+
--_surface-container-highest-color: var(--u-color-surface-container-highest, rgb(230, 224, 233));
|
|
5
|
+
width: var(--u-icon-button-size, 2.5rem);
|
|
6
|
+
height: var(--u-icon-button-size, 2.5rem);
|
|
7
|
+
border-radius: var(--u-icon-button-shape-corner, 9999px);
|
|
8
|
+
font-family: var(--u-font-family-base, system-ui);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.icon {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
width: var(--u-icon-button-icon-size, 1.5rem);
|
|
14
|
+
height: var(--u-icon-button-icon-size, 1.5rem);
|
|
15
|
+
font-size: var(--u-icon-button-icon-size, 1.5rem);
|
|
16
|
+
line-height: var(--u-icon-button-icon-size, 1.5rem);
|
|
17
|
+
}
|
|
18
|
+
.icon.icon-selected {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:host([selected]) .icon:not(.icon-selected) {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
:host([selected]) .icon.icon-selected {
|
|
26
|
+
display: inline-block;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host([variant=filled]) {
|
|
30
|
+
background-color: var(--u-filled-icon-button-unselected-background-color, var(--_surface-container-highest-color));
|
|
31
|
+
color: var(--u-filled-icon-button-unselected-text-color, var(--_color-primary));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host([variant=tonal]) {
|
|
35
|
+
background-color: var(--u-total-icon-button-unselected-background-color, var(--_surface-container-highest-color));
|
|
36
|
+
color: var(--u-tonal-icon-button-unselected-text-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host([selected][variant=filled]),
|
|
40
|
+
:host([variant=filled]:not([has-selection-icon])) {
|
|
41
|
+
background-color: var(--u-filled-icon-button-background-color, var(--_color-primary));
|
|
42
|
+
color: var(--u-filled-icon-button-text-color, var(--u-color-on-primary, rgb(255, 255, 255)));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:host([selected][variant=tonal]),
|
|
46
|
+
:host([variant=tonal]:not([has-selection-icon])) {
|
|
47
|
+
background-color: var(--u-tonal-icon-button-background-color, var(--u-color-secondary-container, rgb(232, 222, 248)));
|
|
48
|
+
color: var(--u-tonal-icon-button-text-color, var(--u-color-on-secondary-container, rgb(29, 25, 43)));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host([variant=standard]),
|
|
52
|
+
:host([variant=outlined]) {
|
|
53
|
+
color: var(--u-color-on-surface-variant, rgb(73, 69, 79));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([variant=outlined]) {
|
|
57
|
+
border: 1px solid var(--u-color-outline, rgb(121, 116, 126));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host([selected][variant=outlined]) {
|
|
61
|
+
border: none;
|
|
62
|
+
background-color: var(--u-outlined-icon-button-selected-background-color, var(--u-color-inverse-surface, rgb(50, 47, 53)));
|
|
63
|
+
color: var(--u-outlined-icon-button-selected-text-color, var(--u-color-inverse-on-surface, rgb(245, 239, 247)));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host([selected][variant=standard]) {
|
|
67
|
+
color: var(--u-standard-icon-button-selected-text-color, var(--_color-primary));
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
70
|
+
//# sourceMappingURL=icon-button.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-button.styles.js","sourceRoot":"","sources":["../../src/button/icon-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host {\n --_surface-container-highest-color: var(--u-color-surface-container-highest, rgb(230, 224, 233));\n width: var(--u-icon-button-size, 2.5rem);\n height: var(--u-icon-button-size, 2.5rem);\n border-radius: var(--u-icon-button-shape-corner, 9999px);\n font-family: var(--u-font-family-base, system-ui);\n }\n\n .icon {\n display: inline-block;\n width: var(--u-icon-button-icon-size, 1.5rem);\n height: var(--u-icon-button-icon-size, 1.5rem);\n font-size: var(--u-icon-button-icon-size, 1.5rem);\n line-height: var(--u-icon-button-icon-size, 1.5rem);\n }\n .icon.icon-selected {\n display: none;\n }\n\n :host([selected]) .icon:not(.icon-selected) {\n display: none;\n }\n :host([selected]) .icon.icon-selected {\n display: inline-block;\n }\n\n :host([variant=filled]) {\n background-color: var(--u-filled-icon-button-unselected-background-color, var(--_surface-container-highest-color));\n color: var(--u-filled-icon-button-unselected-text-color, var(--_color-primary));\n }\n\n :host([variant=tonal]) {\n background-color: var(--u-total-icon-button-unselected-background-color, var(--_surface-container-highest-color));\n color: var(--u-tonal-icon-button-unselected-text-color, var(--u-color-on-surface-variant, rgb(73, 69, 79)));\n }\n\n :host([selected][variant=filled]),\n :host([variant=filled]:not([has-selection-icon])) {\n background-color: var(--u-filled-icon-button-background-color, var(--_color-primary));\n color: var(--u-filled-icon-button-text-color, var(--u-color-on-primary, rgb(255, 255, 255)));\n }\n\n :host([selected][variant=tonal]),\n :host([variant=tonal]:not([has-selection-icon])) {\n background-color: var(--u-tonal-icon-button-background-color, var(--u-color-secondary-container, rgb(232, 222, 248)));\n color: var(--u-tonal-icon-button-text-color, var(--u-color-on-secondary-container, rgb(29, 25, 43)));\n }\n\n :host([variant=standard]),\n :host([variant=outlined]) {\n color: var(--u-color-on-surface-variant, rgb(73, 69, 79));\n }\n\n :host([variant=outlined]) {\n border: 1px solid var(--u-color-outline, rgb(121, 116, 126));\n }\n\n :host([selected][variant=outlined]) {\n border: none;\n background-color: var(--u-outlined-icon-button-selected-background-color, var(--u-color-inverse-surface, rgb(50, 47, 53)));\n color: var(--u-outlined-icon-button-selected-text-color, var(--u-color-inverse-on-surface, rgb(245, 239, 247)));\n }\n\n :host([selected][variant=standard]) {\n color: var(--u-standard-icon-button-selected-text-color, var(--_color-primary));\n }\n`;\n"]}
|
package/card/card-content.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
export declare class
|
|
3
|
-
static styles: import("lit").CSSResult;
|
|
2
|
+
export declare class UmCardContent extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult[];
|
|
4
|
+
hasContent: boolean;
|
|
4
5
|
render(): HTMLTemplateResult;
|
|
6
|
+
private handleSlotChange;
|
|
5
7
|
}
|
|
6
8
|
declare global {
|
|
7
9
|
interface HTMLElementTagNameMap {
|
|
8
|
-
'u-card-content':
|
|
10
|
+
'u-card-content': UmCardContent;
|
|
9
11
|
}
|
|
10
12
|
}
|
|
11
13
|
//# sourceMappingURL=card-content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-content.d.ts","sourceRoot":"","sources":["../../src/card/card-content.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"card-content.d.ts","sourceRoot":"","sources":["../../src/card/card-content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAM3D,qBACa,aAAc,SAAQ,UAAU;IAE3C,OAAgB,MAAM,4BAAwB;IAEsB,UAAU,UAAS;IAE9E,MAAM,IAAI,kBAAkB;IAKrC,OAAO,CAAC,gBAAgB;CAoBzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAC;KACjC;CACF"}
|
package/card/card-content.js
CHANGED
|
@@ -4,21 +4,41 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { LitElement,
|
|
8
|
-
import { customElement } from 'lit/decorators.js';
|
|
9
|
-
|
|
7
|
+
import { LitElement, html } from 'lit';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
import { styles as baseStyles } from '../shared/base.styles';
|
|
10
|
+
import { styles } from './card-content.styles';
|
|
11
|
+
let UmCardContent = class UmCardContent extends LitElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.hasContent = false;
|
|
15
|
+
}
|
|
10
16
|
render() {
|
|
11
|
-
return html
|
|
17
|
+
return html `
|
|
18
|
+
<slot @slotchange="${this.handleSlotChange}"></slot>`;
|
|
12
19
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
handleSlotChange(e) {
|
|
21
|
+
const slot = e.target;
|
|
22
|
+
this.hasContent = slot.assignedElements({ flatten: true }).length > 0;
|
|
23
|
+
if (this.hasContent) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const nodes = slot.assignedNodes({ flatten: true });
|
|
27
|
+
for (const node of nodes) {
|
|
28
|
+
if (node.nodeValue?.trim()) {
|
|
29
|
+
this.hasContent = true;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
this.hasContent = false;
|
|
18
34
|
}
|
|
19
|
-
|
|
20
|
-
|
|
35
|
+
};
|
|
36
|
+
UmCardContent.styles = [baseStyles, styles];
|
|
37
|
+
__decorate([
|
|
38
|
+
property({ type: Boolean, attribute: 'has-content', reflect: true })
|
|
39
|
+
], UmCardContent.prototype, "hasContent", void 0);
|
|
40
|
+
UmCardContent = __decorate([
|
|
21
41
|
customElement('u-card-content')
|
|
22
|
-
],
|
|
23
|
-
export {
|
|
42
|
+
], UmCardContent);
|
|
43
|
+
export { UmCardContent };
|
|
24
44
|
//# sourceMappingURL=card-content.js.map
|
package/card/card-content.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-content.js","sourceRoot":"","sources":["../../src/card/card-content.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"card-content.js","sourceRoot":"","sources":["../../src/card/card-content.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAsB,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGxC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;IAAtC;;QAI+D,eAAU,GAAG,KAAK,CAAC;IA2BzF,CAAC;IAzBU,MAAM;QACb,OAAO,IAAI,CAAA;2BACY,IAAI,CAAC,gBAAgB,WAAW,CAAC;IAC1D,CAAC;IAEO,gBAAgB,CAAC,CAAQ;QAC/B,MAAM,IAAI,GAAoB,CAAC,CAAC,MAAM,CAAC;QAEvC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QAEpE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,OAAO;QACT,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;QAElD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;gBAC3B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;gBACvB,OAAO;YACT,CAAC;QACH,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC1B,CAAC;;AA5Be,oBAAM,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,AAAvB,CAAwB;AAEsB;IAAnE,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;iDAAoB;AAJ5E,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CA+BzB","sourcesContent":["import { HTMLTemplateResult, LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { styles as baseStyles } from '../shared/base.styles';\nimport { styles } from './card-content.styles';\n\n@customElement('u-card-content')\nexport class UmCardContent extends LitElement {\n\n static override styles = [baseStyles, styles];\n\n @property({type: Boolean, attribute: 'has-content', reflect: true}) hasContent = false;\n\n override render(): HTMLTemplateResult {\n return html`\n <slot @slotchange=\"${this.handleSlotChange}\"></slot>`;\n }\n\n private handleSlotChange(e: Event) {\n const slot = <HTMLSlotElement>e.target;\n\n this.hasContent = slot.assignedElements({flatten: true}).length > 0;\n\n if (this.hasContent) {\n return;\n }\n\n const nodes = slot.assignedNodes({flatten: true});\n\n for (const node of nodes) {\n if (node.nodeValue?.trim()) {\n this.hasContent = true;\n return;\n }\n }\n\n this.hasContent = false;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-card-content': UmCardContent;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-content.styles.d.ts","sourceRoot":"","sources":["../../src/card/card-content.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAYlB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const styles = css `
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:host(:has(slot > *)) {
|
|
8
|
+
display: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host([has-content]) {
|
|
12
|
+
padding: var(--u-card-padding, 16px);
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
//# sourceMappingURL=card-content.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-content.styles.js","sourceRoot":"","sources":["../../src/card/card-content.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;;;CAYzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host {\n display: block;\n }\n\n :host(:has(slot > *)) {\n display: none;\n }\n\n :host([has-content]) {\n padding: var(--u-card-padding, 16px);\n }\n`;\n"]}
|
package/card/card-media.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
export declare class
|
|
3
|
-
static styles: import("lit").CSSResult;
|
|
2
|
+
export declare class UmCardMedia extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult[];
|
|
4
4
|
wide: boolean;
|
|
5
5
|
render(): HTMLTemplateResult;
|
|
6
6
|
}
|
|
7
7
|
declare global {
|
|
8
8
|
interface HTMLElementTagNameMap {
|
|
9
|
-
'u-card-media':
|
|
9
|
+
'u-card-media': UmCardMedia;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=card-media.d.ts.map
|
package/card/card-media.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-media.d.ts","sourceRoot":"","sources":["../../src/card/card-media.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"card-media.d.ts","sourceRoot":"","sources":["../../src/card/card-media.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAM3D,qBACa,WAAY,SAAQ,UAAU;IAEzC,OAAgB,MAAM,4BAAwB;IAEJ,IAAI,UAAS;IAE9C,MAAM,IAAI,kBAAkB;CAItC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
package/card/card-media.js
CHANGED
|
@@ -4,9 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { LitElement,
|
|
7
|
+
import { LitElement, html } from 'lit';
|
|
8
8
|
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
-
|
|
9
|
+
import { styles as baseStyles } from '../shared/base.styles';
|
|
10
|
+
import { styles } from './card-media.styles';
|
|
11
|
+
let UmCardMedia = class UmCardMedia extends LitElement {
|
|
10
12
|
constructor() {
|
|
11
13
|
super(...arguments);
|
|
12
14
|
this.wide = false;
|
|
@@ -16,22 +18,12 @@ let CardMedia = class CardMedia extends LitElement {
|
|
|
16
18
|
<slot></slot>`;
|
|
17
19
|
}
|
|
18
20
|
};
|
|
19
|
-
|
|
20
|
-
:host {
|
|
21
|
-
display: block;
|
|
22
|
-
aspect-ratio: 1;
|
|
23
|
-
border-radius: var(--u-card-shape, var(--u-shape-corner-medium, 12px));
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
:host([wide]) {
|
|
27
|
-
aspect-ratio: 16/9;
|
|
28
|
-
}
|
|
29
|
-
`;
|
|
21
|
+
UmCardMedia.styles = [baseStyles, styles];
|
|
30
22
|
__decorate([
|
|
31
23
|
property({ type: Boolean, reflect: true })
|
|
32
|
-
],
|
|
33
|
-
|
|
24
|
+
], UmCardMedia.prototype, "wide", void 0);
|
|
25
|
+
UmCardMedia = __decorate([
|
|
34
26
|
customElement('u-card-media')
|
|
35
|
-
],
|
|
36
|
-
export {
|
|
27
|
+
], UmCardMedia);
|
|
28
|
+
export { UmCardMedia };
|
|
37
29
|
//# sourceMappingURL=card-media.js.map
|
package/card/card-media.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-media.js","sourceRoot":"","sources":["../../src/card/card-media.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"card-media.js","sourceRoot":"","sources":["../../src/card/card-media.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAsB,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGtC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QAIqC,SAAI,GAAG,KAAK,CAAC;IAMzD,CAAC;IAJU,MAAM;QACb,OAAO,IAAI,CAAA;oBACK,CAAC;IACnB,CAAC;;AAPe,kBAAM,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,AAAvB,CAAwB;AAEJ;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;yCAAc;AAJ5C,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAUvB","sourcesContent":["import { HTMLTemplateResult, LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { styles as baseStyles } from '../shared/base.styles';\nimport { styles } from './card-media.styles';\n\n@customElement('u-card-media')\nexport class UmCardMedia extends LitElement {\n\n static override styles = [baseStyles, styles];\n\n @property({type: Boolean, reflect: true}) wide = false;\n\n override render(): HTMLTemplateResult {\n return html`\n <slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-card-media': UmCardMedia;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-media.styles.d.ts","sourceRoot":"","sources":["../../src/card/card-media.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAUlB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const styles = css `
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
aspect-ratio: 1;
|
|
6
|
+
border-radius: var(--u-card-shape-corner, var(--u-shape-corner-medium, 12px));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:host([wide]) {
|
|
10
|
+
aspect-ratio: 16/9;
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
//# sourceMappingURL=card-media.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-media.styles.js","sourceRoot":"","sources":["../../src/card/card-media.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;CAUzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host {\n display: block;\n aspect-ratio: 1;\n border-radius: var(--u-card-shape-corner, var(--u-shape-corner-medium, 12px));\n }\n\n :host([wide]) {\n aspect-ratio: 16/9;\n }\n`;\n"]}
|
package/card/card.d.ts
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
import './card-content';
|
|
3
|
-
import './card-media';
|
|
4
|
-
import '../elevation/elevation';
|
|
5
|
-
export declare class
|
|
6
|
-
static styles: import("lit").CSSResult;
|
|
2
|
+
import './card-content.js';
|
|
3
|
+
import './card-media.js';
|
|
4
|
+
import '../elevation/elevation.js';
|
|
5
|
+
export declare class UmCard extends LitElement {
|
|
6
|
+
static styles: import("lit").CSSResult[];
|
|
7
|
+
/**
|
|
8
|
+
* The Card variant to render.
|
|
9
|
+
*/
|
|
7
10
|
variant: 'filled' | 'elevated' | 'outlined';
|
|
8
11
|
render(): HTMLTemplateResult;
|
|
9
12
|
}
|
|
10
13
|
declare global {
|
|
11
14
|
interface HTMLElementTagNameMap {
|
|
12
|
-
'u-card':
|
|
15
|
+
'u-card': UmCard;
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
18
|
//# sourceMappingURL=card.d.ts.map
|
package/card/card.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/card/card.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/card/card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,kBAAkB,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAK3D,OAAO,mBAAmB,CAAC;AAC3B,OAAO,iBAAiB,CAAC;AACzB,OAAO,2BAA2B,CAAC;AAEnC,qBACa,MAAO,SAAQ,UAAU;IAEpC,OAAgB,MAAM,4BAAwB;IAE9C;;OAEG;IACwB,OAAO,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAc;IAE3E,MAAM,IAAI,kBAAkB;CAStC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,QAAQ,EAAE,MAAM,CAAC;KAClB;CACF"}
|
package/card/card.js
CHANGED
|
@@ -4,49 +4,37 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
7
|
+
import { html, LitElement } from 'lit';
|
|
8
8
|
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
-
import '
|
|
10
|
-
import './card
|
|
11
|
-
import '
|
|
12
|
-
|
|
9
|
+
import { styles as baseStyles } from '../shared/base.styles';
|
|
10
|
+
import { styles } from './card.styles';
|
|
11
|
+
import './card-content.js';
|
|
12
|
+
import './card-media.js';
|
|
13
|
+
import '../elevation/elevation.js';
|
|
14
|
+
let UmCard = class UmCard extends LitElement {
|
|
13
15
|
constructor() {
|
|
14
16
|
super(...arguments);
|
|
17
|
+
/**
|
|
18
|
+
* The Card variant to render.
|
|
19
|
+
*/
|
|
15
20
|
this.variant = 'elevated';
|
|
16
21
|
}
|
|
17
22
|
render() {
|
|
18
|
-
return html
|
|
23
|
+
return html `
|
|
24
|
+
<u-elevation></u-elevation>
|
|
25
|
+
<slot name="before-content"></slot>
|
|
26
|
+
<u-card-content>
|
|
27
|
+
<slot></slot>
|
|
28
|
+
</u-card-content>
|
|
29
|
+
<slot name="after-content"></slot>`;
|
|
19
30
|
}
|
|
20
31
|
};
|
|
21
|
-
|
|
22
|
-
:host {
|
|
23
|
-
display: block;
|
|
24
|
-
position: relative;
|
|
25
|
-
border-radius: var(--u-card-shape, var(--u-shape-corner-medium, 12px));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:host(:not(:first-child)) {
|
|
29
|
-
margin-top: 8px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
:host([variant=elevated]) {
|
|
33
|
-
background-color: var(--u-surface-container-low-color);
|
|
34
|
-
--u-elevation-level: var(--u-elevated-card-elevation-level, 1);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
:host([variant=filled]) {
|
|
38
|
-
background-color: var(--u-surface-container-highest-color);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
:host([variant=outlined]) {
|
|
42
|
-
border: var(--u-outlined-card-outline-width, 1px) solid var(--u-outlined-card-outline-color, var(--u-outline-variant-color, #cac4d0));
|
|
43
|
-
}
|
|
44
|
-
`;
|
|
32
|
+
UmCard.styles = [baseStyles, styles];
|
|
45
33
|
__decorate([
|
|
46
34
|
property({ reflect: true })
|
|
47
|
-
],
|
|
48
|
-
|
|
35
|
+
], UmCard.prototype, "variant", void 0);
|
|
36
|
+
UmCard = __decorate([
|
|
49
37
|
customElement('u-card')
|
|
50
|
-
],
|
|
51
|
-
export {
|
|
38
|
+
], UmCard);
|
|
39
|
+
export { UmCard };
|
|
52
40
|
//# sourceMappingURL=card.js.map
|
package/card/card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/card/card.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/card/card.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAsB,UAAU,EAAE,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,iBAAiB,CAAC;AACzB,OAAO,2BAA2B,CAAC;AAG5B,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,UAAU;IAA/B;;QAIL;;WAEG;QACwB,YAAO,GAAuC,UAAU,CAAC;IAWtF,CAAC;IATU,MAAM;QACb,OAAO,IAAI,CAAA;;;;;;yCAM0B,CAAC;IACxC,CAAC;;AAfe,aAAM,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,AAAvB,CAAwB;AAKnB;IAA1B,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;uCAA0D;AAPzE,MAAM;IADlB,aAAa,CAAC,QAAQ,CAAC;GACX,MAAM,CAkBlB","sourcesContent":["import { html, HTMLTemplateResult, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { styles as baseStyles } from '../shared/base.styles';\nimport { styles } from './card.styles';\nimport './card-content.js';\nimport './card-media.js';\nimport '../elevation/elevation.js';\n\n@customElement('u-card')\nexport class UmCard extends LitElement {\n\n static override styles = [baseStyles, styles];\n\n /**\n * The Card variant to render.\n */\n @property({reflect: true}) variant: 'filled' | 'elevated' | 'outlined' = 'elevated';\n\n override render(): HTMLTemplateResult {\n return html`\n <u-elevation></u-elevation>\n <slot name=\"before-content\"></slot>\n <u-card-content>\n <slot></slot>\n </u-card-content>\n <slot name=\"after-content\"></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-card': UmCard;\n }\n}\n"]}
|