@shortfuse/materialdesignweb 0.5.0 → 0.7.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/README.md +155 -77
- package/bin/generate-css.js +12 -0
- package/components/Badge.css +30 -0
- package/components/Badge.js +15 -0
- package/components/Body.css +14 -0
- package/components/Body.js +7 -0
- package/components/BottomAppBar.css +23 -0
- package/components/BottomAppBar.js +25 -0
- package/components/Box.css +31 -0
- package/components/Box.js +24 -0
- package/components/Button.css +146 -0
- package/components/Button.js +95 -0
- package/components/Button.md +61 -0
- package/components/Card.css +109 -0
- package/components/Card.js +82 -0
- package/components/Checkbox.css +77 -0
- package/components/Checkbox.js +59 -0
- package/components/CheckboxIcon.css +89 -0
- package/components/CheckboxIcon.js +41 -0
- package/components/Chip.css +35 -0
- package/components/Chip.js +22 -0
- package/components/Dialog.css +235 -0
- package/components/Dialog.js +327 -0
- package/components/DialogActions.js +13 -0
- package/components/Divider.css +41 -0
- package/components/Divider.js +13 -0
- package/components/ExtendedFab.css +24 -0
- package/components/ExtendedFab.js +11 -0
- package/components/Fab.css +23 -0
- package/components/Fab.js +26 -0
- package/components/FilterChip.css +80 -0
- package/components/FilterChip.js +51 -0
- package/components/Headline.css +14 -0
- package/components/Headline.js +33 -0
- package/components/Icon.css +76 -0
- package/components/Icon.js +174 -0
- package/components/IconButton.css +151 -0
- package/components/IconButton.js +65 -0
- package/components/Input.js +16 -0
- package/components/Label.css +14 -0
- package/components/Label.js +7 -0
- package/components/Layout.css +19 -0
- package/components/Layout.js +12 -0
- package/components/List.css +12 -0
- package/components/List.js +17 -0
- package/components/ListItem.css +224 -0
- package/components/ListItem.js +112 -0
- package/components/ListOption.css +34 -0
- package/components/ListOption.js +122 -0
- package/components/ListSelect.css +9 -0
- package/components/ListSelect.js +206 -0
- package/components/Menu.css +171 -0
- package/components/Menu.js +470 -0
- package/components/MenuItem.css +53 -0
- package/components/MenuItem.js +215 -0
- package/components/Nav.css +17 -0
- package/components/Nav.js +23 -0
- package/components/NavBar.css +34 -0
- package/components/NavBar.js +88 -0
- package/components/NavBarItem.css +41 -0
- package/components/NavBarItem.js +7 -0
- package/components/NavDrawer.css +31 -0
- package/components/NavDrawer.js +13 -0
- package/components/NavDrawerItem.css +42 -0
- package/components/NavDrawerItem.js +12 -0
- package/components/NavItem.css +181 -0
- package/components/NavItem.js +83 -0
- package/components/NavRail.css +47 -0
- package/components/NavRail.js +17 -0
- package/components/NavRailItem.css +25 -0
- package/components/NavRailItem.js +7 -0
- package/components/Option.js +91 -0
- package/components/Outline.css +138 -0
- package/components/Pane.css +261 -0
- package/components/Pane.js +21 -0
- package/components/Progress.css +74 -0
- package/components/Progress.js +67 -0
- package/components/ProgressCircle.css +226 -0
- package/components/ProgressLine.css +155 -0
- package/components/Radio.css +83 -0
- package/components/Radio.js +42 -0
- package/components/RadioIcon.css +73 -0
- package/components/RadioIcon.js +37 -0
- package/components/Ripple.css +74 -0
- package/components/Ripple.js +114 -0
- package/components/SegmentedButton.css +94 -0
- package/components/SegmentedButton.js +49 -0
- package/components/SegmentedButtonGroup.css +12 -0
- package/components/SegmentedButtonGroup.js +44 -0
- package/components/Select.css +52 -0
- package/components/Select.js +71 -0
- package/components/Shape.css +132 -0
- package/components/Shape.js +25 -0
- package/components/Slider.css +306 -0
- package/components/Slider.js +206 -0
- package/components/Snackbar.css +80 -0
- package/components/Snackbar.js +75 -0
- package/components/Surface.css +10 -0
- package/components/Surface.js +23 -0
- package/components/Switch.css +63 -0
- package/components/Switch.js +127 -0
- package/components/SwitchIcon.css +177 -0
- package/components/SwitchIcon.js +89 -0
- package/components/SwitchIconAnimations.css +89 -0
- package/components/Tab.css +85 -0
- package/components/Tab.js +103 -0
- package/components/TabContent.js +151 -0
- package/components/TabList.css +129 -0
- package/components/TabList.js +309 -0
- package/components/TabPanel.js +37 -0
- package/components/TextArea.css +93 -0
- package/components/TextArea.js +229 -0
- package/components/Title.css +14 -0
- package/components/Title.js +15 -0
- package/components/Tooltip.css +40 -0
- package/components/Tooltip.js +22 -0
- package/components/TopAppBar.css +209 -0
- package/components/TopAppBar.js +201 -0
- package/core/Composition.js +988 -0
- package/core/CustomElement.js +844 -0
- package/core/ICustomElement.d.ts +288 -0
- package/core/ICustomElement.js +1 -0
- package/core/css.js +51 -0
- package/core/customTypes.js +125 -0
- package/core/dom.js +56 -154
- package/core/identify.js +40 -0
- package/core/observe.js +410 -0
- package/core/template.js +121 -0
- package/core/typings.d.ts +135 -0
- package/core/typings.js +1 -0
- package/mixins/AriaReflectorMixin.js +42 -0
- package/mixins/AriaToolbarMixin.js +13 -0
- package/mixins/ControlMixin.css +57 -0
- package/mixins/ControlMixin.js +212 -0
- package/mixins/DensityMixin.css +40 -0
- package/mixins/DensityMixin.js +11 -0
- package/mixins/FlexableMixin.css +79 -0
- package/mixins/FlexableMixin.js +32 -0
- package/mixins/FormAssociatedMixin.js +170 -0
- package/mixins/InputMixin.js +335 -0
- package/mixins/KeyboardNavMixin.js +244 -0
- package/mixins/RTLObserverMixin.js +35 -0
- package/mixins/ResizeObserverMixin.js +38 -0
- package/mixins/RippleMixin.css +12 -0
- package/mixins/RippleMixin.js +115 -0
- package/mixins/ScrollListenerMixin.js +100 -0
- package/mixins/ShapeMixin.css +135 -0
- package/mixins/ShapeMixin.js +31 -0
- package/mixins/StateMixin.css +82 -0
- package/mixins/StateMixin.js +114 -0
- package/mixins/SurfaceMixin.css +150 -0
- package/mixins/SurfaceMixin.js +32 -0
- package/mixins/TextFieldMixin.css +657 -0
- package/mixins/TextFieldMixin.js +121 -0
- package/mixins/ThemableMixin.css +204 -0
- package/mixins/ThemableMixin.js +16 -0
- package/mixins/TooltipTriggerMixin.css +27 -0
- package/mixins/TooltipTriggerMixin.js +366 -0
- package/mixins/TouchTargetMixin.css +26 -0
- package/mixins/TouchTargetMixin.js +9 -0
- package/package.json +54 -49
- package/theming/index.js +594 -0
- package/theming/loader.js +24 -0
- package/utils/cli.js +11 -0
- package/utils/color_keywords.js +151 -0
- package/utils/hct/Cam16.js +298 -0
- package/utils/hct/CorePalette.js +84 -0
- package/utils/hct/Hct.js +172 -0
- package/utils/hct/Scheme.js +587 -0
- package/utils/hct/TonalPalette.js +68 -0
- package/utils/hct/ViewingConditions.js +136 -0
- package/utils/hct/blend.js +93 -0
- package/utils/hct/colorUtils.js +302 -0
- package/utils/hct/hctSolver.js +559 -0
- package/utils/hct/helper.js +182 -0
- package/utils/hct/mathUtils.js +153 -0
- package/utils/jsonMergePatch.js +100 -0
- package/utils/jsx-runtime.js +101 -0
- package/utils/popup.js +117 -0
- package/utils/svg.js +129 -0
- package/.browserslistrc +0 -4
- package/.eslintrc.json +0 -204
- package/.stylelintrc.json +0 -645
- package/.vscode/launch.json +0 -31
- package/.vscode/settings.json +0 -3
- package/.vscode/tasks.json +0 -32
- package/CHANGELOG.md +0 -36
- package/CODE_OF_CONDUCT.md +0 -46
- package/adapters/datatable/column.js +0 -176
- package/adapters/datatable/index.js +0 -960
- package/adapters/dom/index.js +0 -586
- package/adapters/list/index.js +0 -69
- package/adapters/search/index.js +0 -495
- package/components/appbar/_spec.scss +0 -165
- package/components/appbar/_theme.scss +0 -0
- package/components/appbar/index.scss +0 -2
- package/components/banner/_spec.scss +0 -83
- package/components/banner/_theme.scss +0 -0
- package/components/banner/index.scss +0 -2
- package/components/bottomnav/README.md +0 -85
- package/components/bottomnav/_spec.scss +0 -149
- package/components/bottomnav/_theme.scss +0 -0
- package/components/bottomnav/index.js +0 -117
- package/components/bottomnav/index.scss +0 -2
- package/components/bottomnav/item.js +0 -88
- package/components/button/README.md +0 -61
- package/components/button/_spec.scss +0 -162
- package/components/button/_theme.scss +0 -42
- package/components/button/index.eta +0 -32
- package/components/button/index.js +0 -43
- package/components/button/index.pug +0 -18
- package/components/button/index.scss +0 -2
- package/components/card/_spec.scss +0 -241
- package/components/card/_theme.scss +0 -0
- package/components/card/index.scss +0 -2
- package/components/chip/_spec.scss +0 -111
- package/components/chip/_theme.scss +0 -105
- package/components/chip/index.js +0 -23
- package/components/chip/index.scss +0 -2
- package/components/chip/item.js +0 -20
- package/components/datatable/_spec.scss +0 -225
- package/components/datatable/_theme.scss +0 -128
- package/components/datatable/cell.js +0 -44
- package/components/datatable/columnheader.js +0 -46
- package/components/datatable/index.js +0 -374
- package/components/datatable/index.scss +0 -2
- package/components/datatable/row.js +0 -48
- package/components/datatable/rowheader.js +0 -18
- package/components/dialog/_spec.scss +0 -203
- package/components/dialog/_theme.scss +0 -7
- package/components/dialog/index.js +0 -601
- package/components/dialog/index.scss +0 -2
- package/components/divider/_spec.scss +0 -11
- package/components/divider/_theme.scss +0 -0
- package/components/divider/index.scss +0 -2
- package/components/elevation/_spec.scss +0 -9
- package/components/elevation/_theme.scss +0 -0
- package/components/elevation/index.scss +0 -2
- package/components/fab/_spec.scss +0 -210
- package/components/fab/_theme.scss +0 -0
- package/components/fab/index.js +0 -99
- package/components/fab/index.scss +0 -2
- package/components/grid/_spec.scss +0 -169
- package/components/grid/_theme.scss +0 -0
- package/components/grid/index.scss +0 -2
- package/components/layout/_mixins.scss +0 -11
- package/components/layout/_spec.scss +0 -916
- package/components/layout/_theme.scss +0 -19
- package/components/layout/index.js +0 -454
- package/components/layout/index.scss +0 -2
- package/components/list/_spec.scss +0 -363
- package/components/list/_theme.scss +0 -102
- package/components/list/content.js +0 -106
- package/components/list/index.js +0 -256
- package/components/list/index.scss +0 -2
- package/components/list/item.js +0 -167
- package/components/list/secondary.js +0 -45
- package/components/menu/_spec.scss +0 -329
- package/components/menu/_theme.scss +0 -0
- package/components/menu/index.js +0 -705
- package/components/menu/index.scss +0 -2
- package/components/menu/item.js +0 -231
- package/components/progress/_spec.scss +0 -156
- package/components/progress/_theme.scss +0 -0
- package/components/progress/index.js +0 -36
- package/components/progress/index.scss +0 -2
- package/components/selection/_spec.scss +0 -376
- package/components/selection/_theme.scss +0 -134
- package/components/selection/index.eta +0 -60
- package/components/selection/index.js +0 -70
- package/components/selection/index.pug +0 -30
- package/components/selection/index.scss +0 -2
- package/components/selection/input.js +0 -54
- package/components/selection/radiogroup.js +0 -40
- package/components/slider/_spec.scss +0 -59
- package/components/slider/_theme.scss +0 -0
- package/components/slider/index.scss +0 -2
- package/components/snackbar/_spec.scss +0 -150
- package/components/snackbar/_theme.scss +0 -0
- package/components/snackbar/index.js +0 -338
- package/components/snackbar/index.scss +0 -2
- package/components/tab/_spec.scss +0 -220
- package/components/tab/_theme.scss +0 -0
- package/components/tab/content.js +0 -210
- package/components/tab/index.js +0 -257
- package/components/tab/index.scss +0 -2
- package/components/tab/item.js +0 -88
- package/components/tab/list.js +0 -196
- package/components/tab/panel.js +0 -54
- package/components/textfield/README.md +0 -179
- package/components/textfield/_spec.scss +0 -763
- package/components/textfield/_theme.scss +0 -264
- package/components/textfield/index.eta +0 -74
- package/components/textfield/index.js +0 -160
- package/components/textfield/index.pug +0 -30
- package/components/textfield/index.scss +0 -2
- package/components/tooltip/_spec.scss +0 -185
- package/components/tooltip/_theme.scss +0 -0
- package/components/tooltip/index.scss +0 -2
- package/components/type/_spec.scss +0 -227
- package/components/type/_theme.scss +0 -0
- package/components/type/index.scss +0 -2
- package/core/_breakpoint.scss +0 -189
- package/core/_elevation.scss +0 -78
- package/core/_length.scss +0 -8
- package/core/_motion.scss +0 -31
- package/core/_platform.scss +0 -12
- package/core/_type.scss +0 -128
- package/core/aria/attributes.js +0 -141
- package/core/aria/button.js +0 -49
- package/core/aria/keyboard.js +0 -92
- package/core/aria/rovingtabindex.js +0 -175
- package/core/aria/tab.js +0 -59
- package/core/document/index.js +0 -39
- package/core/overlay/_spec.scss +0 -28
- package/core/overlay/_theme.scss +0 -147
- package/core/overlay/index.js +0 -95
- package/core/overlay/index.scss +0 -2
- package/core/ripple/_spec.scss +0 -196
- package/core/ripple/_theme.scss +0 -20
- package/core/ripple/index.js +0 -286
- package/core/ripple/index.scss +0 -2
- package/core/theme/_aliases.scss +0 -15
- package/core/theme/_config.scss +0 -8
- package/core/theme/_functions.scss +0 -22
- package/core/theme/_palettes.scss +0 -405
- package/core/theme/_spec.scss +0 -0
- package/core/theme/_theme.scss +0 -268
- package/core/theme/index.js +0 -50
- package/core/theme/index.scss +0 -4
- package/core/throttler.js +0 -42
- package/core/transition/index.js +0 -465
- package/docs/_flex.scss +0 -28
- package/docs/_menuoptions.js +0 -183
- package/docs/_partials/_androidnavbar.eta +0 -5
- package/docs/_partials/_androidstatusbar.eta +0 -13
- package/docs/_partials/_appbar.eta +0 -27
- package/docs/_partials/_buttontest.eta +0 -31
- package/docs/_partials/_header.eta +0 -146
- package/docs/_partials/_navlistitem.eta +0 -16
- package/docs/_partials/_target.eta +0 -1
- package/docs/_sample-utils.js +0 -88
- package/docs/_storage.js +0 -33
- package/docs/docs.scss +0 -331
- package/docs/framework.scss +0 -26
- package/docs/index.eta +0 -12
- package/docs/index.js +0 -7
- package/docs/pages/appbar.eta +0 -108
- package/docs/pages/appbar.js +0 -0
- package/docs/pages/bottomnav.eta +0 -188
- package/docs/pages/bottomnav.js +0 -118
- package/docs/pages/button.eta +0 -124
- package/docs/pages/button.js +0 -224
- package/docs/pages/card.eta +0 -90
- package/docs/pages/card.js +0 -175
- package/docs/pages/chip.eta +0 -122
- package/docs/pages/chip.js +0 -80
- package/docs/pages/color.eta +0 -143
- package/docs/pages/color.js +0 -261
- package/docs/pages/datatable.eta +0 -323
- package/docs/pages/datatable.js +0 -160
- package/docs/pages/dialog.eta +0 -184
- package/docs/pages/dialog.js +0 -174
- package/docs/pages/dom.eta +0 -26
- package/docs/pages/dom.js +0 -140
- package/docs/pages/elevation.eta +0 -35
- package/docs/pages/elevation.js +0 -0
- package/docs/pages/fab.eta +0 -99
- package/docs/pages/fab.js +0 -43
- package/docs/pages/grid.eta +0 -135
- package/docs/pages/grid.js +0 -128
- package/docs/pages/layout.eta +0 -8
- package/docs/pages/layout.js +0 -0
- package/docs/pages/list.eta +0 -465
- package/docs/pages/list.js +0 -8
- package/docs/pages/menu.eta +0 -274
- package/docs/pages/menu.js +0 -213
- package/docs/pages/overlay.eta +0 -69
- package/docs/pages/overlay.js +0 -3
- package/docs/pages/progress.eta +0 -23
- package/docs/pages/progress.js +0 -12
- package/docs/pages/ripple.eta +0 -27
- package/docs/pages/ripple.js +0 -3
- package/docs/pages/search.eta +0 -242
- package/docs/pages/search.js +0 -226
- package/docs/pages/selection.eta +0 -107
- package/docs/pages/selection.js +0 -12
- package/docs/pages/slider.eta +0 -23
- package/docs/pages/slider.js +0 -0
- package/docs/pages/snackbar.eta +0 -83
- package/docs/pages/snackbar.js +0 -157
- package/docs/pages/tab.eta +0 -407
- package/docs/pages/tab.js +0 -152
- package/docs/pages/textfield.eta +0 -487
- package/docs/pages/textfield.js +0 -257
- package/docs/pages/tooltip.eta +0 -92
- package/docs/pages/tooltip.js +0 -0
- package/docs/pages/transition.eta +0 -117
- package/docs/pages/transition.js +0 -52
- package/docs/pages/type.eta +0 -31
- package/docs/pages/type.js +0 -0
- package/docs/postrender.js +0 -41
- package/docs/prerender.js +0 -16
- package/docs/pwa/_dialogs.eta +0 -143
- package/docs/pwa/_menus.eta +0 -16
- package/docs/pwa/pwa-prerender.js +0 -3
- package/docs/pwa/pwa.eta +0 -478
- package/docs/pwa/pwa.js +0 -298
- package/docs/pwa/pwa.scss +0 -31
- package/docs/themes/theme-colored.scss +0 -15
- package/docs/themes/theme-default.scss +0 -3
- package/index.scss +0 -27
- package/jsconfig.json +0 -16
- package/scripts/deploy-docs.sh +0 -9
- package/templates/index.eta +0 -2
- package/templates/index.pug +0 -3
- package/tsconfig.json +0 -16
- package/webpack.config.js +0 -304
|
@@ -1,374 +0,0 @@
|
|
|
1
|
-
// https://www.w3.org/TR/wai-aria-practices/#grid
|
|
2
|
-
|
|
3
|
-
import * as Keyboard from '../../core/aria/keyboard.js';
|
|
4
|
-
import * as RovingTabIndex from '../../core/aria/rovingtabindex.js';
|
|
5
|
-
|
|
6
|
-
import * as DataTableCell from './cell.js';
|
|
7
|
-
import * as DataTableColumnHeader from './columnheader.js';
|
|
8
|
-
import * as DataTableRow from './row.js';
|
|
9
|
-
import * as DataTableRowHeader from './rowheader.js';
|
|
10
|
-
|
|
11
|
-
export const CELL_TABINDEX_QUERIES = [
|
|
12
|
-
'td:not([mdw-autofocus-widget])',
|
|
13
|
-
'th:not([mdw-autofocus-widget])',
|
|
14
|
-
'td[mdw-autofocus-widget] .mdw-datatable__widget',
|
|
15
|
-
'th[mdw-autofocus-widget] .mdw-datatable__widget',
|
|
16
|
-
];
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @param {CustomEvent} event
|
|
20
|
-
* @return {void}
|
|
21
|
-
*/
|
|
22
|
-
export function onSelectedChange(event) {
|
|
23
|
-
const selected = event.detail.value === 'true';
|
|
24
|
-
const dataTableElement = /** @type {HTMLElement} */ (event.currentTarget);
|
|
25
|
-
const hasSelection = selected || dataTableElement.querySelector('td[aria-selected="true"],tr[aria-selected="true"]');
|
|
26
|
-
if (hasSelection) {
|
|
27
|
-
dataTableElement.setAttribute('mdw-has-selection', '');
|
|
28
|
-
} else {
|
|
29
|
-
dataTableElement.removeAttribute('mdw-has-selection');
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @param {Element} datatableElement
|
|
35
|
-
* @return {HTMLElement}
|
|
36
|
-
*/
|
|
37
|
-
export function getScroller(datatableElement) {
|
|
38
|
-
let scroller = /** @type {HTMLElement} */ (datatableElement.getElementsByClassName('mdw-datatable__scroller')[0]);
|
|
39
|
-
if (!scroller) {
|
|
40
|
-
scroller = document.createElement('div');
|
|
41
|
-
scroller.classList.add('mdw-datatable__scroller');
|
|
42
|
-
const footer = datatableElement.getElementsByClassName('mdw-datatable__footer')[0];
|
|
43
|
-
if (footer) {
|
|
44
|
-
footer.before(scroller);
|
|
45
|
-
} else {
|
|
46
|
-
datatableElement.appendChild(scroller);
|
|
47
|
-
}
|
|
48
|
-
// Move table into scroller if it exists
|
|
49
|
-
const table = datatableElement.getElementsByTagName('table')[0];
|
|
50
|
-
if (table) {
|
|
51
|
-
table.remove();
|
|
52
|
-
scroller.appendChild(table);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return scroller;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* @param {Element} datatableElement
|
|
60
|
-
* @return {HTMLTableElement}
|
|
61
|
-
*/
|
|
62
|
-
export function getTable(datatableElement) {
|
|
63
|
-
if (datatableElement instanceof HTMLTableElement) {
|
|
64
|
-
return datatableElement;
|
|
65
|
-
}
|
|
66
|
-
let table = datatableElement.getElementsByTagName('table')[0];
|
|
67
|
-
if (!table) {
|
|
68
|
-
const scroller = getScroller(datatableElement);
|
|
69
|
-
table = document.createElement('table');
|
|
70
|
-
scroller.appendChild(table);
|
|
71
|
-
}
|
|
72
|
-
return table;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @param {Element} datatableElement
|
|
77
|
-
* @return {HTMLTableSectionElement}
|
|
78
|
-
*/
|
|
79
|
-
export function getTableBody(datatableElement) {
|
|
80
|
-
let tbody = datatableElement.getElementsByTagName('tbody')[0];
|
|
81
|
-
if (!tbody) {
|
|
82
|
-
const table = getTable(datatableElement);
|
|
83
|
-
tbody = document.createElement('tbody');
|
|
84
|
-
table.appendChild(tbody);
|
|
85
|
-
}
|
|
86
|
-
return tbody;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* @param {Element} datatableElement
|
|
91
|
-
* @param {number} columnIndex
|
|
92
|
-
* @param {boolean} ascending
|
|
93
|
-
* @return {void}
|
|
94
|
-
*/
|
|
95
|
-
export function sortColumn(datatableElement, columnIndex, ascending = true) {
|
|
96
|
-
if (datatableElement.hasAttribute('mdw-datatable-adapter')) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
for (const th of datatableElement.getElementsByTagName('th')) {
|
|
100
|
-
if (th.cellIndex === columnIndex) {
|
|
101
|
-
th.setAttribute('aria-sort', ascending ? 'ascending' : 'descending');
|
|
102
|
-
} else if (th.hasAttribute('aria-sort')) {
|
|
103
|
-
th.setAttribute('aria-sort', 'none');
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/** @type {HTMLTableSectionElement} */
|
|
108
|
-
const tbody = getTableBody(datatableElement);
|
|
109
|
-
const rows = [];
|
|
110
|
-
let i = tbody.rows.length;
|
|
111
|
-
while (i--) {
|
|
112
|
-
rows.push(tbody.rows.item(i));
|
|
113
|
-
tbody.deleteRow(i);
|
|
114
|
-
}
|
|
115
|
-
rows.sort((a, b) => {
|
|
116
|
-
const aCell = a.cells.item(columnIndex);
|
|
117
|
-
const bCell = b.cells.item(columnIndex);
|
|
118
|
-
const aText = aCell.textContent;
|
|
119
|
-
const bText = bCell.textContent;
|
|
120
|
-
if (aCell.dataset.type === 'number') {
|
|
121
|
-
return Number.parseFloat(bText) - Number.parseFloat(aText);
|
|
122
|
-
}
|
|
123
|
-
return bText.localeCompare(aText);
|
|
124
|
-
});
|
|
125
|
-
if (ascending) {
|
|
126
|
-
rows.reverse();
|
|
127
|
-
}
|
|
128
|
-
const fragment = document.createDocumentFragment();
|
|
129
|
-
for (const row of rows) {
|
|
130
|
-
fragment.appendChild(row);
|
|
131
|
-
}
|
|
132
|
-
tbody.appendChild(fragment);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* @param {CustomEvent} event
|
|
137
|
-
* @return {void}
|
|
138
|
-
*/
|
|
139
|
-
export function onItemFocus(event) {
|
|
140
|
-
const datatableElement = /** @type {HTMLElement} */ (event.currentTarget);
|
|
141
|
-
const onFocusInteraction = datatableElement.getAttribute('mdw-on-focus');
|
|
142
|
-
if (!onFocusInteraction) {
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
const itemElement = /** @type {HTMLElement} */ (event.target);
|
|
146
|
-
if (itemElement.getAttribute('aria-disabled') === 'true') {
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
for (const interaction of onFocusInteraction.split(' ')) {
|
|
150
|
-
switch (interaction) {
|
|
151
|
-
case 'select':
|
|
152
|
-
if (itemElement instanceof HTMLTableRowElement) {
|
|
153
|
-
DataTableRow.setSelected(itemElement, true);
|
|
154
|
-
} else {
|
|
155
|
-
DataTableCell.setSelected(itemElement, true);
|
|
156
|
-
}
|
|
157
|
-
break;
|
|
158
|
-
default:
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* @param {CustomEvent} event
|
|
165
|
-
* @return {void}
|
|
166
|
-
*/
|
|
167
|
-
export function onSort(event) {
|
|
168
|
-
const datatableElement = /** @type {HTMLElement} */ (event.currentTarget);
|
|
169
|
-
const cell = /** @type {HTMLTableHeaderCellElement} */ (event.target);
|
|
170
|
-
sortColumn(datatableElement, cell.cellIndex, event.detail.sort === 'ascending');
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* @param {CustomEvent} event
|
|
175
|
-
* @return {void}
|
|
176
|
-
*/
|
|
177
|
-
export function onRowHeaderCheckedChange(event) {
|
|
178
|
-
const cell = /** @type {HTMLTableHeaderCellElement} */ (event.target);
|
|
179
|
-
const row = cell.parentElement;
|
|
180
|
-
DataTableRow.setSelected(row, event.detail.value);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* @param {Event} event
|
|
185
|
-
* @return {void}
|
|
186
|
-
*/
|
|
187
|
-
function onTabIndexZeroed(event) {
|
|
188
|
-
const dataTableElement = /** @type {HTMLElement} */ (event.currentTarget);
|
|
189
|
-
const emitter = /** @type {HTMLElement} */ (event.target);
|
|
190
|
-
|
|
191
|
-
const row = (emitter instanceof HTMLTableRowElement && emitter);
|
|
192
|
-
const cell = (!row && emitter instanceof HTMLTableCellElement && emitter);
|
|
193
|
-
if (!row && !cell) {
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
event.stopPropagation();
|
|
197
|
-
RovingTabIndex.removeTabIndex(dataTableElement.querySelectorAll(row ? 'tr' : CELL_TABINDEX_QUERIES.join(',')), [emitter]);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* @param {CustomEvent} event
|
|
202
|
-
* @return {void}
|
|
203
|
-
*/
|
|
204
|
-
export function onKeyboard(event) {
|
|
205
|
-
const dataTableElement = /** @type {HTMLElement} */ (event.currentTarget);
|
|
206
|
-
const emitter = /** @type {HTMLElement} */ (event.target);
|
|
207
|
-
let current = document.activeElement;
|
|
208
|
-
|
|
209
|
-
let row = (emitter instanceof HTMLTableRowElement && emitter);
|
|
210
|
-
const cell = (!row && emitter instanceof HTMLTableCellElement && emitter);
|
|
211
|
-
if (!row && !cell) {
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
if (!row) {
|
|
215
|
-
row = /** @type {HTMLTableRowElement} */ (cell.parentElement);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
let checkNavKeys = false;
|
|
219
|
-
switch (event.type) {
|
|
220
|
-
case Keyboard.SPACEBAR_KEY:
|
|
221
|
-
if (event.detail.ctrlKey || event.detail.altKey || event.detail.metaKey) {
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
if (!event.detail.shiftKey) {
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
if (!row.hasAttribute('aria-selected')) {
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
DataTableRow.setSelected(row, row.getAttribute('aria-selected') !== 'true', true);
|
|
231
|
-
break;
|
|
232
|
-
default:
|
|
233
|
-
checkNavKeys = true;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
if (checkNavKeys) {
|
|
237
|
-
// Keyboard Navigation
|
|
238
|
-
/** @type {Iterable<HTMLElement>} */
|
|
239
|
-
let searchElements;
|
|
240
|
-
let reverse = false;
|
|
241
|
-
let loop = false;
|
|
242
|
-
switch (event.type) {
|
|
243
|
-
case Keyboard.UP_ARROW_KEY:
|
|
244
|
-
reverse = true;
|
|
245
|
-
// Fallthrough
|
|
246
|
-
case Keyboard.DOWN_ARROW_KEY:
|
|
247
|
-
if (event.detail.ctrlKey || event.detail.altKey || event.detail.metaKey) {
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
if (cell) {
|
|
251
|
-
searchElements = getTableBody(dataTableElement).querySelectorAll(
|
|
252
|
-
CELL_TABINDEX_QUERIES.map((q) => `${q}:nth-child(${cell.cellIndex + 1})`).join(','),
|
|
253
|
-
);
|
|
254
|
-
} else {
|
|
255
|
-
searchElements = getTableBody(dataTableElement).getElementsByTagName('tr');
|
|
256
|
-
}
|
|
257
|
-
break;
|
|
258
|
-
case Keyboard.BACK_ARROW_KEY:
|
|
259
|
-
reverse = true;
|
|
260
|
-
// Fallthrough
|
|
261
|
-
case Keyboard.FORWARD_ARROW_KEY:
|
|
262
|
-
if (event.detail.ctrlKey || event.detail.altKey || event.detail.metaKey) {
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
if (!cell) {
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
searchElements = cell.parentElement.querySelectorAll(CELL_TABINDEX_QUERIES.join(','));
|
|
269
|
-
break;
|
|
270
|
-
case Keyboard.END_KEY:
|
|
271
|
-
reverse = true;
|
|
272
|
-
// Fallthrough
|
|
273
|
-
case Keyboard.HOME_KEY:
|
|
274
|
-
if (event.detail.altKey || event.detail.metaKey) {
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
if (!cell) {
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
searchElements = event.detail.ctrlKey
|
|
281
|
-
? getTableBody(dataTableElement).querySelectorAll(CELL_TABINDEX_QUERIES.join(','))
|
|
282
|
-
: cell.parentElement.querySelectorAll(CELL_TABINDEX_QUERIES.join(','));
|
|
283
|
-
cell.setAttribute('tabindex', '-1');
|
|
284
|
-
current = null;
|
|
285
|
-
loop = true;
|
|
286
|
-
break;
|
|
287
|
-
default:
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
RovingTabIndex.selectNext(searchElements, current, loop, reverse);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
event.preventDefault();
|
|
294
|
-
event.stopPropagation();
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* @param {Element} element
|
|
299
|
-
* @return {void}
|
|
300
|
-
*/
|
|
301
|
-
export function detach(element) {
|
|
302
|
-
element.removeAttribute('mdw-datatable-js');
|
|
303
|
-
element.removeEventListener(DataTableRow.FOCUS_EVENT, onItemFocus);
|
|
304
|
-
element.removeEventListener(DataTableCell.FOCUS_EVENT, onItemFocus);
|
|
305
|
-
element.removeEventListener(DataTableColumnHeader.SORT_EVENT, onSort);
|
|
306
|
-
element.removeEventListener(Keyboard.UP_ARROW_KEY, onKeyboard);
|
|
307
|
-
element.removeEventListener(Keyboard.DOWN_ARROW_KEY, onKeyboard);
|
|
308
|
-
element.removeEventListener(Keyboard.FORWARD_ARROW_KEY, onKeyboard);
|
|
309
|
-
element.removeEventListener(Keyboard.BACK_ARROW_KEY, onKeyboard);
|
|
310
|
-
element.removeEventListener(Keyboard.HOME_KEY, onKeyboard);
|
|
311
|
-
element.removeEventListener(Keyboard.END_KEY, onKeyboard);
|
|
312
|
-
element.removeEventListener(RovingTabIndex.TABINDEX_ZEROED, onTabIndexZeroed);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* @param {Element} tableElement
|
|
317
|
-
* @return {HTMLTableRowElement}
|
|
318
|
-
*/
|
|
319
|
-
export function getHeaderRow(tableElement) {
|
|
320
|
-
let thead = tableElement.getElementsByTagName('thead')[0];
|
|
321
|
-
if (!thead) {
|
|
322
|
-
const table = getTable(tableElement);
|
|
323
|
-
thead = document.createElement('thead');
|
|
324
|
-
table.appendChild(thead);
|
|
325
|
-
}
|
|
326
|
-
let headerRow = thead.getElementsByTagName('tr')[0];
|
|
327
|
-
if (!headerRow) {
|
|
328
|
-
headerRow = document.createElement('tr');
|
|
329
|
-
thead.appendChild(headerRow);
|
|
330
|
-
}
|
|
331
|
-
return headerRow;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* @param {Element} element
|
|
336
|
-
* @return {void}
|
|
337
|
-
*/
|
|
338
|
-
export function attach(element) {
|
|
339
|
-
element.setAttribute('mdw-datatable-js', '');
|
|
340
|
-
|
|
341
|
-
const table = getTable(element);
|
|
342
|
-
table.setAttribute('role', 'grid');
|
|
343
|
-
const headerRow = getHeaderRow(element);
|
|
344
|
-
const tbody = getTableBody(element);
|
|
345
|
-
|
|
346
|
-
for (const el of headerRow.getElementsByTagName('th')) DataTableColumnHeader.attach(el);
|
|
347
|
-
for (const el of tbody.getElementsByTagName('th')) DataTableRowHeader.attach(el);
|
|
348
|
-
|
|
349
|
-
const tableRows = tbody.getElementsByTagName('tr');
|
|
350
|
-
for (const el of tableRows) DataTableRow.attach(el);
|
|
351
|
-
|
|
352
|
-
const rowFocusable = element.hasAttribute('mdw-row-focusable');
|
|
353
|
-
if (rowFocusable) {
|
|
354
|
-
RovingTabIndex.setupTabIndexes(tableRows);
|
|
355
|
-
}
|
|
356
|
-
const cellFocusable = element.hasAttribute('mdw-cell-focusable');
|
|
357
|
-
if (cellFocusable) {
|
|
358
|
-
RovingTabIndex.setupTabIndexes(tbody.querySelectorAll(CELL_TABINDEX_QUERIES.join(',')));
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
element.addEventListener(DataTableRow.FOCUS_EVENT, onItemFocus);
|
|
362
|
-
element.addEventListener(DataTableRow.SELECTED_CHANGE_EVENT, onSelectedChange);
|
|
363
|
-
element.addEventListener(DataTableCell.FOCUS_EVENT, onItemFocus);
|
|
364
|
-
element.addEventListener(DataTableCell.SELECTED_CHANGE_EVENT, onSelectedChange);
|
|
365
|
-
element.addEventListener(DataTableColumnHeader.SORT_EVENT, onSort);
|
|
366
|
-
element.addEventListener(Keyboard.SPACEBAR_KEY, onKeyboard);
|
|
367
|
-
element.addEventListener(Keyboard.UP_ARROW_KEY, onKeyboard);
|
|
368
|
-
element.addEventListener(Keyboard.DOWN_ARROW_KEY, onKeyboard);
|
|
369
|
-
element.addEventListener(Keyboard.FORWARD_ARROW_KEY, onKeyboard);
|
|
370
|
-
element.addEventListener(Keyboard.BACK_ARROW_KEY, onKeyboard);
|
|
371
|
-
element.addEventListener(Keyboard.HOME_KEY, onKeyboard);
|
|
372
|
-
element.addEventListener(Keyboard.END_KEY, onKeyboard);
|
|
373
|
-
element.addEventListener(RovingTabIndex.TABINDEX_ZEROED, onTabIndexZeroed);
|
|
374
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as Attributes from '../../core/aria/attributes.js';
|
|
2
|
-
import * as Keyboard from '../../core/aria/keyboard.js';
|
|
3
|
-
import { dispatchDomEvent } from '../../core/dom.js';
|
|
4
|
-
|
|
5
|
-
import * as DataTableCell from './cell.js';
|
|
6
|
-
|
|
7
|
-
export const FOCUS_EVENT = 'mdw:datatablerow-focus';
|
|
8
|
-
export const SELECTED_CHANGE_EVENT = 'mdw:datatablerow-selectedchange';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @param {FocusEvent} event
|
|
12
|
-
* @return {void}
|
|
13
|
-
*/
|
|
14
|
-
export function onFocus(event) {
|
|
15
|
-
const rowElement = /** @type {HTMLTableRowElement} */ (event.currentTarget);
|
|
16
|
-
dispatchDomEvent(rowElement, FOCUS_EVENT);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @param {Element} element
|
|
21
|
-
* @param {string|boolean} value
|
|
22
|
-
* @param {boolean} [dispatchEvent=true]
|
|
23
|
-
* @return {boolean} successful
|
|
24
|
-
*/
|
|
25
|
-
export function setSelected(element, value, dispatchEvent = true) {
|
|
26
|
-
return Attributes.setSelected(element, value, dispatchEvent ? SELECTED_CHANGE_EVENT : null);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @param {HTMLTableRowElement} element
|
|
31
|
-
* @return {void}
|
|
32
|
-
*/
|
|
33
|
-
export function attach(element) {
|
|
34
|
-
Keyboard.attach(element);
|
|
35
|
-
element.setAttribute('role', 'row');
|
|
36
|
-
element.addEventListener('focus', onFocus);
|
|
37
|
-
for (const el of element.cells) DataTableCell.attach(el);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @param {HTMLTableRowElement} element
|
|
42
|
-
* @return {void}
|
|
43
|
-
*/
|
|
44
|
-
export function detach(element) {
|
|
45
|
-
element.removeEventListener('focus', onFocus);
|
|
46
|
-
Keyboard.detach(element);
|
|
47
|
-
for (const el of element.cells) DataTableCell.detach(el);
|
|
48
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as Keyboard from '../../core/aria/keyboard.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @param {HTMLTableHeaderCellElement} element
|
|
5
|
-
* @return {void}
|
|
6
|
-
*/
|
|
7
|
-
export function attach(element) {
|
|
8
|
-
Keyboard.attach(element);
|
|
9
|
-
element.setAttribute('role', 'rowheader');
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @param {HTMLTableHeaderCellElement} element
|
|
14
|
-
* @return {void}
|
|
15
|
-
*/
|
|
16
|
-
export function detach(element) {
|
|
17
|
-
Keyboard.detach(element);
|
|
18
|
-
}
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
// https://material.io/guidelines/components/dialogs.html
|
|
2
|
-
// https://material.io/guidelines/motion/choreography.html#choreography-creation
|
|
3
|
-
|
|
4
|
-
@use '../../core/_elevation.scss' as elevation;
|
|
5
|
-
@use '../../core/_length.scss' as *;
|
|
6
|
-
@use '../../core/_motion.scss' as motion;
|
|
7
|
-
@use '../../core/_type.scss' as type;
|
|
8
|
-
|
|
9
|
-
$unitWidth: 56px !default;
|
|
10
|
-
|
|
11
|
-
.mdw-dialog__close {
|
|
12
|
-
position: absolute;
|
|
13
|
-
inset-block-start: 0;
|
|
14
|
-
inset-inline-start: 0;
|
|
15
|
-
// Scroll mask
|
|
16
|
-
overflow-y: scroll;
|
|
17
|
-
overscroll-behavior: none;
|
|
18
|
-
overscroll-behavior: contain;
|
|
19
|
-
scrollbar-width: none;
|
|
20
|
-
|
|
21
|
-
block-size: 100%;
|
|
22
|
-
inline-size: 100%;
|
|
23
|
-
|
|
24
|
-
cursor: default;
|
|
25
|
-
|
|
26
|
-
pointer-events: inherit;
|
|
27
|
-
-webkit-tap-highlight-color: transparent;
|
|
28
|
-
|
|
29
|
-
visibility: hidden;
|
|
30
|
-
z-index: 8;
|
|
31
|
-
|
|
32
|
-
// Hide scrollbar
|
|
33
|
-
&::-webkit-scrollbar {
|
|
34
|
-
display: none;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&::after {
|
|
38
|
-
content: '';
|
|
39
|
-
|
|
40
|
-
display: block;
|
|
41
|
-
|
|
42
|
-
block-size: 200%;
|
|
43
|
-
inline-size: 200%;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.mdw-dialog {
|
|
48
|
-
display: flex;
|
|
49
|
-
position: absolute;
|
|
50
|
-
inset-block-start: 0;
|
|
51
|
-
inset-inline-start: 0;
|
|
52
|
-
|
|
53
|
-
align-items: center;
|
|
54
|
-
flex-direction: row;
|
|
55
|
-
justify-content: center;
|
|
56
|
-
|
|
57
|
-
box-sizing: border-box;
|
|
58
|
-
block-size: 100%;
|
|
59
|
-
inline-size: 100%;
|
|
60
|
-
padding: 84px 40px;
|
|
61
|
-
|
|
62
|
-
pointer-events: none;
|
|
63
|
-
|
|
64
|
-
transition-duration: motion.$fadeOutDuration;
|
|
65
|
-
transition-property: opacity;
|
|
66
|
-
transition-timing-function: motion.$accelerateEasing;
|
|
67
|
-
will-change: opacity;
|
|
68
|
-
|
|
69
|
-
opacity: 0;
|
|
70
|
-
|
|
71
|
-
z-index: 24;
|
|
72
|
-
|
|
73
|
-
/* Handled by theme */
|
|
74
|
-
// background-color: rgba(0, 0, 0, 0.50);
|
|
75
|
-
|
|
76
|
-
&:not([aria-hidden]) {
|
|
77
|
-
// Initial state
|
|
78
|
-
transition: none;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@for $i from 3 to 8 {
|
|
82
|
-
&[mdw-width-units="#{$i}"] {
|
|
83
|
-
.mdw-dialog__popup {
|
|
84
|
-
min-inline-size: #{$unitWidth * $i};
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.mdw-dialog__popup {
|
|
91
|
-
display: none;
|
|
92
|
-
position: relative;
|
|
93
|
-
flex-direction: column;
|
|
94
|
-
overflow-y: auto;
|
|
95
|
-
-webkit-overflow-scrolling: touch;
|
|
96
|
-
|
|
97
|
-
overscroll-behavior: none;
|
|
98
|
-
overscroll-behavior: contain;
|
|
99
|
-
|
|
100
|
-
max-block-size: 100%;
|
|
101
|
-
min-inline-size: 224px;
|
|
102
|
-
max-inline-size: 100%;
|
|
103
|
-
flex-shrink: 1;
|
|
104
|
-
|
|
105
|
-
will-change: display, transform;
|
|
106
|
-
|
|
107
|
-
transform: scale(1);
|
|
108
|
-
transform-origin: bottom center;
|
|
109
|
-
z-index: 24;
|
|
110
|
-
|
|
111
|
-
border-radius: 4px;
|
|
112
|
-
box-shadow: elevation.boxShadow(24);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.mdw-dialog[aria-hidden="false"],
|
|
116
|
-
.mdw-dialog[id]:target {
|
|
117
|
-
pointer-events: auto;
|
|
118
|
-
|
|
119
|
-
transition-duration: motion.$fadeInDuration;
|
|
120
|
-
transition-property: opacity;
|
|
121
|
-
transition-timing-function: motion.$decelerateEasing;
|
|
122
|
-
|
|
123
|
-
opacity: 1;
|
|
124
|
-
|
|
125
|
-
.mdw-dialog__close {
|
|
126
|
-
visibility: visible;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.mdw-dialog__popup {
|
|
130
|
-
animation-name: scaleUpAnimation;
|
|
131
|
-
animation-duration: motion.$fadeInDuration;
|
|
132
|
-
animation-direction: forwards;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&:not([mdw-dialog-js]) .mdw-dialog__popup {
|
|
136
|
-
display: flex;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
@keyframes scaleUpAnimation {
|
|
141
|
-
from {
|
|
142
|
-
transform: scale(0);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
to {
|
|
146
|
-
transform: scale(1);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.mdw-dialog__title {
|
|
151
|
-
@include type.textTopToTop(20);
|
|
152
|
-
@include type.addRules('h6');
|
|
153
|
-
@include type.baselineToBottom(36);
|
|
154
|
-
|
|
155
|
-
margin-block-end: -36px;
|
|
156
|
-
padding: 0 24px;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.mdw-dialog__body {
|
|
160
|
-
@include type.textTopToTop(20);
|
|
161
|
-
@include type.addRules('body');
|
|
162
|
-
@include type.baselineToBottom(28);
|
|
163
|
-
|
|
164
|
-
padding: 0 24px;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.mdw-dialog__header {
|
|
168
|
-
min-block-size: 64px;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.mdw-dialog__scrolling {
|
|
172
|
-
overflow-y: auto;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.mdw-dialog__button-area {
|
|
176
|
-
display: flex;
|
|
177
|
-
flex-direction: row-reverse;
|
|
178
|
-
flex-wrap: wrap;
|
|
179
|
-
justify-content: flex-start;
|
|
180
|
-
|
|
181
|
-
flex: none;
|
|
182
|
-
margin-block: 8px;
|
|
183
|
-
|
|
184
|
-
.mdw-button {
|
|
185
|
-
margin-inline: 0 8px;
|
|
186
|
-
|
|
187
|
-
text-align: end;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
&[mdw-stacked] {
|
|
191
|
-
margin-block-start: 0;
|
|
192
|
-
|
|
193
|
-
.mdw-button {
|
|
194
|
-
justify-content: flex-end;
|
|
195
|
-
|
|
196
|
-
min-block-size: 48px;
|
|
197
|
-
flex-basis: 100%;
|
|
198
|
-
margin-inline: 0;
|
|
199
|
-
padding-inline: 16px;
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|