@material/web 1.0.0-pre.3 → 1.0.0-pre.4
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/LICENSE +1 -1
- package/README.md +41 -41
- package/controller/form-controller.d.ts +1 -1
- package/controller/form-controller.js +21 -29
- package/controller/form-controller.js.map +1 -1
- package/field/lib/_content.scss +91 -13
- package/field/lib/_filled-field.scss +19 -57
- package/field/lib/_label.scss +1 -2
- package/field/lib/_md-comp-filled-field.scss +123 -64
- package/field/lib/_md-comp-outlined-field.scss +100 -59
- package/field/lib/_outlined-field.scss +13 -11
- package/field/lib/_shared.scss +21 -17
- package/field/lib/field.d.ts +2 -1
- package/field/lib/field.js +73 -62
- package/field/lib/field.js.map +1 -1
- package/field/lib/filled-field.d.ts +0 -5
- package/field/lib/filled-field.js +2 -41
- package/field/lib/filled-field.js.map +1 -1
- package/field/lib/filled-styles.css.js +1 -1
- package/field/lib/filled-styles.css.js.map +1 -1
- package/field/lib/outlined-field.js +1 -1
- package/field/lib/outlined-field.js.map +1 -1
- package/field/lib/outlined-styles.css.js +1 -1
- package/field/lib/outlined-styles.css.js.map +1 -1
- package/field/lib/shared-styles.css.js +1 -1
- package/field/lib/shared-styles.css.js.map +1 -1
- package/icon/lib/_icon.scss +1 -1
- package/icon/lib/_md-comp-icon.scss +1 -2
- package/icon/lib/icon-styles.css.js +1 -1
- package/icon/lib/icon-styles.css.js.map +1 -1
- package/list/lib/_list.scss +19 -9
- package/list/lib/list-styles.css.js +1 -1
- package/list/lib/list-styles.css.js.map +1 -1
- package/list/lib/listitem/_list-item.scss +293 -102
- package/list/lib/listitem/list-item-styles.css.js +1 -1
- package/list/lib/listitem/list-item-styles.css.js.map +1 -1
- package/list/lib/listitem/list-item.d.ts +7 -6
- package/list/lib/listitem/list-item.js +22 -26
- package/list/lib/listitem/list-item.js.map +1 -1
- package/list/list-item-link.d.ts +18 -0
- package/list/list-item-link.js +19 -2
- package/list/list-item-link.js.map +1 -1
- package/list/list-item.d.ts +19 -0
- package/list/list-item.js +20 -2
- package/list/list-item.js.map +1 -1
- package/menu/lib/_menu.scss +26 -5
- package/menu/lib/menu-styles.css.js +1 -1
- package/menu/lib/menu-styles.css.js.map +1 -1
- package/menu/lib/menu.js +8 -7
- package/menu/lib/menu.js.map +1 -1
- package/menu/lib/menuitem/_menu-item.scss +39 -79
- package/menu/lib/menuitem/menu-item-styles.css.js +1 -1
- package/menu/lib/menuitem/menu-item-styles.css.js.map +1 -1
- package/menu/lib/submenuitem/sub-menu-item.d.ts +0 -1
- package/menu/lib/submenuitem/sub-menu-item.js +0 -1
- package/menu/lib/submenuitem/sub-menu-item.js.map +1 -1
- package/menu/menu-item-link.js +1 -2
- package/menu/menu-item-link.js.map +1 -1
- package/menu/menu-item.js +2 -3
- package/menu/menu-item.js.map +1 -1
- package/menu/sub-menu-item.js +1 -2
- package/menu/sub-menu-item.js.map +1 -1
- package/menusurface/lib/_md-comp-menu-surface.scss +1 -1
- package/package.json +1 -1
- package/textfield/lib/_filled-text-field.scss +98 -96
- package/textfield/lib/_icon.scss +11 -55
- package/textfield/lib/_input.scss +4 -6
- package/textfield/lib/_outlined-text-field.scss +87 -88
- package/textfield/lib/filled-styles.css.js +1 -1
- package/textfield/lib/filled-styles.css.js.map +1 -1
- package/textfield/lib/outlined-styles.css.js +1 -1
- package/textfield/lib/outlined-styles.css.js.map +1 -1
- package/textfield/lib/shared-styles.css.js +1 -1
- package/textfield/lib/shared-styles.css.js.map +1 -1
- package/tokens/_index.scss +1 -1
- package/tokens/v0_161/_index.scss +107 -0
- package/tokens/v0_161/_md-comp-assist-chip.scss +109 -0
- package/tokens/v0_161/_md-comp-badge.scss +58 -0
- package/tokens/v0_161/_md-comp-banner.scss +75 -0
- package/tokens/v0_161/_md-comp-bottom-app-bar.scss +35 -0
- package/tokens/v0_161/_md-comp-carousel-item.scss +65 -0
- package/tokens/v0_161/_md-comp-checkbox.scss +126 -0
- package/tokens/v0_161/_md-comp-circular-progress-indicator.scss +39 -0
- package/tokens/v0_161/_md-comp-data-table.scss +96 -0
- package/tokens/v0_161/_md-comp-date-input-modal.scss +89 -0
- package/tokens/v0_161/_md-comp-date-picker-docked.scss +246 -0
- package/tokens/v0_161/_md-comp-date-picker-modal.scss +305 -0
- package/tokens/v0_161/_md-comp-dialog.scss +123 -0
- package/tokens/v0_161/_md-comp-divider.scss +25 -0
- package/tokens/v0_161/_md-comp-elevated-button.scss +91 -0
- package/tokens/v0_161/_md-comp-elevated-card.scss +59 -0
- package/tokens/v0_161/_md-comp-extended-fab-branded.scss +86 -0
- package/tokens/v0_161/_md-comp-extended-fab-primary.scss +94 -0
- package/tokens/v0_161/_md-comp-extended-fab-secondary.scss +95 -0
- package/tokens/v0_161/_md-comp-extended-fab-surface.scss +90 -0
- package/tokens/v0_161/_md-comp-extended-fab-tertiary.scss +95 -0
- package/tokens/v0_161/_md-comp-fab-branded-large.scss +60 -0
- package/tokens/v0_161/_md-comp-fab-branded.scss +60 -0
- package/tokens/v0_161/_md-comp-fab-primary-large.scss +65 -0
- package/tokens/v0_161/_md-comp-fab-primary-small.scss +65 -0
- package/tokens/v0_161/_md-comp-fab-primary.scss +65 -0
- package/tokens/v0_161/_md-comp-fab-secondary-large.scss +66 -0
- package/tokens/v0_161/_md-comp-fab-secondary-small.scss +66 -0
- package/tokens/v0_161/_md-comp-fab-secondary.scss +66 -0
- package/tokens/v0_161/_md-comp-fab-surface-large.scss +64 -0
- package/tokens/v0_161/_md-comp-fab-surface-small.scss +64 -0
- package/tokens/v0_161/_md-comp-fab-surface.scss +64 -0
- package/tokens/v0_161/_md-comp-fab-tertiary-large.scss +66 -0
- package/tokens/v0_161/_md-comp-fab-tertiary-small.scss +66 -0
- package/tokens/v0_161/_md-comp-fab-tertiary.scss +66 -0
- package/tokens/v0_161/_md-comp-filled-autocomplete.scss +267 -0
- package/tokens/v0_161/_md-comp-filled-button.scss +89 -0
- package/tokens/v0_161/_md-comp-filled-card.scss +58 -0
- package/tokens/v0_161/_md-comp-filled-icon-button.scss +79 -0
- package/tokens/v0_161/_md-comp-filled-menu-button.scss +98 -0
- package/tokens/v0_161/_md-comp-filled-select.scss +272 -0
- package/tokens/v0_161/_md-comp-filled-text-field.scss +189 -0
- package/tokens/v0_161/_md-comp-filled-tonal-button.scss +99 -0
- package/tokens/v0_161/_md-comp-filled-tonal-icon-button.scss +86 -0
- package/tokens/v0_161/_md-comp-filter-chip.scss +209 -0
- package/tokens/v0_161/_md-comp-full-screen-dialog.scss +111 -0
- package/tokens/v0_161/_md-comp-icon-button.scss +70 -0
- package/tokens/v0_161/_md-comp-input-chip.scss +184 -0
- package/tokens/v0_161/_md-comp-linear-progress-indicator.scss +41 -0
- package/tokens/v0_161/_md-comp-list.scss +248 -0
- package/tokens/v0_161/_md-comp-menu.scss +37 -0
- package/tokens/v0_161/_md-comp-navigation-bar.scss +114 -0
- package/tokens/v0_161/_md-comp-navigation-drawer.scss +162 -0
- package/tokens/v0_161/_md-comp-navigation-rail.scss +131 -0
- package/tokens/v0_161/_md-comp-outlined-autocomplete.scss +257 -0
- package/tokens/v0_161/_md-comp-outlined-button.scss +84 -0
- package/tokens/v0_161/_md-comp-outlined-card.scss +65 -0
- package/tokens/v0_161/_md-comp-outlined-icon-button.scss +79 -0
- package/tokens/v0_161/_md-comp-outlined-menu-button.scss +94 -0
- package/tokens/v0_161/_md-comp-outlined-segmented-button.scss +112 -0
- package/tokens/v0_161/_md-comp-outlined-select.scss +262 -0
- package/tokens/v0_161/_md-comp-outlined-text-field.scss +171 -0
- package/tokens/v0_161/_md-comp-plain-tooltip.scss +55 -0
- package/tokens/v0_161/_md-comp-primary-navigation-tab.scss +121 -0
- package/tokens/v0_161/_md-comp-radio-button.scss +68 -0
- package/tokens/v0_161/_md-comp-rich-tooltip.scss +121 -0
- package/tokens/v0_161/_md-comp-scrim.scss +25 -0
- package/tokens/v0_161/_md-comp-search-bar.scss +99 -0
- package/tokens/v0_161/_md-comp-search-view.scss +93 -0
- package/tokens/v0_161/_md-comp-secondary-navigation-tab.scss +84 -0
- package/tokens/v0_161/_md-comp-sheet-bottom.scss +45 -0
- package/tokens/v0_161/_md-comp-sheet-floating.scss +34 -0
- package/tokens/v0_161/_md-comp-sheet-side.scss +91 -0
- package/tokens/v0_161/_md-comp-slider.scss +114 -0
- package/tokens/v0_161/_md-comp-snackbar.scss +127 -0
- package/tokens/v0_161/_md-comp-standard-menu-button.scss +98 -0
- package/tokens/v0_161/_md-comp-suggestion-chip.scss +125 -0
- package/tokens/v0_161/_md-comp-switch.scss +136 -0
- package/tokens/v0_161/_md-comp-text-button.scss +77 -0
- package/tokens/v0_161/_md-comp-time-input.scss +218 -0
- package/tokens/v0_161/_md-comp-time-picker.scss +264 -0
- package/tokens/v0_161/_md-comp-top-app-bar-large.scss +63 -0
- package/tokens/v0_161/_md-comp-top-app-bar-medium.scss +63 -0
- package/tokens/v0_161/_md-comp-top-app-bar-small-centered.scss +66 -0
- package/tokens/v0_161/_md-comp-top-app-bar-small.scss +64 -0
- package/tokens/v0_161/_md-ref-palette.scss +107 -0
- package/tokens/v0_161/_md-ref-typeface.scss +21 -0
- package/tokens/v0_161/_md-sys-color.scss +904 -0
- package/tokens/v0_161/_md-sys-elevation.scss +21 -0
- package/tokens/v0_161/_md-sys-motion.scss +53 -0
- package/tokens/v0_161/_md-sys-shape.scss +30 -0
- package/tokens/v0_161/_md-sys-state.scss +19 -0
- package/tokens/v0_161/_md-sys-typescale.scss +284 -0
- package/tokens/v0_161/index.test.css.js +9 -0
- package/tokens/v0_161/index.test.css.js.map +1 -0
- package/tokens/v0_161/index.test.scss +584 -0
- package/tokens/v0_161/lib.test.css.js +9 -0
- package/tokens/v0_161/lib.test.css.js.map +1 -0
- package/tokens/v0_161/lib.test.scss +663 -0
- package/controller/foundation.d.ts +0 -24
- package/controller/foundation.js +0 -18
- package/controller/foundation.js.map +0 -1
- package/controller/observer-foundation.d.ts +0 -25
- package/controller/observer-foundation.js +0 -37
- package/controller/observer-foundation.js.map +0 -1
- package/controller/observer.d.ts +0 -52
- package/controller/observer.js +0 -149
- package/controller/observer.js.map +0 -1
- package/decorators/bound.d.ts +0 -40
- package/decorators/bound.js +0 -49
- package/decorators/bound.js.map +0 -1
- package/list/lib/avatar/_list-item-avatar.scss +0 -40
- package/list/lib/avatar/list-item-avatar-styles.css.js +0 -9
- package/list/lib/avatar/list-item-avatar-styles.css.js.map +0 -1
- package/list/lib/avatar/list-item-avatar-styles.scss +0 -10
- package/list/lib/avatar/list-item-avatar.d.ts +0 -21
- package/list/lib/avatar/list-item-avatar.js +0 -48
- package/list/lib/avatar/list-item-avatar.js.map +0 -1
- package/list/lib/icon/_list-item-icon.scss +0 -71
- package/list/lib/icon/list-item-icon-styles.css.js +0 -9
- package/list/lib/icon/list-item-icon-styles.css.js.map +0 -1
- package/list/lib/icon/list-item-icon-styles.scss +0 -10
- package/list/lib/icon/list-item-icon.d.ts +0 -9
- package/list/lib/icon/list-item-icon.js +0 -15
- package/list/lib/icon/list-item-icon.js.map +0 -1
- package/list/lib/image/_list-item-image.scss +0 -63
- package/list/lib/image/list-item-image-styles.css.d.ts +0 -1
- package/list/lib/image/list-item-image-styles.css.js +0 -9
- package/list/lib/image/list-item-image-styles.css.js.map +0 -1
- package/list/lib/image/list-item-image-styles.scss +0 -10
- package/list/lib/image/list-item-image.d.ts +0 -21
- package/list/lib/image/list-item-image.js +0 -48
- package/list/lib/image/list-item-image.js.map +0 -1
- package/list/lib/listitem/list-item-private-styles.css.d.ts +0 -1
- package/list/lib/listitem/list-item-private-styles.css.js +0 -9
- package/list/lib/listitem/list-item-private-styles.css.js.map +0 -1
- package/list/lib/listitem/list-item-private-styles.scss +0 -10
- package/list/lib/video/_list-item-video.scss +0 -71
- package/list/lib/video/list-item-video-styles.css.d.ts +0 -1
- package/list/lib/video/list-item-video-styles.css.js +0 -9
- package/list/lib/video/list-item-video-styles.css.js.map +0 -1
- package/list/lib/video/list-item-video-styles.scss +0 -10
- package/list/lib/video/list-item-video.d.ts +0 -53
- package/list/lib/video/list-item-video.js +0 -115
- package/list/lib/video/list-item-video.js.map +0 -1
- package/list/list-item-avatar.d.ts +0 -20
- package/list/list-item-avatar.js +0 -23
- package/list/list-item-avatar.js.map +0 -1
- package/list/list-item-icon.d.ts +0 -20
- package/list/list-item-icon.js +0 -23
- package/list/list-item-icon.js.map +0 -1
- package/list/list-item-image.d.ts +0 -20
- package/list/list-item-image.js +0 -23
- package/list/list-item-image.js.map +0 -1
- package/list/list-item-video.d.ts +0 -20
- package/list/list-item-video.js +0 -23
- package/list/list-item-video.js.map +0 -1
- package/menu/lib/menuitem/menu-item-private-styles.css.d.ts +0 -1
- package/menu/lib/menuitem/menu-item-private-styles.css.js +0 -9
- package/menu/lib/menuitem/menu-item-private-styles.css.js.map +0 -1
- package/menu/lib/menuitem/menu-item-private-styles.scss +0 -10
- /package/{list/lib/avatar/list-item-avatar-styles.css.d.ts → tokens/v0_161/index.test.css.d.ts} +0 -0
- /package/{list/lib/icon/list-item-icon-styles.css.d.ts → tokens/v0_161/lib.test.css.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"foundation.js","sourceRoot":"","sources":["foundation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,OAAO,UAAU;IACrB,YAAsB,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;QACpC,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAES,IAAI;QACZ,4EAA4E;IAC9E,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Legacy stateful foundation class for components.\n */\nexport class Foundation<Adapter extends object> {\n constructor(protected adapter: Adapter) {\n this.init();\n }\n\n protected init() {\n // Subclasses should override this method to perform initialization routines\n }\n}\n\n/**\n * The constructor for a foundation.\n */\nexport interface FoundationConstructor<Adapter extends object> {\n new(adapter: Adapter): Foundation<Adapter>;\n readonly prototype: Foundation<Adapter>;\n}\n\n/**\n * Retrieves the adapter type from the provided foundation type.\n */\nexport type AdapterOf<FoundationType> =\n FoundationType extends Foundation<infer A>? A : never;\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { Foundation } from './foundation.js';
|
|
7
|
-
import { ObserverRecord } from './observer.js';
|
|
8
|
-
/**
|
|
9
|
-
* Legacy observer foundation class for components.
|
|
10
|
-
*/
|
|
11
|
-
export declare class ObserverFoundation<Adapter extends object> extends Foundation<Adapter> {
|
|
12
|
-
/**
|
|
13
|
-
* Observe a target's properties for changes using the provided map of
|
|
14
|
-
* property names and observer functions.
|
|
15
|
-
*
|
|
16
|
-
* @template T The target type.
|
|
17
|
-
* @param target - The target to observe.
|
|
18
|
-
* @param observers - An object whose keys are target properties and values
|
|
19
|
-
* are observer functions that are called when the associated property
|
|
20
|
-
* changes.
|
|
21
|
-
* @return A cleanup function that can be called to unobserve the
|
|
22
|
-
* target.
|
|
23
|
-
*/
|
|
24
|
-
protected observe<T extends object>(target: T, observers: ObserverRecord<T, this>): () => void;
|
|
25
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { Foundation } from './foundation.js';
|
|
7
|
-
import { observeProperty } from './observer.js';
|
|
8
|
-
/**
|
|
9
|
-
* Legacy observer foundation class for components.
|
|
10
|
-
*/
|
|
11
|
-
export class ObserverFoundation extends Foundation {
|
|
12
|
-
/**
|
|
13
|
-
* Observe a target's properties for changes using the provided map of
|
|
14
|
-
* property names and observer functions.
|
|
15
|
-
*
|
|
16
|
-
* @template T The target type.
|
|
17
|
-
* @param target - The target to observe.
|
|
18
|
-
* @param observers - An object whose keys are target properties and values
|
|
19
|
-
* are observer functions that are called when the associated property
|
|
20
|
-
* changes.
|
|
21
|
-
* @return A cleanup function that can be called to unobserve the
|
|
22
|
-
* target.
|
|
23
|
-
*/
|
|
24
|
-
observe(target, observers) {
|
|
25
|
-
const cleanup = [];
|
|
26
|
-
for (const property of Object.keys(observers)) {
|
|
27
|
-
const observer = observers[property].bind(this);
|
|
28
|
-
cleanup.push(observeProperty(target, property, observer));
|
|
29
|
-
}
|
|
30
|
-
return () => {
|
|
31
|
-
for (const cleanupFn of cleanup) {
|
|
32
|
-
cleanupFn();
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=observer-foundation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"observer-foundation.js","sourceRoot":"","sources":["observer-foundation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,eAAe,EAAiB,MAAM,eAAe,CAAC;AAE9D;;GAEG;AACH,MAAM,OAAO,kBAA2C,SACpD,UAAmB;IACrB;;;;;;;;;;;OAWG;IACO,OAAO,CACb,MAAS,EAAE,SAAkC;QAC/C,MAAM,OAAO,GAAe,EAAE,CAAC;QAC/B,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAmB,EAAE;YAC/D,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjD,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;SAC3D;QAED,OAAO,GAAG,EAAE;YACV,KAAK,MAAM,SAAS,IAAI,OAAO,EAAE;gBAC/B,SAAS,EAAE,CAAC;aACb;QACH,CAAC,CAAC;IACJ,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Foundation} from './foundation.js';\nimport {observeProperty, ObserverRecord} from './observer.js';\n\n/**\n * Legacy observer foundation class for components.\n */\nexport class ObserverFoundation<Adapter extends object> extends\n Foundation<Adapter> {\n /**\n * Observe a target's properties for changes using the provided map of\n * property names and observer functions.\n *\n * @template T The target type.\n * @param target - The target to observe.\n * @param observers - An object whose keys are target properties and values\n * are observer functions that are called when the associated property\n * changes.\n * @return A cleanup function that can be called to unobserve the\n * target.\n */\n protected observe<T extends object>(\n target: T, observers: ObserverRecord<T, this>) {\n const cleanup: Function[] = [];\n for (const property of Object.keys(observers) as Array<keyof T>) {\n const observer = observers[property]!.bind(this);\n cleanup.push(observeProperty(target, property, observer));\n }\n\n return () => {\n for (const cleanupFn of cleanup) {\n cleanupFn();\n }\n };\n }\n}\n"]}
|
package/controller/observer.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* A function used to observe property changes on a target.
|
|
8
|
-
*
|
|
9
|
-
* @template T The observed target type.
|
|
10
|
-
* @template K The observed property.
|
|
11
|
-
* @template This The `this` context of the observer function.
|
|
12
|
-
* @param current - The current value of the property.
|
|
13
|
-
* @param previous - The previous value of the property.
|
|
14
|
-
*/
|
|
15
|
-
export type Observer<T extends object, K extends keyof T = keyof T, This = unknown> = (this: This, current: T[K], previous: T[K]) => void;
|
|
16
|
-
/**
|
|
17
|
-
* An object map whose keys are properties of a target to observe and values
|
|
18
|
-
* are `Observer` functions for each property.
|
|
19
|
-
*
|
|
20
|
-
* @template T The observed target type.
|
|
21
|
-
* @template This The `this` context of observer functions.
|
|
22
|
-
*/
|
|
23
|
-
export type ObserverRecord<T extends object, This = unknown> = {
|
|
24
|
-
[K in keyof T]?: Observer<T, K, This>;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Observe a target's property for changes. When a property changes, the
|
|
28
|
-
* provided `Observer` function will be invoked with the properties current and
|
|
29
|
-
* previous values.
|
|
30
|
-
*
|
|
31
|
-
* The returned cleanup function will stop listening to changes for the
|
|
32
|
-
* provided `Observer`.
|
|
33
|
-
*
|
|
34
|
-
* @template T The observed target type.
|
|
35
|
-
* @template K The observed property.
|
|
36
|
-
* @param target - The target to observe.
|
|
37
|
-
* @param property - The property of the target to observe.
|
|
38
|
-
* @param observer - An observer function to invoke each time the property
|
|
39
|
-
* changes.
|
|
40
|
-
* @return A cleanup function that will stop observing changes for the provided
|
|
41
|
-
* `Observer`.
|
|
42
|
-
*/
|
|
43
|
-
export declare function observeProperty<T extends object, K extends keyof T>(target: T, property: K, observer: Observer<T, K>): () => void;
|
|
44
|
-
/**
|
|
45
|
-
* Enables or disables all observers for a provided target. Changes to observed
|
|
46
|
-
* properties will not call any observers when disabled.
|
|
47
|
-
*
|
|
48
|
-
* @template T The observed target type.
|
|
49
|
-
* @param target - The target to enable or disable observers for.
|
|
50
|
-
* @param enabled - True to enable or false to disable observers.
|
|
51
|
-
*/
|
|
52
|
-
export declare function setObserversEnabled<T extends object>(target: T, enabled: boolean): void;
|
package/controller/observer.js
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
const isTargetObservers = Symbol();
|
|
7
|
-
const isEnabled = Symbol();
|
|
8
|
-
const getObservers = Symbol();
|
|
9
|
-
/**
|
|
10
|
-
* Observe a target's property for changes. When a property changes, the
|
|
11
|
-
* provided `Observer` function will be invoked with the properties current and
|
|
12
|
-
* previous values.
|
|
13
|
-
*
|
|
14
|
-
* The returned cleanup function will stop listening to changes for the
|
|
15
|
-
* provided `Observer`.
|
|
16
|
-
*
|
|
17
|
-
* @template T The observed target type.
|
|
18
|
-
* @template K The observed property.
|
|
19
|
-
* @param target - The target to observe.
|
|
20
|
-
* @param property - The property of the target to observe.
|
|
21
|
-
* @param observer - An observer function to invoke each time the property
|
|
22
|
-
* changes.
|
|
23
|
-
* @return A cleanup function that will stop observing changes for the provided
|
|
24
|
-
* `Observer`.
|
|
25
|
-
*/
|
|
26
|
-
export function observeProperty(target, property, observer) {
|
|
27
|
-
const observerPrototype = installObserver(target);
|
|
28
|
-
const observers = observerPrototype[getObservers](property);
|
|
29
|
-
observers.push(observer);
|
|
30
|
-
return () => {
|
|
31
|
-
observers.splice(observers.indexOf(observer), 1);
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Installs a `TargetObservers` for the provided target (if not already
|
|
36
|
-
* installed).
|
|
37
|
-
*
|
|
38
|
-
* A target's `TargetObservers` is installed as a Proxy on the target's
|
|
39
|
-
* prototype.
|
|
40
|
-
*
|
|
41
|
-
* @template T The observed target type.
|
|
42
|
-
* @param obj - The target to observe.
|
|
43
|
-
* @return The installed `TargetObservers` for the provided target.
|
|
44
|
-
*/
|
|
45
|
-
function installObserver(obj) {
|
|
46
|
-
const prototype = Object.getPrototypeOf(obj);
|
|
47
|
-
if (prototype[isTargetObservers]) {
|
|
48
|
-
return prototype;
|
|
49
|
-
}
|
|
50
|
-
// Proxy prototypes will not trap plain properties (not a getter/setter) that
|
|
51
|
-
// are already defined. They only work on new plain properties.
|
|
52
|
-
// We can work around this by deleting the properties, installing the Proxy,
|
|
53
|
-
// then re-setting the properties.
|
|
54
|
-
const existingKeyValues = new Map();
|
|
55
|
-
const keys = Object.getOwnPropertyNames(obj);
|
|
56
|
-
for (const key of keys) {
|
|
57
|
-
const descriptor = getDescriptor(obj, key);
|
|
58
|
-
if (descriptor && descriptor.writable) {
|
|
59
|
-
existingKeyValues.set(key, descriptor.value);
|
|
60
|
-
delete obj[key];
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
const proxy = new Proxy(Object.create(prototype), {
|
|
64
|
-
get(target, key, receiver) {
|
|
65
|
-
return Reflect.get(target, key, receiver);
|
|
66
|
-
},
|
|
67
|
-
set(target, key, newValue, receiver) {
|
|
68
|
-
const isTargetObserversKey = key === isTargetObservers ||
|
|
69
|
-
key === isEnabled || key === getObservers;
|
|
70
|
-
const previous = Reflect.get(target, key, receiver);
|
|
71
|
-
// If a key has an existing setter, invoke it with the receiver to
|
|
72
|
-
// preserve the correct `this` context.
|
|
73
|
-
// Otherwise, the key is either a new or existing plain property and
|
|
74
|
-
// should be set on the target. Setting a plain property on the
|
|
75
|
-
// receiver will cause the proxy to no longer be able to observe it.
|
|
76
|
-
const descriptor = getDescriptor(target, key);
|
|
77
|
-
if (descriptor?.set) {
|
|
78
|
-
Reflect.set(target, key, newValue, receiver);
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
Reflect.set(target, key, newValue);
|
|
82
|
-
}
|
|
83
|
-
if (!isTargetObserversKey && proxy[isEnabled] &&
|
|
84
|
-
newValue !== previous) {
|
|
85
|
-
for (const observer of proxy[getObservers](key)) {
|
|
86
|
-
observer(newValue, previous);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
proxy[isTargetObservers] = true;
|
|
93
|
-
proxy[isEnabled] = true;
|
|
94
|
-
const observersMap = new Map();
|
|
95
|
-
proxy[getObservers] = (key) => {
|
|
96
|
-
const observers = observersMap.get(key) || [];
|
|
97
|
-
if (!observersMap.has(key)) {
|
|
98
|
-
observersMap.set(key, observers);
|
|
99
|
-
}
|
|
100
|
-
return observers;
|
|
101
|
-
};
|
|
102
|
-
Object.setPrototypeOf(obj, proxy);
|
|
103
|
-
// Re-set plain pre-existing properties so that the Proxy can trap them
|
|
104
|
-
for (const [key, value] of existingKeyValues.entries()) {
|
|
105
|
-
obj[key] = value;
|
|
106
|
-
}
|
|
107
|
-
return proxy;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Enables or disables all observers for a provided target. Changes to observed
|
|
111
|
-
* properties will not call any observers when disabled.
|
|
112
|
-
*
|
|
113
|
-
* @template T The observed target type.
|
|
114
|
-
* @param target - The target to enable or disable observers for.
|
|
115
|
-
* @param enabled - True to enable or false to disable observers.
|
|
116
|
-
*/
|
|
117
|
-
export function setObserversEnabled(target, enabled) {
|
|
118
|
-
const prototype = Object.getPrototypeOf(target);
|
|
119
|
-
if (prototype[isTargetObservers]) {
|
|
120
|
-
prototype[isEnabled] = enabled;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Retrieves the descriptor for a property from the provided target. This
|
|
125
|
-
* function will walk up the target's prototype chain to search for the
|
|
126
|
-
* descriptor.
|
|
127
|
-
*
|
|
128
|
-
* @template T The target type.
|
|
129
|
-
* @template K The property type.
|
|
130
|
-
* @param target - The target to retrieve a descriptor from.
|
|
131
|
-
* @param property - The name of the property to retrieve a descriptor for.
|
|
132
|
-
* @return the descriptor, or undefined if it does not exist. Keep in mind that
|
|
133
|
-
* plain properties may not have a descriptor defined.
|
|
134
|
-
*/
|
|
135
|
-
function getDescriptor(target, property) {
|
|
136
|
-
let descriptorTarget = target;
|
|
137
|
-
let descriptor;
|
|
138
|
-
while (descriptorTarget) {
|
|
139
|
-
descriptor = Object.getOwnPropertyDescriptor(descriptorTarget, property);
|
|
140
|
-
if (descriptor) {
|
|
141
|
-
break;
|
|
142
|
-
}
|
|
143
|
-
// Walk up the instance's prototype chain in case the property is declared
|
|
144
|
-
// on a superclass.
|
|
145
|
-
descriptorTarget = Object.getPrototypeOf(descriptorTarget);
|
|
146
|
-
}
|
|
147
|
-
return descriptor;
|
|
148
|
-
}
|
|
149
|
-
//# sourceMappingURL=observer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"observer.js","sourceRoot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C,gBAAgB,CAAC,CAAC;KAC5D;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * A function used to observe property changes on a target.\n *\n * @template T The observed target type.\n * @template K The observed property.\n * @template This The `this` context of the observer function.\n * @param current - The current value of the property.\n * @param previous - The previous value of the property.\n */\nexport type Observer<T extends object, K extends keyof T = keyof T,\n This = unknown> =\n (this: This, current: T[K], previous: T[K]) => void;\n\n/**\n * An object map whose keys are properties of a target to observe and values\n * are `Observer` functions for each property.\n *\n * @template T The observed target type.\n * @template This The `this` context of observer functions.\n */\nexport type ObserverRecord<T extends object, This = unknown> = {\n [K in keyof T]?: Observer<T, K, This>;\n};\n\nconst isTargetObservers = Symbol();\nconst isEnabled = Symbol();\nconst getObservers = Symbol();\n\n/**\n * A manager for observers listening to a target. A target's `prototype` is its\n * `TargetObservers` instance.\n *\n * @template T The observed target type.\n */\ninterface TargetObservers<T extends object> {\n /**\n * Indicates that the prototype is a `TargetObservers` instance.\n */\n [isTargetObservers]: true;\n\n /**\n * Indicates whether or not observers for this target are enabled. If\n * disabled, observers will not be called in response to target property\n * changes.\n */\n [isEnabled]: boolean;\n\n /**\n * Retrieves all observers for a given target property.\n *\n * @template K The target property key.\n * @param key - The property to retrieve observers for.\n * @return An array of observers for the provided target property.\n */\n [getObservers]: <K extends keyof T>(key: K) => Array<Observer<T, K>>;\n}\n\n/**\n * Observe a target's property for changes. When a property changes, the\n * provided `Observer` function will be invoked with the properties current and\n * previous values.\n *\n * The returned cleanup function will stop listening to changes for the\n * provided `Observer`.\n *\n * @template T The observed target type.\n * @template K The observed property.\n * @param target - The target to observe.\n * @param property - The property of the target to observe.\n * @param observer - An observer function to invoke each time the property\n * changes.\n * @return A cleanup function that will stop observing changes for the provided\n * `Observer`.\n */\nexport function observeProperty<T extends object, K extends keyof T>(\n target: T, property: K, observer: Observer<T, K>) {\n const observerPrototype = installObserver(target);\n const observers = observerPrototype[getObservers](property);\n observers.push(observer);\n return () => {\n observers.splice(observers.indexOf(observer), 1);\n };\n}\n\n/**\n * Installs a `TargetObservers` for the provided target (if not already\n * installed).\n *\n * A target's `TargetObservers` is installed as a Proxy on the target's\n * prototype.\n *\n * @template T The observed target type.\n * @param obj - The target to observe.\n * @return The installed `TargetObservers` for the provided target.\n */\nfunction installObserver<T extends object>(obj: T): TargetObservers<T> {\n const prototype = Object.getPrototypeOf(obj);\n if (prototype[isTargetObservers]) {\n return prototype as TargetObservers<T>;\n }\n\n // Proxy prototypes will not trap plain properties (not a getter/setter) that\n // are already defined. They only work on new plain properties.\n // We can work around this by deleting the properties, installing the Proxy,\n // then re-setting the properties.\n const existingKeyValues = new Map<keyof T, T[keyof T]>();\n const keys = Object.getOwnPropertyNames(obj) as Array<keyof T>;\n for (const key of keys) {\n const descriptor = getDescriptor(obj, key);\n if (descriptor && descriptor.writable) {\n existingKeyValues.set(key, descriptor.value as T[keyof T]);\n delete obj[key];\n }\n }\n\n const proxy =\n new Proxy<T>(Object.create(prototype), {\n get(target, key, receiver) {\n return Reflect.get(target, key, receiver);\n },\n set(target, key, newValue, receiver) {\n const isTargetObserversKey = key === isTargetObservers ||\n key === isEnabled || key === getObservers;\n const previous = Reflect.get(target, key, receiver);\n // If a key has an existing setter, invoke it with the receiver to\n // preserve the correct `this` context.\n // Otherwise, the key is either a new or existing plain property and\n // should be set on the target. Setting a plain property on the\n // receiver will cause the proxy to no longer be able to observe it.\n const descriptor = getDescriptor(target, key as keyof T);\n if (descriptor?.set) {\n Reflect.set(target, key, newValue, receiver);\n } else {\n Reflect.set(target, key, newValue);\n }\n\n if (!isTargetObserversKey && proxy[isEnabled] &&\n newValue !== previous) {\n for (const observer of proxy[getObservers](key as keyof T)) {\n observer(newValue, previous);\n }\n }\n\n return true;\n }\n }) as TargetObservers<T>;\n\n proxy[isTargetObservers] = true;\n proxy[isEnabled] = true;\n const observersMap = new Map<keyof T, Array<Observer<T>>>();\n proxy[getObservers] = (key: keyof T) => {\n const observers = observersMap.get(key) || [];\n if (!observersMap.has(key)) {\n observersMap.set(key, observers);\n }\n\n return observers;\n };\n\n Object.setPrototypeOf(obj, proxy);\n // Re-set plain pre-existing properties so that the Proxy can trap them\n for (const [key, value] of existingKeyValues.entries()) {\n obj[key] = value;\n }\n\n return proxy;\n}\n\n/**\n * Enables or disables all observers for a provided target. Changes to observed\n * properties will not call any observers when disabled.\n *\n * @template T The observed target type.\n * @param target - The target to enable or disable observers for.\n * @param enabled - True to enable or false to disable observers.\n */\nexport function setObserversEnabled<T extends object>(\n target: T, enabled: boolean) {\n const prototype = Object.getPrototypeOf(target);\n if (prototype[isTargetObservers]) {\n (prototype as TargetObservers<T>)[isEnabled] = enabled;\n }\n}\n\n/**\n * Retrieves the descriptor for a property from the provided target. This\n * function will walk up the target's prototype chain to search for the\n * descriptor.\n *\n * @template T The target type.\n * @template K The property type.\n * @param target - The target to retrieve a descriptor from.\n * @param property - The name of the property to retrieve a descriptor for.\n * @return the descriptor, or undefined if it does not exist. Keep in mind that\n * plain properties may not have a descriptor defined.\n */\nfunction getDescriptor<T extends object, K extends keyof T>(\n target: T, property: K) {\n let descriptorTarget: object|null = target;\n let descriptor: TypedPropertyDescriptor<T[K]>|undefined;\n while (descriptorTarget) {\n descriptor = Object.getOwnPropertyDescriptor(descriptorTarget, property);\n if (descriptor) {\n break;\n }\n\n // Walk up the instance's prototype chain in case the property is declared\n // on a superclass.\n descriptorTarget = Object.getPrototypeOf(descriptorTarget);\n }\n\n return descriptor;\n}\n"]}
|
package/decorators/bound.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { FunctionKeys } from '../types/keys.js';
|
|
7
|
-
/**
|
|
8
|
-
* Binds a class's method to its instance.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* class MyClass {
|
|
12
|
-
* \@bound
|
|
13
|
-
* foo() { return this; }
|
|
14
|
-
* }
|
|
15
|
-
*
|
|
16
|
-
* const instance = new MyClass();
|
|
17
|
-
* const reference = instance.foo;
|
|
18
|
-
* foo(); // MyClass
|
|
19
|
-
*
|
|
20
|
-
* @category Decorator
|
|
21
|
-
* @ExportDecoratedItems
|
|
22
|
-
*/
|
|
23
|
-
export declare function bound<V extends Function>(target: object, propertyKey: string | symbol, methodDescriptor: TypedPropertyDescriptor<V>): TypedPropertyDescriptor<V>;
|
|
24
|
-
/**
|
|
25
|
-
* Binds a class's function property to its instance.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* class MyClass {
|
|
29
|
-
* \@bound
|
|
30
|
-
* foo = function(this: MyClass) { return this; }
|
|
31
|
-
* }
|
|
32
|
-
*
|
|
33
|
-
* const instance = new MyClass();
|
|
34
|
-
* const reference = instance.foo;
|
|
35
|
-
* foo(); // MyClass
|
|
36
|
-
*
|
|
37
|
-
* @category Decorator
|
|
38
|
-
* @ExportDecoratedItems
|
|
39
|
-
*/
|
|
40
|
-
export declare function bound<T extends object>(target: T, propertyKey: FunctionKeys<T>): any;
|
package/decorators/bound.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
export function bound(target, propertyKey, methodDescriptor) {
|
|
7
|
-
const descriptor = methodDescriptor || {
|
|
8
|
-
configurable: true,
|
|
9
|
-
enumerable: true,
|
|
10
|
-
writable: true,
|
|
11
|
-
};
|
|
12
|
-
const memoizedBoundValues = new WeakMap();
|
|
13
|
-
let get;
|
|
14
|
-
let set;
|
|
15
|
-
if (descriptor.get || descriptor.writable) {
|
|
16
|
-
get = function () {
|
|
17
|
-
const self = this; // Needed for closure conformance
|
|
18
|
-
if (descriptor.get) {
|
|
19
|
-
// Separate variables needed for closure conformance
|
|
20
|
-
const getter = descriptor.get;
|
|
21
|
-
const value = getter.call(self);
|
|
22
|
-
return value.bind(self);
|
|
23
|
-
}
|
|
24
|
-
if (!memoizedBoundValues.has(self)) {
|
|
25
|
-
const bound = (descriptor.value || self[propertyKey])?.bind(self);
|
|
26
|
-
memoizedBoundValues.set(self, bound);
|
|
27
|
-
return bound;
|
|
28
|
-
}
|
|
29
|
-
return memoizedBoundValues.get(self);
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
if (descriptor.set || descriptor.writable) {
|
|
33
|
-
set = function (value) {
|
|
34
|
-
const self = this; // Needed for closure conformance
|
|
35
|
-
value = value.bind(self);
|
|
36
|
-
if (descriptor.set) {
|
|
37
|
-
descriptor.set.call(self, value);
|
|
38
|
-
}
|
|
39
|
-
memoizedBoundValues.set(self, value);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
get,
|
|
44
|
-
set,
|
|
45
|
-
configurable: descriptor.configurable,
|
|
46
|
-
enumerable: descriptor.enumerable,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=bound.js.map
|
package/decorators/bound.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bound.js","sourceRoot":"","sources":["bound.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyCH,MAAM,UACN,KAAK,CACD,MAAS,EAAE,WAAc,EAAE,gBAA6C;IAE1E,MAAM,UAAU,GAA+B,gBAAgB,IAAI;QACjE,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;KACf,CAAC;IAEF,MAAM,mBAAmB,GAAG,IAAI,OAAO,EAAa,CAAC;IACrD,IAAI,GAAgD,CAAC;IACrD,IAAI,GAAgD,CAAC;IAErD,IAAI,UAAU,CAAC,GAAG,IAAI,UAAU,CAAC,QAAQ,E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* SPDX-License-Identifier: Apache-2.0\n */\n\nimport {FunctionKeys} from '../types/keys.js';\n\n/**\n * Binds a class's method to its instance.\n *\n * @example\n * class MyClass {\n * \\@bound\n * foo() { return this; }\n * }\n *\n * const instance = new MyClass();\n * const reference = instance.foo;\n * foo(); // MyClass\n *\n * @category Decorator\n * @ExportDecoratedItems\n */\nexport function bound<V extends Function>(\n target: object, propertyKey: string|symbol,\n methodDescriptor: TypedPropertyDescriptor<V>): TypedPropertyDescriptor<V>;\n/**\n * Binds a class's function property to its instance.\n *\n * @example\n * class MyClass {\n * \\@bound\n * foo = function(this: MyClass) { return this; }\n * }\n *\n * const instance = new MyClass();\n * const reference = instance.foo;\n * foo(); // MyClass\n *\n * @category Decorator\n * @ExportDecoratedItems\n */\nexport function bound<T extends object>(\n target: T, propertyKey: FunctionKeys<T>): any;\nexport function\nbound<T extends object, K extends FunctionKeys<T>, V extends T[K]&Function>(\n target: T, propertyKey: K, methodDescriptor?: TypedPropertyDescriptor<V>):\n TypedPropertyDescriptor<V> {\n const descriptor: TypedPropertyDescriptor<V> = methodDescriptor || {\n configurable: true,\n enumerable: true,\n writable: true,\n };\n\n const memoizedBoundValues = new WeakMap<object, V>();\n let get: TypedPropertyDescriptor<V>['get']|undefined;\n let set: TypedPropertyDescriptor<V>['set']|undefined;\n\n if (descriptor.get || descriptor.writable) {\n get = function(this: T): V {\n const self = this as T; // Needed for closure conformance\n if (descriptor.get) {\n // Separate variables needed for closure conformance\n const getter = descriptor.get;\n const value = getter.call(self);\n return value.bind(self);\n }\n\n if (!memoizedBoundValues.has(self)) {\n const bound =\n (descriptor.value || self[propertyKey] as V)?.bind(self) as V;\n memoizedBoundValues.set(self, bound);\n return bound;\n }\n\n return memoizedBoundValues.get(self)!;\n };\n }\n\n if (descriptor.set || descriptor.writable) {\n set = function(this: T, value: V) {\n const self = this as T; // Needed for closure conformance\n value = value.bind(self);\n if (descriptor.set) {\n descriptor.set.call(self, value);\n }\n\n memoizedBoundValues.set(self, value);\n };\n }\n\n return {\n get,\n set,\n configurable: descriptor.configurable,\n enumerable: descriptor.enumerable,\n };\n}\n"]}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 Google LLC
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
// stylelint-disable selector-class-pattern --
|
|
7
|
-
// Selector '.md3-*' should only be used in this project.
|
|
8
|
-
|
|
9
|
-
// go/keep-sorted start
|
|
10
|
-
@use '../../../sass/map-ext';
|
|
11
|
-
@use '../../../sass/theme';
|
|
12
|
-
@use '../../../tokens';
|
|
13
|
-
// go/keep-sorted end
|
|
14
|
-
|
|
15
|
-
@mixin styles() {
|
|
16
|
-
$tokens: map-ext.pick(
|
|
17
|
-
tokens.md-comp-list-values(),
|
|
18
|
-
(
|
|
19
|
-
list-item-leading-avatar-color,
|
|
20
|
-
list-item-leading-avatar-shape,
|
|
21
|
-
list-item-leading-avatar-size
|
|
22
|
-
)
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
$tokens: theme.create-theme-vars($tokens, list);
|
|
26
|
-
|
|
27
|
-
:host {
|
|
28
|
-
@each $token, $value in $tokens {
|
|
29
|
-
--_#{$token}: #{$value};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.md3-list-item__avatar {
|
|
34
|
-
border-radius: var(--_list-item-leading-avatar-shape);
|
|
35
|
-
display: inline-flex;
|
|
36
|
-
height: var(--_list-item-leading-avatar-size);
|
|
37
|
-
margin-inline-start: 16px;
|
|
38
|
-
width: var(--_list-item-leading-avatar-size);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { css } from 'lit';
|
|
7
|
-
export const styles = css `:host{--_list-item-leading-avatar-color: var(--md-list-list-item-leading-avatar-color, var(--md-sys-color-primary-container, #eaddff));--_list-item-leading-avatar-shape: var(--md-list-list-item-leading-avatar-shape, 9999px);--_list-item-leading-avatar-size: var(--md-list-list-item-leading-avatar-size, 40px)}.md3-list-item__avatar{border-radius:var(--_list-item-leading-avatar-shape);display:inline-flex;height:var(--_list-item-leading-avatar-size);margin-inline-start:16px;width:var(--_list-item-leading-avatar-size)}/*# sourceMappingURL=list-item-avatar-styles.css.map */
|
|
8
|
-
`;
|
|
9
|
-
//# sourceMappingURL=list-item-avatar-styles.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-item-avatar-styles.css.js","sourceRoot":"","sources":["list-item-avatar-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`:host{--_list-item-leading-avatar-color: var(--md-list-list-item-leading-avatar-color, var(--md-sys-color-primary-container, #eaddff));--_list-item-leading-avatar-shape: var(--md-list-list-item-leading-avatar-shape, 9999px);--_list-item-leading-avatar-size: var(--md-list-list-item-leading-avatar-size, 40px)}.md3-list-item__avatar{border-radius:var(--_list-item-leading-avatar-shape);display:inline-flex;height:var(--_list-item-leading-avatar-size);margin-inline-start:16px;width:var(--_list-item-leading-avatar-size)}/*# sourceMappingURL=list-item-avatar-styles.css.map */\n`;\n "]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { LitElement, TemplateResult } from 'lit';
|
|
7
|
-
export declare class ListItemAvatar extends LitElement {
|
|
8
|
-
/**
|
|
9
|
-
* The image `src` for the avatar
|
|
10
|
-
*/
|
|
11
|
-
avatar: string;
|
|
12
|
-
/**
|
|
13
|
-
* The image `alt`.
|
|
14
|
-
*/
|
|
15
|
-
altText: string;
|
|
16
|
-
/**
|
|
17
|
-
* The image `loading` attribute.
|
|
18
|
-
*/
|
|
19
|
-
loading: 'eager' | 'lazy';
|
|
20
|
-
render(): TemplateResult;
|
|
21
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { __decorate, __metadata } from "tslib";
|
|
7
|
-
import { html, LitElement, nothing } from 'lit';
|
|
8
|
-
import { property } from 'lit/decorators.js';
|
|
9
|
-
// tslint:disable-next-line:enforce-comments-on-exported-symbols
|
|
10
|
-
export class ListItemAvatar extends LitElement {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
/**
|
|
14
|
-
* The image `src` for the avatar
|
|
15
|
-
*/
|
|
16
|
-
this.avatar = '';
|
|
17
|
-
/**
|
|
18
|
-
* The image `alt`.
|
|
19
|
-
*/
|
|
20
|
-
this.altText = '';
|
|
21
|
-
/**
|
|
22
|
-
* The image `loading` attribute.
|
|
23
|
-
*/
|
|
24
|
-
this.loading = 'eager';
|
|
25
|
-
}
|
|
26
|
-
render() {
|
|
27
|
-
return html `
|
|
28
|
-
<img
|
|
29
|
-
src="${this.avatar}"
|
|
30
|
-
alt="${this.altText || nothing}"
|
|
31
|
-
loading="${this.loading}"
|
|
32
|
-
class="md3-list-item__avatar" />
|
|
33
|
-
`;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
__decorate([
|
|
37
|
-
property(),
|
|
38
|
-
__metadata("design:type", Object)
|
|
39
|
-
], ListItemAvatar.prototype, "avatar", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
property(),
|
|
42
|
-
__metadata("design:type", Object)
|
|
43
|
-
], ListItemAvatar.prototype, "altText", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
property(),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], ListItemAvatar.prototype, "loading", void 0);
|
|
48
|
-
//# sourceMappingURL=list-item-avatar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-item-avatar.js","sourceRoot":"","sources":["list-item-avatar.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAE3C,gEAAgE;AAChE,MAAM,OAAO,cAAe,SAAQ,UAAU;IAA9C;;QACE;;WAEG;QACS,WAAM,GAAG,EAAE,CAAC;QAExB;;WAEG;QACS,YAAO,GAAG,EAAE,CAAC;QAEzB;;WAEG;QACS,YAAO,GAAmB,OAAO,CAAC;IAWhD,CAAC;IATU,MAAM;QACb,OAAO,IAAI,CAAA;;iBAEE,IAAI,CAAC,MAAM;iBACX,IAAI,CAAC,OAAO,IAAI,OAAO;qBACnB,IAAI,CAAC,OAAO;;MAE3B,CAAC;IACL,CAAC;CACF;AArBC;IAAC,QAAQ,EAAE;;8CAAa;AAKxB;IAAC,QAAQ,EAAE;;+CAAc;AAKzB;IAAC,QAAQ,EAAE;;+CAAmC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, LitElement, nothing, TemplateResult} from 'lit';\nimport {property} from 'lit/decorators.js';\n\n// tslint:disable-next-line:enforce-comments-on-exported-symbols\nexport class ListItemAvatar extends LitElement {\n /**\n * The image `src` for the avatar\n */\n @property() avatar = '';\n\n /**\n * The image `alt`.\n */\n @property() altText = '';\n\n /**\n * The image `loading` attribute.\n */\n @property() loading: 'eager'|'lazy' = 'eager';\n\n override render(): TemplateResult {\n return html`\n <img\n src=\"${this.avatar}\"\n alt=\"${this.altText || nothing}\"\n loading=\"${this.loading}\"\n class=\"md3-list-item__avatar\" />\n `;\n }\n}\n"]}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 Google LLC
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
// stylelint-disable selector-class-pattern --
|
|
7
|
-
// Selector '.md3-*' should only be used in this project.
|
|
8
|
-
|
|
9
|
-
// go/keep-sorted start
|
|
10
|
-
@use 'sass:map';
|
|
11
|
-
// go/keep-sorted end
|
|
12
|
-
// go/keep-sorted start
|
|
13
|
-
@use '../../../sass/map-ext';
|
|
14
|
-
@use '../../../sass/theme';
|
|
15
|
-
// go/keep-sorted end
|
|
16
|
-
|
|
17
|
-
$_custom-property-prefix: 'list-item-icon';
|
|
18
|
-
|
|
19
|
-
$_reference: (
|
|
20
|
-
list-item-icon-color: #000,
|
|
21
|
-
list-item-icon-size: 0,
|
|
22
|
-
list-item-icon-opacity: 1,
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
@mixin theme($tokens) {
|
|
26
|
-
$tokens: theme.validate-theme($_reference, $tokens);
|
|
27
|
-
$tokens: theme.create-theme-vars($tokens, $_custom-property-prefix);
|
|
28
|
-
|
|
29
|
-
@include theme.emit-theme-vars($tokens);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@mixin styles() {
|
|
33
|
-
$tokens: $_reference;
|
|
34
|
-
$tokens: theme.create-theme-vars($tokens, $_custom-property-prefix);
|
|
35
|
-
|
|
36
|
-
:host {
|
|
37
|
-
@each $token, $value in $tokens {
|
|
38
|
-
--_#{$token}: #{$value};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
display: inline-flex;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.md3-list-item__icon {
|
|
45
|
-
color: var(--_list-item-icon-color);
|
|
46
|
-
opacity: var(--_list-item-icon-opacity);
|
|
47
|
-
font-family: 'Material Icons';
|
|
48
|
-
font-weight: normal;
|
|
49
|
-
font-style: normal;
|
|
50
|
-
font-size: var(--_list-item-icon-size);
|
|
51
|
-
line-height: 1;
|
|
52
|
-
letter-spacing: normal;
|
|
53
|
-
text-transform: none;
|
|
54
|
-
display: inline-flex;
|
|
55
|
-
white-space: nowrap;
|
|
56
|
-
word-wrap: normal;
|
|
57
|
-
direction: ltr;
|
|
58
|
-
height: 100%;
|
|
59
|
-
width: 100%;
|
|
60
|
-
padding-inline-start: 16px;
|
|
61
|
-
|
|
62
|
-
/* Support for all WebKit browsers. */
|
|
63
|
-
-webkit-font-smoothing: antialiased;
|
|
64
|
-
/* Support for Safari and Chrome. */
|
|
65
|
-
text-rendering: optimizeLegibility;
|
|
66
|
-
/* Support for Firefox. */
|
|
67
|
-
-moz-osx-font-smoothing: grayscale;
|
|
68
|
-
/* Support for IE. */
|
|
69
|
-
font-feature-settings: 'liga';
|
|
70
|
-
}
|
|
71
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { css } from 'lit';
|
|
7
|
-
export const styles = css `:host{--_list-item-icon-color: var(--md-list-item-icon-list-item-icon-color, #000);--_list-item-icon-size: var(--md-list-item-icon-list-item-icon-size, 0);--_list-item-icon-opacity: var(--md-list-item-icon-list-item-icon-opacity, 1);display:inline-flex}.md3-list-item__icon{color:var(--_list-item-icon-color);opacity:var(--_list-item-icon-opacity);font-family:"Material Icons";font-weight:normal;font-style:normal;font-size:var(--_list-item-icon-size);line-height:1;letter-spacing:normal;text-transform:none;display:inline-flex;white-space:nowrap;word-wrap:normal;direction:ltr;height:100%;width:100%;padding-inline-start:16px;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}/*# sourceMappingURL=list-item-icon-styles.css.map */
|
|
8
|
-
`;
|
|
9
|
-
//# sourceMappingURL=list-item-icon-styles.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-item-icon-styles.css.js","sourceRoot":"","sources":["list-item-icon-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`:host{--_list-item-icon-color: var(--md-list-item-icon-list-item-icon-color, #000);--_list-item-icon-size: var(--md-list-item-icon-list-item-icon-size, 0);--_list-item-icon-opacity: var(--md-list-item-icon-list-item-icon-opacity, 1);display:inline-flex}.md3-list-item__icon{color:var(--_list-item-icon-color);opacity:var(--_list-item-icon-opacity);font-family:\"Material Icons\";font-weight:normal;font-style:normal;font-size:var(--_list-item-icon-size);line-height:1;letter-spacing:normal;text-transform:none;display:inline-flex;white-space:nowrap;word-wrap:normal;direction:ltr;height:100%;width:100%;padding-inline-start:16px;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}/*# sourceMappingURL=list-item-icon-styles.css.map */\n`;\n "]}
|