@tylertech/forge 3.5.0 → 3.6.0-dev.0
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/custom-elements.json +1171 -1128
- package/dist/checkbox/forge-checkbox.css +1 -0
- package/dist/lib.js +27 -19
- package/dist/lib.js.map +4 -4
- package/dist/list/forge-list.css +1 -0
- package/dist/radio/forge-radio.css +2 -0
- package/dist/switch/forge-switch.css +2 -0
- package/dist/vscode.css-custom-data.json +15 -0
- package/dist/vscode.html-custom-data.json +81 -106
- package/esm/app-bar/profile-button/app-bar-profile-button.js +5 -2
- package/esm/avatar/avatar-constants.d.ts +0 -7
- package/esm/avatar/avatar-constants.js +1 -10
- package/esm/avatar/avatar.d.ts +24 -21
- package/esm/avatar/avatar.js +68 -45
- package/esm/avatar/index.d.ts +1 -3
- package/esm/avatar/index.js +4 -6
- package/esm/button/base/base-button-adapter.js +1 -1
- package/esm/button-area/button-area.js +1 -1
- package/esm/checkbox/checkbox.d.ts +1 -0
- package/esm/checkbox/checkbox.js +2 -1
- package/esm/dialog/dialog-adapter.d.ts +7 -0
- package/esm/dialog/dialog-adapter.js +43 -19
- package/esm/dialog/dialog-constants.d.ts +6 -0
- package/esm/dialog/dialog-constants.js +6 -2
- package/esm/dialog/dialog-core.d.ts +8 -0
- package/esm/dialog/dialog-core.js +20 -0
- package/esm/dialog/dialog.d.ts +14 -0
- package/esm/dialog/dialog.js +13 -1
- package/esm/icon-button/icon-button-constants.d.ts +4 -0
- package/esm/icon-button/icon-button-constants.js +2 -0
- package/esm/icon-button/icon-button-core.d.ts +4 -4
- package/esm/icon-button/icon-button-core.js +16 -14
- package/esm/icon-button/icon-button.d.ts +32 -29
- package/esm/icon-button/icon-button.js +5 -30
- package/esm/index.d.ts +3 -0
- package/esm/index.js +152 -156
- package/esm/list/list-item/list-item.js +1 -1
- package/esm/profile-card/profile-card.js +5 -2
- package/esm/radio/radio/radio.d.ts +1 -0
- package/esm/radio/radio/radio.js +2 -1
- package/esm/split-view/split-view/split-view-adapter.js +1 -0
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/switch/switch.d.ts +1 -0
- package/esm/switch/switch.js +2 -1
- package/esm/table/table-utils.js +6 -6
- package/esm/tabs/tab-bar/tab-bar-adapter.d.ts +0 -5
- package/esm/tabs/tab-bar/tab-bar-adapter.js +3 -11
- package/esm/tabs/tab-bar/tab-bar-constants.d.ts +0 -3
- package/esm/tabs/tab-bar/tab-bar-constants.js +0 -4
- package/esm/tabs/tab-bar/tab-bar-core.js +7 -7
- package/esm/tabs/tab-bar/tab-bar.d.ts +6 -3
- package/esm/tabs/tab-bar/tab-bar.js +6 -3
- package/package.json +2 -2
- package/sass/button-area/_core.scss +3 -0
- package/sass/checkbox/_core.scss +2 -2
- package/sass/core/styles/tokens/checkbox/_tokens.scss +1 -0
- package/sass/core/styles/tokens/radio/_tokens.scss +1 -0
- package/sass/core/styles/tokens/switch/_tokens.scss +1 -0
- package/sass/dialog/dialog.scss +5 -0
- package/sass/list/list-item/_core.scss +3 -0
- package/sass/radio/radio/_core.scss +2 -2
- package/sass/switch/_core.scss +2 -2
- package/esm/avatar/avatar-adapter.d.ts +0 -36
- package/esm/avatar/avatar-adapter.js +0 -55
- package/esm/avatar/avatar-core.d.ts +0 -38
- package/esm/avatar/avatar-core.js +0 -101
|
@@ -7,6 +7,8 @@ import { COMPONENT_NAME_PREFIX } from '../constants';
|
|
|
7
7
|
const elementName = `${COMPONENT_NAME_PREFIX}icon-button`;
|
|
8
8
|
const observedAttributes = {
|
|
9
9
|
TOGGLE: 'toggle',
|
|
10
|
+
PRESSED: 'pressed',
|
|
11
|
+
/** @deprecated use `PRESSED` instead. */
|
|
10
12
|
ON: 'on',
|
|
11
13
|
VARIANT: 'variant',
|
|
12
14
|
THEME: 'theme',
|
|
@@ -8,7 +8,7 @@ import { IIconButtonAdapter } from './icon-button-adapter';
|
|
|
8
8
|
import { IconButtonDensity, IconButtonShape, IconButtonTheme, IconButtonVariant } from './icon-button-constants';
|
|
9
9
|
export interface IIconButtonCore extends IBaseButtonCore {
|
|
10
10
|
toggle: boolean;
|
|
11
|
-
|
|
11
|
+
pressed: boolean;
|
|
12
12
|
variant: IconButtonVariant;
|
|
13
13
|
theme: IconButtonTheme;
|
|
14
14
|
shape: IconButtonShape;
|
|
@@ -16,7 +16,7 @@ export interface IIconButtonCore extends IBaseButtonCore {
|
|
|
16
16
|
}
|
|
17
17
|
export declare class IconButtonCore extends BaseButtonCore<IIconButtonAdapter> implements IIconButtonCore {
|
|
18
18
|
private _toggle;
|
|
19
|
-
private
|
|
19
|
+
private _pressed;
|
|
20
20
|
private _variant;
|
|
21
21
|
private _theme;
|
|
22
22
|
private _shape;
|
|
@@ -27,8 +27,8 @@ export declare class IconButtonCore extends BaseButtonCore<IIconButtonAdapter> i
|
|
|
27
27
|
private _onToggle;
|
|
28
28
|
get toggle(): boolean;
|
|
29
29
|
set toggle(value: boolean);
|
|
30
|
-
get
|
|
31
|
-
set
|
|
30
|
+
get pressed(): boolean;
|
|
31
|
+
set pressed(value: boolean);
|
|
32
32
|
get variant(): IconButtonVariant;
|
|
33
33
|
set variant(value: IconButtonVariant);
|
|
34
34
|
get theme(): IconButtonTheme;
|
|
@@ -9,7 +9,7 @@ export class IconButtonCore extends BaseButtonCore {
|
|
|
9
9
|
constructor(adapter) {
|
|
10
10
|
super(adapter);
|
|
11
11
|
this._toggle = false;
|
|
12
|
-
this.
|
|
12
|
+
this._pressed = false;
|
|
13
13
|
this._variant = ICON_BUTTON_CONSTANTS.defaults.DEFAULT_VARIANT;
|
|
14
14
|
this._theme = ICON_BUTTON_CONSTANTS.defaults.DEFAULT_THEME;
|
|
15
15
|
this._shape = ICON_BUTTON_CONSTANTS.defaults.DEFAULT_SHAPE;
|
|
@@ -27,14 +27,14 @@ export class IconButtonCore extends BaseButtonCore {
|
|
|
27
27
|
}
|
|
28
28
|
_onToggle() {
|
|
29
29
|
// Update internal state first so listeners can access the new state
|
|
30
|
-
const
|
|
31
|
-
this.
|
|
32
|
-
const cancelled = !this._adapter.emitHostEvent(ICON_BUTTON_CONSTANTS.events.TOGGLE, this.
|
|
33
|
-
this.
|
|
30
|
+
const originalPressed = this._pressed;
|
|
31
|
+
this._pressed = !this._pressed;
|
|
32
|
+
const cancelled = !this._adapter.emitHostEvent(ICON_BUTTON_CONSTANTS.events.TOGGLE, this.pressed, true, true);
|
|
33
|
+
this._pressed = originalPressed;
|
|
34
34
|
if (cancelled) {
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
this.
|
|
37
|
+
this.pressed = !originalPressed;
|
|
38
38
|
}
|
|
39
39
|
get toggle() {
|
|
40
40
|
return this._toggle;
|
|
@@ -43,24 +43,26 @@ export class IconButtonCore extends BaseButtonCore {
|
|
|
43
43
|
value = !!value;
|
|
44
44
|
if (this._toggle !== value) {
|
|
45
45
|
this._toggle = value;
|
|
46
|
-
this._adapter.toggleHostAttribute(ICON_BUTTON_CONSTANTS.attributes.ARIA_PRESSED, this._toggle, `${this.
|
|
46
|
+
this._adapter.toggleHostAttribute(ICON_BUTTON_CONSTANTS.attributes.ARIA_PRESSED, this._toggle, `${this._pressed}`);
|
|
47
47
|
this._adapter.toggleHostAttribute(ICON_BUTTON_CONSTANTS.attributes.TOGGLE, this._toggle);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
get
|
|
51
|
-
return this.
|
|
50
|
+
get pressed() {
|
|
51
|
+
return this._pressed;
|
|
52
52
|
}
|
|
53
|
-
set
|
|
53
|
+
set pressed(value) {
|
|
54
54
|
value = !!value;
|
|
55
|
-
if (this.
|
|
56
|
-
this.
|
|
55
|
+
if (this._pressed !== value) {
|
|
56
|
+
this._pressed = value;
|
|
57
57
|
if (this._toggle) {
|
|
58
|
-
this._adapter.setHostAttribute(ICON_BUTTON_CONSTANTS.attributes.ARIA_PRESSED, `${this.
|
|
58
|
+
this._adapter.setHostAttribute(ICON_BUTTON_CONSTANTS.attributes.ARIA_PRESSED, `${this._pressed}`);
|
|
59
59
|
}
|
|
60
60
|
else {
|
|
61
61
|
this._adapter.removeHostAttribute(ICON_BUTTON_CONSTANTS.attributes.ARIA_PRESSED);
|
|
62
62
|
}
|
|
63
|
-
this._adapter.toggleHostAttribute(ICON_BUTTON_CONSTANTS.attributes.
|
|
63
|
+
this._adapter.toggleHostAttribute(ICON_BUTTON_CONSTANTS.attributes.PRESSED, this._pressed);
|
|
64
|
+
// Deprecated but left for legacy support
|
|
65
|
+
this._adapter.toggleHostAttribute(ICON_BUTTON_CONSTANTS.attributes.ON, this._pressed);
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
get variant() {
|
|
@@ -8,6 +8,8 @@ import { IconButtonDensity, IconButtonShape, IconButtonTheme, IconButtonVariant
|
|
|
8
8
|
import { IconButtonCore } from './icon-button-core';
|
|
9
9
|
export interface IIconButtonComponent extends IBaseButton {
|
|
10
10
|
toggle: boolean;
|
|
11
|
+
pressed: boolean;
|
|
12
|
+
/** @deprecated use `pressed` instead. */
|
|
11
13
|
on: boolean;
|
|
12
14
|
variant: IconButtonVariant;
|
|
13
15
|
theme: IconButtonTheme;
|
|
@@ -25,39 +27,10 @@ declare global {
|
|
|
25
27
|
/**
|
|
26
28
|
* @tag forge-icon-button
|
|
27
29
|
*
|
|
28
|
-
* @summary Icons buttons are used to trigger an action or event.
|
|
29
|
-
*
|
|
30
|
-
* @property {boolean} [toggle=false] - Whether or not the icon button can be toggled.
|
|
31
|
-
* @property {boolean} [on=false] - Whether or not the button is on. Only applies when `toggle` is `true`.
|
|
32
|
-
* @property {IconButtonVariant} [variant="icon"] - The variant of the button. Valid values are `text`, `outlined`, `filled`, and `raised`.
|
|
33
|
-
* @property {IconButtonTheme} [theme="default"] - The theme of the button. Valid values are `default`, `primary`, `secondary`, `tertiary`, `success`, `error`, `warning`, `info`.
|
|
34
|
-
* @property {string} [shape="circular"] - The shape of the button. Valid values are `circular` and `squared`.
|
|
35
|
-
* @property {IconButtonDensity} [density="large"] - The density of the button. Valid values are `small`, `medium`, and `large`.
|
|
36
|
-
* @property {string} [type="button"] - The type of button. Defaults to `button`. Valid values are `button`, `submit`, and `reset`.
|
|
37
|
-
* @property {boolean} [disabled=false] - Whether or not the button is disabled.
|
|
38
|
-
* @property {boolean} [popoverIcon=false] - Whether or not the button shows a built-in popover icon.
|
|
39
|
-
* @property {boolean} [dense=false] - Whether or not the button is dense.
|
|
40
|
-
* @property {string} name - The name of the button.
|
|
41
|
-
* @property {string} value - The form value of the button.
|
|
42
|
-
* @property {HTMLFormElement | null} form - The form reference of the button if within a `<form>` element.
|
|
43
|
-
*
|
|
44
30
|
* @globalconfig variant
|
|
45
31
|
* @globalconfig shape
|
|
46
32
|
* @globalconfig density
|
|
47
33
|
*
|
|
48
|
-
* @attribute {boolean} [toggle=false] - Whether or not the icon button can be toggled.
|
|
49
|
-
* @attribute {boolean} [on=false] - Whether or not the button is on. Only applies when `toggle` is `true`.
|
|
50
|
-
* @attribute {IconButtonVariant} [variant="icon"] - The variant of the button. Valid values are `text`, `outlined`, `filled`, and `raised`.
|
|
51
|
-
* @attribute {IconButtonTheme} [theme="default"] - The theme of the button. Valid values are `default`, `primary`, `secondary`, `tertiary`, `success`, `error`, `warning`, `info`.
|
|
52
|
-
* @attribute {string} [shape="circular"] - The shape of the button. Valid values are `circular` and `squared`.
|
|
53
|
-
* @attribute {IconButtonDensity} [density="large"] - The density of the button. Valid values are `small`, `medium`, and `large`.
|
|
54
|
-
* @attribute {string} [type="button"] - The type of button. Defaults to `button`. Valid values are `button`, `submit`, and `reset`.
|
|
55
|
-
* @attribute {boolean} [disabled=false] - Whether or not the button is disabled.
|
|
56
|
-
* @attribute {boolean} [popover-icon=false] - Whether or not the button shows a built-in popover icon.
|
|
57
|
-
* @attribute {boolean} [dense=false] - Whether or not the button is dense.
|
|
58
|
-
* @attribute {string} name - The name of the button.
|
|
59
|
-
* @attribute {string} value - The form value of the button.
|
|
60
|
-
*
|
|
61
34
|
* @event {PointerEvent} click - Fires when the button is clicked.
|
|
62
35
|
* @event {CustomEvent<boolean>} forge-icon-button-toggle - Fires when the icon button is toggled. Only applies in `toggle` mode.
|
|
63
36
|
*
|
|
@@ -136,10 +109,40 @@ export declare class IconButtonComponent extends BaseButton<IconButtonCore> impl
|
|
|
136
109
|
protected readonly _core: IconButtonCore;
|
|
137
110
|
constructor();
|
|
138
111
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
112
|
+
/**
|
|
113
|
+
* Whether or not the icon button can be toggled.
|
|
114
|
+
* @default false
|
|
115
|
+
*/
|
|
139
116
|
toggle: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Whether or not the toggle button is pressed. Only applies when `toggle` is `true`.
|
|
119
|
+
* @default false
|
|
120
|
+
*/
|
|
121
|
+
pressed: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Alias for `pressed` _(deprecated)_. Whether or not the toggle button is pressed. Only applies when `toggle` is `true`.
|
|
124
|
+
* @default false
|
|
125
|
+
* @deprecated Use `pressed` instead.
|
|
126
|
+
*/
|
|
140
127
|
on: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* The variant of the button. Valid values are `text`, `outlined`, `filled`, and `raised`.
|
|
130
|
+
* @default "default"
|
|
131
|
+
*/
|
|
141
132
|
theme: IconButtonTheme;
|
|
133
|
+
/**
|
|
134
|
+
* The variant of the button. Valid values are `text`, `outlined`, `filled`, and `raised`.
|
|
135
|
+
* @default "icon"
|
|
136
|
+
*/
|
|
142
137
|
variant: IconButtonVariant;
|
|
138
|
+
/**
|
|
139
|
+
* The shape of the button. Valid values are `circular` and `squared`.
|
|
140
|
+
* @default "circular"
|
|
141
|
+
*/
|
|
143
142
|
shape: IconButtonShape;
|
|
143
|
+
/**
|
|
144
|
+
* The density of the button. Valid values are `small`, `medium`, and `large`.
|
|
145
|
+
* @default "large"
|
|
146
|
+
*/
|
|
144
147
|
density: IconButtonDensity;
|
|
145
148
|
}
|
|
@@ -18,39 +18,10 @@ const styles = ':host{--_icon-button-display:var(--forge-icon-button-display, in
|
|
|
18
18
|
/**
|
|
19
19
|
* @tag forge-icon-button
|
|
20
20
|
*
|
|
21
|
-
* @summary Icons buttons are used to trigger an action or event.
|
|
22
|
-
*
|
|
23
|
-
* @property {boolean} [toggle=false] - Whether or not the icon button can be toggled.
|
|
24
|
-
* @property {boolean} [on=false] - Whether or not the button is on. Only applies when `toggle` is `true`.
|
|
25
|
-
* @property {IconButtonVariant} [variant="icon"] - The variant of the button. Valid values are `text`, `outlined`, `filled`, and `raised`.
|
|
26
|
-
* @property {IconButtonTheme} [theme="default"] - The theme of the button. Valid values are `default`, `primary`, `secondary`, `tertiary`, `success`, `error`, `warning`, `info`.
|
|
27
|
-
* @property {string} [shape="circular"] - The shape of the button. Valid values are `circular` and `squared`.
|
|
28
|
-
* @property {IconButtonDensity} [density="large"] - The density of the button. Valid values are `small`, `medium`, and `large`.
|
|
29
|
-
* @property {string} [type="button"] - The type of button. Defaults to `button`. Valid values are `button`, `submit`, and `reset`.
|
|
30
|
-
* @property {boolean} [disabled=false] - Whether or not the button is disabled.
|
|
31
|
-
* @property {boolean} [popoverIcon=false] - Whether or not the button shows a built-in popover icon.
|
|
32
|
-
* @property {boolean} [dense=false] - Whether or not the button is dense.
|
|
33
|
-
* @property {string} name - The name of the button.
|
|
34
|
-
* @property {string} value - The form value of the button.
|
|
35
|
-
* @property {HTMLFormElement | null} form - The form reference of the button if within a `<form>` element.
|
|
36
|
-
*
|
|
37
21
|
* @globalconfig variant
|
|
38
22
|
* @globalconfig shape
|
|
39
23
|
* @globalconfig density
|
|
40
24
|
*
|
|
41
|
-
* @attribute {boolean} [toggle=false] - Whether or not the icon button can be toggled.
|
|
42
|
-
* @attribute {boolean} [on=false] - Whether or not the button is on. Only applies when `toggle` is `true`.
|
|
43
|
-
* @attribute {IconButtonVariant} [variant="icon"] - The variant of the button. Valid values are `text`, `outlined`, `filled`, and `raised`.
|
|
44
|
-
* @attribute {IconButtonTheme} [theme="default"] - The theme of the button. Valid values are `default`, `primary`, `secondary`, `tertiary`, `success`, `error`, `warning`, `info`.
|
|
45
|
-
* @attribute {string} [shape="circular"] - The shape of the button. Valid values are `circular` and `squared`.
|
|
46
|
-
* @attribute {IconButtonDensity} [density="large"] - The density of the button. Valid values are `small`, `medium`, and `large`.
|
|
47
|
-
* @attribute {string} [type="button"] - The type of button. Defaults to `button`. Valid values are `button`, `submit`, and `reset`.
|
|
48
|
-
* @attribute {boolean} [disabled=false] - Whether or not the button is disabled.
|
|
49
|
-
* @attribute {boolean} [popover-icon=false] - Whether or not the button shows a built-in popover icon.
|
|
50
|
-
* @attribute {boolean} [dense=false] - Whether or not the button is dense.
|
|
51
|
-
* @attribute {string} name - The name of the button.
|
|
52
|
-
* @attribute {string} value - The form value of the button.
|
|
53
|
-
*
|
|
54
25
|
* @event {PointerEvent} click - Fires when the button is clicked.
|
|
55
26
|
* @event {CustomEvent<boolean>} forge-icon-button-toggle - Fires when the icon button is toggled. Only applies in `toggle` mode.
|
|
56
27
|
*
|
|
@@ -138,8 +109,9 @@ let IconButtonComponent = class IconButtonComponent extends BaseButton {
|
|
|
138
109
|
case ICON_BUTTON_CONSTANTS.attributes.TOGGLE:
|
|
139
110
|
this.toggle = coerceBoolean(newValue);
|
|
140
111
|
break;
|
|
112
|
+
case ICON_BUTTON_CONSTANTS.attributes.PRESSED:
|
|
141
113
|
case ICON_BUTTON_CONSTANTS.attributes.ON:
|
|
142
|
-
this.
|
|
114
|
+
this.pressed = coerceBoolean(newValue);
|
|
143
115
|
break;
|
|
144
116
|
case ICON_BUTTON_CONSTANTS.attributes.VARIANT:
|
|
145
117
|
this.variant = newValue;
|
|
@@ -162,6 +134,9 @@ __decorate([
|
|
|
162
134
|
], IconButtonComponent.prototype, "toggle", void 0);
|
|
163
135
|
__decorate([
|
|
164
136
|
coreProperty()
|
|
137
|
+
], IconButtonComponent.prototype, "pressed", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
coreProperty({ name: 'pressed' })
|
|
165
140
|
], IconButtonComponent.prototype, "on", void 0);
|
|
166
141
|
__decorate([
|
|
167
142
|
coreProperty()
|
package/esm/index.d.ts
CHANGED
|
@@ -79,4 +79,7 @@ export * from './deprecated/icon-button';
|
|
|
79
79
|
* Registers all components in the library with the browser.
|
|
80
80
|
*/
|
|
81
81
|
export declare function defineComponents(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Deprecated component registration
|
|
84
|
+
*/
|
|
82
85
|
export declare function defineDeprecatedComponents(): void;
|
package/esm/index.js
CHANGED
|
@@ -9,77 +9,76 @@
|
|
|
9
9
|
* Copyright (c) Tyler Technologies, Inc.
|
|
10
10
|
* License: Apache-2.0
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import { ViewComponent, ViewSwitcherComponent } from './view-switcher';
|
|
12
|
+
import { defineAccordionComponent } from './accordion';
|
|
13
|
+
import { defineAppBarComponent, defineAppBarHelpButtonComponent, defineAppBarMenuButtonComponent, defineAppBarNotificationButtonComponent, defineAppBarProfileButtonComponent, defineAppBarSearchComponent, defineProfileCardComponent } from './app-bar';
|
|
14
|
+
import { defineAutocompleteComponent } from './autocomplete';
|
|
15
|
+
import { defineAvatarComponent } from './avatar';
|
|
16
|
+
import { defineBackdropComponent } from './backdrop';
|
|
17
|
+
import { defineBadgeComponent } from './badge';
|
|
18
|
+
import { defineBannerComponent } from './banner';
|
|
19
|
+
import { defineBottomSheetComponent } from './bottom-sheet';
|
|
20
|
+
import { defineButtonComponent } from './button';
|
|
21
|
+
import { defineButtonAreaComponent } from './button-area';
|
|
22
|
+
import { defineButtonToggleComponent, defineButtonToggleGroupComponent } from './button-toggle';
|
|
23
|
+
import { defineCalendarComponent } from './calendar';
|
|
24
|
+
import { defineCardComponent } from './card';
|
|
25
|
+
import { defineCheckboxComponent } from './checkbox';
|
|
26
|
+
import { defineChipFieldComponent } from './chip-field';
|
|
27
|
+
import { defineChipComponent, defineChipSetComponent } from './chips';
|
|
28
|
+
import { defineCircularProgressComponent } from './circular-progress';
|
|
29
|
+
import { defineColorPickerComponent } from './color-picker';
|
|
30
|
+
import { defineDatePickerComponent } from './date-picker';
|
|
31
|
+
import { defineDateRangePickerComponent } from './date-range-picker';
|
|
32
|
+
import { defineDialogComponent } from './dialog';
|
|
33
|
+
import { defineDividerComponent } from './divider';
|
|
34
|
+
import { defineDrawerComponent, defineMiniDrawerComponent, defineModalDrawerComponent } from './drawer';
|
|
35
|
+
import { defineExpansionPanelComponent } from './expansion-panel';
|
|
36
|
+
import { defineFieldComponent } from './field';
|
|
37
|
+
import { defineFilePickerComponent } from './file-picker';
|
|
38
|
+
import { defineFloatingActionButtonComponent } from './floating-action-button';
|
|
39
|
+
import { defineFocusIndicatorComponent } from './focus-indicator';
|
|
40
|
+
import { defineIconComponent } from './icon';
|
|
41
|
+
import { defineIconButtonComponent } from './icon-button';
|
|
42
|
+
import { defineInlineMessageComponent } from './inline-message';
|
|
43
|
+
import { defineKeyComponent, defineKeyItemComponent } from './key';
|
|
44
|
+
import { defineKeyboardShortcutComponent } from './keyboard-shortcut';
|
|
45
|
+
import { defineLabelComponent } from './label';
|
|
46
|
+
import { defineLabelValueComponent } from './label-value';
|
|
47
|
+
import { defineLinearProgressComponent } from './linear-progress';
|
|
48
|
+
import { defineListComponent } from './list';
|
|
49
|
+
import { defineListItemComponent } from './list/list-item';
|
|
50
|
+
import { defineMenuComponent } from './menu';
|
|
51
|
+
import { defineMeterComponent, defineMeterGroupComponent } from './meter';
|
|
52
|
+
import { defineOpenIconComponent } from './open-icon';
|
|
53
|
+
import { defineOverlayComponent } from './overlay';
|
|
54
|
+
import { definePageStateComponent } from './page-state';
|
|
55
|
+
import { definePaginatorComponent } from './paginator';
|
|
56
|
+
import { definePopoverComponent } from './popover';
|
|
57
|
+
import { defineRadioComponent, defineRadioGroupComponent } from './radio';
|
|
58
|
+
import { defineScaffoldComponent } from './scaffold';
|
|
59
|
+
import { defineOptionComponent, defineOptionGroupComponent, defineSelectComponent } from './select';
|
|
60
|
+
import { defineSelectDropdownComponent } from './select/select-dropdown';
|
|
61
|
+
import { defineSkeletonComponent } from './skeleton';
|
|
62
|
+
import { defineSkipLinkComponent } from './skip-link';
|
|
63
|
+
import { defineSliderComponent } from './slider';
|
|
64
|
+
import { defineSplitViewComponent } from './split-view';
|
|
65
|
+
import { defineStackComponent } from './stack';
|
|
66
|
+
import { defineStateLayerComponent } from './state-layer';
|
|
67
|
+
import { defineStepComponent, defineStepperComponent } from './stepper';
|
|
68
|
+
import { defineSwitchComponent } from './switch';
|
|
69
|
+
import { defineTableComponent } from './table';
|
|
70
|
+
import { defineTabBarComponent, defineTabComponent } from './tabs';
|
|
71
|
+
import { defineTextFieldComponent } from './text-field';
|
|
72
|
+
import { defineTimePickerComponent } from './time-picker';
|
|
73
|
+
import { defineToastComponent } from './toast';
|
|
74
|
+
import { defineToolbarComponent } from './toolbar';
|
|
75
|
+
import { defineTooltipComponent } from './tooltip';
|
|
76
|
+
import { defineViewComponent, defineViewSwitcherComponent } from './view-switcher';
|
|
78
77
|
/**
|
|
79
78
|
* Deprecated imports
|
|
80
79
|
*/
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
80
|
+
import { defineDeprecatedButtonComponent } from './deprecated/button';
|
|
81
|
+
import { defineDeprecatedIconButtonComponent } from './deprecated/icon-button';
|
|
83
82
|
export * from './accordion';
|
|
84
83
|
export * from './app-bar';
|
|
85
84
|
export * from './autocomplete';
|
|
@@ -152,101 +151,98 @@ export * from './view-switcher';
|
|
|
152
151
|
*/
|
|
153
152
|
export * from './deprecated/button';
|
|
154
153
|
export * from './deprecated/icon-button';
|
|
155
|
-
const CUSTOM_ELEMENTS = [
|
|
156
|
-
AccordionComponent,
|
|
157
|
-
AppBarComponent,
|
|
158
|
-
AppBarHelpButtonComponent,
|
|
159
|
-
AppBarMenuButtonComponent,
|
|
160
|
-
AppBarNotificationButtonComponent,
|
|
161
|
-
AppBarProfileButtonComponent,
|
|
162
|
-
AppBarSearchComponent,
|
|
163
|
-
AutocompleteComponent,
|
|
164
|
-
AvatarComponent,
|
|
165
|
-
BackdropComponent,
|
|
166
|
-
BadgeComponent,
|
|
167
|
-
BannerComponent,
|
|
168
|
-
BottomSheetComponent,
|
|
169
|
-
ButtonAreaComponent,
|
|
170
|
-
ButtonComponent,
|
|
171
|
-
ButtonToggleComponent,
|
|
172
|
-
ButtonToggleGroupComponent,
|
|
173
|
-
CalendarComponent,
|
|
174
|
-
CardComponent,
|
|
175
|
-
CheckboxComponent,
|
|
176
|
-
ChipComponent,
|
|
177
|
-
ChipFieldComponent,
|
|
178
|
-
ChipSetComponent,
|
|
179
|
-
CircularProgressComponent,
|
|
180
|
-
ColorPickerComponent,
|
|
181
|
-
DatePickerComponent,
|
|
182
|
-
DateRangePickerComponent,
|
|
183
|
-
DialogComponent,
|
|
184
|
-
DividerComponent,
|
|
185
|
-
DrawerComponent,
|
|
186
|
-
ExpansionPanelComponent,
|
|
187
|
-
FieldComponent,
|
|
188
|
-
FilePickerComponent,
|
|
189
|
-
FloatingActionButtonComponent,
|
|
190
|
-
FocusIndicatorComponent,
|
|
191
|
-
IconButtonComponent,
|
|
192
|
-
IconComponent,
|
|
193
|
-
InlineMessageComponent,
|
|
194
|
-
KeyComponent,
|
|
195
|
-
KeyboardShortcutComponent,
|
|
196
|
-
KeyItemComponent,
|
|
197
|
-
LabelComponent,
|
|
198
|
-
LabelValueComponent,
|
|
199
|
-
LinearProgressComponent,
|
|
200
|
-
ListComponent,
|
|
201
|
-
ListItemComponent,
|
|
202
|
-
MenuComponent,
|
|
203
|
-
MeterComponent,
|
|
204
|
-
MeterGroupComponent,
|
|
205
|
-
MiniDrawerComponent,
|
|
206
|
-
ModalDrawerComponent,
|
|
207
|
-
OpenIconComponent,
|
|
208
|
-
OptionComponent,
|
|
209
|
-
OptionGroupComponent,
|
|
210
|
-
OverlayComponent,
|
|
211
|
-
PageStateComponent,
|
|
212
|
-
PaginatorComponent,
|
|
213
|
-
PopoverComponent,
|
|
214
|
-
ProfileCardComponent,
|
|
215
|
-
RadioComponent,
|
|
216
|
-
RadioGroupComponent,
|
|
217
|
-
ScaffoldComponent,
|
|
218
|
-
SelectComponent,
|
|
219
|
-
SelectDropdownComponent,
|
|
220
|
-
SkeletonComponent,
|
|
221
|
-
SkipLinkComponent,
|
|
222
|
-
SliderComponent,
|
|
223
|
-
SplitViewComponent,
|
|
224
|
-
StackComponent,
|
|
225
|
-
StateLayerComponent,
|
|
226
|
-
StepComponent,
|
|
227
|
-
StepperComponent,
|
|
228
|
-
SwitchComponent,
|
|
229
|
-
TabBarComponent,
|
|
230
|
-
TabComponent,
|
|
231
|
-
TableComponent,
|
|
232
|
-
TextFieldComponent,
|
|
233
|
-
TimePickerComponent,
|
|
234
|
-
ToastComponent,
|
|
235
|
-
ToolbarComponent,
|
|
236
|
-
TooltipComponent,
|
|
237
|
-
ViewComponent,
|
|
238
|
-
ViewSwitcherComponent
|
|
239
|
-
];
|
|
240
154
|
/**
|
|
241
155
|
* Registers all components in the library with the browser.
|
|
242
156
|
*/
|
|
243
157
|
export function defineComponents() {
|
|
244
|
-
|
|
158
|
+
defineAccordionComponent();
|
|
159
|
+
defineAppBarComponent();
|
|
160
|
+
defineAppBarHelpButtonComponent();
|
|
161
|
+
defineAppBarMenuButtonComponent();
|
|
162
|
+
defineAppBarNotificationButtonComponent();
|
|
163
|
+
defineAppBarProfileButtonComponent();
|
|
164
|
+
defineAppBarSearchComponent();
|
|
165
|
+
defineAutocompleteComponent();
|
|
166
|
+
defineAvatarComponent();
|
|
167
|
+
defineBackdropComponent();
|
|
168
|
+
defineBadgeComponent();
|
|
169
|
+
defineBannerComponent();
|
|
170
|
+
defineBottomSheetComponent();
|
|
171
|
+
defineButtonAreaComponent();
|
|
172
|
+
defineButtonComponent();
|
|
173
|
+
defineButtonToggleComponent();
|
|
174
|
+
defineButtonToggleGroupComponent();
|
|
175
|
+
defineCalendarComponent();
|
|
176
|
+
defineCardComponent();
|
|
177
|
+
defineCheckboxComponent();
|
|
178
|
+
defineChipComponent();
|
|
179
|
+
defineChipFieldComponent();
|
|
180
|
+
defineChipSetComponent();
|
|
181
|
+
defineCircularProgressComponent();
|
|
182
|
+
defineColorPickerComponent();
|
|
183
|
+
defineDatePickerComponent();
|
|
184
|
+
defineDateRangePickerComponent();
|
|
185
|
+
defineDialogComponent();
|
|
186
|
+
defineDividerComponent();
|
|
187
|
+
defineDrawerComponent();
|
|
188
|
+
defineExpansionPanelComponent();
|
|
189
|
+
defineFieldComponent();
|
|
190
|
+
defineFilePickerComponent();
|
|
191
|
+
defineFloatingActionButtonComponent();
|
|
192
|
+
defineFocusIndicatorComponent();
|
|
193
|
+
defineIconButtonComponent();
|
|
194
|
+
defineIconComponent();
|
|
195
|
+
defineInlineMessageComponent();
|
|
196
|
+
defineKeyComponent();
|
|
197
|
+
defineKeyboardShortcutComponent();
|
|
198
|
+
defineKeyItemComponent();
|
|
199
|
+
defineLabelComponent();
|
|
200
|
+
defineLabelValueComponent();
|
|
201
|
+
defineLinearProgressComponent();
|
|
202
|
+
defineListComponent();
|
|
203
|
+
defineListItemComponent();
|
|
204
|
+
defineMenuComponent();
|
|
205
|
+
defineMeterComponent();
|
|
206
|
+
defineMeterGroupComponent();
|
|
207
|
+
defineMiniDrawerComponent();
|
|
208
|
+
defineModalDrawerComponent();
|
|
209
|
+
defineOpenIconComponent();
|
|
210
|
+
defineOptionComponent();
|
|
211
|
+
defineOptionGroupComponent();
|
|
212
|
+
defineOverlayComponent();
|
|
213
|
+
definePageStateComponent();
|
|
214
|
+
definePaginatorComponent();
|
|
215
|
+
definePopoverComponent();
|
|
216
|
+
defineProfileCardComponent();
|
|
217
|
+
defineRadioComponent();
|
|
218
|
+
defineRadioGroupComponent();
|
|
219
|
+
defineScaffoldComponent();
|
|
220
|
+
defineSelectComponent();
|
|
221
|
+
defineSelectDropdownComponent();
|
|
222
|
+
defineSkeletonComponent();
|
|
223
|
+
defineSkipLinkComponent();
|
|
224
|
+
defineSliderComponent();
|
|
225
|
+
defineSplitViewComponent();
|
|
226
|
+
defineStackComponent();
|
|
227
|
+
defineStateLayerComponent();
|
|
228
|
+
defineStepComponent();
|
|
229
|
+
defineStepperComponent();
|
|
230
|
+
defineSwitchComponent();
|
|
231
|
+
defineTabBarComponent();
|
|
232
|
+
defineTabComponent();
|
|
233
|
+
defineTableComponent();
|
|
234
|
+
defineTextFieldComponent();
|
|
235
|
+
defineTimePickerComponent();
|
|
236
|
+
defineToastComponent();
|
|
237
|
+
defineToolbarComponent();
|
|
238
|
+
defineTooltipComponent();
|
|
239
|
+
defineViewComponent();
|
|
240
|
+
defineViewSwitcherComponent();
|
|
245
241
|
}
|
|
246
242
|
/**
|
|
247
243
|
* Deprecated component registration
|
|
248
244
|
*/
|
|
249
|
-
const DEPRECATED_CUSTOM_ELEMENTS = [DeprecatedButtonComponent, DeprecatedIconButtonComponent];
|
|
250
245
|
export function defineDeprecatedComponents() {
|
|
251
|
-
|
|
246
|
+
defineDeprecatedButtonComponent();
|
|
247
|
+
defineDeprecatedIconButtonComponent();
|
|
252
248
|
}
|
|
@@ -14,7 +14,7 @@ import { WithElementInternals } from '../../core/mixins/internals/with-element-i
|
|
|
14
14
|
import { WithDefaultAria } from '../../core/mixins/internals/with-default-aria';
|
|
15
15
|
import { BaseComponent } from '../../core/base/base-component';
|
|
16
16
|
const template = '<template><div class=\"forge-list-item\" part=\"root\"><slot name=\"start\"><slot name=\"leading\"></slot></slot><div class=\"text-container\" part=\"text-container\"><slot></slot><slot name=\"secondary-text\"></slot><slot name=\"tertiary-text\"></slot></div><slot name=\"end\"><slot name=\"trailing\"></slot></slot></div></template>';
|
|
17
|
-
const styles = ':host{--_list-item-indent:var(--forge-list-item-indent, var(--forge-spacing-xxlarge, 48px));--_list-item-dense-indent:var(--forge-list-item-dense-indent, var(--forge-spacing-xxlarge, 48px));--_list-item-disabled-cursor:var(--forge-list-item-disabled-cursor, not-allowed)}:host{display:block;outline:0}:host([hidden]){display:none}.forge-list-item{--_list-item-background:var(--forge-list-item-background, transparent);--_list-item-shape:var(--forge-list-item-shape, 0);--_list-item-padding:var(--forge-list-item-padding, 0 var(--forge-spacing-medium, 16px));--_list-item-margin:var(--forge-list-item-margin, 0);--_list-item-height:var(--forge-list-item-height, 48px);--_list-item-dense-height:var(--forge-list-item-dense-height, 32px);--_list-item-cursor:var(--forge-list-item-cursor, pointer);--_list-item-gap:var(--forge-list-item-gap, var(--forge-spacing-large, 24px));--_list-item-text-color:var(--forge-list-item-text-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-text-font-size:var(--forge-list-item-text-font-size, var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1))));--_list-item-text-font-weight:var(--forge-list-item-text-font-weight, var(--forge-typography-body2-font-weight, 400));--_list-item-text-line-height:var(--forge-list-item-text-line-height, 1.5rem);--_list-item-selected-color:var(--forge-list-item-selected-color, var(--forge-theme-primary, #3f51b5));--_list-item-selected-background:var(--forge-list-item-selected-background, var(--_list-item-selected-color));--_list-item-selected-opacity:var(--forge-list-item-selected-opacity, 0.08);--_list-item-selected-start-color:var(--forge-list-item-selected-start-color, var(--_list-item-selected-color));--_list-item-selected-end-color:var(--forge-list-item-selected-end-color, var(--_list-item-selected-color));--_list-item-selected-text-color:var(--forge-list-item-selected-text-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-disabled-opacity:var(--forge-list-item-disabled-opacity, 0.38);--_list-item-one-line-height:var(--forge-list-item-one-line-height, var(--_list-item-height));--_list-item-two-line-height:var(--forge-list-item-two-line-height, var(--forge-list-item-height, 72px));--_list-item-three-line-height:var(--forge-list-item-three-line-height, var(--forge-list-item-height, 88px));--_list-item-dense-one-line-height:var(--forge-list-item-dense-one-line-height, var(--_list-item-dense-height));--_list-item-dense-two-line-height:var(--forge-list-item-dense-two-line-height, var(--forge-list-item-dense-height, 56px));--_list-item-dense-three-line-height:var(--forge-list-item-dense-three-line-height, var(--forge-list-item-dense-height, 72px));--_list-item-dense-font-size:var(--forge-list-item-dense-font-size, 0.875rem);--_list-item-dense-gap:var(--forge-list-item-dense-gap, var(--forge-spacing-xsmall, 8px));--_list-item-start-selected-color:var(--forge-list-item-start-selected-color, var(--_list-item-selected-color));--_list-item-end-selected-color:var(--forge-list-item-end-selected-color, var(--_list-item-selected-color));--_list-item-wrap-padding:var(--forge-list-item-wrap-padding, var(--forge-spacing-xsmall, 8px) var(--forge-spacing-medium, 16px))}.forge-list-item{position:relative;display:flex;gap:var(--_list-item-gap);align-items:center;box-sizing:border-box;outline:0;text-decoration:none;border-radius:var(--_list-item-shape);-webkit-tap-highlight-color:transparent;background-color:var(--_list-item-background);height:var(--_list-item-height);min-height:var(--_list-item-height);padding:var(--_list-item-padding);margin:var(--_list-item-margin)}.forge-list-item.interactive{cursor:var(--_list-item-cursor)}.forge-list-item.disabled{cursor:var(--_list-item-disabled-cursor);opacity:var(--_list-item-disabled-opacity)}.forge-list-item.disabled ::slotted(button){cursor:var(--_list-item-disabled-cursor)}.anchor{position:absolute;inset:0}:host([two-line]) .forge-list-item{height:var(--_list-item-two-line-height);min-height:var(--_list-item-two-line-height)}:host([three-line]) .forge-list-item{height:var(--_list-item-three-line-height);min-height:var(--_list-item-three-line-height)}:host([dense]) .forge-list-item{--_list-item-gap:var(--_list-item-dense-gap);height:var(--_list-item-dense-one-line-height);min-height:var(--_list-item-dense-one-line-height)}:host([dense]) .text-container{font-size:var(--_list-item-dense-font-size)}:host([dense][indented]){margin-inline-start:var(--_list-item-dense-indent)}:host([dense][two-line]) .forge-list-item{height:var(--_list-item-dense-two-line-height);min-height:var(--_list-item-dense-two-line-height)}:host([dense][three-line]) .forge-list-item{height:var(--_list-item-dense-three-line-height);min-height:var(--_list-item-dense-three-line-height)}:host([selected]) .forge-list-item{color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item::before{content:\"\";position:absolute;inset:0;border-radius:inherit;opacity:var(--_list-item-selected-opacity);background-color:var(--_list-item-selected-background)}:host([selected]) .forge-list-item ::slotted([slot=end]),:host([selected]) .forge-list-item ::slotted([slot=leading]),:host([selected]) .forge-list-item ::slotted([slot=start]),:host([selected]) .forge-list-item ::slotted([slot=trailing]){color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=leading]),:host([selected]) .forge-list-item ::slotted([slot=start]){color:var(--_list-item-start-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=end]),:host([selected]) .forge-list-item ::slotted([slot=trailing]){color:var(--_list-item-end-selected-color)}:host([selected]) .text-container{color:var(--_list-item-selected-color)}:host([selected]) forge-state-layer{--forge-state-layer-color:var(--_list-item-selected-color)}:host([indented]){margin-inline-start:var(--_list-item-indent)}.text-container{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;isolation:isolate;font-size:var(--_list-item-text-font-size);font-weight:var(--_list-item-text-font-weight);line-height:var(--_list-item-text-line-height);flex:1;contain:layout}slot[name=secondary-text]::slotted(*),slot[name=tertiary-text]::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--_list-item-text-color);display:block}:host([selected]) slot[name=secondary-text]::slotted(*),:host([selected]) slot[name=tertiary-text]::slotted(*){color:var(--_list-item-selected-text-color)}::slotted(:is(button,[role=button][tabindex],[forge-list-item-button])){appearance:none;cursor:var(--_list-item-cursor);border:none;padding-block:0;padding-inline:0;margin:0;box-sizing:border-box;background:0 0;color:inherit;outline:0;font:inherit;user-select:auto;text-align:inherit;letter-spacing:inherit;word-spacing:inherit;display:inline}::slotted(a){outline:0;color:inherit!important;text-decoration:none!important}::slotted([slot=end]),::slotted([slot=leading]),::slotted([slot=start]),::slotted([slot=trailing]){color:var(--_list-item-text-color);display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;fill:currentColor}:host(:not([noninteractive])) ::slotted(:is(forge-checkbox,forge-radio,forge-switch):is([slot=start],[slot=end],[slot=leading],[slot=trailing]):not([forge-ignore])){--forge-focus-indicator-display:none;--forge-state-layer-display:none}:host([selected]) ::slotted([slot=leading]),:host([selected]) ::slotted([slot=start]){color:var(--_list-item-start-selected-color)}:host([selected]) ::slotted([slot=end]),:host([selected]) ::slotted([slot=trailing]){color:var(--_list-item-end-selected-color)}:host([wrap]) .forge-list-item{--_list-item-padding:var(--_list-item-wrap-padding);height:auto}:host([wrap]) .text-container{white-space:normal;overflow:visible;text-overflow:clip;line-height:normal}:host([wrap]) slot[name=secondary-text]::slotted(*),:host([wrap]) slot[name=tertiary-text]::slotted(*){white-space:normal;overflow:visible;text-overflow:clip;line-height:normal}forge-focus-indicator{z-index:1;--forge-focus-indicator-shape:calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1))}forge-state-layer{border-radius:inherit}';
|
|
17
|
+
const styles = ':host{--_list-item-indent:var(--forge-list-item-indent, var(--forge-spacing-xxlarge, 48px));--_list-item-dense-indent:var(--forge-list-item-dense-indent, var(--forge-spacing-xxlarge, 48px));--_list-item-disabled-cursor:var(--forge-list-item-disabled-cursor, not-allowed)}:host{display:block;outline:0}:host([hidden]){display:none}.forge-list-item{--_list-item-background:var(--forge-list-item-background, transparent);--_list-item-shape:var(--forge-list-item-shape, 0);--_list-item-padding:var(--forge-list-item-padding, 0 var(--forge-spacing-medium, 16px));--_list-item-margin:var(--forge-list-item-margin, 0);--_list-item-height:var(--forge-list-item-height, 48px);--_list-item-dense-height:var(--forge-list-item-dense-height, 32px);--_list-item-cursor:var(--forge-list-item-cursor, pointer);--_list-item-gap:var(--forge-list-item-gap, var(--forge-spacing-large, 24px));--_list-item-text-color:var(--forge-list-item-text-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-text-font-size:var(--forge-list-item-text-font-size, var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1))));--_list-item-text-font-weight:var(--forge-list-item-text-font-weight, var(--forge-typography-body2-font-weight, 400));--_list-item-text-line-height:var(--forge-list-item-text-line-height, 1.5rem);--_list-item-selected-color:var(--forge-list-item-selected-color, var(--forge-theme-primary, #3f51b5));--_list-item-selected-background:var(--forge-list-item-selected-background, var(--_list-item-selected-color));--_list-item-selected-opacity:var(--forge-list-item-selected-opacity, 0.08);--_list-item-selected-start-color:var(--forge-list-item-selected-start-color, var(--_list-item-selected-color));--_list-item-selected-end-color:var(--forge-list-item-selected-end-color, var(--_list-item-selected-color));--_list-item-selected-text-color:var(--forge-list-item-selected-text-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_list-item-disabled-opacity:var(--forge-list-item-disabled-opacity, 0.38);--_list-item-one-line-height:var(--forge-list-item-one-line-height, var(--_list-item-height));--_list-item-two-line-height:var(--forge-list-item-two-line-height, var(--forge-list-item-height, 72px));--_list-item-three-line-height:var(--forge-list-item-three-line-height, var(--forge-list-item-height, 88px));--_list-item-dense-one-line-height:var(--forge-list-item-dense-one-line-height, var(--_list-item-dense-height));--_list-item-dense-two-line-height:var(--forge-list-item-dense-two-line-height, var(--forge-list-item-dense-height, 56px));--_list-item-dense-three-line-height:var(--forge-list-item-dense-three-line-height, var(--forge-list-item-dense-height, 72px));--_list-item-dense-font-size:var(--forge-list-item-dense-font-size, 0.875rem);--_list-item-dense-gap:var(--forge-list-item-dense-gap, var(--forge-spacing-xsmall, 8px));--_list-item-start-selected-color:var(--forge-list-item-start-selected-color, var(--_list-item-selected-color));--_list-item-end-selected-color:var(--forge-list-item-end-selected-color, var(--_list-item-selected-color));--_list-item-wrap-padding:var(--forge-list-item-wrap-padding, var(--forge-spacing-xsmall, 8px) var(--forge-spacing-medium, 16px))}.forge-list-item{position:relative;display:flex;gap:var(--_list-item-gap);align-items:center;box-sizing:border-box;outline:0;text-decoration:none;border-radius:var(--_list-item-shape);-webkit-tap-highlight-color:transparent;background-color:var(--_list-item-background);height:var(--_list-item-height);min-height:var(--_list-item-height);padding:var(--_list-item-padding);margin:var(--_list-item-margin)}.forge-list-item.interactive{cursor:var(--_list-item-cursor)}.forge-list-item.disabled{cursor:var(--_list-item-disabled-cursor);opacity:var(--_list-item-disabled-opacity)}.forge-list-item.disabled ::slotted(button){cursor:var(--_list-item-disabled-cursor)}.anchor{position:absolute;inset:0}:host([two-line]) .forge-list-item{height:var(--_list-item-two-line-height);min-height:var(--_list-item-two-line-height)}:host([three-line]) .forge-list-item{height:var(--_list-item-three-line-height);min-height:var(--_list-item-three-line-height)}:host([dense]) .forge-list-item{--_list-item-gap:var(--_list-item-dense-gap);height:var(--_list-item-dense-one-line-height);min-height:var(--_list-item-dense-one-line-height)}:host([dense]) .text-container{font-size:var(--_list-item-dense-font-size)}:host([dense][indented]){margin-inline-start:var(--_list-item-dense-indent)}:host([dense][two-line]) .forge-list-item{height:var(--_list-item-dense-two-line-height);min-height:var(--_list-item-dense-two-line-height)}:host([dense][three-line]) .forge-list-item{height:var(--_list-item-dense-three-line-height);min-height:var(--_list-item-dense-three-line-height)}:host([selected]) .forge-list-item{color:var(--_list-item-selected-color)}:host([selected]) .forge-list-item::before{content:\"\";position:absolute;inset:0;border-radius:inherit;opacity:var(--_list-item-selected-opacity);background-color:var(--_list-item-selected-background);pointer-events:none}:host([selected]) .forge-list-item ::slotted([slot=end]),:host([selected]) .forge-list-item ::slotted([slot=leading]),:host([selected]) .forge-list-item ::slotted([slot=start]),:host([selected]) .forge-list-item ::slotted([slot=trailing]){color:var(--_list-item-selected-color);isolation:isolate}:host([selected]) .forge-list-item ::slotted([slot=leading]),:host([selected]) .forge-list-item ::slotted([slot=start]){color:var(--_list-item-start-selected-color)}:host([selected]) .forge-list-item ::slotted([slot=end]),:host([selected]) .forge-list-item ::slotted([slot=trailing]){color:var(--_list-item-end-selected-color)}:host([selected]) .text-container{color:var(--_list-item-selected-color)}:host([selected]) forge-state-layer{--forge-state-layer-color:var(--_list-item-selected-color)}:host([indented]){margin-inline-start:var(--_list-item-indent)}.text-container{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;isolation:isolate;font-size:var(--_list-item-text-font-size);font-weight:var(--_list-item-text-font-weight);line-height:var(--_list-item-text-line-height);flex:1;contain:layout}slot[name=secondary-text]::slotted(*),slot[name=tertiary-text]::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--_list-item-text-color);display:block}:host([selected]) slot[name=secondary-text]::slotted(*),:host([selected]) slot[name=tertiary-text]::slotted(*){color:var(--_list-item-selected-text-color)}::slotted(:is(button,[role=button][tabindex],[forge-list-item-button])){appearance:none;cursor:var(--_list-item-cursor);border:none;padding-block:0;padding-inline:0;margin:0;box-sizing:border-box;background:0 0;color:inherit;outline:0;font:inherit;user-select:auto;text-align:inherit;letter-spacing:inherit;word-spacing:inherit;display:inline}::slotted(a){outline:0;color:inherit!important;text-decoration:none!important}::slotted([slot=end]),::slotted([slot=leading]),::slotted([slot=start]),::slotted([slot=trailing]){color:var(--_list-item-text-color);display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;fill:currentColor}:host(:not([noninteractive])) ::slotted(:is(forge-checkbox,forge-radio,forge-switch):is([slot=start],[slot=end],[slot=leading],[slot=trailing]):not([forge-ignore])){--forge-focus-indicator-display:none;--forge-state-layer-display:none}:host([selected]) ::slotted([slot=leading]),:host([selected]) ::slotted([slot=start]){color:var(--_list-item-start-selected-color)}:host([selected]) ::slotted([slot=end]),:host([selected]) ::slotted([slot=trailing]){color:var(--_list-item-end-selected-color)}:host([wrap]) .forge-list-item{--_list-item-padding:var(--_list-item-wrap-padding);height:auto}:host([wrap]) .text-container{white-space:normal;overflow:visible;text-overflow:clip;line-height:normal}:host([wrap]) slot[name=secondary-text]::slotted(*),:host([wrap]) slot[name=tertiary-text]::slotted(*){white-space:normal;overflow:visible;text-overflow:clip;line-height:normal}forge-focus-indicator{z-index:1;--forge-focus-indicator-shape:calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1))}forge-state-layer{border-radius:inherit}';
|
|
18
18
|
/**
|
|
19
19
|
* @tag forge-list-item
|
|
20
20
|
*
|