@material/web 1.0.0-pre.14 → 1.0.0-pre.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/all.d.ts +4 -8
- package/all.js +4 -8
- package/all.js.map +1 -1
- package/button/{_tonal-button.scss → _filled-tonal-button.scss} +1 -1
- package/button/{tonal-button.d.ts → filled-tonal-button.d.ts} +3 -3
- package/button/{tonal-button.js → filled-tonal-button.js} +9 -9
- package/button/filled-tonal-button.js.map +1 -0
- package/button/internal/{_tonal-button.scss → _filled-tonal-button.scss} +7 -7
- package/button/internal/_shared.scss +12 -7
- package/button/internal/_touch-target.scss +5 -1
- package/button/internal/button.d.ts +6 -10
- package/button/internal/button.js +10 -43
- package/button/internal/button.js.map +1 -1
- package/button/internal/elevated-styles.css.js +1 -1
- package/button/internal/elevated-styles.css.js.map +1 -1
- package/button/internal/filled-styles.css.js +1 -1
- package/button/internal/filled-styles.css.js.map +1 -1
- package/button/internal/{tonal-button.d.ts → filled-tonal-button.d.ts} +2 -2
- package/button/internal/{tonal-button.js → filled-tonal-button.js} +3 -3
- package/button/internal/filled-tonal-button.js.map +1 -0
- package/button/internal/filled-tonal-styles.css.js +9 -0
- package/button/internal/filled-tonal-styles.css.js.map +1 -0
- package/button/internal/{tonal-styles.scss → filled-tonal-styles.scss} +2 -2
- package/button/internal/outlined-styles.css.js +1 -1
- package/button/internal/outlined-styles.css.js.map +1 -1
- package/button/internal/shared-styles.css.js +1 -1
- package/button/internal/shared-styles.css.js.map +1 -1
- package/button/internal/text-styles.css.js +1 -1
- package/button/internal/text-styles.css.js.map +1 -1
- package/checkbox/internal/_checkbox.scss +22 -78
- package/checkbox/internal/checkbox-styles.css.js +1 -1
- package/checkbox/internal/checkbox-styles.css.js.map +1 -1
- package/checkbox/internal/checkbox.d.ts +77 -6
- package/checkbox/internal/checkbox.js +123 -14
- package/checkbox/internal/checkbox.js.map +1 -1
- package/chips/internal/_shared.scss +8 -0
- package/chips/internal/chip-set.js +1 -3
- package/chips/internal/chip-set.js.map +1 -1
- package/chips/internal/chip.js +1 -3
- package/chips/internal/chip.js.map +1 -1
- package/chips/internal/filter-chip.d.ts +1 -0
- package/chips/internal/filter-chip.js +12 -6
- package/chips/internal/filter-chip.js.map +1 -1
- package/chips/internal/shared-styles.css.js +1 -1
- package/chips/internal/shared-styles.css.js.map +1 -1
- package/common.d.ts +2 -6
- package/common.js +2 -6
- package/common.js.map +1 -1
- package/dialog/harness.d.ts +1 -6
- package/dialog/harness.js +2 -43
- package/dialog/harness.js.map +1 -1
- package/dialog/internal/_dialog.scss +165 -281
- package/dialog/internal/animations.d.ts +47 -0
- package/dialog/internal/animations.js +117 -0
- package/dialog/internal/animations.js.map +1 -0
- package/dialog/internal/dialog-styles.css.js +1 -1
- package/dialog/internal/dialog-styles.css.js.map +1 -1
- package/dialog/internal/dialog.d.ts +76 -169
- package/dialog/internal/dialog.js +251 -475
- package/dialog/internal/dialog.js.map +1 -1
- package/fab/internal/_fab.scss +4 -0
- package/fab/internal/_shared.scss +12 -0
- package/fab/internal/fab-styles.css.js +1 -1
- package/fab/internal/fab-styles.css.js.map +1 -1
- package/fab/internal/shared-styles.css.js +1 -1
- package/fab/internal/shared-styles.css.js.map +1 -1
- package/fab/internal/shared.d.ts +0 -4
- package/fab/internal/shared.js +3 -13
- package/fab/internal/shared.js.map +1 -1
- package/focus/internal/_focus-ring.scss +52 -48
- package/focus/internal/focus-ring-styles.css.js +1 -1
- package/focus/internal/focus-ring-styles.css.js.map +1 -1
- package/focus/internal/focus-ring.d.ts +2 -1
- package/focus/internal/focus-ring.js +10 -0
- package/focus/internal/focus-ring.js.map +1 -1
- package/icon/internal/_icon.scss +18 -17
- package/icon/internal/icon-styles.css.js +1 -1
- package/icon/internal/icon-styles.css.js.map +1 -1
- package/icon/internal/icon.d.ts +1 -0
- package/icon/internal/icon.js +9 -0
- package/icon/internal/icon.js.map +1 -1
- package/iconbutton/{_standard-icon-button.scss → _icon-button.scss} +1 -1
- package/iconbutton/{standard-icon-button.d.ts → icon-button.d.ts} +2 -2
- package/iconbutton/{standard-icon-button.js → icon-button.js} +7 -7
- package/iconbutton/icon-button.js.map +1 -0
- package/iconbutton/internal/_filled-icon-button.scss +8 -6
- package/iconbutton/internal/_filled-tonal-icon-button.scss +8 -6
- package/iconbutton/internal/{_standard-icon-button.scss → _icon-button.scss} +8 -8
- package/iconbutton/internal/_outlined-icon-button.scss +14 -14
- package/iconbutton/internal/_shared.scss +6 -9
- package/iconbutton/internal/filled-styles.css.js +1 -1
- package/iconbutton/internal/filled-styles.css.js.map +1 -1
- package/iconbutton/internal/filled-tonal-styles.css.js +1 -1
- package/iconbutton/internal/filled-tonal-styles.css.js.map +1 -1
- package/iconbutton/internal/icon-button.d.ts +10 -1
- package/iconbutton/internal/icon-button.js +17 -2
- package/iconbutton/internal/icon-button.js.map +1 -1
- package/iconbutton/internal/outlined-styles.css.js +1 -1
- package/iconbutton/internal/outlined-styles.css.js.map +1 -1
- package/iconbutton/internal/shared-styles.css.js +1 -1
- package/iconbutton/internal/shared-styles.css.js.map +1 -1
- package/iconbutton/internal/standard-styles.css.js +1 -1
- package/iconbutton/internal/standard-styles.css.js.map +1 -1
- package/iconbutton/internal/standard-styles.scss +2 -2
- package/internal/aria/delegate.d.ts +1 -1
- package/internal/aria/delegate.js +1 -1
- package/internal/aria/delegate.js.map +1 -1
- package/internal/controller/element-internals.d.ts +35 -0
- package/internal/controller/element-internals.js +24 -0
- package/internal/controller/element-internals.js.map +1 -0
- package/internal/controller/form-submitter.d.ts +60 -0
- package/internal/controller/form-submitter.js +69 -0
- package/internal/controller/form-submitter.js.map +1 -0
- package/labs/navigationbar/internal/navigation-bar.js +1 -3
- package/labs/navigationbar/internal/navigation-bar.js.map +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer-modal.js +1 -3
- package/labs/navigationdrawer/internal/navigation-drawer-modal.js.map +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer.js +1 -3
- package/labs/navigationdrawer/internal/navigation-drawer.js.map +1 -1
- package/labs/navigationtab/internal/navigation-tab.js +1 -3
- package/labs/navigationtab/internal/navigation-tab.js.map +1 -1
- package/labs/segmentedbutton/internal/outlined-styles.css.js +1 -1
- package/labs/segmentedbutton/internal/outlined-styles.css.js.map +1 -1
- package/labs/segmentedbutton/internal/segmented-button.js +1 -3
- package/labs/segmentedbutton/internal/segmented-button.js.map +1 -1
- package/labs/segmentedbuttonset/internal/outlined-styles.css.js +1 -1
- package/labs/segmentedbuttonset/internal/outlined-styles.css.js.map +1 -1
- package/labs/segmentedbuttonset/internal/segmented-button-set.js +1 -3
- package/labs/segmentedbuttonset/internal/segmented-button-set.js.map +1 -1
- package/list/internal/list.d.ts +2 -2
- package/list/internal/list.js +1 -3
- package/list/internal/list.js.map +1 -1
- package/list/internal/listitem/_list-item.scss +20 -54
- package/list/internal/listitem/list-item-styles.css.js +1 -1
- package/list/internal/listitem/list-item-styles.css.js.map +1 -1
- package/list/internal/listitem/list-item.d.ts +15 -3
- package/list/internal/listitem/list-item.js +43 -10
- package/list/internal/listitem/list-item.js.map +1 -1
- package/menu/internal/menu.js +3 -4
- package/menu/internal/menu.js.map +1 -1
- package/menu/internal/menuitem/_menu-item.scss +1 -1
- package/menu/internal/menuitem/forced-colors-styles.css.js +1 -1
- package/menu/internal/menuitem/forced-colors-styles.css.js.map +1 -1
- package/menu/internal/menuitem/forced-colors-styles.scss +1 -1
- package/menu/internal/menuitem/menu-item-styles.css.js +1 -1
- package/menu/internal/menuitem/menu-item-styles.css.js.map +1 -1
- package/menu/internal/menuitem/menu-item.d.ts +9 -0
- package/menu/internal/menuitem/menu-item.js +18 -4
- package/menu/internal/menuitem/menu-item.js.map +1 -1
- package/menu/internal/shared.d.ts +45 -38
- package/menu/internal/shared.js +29 -40
- package/menu/internal/shared.js.map +1 -1
- package/menu/internal/submenuitem/sub-menu-item.d.ts +22 -12
- package/menu/internal/submenuitem/sub-menu-item.js +39 -24
- package/menu/internal/submenuitem/sub-menu-item.js.map +1 -1
- package/menu/menu-item.d.ts +1 -1
- package/menu/menu-item.js +0 -1
- package/menu/menu-item.js.map +1 -1
- package/menu/menu.d.ts +1 -1
- package/menu/menu.js +0 -1
- package/menu/menu.js.map +1 -1
- package/menu/sub-menu-item.d.ts +1 -1
- package/menu/sub-menu-item.js +0 -1
- package/menu/sub-menu-item.js.map +1 -1
- package/package.json +1 -3
- package/progress/internal/progress.js +1 -3
- package/progress/internal/progress.js.map +1 -1
- package/radio/internal/_radio.scss +38 -24
- package/radio/internal/forced-colors-styles.css.js +1 -1
- package/radio/internal/forced-colors-styles.css.js.map +1 -1
- package/radio/internal/forced-colors-styles.scss +4 -4
- package/radio/internal/radio-styles.css.js +1 -1
- package/radio/internal/radio-styles.css.js.map +1 -1
- package/radio/internal/radio.js +7 -6
- package/radio/internal/radio.js.map +1 -1
- package/select/internal/_filled-select.scss +2 -2
- package/select/internal/_outlined-select.scss +2 -2
- package/select/internal/_shared.scss +30 -0
- package/select/internal/filled-select-styles.css.js +1 -1
- package/select/internal/filled-select-styles.css.js.map +1 -1
- package/select/internal/outlined-select-styles.css.js +1 -1
- package/select/internal/outlined-select-styles.css.js.map +1 -1
- package/select/internal/select.d.ts +0 -5
- package/select/internal/select.js +11 -16
- package/select/internal/select.js.map +1 -1
- package/select/internal/selectoption/select-option.d.ts +5 -6
- package/select/internal/selectoption/select-option.js +8 -9
- package/select/internal/selectoption/select-option.js.map +1 -1
- package/select/internal/shared-styles.css.js +1 -1
- package/select/internal/shared-styles.css.js.map +1 -1
- package/select/internal/shared.d.ts +5 -9
- package/select/internal/shared.js +13 -11
- package/select/internal/shared.js.map +1 -1
- package/slider/internal/slider.js +1 -3
- package/slider/internal/slider.js.map +1 -1
- package/switch/internal/_handle.scss +12 -12
- package/switch/internal/_icon.scss +8 -8
- package/switch/internal/_track.scss +10 -10
- package/switch/internal/forced-colors-styles.css.js +1 -1
- package/switch/internal/forced-colors-styles.css.js.map +1 -1
- package/switch/internal/forced-colors-styles.scss +12 -12
- package/switch/internal/switch-styles.css.js +1 -1
- package/switch/internal/switch-styles.css.js.map +1 -1
- package/switch/internal/switch.js +1 -3
- package/switch/internal/switch.js.map +1 -1
- package/tabs/internal/_tab.scss +1 -1
- package/tabs/internal/_tabs.scss +1 -0
- package/tabs/internal/tab.d.ts +3 -9
- package/tabs/internal/tab.js +4 -7
- package/tabs/internal/tab.js.map +1 -1
- package/tabs/internal/tabs.d.ts +1 -4
- package/tabs/internal/tabs.js +5 -10
- package/tabs/internal/tabs.js.map +1 -1
- package/textfield/harness.js +4 -0
- package/textfield/harness.js.map +1 -1
- package/textfield/internal/text-field.js +1 -4
- package/textfield/internal/text-field.js.map +1 -1
- package/tokens/_index.scss +1 -0
- package/tokens/_md-comp-checkbox.scss +16 -16
- package/tokens/_md-comp-dialog.scss +2 -1
- package/tokens/_md-comp-elevated-button.scss +14 -12
- package/tokens/_md-comp-filled-button.scss +14 -12
- package/tokens/_md-comp-filled-icon-button.scss +23 -8
- package/tokens/_md-comp-filled-select.scss +19 -1
- package/tokens/_md-comp-filled-tonal-button.scss +14 -12
- package/tokens/_md-comp-filled-tonal-icon-button.scss +23 -8
- package/tokens/_md-comp-icon-button.scss +24 -11
- package/tokens/_md-comp-icon.scss +32 -0
- package/tokens/_md-comp-outlined-button.scss +14 -12
- package/tokens/_md-comp-outlined-icon-button.scss +26 -12
- package/tokens/_md-comp-outlined-segmented-button.scss +2 -2
- package/tokens/_md-comp-radio-button.scss +20 -9
- package/tokens/_md-comp-switch.scss +66 -32
- package/tokens/_md-comp-text-button.scss +14 -12
- package/button/internal/tonal-button.js.map +0 -1
- package/button/internal/tonal-styles.css.js +0 -9
- package/button/internal/tonal-styles.css.js.map +0 -1
- package/button/tonal-button.js.map +0 -1
- package/dialog/internal/_tokens.scss +0 -66
- package/icon/internal/_md-comp-icon.scss +0 -18
- package/iconbutton/standard-icon-button.js.map +0 -1
- package/list/internal/listitemlink/list-item-link-only.d.ts +0 -23
- package/list/internal/listitemlink/list-item-link-only.js +0 -36
- package/list/internal/listitemlink/list-item-link-only.js.map +0 -1
- package/list/internal/listitemlink/list-item-link.d.ts +0 -18
- package/list/internal/listitemlink/list-item-link.js +0 -42
- package/list/internal/listitemlink/list-item-link.js.map +0 -1
- package/list/list-item-link.d.ts +0 -53
- package/list/list-item-link.js +0 -57
- package/list/list-item-link.js.map +0 -1
- package/menu/internal/menuitemlink/menu-item-link.d.ts +0 -23
- package/menu/internal/menuitemlink/menu-item-link.js +0 -49
- package/menu/internal/menuitemlink/menu-item-link.js.map +0 -1
- package/menu/menu-item-link.d.ts +0 -33
- package/menu/menu-item-link.js +0 -38
- package/menu/menu-item-link.js.map +0 -1
- /package/button/internal/{tonal-styles.css.d.ts → filled-tonal-styles.css.d.ts} +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { EASING } from '../../internal/motion/animation.js';
|
|
7
|
+
/**
|
|
8
|
+
* The default dialog open animation.
|
|
9
|
+
*/
|
|
10
|
+
export const DIALOG_DEFAULT_OPEN_ANIMATION = {
|
|
11
|
+
dialog: [
|
|
12
|
+
[
|
|
13
|
+
// Dialog slide down
|
|
14
|
+
[{ 'transform': 'translateY(-50px)' }, { 'transform': 'translateY(0)' }],
|
|
15
|
+
{ duration: 500, easing: EASING.EMPHASIZED }
|
|
16
|
+
],
|
|
17
|
+
],
|
|
18
|
+
scrim: [
|
|
19
|
+
[
|
|
20
|
+
// Scrim fade in
|
|
21
|
+
[{ 'opacity': 0 }, { 'opacity': 0.32 }], { duration: 500, easing: 'linear' }
|
|
22
|
+
],
|
|
23
|
+
],
|
|
24
|
+
container: [
|
|
25
|
+
[
|
|
26
|
+
// Container fade in
|
|
27
|
+
[{ 'opacity': 0 }, { 'opacity': 1 }],
|
|
28
|
+
{ duration: 50, easing: 'linear', pseudoElement: '::before' }
|
|
29
|
+
],
|
|
30
|
+
[
|
|
31
|
+
// Container grow
|
|
32
|
+
// Note: current spec says to grow from 0dp->100% and shrink from
|
|
33
|
+
// 100%->35%. We change this to 35%->100% to simplify the animation that
|
|
34
|
+
// is supposed to clip content as it grows. From 0dp it's possible to see
|
|
35
|
+
// text/actions appear before the container has fully grown.
|
|
36
|
+
[{ 'height': '35%' }, { 'height': '100%' }],
|
|
37
|
+
{ duration: 500, easing: EASING.EMPHASIZED, pseudoElement: '::before' },
|
|
38
|
+
],
|
|
39
|
+
],
|
|
40
|
+
headline: [
|
|
41
|
+
[
|
|
42
|
+
// Headline fade in
|
|
43
|
+
[{ 'opacity': 0 }, { 'opacity': 0, offset: 0.2 }, { 'opacity': 1 }],
|
|
44
|
+
{ duration: 250, easing: 'linear', fill: 'forwards' }
|
|
45
|
+
],
|
|
46
|
+
],
|
|
47
|
+
content: [
|
|
48
|
+
[
|
|
49
|
+
// Content fade in
|
|
50
|
+
[{ 'opacity': 0 }, { 'opacity': 0, offset: 0.2 }, { 'opacity': 1 }],
|
|
51
|
+
{ duration: 250, easing: 'linear', fill: 'forwards' }
|
|
52
|
+
],
|
|
53
|
+
],
|
|
54
|
+
actions: [
|
|
55
|
+
[
|
|
56
|
+
// Actions fade in
|
|
57
|
+
[{ 'opacity': 0 }, { 'opacity': 0, offset: 0.5 }, { 'opacity': 1 }],
|
|
58
|
+
{ duration: 300, easing: 'linear', fill: 'forwards' }
|
|
59
|
+
],
|
|
60
|
+
],
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* The default dialog close animation.
|
|
64
|
+
*/
|
|
65
|
+
export const DIALOG_DEFAULT_CLOSE_ANIMATION = {
|
|
66
|
+
dialog: [
|
|
67
|
+
[
|
|
68
|
+
// Dialog slide up
|
|
69
|
+
[{ 'transform': 'translateY(0)' }, { 'transform': 'translateY(-50px)' }],
|
|
70
|
+
{ duration: 150, easing: EASING.EMPHASIZED_ACCELERATE }
|
|
71
|
+
],
|
|
72
|
+
],
|
|
73
|
+
scrim: [
|
|
74
|
+
[
|
|
75
|
+
// Scrim fade out
|
|
76
|
+
[{ 'opacity': 0.32 }, { 'opacity': 0 }], { duration: 150, easing: 'linear' }
|
|
77
|
+
],
|
|
78
|
+
],
|
|
79
|
+
container: [
|
|
80
|
+
[
|
|
81
|
+
// Container shrink
|
|
82
|
+
[{ 'height': '100%' }, { 'height': '35%' }],
|
|
83
|
+
{
|
|
84
|
+
duration: 150,
|
|
85
|
+
easing: EASING.EMPHASIZED_ACCELERATE,
|
|
86
|
+
pseudoElement: '::before',
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
[
|
|
90
|
+
// Container fade out
|
|
91
|
+
[{ 'opacity': '1' }, { 'opacity': '0' }],
|
|
92
|
+
{ delay: 100, duration: 50, easing: 'linear', pseudoElement: '::before' },
|
|
93
|
+
]
|
|
94
|
+
],
|
|
95
|
+
headline: [
|
|
96
|
+
[
|
|
97
|
+
// Headline fade out
|
|
98
|
+
[{ 'opacity': 1 }, { 'opacity': 0 }],
|
|
99
|
+
{ duration: 100, easing: 'linear', fill: 'forwards' }
|
|
100
|
+
],
|
|
101
|
+
],
|
|
102
|
+
content: [
|
|
103
|
+
[
|
|
104
|
+
// Content fade out
|
|
105
|
+
[{ 'opacity': 1 }, { 'opacity': 0 }],
|
|
106
|
+
{ duration: 100, easing: 'linear', fill: 'forwards' }
|
|
107
|
+
],
|
|
108
|
+
],
|
|
109
|
+
actions: [
|
|
110
|
+
[
|
|
111
|
+
// Actions fade out
|
|
112
|
+
[{ 'opacity': 1 }, { 'opacity': 0 }],
|
|
113
|
+
{ duration: 100, easing: 'linear', fill: 'forwards' }
|
|
114
|
+
],
|
|
115
|
+
],
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=animations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animations.js","sourceRoot":"","sources":["animations.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {EASING} from '../../internal/motion/animation.js';\n\n/**\n * A dialog animation's arguments. See `Element.prototype.animate`.\n */\nexport type DialogAnimationArgs = Parameters<Element['animate']>;\n\n/**\n * A collection of dialog animations. Each element of a dialog may have multiple\n * animations.\n */\nexport interface DialogAnimation {\n /**\n * Animations for the dialog itself.\n */\n dialog?: DialogAnimationArgs[];\n\n /**\n * Animations for the scrim backdrop.\n */\n scrim?: DialogAnimationArgs[];\n\n /**\n * Animations for the container of the dialog.\n */\n container?: DialogAnimationArgs[];\n\n /**\n * Animations for the headline section.\n */\n headline?: DialogAnimationArgs[];\n\n /**\n * Animations for the contents section.\n */\n content?: DialogAnimationArgs[];\n /**\n * Animations for the actions section.\n */\n actions?: DialogAnimationArgs[];\n}\n\n/**\n * The default dialog open animation.\n */\nexport const DIALOG_DEFAULT_OPEN_ANIMATION: DialogAnimation = {\n dialog: [\n [\n // Dialog slide down\n [{'transform': 'translateY(-50px)'}, {'transform': 'translateY(0)'}],\n {duration: 500, easing: EASING.EMPHASIZED}\n ],\n ],\n scrim: [\n [\n // Scrim fade in\n [{'opacity': 0}, {'opacity': 0.32}], {duration: 500, easing: 'linear'}\n ],\n ],\n container: [\n [\n // Container fade in\n [{'opacity': 0}, {'opacity': 1}],\n {duration: 50, easing: 'linear', pseudoElement: '::before'}\n ],\n [\n // Container grow\n // Note: current spec says to grow from 0dp->100% and shrink from\n // 100%->35%. We change this to 35%->100% to simplify the animation that\n // is supposed to clip content as it grows. From 0dp it's possible to see\n // text/actions appear before the container has fully grown.\n [{'height': '35%'}, {'height': '100%'}],\n {duration: 500, easing: EASING.EMPHASIZED, pseudoElement: '::before'},\n ],\n ],\n headline: [\n [\n // Headline fade in\n [{'opacity': 0}, {'opacity': 0, offset: 0.2}, {'opacity': 1}],\n {duration: 250, easing: 'linear', fill: 'forwards'}\n ],\n ],\n content: [\n [\n // Content fade in\n [{'opacity': 0}, {'opacity': 0, offset: 0.2}, {'opacity': 1}],\n {duration: 250, easing: 'linear', fill: 'forwards'}\n ],\n ],\n actions: [\n [\n // Actions fade in\n [{'opacity': 0}, {'opacity': 0, offset: 0.5}, {'opacity': 1}],\n {duration: 300, easing: 'linear', fill: 'forwards'}\n ],\n ],\n};\n\n/**\n * The default dialog close animation.\n */\nexport const DIALOG_DEFAULT_CLOSE_ANIMATION: DialogAnimation = {\n dialog: [\n [\n // Dialog slide up\n [{'transform': 'translateY(0)'}, {'transform': 'translateY(-50px)'}],\n {duration: 150, easing: EASING.EMPHASIZED_ACCELERATE}\n ],\n ],\n scrim: [\n [\n // Scrim fade out\n [{'opacity': 0.32}, {'opacity': 0}], {duration: 150, easing: 'linear'}\n ],\n ],\n container: [\n [\n // Container shrink\n [{'height': '100%'}, {'height': '35%'}],\n {\n duration: 150,\n easing: EASING.EMPHASIZED_ACCELERATE,\n pseudoElement: '::before',\n },\n ],\n [\n // Container fade out\n [{'opacity': '1'}, {'opacity': '0'}],\n {delay: 100, duration: 50, easing: 'linear', pseudoElement: '::before'},\n ]\n ],\n headline: [\n [\n // Headline fade out\n [{'opacity': 1}, {'opacity': 0}],\n {duration: 100, easing: 'linear', fill: 'forwards'}\n ],\n ],\n content: [\n [\n // Content fade out\n [{'opacity': 1}, {'opacity': 0}],\n {duration: 100, easing: 'linear', fill: 'forwards'}\n ],\n ],\n actions: [\n [\n // Actions fade out\n [{'opacity': 1}, {'opacity': 0}],\n {duration: 100, easing: 'linear', fill: 'forwards'}\n ],\n ],\n};\n"]}
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { css } from 'lit';
|
|
7
|
-
export const styles = css `:host{--_container-color: var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-
|
|
7
|
+
export const styles = css `:host{--_container-color: var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-shape: var(--md-dialog-container-shape, 28px);--_headline-color: var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));--_headline-type: var(--md-dialog-headline-type, var(--md-sys-typescale-headline-small, 400 1.5rem / 2rem var(--md-ref-typeface-brand, Roboto)));--_supporting-text-color: var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-type: var(--md-dialog-supporting-text-type, 400 0.875rem / 1.25rem var(--md-ref-typeface-plain, Roboto));--_icon-color: var(--md-dialog-icon-color, var(--md-sys-color-secondary, #625b71));--_icon-size: var(--md-dialog-icon-size, 24px);--_container-shape-start-start: var( --md-dialog-container-shape-start-start, var(--_container-shape) );--_container-shape-start-end: var( --md-dialog-container-shape-start-end, var(--_container-shape) );--_container-shape-end-end: var( --md-dialog-container-shape-end-end, var(--_container-shape) );--_container-shape-end-start: var( --md-dialog-container-shape-end-start, var(--_container-shape) );border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start);display:contents;margin:auto;max-height:min(560px,100% - 48px);max-width:min(560px,100% - 48px);min-height:140px;min-width:280px;position:fixed;height:fit-content;width:fit-content}dialog{background:rgba(0,0,0,0);border:none;border-radius:inherit;flex-direction:column;height:inherit;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;outline:none;overflow:visible;padding:0;width:inherit}dialog[open]{display:flex}::backdrop{background:none}.scrim{background:var(--md-sys-color-scrim, #000);display:none;inset:0;opacity:32%;pointer-events:none;position:fixed;z-index:1}:host([open]) .scrim{display:flex}h2{all:unset;align-self:stretch}.headline{align-items:center;color:var(--_headline-color);display:flex;flex-direction:column;font:var(--_headline-type);position:relative}slot[name=headline]::slotted(*){align-items:center;align-self:stretch;display:flex;gap:8px;margin:24px 24px 0}.icon{display:flex}slot[name=icon]::slotted(*){color:var(--_icon-color);fill:currentColor;font-size:var(--_icon-size);margin-top:24px;height:var(--_icon-size);width:var(--_icon-size)}.has-icon slot[name=headline]::slotted(*){justify-content:center;margin-top:16px}.scrollable slot[name=headline]::slotted(*){margin-bottom:16px}.scrollable.has-headline slot[name=content]::slotted(*){margin-top:8px}.container{border-radius:inherit;display:flex;flex:1;flex-direction:column;overflow:hidden;position:relative;transform-origin:top}.container::before{background:var(--_container-color);content:"";inset:0;position:absolute}.scroller{flex:1;overflow:hidden;z-index:0}.scrollable .scroller{overflow-y:scroll}.content{color:var(--_supporting-text-color);font:var(--_supporting-text-type);position:relative}slot[name=content]::slotted(*){margin:24px}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}.actions{position:relative}slot[name=actions]::slotted(*){display:flex;gap:8px;justify-content:flex-end;margin:16px 24px 24px}.has-actions slot[name=content]::slotted(*){margin-bottom:8px}md-divider{display:none;position:absolute}.has-headline.show-top-divider .headline md-divider,.has-actions.show-bottom-divider .actions md-divider{display:flex}.headline md-divider{bottom:0}.actions md-divider{top:0}@media(forced-colors: active){dialog{outline:2px solid WindowText}}/*# sourceMappingURL=dialog-styles.css.map */
|
|
8
8
|
`;
|
|
9
9
|
//# sourceMappingURL=dialog-styles.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-styles.css.js","sourceRoot":"","sources":["dialog-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{--_container-color: var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-
|
|
1
|
+
{"version":3,"file":"dialog-styles.css.js","sourceRoot":"","sources":["dialog-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{--_container-color: var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-shape: var(--md-dialog-container-shape, 28px);--_headline-color: var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));--_headline-type: var(--md-dialog-headline-type, var(--md-sys-typescale-headline-small, 400 1.5rem / 2rem var(--md-ref-typeface-brand, Roboto)));--_supporting-text-color: var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-type: var(--md-dialog-supporting-text-type, 400 0.875rem / 1.25rem var(--md-ref-typeface-plain, Roboto));--_icon-color: var(--md-dialog-icon-color, var(--md-sys-color-secondary, #625b71));--_icon-size: var(--md-dialog-icon-size, 24px);--_container-shape-start-start: var( --md-dialog-container-shape-start-start, var(--_container-shape) );--_container-shape-start-end: var( --md-dialog-container-shape-start-end, var(--_container-shape) );--_container-shape-end-end: var( --md-dialog-container-shape-end-end, var(--_container-shape) );--_container-shape-end-start: var( --md-dialog-container-shape-end-start, var(--_container-shape) );border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start);display:contents;margin:auto;max-height:min(560px,100% - 48px);max-width:min(560px,100% - 48px);min-height:140px;min-width:280px;position:fixed;height:fit-content;width:fit-content}dialog{background:rgba(0,0,0,0);border:none;border-radius:inherit;flex-direction:column;height:inherit;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;outline:none;overflow:visible;padding:0;width:inherit}dialog[open]{display:flex}::backdrop{background:none}.scrim{background:var(--md-sys-color-scrim, #000);display:none;inset:0;opacity:32%;pointer-events:none;position:fixed;z-index:1}:host([open]) .scrim{display:flex}h2{all:unset;align-self:stretch}.headline{align-items:center;color:var(--_headline-color);display:flex;flex-direction:column;font:var(--_headline-type);position:relative}slot[name=headline]::slotted(*){align-items:center;align-self:stretch;display:flex;gap:8px;margin:24px 24px 0}.icon{display:flex}slot[name=icon]::slotted(*){color:var(--_icon-color);fill:currentColor;font-size:var(--_icon-size);margin-top:24px;height:var(--_icon-size);width:var(--_icon-size)}.has-icon slot[name=headline]::slotted(*){justify-content:center;margin-top:16px}.scrollable slot[name=headline]::slotted(*){margin-bottom:16px}.scrollable.has-headline slot[name=content]::slotted(*){margin-top:8px}.container{border-radius:inherit;display:flex;flex:1;flex-direction:column;overflow:hidden;position:relative;transform-origin:top}.container::before{background:var(--_container-color);content:\"\";inset:0;position:absolute}.scroller{flex:1;overflow:hidden;z-index:0}.scrollable .scroller{overflow-y:scroll}.content{color:var(--_supporting-text-color);font:var(--_supporting-text-type);position:relative}slot[name=content]::slotted(*){margin:24px}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}.actions{position:relative}slot[name=actions]::slotted(*){display:flex;gap:8px;justify-content:flex-end;margin:16px 24px 24px}.has-actions slot[name=content]::slotted(*){margin-bottom:8px}md-divider{display:none;position:absolute}.has-headline.show-top-divider .headline md-divider,.has-actions.show-bottom-divider .actions md-divider{display:flex}.headline md-divider{bottom:0}.actions md-divider{top:0}@media(forced-colors: active){dialog{outline:2px solid WindowText}}/*# sourceMappingURL=dialog-styles.css.map */\n`;\n "]}
|
|
@@ -3,194 +3,101 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import '../../
|
|
7
|
-
import { LitElement
|
|
8
|
-
|
|
9
|
-
* Default close action.
|
|
10
|
-
*/
|
|
11
|
-
export declare const CLOSE_ACTION = "close";
|
|
6
|
+
import '../../divider/divider.js';
|
|
7
|
+
import { LitElement } from 'lit';
|
|
8
|
+
import { DialogAnimation } from './animations.js';
|
|
12
9
|
/**
|
|
13
10
|
* A dialog component.
|
|
14
11
|
*
|
|
15
|
-
* @fires
|
|
12
|
+
* @fires open Dispatched when the dialog is opening before any animations.
|
|
16
13
|
* @fires opened Dispatched when the dialog has opened after any animations.
|
|
17
|
-
* @fires
|
|
14
|
+
* @fires close Dispatched when the dialog is closing before any animations.
|
|
18
15
|
* @fires closed Dispatched when the dialog has closed after any animations.
|
|
19
|
-
* @fires cancel
|
|
16
|
+
* @fires cancel Dispatched when the dialog has been canceled by clicking on the
|
|
17
|
+
* scrim or pressing Escape.
|
|
20
18
|
*/
|
|
21
19
|
export declare class Dialog extends LitElement {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
static shadowRootOptions: {
|
|
21
|
+
delegatesFocus: boolean;
|
|
22
|
+
mode: ShadowRootMode;
|
|
23
|
+
slotAssignment?: SlotAssignmentMode;
|
|
24
|
+
};
|
|
25
25
|
/**
|
|
26
26
|
* Opens the dialog when set to `true` and closes it when set to `false`.
|
|
27
27
|
*/
|
|
28
|
-
open: boolean;
|
|
29
|
-
|
|
30
|
-
* Setting fullscreen displays the dialog fullscreen on small screens.
|
|
31
|
-
* This can be customized via the `fullscreenBreakpoint` property.
|
|
32
|
-
* When showing fullscreen, the header will take up less vertical space, and
|
|
33
|
-
* the dialog will have a `showing-fullscreen`attribute, allowing content to
|
|
34
|
-
* be styled in this state.
|
|
35
|
-
*
|
|
36
|
-
* Dialogs can be sized by setting:
|
|
37
|
-
*
|
|
38
|
-
* * --md-dialog-container-min-block-size
|
|
39
|
-
* * --md-dialog-container-max-block-size
|
|
40
|
-
* * --md-dialog-container-min-inline-size
|
|
41
|
-
* * --md-dialog-container-max-inline-size
|
|
42
|
-
*
|
|
43
|
-
* These are typically configured via media queries and are independent of the
|
|
44
|
-
* fullscreen setting.
|
|
45
|
-
*/
|
|
46
|
-
fullscreen: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* A media query string specifying the breakpoint at which the dialog
|
|
49
|
-
* should be shown fullscreen. Note, this only applies when the `fullscreen`
|
|
50
|
-
* property is set.
|
|
51
|
-
*
|
|
52
|
-
* By default, the dialog is shown fullscreen on screens less than 600px wide
|
|
53
|
-
* or 400px tall.
|
|
54
|
-
*/
|
|
55
|
-
fullscreenBreakpoint: string;
|
|
56
|
-
/**
|
|
57
|
-
* Hides the dialog footer, making any content slotted into the footer
|
|
58
|
-
* inaccessible.
|
|
59
|
-
*/
|
|
60
|
-
footerHidden: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Renders footer content in a vertically stacked alignment rather than the
|
|
63
|
-
* normal horizontal alignment.
|
|
64
|
-
*/
|
|
65
|
-
stacked: boolean;
|
|
28
|
+
get open(): boolean;
|
|
29
|
+
set open(open: boolean);
|
|
66
30
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* the value of this property. Specific actions have explicit values but when
|
|
70
|
-
* a value is not specified, the default is used. For example, clicking the
|
|
71
|
-
* scrim, pressing escape, or clicking a button with an action attribute set
|
|
72
|
-
* produce an explicit action.
|
|
31
|
+
* Gets or sets the dialog's return value, usually to indicate which button
|
|
32
|
+
* a user pressed to close it.
|
|
73
33
|
*
|
|
74
|
-
*
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* The
|
|
79
|
-
*
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
34
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/returnValue
|
|
35
|
+
*/
|
|
36
|
+
returnValue: string;
|
|
37
|
+
/**
|
|
38
|
+
* The type of dialog for accessibility. Set this to `alert` to announce a
|
|
39
|
+
* dialog as an alert dialog.
|
|
40
|
+
*/
|
|
41
|
+
type?: 'alert';
|
|
42
|
+
/**
|
|
43
|
+
* Gets the opening animation for a dialog. Set to a new function to customize
|
|
44
|
+
* the animation.
|
|
45
|
+
*/
|
|
46
|
+
getOpenAnimation: () => DialogAnimation;
|
|
47
|
+
/**
|
|
48
|
+
* Gets the closing animation for a dialog. Set to a new function to customize
|
|
49
|
+
* the animation.
|
|
50
|
+
*/
|
|
51
|
+
getCloseAnimation: () => DialogAnimation;
|
|
52
|
+
private isOpen;
|
|
53
|
+
private readonly dialog;
|
|
54
|
+
private readonly scrim;
|
|
55
|
+
private readonly container;
|
|
56
|
+
private readonly headline;
|
|
57
|
+
private readonly content;
|
|
58
|
+
private readonly actions;
|
|
59
|
+
private isAtScrollTop;
|
|
60
|
+
private isAtScrollBottom;
|
|
61
|
+
private readonly scroller;
|
|
62
|
+
private readonly topAnchor;
|
|
63
|
+
private readonly bottomAnchor;
|
|
64
|
+
private nextClickIsFromContent;
|
|
65
|
+
private intersectionObserver?;
|
|
66
|
+
private hasHeadline;
|
|
67
|
+
private hasActions;
|
|
68
|
+
private hasIcon;
|
|
69
|
+
constructor();
|
|
70
|
+
/**
|
|
71
|
+
* Opens the dialog and fires a cancelable `open` event. After a dialog's
|
|
72
|
+
* animation, an `opened` event is fired.
|
|
83
73
|
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* <md-filled-button slot="footer" dialog-action="buy">
|
|
87
|
-
* Buy
|
|
88
|
-
* </md-filled-button>
|
|
89
|
-
* </md-dialog>
|
|
90
|
-
*/
|
|
91
|
-
actionAttribute: string;
|
|
92
|
-
/**
|
|
93
|
-
* When the dialog is opened, it will focus the first element which has
|
|
94
|
-
* an attribute name matching this property. The default value is
|
|
95
|
-
* `dialogFocus`. For example:
|
|
74
|
+
* Add an `autocomplete` attribute to a child of the dialog that should
|
|
75
|
+
* receive focus after opening.
|
|
96
76
|
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* label="Enter some text"
|
|
100
|
-
* dialog-focus
|
|
101
|
-
* >
|
|
102
|
-
* </md-filled-text-field>
|
|
103
|
-
* </md-dialog>
|
|
77
|
+
* @return A Promise that resolves after the animation is finished and the
|
|
78
|
+
* `opened` event was fired.
|
|
104
79
|
*/
|
|
105
|
-
|
|
80
|
+
show(): Promise<void>;
|
|
106
81
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* which is the value of this property and defaults to `close`.
|
|
110
|
-
*/
|
|
111
|
-
scrimClickAction: string;
|
|
112
|
-
/**
|
|
113
|
-
* Pressing the `escape` key while the dialog is open closes the dialog.
|
|
114
|
-
* The `closing` and `closed` events this produces have an `action` property
|
|
115
|
-
* which is the value of this property and defaults to `close`.
|
|
116
|
-
*/
|
|
117
|
-
escapeKeyAction: string;
|
|
118
|
-
/**
|
|
119
|
-
* When opened, the dialog is displayed modeless or non-modal. This
|
|
120
|
-
* allows users to interact with content outside the dialog without
|
|
121
|
-
* closing the dialog and does not display the scrim around the dialog.
|
|
122
|
-
*/
|
|
123
|
-
modeless: boolean;
|
|
124
|
-
/**
|
|
125
|
-
* Set to make the dialog position draggable.
|
|
126
|
-
*/
|
|
127
|
-
draggable: boolean;
|
|
128
|
-
private readonly throttle;
|
|
129
|
-
private readonly dialogElement;
|
|
130
|
-
private readonly footerSlot;
|
|
131
|
-
private readonly contentSlot;
|
|
132
|
-
private readonly contentElement;
|
|
133
|
-
private readonly containerElement;
|
|
134
|
-
private readonly headerElement;
|
|
135
|
-
/**
|
|
136
|
-
* Private properties that reflect for styling manually in `updated`.
|
|
137
|
-
*/
|
|
138
|
-
private showingFullscreen;
|
|
139
|
-
private showingOpen;
|
|
140
|
-
private opening;
|
|
141
|
-
private closing;
|
|
142
|
-
/**
|
|
143
|
-
* Transition kind. Supported options include: grow, shrink, grow-down,
|
|
144
|
-
* grow-up, grow-left, and grow-right.
|
|
82
|
+
* Closes the dialog and fires a cancelable `close` event. After a dialog's
|
|
83
|
+
* animation, a `closed` event is fired.
|
|
145
84
|
*
|
|
146
|
-
*
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
private readonly dragMargin;
|
|
152
|
-
private dragInfo?;
|
|
153
|
-
/**
|
|
154
|
-
* Opens and shows the dialog. This is equivalent to setting the `open`
|
|
155
|
-
* property to true.
|
|
156
|
-
*/
|
|
157
|
-
show(): void;
|
|
158
|
-
/**
|
|
159
|
-
* Closes the dialog. This is equivalent to setting the `open`
|
|
160
|
-
* property to false.
|
|
85
|
+
* @param returnValue A return value usually indicating which button was used
|
|
86
|
+
* to close a dialog. If a dialog is canceled by clicking the scrim or
|
|
87
|
+
* pressing Escape, it will not change the return value after closing.
|
|
88
|
+
* @return A Promise that resolves after the animation is finished and the
|
|
89
|
+
* `closed` event was fired.
|
|
161
90
|
*/
|
|
162
|
-
close(
|
|
163
|
-
/**
|
|
164
|
-
* Opens and shows the dialog if it is closed; otherwise closes it.
|
|
165
|
-
*/
|
|
166
|
-
toggleShow(): void;
|
|
167
|
-
private getContentScrollInfo;
|
|
91
|
+
close(returnValue?: string): Promise<void>;
|
|
168
92
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
169
|
-
protected willUpdate(changed: PropertyValues): void;
|
|
170
93
|
protected firstUpdated(): void;
|
|
171
|
-
protected updated(changed: PropertyValues): void;
|
|
172
|
-
/**
|
|
173
|
-
* Internal state is reflected here as attributes to effect styling. This
|
|
174
|
-
* could be done via internal classes, but it's published on the host
|
|
175
|
-
* to facilitate the (currently undocumented) possibility of customizing
|
|
176
|
-
* styling of user content based on these states.
|
|
177
|
-
* Note, in the future this could be done with `:state(...)` when browser
|
|
178
|
-
* support improves.
|
|
179
|
-
*/
|
|
180
|
-
private reflectStateProp;
|
|
181
|
-
private dialogClosedResolver?;
|
|
182
|
-
private performTransition;
|
|
183
|
-
private dispatchActionEvent;
|
|
184
|
-
private fullscreenQuery?;
|
|
185
|
-
private fullscreenQueryListener;
|
|
186
|
-
private updateFullscreen;
|
|
187
|
-
private handleDialogDismiss;
|
|
188
94
|
private handleDialogClick;
|
|
189
|
-
private
|
|
190
|
-
private
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
private
|
|
194
|
-
private
|
|
195
|
-
private
|
|
95
|
+
private handleContentClick;
|
|
96
|
+
private handleSubmit;
|
|
97
|
+
private handleCancel;
|
|
98
|
+
private animateDialog;
|
|
99
|
+
private handleHeadlineChange;
|
|
100
|
+
private handleActionsChange;
|
|
101
|
+
private handleIconChange;
|
|
102
|
+
private handleAnchorIntersection;
|
|
196
103
|
}
|