@covalent/core 4.0.0-beta.2 → 4.1.0-develop.10
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 -4
- package/breadcrumbs/README.md +21 -17
- package/breadcrumbs/breadcrumb/breadcrumb.component.d.ts +3 -1
- package/breadcrumbs/breadcrumbs.component.d.ts +3 -4
- package/breadcrumbs/covalent-core-breadcrumbs.d.ts +1 -1
- package/breadcrumbs/{public-api.d.ts → public_api.d.ts} +0 -0
- package/common/README.md +3 -0
- package/common/_common-theme.scss +1 -1
- package/common/behaviors/disable-ripple.mixin.d.ts +1 -1
- package/common/behaviors/disabled.mixin.d.ts +1 -1
- package/common/covalent-core-common.d.ts +1 -1
- package/common/material-icons.css +1 -111
- package/common/material-icons.css.map +1 -1
- package/common/pipes/truncate/truncate.pipe.d.ts +1 -1
- package/common/platform.css +1 -16819
- package/common/platform.css.map +1 -1
- package/common/{public-api.d.ts → public_api.d.ts} +0 -0
- package/common/styles/_elevation.scss +7 -2
- package/common/styles/_typography-functions.scss +10 -2
- package/common/styles/_variables.scss +2 -1
- package/common/styles/core/_button.scss +35 -5
- package/common/styles/core/_card.scss +11 -6
- package/common/styles/core/_whiteframe.scss +16 -8
- package/common/styles/font/README.md +4 -2
- package/covalent-core.d.ts +1 -1
- package/dialogs/README.md +38 -30
- package/dialogs/alert-dialog/alert-dialog.component.d.ts +3 -3
- package/dialogs/confirm-dialog/confirm-dialog.component.d.ts +2 -2
- package/dialogs/covalent-core-dialogs.d.ts +1 -1
- package/dialogs/dialog.component.d.ts +4 -4
- package/dialogs/dialogs.module.d.ts +1 -1
- package/dialogs/prompt-dialog/prompt-dialog.component.d.ts +3 -3
- package/dialogs/{public-api.d.ts → public_api.d.ts} +0 -0
- package/dialogs/src/README.md +223 -0
- package/dialogs/window-dialog/window-dialog.component.d.ts +5 -5
- package/dynamic-menu/README.md +6 -6
- package/dynamic-menu/covalent-core-dynamic-menu.d.ts +1 -1
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.d.ts +1 -1
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.d.ts +1 -1
- package/dynamic-menu/dynamic-menu.component.d.ts +1 -22
- package/dynamic-menu/dynamic-menu.menu.d.ts +22 -0
- package/dynamic-menu/public_api.d.ts +1 -0
- package/esm2020/breadcrumbs/breadcrumb/breadcrumb.component.mjs +21 -37
- package/esm2020/breadcrumbs/breadcrumbs.component.mjs +25 -34
- package/esm2020/breadcrumbs/breadcrumbs.module.mjs +12 -13
- package/esm2020/breadcrumbs/covalent-core-breadcrumbs.mjs +2 -2
- package/esm2020/breadcrumbs/public_api.mjs +4 -0
- package/esm2020/common/animations/bounce/bounce.animation.mjs +1 -1
- package/esm2020/common/animations/collapse/collapse.animation.mjs +1 -1
- package/esm2020/common/animations/common/interfaces.mjs +1 -1
- package/esm2020/common/animations/fade/fadeInOut.animation.mjs +1 -1
- package/esm2020/common/animations/flash/flash.animation.mjs +1 -1
- package/esm2020/common/animations/headshake/headshake.animation.mjs +17 -5
- package/esm2020/common/animations/jello/jello.animation.mjs +29 -8
- package/esm2020/common/animations/pulse/pulse.animation.mjs +1 -1
- package/esm2020/common/animations/rotate/rotate.animation.mjs +7 -2
- package/esm2020/common/behaviors/control-value-accesor.mixin.mjs +4 -2
- package/esm2020/common/behaviors/disable-ripple.mixin.mjs +1 -1
- package/esm2020/common/behaviors/disabled.mixin.mjs +1 -1
- package/esm2020/common/common.module.mjs +14 -15
- package/esm2020/common/covalent-core-common.mjs +2 -2
- package/esm2020/common/directives/fullscreen/fullscreen.directive.mjs +41 -41
- package/esm2020/common/forms/auto-trim/auto-trim.directive.mjs +19 -19
- package/esm2020/common/forms/validators/validators.mjs +6 -6
- package/esm2020/common/functions/clipboard.mjs +1 -1
- package/esm2020/common/functions/convert.mjs +1 -1
- package/esm2020/common/functions/download.mjs +1 -1
- package/esm2020/common/functions/file.mjs +1 -1
- package/esm2020/common/pipes/bytes/bytes.pipe.mjs +21 -11
- package/esm2020/common/pipes/decimal-bytes/decimal-bytes.pipe.mjs +21 -11
- package/esm2020/common/pipes/digits/digits.pipe.mjs +13 -13
- package/esm2020/common/pipes/time-ago/time-ago.pipe.mjs +9 -9
- package/esm2020/common/pipes/time-difference/time-difference.pipe.mjs +9 -9
- package/esm2020/common/pipes/time-until/time-until.pipe.mjs +9 -9
- package/esm2020/common/pipes/truncate/truncate.pipe.mjs +10 -10
- package/esm2020/common/public_api.mjs +39 -0
- package/esm2020/common/services/icon.service.mjs +6 -6
- package/esm2020/common/services/router-path.service.mjs +6 -6
- package/esm2020/covalent-core.mjs +2 -2
- package/esm2020/dialogs/alert-dialog/alert-dialog.component.mjs +9 -40
- package/esm2020/dialogs/confirm-dialog/confirm-dialog.component.mjs +9 -49
- package/esm2020/dialogs/covalent-core-dialogs.mjs +2 -2
- package/esm2020/dialogs/dialog.component.mjs +35 -76
- package/esm2020/dialogs/dialogs.module.mjs +39 -36
- package/esm2020/dialogs/prompt-dialog/prompt-dialog.component.mjs +15 -73
- package/esm2020/dialogs/public_api.mjs +9 -0
- package/esm2020/dialogs/resizable-draggable-dialog/resizable-draggable-dialog.mjs +27 -10
- package/esm2020/dialogs/services/dialog.service.mjs +16 -13
- package/esm2020/dialogs/window-dialog/window-dialog.component.mjs +24 -55
- package/esm2020/dynamic-menu/covalent-core-dynamic-menu.mjs +2 -2
- package/esm2020/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.mjs +19 -136
- package/esm2020/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.mjs +14 -103
- package/esm2020/dynamic-menu/dynamic-menu.component.mjs +18 -101
- package/esm2020/dynamic-menu/dynamic-menu.menu.mjs +2 -0
- package/esm2020/dynamic-menu/dynamic-menu.module.mjs +44 -19
- package/esm2020/dynamic-menu/public_api.mjs +2 -1
- package/esm2020/file/covalent-core-file.mjs +2 -2
- package/esm2020/file/directives/file-drop.directive.mjs +46 -47
- package/esm2020/file/directives/file-select.directive.mjs +32 -31
- package/esm2020/file/file-input/file-input.component.mjs +41 -68
- package/esm2020/file/file-upload/file-upload.component.mjs +76 -112
- package/esm2020/file/file.module.mjs +32 -17
- package/esm2020/file/public_api.mjs +7 -0
- package/esm2020/file/services/file.service.mjs +13 -11
- package/esm2020/json-formatter/collapse.animation.mjs +51 -0
- package/esm2020/json-formatter/covalent-core-json-formatter.mjs +2 -2
- package/esm2020/json-formatter/json-formatter.component.mjs +38 -123
- package/esm2020/json-formatter/json-formatter.module.mjs +12 -13
- package/esm2020/json-formatter/public_api.mjs +3 -0
- package/esm2020/layout/covalent-core-layout.mjs +2 -2
- package/esm2020/layout/layout-card-over/layout-card-over.component.mjs +17 -64
- package/esm2020/layout/layout-footer/layout-footer.component.mjs +9 -14
- package/esm2020/layout/layout-manage-list/layout-manage-list.component.mjs +22 -51
- package/esm2020/layout/layout-manage-list/layout-manage-list.directives.mjs +47 -53
- package/esm2020/layout/layout-nav/layout-nav.component.mjs +22 -84
- package/esm2020/layout/layout-nav-list/layout-nav-list.component.mjs +37 -124
- package/esm2020/layout/layout-nav-list/layout-nav-list.directives.mjs +47 -53
- package/esm2020/layout/layout-toggle.class.mjs +12 -15
- package/esm2020/layout/layout.component.mjs +22 -43
- package/esm2020/layout/layout.directives.mjs +48 -50
- package/esm2020/layout/layout.module.mjs +34 -35
- package/esm2020/layout/navigation-drawer/navigation-drawer.component.mjs +56 -201
- package/esm2020/layout/public_api.mjs +13 -0
- package/esm2020/menu/covalent-core-menu.mjs +2 -2
- package/esm2020/menu/menu.component.mjs +7 -18
- package/esm2020/menu/menu.module.mjs +12 -13
- package/esm2020/menu/public_api.mjs +3 -0
- package/esm2020/message/collapse.animation.mjs +51 -0
- package/esm2020/message/covalent-core-message.mjs +2 -2
- package/esm2020/message/message.component.mjs +44 -102
- package/esm2020/message/message.module.mjs +19 -15
- package/esm2020/message/public_api.mjs +3 -0
- package/esm2020/public_api.mjs +2 -0
- package/esm2020/search/covalent-core-search.mjs +2 -2
- package/esm2020/search/public_api.mjs +4 -0
- package/esm2020/search/search-box/search-box.component.mjs +97 -123
- package/esm2020/search/search-input/search-input.component.mjs +116 -153
- package/esm2020/search/search.module.mjs +28 -13
- package/esm2020/side-sheet/covalent-core-side-sheet.mjs +2 -2
- package/esm2020/side-sheet/public_api.mjs +6 -0
- package/esm2020/side-sheet/side-sheet-container.mjs +89 -57
- package/esm2020/side-sheet/side-sheet-ref.mjs +2 -2
- package/esm2020/side-sheet/side-sheet.animation.mjs +2 -2
- package/esm2020/side-sheet/side-sheet.config.mjs +1 -1
- package/esm2020/side-sheet/side-sheet.content-directives.mjs +109 -86
- package/esm2020/side-sheet/side-sheet.mjs +44 -31
- package/esm2020/side-sheet/side-sheet.module.mjs +37 -38
- package/esm2020/user-profile/covalent-core-user-profile.mjs +2 -2
- package/esm2020/user-profile/public_api.mjs +1 -1
- package/esm2020/user-profile/user-profile-menu/user-profile-menu.component.mjs +13 -64
- package/esm2020/user-profile/user-profile.component.mjs +13 -35
- package/esm2020/user-profile/user-profile.module.mjs +32 -14
- package/fesm2015/covalent-core-breadcrumbs.mjs +40 -85
- package/fesm2015/covalent-core-breadcrumbs.mjs.map +1 -1
- package/fesm2015/covalent-core-common.mjs +170 -140
- package/fesm2015/covalent-core-common.mjs.map +1 -1
- package/fesm2015/covalent-core-dialogs.mjs +125 -358
- package/fesm2015/covalent-core-dialogs.mjs.map +1 -1
- package/fesm2015/covalent-core-dynamic-menu.mjs +73 -425
- package/fesm2015/covalent-core-dynamic-menu.mjs.map +1 -1
- package/fesm2015/covalent-core-file.mjs +148 -233
- package/fesm2015/covalent-core-file.mjs.map +1 -1
- package/fesm2015/covalent-core-json-formatter.mjs +93 -148
- package/fesm2015/covalent-core-json-formatter.mjs.map +1 -1
- package/fesm2015/covalent-core-layout.mjs +194 -747
- package/fesm2015/covalent-core-layout.mjs.map +1 -1
- package/fesm2015/covalent-core-menu.mjs +10 -28
- package/fesm2015/covalent-core-menu.mjs.map +1 -1
- package/fesm2015/covalent-core-message.mjs +79 -104
- package/fesm2015/covalent-core-message.mjs.map +1 -1
- package/fesm2015/covalent-core-search.mjs +147 -227
- package/fesm2015/covalent-core-search.mjs.map +1 -1
- package/fesm2015/covalent-core-side-sheet.mjs +202 -173
- package/fesm2015/covalent-core-side-sheet.mjs.map +1 -1
- package/fesm2015/covalent-core-user-profile.mjs +38 -114
- package/fesm2015/covalent-core-user-profile.mjs.map +1 -1
- package/fesm2015/covalent-core.mjs.map +1 -1
- package/fesm2020/covalent-core-breadcrumbs.mjs +54 -80
- package/fesm2020/covalent-core-breadcrumbs.mjs.map +1 -1
- package/fesm2020/covalent-core-common.mjs +224 -165
- package/fesm2020/covalent-core-common.mjs.map +1 -1
- package/fesm2020/covalent-core-dialogs.mjs +160 -338
- package/fesm2020/covalent-core-dialogs.mjs.map +1 -1
- package/fesm2020/covalent-core-dynamic-menu.mjs +89 -354
- package/fesm2020/covalent-core-dynamic-menu.mjs.map +1 -1
- package/fesm2020/covalent-core-file.mjs +229 -273
- package/fesm2020/covalent-core-file.mjs.map +1 -1
- package/fesm2020/covalent-core-json-formatter.mjs +97 -133
- package/fesm2020/covalent-core-json-formatter.mjs.map +1 -1
- package/fesm2020/covalent-core-layout.mjs +353 -767
- package/fesm2020/covalent-core-layout.mjs.map +1 -1
- package/fesm2020/covalent-core-menu.mjs +17 -29
- package/fesm2020/covalent-core-menu.mjs.map +1 -1
- package/fesm2020/covalent-core-message.mjs +110 -114
- package/fesm2020/covalent-core-message.mjs.map +1 -1
- package/fesm2020/covalent-core-search.mjs +233 -281
- package/fesm2020/covalent-core-search.mjs.map +1 -1
- package/fesm2020/covalent-core-side-sheet.mjs +267 -200
- package/fesm2020/covalent-core-side-sheet.mjs.map +1 -1
- package/fesm2020/covalent-core-user-profile.mjs +54 -109
- package/fesm2020/covalent-core-user-profile.mjs.map +1 -1
- package/fesm2020/covalent-core.mjs.map +1 -1
- package/file/_file-theme.scss +2 -1
- package/file/covalent-core-file.d.ts +1 -1
- package/file/directives/file-drop.directive.d.ts +6 -7
- package/file/directives/file-select.directive.d.ts +2 -2
- package/file/file-input/file-input.component.d.ts +7 -7
- package/file/file-upload/file-upload.component.d.ts +16 -9
- package/file/{public-api.d.ts → public_api.d.ts} +0 -0
- package/file/{file-input → src/file-input}/README.md +46 -37
- package/file/{file-upload → src/file-upload}/README.md +36 -27
- package/json-formatter/README.md +8 -8
- package/json-formatter/collapse.animation.d.ts +24 -0
- package/json-formatter/covalent-core-json-formatter.d.ts +1 -1
- package/json-formatter/json-formatter.component.d.ts +4 -4
- package/json-formatter/{public-api.d.ts → public_api.d.ts} +0 -0
- package/layout/README.md +48 -50
- package/layout/covalent-core-layout.d.ts +1 -1
- package/layout/layout-card-over/layout-card-over.component.d.ts +3 -3
- package/layout/layout-footer/layout-footer.component.d.ts +3 -3
- package/layout/layout-manage-list/layout-manage-list.component.d.ts +4 -4
- package/layout/layout-manage-list/layout-manage-list.directives.d.ts +5 -5
- package/layout/layout-nav/layout-nav.component.d.ts +5 -5
- package/layout/layout-nav-list/layout-nav-list.component.d.ts +9 -9
- package/layout/layout-nav-list/layout-nav-list.directives.d.ts +5 -5
- package/layout/layout-toggle.class.d.ts +1 -1
- package/layout/layout.component.d.ts +4 -4
- package/layout/layout.directives.d.ts +2 -2
- package/layout/navigation-drawer/navigation-drawer.component.d.ts +12 -12
- package/layout/{public-api.d.ts → public_api.d.ts} +0 -0
- package/layout/{layout-card-over → src/layout-card-over}/README.md +19 -17
- package/layout/{layout-manage-list → src/layout-manage-list}/README.md +24 -28
- package/layout/src/layout-nav/README.md +50 -0
- package/layout/{layout-nav-list → src/layout-nav-list}/README.md +44 -40
- package/menu/covalent-core-menu.d.ts +1 -1
- package/menu/{public-api.d.ts → public_api.d.ts} +0 -0
- package/message/README.md +26 -18
- package/message/collapse.animation.d.ts +24 -0
- package/message/covalent-core-message.d.ts +1 -1
- package/message/message.component.d.ts +4 -4
- package/message/{public-api.d.ts → public_api.d.ts} +0 -0
- package/package.json +36 -55
- package/{index.d.ts → public_api.d.ts} +0 -0
- package/search/README.md +74 -73
- package/search/covalent-core-search.d.ts +1 -1
- package/search/{public-api.d.ts → public_api.d.ts} +0 -0
- package/search/search-box/search-box.component.d.ts +10 -6
- package/search/search-input/search-input.component.d.ts +10 -6
- package/search/src/search-box/README.md +73 -0
- package/search/src/search-input/README.md +74 -0
- package/side-sheet/README.md +3 -5
- package/side-sheet/{side-sheet.theme.scss → _side-sheet.theme.scss} +0 -0
- package/side-sheet/covalent-core-side-sheet.d.ts +1 -1
- package/side-sheet/{public-api.d.ts → public_api.d.ts} +0 -0
- package/side-sheet/side-sheet-container.d.ts +18 -7
- package/side-sheet/side-sheet.content-directives.d.ts +22 -16
- package/side-sheet/side-sheet.d.ts +2 -2
- package/side-sheet/side-sheet.module.d.ts +1 -1
- package/theming/prebuilt/blue-grey-deep-orange.css +1 -2815
- package/theming/prebuilt/blue-grey-deep-orange.css.map +1 -1
- package/theming/prebuilt/blue-orange.css +1 -2815
- package/theming/prebuilt/blue-orange.css.map +1 -1
- package/theming/prebuilt/indigo-pink.css +1 -2815
- package/theming/prebuilt/indigo-pink.css.map +1 -1
- package/theming/prebuilt/orange-light-blue.css +1 -2815
- package/theming/prebuilt/orange-light-blue.css.map +1 -1
- package/theming/prebuilt/teal-orange.css +1 -2815
- package/theming/prebuilt/teal-orange.css.map +1 -1
- package/user-profile/README.md +5 -5
- package/user-profile/covalent-core-user-profile.d.ts +1 -1
- package/user-profile/user-profile-menu/user-profile-menu.component.d.ts +2 -2
- package/user-profile/user-profile.component.d.ts +2 -2
- package/breadcrumbs/breadcrumb/breadcrumb.component.scss +0 -25
- package/breadcrumbs/breadcrumbs.component.scss +0 -8
- package/breadcrumbs/index.d.ts +0 -1
- package/common/index.d.ts +0 -1
- package/common/material-icons.scss +0 -3
- package/common/platform.scss +0 -7
- package/dialogs/alert-dialog/alert-dialog.component.scss +0 -3
- package/dialogs/confirm-dialog/confirm-dialog.component.scss +0 -3
- package/dialogs/dialog.component.scss +0 -49
- package/dialogs/index.d.ts +0 -1
- package/dialogs/prompt-dialog/prompt-dialog.component.scss +0 -16
- package/dialogs/window-dialog/window-dialog.component.scss +0 -31
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.scss +0 -7
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.scss +0 -13
- package/dynamic-menu/dynamic-menu.component.scss +0 -0
- package/dynamic-menu/index.d.ts +0 -1
- package/esm2020/breadcrumbs/index.mjs +0 -2
- package/esm2020/breadcrumbs/public-api.mjs +0 -4
- package/esm2020/common/index.mjs +0 -2
- package/esm2020/common/public-api.mjs +0 -39
- package/esm2020/dialogs/index.mjs +0 -2
- package/esm2020/dialogs/public-api.mjs +0 -9
- package/esm2020/dynamic-menu/index.mjs +0 -2
- package/esm2020/file/index.mjs +0 -2
- package/esm2020/file/public-api.mjs +0 -7
- package/esm2020/index.mjs +0 -2
- package/esm2020/json-formatter/index.mjs +0 -2
- package/esm2020/json-formatter/public-api.mjs +0 -3
- package/esm2020/layout/index.mjs +0 -2
- package/esm2020/layout/public-api.mjs +0 -13
- package/esm2020/menu/index.mjs +0 -2
- package/esm2020/menu/public-api.mjs +0 -3
- package/esm2020/message/index.mjs +0 -2
- package/esm2020/message/public-api.mjs +0 -3
- package/esm2020/search/index.mjs +0 -2
- package/esm2020/search/public-api.mjs +0 -4
- package/esm2020/side-sheet/index.mjs +0 -2
- package/esm2020/side-sheet/public-api.mjs +0 -6
- package/esm2020/user-profile/index.mjs +0 -2
- package/file/file-input/file-input.component.scss +0 -22
- package/file/file-upload/file-upload.component.scss +0 -34
- package/file/index.d.ts +0 -1
- package/json-formatter/index.d.ts +0 -1
- package/json-formatter/json-formatter.component.scss +0 -74
- package/layout/index.d.ts +0 -1
- package/layout/layout-card-over/layout-card-over.component.scss +0 -45
- package/layout/layout-footer/layout-footer.component.scss +0 -4
- package/layout/layout-manage-list/layout-manage-list.component.scss +0 -82
- package/layout/layout-nav/README.md +0 -46
- package/layout/layout-nav/layout-nav.component.scss +0 -54
- package/layout/layout-nav-list/layout-nav-list.component.scss +0 -115
- package/layout/layout.component.scss +0 -16
- package/layout/navigation-drawer/navigation-drawer.component.scss +0 -81
- package/menu/index.d.ts +0 -1
- package/menu/menu.component.scss +0 -51
- package/message/index.d.ts +0 -1
- package/message/message.component.scss +0 -32
- package/schematics/README.md +0 -66
- package/schematics/ng-add/files/theme.scss +0 -64
- package/search/index.d.ts +0 -1
- package/search/search-box/README.md +0 -62
- package/search/search-box/search-box.component.scss +0 -37
- package/search/search-input/README.md +0 -65
- package/search/search-input/search-input.component.scss +0 -75
- package/side-sheet/index.d.ts +0 -1
- package/side-sheet/side-sheet.scss +0 -68
- package/theming/prebuilt/blue-grey-deep-orange.scss +0 -20
- package/theming/prebuilt/blue-orange.scss +0 -20
- package/theming/prebuilt/indigo-pink.scss +0 -20
- package/theming/prebuilt/orange-light-blue.scss +0 -20
- package/theming/prebuilt/teal-orange.scss +0 -20
- package/user-profile/index.d.ts +0 -1
- package/user-profile/user-profile-menu/user-profile-menu.component.scss +0 -41
File without changes
|
@@ -137,7 +137,11 @@ $mat-elevation-opacity: 1 !default;
|
|
137
137
|
|
138
138
|
// Applies the correct css rules to an element to give it the elevation specified by $zValue.
|
139
139
|
// The $zValue must be between 0 and 24.
|
140
|
-
@mixin mat-elevation(
|
140
|
+
@mixin mat-elevation(
|
141
|
+
$zValue,
|
142
|
+
$color: $mat-elevation-color,
|
143
|
+
$opacity: $mat-elevation-opacity
|
144
|
+
) {
|
141
145
|
@if type-of($zValue) != number or not unitless($zValue) {
|
142
146
|
@error '$zValue must be a unitless number';
|
143
147
|
}
|
@@ -146,7 +150,8 @@ $mat-elevation-opacity: 1 !default;
|
|
146
150
|
}
|
147
151
|
|
148
152
|
box-shadow: #{map-get(_get-umbra-map($color, $opacity), $zValue)},
|
149
|
-
#{map-get(_get-penumbra-map($color, $opacity), $zValue)},
|
153
|
+
#{map-get(_get-penumbra-map($color, $opacity), $zValue)},
|
154
|
+
#{map-get(_get-ambient-map($color, $opacity), $zValue)};
|
150
155
|
}
|
151
156
|
|
152
157
|
// Returns a string that can be used as the value for a transition property for elevation.
|
@@ -30,6 +30,14 @@
|
|
30
30
|
}
|
31
31
|
|
32
32
|
// Represents a typography level from the Material design spec.
|
33
|
-
@function td-typography-level(
|
34
|
-
|
33
|
+
@function td-typography-level(
|
34
|
+
$font-size,
|
35
|
+
$line-height: $font-size,
|
36
|
+
$font-weight: 400
|
37
|
+
) {
|
38
|
+
@return (
|
39
|
+
font-size: $font-size,
|
40
|
+
line-height: $line-height,
|
41
|
+
font-weight: $font-weight
|
42
|
+
);
|
35
43
|
}
|
@@ -91,7 +91,8 @@ $swift-ease-in: all $swift-ease-in-duration $swift-ease-in-timing-function !defa
|
|
91
91
|
|
92
92
|
$swift-ease-in-out-duration: 0.5s !default;
|
93
93
|
$swift-ease-in-out-timing-function: cubic-bezier(0.35, 0, 0.25, 1) !default;
|
94
|
-
$swift-ease-in-out: all $swift-ease-in-out-duration
|
94
|
+
$swift-ease-in-out: all $swift-ease-in-out-duration
|
95
|
+
$swift-ease-in-out-timing-function !default;
|
95
96
|
|
96
97
|
$swift-linear-duration: 0.08s !default;
|
97
98
|
$swift-linear-timing-function: linear !default;
|
@@ -23,7 +23,13 @@ $mat-icon-button-margin: rem(0.6) !default;
|
|
23
23
|
$mat-icon-border-radius: $mat-fab-border-radius;
|
24
24
|
|
25
25
|
/** Mixin to create distinct classes for fab positions, e.g. ".mat-fab-position-bottom-right". */
|
26
|
-
@mixin mat-fab-position(
|
26
|
+
@mixin mat-fab-position(
|
27
|
+
$spot,
|
28
|
+
$top: auto,
|
29
|
+
$right: auto,
|
30
|
+
$bottom: auto,
|
31
|
+
$left: auto
|
32
|
+
) {
|
27
33
|
[mat-fab].mat-fab-position-#{$spot},
|
28
34
|
.mat-fab.mat-fab-position-#{$spot},
|
29
35
|
[mat-fab].mat-fab-#{$spot},
|
@@ -43,10 +49,34 @@ $mat-icon-border-radius: $mat-fab-border-radius;
|
|
43
49
|
|
44
50
|
@mixin td-button-utilities() {
|
45
51
|
$mat-fab-pos-offset: calc(($mat-fab-size - $mat-fab-padding) / 2);
|
46
|
-
@include mat-fab-position(
|
47
|
-
|
48
|
-
|
49
|
-
|
52
|
+
@include mat-fab-position(
|
53
|
+
bottom-right,
|
54
|
+
auto,
|
55
|
+
$mat-fab-pos-offset,
|
56
|
+
$mat-fab-pos-offset,
|
57
|
+
auto
|
58
|
+
);
|
59
|
+
@include mat-fab-position(
|
60
|
+
bottom-left,
|
61
|
+
auto,
|
62
|
+
auto,
|
63
|
+
$mat-fab-pos-offset,
|
64
|
+
$mat-fab-pos-offset
|
65
|
+
);
|
66
|
+
@include mat-fab-position(
|
67
|
+
top-right,
|
68
|
+
$mat-fab-pos-offset,
|
69
|
+
$mat-fab-pos-offset,
|
70
|
+
auto,
|
71
|
+
auto
|
72
|
+
);
|
73
|
+
@include mat-fab-position(
|
74
|
+
top-left,
|
75
|
+
$mat-fab-pos-offset,
|
76
|
+
auto,
|
77
|
+
auto,
|
78
|
+
$mat-fab-pos-offset
|
79
|
+
);
|
50
80
|
|
51
81
|
button {
|
52
82
|
&[mat-icon-button] {
|
@@ -146,12 +146,13 @@ $color: rgba(0, 0, 0, 1%);
|
|
146
146
|
&[ng-reflect-href] {
|
147
147
|
&:hover {
|
148
148
|
cursor: pointer;
|
149
|
-
box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 20%),
|
149
|
+
box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 20%),
|
150
|
+
0 4px 5px 0 rgba(0, 0, 0, 14%), 0 1px 10px 0 rgba(0, 0, 0, 12%);
|
150
151
|
}
|
151
152
|
|
152
153
|
&:active {
|
153
|
-
box-shadow: 0 6px 6px -3px rgba(0, 0, 0, 20%),
|
154
|
-
0 4px 18px 3px rgba(0, 0, 0, 12%);
|
154
|
+
box-shadow: 0 6px 6px -3px rgba(0, 0, 0, 20%),
|
155
|
+
0 10px 14px 1px rgba(0, 0, 0, 14%), 0 4px 18px 3px rgba(0, 0, 0, 12%);
|
155
156
|
|
156
157
|
& mat-toolbar {
|
157
158
|
background-color: rgba(255, 255, 255, 20%);
|
@@ -161,9 +162,13 @@ $color: rgba(0, 0, 0, 1%);
|
|
161
162
|
|
162
163
|
& mat-toolbar {
|
163
164
|
background-size: 200% 100%;
|
164
|
-
background-image: linear-gradient(
|
165
|
-
|
166
|
-
|
165
|
+
background-image: linear-gradient(
|
166
|
+
to right,
|
167
|
+
transparent 50%,
|
168
|
+
rgba(255, 255, 255, 20%) 50%
|
169
|
+
);
|
170
|
+
transition: background-position 0.3s cubic-bezier(0.19, 1, 0.22, 1) 0.1s,
|
171
|
+
color 0.5s ease 0s, background-color 0.5s ease;
|
167
172
|
}
|
168
173
|
}
|
169
174
|
|
@@ -13,21 +13,29 @@ $shadow-ambient-shadow-opacity: 0.12;
|
|
13
13
|
// NOTE(shyndman): gulp-sass seems to be failing if I split the shadow defs across
|
14
14
|
// multiple lines. Ugly. Sorry.
|
15
15
|
$whiteframe-shadow-1dp: 0 1px 3px 0 rgba(0, 0, 0, $shadow-key-umbra-opacity),
|
16
|
-
0 1px 1px 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
16
|
+
0 1px 1px 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
17
|
+
0 2px 1px -1px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
|
17
18
|
$whiteframe-shadow-2dp: 0 1px 5px 0 rgba(0, 0, 0, $shadow-key-umbra-opacity),
|
18
|
-
0 2px 2px 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
19
|
+
0 2px 2px 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
20
|
+
0 3px 1px -2px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
|
19
21
|
$whiteframe-shadow-3dp: 0 1px 8px 0 rgba(0, 0, 0, $shadow-key-umbra-opacity),
|
20
|
-
0 3px 4px 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
22
|
+
0 3px 4px 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
23
|
+
0 3px 3px -2px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
|
21
24
|
$whiteframe-shadow-4dp: 0 2px 4px -1px rgba(0, 0, 0, $shadow-key-umbra-opacity),
|
22
|
-
0 4px 5px 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
25
|
+
0 4px 5px 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
26
|
+
0 1px 10 0 rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
|
23
27
|
$whiteframe-shadow-5dp: 0 3px 5px -1px rgba(0, 0, 0, $shadow-key-umbra-opacity),
|
24
|
-
0 5px 8px 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
28
|
+
0 5px 8px 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
29
|
+
0 1px 14px 0 rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
|
25
30
|
$whiteframe-shadow-6dp: 0 3px 5px -1px rgba(0, 0, 0, $shadow-key-umbra-opacity),
|
26
|
-
0 6px 10 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
31
|
+
0 6px 10 0 rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
32
|
+
0 1px 18px 0 rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
|
27
33
|
$whiteframe-shadow-7dp: 0 4px 5px -2px rgba(0, 0, 0, $shadow-key-umbra-opacity),
|
28
|
-
0 7px 10 1px rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
34
|
+
0 7px 10 1px rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
35
|
+
0 2px 16px 1px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
|
29
36
|
$whiteframe-shadow-8dp: 0 5px 5px -3px rgba(0, 0, 0, $shadow-key-umbra-opacity),
|
30
|
-
0 8px 10 1px rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
37
|
+
0 8px 10 1px rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
38
|
+
0 3px 14px 2px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
|
31
39
|
$whiteframe-shadow-9dp: 0 5px 6px -3px rgba(0, 0, 0, $shadow-key-umbra-opacity),
|
32
40
|
0 9px 12px 1px rgba(0, 0, 0, $shadow-key-penumbra-opacity),
|
33
41
|
0 3px 16px 2px rgba(0, 0, 0, $shadow-ambient-shadow-opacity) !default;
|
@@ -1,8 +1,10 @@
|
|
1
1
|
The recommended way to use the Material Icons font is by linking to the web font hosted on Google Fonts:
|
2
2
|
|
3
3
|
```html
|
4
|
-
<link
|
5
|
-
|
4
|
+
<link
|
5
|
+
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
6
|
+
rel="stylesheet"
|
7
|
+
/>
|
6
8
|
```
|
7
9
|
|
8
10
|
Read more in our full usage guide:
|
package/covalent-core.d.ts
CHANGED
package/dialogs/README.md
CHANGED
@@ -10,18 +10,18 @@ Note: if no [ViewContainerRef] is provided, [TdDialogService] will throw an erro
|
|
10
10
|
|
11
11
|
#### Methods
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
13
|
+
- openAlert: function(IAlertConfig): MatDialogRef<TdAlertDialogComponent>
|
14
|
+
- Opens an alert dialog with the provided config.
|
15
|
+
- openConfirm: function(IConfirmConfig): MatDialogRef<TdConfirmDialogComponent>
|
16
|
+
- Opens a confirm dialog with the provided config.
|
17
|
+
- openPrompt: function(IPromptConfig): MatDialogRef<TdPromptDialogComponent>
|
18
|
+
- Opens a prompt dialog with the provided config.
|
19
|
+
- open: function<T>(component: ComponentType<T>, config: MatDialogConfig): MatDialogRef<T>
|
20
|
+
- Wrapper function over the open() method in MatDialog. Opens a modal dialog containing the given component.
|
21
|
+
- openDraggable: function<T>(IDraggableConfig<T>): MatDialogRef<T>
|
22
|
+
- Opens a draggable dialog containing the given component
|
23
|
+
- closeAll: function()
|
24
|
+
- Wrapper function over the closeAll() method in MatDialog. Closes all of the currently-open dialogs.
|
25
25
|
|
26
26
|
## Usage
|
27
27
|
|
@@ -132,14 +132,15 @@ import { CovalentDialogsModule } from '@covalent/core/dialogs';
|
|
132
132
|
})
|
133
133
|
export class MyModule {}
|
134
134
|
```
|
135
|
-
After that, just inject [TdDialogService] and use it for your dialogs.
|
136
135
|
|
136
|
+
After that, just inject [TdDialogService] and use it for your dialogs.
|
137
137
|
|
138
138
|
# ResizableDraggableDialog
|
139
139
|
|
140
140
|
A utility to make a draggable dialog resizable.
|
141
141
|
|
142
142
|
## Usage
|
143
|
+
|
143
144
|
```ts
|
144
145
|
constructor(
|
145
146
|
private _dialogService: TdDialogService,
|
@@ -152,15 +153,22 @@ A utility to make a draggable dialog resizable.
|
|
152
153
|
const {
|
153
154
|
matDialogRef,
|
154
155
|
dragRefSubject,
|
155
|
-
}: IDraggableRefs<DraggableResizableDialogComponent> = this._dialogService.openDraggable(
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
156
|
+
}: IDraggableRefs<DraggableResizableDialogComponent> = this._dialogService.openDraggable(
|
157
|
+
{
|
158
|
+
component: DraggableResizableDialogComponent,
|
159
|
+
// CSS selectors of element(s) inside the component meant to be drag handle(s)
|
160
|
+
dragHandleSelectors: ['.drag-handle'],
|
161
|
+
}
|
162
|
+
);
|
160
163
|
|
161
164
|
let resizableDraggableDialog: ResizableDraggableDialog;
|
162
165
|
dragRefSubject.subscribe((dragRf: DragRef) => {
|
163
|
-
resizableDraggableDialog = new ResizableDraggableDialog(
|
166
|
+
resizableDraggableDialog = new ResizableDraggableDialog(
|
167
|
+
this._document,
|
168
|
+
this._renderer2,
|
169
|
+
matDialogRef,
|
170
|
+
dragRf
|
171
|
+
);
|
164
172
|
});
|
165
173
|
|
166
174
|
// Detach resize-ability event listeners after dialog closes
|
@@ -175,16 +183,17 @@ A component that can be utilized to create a dialog with a toolbar
|
|
175
183
|
|
176
184
|
#### Inputs
|
177
185
|
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
186
|
+
- title: string
|
187
|
+
- Title that appears in toolbar
|
188
|
+
- closeLabel: string
|
189
|
+
- Label to be used on close button
|
190
|
+
- toolbarColor: ThemePalette
|
191
|
+
- Toolbar color
|
184
192
|
|
185
193
|
#### Outputs
|
186
|
-
|
187
|
-
|
194
|
+
|
195
|
+
- closed: string
|
196
|
+
- Emitted when close button is clicked
|
188
197
|
|
189
198
|
## Usage
|
190
199
|
|
@@ -207,9 +216,8 @@ export class DraggableResizableWindowDialogComponent {
|
|
207
216
|
```
|
208
217
|
|
209
218
|
```ts
|
210
|
-
const matDialogRef: MatDialogRef<DraggableResizableWindowDialogComponent> =
|
211
|
-
DraggableResizableWindowDialogComponent
|
212
|
-
);
|
219
|
+
const matDialogRef: MatDialogRef<DraggableResizableWindowDialogComponent> =
|
220
|
+
this._dialogService.open(DraggableResizableWindowDialogComponent);
|
213
221
|
// listen to close event
|
214
222
|
matDialogRef.componentInstance.closed.subscribe(() => matDialogRef.close());
|
215
223
|
```
|
@@ -2,9 +2,9 @@ import { MatDialogRef } from '@angular/material/dialog';
|
|
2
2
|
import * as i0 from "@angular/core";
|
3
3
|
export declare class TdAlertDialogComponent {
|
4
4
|
private _dialogRef;
|
5
|
-
title
|
6
|
-
message
|
7
|
-
closeButton
|
5
|
+
title?: string;
|
6
|
+
message?: string;
|
7
|
+
closeButton?: string;
|
8
8
|
constructor(_dialogRef: MatDialogRef<TdAlertDialogComponent>);
|
9
9
|
close(): void;
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<TdAlertDialogComponent, never>;
|
@@ -2,8 +2,8 @@ import { MatDialogRef } from '@angular/material/dialog';
|
|
2
2
|
import * as i0 from "@angular/core";
|
3
3
|
export declare class TdConfirmDialogComponent {
|
4
4
|
private _dialogRef;
|
5
|
-
title
|
6
|
-
message
|
5
|
+
title?: string;
|
6
|
+
message?: string;
|
7
7
|
cancelButton: string;
|
8
8
|
acceptButton: string;
|
9
9
|
isDestructive: boolean;
|
@@ -2,15 +2,15 @@ import { QueryList, AfterContentInit } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
3
3
|
export declare class TdDialogTitleDirective {
|
4
4
|
static ɵfac: i0.ɵɵFactoryDeclaration<TdDialogTitleDirective, never>;
|
5
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TdDialogTitleDirective, "
|
5
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TdDialogTitleDirective, "[tdDialogTitle]", never, {}, {}, never>;
|
6
6
|
}
|
7
7
|
export declare class TdDialogContentDirective {
|
8
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<TdDialogContentDirective, never>;
|
9
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TdDialogContentDirective, "
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TdDialogContentDirective, "[tdDialogContent]", never, {}, {}, never>;
|
10
10
|
}
|
11
11
|
export declare class TdDialogActionsDirective {
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<TdDialogActionsDirective, never>;
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TdDialogActionsDirective, "
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TdDialogActionsDirective, "[tdDialogActions]", never, {}, {}, never>;
|
14
14
|
}
|
15
15
|
export declare class TdDialogComponent implements AfterContentInit {
|
16
16
|
dialogTitle: QueryList<TdDialogTitleDirective>;
|
@@ -18,5 +18,5 @@ export declare class TdDialogComponent implements AfterContentInit {
|
|
18
18
|
dialogActions: QueryList<TdDialogActionsDirective>;
|
19
19
|
ngAfterContentInit(): void;
|
20
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<TdDialogComponent, never>;
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TdDialogComponent, "td-dialog", never, {}, {}, ["dialogTitle", "dialogContent", "dialogActions"], ["
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TdDialogComponent, "td-dialog", never, {}, {}, ["dialogTitle", "dialogContent", "dialogActions"], ["[tdDialogTitle]", "[tdDialogContent]", "[tdDialogActions]"]>;
|
22
22
|
}
|
@@ -14,6 +14,6 @@ import * as i12 from "@angular/material/tooltip";
|
|
14
14
|
import * as i13 from "@angular/material/icon";
|
15
15
|
export declare class CovalentDialogsModule {
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<CovalentDialogsModule, never>;
|
17
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CovalentDialogsModule, [typeof i1.TdAlertDialogComponent, typeof i2.TdConfirmDialogComponent, typeof i3.TdPromptDialogComponent, typeof i4.TdDialogComponent, typeof i4.TdDialogTitleDirective, typeof i4.TdDialogActionsDirective, typeof i4.TdDialogContentDirective, typeof i5.TdWindowDialogComponent], [typeof i6.FormsModule, typeof i7.CommonModule, typeof i8.MatDialogModule, typeof i9.MatInputModule, typeof i10.MatButtonModule, typeof i11.MatToolbarModule, typeof i12.MatTooltipModule, typeof i13.MatIconModule], [typeof i1.TdAlertDialogComponent, typeof i2.TdConfirmDialogComponent, typeof i3.TdPromptDialogComponent, typeof i4.TdDialogComponent, typeof i4.TdDialogTitleDirective, typeof i4.TdDialogActionsDirective, typeof i4.TdDialogContentDirective, typeof i5.TdWindowDialogComponent]>;
|
17
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CovalentDialogsModule, [typeof i1.TdAlertDialogComponent, typeof i2.TdConfirmDialogComponent, typeof i3.TdPromptDialogComponent, typeof i4.TdDialogComponent, typeof i4.TdDialogTitleDirective, typeof i4.TdDialogActionsDirective, typeof i4.TdDialogContentDirective, typeof i5.TdWindowDialogComponent, typeof i1.TdAlertDialogComponent, typeof i2.TdConfirmDialogComponent, typeof i3.TdPromptDialogComponent], [typeof i6.FormsModule, typeof i7.CommonModule, typeof i8.MatDialogModule, typeof i9.MatInputModule, typeof i10.MatButtonModule, typeof i11.MatToolbarModule, typeof i12.MatTooltipModule, typeof i13.MatIconModule], [typeof i1.TdAlertDialogComponent, typeof i2.TdConfirmDialogComponent, typeof i3.TdPromptDialogComponent, typeof i4.TdDialogComponent, typeof i4.TdDialogTitleDirective, typeof i4.TdDialogActionsDirective, typeof i4.TdDialogContentDirective, typeof i5.TdWindowDialogComponent, typeof i1.TdAlertDialogComponent, typeof i2.TdConfirmDialogComponent, typeof i3.TdPromptDialogComponent]>;
|
18
18
|
static ɵinj: i0.ɵɵInjectorDeclaration<CovalentDialogsModule>;
|
19
19
|
}
|
@@ -3,9 +3,9 @@ import { MatDialogRef } from '@angular/material/dialog';
|
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export declare class TdPromptDialogComponent implements AfterViewInit {
|
5
5
|
private _dialogRef;
|
6
|
-
title
|
7
|
-
message
|
8
|
-
value
|
6
|
+
title?: string;
|
7
|
+
message?: string;
|
8
|
+
value?: string;
|
9
9
|
cancelButton: string;
|
10
10
|
acceptButton: string;
|
11
11
|
_input: ElementRef;
|
File without changes
|
@@ -0,0 +1,223 @@
|
|
1
|
+
# TdDialogService
|
2
|
+
|
3
|
+
Service provided with methods that wrap the @angular/material [MatDialog] service and provide an easier experience for simple dialogs.
|
4
|
+
|
5
|
+
Note: if no [ViewContainerRef] is provided, [TdDialogService] will throw an error.
|
6
|
+
|
7
|
+
<br/>
|
8
|
+
|
9
|
+
## API Summary
|
10
|
+
|
11
|
+
#### Methods
|
12
|
+
|
13
|
+
- openAlert: function(IAlertConfig): MatDialogRef<TdAlertDialogComponent>
|
14
|
+
- Opens an alert dialog with the provided config.
|
15
|
+
- openConfirm: function(IConfirmConfig): MatDialogRef<TdConfirmDialogComponent>
|
16
|
+
- Opens a confirm dialog with the provided config.
|
17
|
+
- openPrompt: function(IPromptConfig): MatDialogRef<TdPromptDialogComponent>
|
18
|
+
- Opens a prompt dialog with the provided config.
|
19
|
+
- open: function<T>(component: ComponentType<T>, config: MatDialogConfig): MatDialogRef<T>
|
20
|
+
- Wrapper function over the open() method in MatDialog. Opens a modal dialog containing the given component.
|
21
|
+
- openDraggable: function<T>(IDraggableConfig<T>): MatDialogRef<T>
|
22
|
+
- Opens a draggable dialog containing the given component
|
23
|
+
- closeAll: function()
|
24
|
+
- Wrapper function over the closeAll() method in MatDialog. Closes all of the currently-open dialogs.
|
25
|
+
|
26
|
+
## Usage
|
27
|
+
|
28
|
+
TypeScript
|
29
|
+
|
30
|
+
```typescript
|
31
|
+
import { ViewContainerRef } from '@angular/core';
|
32
|
+
import { TdDialogService } from '@covalent/core/dialogs';
|
33
|
+
...
|
34
|
+
})
|
35
|
+
export class Demo {
|
36
|
+
constructor(private _dialogService: TdDialogService,
|
37
|
+
private _viewContainerRef: ViewContainerRef) {
|
38
|
+
...
|
39
|
+
}
|
40
|
+
|
41
|
+
openAlert(): void {
|
42
|
+
this._dialogService.openAlert({
|
43
|
+
message: 'This is how simple it is to create an alert with this wrapper service.',
|
44
|
+
disableClose: true | false, // defaults to false
|
45
|
+
viewContainerRef: this._viewContainerRef, //OPTIONAL
|
46
|
+
title: 'Alert', //OPTIONAL, hides if not provided
|
47
|
+
closeButton: 'Close', //OPTIONAL, defaults to 'CLOSE'
|
48
|
+
width: '400px', //OPTIONAL, defaults to 400px
|
49
|
+
});
|
50
|
+
}
|
51
|
+
|
52
|
+
openConfirm(): void {
|
53
|
+
this._dialogService.openConfirm({
|
54
|
+
message: 'This is how simple it is to create a confirm with this wrapper service. Do you agree?',
|
55
|
+
disableClose: true | false, // defaults to false
|
56
|
+
viewContainerRef: this._viewContainerRef, //OPTIONAL
|
57
|
+
title: 'Confirm', //OPTIONAL, hides if not provided
|
58
|
+
cancelButton: 'Disagree', //OPTIONAL, defaults to 'CANCEL'
|
59
|
+
acceptButton: 'Agree', //OPTIONAL, defaults to 'ACCEPT'
|
60
|
+
isDestructive: false, //OPTIONAL, defaults to false
|
61
|
+
width: '500px', //OPTIONAL, defaults to 400px
|
62
|
+
}).afterClosed().subscribe((accept: boolean) => {
|
63
|
+
if (accept) {
|
64
|
+
// DO SOMETHING
|
65
|
+
} else {
|
66
|
+
// DO SOMETHING ELSE
|
67
|
+
}
|
68
|
+
});
|
69
|
+
}
|
70
|
+
|
71
|
+
openPrompt(): void {
|
72
|
+
this._dialogService.openPrompt({
|
73
|
+
message: 'This is how simple it is to create a prompt with this wrapper service. Prompt something.',
|
74
|
+
disableClose: true | false, // defaults to false
|
75
|
+
viewContainerRef: this._viewContainerRef, //OPTIONAL
|
76
|
+
title: 'Prompt', //OPTIONAL, hides if not provided
|
77
|
+
value: 'Prepopulated value', //OPTIONAL
|
78
|
+
cancelButton: 'Cancel', //OPTIONAL, defaults to 'CANCEL'
|
79
|
+
acceptButton: 'Ok', //OPTIONAL, defaults to 'ACCEPT'
|
80
|
+
width: '400px', //OPTIONAL, defaults to 400px
|
81
|
+
}).afterClosed().subscribe((newValue: string) => {
|
82
|
+
if (newValue) {
|
83
|
+
// DO SOMETHING
|
84
|
+
} else {
|
85
|
+
// DO SOMETHING ELSE
|
86
|
+
}
|
87
|
+
});
|
88
|
+
}
|
89
|
+
|
90
|
+
openDraggable(): void {
|
91
|
+
this._dialogService.openDraggable({
|
92
|
+
component: DraggableDemoComponent,
|
93
|
+
config: { height: '300px' },
|
94
|
+
// CSS selectors of element(s) inside the component meant to be drag handle(s)
|
95
|
+
dragHandleSelectors: ['.drag-handle'],
|
96
|
+
// Class that will be added to the component signifying drag-ability
|
97
|
+
draggableClass: 'custom-class',
|
98
|
+
});
|
99
|
+
}
|
100
|
+
}
|
101
|
+
```
|
102
|
+
|
103
|
+
```typescript
|
104
|
+
import { Component } from '@angular/core';
|
105
|
+
|
106
|
+
@Component({
|
107
|
+
selector: 'app-draggable-demo',
|
108
|
+
template: `
|
109
|
+
<h2>Draggable dialog</h2>
|
110
|
+
<p>Draggable via the drag handle</p>
|
111
|
+
<button mat-icon-button class="drag-handle">
|
112
|
+
<mat-icon>drag_handle</mat-icon>
|
113
|
+
</button>
|
114
|
+
`,
|
115
|
+
})
|
116
|
+
export class DraggableDemoComponent {}
|
117
|
+
```
|
118
|
+
|
119
|
+
## Setup
|
120
|
+
|
121
|
+
Import the [CovalentDialogsModule] in your NgModule:
|
122
|
+
|
123
|
+
```typescript
|
124
|
+
import { CovalentDialogsModule } from '@covalent/core/dialogs';
|
125
|
+
|
126
|
+
@NgModule({
|
127
|
+
imports: [
|
128
|
+
CovalentDialogsModule,
|
129
|
+
...
|
130
|
+
],
|
131
|
+
...
|
132
|
+
})
|
133
|
+
export class MyModule {}
|
134
|
+
```
|
135
|
+
|
136
|
+
After that, just inject [TdDialogService] and use it for your dialogs.
|
137
|
+
|
138
|
+
# ResizableDraggableDialog
|
139
|
+
|
140
|
+
A utility to make a draggable dialog resizable.
|
141
|
+
|
142
|
+
## Usage
|
143
|
+
|
144
|
+
```ts
|
145
|
+
constructor(
|
146
|
+
private _dialogService: TdDialogService,
|
147
|
+
@Inject(DOCUMENT) private _document: any,
|
148
|
+
private _renderer2: Renderer2,
|
149
|
+
) {}
|
150
|
+
```
|
151
|
+
|
152
|
+
```ts
|
153
|
+
const {
|
154
|
+
matDialogRef,
|
155
|
+
dragRefSubject,
|
156
|
+
}: IDraggableRefs<DraggableResizableDialogComponent> = this._dialogService.openDraggable(
|
157
|
+
{
|
158
|
+
component: DraggableResizableDialogComponent,
|
159
|
+
// CSS selectors of element(s) inside the component meant to be drag handle(s)
|
160
|
+
dragHandleSelectors: ['.drag-handle'],
|
161
|
+
}
|
162
|
+
);
|
163
|
+
|
164
|
+
let resizableDraggableDialog: ResizableDraggableDialog;
|
165
|
+
dragRefSubject.subscribe((dragRf: DragRef) => {
|
166
|
+
resizableDraggableDialog = new ResizableDraggableDialog(
|
167
|
+
this._document,
|
168
|
+
this._renderer2,
|
169
|
+
matDialogRef,
|
170
|
+
dragRf
|
171
|
+
);
|
172
|
+
});
|
173
|
+
|
174
|
+
// Detach resize-ability event listeners after dialog closes
|
175
|
+
matDialogRef.afterClosed().subscribe(() => resizableDraggableDialog.detach());
|
176
|
+
```
|
177
|
+
|
178
|
+
# TdWindowDialogComponent
|
179
|
+
|
180
|
+
A component that can be utilized to create a dialog with a toolbar
|
181
|
+
|
182
|
+
## API Summary
|
183
|
+
|
184
|
+
#### Inputs
|
185
|
+
|
186
|
+
- title: string
|
187
|
+
- Title that appears in toolbar
|
188
|
+
- closeLabel: string
|
189
|
+
- Label to be used on close button
|
190
|
+
- toolbarColor: ThemePalette
|
191
|
+
- Toolbar color
|
192
|
+
|
193
|
+
#### Outputs
|
194
|
+
|
195
|
+
- closed: string
|
196
|
+
- Emitted when close button is clicked
|
197
|
+
|
198
|
+
## Usage
|
199
|
+
|
200
|
+
```ts
|
201
|
+
@Component({
|
202
|
+
template: `
|
203
|
+
<td-window-dialog
|
204
|
+
[title]="'Title'"
|
205
|
+
[toolbarColor]="'accent'"
|
206
|
+
[closeLabel]="'Close'"
|
207
|
+
(closed)="closed.emit()"
|
208
|
+
>
|
209
|
+
<p>Comes with a handy toolbar</p>
|
210
|
+
</td-window-dialog>
|
211
|
+
`,
|
212
|
+
})
|
213
|
+
export class DraggableResizableWindowDialogComponent {
|
214
|
+
@Output() closed: EventEmitter<void> = new EventEmitter();
|
215
|
+
}
|
216
|
+
```
|
217
|
+
|
218
|
+
```ts
|
219
|
+
const matDialogRef: MatDialogRef<DraggableResizableWindowDialogComponent> =
|
220
|
+
this._dialogService.open(DraggableResizableWindowDialogComponent);
|
221
|
+
// listen to close event
|
222
|
+
matDialogRef.componentInstance.closed.subscribe(() => matDialogRef.close());
|
223
|
+
```
|
@@ -2,11 +2,11 @@ import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { ThemePalette } from '@angular/material/core';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export declare class TdWindowDialogComponent {
|
5
|
-
toolbarColor
|
6
|
-
docked
|
7
|
-
title
|
8
|
-
toggleDockedStateLabel
|
9
|
-
closeLabel
|
5
|
+
toolbarColor?: ThemePalette;
|
6
|
+
docked?: boolean | undefined;
|
7
|
+
title?: string;
|
8
|
+
toggleDockedStateLabel?: string;
|
9
|
+
closeLabel?: string;
|
10
10
|
dockToggled: EventEmitter<boolean>;
|
11
11
|
closed: EventEmitter<void>;
|
12
12
|
toolbarHeight: number;
|