@momentum-ui/web-components 2.16.12 → 2.16.14
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/dist/chunks/md-10.js +1 -1
- package/dist/chunks/md-11.js +1 -1
- package/dist/chunks/md-14.js +2 -2
- package/dist/chunks/md-15.js +1 -1
- package/dist/chunks/md-17.js +1 -1
- package/dist/chunks/md-18.js +1 -1
- package/dist/chunks/md-19.js +1 -1
- package/dist/chunks/md-20.js +1 -1
- package/dist/chunks/md-21.js +1 -1
- package/dist/chunks/md-22.js +1 -1
- package/dist/chunks/md-25.js +1 -1
- package/dist/chunks/md-27.js +1 -1
- package/dist/chunks/md-28.js +1 -1
- package/dist/chunks/md-29.js +1 -1
- package/dist/chunks/md-30.js +1 -1
- package/dist/chunks/md-31.js +1 -1
- package/dist/chunks/md-32.js +1 -1
- package/dist/chunks/md-33.js +1 -1
- package/dist/chunks/md-34.js +9 -9
- package/dist/chunks/md-35.js +3 -3
- package/dist/chunks/md-37.js +1 -1
- package/dist/chunks/md-38.js +1 -1
- package/dist/chunks/md-39.js +1 -1
- package/dist/chunks/md-41.js +1 -1
- package/dist/chunks/md-42.js +1 -1
- package/dist/chunks/md-43.js +1 -1
- package/dist/chunks/md-44.js +1 -1
- package/dist/chunks/md-45.js +2 -2
- package/dist/chunks/md-46.js +1 -1
- package/dist/chunks/md-47.js +1 -27
- package/dist/chunks/md-48.js +26 -4
- package/dist/chunks/md-49.js +4 -37
- package/dist/chunks/md-5.js +1 -1
- package/dist/chunks/md-50.js +38 -13
- package/dist/chunks/md-51.js +12 -33
- package/dist/chunks/md-52.js +34 -20
- package/dist/chunks/md-53.js +18 -119
- package/dist/chunks/md-54.js +114 -91
- package/dist/chunks/md-55.js +98 -11
- package/dist/chunks/md-56.js +11 -5
- package/dist/chunks/md-57.js +4 -76
- package/dist/chunks/md-58.js +68 -59
- package/dist/chunks/md-59.js +64 -18
- package/dist/chunks/md-6.js +2 -2
- package/dist/chunks/md-60.js +22 -14
- package/dist/chunks/md-61.js +14 -5
- package/dist/chunks/md-62.js +5 -51
- package/dist/chunks/md-63.js +51 -22
- package/dist/chunks/md-64.js +19 -44
- package/dist/chunks/md-65.js +46 -4
- package/dist/chunks/md-66.js +5 -1
- package/dist/chunks/md-67.js +1 -23
- package/dist/chunks/md-68.js +23 -5
- package/dist/chunks/md-69.js +4 -10
- package/dist/chunks/md-70.js +9 -136
- package/dist/chunks/md-71.js +135 -27
- package/dist/chunks/md-72.js +29 -69
- package/dist/chunks/md-73.js +70 -19
- package/dist/chunks/md-74.js +19 -22
- package/dist/chunks/md-75.js +21 -16
- package/dist/chunks/md-76.js +17 -76
- package/dist/chunks/md-77.js +76 -7
- package/dist/chunks/md-78.js +7 -72
- package/dist/chunks/md-79.js +72 -77
- package/dist/chunks/md-80.js +78 -71
- package/dist/chunks/md-81.js +69 -15
- package/dist/chunks/md-82.js +16 -4
- package/dist/chunks/md-83.js +4 -18
- package/dist/chunks/md-84.js +19 -1
- package/dist/chunks/md-85.js +1 -168
- package/dist/chunks/md-86.js +167 -42
- package/dist/chunks/md-87.js +41 -99
- package/dist/chunks/md-88.js +94 -75
- package/dist/chunks/md-89.js +81 -11
- package/dist/chunks/md-90.js +11 -42
- package/dist/chunks/md-91.js +41 -32
- package/dist/chunks/md-92.js +34 -1
- package/dist/comp/md-accordion-entry.js +1 -1
- package/dist/comp/md-accordion-item-entry.js +1 -1
- package/dist/comp/md-accordion-item.js +1 -1
- package/dist/comp/md-accordion.js +1 -1
- package/dist/comp/md-activity-button-entry.js +1 -1
- package/dist/comp/md-activity-button.js +1 -1
- package/dist/comp/md-advance-list-entry.js +1 -1
- package/dist/comp/md-advance-list.js +1 -1
- package/dist/comp/md-alert-banner-entry.js +1 -1
- package/dist/comp/md-alert-banner.js +1 -1
- package/dist/comp/md-alert-entry.js +1 -1
- package/dist/comp/md-alert.js +1 -1
- package/dist/comp/md-audio-player-entry.js +1 -1
- package/dist/comp/md-audio-player.js +1 -1
- package/dist/comp/md-avatar-entry.js +1 -1
- package/dist/comp/md-badge-entry.js +1 -1
- package/dist/comp/md-breadcrumb-entry.js +1 -1
- package/dist/comp/md-breadcrumb.js +1 -1
- package/dist/comp/md-button-group-entry.js +1 -1
- package/dist/comp/md-button-group.js +1 -1
- package/dist/comp/md-card-ai-entry.js +1 -1
- package/dist/comp/md-card-ai.js +1 -1
- package/dist/comp/md-card-entry.js +1 -1
- package/dist/comp/md-card.js +1 -1
- package/dist/comp/md-chat-message-entry.js +1 -1
- package/dist/comp/md-chat-message.js +1 -1
- package/dist/comp/md-checkbox-entry.js +1 -1
- package/dist/comp/md-checkbox.js +1 -1
- package/dist/comp/md-checkboxgroup-entry.js +1 -1
- package/dist/comp/md-checkboxgroup.js +1 -1
- package/dist/comp/md-chip-entry.js +1 -1
- package/dist/comp/md-chip.js +1 -1
- package/dist/comp/md-coachmark-entry.js +1 -1
- package/dist/comp/md-coachmark-popover-entry.js +1 -1
- package/dist/comp/md-coachmark-popover.js +1 -1
- package/dist/comp/md-coachmark.js +1 -1
- package/dist/comp/md-combobox-entry.js +1 -1
- package/dist/comp/md-composite-avatar-entry.js +1 -1
- package/dist/comp/md-composite-avatar.js +1 -1
- package/dist/comp/md-date-range-picker-entry.js +1 -1
- package/dist/comp/md-date-range-picker.js +1 -1
- package/dist/comp/md-date-time-picker-entry.js +1 -1
- package/dist/comp/md-date-time-picker.js +1 -1
- package/dist/comp/md-datepicker-calendar-entry.js +1 -1
- package/dist/comp/md-datepicker-day-entry.js +1 -1
- package/dist/comp/md-datepicker-entry.js +1 -1
- package/dist/comp/md-datepicker-month-entry.js +1 -1
- package/dist/comp/md-datepicker-week-entry.js +1 -1
- package/dist/comp/md-draggable-entry.js +1 -1
- package/dist/comp/md-draggable-item-entry.js +1 -1
- package/dist/comp/md-draggable-item.js +1 -1
- package/dist/comp/md-draggable.js +1 -1
- package/dist/comp/md-dropdown-entry.js +1 -1
- package/dist/comp/md-dropdown.js +1 -1
- package/dist/comp/md-editable-field-entry.js +1 -1
- package/dist/comp/md-editable-field.js +1 -1
- package/dist/comp/md-favorite-entry.js +1 -1
- package/dist/comp/md-floating-minimize-entry.js +1 -1
- package/dist/comp/md-floating-modal-entry.js +1 -1
- package/dist/comp/md-floating-modal.js +1 -1
- package/dist/comp/md-form-entry.js +1 -1
- package/dist/comp/md-form.js +1 -1
- package/dist/comp/md-grabber-entry.js +1 -1
- package/dist/comp/md-grabber.js +1 -1
- package/dist/comp/md-help-text-entry.js +1 -1
- package/dist/comp/md-icon-entry.js +1 -1
- package/dist/comp/md-inpu.js +1 -1
- package/dist/comp/md-input-entry.js +1 -1
- package/dist/comp/md-input-file.js +1 -1
- package/dist/comp/md-label-entry.js +1 -1
- package/dist/comp/md-list-entry.js +1 -1
- package/dist/comp/md-list-item-entry.js +1 -1
- package/dist/comp/md-meeting-alert-entry.js +1 -1
- package/dist/comp/md-meeting-alert.js +1 -1
- package/dist/comp/md-menu-entry.js +1 -1
- package/dist/comp/md-menu-item-entry.js +1 -1
- package/dist/comp/md-menu.js +1 -1
- package/dist/comp/md-modal-entry.js +1 -1
- package/dist/comp/md-modal.js +2 -1
- package/dist/comp/md-pagination-entry.js +1 -1
- package/dist/comp/md-pagination.js +1 -1
- package/dist/comp/md-phone-input-entry.js +1 -1
- package/dist/comp/md-phone-input.js +1 -1
- package/dist/comp/md-popover-entry.js +1 -1
- package/dist/comp/md-radio-entry.js +1 -1
- package/dist/comp/md-radio.js +2 -2
- package/dist/comp/md-radiogroup-entry.js +1 -1
- package/dist/comp/md-radiogroup.js +2 -2
- package/dist/comp/md-slider-entry.js +1 -1
- package/dist/comp/md-slider.js +1 -1
- package/dist/comp/md-spinner-entry.js +1 -1
- package/dist/comp/md-tab-entry.js +1 -1
- package/dist/comp/md-tab-panel-entry.js +1 -1
- package/dist/comp/md-tab-panel.js +1 -1
- package/dist/comp/md-tab.js +1 -1
- package/dist/comp/md-table-advanced-entry.js +1 -1
- package/dist/comp/md-table-advanced.js +1 -1
- package/dist/comp/md-table-entry.js +1 -1
- package/dist/comp/md-table.js +1 -1
- package/dist/comp/md-tabs-entry.js +1 -1
- package/dist/comp/md-tabs.js +2 -2
- package/dist/comp/md-task-item-entry.js +1 -1
- package/dist/comp/md-task-item.js +1 -1
- package/dist/comp/md-theme-entry.js +1 -1
- package/dist/comp/md-theme.js +1 -1
- package/dist/comp/md-timepicker-entry.js +1 -1
- package/dist/comp/md-timepicker.js +1 -1
- package/dist/comp/md-toggle-switch-entry.js +1 -1
- package/dist/comp/md-toggle-switch.js +1 -1
- package/dist/index-entry.js +2 -2
- package/dist/index.js +36 -36
- package/dist/managers/thememanager-entry.js +1 -1
- package/dist/managers/thememanager.js +1 -1
- package/dist/types/components/grabber/Grabber.d.ts +1 -0
- package/dist/types/components/link/Link.d.ts +7 -0
- package/dist/types/components/modal/Modal.d.ts +4 -0
- package/package.json +2 -2
package/dist/chunks/md-78.js
CHANGED
|
@@ -1,72 +1,7 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[78],{128:function(d,e,m){"use strict";m.r(e),m.d(e,"modalType",(function(){return f})),m.d(e,"Modal",(function(){return p}));m(17),m(14);var o=m(1),a=m(7),l=m(5),t=m(6),i=m(0),n=m(2),r=m(4),s=m(3),h=i.css`.md-modal{color:var(--md-primary-text-color,#121212);display:block;height:100vh;left:0;margin:0 auto;position:fixed;right:0;visibility:visible;width:100vw;width:100vw;max-height:none;top:auto}.md-modal .md-modal__content{height:auto;min-height:0;max-height:none}.md-modal .md-modal__content{border-radius:var(--modal-main-radius,.5rem)}.md-modal .md-modal__title{color:var(--md-primary-text-color,#707070)}.md-modal:focus{box-shadow:none}.md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:1rem;line-height:1.5rem;width:100%;flex-shrink:0;padding-bottom:1rem;padding-left:calc(1rem/2);padding-right:calc(1rem/2)}.md-modal__header h2{font-size:inherit;font-weight:inherit;line-height:inherit;margin:0}.md-modal__header .md-modal__title{overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;width:100%}.md-modal__header .md-modal__message{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:.875rem;line-height:1.5rem;width:100%;color:var(--modal-main-text-color,#545454);flex-flow:row wrap;text-align:center}.md-modal__header .md-modal__close{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;border:0;position:absolute}.md-modal__content{background-color:var(--modal-main-bg-color,#fff);box-shadow:0 8px 16px 0 rgba(0,0,0,.16);border:1px solid var(--modal-main-border-color,#dedede);display:flex;flex-direction:column}.md-modal__flex-container{display:flex;flex:1 1 0%;flex-direction:column;max-height:inherit;min-height:inherit;padding:var(--modal-main-padding,1.5rem 1rem);width:100%}.md-modal__body{align-items:stretch;align-self:stretch;background:var(--modal-main-bg-color,#fff);display:flex;flex:1 1 auto;flex-direction:column;margin:0;overflow-x:hidden;overflow-y:auto;padding-left:calc(1rem/2);padding-right:calc(1rem/2)}.md-modal__body--padding{padding:0 2rem}.md-modal__footer{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-end;flex-shrink:0;padding-left:calc(1rem/2);padding-right:calc(1rem/2);padding-top:1rem;width:100%}.md-modal__footer md-button:not(:first-of-type){margin-left:.75rem}.md-modal__footer ::slotted(md-button){margin-left:.75rem}.md-modal.md-modal--full{width:100vw;max-height:none;top:auto}.md-modal.md-modal--full .md-modal__content{height:100vh;min-height:0;max-height:none}.md-modal.md-modal--full .md-modal__content{border-radius:0}.md-modal.md-modal--full .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:2.25rem;line-height:3rem;width:100%}.md-modal.md-modal--full .md-modal__header .md-modal__message{font-size:1.25rem;line-height:2rem;padding-top:1.25rem}.md-modal.md-modal--full .md-modal__header .md-modal__close{height:1.25rem;right:1.5rem;top:auto;width:1.25rem}.md-modal.md-modal--full .md-modal__header .md-modal__close::before{font-size:1.25rem}.md-modal.md-modal--full .md-modal__footer{padding-bottom:1.5rem;padding-top:1.5rem}.md-modal.md-modal--large{width:60rem;max-height:none;top:auto}.md-modal.md-modal--large .md-modal__content{min-height:45rem;max-height:none}.md-modal.md-modal--large .md-modal__content{border-radius:var(--modal-main-radius,.5rem)}.md-modal.md-modal--large .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:1.625rem;line-height:2rem;width:100%}.md-modal.md-modal--large .md-modal__header .md-modal__message{font-size:1rem;line-height:1.5rem;text-align:left}.md-modal.md-modal--large .md-modal__header .md-modal__close{height:1rem;right:1rem;top:auto;width:1rem}.md-modal.md-modal--large .md-modal__header .md-modal__close::before{font-size:1rem}@media only screen and (min-width:40.0625em)and (max-width:64em){.md-modal.md-modal--large{width:40rem;max-height:none;top:auto}.md-modal.md-modal--large .md-modal__content{min-height:30rem;max-height:none}.md-modal.md-modal--large .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:1rem;line-height:1.5rem;width:100%}.md-modal.md-modal--large .md-modal__header .md-modal__message{font-size:.875rem;line-height:1.5rem;text-align:center}.md-modal.md-modal--large .md-modal__header .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--large .md-modal__header .md-modal__close::before{font-size:.875rem}}@media only screen and (max-height:50em){.md-modal.md-modal--large .md-modal__content{min-height:auto}}.md-modal.md-modal--default,.md-modal.md-modal--medium{width:40rem;max-height:none;top:auto}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:30rem;max-height:none}.md-modal.md-modal--default .md-modal__close,.md-modal.md-modal--medium .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--default .md-modal__close::before,.md-modal.md-modal--medium .md-modal__close::before{font-size:.875rem}@media only screen and (min-width:40.0625em)and (max-width:64em){.md-modal.md-modal--default,.md-modal.md-modal--medium{width:40rem;max-height:none;top:auto}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:30rem;max-height:none}}@media only screen and (max-height:50em){.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:auto}}.md-modal.md-modal--small{width:27.5rem;max-height:none;top:auto}.md-modal.md-modal--small .md-modal__content{min-height:23.75rem;max-height:none}.md-modal.md-modal--small .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--small .md-modal__close::before{font-size:.875rem}@media only screen and (min-width:40.0625em)and (max-width:64em){.md-modal.md-modal--small{width:27.5rem;max-height:none;top:auto}.md-modal.md-modal--small .md-modal__content{min-height:23.75rem;max-height:none}}.md-modal.md-modal--dialog{width:27.5rem;max-height:none;top:auto}.md-modal.md-modal--dialog .md-modal__content{height:auto;min-height:0;max-height:none}.md-modal.md-modal--dialog .md-modal__content{border-radius:var(--modal-main-radius,.5rem)}.md-modal.md-modal--dialog .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--dialog .md-modal__close::before{font-size:.875rem}.md-modal.md-modal--dialog .md-modal__content{flex-direction:row}.md-modal.md-modal--dialog .md-modal__content .md-modal__header{align-items:flex-start;padding:0 0 .75rem 0}.md-modal.md-modal--dialog .md-modal__content .md-modal__title{font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:16px;line-height:1.5rem}.md-modal.md-modal--dialog .md-modal__content .md-modal__body{margin-bottom:1.5rem;text-align:left}.md-modal.md-modal--dialog .md-modal__content .md-modal__body>*{font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:14px;line-height:1.375rem}.md-modal.md-modal--dialog .md-modal__content .md-modal__footer{display:flex;justify-content:flex-end;padding:0}.md-modal.md-modal--default,.md-modal.md-modal--dialog,.md-modal.md-modal--full,.md-modal.md-modal--large,.md-modal.md-modal--medium,.md-modal.md-modal--small{display:flex;flex-direction:column;justify-content:center}@media only screen and (max-width:40em){.md-modal.md-modal--default.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--dialog.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--full.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--large.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--medium.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--small.md-modal--dialog .md-modal__flex-container{min-height:calc(100vh - 1.5rem*2)}}@media only screen and (max-width:40em){.md-modal.md-modal--default,.md-modal.md-modal--dialog,.md-modal.md-modal--full,.md-modal.md-modal--large,.md-modal.md-modal--medium,.md-modal.md-modal--small{width:100vw;max-height:none;top:auto}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--dialog .md-modal__content,.md-modal.md-modal--full .md-modal__content,.md-modal.md-modal--large .md-modal__content,.md-modal.md-modal--medium .md-modal__content,.md-modal.md-modal--small .md-modal__content{height:100vh;min-height:0;max-height:none}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--dialog .md-modal__content,.md-modal.md-modal--full .md-modal__content,.md-modal.md-modal--large .md-modal__content,.md-modal.md-modal--medium .md-modal__content,.md-modal.md-modal--small .md-modal__content{border-radius:0}.md-modal.md-modal--default .md-modal__flex-container,.md-modal.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--full .md-modal__flex-container,.md-modal.md-modal--large .md-modal__flex-container,.md-modal.md-modal--medium .md-modal__flex-container,.md-modal.md-modal--small .md-modal__flex-container{min-height:100vh}.md-modal.md-modal--default .md-modal__header,.md-modal.md-modal--dialog .md-modal__header,.md-modal.md-modal--full .md-modal__header,.md-modal.md-modal--large .md-modal__header,.md-modal.md-modal--medium .md-modal__header,.md-modal.md-modal--small .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:.875rem;line-height:1.5rem;width:100%}.md-modal.md-modal--default .md-modal__header .md-modal__message,.md-modal.md-modal--dialog .md-modal__header .md-modal__message,.md-modal.md-modal--full .md-modal__header .md-modal__message,.md-modal.md-modal--large .md-modal__header .md-modal__message,.md-modal.md-modal--medium .md-modal__header .md-modal__message,.md-modal.md-modal--small .md-modal__header .md-modal__message{font-size:.875rem;line-height:1.5rem;padding-top:.75rem}.md-modal.md-modal--default .md-modal__header .md-modal__close,.md-modal.md-modal--dialog .md-modal__header .md-modal__close,.md-modal.md-modal--full .md-modal__header .md-modal__close,.md-modal.md-modal--large .md-modal__header .md-modal__close,.md-modal.md-modal--medium .md-modal__header .md-modal__close,.md-modal.md-modal--small .md-modal__header .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--default .md-modal__header .md-modal__close::before,.md-modal.md-modal--dialog .md-modal__header .md-modal__close::before,.md-modal.md-modal--full .md-modal__header .md-modal__close::before,.md-modal.md-modal--large .md-modal__header .md-modal__close::before,.md-modal.md-modal--medium .md-modal__header .md-modal__close::before,.md-modal.md-modal--small .md-modal__header .md-modal__close::before{font-size:.875rem}.md-modal.md-modal--default .md-modal__footer,.md-modal.md-modal--dialog .md-modal__footer,.md-modal.md-modal--full .md-modal__footer,.md-modal.md-modal--large .md-modal__footer,.md-modal.md-modal--medium .md-modal__footer,.md-modal.md-modal--small .md-modal__footer{padding:var(--modal-main-padding,1.5rem 1rem);padding-right:1.5rem}.md-modal.md-modal--default .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--dialog .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--full .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--large .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--medium .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--small .md-modal__footer md-button:not(:first-of-type){margin-left:1rem}}.md-modal__backdrop{background:rgba(0,0,0,.45);bottom:0;display:block;left:0;position:fixed;right:0;top:0;z-index:1040}.md-modal__backdrop .md-modal_overlay{bottom:0;position:absolute;top:0;width:100%}.md-close{color:#545454;float:right;font-size:21px;font-weight:700;line-height:1;text-shadow:0 1px 0 #fff}.md-close:focus,.md-close:hover{color:#064157;cursor:pointer;text-decoration:none}.md-close{background:rgba(0,0,0,0);border-radius:0;cursor:pointer;font-weight:400;min-width:initial;padding:0}.md-close::before{font-family:momentum-ui-icons;vertical-align:middle}.md-close:hover{color:#005e7d}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}`,c=function(d,e,m,o){var a,l=arguments.length,t=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,m):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)t=Reflect.decorate(d,e,m,o);else for(var i=d.length-1;i>=0;i--)(a=d[i])&&(t=(l<3?a(t):l>3?a(e,m,t):a(e,m))||t);return l>3&&t&&Object.defineProperty(e,m,t),t},_=function(d,e,m,o){return new(m||(m=Promise))((function(a,l){function t(d){try{n(o.next(d))}catch(d){l(d)}}function i(d){try{n(o.throw(d))}catch(d){l(d)}}function n(d){var e;d.done?a(d.value):(e=d.value,e instanceof m?e:new m((function(d){d(e)}))).then(t,i)}n((o=o.apply(d,e||[])).next())}))};const f=["default","full","large","small","dialog"];var p;!function(d){let e=class extends(Object(a.b)(i.LitElement)){constructor(){super(...arguments),this.show=!1,this.headerLabel="",this.headerMessage="",this.htmlId="",this.ariaLabel="modal",this.ariaLabelClose="Close Modal",this.ariaLabelCancel="Cancel Modal",this.ariaLabelSubmit="Submit Modal",this.ariaDescription="",this.showCloseButton=!1,this.backdropClickExit=!1,this.noExitOnEsc=!1,this.size="default",this.closeBtnName="",this.hideFooter=!1,this.hideHeader=!1,this.disableInitialFocus=!1,this.animating=!1,this.handleCloseOutside=d=>{d.code===o.b.Escape&&(d.preventDefault(),this.show&&!this.noExitOnEsc&&(this.show=!1))}}static get styles(){return[t.a,h]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleCloseOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleCloseOutside)}update(d){super.update(d),d.has("show")&&(this.show?this.modalFadeIn():!0===d.get("show")&&this.modalFadeOut())}notifyModalClose(){this.dispatchEvent(new CustomEvent("close-modal",{composed:!0,bubbles:!0}))}focusInsideModal(){var d;(null===(d=this.focusableElements)||void 0===d?void 0:d.length)&&this.setInitialFocus()}handleKeyDown(d){d.code!==o.b.Enter&&d.code!==o.b.Space||this.show&&(this.show=!0)}transitionPromise(d){return new Promise(e=>{const m=()=>{d.removeEventListener("transitionend",m),this.activateFocusTrap(),this.setFocusableElements(),requestAnimationFrame(()=>{e()})},o=()=>{d.removeEventListener("transitioncancel",o),this.deactivateFocusTrap(),this.modalFadeOut(),e()};d.addEventListener("transitionend",m),d.addEventListener("transitioncancel",o),setTimeout(()=>{this.animating=!0},13)})}modalFadeIn(){return _(this,void 0,void 0,(function*(){this.backDrop&&(yield this.transitionPromise(this.backDrop),this.disableInitialFocus||this.focusInsideModal())}))}modalFadeOut(){this.animating=!1,this.deactivateFocusTrap(),this.notifyModalClose()}handleCloseBackdrop(){this.backdropClickExit&&(this.show=!1)}hideModal(){this.animating=!1,this.show=!1}topCloseBtnTemplate(){return i.html`
|
|
2
|
-
${this.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ariaLabel=${this.ariaLabelClose}
|
|
9
|
-
>
|
|
10
|
-
<md-icon name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
11
|
-
</md-button>
|
|
12
|
-
`:n.nothing}
|
|
13
|
-
`}handleFooterClick(){this.show=!1}headerTemplate(){return this.hideHeader?i.html`
|
|
14
|
-
<div id="modal_header" part="modal-header" class="md-modal__header">
|
|
15
|
-
<slot name="header"></slot>
|
|
16
|
-
${this.topCloseBtnTemplate()}
|
|
17
|
-
</div>
|
|
18
|
-
`:i.html`
|
|
19
|
-
<div id="modal_header" part="modal-header" class="md-modal__header">
|
|
20
|
-
<h2 class="md-modal__title">${this.headerLabel}</h2>
|
|
21
|
-
${this.headerMessage?i.html` <span class="md-modal__message">${this.headerMessage}</span> `:n.nothing}
|
|
22
|
-
${this.topCloseBtnTemplate()}
|
|
23
|
-
</div>
|
|
24
|
-
`}footerTemplate(){return this.hideFooter?i.html`
|
|
25
|
-
<div part="modal-footer" class="md-modal__footer">
|
|
26
|
-
<slot name="footer"></slot>
|
|
27
|
-
</div>
|
|
28
|
-
`:i.html`
|
|
29
|
-
<div part="modal-footer" class="md-modal__footer">
|
|
30
|
-
<md-button
|
|
31
|
-
aria-label=${this.ariaLabelCancel}
|
|
32
|
-
@click="${this.handleFooterClick}"
|
|
33
|
-
@keydown="${this.handleKeyDown}"
|
|
34
|
-
>
|
|
35
|
-
<span>Cancel</span>
|
|
36
|
-
</md-button>
|
|
37
|
-
<md-button
|
|
38
|
-
type="submit"
|
|
39
|
-
variant="primary"
|
|
40
|
-
aria-label=${this.ariaLabelSubmit}
|
|
41
|
-
@click="${this.handleFooterClick}"
|
|
42
|
-
@keydown="${this.handleKeyDown}"
|
|
43
|
-
>
|
|
44
|
-
<span>${this.closeBtnName}</span>
|
|
45
|
-
</md-button>
|
|
46
|
-
</div>
|
|
47
|
-
`}get modalBackDropClassMap(){return{in:this.show&&this.animating}}get modalContainerClassMap(){return{in:this.show,["md-modal--"+this.size]:!!this.size}}render(){return i.html`
|
|
48
|
-
${this.show?i.html`
|
|
49
|
-
<div part="modal-backdrop" class="md-modal__backdrop fade ${Object(r.classMap)(this.modalBackDropClassMap)}">
|
|
50
|
-
${this.backdropClickExit?i.html` <div class="md-modal_overlay" @click="${this.handleCloseBackdrop}"></div> `:n.nothing}
|
|
51
|
-
|
|
52
|
-
<div
|
|
53
|
-
part="modal-container"
|
|
54
|
-
role="dialog"
|
|
55
|
-
id="${this.htmlId}"
|
|
56
|
-
class="md-modal ${Object(r.classMap)(this.modalContainerClassMap)}"
|
|
57
|
-
aria-label="${Object(s.ifDefined)(this.headerLabel||this.ariaLabel||void 0)}"
|
|
58
|
-
aria-describedby=${Object(s.ifDefined)(this.ariaDescription||void 0)}
|
|
59
|
-
>
|
|
60
|
-
<div part="modal-content" class="md-modal__content">
|
|
61
|
-
<div class="md-modal__flex-container" part="modal-flex-container">
|
|
62
|
-
${this.headerTemplate()}
|
|
63
|
-
<div id="modal-body" part="modal-body" class="md-modal__body">
|
|
64
|
-
<slot></slot>
|
|
65
|
-
</div>
|
|
66
|
-
${this.footerTemplate()}
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
`:n.nothing}
|
|
72
|
-
`}};c([Object(i.property)({type:Boolean})],e.prototype,"show",void 0),c([Object(i.property)({type:String})],e.prototype,"headerLabel",void 0),c([Object(i.property)({type:String})],e.prototype,"headerMessage",void 0),c([Object(i.property)({type:String})],e.prototype,"htmlId",void 0),c([Object(i.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),c([Object(i.property)({type:String})],e.prototype,"ariaLabelClose",void 0),c([Object(i.property)({type:String})],e.prototype,"ariaLabelCancel",void 0),c([Object(i.property)({type:String})],e.prototype,"ariaLabelSubmit",void 0),c([Object(i.property)({type:String})],e.prototype,"ariaDescription",void 0),c([Object(i.property)({type:Boolean})],e.prototype,"showCloseButton",void 0),c([Object(i.property)({type:Boolean})],e.prototype,"backdropClickExit",void 0),c([Object(i.property)({type:Boolean})],e.prototype,"noExitOnEsc",void 0),c([Object(i.property)({type:String})],e.prototype,"size",void 0),c([Object(i.property)({type:String})],e.prototype,"closeBtnName",void 0),c([Object(i.property)({type:Boolean})],e.prototype,"hideFooter",void 0),c([Object(i.property)({type:Boolean})],e.prototype,"hideHeader",void 0),c([Object(i.property)({type:Boolean})],e.prototype,"disableInitialFocus",void 0),c([Object(i.internalProperty)()],e.prototype,"animating",void 0),c([Object(i.query)(".md-modal__backdrop")],e.prototype,"backDrop",void 0),e=c([Object(l.a)("md-modal")],e),d.ELEMENT=e}(p||(p={}))}}]);
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[78],{103:function(e,t,i){"use strict";i.r(t),i.d(t,"MORE_MENU_ITEM_COPY_ID_PREFIX",(function(){return I})),i.d(t,"Menu",(function(){return b}));var s=i(1),n=i(5),c=i(60),d=i(39),o=i(6),r=i(0),l=i(4),a=i(27),h=i(61),m=i(70),u=function(e,t,i,s){var n,c=arguments.length,d=c<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(d=(c<3?n(d):c>3?n(t,i,d):n(t,i))||d);return c>3&&d&&Object.defineProperty(t,i,d),d},p=function(e,t,i,s){return new(i||(i=Promise))((function(n,c){function d(e){try{r(s.next(e))}catch(e){c(e)}}function o(e){try{r(s.throw(e))}catch(e){c(e)}}function r(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(d,o)}r((s=s.apply(e,t||[])).next())}))};const I="more-menu-item-";var b;!function(e){let t=class extends(Object(d.a)(Object(c.a)(r.LitElement))){constructor(){super(...arguments),this.justified=!1,this.direction="horizontal",this.items=[],this.itemsHash={},this.itemsIdxHash={}}getNormalizedItemId(e){return e.replace(I,"")}static get styles(){return[o.a,m.a]}get slotItem(){return this.menuSlotElement}linkMenuItems(){return p(this,void 0,void 0,(function*(){const{items:e}=this;e.forEach((e,t)=>{const i=Object(a.nanoid)();e.setAttribute("id",i),e.setAttribute("aria-controls",i),e.selected=this.selected===t}),this.itemsHash=this.items.reduce((e,t)=>(e[t.id]=t,e),{}),this.itemsIdxHash=this.items.reduce((e,t,i)=>(e[t.id]=i,e),{})}))}setupMenuItems(){if(this.menuSlotElement){const e=this.menuSlotElement.assignedElements({flatten:!0});this.getChildrenFromTree({children:e},this.items)}}getChildrenFromTree(e,t){e.children.forEach(e=>{e instanceof h.MenuItem.ELEMENT&&t.push(e),this.getChildrenFromTree({children:Array.from(e.children)},t)})}updateSelectedItem(e){const t=this.slotted.findIndex(e=>e.hasAttribute("selected"));t!==e&&(this.items&&[t,e].forEach(e=>{const t=this.items[e];t&&t.toggleAttribute("selected")}),this.dispatchEvent(new CustomEvent("selected-menu-item",{detail:{value:e},composed:!0,bubbles:!0})),this.changeSelectedItemIdx(e))}changeSelectedItemIdx(e){this.selected=e}handleItemClick(e){const{id:t}=e.detail,i=this.itemsHash[this.getNormalizedItemId(t)];if(i&&!i.disabled){const e=this.itemsIdxHash[i.id];-1!==e&&this.updateSelectedItem(e)}}handleItemKeydown(e){const{key:t,id:i}=e.detail;switch(t){case s.b.End:this.changeSelectedItemIdx(this.items.length-1);break;case s.b.Home:this.changeSelectedItemIdx(0);break;case s.b.ArrowLeft:case s.b.ArrowUp:0===this.selected?this.changeSelectedItemIdx(this.items.length-1):this.changeSelectedItemIdx(this.selected-1);break;case s.b.ArrowRight:case s.b.ArrowDown:this.selected===this.items.length-1?this.changeSelectedItemIdx(0):this.changeSelectedItemIdx(this.selected+1);break;case s.b.Enter:case s.b.Space:const e=this.slotted.findIndex(e=>e.id===i&&!e.disabled);-1!==e&&this.updateSelectedItem(e)}}connectedCallback(){super.connectedCallback(),this.addEventListener("menu-item-click",this.handleItemClick),this.addEventListener("menu-item-keydown",this.handleItemKeydown)}updated(e){const t=Object.create(null,{updated:{get:()=>super.updated}});return p(this,void 0,void 0,(function*(){t.updated.call(this,e),e.has("slotted")&&(this.setupMenuItems(),this.linkMenuItems())}))}disconnectedCallback(){super.connectedCallback(),this.removeEventListener("menu-item-click",this.handleItemClick),this.removeEventListener("menu-item-keydown",this.handleItemKeydown)}get menuClassMap(){return{["md-menu--"+this.direction]:this.direction,justified:this.justified}}render(){return r.html`
|
|
2
|
+
<nav class="md-menu ${Object(l.classMap)(this.menuClassMap)}">
|
|
3
|
+
<ul class="md-menu-list">
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</ul>
|
|
6
|
+
</nav>
|
|
7
|
+
`}};u([Object(r.property)({type:Boolean})],t.prototype,"justified",void 0),u([Object(r.property)({type:String})],t.prototype,"direction",void 0),u([Object(r.query)("slot")],t.prototype,"menuSlotElement",void 0),u([Object(r.query)("md-menu-overlay")],t.prototype,"menuSubElement",void 0),t=u([Object(n.a)("md-menu")],t),e.ELEMENT=t}(b||(b={}))}}]);
|
package/dist/chunks/md-79.js
CHANGED
|
@@ -1,78 +1,73 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[79],{129:function(t,i,e){"use strict";e.r(i),e.d(i,"Pagination",(function(){return a}));e(17),e(14);var a,n=e(5),o=e(6),r=e(0),s=e(2),l=r.css`:host(:focus){box-shadow:none;outline:0!important}:host(md-pagination) .md-pagination{color:var(--pagination-nav-color,#545454);display:flex;padding:0;position:relative}:host(md-pagination) .md-pagination-container{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;flex:0 1 100%}:host(md-pagination) .md-pagination-list{margin:0;padding:0;list-style:none;align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;font-size:.875rem;line-height:1;color:var(--pagination-color,#949494)}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis){align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;border-radius:.875rem;cursor:pointer;height:1.25rem;margin:0 .125rem;min-width:1.25rem;padding:.25rem}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis):hover{background:var(--pagination-bg-hover,#007aa3);color:var(--pagination-color-current,#fff)}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis):focus{box-shadow:0 0 0 .125rem var(--md-default-focus-outline-color,#005e7d)}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis)[aria-current=true]{background:var(--pagination-bg-current,#00a0d1);color:var(--pagination-color-current,#fff);cursor:default;pointer-events:none}:host(md-pagination) .md-pagination-nav{cursor:pointer}:host(md-pagination) .md-pagination-nav:disabled{cursor:default}:host(md-pagination) .md-pagination-dots{margin:0;padding:0;list-style:none;align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center}:host(md-pagination) .md-pagination-dots li{display:block;overflow:hidden;text-indent:-9999px;background:var(--pagination-dots-color,#ccc);border-radius:50%;cursor:pointer;height:.5rem;margin:.25rem;width:.5rem}:host(md-pagination) .md-pagination-dots li:hover,:host(md-pagination) .md-pagination-dots li[aria-current=true]{background:var(--pagination-dots-color-current,#00a0d1)}:host([focus-visible]){box-shadow:0 0 0 .125rem var(--md-default-focus-outline-color,#005e7d)}@media(forced-colors:active){:host(md-pagination) .md-pagination-nav:focus,:host(md-pagination) .md-pagination-nav:hover{outline:1px solid Highlight}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis):hover,:host(md-pagination) .md-pagination-list li:not(.page-ellipsis)[aria-current=true]{forced-color-adjust:none;background-color:Highlight;color:Canvas}:host(md-pagination) .md-pagination-dots li{background-color:GrayText}:host(md-pagination) .md-pagination-dots li:hover,:host(md-pagination) .md-pagination-dots li[aria-current=true]{forced-color-adjust:none;background-color:Highlight;color:Canvas}}`,g=function(t,i,e,a){var n,o=arguments.length,r=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,e,a);else for(var s=t.length-1;s>=0;s--)(n=t[s])&&(r=(o<3?n(r):o>3?n(i,e,r):n(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r};!function(t){let i=class extends r.LitElement{constructor(){super(...arguments),this._currentPage=1,this.hasDots=!1,this.onlyDots=!1,this.noNavigation=!1,this.totalPage=0,this.visiblePage=3}get currentPage(){return this._currentPage}set currentPage(t){const i=this._currentPage;this._currentPage=t,this.notifyPageChange(i,t),this.requestUpdate("currentPage",i)}static get styles(){return[o.a,l]}computePrevious(t){1!==t&&t!==this.currentPage&&(this.currentPage-=1)}computeNext(t){t<=this.totalPage&&t!==this.currentPage&&(this.currentPage+=1)}computeFirst(){this.currentPage>=1&&(this.currentPage=1)}computeLast(){this.currentPage>=1&&(this.currentPage=this.totalPage)}computeCurrent(t){this.currentPage=t}notifyPageChange(t,i){this.dispatchEvent(new CustomEvent("page-change",{composed:!0,bubbles:!0,detail:{oldPage:t,newPage:i}}))}get hasPreviousPage(){return this.currentPage<=1}get hasNextPage(){return this.currentPage>=this.totalPage}computePageList(t){if(this.totalPage>this.visiblePage&&t){const[t,i,e]=[this.currentPage-1,this.currentPage,this.currentPage+1];let a=[];if(i<=this.visiblePage-1)return a=[...Array(this.visiblePage)].map((t,i)=>1+i),a.push("..."),a.push(this.totalPage),a;if(this.totalPage-i<=this.visiblePage-2){a=[],a.push(1),a.push("...");const t=[...Array(this.visiblePage)].map((t,i)=>this.totalPage-this.visiblePage+1+i);return a.concat(t)}return[1,"...",t,i,e,"...",this.totalPage]}return[...Array(this.totalPage)].map((t,i)=>1+i)}pagesTemplate(t){return this.computePageList(t).map(t=>"..."===t?r.html` <li class="page-ellipsis">${t}</li> `:r.html`
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[79],{128:function(d,e,o){"use strict";o.r(e),o.d(e,"modalType",(function(){return f})),o.d(e,"modalAlignment",(function(){return g})),o.d(e,"Modal",(function(){return u}));o(17),o(14);var a=o(1),m=o(46),t=o(7),l=o(5),i=o(6),n=o(0),r=o(2),s=o(4),h=o(3),c=n.css`.md-modal{color:var(--md-primary-text-color,#121212);display:block;height:100vh;left:0;margin:0 auto;position:fixed;right:0;visibility:visible;width:100vw;width:100vw;max-height:none;top:auto;--md-modal-text-align:center;--md-modal-justify-content:center}.md-modal .md-modal__content{height:auto;min-height:0;max-height:none}.md-modal .md-modal__content{border-radius:var(--modal-main-radius,.5rem)}.md-modal .md-modal__title{color:var(--md-primary-text-color)}.md-modal--leading{--md-modal-text-align:left;--md-modal-justify-content:flex-start}.md-modal:focus{box-shadow:none}.md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:1rem;line-height:1.5rem;width:100%;flex-shrink:0;padding-bottom:1rem;padding-left:var(--modal-section-h-padding);padding-right:var(--modal-section-h-padding);align-items:var(--md-modal-justify-content)}.md-modal__header h2{font-size:inherit;font-weight:inherit;line-height:inherit;margin:0}.md-modal__header .md-modal__title{overflow:hidden;text-align:var(--md-modal-text-align);text-overflow:ellipsis;white-space:nowrap;width:100%}.md-modal__header .md-modal__message{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:.875rem;line-height:1.5rem;width:100%;color:var(--modal-main-text-color);flex-flow:row wrap;justify-content:var(--md-modal-justify-content);text-align:var(--md-modal-text-align)}.md-modal .md-modal__close{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;border:0;position:absolute;height:auto;right:1rem;top:auto;width:auto}.md-modal .md-modal__close::before{font-size:inherit}.md-modal__content{background-color:var(--modal-main-bg-color,#fff);box-shadow:0 8px 16px 0 rgba(0,0,0,.16);border:1px solid var(--modal-main-border-color,#dedede);display:flex;flex-direction:column}.md-modal__flex-container{display:flex;flex:1 1 0%;flex-direction:column;max-height:inherit;min-height:inherit;padding:var(--modal-main-padding,1.5rem 1rem);width:100%}.md-modal__body{align-items:stretch;align-self:stretch;background:var(--modal-main-bg-color);display:flex;flex:1 1 auto;flex-direction:column;margin:0;overflow-x:hidden;overflow-y:auto;padding-left:var(--modal-section-h-padding);padding-right:var(--modal-section-h-padding)}.md-modal__body--padding{padding:0 2rem}.md-modal__footer{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-end;flex-shrink:0;padding-left:var(--modal-section-h-padding);padding-right:var(--modal-section-h-padding);padding-top:1rem;width:100%}.md-modal__footer md-button:not(:first-of-type){margin-left:.75rem}.md-modal__footer ::slotted(md-button){margin-left:.75rem}.md-modal.md-modal--full{width:100vw;max-height:none;top:auto}.md-modal.md-modal--full .md-modal__content{height:100vh;min-height:0;max-height:none}.md-modal.md-modal--full .md-modal__content{border-radius:0}.md-modal.md-modal--full .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:2.25rem;line-height:3rem;width:100%}.md-modal.md-modal--full .md-modal__header .md-modal__message{font-size:1.25rem;line-height:2rem;padding-top:1.25rem}.md-modal.md-modal--full .md-modal__footer{padding-bottom:1.5rem;padding-top:1.5rem}.md-modal.md-modal--large{width:60rem;max-height:none;top:auto}.md-modal.md-modal--large .md-modal__content{min-height:45rem;max-height:none}.md-modal.md-modal--large .md-modal__content{border-radius:var(--modal-main-radius,.5rem)}.md-modal.md-modal--large .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:1.625rem;line-height:2rem;width:100%}.md-modal.md-modal--large .md-modal__header .md-modal__message{font-size:1rem;line-height:1.5rem;text-align:var(--md-modal-text-align)}@media only screen and (min-width:40.0625em)and (max-width:64em){.md-modal.md-modal--large{width:40rem;max-height:none;top:auto}.md-modal.md-modal--large .md-modal__content{min-height:30rem;max-height:none}.md-modal.md-modal--large .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:1rem;line-height:1.5rem;width:100%}.md-modal.md-modal--large .md-modal__header .md-modal__message{font-size:.875rem;line-height:1.5rem;text-align:center}}@media only screen and (max-height:50em){.md-modal.md-modal--large .md-modal__content{min-height:auto}}.md-modal.md-modal--default,.md-modal.md-modal--medium{width:40rem;max-height:none;top:auto}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:30rem;max-height:none}@media only screen and (min-width:40.0625em)and (max-width:64em){.md-modal.md-modal--default,.md-modal.md-modal--medium{width:40rem;max-height:none;top:auto}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:30rem;max-height:none}}@media only screen and (max-height:50em){.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:auto}}.md-modal.md-modal--small{width:27.5rem;max-height:none;top:auto}.md-modal.md-modal--small .md-modal__content{min-height:23.75rem;max-height:none}@media only screen and (min-width:40.0625em)and (max-width:64em){.md-modal.md-modal--small{width:27.5rem;max-height:none;top:auto}.md-modal.md-modal--small .md-modal__content{min-height:23.75rem;max-height:none}}.md-modal.md-modal--dialog{width:27.5rem;max-height:none;top:auto}.md-modal.md-modal--dialog .md-modal__content{height:auto;min-height:0;max-height:none}.md-modal.md-modal--dialog .md-modal__content{border-radius:var(--modal-main-radius,.5rem)}.md-modal.md-modal--dialog .md-modal__content{flex-direction:row}.md-modal.md-modal--dialog .md-modal__content .md-modal__header{align-items:flex-start;padding:0 0 .75rem 0}.md-modal.md-modal--dialog .md-modal__content .md-modal__title{font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:16px;line-height:1.5rem}.md-modal.md-modal--dialog .md-modal__content .md-modal__body{margin-bottom:1.5rem;text-align:left}.md-modal.md-modal--dialog .md-modal__content .md-modal__body>*{font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:14px;line-height:1.375rem}.md-modal.md-modal--dialog .md-modal__content .md-modal__footer{display:flex;justify-content:flex-end;padding:0}.md-modal.md-modal--default,.md-modal.md-modal--dialog,.md-modal.md-modal--full,.md-modal.md-modal--large,.md-modal.md-modal--medium,.md-modal.md-modal--small{display:flex;flex-direction:column;justify-content:center}@media only screen and (max-width:40em){.md-modal.md-modal--default.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--dialog.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--full.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--large.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--medium.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--small.md-modal--dialog .md-modal__flex-container{min-height:calc(100vh - 1.5rem*2)}}@media only screen and (max-width:40em){.md-modal.md-modal--default,.md-modal.md-modal--dialog,.md-modal.md-modal--full,.md-modal.md-modal--large,.md-modal.md-modal--medium,.md-modal.md-modal--small{width:100vw;max-height:none;top:auto}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--dialog .md-modal__content,.md-modal.md-modal--full .md-modal__content,.md-modal.md-modal--large .md-modal__content,.md-modal.md-modal--medium .md-modal__content,.md-modal.md-modal--small .md-modal__content{height:100vh;min-height:0;max-height:none}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--dialog .md-modal__content,.md-modal.md-modal--full .md-modal__content,.md-modal.md-modal--large .md-modal__content,.md-modal.md-modal--medium .md-modal__content,.md-modal.md-modal--small .md-modal__content{border-radius:0}.md-modal.md-modal--default .md-modal__flex-container,.md-modal.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--full .md-modal__flex-container,.md-modal.md-modal--large .md-modal__flex-container,.md-modal.md-modal--medium .md-modal__flex-container,.md-modal.md-modal--small .md-modal__flex-container{min-height:100vh}.md-modal.md-modal--default .md-modal__header,.md-modal.md-modal--dialog .md-modal__header,.md-modal.md-modal--full .md-modal__header,.md-modal.md-modal--large .md-modal__header,.md-modal.md-modal--medium .md-modal__header,.md-modal.md-modal--small .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:.875rem;line-height:1.5rem;width:100%}.md-modal.md-modal--default .md-modal__header .md-modal__message,.md-modal.md-modal--dialog .md-modal__header .md-modal__message,.md-modal.md-modal--full .md-modal__header .md-modal__message,.md-modal.md-modal--large .md-modal__header .md-modal__message,.md-modal.md-modal--medium .md-modal__header .md-modal__message,.md-modal.md-modal--small .md-modal__header .md-modal__message{font-size:.875rem;line-height:1.5rem;padding-top:.75rem}.md-modal.md-modal--default .md-modal__close,.md-modal.md-modal--dialog .md-modal__close,.md-modal.md-modal--full .md-modal__close,.md-modal.md-modal--large .md-modal__close,.md-modal.md-modal--medium .md-modal__close,.md-modal.md-modal--small .md-modal__close{height:auto;right:.75rem;top:auto;width:auto}.md-modal.md-modal--default .md-modal__close::before,.md-modal.md-modal--dialog .md-modal__close::before,.md-modal.md-modal--full .md-modal__close::before,.md-modal.md-modal--large .md-modal__close::before,.md-modal.md-modal--medium .md-modal__close::before,.md-modal.md-modal--small .md-modal__close::before{font-size:inherit}.md-modal.md-modal--default .md-modal__footer,.md-modal.md-modal--dialog .md-modal__footer,.md-modal.md-modal--full .md-modal__footer,.md-modal.md-modal--large .md-modal__footer,.md-modal.md-modal--medium .md-modal__footer,.md-modal.md-modal--small .md-modal__footer{padding:var(--modal-main-padding,1.5rem 1rem);padding-right:1.5rem}.md-modal.md-modal--default .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--dialog .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--full .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--large .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--medium .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--small .md-modal__footer md-button:not(:first-of-type){margin-left:1rem}}.md-modal__backdrop{background:rgba(0,0,0,.45);bottom:0;display:block;left:0;position:fixed;right:0;top:0;z-index:1040}.md-modal__backdrop .md-modal_overlay{bottom:0;position:absolute;top:0;width:100%}.md-close{float:right;text-shadow:0 1px 0 #fff}.md-close:focus,.md-close:hover{cursor:pointer;text-decoration:none}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}`,_=function(d,e,o,a){var m,t=arguments.length,l=t<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(d,e,o,a);else for(var i=d.length-1;i>=0;i--)(m=d[i])&&(l=(t<3?m(l):t>3?m(e,o,l):m(e,o))||l);return t>3&&l&&Object.defineProperty(e,o,l),l},p=function(d,e,o,a){return new(o||(o=Promise))((function(m,t){function l(d){try{n(a.next(d))}catch(d){t(d)}}function i(d){try{n(a.throw(d))}catch(d){t(d)}}function n(d){var e;d.done?m(d.value):(e=d.value,e instanceof o?e:new o((function(d){d(e)}))).then(l,i)}n((a=a.apply(d,e||[])).next())}))};const f=["default","full","large","small","dialog"],g=["leading","center"];var u;!function(d){let e=class extends(Object(t.b)(n.LitElement)){constructor(){super(...arguments),this.show=!1,this.headerLabel="",this.headerMessage="",this.htmlId="",this.ariaLabel="modal",this.ariaLabelClose="Close Modal",this.ariaLabelCancel="Cancel Modal",this.ariaLabelSubmit="Submit Modal",this.ariaDescription="",this.showCloseButton=!1,this.backdropClickExit=!1,this.noExitOnEsc=!1,this.size="default",this.closeBtnName="",this.hideFooter=!1,this.hideHeader=!1,this.disableInitialFocus=!1,this.alignment=void 0,this.animating=!1,this.handleCloseOutside=d=>{d.code===a.b.Escape&&(d.preventDefault(),this.show&&!this.noExitOnEsc&&(this.show=!1))}}static get styles(){return[i.a,c]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleCloseOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleCloseOutside)}update(d){super.update(d),d.has("show")&&(this.show?this.modalFadeIn():!0===d.get("show")&&this.modalFadeOut())}get computedAlignment(){return void 0===this.alignment?m.themeManager.isMomentumV2Enabled?"leading":"center":this.alignment}notifyModalClose(){this.dispatchEvent(new CustomEvent("close-modal",{composed:!0,bubbles:!0}))}focusInsideModal(){var d;(null===(d=this.focusableElements)||void 0===d?void 0:d.length)&&this.setInitialFocus()}handleKeyDown(d){d.code!==a.b.Enter&&d.code!==a.b.Space||this.show&&(this.show=!0)}transitionPromise(d){return new Promise(e=>{const o=()=>{d.removeEventListener("transitionend",o),this.activateFocusTrap(),this.setFocusableElements(),requestAnimationFrame(()=>{e()})},a=()=>{d.removeEventListener("transitioncancel",a),this.deactivateFocusTrap(),this.modalFadeOut(),e()};d.addEventListener("transitionend",o),d.addEventListener("transitioncancel",a),setTimeout(()=>{this.animating=!0},13)})}modalFadeIn(){return p(this,void 0,void 0,(function*(){this.backDrop&&(yield this.transitionPromise(this.backDrop),this.disableInitialFocus||this.focusInsideModal())}))}modalFadeOut(){this.animating=!1,this.deactivateFocusTrap(),this.notifyModalClose()}handleCloseBackdrop(){this.backdropClickExit&&(this.show=!1)}hideModal(){this.animating=!1,this.show=!1}topCloseBtnTemplate(){return n.html`
|
|
2
|
+
${this.showCloseButton?n.html`
|
|
3
|
+
<md-button
|
|
4
|
+
variant="ghost"
|
|
5
|
+
size="20"
|
|
6
|
+
circle
|
|
7
|
+
class="md-close md-modal__close"
|
|
8
|
+
@click="${this.hideModal}"
|
|
9
|
+
@keydown="${this.handleKeyDown}"
|
|
10
|
+
ariaLabel=${this.ariaLabelClose}
|
|
11
|
+
>
|
|
12
|
+
<md-icon name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
13
|
+
</md-button>
|
|
14
|
+
`:r.nothing}
|
|
15
|
+
`}handleFooterClick(){this.show=!1}headerTemplate(){return this.hideHeader?n.html`
|
|
16
|
+
<div id="modal_header" part="modal-header" class="md-modal__header">
|
|
17
|
+
<slot name="header"></slot>
|
|
18
|
+
</div>
|
|
19
|
+
`:n.html`
|
|
20
|
+
<div id="modal_header" part="modal-header" class="md-modal__header">
|
|
21
|
+
<h2 class="md-modal__title">${this.headerLabel}</h2>
|
|
22
|
+
${this.headerMessage?n.html` <span class="md-modal__message">${this.headerMessage}</span> `:r.nothing}
|
|
23
|
+
</div>
|
|
24
|
+
`}footerTemplate(){return this.hideFooter?n.html`
|
|
25
|
+
<div part="modal-footer" class="md-modal__footer">
|
|
26
|
+
<slot name="footer"></slot>
|
|
27
|
+
</div>
|
|
28
|
+
`:n.html`
|
|
29
|
+
<div part="modal-footer" class="md-modal__footer">
|
|
30
|
+
<md-button
|
|
31
|
+
aria-label=${this.ariaLabelCancel}
|
|
32
|
+
@click="${this.handleFooterClick}"
|
|
33
|
+
@keydown="${this.handleKeyDown}"
|
|
34
|
+
variant="secondary"
|
|
35
|
+
>
|
|
36
|
+
<span>Cancel</span>
|
|
37
|
+
</md-button>
|
|
38
|
+
<md-button
|
|
39
|
+
type="submit"
|
|
40
|
+
variant="primary"
|
|
41
|
+
aria-label=${this.ariaLabelSubmit}
|
|
42
|
+
@click="${this.handleFooterClick}"
|
|
43
|
+
@keydown="${this.handleKeyDown}"
|
|
44
|
+
>
|
|
45
|
+
<span>${this.closeBtnName}</span>
|
|
46
|
+
</md-button>
|
|
47
|
+
</div>
|
|
48
|
+
`}get modalBackDropClassMap(){return{in:this.show&&this.animating}}get modalContainerClassMap(){return{in:this.show,["md-modal--"+this.size]:!!this.size,["md-modal--"+this.computedAlignment]:!!this.computedAlignment}}render(){return n.html`
|
|
49
|
+
${this.show?n.html`
|
|
50
|
+
<div part="modal-backdrop" class="md-modal__backdrop fade ${Object(s.classMap)(this.modalBackDropClassMap)}">
|
|
51
|
+
${this.backdropClickExit?n.html` <div class="md-modal_overlay" @click="${this.handleCloseBackdrop}"></div> `:r.nothing}
|
|
52
|
+
|
|
53
|
+
<div
|
|
54
|
+
part="modal-container"
|
|
55
|
+
role="dialog"
|
|
56
|
+
id="${this.htmlId}"
|
|
57
|
+
class="md-modal ${Object(s.classMap)(this.modalContainerClassMap)}"
|
|
58
|
+
aria-label="${Object(h.ifDefined)(this.headerLabel||this.ariaLabel||void 0)}"
|
|
59
|
+
aria-describedby=${Object(h.ifDefined)(this.ariaDescription||void 0)}
|
|
19
60
|
>
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</md-button>
|
|
34
|
-
`}
|
|
35
|
-
<div class="md-pagination-container">
|
|
36
|
-
${this.onlyDots?r.html`
|
|
37
|
-
<ul class="md-pagination-dots" part="pagination-only-dots">
|
|
38
|
-
${this.dotsTemplate(!1)}
|
|
39
|
-
</ul>
|
|
40
|
-
`:r.html`
|
|
41
|
-
<ul class="md-pagination-list" part=pagination-list">
|
|
42
|
-
${this.pagesTemplate(!0)}
|
|
43
|
-
</ul>
|
|
44
|
-
`}
|
|
45
|
-
${this.hasDots&&!this.onlyDots?r.html`
|
|
46
|
-
<ul class="md-pagination-dots" part="pagination-dots">
|
|
47
|
-
${this.dotsTemplate(!0)}
|
|
48
|
-
</ul>
|
|
49
|
-
`:s.nothing}
|
|
50
|
-
</div>
|
|
51
|
-
${this.noNavigation?s.nothing:r.html`
|
|
52
|
-
<md-button
|
|
53
|
-
class="md-pagination-nav"
|
|
54
|
-
ariaLabel="Previous Page"
|
|
55
|
-
?disabled=${this.hasNextPage}
|
|
56
|
-
@click=${()=>this.computeNext(this.currentPage+1)}
|
|
57
|
-
part="pagination-next"
|
|
58
|
-
variant="ghost"
|
|
59
|
-
size="24"
|
|
60
|
-
circle
|
|
61
|
-
>
|
|
62
|
-
<md-icon name="arrow-right-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
63
|
-
</md-button>
|
|
64
|
-
<md-button
|
|
65
|
-
class="md-pagination-nav"
|
|
66
|
-
ariaLabel="Last Page"
|
|
67
|
-
?disabled=${this.hasNextPage}
|
|
68
|
-
@click=${this.computeLast}
|
|
69
|
-
part="pagination-last"
|
|
70
|
-
variant="ghost"
|
|
71
|
-
size="24"
|
|
72
|
-
circle
|
|
73
|
-
>
|
|
74
|
-
<md-icon name="overflow-right-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
75
|
-
</md-button>
|
|
76
|
-
`}
|
|
77
|
-
</nav>
|
|
78
|
-
`}};g([Object(r.property)({type:Boolean,attribute:"dots"})],i.prototype,"hasDots",void 0),g([Object(r.property)({type:Boolean,reflect:!0,attribute:"only-dots"})],i.prototype,"onlyDots",void 0),g([Object(r.property)({type:Boolean,reflect:!0,attribute:"no-navigation"})],i.prototype,"noNavigation",void 0),g([Object(r.property)({type:Number,reflect:!0,attribute:"total-page"})],i.prototype,"totalPage",void 0),g([Object(r.property)({type:Number,reflect:!0,attribute:"visible-page"})],i.prototype,"visiblePage",void 0),g([Object(r.property)({type:Number,reflect:!0,attribute:"current-page"})],i.prototype,"currentPage",null),i=g([Object(n.a)("md-pagination")],i),t.ELEMENT=i}(a||(a={}))}}]);
|
|
61
|
+
<div part="modal-content" class="md-modal__content">
|
|
62
|
+
<div class="md-modal__flex-container" part="modal-flex-container">
|
|
63
|
+
${this.headerTemplate()} ${this.topCloseBtnTemplate()}
|
|
64
|
+
<div id="modal-body" part="modal-body" class="md-modal__body">
|
|
65
|
+
<slot></slot>
|
|
66
|
+
</div>
|
|
67
|
+
${this.footerTemplate()}
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
`:r.nothing}
|
|
73
|
+
`}};_([Object(n.property)({type:Boolean})],e.prototype,"show",void 0),_([Object(n.property)({type:String})],e.prototype,"headerLabel",void 0),_([Object(n.property)({type:String})],e.prototype,"headerMessage",void 0),_([Object(n.property)({type:String})],e.prototype,"htmlId",void 0),_([Object(n.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),_([Object(n.property)({type:String})],e.prototype,"ariaLabelClose",void 0),_([Object(n.property)({type:String})],e.prototype,"ariaLabelCancel",void 0),_([Object(n.property)({type:String})],e.prototype,"ariaLabelSubmit",void 0),_([Object(n.property)({type:String})],e.prototype,"ariaDescription",void 0),_([Object(n.property)({type:Boolean})],e.prototype,"showCloseButton",void 0),_([Object(n.property)({type:Boolean})],e.prototype,"backdropClickExit",void 0),_([Object(n.property)({type:Boolean})],e.prototype,"noExitOnEsc",void 0),_([Object(n.property)({type:String})],e.prototype,"size",void 0),_([Object(n.property)({type:String})],e.prototype,"closeBtnName",void 0),_([Object(n.property)({type:Boolean})],e.prototype,"hideFooter",void 0),_([Object(n.property)({type:Boolean})],e.prototype,"hideHeader",void 0),_([Object(n.property)({type:Boolean})],e.prototype,"disableInitialFocus",void 0),_([Object(n.property)({type:String})],e.prototype,"alignment",void 0),_([Object(n.internalProperty)()],e.prototype,"animating",void 0),_([Object(n.query)(".md-modal__backdrop")],e.prototype,"backDrop",void 0),e=_([Object(l.a)("md-modal")],e),d.ELEMENT=e}(u||(u={}))}}]);
|
package/dist/chunks/md-80.js
CHANGED
|
@@ -1,71 +1,78 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[80],{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[80],{129:function(t,i,e){"use strict";e.r(i),e.d(i,"Pagination",(function(){return a}));e(17),e(14);var a,n=e(5),o=e(6),r=e(0),s=e(2),l=r.css`:host(:focus){box-shadow:none;outline:0!important}:host(md-pagination) .md-pagination{color:var(--pagination-nav-color,#545454);display:flex;padding:0;position:relative}:host(md-pagination) .md-pagination-container{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;flex:0 1 100%}:host(md-pagination) .md-pagination-list{margin:0;padding:0;list-style:none;align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;font-size:.875rem;line-height:1;color:var(--pagination-color,#949494)}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis){align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;border-radius:.875rem;cursor:pointer;height:1.25rem;margin:0 .125rem;min-width:1.25rem;padding:.25rem}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis):hover{background:var(--pagination-bg-hover,#007aa3);color:var(--pagination-color-current,#fff)}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis):focus{box-shadow:0 0 0 .125rem var(--md-default-focus-outline-color,#005e7d)}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis)[aria-current=true]{background:var(--pagination-bg-current,#00a0d1);color:var(--pagination-color-current,#fff);cursor:default;pointer-events:none}:host(md-pagination) .md-pagination-nav{cursor:pointer}:host(md-pagination) .md-pagination-nav:disabled{cursor:default}:host(md-pagination) .md-pagination-dots{margin:0;padding:0;list-style:none;align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center}:host(md-pagination) .md-pagination-dots li{display:block;overflow:hidden;text-indent:-9999px;background:var(--pagination-dots-color,#ccc);border-radius:50%;cursor:pointer;height:.5rem;margin:.25rem;width:.5rem}:host(md-pagination) .md-pagination-dots li:hover,:host(md-pagination) .md-pagination-dots li[aria-current=true]{background:var(--pagination-dots-color-current,#00a0d1)}:host([focus-visible]){box-shadow:0 0 0 .125rem var(--md-default-focus-outline-color,#005e7d)}@media(forced-colors:active){:host(md-pagination) .md-pagination-nav:focus,:host(md-pagination) .md-pagination-nav:hover{outline:1px solid Highlight}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis):hover,:host(md-pagination) .md-pagination-list li:not(.page-ellipsis)[aria-current=true]{forced-color-adjust:none;background-color:Highlight;color:Canvas}:host(md-pagination) .md-pagination-dots li{background-color:GrayText}:host(md-pagination) .md-pagination-dots li:hover,:host(md-pagination) .md-pagination-dots li[aria-current=true]{forced-color-adjust:none;background-color:Highlight;color:Canvas}}`,g=function(t,i,e,a){var n,o=arguments.length,r=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,e,a);else for(var s=t.length-1;s>=0;s--)(n=t[s])&&(r=(o<3?n(r):o>3?n(i,e,r):n(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r};!function(t){let i=class extends r.LitElement{constructor(){super(...arguments),this._currentPage=1,this.hasDots=!1,this.onlyDots=!1,this.noNavigation=!1,this.totalPage=0,this.visiblePage=3}get currentPage(){return this._currentPage}set currentPage(t){const i=this._currentPage;this._currentPage=t,this.notifyPageChange(i,t),this.requestUpdate("currentPage",i)}static get styles(){return[o.a,l]}computePrevious(t){1!==t&&t!==this.currentPage&&(this.currentPage-=1)}computeNext(t){t<=this.totalPage&&t!==this.currentPage&&(this.currentPage+=1)}computeFirst(){this.currentPage>=1&&(this.currentPage=1)}computeLast(){this.currentPage>=1&&(this.currentPage=this.totalPage)}computeCurrent(t){this.currentPage=t}notifyPageChange(t,i){this.dispatchEvent(new CustomEvent("page-change",{composed:!0,bubbles:!0,detail:{oldPage:t,newPage:i}}))}get hasPreviousPage(){return this.currentPage<=1}get hasNextPage(){return this.currentPage>=this.totalPage}computePageList(t){if(this.totalPage>this.visiblePage&&t){const[t,i,e]=[this.currentPage-1,this.currentPage,this.currentPage+1];let a=[];if(i<=this.visiblePage-1)return a=[...Array(this.visiblePage)].map((t,i)=>1+i),a.push("..."),a.push(this.totalPage),a;if(this.totalPage-i<=this.visiblePage-2){a=[],a.push(1),a.push("...");const t=[...Array(this.visiblePage)].map((t,i)=>this.totalPage-this.visiblePage+1+i);return a.concat(t)}return[1,"...",t,i,e,"...",this.totalPage]}return[...Array(this.totalPage)].map((t,i)=>1+i)}pagesTemplate(t){return this.computePageList(t).map(t=>"..."===t?r.html` <li class="page-ellipsis">${t}</li> `:r.html`
|
|
2
|
+
<li @click=${()=>this.computeCurrent(t)} aria-current=${t===this.currentPage}>
|
|
3
|
+
${t}
|
|
4
|
+
</li>
|
|
5
|
+
`)}dotsTemplate(t){return this.computePageList(t).map(t=>"..."===t?s.nothing:r.html`
|
|
6
|
+
<li @click=${()=>this.computeCurrent(t)} aria-current=${t===this.currentPage}></li>
|
|
7
|
+
`)}render(){return r.html`
|
|
8
|
+
<nav class="md-pagination" role="navigation" part="pagination">
|
|
9
|
+
${this.noNavigation?s.nothing:r.html`
|
|
10
|
+
<md-button
|
|
11
|
+
class="md-pagination-nav"
|
|
12
|
+
ariaLabel="First Page"
|
|
13
|
+
?disabled=${this.hasPreviousPage}
|
|
14
|
+
@click=${this.computeFirst}
|
|
15
|
+
part="pagination-first"
|
|
16
|
+
variant="ghost"
|
|
17
|
+
size="24"
|
|
18
|
+
circle
|
|
19
|
+
>
|
|
20
|
+
<md-icon name="overflow-left-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
21
|
+
</md-button>
|
|
22
|
+
<md-button
|
|
23
|
+
class="md-pagination-nav"
|
|
24
|
+
ariaLabel="Next Page"
|
|
25
|
+
?disabled=${this.hasPreviousPage}
|
|
26
|
+
@click=${()=>this.computePrevious(this.currentPage-1)}
|
|
27
|
+
part="pagination-prev"
|
|
28
|
+
variant="ghost"
|
|
29
|
+
size="24"
|
|
30
|
+
circle
|
|
31
|
+
>
|
|
32
|
+
<md-icon name="arrow-left-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
33
|
+
</md-button>
|
|
34
|
+
`}
|
|
35
|
+
<div class="md-pagination-container">
|
|
36
|
+
${this.onlyDots?r.html`
|
|
37
|
+
<ul class="md-pagination-dots" part="pagination-only-dots">
|
|
38
|
+
${this.dotsTemplate(!1)}
|
|
39
|
+
</ul>
|
|
40
|
+
`:r.html`
|
|
41
|
+
<ul class="md-pagination-list" part=pagination-list">
|
|
42
|
+
${this.pagesTemplate(!0)}
|
|
43
|
+
</ul>
|
|
44
|
+
`}
|
|
45
|
+
${this.hasDots&&!this.onlyDots?r.html`
|
|
46
|
+
<ul class="md-pagination-dots" part="pagination-dots">
|
|
47
|
+
${this.dotsTemplate(!0)}
|
|
48
|
+
</ul>
|
|
49
|
+
`:s.nothing}
|
|
50
|
+
</div>
|
|
51
|
+
${this.noNavigation?s.nothing:r.html`
|
|
52
|
+
<md-button
|
|
53
|
+
class="md-pagination-nav"
|
|
54
|
+
ariaLabel="Previous Page"
|
|
55
|
+
?disabled=${this.hasNextPage}
|
|
56
|
+
@click=${()=>this.computeNext(this.currentPage+1)}
|
|
57
|
+
part="pagination-next"
|
|
58
|
+
variant="ghost"
|
|
59
|
+
size="24"
|
|
60
|
+
circle
|
|
61
|
+
>
|
|
62
|
+
<md-icon name="arrow-right-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
63
|
+
</md-button>
|
|
64
|
+
<md-button
|
|
65
|
+
class="md-pagination-nav"
|
|
66
|
+
ariaLabel="Last Page"
|
|
67
|
+
?disabled=${this.hasNextPage}
|
|
68
|
+
@click=${this.computeLast}
|
|
69
|
+
part="pagination-last"
|
|
70
|
+
variant="ghost"
|
|
71
|
+
size="24"
|
|
72
|
+
circle
|
|
73
|
+
>
|
|
74
|
+
<md-icon name="overflow-right-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
75
|
+
</md-button>
|
|
76
|
+
`}
|
|
77
|
+
</nav>
|
|
78
|
+
`}};g([Object(r.property)({type:Boolean,attribute:"dots"})],i.prototype,"hasDots",void 0),g([Object(r.property)({type:Boolean,reflect:!0,attribute:"only-dots"})],i.prototype,"onlyDots",void 0),g([Object(r.property)({type:Boolean,reflect:!0,attribute:"no-navigation"})],i.prototype,"noNavigation",void 0),g([Object(r.property)({type:Number,reflect:!0,attribute:"total-page"})],i.prototype,"totalPage",void 0),g([Object(r.property)({type:Number,reflect:!0,attribute:"visible-page"})],i.prototype,"visiblePage",void 0),g([Object(r.property)({type:Number,reflect:!0,attribute:"current-page"})],i.prototype,"currentPage",null),i=g([Object(n.a)("md-pagination")],i),t.ELEMENT=i}(a||(a={}))}}]);
|