@expressivecss/expressive 0.3.0 → 0.5.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/CHANGELOG.md +96 -0
- package/README.md +4 -9
- package/dist/css/expressive.css +3183 -2150
- package/dist/css/expressive.css.map +1 -1
- package/dist/css/expressive.min.css +1 -1
- package/dist/css/expressive.min.css.map +1 -1
- package/dist/js/expressive.cjs +1254 -1567
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +1254 -1567
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +12 -22
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +1254 -1568
- package/dist/js/expressive.mjs.map +4 -4
- package/dist/types/behaviors/bottomSheets.d.ts +18 -0
- package/dist/types/behaviors/sideSheets.d.ts +18 -0
- package/dist/types/components/autocomplete.d.ts +13 -20
- package/dist/types/components/buttons.d.ts +2 -2
- package/dist/types/components/cards.d.ts +3 -6
- package/dist/types/components/carousel.d.ts +3 -3
- package/dist/types/components/characterCounter.d.ts +3 -5
- package/dist/types/components/chips.d.ts +2 -2
- package/dist/types/components/datepicker.d.ts +2 -8
- package/dist/types/components/index.d.ts +3 -6
- package/dist/types/components/lightbox.d.ts +2 -2
- package/dist/types/components/{dropdown.d.ts → menu.d.ts} +48 -38
- package/dist/types/components/navigationRail.d.ts +53 -0
- package/dist/types/components/parallax.d.ts +2 -8
- package/dist/types/components/range.d.ts +5 -2
- package/dist/types/components/registry.d.ts +7 -19
- package/dist/types/components/scrollspy.d.ts +26 -50
- package/dist/types/components/select.d.ts +28 -14
- package/dist/types/components/sidenav.d.ts +40 -55
- package/dist/types/components/slider.d.ts +2 -2
- package/dist/types/components/{toasts.d.ts → snackbar.d.ts} +28 -25
- package/dist/types/components/tabs.d.ts +2 -2
- package/dist/types/components/timepicker.d.ts +2 -4
- package/dist/types/components/tooltip.d.ts +2 -2
- package/dist/types/core/component.d.ts +4 -4
- package/dist/types/index.d.ts +3 -1
- package/package.json +4 -3
- package/src/sass/README.md +13 -15
- package/src/sass/abstracts/_breakpoints.scss +14 -19
- package/src/sass/abstracts/_mixins.scss +3 -3
- package/src/sass/abstracts/_variables.scss +27 -23
- package/src/sass/base/_global.scss +1 -1
- package/src/sass/base/_grid.scss +64 -133
- package/src/sass/base/_index.scss +1 -1
- package/src/sass/components/_badges.scss +76 -61
- package/src/sass/components/_bottom-sheet.scss +137 -0
- package/src/sass/components/_buttons.scss +22 -54
- package/src/sass/components/_cards.scss +54 -127
- package/src/sass/components/_carousel.scss +4 -6
- package/src/sass/components/_chips.scss +6 -5
- package/src/sass/components/_datepicker.scss +1 -15
- package/src/sass/components/_dialog.scss +268 -0
- package/src/sass/components/_index.scss +9 -7
- package/src/sass/components/_list.scss +253 -0
- package/src/sass/components/_menu.scss +341 -0
- package/src/sass/components/_navbar.scss +68 -117
- package/src/sass/components/_navigation-bar.scss +165 -0
- package/src/sass/components/_navigation-rail.scss +308 -0
- package/src/sass/components/_page-footer.scss +138 -15
- package/src/sass/components/_parallax.scss +7 -28
- package/src/sass/components/_preloader.scss +145 -300
- package/src/sass/components/_scrollspy.scss +18 -0
- package/src/sass/components/_side-sheet.scss +193 -0
- package/src/sass/components/_sidenav.scss +281 -146
- package/src/sass/components/{_toast.scss → _snackbar.scss} +43 -43
- package/src/sass/components/_table_of_contents.scss +30 -14
- package/src/sass/components/_tabs.scss +43 -50
- package/src/sass/components/_toolbar.scss +93 -27
- package/src/sass/components/_tooltip.scss +5 -10
- package/src/sass/components/_transitions.scss +0 -5
- package/src/sass/components/forms/_fieldset.scss +1 -1
- package/src/sass/components/forms/_index.scss +0 -5
- package/src/sass/components/forms/_input-fields.scss +52 -55
- package/src/sass/components/forms/_range.scss +423 -98
- package/src/sass/components/forms/_select.scss +177 -60
- package/src/sass/components/forms/_switches.scss +21 -8
- package/src/sass/tokens/_reference.scss +37 -13
- package/src/sass/tokens/_theme.scss +5 -13
- package/src/sass/utilities/_colors.scss +16 -74
- package/src/sass/utilities/_helpers.scss +1 -3
- package/src/sass/utilities/_typescale.scss +0 -5
- package/src/sass/utilities/_visibility.scss +10 -2
- package/dist/types/components/collapsible.d.ts +0 -96
- package/dist/types/components/modal.d.ts +0 -45
- package/dist/types/components/pushpin.d.ts +0 -51
- package/dist/types/components/tapTarget.d.ts +0 -57
- package/src/sass/components/_collapsible.scss +0 -181
- package/src/sass/components/_collection.scss +0 -198
- package/src/sass/components/_dropdown.scss +0 -129
- package/src/sass/components/_modal.scss +0 -208
- package/src/sass/components/_pushpin.scss +0 -11
- package/src/sass/components/_tapTarget.scss +0 -191
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { Component, BaseOptions, InitElements, MElement } from '../core/component';
|
|
2
|
-
export interface CollapsibleOptions extends BaseOptions {
|
|
3
|
-
/**
|
|
4
|
-
* If accordion versus collapsible. When omitted, `.expandable` on the
|
|
5
|
-
* element turns accordion off. `<details>` with the same `name` already
|
|
6
|
-
* exclusive-open in the browser; this option is the switch for the
|
|
7
|
-
* `<ul>/<li>` alias and assigns `name` when it is missing.
|
|
8
|
-
* @default true
|
|
9
|
-
*/
|
|
10
|
-
accordion: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Duration is CSS (`--md-comp-collapsible-duration`).
|
|
13
|
-
* Accepted so existing init calls keep compiling, and ignored.
|
|
14
|
-
* @default 300
|
|
15
|
-
*/
|
|
16
|
-
inDuration: number;
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated Duration is CSS (`--md-comp-collapsible-duration`).
|
|
19
|
-
* Accepted so existing init calls keep compiling, and ignored.
|
|
20
|
-
* @default 300
|
|
21
|
-
*/
|
|
22
|
-
outDuration: number;
|
|
23
|
-
/**
|
|
24
|
-
* Callback function called before collapsible is opened.
|
|
25
|
-
* @default null
|
|
26
|
-
*/
|
|
27
|
-
onOpenStart: (el: Element) => void;
|
|
28
|
-
/**
|
|
29
|
-
* Callback function called after collapsible is opened.
|
|
30
|
-
* @default null
|
|
31
|
-
*/
|
|
32
|
-
onOpenEnd: (el: Element) => void;
|
|
33
|
-
/**
|
|
34
|
-
* Callback function called before collapsible is closed.
|
|
35
|
-
* @default null
|
|
36
|
-
*/
|
|
37
|
-
onCloseStart: (el: Element) => void;
|
|
38
|
-
/**
|
|
39
|
-
* Callback function called after collapsible is closed.
|
|
40
|
-
* @default null
|
|
41
|
-
*/
|
|
42
|
-
onCloseEnd: (el: Element) => void;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Collapsible. Open/close is HTML (`<details>` / `[open]`, or `.active` on
|
|
46
|
-
* the `<li>` alias). Height is CSS. This class is the public API, accordion
|
|
47
|
-
* for the alias, and aria on non-native headers.
|
|
48
|
-
*/
|
|
49
|
-
export declare class Collapsible extends Component<CollapsibleOptions> {
|
|
50
|
-
private _items;
|
|
51
|
-
private _groupName;
|
|
52
|
-
private _endTimers;
|
|
53
|
-
private _wrappedBodies;
|
|
54
|
-
constructor(el: HTMLElement, options: Partial<CollapsibleOptions>);
|
|
55
|
-
static get defaults(): CollapsibleOptions;
|
|
56
|
-
/**
|
|
57
|
-
* Initializes instance of Collapsible.
|
|
58
|
-
* @param el HTML element.
|
|
59
|
-
* @param options Component options.
|
|
60
|
-
*/
|
|
61
|
-
static init(el: HTMLElement, options?: Partial<CollapsibleOptions>): Collapsible;
|
|
62
|
-
/**
|
|
63
|
-
* Initializes instances of Collapsible.
|
|
64
|
-
* @param els HTML elements.
|
|
65
|
-
* @param options Component options.
|
|
66
|
-
*/
|
|
67
|
-
static init(els: InitElements<MElement>, options?: Partial<CollapsibleOptions>): Collapsible[];
|
|
68
|
-
static getInstance(el: HTMLElement): Collapsible;
|
|
69
|
-
destroy(): void;
|
|
70
|
-
/**
|
|
71
|
-
* Open collapsible section.
|
|
72
|
-
* @param index 0-based index of the section to open.
|
|
73
|
-
*/
|
|
74
|
-
open: (index: number) => void;
|
|
75
|
-
/**
|
|
76
|
-
* Close collapsible section.
|
|
77
|
-
* @param index 0-based index of the section to close.
|
|
78
|
-
*/
|
|
79
|
-
close: (index: number) => void;
|
|
80
|
-
private _collectItems;
|
|
81
|
-
private _setupItems;
|
|
82
|
-
private _isOpen;
|
|
83
|
-
private _setOpen;
|
|
84
|
-
private _headerOf;
|
|
85
|
-
private _wrapDetailsBodies;
|
|
86
|
-
private _unwrapDetailsBodies;
|
|
87
|
-
private _bodyOf;
|
|
88
|
-
private _syncAria;
|
|
89
|
-
private _setupEventHandlers;
|
|
90
|
-
private _removeEventHandlers;
|
|
91
|
-
private _handleClick;
|
|
92
|
-
private _handleKeydown;
|
|
93
|
-
private _handleToggle;
|
|
94
|
-
private _notify;
|
|
95
|
-
private _durationMs;
|
|
96
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Component, BaseOptions, InitElements, MElement } from '../core/component';
|
|
2
|
-
export interface ModalOptions extends BaseOptions {
|
|
3
|
-
opacity: number;
|
|
4
|
-
inDuration: number;
|
|
5
|
-
outDuration: number;
|
|
6
|
-
preventScrolling: boolean;
|
|
7
|
-
onOpenStart: (this: Modal, el: HTMLElement) => void;
|
|
8
|
-
onOpenEnd: (this: Modal, el: HTMLElement) => void;
|
|
9
|
-
onCloseStart: (el: HTMLElement) => void;
|
|
10
|
-
onCloseEnd: (el: HTMLElement) => void;
|
|
11
|
-
dismissible: boolean;
|
|
12
|
-
startingTop: string;
|
|
13
|
-
endingTop: string;
|
|
14
|
-
}
|
|
15
|
-
export declare class Modal extends Component<ModalOptions> {
|
|
16
|
-
#private;
|
|
17
|
-
constructor(el: HTMLElement, options: Partial<ModalOptions>);
|
|
18
|
-
static get defaults(): {
|
|
19
|
-
opacity: number;
|
|
20
|
-
inDuration: number;
|
|
21
|
-
outDuration: number;
|
|
22
|
-
onOpenStart: any;
|
|
23
|
-
onOpenEnd: any;
|
|
24
|
-
onCloseStart: any;
|
|
25
|
-
onCloseEnd: any;
|
|
26
|
-
preventScrolling: boolean;
|
|
27
|
-
dismissible: boolean;
|
|
28
|
-
startingTop: string;
|
|
29
|
-
endingTop: string;
|
|
30
|
-
};
|
|
31
|
-
static init(el: HTMLElement, options?: Partial<ModalOptions>): Modal;
|
|
32
|
-
static init(els: InitElements<MElement>, options?: Partial<ModalOptions>): Modal[];
|
|
33
|
-
static getInstance(el: HTMLElement): Modal;
|
|
34
|
-
destroy(): void;
|
|
35
|
-
_setupEventHandlers(): void;
|
|
36
|
-
_removeEventHandlers(): void;
|
|
37
|
-
_handleTriggerClick(): void;
|
|
38
|
-
_handleOverlayClick(): void;
|
|
39
|
-
_handleModalCloseClick(): void;
|
|
40
|
-
_handleKeydown(): void;
|
|
41
|
-
_handleFocus(): void;
|
|
42
|
-
open(): this;
|
|
43
|
-
close(): this;
|
|
44
|
-
static create(config: any): string | HTMLDialogElement;
|
|
45
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Component, BaseOptions, InitElements, MElement } from '../core/component';
|
|
2
|
-
export interface PushpinOptions extends BaseOptions {
|
|
3
|
-
/**
|
|
4
|
-
* The distance in pixels from the top of the page where
|
|
5
|
-
* the element becomes fixed.
|
|
6
|
-
* @default 0
|
|
7
|
-
*/
|
|
8
|
-
top: number;
|
|
9
|
-
/**
|
|
10
|
-
* The distance in pixels from the top of the page where
|
|
11
|
-
* the elements stops being fixed.
|
|
12
|
-
* @default Infinity
|
|
13
|
-
*/
|
|
14
|
-
bottom: number;
|
|
15
|
-
/**
|
|
16
|
-
* The offset from the top the element will be fixed at.
|
|
17
|
-
* @default 0
|
|
18
|
-
*/
|
|
19
|
-
offset: number;
|
|
20
|
-
/**
|
|
21
|
-
* Callback function called when pushpin position changes.
|
|
22
|
-
* You are provided with a position string.
|
|
23
|
-
* @default null
|
|
24
|
-
*/
|
|
25
|
-
onPositionChange: (position: 'pinned' | 'pin-top' | 'pin-bottom') => void;
|
|
26
|
-
}
|
|
27
|
-
export declare class Pushpin extends Component<PushpinOptions> {
|
|
28
|
-
static _pushpins: Pushpin[];
|
|
29
|
-
originalOffset: number;
|
|
30
|
-
constructor(el: HTMLElement, options: Partial<PushpinOptions>);
|
|
31
|
-
static get defaults(): PushpinOptions;
|
|
32
|
-
/**
|
|
33
|
-
* Initializes instance of Pushpin.
|
|
34
|
-
* @param el HTML element.
|
|
35
|
-
* @param options Component options.
|
|
36
|
-
*/
|
|
37
|
-
static init(el: HTMLElement, options?: Partial<PushpinOptions>): Pushpin;
|
|
38
|
-
/**
|
|
39
|
-
* Initializes instances of Pushpin.
|
|
40
|
-
* @param els HTML elements.
|
|
41
|
-
* @param options Component options.
|
|
42
|
-
*/
|
|
43
|
-
static init(els: InitElements<MElement>, options?: Partial<PushpinOptions>): Pushpin[];
|
|
44
|
-
static getInstance(el: HTMLElement): Pushpin;
|
|
45
|
-
destroy(): void;
|
|
46
|
-
static _updateElements(): void;
|
|
47
|
-
_setupEventHandlers(): void;
|
|
48
|
-
_removeEventHandlers(): void;
|
|
49
|
-
_updatePosition(): void;
|
|
50
|
-
_removePinClasses(): void;
|
|
51
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Component, BaseOptions, InitElements, MElement, Openable } from '../core/component';
|
|
2
|
-
export interface TapTargetOptions extends BaseOptions {
|
|
3
|
-
/**
|
|
4
|
-
* Callback function called when Tap Target is opened.
|
|
5
|
-
* @default null
|
|
6
|
-
*/
|
|
7
|
-
onOpen: (origin: HTMLElement) => void;
|
|
8
|
-
/**
|
|
9
|
-
* Callback function called when Tap Target is closed.
|
|
10
|
-
* @default null
|
|
11
|
-
*/
|
|
12
|
-
onClose: (origin: HTMLElement) => void;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Tap target (Feature Discovery). Placement is CSS custom properties;
|
|
16
|
-
* the wrapper is a popover when the platform has one. This class is
|
|
17
|
-
* open/close, origin lookup, and the two geometry variables.
|
|
18
|
-
*/
|
|
19
|
-
export declare class TapTarget extends Component<TapTargetOptions> implements Openable {
|
|
20
|
-
isOpen: boolean;
|
|
21
|
-
originEl: HTMLElement | null;
|
|
22
|
-
static _taptargets: TapTarget[];
|
|
23
|
-
private wrapper;
|
|
24
|
-
private waveEl;
|
|
25
|
-
private contentEl;
|
|
26
|
-
private _createdWrapper;
|
|
27
|
-
private _createdWave;
|
|
28
|
-
private _usePopover;
|
|
29
|
-
private _liftedStatic;
|
|
30
|
-
private _opening;
|
|
31
|
-
constructor(el: HTMLElement, options: Partial<TapTargetOptions>);
|
|
32
|
-
static get defaults(): TapTargetOptions;
|
|
33
|
-
static init(el: HTMLElement, options?: Partial<TapTargetOptions>): TapTarget;
|
|
34
|
-
static init(els: InitElements<MElement>, options?: Partial<TapTargetOptions>): TapTarget[];
|
|
35
|
-
static getInstance(el: HTMLElement): TapTarget;
|
|
36
|
-
destroy(): void;
|
|
37
|
-
/**
|
|
38
|
-
* Open Tap Target.
|
|
39
|
-
*/
|
|
40
|
-
open: () => void;
|
|
41
|
-
/**
|
|
42
|
-
* Close Tap Target.
|
|
43
|
-
*/
|
|
44
|
-
close: () => void;
|
|
45
|
-
private _setup;
|
|
46
|
-
private _ensureId;
|
|
47
|
-
private _labelFromHeading;
|
|
48
|
-
private _teardownDom;
|
|
49
|
-
private _setupEventHandlers;
|
|
50
|
-
private _removeEventHandlers;
|
|
51
|
-
private _handleThrottledResize;
|
|
52
|
-
private _handleOriginKeydown;
|
|
53
|
-
private _handleTargetToggle;
|
|
54
|
-
private _handleResize;
|
|
55
|
-
private _handlePopoverToggle;
|
|
56
|
-
private _calculatePositioning;
|
|
57
|
-
}
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
@use "../abstracts" as *;
|
|
2
|
-
|
|
3
|
-
// Collapsible. Anatomy is the HTML: a .collapsible of <details> with
|
|
4
|
-
// <summary> headers. Same `name` on each <details> is an accordion;
|
|
5
|
-
// omit it (or add .expandable) so several can stay open. The `open`
|
|
6
|
-
// attribute is the preselected section.
|
|
7
|
-
//
|
|
8
|
-
// <ul>/<li> + .collapsible-header / .collapsible-body stay as aliases.
|
|
9
|
-
// .collapsible-accordion is the default and does nothing extra.
|
|
10
|
-
//
|
|
11
|
-
// Tokens:
|
|
12
|
-
// --md-comp-collapsible-shape 12px
|
|
13
|
-
// --md-comp-collapsible-container-color surface
|
|
14
|
-
// --md-comp-collapsible-outline-color outline-variant
|
|
15
|
-
// --md-comp-collapsible-header-padding 1rem
|
|
16
|
-
// --md-comp-collapsible-body-padding 0 1rem
|
|
17
|
-
// --md-comp-collapsible-duration 500ms
|
|
18
|
-
// --md-comp-collapsible-easing-open ease-in-out cubic
|
|
19
|
-
// --md-comp-collapsible-easing-close ease-in-out cubic
|
|
20
|
-
// --md-comp-collapsible-icon-size 24px
|
|
21
|
-
// --md-comp-collapsible-popout-inset 24px
|
|
22
|
-
// --md-comp-collapsible-popout-gap 16px
|
|
23
|
-
//
|
|
24
|
-
// Nest descendants inside this block. A list-suffixed selector only
|
|
25
|
-
// attaches the suffix to the last item (same bug as the icon sizes).
|
|
26
|
-
|
|
27
|
-
.collapsible {
|
|
28
|
-
--md-comp-collapsible-shape: 12px;
|
|
29
|
-
--md-comp-collapsible-container-color: var(--md-sys-color-surface);
|
|
30
|
-
--md-comp-collapsible-outline-color: var(--md-sys-color-outline-variant);
|
|
31
|
-
--md-comp-collapsible-header-padding: 1rem;
|
|
32
|
-
--md-comp-collapsible-body-padding: 0 1rem;
|
|
33
|
-
--md-comp-collapsible-duration: 500ms;
|
|
34
|
-
--md-comp-collapsible-easing-open: cubic-bezier(0.65, 0, 0.35, 1);
|
|
35
|
-
--md-comp-collapsible-easing-close: cubic-bezier(0.65, 0, 0.35, 1);
|
|
36
|
-
--md-comp-collapsible-icon-size: 24px;
|
|
37
|
-
--md-comp-collapsible-popout-inset: 24px;
|
|
38
|
-
--md-comp-collapsible-popout-gap: 16px;
|
|
39
|
-
|
|
40
|
-
box-sizing: border-box;
|
|
41
|
-
padding: 0;
|
|
42
|
-
margin: $element-top-margin 0 $element-bottom-margin;
|
|
43
|
-
list-style: none;
|
|
44
|
-
overflow: hidden;
|
|
45
|
-
border: 1px solid var(--md-comp-collapsible-outline-color);
|
|
46
|
-
border-radius: var(--md-comp-collapsible-shape);
|
|
47
|
-
background-color: var(--md-comp-collapsible-container-color);
|
|
48
|
-
color: var(--md-sys-color-on-surface);
|
|
49
|
-
@include z-depth("1");
|
|
50
|
-
|
|
51
|
-
> :is(details, li) + :is(details, li) {
|
|
52
|
-
border-top: 1px solid var(--md-comp-collapsible-outline-color);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
:is(summary, .collapsible-header) {
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
box-sizing: border-box;
|
|
59
|
-
width: 100%;
|
|
60
|
-
margin: 0;
|
|
61
|
-
padding: var(--md-comp-collapsible-header-padding);
|
|
62
|
-
border: 0;
|
|
63
|
-
background: none;
|
|
64
|
-
color: inherit;
|
|
65
|
-
font: inherit;
|
|
66
|
-
font-weight: inherit;
|
|
67
|
-
line-height: 1.5;
|
|
68
|
-
text-align: start;
|
|
69
|
-
list-style: none;
|
|
70
|
-
cursor: pointer;
|
|
71
|
-
-webkit-tap-highlight-color: transparent;
|
|
72
|
-
|
|
73
|
-
&::-webkit-details-marker {
|
|
74
|
-
display: none;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@include focus-visible;
|
|
78
|
-
|
|
79
|
-
> i {
|
|
80
|
-
width: 2rem;
|
|
81
|
-
margin-right: 1rem;
|
|
82
|
-
font-size: 1.6rem;
|
|
83
|
-
line-height: 1;
|
|
84
|
-
text-align: center;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&::after {
|
|
88
|
-
content: "expand_more";
|
|
89
|
-
flex-shrink: 0;
|
|
90
|
-
margin-inline-start: auto;
|
|
91
|
-
font-family: var(--md-icon-font);
|
|
92
|
-
font-size: var(--md-comp-collapsible-icon-size);
|
|
93
|
-
font-variation-settings:
|
|
94
|
-
"FILL" var(--md-icon-fill),
|
|
95
|
-
"wght" var(--md-icon-weight),
|
|
96
|
-
"GRAD" var(--md-icon-grade),
|
|
97
|
-
"opsz" var(--md-icon-optical-size);
|
|
98
|
-
line-height: 1;
|
|
99
|
-
-webkit-font-smoothing: antialiased;
|
|
100
|
-
transition: transform var(--md-comp-collapsible-duration)
|
|
101
|
-
var(--md-comp-collapsible-easing-close);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
:is(details[open] > summary, .active > .collapsible-header)::after {
|
|
106
|
-
transform: rotate(180deg);
|
|
107
|
-
transition-timing-function: var(--md-comp-collapsible-easing-open);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.collapsible-header-content {
|
|
111
|
-
flex-grow: 1;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// Shared body for the <ul> alias and for <details> (JS wraps the
|
|
115
|
-
// latter). Text stays painted and is clipped as the row shrinks.
|
|
116
|
-
.collapsible-body {
|
|
117
|
-
display: grid;
|
|
118
|
-
grid-template-rows: 0fr;
|
|
119
|
-
box-sizing: border-box;
|
|
120
|
-
padding: var(--md-comp-collapsible-body-padding);
|
|
121
|
-
overflow: hidden;
|
|
122
|
-
transition: grid-template-rows var(--md-comp-collapsible-duration)
|
|
123
|
-
var(--md-comp-collapsible-easing-close);
|
|
124
|
-
|
|
125
|
-
> * {
|
|
126
|
-
min-height: 0;
|
|
127
|
-
overflow: hidden;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.active > .collapsible-body,
|
|
132
|
-
details[open] > .collapsible-body {
|
|
133
|
-
grid-template-rows: 1fr;
|
|
134
|
-
transition-timing-function: var(--md-comp-collapsible-easing-open);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// UA `display: none` on closed details children. Keep our wrapper as
|
|
138
|
-
// a grid so 0fr can clip instead of popping the copy away.
|
|
139
|
-
details:not([open]) > .collapsible-body {
|
|
140
|
-
display: grid;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
&.no-icon :is(summary, .collapsible-header)::after {
|
|
144
|
-
content: none;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
&.popout {
|
|
148
|
-
overflow: visible;
|
|
149
|
-
border: 0;
|
|
150
|
-
background: transparent;
|
|
151
|
-
@include z-depth("0");
|
|
152
|
-
|
|
153
|
-
> :is(details, li) {
|
|
154
|
-
margin-inline: var(--md-comp-collapsible-popout-inset);
|
|
155
|
-
overflow: hidden;
|
|
156
|
-
border: 0;
|
|
157
|
-
border-radius: var(--md-comp-collapsible-shape);
|
|
158
|
-
background-color: var(--md-comp-collapsible-container-color);
|
|
159
|
-
transition: margin var(--md-comp-collapsible-duration)
|
|
160
|
-
var(--md-comp-collapsible-easing-close);
|
|
161
|
-
@include z-depth("1");
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
> :is(details, li) + :is(details, li) {
|
|
165
|
-
border-top: 0;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
> :is(details[open], li.active) {
|
|
169
|
-
margin-block: var(--md-comp-collapsible-popout-gap);
|
|
170
|
-
margin-inline: 0;
|
|
171
|
-
transition-timing-function: var(--md-comp-collapsible-easing-open);
|
|
172
|
-
@include z-depth("2");
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
@media (prefers-reduced-motion: reduce) {
|
|
178
|
-
.collapsible {
|
|
179
|
-
--md-comp-collapsible-duration: 0s;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
@use "../abstracts" as *;
|
|
2
|
-
|
|
3
|
-
// Collection. Anatomy is the HTML: a .collection of list items. A heading
|
|
4
|
-
// as the first child of an item is the header. An <a> may be the item
|
|
5
|
-
// (old <div class="collection"> markup) or live inside an <li>.
|
|
6
|
-
//
|
|
7
|
-
// Aliases: .collection-item, .collection-header, .with-header, .avatar,
|
|
8
|
-
// .title, .secondary-content. .flush drops the boxed outline.
|
|
9
|
-
//
|
|
10
|
-
// Tokens:
|
|
11
|
-
// --md-comp-collection-shape 12px
|
|
12
|
-
// --md-comp-collection-container-color surface
|
|
13
|
-
// --md-comp-collection-outline-color outline-variant
|
|
14
|
-
// --md-comp-collection-item-height 56px
|
|
15
|
-
// --md-comp-collection-item-padding 16px
|
|
16
|
-
// --md-comp-collection-avatar-size 40px
|
|
17
|
-
//
|
|
18
|
-
// Nest descendants inside this block. A list-suffixed selector only
|
|
19
|
-
// attaches the suffix to the last item (same bug as the icon sizes).
|
|
20
|
-
|
|
21
|
-
.collection {
|
|
22
|
-
--md-comp-collection-shape: 12px;
|
|
23
|
-
--md-comp-collection-container-color: var(--md-sys-color-surface);
|
|
24
|
-
--md-comp-collection-outline-color: var(--md-sys-color-outline-variant);
|
|
25
|
-
--md-comp-collection-item-height: 56px;
|
|
26
|
-
--md-comp-collection-item-padding: 16px;
|
|
27
|
-
--md-comp-collection-avatar-size: 40px;
|
|
28
|
-
|
|
29
|
-
box-sizing: border-box;
|
|
30
|
-
padding: 0;
|
|
31
|
-
margin: $element-top-margin 0 $element-bottom-margin;
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
list-style: none;
|
|
34
|
-
border: 1px solid var(--md-comp-collection-outline-color);
|
|
35
|
-
border-radius: var(--md-comp-collection-shape);
|
|
36
|
-
background-color: var(--md-comp-collection-container-color);
|
|
37
|
-
color: var(--md-sys-color-on-surface);
|
|
38
|
-
|
|
39
|
-
> * + * {
|
|
40
|
-
border-top: 1px solid var(--md-comp-collection-outline-color);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
> :is(li, a, .collection-item, .collection-header) {
|
|
44
|
-
display: grid;
|
|
45
|
-
grid-template-columns: auto 1fr auto;
|
|
46
|
-
grid-template-rows: auto auto;
|
|
47
|
-
align-items: center;
|
|
48
|
-
column-gap: 16px;
|
|
49
|
-
box-sizing: border-box;
|
|
50
|
-
min-height: var(--md-comp-collection-item-height);
|
|
51
|
-
margin: 0;
|
|
52
|
-
padding: 8px var(--md-comp-collection-item-padding);
|
|
53
|
-
background-color: transparent;
|
|
54
|
-
color: inherit;
|
|
55
|
-
text-decoration: none;
|
|
56
|
-
transition: background-color 0.2s ease-out;
|
|
57
|
-
|
|
58
|
-
> :is(img, i).circle {
|
|
59
|
-
grid-column: 1;
|
|
60
|
-
grid-row: 1 / -1;
|
|
61
|
-
box-sizing: border-box;
|
|
62
|
-
width: var(--md-comp-collection-avatar-size);
|
|
63
|
-
height: var(--md-comp-collection-avatar-size);
|
|
64
|
-
overflow: hidden;
|
|
65
|
-
object-fit: cover;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
> i.circle {
|
|
69
|
-
display: inline-flex;
|
|
70
|
-
align-items: center;
|
|
71
|
-
justify-content: center;
|
|
72
|
-
font-size: 20px;
|
|
73
|
-
line-height: 1;
|
|
74
|
-
color: var(--md-sys-color-on-primary-container);
|
|
75
|
-
background-color: var(--md-sys-color-primary-container);
|
|
76
|
-
text-align: center;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
> .title {
|
|
80
|
-
grid-column: 2;
|
|
81
|
-
grid-row: 1;
|
|
82
|
-
min-width: 0;
|
|
83
|
-
@include typescale("title-medium");
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
> p {
|
|
87
|
-
grid-column: 2;
|
|
88
|
-
grid-row: 1;
|
|
89
|
-
min-width: 0;
|
|
90
|
-
margin: 0;
|
|
91
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
92
|
-
@include typescale("body-medium");
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
> .title ~ p {
|
|
96
|
-
grid-row: 2;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
> :is(.secondary-content, .badge) {
|
|
100
|
-
grid-column: 3;
|
|
101
|
-
grid-row: 1 / -1;
|
|
102
|
-
align-self: center;
|
|
103
|
-
justify-self: end;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
> a:not(.secondary-content, .btn, .btn-floating, .badge) {
|
|
107
|
-
grid-column: 1 / -1;
|
|
108
|
-
display: flex;
|
|
109
|
-
align-items: center;
|
|
110
|
-
gap: 16px;
|
|
111
|
-
min-width: 0;
|
|
112
|
-
color: inherit;
|
|
113
|
-
text-decoration: none;
|
|
114
|
-
|
|
115
|
-
> .badge {
|
|
116
|
-
margin-inline-start: auto;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
> :is(li, .collection-item):is(.avatar, :has(> .circle)),
|
|
122
|
-
> a:has(> .circle) {
|
|
123
|
-
min-height: 72px;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
> :is(.collection-header, li:has(> :is(h1, h2, h3, h4, h5, h6))) {
|
|
127
|
-
min-height: 0;
|
|
128
|
-
padding-block: 12px;
|
|
129
|
-
|
|
130
|
-
> :is(h1, h2, h3, h4, h5, h6) {
|
|
131
|
-
grid-column: 1 / -1;
|
|
132
|
-
margin: 0;
|
|
133
|
-
@include typescale("title-medium");
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
> a,
|
|
138
|
-
> li > a:not(.secondary-content, .btn, .btn-floating) {
|
|
139
|
-
@include focus-visible;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
> a:hover,
|
|
143
|
-
> li:has(> a:not(.secondary-content, .btn, .btn-floating):hover) {
|
|
144
|
-
background-color: color-mix(in oklab, var(--md-sys-color-on-surface) 8%, transparent);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
> :is(.active, [aria-current="page"]),
|
|
148
|
-
> li:has(> [aria-current="page"]) {
|
|
149
|
-
background-color: var(--md-sys-color-secondary-container);
|
|
150
|
-
color: var(--md-sys-color-on-secondary-container);
|
|
151
|
-
|
|
152
|
-
.secondary-content:not(.btn, .btn-floating) {
|
|
153
|
-
color: var(--md-sys-color-on-secondary-container);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
span.badge:not(.new) {
|
|
157
|
-
color: var(--md-sys-color-on-secondary-container);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
> :is(.disabled, [aria-disabled="true"]) {
|
|
162
|
-
pointer-events: none;
|
|
163
|
-
color: color-mix(in oklab, var(--md-sys-color-on-surface) 38%, transparent);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.secondary-content {
|
|
167
|
-
float: none;
|
|
168
|
-
margin-inline-start: auto;
|
|
169
|
-
@include focus-visible;
|
|
170
|
-
|
|
171
|
-
&:not(.btn, .btn-floating) {
|
|
172
|
-
color: var(--md-sys-color-primary);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
span.badge {
|
|
177
|
-
float: none;
|
|
178
|
-
margin-block: 0;
|
|
179
|
-
margin-inline-start: auto;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
&.flush {
|
|
183
|
-
border: 0;
|
|
184
|
-
border-radius: 0;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
// Keep the hook public so pages that used it outside a collection still
|
|
189
|
-
// color the trailing action. Layout (no float) is owned by .collection.
|
|
190
|
-
.secondary-content:not(.btn, .btn-floating) {
|
|
191
|
-
color: var(--md-sys-color-primary);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.collapsible .collection {
|
|
195
|
-
margin: 0;
|
|
196
|
-
border: none;
|
|
197
|
-
border-radius: 0;
|
|
198
|
-
}
|