@roadtrip/components 3.41.1 → 3.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/road-alert.cjs.entry.js +1 -1
- package/dist/cjs/road-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/road-badge_14.cjs.entry.js +1613 -13
- package/dist/cjs/road-badge_14.cjs.entry.js.map +1 -1
- package/dist/cjs/road-card.cjs.entry.js +46 -16
- package/dist/cjs/road-card.cjs.entry.js.map +1 -1
- package/dist/cjs/roadtrip.cjs.js +1 -1
- package/dist/collection/components/alert/alert.css +1 -1
- package/dist/collection/components/button/button.css +75 -5
- package/dist/collection/components/button/button.js +26 -1
- package/dist/collection/components/button/button.js.map +1 -1
- package/dist/collection/components/button/button.stories.js +67 -0
- package/dist/collection/components/card/card.css +58 -11
- package/dist/collection/components/card/card.js +90 -20
- package/dist/collection/components/card/card.js.map +1 -1
- package/dist/collection/components/card/card.stories.js +330 -75
- package/dist/collection/components/drawer/drawer.css +0 -3
- package/dist/collection/components/drawer/drawer.js +31 -10
- package/dist/collection/components/drawer/drawer.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/road-alert.entry.js +1 -1
- package/dist/esm/road-alert.entry.js.map +1 -1
- package/dist/esm/road-badge_14.entry.js +1613 -13
- package/dist/esm/road-badge_14.entry.js.map +1 -1
- package/dist/esm/road-card.entry.js +46 -16
- package/dist/esm/road-card.entry.js.map +1 -1
- package/dist/esm/roadtrip.js +1 -1
- package/dist/html.html-data.json +12 -0
- package/dist/roadtrip/p-24ea87a9.entry.js +18 -0
- package/dist/roadtrip/p-24ea87a9.entry.js.map +1 -0
- package/dist/roadtrip/p-294a4a83.entry.js +2 -0
- package/dist/roadtrip/p-294a4a83.entry.js.map +1 -0
- package/dist/roadtrip/p-d89d49b2.entry.js +2 -0
- package/dist/roadtrip/p-d89d49b2.entry.js.map +1 -0
- package/dist/roadtrip/roadtrip.css +1 -1
- package/dist/roadtrip/roadtrip.esm.js +1 -1
- package/dist/roadtrip/roadtrip.esm.js.map +1 -1
- package/dist/types/components/button/button.d.ts +4 -0
- package/dist/types/components/card/card.d.ts +15 -5
- package/dist/types/components/drawer/drawer.d.ts +9 -4
- package/dist/types/components.d.ts +28 -4
- package/hydrate/index.js +1764 -130
- package/hydrate/index.mjs +1764 -130
- package/package.json +5 -4
- package/dist/roadtrip/p-07db2ee1.entry.js +0 -10
- package/dist/roadtrip/p-07db2ee1.entry.js.map +0 -1
- package/dist/roadtrip/p-36f8563a.entry.js +0 -2
- package/dist/roadtrip/p-36f8563a.entry.js.map +0 -1
- package/dist/roadtrip/p-4182495e.entry.js +0 -2
- package/dist/roadtrip/p-4182495e.entry.js.map +0 -1
package/hydrate/index.js
CHANGED
|
@@ -3205,7 +3205,7 @@ class Accordion {
|
|
|
3205
3205
|
const accordionLightContent = this.isLight ? 'accordion-content accordion-light-content' : 'accordion-content';
|
|
3206
3206
|
const accordionLightSeparator = this.isLightSeparator ? 'accordion accordion-light accordion-light--border' : 'accordion';
|
|
3207
3207
|
const accordionSmall = this.isSmall ? 'accordion accordion-light accordion-light--small' : 'accordion';
|
|
3208
|
-
return (hAsync("details", { key: '
|
|
3208
|
+
return (hAsync("details", { key: 'a3469eb6d8aef3b880677284c59e69eb62f205e8', class: `${accordionLight} ${accordionSmall} ${accordionLightSeparator}`, open: this.isOpen }, hAsync("summary", { key: 'b0c18225580028ad00098aa494a29b2c956b7561', class: "accordion-trigger", "aria-expanded": `${this.isOpen}`, tabindex: "0", role: "button", onClick: this.onClick }, hAsync("div", { key: 'a066d273354e022c095978edeae2040eddb75804', class: accordionLightHeader }, hAsync("slot", { key: '13056e6babf83f00ebfd538aa79a9fae24ab344f', name: "icon-left" }), hAsync("slot", { key: '7f54051ce9e12dc9ef8e30f7262096a1248d19bb', name: "header" }), hAsync("road-icon", { key: '4161743fdea3953e151525481a338c7a87edd159', class: "accordion-arrow", icon: navigationChevron }))), hAsync("div", { key: '42f14c07ceabf357f4042207e35f828e782aefbc', class: accordionLightContent }, hAsync("slot", { key: 'c0e67f0215366eb9e129b341f02ff88a5c019b43' }))));
|
|
3209
3209
|
}
|
|
3210
3210
|
static get style() { return RoadAccordionStyle0; }
|
|
3211
3211
|
static get cmpMeta() { return {
|
|
@@ -3223,7 +3223,7 @@ class Accordion {
|
|
|
3223
3223
|
}; }
|
|
3224
3224
|
}
|
|
3225
3225
|
|
|
3226
|
-
const alertCss = ":host{position:relative;display:flex;align-items:flex-start;padding:0.5rem 1rem 0.5rem 0.5rem;font-family:var(--road-font, sans-serif);font-size:var(--road-body-medium);line-height:1.25;color:var(--road-on-surface);border:1px solid transparent;border-radius:0.25rem}.alert-icon{flex-shrink:0;width:2rem;height:2rem;margin-right:0.5rem}.alert-title{margin:
|
|
3226
|
+
const alertCss = ":host{position:relative;display:flex;align-items:flex-start;padding:0.5rem 1rem 0.5rem 0.5rem;font-family:var(--road-font, sans-serif);font-size:var(--road-body-medium);line-height:1.25;color:var(--road-on-surface);border:1px solid transparent;border-radius:0.25rem}.alert-icon{flex-shrink:0;width:2rem;height:2rem;margin-right:0.5rem}.alert-title{margin:var(--road-spacing-02) 0 var(--road-spacing-03);display:block;font-weight:700}.alert-container{position:relative;display:flex;align-items:start;justify-content:space-between;width:100%;flex-direction:column}.alert-container-horizontal{position:relative;display:flex;align-items:start;justify-content:space-between;width:100%;flex-direction:row}.alert-link{display:block;margin:0;margin:var(--road-spacing-03) 0 0;color:var(--road-on-surface);text-decoration:underline}.alert-description{margin:0}.btn-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch;justify-content:center;margin-top:var(--road-spacing-03)}.btn-container.justify-end{padding-top:var(--road-spacing-07);justify-content:end}.alert-button{margin-left:var(--road-spacing-07)}.alert-close{display:flex;position:absolute;top:0;right:0;align-items:center;justify-content:center;padding:0;font-weight:700;color:inherit;cursor:pointer;background:transparent;border:0;appearance:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}:host(.alert-info){color:var(--road-on-info-surface);background:var(--road-info-surface);border-color:var(--road-info-outline)}:host(.alert-info) ::slotted(road-icon){fill:var(--road-info-default)}:host(.alert-info) ::slotted(road-button){display:block;margin:0.375rem 0 0;color:var(--road-on-info-surface-inverse);background:var(--road-info-surface-inverse);fill:var(--road-on-info-surface-inverse)}:host(.alert-info) .alert-link{color:var(--road-on-info-surface)}:host(.alert-success){color:var(--road-on-success-surface);background:var(--road-success-surface);border-color:var(--road-success-outline)}:host(.alert-success) ::slotted(road-icon){fill:var(--road-success-icon)}:host(.alert-success) ::slotted(road-button){display:block;margin:0.375rem 0 0;color:var(--road-on-success-surface-inverse);background:var(--road-success-surface-inverse);fill:var(--road-on-success-surface-inverse)}:host(.alert-success) .alert-link{color:var(--road-on-success-surface)}:host(.alert-warning){color:var(--road-on-warning-surface);background:var(--road-warning-surface);border-color:var(--road-warning-outline)}:host(.alert-warning) ::slotted(road-icon){fill:var(--road-warning-icon)}:host(.alert-warning) ::slotted(road-button){display:block;margin:0.375rem 0 0;color:var(--road-on-warning-surface-inverse);background:var(--road-warning-surface-inverse);fill:var(--road-on-warning-surface-inverse)}:host(.alert-warning) .alert-link{color:var(--road-on-warning-surface)}:host(.alert-danger){color:var(--road-on-danger-surface);background:var(--road-danger-surface);border-color:var(--road-danger-outline)}:host(.alert-danger) ::slotted(road-icon){fill:var(--road-danger-icon)}:host(.alert-danger) ::slotted(road-button){display:block;margin:0.375rem 0 0;color:var(--road-on-danger-surface-inverse);background:var(--road-danger-surface-inverse);fill:var(--road-on-danger-surface-inverse)}:host(.alert-danger) .alert-link{color:var(--road-on-danger-surface)}";
|
|
3227
3227
|
var RoadAlertStyle0 = alertCss;
|
|
3228
3228
|
|
|
3229
3229
|
/**
|
|
@@ -3298,7 +3298,7 @@ class Alert {
|
|
|
3298
3298
|
}
|
|
3299
3299
|
const btnContainerClass = this.hasCloseIcon ? 'btn-container justify-end' : 'btn-container';
|
|
3300
3300
|
const closeIconElement = this.hasCloseIcon ? (hAsync("button", { type: "button", class: "alert-close", onClick: this.onClick, "aria-label": "Close" }, hAsync("road-icon", { icon: navigationClose, "aria-hidden": "true" }))) : null;
|
|
3301
|
-
return (hAsync(Host, { key: '
|
|
3301
|
+
return (hAsync(Host, { key: '358c0b9ba649dc7f2a04f7cf1973fc8136e55d8d', class: colorClass, role: "alert" }, hAsync("div", { key: '08a81f21c4f8a773fca419c2ced43fb0fbd9c34f', class: "alert-icon" }, hAsync("slot", { key: '677101a86efc495b8001d13170c2b88b35a3b59b', name: "icon" })), hAsync("div", { key: '150ee6c4569c39ae1a76a4b560957fba71e06658', class: layoutClass }, hAsync("div", { key: 'a5989623d9b6a2147e76359ddab2a3d052859695', class: "alert-container-content" }, this.label && hAsync("span", { key: '165687f382f202899d8991a1dea3984a6b13a1bb', class: "alert-title d-block" }, this.label), hAsync("p", { key: 'ae7a4dcd6b3f6e68dfe7493175ceeca56be2ac99', class: "alert-description" }, hAsync("slot", { key: 'b6514df3aa0793ed4296856292860e9baf10caec' })), this.link && hAsync("a", { key: 'c8db33f73ca8585369a7edfe91d92af9219d0bd4', href: this.url, class: "alert-link link link-default" }, this.link)), hAsync("div", { key: '43f6da1950628cf9304f0e501c5cb2ce67bf203c', class: btnContainerClass }, hAsync("slot", { key: 'c5b94ccd205912f8a23ddd0397483c370444e5ec', name: "button" })), closeIconElement)));
|
|
3302
3302
|
}
|
|
3303
3303
|
get el() { return getElement(this); }
|
|
3304
3304
|
static get style() { return RoadAlertStyle0; }
|
|
@@ -3403,7 +3403,7 @@ class Asset {
|
|
|
3403
3403
|
}
|
|
3404
3404
|
}
|
|
3405
3405
|
render() {
|
|
3406
|
-
return (hAsync(Host, { key: '
|
|
3406
|
+
return (hAsync(Host, { key: '64331c0cd4f5a805be16cd746dfe78d7eeea118e', "aria-hidden": "true", role: "img" }, ((this.assetSvgContent !== '')
|
|
3407
3407
|
? hAsync("div", { class: "icon-inner", innerHTML: this.assetSvgContent })
|
|
3408
3408
|
: hAsync("div", { class: "icon-inner" }))));
|
|
3409
3409
|
}
|
|
@@ -3473,8 +3473,8 @@ class Autocomplete {
|
|
|
3473
3473
|
}
|
|
3474
3474
|
}
|
|
3475
3475
|
render() {
|
|
3476
|
-
return (hAsync(Host, { key: '
|
|
3477
|
-
hAsync("ul", { key: '
|
|
3476
|
+
return (hAsync(Host, { key: '73780efbf9fbb131958cf95d82e917400b7cc7a7' }, hAsync("slot", { key: 'cb9d4ba58dbee2802504aaaf49223d0905cebeb5' }), this.visible && this.options.length > 0 &&
|
|
3477
|
+
hAsync("ul", { key: '0b1f5afaf5a3d0fc088b0e3dc614cdad92d60031', class: "autocomplete-list" }, this.options && this.options.map(option => (hAsync("li", { class: "autocomplete-item", role: "menuitem", onClick: () => this.onClick(option.value, option.label), tabindex: "0" }, option.label))))));
|
|
3478
3478
|
}
|
|
3479
3479
|
get el() { return getElement(this); }
|
|
3480
3480
|
static get style() { return RoadAutocompleteStyle0; }
|
|
@@ -3507,7 +3507,7 @@ class Avatar {
|
|
|
3507
3507
|
}
|
|
3508
3508
|
render() {
|
|
3509
3509
|
const sizeClass = this.size !== undefined ? `avatar-${this.size}` : '';
|
|
3510
|
-
return (hAsync(Host, { key: '
|
|
3510
|
+
return (hAsync(Host, { key: 'a36243469cae6cdd1743417f76a261cb7a82d3fd', class: `${sizeClass}` }, hAsync("slot", { key: '656c8a8119209d27897087be9c5a11ed0679dbed' })));
|
|
3511
3511
|
}
|
|
3512
3512
|
static get style() { return RoadAvatarStyle0; }
|
|
3513
3513
|
static get cmpMeta() { return {
|
|
@@ -3548,7 +3548,7 @@ class Badge {
|
|
|
3548
3548
|
const colorClass = this.color !== undefined ? `badge-${this.color}` : '';
|
|
3549
3549
|
const bubbleClass = this.bubble ? 'badge-bubble' : '';
|
|
3550
3550
|
const sizeClass = this.size !== undefined ? `badge-${this.size}` : '';
|
|
3551
|
-
return (hAsync(Host, { key: '
|
|
3551
|
+
return (hAsync(Host, { key: '272af446e438ac2c9df336d12cd0bfbc3485af77', class: `${colorClass} ${bubbleClass} ${sizeClass}` }, hAsync("slot", { key: 'da72ac86b6650797cd4a4e16a5afe85e2090f325' })));
|
|
3552
3552
|
}
|
|
3553
3553
|
static get style() { return RoadBadgeStyle0; }
|
|
3554
3554
|
static get cmpMeta() { return {
|
|
@@ -3598,7 +3598,7 @@ class Banner {
|
|
|
3598
3598
|
}
|
|
3599
3599
|
render() {
|
|
3600
3600
|
const bannerIsOpenClass = this.isOpen ? 'banner-open' : '';
|
|
3601
|
-
return (hAsync(Host, { key: '
|
|
3601
|
+
return (hAsync(Host, { key: 'f1658b8509590ec8c76dbd0a4a04fb7c4b200277', class: bannerIsOpenClass }, hAsync("div", { key: 'b17259ee98bb232c81aa0eb32250be7b8db8f6fe' }, hAsync("span", { key: '07226e7728ae246d5c3f9c15737d77a52912a867', class: "banner-open-label" }, this.label), this.link && hAsync("a", { key: '70dddd7a3782c10ef65aa100f96732e791ae913b', href: this.url, class: "banner-open-link" }, this.link), hAsync("button", { key: '79eecde11b356d2cdfa4f5ea3292b50bd55cac47', type: "button", class: "banner-close", onClick: this.onClick, "aria-label": "closed" }, hAsync("road-icon", { key: 'c2e0b9079e37ff4062fdd7694c33f8ab8f95150c', icon: navigationClose, size: "md" })))));
|
|
3602
3602
|
}
|
|
3603
3603
|
static get style() { return RoadBannerStyle0; }
|
|
3604
3604
|
static get cmpMeta() { return {
|
|
@@ -3617,7 +3617,7 @@ class Banner {
|
|
|
3617
3617
|
}; }
|
|
3618
3618
|
}
|
|
3619
3619
|
|
|
3620
|
-
const buttonCss = ":host{--border-radius:0.25rem;--font-size:var(--road-button-medium);--margin-bottom:1rem;--padding-start:1.5rem;--padding-end:1.5rem;box-sizing:border-box;display:inline-flex;display:-webkit-inline-flex;align-items:center;justify-content:center;height:3rem;padding:0;margin-bottom:var(--margin-bottom);font-family:var(--road-font, sans-serif);font-size:var(--font-size);font-weight:700;line-height:1.375;color:var(--road-grey-10);text-decoration:none;white-space:nowrap;vertical-align:middle;background:transparent;border:1px solid transparent;border-radius:var(--border-radius);transition:background 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}:host(:hover){text-decoration:none}:host(.focus-visible){text-decoration:underline;outline:auto}.button-native{position:relative;display:flex;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%;padding:0 var(--padding-end) 0 var(--padding-start);margin:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;color:inherit;text-align:inherit;text-decoration:none;text-indent:inherit;text-overflow:inherit;text-transform:inherit;letter-spacing:inherit;white-space:inherit;cursor:pointer;background:transparent;border:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}:host(.btn-default:not([disabled]).focus-visible){background:var(--road-grey-80)}:host(.btn-primary){color:var(--road-on-button-primary);background:var(--road-button-primary)}:host(.btn-primary) ::slotted(road-icon){color:var(--road-on-button-primary)}:host(.btn-primary:not([disabled]):hover),:host(.btn-primary:not([disabled]).focus-visible){background:var(--road-button-primary-variant);outline:0}:host(.btn-secondary){color:var(--road-on-button-secondary);background:var(--road-button-secondary)}:host(.btn-secondary) ::slotted(road-icon){color:var(--road-on-button-secondary)}:host(.btn-secondary:not([disabled]):hover),:host(.btn-secondary:not([disabled]).focus-visible){background:var(--road-button-secondary-variant)}:host(.btn-destructive){color:var(--road-on-button-destructive-primary);background:var(--road-button-destructive-primary)}:host(.btn-destructive) ::slotted(road-icon){color:var(--road-on-button-destructive-primary)}:host(.btn-destructive:not([disabled]):hover),:host(.btn-destructive:not([disabled]).focus-visible){background:var(--road-button-destructive-primary-variant)}:host(.btn-link){font-weight:400;color:var(--road-link-primary);text-decoration:underline;background:transparent}:host(.btn-link:not([disabled]):hover),:host(.btn-link:not([disabled]).focus-visible){color:var(--road-primary-30)}:host(.btn-outline-primary),:host(.btn-outline-secondary),:host(.btn-outline-default),:host(.btn-outline-destructive){background:transparent}:host(.btn-outline-default){color:var(--road-on-surface-weak);background:var(--road-surface);border-color:var(--road-input-outline)}:host(.btn-outline-default) ::slotted(road-icon){color:var(--road-on-surface-weak)}:host(.btn-outline-default:hover),:host(.btn-outline-default.focus-visible){background:var(--road-grey-80)}:host(.btn-ghost){color:var(--road-on-button-ghost)}:host(.btn-ghost) ::slotted(road-icon){color:var(--road-on-button-ghost)}:host(.btn-
|
|
3620
|
+
const buttonCss = ":host{--border-radius:0.25rem;--font-size:var(--road-button-medium);--margin-bottom:1rem;--padding-start:1.5rem;--padding-end:1.5rem;box-sizing:border-box;display:inline-flex;display:-webkit-inline-flex;align-items:center;justify-content:center;height:3rem;padding:0;margin-bottom:var(--margin-bottom);font-family:var(--road-font, sans-serif);font-size:var(--font-size);font-weight:700;line-height:1.375;color:var(--road-grey-10);text-decoration:none;white-space:nowrap;vertical-align:middle;background:transparent;border:1px solid transparent;border-radius:var(--border-radius);transition:background 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}:host(:hover){text-decoration:none}:host(.focus-visible){text-decoration:underline;outline:auto}.button-native{position:relative;display:flex;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%;padding:0 var(--padding-end) 0 var(--padding-start);margin:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;color:inherit;text-align:inherit;text-decoration:none;text-indent:inherit;text-overflow:inherit;text-transform:inherit;letter-spacing:inherit;white-space:inherit;cursor:pointer;background:transparent;border:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}:host(.btn-default:not([disabled]).focus-visible){background:var(--road-grey-80)}:host(.btn-primary){color:var(--road-on-button-primary);background:var(--road-button-primary)}:host(.btn-primary) ::slotted(road-icon){color:var(--road-on-button-primary)}:host(.btn-primary:not([disabled]):hover),:host(.btn-primary:not([disabled]).focus-visible){background:var(--road-button-primary-variant);outline:0}:host(.btn-secondary){color:var(--road-on-button-secondary);background:var(--road-button-secondary)}:host(.btn-secondary) ::slotted(road-icon){color:var(--road-on-button-secondary)}:host(.btn-secondary:not([disabled]):hover),:host(.btn-secondary:not([disabled]).focus-visible){background:var(--road-button-secondary-variant)}:host(.btn-destructive){color:var(--road-on-button-destructive-primary);background:var(--road-button-destructive-primary)}:host(.btn-destructive) ::slotted(road-icon){color:var(--road-on-button-destructive-primary)}:host(.btn-destructive:not([disabled]):hover),:host(.btn-destructive:not([disabled]).focus-visible){background:var(--road-button-destructive-primary-variant)}:host(.btn-link){font-weight:400;color:var(--road-link-primary);text-decoration:underline;background:transparent}:host(.btn-link:not([disabled]):hover),:host(.btn-link:not([disabled]).focus-visible){color:var(--road-primary-30)}:host(.btn-outline-primary),:host(.btn-outline-secondary),:host(.btn-outline-default),:host(.btn-outline-destructive){background:transparent}:host(.btn-outline-default){color:var(--road-on-surface-weak);background:var(--road-surface);border-color:var(--road-input-outline)}:host(.btn-outline-default) ::slotted(road-icon){color:var(--road-on-surface-weak)}:host(.btn-outline-default:hover),:host(.btn-outline-default.focus-visible){background:var(--road-grey-80)}:host(.btn-outline-default.focus-visible),:host(.btn-outline-default:focus-visible){background:var(--road-surface-disabled);outline-offset:1px;outline:2px solid var(--road-outline)}:host(.btn-outline-default) .button-native:focus,:host(.btn-outline-default) .button-native:focus-visible{outline:none}:host(.btn-ghost){color:var(--road-on-button-ghost)}:host(.btn-ghost:not(.btn-inverse):hover){background:var(--road-button-ghost-variant)}:host(.btn-ghost:not(.btn-inverse).focus-visible),:host(.btn-ghost:not(.btn-inverse):focus-visible){background:var(--road-button-ghost-variant);outline-offset:1px;outline:2px solid var(--road-button-ghost-variant)}:host(.btn-ghost:not(.btn-inverse)) .button-native:focus,:host(.btn-ghost:not(.btn-inverse)) .button-native:focus-visible{outline:none}:host(.btn-outline-ghost:not(.btn-inverse):hover){background:var(--road-surface-disabled)}:host(.btn-outline-ghost:not(.btn-inverse).focus-visible),:host(.btn-outline-ghost:not(.btn-inverse):focus-visible){border:1px solid var(--road-outline);background:var(--road-surface-disabled);outline-offset:1px;outline:2px solid var(--road-outline)}:host(.btn-outline-ghost:not(.btn-inverse)) .button-native:focus,:host(.btn-outline-ghost:not(.btn-inverse)) .button-native:focus-visible{outline:none}:host(.btn-inverse) .button-native:focus,:host(.btn-inverse) .button-native:focus-visible{outline:none}:host(.btn-inverse) ::slotted(road-icon){color:var(--road-on-button-ghost)}:host(.btn-inverse:hover){outline:1px solid var(--road-on-header-surface)}:host(.btn-inverse.focus-visible),:host(.btn-inverse:focus-visible){outline:thick double var(--road-on-header-surface)}:host([aria-disabled].btn-inverse){border:1px solid var(--road-on-header-surface-disabled);background:var(--road-on-header-surface-disabled)}:host([aria-disabled].btn-inverse) ::slotted(road-icon){color:var(--road-on-header-surface-disabled)}:host([aria-disabled].btn-outline-primary){background:none}:host(.btn-outline-primary){color:var(--road-button-primary);border-color:var(--road-button-tertiary-outline)}:host(.btn-outline-primary) ::slotted(road-icon){color:var(--road-button-primary)}:host(.btn-outline-primary:hover),:host(.btn-outline-primary.focus-visible){background:var(--road-button-tertiary-variant)}:host(.btn-outline-secondary){color:var(--road-button-secondary);border-color:var(--road-button-secondary)}:host(.btn-outline-secondary) ::slotted(road-icon){color:var(--road-button-secondary)}:host(.btn-outline-secondary:hover),:host(.btn-outline-secondary.focus-visible){background:var(--road-button-tertiary-variant)}:host(.btn-outline-destructive){color:var(--road-on-button-destructive-secondary);border-color:var(--road-button-destructive-outline)}:host(.btn-outline-destructive) ::slotted(road-icon){color:var(--road-on-button-destructive-secondary)}:host(.btn-outline-destructive:hover),:host(.btn-outline-destructive.focus-visible){background:var(--road-button-destructive-secondary-variant)}:host([aria-disabled]){color:var(--road-on-surface-disabled);pointer-events:none;cursor:not-allowed;background-color:var(--road-surface-disabled);border-color:1px solid var(--road-surface-disabled)}:host([aria-disabled]) ::slotted(road-icon){color:var(--road-on-surface-disabled)}.button-native:disabled{cursor:not-allowed}::slotted([slot=\"start\"]){margin-right:0.5rem}::slotted([slot=\"end\"]){margin-left:0.5rem}:host(.btn-xl){height:3.5rem}:host(.btn-xl) ::slotted(road-icon){width:2rem;height:2rem}:host(.btn-icon.btn-xl){width:56px}:host(.btn-lg){height:3rem}:host(.btn-lg) ::slotted(road-icon){width:2rem;height:2rem}:host(.btn-icon.btn-lg){width:48px}:host(.btn-md){--font-size:var(--road-font-size-14);height:2.5rem}:host(.btn-md) ::slotted(road-icon){width:1.5rem;height:1.5rem}:host(.btn-icon.btn-md){width:40px}:host(.btn-sm){--font-size:var(--road-font-size-14);height:2rem}:host(.btn-sm) ::slotted(road-icon){width:1.25rem;height:1.25rem}:host(.btn-icon.btn-sm){width:32px}:host(.btn-block){width:100%}:host(.btn-icon) .button-native{padding:0}::slotted(road-badge){position:absolute;top:4px;left:calc(50% + 0.375rem);box-sizing:border-box;height:auto}";
|
|
3621
3621
|
var RoadButtonStyle0 = buttonCss;
|
|
3622
3622
|
|
|
3623
3623
|
/**
|
|
@@ -3647,6 +3647,10 @@ class Button$1 {
|
|
|
3647
3647
|
* The type of the button.
|
|
3648
3648
|
*/
|
|
3649
3649
|
this.buttonType = 'button';
|
|
3650
|
+
/**
|
|
3651
|
+
* If `true`, the button will use inverse colors (when in headers or dark backgrounds).
|
|
3652
|
+
*/
|
|
3653
|
+
this.inverse = false;
|
|
3650
3654
|
/**
|
|
3651
3655
|
* If `true`, display only an icon in the button.
|
|
3652
3656
|
*/
|
|
@@ -3704,7 +3708,8 @@ class Button$1 {
|
|
|
3704
3708
|
const sizeClass = this.size !== undefined ? `btn-${this.size}` : '';
|
|
3705
3709
|
const expandClass = this.expand ? 'btn-block' : '';
|
|
3706
3710
|
const iconOnlyClass = this.iconOnly ? 'btn-icon' : '';
|
|
3707
|
-
|
|
3711
|
+
const inverseClass = this.inverse ? 'btn-inverse' : '';
|
|
3712
|
+
return (hAsync(Host, { key: '10bf8a00e2cf0abe8a3116ed54c9bce15fae6b0f', class: [colorClass, sizeClass, expandClass, iconOnlyClass, inverseClass].filter(Boolean).join(' '), onClick: this.onClick, "aria-disabled": disabled ? 'true' : null }, hAsync(TagType, Object.assign({ key: 'b4d651d32195f88f6958d3261cd88ee46476ea95' }, attrs, { class: "button-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur }), hAsync("slot", { key: '8e931be9fcf7a6894ed71921f110c3726d2a4215', name: "start" }), hAsync("slot", { key: '4a26d78cb726e7487e8ac5fb5006b7b7c70185b3' }), hAsync("slot", { key: 'a8f44025e68ce0142b3eee4991d9c86bb22233ee', name: "end" }))));
|
|
3708
3713
|
}
|
|
3709
3714
|
get el() { return getElement(this); }
|
|
3710
3715
|
static get style() { return RoadButtonStyle0; }
|
|
@@ -3715,6 +3720,7 @@ class Button$1 {
|
|
|
3715
3720
|
"color": [1],
|
|
3716
3721
|
"size": [513],
|
|
3717
3722
|
"buttonType": [1, "button-type"],
|
|
3723
|
+
"inverse": [4],
|
|
3718
3724
|
"iconOnly": [516, "icon-only"],
|
|
3719
3725
|
"disabled": [516],
|
|
3720
3726
|
"expand": [516],
|
|
@@ -3789,7 +3795,7 @@ class Button {
|
|
|
3789
3795
|
render() {
|
|
3790
3796
|
const TagType = this.href === undefined ? 'button' : 'a';
|
|
3791
3797
|
const positionClass = this.position !== undefined ? `position-${this.position}` : '';
|
|
3792
|
-
return (hAsync(Host, { key: '
|
|
3798
|
+
return (hAsync(Host, { key: 'c92dd334acedc9c577901d339dfa121b63c0d8d0', onClick: this.onClick, class: `${positionClass}` }, hAsync(TagType, { key: '10398fbc53a8e72cfc12975c6351dfe5430af311', class: "button-native", part: "native", onFocus: this.onFocus, onBlur: this.onBlur }, hAsync("slot", { key: '22d572c54bd1defb07f45426f0bbab05666feb83', name: "start" }), hAsync("slot", { key: 'aad19f6d9af9b534ae7aa36485639a928c77d287' }))));
|
|
3793
3799
|
}
|
|
3794
3800
|
get el() { return getElement(this); }
|
|
3795
3801
|
static get style() { return RoadButtonFloatingStyle0; }
|
|
@@ -3834,7 +3840,7 @@ class ButtonBar {
|
|
|
3834
3840
|
this.selectedTabChanged();
|
|
3835
3841
|
}
|
|
3836
3842
|
render() {
|
|
3837
|
-
return (hAsync(Host, { key: '
|
|
3843
|
+
return (hAsync(Host, { key: 'a5bf3fc09d2e077e087ae5246ee562aed29472a5', role: "tablist" }, hAsync("slot", { key: '48a1e2e24b79f769bc35e4d048218210be1b0d56' })));
|
|
3838
3844
|
}
|
|
3839
3845
|
get el() { return getElement(this); }
|
|
3840
3846
|
static get watchers() { return {
|
|
@@ -3853,7 +3859,7 @@ class ButtonBar {
|
|
|
3853
3859
|
}; }
|
|
3854
3860
|
}
|
|
3855
3861
|
|
|
3856
|
-
const cardCss = ":host{position:relative;box-sizing:border-box;display:block;margin-bottom:var(--margin-bottom, 1rem);background:var(--road-surface);border:1px solid var(--road-outline-weak);border-radius:var(--road-spacing-02)}:host(.card-elevation-none){box-shadow:none}:host(.card-elevation-lowest){box-shadow:var(--road-elevation-lowest)}:host(.card-elevation-average){box-shadow:var(--road-elevation-average)}.card-native{box-sizing:border-box;display:block;width:100%;height:100%;padding:var(--road-spacing-06);margin:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;color:inherit;text-align:center;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;letter-spacing:inherit;white-space:inherit;background:var(--road-surface);border:0;border-radius:0.25rem;outline:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}
|
|
3862
|
+
const cardCss = ":host{position:relative;box-sizing:border-box;display:block;margin-bottom:var(--margin-bottom, 1rem);background:var(--road-surface);border:1px solid var(--road-outline-weak);border-radius:var(--road-spacing-02);padding:var(--road-spacing-03)}:host(.card-elevation-none){box-shadow:none}:host(.card-elevation-lowest){box-shadow:var(--road-elevation-lowest)}:host(.card-elevation-average){box-shadow:var(--road-elevation-average)}:host(.is-button){border:1px solid var(--road-outline)}:host(.is-button:hover){border:1px solid var(--road-outline-variant);outline:2px solid var(--road-button-ghost-variant)}:host(.is-button:focus-visible),:host(.is-button:focus){border:1px solid var(--road-outline);outline-offset:1px;outline:2px solid var(--road-outline-variant)}:host(.is-button.is-disabled){cursor:not-allowed;pointer-events:none;border:1px solid var(--road-surface-disabled);background:var(--road-surface-disabled)}:host(.is-button.is-disabled) .card-native,:host(.is-button.selected.is-disabled) .card-native{background:none}:host(.is-button.selected){border:2px solid var(--road-primary);outline:none}:host(.is-button.selected:hover){border:2px solid var(--road-outline-variant);outline:2px solid var(--road-button-ghost-variant)}:host(.is-button.selected:focus-visible),:host(.is-button.selected:focus){border:2px solid var(--road-outline-variant);outline-offset:1px;outline:2px solid var(--road-outline-variant)}:host(.is-button.selected.is-disabled){cursor:not-allowed;pointer-events:none;outline:none;background:var(--road-surface-disabled);border:2px solid var(--road-surface-disabled)}.card-native{box-sizing:border-box;display:block;width:100%;height:100%;padding:var(--road-spacing-06);margin:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;color:inherit;text-align:center;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;letter-spacing:inherit;white-space:inherit;background:var(--road-surface);border:0;border-radius:0.25rem;outline:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}a,button{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}::slotted(road-icon){text-align:center}";
|
|
3857
3863
|
var RoadCardStyle0 = cardCss;
|
|
3858
3864
|
|
|
3859
3865
|
/**
|
|
@@ -3867,45 +3873,71 @@ class Card {
|
|
|
3867
3873
|
this.roadcardclick = createEvent(this, "roadcardclick", 7);
|
|
3868
3874
|
this.roadCardClick = createEvent(this, "roadCardClick", 7);
|
|
3869
3875
|
/**
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
this.elevation =
|
|
3876
|
+
* The elevation.
|
|
3877
|
+
*/
|
|
3878
|
+
this.elevation = "none";
|
|
3873
3879
|
/**
|
|
3874
3880
|
* If `true`, a button tag will be rendered and the card will be tappable.
|
|
3875
3881
|
*/
|
|
3876
3882
|
this.button = false;
|
|
3883
|
+
/**
|
|
3884
|
+
* If `true`, the card has the `selected` state and the `selected` class is applied on the host.
|
|
3885
|
+
* Toggled automatically when the card is clicked (when clickable).
|
|
3886
|
+
*/
|
|
3887
|
+
this.selected = false;
|
|
3888
|
+
/**
|
|
3889
|
+
* If `true`, the card is disabled and cannot be clicked.
|
|
3890
|
+
* Only applies when in button mode (button=true and no href).
|
|
3891
|
+
*/
|
|
3892
|
+
this.disabled = false;
|
|
3877
3893
|
/**
|
|
3878
3894
|
* The type of the button. Only used when an `onclick` or `button` property is present.
|
|
3879
3895
|
*/
|
|
3880
|
-
this.type =
|
|
3881
|
-
this.onClick = () => {
|
|
3896
|
+
this.type = "button";
|
|
3897
|
+
this.onClick = (e) => {
|
|
3882
3898
|
var _a, _b;
|
|
3899
|
+
// If disabled in button mode, prevent all interactions
|
|
3900
|
+
const isButtonMode = this.button && this.href === undefined;
|
|
3901
|
+
if (isButtonMode && this.disabled) {
|
|
3902
|
+
e.preventDefault();
|
|
3903
|
+
e.stopPropagation();
|
|
3904
|
+
return;
|
|
3905
|
+
}
|
|
3906
|
+
// Toggle selected state on click for clickable cards
|
|
3907
|
+
this.selected = !this.selected;
|
|
3883
3908
|
if (this.value !== undefined) {
|
|
3884
3909
|
this.roadcardclick.emit({
|
|
3885
3910
|
value: this.value,
|
|
3886
|
-
label: (_a = this.el.querySelector(
|
|
3911
|
+
label: (_a = this.el.querySelector("road-label")) === null || _a === void 0 ? void 0 : _a.textContent,
|
|
3887
3912
|
});
|
|
3888
3913
|
this.roadCardClick.emit({
|
|
3889
3914
|
value: this.value,
|
|
3890
|
-
label: (_b = this.el.querySelector(
|
|
3915
|
+
label: (_b = this.el.querySelector("road-label")) === null || _b === void 0 ? void 0 : _b.textContent,
|
|
3891
3916
|
});
|
|
3892
3917
|
}
|
|
3893
3918
|
};
|
|
3894
3919
|
}
|
|
3895
3920
|
isClickable() {
|
|
3896
|
-
return
|
|
3921
|
+
return this.href !== undefined || this.button;
|
|
3897
3922
|
}
|
|
3898
3923
|
renderCard() {
|
|
3899
3924
|
const clickable = this.isClickable();
|
|
3900
3925
|
if (!clickable) {
|
|
3901
|
-
return [
|
|
3902
|
-
hAsync("slot", null)
|
|
3903
|
-
];
|
|
3926
|
+
return [hAsync("slot", null)];
|
|
3904
3927
|
}
|
|
3905
3928
|
const { href } = this;
|
|
3906
|
-
const TagType = clickable
|
|
3907
|
-
|
|
3908
|
-
|
|
3929
|
+
const TagType = clickable
|
|
3930
|
+
? href === undefined
|
|
3931
|
+
? "button"
|
|
3932
|
+
: "a"
|
|
3933
|
+
: "div";
|
|
3934
|
+
const isButtonMode = this.button && href === undefined;
|
|
3935
|
+
const attrs = TagType === "button"
|
|
3936
|
+
? {
|
|
3937
|
+
type: this.type,
|
|
3938
|
+
disabled: isButtonMode && this.disabled,
|
|
3939
|
+
"aria-disabled": isButtonMode && this.disabled ? "true" : undefined,
|
|
3940
|
+
}
|
|
3909
3941
|
: {
|
|
3910
3942
|
download: this.download,
|
|
3911
3943
|
href: this.href,
|
|
@@ -3916,8 +3948,12 @@ class Card {
|
|
|
3916
3948
|
}
|
|
3917
3949
|
render() {
|
|
3918
3950
|
const { elevation } = this;
|
|
3951
|
+
const isButtonMode = this.button && this.href === undefined;
|
|
3919
3952
|
const elevationClass = this.elevation ? `card-elevation-${elevation}` : ``;
|
|
3920
|
-
|
|
3953
|
+
const selectedClass = this.selected ? "selected" : "";
|
|
3954
|
+
const isButtonClass = isButtonMode ? "is-button" : "";
|
|
3955
|
+
const disabledClass = isButtonMode && this.disabled ? "is-disabled" : "";
|
|
3956
|
+
return (hAsync(Host, { key: '5ef381ca3d9d8028cc1e3a10cc06511602964437', class: `${elevationClass} ${selectedClass} ${isButtonClass} ${disabledClass}` }, this.renderCard()));
|
|
3921
3957
|
}
|
|
3922
3958
|
get el() { return getElement(this); }
|
|
3923
3959
|
static get style() { return RoadCardStyle0; }
|
|
@@ -3928,6 +3964,8 @@ class Card {
|
|
|
3928
3964
|
"elevation": [1],
|
|
3929
3965
|
"button": [4],
|
|
3930
3966
|
"value": [1],
|
|
3967
|
+
"selected": [516],
|
|
3968
|
+
"disabled": [516],
|
|
3931
3969
|
"type": [1],
|
|
3932
3970
|
"download": [1],
|
|
3933
3971
|
"href": [1],
|
|
@@ -3936,7 +3974,7 @@ class Card {
|
|
|
3936
3974
|
},
|
|
3937
3975
|
"$listeners$": undefined,
|
|
3938
3976
|
"$lazyBundleId$": "-",
|
|
3939
|
-
"$attrsToReflect$": []
|
|
3977
|
+
"$attrsToReflect$": [["selected", "selected"], ["disabled", "disabled"]]
|
|
3940
3978
|
}; }
|
|
3941
3979
|
}
|
|
3942
3980
|
|
|
@@ -10664,7 +10702,7 @@ class Carousel {
|
|
|
10664
10702
|
});
|
|
10665
10703
|
}
|
|
10666
10704
|
render() {
|
|
10667
|
-
return (hAsync(Host, { key: '
|
|
10705
|
+
return (hAsync(Host, { key: 'ade421fc79d745727fe78ca3e95fe16e3415137e', class: "swiper-container", tabindex: "0" }, hAsync("div", { key: 'd52f527ab0a2a4bd64e2098cc588f3ae6b874bcb', class: "swiper-wrapper" }, hAsync("slot", { key: '0f9426dca0b1ba1341793bd04e847f261f2c1046' })), this.pager && hAsync("div", { key: '3479c07552381ba5a162e012b52fc7da06f41172', class: "swiper-pagination", ref: el => this.paginationEl = el }), this.arrows && (hAsync("div", { key: '9a9b215a9e21380b57b75e4ba371c2c0e2176d56', role: "button", class: "swiper-button-prev", tabindex: "0", "aria-label": "Previous slide", onClick: () => this.slidePrev() }, hAsync("road-icon", { key: '1f78835d575dcad28f3bd6cf55a9f0d34d90f809', icon: navigationChevron, rotate: "180" }))), this.arrows && (hAsync("div", { key: '287a27ab8483e6833bd27aeceeb62d51313ee606', role: "button", class: "swiper-button-next", tabindex: "0", "aria-label": "Next slide", onClick: () => this.slideNext() }, hAsync("road-icon", { key: 'de2b38ddb9afd1e8140f1233a9da42ae12b4793e', icon: navigationChevron })))));
|
|
10668
10706
|
}
|
|
10669
10707
|
get el() { return getElement(this); }
|
|
10670
10708
|
static get watchers() { return {
|
|
@@ -10715,10 +10753,10 @@ class CarouselItem {
|
|
|
10715
10753
|
registerInstance(this, hostRef);
|
|
10716
10754
|
}
|
|
10717
10755
|
render() {
|
|
10718
|
-
return (hAsync(Host, { key: '
|
|
10756
|
+
return (hAsync(Host, { key: '9505d58be5a5b79ca69b82808b1ffd06ba6bf5ae', class: {
|
|
10719
10757
|
'swiper-slide': true,
|
|
10720
10758
|
'swiper-zoom-container': true,
|
|
10721
|
-
} }, hAsync("slot", { key: '
|
|
10759
|
+
} }, hAsync("slot", { key: 'e5c79e5ae3ca8cb8d69cd37a5b55496e04b26652' })));
|
|
10722
10760
|
}
|
|
10723
10761
|
static get style() { return RoadCarouselItemStyle0; }
|
|
10724
10762
|
static get cmpMeta() { return {
|
|
@@ -10809,7 +10847,7 @@ class Checkbox {
|
|
|
10809
10847
|
const labelId = this.checkboxId + '-label';
|
|
10810
10848
|
const inverseClass = this.inverse && 'form-checkbox-inverse';
|
|
10811
10849
|
const isInvalidClass = this.error !== undefined && !this.checked && this.error !== '' ? 'is-invalid' : '';
|
|
10812
|
-
return (hAsync(Host, { key: '
|
|
10850
|
+
return (hAsync(Host, { key: '6c65aa807587f38c0d6fcba34c1606431dfa1997' }, hAsync("input", { key: '6a3aa3c88b3fd4bdc23bc3881c7b72e8d7591964', class: `form-check-input ${isInvalidClass}`, type: "checkbox", id: this.checkboxId, name: this.name, required: this.required, disabled: this.disabled, indeterminate: this.indeterminate, checked: this.checked, value: this.value, "aria-checked": `${this.checked}`, "aria-disabled": this.disabled ? 'true' : null, "aria-labelledby": labelId, onClick: this.onClick, onFocus: this.onFocus, onBlur: this.onBlur }), hAsync("label", { key: '3614ccc3ffbeacfd1e1b237da2b9c78ce7b8eecc', class: `form-check-label ${inverseClass}`, id: labelId, htmlFor: this.checkboxId }, hAsync("div", { key: '5c3b311e9a816bd504780c2ba4009f5ab69d4b8e' }, this.label, " ", hAsync("span", { key: 'cc588cbde6b8fbdea9ee0d861e265b994c8c5fa6', class: "form-check-label-span" }, this.secondaryLabel), hAsync("slot", { key: 'd92e1174f5d8bc282938dde2532a065b4511f5e2' })), this.checked && !this.indeterminate && hAsync("road-icon", { key: 'f4d26476c8686fc1d210378c581a5dedb6fb9ca3', class: "form-check-icon", icon: checkWide }), this.indeterminate && hAsync("road-icon", { key: '2701bbb698f4558edb21e024d9f803d4227f1eec', class: "form-check-icon", icon: navigationAddLess })), this.error && this.error !== '' && hAsync("p", { key: 'c39dc46b6aa89becc12a0277fddea6afe8c2f447', class: "invalid-feedback" }, this.error), this.helper && this.helper !== '' && hAsync("p", { key: 'bbd1c57d3d9bc9c13664a829927cb26c560bf075', class: "helper" }, this.helper)));
|
|
10813
10851
|
}
|
|
10814
10852
|
static get watchers() { return {
|
|
10815
10853
|
"checked": ["checkedChanged"]
|
|
@@ -10867,7 +10905,7 @@ class Chip$1 {
|
|
|
10867
10905
|
}
|
|
10868
10906
|
render() {
|
|
10869
10907
|
const outlineClass = this.outline ? 'chip-outline' : '';
|
|
10870
|
-
return (hAsync(Host, { key: '
|
|
10908
|
+
return (hAsync(Host, { key: 'a3d6d90495d0d68b83b3ddbaed51378dedf4d63a', class: `${outlineClass} chip-${this.color} chip-${this.size}`, tabindex: "0" }, hAsync("div", { key: 'a59a6d3451042a9d04cda50c82615fc59465fdf7', class: "chip-description" }, hAsync("slot", { key: '4219f60dc0bd8fda2be79f0ecd2b21075054c046' })), this.hasCloseIcon && hAsync("road-icon", { key: 'c9426711dcf68f15413a3cd1a4f0c65cd09aa548', class: "chip-close", icon: navigationClose })));
|
|
10871
10909
|
}
|
|
10872
10910
|
static get style() { return RoadChipStyle0; }
|
|
10873
10911
|
static get cmpMeta() { return {
|
|
@@ -10900,7 +10938,7 @@ class Chip {
|
|
|
10900
10938
|
this.size = 'sm';
|
|
10901
10939
|
}
|
|
10902
10940
|
render() {
|
|
10903
|
-
return (hAsync(Host, { key: '
|
|
10941
|
+
return (hAsync(Host, { key: '66bf3407592164729d81e1269900dfff160d60ce', class: `chip-${this.size}`, tabindex: "0" }, hAsync("div", { key: 'e037baad33a3be2b430f9c2325abc81f4e7fd015', class: "chip-description" }, hAsync("road-icon", { key: '961d65ef9f31be4444c983c0bd178e19c0f06692', class: "chip-icon", color: "info", icon: alertInfoSolid }), hAsync("slot", { key: '3f1852768aa6a6dc6b234832688f6868b9676591' }))));
|
|
10904
10942
|
}
|
|
10905
10943
|
static get style() { return RoadStatusChipStyle0; }
|
|
10906
10944
|
static get cmpMeta() { return {
|
|
@@ -10926,7 +10964,7 @@ class Col {
|
|
|
10926
10964
|
registerInstance(this, hostRef);
|
|
10927
10965
|
}
|
|
10928
10966
|
render() {
|
|
10929
|
-
return (hAsync("slot", { key: '
|
|
10967
|
+
return (hAsync("slot", { key: 'a2621927906372b10b73caae4ddb4eca67ca3077' }));
|
|
10930
10968
|
}
|
|
10931
10969
|
static get style() { return RoadColStyle0; }
|
|
10932
10970
|
static get cmpMeta() { return {
|
|
@@ -10976,7 +11014,7 @@ class Collapse {
|
|
|
10976
11014
|
const isOpenClass = this.isOpen ? 'collapse-open' : '';
|
|
10977
11015
|
const buttonText = this.isOpen ? this.showLess : this.showMore;
|
|
10978
11016
|
const centerClass = this.centered ? 'collapse-btn-centered' : '';
|
|
10979
|
-
return (hAsync(Host, { key: '
|
|
11017
|
+
return (hAsync(Host, { key: 'dc4faac44b6213b807e1c1b935474e61ecffc229' }, hAsync("slot", { key: '007dc5698f07c530416b96319c087c70cc2e0928' }), hAsync("div", { key: '88f368b345b0d27a467bf120f4c461f409f43187', class: `collapsed-content ${isOpenClass}` }, hAsync("slot", { key: '253c48a56447a867c6b9f99ec485d3f444166f5a', name: "collapsed-content" })), hAsync("div", { key: 'ce988a1da4251516b4e6a751cd214931e608a586', class: `collapse-btn-wrapper ${centerClass}` }, hAsync("road-button", { key: 'd52107ea32b0cf25f490e7b1d38425df9fdd7d58', onClick: this.onClick, class: "collapse-btn btn-link" }, buttonText))));
|
|
10980
11018
|
}
|
|
10981
11019
|
static get style() { return RoadCollapseStyle0; }
|
|
10982
11020
|
static get cmpMeta() { return {
|
|
@@ -11013,7 +11051,7 @@ class ContentCard {
|
|
|
11013
11051
|
}
|
|
11014
11052
|
render() {
|
|
11015
11053
|
const insetImageClass = this.insetImage ? '' : 'content-card-image';
|
|
11016
|
-
return (hAsync(Host, { key: '
|
|
11054
|
+
return (hAsync(Host, { key: '0929d51b0a1629b1d983f114f1a0a5109db72d5b' }, hAsync("road-img", { key: '289c2d4def77b4bae2f0ab1ce5e3569367b8bfcf', src: "https://s1.medias-norauto.fr/visuals/desktop/fr/banners/blog_loimontagne.png", alt: "loi montagne", class: insetImageClass }), hAsync("div", { key: 'a22a7377c03e7b9f715b723ac454375785ee4765', class: "content-card-description" }, hAsync("road-label", { key: 'e43c2c05a422a9aff793cf67ce7d3810689470b5', class: "content-card-description-title" }, hAsync("slot", { key: '474ee1adb66d34157ad37b3a06546b8000d49a7a', name: "label" })), hAsync("p", { key: 'd8cb29dba572569025b961e4fc08e51cc19fdeea', class: "content-card-description-text" }, hAsync("slot", { key: '2751c5b213c615a8b4e70808da4ee5cdc3e7f26c', name: "description" })), hAsync("div", { key: 'cce3d9833cda5f79b06c5f909af9fae197544204', class: "content-card-description-buttons" }, hAsync("slot", { key: '2f75207ca66a7346c19f521c35ca8772ed3202c9' })))));
|
|
11017
11055
|
}
|
|
11018
11056
|
static get style() { return RoadContentCardStyle0; }
|
|
11019
11057
|
static get cmpMeta() { return {
|
|
@@ -11189,7 +11227,7 @@ class Counter {
|
|
|
11189
11227
|
}
|
|
11190
11228
|
render() {
|
|
11191
11229
|
const dataCi = this.isDustbinVisible ? "road-dustbin" : "";
|
|
11192
|
-
return (hAsync("road-input-group", { key: '
|
|
11230
|
+
return (hAsync("road-input-group", { key: '820b0cc9986dcb4e4c234f6c7046c14b3a3df095', class: this.size && `counter-${this.size}` }, hAsync("road-button", { key: 'fab3f2d7e20855197f186f0e281d064befb95bbd', slot: "prepend", size: this.size, onClick: this.decrease, class: this.leftIconClasses, "data-cy": "road-decrease" }, hAsync("road-icon", { key: '03c83781abc87777441b607b9722bf8d4ea30e03', name: this.isDustbinVisible ? "delete-forever" : "navigation-add-less", ref: (el) => this.iconCounterLess = el, size: this.size, "data-cy": dataCi, role: "button" })), hAsync("road-input", { key: 'dd8911ac1c4b2c08ad876629962cd6b8b9531a61', ref: (el) => this.inputElement = el, type: "number", min: this.min.toString(), max: (this.max && this.max.toString()), step: this.step, value: this.value, onRoadChange: this.onRoadChange, onKeyUp: this.checkValue, "data-cy": "road-input-counter", readonly: this.readonly, label: "Quantit\u00E9" }), hAsync("road-button", { key: '79bb668b3831df7ce76d1d3691f2c9ef6a3e56a8', slot: "append", size: this.size, onClick: this.increase, class: this.rightIconClasses, "data-cy": "road-increase" }, hAsync("road-icon", { key: '035e4cacd9c843fd6b08a15ea40953bee8fcaa17', name: "navigation-add-more", size: this.size, role: "button" }))));
|
|
11193
11231
|
}
|
|
11194
11232
|
get el() { return getElement(this); }
|
|
11195
11233
|
static get watchers() { return {
|
|
@@ -11309,11 +11347,11 @@ class Dialog {
|
|
|
11309
11347
|
break;
|
|
11310
11348
|
}
|
|
11311
11349
|
}
|
|
11312
|
-
return (hAsync(Host, { key: '
|
|
11350
|
+
return (hAsync(Host, { key: 'e2ee13cb0fd6330b23224504c717efe8c68df097', class: `dialog ${modalIsOpenClass} ${modalhasClose}`, role: "alertdialog", "aria-modal": "true", tabindex: "-1", "aria-label": "dialogLabel" }, hAsync("div", { key: 'c5f3ecaae31debea9afe6a712308520cd092fc23', class: "dialog-overlay", onClick: this.hasCloseIcon === true ? this.onClick : undefined, tabindex: "-1" }), hAsync("div", { key: 'b28e1225a56208c8ff7891856a49b171bf09f88b', class: "dialog-modal", role: "document", tabindex: "0" }, hAsync("div", { key: 'd799e1b00205d54e96e52f2e95b63e4c4327db2f', class: "dialog-content" }, hAsync("header", { key: 'a3d16ae59ee42a9a61f4849c779dbf2f2a8066c9', class: "dialog-header" }, this.hasCloseIcon
|
|
11313
11351
|
? hAsync("button", { type: "button", class: "dialog-close", onClick: this.onClick, "aria-label": "Close" }, hAsync("road-icon", { icon: navigationClose, "aria-hidden": "true" }))
|
|
11314
|
-
: ''), hAsync("div", { key: '
|
|
11352
|
+
: ''), hAsync("div", { key: 'fadeb8d0776e92809c1f4fdda9d24fe325640103', class: "dialog-body" }, this.color !== undefined
|
|
11315
11353
|
? hAsync("road-icon", { class: "dialog-icon", part: "dialog-icon", color: this.color, icon: icon, "aria-hidden": "true" })
|
|
11316
|
-
: '', hAsync("h2", { key: '
|
|
11354
|
+
: '', hAsync("h2", { key: '06cbf8264b6336cb98b19e7bda1a80fb7d7a9271', class: "dialog-title" }, this.label), hAsync("p", { key: 'f82e151b413764289e3d430b76d987a8eaa1d7b3', class: "dialog-description", id: "dialogDesc" }, this.description)), hAsync("footer", { key: 'cbc9e71ad7aed7eab7bca5d9818dcbceb3cbcce2', class: "dialog-footer" }, hAsync("slot", { key: '41d4e4dd47ecf92e96396316e27ff8218ced5f2c' }))))));
|
|
11317
11355
|
}
|
|
11318
11356
|
get el() { return getElement(this); }
|
|
11319
11357
|
static get style() { return RoadDialogStyle0; }
|
|
@@ -11336,7 +11374,1587 @@ class Dialog {
|
|
|
11336
11374
|
}; }
|
|
11337
11375
|
}
|
|
11338
11376
|
|
|
11339
|
-
|
|
11377
|
+
/*!
|
|
11378
|
+
* tabbable 6.3.0
|
|
11379
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
11380
|
+
*/
|
|
11381
|
+
// NOTE: separate `:not()` selectors has broader browser support than the newer
|
|
11382
|
+
// `:not([inert], [inert] *)` (Feb 2023)
|
|
11383
|
+
// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes
|
|
11384
|
+
// the entire query to fail, resulting in no nodes found, which will break a lot
|
|
11385
|
+
// of things... so we have to rely on JS to identify nodes inside an inert container
|
|
11386
|
+
var candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable="false"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];
|
|
11387
|
+
var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
|
|
11388
|
+
var NoElement = typeof Element === 'undefined';
|
|
11389
|
+
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
11390
|
+
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
|
|
11391
|
+
var _element$getRootNode;
|
|
11392
|
+
return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
|
|
11393
|
+
} : function (element) {
|
|
11394
|
+
return element === null || element === void 0 ? void 0 : element.ownerDocument;
|
|
11395
|
+
};
|
|
11396
|
+
|
|
11397
|
+
/**
|
|
11398
|
+
* Determines if a node is inert or in an inert ancestor.
|
|
11399
|
+
* @param {Element} [node]
|
|
11400
|
+
* @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
|
|
11401
|
+
* see if any of them are inert. If false, only `node` itself is considered.
|
|
11402
|
+
* @returns {boolean} True if inert itself or by way of being in an inert ancestor.
|
|
11403
|
+
* False if `node` is falsy.
|
|
11404
|
+
*/
|
|
11405
|
+
var _isInert = function isInert(node, lookUp) {
|
|
11406
|
+
var _node$getAttribute;
|
|
11407
|
+
if (lookUp === void 0) {
|
|
11408
|
+
lookUp = true;
|
|
11409
|
+
}
|
|
11410
|
+
// CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
|
|
11411
|
+
// JS API property; we have to check the attribute, which can either be empty or 'true';
|
|
11412
|
+
// if it's `null` (not specified) or 'false', it's an active element
|
|
11413
|
+
var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');
|
|
11414
|
+
var inert = inertAtt === '' || inertAtt === 'true';
|
|
11415
|
+
|
|
11416
|
+
// NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
|
|
11417
|
+
// if it weren't for `matches()` not being a function on shadow roots; the following
|
|
11418
|
+
// code works for any kind of node
|
|
11419
|
+
// CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`
|
|
11420
|
+
// so it likely would not support `:is([inert] *)` either...
|
|
11421
|
+
var result = inert || lookUp && node && _isInert(node.parentNode); // recursive
|
|
11422
|
+
|
|
11423
|
+
return result;
|
|
11424
|
+
};
|
|
11425
|
+
|
|
11426
|
+
/**
|
|
11427
|
+
* Determines if a node's content is editable.
|
|
11428
|
+
* @param {Element} [node]
|
|
11429
|
+
* @returns True if it's content-editable; false if it's not or `node` is falsy.
|
|
11430
|
+
*/
|
|
11431
|
+
var isContentEditable = function isContentEditable(node) {
|
|
11432
|
+
var _node$getAttribute2;
|
|
11433
|
+
// CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
|
|
11434
|
+
// to use the attribute directly to check for this, which can either be empty or 'true';
|
|
11435
|
+
// if it's `null` (not specified) or 'false', it's a non-editable element
|
|
11436
|
+
var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');
|
|
11437
|
+
return attValue === '' || attValue === 'true';
|
|
11438
|
+
};
|
|
11439
|
+
|
|
11440
|
+
/**
|
|
11441
|
+
* @param {Element} el container to check in
|
|
11442
|
+
* @param {boolean} includeContainer add container to check
|
|
11443
|
+
* @param {(node: Element) => boolean} filter filter candidates
|
|
11444
|
+
* @returns {Element[]}
|
|
11445
|
+
*/
|
|
11446
|
+
var getCandidates = function getCandidates(el, includeContainer, filter) {
|
|
11447
|
+
// even if `includeContainer=false`, we still have to check it for inertness because
|
|
11448
|
+
// if it's inert, all its children are inert
|
|
11449
|
+
if (_isInert(el)) {
|
|
11450
|
+
return [];
|
|
11451
|
+
}
|
|
11452
|
+
var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
|
|
11453
|
+
if (includeContainer && matches.call(el, candidateSelector)) {
|
|
11454
|
+
candidates.unshift(el);
|
|
11455
|
+
}
|
|
11456
|
+
candidates = candidates.filter(filter);
|
|
11457
|
+
return candidates;
|
|
11458
|
+
};
|
|
11459
|
+
|
|
11460
|
+
/**
|
|
11461
|
+
* @callback GetShadowRoot
|
|
11462
|
+
* @param {Element} element to check for shadow root
|
|
11463
|
+
* @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
|
|
11464
|
+
*/
|
|
11465
|
+
|
|
11466
|
+
/**
|
|
11467
|
+
* @callback ShadowRootFilter
|
|
11468
|
+
* @param {Element} shadowHostNode the element which contains shadow content
|
|
11469
|
+
* @returns {boolean} true if a shadow root could potentially contain valid candidates.
|
|
11470
|
+
*/
|
|
11471
|
+
|
|
11472
|
+
/**
|
|
11473
|
+
* @typedef {Object} CandidateScope
|
|
11474
|
+
* @property {Element} scopeParent contains inner candidates
|
|
11475
|
+
* @property {Element[]} candidates list of candidates found in the scope parent
|
|
11476
|
+
*/
|
|
11477
|
+
|
|
11478
|
+
/**
|
|
11479
|
+
* @typedef {Object} IterativeOptions
|
|
11480
|
+
* @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
|
|
11481
|
+
* if a function, implies shadow support is enabled and either returns the shadow root of an element
|
|
11482
|
+
* or a boolean stating if it has an undisclosed shadow root
|
|
11483
|
+
* @property {(node: Element) => boolean} filter filter candidates
|
|
11484
|
+
* @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list
|
|
11485
|
+
* @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
|
|
11486
|
+
*/
|
|
11487
|
+
|
|
11488
|
+
/**
|
|
11489
|
+
* @param {Element[]} elements list of element containers to match candidates from
|
|
11490
|
+
* @param {boolean} includeContainer add container list to check
|
|
11491
|
+
* @param {IterativeOptions} options
|
|
11492
|
+
* @returns {Array.<Element|CandidateScope>}
|
|
11493
|
+
*/
|
|
11494
|
+
var _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
|
|
11495
|
+
var candidates = [];
|
|
11496
|
+
var elementsToCheck = Array.from(elements);
|
|
11497
|
+
while (elementsToCheck.length) {
|
|
11498
|
+
var element = elementsToCheck.shift();
|
|
11499
|
+
if (_isInert(element, false)) {
|
|
11500
|
+
// no need to look up since we're drilling down
|
|
11501
|
+
// anything inside this container will also be inert
|
|
11502
|
+
continue;
|
|
11503
|
+
}
|
|
11504
|
+
if (element.tagName === 'SLOT') {
|
|
11505
|
+
// add shadow dom slot scope (slot itself cannot be focusable)
|
|
11506
|
+
var assigned = element.assignedElements();
|
|
11507
|
+
var content = assigned.length ? assigned : element.children;
|
|
11508
|
+
var nestedCandidates = _getCandidatesIteratively(content, true, options);
|
|
11509
|
+
if (options.flatten) {
|
|
11510
|
+
candidates.push.apply(candidates, nestedCandidates);
|
|
11511
|
+
} else {
|
|
11512
|
+
candidates.push({
|
|
11513
|
+
scopeParent: element,
|
|
11514
|
+
candidates: nestedCandidates
|
|
11515
|
+
});
|
|
11516
|
+
}
|
|
11517
|
+
} else {
|
|
11518
|
+
// check candidate element
|
|
11519
|
+
var validCandidate = matches.call(element, candidateSelector);
|
|
11520
|
+
if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
|
|
11521
|
+
candidates.push(element);
|
|
11522
|
+
}
|
|
11523
|
+
|
|
11524
|
+
// iterate over shadow content if possible
|
|
11525
|
+
var shadowRoot = element.shadowRoot ||
|
|
11526
|
+
// check for an undisclosed shadow
|
|
11527
|
+
typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
|
|
11528
|
+
|
|
11529
|
+
// no inert look up because we're already drilling down and checking for inertness
|
|
11530
|
+
// on the way down, so all containers to this root node should have already been
|
|
11531
|
+
// vetted as non-inert
|
|
11532
|
+
var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
|
|
11533
|
+
if (shadowRoot && validShadowRoot) {
|
|
11534
|
+
// add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
|
|
11535
|
+
// shadow exists, so look at light dom children as fallback BUT create a scope for any
|
|
11536
|
+
// child candidates found because they're likely slotted elements (elements that are
|
|
11537
|
+
// children of the web component element (which has the shadow), in the light dom, but
|
|
11538
|
+
// slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
|
|
11539
|
+
// _after_ we return from this recursive call
|
|
11540
|
+
var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
|
|
11541
|
+
if (options.flatten) {
|
|
11542
|
+
candidates.push.apply(candidates, _nestedCandidates);
|
|
11543
|
+
} else {
|
|
11544
|
+
candidates.push({
|
|
11545
|
+
scopeParent: element,
|
|
11546
|
+
candidates: _nestedCandidates
|
|
11547
|
+
});
|
|
11548
|
+
}
|
|
11549
|
+
} else {
|
|
11550
|
+
// there's not shadow so just dig into the element's (light dom) children
|
|
11551
|
+
// __without__ giving the element special scope treatment
|
|
11552
|
+
elementsToCheck.unshift.apply(elementsToCheck, element.children);
|
|
11553
|
+
}
|
|
11554
|
+
}
|
|
11555
|
+
}
|
|
11556
|
+
return candidates;
|
|
11557
|
+
};
|
|
11558
|
+
|
|
11559
|
+
/**
|
|
11560
|
+
* @private
|
|
11561
|
+
* Determines if the node has an explicitly specified `tabindex` attribute.
|
|
11562
|
+
* @param {HTMLElement} node
|
|
11563
|
+
* @returns {boolean} True if so; false if not.
|
|
11564
|
+
*/
|
|
11565
|
+
var hasTabIndex = function hasTabIndex(node) {
|
|
11566
|
+
return !isNaN(parseInt(node.getAttribute('tabindex'), 10));
|
|
11567
|
+
};
|
|
11568
|
+
|
|
11569
|
+
/**
|
|
11570
|
+
* Determine the tab index of a given node.
|
|
11571
|
+
* @param {HTMLElement} node
|
|
11572
|
+
* @returns {number} Tab order (negative, 0, or positive number).
|
|
11573
|
+
* @throws {Error} If `node` is falsy.
|
|
11574
|
+
*/
|
|
11575
|
+
var getTabIndex = function getTabIndex(node) {
|
|
11576
|
+
if (!node) {
|
|
11577
|
+
throw new Error('No node provided');
|
|
11578
|
+
}
|
|
11579
|
+
if (node.tabIndex < 0) {
|
|
11580
|
+
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
11581
|
+
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
11582
|
+
// yet they are still part of the regular tab order; in FF, they get a default
|
|
11583
|
+
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
11584
|
+
// order, consider their tab index to be 0.
|
|
11585
|
+
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
11586
|
+
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
11587
|
+
if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
|
|
11588
|
+
return 0;
|
|
11589
|
+
}
|
|
11590
|
+
}
|
|
11591
|
+
return node.tabIndex;
|
|
11592
|
+
};
|
|
11593
|
+
|
|
11594
|
+
/**
|
|
11595
|
+
* Determine the tab index of a given node __for sort order purposes__.
|
|
11596
|
+
* @param {HTMLElement} node
|
|
11597
|
+
* @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,
|
|
11598
|
+
* has tabIndex -1, but needs to be sorted by document order in order for its content to be
|
|
11599
|
+
* inserted into the correct sort position.
|
|
11600
|
+
* @returns {number} Tab order (negative, 0, or positive number).
|
|
11601
|
+
*/
|
|
11602
|
+
var getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {
|
|
11603
|
+
var tabIndex = getTabIndex(node);
|
|
11604
|
+
if (tabIndex < 0 && isScope && !hasTabIndex(node)) {
|
|
11605
|
+
return 0;
|
|
11606
|
+
}
|
|
11607
|
+
return tabIndex;
|
|
11608
|
+
};
|
|
11609
|
+
var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
|
|
11610
|
+
return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
|
|
11611
|
+
};
|
|
11612
|
+
var isInput = function isInput(node) {
|
|
11613
|
+
return node.tagName === 'INPUT';
|
|
11614
|
+
};
|
|
11615
|
+
var isHiddenInput = function isHiddenInput(node) {
|
|
11616
|
+
return isInput(node) && node.type === 'hidden';
|
|
11617
|
+
};
|
|
11618
|
+
var isDetailsWithSummary = function isDetailsWithSummary(node) {
|
|
11619
|
+
var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
|
|
11620
|
+
return child.tagName === 'SUMMARY';
|
|
11621
|
+
});
|
|
11622
|
+
return r;
|
|
11623
|
+
};
|
|
11624
|
+
var getCheckedRadio = function getCheckedRadio(nodes, form) {
|
|
11625
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
11626
|
+
if (nodes[i].checked && nodes[i].form === form) {
|
|
11627
|
+
return nodes[i];
|
|
11628
|
+
}
|
|
11629
|
+
}
|
|
11630
|
+
};
|
|
11631
|
+
var isTabbableRadio = function isTabbableRadio(node) {
|
|
11632
|
+
if (!node.name) {
|
|
11633
|
+
return true;
|
|
11634
|
+
}
|
|
11635
|
+
var radioScope = node.form || getRootNode(node);
|
|
11636
|
+
var queryRadios = function queryRadios(name) {
|
|
11637
|
+
return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
|
|
11638
|
+
};
|
|
11639
|
+
var radioSet;
|
|
11640
|
+
if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
|
|
11641
|
+
radioSet = queryRadios(window.CSS.escape(node.name));
|
|
11642
|
+
} else {
|
|
11643
|
+
try {
|
|
11644
|
+
radioSet = queryRadios(node.name);
|
|
11645
|
+
} catch (err) {
|
|
11646
|
+
// eslint-disable-next-line no-console
|
|
11647
|
+
console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
|
|
11648
|
+
return false;
|
|
11649
|
+
}
|
|
11650
|
+
}
|
|
11651
|
+
var checked = getCheckedRadio(radioSet, node.form);
|
|
11652
|
+
return !checked || checked === node;
|
|
11653
|
+
};
|
|
11654
|
+
var isRadio = function isRadio(node) {
|
|
11655
|
+
return isInput(node) && node.type === 'radio';
|
|
11656
|
+
};
|
|
11657
|
+
var isNonTabbableRadio = function isNonTabbableRadio(node) {
|
|
11658
|
+
return isRadio(node) && !isTabbableRadio(node);
|
|
11659
|
+
};
|
|
11660
|
+
|
|
11661
|
+
// determines if a node is ultimately attached to the window's document
|
|
11662
|
+
var isNodeAttached = function isNodeAttached(node) {
|
|
11663
|
+
var _nodeRoot;
|
|
11664
|
+
// The root node is the shadow root if the node is in a shadow DOM; some document otherwise
|
|
11665
|
+
// (but NOT _the_ document; see second 'If' comment below for more).
|
|
11666
|
+
// If rootNode is shadow root, it'll have a host, which is the element to which the shadow
|
|
11667
|
+
// is attached, and the one we need to check if it's in the document or not (because the
|
|
11668
|
+
// shadow, and all nodes it contains, is never considered in the document since shadows
|
|
11669
|
+
// behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
|
|
11670
|
+
// is hidden, or is not in the document itself but is detached, it will affect the shadow's
|
|
11671
|
+
// visibility, including all the nodes it contains). The host could be any normal node,
|
|
11672
|
+
// or a custom element (i.e. web component). Either way, that's the one that is considered
|
|
11673
|
+
// part of the document, not the shadow root, nor any of its children (i.e. the node being
|
|
11674
|
+
// tested).
|
|
11675
|
+
// To further complicate things, we have to look all the way up until we find a shadow HOST
|
|
11676
|
+
// that is attached (or find none) because the node might be in nested shadows...
|
|
11677
|
+
// If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
|
|
11678
|
+
// document (per the docs) and while it's a Document-type object, that document does not
|
|
11679
|
+
// appear to be the same as the node's `ownerDocument` for some reason, so it's safer
|
|
11680
|
+
// to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
|
|
11681
|
+
// using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
|
|
11682
|
+
// node is actually detached.
|
|
11683
|
+
// NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
|
|
11684
|
+
// if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
|
|
11685
|
+
// from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
|
|
11686
|
+
// `ownerDocument` will be `null`, hence the optional chaining on it.
|
|
11687
|
+
var nodeRoot = node && getRootNode(node);
|
|
11688
|
+
var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
|
|
11689
|
+
|
|
11690
|
+
// in some cases, a detached node will return itself as the root instead of a document or
|
|
11691
|
+
// shadow root object, in which case, we shouldn't try to look further up the host chain
|
|
11692
|
+
var attached = false;
|
|
11693
|
+
if (nodeRoot && nodeRoot !== node) {
|
|
11694
|
+
var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
|
|
11695
|
+
attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
|
|
11696
|
+
while (!attached && nodeRootHost) {
|
|
11697
|
+
var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
|
|
11698
|
+
// since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
|
|
11699
|
+
// which means we need to get the host's host and check if that parent host is contained
|
|
11700
|
+
// in (i.e. attached to) the document
|
|
11701
|
+
nodeRoot = getRootNode(nodeRootHost);
|
|
11702
|
+
nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
|
|
11703
|
+
attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
|
|
11704
|
+
}
|
|
11705
|
+
}
|
|
11706
|
+
return attached;
|
|
11707
|
+
};
|
|
11708
|
+
var isZeroArea = function isZeroArea(node) {
|
|
11709
|
+
var _node$getBoundingClie = node.getBoundingClientRect(),
|
|
11710
|
+
width = _node$getBoundingClie.width,
|
|
11711
|
+
height = _node$getBoundingClie.height;
|
|
11712
|
+
return width === 0 && height === 0;
|
|
11713
|
+
};
|
|
11714
|
+
var isHidden = function isHidden(node, _ref) {
|
|
11715
|
+
var displayCheck = _ref.displayCheck,
|
|
11716
|
+
getShadowRoot = _ref.getShadowRoot;
|
|
11717
|
+
if (displayCheck === 'full-native') {
|
|
11718
|
+
if ('checkVisibility' in node) {
|
|
11719
|
+
// Chrome >= 105, Edge >= 105, Firefox >= 106, Safari >= 17.4
|
|
11720
|
+
// @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility#browser_compatibility
|
|
11721
|
+
var visible = node.checkVisibility({
|
|
11722
|
+
// Checking opacity might be desirable for some use cases, but natively,
|
|
11723
|
+
// opacity zero elements _are_ focusable and tabbable.
|
|
11724
|
+
checkOpacity: false,
|
|
11725
|
+
opacityProperty: false,
|
|
11726
|
+
contentVisibilityAuto: true,
|
|
11727
|
+
visibilityProperty: true,
|
|
11728
|
+
// This is an alias for `visibilityProperty`. Contemporary browsers
|
|
11729
|
+
// support both. However, this alias has wider browser support (Chrome
|
|
11730
|
+
// >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so
|
|
11731
|
+
// we include it anyway.
|
|
11732
|
+
checkVisibilityCSS: true
|
|
11733
|
+
});
|
|
11734
|
+
return !visible;
|
|
11735
|
+
}
|
|
11736
|
+
// Fall through to manual visibility checks
|
|
11737
|
+
}
|
|
11738
|
+
|
|
11739
|
+
// NOTE: visibility will be `undefined` if node is detached from the document
|
|
11740
|
+
// (see notes about this further down), which means we will consider it visible
|
|
11741
|
+
// (this is legacy behavior from a very long way back)
|
|
11742
|
+
// NOTE: we check this regardless of `displayCheck="none"` because this is a
|
|
11743
|
+
// _visibility_ check, not a _display_ check
|
|
11744
|
+
if (getComputedStyle(node).visibility === 'hidden') {
|
|
11745
|
+
return true;
|
|
11746
|
+
}
|
|
11747
|
+
var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
|
|
11748
|
+
var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
|
|
11749
|
+
if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
|
|
11750
|
+
return true;
|
|
11751
|
+
}
|
|
11752
|
+
if (!displayCheck || displayCheck === 'full' ||
|
|
11753
|
+
// full-native can run this branch when it falls through in case
|
|
11754
|
+
// Element#checkVisibility is unsupported
|
|
11755
|
+
displayCheck === 'full-native' || displayCheck === 'legacy-full') {
|
|
11756
|
+
if (typeof getShadowRoot === 'function') {
|
|
11757
|
+
// figure out if we should consider the node to be in an undisclosed shadow and use the
|
|
11758
|
+
// 'non-zero-area' fallback
|
|
11759
|
+
var originalNode = node;
|
|
11760
|
+
while (node) {
|
|
11761
|
+
var parentElement = node.parentElement;
|
|
11762
|
+
var rootNode = getRootNode(node);
|
|
11763
|
+
if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
|
|
11764
|
+
) {
|
|
11765
|
+
// node has an undisclosed shadow which means we can only treat it as a black box, so we
|
|
11766
|
+
// fall back to a non-zero-area test
|
|
11767
|
+
return isZeroArea(node);
|
|
11768
|
+
} else if (node.assignedSlot) {
|
|
11769
|
+
// iterate up slot
|
|
11770
|
+
node = node.assignedSlot;
|
|
11771
|
+
} else if (!parentElement && rootNode !== node.ownerDocument) {
|
|
11772
|
+
// cross shadow boundary
|
|
11773
|
+
node = rootNode.host;
|
|
11774
|
+
} else {
|
|
11775
|
+
// iterate up normal dom
|
|
11776
|
+
node = parentElement;
|
|
11777
|
+
}
|
|
11778
|
+
}
|
|
11779
|
+
node = originalNode;
|
|
11780
|
+
}
|
|
11781
|
+
// else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
|
|
11782
|
+
// (i.e. it does not also presume that all nodes might have undisclosed shadows); or
|
|
11783
|
+
// it might be a falsy value, which means shadow DOM support is disabled
|
|
11784
|
+
|
|
11785
|
+
// Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
|
|
11786
|
+
// now we can just test to see if it would normally be visible or not, provided it's
|
|
11787
|
+
// attached to the main document.
|
|
11788
|
+
// NOTE: We must consider case where node is inside a shadow DOM and given directly to
|
|
11789
|
+
// `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
|
|
11790
|
+
|
|
11791
|
+
if (isNodeAttached(node)) {
|
|
11792
|
+
// this works wherever the node is: if there's at least one client rect, it's
|
|
11793
|
+
// somehow displayed; it also covers the CSS 'display: contents' case where the
|
|
11794
|
+
// node itself is hidden in place of its contents; and there's no need to search
|
|
11795
|
+
// up the hierarchy either
|
|
11796
|
+
return !node.getClientRects().length;
|
|
11797
|
+
}
|
|
11798
|
+
|
|
11799
|
+
// Else, the node isn't attached to the document, which means the `getClientRects()`
|
|
11800
|
+
// API will __always__ return zero rects (this can happen, for example, if React
|
|
11801
|
+
// is used to render nodes onto a detached tree, as confirmed in this thread:
|
|
11802
|
+
// https://github.com/facebook/react/issues/9117#issuecomment-284228870)
|
|
11803
|
+
//
|
|
11804
|
+
// It also means that even window.getComputedStyle(node).display will return `undefined`
|
|
11805
|
+
// because styles are only computed for nodes that are in the document.
|
|
11806
|
+
//
|
|
11807
|
+
// NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
|
|
11808
|
+
// somehow. Though it was never stated officially, anyone who has ever used tabbable
|
|
11809
|
+
// APIs on nodes in detached containers has actually implicitly used tabbable in what
|
|
11810
|
+
// was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
|
|
11811
|
+
// considering __everything__ to be visible because of the innability to determine styles.
|
|
11812
|
+
//
|
|
11813
|
+
// v6.0.0: As of this major release, the default 'full' option __no longer treats detached
|
|
11814
|
+
// nodes as visible with the 'none' fallback.__
|
|
11815
|
+
if (displayCheck !== 'legacy-full') {
|
|
11816
|
+
return true; // hidden
|
|
11817
|
+
}
|
|
11818
|
+
// else, fallback to 'none' mode and consider the node visible
|
|
11819
|
+
} else if (displayCheck === 'non-zero-area') {
|
|
11820
|
+
// NOTE: Even though this tests that the node's client rect is non-zero to determine
|
|
11821
|
+
// whether it's displayed, and that a detached node will __always__ have a zero-area
|
|
11822
|
+
// client rect, we don't special-case for whether the node is attached or not. In
|
|
11823
|
+
// this mode, we do want to consider nodes that have a zero area to be hidden at all
|
|
11824
|
+
// times, and that includes attached or not.
|
|
11825
|
+
return isZeroArea(node);
|
|
11826
|
+
}
|
|
11827
|
+
|
|
11828
|
+
// visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
|
|
11829
|
+
// it's visible
|
|
11830
|
+
return false;
|
|
11831
|
+
};
|
|
11832
|
+
|
|
11833
|
+
// form fields (nested) inside a disabled fieldset are not focusable/tabbable
|
|
11834
|
+
// unless they are in the _first_ <legend> element of the top-most disabled
|
|
11835
|
+
// fieldset
|
|
11836
|
+
var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
11837
|
+
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
|
|
11838
|
+
var parentNode = node.parentElement;
|
|
11839
|
+
// check if `node` is contained in a disabled <fieldset>
|
|
11840
|
+
while (parentNode) {
|
|
11841
|
+
if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
|
|
11842
|
+
// look for the first <legend> among the children of the disabled <fieldset>
|
|
11843
|
+
for (var i = 0; i < parentNode.children.length; i++) {
|
|
11844
|
+
var child = parentNode.children.item(i);
|
|
11845
|
+
// when the first <legend> (in document order) is found
|
|
11846
|
+
if (child.tagName === 'LEGEND') {
|
|
11847
|
+
// if its parent <fieldset> is not nested in another disabled <fieldset>,
|
|
11848
|
+
// return whether `node` is a descendant of its first <legend>
|
|
11849
|
+
return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
|
|
11850
|
+
}
|
|
11851
|
+
}
|
|
11852
|
+
// the disabled <fieldset> containing `node` has no <legend>
|
|
11853
|
+
return true;
|
|
11854
|
+
}
|
|
11855
|
+
parentNode = parentNode.parentElement;
|
|
11856
|
+
}
|
|
11857
|
+
}
|
|
11858
|
+
|
|
11859
|
+
// else, node's tabbable/focusable state should not be affected by a fieldset's
|
|
11860
|
+
// enabled/disabled state
|
|
11861
|
+
return false;
|
|
11862
|
+
};
|
|
11863
|
+
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
|
|
11864
|
+
if (node.disabled ||
|
|
11865
|
+
// we must do an inert look up to filter out any elements inside an inert ancestor
|
|
11866
|
+
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
11867
|
+
// note related to `candidateSelectors`)
|
|
11868
|
+
_isInert(node) || isHiddenInput(node) || isHidden(node, options) ||
|
|
11869
|
+
// For a details element with a summary, the summary element gets the focus
|
|
11870
|
+
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
|
11871
|
+
return false;
|
|
11872
|
+
}
|
|
11873
|
+
return true;
|
|
11874
|
+
};
|
|
11875
|
+
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
11876
|
+
if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
|
11877
|
+
return false;
|
|
11878
|
+
}
|
|
11879
|
+
return true;
|
|
11880
|
+
};
|
|
11881
|
+
var isShadowRootTabbable = function isShadowRootTabbable(shadowHostNode) {
|
|
11882
|
+
var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
|
|
11883
|
+
if (isNaN(tabIndex) || tabIndex >= 0) {
|
|
11884
|
+
return true;
|
|
11885
|
+
}
|
|
11886
|
+
// If a custom element has an explicit negative tabindex,
|
|
11887
|
+
// browsers will not allow tab targeting said element's children.
|
|
11888
|
+
return false;
|
|
11889
|
+
};
|
|
11890
|
+
|
|
11891
|
+
/**
|
|
11892
|
+
* @param {Array.<Element|CandidateScope>} candidates
|
|
11893
|
+
* @returns Element[]
|
|
11894
|
+
*/
|
|
11895
|
+
var _sortByOrder = function sortByOrder(candidates) {
|
|
11896
|
+
var regularTabbables = [];
|
|
11897
|
+
var orderedTabbables = [];
|
|
11898
|
+
candidates.forEach(function (item, i) {
|
|
11899
|
+
var isScope = !!item.scopeParent;
|
|
11900
|
+
var element = isScope ? item.scopeParent : item;
|
|
11901
|
+
var candidateTabindex = getSortOrderTabIndex(element, isScope);
|
|
11902
|
+
var elements = isScope ? _sortByOrder(item.candidates) : element;
|
|
11903
|
+
if (candidateTabindex === 0) {
|
|
11904
|
+
isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
|
|
11905
|
+
} else {
|
|
11906
|
+
orderedTabbables.push({
|
|
11907
|
+
documentOrder: i,
|
|
11908
|
+
tabIndex: candidateTabindex,
|
|
11909
|
+
item: item,
|
|
11910
|
+
isScope: isScope,
|
|
11911
|
+
content: elements
|
|
11912
|
+
});
|
|
11913
|
+
}
|
|
11914
|
+
});
|
|
11915
|
+
return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
|
|
11916
|
+
sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
|
|
11917
|
+
return acc;
|
|
11918
|
+
}, []).concat(regularTabbables);
|
|
11919
|
+
};
|
|
11920
|
+
var tabbable = function tabbable(container, options) {
|
|
11921
|
+
options = options || {};
|
|
11922
|
+
var candidates;
|
|
11923
|
+
if (options.getShadowRoot) {
|
|
11924
|
+
candidates = _getCandidatesIteratively([container], options.includeContainer, {
|
|
11925
|
+
filter: isNodeMatchingSelectorTabbable.bind(null, options),
|
|
11926
|
+
flatten: false,
|
|
11927
|
+
getShadowRoot: options.getShadowRoot,
|
|
11928
|
+
shadowRootFilter: isShadowRootTabbable
|
|
11929
|
+
});
|
|
11930
|
+
} else {
|
|
11931
|
+
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
|
11932
|
+
}
|
|
11933
|
+
return _sortByOrder(candidates);
|
|
11934
|
+
};
|
|
11935
|
+
var focusable = function focusable(container, options) {
|
|
11936
|
+
options = options || {};
|
|
11937
|
+
var candidates;
|
|
11938
|
+
if (options.getShadowRoot) {
|
|
11939
|
+
candidates = _getCandidatesIteratively([container], options.includeContainer, {
|
|
11940
|
+
filter: isNodeMatchingSelectorFocusable.bind(null, options),
|
|
11941
|
+
flatten: true,
|
|
11942
|
+
getShadowRoot: options.getShadowRoot
|
|
11943
|
+
});
|
|
11944
|
+
} else {
|
|
11945
|
+
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
|
|
11946
|
+
}
|
|
11947
|
+
return candidates;
|
|
11948
|
+
};
|
|
11949
|
+
var isTabbable = function isTabbable(node, options) {
|
|
11950
|
+
options = options || {};
|
|
11951
|
+
if (!node) {
|
|
11952
|
+
throw new Error('No node provided');
|
|
11953
|
+
}
|
|
11954
|
+
if (matches.call(node, candidateSelector) === false) {
|
|
11955
|
+
return false;
|
|
11956
|
+
}
|
|
11957
|
+
return isNodeMatchingSelectorTabbable(options, node);
|
|
11958
|
+
};
|
|
11959
|
+
var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');
|
|
11960
|
+
var isFocusable = function isFocusable(node, options) {
|
|
11961
|
+
options = options || {};
|
|
11962
|
+
if (!node) {
|
|
11963
|
+
throw new Error('No node provided');
|
|
11964
|
+
}
|
|
11965
|
+
if (matches.call(node, focusableCandidateSelector) === false) {
|
|
11966
|
+
return false;
|
|
11967
|
+
}
|
|
11968
|
+
return isNodeMatchingSelectorFocusable(options, node);
|
|
11969
|
+
};
|
|
11970
|
+
|
|
11971
|
+
/*!
|
|
11972
|
+
* focus-trap 7.6.6
|
|
11973
|
+
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
11974
|
+
*/
|
|
11975
|
+
|
|
11976
|
+
function _arrayLikeToArray(r, a) {
|
|
11977
|
+
(null == a || a > r.length) && (a = r.length);
|
|
11978
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
11979
|
+
return n;
|
|
11980
|
+
}
|
|
11981
|
+
function _arrayWithoutHoles(r) {
|
|
11982
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
11983
|
+
}
|
|
11984
|
+
function _defineProperty(e, r, t) {
|
|
11985
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
11986
|
+
value: t,
|
|
11987
|
+
enumerable: true,
|
|
11988
|
+
configurable: true,
|
|
11989
|
+
writable: true
|
|
11990
|
+
}) : e[r] = t, e;
|
|
11991
|
+
}
|
|
11992
|
+
function _iterableToArray(r) {
|
|
11993
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
11994
|
+
}
|
|
11995
|
+
function _nonIterableSpread() {
|
|
11996
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
11997
|
+
}
|
|
11998
|
+
function ownKeys(e, r) {
|
|
11999
|
+
var t = Object.keys(e);
|
|
12000
|
+
if (Object.getOwnPropertySymbols) {
|
|
12001
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
12002
|
+
r && (o = o.filter(function (r) {
|
|
12003
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
12004
|
+
})), t.push.apply(t, o);
|
|
12005
|
+
}
|
|
12006
|
+
return t;
|
|
12007
|
+
}
|
|
12008
|
+
function _objectSpread2(e) {
|
|
12009
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
12010
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
12011
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
12012
|
+
_defineProperty(e, r, t[r]);
|
|
12013
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
12014
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
12015
|
+
});
|
|
12016
|
+
}
|
|
12017
|
+
return e;
|
|
12018
|
+
}
|
|
12019
|
+
function _toConsumableArray(r) {
|
|
12020
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
12021
|
+
}
|
|
12022
|
+
function _toPrimitive(t, r) {
|
|
12023
|
+
if ("object" != typeof t || !t) return t;
|
|
12024
|
+
var e = t[Symbol.toPrimitive];
|
|
12025
|
+
if (void 0 !== e) {
|
|
12026
|
+
var i = e.call(t, r);
|
|
12027
|
+
if ("object" != typeof i) return i;
|
|
12028
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
12029
|
+
}
|
|
12030
|
+
return ("string" === r ? String : Number)(t);
|
|
12031
|
+
}
|
|
12032
|
+
function _toPropertyKey(t) {
|
|
12033
|
+
var i = _toPrimitive(t, "string");
|
|
12034
|
+
return "symbol" == typeof i ? i : i + "";
|
|
12035
|
+
}
|
|
12036
|
+
function _unsupportedIterableToArray(r, a) {
|
|
12037
|
+
if (r) {
|
|
12038
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
12039
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
12040
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
12041
|
+
}
|
|
12042
|
+
}
|
|
12043
|
+
|
|
12044
|
+
var activeFocusTraps = {
|
|
12045
|
+
activateTrap: function activateTrap(trapStack, trap) {
|
|
12046
|
+
if (trapStack.length > 0) {
|
|
12047
|
+
var activeTrap = trapStack[trapStack.length - 1];
|
|
12048
|
+
if (activeTrap !== trap) {
|
|
12049
|
+
activeTrap._setPausedState(true);
|
|
12050
|
+
}
|
|
12051
|
+
}
|
|
12052
|
+
var trapIndex = trapStack.indexOf(trap);
|
|
12053
|
+
if (trapIndex === -1) {
|
|
12054
|
+
trapStack.push(trap);
|
|
12055
|
+
} else {
|
|
12056
|
+
// move this existing trap to the front of the queue
|
|
12057
|
+
trapStack.splice(trapIndex, 1);
|
|
12058
|
+
trapStack.push(trap);
|
|
12059
|
+
}
|
|
12060
|
+
},
|
|
12061
|
+
deactivateTrap: function deactivateTrap(trapStack, trap) {
|
|
12062
|
+
var trapIndex = trapStack.indexOf(trap);
|
|
12063
|
+
if (trapIndex !== -1) {
|
|
12064
|
+
trapStack.splice(trapIndex, 1);
|
|
12065
|
+
}
|
|
12066
|
+
if (trapStack.length > 0 && !trapStack[trapStack.length - 1]._isManuallyPaused()) {
|
|
12067
|
+
trapStack[trapStack.length - 1]._setPausedState(false);
|
|
12068
|
+
}
|
|
12069
|
+
}
|
|
12070
|
+
};
|
|
12071
|
+
var isSelectableInput = function isSelectableInput(node) {
|
|
12072
|
+
return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
|
|
12073
|
+
};
|
|
12074
|
+
var isEscapeEvent = function isEscapeEvent(e) {
|
|
12075
|
+
return (e === null || e === void 0 ? void 0 : e.key) === 'Escape' || (e === null || e === void 0 ? void 0 : e.key) === 'Esc' || (e === null || e === void 0 ? void 0 : e.keyCode) === 27;
|
|
12076
|
+
};
|
|
12077
|
+
var isTabEvent = function isTabEvent(e) {
|
|
12078
|
+
return (e === null || e === void 0 ? void 0 : e.key) === 'Tab' || (e === null || e === void 0 ? void 0 : e.keyCode) === 9;
|
|
12079
|
+
};
|
|
12080
|
+
|
|
12081
|
+
// checks for TAB by default
|
|
12082
|
+
var isKeyForward = function isKeyForward(e) {
|
|
12083
|
+
return isTabEvent(e) && !e.shiftKey;
|
|
12084
|
+
};
|
|
12085
|
+
|
|
12086
|
+
// checks for SHIFT+TAB by default
|
|
12087
|
+
var isKeyBackward = function isKeyBackward(e) {
|
|
12088
|
+
return isTabEvent(e) && e.shiftKey;
|
|
12089
|
+
};
|
|
12090
|
+
var delay = function delay(fn) {
|
|
12091
|
+
return setTimeout(fn, 0);
|
|
12092
|
+
};
|
|
12093
|
+
|
|
12094
|
+
/**
|
|
12095
|
+
* Get an option's value when it could be a plain value, or a handler that provides
|
|
12096
|
+
* the value.
|
|
12097
|
+
* @param {*} value Option's value to check.
|
|
12098
|
+
* @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.
|
|
12099
|
+
* @returns {*} The `value`, or the handler's returned value.
|
|
12100
|
+
*/
|
|
12101
|
+
var valueOrHandler = function valueOrHandler(value) {
|
|
12102
|
+
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12103
|
+
params[_key - 1] = arguments[_key];
|
|
12104
|
+
}
|
|
12105
|
+
return typeof value === 'function' ? value.apply(void 0, params) : value;
|
|
12106
|
+
};
|
|
12107
|
+
var getActualTarget = function getActualTarget(event) {
|
|
12108
|
+
// NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the
|
|
12109
|
+
// shadow host. However, event.target.composedPath() will be an array of
|
|
12110
|
+
// nodes "clicked" from inner-most (the actual element inside the shadow) to
|
|
12111
|
+
// outer-most (the host HTML document). If we have access to composedPath(),
|
|
12112
|
+
// then use its first element; otherwise, fall back to event.target (and
|
|
12113
|
+
// this only works for an _open_ shadow DOM; otherwise,
|
|
12114
|
+
// composedPath()[0] === event.target always).
|
|
12115
|
+
return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;
|
|
12116
|
+
};
|
|
12117
|
+
|
|
12118
|
+
// NOTE: this must be _outside_ `createFocusTrap()` to make sure all traps in this
|
|
12119
|
+
// current instance use the same stack if `userOptions.trapStack` isn't specified
|
|
12120
|
+
var internalTrapStack = [];
|
|
12121
|
+
var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
12122
|
+
// SSR: a live trap shouldn't be created in this type of environment so this
|
|
12123
|
+
// should be safe code to execute if the `document` option isn't specified
|
|
12124
|
+
var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;
|
|
12125
|
+
var trapStack = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.trapStack) || internalTrapStack;
|
|
12126
|
+
var config = _objectSpread2({
|
|
12127
|
+
returnFocusOnDeactivate: true,
|
|
12128
|
+
escapeDeactivates: true,
|
|
12129
|
+
delayInitialFocus: true,
|
|
12130
|
+
isKeyForward: isKeyForward,
|
|
12131
|
+
isKeyBackward: isKeyBackward
|
|
12132
|
+
}, userOptions);
|
|
12133
|
+
var state = {
|
|
12134
|
+
// containers given to createFocusTrap()
|
|
12135
|
+
// @type {Array<HTMLElement>}
|
|
12136
|
+
containers: [],
|
|
12137
|
+
// list of objects identifying tabbable nodes in `containers` in the trap
|
|
12138
|
+
// NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
|
|
12139
|
+
// is active, but the trap should never get to a state where there isn't at least one group
|
|
12140
|
+
// with at least one tabbable node in it (that would lead to an error condition that would
|
|
12141
|
+
// result in an error being thrown)
|
|
12142
|
+
// @type {Array<{
|
|
12143
|
+
// container: HTMLElement,
|
|
12144
|
+
// tabbableNodes: Array<HTMLElement>, // empty if none
|
|
12145
|
+
// focusableNodes: Array<HTMLElement>, // empty if none
|
|
12146
|
+
// posTabIndexesFound: boolean,
|
|
12147
|
+
// firstTabbableNode: HTMLElement|undefined,
|
|
12148
|
+
// lastTabbableNode: HTMLElement|undefined,
|
|
12149
|
+
// firstDomTabbableNode: HTMLElement|undefined,
|
|
12150
|
+
// lastDomTabbableNode: HTMLElement|undefined,
|
|
12151
|
+
// nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
|
|
12152
|
+
// }>}
|
|
12153
|
+
containerGroups: [],
|
|
12154
|
+
// same order/length as `containers` list
|
|
12155
|
+
|
|
12156
|
+
// references to objects in `containerGroups`, but only those that actually have
|
|
12157
|
+
// tabbable nodes in them
|
|
12158
|
+
// NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
|
|
12159
|
+
// the same length
|
|
12160
|
+
tabbableGroups: [],
|
|
12161
|
+
nodeFocusedBeforeActivation: null,
|
|
12162
|
+
mostRecentlyFocusedNode: null,
|
|
12163
|
+
active: false,
|
|
12164
|
+
paused: false,
|
|
12165
|
+
manuallyPaused: false,
|
|
12166
|
+
// timer ID for when delayInitialFocus is true and initial focus in this trap
|
|
12167
|
+
// has been delayed during activation
|
|
12168
|
+
delayInitialFocusTimer: undefined,
|
|
12169
|
+
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
12170
|
+
recentNavEvent: undefined
|
|
12171
|
+
};
|
|
12172
|
+
var trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later
|
|
12173
|
+
|
|
12174
|
+
/**
|
|
12175
|
+
* Gets a configuration option value.
|
|
12176
|
+
* @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,
|
|
12177
|
+
* value will be taken from this object. Otherwise, value will be taken from base configuration.
|
|
12178
|
+
* @param {string} optionName Name of the option whose value is sought.
|
|
12179
|
+
* @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`
|
|
12180
|
+
* IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.
|
|
12181
|
+
*/
|
|
12182
|
+
var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {
|
|
12183
|
+
return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];
|
|
12184
|
+
};
|
|
12185
|
+
|
|
12186
|
+
/**
|
|
12187
|
+
* Finds the index of the container that contains the element.
|
|
12188
|
+
* @param {HTMLElement} element
|
|
12189
|
+
* @param {Event} [event] If available, and `element` isn't directly found in any container,
|
|
12190
|
+
* the event's composed path is used to see if includes any known trap containers in the
|
|
12191
|
+
* case where the element is inside a Shadow DOM.
|
|
12192
|
+
* @returns {number} Index of the container in either `state.containers` or
|
|
12193
|
+
* `state.containerGroups` (the order/length of these lists are the same); -1
|
|
12194
|
+
* if the element isn't found.
|
|
12195
|
+
*/
|
|
12196
|
+
var findContainerIndex = function findContainerIndex(element, event) {
|
|
12197
|
+
var composedPath = typeof (event === null || event === void 0 ? void 0 : event.composedPath) === 'function' ? event.composedPath() : undefined;
|
|
12198
|
+
// NOTE: search `containerGroups` because it's possible a group contains no tabbable
|
|
12199
|
+
// nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)
|
|
12200
|
+
// and we still need to find the element in there
|
|
12201
|
+
return state.containerGroups.findIndex(function (_ref) {
|
|
12202
|
+
var container = _ref.container,
|
|
12203
|
+
tabbableNodes = _ref.tabbableNodes;
|
|
12204
|
+
return container.contains(element) || (// fall back to explicit tabbable search which will take into consideration any
|
|
12205
|
+
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
12206
|
+
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
12207
|
+
// look inside web components even if open)
|
|
12208
|
+
composedPath === null || composedPath === void 0 ? void 0 : composedPath.includes(container)) || tabbableNodes.find(function (node) {
|
|
12209
|
+
return node === element;
|
|
12210
|
+
});
|
|
12211
|
+
});
|
|
12212
|
+
};
|
|
12213
|
+
|
|
12214
|
+
/**
|
|
12215
|
+
* Gets the node for the given option, which is expected to be an option that
|
|
12216
|
+
* can be either a DOM node, a string that is a selector to get a node, `false`
|
|
12217
|
+
* (if a node is explicitly NOT given), or a function that returns any of these
|
|
12218
|
+
* values.
|
|
12219
|
+
* @param {string} optionName
|
|
12220
|
+
* @param {Object} options
|
|
12221
|
+
* @param {boolean} [options.hasFallback] True if the option could be a selector string
|
|
12222
|
+
* and the option allows for a fallback scenario in the case where the selector is
|
|
12223
|
+
* valid but does not match a node (i.e. the queried node doesn't exist in the DOM).
|
|
12224
|
+
* @param {Array} [options.params] Params to pass to the option if it's a function.
|
|
12225
|
+
* @returns {undefined | null | false | HTMLElement | SVGElement} Returns
|
|
12226
|
+
* `undefined` if the option is not specified; `null` if the option didn't resolve
|
|
12227
|
+
* to a node but `options.hasFallback=true`, `false` if the option resolved to `false`
|
|
12228
|
+
* (node explicitly not given); otherwise, the resolved DOM node.
|
|
12229
|
+
* @throws {Error} If the option is set, not `false`, and is not, or does not
|
|
12230
|
+
* resolve to a node, unless the option is a selector string and `options.hasFallback=true`.
|
|
12231
|
+
*/
|
|
12232
|
+
var getNodeForOption = function getNodeForOption(optionName) {
|
|
12233
|
+
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
12234
|
+
_ref2$hasFallback = _ref2.hasFallback,
|
|
12235
|
+
hasFallback = _ref2$hasFallback === void 0 ? false : _ref2$hasFallback,
|
|
12236
|
+
_ref2$params = _ref2.params,
|
|
12237
|
+
params = _ref2$params === void 0 ? [] : _ref2$params;
|
|
12238
|
+
var optionValue = config[optionName];
|
|
12239
|
+
if (typeof optionValue === 'function') {
|
|
12240
|
+
optionValue = optionValue.apply(void 0, _toConsumableArray(params));
|
|
12241
|
+
}
|
|
12242
|
+
if (optionValue === true) {
|
|
12243
|
+
optionValue = undefined; // use default value
|
|
12244
|
+
}
|
|
12245
|
+
if (!optionValue) {
|
|
12246
|
+
if (optionValue === undefined || optionValue === false) {
|
|
12247
|
+
return optionValue;
|
|
12248
|
+
}
|
|
12249
|
+
// else, empty string (invalid), null (invalid), 0 (invalid)
|
|
12250
|
+
|
|
12251
|
+
throw new Error("`".concat(optionName, "` was specified but was not a node, or did not return a node"));
|
|
12252
|
+
}
|
|
12253
|
+
var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point
|
|
12254
|
+
|
|
12255
|
+
if (typeof optionValue === 'string') {
|
|
12256
|
+
try {
|
|
12257
|
+
node = doc.querySelector(optionValue); // resolve to node, or null if fails
|
|
12258
|
+
} catch (err) {
|
|
12259
|
+
throw new Error("`".concat(optionName, "` appears to be an invalid selector; error=\"").concat(err.message, "\""));
|
|
12260
|
+
}
|
|
12261
|
+
if (!node) {
|
|
12262
|
+
if (!hasFallback) {
|
|
12263
|
+
throw new Error("`".concat(optionName, "` as selector refers to no known node"));
|
|
12264
|
+
}
|
|
12265
|
+
// else, `node` MUST be `null` because that's what `Document.querySelector()` returns
|
|
12266
|
+
// if the selector is valid but doesn't match anything
|
|
12267
|
+
}
|
|
12268
|
+
}
|
|
12269
|
+
return node;
|
|
12270
|
+
};
|
|
12271
|
+
var getInitialFocusNode = function getInitialFocusNode() {
|
|
12272
|
+
var node = getNodeForOption('initialFocus', {
|
|
12273
|
+
hasFallback: true
|
|
12274
|
+
});
|
|
12275
|
+
|
|
12276
|
+
// false explicitly indicates we want no initialFocus at all
|
|
12277
|
+
if (node === false) {
|
|
12278
|
+
return false;
|
|
12279
|
+
}
|
|
12280
|
+
if (node === undefined || node && !isFocusable(node, config.tabbableOptions)) {
|
|
12281
|
+
// option not specified nor focusable: use fallback options
|
|
12282
|
+
if (findContainerIndex(doc.activeElement) >= 0) {
|
|
12283
|
+
node = doc.activeElement;
|
|
12284
|
+
} else {
|
|
12285
|
+
var firstTabbableGroup = state.tabbableGroups[0];
|
|
12286
|
+
var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;
|
|
12287
|
+
|
|
12288
|
+
// NOTE: `fallbackFocus` option function cannot return `false` (not supported)
|
|
12289
|
+
node = firstTabbableNode || getNodeForOption('fallbackFocus');
|
|
12290
|
+
}
|
|
12291
|
+
} else if (node === null) {
|
|
12292
|
+
// option is a VALID selector string that doesn't yield a node: use the `fallbackFocus`
|
|
12293
|
+
// option instead of the default behavior when the option isn't specified at all
|
|
12294
|
+
node = getNodeForOption('fallbackFocus');
|
|
12295
|
+
}
|
|
12296
|
+
if (!node) {
|
|
12297
|
+
throw new Error('Your focus-trap needs to have at least one focusable element');
|
|
12298
|
+
}
|
|
12299
|
+
return node;
|
|
12300
|
+
};
|
|
12301
|
+
var updateTabbableNodes = function updateTabbableNodes() {
|
|
12302
|
+
state.containerGroups = state.containers.map(function (container) {
|
|
12303
|
+
var tabbableNodes = tabbable(container, config.tabbableOptions);
|
|
12304
|
+
|
|
12305
|
+
// NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
|
|
12306
|
+
// are a superset of tabbable nodes since nodes with negative `tabindex` attributes
|
|
12307
|
+
// are focusable but not tabbable
|
|
12308
|
+
var focusableNodes = focusable(container, config.tabbableOptions);
|
|
12309
|
+
var firstTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[0] : undefined;
|
|
12310
|
+
var lastTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : undefined;
|
|
12311
|
+
var firstDomTabbableNode = focusableNodes.find(function (node) {
|
|
12312
|
+
return isTabbable(node);
|
|
12313
|
+
});
|
|
12314
|
+
var lastDomTabbableNode = focusableNodes.slice().reverse().find(function (node) {
|
|
12315
|
+
return isTabbable(node);
|
|
12316
|
+
});
|
|
12317
|
+
var posTabIndexesFound = !!tabbableNodes.find(function (node) {
|
|
12318
|
+
return getTabIndex(node) > 0;
|
|
12319
|
+
});
|
|
12320
|
+
return {
|
|
12321
|
+
container: container,
|
|
12322
|
+
tabbableNodes: tabbableNodes,
|
|
12323
|
+
focusableNodes: focusableNodes,
|
|
12324
|
+
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
12325
|
+
posTabIndexesFound: posTabIndexesFound,
|
|
12326
|
+
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
12327
|
+
firstTabbableNode: firstTabbableNode,
|
|
12328
|
+
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
12329
|
+
lastTabbableNode: lastTabbableNode,
|
|
12330
|
+
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
12331
|
+
// would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
|
|
12332
|
+
// because that API doesn't work with Shadow DOM as well as it should (@see
|
|
12333
|
+
// https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
|
|
12334
|
+
// to address an edge case related to positive tabindex support, this seems like a much easier,
|
|
12335
|
+
// "close enough most of the time" alternative for positive tabindexes which should generally
|
|
12336
|
+
// be avoided anyway...
|
|
12337
|
+
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
12338
|
+
firstDomTabbableNode: firstDomTabbableNode,
|
|
12339
|
+
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
12340
|
+
lastDomTabbableNode: lastDomTabbableNode,
|
|
12341
|
+
/**
|
|
12342
|
+
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
12343
|
+
* in this container, if any.
|
|
12344
|
+
* @param {HTMLElement} node
|
|
12345
|
+
* @param {boolean} [forward] True if going in forward tab order; false if going
|
|
12346
|
+
* in reverse.
|
|
12347
|
+
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
12348
|
+
*/
|
|
12349
|
+
nextTabbableNode: function nextTabbableNode(node) {
|
|
12350
|
+
var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
12351
|
+
var nodeIdx = tabbableNodes.indexOf(node);
|
|
12352
|
+
if (nodeIdx < 0) {
|
|
12353
|
+
// either not tabbable nor focusable, or was focused but not tabbable (negative tabindex):
|
|
12354
|
+
// since `node` should at least have been focusable, we assume that's the case and mimic
|
|
12355
|
+
// what browsers do, which is set focus to the next node in __document position order__,
|
|
12356
|
+
// regardless of positive tabindexes, if any -- and for reasons explained in the NOTE
|
|
12357
|
+
// above related to `firstDomTabbable` and `lastDomTabbable` properties, we fall back to
|
|
12358
|
+
// basic DOM order
|
|
12359
|
+
if (forward) {
|
|
12360
|
+
return focusableNodes.slice(focusableNodes.indexOf(node) + 1).find(function (el) {
|
|
12361
|
+
return isTabbable(el);
|
|
12362
|
+
});
|
|
12363
|
+
}
|
|
12364
|
+
return focusableNodes.slice(0, focusableNodes.indexOf(node)).reverse().find(function (el) {
|
|
12365
|
+
return isTabbable(el);
|
|
12366
|
+
});
|
|
12367
|
+
}
|
|
12368
|
+
return tabbableNodes[nodeIdx + (forward ? 1 : -1)];
|
|
12369
|
+
}
|
|
12370
|
+
};
|
|
12371
|
+
});
|
|
12372
|
+
state.tabbableGroups = state.containerGroups.filter(function (group) {
|
|
12373
|
+
return group.tabbableNodes.length > 0;
|
|
12374
|
+
});
|
|
12375
|
+
|
|
12376
|
+
// throw if no groups have tabbable nodes and we don't have a fallback focus node either
|
|
12377
|
+
if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option
|
|
12378
|
+
) {
|
|
12379
|
+
throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');
|
|
12380
|
+
}
|
|
12381
|
+
|
|
12382
|
+
// NOTE: Positive tabindexes are only properly supported in single-container traps because
|
|
12383
|
+
// doing it across multiple containers where tabindexes could be all over the place
|
|
12384
|
+
// would require Tabbable to support multiple containers, would require additional
|
|
12385
|
+
// specialized Shadow DOM support, and would require Tabbable's multi-container support
|
|
12386
|
+
// to look at those containers in document position order rather than user-provided
|
|
12387
|
+
// order (as they are treated in Focus-trap, for legacy reasons). See discussion on
|
|
12388
|
+
// https://github.com/focus-trap/focus-trap/issues/375 for more details.
|
|
12389
|
+
if (state.containerGroups.find(function (g) {
|
|
12390
|
+
return g.posTabIndexesFound;
|
|
12391
|
+
}) && state.containerGroups.length > 1) {
|
|
12392
|
+
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
12393
|
+
}
|
|
12394
|
+
};
|
|
12395
|
+
|
|
12396
|
+
/**
|
|
12397
|
+
* Gets the current activeElement. If it's a web-component and has open shadow-root
|
|
12398
|
+
* it will recursively search inside shadow roots for the "true" activeElement.
|
|
12399
|
+
*
|
|
12400
|
+
* @param {Document | ShadowRoot} el
|
|
12401
|
+
*
|
|
12402
|
+
* @returns {HTMLElement} The element that currently has the focus
|
|
12403
|
+
**/
|
|
12404
|
+
var _getActiveElement = function getActiveElement(el) {
|
|
12405
|
+
var activeElement = el.activeElement;
|
|
12406
|
+
if (!activeElement) {
|
|
12407
|
+
return;
|
|
12408
|
+
}
|
|
12409
|
+
if (activeElement.shadowRoot && activeElement.shadowRoot.activeElement !== null) {
|
|
12410
|
+
return _getActiveElement(activeElement.shadowRoot);
|
|
12411
|
+
}
|
|
12412
|
+
return activeElement;
|
|
12413
|
+
};
|
|
12414
|
+
var _tryFocus = function tryFocus(node) {
|
|
12415
|
+
if (node === false) {
|
|
12416
|
+
return;
|
|
12417
|
+
}
|
|
12418
|
+
if (node === _getActiveElement(document)) {
|
|
12419
|
+
return;
|
|
12420
|
+
}
|
|
12421
|
+
if (!node || !node.focus) {
|
|
12422
|
+
_tryFocus(getInitialFocusNode());
|
|
12423
|
+
return;
|
|
12424
|
+
}
|
|
12425
|
+
node.focus({
|
|
12426
|
+
preventScroll: !!config.preventScroll
|
|
12427
|
+
});
|
|
12428
|
+
// NOTE: focus() API does not trigger focusIn event so set MRU node manually
|
|
12429
|
+
state.mostRecentlyFocusedNode = node;
|
|
12430
|
+
if (isSelectableInput(node)) {
|
|
12431
|
+
node.select();
|
|
12432
|
+
}
|
|
12433
|
+
};
|
|
12434
|
+
var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {
|
|
12435
|
+
var node = getNodeForOption('setReturnFocus', {
|
|
12436
|
+
params: [previousActiveElement]
|
|
12437
|
+
});
|
|
12438
|
+
return node ? node : node === false ? false : previousActiveElement;
|
|
12439
|
+
};
|
|
12440
|
+
|
|
12441
|
+
/**
|
|
12442
|
+
* Finds the next node (in either direction) where focus should move according to a
|
|
12443
|
+
* keyboard focus-in event.
|
|
12444
|
+
* @param {Object} params
|
|
12445
|
+
* @param {Node} [params.target] Known target __from which__ to navigate, if any.
|
|
12446
|
+
* @param {KeyboardEvent|FocusEvent} [params.event] Event to use if `target` isn't known (event
|
|
12447
|
+
* will be used to determine the `target`). Ignored if `target` is specified.
|
|
12448
|
+
* @param {boolean} [params.isBackward] True if focus should move backward.
|
|
12449
|
+
* @returns {Node|undefined} The next node, or `undefined` if a next node couldn't be
|
|
12450
|
+
* determined given the current state of the trap.
|
|
12451
|
+
*/
|
|
12452
|
+
var findNextNavNode = function findNextNavNode(_ref3) {
|
|
12453
|
+
var target = _ref3.target,
|
|
12454
|
+
event = _ref3.event,
|
|
12455
|
+
_ref3$isBackward = _ref3.isBackward,
|
|
12456
|
+
isBackward = _ref3$isBackward === void 0 ? false : _ref3$isBackward;
|
|
12457
|
+
target = target || getActualTarget(event);
|
|
12458
|
+
updateTabbableNodes();
|
|
12459
|
+
var destinationNode = null;
|
|
12460
|
+
if (state.tabbableGroups.length > 0) {
|
|
12461
|
+
// make sure the target is actually contained in a group
|
|
12462
|
+
// NOTE: the target may also be the container itself if it's focusable
|
|
12463
|
+
// with tabIndex='-1' and was given initial focus
|
|
12464
|
+
var containerIndex = findContainerIndex(target, event);
|
|
12465
|
+
var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;
|
|
12466
|
+
if (containerIndex < 0) {
|
|
12467
|
+
// target not found in any group: quite possible focus has escaped the trap,
|
|
12468
|
+
// so bring it back into...
|
|
12469
|
+
if (isBackward) {
|
|
12470
|
+
// ...the last node in the last group
|
|
12471
|
+
destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;
|
|
12472
|
+
} else {
|
|
12473
|
+
// ...the first node in the first group
|
|
12474
|
+
destinationNode = state.tabbableGroups[0].firstTabbableNode;
|
|
12475
|
+
}
|
|
12476
|
+
} else if (isBackward) {
|
|
12477
|
+
// REVERSE
|
|
12478
|
+
|
|
12479
|
+
// is the target the first tabbable node in a group?
|
|
12480
|
+
var startOfGroupIndex = state.tabbableGroups.findIndex(function (_ref4) {
|
|
12481
|
+
var firstTabbableNode = _ref4.firstTabbableNode;
|
|
12482
|
+
return target === firstTabbableNode;
|
|
12483
|
+
});
|
|
12484
|
+
if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
|
|
12485
|
+
// an exception case where the target is either the container itself, or
|
|
12486
|
+
// a non-tabbable node that was given focus (i.e. tabindex is negative
|
|
12487
|
+
// and user clicked on it or node was programmatically given focus)
|
|
12488
|
+
// and is not followed by any other tabbable node, in which
|
|
12489
|
+
// case, we should handle shift+tab as if focus were on the container's
|
|
12490
|
+
// first tabbable node, and go to the last tabbable node of the LAST group
|
|
12491
|
+
startOfGroupIndex = containerIndex;
|
|
12492
|
+
}
|
|
12493
|
+
if (startOfGroupIndex >= 0) {
|
|
12494
|
+
// YES: then shift+tab should go to the last tabbable node in the
|
|
12495
|
+
// previous group (and wrap around to the last tabbable node of
|
|
12496
|
+
// the LAST group if it's the first tabbable node of the FIRST group)
|
|
12497
|
+
var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;
|
|
12498
|
+
var destinationGroup = state.tabbableGroups[destinationGroupIndex];
|
|
12499
|
+
destinationNode = getTabIndex(target) >= 0 ? destinationGroup.lastTabbableNode : destinationGroup.lastDomTabbableNode;
|
|
12500
|
+
} else if (!isTabEvent(event)) {
|
|
12501
|
+
// user must have customized the nav keys so we have to move focus manually _within_
|
|
12502
|
+
// the active group: do this based on the order determined by tabbable()
|
|
12503
|
+
destinationNode = containerGroup.nextTabbableNode(target, false);
|
|
12504
|
+
}
|
|
12505
|
+
} else {
|
|
12506
|
+
// FORWARD
|
|
12507
|
+
|
|
12508
|
+
// is the target the last tabbable node in a group?
|
|
12509
|
+
var lastOfGroupIndex = state.tabbableGroups.findIndex(function (_ref5) {
|
|
12510
|
+
var lastTabbableNode = _ref5.lastTabbableNode;
|
|
12511
|
+
return target === lastTabbableNode;
|
|
12512
|
+
});
|
|
12513
|
+
if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
|
|
12514
|
+
// an exception case where the target is the container itself, or
|
|
12515
|
+
// a non-tabbable node that was given focus (i.e. tabindex is negative
|
|
12516
|
+
// and user clicked on it or node was programmatically given focus)
|
|
12517
|
+
// and is not followed by any other tabbable node, in which
|
|
12518
|
+
// case, we should handle tab as if focus were on the container's
|
|
12519
|
+
// last tabbable node, and go to the first tabbable node of the FIRST group
|
|
12520
|
+
lastOfGroupIndex = containerIndex;
|
|
12521
|
+
}
|
|
12522
|
+
if (lastOfGroupIndex >= 0) {
|
|
12523
|
+
// YES: then tab should go to the first tabbable node in the next
|
|
12524
|
+
// group (and wrap around to the first tabbable node of the FIRST
|
|
12525
|
+
// group if it's the last tabbable node of the LAST group)
|
|
12526
|
+
var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;
|
|
12527
|
+
var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];
|
|
12528
|
+
destinationNode = getTabIndex(target) >= 0 ? _destinationGroup.firstTabbableNode : _destinationGroup.firstDomTabbableNode;
|
|
12529
|
+
} else if (!isTabEvent(event)) {
|
|
12530
|
+
// user must have customized the nav keys so we have to move focus manually _within_
|
|
12531
|
+
// the active group: do this based on the order determined by tabbable()
|
|
12532
|
+
destinationNode = containerGroup.nextTabbableNode(target);
|
|
12533
|
+
}
|
|
12534
|
+
}
|
|
12535
|
+
} else {
|
|
12536
|
+
// no groups available
|
|
12537
|
+
// NOTE: the fallbackFocus option does not support returning false to opt-out
|
|
12538
|
+
destinationNode = getNodeForOption('fallbackFocus');
|
|
12539
|
+
}
|
|
12540
|
+
return destinationNode;
|
|
12541
|
+
};
|
|
12542
|
+
|
|
12543
|
+
// This needs to be done on mousedown and touchstart instead of click
|
|
12544
|
+
// so that it precedes the focus event.
|
|
12545
|
+
var checkPointerDown = function checkPointerDown(e) {
|
|
12546
|
+
var target = getActualTarget(e);
|
|
12547
|
+
if (findContainerIndex(target, e) >= 0) {
|
|
12548
|
+
// allow the click since it ocurred inside the trap
|
|
12549
|
+
return;
|
|
12550
|
+
}
|
|
12551
|
+
if (valueOrHandler(config.clickOutsideDeactivates, e)) {
|
|
12552
|
+
// immediately deactivate the trap
|
|
12553
|
+
trap.deactivate({
|
|
12554
|
+
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
12555
|
+
// which will result in the outside click setting focus to the node
|
|
12556
|
+
// that was clicked (and if not focusable, to "nothing"); by setting
|
|
12557
|
+
// `returnFocus: true`, we'll attempt to re-focus the node originally-focused
|
|
12558
|
+
// on activation (or the configured `setReturnFocus` node), whether the
|
|
12559
|
+
// outside click was on a focusable node or not
|
|
12560
|
+
returnFocus: config.returnFocusOnDeactivate
|
|
12561
|
+
});
|
|
12562
|
+
return;
|
|
12563
|
+
}
|
|
12564
|
+
|
|
12565
|
+
// This is needed for mobile devices.
|
|
12566
|
+
// (If we'll only let `click` events through,
|
|
12567
|
+
// then on mobile they will be blocked anyways if `touchstart` is blocked.)
|
|
12568
|
+
if (valueOrHandler(config.allowOutsideClick, e)) {
|
|
12569
|
+
// allow the click outside the trap to take place
|
|
12570
|
+
return;
|
|
12571
|
+
}
|
|
12572
|
+
|
|
12573
|
+
// otherwise, prevent the click
|
|
12574
|
+
e.preventDefault();
|
|
12575
|
+
};
|
|
12576
|
+
|
|
12577
|
+
// In case focus escapes the trap for some strange reason, pull it back in.
|
|
12578
|
+
// NOTE: the focusIn event is NOT cancelable, so if focus escapes, it may cause unexpected
|
|
12579
|
+
// scrolling if the node that got focused was out of view; there's nothing we can do to
|
|
12580
|
+
// prevent that from happening by the time we discover that focus escaped
|
|
12581
|
+
var checkFocusIn = function checkFocusIn(event) {
|
|
12582
|
+
var target = getActualTarget(event);
|
|
12583
|
+
var targetContained = findContainerIndex(target, event) >= 0;
|
|
12584
|
+
|
|
12585
|
+
// In Firefox when you Tab out of an iframe the Document is briefly focused.
|
|
12586
|
+
if (targetContained || target instanceof Document) {
|
|
12587
|
+
if (targetContained) {
|
|
12588
|
+
state.mostRecentlyFocusedNode = target;
|
|
12589
|
+
}
|
|
12590
|
+
} else {
|
|
12591
|
+
// escaped! pull it back in to where it just left
|
|
12592
|
+
event.stopImmediatePropagation();
|
|
12593
|
+
|
|
12594
|
+
// focus will escape if the MRU node had a positive tab index and user tried to nav forward;
|
|
12595
|
+
// it will also escape if the MRU node had a 0 tab index and user tried to nav backward
|
|
12596
|
+
// toward a node with a positive tab index
|
|
12597
|
+
var nextNode; // next node to focus, if we find one
|
|
12598
|
+
var navAcrossContainers = true;
|
|
12599
|
+
if (state.mostRecentlyFocusedNode) {
|
|
12600
|
+
if (getTabIndex(state.mostRecentlyFocusedNode) > 0) {
|
|
12601
|
+
// MRU container index must be >=0 otherwise we wouldn't have it as an MRU node...
|
|
12602
|
+
var mruContainerIdx = findContainerIndex(state.mostRecentlyFocusedNode);
|
|
12603
|
+
// there MAY not be any tabbable nodes in the container if there are at least 2 containers
|
|
12604
|
+
// and the MRU node is focusable but not tabbable (focus-trap requires at least 1 container
|
|
12605
|
+
// with at least one tabbable node in order to function, so this could be the other container
|
|
12606
|
+
// with nothing tabbable in it)
|
|
12607
|
+
var tabbableNodes = state.containerGroups[mruContainerIdx].tabbableNodes;
|
|
12608
|
+
if (tabbableNodes.length > 0) {
|
|
12609
|
+
// MRU tab index MAY not be found if the MRU node is focusable but not tabbable
|
|
12610
|
+
var mruTabIdx = tabbableNodes.findIndex(function (node) {
|
|
12611
|
+
return node === state.mostRecentlyFocusedNode;
|
|
12612
|
+
});
|
|
12613
|
+
if (mruTabIdx >= 0) {
|
|
12614
|
+
if (config.isKeyForward(state.recentNavEvent)) {
|
|
12615
|
+
if (mruTabIdx + 1 < tabbableNodes.length) {
|
|
12616
|
+
nextNode = tabbableNodes[mruTabIdx + 1];
|
|
12617
|
+
navAcrossContainers = false;
|
|
12618
|
+
}
|
|
12619
|
+
// else, don't wrap within the container as focus should move to next/previous
|
|
12620
|
+
// container
|
|
12621
|
+
} else {
|
|
12622
|
+
if (mruTabIdx - 1 >= 0) {
|
|
12623
|
+
nextNode = tabbableNodes[mruTabIdx - 1];
|
|
12624
|
+
navAcrossContainers = false;
|
|
12625
|
+
}
|
|
12626
|
+
// else, don't wrap within the container as focus should move to next/previous
|
|
12627
|
+
// container
|
|
12628
|
+
}
|
|
12629
|
+
// else, don't find in container order without considering direction too
|
|
12630
|
+
}
|
|
12631
|
+
}
|
|
12632
|
+
// else, no tabbable nodes in that container (which means we must have at least one other
|
|
12633
|
+
// container with at least one tabbable node in it, otherwise focus-trap would've thrown
|
|
12634
|
+
// an error the last time updateTabbableNodes() was run): find next node among all known
|
|
12635
|
+
// containers
|
|
12636
|
+
} else {
|
|
12637
|
+
// check to see if there's at least one tabbable node with a positive tab index inside
|
|
12638
|
+
// the trap because focus seems to escape when navigating backward from a tabbable node
|
|
12639
|
+
// with tabindex=0 when this is the case (instead of wrapping to the tabbable node with
|
|
12640
|
+
// the greatest positive tab index like it should)
|
|
12641
|
+
if (!state.containerGroups.some(function (g) {
|
|
12642
|
+
return g.tabbableNodes.some(function (n) {
|
|
12643
|
+
return getTabIndex(n) > 0;
|
|
12644
|
+
});
|
|
12645
|
+
})) {
|
|
12646
|
+
// no containers with tabbable nodes with positive tab indexes which means the focus
|
|
12647
|
+
// escaped for some other reason and we should just execute the fallback to the
|
|
12648
|
+
// MRU node or initial focus node, if any
|
|
12649
|
+
navAcrossContainers = false;
|
|
12650
|
+
}
|
|
12651
|
+
}
|
|
12652
|
+
} else {
|
|
12653
|
+
// no MRU node means we're likely in some initial condition when the trap has just
|
|
12654
|
+
// been activated and initial focus hasn't been given yet, in which case we should
|
|
12655
|
+
// fall through to trying to focus the initial focus node, which is what should
|
|
12656
|
+
// happen below at this point in the logic
|
|
12657
|
+
navAcrossContainers = false;
|
|
12658
|
+
}
|
|
12659
|
+
if (navAcrossContainers) {
|
|
12660
|
+
nextNode = findNextNavNode({
|
|
12661
|
+
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
12662
|
+
// outside the trap causing the focus escape we're trying to fix)
|
|
12663
|
+
target: state.mostRecentlyFocusedNode,
|
|
12664
|
+
isBackward: config.isKeyBackward(state.recentNavEvent)
|
|
12665
|
+
});
|
|
12666
|
+
}
|
|
12667
|
+
if (nextNode) {
|
|
12668
|
+
_tryFocus(nextNode);
|
|
12669
|
+
} else {
|
|
12670
|
+
_tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
|
|
12671
|
+
}
|
|
12672
|
+
}
|
|
12673
|
+
state.recentNavEvent = undefined; // clear
|
|
12674
|
+
};
|
|
12675
|
+
|
|
12676
|
+
// Hijack key nav events on the first and last focusable nodes of the trap,
|
|
12677
|
+
// in order to prevent focus from escaping. If it escapes for even a
|
|
12678
|
+
// moment it can end up scrolling the page and causing confusion so we
|
|
12679
|
+
// kind of need to capture the action at the keydown phase.
|
|
12680
|
+
var checkKeyNav = function checkKeyNav(event) {
|
|
12681
|
+
var isBackward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
12682
|
+
state.recentNavEvent = event;
|
|
12683
|
+
var destinationNode = findNextNavNode({
|
|
12684
|
+
event: event,
|
|
12685
|
+
isBackward: isBackward
|
|
12686
|
+
});
|
|
12687
|
+
if (destinationNode) {
|
|
12688
|
+
if (isTabEvent(event)) {
|
|
12689
|
+
// since tab natively moves focus, we wouldn't have a destination node unless we
|
|
12690
|
+
// were on the edge of a container and had to move to the next/previous edge, in
|
|
12691
|
+
// which case we want to prevent default to keep the browser from moving focus
|
|
12692
|
+
// to where it normally would
|
|
12693
|
+
event.preventDefault();
|
|
12694
|
+
}
|
|
12695
|
+
_tryFocus(destinationNode);
|
|
12696
|
+
}
|
|
12697
|
+
// else, let the browser take care of [shift+]tab and move the focus
|
|
12698
|
+
};
|
|
12699
|
+
var checkTabKey = function checkTabKey(event) {
|
|
12700
|
+
if (config.isKeyForward(event) || config.isKeyBackward(event)) {
|
|
12701
|
+
checkKeyNav(event, config.isKeyBackward(event));
|
|
12702
|
+
}
|
|
12703
|
+
};
|
|
12704
|
+
|
|
12705
|
+
// we use a different event phase for the Escape key to allow canceling the event and checking for this in escapeDeactivates
|
|
12706
|
+
var checkEscapeKey = function checkEscapeKey(event) {
|
|
12707
|
+
if (isEscapeEvent(event) && valueOrHandler(config.escapeDeactivates, event) !== false) {
|
|
12708
|
+
event.preventDefault();
|
|
12709
|
+
trap.deactivate();
|
|
12710
|
+
}
|
|
12711
|
+
};
|
|
12712
|
+
var checkClick = function checkClick(e) {
|
|
12713
|
+
var target = getActualTarget(e);
|
|
12714
|
+
if (findContainerIndex(target, e) >= 0) {
|
|
12715
|
+
return;
|
|
12716
|
+
}
|
|
12717
|
+
if (valueOrHandler(config.clickOutsideDeactivates, e)) {
|
|
12718
|
+
return;
|
|
12719
|
+
}
|
|
12720
|
+
if (valueOrHandler(config.allowOutsideClick, e)) {
|
|
12721
|
+
return;
|
|
12722
|
+
}
|
|
12723
|
+
e.preventDefault();
|
|
12724
|
+
e.stopImmediatePropagation();
|
|
12725
|
+
};
|
|
12726
|
+
|
|
12727
|
+
//
|
|
12728
|
+
// EVENT LISTENERS
|
|
12729
|
+
//
|
|
12730
|
+
|
|
12731
|
+
var addListeners = function addListeners() {
|
|
12732
|
+
if (!state.active) {
|
|
12733
|
+
return;
|
|
12734
|
+
}
|
|
12735
|
+
|
|
12736
|
+
// There can be only one listening focus trap at a time
|
|
12737
|
+
activeFocusTraps.activateTrap(trapStack, trap);
|
|
12738
|
+
|
|
12739
|
+
// Delay ensures that the focused element doesn't capture the event
|
|
12740
|
+
// that caused the focus trap activation.
|
|
12741
|
+
state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function () {
|
|
12742
|
+
_tryFocus(getInitialFocusNode());
|
|
12743
|
+
}) : _tryFocus(getInitialFocusNode());
|
|
12744
|
+
doc.addEventListener('focusin', checkFocusIn, true);
|
|
12745
|
+
doc.addEventListener('mousedown', checkPointerDown, {
|
|
12746
|
+
capture: true,
|
|
12747
|
+
passive: false
|
|
12748
|
+
});
|
|
12749
|
+
doc.addEventListener('touchstart', checkPointerDown, {
|
|
12750
|
+
capture: true,
|
|
12751
|
+
passive: false
|
|
12752
|
+
});
|
|
12753
|
+
doc.addEventListener('click', checkClick, {
|
|
12754
|
+
capture: true,
|
|
12755
|
+
passive: false
|
|
12756
|
+
});
|
|
12757
|
+
doc.addEventListener('keydown', checkTabKey, {
|
|
12758
|
+
capture: true,
|
|
12759
|
+
passive: false
|
|
12760
|
+
});
|
|
12761
|
+
doc.addEventListener('keydown', checkEscapeKey);
|
|
12762
|
+
return trap;
|
|
12763
|
+
};
|
|
12764
|
+
var removeListeners = function removeListeners() {
|
|
12765
|
+
if (!state.active) {
|
|
12766
|
+
return;
|
|
12767
|
+
}
|
|
12768
|
+
doc.removeEventListener('focusin', checkFocusIn, true);
|
|
12769
|
+
doc.removeEventListener('mousedown', checkPointerDown, true);
|
|
12770
|
+
doc.removeEventListener('touchstart', checkPointerDown, true);
|
|
12771
|
+
doc.removeEventListener('click', checkClick, true);
|
|
12772
|
+
doc.removeEventListener('keydown', checkTabKey, true);
|
|
12773
|
+
doc.removeEventListener('keydown', checkEscapeKey);
|
|
12774
|
+
return trap;
|
|
12775
|
+
};
|
|
12776
|
+
|
|
12777
|
+
//
|
|
12778
|
+
// MUTATION OBSERVER
|
|
12779
|
+
//
|
|
12780
|
+
|
|
12781
|
+
var checkDomRemoval = function checkDomRemoval(mutations) {
|
|
12782
|
+
var isFocusedNodeRemoved = mutations.some(function (mutation) {
|
|
12783
|
+
var removedNodes = Array.from(mutation.removedNodes);
|
|
12784
|
+
return removedNodes.some(function (node) {
|
|
12785
|
+
return node === state.mostRecentlyFocusedNode;
|
|
12786
|
+
});
|
|
12787
|
+
});
|
|
12788
|
+
|
|
12789
|
+
// If the currently focused is removed then browsers will move focus to the
|
|
12790
|
+
// <body> element. If this happens, try to move focus back into the trap.
|
|
12791
|
+
if (isFocusedNodeRemoved) {
|
|
12792
|
+
_tryFocus(getInitialFocusNode());
|
|
12793
|
+
}
|
|
12794
|
+
};
|
|
12795
|
+
|
|
12796
|
+
// Use MutationObserver - if supported - to detect if focused node is removed
|
|
12797
|
+
// from the DOM.
|
|
12798
|
+
var mutationObserver = typeof window !== 'undefined' && 'MutationObserver' in window ? new MutationObserver(checkDomRemoval) : undefined;
|
|
12799
|
+
var updateObservedNodes = function updateObservedNodes() {
|
|
12800
|
+
if (!mutationObserver) {
|
|
12801
|
+
return;
|
|
12802
|
+
}
|
|
12803
|
+
mutationObserver.disconnect();
|
|
12804
|
+
if (state.active && !state.paused) {
|
|
12805
|
+
state.containers.map(function (container) {
|
|
12806
|
+
mutationObserver.observe(container, {
|
|
12807
|
+
subtree: true,
|
|
12808
|
+
childList: true
|
|
12809
|
+
});
|
|
12810
|
+
});
|
|
12811
|
+
}
|
|
12812
|
+
};
|
|
12813
|
+
|
|
12814
|
+
//
|
|
12815
|
+
// TRAP DEFINITION
|
|
12816
|
+
//
|
|
12817
|
+
|
|
12818
|
+
trap = {
|
|
12819
|
+
get active() {
|
|
12820
|
+
return state.active;
|
|
12821
|
+
},
|
|
12822
|
+
get paused() {
|
|
12823
|
+
return state.paused;
|
|
12824
|
+
},
|
|
12825
|
+
activate: function activate(activateOptions) {
|
|
12826
|
+
if (state.active) {
|
|
12827
|
+
return this;
|
|
12828
|
+
}
|
|
12829
|
+
var onActivate = getOption(activateOptions, 'onActivate');
|
|
12830
|
+
var onPostActivate = getOption(activateOptions, 'onPostActivate');
|
|
12831
|
+
var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');
|
|
12832
|
+
if (!checkCanFocusTrap) {
|
|
12833
|
+
updateTabbableNodes();
|
|
12834
|
+
}
|
|
12835
|
+
state.active = true;
|
|
12836
|
+
state.paused = false;
|
|
12837
|
+
state.nodeFocusedBeforeActivation = _getActiveElement(doc);
|
|
12838
|
+
onActivate === null || onActivate === void 0 || onActivate();
|
|
12839
|
+
var finishActivation = function finishActivation() {
|
|
12840
|
+
if (checkCanFocusTrap) {
|
|
12841
|
+
updateTabbableNodes();
|
|
12842
|
+
}
|
|
12843
|
+
addListeners();
|
|
12844
|
+
updateObservedNodes();
|
|
12845
|
+
onPostActivate === null || onPostActivate === void 0 || onPostActivate();
|
|
12846
|
+
};
|
|
12847
|
+
if (checkCanFocusTrap) {
|
|
12848
|
+
checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
|
|
12849
|
+
return this;
|
|
12850
|
+
}
|
|
12851
|
+
finishActivation();
|
|
12852
|
+
return this;
|
|
12853
|
+
},
|
|
12854
|
+
deactivate: function deactivate(deactivateOptions) {
|
|
12855
|
+
if (!state.active) {
|
|
12856
|
+
return this;
|
|
12857
|
+
}
|
|
12858
|
+
var options = _objectSpread2({
|
|
12859
|
+
onDeactivate: config.onDeactivate,
|
|
12860
|
+
onPostDeactivate: config.onPostDeactivate,
|
|
12861
|
+
checkCanReturnFocus: config.checkCanReturnFocus
|
|
12862
|
+
}, deactivateOptions);
|
|
12863
|
+
clearTimeout(state.delayInitialFocusTimer); // noop if undefined
|
|
12864
|
+
state.delayInitialFocusTimer = undefined;
|
|
12865
|
+
removeListeners();
|
|
12866
|
+
state.active = false;
|
|
12867
|
+
state.paused = false;
|
|
12868
|
+
updateObservedNodes();
|
|
12869
|
+
activeFocusTraps.deactivateTrap(trapStack, trap);
|
|
12870
|
+
var onDeactivate = getOption(options, 'onDeactivate');
|
|
12871
|
+
var onPostDeactivate = getOption(options, 'onPostDeactivate');
|
|
12872
|
+
var checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');
|
|
12873
|
+
var returnFocus = getOption(options, 'returnFocus', 'returnFocusOnDeactivate');
|
|
12874
|
+
onDeactivate === null || onDeactivate === void 0 || onDeactivate();
|
|
12875
|
+
var finishDeactivation = function finishDeactivation() {
|
|
12876
|
+
delay(function () {
|
|
12877
|
+
if (returnFocus) {
|
|
12878
|
+
_tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
|
|
12879
|
+
}
|
|
12880
|
+
onPostDeactivate === null || onPostDeactivate === void 0 || onPostDeactivate();
|
|
12881
|
+
});
|
|
12882
|
+
};
|
|
12883
|
+
if (returnFocus && checkCanReturnFocus) {
|
|
12884
|
+
checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);
|
|
12885
|
+
return this;
|
|
12886
|
+
}
|
|
12887
|
+
finishDeactivation();
|
|
12888
|
+
return this;
|
|
12889
|
+
},
|
|
12890
|
+
pause: function pause(pauseOptions) {
|
|
12891
|
+
if (!state.active) {
|
|
12892
|
+
return this;
|
|
12893
|
+
}
|
|
12894
|
+
state.manuallyPaused = true;
|
|
12895
|
+
return this._setPausedState(true, pauseOptions);
|
|
12896
|
+
},
|
|
12897
|
+
unpause: function unpause(unpauseOptions) {
|
|
12898
|
+
if (!state.active) {
|
|
12899
|
+
return this;
|
|
12900
|
+
}
|
|
12901
|
+
state.manuallyPaused = false;
|
|
12902
|
+
if (trapStack[trapStack.length - 1] !== this) {
|
|
12903
|
+
return this;
|
|
12904
|
+
}
|
|
12905
|
+
return this._setPausedState(false, unpauseOptions);
|
|
12906
|
+
},
|
|
12907
|
+
updateContainerElements: function updateContainerElements(containerElements) {
|
|
12908
|
+
var elementsAsArray = [].concat(containerElements).filter(Boolean);
|
|
12909
|
+
state.containers = elementsAsArray.map(function (element) {
|
|
12910
|
+
return typeof element === 'string' ? doc.querySelector(element) : element;
|
|
12911
|
+
});
|
|
12912
|
+
if (state.active) {
|
|
12913
|
+
updateTabbableNodes();
|
|
12914
|
+
}
|
|
12915
|
+
updateObservedNodes();
|
|
12916
|
+
return this;
|
|
12917
|
+
}
|
|
12918
|
+
};
|
|
12919
|
+
Object.defineProperties(trap, {
|
|
12920
|
+
_isManuallyPaused: {
|
|
12921
|
+
value: function value() {
|
|
12922
|
+
return state.manuallyPaused;
|
|
12923
|
+
}
|
|
12924
|
+
},
|
|
12925
|
+
_setPausedState: {
|
|
12926
|
+
value: function value(paused, options) {
|
|
12927
|
+
if (state.paused === paused) {
|
|
12928
|
+
return this;
|
|
12929
|
+
}
|
|
12930
|
+
state.paused = paused;
|
|
12931
|
+
if (paused) {
|
|
12932
|
+
var onPause = getOption(options, 'onPause');
|
|
12933
|
+
var onPostPause = getOption(options, 'onPostPause');
|
|
12934
|
+
onPause === null || onPause === void 0 || onPause();
|
|
12935
|
+
removeListeners();
|
|
12936
|
+
updateObservedNodes();
|
|
12937
|
+
onPostPause === null || onPostPause === void 0 || onPostPause();
|
|
12938
|
+
} else {
|
|
12939
|
+
var onUnpause = getOption(options, 'onUnpause');
|
|
12940
|
+
var onPostUnpause = getOption(options, 'onPostUnpause');
|
|
12941
|
+
onUnpause === null || onUnpause === void 0 || onUnpause();
|
|
12942
|
+
updateTabbableNodes();
|
|
12943
|
+
addListeners();
|
|
12944
|
+
updateObservedNodes();
|
|
12945
|
+
onPostUnpause === null || onPostUnpause === void 0 || onPostUnpause();
|
|
12946
|
+
}
|
|
12947
|
+
return this;
|
|
12948
|
+
}
|
|
12949
|
+
}
|
|
12950
|
+
});
|
|
12951
|
+
|
|
12952
|
+
// initialize container elements
|
|
12953
|
+
trap.updateContainerElements(elements);
|
|
12954
|
+
return trap;
|
|
12955
|
+
};
|
|
12956
|
+
|
|
12957
|
+
const drawerCss = ":host{--background:var(--road-surface);--color:var(--road-on-surface);--header-icon:var(--road-on-surface);--header-color:var(--road-on-surface);--header-background:var(--road-surface);--header-delimiter:0;--back-chevron-color:var(--road-icon);--max-height:auto;--z-index:10;position:fixed;top:0;left:0;z-index:var(--z-index);display:flex;justify-content:flex-start;width:100%;height:100%;overflow:hidden;font-family:var(--road-font, sans-serif);line-height:1.5;color:var(--color);visibility:hidden !important;opacity:0;transition:opacity 0.15s linear, visibility 0.15s}.drawer-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:block;touch-action:none;cursor:pointer;background:var(--road-overlay)}.drawer-dialog{position:relative;width:100%;pointer-events:none;transition:transform 0.3s ease-out;transform:translateX(-100%)}:host(.drawer-right){justify-content:flex-end}:host(.drawer-right) .drawer-dialog{transform:translateX(100%)}:host(.drawer-bottom){align-items:flex-end}:host(.drawer-bottom) .drawer-dialog{width:100%;max-height:var(--max-height);transform:translateY(100%)}:host(.drawer-bottom) .drawer-content{height:auto}.drawer-content{position:relative;display:flex;flex-direction:column;width:100%;height:100vh;max-height:100vh;pointer-events:auto;background-color:var(--background);background-clip:padding-box;box-shadow:var(--road-elevation-hight)}.drawer-header{display:flex;flex-shrink:0;align-items:center;justify-content:flex-end;color:var(--header-color);background:var(--header-background);border-color:var(--road-grey-300);border-style:solid;border-width:var(--header-delimiter)}.drawer-header road-icon{flex-shrink:0;color:var(--header-icon)}.drawer-footer{padding:var(--road-spacing-05);background-color:var(--road-surface)}.drawer-footer.remove-padding{padding:0}.drawer-header-inverse{--header-icon:var(--road-on-primary);--header-color:var(--road-on-primary);--header-background:var(--road-primary-variant);margin-bottom:2.5rem}.drawer-action,.drawer-close{display:flex;align-items:center;justify-content:center;padding:0.5rem;font-family:inherit;font-size:0.875rem;color:inherit;cursor:pointer;background:transparent;border:0;appearance:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.drawer-header:not(.drawer-header-inverse) .drawer-action road-icon{color:var(--back-chevron-color)}.drawer-action~.drawer-title,.drawer-close~.drawer-title{padding-left:0}.drawer-action-left,.drawer-close-left{margin-right:auto}.drawer-title{display:flex;flex-grow:1;align-items:center;justify-content:center;padding-left:3.5rem;margin:0;font-size:var(--road-body-medium)}.drawer-body{overflow-y:auto;padding:0 var(--road-spacing-05) var(--road-spacing-05)}.drawer-body.remove-padding{padding:0}:host(.drawer-right) .drawer-body,:host(.drawer-left) .drawer-body{height:calc(100vh - 3.5rem)}.drawer-inner{padding:0 1rem 2.5rem}@media (min-width: 768px){.drawer-inner{padding:0 2rem 2.5rem}.drawer-body{padding:0 var(--road-spacing-08) var(--road-spacing-05)}.drawer-body.remove-padding{padding:0}.drawer-footer{padding:var(--road-spacing-05) var(--road-spacing-08)}.drawer-footer.remove-padding{padding:0}}:host(.drawer-open){visibility:visible !important;opacity:1}:host(.drawer-open) .drawer-dialog{transform:none}";
|
|
11340
12958
|
var RoadDrawerStyle0 = drawerCss;
|
|
11341
12959
|
|
|
11342
12960
|
/**
|
|
@@ -11359,8 +12977,8 @@ class Drawer {
|
|
|
11359
12977
|
*/
|
|
11360
12978
|
this.isOpen = false;
|
|
11361
12979
|
/**
|
|
11362
|
-
|
|
11363
|
-
|
|
12980
|
+
* Set removePadding property to true to remove padding for drawer body
|
|
12981
|
+
*/
|
|
11364
12982
|
this.removePadding = false;
|
|
11365
12983
|
/**
|
|
11366
12984
|
* position of the drawer. e.g. left, right, bottom
|
|
@@ -11431,24 +13049,30 @@ class Drawer {
|
|
|
11431
13049
|
handleOpen(openValue) {
|
|
11432
13050
|
if (openValue === true) {
|
|
11433
13051
|
this.onOpen.emit();
|
|
11434
|
-
// Focus the first button element after the drawer is opened
|
|
11435
|
-
setTimeout(() =>
|
|
13052
|
+
// Focus the first button element after the drawer is opened then focus trap
|
|
13053
|
+
setTimeout(() => {
|
|
13054
|
+
var _a;
|
|
13055
|
+
this.focusFirstElement();
|
|
13056
|
+
(_a = this.focusTrap) === null || _a === void 0 ? void 0 : _a.activate();
|
|
13057
|
+
}, 50); // Add a slight delay to ensure the element is rendered
|
|
11436
13058
|
}
|
|
11437
13059
|
else {
|
|
11438
13060
|
this.el.addEventListener('transitionend', () => {
|
|
13061
|
+
var _a;
|
|
13062
|
+
(_a = this.focusTrap) === null || _a === void 0 ? void 0 : _a.deactivate();
|
|
11439
13063
|
this.onClose.emit();
|
|
11440
13064
|
this.el.shadowRoot && (this.el.shadowRoot.querySelector('.drawer-body').scrollTop = 0);
|
|
11441
13065
|
}, { once: true });
|
|
11442
13066
|
}
|
|
11443
13067
|
}
|
|
11444
13068
|
/**
|
|
11445
|
-
* Find and focus the first
|
|
13069
|
+
* Find and focus the first element in the drawer
|
|
11446
13070
|
*/
|
|
11447
|
-
|
|
13071
|
+
focusFirstElement() {
|
|
11448
13072
|
var _a;
|
|
11449
|
-
const
|
|
11450
|
-
if (
|
|
11451
|
-
|
|
13073
|
+
const firstElement = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [contenteditable], [tabindex]:not([tabindex="-1"])')[0];
|
|
13074
|
+
if (firstElement) {
|
|
13075
|
+
firstElement.focus();
|
|
11452
13076
|
}
|
|
11453
13077
|
}
|
|
11454
13078
|
/**
|
|
@@ -11463,9 +13087,18 @@ class Drawer {
|
|
|
11463
13087
|
* Call close function when clicking an element with data-dismiss="modal" attribute
|
|
11464
13088
|
*/
|
|
11465
13089
|
componentDidLoad() {
|
|
13090
|
+
var _a;
|
|
11466
13091
|
this.el.querySelectorAll('[data-dismiss="modal"]').forEach(item => {
|
|
11467
13092
|
item.addEventListener('click', () => this.close());
|
|
11468
13093
|
});
|
|
13094
|
+
const drawerContent = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".drawer-dialog");
|
|
13095
|
+
this.focusTrap = createFocusTrap(drawerContent, {
|
|
13096
|
+
onActivate: () => drawerContent === null || drawerContent === void 0 ? void 0 : drawerContent.classList.add("focus-trapped"),
|
|
13097
|
+
onDeactivate: () => drawerContent === null || drawerContent === void 0 ? void 0 : drawerContent.classList.remove("focus-trapped"),
|
|
13098
|
+
tabbableOptions: {
|
|
13099
|
+
getShadowRoot: true,
|
|
13100
|
+
},
|
|
13101
|
+
});
|
|
11469
13102
|
}
|
|
11470
13103
|
render() {
|
|
11471
13104
|
var _a, _b, _c, _d;
|
|
@@ -11481,7 +13114,7 @@ class Drawer {
|
|
|
11481
13114
|
const drawerWidthValue = this.position === 'bottom' ? '100%' : `${this.drawerWidth}px`;
|
|
11482
13115
|
const footerSlotElement = (_d = this.el.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector('slot[name="footer"]');
|
|
11483
13116
|
const hasFooterContent = footerSlotElement instanceof HTMLSlotElement && footerSlotElement.assignedNodes().length > 0;
|
|
11484
|
-
return (hAsync(Host, { key: '
|
|
13117
|
+
return (hAsync(Host, { key: 'a2f62ec1ecc2d5452041c1aef21c219dfb7d37e5', class: `${drawerIsOpenClass} drawer-${this.position}`, tabindex: "0", role: "dialog", "aria-label": ariaLabel }, hAsync("div", { key: '483e792abee343f79a36594eb391203521dac055', class: "drawer-overlay", onClick: this.onClick, tabindex: "-1" }), hAsync("div", { key: 'b0692ac024a6f402915f482177b867f1d3fa5144', class: "drawer-dialog", style: { maxWidth: drawerWidthValue }, role: "document", tabindex: "0" }, hAsync("div", { key: '6afd92780745fe0f6817adb5fba8649a9de0cdd9', class: "drawer-content" }, hAsync("header", { key: '5248706c77aeaa4ce3332acfe7f3b605cbe7fd54', class: `drawer-header ${inverseHeaderClass} ${drawerDelimiterClass}` }, backIconElement, this.drawerTitle ? (hAsync("h2", { class: "drawer-title" }, this.drawerTitle)) : (hAsync("div", { class: "drawer-title" }, hAsync("slot", { name: "title" }))), closeIconElement), hAsync("div", { key: '42ade4a899a1f381af1463ac5217c245de22c241', class: `drawer-body ${removePaddingClass}` }, hAsync("slot", { key: 'adb1a893b61941e6488ba3bc233540ca18d90252' })), hAsync("footer", { key: '7fb54e5564e98777a3fbf3474d323f7fe1eb0e07', class: `drawer-footer ${removePaddingClass}`, style: { display: hasFooterContent ? 'block' : 'none' } }, hAsync("slot", { key: '37f2d0ec86cccc74795bc9a8fb509c5ded347f92', name: "footer" }))))));
|
|
11485
13118
|
}
|
|
11486
13119
|
get el() { return getElement(this); }
|
|
11487
13120
|
static get watchers() { return {
|
|
@@ -11504,6 +13137,7 @@ class Drawer {
|
|
|
11504
13137
|
"ariaLabelBack": [1, "aria-label-back"],
|
|
11505
13138
|
"ariaLabelClose": [1, "aria-label-close"],
|
|
11506
13139
|
"hasCloseIcon": [4, "has-close-icon"],
|
|
13140
|
+
"focusTrap": [32],
|
|
11507
13141
|
"open": [64],
|
|
11508
13142
|
"close": [64],
|
|
11509
13143
|
"back": [64]
|
|
@@ -11542,7 +13176,7 @@ class Dropdown$1 {
|
|
|
11542
13176
|
const positionClass = this.position ? `position-${this.position}` : '';
|
|
11543
13177
|
const dropdownClass = this.position ? `dropdown-${this.position}` : '';
|
|
11544
13178
|
const directionClass = this.direction ? `direction-${this.direction}` : '';
|
|
11545
|
-
return (hAsync("details", { key: '
|
|
13179
|
+
return (hAsync("details", { key: '0b6d1adf874e559fb90a471aabda2c01090c48b9', class: "dropdown", open: this.isOpen }, hAsync("summary", { key: '83139e232e4c74c84831d20e5ed32cea245b8102', "aria-expanded": this.isOpen.toString(), tabindex: "0", role: "button", onClick: this.onClick, "tab-index": "0" }, hAsync("div", { key: 'd427dcd5a8c534a4fb1e3874cb2ac279d3b9a5f2', class: `d-flex ${positionClass}` }, hAsync("div", { key: 'b9bbebff325eb4c2ed9e088b7064ead91b2c55f8', class: `${isLightButtonDropDown} ${isMediumButtonDropDown}` }, hAsync("road-icon", { key: '72d9a1fd48cca91d8f16494d731898e3625e47e3', name: "navigation-more", class: "dropdown-button-icon", "aria-hidden": "true" })))), hAsync("div", { key: '2434438ec14e86f8fb78378b3eb88f0a39abb6f2', class: `dropdown-menu ${directionClass} ${dropdownClass}` }, hAsync("slot", { key: '1eb1bc0bdfdbaa13689e0552c8fa278381777863', name: "list" }))));
|
|
11546
13180
|
}
|
|
11547
13181
|
get el() { return getElement(this); }
|
|
11548
13182
|
static get style() { return RoadDropdownStyle0; }
|
|
@@ -11598,7 +13232,7 @@ class Dropdown {
|
|
|
11598
13232
|
this.isOpen = false;
|
|
11599
13233
|
}
|
|
11600
13234
|
render() {
|
|
11601
|
-
return (hAsync("details", { key: '
|
|
13235
|
+
return (hAsync("details", { key: 'b87c57717a2b24c36a021566c0caf902be2dc730', class: "dropdown", open: this.isOpen }, hAsync("summary", { key: '5b8a7a636d992b9f7cf087de5792f77570b031a7', "aria-expanded": `${this.isOpen}`, tabindex: "0", role: "button", onClick: this.onClick }, hAsync("div", { key: '8fa86bcbcb09361bbddbdaf02e239c1a6ee439b2', class: `d-flex` }, hAsync("div", { key: '8f72235d6d44e20671022d84718aecf76cb0f2a2' }, hAsync("road-avatar", { key: '5a3075b025e47fd0c5e092863fae3a111ca5b737' }, hAsync("slot", { key: 'e736fe17013d86ca78a4bca99af10e6a595c151c', name: "avatar" }))))), hAsync("div", { key: 'c12f79bff86f7674764ff9f498394a172044997a', class: `dropdown-menu` }, hAsync("div", { key: '9ea9939892d5b0b21a45d99120981887ee7816ed', class: "profil-item" }, hAsync("road-avatar", { key: '3c24e96cf92bc6979c0d5212cb58285b35598de9', size: "sm" }, hAsync("slot", { key: 'c8ce0ac4929af5c830628c477cec9dbfc584fd7e', name: "avatarItem" })), hAsync("div", { key: '981466eec9a42648620fa4d77d0294bdde264316', class: "profil-item-info" }, hAsync("span", { key: 'aca08ad4ffb9439e649a5f83d3b34a4813465372', class: "profil-item-info-name" }, hAsync("slot", { key: 'c7fa79f90c906e705cb89b1b1eea664f7852aa60', name: "name" })), hAsync("road-label", { key: '77410fe9d9f4af29ecc59f787840a39490ebbf26' }, hAsync("slot", { key: '5055c32f3bfefc68084e42417ab54959e2d1fae7', name: "email" })))), hAsync("slot", { key: '656ad0ffc1bb8ebb1725ddf823ffc29384448a0a', name: "list" }))));
|
|
11602
13236
|
}
|
|
11603
13237
|
get el() { return getElement(this); }
|
|
11604
13238
|
static get style() { return RoadProfilDropdownStyle0; }
|
|
@@ -11662,7 +13296,7 @@ class Duration {
|
|
|
11662
13296
|
this.isOpen = false;
|
|
11663
13297
|
}
|
|
11664
13298
|
render() {
|
|
11665
|
-
return (hAsync("road-drawer", { key: '
|
|
13299
|
+
return (hAsync("road-drawer", { key: '2485f665f08be8b983893075cb687c0db04c8add', "is-open": this.isOpen, position: "bottom", "drawer-title": this.header }, hAsync("road-grid", { key: 'a3cfb812b1127a32eb31e1344944a8d52dd59f70' }, hAsync("road-row", { key: '1742b311e96f8140ffbe88f45a4f42ede7940cc9', class: "duration-values" }, Array(Math.floor((this.max - this.min) / this.step) + 1).fill(this.min).map(((item, index) => (item + index * this.step))).map(item => hAsync("road-col", { class: "col-3 col-md-2" }, hAsync("road-card", { button: true, value: item }, hAsync("road-label", null, Math.floor(item / 60).toLocaleString("en-GB", { minimumIntegerDigits: 2, useGrouping: false }), ":", (item % 60).toLocaleString("en-GB", { minimumIntegerDigits: 2, useGrouping: false })))))))));
|
|
11666
13300
|
}
|
|
11667
13301
|
get el() { return getElement(this); }
|
|
11668
13302
|
static get style() { return RoadDurationStyle0; }
|
|
@@ -11708,7 +13342,7 @@ class Flap {
|
|
|
11708
13342
|
}
|
|
11709
13343
|
render() {
|
|
11710
13344
|
const colorClass = this.filled ? `flap-${this.color}-filled` : `flap-${this.color}`;
|
|
11711
|
-
return (hAsync(Host, { key: '
|
|
13345
|
+
return (hAsync(Host, { key: 'acecc88123e94f737aef8b2d1026e8a9ce196a7d', class: `${colorClass} flap-${this.size}` }, hAsync("slot", { key: '6ce8eccf19a94ca9e7c8b75f9da8b7a8df00376b' })));
|
|
11712
13346
|
}
|
|
11713
13347
|
static get style() { return RoadFlapStyle0; }
|
|
11714
13348
|
static get cmpMeta() { return {
|
|
@@ -11754,7 +13388,7 @@ class GlobalNavigation {
|
|
|
11754
13388
|
this.selectedTabChanged();
|
|
11755
13389
|
}
|
|
11756
13390
|
render() {
|
|
11757
|
-
return (hAsync(Host, { key: '
|
|
13391
|
+
return (hAsync(Host, { key: 'bae96f32bd732721cbf401db21708a3bb601016b', role: "application" }, hAsync("slot", { key: '65e4a67511fd702e3daaa1ba206fbb8ff67df6da' })));
|
|
11758
13392
|
}
|
|
11759
13393
|
static get watchers() { return {
|
|
11760
13394
|
"selectedTab": ["selectedTabChanged"]
|
|
@@ -11902,7 +13536,7 @@ class GlobalNavigationV2 {
|
|
|
11902
13536
|
this.selectedTabChanged();
|
|
11903
13537
|
}
|
|
11904
13538
|
render() {
|
|
11905
|
-
return (hAsync(Host, { key: '
|
|
13539
|
+
return (hAsync(Host, { key: '1a523fcd448db62eb7a676184a22c7ae96e2d39e', role: "application" }, hAsync("slot", { key: '7c46cc17b02a4425161d99b54ef1bca9711f179a' })));
|
|
11906
13540
|
}
|
|
11907
13541
|
get host() { return getElement(this); }
|
|
11908
13542
|
static get watchers() { return {
|
|
@@ -11932,7 +13566,7 @@ class Grid {
|
|
|
11932
13566
|
registerInstance(this, hostRef);
|
|
11933
13567
|
}
|
|
11934
13568
|
render() {
|
|
11935
|
-
return (hAsync("slot", { key: '
|
|
13569
|
+
return (hAsync("slot", { key: '8f4662a444e12323e10cda6ecc7a2fe9b2199ff3' }));
|
|
11936
13570
|
}
|
|
11937
13571
|
static get style() { return RoadGridStyle0; }
|
|
11938
13572
|
static get cmpMeta() { return {
|
|
@@ -12035,7 +13669,7 @@ class Icon {
|
|
|
12035
13669
|
const rotateClass = this.rotate ? `icon-rotate-${this.rotate}` : '';
|
|
12036
13670
|
// Ajouter une classe "default" si aucune des valeurs n'est définie
|
|
12037
13671
|
const classes = [colorClass, sizeClass, rotateClass].filter(Boolean).join(' ');
|
|
12038
|
-
return (hAsync(Host, { key: '
|
|
13672
|
+
return (hAsync(Host, { key: '1da1702db901bcfb80638d9ae30a8c5cc4a2ac26', class: classes, "aria-hidden": "true" }, this.svgContent !== ''
|
|
12039
13673
|
? hAsync("div", { class: "icon-inner", innerHTML: this.svgContent })
|
|
12040
13674
|
: hAsync("div", { class: "icon-inner" })));
|
|
12041
13675
|
}
|
|
@@ -12157,7 +13791,7 @@ class Illustration {
|
|
|
12157
13791
|
render() {
|
|
12158
13792
|
const sizeClass = this.size !== undefined ? `illustration-${this.size}` : '';
|
|
12159
13793
|
const rotateClass = this.rotate !== undefined ? `illustration-rotate-${this.rotate}` : '';
|
|
12160
|
-
return (hAsync(Host, { key: '
|
|
13794
|
+
return (hAsync(Host, { key: '0c1d3f02b235f7f69dbdca9969fd3a637929e0bd', class: `${sizeClass} ${rotateClass}`, "aria-hidden": "true", role: "img" }, ((this.illustrationSvgContent !== '')
|
|
12161
13795
|
? hAsync("div", { class: "icon-inner", innerHTML: this.illustrationSvgContent })
|
|
12162
13796
|
: hAsync("div", { class: "icon-inner" }))));
|
|
12163
13797
|
}
|
|
@@ -12260,7 +13894,7 @@ class Img {
|
|
|
12260
13894
|
}
|
|
12261
13895
|
render() {
|
|
12262
13896
|
const placeholder = this.loadSrc !== undefined ? '' : 'placeholder';
|
|
12263
|
-
return (hAsync(Host, { key: '
|
|
13897
|
+
return (hAsync(Host, { key: '6fd414b74c5d8cfef4b87847bef754c117a41803', class: placeholder }, hAsync("img", { key: '5f3bcae6d677124b042535c8a52d2870262db16c', class: "native-img", decoding: "async", src: this.loadSrc, alt: this.alt, onLoad: this.onLoad, onError: this.loadError, part: "image" })));
|
|
12264
13898
|
}
|
|
12265
13899
|
get el() { return getElement(this); }
|
|
12266
13900
|
static get watchers() { return {
|
|
@@ -29710,11 +31344,11 @@ class Input {
|
|
|
29710
31344
|
const lessLabelClass = this.label !== '' ? '' : 'less-label';
|
|
29711
31345
|
const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
|
|
29712
31346
|
const isValidClass = this.success == true ? 'is-valid' : '';
|
|
29713
|
-
return (hAsync(Host, { key: '
|
|
31347
|
+
return (hAsync(Host, { key: 'e1c39fcb1d557fa2317201767d3d8ab78f9d3a49', "aria-disabled": this.disabled ? 'true' : null, class: this.sizes && `input-${this.sizes}`, value: value, blockdecimal: this.blockdecimal }, hAsync("input", { key: '5ae23298f7781fa0480e1d34d50add334f1ab10f', class: `form-control ${hasValueClass} ${isInvalidClass} ${isValidClass} ${lessLabelClass}`, id: this.inputId, "aria-disabled": this.disabled ? 'true' : null, "aria-labelledby": labelId, disabled: this.disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, enterKeyHint: this.enterkeyhint, autoFocus: this.autofocus, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, size: this.size, type: this.type, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.type === 'number' ? (event) => this.handleKeyDown(event) : undefined, "data-cy": 'road-input', ref: el => (this.inputEl = el) }), hAsync("label", { key: 'd6f5b0aa7e14eb4c06fb3af037f9bda656a98282', class: "form-label", id: labelId, htmlFor: this.inputId }, this.label), this.error && this.error !== '' && (Array.isArray(this.error)
|
|
29714
31348
|
? // Si error est un tableau, on itère et génère un <p> pour chaque élément
|
|
29715
31349
|
this.error.map((err, index) => (hAsync("p", { key: index, class: "invalid-feedback" }, hAsync("road-icon", { slot: "start", name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), err.trim(), " ")))
|
|
29716
31350
|
: // Si error est une chaîne, on la divise avec split et génère un <p> pour chaque élément
|
|
29717
|
-
this.error.split(',').map((err, index) => (hAsync("p", { key: index, class: "invalid-feedback" }, hAsync("road-icon", { slot: "start", name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), err.trim(), " ")))), this.helper && this.helper !== '' && hAsync("p", { key: '
|
|
31351
|
+
this.error.split(',').map((err, index) => (hAsync("p", { key: index, class: "invalid-feedback" }, hAsync("road-icon", { slot: "start", name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), err.trim(), " ")))), this.helper && this.helper !== '' && hAsync("p", { key: '049438b598d8a81b1d8bdadfbd615f66914db3e1', class: "helper" }, this.helper), this.type && this.type == 'password' && hAsync("slot", { key: 'f804b3b5727fa91623defc4f5209d865bc461f21', name: "checklistPassword" })));
|
|
29718
31352
|
}
|
|
29719
31353
|
static get watchers() { return {
|
|
29720
31354
|
"debounce": ["debounceChanged"],
|
|
@@ -29827,7 +31461,7 @@ class InputGroup {
|
|
|
29827
31461
|
? `size-${this.el.querySelector('road-input').sizes}`
|
|
29828
31462
|
: '';
|
|
29829
31463
|
const disabledClass = this.disabled ? 'is-disabled' : '';
|
|
29830
|
-
return (hAsync("div", { key: '
|
|
31464
|
+
return (hAsync("div", { key: 'c789f52752140cc0f396a8e2e2fcf9725ca974d2', class: `input-group ${errorClass} ${disabledClass} ${sizeClass}` }, hAsync("div", { key: '41870e22ddc72cd42c6b737962c11e075af78f91', class: "input-group-prepend" }, hAsync("slot", { key: '80322c2acb0bfe220cef11df0a7fd03aad98186a', name: "prepend" })), hAsync("slot", { key: '3b3c02a69bba482658a95f26fa46cb365ab373a5' }), hAsync("div", { key: '2551b5848533d7564872892e04380a68216a4979', class: "input-group-append" }, hAsync("slot", { key: 'c030afa5616bf26d7bcf99f09adc644fc2eeb2ca', name: "append" }))));
|
|
29831
31465
|
}
|
|
29832
31466
|
get el() { return getElement(this); }
|
|
29833
31467
|
static get watchers() { return {
|
|
@@ -29907,13 +31541,13 @@ class Item {
|
|
|
29907
31541
|
target,
|
|
29908
31542
|
};
|
|
29909
31543
|
const showDetail = detail !== undefined && detail;
|
|
29910
|
-
return (hAsync(Host, { key: '
|
|
31544
|
+
return (hAsync(Host, { key: '0aea3486ca34a04bfa7e0690181466e0f563ecdd', "aria-disabled": disabled ? 'true' : null, class: {
|
|
29911
31545
|
[`item-lines-${lines}`]: lines !== undefined,
|
|
29912
|
-
} }, hAsync(TagType, Object.assign({ key: '
|
|
31546
|
+
} }, hAsync(TagType, Object.assign({ key: 'a2b491a400eb88b4af1ac7a26a5a00e32fde08cb' }, attrs, { class: {
|
|
29913
31547
|
'item-native': true,
|
|
29914
31548
|
'item-active': this.active,
|
|
29915
31549
|
[`layout-${layout}`]: layout !== undefined,
|
|
29916
|
-
}, part: "native", disabled: disabled }), hAsync("slot", { key: '
|
|
31550
|
+
}, part: "native", disabled: disabled }), hAsync("slot", { key: 'b78e532a469747c50da1368932d4f582eb87f28b', name: "start" }), hAsync("div", { key: 'de095dfd6b972de3daebc9217842f3b5b2f593c8', class: "item-inner" }, hAsync("div", { key: '9f43e5afd0c887e8f5df8fee8b6a4e95b205fbd0', class: "input-wrapper" }, hAsync("slot", { key: '29497de23731ee53ee5e7665a03959e7fdc5df9b' }), hAsync("div", { key: '16a247a409fa1803a0026c6923fc2b99b64b351b', class: "input-wrapper-info" }, hAsync("road-label", { key: 'aefe0b6c06109bd0c17d405968344c24549332e7', class: "input-wrapper-info-title" }, this.titleItem), hAsync("p", { key: '9296d6542fee43a933193b284bc7cc8a1e1c5048', class: "input-wrapper-info-text" }, this.text))), hAsync("slot", { key: 'f66a05fb104f8ddf9553a99e8a75a59b0f24d9d7', name: "end" }), showDetail && hAsync("road-icon", { key: '5eab0e8ca80203ec5d276a8403aba93746953b7e', icon: detailIcon, lazy: false, class: "item-detail-icon" })))));
|
|
29917
31551
|
}
|
|
29918
31552
|
get el() { return getElement(this); }
|
|
29919
31553
|
static get style() { return RoadItemStyle0; }
|
|
@@ -29954,7 +31588,7 @@ class Label {
|
|
|
29954
31588
|
registerInstance(this, hostRef);
|
|
29955
31589
|
}
|
|
29956
31590
|
render() {
|
|
29957
|
-
return (hAsync("slot", { key: '
|
|
31591
|
+
return (hAsync("slot", { key: 'f59ac081c472add0201c72c48c5146a231bf05fd' }));
|
|
29958
31592
|
}
|
|
29959
31593
|
static get style() { return RoadLabelStyle0; }
|
|
29960
31594
|
static get cmpMeta() { return {
|
|
@@ -29979,9 +31613,9 @@ class List {
|
|
|
29979
31613
|
}
|
|
29980
31614
|
render() {
|
|
29981
31615
|
const { lines } = this;
|
|
29982
|
-
return (hAsync(Host, { key: '
|
|
31616
|
+
return (hAsync(Host, { key: '2c2537547489eb97f46ccb6306d3d697773ab719', class: {
|
|
29983
31617
|
[`list-lines-${lines}`]: lines !== undefined,
|
|
29984
|
-
} }, hAsync("slot", { key: '
|
|
31618
|
+
} }, hAsync("slot", { key: 'f4449d3df668e2d77f83103bb2e87915ef101efc' })));
|
|
29985
31619
|
}
|
|
29986
31620
|
static get style() { return RoadListStyle0; }
|
|
29987
31621
|
static get cmpMeta() { return {
|
|
@@ -30066,7 +31700,7 @@ class Modal {
|
|
|
30066
31700
|
const modalIsOpenClass = this.isOpen ? 'modal-open' : '';
|
|
30067
31701
|
const inverseHeaderClass = this.hasInverseHeader ? 'modal-header-inverse' : '';
|
|
30068
31702
|
const closeIconElement = this.hasCloseIcon ? hAsync("button", { type: "button", class: "modal-close", onClick: this.onClick, "aria-label": "Close" }, hAsync("road-icon", { icon: navigationClose, "aria-hidden": "true" })) : '';
|
|
30069
|
-
return (hAsync(Host, { key: '
|
|
31703
|
+
return (hAsync(Host, { key: 'fadc5b7f130b78ce930508f169a77c36c592a8b7', class: `modal ${modalIsOpenClass}`, tabindex: "-1", role: "dialog", "aria-label": "modal" }, hAsync("div", { key: 'b06a7795a91860febafb941215dfffd796fda4c8', class: "modal-overlay", onClick: this.onClick, tabindex: "-1" }), hAsync("div", { key: 'ddd6999c2e6069518d634b60502eb9cc0b311aba', class: "modal-dialog", style: { maxWidth: `${this.maxWidth}px` }, role: "document", tabindex: "0" }, hAsync("div", { key: '17bb4a3d1281d71b0b4d3f3e1765491f768aa460', class: "modal-content" }, hAsync("header", { key: '5d1cb9be50df022c0e0ce59e82f3df6f2ec45369', class: `modal-header ${inverseHeaderClass}` }, hAsync("h2", { key: '51fd0108264ba6a54c93047dbccf9e69ae7b3032', class: "modal-title" }, this.modalTitle), closeIconElement), hAsync("div", { key: 'f966e33d28c4e59dee755dc4ac2c225c778cf782', class: "modal-body" }, hAsync("slot", { key: '50b4fe9fb58ee3eace39f5ce8f07a83fb05df81b' }))))));
|
|
30070
31704
|
}
|
|
30071
31705
|
get el() { return getElement(this); }
|
|
30072
31706
|
static get style() { return RoadModalStyle0; }
|
|
@@ -30117,7 +31751,7 @@ class Navbar {
|
|
|
30117
31751
|
this.selectedTabChanged();
|
|
30118
31752
|
}
|
|
30119
31753
|
render() {
|
|
30120
|
-
return (hAsync(Host, { key: '
|
|
31754
|
+
return (hAsync(Host, { key: '61786009c0bb1357257674a72b0f3dbf3f5c38a8', role: "menubar" }, hAsync("slot", { key: '2f3cdbc13d1bf0d3535035bd2098ed20d048dee0' })));
|
|
30121
31755
|
}
|
|
30122
31756
|
static get watchers() { return {
|
|
30123
31757
|
"selectedTab": ["selectedTabChanged"]
|
|
@@ -30203,11 +31837,11 @@ class NavbarItem$1 {
|
|
|
30203
31837
|
rel,
|
|
30204
31838
|
target,
|
|
30205
31839
|
};
|
|
30206
|
-
return (hAsync(Host, { key: '
|
|
31840
|
+
return (hAsync(Host, { key: 'c392c7788ef068bff267fbc3508d3a9b9fe753d0', onClick: this.onClick, onKeyup: this.onKeyUp, role: "menuitem", tabindex: "0", "aria-selected": selected ? 'true' : null, id: tab !== undefined ? `navbar-item-${tab}` : null, disabled: disabled, class: {
|
|
30207
31841
|
'navbar-item': true,
|
|
30208
31842
|
'tab-selected': selected,
|
|
30209
31843
|
'tab-disabled': disabled,
|
|
30210
|
-
} }, hAsync("a", Object.assign({ key: '
|
|
31844
|
+
} }, hAsync("a", Object.assign({ key: '96d3d1d8ce173906c6427a4b53dff251f2ad2d28' }, attrs, { tabIndex: -1, class: "button-native", part: "native" }), hAsync("span", { key: '2a9dd73feff76d436c37f27fc1b9a1c2678c2b6e', class: "button-inner" }, hAsync("slot", { key: '603703ddc7865278113ec4d953ab1fc71bbc08d7' })))));
|
|
30211
31845
|
}
|
|
30212
31846
|
get el() { return getElement(this); }
|
|
30213
31847
|
static get watchers() { return {
|
|
@@ -30300,11 +31934,11 @@ class NavbarItem {
|
|
|
30300
31934
|
rel,
|
|
30301
31935
|
target,
|
|
30302
31936
|
};
|
|
30303
|
-
return (hAsync(Host, { key: '
|
|
31937
|
+
return (hAsync(Host, { key: '50cadf50d920c724b646d0ef5dfb1bf994b42891', onClick: this.onClick, onKeyup: this.onKeyUp, role: "menuitem", tabindex: "0", "aria-selected": selected ? 'true' : null, id: tab !== undefined ? `navbar-item-${tab}` : null, disabled: disabled, class: {
|
|
30304
31938
|
'navbar-item': true,
|
|
30305
31939
|
'tab-selected': selected,
|
|
30306
31940
|
'tab-disabled': disabled,
|
|
30307
|
-
} }, hAsync("a", Object.assign({ key: '
|
|
31941
|
+
} }, hAsync("a", Object.assign({ key: 'b8915357668428324fddc6dc6cf038dc8f55cfeb' }, attrs, { tabIndex: -1, class: "button-native", part: "native" }), hAsync("span", { key: '103bfedba55dab13e169d5806fa5ae3873ed860b', class: "button-inner" }, hAsync("slot", { key: 'd1e8a5fd74c0b42550b050e4212a99e5df04902b' })))));
|
|
30308
31942
|
}
|
|
30309
31943
|
get el() { return getElement(this); }
|
|
30310
31944
|
static get watchers() { return {
|
|
@@ -30363,7 +31997,7 @@ class NavbarV2 {
|
|
|
30363
31997
|
}
|
|
30364
31998
|
render() {
|
|
30365
31999
|
const compactClass = this.compact ? 'compact' : '';
|
|
30366
|
-
return (hAsync(Host, { key: '
|
|
32000
|
+
return (hAsync(Host, { key: '43aff9eafd66ec2fb7c45a4707c758b3b182f64b', role: "menubar", class: `${compactClass}` }, hAsync("slot", { key: '66b8748a5d4395bd03edff1b9490bdc0fe63f01a' })));
|
|
30367
32001
|
}
|
|
30368
32002
|
static get watchers() { return {
|
|
30369
32003
|
"selectedTab": ["selectedTabChanged"]
|
|
@@ -30486,10 +32120,10 @@ class PlateNumber {
|
|
|
30486
32120
|
render() {
|
|
30487
32121
|
const value = this.getValue();
|
|
30488
32122
|
const motorbikeClass = this.motorbike ? 'motorbike-plate' : '';
|
|
30489
|
-
return (hAsync("road-input-group", { key: '
|
|
32123
|
+
return (hAsync("road-input-group", { key: 'ff8a8904113c2ba38d351de6d7e8a5ca6552344e', class: `plate-number plate-number-${this.country.toLowerCase()} ${motorbikeClass}` }, hAsync("label", { key: '00a82c0c874d044dffae46bcd3c125cabf93871e', slot: "prepend", class: "input-group-prepend" }, hAsync("div", { key: 'f19852dda75eead5634c48bdd95db8e69b3fcf2d', class: "plate-number-start" }, hAsync("road-icon", { key: '9e8ec737ee80c35402b26ac104a31f9df199fe86', class: "plate-number-icon", icon: licensePlateStarEu }), hAsync("div", { key: '2f3483237c65a1cb542ebd3abd7caa43c8d0fb60', class: "plate-number-location", "aria-label": this.country, role: "img" }, this.countries
|
|
30490
32124
|
.filter(item => item.country === this.country)[0].letter))), this.motorbike
|
|
30491
32125
|
? (hAsync("textarea", { class: "form-control plate-number-input mb-0", disabled: this.disabled, placeholder: this.placeholder != null ? this.placeholder : this.countries.filter(item => item.country === this.country)[0].placeholder, readOnly: this.readonly, maxlength: "9", rows: 2, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus }))
|
|
30492
|
-
: (hAsync("input", { class: "plate-number-input mb-0", disabled: this.disabled, placeholder: this.placeholder != null ? this.placeholder : this.countries.filter(item => item.country === this.country)[0].placeholder, readOnly: this.readonly, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus })), hAsync("label", { key: '
|
|
32126
|
+
: (hAsync("input", { class: "plate-number-input mb-0", disabled: this.disabled, placeholder: this.placeholder != null ? this.placeholder : this.countries.filter(item => item.country === this.country)[0].placeholder, readOnly: this.readonly, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus })), hAsync("label", { key: '0378a2bbcaa0fd90f7a3f195f1a4e31806e2ff13', slot: "append", class: "input-group-append" }, hAsync("div", { key: 'fddb65007529730731c4410cf407bdcbcfcbbf93', class: "plate-number-end" }))));
|
|
30493
32127
|
}
|
|
30494
32128
|
static get watchers() { return {
|
|
30495
32129
|
"value": ["valueChanged"]
|
|
@@ -30557,7 +32191,7 @@ class ProgressBar {
|
|
|
30557
32191
|
const fullwidth = this.fullwidth ? 'progress-element-info-full-width' : 'progress-element-info';
|
|
30558
32192
|
const light = this.light ? 'progress progress-light' : 'progress';
|
|
30559
32193
|
const animation = this.animation ? 'animation' : '';
|
|
30560
|
-
return (hAsync(Host, { key: '
|
|
32194
|
+
return (hAsync(Host, { key: '61241f17f6940f6952d6167024a884a1c568384b', class: "progress-element" }, hAsync("div", { key: '97d64b38a2f46e9805bb76fa73d67fcd28a54dba', class: `${light} progress-${this.color} ${animation}` }, hAsync("div", { key: '275c170d8a016e4db0a840e65aa42bfca9f75f45', class: "progress-bar", role: "progressbar", style: { width: `${this.value}%` }, "aria-valuenow": this.value, "aria-valuemin": "0", "aria-valuemax": "100", "aria-label": "progress bar" })), hAsync("div", { key: '50d933874085cb3831ae6950fc1377ecece5724f', class: `${fullwidth}` }, hAsync("span", { key: '166a60c0f771060852783af7f932892bdb16c0b7', class: "progress-element-label" }, this.label), this.showstep && hAsync("span", { key: 'e7ba9b328ddff0d722e0ee5e22aef7746f0e085a', class: "progress-element-step" }, valueRound, "/", this.numbersteps))));
|
|
30561
32195
|
}
|
|
30562
32196
|
static get style() { return RoadProgressStyle0; }
|
|
30563
32197
|
static get cmpMeta() { return {
|
|
@@ -30598,7 +32232,7 @@ class ProgressIndicatorVertical {
|
|
|
30598
32232
|
registerInstance(this, hostRef);
|
|
30599
32233
|
}
|
|
30600
32234
|
render() {
|
|
30601
|
-
return (hAsync(Host, { key: '
|
|
32235
|
+
return (hAsync(Host, { key: '8df70b09eb63e027b39c4843ae497cef5e39c2ed' }, hAsync("nav", { key: '0d6025a44bd845363096fc6e002a334263dac3c9' }, hAsync("ul", { key: '4d81713de26f798637118ee3af681eb6f668513f' }, hAsync("li", { key: 'bb4bf5dd01f940e3811ab5adf4a90d05ef4fab8c' }, hAsync("slot", { key: '18e8f5f3cddb2a2c6816127596d469a93ca2430c' }))))));
|
|
30602
32236
|
}
|
|
30603
32237
|
static get style() { return RoadProgressIndicatorVerticalStyle0; }
|
|
30604
32238
|
static get cmpMeta() { return {
|
|
@@ -30622,7 +32256,7 @@ class ProgressIndicatorVerticalItem {
|
|
|
30622
32256
|
registerInstance(this, hostRef);
|
|
30623
32257
|
}
|
|
30624
32258
|
render() {
|
|
30625
|
-
return (hAsync(Host, { key: '
|
|
32259
|
+
return (hAsync(Host, { key: '17ae276834ff832dcf77111aeeda48b8ca9dc72e' }, hAsync("slot", { key: '624e68ac134752cb835e1cfdba7aa1db8d1f5152' })));
|
|
30626
32260
|
}
|
|
30627
32261
|
static get style() { return RoadProgressIndicatorVerticalItemStyle0; }
|
|
30628
32262
|
static get cmpMeta() { return {
|
|
@@ -30651,7 +32285,7 @@ class ProgressTracker {
|
|
|
30651
32285
|
registerInstance(this, hostRef);
|
|
30652
32286
|
}
|
|
30653
32287
|
render() {
|
|
30654
|
-
return (hAsync(Host, { key: '
|
|
32288
|
+
return (hAsync(Host, { key: '558bbc6dc32d8f5e29cd9dd0e33ff210bc8e231f' }, hAsync("nav", { key: '386429b7b2670bd9e1cfde6eb895fcdb9fc26a66' }, hAsync("ul", { key: '67357a2d0f7777b39b390a6fc1f2609f7e504f0d' }, hAsync("li", { key: '6bd942a3d6c358f1988b58b16c65bc1f635c690f' }, hAsync("slot", { key: '47ab21f544caa20f3623d7a6b299a84cb17b2927' }))))));
|
|
30655
32289
|
}
|
|
30656
32290
|
static get style() { return RoadProgressTrackerStyle0; }
|
|
30657
32291
|
static get cmpMeta() { return {
|
|
@@ -30683,7 +32317,7 @@ class ProgressTrackerItem {
|
|
|
30683
32317
|
registerInstance(this, hostRef);
|
|
30684
32318
|
}
|
|
30685
32319
|
render() {
|
|
30686
|
-
return (hAsync(Host, { key: '
|
|
32320
|
+
return (hAsync(Host, { key: 'f0323f8e11d15162868f6679d958a7eb3c732c94' }, hAsync("slot", { key: 'f723c3ff78b34c68bbe3f675d93ff61a6eb24a27' })));
|
|
30687
32321
|
}
|
|
30688
32322
|
static get style() { return RoadProgressTrackerItemStyle0; }
|
|
30689
32323
|
static get cmpMeta() { return {
|
|
@@ -30776,7 +32410,7 @@ class Radio {
|
|
|
30776
32410
|
const inverseClass = this.inverse && 'form-radio-inverse';
|
|
30777
32411
|
const isInvalidClass = this.error ? 'is-invalid' : '';
|
|
30778
32412
|
const inlineClass = this.inline ? 'form-radio-inline' : '';
|
|
30779
|
-
return (hAsync(Host, { key: '
|
|
32413
|
+
return (hAsync(Host, { key: '586f04a19cf450f18483a2b9efa5b28d44e1677c', class: `form-radio ${inlineClass}` }, hAsync("input", { key: 'd66ab388470a1c6e2f4ae3ceb5ae8aa8c85eecf5', class: `form-radio-input ${isInvalidClass}`, type: "radio", id: this.radioId, name: this.name, required: this.required, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null, checked: this.checked, "aria-checked": `${this.checked}`, "aria-labelledby": labelId, value: this.value, onFocus: this.onFocus, onBlur: this.onBlur }), hAsync("label", { key: '709969471cc1db265d7eb44e608ed0ef496cc72d', class: `form-radio-label ${inverseClass}`, id: labelId, htmlFor: this.radioId }, this.label, " ", hAsync("span", { key: 'd551c29f4895ca78cb7bb331861d783281416749', class: "form-radio-label-span" }, this.secondaryLabel))));
|
|
30780
32414
|
}
|
|
30781
32415
|
get el() { return getElement(this); }
|
|
30782
32416
|
static get style() { return RoadRadioStyle0; }
|
|
@@ -30860,7 +32494,7 @@ class RadioCard {
|
|
|
30860
32494
|
const inlineClass = this.inline ? 'form-radio-inline' : '';
|
|
30861
32495
|
const selectedClass = this.isSelected || this.selected ? 'radio-card-selected' : '';
|
|
30862
32496
|
const disabledClass = this.disabled ? 'radio-card-disabled' : '';
|
|
30863
|
-
return (hAsync(Host, { key: '
|
|
32497
|
+
return (hAsync(Host, { key: 'c0910c6654a5a43b06b48b784177d52fcad7d0e9', class: `form-radio ${inlineClass}` }, hAsync("div", { key: '52b04eb5baf4321d07da8dc13cb213491c7f8376', class: `radio-card ${selectedClass} ${disabledClass}`, onClick: this.onClick }, hAsync("input", { key: 'e196a6962b45f72b80f3f5837e168fb3a29618f0', ref: el => this.inputEl = el, class: "form-radio-input", type: "radio", id: this.radioId, name: this.name, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : undefined, checked: this.isSelected || this.selected, "aria-labelledby": labelId, value: this.value, onFocus: this.onFocus, onBlur: this.onBlur, onChange: () => { } }), hAsync("label", { key: '2bfe44595464f2977c3ce6603a1e6b74e5b36a25', class: "form-radio-label", htmlFor: this.radioId, id: labelId }, hAsync("div", { key: 'b7e50b7fc4ace0011ba413bffa7d99d048083710', class: "slot-wrapper" }, hAsync("slot", { key: '2026d471ed70c8bd6a773ec108583eeb2d721b93' }))))));
|
|
30864
32498
|
}
|
|
30865
32499
|
get el() { return getElement(this); }
|
|
30866
32500
|
static get style() { return RoadRadioCardStyle0; }
|
|
@@ -30957,7 +32591,7 @@ class RadioGroup {
|
|
|
30957
32591
|
render() {
|
|
30958
32592
|
const labelId = `${this.radioGroupId}-label`;
|
|
30959
32593
|
const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
|
|
30960
|
-
return (hAsync(Host, { key: '
|
|
32594
|
+
return (hAsync(Host, { key: '92a0a50c9deb1ec6e7e14a18c953019deac3aa5a', role: "radiogroup", class: `form-group ${isInvalidClass}`, "aria-label": this.ariaLabel, onClick: this.onClick }, this.label && hAsync("p", { key: '5b6cc3d7aed55eb469fc0abf5b85c93402df832f', class: "text-content", id: labelId }, this.label, " ", this.asterisk && hAsync("span", { key: '8d38bdc1820b184757bed13a389cd81179a4eab6', class: "asterisk" }, "*")), hAsync("slot", { key: '6e45e1330d3f2a078ec3e3e6562a14025d377f6b' }), this.error && this.error !== '' && hAsync("p", { key: '8271bf6be84430530d6f13ff30b4589ea018a322', class: "invalid-feedback" }, this.error), this.helper && this.helper !== '' && hAsync("p", { key: 'ffe6ae4713d74c66f995f0b6ed7e459a5096d5f1', class: "helper" }, this.helper)));
|
|
30961
32595
|
}
|
|
30962
32596
|
get el() { return getElement(this); }
|
|
30963
32597
|
static get watchers() { return {
|
|
@@ -31087,14 +32721,14 @@ class Range {
|
|
|
31087
32721
|
render() {
|
|
31088
32722
|
const value = this.getValue();
|
|
31089
32723
|
const datalist = this.showLabels !== undefined ? `tickmarks` : "";
|
|
31090
|
-
return (hAsync(Host, { key: '
|
|
32724
|
+
return (hAsync(Host, { key: '70682c392f1e20883fb831efc8de0f9a067b3009', tabindex: "0", class: { disabled: this.disabled } }, hAsync("div", { key: '981f26d40294cd905075d0745e4728543bdc618e', class: "form-group d-flex align-items-end" }, this.showTick && (hAsync("road-icon", { key: '43f2969c43d2573de4db51261263ff22d834cc89', icon: navigationAddLessSolid, class: "mr-8", size: "sm" })), hAsync("div", { key: '2009bfe7013711fcac093f8c67f54daf8f293d05', class: "form-range", style: {
|
|
31091
32725
|
"--min": this.min,
|
|
31092
32726
|
"--max": this.max,
|
|
31093
32727
|
"--value": value,
|
|
31094
32728
|
"--background-color": this.disabled
|
|
31095
32729
|
? "var(--road-surface-disabled)"
|
|
31096
32730
|
: "initial",
|
|
31097
|
-
} }, this.showValue && hAsync("output", { key: '
|
|
32731
|
+
} }, this.showValue && hAsync("output", { key: 'b918d44808d44f446f88781b56a18da28768d184' }), this.showLabels && hAsync("slot", { key: '341f43e617bca8decaa791170065658cf5c57923', name: "datalist" }), hAsync("input", { key: '20d9d42bcfd89eb76a9459571cec4e790d8904f4', type: "range", class: "form-range-input", id: this.rangeId, min: this.min, max: this.max, value: value, onInput: this.onInput, list: datalist, "aria-label": "Valeur", tabindex: "0", disabled: this.disabled }), hAsync("label", { key: '6ff1fbdc6111509511a1e50e0e65f43ec692f74f', class: "form-range-label" }, "Valeur"), hAsync("div", { key: 'fadff2d5d9fda1b85290a4c39697968b13470412', class: "form-range-progress" })), this.showTick && (hAsync("road-icon", { key: '79f4b51b9e695692777ab37b36511dfc8209812c', icon: navigationAddMoreSolid, class: "ml-8", size: "sm" })))));
|
|
31098
32732
|
}
|
|
31099
32733
|
get el() { return getElement(this); }
|
|
31100
32734
|
static get watchers() { return {
|
|
@@ -31163,7 +32797,7 @@ class Rating {
|
|
|
31163
32797
|
const sizeRatingStarsClass = this.size !== undefined ? `rating-stars rating-stars--${this.size}` : 'rating-stars';
|
|
31164
32798
|
const sizeRatingNumberClass = this.size !== undefined ? `rating-number rating-number--${this.size}` : 'rating-number';
|
|
31165
32799
|
const readOnly = this.readonly == true ? `readonly` : '';
|
|
31166
|
-
return (hAsync(Host, { key: '
|
|
32800
|
+
return (hAsync(Host, { key: 'de9146b27a97204cf394332ed3cd39872b2021be' }, hAsync("div", { key: '10e5404e7b77281cbc6db3c7b5443158cff0d5d2', class: `${sizeRatingStarsClass}` }, [...Array(rate)].map(() => hAsync("road-icon", { icon: star, size: "sm", color: "warning" })), [...Array(rateDecimale)].map(() => hAsync("road-icon", { icon: starHalfColor, size: "sm", class: "rating-star" })), [...Array(5 - rate - rateDecimale)].map(() => hAsync("road-icon", { icon: star, size: "sm", class: "rating-star" }))), this.readonly == false && this.showreviews && hAsync("a", { key: 'ba4c82ef9eff58a95cb6049839c26c2a2e74dd2d', class: `${sizeRatingNumberClass}`, href: this.url }, "(", this.reviews, this.reviewsText && ` ${this.reviewsText}`, ")"), this.readonly == true && this.showreviews && hAsync("road-label", { key: 'd7066a54aecd03e699e63ef2c4546a350252712a', class: `${sizeRatingNumberClass} ${readOnly}` }, "(", this.reviews, this.reviewsText && ` ${this.reviewsText}`, ")")));
|
|
31167
32801
|
}
|
|
31168
32802
|
static get style() { return RoadRatingStyle0; }
|
|
31169
32803
|
static get cmpMeta() { return {
|
|
@@ -31282,7 +32916,7 @@ class RoadAreaCode {
|
|
|
31282
32916
|
const labelId = this.selectId + '-label';
|
|
31283
32917
|
const valueId = this.selectId + '-value';
|
|
31284
32918
|
const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
|
|
31285
|
-
return (hAsync(Host, { key: '
|
|
32919
|
+
return (hAsync(Host, { key: 'a9c180581aad52a237a69f0260225358bed4c7d9', class: this.sizes && `select-${this.sizes}` }, hAsync("select", { key: 'acf9b38d0a25646ea6f580d713ecadb12e0f3638', class: `form-select-area has-value ${isInvalidClass}`, id: this.selectId, "aria-disabled": this.disabled ? 'true' : null, autoFocus: this.autofocus, disabled: this.disabled, name: this.name, required: this.required, size: this.size, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur }, this.options && this.options.map(option => (hAsync("option", { value: option.value, selected: option.selected }, option.label)))), hAsync("label", { key: 'd0e9b3b99c5ee593e93866e8c97587459fd520cd', class: "form-select-area-label", id: labelId, htmlFor: this.selectId }, this.label), hAsync("label", { key: '363d2951d028db2c2a6efe1e09f8605a684e0fbc', class: "form-select-area-value", id: valueId, htmlFor: this.selectId }, "+", this.selectedValue), this.error && this.error !== '' && hAsync("p", { key: '160c054f3ac74eb46b625cba25676e430a45f52f', class: "invalid-feedback" }, this.error)));
|
|
31286
32920
|
}
|
|
31287
32921
|
static get watchers() { return {
|
|
31288
32922
|
"value": ["valueChanged"]
|
|
@@ -31329,7 +32963,7 @@ class RoadAspectRatio {
|
|
|
31329
32963
|
return `${w} / ${h}`;
|
|
31330
32964
|
}
|
|
31331
32965
|
render() {
|
|
31332
|
-
return (hAsync(Host, { key: '
|
|
32966
|
+
return (hAsync(Host, { key: '0b5d1fb507a3e9a3e7a122d55809ed24ea0a917d', style: { '--road-aspect-ratio': this.getCssRatio() } }, hAsync("div", { key: 'a012fb3c04da5357ea277074ce08a784400068f9', class: "aspect-ratio-wrapper" }, hAsync("div", { key: 'cb533bcb6b16cb21112b96ad862739deffec11e1', class: "aspect-ratio-content" }, hAsync("slot", { key: '8c1737d96c384f55f876c5a3588a79b2381b01a1' })))));
|
|
31333
32967
|
}
|
|
31334
32968
|
static get style() { return RoadAspectRatioStyle0; }
|
|
31335
32969
|
static get cmpMeta() { return {
|
|
@@ -32706,9 +34340,9 @@ class RoadPhoneNumberInput {
|
|
|
32706
34340
|
const isErrorClass = this.errorMessage.length ? 'is-error' : '';
|
|
32707
34341
|
const hasValueClass = this.hasValue() ? 'has-value' : '';
|
|
32708
34342
|
const sizes = 'xl';
|
|
32709
|
-
return (hAsync(Host, { key: '
|
|
34343
|
+
return (hAsync(Host, { key: 'b35e9d16e6e4f29defef7bdcd5cf8c2a2bd2c861' }, hAsync("div", { key: '4c2a4f6b4d6d28bfc90b2cc85d9ab3a2c5989a2b', class: 'phone-number-inputs-container' }, hAsync("div", { key: '5c94cfdfb637deabaaee01375f80276bb37f2ac3', class: `road-phone-input-select ${isErrorClass} ${isInvalidClass}`, slot: "prepend" }, hAsync("select", { key: '8b226ae681f17788d5c476d531614b6063eff700', id: selectId, class: `form-select-area has-value`, "aria-disabled": this.disabled ? 'true' : null, disabled: this.disabled, onChange: (event) => this.handleSelect(event), "aria-label": this.codeLabel, tabIndex: this.disabled ? -1 : 0 }, this.countryOptions && this.countryOptions.map(option => (hAsync("option", { value: option.value, disabled: option.disabled, selected: option.selected }, option.label)))), hAsync("label", { key: 'b12b6fcbf96de164bca500332d9f9b363e6af4bc', class: "form-select-area-label", id: labelId, htmlFor: selectId }, this.codeLabel), hAsync("label", { key: '04843eb39336e241d60d5983c1e92a6af3edead4', class: "form-select-area-value", id: valueId, htmlFor: selectId }, "+", this.selectedCountryCode)), hAsync("input", { key: 'fb9a9b002c1638df2eb593c6f95181cca6b91c14', type: 'tel', id: inputId, class: `input-${sizes} phone-number-input-field ${hasValueClass} ${isErrorClass}`, value: this.phoneValue, required: this.required, tabIndex: 0, onInput: (event) => this.handleInput(event) }), hAsync("label", { key: '83bafd94dea321d0a8ab7cd50cc6d29f71d83d34', class: "phone-number-input-label", id: labelId, htmlFor: inputId }, this.phoneLabel)), this.errorMessage
|
|
32710
34344
|
&& this.errorMessage !== ''
|
|
32711
|
-
&& hAsync("p", { key: '
|
|
34345
|
+
&& hAsync("p", { key: '01aafef72de6d89f0f8bbd912759ea98b3992e87', class: "invalid-feedback" }, hAsync("road-icon", { key: '02a98a05942b1c096a70a4112c0f074faa5843d7', slot: "start", color: 'danger', name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), this.errorMessage)));
|
|
32712
34346
|
}
|
|
32713
34347
|
get el() { return getElement(this); }
|
|
32714
34348
|
static get style() { return RoadPhoneNumberInputStyle0; }
|
|
@@ -32827,7 +34461,7 @@ class RoadTimeRangePicker {
|
|
|
32827
34461
|
return { start: this.start, end: this.end };
|
|
32828
34462
|
}
|
|
32829
34463
|
render() {
|
|
32830
|
-
return (hAsync(Host, { key: '
|
|
34464
|
+
return (hAsync(Host, { key: 'c1528d80635b8cfdf6dbd01f890f20b12cb5948b', class: `time-range-picker input-${this.sizes}` }, this.label && (hAsync("p", { key: '2d97d59a6b8449695537ad1a5bd0991e01c19bac', class: "label m-0" }, this.label, this.required && hAsync("span", { key: '156a83258da14bc98be719155735afdbb17ccd50', class: "required-indicator" }, " *"))), hAsync("div", { key: '836ab421c7c9ddbcd0e51a135d670962a0a27bf3', class: "time-range-picker-content d-flex align-items-center my-4" }, hAsync("slot", { key: '66f945df18b1b404aa073d38501e11ee8bd5a1f0', name: "start" }), hAsync("span", { key: '392ade369762ccf97ca3a8cf69398ca3a247f14e', class: "separator mx-12" }, this.separator), hAsync("slot", { key: 'afac72354a5166ece7fcfea81c7115c599c61b85', name: "end" })), hAsync("div", { key: '1a6d049fbe026f2c76cfb9164a3fff7983174ac4', class: "messages mt-1" }, this.errorMessages.map((msg, index) => (hAsync("p", { key: index, class: "invalid-feedback m-0" }, hAsync("road-icon", { slot: "start", name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), msg.trim())))), this.helper && hAsync("p", { key: 'dacbada369bbbe28302070d11e2242958ee2d983', class: "helper mt-1" }, this.helper)));
|
|
32831
34465
|
}
|
|
32832
34466
|
get hostEl() { return getElement(this); }
|
|
32833
34467
|
static get style() { return RoadTimeRangePickerStyle0; }
|
|
@@ -32863,7 +34497,7 @@ class Row {
|
|
|
32863
34497
|
registerInstance(this, hostRef);
|
|
32864
34498
|
}
|
|
32865
34499
|
render() {
|
|
32866
|
-
return (hAsync(Host, { key: '
|
|
34500
|
+
return (hAsync(Host, { key: 'c38bbf8641a80fc8ebb76c25f5cec3070127c569' }, hAsync("slot", { key: 'b8459fd13efb02e5b04fb4558533f89f37cbe858' })));
|
|
32867
34501
|
}
|
|
32868
34502
|
static get style() { return RoadRowStyle0; }
|
|
32869
34503
|
static get cmpMeta() { return {
|
|
@@ -32935,10 +34569,10 @@ class SegmentedButton {
|
|
|
32935
34569
|
render() {
|
|
32936
34570
|
const { tabIndex, selected, tab } = this;
|
|
32937
34571
|
const sizeClass = this.size !== undefined ? `btn-${this.size}` : '';
|
|
32938
|
-
return (hAsync(Host, { key: '
|
|
34572
|
+
return (hAsync(Host, { key: 'f97ac52e941a6d41c3cc1ebde88396c7a88bcc5b', onClick: this.onClick, onKeyup: this.onKeyUp, role: "tab", tabindex: tabIndex, "aria-selected": selected ? 'true' : null, id: tab !== undefined ? `tab-button-${tab}` : null, class: {
|
|
32939
34573
|
'tab-selected': selected,
|
|
32940
34574
|
[`${sizeClass}`]: true,
|
|
32941
|
-
} }, hAsync("span", { key: '
|
|
34575
|
+
} }, hAsync("span", { key: 'd608b3b0da3af5184b3a4faeda5bfc6d643cb14f', tabIndex: -1, class: "button-native", part: "native", "aria-hidden": "true" }, hAsync("span", { key: '6aab4780198238402d5911e60b905d8187624266', class: "button-content" }, hAsync("slot", { key: '12d3b5ebb3de039dffd9d99bd658de975a2ed6df' })))));
|
|
32942
34576
|
}
|
|
32943
34577
|
get el() { return getElement(this); }
|
|
32944
34578
|
static get style() { return RoadSegmentedButtonStyle0; }
|
|
@@ -33059,7 +34693,7 @@ class Select {
|
|
|
33059
34693
|
const labelId = this.selectId + '-label';
|
|
33060
34694
|
const hasValueClass = this.value && this.value !== '' ? 'has-value' : '';
|
|
33061
34695
|
const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
|
|
33062
|
-
return (hAsync(Host, { key: '
|
|
34696
|
+
return (hAsync(Host, { key: 'fb313bb494596711a3b9f5c893ad32718d8b91b9', class: this.sizes && `select-${this.sizes}` }, hAsync("select", { key: '1414476677d43a66f4386b33d0e214dfda608f3c', class: `form-select ${hasValueClass} ${isInvalidClass}`, id: this.selectId, "aria-disabled": this.disabled ? 'true' : null, autoFocus: this.autofocus, disabled: this.disabled, name: this.name, required: this.required, size: this.size, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur }, hAsync("option", { key: 'e76bb7a68a1876237168287ed1c644489b01ae1d', selected: !this.value, disabled: true, hidden: true, style: { display: 'none' }, value: "" }), this.options && this.options.map(option => (hAsync("option", { value: option.value, selected: this.value !== null && option.value == this.value }, option.label)))), hAsync("label", { key: 'a8e873fecdd61d0b329cac070f3705aaf534e846', class: "form-select-label", id: labelId, htmlFor: this.selectId }, this.label), this.error && this.error !== '' && hAsync("p", { key: '82ba6e3b17d05cd9b90ce1b47c1fabe7673753d2', class: "invalid-feedback" }, this.error), this.helper && this.helper !== '' && hAsync("p", { key: '6641b93d7b62266d671196f340d8ff2b385b5159', class: "helper" }, this.helper)));
|
|
33063
34697
|
}
|
|
33064
34698
|
static get watchers() { return {
|
|
33065
34699
|
"value": ["valueChanged"]
|
|
@@ -35053,7 +36687,7 @@ class SelectFilter {
|
|
|
35053
36687
|
const options = this.filteredOptions;
|
|
35054
36688
|
const isActive = this.isActive ? 'true' : 'false';
|
|
35055
36689
|
const notActive = this.isActive ? '' : 'not-active';
|
|
35056
|
-
return (hAsync(Host, { key: '
|
|
36690
|
+
return (hAsync(Host, { key: 'b1411c1e27ab139c15417acfe996f70f1412f049', "is-active": isActive }, hAsync("slot", { key: 'cf2229232ebeb1b781f44dac2ce2bcc19eb56282' }), this.isOpen && (hAsync("div", { key: '568f2f9ea1dfa8f6178805062cc5d391fbb1e122', class: `${notActive} select-filter-list`, role: "listbox", onMouseLeave: this.handleMouseLeave }, options.length === 0 ? (hAsync("div", { class: "select-filter-empty" }, "Aucune option")) : (hAsync("ul", { class: "pl-0" }, options.map((option, idx) => (hAsync("li", { class: `select-filter-item ${this.activeIndex === idx ? 'active' : ''}`, role: "option", "aria-selected": this.activeIndex === idx ? 'true' : 'false', onClick: (e) => this.handleOptionClick(option.item.value, option.item.label.replace(/(<([^>]+)>)/gi, ''), e), onMouseOver: () => this.handleOptionMouseOver(idx), innerHTML: option.item.label, tabindex: this.activeIndex === idx ? 0 : -1 })))))))));
|
|
35057
36691
|
}
|
|
35058
36692
|
get el() { return getElement(this); }
|
|
35059
36693
|
static get watchers() { return {
|
|
@@ -35089,7 +36723,7 @@ class Skeleton {
|
|
|
35089
36723
|
registerInstance(this, hostRef);
|
|
35090
36724
|
}
|
|
35091
36725
|
render() {
|
|
35092
|
-
return (hAsync("span", { key: '
|
|
36726
|
+
return (hAsync("span", { key: '33cfe20d51c54101ccf43a5027549fa79d707cab' }, "\u00A0"));
|
|
35093
36727
|
}
|
|
35094
36728
|
static get style() { return RoadSkeletonStyle0; }
|
|
35095
36729
|
static get cmpMeta() { return {
|
|
@@ -35120,7 +36754,7 @@ class Spinner {
|
|
|
35120
36754
|
render() {
|
|
35121
36755
|
const sizeClass = this.size !== undefined ? `spinner spinner--${this.size}` : 'spinner';
|
|
35122
36756
|
const colorClass = this.size !== undefined ? `spinner-circle spinner-circle--${this.color}` : 'spinner-circle';
|
|
35123
|
-
return (hAsync("svg", { key: '
|
|
36757
|
+
return (hAsync("svg", { key: '90d3a6eafbf227b79edf5b298b2bd5e212436c7a', class: `${sizeClass}`, viewBox: "25 25 50 50" }, hAsync("circle", { key: '9a90e8724a39005b1a51029b25401fc876149571', class: `${colorClass}`, cx: "50", cy: "50", r: "20" })));
|
|
35124
36758
|
}
|
|
35125
36759
|
static get style() { return RoadSpinnerStyle0; }
|
|
35126
36760
|
static get cmpMeta() { return {
|
|
@@ -35170,7 +36804,7 @@ class Stepper {
|
|
|
35170
36804
|
const urlStep1 = this.urlStep1 !== undefined ? `${this.urlStep1}` : '#';
|
|
35171
36805
|
const urlStep2 = this.urlStep2 !== undefined ? `${this.urlStep2}` : '#';
|
|
35172
36806
|
const urlStep3 = this.urlStep3 !== undefined ? `${this.urlStep3}` : '#';
|
|
35173
|
-
return (hAsync(Host, { key: '
|
|
36807
|
+
return (hAsync(Host, { key: '2f7ef35d5517a148676c46d55561a47092ed0ff3' }, hAsync("nav", { key: 'efe3d51a472a7472a9f2f0da1403e223bca22513' }, hAsync("ul", { key: 'f4046d581b8ed717bda8be93efa0870bfa7e4369', class: `${colorClass}` }, hAsync("li", { key: 'fb431196011a0cd284847f13b1d5999e69487b5b', class: `${stateClass}` }, hAsync("a", { key: '28b3e5b0c12593b2c26832777766524f5342c253', class: "progress-indicator-horizontal-link", href: `${urlStep1}` }, hAsync("span", { key: '535d3f5fc73aa22f87a9284ee4498dd975c3e977', class: "progress-indicator-horizontal-icon" }, hAsync("slot", { key: '492dbf0cfff34689a1513714c475a9f2b4cc6727', name: "progress-indicator-horizontal-icon" })), hAsync("span", { key: 'ecaf988f2dec663478169103b34820cdf7da4702', class: "progress-indicator-horizontal-title" }, hAsync("slot", { key: '4443bf77b78b0fcbb44046b95a9121abe0e22226', name: "progress-indicator-horizontal-title" })))), hAsync("li", { key: '15328f9d9a15ada2ff751b651084bfa0e83f7d5a', class: `${stateSecondStepClass}` }, hAsync("a", { key: '441f9a53903b3a14d0fab8296213ce10f16dc5b6', class: "progress-indicator-horizontal-link", href: `${urlStep2}` }, hAsync("span", { key: '31b6487818279d37e486acb20363b527762481da', class: "progress-indicator-horizontal-icon" }, hAsync("slot", { key: 'b03d967c5a09640253b5edb8425f855d8eb790bc', name: "progress-indicator-horizontal-icon2" })), hAsync("span", { key: 'bfcd4994aa5fb7eee27419033b87f0e248ddeb81', class: "progress-indicator-horizontal-title" }, hAsync("slot", { key: 'f5a493c800b9f7466ffb85d37d460844cbb05573', name: "progress-indicator-horizontal-title2" })))), this.numberStep == 3 && hAsync("li", { key: 'bca52096f27dc5e9ae3e12419882b4dd7a8bc1d9', class: `${stateThirdStepClass}` }, hAsync("a", { key: '74f8d7e8fef0f43a07d1cca3f5233d364e77eca5', class: "progress-indicator-horizontal-link", href: `${urlStep3}` }, hAsync("span", { key: 'f37905f33aa30a1fe5d64bea3ed352bd22faf729', class: "progress-indicator-horizontal-icon" }, hAsync("slot", { key: '27666dc115efe677af2bf91d73dd5a1f35c28518', name: "progress-indicator-horizontal-icon3" })), hAsync("span", { key: 'cd081a852ac065372324b17e8a3992429b87b16e', class: "progress-indicator-horizontal-title" }, hAsync("slot", { key: 'fd71af01b710df38a3a06ed75757d2df1d8193ea', name: "progress-indicator-horizontal-title3" }))))))));
|
|
35174
36808
|
}
|
|
35175
36809
|
static get style() { return RoadProgressIndicatorHorizontalStyle0; }
|
|
35176
36810
|
static get cmpMeta() { return {
|
|
@@ -35272,11 +36906,11 @@ class Switch {
|
|
|
35272
36906
|
}
|
|
35273
36907
|
render() {
|
|
35274
36908
|
const labelId = this.switchId + '-label';
|
|
35275
|
-
const textLabel = hAsync("label", { key: '
|
|
36909
|
+
const textLabel = hAsync("label", { key: 'ce7aa5f11558ca65be5c3e67fa4bd195befb93fb', class: "form-switch-label", id: labelId, htmlFor: this.switchId }, this.label);
|
|
35276
36910
|
const colorClass = this.color !== undefined ? 'form-switch-' + this.color : '';
|
|
35277
36911
|
const isSpacedClass = this.isSpaced && 'form-switch-spaced';
|
|
35278
36912
|
const rightSwitchClass = this.hasLeftLabel ? 'form-switch-right' : '';
|
|
35279
|
-
return (hAsync(Host, { key: '
|
|
36913
|
+
return (hAsync(Host, { key: '67cb125cd5c23b799ae301f584fe2fbf446a35dd' }, hAsync("input", { key: 'dc19948d6370b14e077eb4725cfcb35916eb779f', class: "form-switch-input", type: "checkbox", id: this.switchId, name: this.name, checked: this.checked, disabled: this.disabled, value: this.value, "aria-checked": `${this.checked}`, "aria-disabled": this.disabled ? 'true' : null, "aria-labelledby": labelId, onClick: this.onClick, onFocus: this.onFocus, onBlur: this.onBlur }), hAsync("label", { key: 'fb2645a723c66e5d45d621260f4ef18a172dccc4', class: `form-switch-label ${isSpacedClass} ${colorClass}`, htmlFor: this.switchId }, this.hasLeftLabel && textLabel, hAsync("div", { key: 'a0e6f831b9136f89fcc70ed3004a8551c4b10760', class: `form-switch-lever ${rightSwitchClass}`, "data-off": this.off, "data-on": this.on }), this.hasLeftLabel ? '' : textLabel)));
|
|
35280
36914
|
}
|
|
35281
36915
|
static get watchers() { return {
|
|
35282
36916
|
"checked": ["checkedChanged"]
|
|
@@ -35331,9 +36965,9 @@ class Tab {
|
|
|
35331
36965
|
}
|
|
35332
36966
|
render() {
|
|
35333
36967
|
const { tab, active } = this;
|
|
35334
|
-
return (hAsync(Host, { key: '
|
|
36968
|
+
return (hAsync(Host, { key: '3027c31c282565b7d5905d3b3031db04ba1bed44', role: "tabpanel", "aria-hidden": !active ? 'true' : null, "aria-labelledby": `tab-button-${tab}`, class: {
|
|
35335
36969
|
'tab-hidden': !active,
|
|
35336
|
-
} }, hAsync("slot", { key: '
|
|
36970
|
+
} }, hAsync("slot", { key: '70ae19f3e889a8c46d062363445185055a6c1133' })));
|
|
35337
36971
|
}
|
|
35338
36972
|
get el() { return getElement(this); }
|
|
35339
36973
|
static get style() { return RoadTabStyle0; }
|
|
@@ -35393,11 +37027,11 @@ class TabBar {
|
|
|
35393
37027
|
}
|
|
35394
37028
|
render() {
|
|
35395
37029
|
const { expand, center, secondary } = this;
|
|
35396
|
-
return (hAsync(Host, { key: '
|
|
37030
|
+
return (hAsync(Host, { key: 'a40a29c3f335bd4b49495203834bb937af77a4bb', role: "tablist", class: {
|
|
35397
37031
|
'tab-expand': expand,
|
|
35398
37032
|
'tab-center': center,
|
|
35399
37033
|
'tab-secondary': secondary,
|
|
35400
|
-
} }, hAsync("slot", { key: '
|
|
37034
|
+
} }, hAsync("slot", { key: 'b7abc10609ae8939e729c735fb942b1b89c604ad' })));
|
|
35401
37035
|
}
|
|
35402
37036
|
get el() { return getElement(this); }
|
|
35403
37037
|
static get watchers() { return {
|
|
@@ -35497,7 +37131,7 @@ class TabButton {
|
|
|
35497
37131
|
rel,
|
|
35498
37132
|
target,
|
|
35499
37133
|
};
|
|
35500
|
-
return (hAsync(Host, { key: '
|
|
37134
|
+
return (hAsync(Host, { key: '3cb6c6f8dcab1715547dfa6fc43c4e6ec3234507', onClick: (ev) => !disabled && this.onClick(ev), onKeyup: (ev) => !disabled && this.onKeyUp(ev), role: "tab", tabindex: disabled ? -1 : tabIndex, "aria-selected": selected ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, id: tab !== undefined ? `tab-button-${tab}` : null, class: {
|
|
35501
37135
|
'tab-selected': selected,
|
|
35502
37136
|
'tab-has-label': hasLabel,
|
|
35503
37137
|
'tab-has-icon': hasIcon,
|
|
@@ -35505,7 +37139,7 @@ class TabButton {
|
|
|
35505
37139
|
'tab-has-icon-only': hasIcon && !hasLabel,
|
|
35506
37140
|
[`tab-layout-${layout}`]: true,
|
|
35507
37141
|
'tab-disabled': disabled, // Classe CSS pour les styles désactivés
|
|
35508
|
-
} }, hAsync("a", Object.assign({ key: '
|
|
37142
|
+
} }, hAsync("a", Object.assign({ key: '7f07a67f84c56857ac864b2d56c1698f31f618d5' }, attrs, { tabIndex: -1, class: "button-native", part: "native" }), hAsync("span", { key: 'b6b0a2caa81b69199bf85210cec8722846a413b8', class: "button-inner" }, hAsync("slot", { key: 'efbc557b0428fe1513f150ed97f0c9037284daa2' })))));
|
|
35509
37143
|
}
|
|
35510
37144
|
get el() { return getElement(this); }
|
|
35511
37145
|
static get style() { return RoadTabButtonStyle0; }
|
|
@@ -35539,7 +37173,7 @@ class Table {
|
|
|
35539
37173
|
registerInstance(this, hostRef);
|
|
35540
37174
|
}
|
|
35541
37175
|
render() {
|
|
35542
|
-
return (hAsync("slot", { key: '
|
|
37176
|
+
return (hAsync("slot", { key: '4fbbf196c158059cc8c375e9fcd848cd8e2d864f' }));
|
|
35543
37177
|
}
|
|
35544
37178
|
static get style() { return RoadTableStyle0; }
|
|
35545
37179
|
static get cmpMeta() { return {
|
|
@@ -35647,7 +37281,7 @@ class Tabs$1 {
|
|
|
35647
37281
|
return Array.from(this.el.querySelectorAll('road-tab'));
|
|
35648
37282
|
}
|
|
35649
37283
|
render() {
|
|
35650
|
-
return (hAsync(Host, { key: '
|
|
37284
|
+
return (hAsync(Host, { key: 'd1d9e0ab7ed50aa338646a473b2c3e22d4a30f6b', onRoadSegmentedButtonClick: this.onTabClicked }, hAsync("slot", { key: '681bb4fdcf7bc99dd558723c85ea65b6182a7556', name: "top" }), hAsync("slot", { key: '395d680d41e4c831d7e12e2d4b5e83e74d1128cf' })));
|
|
35651
37285
|
}
|
|
35652
37286
|
get el() { return getElement(this); }
|
|
35653
37287
|
static get style() { return RoadSegmentedButtonsStyle0; }
|
|
@@ -35783,7 +37417,7 @@ class Tabs {
|
|
|
35783
37417
|
return Array.from(this.el.querySelectorAll('road-tab'));
|
|
35784
37418
|
}
|
|
35785
37419
|
render() {
|
|
35786
|
-
return (hAsync(Host, { key: '
|
|
37420
|
+
return (hAsync(Host, { key: '5bea03df378d3de02ca7dec12e9794a8edbb073c', onRoadTabButtonClick: this.onTabClicked }, hAsync("slot", { key: '9f6d69f412a26dce57a919d02003e7548e824b08', name: "top" }), hAsync("div", { key: '05058a9ec02a249ab6bc9d0f2bc301c1803e1e20', class: "tabs-inner" }, hAsync("slot", { key: 'f10bf6e9d99a0c040dd4045b18f22f288e19fc2e' }))));
|
|
35787
37421
|
}
|
|
35788
37422
|
get el() { return getElement(this); }
|
|
35789
37423
|
static get style() { return RoadTabsStyle0; }
|
|
@@ -35831,7 +37465,7 @@ class Tag {
|
|
|
35831
37465
|
}
|
|
35832
37466
|
render() {
|
|
35833
37467
|
const contrastClass = this.contrast ? `tag-${this.color} tag-${this.color}-contrast` : `tag-${this.color}`;
|
|
35834
|
-
return (hAsync(Host, { key: '
|
|
37468
|
+
return (hAsync(Host, { key: '2639b90b789a6fde1fae0f3201236a7c9f4e1aad', class: `${contrastClass}` }, hAsync("slot", { key: '8039feeab97b500f0828e1efa751b9771f4f5e65' })));
|
|
35835
37469
|
}
|
|
35836
37470
|
static get style() { return RoadTagStyle0; }
|
|
35837
37471
|
static get cmpMeta() { return {
|
|
@@ -35863,7 +37497,7 @@ class Text {
|
|
|
35863
37497
|
}
|
|
35864
37498
|
render() {
|
|
35865
37499
|
const colorClass = this.color !== undefined ? `text-${this.color}` : '';
|
|
35866
|
-
return (hAsync(Host, { key: '
|
|
37500
|
+
return (hAsync(Host, { key: '2b1df03bfadf4021cf4016c584cdbd0ccf09324c', class: `${colorClass}` }, hAsync("slot", { key: '6966b8ebe4a2eb48b1fd020a707c6a37a519b099' })));
|
|
35867
37501
|
}
|
|
35868
37502
|
static get style() { return RoadTextStyle0; }
|
|
35869
37503
|
static get cmpMeta() { return {
|
|
@@ -35973,7 +37607,7 @@ class Textarea {
|
|
|
35973
37607
|
const hasValueClass = this.value !== '' ? 'has-value' : '';
|
|
35974
37608
|
const noResizeClass = this.resize == false ? 'no-resize' : '';
|
|
35975
37609
|
const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
|
|
35976
|
-
return (hAsync(Host, { key: '
|
|
37610
|
+
return (hAsync(Host, { key: 'cc414e4da358e65b430b91b0f834cbe403993693', "aria-disabled": this.disabled ? 'true' : null, class: this.sizes && `input-${this.sizes}` }, hAsync("textarea", { key: '0d0a45eaf71ada8178387d6debfc5e3d6da6cb4f', class: `form-control textarea-control ${hasValueClass} ${noResizeClass} ${isInvalidClass}`, id: this.textareaId, "aria-disabled": this.disabled ? 'true' : null, "aria-labelledby": labelId, disabled: this.disabled, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, maxLength: this.maxlength, minLength: this.minlength, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, value: value, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus }), hAsync("label", { key: 'a74070b2761b5ced0251f5bce4ef48837d892c9d', class: "form-label", id: labelId, htmlFor: this.textareaId }, this.label), this.error && this.error !== '' && hAsync("p", { key: 'ba52ee759d52772a2eac2e9948c64309164aabdc', class: "invalid-feedback" }, this.error), this.helper && this.helper !== '' && hAsync("p", { key: '377f7c03d77aad381b2bdd63c4753369870612df', class: "helper" }, this.helper)));
|
|
35977
37611
|
}
|
|
35978
37612
|
static get watchers() { return {
|
|
35979
37613
|
"value": ["valueChanged"]
|
|
@@ -36104,7 +37738,7 @@ class Toast {
|
|
|
36104
37738
|
if (this.color == 'danger') {
|
|
36105
37739
|
this.timeout = 0;
|
|
36106
37740
|
}
|
|
36107
|
-
return (hAsync(Host, { key: '
|
|
37741
|
+
return (hAsync(Host, { key: '7e6b8eb5b97d93b1c0da2b5fca2b95d7fe53b464', class: `${toastIsOpenClass}`, role: "alert" }, hAsync("div", { key: '928fcd556ba9573248c0bf136d41ae385fef3c0f', class: `toast toast-${this.color}` }, hAsync("road-icon", { key: '6620412742937e307d6677bdfeb5b3df34403cee', class: "toast-icon", icon: icon, "aria-hidden": "true" }), hAsync("p", { key: 'b7fa0b376a936b6ddf6f7a995fbd531b6657dc72', class: "toast-label" }, this.label), hAsync("button", { key: 'c38b2ab0f05605a9c428684e31ef07a8ee03491c', type: "button", class: "toast-close", "aria-label": "Close", onClick: this.onClick }, hAsync("road-icon", { key: '71820f58335f516f7660650e10f042b347922113', icon: navigationClose, size: "md" })), hAsync("slot", { key: '52cc64d445b08d0f3a993deae2228e8da87ba5f5', name: "progress" }))));
|
|
36108
37742
|
}
|
|
36109
37743
|
static get watchers() { return {
|
|
36110
37744
|
"isOpen": ["isOpenChanged"]
|
|
@@ -36144,7 +37778,7 @@ class Toolbar {
|
|
|
36144
37778
|
}
|
|
36145
37779
|
render() {
|
|
36146
37780
|
const colorClass = this.color !== undefined ? `toolbar-${this.color}` : '';
|
|
36147
|
-
return (hAsync(Host, { key: '
|
|
37781
|
+
return (hAsync(Host, { key: '4155097cf17050c6f1c9ddd4ad66c153f005fa45', class: colorClass }, hAsync("div", { key: '74c8520959b7893b32c59744ad5486ed075d5ee1', class: "toolbar-container" }, hAsync("slot", { key: '37605f2014027e0f12b5c80b2f57db710ae3b726', name: "start" }), hAsync("slot", { key: '9162f18c3fc3fab8ce1491841889a2d9616ab0e9', name: "primary" }), hAsync("div", { key: 'fdf739135446b6977e3d89537118a3417c0bfd86', class: "toolbar-content" }, hAsync("slot", { key: '48434e192dd116fe52796dbe3f62d6bed0ac5a79' })), hAsync("slot", { key: '5eee5c80975129ed993ce466e5d96efdd6854922', name: "secondary" }), hAsync("slot", { key: 'c52c70da47aea897e50c7eab9a3fdfba5f9056e3', name: "end" }))));
|
|
36148
37782
|
}
|
|
36149
37783
|
static get style() { return RoadToolbarStyle0; }
|
|
36150
37784
|
static get cmpMeta() { return {
|
|
@@ -36170,7 +37804,7 @@ class ToolbarAppName {
|
|
|
36170
37804
|
registerInstance(this, hostRef);
|
|
36171
37805
|
}
|
|
36172
37806
|
render() {
|
|
36173
|
-
return (hAsync("div", { key: '
|
|
37807
|
+
return (hAsync("div", { key: 'fa5fa9ad6f5e3a1d562bdc38b312c16cc9483d54', class: "toolbar-title-page" }, hAsync("slot", { key: 'b35389dcc32ff0ba0c163e5916d701c79fbf8ba9' })));
|
|
36174
37808
|
}
|
|
36175
37809
|
static get style() { return RoadToolbarTitlePageStyle0; }
|
|
36176
37810
|
static get cmpMeta() { return {
|
|
@@ -36194,7 +37828,7 @@ class ToolbarTitle {
|
|
|
36194
37828
|
registerInstance(this, hostRef);
|
|
36195
37829
|
}
|
|
36196
37830
|
render() {
|
|
36197
|
-
return (hAsync("div", { key: '
|
|
37831
|
+
return (hAsync("div", { key: 'fe411cfd08be76715a7896bb645a9c5d07479539', class: "toolbar-title" }, hAsync("slot", { key: 'c81416028a3c8aef9676e3c52f6ffb3202994eff' })));
|
|
36198
37832
|
}
|
|
36199
37833
|
static get style() { return RoadToolbarTitleStyle0; }
|
|
36200
37834
|
static get cmpMeta() { return {
|
|
@@ -36223,7 +37857,7 @@ class ToolbarV2 {
|
|
|
36223
37857
|
registerInstance(this, hostRef);
|
|
36224
37858
|
}
|
|
36225
37859
|
render() {
|
|
36226
|
-
return (hAsync(Host, { key: '
|
|
37860
|
+
return (hAsync(Host, { key: 'baadd003637adbfecd43171047bd15bdf9ea6703', class: "toolbar" }, hAsync("div", { key: 'ce2ad280afbb52c7dfd3d05fd4cbbc740edcbc72', class: "toolbar-container" }, hAsync("div", { key: 'ede1c5b3749744ecdd41926b11efbde968bf58c1', class: "toolbar-container-content-left" }, hAsync("slot", { key: 'c0076ab7411d30d6c018155c11eef33ddcd7341b', name: "start" }), hAsync("slot", { key: 'c6cb5ab75a4135c73bc6daf10c6075aa98cd8d51', name: "primary" })), hAsync("div", { key: 'bc46b95ef46a0c55ea67fbdc04d8ab04179c6445', class: "toolbar-content" }, hAsync("slot", { key: 'c73f60b2ba26f405fd13cd66b6b5b87810b50b44' })), hAsync("div", { key: '0886cb221b201e1f39754e9a18a844a582437572', class: "toolbar-container-content-right" }, hAsync("slot", { key: '3d143472b05113fb9440738c5b74afed8e75d68c', name: "secondary" }), hAsync("slot", { key: '98cceebd60e608dd9e7eced6046cd5a0b12d8a94', name: "end" })))));
|
|
36227
37861
|
}
|
|
36228
37862
|
static get style() { return RoadToolbarV2Style0; }
|
|
36229
37863
|
static get cmpMeta() { return {
|
|
@@ -36336,12 +37970,12 @@ class Tooltip {
|
|
|
36336
37970
|
return triggers.includes(triggerType);
|
|
36337
37971
|
}
|
|
36338
37972
|
render() {
|
|
36339
|
-
return (hAsync(Host, { key: '
|
|
37973
|
+
return (hAsync(Host, { key: '1e3cb1bb336b5c4a63f3395c588f2c842a6c22a7', onMouseOver: this.onMouseOver, onMouseOut: this.onMouseOut, onClick: this.onClick, onFocus: this.onFocus, onBlur: this.onBlur, tabindex: "0" // Makes the element focusable
|
|
36340
37974
|
,
|
|
36341
|
-
"data-tooltip-position": this.position }, hAsync("slot", { key: '
|
|
37975
|
+
"data-tooltip-position": this.position }, hAsync("slot", { key: '8b5ae95d0076acbad18fb73bf32e9b31085c8365', "aria-describedby": this.tooltipId }), hAsync("div", { key: 'ba8a5ac573fa0b31edb9e26fab1c8ee212789f1d', part: "tooltip", id: this.tooltipId, class: {
|
|
36342
37976
|
tooltip: true,
|
|
36343
37977
|
'tooltip-open': this.isOpen,
|
|
36344
|
-
}, role: "tooltip", "aria-hidden": !this.isOpen ? 'true' : 'false' }, this.content, hAsync("slot", { key: '
|
|
37978
|
+
}, role: "tooltip", "aria-hidden": !this.isOpen ? 'true' : 'false' }, this.content, hAsync("slot", { key: 'cbc2c9bce87ee7b42897c9a8a24ff0f896e0670c', name: "tooltip-content" }))));
|
|
36345
37979
|
}
|
|
36346
37980
|
get el() { return getElement(this); }
|
|
36347
37981
|
static get style() { return RoadTooltipStyle0; }
|
|
@@ -36433,11 +38067,11 @@ class toggle {
|
|
|
36433
38067
|
}
|
|
36434
38068
|
render() {
|
|
36435
38069
|
const labelId = this.toggleId + '-label';
|
|
36436
|
-
const textLabel = hAsync("label", { key: '
|
|
38070
|
+
const textLabel = hAsync("label", { key: '200063a0e964b5a6cc9694a6aae1b45418751867', class: "form-toggle-label", id: labelId, htmlFor: this.toggleId }, this.label);
|
|
36437
38071
|
const isSpacedClass = this.isSpaced && 'form-toggle-spaced';
|
|
36438
38072
|
const righttoggleClass = this.hasLeftLabel ? 'form-toggle-right' : '';
|
|
36439
38073
|
const disabledClass = this.disabled ? 'disabled' : '';
|
|
36440
|
-
return (hAsync(Host, { key: '
|
|
38074
|
+
return (hAsync(Host, { key: '65b426ec8ab4b2e9c1f773e92c5034cb67893ded' }, hAsync("input", { key: 'a92fd1807ad4fa13492cc7dc3664b088228d020b', class: "form-toggle-input", type: "checkbox", id: this.toggleId, name: this.name, checked: this.checked, disabled: this.disabled, value: this.value, "aria-checked": `${this.checked}`, "aria-disabled": this.disabled ? 'true' : null, "aria-labelledby": labelId, onClick: this.onClick, onFocus: this.onFocus, onBlur: this.onBlur }), hAsync("label", { key: '4ad95f0f23572757d568923e88b29f7c7a24bbfa', class: `form-toggle-label ${isSpacedClass} ${disabledClass}`, htmlFor: this.toggleId }, this.hasLeftLabel && textLabel, hAsync("div", { key: 'd82522fd9584390936eaf96b65a6a6fb14713794', class: `form-toggle-lever ${righttoggleClass}` }, this.checked ? (hAsync("road-icon", { name: "check-small-solid", class: "form-toggle-lever-check", size: "md" })) : (hAsync("road-icon", { name: "navigation-close-solid", class: "form-toggle-lever-close", size: "md" }))), this.hasLeftLabel ? '' : textLabel)));
|
|
36441
38075
|
}
|
|
36442
38076
|
static get watchers() { return {
|
|
36443
38077
|
"checked": ["checkedChanged"]
|